@atomic-ui/ui 0.10.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9631 -6026
- 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-4MMRBNW7.js +104 -0
- package/dist/chunk-4MMRBNW7.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-BAYSDP44.js} +52 -30
- package/dist/chunk-BAYSDP44.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-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-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-UBNCJROR.js +294 -0
- package/dist/chunk-UBNCJROR.js.map +1 -0
- 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.d.ts +6 -0
- 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 +2030 -692
- 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 +0 -97
- 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,25 +1,25 @@
|
|
|
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.1, 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,Si=n=>n?._$litType$?.h!=null;var Ti=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(Si(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=Ti(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 Se=globalThis,Te=Se.ShadowRoot&&(Se.ShadyCSS===void 0||Se.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(Te&&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(Te)n.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let a=document.createElement("style"),o=Se.litNonce;o!==void 0&&a.setAttribute("nonce",o),a.textContent=i.cssText,n.appendChild(a)}},Jt=Te?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
|
`,T=h`
|
|
@@ -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 S(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=S(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,17 +215,17 @@ 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
|
${T}
|
|
@@ -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,17 +330,17 @@ 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;
|
|
@@ -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,42 @@ 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},size:{type:String,reflect:!0}}}constructor(){super(),this.width="full",this.options=[],this.placeholder="Choose an option",this.hideLabel=!1,this.size="md"}static{this.styles=[...x.styles,N,Q("select"),h`
|
|
406
433
|
:host([hide-label]) .label {
|
|
407
434
|
${T}
|
|
408
435
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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;
|
|
436
|
+
/* A compact box sits inline, in a toolbar, so it has none of a form field's spacing under it. */
|
|
437
|
+
:host([size='sm']) {
|
|
438
|
+
margin-block-end: 0;
|
|
421
439
|
}
|
|
422
|
-
|
|
423
|
-
|
|
440
|
+
/* A compact box is as wide as its longest option, as a filter in a toolbar is. */
|
|
441
|
+
:host([size='sm']) .box {
|
|
442
|
+
inline-size: max-content;
|
|
443
|
+
max-inline-size: 100%;
|
|
424
444
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
445
|
+
:host([size='sm']) select {
|
|
446
|
+
inline-size: auto;
|
|
447
|
+
min-block-size: 32px;
|
|
448
|
+
padding-block: 4px;
|
|
449
|
+
padding-inline-start: 10px;
|
|
450
|
+
font-size: 14px;
|
|
429
451
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
452
|
+
/* Nothing under a compact box until there is an error to show, so it lines up with the chips beside it. */
|
|
453
|
+
:host([size='sm']) .error:empty {
|
|
454
|
+
margin: 0;
|
|
433
455
|
}
|
|
434
|
-
:host([
|
|
435
|
-
|
|
436
|
-
|
|
456
|
+
:host([size='sm']) .caret {
|
|
457
|
+
inset-inline-end: 10px;
|
|
458
|
+
font-size: 12px;
|
|
437
459
|
}
|
|
438
|
-
|
|
439
|
-
|
|
460
|
+
/* The browser's own arrow is replaced by a small "▾", drawn beside the box's end and hidden from screen readers. */
|
|
461
|
+
.box { position: relative; display: block; inline-size: min(100%, var(--impakt-field-width)); }
|
|
462
|
+
select { inline-size: 100%; appearance: none; -webkit-appearance: none; padding-inline-end: ${r(9)}; cursor: pointer; }
|
|
463
|
+
.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; }
|
|
464
|
+
/* A forced colours mode draws the box in the system colours; the caret takes the text colour. */
|
|
465
|
+
@media (forced-colors: active) { .caret { color: CanvasText; } }
|
|
466
|
+
`]}renderControl(){return s`
|
|
467
|
+
<span class="box" part="box"><select
|
|
440
468
|
id=${this.controlId}
|
|
441
469
|
part="select"
|
|
442
470
|
name=${this.name||l}
|
|
@@ -447,17 +475,17 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
447
475
|
@change=${e=>this.setFormValue(e.target.value)}
|
|
448
476
|
>
|
|
449
477
|
<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",
|
|
478
|
+
${this.options.map(e=>s`<option value=${e.value} ?selected=${this.value===e.value}>${e.label}</option>`)}
|
|
479
|
+
</select><span class="caret" aria-hidden="true">▾</span></span>
|
|
480
|
+
`}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
481
|
.row {
|
|
454
482
|
display: flex;
|
|
455
483
|
align-items: flex-start;
|
|
456
|
-
gap: ${
|
|
484
|
+
gap: ${r(3)};
|
|
457
485
|
cursor: pointer;
|
|
458
486
|
}
|
|
459
487
|
input {
|
|
460
|
-
${
|
|
488
|
+
${z}
|
|
461
489
|
inline-size: 20px;
|
|
462
490
|
block-size: 20px;
|
|
463
491
|
margin: 0;
|
|
@@ -470,7 +498,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
470
498
|
:host([invalid]) .row {
|
|
471
499
|
color: ${t.dangerText};
|
|
472
500
|
}
|
|
473
|
-
`]}renderControl(){return
|
|
501
|
+
`]}renderControl(){return s`
|
|
474
502
|
<label class="row" part="row" for=${this.controlId}>
|
|
475
503
|
<input
|
|
476
504
|
type="checkbox"
|
|
@@ -485,20 +513,20 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
485
513
|
@change=${e=>{this.checked=e.target.checked,this.setFormValue(this.checked?"on":"")}}
|
|
486
514
|
/>
|
|
487
515
|
<span class="text">
|
|
488
|
-
${this.label}${this.required?
|
|
516
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
489
517
|
</span>
|
|
490
518
|
</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: ${
|
|
519
|
+
`}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`
|
|
520
|
+
:host { display: flex; flex-direction: column; gap: ${r(5)}; block-size: 100%; }
|
|
521
|
+
.card { padding: ${r(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }
|
|
522
|
+
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${r(.5)}; }
|
|
495
523
|
a {
|
|
496
|
-
${
|
|
524
|
+
${z}
|
|
497
525
|
display: flex;
|
|
498
526
|
align-items: center;
|
|
499
|
-
gap: ${
|
|
527
|
+
gap: ${r(3)};
|
|
500
528
|
min-block-size: 44px;
|
|
501
|
-
padding: 0 ${
|
|
529
|
+
padding: 0 ${r(3.5)};
|
|
502
530
|
border-radius: ${t.radiusLg};
|
|
503
531
|
color: ${t.text};
|
|
504
532
|
font-size: ${b("md")};
|
|
@@ -513,35 +541,35 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
513
541
|
.footer.empty { display: none; }
|
|
514
542
|
@media (prefers-reduced-motion: reduce) { a { transition: none; } }
|
|
515
543
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
516
|
-
`]}onFooter(
|
|
544
|
+
`]}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
545
|
<nav class="card" aria-label=${this.label} part="nav">
|
|
518
546
|
<ul part="list">
|
|
519
|
-
${this.items.map(
|
|
547
|
+
${this.items.map(i=>s`
|
|
520
548
|
<li>
|
|
521
549
|
<a
|
|
522
|
-
href=${
|
|
550
|
+
href=${i.href}
|
|
523
551
|
part="link"
|
|
524
|
-
aria-current=${
|
|
525
|
-
@click=${
|
|
526
|
-
>${
|
|
552
|
+
aria-current=${ri(i.href,this.current)?"page":l}
|
|
553
|
+
@click=${a=>de(this,a,i)}
|
|
554
|
+
>${M(i.icon,"20px")}<span>${i.label}</span></a>
|
|
527
555
|
</li>
|
|
528
556
|
`)}
|
|
529
557
|
</ul>
|
|
530
558
|
</nav>
|
|
531
559
|
<div class="card footer ${this.footerFilled?"":"empty"}" part="footer"><slot name="footer" @slotchange=${this.onFooter}></slot></div>
|
|
532
|
-
`}},
|
|
560
|
+
`}},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
561
|
:host { display: block; }
|
|
534
|
-
nav { padding: ${
|
|
535
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
562
|
+
nav { padding: ${r(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }
|
|
563
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${r(1)}; }
|
|
536
564
|
li { flex: 1 1 0; min-inline-size: 0; }
|
|
537
565
|
a {
|
|
538
566
|
display: flex;
|
|
539
567
|
flex-direction: column;
|
|
540
568
|
align-items: center;
|
|
541
569
|
justify-content: center;
|
|
542
|
-
gap: ${
|
|
570
|
+
gap: ${r(1)};
|
|
543
571
|
min-block-size: 50px;
|
|
544
|
-
padding: ${
|
|
572
|
+
padding: ${r(1)};
|
|
545
573
|
border-radius: ${t.radiusLg};
|
|
546
574
|
/* The resting items are a blend of the card and text colours that keeps 4.5:1 on the bar. */
|
|
547
575
|
color: color-mix(in srgb, ${t.surfaceCard} 74%, ${t.text});
|
|
@@ -555,22 +583,22 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
555
583
|
a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }
|
|
556
584
|
span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
557
585
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
558
|
-
`]}render(){return
|
|
586
|
+
`]}render(){return s`
|
|
559
587
|
<nav aria-label=${this.label} part="nav">
|
|
560
588
|
<ul part="list">
|
|
561
|
-
${this.items.map(e=>
|
|
589
|
+
${this.items.map(e=>s`
|
|
562
590
|
<li>
|
|
563
591
|
<a
|
|
564
592
|
href=${e.href}
|
|
565
593
|
part="link"
|
|
566
|
-
aria-current=${
|
|
567
|
-
@click=${
|
|
568
|
-
>${
|
|
594
|
+
aria-current=${ri(e.href,this.current)?"page":l}
|
|
595
|
+
@click=${i=>de(this,i,e)}
|
|
596
|
+
>${M(e.icon,"22px")}<span class="word">${e.label}</span></a>
|
|
569
597
|
</li>
|
|
570
598
|
`)}
|
|
571
599
|
</ul>
|
|
572
600
|
</nav>
|
|
573
|
-
`}},
|
|
601
|
+
`}},_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
602
|
:host {
|
|
575
603
|
display: block;
|
|
576
604
|
min-block-size: 100svh;
|
|
@@ -587,30 +615,30 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
587
615
|
grid-template-columns: var(--impakt-shell-side, 190px) minmax(0, 1fr);
|
|
588
616
|
grid-template-rows: auto 1fr;
|
|
589
617
|
grid-template-areas: 'brand top' 'side main';
|
|
590
|
-
gap: ${
|
|
591
|
-
min-block-size: calc(100svh - 2 * ${
|
|
592
|
-
margin: ${
|
|
593
|
-
padding: ${
|
|
618
|
+
gap: ${r(5)};
|
|
619
|
+
min-block-size: calc(100svh - 2 * ${r(5)});
|
|
620
|
+
margin: ${r(5)};
|
|
621
|
+
padding: ${r(5)};
|
|
594
622
|
border-radius: var(--impakt-shell-radius, 36px);
|
|
595
623
|
background: ${u("color.surface.page","#f2f5f4")};
|
|
596
624
|
}
|
|
597
625
|
.brand { grid-area: brand; display: flex; align-items: center; min-block-size: 52px; }
|
|
598
626
|
.side { grid-area: side; display: flex; flex-direction: column; min-block-size: 0; }
|
|
599
627
|
.side ::slotted(*) { flex: 1; }
|
|
600
|
-
header { grid-area: top; display: flex; align-items: center; gap: ${
|
|
628
|
+
header { grid-area: top; display: flex; align-items: center; gap: ${r(5)}; min-inline-size: 0; }
|
|
601
629
|
.workspace { flex: none; }
|
|
602
630
|
.search { flex: 1 1 auto; display: flex; justify-content: center; min-inline-size: 0; }
|
|
603
631
|
.search ::slotted(*) { inline-size: min(100%, 420px); }
|
|
604
|
-
.actions { flex: none; display: flex; align-items: center; gap: ${
|
|
632
|
+
.actions { flex: none; display: flex; align-items: center; gap: ${r(3)}; }
|
|
605
633
|
main { grid-area: main; min-inline-size: 0; }
|
|
606
634
|
main:focus { outline: none; }
|
|
607
635
|
.phone-header, .tab-bar { display: none; }
|
|
608
636
|
.skip {
|
|
609
637
|
position: absolute;
|
|
610
|
-
inset-inline-start: ${
|
|
611
|
-
inset-block-start: ${
|
|
638
|
+
inset-inline-start: ${r(2)};
|
|
639
|
+
inset-block-start: ${r(2)};
|
|
612
640
|
z-index: 20;
|
|
613
|
-
padding: ${
|
|
641
|
+
padding: ${r(2)} ${r(4)};
|
|
614
642
|
background: ${t.surfaceCard};
|
|
615
643
|
color: ${t.link};
|
|
616
644
|
border-radius: ${t.radius};
|
|
@@ -619,7 +647,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
619
647
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
620
648
|
.skip:focus { transform: none; }
|
|
621
649
|
|
|
622
|
-
@media (max-width: ${
|
|
650
|
+
@media (max-width: ${hr}) {
|
|
623
651
|
:host { background: ${t.text}; }
|
|
624
652
|
.frame {
|
|
625
653
|
display: flex;
|
|
@@ -637,7 +665,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
637
665
|
reads light without being told. */
|
|
638
666
|
.phone-header {
|
|
639
667
|
display: block;
|
|
640
|
-
padding: calc(${
|
|
668
|
+
padding: calc(${r(4)} + env(safe-area-inset-top)) ${r(5)} ${r(10)};
|
|
641
669
|
color: var(--impakt-shell-paper);
|
|
642
670
|
--impakt-color-text-default: var(--impakt-shell-paper);
|
|
643
671
|
--impakt-color-text-heading: var(--impakt-shell-paper);
|
|
@@ -647,9 +675,9 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
647
675
|
main {
|
|
648
676
|
position: relative;
|
|
649
677
|
flex: 1;
|
|
650
|
-
margin-block-start: calc(-1 * ${
|
|
678
|
+
margin-block-start: calc(-1 * ${r(6)});
|
|
651
679
|
/* Room for the floating tab bar, so the last of the content can scroll clear of it. */
|
|
652
|
-
padding: ${
|
|
680
|
+
padding: ${r(4)} ${r(4)} calc(96px + env(safe-area-inset-bottom));
|
|
653
681
|
border-radius: 28px 28px 0 0;
|
|
654
682
|
background: ${u("color.surface.page","#f2f5f4")};
|
|
655
683
|
}
|
|
@@ -657,11 +685,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
657
685
|
display: block;
|
|
658
686
|
position: fixed;
|
|
659
687
|
z-index: 10;
|
|
660
|
-
inset-inline: ${
|
|
661
|
-
inset-block-end: calc(${
|
|
688
|
+
inset-inline: ${r(4)};
|
|
689
|
+
inset-block-end: calc(${r(3)} + env(safe-area-inset-bottom));
|
|
662
690
|
}
|
|
663
691
|
}
|
|
664
|
-
`]}skip(e){e.preventDefault();let
|
|
692
|
+
`]}skip(e){e.preventDefault();let i=this.renderRoot.querySelector("main");i?.focus(),i?.scrollIntoView()}render(){return s`
|
|
665
693
|
<div class="frame" part="frame">
|
|
666
694
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
667
695
|
<div class="brand" part="brand"><slot name="brand"></slot></div>
|
|
@@ -675,37 +703,107 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
675
703
|
<main id="content" tabindex="-1" part="main"><slot></slot></main>
|
|
676
704
|
<div class="tab-bar" part="tab-bar"><slot name="tab-bar"></slot></div>
|
|
677
705
|
</div>
|
|
678
|
-
`}};customElements.define("impakt-side-nav",
|
|
706
|
+
`}};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`
|
|
707
|
+
/* 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). */
|
|
708
|
+
:host {
|
|
709
|
+
display: inline-flex;
|
|
710
|
+
flex: 0 1 auto;
|
|
711
|
+
min-inline-size: 0;
|
|
712
|
+
max-inline-size: 100%;
|
|
713
|
+
vertical-align: middle;
|
|
714
|
+
}
|
|
715
|
+
.pill {
|
|
716
|
+
display: inline-flex;
|
|
717
|
+
align-items: center;
|
|
718
|
+
gap: ${r(1.5)};
|
|
719
|
+
padding: 3px ${r(2)};
|
|
720
|
+
font-family: ${t.fontMono};
|
|
721
|
+
font-size: ${f.small};
|
|
722
|
+
font-weight: ${f.medium};
|
|
723
|
+
line-height: 1.3;
|
|
724
|
+
overflow-wrap: anywhere;
|
|
725
|
+
color: ${t.text};
|
|
726
|
+
background: ${t.surfaceCard};
|
|
727
|
+
border: 1px solid ${t.text};
|
|
728
|
+
border-radius: 0;
|
|
729
|
+
}
|
|
730
|
+
.dot {
|
|
731
|
+
flex: none;
|
|
732
|
+
inline-size: 7px;
|
|
733
|
+
block-size: 7px;
|
|
734
|
+
border-radius: 50%;
|
|
735
|
+
background: currentColor;
|
|
736
|
+
}
|
|
737
|
+
:host([tone='ok']) .dot {
|
|
738
|
+
background: ${f.ok};
|
|
739
|
+
}
|
|
740
|
+
:host([tone='bad']) .dot {
|
|
741
|
+
background: ${f.bad};
|
|
742
|
+
}
|
|
743
|
+
:host([tone='warn']) .dot {
|
|
744
|
+
background: ${f.accent};
|
|
745
|
+
border: 1px solid ${t.text};
|
|
746
|
+
}
|
|
747
|
+
:host([tone='solid']) .pill {
|
|
748
|
+
color: ${f.onInverse};
|
|
749
|
+
background: ${f.inverse};
|
|
750
|
+
border-color: ${f.inverse};
|
|
751
|
+
}
|
|
752
|
+
:host([size='marketing']) .pill {
|
|
753
|
+
font-size: ${f.tiny};
|
|
754
|
+
text-transform: uppercase;
|
|
755
|
+
letter-spacing: 0.06em;
|
|
756
|
+
}
|
|
757
|
+
@media (forced-colors: active) {
|
|
758
|
+
.dot {
|
|
759
|
+
background: CanvasText;
|
|
760
|
+
forced-color-adjust: none;
|
|
761
|
+
}
|
|
762
|
+
.pill {
|
|
763
|
+
border-color: CanvasText;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
`]}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}
|
|
767
|
+
>${this.hasDot?s`<span class="dot" part="dot" aria-hidden="true"></span>`:l}<span class="text"><slot>${this.label}</slot></span></span
|
|
768
|
+
>`}};customElements.define("impakt-status",He);var ur=["ok","bad","warn","info","neutral","solid"],Be=h`
|
|
769
|
+
.status-pill {
|
|
770
|
+
flex: none;
|
|
771
|
+
inline-size: fit-content;
|
|
772
|
+
}
|
|
773
|
+
`,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
774
|
:host { display: block; }
|
|
680
775
|
.tile {
|
|
681
776
|
box-sizing: border-box;
|
|
682
777
|
display: flex;
|
|
683
778
|
flex-direction: column;
|
|
684
|
-
|
|
779
|
+
align-items: flex-start;
|
|
780
|
+
gap: ${r(2.5)};
|
|
685
781
|
block-size: 100%;
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
border-radius: ${t.
|
|
689
|
-
background: ${t.
|
|
782
|
+
padding: ${r(5)};
|
|
783
|
+
border: ${t.borderThin} solid ${t.text};
|
|
784
|
+
border-radius: ${t.radius};
|
|
785
|
+
background: ${t.surfaceCard};
|
|
690
786
|
color: ${t.text};
|
|
691
787
|
text-decoration: none;
|
|
692
788
|
}
|
|
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}; }
|
|
789
|
+
a.tile:hover { background: color-mix(in srgb, ${t.surfaceCard}, ${t.text} 4%); }
|
|
790
|
+
.label { font-family: ${t.fontMono}; font-size: ${b("sm")}; font-weight: ${m("regular")}; color: ${t.textMuted}; }
|
|
791
|
+
/* G2: Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */
|
|
792
|
+
.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; }
|
|
793
|
+
.caption { font-size: ${b("sm")}; line-height: 1.45; color: ${t.textMuted}; }
|
|
794
|
+
:host([size='lg']) .tile { min-block-size: 200px; padding: ${r(6)}; }
|
|
795
|
+
:host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${mr}; }
|
|
796
|
+
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }
|
|
701
797
|
:host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }
|
|
702
798
|
:host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }
|
|
799
|
+
@media (max-width: 40rem) { .value { font-size: 2.5rem; } }
|
|
703
800
|
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }
|
|
704
|
-
`]}render(){let e=
|
|
801
|
+
`]}render(){let e=s`
|
|
705
802
|
<span class="label" part="label">${this.label}</span>
|
|
706
803
|
<span class="value" part="value">${this.value}</span>
|
|
707
|
-
${this.caption?
|
|
708
|
-
|
|
804
|
+
${this.caption?s`<span class="caption" part="caption">${this.caption}</span>`:l}
|
|
805
|
+
${ee(this.status,this.statusTone)}
|
|
806
|
+
`;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
807
|
:host { display: inline-block; flex: none; }
|
|
710
808
|
time {
|
|
711
809
|
position: relative;
|
|
@@ -723,74 +821,79 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
723
821
|
}
|
|
724
822
|
:host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }
|
|
725
823
|
.month { font-size: 10px; font-weight: ${m("medium")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
726
|
-
.day { margin-block-start: ${
|
|
824
|
+
.day { margin-block-start: ${r(1)}; font-size: 20px; font-weight: ${m("medium")}; font-variant-numeric: tabular-nums; }
|
|
727
825
|
.sr-only { ${T} }
|
|
728
826
|
@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
|
|
827
|
+
`]}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
828
|
<span class="month" aria-hidden="true">${e.month}</span>
|
|
731
829
|
<span class="day" aria-hidden="true">${e.day}</span>
|
|
732
830
|
<span class="sr-only">${e.full}</span>
|
|
733
|
-
</time>`:
|
|
831
|
+
</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
832
|
:host { display: block; }
|
|
735
833
|
: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: ${
|
|
834
|
+
.row { position: relative; display: flex; align-items: center; gap: ${r(3)}; padding-block: ${r(3)}; }
|
|
835
|
+
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${r(.5)}; }
|
|
738
836
|
.title { font-size: ${b("md")}; font-weight: ${m("medium")}; color: ${t.text}; }
|
|
739
837
|
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${m("regular")}; }
|
|
740
|
-
|
|
838
|
+
/* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */
|
|
839
|
+
.meta { font-family: ${t.fontEyebrow}; font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
741
840
|
a { color: inherit; text-decoration: none; }
|
|
742
841
|
/* The link is stretched over the row, so the row is one target. */
|
|
743
842
|
a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }
|
|
744
843
|
a:focus-visible { outline: none; }
|
|
745
844
|
a:focus-visible::after { box-shadow: ${t.focusShadow}; }
|
|
746
845
|
.row:has(a):hover .title { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
747
|
-
.start, .end { flex: none; display: flex; align-items: center; gap: ${
|
|
846
|
+
.start, .end { flex: none; display: flex; align-items: center; gap: ${r(2)}; }
|
|
748
847
|
.start.empty, .end.empty { display: none; }
|
|
749
848
|
/* Controls at the end stay pressable above the stretched link. */
|
|
750
849
|
.end { position: relative; z-index: 1; }
|
|
751
850
|
.chevron { flex: none; color: ${t.textMuted}; }
|
|
752
|
-
|
|
851
|
+
: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}; }
|
|
852
|
+
:host([selected]) :is(.title, .meta, .chevron) { color: ${ce}; }
|
|
853
|
+
:host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${ce} 72%, ${t.text}); }
|
|
854
|
+
@media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }
|
|
855
|
+
`]}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
856
|
<div class="start ${this.filled.start?"":"empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
|
|
754
|
-
<div class="text">${
|
|
857
|
+
<div class="text">${i}${this.meta?s`<span class="meta" part="meta">${this.meta}</span>`:l}</div>
|
|
755
858
|
<div class="end ${this.filled.end?"":"empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
|
|
756
|
-
${this.href?
|
|
757
|
-
</div>`}},
|
|
859
|
+
${this.href&&!this.selected?s`<span class="chevron" aria-hidden="true">${M("chevron-right","20px")}</span>`:l}
|
|
860
|
+
</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
861
|
:host { display: inline-block; }
|
|
759
862
|
/* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */
|
|
760
863
|
button {
|
|
761
|
-
${
|
|
864
|
+
${z}
|
|
762
865
|
position: relative;
|
|
763
866
|
display: inline-flex;
|
|
764
867
|
align-items: center;
|
|
765
|
-
gap: ${
|
|
766
|
-
min-block-size:
|
|
767
|
-
padding: 0 ${
|
|
868
|
+
gap: ${r(2)};
|
|
869
|
+
min-block-size: 35px;
|
|
870
|
+
padding: 0 ${r(3.5)};
|
|
768
871
|
font: inherit;
|
|
769
872
|
font-size: ${b("sm")};
|
|
770
|
-
font-weight: ${m("
|
|
873
|
+
font-weight: ${m("regular")};
|
|
771
874
|
color: ${t.text};
|
|
772
875
|
background: ${t.surfaceCard};
|
|
773
|
-
border: ${t.borderThin} solid ${t.
|
|
774
|
-
border-radius:
|
|
876
|
+
border: ${t.borderThin} solid ${t.text};
|
|
877
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
775
878
|
cursor: pointer;
|
|
776
879
|
white-space: nowrap;
|
|
777
880
|
}
|
|
778
881
|
button:hover:not(:disabled) { background: ${t.surfaceInset}; }
|
|
779
|
-
button[aria-pressed='true'] { background: ${t.text}; color: ${
|
|
882
|
+
button[aria-pressed='true'] { background: ${t.text}; color: ${ce}; border-color: ${t.text}; }
|
|
780
883
|
button:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
781
884
|
.count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
782
885
|
button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
|
|
783
886
|
.sr-only { ${T} }
|
|
784
887
|
@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
|
|
888
|
+
`]}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
889
|
<span>${this.label}</span>
|
|
787
|
-
${e?this.countLabel?
|
|
788
|
-
</button>`}};customElements.define("impakt-stat-tile",
|
|
890
|
+
${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}
|
|
891
|
+
</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
892
|
.row {
|
|
790
893
|
display: flex;
|
|
791
894
|
align-items: center;
|
|
792
895
|
justify-content: space-between;
|
|
793
|
-
gap: ${
|
|
896
|
+
gap: ${r(3)};
|
|
794
897
|
cursor: pointer;
|
|
795
898
|
}
|
|
796
899
|
.text {
|
|
@@ -809,7 +912,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
809
912
|
block-size: 28px;
|
|
810
913
|
}
|
|
811
914
|
input {
|
|
812
|
-
${
|
|
915
|
+
${z}
|
|
813
916
|
position: absolute;
|
|
814
917
|
inset: 0;
|
|
815
918
|
inline-size: 100%;
|
|
@@ -821,7 +924,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
821
924
|
.track {
|
|
822
925
|
position: absolute;
|
|
823
926
|
inset: 0;
|
|
824
|
-
border-radius:
|
|
927
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
825
928
|
background: ${t.borderStrong};
|
|
826
929
|
transition: background-color 120ms ease-in-out;
|
|
827
930
|
pointer-events: none;
|
|
@@ -832,7 +935,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
832
935
|
inset-inline-start: 3px;
|
|
833
936
|
inline-size: 22px;
|
|
834
937
|
block-size: 22px;
|
|
835
|
-
border-radius:
|
|
938
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
836
939
|
background: ${t.surfaceCard};
|
|
837
940
|
box-shadow: ${t.shadowXs};
|
|
838
941
|
transition: transform 120ms ease-in-out;
|
|
@@ -863,10 +966,10 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
863
966
|
.knob { background: CanvasText; }
|
|
864
967
|
:host([checked]) .track { background: Highlight; }
|
|
865
968
|
}
|
|
866
|
-
`]}renderControl(){return
|
|
969
|
+
`]}renderControl(){return s`
|
|
867
970
|
<label class="row" part="row" for=${this.controlId}>
|
|
868
971
|
<span class="text">
|
|
869
|
-
${this.label}${this.required?
|
|
972
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
870
973
|
</span>
|
|
871
974
|
<span class="control">
|
|
872
975
|
<input
|
|
@@ -886,7 +989,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
886
989
|
<span class="track" part="track"><span class="knob" part="knob"></span></span>
|
|
887
990
|
</span>
|
|
888
991
|
</label>
|
|
889
|
-
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return
|
|
992
|
+
`}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
993
|
fieldset {
|
|
891
994
|
border: 0;
|
|
892
995
|
margin: 0;
|
|
@@ -901,9 +1004,9 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
901
1004
|
}
|
|
902
1005
|
.segments {
|
|
903
1006
|
display: inline-flex;
|
|
904
|
-
gap: ${
|
|
905
|
-
padding: ${
|
|
906
|
-
border-radius:
|
|
1007
|
+
gap: ${r(1)};
|
|
1008
|
+
padding: ${r(1)};
|
|
1009
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
907
1010
|
background: ${t.surfaceInset};
|
|
908
1011
|
}
|
|
909
1012
|
:host([full]) .segments {
|
|
@@ -917,7 +1020,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
917
1020
|
display: inline-flex;
|
|
918
1021
|
}
|
|
919
1022
|
input {
|
|
920
|
-
${
|
|
1023
|
+
${z}
|
|
921
1024
|
position: absolute;
|
|
922
1025
|
inset: 0;
|
|
923
1026
|
inline-size: 100%;
|
|
@@ -932,8 +1035,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
932
1035
|
justify-content: center;
|
|
933
1036
|
inline-size: 100%;
|
|
934
1037
|
min-block-size: 32px;
|
|
935
|
-
padding: ${
|
|
936
|
-
border-radius:
|
|
1038
|
+
padding: ${r(1.5)} ${r(4)};
|
|
1039
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
937
1040
|
font-size: ${b("sm")};
|
|
938
1041
|
font-weight: ${m("medium")};
|
|
939
1042
|
color: ${t.textMuted};
|
|
@@ -964,38 +1067,38 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
964
1067
|
.segments { border: 1px solid CanvasText; }
|
|
965
1068
|
input:checked + .face { border: 2px solid Highlight; }
|
|
966
1069
|
}
|
|
967
|
-
`]}renderLabel(){return
|
|
968
|
-
${this.label}${this.required?
|
|
969
|
-
</legend>`}renderControl(){return
|
|
1070
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
1071
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1072
|
+
</legend>`}renderControl(){return s`
|
|
970
1073
|
<div class="segments" part="segments">
|
|
971
|
-
${this.options.map((e,
|
|
972
|
-
<label class="segment" part="segment" for=${
|
|
1074
|
+
${this.options.map((e,i)=>{let a=this.id_(`seg-${i}`);return s`
|
|
1075
|
+
<label class="segment" part="segment" for=${a}>
|
|
973
1076
|
<input
|
|
974
1077
|
type="radio"
|
|
975
|
-
id=${
|
|
1078
|
+
id=${a}
|
|
976
1079
|
name=${this.uid}
|
|
977
1080
|
value=${e.value}
|
|
978
1081
|
.checked=${this.value===e.value}
|
|
979
1082
|
?disabled=${this.disabled}
|
|
980
|
-
?required=${this.required&&
|
|
1083
|
+
?required=${this.required&&i===0}
|
|
981
1084
|
@change=${()=>{this.value=e.value,this.setFormValue(e.value)}}
|
|
982
1085
|
/>
|
|
983
1086
|
<span class="face">${e.label}</span>
|
|
984
1087
|
</label>
|
|
985
1088
|
`})}
|
|
986
1089
|
</div>
|
|
987
|
-
`}render(){return
|
|
1090
|
+
`}render(){return s`
|
|
988
1091
|
<fieldset
|
|
989
1092
|
part="fieldset"
|
|
990
1093
|
aria-describedby=${this.describedBy}
|
|
991
1094
|
aria-invalid=${this.error?"true":l}
|
|
992
1095
|
>
|
|
993
1096
|
${this.renderLabel()}
|
|
994
|
-
${this.description?
|
|
1097
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
995
1098
|
${this.renderControl()}
|
|
996
1099
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
997
1100
|
</fieldset>
|
|
998
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",
|
|
1101
|
+
`}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
1102
|
fieldset {
|
|
1000
1103
|
border: 0;
|
|
1001
1104
|
margin: 0;
|
|
@@ -1008,11 +1111,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1008
1111
|
.option {
|
|
1009
1112
|
display: flex;
|
|
1010
1113
|
align-items: flex-start;
|
|
1011
|
-
gap: ${
|
|
1012
|
-
padding: ${
|
|
1114
|
+
gap: ${r(3)};
|
|
1115
|
+
padding: ${r(3)};
|
|
1013
1116
|
border: ${t.borderThin} solid ${t.border};
|
|
1014
1117
|
border-radius: ${t.radius};
|
|
1015
|
-
margin-block-end: ${
|
|
1118
|
+
margin-block-end: ${r(2)};
|
|
1016
1119
|
cursor: pointer;
|
|
1017
1120
|
}
|
|
1018
1121
|
.option:hover {
|
|
@@ -1021,7 +1124,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1021
1124
|
/* The whole row is the target, not the 20px dot — 2.5.8 is a floor and
|
|
1022
1125
|
a comfortable target is the actual goal. */
|
|
1023
1126
|
.option input {
|
|
1024
|
-
${
|
|
1127
|
+
${z}
|
|
1025
1128
|
inline-size: 20px;
|
|
1026
1129
|
block-size: 20px;
|
|
1027
1130
|
margin: 0;
|
|
@@ -1036,41 +1139,41 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1036
1139
|
display: block;
|
|
1037
1140
|
font-size: ${b("sm")};
|
|
1038
1141
|
color: ${t.textMuted};
|
|
1039
|
-
margin-block-start: ${
|
|
1142
|
+
margin-block-start: ${r(1)};
|
|
1040
1143
|
}
|
|
1041
1144
|
:host([invalid]) .option {
|
|
1042
1145
|
border-color: ${t.danger};
|
|
1043
1146
|
}
|
|
1044
|
-
`]}renderLabel(){return
|
|
1045
|
-
${this.label}${this.required?
|
|
1046
|
-
</legend>`}renderControl(){return
|
|
1047
|
-
${this.options.map((e,
|
|
1048
|
-
<label class="option" part="option" for=${
|
|
1147
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
1148
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1149
|
+
</legend>`}renderControl(){return s`
|
|
1150
|
+
${this.options.map((e,i)=>{let a=this.id_(`opt-${i}`),o=e.description?this.id_(`opt-${i}-desc`):void 0;return s`
|
|
1151
|
+
<label class="option" part="option" for=${a}>
|
|
1049
1152
|
<input
|
|
1050
1153
|
type="radio"
|
|
1051
|
-
id=${
|
|
1154
|
+
id=${a}
|
|
1052
1155
|
name=${this.uid}
|
|
1053
1156
|
value=${e.value}
|
|
1054
1157
|
.checked=${this.value===e.value}
|
|
1055
1158
|
?disabled=${this.disabled}
|
|
1056
|
-
?required=${this.required&&
|
|
1159
|
+
?required=${this.required&&i===0}
|
|
1057
1160
|
aria-describedby=${o??l}
|
|
1058
1161
|
@change=${()=>this.setFormValue(e.value)}
|
|
1059
1162
|
/>
|
|
1060
1163
|
<span>
|
|
1061
1164
|
<span class="option-text">${e.label}</span>
|
|
1062
|
-
${e.description?
|
|
1165
|
+
${e.description?s`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1063
1166
|
</span>
|
|
1064
1167
|
</label>
|
|
1065
1168
|
`})}
|
|
1066
|
-
`}render(){return
|
|
1169
|
+
`}render(){return s`
|
|
1067
1170
|
<fieldset
|
|
1068
1171
|
part="fieldset"
|
|
1069
1172
|
aria-describedby=${this.describedBy}
|
|
1070
1173
|
aria-invalid=${this.error?"true":l}
|
|
1071
1174
|
>
|
|
1072
1175
|
${this.renderLabel()}
|
|
1073
|
-
${this.description?
|
|
1176
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">
|
|
1074
1177
|
${this.description}
|
|
1075
1178
|
</div>`:l}
|
|
1076
1179
|
${this.renderControl()}
|
|
@@ -1078,13 +1181,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1078
1181
|
${this.error||l}
|
|
1079
1182
|
</div>
|
|
1080
1183
|
</fieldset>
|
|
1081
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",
|
|
1184
|
+
`}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
1185
|
:host {
|
|
1083
1186
|
display: block;
|
|
1084
|
-
margin-block-end: ${
|
|
1187
|
+
margin-block-end: ${r(4)};
|
|
1085
1188
|
}
|
|
1086
1189
|
.alert {
|
|
1087
|
-
padding: ${
|
|
1190
|
+
padding: ${r(4)} ${r(5)};
|
|
1088
1191
|
border-radius: ${t.radiusLg};
|
|
1089
1192
|
border-inline-start: 4px solid;
|
|
1090
1193
|
box-shadow: inset 0 0 0 1px ${t.hairline};
|
|
@@ -1093,7 +1196,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1093
1196
|
}
|
|
1094
1197
|
.heading {
|
|
1095
1198
|
font-weight: ${m("semibold")};
|
|
1096
|
-
margin-block-end: ${
|
|
1199
|
+
margin-block-end: ${r(1)};
|
|
1097
1200
|
}
|
|
1098
1201
|
:host([tone='info']) .alert {
|
|
1099
1202
|
background: ${t.infoSubtle};
|
|
@@ -1115,6 +1218,47 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1115
1218
|
border-color: ${t.danger};
|
|
1116
1219
|
color: ${t.text};
|
|
1117
1220
|
}
|
|
1221
|
+
/* Attention: the accent as a fill, an ink border, a solid ink label and an action at the end. */
|
|
1222
|
+
:host([tone='attention']) .alert {
|
|
1223
|
+
display: flex;
|
|
1224
|
+
flex-wrap: wrap;
|
|
1225
|
+
align-items: center;
|
|
1226
|
+
gap: ${r(3)};
|
|
1227
|
+
padding: ${r(3.5)} ${r(4)};
|
|
1228
|
+
border: ${t.borderThin} solid ${u("color.accent.on","#111111")};
|
|
1229
|
+
border-radius: ${t.radius};
|
|
1230
|
+
box-shadow: none;
|
|
1231
|
+
background: ${u("color.accent.default","#ffd43b")};
|
|
1232
|
+
color: ${u("color.accent.on","#111111")};
|
|
1233
|
+
font-size: ${b("md")};
|
|
1234
|
+
line-height: 1.4;
|
|
1235
|
+
/* What sits on the yellow is drawn in the ink, whatever the band round it says. */
|
|
1236
|
+
--impakt-color-text-default: ${u("color.accent.on","#111111")};
|
|
1237
|
+
--impakt-color-text-inverse: ${u("color.accent.default","#ffd43b")};
|
|
1238
|
+
}
|
|
1239
|
+
.tag {
|
|
1240
|
+
flex: none;
|
|
1241
|
+
padding: 3px ${r(2)};
|
|
1242
|
+
font-family: ${t.fontMono};
|
|
1243
|
+
font-size: ${b("sm")};
|
|
1244
|
+
line-height: 1.3;
|
|
1245
|
+
background: ${u("color.accent.on","#111111")};
|
|
1246
|
+
color: ${u("color.accent.default","#ffd43b")};
|
|
1247
|
+
}
|
|
1248
|
+
.words {
|
|
1249
|
+
flex: 1 1 16rem;
|
|
1250
|
+
min-inline-size: 0;
|
|
1251
|
+
}
|
|
1252
|
+
.actions {
|
|
1253
|
+
flex: none;
|
|
1254
|
+
display: flex;
|
|
1255
|
+
flex-wrap: wrap;
|
|
1256
|
+
gap: ${r(2)};
|
|
1257
|
+
margin-inline-start: auto;
|
|
1258
|
+
}
|
|
1259
|
+
.actions.empty {
|
|
1260
|
+
display: none;
|
|
1261
|
+
}
|
|
1118
1262
|
/* Colour is the only signal left in forced-colours mode, and it is gone.
|
|
1119
1263
|
The border keeps the boundary; the tone word in the label carries the
|
|
1120
1264
|
meaning. */
|
|
@@ -1124,25 +1268,34 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1124
1268
|
border-inline-start-width: 4px;
|
|
1125
1269
|
}
|
|
1126
1270
|
}
|
|
1127
|
-
`]}
|
|
1271
|
+
`]}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||S("Check");return s`
|
|
1272
|
+
<div class="alert" part="alert" role="status">
|
|
1273
|
+
${this.noLabel?l:s`<span class="tag" part="label">${a}</span>`}
|
|
1274
|
+
<div class="words" part="body">
|
|
1275
|
+
${this.heading?s`<div class="heading" part="heading">${this.heading}</div>`:l}
|
|
1276
|
+
<slot></slot>
|
|
1277
|
+
</div>
|
|
1278
|
+
<div class="actions ${this.hasActions?"":"empty"}" part="actions"><slot name="actions" @slotchange=${this.onActions}></slot></div>
|
|
1279
|
+
</div>
|
|
1280
|
+
`}let i=this.toneLabel||S(n.TONE_WORDS[this.tone]);return s`
|
|
1128
1281
|
<div
|
|
1129
1282
|
class="alert"
|
|
1130
1283
|
part="alert"
|
|
1131
1284
|
role=${this.tone==="danger"?"alert":"status"}
|
|
1132
|
-
aria-label=${this.heading?l:
|
|
1285
|
+
aria-label=${this.heading?l:i}
|
|
1133
1286
|
>
|
|
1134
|
-
${this.heading?
|
|
1135
|
-
<span class="tone-word">${
|
|
1287
|
+
${this.heading?s`<div class="heading" part="heading">
|
|
1288
|
+
<span class="tone-word">${i}:</span> ${this.heading}
|
|
1136
1289
|
</div>`:l}
|
|
1137
1290
|
<slot></slot>
|
|
1138
1291
|
</div>
|
|
1139
|
-
`}};customElements.define("impakt-alert",
|
|
1292
|
+
`}};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
1293
|
:host {
|
|
1141
1294
|
display: flex;
|
|
1142
1295
|
flex-direction: column;
|
|
1143
1296
|
}
|
|
1144
1297
|
:host([gap='none']) { gap: 0; }
|
|
1145
|
-
:host([gap='xs']) { gap: ${
|
|
1298
|
+
:host([gap='xs']) { gap: ${r(1)}; }
|
|
1146
1299
|
:host([align='start']) { align-items: flex-start; }
|
|
1147
1300
|
:host([align='center']) { align-items: center; text-align: center; }
|
|
1148
1301
|
:host([align='end']) { align-items: flex-end; }
|
|
@@ -1153,18 +1306,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1153
1306
|
:host([justify='center']) { justify-content: center; }
|
|
1154
1307
|
:host([justify='end']) { justify-content: flex-end; }
|
|
1155
1308
|
: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
|
|
1309
|
+
:host([gap='sm']) { gap: ${r(2)}; }
|
|
1310
|
+
:host([gap='md']) { gap: ${r(4)}; }
|
|
1311
|
+
:host([gap='lg']) { gap: ${r(6)}; }
|
|
1312
|
+
:host([gap='xl']) { gap: ${r(8)}; }
|
|
1313
|
+
`]}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
1314
|
:host {
|
|
1162
1315
|
display: flex;
|
|
1163
1316
|
flex-direction: column;
|
|
1164
1317
|
background: ${t.surfaceCard};
|
|
1165
|
-
border: ${t.borderThin} solid ${t.
|
|
1318
|
+
border: ${t.borderThin} solid ${t.text};
|
|
1166
1319
|
border-radius: ${t.radiusXl};
|
|
1167
|
-
box-shadow:
|
|
1320
|
+
box-shadow: none;
|
|
1168
1321
|
overflow: hidden;
|
|
1169
1322
|
--ratio: 16 / 9;
|
|
1170
1323
|
}
|
|
@@ -1172,35 +1325,39 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1172
1325
|
: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
1326
|
:host([tone='outline']) { background: transparent; box-shadow: none; border-color: ${t.rule}; }
|
|
1174
1327
|
: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}; }
|
|
1328
|
+
/* Ink: the colours are kept on the host and repainted for what is inside, so the fill is the outer text colour. */
|
|
1329
|
+
: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); }
|
|
1330
|
+
: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)); }
|
|
1331
|
+
:host([tone='dashed']) { background: transparent; border-style: dashed; }
|
|
1175
1332
|
:host([tone='plain']) { background: transparent; border-color: transparent; border-radius: 0; box-shadow: none; }
|
|
1176
1333
|
:host([ratio='4:3']) { --ratio: 4 / 3; }
|
|
1177
1334
|
:host([ratio='3:2']) { --ratio: 3 / 2; }
|
|
1178
1335
|
:host([ratio='1:1']) { --ratio: 1 / 1; }
|
|
1179
|
-
.body { padding: ${
|
|
1336
|
+
.body { padding: ${r(6)}; flex: 1; display: flex; flex-direction: column; }
|
|
1180
1337
|
:host([padding='none']) .body { padding: 0; }
|
|
1181
|
-
:host([padding='sm']) .body { padding: ${
|
|
1182
|
-
:host([padding='md']) .body { padding: ${
|
|
1338
|
+
:host([padding='sm']) .body { padding: ${r(3)}; }
|
|
1339
|
+
:host([padding='md']) .body { padding: ${r(4)}; }
|
|
1183
1340
|
:host([tone='plain']) .body { padding-inline: 0; }
|
|
1184
1341
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
1185
1342
|
.picture { position: relative; }
|
|
1186
|
-
.tag { position: absolute; inset-block-start: ${
|
|
1343
|
+
.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
1344
|
@media (forced-colors: active) { :host { border-color: CanvasText; } }
|
|
1188
|
-
`]}render(){return
|
|
1345
|
+
`]}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
1346
|
:host {
|
|
1190
1347
|
display: block;
|
|
1191
1348
|
color: ${t.textHeading};
|
|
1192
1349
|
font-family: ${t.fontHeading};
|
|
1193
1350
|
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']) { ${
|
|
1351
|
+
line-height: ${H("tight")};
|
|
1352
|
+
}
|
|
1353
|
+
:host([size='5xl']) { ${w("5xl")} letter-spacing: ${t.trackingTight}; }
|
|
1354
|
+
:host([size='4xl']) { ${w("4xl")} letter-spacing: ${t.trackingTight}; }
|
|
1355
|
+
:host([size='3xl']) { ${w("3xl")} letter-spacing: ${t.trackingTight}; }
|
|
1356
|
+
:host([size='2xl']) { ${w("2xl")} letter-spacing: ${t.trackingTight}; }
|
|
1357
|
+
:host([size='xl']) { ${w("xl")} }
|
|
1358
|
+
:host([size='lg']) { ${w("lg")} }
|
|
1359
|
+
:host([size='md']) { ${w("md")} }
|
|
1360
|
+
:host([size='sm']) { ${w("sm")} }
|
|
1204
1361
|
.h { text-wrap: balance; }
|
|
1205
1362
|
.h {
|
|
1206
1363
|
margin: 0;
|
|
@@ -1213,7 +1370,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1213
1370
|
:host([screen-reader-only]:not([eyebrow])) { ${T} }
|
|
1214
1371
|
.eyebrow {
|
|
1215
1372
|
display: block;
|
|
1216
|
-
margin-block-end: ${
|
|
1373
|
+
margin-block-end: ${r(2)};
|
|
1217
1374
|
color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand}));
|
|
1218
1375
|
font-family: var(--impakt-font-family-eyebrow, ${t.fontBody});
|
|
1219
1376
|
font-size: var(--impakt-font-size-eyebrow, ${b("sm")});
|
|
@@ -1221,31 +1378,31 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1221
1378
|
letter-spacing: 0.06em;
|
|
1222
1379
|
text-transform: uppercase;
|
|
1223
1380
|
}
|
|
1224
|
-
`]}render(){return
|
|
1225
|
-
${this.eyebrow?
|
|
1226
|
-
</div>`}},
|
|
1381
|
+
`]}render(){return s`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
1382
|
+
${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>
|
|
1383
|
+
</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
1384
|
:host {
|
|
1228
1385
|
display: block;
|
|
1229
1386
|
/* 1.4.8 asks for 1.5 within a paragraph, and it is the default here
|
|
1230
1387
|
rather than an option, because body text is what it is about. */
|
|
1231
|
-
line-height: ${
|
|
1388
|
+
line-height: ${H("normal")};
|
|
1232
1389
|
/* 1.4.12 Text Spacing: a user stylesheet must be able to widen this
|
|
1233
1390
|
without clipping, which a max-width in ch units survives and a
|
|
1234
1391
|
fixed pixel height does not. */
|
|
1235
1392
|
max-inline-size: 70ch;
|
|
1236
1393
|
}
|
|
1237
|
-
:host([size='sm']) { ${
|
|
1238
|
-
:host([size='md']) { ${
|
|
1239
|
-
:host([size='lg']) { ${
|
|
1240
|
-
:host([size='xl']) { ${
|
|
1394
|
+
:host([size='sm']) { ${w("sm")} }
|
|
1395
|
+
:host([size='md']) { ${w("md")} }
|
|
1396
|
+
:host([size='lg']) { ${w("lg")} }
|
|
1397
|
+
:host([size='xl']) { ${w("xl")} }
|
|
1241
1398
|
p { text-wrap: pretty; }
|
|
1242
1399
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
1243
1400
|
:host([align='center']) { text-align: center; margin-inline: auto; }
|
|
1244
|
-
:host([look='code']) { font-family: ${t.fontMono}; ${
|
|
1401
|
+
: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
1402
|
p {
|
|
1246
1403
|
margin: 0;
|
|
1247
1404
|
}
|
|
1248
|
-
`]}render(){return
|
|
1405
|
+
`]}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
1406
|
:host {
|
|
1250
1407
|
display: inline;
|
|
1251
1408
|
}
|
|
@@ -1259,22 +1416,22 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1259
1416
|
color: ${t.linkHover};
|
|
1260
1417
|
}
|
|
1261
1418
|
:host([variant='standalone']) { display: inline-block; }
|
|
1262
|
-
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${
|
|
1419
|
+
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${r(1)}; font-weight: ${m("semibold")}; text-decoration-thickness: 1px; }
|
|
1263
1420
|
:host([variant='standalone']) a:hover .icon { transform: translateX(2px); }
|
|
1264
1421
|
.icon { flex: none; transition: transform 120ms ease-in-out; }
|
|
1265
1422
|
.sr-only {
|
|
1266
1423
|
${T}
|
|
1267
1424
|
}
|
|
1268
|
-
`]}render(){return
|
|
1425
|
+
`]}render(){return s`
|
|
1269
1426
|
<a
|
|
1270
1427
|
part="link"
|
|
1271
1428
|
href=${this.href||l}
|
|
1272
1429
|
target=${this.external?"_blank":l}
|
|
1273
1430
|
rel=${this.external?"noopener noreferrer":l}
|
|
1274
1431
|
>
|
|
1275
|
-
<slot></slot>${
|
|
1432
|
+
<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
1433
|
</a>
|
|
1277
|
-
`}};customElements.define("impakt-link",
|
|
1434
|
+
`}};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
1435
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1279
1436
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1280
1437
|
:host {
|
|
@@ -1294,7 +1451,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1294
1451
|
:host([rounded='sm']) img { border-radius: ${t.radius}; }
|
|
1295
1452
|
:host([rounded='lg']) img { border-radius: ${t.radiusLg}; }
|
|
1296
1453
|
:host([rounded='full']) img { border-radius: 50%; }
|
|
1297
|
-
`]}render(){return
|
|
1454
|
+
`]}render(){return s`
|
|
1298
1455
|
<img
|
|
1299
1456
|
part="image"
|
|
1300
1457
|
src=${this.src}
|
|
@@ -1305,7 +1462,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1305
1462
|
loading=${this.loading}
|
|
1306
1463
|
style="object-position: ${this.focalX*100}% ${this.focalY*100}%"
|
|
1307
1464
|
/>
|
|
1308
|
-
`}},
|
|
1465
|
+
`}},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
1466
|
:host {
|
|
1310
1467
|
display: inline-block;
|
|
1311
1468
|
}
|
|
@@ -1313,7 +1470,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1313
1470
|
display: block;
|
|
1314
1471
|
inline-size: auto;
|
|
1315
1472
|
}
|
|
1316
|
-
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return
|
|
1473
|
+
`]}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
1474
|
:host {
|
|
1318
1475
|
display: block;
|
|
1319
1476
|
}
|
|
@@ -1329,15 +1486,15 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1329
1486
|
.meta {
|
|
1330
1487
|
color: ${t.textMuted};
|
|
1331
1488
|
}
|
|
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
|
|
1489
|
+
`]}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
1490
|
<a part="link" href=${this.href||l} download>
|
|
1334
|
-
<span>${this.label}</span>${e?
|
|
1491
|
+
<span>${this.label}</span>${e?s`<span class="meta">(${e})</span>`:l}
|
|
1335
1492
|
</a>
|
|
1336
|
-
`}};customElements.define("impakt-image",
|
|
1493
|
+
`}};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
1494
|
:host {
|
|
1338
1495
|
display: inline-flex;
|
|
1339
1496
|
align-items: baseline;
|
|
1340
|
-
gap: ${
|
|
1497
|
+
gap: ${r(1)};
|
|
1341
1498
|
color: ${t.text};
|
|
1342
1499
|
}
|
|
1343
1500
|
.amount {
|
|
@@ -1354,11 +1511,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1354
1511
|
font-size: ${b("sm")};
|
|
1355
1512
|
color: ${t.textMuted};
|
|
1356
1513
|
}
|
|
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?
|
|
1514
|
+
`]}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`
|
|
1515
|
+
${this.prefix?s`<span class="period" part="prefix">${this.prefix}</span>`:l}
|
|
1359
1516
|
<span class="amount" part="amount">${this.formatted}</span>
|
|
1360
|
-
${this.period?
|
|
1361
|
-
`}};customElements.define("impakt-price",
|
|
1517
|
+
${this.period?s`<span class="period" part="period">${this.period}</span>`:l}
|
|
1518
|
+
`}};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
1519
|
:host {
|
|
1363
1520
|
display: block;
|
|
1364
1521
|
}
|
|
@@ -1376,7 +1533,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1376
1533
|
}
|
|
1377
1534
|
dt,
|
|
1378
1535
|
dd {
|
|
1379
|
-
padding: ${
|
|
1536
|
+
padding: ${r(3)} 0;
|
|
1380
1537
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1381
1538
|
}
|
|
1382
1539
|
dt {
|
|
@@ -1388,7 +1545,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1388
1545
|
display: flex;
|
|
1389
1546
|
align-items: baseline;
|
|
1390
1547
|
justify-content: space-between;
|
|
1391
|
-
gap: ${
|
|
1548
|
+
gap: ${r(3)};
|
|
1392
1549
|
}
|
|
1393
1550
|
dd a {
|
|
1394
1551
|
flex: none;
|
|
@@ -1423,21 +1580,21 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1423
1580
|
padding-block-start: 0;
|
|
1424
1581
|
}
|
|
1425
1582
|
}
|
|
1426
|
-
`]}render(){return
|
|
1583
|
+
`]}render(){return s`
|
|
1427
1584
|
<dl part="list">
|
|
1428
|
-
${this.rows.map(e=>
|
|
1585
|
+
${this.rows.map(e=>s`
|
|
1429
1586
|
<div class="row" part="row">
|
|
1430
1587
|
<dt part="key">${e.key}</dt>
|
|
1431
1588
|
<dd part="value">
|
|
1432
1589
|
<span>${e.value}</span>
|
|
1433
|
-
${e.changeHref?
|
|
1590
|
+
${e.changeHref?s`<a href=${e.changeHref} part="action"
|
|
1434
1591
|
>${this.changeText}<span class="sr-only"> ${e.key}</span></a
|
|
1435
1592
|
>`:l}
|
|
1436
1593
|
</dd>
|
|
1437
1594
|
</div>
|
|
1438
1595
|
`)}
|
|
1439
1596
|
</dl>
|
|
1440
|
-
`}};customElements.define("impakt-summary-list",
|
|
1597
|
+
`}};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
1598
|
:host {
|
|
1442
1599
|
display: block;
|
|
1443
1600
|
}
|
|
@@ -1455,12 +1612,12 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1455
1612
|
caption {
|
|
1456
1613
|
text-align: start;
|
|
1457
1614
|
font-weight: ${m("semibold")};
|
|
1458
|
-
padding-block-end: ${
|
|
1615
|
+
padding-block-end: ${r(2)};
|
|
1459
1616
|
}
|
|
1460
1617
|
th,
|
|
1461
1618
|
td {
|
|
1462
1619
|
text-align: start;
|
|
1463
|
-
padding: ${
|
|
1620
|
+
padding: ${r(3)};
|
|
1464
1621
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1465
1622
|
}
|
|
1466
1623
|
thead th {
|
|
@@ -1470,6 +1627,46 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1470
1627
|
tbody th {
|
|
1471
1628
|
font-weight: ${m("semibold")};
|
|
1472
1629
|
}
|
|
1630
|
+
/* Boxed: a white panel with an ink border, mono capitals for the headings and an ink rule under them. */
|
|
1631
|
+
:host([look='boxed']) .scroller {
|
|
1632
|
+
background: ${t.surfaceCard};
|
|
1633
|
+
border: ${t.borderThin} solid ${t.text};
|
|
1634
|
+
}
|
|
1635
|
+
:host([look='boxed']) caption {
|
|
1636
|
+
padding: ${r(4)} ${r(4)} ${r(2)};
|
|
1637
|
+
}
|
|
1638
|
+
/* The caption still names the table for a screen reader when the design shows none. */
|
|
1639
|
+
:host([caption-hidden]) caption {
|
|
1640
|
+
position: absolute;
|
|
1641
|
+
inline-size: 1px;
|
|
1642
|
+
block-size: 1px;
|
|
1643
|
+
overflow: hidden;
|
|
1644
|
+
clip-path: inset(50%);
|
|
1645
|
+
white-space: nowrap;
|
|
1646
|
+
}
|
|
1647
|
+
:host([look='boxed']) tbody th {
|
|
1648
|
+
font-weight: ${m("regular")};
|
|
1649
|
+
}
|
|
1650
|
+
.mono {
|
|
1651
|
+
font-family: ${t.fontMono};
|
|
1652
|
+
}
|
|
1653
|
+
:host([look='boxed']) thead th {
|
|
1654
|
+
font-family: ${t.fontMono};
|
|
1655
|
+
font-size: 11px;
|
|
1656
|
+
font-weight: ${m("medium")};
|
|
1657
|
+
letter-spacing: 0.06em;
|
|
1658
|
+
text-transform: uppercase;
|
|
1659
|
+
color: ${t.textMuted};
|
|
1660
|
+
background: transparent;
|
|
1661
|
+
border-block-end-color: ${t.text};
|
|
1662
|
+
}
|
|
1663
|
+
:host([look='boxed']) :is(th, td) {
|
|
1664
|
+
padding-inline: ${r(4)};
|
|
1665
|
+
border-block-end-color: var(--impakt-color-line-soft, #dcdcd8);
|
|
1666
|
+
}
|
|
1667
|
+
:host([look='boxed']) tbody tr:last-child > * {
|
|
1668
|
+
border-block-end: 0;
|
|
1669
|
+
}
|
|
1473
1670
|
.numeric {
|
|
1474
1671
|
/* A figure read across a line break is a different figure. */
|
|
1475
1672
|
white-space: nowrap;
|
|
@@ -1477,14 +1674,14 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1477
1674
|
font-variant-numeric: tabular-nums;
|
|
1478
1675
|
}
|
|
1479
1676
|
th.sortable {
|
|
1480
|
-
padding: ${
|
|
1677
|
+
padding: ${r(1)};
|
|
1481
1678
|
}
|
|
1482
1679
|
.sort {
|
|
1483
1680
|
display: inline-flex;
|
|
1484
1681
|
align-items: center;
|
|
1485
|
-
gap: ${
|
|
1682
|
+
gap: ${r(1)};
|
|
1486
1683
|
min-block-size: ${t.targetMin};
|
|
1487
|
-
padding: ${
|
|
1684
|
+
padding: ${r(2)};
|
|
1488
1685
|
font: inherit;
|
|
1489
1686
|
color: inherit;
|
|
1490
1687
|
background: none;
|
|
@@ -1536,7 +1733,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1536
1733
|
background: ${t.brandSubtle};
|
|
1537
1734
|
}
|
|
1538
1735
|
.empty {
|
|
1539
|
-
padding-block: ${
|
|
1736
|
+
padding-block: ${r(6)};
|
|
1540
1737
|
text-align: center;
|
|
1541
1738
|
color: ${t.textMuted};
|
|
1542
1739
|
}
|
|
@@ -1555,8 +1752,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1555
1752
|
display: flex;
|
|
1556
1753
|
flex-wrap: wrap;
|
|
1557
1754
|
align-items: center;
|
|
1558
|
-
gap: ${
|
|
1559
|
-
margin-block-end: ${
|
|
1755
|
+
gap: ${r(1)};
|
|
1756
|
+
margin-block-end: ${r(3)};
|
|
1560
1757
|
}
|
|
1561
1758
|
thead th {
|
|
1562
1759
|
display: none;
|
|
@@ -1570,14 +1767,14 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1570
1767
|
}
|
|
1571
1768
|
thead .sort {
|
|
1572
1769
|
border: ${t.borderThin} solid ${t.rule};
|
|
1573
|
-
border-radius:
|
|
1574
|
-
padding-inline: ${
|
|
1770
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
1771
|
+
padding-inline: ${r(3)};
|
|
1575
1772
|
background: ${t.surfaceCard};
|
|
1576
1773
|
}
|
|
1577
1774
|
tbody tr {
|
|
1578
1775
|
position: relative;
|
|
1579
|
-
margin-block-end: ${
|
|
1580
|
-
padding: ${
|
|
1776
|
+
margin-block-end: ${r(3)};
|
|
1777
|
+
padding: ${r(3)} ${r(4)};
|
|
1581
1778
|
border: ${t.borderThin} solid ${t.rule};
|
|
1582
1779
|
border-radius: ${t.radiusXl};
|
|
1583
1780
|
background: ${t.surfaceCard};
|
|
@@ -1591,8 +1788,8 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1591
1788
|
tbody th, tbody td {
|
|
1592
1789
|
display: grid;
|
|
1593
1790
|
grid-template-columns: minmax(6rem, 38%) minmax(0, 1fr);
|
|
1594
|
-
gap: ${
|
|
1595
|
-
padding: ${
|
|
1791
|
+
gap: ${r(3)};
|
|
1792
|
+
padding: ${r(1.5)} 0;
|
|
1596
1793
|
border: 0;
|
|
1597
1794
|
text-align: start;
|
|
1598
1795
|
white-space: normal;
|
|
@@ -1603,13 +1800,13 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1603
1800
|
tbody .pick {
|
|
1604
1801
|
display: block;
|
|
1605
1802
|
position: absolute;
|
|
1606
|
-
inset-block-start: ${
|
|
1607
|
-
inset-inline-end: ${
|
|
1803
|
+
inset-block-start: ${r(1)};
|
|
1804
|
+
inset-inline-end: ${r(1)};
|
|
1608
1805
|
inline-size: auto;
|
|
1609
1806
|
padding: 0;
|
|
1610
1807
|
}
|
|
1611
1808
|
tbody tr:has(.pick) > th {
|
|
1612
|
-
padding-inline-end: ${
|
|
1809
|
+
padding-inline-end: ${r(10)};
|
|
1613
1810
|
}
|
|
1614
1811
|
.label {
|
|
1615
1812
|
display: block;
|
|
@@ -1622,115 +1819,305 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1622
1819
|
border: 0;
|
|
1623
1820
|
}
|
|
1624
1821
|
}
|
|
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>`:
|
|
1822
|
+
`]}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}>
|
|
1823
|
+
<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>
|
|
1824
|
+
</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
1825
|
<div class="scroller" part="scroller" tabindex="0" role="region" aria-label=${this.caption||l}>
|
|
1629
1826
|
<table part="table" role="table">
|
|
1630
|
-
${this.caption?
|
|
1827
|
+
${this.caption?s`<caption part="caption">${this.caption}</caption>`:l}
|
|
1631
1828
|
<thead role="rowgroup">
|
|
1632
1829
|
<tr role="row">
|
|
1633
|
-
${this.selectable?
|
|
1634
|
-
@change=${c=>this.choose(
|
|
1830
|
+
${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}
|
|
1831
|
+
@change=${c=>this.choose(i.map($=>$.key),c.target.checked)} /></label></th>`:l}
|
|
1635
1832
|
${e.map(c=>this.heading(c))}
|
|
1636
1833
|
</tr>
|
|
1637
1834
|
</thead>
|
|
1638
1835
|
<tbody role="rowgroup">
|
|
1639
|
-
${
|
|
1640
|
-
<tr role="row" class=${
|
|
1641
|
-
${this.selectable?
|
|
1642
|
-
@change=${
|
|
1643
|
-
${e.map((
|
|
1836
|
+
${i.length?i.map(({row:c,key:$},g)=>s`
|
|
1837
|
+
<tr role="row" class=${a.has($)?"chosen":""} part="row">
|
|
1838
|
+
${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($)}
|
|
1839
|
+
@change=${v=>this.choose([$],v.target.checked)} /></label></td>`:l}
|
|
1840
|
+
${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
1841
|
</tr>
|
|
1645
|
-
`):
|
|
1842
|
+
`):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
1843
|
</tbody>
|
|
1647
1844
|
</table>
|
|
1648
1845
|
</div>
|
|
1649
|
-
`}};customElements.define("impakt-table",
|
|
1846
|
+
`}};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
1847
|
:host {
|
|
1651
1848
|
display: block;
|
|
1849
|
+
border-block-start: ${t.borderThin} solid ${t.text};
|
|
1652
1850
|
}
|
|
1653
1851
|
.item {
|
|
1654
|
-
border-block-end: ${t.borderThin} solid ${t.
|
|
1852
|
+
border-block-end: ${t.borderThin} solid ${t.text};
|
|
1655
1853
|
}
|
|
1656
|
-
button
|
|
1657
|
-
|
|
1854
|
+
/* The heading row. The button is stretched over it, so the whole row opens the panel, the status included. */
|
|
1855
|
+
.head {
|
|
1856
|
+
position: relative;
|
|
1658
1857
|
display: flex;
|
|
1659
1858
|
align-items: center;
|
|
1660
|
-
|
|
1661
|
-
|
|
1859
|
+
gap: ${r(4)};
|
|
1860
|
+
}
|
|
1861
|
+
.h {
|
|
1862
|
+
flex: 1;
|
|
1863
|
+
min-inline-size: 0;
|
|
1864
|
+
margin: 0;
|
|
1865
|
+
}
|
|
1866
|
+
button {
|
|
1867
|
+
${z}
|
|
1868
|
+
display: flex;
|
|
1869
|
+
align-items: baseline;
|
|
1870
|
+
flex-wrap: wrap;
|
|
1871
|
+
column-gap: ${r(4)};
|
|
1872
|
+
row-gap: ${r(1)};
|
|
1662
1873
|
inline-size: 100%;
|
|
1663
|
-
padding: ${
|
|
1874
|
+
padding: ${r(8)} 0;
|
|
1664
1875
|
background: none;
|
|
1665
1876
|
border: 0;
|
|
1666
1877
|
font: inherit;
|
|
1667
|
-
|
|
1878
|
+
/* G2 heading S: 24/1.15, -2.5%, semibold. */
|
|
1879
|
+
font-size: var(--impakt-type-heading-s-size, 1.5rem);
|
|
1880
|
+
line-height: 1.15;
|
|
1881
|
+
letter-spacing: -0.025em;
|
|
1668
1882
|
font-weight: ${m("semibold")};
|
|
1669
1883
|
color: ${t.text};
|
|
1670
1884
|
text-align: start;
|
|
1671
1885
|
cursor: pointer;
|
|
1672
1886
|
}
|
|
1673
|
-
button
|
|
1674
|
-
|
|
1887
|
+
button::after {
|
|
1888
|
+
content: '';
|
|
1889
|
+
position: absolute;
|
|
1890
|
+
inset: 0;
|
|
1891
|
+
}
|
|
1892
|
+
button:focus-visible {
|
|
1893
|
+
box-shadow: none;
|
|
1894
|
+
}
|
|
1895
|
+
button:focus-visible::after {
|
|
1896
|
+
box-shadow: ${t.focusShadow};
|
|
1897
|
+
}
|
|
1898
|
+
button:hover .q {
|
|
1899
|
+
text-decoration: underline;
|
|
1900
|
+
text-decoration-thickness: 1px;
|
|
1901
|
+
text-underline-offset: 0.15em;
|
|
1902
|
+
}
|
|
1903
|
+
.meta {
|
|
1904
|
+
font-family: ${t.fontMono};
|
|
1905
|
+
font-size: ${b("sm")};
|
|
1906
|
+
font-weight: 400;
|
|
1907
|
+
letter-spacing: normal;
|
|
1908
|
+
color: ${t.textMuted};
|
|
1909
|
+
}
|
|
1910
|
+
.status-pill {
|
|
1911
|
+
flex: none;
|
|
1912
|
+
}
|
|
1913
|
+
.pills {
|
|
1914
|
+
display: flex;
|
|
1915
|
+
flex-wrap: wrap;
|
|
1916
|
+
justify-content: flex-end;
|
|
1917
|
+
gap: ${r(2)};
|
|
1918
|
+
max-inline-size: 50%;
|
|
1675
1919
|
}
|
|
1920
|
+
/* 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
1921
|
.marker {
|
|
1922
|
+
position: relative;
|
|
1677
1923
|
flex: none;
|
|
1924
|
+
inline-size: 18px;
|
|
1925
|
+
block-size: 18px;
|
|
1926
|
+
/* Centred on the question's first line, not sat on its baseline. */
|
|
1927
|
+
align-self: flex-start;
|
|
1928
|
+
margin-block-start: calc((1lh - 18px) / 2);
|
|
1929
|
+
}
|
|
1930
|
+
.marker::before,
|
|
1931
|
+
.marker::after {
|
|
1932
|
+
content: '';
|
|
1933
|
+
position: absolute;
|
|
1934
|
+
background: ${t.text};
|
|
1935
|
+
}
|
|
1936
|
+
.marker::before {
|
|
1937
|
+
inset-inline: 0;
|
|
1938
|
+
inset-block-start: calc(50% - 1px);
|
|
1939
|
+
block-size: 2px;
|
|
1940
|
+
}
|
|
1941
|
+
.marker::after {
|
|
1942
|
+
inset-block: 0;
|
|
1943
|
+
inset-inline-start: calc(50% - 1px);
|
|
1944
|
+
inline-size: 2px;
|
|
1678
1945
|
transition: transform 120ms ease-in-out;
|
|
1679
1946
|
}
|
|
1680
|
-
|
|
1681
|
-
transform:
|
|
1947
|
+
.item.open .marker::after {
|
|
1948
|
+
transform: scaleY(0);
|
|
1949
|
+
}
|
|
1950
|
+
@media (forced-colors: active) {
|
|
1951
|
+
.marker::before,
|
|
1952
|
+
.marker::after {
|
|
1953
|
+
background: CanvasText;
|
|
1954
|
+
}
|
|
1682
1955
|
}
|
|
1683
1956
|
/* With no script the element is never defined: the buttons cannot work, so they do not look as if they do. */
|
|
1684
1957
|
:host(:not(:defined)) button {
|
|
1685
1958
|
cursor: default;
|
|
1686
1959
|
pointer-events: none;
|
|
1687
1960
|
}
|
|
1688
|
-
:host(:not(:defined)) button:hover {
|
|
1689
|
-
color: ${t.text};
|
|
1690
|
-
}
|
|
1691
1961
|
:host(:not(:defined)) .marker {
|
|
1692
1962
|
display: none;
|
|
1693
1963
|
}
|
|
1694
1964
|
.panel {
|
|
1695
|
-
|
|
1965
|
+
max-inline-size: 48rem;
|
|
1966
|
+
margin-block-start: calc(-1 * ${r(4)});
|
|
1967
|
+
padding-block-end: ${r(8)};
|
|
1696
1968
|
font-size: ${b("md")};
|
|
1969
|
+
line-height: 1.6;
|
|
1970
|
+
color: ${t.textMuted};
|
|
1697
1971
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1972
|
+
/*
|
|
1973
|
+
* Issues (frames 36:716, 36:430): rows divided by soft rules, each a code, a small "+" and the finding in
|
|
1974
|
+
* body type. An open finding becomes an inset soft box with an ink edge: the code above the heading, the
|
|
1975
|
+
* heading in heading S, the status at the top right, and the panel under them, with no marker.
|
|
1976
|
+
*/
|
|
1977
|
+
:host([look='issues']) {
|
|
1978
|
+
border-block-start: 0;
|
|
1979
|
+
}
|
|
1980
|
+
:host([look='issues']) .item {
|
|
1981
|
+
border-block-end: ${t.borderThin} solid ${Oi};
|
|
1982
|
+
}
|
|
1983
|
+
/* The finding keeps at least 16rem; on a narrow screen the status wraps under it, at the end, rather than squeezing it. */
|
|
1984
|
+
:host([look='issues']) .head {
|
|
1985
|
+
flex-wrap: wrap;
|
|
1986
|
+
gap: ${r(2)} ${r(4)};
|
|
1987
|
+
}
|
|
1988
|
+
:host([look='issues']) .h {
|
|
1989
|
+
flex: 1 1 16rem;
|
|
1990
|
+
}
|
|
1991
|
+
:host([look='issues']) .head > :is(.status-pill, .pills) {
|
|
1992
|
+
margin-inline-start: auto;
|
|
1993
|
+
}
|
|
1994
|
+
:host([look='issues']) button {
|
|
1995
|
+
align-items: center;
|
|
1996
|
+
column-gap: ${r(3)};
|
|
1997
|
+
padding-block: ${r(5)};
|
|
1998
|
+
font-size: 1.25rem;
|
|
1999
|
+
line-height: 1.2;
|
|
2000
|
+
letter-spacing: -0.01em;
|
|
2001
|
+
font-weight: ${m("regular")};
|
|
2002
|
+
}
|
|
2003
|
+
:host([look='issues']) .meta {
|
|
2004
|
+
margin-inline-end: ${r(1)};
|
|
2005
|
+
}
|
|
2006
|
+
:host([look='issues']) .marker {
|
|
2007
|
+
inline-size: 12px;
|
|
2008
|
+
block-size: 12px;
|
|
2009
|
+
}
|
|
2010
|
+
:host([look='issues']) .marker::before {
|
|
2011
|
+
inset-block-start: calc(50% - 0.75px);
|
|
2012
|
+
block-size: 1.5px;
|
|
2013
|
+
}
|
|
2014
|
+
:host([look='issues']) .marker::after {
|
|
2015
|
+
inset-inline-start: calc(50% - 0.75px);
|
|
2016
|
+
inline-size: 1.5px;
|
|
2017
|
+
}
|
|
2018
|
+
:host([look='issues']) .item.open {
|
|
2019
|
+
margin-block: ${r(4)};
|
|
2020
|
+
padding: ${r(6)};
|
|
2021
|
+
background: ${t.surfaceSubtle};
|
|
2022
|
+
border: ${t.borderThin} solid ${t.text};
|
|
2023
|
+
}
|
|
2024
|
+
:host([look='issues']) .item.open .head {
|
|
2025
|
+
align-items: flex-start;
|
|
2026
|
+
}
|
|
2027
|
+
:host([look='issues']) .item.open button {
|
|
2028
|
+
flex-direction: column;
|
|
2029
|
+
align-items: flex-start;
|
|
2030
|
+
row-gap: ${r(2)};
|
|
2031
|
+
padding-block: 0;
|
|
2032
|
+
font-size: var(--impakt-type-heading-s-size, 1.5rem);
|
|
2033
|
+
line-height: 1.15;
|
|
2034
|
+
letter-spacing: -0.025em;
|
|
2035
|
+
font-weight: ${m("semibold")};
|
|
2036
|
+
}
|
|
2037
|
+
:host([look='issues']) .item.open .meta {
|
|
2038
|
+
letter-spacing: normal;
|
|
2039
|
+
font-weight: 400;
|
|
2040
|
+
}
|
|
2041
|
+
:host([look='issues']) .item.open .marker {
|
|
2042
|
+
display: none;
|
|
2043
|
+
}
|
|
2044
|
+
:host([look='issues']) .panel {
|
|
2045
|
+
max-inline-size: none;
|
|
2046
|
+
margin: ${r(4)} 0 0;
|
|
2047
|
+
padding: 0;
|
|
2048
|
+
color: ${t.text};
|
|
2049
|
+
}
|
|
2050
|
+
:host([look='issues']) .panel[hidden] {
|
|
2051
|
+
display: none;
|
|
2052
|
+
}
|
|
2053
|
+
/* Without script every finding is open and has no marker; it reads as a list, not as boxes. */
|
|
2054
|
+
:host([look='issues']:not(:defined)) .item.open {
|
|
2055
|
+
margin: 0;
|
|
2056
|
+
padding: ${r(5)} 0;
|
|
2057
|
+
background: none;
|
|
2058
|
+
border: 0;
|
|
2059
|
+
border-block-end: ${t.borderThin} solid ${Oi};
|
|
2060
|
+
}
|
|
2061
|
+
@media (max-width: 40rem) {
|
|
2062
|
+
button {
|
|
2063
|
+
padding-block: ${r(6)};
|
|
2064
|
+
font-size: 1.25rem;
|
|
2065
|
+
}
|
|
2066
|
+
:host([look='issues']) button {
|
|
2067
|
+
padding-block: ${r(4)};
|
|
2068
|
+
font-size: 1.125rem;
|
|
2069
|
+
}
|
|
2070
|
+
:host([look='issues']) .item.open {
|
|
2071
|
+
padding: ${r(4)};
|
|
2072
|
+
}
|
|
2073
|
+
:host([look='issues']) .item.open button {
|
|
2074
|
+
padding-block: 0;
|
|
2075
|
+
font-size: 1.25rem;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
`]}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`
|
|
2079
|
+
${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`
|
|
2080
|
+
<div class="item ${a?"open":""}" part="item">
|
|
2081
|
+
<div class="head" part="head">
|
|
2082
|
+
<div class="h" role="heading" aria-level=${this.headingLevel}>
|
|
2083
|
+
<button
|
|
2084
|
+
id=${d}
|
|
2085
|
+
part="header"
|
|
2086
|
+
type="button"
|
|
2087
|
+
aria-expanded=${a?"true":"false"}
|
|
2088
|
+
aria-controls=${o}
|
|
2089
|
+
@click=${()=>this.toggle(i.id)}
|
|
2090
|
+
>
|
|
2091
|
+
${i.meta?s`<span class="meta" part="meta">${i.meta}</span>`:l}
|
|
2092
|
+
${e?s`<span class="marker" aria-hidden="true"></span>`:l}
|
|
2093
|
+
<span class="q">${i.heading}</span>
|
|
2094
|
+
</button>
|
|
2095
|
+
</div>
|
|
2096
|
+
${i.tags?.length?s`<span class="pills" part="pills">
|
|
2097
|
+
${ee(i.status,i.statusTone)}${i.tags.map(c=>ee(c.label,c.tone??"neutral","tag"))}
|
|
2098
|
+
</span>`:ee(i.status,i.statusTone)}
|
|
2099
|
+
${e?l:s`<span class="marker" aria-hidden="true"></span>`}
|
|
1713
2100
|
</div>
|
|
1714
2101
|
<div
|
|
1715
|
-
id=${
|
|
2102
|
+
id=${o}
|
|
1716
2103
|
class="panel"
|
|
1717
2104
|
part="panel"
|
|
1718
2105
|
role="region"
|
|
1719
|
-
aria-labelledby=${
|
|
1720
|
-
?hidden=${!
|
|
2106
|
+
aria-labelledby=${d}
|
|
2107
|
+
?hidden=${!a}
|
|
1721
2108
|
>
|
|
1722
|
-
<slot name=${`panel-${
|
|
2109
|
+
<slot name=${`panel-${i.id}`}>${i.body}</slot>
|
|
1723
2110
|
</div>
|
|
1724
2111
|
</div>
|
|
1725
2112
|
`})}
|
|
1726
|
-
`}};customElements.define("impakt-accordion",
|
|
2113
|
+
`}};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
2114
|
:host {
|
|
1728
2115
|
display: block;
|
|
1729
|
-
margin-block-end: ${
|
|
2116
|
+
margin-block-end: ${r(5)};
|
|
1730
2117
|
}
|
|
1731
2118
|
ol {
|
|
1732
2119
|
display: flex;
|
|
1733
|
-
gap: ${
|
|
2120
|
+
gap: ${r(2)};
|
|
1734
2121
|
list-style: none;
|
|
1735
2122
|
margin: 0;
|
|
1736
2123
|
padding: 0;
|
|
@@ -1739,7 +2126,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1739
2126
|
flex: 1;
|
|
1740
2127
|
font-size: ${b("sm")};
|
|
1741
2128
|
color: ${t.textMuted};
|
|
1742
|
-
padding-block-start: ${
|
|
2129
|
+
padding-block-start: ${r(2)};
|
|
1743
2130
|
border-block-start: 4px solid ${t.border};
|
|
1744
2131
|
}
|
|
1745
2132
|
li[data-state='done'] {
|
|
@@ -1758,11 +2145,11 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1758
2145
|
margin-block-end: 0;
|
|
1759
2146
|
}
|
|
1760
2147
|
:host([look='bars']) ol {
|
|
1761
|
-
gap: ${
|
|
2148
|
+
gap: ${r(1.5)};
|
|
1762
2149
|
}
|
|
1763
2150
|
:host([look='bars']) li {
|
|
1764
2151
|
position: relative;
|
|
1765
|
-
padding-block-start: ${
|
|
2152
|
+
padding-block-start: ${r(3)};
|
|
1766
2153
|
border: 0;
|
|
1767
2154
|
font-size: 12px;
|
|
1768
2155
|
min-inline-size: 0;
|
|
@@ -1776,7 +2163,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1776
2163
|
inset-inline: 0;
|
|
1777
2164
|
inset-block-start: 0;
|
|
1778
2165
|
block-size: 5px;
|
|
1779
|
-
border-radius:
|
|
2166
|
+
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
1780
2167
|
background: ${t.border};
|
|
1781
2168
|
}
|
|
1782
2169
|
:host([look='bars']) li[data-state='done']::before {
|
|
@@ -1792,38 +2179,107 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1792
2179
|
:host([hide-labels]) .name {
|
|
1793
2180
|
${T}
|
|
1794
2181
|
}
|
|
2182
|
+
/* Stages: numbered names on a soft rule, the current one underlined in the ink. */
|
|
2183
|
+
:host([look='stages']) nav {
|
|
2184
|
+
overflow-x: auto;
|
|
2185
|
+
scrollbar-width: thin;
|
|
2186
|
+
}
|
|
2187
|
+
:host([look='stages']) ol {
|
|
2188
|
+
gap: ${r(8)};
|
|
2189
|
+
inline-size: max-content;
|
|
2190
|
+
min-inline-size: 100%;
|
|
2191
|
+
box-shadow: inset 0 -1px 0 ${gr};
|
|
2192
|
+
}
|
|
2193
|
+
:host([look='stages']) li {
|
|
2194
|
+
flex: none;
|
|
2195
|
+
padding: 0;
|
|
2196
|
+
border: 0;
|
|
2197
|
+
font-size: ${b("md")};
|
|
2198
|
+
font-weight: ${m("regular")};
|
|
2199
|
+
color: ${t.textMuted};
|
|
2200
|
+
white-space: nowrap;
|
|
2201
|
+
}
|
|
2202
|
+
:host([look='stages']) .stage {
|
|
2203
|
+
display: inline-flex;
|
|
2204
|
+
align-items: baseline;
|
|
2205
|
+
gap: ${r(2)};
|
|
2206
|
+
min-block-size: 24px;
|
|
2207
|
+
padding-block: ${r(3)};
|
|
2208
|
+
border-block-end: 3px solid transparent;
|
|
2209
|
+
color: inherit;
|
|
2210
|
+
text-decoration: none;
|
|
2211
|
+
}
|
|
2212
|
+
:host([look='stages']) .num {
|
|
2213
|
+
font-family: ${t.fontMono};
|
|
2214
|
+
font-size: ${b("sm")};
|
|
2215
|
+
}
|
|
2216
|
+
:host([look='stages']) li[data-state='done'] .num {
|
|
2217
|
+
color: ${t.text};
|
|
2218
|
+
}
|
|
2219
|
+
:host([look='stages']) li[data-state='current'] {
|
|
2220
|
+
color: ${t.text};
|
|
2221
|
+
}
|
|
2222
|
+
:host([look='stages']) li[data-state='current'] .stage {
|
|
2223
|
+
border-block-end-color: ${t.text};
|
|
2224
|
+
}
|
|
2225
|
+
:host([look='stages']) a.stage:hover .name {
|
|
2226
|
+
text-decoration: underline;
|
|
2227
|
+
text-underline-offset: 0.2em;
|
|
2228
|
+
}
|
|
2229
|
+
@media (forced-colors: active) {
|
|
2230
|
+
:host([look='stages']) li[data-state='current'] .stage { border-block-end-color: CanvasText; }
|
|
2231
|
+
}
|
|
1795
2232
|
/* Below 30rem the labels stop fitting; the position in words is the part
|
|
1796
2233
|
that has to survive, so the list collapses to bars and the current
|
|
1797
2234
|
step's name. */
|
|
1798
2235
|
@media (max-width: 30rem) {
|
|
1799
|
-
li:not([data-state='current']) .name {
|
|
2236
|
+
:host(:not([look='stages'])) li:not([data-state='current']) .name {
|
|
1800
2237
|
${T}
|
|
1801
2238
|
}
|
|
1802
2239
|
}
|
|
1803
|
-
`]}
|
|
2240
|
+
`]}renderStages(e){let i=this.doneText||S("done"),a=this.steps.some(o=>o.href);return s`
|
|
2241
|
+
<nav part="nav" aria-label=${this.label} tabindex=${a?l:"0"}>
|
|
2242
|
+
<ol part="list">
|
|
2243
|
+
${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>
|
|
2244
|
+
<span class="name" part="step-label">${o.label}</span>${c==="done"?s`<span class="sr-only">, ${i}</span>`:l}`;return s`
|
|
2245
|
+
<li part="step step-${c}" data-state=${c}>
|
|
2246
|
+
${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>`}
|
|
2247
|
+
</li>
|
|
2248
|
+
`})}
|
|
2249
|
+
</ol>
|
|
2250
|
+
</nav>
|
|
2251
|
+
`}render(){let e=this.steps.findIndex(i=>i.id===this.current);return this.look==="stages"?this.renderStages(e):s`
|
|
1804
2252
|
<nav part="nav" aria-label=${this.label}>
|
|
1805
2253
|
<ol part="list">
|
|
1806
|
-
${this.steps.map((
|
|
2254
|
+
${this.steps.map((i,a)=>{let o=a<e?"done":a===e?"current":"todo";return s`
|
|
1807
2255
|
<li part="step step-${o}" data-state=${o} aria-current=${o==="current"?"step":l}>
|
|
1808
|
-
${o==="current"?
|
|
1809
|
-
<span class="name" part="step-label">${
|
|
2256
|
+
${o==="current"?s`<span class="sr-only">${S("Step {step} of {steps}:",{step:a+1,steps:this.steps.length})} </span>`:l}
|
|
2257
|
+
<span class="name" part="step-label">${i.label}</span>
|
|
1810
2258
|
</li>
|
|
1811
2259
|
`})}
|
|
1812
2260
|
</ol>
|
|
1813
2261
|
</nav>
|
|
1814
|
-
`}};customElements.define("impakt-progress",
|
|
2262
|
+
`}};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`
|
|
1815
2263
|
:host { display: inline-flex; flex: none; }
|
|
1816
|
-
span.chip { display: inline-flex; align-items: center; gap: ${
|
|
2264
|
+
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; }
|
|
1817
2265
|
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
1818
|
-
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.
|
|
2266
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.text}; background: ${t.surfaceCard}; }
|
|
2267
|
+
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${m("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
2268
|
+
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
2269
|
+
: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; }
|
|
2270
|
+
: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; }
|
|
2271
|
+
:host([size='lg']) .meta { font-family: ${Pi}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }
|
|
1819
2272
|
:host([look='plain']) span.chip { padding: 0; }
|
|
1820
|
-
.dot { inline-size:
|
|
2273
|
+
.dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }
|
|
2274
|
+
/* Yellow means "needs your attention": the accent, with an ink stroke so it shows on white. */
|
|
2275
|
+
.dot.warn { background: ${u("color.accent.default","#ffd43b")}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
2276
|
+
@media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }
|
|
1821
2277
|
svg { inline-size: 12px; block-size: 12px; }
|
|
1822
2278
|
.meta { opacity: 0.72; text-transform: none; }
|
|
1823
2279
|
:host([look='plain']) .label { opacity: 0.72; }
|
|
1824
|
-
`]}render(){let e=this.icon==="dot"?
|
|
2280
|
+
`]}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
2281
|
:host { display: inline-flex; }
|
|
1826
|
-
span { display: inline-flex; align-items: center; gap: ${
|
|
2282
|
+
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
2283
|
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
1828
2284
|
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
1829
2285
|
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
@@ -1831,50 +2287,35 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1831
2287
|
:host([tone='info']) span { background: ${t.infoSubtle}; color: ${t.infoText}; }
|
|
1832
2288
|
:host([tone='inverse']) span { background: ${t.text}; color: ${t.surfaceCard}; box-shadow: none; }
|
|
1833
2289
|
:host([tone='solid']) span { background: ${t.brand}; color: ${t.onBrand}; box-shadow: none; }
|
|
2290
|
+
/* Accent: the yellow with ink words, for the label that needs attention. */
|
|
2291
|
+
:host([tone='accent']) span { background: ${u("color.accent.default","#ffd43b")}; color: ${u("color.accent.on","#111111")}; box-shadow: none; }
|
|
2292
|
+
:host([look='outline']) span { background: transparent; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.text}; }
|
|
2293
|
+
: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")}; }
|
|
2294
|
+
: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
2295
|
@media (forced-colors: active) { span { border-color: CanvasText; } }
|
|
1835
|
-
`]}render(){return
|
|
2296
|
+
`]}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
2297
|
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
2298
|
/* Resizing is left on deliberately. 1.4.4 and 1.4.12 both assume text
|
|
1848
2299
|
can be made bigger, and a fixed box is where that stops working. */
|
|
1849
2300
|
resize: vertical;
|
|
1850
2301
|
}
|
|
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`
|
|
2302
|
+
`]}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
2303
|
<textarea
|
|
1864
2304
|
id=${this.controlId}
|
|
1865
2305
|
part="textarea"
|
|
1866
2306
|
name=${this.name||l}
|
|
1867
2307
|
rows=${this.rows}
|
|
1868
2308
|
maxlength=${this.maxlength??l}
|
|
2309
|
+
placeholder=${this.placeholder||l}
|
|
1869
2310
|
?disabled=${this.disabled}
|
|
1870
2311
|
?readonly=${this.readonly}
|
|
1871
2312
|
?required=${this.required}
|
|
1872
2313
|
aria-describedby=${this.describedBy}
|
|
1873
2314
|
aria-invalid=${this.error?"true":l}
|
|
1874
2315
|
.value=${this.value}
|
|
1875
|
-
@input=${
|
|
2316
|
+
@input=${i=>{this.filledText="",this.setFormValue(i.target.value)}}
|
|
1876
2317
|
></textarea>
|
|
1877
|
-
`}updated(
|
|
2318
|
+
`}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
2319
|
fieldset {
|
|
1879
2320
|
border: 0;
|
|
1880
2321
|
margin: 0;
|
|
@@ -1887,18 +2328,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1887
2328
|
.option {
|
|
1888
2329
|
display: flex;
|
|
1889
2330
|
align-items: flex-start;
|
|
1890
|
-
gap: ${
|
|
1891
|
-
padding: ${
|
|
2331
|
+
gap: ${r(3)};
|
|
2332
|
+
padding: ${r(3)};
|
|
1892
2333
|
border: ${t.borderThin} solid ${t.border};
|
|
1893
2334
|
border-radius: ${t.radius};
|
|
1894
|
-
margin-block-end: ${
|
|
2335
|
+
margin-block-end: ${r(2)};
|
|
1895
2336
|
cursor: pointer;
|
|
1896
2337
|
}
|
|
1897
2338
|
.option:hover {
|
|
1898
2339
|
background: ${t.surfaceSubtle};
|
|
1899
2340
|
}
|
|
1900
2341
|
.option input {
|
|
1901
|
-
${
|
|
2342
|
+
${z}
|
|
1902
2343
|
inline-size: 20px;
|
|
1903
2344
|
block-size: 20px;
|
|
1904
2345
|
margin: 0;
|
|
@@ -1913,19 +2354,19 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1913
2354
|
display: block;
|
|
1914
2355
|
font-size: ${b("sm")};
|
|
1915
2356
|
color: ${t.textMuted};
|
|
1916
|
-
margin-block-start: ${
|
|
2357
|
+
margin-block-start: ${r(1)};
|
|
1917
2358
|
}
|
|
1918
2359
|
:host([invalid]) .option {
|
|
1919
2360
|
border-color: ${t.danger};
|
|
1920
2361
|
}
|
|
1921
|
-
`]}renderLabel(){return
|
|
1922
|
-
${this.label}${this.required?
|
|
1923
|
-
</legend>`}onToggle(e,
|
|
1924
|
-
${this.options.map((e,
|
|
1925
|
-
<label class="option" part="option" for=${
|
|
2362
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
2363
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
2364
|
+
</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`
|
|
2365
|
+
${this.options.map((e,i)=>{let a=this.id_(`opt-${i}`),o=e.description?this.id_(`opt-${i}-desc`):void 0;return s`
|
|
2366
|
+
<label class="option" part="option" for=${a}>
|
|
1926
2367
|
<input
|
|
1927
2368
|
type="checkbox"
|
|
1928
|
-
id=${
|
|
2369
|
+
id=${a}
|
|
1929
2370
|
value=${e.value}
|
|
1930
2371
|
.checked=${this.values.includes(e.value)}
|
|
1931
2372
|
?disabled=${this.disabled}
|
|
@@ -1934,18 +2375,18 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1934
2375
|
/>
|
|
1935
2376
|
<span>
|
|
1936
2377
|
<span class="option-text">${e.label}</span>
|
|
1937
|
-
${e.description?
|
|
2378
|
+
${e.description?s`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1938
2379
|
</span>
|
|
1939
2380
|
</label>
|
|
1940
2381
|
`})}
|
|
1941
|
-
`}render(){return
|
|
2382
|
+
`}render(){return s`
|
|
1942
2383
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
1943
2384
|
${this.renderLabel()}
|
|
1944
|
-
${this.description?
|
|
2385
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
1945
2386
|
${this.renderControl()}
|
|
1946
2387
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
1947
2388
|
</fieldset>
|
|
1948
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",
|
|
2389
|
+
`}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
2390
|
fieldset {
|
|
1950
2391
|
border: 0;
|
|
1951
2392
|
margin: 0;
|
|
@@ -1957,12 +2398,12 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1957
2398
|
}
|
|
1958
2399
|
.parts {
|
|
1959
2400
|
display: flex;
|
|
1960
|
-
gap: ${
|
|
2401
|
+
gap: ${r(3)};
|
|
1961
2402
|
}
|
|
1962
2403
|
.part {
|
|
1963
2404
|
display: flex;
|
|
1964
2405
|
flex-direction: column;
|
|
1965
|
-
gap: ${
|
|
2406
|
+
gap: ${r(1)};
|
|
1966
2407
|
}
|
|
1967
2408
|
.part label {
|
|
1968
2409
|
font-size: ${b("sm")};
|
|
@@ -1970,7 +2411,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1970
2411
|
}
|
|
1971
2412
|
input {
|
|
1972
2413
|
min-block-size: 44px;
|
|
1973
|
-
padding: ${
|
|
2414
|
+
padding: ${r(3)};
|
|
1974
2415
|
font-family: inherit;
|
|
1975
2416
|
font-size: ${b("md")};
|
|
1976
2417
|
color: ${t.text};
|
|
@@ -1978,52 +2419,52 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
1978
2419
|
border: ${t.borderThin} solid ${t.border};
|
|
1979
2420
|
border-radius: ${t.radius};
|
|
1980
2421
|
/* Room for the digits plus the padding and border, so the box is never narrower than a finger. */
|
|
1981
|
-
inline-size: calc(3ch + ${
|
|
2422
|
+
inline-size: calc(3ch + ${r(6)} + 2px);
|
|
1982
2423
|
}
|
|
1983
2424
|
.year input {
|
|
1984
|
-
inline-size: calc(5ch + ${
|
|
2425
|
+
inline-size: calc(5ch + ${r(6)} + 2px);
|
|
1985
2426
|
}
|
|
1986
2427
|
:host([invalid]) input {
|
|
1987
2428
|
border-color: ${t.danger};
|
|
1988
2429
|
border-width: ${t.borderThick};
|
|
1989
2430
|
}
|
|
1990
|
-
`]}renderLabel(){return
|
|
1991
|
-
${this.label}${this.required?
|
|
1992
|
-
</legend>`}datePart(e,
|
|
2431
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
2432
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
2433
|
+
</legend>`}datePart(e,i,a,o){let d=this.id_(e);return s`
|
|
1993
2434
|
<div class="part ${e}">
|
|
1994
|
-
<label for=${d}>${
|
|
2435
|
+
<label for=${d}>${i}</label>
|
|
1995
2436
|
<input
|
|
1996
2437
|
id=${d}
|
|
1997
2438
|
type="text"
|
|
1998
2439
|
inputmode="numeric"
|
|
1999
|
-
maxlength=${
|
|
2440
|
+
maxlength=${a}
|
|
2000
2441
|
.value=${this[e]}
|
|
2001
2442
|
autocomplete=${this.autocompleteSection?`${this.autocompleteSection}-${o}`:l}
|
|
2002
2443
|
?disabled=${this.disabled}
|
|
2003
2444
|
@input=${c=>{this[e]=c.target.value,this.emit()}}
|
|
2004
2445
|
/>
|
|
2005
2446
|
</div>
|
|
2006
|
-
`}emit(){let
|
|
2447
|
+
`}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
2448
|
<div class="parts" part="parts">
|
|
2008
|
-
${this.datePart("day",
|
|
2009
|
-
${this.datePart("month",
|
|
2010
|
-
${this.datePart("year",
|
|
2449
|
+
${this.datePart("day",S("Day"),2,"day")}
|
|
2450
|
+
${this.datePart("month",S("Month"),2,"month")}
|
|
2451
|
+
${this.datePart("year",S("Year"),4,"year")}
|
|
2011
2452
|
</div>
|
|
2012
|
-
`}render(){return
|
|
2453
|
+
`}render(){return s`
|
|
2013
2454
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
2014
2455
|
${this.renderLabel()}
|
|
2015
|
-
${this.description?
|
|
2456
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2016
2457
|
${this.renderControl()}
|
|
2017
2458
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2018
2459
|
</fieldset>
|
|
2019
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",
|
|
2460
|
+
`}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
2461
|
dialog {
|
|
2021
2462
|
padding: 0;
|
|
2022
|
-
border:
|
|
2463
|
+
border: ${t.borderThin} solid ${t.text};
|
|
2023
2464
|
border-radius: ${t.radius2xl};
|
|
2024
2465
|
background: ${t.surfaceCard};
|
|
2025
2466
|
color: ${t.text};
|
|
2026
|
-
box-shadow:
|
|
2467
|
+
box-shadow: var(--impakt-shadow-dialog, none);
|
|
2027
2468
|
max-inline-size: min(32rem, calc(100vw - 2rem));
|
|
2028
2469
|
/* 1.4.10 Reflow: a dialog taller than the viewport must scroll inside
|
|
2029
2470
|
itself rather than clipping, at 320px and at 400% zoom alike. */
|
|
@@ -2031,25 +2472,61 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2031
2472
|
overflow: auto;
|
|
2032
2473
|
}
|
|
2033
2474
|
dialog::backdrop {
|
|
2034
|
-
|
|
2035
|
-
|
|
2475
|
+
/* The ink at half strength. The text colour is the paper in dark, so the backdrop is the ink there too. */
|
|
2476
|
+
background: rgb(17 17 17 / 0.5);
|
|
2477
|
+
}
|
|
2478
|
+
:host([size='lg']) dialog {
|
|
2479
|
+
inline-size: 720px;
|
|
2480
|
+
max-inline-size: calc(100vw - 2rem);
|
|
2481
|
+
}
|
|
2482
|
+
.titles {
|
|
2483
|
+
display: flex;
|
|
2484
|
+
flex-direction: column;
|
|
2485
|
+
gap: ${r(2)};
|
|
2486
|
+
min-inline-size: 0;
|
|
2487
|
+
}
|
|
2488
|
+
.eyebrow {
|
|
2489
|
+
margin: 0;
|
|
2490
|
+
font-family: ${t.fontMono};
|
|
2491
|
+
font-size: ${b("sm")};
|
|
2492
|
+
color: ${t.textMuted};
|
|
2493
|
+
}
|
|
2494
|
+
.foot {
|
|
2495
|
+
display: flex;
|
|
2496
|
+
flex-wrap: wrap;
|
|
2497
|
+
justify-content: flex-end;
|
|
2498
|
+
gap: ${r(3)};
|
|
2499
|
+
padding: ${r(5)} ${r(6)};
|
|
2500
|
+
border-block-start: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8);
|
|
2501
|
+
}
|
|
2502
|
+
.foot.empty {
|
|
2503
|
+
display: none;
|
|
2036
2504
|
}
|
|
2037
2505
|
.head {
|
|
2038
2506
|
display: flex;
|
|
2039
2507
|
align-items: flex-start;
|
|
2040
2508
|
justify-content: space-between;
|
|
2041
|
-
gap: ${
|
|
2042
|
-
padding: ${
|
|
2509
|
+
gap: ${r(3)};
|
|
2510
|
+
padding: ${r(6)} ${r(6)} 0;
|
|
2043
2511
|
}
|
|
2512
|
+
/* G2: about 32px, semibold, tight. */
|
|
2044
2513
|
.heading {
|
|
2045
2514
|
margin: 0;
|
|
2046
2515
|
font-family: ${t.fontHeading};
|
|
2047
|
-
font-size:
|
|
2048
|
-
|
|
2516
|
+
font-size: var(--impakt-type-heading-m-size, 2rem);
|
|
2517
|
+
line-height: 1.1;
|
|
2518
|
+
letter-spacing: -0.03em;
|
|
2519
|
+
font-weight: ${m("semibold")};
|
|
2049
2520
|
color: ${t.textHeading};
|
|
2050
2521
|
}
|
|
2051
2522
|
.body {
|
|
2052
|
-
padding: ${
|
|
2523
|
+
padding: ${r(4)} ${r(6)} ${r(6)};
|
|
2524
|
+
}
|
|
2525
|
+
@media (max-width: 40rem) {
|
|
2526
|
+
.heading { font-size: 1.5rem; }
|
|
2527
|
+
.head { padding: ${r(5)} ${r(5)} 0; }
|
|
2528
|
+
.body { padding: ${r(4)} ${r(5)} ${r(5)}; }
|
|
2529
|
+
.foot { padding: ${r(4)} ${r(5)}; }
|
|
2053
2530
|
}
|
|
2054
2531
|
@media (max-width: 40rem) {
|
|
2055
2532
|
:host([phone-full-screen]) dialog {
|
|
@@ -2062,7 +2539,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2062
2539
|
}
|
|
2063
2540
|
}
|
|
2064
2541
|
.close {
|
|
2065
|
-
${
|
|
2542
|
+
${z}
|
|
2066
2543
|
display: inline-flex;
|
|
2067
2544
|
align-items: center;
|
|
2068
2545
|
justify-content: center;
|
|
@@ -2075,33 +2552,39 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2075
2552
|
color: ${t.text};
|
|
2076
2553
|
cursor: pointer;
|
|
2077
2554
|
}
|
|
2078
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(
|
|
2555
|
+
`]}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
2556
|
<dialog
|
|
2080
2557
|
part="dialog"
|
|
2081
2558
|
aria-labelledby=${this.heading?this.id_("heading"):l}
|
|
2082
|
-
@cancel=${
|
|
2559
|
+
@cancel=${i=>{this.dismissible?this.close():i.preventDefault()}}
|
|
2083
2560
|
@close=${()=>{this.open&&this.close()}}
|
|
2084
2561
|
>
|
|
2085
2562
|
<div class="head">
|
|
2086
|
-
|
|
2087
|
-
|
|
2563
|
+
<div class="titles">
|
|
2564
|
+
${this.eyebrow?s`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:l}
|
|
2565
|
+
${this.heading?s`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>`:l}
|
|
2566
|
+
</div>
|
|
2567
|
+
${this.dismissible?s`<button class="close" part="close" type="button" @click=${this.close}>
|
|
2088
2568
|
<span aria-hidden="true">×</span>
|
|
2089
2569
|
<span class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">${this.closeLabel}</span>
|
|
2090
2570
|
</button>`:l}
|
|
2091
2571
|
</div>
|
|
2092
2572
|
<div class="body" part="body"><slot></slot></div>
|
|
2573
|
+
<div class="foot ${this.hasFooter?"":"empty"}" part="footer">
|
|
2574
|
+
<slot name="footer" @slotchange=${this.onFooter}></slot><slot name="actions" @slotchange=${this.onFooter}></slot>
|
|
2575
|
+
</div>
|
|
2093
2576
|
</dialog>
|
|
2094
|
-
`}};customElements.define("impakt-dialog",
|
|
2577
|
+
`}};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
2578
|
: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 { ${
|
|
2579
|
+
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${r(3)}; counter-reset: point; }
|
|
2580
|
+
li { position: relative; padding-inline-start: ${r(7)}; ${w("md")} text-wrap: pretty; counter-increment: point; }
|
|
2581
|
+
:host([size='sm']) li { ${w("sm")} }
|
|
2582
|
+
:host([size='lg']) li { ${w("lg")} }
|
|
2100
2583
|
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
2584
|
: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
2585
|
: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
2586
|
@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(
|
|
2587
|
+
`]}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
2588
|
:host { display: block; min-inline-size: 0; container-type: inline-size; }
|
|
2106
2589
|
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u("layout.gutter.md","16px")}; align-items: stretch; }
|
|
2107
2590
|
:host([gap='none']) .columns { gap: 0; }
|
|
@@ -2120,7 +2603,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2120
2603
|
::slotted(*) { max-inline-size: 100%; }
|
|
2121
2604
|
@container (max-width: 40rem) { :host(:not([stack-on='never'])) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2122
2605
|
@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,
|
|
2606
|
+
`]}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
2607
|
:host { display: block; }
|
|
2125
2608
|
a { display: inline-flex; align-items: center; min-height: ${t.targetMin}; min-width: ${t.targetMin};
|
|
2126
2609
|
color: ${t.link}; text-decoration: underline; overflow-wrap: anywhere; max-width: 100%; }
|
|
@@ -2130,55 +2613,79 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2130
2613
|
/* An address is written one line at a time, and opening hours are often one
|
|
2131
2614
|
day to a line. Long unbroken values still wrap at 320px (1.4.10). */
|
|
2132
2615
|
.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>`:
|
|
2616
|
+
`]}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}
|
|
2617
|
+
><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
2618
|
:host { --impakt-page-inner: ${u("layout.page-width","1200px")}; }
|
|
2136
2619
|
:host([width='narrow']) { --impakt-page-inner: 760px; }
|
|
2137
2620
|
:host([width='wide']) { --impakt-page-inner: 1440px; }
|
|
2138
|
-
|
|
2621
|
+
:host([width='content']) { --impakt-page-inner: 1080px; }
|
|
2622
|
+
`,$r=h`
|
|
2139
2623
|
:host { --impakt-page-margin: ${u("layout.margin.phone","16px")}; }
|
|
2140
2624
|
@container impakt-page (min-width: 40rem) { .frame { --impakt-page-margin: ${u("layout.margin.tablet","32px")}; } }
|
|
2141
2625
|
@container impakt-page (min-width: 64rem) { .frame { --impakt-page-margin: ${u("layout.margin.desktop","64px")}; } }
|
|
2142
|
-
`,
|
|
2626
|
+
`,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
2627
|
:host { display: block; container: impakt-page / inline-size; }
|
|
2144
2628
|
.frame { position: relative; display: flex; flex-direction: column; min-block-size: 100%; overflow-x: clip; }
|
|
2145
2629
|
.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: ${
|
|
2630
|
+
header { background: ${u("color.surface.header","transparent")}; color: ${u("color.text.on-header","inherit")}; padding-block: ${r(4)}; }
|
|
2147
2631
|
/* What sits in the header and footer takes their text colour, so words on a dark footer stay readable. */
|
|
2148
2632
|
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
2633
|
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
2634
|
:host([sticky-header]) header { position: sticky; inset-block-start: 0; z-index: 10; }
|
|
2151
|
-
main { flex: 1; padding-block: ${
|
|
2635
|
+
main { flex: 1; padding-block: ${r(6)} ${r(10)}; }
|
|
2152
2636
|
main:focus { outline: none; }
|
|
2153
2637
|
/* 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: ${
|
|
2638
|
+
: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; }
|
|
2639
|
+
: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
2640
|
: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: ${
|
|
2641
|
+
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")}; }
|
|
2642
|
+
.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
2643
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
2160
2644
|
.skip:focus { transform: none; }
|
|
2161
2645
|
.empty { display: none; }
|
|
2162
|
-
`]}hasSlot(
|
|
2646
|
+
`]}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
2647
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
2164
|
-
${
|
|
2648
|
+
${i?s`<header part="header"><div class="inner"><slot name="header"></slot></div></header>`:l}
|
|
2165
2649
|
<main id="content" tabindex="-1" part="main"><div class="inner"><slot></slot></div></main>
|
|
2166
|
-
${
|
|
2167
|
-
</div>`}opensOn(
|
|
2650
|
+
${a?s`<footer part="footer"><div class="inner"><slot name="footer"></slot></div></footer>`:l}
|
|
2651
|
+
</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
2652
|
:host { display: block; --impakt-page-margin: inherit; }
|
|
2169
2653
|
/* What a solid card on a brand band goes back to, since the band repaints these for its own text. */
|
|
2170
2654
|
: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
2655
|
.band { box-sizing: border-box; border-radius: ${t.radiusLg}; }
|
|
2172
2656
|
/* --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(${
|
|
2657
|
+
: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
2658
|
:host([tone='subtle']) .band { background: ${t.surfaceSubtle}; }
|
|
2175
2659
|
:host([tone='inset']) .band { background: ${t.surfaceInset}; }
|
|
2176
2660
|
:host([tone='card']) .band { background: ${t.surfaceCard}; }
|
|
2661
|
+
:host([tone='board']) .band { background: var(--impakt-color-surface-board, var(--ik-surface-board, #e3e2dd)); }
|
|
2662
|
+
/*
|
|
2663
|
+
* A toned band sets what a button and a solid mark on it need, and resets what
|
|
2664
|
+
* an outer band set, so a band inside another one, or a banner inside a band,
|
|
2665
|
+
* never draws with colours meant for the band round it. --impakt-color-text-inverse
|
|
2666
|
+
* is the colour that reads on the band's text colour: a dark button's words.
|
|
2667
|
+
*/
|
|
2668
|
+
:host(:not([tone='none'])) .band { --impakt-button-primary: initial; --impakt-button-on-primary: initial; --impakt-button-primary-hover: initial; --impakt-color-text-inverse: initial; }
|
|
2669
|
+
:host([tone='brand']) .band { --impakt-color-text-inverse: ${t.brand}; }
|
|
2670
|
+
:host([tone='accent']) .band { --impakt-color-text-inverse: var(--impakt-solid-card); }
|
|
2177
2671
|
: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
2672
|
/* Ink and accent bands take their colours from the host, because the band repaints the text colour for what is inside it. */
|
|
2179
2673
|
: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
2674
|
: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
2675
|
: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); }
|
|
2676
|
+
/* On ink the cards are the raised ink with a darker rule (G2 ink-raised and line-inverse), not a wash. */
|
|
2677
|
+
:host([tone='ink']) .band {
|
|
2678
|
+
--impakt-color-text-inverse: var(--impakt-band);
|
|
2679
|
+
--impakt-button-primary: var(--impakt-band-on);
|
|
2680
|
+
--impakt-button-on-primary: var(--impakt-band);
|
|
2681
|
+
--impakt-button-primary-hover: color-mix(in srgb, var(--impakt-band-on) 86%, var(--impakt-band));
|
|
2682
|
+
/* Mixed from the band, so it is #1C1C1C on light ink and still a step off the band when dark turns the band over. */
|
|
2683
|
+
--impakt-color-surface-card: color-mix(in srgb, var(--impakt-band) 95%, var(--impakt-band-on));
|
|
2684
|
+
--impakt-color-line-soft: color-mix(in srgb, var(--impakt-band) 87%, var(--impakt-band-on));
|
|
2685
|
+
/* The accent reads on light-theme ink only; the theme leaves it unset in dark, where the band turns paper. */
|
|
2686
|
+
--impakt-site-menu-current: var(--impakt-color-accent-on-ink, currentColor);
|
|
2687
|
+
--impakt-steps-current: var(--impakt-color-accent-on-ink, currentColor);
|
|
2688
|
+
}
|
|
2182
2689
|
/* The lines are a tenth of the band's own text colour, so they suit any tone. They carry no meaning. */
|
|
2183
2690
|
:host([pattern]:not([pattern='none'])) .band { --impakt-pattern-line: color-mix(in srgb, currentColor 10%, transparent); }
|
|
2184
2691
|
: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 +2693,169 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2186
2693
|
:host([pattern='columns']) .band { background-image: linear-gradient(to right, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 5.625rem 100%; }
|
|
2187
2694
|
:host([pattern='ruled']) .band { background-image: linear-gradient(to bottom, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 100% 2.5rem; }
|
|
2188
2695
|
@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(${
|
|
2696
|
+
:host(:not([bleed]):not([tone='none'])) .band { padding-inline: ${r(6)}; }
|
|
2697
|
+
:host([padding='sm']) .band { padding-block: ${r(4)}; }
|
|
2698
|
+
:host([padding='md']) .band { padding-block: ${r(8)}; }
|
|
2699
|
+
:host([padding='lg']) .band { padding-block: ${r(12)}; }
|
|
2700
|
+
:host([padding='xl']) .band { padding-block: ${r(16)}; }
|
|
2701
|
+
:host([padding='2xl']) .band { padding-block: clamp(${r(14)}, 8vw, ${r(28)}); }
|
|
2702
|
+
:host([padding='3xl']) .band { padding-block: clamp(${r(16)}, 10vw, ${r(30)}); }
|
|
2195
2703
|
.content { max-inline-size: var(--impakt-page-inner); margin-inline: auto; }
|
|
2196
|
-
`]}render(){return
|
|
2704
|
+
`]}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
2705
|
/* It grows to fill a row it sits in, because it measures itself to decide when to fold. */
|
|
2198
2706
|
:host { display: block; flex: 1 1 8rem; min-inline-size: 0; }
|
|
2199
2707
|
nav { display: flex; flex-direction: column; position: relative; }
|
|
2200
2708
|
li { flex: none; }
|
|
2201
|
-
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
2709
|
+
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${r(1)} ${r(6)}; align-items: center; justify-content: flex-end; }
|
|
2202
2710
|
:host([align='start']) ul { justify-content: flex-start; }
|
|
2203
2711
|
:host([align='center']) ul { justify-content: center; }
|
|
2204
|
-
a { ${
|
|
2712
|
+
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
2713
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
2206
2714
|
a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
|
|
2207
|
-
.toggle { display: none; ${
|
|
2715
|
+
.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
2716
|
/* When they do not fit, the links fold behind a Menu button and open as a panel under it. */
|
|
2209
2717
|
:host([folded]) { flex: 0 0 auto; }
|
|
2210
2718
|
:host([folded]) .toggle { display: inline-flex; }
|
|
2211
2719
|
: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
2720
|
: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: ${
|
|
2721
|
+
:host([size='sm']) ul { column-gap: ${r(6)}; }
|
|
2214
2722
|
: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% + ${
|
|
2723
|
+
:host([size='sm'][folded]) a { padding-inline: ${r(3)}; }
|
|
2724
|
+
: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
2725
|
:host([folded]) ul.open { display: flex; }
|
|
2218
2726
|
:host([folded]) li { text-align: start; }
|
|
2219
|
-
:host([folded]) a { display: flex; padding: ${
|
|
2727
|
+
:host([folded]) a { display: flex; padding: ${r(3)} ${r(3)}; }
|
|
2728
|
+
/* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */
|
|
2729
|
+
:host([look='tabs']) ul { gap: 0; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }
|
|
2730
|
+
: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; }
|
|
2731
|
+
:host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; }
|
|
2732
|
+
: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); }
|
|
2733
|
+
:host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
|
|
2734
|
+
@media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }
|
|
2735
|
+
:host([look='tabs'][folded]) ul { padding: ${r(2)}; }
|
|
2220
2736
|
/* With no script the element is never defined, so it cannot measure itself and fold. The links
|
|
2221
2737
|
wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */
|
|
2222
2738
|
:host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2739
|
+
/*
|
|
2740
|
+
* fold="narrow": the fold is decided here, by the width of the container around the nav, so it
|
|
2741
|
+
* is the same before the script runs, after it, and without it. The Menu button opens the
|
|
2742
|
+
* panel as a popover, which the browser does by itself. On a wide screen the panel is not a box
|
|
2743
|
+
* at all, and its links sit in the row as they always did.
|
|
2744
|
+
*/
|
|
2745
|
+
:host([fold='narrow']) .panel { display: contents; color: inherit; }
|
|
2746
|
+
:host([fold='narrow']) .close, :host([fold='narrow']) .action { display: none; }
|
|
2747
|
+
@container (max-width: 40rem) {
|
|
2748
|
+
:host([fold='narrow']) { flex: 0 0 auto; }
|
|
2749
|
+
:host([fold='narrow']) .toggle { display: inline-flex; }
|
|
2750
|
+
:host([fold='narrow']) .panel { display: none; }
|
|
2751
|
+
: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}; }
|
|
2752
|
+
: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; }
|
|
2753
|
+
:host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
|
|
2754
|
+
:host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }
|
|
2755
|
+
: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; }
|
|
2756
|
+
: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}; }
|
|
2757
|
+
:host([fold='narrow']) .action:hover { text-decoration: underline; }
|
|
2758
|
+
}
|
|
2759
|
+
`]}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">
|
|
2760
|
+
<button class="toggle" type="button" popovertarget=${i}>${M(this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2761
|
+
<div id=${i} class="panel" popover="auto" part="panel">
|
|
2762
|
+
<button class="close" type="button" popovertarget=${i} popovertargetaction="hide">${M("close")}<span>${S("Close")}</span></button>
|
|
2763
|
+
<ul part="list">
|
|
2764
|
+
${(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>`})}
|
|
2765
|
+
</ul>
|
|
2766
|
+
${this.actionText?s`<a class="action" href=${this.actionHref||"#"} part="action">${this.actionText}</a>`:l}
|
|
2767
|
+
</div>
|
|
2768
|
+
</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}>
|
|
2769
|
+
<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>
|
|
2770
|
+
<ul id=${i} class=${this.open?"open":""} part="list">
|
|
2771
|
+
${(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
2772
|
</ul>
|
|
2228
|
-
</nav>`}},
|
|
2773
|
+
</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
2774
|
: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: ${
|
|
2775
|
+
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${r(1)}; }
|
|
2776
|
+
li { display: inline-flex; align-items: center; gap: ${r(1)}; }
|
|
2777
|
+
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
2778
|
a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }
|
|
2234
2779
|
a:hover { color: ${t.linkHover}; }
|
|
2235
2780
|
[aria-current] { color: ${t.textMuted}; }
|
|
2781
|
+
:host([look='mono']) { font-family: ${t.fontMono}; font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
2782
|
+
/* 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). */
|
|
2783
|
+
:host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }
|
|
2784
|
+
:host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }
|
|
2785
|
+
:host([look='mono']) [aria-current] { color: ${t.text}; }
|
|
2786
|
+
:host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${r(1)}; color: ${t.textMuted}; }
|
|
2236
2787
|
.sr-only { ${T} }
|
|
2237
|
-
`]}render(){let e=this.items??[];return
|
|
2238
|
-
${e.map((
|
|
2239
|
-
</ol></nav>`}};customElements.define("impakt-nav",
|
|
2788
|
+
`]}render(){let e=this.items??[];return s`<nav aria-label=${this.label} part="nav"><ol>
|
|
2789
|
+
${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>`)}
|
|
2790
|
+
</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
2791
|
:host { display: block; }
|
|
2241
|
-
hr { margin: ${
|
|
2792
|
+
hr { margin: ${r(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }
|
|
2242
2793
|
: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
|
|
2794
|
+
:host([spacing='sm']) hr { margin-block: ${r(2)}; }
|
|
2795
|
+
:host([spacing='lg']) hr { margin-block: ${r(8)}; }
|
|
2796
|
+
:host([spacing='xl']) hr { margin-block: ${r(12)}; }
|
|
2797
|
+
`]}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`
|
|
2798
|
+
:host { display: block; block-size: ${r(4)}; }
|
|
2799
|
+
:host([size='sm']) { block-size: ${r(2)}; }
|
|
2800
|
+
:host([size='lg']) { block-size: ${r(8)}; }
|
|
2801
|
+
:host([size='xl']) { block-size: ${r(12)}; }
|
|
2802
|
+
:host([size='2xl']) { block-size: ${r(16)}; }
|
|
2803
|
+
`]}render(){return s``}},yt=class extends p{static{this.styles=[...p.styles,h`:host { ${T} }`]}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
2804
|
/* Only the two-row layout needs a size container. Making every tab set one
|
|
2254
2805
|
would take its width from its parent alone, so in a flex row, with no
|
|
2255
2806
|
width given, it would shrink to nothing. In a row it may still shrink
|
|
2256
2807
|
below its tabs, which then scroll, rather than widen the page. */
|
|
2257
2808
|
:host { display: block; min-inline-size: 0; }
|
|
2258
2809
|
:host([two-rows]) { container-type: inline-size; }
|
|
2259
|
-
[role='tablist'] { display: flex; gap: ${
|
|
2260
|
-
[role='tab'] { ${
|
|
2810
|
+
[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}; }
|
|
2811
|
+
[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
2812
|
/* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */
|
|
2262
2813
|
[role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }
|
|
2263
2814
|
[role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2264
2815
|
[role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2265
|
-
[role='tabpanel'] { padding-block: ${
|
|
2816
|
+
[role='tabpanel'] { padding-block: ${r(5)}; line-height: ${H("normal")}; }
|
|
2266
2817
|
.body { white-space: pre-line; }
|
|
2267
2818
|
@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: ${
|
|
2819
|
+
: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)}; }
|
|
2820
|
+
: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
2821
|
:host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }
|
|
2271
2822
|
}
|
|
2272
2823
|
@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: ${
|
|
2824
|
+
.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; }
|
|
2274
2825
|
.sr-only { ${T} }
|
|
2275
2826
|
/* Links drawn as tabs. */
|
|
2276
|
-
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${
|
|
2277
|
-
nav a { ${
|
|
2827
|
+
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}; }
|
|
2828
|
+
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
2829
|
nav a:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2279
2830
|
nav a[aria-current='page'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2280
2831
|
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: ${
|
|
2832
|
+
/* The pill look, for either kind. Its corners come from the brand's radius, so it is square under Noire. */
|
|
2833
|
+
: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)}; }
|
|
2834
|
+
: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
2835
|
: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}; }
|
|
2836
|
+
: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
2837
|
@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=>
|
|
2838
|
+
`]}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>
|
|
2839
|
+
${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>`)}
|
|
2840
|
+
</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}>
|
|
2841
|
+
${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
2842
|
</div>
|
|
2292
|
-
${e.map(o=>
|
|
2293
|
-
:host { display: block; margin-block-end: ${
|
|
2843
|
+
${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`
|
|
2844
|
+
:host { display: block; margin-block-end: ${r(6)}; }
|
|
2294
2845
|
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
|
|
2295
|
-
legend { padding: 0; margin-block-end: ${
|
|
2846
|
+
legend { padding: 0; margin-block-end: ${r(2)}; font-size: ${b("md")}; font-weight: ${m("bold")}; line-height: ${H("tight")}; color: ${t.text}; }
|
|
2296
2847
|
:host([size='lg']) legend { font-size: ${b("xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
2297
2848
|
: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: ${
|
|
2849
|
+
.description { margin-block-end: ${r(3)}; font-size: ${b("sm")}; color: ${t.textMuted}; line-height: ${H("normal")}; }
|
|
2850
|
+
.error { margin-block-end: ${r(3)}; font-size: ${b("sm")}; color: ${t.dangerText}; font-weight: ${m("semibold")}; }
|
|
2300
2851
|
.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
|
|
2852
|
+
:host([error]:not([error=''])) .fields { padding-inline-start: ${r(4)}; border-inline-start: 4px solid ${t.danger}; }
|
|
2853
|
+
`]}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
2854
|
<legend part="legend">${this.legend}</legend>
|
|
2304
|
-
${this.description?
|
|
2855
|
+
${this.description?s`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2305
2856
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2306
2857
|
<div class="fields" part="fields"><slot></slot></div>
|
|
2307
|
-
</fieldset>`}};customElements.define("impakt-fieldset",
|
|
2858
|
+
</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
2859
|
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
2860
|
dialog[open] { display: flex; }
|
|
2310
2861
|
:host([side='left']) dialog { margin: 0 auto 0 0; animation-name: from-left; }
|
|
@@ -2316,148 +2867,165 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2316
2867
|
dialog::backdrop { background: color-mix(in srgb, ${t.text} 30%, transparent); backdrop-filter: blur(2px); }
|
|
2317
2868
|
@keyframes from-right { from { transform: translateX(100%); } }
|
|
2318
2869
|
@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 { ${
|
|
2870
|
+
.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); }
|
|
2871
|
+
h2 { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2872
|
+
.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
2873
|
.close:hover { background: ${t.surfaceSubtle}; }
|
|
2323
|
-
.body { flex: 1; overflow: auto; padding: ${
|
|
2324
|
-
.foot { display: flex; gap: ${
|
|
2874
|
+
.body { flex: 1; overflow: auto; padding: ${r(5)}; }
|
|
2875
|
+
.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
2876
|
.foot[hidden] { display: none; }
|
|
2326
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(
|
|
2877
|
+
`]}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
2878
|
@cancel=${()=>this.close()}
|
|
2328
2879
|
@close=${()=>{this.open&&this.close()}}
|
|
2329
|
-
@click=${
|
|
2880
|
+
@click=${i=>{i.target===this.dialog&&this.close()}}>
|
|
2330
2881
|
<div class="head">
|
|
2331
|
-
${this.heading?
|
|
2332
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2882
|
+
${this.heading?s`<h2 id=${this.id_("heading")}>${this.heading}</h2>`:s`<span></span>`}
|
|
2883
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","20px")}</button>
|
|
2333
2884
|
</div>
|
|
2334
2885
|
<div class="body" part="body"><slot></slot></div>
|
|
2335
2886
|
<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: ${
|
|
2887
|
+
</dialog>`}},xr={neutral:"info",success:"check",warning:"warning",danger:"warning"},St=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`
|
|
2888
|
+
.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; }
|
|
2889
|
+
@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)); } }
|
|
2890
|
+
.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
2891
|
/* 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: ${
|
|
2892
|
+
@keyframes rise { from { transform: translateY(${r(3)}); } }
|
|
2893
|
+
.mark { display: inline-flex; flex: none; margin-block-start: ${r(.5)}; color: ${t.info}; }
|
|
2343
2894
|
:host([tone='success']) .mark { color: ${t.success}; }
|
|
2344
2895
|
:host([tone='warning']) .mark { color: ${t.warning}; }
|
|
2345
2896
|
:host([tone='danger']) .mark { color: ${t.danger}; }
|
|
2346
|
-
.message { flex: 1; align-self: center; margin: 0; ${
|
|
2347
|
-
.action, .close { ${
|
|
2897
|
+
.message { flex: 1; align-self: center; margin: 0; ${w("sm")} font-weight: ${m("medium")}; }
|
|
2898
|
+
.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
2899
|
.close { display: inline-flex; align-items: center; justify-content: center; color: ${t.textMuted}; }
|
|
2349
2900
|
.action:hover, .close:hover { background: ${t.surfaceSubtle}; }
|
|
2350
|
-
`,
|
|
2351
|
-
${this.open?
|
|
2901
|
+
`,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">
|
|
2902
|
+
${this.open?s`<div class="toast" part="toast" @mouseenter=${this.stop} @mouseleave=${this.start} @focusin=${this.stop} @focusout=${this.start}
|
|
2352
2903
|
@keydown=${e=>{e.key==="Escape"&&(e.preventDefault(),this.close())}}>
|
|
2353
|
-
<span class="mark">${
|
|
2904
|
+
<span class="mark">${M(xr[this.tone]??"info","20px")}</span>
|
|
2354
2905
|
<p class="message">${this.message}</p>
|
|
2355
|
-
${this.actionText?
|
|
2356
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2906
|
+
${this.actionText?s`<button class="action" type="button" @click=${this.action}>${this.actionText}</button>`:l}
|
|
2907
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","16px")}</button>
|
|
2357
2908
|
</div>`:l}
|
|
2358
|
-
</div>`}},
|
|
2909
|
+
</div>`}},yr=C("var(--impakt-color-line-soft, #dcdcd8)"),Tt=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
2910
|
:host { position: relative; display: inline-block; }
|
|
2360
|
-
.trigger { ${
|
|
2911
|
+
.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; }
|
|
2912
|
+
:host([trigger-look='text']) .trigger { padding: ${r(1)} ${r(1)}; font-size: 1rem; line-height: 1.25; background: transparent; border-color: transparent; }
|
|
2913
|
+
:host([trigger-look='text']) .trigger:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
|
|
2914
|
+
.caret { font-size: 0.75em; line-height: 1; }
|
|
2361
2915
|
.trigger:hover { background: ${t.surfaceSubtle}; }
|
|
2362
2916
|
.chev { display: inline-flex; color: ${t.textMuted}; transition: transform 120ms ease-in-out; }
|
|
2363
2917
|
:host([open]) .chev { transform: rotate(180deg); }
|
|
2364
|
-
|
|
2365
|
-
.
|
|
2366
|
-
.
|
|
2918
|
+
/* G2: a 1px ink border and the one shadow the design allows, the open menu's. */
|
|
2919
|
+
.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; }
|
|
2920
|
+
.list, .group { margin: 0; padding: 0; list-style: none; }
|
|
2921
|
+
.grouped + .grouped, .grouped:not(:first-child) { margin-block-start: ${r(2)}; padding-block-start: ${r(2)}; border-block-start: ${t.borderThin} solid ${yr}; }
|
|
2922
|
+
.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}; }
|
|
2923
|
+
.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
2924
|
:host([edge='end']) .panel, .panel.flip-end { inset-inline: auto 0; }
|
|
2368
2925
|
:host([edge='end']) .panel.flip-start { inset-inline: 0 auto; }
|
|
2369
|
-
@keyframes pop { from { opacity: 0; transform: translateY(-${
|
|
2370
|
-
.item { ${
|
|
2926
|
+
@keyframes pop { from { opacity: 0; transform: translateY(-${r(1)}); } }
|
|
2927
|
+
.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
2928
|
.item:hover, .item:focus { background: ${t.surfaceSubtle}; }
|
|
2929
|
+
.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; }
|
|
2930
|
+
.item[aria-current] { background: ${t.text}; color: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); }
|
|
2931
|
+
.item[aria-current] .meta { color: color-mix(in srgb, var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})) 66%, ${t.text}); }
|
|
2932
|
+
.item[aria-disabled='true'] { color: ${t.textMuted}; cursor: not-allowed; }
|
|
2933
|
+
.item[aria-disabled='true']:hover { background: none; }
|
|
2934
|
+
.item[aria-disabled='true']:focus { background: ${t.surfaceSubtle}; }
|
|
2935
|
+
@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
2936
|
.item.danger { color: ${t.dangerText}; }
|
|
2373
2937
|
.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
|
|
2938
|
+
`]}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?S("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")}
|
|
2939
|
+
@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>
|
|
2940
|
+
${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}>
|
|
2941
|
+
${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))}
|
|
2942
|
+
</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
2943
|
: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 { ${
|
|
2944
|
+
nav { display: flex; align-items: center; justify-content: space-between; gap: ${r(2)}; }
|
|
2945
|
+
ul { display: flex; align-items: center; gap: ${r(1)}; margin: 0; padding: 0; list-style: none; }
|
|
2946
|
+
.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
2947
|
.n:hover, .step:hover { background: ${t.surfaceSubtle}; }
|
|
2384
2948
|
.n[aria-current] { color: ${t.onBrand}; background: ${t.brand}; font-weight: ${m("semibold")}; }
|
|
2385
2949
|
.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; ${
|
|
2950
|
+
.gap { color: ${t.textMuted}; padding: 0 ${r(1)}; }
|
|
2951
|
+
.count { display: none; ${w("sm")} color: ${t.textMuted}; }
|
|
2388
2952
|
@container (max-width: 34rem) { ul { display: none; } .count { display: block; } }
|
|
2389
|
-
`]}go(e,
|
|
2953
|
+
`]}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
2954
|
${this.step(e-1,this.previousText,"arrow-left",e<=1)}
|
|
2391
|
-
<ul>${
|
|
2392
|
-
<span class="count">${
|
|
2955
|
+
<ul>${kr(e,this.pages).map(i=>s`<li>${i==="gap"?s`<span class="gap" aria-hidden="true">…</span>`:this.link(i,"n",i,S("Page {page}",{page:i}),i===e)}</li>`)}</ul>
|
|
2956
|
+
<span class="count">${S("Page {page} of {pages}",{page:e,pages:this.pages})}</span>
|
|
2393
2957
|
${this.step(e+1,this.nextText,"arrow-right",e>=this.pages)}
|
|
2394
|
-
</nav>`}},
|
|
2958
|
+
</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
2959
|
:host { --size: 40px; display: inline-block; inline-size: var(--size); block-size: var(--size); vertical-align: middle; }
|
|
2960
|
+
:host([size='xs']) { --size: 22px; }
|
|
2396
2961
|
:host([size='sm']) { --size: 32px; }
|
|
2397
2962
|
:host([size='lg']) { --size: 56px; }
|
|
2398
2963
|
:host([size='xl']) { --size: 80px; }
|
|
2399
2964
|
.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
2965
|
img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
2401
|
-
`]}willUpdate(
|
|
2966
|
+
`]}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||S("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
2967
|
ul { display: flex; margin: 0; padding: 0; list-style: none; }
|
|
2403
|
-
li { margin-inline-start: -${
|
|
2968
|
+
li { margin-inline-start: -${r(2.5)}; border-radius: 50%; box-shadow: 0 0 0 2px ${t.surfaceCard}; line-height: 0; }
|
|
2404
2969
|
li:first-child { margin-inline-start: 0; }
|
|
2405
|
-
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${
|
|
2970
|
+
.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
2971
|
:host([size='sm']) .more { inline-size: 32px; block-size: 32px; }
|
|
2972
|
+
:host([size='xs']) li { margin-inline-start: -${r(1)}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
2973
|
+
:host([size='xs']) li:first-child { margin-inline-start: 0; }
|
|
2974
|
+
:host([size='xs']) .more { inline-size: 22px; block-size: 22px; font-size: 10px; }
|
|
2407
2975
|
:host([size='lg']) .more { inline-size: 56px; block-size: 56px; }
|
|
2408
2976
|
.sr { ${T} }
|
|
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: ${
|
|
2977
|
+
`]}render(){let e=this.items.slice(0,this.max),i=this.items.length-e.length;return s`<ul part="list">
|
|
2978
|
+
${e.map(a=>s`<li><impakt-avatar full-name=${a.name} src=${a.src??""} size=${this.size}></impakt-avatar></li>`)}
|
|
2979
|
+
${i>0?s`<li><span class="more"><span aria-hidden="true">+${i}</span><span class="sr">${i} ${this.moreLabel}</span></span></li>`:l}
|
|
2980
|
+
</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`
|
|
2981
|
+
.wrap { display: flex; flex-direction: column; align-items: center; gap: ${r(2)}; padding: ${r(12)} ${r(6)}; text-align: center; }
|
|
2414
2982
|
: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}; ${
|
|
2983
|
+
.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%; }
|
|
2984
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2417
2985
|
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?
|
|
2986
|
+
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: ${r(3)}; margin-block-start: ${r(3)}; }
|
|
2987
|
+
`]}render(){return s`<div class="wrap" part="wrap">
|
|
2988
|
+
<span class="mark">${M(this.icon,"26px")}</span>
|
|
2989
|
+
${this.heading?s`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
2990
|
+
${this.lead?s`<p>${this.lead}</p>`:l}
|
|
2423
2991
|
<div class="actions"><slot name="actions"></slot></div>
|
|
2424
|
-
</div>`}},
|
|
2992
|
+
</div>`}},wr=n=>String(n?.times??"").split(",").map(e=>e.trim()).filter(Boolean);function Sr(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
2993
|
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
|
|
2426
2994
|
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: ${
|
|
2995
|
+
.row-label { ${w("sm")} color: ${t.textMuted}; margin-block: ${r(2)}; }
|
|
2996
|
+
.days { display: flex; gap: ${r(2)}; overflow-x: auto; padding: ${r(1)}; margin: -${r(1)}; scrollbar-width: thin; }
|
|
2997
|
+
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: ${r(2)}; }
|
|
2430
2998
|
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
2999
|
label:hover { background: ${t.surfaceSubtle}; }
|
|
2432
3000
|
label:has(input:checked) { color: ${t.onBrand}; background: ${t.brand}; box-shadow: none; }
|
|
2433
3001
|
label:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }
|
|
2434
3002
|
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: ${
|
|
3003
|
+
.day { flex: none; inline-size: 4.5rem; padding-block: ${r(2.5)}; }
|
|
3004
|
+
.weekday, .month { ${w("xs")} }
|
|
3005
|
+
.num { ${w("xl")} font-weight: ${m("semibold")}; }
|
|
3006
|
+
.time { padding: ${r(2)}; ${w("sm")} font-weight: ${m("medium")}; }
|
|
2439
3007
|
.empty { margin: 0; color: ${t.textMuted}; }
|
|
2440
3008
|
:host([invalid]) .days label, :host([invalid]) .times label { box-shadow: inset 0 0 0 1px ${t.danger}; }
|
|
2441
|
-
`]}get currentDay(){let
|
|
3009
|
+
`]}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
3010
|
<div class="row-label" id=${this.id_("days")}>${this.dayLabel}</div>
|
|
2443
3011
|
<div class="days" part="days" role="radiogroup" aria-labelledby=${this.id_("days")}>
|
|
2444
|
-
${this.days.map(
|
|
3012
|
+
${this.days.map(a=>{let o=Sr(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
3013
|
<span class="weekday">${o.weekday}</span><span class="num">${o.day}</span><span class="month">${o.month}</span></label>`})}
|
|
2446
3014
|
</div>
|
|
2447
3015
|
<div class="row-label" id=${this.id_("times")}>${this.timeLabel}</div>
|
|
2448
3016
|
<div class="times" part="times" role="radiogroup" aria-labelledby=${this.id_("times")}>
|
|
2449
|
-
${
|
|
2450
|
-
</div>`:
|
|
3017
|
+
${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>`})}
|
|
3018
|
+
</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
3019
|
${this.renderLabel()}
|
|
2452
|
-
${this.description?
|
|
3020
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2453
3021
|
${this.renderControl()}
|
|
2454
3022
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2455
|
-
</fieldset>`}updated(
|
|
3023
|
+
</fieldset>`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-drawer",wt);customElements.define("impakt-toast",St);customElements.define("impakt-menu",Tt);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
3024
|
input, select {
|
|
2457
3025
|
box-sizing: border-box;
|
|
2458
3026
|
inline-size: min(100%, var(--impakt-field-width));
|
|
2459
3027
|
min-block-size: 44px;
|
|
2460
|
-
padding: ${
|
|
3028
|
+
padding: ${r(2.5)} ${r(3)};
|
|
2461
3029
|
font: inherit;
|
|
2462
3030
|
/* 16px whatever the page around it sets, so a phone does not zoom in on focus. */
|
|
2463
3031
|
font-size: max(${b("md")}, 16px);
|
|
@@ -2470,7 +3038,7 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2470
3038
|
:host([invalid]) input, :host([invalid]) select { border-color: ${t.danger}; border-width: ${t.borderThick}; }
|
|
2471
3039
|
.btn {
|
|
2472
3040
|
min-block-size: 44px;
|
|
2473
|
-
padding: ${
|
|
3041
|
+
padding: ${r(2.5)} ${r(4)};
|
|
2474
3042
|
font: inherit;
|
|
2475
3043
|
font-weight: ${m("semibold")};
|
|
2476
3044
|
color: ${t.onBrand};
|
|
@@ -2482,24 +3050,24 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2482
3050
|
.btn:hover { background: ${t.brandHover}; }
|
|
2483
3051
|
.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
3052
|
.visually-hidden { ${T} }
|
|
2485
|
-
`,
|
|
2486
|
-
.row { display: flex; flex-wrap: wrap; gap: ${
|
|
2487
|
-
.row label { display: block; ${
|
|
3053
|
+
`,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`
|
|
3054
|
+
.row { display: flex; flex-wrap: wrap; gap: ${r(2)}; align-items: flex-end; }
|
|
3055
|
+
.row label { display: block; ${w("sm")} font-weight: ${m("semibold")}; margin-block-end: ${r(1)}; }
|
|
2488
3056
|
.postcode input { inline-size: 12ch; text-transform: uppercase; }
|
|
2489
|
-
.choose { margin-block-start: ${
|
|
3057
|
+
.choose { margin-block-start: ${r(4)}; }
|
|
2490
3058
|
.choose select { inline-size: 100%; }
|
|
2491
|
-
.manual { display: grid; gap: ${
|
|
2492
|
-
.manual label { display: block; ${
|
|
3059
|
+
.manual { display: grid; gap: ${r(3)}; margin-block-start: ${r(3)}; }
|
|
3060
|
+
.manual label { display: block; ${w("sm")} margin-block-end: ${r(1)}; }
|
|
2493
3061
|
.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
|
|
3062
|
+
.note { ${w("sm")} color: ${t.textMuted}; margin: ${r(2)} 0 0; }
|
|
3063
|
+
.switch { margin-block-start: ${r(3)}; }
|
|
3064
|
+
`]}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}>
|
|
3065
|
+
${e("line1",S("Building and street"),"address-line1")}
|
|
3066
|
+
${e("line2",S("Second line (optional)"),"address-line2")}
|
|
3067
|
+
${e("town",S("Town or city"),"address-level2")}
|
|
3068
|
+
${e("mpostcode",S("Postcode"),"postal-code")}
|
|
3069
|
+
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${S("Find the address from the postcode")}</button>
|
|
3070
|
+
</div>`}return s`
|
|
2503
3071
|
<div class="row">
|
|
2504
3072
|
<div class="postcode"><label for=${this.controlId}>${this.postcodeLabel}</label>
|
|
2505
3073
|
<input id=${this.controlId} autocomplete="postal-code" .value=${this.postcode} aria-describedby=${this.describedBy}
|
|
@@ -2507,24 +3075,24 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2507
3075
|
@keydown=${e=>{e.key==="Enter"&&(e.preventDefault(),this.find())}} /></div>
|
|
2508
3076
|
<button class="btn" type="button" ?disabled=${this.busy} @click=${()=>this.find()}>${this.busy?"Finding\u2026":this.findText}</button>
|
|
2509
3077
|
</div>
|
|
2510
|
-
${this.addresses.length?
|
|
3078
|
+
${this.addresses.length?s`<div class="choose"><label class="label" for=${this.id_("choose")}>${this.chooseLabel}</label>
|
|
2511
3079
|
<select id=${this.id_("choose")} @change=${e=>this.setFormValue(e.target.value)}>
|
|
2512
3080
|
<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?
|
|
3081
|
+
${this.addresses.map(e=>s`<option value=${e.line} ?selected=${e.line===this.value}>${e.line}</option>`)}
|
|
3082
|
+
</select></div>`:this.searched&&!this.busy?s`<p class="note" role="status">${this.notFoundText}</p>`:l}
|
|
2515
3083
|
<button class="quiet switch" type="button" @click=${()=>{this.manual=!0}}>${this.manualText}</button>
|
|
2516
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
3084
|
+
`}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
3085
|
:host { display: block; }
|
|
2518
|
-
.box { padding: ${
|
|
3086
|
+
.box { padding: ${r(5)}; border: ${t.borderThick} solid ${t.danger}; border-inline-start-width: 6px; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
2519
3087
|
.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: ${
|
|
3088
|
+
h2 { margin: 0 0 ${r(3)}; ${w("lg")} font-weight: ${m("bold")}; color: ${t.text}; }
|
|
3089
|
+
ul { margin: 0; padding: 0; list-style: none; display: grid; gap: ${r(2)}; }
|
|
2522
3090
|
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,
|
|
3091
|
+
`]}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
3092
|
<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: ${
|
|
3093
|
+
<ul>${this.items.map(e=>s`<li><a href=${e.href} @click=${i=>this.go(i,e.href)}>${e.text}</a></li>`)}</ul>
|
|
3094
|
+
</div>`:l}},Tr=n=>n>=1048576?S("{size} MB",{size:(n/1048576).toFixed(1)}):S("{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`
|
|
3095
|
+
.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
3096
|
.zone.over { border-color: ${t.brand}; background: ${t.brandSubtle}; }
|
|
2529
3097
|
:host([invalid]) .zone { border-color: ${t.danger}; border-style: solid; }
|
|
2530
3098
|
:host([disabled]) label.btn { cursor: not-allowed; }
|
|
@@ -2532,65 +3100,835 @@ var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{c
|
|
|
2532
3100
|
input[type='file'] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
|
|
2533
3101
|
label.btn { display: inline-flex; align-items: center; }
|
|
2534
3102
|
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
|
|
3103
|
+
ul { margin: ${r(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${r(2)}; }
|
|
3104
|
+
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}; }
|
|
3105
|
+
.size { color: ${t.textMuted}; ${w("sm")} }
|
|
3106
|
+
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return S("{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)))?S("{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=>S("{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?S("{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
3107
|
<div class="zone ${this.over?"over":""}"
|
|
2540
3108
|
@dragover=${e=>{e.preventDefault(),this.over=!0}}
|
|
2541
3109
|
@dragleave=${()=>{this.over=!1}}
|
|
2542
3110
|
@drop=${e=>{e.preventDefault(),this.over=!1,e.dataTransfer?.files&&this.add(e.dataTransfer.files)}}>
|
|
2543
3111
|
<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
|
|
3112
|
+
@change=${e=>{let i=e.target.files;i&&this.add(i),e.target.value=""}} />
|
|
2545
3113
|
<label class="btn" for=${this.controlId}>${this.chooseText}</label>
|
|
2546
3114
|
<span class="drop">${this.dropText}</span>
|
|
2547
3115
|
</div>
|
|
2548
3116
|
<p class="visually-hidden" role="status">${this.said}</p>
|
|
2549
|
-
${this.files.length?
|
|
2550
|
-
`}};function
|
|
3117
|
+
${this.files.length?s`<ul aria-label=${S("Files added")}>${this.files.map((e,i)=>s`<li><span>${e.name} <span class="size">${Tr(e.size)}</span></span><button class="quiet" type="button" @click=${()=>this.removeFile(i)}>${S("Remove")}<span class="visually-hidden"> ${e.name}</span></button></li>`)}</ul>`:l}
|
|
3118
|
+
`}};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
3119
|
.wrap { display: flex; align-items: stretch; inline-size: min(100%, var(--impakt-field-width)); }
|
|
2552
|
-
.sign { display: flex; align-items: center; padding: 0 ${
|
|
3120
|
+
.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
3121
|
.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")}>${
|
|
3122
|
+
`]}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=S("Enter an amount of {amount} or more",{amount:i(this.lowest)}):this.highest!==void 0&&e>this.highest?this.error=S("Enter an amount of {amount} or less",{amount:i(this.highest)}):(this.error===S("Enter an amount of {amount} or more",{amount:i(this.lowest??0)})||this.error===S("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">
|
|
3123
|
+
<span class="sign" id=${this.id_("sign")}>${oi(this.currency)}</span>
|
|
2556
3124
|
<input id=${this.controlId} inputmode=${this.pence?"decimal":"numeric"} .value=${this.shown} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required}
|
|
2557
3125
|
aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}
|
|
2558
3126
|
@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: ${
|
|
3127
|
+
</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`
|
|
3128
|
+
.top { display: flex; justify-content: space-between; gap: ${r(3)}; }
|
|
2561
3129
|
output { font-weight: ${m("semibold")}; color: ${t.text}; }
|
|
2562
3130
|
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?
|
|
3131
|
+
.ends { display: flex; justify-content: space-between; ${w("sm")} color: ${t.textMuted}; }
|
|
3132
|
+
`]}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`
|
|
3133
|
+
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?s` <span class="required">(${this.requiredText})</span>`:l}</label>
|
|
2566
3134
|
<output for=${this.controlId}>${this.shownAs(e)}</output></div>
|
|
2567
|
-
${this.description?
|
|
3135
|
+
${this.description?s`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2568
3136
|
${this.renderControl()}
|
|
2569
3137
|
<div class="ends" aria-hidden="true"><span>${this.shownAs(this.lowest)}</span><span>${this.shownAs(this.highest)}</span></div>
|
|
2570
3138
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2571
|
-
`}renderControl(){return
|
|
3139
|
+
`}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
3140
|
aria-valuetext=${this.shownAs(Number(this.value)||0)} aria-describedby=${this.describedBy}
|
|
2573
|
-
@input=${e=>this.setFormValue(e.target.value)} />`}},
|
|
3141
|
+
@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
3142
|
:host { display: block; }
|
|
2575
|
-
.h { margin: 0 0 ${
|
|
2576
|
-
.count { margin: 0 0 ${
|
|
3143
|
+
.h { margin: 0 0 ${r(2)}; ${w("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
3144
|
+
.count { margin: 0 0 ${r(4)}; color: ${t.textMuted}; }
|
|
2577
3145
|
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: ${
|
|
3146
|
+
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
3147
|
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
3148
|
.title { font-weight: ${m("semibold")}; }
|
|
2581
|
-
.hint { display: block; ${
|
|
2582
|
-
.tag { flex-shrink: 0; padding: ${
|
|
3149
|
+
.hint { display: block; ${w("sm")} color: ${t.textMuted}; }
|
|
3150
|
+
.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
3151
|
.tag[data-status='done'] { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
2584
3152
|
.tag[data-status='in-progress'] { background: ${t.brandSubtle}; color: ${t.link}; }
|
|
2585
3153
|
.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>`}};
|
|
3154
|
+
`]}render(){let e=this.items.filter(i=>i.status==="done").length;return s`
|
|
3155
|
+
${this.heading?s`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
3156
|
+
${this.items.length?s`<p class="count">${S(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}
|
|
3157
|
+
<ul>${this.items.map(i=>s`<li>
|
|
3158
|
+
<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>`}
|
|
3159
|
+
${i.hint?s`<span class="hint">${i.hint}</span>`:l}</span>
|
|
3160
|
+
<span class="tag" data-status=${i.status} id=${this.id_(`s-${i.id}`)}>${qi[i.status]?S(qi[i.status]):i.status}</span>
|
|
3161
|
+
</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`
|
|
3162
|
+
:host {
|
|
3163
|
+
display: inline-flex;
|
|
3164
|
+
flex: none;
|
|
3165
|
+
vertical-align: middle;
|
|
3166
|
+
}
|
|
3167
|
+
.chip {
|
|
3168
|
+
position: relative;
|
|
3169
|
+
display: inline-flex;
|
|
3170
|
+
align-items: center;
|
|
3171
|
+
justify-content: center;
|
|
3172
|
+
padding: 1px 5px;
|
|
3173
|
+
font-family: ${t.fontMono};
|
|
3174
|
+
font-size: ${f.small};
|
|
3175
|
+
font-weight: ${f.medium};
|
|
3176
|
+
line-height: 1.3;
|
|
3177
|
+
white-space: nowrap;
|
|
3178
|
+
color: ${t.text};
|
|
3179
|
+
background: ${t.surfaceSubtle};
|
|
3180
|
+
border: 1px solid ${t.text};
|
|
3181
|
+
border-radius: 0;
|
|
3182
|
+
text-decoration: none;
|
|
3183
|
+
}
|
|
3184
|
+
a.chip,
|
|
3185
|
+
button.chip {
|
|
3186
|
+
min-block-size: ${t.targetMin};
|
|
3187
|
+
min-inline-size: ${t.targetMin};
|
|
3188
|
+
cursor: pointer;
|
|
3189
|
+
margin: 0;
|
|
3190
|
+
}
|
|
3191
|
+
a.chip:hover,
|
|
3192
|
+
button.chip:hover {
|
|
3193
|
+
text-decoration: underline;
|
|
3194
|
+
text-underline-offset: 2px;
|
|
3195
|
+
}
|
|
3196
|
+
:host([look='on-ink']) .chip {
|
|
3197
|
+
color: #111111;
|
|
3198
|
+
background: #ffffff;
|
|
3199
|
+
border-color: #ffffff;
|
|
3200
|
+
}
|
|
3201
|
+
.visually-hidden {
|
|
3202
|
+
${T}
|
|
3203
|
+
}
|
|
3204
|
+
@media (forced-colors: active) {
|
|
3205
|
+
.chip {
|
|
3206
|
+
border-color: CanvasText;
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
`]}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`
|
|
3210
|
+
/* It keeps its size in a row, but never grows past its container: at 320 the words wrap inside the mark (1.4.10). */
|
|
3211
|
+
:host {
|
|
3212
|
+
display: inline-flex;
|
|
3213
|
+
flex: 0 1 auto;
|
|
3214
|
+
min-inline-size: 0;
|
|
3215
|
+
max-inline-size: 100%;
|
|
3216
|
+
vertical-align: middle;
|
|
3217
|
+
}
|
|
3218
|
+
.label {
|
|
3219
|
+
display: inline-flex;
|
|
3220
|
+
align-items: center;
|
|
3221
|
+
gap: ${r(2)};
|
|
3222
|
+
padding: 3px 8px;
|
|
3223
|
+
font-family: ${t.fontMono};
|
|
3224
|
+
font-size: ${f.small};
|
|
3225
|
+
font-weight: ${f.medium};
|
|
3226
|
+
line-height: 1.3;
|
|
3227
|
+
overflow-wrap: anywhere;
|
|
3228
|
+
color: ${f.onInverse};
|
|
3229
|
+
background: ${f.inverse};
|
|
3230
|
+
border: 1px solid ${f.inverse};
|
|
3231
|
+
border-radius: 0;
|
|
3232
|
+
}
|
|
3233
|
+
.mark {
|
|
3234
|
+
flex: none;
|
|
3235
|
+
display: block;
|
|
3236
|
+
inline-size: 14px;
|
|
3237
|
+
block-size: 14px;
|
|
3238
|
+
}
|
|
3239
|
+
.box {
|
|
3240
|
+
fill: ${f.ok};
|
|
3241
|
+
}
|
|
3242
|
+
.tick {
|
|
3243
|
+
stroke: ${f.onOk};
|
|
3244
|
+
}
|
|
3245
|
+
:host([state='unverified']) .label {
|
|
3246
|
+
color: ${t.text};
|
|
3247
|
+
background: ${t.surfaceCard};
|
|
3248
|
+
border: 1px dashed ${t.text};
|
|
3249
|
+
}
|
|
3250
|
+
:host([state='unverified']) .box {
|
|
3251
|
+
fill: ${t.surfaceCard};
|
|
3252
|
+
stroke: ${t.text};
|
|
3253
|
+
}
|
|
3254
|
+
:host([state='unverified']) .tick {
|
|
3255
|
+
stroke: ${t.text};
|
|
3256
|
+
}
|
|
3257
|
+
:host([look='on-ink']) .label {
|
|
3258
|
+
color: #111111;
|
|
3259
|
+
background: #ffffff;
|
|
3260
|
+
border-color: #ffffff;
|
|
3261
|
+
}
|
|
3262
|
+
:host([look='on-ink'][state='unverified']) .box {
|
|
3263
|
+
fill: #ffffff;
|
|
3264
|
+
stroke: #111111;
|
|
3265
|
+
}
|
|
3266
|
+
:host([look='on-ink'][state='unverified']) .tick {
|
|
3267
|
+
stroke: #111111;
|
|
3268
|
+
}
|
|
3269
|
+
:host([size='marketing']) .label {
|
|
3270
|
+
font-size: ${f.tiny};
|
|
3271
|
+
text-transform: uppercase;
|
|
3272
|
+
letter-spacing: 0.06em;
|
|
3273
|
+
}
|
|
3274
|
+
@media (forced-colors: active) {
|
|
3275
|
+
.label {
|
|
3276
|
+
border-color: CanvasText;
|
|
3277
|
+
}
|
|
3278
|
+
.box {
|
|
3279
|
+
fill: Canvas;
|
|
3280
|
+
stroke: CanvasText;
|
|
3281
|
+
}
|
|
3282
|
+
.tick {
|
|
3283
|
+
stroke: CanvasText;
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
`]}render(){let e=this.state!=="unverified",i=e?s`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3287
|
+
<rect class="box" width="14" height="14"></rect>
|
|
3288
|
+
<path class="tick" d="M3 7.5 6 10.5 11 3.5" fill="none" stroke-width="1.5"></path>
|
|
3289
|
+
</svg>`:s`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3290
|
+
<rect class="box" x="0.5" y="0.5" width="13" height="13" stroke-width="1"></rect>
|
|
3291
|
+
<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>
|
|
3292
|
+
</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`
|
|
3293
|
+
:host {
|
|
3294
|
+
display: block;
|
|
3295
|
+
container-type: inline-size;
|
|
3296
|
+
font-family: ${t.fontBody};
|
|
3297
|
+
font-size: ${f.small};
|
|
3298
|
+
}
|
|
3299
|
+
.bar {
|
|
3300
|
+
display: grid;
|
|
3301
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
3302
|
+
grid-template-areas: 'start pages end';
|
|
3303
|
+
align-items: center;
|
|
3304
|
+
gap: ${r(2)} ${r(4)};
|
|
3305
|
+
min-block-size: 56px;
|
|
3306
|
+
padding: ${r(2)} ${r(4)};
|
|
3307
|
+
color: ${t.text};
|
|
3308
|
+
background: ${t.surfaceCard};
|
|
3309
|
+
border-block-end: 1px solid ${u("color.line.grid","light-dark(#DCDCD8, #1F1F1F)")};
|
|
3310
|
+
}
|
|
3311
|
+
.start {
|
|
3312
|
+
grid-area: start;
|
|
3313
|
+
display: flex;
|
|
3314
|
+
align-items: center;
|
|
3315
|
+
gap: ${r(2.5)};
|
|
3316
|
+
min-inline-size: 0;
|
|
3317
|
+
}
|
|
3318
|
+
.home {
|
|
3319
|
+
display: inline-flex;
|
|
3320
|
+
align-items: center;
|
|
3321
|
+
gap: ${r(2.5)};
|
|
3322
|
+
min-block-size: ${t.targetMin};
|
|
3323
|
+
color: inherit;
|
|
3324
|
+
text-decoration: none;
|
|
3325
|
+
}
|
|
3326
|
+
.home:hover .word {
|
|
3327
|
+
text-decoration: underline;
|
|
3328
|
+
text-underline-offset: 3px;
|
|
3329
|
+
}
|
|
3330
|
+
.mark {
|
|
3331
|
+
display: inline-grid;
|
|
3332
|
+
place-items: center;
|
|
3333
|
+
flex: none;
|
|
3334
|
+
inline-size: 28px;
|
|
3335
|
+
block-size: 28px;
|
|
3336
|
+
font-weight: ${f.medium};
|
|
3337
|
+
color: ${f.onInverse};
|
|
3338
|
+
background: ${f.inverse};
|
|
3339
|
+
}
|
|
3340
|
+
.sep {
|
|
3341
|
+
color: ${t.textMuted};
|
|
3342
|
+
}
|
|
3343
|
+
.tool {
|
|
3344
|
+
overflow: hidden;
|
|
3345
|
+
text-overflow: ellipsis;
|
|
3346
|
+
white-space: nowrap;
|
|
3347
|
+
}
|
|
3348
|
+
.pages {
|
|
3349
|
+
grid-area: pages;
|
|
3350
|
+
min-inline-size: 0;
|
|
3351
|
+
max-inline-size: 100%;
|
|
3352
|
+
overflow-x: auto;
|
|
3353
|
+
scrollbar-width: thin;
|
|
3354
|
+
}
|
|
3355
|
+
.pages ul {
|
|
3356
|
+
display: flex;
|
|
3357
|
+
inline-size: max-content;
|
|
3358
|
+
margin: 0;
|
|
3359
|
+
padding: 3px;
|
|
3360
|
+
list-style: none;
|
|
3361
|
+
background: ${t.surfaceSubtle};
|
|
3362
|
+
border: 1px solid ${f.lineSoft};
|
|
3363
|
+
}
|
|
3364
|
+
.pages a {
|
|
3365
|
+
display: inline-flex;
|
|
3366
|
+
align-items: center;
|
|
3367
|
+
gap: ${r(1.5)};
|
|
3368
|
+
min-block-size: 28px;
|
|
3369
|
+
padding: 0 ${r(2.5)};
|
|
3370
|
+
font-weight: ${f.regular};
|
|
3371
|
+
color: ${t.textMuted};
|
|
3372
|
+
text-decoration: none;
|
|
3373
|
+
white-space: nowrap;
|
|
3374
|
+
border: 1px solid transparent;
|
|
3375
|
+
}
|
|
3376
|
+
.pages a:hover {
|
|
3377
|
+
color: ${t.text};
|
|
3378
|
+
}
|
|
3379
|
+
.pages a[aria-current='page'] {
|
|
3380
|
+
color: ${t.text};
|
|
3381
|
+
background: ${t.surfaceCard};
|
|
3382
|
+
border-color: ${f.lineSoft};
|
|
3383
|
+
}
|
|
3384
|
+
.dot {
|
|
3385
|
+
inline-size: 5px;
|
|
3386
|
+
block-size: 5px;
|
|
3387
|
+
border-radius: 50%;
|
|
3388
|
+
background: currentColor;
|
|
3389
|
+
}
|
|
3390
|
+
.end {
|
|
3391
|
+
grid-area: end;
|
|
3392
|
+
display: flex;
|
|
3393
|
+
flex-wrap: wrap;
|
|
3394
|
+
align-items: center;
|
|
3395
|
+
justify-content: flex-end;
|
|
3396
|
+
gap: ${r(2)} ${r(3)};
|
|
3397
|
+
min-inline-size: 0;
|
|
3398
|
+
}
|
|
3399
|
+
.all {
|
|
3400
|
+
color: ${t.textMuted};
|
|
3401
|
+
text-decoration: none;
|
|
3402
|
+
display: inline-flex;
|
|
3403
|
+
align-items: center;
|
|
3404
|
+
min-block-size: ${t.targetMin};
|
|
3405
|
+
}
|
|
3406
|
+
.all:hover {
|
|
3407
|
+
color: ${t.text};
|
|
3408
|
+
text-decoration: underline;
|
|
3409
|
+
}
|
|
3410
|
+
impakt-menu.switcher::part(trigger) {
|
|
3411
|
+
padding: ${r(1)} ${r(1)};
|
|
3412
|
+
font-family: ${t.fontBody};
|
|
3413
|
+
font-size: ${f.small};
|
|
3414
|
+
font-weight: ${f.regular};
|
|
3415
|
+
color: ${t.textMuted};
|
|
3416
|
+
background: transparent;
|
|
3417
|
+
border: 0;
|
|
3418
|
+
border-radius: 0;
|
|
3419
|
+
box-shadow: none;
|
|
3420
|
+
}
|
|
3421
|
+
impakt-menu.switcher::part(trigger):hover {
|
|
3422
|
+
color: ${t.text};
|
|
3423
|
+
}
|
|
3424
|
+
impakt-menu::part(chevron) {
|
|
3425
|
+
color: inherit;
|
|
3426
|
+
}
|
|
3427
|
+
/* The switcher's panel is 320 wide (53:960), so "Your account" and its note sit on one line. */
|
|
3428
|
+
impakt-menu.switcher::part(panel) {
|
|
3429
|
+
min-inline-size: min(20rem, calc(100vw - 2 * ${r(4)}));
|
|
3430
|
+
}
|
|
3431
|
+
impakt-menu.org::part(trigger),
|
|
3432
|
+
a.org,
|
|
3433
|
+
.sign-in {
|
|
3434
|
+
display: inline-flex;
|
|
3435
|
+
align-items: center;
|
|
3436
|
+
gap: ${r(2)};
|
|
3437
|
+
padding: 9px 14px;
|
|
3438
|
+
font-family: ${t.fontBody};
|
|
3439
|
+
font-size: ${f.small};
|
|
3440
|
+
font-weight: ${f.medium};
|
|
3441
|
+
color: ${t.text};
|
|
3442
|
+
background: ${t.surfaceCard};
|
|
3443
|
+
border: 1px solid ${t.text};
|
|
3444
|
+
border-radius: 0;
|
|
3445
|
+
box-shadow: none;
|
|
3446
|
+
text-decoration: none;
|
|
3447
|
+
}
|
|
3448
|
+
impakt-menu.org::part(trigger):hover,
|
|
3449
|
+
a.org:hover,
|
|
3450
|
+
.sign-in:hover {
|
|
3451
|
+
background: ${t.surfaceSubtle};
|
|
3452
|
+
}
|
|
3453
|
+
@container (max-width: 56rem) {
|
|
3454
|
+
.bar {
|
|
3455
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3456
|
+
grid-template-areas: 'start end' 'pages pages';
|
|
3457
|
+
padding-block: ${r(2)};
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
@container (max-width: 30rem) {
|
|
3461
|
+
.bar {
|
|
3462
|
+
grid-template-columns: minmax(0, 1fr);
|
|
3463
|
+
grid-template-areas: 'start' 'end' 'pages';
|
|
3464
|
+
padding-inline: ${r(4)};
|
|
3465
|
+
}
|
|
3466
|
+
.end {
|
|
3467
|
+
justify-content: flex-start;
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
@media (forced-colors: active) {
|
|
3471
|
+
.pages a[aria-current='page'] {
|
|
3472
|
+
border-color: CanvasText;
|
|
3473
|
+
}
|
|
3474
|
+
.mark {
|
|
3475
|
+
border: 1px solid CanvasText;
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
`]}renderPages(){return this.links.length?s`<nav class="pages" part="pages" aria-label=${this.pagesLabel}>
|
|
3479
|
+
<ul>
|
|
3480
|
+
${this.links.map(e=>s`<li>
|
|
3481
|
+
<a href=${e.href} aria-current=${e.current?"page":l}
|
|
3482
|
+
>${e.current?s`<span class="dot" aria-hidden="true"></span>`:l}${e.label}</a
|
|
3483
|
+
>
|
|
3484
|
+
</li>`)}
|
|
3485
|
+
</ul>
|
|
3486
|
+
</nav>`:l}renderSwitcher(){return this.switcher.length?s`<impakt-menu class="switcher" edge="end" trigger-look="text" .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" trigger-look="text" .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">
|
|
3487
|
+
<div class="start">
|
|
3488
|
+
<a class="home" part="home" href=${this.home}><span class="mark" aria-hidden="true">i</span><span class="word">${this.brand}</span></a>
|
|
3489
|
+
${this.tool?s`<span class="sep" aria-hidden="true">/</span><span class="tool">${this.tool}</span>`:l}
|
|
3490
|
+
</div>
|
|
3491
|
+
${this.renderPages()}
|
|
3492
|
+
<div class="end">
|
|
3493
|
+
<slot name="extra"></slot>
|
|
3494
|
+
<slot name="tools">${this.renderSwitcher()}</slot>
|
|
3495
|
+
${this.renderAccount()}
|
|
3496
|
+
</div>
|
|
3497
|
+
</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`
|
|
3498
|
+
:host {
|
|
3499
|
+
display: inline-flex;
|
|
3500
|
+
}
|
|
3501
|
+
ul {
|
|
3502
|
+
display: flex;
|
|
3503
|
+
gap: ${r(1)};
|
|
3504
|
+
margin: 0;
|
|
3505
|
+
padding: 0;
|
|
3506
|
+
list-style: none;
|
|
3507
|
+
}
|
|
3508
|
+
a {
|
|
3509
|
+
position: relative;
|
|
3510
|
+
display: inline-flex;
|
|
3511
|
+
align-items: center;
|
|
3512
|
+
justify-content: center;
|
|
3513
|
+
/* 48 by 34, as in the short-let bar (39:468). */
|
|
3514
|
+
min-inline-size: 48px;
|
|
3515
|
+
min-block-size: 34px;
|
|
3516
|
+
padding: 0 ${r(3)};
|
|
3517
|
+
font-family: ${t.fontBody};
|
|
3518
|
+
font-size: ${f.small};
|
|
3519
|
+
font-weight: ${f.medium};
|
|
3520
|
+
color: ${t.text};
|
|
3521
|
+
background: ${t.surfaceCard};
|
|
3522
|
+
border: 1px solid ${t.text};
|
|
3523
|
+
border-radius: 0;
|
|
3524
|
+
text-decoration: none;
|
|
3525
|
+
}
|
|
3526
|
+
a:hover {
|
|
3527
|
+
background: ${t.surfaceSubtle};
|
|
3528
|
+
}
|
|
3529
|
+
a[aria-current='true'] {
|
|
3530
|
+
color: ${f.onInverse};
|
|
3531
|
+
background: ${f.inverse};
|
|
3532
|
+
}
|
|
3533
|
+
.visually-hidden {
|
|
3534
|
+
${T}
|
|
3535
|
+
}
|
|
3536
|
+
@media (forced-colors: active) {
|
|
3537
|
+
a {
|
|
3538
|
+
border-color: LinkText;
|
|
3539
|
+
}
|
|
3540
|
+
a[aria-current='true'] {
|
|
3541
|
+
border-width: 3px;
|
|
3542
|
+
}
|
|
3543
|
+
}
|
|
3544
|
+
`]}render(){return s`<nav part="nav" aria-label=${this.label}>
|
|
3545
|
+
<ul>
|
|
3546
|
+
${this.items.map(e=>s`<li>
|
|
3547
|
+
<a
|
|
3548
|
+
part="link"
|
|
3549
|
+
href=${e.href}
|
|
3550
|
+
hreflang=${e.lang}
|
|
3551
|
+
lang=${e.lang}
|
|
3552
|
+
aria-current=${e.lang===this.current?"true":l}
|
|
3553
|
+
>${e.label}${e.name?s`<span class="visually-hidden"> ${e.name}</span>`:l}</a
|
|
3554
|
+
>
|
|
3555
|
+
</li>`)}
|
|
3556
|
+
</ul>
|
|
3557
|
+
</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`
|
|
3558
|
+
.track {
|
|
3559
|
+
position: relative;
|
|
3560
|
+
display: block;
|
|
3561
|
+
block-size: 8px;
|
|
3562
|
+
min-inline-size: 4rem;
|
|
3563
|
+
background: ${f.lineSoft};
|
|
3564
|
+
border-radius: 0;
|
|
3565
|
+
overflow: hidden;
|
|
3566
|
+
}
|
|
3567
|
+
.fill {
|
|
3568
|
+
display: block;
|
|
3569
|
+
block-size: 100%;
|
|
3570
|
+
background: ${t.text};
|
|
3571
|
+
}
|
|
3572
|
+
.figure {
|
|
3573
|
+
font-family: ${t.fontMono};
|
|
3574
|
+
font-size: ${f.small};
|
|
3575
|
+
font-variant-numeric: tabular-nums;
|
|
3576
|
+
color: ${t.text};
|
|
3577
|
+
}
|
|
3578
|
+
@media (forced-colors: active) {
|
|
3579
|
+
.track {
|
|
3580
|
+
border: 1px solid CanvasText;
|
|
3581
|
+
}
|
|
3582
|
+
.fill {
|
|
3583
|
+
background: CanvasText;
|
|
3584
|
+
forced-color-adjust: none;
|
|
3585
|
+
}
|
|
3586
|
+
}
|
|
3587
|
+
`,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`
|
|
3588
|
+
:host {
|
|
3589
|
+
display: block;
|
|
3590
|
+
}
|
|
3591
|
+
.head {
|
|
3592
|
+
display: flex;
|
|
3593
|
+
flex-wrap: wrap;
|
|
3594
|
+
justify-content: space-between;
|
|
3595
|
+
gap: ${r(1)} ${r(3)};
|
|
3596
|
+
margin-block-end: ${r(2)};
|
|
3597
|
+
font-size: ${f.small};
|
|
3598
|
+
}
|
|
3599
|
+
.head:empty {
|
|
3600
|
+
display: none;
|
|
3601
|
+
}
|
|
3602
|
+
`]}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
|
|
3603
|
+
class="track"
|
|
3604
|
+
part="track"
|
|
3605
|
+
role="meter"
|
|
3606
|
+
aria-labelledby=${this.label?this.id_("label"):l}
|
|
3607
|
+
aria-label=${this.label?l:S("Meter")}
|
|
3608
|
+
aria-valuemin=${this.min}
|
|
3609
|
+
aria-valuemax=${this.max}
|
|
3610
|
+
aria-valuenow=${e}
|
|
3611
|
+
aria-valuetext=${this.valueText||l}
|
|
3612
|
+
><span class="fill" part="fill" style=${`inline-size:${ji(e,this.min,this.max)}%`}></span
|
|
3613
|
+
></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`
|
|
3614
|
+
:host {
|
|
3615
|
+
display: block;
|
|
3616
|
+
container-type: inline-size;
|
|
3617
|
+
}
|
|
3618
|
+
ul {
|
|
3619
|
+
margin: 0;
|
|
3620
|
+
padding: 0;
|
|
3621
|
+
list-style: none;
|
|
3622
|
+
}
|
|
3623
|
+
li {
|
|
3624
|
+
display: grid;
|
|
3625
|
+
grid-template-columns: minmax(8rem, 12rem) minmax(4rem, 1fr) 3ch minmax(0, 7rem);
|
|
3626
|
+
align-items: center;
|
|
3627
|
+
gap: ${r(2)} ${r(4)};
|
|
3628
|
+
padding-block: ${r(3)};
|
|
3629
|
+
font-size: ${f.small};
|
|
3630
|
+
}
|
|
3631
|
+
.figure {
|
|
3632
|
+
text-align: end;
|
|
3633
|
+
}
|
|
3634
|
+
@container (max-width: 34rem) {
|
|
3635
|
+
li {
|
|
3636
|
+
grid-template-columns: minmax(0, 1fr) 3ch;
|
|
3637
|
+
}
|
|
3638
|
+
.name {
|
|
3639
|
+
grid-column: 1 / -1;
|
|
3640
|
+
}
|
|
3641
|
+
.pill {
|
|
3642
|
+
grid-column: 1 / -1;
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
`]}render(){return s`<ul part="list" role="list" aria-label=${this.label}>
|
|
3646
|
+
${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">
|
|
3647
|
+
<span class="name" id=${d}>${e.label}</span>
|
|
3648
|
+
<span class="track" part="track" role="meter" aria-labelledby=${d} aria-valuemin="0" aria-valuemax=${a} aria-valuenow=${o}
|
|
3649
|
+
><span class="fill" part="fill" style=${`inline-size:${ji(o,0,a)}%`}></span
|
|
3650
|
+
></span>
|
|
3651
|
+
<span class="figure" aria-hidden="true">${o}</span>
|
|
3652
|
+
<span class="pill">${e.status?s`<impakt-status tone=${e.tone??"warn"}>${e.status}</impakt-status>`:l}</span>
|
|
3653
|
+
</li>`})}
|
|
3654
|
+
</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`
|
|
3655
|
+
:host {
|
|
3656
|
+
display: block;
|
|
3657
|
+
}
|
|
3658
|
+
.block {
|
|
3659
|
+
overflow-x: auto;
|
|
3660
|
+
padding: ${r(4)} ${r(4)};
|
|
3661
|
+
color: ${f.codeText};
|
|
3662
|
+
background: ${f.codeSurface};
|
|
3663
|
+
border-radius: 0;
|
|
3664
|
+
}
|
|
3665
|
+
pre {
|
|
3666
|
+
margin: 0;
|
|
3667
|
+
font-family: ${t.fontMono};
|
|
3668
|
+
font-size: ${f.small};
|
|
3669
|
+
line-height: 1.6;
|
|
3670
|
+
}
|
|
3671
|
+
code {
|
|
3672
|
+
font: inherit;
|
|
3673
|
+
}
|
|
3674
|
+
.line {
|
|
3675
|
+
position: relative;
|
|
3676
|
+
display: block;
|
|
3677
|
+
white-space: pre;
|
|
3678
|
+
}
|
|
3679
|
+
.sign {
|
|
3680
|
+
display: inline-block;
|
|
3681
|
+
inline-size: 2ch;
|
|
3682
|
+
}
|
|
3683
|
+
.removed {
|
|
3684
|
+
color: ${f.codeMuted};
|
|
3685
|
+
}
|
|
3686
|
+
.added {
|
|
3687
|
+
color: ${f.codeText};
|
|
3688
|
+
}
|
|
3689
|
+
.visually-hidden {
|
|
3690
|
+
${T}
|
|
3691
|
+
}
|
|
3692
|
+
@media (forced-colors: active) {
|
|
3693
|
+
.block {
|
|
3694
|
+
border: 1px solid CanvasText;
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
`]}get allLines(){if(this.lines.length)return this.lines;let e=(i,a)=>i?i.split(`
|
|
3698
|
+
`).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`
|
|
3699
|
+
fieldset {
|
|
3700
|
+
border: 0;
|
|
3701
|
+
margin: 0;
|
|
3702
|
+
padding: 0;
|
|
3703
|
+
min-inline-size: 0;
|
|
3704
|
+
}
|
|
3705
|
+
legend {
|
|
3706
|
+
padding: 0;
|
|
3707
|
+
}
|
|
3708
|
+
:host([look='site']) legend {
|
|
3709
|
+
font-family: ${t.fontMono};
|
|
3710
|
+
font-size: ${f.tiny};
|
|
3711
|
+
font-weight: ${f.medium};
|
|
3712
|
+
text-transform: uppercase;
|
|
3713
|
+
letter-spacing: 0.06em;
|
|
3714
|
+
margin-block-end: ${r(2)};
|
|
3715
|
+
}
|
|
3716
|
+
.chips {
|
|
3717
|
+
display: flex;
|
|
3718
|
+
flex-wrap: wrap;
|
|
3719
|
+
gap: ${r(1.5)};
|
|
3720
|
+
}
|
|
3721
|
+
.chip {
|
|
3722
|
+
position: relative;
|
|
3723
|
+
display: inline-flex;
|
|
3724
|
+
align-items: center;
|
|
3725
|
+
min-block-size: 35px;
|
|
3726
|
+
padding: 0 ${r(3)};
|
|
3727
|
+
font-family: ${t.fontBody};
|
|
3728
|
+
font-size: ${f.small};
|
|
3729
|
+
color: ${t.text};
|
|
3730
|
+
background: ${t.surfaceCard};
|
|
3731
|
+
border: 1px solid ${t.text};
|
|
3732
|
+
border-radius: 0;
|
|
3733
|
+
cursor: pointer;
|
|
3734
|
+
}
|
|
3735
|
+
.chip input {
|
|
3736
|
+
position: absolute;
|
|
3737
|
+
inset: 0;
|
|
3738
|
+
inline-size: 100%;
|
|
3739
|
+
block-size: 100%;
|
|
3740
|
+
margin: 0;
|
|
3741
|
+
opacity: 0;
|
|
3742
|
+
cursor: inherit;
|
|
3743
|
+
}
|
|
3744
|
+
.chip:hover {
|
|
3745
|
+
background: ${t.surfaceSubtle};
|
|
3746
|
+
}
|
|
3747
|
+
.chip.on {
|
|
3748
|
+
color: ${f.onInverse};
|
|
3749
|
+
background: ${f.inverse};
|
|
3750
|
+
}
|
|
3751
|
+
.chip:has(input:focus-visible) {
|
|
3752
|
+
outline: 2px solid transparent;
|
|
3753
|
+
outline-offset: ${t.focusOffset};
|
|
3754
|
+
box-shadow: ${t.focusShadow};
|
|
3755
|
+
}
|
|
3756
|
+
:host([disabled]) .chip {
|
|
3757
|
+
opacity: 0.6;
|
|
3758
|
+
cursor: not-allowed;
|
|
3759
|
+
}
|
|
3760
|
+
:host([invalid]) .chip {
|
|
3761
|
+
border-color: ${t.danger};
|
|
3762
|
+
}
|
|
3763
|
+
@media (pointer: coarse) {
|
|
3764
|
+
.chip {
|
|
3765
|
+
min-block-size: 44px;
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
@media (forced-colors: active) {
|
|
3769
|
+
.chip {
|
|
3770
|
+
border-color: ButtonText;
|
|
3771
|
+
}
|
|
3772
|
+
.chip.on {
|
|
3773
|
+
forced-color-adjust: none;
|
|
3774
|
+
color: HighlightText;
|
|
3775
|
+
background: Highlight;
|
|
3776
|
+
border-color: Highlight;
|
|
3777
|
+
}
|
|
3778
|
+
.chip:has(input:focus-visible) {
|
|
3779
|
+
outline-color: Highlight;
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
`]}renderLabel(){return s`<legend class="label" part="label">
|
|
3783
|
+
${this.label}${this.required?s`<span class="required"> (${this.requiredText})</span>`:l}
|
|
3784
|
+
</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">
|
|
3785
|
+
${this.options.map((i,a)=>{let o=this.chosen(i.value);return s`<label class="chip ${o?"on":""}" part="chip">
|
|
3786
|
+
<input
|
|
3787
|
+
type=${e}
|
|
3788
|
+
id=${a===0?this.controlId:this.id_(`opt-${a}`)}
|
|
3789
|
+
name=${this.uid}
|
|
3790
|
+
value=${i.value}
|
|
3791
|
+
.checked=${o}
|
|
3792
|
+
?disabled=${this.disabled}
|
|
3793
|
+
?required=${!this.multiple&&this.required&&a===0}
|
|
3794
|
+
@change=${d=>this.choose(i.value,d.target.checked)}
|
|
3795
|
+
/><span>${i.label}</span>
|
|
3796
|
+
</label>`})}
|
|
3797
|
+
</div>`}render(){return s`
|
|
3798
|
+
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
3799
|
+
${this.renderLabel()}
|
|
3800
|
+
${this.description?s`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
3801
|
+
${this.renderControl()}
|
|
3802
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
3803
|
+
</fieldset>
|
|
3804
|
+
`}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`
|
|
3805
|
+
:host {
|
|
3806
|
+
display: inline;
|
|
3807
|
+
}
|
|
3808
|
+
.tag {
|
|
3809
|
+
position: relative;
|
|
3810
|
+
display: inline-block;
|
|
3811
|
+
padding: 1px 8px;
|
|
3812
|
+
font-family: ${t.fontMono};
|
|
3813
|
+
font-size: ${f.small};
|
|
3814
|
+
font-weight: ${f.medium};
|
|
3815
|
+
line-height: 1.4;
|
|
3816
|
+
white-space: nowrap;
|
|
3817
|
+
color: ${f.onInverse};
|
|
3818
|
+
background: ${f.inverse};
|
|
3819
|
+
border: 1px solid ${f.inverse};
|
|
3820
|
+
border-radius: 0;
|
|
3821
|
+
user-select: none;
|
|
3822
|
+
}
|
|
3823
|
+
:host([look='outline']) .tag {
|
|
3824
|
+
color: ${t.text};
|
|
3825
|
+
background: ${t.surfaceCard};
|
|
3826
|
+
border-color: ${t.text};
|
|
3827
|
+
}
|
|
3828
|
+
.visually-hidden {
|
|
3829
|
+
${T}
|
|
3830
|
+
}
|
|
3831
|
+
@media (forced-colors: active) {
|
|
3832
|
+
.tag {
|
|
3833
|
+
border-color: CanvasText;
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
`]}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`
|
|
3837
|
+
:host {
|
|
3838
|
+
display: block;
|
|
3839
|
+
}
|
|
3840
|
+
.card {
|
|
3841
|
+
display: flex;
|
|
3842
|
+
flex-direction: column;
|
|
3843
|
+
gap: ${r(4)};
|
|
3844
|
+
block-size: 100%;
|
|
3845
|
+
padding: ${r(6)};
|
|
3846
|
+
background: ${t.surfaceCard};
|
|
3847
|
+
border: 1px solid ${t.text};
|
|
3848
|
+
border-radius: 0;
|
|
3849
|
+
}
|
|
3850
|
+
:host([state='coming-soon']) .card {
|
|
3851
|
+
background: ${t.surfaceSubtle};
|
|
3852
|
+
}
|
|
3853
|
+
.name {
|
|
3854
|
+
margin: 0;
|
|
3855
|
+
font-family: ${t.fontHeading};
|
|
3856
|
+
font-size: 2rem;
|
|
3857
|
+
font-weight: ${f.medium};
|
|
3858
|
+
line-height: 1.1;
|
|
3859
|
+
letter-spacing: ${t.trackingTight};
|
|
3860
|
+
color: ${t.text};
|
|
3861
|
+
overflow-wrap: anywhere;
|
|
3862
|
+
}
|
|
3863
|
+
:host([state='coming-soon']) .name {
|
|
3864
|
+
color: ${t.textMuted};
|
|
3865
|
+
}
|
|
3866
|
+
.description {
|
|
3867
|
+
margin: 0;
|
|
3868
|
+
color: ${t.textMuted};
|
|
3869
|
+
}
|
|
3870
|
+
.status {
|
|
3871
|
+
display: flex;
|
|
3872
|
+
flex-wrap: wrap;
|
|
3873
|
+
align-items: center;
|
|
3874
|
+
gap: ${r(2)} ${r(2.5)};
|
|
3875
|
+
}
|
|
3876
|
+
.note {
|
|
3877
|
+
font-family: ${t.fontMono};
|
|
3878
|
+
font-size: ${f.small};
|
|
3879
|
+
color: ${t.textMuted};
|
|
3880
|
+
}
|
|
3881
|
+
.muted {
|
|
3882
|
+
margin: 0;
|
|
3883
|
+
font-size: ${f.small};
|
|
3884
|
+
color: ${t.textMuted};
|
|
3885
|
+
}
|
|
3886
|
+
.action {
|
|
3887
|
+
display: flex;
|
|
3888
|
+
align-items: center;
|
|
3889
|
+
justify-content: space-between;
|
|
3890
|
+
gap: ${r(3)};
|
|
3891
|
+
min-block-size: 46px;
|
|
3892
|
+
margin-block-start: auto;
|
|
3893
|
+
padding: ${r(2.5)} ${r(5)};
|
|
3894
|
+
font-family: ${t.fontBody};
|
|
3895
|
+
font-size: ${u("font.size.md","1rem")};
|
|
3896
|
+
color: ${t.text};
|
|
3897
|
+
background: ${t.surfaceCard};
|
|
3898
|
+
border: 1px solid ${t.text};
|
|
3899
|
+
border-radius: 0;
|
|
3900
|
+
text-decoration: none;
|
|
3901
|
+
}
|
|
3902
|
+
.action:hover {
|
|
3903
|
+
background: ${t.surfaceSubtle};
|
|
3904
|
+
}
|
|
3905
|
+
:host([owned]) .action {
|
|
3906
|
+
color: ${f.onInverse};
|
|
3907
|
+
background: ${f.inverse};
|
|
3908
|
+
}
|
|
3909
|
+
:host([owned]) .action:hover {
|
|
3910
|
+
background: color-mix(in srgb, ${f.inverse} 88%, ${f.onInverse});
|
|
3911
|
+
}
|
|
3912
|
+
.arrow {
|
|
3913
|
+
font-size: 1.25em;
|
|
3914
|
+
line-height: 1;
|
|
3915
|
+
}
|
|
3916
|
+
@media (forced-colors: active) {
|
|
3917
|
+
.card,
|
|
3918
|
+
.action {
|
|
3919
|
+
border-color: CanvasText;
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
`]}renderStatus(){return this.state==="coming-soon"?s`<div class="status"><impakt-status tone="neutral">${this.comingSoonText}</impakt-status></div>
|
|
3923
|
+
<p class="muted">${this.notOpenText}</p>`:!this.status&&!this.note?l:s`<div class="status">
|
|
3924
|
+
${this.status?s`<impakt-status tone=${this.statusTone}>${this.status}</impakt-status>`:l}
|
|
3925
|
+
${this.note?s`<span class="note">${this.note}</span>`:l}
|
|
3926
|
+
</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")}>
|
|
3927
|
+
<div class="name" role="heading" aria-level=${e} id=${this.id_("name")}>${this.name}</div>
|
|
3928
|
+
${this.description?s`<p class="description">${this.description}</p>`:l}
|
|
3929
|
+
${this.renderStatus()}
|
|
3930
|
+
${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}
|
|
3931
|
+
</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,Tt 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,St 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,S 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,T as visuallyHidden};
|
|
2594
3932
|
/*! Bundled license information:
|
|
2595
3933
|
|
|
2596
3934
|
lit-html/lit-html.js:
|