@maggioli-design-system/mds-modal 1.1.0 → 1.3.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-5643c33e.js → index-c8c3e8b2.js} +27 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-modal.cjs.entry.js +6 -4
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mds-modal/mds-modal.css +144 -59
- package/dist/collection/components/mds-modal/mds-modal.js +3 -2
- package/dist/collection/components/mds-modal/meta/dictionary.js +2 -0
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +1 -1
- package/dist/collection/dictionary/icon.js +2 -2
- package/dist/components/mds-modal.js +7 -6
- package/dist/esm/{index-75ff1533.js → index-d7a302c9.js} +27 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +6 -4
- package/dist/esm/mds-modal.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/index-d7a302c9.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-0405f81e.js +1 -0
- package/dist/mds-modal/p-50a5cce5.system.entry.js +1 -0
- package/dist/mds-modal/p-8d0fb641.system.js +1 -0
- package/{www/build/p-3f2aad3d.system.js → dist/mds-modal/p-ad0848cd.system.js} +1 -1
- package/dist/mds-modal/p-fd0cd402.entry.js +1 -0
- package/dist/stats.json +39 -40
- package/dist/types/components/mds-modal/meta/types.d.ts +1 -1
- package/package.json +4 -4
- package/readme.md +4 -9
- package/src/components/mds-modal/css/mds-modal-animate-bottom.css +28 -0
- package/src/components/mds-modal/css/mds-modal-animate-top.css +28 -0
- package/src/components/mds-modal/mds-modal.css +32 -7
- package/src/components/mds-modal/mds-modal.tsx +3 -1
- package/src/components/mds-modal/meta/dictionary.ts +2 -0
- package/src/components/mds-modal/meta/types.ts +2 -0
- package/src/components/mds-modal/readme.md +4 -4
- package/src/components/mds-modal/test/mds-modal.stories.js +1 -1
- package/src/dictionary/icon.ts +2 -2
- package/src/fixtures/icons.json +54 -0
- package/src/tailwind/components.css +14 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-0405f81e.js +1 -0
- package/www/build/p-50a5cce5.system.entry.js +1 -0
- package/www/build/p-8d0fb641.system.js +1 -0
- package/{dist/mds-modal/p-3f2aad3d.system.js → www/build/p-ad0848cd.system.js} +1 -1
- package/www/build/p-fd0cd402.entry.js +1 -0
- package/dist/esm-es5/index-75ff1533.js +0 -1
- package/dist/mds-modal/p-a4d22860.entry.js +0 -1
- package/dist/mds-modal/p-bc66d772.js +0 -1
- package/dist/mds-modal/p-bfbfd9ea.system.js +0 -1
- package/dist/mds-modal/p-f3ef788d.system.entry.js +0 -1
- package/www/build/p-a4d22860.entry.js +0 -1
- package/www/build/p-bc66d772.js +0 -1
- package/www/build/p-bfbfd9ea.system.js +0 -1
- package/www/build/p-f3ef788d.system.entry.js +0 -1
|
@@ -759,6 +759,29 @@ const then = (promise, thenFn) => {
|
|
|
759
759
|
};
|
|
760
760
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
761
761
|
;
|
|
762
|
+
/**
|
|
763
|
+
* Parse a new property value for a given property type.
|
|
764
|
+
*
|
|
765
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
766
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
767
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
768
|
+
* 2. the type stored from `propType`.
|
|
769
|
+
*
|
|
770
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
771
|
+
*
|
|
772
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
773
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
774
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
775
|
+
* ```tsx
|
|
776
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
777
|
+
* ```
|
|
778
|
+
*
|
|
779
|
+
* HTML prop values on the other hand, will always a string
|
|
780
|
+
*
|
|
781
|
+
* @param propValue the new value to coerce to some type
|
|
782
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
783
|
+
* @returns the parsed/coerced value
|
|
784
|
+
*/
|
|
762
785
|
const parsePropertyValue = (propValue, propType) => {
|
|
763
786
|
// ensure this value is of the correct prop type
|
|
764
787
|
if (propValue != null && !isComplexType(propValue)) {
|
|
@@ -788,7 +811,10 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
788
811
|
const flags = hostRef.$flags$;
|
|
789
812
|
const instance = hostRef.$lazyInstance$ ;
|
|
790
813
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
791
|
-
|
|
814
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
815
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
816
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
817
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
792
818
|
// gadzooks! the property's value has changed!!
|
|
793
819
|
// set our new value!
|
|
794
820
|
hostRef.$instanceValues$.set(propName, newVal);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-c8c3e8b2.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.14.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -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-c8c3e8b2.js');
|
|
6
6
|
|
|
7
7
|
function toVal(mix) {
|
|
8
8
|
var k, y, str='';
|
|
@@ -45,9 +45,11 @@ function clsx () {
|
|
|
45
45
|
return str;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const
|
|
48
|
+
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>`;
|
|
49
49
|
|
|
50
|
-
let MdsModal = class {
|
|
50
|
+
const mdsModalCss = "@tailwind components; .border{border-width:1px}.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)}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-left,.animate-right{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)}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host{pointer-events:none;position:fixed;top:0px;right:0px;bottom:0px;left:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(var(--adjust-tone-01), var(--tw-bg-opacity));--tw-bg-opacity:0;-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);-webkit-perspective:600px;perspective:600px}: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(.animate-bottom-opened),:host(.animate-center-opened),:host(.animate-left-opened),:host(.animate-right-opened),:host(.animate-top-opened){pointer-events:auto;--tw-bg-opacity:0.5;-webkit-transition-duration:500ms;transition-duration:500ms}.close{position:absolute;top:0px;height:2.25rem;width:2.25rem;-webkit-transform-origin:center;transform-origin:center;cursor:pointer;fill:rgb(var(--adjust-tone-10));font-size:2.25rem;line-height:2.5rem;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(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg)}.window{display:grid;height:100%;gap:0px;overflow:auto;background-color:var(--window-background, rgb(var(--adjust-tone)));-webkit-box-shadow:var(--window-shadow, 0 25px 50px -12px rgb(0 0 0 / 0.25));box-shadow:var(--window-shadow, 0 25px 50px -12px rgb(0 0 0 / 0.25));grid-template-rows:1fr;max-width:calc(100vw - 80px)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.animate-bottom){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-bottom){padding:1rem}}:host(.animate-bottom) .window,:host(.animate-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(.animate-bottom-intro) .window,:host(.animate-bottom-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-bottom-opened.animate-bottom-outro) .window,:host(.animate-bottom-opened.animate-bottom-outro)>::slotted([slot=window]),:host(.animate-bottom-opened) .window,:host(.animate-bottom-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-bottom-outro) .window,:host(.animate-bottom-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.animate-center){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-center){padding:1rem}}:host(.animate-center) .window,:host(.animate-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(.animate-center-intro) .window,:host(.animate-center-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-center-opened.animate-center-outro) .window,:host(.animate-center-opened.animate-center-outro)>::slotted([slot=window]),:host(.animate-center-opened) .window,:host(.animate-center-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-center-outro) .window,:host(.animate-center-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.animate-left){-ms-flex-pack:start;justify-content:flex-start}:host(.animate-left) .window,:host(.animate-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(.animate-left-intro) .window,:host(.animate-left-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-opened.animate-left-outro) .window,:host(.animate-left-opened.animate-left-outro)>::slotted([slot=window]),:host(.animate-left-opened) .window,:host(.animate-left-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.animate-left-opened) .close,:host(.animate-left-opened.animate-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.animate-left-outro) .window,:host(.animate-left-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.animate-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.animate-right){-ms-flex-pack:end;justify-content:flex-end}:host(.animate-right) .window,:host(.animate-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(.animate-right-intro) .window,:host(.animate-right-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-opened.animate-right-outro) .window,:host(.animate-right-opened.animate-right-outro)>::slotted([slot=window]),:host(.animate-right-opened) .window,:host(.animate-right-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.animate-right-opened) .close,:host(.animate-right-opened.animate-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.animate-right-outro) .window,:host(.animate-right-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.animate-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.animate-top){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-top){padding:1rem}}:host(.animate-top) .window,:host(.animate-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(.animate-top-intro) .window,:host(.animate-top-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-top-opened.animate-top-outro) .window,:host(.animate-top-opened.animate-top-outro)>::slotted([slot=window]),:host(.animate-top-opened) .window,:host(.animate-top-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-top-outro) .window,:host(.animate-top-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}";
|
|
51
|
+
|
|
52
|
+
const MdsModal = class {
|
|
51
53
|
constructor(hostRef) {
|
|
52
54
|
index.registerInstance(this, hostRef);
|
|
53
55
|
this.close = index.createEvent(this, "close", 7);
|
|
@@ -117,7 +119,7 @@ let MdsModal = class {
|
|
|
117
119
|
:
|
|
118
120
|
index.h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`) }, this.top &&
|
|
119
121
|
index.h("slot", { name: "top" }), index.h("slot", null), this.bottom &&
|
|
120
|
-
index.h("slot", { name: "bottom" })), !this.window && index.h("
|
|
122
|
+
index.h("slot", { name: "bottom" })), !this.window && index.h("i", { innerHTML: miBaselineClose, class: "svg close" })));
|
|
121
123
|
}
|
|
122
124
|
get hostElement() { return index.getElement(this); }
|
|
123
125
|
static get watchers() { return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-c8c3e8b2.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.14.2 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
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));
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@tailwind components;
|
|
2
|
+
.border{
|
|
3
|
+
border-width: 1px;
|
|
4
|
+
}
|
|
5
|
+
.shadow{
|
|
6
|
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
7
|
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
8
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
9
|
+
}
|
|
10
|
+
.svg{
|
|
11
|
+
display: flex;
|
|
12
|
+
}
|
|
13
|
+
.svg svg{
|
|
14
|
+
aspect-ratio: 1 / 1;
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
.animate-left, .animate-right{
|
|
4
19
|
opacity: 0;
|
|
5
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
20
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
21
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
6
22
|
transition-duration: 500ms;
|
|
7
23
|
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
8
24
|
}
|
|
9
|
-
|
|
10
|
-
.animate-right-intro,
|
|
25
|
+
.animate-right-intro,
|
|
11
26
|
.animate-right-outro {
|
|
12
27
|
transform: translateX(calc(100% + 50px));
|
|
13
28
|
}
|
|
14
|
-
.border {
|
|
15
|
-
border-width: 1px;
|
|
16
|
-
}
|
|
17
|
-
.shadow {
|
|
18
|
-
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
19
|
-
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
20
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
21
|
-
}
|
|
22
29
|
|
|
23
|
-
:host
|
|
30
|
+
:host{
|
|
24
31
|
pointer-events: none;
|
|
25
32
|
position: fixed;
|
|
26
33
|
top: 0px;
|
|
@@ -38,32 +45,42 @@
|
|
|
38
45
|
perspective: 600px;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
:host (
|
|
48
|
+
:host ( [position=top] ){
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host ( [position=bottom] ){
|
|
54
|
+
align-items: flex-end;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host ( .animate-bottom-opened ), :host ( .animate-center-opened ), :host ( .animate-left-opened ), :host ( .animate-right-opened ), :host ( .animate-top-opened ){
|
|
42
59
|
pointer-events: auto;
|
|
43
60
|
--tw-bg-opacity: 0.5;
|
|
44
61
|
transition-duration: 500ms;
|
|
45
62
|
}
|
|
46
63
|
|
|
47
|
-
.close
|
|
64
|
+
.close{
|
|
48
65
|
position: absolute;
|
|
49
66
|
top: 0px;
|
|
50
67
|
height: 2.25rem;
|
|
51
68
|
width: 2.25rem;
|
|
52
69
|
transform-origin: center;
|
|
53
70
|
cursor: pointer;
|
|
71
|
+
fill: rgb(var(--adjust-tone-10));
|
|
54
72
|
font-size: 2.25rem;
|
|
55
73
|
line-height: 2.5rem;
|
|
56
|
-
--tw-text-opacity: 1;
|
|
57
|
-
color: rgba(var(--adjust-tone-10), var(--tw-text-opacity));
|
|
58
74
|
opacity: 0;
|
|
59
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
75
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
76
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
60
77
|
transition-duration: 500ms;
|
|
61
78
|
transition-timing-function: cubic-bezier(0.77, 0, 0.175, 1);
|
|
62
79
|
|
|
63
80
|
transform: translate(0, 24px) rotate(90deg);
|
|
64
81
|
}
|
|
65
82
|
|
|
66
|
-
.window
|
|
83
|
+
.window{
|
|
67
84
|
display: grid;
|
|
68
85
|
height: 100%;
|
|
69
86
|
gap: 0px;
|
|
@@ -89,21 +106,54 @@
|
|
|
89
106
|
grid-template-rows: auto 1fr auto;
|
|
90
107
|
}
|
|
91
108
|
|
|
92
|
-
:host ( .animate-
|
|
109
|
+
:host ( .animate-bottom ){
|
|
93
110
|
justify-content: center;
|
|
94
111
|
padding: 2rem;
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
@media (max-width: 767px)
|
|
114
|
+
@media (max-width: 767px){
|
|
115
|
+
:host ( .animate-bottom ){
|
|
116
|
+
padding: 1rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host ( .animate-bottom ) .window, :host ( .animate-bottom ) > ::slotted ( [slot=window] ){
|
|
121
|
+
opacity: 0;
|
|
122
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
123
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
124
|
+
transition-duration: 500ms;
|
|
125
|
+
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host ( .animate-bottom-intro ) .window, :host ( .animate-bottom-intro ) > ::slotted ( [slot=window] ) {
|
|
129
|
+
transform: rotateX(-22deg) scale(0.5) translateY(40%);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:host ( .animate-bottom-opened.animate-bottom-outro ) .window, :host ( .animate-bottom-opened.animate-bottom-outro ) > ::slotted ( [slot=window] ), :host ( .animate-bottom-opened ) .window, :host ( .animate-bottom-opened ) > ::slotted ( [slot=window] ){
|
|
133
|
+
opacity: 1;
|
|
134
|
+
|
|
135
|
+
transform: rotateX(0) scale(1) translateY(0);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:host ( .animate-bottom-outro ) .window, :host ( .animate-bottom-outro ) > ::slotted ( [slot=window] ) {
|
|
139
|
+
transform: rotateX(-22deg) scale(0.5) translateY(-40%);
|
|
140
|
+
}
|
|
98
141
|
|
|
99
|
-
|
|
142
|
+
:host ( .animate-center ){
|
|
143
|
+
justify-content: center;
|
|
144
|
+
padding: 2rem;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media (max-width: 767px){
|
|
148
|
+
:host ( .animate-center ){
|
|
100
149
|
padding: 1rem;
|
|
101
150
|
}
|
|
102
151
|
}
|
|
103
152
|
|
|
104
|
-
:host ( .animate-center ) .window, :host ( .animate-center ) > ::slotted ( [slot=window] )
|
|
153
|
+
:host ( .animate-center ) .window, :host ( .animate-center ) > ::slotted ( [slot=window] ){
|
|
105
154
|
opacity: 0;
|
|
106
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
155
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
156
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
107
157
|
transition-duration: 500ms;
|
|
108
158
|
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
109
159
|
}
|
|
@@ -112,7 +162,7 @@
|
|
|
112
162
|
transform: rotateX(-22deg) scale(0.5) translateY(40%);
|
|
113
163
|
}
|
|
114
164
|
|
|
115
|
-
:host ( .animate-center-opened.animate-center-outro ) .window, :host ( .animate-center-opened.animate-center-outro ) > ::slotted ( [slot=window] ), :host ( .animate-center-opened ) .window, :host ( .animate-center-opened ) > ::slotted ( [slot=window] )
|
|
165
|
+
:host ( .animate-center-opened.animate-center-outro ) .window, :host ( .animate-center-opened.animate-center-outro ) > ::slotted ( [slot=window] ), :host ( .animate-center-opened ) .window, :host ( .animate-center-opened ) > ::slotted ( [slot=window] ){
|
|
116
166
|
opacity: 1;
|
|
117
167
|
|
|
118
168
|
transform: rotateX(0) scale(1) translateY(0);
|
|
@@ -122,85 +172,120 @@
|
|
|
122
172
|
transform: rotateX(-22deg) scale(0.5) translateY(-40%);
|
|
123
173
|
}
|
|
124
174
|
|
|
125
|
-
:host ( .animate-
|
|
126
|
-
justify-content: flex-
|
|
175
|
+
:host ( .animate-left ){
|
|
176
|
+
justify-content: flex-start;
|
|
127
177
|
}
|
|
128
178
|
|
|
129
|
-
:host ( .animate-
|
|
179
|
+
:host ( .animate-left ) .window, :host ( .animate-left ) > ::slotted ( [slot=window] ){
|
|
130
180
|
opacity: 0;
|
|
131
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
181
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
182
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
132
183
|
transition-duration: 500ms;
|
|
133
184
|
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
134
185
|
}
|
|
135
186
|
|
|
136
|
-
:host ( .animate-
|
|
137
|
-
transform: translateX(calc(100%
|
|
187
|
+
:host ( .animate-left-intro ) .window, :host ( .animate-left-intro ) > ::slotted ( [slot=window] ) {
|
|
188
|
+
transform: translateX(calc(-100% - 50px));
|
|
138
189
|
}
|
|
139
190
|
|
|
140
|
-
:host ( .animate-
|
|
191
|
+
:host ( .animate-left-opened.animate-left-outro ) .window, :host ( .animate-left-opened.animate-left-outro ) > ::slotted ( [slot=window] ), :host ( .animate-left-opened ) .window, :host ( .animate-left-opened ) > ::slotted ( [slot=window] ){
|
|
141
192
|
opacity: 1;
|
|
142
193
|
|
|
143
194
|
transform: translateX(0);
|
|
144
195
|
}
|
|
145
196
|
|
|
146
|
-
:host ( .animate-
|
|
197
|
+
:host ( .animate-left-opened ) .close, :host ( .animate-left-opened.animate-left-outro ) .close{
|
|
147
198
|
opacity: 1;
|
|
148
199
|
|
|
149
|
-
transform: translate(24px, 24px) rotate(0);
|
|
200
|
+
transform: translate(-24px, 24px) rotate(0);
|
|
150
201
|
}
|
|
151
202
|
|
|
152
|
-
:host ( .animate-
|
|
153
|
-
transform: translateX(calc(100%
|
|
203
|
+
:host ( .animate-left-outro ) .window, :host ( .animate-left-outro ) > ::slotted ( [slot=window] ) {
|
|
204
|
+
transform: translateX(calc(-100% - 50px));
|
|
154
205
|
}
|
|
155
206
|
|
|
156
|
-
:host ( .animate-
|
|
157
|
-
transform: translate(
|
|
207
|
+
:host ( .animate-left-outro ) .close {
|
|
208
|
+
transform: translate(24px, 24px) rotate(-90deg);
|
|
158
209
|
}
|
|
159
210
|
|
|
160
|
-
:host ( .animate-
|
|
161
|
-
|
|
211
|
+
:host ( .animate-left ) .close{
|
|
212
|
+
right: 0px;
|
|
162
213
|
|
|
163
|
-
transform: translate(
|
|
214
|
+
transform: translate(36px, 24px) rotate(90deg);
|
|
164
215
|
}
|
|
165
216
|
|
|
166
|
-
:host ( .animate-
|
|
167
|
-
justify-content: flex-
|
|
217
|
+
:host ( .animate-right ){
|
|
218
|
+
justify-content: flex-end;
|
|
168
219
|
}
|
|
169
220
|
|
|
170
|
-
:host ( .animate-
|
|
221
|
+
:host ( .animate-right ) .window, :host ( .animate-right ) > ::slotted ( [slot=window] ){
|
|
171
222
|
opacity: 0;
|
|
172
|
-
transition-property: background-color, border-color, box-shadow, color, height, margin, opacity, padding, transform, width;
|
|
223
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
224
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
173
225
|
transition-duration: 500ms;
|
|
174
226
|
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
175
227
|
}
|
|
176
228
|
|
|
177
|
-
:host ( .animate-
|
|
178
|
-
transform: translateX(calc(
|
|
229
|
+
:host ( .animate-right-intro ) .window, :host ( .animate-right-intro ) > ::slotted ( [slot=window] ) {
|
|
230
|
+
transform: translateX(calc(100% + 50px));
|
|
179
231
|
}
|
|
180
232
|
|
|
181
|
-
:host ( .animate-
|
|
233
|
+
:host ( .animate-right-opened.animate-right-outro ) .window, :host ( .animate-right-opened.animate-right-outro ) > ::slotted ( [slot=window] ), :host ( .animate-right-opened ) .window, :host ( .animate-right-opened ) > ::slotted ( [slot=window] ){
|
|
182
234
|
opacity: 1;
|
|
183
235
|
|
|
184
236
|
transform: translateX(0);
|
|
185
237
|
}
|
|
186
238
|
|
|
187
|
-
:host ( .animate-
|
|
239
|
+
:host ( .animate-right-opened ) .close, :host ( .animate-right-opened.animate-right-outro ) .close{
|
|
188
240
|
opacity: 1;
|
|
189
241
|
|
|
190
|
-
transform: translate(
|
|
242
|
+
transform: translate(24px, 24px) rotate(0);
|
|
191
243
|
}
|
|
192
244
|
|
|
193
|
-
:host ( .animate-
|
|
194
|
-
transform: translateX(calc(
|
|
245
|
+
:host ( .animate-right-outro ) .window, :host ( .animate-right-outro ) > ::slotted ( [slot=window] ) {
|
|
246
|
+
transform: translateX(calc(100% + 50px));
|
|
195
247
|
}
|
|
196
248
|
|
|
197
|
-
:host ( .animate-
|
|
198
|
-
transform: translate(24px, 24px) rotate(
|
|
249
|
+
:host ( .animate-right-outro ) .close {
|
|
250
|
+
transform: translate(-24px, 24px) rotate(90deg);
|
|
199
251
|
}
|
|
200
252
|
|
|
201
|
-
:host ( .animate-
|
|
202
|
-
|
|
253
|
+
:host ( .animate-right ) .close{
|
|
254
|
+
left: 0px;
|
|
203
255
|
|
|
204
|
-
transform: translate(36px, 24px) rotate(90deg);
|
|
256
|
+
transform: translate(-36px, 24px) rotate(-90deg);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host ( .animate-top ){
|
|
260
|
+
justify-content: center;
|
|
261
|
+
padding: 2rem;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@media (max-width: 767px){
|
|
265
|
+
:host ( .animate-top ){
|
|
266
|
+
padding: 1rem;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:host ( .animate-top ) .window, :host ( .animate-top ) > ::slotted ( [slot=window] ){
|
|
271
|
+
opacity: 0;
|
|
272
|
+
transition-property: background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;
|
|
273
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
274
|
+
transition-duration: 500ms;
|
|
275
|
+
transition-timing-function: cubic-bezier(1, 0, 0, 1);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host ( .animate-top-intro ) .window, :host ( .animate-top-intro ) > ::slotted ( [slot=window] ) {
|
|
279
|
+
transform: rotateX(-22deg) scale(0.5) translateY(40%);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
:host ( .animate-top-opened.animate-top-outro ) .window, :host ( .animate-top-opened.animate-top-outro ) > ::slotted ( [slot=window] ), :host ( .animate-top-opened ) .window, :host ( .animate-top-opened ) > ::slotted ( [slot=window] ){
|
|
283
|
+
opacity: 1;
|
|
284
|
+
|
|
285
|
+
transform: rotateX(0) scale(1) translateY(0);
|
|
205
286
|
}
|
|
206
287
|
|
|
288
|
+
:host ( .animate-top-outro ) .window, :host ( .animate-top-outro ) > ::slotted ( [slot=window] ) {
|
|
289
|
+
transform: rotateX(-22deg) scale(0.5) translateY(-40%);
|
|
290
|
+
}
|
|
291
|
+
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, Element, Event, Host, h, Listen, Prop, Watch, State } from '@stencil/core';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import miBaselineClose from '@icon/mi/baseline/close.svg';
|
|
3
4
|
export class MdsModal {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.window = null;
|
|
@@ -73,7 +74,7 @@ export class MdsModal {
|
|
|
73
74
|
h("slot", null),
|
|
74
75
|
this.bottom &&
|
|
75
76
|
h("slot", { name: "bottom" })),
|
|
76
|
-
!this.window && h("
|
|
77
|
+
!this.window && h("i", { innerHTML: miBaselineClose, class: "svg close" })));
|
|
77
78
|
}
|
|
78
79
|
static get is() { return "mds-modal"; }
|
|
79
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,7 +107,7 @@ export class MdsModal {
|
|
|
106
107
|
"mutable": true,
|
|
107
108
|
"complexType": {
|
|
108
109
|
"original": "ModalPositionType",
|
|
109
|
-
"resolved": "\"center\" | \"left\" | \"right\"",
|
|
110
|
+
"resolved": "\"bottom\" | \"center\" | \"left\" | \"right\" | \"top\"",
|
|
110
111
|
"references": {
|
|
111
112
|
"ModalPositionType": {
|
|
112
113
|
"location": "import",
|
|
@@ -51,7 +51,7 @@ const Template = args =>
|
|
|
51
51
|
|
|
52
52
|
const CustomTemplate = args =>
|
|
53
53
|
<mds-modal {...args}>
|
|
54
|
-
<mds-banner slot="window" class="max-w-xl" deletable headline="Action required">
|
|
54
|
+
<mds-banner slot="window" class="max-w-xl mx-6" deletable headline="Action required">
|
|
55
55
|
<mds-text typography="detail">
|
|
56
56
|
As a multi-brand design system, our components need to be flexible enough for any one of our brands to use them for multiple use cases. To achieve this, we ensure that all of the brands are involved in the specification stage, giving us more confidence that we’re future-proofing our components as more brands adopt NewsKit.
|
|
57
57
|
</mds-text>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
const iconsDictionary =
|
|
1
|
+
import jsonIconsDictionary from '../fixtures/icons.json';
|
|
2
|
+
const iconsDictionary = jsonIconsDictionary;
|
|
3
3
|
export { iconsDictionary, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLElement, createEvent, h, Host
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
function toVal(mix) {
|
|
4
4
|
var k, y, str='';
|
|
@@ -41,9 +41,11 @@ function clsx () {
|
|
|
41
41
|
return str;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const
|
|
44
|
+
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>`;
|
|
45
45
|
|
|
46
|
-
let MdsModal$1 = class extends HTMLElement {
|
|
46
|
+
const mdsModalCss = "@tailwind components; .border{border-width:1px}.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)}.svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1 / 1;height:100%;width:100%}.animate-left,.animate-right{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)}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host{pointer-events:none;position:fixed;top:0px;right:0px;bottom:0px;left:0px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(var(--adjust-tone-01), var(--tw-bg-opacity));--tw-bg-opacity:0;-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);-webkit-perspective:600px;perspective:600px}: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(.animate-bottom-opened),:host(.animate-center-opened),:host(.animate-left-opened),:host(.animate-right-opened),:host(.animate-top-opened){pointer-events:auto;--tw-bg-opacity:0.5;-webkit-transition-duration:500ms;transition-duration:500ms}.close{position:absolute;top:0px;height:2.25rem;width:2.25rem;-webkit-transform-origin:center;transform-origin:center;cursor:pointer;fill:rgb(var(--adjust-tone-10));font-size:2.25rem;line-height:2.5rem;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(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg)}.window{display:grid;height:100%;gap:0px;overflow:auto;background-color:var(--window-background, rgb(var(--adjust-tone)));-webkit-box-shadow:var(--window-shadow, 0 25px 50px -12px rgb(0 0 0 / 0.25));box-shadow:var(--window-shadow, 0 25px 50px -12px rgb(0 0 0 / 0.25));grid-template-rows:1fr;max-width:calc(100vw - 80px)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.animate-bottom){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-bottom){padding:1rem}}:host(.animate-bottom) .window,:host(.animate-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(.animate-bottom-intro) .window,:host(.animate-bottom-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-bottom-opened.animate-bottom-outro) .window,:host(.animate-bottom-opened.animate-bottom-outro)>::slotted([slot=window]),:host(.animate-bottom-opened) .window,:host(.animate-bottom-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-bottom-outro) .window,:host(.animate-bottom-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.animate-center){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-center){padding:1rem}}:host(.animate-center) .window,:host(.animate-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(.animate-center-intro) .window,:host(.animate-center-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-center-opened.animate-center-outro) .window,:host(.animate-center-opened.animate-center-outro)>::slotted([slot=window]),:host(.animate-center-opened) .window,:host(.animate-center-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-center-outro) .window,:host(.animate-center-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.animate-left){-ms-flex-pack:start;justify-content:flex-start}:host(.animate-left) .window,:host(.animate-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(.animate-left-intro) .window,:host(.animate-left-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-opened.animate-left-outro) .window,:host(.animate-left-opened.animate-left-outro)>::slotted([slot=window]),:host(.animate-left-opened) .window,:host(.animate-left-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.animate-left-opened) .close,:host(.animate-left-opened.animate-left-outro) .close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.animate-left-outro) .window,:host(.animate-left-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.animate-left-outro) .close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.animate-left) .close{right:0px;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.animate-right){-ms-flex-pack:end;justify-content:flex-end}:host(.animate-right) .window,:host(.animate-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(.animate-right-intro) .window,:host(.animate-right-intro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-opened.animate-right-outro) .window,:host(.animate-right-opened.animate-right-outro)>::slotted([slot=window]),:host(.animate-right-opened) .window,:host(.animate-right-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.animate-right-opened) .close,:host(.animate-right-opened.animate-right-outro) .close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.animate-right-outro) .window,:host(.animate-right-outro)>::slotted([slot=window]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.animate-right-outro) .close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.animate-right) .close{left:0px;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.animate-top){-ms-flex-pack:center;justify-content:center;padding:2rem}@media (max-width: 767px){:host(.animate-top){padding:1rem}}:host(.animate-top) .window,:host(.animate-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(.animate-top-intro) .window,:host(.animate-top-intro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.animate-top-opened.animate-top-outro) .window,:host(.animate-top-opened.animate-top-outro)>::slotted([slot=window]),:host(.animate-top-opened) .window,:host(.animate-top-opened)>::slotted([slot=window]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.animate-top-outro) .window,:host(.animate-top-outro)>::slotted([slot=window]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}";
|
|
47
|
+
|
|
48
|
+
const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
47
49
|
constructor() {
|
|
48
50
|
super();
|
|
49
51
|
this.__registerHost();
|
|
@@ -115,7 +117,7 @@ let MdsModal$1 = class extends HTMLElement {
|
|
|
115
117
|
:
|
|
116
118
|
h("div", { class: clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`) }, this.top &&
|
|
117
119
|
h("slot", { name: "top" }), h("slot", null), this.bottom &&
|
|
118
|
-
h("slot", { name: "bottom" })), !this.window && h("
|
|
120
|
+
h("slot", { name: "bottom" })), !this.window && h("i", { innerHTML: miBaselineClose, class: "svg close" })));
|
|
119
121
|
}
|
|
120
122
|
get hostElement() { return this; }
|
|
121
123
|
static get watchers() { return {
|
|
@@ -123,8 +125,7 @@ let MdsModal$1 = class extends HTMLElement {
|
|
|
123
125
|
"opened": ["openedChange"]
|
|
124
126
|
}; }
|
|
125
127
|
static get style() { return mdsModalCss; }
|
|
126
|
-
}
|
|
127
|
-
MdsModal$1 = /*@__PURE__*/ proxyCustomElement(MdsModal$1, [1, "mds-modal", {
|
|
128
|
+
}, [1, "mds-modal", {
|
|
128
129
|
"opened": [1540],
|
|
129
130
|
"position": [1537],
|
|
130
131
|
"stateOpened": [32]
|