@maggioli-design-system/mds-modal 3.0.0 → 3.2.1
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-6f89e656.js → index-d859a858.js} +401 -234
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-modal.cjs.entry.js +36 -48
- package/dist/cjs/mds-modal.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +19 -0
- package/dist/collection/components/mds-modal/mds-modal.css +38 -68
- package/dist/collection/components/mds-modal/mds-modal.js +131 -95
- package/dist/collection/components/mds-modal/test/mds-modal.stories.js +10 -19
- package/dist/collection/dictionary/typography.js +3 -3
- package/dist/components/mds-modal.js +35 -47
- package/dist/esm/{index-7c9adc93.js → index-a5a41aa8.js} +401 -234
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +36 -48
- package/dist/esm/mds-modal.js +2 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/index-a5a41aa8.js +2 -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 +2 -1
- package/dist/mds-modal/p-4fe02e5f.entry.js +1 -0
- package/dist/mds-modal/p-52cd3b82.system.entry.js +1 -0
- package/dist/mds-modal/p-76a04b9e.system.js +2 -0
- package/dist/mds-modal/p-931319fa.js +2 -0
- package/dist/mds-modal/{p-bd6bb90a.system.js → p-a2cf985e.system.js} +1 -1
- package/dist/stats.json +39 -35
- package/dist/types/common/aria.d.ts +4 -0
- package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/types/typography.d.ts +3 -3
- package/loader/package.json +1 -0
- package/package.json +4 -4
- package/src/common/aria.ts +27 -0
- package/src/components/mds-modal/.gitlab-ci.yml +2 -2
- package/src/components/mds-modal/mds-modal.css +1 -1
- package/src/components/mds-modal/mds-modal.tsx +39 -4
- package/src/components/mds-modal/test/mds-modal.e2e.ts +2 -2
- package/src/components/mds-modal/test/mds-modal.stories.tsx +20 -0
- package/src/dictionary/typography.ts +3 -3
- package/src/fixtures/icons.json +2 -2
- package/src/types/typography.ts +3 -3
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +2 -1
- package/www/build/p-4fe02e5f.entry.js +1 -0
- package/www/build/p-52cd3b82.system.entry.js +1 -0
- package/www/build/p-76a04b9e.system.js +2 -0
- package/www/build/p-931319fa.js +2 -0
- package/www/build/{p-bd6bb90a.system.js → p-a2cf985e.system.js} +1 -1
- package/dist/esm-es5/index-7c9adc93.js +0 -2
- package/dist/mds-modal/p-4e7d20d9.system.entry.js +0 -1
- package/dist/mds-modal/p-656f0e04.system.js +0 -2
- package/dist/mds-modal/p-b8cb7be9.js +0 -2
- package/dist/mds-modal/p-f8c5b0c2.entry.js +0 -1
- package/www/build/p-4e7d20d9.system.entry.js +0 -1
- package/www/build/p-656f0e04.system.js +0 -2
- package/www/build/p-b8cb7be9.js +0 -2
- package/www/build/p-f8c5b0c2.entry.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,n=!1;const l={},s=e=>"object"==(e=typeof e)||"function"===e,o=(e,t,...n)=>{let l=null,o=!1,i=!1;const r=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!s(l))&&(l+=""),o&&i?r[r.length-1].t+=l:r.push(o?c(null,l):l),i=o)};if(a(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const u=c(e,null);return u.l=t,r.length>0&&(u.o=r),u},c=(e,t)=>({i:0,u:e,t,h:null,o:null,l:null}),i={},r=e=>q(e).m,a=(e,t,n)=>{const l=r(e);return{emit:e=>u(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},u=(e,t,n)=>{const l=K.ce(t,n);return e.dispatchEvent(l),l},f=new WeakMap,d=e=>"sc-"+e.$,h=(e,t,n,l,o,c)=>{if(n!==l){let i=V(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,s=y(n),o=y(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const r=s(l);if((i||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||o)&&!r&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):V(I,r)?r.slice(2):r[2]+t.slice(3),n&&K.rel(e,t,n,!1),l&&K.ael(e,t,l,!1)}},m=/\s/,y=e=>e?e.split(m):[],$=(e,t,n,s)=>{const o=11===t.h.nodeType&&t.h.host?t.h.host:t.h,c=e&&e.l||l,i=t.l||l;for(s in c)s in i||h(o,s,c[s],void 0,n,t.i);for(s in i)h(o,s,c[s],i[s],n,t.i)},p=(t,n,l)=>{const s=n.o[l];let o,c,i=0;if(null!==s.t)o=s.h=J.createTextNode(s.t);else if(o=s.h=J.createElement(s.u),$(null,s,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),s.o)for(i=0;i<s.o.length;++i)c=p(t,s,i),c&&o.appendChild(c);return o},b=(e,n,l,s,o,c)=>{let i,r=e;for(r.shadowRoot&&r.tagName===t&&(r=r.shadowRoot);o<=c;++o)s[o]&&(i=p(null,l,o),i&&(s[o].h=i,r.insertBefore(i,n)))},w=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.h.remove()},S=(e,t)=>e.u===t.u,g=(e,t)=>{const n=t.h=e.h,l=e.o,s=t.o,o=t.t;null===o?("slot"===t.u||$(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,c=0,i=t.length-1,r=t[0],a=t[i],u=l.length-1,f=l[0],d=l[u];for(;o<=i&&c<=u;)null==r?r=t[++o]:null==a?a=t[--i]:null==f?f=l[++c]:null==d?d=l[--u]:S(r,f)?(g(r,f),r=t[++o],f=l[++c]):S(a,d)?(g(a,d),a=t[--i],d=l[--u]):S(r,d)?(g(r,d),e.insertBefore(r.h,a.h.nextSibling),r=t[++o],d=l[--u]):S(a,f)?(g(a,f),e.insertBefore(a.h,r.h),a=t[--i],f=l[++c]):(s=p(t&&t[c],n,c),f=l[++c],s&&r.h.parentNode.insertBefore(s,r.h));o>i?b(e,null==l[u+1]?null:l[u+1].h,n,l,c,u):c>u&&w(t,o,i)})(n,l,t,s):null!==s?(null!==e.t&&(n.textContent=""),b(n,null,t,s,0,s.length-1)):null!==l&&w(l,0,l.length-1)):e.t!==o&&(n.data=o)},j=(e,t)=>{t&&!e.p&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.p=t)))},v=(e,t)=>{if(e.i|=16,!(4&e.i))return j(e,e.S),se((()=>M(e,t)));e.i|=512},M=(e,t)=>{const n=e.g;let l;return t&&(e.i|=256,e.j&&(e.j.map((([e,t])=>R(n,e,t))),e.j=null),l=R(n,"componentWillLoad")),l=W(l,(()=>R(n,"componentWillRender"))),W(l,(()=>k(e,n,t)))},k=async(e,t,n)=>{const l=e.m,s=l["s-rc"];n&&(e=>{const t=e.v,n=e.m,l=t.i,s=((e,t)=>{let n=d(t);const l=G.get(n);if(e=11===e.nodeType?e:J,l)if("string"==typeof l){let t,s=f.get(e=e.head||e);s||f.set(e,s=new Set),s.has(n)||(t=J.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);C(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>O(e);0===t.length?n():(Promise.all(t).then(n),e.i|=4,t.length=0)}},C=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.m,r=n.v,a=n.M||c(null,null),u=(e=>e&&e.u===i)(l)?l:o(null,null,l);t=s.tagName,r.k&&(u.l=u.l||{},r.k.map((([e,t])=>u.l[t]=s[e]))),u.u=null,u.i|=4,n.M=u,u.h=a.h=s.shadowRoot||s,e=s["s-sc"],g(a,u)})(n,l)}catch(e){_(e,n.m)}return null},O=e=>{const t=e.m,n=e.S;R(e.g,"componentDidRender"),64&e.i||(e.i|=64,x(t),e.C(t),n||P()),e.p&&(e.p(),e.p=void 0),512&e.i&&le((()=>v(e,!1))),e.i&=-517},P=()=>{x(J.documentElement),le((()=>u(I,"appload",{detail:{namespace:"mds-modal"}})))},R=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){_(e)}},W=(e,t)=>e&&e.then?e.then(t):t(),x=e=>e.classList.add("hydrated"),E=(e,t,n)=>{if(t.O){e.watchers&&(t.P=e.watchers);const l=Object.entries(t.O),o=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(o,e,{get(){return((e,t)=>q(this).R.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=q(e),c=o.m,i=o.R.get(t),r=o.i,a=o.g;if(n=((e,t)=>null==e||s(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(n,l.O[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.R.set(t,n),a)){if(l.P&&128&r){const e=l.P[t];e&&e.map((e=>{try{a[e](n,i,t)}catch(e){_(e,c)}}))}2==(18&r)&&v(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){K.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},L=(e,t={})=>{const n=[],l=t.exclude||[],s=I.customElements,o=J.head,c=o.querySelector("meta[charset]"),i=J.createElement("style"),r=[];let a,u=!0;Object.assign(K,t),K.W=new URL(t.resourcesUrl||"./",J.baseURI).href,e.map((e=>{e[1].map((t=>{const o={i:t[0],$:t[1],O:t[2],L:t[3]};o.O=t[2],o.L=t[3],o.k=[],o.P={};const c=o.$,i=class extends HTMLElement{constructor(e){super(e),F(e=this,o),1&o.i&&e.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),u?r.push(this):K.jmp((()=>(e=>{if(0==(1&K.i)){const t=q(e),n=t.v,l=()=>{};if(1&t.i)N(e,t,n.L);else{t.i|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){j(t,t.S=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.i)){{if(t.i|=32,(s=B(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.P=s.watchers,E(s,n,2),s.isProxied=!0);const e=()=>{};t.i|=8;try{new s(t)}catch(e){_(e)}t.i&=-9,t.i|=128,e()}if(s.style){let e=s.style;const t=d(n);if(!G.has(t)){const l=()=>{};((e,t,n)=>{let l=G.get(e);X&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,G.set(e,l)})(t,e,!!(1&n.i)),l()}}}const o=t.S,c=()=>v(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){K.jmp((()=>(()=>{if(0==(1&K.i)){const e=q(this),t=e.g;e.N&&(e.N.map((e=>e())),e.N=void 0),R(t,"disconnectedCallback")}})()))}componentOnReady(){return q(this).T}};o.A=e[0],l.includes(c)||s.get(c)||(n.push(c),s.define(c,E(i,o,1)))}))})),i.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",i.setAttribute("data-styles",""),o.insertBefore(i,c?c.nextSibling:o.firstChild),u=!1,r.length?r.map((e=>e.connectedCallback())):K.jmp((()=>a=setTimeout(P,30)))},N=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=A(e,n),c=T(t,s),i=H(n);K.ael(o,l,c,i),(t.N=t.N||[]).push((()=>K.rel(o,l,c,i)))}))},T=(e,t)=>n=>{try{256&e.i?e.g[t](n):(e.j=e.j||[]).push([t,n])}catch(e){_(e)}},A=(e,t)=>4&t?J:e,H=e=>0!=(2&e),U=new WeakMap,q=e=>U.get(e),D=(e,t)=>U.set(t.g=e,t),F=(e,t)=>{const n={i:0,m:e,v:t,R:new Map};return n.T=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],N(e,n,t.L),U.set(e,n)},V=(e,t)=>t in e,_=(e,t)=>(0,console.error)(e,t),z=new Map,B=e=>{const t=e.$.replace(/-/g,"_"),n=e.A,l=z.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(z.set(n,e),e[t])),_)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},G=new Map,I="undefined"!=typeof window?window:{},J=I.document||{head:{}},K={i:0,W:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},Q=e=>Promise.resolve(e),X=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),Y=[],Z=[],ee=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&K.i?le(ne):K.raf(ne))},te=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){_(e)}e.length=0},ne=()=>{te(Y),te(Z),(n=Y.length>0)&&K.raf(ne)},le=e=>Q().then(e),se=ee(Z,!0);export{i as H,L as b,a as c,r as g,o as h,Q as p,D as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-76a04b9e.system.js"],(function(e,t){"use strict";var n,r;return{setters:[function(e){n=e.p;r=e.b}],execute:function(){var e=function(){var e=t.meta.url;var r={};if(e!==""){r.resourcesUrl=new URL(".",e).href}return n(r)};e().then((function(e){return r([["p-52cd3b82.system",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"close","onCloseListener"]]]]]],e)}))}}}));
|
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2022-
|
|
2
|
+
"timestamp": "2022-12-06T12:59:43",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "18.3.0"
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
"fsNamespace": "mds-modal",
|
|
10
10
|
"components": 1,
|
|
11
11
|
"entries": 1,
|
|
12
|
-
"bundles":
|
|
12
|
+
"bundles": 66,
|
|
13
13
|
"outputs": [
|
|
14
14
|
{
|
|
15
15
|
"name": "dist-collection",
|
|
16
|
-
"files":
|
|
16
|
+
"files": 25,
|
|
17
17
|
"generatedFiles": [
|
|
18
|
+
"./dist/collection/common/aria.js",
|
|
18
19
|
"./dist/collection/components/mds-modal/mds-modal.js",
|
|
19
20
|
"./dist/collection/components/mds-modal/meta/dictionary.js",
|
|
20
21
|
"./dist/collection/components/mds-modal/meta/types.js",
|
|
@@ -55,17 +56,17 @@
|
|
|
55
56
|
"name": "dist-lazy",
|
|
56
57
|
"files": 35,
|
|
57
58
|
"generatedFiles": [
|
|
58
|
-
"./dist/cjs/index-
|
|
59
|
+
"./dist/cjs/index-d859a858.js",
|
|
59
60
|
"./dist/cjs/index.cjs.js",
|
|
60
61
|
"./dist/cjs/loader.cjs.js",
|
|
61
62
|
"./dist/cjs/mds-modal.cjs.entry.js",
|
|
62
63
|
"./dist/cjs/mds-modal.cjs.js",
|
|
63
|
-
"./dist/esm-es5/index-
|
|
64
|
+
"./dist/esm-es5/index-a5a41aa8.js",
|
|
64
65
|
"./dist/esm-es5/index.js",
|
|
65
66
|
"./dist/esm-es5/loader.js",
|
|
66
67
|
"./dist/esm-es5/mds-modal.entry.js",
|
|
67
68
|
"./dist/esm-es5/mds-modal.js",
|
|
68
|
-
"./dist/esm/index-
|
|
69
|
+
"./dist/esm/index-a5a41aa8.js",
|
|
69
70
|
"./dist/esm/index.js",
|
|
70
71
|
"./dist/esm/loader.js",
|
|
71
72
|
"./dist/esm/mds-modal.entry.js",
|
|
@@ -75,21 +76,21 @@
|
|
|
75
76
|
"./dist/mds-modal/index.esm.js",
|
|
76
77
|
"./dist/mds-modal/mds-modal.esm.js",
|
|
77
78
|
"./dist/mds-modal/mds-modal.js",
|
|
78
|
-
"./dist/mds-modal/p-
|
|
79
|
+
"./dist/mds-modal/p-4fe02e5f.entry.js",
|
|
79
80
|
"./dist/mds-modal/p-50ea2036.system.js",
|
|
80
|
-
"./dist/mds-modal/p-
|
|
81
|
-
"./dist/mds-modal/p-
|
|
82
|
-
"./dist/mds-modal/p-
|
|
83
|
-
"./dist/mds-modal/p-
|
|
81
|
+
"./dist/mds-modal/p-52cd3b82.system.entry.js",
|
|
82
|
+
"./dist/mds-modal/p-76a04b9e.system.js",
|
|
83
|
+
"./dist/mds-modal/p-931319fa.js",
|
|
84
|
+
"./dist/mds-modal/p-a2cf985e.system.js",
|
|
84
85
|
"./www/build/index.esm.js",
|
|
85
86
|
"./www/build/mds-modal.esm.js",
|
|
86
87
|
"./www/build/mds-modal.js",
|
|
87
|
-
"./www/build/p-
|
|
88
|
+
"./www/build/p-4fe02e5f.entry.js",
|
|
88
89
|
"./www/build/p-50ea2036.system.js",
|
|
89
|
-
"./www/build/p-
|
|
90
|
-
"./www/build/p-
|
|
91
|
-
"./www/build/p-
|
|
92
|
-
"./www/build/p-
|
|
90
|
+
"./www/build/p-52cd3b82.system.entry.js",
|
|
91
|
+
"./www/build/p-76a04b9e.system.js",
|
|
92
|
+
"./www/build/p-931319fa.js",
|
|
93
|
+
"./www/build/p-a2cf985e.system.js"
|
|
93
94
|
]
|
|
94
95
|
},
|
|
95
96
|
{
|
|
@@ -122,12 +123,12 @@
|
|
|
122
123
|
"components": [
|
|
123
124
|
"mds-modal"
|
|
124
125
|
],
|
|
125
|
-
"bundleId": "p-
|
|
126
|
-
"fileName": "p-
|
|
126
|
+
"bundleId": "p-4fe02e5f",
|
|
127
|
+
"fileName": "p-4fe02e5f.entry.js",
|
|
127
128
|
"imports": [
|
|
128
|
-
"p-
|
|
129
|
+
"p-931319fa.js"
|
|
129
130
|
],
|
|
130
|
-
"originalByteSize":
|
|
131
|
+
"originalByteSize": 19835
|
|
131
132
|
}
|
|
132
133
|
],
|
|
133
134
|
"esm": [
|
|
@@ -139,9 +140,9 @@
|
|
|
139
140
|
"bundleId": "mds-modal",
|
|
140
141
|
"fileName": "mds-modal.entry.js",
|
|
141
142
|
"imports": [
|
|
142
|
-
"index-
|
|
143
|
+
"index-a5a41aa8.js"
|
|
143
144
|
],
|
|
144
|
-
"originalByteSize":
|
|
145
|
+
"originalByteSize": 19839
|
|
145
146
|
}
|
|
146
147
|
],
|
|
147
148
|
"es5": [
|
|
@@ -153,9 +154,9 @@
|
|
|
153
154
|
"bundleId": "mds-modal",
|
|
154
155
|
"fileName": "mds-modal.entry.js",
|
|
155
156
|
"imports": [
|
|
156
|
-
"index-
|
|
157
|
+
"index-a5a41aa8.js"
|
|
157
158
|
],
|
|
158
|
-
"originalByteSize":
|
|
159
|
+
"originalByteSize": 19839
|
|
159
160
|
}
|
|
160
161
|
],
|
|
161
162
|
"system": [
|
|
@@ -164,12 +165,12 @@
|
|
|
164
165
|
"components": [
|
|
165
166
|
"mds-modal"
|
|
166
167
|
],
|
|
167
|
-
"bundleId": "p-
|
|
168
|
-
"fileName": "p-
|
|
168
|
+
"bundleId": "p-52cd3b82.system",
|
|
169
|
+
"fileName": "p-52cd3b82.system.entry.js",
|
|
169
170
|
"imports": [
|
|
170
|
-
"p-
|
|
171
|
+
"p-76a04b9e.system.js"
|
|
171
172
|
],
|
|
172
|
-
"originalByteSize":
|
|
173
|
+
"originalByteSize": 20742
|
|
173
174
|
}
|
|
174
175
|
],
|
|
175
176
|
"commonjs": [
|
|
@@ -181,9 +182,9 @@
|
|
|
181
182
|
"bundleId": "mds-modal.cjs",
|
|
182
183
|
"fileName": "mds-modal.cjs.entry.js",
|
|
183
184
|
"imports": [
|
|
184
|
-
"index-
|
|
185
|
+
"index-d859a858.js"
|
|
185
186
|
],
|
|
186
|
-
"originalByteSize":
|
|
187
|
+
"originalByteSize": 19916
|
|
187
188
|
}
|
|
188
189
|
]
|
|
189
190
|
},
|
|
@@ -402,7 +403,7 @@
|
|
|
402
403
|
"styleIdentifier": "mdsModalStyle",
|
|
403
404
|
"externalStyles": [
|
|
404
405
|
{
|
|
405
|
-
"absolutePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.css",
|
|
406
|
+
"absolutePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.css",
|
|
406
407
|
"relativePath": "mds-modal.css",
|
|
407
408
|
"originalComponentPath": "mds-modal.css"
|
|
408
409
|
}
|
|
@@ -418,8 +419,8 @@
|
|
|
418
419
|
"tags": [],
|
|
419
420
|
"text": ""
|
|
420
421
|
},
|
|
421
|
-
"jsFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.js",
|
|
422
|
-
"sourceFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.tsx",
|
|
422
|
+
"jsFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.js",
|
|
423
|
+
"sourceFilePath": "/builds/maggiolispa/ricerca-sviluppo-new-media/magma/design-system/projects/stencil/.build/mds-modal/src/components/mds-modal/mds-modal.tsx",
|
|
423
424
|
"sourceMapPath": null,
|
|
424
425
|
"hasAttributeChangedCallbackFn": false,
|
|
425
426
|
"hasComponentWillLoadFn": true,
|
|
@@ -431,7 +432,7 @@
|
|
|
431
432
|
"hasComponentDidRenderFn": true,
|
|
432
433
|
"hasComponentDidUnloadFn": false,
|
|
433
434
|
"hasConnectedCallbackFn": false,
|
|
434
|
-
"hasDisconnectedCallbackFn":
|
|
435
|
+
"hasDisconnectedCallbackFn": true,
|
|
435
436
|
"hasElement": false,
|
|
436
437
|
"hasEvent": true,
|
|
437
438
|
"hasLifecycle": true,
|
|
@@ -468,9 +469,11 @@
|
|
|
468
469
|
"hasWatchCallback": true,
|
|
469
470
|
"isPlain": false,
|
|
470
471
|
"htmlAttrNames": [
|
|
472
|
+
"aria-modal",
|
|
471
473
|
"class",
|
|
472
474
|
"onClick",
|
|
473
475
|
"name",
|
|
476
|
+
"role",
|
|
474
477
|
"innerHTML"
|
|
475
478
|
],
|
|
476
479
|
"htmlTagNames": [
|
|
@@ -492,10 +495,11 @@
|
|
|
492
495
|
],
|
|
493
496
|
"componentGraph": {
|
|
494
497
|
"sc-mds-modal": [
|
|
495
|
-
"p-
|
|
498
|
+
"p-931319fa.js"
|
|
496
499
|
]
|
|
497
500
|
},
|
|
498
501
|
"sourceGraph": {
|
|
502
|
+
"./src/common/aria.ts": [],
|
|
499
503
|
"./src/components/mds-modal/mds-modal.tsx": [],
|
|
500
504
|
"./src/components/mds-modal/meta/dictionary.ts": [],
|
|
501
505
|
"./src/components/mds-modal/meta/types.ts": [],
|
|
@@ -221,7 +221,9 @@ export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
225
227
|
*/
|
|
226
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +236,9 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
236
|
/**
|
|
235
237
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
238
|
* if the path needs to be customized.
|
|
239
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
240
|
+
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
237
242
|
*/
|
|
238
243
|
export declare function getAssetPath(path: string): string;
|
|
239
244
|
/**
|
|
@@ -246,22 +251,29 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
251
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
252
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
253
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
254
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
256
|
+
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
251
258
|
*/
|
|
252
259
|
export declare function setAssetPath(path: string): string;
|
|
253
260
|
/**
|
|
254
|
-
*
|
|
261
|
+
* Retrieve a Stencil element for a given reference
|
|
262
|
+
* @param ref the ref to get the Stencil element for
|
|
263
|
+
* @returns a reference to the element
|
|
255
264
|
*/
|
|
256
265
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
266
|
/**
|
|
258
267
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
268
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
269
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
270
|
+
*
|
|
271
|
+
* @param ref the node/element to force the re-render of
|
|
261
272
|
*/
|
|
262
273
|
export declare function forceUpdate(ref: any): void;
|
|
263
274
|
/**
|
|
264
275
|
* getRenderingRef
|
|
276
|
+
* @returns the rendering ref
|
|
265
277
|
*/
|
|
266
278
|
export declare function getRenderingRef(): any;
|
|
267
279
|
export interface HTMLStencilElement extends HTMLElement {
|
|
@@ -272,6 +284,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
284
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
285
|
*
|
|
274
286
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
287
|
+
*
|
|
288
|
+
* @param task the DOM-write to schedule
|
|
275
289
|
*/
|
|
276
290
|
export declare function writeTask(task: RafCallback): void;
|
|
277
291
|
/**
|
|
@@ -279,6 +293,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
293
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
294
|
*
|
|
281
295
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
296
|
+
*
|
|
297
|
+
* @param task the DOM-read to schedule
|
|
282
298
|
*/
|
|
283
299
|
export declare function readTask(task: RafCallback): void;
|
|
284
300
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare type TypographyType = 'action' | 'caption' | '
|
|
2
|
-
export declare type TypographyVariants = 'title' | 'info' | 'read' | '
|
|
1
|
+
export declare type TypographyType = 'action' | 'caption' | 'snippet' | 'detail' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hack' | 'label' | 'option' | 'paragraph' | 'tip';
|
|
2
|
+
export declare type TypographyVariants = 'title' | 'info' | 'read' | 'code';
|
|
3
3
|
export declare type TypographyTitleType = 'action' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
4
|
export declare type TypographyInfoType = 'caption' | 'detail' | 'label' | 'option' | 'paragraph' | 'tip';
|
|
5
5
|
export declare type TypographyReadType = 'caption' | 'detail' | 'paragraph';
|
|
6
6
|
export declare type TypographySmallerType = 'tip' | 'option';
|
|
7
|
-
export declare type TypographyMonoType = '
|
|
7
|
+
export declare type TypographyMonoType = 'snippet' | 'hack';
|
|
8
8
|
export declare type TypographyTooltipType = 'caption' | 'detail' | 'tip';
|
package/loader/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-modal",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "mds-modal is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"test": "stencil test --spec --e2e"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@maggioli-design-system/styles": "^
|
|
27
|
-
"@stencil/core": "^2.
|
|
28
|
-
"clsx": "^1.
|
|
26
|
+
"@maggioli-design-system/styles": "^10.0.0",
|
|
27
|
+
"@stencil/core": "^2.19.3",
|
|
28
|
+
"clsx": "^1.2.1"
|
|
29
29
|
},
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"author": {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const hash = (s: string): string => {
|
|
2
|
+
let i: number, h: number
|
|
3
|
+
for (i = 0, h = 0; i < s.length; i ++) {
|
|
4
|
+
h = Math.imul(31, h) + s.charCodeAt(i) | 0
|
|
5
|
+
}
|
|
6
|
+
return h.toString()
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const unslugName = (name: string): string => {
|
|
10
|
+
return name.split('/').slice(-1).pop().replace(/-/g, ' ')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const setAttributeIfEmpty = (element: HTMLElement, attribute: string, value: string): string => {
|
|
14
|
+
if (element.hasAttribute(attribute)) {
|
|
15
|
+
return element.getAttribute(attribute)
|
|
16
|
+
}
|
|
17
|
+
element.setAttribute(attribute, value)
|
|
18
|
+
return value
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const hashValue = (value: string): string => `${value}-${hash(value)}`
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
unslugName,
|
|
25
|
+
setAttributeIfEmpty,
|
|
26
|
+
hashValue,
|
|
27
|
+
}
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
:host {
|
|
71
|
-
|
|
72
71
|
--overlay-color: var(--overlay-color, 0 0 0);
|
|
73
72
|
--overlay-opacity: var(--overlay-opacity, 0.5);
|
|
74
73
|
--window-background: theme('colors.tone-neutral');
|
|
@@ -86,6 +85,7 @@
|
|
|
86
85
|
|
|
87
86
|
background-color: rgba(var(--overlay-color, 0 0 0) / 0);
|
|
88
87
|
perspective: 600px;
|
|
88
|
+
z-index: var(--modal-z-index, 1000);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
:host ( [position=top] ) {
|
|
@@ -41,6 +41,11 @@ export class MdsModal {
|
|
|
41
41
|
if (this.position === null) {
|
|
42
42
|
this.position = 'right'
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
if (this.window) {
|
|
46
|
+
const modal = this.hostElement.querySelector('[slot="window"]')
|
|
47
|
+
modal.setAttribute('role', 'modal')
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
componentWillRender (): void {
|
|
@@ -55,6 +60,17 @@ export class MdsModal {
|
|
|
55
60
|
this.hostElement.classList.add(this.animationName(this.animationState))
|
|
56
61
|
window.clearTimeout(this.animationDeelay)
|
|
57
62
|
}, 500)
|
|
63
|
+
|
|
64
|
+
if (this.opened) {
|
|
65
|
+
this.addKeyboardEscapeListener()
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
this.removeKeyboardEscapeListener()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
disconnectedCallback (): void {
|
|
73
|
+
this.removeKeyboardEscapeListener()
|
|
58
74
|
}
|
|
59
75
|
|
|
60
76
|
private animationName = (customState: string = null, customPosition: string = null): string => {
|
|
@@ -69,10 +85,31 @@ export class MdsModal {
|
|
|
69
85
|
this.hostElement.classList.remove(this.animationName('outro', oldValue))
|
|
70
86
|
}
|
|
71
87
|
|
|
88
|
+
private checkKeyboardEscape = (event: KeyboardEvent): void => {
|
|
89
|
+
if (event.code === 'Escape') {
|
|
90
|
+
this.close.emit()
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private addKeyboardEscapeListener (): void {
|
|
95
|
+
window.addEventListener('keydown', this.checkKeyboardEscape.bind(this))
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private removeKeyboardEscapeListener (): void {
|
|
99
|
+
window.removeEventListener('keydown', this.checkKeyboardEscape.bind(this))
|
|
100
|
+
}
|
|
101
|
+
|
|
72
102
|
@Watch('opened')
|
|
73
103
|
openedChange (newValue: boolean): void {
|
|
74
104
|
this.stateOpened = newValue
|
|
75
105
|
window.clearTimeout(this.animationDeelay)
|
|
106
|
+
|
|
107
|
+
if (newValue) {
|
|
108
|
+
this.addKeyboardEscapeListener()
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
this.removeKeyboardEscapeListener()
|
|
76
113
|
}
|
|
77
114
|
|
|
78
115
|
/**
|
|
@@ -97,14 +134,12 @@ export class MdsModal {
|
|
|
97
134
|
|
|
98
135
|
render () {
|
|
99
136
|
return (
|
|
100
|
-
<Host class={clsx(
|
|
101
|
-
this.stateOpened && this.animationName('opened'),
|
|
102
|
-
)} onClick={(e: Event) => { this.closeModal(e) }}>
|
|
137
|
+
<Host aria-modal={clsx(this.opened ? 'true' : 'false' )} class={clsx(this.stateOpened && this.animationName('opened'))} onClick={(e: Event) => { this.closeModal(e) }}>
|
|
103
138
|
{ this.window
|
|
104
139
|
?
|
|
105
140
|
<slot name="window"/>
|
|
106
141
|
:
|
|
107
|
-
<div class={clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`)}>
|
|
142
|
+
<div class={clsx('window', (this.top || this.bottom) && `window-${this.top ? '-top' : ''}${this.bottom ? '-bottom' : ''}`)} role="dialog">
|
|
108
143
|
{ this.top &&
|
|
109
144
|
<slot name="top"/>
|
|
110
145
|
}
|
|
@@ -19,7 +19,7 @@ describe('mds-modal', () => {
|
|
|
19
19
|
expect(element).not.toHaveAttribute('opened')
|
|
20
20
|
|
|
21
21
|
expect(element.shadowRoot).toEqualHtml(`
|
|
22
|
-
<div class="window">
|
|
22
|
+
<div class="window" role="dialog">
|
|
23
23
|
<slot></slot>
|
|
24
24
|
</div>
|
|
25
25
|
<i class="close svg">
|
|
@@ -39,7 +39,7 @@ describe('mds-modal', () => {
|
|
|
39
39
|
expect(element.getAttribute('opened')).not.toBe('false')
|
|
40
40
|
|
|
41
41
|
expect(element.shadowRoot).toEqualHtml(`
|
|
42
|
-
<div class="window">
|
|
42
|
+
<div class="window" role="dialog">
|
|
43
43
|
<slot></slot>
|
|
44
44
|
</div>
|
|
45
45
|
<i class="close svg">
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { h } from '@stencil/core'
|
|
3
|
+
import { useState } from 'react'
|
|
3
4
|
import { modalPositionDictionary } from '../meta/dictionary'
|
|
4
5
|
|
|
5
6
|
export default {
|
|
@@ -58,5 +59,24 @@ const CustomTemplate = args =>
|
|
|
58
59
|
</mds-banner>
|
|
59
60
|
</mds-modal>
|
|
60
61
|
|
|
62
|
+
const AriaTemplate = () => {
|
|
63
|
+
// Click not working with reader
|
|
64
|
+
const [opened, setOpened] = useState(false)
|
|
65
|
+
window.addEventListener('close', () => { setOpened(false) })
|
|
66
|
+
return <div>
|
|
67
|
+
<mds-button onClick={() => setOpened(true) }>Apri modale</mds-button>
|
|
68
|
+
<mds-modal opened={opened} onClose={() => setOpened(false)}>
|
|
69
|
+
<mds-banner slot="window" class="max-w-xl mx-6" deletable headline="Action required">
|
|
70
|
+
<mds-text typography="detail">
|
|
71
|
+
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.
|
|
72
|
+
</mds-text>
|
|
73
|
+
<mds-button slot="actions" variant="dark" tone="quiet" onClick={() => setOpened(false) }>Cancel</mds-button>
|
|
74
|
+
<mds-button slot="actions" variant="primary">Confirm</mds-button>
|
|
75
|
+
</mds-banner>
|
|
76
|
+
</mds-modal>
|
|
77
|
+
</div>
|
|
78
|
+
}
|
|
79
|
+
|
|
61
80
|
export const Default = Template.bind({})
|
|
62
81
|
export const CustomWindow = CustomTemplate.bind({})
|
|
82
|
+
export const ARIATest = AriaTemplate.bind({})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const typographyDictionary = [
|
|
2
2
|
'action',
|
|
3
3
|
'caption',
|
|
4
|
-
'
|
|
4
|
+
'snippet',
|
|
5
5
|
'detail',
|
|
6
6
|
'h1',
|
|
7
7
|
'h2',
|
|
@@ -20,11 +20,11 @@ const typographyVariationsDictionary = [
|
|
|
20
20
|
'title',
|
|
21
21
|
'info',
|
|
22
22
|
'read',
|
|
23
|
-
'
|
|
23
|
+
'code',
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
const typographyMonoDictionary = [
|
|
27
|
-
'
|
|
27
|
+
'snippet',
|
|
28
28
|
'hack',
|
|
29
29
|
]
|
|
30
30
|
|
package/src/fixtures/icons.json
CHANGED
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"mi/baseline/badge",
|
|
19
19
|
"mi/baseline/book",
|
|
20
20
|
"mi/baseline/border-all",
|
|
21
|
+
"mi/baseline/cancel",
|
|
21
22
|
"mi/baseline/check-box",
|
|
22
23
|
"mi/baseline/check-box-outline-blank",
|
|
23
24
|
"mi/baseline/check-circle",
|
|
24
|
-
"mi/baseline/check-circle-outline",
|
|
25
25
|
"mi/baseline/close",
|
|
26
26
|
"mi/baseline/css",
|
|
27
27
|
"mi/baseline/description",
|
|
28
28
|
"mi/baseline/done",
|
|
29
29
|
"mi/baseline/eco",
|
|
30
30
|
"mi/baseline/email",
|
|
31
|
-
"mi/baseline/error
|
|
31
|
+
"mi/baseline/error",
|
|
32
32
|
"mi/baseline/explore",
|
|
33
33
|
"mi/baseline/folder-zip",
|
|
34
34
|
"mi/baseline/groups",
|
package/src/types/typography.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type TypographyType =
|
|
2
2
|
| 'action'
|
|
3
3
|
| 'caption'
|
|
4
|
-
| '
|
|
4
|
+
| 'snippet'
|
|
5
5
|
| 'detail'
|
|
6
6
|
| 'h1'
|
|
7
7
|
| 'h2'
|
|
@@ -19,7 +19,7 @@ export type TypographyVariants =
|
|
|
19
19
|
| 'title'
|
|
20
20
|
| 'info'
|
|
21
21
|
| 'read'
|
|
22
|
-
| '
|
|
22
|
+
| 'code'
|
|
23
23
|
|
|
24
24
|
export type TypographyTitleType =
|
|
25
25
|
| 'action'
|
|
@@ -48,7 +48,7 @@ export type TypographySmallerType =
|
|
|
48
48
|
| 'option'
|
|
49
49
|
|
|
50
50
|
export type TypographyMonoType =
|
|
51
|
-
| '
|
|
51
|
+
| 'snippet'
|
|
52
52
|
| 'hack'
|
|
53
53
|
|
|
54
54
|
export type TypographyTooltipType =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-931319fa.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-4fe02e5f",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"close","onCloseListener"]]]]]],e)));
|
package/www/build/mds-modal.js
CHANGED
|
@@ -114,7 +114,8 @@ DOMTokenList
|
|
|
114
114
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
|
-
|
|
117
|
+
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
+
var url = new URL('./p-a2cf985e.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
118
119
|
System.import(url.href);
|
|
119
120
|
};
|
|
120
121
|
|