@atomic-ui/ui 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9839 -6255
- package/dist/base/FieldElement.d.ts +10 -3
- package/dist/{chunk-YWP2Z3JN.js → chunk-2TNF7O43.js} +7 -5
- package/dist/{chunk-YWP2Z3JN.js.map → chunk-2TNF7O43.js.map} +1 -1
- package/dist/{chunk-FKUBEVCU.js → chunk-2WHOBIOY.js} +11 -9
- package/dist/{chunk-FKUBEVCU.js.map → chunk-2WHOBIOY.js.map} +1 -1
- package/dist/{chunk-26BO3W56.js → chunk-3BWCD5U5.js} +5 -3
- package/dist/{chunk-26BO3W56.js.map → chunk-3BWCD5U5.js.map} +1 -1
- package/dist/chunk-3GPGDERO.js +201 -0
- package/dist/chunk-3GPGDERO.js.map +1 -0
- package/dist/{chunk-3T7J66Z2.js → chunk-3KAFK24X.js} +13 -11
- package/dist/chunk-3KAFK24X.js.map +1 -0
- package/dist/{chunk-5OJAJA3U.js → chunk-5HCWL2YD.js} +6 -4
- package/dist/{chunk-5OJAJA3U.js.map → chunk-5HCWL2YD.js.map} +1 -1
- package/dist/{chunk-AG4EP3OY.js → chunk-5IGBH4GL.js} +8 -6
- package/dist/{chunk-AG4EP3OY.js.map → chunk-5IGBH4GL.js.map} +1 -1
- package/dist/{chunk-AL4IUSML.js → chunk-5OYQZWP2.js} +5 -3
- package/dist/{chunk-AL4IUSML.js.map → chunk-5OYQZWP2.js.map} +1 -1
- package/dist/chunk-5PRB7P7N.js +167 -0
- package/dist/chunk-5PRB7P7N.js.map +1 -0
- package/dist/chunk-6CDQSHVW.js +21 -0
- package/dist/chunk-6CDQSHVW.js.map +1 -0
- package/dist/{chunk-MLKNZL5J.js → chunk-6J22I7F6.js} +14 -12
- package/dist/chunk-6J22I7F6.js.map +1 -0
- package/dist/chunk-72WNCCDC.js +136 -0
- package/dist/chunk-72WNCCDC.js.map +1 -0
- package/dist/chunk-7UI3OBXL.js +104 -0
- package/dist/chunk-7UI3OBXL.js.map +1 -0
- package/dist/{chunk-D6NET2VB.js → chunk-ALFE35FS.js} +30 -3
- package/dist/chunk-ALFE35FS.js.map +1 -0
- package/dist/chunk-AYINRYNC.js +184 -0
- package/dist/chunk-AYINRYNC.js.map +1 -0
- package/dist/{chunk-2D2IMQII.js → chunk-BAITBJUC.js} +51 -29
- package/dist/chunk-BAITBJUC.js.map +1 -0
- package/dist/{chunk-2EP3IV3G.js → chunk-BGHAANTP.js} +22 -8
- package/dist/chunk-BGHAANTP.js.map +1 -0
- package/dist/{chunk-OJO62KRX.js → chunk-CFCFKLTN.js} +85 -10
- package/dist/chunk-CFCFKLTN.js.map +1 -0
- package/dist/{chunk-UFPI4I2Y.js → chunk-CQT3VPYK.js} +8 -29
- package/dist/chunk-CQT3VPYK.js.map +1 -0
- package/dist/{chunk-AURT72IC.js → chunk-DXLEYNID.js} +13 -7
- package/dist/chunk-DXLEYNID.js.map +1 -0
- package/dist/{chunk-L4CIBOGK.js → chunk-EKPTMRBG.js} +5 -3
- package/dist/{chunk-L4CIBOGK.js.map → chunk-EKPTMRBG.js.map} +1 -1
- package/dist/{chunk-7UWJXPR3.js → chunk-F3NHPQU5.js} +17 -36
- package/dist/chunk-F3NHPQU5.js.map +1 -0
- package/dist/{chunk-Z2EWQMTR.js → chunk-F4IXELLK.js} +5 -3
- package/dist/{chunk-Z2EWQMTR.js.map → chunk-F4IXELLK.js.map} +1 -1
- package/dist/{chunk-APQEXM4I.js → chunk-FJHPGOGS.js} +5 -3
- package/dist/{chunk-APQEXM4I.js.map → chunk-FJHPGOGS.js.map} +1 -1
- package/dist/chunk-FLAUZU7Y.js +345 -0
- package/dist/chunk-FLAUZU7Y.js.map +1 -0
- package/dist/{chunk-3NEWOO2P.js → chunk-FZWUQC42.js} +7 -5
- package/dist/{chunk-3NEWOO2P.js.map → chunk-FZWUQC42.js.map} +1 -1
- package/dist/{chunk-ONED3PUB.js → chunk-HSXLSJVG.js} +54 -8
- package/dist/chunk-HSXLSJVG.js.map +1 -0
- package/dist/{chunk-V7EB7Q2M.js → chunk-JTCTQBAX.js} +2 -131
- package/dist/chunk-JTCTQBAX.js.map +1 -0
- package/dist/{chunk-ZL3JFUIE.js → chunk-K5QFVLCI.js} +7 -5
- package/dist/{chunk-ZL3JFUIE.js.map → chunk-K5QFVLCI.js.map} +1 -1
- package/dist/{chunk-DN5YZFSG.js → chunk-KE6WCXQP.js} +55 -9
- package/dist/chunk-KE6WCXQP.js.map +1 -0
- package/dist/chunk-LBHTXY7K.js +75 -0
- package/dist/chunk-LBHTXY7K.js.map +1 -0
- package/dist/{chunk-OZGKK3N5.js → chunk-LP4RTYTL.js} +88 -9
- package/dist/chunk-LP4RTYTL.js.map +1 -0
- package/dist/{chunk-MOO63SHZ.js → chunk-LXVPWTSY.js} +80 -23
- package/dist/chunk-LXVPWTSY.js.map +1 -0
- package/dist/{chunk-JNLKM3JT.js → chunk-N6EEW2GF.js} +6 -4
- package/dist/{chunk-JNLKM3JT.js.map → chunk-N6EEW2GF.js.map} +1 -1
- package/dist/chunk-NHEU5FT6.js +115 -0
- package/dist/chunk-NHEU5FT6.js.map +1 -0
- package/dist/chunk-P3BPW446.js +294 -0
- package/dist/chunk-P3BPW446.js.map +1 -0
- package/dist/chunk-QPOM7W3D.js +104 -0
- package/dist/chunk-QPOM7W3D.js.map +1 -0
- package/dist/{chunk-FU3CEHBS.js → chunk-R6PBY3YN.js} +6 -4
- package/dist/{chunk-FU3CEHBS.js.map → chunk-R6PBY3YN.js.map} +1 -1
- package/dist/{chunk-TJOYBDKS.js → chunk-R6YMSJR7.js} +65 -36
- package/dist/chunk-R6YMSJR7.js.map +1 -0
- package/dist/{chunk-ZEIV5X3U.js → chunk-SOYKSPPX.js} +73 -23
- package/dist/chunk-SOYKSPPX.js.map +1 -0
- package/dist/{chunk-NKMJMVZP.js → chunk-T52CUOCJ.js} +5 -3
- package/dist/{chunk-NKMJMVZP.js.map → chunk-T52CUOCJ.js.map} +1 -1
- package/dist/chunk-UFENSIWD.js +135 -0
- package/dist/chunk-UFENSIWD.js.map +1 -0
- package/dist/{chunk-A4M3A4SZ.js → chunk-UYTIJCCW.js} +10 -42
- package/dist/chunk-UYTIJCCW.js.map +1 -0
- package/dist/chunk-XX6JZW5N.js +36 -0
- package/dist/chunk-XX6JZW5N.js.map +1 -0
- package/dist/{chunk-2ZF3J7OO.js → chunk-XXSZL5CY.js} +17 -5
- package/dist/chunk-XXSZL5CY.js.map +1 -0
- package/dist/{chunk-6PMA6NHE.js → chunk-Y55FNQHS.js} +5 -3
- package/dist/{chunk-6PMA6NHE.js.map → chunk-Y55FNQHS.js.map} +1 -1
- package/dist/chunk-ZAWGJC4I.js +176 -0
- package/dist/chunk-ZAWGJC4I.js.map +1 -0
- package/dist/chunk-ZUQ3DOG2.js +110 -0
- package/dist/chunk-ZUQ3DOG2.js.map +1 -0
- package/dist/components/accordion.d.ts +22 -0
- package/dist/components/accordion.js +6 -2
- package/dist/components/alert.d.ts +22 -1
- package/dist/components/alert.js +3 -2
- package/dist/components/app-bar.d.ts +153 -0
- package/dist/components/app-bar.js +15 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-ui.d.ts +29 -2
- package/dist/components/app-ui.js +5 -4
- package/dist/components/badge.d.ts +17 -1
- package/dist/components/badge.js +4 -3
- package/dist/components/blocks.js +5 -4
- package/dist/components/button.d.ts +18 -2
- package/dist/components/button.js +4 -3
- package/dist/components/checkbox-group.js +4 -3
- package/dist/components/checkbox.js +4 -3
- package/dist/components/checked.d.ts +77 -0
- package/dist/components/checked.js +10 -0
- package/dist/components/checked.js.map +1 -0
- package/dist/components/chip-group.d.ts +113 -0
- package/dist/components/chip-group.js +11 -0
- package/dist/components/chip-group.js.map +1 -0
- package/dist/components/chip.d.ts +11 -0
- package/dist/components/chip.js +3 -2
- package/dist/components/code-diff.d.ts +77 -0
- package/dist/components/code-diff.js +10 -0
- package/dist/components/code-diff.js.map +1 -0
- package/dist/components/date-input.js +4 -3
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.js +3 -2
- package/dist/components/fieldset.js +3 -2
- package/dist/components/grid.js +3 -2
- package/dist/components/help.js +3 -2
- package/dist/components/icon.js +3 -2
- package/dist/components/journey.js +4 -3
- package/dist/components/language-switch.d.ts +59 -0
- package/dist/components/language-switch.js +10 -0
- package/dist/components/language-switch.js.map +1 -0
- package/dist/components/layout.d.ts +8 -2
- package/dist/components/layout.js +3 -2
- package/dist/components/link.js +4 -3
- package/dist/components/list.js +3 -2
- package/dist/components/media.js +3 -2
- package/dist/components/meter.d.ts +112 -0
- package/dist/components/meter.js +13 -0
- package/dist/components/meter.js.map +1 -0
- package/dist/components/navigation.d.ts +52 -0
- package/dist/components/navigation.js +4 -3
- package/dist/components/page.d.ts +13 -8
- package/dist/components/page.js +3 -2
- package/dist/components/price.js +3 -2
- package/dist/components/progress.d.ts +16 -2
- package/dist/components/progress.js +3 -2
- package/dist/components/radio-group.js +4 -3
- package/dist/components/redaction.d.ts +51 -0
- package/dist/components/redaction.js +10 -0
- package/dist/components/redaction.js.map +1 -0
- package/dist/components/rows.d.ts +28 -0
- package/dist/components/rows.js +7 -3
- package/dist/components/select.js +4 -3
- package/dist/components/shell.js +4 -3
- package/dist/components/source.d.ts +68 -0
- package/dist/components/source.js +10 -0
- package/dist/components/source.js.map +1 -0
- package/dist/components/status-pill-style.d.ts +16 -0
- package/dist/components/status-pill-style.js +15 -0
- package/dist/components/status-pill-style.js.map +1 -0
- package/dist/components/status.d.ts +66 -0
- package/dist/components/status.js +10 -0
- package/dist/components/status.js.map +1 -0
- package/dist/components/summary-list.js +3 -2
- package/dist/components/switch.js +4 -3
- package/dist/components/table.d.ts +19 -0
- package/dist/components/table.js +4 -3
- package/dist/components/text-input.js +5 -4
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.js +4 -3
- package/dist/components/tool-card.d.ts +107 -0
- package/dist/components/tool-card.js +11 -0
- package/dist/components/tool-card.js.map +1 -0
- package/dist/components/tool-kit-tokens.d.ts +25 -0
- package/dist/components/tool-kit-tokens.js +8 -0
- package/dist/components/tool-kit-tokens.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +116 -70
- package/dist/standalone/atomic-ui.js +2047 -733
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/package.json +2 -2
- package/dist/chunk-2D2IMQII.js.map +0 -1
- package/dist/chunk-2EP3IV3G.js.map +0 -1
- package/dist/chunk-2ZF3J7OO.js.map +0 -1
- package/dist/chunk-3T7J66Z2.js.map +0 -1
- package/dist/chunk-7UWJXPR3.js.map +0 -1
- package/dist/chunk-A4M3A4SZ.js.map +0 -1
- package/dist/chunk-AURT72IC.js.map +0 -1
- package/dist/chunk-AYKYHZGQ.js +0 -108
- package/dist/chunk-AYKYHZGQ.js.map +0 -1
- package/dist/chunk-D6NET2VB.js.map +0 -1
- package/dist/chunk-DN5YZFSG.js.map +0 -1
- package/dist/chunk-MLKNZL5J.js.map +0 -1
- package/dist/chunk-MOO63SHZ.js.map +0 -1
- package/dist/chunk-OJO62KRX.js.map +0 -1
- package/dist/chunk-ONED3PUB.js.map +0 -1
- package/dist/chunk-OZGKK3N5.js.map +0 -1
- package/dist/chunk-QU3U2CS2.js +0 -144
- package/dist/chunk-QU3U2CS2.js.map +0 -1
- package/dist/chunk-TJOYBDKS.js.map +0 -1
- package/dist/chunk-UFPI4I2Y.js.map +0 -1
- package/dist/chunk-V7EB7Q2M.js.map +0 -1
- package/dist/chunk-ZEIV5X3U.js.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/* @atomic-ui/ui version 0.
|
|
2
|
-
var
|
|
3
|
-
\f\r]`,
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Yt=/'/g,Zt=/"/g,er=/^(?:script|style|textarea|title)$/i,Lt=a=>(e,...r)=>({_$litType$:a,strings:e,values:r}),n=Lt(1),y=Lt(2),ri=Lt(3),L=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Jt=new WeakMap,j=W.createTreeWalker(W,129);function tr(a,e){if(!Rt(a)||!a.hasOwnProperty("raw"))throw Error("invalid template strings array");return Kt!==void 0?Kt.createHTML(e):e}var rr=(a,e)=>{let r=a.length-1,i=[],o,d=e===2?"<svg>":e===3?"<math>":"",c=J;for(let $=0;$<r;$++){let g=a[$],k,A,E=-1,N=0;for(;N<g.length&&(c.lastIndex=N,A=c.exec(g),A!==null);)N=c.lastIndex,c===J?A[1]==="!--"?c=Xt:A[1]!==void 0?c=Gt:A[2]!==void 0?(er.test(A[2])&&(o=RegExp("</"+A[2],"g")),c=U):A[3]!==void 0&&(c=U):c===U?A[0]===">"?(c=o??J,E=-1):A[1]===void 0?E=-2:(E=c.lastIndex-A[2].length,k=A[1],c=A[3]===void 0?U:A[3]==='"'?Zt:Yt):c===Zt||c===Yt?c=U:c===Xt||c===Gt?c=J:(c=U,o=void 0);let q=c===U&&a[$+1].startsWith("/>")?" ":"";d+=c===J?g+vr:E>=0?(i.push(k),g.slice(0,E)+Ct+g.slice(E)+O+q):g+O+(E===-2?$:q)}return[tr(a,d+(a[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]},te=class a{constructor({strings:e,_$litType$:r},i){let o;this.parts=[];let d=0,c=0,$=e.length-1,g=this.parts,[k,A]=rr(e,r);if(this.el=a.createElement(k,i),j.currentNode=this.el.content,r===2||r===3){let E=this.el.content.firstChild;E.replaceWith(...E.childNodes)}for(;(o=j.nextNode())!==null&&g.length<$;){if(o.nodeType===1){if(o.hasAttributes())for(let E of o.getAttributeNames())if(E.endsWith(Ct)){let N=A[c++],q=o.getAttribute(E).split(O),ue=/([.?@])?(.*)/.exec(N);g.push({type:1,index:d,name:ue[2],strings:q,ctor:ue[1]==="."?be:ue[1]==="?"?fe:ue[1]==="@"?$e:K}),o.removeAttribute(E)}else E.startsWith(O)&&(g.push({type:6,index:d}),o.removeAttribute(E));if(er.test(o.tagName)){let E=o.textContent.split(O),N=E.length-1;if(N>0){o.textContent=me?me.emptyScript:"";for(let q=0;q<N;q++)o.append(E[q],Q()),j.nextNode(),g.push({type:2,index:++d});o.append(E[N],Q())}}}else if(o.nodeType===8)if(o.data===_t)g.push({type:2,index:d});else{let E=-1;for(;(E=o.data.indexOf(O,E+1))!==-1;)g.push({type:7,index:d}),E+=O.length-1}d++}}static createElement(e,r){let i=W.createElement("template");return i.innerHTML=e,i}};function V(a,e,r=a,i){if(e===L)return e;let o=i!==void 0?r._$Co?.[i]:r._$Cl,d=ee(e)?void 0:e._$litDirective$;return o?.constructor!==d&&(o?._$AO?.(!1),d===void 0?o=void 0:(o=new d(a),o._$AT(a,r,i)),i!==void 0?(r._$Co??=[])[i]=o:r._$Cl=o),o!==void 0&&(e=V(a,o._$AS(a,e.values),o,i)),e}var ge=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:i}=this._$AD,o=(e?.creationScope??W).importNode(r,!0);j.currentNode=o;let d=j.nextNode(),c=0,$=0,g=i[0];for(;g!==void 0;){if(c===g.index){let k;g.type===2?k=new Y(d,d.nextSibling,this,e):g.type===1?k=new g.ctor(d,g.name,g.strings,this,e):g.type===6&&(k=new ye(d,this,e)),this._$AV.push(k),g=i[++$]}c!==g?.index&&(d=j.nextNode(),c++)}return j.currentNode=W,o}p(e){let r=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,r),r+=i.strings.length-2):i._$AI(e[r])),r++}},Y=class a{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,i,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=V(this,e,r),ee(e)?e===l||e==null||e===""?(this._$AH!==l&&this._$AR(),this._$AH=l):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Qt(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==l&&ee(this._$AH)?this._$AA.nextSibling.data=e:this.T(W.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=te.createElement(tr(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(r);else{let d=new ge(o,this),c=d.u(this.options);d.p(r),this.T(c),this._$AH=d}}_$AC(e){let r=Jt.get(e.strings);return r===void 0&&Jt.set(e.strings,r=new te(e)),r}k(e){Rt(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,i,o=0;for(let d of e)o===r.length?r.push(i=new a(this.O(Q()),this.O(Q()),this,this.options)):i=r[o],i._$AI(d),o++;o<r.length&&(this._$AR(i&&i._$AB.nextSibling,o),r.length=o)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e!==this._$AB;){let i=Vt(e).nextSibling;Vt(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},K=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,i,o,d){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=r,this._$AM=o,this.options=d,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=l}_$AI(e,r=this,i,o){let d=this.strings,c=!1;if(d===void 0)e=V(this,e,r,0),c=!ee(e)||e!==this._$AH&&e!==L,c&&(this._$AH=e);else{let $=e,g,k;for(e=d[0],g=0;g<d.length-1;g++)k=V(this,$[i+g],r,g),k===L&&(k=this._$AH[g]),c||=!ee(k)||k!==this._$AH[g],k===l?e=l:e!==l&&(e+=(k??"")+d[g+1]),this._$AH[g]=k}c&&!o&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},be=class extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},fe=class extends K{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},$e=class extends K{constructor(e,r,i,o,d){super(e,r,i,o,d),this.type=5}_$AI(e,r=this){if((e=V(this,e,r,0)??l)===L)return;let i=this._$AH,o=e===l&&i!==l||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,d=e!==l&&(i===l||o);o&&this.element.removeEventListener(this.name,this,i),d&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ye=class{constructor(e,r,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){V(this,e)}},C={M:Ct,P:O,A:_t,C:1,L:rr,R:ge,D:Qt,V,I:Y,H:K,N:fe,U:$e,B:be,F:ye},wr=At.litHtmlPolyfillSupport;wr?.(te,Y),(At.litHtmlVersions??=[]).push("3.3.3");var re=(a,e,r)=>{let i=r?.renderBefore??e,o=i._$litPart$;if(o===void 0){let d=r?.renderBefore??null;i._$litPart$=o=new Y(e.insertBefore(Q(),d),d,void 0,r??{})}return o._$AI(a),o};var It=null,ir={boundAttributeSuffix:C.M,marker:C.P,markerMatch:C.A,HTML_RESULT:C.C,getTemplateHtml:C.L,overrideDirectiveResolve:(a,e)=>class extends a{_$AS(r,i){return e(this,i)}},patchDirectiveResolve:(a,e)=>{if(a.prototype._$AS.name!==e.name){It??=a.prototype._$AS.name;for(let r=a.prototype;r!==Object.prototype;r=Object.getPrototypeOf(r))if(r.hasOwnProperty(It))return void(r[It]=e);throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527")}},setDirectiveClass(a,e){a._$litDirective$=e},getAttributePartCommittedValue:(a,e,r)=>{let i=L;return a.j=o=>i=o,a._$AI(e,a,r),i},connectedDisconnectable:a=>({...a,_$AU:!0}),resolveDirective:C.V,AttributePart:C.H,PropertyPart:C.B,BooleanAttributePart:C.N,EventPart:C.U,ElementPart:C.F,TemplateInstance:C.R,isIterable:C.D,ChildPart:C.I};var Z={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};var{I:di}=C;var sr=a=>a===null||typeof a!="object"&&typeof a!="function";var ar=(a,e)=>e===void 0?a?._$litType$!==void 0:a?._$litType$===e,or=a=>a?._$litType$?.h!=null;var nr=a=>a.strings===void 0;var{TemplateInstance:Sr,isIterable:Tr,resolveDirective:dr,ChildPart:ie,ElementPart:zr}=ir,cr=(a,e,r={})=>{if(e._$litPart$!==void 0)throw Error("container already contains a live render");let i,o,d,c=[],$=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),g;for(;(g=$.nextNode())!==null;){let k=g.data;if(k.startsWith("lit-part")){if(c.length===0&&i!==void 0)throw Error(`There must be only one root part per container. Found a part marker (${g}) when we already have a root part marker (${o})`);d=Er(a,g,c,r),i===void 0&&(i=d),o??=g}else if(k.startsWith("lit-node"))Ar(g,c,r);else if(k.startsWith("/lit-part")){if(c.length===1&&d!==i)throw Error("internal error");d=Mr(g,d,c)}}if(i===void 0){let k=e instanceof ShadowRoot?"{container.host.localName}'s shadow root":e instanceof DocumentFragment?"DocumentFragment":e.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${k}.`)}e._$litPart$=i},Er=(a,e,r,i)=>{let o,d;if(r.length===0)d=new ie(e,null,void 0,i),o=a;else{let c=r[r.length-1];if(c.type==="template-instance")d=new ie(e,null,c.instance,i),c.instance._$AV.push(d),o=c.result.values[c.instancePartIndex++],c.templatePartIndex++;else if(c.type==="iterable"){d=new ie(e,null,c.part,i);let $=c.iterator.next();if($.done)throw o=void 0,c.done=!0,Error("Unhandled shorter than expected iterable");o=$.value,c.part._$AH.push(d)}else d=new ie(e,null,c.part,i)}if(o=dr(d,o),o===L)r.push({part:d,type:"leaf"});else if(sr(o))r.push({part:d,type:"leaf"}),d._$AH=o;else if(ar(o)){if(or(o))throw Error("compiled templates are not supported");let c="lit-part "+Cr(o);if(e.data!==c)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let $=ie.prototype._$AC(o),g=new Sr($,d);r.push({type:"template-instance",instance:g,part:d,templatePartIndex:0,instancePartIndex:0,result:o}),d._$AH=g}}else Tr(o)?(r.push({part:d,type:"iterable",value:o,iterator:o[Symbol.iterator](),done:!1}),d._$AH=[]):(r.push({part:d,type:"leaf"}),d._$AH=o??"");return d},Mr=(a,e,r)=>{if(e===void 0)throw Error("unbalanced part marker");e._$AB=a;let i=r.pop();if(i.type==="iterable"&&!i.iterator.next().done)throw Error("unexpected longer than expected iterable");if(r.length>0)return r[r.length-1].part},Ar=(a,e,r)=>{let i=/lit-node (\d+)/.exec(a.data),o=parseInt(i[1]),d=a.nextElementSibling;if(d===null)throw Error("could not find node for attribute parts");d.removeAttribute("defer-hydration");let c=e[e.length-1];if(c.type!=="template-instance")throw Error("Hydration value mismatch: Primitive found where TemplateResult expected. This usually occurs due to conditional rendering that resulted in a different value or template being rendered between the server and client.");{let $=c.instance;for(;;){let g=$._$AD.parts[c.templatePartIndex];if(g===void 0||g.type!==Z.ATTRIBUTE&&g.type!==Z.ELEMENT||g.index!==o)break;if(g.type===Z.ATTRIBUTE){let k=new g.ctor(d,g.name,g.strings,c.instance,r),A=nr(k)?c.result.values[c.instancePartIndex]:c.result.values,E=!(k.type===Z.EVENT||k.type===Z.PROPERTY);k._$AI(A,k,c.instancePartIndex,E),c.instancePartIndex+=g.strings.length-1,$._$AV.push(k)}else{let k=new zr(d,c.instance,r);dr(k,c.result.values[c.instancePartIndex++]),$._$AV.push(k)}c.templatePartIndex++}}},lr=new WeakMap,Cr=a=>{let e=lr.get(a.strings);if(e!==void 0)return e;let r=new Uint32Array(2).fill(5381);for(let o of a.strings)for(let d=0;d<o.length;d++)r[d%2]=33*r[d%2]^o.charCodeAt(d);let i=String.fromCharCode(...new Uint8Array(r.buffer));return e=btoa(i),lr.set(a.strings,e),e};globalThis.litElementHydrateSupport=({LitElement:a})=>{let e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"observedAttributes").get;Object.defineProperty(a,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});let r=a.prototype.attributeChangedCallback;a.prototype.attributeChangedCallback=function(c,$,g){c==="defer-hydration"&&g===null&&i.call(this),r.call(this,c,$,g)};let i=a.prototype.connectedCallback;a.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||i.call(this)};let o=a.prototype.createRenderRoot;a.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):o.call(this)};let d=Object.getPrototypeOf(a.prototype).update;a.prototype.update=function(c){let $=this.render();if(d.call(this,c),this._$AG){this._$AG=!1;for(let g of this.getAttributeNames())if(g.startsWith("hydrate-internals-")){let k=g.slice(18);this.removeAttribute(k),this.removeAttribute(g)}cr($,this.renderRoot,this.renderOptions)}else re($,this.renderRoot,this.renderOptions)}};var xe=globalThis,ke=xe.ShadowRoot&&(xe.ShadyCSS===void 0||xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ht=Symbol(),pr=new WeakMap,se=class{constructor(e,r,i){if(this._$cssResult$=!0,i!==Ht)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(ke&&e===void 0){let i=r!==void 0&&r.length===1;i&&(e=pr.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&pr.set(r,e))}return e}toString(){return this.cssText}},_=a=>new se(typeof a=="string"?a:a+"",void 0,Ht),h=(a,...e)=>{let r=a.length===1?a[0]:e.reduce((i,o,d)=>i+(c=>{if(c._$cssResult$===!0)return c.cssText;if(typeof c=="number")return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+a[d+1],a[0]);return new se(r,a,Ht)},hr=(a,e)=>{if(ke)a.adoptedStyleSheets=e.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of e){let i=document.createElement("style"),o=xe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=r.cssText,a.appendChild(i)}},Bt=ke?a=>a:a=>a instanceof CSSStyleSheet?(e=>{let r="";for(let i of e.cssRules)r+=i.cssText;return _(r)})(a):a;var{is:_r,defineProperty:Rr,getOwnPropertyDescriptor:Lr,getOwnPropertyNames:Ir,getOwnPropertySymbols:Hr,getPrototypeOf:Br}=Object,ve=globalThis,ur=ve.trustedTypes,Nr=ur?ur.emptyScript:"",Or=ve.reactiveElementPolyfillSupport,ae=(a,e)=>a,Nt={toAttribute(a,e){switch(e){case Boolean:a=a?Nr:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,e){let r=a;switch(e){case Boolean:r=a!==null;break;case Number:r=a===null?null:Number(a);break;case Object:case Array:try{r=JSON.parse(a)}catch{r=null}}return r}},gr=(a,e)=>!_r(a,e),mr={attribute:!0,type:String,converter:Nt,reflect:!1,useDefault:!1,hasChanged:gr};Symbol.metadata??=Symbol("metadata"),ve.litPropertyMetadata??=new WeakMap;var P=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=mr){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let i=Symbol(),o=this.getPropertyDescriptor(e,i,r);o!==void 0&&Rr(this.prototype,e,o)}}static getPropertyDescriptor(e,r,i){let{get:o,set:d}=Lr(this.prototype,e)??{get(){return this[r]},set(c){this[r]=c}};return{get:o,set(c){let $=o?.call(this);d?.call(this,c),this.requestUpdate(e,$,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??mr}static _$Ei(){if(this.hasOwnProperty(ae("elementProperties")))return;let e=Br(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ae("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ae("properties"))){let r=this.properties,i=[...Ir(r),...Hr(r)];for(let o of i)this.createProperty(o,r[o])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[i,o]of r)this.elementProperties.set(i,o)}this._$Eh=new Map;for(let[r,i]of this.elementProperties){let o=this._$Eu(r,i);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let i=new Set(e.flat(1/0).reverse());for(let o of i)r.unshift(Bt(o))}else e!==void 0&&r.push(Bt(e));return r}static _$Eu(e,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let i of r.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return hr(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,r,i){this._$AK(e,i)}_$ET(e,r){let i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){let d=(i.converter?.toAttribute!==void 0?i.converter:Nt).toAttribute(r,i.type);this._$Em=e,d==null?this.removeAttribute(o):this.setAttribute(o,d),this._$Em=null}}_$AK(e,r){let i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let d=i.getPropertyOptions(o),c=typeof d.converter=="function"?{fromAttribute:d.converter}:d.converter?.fromAttribute!==void 0?d.converter:Nt;this._$Em=o;let $=c.fromAttribute(r,d.type);this[o]=$??this._$Ej?.get(o)??$,this._$Em=null}}requestUpdate(e,r,i,o=!1,d){if(e!==void 0){let c=this.constructor;if(o===!1&&(d=this[e]),i??=c.getPropertyOptions(e),!((i.hasChanged??gr)(d,r)||i.useDefault&&i.reflect&&d===this._$Ej?.get(e)&&!this.hasAttribute(c._$Eu(e,i))))return;this.C(e,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:i,reflect:o,wrapped:d},c){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,c??r??this[e]),d!==!0||c!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(r=void 0),this._$AL.set(e,r)),o===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,d]of this._$Ep)this[o]=d;this._$Ep=void 0}let i=this.constructor.elementProperties;if(i.size>0)for(let[o,d]of i){let{wrapped:c}=d,$=this[o];c!==!0||this._$AL.has(o)||$===void 0||this.C(o,void 0,d,$)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(r)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(r=>this._$ET(r,this[r])),this._$EM()}updated(e){}firstUpdated(e){}};P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[ae("elementProperties")]=new Map,P[ae("finalized")]=new Map,Or?.({ReactiveElement:P}),(ve.reactiveElementVersions??=[]).push("2.1.2");var Ot=globalThis,D=class extends P{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=re(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};D._$litElement$=!0,D.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:D});var Pr=Ot.litElementPolyfillSupport;Pr?.({LitElement:D});(Ot.litElementVersions??=[]).push("4.2.2");var u=(a,e)=>_(`var(--impakt-${a.replace(/\./g,"-")}, ${e})`),t={brand:u("color.brand.default","#1f4ed8"),brandHover:u("color.brand.hover","#1b45be"),brandActive:u("color.brand.active","#183ba4"),brandSubtle:u("color.brand.subtle","#e4eafa"),onBrand:u("color.text.on-brand","#ffffff"),surfaceCard:u("color.surface.card","#ffffff"),surfaceInset:u("color.surface.inset","#f4f4f4"),surfaceSubtle:u("color.surface.subtle","#e4eafa"),text:u("color.text.default","#1a1a1a"),textMuted:u("color.text.muted","#717171"),textPlaceholder:u("color.text.placeholder","#767676"),textHeading:u("color.text.heading","#1f4ed8"),link:u("color.text.link","#1f4ed8"),linkHover:u("color.text.link-hover","#193ead"),border:u("color.border.default","#929292"),borderStrong:u("color.border.strong","#818181"),danger:u("color.status.danger.default","#c8102e"),dangerText:u("color.status.danger.text","#c8102e"),dangerSubtle:u("color.status.danger.subtle","#f8e2e6"),warning:u("color.status.warning.default","#b45309"),warningText:u("color.status.warning.text","#b45309"),warningSubtle:u("color.status.warning.subtle","#f6eae1"),success:u("color.status.success.default","#047857"),successText:u("color.status.success.text","#047857"),successSubtle:u("color.status.success.subtle","#e0f0ea"),info:u("color.status.info.default","#1f4ed8"),infoText:u("color.status.info.text","#1f4ed8"),infoSubtle:u("color.status.info.subtle","#e4eafa"),fontBody:u("font.family.body","system-ui, sans-serif"),fontHeading:u("font.family.heading","system-ui, sans-serif"),fontMono:u("font.family.mono","ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"),fontEyebrow:u("font.family.eyebrow","inherit"),focusShadow:u("focus.ring.shadow","0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a"),focusOffset:u("focus.ring.offset","2px"),targetMin:u("target.min","24px"),radiusSm:u("radius.sm","2px"),radius:u("radius.md","4px"),radiusLg:u("radius.lg","8px"),borderThin:u("border.width.thin","1px"),borderThick:u("border.width.thick","2px"),radiusXs:u("radius.xs","2px"),radiusXl:u("radius.xl","12px"),radius2xl:u("radius.2xl","16px"),hairline:_("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 10%, transparent)"),rule:_("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 15%, transparent)"),wash:_("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 5%, transparent)"),brandHalo:_("color-mix(in srgb, var(--impakt-color-brand-default, #1f4ed8) 22%, transparent)"),shadowXs:u("shadow.xs","0 1px 2px 0 rgb(0 0 0 / 0.05)"),shadowSm:u("shadow.sm","0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"),shadowMd:u("shadow.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),shadowLg:u("shadow.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),shadowXl:u("shadow.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"),trackingTight:u("font.tracking.tight","-0.02em"),trackingWide:u("font.tracking.wide","0.06em")},x=a=>_(`font-size: var(--impakt-font-size-${a}, 1rem); line-height: var(--impakt-font-leading-${a}, 1.5);`),s=a=>u(`space.${String(a).replace(".","-")}`,`${a*4}px`),b=a=>u(`font.size.${a}`,"1rem"),I=a=>u(`font.line-height.${a}`,"1.5"),m=a=>u(`font.weight.${a}`,"400"),R=h`
|
|
5
|
-
:host([space-above='sm']) { margin-block-start: ${
|
|
6
|
-
:host([space-above='md']) { margin-block-start: ${
|
|
7
|
-
:host([space-above='lg']) { margin-block-start: ${
|
|
8
|
-
:host([space-above='xl']) { margin-block-start: ${
|
|
9
|
-
:host([space-above='2xl']) { margin-block-start: clamp(${
|
|
10
|
-
:host([space-below='sm']) { margin-block-end: ${
|
|
11
|
-
:host([space-below='md']) { margin-block-end: ${
|
|
12
|
-
:host([space-below='lg']) { margin-block-end: ${
|
|
13
|
-
:host([space-below='xl']) { margin-block-end: ${
|
|
14
|
-
:host([space-below='2xl']) { margin-block-end: clamp(${
|
|
15
|
-
`;var
|
|
1
|
+
/* @atomic-ui/ui version 0.12.0, standalone. */
|
|
2
|
+
var Wt=globalThis,ci=n=>n,$e=Wt.trustedTypes,pi=$e?$e.createPolicy("lit-html",{createHTML:n=>n}):void 0,Vt="$lit$",P=`lit$${Math.random().toFixed(9).slice(2)}$`,Kt="?"+P,Wi=`<${Kt}>`,V=document,ie=()=>V.createComment(""),re=n=>n===null||typeof n!="object"&&typeof n!="function",Gt=Array.isArray,fi=n=>Gt(n)||typeof n?.[Symbol.iterator]=="function",Ut=`[
|
|
3
|
+
\f\r]`,te=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hi=/-->/g,ui=/>/g,U=RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mi=/'/g,gi=/"/g,$i=/^(?:script|style|textarea|title)$/i,Yt=n=>(e,...i)=>({_$litType$:n,strings:e,values:i}),s=Yt(1),y=Yt(2),Mr=Yt(3),_=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),bi=new WeakMap,W=V.createTreeWalker(V,129);function xi(n,e){if(!Gt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return pi!==void 0?pi.createHTML(e):e}var yi=(n,e)=>{let i=n.length-1,a=[],o,d=e===2?"<svg>":e===3?"<math>":"",c=te;for(let $=0;$<i;$++){let g=n[$],v,L,E=-1,O=0;for(;O<g.length&&(c.lastIndex=O,L=c.exec(g),L!==null);)O=c.lastIndex,c===te?L[1]==="!--"?c=hi:L[1]!==void 0?c=ui:L[2]!==void 0?($i.test(L[2])&&(o=RegExp("</"+L[2],"g")),c=U):L[3]!==void 0&&(c=U):c===U?L[0]===">"?(c=o??te,E=-1):L[1]===void 0?E=-2:(E=c.lastIndex-L[2].length,v=L[1],c=L[3]===void 0?U:L[3]==='"'?gi:mi):c===gi||c===mi?c=U:c===hi||c===ui?c=te:(c=U,o=void 0);let q=c===U&&n[$+1].startsWith("/>")?" ":"";d+=c===te?g+Wi:E>=0?(a.push(v),g.slice(0,E)+Vt+g.slice(E)+P+q):g+P+(E===-2?$:q)}return[xi(n,d+(n[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),a]},ae=class n{constructor({strings:e,_$litType$:i},a){let o;this.parts=[];let d=0,c=0,$=e.length-1,g=this.parts,[v,L]=yi(e,i);if(this.el=n.createElement(v,a),W.currentNode=this.el.content,i===2||i===3){let E=this.el.content.firstChild;E.replaceWith(...E.childNodes)}for(;(o=W.nextNode())!==null&&g.length<$;){if(o.nodeType===1){if(o.hasAttributes())for(let E of o.getAttributeNames())if(E.endsWith(Vt)){let O=L[c++],q=o.getAttribute(E).split(P),fe=/([.?@])?(.*)/.exec(O);g.push({type:1,index:d,name:fe[2],strings:q,ctor:fe[1]==="."?ye:fe[1]==="?"?ke:fe[1]==="@"?ve:G}),o.removeAttribute(E)}else E.startsWith(P)&&(g.push({type:6,index:d}),o.removeAttribute(E));if($i.test(o.tagName)){let E=o.textContent.split(P),O=E.length-1;if(O>0){o.textContent=$e?$e.emptyScript:"";for(let q=0;q<O;q++)o.append(E[q],ie()),W.nextNode(),g.push({type:2,index:++d});o.append(E[O],ie())}}}else if(o.nodeType===8)if(o.data===Kt)g.push({type:2,index:d});else{let E=-1;for(;(E=o.data.indexOf(P,E+1))!==-1;)g.push({type:7,index:d}),E+=P.length-1}d++}}static createElement(e,i){let a=V.createElement("template");return a.innerHTML=e,a}};function K(n,e,i=n,a){if(e===_)return e;let o=a!==void 0?i._$Co?.[a]:i._$Cl,d=re(e)?void 0:e._$litDirective$;return o?.constructor!==d&&(o?._$AO?.(!1),d===void 0?o=void 0:(o=new d(n),o._$AT(n,i,a)),a!==void 0?(i._$Co??=[])[a]=o:i._$Cl=o),o!==void 0&&(e=K(n,o._$AS(n,e.values),o,a)),e}var xe=class{constructor(e,i){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:i},parts:a}=this._$AD,o=(e?.creationScope??V).importNode(i,!0);W.currentNode=o;let d=W.nextNode(),c=0,$=0,g=a[0];for(;g!==void 0;){if(c===g.index){let v;g.type===2?v=new Z(d,d.nextSibling,this,e):g.type===1?v=new g.ctor(d,g.name,g.strings,this,e):g.type===6&&(v=new we(d,this,e)),this._$AV.push(v),g=a[++$]}c!==g?.index&&(d=W.nextNode(),c++)}return W.currentNode=V,o}p(e){let i=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(e,a,i),i+=a.strings.length-2):a._$AI(e[i])),i++}},Z=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,a,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=a,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=K(this,e,i),re(e)?e===l||e==null||e===""?(this._$AH!==l&&this._$AR(),this._$AH=l):e!==this._$AH&&e!==_&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):fi(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==l&&re(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:a}=e,o=typeof a=="number"?this._$AC(e):(a.el===void 0&&(a.el=ae.createElement(xi(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===o)this._$AH.p(i);else{let d=new xe(o,this),c=d.u(this.options);d.p(i),this.T(c),this._$AH=d}}_$AC(e){let i=bi.get(e.strings);return i===void 0&&bi.set(e.strings,i=new ae(e)),i}k(e){Gt(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,a,o=0;for(let d of e)o===i.length?i.push(a=new n(this.O(ie()),this.O(ie()),this,this.options)):a=i[o],a._$AI(d),o++;o<i.length&&(this._$AR(a&&a._$AB.nextSibling,o),i.length=o)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let a=ci(e).nextSibling;ci(e).remove(),e=a}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},G=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,a,o,d){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=i,this._$AM=o,this.options=d,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=l}_$AI(e,i=this,a,o){let d=this.strings,c=!1;if(d===void 0)e=K(this,e,i,0),c=!re(e)||e!==this._$AH&&e!==_,c&&(this._$AH=e);else{let $=e,g,v;for(e=d[0],g=0;g<d.length-1;g++)v=K(this,$[a+g],i,g),v===_&&(v=this._$AH[g]),c||=!re(v)||v!==this._$AH[g],v===l?e=l:e!==l&&(e+=(v??"")+d[g+1]),this._$AH[g]=v}c&&!o&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ye=class extends G{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},ke=class extends G{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},ve=class extends G{constructor(e,i,a,o,d){super(e,i,a,o,d),this.type=5}_$AI(e,i=this){if((e=K(this,e,i,0)??l)===_)return;let a=this._$AH,o=e===l&&a!==l||e.capture!==a.capture||e.once!==a.once||e.passive!==a.passive,d=e!==l&&(a===l||o);o&&this.element.removeEventListener(this.name,this,a),d&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},we=class{constructor(e,i,a){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(e){K(this,e)}},R={M:Vt,P,A:Kt,C:1,L:yi,R:xe,D:fi,V:K,I:Z,H:G,N:ke,U:ve,B:ye,F:we},Vi=Wt.litHtmlPolyfillSupport;Vi?.(ae,Z),(Wt.litHtmlVersions??=[]).push("3.3.3");var se=(n,e,i)=>{let a=i?.renderBefore??e,o=a._$litPart$;if(o===void 0){let d=i?.renderBefore??null;a._$litPart$=o=new Z(e.insertBefore(ie(),d),d,void 0,i??{})}return o._$AI(n),o};var Xt=null,ki={boundAttributeSuffix:R.M,marker:R.P,markerMatch:R.A,HTML_RESULT:R.C,getTemplateHtml:R.L,overrideDirectiveResolve:(n,e)=>class extends n{_$AS(i,a){return e(this,a)}},patchDirectiveResolve:(n,e)=>{if(n.prototype._$AS.name!==e.name){Xt??=n.prototype._$AS.name;for(let i=n.prototype;i!==Object.prototype;i=Object.getPrototypeOf(i))if(i.hasOwnProperty(Xt))return void(i[Xt]=e);throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527")}},setDirectiveClass(n,e){n._$litDirective$=e},getAttributePartCommittedValue:(n,e,i)=>{let a=_;return n.j=o=>a=o,n._$AI(e,n,i),a},connectedDisconnectable:n=>({...n,_$AU:!0}),resolveDirective:R.V,AttributePart:R.H,PropertyPart:R.B,BooleanAttributePart:R.N,EventPart:R.U,ElementPart:R.F,TemplateInstance:R.R,isIterable:R.D,ChildPart:R.I};var J={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};var{I:_r}=R;var vi=n=>n===null||typeof n!="object"&&typeof n!="function";var wi=(n,e)=>e===void 0?n?._$litType$!==void 0:n?._$litType$===e,Ti=n=>n?._$litType$?.h!=null;var Si=n=>n.strings===void 0;var{TemplateInstance:Ki,isIterable:Gi,resolveDirective:Mi,ChildPart:oe,ElementPart:Yi}=ki,Ei=(n,e,i={})=>{if(e._$litPart$!==void 0)throw Error("container already contains a live render");let a,o,d,c=[],$=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),g;for(;(g=$.nextNode())!==null;){let v=g.data;if(v.startsWith("lit-part")){if(c.length===0&&a!==void 0)throw Error(`There must be only one root part per container. Found a part marker (${g}) when we already have a root part marker (${o})`);d=Xi(n,g,c,i),a===void 0&&(a=d),o??=g}else if(v.startsWith("lit-node"))Ji(g,c,i);else if(v.startsWith("/lit-part")){if(c.length===1&&d!==a)throw Error("internal error");d=Zi(g,d,c)}}if(a===void 0){let v=e instanceof ShadowRoot?"{container.host.localName}'s shadow root":e instanceof DocumentFragment?"DocumentFragment":e.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${v}.`)}e._$litPart$=a},Xi=(n,e,i,a)=>{let o,d;if(i.length===0)d=new oe(e,null,void 0,a),o=n;else{let c=i[i.length-1];if(c.type==="template-instance")d=new oe(e,null,c.instance,a),c.instance._$AV.push(d),o=c.result.values[c.instancePartIndex++],c.templatePartIndex++;else if(c.type==="iterable"){d=new oe(e,null,c.part,a);let $=c.iterator.next();if($.done)throw o=void 0,c.done=!0,Error("Unhandled shorter than expected iterable");o=$.value,c.part._$AH.push(d)}else d=new oe(e,null,c.part,a)}if(o=Mi(d,o),o===_)i.push({part:d,type:"leaf"});else if(vi(o))i.push({part:d,type:"leaf"}),d._$AH=o;else if(wi(o)){if(Ti(o))throw Error("compiled templates are not supported");let c="lit-part "+Qi(o);if(e.data!==c)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let $=oe.prototype._$AC(o),g=new Ki($,d);i.push({type:"template-instance",instance:g,part:d,templatePartIndex:0,instancePartIndex:0,result:o}),d._$AH=g}}else Gi(o)?(i.push({part:d,type:"iterable",value:o,iterator:o[Symbol.iterator](),done:!1}),d._$AH=[]):(i.push({part:d,type:"leaf"}),d._$AH=o??"");return d},Zi=(n,e,i)=>{if(e===void 0)throw Error("unbalanced part marker");e._$AB=n;let a=i.pop();if(a.type==="iterable"&&!a.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},Ji=(n,e,i)=>{let a=/lit-node (\d+)/.exec(n.data),o=parseInt(a[1]),d=n.nextElementSibling;if(d===null)throw Error("could not find node for attribute parts");d.removeAttribute("defer-hydration");let c=e[e.length-1];if(c.type!=="template-instance")throw Error("Hydration value mismatch: Primitive found where TemplateResult expected. This usually occurs due to conditional rendering that resulted in a different value or template being rendered between the server and client.");{let $=c.instance;for(;;){let g=$._$AD.parts[c.templatePartIndex];if(g===void 0||g.type!==J.ATTRIBUTE&&g.type!==J.ELEMENT||g.index!==o)break;if(g.type===J.ATTRIBUTE){let v=new g.ctor(d,g.name,g.strings,c.instance,i),L=Si(v)?c.result.values[c.instancePartIndex]:c.result.values,E=!(v.type===J.EVENT||v.type===J.PROPERTY);v._$AI(L,v,c.instancePartIndex,E),c.instancePartIndex+=g.strings.length-1,$._$AV.push(v)}else{let v=new Yi(d,c.instance,i);Mi(v,c.result.values[c.instancePartIndex++]),$._$AV.push(v)}c.templatePartIndex++}}},zi=new WeakMap,Qi=n=>{let e=zi.get(n.strings);if(e!==void 0)return e;let i=new Uint32Array(2).fill(5381);for(let o of n.strings)for(let d=0;d<o.length;d++)i[d%2]=33*i[d%2]^o.charCodeAt(d);let a=String.fromCharCode(...new Uint8Array(i.buffer));return e=btoa(a),zi.set(n.strings,e),e};globalThis.litElementHydrateSupport=({LitElement:n})=>{let e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),"observedAttributes").get;Object.defineProperty(n,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});let i=n.prototype.attributeChangedCallback;n.prototype.attributeChangedCallback=function(c,$,g){c==="defer-hydration"&&g===null&&a.call(this),i.call(this,c,$,g)};let a=n.prototype.connectedCallback;n.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||a.call(this)};let o=n.prototype.createRenderRoot;n.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):o.call(this)};let d=Object.getPrototypeOf(n.prototype).update;n.prototype.update=function(c){let $=this.render();if(d.call(this,c),this._$AG){this._$AG=!1;for(let g of this.getAttributeNames())if(g.startsWith("hydrate-internals-")){let v=g.slice(18);this.removeAttribute(v),this.removeAttribute(g)}Ei($,this.renderRoot,this.renderOptions)}else se($,this.renderRoot,this.renderOptions)}};var Te=globalThis,Se=Te.ShadowRoot&&(Te.ShadyCSS===void 0||Te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Zt=Symbol(),Ai=new WeakMap,ne=class{constructor(e,i,a){if(this._$cssResult$=!0,a!==Zt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Se&&e===void 0){let a=i!==void 0&&i.length===1;a&&(e=Ai.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),a&&Ai.set(i,e))}return e}toString(){return this.cssText}},C=n=>new ne(typeof n=="string"?n:n+"",void 0,Zt),h=(n,...e)=>{let i=n.length===1?n[0]:e.reduce((a,o,d)=>a+(c=>{if(c._$cssResult$===!0)return c.cssText;if(typeof c=="number")return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+n[d+1],n[0]);return new ne(i,n,Zt)},Ci=(n,e)=>{if(Se)n.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let a=document.createElement("style"),o=Te.litNonce;o!==void 0&&a.setAttribute("nonce",o),a.textContent=i.cssText,n.appendChild(a)}},Jt=Se?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let i="";for(let a of e.cssRules)i+=a.cssText;return C(i)})(n):n;var{is:er,defineProperty:tr,getOwnPropertyDescriptor:ir,getOwnPropertyNames:rr,getOwnPropertySymbols:ar,getPrototypeOf:sr}=Object,ze=globalThis,Li=ze.trustedTypes,or=Li?Li.emptyScript:"",nr=ze.reactiveElementPolyfillSupport,le=(n,e)=>n,Qt={toAttribute(n,e){switch(e){case Boolean:n=n?or:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let i=n;switch(e){case Boolean:i=n!==null;break;case Number:i=n===null?null:Number(n);break;case Object:case Array:try{i=JSON.parse(n)}catch{i=null}}return i}},Ii=(n,e)=>!er(n,e),Ri={attribute:!0,type:String,converter:Qt,reflect:!1,useDefault:!1,hasChanged:Ii};Symbol.metadata??=Symbol("metadata"),ze.litPropertyMetadata??=new WeakMap;var D=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=Ri){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let a=Symbol(),o=this.getPropertyDescriptor(e,a,i);o!==void 0&&tr(this.prototype,e,o)}}static getPropertyDescriptor(e,i,a){let{get:o,set:d}=ir(this.prototype,e)??{get(){return this[i]},set(c){this[i]=c}};return{get:o,set(c){let $=o?.call(this);d?.call(this,c),this.requestUpdate(e,$,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ri}static _$Ei(){if(this.hasOwnProperty(le("elementProperties")))return;let e=sr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(le("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(le("properties"))){let i=this.properties,a=[...rr(i),...ar(i)];for(let o of a)this.createProperty(o,i[o])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[a,o]of i)this.elementProperties.set(a,o)}this._$Eh=new Map;for(let[i,a]of this.elementProperties){let o=this._$Eu(i,a);o!==void 0&&this._$Eh.set(o,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let a=new Set(e.flat(1/0).reverse());for(let o of a)i.unshift(Jt(o))}else e!==void 0&&i.push(Jt(e));return i}static _$Eu(e,i){let a=i.attribute;return a===!1?void 0:typeof a=="string"?a:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let a of i.keys())this.hasOwnProperty(a)&&(e.set(a,this[a]),delete this[a]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ci(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,a){this._$AK(e,a)}_$ET(e,i){let a=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,a);if(o!==void 0&&a.reflect===!0){let d=(a.converter?.toAttribute!==void 0?a.converter:Qt).toAttribute(i,a.type);this._$Em=e,d==null?this.removeAttribute(o):this.setAttribute(o,d),this._$Em=null}}_$AK(e,i){let a=this.constructor,o=a._$Eh.get(e);if(o!==void 0&&this._$Em!==o){let d=a.getPropertyOptions(o),c=typeof d.converter=="function"?{fromAttribute:d.converter}:d.converter?.fromAttribute!==void 0?d.converter:Qt;this._$Em=o;let $=c.fromAttribute(i,d.type);this[o]=$??this._$Ej?.get(o)??$,this._$Em=null}}requestUpdate(e,i,a,o=!1,d){if(e!==void 0){let c=this.constructor;if(o===!1&&(d=this[e]),a??=c.getPropertyOptions(e),!((a.hasChanged??Ii)(d,i)||a.useDefault&&a.reflect&&d===this._$Ej?.get(e)&&!this.hasAttribute(c._$Eu(e,a))))return;this.C(e,i,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:a,reflect:o,wrapped:d},c){a&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,c??i??this[e]),d!==!0||c!==void 0)||(this._$AL.has(e)||(this.hasUpdated||a||(i=void 0),this._$AL.set(e,i)),o===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,d]of this._$Ep)this[o]=d;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[o,d]of a){let{wrapped:c}=d,$=this[o];c!==!0||this._$AL.has(o)||$===void 0||this.C(o,void 0,d,$)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(i)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};D.elementStyles=[],D.shadowRootOptions={mode:"open"},D[le("elementProperties")]=new Map,D[le("finalized")]=new Map,nr?.({ReactiveElement:D}),(ze.reactiveElementVersions??=[]).push("2.1.2");var ei=globalThis,F=class extends D{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=se(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _}};F._$litElement$=!0,F.finalized=!0,ei.litElementHydrateSupport?.({LitElement:F});var lr=ei.litElementPolyfillSupport;lr?.({LitElement:F});(ei.litElementVersions??=[]).push("4.2.2");var u=(n,e)=>C(`var(--impakt-${n.replace(/\./g,"-")}, ${e})`),t={brand:u("color.brand.default","#1f4ed8"),brandHover:u("color.brand.hover","#1b45be"),brandActive:u("color.brand.active","#183ba4"),brandSubtle:u("color.brand.subtle","#e4eafa"),onBrand:u("color.text.on-brand","#ffffff"),surfaceCard:u("color.surface.card","#ffffff"),surfaceInset:u("color.surface.inset","#f4f4f4"),surfaceSubtle:u("color.surface.subtle","#e4eafa"),text:u("color.text.default","#1a1a1a"),textMuted:u("color.text.muted","#717171"),textPlaceholder:u("color.text.placeholder","#767676"),textHeading:u("color.text.heading","#1f4ed8"),link:u("color.text.link","#1f4ed8"),linkHover:u("color.text.link-hover","#193ead"),border:u("color.border.default","#929292"),borderStrong:u("color.border.strong","#818181"),danger:u("color.status.danger.default","#c8102e"),dangerText:u("color.status.danger.text","#c8102e"),dangerSubtle:u("color.status.danger.subtle","#f8e2e6"),warning:u("color.status.warning.default","#b45309"),warningText:u("color.status.warning.text","#b45309"),warningSubtle:u("color.status.warning.subtle","#f6eae1"),success:u("color.status.success.default","#047857"),successText:u("color.status.success.text","#047857"),successSubtle:u("color.status.success.subtle","#e0f0ea"),info:u("color.status.info.default","#1f4ed8"),infoText:u("color.status.info.text","#1f4ed8"),infoSubtle:u("color.status.info.subtle","#e4eafa"),fontBody:u("font.family.body","system-ui, sans-serif"),fontHeading:u("font.family.heading","system-ui, sans-serif"),fontMono:u("font.family.mono","ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"),fontEyebrow:u("font.family.eyebrow","inherit"),focusShadow:u("focus.ring.shadow","0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a"),focusOffset:u("focus.ring.offset","2px"),targetMin:u("target.min","24px"),radiusSm:u("radius.sm","2px"),radius:u("radius.md","4px"),radiusLg:u("radius.lg","8px"),borderThin:u("border.width.thin","1px"),borderThick:u("border.width.thick","2px"),radiusXs:u("radius.xs","2px"),radiusXl:u("radius.xl","12px"),radius2xl:u("radius.2xl","16px"),hairline:C("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 10%, transparent)"),rule:C("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 15%, transparent)"),wash:C("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 5%, transparent)"),brandHalo:C("color-mix(in srgb, var(--impakt-color-brand-default, #1f4ed8) 22%, transparent)"),shadowXs:u("shadow.xs","0 1px 2px 0 rgb(0 0 0 / 0.05)"),shadowSm:u("shadow.sm","0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"),shadowMd:u("shadow.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),shadowLg:u("shadow.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),shadowXl:u("shadow.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"),trackingTight:u("font.tracking.tight","-0.02em"),trackingWide:u("font.tracking.wide","0.06em")},w=n=>C(`font-size: var(--impakt-font-size-${n}, 1rem); line-height: var(--impakt-font-leading-${n}, 1.5);`),r=n=>u(`space.${String(n).replace(".","-")}`,`${n*4}px`),b=n=>u(`font.size.${n}`,"1rem"),H=n=>u(`font.line-height.${n}`,"1.5"),m=n=>u(`font.weight.${n}`,"400"),I=h`
|
|
5
|
+
:host([space-above='sm']) { margin-block-start: ${r(2)}; }
|
|
6
|
+
:host([space-above='md']) { margin-block-start: ${r(4)}; }
|
|
7
|
+
:host([space-above='lg']) { margin-block-start: ${r(6)}; }
|
|
8
|
+
:host([space-above='xl']) { margin-block-start: ${r(8)}; }
|
|
9
|
+
:host([space-above='2xl']) { margin-block-start: clamp(${r(14)}, 8vw, ${r(28)}); }
|
|
10
|
+
:host([space-below='sm']) { margin-block-end: ${r(2)}; }
|
|
11
|
+
:host([space-below='md']) { margin-block-end: ${r(4)}; }
|
|
12
|
+
:host([space-below='lg']) { margin-block-end: ${r(6)}; }
|
|
13
|
+
:host([space-below='xl']) { margin-block-end: ${r(8)}; }
|
|
14
|
+
:host([space-below='2xl']) { margin-block-end: clamp(${r(14)}, 8vw, ${r(28)}); }
|
|
15
|
+
`;var k=h`
|
|
16
16
|
:host(:focus-visible),
|
|
17
17
|
:host(:not([disabled])) :focus-visible {
|
|
18
18
|
outline: 2px solid transparent;
|
|
19
19
|
outline-offset: ${t.focusOffset};
|
|
20
20
|
box-shadow: ${t.focusShadow};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,z=h`
|
|
23
23
|
min-block-size: ${t.targetMin};
|
|
24
24
|
min-inline-size: ${t.targetMin};
|
|
25
|
-
`,
|
|
25
|
+
`,S=h`
|
|
26
26
|
position: absolute;
|
|
27
27
|
inline-size: 1px;
|
|
28
28
|
block-size: 1px;
|
|
@@ -32,7 +32,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
32
32
|
clip-path: inset(50%);
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
border: 0;
|
|
35
|
-
`,
|
|
35
|
+
`,_i=h`
|
|
36
36
|
@media (prefers-reduced-motion: reduce) {
|
|
37
37
|
:host,
|
|
38
38
|
:host *,
|
|
@@ -44,7 +44,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
44
44
|
scroll-behavior: auto !important;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,Hi=h`
|
|
48
48
|
:host {
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
font-family: ${t.fontBody};
|
|
@@ -58,15 +58,15 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
58
58
|
*::after {
|
|
59
59
|
box-sizing: inherit;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,A=n=>C(`@media (pointer: coarse) { :host :is(${n}) { min-block-size: 44px; min-inline-size: 44px; } }`),Bi=h`
|
|
62
62
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none !important; } }
|
|
63
63
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none !important; } }
|
|
64
|
-
`;var
|
|
64
|
+
`;var dr=Symbol.for("strata.wording");function T(n,e){let a=globalThis[dr]?.words?.[n],o=typeof a=="string"&&a.trim()?a:n;return e?o.replace(/\{(\w+)\}/g,(d,c)=>c in e?String(e[c]):d):o}var cr=0,p=class extends F{constructor(){super(...arguments);this.uid=`impakt-${cr+=1}`}static{this.styles=[Hi,_i,h``]}id_(i){return`${this.uid}-${i}`}connectedCallback(){super.connectedCallback(),this.sayDefaults()}sayDefaults(){let i=this.constructor.elementProperties,a=this;for(let o of i.keys()){let d=a[o];if(typeof d!="string"||!d)continue;let c=T(d);c!==d&&(a[o]=c)}}};var ti={"arrow-right":y`<path d="M5 12h14M13 6l6 6-6 6"/>`,"arrow-left":y`<path d="M19 12H5M11 6l-6 6 6 6"/>`,"chevron-right":y`<path d="M9 6l6 6-6 6"/>`,"chevron-down":y`<path d="M6 9l6 6 6-6"/>`,check:y`<path d="M5 12.5l4.5 4.5L19 7"/>`,close:y`<path d="M6 6l12 12M18 6L6 18"/>`,menu:y`<path d="M4 7h16M4 12h16M4 17h16"/>`,"menu-two":y`<path d="M5 9.5h14M5 14.5h14"/>`,plus:y`<path d="M12 5v14M5 12h14"/>`,minus:y`<path d="M5 12h14"/>`,search:y`<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>`,external:y`<path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>`,download:y`<path d="M12 4v11M7 10l5 5 5-5M5 20h14"/>`,home:y`<path d="M4 11l8-7 8 7M6 9.5V20h12V9.5"/><path d="M10 20v-6h4v6"/>`,phone:y`<path d="M7 3.5h3l1.5 4-2 1.5a11 11 0 0 0 5.5 5.5l1.5-2 4 1.5v3a2 2 0 0 1-2 2A16 16 0 0 1 5 5.5a2 2 0 0 1 2-2z"/>`,mail:y`<rect x="3.5" y="5.5" width="17" height="13" rx="1.5"/><path d="M4 7l8 6 8-6"/>`,"map-pin":y`<path d="M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z"/><circle cx="12" cy="10" r="2.5"/>`,calendar:y`<rect x="4" y="5.5" width="16" height="14.5" rx="1.5"/><path d="M4 10h16M8.5 3.5v4M15.5 3.5v4"/>`,clock:y`<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>`,user:y`<circle cx="12" cy="8.5" r="3.5"/><path d="M5 20a7 7 0 0 1 14 0"/>`,star:y`<path d="M12 4l2.4 5 5.4.6-4 3.7 1.1 5.4L12 16l-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z"/>`,heart:y`<path d="M12 19.5s-7.5-4.6-7.5-10A4 4 0 0 1 12 7a4 4 0 0 1 7.5 2.5c0 5.4-7.5 10-7.5 10z"/>`,shield:y`<path d="M12 3.5l7 2.5v5.5c0 4.5-3 7.8-7 9-4-1.2-7-4.5-7-9V6z"/><path d="M9 12l2 2 4-4"/>`,leaf:y`<path d="M5 19c0-8 5-13 14-14 0 9-5 14-13 14z"/><path d="M5 19l7-7"/>`,sun:y`<circle cx="12" cy="12" r="3.5"/><path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6L7 7M17 17l1.4 1.4M5.6 18.4L7 17M17 7l1.4-1.4"/>`,bolt:y`<path d="M13 3L5 13.5h6L10 21l8-10.5h-6z"/>`,key:y`<circle cx="8" cy="15" r="3.5"/><path d="M10.5 12.5L19 4M16 7l2.5 2.5M14 9l2 2"/>`,info:y`<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.5v.5"/>`,warning:y`<path d="M12 4l9 15.5H3z"/><path d="M12 10v4M12 16.5v.5"/>`,document:y`<path d="M6 3.5h8l4 4V20a.5.5 0 0 1-.5.5h-11A.5.5 0 0 1 6 20z"/><path d="M14 3.5V8h4M9 13h6M9 16.5h6"/>`,pound:y`<path d="M16 6.5a3.5 3.5 0 0 0-6.5 1.8V20M7 13h7M7 20h10"/>`,chat:y`<path d="M4.5 5.5h15v10h-9l-4 3.5v-3.5h-2z"/>`,grid:y`<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/>`,clipboard:y`<rect x="8" y="2" width="8" height="4" rx="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2M12 11h4M12 16h4M8 11h.01M8 16h.01"/>`,"map-pinned":y`<path d="M18 8c0 3.6-3.9 7.4-5.4 8.8a1 1 0 0 1-1.2 0C9.9 15.4 6 11.6 6 8a6 6 0 0 1 12 0"/><circle cx="12" cy="8" r="2"/><path d="M8.7 14H5a1 1 0 0 0-.9.7l-2 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .9-1.3l-2-6a1 1 0 0 0-.9-.7h-3.7"/>`,users:y`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8"/>`,radio:y`<path d="M4.9 19.1C1 15.2 1 8.8 4.9 4.9M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5M19.1 4.9C23 8.8 23 15.1 19.1 19"/><circle cx="12" cy="12" r="2"/>`,settings:y`<path d="M12.2 2h-.4a2 2 0 0 0-2 2v.2a2 2 0 0 1-1 1.7l-.4.3a2 2 0 0 1-2 0l-.2-.1a2 2 0 0 0-2.7.7l-.2.4a2 2 0 0 0 .7 2.7l.2.1a2 2 0 0 1 1 1.7v.5a2 2 0 0 1-1 1.8l-.2.1a2 2 0 0 0-.7 2.7l.2.4a2 2 0 0 0 2.7.7l.2-.1a2 2 0 0 1 2 0l.4.3a2 2 0 0 1 1 1.7v.2a2 2 0 0 0 2 2h.4a2 2 0 0 0 2-2v-.2a2 2 0 0 1 1-1.7l.4-.3a2 2 0 0 1 2 0l.2.1a2 2 0 0 0 2.7-.7l.2-.4a2 2 0 0 0-.7-2.7l-.2-.1a2 2 0 0 1-1-1.8v-.5a2 2 0 0 1 1-1.7l.2-.1a2 2 0 0 0 .7-2.7l-.2-.4a2 2 0 0 0-2.7-.7l-.2.1a2 2 0 0 1-2 0l-.4-.3a2 2 0 0 1-1-1.7V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`,"log-out":y`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/>`,"arrow-up-right":y`<path d="M7 7h10v10M7 17L17 7"/>`,more:y`<circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/>`,upload:y`<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/>`,image:y`<rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="9" cy="9" r="2"/><path d="M21 15l-3.1-3.1a2 2 0 0 0-2.8 0L6 21"/>`,lock:y`<rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`,eye:y`<path d="M2.1 12.3a1 1 0 0 1 0-.7 10.8 10.8 0 0 1 19.8 0 1 1 0 0 1 0 .7 10.8 10.8 0 0 1-19.8 0"/><circle cx="12" cy="12" r="3"/>`,trash:y`<path d="M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2M10 11v6M14 11v6"/>`,pencil:y`<path d="M21.2 6.8a1 1 0 0 0-4-4L3.8 16.2a2 2 0 0 0-.5.8L2 21.4a.5.5 0 0 0 .6.6l4.4-1.3a2 2 0 0 0 .8-.5zM15 5l4 4"/>`,"qr-code":y`<rect x="3" y="3" width="5" height="5" rx="1"/><rect x="16" y="3" width="5" height="5" rx="1"/><rect x="3" y="16" width="5" height="5" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3M21 21v.01M12 7v3a2 2 0 0 1-2 2H7M3 12h.01M12 3h.01M12 16v.01M16 12h1M21 12v.01M12 21v-1"/>`,battery:y`<rect x="2" y="7" width="16" height="10" rx="2"/><path d="M22 11v2M6 11v2M10 11v2"/>`},pr=Object.keys(ti);function M(n,e="1.25em"){let i=n?ti[n]:void 0;return i?s`<svg class="icon" viewBox="0 0 24 24" width=${e} height=${e} fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${i}</svg>`:l}var Me=class extends p{static{this.properties={name:{type:String,reflect:!0},label:{type:String},size:{type:String,reflect:!0},tone:{type:String,reflect:!0}}}constructor(){super(),this.name="star",this.label="",this.size="md",this.tone="inherit"}static{this.styles=[...p.styles,h`
|
|
65
65
|
:host { display: inline-flex; vertical-align: middle; line-height: 0; }
|
|
66
66
|
:host([tone='brand']) { color: ${t.brand}; }
|
|
67
67
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
68
68
|
@media (forced-colors: active) { :host { color: CanvasText; } }
|
|
69
|
-
`]}render(){let e={sm:"16px",md:"24px",lg:"32px",xl:"48px"}[this.size]??"24px",
|
|
69
|
+
`]}render(){let e={sm:"16px",md:"24px",lg:"32px",xl:"48px"}[this.size]??"24px",i=M(this.name,e);return this.label?s`<span role="img" aria-label=${this.label}>${i}</span>`:s`${i}`}};customElements.define("impakt-icon",Me);var ii=u("color.text.inverse","var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))"),Ee=class extends p{constructor(){super();this.internals=null;this.hideOn="never",this.variant="primary",this.type="button",this.disabled=!1,this.busy=!1,this.busyLabel="Working",this.full=!1,this.fullOnPhone=!1,this.size="md",this.iconBefore="none",this.iconAfter="none",this.href="",this.icon="none",this.label="",this.spread=!1,this.centred=!1;try{this.internals=this.attachInternals()}catch{this.internals=null}}static{this.formAssociated=!0}static{this.properties={hideOn:{type:String,reflect:!0,attribute:"hide-on"},variant:{type:String,reflect:!0},type:{type:String},disabled:{type:Boolean,reflect:!0},busy:{type:Boolean,reflect:!0},busyLabel:{type:String,attribute:"busy-label"},full:{type:Boolean,reflect:!0},fullOnPhone:{type:Boolean,attribute:"full-on-phone",reflect:!0},size:{type:String,reflect:!0},iconBefore:{type:String,attribute:"icon-before"},iconAfter:{type:String,attribute:"icon-after"},href:{type:String},icon:{type:String},label:{type:String},spread:{type:Boolean,reflect:!0},centred:{type:Boolean,reflect:!0}}}static{this.styles=[...p.styles,k,A("button, a"),h`
|
|
70
70
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
71
71
|
:host {
|
|
72
72
|
display: inline-block;
|
|
@@ -76,26 +76,30 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
76
76
|
}
|
|
77
77
|
@media (max-width: 40rem) { :host([full-on-phone]) { display: block; } }
|
|
78
78
|
button, a {
|
|
79
|
-
${
|
|
79
|
+
${z}
|
|
80
80
|
box-sizing: border-box;
|
|
81
81
|
text-decoration: none;
|
|
82
82
|
display: inline-flex;
|
|
83
83
|
align-items: center;
|
|
84
84
|
justify-content: center;
|
|
85
|
-
gap: ${
|
|
85
|
+
gap: ${r(3)};
|
|
86
86
|
inline-size: 100%;
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
/* G2: Archivo Medium 16, 14 by 20, about 47px tall. */
|
|
88
|
+
min-block-size: 44px;
|
|
89
|
+
padding: 14px ${r(5)};
|
|
89
90
|
font-family: inherit;
|
|
90
|
-
${
|
|
91
|
-
|
|
91
|
+
font-size: ${b("md")};
|
|
92
|
+
line-height: 1.2;
|
|
93
|
+
font-weight: ${m("medium")};
|
|
92
94
|
border-radius: ${t.radiusLg};
|
|
93
95
|
border: ${t.borderThin} solid transparent;
|
|
94
96
|
cursor: pointer;
|
|
95
97
|
transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
96
98
|
}
|
|
97
|
-
:host([size='sm']) :is(button, a) { min-block-size: 32px; padding: ${
|
|
98
|
-
:host([size='lg']) :is(button, a) { min-block-size:
|
|
99
|
+
:host([size='sm']) :is(button, a) { min-block-size: 32px; padding: ${r(1.5)} ${r(3)}; ${w("sm")} gap: ${r(1.5)}; }
|
|
100
|
+
:host([size='lg']) :is(button, a) { min-block-size: 56px; padding: ${r(4)} ${r(6)}; ${w("lg")} }
|
|
101
|
+
/* Spread: the words at the start, the trailing icon at the far end. A full-width button spreads unless it is centred. */
|
|
102
|
+
:host([spread]) :is(button, a), :host([full]:not([centred])) :is(button, a) { justify-content: space-between; text-align: start; }
|
|
99
103
|
.icon { flex: none; inline-size: 1.15em; block-size: 1.15em; }
|
|
100
104
|
/* The cursor is the only thing that changes while busy. Moving or
|
|
101
105
|
recolouring a control the moment it is pressed is how a user loses it. */
|
|
@@ -107,30 +111,28 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
107
111
|
opacity: 0.5;
|
|
108
112
|
}
|
|
109
113
|
|
|
110
|
-
/* Solid: the brand,
|
|
114
|
+
/* Solid: the brand, flat. On an ink band the band sets the brand to the paper, so it reads "Light". */
|
|
111
115
|
.primary {
|
|
112
|
-
background: ${t.brand};
|
|
113
|
-
color: ${t.onBrand};
|
|
114
|
-
box-shadow: ${t.shadowXs}, inset 0 1px 0 0 rgb(255 255 255 / 0.12);
|
|
116
|
+
background: var(--impakt-button-primary, ${t.brand});
|
|
117
|
+
color: var(--impakt-button-on-primary, ${t.onBrand});
|
|
115
118
|
}
|
|
116
119
|
.primary:hover:not([aria-disabled='true']) {
|
|
117
|
-
background: var(--impakt-color-action-hover, ${t.brandHover});
|
|
118
|
-
color: var(--impakt-color-action-on-hover, ${t.onBrand});
|
|
120
|
+
background: var(--impakt-button-primary-hover, var(--impakt-color-action-hover, ${t.brandHover}));
|
|
121
|
+
color: var(--impakt-button-on-primary, var(--impakt-color-action-on-hover, ${t.onBrand}));
|
|
119
122
|
}
|
|
120
123
|
/* A brand whose buttons turn on hover lifts the trailing arrow a quarter-turn. */
|
|
121
124
|
.after { transition: transform 160ms ease-out; }
|
|
122
125
|
:is(button, a):hover:not([aria-disabled='true']) .after { transform: rotate(var(--impakt-motion-button-turn, 0deg)); }
|
|
123
126
|
@media (prefers-reduced-motion: reduce) { .after { transition: none; } }
|
|
124
127
|
.primary:active:not([aria-disabled='true']) {
|
|
125
|
-
background: ${t.brandActive};
|
|
128
|
+
background: var(--impakt-button-primary-hover, ${t.brandActive});
|
|
126
129
|
}
|
|
127
130
|
|
|
128
131
|
/* Outline: the card, a hairline border and the text colour, for the second choice. */
|
|
129
132
|
.secondary {
|
|
130
133
|
background: ${t.surfaceCard};
|
|
131
134
|
color: ${t.text};
|
|
132
|
-
border-color: ${t.
|
|
133
|
-
box-shadow: ${t.shadowXs};
|
|
135
|
+
border-color: ${t.text};
|
|
134
136
|
}
|
|
135
137
|
.secondary:hover:not([aria-disabled='true']) {
|
|
136
138
|
background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%);
|
|
@@ -146,16 +148,35 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
146
148
|
background: ${t.wash};
|
|
147
149
|
}
|
|
148
150
|
|
|
149
|
-
/*
|
|
151
|
+
/*
|
|
152
|
+
* Dark: the text colour as a fill, the strong second choice on a light page.
|
|
153
|
+
* Its words are the colour that reads on the text colour, which a toned band
|
|
154
|
+
* sets as --impakt-color-text-inverse. They are never the card colour, which
|
|
155
|
+
* a band repaints as a faint wash of its own text, and which left ink words at
|
|
156
|
+
* 10% on an ink fill when this button sat in a banner on an accent band.
|
|
157
|
+
*/
|
|
150
158
|
.dark {
|
|
151
159
|
background: ${t.text};
|
|
152
|
-
color: ${
|
|
160
|
+
color: ${ii};
|
|
153
161
|
}
|
|
154
162
|
.dark:hover:not([aria-disabled='true']) {
|
|
155
|
-
background: color-mix(in srgb, ${t.text}, ${
|
|
163
|
+
background: color-mix(in srgb, ${t.text}, ${ii} 14%);
|
|
156
164
|
}
|
|
157
165
|
.dark:active:not([aria-disabled='true']) {
|
|
158
|
-
background: color-mix(in srgb, ${t.text}, ${
|
|
166
|
+
background: color-mix(in srgb, ${t.text}, ${ii} 24%);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Outline: transparent, a 1px border and words in the text colour, the design's "Ghost". On an ink band both are the paper. */
|
|
170
|
+
.outline {
|
|
171
|
+
background: transparent;
|
|
172
|
+
color: ${t.text};
|
|
173
|
+
border-color: ${t.text};
|
|
174
|
+
}
|
|
175
|
+
.outline:hover:not([aria-disabled='true']) {
|
|
176
|
+
background: ${t.wash};
|
|
177
|
+
}
|
|
178
|
+
.outline:active:not([aria-disabled='true']) {
|
|
179
|
+
background: color-mix(in srgb, ${t.text} 10%, transparent);
|
|
159
180
|
}
|
|
160
181
|
|
|
161
182
|
/* Subtle: a quiet fill, for an action that sits beside the main one. */
|
|
@@ -185,7 +206,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
185
206
|
/* Danger: the danger text colour as a fill, so white words on it keep 4.5:1. */
|
|
186
207
|
.danger {
|
|
187
208
|
background: ${t.dangerText};
|
|
188
|
-
color: ${t.surfaceCard};
|
|
209
|
+
color: var(--impakt-solid-card, ${t.surfaceCard});
|
|
189
210
|
}
|
|
190
211
|
.danger:hover:not([aria-disabled='true']) {
|
|
191
212
|
background: color-mix(in srgb, ${t.dangerText}, ${t.text} 15%);
|
|
@@ -194,20 +215,20 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
194
215
|
background: color-mix(in srgb, ${t.dangerText}, ${t.text} 28%);
|
|
195
216
|
}
|
|
196
217
|
|
|
197
|
-
/* Icon only:
|
|
218
|
+
/* Icon only: as tall as it is wide, round where the brand rounds its corners and square under Noire. */
|
|
198
219
|
.icon-only {
|
|
199
|
-
inline-size:
|
|
200
|
-
min-inline-size:
|
|
201
|
-
block-size:
|
|
202
|
-
min-block-size:
|
|
220
|
+
inline-size: 47px;
|
|
221
|
+
min-inline-size: 47px;
|
|
222
|
+
block-size: 47px;
|
|
223
|
+
min-block-size: 47px;
|
|
203
224
|
padding: 0;
|
|
204
|
-
border-radius:
|
|
225
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
205
226
|
}
|
|
206
227
|
:host([size='sm']) .icon-only { inline-size: 32px; min-inline-size: 32px; block-size: 32px; min-block-size: 32px; padding: 0; }
|
|
207
|
-
:host([size='lg']) .icon-only { inline-size:
|
|
228
|
+
:host([size='lg']) .icon-only { inline-size: 56px; min-inline-size: 56px; block-size: 56px; min-block-size: 56px; padding: 0; }
|
|
208
229
|
|
|
209
230
|
.sr-only {
|
|
210
|
-
${
|
|
231
|
+
${S}
|
|
211
232
|
}
|
|
212
233
|
|
|
213
234
|
/* Windows High Contrast Mode drops background and border colours, so a
|
|
@@ -218,9 +239,9 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
218
239
|
border-color: ButtonBorder;
|
|
219
240
|
}
|
|
220
241
|
}
|
|
221
|
-
`]}onClick(
|
|
242
|
+
`]}onClick(i){if(this.disabled||this.busy){i.preventDefault(),i.stopImmediatePropagation();return}this.type==="submit"&&this.internals?.form?.requestSubmit(),this.type==="reset"&&this.internals?.form?.reset()}render(){let i=!!(this.icon&&this.icon!=="none"&&this.label),a=i?`${this.variant} icon-only`:this.variant;if(i){let d=M(this.icon);return this.href&&!this.disabled?s`<a class=${a} href=${this.href} part="button" aria-label=${this.label}>${d}</a>`:s`
|
|
222
243
|
<button
|
|
223
|
-
class=${
|
|
244
|
+
class=${a}
|
|
224
245
|
type="button"
|
|
225
246
|
part="button"
|
|
226
247
|
aria-label=${this.label}
|
|
@@ -230,9 +251,9 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
230
251
|
@click=${this.onClick}
|
|
231
252
|
>
|
|
232
253
|
${d}
|
|
233
|
-
${this.busy?
|
|
254
|
+
${this.busy?s`<span class="sr-only">${this.busyLabel}</span>`:l}
|
|
234
255
|
</button>
|
|
235
|
-
`}let o=
|
|
256
|
+
`}let o=s`${M(this.iconBefore)}<slot></slot>${this.iconAfter&&this.iconAfter!=="none"?s`<span class="after" aria-hidden="true">${M(this.iconAfter)}</span>`:l}`;return this.href&&!this.disabled?s`<a class=${this.variant} href=${this.href} part="button">${o}</a>`:s`
|
|
236
257
|
<button
|
|
237
258
|
class=${this.variant}
|
|
238
259
|
type="button"
|
|
@@ -243,25 +264,64 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
243
264
|
@click=${this.onClick}
|
|
244
265
|
>
|
|
245
266
|
${o}
|
|
246
|
-
${this.busy?
|
|
267
|
+
${this.busy?s`<span class="sr-only">${this.busyLabel}</span>`:l}
|
|
247
268
|
</button>
|
|
248
|
-
`}};customElements.define("impakt-button",
|
|
269
|
+
`}};customElements.define("impakt-button",Ee);var N=h`
|
|
249
270
|
:host { --impakt-field-width: 100%; }
|
|
250
271
|
:host([width='xs']) { --impakt-field-width: 8ch; }
|
|
251
272
|
:host([width='sm']) { --impakt-field-width: 14ch; }
|
|
252
273
|
:host([width='md']) { --impakt-field-width: 24ch; }
|
|
253
274
|
:host([width='lg']) { --impakt-field-width: 40ch; }
|
|
254
|
-
`,
|
|
275
|
+
`,Q=n=>{let e=C(n);return h`
|
|
276
|
+
${e} {
|
|
277
|
+
inline-size: min(100%, var(--impakt-field-width));
|
|
278
|
+
min-block-size: 50px;
|
|
279
|
+
padding: 13px ${r(3.5)};
|
|
280
|
+
font-family: inherit;
|
|
281
|
+
font-size: ${b("md")};
|
|
282
|
+
line-height: 1.5;
|
|
283
|
+
color: ${t.text};
|
|
284
|
+
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
285
|
+
border: ${t.borderThin} solid var(--impakt-color-field-border, ${t.text});
|
|
286
|
+
border-radius: ${t.radius};
|
|
287
|
+
box-shadow: var(--impakt-shadow-field, none);
|
|
288
|
+
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
289
|
+
}
|
|
290
|
+
${e}:focus-visible {
|
|
291
|
+
border-color: ${t.text};
|
|
292
|
+
box-shadow: ${t.focusShadow};
|
|
293
|
+
}
|
|
294
|
+
${e}::placeholder {
|
|
295
|
+
color: ${t.textPlaceholder};
|
|
296
|
+
}
|
|
297
|
+
${e}:disabled {
|
|
298
|
+
background: ${t.surfaceInset};
|
|
299
|
+
cursor: not-allowed;
|
|
300
|
+
}
|
|
301
|
+
/* The border thickens as well as reddening, and the message below says it in words (1.4.1). */
|
|
302
|
+
:host([invalid]) ${e} {
|
|
303
|
+
border-color: ${t.danger};
|
|
304
|
+
border-width: ${t.borderThick};
|
|
305
|
+
}
|
|
306
|
+
`},x=class extends p{constructor(){super();this.internals=null;this.label="",this.name="",this.value="",this.description="",this.error="",this.required=!1,this.disabled=!1,this.readonly=!1,this.requiredText="required";try{this.internals=this.attachInternals()}catch{this.internals=null}}static{this.formAssociated=!0}static{this.properties={label:{type:String},name:{type:String},value:{type:String},description:{type:String},error:{type:String},required:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},requiredText:{type:String,attribute:"required-text"}}}static{this.styles=[...p.styles,k,h`
|
|
255
307
|
:host {
|
|
256
308
|
display: block;
|
|
257
|
-
margin-block-end: ${
|
|
309
|
+
margin-block-end: ${r(4)};
|
|
258
310
|
}
|
|
311
|
+
/*
|
|
312
|
+
* The question, in the code face at 14px in the ink (G2). A page can set it
|
|
313
|
+
* another way through these properties, such as the site's contact form,
|
|
314
|
+
* which sets its labels in capitals at 11px (frame 20:1157).
|
|
315
|
+
*/
|
|
259
316
|
.label {
|
|
260
317
|
display: block;
|
|
261
|
-
font-
|
|
262
|
-
font-
|
|
263
|
-
|
|
264
|
-
|
|
318
|
+
font-family: var(--impakt-field-label-font, ${t.fontMono});
|
|
319
|
+
font-size: var(--impakt-field-label-size, ${b("sm")});
|
|
320
|
+
font-weight: var(--impakt-field-label-weight, ${m("regular")});
|
|
321
|
+
letter-spacing: var(--impakt-field-label-tracking, normal);
|
|
322
|
+
text-transform: var(--impakt-field-label-transform, none);
|
|
323
|
+
line-height: ${H("normal")};
|
|
324
|
+
margin-block-end: ${r(2)};
|
|
265
325
|
color: ${t.text};
|
|
266
326
|
}
|
|
267
327
|
.required {
|
|
@@ -270,23 +330,23 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
270
330
|
}
|
|
271
331
|
.description {
|
|
272
332
|
font-size: ${b("sm")};
|
|
273
|
-
line-height: ${
|
|
333
|
+
line-height: ${H("normal")};
|
|
274
334
|
color: ${t.textMuted};
|
|
275
|
-
margin-block-end: ${
|
|
335
|
+
margin-block-end: ${r(2)};
|
|
276
336
|
}
|
|
277
337
|
.error {
|
|
278
338
|
font-size: ${b("sm")};
|
|
279
|
-
line-height: ${
|
|
339
|
+
line-height: ${H("normal")};
|
|
280
340
|
color: ${t.dangerText};
|
|
281
|
-
margin-block-start: ${
|
|
341
|
+
margin-block-start: ${r(1)};
|
|
282
342
|
display: flex;
|
|
283
|
-
gap: ${
|
|
343
|
+
gap: ${r(1)};
|
|
284
344
|
}
|
|
285
345
|
.error:empty {
|
|
286
346
|
display: none;
|
|
287
347
|
}
|
|
288
348
|
.visually-hidden {
|
|
289
|
-
${
|
|
349
|
+
${S}
|
|
290
350
|
}
|
|
291
351
|
/*
|
|
292
352
|
* Only the control is dimmed. Dimming the whole host took the question,
|
|
@@ -298,13 +358,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
298
358
|
opacity: 0.6;
|
|
299
359
|
cursor: not-allowed;
|
|
300
360
|
}
|
|
301
|
-
`]}get controlId(){return this.id_("control")}get describedBy(){let
|
|
361
|
+
`]}get controlId(){return this.id_("control")}get describedBy(){let i=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean);return i.length?i.join(" "):l}focus(i){let a=this.renderRoot?.querySelector(`#${this.controlId}`)??this.renderRoot?.querySelector("input, select, textarea, button");a?a.focus(i):super.focus(i)}renderLabel(){return s`
|
|
302
362
|
<label class="label" for=${this.controlId} part="label">
|
|
303
|
-
${this.label}${this.required?
|
|
363
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
304
364
|
</label>
|
|
305
|
-
`}render(){return
|
|
365
|
+
`}render(){return s`
|
|
306
366
|
${this.renderLabel()}
|
|
307
|
-
${this.description?
|
|
367
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">
|
|
308
368
|
${this.description}
|
|
309
369
|
</div>`:l}
|
|
310
370
|
${this.renderControl()}
|
|
@@ -323,37 +383,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
323
383
|
>
|
|
324
384
|
${this.error||l}
|
|
325
385
|
</div>
|
|
326
|
-
`}setFormValue(
|
|
327
|
-
input {
|
|
328
|
-
inline-size: min(100%, var(--impakt-field-width));
|
|
329
|
-
min-block-size: 44px;
|
|
330
|
-
padding: ${s(2.5)} ${s(3)};
|
|
331
|
-
font-family: inherit;
|
|
332
|
-
font-size: ${b("md")};
|
|
333
|
-
color: ${t.text};
|
|
334
|
-
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
335
|
-
border: ${t.borderThin} solid ${t.border};
|
|
336
|
-
border-radius: ${t.radiusLg};
|
|
337
|
-
box-shadow: var(--impakt-shadow-field, ${t.shadowXs});
|
|
338
|
-
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
339
|
-
}
|
|
340
|
-
input:hover:not(:disabled) {
|
|
341
|
-
border-color: ${t.borderStrong};
|
|
342
|
-
}
|
|
343
|
-
/* A brand halo as well as the focus ring, so the field being typed in is plain at a glance. */
|
|
344
|
-
input:focus-visible {
|
|
345
|
-
border-color: ${t.brand};
|
|
346
|
-
box-shadow: ${t.focusShadow}, 0 0 0 6px ${t.brandHalo};
|
|
347
|
-
}
|
|
348
|
-
input::placeholder {
|
|
349
|
-
color: ${t.textPlaceholder};
|
|
350
|
-
}
|
|
351
|
-
input:disabled {
|
|
352
|
-
background: ${t.surfaceInset};
|
|
353
|
-
cursor: not-allowed;
|
|
354
|
-
}
|
|
355
|
-
/* The border thickens as well as reddening. Colour alone would carry the
|
|
356
|
-
error, which 1.4.1 forbids — and the message below says it in words. */
|
|
386
|
+
`}setFormValue(i){this.value=i,this.internals?.setFormValue(i),this.dispatchEvent(new CustomEvent("impakt-change",{detail:this.changeDetail(i),bubbles:!0,composed:!0}))}changeDetail(i){return{value:i}}};var Ae=class extends x{static{this.properties={...x.properties,width:{type:String,reflect:!0},type:{type:String},placeholder:{type:String},autocomplete:{type:String},inputmode:{type:String},maxlength:{type:Number},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0}}}constructor(){super(),this.width="full",this.type="text",this.placeholder="",this.autocomplete="",this.inputmode="",this.maxlength=void 0,this.hideLabel=!1}static{this.styles=[...x.styles,N,Q("input"),h`
|
|
357
387
|
:host([hide-label]) .label {
|
|
358
388
|
position: absolute;
|
|
359
389
|
inline-size: 1px;
|
|
@@ -369,22 +399,19 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
369
399
|
}
|
|
370
400
|
.search input {
|
|
371
401
|
inline-size: 100%;
|
|
372
|
-
padding-inline-start: ${
|
|
373
|
-
|
|
402
|
+
padding-inline-start: ${r(10)};
|
|
403
|
+
/* A pill where the brand rounds its corners, square under Noire. */
|
|
404
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
374
405
|
}
|
|
375
406
|
.search .icon {
|
|
376
407
|
position: absolute;
|
|
377
|
-
inset-inline-start: ${
|
|
408
|
+
inset-inline-start: ${r(3.5)};
|
|
378
409
|
inset-block-start: 50%;
|
|
379
410
|
transform: translateY(-50%);
|
|
380
411
|
color: ${t.textMuted};
|
|
381
412
|
pointer-events: none;
|
|
382
413
|
}
|
|
383
|
-
|
|
384
|
-
border-color: ${t.danger};
|
|
385
|
-
border-width: ${t.borderThick};
|
|
386
|
-
}
|
|
387
|
-
`]}renderControl(){let e=this.renderInput();return this.type==="search"?n`<span class="search" part="search">${z("search","20px")}${e}</span>`:e}renderInput(){return n`
|
|
414
|
+
`]}renderControl(){let e=this.renderInput();return this.type==="search"?s`<span class="search" part="search">${M("search","20px")}${e}</span>`:e}renderInput(){return s`
|
|
388
415
|
<input
|
|
389
416
|
id=${this.controlId}
|
|
390
417
|
part="input"
|
|
@@ -402,41 +429,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
402
429
|
aria-invalid=${this.error?"true":l}
|
|
403
430
|
@input=${e=>this.setFormValue(e.target.value)}
|
|
404
431
|
/>
|
|
405
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",
|
|
432
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",Ae);var Ce=class extends x{static{this.properties={...x.properties,width:{type:String,reflect:!0},options:{type:Array},placeholder:{type:String},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0}}}constructor(){super(),this.width="full",this.options=[],this.placeholder="Choose an option",this.hideLabel=!1}static{this.styles=[...x.styles,N,Q("select"),h`
|
|
406
433
|
:host([hide-label]) .label {
|
|
407
|
-
${
|
|
408
|
-
}
|
|
409
|
-
select {
|
|
410
|
-
inline-size: min(100%, var(--impakt-field-width));
|
|
411
|
-
min-block-size: 44px;
|
|
412
|
-
padding: ${s(2.5)} ${s(3)};
|
|
413
|
-
font-family: inherit;
|
|
414
|
-
font-size: ${b("md")};
|
|
415
|
-
color: ${t.text};
|
|
416
|
-
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
417
|
-
border: ${t.borderThin} solid ${t.border};
|
|
418
|
-
border-radius: ${t.radiusLg};
|
|
419
|
-
box-shadow: var(--impakt-shadow-field, ${t.shadowXs});
|
|
420
|
-
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
421
|
-
}
|
|
422
|
-
select:hover:not(:disabled) {
|
|
423
|
-
border-color: ${t.borderStrong};
|
|
424
|
-
}
|
|
425
|
-
/* A brand halo as well as the focus ring, so the field being typed in is plain at a glance. */
|
|
426
|
-
select:focus-visible {
|
|
427
|
-
border-color: ${t.brand};
|
|
428
|
-
box-shadow: ${t.focusShadow}, 0 0 0 6px ${t.brandHalo};
|
|
429
|
-
}
|
|
430
|
-
select:disabled {
|
|
431
|
-
background: ${t.surfaceInset};
|
|
432
|
-
cursor: not-allowed;
|
|
433
|
-
}
|
|
434
|
-
:host([invalid]) select {
|
|
435
|
-
border-color: ${t.danger};
|
|
436
|
-
border-width: ${t.borderThick};
|
|
434
|
+
${S}
|
|
437
435
|
}
|
|
438
|
-
|
|
439
|
-
|
|
436
|
+
/* The browser's own arrow is replaced by a small "▾", drawn beside the box's end and hidden from screen readers. */
|
|
437
|
+
.box { position: relative; display: block; inline-size: min(100%, var(--impakt-field-width)); }
|
|
438
|
+
select { inline-size: 100%; appearance: none; -webkit-appearance: none; padding-inline-end: ${r(9)}; cursor: pointer; }
|
|
439
|
+
.caret { position: absolute; inset-inline-end: ${r(3.5)}; inset-block-start: 50%; transform: translateY(-50%); font-size: ${b("sm")}; line-height: 1; color: ${t.text}; pointer-events: none; }
|
|
440
|
+
/* A forced colours mode draws the box in the system colours; the caret takes the text colour. */
|
|
441
|
+
@media (forced-colors: active) { .caret { color: CanvasText; } }
|
|
442
|
+
`]}renderControl(){return s`
|
|
443
|
+
<span class="box" part="box"><select
|
|
440
444
|
id=${this.controlId}
|
|
441
445
|
part="select"
|
|
442
446
|
name=${this.name||l}
|
|
@@ -447,17 +451,17 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
447
451
|
@change=${e=>this.setFormValue(e.target.value)}
|
|
448
452
|
>
|
|
449
453
|
<option value="" ?selected=${!this.value}>${this.placeholder}</option>
|
|
450
|
-
${this.options.map(e=>
|
|
451
|
-
</select>
|
|
452
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",
|
|
454
|
+
${this.options.map(e=>s`<option value=${e.value} ?selected=${this.value===e.value}>${e.label}</option>`)}
|
|
455
|
+
</select><span class="caret" aria-hidden="true">▾</span></span>
|
|
456
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",Ce);var Le=class extends x{static{this.properties={...x.properties,checked:{type:Boolean,reflect:!0}}}constructor(){super(),this.checked=!1}static{this.styles=[...x.styles,A(".row"),h`
|
|
453
457
|
.row {
|
|
454
458
|
display: flex;
|
|
455
459
|
align-items: flex-start;
|
|
456
|
-
gap: ${
|
|
460
|
+
gap: ${r(3)};
|
|
457
461
|
cursor: pointer;
|
|
458
462
|
}
|
|
459
463
|
input {
|
|
460
|
-
${
|
|
464
|
+
${z}
|
|
461
465
|
inline-size: 20px;
|
|
462
466
|
block-size: 20px;
|
|
463
467
|
margin: 0;
|
|
@@ -470,7 +474,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
470
474
|
:host([invalid]) .row {
|
|
471
475
|
color: ${t.dangerText};
|
|
472
476
|
}
|
|
473
|
-
`]}renderControl(){return
|
|
477
|
+
`]}renderControl(){return s`
|
|
474
478
|
<label class="row" part="row" for=${this.controlId}>
|
|
475
479
|
<input
|
|
476
480
|
type="checkbox"
|
|
@@ -485,20 +489,20 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
485
489
|
@change=${e=>{this.checked=e.target.checked,this.setFormValue(this.checked?"on":"")}}
|
|
486
490
|
/>
|
|
487
491
|
<span class="text">
|
|
488
|
-
${this.label}${this.required?
|
|
492
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
489
493
|
</span>
|
|
490
494
|
</label>
|
|
491
|
-
`}renderLabel(){return
|
|
492
|
-
:host { display: flex; flex-direction: column; gap: ${
|
|
493
|
-
.card { padding: ${
|
|
494
|
-
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
495
|
+
`}renderLabel(){return s`${l}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox",Le);var hr=C("48rem");function Ni(n){if(!n||n.startsWith("#"))return null;try{let e=typeof location>"u"?"http://localhost/":location.href;return new URL(n,e).pathname.replace(/\/$/,"")||"/"}catch{return null}}function ri(n,e){let i=Ni(n);if(!i)return!1;let a=Ni(e||(typeof location>"u"?"":location.pathname));return a?i===a?!0:i!=="/"&&a.startsWith(`${i}/`):!1}function de(n,e,i){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let a=new CustomEvent("impakt-navigate",{detail:{href:i.href,id:i.id??i.href},bubbles:!0,composed:!0,cancelable:!0});n.dispatchEvent(a)||e.preventDefault()}var Re=class extends p{constructor(){super();this.footerFilled=!1;this.items=[],this.label="Main",this.current=""}static{this.properties={items:{type:Array},label:{type:String},current:{type:String}}}static{this.styles=[...p.styles,k,h`
|
|
496
|
+
:host { display: flex; flex-direction: column; gap: ${r(5)}; block-size: 100%; }
|
|
497
|
+
.card { padding: ${r(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }
|
|
498
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${r(.5)}; }
|
|
495
499
|
a {
|
|
496
|
-
${
|
|
500
|
+
${z}
|
|
497
501
|
display: flex;
|
|
498
502
|
align-items: center;
|
|
499
|
-
gap: ${
|
|
503
|
+
gap: ${r(3)};
|
|
500
504
|
min-block-size: 44px;
|
|
501
|
-
padding: 0 ${
|
|
505
|
+
padding: 0 ${r(3.5)};
|
|
502
506
|
border-radius: ${t.radiusLg};
|
|
503
507
|
color: ${t.text};
|
|
504
508
|
font-size: ${b("md")};
|
|
@@ -513,35 +517,35 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
513
517
|
.footer.empty { display: none; }
|
|
514
518
|
@media (prefers-reduced-motion: reduce) { a { transition: none; } }
|
|
515
519
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
516
|
-
`]}onFooter(
|
|
520
|
+
`]}onFooter(i){let a=i.target;this.footerFilled=a.assignedNodes({flatten:!0}).some(o=>o.nodeType===Node.ELEMENT_NODE||(o.textContent??"").trim()!==""),this.requestUpdate()}render(){return s`
|
|
517
521
|
<nav class="card" aria-label=${this.label} part="nav">
|
|
518
522
|
<ul part="list">
|
|
519
|
-
${this.items.map(
|
|
523
|
+
${this.items.map(i=>s`
|
|
520
524
|
<li>
|
|
521
525
|
<a
|
|
522
|
-
href=${
|
|
526
|
+
href=${i.href}
|
|
523
527
|
part="link"
|
|
524
|
-
aria-current=${
|
|
525
|
-
@click=${
|
|
526
|
-
>${
|
|
528
|
+
aria-current=${ri(i.href,this.current)?"page":l}
|
|
529
|
+
@click=${a=>de(this,a,i)}
|
|
530
|
+
>${M(i.icon,"20px")}<span>${i.label}</span></a>
|
|
527
531
|
</li>
|
|
528
532
|
`)}
|
|
529
533
|
</ul>
|
|
530
534
|
</nav>
|
|
531
535
|
<div class="card footer ${this.footerFilled?"":"empty"}" part="footer"><slot name="footer" @slotchange=${this.onFooter}></slot></div>
|
|
532
|
-
`}},
|
|
536
|
+
`}},Ie=class extends p{static{this.properties={items:{type:Array},label:{type:String},current:{type:String}}}constructor(){super(),this.items=[],this.label="Main",this.current=""}static{this.styles=[...p.styles,k,h`
|
|
533
537
|
:host { display: block; }
|
|
534
|
-
nav { padding: ${
|
|
535
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
538
|
+
nav { padding: ${r(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }
|
|
539
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${r(1)}; }
|
|
536
540
|
li { flex: 1 1 0; min-inline-size: 0; }
|
|
537
541
|
a {
|
|
538
542
|
display: flex;
|
|
539
543
|
flex-direction: column;
|
|
540
544
|
align-items: center;
|
|
541
545
|
justify-content: center;
|
|
542
|
-
gap: ${
|
|
546
|
+
gap: ${r(1)};
|
|
543
547
|
min-block-size: 50px;
|
|
544
|
-
padding: ${
|
|
548
|
+
padding: ${r(1)};
|
|
545
549
|
border-radius: ${t.radiusLg};
|
|
546
550
|
/* The resting items are a blend of the card and text colours that keeps 4.5:1 on the bar. */
|
|
547
551
|
color: color-mix(in srgb, ${t.surfaceCard} 74%, ${t.text});
|
|
@@ -555,22 +559,22 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
555
559
|
a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }
|
|
556
560
|
span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
557
561
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
558
|
-
`]}render(){return
|
|
562
|
+
`]}render(){return s`
|
|
559
563
|
<nav aria-label=${this.label} part="nav">
|
|
560
564
|
<ul part="list">
|
|
561
|
-
${this.items.map(e=>
|
|
565
|
+
${this.items.map(e=>s`
|
|
562
566
|
<li>
|
|
563
567
|
<a
|
|
564
568
|
href=${e.href}
|
|
565
569
|
part="link"
|
|
566
|
-
aria-current=${
|
|
567
|
-
@click=${
|
|
568
|
-
>${
|
|
570
|
+
aria-current=${ri(e.href,this.current)?"page":l}
|
|
571
|
+
@click=${i=>de(this,i,e)}
|
|
572
|
+
>${M(e.icon,"22px")}<span class="word">${e.label}</span></a>
|
|
569
573
|
</li>
|
|
570
574
|
`)}
|
|
571
575
|
</ul>
|
|
572
576
|
</nav>
|
|
573
|
-
`}},
|
|
577
|
+
`}},_e=class extends p{static{this.properties={skipText:{type:String,attribute:"skip-text"},topBarLabel:{type:String,attribute:"top-bar-label"}}}constructor(){super(),this.skipText="Skip to content",this.topBarLabel=""}static{this.styles=[...p.styles,k,h`
|
|
574
578
|
:host {
|
|
575
579
|
display: block;
|
|
576
580
|
min-block-size: 100svh;
|
|
@@ -587,30 +591,30 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
587
591
|
grid-template-columns: var(--impakt-shell-side, 190px) minmax(0, 1fr);
|
|
588
592
|
grid-template-rows: auto 1fr;
|
|
589
593
|
grid-template-areas: 'brand top' 'side main';
|
|
590
|
-
gap: ${
|
|
591
|
-
min-block-size: calc(100svh - 2 * ${
|
|
592
|
-
margin: ${
|
|
593
|
-
padding: ${
|
|
594
|
+
gap: ${r(5)};
|
|
595
|
+
min-block-size: calc(100svh - 2 * ${r(5)});
|
|
596
|
+
margin: ${r(5)};
|
|
597
|
+
padding: ${r(5)};
|
|
594
598
|
border-radius: var(--impakt-shell-radius, 36px);
|
|
595
599
|
background: ${u("color.surface.page","#f2f5f4")};
|
|
596
600
|
}
|
|
597
601
|
.brand { grid-area: brand; display: flex; align-items: center; min-block-size: 52px; }
|
|
598
602
|
.side { grid-area: side; display: flex; flex-direction: column; min-block-size: 0; }
|
|
599
603
|
.side ::slotted(*) { flex: 1; }
|
|
600
|
-
header { grid-area: top; display: flex; align-items: center; gap: ${
|
|
604
|
+
header { grid-area: top; display: flex; align-items: center; gap: ${r(5)}; min-inline-size: 0; }
|
|
601
605
|
.workspace { flex: none; }
|
|
602
606
|
.search { flex: 1 1 auto; display: flex; justify-content: center; min-inline-size: 0; }
|
|
603
607
|
.search ::slotted(*) { inline-size: min(100%, 420px); }
|
|
604
|
-
.actions { flex: none; display: flex; align-items: center; gap: ${
|
|
608
|
+
.actions { flex: none; display: flex; align-items: center; gap: ${r(3)}; }
|
|
605
609
|
main { grid-area: main; min-inline-size: 0; }
|
|
606
610
|
main:focus { outline: none; }
|
|
607
611
|
.phone-header, .tab-bar { display: none; }
|
|
608
612
|
.skip {
|
|
609
613
|
position: absolute;
|
|
610
|
-
inset-inline-start: ${
|
|
611
|
-
inset-block-start: ${
|
|
614
|
+
inset-inline-start: ${r(2)};
|
|
615
|
+
inset-block-start: ${r(2)};
|
|
612
616
|
z-index: 20;
|
|
613
|
-
padding: ${
|
|
617
|
+
padding: ${r(2)} ${r(4)};
|
|
614
618
|
background: ${t.surfaceCard};
|
|
615
619
|
color: ${t.link};
|
|
616
620
|
border-radius: ${t.radius};
|
|
@@ -619,7 +623,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
619
623
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
620
624
|
.skip:focus { transform: none; }
|
|
621
625
|
|
|
622
|
-
@media (max-width: ${
|
|
626
|
+
@media (max-width: ${hr}) {
|
|
623
627
|
:host { background: ${t.text}; }
|
|
624
628
|
.frame {
|
|
625
629
|
display: flex;
|
|
@@ -637,7 +641,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
637
641
|
reads light without being told. */
|
|
638
642
|
.phone-header {
|
|
639
643
|
display: block;
|
|
640
|
-
padding: calc(${
|
|
644
|
+
padding: calc(${r(4)} + env(safe-area-inset-top)) ${r(5)} ${r(10)};
|
|
641
645
|
color: var(--impakt-shell-paper);
|
|
642
646
|
--impakt-color-text-default: var(--impakt-shell-paper);
|
|
643
647
|
--impakt-color-text-heading: var(--impakt-shell-paper);
|
|
@@ -647,9 +651,9 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
647
651
|
main {
|
|
648
652
|
position: relative;
|
|
649
653
|
flex: 1;
|
|
650
|
-
margin-block-start: calc(-1 * ${
|
|
654
|
+
margin-block-start: calc(-1 * ${r(6)});
|
|
651
655
|
/* Room for the floating tab bar, so the last of the content can scroll clear of it. */
|
|
652
|
-
padding: ${
|
|
656
|
+
padding: ${r(4)} ${r(4)} calc(96px + env(safe-area-inset-bottom));
|
|
653
657
|
border-radius: 28px 28px 0 0;
|
|
654
658
|
background: ${u("color.surface.page","#f2f5f4")};
|
|
655
659
|
}
|
|
@@ -657,11 +661,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
657
661
|
display: block;
|
|
658
662
|
position: fixed;
|
|
659
663
|
z-index: 10;
|
|
660
|
-
inset-inline: ${
|
|
661
|
-
inset-block-end: calc(${
|
|
664
|
+
inset-inline: ${r(4)};
|
|
665
|
+
inset-block-end: calc(${r(3)} + env(safe-area-inset-bottom));
|
|
662
666
|
}
|
|
663
667
|
}
|
|
664
|
-
`]}skip(e){e.preventDefault();let
|
|
668
|
+
`]}skip(e){e.preventDefault();let i=this.renderRoot.querySelector("main");i?.focus(),i?.scrollIntoView()}render(){return s`
|
|
665
669
|
<div class="frame" part="frame">
|
|
666
670
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
667
671
|
<div class="brand" part="brand"><slot name="brand"></slot></div>
|
|
@@ -675,37 +679,107 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
675
679
|
<main id="content" tabindex="-1" part="main"><slot></slot></main>
|
|
676
680
|
<div class="tab-bar" part="tab-bar"><slot name="tab-bar"></slot></div>
|
|
677
681
|
</div>
|
|
678
|
-
`}};customElements.define("impakt-side-nav",
|
|
682
|
+
`}};customElements.define("impakt-side-nav",Re);customElements.define("impakt-tab-bar",Ie);customElements.define("impakt-app-shell",_e);function B(n){let e=n?.closest?.("[lang]")?.getAttribute("lang"),i=!e&&n?n.getRootNode?.()?.host?.closest?.("[lang]")?.getAttribute("lang")??"":"",a=typeof document<"u"?document.documentElement?.lang??"":"",o=(e||i||a||"").trim();return!o||o.toLowerCase()==="en"?"en-GB":o}var f={lineSoft:u("color.line.soft","light-dark(#CFCCC5, #2E2E2E)"),ok:u("color.status.ok-mark","#137A52"),bad:u("color.status.bad-mark","light-dark(#B23A2E, #F0978F)"),accent:u("color.accent.default","#FFD43B"),onOk:u("color.status.on-ok","#FFFFFF"),codeSurface:u("color.code.surface","#111111"),codeText:u("color.code.text","#FFFFFF"),codeMuted:u("color.code.muted","#A8A8A6"),inverse:t.text,onInverse:t.surfaceCard,small:u("font.size.sm","0.875rem"),tiny:u("font.size.2xs","0.6875rem"),medium:u("font.weight.medium","500"),regular:u("font.weight.regular","400")};var He=class extends p{static{this.properties={tone:{type:String,reflect:!0},label:{type:String},size:{type:String,reflect:!0},live:{type:Boolean,reflect:!0}}}constructor(){super(),this.tone="neutral",this.label="",this.size="tool",this.live=!1}static{this.styles=[...p.styles,h`
|
|
683
|
+
/* A short pill stays on one line; a long one wraps inside its border rather than pushing the page sideways at 320 (1.4.10). */
|
|
684
|
+
:host {
|
|
685
|
+
display: inline-flex;
|
|
686
|
+
flex: 0 1 auto;
|
|
687
|
+
min-inline-size: 0;
|
|
688
|
+
max-inline-size: 100%;
|
|
689
|
+
vertical-align: middle;
|
|
690
|
+
}
|
|
691
|
+
.pill {
|
|
692
|
+
display: inline-flex;
|
|
693
|
+
align-items: center;
|
|
694
|
+
gap: ${r(1.5)};
|
|
695
|
+
padding: 3px ${r(2)};
|
|
696
|
+
font-family: ${t.fontMono};
|
|
697
|
+
font-size: ${f.small};
|
|
698
|
+
font-weight: ${f.medium};
|
|
699
|
+
line-height: 1.3;
|
|
700
|
+
overflow-wrap: anywhere;
|
|
701
|
+
color: ${t.text};
|
|
702
|
+
background: ${t.surfaceCard};
|
|
703
|
+
border: 1px solid ${t.text};
|
|
704
|
+
border-radius: 0;
|
|
705
|
+
}
|
|
706
|
+
.dot {
|
|
707
|
+
flex: none;
|
|
708
|
+
inline-size: 7px;
|
|
709
|
+
block-size: 7px;
|
|
710
|
+
border-radius: 50%;
|
|
711
|
+
background: currentColor;
|
|
712
|
+
}
|
|
713
|
+
:host([tone='ok']) .dot {
|
|
714
|
+
background: ${f.ok};
|
|
715
|
+
}
|
|
716
|
+
:host([tone='bad']) .dot {
|
|
717
|
+
background: ${f.bad};
|
|
718
|
+
}
|
|
719
|
+
:host([tone='warn']) .dot {
|
|
720
|
+
background: ${f.accent};
|
|
721
|
+
border: 1px solid ${t.text};
|
|
722
|
+
}
|
|
723
|
+
:host([tone='solid']) .pill {
|
|
724
|
+
color: ${f.onInverse};
|
|
725
|
+
background: ${f.inverse};
|
|
726
|
+
border-color: ${f.inverse};
|
|
727
|
+
}
|
|
728
|
+
:host([size='marketing']) .pill {
|
|
729
|
+
font-size: ${f.tiny};
|
|
730
|
+
text-transform: uppercase;
|
|
731
|
+
letter-spacing: 0.06em;
|
|
732
|
+
}
|
|
733
|
+
@media (forced-colors: active) {
|
|
734
|
+
.dot {
|
|
735
|
+
background: CanvasText;
|
|
736
|
+
forced-color-adjust: none;
|
|
737
|
+
}
|
|
738
|
+
.pill {
|
|
739
|
+
border-color: CanvasText;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
`]}get hasDot(){return this.tone==="ok"||this.tone==="bad"||this.tone==="warn"||this.tone==="info"}render(){return s`<span class="pill" part="pill" role=${this.live?"status":l}
|
|
743
|
+
>${this.hasDot?s`<span class="dot" part="dot" aria-hidden="true"></span>`:l}<span class="text"><slot>${this.label}</slot></span></span
|
|
744
|
+
>`}};customElements.define("impakt-status",He);var ur=["ok","bad","warn","info","neutral","solid"],Be=h`
|
|
745
|
+
.status-pill {
|
|
746
|
+
flex: none;
|
|
747
|
+
inline-size: fit-content;
|
|
748
|
+
}
|
|
749
|
+
`,ee=(n,e,i="status")=>{if(!n)return l;let a=ur.includes(e)?e:"neutral";return s`<impakt-status class="status-pill" part=${i} tone=${a} label=${n}></impakt-status>`};var ce=u("color.text.inverse","var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))"),mr=u("font.weight.light","300"),Ne=class extends p{static{this.properties={label:{type:String},value:{type:String},caption:{type:String},href:{type:String},tone:{type:String,reflect:!0},size:{type:String,reflect:!0},status:{type:String},statusTone:{type:String,attribute:"status-tone"}}}constructor(){super(),this.label="",this.value="",this.caption="",this.href="",this.tone="plain",this.size="md",this.status="",this.statusTone="neutral"}static{this.styles=[...p.styles,k,Be,h`
|
|
679
750
|
:host { display: block; }
|
|
680
751
|
.tile {
|
|
681
752
|
box-sizing: border-box;
|
|
682
753
|
display: flex;
|
|
683
754
|
flex-direction: column;
|
|
684
|
-
|
|
755
|
+
align-items: flex-start;
|
|
756
|
+
gap: ${r(2.5)};
|
|
685
757
|
block-size: 100%;
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
border-radius: ${t.
|
|
689
|
-
background: ${t.
|
|
758
|
+
padding: ${r(5)};
|
|
759
|
+
border: ${t.borderThin} solid ${t.text};
|
|
760
|
+
border-radius: ${t.radius};
|
|
761
|
+
background: ${t.surfaceCard};
|
|
690
762
|
color: ${t.text};
|
|
691
763
|
text-decoration: none;
|
|
692
764
|
}
|
|
693
|
-
a.tile:hover { background: color-mix(in srgb, ${t.
|
|
694
|
-
.label { font-
|
|
695
|
-
|
|
696
|
-
.
|
|
697
|
-
|
|
698
|
-
:host([size='lg']) .
|
|
699
|
-
:host([size='lg']) .value { font-size: 64px; line-height: 1; }
|
|
700
|
-
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; }
|
|
765
|
+
a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }
|
|
766
|
+
.label { font-family: ${t.fontMono}; font-size: ${b("sm")}; font-weight: ${m("regular")}; color: ${t.textMuted}; }
|
|
767
|
+
/* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */
|
|
768
|
+
.value { font-size: var(--impakt-type-stat-size, 3.25rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: ${m("semibold")}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
769
|
+
.caption { font-size: ${b("sm")}; line-height: 1.45; color: ${t.textMuted}; }
|
|
770
|
+
:host([size='lg']) .tile { min-block-size: 200px; padding: ${r(6)}; }
|
|
771
|
+
:host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${mr}; }
|
|
772
|
+
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }
|
|
701
773
|
:host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }
|
|
702
774
|
:host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }
|
|
775
|
+
@media (max-width: 40rem) { .value { font-size: 2.5rem; } }
|
|
703
776
|
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }
|
|
704
|
-
`]}render(){let e=
|
|
777
|
+
`]}render(){let e=s`
|
|
705
778
|
<span class="label" part="label">${this.label}</span>
|
|
706
779
|
<span class="value" part="value">${this.value}</span>
|
|
707
|
-
${this.caption?
|
|
708
|
-
|
|
780
|
+
${this.caption?s`<span class="caption" part="caption">${this.caption}</span>`:l}
|
|
781
|
+
${ee(this.status,this.statusTone)}
|
|
782
|
+
`;return this.href?s`<a class="tile" href=${this.href} part="tile">${e}</a>`:s`<div class="tile" part="tile">${e}</div>`}},Oe=class extends p{static{this.properties={date:{type:String},tone:{type:String,reflect:!0}}}constructor(){super(),this.date="",this.tone="brand"}static{this.styles=[...p.styles,h`
|
|
709
783
|
:host { display: inline-block; flex: none; }
|
|
710
784
|
time {
|
|
711
785
|
position: relative;
|
|
@@ -723,74 +797,79 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
723
797
|
}
|
|
724
798
|
:host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }
|
|
725
799
|
.month { font-size: 10px; font-weight: ${m("medium")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
726
|
-
.day { margin-block-start: ${
|
|
727
|
-
.sr-only { ${
|
|
800
|
+
.day { margin-block-start: ${r(1)}; font-size: 20px; font-weight: ${m("medium")}; font-variant-numeric: tabular-nums; }
|
|
801
|
+
.sr-only { ${S} }
|
|
728
802
|
@media (forced-colors: active) { time { border: 1px solid CanvasText; } }
|
|
729
|
-
`]}parts(){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.date??"");if(!e)return null;let
|
|
803
|
+
`]}parts(){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.date??"");if(!e)return null;let i=new Date(Date.UTC(Number(e[1]),Number(e[2])-1,Number(e[3]),12));if(Number.isNaN(i.getTime()))return null;let a=B(this),o=d=>new Intl.DateTimeFormat(a,{...d,timeZone:"UTC"}).format(i);return{month:o({month:"short"}).replace(".",""),day:o({day:"numeric"}),full:o({day:"numeric",month:"long",year:"numeric"})}}render(){let e=this.parts();return e?s`<time datetime=${this.date} part="tile">
|
|
730
804
|
<span class="month" aria-hidden="true">${e.month}</span>
|
|
731
805
|
<span class="day" aria-hidden="true">${e.day}</span>
|
|
732
806
|
<span class="sr-only">${e.full}</span>
|
|
733
|
-
</time>`:
|
|
807
|
+
</time>`:s`${l}`}},Pe=class extends p{constructor(){super();this.filled={start:!1,end:!1};this.selected=!1,this.heading="",this.meta="",this.href="",this.divided=!1,this.muted=!1}static{this.properties={heading:{type:String},meta:{type:String},href:{type:String},divided:{type:Boolean,reflect:!0},muted:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0}}}static{this.styles=[...p.styles,k,h`
|
|
734
808
|
:host { display: block; }
|
|
735
809
|
:host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }
|
|
736
|
-
.row { position: relative; display: flex; align-items: center; gap: ${
|
|
737
|
-
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${
|
|
810
|
+
.row { position: relative; display: flex; align-items: center; gap: ${r(3)}; padding-block: ${r(3)}; }
|
|
811
|
+
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${r(.5)}; }
|
|
738
812
|
.title { font-size: ${b("md")}; font-weight: ${m("medium")}; color: ${t.text}; }
|
|
739
813
|
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${m("regular")}; }
|
|
740
|
-
|
|
814
|
+
/* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */
|
|
815
|
+
.meta { font-family: ${t.fontEyebrow}; font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
741
816
|
a { color: inherit; text-decoration: none; }
|
|
742
817
|
/* The link is stretched over the row, so the row is one target. */
|
|
743
818
|
a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }
|
|
744
819
|
a:focus-visible { outline: none; }
|
|
745
820
|
a:focus-visible::after { box-shadow: ${t.focusShadow}; }
|
|
746
821
|
.row:has(a):hover .title { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
747
|
-
.start, .end { flex: none; display: flex; align-items: center; gap: ${
|
|
822
|
+
.start, .end { flex: none; display: flex; align-items: center; gap: ${r(2)}; }
|
|
748
823
|
.start.empty, .end.empty { display: none; }
|
|
749
824
|
/* Controls at the end stay pressable above the stretched link. */
|
|
750
825
|
.end { position: relative; z-index: 1; }
|
|
751
826
|
.chevron { flex: none; color: ${t.textMuted}; }
|
|
752
|
-
|
|
827
|
+
:host([selected]) .row { padding-inline: ${r(4)}; background: ${t.text}; --impakt-color-text-default: ${ce}; --impakt-color-text-muted: color-mix(in srgb, ${ce} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }
|
|
828
|
+
:host([selected]) :is(.title, .meta, .chevron) { color: ${ce}; }
|
|
829
|
+
:host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${ce} 72%, ${t.text}); }
|
|
830
|
+
@media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }
|
|
831
|
+
`]}onSlot(i){let a=i.target,o=a.name;this.filled={...this.filled,[o]:a.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.ELEMENT_NODE||(d.textContent??"").trim()!=="")},this.requestUpdate()}render(){let i=this.href?s`<a class="title" href=${this.href} part="link">${this.heading}</a>`:s`<span class="title" part="title">${this.heading}</span>`;return s`<div class="row" part="row" aria-current=${this.selected?"true":l}>
|
|
753
832
|
<div class="start ${this.filled.start?"":"empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
|
|
754
|
-
<div class="text">${
|
|
833
|
+
<div class="text">${i}${this.meta?s`<span class="meta" part="meta">${this.meta}</span>`:l}</div>
|
|
755
834
|
<div class="end ${this.filled.end?"":"empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
|
|
756
|
-
${this.href?
|
|
757
|
-
</div>`}},
|
|
835
|
+
${this.href?s`<span class="chevron" aria-hidden="true">${M("chevron-right","20px")}</span>`:l}
|
|
836
|
+
</div>`}},De=class extends p{static{this.properties={label:{type:String},count:{type:Number},countLabel:{type:String,attribute:"count-label"},pressed:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0}}}constructor(){super(),this.label="",this.count=void 0,this.countLabel="",this.pressed=!1,this.disabled=!1}static{this.styles=[...p.styles,k,A("button"),h`
|
|
758
837
|
:host { display: inline-block; }
|
|
759
838
|
/* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */
|
|
760
839
|
button {
|
|
761
|
-
${
|
|
840
|
+
${z}
|
|
762
841
|
position: relative;
|
|
763
842
|
display: inline-flex;
|
|
764
843
|
align-items: center;
|
|
765
|
-
gap: ${
|
|
766
|
-
min-block-size:
|
|
767
|
-
padding: 0 ${
|
|
844
|
+
gap: ${r(2)};
|
|
845
|
+
min-block-size: 35px;
|
|
846
|
+
padding: 0 ${r(3.5)};
|
|
768
847
|
font: inherit;
|
|
769
848
|
font-size: ${b("sm")};
|
|
770
|
-
font-weight: ${m("
|
|
849
|
+
font-weight: ${m("regular")};
|
|
771
850
|
color: ${t.text};
|
|
772
851
|
background: ${t.surfaceCard};
|
|
773
|
-
border: ${t.borderThin} solid ${t.
|
|
774
|
-
border-radius:
|
|
852
|
+
border: ${t.borderThin} solid ${t.text};
|
|
853
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
775
854
|
cursor: pointer;
|
|
776
855
|
white-space: nowrap;
|
|
777
856
|
}
|
|
778
857
|
button:hover:not(:disabled) { background: ${t.surfaceInset}; }
|
|
779
|
-
button[aria-pressed='true'] { background: ${t.text}; color: ${
|
|
858
|
+
button[aria-pressed='true'] { background: ${t.text}; color: ${ce}; border-color: ${t.text}; }
|
|
780
859
|
button:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
781
860
|
.count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
782
861
|
button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
|
|
783
|
-
.sr-only { ${
|
|
862
|
+
.sr-only { ${S} }
|
|
784
863
|
@media (forced-colors: active) { button[aria-pressed='true'] { border: 2px solid Highlight; } }
|
|
785
|
-
`]}toggle(){this.disabled||(this.pressed=!this.pressed,this.dispatchEvent(new CustomEvent("impakt-change",{detail:{pressed:this.pressed},bubbles:!0,composed:!0})))}render(){let e=typeof this.count=="number"&&!Number.isNaN(this.count);return
|
|
864
|
+
`]}toggle(){this.disabled||(this.pressed=!this.pressed,this.dispatchEvent(new CustomEvent("impakt-change",{detail:{pressed:this.pressed},bubbles:!0,composed:!0})))}render(){let e=typeof this.count=="number"&&!Number.isNaN(this.count);return s`<button type="button" part="button" aria-pressed=${this.pressed?"true":"false"} ?disabled=${this.disabled} @click=${this.toggle}>
|
|
786
865
|
<span>${this.label}</span>
|
|
787
|
-
${e?this.countLabel?
|
|
788
|
-
</button>`}};customElements.define("impakt-stat-tile",
|
|
866
|
+
${e?this.countLabel?s`<span class="count" aria-hidden="true">${this.count}</span><span class="sr-only">${this.countLabel}</span>`:s`<span class="count">${this.count}</span>`:l}
|
|
867
|
+
</button>`}};customElements.define("impakt-stat-tile",Ne);customElements.define("impakt-date-tile",Oe);customElements.define("impakt-row",Pe);customElements.define("impakt-filter-chip",De);var Fe=class extends x{static{this.properties={...x.properties,checked:{type:Boolean,reflect:!0},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0}}}constructor(){super(),this.checked=!1,this.hideLabel=!1}static{this.styles=[...x.styles,A(".row"),h`
|
|
789
868
|
.row {
|
|
790
869
|
display: flex;
|
|
791
870
|
align-items: center;
|
|
792
871
|
justify-content: space-between;
|
|
793
|
-
gap: ${
|
|
872
|
+
gap: ${r(3)};
|
|
794
873
|
cursor: pointer;
|
|
795
874
|
}
|
|
796
875
|
.text {
|
|
@@ -800,7 +879,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
800
879
|
justify-content: flex-start;
|
|
801
880
|
}
|
|
802
881
|
:host([hide-label]) .text {
|
|
803
|
-
${
|
|
882
|
+
${S}
|
|
804
883
|
}
|
|
805
884
|
.control {
|
|
806
885
|
position: relative;
|
|
@@ -809,7 +888,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
809
888
|
block-size: 28px;
|
|
810
889
|
}
|
|
811
890
|
input {
|
|
812
|
-
${
|
|
891
|
+
${z}
|
|
813
892
|
position: absolute;
|
|
814
893
|
inset: 0;
|
|
815
894
|
inline-size: 100%;
|
|
@@ -821,7 +900,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
821
900
|
.track {
|
|
822
901
|
position: absolute;
|
|
823
902
|
inset: 0;
|
|
824
|
-
border-radius:
|
|
903
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
825
904
|
background: ${t.borderStrong};
|
|
826
905
|
transition: background-color 120ms ease-in-out;
|
|
827
906
|
pointer-events: none;
|
|
@@ -832,7 +911,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
832
911
|
inset-inline-start: 3px;
|
|
833
912
|
inline-size: 22px;
|
|
834
913
|
block-size: 22px;
|
|
835
|
-
border-radius:
|
|
914
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
836
915
|
background: ${t.surfaceCard};
|
|
837
916
|
box-shadow: ${t.shadowXs};
|
|
838
917
|
transition: transform 120ms ease-in-out;
|
|
@@ -863,10 +942,10 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
863
942
|
.knob { background: CanvasText; }
|
|
864
943
|
:host([checked]) .track { background: Highlight; }
|
|
865
944
|
}
|
|
866
|
-
`]}renderControl(){return
|
|
945
|
+
`]}renderControl(){return s`
|
|
867
946
|
<label class="row" part="row" for=${this.controlId}>
|
|
868
947
|
<span class="text">
|
|
869
|
-
${this.label}${this.required?
|
|
948
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
870
949
|
</span>
|
|
871
950
|
<span class="control">
|
|
872
951
|
<input
|
|
@@ -886,7 +965,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
886
965
|
<span class="track" part="track"><span class="knob" part="knob"></span></span>
|
|
887
966
|
</span>
|
|
888
967
|
</label>
|
|
889
|
-
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return
|
|
968
|
+
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return s`${l}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},qe=class extends x{static{this.properties={...x.properties,options:{type:Array},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0},full:{type:Boolean,reflect:!0}}}constructor(){super(),this.options=[],this.hideLabel=!1,this.full=!1}static{this.styles=[...x.styles,h`
|
|
890
969
|
fieldset {
|
|
891
970
|
border: 0;
|
|
892
971
|
margin: 0;
|
|
@@ -897,13 +976,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
897
976
|
padding: 0;
|
|
898
977
|
}
|
|
899
978
|
:host([hide-label]) legend {
|
|
900
|
-
${
|
|
979
|
+
${S}
|
|
901
980
|
}
|
|
902
981
|
.segments {
|
|
903
982
|
display: inline-flex;
|
|
904
|
-
gap: ${
|
|
905
|
-
padding: ${
|
|
906
|
-
border-radius:
|
|
983
|
+
gap: ${r(1)};
|
|
984
|
+
padding: ${r(1)};
|
|
985
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
907
986
|
background: ${t.surfaceInset};
|
|
908
987
|
}
|
|
909
988
|
:host([full]) .segments {
|
|
@@ -917,7 +996,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
917
996
|
display: inline-flex;
|
|
918
997
|
}
|
|
919
998
|
input {
|
|
920
|
-
${
|
|
999
|
+
${z}
|
|
921
1000
|
position: absolute;
|
|
922
1001
|
inset: 0;
|
|
923
1002
|
inline-size: 100%;
|
|
@@ -932,8 +1011,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
932
1011
|
justify-content: center;
|
|
933
1012
|
inline-size: 100%;
|
|
934
1013
|
min-block-size: 32px;
|
|
935
|
-
padding: ${
|
|
936
|
-
border-radius:
|
|
1014
|
+
padding: ${r(1.5)} ${r(4)};
|
|
1015
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
937
1016
|
font-size: ${b("sm")};
|
|
938
1017
|
font-weight: ${m("medium")};
|
|
939
1018
|
color: ${t.textMuted};
|
|
@@ -964,38 +1043,38 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
964
1043
|
.segments { border: 1px solid CanvasText; }
|
|
965
1044
|
input:checked + .face { border: 2px solid Highlight; }
|
|
966
1045
|
}
|
|
967
|
-
`]}renderLabel(){return
|
|
968
|
-
${this.label}${this.required?
|
|
969
|
-
</legend>`}renderControl(){return
|
|
1046
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
1047
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1048
|
+
</legend>`}renderControl(){return s`
|
|
970
1049
|
<div class="segments" part="segments">
|
|
971
|
-
${this.options.map((e,
|
|
972
|
-
<label class="segment" part="segment" for=${
|
|
1050
|
+
${this.options.map((e,i)=>{let a=this.id_(`seg-${i}`);return s`
|
|
1051
|
+
<label class="segment" part="segment" for=${a}>
|
|
973
1052
|
<input
|
|
974
1053
|
type="radio"
|
|
975
|
-
id=${
|
|
1054
|
+
id=${a}
|
|
976
1055
|
name=${this.uid}
|
|
977
1056
|
value=${e.value}
|
|
978
1057
|
.checked=${this.value===e.value}
|
|
979
1058
|
?disabled=${this.disabled}
|
|
980
|
-
?required=${this.required&&
|
|
1059
|
+
?required=${this.required&&i===0}
|
|
981
1060
|
@change=${()=>{this.value=e.value,this.setFormValue(e.value)}}
|
|
982
1061
|
/>
|
|
983
1062
|
<span class="face">${e.label}</span>
|
|
984
1063
|
</label>
|
|
985
1064
|
`})}
|
|
986
1065
|
</div>
|
|
987
|
-
`}render(){return
|
|
1066
|
+
`}render(){return s`
|
|
988
1067
|
<fieldset
|
|
989
1068
|
part="fieldset"
|
|
990
1069
|
aria-describedby=${this.describedBy}
|
|
991
1070
|
aria-invalid=${this.error?"true":l}
|
|
992
1071
|
>
|
|
993
1072
|
${this.renderLabel()}
|
|
994
|
-
${this.description?
|
|
1073
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
995
1074
|
${this.renderControl()}
|
|
996
1075
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
997
1076
|
</fieldset>
|
|
998
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",
|
|
1077
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",Fe);customElements.define("impakt-segmented-control",qe);var je=class extends x{static{this.properties={...x.properties,options:{type:Array}}}constructor(){super(),this.options=[]}static{this.styles=[...x.styles,h`
|
|
999
1078
|
fieldset {
|
|
1000
1079
|
border: 0;
|
|
1001
1080
|
margin: 0;
|
|
@@ -1008,11 +1087,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1008
1087
|
.option {
|
|
1009
1088
|
display: flex;
|
|
1010
1089
|
align-items: flex-start;
|
|
1011
|
-
gap: ${
|
|
1012
|
-
padding: ${
|
|
1090
|
+
gap: ${r(3)};
|
|
1091
|
+
padding: ${r(3)};
|
|
1013
1092
|
border: ${t.borderThin} solid ${t.border};
|
|
1014
1093
|
border-radius: ${t.radius};
|
|
1015
|
-
margin-block-end: ${
|
|
1094
|
+
margin-block-end: ${r(2)};
|
|
1016
1095
|
cursor: pointer;
|
|
1017
1096
|
}
|
|
1018
1097
|
.option:hover {
|
|
@@ -1021,7 +1100,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1021
1100
|
/* The whole row is the target, not the 20px dot — 2.5.8 is a floor and
|
|
1022
1101
|
a comfortable target is the actual goal. */
|
|
1023
1102
|
.option input {
|
|
1024
|
-
${
|
|
1103
|
+
${z}
|
|
1025
1104
|
inline-size: 20px;
|
|
1026
1105
|
block-size: 20px;
|
|
1027
1106
|
margin: 0;
|
|
@@ -1036,41 +1115,41 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1036
1115
|
display: block;
|
|
1037
1116
|
font-size: ${b("sm")};
|
|
1038
1117
|
color: ${t.textMuted};
|
|
1039
|
-
margin-block-start: ${
|
|
1118
|
+
margin-block-start: ${r(1)};
|
|
1040
1119
|
}
|
|
1041
1120
|
:host([invalid]) .option {
|
|
1042
1121
|
border-color: ${t.danger};
|
|
1043
1122
|
}
|
|
1044
|
-
`]}renderLabel(){return
|
|
1045
|
-
${this.label}${this.required?
|
|
1046
|
-
</legend>`}renderControl(){return
|
|
1047
|
-
${this.options.map((e,
|
|
1048
|
-
<label class="option" part="option" for=${
|
|
1123
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
1124
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1125
|
+
</legend>`}renderControl(){return s`
|
|
1126
|
+
${this.options.map((e,i)=>{let a=this.id_(`opt-${i}`),o=e.description?this.id_(`opt-${i}-desc`):void 0;return s`
|
|
1127
|
+
<label class="option" part="option" for=${a}>
|
|
1049
1128
|
<input
|
|
1050
1129
|
type="radio"
|
|
1051
|
-
id=${
|
|
1130
|
+
id=${a}
|
|
1052
1131
|
name=${this.uid}
|
|
1053
1132
|
value=${e.value}
|
|
1054
1133
|
.checked=${this.value===e.value}
|
|
1055
1134
|
?disabled=${this.disabled}
|
|
1056
|
-
?required=${this.required&&
|
|
1135
|
+
?required=${this.required&&i===0}
|
|
1057
1136
|
aria-describedby=${o??l}
|
|
1058
1137
|
@change=${()=>this.setFormValue(e.value)}
|
|
1059
1138
|
/>
|
|
1060
1139
|
<span>
|
|
1061
1140
|
<span class="option-text">${e.label}</span>
|
|
1062
|
-
${e.description?
|
|
1141
|
+
${e.description?s`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1063
1142
|
</span>
|
|
1064
1143
|
</label>
|
|
1065
1144
|
`})}
|
|
1066
|
-
`}render(){return
|
|
1145
|
+
`}render(){return s`
|
|
1067
1146
|
<fieldset
|
|
1068
1147
|
part="fieldset"
|
|
1069
1148
|
aria-describedby=${this.describedBy}
|
|
1070
1149
|
aria-invalid=${this.error?"true":l}
|
|
1071
1150
|
>
|
|
1072
1151
|
${this.renderLabel()}
|
|
1073
|
-
${this.description?
|
|
1152
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">
|
|
1074
1153
|
${this.description}
|
|
1075
1154
|
</div>`:l}
|
|
1076
1155
|
${this.renderControl()}
|
|
@@ -1078,13 +1157,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1078
1157
|
${this.error||l}
|
|
1079
1158
|
</div>
|
|
1080
1159
|
</fieldset>
|
|
1081
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",
|
|
1160
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",je);var Ue=class n extends p{constructor(){super();this.hasActions=!1;this.tone="info",this.heading="",this.toneLabel="",this.label="",this.noLabel=!1}static{this.properties={tone:{type:String,reflect:!0},heading:{type:String},toneLabel:{type:String,attribute:"tone-label"},label:{type:String},noLabel:{type:Boolean,attribute:"no-label"}}}static{this.TONE_WORDS={info:"Information",success:"Success",warning:"Warning",danger:"Error",attention:"Warning"}}static{this.styles=[...p.styles,h`
|
|
1082
1161
|
:host {
|
|
1083
1162
|
display: block;
|
|
1084
|
-
margin-block-end: ${
|
|
1163
|
+
margin-block-end: ${r(4)};
|
|
1085
1164
|
}
|
|
1086
1165
|
.alert {
|
|
1087
|
-
padding: ${
|
|
1166
|
+
padding: ${r(4)} ${r(5)};
|
|
1088
1167
|
border-radius: ${t.radiusLg};
|
|
1089
1168
|
border-inline-start: 4px solid;
|
|
1090
1169
|
box-shadow: inset 0 0 0 1px ${t.hairline};
|
|
@@ -1093,7 +1172,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1093
1172
|
}
|
|
1094
1173
|
.heading {
|
|
1095
1174
|
font-weight: ${m("semibold")};
|
|
1096
|
-
margin-block-end: ${
|
|
1175
|
+
margin-block-end: ${r(1)};
|
|
1097
1176
|
}
|
|
1098
1177
|
:host([tone='info']) .alert {
|
|
1099
1178
|
background: ${t.infoSubtle};
|
|
@@ -1115,6 +1194,47 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1115
1194
|
border-color: ${t.danger};
|
|
1116
1195
|
color: ${t.text};
|
|
1117
1196
|
}
|
|
1197
|
+
/* Attention: the accent as a fill, an ink border, a solid ink label and an action at the end. */
|
|
1198
|
+
:host([tone='attention']) .alert {
|
|
1199
|
+
display: flex;
|
|
1200
|
+
flex-wrap: wrap;
|
|
1201
|
+
align-items: center;
|
|
1202
|
+
gap: ${r(3)};
|
|
1203
|
+
padding: ${r(3.5)} ${r(4)};
|
|
1204
|
+
border: ${t.borderThin} solid ${u("color.accent.on","#111111")};
|
|
1205
|
+
border-radius: ${t.radius};
|
|
1206
|
+
box-shadow: none;
|
|
1207
|
+
background: ${u("color.accent.default","#ffd43b")};
|
|
1208
|
+
color: ${u("color.accent.on","#111111")};
|
|
1209
|
+
font-size: ${b("md")};
|
|
1210
|
+
line-height: 1.4;
|
|
1211
|
+
/* What sits on the yellow is drawn in the ink, whatever the band round it says. */
|
|
1212
|
+
--impakt-color-text-default: ${u("color.accent.on","#111111")};
|
|
1213
|
+
--impakt-color-text-inverse: ${u("color.accent.default","#ffd43b")};
|
|
1214
|
+
}
|
|
1215
|
+
.tag {
|
|
1216
|
+
flex: none;
|
|
1217
|
+
padding: 3px ${r(2)};
|
|
1218
|
+
font-family: ${t.fontMono};
|
|
1219
|
+
font-size: ${b("sm")};
|
|
1220
|
+
line-height: 1.3;
|
|
1221
|
+
background: ${u("color.accent.on","#111111")};
|
|
1222
|
+
color: ${u("color.accent.default","#ffd43b")};
|
|
1223
|
+
}
|
|
1224
|
+
.words {
|
|
1225
|
+
flex: 1 1 16rem;
|
|
1226
|
+
min-inline-size: 0;
|
|
1227
|
+
}
|
|
1228
|
+
.actions {
|
|
1229
|
+
flex: none;
|
|
1230
|
+
display: flex;
|
|
1231
|
+
flex-wrap: wrap;
|
|
1232
|
+
gap: ${r(2)};
|
|
1233
|
+
margin-inline-start: auto;
|
|
1234
|
+
}
|
|
1235
|
+
.actions.empty {
|
|
1236
|
+
display: none;
|
|
1237
|
+
}
|
|
1118
1238
|
/* Colour is the only signal left in forced-colours mode, and it is gone.
|
|
1119
1239
|
The border keeps the boundary; the tone word in the label carries the
|
|
1120
1240
|
meaning. */
|
|
@@ -1124,25 +1244,34 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1124
1244
|
border-inline-start-width: 4px;
|
|
1125
1245
|
}
|
|
1126
1246
|
}
|
|
1127
|
-
`]}
|
|
1247
|
+
`]}onActions(i){let a=i.target;this.hasActions=a.assignedElements({flatten:!0}).length>0,this.requestUpdate()}render(){if(this.tone==="attention"){let a=this.label||T("Check");return s`
|
|
1248
|
+
<div class="alert" part="alert" role="status">
|
|
1249
|
+
${this.noLabel?l:s`<span class="tag" part="label">${a}</span>`}
|
|
1250
|
+
<div class="words" part="body">
|
|
1251
|
+
${this.heading?s`<div class="heading" part="heading">${this.heading}</div>`:l}
|
|
1252
|
+
<slot></slot>
|
|
1253
|
+
</div>
|
|
1254
|
+
<div class="actions ${this.hasActions?"":"empty"}" part="actions"><slot name="actions" @slotchange=${this.onActions}></slot></div>
|
|
1255
|
+
</div>
|
|
1256
|
+
`}let i=this.toneLabel||T(n.TONE_WORDS[this.tone]);return s`
|
|
1128
1257
|
<div
|
|
1129
1258
|
class="alert"
|
|
1130
1259
|
part="alert"
|
|
1131
1260
|
role=${this.tone==="danger"?"alert":"status"}
|
|
1132
|
-
aria-label=${this.heading?l:
|
|
1261
|
+
aria-label=${this.heading?l:i}
|
|
1133
1262
|
>
|
|
1134
|
-
${this.heading?
|
|
1135
|
-
<span class="tone-word">${
|
|
1263
|
+
${this.heading?s`<div class="heading" part="heading">
|
|
1264
|
+
<span class="tone-word">${i}:</span> ${this.heading}
|
|
1136
1265
|
</div>`:l}
|
|
1137
1266
|
<slot></slot>
|
|
1138
1267
|
</div>
|
|
1139
|
-
`}};customElements.define("impakt-alert",
|
|
1268
|
+
`}};customElements.define("impakt-alert",Ue);var We=class extends p{static{this.properties={gap:{type:String,reflect:!0},align:{type:String,reflect:!0},direction:{type:String,reflect:!0},justify:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.gap="md",this.align="stretch",this.direction="vertical",this.justify="start",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,h`
|
|
1140
1269
|
:host {
|
|
1141
1270
|
display: flex;
|
|
1142
1271
|
flex-direction: column;
|
|
1143
1272
|
}
|
|
1144
1273
|
:host([gap='none']) { gap: 0; }
|
|
1145
|
-
:host([gap='xs']) { gap: ${
|
|
1274
|
+
:host([gap='xs']) { gap: ${r(1)}; }
|
|
1146
1275
|
:host([align='start']) { align-items: flex-start; }
|
|
1147
1276
|
:host([align='center']) { align-items: center; text-align: center; }
|
|
1148
1277
|
:host([align='end']) { align-items: flex-end; }
|
|
@@ -1153,18 +1282,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1153
1282
|
:host([justify='center']) { justify-content: center; }
|
|
1154
1283
|
:host([justify='end']) { justify-content: flex-end; }
|
|
1155
1284
|
:host([justify='between']) { justify-content: space-between; }
|
|
1156
|
-
:host([gap='sm']) { gap: ${
|
|
1157
|
-
:host([gap='md']) { gap: ${
|
|
1158
|
-
:host([gap='lg']) { gap: ${
|
|
1159
|
-
:host([gap='xl']) { gap: ${
|
|
1160
|
-
`]}render(){return
|
|
1285
|
+
:host([gap='sm']) { gap: ${r(2)}; }
|
|
1286
|
+
:host([gap='md']) { gap: ${r(4)}; }
|
|
1287
|
+
:host([gap='lg']) { gap: ${r(6)}; }
|
|
1288
|
+
:host([gap='xl']) { gap: ${r(8)}; }
|
|
1289
|
+
`]}render(){return s`<slot></slot>`}},Ve=class extends p{static{this.properties={tone:{type:String,reflect:!0},padding:{type:String,reflect:!0},imageSrc:{type:String,attribute:"image-src"},imageAlt:{type:String,attribute:"image-alt"},ratio:{type:String,reflect:!0},badge:{type:String},raised:{type:Boolean,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.tone="default",this.padding="lg",this.imageSrc="",this.imageAlt="",this.ratio="16:9",this.badge="",this.raised=!1,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,h`
|
|
1161
1290
|
:host {
|
|
1162
1291
|
display: flex;
|
|
1163
1292
|
flex-direction: column;
|
|
1164
1293
|
background: ${t.surfaceCard};
|
|
1165
|
-
border: ${t.borderThin} solid ${t.
|
|
1294
|
+
border: ${t.borderThin} solid ${t.text};
|
|
1166
1295
|
border-radius: ${t.radiusXl};
|
|
1167
|
-
box-shadow:
|
|
1296
|
+
box-shadow: none;
|
|
1168
1297
|
overflow: hidden;
|
|
1169
1298
|
--ratio: 16 / 9;
|
|
1170
1299
|
}
|
|
@@ -1172,35 +1301,39 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1172
1301
|
:host([tone='brand']) { background: ${t.brand}; border-color: transparent; color: ${t.onBrand}; --impakt-eyebrow: ${t.onBrand}; --impakt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; }
|
|
1173
1302
|
:host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }
|
|
1174
1303
|
:host([raised]) { border-color: transparent; box-shadow: 0 24px 60px rgb(16 19 23 / 12%), 0 2px 6px rgb(16 19 23 / 6%); border-radius: ${t.radius2xl}; }
|
|
1304
|
+
/* Ink: the colours are kept on the host and repainted for what is inside, so the fill is the outer text colour. */
|
|
1305
|
+
:host([tone='ink']) { --impakt-card-ink: ${t.text}; --impakt-card-on: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); background: var(--impakt-card-ink); color: var(--impakt-card-on); border-color: var(--impakt-card-ink); }
|
|
1306
|
+
:host([tone='ink']) .body { --impakt-eyebrow: color-mix(in srgb, var(--impakt-card-on) 72%, var(--impakt-card-ink)); --impakt-color-text-default: var(--impakt-card-on); --impakt-color-text-heading: var(--impakt-card-on); --impakt-color-text-muted: color-mix(in srgb, var(--impakt-card-on) 72%, var(--impakt-card-ink)); --impakt-color-text-link: var(--impakt-card-on); --impakt-color-text-link-hover: var(--impakt-card-on); --impakt-color-text-inverse: var(--impakt-card-ink); --impakt-color-surface-card: color-mix(in srgb, var(--impakt-card-ink) 95%, var(--impakt-card-on)); --impakt-color-line-soft: color-mix(in srgb, var(--impakt-card-ink) 87%, var(--impakt-card-on)); --impakt-button-primary: var(--impakt-card-on); --impakt-button-on-primary: var(--impakt-card-ink); --impakt-button-primary-hover: color-mix(in srgb, var(--impakt-card-on) 86%, var(--impakt-card-ink)); }
|
|
1307
|
+
:host([tone='dashed']) { background: transparent; border-style: dashed; }
|
|
1175
1308
|
:host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }
|
|
1176
1309
|
:host([ratio='4:3']) { --ratio: 4 / 3; }
|
|
1177
1310
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
1178
1311
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
1179
|
-
.body { padding: ${
|
|
1312
|
+
.body { padding: ${r(6)}; flex: 1; display: flex; flex-direction: column; }
|
|
1180
1313
|
:host([padding='none']) .body { padding: 0; }
|
|
1181
|
-
:host([padding='sm']) .body { padding: ${
|
|
1182
|
-
:host([padding='md']) .body { padding: ${
|
|
1314
|
+
:host([padding='sm']) .body { padding: ${r(3)}; }
|
|
1315
|
+
:host([padding='md']) .body { padding: ${r(4)}; }
|
|
1183
1316
|
:host([tone='plain']) .body { padding-inline: 0; }
|
|
1184
1317
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
1185
1318
|
.picture { position: relative; }
|
|
1186
|
-
.tag { position: absolute; inset-block-start: ${
|
|
1319
|
+
.tag { position: absolute; inset-block-start: ${r(4)}; inset-inline-start: ${r(4)}; padding: ${r(1.5)} ${r(3)}; font-size: ${b("sm")}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); }
|
|
1187
1320
|
@media (forced-colors: active) { :host { border-color: CanvasText; } }
|
|
1188
|
-
`]}render(){return
|
|
1321
|
+
`]}render(){return s`${this.imageSrc?s`<div class="picture"><img src=${this.imageSrc} alt=${this.imageAlt} part="image" />${this.badge?s`<span class="tag">${this.badge}</span>`:l}</div>`:l}<div class="body" part="body"><slot></slot></div>`}},Ke=class extends p{static{this.properties={level:{type:Number,reflect:!0},size:{type:String,reflect:!0},eyebrow:{type:String,reflect:!0},align:{type:String,reflect:!0},screenReaderOnly:{type:Boolean,reflect:!0,attribute:"screen-reader-only"}}}constructor(){super(),this.level=2,this.size="xl",this.eyebrow="",this.align="start",this.screenReaderOnly=!1}static{this.styles=[...p.styles,h`
|
|
1189
1322
|
:host {
|
|
1190
1323
|
display: block;
|
|
1191
1324
|
color: ${t.textHeading};
|
|
1192
1325
|
font-family: ${t.fontHeading};
|
|
1193
1326
|
font-weight: ${m("bold")};
|
|
1194
|
-
line-height: ${
|
|
1195
|
-
}
|
|
1196
|
-
:host([size='5xl']) { ${
|
|
1197
|
-
:host([size='4xl']) { ${
|
|
1198
|
-
:host([size='3xl']) { ${
|
|
1199
|
-
:host([size='2xl']) { ${
|
|
1200
|
-
:host([size='xl']) { ${
|
|
1201
|
-
:host([size='lg']) { ${
|
|
1202
|
-
:host([size='md']) { ${
|
|
1203
|
-
:host([size='sm']) { ${
|
|
1327
|
+
line-height: ${H("tight")};
|
|
1328
|
+
}
|
|
1329
|
+
:host([size='5xl']) { ${w("5xl")} letter-spacing: ${t.trackingTight}; }
|
|
1330
|
+
:host([size='4xl']) { ${w("4xl")} letter-spacing: ${t.trackingTight}; }
|
|
1331
|
+
:host([size='3xl']) { ${w("3xl")} letter-spacing: ${t.trackingTight}; }
|
|
1332
|
+
:host([size='2xl']) { ${w("2xl")} letter-spacing: ${t.trackingTight}; }
|
|
1333
|
+
:host([size='xl']) { ${w("xl")} }
|
|
1334
|
+
:host([size='lg']) { ${w("lg")} }
|
|
1335
|
+
:host([size='md']) { ${w("md")} }
|
|
1336
|
+
:host([size='sm']) { ${w("sm")} }
|
|
1204
1337
|
.h { text-wrap: balance; }
|
|
1205
1338
|
.h {
|
|
1206
1339
|
margin: 0;
|
|
@@ -1209,11 +1342,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1209
1342
|
}
|
|
1210
1343
|
:host([align='center']) { text-align: center; }
|
|
1211
1344
|
/* Only the words go: an eyebrow over a heading drawn as a picture still shows. */
|
|
1212
|
-
:host([screen-reader-only]) .words { ${
|
|
1213
|
-
:host([screen-reader-only]:not([eyebrow])) { ${
|
|
1345
|
+
:host([screen-reader-only]) .words { ${S} }
|
|
1346
|
+
:host([screen-reader-only]:not([eyebrow])) { ${S} }
|
|
1214
1347
|
.eyebrow {
|
|
1215
1348
|
display: block;
|
|
1216
|
-
margin-block-end: ${
|
|
1349
|
+
margin-block-end: ${r(2)};
|
|
1217
1350
|
color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand}));
|
|
1218
1351
|
font-family: var(--impakt-font-family-eyebrow, ${t.fontBody});
|
|
1219
1352
|
font-size: var(--impakt-font-size-eyebrow, ${b("sm")});
|
|
@@ -1221,31 +1354,31 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1221
1354
|
letter-spacing: 0.06em;
|
|
1222
1355
|
text-transform: uppercase;
|
|
1223
1356
|
}
|
|
1224
|
-
`]}render(){return
|
|
1225
|
-
${this.eyebrow?
|
|
1226
|
-
</div>`}},
|
|
1357
|
+
`]}render(){return s`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
1358
|
+
${this.eyebrow?s`<span class="eyebrow" part="eyebrow">${this.eyebrow}<span style="position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)">: </span></span>`:l}<span class="words"><slot></slot></span>
|
|
1359
|
+
</div>`}},Ge=class extends p{static{this.properties={size:{type:String,reflect:!0},tone:{type:String,reflect:!0},align:{type:String,reflect:!0},look:{type:String,reflect:!0}}}constructor(){super(),this.size="md",this.tone="default",this.align="start",this.look="prose"}static{this.styles=[...p.styles,h`
|
|
1227
1360
|
:host {
|
|
1228
1361
|
display: block;
|
|
1229
1362
|
/* 1.4.8 asks for 1.5 within a paragraph, and it is the default here
|
|
1230
1363
|
rather than an option, because body text is what it is about. */
|
|
1231
|
-
line-height: ${
|
|
1364
|
+
line-height: ${H("normal")};
|
|
1232
1365
|
/* 1.4.12 Text Spacing: a user stylesheet must be able to widen this
|
|
1233
1366
|
without clipping, which a max-width in ch units survives and a
|
|
1234
1367
|
fixed pixel height does not. */
|
|
1235
1368
|
max-inline-size: 70ch;
|
|
1236
1369
|
}
|
|
1237
|
-
:host([size='sm']) { ${
|
|
1238
|
-
:host([size='md']) { ${
|
|
1239
|
-
:host([size='lg']) { ${
|
|
1240
|
-
:host([size='xl']) { ${
|
|
1370
|
+
:host([size='sm']) { ${w("sm")} }
|
|
1371
|
+
:host([size='md']) { ${w("md")} }
|
|
1372
|
+
:host([size='lg']) { ${w("lg")} }
|
|
1373
|
+
:host([size='xl']) { ${w("xl")} }
|
|
1241
1374
|
p { text-wrap: pretty; }
|
|
1242
1375
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
1243
1376
|
:host([align='center']) { text-align: center; margin-inline: auto; }
|
|
1244
|
-
:host([look='code']) { font-family: ${t.fontMono}; ${
|
|
1377
|
+
:host([look='code']) { font-family: ${t.fontMono}; ${w("sm")} padding: ${r(2)} ${r(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }
|
|
1245
1378
|
p {
|
|
1246
1379
|
margin: 0;
|
|
1247
1380
|
}
|
|
1248
|
-
`]}render(){return
|
|
1381
|
+
`]}render(){return s`<p part="text"><slot></slot></p>`}};customElements.define("impakt-stack",We);customElements.define("impakt-card",Ve);customElements.define("impakt-heading",Ke);customElements.define("impakt-text",Ge);var Ye=class extends p{static{this.properties={href:{type:String},external:{type:Boolean,reflect:!0},externalText:{type:String,attribute:"external-text"},variant:{type:String,reflect:!0},icon:{type:String}}}constructor(){super(),this.href="",this.external=!1,this.externalText="opens in a new tab",this.variant="inline",this.icon="none"}static{this.styles=[...p.styles,k,h`
|
|
1249
1382
|
:host {
|
|
1250
1383
|
display: inline;
|
|
1251
1384
|
}
|
|
@@ -1259,22 +1392,22 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1259
1392
|
color: ${t.linkHover};
|
|
1260
1393
|
}
|
|
1261
1394
|
:host([variant='standalone']) { display: inline-block; }
|
|
1262
|
-
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${
|
|
1395
|
+
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${r(1)}; font-weight: ${m("semibold")}; text-decoration-thickness: 1px; }
|
|
1263
1396
|
:host([variant='standalone']) a:hover .icon { transform: translateX(2px); }
|
|
1264
1397
|
.icon { flex: none; transition: transform 120ms ease-in-out; }
|
|
1265
1398
|
.sr-only {
|
|
1266
|
-
${
|
|
1399
|
+
${S}
|
|
1267
1400
|
}
|
|
1268
|
-
`]}render(){return
|
|
1401
|
+
`]}render(){return s`
|
|
1269
1402
|
<a
|
|
1270
1403
|
part="link"
|
|
1271
1404
|
href=${this.href||l}
|
|
1272
1405
|
target=${this.external?"_blank":l}
|
|
1273
1406
|
rel=${this.external?"noopener noreferrer":l}
|
|
1274
1407
|
>
|
|
1275
|
-
<slot></slot>${
|
|
1408
|
+
<slot></slot>${M(this.icon!=="none"?this.icon:this.variant==="standalone"?this.external?"external":"arrow-right":void 0,"1em")}${this.external?s`<span class="sr-only"> (${this.externalText})</span>`:l}
|
|
1276
1409
|
</a>
|
|
1277
|
-
`}};customElements.define("impakt-link",
|
|
1410
|
+
`}};customElements.define("impakt-link",Ye);var Xe=class extends p{static{this.properties={src:{type:String},alt:{type:String},decorative:{type:Boolean,reflect:!0},width:{type:Number},height:{type:Number},focalX:{type:Number,attribute:"focal-x"},focalY:{type:Number,attribute:"focal-y"},loading:{type:String},ratio:{type:String,reflect:!0},rounded:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.hideOn="never",this.ratio="natural",this.rounded="none",this.src="",this.alt="",this.decorative=!1,this.width=void 0,this.height=void 0,this.focalX=.5,this.focalY=.5,this.loading="lazy"}static{this.styles=[...p.styles,h`
|
|
1278
1411
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1279
1412
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1280
1413
|
:host {
|
|
@@ -1294,7 +1427,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1294
1427
|
:host([rounded='sm']) img { border-radius: ${t.radius}; }
|
|
1295
1428
|
:host([rounded='lg']) img { border-radius: ${t.radiusLg}; }
|
|
1296
1429
|
:host([rounded='full']) img { border-radius: 50%; }
|
|
1297
|
-
`]}render(){return
|
|
1430
|
+
`]}render(){return s`
|
|
1298
1431
|
<img
|
|
1299
1432
|
part="image"
|
|
1300
1433
|
src=${this.src}
|
|
@@ -1305,7 +1438,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1305
1438
|
loading=${this.loading}
|
|
1306
1439
|
style="object-position: ${this.focalX*100}% ${this.focalY*100}%"
|
|
1307
1440
|
/>
|
|
1308
|
-
`}},
|
|
1441
|
+
`}},Ze=class extends p{static{this.properties={src:{type:String},srcDark:{type:String,attribute:"src-dark"},alt:{type:String},onDark:{type:Boolean,attribute:"on-dark",reflect:!0},height:{type:Number}}}constructor(){super(),this.src="",this.srcDark="",this.alt="",this.onDark=!1,this.height=32}static{this.styles=[...p.styles,h`
|
|
1309
1442
|
:host {
|
|
1310
1443
|
display: inline-block;
|
|
1311
1444
|
}
|
|
@@ -1313,7 +1446,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1313
1446
|
display: block;
|
|
1314
1447
|
inline-size: auto;
|
|
1315
1448
|
}
|
|
1316
|
-
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return
|
|
1449
|
+
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return s`<img part="logo" src=${e} alt=${this.alt} style="height: ${this.height}px" />`}},Je=class extends p{static{this.properties={href:{type:String},label:{type:String},fileType:{type:String,attribute:"file-type"},byteSize:{type:Number,attribute:"byte-size"}}}constructor(){super(),this.href="",this.label="",this.fileType="",this.byteSize=void 0}static{this.styles=[...p.styles,h`
|
|
1317
1450
|
:host {
|
|
1318
1451
|
display: block;
|
|
1319
1452
|
}
|
|
@@ -1329,15 +1462,15 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1329
1462
|
.meta {
|
|
1330
1463
|
color: ${t.textMuted};
|
|
1331
1464
|
}
|
|
1332
|
-
`]}get size(){if(!this.byteSize)return"";let e=this.byteSize/1024;return e>=1024?`${(e/1024).toFixed(1)} MB`:`${Math.round(e)} KB`}render(){let e=[this.fileType,this.size].filter(Boolean).join(", ");return
|
|
1465
|
+
`]}get size(){if(!this.byteSize)return"";let e=this.byteSize/1024;return e>=1024?`${(e/1024).toFixed(1)} MB`:`${Math.round(e)} KB`}render(){let e=[this.fileType,this.size].filter(Boolean).join(", ");return s`
|
|
1333
1466
|
<a part="link" href=${this.href||l} download>
|
|
1334
|
-
<span>${this.label}</span>${e?
|
|
1467
|
+
<span>${this.label}</span>${e?s`<span class="meta">(${e})</span>`:l}
|
|
1335
1468
|
</a>
|
|
1336
|
-
`}};customElements.define("impakt-image",
|
|
1469
|
+
`}};customElements.define("impakt-image",Xe);customElements.define("impakt-logo",Ze);customElements.define("impakt-document-link",Je);var Qe=class extends p{static{this.properties={amount:{type:Number},currency:{type:String},locale:{type:String},prefix:{type:String},period:{type:String},size:{type:String,reflect:!0},pending:{type:String}}}constructor(){super(),this.amount=void 0,this.currency="GBP",this.locale="",this.prefix="",this.period="",this.size="xl",this.pending="\u2014"}static{this.styles=[...p.styles,h`
|
|
1337
1470
|
:host {
|
|
1338
1471
|
display: inline-flex;
|
|
1339
1472
|
align-items: baseline;
|
|
1340
|
-
gap: ${
|
|
1473
|
+
gap: ${r(1)};
|
|
1341
1474
|
color: ${t.text};
|
|
1342
1475
|
}
|
|
1343
1476
|
.amount {
|
|
@@ -1354,11 +1487,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1354
1487
|
font-size: ${b("sm")};
|
|
1355
1488
|
color: ${t.textMuted};
|
|
1356
1489
|
}
|
|
1357
|
-
`]}get formatted(){if(this.amount===void 0||Number.isNaN(this.amount))return this.pending;try{return new Intl.NumberFormat(this.locale||
|
|
1358
|
-
${this.prefix?
|
|
1490
|
+
`]}get formatted(){if(this.amount===void 0||Number.isNaN(this.amount))return this.pending;try{return new Intl.NumberFormat(this.locale||B(this),{style:"currency",currency:this.currency,...this.amount>=1e5&&this.amount%100===0?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}).format(this.amount/100)}catch{return(this.amount/100).toFixed(2)}}render(){return s`
|
|
1491
|
+
${this.prefix?s`<span class="period" part="prefix">${this.prefix}</span>`:l}
|
|
1359
1492
|
<span class="amount" part="amount">${this.formatted}</span>
|
|
1360
|
-
${this.period?
|
|
1361
|
-
`}};customElements.define("impakt-price",
|
|
1493
|
+
${this.period?s`<span class="period" part="period">${this.period}</span>`:l}
|
|
1494
|
+
`}};customElements.define("impakt-price",Qe);var et=class extends p{static{this.properties={rows:{type:Array},changeText:{type:String,attribute:"change-text"}}}constructor(){super(),this.rows=[],this.changeText="Change"}static{this.styles=[...p.styles,k,A("dd a"),h`
|
|
1362
1495
|
:host {
|
|
1363
1496
|
display: block;
|
|
1364
1497
|
}
|
|
@@ -1376,7 +1509,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1376
1509
|
}
|
|
1377
1510
|
dt,
|
|
1378
1511
|
dd {
|
|
1379
|
-
padding: ${
|
|
1512
|
+
padding: ${r(3)} 0;
|
|
1380
1513
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1381
1514
|
}
|
|
1382
1515
|
dt {
|
|
@@ -1388,7 +1521,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1388
1521
|
display: flex;
|
|
1389
1522
|
align-items: baseline;
|
|
1390
1523
|
justify-content: space-between;
|
|
1391
|
-
gap: ${
|
|
1524
|
+
gap: ${r(3)};
|
|
1392
1525
|
}
|
|
1393
1526
|
dd a {
|
|
1394
1527
|
flex: none;
|
|
@@ -1423,21 +1556,21 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1423
1556
|
padding-block-start: 0;
|
|
1424
1557
|
}
|
|
1425
1558
|
}
|
|
1426
|
-
`]}render(){return
|
|
1559
|
+
`]}render(){return s`
|
|
1427
1560
|
<dl part="list">
|
|
1428
|
-
${this.rows.map(e=>
|
|
1561
|
+
${this.rows.map(e=>s`
|
|
1429
1562
|
<div class="row" part="row">
|
|
1430
1563
|
<dt part="key">${e.key}</dt>
|
|
1431
1564
|
<dd part="value">
|
|
1432
1565
|
<span>${e.value}</span>
|
|
1433
|
-
${e.changeHref?
|
|
1566
|
+
${e.changeHref?s`<a href=${e.changeHref} part="action"
|
|
1434
1567
|
>${this.changeText}<span class="sr-only"> ${e.key}</span></a
|
|
1435
1568
|
>`:l}
|
|
1436
1569
|
</dd>
|
|
1437
1570
|
</div>
|
|
1438
1571
|
`)}
|
|
1439
1572
|
</dl>
|
|
1440
|
-
`}};customElements.define("impakt-summary-list",
|
|
1573
|
+
`}};customElements.define("impakt-summary-list",et);var tt=class extends p{static{this.properties={caption:{type:String},captionHidden:{type:Boolean,reflect:!0,attribute:"caption-hidden"},columns:{type:Array},rows:{type:Array},sortKey:{type:String,attribute:"sort-key",reflect:!0},sortDirection:{type:String,attribute:"sort-direction",reflect:!0},manualSort:{type:Boolean,attribute:"manual-sort"},selectable:{type:Boolean,reflect:!0},selected:{type:Array},rowKey:{type:String,attribute:"row-key"},stack:{type:Boolean,reflect:!0},emptyText:{type:String,attribute:"empty-text"},selectAllText:{type:String,attribute:"select-all-text"},selectRowText:{type:String,attribute:"select-row-text"},look:{type:String,reflect:!0}}}constructor(){super(),this.caption="",this.captionHidden=!1,this.columns=[],this.rows=[],this.sortKey="",this.sortDirection="ascending",this.manualSort=!1,this.selectable=!1,this.selected=[],this.rowKey="id",this.stack=!1,this.emptyText="Nothing to show",this.selectAllText="Select all rows",this.selectRowText="Select {row}",this.look="plain"}static{this.styles=[...p.styles,k,A(".sort, .pick label"),h`
|
|
1441
1574
|
:host {
|
|
1442
1575
|
display: block;
|
|
1443
1576
|
}
|
|
@@ -1455,12 +1588,12 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1455
1588
|
caption {
|
|
1456
1589
|
text-align: start;
|
|
1457
1590
|
font-weight: ${m("semibold")};
|
|
1458
|
-
padding-block-end: ${
|
|
1591
|
+
padding-block-end: ${r(2)};
|
|
1459
1592
|
}
|
|
1460
1593
|
th,
|
|
1461
1594
|
td {
|
|
1462
1595
|
text-align: start;
|
|
1463
|
-
padding: ${
|
|
1596
|
+
padding: ${r(3)};
|
|
1464
1597
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1465
1598
|
}
|
|
1466
1599
|
thead th {
|
|
@@ -1470,6 +1603,46 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1470
1603
|
tbody th {
|
|
1471
1604
|
font-weight: ${m("semibold")};
|
|
1472
1605
|
}
|
|
1606
|
+
/* Boxed: a white panel with an ink border, mono capitals for the headings and an ink rule under them. */
|
|
1607
|
+
:host([look='boxed']) .scroller {
|
|
1608
|
+
background: ${t.surfaceCard};
|
|
1609
|
+
border: ${t.borderThin} solid ${t.text};
|
|
1610
|
+
}
|
|
1611
|
+
:host([look='boxed']) caption {
|
|
1612
|
+
padding: ${r(4)} ${r(4)} ${r(2)};
|
|
1613
|
+
}
|
|
1614
|
+
/* The caption still names the table for a screen reader when the design shows none. */
|
|
1615
|
+
:host([caption-hidden]) caption {
|
|
1616
|
+
position: absolute;
|
|
1617
|
+
inline-size: 1px;
|
|
1618
|
+
block-size: 1px;
|
|
1619
|
+
overflow: hidden;
|
|
1620
|
+
clip-path: inset(50%);
|
|
1621
|
+
white-space: nowrap;
|
|
1622
|
+
}
|
|
1623
|
+
:host([look='boxed']) tbody th {
|
|
1624
|
+
font-weight: ${m("regular")};
|
|
1625
|
+
}
|
|
1626
|
+
.mono {
|
|
1627
|
+
font-family: ${t.fontMono};
|
|
1628
|
+
}
|
|
1629
|
+
:host([look='boxed']) thead th {
|
|
1630
|
+
font-family: ${t.fontMono};
|
|
1631
|
+
font-size: 11px;
|
|
1632
|
+
font-weight: ${m("medium")};
|
|
1633
|
+
letter-spacing: 0.06em;
|
|
1634
|
+
text-transform: uppercase;
|
|
1635
|
+
color: ${t.textMuted};
|
|
1636
|
+
background: transparent;
|
|
1637
|
+
border-block-end-color: ${t.text};
|
|
1638
|
+
}
|
|
1639
|
+
:host([look='boxed']) :is(th, td) {
|
|
1640
|
+
padding-inline: ${r(4)};
|
|
1641
|
+
border-block-end-color: var(--impakt-color-line-soft, #dcdcd8);
|
|
1642
|
+
}
|
|
1643
|
+
:host([look='boxed']) tbody tr:last-child > * {
|
|
1644
|
+
border-block-end: 0;
|
|
1645
|
+
}
|
|
1473
1646
|
.numeric {
|
|
1474
1647
|
/* A figure read across a line break is a different figure. */
|
|
1475
1648
|
white-space: nowrap;
|
|
@@ -1477,14 +1650,14 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1477
1650
|
font-variant-numeric: tabular-nums;
|
|
1478
1651
|
}
|
|
1479
1652
|
th.sortable {
|
|
1480
|
-
padding: ${
|
|
1653
|
+
padding: ${r(1)};
|
|
1481
1654
|
}
|
|
1482
1655
|
.sort {
|
|
1483
1656
|
display: inline-flex;
|
|
1484
1657
|
align-items: center;
|
|
1485
|
-
gap: ${
|
|
1658
|
+
gap: ${r(1)};
|
|
1486
1659
|
min-block-size: ${t.targetMin};
|
|
1487
|
-
padding: ${
|
|
1660
|
+
padding: ${r(2)};
|
|
1488
1661
|
font: inherit;
|
|
1489
1662
|
color: inherit;
|
|
1490
1663
|
background: none;
|
|
@@ -1536,7 +1709,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1536
1709
|
background: ${t.brandSubtle};
|
|
1537
1710
|
}
|
|
1538
1711
|
.empty {
|
|
1539
|
-
padding-block: ${
|
|
1712
|
+
padding-block: ${r(6)};
|
|
1540
1713
|
text-align: center;
|
|
1541
1714
|
color: ${t.textMuted};
|
|
1542
1715
|
}
|
|
@@ -1544,7 +1717,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1544
1717
|
display: none;
|
|
1545
1718
|
}
|
|
1546
1719
|
.visually-hidden {
|
|
1547
|
-
${
|
|
1720
|
+
${S}
|
|
1548
1721
|
}
|
|
1549
1722
|
/* Stacked: each row a card, each value under its column's name. */
|
|
1550
1723
|
@container (max-width: 36rem) {
|
|
@@ -1555,8 +1728,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1555
1728
|
display: flex;
|
|
1556
1729
|
flex-wrap: wrap;
|
|
1557
1730
|
align-items: center;
|
|
1558
|
-
gap: ${
|
|
1559
|
-
margin-block-end: ${
|
|
1731
|
+
gap: ${r(1)};
|
|
1732
|
+
margin-block-end: ${r(3)};
|
|
1560
1733
|
}
|
|
1561
1734
|
thead th {
|
|
1562
1735
|
display: none;
|
|
@@ -1570,14 +1743,14 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1570
1743
|
}
|
|
1571
1744
|
thead .sort {
|
|
1572
1745
|
border: ${t.borderThin} solid ${t.rule};
|
|
1573
|
-
border-radius:
|
|
1574
|
-
padding-inline: ${
|
|
1746
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
1747
|
+
padding-inline: ${r(3)};
|
|
1575
1748
|
background: ${t.surfaceCard};
|
|
1576
1749
|
}
|
|
1577
1750
|
tbody tr {
|
|
1578
1751
|
position: relative;
|
|
1579
|
-
margin-block-end: ${
|
|
1580
|
-
padding: ${
|
|
1752
|
+
margin-block-end: ${r(3)};
|
|
1753
|
+
padding: ${r(3)} ${r(4)};
|
|
1581
1754
|
border: ${t.borderThin} solid ${t.rule};
|
|
1582
1755
|
border-radius: ${t.radiusXl};
|
|
1583
1756
|
background: ${t.surfaceCard};
|
|
@@ -1591,8 +1764,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1591
1764
|
tbody th, tbody td {
|
|
1592
1765
|
display: grid;
|
|
1593
1766
|
grid-template-columns: minmax(6rem, 38%) minmax(0, 1fr);
|
|
1594
|
-
gap: ${
|
|
1595
|
-
padding: ${
|
|
1767
|
+
gap: ${r(3)};
|
|
1768
|
+
padding: ${r(1.5)} 0;
|
|
1596
1769
|
border: 0;
|
|
1597
1770
|
text-align: start;
|
|
1598
1771
|
white-space: normal;
|
|
@@ -1603,13 +1776,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1603
1776
|
tbody .pick {
|
|
1604
1777
|
display: block;
|
|
1605
1778
|
position: absolute;
|
|
1606
|
-
inset-block-start: ${
|
|
1607
|
-
inset-inline-end: ${
|
|
1779
|
+
inset-block-start: ${r(1)};
|
|
1780
|
+
inset-inline-end: ${r(1)};
|
|
1608
1781
|
inline-size: auto;
|
|
1609
1782
|
padding: 0;
|
|
1610
1783
|
}
|
|
1611
1784
|
tbody tr:has(.pick) > th {
|
|
1612
|
-
padding-inline-end: ${
|
|
1785
|
+
padding-inline-end: ${r(10)};
|
|
1613
1786
|
}
|
|
1614
1787
|
.label {
|
|
1615
1788
|
display: block;
|
|
@@ -1622,115 +1795,305 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1622
1795
|
border: 0;
|
|
1623
1796
|
}
|
|
1624
1797
|
}
|
|
1625
|
-
`]}keyOf(e,
|
|
1626
|
-
<button class="sort" type="button" part="sort" @click=${()=>this.sortBy(e.key)}>${e.label}<span class="arrow" aria-hidden="true">${
|
|
1627
|
-
</th>`:
|
|
1798
|
+
`]}keyOf(e,i){let a=e?.[this.rowKey];return a==null||a===""?String(i):String(a)}ordered(){let e=(this.rows??[]).map((c,$)=>({row:c,key:this.keyOf(c,$)})),i=(this.columns??[]).find(c=>c.key===this.sortKey&&c.sortable);if(!i||this.manualSort)return e;let a=this.sortDirection==="descending"?-1:1,o=B(this),d=c=>Number(String(c??"").replace(/[^\d.-]/g,""))||0;return e.sort((c,$)=>{let g=c.row[i.key]??"",v=$.row[i.key]??"";return(i.numeric?d(g)-d(v):String(g).localeCompare(String(v),o,{numeric:!0,sensitivity:"base"}))*a})}sortBy(e){let i=this.sortKey===e&&this.sortDirection==="ascending"?"descending":"ascending";this.sortKey=e,this.sortDirection=i,this.dispatchEvent(new CustomEvent("impakt-sort",{detail:{key:e,direction:i},bubbles:!0,composed:!0}))}choose(e,i){let a=new Set(this.selected??[]);for(let o of e)i?a.add(o):a.delete(o);this.selected=[...a],this.dispatchEvent(new CustomEvent("impakt-selection",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}heading(e){let i=e.sortable&&e.key===this.sortKey,a=[e.numeric?"numeric":"",e.sortable?"sortable":""].filter(Boolean).join(" ");return e.sortable?s`<th scope="col" role="columnheader" class=${a} aria-sort=${i?this.sortDirection:l}>
|
|
1799
|
+
<button class="sort" type="button" part="sort" @click=${()=>this.sortBy(e.key)}>${e.label}<span class="arrow" aria-hidden="true">${M("chevron-down","16px")}</span></button>
|
|
1800
|
+
</th>`:s`<th scope="col" role="columnheader" class=${a}>${e.label}</th>`}render(){let e=this.columns??[],i=this.ordered(),a=new Set(this.selected??[]),o=i.length>0&&i.every(c=>a.has(c.key)),d=!o&&i.some(c=>a.has(c.key));return s`
|
|
1628
1801
|
<div class="scroller" part="scroller" tabindex="0" role="region" aria-label=${this.caption||l}>
|
|
1629
1802
|
<table part="table" role="table">
|
|
1630
|
-
${this.caption?
|
|
1803
|
+
${this.caption?s`<caption part="caption">${this.caption}</caption>`:l}
|
|
1631
1804
|
<thead role="rowgroup">
|
|
1632
1805
|
<tr role="row">
|
|
1633
|
-
${this.selectable?
|
|
1634
|
-
@change=${c=>this.choose(
|
|
1806
|
+
${this.selectable?s`<th scope="col" role="columnheader" class="pick"><label><input type="checkbox" aria-label=${this.selectAllText} .checked=${o} .indeterminate=${d} ?disabled=${!i.length}
|
|
1807
|
+
@change=${c=>this.choose(i.map($=>$.key),c.target.checked)} /></label></th>`:l}
|
|
1635
1808
|
${e.map(c=>this.heading(c))}
|
|
1636
1809
|
</tr>
|
|
1637
1810
|
</thead>
|
|
1638
1811
|
<tbody role="rowgroup">
|
|
1639
|
-
${
|
|
1640
|
-
<tr role="row" class=${
|
|
1641
|
-
${this.selectable?
|
|
1642
|
-
@change=${
|
|
1643
|
-
${e.map((
|
|
1812
|
+
${i.length?i.map(({row:c,key:$},g)=>s`
|
|
1813
|
+
<tr role="row" class=${a.has($)?"chosen":""} part="row">
|
|
1814
|
+
${this.selectable?s`<td role="cell" class="pick"><label><input type="checkbox" aria-label=${this.selectRowText.replace("{row}",String(c[e[0]?.key??""]??$))} .checked=${a.has($)}
|
|
1815
|
+
@change=${v=>this.choose([$],v.target.checked)} /></label></td>`:l}
|
|
1816
|
+
${e.map((v,L)=>{let E=s`<span class="label" aria-hidden="true">${v.label}</span><span class="value"><slot name=${`cell:${$}:${v.key}`}>${c[v.key]??""}</slot></span>`;return L===0?s`<th scope="row" role="rowheader" class=${v.mono?"mono":""} id=${`${this.uid}-r${g}`}>${E}</th>`:s`<td role="cell" class=${[v.numeric?"numeric":"",v.mono?"mono":""].join(" ").trim()}>${E}</td>`})}
|
|
1644
1817
|
</tr>
|
|
1645
|
-
`):
|
|
1818
|
+
`):s`<tr role="row"><td role="cell" class="empty" colspan=${e.length+(this.selectable?1:0)||1}><slot name="empty">${this.emptyText}</slot></td></tr>`}
|
|
1646
1819
|
</tbody>
|
|
1647
1820
|
</table>
|
|
1648
1821
|
</div>
|
|
1649
|
-
`}};customElements.define("impakt-table",
|
|
1822
|
+
`}};customElements.define("impakt-table",tt);var it=typeof HTMLElement>"u"||!("children"in HTMLElement.prototype);var Oi=C("var(--impakt-color-line-soft, #dcdcd8)"),rt=class extends p{static{this.properties={items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},open:{type:Array},multiple:{type:Boolean},look:{type:String,reflect:!0},enhanced:{state:!0}}}constructor(){super(),this.items=[],this.headingLevel=3,this.open=[],this.multiple=!0,this.look="plain",this.enhanced=!1}connectedCallback(){!it&&!this.shadowRoot&&(this.enhanced=!0),super.connectedCallback()}firstUpdated(){this.enhanced=!0}static{this.styles=[...p.styles,k,Be,h`
|
|
1650
1823
|
:host {
|
|
1651
1824
|
display: block;
|
|
1825
|
+
border-block-start: ${t.borderThin} solid ${t.text};
|
|
1652
1826
|
}
|
|
1653
1827
|
.item {
|
|
1654
|
-
border-block-end: ${t.borderThin} solid ${t.
|
|
1828
|
+
border-block-end: ${t.borderThin} solid ${t.text};
|
|
1655
1829
|
}
|
|
1656
|
-
button
|
|
1657
|
-
|
|
1830
|
+
/* The heading row. The button is stretched over it, so the whole row opens the panel, the status included. */
|
|
1831
|
+
.head {
|
|
1832
|
+
position: relative;
|
|
1658
1833
|
display: flex;
|
|
1659
1834
|
align-items: center;
|
|
1660
|
-
|
|
1661
|
-
|
|
1835
|
+
gap: ${r(4)};
|
|
1836
|
+
}
|
|
1837
|
+
.h {
|
|
1838
|
+
flex: 1;
|
|
1839
|
+
min-inline-size: 0;
|
|
1840
|
+
margin: 0;
|
|
1841
|
+
}
|
|
1842
|
+
button {
|
|
1843
|
+
${z}
|
|
1844
|
+
display: flex;
|
|
1845
|
+
align-items: baseline;
|
|
1846
|
+
flex-wrap: wrap;
|
|
1847
|
+
column-gap: ${r(4)};
|
|
1848
|
+
row-gap: ${r(1)};
|
|
1662
1849
|
inline-size: 100%;
|
|
1663
|
-
padding: ${
|
|
1850
|
+
padding: ${r(8)} 0;
|
|
1664
1851
|
background: none;
|
|
1665
1852
|
border: 0;
|
|
1666
1853
|
font: inherit;
|
|
1667
|
-
|
|
1854
|
+
/* G2 heading S: 24/1.15, -2.5%, semibold. */
|
|
1855
|
+
font-size: var(--impakt-type-heading-s-size, 1.5rem);
|
|
1856
|
+
line-height: 1.15;
|
|
1857
|
+
letter-spacing: -0.025em;
|
|
1668
1858
|
font-weight: ${m("semibold")};
|
|
1669
1859
|
color: ${t.text};
|
|
1670
1860
|
text-align: start;
|
|
1671
1861
|
cursor: pointer;
|
|
1672
1862
|
}
|
|
1673
|
-
button
|
|
1674
|
-
|
|
1863
|
+
button::after {
|
|
1864
|
+
content: '';
|
|
1865
|
+
position: absolute;
|
|
1866
|
+
inset: 0;
|
|
1867
|
+
}
|
|
1868
|
+
button:focus-visible {
|
|
1869
|
+
box-shadow: none;
|
|
1870
|
+
}
|
|
1871
|
+
button:focus-visible::after {
|
|
1872
|
+
box-shadow: ${t.focusShadow};
|
|
1873
|
+
}
|
|
1874
|
+
button:hover .q {
|
|
1875
|
+
text-decoration: underline;
|
|
1876
|
+
text-decoration-thickness: 1px;
|
|
1877
|
+
text-underline-offset: 0.15em;
|
|
1878
|
+
}
|
|
1879
|
+
.meta {
|
|
1880
|
+
font-family: ${t.fontMono};
|
|
1881
|
+
font-size: ${b("sm")};
|
|
1882
|
+
font-weight: 400;
|
|
1883
|
+
letter-spacing: normal;
|
|
1884
|
+
color: ${t.textMuted};
|
|
1885
|
+
}
|
|
1886
|
+
.status-pill {
|
|
1887
|
+
flex: none;
|
|
1888
|
+
}
|
|
1889
|
+
.pills {
|
|
1890
|
+
display: flex;
|
|
1891
|
+
flex-wrap: wrap;
|
|
1892
|
+
justify-content: flex-end;
|
|
1893
|
+
gap: ${r(2)};
|
|
1894
|
+
max-inline-size: 50%;
|
|
1675
1895
|
}
|
|
1896
|
+
/* A plus that turns to a minus: two bars, the upright one hidden when open. Drawn, not typed, so it is the same in every face. */
|
|
1676
1897
|
.marker {
|
|
1898
|
+
position: relative;
|
|
1677
1899
|
flex: none;
|
|
1900
|
+
inline-size: 18px;
|
|
1901
|
+
block-size: 18px;
|
|
1902
|
+
/* Centred on the question's first line, not sat on its baseline. */
|
|
1903
|
+
align-self: flex-start;
|
|
1904
|
+
margin-block-start: calc((1lh - 18px) / 2);
|
|
1905
|
+
}
|
|
1906
|
+
.marker::before,
|
|
1907
|
+
.marker::after {
|
|
1908
|
+
content: '';
|
|
1909
|
+
position: absolute;
|
|
1910
|
+
background: ${t.text};
|
|
1911
|
+
}
|
|
1912
|
+
.marker::before {
|
|
1913
|
+
inset-inline: 0;
|
|
1914
|
+
inset-block-start: calc(50% - 1px);
|
|
1915
|
+
block-size: 2px;
|
|
1916
|
+
}
|
|
1917
|
+
.marker::after {
|
|
1918
|
+
inset-block: 0;
|
|
1919
|
+
inset-inline-start: calc(50% - 1px);
|
|
1920
|
+
inline-size: 2px;
|
|
1678
1921
|
transition: transform 120ms ease-in-out;
|
|
1679
1922
|
}
|
|
1680
|
-
|
|
1681
|
-
transform:
|
|
1923
|
+
.item.open .marker::after {
|
|
1924
|
+
transform: scaleY(0);
|
|
1925
|
+
}
|
|
1926
|
+
@media (forced-colors: active) {
|
|
1927
|
+
.marker::before,
|
|
1928
|
+
.marker::after {
|
|
1929
|
+
background: CanvasText;
|
|
1930
|
+
}
|
|
1682
1931
|
}
|
|
1683
1932
|
/* With no script the element is never defined: the buttons cannot work, so they do not look as if they do. */
|
|
1684
1933
|
:host(:not(:defined)) button {
|
|
1685
1934
|
cursor: default;
|
|
1686
1935
|
pointer-events: none;
|
|
1687
1936
|
}
|
|
1688
|
-
:host(:not(:defined)) button:hover {
|
|
1689
|
-
color: ${t.text};
|
|
1690
|
-
}
|
|
1691
1937
|
:host(:not(:defined)) .marker {
|
|
1692
1938
|
display: none;
|
|
1693
1939
|
}
|
|
1694
1940
|
.panel {
|
|
1695
|
-
|
|
1941
|
+
max-inline-size: 48rem;
|
|
1942
|
+
margin-block-start: calc(-1 * ${r(4)});
|
|
1943
|
+
padding-block-end: ${r(8)};
|
|
1696
1944
|
font-size: ${b("md")};
|
|
1945
|
+
line-height: 1.6;
|
|
1946
|
+
color: ${t.textMuted};
|
|
1697
1947
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1948
|
+
/*
|
|
1949
|
+
* Issues (frames 36:716, 36:430): rows divided by soft rules, each a code, a small "+" and the finding in
|
|
1950
|
+
* body type. An open finding becomes an inset soft box with an ink edge: the code above the heading, the
|
|
1951
|
+
* heading in heading S, the status at the top right, and the panel under them, with no marker.
|
|
1952
|
+
*/
|
|
1953
|
+
:host([look='issues']) {
|
|
1954
|
+
border-block-start: 0;
|
|
1955
|
+
}
|
|
1956
|
+
:host([look='issues']) .item {
|
|
1957
|
+
border-block-end: ${t.borderThin} solid ${Oi};
|
|
1958
|
+
}
|
|
1959
|
+
/* The finding keeps at least 16rem; on a narrow screen the status wraps under it, at the end, rather than squeezing it. */
|
|
1960
|
+
:host([look='issues']) .head {
|
|
1961
|
+
flex-wrap: wrap;
|
|
1962
|
+
gap: ${r(2)} ${r(4)};
|
|
1963
|
+
}
|
|
1964
|
+
:host([look='issues']) .h {
|
|
1965
|
+
flex: 1 1 16rem;
|
|
1966
|
+
}
|
|
1967
|
+
:host([look='issues']) .head > :is(.status-pill, .pills) {
|
|
1968
|
+
margin-inline-start: auto;
|
|
1969
|
+
}
|
|
1970
|
+
:host([look='issues']) button {
|
|
1971
|
+
align-items: center;
|
|
1972
|
+
column-gap: ${r(3)};
|
|
1973
|
+
padding-block: ${r(5)};
|
|
1974
|
+
font-size: 1.25rem;
|
|
1975
|
+
line-height: 1.2;
|
|
1976
|
+
letter-spacing: -0.01em;
|
|
1977
|
+
font-weight: ${m("regular")};
|
|
1978
|
+
}
|
|
1979
|
+
:host([look='issues']) .meta {
|
|
1980
|
+
margin-inline-end: ${r(1)};
|
|
1981
|
+
}
|
|
1982
|
+
:host([look='issues']) .marker {
|
|
1983
|
+
inline-size: 12px;
|
|
1984
|
+
block-size: 12px;
|
|
1985
|
+
}
|
|
1986
|
+
:host([look='issues']) .marker::before {
|
|
1987
|
+
inset-block-start: calc(50% - 0.75px);
|
|
1988
|
+
block-size: 1.5px;
|
|
1989
|
+
}
|
|
1990
|
+
:host([look='issues']) .marker::after {
|
|
1991
|
+
inset-inline-start: calc(50% - 0.75px);
|
|
1992
|
+
inline-size: 1.5px;
|
|
1993
|
+
}
|
|
1994
|
+
:host([look='issues']) .item.open {
|
|
1995
|
+
margin-block: ${r(4)};
|
|
1996
|
+
padding: ${r(6)};
|
|
1997
|
+
background: ${t.surfaceSubtle};
|
|
1998
|
+
border: ${t.borderThin} solid ${t.text};
|
|
1999
|
+
}
|
|
2000
|
+
:host([look='issues']) .item.open .head {
|
|
2001
|
+
align-items: flex-start;
|
|
2002
|
+
}
|
|
2003
|
+
:host([look='issues']) .item.open button {
|
|
2004
|
+
flex-direction: column;
|
|
2005
|
+
align-items: flex-start;
|
|
2006
|
+
row-gap: ${r(2)};
|
|
2007
|
+
padding-block: 0;
|
|
2008
|
+
font-size: var(--impakt-type-heading-s-size, 1.5rem);
|
|
2009
|
+
line-height: 1.15;
|
|
2010
|
+
letter-spacing: -0.025em;
|
|
2011
|
+
font-weight: ${m("semibold")};
|
|
2012
|
+
}
|
|
2013
|
+
:host([look='issues']) .item.open .meta {
|
|
2014
|
+
letter-spacing: normal;
|
|
2015
|
+
font-weight: 400;
|
|
2016
|
+
}
|
|
2017
|
+
:host([look='issues']) .item.open .marker {
|
|
2018
|
+
display: none;
|
|
2019
|
+
}
|
|
2020
|
+
:host([look='issues']) .panel {
|
|
2021
|
+
max-inline-size: none;
|
|
2022
|
+
margin: ${r(4)} 0 0;
|
|
2023
|
+
padding: 0;
|
|
2024
|
+
color: ${t.text};
|
|
2025
|
+
}
|
|
2026
|
+
:host([look='issues']) .panel[hidden] {
|
|
2027
|
+
display: none;
|
|
2028
|
+
}
|
|
2029
|
+
/* Without script every finding is open and has no marker; it reads as a list, not as boxes. */
|
|
2030
|
+
:host([look='issues']:not(:defined)) .item.open {
|
|
2031
|
+
margin: 0;
|
|
2032
|
+
padding: ${r(5)} 0;
|
|
2033
|
+
background: none;
|
|
2034
|
+
border: 0;
|
|
2035
|
+
border-block-end: ${t.borderThin} solid ${Oi};
|
|
2036
|
+
}
|
|
2037
|
+
@media (max-width: 40rem) {
|
|
2038
|
+
button {
|
|
2039
|
+
padding-block: ${r(6)};
|
|
2040
|
+
font-size: 1.25rem;
|
|
2041
|
+
}
|
|
2042
|
+
:host([look='issues']) button {
|
|
2043
|
+
padding-block: ${r(4)};
|
|
2044
|
+
font-size: 1.125rem;
|
|
2045
|
+
}
|
|
2046
|
+
:host([look='issues']) .item.open {
|
|
2047
|
+
padding: ${r(4)};
|
|
2048
|
+
}
|
|
2049
|
+
:host([look='issues']) .item.open button {
|
|
2050
|
+
padding-block: 0;
|
|
2051
|
+
font-size: 1.25rem;
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
`]}toggle(e){this.open.includes(e)?this.open=this.open.filter(a=>a!==e):this.open=this.multiple?[...this.open,e]:[e]}render(){let e=this.look==="issues";return s`
|
|
2055
|
+
${this.items.map(i=>{let a=!this.enhanced||this.open.includes(i.id),o=this.id_(`panel-${i.id}`),d=this.id_(`button-${i.id}`);return s`
|
|
2056
|
+
<div class="item ${a?"open":""}" part="item">
|
|
2057
|
+
<div class="head" part="head">
|
|
2058
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>
|
|
2059
|
+
<button
|
|
2060
|
+
id=${d}
|
|
2061
|
+
part="header"
|
|
2062
|
+
type="button"
|
|
2063
|
+
aria-expanded=${a?"true":"false"}
|
|
2064
|
+
aria-controls=${o}
|
|
2065
|
+
@click=${()=>this.toggle(i.id)}
|
|
2066
|
+
>
|
|
2067
|
+
${i.meta?s`<span class="meta" part="meta">${i.meta}</span>`:l}
|
|
2068
|
+
${e?s`<span class="marker" aria-hidden="true"></span>`:l}
|
|
2069
|
+
<span class="q">${i.heading}</span>
|
|
2070
|
+
</button>
|
|
2071
|
+
</div>
|
|
2072
|
+
${i.tags?.length?s`<span class="pills" part="pills">
|
|
2073
|
+
${ee(i.status,i.statusTone)}${i.tags.map(c=>ee(c.label,c.tone??"neutral","tag"))}
|
|
2074
|
+
</span>`:ee(i.status,i.statusTone)}
|
|
2075
|
+
${e?l:s`<span class="marker" aria-hidden="true"></span>`}
|
|
1713
2076
|
</div>
|
|
1714
2077
|
<div
|
|
1715
|
-
id=${
|
|
2078
|
+
id=${o}
|
|
1716
2079
|
class="panel"
|
|
1717
2080
|
part="panel"
|
|
1718
2081
|
role="region"
|
|
1719
|
-
aria-labelledby=${
|
|
1720
|
-
?hidden=${!
|
|
2082
|
+
aria-labelledby=${d}
|
|
2083
|
+
?hidden=${!a}
|
|
1721
2084
|
>
|
|
1722
|
-
<slot name=${`panel-${
|
|
2085
|
+
<slot name=${`panel-${i.id}`}>${i.body}</slot>
|
|
1723
2086
|
</div>
|
|
1724
2087
|
</div>
|
|
1725
2088
|
`})}
|
|
1726
|
-
`}};customElements.define("impakt-accordion",
|
|
2089
|
+
`}};customElements.define("impakt-accordion",rt);var gr=C("var(--impakt-color-line-soft, #dcdcd8)"),at=class extends p{static{this.properties={steps:{type:Array},current:{type:String},label:{type:String},look:{type:String,reflect:!0},hideLabels:{type:Boolean,attribute:"hide-labels",reflect:!0},doneText:{type:String,attribute:"done-text"}}}constructor(){super(),this.steps=[],this.current="",this.label="Progress",this.look="steps",this.hideLabels=!1,this.doneText=""}static{this.styles=[...p.styles,k,h`
|
|
1727
2090
|
:host {
|
|
1728
2091
|
display: block;
|
|
1729
|
-
margin-block-end: ${
|
|
2092
|
+
margin-block-end: ${r(5)};
|
|
1730
2093
|
}
|
|
1731
2094
|
ol {
|
|
1732
2095
|
display: flex;
|
|
1733
|
-
gap: ${
|
|
2096
|
+
gap: ${r(2)};
|
|
1734
2097
|
list-style: none;
|
|
1735
2098
|
margin: 0;
|
|
1736
2099
|
padding: 0;
|
|
@@ -1739,7 +2102,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1739
2102
|
flex: 1;
|
|
1740
2103
|
font-size: ${b("sm")};
|
|
1741
2104
|
color: ${t.textMuted};
|
|
1742
|
-
padding-block-start: ${
|
|
2105
|
+
padding-block-start: ${r(2)};
|
|
1743
2106
|
border-block-start: 4px solid ${t.border};
|
|
1744
2107
|
}
|
|
1745
2108
|
li[data-state='done'] {
|
|
@@ -1752,17 +2115,17 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1752
2115
|
border-block-start-color: ${t.brand};
|
|
1753
2116
|
}
|
|
1754
2117
|
.sr-only {
|
|
1755
|
-
${
|
|
2118
|
+
${S}
|
|
1756
2119
|
}
|
|
1757
2120
|
:host([look='bars']) {
|
|
1758
2121
|
margin-block-end: 0;
|
|
1759
2122
|
}
|
|
1760
2123
|
:host([look='bars']) ol {
|
|
1761
|
-
gap: ${
|
|
2124
|
+
gap: ${r(1.5)};
|
|
1762
2125
|
}
|
|
1763
2126
|
:host([look='bars']) li {
|
|
1764
2127
|
position: relative;
|
|
1765
|
-
padding-block-start: ${
|
|
2128
|
+
padding-block-start: ${r(3)};
|
|
1766
2129
|
border: 0;
|
|
1767
2130
|
font-size: 12px;
|
|
1768
2131
|
min-inline-size: 0;
|
|
@@ -1776,7 +2139,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1776
2139
|
inset-inline: 0;
|
|
1777
2140
|
inset-block-start: 0;
|
|
1778
2141
|
block-size: 5px;
|
|
1779
|
-
border-radius:
|
|
2142
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
1780
2143
|
background: ${t.border};
|
|
1781
2144
|
}
|
|
1782
2145
|
:host([look='bars']) li[data-state='done']::before {
|
|
@@ -1790,40 +2153,109 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1790
2153
|
:host([look='bars']) li[data-state='done']::before, :host([look='bars']) li[data-state='current']::before { background: CanvasText; }
|
|
1791
2154
|
}
|
|
1792
2155
|
:host([hide-labels]) .name {
|
|
1793
|
-
${
|
|
2156
|
+
${S}
|
|
1794
2157
|
}
|
|
1795
|
-
/*
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
li:not([data-state='current']) .name {
|
|
1800
|
-
${T}
|
|
1801
|
-
}
|
|
2158
|
+
/* Stages: numbered names on a soft rule, the current one underlined in the ink. */
|
|
2159
|
+
:host([look='stages']) nav {
|
|
2160
|
+
overflow-x: auto;
|
|
2161
|
+
scrollbar-width: thin;
|
|
1802
2162
|
}
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2163
|
+
:host([look='stages']) ol {
|
|
2164
|
+
gap: ${r(8)};
|
|
2165
|
+
inline-size: max-content;
|
|
2166
|
+
min-inline-size: 100%;
|
|
2167
|
+
box-shadow: inset 0 -1px 0 ${gr};
|
|
2168
|
+
}
|
|
2169
|
+
:host([look='stages']) li {
|
|
2170
|
+
flex: none;
|
|
2171
|
+
padding: 0;
|
|
2172
|
+
border: 0;
|
|
2173
|
+
font-size: ${b("md")};
|
|
2174
|
+
font-weight: ${m("regular")};
|
|
2175
|
+
color: ${t.textMuted};
|
|
2176
|
+
white-space: nowrap;
|
|
2177
|
+
}
|
|
2178
|
+
:host([look='stages']) .stage {
|
|
2179
|
+
display: inline-flex;
|
|
2180
|
+
align-items: baseline;
|
|
2181
|
+
gap: ${r(2)};
|
|
2182
|
+
min-block-size: 24px;
|
|
2183
|
+
padding-block: ${r(3)};
|
|
2184
|
+
border-block-end: 3px solid transparent;
|
|
2185
|
+
color: inherit;
|
|
2186
|
+
text-decoration: none;
|
|
2187
|
+
}
|
|
2188
|
+
:host([look='stages']) .num {
|
|
2189
|
+
font-family: ${t.fontMono};
|
|
2190
|
+
font-size: ${b("sm")};
|
|
2191
|
+
}
|
|
2192
|
+
:host([look='stages']) li[data-state='done'] .num {
|
|
2193
|
+
color: ${t.text};
|
|
2194
|
+
}
|
|
2195
|
+
:host([look='stages']) li[data-state='current'] {
|
|
2196
|
+
color: ${t.text};
|
|
2197
|
+
}
|
|
2198
|
+
:host([look='stages']) li[data-state='current'] .stage {
|
|
2199
|
+
border-block-end-color: ${t.text};
|
|
2200
|
+
}
|
|
2201
|
+
:host([look='stages']) a.stage:hover .name {
|
|
2202
|
+
text-decoration: underline;
|
|
2203
|
+
text-underline-offset: 0.2em;
|
|
2204
|
+
}
|
|
2205
|
+
@media (forced-colors: active) {
|
|
2206
|
+
:host([look='stages']) li[data-state='current'] .stage { border-block-end-color: CanvasText; }
|
|
2207
|
+
}
|
|
2208
|
+
/* Below 30rem the labels stop fitting; the position in words is the part
|
|
2209
|
+
that has to survive, so the list collapses to bars and the current
|
|
2210
|
+
step's name. */
|
|
2211
|
+
@media (max-width: 30rem) {
|
|
2212
|
+
:host(:not([look='stages'])) li:not([data-state='current']) .name {
|
|
2213
|
+
${S}
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
`]}renderStages(e){let i=this.doneText||T("done"),a=this.steps.some(o=>o.href);return s`
|
|
2217
|
+
<nav part="nav" aria-label=${this.label} tabindex=${a?l:"0"}>
|
|
2218
|
+
<ol part="list">
|
|
2219
|
+
${this.steps.map((o,d)=>{let c=d<e?"done":d===e?"current":"todo",$=String(d+1).padStart(2,"0"),g=s`<span class="num" part="step-number">${c==="done"?s`<span aria-hidden="true">✓ </span>`:l}${$}</span>
|
|
2220
|
+
<span class="name" part="step-label">${o.label}</span>${c==="done"?s`<span class="sr-only">, ${i}</span>`:l}`;return s`
|
|
2221
|
+
<li part="step step-${c}" data-state=${c}>
|
|
2222
|
+
${o.href?s`<a class="stage" href=${o.href} aria-current=${c==="current"?"step":l}>${g}</a>`:s`<span class="stage" aria-current=${c==="current"?"step":l}>${g}</span>`}
|
|
2223
|
+
</li>
|
|
2224
|
+
`})}
|
|
2225
|
+
</ol>
|
|
2226
|
+
</nav>
|
|
2227
|
+
`}render(){let e=this.steps.findIndex(i=>i.id===this.current);return this.look==="stages"?this.renderStages(e):s`
|
|
2228
|
+
<nav part="nav" aria-label=${this.label}>
|
|
2229
|
+
<ol part="list">
|
|
2230
|
+
${this.steps.map((i,a)=>{let o=a<e?"done":a===e?"current":"todo";return s`
|
|
2231
|
+
<li part="step step-${o}" data-state=${o} aria-current=${o==="current"?"step":l}>
|
|
2232
|
+
${o==="current"?s`<span class="sr-only">${T("Step {step} of {steps}:",{step:a+1,steps:this.steps.length})} </span>`:l}
|
|
2233
|
+
<span class="name" part="step-label">${i.label}</span>
|
|
2234
|
+
</li>
|
|
2235
|
+
`})}
|
|
2236
|
+
</ol>
|
|
2237
|
+
</nav>
|
|
2238
|
+
`}};customElements.define("impakt-progress",at);var pe={brand:"var(--impakt-color-brand-default, #1f4ed8)",accent:"var(--impakt-color-accent-default, #c8a15a)",info:"var(--impakt-color-status-info-default, #1f4ed8)",success:"var(--impakt-color-status-success-default, #047857)",warning:"var(--impakt-color-status-warning-default, #b45309)",danger:"var(--impakt-color-status-danger-default, #c8102e)"},he=["success","info","warning","accent","danger","brand"],ai=(n,e)=>typeof n=="number"?`var(--impakt-color-chart-${n}, ${pe[he[(n-1)%he.length]]})`:n&&n in pe?pe[n]:`var(--impakt-color-chart-${e%5+1}, ${pe[he[e%he.length]]})`;var Pi=t.fontMono,st=class extends p{static{this.properties={label:{type:String},meta:{type:String},icon:{type:String,reflect:!0},tone:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.label="",this.meta="",this.icon="none",this.tone="success",this.look="filled",this.size="md",this.hideOn="never"}static{this.styles=[...p.styles,Bi,h`
|
|
2239
|
+
:host { display: inline-flex; flex: none; }
|
|
2240
|
+
span.chip { display: inline-flex; align-items: center; gap: ${r(1.5)}; padding: 3px ${r(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${Pi}; font-size: ${b("xs")}; line-height: 1.2; white-space: nowrap; }
|
|
2241
|
+
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
2242
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; }
|
|
2243
|
+
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${m("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
2244
|
+
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
2245
|
+
:host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: ${r(1.5)} ${r(3)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }
|
|
2246
|
+
:host([size='lg']) span.chip { box-sizing: border-box; min-block-size: 49px; gap: ${r(3)}; padding: ${r(2)} ${r(4)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 20px; line-height: 1.2; }
|
|
2247
|
+
:host([size='lg']) .meta { font-family: ${Pi}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }
|
|
2248
|
+
:host([look='plain']) span.chip { padding: 0; }
|
|
2249
|
+
.dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }
|
|
2250
|
+
/* Yellow means "needs your attention": the accent, with an ink stroke so it shows on white. */
|
|
2251
|
+
.dot.warn { background: ${u("color.accent.default","#ffd43b")}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
2252
|
+
@media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }
|
|
2253
|
+
svg { inline-size: 12px; block-size: 12px; }
|
|
2254
|
+
.meta { opacity: 0.72; text-transform: none; }
|
|
1823
2255
|
:host([look='plain']) .label { opacity: 0.72; }
|
|
1824
|
-
`]}render(){let e=this.icon==="dot"?
|
|
2256
|
+
`]}render(){let e=this.icon==="dot"?s`<span class="dot ${this.tone==="warning"?"warn":""}" aria-hidden="true"></span>`:this.icon==="branch"?s`<svg viewBox="0 0 14 14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="3.5" cy="3" r="1.5"/><circle cx="3.5" cy="11" r="1.5"/><circle cx="10.5" cy="4.5" r="1.5"/><path d="M3.5 4.5v5M10.5 6c0 2.5-3 2.5-6 4"/></svg>`:l;return s`<span class="chip" part="chip" style=${`--tone:${ai(this.tone,0)}`}>${e}<span class="label">${this.label}</span>${this.meta?s` <span class="meta">${this.meta}</span>`:l}</span>`}};customElements.define("impakt-chip",st);var ot=class extends p{static{this.properties={tone:{type:String,reflect:!0},icon:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.tone="neutral",this.icon="none",this.look="filled",this.size="md"}static{this.styles=[...p.styles,h`
|
|
1825
2257
|
:host { display: inline-flex; }
|
|
1826
|
-
span { display: inline-flex; align-items: center; gap: ${
|
|
2258
|
+
span { display: inline-flex; align-items: center; gap: ${r(1)}; padding: ${r(.5)} ${r(2)}; border-radius: ${t.radius}; ${w("sm")} font-weight: ${m("medium")}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
1827
2259
|
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
1828
2260
|
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
1829
2261
|
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
@@ -1831,50 +2263,35 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1831
2263
|
:host([tone='info']) span { background: ${t.infoSubtle}; color: ${t.infoText}; }
|
|
1832
2264
|
:host([tone='inverse']) span { background: ${t.text}; color: ${t.surfaceCard}; box-shadow: none; }
|
|
1833
2265
|
:host([tone='solid']) span { background: ${t.brand}; color: ${t.onBrand}; box-shadow: none; }
|
|
2266
|
+
/* Accent: the yellow with ink words, for the label that needs attention. */
|
|
2267
|
+
:host([tone='accent']) span { background: ${u("color.accent.default","#ffd43b")}; color: ${u("color.accent.on","#111111")}; box-shadow: none; }
|
|
2268
|
+
:host([look='outline']) span { background: transparent; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.text}; }
|
|
2269
|
+
:host([look='outline'][tone='accent']) span { background: ${u("color.accent.default","#ffd43b")}; color: ${u("color.accent.on","#111111")}; box-shadow: inset 0 0 0 1px ${u("color.accent.on","#111111")}; }
|
|
2270
|
+
:host([size='marketing']) span { padding: 3px ${r(2)}; font-family: ${t.fontMono}; font-size: 11px; line-height: 1.4; font-weight: ${m("medium")}; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
1834
2271
|
@media (forced-colors: active) { span { border-color: CanvasText; } }
|
|
1835
|
-
`]}render(){return
|
|
2272
|
+
`]}render(){return s`<span part="badge">${M(this.icon,"1em")}<slot></slot></span>`}};customElements.define("impakt-badge",ot);var nt=class extends x{constructor(){super();this.filled=!1;this.filledText="";this.width="full",this.rows=4,this.maxlength=void 0,this.fillFrom="none",this.placeholder=""}static{this.properties={...x.properties,width:{type:String,reflect:!0},rows:{type:Number},maxlength:{type:Number},fillFrom:{type:String,attribute:"fill-from"},placeholder:{type:String}}}static{this.styles=[...x.styles,N,Q("textarea"),h`
|
|
1836
2273
|
textarea {
|
|
1837
|
-
inline-size: min(100%, var(--impakt-field-width));
|
|
1838
|
-
padding: ${s(2.5)} ${s(3)};
|
|
1839
|
-
font-family: inherit;
|
|
1840
|
-
font-size: ${b("md")};
|
|
1841
|
-
color: ${t.text};
|
|
1842
|
-
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
1843
|
-
border: ${t.borderThin} solid ${t.border};
|
|
1844
|
-
border-radius: ${t.radiusLg};
|
|
1845
|
-
box-shadow: var(--impakt-shadow-field, ${t.shadowXs});
|
|
1846
|
-
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
1847
2274
|
/* Resizing is left on deliberately. 1.4.4 and 1.4.12 both assume text
|
|
1848
2275
|
can be made bigger, and a fixed box is where that stops working. */
|
|
1849
2276
|
resize: vertical;
|
|
1850
2277
|
}
|
|
1851
|
-
|
|
1852
|
-
border-color: ${t.borderStrong};
|
|
1853
|
-
}
|
|
1854
|
-
textarea:focus-visible {
|
|
1855
|
-
border-color: ${t.brand};
|
|
1856
|
-
box-shadow: ${t.focusShadow}, 0 0 0 6px ${t.brandHalo};
|
|
1857
|
-
}
|
|
1858
|
-
:host([invalid]) textarea {
|
|
1859
|
-
border-color: ${t.danger};
|
|
1860
|
-
border-width: ${t.borderThick};
|
|
1861
|
-
}
|
|
1862
|
-
`]}willUpdate(r){super.willUpdate?.(r),this.filledText&&r.has("value")&&!this.value&&(this.value=this.filledText)}fill(){if(this.filled||this.fillFrom!=="estimate"||(this.filled=!0,this.value))return;let r=null;try{r=sessionStorage.getItem("impakt.estimate")}catch{r=null}r&&(this.filledText=r,this.setFormValue(r))}renderControl(){return n`
|
|
2278
|
+
`]}willUpdate(i){super.willUpdate?.(i),this.filledText&&i.has("value")&&!this.value&&(this.value=this.filledText)}fill(){if(this.filled||this.fillFrom!=="estimate"||(this.filled=!0,this.value))return;let i=null;try{i=sessionStorage.getItem("impakt.estimate")}catch{i=null}i&&(this.filledText=i,this.setFormValue(i))}renderControl(){return s`
|
|
1863
2279
|
<textarea
|
|
1864
2280
|
id=${this.controlId}
|
|
1865
2281
|
part="textarea"
|
|
1866
2282
|
name=${this.name||l}
|
|
1867
2283
|
rows=${this.rows}
|
|
1868
2284
|
maxlength=${this.maxlength??l}
|
|
2285
|
+
placeholder=${this.placeholder||l}
|
|
1869
2286
|
?disabled=${this.disabled}
|
|
1870
2287
|
?readonly=${this.readonly}
|
|
1871
2288
|
?required=${this.required}
|
|
1872
2289
|
aria-describedby=${this.describedBy}
|
|
1873
2290
|
aria-invalid=${this.error?"true":l}
|
|
1874
2291
|
.value=${this.value}
|
|
1875
|
-
@input=${
|
|
2292
|
+
@input=${i=>{this.filledText="",this.setFormValue(i.target.value)}}
|
|
1876
2293
|
></textarea>
|
|
1877
|
-
`}updated(
|
|
2294
|
+
`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error),this.fill()}};customElements.define("impakt-textarea",nt);var lt=class extends x{static{this.properties={...x.properties,options:{type:Array},values:{type:Array}}}constructor(){super(),this.options=[],this.values=[]}static{this.styles=[...x.styles,h`
|
|
1878
2295
|
fieldset {
|
|
1879
2296
|
border: 0;
|
|
1880
2297
|
margin: 0;
|
|
@@ -1887,18 +2304,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1887
2304
|
.option {
|
|
1888
2305
|
display: flex;
|
|
1889
2306
|
align-items: flex-start;
|
|
1890
|
-
gap: ${
|
|
1891
|
-
padding: ${
|
|
2307
|
+
gap: ${r(3)};
|
|
2308
|
+
padding: ${r(3)};
|
|
1892
2309
|
border: ${t.borderThin} solid ${t.border};
|
|
1893
2310
|
border-radius: ${t.radius};
|
|
1894
|
-
margin-block-end: ${
|
|
2311
|
+
margin-block-end: ${r(2)};
|
|
1895
2312
|
cursor: pointer;
|
|
1896
2313
|
}
|
|
1897
2314
|
.option:hover {
|
|
1898
2315
|
background: ${t.surfaceSubtle};
|
|
1899
2316
|
}
|
|
1900
2317
|
.option input {
|
|
1901
|
-
${
|
|
2318
|
+
${z}
|
|
1902
2319
|
inline-size: 20px;
|
|
1903
2320
|
block-size: 20px;
|
|
1904
2321
|
margin: 0;
|
|
@@ -1913,19 +2330,19 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1913
2330
|
display: block;
|
|
1914
2331
|
font-size: ${b("sm")};
|
|
1915
2332
|
color: ${t.textMuted};
|
|
1916
|
-
margin-block-start: ${
|
|
2333
|
+
margin-block-start: ${r(1)};
|
|
1917
2334
|
}
|
|
1918
2335
|
:host([invalid]) .option {
|
|
1919
2336
|
border-color: ${t.danger};
|
|
1920
2337
|
}
|
|
1921
|
-
`]}renderLabel(){return
|
|
1922
|
-
${this.label}${this.required?
|
|
1923
|
-
</legend>`}onToggle(e,
|
|
1924
|
-
${this.options.map((e,
|
|
1925
|
-
<label class="option" part="option" for=${
|
|
2338
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
2339
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
2340
|
+
</legend>`}onToggle(e,i){this.values=i?[...this.values,e]:this.values.filter(a=>a!==e),this.setFormValue(this.options.filter(a=>this.values.includes(a.value)).map(a=>a.value).join(","))}renderControl(){return s`
|
|
2341
|
+
${this.options.map((e,i)=>{let a=this.id_(`opt-${i}`),o=e.description?this.id_(`opt-${i}-desc`):void 0;return s`
|
|
2342
|
+
<label class="option" part="option" for=${a}>
|
|
1926
2343
|
<input
|
|
1927
2344
|
type="checkbox"
|
|
1928
|
-
id=${
|
|
2345
|
+
id=${a}
|
|
1929
2346
|
value=${e.value}
|
|
1930
2347
|
.checked=${this.values.includes(e.value)}
|
|
1931
2348
|
?disabled=${this.disabled}
|
|
@@ -1934,18 +2351,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1934
2351
|
/>
|
|
1935
2352
|
<span>
|
|
1936
2353
|
<span class="option-text">${e.label}</span>
|
|
1937
|
-
${e.description?
|
|
2354
|
+
${e.description?s`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1938
2355
|
</span>
|
|
1939
2356
|
</label>
|
|
1940
2357
|
`})}
|
|
1941
|
-
`}render(){return
|
|
2358
|
+
`}render(){return s`
|
|
1942
2359
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
1943
2360
|
${this.renderLabel()}
|
|
1944
|
-
${this.description?
|
|
2361
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
1945
2362
|
${this.renderControl()}
|
|
1946
2363
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
1947
2364
|
</fieldset>
|
|
1948
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",
|
|
2365
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",lt);var dt=class extends x{static{this.properties={...x.properties,day:{type:String},month:{type:String},year:{type:String},autocompleteSection:{type:String,attribute:"autocomplete-section"}}}constructor(){super(),this.day="",this.month="",this.year="",this.autocompleteSection="bday"}static{this.styles=[...x.styles,h`
|
|
1949
2366
|
fieldset {
|
|
1950
2367
|
border: 0;
|
|
1951
2368
|
margin: 0;
|
|
@@ -1957,12 +2374,12 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1957
2374
|
}
|
|
1958
2375
|
.parts {
|
|
1959
2376
|
display: flex;
|
|
1960
|
-
gap: ${
|
|
2377
|
+
gap: ${r(3)};
|
|
1961
2378
|
}
|
|
1962
2379
|
.part {
|
|
1963
2380
|
display: flex;
|
|
1964
2381
|
flex-direction: column;
|
|
1965
|
-
gap: ${
|
|
2382
|
+
gap: ${r(1)};
|
|
1966
2383
|
}
|
|
1967
2384
|
.part label {
|
|
1968
2385
|
font-size: ${b("sm")};
|
|
@@ -1970,7 +2387,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1970
2387
|
}
|
|
1971
2388
|
input {
|
|
1972
2389
|
min-block-size: 44px;
|
|
1973
|
-
padding: ${
|
|
2390
|
+
padding: ${r(3)};
|
|
1974
2391
|
font-family: inherit;
|
|
1975
2392
|
font-size: ${b("md")};
|
|
1976
2393
|
color: ${t.text};
|
|
@@ -1978,52 +2395,52 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1978
2395
|
border: ${t.borderThin} solid ${t.border};
|
|
1979
2396
|
border-radius: ${t.radius};
|
|
1980
2397
|
/* Room for the digits plus the padding and border, so the box is never narrower than a finger. */
|
|
1981
|
-
inline-size: calc(3ch + ${
|
|
2398
|
+
inline-size: calc(3ch + ${r(6)} + 2px);
|
|
1982
2399
|
}
|
|
1983
2400
|
.year input {
|
|
1984
|
-
inline-size: calc(5ch + ${
|
|
2401
|
+
inline-size: calc(5ch + ${r(6)} + 2px);
|
|
1985
2402
|
}
|
|
1986
2403
|
:host([invalid]) input {
|
|
1987
2404
|
border-color: ${t.danger};
|
|
1988
2405
|
border-width: ${t.borderThick};
|
|
1989
2406
|
}
|
|
1990
|
-
`]}renderLabel(){return
|
|
1991
|
-
${this.label}${this.required?
|
|
1992
|
-
</legend>`}datePart(e,
|
|
2407
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
2408
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
2409
|
+
</legend>`}datePart(e,i,a,o){let d=this.id_(e);return s`
|
|
1993
2410
|
<div class="part ${e}">
|
|
1994
|
-
<label for=${d}>${
|
|
2411
|
+
<label for=${d}>${i}</label>
|
|
1995
2412
|
<input
|
|
1996
2413
|
id=${d}
|
|
1997
2414
|
type="text"
|
|
1998
2415
|
inputmode="numeric"
|
|
1999
|
-
maxlength=${
|
|
2416
|
+
maxlength=${a}
|
|
2000
2417
|
.value=${this[e]}
|
|
2001
2418
|
autocomplete=${this.autocompleteSection?`${this.autocompleteSection}-${o}`:l}
|
|
2002
2419
|
?disabled=${this.disabled}
|
|
2003
2420
|
@input=${c=>{this[e]=c.target.value,this.emit()}}
|
|
2004
2421
|
/>
|
|
2005
2422
|
</div>
|
|
2006
|
-
`}emit(){let
|
|
2423
|
+
`}emit(){let i=this.day&&this.month&&this.year.length===4?`${this.year}-${this.month.padStart(2,"0")}-${this.day.padStart(2,"0")}`:"";this.setFormValue(i)}renderControl(){return s`
|
|
2007
2424
|
<div class="parts" part="parts">
|
|
2008
|
-
${this.datePart("day",
|
|
2009
|
-
${this.datePart("month",
|
|
2010
|
-
${this.datePart("year",
|
|
2425
|
+
${this.datePart("day",T("Day"),2,"day")}
|
|
2426
|
+
${this.datePart("month",T("Month"),2,"month")}
|
|
2427
|
+
${this.datePart("year",T("Year"),4,"year")}
|
|
2011
2428
|
</div>
|
|
2012
|
-
`}render(){return
|
|
2429
|
+
`}render(){return s`
|
|
2013
2430
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
2014
2431
|
${this.renderLabel()}
|
|
2015
|
-
${this.description?
|
|
2432
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2016
2433
|
${this.renderControl()}
|
|
2017
2434
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2018
2435
|
</fieldset>
|
|
2019
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",
|
|
2436
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",dt);var me=new Set,ue=null;function ge(n){if(typeof document>"u"||me.has(n)||(me.add(n),me.size>1))return;let e=document.documentElement,i=window.innerWidth-e.clientWidth;ue={overflow:e.style.overflow,paddingRight:e.style.paddingRight},e.style.overflow="hidden",i>0&&(e.style.paddingRight=`${i}px`)}function Y(n){if(typeof document>"u"||!me.delete(n)||me.size>0||!ue)return;let e=document.documentElement;e.style.overflow=ue.overflow,e.style.paddingRight=ue.paddingRight,ue=null}var ct=class extends p{constructor(){super();this.hasFooter=!1;this.open=!1,this.heading="",this.closeLabel="Close",this.dismissible=!0,this.phoneFullScreen=!1,this.size="md",this.eyebrow=""}static{this.properties={open:{type:Boolean,reflect:!0},heading:{type:String},closeLabel:{type:String,attribute:"close-label"},dismissible:{type:Boolean},phoneFullScreen:{type:Boolean,reflect:!0,attribute:"phone-full-screen"},size:{type:String,reflect:!0},eyebrow:{type:String}}}static{this.styles=[...p.styles,k,A(".close"),h`
|
|
2020
2437
|
dialog {
|
|
2021
2438
|
padding: 0;
|
|
2022
|
-
border:
|
|
2439
|
+
border: ${t.borderThin} solid ${t.text};
|
|
2023
2440
|
border-radius: ${t.radius2xl};
|
|
2024
2441
|
background: ${t.surfaceCard};
|
|
2025
2442
|
color: ${t.text};
|
|
2026
|
-
box-shadow:
|
|
2443
|
+
box-shadow: var(--impakt-shadow-dialog, none);
|
|
2027
2444
|
max-inline-size: min(32rem, calc(100vw - 2rem));
|
|
2028
2445
|
/* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside
|
|
2029
2446
|
itself rather than clipping, at 320px and at 400% zoom alike. */
|
|
@@ -2031,25 +2448,61 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2031
2448
|
overflow: auto;
|
|
2032
2449
|
}
|
|
2033
2450
|
dialog::backdrop {
|
|
2034
|
-
|
|
2035
|
-
|
|
2451
|
+
/* The ink at half strength. The text colour is the paper in dark, so the backdrop is the ink there too. */
|
|
2452
|
+
background: rgb(17 17 17 / 0.5);
|
|
2453
|
+
}
|
|
2454
|
+
:host([size='lg']) dialog {
|
|
2455
|
+
inline-size: 720px;
|
|
2456
|
+
max-inline-size: calc(100vw - 2rem);
|
|
2457
|
+
}
|
|
2458
|
+
.titles {
|
|
2459
|
+
display: flex;
|
|
2460
|
+
flex-direction: column;
|
|
2461
|
+
gap: ${r(2)};
|
|
2462
|
+
min-inline-size: 0;
|
|
2463
|
+
}
|
|
2464
|
+
.eyebrow {
|
|
2465
|
+
margin: 0;
|
|
2466
|
+
font-family: ${t.fontMono};
|
|
2467
|
+
font-size: ${b("sm")};
|
|
2468
|
+
color: ${t.textMuted};
|
|
2469
|
+
}
|
|
2470
|
+
.foot {
|
|
2471
|
+
display: flex;
|
|
2472
|
+
flex-wrap: wrap;
|
|
2473
|
+
justify-content: flex-end;
|
|
2474
|
+
gap: ${r(3)};
|
|
2475
|
+
padding: ${r(5)} ${r(6)};
|
|
2476
|
+
border-block-start: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8);
|
|
2477
|
+
}
|
|
2478
|
+
.foot.empty {
|
|
2479
|
+
display: none;
|
|
2036
2480
|
}
|
|
2037
2481
|
.head {
|
|
2038
2482
|
display: flex;
|
|
2039
2483
|
align-items: flex-start;
|
|
2040
2484
|
justify-content: space-between;
|
|
2041
|
-
gap: ${
|
|
2042
|
-
padding: ${
|
|
2485
|
+
gap: ${r(3)};
|
|
2486
|
+
padding: ${r(6)} ${r(6)} 0;
|
|
2043
2487
|
}
|
|
2488
|
+
/* G2: about 32px, semibold, tight. */
|
|
2044
2489
|
.heading {
|
|
2045
2490
|
margin: 0;
|
|
2046
2491
|
font-family: ${t.fontHeading};
|
|
2047
|
-
font-size:
|
|
2048
|
-
|
|
2492
|
+
font-size: var(--impakt-type-heading-m-size, 2rem);
|
|
2493
|
+
line-height: 1.1;
|
|
2494
|
+
letter-spacing: -0.03em;
|
|
2495
|
+
font-weight: ${m("semibold")};
|
|
2049
2496
|
color: ${t.textHeading};
|
|
2050
2497
|
}
|
|
2051
2498
|
.body {
|
|
2052
|
-
padding: ${
|
|
2499
|
+
padding: ${r(4)} ${r(6)} ${r(6)};
|
|
2500
|
+
}
|
|
2501
|
+
@media (max-width: 40rem) {
|
|
2502
|
+
.heading { font-size: 1.5rem; }
|
|
2503
|
+
.head { padding: ${r(5)} ${r(5)} 0; }
|
|
2504
|
+
.body { padding: ${r(4)} ${r(5)} ${r(5)}; }
|
|
2505
|
+
.foot { padding: ${r(4)} ${r(5)}; }
|
|
2053
2506
|
}
|
|
2054
2507
|
@media (max-width: 40rem) {
|
|
2055
2508
|
:host([phone-full-screen]) dialog {
|
|
@@ -2062,7 +2515,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2062
2515
|
}
|
|
2063
2516
|
}
|
|
2064
2517
|
.close {
|
|
2065
|
-
${
|
|
2518
|
+
${z}
|
|
2066
2519
|
display: inline-flex;
|
|
2067
2520
|
align-items: center;
|
|
2068
2521
|
justify-content: center;
|
|
@@ -2075,33 +2528,39 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2075
2528
|
color: ${t.text};
|
|
2076
2529
|
cursor: pointer;
|
|
2077
2530
|
}
|
|
2078
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(
|
|
2531
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let a=this.dialog;a&&(this.open?(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""),ge(this)):(typeof a.close=="function"&&a.open?a.close():a.removeAttribute("open"),Y(this)))}disconnectedCallback(){super.disconnectedCallback(),Y(this)}onFooter(){let a=Array.from(this.renderRoot.querySelectorAll('slot[name="footer"], slot[name="actions"]')).some(o=>o.assignedElements({flatten:!0}).length>0);a!==this.hasFooter&&(this.hasFooter=a,this.requestUpdate())}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}render(){return s`
|
|
2079
2532
|
<dialog
|
|
2080
2533
|
part="dialog"
|
|
2081
2534
|
aria-labelledby=${this.heading?this.id_("heading"):l}
|
|
2082
|
-
@cancel=${
|
|
2535
|
+
@cancel=${i=>{this.dismissible?this.close():i.preventDefault()}}
|
|
2083
2536
|
@close=${()=>{this.open&&this.close()}}
|
|
2084
2537
|
>
|
|
2085
2538
|
<div class="head">
|
|
2086
|
-
|
|
2087
|
-
|
|
2539
|
+
<div class="titles">
|
|
2540
|
+
${this.eyebrow?s`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:l}
|
|
2541
|
+
${this.heading?s`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>`:l}
|
|
2542
|
+
</div>
|
|
2543
|
+
${this.dismissible?s`<button class="close" part="close" type="button" @click=${this.close}>
|
|
2088
2544
|
<span aria-hidden="true">×</span>
|
|
2089
2545
|
<span class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">${this.closeLabel}</span>
|
|
2090
2546
|
</button>`:l}
|
|
2091
2547
|
</div>
|
|
2092
2548
|
<div class="body" part="body"><slot></slot></div>
|
|
2549
|
+
<div class="foot ${this.hasFooter?"":"empty"}" part="footer">
|
|
2550
|
+
<slot name="footer" @slotchange=${this.onFooter}></slot><slot name="actions" @slotchange=${this.onFooter}></slot>
|
|
2551
|
+
</div>
|
|
2093
2552
|
</dialog>
|
|
2094
|
-
`}};customElements.define("impakt-dialog",
|
|
2553
|
+
`}};customElements.define("impakt-dialog",ct);var pt=class extends p{static{this.properties={items:{type:Array},look:{type:String,reflect:!0},size:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.items=[],this.look="bullet",this.size="md",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,h`
|
|
2095
2554
|
:host { display: block; }
|
|
2096
|
-
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${
|
|
2097
|
-
li { position: relative; padding-inline-start: ${
|
|
2098
|
-
:host([size='sm']) li { ${
|
|
2099
|
-
:host([size='lg']) li { ${
|
|
2555
|
+
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${r(3)}; counter-reset: point; }
|
|
2556
|
+
li { position: relative; padding-inline-start: ${r(7)}; ${w("md")} text-wrap: pretty; counter-increment: point; }
|
|
2557
|
+
:host([size='sm']) li { ${w("sm")} }
|
|
2558
|
+
:host([size='lg']) li { ${w("lg")} }
|
|
2100
2559
|
li::before { content: ''; position: absolute; inset-inline-start: 4px; inset-block-start: 0.6em; inline-size: 7px; block-size: 7px; border-radius: 2px; background: ${t.brand}; }
|
|
2101
2560
|
:host([look='check']) li::before { content: '✓'; inset-inline-start: 0; inset-block-start: 0; inline-size: auto; block-size: auto; background: none; color: ${t.success}; font-weight: ${m("bold")}; }
|
|
2102
2561
|
:host([look='number']) li::before { content: counter(point, decimal-leading-zero); inset-inline-start: 0; inset-block-start: 0.2em; inline-size: auto; block-size: auto; background: none; font-family: ${t.fontMono}; font-size: 0.75em; color: ${t.textMuted}; }
|
|
2103
2562
|
@media (forced-colors: active) { li::before { background: CanvasText; } :host([look='check']) li::before, :host([look='number']) li::before { background: none; color: CanvasText; } }
|
|
2104
|
-
`]}render(){let e=(this.items??[]).map(
|
|
2563
|
+
`]}render(){let e=(this.items??[]).map(i=>s`<li part="item">${i}</li>`);return this.look==="number"?s`<ol part="list">${e}</ol>`:s`<ul part="list" role="list">${e}</ul>`}};customElements.define("impakt-list",pt);var br={"2:1":"2fr 1fr","1:2":"1fr 2fr","3:1":"3fr 1fr","1:3":"1fr 3fr","1:2:1":"1fr 2fr 1fr","2:1:1":"2fr 1fr 1fr","1:1:2":"1fr 1fr 2fr"},ht=class extends p{static{this.properties={columns:{type:String,reflect:!0},widths:{type:String,reflect:!0},gap:{type:String,reflect:!0},stackOn:{type:String,reflect:!0,attribute:"stack-on"},align:{type:String,reflect:!0},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.columns="two",this.widths="equal",this.gap="md",this.stackOn="phone",this.align="stretch",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,h`
|
|
2105
2564
|
:host { display: block; min-inline-size: 0; container-type: inline-size; }
|
|
2106
2565
|
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u("layout.gutter.md","16px")}; align-items: stretch; }
|
|
2107
2566
|
:host([gap='none']) .columns { gap: 0; }
|
|
@@ -2120,7 +2579,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2120
2579
|
::slotted(*) { max-inline-size: 100%; }
|
|
2121
2580
|
@container (max-width: 40rem) { :host(:not([stack-on='never'])) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2122
2581
|
@container (max-width: 64rem) { :host([stack-on='tablet']) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2123
|
-
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,
|
|
2582
|
+
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,i=br[this.widths]?.split(" "),a=i&&i.length===e?i.map(o=>`minmax(0, ${o})`).join(" "):"";return s`<div class="columns" part="row" style=${a?`grid-template-columns: ${a}`:""}>${Array.from({length:e},(o,d)=>s`<div class="column" part="column"><slot name=${`column-${d+1}`}></slot></div>`)}</div>`}};customElements.define("impakt-grid",ht);var ut=class extends p{static{this.properties={mechanismId:{type:String,attribute:"mechanism-id"},kind:{type:String,reflect:!0},href:{type:String},label:{type:String},detail:{type:String}}}constructor(){super(),this.kind="link",this.href="",this.label="",this.detail=""}static{this.styles=[...p.styles,k,h`
|
|
2124
2583
|
:host { display: block; }
|
|
2125
2584
|
a { display: inline-flex; align-items: center; min-height: ${t.targetMin}; min-width: ${t.targetMin};
|
|
2126
2585
|
color: ${t.link}; text-decoration: underline; overflow-wrap: anywhere; max-width: 100%; }
|
|
@@ -2130,55 +2589,79 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2130
2589
|
/* An address is written one line at a time, and opening hours are often one
|
|
2131
2590
|
day to a line. Long unbroken values still wrap at 320px (1.4.10). */
|
|
2132
2591
|
.detail { white-space: pre-line; overflow-wrap: anywhere; }
|
|
2133
|
-
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return
|
|
2134
|
-
><span class="detail" part="detail" id=${d}>${e}</span></a>`:
|
|
2592
|
+
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return si(this.label)?s`<a part="link" href=${this.href}>${this.label}</a>`:l}renderContact(){let e=si(this.detail);if(!e)return l;let i=si(this.label),a=fr(this.kind,e),o=this.id_("caption"),d=this.id_("detail"),c=i?s`<span class="caption" part="label" id=${o}>${i}</span>`:l,$=a?s`<a part="link" href=${a} aria-labelledby=${i?`${o} ${d}`:l}
|
|
2593
|
+
><span class="detail" part="detail" id=${d}>${e}</span></a>`:s`<span class="detail" part="detail">${e}</span>`;return s`<p class="contact" part="contact">${c}${$}</p>`}};function si(n){return typeof n=="string"?n.trim():""}function fr(n,e){if(n==="phone"){let i=e.replace(/\(0\)/g,"").replace(/[^\d+]/g,"").replace(/(?!^)\+/g,"");return/\d/.test(i)?`tel:${i}`:""}return n==="email"&&/^[^\s@]+@[^\s@]+$/.test(e)?`mailto:${e}`:""}customElements.define("impakt-help",ut);var Di=h`
|
|
2135
2594
|
:host { --impakt-page-inner: ${u("layout.page-width","1200px")}; }
|
|
2136
2595
|
:host([width='narrow']) { --impakt-page-inner: 760px; }
|
|
2137
2596
|
:host([width='wide']) { --impakt-page-inner: 1440px; }
|
|
2138
|
-
|
|
2597
|
+
:host([width='content']) { --impakt-page-inner: 1080px; }
|
|
2598
|
+
`,$r=h`
|
|
2139
2599
|
:host { --impakt-page-margin: ${u("layout.margin.phone","16px")}; }
|
|
2140
2600
|
@container impakt-page (min-width: 40rem) { .frame { --impakt-page-margin: ${u("layout.margin.tablet","32px")}; } }
|
|
2141
2601
|
@container impakt-page (min-width: 64rem) { .frame { --impakt-page-margin: ${u("layout.margin.desktop","64px")}; } }
|
|
2142
|
-
`,
|
|
2602
|
+
`,mt=class extends p{constructor(){super();this.place=()=>{let i=this.querySelector('impakt-hero[treatment="cover"]'),a=getComputedStyle(this).getPropertyValue("--impakt-bleed").trim()==="0",o=!!i&&!a&&this.opensOn(i);if(this.toggleAttribute("floating",o),!o)return;let d=this.renderRoot.querySelector(".frame");d&&this.style.setProperty("--impakt-header-top",`${Math.round(i.getBoundingClientRect().top-d.getBoundingClientRect().top)}px`)};this.width="standard",this.stickyHeader=!1,this.skipText="Skip to content",this.noHeader=!1,this.noFooter=!1}static{this.properties={width:{type:String,reflect:!0},stickyHeader:{type:Boolean,reflect:!0,attribute:"sticky-header"},skipText:{type:String,attribute:"skip-text"},noHeader:{type:Boolean,reflect:!0,attribute:"no-header"},noFooter:{type:Boolean,reflect:!0,attribute:"no-footer"}}}static{this.styles=[...p.styles,k,Di,$r,h`
|
|
2143
2603
|
:host { display: block; container: impakt-page / inline-size; }
|
|
2144
2604
|
.frame { position: relative; display: flex; flex-direction: column; min-block-size: 100%; overflow-x: clip; }
|
|
2145
2605
|
.inner { box-sizing: border-box; inline-size: 100%; max-inline-size: calc(var(--impakt-page-inner) + 2 * var(--impakt-page-margin)); margin-inline: auto; padding-inline: var(--impakt-page-margin); }
|
|
2146
|
-
header { background: ${u("color.surface.header","transparent")}; color: ${u("color.text.on-header","inherit")}; padding-block: ${
|
|
2606
|
+
header { background: ${u("color.surface.header","transparent")}; color: ${u("color.text.on-header","inherit")}; padding-block: ${r(4)}; }
|
|
2147
2607
|
/* What sits in the header and footer takes their text colour, so words on a dark footer stay readable. */
|
|
2148
2608
|
header { --impakt-color-text-default: ${u("color.text.on-header","inherit")}; --impakt-color-text-heading: ${u("color.text.on-header","inherit")}; --impakt-color-text-link: ${u("color.text.on-header","inherit")}; --impakt-color-text-link-hover: ${u("color.text.on-header","inherit")}; }
|
|
2149
2609
|
footer { --impakt-color-text-default: ${u("color.text.on-footer","inherit")}; --impakt-color-text-heading: ${u("color.text.on-footer","inherit")}; --impakt-color-text-muted: ${u("color.text.on-footer","inherit")}; --impakt-color-text-link: ${u("color.text.on-footer","inherit")}; --impakt-color-text-link-hover: ${u("color.text.on-footer","inherit")}; }
|
|
2150
2610
|
:host([sticky-header]) header { position: sticky; inset-block-start: 0; z-index: 10; }
|
|
2151
|
-
main { flex: 1; padding-block: ${
|
|
2611
|
+
main { flex: 1; padding-block: ${r(6)} ${r(10)}; }
|
|
2152
2612
|
main:focus { outline: none; }
|
|
2153
2613
|
/* A page that opens on a full-picture hero: the header floats over it as a rounded bar. */
|
|
2154
|
-
:host([floating]) header { position: absolute; z-index: 20; inset-inline: 0; inset-block-start: var(--impakt-header-top, 0px); padding-block: ${
|
|
2155
|
-
:host([floating]) header .inner { inline-size: calc(100% - 2 * var(--impakt-page-margin)); max-inline-size: var(--impakt-page-inner); padding: ${
|
|
2614
|
+
:host([floating]) header { position: absolute; z-index: 20; inset-inline: 0; inset-block-start: var(--impakt-header-top, 0px); padding-block: ${r(6)} 0; background: transparent; border: 0; }
|
|
2615
|
+
:host([floating]) header .inner { inline-size: calc(100% - 2 * var(--impakt-page-margin)); max-inline-size: var(--impakt-page-inner); padding: ${r(3)} ${r(4)} ${r(3)} ${r(6)}; background: ${u("color.surface.header","#fff")}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; }
|
|
2156
2616
|
:host([floating]) main { padding-block-start: 0; }
|
|
2157
|
-
footer { background: ${u("color.surface.footer","transparent")}; color: ${u("color.text.on-footer","inherit")}; padding-block: ${
|
|
2158
|
-
.skip { position: absolute; inset-inline-start: ${
|
|
2617
|
+
footer { background: ${u("color.surface.footer","transparent")}; color: ${u("color.text.on-footer","inherit")}; padding-block: ${r(8)}; border-block-start: ${t.borderThin} solid ${u("color.border.subtle","transparent")}; }
|
|
2618
|
+
.skip { position: absolute; inset-inline-start: ${r(2)}; inset-block-start: ${r(2)}; z-index: 20; padding: ${r(2)} ${r(4)}; background: ${t.surfaceCard}; color: ${t.link}; border-radius: ${t.radius}; transform: translateY(-200%); }
|
|
2159
2619
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
2160
2620
|
.skip:focus { transform: none; }
|
|
2161
2621
|
.empty { display: none; }
|
|
2162
|
-
`]}hasSlot(
|
|
2622
|
+
`]}hasSlot(i){return(i==="header"?this.noHeader:this.noFooter)?!1:it?!0:Array.from(this.children).some(a=>a.getAttribute("slot")===i)}skip(i){i.preventDefault();let a=this.renderRoot.querySelector("main");a?.focus(),a?.scrollIntoView()}render(){let i=this.hasSlot("header"),a=this.hasSlot("footer");return s`<div class="frame" part="frame">
|
|
2163
2623
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
2164
|
-
${
|
|
2624
|
+
${i?s`<header part="header"><div class="inner"><slot name="header"></slot></div></header>`:l}
|
|
2165
2625
|
<main id="content" tabindex="-1" part="main"><div class="inner"><slot></slot></div></main>
|
|
2166
|
-
${
|
|
2167
|
-
</div>`}opensOn(
|
|
2626
|
+
${a?s`<footer part="footer"><div class="inner"><slot name="footer"></slot></div></footer>`:l}
|
|
2627
|
+
</div>`}opensOn(i){for(let a of Array.from(this.querySelectorAll("*"))){if(a===i)return!0;if(!a.closest('[slot="header"],[slot="footer"]')&&a.tagName.startsWith("IMPAKT-")&&!/^IMPAKT-(STACK|SECTION|GRID|ANNOUNCEMENT)$/.test(a.tagName))return!1}return!1}connectedCallback(){super.connectedCallback(),this.observer=new MutationObserver(()=>this.requestUpdate()),this.observer.observe(this,{childList:!0,attributes:!0,subtree:!1,attributeFilter:["slot"]}),this.watcher=new MutationObserver(this.place),this.watcher.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["treatment"]}),typeof ResizeObserver=="function"&&(this.resize=new ResizeObserver(this.place),this.resize.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect(),this.watcher?.disconnect(),this.resize?.disconnect()}firstUpdated(){this.place()}},gt=class extends p{static{this.properties={tone:{type:String,reflect:!0},padding:{type:String,reflect:!0},width:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},pattern:{type:String,reflect:!0},label:{type:String},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.tone="none",this.padding="lg",this.width="standard",this.bleed=!0,this.pattern="none",this.label="",this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,Di,h`
|
|
2168
2628
|
:host { display: block; --impakt-page-margin: inherit; }
|
|
2169
2629
|
/* What a solid card on a brand band goes back to, since the band repaints these for its own text. */
|
|
2170
2630
|
:host([tone='brand']) { --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
2171
2631
|
.band { box-sizing: border-box; border-radius: ${t.radiusLg}; }
|
|
2172
2632
|
/* --impakt-bleed is 0 while editing, so a full-width block stays inside the box it is being edited in. */
|
|
2173
|
-
:host([bleed]) .band { border-radius: 0; margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding-inline: max(${
|
|
2633
|
+
:host([bleed]) .band { border-radius: 0; margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding-inline: max(${r(4)}, calc(var(--impakt-bleed, 1) * (50vw - 50%))); }
|
|
2174
2634
|
:host([tone='subtle']) .band { background: ${t.surfaceSubtle}; }
|
|
2175
2635
|
:host([tone='inset']) .band { background: ${t.surfaceInset}; }
|
|
2176
2636
|
:host([tone='card']) .band { background: ${t.surfaceCard}; }
|
|
2637
|
+
:host([tone='board']) .band { background: var(--impakt-color-surface-board, var(--ik-surface-board, #e3e2dd)); }
|
|
2638
|
+
/*
|
|
2639
|
+
* A toned band sets what a button and a solid mark on it need, and resets what
|
|
2640
|
+
* an outer band set, so a band inside another one, or a banner inside a band,
|
|
2641
|
+
* never draws with colours meant for the band round it. --impakt-color-text-inverse
|
|
2642
|
+
* is the colour that reads on the band's text colour: a dark button's words.
|
|
2643
|
+
*/
|
|
2644
|
+
:host(:not([tone='none'])) .band { --impakt-button-primary: initial; --impakt-button-on-primary: initial; --impakt-button-primary-hover: initial; --impakt-color-text-inverse: initial; }
|
|
2645
|
+
:host([tone='brand']) .band { --impakt-color-text-inverse: ${t.brand}; }
|
|
2646
|
+
:host([tone='accent']) .band { --impakt-color-text-inverse: var(--impakt-solid-card); }
|
|
2177
2647
|
:host([tone='brand']) .band { background: ${t.brand}; color: ${t.onBrand}; --impakt-eyebrow: ${t.onBrand}; --impakt-color-surface-card: color-mix(in srgb, ${t.onBrand} 10%, transparent); --impakt-color-text-heading: ${t.onBrand}; --impakt-color-text-default: ${t.onBrand}; --impakt-color-text-muted: ${t.onBrand}; --impakt-color-text-link: ${t.onBrand}; --impakt-color-text-link-hover: ${t.onBrand}; }
|
|
2178
2648
|
/* Ink and accent bands take their colours from the host, because the band repaints the text colour for what is inside it. */
|
|
2179
2649
|
:host([tone='ink']) { --impakt-band: ${t.text}; --impakt-band-on: ${t.surfaceCard}; --impakt-band-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
2180
2650
|
:host([tone='accent']) { --impakt-band: ${u("color.accent.default","#ffd43b")}; --impakt-band-on: ${u("color.accent.on","#1a1a1a")}; --impakt-band-muted: ${u("color.accent.on","#1a1a1a")}; --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
2181
2651
|
:host(:is([tone='ink'], [tone='accent'])) .band { background-color: var(--impakt-band); color: var(--impakt-band-on); --impakt-eyebrow: var(--impakt-band-muted); --impakt-color-surface-card: color-mix(in srgb, var(--impakt-band-on) 10%, transparent); --impakt-color-text-heading: var(--impakt-band-on); --impakt-color-text-default: var(--impakt-band-on); --impakt-color-text-muted: var(--impakt-band-muted); --impakt-color-text-link: var(--impakt-band-on); --impakt-color-text-link-hover: var(--impakt-band-on); }
|
|
2652
|
+
/* On ink the cards are the raised ink with a darker rule (G2 ink-raised and line-inverse), not a wash. */
|
|
2653
|
+
:host([tone='ink']) .band {
|
|
2654
|
+
--impakt-color-text-inverse: var(--impakt-band);
|
|
2655
|
+
--impakt-button-primary: var(--impakt-band-on);
|
|
2656
|
+
--impakt-button-on-primary: var(--impakt-band);
|
|
2657
|
+
--impakt-button-primary-hover: color-mix(in srgb, var(--impakt-band-on) 86%, var(--impakt-band));
|
|
2658
|
+
/* Mixed from the band, so it is #1C1C1C on light ink and still a step off the band when dark turns the band over. */
|
|
2659
|
+
--impakt-color-surface-card: color-mix(in srgb, var(--impakt-band) 95%, var(--impakt-band-on));
|
|
2660
|
+
--impakt-color-line-soft: color-mix(in srgb, var(--impakt-band) 87%, var(--impakt-band-on));
|
|
2661
|
+
/* The accent reads on light-theme ink only; the theme leaves it unset in dark, where the band turns paper. */
|
|
2662
|
+
--impakt-site-menu-current: var(--impakt-color-accent-on-ink, currentColor);
|
|
2663
|
+
--impakt-steps-current: var(--impakt-color-accent-on-ink, currentColor);
|
|
2664
|
+
}
|
|
2182
2665
|
/* The lines are a tenth of the band's own text colour, so they suit any tone. They carry no meaning. */
|
|
2183
2666
|
:host([pattern]:not([pattern='none'])) .band { --impakt-pattern-line: color-mix(in srgb, currentColor 10%, transparent); }
|
|
2184
2667
|
:host(:is([pattern='grid'], [pattern='blueprint'])) .band { background-image: linear-gradient(to right, var(--impakt-pattern-line) 1px, transparent 1px), linear-gradient(to bottom, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 7rem 7rem; }
|
|
@@ -2186,125 +2669,169 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2186
2669
|
:host([pattern='columns']) .band { background-image: linear-gradient(to right, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 5.625rem 100%; }
|
|
2187
2670
|
:host([pattern='ruled']) .band { background-image: linear-gradient(to bottom, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 100% 2.5rem; }
|
|
2188
2671
|
@media (forced-colors: active) { .band { background-image: none !important; } }
|
|
2189
|
-
:host(:not([bleed]):not([tone='none'])) .band { padding-inline: ${
|
|
2190
|
-
:host([padding='sm']) .band { padding-block: ${
|
|
2191
|
-
:host([padding='md']) .band { padding-block: ${
|
|
2192
|
-
:host([padding='lg']) .band { padding-block: ${
|
|
2193
|
-
:host([padding='xl']) .band { padding-block: ${
|
|
2194
|
-
:host([padding='2xl']) .band { padding-block: clamp(${
|
|
2672
|
+
:host(:not([bleed]):not([tone='none'])) .band { padding-inline: ${r(6)}; }
|
|
2673
|
+
:host([padding='sm']) .band { padding-block: ${r(4)}; }
|
|
2674
|
+
:host([padding='md']) .band { padding-block: ${r(8)}; }
|
|
2675
|
+
:host([padding='lg']) .band { padding-block: ${r(12)}; }
|
|
2676
|
+
:host([padding='xl']) .band { padding-block: ${r(16)}; }
|
|
2677
|
+
:host([padding='2xl']) .band { padding-block: clamp(${r(14)}, 8vw, ${r(28)}); }
|
|
2678
|
+
:host([padding='3xl']) .band { padding-block: clamp(${r(16)}, 10vw, ${r(30)}); }
|
|
2195
2679
|
.content { max-inline-size: var(--impakt-page-inner); margin-inline: auto; }
|
|
2196
|
-
`]}render(){return
|
|
2680
|
+
`]}render(){return s`<section class="band" part="band" aria-label=${this.label||l} role=${this.label?l:"presentation"}><div class="content" part="content"><slot></slot></div></section>`}};customElements.define("impakt-page",mt);customElements.define("impakt-section",gt);function Fi(n){if(typeof location>"u"||!n||n.startsWith("#"))return null;let e;try{let a=new URL(n,location.href);if(a.origin!==location.origin)return null;e=a.pathname.replace(/\/$/,"")||"/"}catch{return null}let i=location.pathname.replace(/\/$/,"")||"/";return e===i?"page":e!=="/"&&i.startsWith(`${e}/`)?"section":null}var bt=class extends p{constructor(){super();this.menuOpen=!1;this.needs=0;this.links=[],this.label="Main",this.menuText="Menu",this.menuLook="button",this.size="md",this.align="end",this.fold="measure",this.actionText="",this.actionHref="",this.look="links",this.current=""}static{this.properties={links:{type:Array},label:{type:String},menuText:{type:String,attribute:"menu-text"},menuLook:{type:String,reflect:!0,attribute:"menu-look"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},fold:{type:String,reflect:!0},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"},look:{type:String,reflect:!0},current:{type:String}}}get open(){return this.menuOpen}set open(i){this.menuOpen=i,this.requestUpdate()}static{this.styles=[...p.styles,k,h`
|
|
2197
2681
|
/* It grows to fill a row it sits in, because it measures itself to decide when to fold. */
|
|
2198
2682
|
:host { display: block; flex: 1 1 8rem; min-inline-size: 0; }
|
|
2199
2683
|
nav { display: flex; flex-direction: column; position: relative; }
|
|
2200
2684
|
li { flex: none; }
|
|
2201
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
2685
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${r(1)} ${r(6)}; align-items: center; justify-content: flex-end; }
|
|
2202
2686
|
:host([align='start']) ul { justify-content: flex-start; }
|
|
2203
2687
|
:host([align='center']) ul { justify-content: center; }
|
|
2204
|
-
a { ${
|
|
2688
|
+
a { ${z} display: inline-flex; align-items: center; padding: ${r(2)} ${r(1)}; color: inherit; font-weight: ${m("semibold")}; text-decoration: none; border-radius: ${t.radiusSm}; }
|
|
2205
2689
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
2206
2690
|
a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
|
|
2207
|
-
.toggle { display: none; ${
|
|
2691
|
+
.toggle { display: none; ${z} align-items: center; gap: ${r(2)}; align-self: flex-end; padding: ${r(2)} ${r(3)}; font: inherit; font-weight: ${m("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
2208
2692
|
/* When they do not fit, the links fold behind a Menu button and open as a panel under it. */
|
|
2209
2693
|
:host([folded]) { flex: 0 0 auto; }
|
|
2210
2694
|
:host([folded]) .toggle { display: inline-flex; }
|
|
2211
2695
|
:host([menu-look='icon']) .toggle { inline-size: 44px; block-size: 44px; padding: 0; justify-content: center; border: 0; border-radius: 50%; background: ${t.brand}; color: ${t.onBrand}; }
|
|
2212
2696
|
:host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
2213
|
-
:host([size='sm']) ul { column-gap: ${
|
|
2697
|
+
:host([size='sm']) ul { column-gap: ${r(6)}; }
|
|
2214
2698
|
:host([size='sm']) a { padding-inline: 0; font-size: ${b("sm")}; font-weight: ${m("medium")}; }
|
|
2215
|
-
:host([size='sm'][folded]) a { padding-inline: ${
|
|
2216
|
-
:host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${
|
|
2699
|
+
:host([size='sm'][folded]) a { padding-inline: ${r(3)}; }
|
|
2700
|
+
:host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${r(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${r(2)}; background: ${t.surfaceCard}; color: ${t.text}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); }
|
|
2217
2701
|
:host([folded]) ul.open { display: flex; }
|
|
2218
2702
|
:host([folded]) li { text-align: start; }
|
|
2219
|
-
:host([folded]) a { display: flex; padding: ${
|
|
2703
|
+
:host([folded]) a { display: flex; padding: ${r(3)} ${r(3)}; }
|
|
2704
|
+
/* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */
|
|
2705
|
+
:host([look='tabs']) ul { gap: 0; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }
|
|
2706
|
+
:host([look='tabs']) a { min-block-size: 42px; gap: ${r(2)}; padding: 0 ${r(4)}; font-size: ${b("sm")}; font-weight: ${m("regular")}; border-radius: 0; }
|
|
2707
|
+
:host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; }
|
|
2708
|
+
:host([look='tabs']) a[aria-current] { text-decoration: none; background: ${t.surfaceCard}; box-shadow: inset 0 0 0 1px var(--impakt-color-line-soft, #dcdcd8); }
|
|
2709
|
+
:host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
|
|
2710
|
+
@media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }
|
|
2711
|
+
:host([look='tabs'][folded]) ul { padding: ${r(2)}; }
|
|
2220
2712
|
/* With no script the element is never defined, so it cannot measure itself and fold. The links
|
|
2221
2713
|
wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */
|
|
2222
2714
|
:host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2715
|
+
/*
|
|
2716
|
+
* fold="narrow": the fold is decided here, by the width of the container around the nav, so it
|
|
2717
|
+
* is the same before the script runs, after it, and without it. The Menu button opens the
|
|
2718
|
+
* panel as a popover, which the browser does by itself. On a wide screen the panel is not a box
|
|
2719
|
+
* at all, and its links sit in the row as they always did.
|
|
2720
|
+
*/
|
|
2721
|
+
:host([fold='narrow']) .panel { display: contents; color: inherit; }
|
|
2722
|
+
:host([fold='narrow']) .close, :host([fold='narrow']) .action { display: none; }
|
|
2723
|
+
@container (max-width: 40rem) {
|
|
2724
|
+
:host([fold='narrow']) { flex: 0 0 auto; }
|
|
2725
|
+
:host([fold='narrow']) .toggle { display: inline-flex; }
|
|
2726
|
+
:host([fold='narrow']) .panel { display: none; }
|
|
2727
|
+
:host([fold='narrow']) .panel:popover-open { display: flex; flex-direction: column; gap: ${r(6)}; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: ${r(3)} ${r(4)} calc(${r(6)} + env(safe-area-inset-bottom)); border: 0; overflow: auto; overscroll-behavior: contain; background: ${t.text}; color: ${t.surfaceCard}; }
|
|
2728
|
+
:host([fold='narrow']) .close { display: inline-flex; ${z} align-items: center; gap: ${r(2)}; align-self: flex-end; padding: ${r(2)} ${r(3)}; font: inherit; font-weight: ${m("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
2729
|
+
:host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
|
|
2730
|
+
:host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }
|
|
2731
|
+
:host([fold='narrow']) li a { display: flex; padding: ${r(4)} 0; font-family: ${t.fontHeading}; font-size: ${b("2xl")}; font-weight: ${m("semibold")}; letter-spacing: -0.02em; }
|
|
2732
|
+
:host([fold='narrow']) .action { display: flex; ${z} align-items: center; justify-content: center; margin-block-start: auto; padding: ${r(3)} ${r(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${m("semibold")}; text-decoration: none; border-radius: ${t.radius}; }
|
|
2733
|
+
:host([fold='narrow']) .action:hover { text-decoration: underline; }
|
|
2734
|
+
}
|
|
2735
|
+
`]}fit(){if(this.fold==="narrow"){this.removeAttribute("folded");return}if(!this.hasUpdated)return;let i=this.getBoundingClientRect().width;if(i<=0)return;if(!this.needs){this.removeAttribute("folded");let o=Array.from(this.renderRoot.querySelectorAll("li")),d=Number.parseFloat(getComputedStyle(this.renderRoot.querySelector("ul")).columnGap)||0;this.needs=o.reduce((c,$)=>c+$.getBoundingClientRect().width,0)+d*Math.max(0,o.length-1)}let a=this.needs>i;this.toggleAttribute("folded",a),!a&&this.menuOpen&&(this.open=!1)}updated(i){(i.has("links")||i.has("fold"))&&(this.needs=0,this.fit())}connectedCallback(){super.connectedCallback(),typeof ResizeObserver=="function"&&(this.resize=new ResizeObserver(()=>this.fit()),this.resize.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resize?.disconnect()}toggle(){this.open=!this.open}onKey(i){i.key!=="Escape"||!this.open||(this.open=!1,this.renderRoot.querySelector(".toggle")?.focus())}renderNarrow(){let i=this.id_("panel");return s`<nav aria-label=${this.label||l} part="nav">
|
|
2736
|
+
<button class="toggle" type="button" popovertarget=${i}>${M(this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2737
|
+
<div id=${i} class="panel" popover="auto" part="panel">
|
|
2738
|
+
<button class="close" type="button" popovertarget=${i} popovertargetaction="hide">${M("close")}<span>${T("Close")}</span></button>
|
|
2739
|
+
<ul part="list">
|
|
2740
|
+
${(this.links??[]).map(a=>{let o=this.current?a.href===this.current?"page":null:Fi(a.href);return s`<li><a href=${a.href} aria-current=${o==="page"?"page":o==="section"?"true":l} part="link">${a.label}</a></li>`})}
|
|
2741
|
+
</ul>
|
|
2742
|
+
${this.actionText?s`<a class="action" href=${this.actionHref||"#"} part="action">${this.actionText}</a>`:l}
|
|
2743
|
+
</div>
|
|
2744
|
+
</nav>`}render(){if(this.fold==="narrow")return this.renderNarrow();let i=this.id_("links");return s`<nav aria-label=${this.label||l} part="nav" @keydown=${this.onKey}>
|
|
2745
|
+
<button class="toggle" type="button" aria-expanded=${this.open?"true":"false"} aria-controls=${i} @click=${this.toggle}>${M(this.open?"close":this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2746
|
+
<ul id=${i} class=${this.open?"open":""} part="list">
|
|
2747
|
+
${(this.links??[]).map(a=>{let o=this.current?a.href===this.current?"page":null:Fi(a.href);return s`<li><a href=${a.href} aria-current=${o==="page"?"page":o==="section"?"true":l} part="link">${a.label}</a></li>`})}
|
|
2227
2748
|
</ul>
|
|
2228
|
-
</nav>`}},
|
|
2749
|
+
</nav>`}},ft=class extends p{static{this.properties={items:{type:Array},label:{type:String},look:{type:String,reflect:!0}}}constructor(){super(),this.items=[],this.label="Breadcrumb",this.look="default"}static{this.styles=[...p.styles,k,h`
|
|
2229
2750
|
:host { display: block; font-size: ${b("sm")}; }
|
|
2230
|
-
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${
|
|
2231
|
-
li { display: inline-flex; align-items: center; gap: ${
|
|
2232
|
-
li + li::before { content: ''; inline-size: 0.45em; block-size: 0.45em; border-block-start: 1.5px solid ${t.textMuted}; border-inline-end: 1.5px solid ${t.textMuted}; transform: rotate(45deg); margin-inline: ${
|
|
2751
|
+
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${r(1)}; }
|
|
2752
|
+
li { display: inline-flex; align-items: center; gap: ${r(1)}; }
|
|
2753
|
+
li + li::before { content: ''; inline-size: 0.45em; block-size: 0.45em; border-block-start: 1.5px solid ${t.textMuted}; border-inline-end: 1.5px solid ${t.textMuted}; transform: rotate(45deg); margin-inline: ${r(1)} ${r(2)}; }
|
|
2233
2754
|
a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }
|
|
2234
2755
|
a:hover { color: ${t.linkHover}; }
|
|
2235
2756
|
[aria-current] { color: ${t.textMuted}; }
|
|
2236
|
-
.
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2757
|
+
:host([look='mono']) { font-family: ${t.fontMono}; font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
2758
|
+
/* The G2 trail (34:602): "Home / Tools / Accessibility", a slash between, the links underlined only on hover. A trail is its own list, not a link in a sentence, so it needs no underline to be told apart (1.4.1). */
|
|
2759
|
+
:host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }
|
|
2760
|
+
:host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }
|
|
2761
|
+
:host([look='mono']) [aria-current] { color: ${t.text}; }
|
|
2762
|
+
:host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${r(1)}; color: ${t.textMuted}; }
|
|
2763
|
+
.sr-only { ${S} }
|
|
2764
|
+
`]}render(){let e=this.items??[];return s`<nav aria-label=${this.label} part="nav"><ol>
|
|
2765
|
+
${e.map((i,a)=>s`<li>${a===e.length-1?s`<span aria-current="page">${i.label}</span>`:s`<a href=${i.href} part="link">${i.label}</a>`}</li>`)}
|
|
2766
|
+
</ol></nav>`}};customElements.define("impakt-nav",bt);customElements.define("impakt-breadcrumbs",ft);var $t=class extends p{static{this.properties={spacing:{type:String,reflect:!0},tone:{type:String,reflect:!0}}}constructor(){super(),this.spacing="md",this.tone="subtle"}static{this.styles=[...p.styles,h`
|
|
2240
2767
|
:host { display: block; }
|
|
2241
|
-
hr { margin: ${
|
|
2768
|
+
hr { margin: ${r(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }
|
|
2242
2769
|
:host([tone='strong']) hr { opacity: 1; border-block-start-width: ${t.borderThick}; }
|
|
2243
|
-
:host([spacing='sm']) hr { margin-block: ${
|
|
2244
|
-
:host([spacing='lg']) hr { margin-block: ${
|
|
2245
|
-
:host([spacing='xl']) hr { margin-block: ${
|
|
2246
|
-
`]}render(){return
|
|
2247
|
-
:host { display: block; block-size: ${
|
|
2248
|
-
:host([size='sm']) { block-size: ${
|
|
2249
|
-
:host([size='lg']) { block-size: ${
|
|
2250
|
-
:host([size='xl']) { block-size: ${
|
|
2251
|
-
:host([size='2xl']) { block-size: ${
|
|
2252
|
-
`]}render(){return
|
|
2770
|
+
:host([spacing='sm']) hr { margin-block: ${r(2)}; }
|
|
2771
|
+
:host([spacing='lg']) hr { margin-block: ${r(8)}; }
|
|
2772
|
+
:host([spacing='xl']) hr { margin-block: ${r(12)}; }
|
|
2773
|
+
`]}render(){return s`<hr aria-hidden="true" part="line" />`}},xt=class extends p{static{this.properties={size:{type:String,reflect:!0}}}constructor(){super(),this.size="md"}static{this.styles=[...p.styles,h`
|
|
2774
|
+
:host { display: block; block-size: ${r(4)}; }
|
|
2775
|
+
:host([size='sm']) { block-size: ${r(2)}; }
|
|
2776
|
+
:host([size='lg']) { block-size: ${r(8)}; }
|
|
2777
|
+
:host([size='xl']) { block-size: ${r(12)}; }
|
|
2778
|
+
:host([size='2xl']) { block-size: ${r(16)}; }
|
|
2779
|
+
`]}render(){return s``}},yt=class extends p{static{this.styles=[...p.styles,h`:host { ${S} }`]}render(){return s`<slot></slot>`}},kt=class extends p{static{this.properties={items:{type:Array},selected:{type:String,reflect:!0},label:{type:String},twoRows:{type:Boolean,reflect:!0,attribute:"two-rows"},look:{type:String,reflect:!0}}}constructor(){super(),this.items=[],this.selected="",this.label="",this.twoRows=!1,this.look="line"}static{this.styles=[...p.styles,k,A("[role='tab']"),h`
|
|
2253
2780
|
/* Only the two-row layout needs a size container. Making every tab set one
|
|
2254
2781
|
would take its width from its parent alone, so in a flex row, with no
|
|
2255
2782
|
width given, it would shrink to nothing. In a row it may still shrink
|
|
2256
2783
|
below its tabs, which then scroll, rather than widen the page. */
|
|
2257
2784
|
:host { display: block; min-inline-size: 0; }
|
|
2258
2785
|
:host([two-rows]) { container-type: inline-size; }
|
|
2259
|
-
[role='tablist'] { display: flex; gap: ${
|
|
2260
|
-
[role='tab'] { ${
|
|
2786
|
+
[role='tablist'] { display: flex; gap: ${r(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2787
|
+
[role='tab'] { ${z} position: relative; flex: none; padding: ${r(3)} ${r(4)}; font: inherit; font-weight: ${m("semibold")}; white-space: nowrap; color: ${t.textMuted}; background: transparent; border: 0; border-block-end: 3px solid transparent; margin-block-end: -1px; cursor: pointer; border-radius: ${t.radius} ${t.radius} 0 0; }
|
|
2261
2788
|
/* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */
|
|
2262
2789
|
[role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }
|
|
2263
2790
|
[role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2264
2791
|
[role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2265
|
-
[role='tabpanel'] { padding-block: ${
|
|
2792
|
+
[role='tabpanel'] { padding-block: ${r(5)}; line-height: ${H("normal")}; }
|
|
2266
2793
|
.body { white-space: pre-line; }
|
|
2267
2794
|
@container (max-width: 40rem) {
|
|
2268
|
-
:host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${
|
|
2269
|
-
:host([two-rows]) .many [role='tab'] { white-space: normal; padding-inline: ${
|
|
2795
|
+
:host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${r(1)}; }
|
|
2796
|
+
:host([two-rows]) .many [role='tab'] { white-space: normal; padding-inline: ${r(2)}; margin: 0; border-block-end-width: 3px; border-block-end-color: ${t.rule}; border-radius: ${t.radius}; }
|
|
2270
2797
|
:host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }
|
|
2271
2798
|
}
|
|
2272
2799
|
@media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }
|
|
2273
|
-
.count { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 20px; block-size: 20px; margin-inline-start: ${
|
|
2274
|
-
.sr-only { ${
|
|
2800
|
+
.count { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 20px; block-size: 20px; margin-inline-start: ${r(2)}; padding: 0 ${r(1.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-size: 12px; font-weight: ${m("semibold")}; background: ${t.brand}; color: ${t.onBrand}; font-variant-numeric: tabular-nums; }
|
|
2801
|
+
.sr-only { ${S} }
|
|
2275
2802
|
/* Links drawn as tabs. */
|
|
2276
|
-
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
2277
|
-
nav a { ${
|
|
2803
|
+
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${r(1)}; overflow-x: auto; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2804
|
+
nav a { ${z} position: relative; display: inline-flex; align-items: center; flex: none; padding: ${r(3)} ${r(4)}; font-weight: ${m("semibold")}; white-space: nowrap; color: ${t.textMuted}; text-decoration: none; border-block-end: 3px solid transparent; margin-block-end: -1px; border-radius: ${t.radius} ${t.radius} 0 0; }
|
|
2278
2805
|
nav a:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2279
2806
|
nav a[aria-current='page'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2280
2807
|
nav a:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; outline: none; }
|
|
2281
|
-
/* The pill look, for either kind. */
|
|
2282
|
-
:host([look='pill']) :is([role='tablist'], nav ul) { padding: ${
|
|
2283
|
-
:host([look='pill']) :is([role='tab'], nav a) { padding: ${
|
|
2808
|
+
/* The pill look, for either kind. Its corners come from the brand's radius, so it is square under Noire. */
|
|
2809
|
+
:host([look='pill']) :is([role='tablist'], nav ul) { padding: ${r(1)}; border: 0; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); background: ${t.surfaceCard}; gap: ${r(.5)}; }
|
|
2810
|
+
:host([look='pill']) :is([role='tab'], nav a) { padding: ${r(2)} ${r(4)}; margin: 0; border: 0; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-weight: ${m("medium")}; color: ${t.text}; }
|
|
2284
2811
|
:host([look='pill']) :is([role='tab'], nav a):hover { background: ${t.surfaceInset}; }
|
|
2285
|
-
:host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { background: ${t.text}; color: ${t.surfaceCard}; }
|
|
2812
|
+
:host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { background: ${t.text}; color: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); }
|
|
2286
2813
|
@media (forced-colors: active) { :host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { border: 2px solid Highlight; } }
|
|
2287
|
-
`]}countOf(e){return typeof e.count!="number"?l:e.countLabel?
|
|
2288
|
-
${e.map(o=>
|
|
2289
|
-
</ul></nav>`;let
|
|
2290
|
-
${e.map(o=>
|
|
2814
|
+
`]}countOf(e){return typeof e.count!="number"?l:e.countLabel?s`<span class="count" aria-hidden="true">${e.count}</span><span class="sr-only">, ${e.countLabel}</span>`:s`<span class="count">${e.count}</span>`}get linked(){let e=this.items??[];return e.length>0&&e.every(i=>!!i.href)}current(){let e=this.items??[];return e.some(i=>i.id===this.selected)?this.selected:e[0]?.id??""}choose(e,i){e!==this.current()&&(this.selected=e,this.dispatchEvent(new CustomEvent("impakt-change",{detail:{value:e},bubbles:!0,composed:!0})),i&&this.updateComplete.then(()=>this.renderRoot.querySelector(`#${this.id_(`tab-${e}`)}`)?.focus({preventScroll:!0})))}onKey(e){let i=this.items??[],a=i.findIndex(d=>d.id===this.current()),o={ArrowRight:a+1,ArrowLeft:a-1,Home:0,End:i.length-1}[e.key];o===void 0||!i.length||(e.preventDefault(),this.choose(i[(o+i.length)%i.length].id,!0))}reveal(){let e=this.renderRoot.querySelector("[role='tablist']"),i=this.renderRoot.querySelector("[role='tab'][aria-selected='true']");if(!e||!i||e.scrollWidth<=e.clientWidth)return;let a=i.offsetLeft-e.offsetLeft,o=a+i.offsetWidth;a<e.scrollLeft?e.scrollLeft=a-16:o>e.scrollLeft+e.clientWidth&&(e.scrollLeft=o-e.clientWidth+16)}updated(e){(e.has("selected")||e.has("items"))&&this.reveal()}render(){let e=this.items??[],i=this.current();if(this.linked)return s`<nav aria-label=${this.label||l} part="tabs"><ul>
|
|
2815
|
+
${e.map(o=>s`<li><a href=${o.href} part="tab" aria-current=${o.id===i?"page":l} @click=${d=>de(this,d,{href:o.href,id:o.id})}>${o.label}${this.countOf(o)}</a></li>`)}
|
|
2816
|
+
</ul></nav>`;let a=e.length>4;return s`<div role="tablist" aria-label=${this.label||l} part="tabs" class=${a?"many":""} style=${a?`--columns:${Math.ceil(e.length/2)}`:l} @keydown=${this.onKey}>
|
|
2817
|
+
${e.map(o=>s`<button role="tab" type="button" id=${this.id_(`tab-${o.id}`)} aria-selected=${o.id===i?"true":"false"} aria-controls=${this.id_(`panel-${o.id}`)} tabindex=${o.id===i?"0":"-1"} @click=${()=>this.choose(o.id,!1)}>${o.label}${this.countOf(o)}</button>`)}
|
|
2291
2818
|
</div>
|
|
2292
|
-
${e.map(o=>
|
|
2293
|
-
:host { display: block; margin-block-end: ${
|
|
2819
|
+
${e.map(o=>s`<div role="tabpanel" id=${this.id_(`panel-${o.id}`)} aria-labelledby=${this.id_(`tab-${o.id}`)} tabindex="0" ?hidden=${o.id!==i} part="panel"><slot name=${o.id}><span class="body">${o.body??""}</span></slot></div>`)}`}};customElements.define("impakt-divider",$t);customElements.define("impakt-spacer",xt);customElements.define("impakt-visually-hidden",yt);customElements.define("impakt-tabs",kt);var vt=class extends p{static{this.properties={legend:{type:String},description:{type:String},error:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.legend="",this.description="",this.error="",this.size="md"}static{this.styles=[...p.styles,h`
|
|
2820
|
+
:host { display: block; margin-block-end: ${r(6)}; }
|
|
2294
2821
|
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
|
|
2295
|
-
legend { padding: 0; margin-block-end: ${
|
|
2822
|
+
legend { padding: 0; margin-block-end: ${r(2)}; font-size: ${b("md")}; font-weight: ${m("bold")}; line-height: ${H("tight")}; color: ${t.text}; }
|
|
2296
2823
|
:host([size='lg']) legend { font-size: ${b("xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
2297
2824
|
:host([size='xl']) legend { font-size: ${b("2xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
2298
|
-
.description { margin-block-end: ${
|
|
2299
|
-
.error { margin-block-end: ${
|
|
2825
|
+
.description { margin-block-end: ${r(3)}; font-size: ${b("sm")}; color: ${t.textMuted}; line-height: ${H("normal")}; }
|
|
2826
|
+
.error { margin-block-end: ${r(3)}; font-size: ${b("sm")}; color: ${t.dangerText}; font-weight: ${m("semibold")}; }
|
|
2300
2827
|
.error:empty { display: none; }
|
|
2301
|
-
:host([error]:not([error=''])) .fields { padding-inline-start: ${
|
|
2302
|
-
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return
|
|
2828
|
+
:host([error]:not([error=''])) .fields { padding-inline-start: ${r(4)}; border-inline-start: 4px solid ${t.danger}; }
|
|
2829
|
+
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return s`<fieldset part="fieldset" aria-describedby=${e||l}>
|
|
2303
2830
|
<legend part="legend">${this.legend}</legend>
|
|
2304
|
-
${this.description?
|
|
2831
|
+
${this.description?s`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2305
2832
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2306
2833
|
<div class="fields" part="fields"><slot></slot></div>
|
|
2307
|
-
</fieldset>`}};customElements.define("impakt-fieldset",
|
|
2834
|
+
</fieldset>`}};customElements.define("impakt-fieldset",vt);var wt=class extends p{constructor(){super();this.hasFooter=!1;this.open=!1,this.heading="",this.side="right",this.closeLabel="Close"}static{this.properties={open:{type:Boolean,reflect:!0},heading:{type:String},side:{type:String,reflect:!0},closeLabel:{type:String,attribute:"close-label"}}}static{this.styles=[...p.styles,k,A(".close"),h`
|
|
2308
2835
|
dialog { box-sizing: border-box; display: none; flex-direction: column; inline-size: min(28rem, 100vw); max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; color: ${t.text}; background: ${t.surfaceCard}; box-shadow: ${t.shadowXl}; animation: from-right 240ms cubic-bezier(0.16, 1, 0.3, 1); }
|
|
2309
2836
|
dialog[open] { display: flex; }
|
|
2310
2837
|
:host([side='left']) dialog { margin: 0 auto 0 0; animation-name: from-left; }
|
|
@@ -2316,148 +2843,165 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2316
2843
|
dialog::backdrop { background: color-mix(in srgb, ${t.text} 30%, transparent); backdrop-filter: blur(2px); }
|
|
2317
2844
|
@keyframes from-right { from { transform: translateX(100%); } }
|
|
2318
2845
|
@keyframes from-left { from { transform: translateX(-100%); } }
|
|
2319
|
-
.head { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
2320
|
-
h2 { margin: 0; font-family: ${t.fontHeading}; ${
|
|
2321
|
-
.close { ${
|
|
2846
|
+
.head { display: flex; align-items: center; justify-content: space-between; gap: ${r(3)}; padding: ${r(4)} ${r(5)}; box-shadow: 0 1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2847
|
+
h2 { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2848
|
+
.close { ${z} display: inline-flex; align-items: center; justify-content: center; padding: 0; color: ${t.text}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2322
2849
|
.close:hover { background: ${t.surfaceSubtle}; }
|
|
2323
|
-
.body { flex: 1; overflow: auto; padding: ${
|
|
2324
|
-
.foot { display: flex; gap: ${
|
|
2850
|
+
.body { flex: 1; overflow: auto; padding: ${r(5)}; }
|
|
2851
|
+
.foot { display: flex; gap: ${r(3)}; justify-content: flex-end; padding: ${r(4)} ${r(5)}; box-shadow: 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2325
2852
|
.foot[hidden] { display: none; }
|
|
2326
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(
|
|
2853
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let a=this.dialog;a&&(this.open?(typeof a.showModal=="function"?a.showModal():a.setAttribute("open",""),ge(this)):(typeof a.close=="function"&&a.open?a.close():a.removeAttribute("open"),Y(this)))}disconnectedCallback(){super.disconnectedCallback(),Y(this)}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}footerChanged(i){this.hasFooter=i.target.assignedNodes().length>0,this.requestUpdate()}render(){return s`<dialog part="dialog" aria-labelledby=${this.heading?this.id_("heading"):l}
|
|
2327
2854
|
@cancel=${()=>this.close()}
|
|
2328
2855
|
@close=${()=>{this.open&&this.close()}}
|
|
2329
|
-
@click=${
|
|
2856
|
+
@click=${i=>{i.target===this.dialog&&this.close()}}>
|
|
2330
2857
|
<div class="head">
|
|
2331
|
-
${this.heading?
|
|
2332
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2858
|
+
${this.heading?s`<h2 id=${this.id_("heading")}>${this.heading}</h2>`:s`<span></span>`}
|
|
2859
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","20px")}</button>
|
|
2333
2860
|
</div>
|
|
2334
2861
|
<div class="body" part="body"><slot></slot></div>
|
|
2335
2862
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
2336
|
-
</dialog>`}},
|
|
2337
|
-
.region { position: fixed; inset-block-end: calc(${
|
|
2338
|
-
@media (max-width: 40rem) { .region { inset-inline: ${
|
|
2339
|
-
.toast { pointer-events: auto; max-block-size: 40vh; overflow: auto; display: flex; align-items: flex-start; gap: ${
|
|
2863
|
+
</dialog>`}},xr={neutral:"info",success:"check",warning:"warning",danger:"warning"},Tt=class extends p{static{this.properties={open:{type:Boolean,reflect:!0},message:{type:String},tone:{type:String,reflect:!0},duration:{type:Number},actionText:{type:String,attribute:"action-text"},closeLabel:{type:String,attribute:"close-label"}}}constructor(){super(),this.open=!1,this.message="",this.tone="neutral",this.duration=6,this.actionText="",this.closeLabel="Dismiss"}static{this.styles=[...p.styles,k,h`
|
|
2864
|
+
.region { position: fixed; inset-block-end: calc(${r(4)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); inset-inline-end: ${r(4)}; z-index: 1000; inline-size: min(24rem, calc(100vw - ${r(8)})); pointer-events: none; }
|
|
2865
|
+
@media (max-width: 40rem) { .region { inset-inline: ${r(3)}; inline-size: auto; inset-block-end: calc(${r(3)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); } }
|
|
2866
|
+
.toast { pointer-events: auto; max-block-size: 40vh; overflow: auto; display: flex; align-items: flex-start; gap: ${r(3)}; padding: ${r(3)} ${r(3)} ${r(3)} ${r(4)}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowXl}, 0 0 0 1px color-mix(in srgb, ${t.text} 8%, transparent); animation: rise 220ms cubic-bezier(0.16, 1, 0.3, 1); }
|
|
2340
2867
|
/* It rises without fading in, so its words are at full contrast from the first frame they are read in (1.4.3). */
|
|
2341
|
-
@keyframes rise { from { transform: translateY(${
|
|
2342
|
-
.mark { display: inline-flex; flex: none; margin-block-start: ${
|
|
2868
|
+
@keyframes rise { from { transform: translateY(${r(3)}); } }
|
|
2869
|
+
.mark { display: inline-flex; flex: none; margin-block-start: ${r(.5)}; color: ${t.info}; }
|
|
2343
2870
|
:host([tone='success']) .mark { color: ${t.success}; }
|
|
2344
2871
|
:host([tone='warning']) .mark { color: ${t.warning}; }
|
|
2345
2872
|
:host([tone='danger']) .mark { color: ${t.danger}; }
|
|
2346
|
-
.message { flex: 1; align-self: center; margin: 0; ${
|
|
2347
|
-
.action, .close { ${
|
|
2873
|
+
.message { flex: 1; align-self: center; margin: 0; ${w("sm")} font-weight: ${m("medium")}; }
|
|
2874
|
+
.action, .close { ${z} padding: 0 ${r(2)}; font: inherit; ${w("sm")} font-weight: ${m("semibold")}; color: ${t.link}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2348
2875
|
.close { display: inline-flex; align-items: center; justify-content: center; color: ${t.textMuted}; }
|
|
2349
2876
|
.action:hover, .close:hover { background: ${t.surfaceSubtle}; }
|
|
2350
|
-
`,
|
|
2351
|
-
${this.open?
|
|
2877
|
+
`,A(".action, .close")]}disconnectedCallback(){super.disconnectedCallback(),this.stop()}updated(e){(e.has("open")||e.has("duration"))&&(this.stop(),this.open&&this.start())}start(){this.stop(),this.duration>0&&!this.actionText&&(this.timer=setTimeout(()=>this.close(),this.duration*1e3))}stop(){this.timer&&clearTimeout(this.timer),this.timer=void 0}close(){this.stop(),this.open&&(this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0})))}action(){this.dispatchEvent(new CustomEvent("impakt-action",{bubbles:!0,composed:!0})),this.close()}render(){return s`<div class="region" role="status" aria-live="polite">
|
|
2878
|
+
${this.open?s`<div class="toast" part="toast" @mouseenter=${this.stop} @mouseleave=${this.start} @focusin=${this.stop} @focusout=${this.start}
|
|
2352
2879
|
@keydown=${e=>{e.key==="Escape"&&(e.preventDefault(),this.close())}}>
|
|
2353
|
-
<span class="mark">${
|
|
2880
|
+
<span class="mark">${M(xr[this.tone]??"info","20px")}</span>
|
|
2354
2881
|
<p class="message">${this.message}</p>
|
|
2355
|
-
${this.actionText?
|
|
2356
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2882
|
+
${this.actionText?s`<button class="action" type="button" @click=${this.action}>${this.actionText}</button>`:l}
|
|
2883
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","16px")}</button>
|
|
2357
2884
|
</div>`:l}
|
|
2358
|
-
</div>`}},
|
|
2885
|
+
</div>`}},yr=C("var(--impakt-color-line-soft, #dcdcd8)"),St=class extends p{constructor(){super();this.outside=i=>{i.composedPath().includes(this)||this.toggle(!1)};this.label="Menu",this.icon="",this.items=[],this.edge="start",this.open=!1,this.triggerLook="button"}static{this.properties={label:{type:String},icon:{type:String},items:{type:Array},edge:{type:String,reflect:!0},open:{type:Boolean,reflect:!0},triggerLook:{type:String,reflect:!0,attribute:"trigger-look"}}}static{this.styles=[...p.styles,k,A(".trigger, .item"),h`
|
|
2359
2886
|
:host { position: relative; display: inline-block; }
|
|
2360
|
-
.trigger { ${
|
|
2887
|
+
.trigger { ${z} display: inline-flex; align-items: center; gap: ${r(2)}; padding: ${r(2)} ${r(3.5)}; font: inherit; ${w("sm")} font-weight: ${m("medium")}; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
2888
|
+
:host([trigger-look='text']) .trigger { padding: ${r(1)} ${r(1)}; font-size: 1rem; line-height: 1.25; background: transparent; border-color: transparent; }
|
|
2889
|
+
:host([trigger-look='text']) .trigger:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
|
|
2890
|
+
.caret { font-size: 0.75em; line-height: 1; }
|
|
2361
2891
|
.trigger:hover { background: ${t.surfaceSubtle}; }
|
|
2362
2892
|
.chev { display: inline-flex; color: ${t.textMuted}; transition: transform 120ms ease-in-out; }
|
|
2363
2893
|
:host([open]) .chev { transform: rotate(180deg); }
|
|
2364
|
-
|
|
2365
|
-
.
|
|
2366
|
-
.
|
|
2894
|
+
/* G2: a 1px ink border and the one shadow the design allows, the open menu's. */
|
|
2895
|
+
.panel { position: absolute; z-index: 100; inset-block-start: calc(100% + ${r(1.5)}); inset-inline-start: 0; box-sizing: border-box; min-inline-size: 13rem; max-inline-size: min(24rem, 90vw); padding: ${r(2)} 0; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: var(--impakt-shadow-overlay, 0 16px 32px rgb(0 0 0 / 0.2)); animation: pop 120ms ease-out; }
|
|
2896
|
+
.list, .group { margin: 0; padding: 0; list-style: none; }
|
|
2897
|
+
.grouped + .grouped, .grouped:not(:first-child) { margin-block-start: ${r(2)}; padding-block-start: ${r(2)}; border-block-start: ${t.borderThin} solid ${yr}; }
|
|
2898
|
+
.group-label { display: block; padding: ${r(2)} 18px ${r(1)}; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }
|
|
2899
|
+
.header { padding: ${r(2)} ${r(2.5)} ${r(2.5)}; margin-block-end: ${r(1.5)}; border-block-end: ${t.borderThin} solid ${t.border}; ${w("sm")} color: ${t.textMuted}; overflow-wrap: anywhere; }
|
|
2367
2900
|
:host([edge='end']) .panel, .panel.flip-end { inset-inline: auto 0; }
|
|
2368
2901
|
:host([edge='end']) .panel.flip-start { inset-inline: 0 auto; }
|
|
2369
|
-
@keyframes pop { from { opacity: 0; transform: translateY(-${
|
|
2370
|
-
.item { ${
|
|
2902
|
+
@keyframes pop { from { opacity: 0; transform: translateY(-${r(1)}); } }
|
|
2903
|
+
.item { ${z} box-sizing: border-box; display: flex; align-items: center; gap: ${r(2.5)}; inline-size: 100%; padding: ${r(3)} 18px; font: inherit; font-size: 1rem; line-height: 1.25; font-weight: ${m("medium")}; text-align: start; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: 0; cursor: pointer; }
|
|
2371
2904
|
.item:hover, .item:focus { background: ${t.surfaceSubtle}; }
|
|
2905
|
+
.item .meta { margin-inline-start: auto; padding-inline-start: ${r(4)}; font-family: ${t.fontMono}; font-size: 0.875rem; font-weight: ${m("regular")}; color: ${t.textMuted}; white-space: nowrap; }
|
|
2906
|
+
.item[aria-current] { background: ${t.text}; color: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); }
|
|
2907
|
+
.item[aria-current] .meta { color: color-mix(in srgb, var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})) 66%, ${t.text}); }
|
|
2908
|
+
.item[aria-disabled='true'] { color: ${t.textMuted}; cursor: not-allowed; }
|
|
2909
|
+
.item[aria-disabled='true']:hover { background: none; }
|
|
2910
|
+
.item[aria-disabled='true']:focus { background: ${t.surfaceSubtle}; }
|
|
2911
|
+
@media (forced-colors: active) { .panel { border-color: CanvasText; } .item[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; } .item[aria-disabled='true'] { color: GrayText; } }
|
|
2372
2912
|
.item.danger { color: ${t.dangerText}; }
|
|
2373
2913
|
.item svg { flex: none; }
|
|
2374
|
-
`]}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.outside)}get entries(){return Array.from(this.renderRoot.querySelectorAll(".item"))}get trigger(){return this.renderRoot.querySelector(".trigger")}toggle(
|
|
2375
|
-
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${
|
|
2376
|
-
${this.open?
|
|
2377
|
-
${
|
|
2378
|
-
</ul></div>`:l}`}};function
|
|
2914
|
+
`]}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.outside)}get entries(){return Array.from(this.renderRoot.querySelectorAll(".item"))}get trigger(){return this.renderRoot.querySelector(".trigger")}toggle(i,a){this.open=i,i?(document.addEventListener("click",this.outside),this.updateComplete.then(()=>{this.keepOnScreen(),this.entries[a==="last"?this.entries.length-1:0]?.focus()})):document.removeEventListener("click",this.outside)}keepOnScreen(){let i=this.renderRoot.querySelector(".panel");if(!i)return;i.classList.remove("flip-start","flip-end");let a=i.getBoundingClientRect(),o=document.documentElement.clientWidth;a.right>o-8?i.classList.add("flip-end"):a.left<8&&i.classList.add("flip-start")}triggerKey(i){(i.key==="ArrowDown"||i.key==="ArrowUp")&&(i.preventDefault(),this.toggle(!0,i.key==="ArrowUp"?"last":"first"))}listKey(i){let a=this.entries,o=a.indexOf(this.renderRoot.activeElement),d={ArrowDown:(o+1)%a.length,ArrowUp:(o-1+a.length)%a.length,Home:0,End:a.length-1};if(i.key in d)i.preventDefault(),a[d[i.key]]?.focus();else if(i.key.length===1&&/\S/.test(i.key)&&!i.ctrlKey&&!i.metaKey&&!i.altKey){let c=i.key.toLowerCase();[...a.slice(o+1),...a.slice(0,o+1)].find(g=>(g.textContent??"").trim().toLowerCase().startsWith(c))?.focus()}else i.key==="Escape"?(i.preventDefault(),this.toggle(!1),this.trigger?.focus()):i.key==="Tab"&&this.toggle(!1)}choose(i,a){if(i.disabled){a?.preventDefault();return}this.toggle(!1),this.trigger?.focus(),i.href||this.dispatchEvent(new CustomEvent("impakt-select",{detail:{value:i.value??i.text},bubbles:!0,composed:!0}))}renderItem(i){let a=i.meta||(i.current?T("You are here"):""),o=s`${M(i.icon,"18px")}<span class="text">${i.text}</span>${a?s`<span class="meta">${a}</span>`:l}`,d=`item ${i.tone==="danger"?"danger":""}`,c=i.current?"page":l,$=i.disabled?"true":l;return s`<li role="none">${i.href&&!i.disabled?s`<a class=${d} role="menuitem" tabindex="-1" href=${i.href} aria-current=${c} @click=${g=>this.choose(i,g)}>${o}</a>`:s`<button class=${d} role="menuitem" tabindex="-1" type="button" aria-current=${c} aria-disabled=${$} @click=${g=>this.choose(i,g)}>${o}</button>`}</li>`}get runs(){let i=[];for(let a of this.items??[]){let o=a.group??"",d=i[i.length-1],c=o?i.find($=>$.group===o):void 0;c?c.items.push(a):d&&!o&&!d.group?d.items.push(a):i.push({group:o,items:[a]})}return i}render(){let i=this.triggerLook==="text",a=this.runs,o=a.some(d=>d.group);return s`<button class="trigger" part="trigger" type="button" aria-haspopup="menu" aria-expanded=${String(this.open)} aria-controls=${this.id_("list")}
|
|
2915
|
+
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${M(this.icon,"18px")}${this.label}</slot>${i?s`<span class="caret" part="chevron" aria-hidden="true">${this.open?"\u25B4":"\u25BE"}</span>`:s`<span class="chev" part="chevron">${M("chevron-down","16px")}</span>`}</button>
|
|
2916
|
+
${this.open?s`<div class="panel" part="panel">${this.querySelector?.(':scope > [slot="header"]')?s`<div class="header" part="header"><slot name="header"></slot></div>`:l}<ul class="list" part="list" id=${this.id_("list")} role="menu" aria-label=${this.label} @keydown=${this.listKey}>
|
|
2917
|
+
${o?a.map((d,c)=>{let $=this.id_(`group-${c}`);return s`<li role="none" class="grouped">${d.group?s`<span class="group-label" id=${$} part="group-label">${d.group}</span>`:l}<ul class="group" role="group" aria-labelledby=${d.group?$:l}>${d.items.map(g=>this.renderItem(g))}</ul></li>`}):(this.items??[]).map(d=>this.renderItem(d))}
|
|
2918
|
+
</ul></div>`:l}`}};function kr(n,e){let i=[...new Set([1,n-1,n,n+1,e])].filter(a=>a>=1&&a<=e).sort((a,o)=>a-o);return i.flatMap((a,o)=>{let d=i[o-1];return d===void 0||a===d+1?[a]:a===d+2?[d+1,a]:["gap",a]})}var zt=class extends p{static{this.properties={page:{type:Number},pages:{type:Number},hrefPattern:{type:String,attribute:"href-pattern"},label:{type:String},previousText:{type:String,attribute:"previous-text"},nextText:{type:String,attribute:"next-text"}}}constructor(){super(),this.page=1,this.pages=1,this.hrefPattern="",this.label="Pages",this.previousText="Previous",this.nextText="Next"}static{this.styles=[...p.styles,k,A(".n, .step"),h`
|
|
2379
2919
|
:host { display: block; container-type: inline-size; }
|
|
2380
|
-
nav { display: flex; align-items: center; justify-content: space-between; gap: ${
|
|
2381
|
-
ul { display: flex; align-items: center; gap: ${
|
|
2382
|
-
.n, .step { ${
|
|
2920
|
+
nav { display: flex; align-items: center; justify-content: space-between; gap: ${r(2)}; }
|
|
2921
|
+
ul { display: flex; align-items: center; gap: ${r(1)}; margin: 0; padding: 0; list-style: none; }
|
|
2922
|
+
.n, .step { ${z} box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: ${r(1.5)}; min-inline-size: 44px; padding: 0 ${r(2.5)}; font: inherit; ${w("sm")} font-weight: ${m("medium")}; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
2383
2923
|
.n:hover, .step:hover { background: ${t.surfaceSubtle}; }
|
|
2384
2924
|
.n[aria-current] { color: ${t.onBrand}; background: ${t.brand}; font-weight: ${m("semibold")}; }
|
|
2385
2925
|
.step[aria-disabled='true'] { color: ${t.textMuted}; opacity: 0.55; background: none; cursor: not-allowed; }
|
|
2386
|
-
.gap { color: ${t.textMuted}; padding: 0 ${
|
|
2387
|
-
.count { display: none; ${
|
|
2926
|
+
.gap { color: ${t.textMuted}; padding: 0 ${r(1)}; }
|
|
2927
|
+
.count { display: none; ${w("sm")} color: ${t.textMuted}; }
|
|
2388
2928
|
@container (max-width: 34rem) { ul { display: none; } .count { display: block; } }
|
|
2389
|
-
`]}go(e,
|
|
2929
|
+
`]}go(e,i){this.hrefPattern||(i.preventDefault(),this.page=e,this.dispatchEvent(new CustomEvent("impakt-page",{detail:{page:e},bubbles:!0,composed:!0})))}link(e,i,a,o,d){return this.hrefPattern?s`<a class=${i} href=${this.hrefPattern.replace("{page}",String(e))} aria-label=${o} aria-current=${d?"page":l}>${a}</a>`:s`<button class=${i} type="button" aria-label=${o} aria-current=${d?"page":l} @click=${c=>this.go(e,c)}>${a}</button>`}step(e,i,a,o){let d=a==="arrow-left"?s`${M(a,"16px")}${i}`:s`${i}${M(a,"16px")}`;return o?s`<span class="step" aria-disabled="true">${d}</span>`:this.link(e,"step",d,i,!1)}render(){let e=Math.min(Math.max(this.page,1),Math.max(this.pages,1));return s`<nav aria-label=${this.label} part="nav">
|
|
2390
2930
|
${this.step(e-1,this.previousText,"arrow-left",e<=1)}
|
|
2391
|
-
<ul>${
|
|
2392
|
-
<span class="count">${
|
|
2931
|
+
<ul>${kr(e,this.pages).map(i=>s`<li>${i==="gap"?s`<span class="gap" aria-hidden="true">…</span>`:this.link(i,"n",i,T("Page {page}",{page:i}),i===e)}</li>`)}</ul>
|
|
2932
|
+
<span class="count">${T("Page {page} of {pages}",{page:e,pages:this.pages})}</span>
|
|
2393
2933
|
${this.step(e+1,this.nextText,"arrow-right",e>=this.pages)}
|
|
2394
|
-
</nav>`}},
|
|
2934
|
+
</nav>`}},vr=n=>{let e=n.trim().split(/\s+/).filter(Boolean);return((e[0]?.[0]??"")+(e.length>1?e[e.length-1][0]:"")).toUpperCase()},Mt=class extends p{constructor(){super();this.failed=!1;this.fullName="",this.src="",this.size="md"}static{this.properties={fullName:{type:String,attribute:"full-name"},src:{type:String},size:{type:String,reflect:!0}}}static{this.styles=[...p.styles,h`
|
|
2395
2935
|
:host { --size: 40px; display: inline-block; inline-size: var(--size); block-size: var(--size); vertical-align: middle; }
|
|
2936
|
+
:host([size='xs']) { --size: 22px; }
|
|
2396
2937
|
:host([size='sm']) { --size: 32px; }
|
|
2397
2938
|
:host([size='lg']) { --size: 56px; }
|
|
2398
2939
|
:host([size='xl']) { --size: 80px; }
|
|
2399
2940
|
.face { display: flex; align-items: center; justify-content: center; inline-size: 100%; block-size: 100%; overflow: hidden; color: ${t.brand}; background: ${t.brandSubtle}; border-radius: 50%; font-size: calc(var(--size) * 0.38); font-weight: ${m("semibold")}; }
|
|
2400
2941
|
img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
2401
|
-
`]}willUpdate(
|
|
2942
|
+
`]}willUpdate(i){i.has("src")&&(this.failed=!1)}render(){return this.src&&!this.failed?s`<div class="face"><img src=${this.src} alt=${this.fullName} @error=${()=>{this.failed=!0,this.requestUpdate()}} /></div>`:s`<div class="face" role="img" aria-label=${this.fullName||T("Person")}>${vr(this.fullName)||M("user","55%")}</div>`}},Et=class extends p{static{this.properties={items:{type:Array},max:{type:Number},size:{type:String,reflect:!0},moreLabel:{type:String,attribute:"more-label"}}}constructor(){super(),this.items=[],this.max=4,this.size="md",this.moreLabel="more people"}static{this.styles=[...p.styles,h`
|
|
2402
2943
|
ul { display: flex; margin: 0; padding: 0; list-style: none; }
|
|
2403
|
-
li { margin-inline-start: -${
|
|
2944
|
+
li { margin-inline-start: -${r(2.5)}; border-radius: 50%; box-shadow: 0 0 0 2px ${t.surfaceCard}; line-height: 0; }
|
|
2404
2945
|
li:first-child { margin-inline-start: 0; }
|
|
2405
|
-
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${
|
|
2946
|
+
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${w("xs")} line-height: 1; font-weight: ${m("semibold")}; color: ${t.text}; background: ${t.surfaceSubtle}; border-radius: 50%; }
|
|
2406
2947
|
:host([size='sm']) .more { inline-size: 32px; block-size: 32px; }
|
|
2948
|
+
:host([size='xs']) li { margin-inline-start: -${r(1)}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
2949
|
+
:host([size='xs']) li:first-child { margin-inline-start: 0; }
|
|
2950
|
+
:host([size='xs']) .more { inline-size: 22px; block-size: 22px; font-size: 10px; }
|
|
2407
2951
|
:host([size='lg']) .more { inline-size: 56px; block-size: 56px; }
|
|
2408
|
-
.sr { ${
|
|
2409
|
-
`]}render(){let e=this.items.slice(0,this.max),
|
|
2410
|
-
${e.map(
|
|
2411
|
-
${
|
|
2412
|
-
</ul>`}},
|
|
2413
|
-
.wrap { display: flex; flex-direction: column; align-items: center; gap: ${
|
|
2952
|
+
.sr { ${S} }
|
|
2953
|
+
`]}render(){let e=this.items.slice(0,this.max),i=this.items.length-e.length;return s`<ul part="list">
|
|
2954
|
+
${e.map(a=>s`<li><impakt-avatar full-name=${a.name} src=${a.src??""} size=${this.size}></impakt-avatar></li>`)}
|
|
2955
|
+
${i>0?s`<li><span class="more"><span aria-hidden="true">+${i}</span><span class="sr">${i} ${this.moreLabel}</span></span></li>`:l}
|
|
2956
|
+
</ul>`}},At=class extends p{static{this.properties={icon:{type:String},heading:{type:String},lead:{type:String},framed:{type:Boolean,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.icon="search",this.heading="",this.lead="",this.framed=!1,this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,I,h`
|
|
2957
|
+
.wrap { display: flex; flex-direction: column; align-items: center; gap: ${r(2)}; padding: ${r(12)} ${r(6)}; text-align: center; }
|
|
2414
2958
|
:host([framed]) .wrap { border: ${t.borderThin} dashed ${t.border}; border-radius: ${t.radiusXl}; }
|
|
2415
|
-
.mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 56px; block-size: 56px; margin-block-end: ${
|
|
2416
|
-
.h { margin: 0; font-family: ${t.fontHeading}; ${
|
|
2959
|
+
.mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 56px; block-size: 56px; margin-block-end: ${r(2)}; color: ${t.brand}; background: ${t.brandSubtle}; border-radius: 50%; }
|
|
2960
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2417
2961
|
p { margin: 0; max-inline-size: 42ch; color: ${t.textMuted}; text-wrap: pretty; }
|
|
2418
|
-
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: ${
|
|
2419
|
-
`]}render(){return
|
|
2420
|
-
<span class="mark">${
|
|
2421
|
-
${this.heading?
|
|
2422
|
-
${this.lead?
|
|
2962
|
+
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: ${r(3)}; margin-block-start: ${r(3)}; }
|
|
2963
|
+
`]}render(){return s`<div class="wrap" part="wrap">
|
|
2964
|
+
<span class="mark">${M(this.icon,"26px")}</span>
|
|
2965
|
+
${this.heading?s`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
2966
|
+
${this.lead?s`<p>${this.lead}</p>`:l}
|
|
2423
2967
|
<div class="actions"><slot name="actions"></slot></div>
|
|
2424
|
-
</div>`}},
|
|
2968
|
+
</div>`}},wr=n=>String(n?.times??"").split(",").map(e=>e.trim()).filter(Boolean);function Tr(n){let e=new Date(`${n}T00:00:00Z`);if(Number.isNaN(e.getTime()))return{weekday:"",day:n,month:""};let i=B(),a=o=>new Intl.DateTimeFormat(i,{timeZone:"UTC",...o}).format(e);return{weekday:a({weekday:"short"}),day:a({day:"numeric"}),month:a({month:"short"})}}var Ct=class extends x{constructor(){super();this.day="";this.days=[],this.dayLabel="Day",this.timeLabel="Time",this.emptyText="No times are available at the moment."}static{this.properties={...x.properties,days:{type:Array},dayLabel:{type:String,attribute:"day-label"},timeLabel:{type:String,attribute:"time-label"},emptyText:{type:String,attribute:"empty-text"}}}static{this.styles=[...x.styles,h`
|
|
2425
2969
|
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
|
|
2426
2970
|
legend { padding: 0; }
|
|
2427
|
-
.row-label { ${
|
|
2428
|
-
.days { display: flex; gap: ${
|
|
2429
|
-
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: ${
|
|
2971
|
+
.row-label { ${w("sm")} color: ${t.textMuted}; margin-block: ${r(2)}; }
|
|
2972
|
+
.days { display: flex; gap: ${r(2)}; overflow-x: auto; padding: ${r(1)}; margin: -${r(1)}; scrollbar-width: thin; }
|
|
2973
|
+
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: ${r(2)}; }
|
|
2430
2974
|
label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; min-block-size: 44px; color: ${t.text}; background: ${t.surfaceCard}; border-radius: ${t.radiusLg}; box-shadow: inset 0 0 0 1px ${t.border}; cursor: pointer; transition: background-color 120ms ease-in-out; }
|
|
2431
2975
|
label:hover { background: ${t.surfaceSubtle}; }
|
|
2432
2976
|
label:has(input:checked) { color: ${t.onBrand}; background: ${t.brand}; box-shadow: none; }
|
|
2433
2977
|
label:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }
|
|
2434
2978
|
input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
|
|
2435
|
-
.day { flex: none; inline-size: 4.5rem; padding-block: ${
|
|
2436
|
-
.weekday, .month { ${
|
|
2437
|
-
.num { ${
|
|
2438
|
-
.time { padding: ${
|
|
2979
|
+
.day { flex: none; inline-size: 4.5rem; padding-block: ${r(2.5)}; }
|
|
2980
|
+
.weekday, .month { ${w("xs")} }
|
|
2981
|
+
.num { ${w("xl")} font-weight: ${m("semibold")}; }
|
|
2982
|
+
.time { padding: ${r(2)}; ${w("sm")} font-weight: ${m("medium")}; }
|
|
2439
2983
|
.empty { margin: 0; color: ${t.textMuted}; }
|
|
2440
2984
|
:host([invalid]) .days label, :host([invalid]) .times label { box-shadow: inset 0 0 0 1px ${t.danger}; }
|
|
2441
|
-
`]}get currentDay(){let
|
|
2985
|
+
`]}get currentDay(){let i=this.day||this.value.split("T")[0];return this.days.find(a=>a.date===i)??this.days[0]}chooseDay(i){this.day=i,this.value&&!this.value.startsWith(`${i}T`)&&this.setFormValue(""),this.requestUpdate()}renderLabel(){return s`<legend class="label" part="label">${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}</legend>`}renderControl(){let i=this.currentDay;return i?s`
|
|
2442
2986
|
<div class="row-label" id=${this.id_("days")}>${this.dayLabel}</div>
|
|
2443
2987
|
<div class="days" part="days" role="radiogroup" aria-labelledby=${this.id_("days")}>
|
|
2444
|
-
${this.days.map(
|
|
2988
|
+
${this.days.map(a=>{let o=Tr(a.date);return s`<label class="day"><input type="radio" name=${`${this.uid}-day`} .checked=${a.date===i.date} ?disabled=${this.disabled} @change=${()=>this.chooseDay(a.date)} />
|
|
2445
2989
|
<span class="weekday">${o.weekday}</span><span class="num">${o.day}</span><span class="month">${o.month}</span></label>`})}
|
|
2446
2990
|
</div>
|
|
2447
2991
|
<div class="row-label" id=${this.id_("times")}>${this.timeLabel}</div>
|
|
2448
2992
|
<div class="times" part="times" role="radiogroup" aria-labelledby=${this.id_("times")}>
|
|
2449
|
-
${
|
|
2450
|
-
</div>`:
|
|
2993
|
+
${wr(i).map((a,o)=>{let d=`${i.date}T${a}`;return s`<label class="time"><input type="radio" name=${`${this.uid}-time`} .checked=${this.value===d} ?required=${this.required&&o===0} ?disabled=${this.disabled} @change=${()=>this.setFormValue(d)} />${a}</label>`})}
|
|
2994
|
+
</div>`:s`<p class="empty">${this.emptyText}</p>`}render(){return s`<fieldset part="fieldset" ?disabled=${this.disabled} aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
2451
2995
|
${this.renderLabel()}
|
|
2452
|
-
${this.description?
|
|
2996
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2453
2997
|
${this.renderControl()}
|
|
2454
2998
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2455
|
-
</fieldset>`}updated(
|
|
2999
|
+
</fieldset>`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-drawer",wt);customElements.define("impakt-toast",Tt);customElements.define("impakt-menu",St);customElements.define("impakt-pagination",zt);customElements.define("impakt-avatar",Mt);customElements.define("impakt-avatar-group",Et);customElements.define("impakt-empty-state",At);customElements.define("impakt-slot-picker",Ct);var li=h`
|
|
2456
3000
|
input, select {
|
|
2457
3001
|
box-sizing: border-box;
|
|
2458
3002
|
inline-size: min(100%, var(--impakt-field-width));
|
|
2459
3003
|
min-block-size: 44px;
|
|
2460
|
-
padding: ${
|
|
3004
|
+
padding: ${r(2.5)} ${r(3)};
|
|
2461
3005
|
font: inherit;
|
|
2462
3006
|
/* 16px whatever the page around it sets, so a phone does not zoom in on focus. */
|
|
2463
3007
|
font-size: max(${b("md")}, 16px);
|
|
@@ -2470,7 +3014,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2470
3014
|
:host([invalid]) input, :host([invalid]) select { border-color: ${t.danger}; border-width: ${t.borderThick}; }
|
|
2471
3015
|
.btn {
|
|
2472
3016
|
min-block-size: 44px;
|
|
2473
|
-
padding: ${
|
|
3017
|
+
padding: ${r(2.5)} ${r(4)};
|
|
2474
3018
|
font: inherit;
|
|
2475
3019
|
font-weight: ${m("semibold")};
|
|
2476
3020
|
color: ${t.onBrand};
|
|
@@ -2481,25 +3025,25 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2481
3025
|
}
|
|
2482
3026
|
.btn:hover { background: ${t.brandHover}; }
|
|
2483
3027
|
.quiet { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; padding: 0; font: inherit; color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; background: none; border: 0; cursor: pointer; }
|
|
2484
|
-
.visually-hidden { ${
|
|
2485
|
-
`,
|
|
2486
|
-
.row { display: flex; flex-wrap: wrap; gap: ${
|
|
2487
|
-
.row label { display: block; ${
|
|
3028
|
+
.visually-hidden { ${S} }
|
|
3029
|
+
`,j=class extends x{static{this.properties={...x.properties,postcodeLabel:{type:String,attribute:"postcode-label"},findText:{type:String,attribute:"find-text"},chooseLabel:{type:String,attribute:"choose-label"},manualText:{type:String,attribute:"manual-text"},notFoundText:{type:String,attribute:"not-found-text"},lookupUrl:{type:String,attribute:"lookup-url"},addresses:{type:Array}}}constructor(){super(),this.label="Your address",this.postcodeLabel="Postcode",this.findText="Find address",this.chooseLabel="Choose your address",this.manualText="Enter the address yourself",this.notFoundText="No addresses found for that postcode. Check it, or enter the address yourself.",this.lookupUrl="",this.addresses=[],this.manual=!1,this.postcode="",this.searched=!1,this.busy=!1}static{this.styles=[...x.styles,N,li,h`
|
|
3030
|
+
.row { display: flex; flex-wrap: wrap; gap: ${r(2)}; align-items: flex-end; }
|
|
3031
|
+
.row label { display: block; ${w("sm")} font-weight: ${m("semibold")}; margin-block-end: ${r(1)}; }
|
|
2488
3032
|
.postcode input { inline-size: 12ch; text-transform: uppercase; }
|
|
2489
|
-
.choose { margin-block-start: ${
|
|
3033
|
+
.choose { margin-block-start: ${r(4)}; }
|
|
2490
3034
|
.choose select { inline-size: 100%; }
|
|
2491
|
-
.manual { display: grid; gap: ${
|
|
2492
|
-
.manual label { display: block; ${
|
|
3035
|
+
.manual { display: grid; gap: ${r(3)}; margin-block-start: ${r(3)}; }
|
|
3036
|
+
.manual label { display: block; ${w("sm")} margin-block-end: ${r(1)}; }
|
|
2493
3037
|
.manual input { inline-size: 100%; }
|
|
2494
|
-
.note { ${
|
|
2495
|
-
.switch { margin-block-start: ${
|
|
2496
|
-
`]}async find(){let e=this.postcode.trim().toUpperCase();if(e){if(this.dispatchEvent(new CustomEvent("impakt-lookup",{detail:{postcode:e},bubbles:!0,composed:!0})),!this.lookupUrl){this.searched=!0;return}this.busy=!0;try{let
|
|
2497
|
-
${e("line1",
|
|
2498
|
-
${e("line2",
|
|
2499
|
-
${e("town",
|
|
2500
|
-
${e("mpostcode",
|
|
2501
|
-
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${
|
|
2502
|
-
</div>`}return
|
|
3038
|
+
.note { ${w("sm")} color: ${t.textMuted}; margin: ${r(2)} 0 0; }
|
|
3039
|
+
.switch { margin-block-start: ${r(3)}; }
|
|
3040
|
+
`]}async find(){let e=this.postcode.trim().toUpperCase();if(e){if(this.dispatchEvent(new CustomEvent("impakt-lookup",{detail:{postcode:e},bubbles:!0,composed:!0})),!this.lookupUrl){this.searched=!0;return}this.busy=!0;try{let i=new URL(this.lookupUrl,globalThis.location?.href);i.searchParams.set("postcode",e);let a=await(await fetch(i)).json();this.addresses=Array.isArray(a)?a:[]}catch{this.addresses=[]}finally{this.busy=!1,this.searched=!0}}}manualLine(){return["line1","line2","town","mpostcode"].map(i=>(this.renderRoot.querySelector(`#${this.id_(i)}`)?.value??"").trim()).filter(Boolean).join(", ")}renderControl(){if(this.manual){let e=(i,a,o)=>s`<div><label for=${this.id_(i)}>${a}</label><input id=${this.id_(i)} autocomplete=${o} @input=${()=>this.setFormValue(this.manualLine())} /></div>`;return s`<div class="manual" role="group" aria-label=${this.label}>
|
|
3041
|
+
${e("line1",T("Building and street"),"address-line1")}
|
|
3042
|
+
${e("line2",T("Second line (optional)"),"address-line2")}
|
|
3043
|
+
${e("town",T("Town or city"),"address-level2")}
|
|
3044
|
+
${e("mpostcode",T("Postcode"),"postal-code")}
|
|
3045
|
+
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${T("Find the address from the postcode")}</button>
|
|
3046
|
+
</div>`}return s`
|
|
2503
3047
|
<div class="row">
|
|
2504
3048
|
<div class="postcode"><label for=${this.controlId}>${this.postcodeLabel}</label>
|
|
2505
3049
|
<input id=${this.controlId} autocomplete="postal-code" .value=${this.postcode} aria-describedby=${this.describedBy}
|
|
@@ -2507,24 +3051,24 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2507
3051
|
@keydown=${e=>{e.key==="Enter"&&(e.preventDefault(),this.find())}} /></div>
|
|
2508
3052
|
<button class="btn" type="button" ?disabled=${this.busy} @click=${()=>this.find()}>${this.busy?"Finding\u2026":this.findText}</button>
|
|
2509
3053
|
</div>
|
|
2510
|
-
${this.addresses.length?
|
|
3054
|
+
${this.addresses.length?s`<div class="choose"><label class="label" for=${this.id_("choose")}>${this.chooseLabel}</label>
|
|
2511
3055
|
<select id=${this.id_("choose")} @change=${e=>this.setFormValue(e.target.value)}>
|
|
2512
3056
|
<option value="">${this.addresses.length} ${this.addresses.length===1?"address":"addresses"} found</option>
|
|
2513
|
-
${this.addresses.map(e=>
|
|
2514
|
-
</select></div>`:this.searched&&!this.busy?
|
|
3057
|
+
${this.addresses.map(e=>s`<option value=${e.line} ?selected=${e.line===this.value}>${e.line}</option>`)}
|
|
3058
|
+
</select></div>`:this.searched&&!this.busy?s`<p class="note" role="status">${this.notFoundText}</p>`:l}
|
|
2515
3059
|
<button class="quiet switch" type="button" @click=${()=>{this.manual=!0}}>${this.manualText}</button>
|
|
2516
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
3060
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Lt=class extends p{static{this.properties={heading:{type:String},items:{type:Array},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="There is a problem",this.items=[],this.spaceAbove="none",this.spaceBelow="md"}static{this.styles=[...p.styles,k,I,A("a"),h`
|
|
2517
3061
|
:host { display: block; }
|
|
2518
|
-
.box { padding: ${
|
|
3062
|
+
.box { padding: ${r(5)}; border: ${t.borderThick} solid ${t.danger}; border-inline-start-width: 6px; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
2519
3063
|
.box:focus { outline: 3px solid ${t.danger}; outline-offset: 2px; }
|
|
2520
|
-
h2 { margin: 0 0 ${
|
|
2521
|
-
ul { margin: 0; padding: 0; list-style: none; display: grid; gap: ${
|
|
3064
|
+
h2 { margin: 0 0 ${r(3)}; ${w("lg")} font-weight: ${m("bold")}; color: ${t.text}; }
|
|
3065
|
+
ul { margin: 0; padding: 0; list-style: none; display: grid; gap: ${r(2)}; }
|
|
2522
3066
|
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.dangerText}; font-weight: ${m("semibold")}; text-underline-offset: 0.2em; }
|
|
2523
|
-
`]}go(e,
|
|
3067
|
+
`]}go(e,i){let a=i.replace(/^#/,""),d=this.getRootNode().querySelector?.(`#${CSS.escape(a)}`)??document.getElementById(a);d&&(e.preventDefault(),d.scrollIntoView({block:"center"}),d.focus())}updated(e){let i=e.get("items");e.has("items")&&this.items.length&&!i?.length&&this.renderRoot.querySelector(".box")?.focus()}render(){return this.items.length?s`<div class="box" role="alert" tabindex="-1" aria-labelledby=${this.id_("h")} part="box">
|
|
2524
3068
|
<h2 id=${this.id_("h")}>${this.heading}</h2>
|
|
2525
|
-
<ul>${this.items.map(e=>
|
|
2526
|
-
</div>`:l}},
|
|
2527
|
-
.zone { display: flex; flex-wrap: wrap; align-items: center; gap: ${
|
|
3069
|
+
<ul>${this.items.map(e=>s`<li><a href=${e.href} @click=${i=>this.go(i,e.href)}>${e.text}</a></li>`)}</ul>
|
|
3070
|
+
</div>`:l}},Sr=n=>n>=1048576?T("{size} MB",{size:(n/1048576).toFixed(1)}):T("{size} KB",{size:Math.max(1,Math.round(n/1024))}),X=class extends x{static{this.properties={...x.properties,accept:{type:String},manyFiles:{type:Boolean,attribute:"many-files"},maxSizeMb:{type:Number,attribute:"max-size-mb"},chooseText:{type:String,attribute:"choose-text"},dropText:{type:String,attribute:"drop-text"}}}constructor(){super(),this.label="Upload a file",this.accept=".pdf,.jpg,.jpeg,.png",this.manyFiles=!1,this.maxSizeMb=10,this.chooseText="Choose file",this.dropText="or drop it here",this.files=[],this.over=!1,this.said=""}static{this.styles=[...x.styles,li,z,A("label.btn, .quiet"),h`
|
|
3071
|
+
.zone { display: flex; flex-wrap: wrap; align-items: center; gap: ${r(3)}; padding: ${r(5)}; border: 2px dashed ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
2528
3072
|
.zone.over { border-color: ${t.brand}; background: ${t.brandSubtle}; }
|
|
2529
3073
|
:host([invalid]) .zone { border-color: ${t.danger}; border-style: solid; }
|
|
2530
3074
|
:host([disabled]) label.btn { cursor: not-allowed; }
|
|
@@ -2532,65 +3076,835 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2532
3076
|
input[type='file'] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
|
|
2533
3077
|
label.btn { display: inline-flex; align-items: center; }
|
|
2534
3078
|
input[type='file']:focus-visible + label.btn { box-shadow: ${t.focusShadow}; }
|
|
2535
|
-
ul { margin: ${
|
|
2536
|
-
li { display: flex; justify-content: space-between; gap: ${
|
|
2537
|
-
.size { color: ${t.textMuted}; ${
|
|
2538
|
-
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return
|
|
3079
|
+
ul { margin: ${r(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${r(2)}; }
|
|
3080
|
+
li { display: flex; justify-content: space-between; gap: ${r(3)}; align-items: center; padding: ${r(2)} ${r(3)}; border-radius: ${t.radius}; background: ${t.surfaceInset}; }
|
|
3081
|
+
.size { color: ${t.textMuted}; ${w("sm")} }
|
|
3082
|
+
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return T("{file} is bigger than {size} MB",{file:e.name,size:this.maxSizeMb});let i=this.accept.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean);return i.length&&!i.some(a=>a.startsWith(".")?e.name.toLowerCase().endsWith(a):e.type===a||a.endsWith("/*")&&e.type.startsWith(a.slice(0,-1)))?T("{file} must be {kinds}",{file:e.name,kinds:i.map(a=>a.replace(".","").toUpperCase()).join(", ")}):null}add(e){let i=Array.from(e),a=i.map(c=>this.fits(c)).filter(c=>!!c),o=i.filter(c=>!this.fits(c)),d=this.manyFiles?o:o.slice(0,1);this.files=this.manyFiles?[...this.files,...o]:d.length?d:this.files,this.error=a.join(". "),this.said=d.map(c=>T("{file} added",{file:c.name})).join(". "),this.sync()}removeFile(e){let i=this.files[e];this.files=this.files.filter((a,o)=>o!==e),this.said=i?T("{file} removed",{file:i.name}):"",this.sync(),this.updateComplete.then(()=>this.renderRoot.querySelector('input[type="file"]')?.focus())}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}sync(){this.setFormValue(this.files.map(e=>e.name).join(", ")),this.dispatchEvent(new CustomEvent("impakt-files",{detail:{files:this.files},bubbles:!0,composed:!0}))}renderControl(){return s`
|
|
2539
3083
|
<div class="zone ${this.over?"over":""}"
|
|
2540
3084
|
@dragover=${e=>{e.preventDefault(),this.over=!0}}
|
|
2541
3085
|
@dragleave=${()=>{this.over=!1}}
|
|
2542
3086
|
@drop=${e=>{e.preventDefault(),this.over=!1,e.dataTransfer?.files&&this.add(e.dataTransfer.files)}}>
|
|
2543
3087
|
<input id=${this.controlId} type="file" accept=${this.accept||l} ?multiple=${this.manyFiles} ?disabled=${this.disabled} ?required=${this.required} aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}
|
|
2544
|
-
@change=${e=>{let
|
|
3088
|
+
@change=${e=>{let i=e.target.files;i&&this.add(i),e.target.value=""}} />
|
|
2545
3089
|
<label class="btn" for=${this.controlId}>${this.chooseText}</label>
|
|
2546
3090
|
<span class="drop">${this.dropText}</span>
|
|
2547
3091
|
</div>
|
|
2548
3092
|
<p class="visually-hidden" role="status">${this.said}</p>
|
|
2549
|
-
${this.files.length?
|
|
2550
|
-
`}};function
|
|
3093
|
+
${this.files.length?s`<ul aria-label=${T("Files added")}>${this.files.map((e,i)=>s`<li><span>${e.name} <span class="size">${Sr(e.size)}</span></span><button class="quiet" type="button" @click=${()=>this.removeFile(i)}>${T("Remove")}<span class="visually-hidden"> ${e.name}</span></button></li>`)}</ul>`:l}
|
|
3094
|
+
`}};function oi(n){try{return new Intl.NumberFormat(B(),{style:"currency",currency:n,maximumFractionDigits:0}).formatToParts(0).find(e=>e.type==="currency")?.value??""}catch{return""}}function ni(n){let e=n.replace(/[^\d.]/g,"");if(!e)return"";let[i,a]=e.split(".");return`${Number(i).toLocaleString("en-GB")}${a!==void 0?`.${a.slice(0,2)}`:""}`}var be=class extends x{static{this.properties={...x.properties,currency:{type:String},lowest:{type:Number},highest:{type:Number},pence:{type:Boolean},width:{type:String,reflect:!0}}}constructor(){super(),this.currency="GBP",this.lowest=void 0,this.highest=void 0,this.pence=!1,this.width="md",this.shown=""}static{this.styles=[...x.styles,N,li,h`
|
|
2551
3095
|
.wrap { display: flex; align-items: stretch; inline-size: min(100%, var(--impakt-field-width)); }
|
|
2552
|
-
.sign { display: flex; align-items: center; padding: 0 ${
|
|
3096
|
+
.sign { display: flex; align-items: center; padding: 0 ${r(3)}; font-weight: ${m("semibold")}; background: ${t.surfaceInset}; border: ${t.borderThin} solid ${t.border}; border-inline-end: 0; border-radius: ${t.radiusLg} 0 0 ${t.radiusLg}; }
|
|
2553
3097
|
.wrap input { inline-size: 100%; border-radius: 0 ${t.radiusLg} ${t.radiusLg} 0; }
|
|
2554
|
-
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=
|
|
2555
|
-
<span class="sign" id=${this.id_("sign")}>${
|
|
3098
|
+
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=ni(this.value))}typed(e){let i=e.replace(/[^\d.]/g,""),a=this.pence?i:i.split(".")[0];this.shown=e,this.setFormValue(a)}check(){this.shown=ni(this.value);let e=Number(this.value);if(!this.value)return;let i=a=>`${oi(this.currency)}${a.toLocaleString("en-GB")}`;this.lowest!==void 0&&e<this.lowest?this.error=T("Enter an amount of {amount} or more",{amount:i(this.lowest)}):this.highest!==void 0&&e>this.highest?this.error=T("Enter an amount of {amount} or less",{amount:i(this.highest)}):(this.error===T("Enter an amount of {amount} or more",{amount:i(this.lowest??0)})||this.error===T("Enter an amount of {amount} or less",{amount:i(this.highest??0)}))&&(this.error="")}get describedBy(){let e=[oi(this.currency)?this.id_("sign"):"",super.describedBy===l?"":String(super.describedBy)].filter(Boolean);return e.length?e.join(" "):l}renderControl(){return s`<div class="wrap">
|
|
3099
|
+
<span class="sign" id=${this.id_("sign")}>${oi(this.currency)}</span>
|
|
2556
3100
|
<input id=${this.controlId} inputmode=${this.pence?"decimal":"numeric"} .value=${this.shown} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required}
|
|
2557
3101
|
aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}
|
|
2558
3102
|
@input=${e=>this.typed(e.target.value)} @blur=${()=>this.check()} />
|
|
2559
|
-
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
2560
|
-
.top { display: flex; justify-content: space-between; gap: ${
|
|
3103
|
+
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Rt=class extends x{static{this.properties={...x.properties,lowest:{type:Number},highest:{type:Number},step:{type:Number},currency:{type:String},unit:{type:String}}}constructor(){super(),this.label="How much",this.lowest=0,this.highest=100,this.step=1,this.currency="",this.unit="",this.value="50"}static{this.styles=[...x.styles,h`
|
|
3104
|
+
.top { display: flex; justify-content: space-between; gap: ${r(3)}; }
|
|
2561
3105
|
output { font-weight: ${m("semibold")}; color: ${t.text}; }
|
|
2562
3106
|
input { inline-size: 100%; min-block-size: 32px; margin: 0; accent-color: ${t.brand}; }
|
|
2563
|
-
.ends { display: flex; justify-content: space-between; ${
|
|
2564
|
-
`]}shownAs(e){let
|
|
2565
|
-
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?
|
|
3107
|
+
.ends { display: flex; justify-content: space-between; ${w("sm")} color: ${t.textMuted}; }
|
|
3108
|
+
`]}shownAs(e){let i=B(this),a=e.toLocaleString(i);if(this.currency)try{a=new Intl.NumberFormat(i,{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(e)}catch{}return this.unit?`${a} ${this.unit}`:a}render(){let e=Number(this.value)||0;return s`
|
|
3109
|
+
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?s` <span class="required">(${this.requiredText})</span>`:l}</label>
|
|
2566
3110
|
<output for=${this.controlId}>${this.shownAs(e)}</output></div>
|
|
2567
|
-
${this.description?
|
|
3111
|
+
${this.description?s`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2568
3112
|
${this.renderControl()}
|
|
2569
3113
|
<div class="ends" aria-hidden="true"><span>${this.shownAs(this.lowest)}</span><span>${this.shownAs(this.highest)}</span></div>
|
|
2570
3114
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2571
|
-
`}renderControl(){return
|
|
3115
|
+
`}renderControl(){return s`<input id=${this.controlId} type="range" min=${this.lowest} max=${this.highest} step=${this.step} .value=${this.value} ?disabled=${this.disabled}
|
|
2572
3116
|
aria-valuetext=${this.shownAs(Number(this.value)||0)} aria-describedby=${this.describedBy}
|
|
2573
|
-
@input=${e=>this.setFormValue(e.target.value)} />`}},
|
|
3117
|
+
@input=${e=>this.setFormValue(e.target.value)} />`}},qi={done:"Completed","in-progress":"In progress","not-started":"Not started","cannot-start":"Cannot start yet"},It=class extends p{static{this.properties={heading:{type:String},items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},spaceAbove:{type:String,reflect:!0,attribute:"space-above"},spaceBelow:{type:String,reflect:!0,attribute:"space-below"}}}constructor(){super(),this.heading="Your application",this.items=[],this.headingLevel=2,this.spaceAbove="none",this.spaceBelow="none"}static{this.styles=[...p.styles,k,I,A("a"),h`
|
|
2574
3118
|
:host { display: block; }
|
|
2575
|
-
.h { margin: 0 0 ${
|
|
2576
|
-
.count { margin: 0 0 ${
|
|
3119
|
+
.h { margin: 0 0 ${r(2)}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
3120
|
+
.count { margin: 0 0 ${r(4)}; color: ${t.textMuted}; }
|
|
2577
3121
|
ul { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.rule}; }
|
|
2578
|
-
li { display: flex; justify-content: space-between; align-items: center; gap: ${
|
|
3122
|
+
li { display: flex; justify-content: space-between; align-items: center; gap: ${r(4)}; padding: ${r(4)} 0; border-block-end: 1px solid ${t.rule}; }
|
|
2579
3123
|
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.link}; font-weight: ${m("semibold")}; text-underline-offset: 0.2em; }
|
|
2580
3124
|
.title { font-weight: ${m("semibold")}; }
|
|
2581
|
-
.hint { display: block; ${
|
|
2582
|
-
.tag { flex-shrink: 0; padding: ${
|
|
3125
|
+
.hint { display: block; ${w("sm")} color: ${t.textMuted}; }
|
|
3126
|
+
.tag { flex-shrink: 0; padding: ${r(1)} ${r(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); ${w("sm")} font-weight: ${m("semibold")}; background: ${t.surfaceInset}; color: ${t.text}; }
|
|
2583
3127
|
.tag[data-status='done'] { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
2584
3128
|
.tag[data-status='in-progress'] { background: ${t.brandSubtle}; color: ${t.link}; }
|
|
2585
3129
|
.tag[data-status='cannot-start'] { background: transparent; color: ${t.textMuted}; }
|
|
2586
|
-
`]}render(){let e=this.items.filter(
|
|
2587
|
-
${this.heading?
|
|
2588
|
-
${this.items.length?
|
|
2589
|
-
<ul>${this.items.map(
|
|
2590
|
-
<span>${
|
|
2591
|
-
${
|
|
2592
|
-
<span class="tag" data-status=${
|
|
2593
|
-
</li>`)}</ul>`}};
|
|
3130
|
+
`]}render(){let e=this.items.filter(i=>i.status==="done").length;return s`
|
|
3131
|
+
${this.heading?s`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
3132
|
+
${this.items.length?s`<p class="count">${T(this.items.length===1?"You have completed {done} of {total} part.":"You have completed {done} of {total} parts.",{done:e,total:this.items.length})}</p>`:l}
|
|
3133
|
+
<ul>${this.items.map(i=>s`<li>
|
|
3134
|
+
<span>${i.href&&i.status!=="cannot-start"?s`<a href=${i.href} aria-describedby=${this.id_(`s-${i.id}`)}>${i.title}</a>`:s`<span class="title">${i.title}</span>`}
|
|
3135
|
+
${i.hint?s`<span class="hint">${i.hint}</span>`:l}</span>
|
|
3136
|
+
<span class="tag" data-status=${i.status} id=${this.id_(`s-${i.id}`)}>${qi[i.status]?T(qi[i.status]):i.status}</span>
|
|
3137
|
+
</li>`)}</ul>`}};j.createProperty("manual",{state:!0});j.createProperty("postcode",{state:!0});j.createProperty("searched",{state:!0});j.createProperty("busy",{state:!0});X.createProperty("files",{state:!0});X.createProperty("over",{state:!0});X.createProperty("said",{state:!0});be.createProperty("shown",{state:!0});customElements.define("impakt-address-lookup",j);customElements.define("impakt-error-summary",Lt);customElements.define("impakt-file-upload",X);customElements.define("impakt-money-input",be);customElements.define("impakt-range-input",Rt);customElements.define("impakt-task-list",It);var _t=class extends p{static{this.properties={label:{type:String},description:{type:String},href:{type:String},kind:{type:String,reflect:!0},look:{type:String,reflect:!0}}}constructor(){super(),this.label="",this.description="",this.href="",this.kind="static",this.look="default"}static{this.styles=[...p.styles,k,h`
|
|
3138
|
+
:host {
|
|
3139
|
+
display: inline-flex;
|
|
3140
|
+
flex: none;
|
|
3141
|
+
vertical-align: middle;
|
|
3142
|
+
}
|
|
3143
|
+
.chip {
|
|
3144
|
+
position: relative;
|
|
3145
|
+
display: inline-flex;
|
|
3146
|
+
align-items: center;
|
|
3147
|
+
justify-content: center;
|
|
3148
|
+
padding: 1px 5px;
|
|
3149
|
+
font-family: ${t.fontMono};
|
|
3150
|
+
font-size: ${f.small};
|
|
3151
|
+
font-weight: ${f.medium};
|
|
3152
|
+
line-height: 1.3;
|
|
3153
|
+
white-space: nowrap;
|
|
3154
|
+
color: ${t.text};
|
|
3155
|
+
background: ${t.surfaceSubtle};
|
|
3156
|
+
border: 1px solid ${t.text};
|
|
3157
|
+
border-radius: 0;
|
|
3158
|
+
text-decoration: none;
|
|
3159
|
+
}
|
|
3160
|
+
a.chip,
|
|
3161
|
+
button.chip {
|
|
3162
|
+
min-block-size: ${t.targetMin};
|
|
3163
|
+
min-inline-size: ${t.targetMin};
|
|
3164
|
+
cursor: pointer;
|
|
3165
|
+
margin: 0;
|
|
3166
|
+
}
|
|
3167
|
+
a.chip:hover,
|
|
3168
|
+
button.chip:hover {
|
|
3169
|
+
text-decoration: underline;
|
|
3170
|
+
text-underline-offset: 2px;
|
|
3171
|
+
}
|
|
3172
|
+
:host([look='on-ink']) .chip {
|
|
3173
|
+
color: #111111;
|
|
3174
|
+
background: #ffffff;
|
|
3175
|
+
border-color: #ffffff;
|
|
3176
|
+
}
|
|
3177
|
+
.visually-hidden {
|
|
3178
|
+
${S}
|
|
3179
|
+
}
|
|
3180
|
+
@media (forced-colors: active) {
|
|
3181
|
+
.chip {
|
|
3182
|
+
border-color: CanvasText;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
`]}press(){this.dispatchEvent(new CustomEvent("impakt-source",{detail:{label:this.label,description:this.description},bubbles:!0,composed:!0}))}render(){let e=this.description?this.description.includes(this.label)?this.description:`${this.label}: ${this.description}`:"",i=e||l;return this.href?s`<a class="chip" part="chip" href=${this.href} aria-label=${i}>${this.label}</a>`:this.kind==="button"?s`<button class="chip" part="chip" type="button" aria-label=${i} @click=${this.press}>${this.label}</button>`:e?s`<span class="chip" part="chip"><span aria-hidden="true">${this.label}</span><span class="visually-hidden">${e}</span></span>`:s`<span class="chip" part="chip">${this.label}</span>`}};customElements.define("impakt-source",_t);var Ht=class extends p{static{this.properties={state:{type:String,reflect:!0},label:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0},verifiedText:{type:String,attribute:"verified-text"},unverifiedText:{type:String,attribute:"unverified-text"}}}constructor(){super(),this.state="verified",this.label="",this.look="default",this.size="tool",this.verifiedText="Checked by code",this.unverifiedText="Not verified \xB7 a person must check"}static{this.styles=[...p.styles,h`
|
|
3186
|
+
/* It keeps its size in a row, but never grows past its container: at 320 the words wrap inside the mark (1.4.10). */
|
|
3187
|
+
:host {
|
|
3188
|
+
display: inline-flex;
|
|
3189
|
+
flex: 0 1 auto;
|
|
3190
|
+
min-inline-size: 0;
|
|
3191
|
+
max-inline-size: 100%;
|
|
3192
|
+
vertical-align: middle;
|
|
3193
|
+
}
|
|
3194
|
+
.label {
|
|
3195
|
+
display: inline-flex;
|
|
3196
|
+
align-items: center;
|
|
3197
|
+
gap: ${r(2)};
|
|
3198
|
+
padding: 3px 8px;
|
|
3199
|
+
font-family: ${t.fontMono};
|
|
3200
|
+
font-size: ${f.small};
|
|
3201
|
+
font-weight: ${f.medium};
|
|
3202
|
+
line-height: 1.3;
|
|
3203
|
+
overflow-wrap: anywhere;
|
|
3204
|
+
color: ${f.onInverse};
|
|
3205
|
+
background: ${f.inverse};
|
|
3206
|
+
border: 1px solid ${f.inverse};
|
|
3207
|
+
border-radius: 0;
|
|
3208
|
+
}
|
|
3209
|
+
.mark {
|
|
3210
|
+
flex: none;
|
|
3211
|
+
display: block;
|
|
3212
|
+
inline-size: 14px;
|
|
3213
|
+
block-size: 14px;
|
|
3214
|
+
}
|
|
3215
|
+
.box {
|
|
3216
|
+
fill: ${f.ok};
|
|
3217
|
+
}
|
|
3218
|
+
.tick {
|
|
3219
|
+
stroke: ${f.onOk};
|
|
3220
|
+
}
|
|
3221
|
+
:host([state='unverified']) .label {
|
|
3222
|
+
color: ${t.text};
|
|
3223
|
+
background: ${t.surfaceCard};
|
|
3224
|
+
border: 1px dashed ${t.text};
|
|
3225
|
+
}
|
|
3226
|
+
:host([state='unverified']) .box {
|
|
3227
|
+
fill: ${t.surfaceCard};
|
|
3228
|
+
stroke: ${t.text};
|
|
3229
|
+
}
|
|
3230
|
+
:host([state='unverified']) .tick {
|
|
3231
|
+
stroke: ${t.text};
|
|
3232
|
+
}
|
|
3233
|
+
:host([look='on-ink']) .label {
|
|
3234
|
+
color: #111111;
|
|
3235
|
+
background: #ffffff;
|
|
3236
|
+
border-color: #ffffff;
|
|
3237
|
+
}
|
|
3238
|
+
:host([look='on-ink'][state='unverified']) .box {
|
|
3239
|
+
fill: #ffffff;
|
|
3240
|
+
stroke: #111111;
|
|
3241
|
+
}
|
|
3242
|
+
:host([look='on-ink'][state='unverified']) .tick {
|
|
3243
|
+
stroke: #111111;
|
|
3244
|
+
}
|
|
3245
|
+
:host([size='marketing']) .label {
|
|
3246
|
+
font-size: ${f.tiny};
|
|
3247
|
+
text-transform: uppercase;
|
|
3248
|
+
letter-spacing: 0.06em;
|
|
3249
|
+
}
|
|
3250
|
+
@media (forced-colors: active) {
|
|
3251
|
+
.label {
|
|
3252
|
+
border-color: CanvasText;
|
|
3253
|
+
}
|
|
3254
|
+
.box {
|
|
3255
|
+
fill: Canvas;
|
|
3256
|
+
stroke: CanvasText;
|
|
3257
|
+
}
|
|
3258
|
+
.tick {
|
|
3259
|
+
stroke: CanvasText;
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
`]}render(){let e=this.state!=="unverified",i=e?s`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3263
|
+
<rect class="box" width="14" height="14"></rect>
|
|
3264
|
+
<path class="tick" d="M3 7.5 6 10.5 11 3.5" fill="none" stroke-width="1.5"></path>
|
|
3265
|
+
</svg>`:s`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3266
|
+
<rect class="box" x="0.5" y="0.5" width="13" height="13" stroke-width="1"></rect>
|
|
3267
|
+
<path class="tick" d="M3.5 3.5 10.5 10.5M10.5 3.5 3.5 10.5" fill="none" stroke-width="1.5"></path>
|
|
3268
|
+
</svg>`,a=this.label||(e?this.verifiedText:this.unverifiedText);return s`<span class="label" part="label">${i}<span class="text"><slot>${a}</slot></span></span>`}};customElements.define("impakt-checked",Ht);var Bt=class extends p{static{this.properties={tool:{type:String},home:{type:String},brand:{type:String},links:{type:Array},pagesLabel:{type:String,attribute:"pages-label"},switcher:{type:Array},switcherLabel:{type:String,attribute:"switcher-label"},toolsHref:{type:String,attribute:"tools-href"},organisation:{type:String},organisationItems:{type:Array,attribute:"organisation-items"},organisationHref:{type:String,attribute:"organisation-href"},signedOut:{type:Boolean,reflect:!0,attribute:"signed-out"},signInHref:{type:String,attribute:"sign-in-href"},signInText:{type:String,attribute:"sign-in-text"}}}constructor(){super(),this.tool="",this.home="/",this.brand="impakt",this.links=[],this.pagesLabel="Tool pages",this.switcher=[],this.switcherLabel="All tools",this.toolsHref="",this.organisation="Your organisation",this.organisationItems=[],this.organisationHref="",this.signedOut=!1,this.signInHref="/sign-in",this.signInText="Sign in"}static{this.styles=[...p.styles,k,A(".home, .pages a, .sign-in, a.org, .all"),h`
|
|
3269
|
+
:host {
|
|
3270
|
+
display: block;
|
|
3271
|
+
container-type: inline-size;
|
|
3272
|
+
font-family: ${t.fontBody};
|
|
3273
|
+
font-size: ${f.small};
|
|
3274
|
+
}
|
|
3275
|
+
.bar {
|
|
3276
|
+
display: grid;
|
|
3277
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
3278
|
+
grid-template-areas: 'start pages end';
|
|
3279
|
+
align-items: center;
|
|
3280
|
+
gap: ${r(2)} ${r(4)};
|
|
3281
|
+
min-block-size: 56px;
|
|
3282
|
+
padding: ${r(2)} ${r(4)};
|
|
3283
|
+
color: ${t.text};
|
|
3284
|
+
background: ${t.surfaceCard};
|
|
3285
|
+
border-block-end: 1px solid ${u("color.line.grid","light-dark(#DCDCD8, #1F1F1F)")};
|
|
3286
|
+
}
|
|
3287
|
+
.start {
|
|
3288
|
+
grid-area: start;
|
|
3289
|
+
display: flex;
|
|
3290
|
+
align-items: center;
|
|
3291
|
+
gap: ${r(2.5)};
|
|
3292
|
+
min-inline-size: 0;
|
|
3293
|
+
}
|
|
3294
|
+
.home {
|
|
3295
|
+
display: inline-flex;
|
|
3296
|
+
align-items: center;
|
|
3297
|
+
gap: ${r(2.5)};
|
|
3298
|
+
min-block-size: ${t.targetMin};
|
|
3299
|
+
color: inherit;
|
|
3300
|
+
text-decoration: none;
|
|
3301
|
+
}
|
|
3302
|
+
.home:hover .word {
|
|
3303
|
+
text-decoration: underline;
|
|
3304
|
+
text-underline-offset: 3px;
|
|
3305
|
+
}
|
|
3306
|
+
.mark {
|
|
3307
|
+
display: inline-grid;
|
|
3308
|
+
place-items: center;
|
|
3309
|
+
flex: none;
|
|
3310
|
+
inline-size: 28px;
|
|
3311
|
+
block-size: 28px;
|
|
3312
|
+
font-weight: ${f.medium};
|
|
3313
|
+
color: ${f.onInverse};
|
|
3314
|
+
background: ${f.inverse};
|
|
3315
|
+
}
|
|
3316
|
+
.sep {
|
|
3317
|
+
color: ${t.textMuted};
|
|
3318
|
+
}
|
|
3319
|
+
.tool {
|
|
3320
|
+
overflow: hidden;
|
|
3321
|
+
text-overflow: ellipsis;
|
|
3322
|
+
white-space: nowrap;
|
|
3323
|
+
}
|
|
3324
|
+
.pages {
|
|
3325
|
+
grid-area: pages;
|
|
3326
|
+
min-inline-size: 0;
|
|
3327
|
+
max-inline-size: 100%;
|
|
3328
|
+
overflow-x: auto;
|
|
3329
|
+
scrollbar-width: thin;
|
|
3330
|
+
}
|
|
3331
|
+
.pages ul {
|
|
3332
|
+
display: flex;
|
|
3333
|
+
inline-size: max-content;
|
|
3334
|
+
margin: 0;
|
|
3335
|
+
padding: 3px;
|
|
3336
|
+
list-style: none;
|
|
3337
|
+
background: ${t.surfaceSubtle};
|
|
3338
|
+
border: 1px solid ${f.lineSoft};
|
|
3339
|
+
}
|
|
3340
|
+
.pages a {
|
|
3341
|
+
display: inline-flex;
|
|
3342
|
+
align-items: center;
|
|
3343
|
+
gap: ${r(1.5)};
|
|
3344
|
+
min-block-size: 28px;
|
|
3345
|
+
padding: 0 ${r(2.5)};
|
|
3346
|
+
font-weight: ${f.regular};
|
|
3347
|
+
color: ${t.textMuted};
|
|
3348
|
+
text-decoration: none;
|
|
3349
|
+
white-space: nowrap;
|
|
3350
|
+
border: 1px solid transparent;
|
|
3351
|
+
}
|
|
3352
|
+
.pages a:hover {
|
|
3353
|
+
color: ${t.text};
|
|
3354
|
+
}
|
|
3355
|
+
.pages a[aria-current='page'] {
|
|
3356
|
+
color: ${t.text};
|
|
3357
|
+
background: ${t.surfaceCard};
|
|
3358
|
+
border-color: ${f.lineSoft};
|
|
3359
|
+
}
|
|
3360
|
+
.dot {
|
|
3361
|
+
inline-size: 5px;
|
|
3362
|
+
block-size: 5px;
|
|
3363
|
+
border-radius: 50%;
|
|
3364
|
+
background: currentColor;
|
|
3365
|
+
}
|
|
3366
|
+
.end {
|
|
3367
|
+
grid-area: end;
|
|
3368
|
+
display: flex;
|
|
3369
|
+
flex-wrap: wrap;
|
|
3370
|
+
align-items: center;
|
|
3371
|
+
justify-content: flex-end;
|
|
3372
|
+
gap: ${r(2)} ${r(3)};
|
|
3373
|
+
min-inline-size: 0;
|
|
3374
|
+
}
|
|
3375
|
+
.all {
|
|
3376
|
+
color: ${t.textMuted};
|
|
3377
|
+
text-decoration: none;
|
|
3378
|
+
display: inline-flex;
|
|
3379
|
+
align-items: center;
|
|
3380
|
+
min-block-size: ${t.targetMin};
|
|
3381
|
+
}
|
|
3382
|
+
.all:hover {
|
|
3383
|
+
color: ${t.text};
|
|
3384
|
+
text-decoration: underline;
|
|
3385
|
+
}
|
|
3386
|
+
impakt-menu.switcher::part(trigger) {
|
|
3387
|
+
padding: ${r(1)} ${r(1)};
|
|
3388
|
+
font-family: ${t.fontBody};
|
|
3389
|
+
font-size: ${f.small};
|
|
3390
|
+
font-weight: ${f.regular};
|
|
3391
|
+
color: ${t.textMuted};
|
|
3392
|
+
background: transparent;
|
|
3393
|
+
border: 0;
|
|
3394
|
+
border-radius: 0;
|
|
3395
|
+
box-shadow: none;
|
|
3396
|
+
}
|
|
3397
|
+
impakt-menu.switcher::part(trigger):hover {
|
|
3398
|
+
color: ${t.text};
|
|
3399
|
+
}
|
|
3400
|
+
impakt-menu::part(chevron) {
|
|
3401
|
+
color: inherit;
|
|
3402
|
+
}
|
|
3403
|
+
/* The switcher's panel is 320 wide (53:960), so "Your account" and its note sit on one line. */
|
|
3404
|
+
impakt-menu.switcher::part(panel) {
|
|
3405
|
+
min-inline-size: min(20rem, calc(100vw - 2 * ${r(4)}));
|
|
3406
|
+
}
|
|
3407
|
+
impakt-menu.org::part(trigger),
|
|
3408
|
+
a.org,
|
|
3409
|
+
.sign-in {
|
|
3410
|
+
display: inline-flex;
|
|
3411
|
+
align-items: center;
|
|
3412
|
+
gap: ${r(2)};
|
|
3413
|
+
padding: 9px 14px;
|
|
3414
|
+
font-family: ${t.fontBody};
|
|
3415
|
+
font-size: ${f.small};
|
|
3416
|
+
font-weight: ${f.medium};
|
|
3417
|
+
color: ${t.text};
|
|
3418
|
+
background: ${t.surfaceCard};
|
|
3419
|
+
border: 1px solid ${t.text};
|
|
3420
|
+
border-radius: 0;
|
|
3421
|
+
box-shadow: none;
|
|
3422
|
+
text-decoration: none;
|
|
3423
|
+
}
|
|
3424
|
+
impakt-menu.org::part(trigger):hover,
|
|
3425
|
+
a.org:hover,
|
|
3426
|
+
.sign-in:hover {
|
|
3427
|
+
background: ${t.surfaceSubtle};
|
|
3428
|
+
}
|
|
3429
|
+
@container (max-width: 56rem) {
|
|
3430
|
+
.bar {
|
|
3431
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3432
|
+
grid-template-areas: 'start end' 'pages pages';
|
|
3433
|
+
padding-block: ${r(2)};
|
|
3434
|
+
}
|
|
3435
|
+
}
|
|
3436
|
+
@container (max-width: 30rem) {
|
|
3437
|
+
.bar {
|
|
3438
|
+
grid-template-columns: minmax(0, 1fr);
|
|
3439
|
+
grid-template-areas: 'start' 'end' 'pages';
|
|
3440
|
+
padding-inline: ${r(4)};
|
|
3441
|
+
}
|
|
3442
|
+
.end {
|
|
3443
|
+
justify-content: flex-start;
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
@media (forced-colors: active) {
|
|
3447
|
+
.pages a[aria-current='page'] {
|
|
3448
|
+
border-color: CanvasText;
|
|
3449
|
+
}
|
|
3450
|
+
.mark {
|
|
3451
|
+
border: 1px solid CanvasText;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
`]}renderPages(){return this.links.length?s`<nav class="pages" part="pages" aria-label=${this.pagesLabel}>
|
|
3455
|
+
<ul>
|
|
3456
|
+
${this.links.map(e=>s`<li>
|
|
3457
|
+
<a href=${e.href} aria-current=${e.current?"page":l}
|
|
3458
|
+
>${e.current?s`<span class="dot" aria-hidden="true"></span>`:l}${e.label}</a
|
|
3459
|
+
>
|
|
3460
|
+
</li>`)}
|
|
3461
|
+
</ul>
|
|
3462
|
+
</nav>`:l}renderSwitcher(){return this.switcher.length?s`<impakt-menu class="switcher" edge="end" .label=${this.switcherLabel} .items=${this.switcher}></impakt-menu>`:this.toolsHref?s`<a class="all" href=${this.toolsHref}>${this.switcherLabel}</a>`:l}renderAccount(){return this.signedOut?s`<a class="sign-in" part="sign-in" href=${this.signInHref}>${this.signInText}</a>`:this.organisationItems.length?s`<impakt-menu class="org" edge="end" .label=${this.organisation} .items=${this.organisationItems}></impakt-menu>`:this.organisationHref?s`<a class="org" href=${this.organisationHref}>${this.organisation}</a>`:l}render(){return s`<header class="bar" part="bar">
|
|
3463
|
+
<div class="start">
|
|
3464
|
+
<a class="home" part="home" href=${this.home}><span class="mark" aria-hidden="true">i</span><span class="word">${this.brand}</span></a>
|
|
3465
|
+
${this.tool?s`<span class="sep" aria-hidden="true">/</span><span class="tool">${this.tool}</span>`:l}
|
|
3466
|
+
</div>
|
|
3467
|
+
${this.renderPages()}
|
|
3468
|
+
<div class="end">
|
|
3469
|
+
<slot name="extra"></slot>
|
|
3470
|
+
<slot name="tools">${this.renderSwitcher()}</slot>
|
|
3471
|
+
${this.renderAccount()}
|
|
3472
|
+
</div>
|
|
3473
|
+
</header>`}};customElements.define("impakt-app-bar",Bt);var zr=[{lang:"en",label:"EN",name:"English",href:"?lang=en"},{lang:"el",label:"EL",name:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",href:"?lang=el"},{lang:"ru",label:"RU",name:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",href:"?lang=ru"}],Nt=class extends p{static{this.properties={items:{type:Array},current:{type:String,reflect:!0},label:{type:String}}}constructor(){super(),this.items=zr,this.current="en",this.label="Language"}static{this.styles=[...p.styles,k,A("a"),h`
|
|
3474
|
+
:host {
|
|
3475
|
+
display: inline-flex;
|
|
3476
|
+
}
|
|
3477
|
+
ul {
|
|
3478
|
+
display: flex;
|
|
3479
|
+
gap: ${r(1)};
|
|
3480
|
+
margin: 0;
|
|
3481
|
+
padding: 0;
|
|
3482
|
+
list-style: none;
|
|
3483
|
+
}
|
|
3484
|
+
a {
|
|
3485
|
+
position: relative;
|
|
3486
|
+
display: inline-flex;
|
|
3487
|
+
align-items: center;
|
|
3488
|
+
justify-content: center;
|
|
3489
|
+
/* 48 by 34, as in the short-let bar (39:468). */
|
|
3490
|
+
min-inline-size: 48px;
|
|
3491
|
+
min-block-size: 34px;
|
|
3492
|
+
padding: 0 ${r(3)};
|
|
3493
|
+
font-family: ${t.fontBody};
|
|
3494
|
+
font-size: ${f.small};
|
|
3495
|
+
font-weight: ${f.medium};
|
|
3496
|
+
color: ${t.text};
|
|
3497
|
+
background: ${t.surfaceCard};
|
|
3498
|
+
border: 1px solid ${t.text};
|
|
3499
|
+
border-radius: 0;
|
|
3500
|
+
text-decoration: none;
|
|
3501
|
+
}
|
|
3502
|
+
a:hover {
|
|
3503
|
+
background: ${t.surfaceSubtle};
|
|
3504
|
+
}
|
|
3505
|
+
a[aria-current='true'] {
|
|
3506
|
+
color: ${f.onInverse};
|
|
3507
|
+
background: ${f.inverse};
|
|
3508
|
+
}
|
|
3509
|
+
.visually-hidden {
|
|
3510
|
+
${S}
|
|
3511
|
+
}
|
|
3512
|
+
@media (forced-colors: active) {
|
|
3513
|
+
a {
|
|
3514
|
+
border-color: LinkText;
|
|
3515
|
+
}
|
|
3516
|
+
a[aria-current='true'] {
|
|
3517
|
+
border-width: 3px;
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
`]}render(){return s`<nav part="nav" aria-label=${this.label}>
|
|
3521
|
+
<ul>
|
|
3522
|
+
${this.items.map(e=>s`<li>
|
|
3523
|
+
<a
|
|
3524
|
+
part="link"
|
|
3525
|
+
href=${e.href}
|
|
3526
|
+
hreflang=${e.lang}
|
|
3527
|
+
lang=${e.lang}
|
|
3528
|
+
aria-current=${e.lang===this.current?"true":l}
|
|
3529
|
+
>${e.label}${e.name?s`<span class="visually-hidden"> ${e.name}</span>`:l}</a
|
|
3530
|
+
>
|
|
3531
|
+
</li>`)}
|
|
3532
|
+
</ul>
|
|
3533
|
+
</nav>`}};customElements.define("impakt-language-switch",Nt);var di=(n,e,i)=>Math.min(i,Math.max(e,n)),ji=(n,e,i)=>i>e?(di(n,e,i)-e)/(i-e)*100:0,Ui=h`
|
|
3534
|
+
.track {
|
|
3535
|
+
position: relative;
|
|
3536
|
+
display: block;
|
|
3537
|
+
block-size: 8px;
|
|
3538
|
+
min-inline-size: 4rem;
|
|
3539
|
+
background: ${f.lineSoft};
|
|
3540
|
+
border-radius: 0;
|
|
3541
|
+
overflow: hidden;
|
|
3542
|
+
}
|
|
3543
|
+
.fill {
|
|
3544
|
+
display: block;
|
|
3545
|
+
block-size: 100%;
|
|
3546
|
+
background: ${t.text};
|
|
3547
|
+
}
|
|
3548
|
+
.figure {
|
|
3549
|
+
font-family: ${t.fontMono};
|
|
3550
|
+
font-size: ${f.small};
|
|
3551
|
+
font-variant-numeric: tabular-nums;
|
|
3552
|
+
color: ${t.text};
|
|
3553
|
+
}
|
|
3554
|
+
@media (forced-colors: active) {
|
|
3555
|
+
.track {
|
|
3556
|
+
border: 1px solid CanvasText;
|
|
3557
|
+
}
|
|
3558
|
+
.fill {
|
|
3559
|
+
background: CanvasText;
|
|
3560
|
+
forced-color-adjust: none;
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
`,Ot=class extends p{static{this.properties={label:{type:String},value:{type:Number},min:{type:Number},max:{type:Number},valueText:{type:String,attribute:"value-text"},showValue:{type:Boolean,attribute:"show-value",reflect:!0}}}constructor(){super(),this.label="",this.value=0,this.min=0,this.max=100,this.valueText="",this.showValue=!1}static{this.styles=[...p.styles,Ui,h`
|
|
3564
|
+
:host {
|
|
3565
|
+
display: block;
|
|
3566
|
+
}
|
|
3567
|
+
.head {
|
|
3568
|
+
display: flex;
|
|
3569
|
+
flex-wrap: wrap;
|
|
3570
|
+
justify-content: space-between;
|
|
3571
|
+
gap: ${r(1)} ${r(3)};
|
|
3572
|
+
margin-block-end: ${r(2)};
|
|
3573
|
+
font-size: ${f.small};
|
|
3574
|
+
}
|
|
3575
|
+
.head:empty {
|
|
3576
|
+
display: none;
|
|
3577
|
+
}
|
|
3578
|
+
`]}render(){let e=di(this.value,this.min,this.max);return s`<div class="head">${this.label?s`<span class="label" id=${this.id_("label")}>${this.label}</span>`:l}${this.showValue?s`<span class="figure" aria-hidden="true">${this.valueText||e}</span>`:l}</div><span
|
|
3579
|
+
class="track"
|
|
3580
|
+
part="track"
|
|
3581
|
+
role="meter"
|
|
3582
|
+
aria-labelledby=${this.label?this.id_("label"):l}
|
|
3583
|
+
aria-label=${this.label?l:T("Meter")}
|
|
3584
|
+
aria-valuemin=${this.min}
|
|
3585
|
+
aria-valuemax=${this.max}
|
|
3586
|
+
aria-valuenow=${e}
|
|
3587
|
+
aria-valuetext=${this.valueText||l}
|
|
3588
|
+
><span class="fill" part="fill" style=${`inline-size:${ji(e,this.min,this.max)}%`}></span
|
|
3589
|
+
></span>`}},Pt=class extends p{static{this.properties={label:{type:String},items:{type:Array},max:{type:Number}}}constructor(){super(),this.label="Scores",this.items=[],this.max=100}static{this.styles=[...p.styles,Ui,h`
|
|
3590
|
+
:host {
|
|
3591
|
+
display: block;
|
|
3592
|
+
container-type: inline-size;
|
|
3593
|
+
}
|
|
3594
|
+
ul {
|
|
3595
|
+
margin: 0;
|
|
3596
|
+
padding: 0;
|
|
3597
|
+
list-style: none;
|
|
3598
|
+
}
|
|
3599
|
+
li {
|
|
3600
|
+
display: grid;
|
|
3601
|
+
grid-template-columns: minmax(8rem, 12rem) minmax(4rem, 1fr) 3ch minmax(0, 7rem);
|
|
3602
|
+
align-items: center;
|
|
3603
|
+
gap: ${r(2)} ${r(4)};
|
|
3604
|
+
padding-block: ${r(3)};
|
|
3605
|
+
font-size: ${f.small};
|
|
3606
|
+
}
|
|
3607
|
+
.figure {
|
|
3608
|
+
text-align: end;
|
|
3609
|
+
}
|
|
3610
|
+
@container (max-width: 34rem) {
|
|
3611
|
+
li {
|
|
3612
|
+
grid-template-columns: minmax(0, 1fr) 3ch;
|
|
3613
|
+
}
|
|
3614
|
+
.name {
|
|
3615
|
+
grid-column: 1 / -1;
|
|
3616
|
+
}
|
|
3617
|
+
.pill {
|
|
3618
|
+
grid-column: 1 / -1;
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
`]}render(){return s`<ul part="list" role="list" aria-label=${this.label}>
|
|
3622
|
+
${this.items.map((e,i)=>{let a=e.max??this.max,o=di(e.value,0,a),d=this.id_(`score-${i}`);return s`<li part="row">
|
|
3623
|
+
<span class="name" id=${d}>${e.label}</span>
|
|
3624
|
+
<span class="track" part="track" role="meter" aria-labelledby=${d} aria-valuemin="0" aria-valuemax=${a} aria-valuenow=${o}
|
|
3625
|
+
><span class="fill" part="fill" style=${`inline-size:${ji(o,0,a)}%`}></span
|
|
3626
|
+
></span>
|
|
3627
|
+
<span class="figure" aria-hidden="true">${o}</span>
|
|
3628
|
+
<span class="pill">${e.status?s`<impakt-status tone=${e.tone??"warn"}>${e.status}</impakt-status>`:l}</span>
|
|
3629
|
+
</li>`})}
|
|
3630
|
+
</ul>`}};customElements.define("impakt-meter",Ot);customElements.define("impakt-score-bars",Pt);var Dt=class extends p{static{this.properties={removed:{type:String},added:{type:String},lines:{type:Array},label:{type:String},removedText:{type:String,attribute:"removed-text"},addedText:{type:String,attribute:"added-text"}}}constructor(){super(),this.removed="",this.added="",this.lines=[],this.label="Code change",this.removedText="Removed",this.addedText="Added"}static{this.styles=[...p.styles,k,h`
|
|
3631
|
+
:host {
|
|
3632
|
+
display: block;
|
|
3633
|
+
}
|
|
3634
|
+
.block {
|
|
3635
|
+
overflow-x: auto;
|
|
3636
|
+
padding: ${r(4)} ${r(4)};
|
|
3637
|
+
color: ${f.codeText};
|
|
3638
|
+
background: ${f.codeSurface};
|
|
3639
|
+
border-radius: 0;
|
|
3640
|
+
}
|
|
3641
|
+
pre {
|
|
3642
|
+
margin: 0;
|
|
3643
|
+
font-family: ${t.fontMono};
|
|
3644
|
+
font-size: ${f.small};
|
|
3645
|
+
line-height: 1.6;
|
|
3646
|
+
}
|
|
3647
|
+
code {
|
|
3648
|
+
font: inherit;
|
|
3649
|
+
}
|
|
3650
|
+
.line {
|
|
3651
|
+
position: relative;
|
|
3652
|
+
display: block;
|
|
3653
|
+
white-space: pre;
|
|
3654
|
+
}
|
|
3655
|
+
.sign {
|
|
3656
|
+
display: inline-block;
|
|
3657
|
+
inline-size: 2ch;
|
|
3658
|
+
}
|
|
3659
|
+
.removed {
|
|
3660
|
+
color: ${f.codeMuted};
|
|
3661
|
+
}
|
|
3662
|
+
.added {
|
|
3663
|
+
color: ${f.codeText};
|
|
3664
|
+
}
|
|
3665
|
+
.visually-hidden {
|
|
3666
|
+
${S}
|
|
3667
|
+
}
|
|
3668
|
+
@media (forced-colors: active) {
|
|
3669
|
+
.block {
|
|
3670
|
+
border: 1px solid CanvasText;
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3673
|
+
`]}get allLines(){if(this.lines.length)return this.lines;let e=(i,a)=>i?i.split(`
|
|
3674
|
+
`).map(o=>({kind:a,text:o})):[];return[...e(this.removed,"removed"),...e(this.added,"added")]}render(){let e={removed:"\u2212",added:"+",context:" "},i={removed:this.removedText,added:this.addedText,context:""};return s`<div class="block" part="block" role="region" aria-label=${this.label} tabindex="0"><pre part="code"><code>${this.allLines.map(a=>s`<span class="line ${a.kind}"><span class="sign" aria-hidden="true">${e[a.kind]}</span>${i[a.kind]?s`<span class="visually-hidden">${i[a.kind]}: </span>`:l}${a.text}</span>`)}</code></pre></div>`}};customElements.define("impakt-code-diff",Dt);var Ft=class extends x{static{this.properties={...x.properties,options:{type:Array},values:{type:Array},multiple:{type:Boolean,reflect:!0},look:{type:String,reflect:!0},missingText:{type:String,attribute:"missing-text"}}}constructor(){super(),this.options=[],this.values=[],this.multiple=!1,this.look="default",this.missingText="Choose an option"}static{this.styles=[...x.styles,h`
|
|
3675
|
+
fieldset {
|
|
3676
|
+
border: 0;
|
|
3677
|
+
margin: 0;
|
|
3678
|
+
padding: 0;
|
|
3679
|
+
min-inline-size: 0;
|
|
3680
|
+
}
|
|
3681
|
+
legend {
|
|
3682
|
+
padding: 0;
|
|
3683
|
+
}
|
|
3684
|
+
:host([look='site']) legend {
|
|
3685
|
+
font-family: ${t.fontMono};
|
|
3686
|
+
font-size: ${f.tiny};
|
|
3687
|
+
font-weight: ${f.medium};
|
|
3688
|
+
text-transform: uppercase;
|
|
3689
|
+
letter-spacing: 0.06em;
|
|
3690
|
+
margin-block-end: ${r(2)};
|
|
3691
|
+
}
|
|
3692
|
+
.chips {
|
|
3693
|
+
display: flex;
|
|
3694
|
+
flex-wrap: wrap;
|
|
3695
|
+
gap: ${r(1.5)};
|
|
3696
|
+
}
|
|
3697
|
+
.chip {
|
|
3698
|
+
position: relative;
|
|
3699
|
+
display: inline-flex;
|
|
3700
|
+
align-items: center;
|
|
3701
|
+
min-block-size: 35px;
|
|
3702
|
+
padding: 0 ${r(3)};
|
|
3703
|
+
font-family: ${t.fontBody};
|
|
3704
|
+
font-size: ${f.small};
|
|
3705
|
+
color: ${t.text};
|
|
3706
|
+
background: ${t.surfaceCard};
|
|
3707
|
+
border: 1px solid ${t.text};
|
|
3708
|
+
border-radius: 0;
|
|
3709
|
+
cursor: pointer;
|
|
3710
|
+
}
|
|
3711
|
+
.chip input {
|
|
3712
|
+
position: absolute;
|
|
3713
|
+
inset: 0;
|
|
3714
|
+
inline-size: 100%;
|
|
3715
|
+
block-size: 100%;
|
|
3716
|
+
margin: 0;
|
|
3717
|
+
opacity: 0;
|
|
3718
|
+
cursor: inherit;
|
|
3719
|
+
}
|
|
3720
|
+
.chip:hover {
|
|
3721
|
+
background: ${t.surfaceSubtle};
|
|
3722
|
+
}
|
|
3723
|
+
.chip.on {
|
|
3724
|
+
color: ${f.onInverse};
|
|
3725
|
+
background: ${f.inverse};
|
|
3726
|
+
}
|
|
3727
|
+
.chip:has(input:focus-visible) {
|
|
3728
|
+
outline: 2px solid transparent;
|
|
3729
|
+
outline-offset: ${t.focusOffset};
|
|
3730
|
+
box-shadow: ${t.focusShadow};
|
|
3731
|
+
}
|
|
3732
|
+
:host([disabled]) .chip {
|
|
3733
|
+
opacity: 0.6;
|
|
3734
|
+
cursor: not-allowed;
|
|
3735
|
+
}
|
|
3736
|
+
:host([invalid]) .chip {
|
|
3737
|
+
border-color: ${t.danger};
|
|
3738
|
+
}
|
|
3739
|
+
@media (pointer: coarse) {
|
|
3740
|
+
.chip {
|
|
3741
|
+
min-block-size: 44px;
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
@media (forced-colors: active) {
|
|
3745
|
+
.chip {
|
|
3746
|
+
border-color: ButtonText;
|
|
3747
|
+
}
|
|
3748
|
+
.chip.on {
|
|
3749
|
+
forced-color-adjust: none;
|
|
3750
|
+
color: HighlightText;
|
|
3751
|
+
background: Highlight;
|
|
3752
|
+
border-color: Highlight;
|
|
3753
|
+
}
|
|
3754
|
+
.chip:has(input:focus-visible) {
|
|
3755
|
+
outline-color: Highlight;
|
|
3756
|
+
}
|
|
3757
|
+
}
|
|
3758
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
3759
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
3760
|
+
</legend>`}chosen(e){return this.multiple?this.values.includes(e):this.value===e}choose(e,i){if(this.multiple){let a=i?[...this.values,e]:this.values.filter(o=>o!==e);this.values=this.options.filter(o=>a.includes(o.value)).map(o=>o.value),this.setFormValue(this.values.join(","))}else this.setFormValue(e);this.syncValidity()}syncValidity(){let e=this.multiple?this.values.length===0:!this.value;try{if(this.required&&e){let i=this.renderRoot?.querySelector?.("input")??void 0;this.internals?.setValidity({valueMissing:!0},this.missingText,i)}else this.internals?.setValidity({})}catch{}}renderControl(){let e=this.multiple?"checkbox":"radio";return s`<div class="chips">
|
|
3761
|
+
${this.options.map((i,a)=>{let o=this.chosen(i.value);return s`<label class="chip ${o?"on":""}" part="chip">
|
|
3762
|
+
<input
|
|
3763
|
+
type=${e}
|
|
3764
|
+
id=${a===0?this.controlId:this.id_(`opt-${a}`)}
|
|
3765
|
+
name=${this.uid}
|
|
3766
|
+
value=${i.value}
|
|
3767
|
+
.checked=${o}
|
|
3768
|
+
?disabled=${this.disabled}
|
|
3769
|
+
?required=${!this.multiple&&this.required&&a===0}
|
|
3770
|
+
@change=${d=>this.choose(i.value,d.target.checked)}
|
|
3771
|
+
/><span>${i.label}</span>
|
|
3772
|
+
</label>`})}
|
|
3773
|
+
</div>`}render(){return s`
|
|
3774
|
+
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
3775
|
+
${this.renderLabel()}
|
|
3776
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
3777
|
+
${this.renderControl()}
|
|
3778
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
3779
|
+
</fieldset>
|
|
3780
|
+
`}firstUpdated(){let e=this.multiple?this.values.join(","):this.value;this.internals?.setFormValue(e||null),this.syncValidity()}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error),(e.has("required")||e.has("multiple"))&&this.syncValidity()}formResetCallback(){this.value="",this.values=[],this.internals?.setFormValue(null),this.syncValidity()}};customElements.define("impakt-chip-group",Ft);var qt=class extends p{static{this.properties={label:{type:String},look:{type:String,reflect:!0},redactedText:{type:String,attribute:"redacted-text"}}}constructor(){super(),this.label="",this.look="solid",this.redactedText="Redacted"}static{this.styles=[...p.styles,h`
|
|
3781
|
+
:host {
|
|
3782
|
+
display: inline;
|
|
3783
|
+
}
|
|
3784
|
+
.tag {
|
|
3785
|
+
position: relative;
|
|
3786
|
+
display: inline-block;
|
|
3787
|
+
padding: 1px 8px;
|
|
3788
|
+
font-family: ${t.fontMono};
|
|
3789
|
+
font-size: ${f.small};
|
|
3790
|
+
font-weight: ${f.medium};
|
|
3791
|
+
line-height: 1.4;
|
|
3792
|
+
white-space: nowrap;
|
|
3793
|
+
color: ${f.onInverse};
|
|
3794
|
+
background: ${f.inverse};
|
|
3795
|
+
border: 1px solid ${f.inverse};
|
|
3796
|
+
border-radius: 0;
|
|
3797
|
+
user-select: none;
|
|
3798
|
+
}
|
|
3799
|
+
:host([look='outline']) .tag {
|
|
3800
|
+
color: ${t.text};
|
|
3801
|
+
background: ${t.surfaceCard};
|
|
3802
|
+
border-color: ${t.text};
|
|
3803
|
+
}
|
|
3804
|
+
.visually-hidden {
|
|
3805
|
+
${S}
|
|
3806
|
+
}
|
|
3807
|
+
@media (forced-colors: active) {
|
|
3808
|
+
.tag {
|
|
3809
|
+
border-color: CanvasText;
|
|
3810
|
+
}
|
|
3811
|
+
}
|
|
3812
|
+
`]}render(){return s`<span class="tag" part="tag"><span class="visually-hidden">${this.redactedText}: </span>${this.label}</span>`}};customElements.define("impakt-redaction",qt);var jt=class extends p{static{this.properties={name:{type:String},description:{type:String},status:{type:String},statusTone:{type:String,attribute:"status-tone"},note:{type:String},href:{type:String},actionLabel:{type:String,attribute:"action-label"},owned:{type:Boolean,reflect:!0},state:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},comingSoonText:{type:String,attribute:"coming-soon-text"},notOpenText:{type:String,attribute:"not-open-text"}}}constructor(){super(),this.name="",this.description="",this.status="",this.statusTone="ok",this.note="",this.href="",this.actionLabel="",this.owned=!1,this.state="open",this.headingLevel=3,this.comingSoonText="Coming soon",this.notOpenText="Not open yet."}static{this.styles=[...p.styles,k,h`
|
|
3813
|
+
:host {
|
|
3814
|
+
display: block;
|
|
3815
|
+
}
|
|
3816
|
+
.card {
|
|
3817
|
+
display: flex;
|
|
3818
|
+
flex-direction: column;
|
|
3819
|
+
gap: ${r(4)};
|
|
3820
|
+
block-size: 100%;
|
|
3821
|
+
padding: ${r(6)};
|
|
3822
|
+
background: ${t.surfaceCard};
|
|
3823
|
+
border: 1px solid ${t.text};
|
|
3824
|
+
border-radius: 0;
|
|
3825
|
+
}
|
|
3826
|
+
:host([state='coming-soon']) .card {
|
|
3827
|
+
background: ${t.surfaceSubtle};
|
|
3828
|
+
}
|
|
3829
|
+
.name {
|
|
3830
|
+
margin: 0;
|
|
3831
|
+
font-family: ${t.fontHeading};
|
|
3832
|
+
font-size: 2rem;
|
|
3833
|
+
font-weight: ${f.medium};
|
|
3834
|
+
line-height: 1.1;
|
|
3835
|
+
letter-spacing: ${t.trackingTight};
|
|
3836
|
+
color: ${t.text};
|
|
3837
|
+
overflow-wrap: anywhere;
|
|
3838
|
+
}
|
|
3839
|
+
:host([state='coming-soon']) .name {
|
|
3840
|
+
color: ${t.textMuted};
|
|
3841
|
+
}
|
|
3842
|
+
.description {
|
|
3843
|
+
margin: 0;
|
|
3844
|
+
color: ${t.textMuted};
|
|
3845
|
+
}
|
|
3846
|
+
.status {
|
|
3847
|
+
display: flex;
|
|
3848
|
+
flex-wrap: wrap;
|
|
3849
|
+
align-items: center;
|
|
3850
|
+
gap: ${r(2)} ${r(2.5)};
|
|
3851
|
+
}
|
|
3852
|
+
.note {
|
|
3853
|
+
font-family: ${t.fontMono};
|
|
3854
|
+
font-size: ${f.small};
|
|
3855
|
+
color: ${t.textMuted};
|
|
3856
|
+
}
|
|
3857
|
+
.muted {
|
|
3858
|
+
margin: 0;
|
|
3859
|
+
font-size: ${f.small};
|
|
3860
|
+
color: ${t.textMuted};
|
|
3861
|
+
}
|
|
3862
|
+
.action {
|
|
3863
|
+
display: flex;
|
|
3864
|
+
align-items: center;
|
|
3865
|
+
justify-content: space-between;
|
|
3866
|
+
gap: ${r(3)};
|
|
3867
|
+
min-block-size: 46px;
|
|
3868
|
+
margin-block-start: auto;
|
|
3869
|
+
padding: ${r(2.5)} ${r(5)};
|
|
3870
|
+
font-family: ${t.fontBody};
|
|
3871
|
+
font-size: ${u("font.size.md","1rem")};
|
|
3872
|
+
color: ${t.text};
|
|
3873
|
+
background: ${t.surfaceCard};
|
|
3874
|
+
border: 1px solid ${t.text};
|
|
3875
|
+
border-radius: 0;
|
|
3876
|
+
text-decoration: none;
|
|
3877
|
+
}
|
|
3878
|
+
.action:hover {
|
|
3879
|
+
background: ${t.surfaceSubtle};
|
|
3880
|
+
}
|
|
3881
|
+
:host([owned]) .action {
|
|
3882
|
+
color: ${f.onInverse};
|
|
3883
|
+
background: ${f.inverse};
|
|
3884
|
+
}
|
|
3885
|
+
:host([owned]) .action:hover {
|
|
3886
|
+
background: color-mix(in srgb, ${f.inverse} 88%, ${f.onInverse});
|
|
3887
|
+
}
|
|
3888
|
+
.arrow {
|
|
3889
|
+
font-size: 1.25em;
|
|
3890
|
+
line-height: 1;
|
|
3891
|
+
}
|
|
3892
|
+
@media (forced-colors: active) {
|
|
3893
|
+
.card,
|
|
3894
|
+
.action {
|
|
3895
|
+
border-color: CanvasText;
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
`]}renderStatus(){return this.state==="coming-soon"?s`<div class="status"><impakt-status tone="neutral">${this.comingSoonText}</impakt-status></div>
|
|
3899
|
+
<p class="muted">${this.notOpenText}</p>`:!this.status&&!this.note?l:s`<div class="status">
|
|
3900
|
+
${this.status?s`<impakt-status tone=${this.statusTone}>${this.status}</impakt-status>`:l}
|
|
3901
|
+
${this.note?s`<span class="note">${this.note}</span>`:l}
|
|
3902
|
+
</div>`}render(){let e=Math.min(6,Math.max(2,Number(this.headingLevel)||3)),i=this.actionLabel||`Open ${this.name}`;return s`<article class="card" part="card" aria-labelledby=${this.id_("name")}>
|
|
3903
|
+
<div class="name" role="heading" aria-level=${e} id=${this.id_("name")}>${this.name}</div>
|
|
3904
|
+
${this.description?s`<p class="description">${this.description}</p>`:l}
|
|
3905
|
+
${this.renderStatus()}
|
|
3906
|
+
${this.state!=="coming-soon"&&this.href?s`<a class="action" part="action" href=${this.href}><span>${i}</span><span class="arrow" aria-hidden="true">→</span></a>`:l}
|
|
3907
|
+
</article>`}};customElements.define("impakt-tool-card",jt);export{he as CYCLE,x as FieldElement,ti as ICONS,pr as ICON_NAMES,rt as ImpaktAccordion,j as ImpaktAddressLookup,Ue as ImpaktAlert,Bt as ImpaktAppBar,_e as ImpaktAppShell,Mt as ImpaktAvatar,Et as ImpaktAvatarGroup,ot as ImpaktBadge,ft as ImpaktBreadcrumbs,Ee as ImpaktButton,Ve as ImpaktCard,Le as ImpaktCheckbox,lt as ImpaktCheckboxGroup,Ht as ImpaktChecked,st as ImpaktChip,Ft as ImpaktChipGroup,Dt as ImpaktCodeDiff,dt as ImpaktDateInput,Oe as ImpaktDateTile,ct as ImpaktDialog,$t as ImpaktDivider,Je as ImpaktDocumentLink,wt as ImpaktDrawer,p as ImpaktElement,At as ImpaktEmptyState,Lt as ImpaktErrorSummary,vt as ImpaktFieldset,X as ImpaktFileUpload,De as ImpaktFilterChip,ht as ImpaktGrid,Ke as ImpaktHeading,ut as ImpaktHelp,Me as ImpaktIcon,Xe as ImpaktImage,Nt as ImpaktLanguageSwitch,Ye as ImpaktLink,pt as ImpaktList,Ze as ImpaktLogo,St as ImpaktMenu,Ot as ImpaktMeter,be as ImpaktMoneyInput,bt as ImpaktNav,mt as ImpaktPage,zt as ImpaktPagination,Qe as ImpaktPrice,at as ImpaktProgress,je as ImpaktRadioGroup,Rt as ImpaktRangeInput,qt as ImpaktRedaction,Pe as ImpaktRow,Pt as ImpaktScoreBars,gt as ImpaktSection,qe as ImpaktSegmentedControl,Ce as ImpaktSelect,Re as ImpaktSideNav,Ct as ImpaktSlotPicker,_t as ImpaktSource,xt as ImpaktSpacer,We as ImpaktStack,Ne as ImpaktStatTile,He as ImpaktStatus,et as ImpaktSummaryList,Fe as ImpaktSwitch,Ie as ImpaktTabBar,tt as ImpaktTable,kt as ImpaktTabs,It as ImpaktTaskList,Ge as ImpaktText,Ae as ImpaktTextInput,nt as ImpaktTextarea,Tt as ImpaktToast,jt as ImpaktToolCard,yt as ImpaktVisuallyHidden,F as LitElement,pe as TONE,de as announceNavigate,Hi as base,h as css,N as fieldWidths,k as focusRing,b as fontSize,m as fontWeight,ni as groupDigits,Bi as hideOn,s as html,M as iconSvg,ri as isCurrent,H as lineHeight,ge as lockScroll,_ as noChange,l as nothing,B as pageLocale,_i as reducedMotion,se as render,T as say,r as space,I as spaceAround,y as svg,t,z as targetSize,u as token,ai as toneOf,A as touchTarget,w as type,Y as unlockScroll,C as unsafeCSS,S as visuallyHidden};
|
|
2594
3908
|
/*! Bundled license information:
|
|
2595
3909
|
|
|
2596
3910
|
lit-html/lit-html.js:
|