godown 3.12.0 → 3.13.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/build/godown+lit.iife.js +12 -13
- package/build/godown+lit.iife.js.map +1 -1
- package/build/godown+lit.js +11 -12
- package/build/godown+lit.js.map +1 -1
- package/build/godown+lit.umd.js +12 -13
- package/build/godown+lit.umd.js.map +1 -1
- package/build/godown.iife.js +7 -7
- package/build/godown.iife.js.map +1 -1
- package/build/godown.js +5 -5
- package/build/godown.js.map +1 -1
- package/build/godown.umd.js +7 -7
- package/build/godown.umd.js.map +1 -1
- package/custom-elements.json +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/internal/global-style.d.ts.map +1 -1
- package/internal/global-style.js +1 -1
- package/internal/global-style.js.map +1 -1
- package/internal/popover.d.ts +3 -0
- package/internal/popover.d.ts.map +1 -0
- package/internal/popover.js +2 -0
- package/internal/popover.js.map +1 -0
- package/internal/reset-style.d.ts +3 -0
- package/internal/reset-style.d.ts.map +1 -0
- package/internal/reset-style.js +2 -0
- package/internal/reset-style.js.map +1 -0
- package/internal/ring.d.ts +1 -0
- package/internal/ring.d.ts.map +1 -1
- package/internal/ring.js +1 -1
- package/internal/ring.js.map +1 -1
- package/internal/super-input.d.ts +1 -1
- package/internal/super-input.d.ts.map +1 -1
- package/internal/super-input.js +1 -1
- package/internal/super-input.js.map +1 -1
- package/internal/utils.d.ts +2 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +2 -0
- package/internal/utils.js.map +1 -0
- package/package.json +2 -3
- package/popover.d.ts +2 -0
- package/popover.d.ts.map +1 -0
- package/popover.js +2 -0
- package/popover.js.map +1 -0
- package/src/index.ts +1 -0
- package/src/internal/global-style.ts +5 -33
- package/src/internal/popover.ts +64 -0
- package/src/internal/reset-style.ts +63 -0
- package/src/internal/ring.ts +3 -2
- package/src/internal/super-input.ts +2 -2
- package/src/internal/utils.ts +10 -0
- package/src/popover.ts +1 -0
- package/src/web-components/alert/component.ts +3 -2
- package/src/web-components/avatar/component.ts +1 -0
- package/src/web-components/button/component.ts +2 -0
- package/src/web-components/card/component.ts +3 -2
- package/src/web-components/chip/component.ts +1 -3
- package/src/web-components/details/component.ts +27 -16
- package/src/web-components/dialog/component.ts +50 -67
- package/src/web-components/heading/component.ts +0 -1
- package/src/web-components/input/component.ts +1 -3
- package/src/web-components/link/component.ts +0 -2
- package/src/web-components/popover/component.ts +172 -0
- package/src/web-components/popover/definition.ts +11 -0
- package/src/web-components/range/component.ts +2 -1
- package/src/web-components/rotate/component.ts +0 -1
- package/src/web-components/select/component.ts +109 -173
- package/src/web-components/split/component.ts +2 -2
- package/src/web-components/switch/component.ts +2 -1
- package/src/web-components/tabs/component.ts +99 -100
- package/src/web-components/tooltip/component.ts +44 -112
- package/vscode.css-custom-data.json +1 -1
- package/vscode.html-custom-data.json +1 -1
- package/web-components/alert/component.d.ts.map +1 -1
- package/web-components/alert/component.js +1 -1
- package/web-components/alert/component.js.map +1 -1
- package/web-components/avatar/component.d.ts.map +1 -1
- package/web-components/avatar/component.js +1 -1
- package/web-components/avatar/component.js.map +1 -1
- package/web-components/button/component.d.ts.map +1 -1
- package/web-components/button/component.js +1 -1
- package/web-components/button/component.js.map +1 -1
- package/web-components/card/component.d.ts.map +1 -1
- package/web-components/card/component.js +1 -1
- package/web-components/card/component.js.map +1 -1
- package/web-components/chip/component.d.ts +1 -3
- package/web-components/chip/component.d.ts.map +1 -1
- package/web-components/chip/component.js.map +1 -1
- package/web-components/details/component.d.ts +9 -13
- package/web-components/details/component.d.ts.map +1 -1
- package/web-components/details/component.js +1 -1
- package/web-components/details/component.js.map +1 -1
- package/web-components/dialog/component.d.ts +12 -14
- package/web-components/dialog/component.d.ts.map +1 -1
- package/web-components/dialog/component.js +1 -1
- package/web-components/dialog/component.js.map +1 -1
- package/web-components/heading/component.d.ts.map +1 -1
- package/web-components/heading/component.js +1 -1
- package/web-components/heading/component.js.map +1 -1
- package/web-components/input/component.d.ts.map +1 -1
- package/web-components/input/component.js +1 -1
- package/web-components/input/component.js.map +1 -1
- package/web-components/link/component.d.ts.map +1 -1
- package/web-components/link/component.js +1 -1
- package/web-components/link/component.js.map +1 -1
- package/web-components/popover/component.d.ts +35 -0
- package/web-components/popover/component.d.ts.map +1 -0
- package/web-components/popover/component.js +2 -0
- package/web-components/popover/component.js.map +1 -0
- package/web-components/popover/definition.d.ts +8 -0
- package/web-components/popover/definition.d.ts.map +1 -0
- package/web-components/popover/definition.js +2 -0
- package/web-components/popover/definition.js.map +1 -0
- package/web-components/range/component.d.ts.map +1 -1
- package/web-components/range/component.js +1 -1
- package/web-components/range/component.js.map +1 -1
- package/web-components/rotate/component.d.ts.map +1 -1
- package/web-components/rotate/component.js.map +1 -1
- package/web-components/select/component.d.ts +11 -27
- package/web-components/select/component.d.ts.map +1 -1
- package/web-components/select/component.js +1 -1
- package/web-components/select/component.js.map +1 -1
- package/web-components/split/component.js +1 -1
- package/web-components/split/component.js.map +1 -1
- package/web-components/switch/component.d.ts.map +1 -1
- package/web-components/switch/component.js +1 -1
- package/web-components/switch/component.js.map +1 -1
- package/web-components/tabs/component.d.ts +18 -25
- package/web-components/tabs/component.d.ts.map +1 -1
- package/web-components/tabs/component.js +1 -1
- package/web-components/tabs/component.js.map +1 -1
- package/web-components/tooltip/component.d.ts +15 -39
- package/web-components/tooltip/component.d.ts.map +1 -1
- package/web-components/tooltip/component.js +1 -1
- package/web-components/tooltip/component.js.map +1 -1
- package/web-types.json +1 -1
- package/internal/direction.d.ts +0 -27
- package/internal/direction.d.ts.map +0 -1
- package/internal/direction.js +0 -2
- package/internal/direction.js.map +0 -1
- package/internal/super-openable.d.ts +0 -15
- package/internal/super-openable.d.ts.map +0 -1
- package/internal/super-openable.js +0 -2
- package/internal/super-openable.js.map +0 -1
- package/src/internal/direction.ts +0 -65
- package/src/internal/super-openable.ts +0 -34
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{godown as r,styles as o,StyleController as e,attr as i,htmlSlot as n}from"@godown/element";import{css as s,html as
|
1
|
+
import{__decorate as t}from"tslib";import{godown as r,styles as o,StyleController as e,attr as i,htmlSlot as n}from"@godown/element";import{css as s,html as a}from"lit";import{property as p}from"lit/decorators.js";import{cssGlobalVars as d,GlobalStyle as l}from"../../internal/global-style.js";import{ringTypeAttribute as c,RingBuilder as m}from"../../internal/ring.js";let g=class Alert extends l{constructor(){super(),this.ringType="border",new e(this,(()=>new m({type:this.ringType}).css))}render(){return a`<div part="root" ${i(this.observedRecord)}> <div>${n("prefix")}</div> <div part="content"> <strong part="title">${n("title",this.title)}</strong> ${n("",this.content)} </div> <div>${n("suffix")}</div> </div>`}static alert(t,r){const o=new this;return Object.assign(o,r),t.appendChild(o),o}};t([p({attribute:c})],g.prototype,"ringType",void 0),t([p()],g.prototype,"title",void 0),t([p()],g.prototype,"content",void 0),g=t([r("alert"),o(s`:host{background:var(${d.background});color:var(${d.foreground})}:host,:where(:host([contents]) [part=root]){display:block}[part=root]{align-items:center;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr;padding:.75em}[part=content],[part=root]{display:grid}`)],g);var v=g;export{g as Alert,v as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/alert/component.ts"],"sourcesContent":null,"names":["Alert","GlobalStyle","constructor","super","this","ringType","StyleController","RingBuilder","type","css","render","html","attr","observedRecord","htmlSlot","title","content","ai","attribute","property","prototype","__decorate","godown","styles","cssGlobalVars","background","Alert$1"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/alert/component.ts"],"sourcesContent":null,"names":["Alert","GlobalStyle","constructor","super","this","ringType","StyleController","RingBuilder","type","css","render","html","attr","observedRecord","htmlSlot","title","content","ai","attribute","property","prototype","__decorate","godown","styles","cssGlobalVars","background","foreground","Alert$1"],"mappings":"kXA0CA,IAAMA,EAAN,MAAMA,cAAcC,EAClB,WAAAC,GACEC,QAKFC,KAAQC,SAAa,SAJnB,IAAIC,EAAgBF,MAAM,IAAM,IAAIG,EAAY,CAAEC,KAAMJ,KAAKC,WAAYI,MAkBjE,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAR,KAAAS,yBAAAC,EAAA,6DAAAA,EAAA,QAAAV,KAAAW,mBAAAD,EAAA,GAAAV,KAAAY,wBAAAF,EAAA,2CAGL,MAAIG,EAAK,IAACb,iDAIa,SAGlBc,gDAEV,CACHC,KAEAnB,EAAAoB,UAAa,aAAyC,GACpDC,EAAA,CACAF,KACAnB,EAAAoB,UAAK,eAAe,GACpBpB,EAAAqB,EAAS,CACXC,EA7EgB,SA8EjBC,EAAAd,CAAA,wBAAAe,EAAAC,yBAAAD,EAAAE,gOApCC1B,GADC,IAAA2B,EAAW3B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/avatar/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,gCAAgC,CAAC;AAI5E;;;;;;;;GAQG;AACH,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/avatar/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAiB,MAAM,gCAAgC,CAAC;AAI5E;;;;;;;;GAQG;AACH,cAuCM,MAAO,SAAQ,WAAW;IAC9B;;;OAGG;IAEH,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IAE/B;;OAEG;IAEH,IAAI,SAAM;IAEV;;OAEG;IAEH,KAAK,UAAS;IAEd,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAWrC,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;IAmB5C,UAAU,IAAI,MAAM;IAIpB,SAAS,CAAC,YAAY,IAAI,IAAI;CAG/B;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as r}from"tslib";import{godown as t,styles as e,attr as o,omit as i,htmlSlot as a}from"@godown/element";import{css as s,html as n}from"lit";import{property as d}from"lit/decorators.js";import{cssGlobalVars as h,GlobalStyle as m}from"../../internal/global-style.js";let
|
1
|
+
import{__decorate as r}from"tslib";import{godown as t,styles as e,attr as o,omit as i,htmlSlot as a}from"@godown/element";import{css as s,html as n}from"lit";import{property as d}from"lit/decorators.js";import{cssGlobalVars as h,GlobalStyle as m}from"../../internal/global-style.js";let l=class Avatar extends m{constructor(){super(...arguments),this.name="",this.round=!1}render(){return n`<div part="root" ${o(i(this.observedRecord,"src"))}> ${this._renderAvatar()} </div>`}_renderAvatar(){return this.src?n`<img part="image" src="${this.src}" alt="${this.name}" @error=${this._handleError}/>`:this.name?n`<span part="name">${this.formatName()}</span>`:a()}formatName(){return this.name}_handleError(){this.src=void 0}};r([d()],l.prototype,"src",void 0),r([d()],l.prototype,"name",void 0),r([d({type:Boolean})],l.prototype,"round",void 0),l=r([t("avatar"),e(s`:host{background:var(${h.passive});color:var(${h.foreground});height:2em;overflow:hidden;vertical-align:bottom;width:2em}:host,[part=root]{display:inline-flex}:host([contents]) [part=root]{display:inline-flex;height:inherit;width:inherit}:host([round]){border-radius:50%}[part=image]{height:100%;object-fit:cover;width:100%}[part=root]{align-items:center;border-radius:inherit;justify-content:center;position:relative}`)],l);var p=l;export{l as Avatar,p as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/avatar/component.ts"],"sourcesContent":null,"names":["Avatar","GlobalStyle","constructor","this","name","round","render","html","attr","omit","observedRecord","_renderAvatar","formatName","htmlSlot","_handleError","src","undefined","prototype","__decorate","type","Boolean","styles","css","cssGlobalVars","passive","Avatar$1"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/avatar/component.ts"],"sourcesContent":null,"names":["Avatar","GlobalStyle","constructor","this","name","round","render","html","attr","omit","observedRecord","_renderAvatar","formatName","htmlSlot","_handleError","src","undefined","prototype","__decorate","type","Boolean","styles","css","cssGlobalVars","passive","foreground","Avatar$1"],"mappings":"2RAwDA,IAAMA,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAYEC,KAAIC,KAAG,GAMPD,KAAKE,OAAG,EAEE,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAC,EAAAN,KAAAO,eAAA,YAAAP,KAAAQ,gDAGDR,2GAITI,CAAA,qBAAAJ,KAAAS,sBAGoBC,GACrB,CACE,UAAAD,oBAGW,YAAAE,GACAX,KAAAY,SAAAC,CACE,KAEZ,MAEHhB,EAAAiB,UAAa,WAAE,GACbC,EAAA,QAECD,UAAA,YAAA,KACH,GACO,CAAAE,KAAAC,aACTH,UAAA,aAAA,KAEUC,EAAA,GApGM,UAsGhBG,EAAAC,CAAA,wBAAAC,EAAAC,sBAAAD,EAAAE,wXAGE,IAAAC,EAAK1B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/button/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;AAKzF;;;;;;;GAOG;AACH,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/button/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;AAKzF;;;;;;;GAOG;AACH,cAgEM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,OAAO,EAAE,MAAM,CAAC;IAGhB,SAAS,CAAC,UAAU,EAAE,WAAW,CAAC;IAElC,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAE7B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAYrC,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,IAAI;IAKZ,iBAAiB,IAAI,IAAI;IAKzB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAW3C,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CA6B5C;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{queryPart as
|
1
|
+
import{__decorate as t}from"tslib";import{queryPart as e,godown as o,styles as i,attr as r,htmlSlot as n}from"@godown/element";import{css as a,html as s}from"lit";import{property as d}from"lit/decorators.js";import{scopePrefix as l,cssGlobalVars as c,GlobalStyle as p}from"../../internal/global-style.js";const h="button",u=l(h);let m=class Button extends p{constructor(){super(...arguments),this.plain=!1,this.disabled=!1,this.active=!1,this.round=!1}render(){return s`<div part="root" ${r(this.observedRecord)}> ${n("",this.content)} <span part="modal-root"></span> </div>`}focus(){this.disabled||(this.active=!0,super.focus())}blur(){this.active=!1,super.blur()}connectedCallback(){super.connectedCallback(),this.events.add(this,"click",this._handelClick)}_handelClick(t){if(this.disabled)return t.stopPropagation(),void t.preventDefault();this.plain||this._handleModal(t)}_handleModal(t){const e=document.createElement("i"),{width:o,height:i}=this.getBoundingClientRect(),{x:r,y:n}=this._root.getBoundingClientRect(),a=2*Math.sqrt(i**2+o**2)+"px";e.style.height=a,e.style.width=a,e.style.left=t.x-r+"px",e.style.top=t.y-n+"px",this._modalRoot.appendChild(e);e.animate([{transform:"scale(0) translate(-50%, -50%)",opacity:.1},{transform:"scale(1) translate(-50%, -50%)",offset:.8},{opacity:0}],{duration:800,iterations:1}),e.addEventListener("animationend",(()=>e.remove()),{once:!0})}};t([d({type:Boolean,reflect:!0})],m.prototype,"plain",void 0),t([d({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),t([d({type:Boolean,reflect:!0})],m.prototype,"active",void 0),t([d({type:Boolean,reflect:!0})],m.prototype,"round",void 0),t([d()],m.prototype,"content",void 0),t([e("modal-root")],m.prototype,"_modalRoot",void 0),t([e("root")],m.prototype,"_root",void 0),m=t([o(h),i(a`:host(:not([disabled]):active){transform:scale(var(${u}--focus-scale))}:host([round]){border-radius:calc(infinity*1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([plain]){${u}--gradients:unset;${u}--focus-scale:unset}`,a`:host{${u}--modal-animation-duration:1.5s;${u}--focus-scale:.97;${u}--deg:45deg;background:var(${c.primaryBackground});border-style:none;border-width:var(${c.ringWidth});color:var(${c.primaryForeground});cursor:pointer;display:block;overflow:hidden;text-align:center;width:-moz-fit-content;width:fit-content}[part=root]:not([contents]){height:100%;width:100%}[part=root]{display:grid;padding:.25em .75em;place-content:center;position:relative;-webkit-user-select:none;user-select:none}i{background:currentColor;border-radius:50%;height:100%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible;width:100%}`)],m);var v=m;export{m as Button,v as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/button/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Button","GlobalStyle","constructor","this","plain","disabled","active","round","render","html","attr","observedRecord","htmlSlot","content","blur","super","connectedCallback","events","add","_handelClick","e","stopPropagation","preventDefault","_handleModal","modal","document","createElement","width","height","getBoundingClientRect","x","y","_root","size","sqrt","style","left","top","_modalRoot","appendChild","animate","opacity","transform","offset","duration","iterations","addEventListener","remove","once","property","type","Boolean","reflect","prototype","__decorate","queryPart","godown","styles","css","cssGlobalVars","primaryBackground","ringWidth","primaryForeground","Button$1"],"mappings":"iTAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/button/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Button","GlobalStyle","constructor","this","plain","disabled","active","round","render","html","attr","observedRecord","htmlSlot","content","blur","super","connectedCallback","events","add","_handelClick","e","stopPropagation","preventDefault","_handleModal","modal","document","createElement","width","height","getBoundingClientRect","x","y","_root","size","sqrt","style","left","top","_modalRoot","appendChild","animate","opacity","transform","offset","duration","iterations","addEventListener","remove","once","property","type","Boolean","reflect","prototype","__decorate","queryPart","godown","styles","css","cssGlobalVars","primaryBackground","ringWidth","primaryForeground","Button$1"],"mappings":"iTAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GA0E7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAKEC,KAAKC,OAAG,EAMRD,KAAQE,UAAG,EAMXF,KAAMG,QAAG,EAMTH,KAAKI,OAAG,EAaE,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAP,KAAAQ,oBAAAC,EAAA,GAAAT,KAAAU,0DAGLV,KAAKE,yCAMb,IAAAS,GAEKX,KAAAG,QAAA,EACHS,MAAQD,2BAGRC,MAAKC,oBACLb,KAAKc,OAAMC,IAAEf,KAAA,QAAAA,KAAAgB,cAGf,YAAAA,CAAIC,GACF,GAAIjB,KAACE,SAIU,OAHVe,EAACC,uBACRD,EAAAE,iBAIOnB,KAAAC,OACPD,KAAAoB,aAAAH,EAGE,cACmBA,SACfI,EAAcC,SAAEC,cAAA,MACXC,MAAAA,EAAAC,OAAAA,GAAAzB,KAAA0B,yBACTC,EAAAA,EAAAC,EAAAA,GAAA5B,KAAA6B,MAAAH,wBACKI,EAAY,OAAAC,KAAAN,GAAA,EAAAD,GAAA,GAAP,KACRH,EAAAW,MAAKP,OAAYK,EACnBT,EAAAW,MAAAR,MAAAM,EACFT,EAAAW,MAAAC,KAAAhB,EAAAU,EAAAA,EAAA,KAEUN,EAAAW,MAA0BE,IAAAjB,EAAAW,EAAAA,EAAA,KAClC5B,KAAMmC,WAAgBC,eAcpBf,EAAAgB,QAbmB,CACrB,4CAEWC,QAAO,IAElB,CACMC,UAAY,iCACHC,OAAC,IAEd,CACEF,QAAS,IAGX,CACEG,SAAA,IACAC,WAAQ,IAEVrB,EAAAsB,iBAAA,gBAAA,IAAAtB,EAAAuB,UAAA,CAAAC,MAAA,GACE,KAEH,CACDC,EAAK,CAACC,KAAOC,QAACC,SAAW,KACvBpD,EAAAqD,uBAAa,GACbC,EAAA,CACDL,EAAC,CAAAC,KAAAC,QAAAC,SAAA,KACFpD,EAAAqD,UAAsB,qBACxB,CACDJ,EAAA,CAAAC,KAAAC,QAAAC,SAAA,KArGCpD,EAAAqD,UAAA,cAAA,KADS,CACKJ,EAAA,CAAAC,KAAAC,QAAAC,SAAA,KAMdpD,EAAAqD,UAAA,aAAA,KADS,CACQJ,KAMjBjD,EAAAqD,UAAA,eAAA,KADS,CACME,EAAA,eAMfvD,EAAAqD,UAAA,kBAAA,KADS,CACKE,EAAA,SAMdvD,EAAAqD,UAAA,aAAA,GADCrD,EAAAsD,EAAU,CACKE,EAAA3D,GAGN4D,EAAAC,CAAA,sDAAA5D,+IAAAA,sBAAAA,wBAAA4D,CAAA,SAAA5D,oCAAAA,sBAAAA,+BAAA6D,EAAAC,yDAAAD,EAAAE,wBAAAF,EAAAG,udAAwB,IAAAC,EAAA/D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/card/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;AAEzF,OAAO,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/card/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;AAEzF,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAKvF;;;;;;;;;;GAUG;AACH,cA2BM,IAAK,SAAQ,WAAW;;IAO5B,QAAQ,EAAE,QAAQ,CAAY;IAE9B;;OAEG;IAEH,MAAM,UAAS;IAEf;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAUtC;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as r}from"tslib";import{godown as o,styles as t,StyleController as e,attr as i,htmlSlot as d}from"@godown/element";import{css as a,html as n}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as s,cssGlobalVars as l,GlobalStyle as m}from"../../internal/global-style.js";import{RingBuilder as
|
1
|
+
import{__decorate as r}from"tslib";import{godown as o,styles as t,StyleController as e,attr as i,htmlSlot as d}from"@godown/element";import{css as a,html as n}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as s,cssGlobalVars as l,GlobalStyle as m}from"../../internal/global-style.js";import{ringTypeAttribute as h,RingBuilder as f}from"../../internal/ring.js";const g="card",c=s(g);let y=class Card extends m{constructor(){super(),this.ringType="border",this.footer=!1,this.header=!1,new e(this,(()=>new f({type:this.ringType}).css))}render(){return n`<div part="root" ${i(this.observedRecord)}> ${[this.header?d("header"):"",d(),this.footer?d("footer"):""]} </div>`}};r([p({attribute:h})],y.prototype,"ringType",void 0),r([p({type:Boolean})],y.prototype,"footer",void 0),r([p({type:Boolean})],y.prototype,"header",void 0),y=r([o(g),t(a`:host{${c}--padding:.75em;background:var(${l.background});color:var(${l.foreground});display:block;flex-shrink:0}slot{display:block;padding:var(${c}--padding)}[part=root]{border-radius:inherit}[name=footer]{padding-top:0}[name=header]{padding-bottom:0}`)],y);var b=y;export{y as Card,b as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/card/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Card","GlobalStyle","constructor","super","this","ringType","footer","header","StyleController","RingBuilder","type","css","render","html","attr","observedRecord","htmlSlot","__decorate","prototype","Boolean","property","godown","styles","cssGlobalVars","background","Card$1"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/card/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Card","GlobalStyle","constructor","super","this","ringType","footer","header","StyleController","RingBuilder","type","css","render","html","attr","observedRecord","htmlSlot","__decorate","prototype","Boolean","property","godown","styles","cssGlobalVars","background","foreground","Card$1"],"mappings":"mYAQA,MAAMA,EAAY,OACZC,EAAWC,EAAYF,GAwC7B,IAAMG,EAAN,MAAMA,aAAaC,EACjB,WAAAC,GACEC,QAKFC,KAAQC,SAAa,SAMrBD,KAAME,QAAG,EAMTF,KAAMG,QAAG,EAhBP,IAAIC,EAAgBJ,MAAM,IAAM,IAAIK,EAAY,CAAEC,KAAMN,KAAKC,WAAYM,MAkBjE,MAAAC,GACR,OAAOC,CAAI,oBAAAC,EAAAV,KAAAW,oBAAA,CAAAX,KAAAG,OAAAS,EAAA,UAAA,GAAAA,IAAAZ,KAAAE,OAAAU,EAAA,UAAA,eAGLC,EAAA,mBAEAjB,EAAAkB,UAAY,gBAAG,QAEpB,CAAAR,KAAAS,aACHD,UAAA,cAAA,KACD,CAxBCE,EAAA,CAAAV,KAAAS,WADCnB,EAAAkB,UAAW,cAAW,GACOlB,EAAAiB,EAAA,CAM9BI,EAAAxB,GADCyB,EAAAX,CAAW,SAAMb,mCAASyB,EAAAC,yBAAAD,EAAAE,0EAAA3B,8GACZE,GAMf,IAAA0B,EAAA1B"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { type TemplateResult } from "lit";
|
2
2
|
import { GlobalStyle } from "../../internal/global-style.js";
|
3
|
-
import type { DirectionCorner } from "../../internal/direction.js";
|
4
3
|
/**
|
5
4
|
* {@linkcode Chip} renders a chip.
|
6
5
|
*
|
@@ -10,9 +9,8 @@ import type { DirectionCorner } from "../../internal/direction.js";
|
|
10
9
|
declare class Chip extends GlobalStyle {
|
11
10
|
/**
|
12
11
|
* The position of the chip relative to its parent element.
|
13
|
-
* Possible values are `"top-left"`, `"top-right"`, `"bottom-left"`, and `"bottom-right"`.
|
14
12
|
*/
|
15
|
-
position:
|
13
|
+
position: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
16
14
|
value: number;
|
17
15
|
/**
|
18
16
|
* If `true`, render a dot chip.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/chip/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/chip/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,gCAAgC,CAAC;AAKzF;;;;;GAKG;AACH,cAoDM,IAAK,SAAQ,WAAW;IAC5B;;OAEG;IAEH,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAe;IAGlF,KAAK,SAAK;IAEV;;OAEG;IAEH,GAAG,UAAS;IAEZ;;;OAGG;IAEH,GAAG,SAAM;IAET,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAe5B;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/chip/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Chip","GlobalStyle","constructor","this","position","value","dot","max","formatValue","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Number","prototype","Boolean","godown","styles","css","cssGlobalVars","primaryBackground","primaryForeground","Chip$1"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/chip/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Chip","GlobalStyle","constructor","this","position","value","dot","max","formatValue","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Number","prototype","Boolean","godown","styles","css","cssGlobalVars","primaryBackground","primaryForeground","Chip$1"],"mappings":"kSAMA,MAAMA,EAAY,OACZC,EAAWC,EAAYF,GA4D7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAQC,SAA8D,YAGtED,KAAKE,MAAG,EAMRF,KAAGG,KAAG,EAONH,KAAGI,IAAG,GAEN,WAAAC,CAAYH,GACV,OAAOA,EAAQF,KAAKI,IAAMJ,KAAKI,IAAM,IAAMF,EAAQ,GAGrD,MAAAI,GACE,OAAOC,CAAI,oBAAAC,EAAAR,KAAAS,oBAAAC,OAAAV,KAAAE,OAAAF,KAAAG,qFAGL,GAEAQ,EAAA,CACAC,iBACM,gBAAA,GACiBD,EAAA,CACpBC,EAAA,CAAAC,KAAAC,UACHjB,EAAAkB,UAAI,aAAA,QAET,CAAAF,KAAAG,aACHD,UAAA,WAAA,KACD,CArCCH,EAAA,CAAAC,KAAAC,UADCjB,EAAAkB,UAAU,WAAA,GACuElB,EAAAc,EAAA,CAGlFM,EAAAvB,GADCwB,EAAAC,CAAW,SAAMxB,gBAAQA,mBAAAA,cAAAA,mBAAAA,gIAAAyB,EAAAC,iEAAAD,EAAAE,2QAAA3B,oEAAAA,oEAAAA,4DAAAA,mBAChBE,GAMV,IAAA0B,EAAA1B"}
|
@@ -1,27 +1,23 @@
|
|
1
|
-
import { type TemplateResult } from "lit";
|
2
|
-
import
|
1
|
+
import { type PropertyValueMap, type TemplateResult } from "lit";
|
2
|
+
import GlobalStyle from "../../internal/global-style.js";
|
3
3
|
/**
|
4
4
|
* {@linkcode Details} similar to `<details>`.
|
5
5
|
*
|
6
|
-
* @slot summary - Details summary
|
6
|
+
* @slot summary - Details summary (trigger).
|
7
7
|
* @slot - Details content.
|
8
8
|
* @fires change - Fires when the open changes.
|
9
9
|
* @category display
|
10
10
|
*/
|
11
|
-
declare class Details extends
|
12
|
-
|
13
|
-
* Determines whether the details component should float.
|
14
|
-
*/
|
11
|
+
declare class Details extends GlobalStyle {
|
12
|
+
open: boolean;
|
15
13
|
float: boolean;
|
16
|
-
/**
|
17
|
-
* Determines whether the details component should fill the available space.
|
18
|
-
*/
|
19
14
|
fill: boolean;
|
20
|
-
/**
|
21
|
-
* The summary text to display in the details component.
|
22
|
-
*/
|
23
15
|
summary: string;
|
24
16
|
protected render(): TemplateResult<1>;
|
17
|
+
protected updated(changedProperties: PropertyValueMap<this>): void;
|
18
|
+
toggle(to?: boolean): void;
|
19
|
+
close(): void;
|
20
|
+
show(): void;
|
25
21
|
}
|
26
22
|
export default Details;
|
27
23
|
export { Details };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/details/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/details/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG5E,OAAO,WAA4B,MAAM,gCAAgC,CAAC;AAM1E;;;;;;;GAOG;AACH,cAwDM,OAAQ,SAAQ,WAAW;IAE/B,IAAI,UAAS;IAGb,KAAK,UAAS;IAGd,IAAI,UAAS;IAGb,OAAO,SAAM;IAEb,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAuBrC,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAOlE,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI;IAI1B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;CAGb;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{godown as
|
1
|
+
import{__decorate as t}from"tslib";import{godown as o,styles as e,attr as i,htmlSlot as r}from"@godown/element";import s from"../../internal/icons/caret-down.js";import{css as a,html as n}from"lit";import{property as l}from"lit/decorators.js";import{scopePrefix as p,GlobalStyle as d}from"../../internal/global-style.js";const c="details",m=p(c);let h=class Details extends d{constructor(){super(...arguments),this.open=!1,this.float=!1,this.fill=!1,this.summary=""}render(){return n`<dl part="root" ${i(this.observedRecord)}> <dt part="title" @click="${()=>this.toggle()}"> <span part="summary">${r("summary",this.summary)}</span> <span part="icon">${r("icon",s())}</span> </dt> <dd part="details" @click=${this.fill?()=>this.toggle():null}> <div style="min-height: 0;">${r()}</div> </dd> </dl>`}updated(t){const o=t.get("open");void 0!==o&&this.dispatchCustomEvent("change",o)}toggle(t){this.open=t??!this.open}close(){this.open=!1}show(){this.open=!0}};t([l({type:Boolean,reflect:!0})],h.prototype,"open",void 0),t([l({type:Boolean})],h.prototype,"float",void 0),t([l({type:Boolean})],h.prototype,"fill",void 0),t([l()],h.prototype,"summary",void 0),h=t([o(c),e(a`:host{${m}--icon-deg-open:0deg;${m}--icon-deg-close:90deg;display:block;transition:.3s}[part=root]{position:relative}[part=title]{align-items:center;direction:ltr;grid-template-columns:auto auto;height:100%;justify-content:space-between}[part=details],[part=title]{display:grid;overflow:hidden;transition:inherit}[part=details]{grid-template-rows:0fr}:host([open]) [part=details]{grid-template-rows:1fr}[float] [part=details]{position:absolute;top:100%;width:100%}[part]{transition:inherit;transition-property:transform,grid-template-rows}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;transform:rotate(var(${m}--icon-deg-close))}:host([open]) [part=icon]{transform:rotate(var(${m}--icon-deg-open))}`)],h);var f=h;export{h as Details,f as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/details/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Details","
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/details/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Details","GlobalStyle","constructor","this","open","float","fill","summary","render","html","attr","observedRecord","toggle","htmlSlot","svgCaretDown","changedProperties","get","to","show","type","Boolean","reflect","prototype","__decorate","godown","styles","css","Details$1"],"mappings":"iUAOA,MAAMA,EAAY,UAEZC,EAAWC,EAAYF,GAkE7B,IAAMG,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAEEC,KAAIC,MAAG,EAGPD,KAAKE,OAAG,EAGRF,KAAIG,MAAG,EAGPH,KAAOI,QAAG,GAEA,MAAAC,GACR,OAAOC,CAAI,mBAAAC,EAAAP,KAAAQ,6CAAA,IAAAR,KAAAS,mCAAAC,EAAA,UAAAV,KAAAI,qCAAAM,EAAA,OAAAC,+CAAAX,KAAAG,KAAA,IAAAH,KAAAS,SAAA,qCAAAC,mCAGL,MAAIT,EAAMW,EAAeC,IAAA,wDAIf,WAEab,KAAAC,KAAAa,IAAAd,KAAAC,IACH,sBAIX,IAAAc,eAEqB,QAGnC,CAAAC,KAAAC,QAAAC,SAAA,OACHC,UAAA,YAAA,GAEUC,EAAO,GACT,CAAAJ,KAAOC,WACbpB,EAAAsB,UAAsB,aAAA,GACpBC,EAAA,GACF,CAAAJ,KAAAC,aACFE,UAAA,YAAA,GAEAC,EAAO,QAEPD,UAAA,eAAA,KAEKC,EAAA,CACHC,EAAA3B,GACF4B,EAAAC,CAAA,SAAA5B,yBAAAA,wmBAAAA,sEAAAA,2BAGE,IAAA6B,EAAK3B"}
|
@@ -1,26 +1,23 @@
|
|
1
1
|
import { type HandlerEvent } from "@godown/element";
|
2
2
|
import { type PropertyValues, type TemplateResult } from "lit";
|
3
|
-
import
|
3
|
+
import GlobalStyle from "../../internal/global-style.js";
|
4
4
|
/**
|
5
5
|
* {@linkcode Dialog} similar to `<dialog>`.
|
6
6
|
*
|
7
7
|
* Like dialog, it listens for submit events and closes itself when the target method is "dialog".
|
8
8
|
*
|
9
|
-
*
|
9
|
+
* Previous versions of Dialog did not contain triggers.
|
10
|
+
* Therefore, unlike Tooltip which uses the default slot as the trigger.
|
11
|
+
* Dialog needs to use slot="trigger" as the trigger instead of an element without a slot name.
|
10
12
|
*
|
11
13
|
* @fires change - Fires when the open changes.
|
14
|
+
* @slot trigger - The trigger element.
|
15
|
+
* @slot - The dialog content.
|
12
16
|
* @category feedback
|
13
17
|
*/
|
14
|
-
declare class Dialog extends
|
15
|
-
|
16
|
-
|
17
|
-
*/
|
18
|
-
set modal(value: boolean);
|
19
|
-
get modal(): boolean;
|
20
|
-
/**
|
21
|
-
* The keys will close the dialog when pressed.
|
22
|
-
*/
|
23
|
-
key: string;
|
18
|
+
declare class Dialog extends GlobalStyle {
|
19
|
+
open: boolean;
|
20
|
+
modal: boolean;
|
24
21
|
/**
|
25
22
|
* Indicates whether the modal has been invoked.
|
26
23
|
*/
|
@@ -28,13 +25,14 @@ declare class Dialog extends SuperOpenable {
|
|
28
25
|
protected _dialog: HTMLDialogElement;
|
29
26
|
protected render(): TemplateResult<1>;
|
30
27
|
showModal(): void;
|
31
|
-
|
28
|
+
show(): void;
|
29
|
+
close(): void;
|
30
|
+
toggle(to?: boolean): void;
|
32
31
|
private __submitEvent;
|
33
32
|
private __keydownEvent;
|
34
33
|
protected updated(changedProperties: PropertyValues): void;
|
35
34
|
protected _handleKeydown(e: KeyboardEvent): void;
|
36
35
|
protected _handelSubmit(e: HandlerEvent<HTMLFormElement>): void;
|
37
|
-
close(): void;
|
38
36
|
}
|
39
37
|
export default Dialog;
|
40
38
|
export { Dialog };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/dialog/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/dialog/component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuC,MAAM,iBAAiB,CAAC;AACzF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAG1E,OAAO,WAA4B,MAAM,gCAAgC,CAAC;AAK1E;;;;;;;;;;;;;GAaG;AACH,cAyBM,MAAO,SAAQ,WAAW;IAE9B,IAAI,UAAS;IAGb,KAAK,UAAS;IAEd;;OAEG;IACH,OAAO,CAAC,aAAa,CAAS;IAG9B,SAAS,CAAC,OAAO,EAAE,iBAAiB,CAAC;IAErC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAiBrC,SAAS,IAAI,IAAI;IAMjB,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,IAAI;IAI1B,OAAO,CAAC,aAAa,CAAqC;IAC1D,OAAO,CAAC,cAAc,CAAqC;IAE3D,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAuB1D,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI;IAOhD,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,IAAI;CAMhE;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as
|
1
|
+
import{__decorate as o}from"tslib";import{queryPart as t,godown as e,styles as i,htmlSlot as s}from"@godown/element";import{css as d,html as a}from"lit";import{property as n}from"lit/decorators.js";import{scopePrefix as l,GlobalStyle as r}from"../../internal/global-style.js";const h="dialog",m=l(h);let p=class Dialog extends r{constructor(){super(...arguments),this.open=!1,this.modal=!1,this.__modalInvoke=!1}render(){return a`<div part="root" @click=${this.show}> ${s("trigger")} </div> <dialog part="dialog" role="dialog"> ${s("dialog")}${s()} </dialog>`}showModal(){this.modal=!0,this.__modalInvoke=!0,this.show()}show(){this.open=!0}close(){this.open=!1}toggle(o){this.open=o??!this.open}updated(o){o.has("open")&&(this.open?(this.modal?this._dialog.showModal():this._dialog.show(),this.__submitEvent=this.events.add(this,"submit",this._handelSubmit),this.__keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this))):(this.__modalInvoke&&(this.modal=!1,this.__modalInvoke=!1),this._dialog.close(),this.events.remove(this,"submit",this.__submitEvent),this.events.remove(document,"keydown",this.__keydownEvent)))}_handleKeydown(o){"Escape"===o.key&&(o.preventDefault(),this.close())}_handelSubmit(o){"dialog"===o.target.method&&(o.preventDefault(),this.close())}};o([n({type:Boolean,reflect:!0})],p.prototype,"open",void 0),o([n({type:Boolean,reflect:!0})],p.prototype,"modal",void 0),o([t("dialog")],p.prototype,"_dialog",void 0),p=o([e(h),i(d`:host{${m}--background-modal:#000;${m}--opacity-modal:0.2;background:none;display:block;width:-moz-fit-content;width:fit-content}dialog{background:none;left:50%;position:relative;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:1}::backdrop{background:var(${m}--background-modal);opacity:var(${m}--opacity-modal)}`)],p);var c=p;export{p as Dialog,c as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/dialog/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/dialog/component.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Dialog","GlobalStyle","constructor","this","open","modal","__modalInvoke","render","html","show","htmlSlot","to","updated","changedProperties","has","_dialog","showModal","__submitEvent","events","add","_handelSubmit","__keydownEvent","document","_handleKeydown","bind","close","remove","e","key","target","method","preventDefault","__decorate","property","type","Boolean","reflect","prototype","styles","css","Dialog$1"],"mappings":"oRAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAyC7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAEEC,KAAIC,MAAG,EAGPD,KAAKE,OAAG,EAKAF,KAAaG,eAAG,EAKd,MAAAC,GACR,OAAOC,CAAI,2BAAAL,KAAAM,SAAAC,EAAA,0DAAAA,EAAA,YAAAA,4BAGEP,KAAAE,OAAI,6BAEHI,mCAMRN,KAAAC,MAAS,SAEdO,GACHR,KAAAC,KAAAO,IAAAR,KAAAC,KAGE,OAAAQ,CAAIC,GACAA,EAAiBC,IAAI,UAChBX,KAAEC,MACbD,KAAAE,MAEIF,KAAAY,QAAAC,YAICb,KAAAY,QAAAN,OAELN,KAAAc,cAAAd,KAAAe,OAAAC,IAAAhB,KAAA,SAAAA,KAAAiB,eAEmBjB,KAAAkB,eAAAlB,KAAAe,OAAAC,IAAAG,SAAA,UAAAnB,KAAAoB,eAAAC,KAAArB,SAOgCA,KAAAG,4BACxB,EACfH,KAAKG,eAAE,GAEXH,KAAAY,QAAKU,QACPtB,KAAAe,OAAAQ,OAAAvB,KAAA,SAAAA,KAAAc,oBAAOC,OAAAQ,OAAAJ,SAAA,UAAAnB,KAAAkB,iBAGP,gBAEIM,GACN,WAAAA,EAAAC,yBACEzB,KAAAsB,QAEE,eACFE,GACa,WAAbA,EAAAE,OAAKC,SACLH,EAAAI,iBACA5B,KAAAsB,WAKIO,EAAA,CACRC,EAAK,CAACC,KAAQC,QAAQC,SAAE,iBACN,YAAA,QAElB,CAAAF,KAAAC,QAAAC,SAAA,OACFC,UAAA,aAAA,GAEUL,EAAA,GACF,uBACY,eAAE,OACR,GACZnC,GACFyC,EAAAC,CAAA,SAAAzC,4BAAAA,2OAAAA,oCAAAA,uBACDE,GAvFC,IAAAwC,EAAAxC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/heading/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAIxC;;;;;;;GAOG;AACH,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/heading/component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAG9D,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAIxC;;;;;;;GAOG;AACH,cAgCM,OAAQ,SAAQ,IAAI;IACxB;;OAEG;IAEH,EAAE,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAQ;IAEnD;;;;OAIG;IAEH,MAAM,SAAO;IAEb;;OAEG;IAEH,IAAI,EAAE,MAAM,GAAG,OAAO,CAAU;IAEhC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAmBrC,SAAS,CAAC,WAAW,CAAC,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;CA4B7D;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{godown as r,styles as
|
1
|
+
import{__decorate as t}from"tslib";import{godown as r,styles as h,htmlSlot as i,tokenList as e}from"@godown/element";import{css as o,nothing as a,html as s}from"lit";import{property as n}from"lit/decorators.js";import p from"../link/component.js";let c=class Heading extends p{constructor(){super(...arguments),this.as="h1",this.anchor="#",this.side="left"}render(){const t=this.href||(this.id?"#"+this.id:void 0);return s`<a part="root" href="${t||a}"> ${this.wrapHeading(i(),t?s`<i part="${e("anchor",this.side)}">${this.anchor}</i>`:"")} </a>`}wrapHeading(...t){switch(this.as){case"h2":return s`<h2>${t}</h2>`;case"h3":return s`<h3>${t}</h3>`;case"h4":return s`<h4>${t}</h4>`;case"h5":return s`<h5>${t}</h5>`;case"h6":return s`<h6>${t}</h6>`;default:return s`<h1>${t}</h1>`}}};t([n()],c.prototype,"as",void 0),t([n()],c.prototype,"anchor",void 0),t([n()],c.prototype,"side",void 0),c=t([r("heading"),h(o`:host{display:block;text-align:start}[part~=anchor]{min-width:1.25em;position:absolute;right:100%;text-align:center}[part~=left][part~=anchor]{right:100%}[part~=right][part~=anchor]{left:100%}h1,h2,h3,h4,h5,h6{position:relative;width:-moz-fit-content;width:fit-content}`)],c);var d=c;export{c as Heading,d as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/heading/component.ts"],"sourcesContent":null,"names":["Heading","Link","constructor","this","as","anchor","side","render","hrefValue","href","id","undefined","html","nothing","wrapHeading","htmlSlot","children","prototype","__decorate","property","godown","styles","css"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/heading/component.ts"],"sourcesContent":null,"names":["Heading","Link","constructor","this","as","anchor","side","render","hrefValue","href","id","undefined","html","nothing","wrapHeading","htmlSlot","children","prototype","__decorate","property","godown","styles","css"],"mappings":"uPAgDA,IAAMA,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAEC,GAA4C,KAQ9CD,KAAME,OAAG,IAMTF,KAAIG,KAAqB,OAEf,MAAAC,GACR,MAAMC,EAAYL,KAAKM,OAASN,KAAKO,GAAK,IAAMP,KAAKO,QAAKC,GAC1D,OAAOC,CAAI,wBAAAJ,GAAAK,OAAAV,KAAAW,YAAAC,IAAAP,qEAGC,mBAEN,OAAgBL,KAAAC,IAGd,iBACwB,OAAAY,SACrB,IAAA,KACC,OACPJ,CAAA,OAAAI,kBAEJ,OAAAJ,CAAA,OAAAI,SACH,IAAA,KAEsB,OAAkBJ,CAAA,OAAAI,SACtC,IAAY,KACV,OAASJ,CAAA,OAAAI,SACP,QACQ,OAAQJ,CAAA,OAAAI,SAElB,WAIAhB,EAAAiB,UAAS,UAAA,GACPC,EAAA,QAECD,UAAA,cAAA,GACHC,EAAA,CACEC,iBACgB,YAAA,KACfD,EAAA,CACHE,EApGY,WAqGVC,EAAAC,CAAA,2RAECtB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/input/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,KAAK,SAAS,GACV,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,CAAC;AAIZ;;;;;;GAMG;AACH,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/input/component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,KAAK,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D,KAAK,SAAS,GACV,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,UAAU,GACV,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,CAAC;AAIZ;;;;;;GAMG;AACH,cA6CM,KAAM,SAAQ,UAAU;IAE5B,IAAI,EAAE,SAAS,CAAU;IAEzB,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IAEH,OAAO,EAAE,SAAS,GAAG,SAAS,CAAa;IAG3C,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAAC;;IAYnC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IA4BrC,SAAS,CAAC,aAAa,IAAI,cAAc,CAAC,CAAC,CAAC;IAiB5C,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI;CAKtD;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{queryPart as e,godown as i,styles as r,StyleController as o,attr as n,htmlSlot as s}from"@godown/element";import p from"../../internal/icons/eye-slash.js";import{css as a,nothing as l,html as u}from"lit";import{property as
|
1
|
+
import{__decorate as t}from"tslib";import{queryPart as e,godown as i,styles as r,StyleController as o,attr as n,htmlSlot as s}from"@godown/element";import p from"../../internal/icons/eye-slash.js";import{css as a,nothing as l,html as u}from"lit";import{property as h}from"lit/decorators.js";import{cssGlobalVars as c}from"../../internal/global-style.js";import{SuperInput as f}from"../../internal/super-input.js";import{RingBuilder as d}from"../../internal/ring.js";let m=class Input extends f{constructor(){super(),this.type="text",this.variant="default",new o(this,(()=>new d({type:this.ringType}).css+("outline"===this.variant?`:host{${c.ringColor}:currentColor}`:"")))}render(){return u`<label part="root" ${n(this.observedRecord)}> ${[this._renderPrefix(),u`<input part="input" type="${this.type}" .value="${this.value}" ?autofocus="${this.autofocus}" ?disabled="${this.disabled}" autocapitalize="${this.autocapitalize||l}" autocomplete="${this.autocomplete||l}" placeholder="${this.placeholder||l}" @input="${this._handleInput}" @change="${this._handleChange}"/>`,this._renderSuffix()]} </label>`}_renderSuffix(){const t="password";return this.type===t?u`<i part="suffix" @mousedown="${()=>this._changeInputType("text")}" @mouseup="${()=>this._changeInputType(t)}" @mouseleave="${()=>this._changeInputType(t)}"> ${s("suffix",p())} </i>`:super._renderSuffix()}_changeInputType(t){this._input&&(this._input.type=t)}};t([h({reflect:!0})],m.prototype,"type",void 0),t([h()],m.prototype,"variant",void 0),t([e("input")],m.prototype,"_input",void 0),m=t([i("input"),r(a`:host{display:block;${c.input}-space:0.2em;${c.input}-icon-color:grey}:host(:active),:host(:focus-within){${c.ringColor}:currentColor;${c.input}-icon-color:currentColor}[part=root]{align-items:center;border-radius:inherit;display:flex;padding:.4em .5em;position:relative}[part=input]{flex-grow:1;height:100%;width:100%}[part=prefix],[part=suffix]{align-items:center;color:var(${c.input}-icon-color);display:flex;height:100%;justify-content:center}[part=suffix] slot svg{margin-inline-start:var(${c.input}-space)}[part=prefix] slot svg{margin-inline-end:var(${c.input}-space)}`)],m);var g=m;export{m as Input,g as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/input/component.ts"],"sourcesContent":null,"names":["Input","SuperInput","constructor","super","this","type","variant","StyleController","RingBuilder","ringType","css","cssGlobalVars","ringColor","render","html","attr","observedRecord","_renderSuffix","PASSWORD","_changeInputType","t","property","reflect","__decorate","prototype","queryPart","godown","Input$1"],"mappings":"
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/input/component.ts"],"sourcesContent":null,"names":["Input","SuperInput","constructor","super","this","type","variant","StyleController","RingBuilder","ringType","css","cssGlobalVars","ringColor","render","html","attr","observedRecord","_renderSuffix","PASSWORD","_changeInputType","t","property","reflect","__decorate","prototype","queryPart","godown","Input$1"],"mappings":"kdAkFA,IAAMA,EAAN,MAAMA,cAAcC,EAelB,WAAAC,GACEC,QAdFC,KAAIC,KAAc,OAQlBD,KAAOE,QAA0B,UAO/B,IAAIC,EACFH,MACA,IACE,IAAII,EAAY,CAAEH,KAAMD,KAAKK,WAAYC,KACvB,YAAjBN,KAAKE,QAAwB,SAASK,EAAcC,0BAA4B,MAI7E,MAAAC,GACR,OAAOC,CAAI,sBAAAC,EAAAX,KAAAY,oBAAA,2UAGLZ,KAAKa,2BAEL,iBAEA,MAAAC,EAAI,wNAIUf,MAAAc,eACI,CACD,gBAAAE,CAAAC,kCAEOA,EAEV,MAGbC,EAAA,CAAAC,SAAA,gCAEFC,EAAA,QAEJC,UAAA,eAAA,KACH,CAEUC,EAAa,YACfD,UAAA,cAAW,GACjBxB,EAAAuB,EAAS,CACPG,EA9GY,mlBAiHM,IAAAC,EAAA3B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/link/component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAIzD,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/link/component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC9D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAIzD,QAAA,MAAM,SAAS;;;;;CAKL,CAAC;AAEX,KAAK,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAeM,IAAK,SAAQ,WAAW;IAC5B;;;;;;OAMG;IAEH,IAAI,EAAE,QAAQ,CAAkB;IAEhC;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,OAAO,UAAS;IAEhB;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,MAAM,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAW;IAE1D;;OAEG;IACH,KAAK,KAAM;IAEX,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IA6B3C,WAAW,EAAE,MAAM,IAAI,CAcrB;IAEF,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAatC;AAED,eAAe,IAAI,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{godown as e,styles as r,attr as
|
1
|
+
import{__decorate as t}from"tslib";import{godown as e,styles as r,attr as s,htmlSlot as o}from"@godown/element";import{property as a}from"lit/decorators.js";import i from"../router/component.js";import{css as h,nothing as p,html as n}from"lit";import{GlobalStyle as l}from"../../internal/global-style.js";const c="push",d="replace",f="normal",m="auto";let u=class Link extends l{constructor(){super(...arguments),this.type=m,this.suppress=!1,this.replace=!1,this.target="_self",this.state={},this.handleState=()=>{switch(this.type){case m:case c:if(!this.replace){history.pushState(this.state,"",this.href);break}case d:history.replaceState(this.state,"",this.href)}}}get pathname(){return new URL(this.href,location.href).pathname}_handleClick(t){const{state:e,type:r,href:s,pathname:o,suppress:a}=this;if(!s)return;if(this.dispatchCustomEvent("navigate",{...this.observedRecord,pathname:o,state:e}),s.startsWith("#")||r===f)return;this.handleState();const h=[...i.routerInstances];a||r===m&&!h.some((t=>t.search(location.pathname)))||(t.preventDefault(),i.routerInstances.forEach((t=>{t.handlePopstate()})))}render(){return n`<a part="root" ${s(this.observedRecord)} href="${this.href||p}" target="${this.target}" @click=${this._handleClick}> ${o()} </a>`}};t([a()],u.prototype,"type",void 0),t([a({type:Boolean})],u.prototype,"suppress",void 0),t([a({type:Boolean})],u.prototype,"replace",void 0),t([a()],u.prototype,"href",void 0),t([a()],u.prototype,"target",void 0),u=t([e("link"),r(h`:host{cursor:default;display:inline-block}:host([href]){cursor:pointer}a{display:contents}`)],u);var y=u;export{u as Link,y as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../src/web-components/link/component.ts"],"sourcesContent":null,"names":["linkTypes","Link","GlobalStyle","constructor","this","type","suppress","replace","target","state","handleState","history","pushState","href","replaceState","pathname","URL","location","_handleClick","e","dispatchCustomEvent","observedRecord","startsWith","routers","Router","routerInstances","some","i","search","preventDefault","forEach","handlePopstate","render","html","attr","nothing","htmlSlot","__decorate","prototype","Boolean","property","godown","styles","css","Link$1"],"mappings":"iTAOA,MAEMA,EACE,OADFA,EAEK,UAFLA,EAGI,SAHJA,EAIE,
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/link/component.ts"],"sourcesContent":null,"names":["linkTypes","Link","GlobalStyle","constructor","this","type","suppress","replace","target","state","handleState","history","pushState","href","replaceState","pathname","URL","location","_handleClick","e","dispatchCustomEvent","observedRecord","startsWith","routers","Router","routerInstances","some","i","search","preventDefault","forEach","handlePopstate","render","html","attr","nothing","htmlSlot","__decorate","prototype","Boolean","property","godown","styles","css","Link$1"],"mappings":"iTAOA,MAEMA,EACE,OADFA,EAEK,UAFLA,EAGI,SAHJA,EAIE,OAuCR,IAAMC,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBASEC,KAAAC,KAAiBL,EAMjBI,KAAQE,UAAG,EAMXF,KAAOG,SAAG,EAYVH,KAAMI,OAA4C,QAKlDJ,KAAKK,MAAG,CAAE,EAmCVL,KAAWM,YAAe,KACxB,OAAQN,KAAKC,MACX,KAAKL,EACL,KAAKA,EACH,IAAKI,KAAKG,QAAS,CAEjBI,QAAQC,UAAUR,KAAKK,MAAO,GAAIL,KAAKS,MACvC,MAGJ,KAAKb,EACHW,QAAQG,aAAaV,KAAKK,MAAO,GAAIL,KAAKS,QA5ChD,YAAIE,GACF,OAAO,IAAIC,IAAIZ,KAAKS,KAAMI,SAASJ,MAAME,SAGjC,YAAAG,CAAaC,GACrB,MAAMV,MAAEA,EAAKJ,KAAEA,EAAIQ,KAAEA,EAAIE,SAAEA,EAAQT,SAAEA,GAAaF,KAClD,IAAKS,EACH,OAOF,GALAT,KAAKgB,oBAAoB,WAAY,IAChChB,KAAKiB,eACRN,WACAN,UAEEI,EAAKS,WAAW,MAAQjB,IAASL,EACnC,OAEFI,KAAKM,cACL,MAAMa,EAAU,IAAIC,EAAOC,iBAGxBnB,GACAD,IAASL,IAERuB,EAAQG,MAAMC,GAAMA,EAAEC,OAAOX,SAASF,cAExCI,EAAEU,iBACFL,EAAOC,gBAAgBK,SAASH,IAC9BA,EAAEI,gBAAgB,KAqBd,MAAAC,GACR,OAAOC,CAAI,kBAAAC,EAAA9B,KAAAiB,yBAAAjB,KAAAS,MAAAsB,cAAA/B,KAAAI,kBAAAJ,KAAAc,iBAAAkB,aAGLC,EAAA,MAEQpC,EAAAqC,UAAA,YAAW,GACZD,EAAA,oBAEPpC,EAAAqC,UAAU,gBAAA,QAEf,CAAAjC,KAAAkC,aACHD,UAAA,eAAA,KACD,CA7FCE,KADCvC,EAAAqC,UAAU,YAAA,GACqBD,EAAA,CAMhCG,KADCvC,EAAAqC,UAAe,iBACCrC,EAAAoC,EAAA,CAMjBI,EAlEgB,QAiEfC,EAAAC,CAAW,+FACI1C,GAMhB,IAAA2C,EAAA3C"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import GlobalStyle from "../../internal/global-style.js";
|
2
|
+
import { type PropertyValues, type TemplateResult } from "lit";
|
3
|
+
/**
|
4
|
+
* {@link Popover} renders a popover.
|
5
|
+
*
|
6
|
+
* This requires the support of the popover API and CSS position-area.
|
7
|
+
*
|
8
|
+
* @fires toggle - Fired when the popover is toggled.
|
9
|
+
* @slot popover - Popover content.
|
10
|
+
* @slot - Popover trigger.
|
11
|
+
* @category display
|
12
|
+
*/
|
13
|
+
declare class Popover extends GlobalStyle {
|
14
|
+
anchorName: string;
|
15
|
+
open: boolean;
|
16
|
+
action: "hide" | "show" | "toggle" | "none";
|
17
|
+
span: "span" | "spread" | "isolated";
|
18
|
+
/**
|
19
|
+
* The position refers to the spatial location of the popover in relation to the trigger,
|
20
|
+
* rather than the alignment property between them.
|
21
|
+
*/
|
22
|
+
position: "center" | "left" | "left-top" | "left-bottom" | "right" | "right-top" | "right-bottom" | "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "start" | "start-start" | "start-end" | "end" | "end-start" | "end-end";
|
23
|
+
protected _popover: HTMLElement;
|
24
|
+
constructor();
|
25
|
+
protected render(): TemplateResult<1>;
|
26
|
+
protected _handleClick(): void;
|
27
|
+
show(): void;
|
28
|
+
hide(): void;
|
29
|
+
toggle(force?: boolean): void;
|
30
|
+
protected updated(_changedProperties: PropertyValues): void;
|
31
|
+
protected _openChange(): void;
|
32
|
+
resolveArea(): string;
|
33
|
+
}
|
34
|
+
export { Popover, Popover as default };
|
35
|
+
//# sourceMappingURL=component.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/popover/component.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAO1E;;;;;;;;;GASG;AACH,cAsBM,OAAQ,SAAQ,WAAW;IAC/B,UAAU,SAAyD;IAGnE,IAAI,UAAS;IAGb,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAU;IAGrD,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAU;IAE9C;;;OAGG;IAEH,QAAQ,EACJ,QAAQ,GACR,MAAM,GACN,UAAU,GACV,aAAa,GACb,OAAO,GACP,WAAW,GACX,cAAc,GACd,KAAK,GACL,UAAU,GACV,WAAW,GACX,QAAQ,GACR,aAAa,GACb,cAAc,GACd,OAAO,GACP,aAAa,GACb,WAAW,GACX,KAAK,GACL,WAAW,GACX,SAAS,CAAY;IAGzB,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC;;IAgBhC,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAmBrC,SAAS,CAAC,YAAY,IAAI,IAAI;IAU9B,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI;IAI7B,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;IAM3D,SAAS,CAAC,WAAW,IAAI,IAAI;IAiB7B,WAAW,IAAI,MAAM;CAStB;AAED,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{__decorate as o}from"tslib";import{property as t}from"lit/decorators.js";import{GlobalStyle as e}from"../../internal/global-style.js";import{css as i,html as s}from"lit";import{part as p,godown as r,styles as n,StyleController as a,joinRules as h,htmlSlot as l}from"@godown/element";import{showPopover as c,hidePopover as d}from"../../internal/popover.js";const v="popover",m=v;let g=class Popover extends e{constructor(){super(),this.anchorName=`--${v}-${Math.random().toString(36).slice(2)}`,this.open=!1,this.action="show",this.span="span",this.position="bottom",new a(this,(()=>h({"[part=root],slot:not([name])::slotted(*)":{"anchor-name":this.anchorName},"[part=popover]":{"position-anchor":this.anchorName,"position-area":this.resolveArea()}})))}render(){return s`<div part="root"> <div part="trigger" @click=${this._handleClick}> ${l()} </div> <div part="popover" popover="manual"> ${l("popover")} </div> </div>`}_handleClick(){const{action:o}=this;switch(o){case"show":case"hide":case"toggle":this[o]()}}show(){this.toggle(!0)}hide(){this.toggle(!1)}toggle(o){this.open=o??!this.open}updated(o){o.has("open")&&this._openChange()}_openChange(){const{open:o}=this;if(o){c.call(this,this._popover);const o=t=>{this.contains(t.target)||(this.events.remove(document,"click",o),this.open=!1)};this.events.add(document,"click",o)}else d(this._popover);this.dispatchCustomEvent("toggle",o)}resolveArea(){const o=this.position.split("-"),t="spread"===this.span?`span-${o[0]}`:o[0];if(o.length<2)return`${t} center`;return`${t} ${"isolated"===this.span?o[1]:`span-${o[1]}`}`}};o([t({type:Boolean,reflect:!0})],g.prototype,"open",void 0),o([t()],g.prototype,"action",void 0),o([t()],g.prototype,"span",void 0),o([t()],g.prototype,"position",void 0),o([p(v)],g.prototype,"_popover",void 0),g=o([r(m),n(i`:host{display:inline-block}[part=trigger]{display:contents}[part=root]{display:inherit}[part=popover]{inset:unset;overflow:visible;position:absolute;z-index:1;position-try-fallbacks:flip-block}`)],g);export{g as Popover,g as default};
|
2
|
+
//# sourceMappingURL=component.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../src/web-components/popover/component.ts"],"sourcesContent":null,"names":["POPOVER","protoName","Popover","GlobalStyle","constructor","super","this","anchorName","Math","random","toString","slice","open","action","span","position","StyleController","joinRules","resolveArea","render","html","_handleClick","htmlSlot","toggle","force","updated","_changedProperties","has","_openChange","showPopover","call","_popover","listener","e","contains","target","events","remove","document","add","hidePopover","dispatchCustomEvent","split","firstValue","length","property","type","Boolean","reflect","prototype","__decorate","part","godown","styles","css"],"mappings":"2WAMA,MAAMA,EAAU,UACVC,EAAYD,EAkClB,IAAME,EAAN,MAAMA,gBAAgBC,EAyCpB,WAAAC,GACEC,QAzCFC,KAAAC,WAAa,KAAKP,KAAWQ,KAAKC,SAASC,SAAS,IAAIC,MAAM,KAG9DL,KAAIM,MAAG,EAGPN,KAAMO,OAAwC,OAG9CP,KAAIQ,KAAmC,OAOvCR,KAAQS,SAmBQ,SAOd,IAAIC,EAAgBV,MAAM,IACjBW,EAAU,CACf,2CAA4C,CAC1C,cAAeX,KAAKC,YAEtB,iBAAkB,CAChB,kBAAmBD,KAAKC,WACxB,gBAAiBD,KAAKY,mBAKpB,MAAAC,GACR,OAAOC,CAAI,gDAAAd,KAAAe,iBAAAC,oDAAAA,EAAA,+DAII,OAAAT,cAEP,IAAA,2CAMQU,QAAA,UAGfjB,KAAAiB,QAAA,GAGO,MAAAA,CAAYC,GACpBlB,KAAAM,KAAQY,SAAeZ,KAErB,OAAAa,CAAAC,GACAA,EAAWC,IAAA,SACXrB,KAAKsB,cAGT,WAAAA,GAEI,MAAAhB,KAAAA,GAAAN,KACF,GAAIM,EAAC,CACPiB,EAAAC,KAAAxB,KAAAA,KAAAyB,UAEI,MAAAC,EAAAC,IACU3B,KAAM4B,SAAAD,EAAAE,UACpB7B,KAAA8B,OAAAC,OAAAC,SAAA,QAAAN,GAEsB1B,KAAAM,MAAA,IAIJN,KAAkC8B,OAAAG,IAAAD,SAAA,QAAAN,EAClD,MAEAQ,EAAAlC,KAAAyB,UAGmBzB,KAAAmC,oBAAA,SAAA7B,EACnB,qBAEa8B,EAAApC,cAAgBoC,MAAS,KACpCC,EAAuB,WAATrC,UAAS,QAAAoC,EAAA,KAAAA,EAAA,QACjBE,OAAc,WACZD,WAGR,MAAC,GAAAA,KADC,aAAArC,KAAAQ,KAAA4B,EAAA,GAAA,QAAAA,EAAA,YAIFG,EAAA,CAAAC,KAAAC,QAAiBC,SAAS,OAC5BC,UAAA,YAAA,GACAC,EAAA,CACFL,OAEWI,UAAA,cAAA,KACH,MAEN/C,EAAA+C,UAAU,YAAY,aAGhBA,UAAA,mBACNC,EAAA,CACFC,EAAAnD,IACDE,EAAA+C,UAAA,gBAAA,GA5HC/C,EAAAgD,EAAA,CADCE,EAAQnD,GACIoD,EAAAC,CAAA,sMAGbpD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"__source__/","sources":["web-components/popover/definition.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,eAAe,OAAO,CAAC;AAEvB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,OAAO,CAAC;KAC3B;CACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"definition.js","sources":["../../src/web-components/popover/definition.ts"],"sourcesContent":null,"names":["Popover","define"],"mappings":"yCAEAA,EAAQC,SAER,IAAAD,EAAeA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/range/component.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,MAAM,EAEP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"__source__/","sources":["web-components/range/component.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,MAAM,EAEP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAM3D,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEpC;;;;;;;;;GASG;AACH,cA0FM,KAAK,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,UAAU,CAAC,UAAU,CAAC;IAC3E;;OAEG;IAEH,GAAG,SAAK;IAER;;OAEG;IAEH,GAAG,SAAO;IAEV;;OAEG;IAEH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;;;OAIG;IAEH,KAAK,EAAE,CAAC,CAAC;IAET;;OAEG;IAEH,OAAO,EAAE,CAAC,CAAC;IAGX,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC;IAG7B,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IAG5C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,YAAY,CAAgB;IAEpC,IAAI,KAAK,IAAI,CAAC,SAAS,MAAM,GAAG,KAAK,GAAG,IAAI,CAE3C;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,EAAE,CAEzB;IAED;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,EAAE;IAS1C,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAOvF,IAAI,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAExC;IAED,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAyBrC,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAkBzD,OAAO,CAAC,cAAc,CAAqC;IAE3D;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAchC;;OAEG;IACH,UAAU,IAAI,IAAI;IAKlB;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,OAC7B,aAAa,KAAG,IAAI;IAgBjC;;;;OAIG;IACH,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,OAC1B,UAAU,KAAG,IAAI;IAM9B;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,WACrB,MAAM,KAAG,IAAI;IAY9B;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,MAAM;IAKjE;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAenD;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,OAC9D,UAAU,KAAG,IAAI;IAa9B;;;;OAIG;IACH,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,OACzD,UAAU,KAAG,IAAI;IAS9B,SAAS,CAAC,cAAc,IAAI,IAAI;IAchC,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,CAAC;IAIT,QAAQ,IAAI,CAAC;CAMd;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{queryPart as e,godown as r,styles as a,Ranger as o,omit as s,attr as i,joinDeclarations as n,loop as h,tokenList as l,isNullable as d}from"@godown/element";import{css as u,html as c}from"lit";import{property as v,queryAll as p,state as m}from"lit/decorators.js";import{scopePrefix as g,cssGlobalVars as f}from"../../internal/global-style.js";import{SuperInput as w}from"../../internal/super-input.js";const
|
1
|
+
import{__decorate as t}from"tslib";import{queryPart as e,godown as r,styles as a,Ranger as o,omit as s,attr as i,joinDeclarations as n,loop as h,tokenList as l,isNullable as d}from"@godown/element";import{css as u,html as c}from"lit";import{property as v,queryAll as p,state as m}from"lit/decorators.js";import{scopePrefix as g,cssGlobalVars as f}from"../../internal/global-style.js";import{SuperInput as w}from"../../internal/super-input.js";import{ringTypeAttribute as y}from"../../internal/ring.js";const _="range",k=g(_);let b=class Range extends w{constructor(){super(...arguments),this.min=0,this.max=100,this.vertical=!1,this.__focusStack=[]}get range(){return Array.isArray(this.value)}get rangeValue(){return this.range?this.value:[this.value]}padValue(t,e=0){const{rangeValue:r}=this,a=t-r.length;return a>0?new Array(a).fill(e).concat(r):r}attributeChangedCallback(t,e,r){super.attributeChangedCallback(t,e,r),"max"!==t&&"min"!==t&&"step"!==t||(this._ranger=new o(this.min,this.max,this.step))}get observedRecord(){return s(super.observedRecord,y)}render(){const t=this.padValue(2),e=Math.min(...t),r=Math.max(...t),a=this._ranger.diff;return c`<div part="root" ${i(this.observedRecord)} @mousedown="${this.disabled?null:this._handleMousedownRoot}" style="${n([["--from",(e-this.min)/a*100+"%"],["--to",(r-this.min)/a*100+"%"],...t.map(((t,e)=>[`--handle-${e}`,(t-this.min)/a*100+"%"]))])}"> <div part="track"></div> ${h(this.rangeValue.length,(t=>this._renderHandle(t)))} </div>`}_renderHandle(t){const{disabled:e,range:r,rangeValue:a}=this,o=!r||r&&t===a.length-1&&1===a.length;return c`<i tabindex="0" part="${l("handle",`handle-${t}`)}" @mousedown="${e?null:this.createMouseDown(t)}" style="${n({"z-index":this.__focusStack.indexOf(t)+1,"--handle":`var(--${o?"to":`handle-${t}`})`})}"></i>`}focusHandle(t){this.lastFocus=t;const e=this.__focusStack.indexOf(t);-1!==e&&this.__focusStack.splice(e,1),this.__focusStack.push(t);const r=this._handles.item(t);r?.focus(),this.__keydownEvent||(this.__keydownEvent=this.events.add(document,"keydown",this.createKeydownEvent(t)))}blurHandle(){this.lastFocus=void 0,this.__keydownEvent=this.events.remove(document,"keydown",this.__keydownEvent)}createKeydownEvent(t){return e=>{const{rangeValue:r,step:a}=this;r.length<2&&(t=0);const o=r[t];"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),this.createSetValue(t)(o-a)):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),this.createSetValue(t)(o+a))}}createMouseDown(t){return e=>{this.focusHandle(t),this.createMousedownListener(this.createSetValue(t))(e)}}createSetValue(t){return e=>{const r=this._ranger.normalize(e);let a=r;this.range&&(a=[...this.value],a[t]=r),this.value=a,this.dispatchCustomEvent("change",this.value)}}_computeValue({clientX:t,clientY:e}){const{top:r,left:a,height:o,width:s}=this._root.getBoundingClientRect();return this._ranger.present(this.vertical?(e-r)/o:(t-a)/s)}_handleMousedownRoot(t){const e=this._computeValue(t),r=this.range?this.rangeValue.reduce(((t,r,a)=>Math.abs(e-r)<Math.abs(e-this.rangeValue[t])?a:t),0):0,a=this.createSetValue(r);a(e),this.createMousedownListener(a)(t),this.focusHandle(r)}createMousedownListener(t){return e=>{e.preventDefault(),e.stopPropagation();const r=this.createMousemoveListener(t);this.events.add(document,"mousemove",r);const a=()=>{this.events.remove(document,"mousemove",r),this.events.remove(document,"mouseup",a)};this.events.add(document,"mouseup",a)}}createMousemoveListener(t){return e=>{const r=this._computeValue(e);r===this._ranger.restrict(r)&&t?.call(this,r)}}_connectedInit(){this._ranger=new o(this.min,this.max,this.step);const t=this._ranger.diff;this.step||=t/100,d(this.value)&&(d(this.default)?this.value=Math.round(t/2/this.step)*this.step:this.value=this.default),this.default??=this.value}reset(){this.value=this.default}sort(){return this.value=this.toSorted()}toSorted(){return this.range?[...this.value].sort(((t,e)=>t-e)):this.value}};t([v({type:Number})],b.prototype,"min",void 0),t([v({type:Number})],b.prototype,"max",void 0),t([v({type:Number})],b.prototype,"step",void 0),t([v({type:Boolean,reflect:!0})],b.prototype,"vertical",void 0),t([v({type:Array})],b.prototype,"value",void 0),t([v({type:Array})],b.prototype,"default",void 0),t([e("root")],b.prototype,"_root",void 0),t([p("[part=handle]")],b.prototype,"_handles",void 0),t([m()],b.prototype,"lastFocus",void 0),b=t([r(_),a(u`:host{${k}--track-width:.5em;${k}--handle-scale:1;${k}--track-background:var(${f.active});background:var(${f.passive});display:block;height:var(${k}--track-width);width:100%}:host([contents]) [part=root]{width:inherit}:host([vertical]){height:100%;width:-moz-fit-content;width:fit-content}[part=root]{position:relative;--from:0%;--to:50%}[part=root],[part=track]{border-radius:inherit;min-height:inherit}[part=track]{background:var(${k}--track-background);height:100%;justify-content:space-between;left:min(var(--from),var(--to));pointer-events:none;width:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)))}[part=track],[part~=handle]{display:flex;position:absolute}[part~=handle]{align-items:center;background:var(${f.background});border:.1em solid;border-radius:50%;height:1em;justify-content:center;outline:0;transform:scale(var(${k}--handle-scale)) translate(-50%,-25%);transform-origin:0 25%;-webkit-user-select:none;user-select:none;width:1em}`,u`[vertical]{height:inherit;width:var(${k}--track-width)}[vertical] i{transform:translate(-25%,-50%)}[vertical] [part=track]{height:max(calc(var(--to) - var(--from)),calc(var(--from) - var(--to)));left:0;top:min(var(--from),var(--to));width:100%}`,u`[part~=handle]{left:var(--handle);top:0}[vertical] [part~=handle]{left:0;top:var(--handle)}`)],b);var $=b;export{b as Range,$ as default};
|
2
2
|
//# sourceMappingURL=component.js.map
|