@loadsmart/miranda-wc 1.38.0 → 1.39.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/{attention-aa518d0c.js → attention-6df31efc.js} +2 -2
- package/dist/{attention-aa518d0c.js.map → attention-6df31efc.js.map} +1 -1
- package/dist/{bell-f68b74e9.js → bell-8517678b.js} +2 -2
- package/dist/{bell-f68b74e9.js.map → bell-8517678b.js.map} +1 -1
- package/dist/{check-612d8f07.js → check-8578b0df.js} +2 -2
- package/dist/{check-612d8f07.js.map → check-8578b0df.js.map} +1 -1
- package/dist/{close-1400e2ca.js → close-d6a650eb.js} +2 -2
- package/dist/{close-1400e2ca.js.map → close-d6a650eb.js.map} +1 -1
- package/dist/components/focus-trap/focus-trap.d.ts +43 -0
- package/dist/components/focus-trap/focus-trap.d.ts.map +1 -0
- package/dist/components/focus-trap/focus-trap.helpers.d.ts +2 -0
- package/dist/components/focus-trap/focus-trap.helpers.d.ts.map +1 -0
- package/dist/components/focus-trap/focus-trap.styles.d.ts +3 -0
- package/dist/components/focus-trap/focus-trap.styles.d.ts.map +1 -0
- package/dist/components/focus-trap/index.d.ts +3 -0
- package/dist/components/focus-trap/index.d.ts.map +1 -0
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/{indeterminate-ad84a74b.js → indeterminate-e1dad34d.js} +2 -2
- package/dist/{indeterminate-ad84a74b.js.map → indeterminate-e1dad34d.js.map} +1 -1
- package/dist/{index-e7899ecc.js → index-e8e0a3cc.js} +4 -4
- package/dist/index-e8e0a3cc.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{info-circle-f88802ff.js → info-circle-2a027ac6.js} +2 -2
- package/dist/{info-circle-f88802ff.js.map → info-circle-2a027ac6.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-e7899ecc.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a}from"./index-
|
|
2
|
-
//# sourceMappingURL=attention-
|
|
1
|
+
import{b as a}from"./index-e8e0a3cc.js";var s=a`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M6.732 42.889h34.537c2.06 0 3.376-2.192 2.406-4.005l-17.27-32.33c-1.026-1.924-3.785-1.924-4.813 0L4.324 38.883c-.968 1.813.349 4.005 2.408 4.005zm14.542-24.504h5.452v10.89h-5.452zM24 31.998a2.726 2.726 0 0 1 2.726 2.723A2.726 2.726 0 0 1 24 37.444a2.726 2.726 0 0 1-2.726-2.723A2.726 2.726 0 0 1 24 31.998z"/></svg>`;export{s as default};
|
|
2
|
+
//# sourceMappingURL=attention-6df31efc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attention-
|
|
1
|
+
{"version":3,"file":"attention-6df31efc.js","sources":["../src/components/icon/icons/attention.ts"],"sourcesContent":["import { svg } from 'lit';\n\nexport default svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M6.732 42.889h34.537c2.06 0 3.376-2.192 2.406-4.005l-17.27-32.33c-1.026-1.924-3.785-1.924-4.813 0L4.324 38.883c-.968 1.813.349 4.005 2.408 4.005zm14.542-24.504h5.452v10.89h-5.452zM24 31.998a2.726 2.726 0 0 1 2.726 2.723A2.726 2.726 0 0 1 24 37.444a2.726 2.726 0 0 1-2.726-2.723A2.726 2.726 0 0 1 24 31.998z\"/></svg>`;\n"],"names":["attention","svg"],"mappings":"wCAEA,IAAAA,EAAeC,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as v}from"./index-
|
|
2
|
-
//# sourceMappingURL=bell-
|
|
1
|
+
import{b as v}from"./index-e8e0a3cc.js";var s=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M34.417 21.526v9.133l3.632 3.654v1.826H9v-1.827l3.631-3.653v-9.133c0-5.626 2.96-10.302 8.17-11.544V8.74A2.728 2.728 0 0123.524 6a2.728 2.728 0 012.724 2.74v1.242c5.192 1.242 8.17 5.937 8.17 11.544zm-7.262 16.44c0 2.01-1.634 3.653-3.63 3.653-2.016 0-3.632-1.644-3.632-3.653h7.262z"/></svg>`;export{s as default};
|
|
2
|
+
//# sourceMappingURL=bell-8517678b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bell-
|
|
1
|
+
{"version":3,"file":"bell-8517678b.js","sources":["../src/components/icon/icons/bell.ts"],"sourcesContent":["import { svg } from 'lit';\n\nexport default svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M34.417 21.526v9.133l3.632 3.654v1.826H9v-1.827l3.631-3.653v-9.133c0-5.626 2.96-10.302 8.17-11.544V8.74A2.728 2.728 0 0123.524 6a2.728 2.728 0 012.724 2.74v1.242c5.192 1.242 8.17 5.937 8.17 11.544zm-7.262 16.44c0 2.01-1.634 3.653-3.63 3.653-2.016 0-3.632-1.644-3.632-3.653h7.262z\"/></svg>`;\n"],"names":["bell","svg"],"mappings":"wCAEA,IAAAA,EAAeC,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as L}from"./index-
|
|
2
|
-
//# sourceMappingURL=check-
|
|
1
|
+
import{b as L}from"./index-e8e0a3cc.js";var s=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M44.4205 13.3433L40.1778 9.10067L18.9646 30.3139L9.06512 20.4144L4.82248 24.657L14.722 34.5565L18.9646 38.7992L23.2073 34.5565L44.4205 13.3433Z"/></svg>`;export{s as default};
|
|
2
|
+
//# sourceMappingURL=check-8578b0df.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-
|
|
1
|
+
{"version":3,"file":"check-8578b0df.js","sources":["../src/components/icon/icons/check.ts"],"sourcesContent":["import { svg } from 'lit';\n\nexport default svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M44.4205 13.3433L40.1778 9.10067L18.9646 30.3139L9.06512 20.4144L4.82248 24.657L14.722 34.5565L18.9646 38.7992L23.2073 34.5565L44.4205 13.3433Z\"/></svg>`;\n"],"names":["check","svg"],"mappings":"wCAEA,IAAAA,EAAeC,CAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as L}from"./index-
|
|
2
|
-
//# sourceMappingURL=close-
|
|
1
|
+
import{b as L}from"./index-e8e0a3cc.js";var s=L`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M40.9706 11.2721L36.7279 7.02944L24 19.7574L11.2721 7.02944L7.02944 11.2721L19.7574 24L7.02944 36.7279L11.2721 40.9706L24 28.2426L36.7279 40.9706L40.9706 36.7279L28.2426 24L40.9706 11.2721Z"/></svg>`;export{s as default};
|
|
2
|
+
//# sourceMappingURL=close-d6a650eb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-
|
|
1
|
+
{"version":3,"file":"close-d6a650eb.js","sources":["../src/components/icon/icons/close.ts"],"sourcesContent":["import { svg } from 'lit';\n\nexport default svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M40.9706 11.2721L36.7279 7.02944L24 19.7574L11.2721 7.02944L7.02944 11.2721L19.7574 24L7.02944 36.7279L11.2721 40.9706L24 28.2426L36.7279 40.9706L40.9706 36.7279L28.2426 24L40.9706 11.2721Z\"/></svg>`;\n"],"names":["close","svg"],"mappings":"wCAEA,IAAAA,EAAeC,CAAG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PropertyValues } from 'lit';
|
|
2
|
+
import { Component } from '../component';
|
|
3
|
+
export type SupportedKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';
|
|
4
|
+
export interface FocusTrapProps {
|
|
5
|
+
active: boolean;
|
|
6
|
+
keys?: SupportedKey | SupportedKey[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* This component will be used to trap focus within components we write and
|
|
10
|
+
* currently handles only elements listed in the `getFocusableDescendants` function.
|
|
11
|
+
* [!] IT IS NOT, BY ANY CIRCUMSTANCES, MEANT TO BE USED EXTERNALLY.
|
|
12
|
+
*/
|
|
13
|
+
export declare class FocusTrap extends Component {
|
|
14
|
+
#private;
|
|
15
|
+
static styles: import("lit").CSSResult[][];
|
|
16
|
+
static get properties(): {
|
|
17
|
+
active: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
reflect: boolean;
|
|
20
|
+
};
|
|
21
|
+
keys: {};
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Is the focus trap active?.
|
|
25
|
+
*/
|
|
26
|
+
active: FocusTrapProps['active'];
|
|
27
|
+
/**
|
|
28
|
+
* Keys that trigger navigation through the focusable elements in the focus trap.
|
|
29
|
+
*/
|
|
30
|
+
keys: FocusTrapProps['keys'];
|
|
31
|
+
constructor();
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
|
+
updated(changedProperties: PropertyValues<FocusTrap>): void;
|
|
34
|
+
activate: () => void;
|
|
35
|
+
deactivate: () => void;
|
|
36
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
37
|
+
}
|
|
38
|
+
declare global {
|
|
39
|
+
interface HTMLElementTagNameMap {
|
|
40
|
+
'm-focus-trap': FocusTrap;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=focus-trap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-trap.d.ts","sourceRoot":"","sources":["../../../src/components/focus-trap/focus-trap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;CACrC;AASD;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,SAAS;;IACvC,OAAgB,MAAM,8BAAc;IAEpC,WAAoB,UAAU;;;;;;MAK7B;IAED;;OAEG;IACK,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAEzC;;OAEG;IACK,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;;IAgB5B,oBAAoB;IAMpB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,SAAS,CAAC;IAY7D,QAAQ,aAMN;IAEF,UAAU,aAMR;IAEO,MAAM;CA2Gf;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,SAAS,CAAC;KAC1B;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-trap.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/focus-trap/focus-trap.helpers.ts"],"names":[],"mappings":"AA4BA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,UAIrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-trap.styles.d.ts","sourceRoot":"","sources":["../../../src/components/focus-trap/focus-trap.styles.ts"],"names":[],"mappings":"AAEA,iBAAS,MAAM,8BAQd;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/focus-trap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAG9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;GAMG;AACH,qBAAa,IAAK,SAAQ,SAAS;;IAClC,OAAgB,MAAM,8BAAc;IAEpC,WAAoB,UAAU;;;;;;;;;;;;;MAO7B;IAED;;OAEG;IACK,KAAK,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACK,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACK,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO,CAAC,IAAI,CAAkC;;IAQrC,iBAAiB;IAMjB,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAQ9C,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAe/C,MAAM;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/components/icon/icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAG9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;GAMG;AACH,qBAAa,IAAK,SAAQ,SAAS;;IAClC,OAAgB,MAAM,8BAAc;IAEpC,WAAoB,UAAU;;;;;;;;;;;;;MAO7B;IAED;;OAEG;IACK,KAAK,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACK,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACK,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO,CAAC,IAAI,CAAkC;;IAQrC,iBAAiB;IAMjB,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAQ9C,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;IAe/C,MAAM;CAyBf;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,QAAQ,EAAE,IAAI,CAAC;KACf;CACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as v}from"./index-
|
|
2
|
-
//# sourceMappingURL=indeterminate-
|
|
1
|
+
import{b as v}from"./index-e8e0a3cc.js";var t=v`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0V0z" fill="none" /><path d="M19 13H5v-2h14v2z" /></svg>`;export{t as default};
|
|
2
|
+
//# sourceMappingURL=indeterminate-e1dad34d.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indeterminate-
|
|
1
|
+
{"version":3,"file":"indeterminate-e1dad34d.js","sources":["../src/components/icon/icons/indeterminate.ts"],"sourcesContent":["import { svg } from 'lit';\n\nexport default svg`<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\" /><path d=\"M19 13H5v-2h14v2z\" /></svg>`;\n"],"names":["indeterminate","svg"],"mappings":"wCAEA,IAAAA,EAAeC,CAAG"}
|
|
@@ -422,7 +422,7 @@ const ut=t=>null!=t?t:C
|
|
|
422
422
|
${It("body-md-bold")};
|
|
423
423
|
color: ${Et("color-text-secondary")};
|
|
424
424
|
}
|
|
425
|
-
`],window.customElements.define("m-banner-title",ae);class le extends dt{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);i||e.preventDefault()}(this,t)}}}var ce={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},de=wt(ce.toRem);function he(t,e){return X(de(t,e))}const ue=new Map([["alert-circle",()=>import("./attention-
|
|
425
|
+
`],window.customElements.define("m-banner-title",ae);class le extends dt{constructor(){super(...arguments),this.emit=(t,e)=>{const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,...e});this.dispatchEvent(o)},this.reemit=t=>{!function(t,e){!e.bubbles||t.shadowRoot&&!e.composed||e.stopPropagation();const o=Reflect.construct(e.constructor,[e.type,e]),i=t.dispatchEvent(o);i||e.preventDefault()}(this,t)}}}var ce={BASE_PIXELS:16,toRem:function(t,e=16){return parseInt(String(t),10)/e+"rem"}},de=wt(ce.toRem);function he(t,e){return X(de(t,e))}const ue=new Map([["alert-circle",()=>import("./attention-6df31efc.js")],["attention",()=>import("./attention-6df31efc.js")],["bell",()=>import("./bell-8517678b.js")],["check",()=>import("./check-8578b0df.js")],["close",()=>import("./close-d6a650eb.js")],["indeterminate",()=>import("./indeterminate-e1dad34d.js")],["info-circle",()=>import("./info-circle-2a027ac6.js")]]);var pe,be,ge,me;ue.keys();class fe extends le{static get properties(){return{name:{type:String},size:{type:String},color:{type:String},loading:{state:!0}}}constructor(){super(),this.icon=null,pe.set(this,(async()=>{ue.has(this.name);try{this.icon=null;const{default:t}=await ue.get(this.name)();this.icon=t}catch{}finally{this.requestUpdate()}})),this.icon=null}connectedCallback(){super.connectedCallback(),t(this,pe,"f").call(this)}update(e){super.update(e),e.has("name")&&t(this,pe,"f").call(this)}updated(t){super.updated(t),t.has("size")&&null!=this.size&&this.style.setProperty("--m-icon-size",`${parseInt(String(this.size),10)||16}px`),t.has("color")&&null!=this.color&&this.style.setProperty("--m-icon-color",xt(this.color))}render(){return null!=this.name&&ue.has(this.name)&&null!=this.icon?this.icon:C}}pe=new WeakMap,fe.styles=[[Y`
|
|
426
426
|
:host {
|
|
427
427
|
--m-icon-size: 16px;
|
|
428
428
|
--m-icon-color: ${Et("color-text-primary")};
|
|
@@ -1561,7 +1561,7 @@ let _e=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
1561
1561
|
${Gt(".radio-button","*")} {
|
|
1562
1562
|
pointer-event: none;
|
|
1563
1563
|
}
|
|
1564
|
-
`],window.customElements.define("m-radio",ei);var oi,ii={};Object.defineProperty(ii,"i",{value:!0});var ri=Tt;const ni=(t,e)=>{const o=ri(t);if(0===o.length)return e;const i=new Set;return i.add(String(o.at(-1))),i},si=(t,e)=>{const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o)i.add(String(t));return i},ai={type:"single",init:t=>ni(t,new Set),select:ni,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set;for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},li={type:"single-strict",init:t=>ni(t,new Set),select:ni,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(let t=0;t<o.length&&e.size>1;t++)i.delete(String(o[t]));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ci={type:"multiple",init:t=>si(t,new Set),select:si,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)?i.delete(o):i.add(o)}return i},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var di,hi,ui,pi,bi,gi,mi,fi,yi;ii.SELECTION_TYPES=["single","single-strict","multiple"],oi=ii.default=function(t){const{type:e="multiple"}=t;return"single"===e?ai:"single-strict"===e?li:ci};class vi{constructor(e,o,i){di.add(this),this.disabled=!1,this.event="m-select",hi.set(this,(t=>{if(this.disabled)return;if(null==this.type)return
|
|
1564
|
+
`],window.customElements.define("m-radio",ei);var oi,ii={};Object.defineProperty(ii,"i",{value:!0});var ri=Tt;const ni=(t,e)=>{const o=ri(t);if(0===o.length)return e;const i=new Set;return i.add(String(o.at(-1))),i},si=(t,e)=>{const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o)i.add(String(t));return i},ai={type:"single",init:t=>ni(t,new Set),select:ni,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set;for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},li={type:"single-strict",init:t=>ni(t,new Set),select:ni,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(let t=0;t<o.length&&e.size>1;t++)i.delete(String(o[t]));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)||(i.clear(),i.add(o))}return i},reset:t=>null==t?new Set:t,value(t){if(null==t||0===t.size)return null;const[e]=Array.from(t);return e}},ci={type:"multiple",init:t=>si(t,new Set),select:si,unselect(t,e){const o=ri(t);if(0===o.length||0===e.size)return e;const i=new Set(e);for(const t of o)i.delete(String(t));return i},toggle(t,e){const o=ri(t);if(0===o.length)return e;const i=new Set(e);for(const t of o){const o=String(t);e.has(o)?i.delete(o):i.add(o)}return i},reset:t=>null==t?new Set:t,value:t=>null==t||0===t.size?null:Array.from(t)};var di,hi,ui,pi,bi,gi,mi,fi,yi;ii.SELECTION_TYPES=["single","single-strict","multiple"],oi=ii.default=function(t){const{type:e="multiple"}=t;return"single"===e?ai:"single-strict"===e?li:ci};class vi{constructor(e,o,i){di.add(this),this.disabled=!1,this.event="m-select",hi.set(this,(t=>{if(this.disabled)return;if(null==this.type)return;const{detail:{type:e,value:o}}=t;switch(e){case"select":this.select(Rt(o));break;case"unselect":this.unselect(Rt(o));break;case"toggle":this.toggle(Rt(o))}})),this.init=t=>{this.host.selection=this.strategy.init(t)},this.select=e=>{this.host.selection=this.strategy.select(e,this.host.selection),t(this,di,"m",ui).call(this)},this.unselect=e=>{this.host.selection=this.strategy.unselect(e,this.host.selection),t(this,di,"m",ui).call(this)},this.toggle=e=>{this.host.selection=this.strategy.toggle(e,this.host.selection),t(this,di,"m",ui).call(this)},this.subscribe=()=>{this.host.addEventListener(this.event,t(this,hi,"f"))},this.unsubscribe=()=>{this.host.removeEventListener(this.event,t(this,hi,"f"))},this.host=e,this.type=o,this.event=i,this.strategy=oi({type:o}),this.host.addController(this)}hostConnected(){this.subscribe()}hostDisconnected(){this.unsubscribe()}hostUpdate(){null!=this.host.type&&this.host.type!==this.type&&(this.unsubscribe(),this.host.removeController(this))}}hi=new WeakMap,di=new WeakSet,ui=function(){const t={detail:{type:this.type,value:this.strategy.value(this.host.selection)},bubbles:!0,composed:!1};this.host.dispatchEvent(new CustomEvent("m-change",t))};class $i extends dt{static get properties(){return{value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},selection:{state:!0},orientation:{type:String}}}constructor(){super(),pi.set(this,null),bi.set(this,null),gi.set(this,(()=>{var e;return null===(e=t(this,mi,"f").call(this)[0])||void 0===e?void 0:e.value})),mi.set(this,(()=>{var o,i,r;e(this,bi,null!==(o=t(this,bi,"f"))&&void 0!==o?o:this.shadowRoot&&this.shadowRoot.querySelector("slot"),"f");return[...null!==(r=null===(i=t(this,bi,"f"))||void 0===i?void 0:i.assignedElements({flatten:!0}))&&void 0!==r?r:[]].filter((t=>"m-radio"===t.tagName.toLowerCase()))})),fi.set(this,(t=>{t.checked=this.selection.has(t.value)})),yi.set(this,(t=>{t.disabled=this.disabled})),this.disabled=!1,this.selection=new Set,this.value="",this.orientation="vertical",this.type="single-strict"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio-group"),e(this,pi,new vi(this,this.type,Xo),"f")}update(e){super.update(e),e.has("value")&&t(this,pi,"f")&&t(this,pi,"f").init(Rt(this.value||t(this,gi,"f").call(this))),e.has("selection")&&([this.value]=this.selection)}updated(e){super.updated(e),e.has("selection")&&t(this,mi,"f").call(this).forEach((e=>{t(this,fi,"f").call(this,e)})),e.has("disabled")&&t(this,mi,"f").call(this).forEach((e=>{t(this,yi,"f").call(this,e)}))}render(){return k`
|
|
1565
1565
|
<div
|
|
1566
1566
|
class=${mt({"radio-group":!0,"-vertical":"vertical"===this.orientation,"-horizontal":"horizontal"===this.orientation})}
|
|
1567
1567
|
>
|
|
@@ -2007,7 +2007,7 @@ let _e=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
2007
2007
|
<svg viewBox="0 0 20 10">
|
|
2008
2008
|
<polygon stroke-width="0" points="0,10 20,10 10,0" />
|
|
2009
2009
|
</svg>
|
|
2010
|
-
</span>`,this.reposition=async e=>{var o,i;if(null==this.floating||null==this.reference)return
|
|
2010
|
+
</span>`,this.reposition=async e=>{var o,i;if(null==this.floating||null==this.reference)return;const{x:r,y:n,placement:s,middlewareData:a}=await un(this.reference,this.floating,{strategy:null!==(o=this.position)&&void 0!==o?o:"fixed",placement:null!==(i=this.placement)&&void 0!==i?i:"bottom-start",middleware:[Wr(this.getFloatingOffset()),Mr(),(void 0===l&&(l={}),{name:"shift",options:l,async fn(t){const{x:e,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:n=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...a}=gr(l,t),c={x:e,y:o},d=await yr(t,a),h=pr(ur(i)),u="x"===h?"y":"x";let p=c[h],b=c[u];if(r){const t="y"===h?"bottom":"right";p=wr(p+d["y"===h?"top":"left"],p,p-d[t])}if(n){const t="y"===u?"bottom":"right";b=wr(b+d["y"===u?"top":"left"],b,b-d[t])}const g=s.fn({...t,[h]:p,[u]:b});return{...g,data:{x:g.x-e,y:g.y-o}}}}),this.arrow?xr({element:this.arrow,padding:16}):void 0]});var l;Object.assign(this.floating.style,{top:`${n}px`,left:`${r}px`}),null!=this.arrow&&a.arrow&&Object.assign(this.arrow.style,t(this,bn,"f").call(this,s,a.arrow)),this.emit("m-popover-reposition",{detail:{reason:e}})},bn.set(this,((t,e)=>{if(null==this.floating||null==this.reference||null==this.arrow||null==e)return{};const[o,i]=t.split("-"),{x:r,y:n}=e,s={top:"bottom",bottom:"top",left:"right",right:"left"}[o],a={top:"180deg",bottom:"0deg",left:"90deg",right:"-90deg"}[o],l=null!=i,c=this.reference.offsetWidth>this.floating.offsetWidth,d=this.reference.offsetHeight>this.floating.offsetHeight,h=["top","bottom"].includes(o),u=l&&(h?c:d),p=this.reference.getBoundingClientRect(),b=`calc(var(--m-popover-arrow-offset) + ${{top:p.height,bottom:p.height,right:p.width,left:p.width}[s]}px + ${this.getFloatingOffset()}px)`;let g={transform:`rotate(${a})`,...gn};if(u){const e={"top-start":"left","top-end":"right","bottom-start":"left","bottom-end":"right"}[t];g={...g,[s]:b,[e]:"10px"}}else g={...g,left:null!=r?`${r}px`:"",top:null!=n?`${n}px`:"",[s]:b};return g})),this.position="fixed",this.placement="top-end",this.open=!1}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=t(this,pn,"f"))||void 0===e||e.call(this)}firstUpdated(){this.open&&this.reposition("show"),e(this,pn,hn(this.reference,this.floating,(()=>{this.reposition("auto")})),"f")}updated(t){super.updated(t),this.open&&null!=t.get("placement")&&null!=this.placement&&this.reposition("placement")}get reference(){return this.getReferenceElement()}get floating(){return this.getFloatingElement()}get arrow(){return this.getArrowElement()}show(){this.open||(this.open=!0,this.reposition("show"))}hide(){this.open&&(this.open=!1)}toggle(){this.open?this.hide():this.show()}}var fn,yn,vn,$n,wn,xn,kn,zn,Sn;pn=new WeakMap,bn=new WeakMap;class Cn extends mn{static get properties(){return{...mn.properties,trigger:{type:String,converter:{fromAttribute:cr}}}}constructor(){super(),fn.set(this,void 0),yn.set(this,void 0),vn.set(this,(()=>{t(this,Sn,"f").call(this,"focus")&&(clearTimeout(t(this,yn,"f")),e(this,yn,window.setTimeout((()=>this.show()),450),"f"))})),$n.set(this,(()=>{t(this,Sn,"f").call(this,"focus")&&(clearTimeout(t(this,yn,"f")),e(this,yn,window.setTimeout((()=>this.hide()),450),"f"))})),wn.set(this,(()=>{t(this,Sn,"f").call(this,"click")&&this.toggle()})),xn.set(this,(t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())})),kn.set(this,(()=>{t(this,Sn,"f").call(this,"hover")&&(clearTimeout(t(this,fn,"f")),e(this,fn,window.setTimeout((()=>this.show()),450),"f"))})),zn.set(this,(()=>{t(this,Sn,"f").call(this,"hover")&&(clearTimeout(t(this,fn,"f")),e(this,fn,window.setTimeout((()=>this.hide()),450),"f"))})),Sn.set(this,(t=>this.trigger.includes(t))),this.position="fixed",this.placement="top-start",this.trigger=["hover","focus"]}connectedCallback(){super.connectedCallback(),this.addEventListener("blur",t(this,$n,"f"),!0),this.addEventListener("click",t(this,wn,"f")),this.addEventListener("focus",t(this,vn,"f"),!0),this.addEventListener("keydown",t(this,xn,"f")),this.addEventListener("mouseout",t(this,zn,"f")),this.addEventListener("mouseover",t(this,kn,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",t(this,$n,"f"),!0),this.removeEventListener("focus",t(this,vn,"f"),!0),this.removeEventListener("click",t(this,wn,"f")),this.removeEventListener("keydown",t(this,xn,"f")),this.removeEventListener("mouseover",t(this,kn,"f")),this.removeEventListener("mouseout",t(this,zn,"f"))}getReferenceElement(){const t=this.shadowRoot.querySelector('slot[name="reference"]'),[e]=t.assignedElements({flatten:!0});return e}getFloatingElement(){const t=this.shadowRoot.querySelector('slot[name="floating"]'),[e]=t.assignedElements({flatten:!0});return e}getArrowElement(){return this.shadowRoot.querySelector("#arrow")}render(){return k`
|
|
2011
2011
|
${this.renderArrow()}
|
|
2012
2012
|
<slot name="reference" aria-describedby="floating"></slot>
|
|
2013
2013
|
<slot
|
|
@@ -2108,4 +2108,4 @@ let _e=class{constructor(t,e,o,i){var r;if(this.subscribe=!1,this.provided=!1,th
|
|
|
2108
2108
|
display: inline-block;
|
|
2109
2109
|
}
|
|
2110
2110
|
`]],window.customElements.define("m-tooltip",Cn);const Mn=["top","left","right","bottom","top-start","top-end","bottom-start","bottom-end"];export{xe as $,Fo as A,oe as B,Ce as C,Ke as D,mo as E,No as F,vo as G,yo as H,ho as I,fo as J,co as K,$o as L,ko as M,xo as N,Co as O,zo as P,Wo as Q,Mo as R,wo as S,Ho as T,Jo as U,ei as V,$i as W,Fi as X,Ii as Y,Gi as Z,Vi as _,ie as a,Hi as a0,sr as a1,ar as a2,Cn as a3,Mn as a4,z as b,re as c,ne as d,se as e,ae as f,Se as g,ee as h,Me as i,We as j,Ae as k,Re as l,ye as m,Qe as n,to as o,io as p,ro as q,no as r,uo as s,po as t,bo as u,go as v,Eo as w,To as x,qo as y,Lo as z};
|
|
2111
|
-
//# sourceMappingURL=index-
|
|
2111
|
+
//# sourceMappingURL=index-e8e0a3cc.js.map
|