@atomic-ui/ui 0.9.0 → 0.10.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/README.md +1 -1
- package/custom-elements.json +90 -3
- package/dist/base/server.d.ts +8 -0
- package/dist/{chunk-TE3CBEJQ.js → chunk-2D2IMQII.js} +2 -2
- package/dist/chunk-6WVL3HOC.js +7 -0
- package/dist/chunk-6WVL3HOC.js.map +1 -0
- package/dist/{chunk-WRYV6QGA.js → chunk-D6NET2VB.js} +15 -2
- package/dist/chunk-D6NET2VB.js.map +1 -0
- package/dist/{chunk-KAQJVGYW.js → chunk-DN5YZFSG.js} +2 -2
- package/dist/{chunk-D3JWVMJE.js → chunk-FKUBEVCU.js} +2 -2
- package/dist/{chunk-7C56LPNJ.js → chunk-L4CIBOGK.js} +2 -2
- package/dist/{chunk-FAE6TGGT.js → chunk-OJO62KRX.js} +5 -1
- package/dist/chunk-OJO62KRX.js.map +1 -0
- package/dist/{chunk-EGJZDKMW.js → chunk-QU3U2CS2.js} +27 -5
- package/dist/chunk-QU3U2CS2.js.map +1 -0
- package/dist/{chunk-AVDSYLOY.js → chunk-UFPI4I2Y.js} +3 -2
- package/dist/{chunk-AVDSYLOY.js.map → chunk-UFPI4I2Y.js.map} +1 -1
- package/dist/{chunk-3IGNZTJU.js → chunk-UNGAG44M.js} +2 -2
- package/dist/{chunk-3IGNZTJU.js.map → chunk-UNGAG44M.js.map} +1 -1
- package/dist/{chunk-P6HG5RB2.js → chunk-ZEIV5X3U.js} +3 -3
- package/dist/chunk-ZEIV5X3U.js.map +1 -0
- package/dist/components/accordion.d.ts +13 -0
- package/dist/components/accordion.js +2 -1
- package/dist/components/app-ui.js +2 -2
- package/dist/components/journey.js +2 -2
- package/dist/components/navigation.js +1 -1
- package/dist/components/page.d.ts +21 -0
- package/dist/components/page.js +2 -1
- package/dist/components/price.js +2 -2
- package/dist/components/rows.js +2 -2
- package/dist/components/table.js +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/index.js +11 -10
- package/dist/standalone/atomic-ui.js +444 -402
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/package.json +7 -6
- package/dist/chunk-EGJZDKMW.js.map +0 -1
- package/dist/chunk-FAE6TGGT.js.map +0 -1
- package/dist/chunk-P6HG5RB2.js.map +0 -1
- package/dist/chunk-WRYV6QGA.js.map +0 -1
- /package/dist/{chunk-TE3CBEJQ.js.map → chunk-2D2IMQII.js.map} +0 -0
- /package/dist/{chunk-KAQJVGYW.js.map → chunk-DN5YZFSG.js.map} +0 -0
- /package/dist/{chunk-D3JWVMJE.js.map → chunk-FKUBEVCU.js.map} +0 -0
- /package/dist/{chunk-7C56LPNJ.js.map → chunk-L4CIBOGK.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @atomic-ui/ui version 0.
|
|
2
|
-
var
|
|
3
|
-
\f\r]`,
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xt=/'/g,Yt=/"/g,Qt=/^(?:script|style|textarea|title)$/i,At=n=>(e,...i)=>({_$litType$:n,strings:e,values:i}),a=At(1),f=At(2),Pi=At(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),Gt=new WeakMap,j=U.createTreeWalker(U,129);function ei(n,e){if(!Et(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(e):e}var fi=(n,e)=>{let i=n.length-1,r=[],o,d=e===2?"<svg>":e===3?"<math>":"",h=Z;for(let k=0;k<i;k++){let y=n[k],z,A,M=-1,H=0;for(;H<y.length&&(h.lastIndex=H,A=h.exec(y),A!==null);)H=h.lastIndex,h===Z?A[1]==="!--"?h=Vt:A[1]!==void 0?h=Kt:A[2]!==void 0?(Qt.test(A[2])&&(o=RegExp("</"+A[2],"g")),h=F):A[3]!==void 0&&(h=F):h===F?A[0]===">"?(h=o??Z,M=-1):A[1]===void 0?M=-2:(M=h.lastIndex-A[2].length,z=A[1],h=A[3]===void 0?F:A[3]==='"'?Yt:Xt):h===Yt||h===Xt?h=F:h===Vt||h===Kt?h=Z:(h=F,o=void 0);let O=h===F&&n[k+1].startsWith("/>")?" ":"";d+=h===Z?y+gi:M>=0?(r.push(z),y.slice(0,M)+Zt+y.slice(M)+q+O):y+q+(M===-2?k:O)}return[ei(n,d+(n[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},ee=class n{constructor({strings:e,_$litType$:i},r){let o;this.parts=[];let d=0,h=0,k=e.length-1,y=this.parts,[z,A]=fi(e,i);if(this.el=n.createElement(z,r),j.currentNode=this.el.content,i===2||i===3){let M=this.el.content.firstChild;M.replaceWith(...M.childNodes)}for(;(o=j.nextNode())!==null&&y.length<k;){if(o.nodeType===1){if(o.hasAttributes())for(let M of o.getAttributeNames())if(M.endsWith(Zt)){let H=A[h++],O=o.getAttribute(M).split(q),de=/([.?@])?(.*)/.exec(H);y.push({type:1,index:d,name:de[2],strings:O,ctor:de[1]==="."?wt:de[1]==="?"?St:de[1]==="@"?Tt:X}),o.removeAttribute(M)}else M.startsWith(q)&&(y.push({type:6,index:d}),o.removeAttribute(M));if(Qt.test(o.tagName)){let M=o.textContent.split(q),H=M.length-1;if(H>0){o.textContent=ue?ue.emptyScript:"";for(let O=0;O<H;O++)o.append(M[O],J()),j.nextNode(),y.push({type:2,index:++d});o.append(M[H],J())}}}else if(o.nodeType===8)if(o.data===Jt)y.push({type:2,index:d});else{let M=-1;for(;(M=o.data.indexOf(q,M+1))!==-1;)y.push({type:7,index:d}),M+=q.length-1}d++}}static createElement(e,i){let r=U.createElement("template");return r.innerHTML=e,r}};function K(n,e,i=n,r){if(e===P)return e;let o=r!==void 0?i._$Co?.[r]:i._$Cl,d=Q(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,r)),r!==void 0?(i._$Co??=[])[r]=o:i._$Cl=o),o!==void 0&&(e=K(n,o._$AS(n,e.values),o,r)),e}var vt=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:r}=this._$AD,o=(e?.creationScope??U).importNode(i,!0);j.currentNode=o;let d=j.nextNode(),h=0,k=0,y=r[0];for(;y!==void 0;){if(h===y.index){let z;y.type===2?z=new te(d,d.nextSibling,this,e):y.type===1?z=new y.ctor(d,y.name,y.strings,this,e):y.type===6&&(z=new zt(d,this,e)),this._$AV.push(z),y=r[++k]}h!==y?.index&&(d=j.nextNode(),h++)}return j.currentNode=U,o}p(e){let i=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,i),i+=r.strings.length-2):r._$AI(e[i])),i++}},te=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,o){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,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),Q(e)?e===l||e==null||e===""?(this._$AH!==l&&this._$AR(),this._$AH=l):e!==this._$AH&&e!==P&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):bi(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&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(U.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=ee.createElement(ei(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===o)this._$AH.p(i);else{let d=new vt(o,this),h=d.u(this.options);d.p(i),this.T(h),this._$AH=d}}_$AC(e){let i=Gt.get(e.strings);return i===void 0&&Gt.set(e.strings,i=new ee(e)),i}k(e){Et(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,r,o=0;for(let d of e)o===i.length?i.push(r=new n(this.O(J()),this.O(J()),this,this.options)):r=i[o],r._$AI(d),o++;o<i.length&&(this._$AR(r&&r._$AB.nextSibling,o),i.length=o)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let r=Ut(e).nextSibling;Ut(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},X=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,o,d){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=i,this._$AM=o,this.options=d,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=l}_$AI(e,i=this,r,o){let d=this.strings,h=!1;if(d===void 0)e=K(this,e,i,0),h=!Q(e)||e!==this._$AH&&e!==P,h&&(this._$AH=e);else{let k=e,y,z;for(e=d[0],y=0;y<d.length-1;y++)z=K(this,k[r+y],i,y),z===P&&(z=this._$AH[y]),h||=!Q(z)||z!==this._$AH[y],z===l?e=l:e!==l&&(e+=(z??"")+d[y+1]),this._$AH[y]=z}h&&!o&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},wt=class extends X{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},St=class extends X{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},Tt=class extends X{constructor(e,i,r,o,d){super(e,i,r,o,d),this.type=5}_$AI(e,i=this){if((e=K(this,e,i,0)??l)===P)return;let r=this._$AH,o=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,d=e!==l&&(r===l||o);o&&this.element.removeEventListener(this.name,this,r),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)}},zt=class{constructor(e,i,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=i,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){K(this,e)}};var $i=Mt.litHtmlPolyfillSupport;$i?.(ee,te),(Mt.litHtmlVersions??=[]).push("3.3.3");var Ct=(n,e,i)=>{let r=i?.renderBefore??e,o=r._$litPart$;if(o===void 0){let d=i?.renderBefore??null;r._$litPart$=o=new te(e.insertBefore(J(),d),d,void 0,i??{})}return o._$AI(n),o};var Lt=globalThis,N=class extends B{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=Ct(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};N._$litElement$=!0,N.finalized=!0,Lt.litElementHydrateSupport?.({LitElement:N});var yi=Lt.litElementPolyfillSupport;yi?.({LitElement:N});(Lt.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")},$=n=>C(`font-size: var(--impakt-font-size-${n}, 1rem); line-height: var(--impakt-font-leading-${n}, 1.5);`),s=n=>u(`space.${String(n).replace(".","-")}`,`${n*4}px`),g=n=>u(`font.size.${n}`,"1rem"),R=n=>u(`font.line-height.${n}`,"1.5"),m=n=>u(`font.weight.${n}`,"400"),L=p`
|
|
1
|
+
/* @atomic-ui/ui version 0.10.1, standalone. */
|
|
2
|
+
var At=globalThis,Vt=a=>a,me=At.trustedTypes,Kt=me?me.createPolicy("lit-html",{createHTML:a=>a}):void 0,Ct="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+O,vr=`<${_t}>`,W=document,Q=()=>W.createComment(""),ee=a=>a===null||typeof a!="object"&&typeof a!="function",Rt=Array.isArray,Qt=a=>Rt(a)||typeof a?.[Symbol.iterator]=="function",Mt=`[
|
|
3
|
+
\f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xt=/-->/g,Gt=/>/g,U=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
|
|
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
5
|
:host([space-above='sm']) { margin-block-start: ${s(2)}; }
|
|
6
6
|
:host([space-above='md']) { margin-block-start: ${s(4)}; }
|
|
7
7
|
:host([space-above='lg']) { margin-block-start: ${s(6)}; }
|
|
@@ -12,17 +12,17 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
12
12
|
:host([space-below='lg']) { margin-block-end: ${s(6)}; }
|
|
13
13
|
:host([space-below='xl']) { margin-block-end: ${s(8)}; }
|
|
14
14
|
:host([space-below='2xl']) { margin-block-end: clamp(${s(14)}, 8vw, ${s(28)}); }
|
|
15
|
-
`;var
|
|
15
|
+
`;var v=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
|
+
`,S=h`
|
|
23
23
|
min-block-size: ${t.targetMin};
|
|
24
24
|
min-inline-size: ${t.targetMin};
|
|
25
|
-
`,
|
|
25
|
+
`,T=h`
|
|
26
26
|
position: absolute;
|
|
27
27
|
inline-size: 1px;
|
|
28
28
|
block-size: 1px;
|
|
@@ -32,7 +32,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
32
32
|
clip-path: inset(50%);
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
border: 0;
|
|
35
|
-
`,
|
|
35
|
+
`,br=h`
|
|
36
36
|
@media (prefers-reduced-motion: reduce) {
|
|
37
37
|
:host,
|
|
38
38
|
:host *,
|
|
@@ -44,7 +44,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
44
44
|
scroll-behavior: auto !important;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,fr=h`
|
|
48
48
|
:host {
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
font-family: ${t.fontBody};
|
|
@@ -58,15 +58,15 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
58
58
|
*::after {
|
|
59
59
|
box-sizing: inherit;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,M=a=>_(`@media (pointer: coarse) { :host :is(${a}) { min-block-size: 44px; min-inline-size: 44px; } }`),$r=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 w(a,e){let i=globalThis[Dr]?.words?.[a],o=typeof i=="string"&&i.trim()?i:a;return e?o.replace(/\{(\w+)\}/g,(d,c)=>c in e?String(e[c]):d):o}var qr=0,p=class extends D{constructor(){super(...arguments);this.uid=`impakt-${qr+=1}`}static{this.styles=[fr,br,h``]}id_(r){return`${this.uid}-${r}`}connectedCallback(){super.connectedCallback(),this.sayDefaults()}sayDefaults(){let r=this.constructor.elementProperties,i=this;for(let o of r.keys()){let d=i[o];if(typeof d!="string"||!d)continue;let c=w(d);c!==d&&(i[o]=c)}}};var Pt={"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"/>`},Fr=Object.keys(Pt);function z(a,e="1.25em"){let r=a?Pt[a]:void 0;return r?n`<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">${r}</svg>`:l}var we=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",r=z(this.name,e);return this.label?n`<span role="img" aria-label=${this.label}>${r}</span>`:n`${r}`}};customElements.define("impakt-icon",we);var Se=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="";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}}}static{this.styles=[...p.styles,v,M("button, a"),h`
|
|
70
70
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
71
71
|
:host {
|
|
72
72
|
display: inline-block;
|
|
@@ -76,7 +76,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
76
76
|
}
|
|
77
77
|
@media (max-width: 40rem) { :host([full-on-phone]) { display: block; } }
|
|
78
78
|
button, a {
|
|
79
|
-
${
|
|
79
|
+
${S}
|
|
80
80
|
box-sizing: border-box;
|
|
81
81
|
text-decoration: none;
|
|
82
82
|
display: inline-flex;
|
|
@@ -87,15 +87,15 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
87
87
|
min-block-size: 40px;
|
|
88
88
|
padding: ${s(2)} ${s(4)};
|
|
89
89
|
font-family: inherit;
|
|
90
|
-
${
|
|
90
|
+
${x("sm")}
|
|
91
91
|
font-weight: ${m("semibold")};
|
|
92
92
|
border-radius: ${t.radiusLg};
|
|
93
93
|
border: ${t.borderThin} solid transparent;
|
|
94
94
|
cursor: pointer;
|
|
95
95
|
transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
96
96
|
}
|
|
97
|
-
:host([size='sm']) :is(button, a) { min-block-size: 32px; padding: ${s(1)} ${s(3)}; ${
|
|
98
|
-
:host([size='lg']) :is(button, a) { min-block-size: 48px; padding: ${s(3)} ${s(6)}; ${
|
|
97
|
+
:host([size='sm']) :is(button, a) { min-block-size: 32px; padding: ${s(1)} ${s(3)}; ${x("sm")} gap: ${s(1.5)}; }
|
|
98
|
+
:host([size='lg']) :is(button, a) { min-block-size: 48px; padding: ${s(3)} ${s(6)}; ${x("md")} }
|
|
99
99
|
.icon { flex: none; inline-size: 1.15em; block-size: 1.15em; }
|
|
100
100
|
/* The cursor is the only thing that changes while busy. Moving or
|
|
101
101
|
recolouring a control the moment it is pressed is how a user loses it. */
|
|
@@ -207,7 +207,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
207
207
|
:host([size='lg']) .icon-only { inline-size: 48px; min-inline-size: 48px; block-size: 48px; min-block-size: 48px; padding: 0; }
|
|
208
208
|
|
|
209
209
|
.sr-only {
|
|
210
|
-
${
|
|
210
|
+
${T}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/* Windows High Contrast Mode drops background and border colours, so a
|
|
@@ -218,9 +218,9 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
218
218
|
border-color: ButtonBorder;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
`]}onClick(
|
|
221
|
+
`]}onClick(r){if(this.disabled||this.busy){r.preventDefault(),r.stopImmediatePropagation();return}this.type==="submit"&&this.internals?.form?.requestSubmit(),this.type==="reset"&&this.internals?.form?.reset()}render(){let r=!!(this.icon&&this.icon!=="none"&&this.label),i=r?`${this.variant} icon-only`:this.variant;if(r){let d=z(this.icon);return this.href&&!this.disabled?n`<a class=${i} href=${this.href} part="button" aria-label=${this.label}>${d}</a>`:n`
|
|
222
222
|
<button
|
|
223
|
-
class=${
|
|
223
|
+
class=${i}
|
|
224
224
|
type="button"
|
|
225
225
|
part="button"
|
|
226
226
|
aria-label=${this.label}
|
|
@@ -230,9 +230,9 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
230
230
|
@click=${this.onClick}
|
|
231
231
|
>
|
|
232
232
|
${d}
|
|
233
|
-
${this.busy?
|
|
233
|
+
${this.busy?n`<span class="sr-only">${this.busyLabel}</span>`:l}
|
|
234
234
|
</button>
|
|
235
|
-
`}let o=
|
|
235
|
+
`}let o=n`${z(this.iconBefore)}<slot></slot>${this.iconAfter&&this.iconAfter!=="none"?n`<span class="after" aria-hidden="true">${z(this.iconAfter)}</span>`:l}`;return this.href&&!this.disabled?n`<a class=${this.variant} href=${this.href} part="button">${o}</a>`:n`
|
|
236
236
|
<button
|
|
237
237
|
class=${this.variant}
|
|
238
238
|
type="button"
|
|
@@ -243,24 +243,24 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
243
243
|
@click=${this.onClick}
|
|
244
244
|
>
|
|
245
245
|
${o}
|
|
246
|
-
${this.busy?
|
|
246
|
+
${this.busy?n`<span class="sr-only">${this.busyLabel}</span>`:l}
|
|
247
247
|
</button>
|
|
248
|
-
`}};customElements.define("impakt-button",
|
|
248
|
+
`}};customElements.define("impakt-button",Se);var B=h`
|
|
249
249
|
:host { --impakt-field-width: 100%; }
|
|
250
250
|
:host([width='xs']) { --impakt-field-width: 8ch; }
|
|
251
251
|
:host([width='sm']) { --impakt-field-width: 14ch; }
|
|
252
252
|
:host([width='md']) { --impakt-field-width: 24ch; }
|
|
253
253
|
:host([width='lg']) { --impakt-field-width: 40ch; }
|
|
254
|
-
`,
|
|
254
|
+
`,f=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,v,h`
|
|
255
255
|
:host {
|
|
256
256
|
display: block;
|
|
257
257
|
margin-block-end: ${s(4)};
|
|
258
258
|
}
|
|
259
259
|
.label {
|
|
260
260
|
display: block;
|
|
261
|
-
font-size: ${
|
|
261
|
+
font-size: ${b("sm")};
|
|
262
262
|
font-weight: ${m("semibold")};
|
|
263
|
-
line-height: ${
|
|
263
|
+
line-height: ${I("normal")};
|
|
264
264
|
margin-block-end: ${s(1)};
|
|
265
265
|
color: ${t.text};
|
|
266
266
|
}
|
|
@@ -269,14 +269,14 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
269
269
|
color: ${t.textMuted};
|
|
270
270
|
}
|
|
271
271
|
.description {
|
|
272
|
-
font-size: ${
|
|
273
|
-
line-height: ${
|
|
272
|
+
font-size: ${b("sm")};
|
|
273
|
+
line-height: ${I("normal")};
|
|
274
274
|
color: ${t.textMuted};
|
|
275
275
|
margin-block-end: ${s(2)};
|
|
276
276
|
}
|
|
277
277
|
.error {
|
|
278
|
-
font-size: ${
|
|
279
|
-
line-height: ${
|
|
278
|
+
font-size: ${b("sm")};
|
|
279
|
+
line-height: ${I("normal")};
|
|
280
280
|
color: ${t.dangerText};
|
|
281
281
|
margin-block-start: ${s(1)};
|
|
282
282
|
display: flex;
|
|
@@ -286,7 +286,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
286
286
|
display: none;
|
|
287
287
|
}
|
|
288
288
|
.visually-hidden {
|
|
289
|
-
${
|
|
289
|
+
${T}
|
|
290
290
|
}
|
|
291
291
|
/*
|
|
292
292
|
* Only the control is dimmed. Dimming the whole host took the question,
|
|
@@ -298,13 +298,13 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
298
298
|
opacity: 0.6;
|
|
299
299
|
cursor: not-allowed;
|
|
300
300
|
}
|
|
301
|
-
`]}get controlId(){return this.id_("control")}get describedBy(){let
|
|
301
|
+
`]}get controlId(){return this.id_("control")}get describedBy(){let r=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean);return r.length?r.join(" "):l}focus(r){let i=this.renderRoot?.querySelector(`#${this.controlId}`)??this.renderRoot?.querySelector("input, select, textarea, button");i?i.focus(r):super.focus(r)}renderLabel(){return n`
|
|
302
302
|
<label class="label" for=${this.controlId} part="label">
|
|
303
|
-
${this.label}${this.required?
|
|
303
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
304
304
|
</label>
|
|
305
|
-
`}render(){return
|
|
305
|
+
`}render(){return n`
|
|
306
306
|
${this.renderLabel()}
|
|
307
|
-
${this.description?
|
|
307
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">
|
|
308
308
|
${this.description}
|
|
309
309
|
</div>`:l}
|
|
310
310
|
${this.renderControl()}
|
|
@@ -323,13 +323,13 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
323
323
|
>
|
|
324
324
|
${this.error||l}
|
|
325
325
|
</div>
|
|
326
|
-
`}setFormValue(
|
|
326
|
+
`}setFormValue(r){this.value=r,this.internals?.setFormValue(r),this.dispatchEvent(new CustomEvent("impakt-change",{detail:this.changeDetail(r),bubbles:!0,composed:!0}))}changeDetail(r){return{value:r}}};var Te=class extends f{static{this.properties={...f.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=[...f.styles,B,h`
|
|
327
327
|
input {
|
|
328
328
|
inline-size: min(100%, var(--impakt-field-width));
|
|
329
329
|
min-block-size: 44px;
|
|
330
330
|
padding: ${s(2.5)} ${s(3)};
|
|
331
331
|
font-family: inherit;
|
|
332
|
-
font-size: ${
|
|
332
|
+
font-size: ${b("md")};
|
|
333
333
|
color: ${t.text};
|
|
334
334
|
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
335
335
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -384,7 +384,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
384
384
|
border-color: ${t.danger};
|
|
385
385
|
border-width: ${t.borderThick};
|
|
386
386
|
}
|
|
387
|
-
`]}renderControl(){let e=this.renderInput();return this.type==="search"?
|
|
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`
|
|
388
388
|
<input
|
|
389
389
|
id=${this.controlId}
|
|
390
390
|
part="input"
|
|
@@ -402,16 +402,16 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
402
402
|
aria-invalid=${this.error?"true":l}
|
|
403
403
|
@input=${e=>this.setFormValue(e.target.value)}
|
|
404
404
|
/>
|
|
405
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",
|
|
405
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",Te);var ze=class extends f{static{this.properties={...f.properties,width:{type:String,reflect:!0},options:{type:Array},placeholder:{type:String},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0}}}constructor(){super(),this.width="full",this.options=[],this.placeholder="Choose an option",this.hideLabel=!1}static{this.styles=[...f.styles,B,h`
|
|
406
406
|
:host([hide-label]) .label {
|
|
407
|
-
${
|
|
407
|
+
${T}
|
|
408
408
|
}
|
|
409
409
|
select {
|
|
410
410
|
inline-size: min(100%, var(--impakt-field-width));
|
|
411
411
|
min-block-size: 44px;
|
|
412
412
|
padding: ${s(2.5)} ${s(3)};
|
|
413
413
|
font-family: inherit;
|
|
414
|
-
font-size: ${
|
|
414
|
+
font-size: ${b("md")};
|
|
415
415
|
color: ${t.text};
|
|
416
416
|
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
417
417
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -435,7 +435,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
435
435
|
border-color: ${t.danger};
|
|
436
436
|
border-width: ${t.borderThick};
|
|
437
437
|
}
|
|
438
|
-
`]}renderControl(){return
|
|
438
|
+
`]}renderControl(){return n`
|
|
439
439
|
<select
|
|
440
440
|
id=${this.controlId}
|
|
441
441
|
part="select"
|
|
@@ -447,9 +447,9 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
447
447
|
@change=${e=>this.setFormValue(e.target.value)}
|
|
448
448
|
>
|
|
449
449
|
<option value="" ?selected=${!this.value}>${this.placeholder}</option>
|
|
450
|
-
${this.options.map(e=>
|
|
450
|
+
${this.options.map(e=>n`<option value=${e.value} ?selected=${this.value===e.value}>${e.label}</option>`)}
|
|
451
451
|
</select>
|
|
452
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",
|
|
452
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",ze);var Ee=class extends f{static{this.properties={...f.properties,checked:{type:Boolean,reflect:!0}}}constructor(){super(),this.checked=!1}static{this.styles=[...f.styles,M(".row"),h`
|
|
453
453
|
.row {
|
|
454
454
|
display: flex;
|
|
455
455
|
align-items: flex-start;
|
|
@@ -457,7 +457,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
457
457
|
cursor: pointer;
|
|
458
458
|
}
|
|
459
459
|
input {
|
|
460
|
-
${
|
|
460
|
+
${S}
|
|
461
461
|
inline-size: 20px;
|
|
462
462
|
block-size: 20px;
|
|
463
463
|
margin: 0;
|
|
@@ -465,12 +465,12 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
465
465
|
accent-color: ${t.brand};
|
|
466
466
|
}
|
|
467
467
|
.text {
|
|
468
|
-
font-size: ${
|
|
468
|
+
font-size: ${b("md")};
|
|
469
469
|
}
|
|
470
470
|
:host([invalid]) .row {
|
|
471
471
|
color: ${t.dangerText};
|
|
472
472
|
}
|
|
473
|
-
`]}renderControl(){return
|
|
473
|
+
`]}renderControl(){return n`
|
|
474
474
|
<label class="row" part="row" for=${this.controlId}>
|
|
475
475
|
<input
|
|
476
476
|
type="checkbox"
|
|
@@ -485,15 +485,15 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
485
485
|
@change=${e=>{this.checked=e.target.checked,this.setFormValue(this.checked?"on":"")}}
|
|
486
486
|
/>
|
|
487
487
|
<span class="text">
|
|
488
|
-
${this.label}${this.required?
|
|
488
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
489
489
|
</span>
|
|
490
490
|
</label>
|
|
491
|
-
`}renderLabel(){return
|
|
491
|
+
`}renderLabel(){return n`${l}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox",Ee);var Ur=_("48rem");function yr(a){if(!a||a.startsWith("#"))return null;try{let e=typeof location>"u"?"http://localhost/":location.href;return new URL(a,e).pathname.replace(/\/$/,"")||"/"}catch{return null}}function Dt(a,e){let r=yr(a);if(!r)return!1;let i=yr(e||(typeof location>"u"?"":location.pathname));return i?r===i?!0:r!=="/"&&i.startsWith(`${r}/`):!1}function oe(a,e,r){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let i=new CustomEvent("impakt-navigate",{detail:{href:r.href,id:r.id??r.href},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(i)||e.preventDefault()}var Me=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,v,h`
|
|
492
492
|
:host { display: flex; flex-direction: column; gap: ${s(5)}; block-size: 100%; }
|
|
493
493
|
.card { padding: ${s(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }
|
|
494
494
|
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${s(.5)}; }
|
|
495
495
|
a {
|
|
496
|
-
${
|
|
496
|
+
${S}
|
|
497
497
|
display: flex;
|
|
498
498
|
align-items: center;
|
|
499
499
|
gap: ${s(3)};
|
|
@@ -501,7 +501,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
501
501
|
padding: 0 ${s(3.5)};
|
|
502
502
|
border-radius: ${t.radiusLg};
|
|
503
503
|
color: ${t.text};
|
|
504
|
-
font-size: ${
|
|
504
|
+
font-size: ${b("md")};
|
|
505
505
|
font-weight: ${m("medium")};
|
|
506
506
|
text-decoration: none;
|
|
507
507
|
transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
|
|
@@ -513,23 +513,23 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
513
513
|
.footer.empty { display: none; }
|
|
514
514
|
@media (prefers-reduced-motion: reduce) { a { transition: none; } }
|
|
515
515
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
516
|
-
`]}onFooter(
|
|
516
|
+
`]}onFooter(r){let i=r.target;this.footerFilled=i.assignedNodes({flatten:!0}).some(o=>o.nodeType===Node.ELEMENT_NODE||(o.textContent??"").trim()!==""),this.requestUpdate()}render(){return n`
|
|
517
517
|
<nav class="card" aria-label=${this.label} part="nav">
|
|
518
518
|
<ul part="list">
|
|
519
|
-
${this.items.map(
|
|
519
|
+
${this.items.map(r=>n`
|
|
520
520
|
<li>
|
|
521
521
|
<a
|
|
522
|
-
href=${
|
|
522
|
+
href=${r.href}
|
|
523
523
|
part="link"
|
|
524
|
-
aria-current=${
|
|
525
|
-
@click=${
|
|
526
|
-
>${
|
|
524
|
+
aria-current=${Dt(r.href,this.current)?"page":l}
|
|
525
|
+
@click=${i=>oe(this,i,r)}
|
|
526
|
+
>${z(r.icon,"20px")}<span>${r.label}</span></a>
|
|
527
527
|
</li>
|
|
528
528
|
`)}
|
|
529
529
|
</ul>
|
|
530
530
|
</nav>
|
|
531
531
|
<div class="card footer ${this.footerFilled?"":"empty"}" part="footer"><slot name="footer" @slotchange=${this.onFooter}></slot></div>
|
|
532
|
-
`}},
|
|
532
|
+
`}},Ae=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,v,h`
|
|
533
533
|
:host { display: block; }
|
|
534
534
|
nav { padding: ${s(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }
|
|
535
535
|
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${s(1)}; }
|
|
@@ -555,22 +555,22 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
555
555
|
a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }
|
|
556
556
|
span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
557
557
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
558
|
-
`]}render(){return
|
|
558
|
+
`]}render(){return n`
|
|
559
559
|
<nav aria-label=${this.label} part="nav">
|
|
560
560
|
<ul part="list">
|
|
561
|
-
${this.items.map(e=>
|
|
561
|
+
${this.items.map(e=>n`
|
|
562
562
|
<li>
|
|
563
563
|
<a
|
|
564
564
|
href=${e.href}
|
|
565
565
|
part="link"
|
|
566
|
-
aria-current=${
|
|
567
|
-
@click=${
|
|
568
|
-
>${
|
|
566
|
+
aria-current=${Dt(e.href,this.current)?"page":l}
|
|
567
|
+
@click=${r=>oe(this,r,e)}
|
|
568
|
+
>${z(e.icon,"22px")}<span class="word">${e.label}</span></a>
|
|
569
569
|
</li>
|
|
570
570
|
`)}
|
|
571
571
|
</ul>
|
|
572
572
|
</nav>
|
|
573
|
-
`}},
|
|
573
|
+
`}},Ce=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,v,h`
|
|
574
574
|
:host {
|
|
575
575
|
display: block;
|
|
576
576
|
min-block-size: 100svh;
|
|
@@ -619,7 +619,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
619
619
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
620
620
|
.skip:focus { transform: none; }
|
|
621
621
|
|
|
622
|
-
@media (max-width: ${
|
|
622
|
+
@media (max-width: ${Ur}) {
|
|
623
623
|
:host { background: ${t.text}; }
|
|
624
624
|
.frame {
|
|
625
625
|
display: flex;
|
|
@@ -661,7 +661,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
661
661
|
inset-block-end: calc(${s(3)} + env(safe-area-inset-bottom));
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
`]}skip(e){e.preventDefault();let
|
|
664
|
+
`]}skip(e){e.preventDefault();let r=this.renderRoot.querySelector("main");r?.focus(),r?.scrollIntoView()}render(){return n`
|
|
665
665
|
<div class="frame" part="frame">
|
|
666
666
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
667
667
|
<div class="brand" part="brand"><slot name="brand"></slot></div>
|
|
@@ -675,7 +675,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
675
675
|
<main id="content" tabindex="-1" part="main"><slot></slot></main>
|
|
676
676
|
<div class="tab-bar" part="tab-bar"><slot name="tab-bar"></slot></div>
|
|
677
677
|
</div>
|
|
678
|
-
`}};customElements.define("impakt-side-nav",
|
|
678
|
+
`}};customElements.define("impakt-side-nav",Me);customElements.define("impakt-tab-bar",Ae);customElements.define("impakt-app-shell",Ce);function H(a){let e=a?.closest?.("[lang]")?.getAttribute("lang"),r=!e&&a?a.getRootNode?.()?.host?.closest?.("[lang]")?.getAttribute("lang")??"":"",i=typeof document<"u"?document.documentElement?.lang??"":"",o=(e||r||i||"").trim();return!o||o.toLowerCase()==="en"?"en-GB":o}var jr=u("font.weight.light","300"),_e=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}}}constructor(){super(),this.label="",this.value="",this.caption="",this.href="",this.tone="plain",this.size="md"}static{this.styles=[...p.styles,v,h`
|
|
679
679
|
:host { display: block; }
|
|
680
680
|
.tile {
|
|
681
681
|
box-sizing: border-box;
|
|
@@ -692,20 +692,20 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
692
692
|
}
|
|
693
693
|
a.tile:hover { background: color-mix(in srgb, ${t.surfaceInset}, ${t.text} 5%); }
|
|
694
694
|
.label { font-size: 11px; font-weight: ${m("medium")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; color: ${t.textMuted}; }
|
|
695
|
-
.value { margin-block-start: auto; font-size: 34px; line-height: 1.1; font-weight: ${
|
|
696
|
-
.caption { font-size: ${
|
|
695
|
+
.value { margin-block-start: auto; font-size: 34px; line-height: 1.1; font-weight: ${jr}; font-variant-numeric: tabular-nums; }
|
|
696
|
+
.caption { font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
697
697
|
:host([size='lg']) .tile { min-block-size: 200px; padding: ${s(6)}; border-radius: ${t.radiusXl}; }
|
|
698
|
-
:host([size='lg']) .label { font-size: ${
|
|
698
|
+
:host([size='lg']) .label { font-size: ${b("sm")}; letter-spacing: normal; text-transform: none; }
|
|
699
699
|
:host([size='lg']) .value { font-size: 64px; line-height: 1; }
|
|
700
700
|
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; }
|
|
701
701
|
:host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }
|
|
702
702
|
:host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }
|
|
703
703
|
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }
|
|
704
|
-
`]}render(){let e=
|
|
704
|
+
`]}render(){let e=n`
|
|
705
705
|
<span class="label" part="label">${this.label}</span>
|
|
706
706
|
<span class="value" part="value">${this.value}</span>
|
|
707
|
-
${this.caption?
|
|
708
|
-
`;return this.href?
|
|
707
|
+
${this.caption?n`<span class="caption" part="caption">${this.caption}</span>`:l}
|
|
708
|
+
`;return this.href?n`<a class="tile" href=${this.href} part="tile">${e}</a>`:n`<div class="tile" part="tile">${e}</div>`}},Re=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
709
|
:host { display: inline-block; flex: none; }
|
|
710
710
|
time {
|
|
711
711
|
position: relative;
|
|
@@ -724,20 +724,20 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
724
724
|
:host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }
|
|
725
725
|
.month { font-size: 10px; font-weight: ${m("medium")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
726
726
|
.day { margin-block-start: ${s(1)}; font-size: 20px; font-weight: ${m("medium")}; font-variant-numeric: tabular-nums; }
|
|
727
|
-
.sr-only { ${
|
|
727
|
+
.sr-only { ${T} }
|
|
728
728
|
@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
|
|
729
|
+
`]}parts(){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.date??"");if(!e)return null;let r=new Date(Date.UTC(Number(e[1]),Number(e[2])-1,Number(e[3]),12));if(Number.isNaN(r.getTime()))return null;let i=H(this),o=d=>new Intl.DateTimeFormat(i,{...d,timeZone:"UTC"}).format(r);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?n`<time datetime=${this.date} part="tile">
|
|
730
730
|
<span class="month" aria-hidden="true">${e.month}</span>
|
|
731
731
|
<span class="day" aria-hidden="true">${e.day}</span>
|
|
732
732
|
<span class="sr-only">${e.full}</span>
|
|
733
|
-
</time>`:
|
|
733
|
+
</time>`:n`${l}`}},Le=class extends p{constructor(){super();this.filled={start:!1,end:!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}}}static{this.styles=[...p.styles,v,h`
|
|
734
734
|
:host { display: block; }
|
|
735
735
|
:host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }
|
|
736
736
|
.row { position: relative; display: flex; align-items: center; gap: ${s(3)}; padding-block: ${s(3)}; }
|
|
737
737
|
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${s(.5)}; }
|
|
738
|
-
.title { font-size: ${
|
|
738
|
+
.title { font-size: ${b("md")}; font-weight: ${m("medium")}; color: ${t.text}; }
|
|
739
739
|
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${m("regular")}; }
|
|
740
|
-
.meta { font-size: ${
|
|
740
|
+
.meta { font-size: ${b("sm")}; color: ${t.textMuted}; }
|
|
741
741
|
a { color: inherit; text-decoration: none; }
|
|
742
742
|
/* The link is stretched over the row, so the row is one target. */
|
|
743
743
|
a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }
|
|
@@ -749,16 +749,16 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
749
749
|
/* Controls at the end stay pressable above the stretched link. */
|
|
750
750
|
.end { position: relative; z-index: 1; }
|
|
751
751
|
.chevron { flex: none; color: ${t.textMuted}; }
|
|
752
|
-
`]}onSlot(
|
|
752
|
+
`]}onSlot(r){let i=r.target,o=i.name;this.filled={...this.filled,[o]:i.assignedNodes({flatten:!0}).some(d=>d.nodeType===Node.ELEMENT_NODE||(d.textContent??"").trim()!=="")},this.requestUpdate()}render(){let r=this.href?n`<a class="title" href=${this.href} part="link">${this.heading}</a>`:n`<span class="title" part="title">${this.heading}</span>`;return n`<div class="row" part="row">
|
|
753
753
|
<div class="start ${this.filled.start?"":"empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
|
|
754
|
-
<div class="text">${
|
|
754
|
+
<div class="text">${r}${this.meta?n`<span class="meta" part="meta">${this.meta}</span>`:l}</div>
|
|
755
755
|
<div class="end ${this.filled.end?"":"empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
|
|
756
|
-
${this.href?
|
|
757
|
-
</div>`}},
|
|
756
|
+
${this.href?n`<span class="chevron" aria-hidden="true">${z("chevron-right","20px")}</span>`:l}
|
|
757
|
+
</div>`}},Ie=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,v,M("button"),h`
|
|
758
758
|
:host { display: inline-block; }
|
|
759
759
|
/* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */
|
|
760
760
|
button {
|
|
761
|
-
${
|
|
761
|
+
${S}
|
|
762
762
|
position: relative;
|
|
763
763
|
display: inline-flex;
|
|
764
764
|
align-items: center;
|
|
@@ -766,7 +766,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
766
766
|
min-block-size: 36px;
|
|
767
767
|
padding: 0 ${s(3.5)};
|
|
768
768
|
font: inherit;
|
|
769
|
-
font-size: ${
|
|
769
|
+
font-size: ${b("sm")};
|
|
770
770
|
font-weight: ${m("medium")};
|
|
771
771
|
color: ${t.text};
|
|
772
772
|
background: ${t.surfaceCard};
|
|
@@ -780,12 +780,12 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
780
780
|
button:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
781
781
|
.count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
782
782
|
button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
|
|
783
|
-
.sr-only { ${
|
|
783
|
+
.sr-only { ${T} }
|
|
784
784
|
@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
|
|
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 n`<button type="button" part="button" aria-pressed=${this.pressed?"true":"false"} ?disabled=${this.disabled} @click=${this.toggle}>
|
|
786
786
|
<span>${this.label}</span>
|
|
787
|
-
${e?this.countLabel?
|
|
788
|
-
</button>`}};customElements.define("impakt-stat-tile",
|
|
787
|
+
${e?this.countLabel?n`<span class="count" aria-hidden="true">${this.count}</span><span class="sr-only">${this.countLabel}</span>`:n`<span class="count">${this.count}</span>`:l}
|
|
788
|
+
</button>`}};customElements.define("impakt-stat-tile",_e);customElements.define("impakt-date-tile",Re);customElements.define("impakt-row",Le);customElements.define("impakt-filter-chip",Ie);var He=class extends f{static{this.properties={...f.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=[...f.styles,M(".row"),h`
|
|
789
789
|
.row {
|
|
790
790
|
display: flex;
|
|
791
791
|
align-items: center;
|
|
@@ -794,13 +794,13 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
794
794
|
cursor: pointer;
|
|
795
795
|
}
|
|
796
796
|
.text {
|
|
797
|
-
font-size: ${
|
|
797
|
+
font-size: ${b("md")};
|
|
798
798
|
}
|
|
799
799
|
:host([hide-label]) .row {
|
|
800
800
|
justify-content: flex-start;
|
|
801
801
|
}
|
|
802
802
|
:host([hide-label]) .text {
|
|
803
|
-
${
|
|
803
|
+
${T}
|
|
804
804
|
}
|
|
805
805
|
.control {
|
|
806
806
|
position: relative;
|
|
@@ -809,7 +809,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
809
809
|
block-size: 28px;
|
|
810
810
|
}
|
|
811
811
|
input {
|
|
812
|
-
${
|
|
812
|
+
${S}
|
|
813
813
|
position: absolute;
|
|
814
814
|
inset: 0;
|
|
815
815
|
inline-size: 100%;
|
|
@@ -863,10 +863,10 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
863
863
|
.knob { background: CanvasText; }
|
|
864
864
|
:host([checked]) .track { background: Highlight; }
|
|
865
865
|
}
|
|
866
|
-
`]}renderControl(){return
|
|
866
|
+
`]}renderControl(){return n`
|
|
867
867
|
<label class="row" part="row" for=${this.controlId}>
|
|
868
868
|
<span class="text">
|
|
869
|
-
${this.label}${this.required?
|
|
869
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
870
870
|
</span>
|
|
871
871
|
<span class="control">
|
|
872
872
|
<input
|
|
@@ -886,7 +886,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
886
886
|
<span class="track" part="track"><span class="knob" part="knob"></span></span>
|
|
887
887
|
</span>
|
|
888
888
|
</label>
|
|
889
|
-
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return
|
|
889
|
+
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return n`${l}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Be=class extends f{static{this.properties={...f.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=[...f.styles,h`
|
|
890
890
|
fieldset {
|
|
891
891
|
border: 0;
|
|
892
892
|
margin: 0;
|
|
@@ -897,7 +897,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
897
897
|
padding: 0;
|
|
898
898
|
}
|
|
899
899
|
:host([hide-label]) legend {
|
|
900
|
-
${
|
|
900
|
+
${T}
|
|
901
901
|
}
|
|
902
902
|
.segments {
|
|
903
903
|
display: inline-flex;
|
|
@@ -917,7 +917,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
917
917
|
display: inline-flex;
|
|
918
918
|
}
|
|
919
919
|
input {
|
|
920
|
-
${
|
|
920
|
+
${S}
|
|
921
921
|
position: absolute;
|
|
922
922
|
inset: 0;
|
|
923
923
|
inline-size: 100%;
|
|
@@ -934,7 +934,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
934
934
|
min-block-size: 32px;
|
|
935
935
|
padding: ${s(1.5)} ${s(4)};
|
|
936
936
|
border-radius: 999px;
|
|
937
|
-
font-size: ${
|
|
937
|
+
font-size: ${b("sm")};
|
|
938
938
|
font-weight: ${m("medium")};
|
|
939
939
|
color: ${t.textMuted};
|
|
940
940
|
pointer-events: none;
|
|
@@ -964,38 +964,38 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
964
964
|
.segments { border: 1px solid CanvasText; }
|
|
965
965
|
input:checked + .face { border: 2px solid Highlight; }
|
|
966
966
|
}
|
|
967
|
-
`]}renderLabel(){return
|
|
968
|
-
${this.label}${this.required?
|
|
969
|
-
</legend>`}renderControl(){return
|
|
967
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
968
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
969
|
+
</legend>`}renderControl(){return n`
|
|
970
970
|
<div class="segments" part="segments">
|
|
971
|
-
${this.options.map((e,
|
|
972
|
-
<label class="segment" part="segment" for=${
|
|
971
|
+
${this.options.map((e,r)=>{let i=this.id_(`seg-${r}`);return n`
|
|
972
|
+
<label class="segment" part="segment" for=${i}>
|
|
973
973
|
<input
|
|
974
974
|
type="radio"
|
|
975
|
-
id=${
|
|
975
|
+
id=${i}
|
|
976
976
|
name=${this.uid}
|
|
977
977
|
value=${e.value}
|
|
978
978
|
.checked=${this.value===e.value}
|
|
979
979
|
?disabled=${this.disabled}
|
|
980
|
-
?required=${this.required&&
|
|
980
|
+
?required=${this.required&&r===0}
|
|
981
981
|
@change=${()=>{this.value=e.value,this.setFormValue(e.value)}}
|
|
982
982
|
/>
|
|
983
983
|
<span class="face">${e.label}</span>
|
|
984
984
|
</label>
|
|
985
985
|
`})}
|
|
986
986
|
</div>
|
|
987
|
-
`}render(){return
|
|
987
|
+
`}render(){return n`
|
|
988
988
|
<fieldset
|
|
989
989
|
part="fieldset"
|
|
990
990
|
aria-describedby=${this.describedBy}
|
|
991
991
|
aria-invalid=${this.error?"true":l}
|
|
992
992
|
>
|
|
993
993
|
${this.renderLabel()}
|
|
994
|
-
${this.description?
|
|
994
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
995
995
|
${this.renderControl()}
|
|
996
996
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
997
997
|
</fieldset>
|
|
998
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",
|
|
998
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",He);customElements.define("impakt-segmented-control",Be);var Ne=class extends f{static{this.properties={...f.properties,options:{type:Array}}}constructor(){super(),this.options=[]}static{this.styles=[...f.styles,h`
|
|
999
999
|
fieldset {
|
|
1000
1000
|
border: 0;
|
|
1001
1001
|
margin: 0;
|
|
@@ -1021,7 +1021,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1021
1021
|
/* The whole row is the target, not the 20px dot — 2.5.8 is a floor and
|
|
1022
1022
|
a comfortable target is the actual goal. */
|
|
1023
1023
|
.option input {
|
|
1024
|
-
${
|
|
1024
|
+
${S}
|
|
1025
1025
|
inline-size: 20px;
|
|
1026
1026
|
block-size: 20px;
|
|
1027
1027
|
margin: 0;
|
|
@@ -1030,47 +1030,47 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1030
1030
|
}
|
|
1031
1031
|
.option-text {
|
|
1032
1032
|
display: block;
|
|
1033
|
-
font-size: ${
|
|
1033
|
+
font-size: ${b("md")};
|
|
1034
1034
|
}
|
|
1035
1035
|
.option-description {
|
|
1036
1036
|
display: block;
|
|
1037
|
-
font-size: ${
|
|
1037
|
+
font-size: ${b("sm")};
|
|
1038
1038
|
color: ${t.textMuted};
|
|
1039
1039
|
margin-block-start: ${s(1)};
|
|
1040
1040
|
}
|
|
1041
1041
|
:host([invalid]) .option {
|
|
1042
1042
|
border-color: ${t.danger};
|
|
1043
1043
|
}
|
|
1044
|
-
`]}renderLabel(){return
|
|
1045
|
-
${this.label}${this.required?
|
|
1046
|
-
</legend>`}renderControl(){return
|
|
1047
|
-
${this.options.map((e,
|
|
1048
|
-
<label class="option" part="option" for=${
|
|
1044
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
1045
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1046
|
+
</legend>`}renderControl(){return n`
|
|
1047
|
+
${this.options.map((e,r)=>{let i=this.id_(`opt-${r}`),o=e.description?this.id_(`opt-${r}-desc`):void 0;return n`
|
|
1048
|
+
<label class="option" part="option" for=${i}>
|
|
1049
1049
|
<input
|
|
1050
1050
|
type="radio"
|
|
1051
|
-
id=${
|
|
1051
|
+
id=${i}
|
|
1052
1052
|
name=${this.uid}
|
|
1053
1053
|
value=${e.value}
|
|
1054
1054
|
.checked=${this.value===e.value}
|
|
1055
1055
|
?disabled=${this.disabled}
|
|
1056
|
-
?required=${this.required&&
|
|
1056
|
+
?required=${this.required&&r===0}
|
|
1057
1057
|
aria-describedby=${o??l}
|
|
1058
1058
|
@change=${()=>this.setFormValue(e.value)}
|
|
1059
1059
|
/>
|
|
1060
1060
|
<span>
|
|
1061
1061
|
<span class="option-text">${e.label}</span>
|
|
1062
|
-
${e.description?
|
|
1062
|
+
${e.description?n`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1063
1063
|
</span>
|
|
1064
1064
|
</label>
|
|
1065
1065
|
`})}
|
|
1066
|
-
`}render(){return
|
|
1066
|
+
`}render(){return n`
|
|
1067
1067
|
<fieldset
|
|
1068
1068
|
part="fieldset"
|
|
1069
1069
|
aria-describedby=${this.describedBy}
|
|
1070
1070
|
aria-invalid=${this.error?"true":l}
|
|
1071
1071
|
>
|
|
1072
1072
|
${this.renderLabel()}
|
|
1073
|
-
${this.description?
|
|
1073
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">
|
|
1074
1074
|
${this.description}
|
|
1075
1075
|
</div>`:l}
|
|
1076
1076
|
${this.renderControl()}
|
|
@@ -1078,7 +1078,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1078
1078
|
${this.error||l}
|
|
1079
1079
|
</div>
|
|
1080
1080
|
</fieldset>
|
|
1081
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",
|
|
1081
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",Ne);var Oe=class a extends p{static{this.properties={tone:{type:String,reflect:!0},heading:{type:String},toneLabel:{type:String,attribute:"tone-label"}}}constructor(){super(),this.tone="info",this.heading="",this.toneLabel=""}static{this.TONE_WORDS={info:"Information",success:"Success",warning:"Warning",danger:"Error"}}static{this.styles=[...p.styles,h`
|
|
1082
1082
|
:host {
|
|
1083
1083
|
display: block;
|
|
1084
1084
|
margin-block-end: ${s(4)};
|
|
@@ -1088,7 +1088,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1088
1088
|
border-radius: ${t.radiusLg};
|
|
1089
1089
|
border-inline-start: 4px solid;
|
|
1090
1090
|
box-shadow: inset 0 0 0 1px ${t.hairline};
|
|
1091
|
-
font-size: ${
|
|
1091
|
+
font-size: ${b("sm")};
|
|
1092
1092
|
line-height: 1.5;
|
|
1093
1093
|
}
|
|
1094
1094
|
.heading {
|
|
@@ -1124,19 +1124,19 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1124
1124
|
border-inline-start-width: 4px;
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
|
-
`]}render(){let e=this.toneLabel||
|
|
1127
|
+
`]}render(){let e=this.toneLabel||w(a.TONE_WORDS[this.tone]);return n`
|
|
1128
1128
|
<div
|
|
1129
1129
|
class="alert"
|
|
1130
1130
|
part="alert"
|
|
1131
1131
|
role=${this.tone==="danger"?"alert":"status"}
|
|
1132
1132
|
aria-label=${this.heading?l:e}
|
|
1133
1133
|
>
|
|
1134
|
-
${this.heading?
|
|
1134
|
+
${this.heading?n`<div class="heading" part="heading">
|
|
1135
1135
|
<span class="tone-word">${e}:</span> ${this.heading}
|
|
1136
1136
|
</div>`:l}
|
|
1137
1137
|
<slot></slot>
|
|
1138
1138
|
</div>
|
|
1139
|
-
`}};customElements.define("impakt-alert",
|
|
1139
|
+
`}};customElements.define("impakt-alert",Oe);var Pe=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,R,h`
|
|
1140
1140
|
:host {
|
|
1141
1141
|
display: flex;
|
|
1142
1142
|
flex-direction: column;
|
|
@@ -1157,7 +1157,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1157
1157
|
:host([gap='md']) { gap: ${s(4)}; }
|
|
1158
1158
|
:host([gap='lg']) { gap: ${s(6)}; }
|
|
1159
1159
|
:host([gap='xl']) { gap: ${s(8)}; }
|
|
1160
|
-
`]}render(){return
|
|
1160
|
+
`]}render(){return n`<slot></slot>`}},De=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,R,h`
|
|
1161
1161
|
:host {
|
|
1162
1162
|
display: flex;
|
|
1163
1163
|
flex-direction: column;
|
|
@@ -1183,24 +1183,24 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1183
1183
|
:host([tone='plain']) .body { padding-inline: 0; }
|
|
1184
1184
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
1185
1185
|
.picture { position: relative; }
|
|
1186
|
-
.tag { position: absolute; inset-block-start: ${s(4)}; inset-inline-start: ${s(4)}; padding: ${s(1.5)} ${s(3)}; font-size: ${
|
|
1186
|
+
.tag { position: absolute; inset-block-start: ${s(4)}; inset-inline-start: ${s(4)}; padding: ${s(1.5)} ${s(3)}; font-size: ${b("sm")}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: 999px; }
|
|
1187
1187
|
@media (forced-colors: active) { :host { border-color: CanvasText; } }
|
|
1188
|
-
`]}render(){return
|
|
1188
|
+
`]}render(){return n`${this.imageSrc?n`<div class="picture"><img src=${this.imageSrc} alt=${this.imageAlt} part="image" />${this.badge?n`<span class="tag">${this.badge}</span>`:l}</div>`:l}<div class="body" part="body"><slot></slot></div>`}},qe=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
1189
|
:host {
|
|
1190
1190
|
display: block;
|
|
1191
1191
|
color: ${t.textHeading};
|
|
1192
1192
|
font-family: ${t.fontHeading};
|
|
1193
1193
|
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']) { ${
|
|
1194
|
+
line-height: ${I("tight")};
|
|
1195
|
+
}
|
|
1196
|
+
:host([size='5xl']) { ${x("5xl")} letter-spacing: ${t.trackingTight}; }
|
|
1197
|
+
:host([size='4xl']) { ${x("4xl")} letter-spacing: ${t.trackingTight}; }
|
|
1198
|
+
:host([size='3xl']) { ${x("3xl")} letter-spacing: ${t.trackingTight}; }
|
|
1199
|
+
:host([size='2xl']) { ${x("2xl")} letter-spacing: ${t.trackingTight}; }
|
|
1200
|
+
:host([size='xl']) { ${x("xl")} }
|
|
1201
|
+
:host([size='lg']) { ${x("lg")} }
|
|
1202
|
+
:host([size='md']) { ${x("md")} }
|
|
1203
|
+
:host([size='sm']) { ${x("sm")} }
|
|
1204
1204
|
.h { text-wrap: balance; }
|
|
1205
1205
|
.h {
|
|
1206
1206
|
margin: 0;
|
|
@@ -1209,43 +1209,43 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1209
1209
|
}
|
|
1210
1210
|
:host([align='center']) { text-align: center; }
|
|
1211
1211
|
/* Only the words go: an eyebrow over a heading drawn as a picture still shows. */
|
|
1212
|
-
:host([screen-reader-only]) .words { ${
|
|
1213
|
-
:host([screen-reader-only]:not([eyebrow])) { ${
|
|
1212
|
+
:host([screen-reader-only]) .words { ${T} }
|
|
1213
|
+
:host([screen-reader-only]:not([eyebrow])) { ${T} }
|
|
1214
1214
|
.eyebrow {
|
|
1215
1215
|
display: block;
|
|
1216
1216
|
margin-block-end: ${s(2)};
|
|
1217
1217
|
color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand}));
|
|
1218
1218
|
font-family: var(--impakt-font-family-eyebrow, ${t.fontBody});
|
|
1219
|
-
font-size: var(--impakt-font-size-eyebrow, ${
|
|
1219
|
+
font-size: var(--impakt-font-size-eyebrow, ${b("sm")});
|
|
1220
1220
|
font-weight: var(--impakt-font-weight-eyebrow, ${m("semibold")});
|
|
1221
1221
|
letter-spacing: 0.06em;
|
|
1222
1222
|
text-transform: uppercase;
|
|
1223
1223
|
}
|
|
1224
|
-
`]}render(){return
|
|
1225
|
-
${this.eyebrow?
|
|
1226
|
-
</div>`}},
|
|
1224
|
+
`]}render(){return n`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
1225
|
+
${this.eyebrow?n`<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>
|
|
1226
|
+
</div>`}},Fe=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
1227
|
:host {
|
|
1228
1228
|
display: block;
|
|
1229
1229
|
/* 1.4.8 asks for 1.5 within a paragraph, and it is the default here
|
|
1230
1230
|
rather than an option, because body text is what it is about. */
|
|
1231
|
-
line-height: ${
|
|
1231
|
+
line-height: ${I("normal")};
|
|
1232
1232
|
/* 1.4.12 Text Spacing: a user stylesheet must be able to widen this
|
|
1233
1233
|
without clipping, which a max-width in ch units survives and a
|
|
1234
1234
|
fixed pixel height does not. */
|
|
1235
1235
|
max-inline-size: 70ch;
|
|
1236
1236
|
}
|
|
1237
|
-
:host([size='sm']) { ${
|
|
1238
|
-
:host([size='md']) { ${
|
|
1239
|
-
:host([size='lg']) { ${
|
|
1240
|
-
:host([size='xl']) { ${
|
|
1237
|
+
:host([size='sm']) { ${x("sm")} }
|
|
1238
|
+
:host([size='md']) { ${x("md")} }
|
|
1239
|
+
:host([size='lg']) { ${x("lg")} }
|
|
1240
|
+
:host([size='xl']) { ${x("xl")} }
|
|
1241
1241
|
p { text-wrap: pretty; }
|
|
1242
1242
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
1243
1243
|
:host([align='center']) { text-align: center; margin-inline: auto; }
|
|
1244
|
-
:host([look='code']) { font-family: ${t.fontMono}; ${
|
|
1244
|
+
:host([look='code']) { font-family: ${t.fontMono}; ${x("sm")} padding: ${s(2)} ${s(3)}; border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 6%, transparent); max-inline-size: none; }
|
|
1245
1245
|
p {
|
|
1246
1246
|
margin: 0;
|
|
1247
1247
|
}
|
|
1248
|
-
`]}render(){return
|
|
1248
|
+
`]}render(){return n`<p part="text"><slot></slot></p>`}};customElements.define("impakt-stack",Pe);customElements.define("impakt-card",De);customElements.define("impakt-heading",qe);customElements.define("impakt-text",Fe);var Ue=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,v,h`
|
|
1249
1249
|
:host {
|
|
1250
1250
|
display: inline;
|
|
1251
1251
|
}
|
|
@@ -1263,18 +1263,18 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1263
1263
|
:host([variant='standalone']) a:hover .icon { transform: translateX(2px); }
|
|
1264
1264
|
.icon { flex: none; transition: transform 120ms ease-in-out; }
|
|
1265
1265
|
.sr-only {
|
|
1266
|
-
${
|
|
1266
|
+
${T}
|
|
1267
1267
|
}
|
|
1268
|
-
`]}render(){return
|
|
1268
|
+
`]}render(){return n`
|
|
1269
1269
|
<a
|
|
1270
1270
|
part="link"
|
|
1271
1271
|
href=${this.href||l}
|
|
1272
1272
|
target=${this.external?"_blank":l}
|
|
1273
1273
|
rel=${this.external?"noopener noreferrer":l}
|
|
1274
1274
|
>
|
|
1275
|
-
<slot></slot>${
|
|
1275
|
+
<slot></slot>${z(this.icon!=="none"?this.icon:this.variant==="standalone"?this.external?"external":"arrow-right":void 0,"1em")}${this.external?n`<span class="sr-only"> (${this.externalText})</span>`:l}
|
|
1276
1276
|
</a>
|
|
1277
|
-
`}};customElements.define("impakt-link",
|
|
1277
|
+
`}};customElements.define("impakt-link",Ue);var je=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
1278
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1279
1279
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1280
1280
|
:host {
|
|
@@ -1294,7 +1294,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1294
1294
|
:host([rounded='sm']) img { border-radius: ${t.radius}; }
|
|
1295
1295
|
:host([rounded='lg']) img { border-radius: ${t.radiusLg}; }
|
|
1296
1296
|
:host([rounded='full']) img { border-radius: 50%; }
|
|
1297
|
-
`]}render(){return
|
|
1297
|
+
`]}render(){return n`
|
|
1298
1298
|
<img
|
|
1299
1299
|
part="image"
|
|
1300
1300
|
src=${this.src}
|
|
@@ -1305,7 +1305,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1305
1305
|
loading=${this.loading}
|
|
1306
1306
|
style="object-position: ${this.focalX*100}% ${this.focalY*100}%"
|
|
1307
1307
|
/>
|
|
1308
|
-
`}},
|
|
1308
|
+
`}},We=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
1309
|
:host {
|
|
1310
1310
|
display: inline-block;
|
|
1311
1311
|
}
|
|
@@ -1313,7 +1313,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1313
1313
|
display: block;
|
|
1314
1314
|
inline-size: auto;
|
|
1315
1315
|
}
|
|
1316
|
-
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return
|
|
1316
|
+
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return n`<img part="logo" src=${e} alt=${this.alt} style="height: ${this.height}px" />`}},Ve=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
1317
|
:host {
|
|
1318
1318
|
display: block;
|
|
1319
1319
|
}
|
|
@@ -1329,11 +1329,11 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1329
1329
|
.meta {
|
|
1330
1330
|
color: ${t.textMuted};
|
|
1331
1331
|
}
|
|
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
|
|
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 n`
|
|
1333
1333
|
<a part="link" href=${this.href||l} download>
|
|
1334
|
-
<span>${this.label}</span>${e?
|
|
1334
|
+
<span>${this.label}</span>${e?n`<span class="meta">(${e})</span>`:l}
|
|
1335
1335
|
</a>
|
|
1336
|
-
`}};customElements.define("impakt-image",
|
|
1336
|
+
`}};customElements.define("impakt-image",je);customElements.define("impakt-logo",We);customElements.define("impakt-document-link",Ve);var Ke=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
1337
|
:host {
|
|
1338
1338
|
display: inline-flex;
|
|
1339
1339
|
align-items: baseline;
|
|
@@ -1347,18 +1347,18 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1347
1347
|
which otherwise makes a recalculating price jitter. */
|
|
1348
1348
|
font-variant-numeric: tabular-nums;
|
|
1349
1349
|
}
|
|
1350
|
-
:host([size='md']) .amount { font-size: ${
|
|
1351
|
-
:host([size='lg']) .amount { font-size: ${
|
|
1352
|
-
:host([size='xl']) .amount { font-size: ${
|
|
1350
|
+
:host([size='md']) .amount { font-size: ${b("lg")}; }
|
|
1351
|
+
:host([size='lg']) .amount { font-size: ${b("2xl")}; }
|
|
1352
|
+
:host([size='xl']) .amount { font-size: ${b("3xl")}; }
|
|
1353
1353
|
.period {
|
|
1354
|
-
font-size: ${
|
|
1354
|
+
font-size: ${b("sm")};
|
|
1355
1355
|
color: ${t.textMuted};
|
|
1356
1356
|
}
|
|
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?
|
|
1357
|
+
`]}get formatted(){if(this.amount===void 0||Number.isNaN(this.amount))return this.pending;try{return new Intl.NumberFormat(this.locale||H(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 n`
|
|
1358
|
+
${this.prefix?n`<span class="period" part="prefix">${this.prefix}</span>`:l}
|
|
1359
1359
|
<span class="amount" part="amount">${this.formatted}</span>
|
|
1360
|
-
${this.period?
|
|
1361
|
-
`}};customElements.define("impakt-price",
|
|
1360
|
+
${this.period?n`<span class="period" part="period">${this.period}</span>`:l}
|
|
1361
|
+
`}};customElements.define("impakt-price",Ke);var Xe=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,v,M("dd a"),h`
|
|
1362
1362
|
:host {
|
|
1363
1363
|
display: block;
|
|
1364
1364
|
}
|
|
@@ -1381,7 +1381,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1381
1381
|
}
|
|
1382
1382
|
dt {
|
|
1383
1383
|
font-weight: ${m("semibold")};
|
|
1384
|
-
font-size: ${
|
|
1384
|
+
font-size: ${b("sm")};
|
|
1385
1385
|
}
|
|
1386
1386
|
dd {
|
|
1387
1387
|
margin: 0;
|
|
@@ -1423,21 +1423,21 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1423
1423
|
padding-block-start: 0;
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
`]}render(){return
|
|
1426
|
+
`]}render(){return n`
|
|
1427
1427
|
<dl part="list">
|
|
1428
|
-
${this.rows.map(e=>
|
|
1428
|
+
${this.rows.map(e=>n`
|
|
1429
1429
|
<div class="row" part="row">
|
|
1430
1430
|
<dt part="key">${e.key}</dt>
|
|
1431
1431
|
<dd part="value">
|
|
1432
1432
|
<span>${e.value}</span>
|
|
1433
|
-
${e.changeHref?
|
|
1433
|
+
${e.changeHref?n`<a href=${e.changeHref} part="action"
|
|
1434
1434
|
>${this.changeText}<span class="sr-only"> ${e.key}</span></a
|
|
1435
1435
|
>`:l}
|
|
1436
1436
|
</dd>
|
|
1437
1437
|
</div>
|
|
1438
1438
|
`)}
|
|
1439
1439
|
</dl>
|
|
1440
|
-
`}};customElements.define("impakt-summary-list",
|
|
1440
|
+
`}};customElements.define("impakt-summary-list",Xe);var Ge=class extends p{static{this.properties={caption:{type:String},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"}}}constructor(){super(),this.caption="",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}"}static{this.styles=[...p.styles,v,M(".sort, .pick label"),h`
|
|
1441
1441
|
:host {
|
|
1442
1442
|
display: block;
|
|
1443
1443
|
}
|
|
@@ -1450,7 +1450,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1450
1450
|
table {
|
|
1451
1451
|
inline-size: 100%;
|
|
1452
1452
|
border-collapse: collapse;
|
|
1453
|
-
font-size: ${
|
|
1453
|
+
font-size: ${b("md")};
|
|
1454
1454
|
}
|
|
1455
1455
|
caption {
|
|
1456
1456
|
text-align: start;
|
|
@@ -1544,7 +1544,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1544
1544
|
display: none;
|
|
1545
1545
|
}
|
|
1546
1546
|
.visually-hidden {
|
|
1547
|
-
${
|
|
1547
|
+
${T}
|
|
1548
1548
|
}
|
|
1549
1549
|
/* Stacked: each row a card, each value under its column's name. */
|
|
1550
1550
|
@container (max-width: 36rem) {
|
|
@@ -1613,7 +1613,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1613
1613
|
}
|
|
1614
1614
|
.label {
|
|
1615
1615
|
display: block;
|
|
1616
|
-
font-size: ${
|
|
1616
|
+
font-size: ${b("sm")};
|
|
1617
1617
|
font-weight: ${m("semibold")};
|
|
1618
1618
|
color: ${t.textMuted};
|
|
1619
1619
|
}
|
|
@@ -1622,31 +1622,31 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1622
1622
|
border: 0;
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
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>`:
|
|
1625
|
+
`]}keyOf(e,r){let i=e?.[this.rowKey];return i==null||i===""?String(r):String(i)}ordered(){let e=(this.rows??[]).map((c,$)=>({row:c,key:this.keyOf(c,$)})),r=(this.columns??[]).find(c=>c.key===this.sortKey&&c.sortable);if(!r||this.manualSort)return e;let i=this.sortDirection==="descending"?-1:1,o=H(this),d=c=>Number(String(c??"").replace(/[^\d.-]/g,""))||0;return e.sort((c,$)=>{let g=c.row[r.key]??"",k=$.row[r.key]??"";return(r.numeric?d(g)-d(k):String(g).localeCompare(String(k),o,{numeric:!0,sensitivity:"base"}))*i})}sortBy(e){let r=this.sortKey===e&&this.sortDirection==="ascending"?"descending":"ascending";this.sortKey=e,this.sortDirection=r,this.dispatchEvent(new CustomEvent("impakt-sort",{detail:{key:e,direction:r},bubbles:!0,composed:!0}))}choose(e,r){let i=new Set(this.selected??[]);for(let o of e)r?i.add(o):i.delete(o);this.selected=[...i],this.dispatchEvent(new CustomEvent("impakt-selection",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}heading(e){let r=e.sortable&&e.key===this.sortKey,i=[e.numeric?"numeric":"",e.sortable?"sortable":""].filter(Boolean).join(" ");return e.sortable?n`<th scope="col" role="columnheader" class=${i} aria-sort=${r?this.sortDirection:l}>
|
|
1626
|
+
<button class="sort" type="button" part="sort" @click=${()=>this.sortBy(e.key)}>${e.label}<span class="arrow" aria-hidden="true">${z("chevron-down","16px")}</span></button>
|
|
1627
|
+
</th>`:n`<th scope="col" role="columnheader" class=${i}>${e.label}</th>`}render(){let e=this.columns??[],r=this.ordered(),i=new Set(this.selected??[]),o=r.length>0&&r.every(c=>i.has(c.key)),d=!o&&r.some(c=>i.has(c.key));return n`
|
|
1628
1628
|
<div class="scroller" part="scroller" tabindex="0" role="region" aria-label=${this.caption||l}>
|
|
1629
1629
|
<table part="table" role="table">
|
|
1630
|
-
${this.caption?
|
|
1630
|
+
${this.caption?n`<caption part="caption">${this.caption}</caption>`:l}
|
|
1631
1631
|
<thead role="rowgroup">
|
|
1632
1632
|
<tr role="row">
|
|
1633
|
-
${this.selectable?
|
|
1634
|
-
@change=${
|
|
1635
|
-
${e.map(
|
|
1633
|
+
${this.selectable?n`<th scope="col" role="columnheader" class="pick"><label><input type="checkbox" aria-label=${this.selectAllText} .checked=${o} .indeterminate=${d} ?disabled=${!r.length}
|
|
1634
|
+
@change=${c=>this.choose(r.map($=>$.key),c.target.checked)} /></label></th>`:l}
|
|
1635
|
+
${e.map(c=>this.heading(c))}
|
|
1636
1636
|
</tr>
|
|
1637
1637
|
</thead>
|
|
1638
1638
|
<tbody role="rowgroup">
|
|
1639
|
-
${
|
|
1640
|
-
<tr role="row" class=${
|
|
1641
|
-
${this.selectable?
|
|
1642
|
-
@change=${
|
|
1643
|
-
${e.map((
|
|
1639
|
+
${r.length?r.map(({row:c,key:$},g)=>n`
|
|
1640
|
+
<tr role="row" class=${i.has($)?"chosen":""} part="row">
|
|
1641
|
+
${this.selectable?n`<td role="cell" class="pick"><label><input type="checkbox" aria-label=${this.selectRowText.replace("{row}",String(c[e[0]?.key??""]??$))} .checked=${i.has($)}
|
|
1642
|
+
@change=${k=>this.choose([$],k.target.checked)} /></label></td>`:l}
|
|
1643
|
+
${e.map((k,A)=>{let E=n`<span class="label" aria-hidden="true">${k.label}</span><span class="value"><slot name=${`cell:${$}:${k.key}`}>${c[k.key]??""}</slot></span>`;return A===0?n`<th scope="row" role="rowheader" id=${`${this.uid}-r${g}`}>${E}</th>`:n`<td role="cell" class=${k.numeric?"numeric":""}>${E}</td>`})}
|
|
1644
1644
|
</tr>
|
|
1645
|
-
`):
|
|
1645
|
+
`):n`<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
1646
|
</tbody>
|
|
1647
1647
|
</table>
|
|
1648
1648
|
</div>
|
|
1649
|
-
`}};customElements.define("impakt-table",
|
|
1649
|
+
`}};customElements.define("impakt-table",Ge);var Ye=typeof HTMLElement>"u"||!("children"in HTMLElement.prototype);var Ze=class extends p{static{this.properties={items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},open:{type:Array},multiple:{type:Boolean},enhanced:{state:!0}}}constructor(){super(),this.items=[],this.headingLevel=3,this.open=[],this.multiple=!0,this.enhanced=!1}connectedCallback(){!Ye&&!this.shadowRoot&&(this.enhanced=!0),super.connectedCallback()}firstUpdated(){this.enhanced=!0}static{this.styles=[...p.styles,v,h`
|
|
1650
1650
|
:host {
|
|
1651
1651
|
display: block;
|
|
1652
1652
|
}
|
|
@@ -1654,7 +1654,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1654
1654
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1655
1655
|
}
|
|
1656
1656
|
button {
|
|
1657
|
-
${
|
|
1657
|
+
${S}
|
|
1658
1658
|
display: flex;
|
|
1659
1659
|
align-items: center;
|
|
1660
1660
|
justify-content: space-between;
|
|
@@ -1664,7 +1664,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1664
1664
|
background: none;
|
|
1665
1665
|
border: 0;
|
|
1666
1666
|
font: inherit;
|
|
1667
|
-
font-size: ${
|
|
1667
|
+
font-size: ${b("md")};
|
|
1668
1668
|
font-weight: ${m("semibold")};
|
|
1669
1669
|
color: ${t.text};
|
|
1670
1670
|
text-align: start;
|
|
@@ -1680,20 +1680,31 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1680
1680
|
button[aria-expanded='true'] .marker {
|
|
1681
1681
|
transform: rotate(90deg);
|
|
1682
1682
|
}
|
|
1683
|
+
/* With no script the element is never defined: the buttons cannot work, so they do not look as if they do. */
|
|
1684
|
+
:host(:not(:defined)) button {
|
|
1685
|
+
cursor: default;
|
|
1686
|
+
pointer-events: none;
|
|
1687
|
+
}
|
|
1688
|
+
:host(:not(:defined)) button:hover {
|
|
1689
|
+
color: ${t.text};
|
|
1690
|
+
}
|
|
1691
|
+
:host(:not(:defined)) .marker {
|
|
1692
|
+
display: none;
|
|
1693
|
+
}
|
|
1683
1694
|
.panel {
|
|
1684
1695
|
padding-block-end: ${s(4)};
|
|
1685
|
-
font-size: ${
|
|
1696
|
+
font-size: ${b("md")};
|
|
1686
1697
|
}
|
|
1687
|
-
`]}toggle(e){this.open.includes(e)?this.open=this.open.filter(
|
|
1688
|
-
${this.items.map(e=>{let
|
|
1698
|
+
`]}toggle(e){this.open.includes(e)?this.open=this.open.filter(i=>i!==e):this.open=this.multiple?[...this.open,e]:[e]}render(){return n`
|
|
1699
|
+
${this.items.map(e=>{let r=!this.enhanced||this.open.includes(e.id),i=this.id_(`panel-${e.id}`),o=this.id_(`button-${e.id}`);return n`
|
|
1689
1700
|
<div class="item" part="item">
|
|
1690
1701
|
<div role="heading" aria-level=${this.headingLevel}>
|
|
1691
1702
|
<button
|
|
1692
1703
|
id=${o}
|
|
1693
1704
|
part="header"
|
|
1694
1705
|
type="button"
|
|
1695
|
-
aria-expanded=${
|
|
1696
|
-
aria-controls=${
|
|
1706
|
+
aria-expanded=${r?"true":"false"}
|
|
1707
|
+
aria-controls=${i}
|
|
1697
1708
|
@click=${()=>this.toggle(e.id)}
|
|
1698
1709
|
>
|
|
1699
1710
|
<span>${e.heading}</span>
|
|
@@ -1701,19 +1712,18 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1701
1712
|
</button>
|
|
1702
1713
|
</div>
|
|
1703
1714
|
<div
|
|
1704
|
-
id=${
|
|
1715
|
+
id=${i}
|
|
1705
1716
|
class="panel"
|
|
1706
1717
|
part="panel"
|
|
1707
1718
|
role="region"
|
|
1708
1719
|
aria-labelledby=${o}
|
|
1709
|
-
?hidden=${!
|
|
1720
|
+
?hidden=${!r}
|
|
1710
1721
|
>
|
|
1711
1722
|
<slot name=${`panel-${e.id}`}>${e.body}</slot>
|
|
1712
1723
|
</div>
|
|
1713
1724
|
</div>
|
|
1714
1725
|
`})}
|
|
1715
|
-
|
|
1716
|
-
`}};customElements.define("impakt-accordion",De);var Fe=class extends c{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}}}constructor(){super(),this.steps=[],this.current="",this.label="Progress",this.look="steps",this.hideLabels=!1}static{this.styles=[...c.styles,p`
|
|
1726
|
+
`}};customElements.define("impakt-accordion",Ze);var Je=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}}}constructor(){super(),this.steps=[],this.current="",this.label="Progress",this.look="steps",this.hideLabels=!1}static{this.styles=[...p.styles,h`
|
|
1717
1727
|
:host {
|
|
1718
1728
|
display: block;
|
|
1719
1729
|
margin-block-end: ${s(5)};
|
|
@@ -1727,7 +1737,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1727
1737
|
}
|
|
1728
1738
|
li {
|
|
1729
1739
|
flex: 1;
|
|
1730
|
-
font-size: ${
|
|
1740
|
+
font-size: ${b("sm")};
|
|
1731
1741
|
color: ${t.textMuted};
|
|
1732
1742
|
padding-block-start: ${s(2)};
|
|
1733
1743
|
border-block-start: 4px solid ${t.border};
|
|
@@ -1742,7 +1752,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1742
1752
|
border-block-start-color: ${t.brand};
|
|
1743
1753
|
}
|
|
1744
1754
|
.sr-only {
|
|
1745
|
-
${
|
|
1755
|
+
${T}
|
|
1746
1756
|
}
|
|
1747
1757
|
:host([look='bars']) {
|
|
1748
1758
|
margin-block-end: 0;
|
|
@@ -1780,30 +1790,30 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1780
1790
|
:host([look='bars']) li[data-state='done']::before, :host([look='bars']) li[data-state='current']::before { background: CanvasText; }
|
|
1781
1791
|
}
|
|
1782
1792
|
:host([hide-labels]) .name {
|
|
1783
|
-
${
|
|
1793
|
+
${T}
|
|
1784
1794
|
}
|
|
1785
1795
|
/* Below 30rem the labels stop fitting; the position in words is the part
|
|
1786
1796
|
that has to survive, so the list collapses to bars and the current
|
|
1787
1797
|
step's name. */
|
|
1788
1798
|
@media (max-width: 30rem) {
|
|
1789
1799
|
li:not([data-state='current']) .name {
|
|
1790
|
-
${
|
|
1800
|
+
${T}
|
|
1791
1801
|
}
|
|
1792
1802
|
}
|
|
1793
|
-
`]}render(){let e=this.steps.findIndex(
|
|
1803
|
+
`]}render(){let e=this.steps.findIndex(r=>r.id===this.current);return n`
|
|
1794
1804
|
<nav part="nav" aria-label=${this.label}>
|
|
1795
1805
|
<ol part="list">
|
|
1796
|
-
${this.steps.map((i
|
|
1806
|
+
${this.steps.map((r,i)=>{let o=i<e?"done":i===e?"current":"todo";return n`
|
|
1797
1807
|
<li part="step step-${o}" data-state=${o} aria-current=${o==="current"?"step":l}>
|
|
1798
|
-
${o==="current"?
|
|
1799
|
-
<span class="name" part="step-label">${
|
|
1808
|
+
${o==="current"?n`<span class="sr-only">${w("Step {step} of {steps}:",{step:i+1,steps:this.steps.length})} </span>`:l}
|
|
1809
|
+
<span class="name" part="step-label">${r.label}</span>
|
|
1800
1810
|
</li>
|
|
1801
1811
|
`})}
|
|
1802
1812
|
</ol>
|
|
1803
1813
|
</nav>
|
|
1804
|
-
`}};customElements.define("impakt-progress",
|
|
1814
|
+
`}};customElements.define("impakt-progress",Je);var ne={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)"},le=["success","info","warning","accent","danger","brand"],qt=(a,e)=>typeof a=="number"?`var(--impakt-color-chart-${a}, ${ne[le[(a-1)%le.length]]})`:a&&a in ne?ne[a]:`var(--impakt-color-chart-${e%5+1}, ${ne[le[e%le.length]]})`;var Wr=t.fontMono,Qe=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},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.label="",this.meta="",this.icon="none",this.tone="success",this.look="filled",this.hideOn="never"}static{this.styles=[...p.styles,$r,h`
|
|
1805
1815
|
:host { display: inline-flex; flex: none; }
|
|
1806
|
-
span.chip { display: inline-flex; align-items: center; gap: ${s(1.5)}; padding: 3px ${s(2.5)}; border-radius: 999px; font-family: ${
|
|
1816
|
+
span.chip { display: inline-flex; align-items: center; gap: ${s(1.5)}; padding: 3px ${s(2.5)}; border-radius: 999px; font-family: ${Wr}; font-size: ${b("xs")}; line-height: 1.2; white-space: nowrap; }
|
|
1807
1817
|
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
1808
1818
|
:host([look='outlined']) span.chip { border: ${t.borderThin} solid ${t.border}; background: ${t.surfaceCard}; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
1809
1819
|
:host([look='plain']) span.chip { padding: 0; }
|
|
@@ -1811,9 +1821,9 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1811
1821
|
svg { inline-size: 12px; block-size: 12px; }
|
|
1812
1822
|
.meta { opacity: 0.72; text-transform: none; }
|
|
1813
1823
|
:host([look='plain']) .label { opacity: 0.72; }
|
|
1814
|
-
`]}render(){let e=this.icon==="dot"?
|
|
1824
|
+
`]}render(){let e=this.icon==="dot"?n`<span class="dot" aria-hidden="true"></span>`:this.icon==="branch"?n`<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 n`<span class="chip" part="chip" style=${`--tone:${qt(this.tone,0)}`}>${e}<span class="label">${this.label}</span>${this.meta?n` <span class="meta">${this.meta}</span>`:l}</span>`}};customElements.define("impakt-chip",Qe);var et=class extends p{static{this.properties={tone:{type:String,reflect:!0},icon:{type:String}}}constructor(){super(),this.tone="neutral",this.icon="none"}static{this.styles=[...p.styles,h`
|
|
1815
1825
|
:host { display: inline-flex; }
|
|
1816
|
-
span { display: inline-flex; align-items: center; gap: ${s(1)}; padding: ${s(.5)} ${s(2)}; border-radius: ${t.radius}; ${
|
|
1826
|
+
span { display: inline-flex; align-items: center; gap: ${s(1)}; padding: ${s(.5)} ${s(2)}; border-radius: ${t.radius}; ${x("sm")} font-weight: ${m("medium")}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
1817
1827
|
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
1818
1828
|
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
1819
1829
|
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
@@ -1822,12 +1832,12 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1822
1832
|
:host([tone='inverse']) span { background: ${t.text}; color: ${t.surfaceCard}; box-shadow: none; }
|
|
1823
1833
|
:host([tone='solid']) span { background: ${t.brand}; color: ${t.onBrand}; box-shadow: none; }
|
|
1824
1834
|
@media (forced-colors: active) { span { border-color: CanvasText; } }
|
|
1825
|
-
`]}render(){return
|
|
1835
|
+
`]}render(){return n`<span part="badge">${z(this.icon,"1em")}<slot></slot></span>`}};customElements.define("impakt-badge",et);var tt=class extends f{constructor(){super();this.filled=!1;this.filledText="";this.width="full",this.rows=4,this.maxlength=void 0,this.fillFrom="none"}static{this.properties={...f.properties,width:{type:String,reflect:!0},rows:{type:Number},maxlength:{type:Number},fillFrom:{type:String,attribute:"fill-from"}}}static{this.styles=[...f.styles,B,h`
|
|
1826
1836
|
textarea {
|
|
1827
1837
|
inline-size: min(100%, var(--impakt-field-width));
|
|
1828
1838
|
padding: ${s(2.5)} ${s(3)};
|
|
1829
1839
|
font-family: inherit;
|
|
1830
|
-
font-size: ${
|
|
1840
|
+
font-size: ${b("md")};
|
|
1831
1841
|
color: ${t.text};
|
|
1832
1842
|
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
1833
1843
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -1849,7 +1859,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1849
1859
|
border-color: ${t.danger};
|
|
1850
1860
|
border-width: ${t.borderThick};
|
|
1851
1861
|
}
|
|
1852
|
-
`]}willUpdate(
|
|
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`
|
|
1853
1863
|
<textarea
|
|
1854
1864
|
id=${this.controlId}
|
|
1855
1865
|
part="textarea"
|
|
@@ -1861,9 +1871,10 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1861
1871
|
?required=${this.required}
|
|
1862
1872
|
aria-describedby=${this.describedBy}
|
|
1863
1873
|
aria-invalid=${this.error?"true":l}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1874
|
+
.value=${this.value}
|
|
1875
|
+
@input=${r=>{this.filledText="",this.setFormValue(r.target.value)}}
|
|
1876
|
+
></textarea>
|
|
1877
|
+
`}updated(r){r.has("error")&&this.toggleAttribute("invalid",!!this.error),this.fill()}};customElements.define("impakt-textarea",tt);var rt=class extends f{static{this.properties={...f.properties,options:{type:Array},values:{type:Array}}}constructor(){super(),this.options=[],this.values=[]}static{this.styles=[...f.styles,h`
|
|
1867
1878
|
fieldset {
|
|
1868
1879
|
border: 0;
|
|
1869
1880
|
margin: 0;
|
|
@@ -1887,7 +1898,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1887
1898
|
background: ${t.surfaceSubtle};
|
|
1888
1899
|
}
|
|
1889
1900
|
.option input {
|
|
1890
|
-
${
|
|
1901
|
+
${S}
|
|
1891
1902
|
inline-size: 20px;
|
|
1892
1903
|
block-size: 20px;
|
|
1893
1904
|
margin: 0;
|
|
@@ -1896,25 +1907,25 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1896
1907
|
}
|
|
1897
1908
|
.option-text {
|
|
1898
1909
|
display: block;
|
|
1899
|
-
font-size: ${
|
|
1910
|
+
font-size: ${b("md")};
|
|
1900
1911
|
}
|
|
1901
1912
|
.option-description {
|
|
1902
1913
|
display: block;
|
|
1903
|
-
font-size: ${
|
|
1914
|
+
font-size: ${b("sm")};
|
|
1904
1915
|
color: ${t.textMuted};
|
|
1905
1916
|
margin-block-start: ${s(1)};
|
|
1906
1917
|
}
|
|
1907
1918
|
:host([invalid]) .option {
|
|
1908
1919
|
border-color: ${t.danger};
|
|
1909
1920
|
}
|
|
1910
|
-
`]}renderLabel(){return
|
|
1911
|
-
${this.label}${this.required?
|
|
1912
|
-
</legend>`}onToggle(e,
|
|
1913
|
-
${this.options.map((e,
|
|
1914
|
-
<label class="option" part="option" for=${
|
|
1921
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
1922
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1923
|
+
</legend>`}onToggle(e,r){this.values=r?[...this.values,e]:this.values.filter(i=>i!==e),this.setFormValue(this.options.filter(i=>this.values.includes(i.value)).map(i=>i.value).join(","))}renderControl(){return n`
|
|
1924
|
+
${this.options.map((e,r)=>{let i=this.id_(`opt-${r}`),o=e.description?this.id_(`opt-${r}-desc`):void 0;return n`
|
|
1925
|
+
<label class="option" part="option" for=${i}>
|
|
1915
1926
|
<input
|
|
1916
1927
|
type="checkbox"
|
|
1917
|
-
id=${
|
|
1928
|
+
id=${i}
|
|
1918
1929
|
value=${e.value}
|
|
1919
1930
|
.checked=${this.values.includes(e.value)}
|
|
1920
1931
|
?disabled=${this.disabled}
|
|
@@ -1923,18 +1934,18 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1923
1934
|
/>
|
|
1924
1935
|
<span>
|
|
1925
1936
|
<span class="option-text">${e.label}</span>
|
|
1926
|
-
${e.description?
|
|
1937
|
+
${e.description?n`<span class="option-description" id=${o}>${e.description}</span>`:l}
|
|
1927
1938
|
</span>
|
|
1928
1939
|
</label>
|
|
1929
1940
|
`})}
|
|
1930
|
-
`}render(){return
|
|
1941
|
+
`}render(){return n`
|
|
1931
1942
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
1932
1943
|
${this.renderLabel()}
|
|
1933
|
-
${this.description?
|
|
1944
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
1934
1945
|
${this.renderControl()}
|
|
1935
1946
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
1936
1947
|
</fieldset>
|
|
1937
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",
|
|
1948
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",rt);var it=class extends f{static{this.properties={...f.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=[...f.styles,h`
|
|
1938
1949
|
fieldset {
|
|
1939
1950
|
border: 0;
|
|
1940
1951
|
margin: 0;
|
|
@@ -1954,14 +1965,14 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1954
1965
|
gap: ${s(1)};
|
|
1955
1966
|
}
|
|
1956
1967
|
.part label {
|
|
1957
|
-
font-size: ${
|
|
1968
|
+
font-size: ${b("sm")};
|
|
1958
1969
|
color: ${t.textMuted};
|
|
1959
1970
|
}
|
|
1960
1971
|
input {
|
|
1961
1972
|
min-block-size: 44px;
|
|
1962
1973
|
padding: ${s(3)};
|
|
1963
1974
|
font-family: inherit;
|
|
1964
|
-
font-size: ${
|
|
1975
|
+
font-size: ${b("md")};
|
|
1965
1976
|
color: ${t.text};
|
|
1966
1977
|
background: ${t.surfaceCard};
|
|
1967
1978
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -1976,36 +1987,36 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
1976
1987
|
border-color: ${t.danger};
|
|
1977
1988
|
border-width: ${t.borderThick};
|
|
1978
1989
|
}
|
|
1979
|
-
`]}renderLabel(){return
|
|
1980
|
-
${this.label}${this.required?
|
|
1981
|
-
</legend>`}datePart(e,i,
|
|
1990
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
1991
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}
|
|
1992
|
+
</legend>`}datePart(e,r,i,o){let d=this.id_(e);return n`
|
|
1982
1993
|
<div class="part ${e}">
|
|
1983
|
-
<label for=${d}>${
|
|
1994
|
+
<label for=${d}>${r}</label>
|
|
1984
1995
|
<input
|
|
1985
1996
|
id=${d}
|
|
1986
1997
|
type="text"
|
|
1987
1998
|
inputmode="numeric"
|
|
1988
|
-
maxlength=${
|
|
1999
|
+
maxlength=${i}
|
|
1989
2000
|
.value=${this[e]}
|
|
1990
2001
|
autocomplete=${this.autocompleteSection?`${this.autocompleteSection}-${o}`:l}
|
|
1991
2002
|
?disabled=${this.disabled}
|
|
1992
|
-
@input=${
|
|
2003
|
+
@input=${c=>{this[e]=c.target.value,this.emit()}}
|
|
1993
2004
|
/>
|
|
1994
2005
|
</div>
|
|
1995
|
-
`}emit(){let
|
|
2006
|
+
`}emit(){let r=this.day&&this.month&&this.year.length===4?`${this.year}-${this.month.padStart(2,"0")}-${this.day.padStart(2,"0")}`:"";this.setFormValue(r)}renderControl(){return n`
|
|
1996
2007
|
<div class="parts" part="parts">
|
|
1997
|
-
${this.datePart("day",
|
|
1998
|
-
${this.datePart("month",
|
|
1999
|
-
${this.datePart("year",
|
|
2008
|
+
${this.datePart("day",w("Day"),2,"day")}
|
|
2009
|
+
${this.datePart("month",w("Month"),2,"month")}
|
|
2010
|
+
${this.datePart("year",w("Year"),4,"year")}
|
|
2000
2011
|
</div>
|
|
2001
|
-
`}render(){return
|
|
2012
|
+
`}render(){return n`
|
|
2002
2013
|
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
2003
2014
|
${this.renderLabel()}
|
|
2004
|
-
${this.description?
|
|
2015
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2005
2016
|
${this.renderControl()}
|
|
2006
2017
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2007
2018
|
</fieldset>
|
|
2008
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",
|
|
2019
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",it);var ce=new Set,de=null;function pe(a){if(typeof document>"u"||ce.has(a)||(ce.add(a),ce.size>1))return;let e=document.documentElement,r=window.innerWidth-e.clientWidth;de={overflow:e.style.overflow,paddingRight:e.style.paddingRight},e.style.overflow="hidden",r>0&&(e.style.paddingRight=`${r}px`)}function X(a){if(typeof document>"u"||!ce.delete(a)||ce.size>0||!de)return;let e=document.documentElement;e.style.overflow=de.overflow,e.style.paddingRight=de.paddingRight,de=null}var st=class extends p{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"}}}constructor(){super(),this.open=!1,this.heading="",this.closeLabel="Close",this.dismissible=!0,this.phoneFullScreen=!1}static{this.styles=[...p.styles,v,M(".close"),h`
|
|
2009
2020
|
dialog {
|
|
2010
2021
|
padding: 0;
|
|
2011
2022
|
border: 0;
|
|
@@ -2033,7 +2044,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2033
2044
|
.heading {
|
|
2034
2045
|
margin: 0;
|
|
2035
2046
|
font-family: ${t.fontHeading};
|
|
2036
|
-
font-size: ${
|
|
2047
|
+
font-size: ${b("xl")};
|
|
2037
2048
|
font-weight: ${m("bold")};
|
|
2038
2049
|
color: ${t.textHeading};
|
|
2039
2050
|
}
|
|
@@ -2051,7 +2062,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2051
2062
|
}
|
|
2052
2063
|
}
|
|
2053
2064
|
.close {
|
|
2054
|
-
${
|
|
2065
|
+
${S}
|
|
2055
2066
|
display: inline-flex;
|
|
2056
2067
|
align-items: center;
|
|
2057
2068
|
justify-content: center;
|
|
@@ -2060,11 +2071,11 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2060
2071
|
border: 0;
|
|
2061
2072
|
border-radius: ${t.radius};
|
|
2062
2073
|
font: inherit;
|
|
2063
|
-
font-size: ${
|
|
2074
|
+
font-size: ${b("lg")};
|
|
2064
2075
|
color: ${t.text};
|
|
2065
2076
|
cursor: pointer;
|
|
2066
2077
|
}
|
|
2067
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let
|
|
2078
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(e){if(!e.has("open"))return;let r=this.dialog;r&&(this.open?(typeof r.showModal=="function"?r.showModal():r.setAttribute("open",""),pe(this)):(typeof r.close=="function"&&r.open?r.close():r.removeAttribute("open"),X(this)))}disconnectedCallback(){super.disconnectedCallback(),X(this)}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}render(){return n`
|
|
2068
2079
|
<dialog
|
|
2069
2080
|
part="dialog"
|
|
2070
2081
|
aria-labelledby=${this.heading?this.id_("heading"):l}
|
|
@@ -2072,25 +2083,25 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2072
2083
|
@close=${()=>{this.open&&this.close()}}
|
|
2073
2084
|
>
|
|
2074
2085
|
<div class="head">
|
|
2075
|
-
${this.heading?
|
|
2076
|
-
${this.dismissible?
|
|
2086
|
+
${this.heading?n`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>`:l}
|
|
2087
|
+
${this.dismissible?n`<button class="close" part="close" type="button" @click=${this.close}>
|
|
2077
2088
|
<span aria-hidden="true">×</span>
|
|
2078
2089
|
<span class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">${this.closeLabel}</span>
|
|
2079
2090
|
</button>`:l}
|
|
2080
2091
|
</div>
|
|
2081
2092
|
<div class="body" part="body"><slot></slot></div>
|
|
2082
2093
|
</dialog>
|
|
2083
|
-
`}};customElements.define("impakt-dialog",
|
|
2094
|
+
`}};customElements.define("impakt-dialog",st);var at=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,R,h`
|
|
2084
2095
|
:host { display: block; }
|
|
2085
2096
|
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${s(3)}; counter-reset: point; }
|
|
2086
|
-
li { position: relative; padding-inline-start: ${s(7)}; ${
|
|
2087
|
-
:host([size='sm']) li { ${
|
|
2088
|
-
:host([size='lg']) li { ${
|
|
2097
|
+
li { position: relative; padding-inline-start: ${s(7)}; ${x("md")} text-wrap: pretty; counter-increment: point; }
|
|
2098
|
+
:host([size='sm']) li { ${x("sm")} }
|
|
2099
|
+
:host([size='lg']) li { ${x("lg")} }
|
|
2089
2100
|
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}; }
|
|
2090
2101
|
: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")}; }
|
|
2091
2102
|
: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}; }
|
|
2092
2103
|
@media (forced-colors: active) { li::before { background: CanvasText; } :host([look='check']) li::before, :host([look='number']) li::before { background: none; color: CanvasText; } }
|
|
2093
|
-
`]}render(){let e=(this.items??[]).map(
|
|
2104
|
+
`]}render(){let e=(this.items??[]).map(r=>n`<li part="item">${r}</li>`);return this.look==="number"?n`<ol part="list">${e}</ol>`:n`<ul part="list" role="list">${e}</ul>`}};customElements.define("impakt-list",at);var Vr={"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"},ot=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,R,h`
|
|
2094
2105
|
:host { display: block; min-inline-size: 0; container-type: inline-size; }
|
|
2095
2106
|
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${u("layout.gutter.md","16px")}; align-items: stretch; }
|
|
2096
2107
|
:host([gap='none']) .columns { gap: 0; }
|
|
@@ -2109,7 +2120,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2109
2120
|
::slotted(*) { max-inline-size: 100%; }
|
|
2110
2121
|
@container (max-width: 40rem) { :host(:not([stack-on='never'])) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2111
2122
|
@container (max-width: 64rem) { :host([stack-on='tablet']) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2112
|
-
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,
|
|
2123
|
+
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,r=Vr[this.widths]?.split(" "),i=r&&r.length===e?r.map(o=>`minmax(0, ${o})`).join(" "):"";return n`<div class="columns" part="row" style=${i?`grid-template-columns: ${i}`:""}>${Array.from({length:e},(o,d)=>n`<div class="column" part="column"><slot name=${`column-${d+1}`}></slot></div>`)}</div>`}};customElements.define("impakt-grid",ot);var nt=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,v,h`
|
|
2113
2124
|
:host { display: block; }
|
|
2114
2125
|
a { display: inline-flex; align-items: center; min-height: ${t.targetMin}; min-width: ${t.targetMin};
|
|
2115
2126
|
color: ${t.link}; text-decoration: underline; overflow-wrap: anywhere; max-width: 100%; }
|
|
@@ -2119,16 +2130,16 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2119
2130
|
/* An address is written one line at a time, and opening hours are often one
|
|
2120
2131
|
day to a line. Long unbroken values still wrap at 320px (1.4.10). */
|
|
2121
2132
|
.detail { white-space: pre-line; overflow-wrap: anywhere; }
|
|
2122
|
-
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return
|
|
2123
|
-
><span class="detail" part="detail" id=${d}>${e}</span></a>`:
|
|
2133
|
+
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return Ft(this.label)?n`<a part="link" href=${this.href}>${this.label}</a>`:l}renderContact(){let e=Ft(this.detail);if(!e)return l;let r=Ft(this.label),i=Kr(this.kind,e),o=this.id_("caption"),d=this.id_("detail"),c=r?n`<span class="caption" part="label" id=${o}>${r}</span>`:l,$=i?n`<a part="link" href=${i} aria-labelledby=${r?`${o} ${d}`:l}
|
|
2134
|
+
><span class="detail" part="detail" id=${d}>${e}</span></a>`:n`<span class="detail" part="detail">${e}</span>`;return n`<p class="contact" part="contact">${c}${$}</p>`}};function Ft(a){return typeof a=="string"?a.trim():""}function Kr(a,e){if(a==="phone"){let r=e.replace(/\(0\)/g,"").replace(/[^\d+]/g,"").replace(/(?!^)\+/g,"");return/\d/.test(r)?`tel:${r}`:""}return a==="email"&&/^[^\s@]+@[^\s@]+$/.test(e)?`mailto:${e}`:""}customElements.define("impakt-help",nt);var xr=h`
|
|
2124
2135
|
:host { --impakt-page-inner: ${u("layout.page-width","1200px")}; }
|
|
2125
2136
|
:host([width='narrow']) { --impakt-page-inner: 760px; }
|
|
2126
2137
|
:host([width='wide']) { --impakt-page-inner: 1440px; }
|
|
2127
|
-
`,
|
|
2138
|
+
`,Xr=h`
|
|
2128
2139
|
:host { --impakt-page-margin: ${u("layout.margin.phone","16px")}; }
|
|
2129
2140
|
@container impakt-page (min-width: 40rem) { .frame { --impakt-page-margin: ${u("layout.margin.tablet","32px")}; } }
|
|
2130
2141
|
@container impakt-page (min-width: 64rem) { .frame { --impakt-page-margin: ${u("layout.margin.desktop","64px")}; } }
|
|
2131
|
-
`,
|
|
2142
|
+
`,lt=class extends p{constructor(){super();this.place=()=>{let r=this.querySelector('impakt-hero[treatment="cover"]'),i=getComputedStyle(this).getPropertyValue("--impakt-bleed").trim()==="0",o=!!r&&!i&&this.opensOn(r);if(this.toggleAttribute("floating",o),!o)return;let d=this.renderRoot.querySelector(".frame");d&&this.style.setProperty("--impakt-header-top",`${Math.round(r.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,v,xr,Xr,h`
|
|
2132
2143
|
:host { display: block; container: impakt-page / inline-size; }
|
|
2133
2144
|
.frame { position: relative; display: flex; flex-direction: column; min-block-size: 100%; overflow-x: clip; }
|
|
2134
2145
|
.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); }
|
|
@@ -2148,12 +2159,12 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2148
2159
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
2149
2160
|
.skip:focus { transform: none; }
|
|
2150
2161
|
.empty { display: none; }
|
|
2151
|
-
`]}hasSlot(
|
|
2162
|
+
`]}hasSlot(r){return(r==="header"?this.noHeader:this.noFooter)?!1:Ye?!0:Array.from(this.children).some(i=>i.getAttribute("slot")===r)}skip(r){r.preventDefault();let i=this.renderRoot.querySelector("main");i?.focus(),i?.scrollIntoView()}render(){let r=this.hasSlot("header"),i=this.hasSlot("footer");return n`<div class="frame" part="frame">
|
|
2152
2163
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
2153
|
-
${
|
|
2164
|
+
${r?n`<header part="header"><div class="inner"><slot name="header"></slot></div></header>`:l}
|
|
2154
2165
|
<main id="content" tabindex="-1" part="main"><div class="inner"><slot></slot></div></main>
|
|
2155
|
-
${
|
|
2156
|
-
</div>`}opensOn(
|
|
2166
|
+
${i?n`<footer part="footer"><div class="inner"><slot name="footer"></slot></div></footer>`:l}
|
|
2167
|
+
</div>`}opensOn(r){for(let i of Array.from(this.querySelectorAll("*"))){if(i===r)return!0;if(!i.closest('[slot="header"],[slot="footer"]')&&i.tagName.startsWith("IMPAKT-")&&!/^IMPAKT-(STACK|SECTION|GRID|ANNOUNCEMENT)$/.test(i.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()}},dt=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,R,xr,h`
|
|
2157
2168
|
:host { display: block; --impakt-page-margin: inherit; }
|
|
2158
2169
|
/* What a solid card on a brand band goes back to, since the band repaints these for its own text. */
|
|
2159
2170
|
: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}; }
|
|
@@ -2182,7 +2193,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2182
2193
|
:host([padding='xl']) .band { padding-block: ${s(16)}; }
|
|
2183
2194
|
:host([padding='2xl']) .band { padding-block: clamp(${s(14)}, 8vw, ${s(28)}); }
|
|
2184
2195
|
.content { max-inline-size: var(--impakt-page-inner); margin-inline: auto; }
|
|
2185
|
-
`]}render(){return
|
|
2196
|
+
`]}render(){return n`<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",lt);customElements.define("impakt-section",dt);function Gr(a){if(typeof location>"u"||!a||a.startsWith("#"))return null;let e;try{let i=new URL(a,location.href);if(i.origin!==location.origin)return null;e=i.pathname.replace(/\/$/,"")||"/"}catch{return null}let r=location.pathname.replace(/\/$/,"")||"/";return e===r?"page":e!=="/"&&r.startsWith(`${e}/`)?"section":null}var ct=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"}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}}}get open(){return this.menuOpen}set open(r){this.menuOpen=r,this.requestUpdate()}static{this.styles=[...p.styles,v,h`
|
|
2186
2197
|
/* It grows to fill a row it sits in, because it measures itself to decide when to fold. */
|
|
2187
2198
|
:host { display: block; flex: 1 1 8rem; min-inline-size: 0; }
|
|
2188
2199
|
nav { display: flex; flex-direction: column; position: relative; }
|
|
@@ -2190,52 +2201,55 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2190
2201
|
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${s(1)} ${s(6)}; align-items: center; justify-content: flex-end; }
|
|
2191
2202
|
:host([align='start']) ul { justify-content: flex-start; }
|
|
2192
2203
|
:host([align='center']) ul { justify-content: center; }
|
|
2193
|
-
a { ${
|
|
2204
|
+
a { ${S} display: inline-flex; align-items: center; padding: ${s(2)} ${s(1)}; color: inherit; font-weight: ${m("semibold")}; text-decoration: none; border-radius: ${t.radiusSm}; }
|
|
2194
2205
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
2195
2206
|
a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
|
|
2196
|
-
.toggle { display: none; ${
|
|
2207
|
+
.toggle { display: none; ${S} align-items: center; gap: ${s(2)}; align-self: flex-end; padding: ${s(2)} ${s(3)}; font: inherit; font-weight: ${m("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
2197
2208
|
/* When they do not fit, the links fold behind a Menu button and open as a panel under it. */
|
|
2198
2209
|
:host([folded]) { flex: 0 0 auto; }
|
|
2199
2210
|
:host([folded]) .toggle { display: inline-flex; }
|
|
2200
2211
|
: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}; }
|
|
2201
2212
|
:host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
2202
2213
|
:host([size='sm']) ul { column-gap: ${s(6)}; }
|
|
2203
|
-
:host([size='sm']) a { padding-inline: 0; font-size: ${
|
|
2214
|
+
:host([size='sm']) a { padding-inline: 0; font-size: ${b("sm")}; font-weight: ${m("medium")}; }
|
|
2204
2215
|
:host([size='sm'][folded]) a { padding-inline: ${s(3)}; }
|
|
2205
2216
|
:host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${s(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${s(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%); }
|
|
2206
2217
|
:host([folded]) ul.open { display: flex; }
|
|
2207
2218
|
:host([folded]) li { text-align: start; }
|
|
2208
2219
|
:host([folded]) a { display: flex; padding: ${s(3)} ${s(3)}; }
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2220
|
+
/* With no script the element is never defined, so it cannot measure itself and fold. The links
|
|
2221
|
+
wrap onto more lines instead, so they are never cut off or drawn over what is beside them. */
|
|
2222
|
+
:host(:not(:defined)) ul { flex-wrap: wrap; row-gap: 0; }
|
|
2223
|
+
`]}fit(){if(!this.hasUpdated)return;let r=this.getBoundingClientRect().width;if(r<=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 i=this.needs>r;this.toggleAttribute("folded",i),!i&&this.menuOpen&&(this.open=!1)}updated(r){r.has("links")&&(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(r){r.key!=="Escape"||!this.open||(this.open=!1,this.renderRoot.querySelector(".toggle")?.focus())}render(){let r=this.id_("links");return n`<nav aria-label=${this.label||l} part="nav" @keydown=${this.onKey}>
|
|
2224
|
+
<button class="toggle" type="button" aria-expanded=${this.open?"true":"false"} aria-controls=${r} @click=${this.toggle}>${z(this.open?"close":this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2225
|
+
<ul id=${r} class=${this.open?"open":""} part="list">
|
|
2226
|
+
${(this.links??[]).map(i=>{let o=Gr(i.href);return n`<li><a href=${i.href} aria-current=${o==="page"?"page":o==="section"?"true":l} part="link">${i.label}</a></li>`})}
|
|
2213
2227
|
</ul>
|
|
2214
|
-
</nav>`}},
|
|
2215
|
-
:host { display: block; font-size: ${
|
|
2228
|
+
</nav>`}},pt=class extends p{static{this.properties={items:{type:Array},label:{type:String}}}constructor(){super(),this.items=[],this.label="Breadcrumb"}static{this.styles=[...p.styles,v,h`
|
|
2229
|
+
:host { display: block; font-size: ${b("sm")}; }
|
|
2216
2230
|
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${s(1)}; }
|
|
2217
2231
|
li { display: inline-flex; align-items: center; gap: ${s(1)}; }
|
|
2218
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: ${s(1)} ${s(2)}; }
|
|
2219
2233
|
a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }
|
|
2220
2234
|
a:hover { color: ${t.linkHover}; }
|
|
2221
2235
|
[aria-current] { color: ${t.textMuted}; }
|
|
2222
|
-
.sr-only { ${
|
|
2223
|
-
`]}render(){let e=this.items??[];return
|
|
2224
|
-
${e.map((i
|
|
2225
|
-
</ol></nav>`}};customElements.define("impakt-nav",
|
|
2236
|
+
.sr-only { ${T} }
|
|
2237
|
+
`]}render(){let e=this.items??[];return n`<nav aria-label=${this.label} part="nav"><ol>
|
|
2238
|
+
${e.map((r,i)=>n`<li>${i===e.length-1?n`<span aria-current="page">${r.label}</span>`:n`<a href=${r.href} part="link">${r.label}</a>`}</li>`)}
|
|
2239
|
+
</ol></nav>`}};customElements.define("impakt-nav",ct);customElements.define("impakt-breadcrumbs",pt);var ht=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`
|
|
2226
2240
|
:host { display: block; }
|
|
2227
2241
|
hr { margin: ${s(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }
|
|
2228
2242
|
:host([tone='strong']) hr { opacity: 1; border-block-start-width: ${t.borderThick}; }
|
|
2229
2243
|
:host([spacing='sm']) hr { margin-block: ${s(2)}; }
|
|
2230
2244
|
:host([spacing='lg']) hr { margin-block: ${s(8)}; }
|
|
2231
2245
|
:host([spacing='xl']) hr { margin-block: ${s(12)}; }
|
|
2232
|
-
`]}render(){return
|
|
2246
|
+
`]}render(){return n`<hr aria-hidden="true" part="line" />`}},ut=class extends p{static{this.properties={size:{type:String,reflect:!0}}}constructor(){super(),this.size="md"}static{this.styles=[...p.styles,h`
|
|
2233
2247
|
:host { display: block; block-size: ${s(4)}; }
|
|
2234
2248
|
:host([size='sm']) { block-size: ${s(2)}; }
|
|
2235
2249
|
:host([size='lg']) { block-size: ${s(8)}; }
|
|
2236
2250
|
:host([size='xl']) { block-size: ${s(12)}; }
|
|
2237
2251
|
:host([size='2xl']) { block-size: ${s(16)}; }
|
|
2238
|
-
`]}render(){return
|
|
2252
|
+
`]}render(){return n``}},mt=class extends p{static{this.styles=[...p.styles,h`:host { ${T} }`]}render(){return n`<slot></slot>`}},gt=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,v,M("[role='tab']"),h`
|
|
2239
2253
|
/* Only the two-row layout needs a size container. Making every tab set one
|
|
2240
2254
|
would take its width from its parent alone, so in a flex row, with no
|
|
2241
2255
|
width given, it would shrink to nothing. In a row it may still shrink
|
|
@@ -2243,12 +2257,12 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2243
2257
|
:host { display: block; min-inline-size: 0; }
|
|
2244
2258
|
:host([two-rows]) { container-type: inline-size; }
|
|
2245
2259
|
[role='tablist'] { display: flex; gap: ${s(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2246
|
-
[role='tab'] { ${
|
|
2260
|
+
[role='tab'] { ${S} position: relative; flex: none; padding: ${s(3)} ${s(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; }
|
|
2247
2261
|
/* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */
|
|
2248
2262
|
[role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }
|
|
2249
2263
|
[role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2250
2264
|
[role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2251
|
-
[role='tabpanel'] { padding-block: ${s(5)}; line-height: ${
|
|
2265
|
+
[role='tabpanel'] { padding-block: ${s(5)}; line-height: ${I("normal")}; }
|
|
2252
2266
|
.body { white-space: pre-line; }
|
|
2253
2267
|
@container (max-width: 40rem) {
|
|
2254
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: ${s(1)}; }
|
|
@@ -2257,10 +2271,10 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2257
2271
|
}
|
|
2258
2272
|
@media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }
|
|
2259
2273
|
.count { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 20px; block-size: 20px; margin-inline-start: ${s(2)}; padding: 0 ${s(1.5)}; border-radius: 999px; font-size: 12px; font-weight: ${m("semibold")}; background: ${t.brand}; color: ${t.onBrand}; font-variant-numeric: tabular-nums; }
|
|
2260
|
-
.sr-only { ${
|
|
2274
|
+
.sr-only { ${T} }
|
|
2261
2275
|
/* Links drawn as tabs. */
|
|
2262
2276
|
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${s(1)}; overflow-x: auto; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2263
|
-
nav a { ${
|
|
2277
|
+
nav a { ${S} position: relative; display: inline-flex; align-items: center; flex: none; padding: ${s(3)} ${s(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; }
|
|
2264
2278
|
nav a:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2265
2279
|
nav a[aria-current='page'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2266
2280
|
nav a:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; outline: none; }
|
|
@@ -2270,27 +2284,27 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2270
2284
|
:host([look='pill']) :is([role='tab'], nav a):hover { background: ${t.surfaceInset}; }
|
|
2271
2285
|
:host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { background: ${t.text}; color: ${t.surfaceCard}; }
|
|
2272
2286
|
@media (forced-colors: active) { :host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { border: 2px solid Highlight; } }
|
|
2273
|
-
`]}countOf(e){return typeof e.count!="number"?l:e.countLabel?
|
|
2274
|
-
${e.map(o=>
|
|
2275
|
-
</ul></nav>`;let
|
|
2276
|
-
${e.map(o=>
|
|
2287
|
+
`]}countOf(e){return typeof e.count!="number"?l:e.countLabel?n`<span class="count" aria-hidden="true">${e.count}</span><span class="sr-only">, ${e.countLabel}</span>`:n`<span class="count">${e.count}</span>`}get linked(){let e=this.items??[];return e.length>0&&e.every(r=>!!r.href)}current(){let e=this.items??[];return e.some(r=>r.id===this.selected)?this.selected:e[0]?.id??""}choose(e,r){e!==this.current()&&(this.selected=e,this.dispatchEvent(new CustomEvent("impakt-change",{detail:{value:e},bubbles:!0,composed:!0})),r&&this.updateComplete.then(()=>this.renderRoot.querySelector(`#${this.id_(`tab-${e}`)}`)?.focus({preventScroll:!0})))}onKey(e){let r=this.items??[],i=r.findIndex(d=>d.id===this.current()),o={ArrowRight:i+1,ArrowLeft:i-1,Home:0,End:r.length-1}[e.key];o===void 0||!r.length||(e.preventDefault(),this.choose(r[(o+r.length)%r.length].id,!0))}reveal(){let e=this.renderRoot.querySelector("[role='tablist']"),r=this.renderRoot.querySelector("[role='tab'][aria-selected='true']");if(!e||!r||e.scrollWidth<=e.clientWidth)return;let i=r.offsetLeft-e.offsetLeft,o=i+r.offsetWidth;i<e.scrollLeft?e.scrollLeft=i-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??[],r=this.current();if(this.linked)return n`<nav aria-label=${this.label||l} part="tabs"><ul>
|
|
2288
|
+
${e.map(o=>n`<li><a href=${o.href} part="tab" aria-current=${o.id===r?"page":l} @click=${d=>oe(this,d,{href:o.href,id:o.id})}>${o.label}${this.countOf(o)}</a></li>`)}
|
|
2289
|
+
</ul></nav>`;let i=e.length>4;return n`<div role="tablist" aria-label=${this.label||l} part="tabs" class=${i?"many":""} style=${i?`--columns:${Math.ceil(e.length/2)}`:l} @keydown=${this.onKey}>
|
|
2290
|
+
${e.map(o=>n`<button role="tab" type="button" id=${this.id_(`tab-${o.id}`)} aria-selected=${o.id===r?"true":"false"} aria-controls=${this.id_(`panel-${o.id}`)} tabindex=${o.id===r?"0":"-1"} @click=${()=>this.choose(o.id,!1)}>${o.label}${this.countOf(o)}</button>`)}
|
|
2277
2291
|
</div>
|
|
2278
|
-
${e.map(o=>
|
|
2292
|
+
${e.map(o=>n`<div role="tabpanel" id=${this.id_(`panel-${o.id}`)} aria-labelledby=${this.id_(`tab-${o.id}`)} tabindex="0" ?hidden=${o.id!==r} part="panel"><slot name=${o.id}><span class="body">${o.body??""}</span></slot></div>`)}`}};customElements.define("impakt-divider",ht);customElements.define("impakt-spacer",ut);customElements.define("impakt-visually-hidden",mt);customElements.define("impakt-tabs",gt);var bt=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`
|
|
2279
2293
|
:host { display: block; margin-block-end: ${s(6)}; }
|
|
2280
2294
|
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
|
|
2281
|
-
legend { padding: 0; margin-block-end: ${s(2)}; font-size: ${
|
|
2282
|
-
:host([size='lg']) legend { font-size: ${
|
|
2283
|
-
:host([size='xl']) legend { font-size: ${
|
|
2284
|
-
.description { margin-block-end: ${s(3)}; font-size: ${
|
|
2285
|
-
.error { margin-block-end: ${s(3)}; font-size: ${
|
|
2295
|
+
legend { padding: 0; margin-block-end: ${s(2)}; font-size: ${b("md")}; font-weight: ${m("bold")}; line-height: ${I("tight")}; color: ${t.text}; }
|
|
2296
|
+
:host([size='lg']) legend { font-size: ${b("xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
2297
|
+
:host([size='xl']) legend { font-size: ${b("2xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
2298
|
+
.description { margin-block-end: ${s(3)}; font-size: ${b("sm")}; color: ${t.textMuted}; line-height: ${I("normal")}; }
|
|
2299
|
+
.error { margin-block-end: ${s(3)}; font-size: ${b("sm")}; color: ${t.dangerText}; font-weight: ${m("semibold")}; }
|
|
2286
2300
|
.error:empty { display: none; }
|
|
2287
2301
|
:host([error]:not([error=''])) .fields { padding-inline-start: ${s(4)}; border-inline-start: 4px solid ${t.danger}; }
|
|
2288
|
-
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return
|
|
2302
|
+
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return n`<fieldset part="fieldset" aria-describedby=${e||l}>
|
|
2289
2303
|
<legend part="legend">${this.legend}</legend>
|
|
2290
|
-
${this.description?
|
|
2304
|
+
${this.description?n`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2291
2305
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2292
2306
|
<div class="fields" part="fields"><slot></slot></div>
|
|
2293
|
-
</fieldset>`}};customElements.define("impakt-fieldset",
|
|
2307
|
+
</fieldset>`}};customElements.define("impakt-fieldset",bt);var ft=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,v,M(".close"),h`
|
|
2294
2308
|
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); }
|
|
2295
2309
|
dialog[open] { display: flex; }
|
|
2296
2310
|
:host([side='left']) dialog { margin: 0 auto 0 0; animation-name: from-left; }
|
|
@@ -2303,23 +2317,23 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2303
2317
|
@keyframes from-right { from { transform: translateX(100%); } }
|
|
2304
2318
|
@keyframes from-left { from { transform: translateX(-100%); } }
|
|
2305
2319
|
.head { display: flex; align-items: center; justify-content: space-between; gap: ${s(3)}; padding: ${s(4)} ${s(5)}; box-shadow: 0 1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2306
|
-
h2 { margin: 0; font-family: ${t.fontHeading}; ${
|
|
2307
|
-
.close { ${
|
|
2320
|
+
h2 { margin: 0; font-family: ${t.fontHeading}; ${x("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2321
|
+
.close { ${S} display: inline-flex; align-items: center; justify-content: center; padding: 0; color: ${t.text}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2308
2322
|
.close:hover { background: ${t.surfaceSubtle}; }
|
|
2309
2323
|
.body { flex: 1; overflow: auto; padding: ${s(5)}; }
|
|
2310
2324
|
.foot { display: flex; gap: ${s(3)}; justify-content: flex-end; padding: ${s(4)} ${s(5)}; box-shadow: 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2311
2325
|
.foot[hidden] { display: none; }
|
|
2312
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(
|
|
2326
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(r){if(!r.has("open"))return;let i=this.dialog;i&&(this.open?(typeof i.showModal=="function"?i.showModal():i.setAttribute("open",""),pe(this)):(typeof i.close=="function"&&i.open?i.close():i.removeAttribute("open"),X(this)))}disconnectedCallback(){super.disconnectedCallback(),X(this)}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}footerChanged(r){this.hasFooter=r.target.assignedNodes().length>0,this.requestUpdate()}render(){return n`<dialog part="dialog" aria-labelledby=${this.heading?this.id_("heading"):l}
|
|
2313
2327
|
@cancel=${()=>this.close()}
|
|
2314
2328
|
@close=${()=>{this.open&&this.close()}}
|
|
2315
|
-
@click=${
|
|
2329
|
+
@click=${r=>{r.target===this.dialog&&this.close()}}>
|
|
2316
2330
|
<div class="head">
|
|
2317
|
-
${this.heading?
|
|
2318
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2331
|
+
${this.heading?n`<h2 id=${this.id_("heading")}>${this.heading}</h2>`:n`<span></span>`}
|
|
2332
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${z("close","20px")}</button>
|
|
2319
2333
|
</div>
|
|
2320
2334
|
<div class="body" part="body"><slot></slot></div>
|
|
2321
2335
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
2322
|
-
</dialog>`}},
|
|
2336
|
+
</dialog>`}},Yr={neutral:"info",success:"check",warning:"warning",danger:"warning"},$t=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,v,h`
|
|
2323
2337
|
.region { position: fixed; inset-block-end: calc(${s(4)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); inset-inline-end: ${s(4)}; z-index: 1000; inline-size: min(24rem, calc(100vw - ${s(8)})); pointer-events: none; }
|
|
2324
2338
|
@media (max-width: 40rem) { .region { inset-inline: ${s(3)}; inline-size: auto; inset-block-end: calc(${s(3)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); } }
|
|
2325
2339
|
.toast { pointer-events: auto; max-block-size: 40vh; overflow: auto; display: flex; align-items: flex-start; gap: ${s(3)}; padding: ${s(3)} ${s(3)} ${s(3)} ${s(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); }
|
|
@@ -2329,88 +2343,88 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2329
2343
|
:host([tone='success']) .mark { color: ${t.success}; }
|
|
2330
2344
|
:host([tone='warning']) .mark { color: ${t.warning}; }
|
|
2331
2345
|
:host([tone='danger']) .mark { color: ${t.danger}; }
|
|
2332
|
-
.message { flex: 1; align-self: center; margin: 0; ${
|
|
2333
|
-
.action, .close { ${
|
|
2346
|
+
.message { flex: 1; align-self: center; margin: 0; ${x("sm")} font-weight: ${m("medium")}; }
|
|
2347
|
+
.action, .close { ${S} padding: 0 ${s(2)}; font: inherit; ${x("sm")} font-weight: ${m("semibold")}; color: ${t.link}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2334
2348
|
.close { display: inline-flex; align-items: center; justify-content: center; color: ${t.textMuted}; }
|
|
2335
2349
|
.action:hover, .close:hover { background: ${t.surfaceSubtle}; }
|
|
2336
|
-
`,
|
|
2337
|
-
${this.open?
|
|
2350
|
+
`,M(".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 n`<div class="region" role="status" aria-live="polite">
|
|
2351
|
+
${this.open?n`<div class="toast" part="toast" @mouseenter=${this.stop} @mouseleave=${this.start} @focusin=${this.stop} @focusout=${this.start}
|
|
2338
2352
|
@keydown=${e=>{e.key==="Escape"&&(e.preventDefault(),this.close())}}>
|
|
2339
|
-
<span class="mark">${
|
|
2353
|
+
<span class="mark">${z(Yr[this.tone]??"info","20px")}</span>
|
|
2340
2354
|
<p class="message">${this.message}</p>
|
|
2341
|
-
${this.actionText?
|
|
2342
|
-
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${
|
|
2355
|
+
${this.actionText?n`<button class="action" type="button" @click=${this.action}>${this.actionText}</button>`:l}
|
|
2356
|
+
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${z("close","16px")}</button>
|
|
2343
2357
|
</div>`:l}
|
|
2344
|
-
</div>`}},
|
|
2358
|
+
</div>`}},yt=class extends p{constructor(){super();this.outside=r=>{r.composedPath().includes(this)||this.toggle(!1)};this.label="Menu",this.icon="",this.items=[],this.edge="start",this.open=!1}static{this.properties={label:{type:String},icon:{type:String},items:{type:Array},edge:{type:String,reflect:!0},open:{type:Boolean,reflect:!0}}}static{this.styles=[...p.styles,v,M(".trigger, .item"),h`
|
|
2345
2359
|
:host { position: relative; display: inline-block; }
|
|
2346
|
-
.trigger { ${
|
|
2360
|
+
.trigger { ${S} display: inline-flex; align-items: center; gap: ${s(2)}; padding: ${s(2)} ${s(3.5)}; font: inherit; ${x("sm")} font-weight: ${m("semibold")}; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.border}; border-radius: ${t.radiusLg}; box-shadow: ${t.shadowXs}; cursor: pointer; }
|
|
2347
2361
|
.trigger:hover { background: ${t.surfaceSubtle}; }
|
|
2348
2362
|
.chev { display: inline-flex; color: ${t.textMuted}; transition: transform 120ms ease-in-out; }
|
|
2349
2363
|
:host([open]) .chev { transform: rotate(180deg); }
|
|
2350
2364
|
.panel { position: absolute; z-index: 100; inset-block-start: calc(100% + ${s(1.5)}); inset-inline-start: 0; box-sizing: border-box; min-inline-size: 13rem; max-inline-size: min(20rem, 90vw); padding: ${s(1.5)}; background: ${t.surfaceCard}; border-radius: ${t.radiusXl}; box-shadow: ${t.shadowLg}, 0 0 0 1px color-mix(in srgb, ${t.text} 8%, transparent); animation: pop 120ms ease-out; }
|
|
2351
2365
|
.list { margin: 0; padding: 0; list-style: none; }
|
|
2352
|
-
.header { padding: ${s(2)} ${s(2.5)} ${s(2.5)}; margin-block-end: ${s(1.5)}; border-block-end: ${t.borderThin} solid ${t.border}; ${
|
|
2366
|
+
.header { padding: ${s(2)} ${s(2.5)} ${s(2.5)}; margin-block-end: ${s(1.5)}; border-block-end: ${t.borderThin} solid ${t.border}; ${x("sm")} color: ${t.textMuted}; overflow-wrap: anywhere; }
|
|
2353
2367
|
:host([edge='end']) .panel, .panel.flip-end { inset-inline: auto 0; }
|
|
2354
2368
|
:host([edge='end']) .panel.flip-start { inset-inline: 0 auto; }
|
|
2355
2369
|
@keyframes pop { from { opacity: 0; transform: translateY(-${s(1)}); } }
|
|
2356
|
-
.item { ${
|
|
2370
|
+
.item { ${S} box-sizing: border-box; display: flex; align-items: center; gap: ${s(2.5)}; inline-size: 100%; padding: ${s(2)} ${s(2.5)}; font: inherit; ${x("sm")} text-align: start; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2357
2371
|
.item:hover, .item:focus { background: ${t.surfaceSubtle}; }
|
|
2358
2372
|
.item.danger { color: ${t.dangerText}; }
|
|
2359
2373
|
.item svg { flex: none; }
|
|
2360
|
-
`]}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
|
|
2361
|
-
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${
|
|
2362
|
-
${this.open?
|
|
2363
|
-
${this.items.map(
|
|
2364
|
-
</ul></div>`:l}`}};function
|
|
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(r,i){this.open=r,r?(document.addEventListener("click",this.outside),this.updateComplete.then(()=>{this.keepOnScreen(),this.entries[i==="last"?this.entries.length-1:0]?.focus()})):document.removeEventListener("click",this.outside)}keepOnScreen(){let r=this.renderRoot.querySelector(".panel");if(!r)return;r.classList.remove("flip-start","flip-end");let i=r.getBoundingClientRect(),o=document.documentElement.clientWidth;i.right>o-8?r.classList.add("flip-end"):i.left<8&&r.classList.add("flip-start")}triggerKey(r){(r.key==="ArrowDown"||r.key==="ArrowUp")&&(r.preventDefault(),this.toggle(!0,r.key==="ArrowUp"?"last":"first"))}listKey(r){let i=this.entries,o=i.indexOf(this.renderRoot.activeElement),d={ArrowDown:(o+1)%i.length,ArrowUp:(o-1+i.length)%i.length,Home:0,End:i.length-1};if(r.key in d)r.preventDefault(),i[d[r.key]]?.focus();else if(r.key.length===1&&/\S/.test(r.key)&&!r.ctrlKey&&!r.metaKey&&!r.altKey){let c=r.key.toLowerCase();[...i.slice(o+1),...i.slice(0,o+1)].find(g=>(g.textContent??"").trim().toLowerCase().startsWith(c))?.focus()}else r.key==="Escape"?(r.preventDefault(),this.toggle(!1),this.trigger?.focus()):r.key==="Tab"&&this.toggle(!1)}choose(r){this.toggle(!1),this.trigger?.focus(),r.href||this.dispatchEvent(new CustomEvent("impakt-select",{detail:{value:r.value??r.text},bubbles:!0,composed:!0}))}render(){let r=i=>n`${z(i.icon,"18px")}<span>${i.text}</span>`;return n`<button class="trigger" part="trigger" type="button" aria-haspopup="menu" aria-expanded=${String(this.open)} aria-controls=${this.id_("list")}
|
|
2375
|
+
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${z(this.icon,"18px")}${this.label}</slot><span class="chev" part="chevron">${z("chevron-down","16px")}</span></button>
|
|
2376
|
+
${this.open?n`<div class="panel" part="panel">${this.querySelector?.(':scope > [slot="header"]')?n`<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}>
|
|
2377
|
+
${this.items.map(i=>n`<li role="none">${i.href?n`<a class="item ${i.tone==="danger"?"danger":""}" role="menuitem" tabindex="-1" href=${i.href} @click=${()=>this.choose(i)}>${r(i)}</a>`:n`<button class="item ${i.tone==="danger"?"danger":""}" role="menuitem" tabindex="-1" type="button" @click=${()=>this.choose(i)}>${r(i)}</button>`}</li>`)}
|
|
2378
|
+
</ul></div>`:l}`}};function Zr(a,e){let r=[...new Set([1,a-1,a,a+1,e])].filter(i=>i>=1&&i<=e).sort((i,o)=>i-o);return r.flatMap((i,o)=>{let d=r[o-1];return d===void 0||i===d+1?[i]:i===d+2?[d+1,i]:["gap",i]})}var xt=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,v,M(".n, .step"),h`
|
|
2365
2379
|
:host { display: block; container-type: inline-size; }
|
|
2366
2380
|
nav { display: flex; align-items: center; justify-content: space-between; gap: ${s(2)}; }
|
|
2367
2381
|
ul { display: flex; align-items: center; gap: ${s(1)}; margin: 0; padding: 0; list-style: none; }
|
|
2368
|
-
.n, .step { ${
|
|
2382
|
+
.n, .step { ${S} box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: ${s(1.5)}; min-inline-size: 44px; padding: 0 ${s(2.5)}; font: inherit; ${x("sm")} font-weight: ${m("medium")}; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
2369
2383
|
.n:hover, .step:hover { background: ${t.surfaceSubtle}; }
|
|
2370
2384
|
.n[aria-current] { color: ${t.onBrand}; background: ${t.brand}; font-weight: ${m("semibold")}; }
|
|
2371
2385
|
.step[aria-disabled='true'] { color: ${t.textMuted}; opacity: 0.55; background: none; cursor: not-allowed; }
|
|
2372
2386
|
.gap { color: ${t.textMuted}; padding: 0 ${s(1)}; }
|
|
2373
|
-
.count { display: none; ${
|
|
2387
|
+
.count { display: none; ${x("sm")} color: ${t.textMuted}; }
|
|
2374
2388
|
@container (max-width: 34rem) { ul { display: none; } .count { display: block; } }
|
|
2375
|
-
`]}go(e,
|
|
2389
|
+
`]}go(e,r){this.hrefPattern||(r.preventDefault(),this.page=e,this.dispatchEvent(new CustomEvent("impakt-page",{detail:{page:e},bubbles:!0,composed:!0})))}link(e,r,i,o,d){return this.hrefPattern?n`<a class=${r} href=${this.hrefPattern.replace("{page}",String(e))} aria-label=${o} aria-current=${d?"page":l}>${i}</a>`:n`<button class=${r} type="button" aria-label=${o} aria-current=${d?"page":l} @click=${c=>this.go(e,c)}>${i}</button>`}step(e,r,i,o){let d=i==="arrow-left"?n`${z(i,"16px")}${r}`:n`${r}${z(i,"16px")}`;return o?n`<span class="step" aria-disabled="true">${d}</span>`:this.link(e,"step",d,r,!1)}render(){let e=Math.min(Math.max(this.page,1),Math.max(this.pages,1));return n`<nav aria-label=${this.label} part="nav">
|
|
2376
2390
|
${this.step(e-1,this.previousText,"arrow-left",e<=1)}
|
|
2377
|
-
<ul>${
|
|
2378
|
-
<span class="count">${
|
|
2391
|
+
<ul>${Zr(e,this.pages).map(r=>n`<li>${r==="gap"?n`<span class="gap" aria-hidden="true">…</span>`:this.link(r,"n",r,w("Page {page}",{page:r}),r===e)}</li>`)}</ul>
|
|
2392
|
+
<span class="count">${w("Page {page} of {pages}",{page:e,pages:this.pages})}</span>
|
|
2379
2393
|
${this.step(e+1,this.nextText,"arrow-right",e>=this.pages)}
|
|
2380
|
-
</nav>`}},
|
|
2394
|
+
</nav>`}},Jr=a=>{let e=a.trim().split(/\s+/).filter(Boolean);return((e[0]?.[0]??"")+(e.length>1?e[e.length-1][0]:"")).toUpperCase()},kt=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`
|
|
2381
2395
|
:host { --size: 40px; display: inline-block; inline-size: var(--size); block-size: var(--size); vertical-align: middle; }
|
|
2382
2396
|
:host([size='sm']) { --size: 32px; }
|
|
2383
2397
|
:host([size='lg']) { --size: 56px; }
|
|
2384
2398
|
:host([size='xl']) { --size: 80px; }
|
|
2385
2399
|
.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")}; }
|
|
2386
2400
|
img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
2387
|
-
`]}willUpdate(
|
|
2401
|
+
`]}willUpdate(r){r.has("src")&&(this.failed=!1)}render(){return this.src&&!this.failed?n`<div class="face"><img src=${this.src} alt=${this.fullName} @error=${()=>{this.failed=!0,this.requestUpdate()}} /></div>`:n`<div class="face" role="img" aria-label=${this.fullName||w("Person")}>${Jr(this.fullName)||z("user","55%")}</div>`}},vt=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`
|
|
2388
2402
|
ul { display: flex; margin: 0; padding: 0; list-style: none; }
|
|
2389
2403
|
li { margin-inline-start: -${s(2.5)}; border-radius: 50%; box-shadow: 0 0 0 2px ${t.surfaceCard}; line-height: 0; }
|
|
2390
2404
|
li:first-child { margin-inline-start: 0; }
|
|
2391
|
-
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${
|
|
2405
|
+
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${x("xs")} line-height: 1; font-weight: ${m("semibold")}; color: ${t.text}; background: ${t.surfaceSubtle}; border-radius: 50%; }
|
|
2392
2406
|
:host([size='sm']) .more { inline-size: 32px; block-size: 32px; }
|
|
2393
2407
|
:host([size='lg']) .more { inline-size: 56px; block-size: 56px; }
|
|
2394
|
-
.sr { ${
|
|
2395
|
-
`]}render(){let e=this.items.slice(0,this.max),
|
|
2396
|
-
${e.map(
|
|
2397
|
-
${
|
|
2398
|
-
</ul>`}},
|
|
2408
|
+
.sr { ${T} }
|
|
2409
|
+
`]}render(){let e=this.items.slice(0,this.max),r=this.items.length-e.length;return n`<ul part="list">
|
|
2410
|
+
${e.map(i=>n`<li><impakt-avatar full-name=${i.name} src=${i.src??""} size=${this.size}></impakt-avatar></li>`)}
|
|
2411
|
+
${r>0?n`<li><span class="more"><span aria-hidden="true">+${r}</span><span class="sr">${r} ${this.moreLabel}</span></span></li>`:l}
|
|
2412
|
+
</ul>`}},wt=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,R,h`
|
|
2399
2413
|
.wrap { display: flex; flex-direction: column; align-items: center; gap: ${s(2)}; padding: ${s(12)} ${s(6)}; text-align: center; }
|
|
2400
2414
|
:host([framed]) .wrap { border: ${t.borderThin} dashed ${t.border}; border-radius: ${t.radiusXl}; }
|
|
2401
2415
|
.mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 56px; block-size: 56px; margin-block-end: ${s(2)}; color: ${t.brand}; background: ${t.brandSubtle}; border-radius: 50%; }
|
|
2402
|
-
.h { margin: 0; font-family: ${t.fontHeading}; ${
|
|
2416
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${x("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2403
2417
|
p { margin: 0; max-inline-size: 42ch; color: ${t.textMuted}; text-wrap: pretty; }
|
|
2404
2418
|
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: ${s(3)}; margin-block-start: ${s(3)}; }
|
|
2405
|
-
`]}render(){return
|
|
2406
|
-
<span class="mark">${
|
|
2407
|
-
${this.heading?
|
|
2408
|
-
${this.lead?
|
|
2419
|
+
`]}render(){return n`<div class="wrap" part="wrap">
|
|
2420
|
+
<span class="mark">${z(this.icon,"26px")}</span>
|
|
2421
|
+
${this.heading?n`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
2422
|
+
${this.lead?n`<p>${this.lead}</p>`:l}
|
|
2409
2423
|
<div class="actions"><slot name="actions"></slot></div>
|
|
2410
|
-
</div>`}},
|
|
2424
|
+
</div>`}},Qr=a=>String(a?.times??"").split(",").map(e=>e.trim()).filter(Boolean);function ei(a){let e=new Date(`${a}T00:00:00Z`);if(Number.isNaN(e.getTime()))return{weekday:"",day:a,month:""};let r=H(),i=o=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...o}).format(e);return{weekday:i({weekday:"short"}),day:i({day:"numeric"}),month:i({month:"short"})}}var St=class extends f{constructor(){super();this.day="";this.days=[],this.dayLabel="Day",this.timeLabel="Time",this.emptyText="No times are available at the moment."}static{this.properties={...f.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=[...f.styles,h`
|
|
2411
2425
|
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
|
|
2412
2426
|
legend { padding: 0; }
|
|
2413
|
-
.row-label { ${
|
|
2427
|
+
.row-label { ${x("sm")} color: ${t.textMuted}; margin-block: ${s(2)}; }
|
|
2414
2428
|
.days { display: flex; gap: ${s(2)}; overflow-x: auto; padding: ${s(1)}; margin: -${s(1)}; scrollbar-width: thin; }
|
|
2415
2429
|
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: ${s(2)}; }
|
|
2416
2430
|
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; }
|
|
@@ -2419,26 +2433,26 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2419
2433
|
label:has(input:focus-visible) { box-shadow: ${t.focusShadow}; }
|
|
2420
2434
|
input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
|
|
2421
2435
|
.day { flex: none; inline-size: 4.5rem; padding-block: ${s(2.5)}; }
|
|
2422
|
-
.weekday, .month { ${
|
|
2423
|
-
.num { ${
|
|
2424
|
-
.time { padding: ${s(2)}; ${
|
|
2436
|
+
.weekday, .month { ${x("xs")} }
|
|
2437
|
+
.num { ${x("xl")} font-weight: ${m("semibold")}; }
|
|
2438
|
+
.time { padding: ${s(2)}; ${x("sm")} font-weight: ${m("medium")}; }
|
|
2425
2439
|
.empty { margin: 0; color: ${t.textMuted}; }
|
|
2426
2440
|
:host([invalid]) .days label, :host([invalid]) .times label { box-shadow: inset 0 0 0 1px ${t.danger}; }
|
|
2427
|
-
`]}get currentDay(){let
|
|
2441
|
+
`]}get currentDay(){let r=this.day||this.value.split("T")[0];return this.days.find(i=>i.date===r)??this.days[0]}chooseDay(r){this.day=r,this.value&&!this.value.startsWith(`${r}T`)&&this.setFormValue(""),this.requestUpdate()}renderLabel(){return n`<legend class="label" part="label">${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:l}</legend>`}renderControl(){let r=this.currentDay;return r?n`
|
|
2428
2442
|
<div class="row-label" id=${this.id_("days")}>${this.dayLabel}</div>
|
|
2429
2443
|
<div class="days" part="days" role="radiogroup" aria-labelledby=${this.id_("days")}>
|
|
2430
|
-
${this.days.map(
|
|
2444
|
+
${this.days.map(i=>{let o=ei(i.date);return n`<label class="day"><input type="radio" name=${`${this.uid}-day`} .checked=${i.date===r.date} ?disabled=${this.disabled} @change=${()=>this.chooseDay(i.date)} />
|
|
2431
2445
|
<span class="weekday">${o.weekday}</span><span class="num">${o.day}</span><span class="month">${o.month}</span></label>`})}
|
|
2432
2446
|
</div>
|
|
2433
2447
|
<div class="row-label" id=${this.id_("times")}>${this.timeLabel}</div>
|
|
2434
2448
|
<div class="times" part="times" role="radiogroup" aria-labelledby=${this.id_("times")}>
|
|
2435
|
-
${
|
|
2436
|
-
</div>`:
|
|
2449
|
+
${Qr(r).map((i,o)=>{let d=`${r.date}T${i}`;return n`<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)} />${i}</label>`})}
|
|
2450
|
+
</div>`:n`<p class="empty">${this.emptyText}</p>`}render(){return n`<fieldset part="fieldset" ?disabled=${this.disabled} aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}>
|
|
2437
2451
|
${this.renderLabel()}
|
|
2438
|
-
${this.description?
|
|
2452
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:l}
|
|
2439
2453
|
${this.renderControl()}
|
|
2440
2454
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||l}</div>
|
|
2441
|
-
</fieldset>`}updated(
|
|
2455
|
+
</fieldset>`}updated(r){r.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-drawer",ft);customElements.define("impakt-toast",$t);customElements.define("impakt-menu",yt);customElements.define("impakt-pagination",xt);customElements.define("impakt-avatar",kt);customElements.define("impakt-avatar-group",vt);customElements.define("impakt-empty-state",wt);customElements.define("impakt-slot-picker",St);var Wt=h`
|
|
2442
2456
|
input, select {
|
|
2443
2457
|
box-sizing: border-box;
|
|
2444
2458
|
inline-size: min(100%, var(--impakt-field-width));
|
|
@@ -2446,7 +2460,7 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2446
2460
|
padding: ${s(2.5)} ${s(3)};
|
|
2447
2461
|
font: inherit;
|
|
2448
2462
|
/* 16px whatever the page around it sets, so a phone does not zoom in on focus. */
|
|
2449
|
-
font-size: max(${
|
|
2463
|
+
font-size: max(${b("md")}, 16px);
|
|
2450
2464
|
color: ${t.text};
|
|
2451
2465
|
background: ${t.surfaceCard};
|
|
2452
2466
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -2467,25 +2481,25 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2467
2481
|
}
|
|
2468
2482
|
.btn:hover { background: ${t.brandHover}; }
|
|
2469
2483
|
.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; }
|
|
2470
|
-
.visually-hidden { ${
|
|
2471
|
-
`,
|
|
2484
|
+
.visually-hidden { ${T} }
|
|
2485
|
+
`,F=class extends f{static{this.properties={...f.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=[...f.styles,B,Wt,h`
|
|
2472
2486
|
.row { display: flex; flex-wrap: wrap; gap: ${s(2)}; align-items: flex-end; }
|
|
2473
|
-
.row label { display: block; ${
|
|
2487
|
+
.row label { display: block; ${x("sm")} font-weight: ${m("semibold")}; margin-block-end: ${s(1)}; }
|
|
2474
2488
|
.postcode input { inline-size: 12ch; text-transform: uppercase; }
|
|
2475
2489
|
.choose { margin-block-start: ${s(4)}; }
|
|
2476
2490
|
.choose select { inline-size: 100%; }
|
|
2477
2491
|
.manual { display: grid; gap: ${s(3)}; margin-block-start: ${s(3)}; }
|
|
2478
|
-
.manual label { display: block; ${
|
|
2492
|
+
.manual label { display: block; ${x("sm")} margin-block-end: ${s(1)}; }
|
|
2479
2493
|
.manual input { inline-size: 100%; }
|
|
2480
|
-
.note { ${
|
|
2494
|
+
.note { ${x("sm")} color: ${t.textMuted}; margin: ${s(2)} 0 0; }
|
|
2481
2495
|
.switch { margin-block-start: ${s(3)}; }
|
|
2482
|
-
`]}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
|
|
2483
|
-
${e("line1",
|
|
2484
|
-
${e("line2",
|
|
2485
|
-
${e("town",
|
|
2486
|
-
${e("mpostcode",
|
|
2487
|
-
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${
|
|
2488
|
-
</div>`}return
|
|
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 r=new URL(this.lookupUrl,globalThis.location?.href);r.searchParams.set("postcode",e);let i=await(await fetch(r)).json();this.addresses=Array.isArray(i)?i:[]}catch{this.addresses=[]}finally{this.busy=!1,this.searched=!0}}}manualLine(){return["line1","line2","town","mpostcode"].map(r=>(this.renderRoot.querySelector(`#${this.id_(r)}`)?.value??"").trim()).filter(Boolean).join(", ")}renderControl(){if(this.manual){let e=(r,i,o)=>n`<div><label for=${this.id_(r)}>${i}</label><input id=${this.id_(r)} autocomplete=${o} @input=${()=>this.setFormValue(this.manualLine())} /></div>`;return n`<div class="manual" role="group" aria-label=${this.label}>
|
|
2497
|
+
${e("line1",w("Building and street"),"address-line1")}
|
|
2498
|
+
${e("line2",w("Second line (optional)"),"address-line2")}
|
|
2499
|
+
${e("town",w("Town or city"),"address-level2")}
|
|
2500
|
+
${e("mpostcode",w("Postcode"),"postal-code")}
|
|
2501
|
+
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${w("Find the address from the postcode")}</button>
|
|
2502
|
+
</div>`}return n`
|
|
2489
2503
|
<div class="row">
|
|
2490
2504
|
<div class="postcode"><label for=${this.controlId}>${this.postcodeLabel}</label>
|
|
2491
2505
|
<input id=${this.controlId} autocomplete="postal-code" .value=${this.postcode} aria-describedby=${this.describedBy}
|
|
@@ -2493,23 +2507,23 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2493
2507
|
@keydown=${e=>{e.key==="Enter"&&(e.preventDefault(),this.find())}} /></div>
|
|
2494
2508
|
<button class="btn" type="button" ?disabled=${this.busy} @click=${()=>this.find()}>${this.busy?"Finding\u2026":this.findText}</button>
|
|
2495
2509
|
</div>
|
|
2496
|
-
${this.addresses.length?
|
|
2510
|
+
${this.addresses.length?n`<div class="choose"><label class="label" for=${this.id_("choose")}>${this.chooseLabel}</label>
|
|
2497
2511
|
<select id=${this.id_("choose")} @change=${e=>this.setFormValue(e.target.value)}>
|
|
2498
2512
|
<option value="">${this.addresses.length} ${this.addresses.length===1?"address":"addresses"} found</option>
|
|
2499
|
-
${this.addresses.map(e=>
|
|
2500
|
-
</select></div>`:this.searched&&!this.busy?
|
|
2513
|
+
${this.addresses.map(e=>n`<option value=${e.line} ?selected=${e.line===this.value}>${e.line}</option>`)}
|
|
2514
|
+
</select></div>`:this.searched&&!this.busy?n`<p class="note" role="status">${this.notFoundText}</p>`:l}
|
|
2501
2515
|
<button class="quiet switch" type="button" @click=${()=>{this.manual=!0}}>${this.manualText}</button>
|
|
2502
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
2516
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Tt=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,v,R,M("a"),h`
|
|
2503
2517
|
:host { display: block; }
|
|
2504
2518
|
.box { padding: ${s(5)}; border: ${t.borderThick} solid ${t.danger}; border-inline-start-width: 6px; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
2505
2519
|
.box:focus { outline: 3px solid ${t.danger}; outline-offset: 2px; }
|
|
2506
|
-
h2 { margin: 0 0 ${s(3)}; ${
|
|
2520
|
+
h2 { margin: 0 0 ${s(3)}; ${x("lg")} font-weight: ${m("bold")}; color: ${t.text}; }
|
|
2507
2521
|
ul { margin: 0; padding: 0; list-style: none; display: grid; gap: ${s(2)}; }
|
|
2508
2522
|
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.dangerText}; font-weight: ${m("semibold")}; text-underline-offset: 0.2em; }
|
|
2509
|
-
`]}go(e,
|
|
2523
|
+
`]}go(e,r){let i=r.replace(/^#/,""),d=this.getRootNode().querySelector?.(`#${CSS.escape(i)}`)??document.getElementById(i);d&&(e.preventDefault(),d.scrollIntoView({block:"center"}),d.focus())}updated(e){let r=e.get("items");e.has("items")&&this.items.length&&!r?.length&&this.renderRoot.querySelector(".box")?.focus()}render(){return this.items.length?n`<div class="box" role="alert" tabindex="-1" aria-labelledby=${this.id_("h")} part="box">
|
|
2510
2524
|
<h2 id=${this.id_("h")}>${this.heading}</h2>
|
|
2511
|
-
<ul>${this.items.map(e=>
|
|
2512
|
-
</div>`:l}},
|
|
2525
|
+
<ul>${this.items.map(e=>n`<li><a href=${e.href} @click=${r=>this.go(r,e.href)}>${e.text}</a></li>`)}</ul>
|
|
2526
|
+
</div>`:l}},ti=a=>a>=1048576?w("{size} MB",{size:(a/1048576).toFixed(1)}):w("{size} KB",{size:Math.max(1,Math.round(a/1024))}),G=class extends f{static{this.properties={...f.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=[...f.styles,Wt,S,M("label.btn, .quiet"),h`
|
|
2513
2527
|
.zone { display: flex; flex-wrap: wrap; align-items: center; gap: ${s(3)}; padding: ${s(5)}; border: 2px dashed ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
2514
2528
|
.zone.over { border-color: ${t.brand}; background: ${t.brandSubtle}; }
|
|
2515
2529
|
:host([invalid]) .zone { border-color: ${t.danger}; border-style: solid; }
|
|
@@ -2520,80 +2534,108 @@ var ce=globalThis,pe=ce.ShadowRoot&&(ce.ShadyCSS===void 0||ce.ShadyCSS.nativeSha
|
|
|
2520
2534
|
input[type='file']:focus-visible + label.btn { box-shadow: ${t.focusShadow}; }
|
|
2521
2535
|
ul { margin: ${s(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${s(2)}; }
|
|
2522
2536
|
li { display: flex; justify-content: space-between; gap: ${s(3)}; align-items: center; padding: ${s(2)} ${s(3)}; border-radius: ${t.radius}; background: ${t.surfaceInset}; }
|
|
2523
|
-
.size { color: ${t.textMuted}; ${
|
|
2524
|
-
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return
|
|
2537
|
+
.size { color: ${t.textMuted}; ${x("sm")} }
|
|
2538
|
+
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return w("{file} is bigger than {size} MB",{file:e.name,size:this.maxSizeMb});let r=this.accept.split(",").map(i=>i.trim().toLowerCase()).filter(Boolean);return r.length&&!r.some(i=>i.startsWith(".")?e.name.toLowerCase().endsWith(i):e.type===i||i.endsWith("/*")&&e.type.startsWith(i.slice(0,-1)))?w("{file} must be {kinds}",{file:e.name,kinds:r.map(i=>i.replace(".","").toUpperCase()).join(", ")}):null}add(e){let r=Array.from(e),i=r.map(c=>this.fits(c)).filter(c=>!!c),o=r.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=i.join(". "),this.said=d.map(c=>w("{file} added",{file:c.name})).join(". "),this.sync()}removeFile(e){let r=this.files[e];this.files=this.files.filter((i,o)=>o!==e),this.said=r?w("{file} removed",{file:r.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 n`
|
|
2525
2539
|
<div class="zone ${this.over?"over":""}"
|
|
2526
2540
|
@dragover=${e=>{e.preventDefault(),this.over=!0}}
|
|
2527
2541
|
@dragleave=${()=>{this.over=!1}}
|
|
2528
2542
|
@drop=${e=>{e.preventDefault(),this.over=!1,e.dataTransfer?.files&&this.add(e.dataTransfer.files)}}>
|
|
2529
2543
|
<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}
|
|
2530
|
-
@change=${e=>{let
|
|
2544
|
+
@change=${e=>{let r=e.target.files;r&&this.add(r),e.target.value=""}} />
|
|
2531
2545
|
<label class="btn" for=${this.controlId}>${this.chooseText}</label>
|
|
2532
2546
|
<span class="drop">${this.dropText}</span>
|
|
2533
2547
|
</div>
|
|
2534
2548
|
<p class="visually-hidden" role="status">${this.said}</p>
|
|
2535
|
-
${this.files.length?
|
|
2536
|
-
`}};function
|
|
2549
|
+
${this.files.length?n`<ul aria-label=${w("Files added")}>${this.files.map((e,r)=>n`<li><span>${e.name} <span class="size">${ti(e.size)}</span></span><button class="quiet" type="button" @click=${()=>this.removeFile(r)}>${w("Remove")}<span class="visually-hidden"> ${e.name}</span></button></li>`)}</ul>`:l}
|
|
2550
|
+
`}};function Ut(a){try{return new Intl.NumberFormat(H(),{style:"currency",currency:a,maximumFractionDigits:0}).formatToParts(0).find(e=>e.type==="currency")?.value??""}catch{return""}}function jt(a){let e=a.replace(/[^\d.]/g,"");if(!e)return"";let[r,i]=e.split(".");return`${Number(r).toLocaleString("en-GB")}${i!==void 0?`.${i.slice(0,2)}`:""}`}var he=class extends f{static{this.properties={...f.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=[...f.styles,B,Wt,h`
|
|
2537
2551
|
.wrap { display: flex; align-items: stretch; inline-size: min(100%, var(--impakt-field-width)); }
|
|
2538
2552
|
.sign { display: flex; align-items: center; padding: 0 ${s(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}; }
|
|
2539
2553
|
.wrap input { inline-size: 100%; border-radius: 0 ${t.radiusLg} ${t.radiusLg} 0; }
|
|
2540
|
-
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=
|
|
2541
|
-
<span class="sign" id=${this.id_("sign")}>${
|
|
2554
|
+
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=jt(this.value))}typed(e){let r=e.replace(/[^\d.]/g,""),i=this.pence?r:r.split(".")[0];this.shown=e,this.setFormValue(i)}check(){this.shown=jt(this.value);let e=Number(this.value);if(!this.value)return;let r=i=>`${Ut(this.currency)}${i.toLocaleString("en-GB")}`;this.lowest!==void 0&&e<this.lowest?this.error=w("Enter an amount of {amount} or more",{amount:r(this.lowest)}):this.highest!==void 0&&e>this.highest?this.error=w("Enter an amount of {amount} or less",{amount:r(this.highest)}):(this.error===w("Enter an amount of {amount} or more",{amount:r(this.lowest??0)})||this.error===w("Enter an amount of {amount} or less",{amount:r(this.highest??0)}))&&(this.error="")}get describedBy(){let e=[Ut(this.currency)?this.id_("sign"):"",super.describedBy===l?"":String(super.describedBy)].filter(Boolean);return e.length?e.join(" "):l}renderControl(){return n`<div class="wrap">
|
|
2555
|
+
<span class="sign" id=${this.id_("sign")}>${Ut(this.currency)}</span>
|
|
2542
2556
|
<input id=${this.controlId} inputmode=${this.pence?"decimal":"numeric"} .value=${this.shown} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required}
|
|
2543
2557
|
aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":l}
|
|
2544
2558
|
@input=${e=>this.typed(e.target.value)} @blur=${()=>this.check()} />
|
|
2545
|
-
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
2559
|
+
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},zt=class extends f{static{this.properties={...f.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=[...f.styles,h`
|
|
2546
2560
|
.top { display: flex; justify-content: space-between; gap: ${s(3)}; }
|
|
2547
2561
|
output { font-weight: ${m("semibold")}; color: ${t.text}; }
|
|
2548
2562
|
input { inline-size: 100%; min-block-size: 32px; margin: 0; accent-color: ${t.brand}; }
|
|
2549
|
-
.ends { display: flex; justify-content: space-between; ${
|
|
2550
|
-
`]}shownAs(e){let
|
|
2551
|
-
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?
|
|
2563
|
+
.ends { display: flex; justify-content: space-between; ${x("sm")} color: ${t.textMuted}; }
|
|
2564
|
+
`]}shownAs(e){let r=H(this),i=e.toLocaleString(r);if(this.currency)try{i=new Intl.NumberFormat(r,{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(e)}catch{}return this.unit?`${i} ${this.unit}`:i}render(){let e=Number(this.value)||0;return n`
|
|
2565
|
+
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?n` <span class="required">(${this.requiredText})</span>`:l}</label>
|
|
2552
2566
|
<output for=${this.controlId}>${this.shownAs(e)}</output></div>
|
|
2553
|
-
${this.description?
|
|
2567
|
+
${this.description?n`<div class="description" id=${this.id_("description")}>${this.description}</div>`:l}
|
|
2554
2568
|
${this.renderControl()}
|
|
2555
2569
|
<div class="ends" aria-hidden="true"><span>${this.shownAs(this.lowest)}</span><span>${this.shownAs(this.highest)}</span></div>
|
|
2556
2570
|
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||l}</div>
|
|
2557
|
-
`}renderControl(){return
|
|
2571
|
+
`}renderControl(){return n`<input id=${this.controlId} type="range" min=${this.lowest} max=${this.highest} step=${this.step} .value=${this.value} ?disabled=${this.disabled}
|
|
2558
2572
|
aria-valuetext=${this.shownAs(Number(this.value)||0)} aria-describedby=${this.describedBy}
|
|
2559
|
-
@input=${e=>this.setFormValue(e.target.value)} />`}},
|
|
2573
|
+
@input=${e=>this.setFormValue(e.target.value)} />`}},kr={done:"Completed","in-progress":"In progress","not-started":"Not started","cannot-start":"Cannot start yet"},Et=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,v,R,M("a"),h`
|
|
2560
2574
|
:host { display: block; }
|
|
2561
|
-
.h { margin: 0 0 ${s(2)}; ${
|
|
2575
|
+
.h { margin: 0 0 ${s(2)}; ${x("xl")} font-weight: ${m("bold")}; color: ${t.textHeading}; }
|
|
2562
2576
|
.count { margin: 0 0 ${s(4)}; color: ${t.textMuted}; }
|
|
2563
2577
|
ul { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.rule}; }
|
|
2564
2578
|
li { display: flex; justify-content: space-between; align-items: center; gap: ${s(4)}; padding: ${s(4)} 0; border-block-end: 1px solid ${t.rule}; }
|
|
2565
2579
|
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.link}; font-weight: ${m("semibold")}; text-underline-offset: 0.2em; }
|
|
2566
2580
|
.title { font-weight: ${m("semibold")}; }
|
|
2567
|
-
.hint { display: block; ${
|
|
2568
|
-
.tag { flex-shrink: 0; padding: ${s(1)} ${s(2.5)}; border-radius: 999px; ${
|
|
2581
|
+
.hint { display: block; ${x("sm")} color: ${t.textMuted}; }
|
|
2582
|
+
.tag { flex-shrink: 0; padding: ${s(1)} ${s(2.5)}; border-radius: 999px; ${x("sm")} font-weight: ${m("semibold")}; background: ${t.surfaceInset}; color: ${t.text}; }
|
|
2569
2583
|
.tag[data-status='done'] { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
2570
2584
|
.tag[data-status='in-progress'] { background: ${t.brandSubtle}; color: ${t.link}; }
|
|
2571
2585
|
.tag[data-status='cannot-start'] { background: transparent; color: ${t.textMuted}; }
|
|
2572
|
-
`]}render(){let e=this.items.filter(
|
|
2573
|
-
${this.heading?
|
|
2574
|
-
${this.items.length?
|
|
2575
|
-
<ul>${this.items.map(
|
|
2576
|
-
<span>${
|
|
2577
|
-
${
|
|
2578
|
-
<span class="tag" data-status=${
|
|
2579
|
-
</li>`)}</ul>`}};
|
|
2586
|
+
`]}render(){let e=this.items.filter(r=>r.status==="done").length;return n`
|
|
2587
|
+
${this.heading?n`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:l}
|
|
2588
|
+
${this.items.length?n`<p class="count">${w(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}
|
|
2589
|
+
<ul>${this.items.map(r=>n`<li>
|
|
2590
|
+
<span>${r.href&&r.status!=="cannot-start"?n`<a href=${r.href} aria-describedby=${this.id_(`s-${r.id}`)}>${r.title}</a>`:n`<span class="title">${r.title}</span>`}
|
|
2591
|
+
${r.hint?n`<span class="hint">${r.hint}</span>`:l}</span>
|
|
2592
|
+
<span class="tag" data-status=${r.status} id=${this.id_(`s-${r.id}`)}>${kr[r.status]?w(kr[r.status]):r.status}</span>
|
|
2593
|
+
</li>`)}</ul>`}};F.createProperty("manual",{state:!0});F.createProperty("postcode",{state:!0});F.createProperty("searched",{state:!0});F.createProperty("busy",{state:!0});G.createProperty("files",{state:!0});G.createProperty("over",{state:!0});G.createProperty("said",{state:!0});he.createProperty("shown",{state:!0});customElements.define("impakt-address-lookup",F);customElements.define("impakt-error-summary",Tt);customElements.define("impakt-file-upload",G);customElements.define("impakt-money-input",he);customElements.define("impakt-range-input",zt);customElements.define("impakt-task-list",Et);export{le as CYCLE,f as FieldElement,Pt as ICONS,Fr as ICON_NAMES,Ze as ImpaktAccordion,F as ImpaktAddressLookup,Oe as ImpaktAlert,Ce as ImpaktAppShell,kt as ImpaktAvatar,vt as ImpaktAvatarGroup,et as ImpaktBadge,pt as ImpaktBreadcrumbs,Se as ImpaktButton,De as ImpaktCard,Ee as ImpaktCheckbox,rt as ImpaktCheckboxGroup,Qe as ImpaktChip,it as ImpaktDateInput,Re as ImpaktDateTile,st as ImpaktDialog,ht as ImpaktDivider,Ve as ImpaktDocumentLink,ft as ImpaktDrawer,p as ImpaktElement,wt as ImpaktEmptyState,Tt as ImpaktErrorSummary,bt as ImpaktFieldset,G as ImpaktFileUpload,Ie as ImpaktFilterChip,ot as ImpaktGrid,qe as ImpaktHeading,nt as ImpaktHelp,we as ImpaktIcon,je as ImpaktImage,Ue as ImpaktLink,at as ImpaktList,We as ImpaktLogo,yt as ImpaktMenu,he as ImpaktMoneyInput,ct as ImpaktNav,lt as ImpaktPage,xt as ImpaktPagination,Ke as ImpaktPrice,Je as ImpaktProgress,Ne as ImpaktRadioGroup,zt as ImpaktRangeInput,Le as ImpaktRow,dt as ImpaktSection,Be as ImpaktSegmentedControl,ze as ImpaktSelect,Me as ImpaktSideNav,St as ImpaktSlotPicker,ut as ImpaktSpacer,Pe as ImpaktStack,_e as ImpaktStatTile,Xe as ImpaktSummaryList,He as ImpaktSwitch,Ae as ImpaktTabBar,Ge as ImpaktTable,gt as ImpaktTabs,Et as ImpaktTaskList,Fe as ImpaktText,Te as ImpaktTextInput,tt as ImpaktTextarea,$t as ImpaktToast,mt as ImpaktVisuallyHidden,D as LitElement,ne as TONE,oe as announceNavigate,fr as base,h as css,B as fieldWidths,v as focusRing,b as fontSize,m as fontWeight,jt as groupDigits,$r as hideOn,n as html,z as iconSvg,Dt as isCurrent,I as lineHeight,pe as lockScroll,L as noChange,l as nothing,H as pageLocale,br as reducedMotion,re as render,w as say,s as space,R as spaceAround,y as svg,t,S as targetSize,u as token,qt as toneOf,M as touchTarget,x as type,X as unlockScroll,_ as unsafeCSS,T as visuallyHidden};
|
|
2580
2594
|
/*! Bundled license information:
|
|
2581
2595
|
|
|
2582
|
-
|
|
2596
|
+
lit-html/lit-html.js:
|
|
2597
|
+
(**
|
|
2598
|
+
* @license
|
|
2599
|
+
* Copyright 2017 Google LLC
|
|
2600
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2601
|
+
*)
|
|
2602
|
+
|
|
2603
|
+
lit-html/private-ssr-support.js:
|
|
2583
2604
|
(**
|
|
2584
2605
|
* @license
|
|
2585
2606
|
* Copyright 2019 Google LLC
|
|
2586
2607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2587
2608
|
*)
|
|
2588
2609
|
|
|
2589
|
-
|
|
2610
|
+
lit-html/directive.js:
|
|
2590
2611
|
(**
|
|
2591
2612
|
* @license
|
|
2592
2613
|
* Copyright 2017 Google LLC
|
|
2593
2614
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2594
2615
|
*)
|
|
2595
2616
|
|
|
2596
|
-
lit-html/
|
|
2617
|
+
lit-html/directive-helpers.js:
|
|
2618
|
+
(**
|
|
2619
|
+
* @license
|
|
2620
|
+
* Copyright 2020 Google LLC
|
|
2621
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2622
|
+
*)
|
|
2623
|
+
|
|
2624
|
+
@lit-labs/ssr-client/lib/hydrate-lit-html.js:
|
|
2625
|
+
(**
|
|
2626
|
+
* @license
|
|
2627
|
+
* Copyright 2019 Google LLC
|
|
2628
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2629
|
+
*)
|
|
2630
|
+
|
|
2631
|
+
@lit/reactive-element/css-tag.js:
|
|
2632
|
+
(**
|
|
2633
|
+
* @license
|
|
2634
|
+
* Copyright 2019 Google LLC
|
|
2635
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2636
|
+
*)
|
|
2637
|
+
|
|
2638
|
+
@lit/reactive-element/reactive-element.js:
|
|
2597
2639
|
(**
|
|
2598
2640
|
* @license
|
|
2599
2641
|
* Copyright 2017 Google LLC
|