godown 3.5.3 → 3.6.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.
Files changed (61) hide show
  1. package/build/godown+lit.iife.js +2 -2
  2. package/build/godown+lit.iife.js.map +1 -1
  3. package/build/godown+lit.js +2 -2
  4. package/build/godown+lit.js.map +1 -1
  5. package/build/godown+lit.umd.js +2 -2
  6. package/build/godown+lit.umd.js.map +1 -1
  7. package/build/godown.iife.js +4 -4
  8. package/build/godown.js +6 -6
  9. package/build/godown.js.map +1 -1
  10. package/build/godown.umd.js +4 -4
  11. package/build/godown.umd.js.map +1 -1
  12. package/components/alert.js +1 -1
  13. package/components/alert.js.map +1 -1
  14. package/components/avatar.js +1 -1
  15. package/components/avatar.js.map +1 -1
  16. package/components/badge.d.ts +1 -1
  17. package/components/badge.d.ts.map +1 -1
  18. package/components/badge.js +1 -1
  19. package/components/badge.js.map +1 -1
  20. package/components/button.js +1 -1
  21. package/components/button.js.map +1 -1
  22. package/components/card.js +1 -1
  23. package/components/card.js.map +1 -1
  24. package/components/details.d.ts +4 -0
  25. package/components/details.d.ts.map +1 -1
  26. package/components/details.js +1 -1
  27. package/components/details.js.map +1 -1
  28. package/components/dialog.d.ts +4 -6
  29. package/components/dialog.d.ts.map +1 -1
  30. package/components/dialog.js +1 -1
  31. package/components/dialog.js.map +1 -1
  32. package/components/divider.js +1 -1
  33. package/components/divider.js.map +1 -1
  34. package/components/layout.d.ts +10 -4
  35. package/components/layout.d.ts.map +1 -1
  36. package/components/layout.js +1 -1
  37. package/components/layout.js.map +1 -1
  38. package/components/split.js +1 -1
  39. package/components/split.js.map +1 -1
  40. package/core/global-style.d.ts +1 -0
  41. package/core/global-style.d.ts.map +1 -1
  42. package/core/global-style.js +1 -1
  43. package/core/global-style.js.map +1 -1
  44. package/core/super-input.js +1 -1
  45. package/core/super-input.js.map +1 -1
  46. package/custom-elements.json +1 -1
  47. package/package.json +3 -3
  48. package/src/components/alert.ts +0 -2
  49. package/src/components/avatar.ts +3 -5
  50. package/src/components/badge.ts +9 -11
  51. package/src/components/button.ts +0 -1
  52. package/src/components/card.ts +0 -1
  53. package/src/components/details.ts +24 -21
  54. package/src/components/dialog.ts +59 -70
  55. package/src/components/divider.ts +1 -2
  56. package/src/components/layout.ts +31 -32
  57. package/src/components/split.ts +1 -1
  58. package/src/core/global-style.ts +8 -0
  59. package/src/core/super-input.ts +0 -1
  60. package/vscode.html-custom-data.json +1 -1
  61. package/web-types.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__decorate as o}from"tslib";import{constructCSSObject as r,toVar as t,godown as e,styles as i,htmlSlot as c,attr as s,htmlStyle as l}from"@godown/element";import a from"@godown/f7-icon/icons/checkmark-alt-circle.js";import n from"@godown/f7-icon/icons/exclamationmark-circle.js";import d from"@godown/f7-icon/icons/info-circle.js";import p from"@godown/f7-icon/icons/lightbulb.js";import g from"@godown/f7-icon/icons/question-circle.js";import m from"@godown/f7-icon/icons/slash-circle.js";import h from"@godown/f7-icon/icons/xmark-circle.js";import u from"@godown/f7-icon/icons/xmark.js";import{css as b,html as v}from"lit";import{property as f}from"lit/decorators.js";import{scopePrefix as w,cssGlobalVars as k,GlobalStyle as y}from"../core/global-style.js";const $="alert",j=w($),_=o=>[k._colors[o][5],k._colors[o][9]],q=r(["color","background"].map((o=>`${j}--${o}`)),{green:_("green"),blue:_("blue"),orange:_("orange"),red:_("red"),yellow:_("yellow"),purple:_("purple"),teal:_("teal"),pink:_("pink"),gray:[k._colors.lightgray[5],k._colors.darkgray[5]],white:[k._colors.lightgray[2],k._colors.darkgray[7]],black:[k._colors.darkgray[8],k._colors.lightgray[5]]},(()=>":host"),(o=>t(o))),C={tip:{color:"teal",icon:p},success:{color:"green",icon:a},info:{color:"blue",icon:d},warning:{color:"orange",icon:n},danger:{color:"red",icon:h},error:{color:"red",icon:h},help:{color:"purple",icon:g},deprecated:{color:"gray",icon:m}};let x=class Alert extends y{constructor(){super(...arguments),this.color="blue",this.autoclose=0,this.hideClose=!1,this.variant="dark"}render(){const o=C[this.call]?.color||this.color,r=this.call?C[this.call].icon():c("icon");return v`<div part="root" ${s(this.observedRecord)}><div part="icon" class="start">${r}</div><div part="content"><strong part="title">${this.title||c("title")}</strong> ${this.content||c()}</div>${this.hideClose||"blockquote"===this.variant?"":v`<div part="icon close" class="end" tabindex="0" @click="${this.close}">${u()}</div>`} ${l(q[o])}</div>`}close(){this.remove(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}firstUpdated(){this.autoclose&&this.timeouts.add(setTimeout((()=>this.close()),this.autoclose))}static alert(o,r){const t=new this;return Object.assign(t,r),o.appendChild(t),t}};o([f()],x.prototype,"call",void 0),o([f()],x.prototype,"color",void 0),o([f({type:Number})],x.prototype,"autoclose",void 0),o([f()],x.prototype,"title",void 0),o([f()],x.prototype,"content",void 0),o([f({type:Boolean})],x.prototype,"hideClose",void 0),o([f()],x.prototype,"variant",void 0),x=o([e($),i(b`:host,:where(:host([contents]) [part=root]){${j}--border-radius:.2em;${j}--border-width:.075em;${j}--blockquote-width:.2em;${j}--blockquote-background:transparent;${j}--gap:.5em;border-radius:var(${j}--border-radius);display:block;width:100%}[part=root]{align-items:center;background:var(${j}--background);border-color:currentColor;border-radius:inherit;border-style:solid;border-width:var(${j}--border-width);color:var(${j}--color,currentColor);display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr;padding:var(${j}--gap)}[variant=blockquote]{background:var(${j}--blockquote-background);border-radius:0;border-width:0;border-left-width:var(${j}--blockquote-width)}[part~=icon]{align-items:center;display:grid;height:2em}.start svg{margin-inline-end:var(${j}--gap)}.end svg{margin-inline-start:var(${j}--gap)}svg{height:1.25em;width:1.25em}[part=content]{grid-row:span 2/span 2}`)],x);var E=x;export{x as Alert,E as default};
1
+ import{__decorate as o}from"tslib";import{constructCSSObject as r,toVar as t,godown as e,styles as i,htmlSlot as c,attr as l,htmlStyle as s}from"@godown/element";import a from"@godown/f7-icon/icons/checkmark-alt-circle.js";import n from"@godown/f7-icon/icons/exclamationmark-circle.js";import d from"@godown/f7-icon/icons/info-circle.js";import p from"@godown/f7-icon/icons/lightbulb.js";import g from"@godown/f7-icon/icons/question-circle.js";import h from"@godown/f7-icon/icons/slash-circle.js";import m from"@godown/f7-icon/icons/xmark-circle.js";import u from"@godown/f7-icon/icons/xmark.js";import{css as b,html as v}from"lit";import{property as f}from"lit/decorators.js";import{scopePrefix as w,cssGlobalVars as k,GlobalStyle as y}from"../core/global-style.js";const $="alert",j=w($),_=o=>[k._colors[o][5],k._colors[o][9]],q=r(["color","background"].map((o=>`${j}--${o}`)),{green:_("green"),blue:_("blue"),orange:_("orange"),red:_("red"),yellow:_("yellow"),purple:_("purple"),teal:_("teal"),pink:_("pink"),gray:[k._colors.lightgray[5],k._colors.darkgray[5]],white:[k._colors.lightgray[2],k._colors.darkgray[7]],black:[k._colors.darkgray[8],k._colors.lightgray[5]]},(()=>":host"),(o=>t(o))),C={tip:{color:"teal",icon:p},success:{color:"green",icon:a},info:{color:"blue",icon:d},warning:{color:"orange",icon:n},danger:{color:"red",icon:m},error:{color:"red",icon:m},help:{color:"purple",icon:g},deprecated:{color:"gray",icon:h}};let x=class Alert extends y{constructor(){super(...arguments),this.color="blue",this.autoclose=0,this.hideClose=!1,this.variant="dark"}render(){const o=C[this.call]?.color||this.color,r=this.call?C[this.call].icon():c("icon");return v`<div part="root" ${l(this.observedRecord)}><div part="icon" class="start">${r}</div><div part="content"><strong part="title">${this.title||c("title")}</strong> ${this.content||c()}</div>${this.hideClose||"blockquote"===this.variant?"":v`<div part="icon close" class="end" tabindex="0" @click="${this.close}">${u()}</div>`} ${s(q[o])}</div>`}close(){this.remove(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}firstUpdated(){this.autoclose&&this.timeouts.add(setTimeout((()=>this.close()),this.autoclose))}static alert(o,r){const t=new this;return Object.assign(t,r),o.appendChild(t),t}};o([f()],x.prototype,"call",void 0),o([f()],x.prototype,"color",void 0),o([f({type:Number})],x.prototype,"autoclose",void 0),o([f()],x.prototype,"title",void 0),o([f()],x.prototype,"content",void 0),o([f({type:Boolean})],x.prototype,"hideClose",void 0),o([f()],x.prototype,"variant",void 0),x=o([e($),i(b`:host,:where(:host([contents]) [part=root]){${j}--border-width:.075em;${j}--blockquote-width:.2em;${j}--blockquote-background:transparent;${j}--gap:.5em;display:block;width:100%}[part=root]{align-items:center;background:var(${j}--background);border-color:currentColor;border-radius:inherit;border-style:solid;border-width:var(${j}--border-width);color:var(${j}--color,currentColor);display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto 1fr;padding:var(${j}--gap)}[variant=blockquote]{background:var(${j}--blockquote-background);border-radius:0;border-width:0;border-left-width:var(${j}--blockquote-width)}[part~=icon]{align-items:center;display:grid;height:2em}.start svg{margin-inline-end:var(${j}--gap)}.end svg{margin-inline-start:var(${j}--gap)}svg{height:1.25em;width:1.25em}[part=content]{grid-row:span 2/span 2}`)],x);var E=x;export{x as Alert,E as default};
2
2
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sources":["../src/components/alert.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","genDark","key","cssGlobalVars","_colors","darkStyles","constructCSSObject","map","v","green","blue","orange","red","yellow","purple","teal","pink","gray","lightgray","darkgray","white","black","prop","toVar","calls","tip","color","icon","iconLightbulb","success","iconCheckAltCircle","info","iconInfoCircle","warning","iconExclamationCircle","danger","iconXmarkCircle","error","help","iconQuestionCircle","deprecated","iconSlashCircle","Alert","GlobalStyle","constructor","this","autoclose","hideClose","variant","render","call","htmlSlot","html","attr","observedRecord","title","content","close","iconXmark","htmlStyle","remove","dispatchEvent","CustomEvent","bubbles","composed","firstUpdated","timeouts","add","setTimeout","alert","root","option","ai","Object","assign","appendChild","__decorate","property","prototype","undefined","type","Number","Boolean","godown","styles","css","Alert$1"],"mappings":"+vBAcA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GA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,qBAC5CN,KAAKW,SAAWL,YAElBN,KAAKE,WAA8B,eAAjBF,KAAKG,QACrB,GACAI,CAAI,2DAKUP,KAAKY,UAEbC,eAGRC,EAAUtD,EAAWqB,YAK7B,KAAA+B,GACEZ,KAAKe,SACLf,KAAKgB,cAAc,IAAIC,YAAY,QAAS,CAAEC,SAAS,EAAMC,UAAU,KAG/D,YAAAC,GACJpB,KAAKC,WACPD,KAAKqB,SAASC,IAAIC,YAAW,IAAMvB,KAAKY,SAASZ,KAAKC,YAI1D,YAAOuB,CAAMC,EAAmBC,GAC9B,MAAMC,EAAK,IAAI3B,KAGf,OAFA4B,OAAOC,OAAOF,EAAID,GAClBD,EAAKK,YAAYH,GACVA,IAzGTI,EAAA,CADCC,KACwFnC,EAAAoC,UAAA,YAAAC,GAOzFH,EAAA,CADCC,KAakBnC,EAAAoC,UAAA,aAAAC,GAMnBH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACLvC,EAAAoC,UAAA,iBAAAC,GAMbH,EAAA,CADCC,KACYnC,EAAAoC,UAAA,aAAAC,GAMbH,EAAA,CADCC,KACcnC,EAAAoC,UAAA,eAAAC,GAQfH,EAAA,CADCC,EAAS,CAAEG,KAAME,WACDxC,EAAAoC,UAAA,iBAAAC,GAQjBH,EAAA,CADCC,KACsCnC,EAAAoC,UAAA,eAAAC,GA1DnCrC,EAAKkC,EAAA,CAFVO,EAAOrF,GACPsF,EAAOC,CAAG,+CAA+CtF,yBAAgCA,0BAAiCA,4BAAmCA,wCAA+CA,iCAAwCA,4FAAmGA,sGAA6GA,8BAAqCA,mHAA0HA,+CAAsDA,kFAAyFA,iHAAwHA,4CAAmDA,kFACx5B2C,GAkHN,IAAA4C,EAAe5C"}
1
+ {"version":3,"file":"alert.js","sources":["../src/components/alert.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","genDark","key","cssGlobalVars","_colors","darkStyles","constructCSSObject","map","v","green","blue","orange","red","yellow","purple","teal","pink","gray","lightgray","darkgray","white","black","prop","toVar","calls","tip","color","icon","iconLightbulb","success","iconCheckAltCircle","info","iconInfoCircle","warning","iconExclamationCircle","danger","iconXmarkCircle","error","help","iconQuestionCircle","deprecated","iconSlashCircle","Alert","GlobalStyle","constructor","this","autoclose","hideClose","variant","render","call","htmlSlot","html","attr","observedRecord","title","content","close","iconXmark","htmlStyle","remove","dispatchEvent","CustomEvent","bubbles","composed","firstUpdated","timeouts","add","setTimeout","alert","root","option","ai","Object","assign","appendChild","__decorate","property","prototype","undefined","type","Number","Boolean","godown","styles","css","Alert$1"],"mappings":"+vBAcA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAIvBG,EAAWC,GACR,CAACC,EAAcC,QAAQF,GAAK,GAAIC,EAAcC,QAAQF,GAAK,IAG9DG,EAAaC,EANN,CAAC,QAAS,cAAcC,KAAKC,GAAM,GAAGT,MAAaS,MAQ9D,CACEC,MAAOR,EAAQ,SACfS,KAAMT,EAAQ,QACdU,OAAQV,EAAQ,UAChBW,IAAKX,EAAQ,OACbY,OAAQZ,EAAQ,UAChBa,OAAQb,EAAQ,UAChBc,KAAMd,EAAQ,QACde,KAAMf,EAAQ,QACdgB,KAAM,CAACd,EAAcC,QAAQc,UAAU,GAAIf,EAAcC,QAAQe,SAAS,IAC1EC,MAAO,CAACjB,EAAcC,QAAQc,UAAU,GAAIf,EAAcC,QAAQe,SAAS,IAC3EE,MAAO,CAAClB,EAAcC,QAAQe,SAAS,GAAIhB,EAAcC,QAAQc,UAAU,MAE7E,IAAM,UACLI,GAASC,EAAMD,KAGZE,EAAQ,CACZC,IAAK,CACHC,MAAO,OACPC,KAAMC,GAERC,QAAS,CACPH,MAAO,QACPC,KAAMG,GAERC,KAAM,CACJL,MAAO,OACPC,KAAMK,GAERC,QAAS,CACPP,MAAO,SACPC,KAAMO,GAERC,OAAQ,CACNT,MAAO,MACPC,KAAMS,GAERC,MAAO,CACLX,MAAO,MACPC,KAAMS,GAERE,KAAM,CACJZ,MAAO,SACPC,KAAMY,GAERC,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AKkC,EAAA,CAFVO,EAAOrF,GACPsF,EAAOC,CAAG,+CAA+CtF,0BAAiCA,4BAAmCA,wCAA+CA,sFAA6FA,sGAA6GA,8BAAqCA,mHAA0HA,+CAAsDA,kFAAyFA,iHAAwHA,4CAAmDA,kFAC10B2C,GAkHN,IAAA4C,EAAe5C"}
@@ -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{scopePrefix as h,cssGlobalVars as m,GlobalStyle as p}from"../core/global-style.js";const l="avatar",c=h(l);let v=class Avatar extends p{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()],v.prototype,"src",void 0),r([d()],v.prototype,"name",void 0),r([d({type:Boolean})],v.prototype,"round",void 0),v=r([t(l),e(s`:host{${c}--size:2em;background:var(${m.passive});border-radius:.2em;height:var(${c}--size);vertical-align:bottom;width:var(${c}--size)}: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;height:100%;justify-content:center;overflow:hidden;position:relative;width:100%}`)],v);var u=v;export{v as Avatar,u as default};
1
+ import{__decorate as t}from"tslib";import{godown as r,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 h}from"lit/decorators.js";import{scopePrefix as d,cssGlobalVars as m,GlobalStyle as p}from"../core/global-style.js";const l="avatar";d(l);let c=class Avatar extends p{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}};t([h()],c.prototype,"src",void 0),t([h()],c.prototype,"name",void 0),t([h({type:Boolean})],c.prototype,"round",void 0),c=t([r(l),e(s`:host{background:var(${m.passive});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;height:100%;justify-content:center;position:relative;width:100%}`)],c);var v=c;export{c as Avatar,v as default};
2
2
  //# sourceMappingURL=avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","sources":["../src/components/avatar.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Avatar","GlobalStyle","constructor","this","name","round","render","html","attr","omit","observedRecord","_renderAvatar","src","_handleError","formatName","htmlSlot","undefined","__decorate","property","prototype","type","Boolean","godown","styles","css","cssGlobalVars","passive","Avatar$1"],"mappings":"qSAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAa7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAYEC,KAAIC,KAAG,GAMPD,KAAKE,OAAG,EAEE,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKC,EAAKN,KAAKO,eAAgB,WAE/BP,KAAKQ,wBAKH,aAAAA,GACR,OAAIR,KAAKS,IACAL,CAAI,0BAGAJ,KAAKS,aACLT,KAAKC,iBACHD,KAAKU,iBAIhBV,KAAKC,KACAG,CAAI,qBACWJ,KAAKW,sBAGtBC,IAGT,UAAAD,GACE,OAAOX,KAAKC,KAGJ,YAAAS,GACRV,KAAKS,SAAMI,IAjDbC,EAAA,CADCC,KAC6BlB,EAAAmB,UAAA,WAAAH,GAM9BC,EAAA,CADCC,KACQlB,EAAAmB,UAAA,YAAAH,GAMTC,EAAA,CADCC,EAAS,CAAEE,KAAMC,WACLrB,EAAAmB,UAAA,aAAAH,GAlBThB,EAAMiB,EAAA,CAFXK,EAAOzB,GACP0B,EAAOC,CAAG,SAAS1B,8BAAqC2B,EAAcC,0CAA0C5B,4CAAmDA,8VAC9JE,GA2DN,IAAA2B,EAAe3B"}
1
+ {"version":3,"file":"avatar.js","sources":["../src/components/avatar.ts"],"sourcesContent":null,"names":["protoName","scopePrefix","Avatar","GlobalStyle","constructor","this","name","round","render","html","attr","omit","observedRecord","_renderAvatar","src","_handleError","formatName","htmlSlot","undefined","__decorate","property","prototype","type","Boolean","godown","styles","css","cssGlobalVars","passive","Avatar$1"],"mappings":"qSAMA,MAAMA,EAAY,SACDC,EAAYD,GAa7B,IAAME,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAYEC,KAAIC,KAAG,GAMPD,KAAKE,OAAG,EAEE,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKC,EAAKN,KAAKO,eAAgB,WAE/BP,KAAKQ,wBAKH,aAAAA,GACR,OAAIR,KAAKS,IACAL,CAAI,0BAGAJ,KAAKS,aACLT,KAAKC,iBACHD,KAAKU,iBAIhBV,KAAKC,KACAG,CAAI,qBACWJ,KAAKW,sBAGtBC,IAGT,UAAAD,GACE,OAAOX,KAAKC,KAGJ,YAAAS,GACRV,KAAKS,SAAMI,IAjDbC,EAAA,CADCC,KAC6BlB,EAAAmB,UAAA,WAAAH,GAM9BC,EAAA,CADCC,KACQlB,EAAAmB,UAAA,YAAAH,GAMTC,EAAA,CADCC,EAAS,CAAEE,KAAMC,WACLrB,EAAAmB,UAAA,aAAAH,GAlBThB,EAAMiB,EAAA,CAFXK,EAAOxB,GACPyB,EAAOC,CAAG,wBAAwBC,EAAcC,yYAC3C1B,GA2DN,IAAA2B,EAAe3B"}
@@ -1,6 +1,6 @@
1
1
  import { type TemplateResult } from "lit";
2
2
  import { GlobalStyle } from "../core/global-style.js";
3
- import { DirectionCorner } from "../core/direction.js";
3
+ import type { DirectionCorner } from "../core/direction.js";
4
4
  /**
5
5
  * {@linkcode Badge} renders a badge.
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/components/badge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAKvD;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,WAAW;IAC7B;;;OAGG;IAEH,QAAQ,EAAE,eAAe,CAAe;IAGxC,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;CAK5B;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/components/badge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAA8B,MAAM,yBAAyB,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D;;;;;GAKG;AACH,cAEM,KAAM,SAAQ,WAAW;IAC7B;;;OAGG;IAEH,QAAQ,EAAE,eAAe,CAAe;IAGxC,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;CAK5B;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as o,styles as e,attr as r,htmlSlot as i}from"@godown/element";import{css as a,html as s}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as d,cssGlobalVars as n,GlobalStyle as f}from"../core/global-style.js";const l="badge",v=d(l);let c=class Badge extends f{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return s`<div part="root" ${r(this.observedRecord)}>${i()} ${this.value||this.dot?s`<div part="badge">${this.dot?"":this.formatValue(this.value)}</div>`:""}</div>`}};t([p()],c.prototype,"position",void 0),t([p({type:Number})],c.prototype,"value",void 0),t([p({type:Boolean})],c.prototype,"dot",void 0),t([p({type:Number})],c.prototype,"max",void 0),c=t([o(l),e(a`:host{${v}--background:var(${n.active});${v}--offset:0%;${v}--offset-x:var(${v}--offset);${v}--offset-y:var(${v}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=badge]{background:var(${v}--background);border-radius:calc(infinity*1px);font-size:75%;left:var(--left);padding:0 .5em;position:absolute;top:var(--top);transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=badge]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top]{--top:calc(var(${v}--offset-y))}[position$=right]{--left:calc(100% - var(${v}--offset-x))}[position^=bottom]{--top:calc(100% - var(${v}--offset-y))}[position$=left]{--left:calc(var(${v}--offset-x))}`)],c);var m=c;export{c as Badge,m as default};
1
+ import{__decorate as t}from"tslib";import{godown as o,styles as e,attr as r,htmlSlot as a}from"@godown/element";import{css as i,html as s}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as d,cssGlobalVars as n,GlobalStyle as f}from"../core/global-style.js";const l="badge",c=d(l);let m=class Badge extends f{constructor(){super(...arguments),this.position="top-right",this.value=0,this.dot=!1,this.max=99}formatValue(t){return t>this.max?this.max+"+":t+""}render(){return s`<div part="root" ${r(this.observedRecord)}>${a()} ${this.value||this.dot?s`<div part="badge">${this.dot?"":this.formatValue(this.value)}</div>`:""}</div>`}};t([p()],m.prototype,"position",void 0),t([p({type:Number})],m.prototype,"value",void 0),t([p({type:Boolean})],m.prototype,"dot",void 0),t([p({type:Number})],m.prototype,"max",void 0),m=t([o(l),e(i`:host{${c}--background:var(${n.active});${c}--offset:0%;${c}--offset-x:var(${c}--offset);${c}--offset-y:var(${c}--offset)}:host,:host([contents]) [part=root]{display:inline-block}[part=root]{position:relative}[part=badge]{background:var(${c}--background);border-radius:calc(infinity*1px);font-size:75%;padding:0 .5em;position:absolute;transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none}[part=badge]:empty{border-radius:50%;font-size:100%;height:.5em;padding:0;width:.5em}[position^=top] [part=badge]{top:calc(var(${c}--offset-y))}[position$=right] [part=badge]{left:calc(100% - var(${c}--offset-x))}[position^=bottom] [part=badge]{top:calc(100% - var(${c}--offset-y))}[position$=left] [part=badge]{left:calc(var(${c}--offset-x))}`)],m);var v=m;export{m as Badge,v as default};
2
2
  //# sourceMappingURL=badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","sources":["../src/components/badge.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Badge","GlobalStyle","constructor","this","position","value","dot","max","formatValue","render","html","attr","observedRecord","htmlSlot","__decorate","property","prototype","undefined","type","Number","Boolean","godown","styles","css","cssGlobalVars","active","Badge$1"],"mappings":"2RAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAU7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAMEC,KAAQC,SAAoB,YAG5BD,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,oBAGLC,EAAKR,KAAKS,mBAEVC,OACAV,KAAKE,OAASF,KAAKG,IACjBI,CAAI,qBACkBP,KAAKG,IAAM,GAAKH,KAAKK,YAAYL,KAAKE,eAE5D,aAjCVS,EAAA,CADCC,KACsCf,EAAAgB,UAAA,gBAAAC,GAGvCH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACTnB,EAAAgB,UAAA,aAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,WACPpB,EAAAgB,UAAA,WAAAC,GAOXH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACVnB,EAAAgB,UAAA,WAAAC,GAtBJjB,EAAKc,EAAA,CAFVO,EAAOxB,GACPyB,EAAOC,CAAG,SAASzB,qBAA4B0B,EAAcC,WAAW3B,gBAAuBA,mBAA0BA,cAAqBA,mBAA0BA,iIAAwIA,+TAAsUA,0DAAiEA,0DAAiEA,kDAAyDA,mBAC5yBE,GA6CN,IAAA0B,EAAe1B"}
1
+ {"version":3,"file":"badge.js","sources":["../src/components/badge.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Badge","GlobalStyle","constructor","this","position","value","dot","max","formatValue","render","html","attr","observedRecord","htmlSlot","__decorate","property","prototype","undefined","type","Number","Boolean","godown","styles","css","cssGlobalVars","active","Badge$1"],"mappings":"2RAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAU7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAMEC,KAAQC,SAAoB,YAG5BD,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,oBAGLC,EAAKR,KAAKS,mBAEVC,OACAV,KAAKE,OAASF,KAAKG,IACjBI,CAAI,qBACkBP,KAAKG,IAAM,GAAKH,KAAKK,YAAYL,KAAKE,eAE5D,aAjCVS,EAAA,CADCC,KACsCf,EAAAgB,UAAA,gBAAAC,GAGvCH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACTnB,EAAAgB,UAAA,aAAAC,GAMTH,EAAA,CADCC,EAAS,CAAEG,KAAME,WACPpB,EAAAgB,UAAA,WAAAC,GAOXH,EAAA,CADCC,EAAS,CAAEG,KAAMC,UACVnB,EAAAgB,UAAA,WAAAC,GAtBJjB,EAAKc,EAAA,CAFVO,EAAOxB,GACPyB,EAAOC,CAAG,SAASzB,qBAA4B0B,EAAcC,WAAW3B,gBAAuBA,mBAA0BA,cAAqBA,mBAA0BA,iIAAwIA,0SAAiTA,qEAA4EA,qEAA4EA,6DAAoEA,mBACxzBE,GA6CN,IAAA0B,EAAe1B"}
@@ -1,2 +1,2 @@
1
- import{__decorate as o}from"tslib";import{constructCSSObject as t,toVar as r,part as e,godown as a,styles as i,attr as n,htmlSlot as l,htmlStyle as s}from"@godown/element";import{css as d,html as c}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as h,cssGlobalVars as g,GlobalStyle as u}from"../core/global-style.js";const v="button",y=h(v),b=g.white,m=g.black,f=t(["color","background","gradients"].map((o=>`${y}--${o}`)),{black:[b,g._colors.darkgray[7],g._colors.darkgray[5]],gray:[b,g._colors.darkgray[1],g._colors.lightgray[8]],white:[m,g._colors.lightgray[3],g._colors.lightgray[0]],blue:[b,g._colors.blue[6],g._colors.blue[4]],green:[b,g._colors.green[6],g._colors.green[4]],red:[b,g._colors.red[6],g._colors.red[4]],orange:[b,g._colors.orange[6],g._colors.orange[4]],pink:[b,g._colors.pink[6],g._colors.pink[4]],purple:[b,g._colors.purple[6],g._colors.purple[4]],yellow:[m,g._colors.yellow[6],g._colors.yellow[4]],teal:[b,g._colors.teal[6],g._colors.teal[4]]},(()=>":host"),(o=>r(o)));let $=class Button extends u{constructor(){super(...arguments),this.plain=!1,this.disabled=!1,this.ghost=!1,this.active=!1,this.round=!1,this.color="black"}render(){const o=this.nextColor();return c`<div part="root" ${n(this.observedRecord)}><span part="modal-root"></span><div part="content">${[this.content||l(),s(f[o])]}</div></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,!0)}_handelClick(o){if(this.disabled)return o.stopPropagation(),void o.preventDefault();this.plain||this._handleModal(o)}_handleModal(o){const t=document.createElement("i"),{width:r,height:e}=this.getBoundingClientRect(),{x:a,y:i}=this._root.getBoundingClientRect(),n=2*Math.sqrt(e**2+r**2)+"px";t.style.height=n,t.style.width=n,t.style.left=o.x-a+"px",t.style.top=o.y-i+"px",t.style.animationName="kf",this._modalRoot.appendChild(t),t.addEventListener("animationend",(()=>t.remove()),{once:!0})}nextColor(){return this.color}};o([p({type:Boolean,reflect:!0})],$.prototype,"plain",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"disabled",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"ghost",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"active",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"round",void 0),o([p({reflect:!0})],$.prototype,"color",void 0),o([p()],$.prototype,"content",void 0),o([e("modal-root")],$.prototype,"_modalRoot",void 0),o([e("root")],$.prototype,"_root",void 0),$=o([a(v),i(d`:host(:not([disabled]):active){transform:scale(var(${y}--focus-scale))}:host([round]){border-radius:calc(infinity*1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([ghost]){${y}--modal-background:var(${y}--ghost-color);background:transparent;box-shadow:inset 0 0 0 var(${y}--ghost-width) var(${y}--ghost-color);color:var(${y}--ghost-color)}:host([plain]){${y}--gradients:unset;${y}--focus-scale:unset}`,d`:host{${y}--padding-x:.8em;${y}--padding-y:calc(var(${y}--padding-x)/4);${y}--padding:var(${y}--padding-y) var(${y}--padding-x);${y}--modal-animation-duration:1s;${y}--ghost-width:.08em;${y}--focus-scale:.97;${y}--deg:45deg;${y}--ghost-color:var(${y}--background);background:linear-gradient(var(${y}--deg),var(${y}--background),var(${y}--gradients,var(${y}--background)));border-radius:.2em;color:var(${y}--color,inherit);cursor:pointer;display:block;overflow:hidden;padding:var(${y}--padding);text-align:center;width:-moz-fit-content;width:fit-content}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{border-radius:inherit;position:relative;transition:none;transition-duration:inherit;-webkit-user-select:none;user-select:none}[part=root],i{height:100%;width:100%}i{animation-duration:var(${y}--modal-animation-duration);background:var(${y}--modal-background,currentColor);border-radius:50%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible}@keyframes kf{0%{opacity:var(${y}--modal-opacity,.1);transform:scale(0) translate(-50%,-50%)}80%{transform:scale(1) translate(-50%,-50%)}to{opacity:0}}`)],$);var _=$;export{$ as Button,_ as default};
1
+ import{__decorate as o}from"tslib";import{constructCSSObject as t,toVar as r,part as e,godown as a,styles as i,attr as n,htmlSlot as l,htmlStyle as s}from"@godown/element";import{css as d,html as c}from"lit";import{property as p}from"lit/decorators.js";import{scopePrefix as h,cssGlobalVars as g,GlobalStyle as u}from"../core/global-style.js";const v="button",y=h(v),b=g.white,m=g.black,f=t(["color","background","gradients"].map((o=>`${y}--${o}`)),{black:[b,g._colors.darkgray[7],g._colors.darkgray[5]],gray:[b,g._colors.darkgray[1],g._colors.lightgray[8]],white:[m,g._colors.lightgray[3],g._colors.lightgray[0]],blue:[b,g._colors.blue[6],g._colors.blue[4]],green:[b,g._colors.green[6],g._colors.green[4]],red:[b,g._colors.red[6],g._colors.red[4]],orange:[b,g._colors.orange[6],g._colors.orange[4]],pink:[b,g._colors.pink[6],g._colors.pink[4]],purple:[b,g._colors.purple[6],g._colors.purple[4]],yellow:[m,g._colors.yellow[6],g._colors.yellow[4]],teal:[b,g._colors.teal[6],g._colors.teal[4]]},(()=>":host"),(o=>r(o)));let $=class Button extends u{constructor(){super(...arguments),this.plain=!1,this.disabled=!1,this.ghost=!1,this.active=!1,this.round=!1,this.color="black"}render(){const o=this.nextColor();return c`<div part="root" ${n(this.observedRecord)}><span part="modal-root"></span><div part="content">${[this.content||l(),s(f[o])]}</div></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,!0)}_handelClick(o){if(this.disabled)return o.stopPropagation(),void o.preventDefault();this.plain||this._handleModal(o)}_handleModal(o){const t=document.createElement("i"),{width:r,height:e}=this.getBoundingClientRect(),{x:a,y:i}=this._root.getBoundingClientRect(),n=2*Math.sqrt(e**2+r**2)+"px";t.style.height=n,t.style.width=n,t.style.left=o.x-a+"px",t.style.top=o.y-i+"px",t.style.animationName="kf",this._modalRoot.appendChild(t),t.addEventListener("animationend",(()=>t.remove()),{once:!0})}nextColor(){return this.color}};o([p({type:Boolean,reflect:!0})],$.prototype,"plain",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"disabled",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"ghost",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"active",void 0),o([p({type:Boolean,reflect:!0})],$.prototype,"round",void 0),o([p({reflect:!0})],$.prototype,"color",void 0),o([p()],$.prototype,"content",void 0),o([e("modal-root")],$.prototype,"_modalRoot",void 0),o([e("root")],$.prototype,"_root",void 0),$=o([a(v),i(d`:host(:not([disabled]):active){transform:scale(var(${y}--focus-scale))}:host([round]){border-radius:calc(infinity*1px)}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host([ghost]){${y}--modal-background:var(${y}--ghost-color);background:transparent;box-shadow:inset 0 0 0 var(${y}--ghost-width) var(${y}--ghost-color);color:var(${y}--ghost-color)}:host([plain]){${y}--gradients:unset;${y}--focus-scale:unset}`,d`:host{${y}--padding-x:.8em;${y}--padding-y:calc(var(${y}--padding-x)/4);${y}--padding:var(${y}--padding-y) var(${y}--padding-x);${y}--modal-animation-duration:1s;${y}--ghost-width:.08em;${y}--focus-scale:.97;${y}--deg:45deg;${y}--ghost-color:var(${y}--background);background:linear-gradient(var(${y}--deg),var(${y}--background),var(${y}--gradients,var(${y}--background)));color:var(${y}--color,inherit);cursor:pointer;display:block;overflow:hidden;padding:var(${y}--padding);text-align:center;width:-moz-fit-content;width:fit-content}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{border-radius:inherit;position:relative;transition:none;transition-duration:inherit;-webkit-user-select:none;user-select:none}[part=root],i{height:100%;width:100%}i{animation-duration:var(${y}--modal-animation-duration);background:var(${y}--modal-background,currentColor);border-radius:50%;inset:0;opacity:0;pointer-events:none;position:absolute;transform-origin:0 0;visibility:visible}@keyframes kf{0%{opacity:var(${y}--modal-opacity,.1);transform:scale(0) translate(-50%,-50%)}80%{transform:scale(1) translate(-50%,-50%)}to{opacity:0}}`)],$);var _=$;export{$ as Button,_ as default};
2
2
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sources":["../src/components/button.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","whiteFont","cssGlobalVars","white","blackFont","black","colors","constructCSSObject","map","k","_colors","darkgray","gray","lightgray","blue","green","red","orange","pink","purple","yellow","teal","prop","toVar","Button","GlobalStyle","constructor","this","plain","disabled","ghost","active","round","color","render","nextColor","html","attr","observedRecord","content","htmlSlot","htmlStyle","focus","super","blur","connectedCallback","events","add","_handelClick","e","stopPropagation","preventDefault","_handleModal","modal","document","createElement","width","height","getBoundingClientRect","x","y","_root","size","Math","sqrt","style","left","top","animationName","_modalRoot","appendChild","addEventListener","remove","once","__decorate","property","type","Boolean","reflect","prototype","undefined","part","godown","styles","css","Button$1"],"mappings":"uVAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAEvBG,EAAYC,EAAcC,MAC1BC,EAAYF,EAAcG,MAG1BC,EAAiCC,EACrC,CAAC,QAAS,aAAc,aAAaC,KAAKC,GAAM,GAAGV,MAAaU,MAChE,CACEJ,MAAO,CACLJ,EACAC,EAAcQ,QAAQC,SAAS,GAC/BT,EAAcQ,QAAQC,SAAS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AA,aAAAC,GAM7CN,EAAA,CADCC,KACcnD,EAAAuD,UAAA,eAAAC,GAGLN,EAAA,CADTO,EAAK,eAC2BzD,EAAAuD,UAAA,kBAAAC,GAEvBN,EAAA,CADTO,EAAK,SACsBzD,EAAAuD,UAAA,aAAAC,GA/CxBxD,EAAMkD,EAAA,CALXQ,EAAOpF,GACPqF,EACCC,CAAG,sDAAsDrF,+IAAsJA,2BAAkCA,qEAA4EA,uBAA8BA,6BAAoCA,kCAAyCA,sBAA6BA,wBACrcqF,CAAG,SAASrF,qBAA4BA,yBAAgCA,oBAA2BA,kBAAyBA,qBAA4BA,iBAAwBA,kCAAyCA,wBAA+BA,sBAA6BA,gBAAuBA,sBAA6BA,iDAAwDA,eAAsBA,sBAA6BA,oBAA2BA,iDAAwDA,8EAAqFA,yVAAgWA,+CAAsDA,oLAA2LA,4HAEzqCyB,GA8GN,IAAA6D,EAAe7D"}
1
+ {"version":3,"file":"button.js","sources":["../src/components/button.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","whiteFont","cssGlobalVars","white","blackFont","black","colors","constructCSSObject","map","k","_colors","darkgray","gray","lightgray","blue","green","red","orange","pink","purple","yellow","teal","prop","toVar","Button","GlobalStyle","constructor","this","plain","disabled","ghost","active","round","color","render","nextColor","html","attr","observedRecord","content","htmlSlot","htmlStyle","focus","super","blur","connectedCallback","events","add","_handelClick","e","stopPropagation","preventDefault","_handleModal","modal","document","createElement","width","height","getBoundingClientRect","x","y","_root","size","Math","sqrt","style","left","top","animationName","_modalRoot","appendChild","addEventListener","remove","once","__decorate","property","type","Boolean","reflect","prototype","undefined","part","godown","styles","css","Button$1"],"mappings":"uVAMA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAEvBG,EAAYC,EAAcC,MAC1BC,EAAYF,EAAcG,MAG1BC,EAAiCC,EACrC,CAAC,QAAS,aAAc,aAAaC,KAAKC,GAAM,GAAGV,MAAaU,MAChE,CACEJ,MAAO,CACLJ,EACAC,EAAcQ,Q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C,EAAS,CAAEG,SAAS,KACwBtD,EAAAuD,UAAA,aAAAC,GAM7CN,EAAA,CADCC,KACcnD,EAAAuD,UAAA,eAAAC,GAGLN,EAAA,CADTO,EAAK,eAC2BzD,EAAAuD,UAAA,kBAAAC,GAEvBN,EAAA,CADTO,EAAK,SACsBzD,EAAAuD,UAAA,aAAAC,GA/CxBxD,EAAMkD,EAAA,CALXQ,EAAOpF,GACPqF,EACCC,CAAG,sDAAsDrF,+IAAsJA,2BAAkCA,qEAA4EA,uBAA8BA,6BAAoCA,kCAAyCA,sBAA6BA,wBACrcqF,CAAG,SAASrF,qBAA4BA,yBAAgCA,oBAA2BA,kBAAyBA,qBAA4BA,iBAAwBA,kCAAyCA,wBAA+BA,sBAA6BA,gBAAuBA,sBAA6BA,iDAAwDA,eAAsBA,sBAA6BA,oBAA2BA,8BAAqCA,8EAAqFA,yVAAgWA,+CAAsDA,oLAA2LA,4HAEtpCyB,GA8GN,IAAA6D,EAAe7D"}
@@ -1,2 +1,2 @@
1
- import{__decorate as r}from"tslib";import{godown as o,styles as e,attr as t,htmlSlot as d}from"@godown/element";import{css as i,html as a}from"lit";import{property as s}from"lit/decorators.js";import{scopePrefix as l,cssGlobalVars as p,GlobalStyle as h}from"../core/global-style.js";const b="card",m=l(b);let n=class Card extends h{constructor(){super(...arguments),this.footer=!1,this.header=!1}render(){return a`<div part="root" ${t(this.observedRecord)}>${[this.header?d("header"):"",d(),this.footer?d("footer"):""]}</div>`}};r([s({type:Boolean})],n.prototype,"footer",void 0),r([s({type:Boolean})],n.prototype,"header",void 0),n=r([o(b),e(i`:host{${m}--border-width:.075em;${m}--border-color:var(${p.passive});${m}--padding:.5em;border-radius:.2em;border-width:var(${m}--border-width);display:block;flex-shrink:0}slot{display:block;padding:var(${m}--padding)}:host,slot{border-color:var(${m}--border-color);border-style:solid}[part=root]{width:100%}[name=footer]{border-top-width:var(${m}--border-width)}[name=header]{border-bottom-width:var(${m}--border-width)}`)],n);var c=n;export{n as Card,c as default};
1
+ import{__decorate as r}from"tslib";import{godown as o,styles as e,attr as t,htmlSlot as d}from"@godown/element";import{css as i,html as a}from"lit";import{property as s}from"lit/decorators.js";import{scopePrefix as l,cssGlobalVars as p,GlobalStyle as h}from"../core/global-style.js";const b="card",m=l(b);let n=class Card extends h{constructor(){super(...arguments),this.footer=!1,this.header=!1}render(){return a`<div part="root" ${t(this.observedRecord)}>${[this.header?d("header"):"",d(),this.footer?d("footer"):""]}</div>`}};r([s({type:Boolean})],n.prototype,"footer",void 0),r([s({type:Boolean})],n.prototype,"header",void 0),n=r([o(b),e(i`:host{${m}--border-width:.075em;${m}--border-color:var(${p.passive});${m}--padding:.5em;border-width:var(${m}--border-width);display:block;flex-shrink:0}slot{display:block;padding:var(${m}--padding)}:host,slot{border-color:var(${m}--border-color);border-style:solid}[part=root]{width:100%}[name=footer]{border-top-width:var(${m}--border-width)}[name=header]{border-bottom-width:var(${m}--border-width)}`)],n);var c=n;export{n as Card,c as default};
2
2
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../src/components/card.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Card","GlobalStyle","constructor","this","footer","header","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","cssGlobalVars","passive","Card$1"],"mappings":"2RAOA,MAAMA,EAAY,OACZC,EAAWC,EAAYF,GAe7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,QAAG,EAMTD,KAAME,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKL,KAAKM,mBAEV,CAACN,KAAKE,OAASK,EAAS,UAAY,GAAIA,IAAYP,KAAKC,OAASM,EAAS,UAAY,cAd/FC,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJd,EAAAe,UAAA,cAAAC,GAMdL,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJd,EAAAe,UAAA,cAAAC,GAXVhB,EAAIW,EAAA,CAFTM,EAAOpB,GACPqB,EAAOC,CAAG,SAASrB,0BAAiCA,uBAA8BsB,EAAcC,YAAYvB,uDAA8DA,+EAAsFA,2CAAkDA,iGAAwGA,0DAAiEA,sBACtdE,GAyBN,IAAAsB,EAAetB"}
1
+ {"version":3,"file":"card.js","sources":["../src/components/card.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Card","GlobalStyle","constructor","this","footer","header","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","cssGlobalVars","passive","Card$1"],"mappings":"2RAOA,MAAMA,EAAY,OACZC,EAAWC,EAAYF,GAe7B,IAAMG,EAAN,MAAMA,aAAaC,EAAnB,WAAAC,uBAKEC,KAAMC,QAAG,EAMTD,KAAME,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKL,KAAKM,mBAEV,CAACN,KAAKE,OAASK,EAAS,UAAY,GAAIA,IAAYP,KAAKC,OAASM,EAAS,UAAY,cAd/FC,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJd,EAAAe,UAAA,cAAAC,GAMdL,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJd,EAAAe,UAAA,cAAAC,GAXVhB,EAAIW,EAAA,CAFTM,EAAOpB,GACPqB,EAAOC,CAAG,SAASrB,0BAAiCA,uBAA8BsB,EAAcC,YAAYvB,oCAA2CA,+EAAsFA,2CAAkDA,iGAAwGA,0DAAiEA,sBACncE,GAyBN,IAAAsB,EAAetB"}
@@ -9,6 +9,10 @@ import { SuperOpenable } from "../core/super-openable.js";
9
9
  * @category display
10
10
  */
11
11
  declare class Details extends SuperOpenable {
12
+ /**
13
+ * Determines whether the details component should float.
14
+ */
15
+ float: boolean;
12
16
  /**
13
17
  * Determines whether the details component should fill the available space.
14
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../src/components/details.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1D;;;;;;;GAOG;AACH,cAEM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,SAAM;IAEb,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAGtC;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../src/components/details.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAIrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1D;;;;;;;GAOG;AACH,cAEM,OAAQ,SAAQ,aAAa;IACjC;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,IAAI,UAAS;IAEb;;OAEG;IAEH,OAAO,SAAM;IAEb,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAGtC;AAED,eAAe,OAAO,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as i,styles as o,attr as r,htmlSlot as e}from"@godown/element";import a from"@godown/f7-icon/icons/chevron-down.js";import{css as s,html as n}from"lit";import{property as l}from"lit/decorators.js";import{scopePrefix as d}from"../core/global-style.js";import p from"../core/super-openable.js";const c="details",m=d(c);let f=class Details extends p{constructor(){super(...arguments),this.fill=!1,this.summary=""}render(){return n`<dl part="root" ${r(this.observedRecord)}><dt part="title" @click="${()=>this.toggle()}"><span part="summary">${this.summary||e("summary")}</span> <span><i part="icon">${a()}</i></span></dt><dd part="details" @click="${this.fill?()=>this.toggle():null}"><div style="min-height: 0;">${e()}</div></dd></dl>`}};t([l({type:Boolean})],f.prototype,"fill",void 0),t([l()],f.prototype,"summary",void 0),f=t([i(c),o(s`:host{${m}--icon-deg-open:0deg;${m}--icon-deg-close:90deg;${m}--icon-space:0.3em;${m}--summary-direction:row;${m}--transition:.3s;display:block;height:-moz-fit-content;height:fit-content;transition:var(${m}--transition)}[part=root]{height:100%;overflow:hidden;position:relative}[part=title]{align-items:center;background:inherit;direction:ltr;display:flex;flex-direction:var(${m}--summary-direction);flex-wrap:nowrap;height:100%;justify-content:space-between}[part=details]{display:grid;grid-template-rows:0fr;overflow:hidden;transition:var(${m}--transition);transition-property:grid-template-rows}:host([open]) [part=details]{grid-template-rows:1fr}:host([float]) [part=details]{position:absolute;top:100%}[part=icon]{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;padding:var(${m}--icon-space);transform:rotate(var(${m}--icon-deg-close));transition:var(${m}--transition)}:host([open]) [part=icon]{transform:rotate(var(${m}--icon-deg-open))}`)],f);var h=f;export{f as Details,h as default};
1
+ import{__decorate as t}from"tslib";import{godown as o,styles as i,attr as e,htmlSlot as r}from"@godown/element";import a from"@godown/f7-icon/icons/chevron-down.js";import{css as s,html as l}from"lit";import{property as n}from"lit/decorators.js";import{scopePrefix as p}from"../core/global-style.js";import d from"../core/super-openable.js";const c="details",m=p(c);let f=class Details extends d{constructor(){super(...arguments),this.float=!1,this.fill=!1,this.summary=""}render(){return l`<dl part="root" ${e(this.observedRecord)}><dt part="title" @click="${()=>this.toggle()}"><span part="summary">${this.summary||r("summary")}</span> <span part="icon">${a()}</span></dt><dd part="details" @click="${this.fill?()=>this.toggle():null}"><div style="min-height: 0;">${r()}</div></dd></dl>`}};t([n({type:Boolean})],f.prototype,"float",void 0),t([n({type:Boolean})],f.prototype,"fill",void 0),t([n()],f.prototype,"summary",void 0),f=t([o(c),i(s`:host{${m}--icon-deg-open:0deg;${m}--icon-deg-close:90deg;${m}--icon-space:.22em;display:block;transition:.3s}[part=root]{height:100%;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;transition:inherit}[part=details]{grid-template-rows:0fr;overflow:hidden}: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;padding:var(${m}--icon-space);transform:rotate(var(${m}--icon-deg-close))}:host([open]) [part=icon]{transform:rotate(var(${m}--icon-deg-open))}`)],f);var h=f;export{f as Details,h as default};
2
2
  //# sourceMappingURL=details.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"details.js","sources":["../src/components/details.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Details","SuperOpenable","constructor","this","fill","summary","render","html","attr","observedRecord","toggle","htmlSlot","svgCaretDown","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","Details$1"],"mappings":"qVAQA,MAAMA,EAAY,UAEZC,EAAWC,EAAYF,GAY7B,IAAMG,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAIC,MAAG,EAMPD,KAAOE,QAAG,GAEA,MAAAC,GACR,OAAOC,CAAI,mBAGLC,EAAKL,KAAKM,4CAIA,IAAMN,KAAKO,kCAEEP,KAAKE,SAAWM,EAAS,0CAE7BC,iDAKVT,KAAKC,KAAO,IAAMD,KAAKO,SAAW,qCAEbC,wBA3BtCE,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACNhB,EAAAiB,UAAA,YAAAC,GAMZL,EAAA,CADCC,KACWd,EAAAiB,UAAA,eAAAC,GAXRlB,EAAOa,EAAA,CAFZM,EAAOtB,GACPuB,EAAOC,CAAG,SAASvB,yBAAgCA,2BAAkCA,uBAA8BA,4BAAmCA,6FAAoGA,6KAAoLA,sKAA6KA,yQAAgRA,uCAA8CA,sCAA6CA,iEAAwEA,wBACzgCE,GAuCN,IAAAsB,EAAetB"}
1
+ {"version":3,"file":"details.js","sources":["../src/components/details.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Details","SuperOpenable","constructor","this","float","fill","summary","render","html","attr","observedRecord","toggle","htmlSlot","svgCaretDown","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","Details$1"],"mappings":"qVAQA,MAAMA,EAAY,UAEZC,EAAWC,EAAYF,GAY7B,IAAMG,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAKC,OAAG,EAMRD,KAAIE,MAAG,EAMPF,KAAOG,QAAG,GAEA,MAAAC,GACR,OAAOC,CAAI,mBAGLC,EAAKN,KAAKO,4CAIA,IAAMP,KAAKQ,kCAEER,KAAKG,SAAWM,EAAS,uCAC5BC,6CAIXV,KAAKE,KAAO,IAAMF,KAAKQ,SAAW,qCAEbC,wBA/BtCE,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACLjB,EAAAkB,UAAA,aAAAC,GAMbL,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACNjB,EAAAkB,UAAA,YAAAC,GAMZL,EAAA,CADCC,KACWf,EAAAkB,UAAA,eAAAC,GAjBRnB,EAAOc,EAAA,CAFZM,EAAOvB,GACPwB,EAAOC,CAAG,SAASxB,yBAAgCA,2BAAkCA,umBAA8mBA,uCAA8CA,sEAA6EA,wBACzzBE,GA2CN,IAAAuB,EAAevB"}
@@ -1,7 +1,6 @@
1
1
  import { type HandlerEvent } from "@godown/element";
2
2
  import { type PropertyValues, type TemplateResult } from "lit";
3
3
  import { SuperOpenable } from "../core/super-openable.js";
4
- import { type DirectionCardinal, type DirectionCenter, type DirectionCorner } from "../core/direction.js";
5
4
  /**
6
5
  * {@linkcode Dialog} similar to `<dialog>`.
7
6
  *
@@ -13,14 +12,11 @@ import { type DirectionCardinal, type DirectionCenter, type DirectionCorner } fr
13
12
  * @category feedback
14
13
  */
15
14
  declare class Dialog extends SuperOpenable {
16
- /**
17
- * The direction of the dialog container.
18
- */
19
- direction: DirectionCardinal | DirectionCorner | DirectionCenter;
20
15
  /**
21
16
  * Indicates whether the dialog should be displayed as a modal.
22
17
  */
23
- modal: boolean;
18
+ set modal(value: boolean);
19
+ get modal(): boolean;
24
20
  /**
25
21
  * The keys will close the dialog when pressed.
26
22
  */
@@ -29,8 +25,10 @@ declare class Dialog extends SuperOpenable {
29
25
  * Indicates whether the modal has been invoked.
30
26
  */
31
27
  private __modalInvoke;
28
+ protected _dialog: HTMLDialogElement;
32
29
  protected render(): TemplateResult<1>;
33
30
  showModal(): void;
31
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
34
32
  private __submitEvent;
35
33
  private __keydownEvent;
36
34
  protected updated(changedProperties: PropertyValues): void;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../src/components/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EAErB,MAAM,sBAAsB,CAAC;AAK9B;;;;;;;;;GASG;AACH,cAKM,MAAO,SAAQ,aAAa;IAChC;;OAEG;IAEH,SAAS,EAAE,iBAAiB,GAAG,eAAe,GAAG,eAAe,CAAC;IAEjE;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,GAAG,SAAY;IAEf;;OAEG;IACH,OAAO,CAAC,aAAa,CAAS;IAE9B,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;IAIrC,SAAS,IAAI,IAAI;IAQjB,OAAO,CAAC,aAAa,CAAqC;IAC1D,OAAO,CAAC,cAAc,CAAqC;IAE3D,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAc1D,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,I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O,EAAE,MAAM,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as o,styles as e,attr as i,htmlSlot as s}from"@godown/element";import{css as n,html as d}from"lit";import{property as a}from"lit/decorators.js";import{scopePrefix as r}from"../core/global-style.js";import l from"../core/super-openable.js";import{directionInsetAlign as h}from"../core/direction.js";const p="dialog",m=r(p);let c=class Dialog extends l{constructor(){super(...arguments),this.modal=!1,this.key="Escape",this.__modalInvoke=!1}render(){return d`<div part="root" ${i(this.observedRecord)}><div part="modal"></div><div part="container" direction-inset-align>${s()}</div></div>`}showModal(){this.modal||(this.modal=!0,this.__modalInvoke=!0),this.show()}updated(t){t.has("open")&&(this.open?(this.__submitEvent=this.events.add(this,"submit",this._handelSubmit),this.key&&(this.__keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this)))):(this.events.remove(this,"submit",this.__submitEvent),this.events.remove(document,"keydown",this.__keydownEvent)))}_handleKeydown(t){const o=this.key.split(/[\s,]/);(o.includes(t.key)||o.includes(t.code))&&(t.preventDefault(),this.close())}_handelSubmit(t){"dialog"===t.target.method&&(t.preventDefault(),this.close())}close(){this.__modalInvoke&&(this.modal=!1,this.__modalInvoke=!1),this.open=!1}};t([a()],c.prototype,"direction",void 0),t([a({type:Boolean,reflect:!0})],c.prototype,"modal",void 0),t([a()],c.prototype,"key",void 0),c=t([o(p),e(h,n`:host{${m}--background:none;${m}--background-modal:#000;${m}--opacity-modal:0.2;background:var(${m}--background);inset:0;pointer-events:none;position:fixed;z-index:1}:host(:not([open])){visibility:hidden}:host([modal]) [part=modal]{opacity:var(${m}--opacity-modal);pointer-events:all}[part=modal]{background:var(${m}--background-modal);height:100%;opacity:0;position:absolute;visibility:inherit;width:100%}[part=root]{align-items:center;display:flex;height:100%;justify-content:center;position:relative;width:100%}[part=container]{pointer-events:all;position:absolute}`)],c);var v=c;export{c as Dialog,v as default};
1
+ import{__decorate as t}from"tslib";import{godown as o,styles as e,attr as i,htmlSlot as s}from"@godown/element";import{css as a,html as n}from"lit";import{property as d,query as l}from"lit/decorators.js";import{scopePrefix as r}from"../core/global-style.js";import h from"../core/super-openable.js";const m="dialog",p=r(m);let c=class Dialog extends h{constructor(){super(...arguments),this.key="Escape",this.__modalInvoke=!1}set modal(t){this.contents=t}get modal(){return this.contents}render(){return n`<dialog part="root" ${i(this.observedRecord)}>${s()}</dialog>`}showModal(){this.modal=!0,this.__modalInvoke=!0,this.show()}attributeChangedCallback(t,o,e){super.attributeChangedCallback(t,o,e),"open"===t&&(this.open?this.modal?this._dialog.showModal():this._dialog.show():this._dialog.close())}updated(t){t.has("open")&&(this.open?(this.__submitEvent=this.events.add(this,"submit",this._handelSubmit),this.key&&(this.__keydownEvent=this.events.add(document,"keydown",this._handleKeydown.bind(this)))):(this.events.remove(this,"submit",this.__submitEvent),this.events.remove(document,"keydown",this.__keydownEvent)))}_handleKeydown(t){const o=this.key.split(/[\s,]/);(o.includes(t.key)||o.includes(t.code))&&(t.preventDefault(),this.close())}_handelSubmit(t){"dialog"===t.target.method&&(t.preventDefault(),this.close())}close(){this.__modalInvoke&&(this.modal=!1,this.__modalInvoke=!1),this.open=!1}};t([d({type:Boolean,reflect:!0})],c.prototype,"modal",null),t([d()],c.prototype,"key",void 0),t([l("dialog")],c.prototype,"_dialog",void 0),c=t([o(m),e(a`:host{${p}--background-modal:#000;${p}--opacity-modal:0.2;background:none;display:block;left:50%;margin:auto;position:fixed;top:50%;transform:translate(-50%,-50%);width:-moz-fit-content;width:fit-content}:host(:not([open])){visibility:hidden}:host([contents]) dialog{position:fixed}dialog{background:inherit;position:relative}::backdrop{background:var(${p}--background-modal);opacity:var(${p}--opacity-modal)}`)],c);var u=c;export{c as Dialog,u as default};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sources":["../src/components/dialog.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Dialog","SuperOpenable","constructor","this","modal","key","__modalInvoke","render","html","attr","observedRecord","htmlSlot","showModal","show","updated","changedProperties","has","open","__submitEvent","events","add","_handelSubmit","__keydownEvent","document","_handleKeydown","bind","remove","e","keys","split","includes","code","preventDefault","close","target","method","__decorate","property","prototype","undefined","type","Boolean","reflect","godown","styles","directionInsetAlign","css","Dialog$1"],"mappings":"2VAaA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAWEC,KAAKC,OAAG,EAMRD,KAAGE,IAAG,SAKEF,KAAaG,eAAG,EAEd,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKN,KAAKO,uFAORC,kBAMV,SAAAC,GACOT,KAAKC,QACRD,KAAKC,OAAQ,EACbD,KAAKG,eAAgB,GAEvBH,KAAKU,OAMG,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,UACpBb,KAAKc,MACPd,KAAKe,cAAgBf,KAAKgB,OAAOC,IAAIjB,KAAM,SAAUA,KAAKkB,eACtDlB,KAAKE,MACPF,KAAKmB,eAAiBnB,KAAKgB,OAAOC,IAAIG,SAAU,UAAWpB,KAAKqB,eAAeC,KAAKtB,UAGtFA,KAAKgB,OAAOO,OAAOvB,KAAM,SAAUA,KAAKe,eACxCf,KAAKgB,OAAOO,OAAOH,SAAU,UAAWpB,KAAKmB,kBAKzC,cAAAE,CAAeG,GACvB,MAAMC,EAAOzB,KAAKE,IAAIwB,MAAM,UACxBD,EAAKE,SAASH,EAAEtB,MAAQuB,EAAKE,SAASH,EAAEI,SAC1CJ,EAAEK,iBACF7B,KAAK8B,SAIC,aAAAZ,CAAcM,GACE,WAApBA,EAAEO,OAAOC,SACXR,EAAEK,iBACF7B,KAAK8B,SAIT,KAAAA,GACM9B,KAAKG,gBACPH,KAAKC,OAAQ,EACbD,KAAKG,eAAgB,GAEvBH,KAAKc,MAAO,IAjFdmB,EAAA,CADCC,KAC+DrC,EAAAsC,UAAA,iBAAAC,GAMhEH,EAAA,CADCC,EAAS,CAAEG,KAAMC,QAASC,SAAS,KACvB1C,EAAAsC,UAAA,aAAAC,GAMbH,EAAA,CADCC,KACarC,EAAAsC,UAAA,WAAAC,GAjBVvC,EAAMoC,EAAA,CALXO,EAAO9C,GACP+C,EACCC,EACAC,CAAG,SAAShD,sBAA6BA,4BAAmCA,uCAA8CA,qJAA4JA,oEAA2EA,kQAE7VE,GA0FN,IAAA+C,EAAe/C"}
1
+ {"version":3,"file":"dialog.js","sources":["../src/components/dialog.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Dialog","SuperOpenable","constructor","this","key","__modalInvoke","modal","value","contents","render","html","attr","observedRecord","htmlSlot","showModal","show","attributeChangedCallback","name","_old","super","open","_dialog","close","updated","changedProperties","has","__submitEvent","events","add","_handelSubmit","__keydownEvent","document","_handleKeydown","bind","remove","e","keys","split","includes","code","preventDefault","target","method","__decorate","property","type","Boolean","reflect","prototype","undefined","query","godown","styles","css","Dialog$1"],"mappings":"2SAOA,MAAMA,EAAY,SACZC,EAAWC,EAAYF,GAc7B,IAAMG,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAiBEC,KAAGC,IAAG,SAKED,KAAaE,eAAG,EAjBxB,SAAIC,CAAMC,GACRJ,KAAKK,SAAWD,EAGlB,SAAID,GACF,OAAOH,KAAKK,SAiBJ,MAAAC,GACR,OAAOC,CAAI,uBAGLC,EAAKR,KAAKS,mBAEVC,eAKR,SAAAC,GACEX,KAAKG,OAAQ,EACbH,KAAKE,eAAgB,EACrBF,KAAKY,OAGP,wBAAAC,CAAyBC,EAAcC,EAAqBX,GAC1DY,MAAMH,yBAAyBC,EAAMC,EAAMX,GAC9B,SAATU,IACEd,KAAKiB,KACHjB,KAAKG,MACPH,KAAKkB,QAAQP,YAEbX,KAAKkB,QAAQN,OAGfZ,KAAKkB,QAAQC,SAQT,OAAAC,CAAQC,GACZA,EAAkBC,IAAI,UACpBtB,KAAKiB,MACPjB,KAAKuB,cAAgBvB,KAAKwB,OAAOC,IAAIzB,KAAM,SAAUA,KAAK0B,eACtD1B,KAAKC,MACPD,KAAK2B,eAAiB3B,KAAKwB,OAAOC,IAAIG,SAAU,UAAW5B,KAAK6B,eAAeC,KAAK9B,UAGtFA,KAAKwB,OAAOO,OAAO/B,KAAM,SAAUA,KAAKuB,eACxCvB,KAAKwB,OAAOO,OAAOH,SAAU,UAAW5B,KAAK2B,kBAKzC,cAAAE,CAAeG,GACvB,MAAMC,EAAOjC,KAAKC,IAAIiC,MAAM,UACxBD,EAAKE,SAASH,EAAE/B,MAAQgC,EAAKE,SAASH,EAAEI,SAC1CJ,EAAEK,iBACFrC,KAAKmB,SAIC,aAAAO,CAAcM,GACE,WAApBA,EAAEM,OAAOC,SACXP,EAAEK,iBACFrC,KAAKmB,SAIT,KAAAA,GACMnB,KAAKE,gBACPF,KAAKG,OAAQ,EACbH,KAAKE,eAAgB,GAEvBF,KAAKiB,MAAO,IA3FduB,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KAGpC/C,EAAAgD,UAAA,QAAA,MAUAL,EAAA,CADCC,KACa5C,EAAAgD,UAAA,WAAAC,GAQJN,EAAA,CADTO,EAAM,WAC6BlD,EAAAgD,UAAA,eAAAC,GAzBhCjD,EAAM2C,EAAA,CAFXQ,EAAOtD,GACPuD,EAAOC,CAAG,SAASvD,4BAAmCA,8TAAqUA,oCAA2CA,uBACjaE,GAoGN,IAAAsD,EAAetD"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as o,styles as r,attr as e}from"@godown/element";import{css as i,html as a}from"lit";import{property as s}from"lit/decorators.js";import{cssGlobalVars as l,GlobalStyle as d}from"../core/global-style.js";let c=class Divider extends d{constructor(){super(...arguments),this.vertical=!1}render(){return a`<div part="root" ${e(this.observedRecord)}></div>`}};t([s({type:Boolean,reflect:!0})],c.prototype,"vertical",void 0),c=t([o("divider"),r(i`:host{background:currentColor;color:var(${l.passive});display:block;height:.05em;margin:auto;width:100%}:host([vertical]){height:max(1em,100%);width:.05em}:host([contents]) [part=root]{background:currentColor;display:block;height:.05em;margin:auto;width:100%}[part=root]{display:contents}`)],c);var m=c;export{c as Divider,m as default};
1
+ import{__decorate as t}from"tslib";import{godown as o,styles as r,attr as e}from"@godown/element";import{css as i,html as s}from"lit";import{property as l}from"lit/decorators.js";import{cssGlobalVars as a,GlobalStyle as d}from"../core/global-style.js";let c=class Divider extends d{constructor(){super(...arguments),this.vertical=!1}render(){return s`<div part="root" ${e(this.observedRecord)}></div>`}};t([l({type:Boolean,reflect:!0})],c.prototype,"vertical",void 0),c=t([o("divider"),r(i`:host{background:currentColor;color:var(${a.passive});display:block;height:.05em;width:100%}:host([vertical]){height:100%;width:.05em}:host([contents]) [part=root]{background:currentColor;display:block;height:.05em;margin:auto;width:100%}[part=root]{display:contents}`)],c);var p=c;export{c as Divider,p as default};
2
2
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../src/components/divider.ts"],"sourcesContent":null,"names":["Divider","GlobalStyle","constructor","this","vertical","render","html","attr","observedRecord","__decorate","property","type","Boolean","reflect","prototype","undefined","godown","styles","css","cssGlobalVars","passive","Divider$1"],"mappings":"4PAeA,IAAMA,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAQC,UAAG,EAED,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKJ,KAAKK,2BANlBC,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACpBb,EAAAc,UAAA,gBAAAC,GALZf,EAAOS,EAAA,CAFZO,EAPiB,WAQjBC,EAAOC,CAAG,2CAA2CC,EAAcC,wPAC9DpB,GAiBN,IAAAqB,EAAerB"}
1
+ {"version":3,"file":"divider.js","sources":["../src/components/divider.ts"],"sourcesContent":null,"names":["Divider","GlobalStyle","constructor","this","vertical","render","html","attr","observedRecord","__decorate","property","type","Boolean","reflect","prototype","undefined","godown","styles","css","cssGlobalVars","passive","Divider$1"],"mappings":"4PAeA,IAAMA,EAAN,MAAMA,gBAAgBC,EAAtB,WAAAC,uBAKEC,KAAQC,UAAG,EAED,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKJ,KAAKK,2BANlBC,EAAA,CADCC,EAAS,CAAEC,KAAMC,QAASC,SAAS,KACpBb,EAAAc,UAAA,gBAAAC,GALZf,EAAOS,EAAA,CAFZO,EAPiB,WAQjBC,EAAOC,CAAG,2CAA2CC,EAAcC,mOAC9DpB,GAiBN,IAAAqB,EAAerB"}
@@ -1,7 +1,13 @@
1
1
  import { type TemplateResult } from "lit";
2
2
  import { GlobalStyle } from "../core/global-style.js";
3
3
  /**
4
- * {@linkcode Layout} renders slot and optional top header, bottom footer.
4
+ * {@linkcode Layout} renders main content, top header, bottom footer.
5
+ *
6
+ * If `sticky` is set to `true`, the header will be sticky.
7
+ *
8
+ * Main content will take up the remaining space.
9
+ *
10
+ * Element display should be `(inline-)flex` or `(inline-)grid`.
5
11
  *
6
12
  * @slot - The main content of the layout.
7
13
  * @slot header - The header of the layout.
@@ -10,15 +16,15 @@ import { GlobalStyle } from "../core/global-style.js";
10
16
  */
11
17
  declare class Layout extends GlobalStyle {
12
18
  /**
13
- * If true, remove the header slot.
19
+ * @deprecated Omit header slot instead.
14
20
  */
15
21
  noHeader: boolean;
16
22
  /**
17
- * If true, remove the footer slot.
23
+ * @deprecated Omit footer slot instead.
18
24
  */
19
25
  noFooter: boolean;
20
26
  /**
21
- * If true, header will sticky.
27
+ * If `true`, header will sticky.
22
28
  */
23
29
  sticky: boolean;
24
30
  protected render(): TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/components/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;;;GAOG;AACH,cAEM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAOtC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/components/layout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,KAAK,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD;;;;;;;;;;;;;GAaG;AACH,cAEM,MAAO,SAAQ,WAAW;IAC9B;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IAEH,MAAM,UAAS;IAEf,SAAS,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC,CAAC;CAGtC;AAED,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import{__decorate as o}from"tslib";import{godown as t,styles as e,attr as r,htmlSlot as i}from"@godown/element";import{css as a,html as n}from"lit";import{property as s}from"lit/decorators.js";import{GlobalStyle as p}from"../core/global-style.js";let d=class Layout extends p{constructor(){super(...arguments),this.noHeader=!1,this.noFooter=!1,this.sticky=!1}render(){return n`<div part="root" ${r(this.observedRecord)}>${this.noHeader?"":n`<header part="header">${i("header")}</header>`}<main part="main">${i()}</main>${this.noFooter?"":n`<footer part="footer">${i("footer")}</footer>`}</div>`}};o([s({type:Boolean})],d.prototype,"noHeader",void 0),o([s({type:Boolean})],d.prototype,"noFooter",void 0),o([s({type:Boolean})],d.prototype,"sticky",void 0),d=o([t("layout"),e(a`:host,:host([contents]) [part=root]{display:flex;flex-direction:column;min-height:100%}[part=root]{display:contents}[sticky] header{position:sticky;top:0;z-index:1}[part=main]{flex:1;position:relative;width:100%}footer,header,main{width:100%}`)],d);var l=d;export{d as Layout,l as default};
1
+ import{__decorate as t}from"tslib";import{godown as o,styles as r,attr as e,htmlSlot as i}from"@godown/element";import{css as a,html as s}from"lit";import{property as d}from"lit/decorators.js";import{GlobalStyle as p}from"../core/global-style.js";let n=class Layout extends p{constructor(){super(...arguments),this.sticky=!1}render(){return s`<div part="root" ${e(this.observedRecord)}><header part="header">${i("header")}</header><main part="main">${i()}</main><footer part="footer">${i("footer")}</footer></div>`}};t([d({type:Boolean})],n.prototype,"sticky",void 0),n=t([o("layout"),r(a`:host{flex-direction:column;grid-template-rows:auto 1fr auto;min-height:100%;width:100%}:host,:host([contents]) [part=root]{display:grid}[part=root]{display:contents}[part=main]{flex:1;width:100%}[part=footer],[part=header]{flex-shrink:0;width:100%}[sticky] header{position:sticky;top:0}`)],n);var l=n;export{n as Layout,l as default};
2
2
  //# sourceMappingURL=layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sources":["../src/components/layout.ts"],"sourcesContent":null,"names":["Layout","GlobalStyle","constructor","this","noHeader","noFooter","sticky","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","Layout$1"],"mappings":"uPAkBA,IAAMA,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAKEC,KAAQC,UAAG,EAMXD,KAAQE,UAAG,EAMXF,KAAMG,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKN,KAAKO,mBAETP,KAAKC,SAIJ,GAHAI,CAAI,yBACsBG,EAAS,yCAGnBA,aACjBR,KAAKE,SAIJ,GAHAG,CAAI,yBACsBG,EAAS,+BA5B7CC,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACFf,EAAAgB,UAAA,gBAAAC,GAMhBL,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACFf,EAAAgB,UAAA,gBAAAC,GAMhBL,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJf,EAAAgB,UAAA,cAAAC,GAjBVjB,EAAMY,EAAA,CAFXM,EAViB,UAWjBC,EAAOC,CAAG,uPACLpB,GAyCN,IAAAqB,EAAerB"}
1
+ {"version":3,"file":"layout.js","sources":["../src/components/layout.ts"],"sourcesContent":null,"names":["Layout","GlobalStyle","constructor","this","sticky","render","html","attr","observedRecord","htmlSlot","__decorate","property","type","Boolean","prototype","undefined","godown","styles","css","Layout$1"],"mappings":"uPAwBA,IAAMA,EAAN,MAAMA,eAAeC,EAArB,WAAAC,uBAeEC,KAAMC,QAAG,EAEC,MAAAC,GACR,OAAOC,CAAI,oBAGLC,EAAKJ,KAAKK,yCAEYC,EAAS,uCACbA,mCACIA,EAAS,6BAVvCC,EAAA,CADCC,EAAS,CAAEC,KAAMC,WACJb,EAAAc,UAAA,cAAAC,GAfVf,EAAMU,EAAA,CAFXM,EAhBiB,UAiBjBC,EAAOC,CAAG,oSACLlB,GA+BN,IAAAmB,EAAenB"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{godown as e,styles as i,omit as r,attr as s,loop as n,tokenList as u}from"@godown/element";import{css as o,html as l}from"lit";import{property as c,state as a}from"lit/decorators.js";import{scopePrefix as h,cssGlobalVars as p}from"../core/global-style.js";import{SuperInput as d}from"../core/super-input.js";const b="split",f=h(b);let v=class Split extends d{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}get observedRecord(){return r(super.observedRecord,"outline-type")}render(){return l`<div part="root" ${s(this.observedRecord)}>${n(this.len,(t=>l`<span part="input-box" outline-type="${this.outlineType}" class="${u({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([c({type:Number})],v.prototype,"len",void 0),t([c({type:Number})],v.prototype,"index",void 0),t([a()],v.prototype,"current",void 0),t([a()],v.prototype,"currentValue",void 0),v=t([e(b),i(o`:host{border-radius:1px;display:block;width:-moz-fit-content;width:fit-content;${f}--size:1.45em;${f}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${f}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{align-items:center;display:inline-flex;height:var(${f}--size);justify-content:center;width:var(${f}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus,[part=input-box]:active{${p.input}-outline-color:var(${p.active})}`)],v);var m=v;export{v as Split,m as default};
1
+ import{__decorate as t}from"tslib";import{godown as e,styles as i,omit as r,attr as s,loop as n,tokenList as u}from"@godown/element";import{css as o,html as l}from"lit";import{property as c,state as a}from"lit/decorators.js";import{scopePrefix as h,cssGlobalVars as p}from"../core/global-style.js";import{SuperInput as d}from"../core/super-input.js";const b="split",f=h(b);let v=class Split extends d{constructor(){super(...arguments),this.len=6,this.index=-1,this.current=-1,this.currentValue=[]}get observedRecord(){return r(super.observedRecord,"outline-type")}render(){return l`<div part="root" ${s(this.observedRecord)}>${n(this.len,(t=>l`<span part="input-box" outline-type="${this.outlineType}" class="${u({focus:this.current===t})}" @click="${this.disabled?null:()=>this.focusAt(t)}">${this.currentValue[t]}</span>`))} <input part="input" id="${this.makeId}" @blur="${this.blur}" @input="${this._handleInput}" .value="${this.value.padStart(this.len," ")}"></div>`}connectedCallback(){super.connectedCallback(),this.reset()}_handleInput(t){t.stopPropagation(),this.compositing||(this.fillInput(t.data),this.value=this.currentValue.join(""),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}fillInput(t){if(null===t){if(null!==this.currentValue[this.current])this.currentValue[this.current]=null;else{this.currentValue[this.current-1]=null;const t=this.currentValue.findLastIndex((t=>null!==t));this.current=this.current-1<0?t<0?0:t:this.current-1}return}const e=t.length>1;if(this.currentValue[this.current]=t[0],this.current+1>=this.len?(this.current=this.currentValue.indexOf(null),-1===this.current&&this.blur()):this.current+=1,e){const e=t.slice(1);e&&this.fillInput(e)}}focus(){this.focusAt(this.current),super.focus()}focusAt(t){this.current=t,this._input.focus(),this.dispatchEvent(new CustomEvent("focus",{detail:t,bubbles:!0,composed:!0}))}blur(){this._input.blur(),this.current=-1,super.blur(),this.dispatchEvent(new CustomEvent("blur",{bubbles:!0,composed:!0}))}reset(){this.current=-1,this.value=this.default,this.currentValue=this.value.split("").concat(Array(this.len-this.value.length).fill(null)),this.index>-1&&(this.current=this.index)}};t([c({type:Number})],v.prototype,"len",void 0),t([c({type:Number})],v.prototype,"index",void 0),t([a()],v.prototype,"current",void 0),t([a()],v.prototype,"currentValue",void 0),v=t([e(b),i(o`:host{border-radius:.1em;display:block;width:-moz-fit-content;width:fit-content;${f}--size:1.45em;${f}--gap:.25em}:host([contents]) [part=root]{width:-moz-fit-content;width:fit-content}[part=root]{display:flex;gap:var(${f}--gap);justify-content:space-between;position:relative;width:100%}[part=input-box],[part=root]{border-radius:inherit;vertical-align:top}[part=input-box]{align-items:center;display:inline-flex;height:var(${f}--size);justify-content:center;width:var(${f}--size)}[part=input]{background:none;height:100%;opacity:0;position:absolute;width:100%;z-index:-1}.focus,[part=input-box]:active{${p.input}-outline-color:var(${p.active})}`)],v);var m=v;export{v as Split,m as default};
2
2
  //# sourceMappingURL=split.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","observedRecord","omit","super","render","html","attr","loop","outlineType","tokenList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","Array","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","input","active","Split$1"],"mappings":"8VAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAElC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,gBAG1B,MAAAG,GACR,OAAOC,CAAI,oBAGLC,EAAKV,KAAKK,mBAEVM,EACAX,KAAKC,KACJC,GAAkBO,CAAI,wCAGHT,KAAKY,uBACZC,EAAU,CAAEC,MAAOd,KAAKG,UAAYD,gBACnCF,KAAKe,SAAW,KAAO,IAAMf,KAAKgB,QAAQd,OAElDF,KAAKI,aAAaF,yCAMlBF,KAAKiB,kBACHjB,KAAKkB,iBACHlB,KAAKmB,yBAGbnB,KAAKoB,MAAMC,SAASrB,KAAKC,IAAK,eAOxC,iBAAAqB,GACEf,MAAMe,oBAC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AAAV,GACEvB,KAAKG,SAAY,EACjBH,KAAKoB,MAAQpB,KAAK6C,QAClB7C,KAAKI,aAAeJ,KAAKoB,MAAM0B,MAAM,IAAIC,OAAOC,MAAMhD,KAAKC,IAAMD,KAAKoB,MAAMmB,QAAQU,KAAK,OACrFjD,KAAKE,WACPF,KAAKG,QAAUH,KAAKE,SAtJxBgD,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACXxD,EAAAyD,UAAA,WAAAC,GAMPL,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACRxD,EAAAyD,UAAA,aAAAC,GAGVL,EAAA,CADCM,KACW3D,EAAAyD,UAAA,eAAAC,GAGZL,EAAA,CADCM,KACmC3D,EAAAyD,UAAA,oBAAAC,GAjBhC1D,EAAKqD,EAAA,CAFVO,EAAO/D,GACPgE,EAAOC,CAAG,kFAAkFhE,kBAAyBA,wHAA+HA,+MAAsNA,6CAAoDA,sIAA6IiE,EAAcC,2BAA2BD,EAAcE,aAC7rBjE,GAgKN,IAAAkE,EAAelE"}
1
+ {"version":3,"file":"split.js","sources":["../src/components/split.ts"],"sourcesContent":null,"names":["protoName","cssScope","scopePrefix","Split","SuperInput","constructor","this","len","index","current","currentValue","observedRecord","omit","super","render","html","attr","loop","outlineType","tokenList","focus","disabled","focusAt","makeId","blur","_handleInput","value","padStart","connectedCallback","reset","e","stopPropagation","compositing","fillInput","data","join","dispatchEvent","CustomEvent","detail","composed","bubbles","lastNotNull","findLastIndex","a","multiple","length","indexOf","after","slice","i","_input","default","split","concat","Array","fill","__decorate","property","type","Number","prototype","undefined","state","godown","styles","css","cssGlobalVars","input","active","Split$1"],"mappings":"8VAOA,MAAMA,EAAY,QACZC,EAAWC,EAAYF,GAiB7B,IAAMG,EAAN,MAAMA,cAAcC,EAApB,WAAAC,uBAKEC,KAAGC,IAAG,EAMND,KAAKE,OAAK,EAGVF,KAAOG,SAAK,EAGZH,KAAYI,aAAsB,GAElC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eA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AUc,IAKrB,KAAA3B,GACEd,KAAKgB,QAAQhB,KAAKG,SAClBI,MAAMO,QAGR,OAAAE,CAAQ2B,GACN3C,KAAKG,QAAUwC,EACf3C,KAAK4C,OAAO9B,QACZd,KAAK8B,cAAc,IAAIC,YAAY,QAAS,CAAEC,OAAQW,EAAGT,SAAS,EAAMD,UAAU,KAGpF,IAAAf,GACElB,KAAK4C,OAAO1B,OACZlB,KAAKG,SAAY,EACjBI,MAAMW,OACNlB,KAAK8B,cAAc,IAAIC,YAAY,OAAQ,CAAEG,SAAS,EAAMD,UAAU,KAGxE,KAAAV,GACEvB,KAAKG,SAAY,EACjBH,KAAKoB,MAAQpB,KAAK6C,QAClB7C,KAAKI,aAAeJ,KAAKoB,MAAM0B,MAAM,IAAIC,OAAOC,MAAMhD,KAAKC,IAAMD,KAAKoB,MAAMmB,QAAQU,KAAK,OACrFjD,KAAKE,WACPF,KAAKG,QAAUH,KAAKE,SAtJxBgD,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACXxD,EAAAyD,UAAA,WAAAC,GAMPL,EAAA,CADCC,EAAS,CAAEC,KAAMC,UACRxD,EAAAyD,UAAA,aAAAC,GAGVL,EAAA,CADCM,KACW3D,EAAAyD,UAAA,eAAAC,GAGZL,EAAA,CADCM,KACmC3D,EAAAyD,UAAA,oBAAAC,GAjBhC1D,EAAKqD,EAAA,CAFVO,EAAO/D,GACPgE,EAAOC,CAAG,mFAAmFhE,kBAAyBA,wHAA+HA,+MAAsNA,6CAAoDA,sIAA6IiE,EAAcC,2BAA2BD,EAAcE,aAC9rBjE,GAgKN,IAAAkE,EAAelE"}
@@ -15,6 +15,7 @@ export declare const cssGlobalVars: {
15
15
  white: CSSResult;
16
16
  black: CSSResult;
17
17
  color: CSSResult;
18
+ borderRadius: CSSResult;
18
19
  };
19
20
  type PresetsGradientsCSSResult = Record<keyof typeof presetsRGB, Gradients<CSSResult>>;
20
21
  //# sourceMappingURL=global-style.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,cAAc,EAAE,SAAS,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAUlB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"global-style.d.ts","sourceRoot":"","sources":["../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,KAAK,CAAC;AAErD,qBAAa,WAAY,SAAQ,aAAa;CAAG;AACjD,eAAe,WAAW,CAAC;AAI3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAI,GAAG,SAAS,CAE7D;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE1D;AAED,eAAO,MAAM,aAAa,EAAE;IAC1B,cAAc,EAAE,SAAS,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,yBAAyB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,SAAS,CAAC;CAWzB,CAAC;AAEF,KAAK,yBAAyB,GAAG,MAAM,CAAC,MAAM,OAAO,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as t,joinProperties as e,GodownElement as l}from"@godown/element";import{unsafeCSS as n,css as s}from"lit";class GlobalStyle extends l{}const a=t(GlobalStyle.godownConfig.prefix,"-");function i(o,r=1){return c(a+"-".repeat(r)+o)}function c(o){return n(`--${o}`)}const p={clipBackground:i("clip-background",2),active:i("active",2),passive:i("passive",2),_colors:{},input:i("input",2),white:i("color-white",2),black:i("color-black",2),color:i("color",2)};GlobalStyle.styles=[n(`:host{${p.black}:rgb(0 0 0);${p.white}:rgb(255 255 255);`+r(((o,r,t)=>{p._colors[o]||=[],p._colors[o].push(n(p.color+"-"+o+"-"+r));const e=`-${o}-${r}`;return`${p.color+e}:rgb(${t});`}),o).join("")+e([[p.active,`var(${p._colors.blue[5]})`],[p.passive,`var(${p._colors.darkgray[5]})`],[p.clipBackground,`linear-gradient(to bottom, var(${p._colors.lightgray[0]}), var(${p._colors.darkgray[5]}))`]])+"}"),s`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`];export{GlobalStyle,p as cssGlobalVars,GlobalStyle as default,i as scopePrefix,c as variablePrefix};
1
+ import{presetsRGB as o}from"@godown/colors/presets-rgb.js";import{travel as r}from"@godown/colors/travel.js";import{trim as e,joinProperties as t,GodownElement as s}from"@godown/element";import{unsafeCSS as l,css as a}from"lit";class GlobalStyle extends s{}const n=e(GlobalStyle.godownConfig.prefix,"-");function i(o,r=1){return c(n+"-".repeat(r)+o)}function c(o){return l(`--${o}`)}const d={clipBackground:i("clip-background",2),active:i("active",2),passive:i("passive",2),_colors:{},input:i("input",2),white:i("color-white",2),black:i("color-black",2),color:i("color",2),borderRadius:i("border-radius",2)};GlobalStyle.styles=[l(`:host{${d.black}:rgb(0 0 0);${d.white}:rgb(255 255 255);`+r(((o,r,e)=>{d._colors[o]||=[],d._colors[o].push(l(d.color+"-"+o+"-"+r));const t=`-${o}-${r}`;return`${d.color+t}:rgb(${e});`}),o).join("")+t([[d.active,`var(${d._colors.blue[5]})`],[d.passive,`var(${d._colors.darkgray[5]})`],[d.clipBackground,`linear-gradient(to bottom, var(${d._colors.lightgray[0]}), var(${d._colors.darkgray[5]}))`]])+"}"),a`*{border:0;box-sizing:border-box;font-size:100%;font-style:normal;margin:0;outline:0;padding:0}:host{box-sizing:border-box}a{text-decoration:none}span{white-space:nowrap}svg{-webkit-user-select:none;user-select:none}:host([contents]){display:contents}:where(:host([contents]) [part=root]){all:inherit;display:revert}`,a`:host{${d.borderRadius}:0.2em;border-radius:var(${d.borderRadius})}`];export{GlobalStyle,d as cssGlobalVars,GlobalStyle as default,i as scopePrefix,c as variablePrefix};
2
2
  //# sourceMappingURL=global-style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","clipBackground","active","passive","_colors","input","white","black","color","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","blue","darkgray","lightgray","css"],"mappings":"oOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ,OAAOF,GAAOD,EACnD,CAEM,SAAUE,EAAeE,GAC7B,OAAOC,EAAU,KAAKD,IACxB,CAEa,MAAAE,EAST,CACFC,eAAgBR,EAAY,kBAAmB,GAC/CS,OAAQT,EAAY,SAAU,GAC9BU,QAASV,EAAY,UAAW,GAChCW,QAAS,CAA+B,EACxCC,MAAOZ,EAAY,QAAS,GAC5Ba,MAAOb,EAAY,cAAe,GAClCc,MAAOd,EAAY,cAAe,GAClCe,MAAOf,EAAY,QAAS,IAI9BN,YAAYsB,OAAS,CACnBV,EAEI,SAAGC,EAAcO,oBACdP,EAAcM,0BACjBI,GAAO,CAACC,EAAKC,EAAUC,KACrBb,EAAcI,QAAQO,KAAS,GAC/BX,EAAcI,QAAQO,GAAKG,KAAKf,EAAUC,EAAcQ,MAAQ,IAAMG,EAAM,IAAMC,IAClF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUZ,EAAcQ,MAAQO,SACbF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAAClB,EAAcE,OAAQ,OAAOF,EAAcI,QAAQe,KAAK,OACzD,CAACnB,EAAcG,QAAS,OAAOH,EAAcI,QAAQgB,SAAS,OAC9D,CACEpB,EAAcC,eACd,kCAAkCD,EAAcI,QAAQiB,UAAU,YAAYrB,EAAcI,QAAQgB,SAAS,UAGjH,KAEJE,CAAG"}
1
+ {"version":3,"file":"global-style.js","sources":["../src/core/global-style.ts"],"sourcesContent":null,"names":["GlobalStyle","GodownElement","cssvar","trim","godownConfig","prefix","scopePrefix","scope","len","variablePrefix","repeat","variable","unsafeCSS","cssGlobalVars","clipBackground","active","passive","_colors","input","white","black","color","borderRadius","styles","travel","key","gradient","rgb","push","endKey","presetsRGB","join","joinProperties","blue","darkgray","lightgray","css"],"mappings":"oOAKM,MAAOA,oBAAoBC,GAGjC,MAAMC,EAASC,EAAKH,YAAYI,aAAaC,OAAQ,cAErCC,EAAYC,EAAeC,EAAM,GAC/C,OAAOC,EAAeP,EAAS,IAAIQ,OAAOF,GAAOD,EACnD,CAEM,SAAUE,EAAeE,GAC7B,OAAOC,EAAU,KAAKD,IACxB,CAEa,MAAAE,EAUT,CACFC,eAAgBR,EAAY,kBAAmB,GAC/CS,OAAQT,EAAY,SAAU,GAC9BU,QAASV,EAAY,UAAW,GAChCW,QAAS,CAA+B,EACxCC,MAAOZ,EAAY,QAAS,GAC5Ba,MAAOb,EAAY,cAAe,GAClCc,MAAOd,EAAY,cAAe,GAClCe,MAAOf,EAAY,QAAS,GAC5BgB,aAAchB,EAAY,gBAAiB,IAI7CN,YAAYuB,OAAS,CACnBX,EAEI,SAAGC,EAAcO,oBACdP,EAAcM,0BACjBK,GAAO,CAACC,EAAKC,EAAUC,KACrBd,EAAcI,QAAQQ,KAAS,GAC/BZ,EAAcI,QAAQQ,GAAKG,KAAKhB,EAAUC,EAAcQ,MAAQ,IAAMI,EAAM,IAAMC,IAClF,MAAMG,EAAS,IAAIJ,KAAOC,IAE1B,MAAO,GADUb,EAAcQ,MAAQQ,SACbF,KAAO,GAChCG,GAAYC,KAAK,IACpBC,EAAe,CACb,CAACnB,EAAcE,OAAQ,OAAOF,EAAcI,QAAQgB,KAAK,OACzD,CAACpB,EAAcG,QAAS,OAAOH,EAAcI,QAAQiB,SAAS,OAC9D,CACErB,EAAcC,eACd,kCAAkCD,EAAcI,QAAQkB,UAAU,YAAYtB,EAAcI,QAAQiB,SAAS,UAGjH,KAEJE,CAAG,+TACHA,CAAG,SAASvB,EAAcS,wCAAwCT,EAAcS"}
@@ -1,2 +1,2 @@
1
- import{__decorate as t}from"tslib";import{part as e,styles as i,omit as o,htmlSlot as n}from"@godown/element";import{css as r,html as s}from"lit";import{property as p}from"lit/decorators.js";import{cssGlobalVars as a,GlobalStyle as l}from"./global-style.js";import{OutlineBuilder as u}from"./outline.js";const d=r`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:none;color:inherit;height:100%;padding:var(${a.input}-space);width:100%}.input-field [part=icon]{align-items:center;color:var(${a.input}-icon-color);display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(${a.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${a.input}-space)}`,c=r`:host{${a.input}-width:10em;${a.input}-height:1.6em;${a.input}-space:0.2em;${a.input}-control:currentColor;${a.input}-outline-width:.075em;${a.input}-outline-color:var(${a._colors.darkgray[4]});${a.input}-icon-color:var(${a._colors.darkgray[4]});border-radius:.2em}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host(:focus-within){${a.input}-icon-color:currentColor}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let h=class SuperInput extends l{constructor(){super(...arguments),this.autofocus=!1,this.outlineType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return o(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}_handleChange(t){this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0}))}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return s`<label for="${this.makeId}" part="prefix">${n("prefix")}</label>`}_renderSuffix(){return s`<label for="${this.makeId}" part="suffix">${n("suffix")}</label>`}};t([p()],h.prototype,"autocomplete",void 0),t([p({attribute:"outline-type"})],h.prototype,"outlineType",void 0),t([p({type:Boolean,reflect:!0})],h.prototype,"disabled",void 0),t([p({reflect:!0})],h.prototype,"type",void 0),t([p({reflect:!0})],h.prototype,"placeholder",void 0),t([p({reflect:!0})],h.prototype,"name",void 0),t([p()],h.prototype,"value",void 0),t([p()],h.prototype,"default",void 0),t([e("input")],h.prototype,"_input",void 0),h=t([i(d,new u({width:`${a.input}-outline-width`,color:`${a.input}-outline-color`}).styleSheet,c)],h);var f=h;export{h as SuperInput,f as default};
1
+ import{__decorate as t}from"tslib";import{part as e,styles as i,omit as o,htmlSlot as n}from"@godown/element";import{css as r,html as p}from"lit";import{property as s}from"lit/decorators.js";import{cssGlobalVars as a,GlobalStyle as l}from"./global-style.js";import{OutlineBuilder as u}from"./outline.js";const d=r`.input-field{align-items:center;border-radius:inherit;display:flex;height:inherit;position:relative}.input-field [part=input]{background:none;color:inherit;height:100%;padding:var(${a.input}-space);width:100%}.input-field [part=icon]{align-items:center;color:var(${a.input}-icon-color);display:flex;justify-content:center}.input-field [part=prefix],.input-field [part=suffix]{display:flex;height:100%}.input-field [part=suffix] [part=icon]{padding-inline-end:var(${a.input}-space)}.input-field [part=prefix] [part=icon]{padding-inline-start:var(${a.input}-space)}`,c=r`:host{${a.input}-width:10em;${a.input}-height:1.6em;${a.input}-space:0.2em;${a.input}-control:currentColor;${a.input}-outline-width:.075em;${a.input}-outline-color:var(${a._colors.darkgray[4]});${a.input}-icon-color:var(${a._colors.darkgray[4]})}:host([disabled]){cursor:not-allowed;filter:brightness(.85)}:host(:focus-within){${a.input}-icon-color:currentColor}input:disabled{cursor:inherit}input::-ms-clear,input::-ms-reveal{display:none}`;let h=class SuperInput extends l{constructor(){super(...arguments),this.autofocus=!1,this.outlineType="border",this.disabled=!1,this.compositing=!1,this.makeId=Math.random().toString(36).slice(1),this.nameValue=this.namevalue}get observedRecord(){return o(super.observedRecord,"default","value")}set defaultValue(t){this.default=t}get defaultValue(){return this.default}namevalue(){return[this.name,this.value]}reset(){this.value=this.default,this._input.value=this.default}_handleInput(t){t.stopPropagation(),this.compositing||(this.value=t.target.value?.trim(),this.dispatchEvent(new CustomEvent("input",{detail:this.value,composed:!0,bubbles:!0})))}_handleChange(t){this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0}))}connectedCallback(){super.connectedCallback(),this._connectedInit()}_connectedInit(){this.default??=this.value||"",this.value??=this.default}_compositionInit(){this._input&&(this.events.add(this._input,"compositionstart",(()=>this.compositing=!0)),this.events.add(this._input,"compositionend",(t=>{this.compositing=!1,this._handleInput(t)})))}_changeInputType(t){this._input&&(this._input.type=t)}focus(t){this._input?.focus(t)}firstUpdated(){this._compositionInit()}_renderPrefix(){return p`<label for="${this.makeId}" part="prefix">${n("prefix")}</label>`}_renderSuffix(){return p`<label for="${this.makeId}" part="suffix">${n("suffix")}</label>`}};t([s()],h.prototype,"autocomplete",void 0),t([s({attribute:"outline-type"})],h.prototype,"outlineType",void 0),t([s({type:Boolean,reflect:!0})],h.prototype,"disabled",void 0),t([s({reflect:!0})],h.prototype,"type",void 0),t([s({reflect:!0})],h.prototype,"placeholder",void 0),t([s({reflect:!0})],h.prototype,"name",void 0),t([s()],h.prototype,"value",void 0),t([s()],h.prototype,"default",void 0),t([e("input")],h.prototype,"_input",void 0),h=t([i(d,new u({width:`${a.input}-outline-width`,color:`${a.input}-outline-color`}).styleSheet,c)],h);var f=h;export{h as SuperInput,f as default};
2
2
  //# sourceMappingURL=super-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","_colors","darkgray","SuperInput","GlobalStyle","constructor","this","autofocus","outlineType","disabled","compositing","makeId","Math","random","toString","slice","nameValue","namevalue","observedRecord","omit","super","defaultValue","value","default","name","reset","_input","_handleInput","e","stopPropagation","target","trim","dispatchEvent","CustomEvent","detail","composed","bubbles","_handleChange","connectedCallback","_connectedInit","_compositionInit","events","add","_changeInputType","t","type","focus","options","firstUpdated","_renderPrefix","html","htmlSlot","_renderSuffix","__decorate","property","prototype","undefined","attribute","Boolean","reflect","part","styles","OutlineBuilder","width","color","styleSheet","SuperInput$1"],"mappings":"gTAOA,MAAMA,EAAaC,CAAG,uLAAuLC,EAAcC,iFAAiFD,EAAcC,sMAAsMD,EAAcC,gFAAgFD,EAAcC,gBAEtmBC,EAAaH,CAAG,SAASC,EAAcC,oBAAoBD,EAAcC,sBAAsBD,EAAcC,qBAAqBD,EAAcC,8BAA8BD,EAAcC,8BAA8BD,EAAcC,2BAA2BD,EAAcG,QAAQC,SAAS,OAAOJ,EAAcC,wBAAwBD,EAAcG,QAAQC,SAAS,2GAA2GJ,EAAcC,+GAU7e,IAAMI,EAAN,MAAMA,mBAA+BC,EAArC,WAAAC,uBACEC,KAASC,WAAG,EAKZD,KAAWE,YAAgB,SAG3BF,KAAQG,UAAG,EA8BXH,KAAWI,aAAG,EAUJJ,KAAAK,OAAiBC,KAAKC,SAASC,SAAS,IAAIC,MAAM,GAM5DT,KAAAU,UAAiCV,KAAKW,UAhCtC,kBAAIC,GACF,OAAOC,EAAKC,MAAMF,eAAgB,UAAW,SAiB/C,gBAAIG,CAAaC,GACfhB,KAAKiB,QAAUD,EAGjB,gBAAID,GACF,OAAOf,KAAKiB,QAKd,SAAAN,GACE,MAAO,CAACX,KAAKkB,KAAMlB,KAAKgB,OAK1B,KAAAG,GACEnB,KAAKgB,MAAQhB,KAAKiB,QAClBjB,KAAKoB,OAAOJ,MAAQhB,KAAKiB,QAGjB,YAAAI,CAAaC,GACrBA,EAAEC,kB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AAAC,GAGnBH,EAAA,CADCC,EAAS,CAAEK,SAAS,KACTxD,EAAAoD,UAAA,YAAAC,GAGZH,EAAA,CADCC,KACOnD,EAAAoD,UAAA,aAAAC,GAURH,EAAA,CADCC,KACWnD,EAAAoD,UAAA,eAAAC,GAGFH,EAAA,CADTO,EAAK,UAC4BzD,EAAAoD,UAAA,cAAAC,GAlC9BrD,EAAUkD,EAAA,CARfQ,EACCjE,EACA,IAAIkE,EAAe,CACjBC,MAAO,GAAGjE,EAAcC,sBACxBiE,MAAO,GAAGlE,EAAcC,wBACvBkE,WACHjE,IAEIG,GAoIN,IAAA+D,EAAe/D"}
1
+ {"version":3,"file":"super-input.js","sources":["../src/core/super-input.ts"],"sourcesContent":null,"names":["fieldStyle","css","cssGlobalVars","input","inputStyle","_colors","darkgray","SuperInput","GlobalStyle","constructor","this","autofocus","outlineType","disabled","compositing","makeId","Math","random","toString","slice","nameValue","namevalue","observedRecord","omit","super","defaultValue","value","default","name","reset","_input","_handleInput","e","stopPropagation","target","trim","dispatchEvent","CustomEvent","detail","composed","bubbles","_handleChange","connectedCallback","_connectedInit","_compositionInit","events","add","_changeInputType","t","type","focus","options","firstUpdated","_renderPrefix","html","htmlSlot","_renderSuffix","__decorate","property","prototype","undefined","attribute","Boolean","reflect","part","styles","OutlineBuilder","width","color","styleSheet","SuperInput$1"],"mappings":"gTAOA,MAAMA,EAAaC,CAAG,uLAAuLC,EAAcC,iFAAiFD,EAAcC,sMAAsMD,EAAcC,gFAAgFD,EAAcC,gBAEtmBC,EAAaH,CAAG,SAASC,EAAcC,oBAAoBD,EAAcC,sBAAsBD,EAAcC,qBAAqBD,EAAcC,8BAA8BD,EAAcC,8BAA8BD,EAAcC,2BAA2BD,EAAcG,QAAQC,SAAS,OAAOJ,EAAcC,wBAAwBD,EAAcG,QAAQC,SAAS,wFAAwFJ,EAAcC,+GAU1d,IAAMI,EAAN,MAAMA,mBAA+BC,EAArC,WAAAC,uBACEC,KAASC,WAAG,EAKZD,KA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