@atomic-ui/ui 0.13.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +71 -2
- package/dist/base/motion.d.ts +44 -0
- package/dist/{chunk-DKVLA7AF.js → chunk-22XEQ4HD.js} +2 -2
- package/dist/{chunk-X57BTN6V.js → chunk-46DONRMK.js} +11 -1
- package/dist/chunk-46DONRMK.js.map +1 -0
- package/dist/{chunk-H5HWJ2D4.js → chunk-7RZYC2IX.js} +2 -2
- package/dist/chunk-FF6GQADC.js +241 -0
- package/dist/chunk-FF6GQADC.js.map +1 -0
- package/dist/{chunk-WGFHYSXH.js → chunk-FJOZL25F.js} +3 -2
- package/dist/{chunk-WGFHYSXH.js.map → chunk-FJOZL25F.js.map} +1 -1
- package/dist/{chunk-NCVBRUJM.js → chunk-FQ4I6TD6.js} +11 -6
- package/dist/chunk-FQ4I6TD6.js.map +1 -0
- package/dist/{chunk-K5QFVLCI.js → chunk-GHUVRNWS.js} +8 -3
- package/dist/chunk-GHUVRNWS.js.map +1 -0
- package/dist/{chunk-VR543SMV.js → chunk-IBBW4CVA.js} +2 -2
- package/dist/{chunk-EFP7PJ6C.js → chunk-J3XAAGFG.js} +7 -2
- package/dist/chunk-J3XAAGFG.js.map +1 -0
- package/dist/{chunk-JDKOHA3B.js → chunk-JBEPS77S.js} +2 -2
- package/dist/chunk-K542UBDD.js +100 -0
- package/dist/chunk-K542UBDD.js.map +1 -0
- package/dist/{chunk-C767LTJE.js → chunk-KBCCL45Y.js} +3 -3
- package/dist/chunk-KBCCL45Y.js.map +1 -0
- package/dist/{chunk-BTACNWU6.js → chunk-KXHRD4FK.js} +2 -2
- package/dist/{chunk-CN4J5RS2.js → chunk-LRDK2G3E.js} +2 -2
- package/dist/{chunk-JX5RJRME.js → chunk-MXPFOBXZ.js} +15 -3
- package/dist/chunk-MXPFOBXZ.js.map +1 -0
- package/dist/{chunk-KDU2POFS.js → chunk-NN6L3HLD.js} +2 -2
- package/dist/{chunk-GIIJ32FN.js → chunk-NTRIND3W.js} +2 -2
- package/dist/{chunk-6IQIFKY6.js → chunk-SLNHUYGJ.js} +2 -2
- package/dist/{chunk-273AYERA.js → chunk-YOJF5ESL.js} +2 -2
- package/dist/components/app-bar.js +2 -2
- package/dist/components/app-ui.js +2 -2
- package/dist/components/button.js +2 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.js +2 -2
- package/dist/components/chip-group.js +3 -2
- package/dist/components/chip.js +1 -1
- package/dist/components/date-input.js +2 -2
- package/dist/components/journey.js +2 -2
- package/dist/components/link.js +2 -1
- package/dist/components/navigation.d.ts +3 -2
- package/dist/components/navigation.js +1 -1
- package/dist/components/page.js +1 -1
- package/dist/components/radio-group.js +2 -2
- package/dist/components/select.js +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/text-input.js +2 -2
- package/dist/components/textarea.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +41 -17
- package/dist/reveal.d.ts +54 -0
- package/dist/reveal.js +19 -0
- package/dist/reveal.js.map +1 -0
- package/dist/standalone/atomic-ui-reveal.js +3 -0
- package/dist/standalone/atomic-ui-reveal.js.map +7 -0
- package/dist/standalone/atomic-ui.js +773 -689
- package/dist/standalone/atomic-ui.js.map +4 -4
- package/package.json +10 -2
- package/dist/chunk-C767LTJE.js.map +0 -1
- package/dist/chunk-EFP7PJ6C.js.map +0 -1
- package/dist/chunk-JX5RJRME.js.map +0 -1
- package/dist/chunk-K5QFVLCI.js.map +0 -1
- package/dist/chunk-NCVBRUJM.js.map +0 -1
- package/dist/chunk-X57BTN6V.js.map +0 -1
- /package/dist/{chunk-DKVLA7AF.js.map → chunk-22XEQ4HD.js.map} +0 -0
- /package/dist/{chunk-H5HWJ2D4.js.map → chunk-7RZYC2IX.js.map} +0 -0
- /package/dist/{chunk-VR543SMV.js.map → chunk-IBBW4CVA.js.map} +0 -0
- /package/dist/{chunk-JDKOHA3B.js.map → chunk-JBEPS77S.js.map} +0 -0
- /package/dist/{chunk-BTACNWU6.js.map → chunk-KXHRD4FK.js.map} +0 -0
- /package/dist/{chunk-CN4J5RS2.js.map → chunk-LRDK2G3E.js.map} +0 -0
- /package/dist/{chunk-KDU2POFS.js.map → chunk-NN6L3HLD.js.map} +0 -0
- /package/dist/{chunk-GIIJ32FN.js.map → chunk-NTRIND3W.js.map} +0 -0
- /package/dist/{chunk-6IQIFKY6.js.map → chunk-SLNHUYGJ.js.map} +0 -0
- /package/dist/{chunk-273AYERA.js.map → chunk-YOJF5ESL.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @atomic-ui/ui version 0.
|
|
2
|
-
var
|
|
3
|
-
\f\r]`,
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),yi=/'/g,ki=/"/g,Si=/^(?:script|style|textarea|title)$/i,ei=s=>(e,...i)=>({_$litType$:s,strings:e,values:i}),o=ei(1),y=ei(2),Fr=ei(3),P=Symbol.for("lit-noChange"),l=Symbol.for("lit-nothing"),vi=new WeakMap,Y=J.createTreeWalker(J,129);function Ti(s,e){if(!Qt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return fi!==void 0?fi.createHTML(e):e}var zi=(s,e)=>{let i=s.length-1,r=[],n,c=e===2?"<svg>":e===3?"<math>":"",p=se;for(let $=0;$<i;$++){let g=s[$],k,_,A=-1,j=0;for(;j<g.length&&(p.lastIndex=j,_=p.exec(g),_!==null);)j=p.lastIndex,p===se?_[1]==="!--"?p=$i:_[1]!==void 0?p=xi:_[2]!==void 0?(Si.test(_[2])&&(n=RegExp("</"+_[2],"g")),p=X):_[3]!==void 0&&(p=X):p===X?_[0]===">"?(p=n??se,A=-1):_[1]===void 0?A=-2:(A=p.lastIndex-_[2].length,k=_[1],p=_[3]===void 0?X:_[3]==='"'?ki:yi):p===ki||p===yi?p=X:p===$i||p===xi?p=se:(p=X,n=void 0);let G=p===X&&s[$+1].startsWith("/>")?" ":"";c+=p===se?g+Zi:A>=0?(r.push(k),g.slice(0,A)+Jt+g.slice(A)+U+G):g+U+(A===-2?$:G)}return[Ti(s,c+(s[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},de=class s{constructor({strings:e,_$litType$:i},r){let n;this.parts=[];let c=0,p=0,$=e.length-1,g=this.parts,[k,_]=zi(e,i);if(this.el=s.createElement(k,r),Y.currentNode=this.el.content,i===2||i===3){let A=this.el.content.firstChild;A.replaceWith(...A.childNodes)}for(;(n=Y.nextNode())!==null&&g.length<$;){if(n.nodeType===1){if(n.hasAttributes())for(let A of n.getAttributeNames())if(A.endsWith(Jt)){let j=_[p++],G=n.getAttribute(A).split(U),ve=/([.?@])?(.*)/.exec(j);g.push({type:1,index:c,name:ve[2],strings:G,ctor:ve[1]==="."?Te:ve[1]==="?"?ze:ve[1]==="@"?Me:Q}),n.removeAttribute(A)}else A.startsWith(U)&&(g.push({type:6,index:c}),n.removeAttribute(A));if(Si.test(n.tagName)){let A=n.textContent.split(U),j=A.length-1;if(j>0){n.textContent=we?we.emptyScript:"";for(let G=0;G<j;G++)n.append(A[G],ne()),Y.nextNode(),g.push({type:2,index:++c});n.append(A[j],ne())}}}else if(n.nodeType===8)if(n.data===Zt)g.push({type:2,index:c});else{let A=-1;for(;(A=n.data.indexOf(U,A+1))!==-1;)g.push({type:7,index:c}),A+=U.length-1}c++}}static createElement(e,i){let r=J.createElement("template");return r.innerHTML=e,r}};function Z(s,e,i=s,r){if(e===P)return e;let n=r!==void 0?i._$Co?.[r]:i._$Cl,c=le(e)?void 0:e._$litDirective$;return n?.constructor!==c&&(n?._$AO?.(!1),c===void 0?n=void 0:(n=new c(s),n._$AT(s,i,r)),r!==void 0?(i._$Co??=[])[r]=n:i._$Cl=n),n!==void 0&&(e=Z(s,n._$AS(s,e.values),n,r)),e}var Se=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,n=(e?.creationScope??J).importNode(i,!0);Y.currentNode=n;let c=Y.nextNode(),p=0,$=0,g=r[0];for(;g!==void 0;){if(p===g.index){let k;g.type===2?k=new ie(c,c.nextSibling,this,e):g.type===1?k=new g.ctor(c,g.name,g.strings,this,e):g.type===6&&(k=new Ee(c,this,e)),this._$AV.push(k),g=r[++$]}p!==g?.index&&(c=Y.nextNode(),p++)}return Y.currentNode=J,n}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++}},ie=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,n){this.type=2,this._$AH=l,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=n,this._$Cv=n?.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=Z(this,e,i),le(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):wi(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&&le(this._$AH)?this._$AA.nextSibling.data=e:this.T(J.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=de.createElement(Ti(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(i);else{let c=new Se(n,this),p=c.u(this.options);c.p(i),this.T(p),this._$AH=c}}_$AC(e){let i=vi.get(e.strings);return i===void 0&&vi.set(e.strings,i=new de(e)),i}k(e){Qt(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,r,n=0;for(let c of e)n===i.length?i.push(r=new s(this.O(ne()),this.O(ne()),this,this.options)):r=i[n],r._$AI(c),n++;n<i.length&&(this._$AR(r&&r._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let r=bi(e).nextSibling;bi(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,n,c){this.type=1,this._$AH=l,this._$AN=void 0,this.element=e,this.name=i,this._$AM=n,this.options=c,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,n){let c=this.strings,p=!1;if(c===void 0)e=Z(this,e,i,0),p=!le(e)||e!==this._$AH&&e!==P,p&&(this._$AH=e);else{let $=e,g,k;for(e=c[0],g=0;g<c.length-1;g++)k=Z(this,$[r+g],i,g),k===P&&(k=this._$AH[g]),p||=!le(k)||k!==this._$AH[g],k===l?e=l:e!==l&&(e+=(k??"")+c[g+1]),this._$AH[g]=k}p&&!n&&this.j(e)}j(e){e===l?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Te=class extends Q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===l?void 0:e}},ze=class extends Q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==l)}},Me=class extends Q{constructor(e,i,r,n,c){super(e,i,r,n,c),this.type=5}_$AI(e,i=this){if((e=Z(this,e,i,0)??l)===P)return;let r=this._$AH,n=e===l&&r!==l||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,c=e!==l&&(r===l||n);n&&this.element.removeEventListener(this.name,this,r),c&&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)}},Ee=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){Z(this,e)}},B={M:Jt,P:U,A:Zt,C:1,L:zi,R:Se,D:wi,V:Z,I:ie,H:Q,N:ze,U:Me,B:Te,F:Ee},Qi=Yt.litHtmlPolyfillSupport;Qi?.(de,ie),(Yt.litHtmlVersions??=[]).push("3.3.3");var ce=(s,e,i)=>{let r=i?.renderBefore??e,n=r._$litPart$;if(n===void 0){let c=i?.renderBefore??null;r._$litPart$=n=new ie(e.insertBefore(ne(),c),c,void 0,i??{})}return n._$AI(s),n};var ti=null,Mi={boundAttributeSuffix:B.M,marker:B.P,markerMatch:B.A,HTML_RESULT:B.C,getTemplateHtml:B.L,overrideDirectiveResolve:(s,e)=>class extends s{_$AS(i,r){return e(this,r)}},patchDirectiveResolve:(s,e)=>{if(s.prototype._$AS.name!==e.name){ti??=s.prototype._$AS.name;for(let i=s.prototype;i!==Object.prototype;i=Object.getPrototypeOf(i))if(i.hasOwnProperty(ti))return void(i[ti]=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(s,e){s._$litDirective$=e},getAttributePartCommittedValue:(s,e,i)=>{let r=P;return s.j=n=>r=n,s._$AI(e,s,i),r},connectedDisconnectable:s=>({...s,_$AU:!0}),resolveDirective:B.V,AttributePart:B.H,PropertyPart:B.B,BooleanAttributePart:B.N,EventPart:B.U,ElementPart:B.F,TemplateInstance:B.R,isIterable:B.D,ChildPart:B.I};var re={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};var{I:Kr}=B;var Ei=s=>s===null||typeof s!="object"&&typeof s!="function";var Ai=(s,e)=>e===void 0?s?._$litType$!==void 0:s?._$litType$===e,Ci=s=>s?._$litType$?.h!=null;var Li=s=>s.strings===void 0;var{TemplateInstance:er,isIterable:tr,resolveDirective:Ri,ChildPart:pe,ElementPart:ir}=Mi,_i=(s,e,i={})=>{if(e._$litPart$!==void 0)throw Error("container already contains a live render");let r,n,c,p=[],$=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),g;for(;(g=$.nextNode())!==null;){let k=g.data;if(k.startsWith("lit-part")){if(p.length===0&&r!==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 (${n})`);c=rr(s,g,p,i),r===void 0&&(r=c),n??=g}else if(k.startsWith("lit-node"))or(g,p,i);else if(k.startsWith("/lit-part")){if(p.length===1&&c!==r)throw Error("internal error");c=ar(g,c,p)}}if(r===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$=r},rr=(s,e,i,r)=>{let n,c;if(i.length===0)c=new pe(e,null,void 0,r),n=s;else{let p=i[i.length-1];if(p.type==="template-instance")c=new pe(e,null,p.instance,r),p.instance._$AV.push(c),n=p.result.values[p.instancePartIndex++],p.templatePartIndex++;else if(p.type==="iterable"){c=new pe(e,null,p.part,r);let $=p.iterator.next();if($.done)throw n=void 0,p.done=!0,Error("Unhandled shorter than expected iterable");n=$.value,p.part._$AH.push(c)}else c=new pe(e,null,p.part,r)}if(n=Ri(c,n),n===P)i.push({part:c,type:"leaf"});else if(Ei(n))i.push({part:c,type:"leaf"}),c._$AH=n;else if(Ai(n)){if(Ci(n))throw Error("compiled templates are not supported");let p="lit-part "+sr(n);if(e.data!==p)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let $=pe.prototype._$AC(n),g=new er($,c);i.push({type:"template-instance",instance:g,part:c,templatePartIndex:0,instancePartIndex:0,result:n}),c._$AH=g}}else tr(n)?(i.push({part:c,type:"iterable",value:n,iterator:n[Symbol.iterator](),done:!1}),c._$AH=[]):(i.push({part:c,type:"leaf"}),c._$AH=n??"");return c},ar=(s,e,i)=>{if(e===void 0)throw Error("unbalanced part marker");e._$AB=s;let r=i.pop();if(r.type==="iterable"&&!r.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},or=(s,e,i)=>{let r=/lit-node (\d+)/.exec(s.data),n=parseInt(r[1]),c=s.nextElementSibling;if(c===null)throw Error("could not find node for attribute parts");c.removeAttribute("defer-hydration");let p=e[e.length-1];if(p.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 $=p.instance;for(;;){let g=$._$AD.parts[p.templatePartIndex];if(g===void 0||g.type!==re.ATTRIBUTE&&g.type!==re.ELEMENT||g.index!==n)break;if(g.type===re.ATTRIBUTE){let k=new g.ctor(c,g.name,g.strings,p.instance,i),_=Li(k)?p.result.values[p.instancePartIndex]:p.result.values,A=!(k.type===re.EVENT||k.type===re.PROPERTY);k._$AI(_,k,p.instancePartIndex,A),p.instancePartIndex+=g.strings.length-1,$._$AV.push(k)}else{let k=new ir(c,p.instance,i);Ri(k,p.result.values[p.instancePartIndex++]),$._$AV.push(k)}p.templatePartIndex++}}},Ii=new WeakMap,sr=s=>{let e=Ii.get(s.strings);if(e!==void 0)return e;let i=new Uint32Array(2).fill(5381);for(let n of s.strings)for(let c=0;c<n.length;c++)i[c%2]=33*i[c%2]^n.charCodeAt(c);let r=String.fromCharCode(...new Uint8Array(i.buffer));return e=btoa(r),Ii.set(s.strings,e),e};globalThis.litElementHydrateSupport=({LitElement:s})=>{let e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"observedAttributes").get;Object.defineProperty(s,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});let i=s.prototype.attributeChangedCallback;s.prototype.attributeChangedCallback=function(p,$,g){p==="defer-hydration"&&g===null&&r.call(this),i.call(this,p,$,g)};let r=s.prototype.connectedCallback;s.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||r.call(this)};let n=s.prototype.createRenderRoot;s.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):n.call(this)};let c=Object.getPrototypeOf(s.prototype).update;s.prototype.update=function(p){let $=this.render();if(c.call(this,p),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)}_i($,this.renderRoot,this.renderOptions)}else ce($,this.renderRoot,this.renderOptions)}};var Ae=globalThis,Ce=Ae.ShadowRoot&&(Ae.ShadyCSS===void 0||Ae.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ii=Symbol(),Hi=new WeakMap,he=class{constructor(e,i,r){if(this._$cssResult$=!0,r!==ii)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Ce&&e===void 0){let r=i!==void 0&&i.length===1;r&&(e=Hi.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Hi.set(i,e))}return e}toString(){return this.cssText}},L=s=>new he(typeof s=="string"?s:s+"",void 0,ii),u=(s,...e)=>{let i=s.length===1?s[0]:e.reduce((r,n,c)=>r+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[c+1],s[0]);return new he(i,s,ii)},Bi=(s,e)=>{if(Ce)s.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),n=Ae.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=i.cssText,s.appendChild(r)}},ri=Ce?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let i="";for(let r of e.cssRules)i+=r.cssText;return L(i)})(s):s;var{is:nr,defineProperty:lr,getOwnPropertyDescriptor:dr,getOwnPropertyNames:cr,getOwnPropertySymbols:pr,getPrototypeOf:hr}=Object,Le=globalThis,Ni=Le.trustedTypes,ur=Ni?Ni.emptyScript:"",mr=Le.reactiveElementPolyfillSupport,ue=(s,e)=>s,ai={toAttribute(s,e){switch(e){case Boolean:s=s?ur:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let i=s;switch(e){case Boolean:i=s!==null;break;case Number:i=s===null?null:Number(s);break;case Object:case Array:try{i=JSON.parse(s)}catch{i=null}}return i}},Oi=(s,e)=>!nr(s,e),Pi={attribute:!0,type:String,converter:ai,reflect:!1,useDefault:!1,hasChanged:Oi};Symbol.metadata??=Symbol("metadata"),Le.litPropertyMetadata??=new WeakMap;var W=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=Pi){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(e,r,i);n!==void 0&&lr(this.prototype,e,n)}}static getPropertyDescriptor(e,i,r){let{get:n,set:c}=dr(this.prototype,e)??{get(){return this[i]},set(p){this[i]=p}};return{get:n,set(p){let $=n?.call(this);c?.call(this,p),this.requestUpdate(e,$,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Pi}static _$Ei(){if(this.hasOwnProperty(ue("elementProperties")))return;let e=hr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ue("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ue("properties"))){let i=this.properties,r=[...cr(i),...pr(i)];for(let n of r)this.createProperty(n,i[n])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[r,n]of i)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[i,r]of this.elementProperties){let n=this._$Eu(i,r);n!==void 0&&this._$Eh.set(n,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let n of r)i.unshift(ri(n))}else e!==void 0&&i.push(ri(e));return i}static _$Eu(e,i){let r=i.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let r of i.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Bi(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,r){this._$AK(e,r)}_$ET(e,i){let r=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===!0){let c=(r.converter?.toAttribute!==void 0?r.converter:ai).toAttribute(i,r.type);this._$Em=e,c==null?this.removeAttribute(n):this.setAttribute(n,c),this._$Em=null}}_$AK(e,i){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let c=r.getPropertyOptions(n),p=typeof c.converter=="function"?{fromAttribute:c.converter}:c.converter?.fromAttribute!==void 0?c.converter:ai;this._$Em=n;let $=p.fromAttribute(i,c.type);this[n]=$??this._$Ej?.get(n)??$,this._$Em=null}}requestUpdate(e,i,r,n=!1,c){if(e!==void 0){let p=this.constructor;if(n===!1&&(c=this[e]),r??=p.getPropertyOptions(e),!((r.hasChanged??Oi)(c,i)||r.useDefault&&r.reflect&&c===this._$Ej?.get(e)&&!this.hasAttribute(p._$Eu(e,r))))return;this.C(e,i,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:r,reflect:n,wrapped:c},p){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,p??i??this[e]),c!==!0||p!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(i=void 0),this._$AL.set(e,i)),n===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,c]of this._$Ep)this[n]=c;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,c]of r){let{wrapped:p}=c,$=this[n];p!==!0||this._$AL.has(n)||$===void 0||this.C(n,void 0,c,$)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(i)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};W.elementStyles=[],W.shadowRootOptions={mode:"open"},W[ue("elementProperties")]=new Map,W[ue("finalized")]=new Map,mr?.({ReactiveElement:W}),(Le.reactiveElementVersions??=[]).push("2.1.2");var oi=globalThis,V=class extends W{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=ce(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return P}};V._$litElement$=!0,V.finalized=!0,oi.litElementHydrateSupport?.({LitElement:V});var gr=oi.litElementPolyfillSupport;gr?.({LitElement:V});(oi.litElementVersions??=[]).push("4.2.2");var d=(s,e)=>L(`var(--impakt-${s.replace(/\./g,"-")}, ${e})`),t={brand:d("color.brand.default","#1f4ed8"),brandHover:d("color.brand.hover","#1b45be"),brandActive:d("color.brand.active","#183ba4"),brandSubtle:d("color.brand.subtle","#e4eafa"),onBrand:d("color.text.on-brand","#ffffff"),surfaceCard:d("color.surface.card","#ffffff"),surfaceInset:d("color.surface.inset","#f4f4f4"),surfaceSubtle:d("color.surface.subtle","#e4eafa"),text:d("color.text.default","#1a1a1a"),textMuted:d("color.text.muted","#717171"),textPlaceholder:d("color.text.placeholder","#767676"),textHeading:d("color.text.heading","#1f4ed8"),link:d("color.text.link","#1f4ed8"),linkHover:d("color.text.link-hover","#193ead"),border:d("color.border.default","#929292"),borderStrong:d("color.border.strong","#818181"),danger:d("color.status.danger.default","#c8102e"),dangerText:d("color.status.danger.text","#c8102e"),dangerSubtle:d("color.status.danger.subtle","#f8e2e6"),warning:d("color.status.warning.default","#b45309"),warningText:d("color.status.warning.text","#b45309"),warningSubtle:d("color.status.warning.subtle","#f6eae1"),success:d("color.status.success.default","#047857"),successText:d("color.status.success.text","#047857"),successSubtle:d("color.status.success.subtle","#e0f0ea"),info:d("color.status.info.default","#1f4ed8"),infoText:d("color.status.info.text","#1f4ed8"),infoSubtle:d("color.status.info.subtle","#e4eafa"),fontBody:d("font.family.body","system-ui, sans-serif"),fontHeading:d("font.family.heading","system-ui, sans-serif"),fontMono:d("font.family.mono","ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"),fontEyebrow:d("font.family.eyebrow","inherit"),focusShadow:d("focus.ring.shadow","0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a"),focusOffset:d("focus.ring.offset","2px"),targetMin:d("target.min","24px"),radiusSm:d("radius.sm","2px"),radius:d("radius.md","4px"),radiusLg:d("radius.lg","8px"),borderThin:d("border.width.thin","1px"),borderThick:d("border.width.thick","2px"),radiusXs:d("radius.xs","2px"),radiusXl:d("radius.xl","12px"),radius2xl:d("radius.2xl","16px"),hairline:L("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 10%, transparent)"),rule:L("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 15%, transparent)"),wash:L("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 5%, transparent)"),brandHalo:L("color-mix(in srgb, var(--impakt-color-brand-default, #1f4ed8) 22%, transparent)"),shadowXs:d("shadow.xs","0 1px 2px 0 rgb(0 0 0 / 0.05)"),shadowSm:d("shadow.sm","0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"),shadowMd:d("shadow.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),shadowLg:d("shadow.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),shadowXl:d("shadow.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"),trackingTight:d("font.tracking.tight","-0.02em"),trackingWide:d("font.tracking.wide","0.06em")},w=s=>L(`font-size: var(--impakt-font-size-${s}, 1rem); line-height: var(--impakt-font-leading-${s}, 1.5);`),a=s=>d(`space.${String(s).replace(".","-")}`,`${s*4}px`),b=s=>d(`font.size.${s}`,"1rem"),O=s=>d(`font.line-height.${s}`,"1.5"),m=s=>d(`font.weight.${s}`,"400"),N=u`
|
|
1
|
+
/* @atomic-ui/ui version 0.14.0, standalone. */
|
|
2
|
+
var oi=globalThis,_i=o=>o,Ce=oi.trustedTypes,Hi=Ce?Ce.createPolicy("lit-html",{createHTML:o=>o}):void 0,ni="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,si="?"+X,yr=`<${si}>`,te=document,me=()=>te.createComment(""),ge=o=>o===null||typeof o!="object"&&typeof o!="function",li=Array.isArray,qi=o=>li(o)||typeof o?.[Symbol.iterator]=="function",ai=`[
|
|
3
|
+
\f\r]`,ue=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Bi=/-->/g,Ni=/>/g,Q=RegExp(`>|${ai}(?:([^\\s"'>=/]+)(${ai}*=${ai}*(?:[^
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pi=/'/g,Oi=/"/g,Fi=/^(?:script|style|textarea|title)$/i,di=o=>(e,...i)=>({_$litType$:o,strings:e,values:i}),n=di(1),k=di(2),fa=di(3),j=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Di=new WeakMap,ee=te.createTreeWalker(te,129);function ji(o,e){if(!li(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Hi!==void 0?Hi.createHTML(e):e}var Wi=(o,e)=>{let i=o.length-1,r=[],s,c=e===2?"<svg>":e===3?"<math>":"",p=ue;for(let m=0;m<i;m++){let g=o[m],f,A,z=-1,P=0;for(;P<g.length&&(p.lastIndex=P,A=p.exec(g),A!==null);)P=p.lastIndex,p===ue?A[1]==="!--"?p=Bi:A[1]!==void 0?p=Ni:A[2]!==void 0?(Fi.test(A[2])&&(s=RegExp("</"+A[2],"g")),p=Q):A[3]!==void 0&&(p=Q):p===Q?A[0]===">"?(p=s??ue,z=-1):A[1]===void 0?z=-2:(z=p.lastIndex-A[2].length,f=A[1],p=A[3]===void 0?Q:A[3]==='"'?Oi:Pi):p===Oi||p===Pi?p=Q:p===Bi||p===Ni?p=ue:(p=Q,s=void 0);let L=p===Q&&o[m+1].startsWith("/>")?" ":"";c+=p===ue?g+yr:z>=0?(r.push(f),g.slice(0,z)+ni+g.slice(z)+X+L):g+X+(z===-2?m:L)}return[ji(o,c+(o[i]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},be=class o{constructor({strings:e,_$litType$:i},r){let s;this.parts=[];let c=0,p=0,m=e.length-1,g=this.parts,[f,A]=Wi(e,i);if(this.el=o.createElement(f,r),ee.currentNode=this.el.content,i===2||i===3){let z=this.el.content.firstChild;z.replaceWith(...z.childNodes)}for(;(s=ee.nextNode())!==null&&g.length<m;){if(s.nodeType===1){if(s.hasAttributes())for(let z of s.getAttributeNames())if(z.endsWith(ni)){let P=A[p++],L=s.getAttribute(z).split(X),B=/([.?@])?(.*)/.exec(P);g.push({type:1,index:c,name:B[2],strings:L,ctor:B[1]==="."?Re:B[1]==="?"?Ie:B[1]==="@"?_e:re}),s.removeAttribute(z)}else z.startsWith(X)&&(g.push({type:6,index:c}),s.removeAttribute(z));if(Fi.test(s.tagName)){let z=s.textContent.split(X),P=z.length-1;if(P>0){s.textContent=Ce?Ce.emptyScript:"";for(let L=0;L<P;L++)s.append(z[L],me()),ee.nextNode(),g.push({type:2,index:++c});s.append(z[P],me())}}}else if(s.nodeType===8)if(s.data===si)g.push({type:2,index:c});else{let z=-1;for(;(z=s.data.indexOf(X,z+1))!==-1;)g.push({type:7,index:c}),z+=X.length-1}c++}}static createElement(e,i){let r=te.createElement("template");return r.innerHTML=e,r}};function ie(o,e,i=o,r){if(e===j)return e;let s=r!==void 0?i._$Co?.[r]:i._$Cl,c=ge(e)?void 0:e._$litDirective$;return s?.constructor!==c&&(s?._$AO?.(!1),c===void 0?s=void 0:(s=new c(o),s._$AT(o,i,r)),r!==void 0?(i._$Co??=[])[r]=s:i._$Cl=s),s!==void 0&&(e=ie(o,s._$AS(o,e.values),s,r)),e}var Le=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,s=(e?.creationScope??te).importNode(i,!0);ee.currentNode=s;let c=ee.nextNode(),p=0,m=0,g=r[0];for(;g!==void 0;){if(p===g.index){let f;g.type===2?f=new se(c,c.nextSibling,this,e):g.type===1?f=new g.ctor(c,g.name,g.strings,this,e):g.type===6&&(f=new He(c,this,e)),this._$AV.push(f),g=r[++m]}p!==g?.index&&(c=ee.nextNode(),p++)}return ee.currentNode=te,s}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++}},se=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,i,r,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=r,this.options=s,this._$Cv=s?.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=ie(this,e,i),ge(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==j&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qi(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!==d&&ge(this._$AH)?this._$AA.nextSibling.data=e:this.T(te.createTextNode(e)),this._$AH=e}$(e){let{values:i,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=be.createElement(ji(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(i);else{let c=new Le(s,this),p=c.u(this.options);c.p(i),this.T(p),this._$AH=c}}_$AC(e){let i=Di.get(e.strings);return i===void 0&&Di.set(e.strings,i=new be(e)),i}k(e){li(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,r,s=0;for(let c of e)s===i.length?i.push(r=new o(this.O(me()),this.O(me()),this,this.options)):r=i[s],r._$AI(c),s++;s<i.length&&(this._$AR(r&&r._$AB.nextSibling,s),i.length=s)}_$AR(e=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);e!==this._$AB;){let r=_i(e).nextSibling;_i(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},re=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,i,r,s,c){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=i,this._$AM=s,this.options=c,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(e,i=this,r,s){let c=this.strings,p=!1;if(c===void 0)e=ie(this,e,i,0),p=!ge(e)||e!==this._$AH&&e!==j,p&&(this._$AH=e);else{let m=e,g,f;for(e=c[0],g=0;g<c.length-1;g++)f=ie(this,m[r+g],i,g),f===j&&(f=this._$AH[g]),p||=!ge(f)||f!==this._$AH[g],f===d?e=d:e!==d&&(e+=(f??"")+c[g+1]),this._$AH[g]=f}p&&!s&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Re=class extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}},Ie=class extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}},_e=class extends re{constructor(e,i,r,s,c){super(e,i,r,s,c),this.type=5}_$AI(e,i=this){if((e=ie(this,e,i,0)??d)===j)return;let r=this._$AH,s=e===d&&r!==d||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,c=e!==d&&(r===d||s);s&&this.element.removeEventListener(this.name,this,r),c&&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)}},He=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){ie(this,e)}},O={M:ni,P:X,A:si,C:1,L:Wi,R:Le,D:qi,V:ie,I:se,H:re,N:Ie,U:_e,B:Re,F:He},kr=oi.litHtmlPolyfillSupport;kr?.(be,se),(oi.litHtmlVersions??=[]).push("3.3.3");var fe=(o,e,i)=>{let r=i?.renderBefore??e,s=r._$litPart$;if(s===void 0){let c=i?.renderBefore??null;r._$litPart$=s=new se(e.insertBefore(me(),c),c,void 0,i??{})}return s._$AI(o),s};var ci=null,Ui={boundAttributeSuffix:O.M,marker:O.P,markerMatch:O.A,HTML_RESULT:O.C,getTemplateHtml:O.L,overrideDirectiveResolve:(o,e)=>class extends o{_$AS(i,r){return e(this,r)}},patchDirectiveResolve:(o,e)=>{if(o.prototype._$AS.name!==e.name){ci??=o.prototype._$AS.name;for(let i=o.prototype;i!==Object.prototype;i=Object.getPrototypeOf(i))if(i.hasOwnProperty(ci))return void(i[ci]=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(o,e){o._$litDirective$=e},getAttributePartCommittedValue:(o,e,i)=>{let r=j;return o.j=s=>r=s,o._$AI(e,o,i),r},connectedDisconnectable:o=>({...o,_$AU:!0}),resolveDirective:O.V,AttributePart:O.H,PropertyPart:O.B,BooleanAttributePart:O.N,EventPart:O.U,ElementPart:O.F,TemplateInstance:O.R,isIterable:O.D,ChildPart:O.I};var le={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};var{I:Sa}=O;var Vi=o=>o===null||typeof o!="object"&&typeof o!="function";var Gi=(o,e)=>e===void 0?o?._$litType$!==void 0:o?._$litType$===e,Ki=o=>o?._$litType$?.h!=null;var Xi=o=>o.strings===void 0;var{TemplateInstance:vr,isIterable:wr,resolveDirective:Ji,ChildPart:$e,ElementPart:Sr}=Ui,Zi=(o,e,i={})=>{if(e._$litPart$!==void 0)throw Error("container already contains a live render");let r,s,c,p=[],m=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),g;for(;(g=m.nextNode())!==null;){let f=g.data;if(f.startsWith("lit-part")){if(p.length===0&&r!==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 (${s})`);c=Tr(o,g,p,i),r===void 0&&(r=c),s??=g}else if(f.startsWith("lit-node"))Er(g,p,i);else if(f.startsWith("/lit-part")){if(p.length===1&&c!==r)throw Error("internal error");c=zr(g,c,p)}}if(r===void 0){let f=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 ${f}.`)}e._$litPart$=r},Tr=(o,e,i,r)=>{let s,c;if(i.length===0)c=new $e(e,null,void 0,r),s=o;else{let p=i[i.length-1];if(p.type==="template-instance")c=new $e(e,null,p.instance,r),p.instance._$AV.push(c),s=p.result.values[p.instancePartIndex++],p.templatePartIndex++;else if(p.type==="iterable"){c=new $e(e,null,p.part,r);let m=p.iterator.next();if(m.done)throw s=void 0,p.done=!0,Error("Unhandled shorter than expected iterable");s=m.value,p.part._$AH.push(c)}else c=new $e(e,null,p.part,r)}if(s=Ji(c,s),s===j)i.push({part:c,type:"leaf"});else if(Vi(s))i.push({part:c,type:"leaf"}),c._$AH=s;else if(Gi(s)){if(Ki(s))throw Error("compiled templates are not supported");let p="lit-part "+Mr(s);if(e.data!==p)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{let m=$e.prototype._$AC(s),g=new vr(m,c);i.push({type:"template-instance",instance:g,part:c,templatePartIndex:0,instancePartIndex:0,result:s}),c._$AH=g}}else wr(s)?(i.push({part:c,type:"iterable",value:s,iterator:s[Symbol.iterator](),done:!1}),c._$AH=[]):(i.push({part:c,type:"leaf"}),c._$AH=s??"");return c},zr=(o,e,i)=>{if(e===void 0)throw Error("unbalanced part marker");e._$AB=o;let r=i.pop();if(r.type==="iterable"&&!r.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},Er=(o,e,i)=>{let r=/lit-node (\d+)/.exec(o.data),s=parseInt(r[1]),c=o.nextElementSibling;if(c===null)throw Error("could not find node for attribute parts");c.removeAttribute("defer-hydration");let p=e[e.length-1];if(p.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 m=p.instance;for(;;){let g=m._$AD.parts[p.templatePartIndex];if(g===void 0||g.type!==le.ATTRIBUTE&&g.type!==le.ELEMENT||g.index!==s)break;if(g.type===le.ATTRIBUTE){let f=new g.ctor(c,g.name,g.strings,p.instance,i),A=Xi(f)?p.result.values[p.instancePartIndex]:p.result.values,z=!(f.type===le.EVENT||f.type===le.PROPERTY);f._$AI(A,f,p.instancePartIndex,z),p.instancePartIndex+=g.strings.length-1,m._$AV.push(f)}else{let f=new Sr(c,p.instance,i);Ji(f,p.result.values[p.instancePartIndex++]),m._$AV.push(f)}p.templatePartIndex++}}},Yi=new WeakMap,Mr=o=>{let e=Yi.get(o.strings);if(e!==void 0)return e;let i=new Uint32Array(2).fill(5381);for(let s of o.strings)for(let c=0;c<s.length;c++)i[c%2]=33*i[c%2]^s.charCodeAt(c);let r=String.fromCharCode(...new Uint8Array(i.buffer));return e=btoa(r),Yi.set(o.strings,e),e};globalThis.litElementHydrateSupport=({LitElement:o})=>{let e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(o),"observedAttributes").get;Object.defineProperty(o,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});let i=o.prototype.attributeChangedCallback;o.prototype.attributeChangedCallback=function(p,m,g){p==="defer-hydration"&&g===null&&r.call(this),i.call(this,p,m,g)};let r=o.prototype.connectedCallback;o.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||r.call(this)};let s=o.prototype.createRenderRoot;o.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):s.call(this)};let c=Object.getPrototypeOf(o.prototype).update;o.prototype.update=function(p){let m=this.render();if(c.call(this,p),this._$AG){this._$AG=!1;for(let g of this.getAttributeNames())if(g.startsWith("hydrate-internals-")){let f=g.slice(18);this.removeAttribute(f),this.removeAttribute(g)}Zi(m,this.renderRoot,this.renderOptions)}else fe(m,this.renderRoot,this.renderOptions)}};var pi=["impakt-highlight","impakt-process-line","impakt-section-head","impakt-stage-tag","impakt-service-card","impakt-stat-row","impakt-work-list","[data-reveal]"].join(", "),de="data-motion";function Qi(o=document){let e=o.defaultView;return e&&e.getComputedStyle(o.documentElement).getPropertyValue("--impakt-motion-reveal-mode").trim()||"none"}function ui(o=document){let e=o.defaultView;return!e||typeof e.IntersectionObserver!="function"||e.matchMedia?.("(prefers-reduced-motion: reduce)").matches?!1:Qi(o)==="once"}function mi(o){let e=[],i=r=>{r.nodeType===1&&r.matches(pi)&&e.push(r);for(let s of Array.from(r.querySelectorAll("*")))s.matches(pi)&&e.push(s),s.shadowRoot&&i(s.shadowRoot)};return i(o),[...new Set(e)]}var xe=(o,e)=>{let i=o.trim();if(!i)return e;let r=parseFloat(i);return Number.isFinite(r)?i.endsWith("ms")?r:i.endsWith("s")?r*1e3:r:e};function Ar(o){let e=o.match(/cubic-bezier\(([^)]+)\)/),[i,r,s,c]=e?e[1].split(",").map(m=>parseFloat(m)):[.22,1,.36,1],p=(m,g,f)=>3*m*(1-f)*(1-f)*f+3*g*(1-f)*f*f+f*f*f;return m=>{if(m<=0)return 0;if(m>=1)return 1;let g=0,f=1,A=m;for(let z=0;z<30;z++){let P=p(i,s,A);if(Math.abs(P-m)<1e-5)break;P<m?g=A:f=A,A=(g+f)/2}return p(r,c,A)}}function Cr(o){let e=[],i=r=>e.push(...Array.from(r.querySelectorAll("[data-ik-count]")));return o.matches("[data-ik-count]")?e.push(o):o.matches('[data-reveal~="count"]')&&(o.setAttribute("data-ik-count",""),e.push(o)),i(o),o.shadowRoot&&i(o.shadowRoot),e}var Lr=/\d[\d,]*(?:\.\d+)?/,Rr=/\d[\d,]*(?:\.\d+)?/g;function Ir(o,e,i){let r=o.getAttribute("data-ik-count")==="text",s=r?_r(o):null,c=(r?s?.data:o.textContent)?.replace(/\s+/g," ").trim()??"",p=[...c.matchAll(Rr)].sort((he,G)=>parseFloat(G[0].replace(/,/g,""))-parseFloat(he[0].replace(/,/g,"")))[0];if(!p||r&&!s)return Promise.resolve();let m=p[0],g=parseFloat(m.replace(/,/g,"")),f=(m.split(".")[1]??"").length,A=m.includes(","),z=i.getComputedStyle(o),P=xe(z.getPropertyValue("--ik-count-duration"),xe(z.getPropertyValue("--impakt-motion-reveal-count-duration"),900)),L=Ar(z.getPropertyValue("--impakt-motion-reveal-arrive")),B=s?.data??"",F=s?B.lastIndexOf(m,B.length):0,ne=he=>{let G=he.toFixed(f);A&&(G=Number(G).toLocaleString("en-GB",{minimumFractionDigits:f,maximumFractionDigits:f})),s?s.data=B.slice(0,F)+G+B.slice(F+m.length):o.setAttribute("data-count",c.slice(0,p.index)+G+c.slice(p.index+m.length))},xr=()=>{s?s.data=B:o.removeAttribute("data-count")};return ne(0),new Promise(he=>{let G=0,Ri=Ii=>{G||(G=Ii+e);let ri=(Ii-G)/P;if(ri>=1||!o.isConnected){xr(),he();return}ne(ri<=0?0:g*L(ri)),i.requestAnimationFrame(Ri)};i.requestAnimationFrame(Ri)})}function _r(o){let e=o.ownerDocument.createTreeWalker(o,NodeFilter.SHOW_TEXT);for(let i=e.nextNode();i;i=e.nextNode())if(Lr.test(i.data))return i;return null}function gi(o){o.setAttribute(de,"armed"),o.matches('[data-reveal~="drop"]')&&Array.from(o.children).forEach((e,i)=>e.style.setProperty("--ik-reveal-i",String(i)))}function hi(o){o.removeAttribute(de),o.style?.removeProperty("--ik-reveal-delay")}function Hr(o){let e=new Set(o.getAnimations?.({subtree:!0})??[]);for(let i of o.shadowRoot?.getAnimations?.()??[])e.add(i);return[...e]}function er(o,e,i){o.hasAttribute(de)||gi(o),o.style.setProperty("--ik-reveal-delay",`${Math.round(e)}ms`),o.setAttribute(de,"play");let r=Cr(o).map(s=>{let c=Number(i.getComputedStyle(s).getPropertyValue("--i"))||0,p=xe(i.getComputedStyle(s).getPropertyValue("--impakt-motion-reveal-stagger"),60);return Ir(s,e+c*p,i)});return new Promise(s=>{i.requestAnimationFrame(()=>{let c=new Promise(m=>i.setTimeout(m,e+4e3)),p=Promise.all([...Hr(o).map(m=>m.finished.catch(()=>{})),...r]);Promise.race([p,c]).then(()=>{hi(o),s()})})})}var tr=(o,e)=>Math.abs(o.top-e.top)>4?o.top-e.top:o.left-e.left;function Be(o=document){let e=o.defaultView;if(!e||e.__impaktReveal||!ui(o))return;let i=new Set,r=()=>e.innerHeight||o.documentElement.clientHeight,s=()=>xe(e.getComputedStyle(o.documentElement).getPropertyValue("--impakt-motion-reveal-stagger"),60),c=L=>{let B=L.map(F=>({el:F,box:F.getBoundingClientRect()}));B.sort((F,ne)=>tr(F.box,ne.box)),B.forEach(({el:F},ne)=>{i.delete(F),m.unobserve(F),g.unobserve(F),er(F,Math.min(ne,8)*s(),e)})},p=L=>c(L.filter(B=>B.isIntersecting&&i.has(B.target)).map(B=>B.target)),m=new e.IntersectionObserver(p,{rootMargin:"0px 0px -50% 0px"}),g=new e.IntersectionObserver(p,{threshold:.98}),f=0,A=()=>{f||(f=e.requestAnimationFrame(()=>{f=0;for(let L of i)L.getBoundingClientRect().bottom<0&&(i.delete(L),m.unobserve(L),g.unobserve(L),hi(L))}))},z=(e.performance?.getEntriesByType?.("paint")??[]).length>0;for(let L of mi(o)){if(L.hasAttribute(de))continue;let B=L.getBoundingClientRect();B.width===0&&B.height===0||B.bottom<0||B.top<r()&&z||(gi(L),i.add(L),m.observe(L),g.observe(L))}let P=()=>{m.disconnect(),g.disconnect(),e.removeEventListener("scroll",A);for(let L of i)hi(L);i.clear()};e.addEventListener("scroll",A,{passive:!0}),e.matchMedia?.("(prefers-reduced-motion: reduce)").addEventListener?.("change",L=>{L.matches&&P()}),e.__impaktReveal={armed:i,stop:P}}function Br(o=document){let e=o.nodeType===9?o:o.ownerDocument,i=e.defaultView;if(!i||!ui(e))return Promise.resolve();let r=mi(o);return r.forEach(gi),new Promise(s=>i.requestAnimationFrame(()=>{let c=r.map(m=>({el:m,box:m.getBoundingClientRect()})).sort((m,g)=>tr(m.box,g.box)),p=xe(i.getComputedStyle(e.documentElement).getPropertyValue("--impakt-motion-reveal-stagger"),60);Promise.all(c.map(({el:m},g)=>er(m,g*p,i))).then(()=>s())}))}var Ne=globalThis,Pe=Ne.ShadowRoot&&(Ne.ShadyCSS===void 0||Ne.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bi=Symbol(),ir=new WeakMap,ye=class{constructor(e,i,r){if(this._$cssResult$=!0,r!==bi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=i}get styleSheet(){let e=this.o,i=this.t;if(Pe&&e===void 0){let r=i!==void 0&&i.length===1;r&&(e=ir.get(i)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ir.set(i,e))}return e}toString(){return this.cssText}},R=o=>new ye(typeof o=="string"?o:o+"",void 0,bi),u=(o,...e)=>{let i=o.length===1?o[0]:e.reduce((r,s,c)=>r+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[c+1],o[0]);return new ye(i,o,bi)},rr=(o,e)=>{if(Pe)o.adoptedStyleSheets=e.map(i=>i instanceof CSSStyleSheet?i:i.styleSheet);else for(let i of e){let r=document.createElement("style"),s=Ne.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=i.cssText,o.appendChild(r)}},fi=Pe?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let i="";for(let r of e.cssRules)i+=r.cssText;return R(i)})(o):o;var{is:Nr,defineProperty:Pr,getOwnPropertyDescriptor:Or,getOwnPropertyNames:Dr,getOwnPropertySymbols:qr,getPrototypeOf:Fr}=Object,Oe=globalThis,ar=Oe.trustedTypes,jr=ar?ar.emptyScript:"",Wr=Oe.reactiveElementPolyfillSupport,ke=(o,e)=>o,$i={toAttribute(o,e){switch(e){case Boolean:o=o?jr:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let i=o;switch(e){case Boolean:i=o!==null;break;case Number:i=o===null?null:Number(o);break;case Object:case Array:try{i=JSON.parse(o)}catch{i=null}}return i}},nr=(o,e)=>!Nr(o,e),or={attribute:!0,type:String,converter:$i,reflect:!1,useDefault:!1,hasChanged:nr};Symbol.metadata??=Symbol("metadata"),Oe.litPropertyMetadata??=new WeakMap;var Y=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,i=or){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(e,i),!i.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(e,r,i);s!==void 0&&Pr(this.prototype,e,s)}}static getPropertyDescriptor(e,i,r){let{get:s,set:c}=Or(this.prototype,e)??{get(){return this[i]},set(p){this[i]=p}};return{get:s,set(p){let m=s?.call(this);c?.call(this,p),this.requestUpdate(e,m,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??or}static _$Ei(){if(this.hasOwnProperty(ke("elementProperties")))return;let e=Fr(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ke("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ke("properties"))){let i=this.properties,r=[...Dr(i),...qr(i)];for(let s of r)this.createProperty(s,i[s])}let e=this[Symbol.metadata];if(e!==null){let i=litPropertyMetadata.get(e);if(i!==void 0)for(let[r,s]of i)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[i,r]of this.elementProperties){let s=this._$Eu(i,r);s!==void 0&&this._$Eh.set(s,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let i=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let s of r)i.unshift(fi(s))}else e!==void 0&&i.push(fi(e));return i}static _$Eu(e,i){let r=i.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,i=this.constructor.elementProperties;for(let r of i.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return rr(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,i,r){this._$AK(e,r)}_$ET(e,i){let r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(s!==void 0&&r.reflect===!0){let c=(r.converter?.toAttribute!==void 0?r.converter:$i).toAttribute(i,r.type);this._$Em=e,c==null?this.removeAttribute(s):this.setAttribute(s,c),this._$Em=null}}_$AK(e,i){let r=this.constructor,s=r._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let c=r.getPropertyOptions(s),p=typeof c.converter=="function"?{fromAttribute:c.converter}:c.converter?.fromAttribute!==void 0?c.converter:$i;this._$Em=s;let m=p.fromAttribute(i,c.type);this[s]=m??this._$Ej?.get(s)??m,this._$Em=null}}requestUpdate(e,i,r,s=!1,c){if(e!==void 0){let p=this.constructor;if(s===!1&&(c=this[e]),r??=p.getPropertyOptions(e),!((r.hasChanged??nr)(c,i)||r.useDefault&&r.reflect&&c===this._$Ej?.get(e)&&!this.hasAttribute(p._$Eu(e,r))))return;this.C(e,i,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,i,{useDefault:r,reflect:s,wrapped:c},p){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,p??i??this[e]),c!==!0||p!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(i=void 0),this._$AL.set(e,i)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,c]of this._$Ep)this[s]=c;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,c]of r){let{wrapped:p}=c,m=this[s];p!==!0||this._$AL.has(s)||m===void 0||this.C(s,void 0,c,m)}}let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(i)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(i)}willUpdate(e){}_$AE(e){this._$EO?.forEach(i=>i.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(i=>this._$ET(i,this[i])),this._$EM()}updated(e){}firstUpdated(e){}};Y.elementStyles=[],Y.shadowRootOptions={mode:"open"},Y[ke("elementProperties")]=new Map,Y[ke("finalized")]=new Map,Wr?.({ReactiveElement:Y}),(Oe.reactiveElementVersions??=[]).push("2.1.2");var xi=globalThis,J=class extends Y{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=fe(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return j}};J._$litElement$=!0,J.finalized=!0,xi.litElementHydrateSupport?.({LitElement:J});var Ur=xi.litElementPolyfillSupport;Ur?.({LitElement:J});(xi.litElementVersions??=[]).push("4.2.2");var l=(o,e)=>R(`var(--impakt-${o.replace(/\./g,"-")}, ${e})`),t={brand:l("color.brand.default","#1f4ed8"),brandHover:l("color.brand.hover","#1b45be"),brandActive:l("color.brand.active","#183ba4"),brandSubtle:l("color.brand.subtle","#e4eafa"),onBrand:l("color.text.on-brand","#ffffff"),surfaceCard:l("color.surface.card","#ffffff"),surfaceInset:l("color.surface.inset","#f4f4f4"),surfaceSubtle:l("color.surface.subtle","#e4eafa"),text:l("color.text.default","#1a1a1a"),textMuted:l("color.text.muted","#717171"),textPlaceholder:l("color.text.placeholder","#767676"),textHeading:l("color.text.heading","#1f4ed8"),link:l("color.text.link","#1f4ed8"),linkHover:l("color.text.link-hover","#193ead"),border:l("color.border.default","#929292"),borderStrong:l("color.border.strong","#818181"),danger:l("color.status.danger.default","#c8102e"),dangerText:l("color.status.danger.text","#c8102e"),dangerSubtle:l("color.status.danger.subtle","#f8e2e6"),warning:l("color.status.warning.default","#b45309"),warningText:l("color.status.warning.text","#b45309"),warningSubtle:l("color.status.warning.subtle","#f6eae1"),success:l("color.status.success.default","#047857"),successText:l("color.status.success.text","#047857"),successSubtle:l("color.status.success.subtle","#e0f0ea"),info:l("color.status.info.default","#1f4ed8"),infoText:l("color.status.info.text","#1f4ed8"),infoSubtle:l("color.status.info.subtle","#e4eafa"),fontBody:l("font.family.body","system-ui, sans-serif"),fontHeading:l("font.family.heading","system-ui, sans-serif"),fontMono:l("font.family.mono","ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"),fontEyebrow:l("font.family.eyebrow","inherit"),focusShadow:l("focus.ring.shadow","0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a"),focusOffset:l("focus.ring.offset","2px"),targetMin:l("target.min","24px"),radiusSm:l("radius.sm","2px"),radius:l("radius.md","4px"),radiusLg:l("radius.lg","8px"),borderThin:l("border.width.thin","1px"),borderThick:l("border.width.thick","2px"),radiusXs:l("radius.xs","2px"),radiusXl:l("radius.xl","12px"),radius2xl:l("radius.2xl","16px"),hairline:R("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 10%, transparent)"),rule:R("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 15%, transparent)"),wash:R("color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 5%, transparent)"),brandHalo:R("color-mix(in srgb, var(--impakt-color-brand-default, #1f4ed8) 22%, transparent)"),shadowXs:l("shadow.xs","0 1px 2px 0 rgb(0 0 0 / 0.05)"),shadowSm:l("shadow.sm","0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"),shadowMd:l("shadow.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),shadowLg:l("shadow.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),shadowXl:l("shadow.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"),trackingTight:l("font.tracking.tight","-0.02em"),trackingWide:l("font.tracking.wide","0.06em")},w=o=>R(`font-size: var(--impakt-font-size-${o}, 1rem); line-height: var(--impakt-font-leading-${o}, 1.5);`),a=o=>l(`space.${String(o).replace(".","-")}`,`${o*4}px`),$=o=>l(`font.size.${o}`,"1rem"),W=o=>l(`font.line-height.${o}`,"1.5"),b=o=>l(`font.weight.${o}`,"400"),D=u`
|
|
5
5
|
:host([space-above='sm']) { margin-block-start: ${a(2)}; }
|
|
6
6
|
:host([space-above='md']) { margin-block-start: ${a(4)}; }
|
|
7
7
|
:host([space-above='lg']) { margin-block-start: ${a(6)}; }
|
|
@@ -19,7 +19,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
19
19
|
outline-offset: ${t.focusOffset};
|
|
20
20
|
box-shadow: ${t.focusShadow};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,E=u`
|
|
23
23
|
min-block-size: ${t.targetMin};
|
|
24
24
|
min-inline-size: ${t.targetMin};
|
|
25
25
|
`,T=u`
|
|
@@ -32,7 +32,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
32
32
|
clip-path: inset(50%);
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
border: 0;
|
|
35
|
-
`,
|
|
35
|
+
`,sr=u`
|
|
36
36
|
@media (prefers-reduced-motion: reduce) {
|
|
37
37
|
:host,
|
|
38
38
|
:host *,
|
|
@@ -44,7 +44,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
44
44
|
scroll-behavior: auto !important;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,lr=u`
|
|
48
48
|
:host {
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
font-family: ${t.fontBody};
|
|
@@ -58,15 +58,73 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
58
58
|
*::after {
|
|
59
59
|
box-sizing: inherit;
|
|
60
60
|
}
|
|
61
|
-
`,
|
|
61
|
+
`,I=o=>R(`@media (pointer: coarse) { :host :is(${o}) { min-block-size: 44px; min-inline-size: 44px; } }`),dr=u`
|
|
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 Vr=Symbol.for("strata.wording");function S(o,e){let r=globalThis[Vr]?.words?.[o],s=typeof r=="string"&&r.trim()?r:o;return e?s.replace(/\{(\w+)\}/g,(c,p)=>p in e?String(e[p]):c):s}var Gr=0,h=class extends J{constructor(){super(...arguments);this.uid=`impakt-${Gr+=1}`}static{this.styles=[lr,sr,u``]}id_(i){return`${this.uid}-${i}`}connectedCallback(){super.connectedCallback(),this.sayDefaults()}sayDefaults(){let i=this.constructor.elementProperties,r=this;for(let s of i.keys()){let c=r[s];if(typeof c!="string"||!c)continue;let p=S(c);p!==c&&(r[s]=p)}}};var q={arrive:l("motion.reveal.arrive","cubic-bezier(0.22, 1, 0.36, 1)"),shape:l("motion.reveal.shape","cubic-bezier(0.65, 0, 0.35, 1)"),stagger:l("motion.reveal.stagger","60ms"),select:l("motion.reveal.select.duration","260ms"),line:l("motion.reveal.line.duration","640ms"),type:l("motion.reveal.type.duration","240ms"),drop:l("motion.reveal.drop.duration","420ms"),dropDistance:l("motion.reveal.drop.distance","12px"),count:l("motion.reveal.count.duration","900ms"),mark:l("motion.reveal.mark.duration","180ms"),arrowDistance:l("motion.reveal.arrow.distance","0px"),arrowDuration:l("motion.reveal.arrow.duration","160ms"),arrowEasing:l("motion.reveal.arrow.easing","ease-out"),linkDistance:l("motion.reveal.link.distance","2px"),linkDuration:l("motion.reveal.link.duration","120ms"),linkEasing:l("motion.reveal.link.easing","ease-in-out"),wipeFrom:l("motion.reveal.wipe.from","1"),wipeDuration:l("motion.reveal.wipe.duration","140ms"),wipeEasing:l("motion.reveal.wipe.easing","ease-out"),lead:l("motion.reveal.lead","0ms")},yi=(o="var(--i, 0)",e="0ms")=>R(`calc(var(--ik-reveal-delay, 0ms) + ${o} * var(--impakt-motion-reveal-stagger, 60ms) + ${e})`),ki=u`
|
|
65
|
+
:host([data-motion='armed']),
|
|
66
|
+
:host([data-motion='armed']) *,
|
|
67
|
+
:host([data-motion='armed']) *::before,
|
|
68
|
+
:host([data-motion='armed']) *::after {
|
|
69
|
+
animation-play-state: paused !important;
|
|
70
|
+
}
|
|
71
|
+
[data-ik-count][data-count] {
|
|
72
|
+
position: relative;
|
|
73
|
+
-webkit-text-fill-color: transparent;
|
|
74
|
+
}
|
|
75
|
+
[data-ik-count][data-count]::after {
|
|
76
|
+
content: attr(data-count);
|
|
77
|
+
content: attr(data-count) / '';
|
|
78
|
+
position: absolute;
|
|
79
|
+
inset: 0;
|
|
80
|
+
-webkit-text-fill-color: currentColor;
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
@keyframes ik-reveal-type {
|
|
85
|
+
from {
|
|
86
|
+
clip-path: inset(-4px 100% -4px -4px);
|
|
87
|
+
}
|
|
88
|
+
to {
|
|
89
|
+
clip-path: inset(-4px -4px -4px -4px);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
@keyframes ik-reveal-drop {
|
|
93
|
+
from {
|
|
94
|
+
translate: 0 calc(-1 * var(--impakt-motion-reveal-drop-distance, 12px));
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
@keyframes ik-reveal-settle {
|
|
99
|
+
from {
|
|
100
|
+
border-block-end-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@keyframes ik-reveal-fade {
|
|
104
|
+
from {
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
@keyframes ik-reveal-mark {
|
|
109
|
+
from {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
scale: 0.4;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
@media (prefers-reduced-motion: reduce) {
|
|
115
|
+
:host([data-motion]),
|
|
116
|
+
:host([data-motion]) *,
|
|
117
|
+
:host([data-motion]) *::before,
|
|
118
|
+
:host([data-motion]) *::after {
|
|
119
|
+
animation: none !important;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`;var vi={"arrow-right":k`<path d="M5 12h14M13 6l6 6-6 6"/>`,"arrow-left":k`<path d="M19 12H5M11 6l-6 6 6 6"/>`,"chevron-right":k`<path d="M9 6l6 6-6 6"/>`,"chevron-down":k`<path d="M6 9l6 6 6-6"/>`,check:k`<path d="M5 12.5l4.5 4.5L19 7"/>`,close:k`<path d="M6 6l12 12M18 6L6 18"/>`,menu:k`<path d="M4 7h16M4 12h16M4 17h16"/>`,"menu-two":k`<path d="M5 9.5h14M5 14.5h14"/>`,plus:k`<path d="M12 5v14M5 12h14"/>`,minus:k`<path d="M5 12h14"/>`,search:k`<circle cx="11" cy="11" r="6.5"/><path d="M16 16l4 4"/>`,external:k`<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:k`<path d="M12 4v11M7 10l5 5 5-5M5 20h14"/>`,home:k`<path d="M4 11l8-7 8 7M6 9.5V20h12V9.5"/><path d="M10 20v-6h4v6"/>`,phone:k`<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:k`<rect x="3.5" y="5.5" width="17" height="13" rx="1.5"/><path d="M4 7l8 6 8-6"/>`,"map-pin":k`<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:k`<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:k`<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5V12l3 2"/>`,user:k`<circle cx="12" cy="8.5" r="3.5"/><path d="M5 20a7 7 0 0 1 14 0"/>`,star:k`<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:k`<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:k`<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:k`<path d="M5 19c0-8 5-13 14-14 0 9-5 14-13 14z"/><path d="M5 19l7-7"/>`,sun:k`<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:k`<path d="M13 3L5 13.5h6L10 21l8-10.5h-6z"/>`,key:k`<circle cx="8" cy="15" r="3.5"/><path d="M10.5 12.5L19 4M16 7l2.5 2.5M14 9l2 2"/>`,info:k`<circle cx="12" cy="12" r="8.5"/><path d="M12 11v5.5M12 7.5v.5"/>`,warning:k`<path d="M12 4l9 15.5H3z"/><path d="M12 10v4M12 16.5v.5"/>`,document:k`<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:k`<path d="M16 6.5a3.5 3.5 0 0 0-6.5 1.8V20M7 13h7M7 20h10"/>`,chat:k`<path d="M4.5 5.5h15v10h-9l-4 3.5v-3.5h-2z"/>`,grid:k`<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:k`<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":k`<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:k`<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:k`<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:k`<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":k`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/>`,"arrow-up-right":k`<path d="M7 7h10v10M7 17L17 7"/>`,more:k`<circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/>`,upload:k`<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/>`,image:k`<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:k`<rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`,eye:k`<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:k`<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:k`<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":k`<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:k`<rect x="2" y="7" width="16" height="10" rx="2"/><path d="M22 11v2M6 11v2M10 11v2"/>`},Kr=Object.keys(vi);function M(o,e="1.25em"){let i=o?vi[o]:void 0;return i?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">${i}</svg>`:d}var De=class extends h{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=[...h.styles,u`
|
|
65
123
|
:host { display: inline-flex; vertical-align: middle; line-height: 0; }
|
|
66
124
|
:host([tone='brand']) { color: ${t.brand}; }
|
|
67
125
|
:host([tone='muted']) { color: ${t.textMuted}; }
|
|
68
126
|
@media (forced-colors: active) { :host { color: CanvasText; } }
|
|
69
|
-
`]}render(){let e={sm:"16px",md:"24px",lg:"32px",xl:"48px"}[this.size]??"24px",i=M(this.name,e);return this.label?
|
|
127
|
+
`]}render(){let e={sm:"16px",md:"24px",lg:"32px",xl:"48px"}[this.size]??"24px",i=M(this.name,e);return this.label?n`<span role="img" aria-label=${this.label}>${i}</span>`:n`${i}`}};customElements.define("impakt-icon",De);var wi=l("color.text.inverse","var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))"),C={height:l("button.height","40px"),paddingBlock:l("button.padding-block","8px"),paddingInline:l("button.padding-inline","16px"),gap:l("button.gap","8px"),fontSize:l("button.font-size","0.875rem"),lineHeight:l("button.line-height","1.429"),weight:l("button.weight","600"),smPaddingBlock:l("button.sm.padding-block","4px"),smHeight:l("button.sm.height","32px"),smPaddingInline:l("button.sm.padding-inline","12px"),smFontSize:l("button.sm.font-size","0.875rem"),smLineHeight:l("button.sm.line-height","1.429"),smGap:l("button.sm.gap","6px"),solidEdge:l("button.solid-edge-width","1px"),arrowIcon:l("button.arrow-icon","inline-block"),arrowGlyph:l("button.arrow-glyph","none"),lgHeight:l("button.lg.height","48px"),lgPaddingBlock:l("button.lg.padding-block","12px"),lgFontSize:l("button.lg.font-size","1rem"),lgLineHeight:l("button.lg.line-height","1.5"),iconSize:l("button.icon-size","40px"),lgIconSize:l("button.lg.icon-size","48px"),fullJustify:l("button.full.justify","center"),fullAlign:l("button.full.align","center"),highlight:l("button.highlight","inset 0 1px 0 0 rgb(255 255 255 / 0.12)"),edge:l("button.edge","15%")},Xr=k`<svg class="glyph" viewBox="0 0 15 10" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="butt" stroke-linejoin="miter" aria-hidden="true" focusable="false"><path d="M0 5h14" /><path d="M9.75 0.75 14 5l-4.25 4.25" /></svg>`,qe=class extends h{constructor(){super();this.internals=null;this.hideOn="never",this.variant="primary",this.type="button",this.disabled=!1,this.busy=!1,this.busyLabel="Working",this.full=!1,this.fullOnPhone=!1,this.size="md",this.iconBefore="none",this.iconAfter="none",this.href="",this.icon="none",this.label="",this.spread=!1,this.centred=!1;try{this.internals=this.attachInternals()}catch{this.internals=null}}static{this.formAssociated=!0}static{this.properties={hideOn:{type:String,reflect:!0,attribute:"hide-on"},variant:{type:String,reflect:!0},type:{type:String},disabled:{type:Boolean,reflect:!0},busy:{type:Boolean,reflect:!0},busyLabel:{type:String,attribute:"busy-label"},full:{type:Boolean,reflect:!0},fullOnPhone:{type:Boolean,attribute:"full-on-phone",reflect:!0},size:{type:String,reflect:!0},iconBefore:{type:String,attribute:"icon-before"},iconAfter:{type:String,attribute:"icon-after"},href:{type:String},icon:{type:String},label:{type:String},spread:{type:Boolean,reflect:!0},centred:{type:Boolean,reflect:!0}}}static{this.styles=[...h.styles,v,I("button, a"),u`
|
|
70
128
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
71
129
|
:host {
|
|
72
130
|
display: inline-block;
|
|
@@ -76,30 +134,30 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
76
134
|
}
|
|
77
135
|
@media (max-width: 40rem) { :host([full-on-phone]) { display: block; } }
|
|
78
136
|
button, a {
|
|
79
|
-
${
|
|
137
|
+
${E}
|
|
80
138
|
box-sizing: border-box;
|
|
81
139
|
text-decoration: none;
|
|
82
140
|
display: inline-flex;
|
|
83
141
|
align-items: center;
|
|
84
142
|
justify-content: center;
|
|
85
|
-
gap: ${
|
|
143
|
+
gap: ${C.gap};
|
|
86
144
|
inline-size: 100%;
|
|
87
145
|
/* The brand's button shape: 40px in the small type in semibold, or under Noire (G2) Archivo Medium 16, 14 by 20, about 47px tall. */
|
|
88
|
-
min-block-size: ${
|
|
89
|
-
padding: ${
|
|
146
|
+
min-block-size: ${C.height};
|
|
147
|
+
padding: ${C.paddingBlock} ${C.paddingInline};
|
|
90
148
|
font-family: inherit;
|
|
91
|
-
font-size: ${
|
|
92
|
-
line-height: ${
|
|
93
|
-
font-weight: ${
|
|
149
|
+
font-size: ${C.fontSize};
|
|
150
|
+
line-height: ${C.lineHeight};
|
|
151
|
+
font-weight: ${C.weight};
|
|
94
152
|
border-radius: ${t.radiusLg};
|
|
95
153
|
border: ${t.borderThin} solid transparent;
|
|
96
154
|
cursor: pointer;
|
|
97
155
|
transition: background-color 120ms ease-in-out, border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
98
156
|
}
|
|
99
|
-
:host([size='sm']) :is(button, a) { min-block-size: ${
|
|
100
|
-
:host([size='lg']) :is(button, a) { min-block-size: ${
|
|
157
|
+
:host([size='sm']) :is(button, a) { min-block-size: ${C.smHeight}; padding: ${C.smPaddingBlock} ${C.smPaddingInline}; font-size: ${C.smFontSize}; line-height: ${C.smLineHeight}; gap: ${C.smGap}; }
|
|
158
|
+
:host([size='lg']) :is(button, a) { min-block-size: ${C.lgHeight}; padding: ${C.lgPaddingBlock} ${a(6)}; font-size: ${C.lgFontSize}; line-height: ${C.lgLineHeight}; }
|
|
101
159
|
/* A full-width button keeps its words in the middle, or spreads them where the brand does, as Noire does unless it is centred. */
|
|
102
|
-
:host([full]:not([centred]):not([spread])) :is(button, a) { justify-content: ${
|
|
160
|
+
:host([full]:not([centred]):not([spread])) :is(button, a) { justify-content: ${C.fullJustify}; text-align: ${C.fullAlign}; }
|
|
103
161
|
/* Spread: the words at the start, the trailing icon at the far end. */
|
|
104
162
|
:host([spread]) :is(button, a) { justify-content: space-between; text-align: start; }
|
|
105
163
|
.icon { flex: none; inline-size: 1.15em; block-size: 1.15em; }
|
|
@@ -118,7 +176,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
118
176
|
background: var(--impakt-button-primary, ${t.brand});
|
|
119
177
|
color: var(--impakt-button-on-primary, ${t.onBrand});
|
|
120
178
|
/* A hairline highlight along the top edge, where the brand draws one. Noire is flat. */
|
|
121
|
-
box-shadow: ${t.shadowXs}, ${
|
|
179
|
+
box-shadow: ${t.shadowXs}, ${C.highlight};
|
|
122
180
|
}
|
|
123
181
|
.primary:hover:not([aria-disabled='true']) {
|
|
124
182
|
background: var(--impakt-button-primary-hover, var(--impakt-color-action-hover, ${t.brandHover}));
|
|
@@ -126,11 +184,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
126
184
|
}
|
|
127
185
|
/* A brand whose buttons turn on hover lifts the trailing arrow a quarter-turn. */
|
|
128
186
|
/* The trailing icon sits in a box as tall as the icon, so it never makes the line taller than the label's (#50). */
|
|
129
|
-
.after { display: inline-flex; align-items: center; flex: none; transition: transform
|
|
130
|
-
.after.arrow .icon { display: ${
|
|
187
|
+
.after { display: inline-flex; align-items: center; flex: none; transition: transform ${q.arrowDuration} ${q.arrowEasing}; }
|
|
188
|
+
.after.arrow .icon { display: ${C.arrowIcon}; }
|
|
131
189
|
/* The "→" of the G2 button, drawn so it does not depend on the font file holding it: as long as the label is high, with a thin stroke and a small head. */
|
|
132
|
-
.after .glyph { display: ${
|
|
190
|
+
.after .glyph { display: ${C.arrowGlyph}; inline-size: 0.9375em; block-size: 0.625em; overflow: visible; }
|
|
133
191
|
:is(button, a):hover:not([aria-disabled='true']) .after { transform: rotate(var(--impakt-motion-button-turn, 0deg)); }
|
|
192
|
+
/* The reveal set's arrow (impkt-web#51): pointed at or focused, the arrow slides forward, 4px in 180ms for Impakt and not at all for a brand that derives it. */
|
|
193
|
+
:is(button, a):is(:hover, :focus-visible):not([aria-disabled='true']) .after.arrow { transform: translateX(${q.arrowDistance}) rotate(var(--impakt-motion-button-turn, 0deg)); }
|
|
134
194
|
@media (prefers-reduced-motion: reduce) { .after { transition: none; } }
|
|
135
195
|
.primary:active:not([aria-disabled='true']) {
|
|
136
196
|
background: var(--impakt-button-primary-hover, ${t.brandActive});
|
|
@@ -141,14 +201,14 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
141
201
|
* line and 14px, so 47px tall, and only an outlined one adds its 1px edge, to 49px (#50). Forced colours keep the
|
|
142
202
|
* edge, since there the fill is gone.
|
|
143
203
|
*/
|
|
144
|
-
:is(.primary, .dark, .subtle, .accent, .danger, .ghost) { border-width: ${
|
|
204
|
+
:is(.primary, .dark, .subtle, .accent, .danger, .ghost) { border-width: ${C.solidEdge}; }
|
|
145
205
|
@media (forced-colors: active) { :is(.primary, .dark, .subtle, .accent, .danger, .ghost) { border-width: 1px; } }
|
|
146
206
|
|
|
147
207
|
/* Outline: the card, a hairline border and the text colour, for the second choice. */
|
|
148
208
|
.secondary {
|
|
149
209
|
background: ${t.surfaceCard};
|
|
150
210
|
color: ${t.text};
|
|
151
|
-
border-color: color-mix(in srgb, ${t.text} ${
|
|
211
|
+
border-color: color-mix(in srgb, ${t.text} ${C.edge}, transparent);
|
|
152
212
|
box-shadow: ${t.shadowXs};
|
|
153
213
|
}
|
|
154
214
|
.secondary:hover:not([aria-disabled='true']) {
|
|
@@ -174,13 +234,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
174
234
|
*/
|
|
175
235
|
.dark {
|
|
176
236
|
background: ${t.text};
|
|
177
|
-
color: ${
|
|
237
|
+
color: ${wi};
|
|
178
238
|
}
|
|
179
239
|
.dark:hover:not([aria-disabled='true']) {
|
|
180
|
-
background: color-mix(in srgb, ${t.text}, ${
|
|
240
|
+
background: color-mix(in srgb, ${t.text}, ${wi} 14%);
|
|
181
241
|
}
|
|
182
242
|
.dark:active:not([aria-disabled='true']) {
|
|
183
|
-
background: color-mix(in srgb, ${t.text}, ${
|
|
243
|
+
background: color-mix(in srgb, ${t.text}, ${wi} 24%);
|
|
184
244
|
}
|
|
185
245
|
|
|
186
246
|
/* Outline: transparent, a 1px border and words in the text colour, the design's "Ghost". On an ink band both are the paper. */
|
|
@@ -210,14 +270,14 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
210
270
|
|
|
211
271
|
/* Accent: the brand's second colour as a fill, for the one action a page is built around. The words on it are the colour the tokens measured against it. */
|
|
212
272
|
.accent {
|
|
213
|
-
background: ${
|
|
214
|
-
color: ${
|
|
273
|
+
background: ${l("color.accent.default","#ffd43b")};
|
|
274
|
+
color: ${l("color.accent.on","#1a1a1a")};
|
|
215
275
|
}
|
|
216
276
|
.accent:hover:not([aria-disabled='true']) {
|
|
217
|
-
background: ${
|
|
277
|
+
background: ${l("color.accent.hover","#e0bb34")};
|
|
218
278
|
}
|
|
219
279
|
.accent:active:not([aria-disabled='true']) {
|
|
220
|
-
background: color-mix(in srgb, ${
|
|
280
|
+
background: color-mix(in srgb, ${l("color.accent.hover","#e0bb34")}, ${l("color.accent.on","#1a1a1a")} 10%);
|
|
221
281
|
}
|
|
222
282
|
|
|
223
283
|
/* Danger: the danger text colour as a fill, so white words on it keep 4.5:1. */
|
|
@@ -234,15 +294,15 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
234
294
|
|
|
235
295
|
/* Icon only: as tall as it is wide, round where the brand rounds its corners and square under Noire. */
|
|
236
296
|
.icon-only {
|
|
237
|
-
inline-size: ${
|
|
238
|
-
min-inline-size: ${
|
|
239
|
-
block-size: ${
|
|
240
|
-
min-block-size: ${
|
|
297
|
+
inline-size: ${C.iconSize};
|
|
298
|
+
min-inline-size: ${C.iconSize};
|
|
299
|
+
block-size: ${C.iconSize};
|
|
300
|
+
min-block-size: ${C.iconSize};
|
|
241
301
|
padding: 0;
|
|
242
302
|
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
243
303
|
}
|
|
244
304
|
:host([size='sm']) .icon-only { inline-size: 32px; min-inline-size: 32px; block-size: 32px; min-block-size: 32px; padding: 0; }
|
|
245
|
-
:host([size='lg']) .icon-only { inline-size: ${
|
|
305
|
+
:host([size='lg']) .icon-only { inline-size: ${C.lgIconSize}; min-inline-size: ${C.lgIconSize}; block-size: ${C.lgIconSize}; min-block-size: ${C.lgIconSize}; padding: 0; }
|
|
246
306
|
|
|
247
307
|
.sr-only {
|
|
248
308
|
${T}
|
|
@@ -256,61 +316,61 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
256
316
|
border-color: ButtonBorder;
|
|
257
317
|
}
|
|
258
318
|
}
|
|
259
|
-
`]}onClick(i){if(this.disabled||this.busy){i.preventDefault(),i.stopImmediatePropagation();return}this.type==="submit"&&this.internals?.form?.requestSubmit(),this.type==="reset"&&this.internals?.form?.reset()}render(){let i=!!(this.icon&&this.icon!=="none"&&this.label),r=i?`${this.variant} icon-only`:this.variant;if(i){let c=M(this.icon);return this.href&&!this.disabled?
|
|
319
|
+
`]}onClick(i){if(this.disabled||this.busy){i.preventDefault(),i.stopImmediatePropagation();return}this.type==="submit"&&this.internals?.form?.requestSubmit(),this.type==="reset"&&this.internals?.form?.reset()}render(){let i=!!(this.icon&&this.icon!=="none"&&this.label),r=i?`${this.variant} icon-only`:this.variant;if(i){let c=M(this.icon);return this.href&&!this.disabled?n`<a class=${r} href=${this.href} part="button" aria-label=${this.label}>${c}</a>`:n`
|
|
260
320
|
<button
|
|
261
321
|
class=${r}
|
|
262
322
|
type="button"
|
|
263
323
|
part="button"
|
|
264
324
|
aria-label=${this.label}
|
|
265
325
|
?disabled=${this.disabled}
|
|
266
|
-
aria-disabled=${this.busy?"true":
|
|
267
|
-
aria-busy=${this.busy?"true":
|
|
326
|
+
aria-disabled=${this.busy?"true":d}
|
|
327
|
+
aria-busy=${this.busy?"true":d}
|
|
268
328
|
@click=${this.onClick}
|
|
269
329
|
>
|
|
270
330
|
${c}
|
|
271
|
-
${this.busy?
|
|
331
|
+
${this.busy?n`<span class="sr-only">${this.busyLabel}</span>`:d}
|
|
272
332
|
</button>
|
|
273
|
-
`}let n
|
|
333
|
+
`}let s=n`${M(this.iconBefore)}<slot></slot>${this.iconAfter&&this.iconAfter!=="none"?n`<span class=${this.iconAfter==="arrow-right"?"after arrow":"after"} aria-hidden="true">${M(this.iconAfter)}${this.iconAfter==="arrow-right"?Xr:d}</span>`:d}`;return this.href&&!this.disabled?n`<a class=${this.variant} href=${this.href} part="button">${s}</a>`:n`
|
|
274
334
|
<button
|
|
275
335
|
class=${this.variant}
|
|
276
336
|
type="button"
|
|
277
337
|
part="button"
|
|
278
338
|
?disabled=${this.disabled}
|
|
279
|
-
aria-disabled=${this.busy?"true":
|
|
280
|
-
aria-busy=${this.busy?"true":
|
|
339
|
+
aria-disabled=${this.busy?"true":d}
|
|
340
|
+
aria-busy=${this.busy?"true":d}
|
|
281
341
|
@click=${this.onClick}
|
|
282
342
|
>
|
|
283
|
-
${
|
|
284
|
-
${this.busy?
|
|
343
|
+
${s}
|
|
344
|
+
${this.busy?n`<span class="sr-only">${this.busyLabel}</span>`:d}
|
|
285
345
|
</button>
|
|
286
|
-
`}};customElements.define("impakt-button",
|
|
346
|
+
`}};customElements.define("impakt-button",qe);var K=u`
|
|
287
347
|
:host { --impakt-field-width: 100%; }
|
|
288
348
|
:host([width='xs']) { --impakt-field-width: 8ch; }
|
|
289
349
|
:host([width='sm']) { --impakt-field-width: 14ch; }
|
|
290
350
|
:host([width='md']) { --impakt-field-width: 24ch; }
|
|
291
351
|
:host([width='lg']) { --impakt-field-width: 40ch; }
|
|
292
|
-
`,
|
|
352
|
+
`,V={height:l("field.height","44px"),paddingBlock:l("field.padding-block","10px"),paddingInline:l("field.padding-inline","12px"),lineHeight:l("field.line-height","normal"),radius:l("field.radius","8px"),edge:l("field.edge","0%"),focusEdge:l("field.focus-edge","0%"),focusHalo:l("field.focus-halo","6px")},ce=o=>{let e=R(o);return u`
|
|
293
353
|
${e} {
|
|
294
354
|
inline-size: min(100%, var(--impakt-field-width));
|
|
295
|
-
min-block-size: ${
|
|
296
|
-
padding: ${
|
|
355
|
+
min-block-size: ${V.height};
|
|
356
|
+
padding: ${V.paddingBlock} ${V.paddingInline};
|
|
297
357
|
font-family: inherit;
|
|
298
|
-
font-size: ${
|
|
299
|
-
line-height: ${
|
|
358
|
+
font-size: ${$("md")};
|
|
359
|
+
line-height: ${V.lineHeight};
|
|
300
360
|
color: ${t.text};
|
|
301
361
|
background: var(--impakt-color-field-surface, ${t.surfaceCard});
|
|
302
|
-
border: ${t.borderThin} solid var(--impakt-color-field-border, color-mix(in srgb, ${t.text} ${
|
|
303
|
-
border-radius: ${
|
|
362
|
+
border: ${t.borderThin} solid var(--impakt-color-field-border, color-mix(in srgb, ${t.text} ${V.edge}, ${t.border}));
|
|
363
|
+
border-radius: ${V.radius};
|
|
304
364
|
box-shadow: var(--impakt-shadow-field, ${t.shadowXs});
|
|
305
365
|
transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
|
|
306
366
|
}
|
|
307
367
|
${e}:hover:not(:disabled) {
|
|
308
|
-
border-color: var(--impakt-color-field-border, color-mix(in srgb, ${t.text} ${
|
|
368
|
+
border-color: var(--impakt-color-field-border, color-mix(in srgb, ${t.text} ${V.edge}, ${t.borderStrong}));
|
|
309
369
|
}
|
|
310
370
|
/* The focus ring, and the brand's halo round it where the brand draws one, so the field being typed in is plain at a glance. */
|
|
311
371
|
${e}:focus-visible {
|
|
312
|
-
border-color: color-mix(in srgb, ${t.text} ${
|
|
313
|
-
box-shadow: ${t.focusShadow}, 0 0 0 ${
|
|
372
|
+
border-color: color-mix(in srgb, ${t.text} ${V.focusEdge}, ${t.brand});
|
|
373
|
+
box-shadow: ${t.focusShadow}, 0 0 0 ${V.focusHalo} ${t.brandHalo};
|
|
314
374
|
}
|
|
315
375
|
${e}::placeholder {
|
|
316
376
|
color: ${t.textPlaceholder};
|
|
@@ -324,7 +384,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
324
384
|
border-color: ${t.danger};
|
|
325
385
|
border-width: ${t.borderThick};
|
|
326
386
|
}
|
|
327
|
-
`},
|
|
387
|
+
`},y=class extends h{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",this.look="default";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"},look:{type:String,reflect:!0}}}static{this.styles=[...h.styles,v,u`
|
|
328
388
|
:host {
|
|
329
389
|
display: block;
|
|
330
390
|
margin-block-end: ${a(4)};
|
|
@@ -338,11 +398,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
338
398
|
.label {
|
|
339
399
|
display: block;
|
|
340
400
|
font-family: var(--impakt-field-label-font, ${t.fontBody});
|
|
341
|
-
font-size: var(--impakt-field-label-size, ${
|
|
342
|
-
font-weight: var(--impakt-field-label-weight, ${
|
|
401
|
+
font-size: var(--impakt-field-label-size, ${$("sm")});
|
|
402
|
+
font-weight: var(--impakt-field-label-weight, ${b("semibold")});
|
|
343
403
|
letter-spacing: var(--impakt-field-label-tracking, normal);
|
|
344
404
|
text-transform: var(--impakt-field-label-transform, none);
|
|
345
|
-
line-height: ${
|
|
405
|
+
line-height: ${W("normal")};
|
|
346
406
|
margin-block-end: var(--impakt-field-label-space, ${a(1)});
|
|
347
407
|
color: ${t.text};
|
|
348
408
|
}
|
|
@@ -350,24 +410,34 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
350
410
|
:host([look='site']) {
|
|
351
411
|
--impakt-field-label-font: ${t.fontMono};
|
|
352
412
|
--impakt-field-label-size: 0.6875rem;
|
|
353
|
-
--impakt-field-label-weight: ${
|
|
413
|
+
--impakt-field-label-weight: ${b("medium")};
|
|
354
414
|
--impakt-field-label-tracking: 0.06em;
|
|
355
415
|
--impakt-field-label-transform: uppercase;
|
|
356
416
|
--impakt-field-label-space: ${a(2)};
|
|
357
417
|
}
|
|
418
|
+
/*
|
|
419
|
+
* The site's field (20:1175, 20:1211): the label on its 1.4 line, 8px over the box, and the box 14 by 16 inside with
|
|
420
|
+
* its words in Body M, 16px on 1.45, so a field is 76px tall with its label and the message box at least 140px.
|
|
421
|
+
*/
|
|
422
|
+
:host([look='site']) .label { line-height: 1.4; }
|
|
423
|
+
:host([look='site']) :is(input, textarea) { display: block; box-sizing: border-box; padding-block: 14px; padding-inline: 16px; line-height: 1.45; }
|
|
424
|
+
:host([look='site']) textarea { min-block-size: max(140px, calc(var(--impakt-textarea-rows, 4) * 1lh + 30px)); }
|
|
425
|
+
:host([look='site']) .search input { padding-inline-start: ${a(10)}; }
|
|
426
|
+
/* The error region stays in the page for its live announcement, but takes no room until there is an error. */
|
|
427
|
+
:host([look='site']:not([invalid])) .error { margin-block-start: 0; }
|
|
358
428
|
.required {
|
|
359
|
-
font-weight: ${
|
|
429
|
+
font-weight: ${b("regular")};
|
|
360
430
|
color: ${t.textMuted};
|
|
361
431
|
}
|
|
362
432
|
.description {
|
|
363
|
-
font-size: ${
|
|
364
|
-
line-height: ${
|
|
433
|
+
font-size: ${$("sm")};
|
|
434
|
+
line-height: ${W("normal")};
|
|
365
435
|
color: ${t.textMuted};
|
|
366
436
|
margin-block-end: ${a(2)};
|
|
367
437
|
}
|
|
368
438
|
.error {
|
|
369
|
-
font-size: ${
|
|
370
|
-
line-height: ${
|
|
439
|
+
font-size: ${$("sm")};
|
|
440
|
+
line-height: ${W("normal")};
|
|
371
441
|
color: ${t.dangerText};
|
|
372
442
|
margin-block-start: ${a(1)};
|
|
373
443
|
display: flex;
|
|
@@ -389,15 +459,15 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
389
459
|
opacity: 0.6;
|
|
390
460
|
cursor: not-allowed;
|
|
391
461
|
}
|
|
392
|
-
`]}get controlId(){return this.id_("control")}get describedBy(){let i=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean);return i.length?i.join(" "):
|
|
462
|
+
`]}get controlId(){return this.id_("control")}get describedBy(){let i=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean);return i.length?i.join(" "):d}focus(i){let r=this.renderRoot?.querySelector(`#${this.controlId}`)??this.renderRoot?.querySelector("input, select, textarea, button");r?r.focus(i):super.focus(i)}renderLabel(){return n`
|
|
393
463
|
<label class="label" for=${this.controlId} part="label">
|
|
394
|
-
${this.label}${this.required?
|
|
464
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
395
465
|
</label>
|
|
396
|
-
`}render(){return
|
|
466
|
+
`}render(){return n`
|
|
397
467
|
${this.renderLabel()}
|
|
398
|
-
${this.description?
|
|
468
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">
|
|
399
469
|
${this.description}
|
|
400
|
-
</div>`:
|
|
470
|
+
</div>`:d}
|
|
401
471
|
${this.renderControl()}
|
|
402
472
|
<!--
|
|
403
473
|
The error region is always present, even when empty. A live region
|
|
@@ -412,9 +482,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
412
482
|
part="error"
|
|
413
483
|
aria-live="polite"
|
|
414
484
|
>
|
|
415
|
-
${this.error||
|
|
485
|
+
${this.error||d}
|
|
416
486
|
</div>
|
|
417
|
-
`}setFormValue(i){this.value=i,this.internals?.setFormValue(i),this.dispatchEvent(new CustomEvent("impakt-change",{detail:this.changeDetail(i),bubbles:!0,composed:!0}))}changeDetail(i){return{value:i}}};var
|
|
487
|
+
`}setFormValue(i){this.value=i,this.internals?.setFormValue(i),this.dispatchEvent(new CustomEvent("impakt-change",{detail:this.changeDetail(i),bubbles:!0,composed:!0}))}changeDetail(i){return{value:i}}};var Fe=class extends y{static{this.properties={...y.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=[...y.styles,K,ce("input"),u`
|
|
418
488
|
:host([hide-label]) .label {
|
|
419
489
|
position: absolute;
|
|
420
490
|
inline-size: 1px;
|
|
@@ -442,25 +512,25 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
442
512
|
color: ${t.textMuted};
|
|
443
513
|
pointer-events: none;
|
|
444
514
|
}
|
|
445
|
-
`]}renderControl(){let e=this.renderInput();return this.type==="search"?
|
|
515
|
+
`]}renderControl(){let e=this.renderInput();return this.type==="search"?n`<span class="search" part="search">${M("search","20px")}${e}</span>`:e}renderInput(){return n`
|
|
446
516
|
<input
|
|
447
517
|
id=${this.controlId}
|
|
448
518
|
part="input"
|
|
449
519
|
type=${this.type}
|
|
450
|
-
name=${this.name||
|
|
520
|
+
name=${this.name||d}
|
|
451
521
|
.value=${this.value}
|
|
452
|
-
placeholder=${this.placeholder||
|
|
453
|
-
autocomplete=${this.autocomplete||
|
|
454
|
-
inputmode=${this.inputmode||
|
|
455
|
-
maxlength=${this.maxlength??
|
|
522
|
+
placeholder=${this.placeholder||d}
|
|
523
|
+
autocomplete=${this.autocomplete||d}
|
|
524
|
+
inputmode=${this.inputmode||d}
|
|
525
|
+
maxlength=${this.maxlength??d}
|
|
456
526
|
?disabled=${this.disabled}
|
|
457
527
|
?readonly=${this.readonly}
|
|
458
528
|
?required=${this.required}
|
|
459
529
|
aria-describedby=${this.describedBy}
|
|
460
|
-
aria-invalid=${this.error?"true":
|
|
530
|
+
aria-invalid=${this.error?"true":d}
|
|
461
531
|
@input=${e=>this.setFormValue(e.target.value)}
|
|
462
532
|
/>
|
|
463
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",
|
|
533
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-text-input",Fe);var je=class extends y{static{this.properties={...y.properties,width:{type:String,reflect:!0},options:{type:Array},placeholder:{type:String},hideLabel:{type:Boolean,attribute:"hide-label",reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.width="full",this.options=[],this.placeholder="Choose an option",this.hideLabel=!1,this.size="md"}static{this.styles=[...y.styles,K,ce("select"),u`
|
|
464
534
|
:host([hide-label]) .label {
|
|
465
535
|
${T}
|
|
466
536
|
}
|
|
@@ -495,24 +565,24 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
495
565
|
*/
|
|
496
566
|
.box { position: relative; display: block; inline-size: min(100%, var(--impakt-field-width)); }
|
|
497
567
|
select { inline-size: 100%; appearance: var(--impakt-select-appearance, auto); -webkit-appearance: var(--impakt-select-appearance, auto); padding-inline-end: var(--impakt-select-padding-end, ${a(3)}); cursor: pointer; }
|
|
498
|
-
.caret { display: var(--impakt-select-caret, none); position: absolute; inset-inline-end: ${a(3.5)}; inset-block-start: 50%; transform: translateY(-50%); font-size: ${
|
|
568
|
+
.caret { display: var(--impakt-select-caret, none); position: absolute; inset-inline-end: ${a(3.5)}; inset-block-start: 50%; transform: translateY(-50%); font-size: ${$("sm")}; line-height: 1; color: ${t.text}; pointer-events: none; }
|
|
499
569
|
/* A forced colours mode draws the box in the system colours; the caret takes the text colour. */
|
|
500
570
|
@media (forced-colors: active) { .caret { color: CanvasText; } }
|
|
501
|
-
`]}renderControl(){return
|
|
571
|
+
`]}renderControl(){return n`
|
|
502
572
|
<span class="box" part="box"><select
|
|
503
573
|
id=${this.controlId}
|
|
504
574
|
part="select"
|
|
505
|
-
name=${this.name||
|
|
575
|
+
name=${this.name||d}
|
|
506
576
|
?disabled=${this.disabled}
|
|
507
577
|
?required=${this.required}
|
|
508
578
|
aria-describedby=${this.describedBy}
|
|
509
|
-
aria-invalid=${this.error?"true":
|
|
579
|
+
aria-invalid=${this.error?"true":d}
|
|
510
580
|
@change=${e=>this.setFormValue(e.target.value)}
|
|
511
581
|
>
|
|
512
582
|
<option value="" ?selected=${!this.value}>${this.placeholder}</option>
|
|
513
|
-
${this.options.map(e=>
|
|
583
|
+
${this.options.map(e=>n`<option value=${e.value} ?selected=${this.value===e.value}>${e.label}</option>`)}
|
|
514
584
|
</select><span class="caret" part="caret" aria-hidden="true">▾</span></span>
|
|
515
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",
|
|
585
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-select",je);var We=class extends y{static{this.properties={...y.properties,checked:{type:Boolean,reflect:!0}}}constructor(){super(),this.checked=!1}static{this.styles=[...y.styles,I(".row"),u`
|
|
516
586
|
.row {
|
|
517
587
|
display: flex;
|
|
518
588
|
align-items: flex-start;
|
|
@@ -520,7 +590,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
520
590
|
cursor: pointer;
|
|
521
591
|
}
|
|
522
592
|
input {
|
|
523
|
-
${
|
|
593
|
+
${E}
|
|
524
594
|
inline-size: 20px;
|
|
525
595
|
block-size: 20px;
|
|
526
596
|
margin: 0;
|
|
@@ -528,35 +598,35 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
528
598
|
accent-color: ${t.brand};
|
|
529
599
|
}
|
|
530
600
|
.text {
|
|
531
|
-
font-size: ${
|
|
601
|
+
font-size: ${$("md")};
|
|
532
602
|
}
|
|
533
603
|
:host([invalid]) .row {
|
|
534
604
|
color: ${t.dangerText};
|
|
535
605
|
}
|
|
536
|
-
`]}renderControl(){return
|
|
606
|
+
`]}renderControl(){return n`
|
|
537
607
|
<label class="row" part="row" for=${this.controlId}>
|
|
538
608
|
<input
|
|
539
609
|
type="checkbox"
|
|
540
610
|
id=${this.controlId}
|
|
541
611
|
part="input"
|
|
542
|
-
name=${this.name||
|
|
612
|
+
name=${this.name||d}
|
|
543
613
|
.checked=${this.checked}
|
|
544
614
|
?disabled=${this.disabled}
|
|
545
615
|
?required=${this.required}
|
|
546
616
|
aria-describedby=${this.describedBy}
|
|
547
|
-
aria-invalid=${this.error?"true":
|
|
617
|
+
aria-invalid=${this.error?"true":d}
|
|
548
618
|
@change=${e=>{this.checked=e.target.checked,this.setFormValue(this.checked?"on":"")}}
|
|
549
619
|
/>
|
|
550
620
|
<span class="text">
|
|
551
|
-
${this.label}${this.required?
|
|
621
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
552
622
|
</span>
|
|
553
623
|
</label>
|
|
554
|
-
`}renderLabel(){return
|
|
624
|
+
`}renderLabel(){return n`${d}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox",We);var Yr=R("48rem");function cr(o){if(!o||o.startsWith("#"))return null;try{let e=typeof location>"u"?"http://localhost/":location.href;return new URL(o,e).pathname.replace(/\/$/,"")||"/"}catch{return null}}function Si(o,e){let i=cr(o);if(!i)return!1;let r=cr(e||(typeof location>"u"?"":location.pathname));return r?i===r?!0:i!=="/"&&r.startsWith(`${i}/`):!1}function ve(o,e,i){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let r=new CustomEvent("impakt-navigate",{detail:{href:i.href,id:i.id??i.href},bubbles:!0,composed:!0,cancelable:!0});o.dispatchEvent(r)||e.preventDefault()}var Ue=class extends h{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=[...h.styles,v,u`
|
|
555
625
|
:host { display: flex; flex-direction: column; gap: ${a(5)}; block-size: 100%; }
|
|
556
626
|
.card { padding: ${a(2)}; border-radius: ${t.radiusXl}; background: ${t.surfaceCard}; }
|
|
557
627
|
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: ${a(.5)}; }
|
|
558
628
|
a {
|
|
559
|
-
${
|
|
629
|
+
${E}
|
|
560
630
|
display: flex;
|
|
561
631
|
align-items: center;
|
|
562
632
|
gap: ${a(3)};
|
|
@@ -564,8 +634,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
564
634
|
padding: 0 ${a(3.5)};
|
|
565
635
|
border-radius: ${t.radiusLg};
|
|
566
636
|
color: ${t.text};
|
|
567
|
-
font-size: ${
|
|
568
|
-
font-weight: ${
|
|
637
|
+
font-size: ${$("md")};
|
|
638
|
+
font-weight: ${b("medium")};
|
|
569
639
|
text-decoration: none;
|
|
570
640
|
transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
|
|
571
641
|
}
|
|
@@ -576,23 +646,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
576
646
|
.footer.empty { display: none; }
|
|
577
647
|
@media (prefers-reduced-motion: reduce) { a { transition: none; } }
|
|
578
648
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
579
|
-
`]}onFooter(i){let r=i.target;this.footerFilled=r.assignedNodes({flatten:!0}).some(
|
|
649
|
+
`]}onFooter(i){let r=i.target;this.footerFilled=r.assignedNodes({flatten:!0}).some(s=>s.nodeType===Node.ELEMENT_NODE||(s.textContent??"").trim()!==""),this.requestUpdate()}render(){return n`
|
|
580
650
|
<nav class="card" aria-label=${this.label} part="nav">
|
|
581
651
|
<ul part="list">
|
|
582
|
-
${this.items.map(i=>
|
|
652
|
+
${this.items.map(i=>n`
|
|
583
653
|
<li>
|
|
584
654
|
<a
|
|
585
655
|
href=${i.href}
|
|
586
656
|
part="link"
|
|
587
|
-
aria-current=${
|
|
588
|
-
@click=${r=>
|
|
657
|
+
aria-current=${Si(i.href,this.current)?"page":d}
|
|
658
|
+
@click=${r=>ve(this,r,i)}
|
|
589
659
|
>${M(i.icon,"20px")}<span>${i.label}</span></a>
|
|
590
660
|
</li>
|
|
591
661
|
`)}
|
|
592
662
|
</ul>
|
|
593
663
|
</nav>
|
|
594
664
|
<div class="card footer ${this.footerFilled?"":"empty"}" part="footer"><slot name="footer" @slotchange=${this.onFooter}></slot></div>
|
|
595
|
-
`}},
|
|
665
|
+
`}},Ve=class extends h{static{this.properties={items:{type:Array},label:{type:String},current:{type:String}}}constructor(){super(),this.items=[],this.label="Main",this.current=""}static{this.styles=[...h.styles,v,u`
|
|
596
666
|
:host { display: block; }
|
|
597
667
|
nav { padding: ${a(1.5)}; border-radius: ${t.radiusXl}; background: ${t.text}; box-shadow: ${t.shadowLg}; }
|
|
598
668
|
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${a(1)}; }
|
|
@@ -609,7 +679,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
609
679
|
/* The resting items are a blend of the card and text colours that keeps 4.5:1 on the bar. */
|
|
610
680
|
color: color-mix(in srgb, ${t.surfaceCard} 74%, ${t.text});
|
|
611
681
|
font-size: 11px;
|
|
612
|
-
font-weight: ${
|
|
682
|
+
font-weight: ${b("medium")};
|
|
613
683
|
line-height: 1.25;
|
|
614
684
|
text-decoration: none;
|
|
615
685
|
text-align: center;
|
|
@@ -618,22 +688,22 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
618
688
|
a[aria-current='page'] { background: color-mix(in srgb, ${t.text}, ${t.surfaceCard} 16%); color: ${t.surfaceCard}; }
|
|
619
689
|
span.word { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
620
690
|
@media (forced-colors: active) { a[aria-current='page'] { border: 2px solid Highlight; } }
|
|
621
|
-
`]}render(){return
|
|
691
|
+
`]}render(){return n`
|
|
622
692
|
<nav aria-label=${this.label} part="nav">
|
|
623
693
|
<ul part="list">
|
|
624
|
-
${this.items.map(e=>
|
|
694
|
+
${this.items.map(e=>n`
|
|
625
695
|
<li>
|
|
626
696
|
<a
|
|
627
697
|
href=${e.href}
|
|
628
698
|
part="link"
|
|
629
|
-
aria-current=${
|
|
630
|
-
@click=${i=>
|
|
699
|
+
aria-current=${Si(e.href,this.current)?"page":d}
|
|
700
|
+
@click=${i=>ve(this,i,e)}
|
|
631
701
|
>${M(e.icon,"22px")}<span class="word">${e.label}</span></a>
|
|
632
702
|
</li>
|
|
633
703
|
`)}
|
|
634
704
|
</ul>
|
|
635
705
|
</nav>
|
|
636
|
-
`}},
|
|
706
|
+
`}},Ge=class extends h{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=[...h.styles,v,u`
|
|
637
707
|
:host {
|
|
638
708
|
display: block;
|
|
639
709
|
min-block-size: 100svh;
|
|
@@ -655,7 +725,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
655
725
|
margin: ${a(5)};
|
|
656
726
|
padding: ${a(5)};
|
|
657
727
|
border-radius: var(--impakt-shell-radius, 36px);
|
|
658
|
-
background: ${
|
|
728
|
+
background: ${l("color.surface.page","#f2f5f4")};
|
|
659
729
|
}
|
|
660
730
|
.brand { grid-area: brand; display: flex; align-items: center; min-block-size: 52px; }
|
|
661
731
|
.side { grid-area: side; display: flex; flex-direction: column; min-block-size: 0; }
|
|
@@ -682,7 +752,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
682
752
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
683
753
|
.skip:focus { transform: none; }
|
|
684
754
|
|
|
685
|
-
@media (max-width: ${
|
|
755
|
+
@media (max-width: ${Yr}) {
|
|
686
756
|
:host { background: ${t.text}; }
|
|
687
757
|
.frame {
|
|
688
758
|
display: flex;
|
|
@@ -714,7 +784,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
714
784
|
/* Room for the floating tab bar, so the last of the content can scroll clear of it. */
|
|
715
785
|
padding: ${a(4)} ${a(4)} calc(96px + env(safe-area-inset-bottom));
|
|
716
786
|
border-radius: 28px 28px 0 0;
|
|
717
|
-
background: ${
|
|
787
|
+
background: ${l("color.surface.page","#f2f5f4")};
|
|
718
788
|
}
|
|
719
789
|
.tab-bar {
|
|
720
790
|
display: block;
|
|
@@ -724,12 +794,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
724
794
|
inset-block-end: calc(${a(3)} + env(safe-area-inset-bottom));
|
|
725
795
|
}
|
|
726
796
|
}
|
|
727
|
-
`]}skip(e){e.preventDefault();let i=this.renderRoot.querySelector("main");i?.focus(),i?.scrollIntoView()}render(){return
|
|
797
|
+
`]}skip(e){e.preventDefault();let i=this.renderRoot.querySelector("main");i?.focus(),i?.scrollIntoView()}render(){return n`
|
|
728
798
|
<div class="frame" part="frame">
|
|
729
799
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
730
800
|
<div class="brand" part="brand"><slot name="brand"></slot></div>
|
|
731
801
|
<div class="side" part="side"><slot name="nav"></slot></div>
|
|
732
|
-
<header aria-label=${this.topBarLabel||
|
|
802
|
+
<header aria-label=${this.topBarLabel||d} part="top-bar">
|
|
733
803
|
<div class="workspace"><slot name="workspace"></slot></div>
|
|
734
804
|
<div class="search"><slot name="search"></slot></div>
|
|
735
805
|
<div class="actions"><slot name="actions"></slot></div>
|
|
@@ -738,7 +808,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
738
808
|
<main id="content" tabindex="-1" part="main"><slot></slot></main>
|
|
739
809
|
<div class="tab-bar" part="tab-bar"><slot name="tab-bar"></slot></div>
|
|
740
810
|
</div>
|
|
741
|
-
`}};customElements.define("impakt-side-nav",
|
|
811
|
+
`}};customElements.define("impakt-side-nav",Ue);customElements.define("impakt-tab-bar",Ve);customElements.define("impakt-app-shell",Ge);function U(o){let e=o?.closest?.("[lang]")?.getAttribute("lang"),i=!e&&o?o.getRootNode?.()?.host?.closest?.("[lang]")?.getAttribute("lang")??"":"",r=typeof document<"u"?document.documentElement?.lang??"":"",s=(e||i||r||"").trim();return!s||s.toLowerCase()==="en"?"en-GB":s}var x={lineSoft:l("color.line.soft","light-dark(#CFCCC5, #2E2E2E)"),ok:l("color.status.ok-mark","#137A52"),bad:l("color.status.bad-mark","light-dark(#B23A2E, #F0978F)"),accent:l("color.accent.default","#FFD43B"),onOk:l("color.status.on-ok","#FFFFFF"),codeSurface:l("color.code.surface","#111111"),codeText:l("color.code.text","#FFFFFF"),codeMuted:l("color.code.muted","#A8A8A6"),inverse:t.text,onInverse:t.surfaceCard,small:l("font.size.sm","0.875rem"),tiny:l("font.size.2xs","0.6875rem"),medium:l("font.weight.medium","500"),regular:l("font.weight.regular","400")};var Ke=class extends h{static{this.properties={tone:{type:String,reflect:!0},label:{type:String},size:{type:String,reflect:!0},live:{type:Boolean,reflect:!0}}}constructor(){super(),this.tone="neutral",this.label="",this.size="tool",this.live=!1}static{this.styles=[...h.styles,u`
|
|
742
812
|
/* A short pill stays on one line; a long one wraps inside its border rather than pushing the page sideways at 320 (1.4.10). */
|
|
743
813
|
:host {
|
|
744
814
|
display: inline-flex;
|
|
@@ -753,8 +823,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
753
823
|
gap: ${a(1.5)};
|
|
754
824
|
padding: 3px ${a(2)};
|
|
755
825
|
font-family: ${t.fontMono};
|
|
756
|
-
font-size: ${
|
|
757
|
-
font-weight: ${
|
|
826
|
+
font-size: ${x.small};
|
|
827
|
+
font-weight: ${x.medium};
|
|
758
828
|
line-height: 1.3;
|
|
759
829
|
overflow-wrap: anywhere;
|
|
760
830
|
color: ${t.text};
|
|
@@ -770,22 +840,22 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
770
840
|
background: currentColor;
|
|
771
841
|
}
|
|
772
842
|
:host([tone='ok']) .dot {
|
|
773
|
-
background: ${
|
|
843
|
+
background: ${x.ok};
|
|
774
844
|
}
|
|
775
845
|
:host([tone='bad']) .dot {
|
|
776
|
-
background: ${
|
|
846
|
+
background: ${x.bad};
|
|
777
847
|
}
|
|
778
848
|
:host([tone='warn']) .dot {
|
|
779
|
-
background: ${
|
|
849
|
+
background: ${x.accent};
|
|
780
850
|
border: 1px solid ${t.text};
|
|
781
851
|
}
|
|
782
852
|
:host([tone='solid']) .pill {
|
|
783
|
-
color: ${
|
|
784
|
-
background: ${
|
|
785
|
-
border-color: ${
|
|
853
|
+
color: ${x.onInverse};
|
|
854
|
+
background: ${x.inverse};
|
|
855
|
+
border-color: ${x.inverse};
|
|
786
856
|
}
|
|
787
857
|
:host([size='marketing']) .pill {
|
|
788
|
-
font-size: ${
|
|
858
|
+
font-size: ${x.tiny};
|
|
789
859
|
text-transform: uppercase;
|
|
790
860
|
letter-spacing: 0.06em;
|
|
791
861
|
}
|
|
@@ -798,49 +868,49 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
798
868
|
border-color: CanvasText;
|
|
799
869
|
}
|
|
800
870
|
}
|
|
801
|
-
`]}get hasDot(){return this.tone==="ok"||this.tone==="bad"||this.tone==="warn"||this.tone==="info"}render(){return
|
|
802
|
-
>${this.hasDot?
|
|
803
|
-
>`}};customElements.define("impakt-status",
|
|
871
|
+
`]}get hasDot(){return this.tone==="ok"||this.tone==="bad"||this.tone==="warn"||this.tone==="info"}render(){return n`<span class="pill" part="pill" role=${this.live?"status":d}
|
|
872
|
+
>${this.hasDot?n`<span class="dot" part="dot" aria-hidden="true"></span>`:d}<span class="text"><slot>${this.label}</slot></span></span
|
|
873
|
+
>`}};customElements.define("impakt-status",Ke);var Jr=["ok","bad","warn","info","neutral","solid"],Xe=u`
|
|
804
874
|
.status-pill {
|
|
805
875
|
flex: none;
|
|
806
876
|
inline-size: fit-content;
|
|
807
877
|
}
|
|
808
|
-
`,
|
|
878
|
+
`,pe=(o,e,i="status")=>{if(!o)return d;let r=Jr.includes(e)?e:"neutral";return n`<impakt-status class="status-pill" part=${i} tone=${r} label=${o}></impakt-status>`};var we=l("color.text.inverse","var(--impakt-solid-card, var(--impakt-color-surface-card, #ffffff))"),_={padding:l("tile.padding","12px 16px"),gap:l("tile.gap","4px"),minHeight:l("tile.min-height","84px"),align:l("tile.align","stretch"),edgeWidth:l("tile.edge-width","0px"),radius:l("tile.radius","8px"),fill:l("tile.fill","0%"),hover:l("tile.hover","5%"),labelFont:l("tile.label.font","var(--impakt-font-family-body, system-ui, sans-serif)"),labelSize:l("tile.label.size","11px"),labelWeight:l("tile.label.weight","500"),labelTracking:l("tile.label.tracking","0.06em"),labelTransform:l("tile.label.transform","uppercase"),valueSize:l("tile.value.size","34px"),valueStat:l("tile.value.stat","0"),valueLineHeight:l("tile.value.line-height","1.1"),valueTracking:l("tile.value.tracking","0em"),valueWeight:l("tile.value.weight","300"),valueSpace:l("tile.value.space","auto"),lgRadius:l("tile.lg.radius","12px"),lgLabelSize:l("tile.lg.label.size","0.875rem"),lgLabelTracking:l("tile.lg.label.tracking","0em"),lgLabelTransform:l("tile.lg.label.transform","none"),captionLineHeight:l("tile.caption.line-height","1.5")},Zr=R(`calc(var(--impakt-type-stat-size, 3.25rem) * ${_.valueStat} + ${_.valueSize} * (1 - ${_.valueStat}))`),Qr=R(`calc(2.5rem * ${_.valueStat} + ${_.valueSize} * (1 - ${_.valueStat}))`),pr=R(`color-mix(in srgb, ${t.surfaceCard} ${_.fill}, ${t.surfaceInset})`),ea=l("font.weight.light","300"),Ye=class extends h{static{this.properties={label:{type:String},value:{type:String},caption:{type:String},href:{type:String},tone:{type:String,reflect:!0},size:{type:String,reflect:!0},status:{type:String},statusTone:{type:String,attribute:"status-tone"}}}constructor(){super(),this.label="",this.value="",this.caption="",this.href="",this.tone="plain",this.size="md",this.status="",this.statusTone="neutral"}static{this.styles=[...h.styles,v,Xe,u`
|
|
809
879
|
:host { display: block; }
|
|
810
880
|
.tile {
|
|
811
881
|
box-sizing: border-box;
|
|
812
882
|
display: flex;
|
|
813
883
|
flex-direction: column;
|
|
814
|
-
align-items: ${
|
|
815
|
-
gap: ${
|
|
884
|
+
align-items: ${_.align};
|
|
885
|
+
gap: ${_.gap};
|
|
816
886
|
block-size: 100%;
|
|
817
|
-
min-block-size: ${
|
|
818
|
-
padding: ${
|
|
819
|
-
border: ${
|
|
820
|
-
border-radius: ${
|
|
821
|
-
background: ${
|
|
887
|
+
min-block-size: ${_.minHeight};
|
|
888
|
+
padding: ${_.padding};
|
|
889
|
+
border: ${_.edgeWidth} solid ${t.text};
|
|
890
|
+
border-radius: ${_.radius};
|
|
891
|
+
background: ${pr};
|
|
822
892
|
color: ${t.text};
|
|
823
893
|
text-decoration: none;
|
|
824
894
|
}
|
|
825
|
-
a.tile:hover { background: color-mix(in srgb, ${
|
|
826
|
-
.label { font-family: ${
|
|
895
|
+
a.tile:hover { background: color-mix(in srgb, ${pr}, ${t.text} ${_.hover}); }
|
|
896
|
+
.label { font-family: ${_.labelFont}; font-size: ${_.labelSize}; font-weight: ${_.labelWeight}; letter-spacing: ${_.labelTracking}; text-transform: ${_.labelTransform}; color: ${t.textMuted}; }
|
|
827
897
|
/* The figure: light at 34px where the brand derives it, or under Noire (G2) Archivo SemiBold 52/1.04, -4%. A word fits as well as a number. */
|
|
828
|
-
.value { margin-block-start: ${
|
|
829
|
-
.caption { font-size: ${
|
|
830
|
-
:host([size='lg']) .tile { min-block-size: 200px; padding: ${a(6)}; border-radius: ${
|
|
831
|
-
:host([size='lg']) .label { font-size: ${
|
|
832
|
-
:host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${
|
|
898
|
+
.value { margin-block-start: ${_.valueSpace}; font-size: ${Zr}; line-height: ${_.valueLineHeight}; letter-spacing: ${_.valueTracking}; font-weight: ${_.valueWeight}; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
899
|
+
.caption { font-size: ${$("sm")}; line-height: ${_.captionLineHeight}; color: ${t.textMuted}; }
|
|
900
|
+
:host([size='lg']) .tile { min-block-size: 200px; padding: ${a(6)}; border-radius: ${_.lgRadius}; }
|
|
901
|
+
:host([size='lg']) .label { font-size: ${_.lgLabelSize}; letter-spacing: ${_.lgLabelTracking}; text-transform: ${_.lgLabelTransform}; }
|
|
902
|
+
:host([size='lg']) .value { margin-block-start: auto; font-size: 64px; line-height: 1; font-weight: ${ea}; }
|
|
833
903
|
:host([tone='brand']) .tile { background: ${t.brand}; color: ${t.onBrand}; border-color: ${t.brand}; }
|
|
834
904
|
:host([tone='brand']) a.tile:hover { background: ${t.brandHover}; }
|
|
835
905
|
:host([tone='brand']) .label, :host([tone='brand']) .caption { color: ${t.onBrand}; }
|
|
836
|
-
@media (max-width: 40rem) { .value { font-size: ${
|
|
906
|
+
@media (max-width: 40rem) { .value { font-size: ${Qr}; } }
|
|
837
907
|
@media (forced-colors: active) { .tile { border: 1px solid CanvasText; } }
|
|
838
|
-
`]}render(){let e=
|
|
908
|
+
`]}render(){let e=n`
|
|
839
909
|
<span class="label" part="label">${this.label}</span>
|
|
840
910
|
<span class="value" part="value">${this.value}</span>
|
|
841
|
-
${this.caption?
|
|
842
|
-
${
|
|
843
|
-
`;return this.href?
|
|
911
|
+
${this.caption?n`<span class="caption" part="caption">${this.caption}</span>`:d}
|
|
912
|
+
${pe(this.status,this.statusTone)}
|
|
913
|
+
`;return this.href?n`<a class="tile" href=${this.href} part="tile">${e}</a>`:n`<div class="tile" part="tile">${e}</div>`}},Je=class extends h{static{this.properties={date:{type:String},tone:{type:String,reflect:!0}}}constructor(){super(),this.date="",this.tone="brand"}static{this.styles=[...h.styles,u`
|
|
844
914
|
:host { display: inline-block; flex: none; }
|
|
845
915
|
time {
|
|
846
916
|
position: relative;
|
|
@@ -857,23 +927,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
857
927
|
line-height: 1;
|
|
858
928
|
}
|
|
859
929
|
:host([tone='plain']) time { background: ${t.surfaceInset}; color: ${t.text}; }
|
|
860
|
-
.month { font-size: 10px; font-weight: ${
|
|
861
|
-
.day { margin-block-start: ${a(1)}; font-size: 20px; font-weight: ${
|
|
930
|
+
.month { font-size: 10px; font-weight: ${b("medium")}; letter-spacing: ${t.trackingWide}; text-transform: uppercase; }
|
|
931
|
+
.day { margin-block-start: ${a(1)}; font-size: 20px; font-weight: ${b("medium")}; font-variant-numeric: tabular-nums; }
|
|
862
932
|
.sr-only { ${T} }
|
|
863
933
|
@media (forced-colors: active) { time { border: 1px solid CanvasText; } }
|
|
864
|
-
`]}parts(){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.date??"");if(!e)return null;let i=new Date(Date.UTC(Number(e[1]),Number(e[2])-1,Number(e[3]),12));if(Number.isNaN(i.getTime()))return null;let r=
|
|
934
|
+
`]}parts(){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(this.date??"");if(!e)return null;let i=new Date(Date.UTC(Number(e[1]),Number(e[2])-1,Number(e[3]),12));if(Number.isNaN(i.getTime()))return null;let r=U(this),s=c=>new Intl.DateTimeFormat(r,{...c,timeZone:"UTC"}).format(i);return{month:s({month:"short"}).replace(".",""),day:s({day:"numeric"}),full:s({day:"numeric",month:"long",year:"numeric"})}}render(){let e=this.parts();return e?n`<time datetime=${this.date} part="tile">
|
|
865
935
|
<span class="month" aria-hidden="true">${e.month}</span>
|
|
866
936
|
<span class="day" aria-hidden="true">${e.day}</span>
|
|
867
937
|
<span class="sr-only">${e.full}</span>
|
|
868
|
-
</time>`:
|
|
938
|
+
</time>`:n`${d}`}},Ze=class extends h{constructor(){super();this.filled={start:!1,end:!1};this.selected=!1,this.heading="",this.meta="",this.href="",this.divided=!1,this.muted=!1}static{this.properties={heading:{type:String},meta:{type:String},href:{type:String},divided:{type:Boolean,reflect:!0},muted:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0}}}static{this.styles=[...h.styles,v,u`
|
|
869
939
|
:host { display: block; }
|
|
870
940
|
:host([divided]) .row { border-block-start: ${t.borderThin} solid ${t.hairline}; }
|
|
871
941
|
.row { position: relative; display: flex; align-items: center; gap: ${a(3)}; padding-block: ${a(3)}; }
|
|
872
942
|
.text { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; gap: ${a(.5)}; }
|
|
873
|
-
.title { font-size: ${
|
|
874
|
-
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${
|
|
943
|
+
.title { font-size: ${$("md")}; font-weight: ${b("medium")}; color: ${t.text}; }
|
|
944
|
+
:host([muted]) .title { color: ${t.textMuted}; font-weight: ${b("regular")}; }
|
|
875
945
|
/* The meta is a label: the code face where the brand sets its labels in one, as G2 does (36:452, 37:646). */
|
|
876
|
-
.meta { font-family: ${t.fontEyebrow}; font-size: ${
|
|
946
|
+
.meta { font-family: ${t.fontEyebrow}; font-size: ${$("sm")}; color: ${t.textMuted}; }
|
|
877
947
|
a { color: inherit; text-decoration: none; }
|
|
878
948
|
/* The link is stretched over the row, so the row is one target. */
|
|
879
949
|
a::after { content: ''; position: absolute; inset: 0; border-radius: ${t.radius}; }
|
|
@@ -885,48 +955,48 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
885
955
|
/* Controls at the end stay pressable above the stretched link. */
|
|
886
956
|
.end { position: relative; z-index: 1; }
|
|
887
957
|
.chevron { flex: none; color: ${t.textMuted}; }
|
|
888
|
-
:host([selected]) .row { padding-inline: ${a(4)}; background: ${t.text}; --impakt-color-text-default: ${
|
|
889
|
-
:host([selected]) :is(.title, .meta, .chevron) { color: ${
|
|
890
|
-
:host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${
|
|
958
|
+
:host([selected]) .row { padding-inline: ${a(4)}; background: ${t.text}; --impakt-color-text-default: ${we}; --impakt-color-text-muted: color-mix(in srgb, ${we} 72%, ${t.text}); --impakt-color-text-inverse: ${t.text}; }
|
|
959
|
+
:host([selected]) :is(.title, .meta, .chevron) { color: ${we}; }
|
|
960
|
+
:host([selected]) .meta, :host([selected]) .chevron { color: color-mix(in srgb, ${we} 72%, ${t.text}); }
|
|
891
961
|
@media (forced-colors: active) { :host([selected]) .row { outline: 2px solid Highlight; } }
|
|
892
|
-
`]}onSlot(i){let r=i.target,
|
|
962
|
+
`]}onSlot(i){let r=i.target,s=r.name;this.filled={...this.filled,[s]:r.assignedNodes({flatten:!0}).some(c=>c.nodeType===Node.ELEMENT_NODE||(c.textContent??"").trim()!=="")},this.requestUpdate()}render(){let i=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" aria-current=${this.selected?"true":d}>
|
|
893
963
|
<div class="start ${this.filled.start?"":"empty"}"><slot name="start" @slotchange=${this.onSlot}></slot></div>
|
|
894
|
-
<div class="text">${i}${this.meta?
|
|
964
|
+
<div class="text">${i}${this.meta?n`<span class="meta" part="meta">${this.meta}</span>`:d}</div>
|
|
895
965
|
<div class="end ${this.filled.end?"":"empty"}"><slot name="end" @slotchange=${this.onSlot}></slot></div>
|
|
896
|
-
${this.href&&!this.selected?
|
|
897
|
-
</div>`}},
|
|
966
|
+
${this.href&&!this.selected?n`<span class="chevron" aria-hidden="true">${M("chevron-right","20px")}</span>`:d}
|
|
967
|
+
</div>`}},Qe=class extends h{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=[...h.styles,v,I("button"),u`
|
|
898
968
|
:host { display: inline-block; }
|
|
899
969
|
/* The containing block for the words kept for screen readers, so a control scrolled out of a row cannot widen the page. */
|
|
900
970
|
button {
|
|
901
|
-
${
|
|
971
|
+
${E}
|
|
902
972
|
position: relative;
|
|
903
973
|
display: inline-flex;
|
|
904
974
|
align-items: center;
|
|
905
975
|
gap: ${a(2)};
|
|
906
976
|
/* 36px with a hairline edge and medium words, or under Noire 35px with an ink edge (filter-chip.* tokens). */
|
|
907
|
-
min-block-size: ${
|
|
977
|
+
min-block-size: ${l("filter-chip.height","36px")};
|
|
908
978
|
padding: 0 ${a(3.5)};
|
|
909
979
|
font: inherit;
|
|
910
|
-
font-size: ${
|
|
911
|
-
font-weight: ${
|
|
980
|
+
font-size: ${$("sm")};
|
|
981
|
+
font-weight: ${l("filter-chip.weight","500")};
|
|
912
982
|
color: ${t.text};
|
|
913
983
|
background: ${t.surfaceCard};
|
|
914
|
-
border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${
|
|
984
|
+
border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${l("filter-chip.edge","10%")}, transparent);
|
|
915
985
|
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
916
986
|
cursor: pointer;
|
|
917
987
|
white-space: nowrap;
|
|
918
988
|
}
|
|
919
989
|
button:hover:not(:disabled) { background: ${t.surfaceInset}; }
|
|
920
|
-
button[aria-pressed='true'] { background: ${t.text}; color: ${
|
|
990
|
+
button[aria-pressed='true'] { background: ${t.text}; color: ${we}; border-color: ${t.text}; }
|
|
921
991
|
button:disabled { cursor: not-allowed; opacity: 0.5; }
|
|
922
992
|
.count { font-variant-numeric: tabular-nums; color: ${t.textMuted}; }
|
|
923
993
|
button[aria-pressed='true'] .count { color: inherit; opacity: 0.8; }
|
|
924
994
|
.sr-only { ${T} }
|
|
925
995
|
@media (forced-colors: active) { button[aria-pressed='true'] { border: 2px solid Highlight; } }
|
|
926
|
-
`]}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
|
|
996
|
+
`]}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}>
|
|
927
997
|
<span>${this.label}</span>
|
|
928
|
-
${e?this.countLabel?
|
|
929
|
-
</button>`}};customElements.define("impakt-stat-tile",
|
|
998
|
+
${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>`:d}
|
|
999
|
+
</button>`}};customElements.define("impakt-stat-tile",Ye);customElements.define("impakt-date-tile",Je);customElements.define("impakt-row",Ze);customElements.define("impakt-filter-chip",Qe);var et=class extends y{static{this.properties={...y.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=[...y.styles,I(".row"),u`
|
|
930
1000
|
.row {
|
|
931
1001
|
display: flex;
|
|
932
1002
|
align-items: center;
|
|
@@ -935,7 +1005,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
935
1005
|
cursor: pointer;
|
|
936
1006
|
}
|
|
937
1007
|
.text {
|
|
938
|
-
font-size: ${
|
|
1008
|
+
font-size: ${$("md")};
|
|
939
1009
|
}
|
|
940
1010
|
:host([hide-label]) .row {
|
|
941
1011
|
justify-content: flex-start;
|
|
@@ -950,7 +1020,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
950
1020
|
block-size: 28px;
|
|
951
1021
|
}
|
|
952
1022
|
input {
|
|
953
|
-
${
|
|
1023
|
+
${E}
|
|
954
1024
|
position: absolute;
|
|
955
1025
|
inset: 0;
|
|
956
1026
|
inline-size: 100%;
|
|
@@ -1004,10 +1074,10 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1004
1074
|
.knob { background: CanvasText; }
|
|
1005
1075
|
:host([checked]) .track { background: Highlight; }
|
|
1006
1076
|
}
|
|
1007
|
-
`]}renderControl(){return
|
|
1077
|
+
`]}renderControl(){return n`
|
|
1008
1078
|
<label class="row" part="row" for=${this.controlId}>
|
|
1009
1079
|
<span class="text">
|
|
1010
|
-
${this.label}${this.required?
|
|
1080
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
1011
1081
|
</span>
|
|
1012
1082
|
<span class="control">
|
|
1013
1083
|
<input
|
|
@@ -1015,19 +1085,19 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1015
1085
|
role="switch"
|
|
1016
1086
|
id=${this.controlId}
|
|
1017
1087
|
part="input"
|
|
1018
|
-
name=${this.name||
|
|
1088
|
+
name=${this.name||d}
|
|
1019
1089
|
.checked=${this.checked}
|
|
1020
1090
|
aria-checked=${this.checked?"true":"false"}
|
|
1021
1091
|
?disabled=${this.disabled}
|
|
1022
1092
|
?required=${this.required}
|
|
1023
1093
|
aria-describedby=${this.describedBy}
|
|
1024
|
-
aria-invalid=${this.error?"true":
|
|
1094
|
+
aria-invalid=${this.error?"true":d}
|
|
1025
1095
|
@change=${e=>{this.checked=e.target.checked,this.setFormValue(this.checked?"on":"")}}
|
|
1026
1096
|
/>
|
|
1027
1097
|
<span class="track" part="track"><span class="knob" part="knob"></span></span>
|
|
1028
1098
|
</span>
|
|
1029
1099
|
</label>
|
|
1030
|
-
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return
|
|
1100
|
+
`}changeDetail(e){return{value:e,checked:this.checked}}renderLabel(){return n`${d}`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},tt=class extends y{static{this.properties={...y.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=[...y.styles,u`
|
|
1031
1101
|
fieldset {
|
|
1032
1102
|
border: 0;
|
|
1033
1103
|
margin: 0;
|
|
@@ -1058,7 +1128,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1058
1128
|
display: inline-flex;
|
|
1059
1129
|
}
|
|
1060
1130
|
input {
|
|
1061
|
-
${
|
|
1131
|
+
${E}
|
|
1062
1132
|
position: absolute;
|
|
1063
1133
|
inset: 0;
|
|
1064
1134
|
inline-size: 100%;
|
|
@@ -1075,8 +1145,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1075
1145
|
min-block-size: 32px;
|
|
1076
1146
|
padding: ${a(1.5)} ${a(4)};
|
|
1077
1147
|
border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999));
|
|
1078
|
-
font-size: ${
|
|
1079
|
-
font-weight: ${
|
|
1148
|
+
font-size: ${$("sm")};
|
|
1149
|
+
font-weight: ${b("medium")};
|
|
1080
1150
|
color: ${t.textMuted};
|
|
1081
1151
|
pointer-events: none;
|
|
1082
1152
|
transition: background-color 120ms ease-in-out, color 120ms ease-in-out;
|
|
@@ -1105,11 +1175,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1105
1175
|
.segments { border: 1px solid CanvasText; }
|
|
1106
1176
|
input:checked + .face { border: 2px solid Highlight; }
|
|
1107
1177
|
}
|
|
1108
|
-
`]}renderLabel(){return
|
|
1109
|
-
${this.label}${this.required?
|
|
1110
|
-
</legend>`}renderControl(){return
|
|
1178
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
1179
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
1180
|
+
</legend>`}renderControl(){return n`
|
|
1111
1181
|
<div class="segments" part="segments">
|
|
1112
|
-
${this.options.map((e,i)=>{let r=this.id_(`seg-${i}`);return
|
|
1182
|
+
${this.options.map((e,i)=>{let r=this.id_(`seg-${i}`);return n`
|
|
1113
1183
|
<label class="segment" part="segment" for=${r}>
|
|
1114
1184
|
<input
|
|
1115
1185
|
type="radio"
|
|
@@ -1125,18 +1195,18 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1125
1195
|
</label>
|
|
1126
1196
|
`})}
|
|
1127
1197
|
</div>
|
|
1128
|
-
`}render(){return
|
|
1198
|
+
`}render(){return n`
|
|
1129
1199
|
<fieldset
|
|
1130
1200
|
part="fieldset"
|
|
1131
1201
|
aria-describedby=${this.describedBy}
|
|
1132
|
-
aria-invalid=${this.error?"true":
|
|
1202
|
+
aria-invalid=${this.error?"true":d}
|
|
1133
1203
|
>
|
|
1134
1204
|
${this.renderLabel()}
|
|
1135
|
-
${this.description?
|
|
1205
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:d}
|
|
1136
1206
|
${this.renderControl()}
|
|
1137
|
-
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||
|
|
1207
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||d}</div>
|
|
1138
1208
|
</fieldset>
|
|
1139
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",
|
|
1209
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-switch",et);customElements.define("impakt-segmented-control",tt);var it=class extends y{static{this.properties={...y.properties,options:{type:Array}}}constructor(){super(),this.options=[]}static{this.styles=[...y.styles,u`
|
|
1140
1210
|
fieldset {
|
|
1141
1211
|
border: 0;
|
|
1142
1212
|
margin: 0;
|
|
@@ -1162,7 +1232,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1162
1232
|
/* The whole row is the target, not the 20px dot — 2.5.8 is a floor and
|
|
1163
1233
|
a comfortable target is the actual goal. */
|
|
1164
1234
|
.option input {
|
|
1165
|
-
${
|
|
1235
|
+
${E}
|
|
1166
1236
|
inline-size: 20px;
|
|
1167
1237
|
block-size: 20px;
|
|
1168
1238
|
margin: 0;
|
|
@@ -1171,21 +1241,21 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1171
1241
|
}
|
|
1172
1242
|
.option-text {
|
|
1173
1243
|
display: block;
|
|
1174
|
-
font-size: ${
|
|
1244
|
+
font-size: ${$("md")};
|
|
1175
1245
|
}
|
|
1176
1246
|
.option-description {
|
|
1177
1247
|
display: block;
|
|
1178
|
-
font-size: ${
|
|
1248
|
+
font-size: ${$("sm")};
|
|
1179
1249
|
color: ${t.textMuted};
|
|
1180
1250
|
margin-block-start: ${a(1)};
|
|
1181
1251
|
}
|
|
1182
1252
|
:host([invalid]) .option {
|
|
1183
1253
|
border-color: ${t.danger};
|
|
1184
1254
|
}
|
|
1185
|
-
`]}renderLabel(){return
|
|
1186
|
-
${this.label}${this.required?
|
|
1187
|
-
</legend>`}renderControl(){return
|
|
1188
|
-
${this.options.map((e,i)=>{let r=this.id_(`opt-${i}`),
|
|
1255
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
1256
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
1257
|
+
</legend>`}renderControl(){return n`
|
|
1258
|
+
${this.options.map((e,i)=>{let r=this.id_(`opt-${i}`),s=e.description?this.id_(`opt-${i}-desc`):void 0;return n`
|
|
1189
1259
|
<label class="option" part="option" for=${r}>
|
|
1190
1260
|
<input
|
|
1191
1261
|
type="radio"
|
|
@@ -1195,31 +1265,31 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1195
1265
|
.checked=${this.value===e.value}
|
|
1196
1266
|
?disabled=${this.disabled}
|
|
1197
1267
|
?required=${this.required&&i===0}
|
|
1198
|
-
aria-describedby=${
|
|
1268
|
+
aria-describedby=${s??d}
|
|
1199
1269
|
@change=${()=>this.setFormValue(e.value)}
|
|
1200
1270
|
/>
|
|
1201
1271
|
<span>
|
|
1202
1272
|
<span class="option-text">${e.label}</span>
|
|
1203
|
-
${e.description?
|
|
1273
|
+
${e.description?n`<span class="option-description" id=${s}>${e.description}</span>`:d}
|
|
1204
1274
|
</span>
|
|
1205
1275
|
</label>
|
|
1206
1276
|
`})}
|
|
1207
|
-
`}render(){return
|
|
1277
|
+
`}render(){return n`
|
|
1208
1278
|
<fieldset
|
|
1209
1279
|
part="fieldset"
|
|
1210
1280
|
aria-describedby=${this.describedBy}
|
|
1211
|
-
aria-invalid=${this.error?"true":
|
|
1281
|
+
aria-invalid=${this.error?"true":d}
|
|
1212
1282
|
>
|
|
1213
1283
|
${this.renderLabel()}
|
|
1214
|
-
${this.description?
|
|
1284
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">
|
|
1215
1285
|
${this.description}
|
|
1216
|
-
</div>`:
|
|
1286
|
+
</div>`:d}
|
|
1217
1287
|
${this.renderControl()}
|
|
1218
1288
|
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">
|
|
1219
|
-
${this.error||
|
|
1289
|
+
${this.error||d}
|
|
1220
1290
|
</div>
|
|
1221
1291
|
</fieldset>
|
|
1222
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",
|
|
1292
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-radio-group",it);var rt=class o extends h{constructor(){super();this.hasActions=!1;this.tone="info",this.heading="",this.toneLabel="",this.label="",this.noLabel=!1}static{this.properties={tone:{type:String,reflect:!0},heading:{type:String},toneLabel:{type:String,attribute:"tone-label"},label:{type:String},noLabel:{type:Boolean,attribute:"no-label"}}}static{this.TONE_WORDS={info:"Information",success:"Success",warning:"Warning",danger:"Error",attention:"Warning"}}static{this.styles=[...h.styles,u`
|
|
1223
1293
|
:host {
|
|
1224
1294
|
display: block;
|
|
1225
1295
|
margin-block-end: ${a(4)};
|
|
@@ -1229,11 +1299,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1229
1299
|
border-radius: ${t.radiusLg};
|
|
1230
1300
|
border-inline-start: 4px solid;
|
|
1231
1301
|
box-shadow: inset 0 0 0 1px ${t.hairline};
|
|
1232
|
-
font-size: ${
|
|
1302
|
+
font-size: ${$("sm")};
|
|
1233
1303
|
line-height: 1.5;
|
|
1234
1304
|
}
|
|
1235
1305
|
.heading {
|
|
1236
|
-
font-weight: ${
|
|
1306
|
+
font-weight: ${b("semibold")};
|
|
1237
1307
|
margin-block-end: ${a(1)};
|
|
1238
1308
|
}
|
|
1239
1309
|
:host([tone='info']) .alert {
|
|
@@ -1263,25 +1333,25 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1263
1333
|
align-items: center;
|
|
1264
1334
|
gap: ${a(3)};
|
|
1265
1335
|
padding: ${a(3.5)} ${a(4)};
|
|
1266
|
-
border: ${t.borderThin} solid ${
|
|
1336
|
+
border: ${t.borderThin} solid ${l("color.accent.on","#111111")};
|
|
1267
1337
|
border-radius: ${t.radius};
|
|
1268
1338
|
box-shadow: none;
|
|
1269
|
-
background: ${
|
|
1270
|
-
color: ${
|
|
1271
|
-
font-size: ${
|
|
1339
|
+
background: ${l("color.accent.default","#ffd43b")};
|
|
1340
|
+
color: ${l("color.accent.on","#111111")};
|
|
1341
|
+
font-size: ${$("md")};
|
|
1272
1342
|
line-height: 1.4;
|
|
1273
1343
|
/* What sits on the yellow is drawn in the ink, whatever the band round it says. */
|
|
1274
|
-
--impakt-color-text-default: ${
|
|
1275
|
-
--impakt-color-text-inverse: ${
|
|
1344
|
+
--impakt-color-text-default: ${l("color.accent.on","#111111")};
|
|
1345
|
+
--impakt-color-text-inverse: ${l("color.accent.default","#ffd43b")};
|
|
1276
1346
|
}
|
|
1277
1347
|
.tag {
|
|
1278
1348
|
flex: none;
|
|
1279
1349
|
padding: 3px ${a(2)};
|
|
1280
1350
|
font-family: ${t.fontMono};
|
|
1281
|
-
font-size: ${
|
|
1351
|
+
font-size: ${$("sm")};
|
|
1282
1352
|
line-height: 1.3;
|
|
1283
|
-
background: ${
|
|
1284
|
-
color: ${
|
|
1353
|
+
background: ${l("color.accent.on","#111111")};
|
|
1354
|
+
color: ${l("color.accent.default","#ffd43b")};
|
|
1285
1355
|
}
|
|
1286
1356
|
.words {
|
|
1287
1357
|
flex: 1 1 16rem;
|
|
@@ -1306,28 +1376,28 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1306
1376
|
border-inline-start-width: 4px;
|
|
1307
1377
|
}
|
|
1308
1378
|
}
|
|
1309
|
-
`]}onActions(i){let r=i.target;this.hasActions=r.assignedElements({flatten:!0}).length>0,this.requestUpdate()}render(){if(this.tone==="attention"){let r=this.label||S("Check");return
|
|
1379
|
+
`]}onActions(i){let r=i.target;this.hasActions=r.assignedElements({flatten:!0}).length>0,this.requestUpdate()}render(){if(this.tone==="attention"){let r=this.label||S("Check");return n`
|
|
1310
1380
|
<div class="alert" part="alert" role="status">
|
|
1311
|
-
${this.noLabel?
|
|
1381
|
+
${this.noLabel?d:n`<span class="tag" part="label">${r}</span>`}
|
|
1312
1382
|
<div class="words" part="body">
|
|
1313
|
-
${this.heading?
|
|
1383
|
+
${this.heading?n`<div class="heading" part="heading">${this.heading}</div>`:d}
|
|
1314
1384
|
<slot></slot>
|
|
1315
1385
|
</div>
|
|
1316
1386
|
<div class="actions ${this.hasActions?"":"empty"}" part="actions"><slot name="actions" @slotchange=${this.onActions}></slot></div>
|
|
1317
1387
|
</div>
|
|
1318
|
-
`}let i=this.toneLabel||S(
|
|
1388
|
+
`}let i=this.toneLabel||S(o.TONE_WORDS[this.tone]);return n`
|
|
1319
1389
|
<div
|
|
1320
1390
|
class="alert"
|
|
1321
1391
|
part="alert"
|
|
1322
1392
|
role=${this.tone==="danger"?"alert":"status"}
|
|
1323
|
-
aria-label=${this.heading?
|
|
1393
|
+
aria-label=${this.heading?d:i}
|
|
1324
1394
|
>
|
|
1325
|
-
${this.heading?
|
|
1395
|
+
${this.heading?n`<div class="heading" part="heading">
|
|
1326
1396
|
<span class="tone-word">${i}:</span> ${this.heading}
|
|
1327
|
-
</div>`:
|
|
1397
|
+
</div>`:d}
|
|
1328
1398
|
<slot></slot>
|
|
1329
1399
|
</div>
|
|
1330
|
-
`}};customElements.define("impakt-alert",
|
|
1400
|
+
`}};customElements.define("impakt-alert",rt);var at=class extends h{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=[...h.styles,D,u`
|
|
1331
1401
|
:host {
|
|
1332
1402
|
display: flex;
|
|
1333
1403
|
flex-direction: column;
|
|
@@ -1348,13 +1418,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1348
1418
|
:host([gap='md']) { gap: ${a(4)}; }
|
|
1349
1419
|
:host([gap='lg']) { gap: ${a(6)}; }
|
|
1350
1420
|
:host([gap='xl']) { gap: ${a(8)}; }
|
|
1351
|
-
`]}render(){return
|
|
1421
|
+
`]}render(){return n`<slot></slot>`}},ot=class extends h{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=[...h.styles,D,u`
|
|
1352
1422
|
:host {
|
|
1353
1423
|
display: flex;
|
|
1354
1424
|
flex-direction: column;
|
|
1355
1425
|
background: ${t.surfaceCard};
|
|
1356
1426
|
/* A hairline edge and a soft shadow, or under Noire an ink edge and none (card.edge, shadow.sm). The edge is mixed here, so a band that repaints the text repaints it. */
|
|
1357
|
-
border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${
|
|
1427
|
+
border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${l("card.edge","10%")}, transparent);
|
|
1358
1428
|
border-radius: ${t.radiusXl};
|
|
1359
1429
|
box-shadow: ${t.shadowSm};
|
|
1360
1430
|
overflow: hidden;
|
|
@@ -1379,15 +1449,15 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1379
1449
|
:host([tone='plain']) .body { padding-inline: 0; }
|
|
1380
1450
|
img { display: block; inline-size: 100%; aspect-ratio: var(--ratio); object-fit: cover; }
|
|
1381
1451
|
.picture { position: relative; }
|
|
1382
|
-
.tag { position: absolute; inset-block-start: ${a(4)}; inset-inline-start: ${a(4)}; padding: ${a(1.5)} ${a(3)}; font-size: ${
|
|
1452
|
+
.tag { position: absolute; inset-block-start: ${a(4)}; inset-inline-start: ${a(4)}; padding: ${a(1.5)} ${a(3)}; font-size: ${$("sm")}; color: ${t.text}; background: ${t.surfaceCard}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); }
|
|
1383
1453
|
@media (forced-colors: active) { :host { border-color: CanvasText; } }
|
|
1384
|
-
`]}render(){return
|
|
1454
|
+
`]}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>`:d}</div>`:d}<div class="body" part="body"><slot></slot></div>`}},nt=class extends h{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=[...h.styles,u`
|
|
1385
1455
|
:host {
|
|
1386
1456
|
display: block;
|
|
1387
1457
|
color: ${t.textHeading};
|
|
1388
1458
|
font-family: ${t.fontHeading};
|
|
1389
|
-
font-weight: ${
|
|
1390
|
-
line-height: ${
|
|
1459
|
+
font-weight: ${b("bold")};
|
|
1460
|
+
line-height: ${W("tight")};
|
|
1391
1461
|
}
|
|
1392
1462
|
:host([size='5xl']) { ${w("5xl")} letter-spacing: ${t.trackingTight}; }
|
|
1393
1463
|
:host([size='4xl']) { ${w("4xl")} letter-spacing: ${t.trackingTight}; }
|
|
@@ -1412,19 +1482,19 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1412
1482
|
margin-block-end: ${a(2)};
|
|
1413
1483
|
color: var(--impakt-eyebrow, var(--impakt-color-text-eyebrow, ${t.brand}));
|
|
1414
1484
|
font-family: var(--impakt-font-family-eyebrow, ${t.fontBody});
|
|
1415
|
-
font-size: var(--impakt-font-size-eyebrow, ${
|
|
1416
|
-
font-weight: var(--impakt-font-weight-eyebrow, ${
|
|
1485
|
+
font-size: var(--impakt-font-size-eyebrow, ${$("sm")});
|
|
1486
|
+
font-weight: var(--impakt-font-weight-eyebrow, ${b("semibold")});
|
|
1417
1487
|
letter-spacing: 0.06em;
|
|
1418
1488
|
text-transform: uppercase;
|
|
1419
1489
|
}
|
|
1420
|
-
`]}render(){return
|
|
1421
|
-
${this.eyebrow?
|
|
1422
|
-
</div>`}},
|
|
1490
|
+
`]}render(){return n`<div class="h" role="heading" aria-level=${this.level} part="heading">
|
|
1491
|
+
${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>`:d}<span class="words"><slot></slot></span>
|
|
1492
|
+
</div>`}},st=class extends h{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=[...h.styles,u`
|
|
1423
1493
|
:host {
|
|
1424
1494
|
display: block;
|
|
1425
1495
|
/* 1.4.8 asks for 1.5 within a paragraph, and it is the default here
|
|
1426
1496
|
rather than an option, because body text is what it is about. */
|
|
1427
|
-
line-height: ${
|
|
1497
|
+
line-height: ${W("normal")};
|
|
1428
1498
|
/* 1.4.12 Text Spacing: a user stylesheet must be able to widen this
|
|
1429
1499
|
without clipping, which a max-width in ch units survives and a
|
|
1430
1500
|
fixed pixel height does not. */
|
|
@@ -1441,7 +1511,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1441
1511
|
p {
|
|
1442
1512
|
margin: 0;
|
|
1443
1513
|
}
|
|
1444
|
-
`]}render(){return
|
|
1514
|
+
`]}render(){return n`<p part="text"><slot></slot></p>`}};customElements.define("impakt-stack",at);customElements.define("impakt-card",ot);customElements.define("impakt-heading",nt);customElements.define("impakt-text",st);var lt=class extends h{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=[...h.styles,v,u`
|
|
1445
1515
|
:host {
|
|
1446
1516
|
display: inline;
|
|
1447
1517
|
}
|
|
@@ -1455,22 +1525,24 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1455
1525
|
color: ${t.linkHover};
|
|
1456
1526
|
}
|
|
1457
1527
|
:host([variant='standalone']) { display: inline-block; }
|
|
1458
|
-
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${a(1)}; font-weight: ${
|
|
1459
|
-
:host([variant='standalone']) a:hover .icon { transform: translateX(
|
|
1460
|
-
|
|
1528
|
+
:host([variant='standalone']) a { display: inline-flex; align-items: center; gap: ${a(1)}; font-weight: ${b("semibold")}; text-decoration-thickness: 1px; }
|
|
1529
|
+
:host([variant='standalone']) a:hover .icon { transform: translateX(${q.linkDistance}); }
|
|
1530
|
+
/* Focused, the arrow slides as it does when pointed at, for a brand with the reveal set's arrow (impkt-web#51). */
|
|
1531
|
+
:host([variant='standalone']) a:focus-visible .icon { transform: translateX(${q.arrowDistance}); }
|
|
1532
|
+
.icon { flex: none; transition: transform ${q.linkDuration} ${q.linkEasing}; }
|
|
1461
1533
|
.sr-only {
|
|
1462
1534
|
${T}
|
|
1463
1535
|
}
|
|
1464
|
-
`]}render(){return
|
|
1536
|
+
`]}render(){return n`
|
|
1465
1537
|
<a
|
|
1466
1538
|
part="link"
|
|
1467
|
-
href=${this.href||
|
|
1468
|
-
target=${this.external?"_blank":
|
|
1469
|
-
rel=${this.external?"noopener noreferrer":
|
|
1539
|
+
href=${this.href||d}
|
|
1540
|
+
target=${this.external?"_blank":d}
|
|
1541
|
+
rel=${this.external?"noopener noreferrer":d}
|
|
1470
1542
|
>
|
|
1471
|
-
<slot></slot>${M(this.icon!=="none"?this.icon:this.variant==="standalone"?this.external?"external":"arrow-right":void 0,"1em")}${this.external?
|
|
1543
|
+
<slot></slot>${M(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>`:d}
|
|
1472
1544
|
</a>
|
|
1473
|
-
`}};customElements.define("impakt-link",
|
|
1545
|
+
`}};customElements.define("impakt-link",lt);var dt=class extends h{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=[...h.styles,u`
|
|
1474
1546
|
@media (max-width: 40rem) { :host([hide-on='phone']) { display: none; } }
|
|
1475
1547
|
@media (min-width: 40.0625rem) { :host([hide-on='wide']) { display: none; } }
|
|
1476
1548
|
:host {
|
|
@@ -1490,18 +1562,18 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1490
1562
|
:host([rounded='sm']) img { border-radius: ${t.radius}; }
|
|
1491
1563
|
:host([rounded='lg']) img { border-radius: ${t.radiusLg}; }
|
|
1492
1564
|
:host([rounded='full']) img { border-radius: 50%; }
|
|
1493
|
-
`]}render(){return
|
|
1565
|
+
`]}render(){return n`
|
|
1494
1566
|
<img
|
|
1495
1567
|
part="image"
|
|
1496
1568
|
src=${this.src}
|
|
1497
1569
|
alt=${this.decorative?"":this.alt}
|
|
1498
|
-
role=${this.decorative?"presentation":
|
|
1499
|
-
width=${this.width??
|
|
1500
|
-
height=${this.height??
|
|
1570
|
+
role=${this.decorative?"presentation":d}
|
|
1571
|
+
width=${this.width??d}
|
|
1572
|
+
height=${this.height??d}
|
|
1501
1573
|
loading=${this.loading}
|
|
1502
1574
|
style="object-position: ${this.focalX*100}% ${this.focalY*100}%"
|
|
1503
1575
|
/>
|
|
1504
|
-
`}},
|
|
1576
|
+
`}},ct=class extends h{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=[...h.styles,u`
|
|
1505
1577
|
:host {
|
|
1506
1578
|
display: inline-block;
|
|
1507
1579
|
}
|
|
@@ -1509,7 +1581,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1509
1581
|
display: block;
|
|
1510
1582
|
inline-size: auto;
|
|
1511
1583
|
}
|
|
1512
|
-
`]}render(){let e=this.onDark&&this.srcDark?this.srcDark:this.src;return
|
|
1584
|
+
`]}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" />`}},pt=class extends h{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=[...h.styles,u`
|
|
1513
1585
|
:host {
|
|
1514
1586
|
display: block;
|
|
1515
1587
|
}
|
|
@@ -1525,11 +1597,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1525
1597
|
.meta {
|
|
1526
1598
|
color: ${t.textMuted};
|
|
1527
1599
|
}
|
|
1528
|
-
`]}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
|
|
1529
|
-
<a part="link" href=${this.href||
|
|
1530
|
-
<span>${this.label}</span>${e?
|
|
1600
|
+
`]}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`
|
|
1601
|
+
<a part="link" href=${this.href||d} download>
|
|
1602
|
+
<span>${this.label}</span>${e?n`<span class="meta">(${e})</span>`:d}
|
|
1531
1603
|
</a>
|
|
1532
|
-
`}};customElements.define("impakt-image",
|
|
1604
|
+
`}};customElements.define("impakt-image",dt);customElements.define("impakt-logo",ct);customElements.define("impakt-document-link",pt);var ht=class extends h{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=[...h.styles,u`
|
|
1533
1605
|
:host {
|
|
1534
1606
|
display: inline-flex;
|
|
1535
1607
|
align-items: baseline;
|
|
@@ -1538,23 +1610,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1538
1610
|
}
|
|
1539
1611
|
.amount {
|
|
1540
1612
|
font-family: ${t.fontHeading};
|
|
1541
|
-
font-weight: ${
|
|
1613
|
+
font-weight: ${b("bold")};
|
|
1542
1614
|
/* Tabular figures so a price does not reflow as the digits change,
|
|
1543
1615
|
which otherwise makes a recalculating price jitter. */
|
|
1544
1616
|
font-variant-numeric: tabular-nums;
|
|
1545
1617
|
}
|
|
1546
|
-
:host([size='md']) .amount { font-size: ${
|
|
1547
|
-
:host([size='lg']) .amount { font-size: ${
|
|
1548
|
-
:host([size='xl']) .amount { font-size: ${
|
|
1618
|
+
:host([size='md']) .amount { font-size: ${$("lg")}; }
|
|
1619
|
+
:host([size='lg']) .amount { font-size: ${$("2xl")}; }
|
|
1620
|
+
:host([size='xl']) .amount { font-size: ${$("3xl")}; }
|
|
1549
1621
|
.period {
|
|
1550
|
-
font-size: ${
|
|
1622
|
+
font-size: ${$("sm")};
|
|
1551
1623
|
color: ${t.textMuted};
|
|
1552
1624
|
}
|
|
1553
|
-
`]}get formatted(){if(this.amount===void 0||Number.isNaN(this.amount))return this.pending;try{return new Intl.NumberFormat(this.locale||
|
|
1554
|
-
${this.prefix?
|
|
1625
|
+
`]}get formatted(){if(this.amount===void 0||Number.isNaN(this.amount))return this.pending;try{return new Intl.NumberFormat(this.locale||U(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`
|
|
1626
|
+
${this.prefix?n`<span class="period" part="prefix">${this.prefix}</span>`:d}
|
|
1555
1627
|
<span class="amount" part="amount">${this.formatted}</span>
|
|
1556
|
-
${this.period?
|
|
1557
|
-
`}};customElements.define("impakt-price",
|
|
1628
|
+
${this.period?n`<span class="period" part="period">${this.period}</span>`:d}
|
|
1629
|
+
`}};customElements.define("impakt-price",ht);var ut=class extends h{static{this.properties={rows:{type:Array},changeText:{type:String,attribute:"change-text"}}}constructor(){super(),this.rows=[],this.changeText="Change"}static{this.styles=[...h.styles,v,I("dd a"),u`
|
|
1558
1630
|
:host {
|
|
1559
1631
|
display: block;
|
|
1560
1632
|
}
|
|
@@ -1576,8 +1648,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1576
1648
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1577
1649
|
}
|
|
1578
1650
|
dt {
|
|
1579
|
-
font-weight: ${
|
|
1580
|
-
font-size: ${
|
|
1651
|
+
font-weight: ${b("semibold")};
|
|
1652
|
+
font-size: ${$("sm")};
|
|
1581
1653
|
}
|
|
1582
1654
|
dd {
|
|
1583
1655
|
margin: 0;
|
|
@@ -1619,21 +1691,21 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1619
1691
|
padding-block-start: 0;
|
|
1620
1692
|
}
|
|
1621
1693
|
}
|
|
1622
|
-
`]}render(){return
|
|
1694
|
+
`]}render(){return n`
|
|
1623
1695
|
<dl part="list">
|
|
1624
|
-
${this.rows.map(e=>
|
|
1696
|
+
${this.rows.map(e=>n`
|
|
1625
1697
|
<div class="row" part="row">
|
|
1626
1698
|
<dt part="key">${e.key}</dt>
|
|
1627
1699
|
<dd part="value">
|
|
1628
1700
|
<span>${e.value}</span>
|
|
1629
|
-
${e.changeHref?
|
|
1701
|
+
${e.changeHref?n`<a href=${e.changeHref} part="action"
|
|
1630
1702
|
>${this.changeText}<span class="sr-only"> ${e.key}</span></a
|
|
1631
|
-
>`:
|
|
1703
|
+
>`:d}
|
|
1632
1704
|
</dd>
|
|
1633
1705
|
</div>
|
|
1634
1706
|
`)}
|
|
1635
1707
|
</dl>
|
|
1636
|
-
`}};customElements.define("impakt-summary-list",
|
|
1708
|
+
`}};customElements.define("impakt-summary-list",ut);var mt=class extends h{static{this.properties={caption:{type:String},captionHidden:{type:Boolean,reflect:!0,attribute:"caption-hidden"},columns:{type:Array},rows:{type:Array},sortKey:{type:String,attribute:"sort-key",reflect:!0},sortDirection:{type:String,attribute:"sort-direction",reflect:!0},manualSort:{type:Boolean,attribute:"manual-sort"},selectable:{type:Boolean,reflect:!0},selected:{type:Array},rowKey:{type:String,attribute:"row-key"},stack:{type:Boolean,reflect:!0},emptyText:{type:String,attribute:"empty-text"},selectAllText:{type:String,attribute:"select-all-text"},selectRowText:{type:String,attribute:"select-row-text"},look:{type:String,reflect:!0}}}constructor(){super(),this.caption="",this.captionHidden=!1,this.columns=[],this.rows=[],this.sortKey="",this.sortDirection="ascending",this.manualSort=!1,this.selectable=!1,this.selected=[],this.rowKey="id",this.stack=!1,this.emptyText="Nothing to show",this.selectAllText="Select all rows",this.selectRowText="Select {row}",this.look="plain"}static{this.styles=[...h.styles,v,I(".sort, .pick label"),u`
|
|
1637
1709
|
:host {
|
|
1638
1710
|
display: block;
|
|
1639
1711
|
}
|
|
@@ -1646,11 +1718,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1646
1718
|
table {
|
|
1647
1719
|
inline-size: 100%;
|
|
1648
1720
|
border-collapse: collapse;
|
|
1649
|
-
font-size: ${
|
|
1721
|
+
font-size: ${$("md")};
|
|
1650
1722
|
}
|
|
1651
1723
|
caption {
|
|
1652
1724
|
text-align: start;
|
|
1653
|
-
font-weight: ${
|
|
1725
|
+
font-weight: ${b("semibold")};
|
|
1654
1726
|
padding-block-end: ${a(2)};
|
|
1655
1727
|
}
|
|
1656
1728
|
th,
|
|
@@ -1660,11 +1732,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1660
1732
|
border-block-end: ${t.borderThin} solid ${t.rule};
|
|
1661
1733
|
}
|
|
1662
1734
|
thead th {
|
|
1663
|
-
font-weight: ${
|
|
1735
|
+
font-weight: ${b("semibold")};
|
|
1664
1736
|
background: ${t.surfaceInset};
|
|
1665
1737
|
}
|
|
1666
1738
|
tbody th {
|
|
1667
|
-
font-weight: ${
|
|
1739
|
+
font-weight: ${b("semibold")};
|
|
1668
1740
|
}
|
|
1669
1741
|
/* Boxed: a white panel with an ink border, mono capitals for the headings and an ink rule under them. */
|
|
1670
1742
|
:host([look='boxed']) .scroller {
|
|
@@ -1684,7 +1756,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1684
1756
|
white-space: nowrap;
|
|
1685
1757
|
}
|
|
1686
1758
|
:host([look='boxed']) tbody th {
|
|
1687
|
-
font-weight: ${
|
|
1759
|
+
font-weight: ${b("regular")};
|
|
1688
1760
|
}
|
|
1689
1761
|
.mono {
|
|
1690
1762
|
font-family: ${t.fontMono};
|
|
@@ -1692,7 +1764,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1692
1764
|
:host([look='boxed']) thead th {
|
|
1693
1765
|
font-family: ${t.fontMono};
|
|
1694
1766
|
font-size: 11px;
|
|
1695
|
-
font-weight: ${
|
|
1767
|
+
font-weight: ${b("medium")};
|
|
1696
1768
|
letter-spacing: 0.06em;
|
|
1697
1769
|
text-transform: uppercase;
|
|
1698
1770
|
color: ${t.textMuted};
|
|
@@ -1849,8 +1921,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1849
1921
|
}
|
|
1850
1922
|
.label {
|
|
1851
1923
|
display: block;
|
|
1852
|
-
font-size: ${
|
|
1853
|
-
font-weight: ${
|
|
1924
|
+
font-size: ${$("sm")};
|
|
1925
|
+
font-weight: ${b("semibold")};
|
|
1854
1926
|
color: ${t.textMuted};
|
|
1855
1927
|
}
|
|
1856
1928
|
.empty {
|
|
@@ -1858,44 +1930,44 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1858
1930
|
border: 0;
|
|
1859
1931
|
}
|
|
1860
1932
|
}
|
|
1861
|
-
`]}keyOf(e,i){let r=e?.[this.rowKey];return r==null||r===""?String(i):String(r)}ordered(){let e=(this.rows??[]).map((p
|
|
1933
|
+
`]}keyOf(e,i){let r=e?.[this.rowKey];return r==null||r===""?String(i):String(r)}ordered(){let e=(this.rows??[]).map((p,m)=>({row:p,key:this.keyOf(p,m)})),i=(this.columns??[]).find(p=>p.key===this.sortKey&&p.sortable);if(!i||this.manualSort)return e;let r=this.sortDirection==="descending"?-1:1,s=U(this),c=p=>Number(String(p??"").replace(/[^\d.-]/g,""))||0;return e.sort((p,m)=>{let g=p.row[i.key]??"",f=m.row[i.key]??"";return(i.numeric?c(g)-c(f):String(g).localeCompare(String(f),s,{numeric:!0,sensitivity:"base"}))*r})}sortBy(e){let i=this.sortKey===e&&this.sortDirection==="ascending"?"descending":"ascending";this.sortKey=e,this.sortDirection=i,this.dispatchEvent(new CustomEvent("impakt-sort",{detail:{key:e,direction:i},bubbles:!0,composed:!0}))}choose(e,i){let r=new Set(this.selected??[]);for(let s of e)i?r.add(s):r.delete(s);this.selected=[...r],this.dispatchEvent(new CustomEvent("impakt-selection",{detail:{selected:this.selected},bubbles:!0,composed:!0}))}heading(e){let i=e.sortable&&e.key===this.sortKey,r=[e.numeric?"numeric":"",e.sortable?"sortable":""].filter(Boolean).join(" ");return e.sortable?n`<th scope="col" role="columnheader" class=${r} aria-sort=${i?this.sortDirection:d}>
|
|
1862
1934
|
<button class="sort" type="button" part="sort" @click=${()=>this.sortBy(e.key)}>${e.label}<span class="arrow" aria-hidden="true">${M("chevron-down","16px")}</span></button>
|
|
1863
|
-
</th>`:
|
|
1864
|
-
<div class="scroller" part="scroller" tabindex="0" role="region" aria-label=${this.caption||
|
|
1935
|
+
</th>`:n`<th scope="col" role="columnheader" class=${r}>${e.label}</th>`}render(){let e=this.columns??[],i=this.ordered(),r=new Set(this.selected??[]),s=i.length>0&&i.every(p=>r.has(p.key)),c=!s&&i.some(p=>r.has(p.key));return n`
|
|
1936
|
+
<div class="scroller" part="scroller" tabindex="0" role="region" aria-label=${this.caption||d}>
|
|
1865
1937
|
<table part="table" role="table">
|
|
1866
|
-
${this.caption?
|
|
1938
|
+
${this.caption?n`<caption part="caption">${this.caption}</caption>`:d}
|
|
1867
1939
|
<thead role="rowgroup">
|
|
1868
1940
|
<tr role="row">
|
|
1869
|
-
${this.selectable?
|
|
1870
|
-
@change=${p=>this.choose(i.map(
|
|
1941
|
+
${this.selectable?n`<th scope="col" role="columnheader" class="pick"><label><input type="checkbox" aria-label=${this.selectAllText} .checked=${s} .indeterminate=${c} ?disabled=${!i.length}
|
|
1942
|
+
@change=${p=>this.choose(i.map(m=>m.key),p.target.checked)} /></label></th>`:d}
|
|
1871
1943
|
${e.map(p=>this.heading(p))}
|
|
1872
1944
|
</tr>
|
|
1873
1945
|
</thead>
|
|
1874
1946
|
<tbody role="rowgroup">
|
|
1875
|
-
${i.length?i.map(({row:p,key
|
|
1876
|
-
<tr role="row" class=${r.has(
|
|
1877
|
-
${this.selectable?
|
|
1878
|
-
@change=${
|
|
1879
|
-
${e.map((
|
|
1947
|
+
${i.length?i.map(({row:p,key:m},g)=>n`
|
|
1948
|
+
<tr role="row" class=${r.has(m)?"chosen":""} part="row">
|
|
1949
|
+
${this.selectable?n`<td role="cell" class="pick"><label><input type="checkbox" aria-label=${this.selectRowText.replace("{row}",String(p[e[0]?.key??""]??m))} .checked=${r.has(m)}
|
|
1950
|
+
@change=${f=>this.choose([m],f.target.checked)} /></label></td>`:d}
|
|
1951
|
+
${e.map((f,A)=>{let z=n`<span class="label" aria-hidden="true">${f.label}</span><span class="value"><slot name=${`cell:${m}:${f.key}`}>${p[f.key]??""}</slot></span>`;return A===0?n`<th scope="row" role="rowheader" class=${f.mono?"mono":""} id=${`${this.uid}-r${g}`}>${z}</th>`:n`<td role="cell" class=${[f.numeric?"numeric":"",f.mono?"mono":""].join(" ").trim()}>${z}</td>`})}
|
|
1880
1952
|
</tr>
|
|
1881
|
-
`):
|
|
1953
|
+
`):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>`}
|
|
1882
1954
|
</tbody>
|
|
1883
1955
|
</table>
|
|
1884
1956
|
</div>
|
|
1885
|
-
`}};customElements.define("impakt-table",
|
|
1957
|
+
`}};customElements.define("impakt-table",mt);var gt=typeof HTMLElement>"u"||!("children"in HTMLElement.prototype);var H={edge:l("accordion.edge","15%"),topEdgeWidth:l("accordion.top-edge-width","0px"),questionSize:l("accordion.question.size","1rem"),questionLineHeight:l("accordion.question.line-height","1.5"),questionTracking:l("accordion.question.tracking","0em"),questionPadding:l("accordion.question.padding","12px"),hoverInk:l("accordion.hover-ink","0%"),hoverLine:l("accordion.hover-line","none"),plus:l("accordion.plus","none"),chevron:l("accordion.chevron","inline-block"),markerSize:l("accordion.marker.size","18px"),markerStroke:l("accordion.marker.stroke","2px"),answerSpace:l("accordion.answer.space","16px"),answerPull:l("accordion.answer.pull","0px"),answerInk:l("accordion.answer.ink","100%"),answerLineHeight:l("accordion.answer.line-height","1.5"),answerWidth:l("accordion.answer.width","none")},hr=R("var(--impakt-color-line-soft, #dcdcd8)"),bt=class extends h{static{this.properties={items:{type:Array},headingLevel:{type:Number,attribute:"heading-level"},open:{type:Array},multiple:{type:Boolean},look:{type:String,reflect:!0},enhanced:{state:!0}}}constructor(){super(),this.items=[],this.headingLevel=3,this.open=[],this.multiple=!0,this.look="plain",this.enhanced=!1}connectedCallback(){!gt&&!this.shadowRoot&&(this.enhanced=!0),super.connectedCallback()}firstUpdated(){this.enhanced=!0}static{this.styles=[...h.styles,v,Xe,u`
|
|
1886
1958
|
:host {
|
|
1887
1959
|
display: block;
|
|
1888
|
-
border-block-start: ${
|
|
1960
|
+
border-block-start: ${H.topEdgeWidth} solid ${t.text};
|
|
1889
1961
|
}
|
|
1890
1962
|
/* Rows with a faint rule, or under Noire an ink one (accordion.edge), mixed here so a band that repaints the text repaints it. */
|
|
1891
1963
|
.item {
|
|
1892
|
-
border-block-end: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${
|
|
1964
|
+
border-block-end: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${H.edge}, transparent);
|
|
1893
1965
|
}
|
|
1894
1966
|
/* The heading row. The button is stretched over it, so the whole row opens the panel, the status included. */
|
|
1895
1967
|
.head {
|
|
1896
1968
|
/* The question's padding and size, read by the button and by the marker beside it, so the marker sits on the question's first line. */
|
|
1897
|
-
--q-pad: ${
|
|
1898
|
-
--q-size: ${
|
|
1969
|
+
--q-pad: ${H.questionPadding};
|
|
1970
|
+
--q-size: ${H.questionSize};
|
|
1899
1971
|
position: relative;
|
|
1900
1972
|
display: flex;
|
|
1901
1973
|
align-items: center;
|
|
@@ -1907,7 +1979,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1907
1979
|
margin: 0;
|
|
1908
1980
|
}
|
|
1909
1981
|
button {
|
|
1910
|
-
${
|
|
1982
|
+
${E}
|
|
1911
1983
|
display: flex;
|
|
1912
1984
|
align-items: baseline;
|
|
1913
1985
|
flex-wrap: wrap;
|
|
@@ -1920,9 +1992,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1920
1992
|
font: inherit;
|
|
1921
1993
|
/* The question in body type, or under Noire (G2) heading S: 24/1.15, -2.5%, semibold. */
|
|
1922
1994
|
font-size: var(--q-size);
|
|
1923
|
-
line-height: ${
|
|
1924
|
-
letter-spacing: ${
|
|
1925
|
-
font-weight: ${
|
|
1995
|
+
line-height: ${H.questionLineHeight};
|
|
1996
|
+
letter-spacing: ${H.questionTracking};
|
|
1997
|
+
font-weight: ${b("semibold")};
|
|
1926
1998
|
color: ${t.text};
|
|
1927
1999
|
text-align: start;
|
|
1928
2000
|
cursor: pointer;
|
|
@@ -1939,16 +2011,16 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1939
2011
|
box-shadow: ${t.focusShadow};
|
|
1940
2012
|
}
|
|
1941
2013
|
button:hover {
|
|
1942
|
-
color: color-mix(in srgb, ${t.text} ${
|
|
2014
|
+
color: color-mix(in srgb, ${t.text} ${H.hoverInk}, ${t.link});
|
|
1943
2015
|
}
|
|
1944
2016
|
button:hover .q {
|
|
1945
|
-
text-decoration-line: ${
|
|
2017
|
+
text-decoration-line: ${H.hoverLine};
|
|
1946
2018
|
text-decoration-thickness: 1px;
|
|
1947
2019
|
text-underline-offset: 0.15em;
|
|
1948
2020
|
}
|
|
1949
2021
|
.meta {
|
|
1950
2022
|
font-family: ${t.fontMono};
|
|
1951
|
-
font-size: ${
|
|
2023
|
+
font-size: ${$("sm")};
|
|
1952
2024
|
font-weight: 400;
|
|
1953
2025
|
letter-spacing: normal;
|
|
1954
2026
|
color: ${t.textMuted};
|
|
@@ -1967,13 +2039,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1967
2039
|
.marker {
|
|
1968
2040
|
position: relative;
|
|
1969
2041
|
flex: none;
|
|
1970
|
-
inline-size: ${
|
|
1971
|
-
block-size: ${
|
|
2042
|
+
inline-size: ${H.markerSize};
|
|
2043
|
+
block-size: ${H.markerSize};
|
|
1972
2044
|
/* Centred on the question's first line (#51): below the button's padding, in the middle of the question's line box. */
|
|
1973
2045
|
font-size: var(--q-size);
|
|
1974
|
-
line-height: ${
|
|
2046
|
+
line-height: ${H.questionLineHeight};
|
|
1975
2047
|
align-self: flex-start;
|
|
1976
|
-
margin-block-start: calc(var(--q-pad) + (1lh - ${
|
|
2048
|
+
margin-block-start: calc(var(--q-pad) + (1lh - ${H.markerSize}) / 2);
|
|
1977
2049
|
}
|
|
1978
2050
|
/* In the issues look the marker is inside the button, on the button's own line. */
|
|
1979
2051
|
:host([look='issues']) .marker {
|
|
@@ -1988,13 +2060,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
1988
2060
|
}
|
|
1989
2061
|
.marker::before {
|
|
1990
2062
|
inset-inline: 0;
|
|
1991
|
-
inset-block-start: calc(50% - ${
|
|
1992
|
-
block-size: ${
|
|
2063
|
+
inset-block-start: calc(50% - ${H.markerStroke} / 2);
|
|
2064
|
+
block-size: ${H.markerStroke};
|
|
1993
2065
|
}
|
|
1994
2066
|
.marker::after {
|
|
1995
2067
|
inset-block: 0;
|
|
1996
|
-
inset-inline-start: calc(50% - ${
|
|
1997
|
-
inline-size: ${
|
|
2068
|
+
inset-inline-start: calc(50% - ${H.markerStroke} / 2);
|
|
2069
|
+
inline-size: ${H.markerStroke};
|
|
1998
2070
|
transition: transform 120ms ease-in-out;
|
|
1999
2071
|
}
|
|
2000
2072
|
.item.open .marker::after {
|
|
@@ -2003,10 +2075,10 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2003
2075
|
/* The brand's marker: a "+" (accordion.plus) or a chevron that turns to point down when open (accordion.chevron). */
|
|
2004
2076
|
.marker::before,
|
|
2005
2077
|
.marker::after {
|
|
2006
|
-
display: ${
|
|
2078
|
+
display: ${H.plus};
|
|
2007
2079
|
}
|
|
2008
2080
|
.chev {
|
|
2009
|
-
display: ${
|
|
2081
|
+
display: ${H.chevron};
|
|
2010
2082
|
position: absolute;
|
|
2011
2083
|
inset: 0;
|
|
2012
2084
|
line-height: 18px;
|
|
@@ -2038,12 +2110,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2038
2110
|
display: none;
|
|
2039
2111
|
}
|
|
2040
2112
|
.panel {
|
|
2041
|
-
max-inline-size: ${
|
|
2042
|
-
margin-block-start: ${
|
|
2043
|
-
padding-block-end: ${
|
|
2044
|
-
font-size: ${
|
|
2045
|
-
line-height: ${
|
|
2046
|
-
color: color-mix(in srgb, ${t.text} ${
|
|
2113
|
+
max-inline-size: ${H.answerWidth};
|
|
2114
|
+
margin-block-start: ${H.answerPull};
|
|
2115
|
+
padding-block-end: ${H.answerSpace};
|
|
2116
|
+
font-size: ${$("md")};
|
|
2117
|
+
line-height: ${H.answerLineHeight};
|
|
2118
|
+
color: color-mix(in srgb, ${t.text} ${H.answerInk}, ${t.textMuted});
|
|
2047
2119
|
}
|
|
2048
2120
|
/*
|
|
2049
2121
|
* Issues (frames 36:716, 36:430): rows divided by soft rules, each a code, a small "+" and the finding in
|
|
@@ -2054,7 +2126,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2054
2126
|
border-block-start: 0;
|
|
2055
2127
|
}
|
|
2056
2128
|
:host([look='issues']) .item {
|
|
2057
|
-
border-block-end: ${t.borderThin} solid ${
|
|
2129
|
+
border-block-end: ${t.borderThin} solid ${hr};
|
|
2058
2130
|
}
|
|
2059
2131
|
/* The finding keeps at least 16rem; on a narrow screen the status wraps under it, at the end, rather than squeezing it. */
|
|
2060
2132
|
:host([look='issues']) .head {
|
|
@@ -2074,7 +2146,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2074
2146
|
font-size: 1.25rem;
|
|
2075
2147
|
line-height: 1.2;
|
|
2076
2148
|
letter-spacing: -0.01em;
|
|
2077
|
-
font-weight: ${
|
|
2149
|
+
font-weight: ${b("regular")};
|
|
2078
2150
|
}
|
|
2079
2151
|
:host([look='issues']) .meta {
|
|
2080
2152
|
margin-inline-end: ${a(1)};
|
|
@@ -2108,7 +2180,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2108
2180
|
font-size: var(--impakt-type-heading-s-size, 1.5rem);
|
|
2109
2181
|
line-height: 1.15;
|
|
2110
2182
|
letter-spacing: -0.025em;
|
|
2111
|
-
font-weight: ${
|
|
2183
|
+
font-weight: ${b("semibold")};
|
|
2112
2184
|
}
|
|
2113
2185
|
:host([look='issues']) .item.open .meta {
|
|
2114
2186
|
letter-spacing: normal;
|
|
@@ -2132,12 +2204,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2132
2204
|
padding: ${a(5)} 0;
|
|
2133
2205
|
background: none;
|
|
2134
2206
|
border: 0;
|
|
2135
|
-
border-block-end: ${t.borderThin} solid ${
|
|
2207
|
+
border-block-end: ${t.borderThin} solid ${hr};
|
|
2136
2208
|
}
|
|
2137
2209
|
@media (max-width: 40rem) {
|
|
2138
2210
|
.head {
|
|
2139
|
-
--q-pad: min(${
|
|
2140
|
-
--q-size: min(${
|
|
2211
|
+
--q-pad: min(${H.questionPadding}, ${a(6)});
|
|
2212
|
+
--q-size: min(${H.questionSize}, 1.25rem);
|
|
2141
2213
|
}
|
|
2142
2214
|
:host([look='issues']) button {
|
|
2143
2215
|
padding-block: ${a(4)};
|
|
@@ -2151,8 +2223,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2151
2223
|
font-size: 1.25rem;
|
|
2152
2224
|
}
|
|
2153
2225
|
}
|
|
2154
|
-
`]}toggle(e){this.open.includes(e)?this.open=this.open.filter(r=>r!==e):this.open=this.multiple?[...this.open,e]:[e]}render(){let e=this.look==="issues";return
|
|
2155
|
-
${this.items.map(i=>{let r=!this.enhanced||this.open.includes(i.id),
|
|
2226
|
+
`]}toggle(e){this.open.includes(e)?this.open=this.open.filter(r=>r!==e):this.open=this.multiple?[...this.open,e]:[e]}render(){let e=this.look==="issues";return n`
|
|
2227
|
+
${this.items.map(i=>{let r=!this.enhanced||this.open.includes(i.id),s=this.id_(`panel-${i.id}`),c=this.id_(`button-${i.id}`);return n`
|
|
2156
2228
|
<div class="item ${r?"open":""}" part="item">
|
|
2157
2229
|
<div class="head" part="head">
|
|
2158
2230
|
<div class="h" role="heading" aria-level=${this.headingLevel}>
|
|
@@ -2161,21 +2233,21 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2161
2233
|
part="header"
|
|
2162
2234
|
type="button"
|
|
2163
2235
|
aria-expanded=${r?"true":"false"}
|
|
2164
|
-
aria-controls=${
|
|
2236
|
+
aria-controls=${s}
|
|
2165
2237
|
@click=${()=>this.toggle(i.id)}
|
|
2166
2238
|
>
|
|
2167
|
-
${i.meta?
|
|
2168
|
-
${e?
|
|
2239
|
+
${i.meta?n`<span class="meta" part="meta">${i.meta}</span>`:d}
|
|
2240
|
+
${e?n`<span class="marker" aria-hidden="true"></span>`:d}
|
|
2169
2241
|
<span class="q">${i.heading}</span>
|
|
2170
2242
|
</button>
|
|
2171
2243
|
</div>
|
|
2172
|
-
${i.tags?.length?
|
|
2173
|
-
${
|
|
2174
|
-
</span>`:
|
|
2175
|
-
${e?
|
|
2244
|
+
${i.tags?.length?n`<span class="pills" part="pills">
|
|
2245
|
+
${pe(i.status,i.statusTone)}${i.tags.map(p=>pe(p.label,p.tone??"neutral","tag"))}
|
|
2246
|
+
</span>`:pe(i.status,i.statusTone)}
|
|
2247
|
+
${e?d:n`<span class="marker" aria-hidden="true"><span class="chev">›</span></span>`}
|
|
2176
2248
|
</div>
|
|
2177
2249
|
<div
|
|
2178
|
-
id=${
|
|
2250
|
+
id=${s}
|
|
2179
2251
|
class="panel"
|
|
2180
2252
|
part="panel"
|
|
2181
2253
|
role="region"
|
|
@@ -2186,7 +2258,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2186
2258
|
</div>
|
|
2187
2259
|
</div>
|
|
2188
2260
|
`})}
|
|
2189
|
-
`}};customElements.define("impakt-accordion",
|
|
2261
|
+
`}};customElements.define("impakt-accordion",bt);var ta=R("var(--impakt-color-line-soft, #dcdcd8)"),ft=class extends h{static{this.properties={steps:{type:Array},current:{type:String},label:{type:String},look:{type:String,reflect:!0},hideLabels:{type:Boolean,attribute:"hide-labels",reflect:!0},doneText:{type:String,attribute:"done-text"}}}constructor(){super(),this.steps=[],this.current="",this.label="Progress",this.look="steps",this.hideLabels=!1,this.doneText=""}static{this.styles=[...h.styles,v,u`
|
|
2190
2262
|
:host {
|
|
2191
2263
|
display: block;
|
|
2192
2264
|
margin-block-end: ${a(5)};
|
|
@@ -2200,7 +2272,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2200
2272
|
}
|
|
2201
2273
|
li {
|
|
2202
2274
|
flex: 1;
|
|
2203
|
-
font-size: ${
|
|
2275
|
+
font-size: ${$("sm")};
|
|
2204
2276
|
color: ${t.textMuted};
|
|
2205
2277
|
padding-block-start: ${a(2)};
|
|
2206
2278
|
border-block-start: 4px solid ${t.border};
|
|
@@ -2211,7 +2283,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2211
2283
|
}
|
|
2212
2284
|
li[data-state='current'] {
|
|
2213
2285
|
color: ${t.text};
|
|
2214
|
-
font-weight: ${
|
|
2286
|
+
font-weight: ${b("semibold")};
|
|
2215
2287
|
border-block-start-color: ${t.brand};
|
|
2216
2288
|
}
|
|
2217
2289
|
.sr-only {
|
|
@@ -2264,14 +2336,14 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2264
2336
|
gap: ${a(8)};
|
|
2265
2337
|
inline-size: max-content;
|
|
2266
2338
|
min-inline-size: 100%;
|
|
2267
|
-
box-shadow: inset 0 -1px 0 ${
|
|
2339
|
+
box-shadow: inset 0 -1px 0 ${ta};
|
|
2268
2340
|
}
|
|
2269
2341
|
:host([look='stages']) li {
|
|
2270
2342
|
flex: none;
|
|
2271
2343
|
padding: 0;
|
|
2272
2344
|
border: 0;
|
|
2273
|
-
font-size: ${
|
|
2274
|
-
font-weight: ${
|
|
2345
|
+
font-size: ${$("md")};
|
|
2346
|
+
font-weight: ${b("regular")};
|
|
2275
2347
|
color: ${t.textMuted};
|
|
2276
2348
|
white-space: nowrap;
|
|
2277
2349
|
}
|
|
@@ -2287,7 +2359,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2287
2359
|
}
|
|
2288
2360
|
:host([look='stages']) .num {
|
|
2289
2361
|
font-family: ${t.fontMono};
|
|
2290
|
-
font-size: ${
|
|
2362
|
+
font-size: ${$("sm")};
|
|
2291
2363
|
}
|
|
2292
2364
|
:host([look='stages']) li[data-state='done'] .num {
|
|
2293
2365
|
color: ${t.text};
|
|
@@ -2313,51 +2385,51 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2313
2385
|
${T}
|
|
2314
2386
|
}
|
|
2315
2387
|
}
|
|
2316
|
-
`]}renderStages(e){let i=this.doneText||S("done"),r=this.steps.some(
|
|
2317
|
-
<nav part="nav" aria-label=${this.label} tabindex=${r?
|
|
2388
|
+
`]}renderStages(e){let i=this.doneText||S("done"),r=this.steps.some(s=>s.href);return n`
|
|
2389
|
+
<nav part="nav" aria-label=${this.label} tabindex=${r?d:"0"}>
|
|
2318
2390
|
<ol part="list">
|
|
2319
|
-
${this.steps.map((
|
|
2320
|
-
<span class="name" part="step-label">${
|
|
2391
|
+
${this.steps.map((s,c)=>{let p=c<e?"done":c===e?"current":"todo",m=String(c+1).padStart(2,"0"),g=n`<span class="num" part="step-number">${p==="done"?n`<span aria-hidden="true">✓ </span>`:d}${m}</span>
|
|
2392
|
+
<span class="name" part="step-label">${s.label}</span>${p==="done"?n`<span class="sr-only">, ${i}</span>`:d}`;return n`
|
|
2321
2393
|
<li part="step step-${p}" data-state=${p}>
|
|
2322
|
-
${
|
|
2394
|
+
${s.href?n`<a class="stage" href=${s.href} aria-current=${p==="current"?"step":d}>${g}</a>`:n`<span class="stage" aria-current=${p==="current"?"step":d}>${g}</span>`}
|
|
2323
2395
|
</li>
|
|
2324
2396
|
`})}
|
|
2325
2397
|
</ol>
|
|
2326
2398
|
</nav>
|
|
2327
|
-
`}render(){let e=this.steps.findIndex(i=>i.id===this.current);return this.look==="stages"?this.renderStages(e):
|
|
2399
|
+
`}render(){let e=this.steps.findIndex(i=>i.id===this.current);return this.look==="stages"?this.renderStages(e):n`
|
|
2328
2400
|
<nav part="nav" aria-label=${this.label}>
|
|
2329
2401
|
<ol part="list">
|
|
2330
|
-
${this.steps.map((i,r)=>{let
|
|
2331
|
-
<li part="step step-${
|
|
2332
|
-
${
|
|
2402
|
+
${this.steps.map((i,r)=>{let s=r<e?"done":r===e?"current":"todo";return n`
|
|
2403
|
+
<li part="step step-${s}" data-state=${s} aria-current=${s==="current"?"step":d}>
|
|
2404
|
+
${s==="current"?n`<span class="sr-only">${S("Step {step} of {steps}:",{step:r+1,steps:this.steps.length})} </span>`:d}
|
|
2333
2405
|
<span class="name" part="step-label">${i.label}</span>
|
|
2334
2406
|
</li>
|
|
2335
2407
|
`})}
|
|
2336
2408
|
</ol>
|
|
2337
2409
|
</nav>
|
|
2338
|
-
`}};customElements.define("impakt-progress",
|
|
2410
|
+
`}};customElements.define("impakt-progress",ft);var Se={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)"},Te=["success","info","warning","accent","danger","brand"],Ti=(o,e)=>typeof o=="number"?`var(--impakt-color-chart-${o}, ${Se[Te[(o-1)%Te.length]]})`:o&&o in Se?Se[o]:`var(--impakt-color-chart-${e%5+1}, ${Se[Te[e%Te.length]]})`;var ur=t.fontMono,$t=class extends h{static{this.properties={label:{type:String},meta:{type:String},icon:{type:String,reflect:!0},tone:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0},hideOn:{type:String,reflect:!0,attribute:"hide-on"}}}constructor(){super(),this.label="",this.meta="",this.icon="none",this.tone="success",this.look="filled",this.size="md",this.hideOn="never"}static{this.styles=[...h.styles,dr,u`
|
|
2339
2411
|
:host { display: inline-flex; flex: none; }
|
|
2340
|
-
span.chip { display: inline-flex; align-items: center; gap: ${a(1.5)}; padding: 3px ${a(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${
|
|
2412
|
+
span.chip { display: inline-flex; align-items: center; gap: ${a(1.5)}; padding: 3px ${a(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-family: ${ur}; font-size: ${$("xs")}; line-height: 1.2; white-space: nowrap; }
|
|
2341
2413
|
:host([look='filled']) span.chip { border-radius: ${t.radius}; background: color-mix(in srgb, currentColor 7%, transparent); }
|
|
2342
2414
|
/* The edge is the border grey where the brand derives it, and ink under Noire (G2) (chip.outlined.edge, #69). */
|
|
2343
2415
|
/* Spaced 0.04em where the brand derives it, and not at all under Noire (G2) (chip.outlined.tracking). */
|
|
2344
|
-
:host([look='outlined']) span.chip { border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${
|
|
2345
|
-
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${
|
|
2346
|
-
/* Body: a 35px square box in the body face, for a row of tags such as a stack (G2 case study, 21:1493). */
|
|
2347
|
-
:host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding:
|
|
2416
|
+
:host([look='outlined']) span.chip { border: ${t.borderThin} solid color-mix(in srgb, ${t.text} ${l("chip.outlined.edge","0%")}, ${t.border}); background: ${t.surfaceCard}; letter-spacing: ${l("chip.outlined.tracking","0.04em")}; }
|
|
2417
|
+
:host([size='marketing']) span.chip { font-size: 11px; font-weight: ${b("medium")}; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
2418
|
+
/* Body: a 35px square box in the body face, 8 by 14 inside, for a row of tags such as a stack (G2 case study, 21:1493, where "React" is 68px wide). */
|
|
2419
|
+
:host([size='body']) span.chip { box-sizing: border-box; min-block-size: 35px; padding: 8px 14px; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 14px; line-height: 1.2; }
|
|
2348
2420
|
:host([size='lg']) span.chip { box-sizing: border-box; min-block-size: 49px; gap: ${a(3)}; padding: ${a(2)} ${a(4)}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radius}; font-family: ${t.fontBody}; font-size: 20px; line-height: 1.2; }
|
|
2349
|
-
:host([size='lg']) .meta { font-family: ${
|
|
2421
|
+
:host([size='lg']) .meta { font-family: ${ur}; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 1; color: ${t.textMuted}; }
|
|
2350
2422
|
:host([look='plain']) span.chip { padding: 0; }
|
|
2351
2423
|
.dot { flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--tone); }
|
|
2352
2424
|
/* Yellow means "needs your attention": the accent, with an ink stroke so it shows on white. */
|
|
2353
|
-
.dot.warn { background: ${
|
|
2425
|
+
.dot.warn { background: ${l("color.accent.default","#ffd43b")}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
2354
2426
|
@media (forced-colors: active) { .dot, .dot.warn { background: CanvasText; } }
|
|
2355
2427
|
svg { inline-size: 12px; block-size: 12px; }
|
|
2356
2428
|
.meta { opacity: 0.72; text-transform: none; }
|
|
2357
2429
|
:host([look='plain']) .label { opacity: 0.72; }
|
|
2358
|
-
`]}render(){let e=this.icon==="dot"?
|
|
2430
|
+
`]}render(){let e=this.icon==="dot"?n`<span class="dot ${this.tone==="warning"?"warn":""}" 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>`:d;return n`<span class="chip" part="chip" style=${`--tone:${Ti(this.tone,0)}`}>${e}<span class="label">${this.label}</span>${this.meta?n` <span class="meta">${this.meta}</span>`:d}</span>`}};customElements.define("impakt-chip",$t);var xt=class extends h{static{this.properties={tone:{type:String,reflect:!0},icon:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0}}}constructor(){super(),this.tone="neutral",this.icon="none",this.look="filled",this.size="md"}static{this.styles=[...h.styles,u`
|
|
2359
2431
|
:host { display: inline-flex; }
|
|
2360
|
-
span { display: inline-flex; align-items: center; gap: ${a(1)}; padding: ${a(.5)} ${a(2)}; border-radius: ${t.radius}; ${w("sm")} font-weight: ${
|
|
2432
|
+
span { display: inline-flex; align-items: center; gap: ${a(1)}; padding: ${a(.5)} ${a(2)}; border-radius: ${t.radius}; ${w("sm")} font-weight: ${b("medium")}; background: ${t.surfaceInset}; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.hairline}; }
|
|
2361
2433
|
:host([tone='brand']) span { background: ${t.brandSubtle}; color: ${t.brand}; }
|
|
2362
2434
|
:host([tone='success']) span { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
2363
2435
|
:host([tone='warning']) span { background: ${t.warningSubtle}; color: ${t.warningText}; }
|
|
@@ -2366,12 +2438,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2366
2438
|
:host([tone='inverse']) span { background: ${t.text}; color: ${t.surfaceCard}; box-shadow: none; }
|
|
2367
2439
|
:host([tone='solid']) span { background: ${t.brand}; color: ${t.onBrand}; box-shadow: none; }
|
|
2368
2440
|
/* Accent: the yellow with ink words, for the label that needs attention. */
|
|
2369
|
-
:host([tone='accent']) span { background: ${
|
|
2441
|
+
:host([tone='accent']) span { background: ${l("color.accent.default","#ffd43b")}; color: ${l("color.accent.on","#111111")}; box-shadow: none; }
|
|
2370
2442
|
:host([look='outline']) span { background: transparent; color: ${t.text}; box-shadow: inset 0 0 0 1px ${t.text}; }
|
|
2371
|
-
:host([look='outline'][tone='accent']) span { background: ${
|
|
2372
|
-
:host([size='marketing']) span { padding: 3px ${a(2)}; font-family: ${t.fontMono}; font-size: 11px; line-height: 1.4; font-weight: ${
|
|
2443
|
+
:host([look='outline'][tone='accent']) span { background: ${l("color.accent.default","#ffd43b")}; color: ${l("color.accent.on","#111111")}; box-shadow: inset 0 0 0 1px ${l("color.accent.on","#111111")}; }
|
|
2444
|
+
:host([size='marketing']) span { padding: 3px ${a(2)}; font-family: ${t.fontMono}; font-size: 11px; line-height: 1.4; font-weight: ${b("medium")}; letter-spacing: 0.06em; text-transform: uppercase; }
|
|
2373
2445
|
@media (forced-colors: active) { span { border-color: CanvasText; } }
|
|
2374
|
-
`]}render(){return
|
|
2446
|
+
`]}render(){return n`<span part="badge">${M(this.icon,"1em")}<slot></slot></span>`}};customElements.define("impakt-badge",xt);var yt=class extends y{constructor(){super();this.filled=!1;this.filledText="";this.width="full",this.rows=4,this.maxlength=void 0,this.fillFrom="none",this.placeholder=""}static{this.properties={...y.properties,width:{type:String,reflect:!0},rows:{type:Number},maxlength:{type:Number},fillFrom:{type:String,attribute:"fill-from"},placeholder:{type:String}}}static{this.styles=[...y.styles,K,ce("textarea"),u`
|
|
2375
2447
|
textarea {
|
|
2376
2448
|
/* Every brand but Impakt keeps the resize grip: 1.4.4 and 1.4.12 both assume text
|
|
2377
2449
|
can be made bigger, and a fixed box is where that stops working. The G2 textarea
|
|
@@ -2379,26 +2451,26 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2379
2451
|
(field.resize and field.sizing), never shorter than its rows (#66). */
|
|
2380
2452
|
resize: var(--impakt-field-resize, vertical);
|
|
2381
2453
|
field-sizing: var(--impakt-field-sizing, fixed);
|
|
2382
|
-
min-block-size: calc(var(--impakt-textarea-rows, 4) * 1lh + 2 * ${
|
|
2454
|
+
min-block-size: calc(var(--impakt-textarea-rows, 4) * 1lh + 2 * ${V.paddingBlock} + 2px);
|
|
2383
2455
|
}
|
|
2384
|
-
`]}willUpdate(i){super.willUpdate?.(i),this.filledText&&i.has("value")&&!this.value&&(this.value=this.filledText)}fill(){if(this.filled||this.fillFrom!=="estimate"||(this.filled=!0,this.value))return;let i=null;try{i=sessionStorage.getItem("impakt.estimate")}catch{i=null}i&&(this.filledText=i,this.setFormValue(i))}renderControl(){return
|
|
2456
|
+
`]}willUpdate(i){super.willUpdate?.(i),this.filledText&&i.has("value")&&!this.value&&(this.value=this.filledText)}fill(){if(this.filled||this.fillFrom!=="estimate"||(this.filled=!0,this.value))return;let i=null;try{i=sessionStorage.getItem("impakt.estimate")}catch{i=null}i&&(this.filledText=i,this.setFormValue(i))}renderControl(){return n`
|
|
2385
2457
|
<textarea
|
|
2386
2458
|
id=${this.controlId}
|
|
2387
2459
|
part="textarea"
|
|
2388
|
-
name=${this.name||
|
|
2460
|
+
name=${this.name||d}
|
|
2389
2461
|
rows=${this.rows}
|
|
2390
2462
|
style=${`--impakt-textarea-rows: ${this.rows}`}
|
|
2391
|
-
maxlength=${this.maxlength??
|
|
2392
|
-
placeholder=${this.placeholder||
|
|
2463
|
+
maxlength=${this.maxlength??d}
|
|
2464
|
+
placeholder=${this.placeholder||d}
|
|
2393
2465
|
?disabled=${this.disabled}
|
|
2394
2466
|
?readonly=${this.readonly}
|
|
2395
2467
|
?required=${this.required}
|
|
2396
2468
|
aria-describedby=${this.describedBy}
|
|
2397
|
-
aria-invalid=${this.error?"true":
|
|
2469
|
+
aria-invalid=${this.error?"true":d}
|
|
2398
2470
|
.value=${this.value}
|
|
2399
2471
|
@input=${i=>{this.filledText="",this.setFormValue(i.target.value)}}
|
|
2400
2472
|
></textarea>
|
|
2401
|
-
`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error),this.fill()}};customElements.define("impakt-textarea",
|
|
2473
|
+
`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error),this.fill()}};customElements.define("impakt-textarea",yt);var kt=class extends y{static{this.properties={...y.properties,options:{type:Array},values:{type:Array}}}constructor(){super(),this.options=[],this.values=[]}static{this.styles=[...y.styles,u`
|
|
2402
2474
|
fieldset {
|
|
2403
2475
|
border: 0;
|
|
2404
2476
|
margin: 0;
|
|
@@ -2422,7 +2494,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2422
2494
|
background: ${t.surfaceSubtle};
|
|
2423
2495
|
}
|
|
2424
2496
|
.option input {
|
|
2425
|
-
${
|
|
2497
|
+
${E}
|
|
2426
2498
|
inline-size: 20px;
|
|
2427
2499
|
block-size: 20px;
|
|
2428
2500
|
margin: 0;
|
|
@@ -2431,21 +2503,21 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2431
2503
|
}
|
|
2432
2504
|
.option-text {
|
|
2433
2505
|
display: block;
|
|
2434
|
-
font-size: ${
|
|
2506
|
+
font-size: ${$("md")};
|
|
2435
2507
|
}
|
|
2436
2508
|
.option-description {
|
|
2437
2509
|
display: block;
|
|
2438
|
-
font-size: ${
|
|
2510
|
+
font-size: ${$("sm")};
|
|
2439
2511
|
color: ${t.textMuted};
|
|
2440
2512
|
margin-block-start: ${a(1)};
|
|
2441
2513
|
}
|
|
2442
2514
|
:host([invalid]) .option {
|
|
2443
2515
|
border-color: ${t.danger};
|
|
2444
2516
|
}
|
|
2445
|
-
`]}renderLabel(){return
|
|
2446
|
-
${this.label}${this.required?
|
|
2447
|
-
</legend>`}onToggle(e,i){this.values=i?[...this.values,e]:this.values.filter(r=>r!==e),this.setFormValue(this.options.filter(r=>this.values.includes(r.value)).map(r=>r.value).join(","))}renderControl(){return
|
|
2448
|
-
${this.options.map((e,i)=>{let r=this.id_(`opt-${i}`),
|
|
2517
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
2518
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
2519
|
+
</legend>`}onToggle(e,i){this.values=i?[...this.values,e]:this.values.filter(r=>r!==e),this.setFormValue(this.options.filter(r=>this.values.includes(r.value)).map(r=>r.value).join(","))}renderControl(){return n`
|
|
2520
|
+
${this.options.map((e,i)=>{let r=this.id_(`opt-${i}`),s=e.description?this.id_(`opt-${i}-desc`):void 0;return n`
|
|
2449
2521
|
<label class="option" part="option" for=${r}>
|
|
2450
2522
|
<input
|
|
2451
2523
|
type="checkbox"
|
|
@@ -2453,23 +2525,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2453
2525
|
value=${e.value}
|
|
2454
2526
|
.checked=${this.values.includes(e.value)}
|
|
2455
2527
|
?disabled=${this.disabled}
|
|
2456
|
-
aria-describedby=${
|
|
2528
|
+
aria-describedby=${s??d}
|
|
2457
2529
|
@change=${c=>this.onToggle(e.value,c.target.checked)}
|
|
2458
2530
|
/>
|
|
2459
2531
|
<span>
|
|
2460
2532
|
<span class="option-text">${e.label}</span>
|
|
2461
|
-
${e.description?
|
|
2533
|
+
${e.description?n`<span class="option-description" id=${s}>${e.description}</span>`:d}
|
|
2462
2534
|
</span>
|
|
2463
2535
|
</label>
|
|
2464
2536
|
`})}
|
|
2465
|
-
`}render(){return
|
|
2466
|
-
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":
|
|
2537
|
+
`}render(){return n`
|
|
2538
|
+
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":d}>
|
|
2467
2539
|
${this.renderLabel()}
|
|
2468
|
-
${this.description?
|
|
2540
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:d}
|
|
2469
2541
|
${this.renderControl()}
|
|
2470
|
-
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||
|
|
2542
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||d}</div>
|
|
2471
2543
|
</fieldset>
|
|
2472
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",
|
|
2544
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-checkbox-group",kt);var vt=class extends y{static{this.properties={...y.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=[...y.styles,u`
|
|
2473
2545
|
fieldset {
|
|
2474
2546
|
border: 0;
|
|
2475
2547
|
margin: 0;
|
|
@@ -2489,14 +2561,14 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2489
2561
|
gap: ${a(1)};
|
|
2490
2562
|
}
|
|
2491
2563
|
.part label {
|
|
2492
|
-
font-size: ${
|
|
2564
|
+
font-size: ${$("sm")};
|
|
2493
2565
|
color: ${t.textMuted};
|
|
2494
2566
|
}
|
|
2495
2567
|
input {
|
|
2496
2568
|
min-block-size: 44px;
|
|
2497
2569
|
padding: ${a(3)};
|
|
2498
2570
|
font-family: inherit;
|
|
2499
|
-
font-size: ${
|
|
2571
|
+
font-size: ${$("md")};
|
|
2500
2572
|
color: ${t.text};
|
|
2501
2573
|
background: ${t.surfaceCard};
|
|
2502
2574
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -2511,9 +2583,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2511
2583
|
border-color: ${t.danger};
|
|
2512
2584
|
border-width: ${t.borderThick};
|
|
2513
2585
|
}
|
|
2514
|
-
`]}renderLabel(){return
|
|
2515
|
-
${this.label}${this.required?
|
|
2516
|
-
</legend>`}datePart(e,i,r,
|
|
2586
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
2587
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
2588
|
+
</legend>`}datePart(e,i,r,s){let c=this.id_(e);return n`
|
|
2517
2589
|
<div class="part ${e}">
|
|
2518
2590
|
<label for=${c}>${i}</label>
|
|
2519
2591
|
<input
|
|
@@ -2522,29 +2594,29 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2522
2594
|
inputmode="numeric"
|
|
2523
2595
|
maxlength=${r}
|
|
2524
2596
|
.value=${this[e]}
|
|
2525
|
-
autocomplete=${this.autocompleteSection?`${this.autocompleteSection}-${
|
|
2597
|
+
autocomplete=${this.autocompleteSection?`${this.autocompleteSection}-${s}`:d}
|
|
2526
2598
|
?disabled=${this.disabled}
|
|
2527
2599
|
@input=${p=>{this[e]=p.target.value,this.emit()}}
|
|
2528
2600
|
/>
|
|
2529
2601
|
</div>
|
|
2530
|
-
`}emit(){let i=this.day&&this.month&&this.year.length===4?`${this.year}-${this.month.padStart(2,"0")}-${this.day.padStart(2,"0")}`:"";this.setFormValue(i)}renderControl(){return
|
|
2602
|
+
`}emit(){let i=this.day&&this.month&&this.year.length===4?`${this.year}-${this.month.padStart(2,"0")}-${this.day.padStart(2,"0")}`:"";this.setFormValue(i)}renderControl(){return n`
|
|
2531
2603
|
<div class="parts" part="parts">
|
|
2532
2604
|
${this.datePart("day",S("Day"),2,"day")}
|
|
2533
2605
|
${this.datePart("month",S("Month"),2,"month")}
|
|
2534
2606
|
${this.datePart("year",S("Year"),4,"year")}
|
|
2535
2607
|
</div>
|
|
2536
|
-
`}render(){return
|
|
2537
|
-
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":
|
|
2608
|
+
`}render(){return n`
|
|
2609
|
+
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":d}>
|
|
2538
2610
|
${this.renderLabel()}
|
|
2539
|
-
${this.description?
|
|
2611
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:d}
|
|
2540
2612
|
${this.renderControl()}
|
|
2541
|
-
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||
|
|
2613
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||d}</div>
|
|
2542
2614
|
</fieldset>
|
|
2543
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",
|
|
2615
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-date-input",vt);var Ee=new Set,ze=null;function Me(o){if(typeof document>"u"||Ee.has(o)||(Ee.add(o),Ee.size>1))return;let e=document.documentElement,i=window.innerWidth-e.clientWidth;ze={overflow:e.style.overflow,paddingRight:e.style.paddingRight},e.style.overflow="hidden",i>0&&(e.style.paddingRight=`${i}px`)}function ae(o){if(typeof document>"u"||!Ee.delete(o)||Ee.size>0||!ze)return;let e=document.documentElement;e.style.overflow=ze.overflow,e.style.paddingRight=ze.paddingRight,ze=null}var N={edgeWidth:l("dialog.edge-width","0px"),backdrop:l("dialog.backdrop","color-mix(in srgb, var(--impakt-color-text-default, #1a1a1a) 30%, transparent)"),backdropBlur:l("dialog.backdrop-blur","2px"),padding:l("dialog.padding","20px"),phonePadding:R(`min(${l("dialog.padding","20px")}, 20px)`),headingSize:l("dialog.heading.size","1.25rem"),headingLineHeight:l("dialog.heading.line-height","1.5"),headingTracking:l("dialog.heading.tracking","0em"),headingWeight:l("dialog.heading.weight","700")},wt=class extends h{constructor(){super();this.hasFooter=!1;this.open=!1,this.heading="",this.closeLabel="Close",this.dismissible=!0,this.phoneFullScreen=!1,this.size="md",this.eyebrow=""}static{this.properties={open:{type:Boolean,reflect:!0},heading:{type:String},closeLabel:{type:String,attribute:"close-label"},dismissible:{type:Boolean},phoneFullScreen:{type:Boolean,reflect:!0,attribute:"phone-full-screen"},size:{type:String,reflect:!0},eyebrow:{type:String}}}static{this.styles=[...h.styles,v,I(".close"),u`
|
|
2544
2616
|
dialog {
|
|
2545
2617
|
padding: 0;
|
|
2546
2618
|
/* No edge and a lifted shadow, or under Noire an ink edge and no shadow (dialog.edge-width, shadow.dialog). */
|
|
2547
|
-
border: ${
|
|
2619
|
+
border: ${N.edgeWidth} solid ${t.text};
|
|
2548
2620
|
border-radius: ${t.radius2xl};
|
|
2549
2621
|
background: ${t.surfaceCard};
|
|
2550
2622
|
color: ${t.text};
|
|
@@ -2557,8 +2629,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2557
2629
|
}
|
|
2558
2630
|
/* The page behind, dimmed with the text colour and blurred, or under Noire the ink at half strength (dialog.backdrop). */
|
|
2559
2631
|
dialog::backdrop {
|
|
2560
|
-
background: ${
|
|
2561
|
-
backdrop-filter: blur(${
|
|
2632
|
+
background: ${N.backdrop};
|
|
2633
|
+
backdrop-filter: blur(${N.backdropBlur});
|
|
2562
2634
|
}
|
|
2563
2635
|
:host([size='lg']) dialog {
|
|
2564
2636
|
inline-size: 720px;
|
|
@@ -2573,7 +2645,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2573
2645
|
.eyebrow {
|
|
2574
2646
|
margin: 0;
|
|
2575
2647
|
font-family: ${t.fontMono};
|
|
2576
|
-
font-size: ${
|
|
2648
|
+
font-size: ${$("sm")};
|
|
2577
2649
|
color: ${t.textMuted};
|
|
2578
2650
|
}
|
|
2579
2651
|
.foot {
|
|
@@ -2591,29 +2663,29 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2591
2663
|
align-items: flex-start;
|
|
2592
2664
|
justify-content: space-between;
|
|
2593
2665
|
gap: ${a(3)};
|
|
2594
|
-
padding: ${
|
|
2666
|
+
padding: ${N.padding} ${N.padding} 0;
|
|
2595
2667
|
}
|
|
2596
2668
|
/* The heading: bold in the xl size, or under Noire (G2) about 32px, semibold and tight (dialog.heading.*). */
|
|
2597
2669
|
.heading {
|
|
2598
2670
|
margin: 0;
|
|
2599
2671
|
font-family: ${t.fontHeading};
|
|
2600
|
-
font-size: ${
|
|
2601
|
-
line-height: ${
|
|
2602
|
-
letter-spacing: ${
|
|
2603
|
-
font-weight: ${
|
|
2672
|
+
font-size: ${N.headingSize};
|
|
2673
|
+
line-height: ${N.headingLineHeight};
|
|
2674
|
+
letter-spacing: ${N.headingTracking};
|
|
2675
|
+
font-weight: ${N.headingWeight};
|
|
2604
2676
|
color: ${t.textHeading};
|
|
2605
2677
|
}
|
|
2606
2678
|
.body {
|
|
2607
|
-
padding: ${a(4)} ${
|
|
2679
|
+
padding: ${a(4)} ${N.padding} ${N.padding};
|
|
2608
2680
|
}
|
|
2609
2681
|
.foot {
|
|
2610
|
-
padding: ${a(5)} ${
|
|
2682
|
+
padding: ${a(5)} ${N.padding};
|
|
2611
2683
|
}
|
|
2612
2684
|
@media (max-width: 40rem) {
|
|
2613
|
-
.heading { font-size: min(${
|
|
2614
|
-
.head { padding: ${
|
|
2615
|
-
.body { padding: ${a(4)} ${
|
|
2616
|
-
.foot { padding: ${a(4)} ${
|
|
2685
|
+
.heading { font-size: min(${N.headingSize}, 1.5rem); }
|
|
2686
|
+
.head { padding: ${N.phonePadding} ${N.phonePadding} 0; }
|
|
2687
|
+
.body { padding: ${a(4)} ${N.phonePadding} ${N.phonePadding}; }
|
|
2688
|
+
.foot { padding: ${a(4)} ${N.phonePadding}; }
|
|
2617
2689
|
}
|
|
2618
2690
|
@media (max-width: 40rem) {
|
|
2619
2691
|
:host([phone-full-screen]) dialog {
|
|
@@ -2626,7 +2698,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2626
2698
|
}
|
|
2627
2699
|
}
|
|
2628
2700
|
.close {
|
|
2629
|
-
${
|
|
2701
|
+
${E}
|
|
2630
2702
|
display: inline-flex;
|
|
2631
2703
|
align-items: center;
|
|
2632
2704
|
justify-content: center;
|
|
@@ -2635,49 +2707,49 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2635
2707
|
border: 0;
|
|
2636
2708
|
border-radius: ${t.radius};
|
|
2637
2709
|
font: inherit;
|
|
2638
|
-
font-size: ${
|
|
2710
|
+
font-size: ${$("lg")};
|
|
2639
2711
|
color: ${t.text};
|
|
2640
2712
|
cursor: pointer;
|
|
2641
2713
|
}
|
|
2642
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let r=this.dialog;r&&(this.open?(typeof r.showModal=="function"?r.showModal():r.setAttribute("open",""),
|
|
2714
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let r=this.dialog;r&&(this.open?(typeof r.showModal=="function"?r.showModal():r.setAttribute("open",""),Me(this)):(typeof r.close=="function"&&r.open?r.close():r.removeAttribute("open"),ae(this)))}disconnectedCallback(){super.disconnectedCallback(),ae(this)}onFooter(){let r=Array.from(this.renderRoot.querySelectorAll('slot[name="footer"], slot[name="actions"]')).some(s=>s.assignedElements({flatten:!0}).length>0);r!==this.hasFooter&&(this.hasFooter=r,this.requestUpdate())}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}render(){return n`
|
|
2643
2715
|
<dialog
|
|
2644
2716
|
part="dialog"
|
|
2645
|
-
aria-labelledby=${this.heading?this.id_("heading"):
|
|
2717
|
+
aria-labelledby=${this.heading?this.id_("heading"):d}
|
|
2646
2718
|
@cancel=${i=>{this.dismissible?this.close():i.preventDefault()}}
|
|
2647
2719
|
@close=${()=>{this.open&&this.close()}}
|
|
2648
2720
|
>
|
|
2649
2721
|
<div class="head" part="head">
|
|
2650
2722
|
<div class="titles">
|
|
2651
|
-
${this.eyebrow?
|
|
2652
|
-
${this.heading?
|
|
2723
|
+
${this.eyebrow?n`<p class="eyebrow" part="eyebrow">${this.eyebrow}</p>`:d}
|
|
2724
|
+
${this.heading?n`<h2 class="heading" id=${this.id_("heading")} part="heading">${this.heading}</h2>`:d}
|
|
2653
2725
|
</div>
|
|
2654
|
-
${this.dismissible?
|
|
2726
|
+
${this.dismissible?n`<button class="close" part="close" type="button" @click=${this.close}>
|
|
2655
2727
|
<span aria-hidden="true">×</span>
|
|
2656
2728
|
<span class="sr-only" style="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">${this.closeLabel}</span>
|
|
2657
|
-
</button>`:
|
|
2729
|
+
</button>`:d}
|
|
2658
2730
|
</div>
|
|
2659
2731
|
<div class="body" part="body"><slot></slot></div>
|
|
2660
2732
|
<div class="foot ${this.hasFooter?"":"empty"}" part="footer">
|
|
2661
2733
|
<slot name="footer" @slotchange=${this.onFooter}></slot><slot name="actions" @slotchange=${this.onFooter}></slot>
|
|
2662
2734
|
</div>
|
|
2663
2735
|
</dialog>
|
|
2664
|
-
`}};customElements.define("impakt-dialog",
|
|
2736
|
+
`}};customElements.define("impakt-dialog",wt);var St=class extends h{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=[...h.styles,D,u`
|
|
2665
2737
|
:host { display: block; }
|
|
2666
2738
|
ul, ol { list-style: none; margin: 0; padding: 0; display: grid; gap: ${a(3)}; counter-reset: point; }
|
|
2667
2739
|
li { position: relative; padding-inline-start: ${a(7)}; ${w("md")} text-wrap: pretty; counter-increment: point; }
|
|
2668
2740
|
:host([size='sm']) li { ${w("sm")} }
|
|
2669
2741
|
:host([size='lg']) li { ${w("lg")} }
|
|
2670
2742
|
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}; }
|
|
2671
|
-
: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: ${
|
|
2743
|
+
: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: ${b("bold")}; }
|
|
2672
2744
|
: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}; }
|
|
2673
2745
|
@media (forced-colors: active) { li::before { background: CanvasText; } :host([look='check']) li::before, :host([look='number']) li::before { background: none; color: CanvasText; } }
|
|
2674
|
-
`]}render(){let e=(this.items??[]).map(i=>
|
|
2746
|
+
`]}render(){let e=(this.items??[]).map(i=>n`<li part="item">${i}</li>`);return this.look==="number"?n`<ol part="list">${e}</ol>`:n`<ul part="list" role="list">${e}</ul>`}};customElements.define("impakt-list",St);var ia={"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"},Tt=class extends h{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=[...h.styles,D,u`
|
|
2675
2747
|
:host { display: block; min-inline-size: 0; container-type: inline-size; }
|
|
2676
|
-
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${
|
|
2748
|
+
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: ${l("layout.gutter.md","16px")}; align-items: stretch; }
|
|
2677
2749
|
:host([gap='none']) .columns { gap: 0; }
|
|
2678
|
-
:host([gap='sm']) .columns { gap: ${
|
|
2679
|
-
:host([gap='lg']) .columns { gap: ${
|
|
2680
|
-
:host([gap='xl']) .columns { gap: ${
|
|
2750
|
+
:host([gap='sm']) .columns { gap: ${l("layout.gutter.sm","8px")}; }
|
|
2751
|
+
:host([gap='lg']) .columns { gap: ${l("layout.gutter.lg","32px")}; }
|
|
2752
|
+
:host([gap='xl']) .columns { gap: ${l("layout.gutter.xl","48px")}; }
|
|
2681
2753
|
:host([align='start']) .columns { align-items: start; }
|
|
2682
2754
|
:host([align='center']) .columns { align-items: center; }
|
|
2683
2755
|
:host([align='end']) .columns { align-items: end; }
|
|
@@ -2690,58 +2762,58 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2690
2762
|
::slotted(*) { max-inline-size: 100%; }
|
|
2691
2763
|
@container (max-width: 40rem) { :host(:not([stack-on='never'])) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2692
2764
|
@container (max-width: 64rem) { :host([stack-on='tablet']) .columns { grid-template-columns: minmax(0, 1fr) !important; } }
|
|
2693
|
-
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,i=
|
|
2765
|
+
`]}render(){let e=this.columns==="one"?1:this.columns==="three"?3:this.columns==="four"?4:2,i=ia[this.widths]?.split(" "),r=i&&i.length===e?i.map(s=>`minmax(0, ${s})`).join(" "):"";return n`<div class="columns" part="row" style=${r?`grid-template-columns: ${r}`:""}>${Array.from({length:e},(s,c)=>n`<div class="column" part="column"><slot name=${`column-${c+1}`}></slot></div>`)}</div>`}};customElements.define("impakt-grid",Tt);var zt=class extends h{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=[...h.styles,v,u`
|
|
2694
2766
|
:host { display: block; }
|
|
2695
2767
|
a { display: inline-flex; align-items: center; min-height: ${t.targetMin}; min-width: ${t.targetMin};
|
|
2696
2768
|
color: ${t.link}; text-decoration: underline; overflow-wrap: anywhere; max-width: 100%; }
|
|
2697
2769
|
a:hover { color: ${t.linkHover}; }
|
|
2698
2770
|
.contact { margin: 0; }
|
|
2699
|
-
.caption { display: block; font-weight: ${
|
|
2771
|
+
.caption { display: block; font-weight: ${b("semibold")}; }
|
|
2700
2772
|
/* An address is written one line at a time, and opening hours are often one
|
|
2701
2773
|
day to a line. Long unbroken values still wrap at 320px (1.4.10). */
|
|
2702
2774
|
.detail { white-space: pre-line; overflow-wrap: anywhere; }
|
|
2703
|
-
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return
|
|
2704
|
-
><span class="detail" part="detail" id=${c}>${e}</span></a>`:
|
|
2705
|
-
:host { --impakt-page-inner: ${
|
|
2775
|
+
`]}render(){switch(this.kind){case"phone":case"email":case"address":case"hours":return this.renderContact();default:return this.renderLink()}}renderLink(){return zi(this.label)?n`<a part="link" href=${this.href}>${this.label}</a>`:d}renderContact(){let e=zi(this.detail);if(!e)return d;let i=zi(this.label),r=ra(this.kind,e),s=this.id_("caption"),c=this.id_("detail"),p=i?n`<span class="caption" part="label" id=${s}>${i}</span>`:d,m=r?n`<a part="link" href=${r} aria-labelledby=${i?`${s} ${c}`:d}
|
|
2776
|
+
><span class="detail" part="detail" id=${c}>${e}</span></a>`:n`<span class="detail" part="detail">${e}</span>`;return n`<p class="contact" part="contact">${p}${m}</p>`}};function zi(o){return typeof o=="string"?o.trim():""}function ra(o,e){if(o==="phone"){let i=e.replace(/\(0\)/g,"").replace(/[^\d+]/g,"").replace(/(?!^)\+/g,"");return/\d/.test(i)?`tel:${i}`:""}return o==="email"&&/^[^\s@]+@[^\s@]+$/.test(e)?`mailto:${e}`:""}customElements.define("impakt-help",zt);var mr=u`
|
|
2777
|
+
:host { --impakt-page-inner: ${l("layout.page-width","1200px")}; }
|
|
2706
2778
|
:host([width='narrow']) { --impakt-page-inner: 760px; }
|
|
2707
2779
|
:host([width='wide']) { --impakt-page-inner: 1440px; }
|
|
2708
2780
|
:host([width='content']) { --impakt-page-inner: 1080px; }
|
|
2709
|
-
`,
|
|
2710
|
-
:host { --impakt-page-margin: ${
|
|
2711
|
-
@container impakt-page (min-width: 40rem) { .frame { --impakt-page-margin: ${
|
|
2712
|
-
@container impakt-page (min-width: 64rem) { .frame { --impakt-page-margin: ${
|
|
2713
|
-
`,
|
|
2781
|
+
`,aa=u`
|
|
2782
|
+
:host { --impakt-page-margin: ${l("layout.margin.phone","16px")}; }
|
|
2783
|
+
@container impakt-page (min-width: 40rem) { .frame { --impakt-page-margin: ${l("layout.margin.tablet","32px")}; } }
|
|
2784
|
+
@container impakt-page (min-width: 64rem) { .frame { --impakt-page-margin: ${l("layout.margin.desktop","64px")}; } }
|
|
2785
|
+
`,Et=class extends h{constructor(){super();this.place=()=>{let i=this.querySelector('impakt-hero[treatment="cover"]'),r=getComputedStyle(this).getPropertyValue("--impakt-bleed").trim()==="0",s=!!i&&!r&&this.opensOn(i);if(this.toggleAttribute("floating",s),!s)return;let c=this.renderRoot.querySelector(".frame");c&&this.style.setProperty("--impakt-header-top",`${Math.round(i.getBoundingClientRect().top-c.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=[...h.styles,v,mr,aa,u`
|
|
2714
2786
|
:host { display: block; container: impakt-page / inline-size; }
|
|
2715
2787
|
.frame { position: relative; display: flex; flex-direction: column; min-block-size: 100%; overflow-x: clip; }
|
|
2716
2788
|
.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); }
|
|
2717
|
-
header { background: ${
|
|
2789
|
+
header { background: ${l("color.surface.header","transparent")}; color: ${l("color.text.on-header","inherit")}; padding-block: ${a(4)}; }
|
|
2718
2790
|
/* What sits in the header and footer takes their text colour, so words on a dark footer stay readable. */
|
|
2719
|
-
header { --impakt-color-text-default: ${
|
|
2720
|
-
footer { --impakt-color-text-default: ${
|
|
2791
|
+
header { --impakt-color-text-default: ${l("color.text.on-header","inherit")}; --impakt-color-text-heading: ${l("color.text.on-header","inherit")}; --impakt-color-text-link: ${l("color.text.on-header","inherit")}; --impakt-color-text-link-hover: ${l("color.text.on-header","inherit")}; }
|
|
2792
|
+
footer { --impakt-color-text-default: ${l("color.text.on-footer","inherit")}; --impakt-color-text-heading: ${l("color.text.on-footer","inherit")}; --impakt-color-text-muted: ${l("color.text.on-footer","inherit")}; --impakt-color-text-link: ${l("color.text.on-footer","inherit")}; --impakt-color-text-link-hover: ${l("color.text.on-footer","inherit")}; }
|
|
2721
2793
|
:host([sticky-header]) header { position: sticky; inset-block-start: 0; z-index: 10; }
|
|
2722
2794
|
main { flex: 1; padding-block: ${a(6)} ${a(10)}; }
|
|
2723
2795
|
main:focus { outline: none; }
|
|
2724
2796
|
/* A page that opens on a full-picture hero: the header floats over it as a rounded bar. */
|
|
2725
2797
|
:host([floating]) header { position: absolute; z-index: 20; inset-inline: 0; inset-block-start: var(--impakt-header-top, 0px); padding-block: ${a(6)} 0; background: transparent; border: 0; }
|
|
2726
|
-
:host([floating]) header .inner { inline-size: calc(100% - 2 * var(--impakt-page-margin)); max-inline-size: var(--impakt-page-inner); padding: ${a(3)} ${a(4)} ${a(3)} ${a(6)}; background: ${
|
|
2798
|
+
:host([floating]) header .inner { inline-size: calc(100% - 2 * var(--impakt-page-margin)); max-inline-size: var(--impakt-page-inner); padding: ${a(3)} ${a(4)} ${a(3)} ${a(6)}; background: ${l("color.surface.header","#fff")}; border-radius: ${t.radius2xl}; box-shadow: ${t.shadowLg}; }
|
|
2727
2799
|
:host([floating]) main { padding-block-start: 0; }
|
|
2728
|
-
footer { background: ${
|
|
2800
|
+
footer { background: ${l("color.surface.footer","transparent")}; color: ${l("color.text.on-footer","inherit")}; padding-block: ${a(8)}; border-block-start: ${t.borderThin} solid ${l("color.border.subtle","transparent")}; }
|
|
2729
2801
|
.skip { position: absolute; inset-inline-start: ${a(2)}; inset-block-start: ${a(2)}; z-index: 20; padding: ${a(2)} ${a(4)}; background: ${t.surfaceCard}; color: ${t.link}; border-radius: ${t.radius}; transform: translateY(-200%); }
|
|
2730
2802
|
.skip:not(:focus) { clip-path: inset(50%); }
|
|
2731
2803
|
.skip:focus { transform: none; }
|
|
2732
2804
|
.empty { display: none; }
|
|
2733
|
-
`]}hasSlot(i){return(i==="header"?this.noHeader:this.noFooter)?!1:
|
|
2805
|
+
`]}hasSlot(i){return(i==="header"?this.noHeader:this.noFooter)?!1:gt?!0:Array.from(this.children).some(r=>r.getAttribute("slot")===i)}skip(i){i.preventDefault();let r=this.renderRoot.querySelector("main");r?.focus(),r?.scrollIntoView()}render(){let i=this.hasSlot("header"),r=this.hasSlot("footer");return n`<div class="frame" part="frame">
|
|
2734
2806
|
<a class="skip" href="#content" part="skip" @click=${this.skip}>${this.skipText}</a>
|
|
2735
|
-
${i?
|
|
2807
|
+
${i?n`<header part="header"><div class="inner"><slot name="header"></slot></div></header>`:d}
|
|
2736
2808
|
<main id="content" tabindex="-1" part="main"><div class="inner"><slot></slot></div></main>
|
|
2737
|
-
${r?
|
|
2738
|
-
</div>`}opensOn(i){for(let r of Array.from(this.querySelectorAll("*"))){if(r===i)return!0;if(!r.closest('[slot="header"],[slot="footer"]')&&r.tagName.startsWith("IMPAKT-")&&!/^IMPAKT-(STACK|SECTION|GRID|ANNOUNCEMENT)$/.test(r.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()}},
|
|
2809
|
+
${r?n`<footer part="footer"><div class="inner"><slot name="footer"></slot></div></footer>`:d}
|
|
2810
|
+
</div>`}opensOn(i){for(let r of Array.from(this.querySelectorAll("*"))){if(r===i)return!0;if(!r.closest('[slot="header"],[slot="footer"]')&&r.tagName.startsWith("IMPAKT-")&&!/^IMPAKT-(STACK|SECTION|GRID|ANNOUNCEMENT)$/.test(r.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()}},Mt=class extends h{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=[...h.styles,D,mr,u`
|
|
2739
2811
|
:host { display: block; --impakt-page-margin: inherit; }
|
|
2740
2812
|
/* What a solid card on a brand band goes back to, since the band repaints these for its own text. */
|
|
2741
2813
|
: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}; }
|
|
2742
2814
|
.band { box-sizing: border-box; border-radius: ${t.radiusLg}; }
|
|
2743
2815
|
/* --impakt-bleed is 0 while editing, so a full-width block stays inside the box it is being edited in. */
|
|
2744
|
-
:host([bleed]) .band { border-radius: 0; margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding-inline: max(${
|
|
2816
|
+
:host([bleed]) .band { border-radius: 0; margin-inline: calc(var(--impakt-bleed, 1) * (50% - 50vw)); padding-inline: max(${l("section.gutter","16px")}, calc(var(--impakt-bleed, 1) * (50vw - 50%))); }
|
|
2745
2817
|
:host([tone='subtle']) .band { background: ${t.surfaceSubtle}; }
|
|
2746
2818
|
:host([tone='inset']) .band { background: ${t.surfaceInset}; }
|
|
2747
2819
|
:host([tone='card']) .band { background: ${t.surfaceCard}; }
|
|
@@ -2762,7 +2834,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2762
2834
|
* --impakt-band-panel-inset), so the band and its pattern show through.
|
|
2763
2835
|
*/
|
|
2764
2836
|
:host([tone='ink']) { --impakt-band: ${t.text}; --impakt-band-on: ${t.surfaceCard}; --impakt-band-muted: color-mix(in srgb, ${t.surfaceCard} 78%, ${t.text}); --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
2765
|
-
:host([tone='accent']) { --impakt-band: ${
|
|
2837
|
+
:host([tone='accent']) { --impakt-band: ${l("color.accent.default","#ffd43b")}; --impakt-band-on: ${l("color.accent.on","#1a1a1a")}; --impakt-band-muted: ${l("color.accent.on","#1a1a1a")}; --impakt-solid-card: ${t.surfaceCard}; --impakt-solid-text: ${t.text}; --impakt-solid-heading: var(--impakt-color-text-heading, ${t.text}); --impakt-solid-muted: ${t.textMuted}; }
|
|
2766
2838
|
:host(:is([tone='ink'], [tone='accent'])) .band { background-color: var(--impakt-band); color: var(--impakt-band-on); --impakt-band-panel: transparent; --impakt-band-panel-inset: 0px; --impakt-eyebrow: var(--impakt-band-muted); --impakt-color-surface-card: color-mix(in srgb, var(--impakt-band-on) 10%, transparent); --impakt-color-text-heading: var(--impakt-band-on); --impakt-color-text-default: var(--impakt-band-on); --impakt-color-text-muted: var(--impakt-band-muted); --impakt-color-text-link: var(--impakt-band-on); --impakt-color-text-link-hover: var(--impakt-band-on); }
|
|
2767
2839
|
/* On ink the cards are the raised ink with a darker rule (G2 ink-raised and line-inverse), not a wash. */
|
|
2768
2840
|
:host([tone='ink']) .band {
|
|
@@ -2781,7 +2853,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2781
2853
|
:host([pattern]:not([pattern='none'])) .band { --impakt-pattern-line: color-mix(in srgb, currentColor 10%, transparent); }
|
|
2782
2854
|
:host(:is([pattern='grid'], [pattern='blueprint'])) .band { background-image: linear-gradient(to right, var(--impakt-pattern-line) 1px, transparent 1px), linear-gradient(to bottom, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 7rem 7rem; }
|
|
2783
2855
|
:host([pattern='blueprint']) .band { background-size: 1.75rem 1.75rem; }
|
|
2784
|
-
|
|
2856
|
+
/* Column lines 90px apart from the band's edge to 1260px, fifteen lines in all, as the G2 column grid draws them (10:532, 34:485), with none past it. */
|
|
2857
|
+
:host([pattern='columns']) .band { background-image: repeating-linear-gradient(to right, var(--impakt-pattern-line) 0 1px, transparent 1px 5.625rem); background-size: min(100%, 78.8125rem) 100%; background-repeat: no-repeat; }
|
|
2785
2858
|
:host([pattern='ruled']) .band { background-image: linear-gradient(to bottom, var(--impakt-pattern-line) 1px, transparent 1px); background-size: 100% 2.5rem; }
|
|
2786
2859
|
@media (forced-colors: active) { .band { background-image: none !important; } }
|
|
2787
2860
|
:host(:not([bleed]):not([tone='none'])) .band { padding-inline: ${a(6)}; }
|
|
@@ -2789,10 +2862,10 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2789
2862
|
:host([padding='md']) .band { padding-block: ${a(8)}; }
|
|
2790
2863
|
:host([padding='lg']) .band { padding-block: ${a(12)}; }
|
|
2791
2864
|
:host([padding='xl']) .band { padding-block: ${a(16)}; }
|
|
2792
|
-
:host([padding='2xl']) .band { padding-block: ${
|
|
2865
|
+
:host([padding='2xl']) .band { padding-block: ${l("section.padding-2xl","clamp(56px, 8vw, 112px)")}; }
|
|
2793
2866
|
:host([padding='3xl']) .band { padding-block: clamp(${a(16)}, 10vw, ${a(30)}); }
|
|
2794
2867
|
.content { max-inline-size: var(--impakt-page-inner); margin-inline: auto; }
|
|
2795
|
-
`]}render(){return
|
|
2868
|
+
`]}render(){return n`<section class="band" part="band" aria-label=${this.label||d} role=${this.label?d:"presentation"}><div class="content" part="content"><slot></slot></div></section>`}};customElements.define("impakt-page",Et);customElements.define("impakt-section",Mt);function oa(o,e=""){return e?o===e?"page":null:Ei(o)}function Ei(o){if(typeof location>"u"||!o||o.startsWith("#"))return null;let e;try{let r=new URL(o,location.href);if(r.origin!==location.origin)return null;e=r.pathname.replace(/\/$/,"")||"/"}catch{return null}let i=location.pathname.replace(/\/$/,"")||"/";return e===i?"page":e!=="/"&&i.startsWith(`${e}/`)?"section":null}var At=class extends h{constructor(){super();this.menuOpen=!1;this.needs=0;this.links=[],this.label="Main",this.menuText="Menu",this.menuLook="button",this.size="md",this.align="end",this.fold="measure",this.actionText="",this.actionHref="",this.look="links",this.current=""}static{this.properties={links:{type:Array},label:{type:String},menuText:{type:String,attribute:"menu-text"},menuLook:{type:String,reflect:!0,attribute:"menu-look"},size:{type:String,reflect:!0},align:{type:String,reflect:!0},fold:{type:String,reflect:!0},actionText:{type:String,attribute:"action-text"},actionHref:{type:String,attribute:"action-href"},look:{type:String,reflect:!0},current:{type:String}}}get open(){return this.menuOpen}set open(i){this.menuOpen=i,this.requestUpdate()}static{this.styles=[...h.styles,v,u`
|
|
2796
2869
|
/* It grows to fill a row it sits in, because it measures itself to decide when to fold. */
|
|
2797
2870
|
:host { display: block; flex: 1 1 8rem; min-inline-size: 0; }
|
|
2798
2871
|
nav { display: flex; flex-direction: column; position: relative; }
|
|
@@ -2800,28 +2873,33 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2800
2873
|
ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${a(1)} ${a(6)}; align-items: center; justify-content: flex-end; }
|
|
2801
2874
|
:host([align='start']) ul { justify-content: flex-start; }
|
|
2802
2875
|
:host([align='center']) ul { justify-content: center; }
|
|
2803
|
-
a { ${
|
|
2876
|
+
a { ${E} display: inline-flex; align-items: center; padding: ${a(2)} ${a(1)}; color: inherit; font-weight: ${b("semibold")}; text-decoration: none; border-radius: ${t.radiusSm}; }
|
|
2804
2877
|
a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
|
|
2805
2878
|
a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
|
|
2806
|
-
.toggle { display: none; ${
|
|
2879
|
+
.toggle { display: none; ${E} align-items: center; gap: ${a(2)}; align-self: flex-end; padding: ${a(2)} ${a(3)}; font: inherit; font-weight: ${b("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
2807
2880
|
/* When they do not fit, the links fold behind a Menu button and open as a panel under it. */
|
|
2808
2881
|
:host([folded]) { flex: 0 0 auto; }
|
|
2809
2882
|
:host([folded]) .toggle { display: inline-flex; }
|
|
2810
2883
|
: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}; }
|
|
2811
2884
|
:host([menu-look='icon']) .toggle .words { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
2812
2885
|
:host([size='sm']) ul { column-gap: ${a(6)}; }
|
|
2813
|
-
:host([size='sm']) a { padding-inline: 0; font-size: ${
|
|
2886
|
+
:host([size='sm']) a { padding-inline: 0; font-size: ${$("sm")}; font-weight: ${b("medium")}; }
|
|
2814
2887
|
:host([size='sm'][folded]) a { padding-inline: ${a(3)}; }
|
|
2815
2888
|
:host([folded]) ul { display: none; position: absolute; inset-block-start: calc(100% + ${a(2)}); inset-inline-end: 0; z-index: 30; flex-direction: column; align-items: stretch; gap: 0; min-inline-size: 14rem; padding: ${a(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%); }
|
|
2816
2889
|
:host([folded]) ul.open { display: flex; }
|
|
2817
2890
|
:host([folded]) li { text-align: start; }
|
|
2818
2891
|
:host([folded]) a { display: flex; padding: ${a(3)} ${a(3)}; }
|
|
2819
2892
|
/* Tabs: a bordered group on the soft surface; the current tab is white with a dot before it. */
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2893
|
+
/*
|
|
2894
|
+
* The track hugs its tabs (9:274): a 1px soft edge, 3px inside and the tabs 2px apart, so it is 42px tall. A tab is
|
|
2895
|
+
* 6 by 12 inside with its words at 14px on 1.4, 32px tall and in the muted text; the current one is 34px, white,
|
|
2896
|
+
* edged and in the text colour, with a 5px dot 6px before its words.
|
|
2897
|
+
*/
|
|
2898
|
+
:host([look='tabs']) ul { gap: 2px; align-items: flex-start; padding: 3px; background: ${t.surfaceSubtle}; border: ${t.borderThin} solid var(--impakt-color-line-soft, #dcdcd8); }
|
|
2899
|
+
:host([look='tabs']) a { box-sizing: border-box; min-block-size: 32px; gap: 6px; padding: 6px 12px; font-size: ${$("sm")}; font-weight: ${b("regular")}; line-height: 1.4; color: ${t.textMuted}; border-radius: 0; }
|
|
2900
|
+
:host([look='tabs']) a:hover { text-decoration: none; background: ${t.wash}; color: ${t.text}; }
|
|
2901
|
+
:host([look='tabs']) a[aria-current] { min-block-size: 34px; color: ${t.text}; text-decoration: none; background: ${t.surfaceCard}; box-shadow: inset 0 0 0 1px var(--impakt-color-line-soft, #dcdcd8); }
|
|
2902
|
+
:host([look='tabs']) a[aria-current]::before { content: ''; flex: none; inline-size: 5px; block-size: 5px; border-radius: 50%; background: currentColor; }
|
|
2825
2903
|
@media (forced-colors: active) { :host([look='tabs']) a[aria-current] { outline: 1px solid CanvasText; } }
|
|
2826
2904
|
:host([look='tabs'][folded]) ul { padding: ${a(2)}; }
|
|
2827
2905
|
/* With no script the element is never defined, so it cannot measure itself and fold. The links
|
|
@@ -2840,11 +2918,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2840
2918
|
:host([fold='narrow']) .toggle { display: inline-flex; }
|
|
2841
2919
|
:host([fold='narrow']) .panel { display: none; }
|
|
2842
2920
|
:host([fold='narrow']) .panel:popover-open { display: flex; flex-direction: column; gap: ${a(6)}; position: fixed; inset: 0; box-sizing: border-box; inline-size: 100%; block-size: 100%; max-inline-size: none; max-block-size: none; margin: 0; padding: ${a(3)} ${a(4)} calc(${a(6)} + env(safe-area-inset-bottom)); border: 0; overflow: auto; overscroll-behavior: contain; background: ${t.text}; color: ${t.surfaceCard}; }
|
|
2843
|
-
:host([fold='narrow']) .close { display: inline-flex; ${
|
|
2921
|
+
:host([fold='narrow']) .close { display: inline-flex; ${E} align-items: center; gap: ${a(2)}; align-self: flex-end; padding: ${a(2)} ${a(3)}; font: inherit; font-weight: ${b("semibold")}; color: inherit; background: transparent; border: ${t.borderThin} solid currentColor; border-radius: ${t.radius}; cursor: pointer; }
|
|
2844
2922
|
:host([fold='narrow']) ul { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
|
|
2845
2923
|
:host([fold='narrow']) li { border-block-end: ${t.borderThin} solid color-mix(in srgb, currentColor 22%, transparent); }
|
|
2846
|
-
:host([fold='narrow']) li a { display: flex; padding: ${a(4)} 0; font-family: ${t.fontHeading}; font-size: ${
|
|
2847
|
-
:host([fold='narrow']) .action { display: flex; ${
|
|
2924
|
+
:host([fold='narrow']) li a { display: flex; padding: ${a(4)} 0; font-family: ${t.fontHeading}; font-size: ${$("2xl")}; font-weight: ${b("semibold")}; letter-spacing: -0.02em; }
|
|
2925
|
+
:host([fold='narrow']) .action { display: flex; ${E} align-items: center; justify-content: center; margin-block-start: auto; padding: ${a(3)} ${a(4)}; background: ${t.surfaceCard}; color: ${t.text}; font-weight: ${b("semibold")}; text-decoration: none; border-radius: ${t.radius}; }
|
|
2848
2926
|
:host([fold='narrow']) .action:hover { text-decoration: underline; }
|
|
2849
2927
|
/*
|
|
2850
2928
|
* The tabs look, folded: the whole-screen menu is ink, so the tab track's paper and the current tab's white box
|
|
@@ -2857,51 +2935,51 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2857
2935
|
:host([fold='narrow'][look='tabs']) li a[aria-current] { background: transparent; box-shadow: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
|
|
2858
2936
|
:host([fold='narrow'][look='tabs']) li a[aria-current]::before { inline-size: 8px; block-size: 8px; }
|
|
2859
2937
|
}
|
|
2860
|
-
`]}fit(){if(this.fold==="narrow"){this.removeAttribute("folded");return}if(!this.hasUpdated)return;let i=this.getBoundingClientRect().width;if(i<=0)return;if(!this.needs){this.removeAttribute("folded");let
|
|
2938
|
+
`]}fit(){if(this.fold==="narrow"){this.removeAttribute("folded");return}if(!this.hasUpdated)return;let i=this.getBoundingClientRect().width;if(i<=0)return;if(!this.needs){this.removeAttribute("folded");let s=Array.from(this.renderRoot.querySelectorAll("li")),c=Number.parseFloat(getComputedStyle(this.renderRoot.querySelector("ul")).columnGap)||0;this.needs=s.reduce((p,m)=>p+m.getBoundingClientRect().width,0)+c*Math.max(0,s.length-1)}let r=this.needs>i;this.toggleAttribute("folded",r),!r&&this.menuOpen&&(this.open=!1)}updated(i){(i.has("links")||i.has("fold"))&&(this.needs=0,this.fit())}connectedCallback(){super.connectedCallback(),typeof ResizeObserver=="function"&&(this.resize=new ResizeObserver(()=>this.fit()),this.resize.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resize?.disconnect()}toggle(){this.open=!this.open}onKey(i){i.key!=="Escape"||!this.open||(this.open=!1,this.renderRoot.querySelector(".toggle")?.focus())}renderNarrow(){let i=this.id_("panel");return n`<nav aria-label=${this.label||d} part="nav">
|
|
2861
2939
|
<button class="toggle" type="button" popovertarget=${i}>${M(this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2862
2940
|
<div id=${i} class="panel" popover="auto" part="panel">
|
|
2863
2941
|
<button class="close" type="button" popovertarget=${i} popovertargetaction="hide">${M("close")}<span>${S("Close")}</span></button>
|
|
2864
2942
|
<ul part="list">
|
|
2865
|
-
${(this.links??[]).map(r=>{let
|
|
2943
|
+
${(this.links??[]).map(r=>{let s=this.current?r.href===this.current?"page":null:Ei(r.href);return n`<li><a href=${r.href} aria-current=${s==="page"?"page":s==="section"?"true":d} part="link">${r.label}</a></li>`})}
|
|
2866
2944
|
</ul>
|
|
2867
|
-
${this.actionText?
|
|
2945
|
+
${this.actionText?n`<a class="action" href=${this.actionHref||"#"} part="action">${this.actionText}</a>`:d}
|
|
2868
2946
|
</div>
|
|
2869
|
-
</nav>`}render(){if(this.fold==="narrow")return this.renderNarrow();let i=this.id_("links");return
|
|
2947
|
+
</nav>`}render(){if(this.fold==="narrow")return this.renderNarrow();let i=this.id_("links");return n`<nav aria-label=${this.label||d} part="nav" @keydown=${this.onKey}>
|
|
2870
2948
|
<button class="toggle" type="button" aria-expanded=${this.open?"true":"false"} aria-controls=${i} @click=${this.toggle}>${M(this.open?"close":this.menuLook==="icon"?"menu-two":"menu")}<span class="words">${this.menuText}</span></button>
|
|
2871
2949
|
<ul id=${i} class=${this.open?"open":""} part="list">
|
|
2872
|
-
${(this.links??[]).map(r=>{let
|
|
2950
|
+
${(this.links??[]).map(r=>{let s=this.current?r.href===this.current?"page":null:Ei(r.href);return n`<li><a href=${r.href} aria-current=${s==="page"?"page":s==="section"?"true":d} part="link">${r.label}</a></li>`})}
|
|
2873
2951
|
</ul>
|
|
2874
|
-
</nav>`}},
|
|
2875
|
-
:host { display: block; font-size: ${
|
|
2952
|
+
</nav>`}},Ct=class extends h{static{this.properties={items:{type:Array},label:{type:String},look:{type:String,reflect:!0}}}constructor(){super(),this.items=[],this.label="Breadcrumb",this.look="default"}static{this.styles=[...h.styles,v,u`
|
|
2953
|
+
:host { display: block; font-size: ${$("sm")}; }
|
|
2876
2954
|
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: ${a(1)}; }
|
|
2877
2955
|
li { display: inline-flex; align-items: center; gap: ${a(1)}; }
|
|
2878
2956
|
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: ${a(1)} ${a(2)}; }
|
|
2879
2957
|
a { color: ${t.link}; text-decoration: underline; text-underline-offset: 0.2em; border-radius: ${t.radiusSm}; }
|
|
2880
2958
|
a:hover { color: ${t.linkHover}; }
|
|
2881
2959
|
[aria-current] { color: ${t.textMuted}; }
|
|
2882
|
-
:host([look='mono']) { font-family: ${t.fontMono}; font-size: ${
|
|
2960
|
+
:host([look='mono']) { font-family: ${t.fontMono}; font-size: ${$("sm")}; color: ${t.textMuted}; }
|
|
2883
2961
|
/* The G2 trail (34:602): "Home / Tools / Accessibility", a slash between, the links underlined only on hover. A trail is its own list, not a link in a sentence, so it needs no underline to be told apart (1.4.1). */
|
|
2884
2962
|
:host([look='mono']) a { color: ${t.textMuted}; text-decoration: none; }
|
|
2885
2963
|
:host([look='mono']) a:hover { color: ${t.text}; text-decoration: underline; text-decoration-thickness: 1px; }
|
|
2886
2964
|
:host([look='mono']) [aria-current] { color: ${t.text}; }
|
|
2887
2965
|
:host([look='mono']) li + li::before { content: '/'; inline-size: auto; block-size: auto; border: 0; transform: none; margin-inline: ${a(1)}; color: ${t.textMuted}; }
|
|
2888
2966
|
.sr-only { ${T} }
|
|
2889
|
-
`]}render(){let e=this.items??[];return
|
|
2890
|
-
${e.map((i,r)=>
|
|
2891
|
-
</ol></nav>`}};customElements.define("impakt-nav",
|
|
2967
|
+
`]}render(){let e=this.items??[];return n`<nav aria-label=${this.label} part="nav"><ol>
|
|
2968
|
+
${e.map((i,r)=>n`<li>${r===e.length-1?n`<span aria-current="page">${i.label}</span>`:n`<a href=${i.href} part="link">${i.label}</a>`}</li>`)}
|
|
2969
|
+
</ol></nav>`}};customElements.define("impakt-nav",At);customElements.define("impakt-breadcrumbs",Ct);var Lt=class extends h{static{this.properties={spacing:{type:String,reflect:!0},tone:{type:String,reflect:!0}}}constructor(){super(),this.spacing="md",this.tone="subtle"}static{this.styles=[...h.styles,u`
|
|
2892
2970
|
:host { display: block; }
|
|
2893
2971
|
hr { margin: ${a(4)} 0; border: 0; border-block-start: ${t.borderThin} solid ${t.border}; opacity: 0.5; }
|
|
2894
2972
|
:host([tone='strong']) hr { opacity: 1; border-block-start-width: ${t.borderThick}; }
|
|
2895
2973
|
:host([spacing='sm']) hr { margin-block: ${a(2)}; }
|
|
2896
2974
|
:host([spacing='lg']) hr { margin-block: ${a(8)}; }
|
|
2897
2975
|
:host([spacing='xl']) hr { margin-block: ${a(12)}; }
|
|
2898
|
-
`]}render(){return
|
|
2976
|
+
`]}render(){return n`<hr aria-hidden="true" part="line" />`}},Rt=class extends h{static{this.properties={size:{type:String,reflect:!0}}}constructor(){super(),this.size="md"}static{this.styles=[...h.styles,u`
|
|
2899
2977
|
:host { display: block; block-size: ${a(4)}; }
|
|
2900
2978
|
:host([size='sm']) { block-size: ${a(2)}; }
|
|
2901
2979
|
:host([size='lg']) { block-size: ${a(8)}; }
|
|
2902
2980
|
:host([size='xl']) { block-size: ${a(12)}; }
|
|
2903
2981
|
:host([size='2xl']) { block-size: ${a(16)}; }
|
|
2904
|
-
`]}render(){return
|
|
2982
|
+
`]}render(){return n``}},It=class extends h{static{this.styles=[...h.styles,u`:host { ${T} }`]}render(){return n`<slot></slot>`}},_t=class extends h{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=[...h.styles,v,I("[role='tab']"),u`
|
|
2905
2983
|
/* Only the two-row layout needs a size container. Making every tab set one
|
|
2906
2984
|
would take its width from its parent alone, so in a flex row, with no
|
|
2907
2985
|
width given, it would shrink to nothing. In a row it may still shrink
|
|
@@ -2909,12 +2987,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2909
2987
|
:host { display: block; min-inline-size: 0; }
|
|
2910
2988
|
:host([two-rows]) { container-type: inline-size; }
|
|
2911
2989
|
[role='tablist'] { display: flex; gap: ${a(1)}; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2912
|
-
[role='tab'] { ${
|
|
2990
|
+
[role='tab'] { ${E} position: relative; flex: none; padding: ${a(3)} ${a(4)}; font: inherit; font-weight: ${b("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; }
|
|
2913
2991
|
/* Inside a box that scrolls the ring would be clipped, so it is drawn inside the tab. */
|
|
2914
2992
|
[role='tab']:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; }
|
|
2915
2993
|
[role='tab']:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2916
2994
|
[role='tab'][aria-selected='true'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2917
|
-
[role='tabpanel'] { padding-block: ${a(5)}; line-height: ${
|
|
2995
|
+
[role='tabpanel'] { padding-block: ${a(5)}; line-height: ${W("normal")}; }
|
|
2918
2996
|
.body { white-space: pre-line; }
|
|
2919
2997
|
@container (max-width: 40rem) {
|
|
2920
2998
|
:host([two-rows]) [role='tablist'].many { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); overflow: visible; border-block-end: 0; gap: ${a(1)}; }
|
|
@@ -2922,41 +3000,41 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2922
3000
|
:host([two-rows]) .many [role='tab'][aria-selected='true'] { border-block-end-color: currentColor; background: ${t.brandSubtle}; }
|
|
2923
3001
|
}
|
|
2924
3002
|
@media (forced-colors: active) { [role='tab'][aria-selected='true'] { border-block-end-color: Highlight; } }
|
|
2925
|
-
.count { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 20px; block-size: 20px; margin-inline-start: ${a(2)}; padding: 0 ${a(1.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-size: 12px; font-weight: ${
|
|
3003
|
+
.count { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 20px; block-size: 20px; margin-inline-start: ${a(2)}; padding: 0 ${a(1.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-size: 12px; font-weight: ${b("semibold")}; background: ${t.brand}; color: ${t.onBrand}; font-variant-numeric: tabular-nums; }
|
|
2926
3004
|
.sr-only { ${T} }
|
|
2927
3005
|
/* Links drawn as tabs. */
|
|
2928
3006
|
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: ${a(1)}; overflow-x: auto; scrollbar-width: thin; border-block-end: ${t.borderThin} solid ${t.border}; }
|
|
2929
|
-
nav a { ${
|
|
3007
|
+
nav a { ${E} position: relative; display: inline-flex; align-items: center; flex: none; padding: ${a(3)} ${a(4)}; font-weight: ${b("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; }
|
|
2930
3008
|
nav a:hover { color: ${t.text}; background: ${t.surfaceInset}; }
|
|
2931
3009
|
nav a[aria-current='page'] { color: ${t.link}; border-block-end-color: currentColor; }
|
|
2932
3010
|
nav a:focus-visible { box-shadow: inset 0 0 0 2px ${t.text}, inset 0 0 0 4px ${t.surfaceCard}; outline: none; }
|
|
2933
3011
|
/* The pill look, for either kind. Its corners come from the brand's radius, so it is square under Noire. */
|
|
2934
3012
|
:host([look='pill']) :is([role='tablist'], nav ul) { padding: ${a(1)}; border: 0; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); background: ${t.surfaceCard}; gap: ${a(.5)}; }
|
|
2935
|
-
:host([look='pill']) :is([role='tab'], nav a) { padding: ${a(2)} ${a(4)}; margin: 0; border: 0; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-weight: ${
|
|
3013
|
+
:host([look='pill']) :is([role='tab'], nav a) { padding: ${a(2)} ${a(4)}; margin: 0; border: 0; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); font-weight: ${b("medium")}; color: ${t.text}; }
|
|
2936
3014
|
:host([look='pill']) :is([role='tab'], nav a):hover { background: ${t.surfaceInset}; }
|
|
2937
3015
|
:host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { background: ${t.text}; color: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); }
|
|
2938
3016
|
@media (forced-colors: active) { :host([look='pill']) :is([role='tab'][aria-selected='true'], nav a[aria-current='page']) { border: 2px solid Highlight; } }
|
|
2939
|
-
`]}countOf(e){return typeof e.count!="number"?
|
|
2940
|
-
${e.map(n
|
|
2941
|
-
</ul></nav>`;let r=e.length>4;return
|
|
2942
|
-
${e.map(n
|
|
3017
|
+
`]}countOf(e){return typeof e.count!="number"?d: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(i=>!!i.href)}current(){let e=this.items??[];return e.some(i=>i.id===this.selected)?this.selected:e[0]?.id??""}choose(e,i){e!==this.current()&&(this.selected=e,this.dispatchEvent(new CustomEvent("impakt-change",{detail:{value:e},bubbles:!0,composed:!0})),i&&this.updateComplete.then(()=>this.renderRoot.querySelector(`#${this.id_(`tab-${e}`)}`)?.focus({preventScroll:!0})))}onKey(e){let i=this.items??[],r=i.findIndex(c=>c.id===this.current()),s={ArrowRight:r+1,ArrowLeft:r-1,Home:0,End:i.length-1}[e.key];s===void 0||!i.length||(e.preventDefault(),this.choose(i[(s+i.length)%i.length].id,!0))}reveal(){let e=this.renderRoot.querySelector("[role='tablist']"),i=this.renderRoot.querySelector("[role='tab'][aria-selected='true']");if(!e||!i||e.scrollWidth<=e.clientWidth)return;let r=i.offsetLeft-e.offsetLeft,s=r+i.offsetWidth;r<e.scrollLeft?e.scrollLeft=r-16:s>e.scrollLeft+e.clientWidth&&(e.scrollLeft=s-e.clientWidth+16)}updated(e){(e.has("selected")||e.has("items"))&&this.reveal()}render(){let e=this.items??[],i=this.current();if(this.linked)return n`<nav aria-label=${this.label||d} part="tabs"><ul>
|
|
3018
|
+
${e.map(s=>n`<li><a href=${s.href} part="tab" aria-current=${s.id===i?"page":d} @click=${c=>ve(this,c,{href:s.href,id:s.id})}>${s.label}${this.countOf(s)}</a></li>`)}
|
|
3019
|
+
</ul></nav>`;let r=e.length>4;return n`<div role="tablist" aria-label=${this.label||d} part="tabs" class=${r?"many":""} style=${r?`--columns:${Math.ceil(e.length/2)}`:d} @keydown=${this.onKey}>
|
|
3020
|
+
${e.map(s=>n`<button role="tab" type="button" id=${this.id_(`tab-${s.id}`)} aria-selected=${s.id===i?"true":"false"} aria-controls=${this.id_(`panel-${s.id}`)} tabindex=${s.id===i?"0":"-1"} @click=${()=>this.choose(s.id,!1)}>${s.label}${this.countOf(s)}</button>`)}
|
|
2943
3021
|
</div>
|
|
2944
|
-
${e.map(n
|
|
3022
|
+
${e.map(s=>n`<div role="tabpanel" id=${this.id_(`panel-${s.id}`)} aria-labelledby=${this.id_(`tab-${s.id}`)} tabindex="0" ?hidden=${s.id!==i} part="panel"><slot name=${s.id}><span class="body">${s.body??""}</span></slot></div>`)}`}};customElements.define("impakt-divider",Lt);customElements.define("impakt-spacer",Rt);customElements.define("impakt-visually-hidden",It);customElements.define("impakt-tabs",_t);var Ht=class extends h{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=[...h.styles,u`
|
|
2945
3023
|
:host { display: block; margin-block-end: ${a(6)}; }
|
|
2946
3024
|
fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
|
|
2947
|
-
legend { padding: 0; margin-block-end: ${a(2)}; font-size: ${
|
|
2948
|
-
:host([size='lg']) legend { font-size: ${
|
|
2949
|
-
:host([size='xl']) legend { font-size: ${
|
|
2950
|
-
.description { margin-block-end: ${a(3)}; font-size: ${
|
|
2951
|
-
.error { margin-block-end: ${a(3)}; font-size: ${
|
|
3025
|
+
legend { padding: 0; margin-block-end: ${a(2)}; font-size: ${$("md")}; font-weight: ${b("bold")}; line-height: ${W("tight")}; color: ${t.text}; }
|
|
3026
|
+
:host([size='lg']) legend { font-size: ${$("xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
3027
|
+
:host([size='xl']) legend { font-size: ${$("2xl")}; font-family: ${t.fontHeading}; color: ${t.textHeading}; }
|
|
3028
|
+
.description { margin-block-end: ${a(3)}; font-size: ${$("sm")}; color: ${t.textMuted}; line-height: ${W("normal")}; }
|
|
3029
|
+
.error { margin-block-end: ${a(3)}; font-size: ${$("sm")}; color: ${t.dangerText}; font-weight: ${b("semibold")}; }
|
|
2952
3030
|
.error:empty { display: none; }
|
|
2953
3031
|
:host([error]:not([error=''])) .fields { padding-inline-start: ${a(4)}; border-inline-start: 4px solid ${t.danger}; }
|
|
2954
|
-
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return
|
|
3032
|
+
`]}render(){let e=[this.description?this.id_("description"):"",this.error?this.id_("error"):""].filter(Boolean).join(" ");return n`<fieldset part="fieldset" aria-describedby=${e||d}>
|
|
2955
3033
|
<legend part="legend">${this.legend}</legend>
|
|
2956
|
-
${this.description?
|
|
2957
|
-
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||
|
|
3034
|
+
${this.description?n`<div class="description" id=${this.id_("description")}>${this.description}</div>`:d}
|
|
3035
|
+
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||d}</div>
|
|
2958
3036
|
<div class="fields" part="fields"><slot></slot></div>
|
|
2959
|
-
</fieldset>`}};customElements.define("impakt-fieldset",
|
|
3037
|
+
</fieldset>`}};customElements.define("impakt-fieldset",Ht);var Bt=class extends h{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=[...h.styles,v,I(".close"),u`
|
|
2960
3038
|
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); }
|
|
2961
3039
|
dialog[open] { display: flex; }
|
|
2962
3040
|
:host([side='left']) dialog { margin: 0 auto 0 0; animation-name: from-left; }
|
|
@@ -2969,23 +3047,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2969
3047
|
@keyframes from-right { from { transform: translateX(100%); } }
|
|
2970
3048
|
@keyframes from-left { from { transform: translateX(-100%); } }
|
|
2971
3049
|
.head { display: flex; align-items: center; justify-content: space-between; gap: ${a(3)}; padding: ${a(4)} ${a(5)}; box-shadow: 0 1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2972
|
-
h2 { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${
|
|
2973
|
-
.close { ${
|
|
3050
|
+
h2 { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${b("bold")}; color: ${t.textHeading}; }
|
|
3051
|
+
.close { ${E} display: inline-flex; align-items: center; justify-content: center; padding: 0; color: ${t.text}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
2974
3052
|
.close:hover { background: ${t.surfaceSubtle}; }
|
|
2975
3053
|
.body { flex: 1; overflow: auto; padding: ${a(5)}; }
|
|
2976
3054
|
.foot { display: flex; gap: ${a(3)}; justify-content: flex-end; padding: ${a(4)} ${a(5)}; box-shadow: 0 -1px 0 color-mix(in srgb, ${t.text} 8%, transparent); }
|
|
2977
3055
|
.foot[hidden] { display: none; }
|
|
2978
|
-
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let r=this.dialog;r&&(this.open?(typeof r.showModal=="function"?r.showModal():r.setAttribute("open",""),
|
|
3056
|
+
`]}get dialog(){return this.renderRoot.querySelector("dialog")}updated(i){if(!i.has("open"))return;let r=this.dialog;r&&(this.open?(typeof r.showModal=="function"?r.showModal():r.setAttribute("open",""),Me(this)):(typeof r.close=="function"&&r.open?r.close():r.removeAttribute("open"),ae(this)))}disconnectedCallback(){super.disconnectedCallback(),ae(this)}close(){this.open=!1,this.dispatchEvent(new CustomEvent("impakt-close",{bubbles:!0,composed:!0}))}footerChanged(i){this.hasFooter=i.target.assignedNodes().length>0,this.requestUpdate()}render(){return n`<dialog part="dialog" aria-labelledby=${this.heading?this.id_("heading"):d}
|
|
2979
3057
|
@cancel=${()=>this.close()}
|
|
2980
3058
|
@close=${()=>{this.open&&this.close()}}
|
|
2981
3059
|
@click=${i=>{i.target===this.dialog&&this.close()}}>
|
|
2982
3060
|
<div class="head">
|
|
2983
|
-
${this.heading?
|
|
3061
|
+
${this.heading?n`<h2 id=${this.id_("heading")}>${this.heading}</h2>`:n`<span></span>`}
|
|
2984
3062
|
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","20px")}</button>
|
|
2985
3063
|
</div>
|
|
2986
3064
|
<div class="body" part="body"><slot></slot></div>
|
|
2987
3065
|
<div class="foot" part="footer" ?hidden=${!this.hasFooter}><slot name="footer" @slotchange=${this.footerChanged}></slot></div>
|
|
2988
|
-
</dialog>`}},
|
|
3066
|
+
</dialog>`}},na={neutral:"info",success:"check",warning:"warning",danger:"warning"},Nt=class extends h{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=[...h.styles,v,u`
|
|
2989
3067
|
.region { position: fixed; inset-block-end: calc(${a(4)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); inset-inline-end: ${a(4)}; z-index: 1000; inline-size: min(24rem, calc(100vw - ${a(8)})); pointer-events: none; }
|
|
2990
3068
|
@media (max-width: 40rem) { .region { inset-inline: ${a(3)}; inline-size: auto; inset-block-end: calc(${a(3)} + env(safe-area-inset-bottom, 0px) + var(--impakt-bottom-bar, 0px)); } }
|
|
2991
3069
|
.toast { pointer-events: auto; max-block-size: 40vh; overflow: auto; display: flex; align-items: flex-start; gap: ${a(3)}; padding: ${a(3)} ${a(3)} ${a(3)} ${a(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); }
|
|
@@ -2995,21 +3073,21 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
2995
3073
|
:host([tone='success']) .mark { color: ${t.success}; }
|
|
2996
3074
|
:host([tone='warning']) .mark { color: ${t.warning}; }
|
|
2997
3075
|
:host([tone='danger']) .mark { color: ${t.danger}; }
|
|
2998
|
-
.message { flex: 1; align-self: center; margin: 0; ${w("sm")} font-weight: ${
|
|
2999
|
-
.action, .close { ${
|
|
3076
|
+
.message { flex: 1; align-self: center; margin: 0; ${w("sm")} font-weight: ${b("medium")}; }
|
|
3077
|
+
.action, .close { ${E} padding: 0 ${a(2)}; font: inherit; ${w("sm")} font-weight: ${b("semibold")}; color: ${t.link}; background: none; border: 0; border-radius: ${t.radius}; cursor: pointer; }
|
|
3000
3078
|
.close { display: inline-flex; align-items: center; justify-content: center; color: ${t.textMuted}; }
|
|
3001
3079
|
.action:hover, .close:hover { background: ${t.surfaceSubtle}; }
|
|
3002
|
-
`,
|
|
3003
|
-
${this.open?
|
|
3080
|
+
`,I(".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">
|
|
3081
|
+
${this.open?n`<div class="toast" part="toast" @mouseenter=${this.stop} @mouseleave=${this.start} @focusin=${this.stop} @focusout=${this.start}
|
|
3004
3082
|
@keydown=${e=>{e.key==="Escape"&&(e.preventDefault(),this.close())}}>
|
|
3005
|
-
<span class="mark">${M(
|
|
3083
|
+
<span class="mark">${M(na[this.tone]??"info","20px")}</span>
|
|
3006
3084
|
<p class="message">${this.message}</p>
|
|
3007
|
-
${this.actionText?
|
|
3085
|
+
${this.actionText?n`<button class="action" type="button" @click=${this.action}>${this.actionText}</button>`:d}
|
|
3008
3086
|
<button class="close" type="button" aria-label=${this.closeLabel} @click=${this.close}>${M("close","16px")}</button>
|
|
3009
|
-
</div>`:
|
|
3010
|
-
</div>`}},
|
|
3087
|
+
</div>`:d}
|
|
3088
|
+
</div>`}},sa=R("var(--impakt-color-line-soft, #dcdcd8)"),Pt=class extends h{constructor(){super();this.outside=i=>{i.composedPath().includes(this)||this.toggle(!1)};this.label="Menu",this.icon="",this.items=[],this.edge="start",this.open=!1,this.triggerLook="button"}static{this.properties={label:{type:String},icon:{type:String},items:{type:Array},edge:{type:String,reflect:!0},open:{type:Boolean,reflect:!0},triggerLook:{type:String,reflect:!0,attribute:"trigger-look"}}}static{this.styles=[...h.styles,v,I(".trigger, .item"),u`
|
|
3011
3089
|
:host { position: relative; display: inline-block; }
|
|
3012
|
-
.trigger { ${
|
|
3090
|
+
.trigger { ${E} display: inline-flex; align-items: center; gap: ${a(2)}; padding: ${a(2)} ${a(3.5)}; font: inherit; ${w("sm")} font-weight: ${b("medium")}; color: ${t.text}; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
3013
3091
|
:host([trigger-look='text']) .trigger { padding: ${a(1)} ${a(1)}; font-size: 1rem; line-height: 1.25; background: transparent; border-color: transparent; }
|
|
3014
3092
|
:host([trigger-look='text']) .trigger:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.2em; }
|
|
3015
3093
|
.caret { font-size: 0.75em; line-height: 1; }
|
|
@@ -3019,18 +3097,18 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3019
3097
|
/* G2: a 1px ink border and the one shadow the design allows, the open menu's. */
|
|
3020
3098
|
.panel { position: absolute; z-index: 100; inset-block-start: calc(100% + ${a(1.5)}); inset-inline-start: 0; box-sizing: border-box; min-inline-size: 13rem; max-inline-size: min(24rem, 90vw); padding: ${a(2)} 0; background: ${t.surfaceCard}; border: ${t.borderThin} solid ${t.text}; border-radius: ${t.radiusXl}; box-shadow: var(--impakt-shadow-overlay, 0 16px 32px rgb(0 0 0 / 0.2)); animation: pop 120ms ease-out; }
|
|
3021
3099
|
.list, .group { margin: 0; padding: 0; list-style: none; }
|
|
3022
|
-
.grouped:not(:first-child) { border-block-start: ${t.borderThin} solid ${
|
|
3100
|
+
.grouped:not(:first-child) { border-block-start: ${t.borderThin} solid ${sa}; }
|
|
3023
3101
|
/* G2 group label (53:983): 12px above, 6px below, 18px in, IBM Plex Mono 14/1.4. */
|
|
3024
3102
|
.group-label { display: block; padding: ${a(3)} 18px 6px; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; color: ${t.textMuted}; }
|
|
3025
3103
|
.header { padding: ${a(2)} ${a(2.5)} ${a(2.5)}; margin-block-end: ${a(1.5)}; border-block-end: ${t.borderThin} solid ${t.border}; ${w("sm")} color: ${t.textMuted}; overflow-wrap: anywhere; }
|
|
3026
3104
|
:host([edge='end']) .panel, .panel.flip-end { inset-inline: auto 0; }
|
|
3027
3105
|
:host([edge='end']) .panel.flip-start { inset-inline: 0 auto; }
|
|
3028
3106
|
@keyframes pop { from { opacity: 0; transform: translateY(-${a(1)}); } }
|
|
3029
|
-
.item { ${
|
|
3107
|
+
.item { ${E} box-sizing: border-box; display: flex; align-items: center; gap: ${a(2.5)}; inline-size: 100%; padding: ${a(3)} 18px; font: inherit; font-size: 1rem; line-height: 1.2; font-weight: ${b("medium")}; text-align: start; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: 0; cursor: pointer; }
|
|
3030
3108
|
.item:hover, .item:focus { background: ${t.surfaceSubtle}; }
|
|
3031
3109
|
/* G2 item (53:985): the label in Archivo 16/1.2 and the note in IBM Plex Mono 14/1.4, on one line, the note at the end. */
|
|
3032
3110
|
.item .text { min-inline-size: 0; }
|
|
3033
|
-
.item .meta { flex: none; margin-inline-start: auto; padding-inline-start: ${a(4)}; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; font-weight: ${
|
|
3111
|
+
.item .meta { flex: none; margin-inline-start: auto; padding-inline-start: ${a(4)}; font-family: ${t.fontMono}; font-size: 0.875rem; line-height: 1.4; font-weight: ${b("regular")}; color: ${t.textMuted}; white-space: nowrap; }
|
|
3034
3112
|
.item[aria-current] { background: ${t.text}; color: var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})); }
|
|
3035
3113
|
.item[aria-current] .meta { color: color-mix(in srgb, var(--impakt-color-text-inverse, var(--impakt-solid-card, ${t.surfaceCard})) 66%, ${t.text}); }
|
|
3036
3114
|
.item[aria-disabled='true'] { color: ${t.textMuted}; cursor: not-allowed; }
|
|
@@ -3039,61 +3117,61 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3039
3117
|
@media (forced-colors: active) { .panel { border-color: CanvasText; } .item[aria-current] { outline: 2px solid Highlight; outline-offset: -2px; } .item[aria-disabled='true'] { color: GrayText; } }
|
|
3040
3118
|
.item.danger { color: ${t.dangerText}; }
|
|
3041
3119
|
.item svg { flex: none; }
|
|
3042
|
-
`]}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,r){this.open=i,i?(document.addEventListener("click",this.outside),this.updateComplete.then(()=>{this.entries[r==="last"?this.entries.length-1:0]?.focus()})):document.removeEventListener("click",this.outside)}updated(i){super.updated?.(i),i.has("open")&&this.open&&this.keepOnScreen()}keepOnScreen(){let i=this.renderRoot.querySelector(".panel");if(!i)return;i.classList.remove("flip-start","flip-end");let r=i.getBoundingClientRect(),
|
|
3043
|
-
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${M(this.icon,"18px")}${this.label}</slot>${i?
|
|
3044
|
-
${this.open?
|
|
3045
|
-
${
|
|
3046
|
-
</ul></div>`:
|
|
3120
|
+
`]}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,r){this.open=i,i?(document.addEventListener("click",this.outside),this.updateComplete.then(()=>{this.entries[r==="last"?this.entries.length-1:0]?.focus()})):document.removeEventListener("click",this.outside)}updated(i){super.updated?.(i),i.has("open")&&this.open&&this.keepOnScreen()}keepOnScreen(){let i=this.renderRoot.querySelector(".panel");if(!i)return;i.classList.remove("flip-start","flip-end");let r=i.getBoundingClientRect(),s=document.documentElement.clientWidth;r.right>s-8?i.classList.add("flip-end"):r.left<8&&i.classList.add("flip-start")}triggerKey(i){(i.key==="ArrowDown"||i.key==="ArrowUp")&&(i.preventDefault(),this.toggle(!0,i.key==="ArrowUp"?"last":"first"))}listKey(i){let r=this.entries,s=r.indexOf(this.renderRoot.activeElement),c={ArrowDown:(s+1)%r.length,ArrowUp:(s-1+r.length)%r.length,Home:0,End:r.length-1};if(i.key in c)i.preventDefault(),r[c[i.key]]?.focus();else if(i.key.length===1&&/\S/.test(i.key)&&!i.ctrlKey&&!i.metaKey&&!i.altKey){let p=i.key.toLowerCase();[...r.slice(s+1),...r.slice(0,s+1)].find(g=>(g.textContent??"").trim().toLowerCase().startsWith(p))?.focus()}else i.key==="Escape"?(i.preventDefault(),this.toggle(!1),this.trigger?.focus()):i.key==="Tab"&&this.toggle(!1)}choose(i,r){if(i.disabled){r?.preventDefault();return}this.toggle(!1),this.trigger?.focus(),i.href||this.dispatchEvent(new CustomEvent("impakt-select",{detail:{value:i.value??i.text},bubbles:!0,composed:!0}))}renderItem(i){let r=i.meta||(i.current?S("You are here"):""),s=n`${M(i.icon,"18px")}<span class="text" part="label">${i.text}</span>${r?n`<span class="meta" part="meta">${r}</span>`:d}`,c=`item ${i.tone==="danger"?"danger":""}`,p=i.current?"page":d,m=i.disabled?"true":d,g=i.current?"item current":"item";return n`<li role="none">${i.href&&!i.disabled?n`<a class=${c} part=${g} role="menuitem" tabindex="-1" href=${i.href} aria-current=${p} @click=${f=>this.choose(i,f)}>${s}</a>`:n`<button class=${c} part=${g} role="menuitem" tabindex="-1" type="button" aria-current=${p} aria-disabled=${m} @click=${f=>this.choose(i,f)}>${s}</button>`}</li>`}get runs(){let i=[];for(let r of this.items??[]){let s=r.group??"",c=i[i.length-1],p=s?i.find(m=>m.group===s):void 0;p?p.items.push(r):c&&!s&&!c.group?c.items.push(r):i.push({group:s,items:[r]})}return i}render(){let i=this.triggerLook==="text",r=this.runs,s=r.some(c=>c.group);return n`<button class="trigger" part="trigger" type="button" aria-haspopup="menu" aria-expanded=${String(this.open)} aria-controls=${this.id_("list")}
|
|
3121
|
+
@click=${()=>this.toggle(!this.open)} @keydown=${this.triggerKey}><slot name="trigger">${M(this.icon,"18px")}${this.label}</slot>${i?n`<span class="caret" part="chevron" aria-hidden="true">${this.open?"\u25B4":"\u25BE"}</span>`:n`<span class="chev" part="chevron">${M("chevron-down","16px")}</span>`}</button>
|
|
3122
|
+
${this.open?n`<div class="panel" part="panel">${this.querySelector?.(':scope > [slot="header"]')?n`<div class="header" part="header"><slot name="header"></slot></div>`:d}<ul class="list" part="list" id=${this.id_("list")} role="menu" aria-label=${this.label} @keydown=${this.listKey}>
|
|
3123
|
+
${s?r.map((c,p)=>{let m=this.id_(`group-${p}`);return n`<li role="none" class="grouped" part="group">${c.group?n`<span class="group-label" id=${m} part="group-label">${c.group}</span>`:d}<ul class="group" role="group" aria-labelledby=${c.group?m:d}>${c.items.map(g=>this.renderItem(g))}</ul></li>`}):(this.items??[]).map(c=>this.renderItem(c))}
|
|
3124
|
+
</ul></div>`:d}`}};function la(o,e){let i=[...new Set([1,o-1,o,o+1,e])].filter(r=>r>=1&&r<=e).sort((r,s)=>r-s);return i.flatMap((r,s)=>{let c=i[s-1];return c===void 0||r===c+1?[r]:r===c+2?[c+1,r]:["gap",r]})}var Ot=class extends h{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=[...h.styles,v,I(".n, .step"),u`
|
|
3047
3125
|
:host { display: block; container-type: inline-size; }
|
|
3048
3126
|
nav { display: flex; align-items: center; justify-content: space-between; gap: ${a(2)}; }
|
|
3049
3127
|
ul { display: flex; align-items: center; gap: ${a(1)}; margin: 0; padding: 0; list-style: none; }
|
|
3050
|
-
.n, .step { ${
|
|
3128
|
+
.n, .step { ${E} box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: ${a(1.5)}; min-inline-size: 44px; padding: 0 ${a(2.5)}; font: inherit; ${w("sm")} font-weight: ${b("medium")}; color: ${t.text}; text-decoration: none; background: none; border: 0; border-radius: ${t.radiusLg}; cursor: pointer; }
|
|
3051
3129
|
.n:hover, .step:hover { background: ${t.surfaceSubtle}; }
|
|
3052
|
-
.n[aria-current] { color: ${t.onBrand}; background: ${t.brand}; font-weight: ${
|
|
3130
|
+
.n[aria-current] { color: ${t.onBrand}; background: ${t.brand}; font-weight: ${b("semibold")}; }
|
|
3053
3131
|
.step[aria-disabled='true'] { color: ${t.textMuted}; opacity: 0.55; background: none; cursor: not-allowed; }
|
|
3054
3132
|
.gap { color: ${t.textMuted}; padding: 0 ${a(1)}; }
|
|
3055
3133
|
.count { display: none; ${w("sm")} color: ${t.textMuted}; }
|
|
3056
3134
|
@container (max-width: 34rem) { ul { display: none; } .count { display: block; } }
|
|
3057
|
-
`]}go(e,i){this.hrefPattern||(i.preventDefault(),this.page=e,this.dispatchEvent(new CustomEvent("impakt-page",{detail:{page:e},bubbles:!0,composed:!0})))}link(e,i,r,
|
|
3135
|
+
`]}go(e,i){this.hrefPattern||(i.preventDefault(),this.page=e,this.dispatchEvent(new CustomEvent("impakt-page",{detail:{page:e},bubbles:!0,composed:!0})))}link(e,i,r,s,c){return this.hrefPattern?n`<a class=${i} href=${this.hrefPattern.replace("{page}",String(e))} aria-label=${s} aria-current=${c?"page":d}>${r}</a>`:n`<button class=${i} type="button" aria-label=${s} aria-current=${c?"page":d} @click=${p=>this.go(e,p)}>${r}</button>`}step(e,i,r,s){let c=r==="arrow-left"?n`${M(r,"16px")}${i}`:n`${i}${M(r,"16px")}`;return s?n`<span class="step" aria-disabled="true">${c}</span>`:this.link(e,"step",c,i,!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">
|
|
3058
3136
|
${this.step(e-1,this.previousText,"arrow-left",e<=1)}
|
|
3059
|
-
<ul>${
|
|
3137
|
+
<ul>${la(e,this.pages).map(i=>n`<li>${i==="gap"?n`<span class="gap" aria-hidden="true">…</span>`:this.link(i,"n",i,S("Page {page}",{page:i}),i===e)}</li>`)}</ul>
|
|
3060
3138
|
<span class="count">${S("Page {page} of {pages}",{page:e,pages:this.pages})}</span>
|
|
3061
3139
|
${this.step(e+1,this.nextText,"arrow-right",e>=this.pages)}
|
|
3062
|
-
</nav>`}},
|
|
3140
|
+
</nav>`}},da=o=>{let e=o.trim().split(/\s+/).filter(Boolean);return((e[0]?.[0]??"")+(e.length>1?e[e.length-1][0]:"")).toUpperCase()},Dt=class extends h{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=[...h.styles,u`
|
|
3063
3141
|
:host { --size: 40px; display: inline-block; inline-size: var(--size); block-size: var(--size); vertical-align: middle; }
|
|
3064
3142
|
:host([size='xs']) { --size: 22px; }
|
|
3065
3143
|
:host([size='sm']) { --size: 32px; }
|
|
3066
3144
|
:host([size='lg']) { --size: 56px; }
|
|
3067
3145
|
:host([size='xl']) { --size: 80px; }
|
|
3068
|
-
.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: ${
|
|
3146
|
+
.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: ${b("semibold")}; }
|
|
3069
3147
|
img { inline-size: 100%; block-size: 100%; object-fit: cover; }
|
|
3070
|
-
`]}willUpdate(i){i.has("src")&&(this.failed=!1)}render(){return this.src&&!this.failed?
|
|
3148
|
+
`]}willUpdate(i){i.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||S("Person")}>${da(this.fullName)||M("user","55%")}</div>`}},qt=class extends h{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=[...h.styles,u`
|
|
3071
3149
|
ul { display: flex; margin: 0; padding: 0; list-style: none; }
|
|
3072
3150
|
li { margin-inline-start: -${a(2.5)}; border-radius: 50%; box-shadow: 0 0 0 2px ${t.surfaceCard}; line-height: 0; }
|
|
3073
3151
|
li:first-child { margin-inline-start: 0; }
|
|
3074
|
-
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${w("xs")} line-height: 1; font-weight: ${
|
|
3152
|
+
.more { display: flex; align-items: center; justify-content: center; inline-size: 40px; block-size: 40px; ${w("xs")} line-height: 1; font-weight: ${b("semibold")}; color: ${t.text}; background: ${t.surfaceSubtle}; border-radius: 50%; }
|
|
3075
3153
|
:host([size='sm']) .more { inline-size: 32px; block-size: 32px; }
|
|
3076
3154
|
:host([size='xs']) li { margin-inline-start: -${a(1)}; box-shadow: 0 0 0 1px ${t.text}; }
|
|
3077
3155
|
:host([size='xs']) li:first-child { margin-inline-start: 0; }
|
|
3078
3156
|
:host([size='xs']) .more { inline-size: 22px; block-size: 22px; font-size: 10px; }
|
|
3079
3157
|
:host([size='lg']) .more { inline-size: 56px; block-size: 56px; }
|
|
3080
3158
|
.sr { ${T} }
|
|
3081
|
-
`]}render(){let e=this.items.slice(0,this.max),i=this.items.length-e.length;return
|
|
3082
|
-
${e.map(r=>
|
|
3083
|
-
${i>0?
|
|
3084
|
-
</ul>`}},
|
|
3159
|
+
`]}render(){let e=this.items.slice(0,this.max),i=this.items.length-e.length;return n`<ul part="list">
|
|
3160
|
+
${e.map(r=>n`<li><impakt-avatar full-name=${r.name} src=${r.src??""} size=${this.size}></impakt-avatar></li>`)}
|
|
3161
|
+
${i>0?n`<li><span class="more"><span aria-hidden="true">+${i}</span><span class="sr">${i} ${this.moreLabel}</span></span></li>`:d}
|
|
3162
|
+
</ul>`}},Ft=class extends h{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=[...h.styles,D,u`
|
|
3085
3163
|
.wrap { display: flex; flex-direction: column; align-items: center; gap: ${a(2)}; padding: ${a(12)} ${a(6)}; text-align: center; }
|
|
3086
3164
|
:host([framed]) .wrap { border: ${t.borderThin} dashed ${t.border}; border-radius: ${t.radiusXl}; }
|
|
3087
3165
|
.mark { display: inline-flex; align-items: center; justify-content: center; inline-size: 56px; block-size: 56px; margin-block-end: ${a(2)}; color: ${t.brand}; background: ${t.brandSubtle}; border-radius: 50%; }
|
|
3088
|
-
.h { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${
|
|
3166
|
+
.h { margin: 0; font-family: ${t.fontHeading}; ${w("xl")} font-weight: ${b("bold")}; color: ${t.textHeading}; }
|
|
3089
3167
|
p { margin: 0; max-inline-size: 42ch; color: ${t.textMuted}; text-wrap: pretty; }
|
|
3090
3168
|
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: ${a(3)}; margin-block-start: ${a(3)}; }
|
|
3091
|
-
`]}render(){return
|
|
3169
|
+
`]}render(){return n`<div class="wrap" part="wrap">
|
|
3092
3170
|
<span class="mark">${M(this.icon,"26px")}</span>
|
|
3093
|
-
${this.heading?
|
|
3094
|
-
${this.lead?
|
|
3171
|
+
${this.heading?n`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:d}
|
|
3172
|
+
${this.lead?n`<p>${this.lead}</p>`:d}
|
|
3095
3173
|
<div class="actions"><slot name="actions"></slot></div>
|
|
3096
|
-
</div>`}},
|
|
3174
|
+
</div>`}},ca=o=>String(o?.times??"").split(",").map(e=>e.trim()).filter(Boolean);function pa(o){let e=new Date(`${o}T00:00:00Z`);if(Number.isNaN(e.getTime()))return{weekday:"",day:o,month:""};let i=U(),r=s=>new Intl.DateTimeFormat(i,{timeZone:"UTC",...s}).format(e);return{weekday:r({weekday:"short"}),day:r({day:"numeric"}),month:r({month:"short"})}}var jt=class extends y{constructor(){super();this.day="";this.days=[],this.dayLabel="Day",this.timeLabel="Time",this.emptyText="No times are available at the moment."}static{this.properties={...y.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=[...y.styles,u`
|
|
3097
3175
|
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
|
|
3098
3176
|
legend { padding: 0; }
|
|
3099
3177
|
.row-label { ${w("sm")} color: ${t.textMuted}; margin-block: ${a(2)}; }
|
|
@@ -3106,25 +3184,25 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3106
3184
|
input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
|
|
3107
3185
|
.day { flex: none; inline-size: 4.5rem; padding-block: ${a(2.5)}; }
|
|
3108
3186
|
.weekday, .month { ${w("xs")} }
|
|
3109
|
-
.num { ${w("xl")} font-weight: ${
|
|
3110
|
-
.time { padding: ${a(2)}; ${w("sm")} font-weight: ${
|
|
3187
|
+
.num { ${w("xl")} font-weight: ${b("semibold")}; }
|
|
3188
|
+
.time { padding: ${a(2)}; ${w("sm")} font-weight: ${b("medium")}; }
|
|
3111
3189
|
.empty { margin: 0; color: ${t.textMuted}; }
|
|
3112
3190
|
:host([invalid]) .days label, :host([invalid]) .times label { box-shadow: inset 0 0 0 1px ${t.danger}; }
|
|
3113
|
-
`]}get currentDay(){let i=this.day||this.value.split("T")[0];return this.days.find(r=>r.date===i)??this.days[0]}chooseDay(i){this.day=i,this.value&&!this.value.startsWith(`${i}T`)&&this.setFormValue(""),this.requestUpdate()}renderLabel(){return
|
|
3191
|
+
`]}get currentDay(){let i=this.day||this.value.split("T")[0];return this.days.find(r=>r.date===i)??this.days[0]}chooseDay(i){this.day=i,this.value&&!this.value.startsWith(`${i}T`)&&this.setFormValue(""),this.requestUpdate()}renderLabel(){return n`<legend class="label" part="label">${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}</legend>`}renderControl(){let i=this.currentDay;return i?n`
|
|
3114
3192
|
<div class="row-label" id=${this.id_("days")}>${this.dayLabel}</div>
|
|
3115
3193
|
<div class="days" part="days" role="radiogroup" aria-labelledby=${this.id_("days")}>
|
|
3116
|
-
${this.days.map(r=>{let
|
|
3117
|
-
<span class="weekday">${
|
|
3194
|
+
${this.days.map(r=>{let s=pa(r.date);return n`<label class="day"><input type="radio" name=${`${this.uid}-day`} .checked=${r.date===i.date} ?disabled=${this.disabled} @change=${()=>this.chooseDay(r.date)} />
|
|
3195
|
+
<span class="weekday">${s.weekday}</span><span class="num">${s.day}</span><span class="month">${s.month}</span></label>`})}
|
|
3118
3196
|
</div>
|
|
3119
3197
|
<div class="row-label" id=${this.id_("times")}>${this.timeLabel}</div>
|
|
3120
3198
|
<div class="times" part="times" role="radiogroup" aria-labelledby=${this.id_("times")}>
|
|
3121
|
-
${
|
|
3122
|
-
</div>`:
|
|
3199
|
+
${ca(i).map((r,s)=>{let c=`${i.date}T${r}`;return n`<label class="time"><input type="radio" name=${`${this.uid}-time`} .checked=${this.value===c} ?required=${this.required&&s===0} ?disabled=${this.disabled} @change=${()=>this.setFormValue(c)} />${r}</label>`})}
|
|
3200
|
+
</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":d}>
|
|
3123
3201
|
${this.renderLabel()}
|
|
3124
|
-
${this.description?
|
|
3202
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:d}
|
|
3125
3203
|
${this.renderControl()}
|
|
3126
|
-
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||
|
|
3127
|
-
</fieldset>`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-drawer",
|
|
3204
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||d}</div>
|
|
3205
|
+
</fieldset>`}updated(i){i.has("error")&&this.toggleAttribute("invalid",!!this.error)}};customElements.define("impakt-drawer",Bt);customElements.define("impakt-toast",Nt);customElements.define("impakt-menu",Pt);customElements.define("impakt-pagination",Ot);customElements.define("impakt-avatar",Dt);customElements.define("impakt-avatar-group",qt);customElements.define("impakt-empty-state",Ft);customElements.define("impakt-slot-picker",jt);var Ci=u`
|
|
3128
3206
|
input, select {
|
|
3129
3207
|
box-sizing: border-box;
|
|
3130
3208
|
inline-size: min(100%, var(--impakt-field-width));
|
|
@@ -3132,7 +3210,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3132
3210
|
padding: ${a(2.5)} ${a(3)};
|
|
3133
3211
|
font: inherit;
|
|
3134
3212
|
/* 16px whatever the page around it sets, so a phone does not zoom in on focus. */
|
|
3135
|
-
font-size: max(${
|
|
3213
|
+
font-size: max(${$("md")}, 16px);
|
|
3136
3214
|
color: ${t.text};
|
|
3137
3215
|
background: ${t.surfaceCard};
|
|
3138
3216
|
border: ${t.borderThin} solid ${t.border};
|
|
@@ -3144,7 +3222,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3144
3222
|
min-block-size: 44px;
|
|
3145
3223
|
padding: ${a(2.5)} ${a(4)};
|
|
3146
3224
|
font: inherit;
|
|
3147
|
-
font-weight: ${
|
|
3225
|
+
font-weight: ${b("semibold")};
|
|
3148
3226
|
color: ${t.onBrand};
|
|
3149
3227
|
background: ${t.brand};
|
|
3150
3228
|
border: 0;
|
|
@@ -3154,9 +3232,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3154
3232
|
.btn:hover { background: ${t.brandHover}; }
|
|
3155
3233
|
.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; }
|
|
3156
3234
|
.visually-hidden { ${T} }
|
|
3157
|
-
`,
|
|
3235
|
+
`,Z=class extends y{static{this.properties={...y.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=[...y.styles,K,Ci,u`
|
|
3158
3236
|
.row { display: flex; flex-wrap: wrap; gap: ${a(2)}; align-items: flex-end; }
|
|
3159
|
-
.row label { display: block; ${w("sm")} font-weight: ${
|
|
3237
|
+
.row label { display: block; ${w("sm")} font-weight: ${b("semibold")}; margin-block-end: ${a(1)}; }
|
|
3160
3238
|
.postcode input { inline-size: 12ch; text-transform: uppercase; }
|
|
3161
3239
|
.choose { margin-block-start: ${a(4)}; }
|
|
3162
3240
|
.choose select { inline-size: 100%; }
|
|
@@ -3165,13 +3243,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3165
3243
|
.manual input { inline-size: 100%; }
|
|
3166
3244
|
.note { ${w("sm")} color: ${t.textMuted}; margin: ${a(2)} 0 0; }
|
|
3167
3245
|
.switch { margin-block-start: ${a(3)}; }
|
|
3168
|
-
`]}async find(){let e=this.postcode.trim().toUpperCase();if(e){if(this.dispatchEvent(new CustomEvent("impakt-lookup",{detail:{postcode:e},bubbles:!0,composed:!0})),!this.lookupUrl){this.searched=!0;return}this.busy=!0;try{let i=new URL(this.lookupUrl,globalThis.location?.href);i.searchParams.set("postcode",e);let r=await(await fetch(i)).json();this.addresses=Array.isArray(r)?r:[]}catch{this.addresses=[]}finally{this.busy=!1,this.searched=!0}}}manualLine(){return["line1","line2","town","mpostcode"].map(i=>(this.renderRoot.querySelector(`#${this.id_(i)}`)?.value??"").trim()).filter(Boolean).join(", ")}renderControl(){if(this.manual){let e=(i,r,
|
|
3246
|
+
`]}async find(){let e=this.postcode.trim().toUpperCase();if(e){if(this.dispatchEvent(new CustomEvent("impakt-lookup",{detail:{postcode:e},bubbles:!0,composed:!0})),!this.lookupUrl){this.searched=!0;return}this.busy=!0;try{let i=new URL(this.lookupUrl,globalThis.location?.href);i.searchParams.set("postcode",e);let r=await(await fetch(i)).json();this.addresses=Array.isArray(r)?r:[]}catch{this.addresses=[]}finally{this.busy=!1,this.searched=!0}}}manualLine(){return["line1","line2","town","mpostcode"].map(i=>(this.renderRoot.querySelector(`#${this.id_(i)}`)?.value??"").trim()).filter(Boolean).join(", ")}renderControl(){if(this.manual){let e=(i,r,s)=>n`<div><label for=${this.id_(i)}>${r}</label><input id=${this.id_(i)} autocomplete=${s} @input=${()=>this.setFormValue(this.manualLine())} /></div>`;return n`<div class="manual" role="group" aria-label=${this.label}>
|
|
3169
3247
|
${e("line1",S("Building and street"),"address-line1")}
|
|
3170
3248
|
${e("line2",S("Second line (optional)"),"address-line2")}
|
|
3171
3249
|
${e("town",S("Town or city"),"address-level2")}
|
|
3172
3250
|
${e("mpostcode",S("Postcode"),"postal-code")}
|
|
3173
3251
|
<button class="quiet switch" type="button" @click=${()=>{this.manual=!1}}>${S("Find the address from the postcode")}</button>
|
|
3174
|
-
</div>`}return
|
|
3252
|
+
</div>`}return n`
|
|
3175
3253
|
<div class="row">
|
|
3176
3254
|
<div class="postcode"><label for=${this.controlId}>${this.postcodeLabel}</label>
|
|
3177
3255
|
<input id=${this.controlId} autocomplete="postal-code" .value=${this.postcode} aria-describedby=${this.describedBy}
|
|
@@ -3179,23 +3257,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3179
3257
|
@keydown=${e=>{e.key==="Enter"&&(e.preventDefault(),this.find())}} /></div>
|
|
3180
3258
|
<button class="btn" type="button" ?disabled=${this.busy} @click=${()=>this.find()}>${this.busy?"Finding\u2026":this.findText}</button>
|
|
3181
3259
|
</div>
|
|
3182
|
-
${this.addresses.length?
|
|
3260
|
+
${this.addresses.length?n`<div class="choose"><label class="label" for=${this.id_("choose")}>${this.chooseLabel}</label>
|
|
3183
3261
|
<select id=${this.id_("choose")} @change=${e=>this.setFormValue(e.target.value)}>
|
|
3184
3262
|
<option value="">${this.addresses.length} ${this.addresses.length===1?"address":"addresses"} found</option>
|
|
3185
|
-
${this.addresses.map(e=>
|
|
3186
|
-
</select></div>`:this.searched&&!this.busy?
|
|
3263
|
+
${this.addresses.map(e=>n`<option value=${e.line} ?selected=${e.line===this.value}>${e.line}</option>`)}
|
|
3264
|
+
</select></div>`:this.searched&&!this.busy?n`<p class="note" role="status">${this.notFoundText}</p>`:d}
|
|
3187
3265
|
<button class="quiet switch" type="button" @click=${()=>{this.manual=!0}}>${this.manualText}</button>
|
|
3188
|
-
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
3266
|
+
`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Wt=class extends h{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=[...h.styles,v,D,I("a"),u`
|
|
3189
3267
|
:host { display: block; }
|
|
3190
3268
|
.box { padding: ${a(5)}; border: ${t.borderThick} solid ${t.danger}; border-inline-start-width: 6px; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
3191
3269
|
.box:focus { outline: 3px solid ${t.danger}; outline-offset: 2px; }
|
|
3192
|
-
h2 { margin: 0 0 ${a(3)}; ${w("lg")} font-weight: ${
|
|
3270
|
+
h2 { margin: 0 0 ${a(3)}; ${w("lg")} font-weight: ${b("bold")}; color: ${t.text}; }
|
|
3193
3271
|
ul { margin: 0; padding: 0; list-style: none; display: grid; gap: ${a(2)}; }
|
|
3194
|
-
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.dangerText}; font-weight: ${
|
|
3195
|
-
`]}go(e,i){let r=i.replace(/^#/,""),c=this.getRootNode().querySelector?.(`#${CSS.escape(r)}`)??document.getElementById(r);c&&(e.preventDefault(),c.scrollIntoView({block:"center"}),c.focus())}updated(e){let i=e.get("items");e.has("items")&&this.items.length&&!i?.length&&this.renderRoot.querySelector(".box")?.focus()}render(){return this.items.length?
|
|
3272
|
+
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.dangerText}; font-weight: ${b("semibold")}; text-underline-offset: 0.2em; }
|
|
3273
|
+
`]}go(e,i){let r=i.replace(/^#/,""),c=this.getRootNode().querySelector?.(`#${CSS.escape(r)}`)??document.getElementById(r);c&&(e.preventDefault(),c.scrollIntoView({block:"center"}),c.focus())}updated(e){let i=e.get("items");e.has("items")&&this.items.length&&!i?.length&&this.renderRoot.querySelector(".box")?.focus()}render(){return this.items.length?n`<div class="box" role="alert" tabindex="-1" aria-labelledby=${this.id_("h")} part="box">
|
|
3196
3274
|
<h2 id=${this.id_("h")}>${this.heading}</h2>
|
|
3197
|
-
<ul>${this.items.map(e=>
|
|
3198
|
-
</div>`:
|
|
3275
|
+
<ul>${this.items.map(e=>n`<li><a href=${e.href} @click=${i=>this.go(i,e.href)}>${e.text}</a></li>`)}</ul>
|
|
3276
|
+
</div>`:d}},ha=o=>o>=1048576?S("{size} MB",{size:(o/1048576).toFixed(1)}):S("{size} KB",{size:Math.max(1,Math.round(o/1024))}),oe=class extends y{static{this.properties={...y.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=[...y.styles,Ci,E,I("label.btn, .quiet"),u`
|
|
3199
3277
|
.zone { display: flex; flex-wrap: wrap; align-items: center; gap: ${a(3)}; padding: ${a(5)}; border: 2px dashed ${t.border}; border-radius: ${t.radiusLg}; background: ${t.surfaceCard}; }
|
|
3200
3278
|
.zone.over { border-color: ${t.brand}; background: ${t.brandSubtle}; }
|
|
3201
3279
|
:host([invalid]) .zone { border-color: ${t.danger}; border-style: solid; }
|
|
@@ -3207,62 +3285,62 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3207
3285
|
ul { margin: ${a(3)} 0 0; padding: 0; list-style: none; display: grid; gap: ${a(2)}; }
|
|
3208
3286
|
li { display: flex; justify-content: space-between; gap: ${a(3)}; align-items: center; padding: ${a(2)} ${a(3)}; border-radius: ${t.radius}; background: ${t.surfaceInset}; }
|
|
3209
3287
|
.size { color: ${t.textMuted}; ${w("sm")} }
|
|
3210
|
-
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return S("{file} is bigger than {size} MB",{file:e.name,size:this.maxSizeMb});let i=this.accept.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);return i.length&&!i.some(r=>r.startsWith(".")?e.name.toLowerCase().endsWith(r):e.type===r||r.endsWith("/*")&&e.type.startsWith(r.slice(0,-1)))?S("{file} must be {kinds}",{file:e.name,kinds:i.map(r=>r.replace(".","").toUpperCase()).join(", ")}):null}add(e){let i=Array.from(e),r=i.map(p=>this.fits(p)).filter(p=>!!p),
|
|
3288
|
+
`]}fits(e){if(this.maxSizeMb&&e.size>this.maxSizeMb*1048576)return S("{file} is bigger than {size} MB",{file:e.name,size:this.maxSizeMb});let i=this.accept.split(",").map(r=>r.trim().toLowerCase()).filter(Boolean);return i.length&&!i.some(r=>r.startsWith(".")?e.name.toLowerCase().endsWith(r):e.type===r||r.endsWith("/*")&&e.type.startsWith(r.slice(0,-1)))?S("{file} must be {kinds}",{file:e.name,kinds:i.map(r=>r.replace(".","").toUpperCase()).join(", ")}):null}add(e){let i=Array.from(e),r=i.map(p=>this.fits(p)).filter(p=>!!p),s=i.filter(p=>!this.fits(p)),c=this.manyFiles?s:s.slice(0,1);this.files=this.manyFiles?[...this.files,...s]:c.length?c:this.files,this.error=r.join(". "),this.said=c.map(p=>S("{file} added",{file:p.name})).join(". "),this.sync()}removeFile(e){let i=this.files[e];this.files=this.files.filter((r,s)=>s!==e),this.said=i?S("{file} removed",{file:i.name}):"",this.sync(),this.updateComplete.then(()=>this.renderRoot.querySelector('input[type="file"]')?.focus())}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}sync(){this.setFormValue(this.files.map(e=>e.name).join(", ")),this.dispatchEvent(new CustomEvent("impakt-files",{detail:{files:this.files},bubbles:!0,composed:!0}))}renderControl(){return n`
|
|
3211
3289
|
<div class="zone ${this.over?"over":""}"
|
|
3212
3290
|
@dragover=${e=>{e.preventDefault(),this.over=!0}}
|
|
3213
3291
|
@dragleave=${()=>{this.over=!1}}
|
|
3214
3292
|
@drop=${e=>{e.preventDefault(),this.over=!1,e.dataTransfer?.files&&this.add(e.dataTransfer.files)}}>
|
|
3215
|
-
<input id=${this.controlId} type="file" accept=${this.accept||
|
|
3293
|
+
<input id=${this.controlId} type="file" accept=${this.accept||d} ?multiple=${this.manyFiles} ?disabled=${this.disabled} ?required=${this.required} aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":d}
|
|
3216
3294
|
@change=${e=>{let i=e.target.files;i&&this.add(i),e.target.value=""}} />
|
|
3217
3295
|
<label class="btn" for=${this.controlId}>${this.chooseText}</label>
|
|
3218
3296
|
<span class="drop">${this.dropText}</span>
|
|
3219
3297
|
</div>
|
|
3220
3298
|
<p class="visually-hidden" role="status">${this.said}</p>
|
|
3221
|
-
${this.files.length?
|
|
3222
|
-
`}};function
|
|
3299
|
+
${this.files.length?n`<ul aria-label=${S("Files added")}>${this.files.map((e,i)=>n`<li><span>${e.name} <span class="size">${ha(e.size)}</span></span><button class="quiet" type="button" @click=${()=>this.removeFile(i)}>${S("Remove")}<span class="visually-hidden"> ${e.name}</span></button></li>`)}</ul>`:d}
|
|
3300
|
+
`}};function Mi(o){try{return new Intl.NumberFormat(U(),{style:"currency",currency:o,maximumFractionDigits:0}).formatToParts(0).find(e=>e.type==="currency")?.value??""}catch{return""}}function Ai(o){let e=o.replace(/[^\d.]/g,"");if(!e)return"";let[i,r]=e.split(".");return`${Number(i).toLocaleString("en-GB")}${r!==void 0?`.${r.slice(0,2)}`:""}`}var Ae=class extends y{static{this.properties={...y.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=[...y.styles,K,Ci,u`
|
|
3223
3301
|
.wrap { display: flex; align-items: stretch; inline-size: min(100%, var(--impakt-field-width)); }
|
|
3224
|
-
.sign { display: flex; align-items: center; padding: 0 ${a(3)}; font-weight: ${
|
|
3302
|
+
.sign { display: flex; align-items: center; padding: 0 ${a(3)}; font-weight: ${b("semibold")}; background: ${t.surfaceInset}; border: ${t.borderThin} solid ${t.border}; border-inline-end: 0; border-radius: ${t.radiusLg} 0 0 ${t.radiusLg}; }
|
|
3225
3303
|
.wrap input { inline-size: 100%; border-radius: 0 ${t.radiusLg} ${t.radiusLg} 0; }
|
|
3226
|
-
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=
|
|
3227
|
-
<span class="sign" id=${this.id_("sign")}>${
|
|
3304
|
+
`]}willUpdate(e){e.has("value")&&this.value!==this.shown.replace(/,/g,"")&&(this.shown=Ai(this.value))}typed(e){let i=e.replace(/[^\d.]/g,""),r=this.pence?i:i.split(".")[0];this.shown=e,this.setFormValue(r)}check(){this.shown=Ai(this.value);let e=Number(this.value);if(!this.value)return;let i=r=>`${Mi(this.currency)}${r.toLocaleString("en-GB")}`;this.lowest!==void 0&&e<this.lowest?this.error=S("Enter an amount of {amount} or more",{amount:i(this.lowest)}):this.highest!==void 0&&e>this.highest?this.error=S("Enter an amount of {amount} or less",{amount:i(this.highest)}):(this.error===S("Enter an amount of {amount} or more",{amount:i(this.lowest??0)})||this.error===S("Enter an amount of {amount} or less",{amount:i(this.highest??0)}))&&(this.error="")}get describedBy(){let e=[Mi(this.currency)?this.id_("sign"):"",super.describedBy===d?"":String(super.describedBy)].filter(Boolean);return e.length?e.join(" "):d}renderControl(){return n`<div class="wrap">
|
|
3305
|
+
<span class="sign" id=${this.id_("sign")}>${Mi(this.currency)}</span>
|
|
3228
3306
|
<input id=${this.controlId} inputmode=${this.pence?"decimal":"numeric"} .value=${this.shown} ?disabled=${this.disabled} ?readonly=${this.readonly} ?required=${this.required}
|
|
3229
|
-
aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":
|
|
3307
|
+
aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":d}
|
|
3230
3308
|
@input=${e=>this.typed(e.target.value)} @blur=${()=>this.check()} />
|
|
3231
|
-
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},
|
|
3309
|
+
</div>`}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error)}},Ut=class extends y{static{this.properties={...y.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=[...y.styles,u`
|
|
3232
3310
|
.top { display: flex; justify-content: space-between; gap: ${a(3)}; }
|
|
3233
|
-
output { font-weight: ${
|
|
3311
|
+
output { font-weight: ${b("semibold")}; color: ${t.text}; }
|
|
3234
3312
|
input { inline-size: 100%; min-block-size: 32px; margin: 0; accent-color: ${t.brand}; }
|
|
3235
3313
|
.ends { display: flex; justify-content: space-between; ${w("sm")} color: ${t.textMuted}; }
|
|
3236
|
-
`]}shownAs(e){let i=
|
|
3237
|
-
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?
|
|
3314
|
+
`]}shownAs(e){let i=U(this),r=e.toLocaleString(i);if(this.currency)try{r=new Intl.NumberFormat(i,{style:"currency",currency:this.currency,maximumFractionDigits:0}).format(e)}catch{}return this.unit?`${r} ${this.unit}`:r}render(){let e=Number(this.value)||0;return n`
|
|
3315
|
+
<div class="top"><label class="label" for=${this.controlId}>${this.label}${this.required?n` <span class="required">(${this.requiredText})</span>`:d}</label>
|
|
3238
3316
|
<output for=${this.controlId}>${this.shownAs(e)}</output></div>
|
|
3239
|
-
${this.description?
|
|
3317
|
+
${this.description?n`<div class="description" id=${this.id_("description")}>${this.description}</div>`:d}
|
|
3240
3318
|
${this.renderControl()}
|
|
3241
3319
|
<div class="ends" aria-hidden="true"><span>${this.shownAs(this.lowest)}</span><span>${this.shownAs(this.highest)}</span></div>
|
|
3242
|
-
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||
|
|
3243
|
-
`}renderControl(){return
|
|
3320
|
+
<div class="error" id=${this.id_("error")} aria-live="polite">${this.error||d}</div>
|
|
3321
|
+
`}renderControl(){return n`<input id=${this.controlId} type="range" min=${this.lowest} max=${this.highest} step=${this.step} .value=${this.value} ?disabled=${this.disabled}
|
|
3244
3322
|
aria-valuetext=${this.shownAs(Number(this.value)||0)} aria-describedby=${this.describedBy}
|
|
3245
|
-
@input=${e=>this.setFormValue(e.target.value)} />`}},
|
|
3323
|
+
@input=${e=>this.setFormValue(e.target.value)} />`}},gr={done:"Completed","in-progress":"In progress","not-started":"Not started","cannot-start":"Cannot start yet"},Vt=class extends h{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=[...h.styles,v,D,I("a"),u`
|
|
3246
3324
|
:host { display: block; }
|
|
3247
|
-
.h { margin: 0 0 ${a(2)}; ${w("xl")} font-weight: ${
|
|
3325
|
+
.h { margin: 0 0 ${a(2)}; ${w("xl")} font-weight: ${b("bold")}; color: ${t.textHeading}; }
|
|
3248
3326
|
.count { margin: 0 0 ${a(4)}; color: ${t.textMuted}; }
|
|
3249
3327
|
ul { margin: 0; padding: 0; list-style: none; border-block-start: 1px solid ${t.rule}; }
|
|
3250
3328
|
li { display: flex; justify-content: space-between; align-items: center; gap: ${a(4)}; padding: ${a(4)} 0; border-block-end: 1px solid ${t.rule}; }
|
|
3251
|
-
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.link}; font-weight: ${
|
|
3252
|
-
.title { font-weight: ${
|
|
3329
|
+
a { display: inline-flex; align-items: center; min-block-size: ${t.targetMin}; color: ${t.link}; font-weight: ${b("semibold")}; text-underline-offset: 0.2em; }
|
|
3330
|
+
.title { font-weight: ${b("semibold")}; }
|
|
3253
3331
|
.hint { display: block; ${w("sm")} color: ${t.textMuted}; }
|
|
3254
|
-
.tag { flex-shrink: 0; padding: ${a(1)} ${a(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); ${w("sm")} font-weight: ${
|
|
3332
|
+
.tag { flex-shrink: 0; padding: ${a(1)} ${a(2.5)}; border-radius: var(--impakt-radius-pill, calc(${t.radius} * 9999)); ${w("sm")} font-weight: ${b("semibold")}; background: ${t.surfaceInset}; color: ${t.text}; }
|
|
3255
3333
|
.tag[data-status='done'] { background: ${t.successSubtle}; color: ${t.successText}; }
|
|
3256
3334
|
.tag[data-status='in-progress'] { background: ${t.brandSubtle}; color: ${t.link}; }
|
|
3257
3335
|
.tag[data-status='cannot-start'] { background: transparent; color: ${t.textMuted}; }
|
|
3258
|
-
`]}render(){let e=this.items.filter(i=>i.status==="done").length;return
|
|
3259
|
-
${this.heading?
|
|
3260
|
-
${this.items.length?
|
|
3261
|
-
<ul>${this.items.map(i=>
|
|
3262
|
-
<span>${i.href&&i.status!=="cannot-start"?
|
|
3263
|
-
${i.hint?
|
|
3264
|
-
<span class="tag" data-status=${i.status} id=${this.id_(`s-${i.id}`)}>${
|
|
3265
|
-
</li>`)}</ul>`}};
|
|
3336
|
+
`]}render(){let e=this.items.filter(i=>i.status==="done").length;return n`
|
|
3337
|
+
${this.heading?n`<div class="h" role="heading" aria-level=${this.headingLevel}>${this.heading}</div>`:d}
|
|
3338
|
+
${this.items.length?n`<p class="count">${S(this.items.length===1?"You have completed {done} of {total} part.":"You have completed {done} of {total} parts.",{done:e,total:this.items.length})}</p>`:d}
|
|
3339
|
+
<ul>${this.items.map(i=>n`<li>
|
|
3340
|
+
<span>${i.href&&i.status!=="cannot-start"?n`<a href=${i.href} aria-describedby=${this.id_(`s-${i.id}`)}>${i.title}</a>`:n`<span class="title">${i.title}</span>`}
|
|
3341
|
+
${i.hint?n`<span class="hint">${i.hint}</span>`:d}</span>
|
|
3342
|
+
<span class="tag" data-status=${i.status} id=${this.id_(`s-${i.id}`)}>${gr[i.status]?S(gr[i.status]):i.status}</span>
|
|
3343
|
+
</li>`)}</ul>`}};Z.createProperty("manual",{state:!0});Z.createProperty("postcode",{state:!0});Z.createProperty("searched",{state:!0});Z.createProperty("busy",{state:!0});oe.createProperty("files",{state:!0});oe.createProperty("over",{state:!0});oe.createProperty("said",{state:!0});Ae.createProperty("shown",{state:!0});customElements.define("impakt-address-lookup",Z);customElements.define("impakt-error-summary",Wt);customElements.define("impakt-file-upload",oe);customElements.define("impakt-money-input",Ae);customElements.define("impakt-range-input",Ut);customElements.define("impakt-task-list",Vt);var Gt=class extends h{static{this.properties={label:{type:String},description:{type:String},href:{type:String},kind:{type:String,reflect:!0},look:{type:String,reflect:!0}}}constructor(){super(),this.label="",this.description="",this.href="",this.kind="static",this.look="default"}static{this.styles=[...h.styles,v,u`
|
|
3266
3344
|
:host {
|
|
3267
3345
|
display: inline-flex;
|
|
3268
3346
|
flex: none;
|
|
@@ -3275,8 +3353,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3275
3353
|
justify-content: center;
|
|
3276
3354
|
padding: 1px 5px;
|
|
3277
3355
|
font-family: ${t.fontMono};
|
|
3278
|
-
font-size: ${
|
|
3279
|
-
font-weight: ${
|
|
3356
|
+
font-size: ${x.small};
|
|
3357
|
+
font-weight: ${x.medium};
|
|
3280
3358
|
line-height: 1.3;
|
|
3281
3359
|
white-space: nowrap;
|
|
3282
3360
|
color: ${t.text};
|
|
@@ -3310,7 +3388,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3310
3388
|
border-color: CanvasText;
|
|
3311
3389
|
}
|
|
3312
3390
|
}
|
|
3313
|
-
`]}press(){this.dispatchEvent(new CustomEvent("impakt-source",{detail:{label:this.label,description:this.description},bubbles:!0,composed:!0}))}render(){let e=this.description?this.description.includes(this.label)?this.description:`${this.label}: ${this.description}`:"",i=e||
|
|
3391
|
+
`]}press(){this.dispatchEvent(new CustomEvent("impakt-source",{detail:{label:this.label,description:this.description},bubbles:!0,composed:!0}))}render(){let e=this.description?this.description.includes(this.label)?this.description:`${this.label}: ${this.description}`:"",i=e||d;return this.href?n`<a class="chip" part="chip" href=${this.href} aria-label=${i}>${this.label}</a>`:this.kind==="button"?n`<button class="chip" part="chip" type="button" aria-label=${i} @click=${this.press}>${this.label}</button>`:e?n`<span class="chip" part="chip"><span aria-hidden="true">${this.label}</span><span class="visually-hidden">${e}</span></span>`:n`<span class="chip" part="chip">${this.label}</span>`}};customElements.define("impakt-source",Gt);var Kt=class extends h{static{this.properties={state:{type:String,reflect:!0},label:{type:String},look:{type:String,reflect:!0},size:{type:String,reflect:!0},verifiedText:{type:String,attribute:"verified-text"},unverifiedText:{type:String,attribute:"unverified-text"}}}constructor(){super(),this.state="verified",this.label="",this.look="default",this.size="tool",this.verifiedText="Checked by code",this.unverifiedText="Not verified \xB7 a person must check"}static{this.styles=[...h.styles,u`
|
|
3314
3392
|
/* It keeps its size in a row, but never grows past its container: at 320 the words wrap inside the mark (1.4.10). */
|
|
3315
3393
|
:host {
|
|
3316
3394
|
display: inline-flex;
|
|
@@ -3325,13 +3403,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3325
3403
|
gap: ${a(2)};
|
|
3326
3404
|
padding: 3px 8px;
|
|
3327
3405
|
font-family: ${t.fontMono};
|
|
3328
|
-
font-size: ${
|
|
3329
|
-
font-weight: ${
|
|
3406
|
+
font-size: ${x.small};
|
|
3407
|
+
font-weight: ${x.medium};
|
|
3330
3408
|
line-height: 1.3;
|
|
3331
3409
|
overflow-wrap: anywhere;
|
|
3332
|
-
color: ${
|
|
3333
|
-
background: ${
|
|
3334
|
-
border: 1px solid ${
|
|
3410
|
+
color: ${x.onInverse};
|
|
3411
|
+
background: ${x.inverse};
|
|
3412
|
+
border: 1px solid ${x.inverse};
|
|
3335
3413
|
border-radius: 0;
|
|
3336
3414
|
}
|
|
3337
3415
|
.mark {
|
|
@@ -3341,10 +3419,10 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3341
3419
|
block-size: 14px;
|
|
3342
3420
|
}
|
|
3343
3421
|
.box {
|
|
3344
|
-
fill: ${
|
|
3422
|
+
fill: ${x.ok};
|
|
3345
3423
|
}
|
|
3346
3424
|
.tick {
|
|
3347
|
-
stroke: ${
|
|
3425
|
+
stroke: ${x.onOk};
|
|
3348
3426
|
}
|
|
3349
3427
|
:host([state='unverified']) .label {
|
|
3350
3428
|
color: ${t.text};
|
|
@@ -3371,7 +3449,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3371
3449
|
stroke: #111111;
|
|
3372
3450
|
}
|
|
3373
3451
|
:host([size='marketing']) .label {
|
|
3374
|
-
font-size: ${
|
|
3452
|
+
font-size: ${x.tiny};
|
|
3375
3453
|
text-transform: uppercase;
|
|
3376
3454
|
letter-spacing: 0.06em;
|
|
3377
3455
|
}
|
|
@@ -3387,18 +3465,18 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3387
3465
|
stroke: CanvasText;
|
|
3388
3466
|
}
|
|
3389
3467
|
}
|
|
3390
|
-
`]}render(){let e=this.state!=="unverified",i=e?
|
|
3468
|
+
`]}render(){let e=this.state!=="unverified",i=e?n`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3391
3469
|
<rect class="box" width="14" height="14"></rect>
|
|
3392
3470
|
<path class="tick" d="M3 7.5 6 10.5 11 3.5" fill="none" stroke-width="1.5"></path>
|
|
3393
|
-
</svg>`:
|
|
3471
|
+
</svg>`:n`<svg class="mark" part="mark" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
|
3394
3472
|
<rect class="box" x="0.5" y="0.5" width="13" height="13" stroke-width="1"></rect>
|
|
3395
3473
|
<path class="tick" d="M3.5 3.5 10.5 10.5M10.5 3.5 3.5 10.5" fill="none" stroke-width="1.5"></path>
|
|
3396
|
-
</svg>`,r=this.label||(e?this.verifiedText:this.unverifiedText);return
|
|
3474
|
+
</svg>`,r=this.label||(e?this.verifiedText:this.unverifiedText);return n`<span class="label" part="label">${i}<span class="text"><slot>${r}</slot></span></span>`}};customElements.define("impakt-checked",Kt);var ua=["trigger","chevron","panel","header","list","group","group-label","item","current","label","meta"],br=o=>ua.map(e=>`${e}: ${o}-${e}`).join(", "),ma=br("switcher"),ga=br("organisation"),Xt=class extends h{static{this.properties={tool:{type:String},home:{type:String},brand:{type:String},links:{type:Array},pagesLabel:{type:String,attribute:"pages-label"},switcher:{type:Array},switcherLabel:{type:String,attribute:"switcher-label"},toolsHref:{type:String,attribute:"tools-href"},organisation:{type:String},organisationItems:{type:Array,attribute:"organisation-items"},organisationHref:{type:String,attribute:"organisation-href"},signedOut:{type:Boolean,reflect:!0,attribute:"signed-out"},signInHref:{type:String,attribute:"sign-in-href"},signInText:{type:String,attribute:"sign-in-text"}}}constructor(){super(),this.tool="",this.home="/",this.brand="impakt",this.links=[],this.pagesLabel="Tool pages",this.switcher=[],this.switcherLabel="All tools",this.toolsHref="",this.organisation="Your organisation",this.organisationItems=[],this.organisationHref="",this.signedOut=!1,this.signInHref="/sign-in",this.signInText="Sign in"}static{this.styles=[...h.styles,v,I(".home, .pages a, .sign-in, a.org, .all"),u`
|
|
3397
3475
|
:host {
|
|
3398
3476
|
display: block;
|
|
3399
3477
|
container-type: inline-size;
|
|
3400
3478
|
font-family: ${t.fontBody};
|
|
3401
|
-
font-size: ${
|
|
3479
|
+
font-size: ${x.small};
|
|
3402
3480
|
}
|
|
3403
3481
|
.bar {
|
|
3404
3482
|
display: grid;
|
|
@@ -3410,7 +3488,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3410
3488
|
padding: ${a(2)} ${a(4)};
|
|
3411
3489
|
color: ${t.text};
|
|
3412
3490
|
background: ${t.surfaceCard};
|
|
3413
|
-
border-block-end: 1px solid ${
|
|
3491
|
+
border-block-end: 1px solid ${l("color.line.grid","light-dark(#DCDCD8, #1F1F1F)")};
|
|
3414
3492
|
}
|
|
3415
3493
|
.start {
|
|
3416
3494
|
grid-area: start;
|
|
@@ -3437,9 +3515,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3437
3515
|
flex: none;
|
|
3438
3516
|
inline-size: 28px;
|
|
3439
3517
|
block-size: 28px;
|
|
3440
|
-
font-weight: ${
|
|
3441
|
-
color: ${
|
|
3442
|
-
background: ${
|
|
3518
|
+
font-weight: ${x.medium};
|
|
3519
|
+
color: ${x.onInverse};
|
|
3520
|
+
background: ${x.inverse};
|
|
3443
3521
|
}
|
|
3444
3522
|
.sep {
|
|
3445
3523
|
color: ${t.textMuted};
|
|
@@ -3463,7 +3541,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3463
3541
|
padding: 3px;
|
|
3464
3542
|
list-style: none;
|
|
3465
3543
|
background: ${t.surfaceSubtle};
|
|
3466
|
-
border: 1px solid ${
|
|
3544
|
+
border: 1px solid ${x.lineSoft};
|
|
3467
3545
|
}
|
|
3468
3546
|
.pages a {
|
|
3469
3547
|
display: inline-flex;
|
|
@@ -3471,7 +3549,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3471
3549
|
gap: ${a(1.5)};
|
|
3472
3550
|
min-block-size: 28px;
|
|
3473
3551
|
padding: 0 ${a(2.5)};
|
|
3474
|
-
font-weight: ${
|
|
3552
|
+
font-weight: ${x.regular};
|
|
3475
3553
|
color: ${t.textMuted};
|
|
3476
3554
|
text-decoration: none;
|
|
3477
3555
|
white-space: nowrap;
|
|
@@ -3483,7 +3561,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3483
3561
|
.pages a[aria-current='page'] {
|
|
3484
3562
|
color: ${t.text};
|
|
3485
3563
|
background: ${t.surfaceCard};
|
|
3486
|
-
border-color: ${
|
|
3564
|
+
border-color: ${x.lineSoft};
|
|
3487
3565
|
}
|
|
3488
3566
|
.dot {
|
|
3489
3567
|
inline-size: 5px;
|
|
@@ -3514,8 +3592,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3514
3592
|
impakt-menu.switcher::part(trigger) {
|
|
3515
3593
|
padding: ${a(1)} ${a(1)};
|
|
3516
3594
|
font-family: ${t.fontBody};
|
|
3517
|
-
font-size: ${
|
|
3518
|
-
font-weight: ${
|
|
3595
|
+
font-size: ${x.small};
|
|
3596
|
+
font-weight: ${x.regular};
|
|
3519
3597
|
color: ${t.textMuted};
|
|
3520
3598
|
background: transparent;
|
|
3521
3599
|
border: 0;
|
|
@@ -3542,8 +3620,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3542
3620
|
gap: ${a(2)};
|
|
3543
3621
|
padding: 9px 14px;
|
|
3544
3622
|
font-family: ${t.fontBody};
|
|
3545
|
-
font-size: ${
|
|
3546
|
-
font-weight: ${
|
|
3623
|
+
font-size: ${x.small};
|
|
3624
|
+
font-weight: ${x.medium};
|
|
3547
3625
|
color: ${t.text};
|
|
3548
3626
|
background: ${t.surfaceCard};
|
|
3549
3627
|
border: 1px solid ${t.text};
|
|
@@ -3590,18 +3668,18 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3590
3668
|
border: 1px solid CanvasText;
|
|
3591
3669
|
}
|
|
3592
3670
|
}
|
|
3593
|
-
`]}renderPages(){return this.links.length?
|
|
3671
|
+
`]}renderPages(){return this.links.length?n`<nav class="pages" part="pages" aria-label=${this.pagesLabel}>
|
|
3594
3672
|
<ul>
|
|
3595
|
-
${this.links.map(e=>
|
|
3596
|
-
<a href=${e.href} aria-current=${e.current?"page":
|
|
3597
|
-
>${e.current?
|
|
3673
|
+
${this.links.map(e=>n`<li>
|
|
3674
|
+
<a href=${e.href} aria-current=${e.current?"page":d}
|
|
3675
|
+
>${e.current?n`<span class="dot" aria-hidden="true"></span>`:d}${e.label}</a
|
|
3598
3676
|
>
|
|
3599
3677
|
</li>`)}
|
|
3600
3678
|
</ul>
|
|
3601
|
-
</nav>`:
|
|
3679
|
+
</nav>`:d}renderSwitcher(){return this.switcher.length?n`<impakt-menu class="switcher" exportparts=${ma} edge="end" trigger-look="text" .label=${this.switcherLabel} .items=${this.switcher}></impakt-menu>`:this.toolsHref?n`<a class="all" href=${this.toolsHref}>${this.switcherLabel}</a>`:d}renderAccount(){return this.signedOut?n`<a class="sign-in" part="sign-in" href=${this.signInHref}>${this.signInText}</a>`:this.organisationItems.length?n`<impakt-menu class="org" exportparts=${ga} edge="end" trigger-look="text" .label=${this.organisation} .items=${this.organisationItems}></impakt-menu>`:this.organisationHref?n`<a class="org" href=${this.organisationHref}>${this.organisation}</a>`:d}render(){return n`<header class="bar" part="bar">
|
|
3602
3680
|
<div class="start">
|
|
3603
3681
|
<a class="home" part="home" href=${this.home}><span class="mark" aria-hidden="true">i</span><span class="word">${this.brand}</span></a>
|
|
3604
|
-
${this.tool?
|
|
3682
|
+
${this.tool?n`<span class="sep" aria-hidden="true">/</span><span class="tool">${this.tool}</span>`:d}
|
|
3605
3683
|
</div>
|
|
3606
3684
|
${this.renderPages()}
|
|
3607
3685
|
<div class="end">
|
|
@@ -3609,7 +3687,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3609
3687
|
<slot name="tools">${this.renderSwitcher()}</slot>
|
|
3610
3688
|
${this.renderAccount()}
|
|
3611
3689
|
</div>
|
|
3612
|
-
</header>`}};customElements.define("impakt-app-bar",
|
|
3690
|
+
</header>`}};customElements.define("impakt-app-bar",Xt);var ba=[{lang:"en",label:"EN",name:"English",href:"?lang=en"},{lang:"el",label:"EL",name:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC",href:"?lang=el"},{lang:"ru",label:"RU",name:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",href:"?lang=ru"}],Yt=class extends h{static{this.properties={items:{type:Array},current:{type:String,reflect:!0},label:{type:String}}}constructor(){super(),this.items=ba,this.current="en",this.label="Language"}static{this.styles=[...h.styles,v,I("a"),u`
|
|
3613
3691
|
:host {
|
|
3614
3692
|
display: inline-flex;
|
|
3615
3693
|
}
|
|
@@ -3630,8 +3708,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3630
3708
|
min-block-size: 34px;
|
|
3631
3709
|
padding: 0 ${a(3)};
|
|
3632
3710
|
font-family: ${t.fontBody};
|
|
3633
|
-
font-size: ${
|
|
3634
|
-
font-weight: ${
|
|
3711
|
+
font-size: ${x.small};
|
|
3712
|
+
font-weight: ${x.medium};
|
|
3635
3713
|
color: ${t.text};
|
|
3636
3714
|
background: ${t.surfaceCard};
|
|
3637
3715
|
border: 1px solid ${t.text};
|
|
@@ -3642,8 +3720,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3642
3720
|
background: ${t.surfaceSubtle};
|
|
3643
3721
|
}
|
|
3644
3722
|
a[aria-current='true'] {
|
|
3645
|
-
color: ${
|
|
3646
|
-
background: ${
|
|
3723
|
+
color: ${x.onInverse};
|
|
3724
|
+
background: ${x.inverse};
|
|
3647
3725
|
}
|
|
3648
3726
|
.visually-hidden {
|
|
3649
3727
|
${T}
|
|
@@ -3656,26 +3734,26 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3656
3734
|
border-width: 3px;
|
|
3657
3735
|
}
|
|
3658
3736
|
}
|
|
3659
|
-
`]}render(){return
|
|
3737
|
+
`]}render(){return n`<nav part="nav" aria-label=${this.label}>
|
|
3660
3738
|
<ul>
|
|
3661
|
-
${this.items.map(e=>
|
|
3739
|
+
${this.items.map(e=>n`<li>
|
|
3662
3740
|
<a
|
|
3663
3741
|
part="link"
|
|
3664
3742
|
href=${e.href}
|
|
3665
3743
|
hreflang=${e.lang}
|
|
3666
3744
|
lang=${e.lang}
|
|
3667
|
-
aria-current=${e.lang===this.current?"true":
|
|
3668
|
-
>${e.label}${e.name?
|
|
3745
|
+
aria-current=${e.lang===this.current?"true":d}
|
|
3746
|
+
>${e.label}${e.name?n`<span class="visually-hidden"> ${e.name}</span>`:d}</a
|
|
3669
3747
|
>
|
|
3670
3748
|
</li>`)}
|
|
3671
3749
|
</ul>
|
|
3672
|
-
</nav>`}};customElements.define("impakt-language-switch",
|
|
3750
|
+
</nav>`}};customElements.define("impakt-language-switch",Yt);var Li=(o,e,i)=>Math.min(i,Math.max(e,o)),fr=(o,e,i)=>i>e?(Li(o,e,i)-e)/(i-e)*100:0,$r=u`
|
|
3673
3751
|
.track {
|
|
3674
3752
|
position: relative;
|
|
3675
3753
|
display: block;
|
|
3676
3754
|
block-size: 8px;
|
|
3677
3755
|
min-inline-size: 4rem;
|
|
3678
|
-
background: ${
|
|
3756
|
+
background: ${x.lineSoft};
|
|
3679
3757
|
border-radius: 0;
|
|
3680
3758
|
overflow: hidden;
|
|
3681
3759
|
}
|
|
@@ -3686,7 +3764,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3686
3764
|
}
|
|
3687
3765
|
.figure {
|
|
3688
3766
|
font-family: ${t.fontMono};
|
|
3689
|
-
font-size: ${
|
|
3767
|
+
font-size: ${x.small};
|
|
3690
3768
|
font-variant-numeric: tabular-nums;
|
|
3691
3769
|
color: ${t.text};
|
|
3692
3770
|
}
|
|
@@ -3699,7 +3777,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3699
3777
|
forced-color-adjust: none;
|
|
3700
3778
|
}
|
|
3701
3779
|
}
|
|
3702
|
-
`,
|
|
3780
|
+
`,Jt=class extends h{static{this.properties={label:{type:String},value:{type:Number},min:{type:Number},max:{type:Number},valueText:{type:String,attribute:"value-text"},showValue:{type:Boolean,attribute:"show-value",reflect:!0}}}constructor(){super(),this.label="",this.value=0,this.min=0,this.max=100,this.valueText="",this.showValue=!1}static{this.styles=[...h.styles,$r,u`
|
|
3703
3781
|
:host {
|
|
3704
3782
|
display: block;
|
|
3705
3783
|
}
|
|
@@ -3709,23 +3787,23 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3709
3787
|
justify-content: space-between;
|
|
3710
3788
|
gap: ${a(1)} ${a(3)};
|
|
3711
3789
|
margin-block-end: ${a(2)};
|
|
3712
|
-
font-size: ${
|
|
3790
|
+
font-size: ${x.small};
|
|
3713
3791
|
}
|
|
3714
3792
|
.head:empty {
|
|
3715
3793
|
display: none;
|
|
3716
3794
|
}
|
|
3717
|
-
`]}render(){let e=
|
|
3795
|
+
`]}render(){let e=Li(this.value,this.min,this.max);return n`<div class="head">${this.label?n`<span class="label" id=${this.id_("label")}>${this.label}</span>`:d}${this.showValue?n`<span class="figure" aria-hidden="true">${this.valueText||e}</span>`:d}</div><span
|
|
3718
3796
|
class="track"
|
|
3719
3797
|
part="track"
|
|
3720
3798
|
role="meter"
|
|
3721
|
-
aria-labelledby=${this.label?this.id_("label"):
|
|
3722
|
-
aria-label=${this.label?
|
|
3799
|
+
aria-labelledby=${this.label?this.id_("label"):d}
|
|
3800
|
+
aria-label=${this.label?d:S("Meter")}
|
|
3723
3801
|
aria-valuemin=${this.min}
|
|
3724
3802
|
aria-valuemax=${this.max}
|
|
3725
3803
|
aria-valuenow=${e}
|
|
3726
|
-
aria-valuetext=${this.valueText||
|
|
3727
|
-
><span class="fill" part="fill" style=${`inline-size:${
|
|
3728
|
-
></span>`}},
|
|
3804
|
+
aria-valuetext=${this.valueText||d}
|
|
3805
|
+
><span class="fill" part="fill" style=${`inline-size:${fr(e,this.min,this.max)}%`}></span
|
|
3806
|
+
></span>`}},Zt=class extends h{static{this.properties={label:{type:String},items:{type:Array},max:{type:Number}}}constructor(){super(),this.label="Scores",this.items=[],this.max=100}static{this.styles=[...h.styles,$r,u`
|
|
3729
3807
|
:host {
|
|
3730
3808
|
display: block;
|
|
3731
3809
|
container-type: inline-size;
|
|
@@ -3741,7 +3819,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3741
3819
|
align-items: center;
|
|
3742
3820
|
gap: ${a(2)} ${a(4)};
|
|
3743
3821
|
padding-block: ${a(3)};
|
|
3744
|
-
font-size: ${
|
|
3822
|
+
font-size: ${x.small};
|
|
3745
3823
|
}
|
|
3746
3824
|
.figure {
|
|
3747
3825
|
text-align: end;
|
|
@@ -3757,30 +3835,30 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3757
3835
|
grid-column: 1 / -1;
|
|
3758
3836
|
}
|
|
3759
3837
|
}
|
|
3760
|
-
`]}render(){return
|
|
3761
|
-
${this.items.map((e,i)=>{let r=e.max??this.max,
|
|
3838
|
+
`]}render(){return n`<ul part="list" role="list" aria-label=${this.label}>
|
|
3839
|
+
${this.items.map((e,i)=>{let r=e.max??this.max,s=Li(e.value,0,r),c=this.id_(`score-${i}`);return n`<li part="row">
|
|
3762
3840
|
<span class="name" id=${c}>${e.label}</span>
|
|
3763
|
-
<span class="track" part="track" role="meter" aria-labelledby=${c} aria-valuemin="0" aria-valuemax=${r} aria-valuenow=${
|
|
3764
|
-
><span class="fill" part="fill" style=${`inline-size:${
|
|
3841
|
+
<span class="track" part="track" role="meter" aria-labelledby=${c} aria-valuemin="0" aria-valuemax=${r} aria-valuenow=${s}
|
|
3842
|
+
><span class="fill" part="fill" style=${`inline-size:${fr(s,0,r)}%`}></span
|
|
3765
3843
|
></span>
|
|
3766
|
-
<span class="figure" aria-hidden="true">${
|
|
3767
|
-
<span class="pill">${e.status?
|
|
3844
|
+
<span class="figure" aria-hidden="true">${s}</span>
|
|
3845
|
+
<span class="pill">${e.status?n`<impakt-status tone=${e.tone??"warn"}>${e.status}</impakt-status>`:d}</span>
|
|
3768
3846
|
</li>`})}
|
|
3769
|
-
</ul>`}};customElements.define("impakt-meter",
|
|
3847
|
+
</ul>`}};customElements.define("impakt-meter",Jt);customElements.define("impakt-score-bars",Zt);var Qt=class extends h{static{this.properties={removed:{type:String},added:{type:String},lines:{type:Array},label:{type:String},removedText:{type:String,attribute:"removed-text"},addedText:{type:String,attribute:"added-text"}}}constructor(){super(),this.removed="",this.added="",this.lines=[],this.label="Code change",this.removedText="Removed",this.addedText="Added"}static{this.styles=[...h.styles,v,u`
|
|
3770
3848
|
:host {
|
|
3771
3849
|
display: block;
|
|
3772
3850
|
}
|
|
3773
3851
|
.block {
|
|
3774
3852
|
overflow-x: auto;
|
|
3775
3853
|
padding: ${a(4)} ${a(4)};
|
|
3776
|
-
color: ${
|
|
3777
|
-
background: ${
|
|
3854
|
+
color: ${x.codeText};
|
|
3855
|
+
background: ${x.codeSurface};
|
|
3778
3856
|
border-radius: 0;
|
|
3779
3857
|
}
|
|
3780
3858
|
pre {
|
|
3781
3859
|
margin: 0;
|
|
3782
3860
|
font-family: ${t.fontMono};
|
|
3783
|
-
font-size: ${
|
|
3861
|
+
font-size: ${x.small};
|
|
3784
3862
|
line-height: 1.6;
|
|
3785
3863
|
}
|
|
3786
3864
|
code {
|
|
@@ -3796,10 +3874,10 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3796
3874
|
inline-size: 2ch;
|
|
3797
3875
|
}
|
|
3798
3876
|
.removed {
|
|
3799
|
-
color: ${
|
|
3877
|
+
color: ${x.codeMuted};
|
|
3800
3878
|
}
|
|
3801
3879
|
.added {
|
|
3802
|
-
color: ${
|
|
3880
|
+
color: ${x.codeText};
|
|
3803
3881
|
}
|
|
3804
3882
|
.visually-hidden {
|
|
3805
3883
|
${T}
|
|
@@ -3810,7 +3888,9 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3810
3888
|
}
|
|
3811
3889
|
}
|
|
3812
3890
|
`]}get allLines(){if(this.lines.length)return this.lines;let e=(i,r)=>i?i.split(`
|
|
3813
|
-
`).map(
|
|
3891
|
+
`).map(s=>({kind:r,text:s})):[];return[...e(this.removed,"removed"),...e(this.added,"added")]}render(){let e={removed:"\u2212",added:"+",context:" "},i={removed:this.removedText,added:this.addedText,context:""};return n`<div class="block" part="block" role="region" aria-label=${this.label} tabindex="0"><pre part="code"><code>${this.allLines.map(r=>n`<span class="line ${r.kind}"><span class="sign" aria-hidden="true">${e[r.kind]}</span>${i[r.kind]?n`<span class="visually-hidden">${i[r.kind]}: </span>`:d}${r.text}</span>`)}</code></pre></div>`}};customElements.define("impakt-code-diff",Qt);var ei=class extends y{static{this.properties={...y.properties,options:{type:Array},values:{type:Array},multiple:{type:Boolean,reflect:!0},look:{type:String,reflect:!0},missingText:{type:String,attribute:"missing-text"}}}constructor(){super(),this.options=[],this.values=[],this.multiple=!1,this.look="default",this.missingText="Choose an option"}static{this.styles=[...y.styles,ki,u`
|
|
3892
|
+
/* Given \`data-reveal\`, the chips drop 12px into place one after another, once, as the group is reached (impkt-web#51). */
|
|
3893
|
+
:host([data-motion]) .chip { animation: ik-reveal-drop ${q.drop} ${q.arrive} ${yi()} both; }
|
|
3814
3894
|
fieldset {
|
|
3815
3895
|
border: 0;
|
|
3816
3896
|
margin: 0;
|
|
@@ -3824,7 +3904,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3824
3904
|
font-family: ${t.fontMono};
|
|
3825
3905
|
/* G2 Mono S is 11px (20:1100); the ramp's 2xs is 12px, so the size is set here, as the text fields' site label is. */
|
|
3826
3906
|
font-size: 0.6875rem;
|
|
3827
|
-
font-weight: ${
|
|
3907
|
+
font-weight: ${x.medium};
|
|
3828
3908
|
text-transform: uppercase;
|
|
3829
3909
|
letter-spacing: 0.06em;
|
|
3830
3910
|
margin-block-end: ${a(2)};
|
|
@@ -3841,13 +3921,17 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3841
3921
|
min-block-size: 35px;
|
|
3842
3922
|
padding: 0 ${a(3)};
|
|
3843
3923
|
font-family: ${t.fontBody};
|
|
3844
|
-
font-size: ${
|
|
3924
|
+
font-size: ${x.small};
|
|
3845
3925
|
color: ${t.text};
|
|
3846
3926
|
background: ${t.surfaceCard};
|
|
3847
3927
|
border: 1px solid ${t.text};
|
|
3848
3928
|
border-radius: 0;
|
|
3849
3929
|
cursor: pointer;
|
|
3850
3930
|
}
|
|
3931
|
+
/* The site's chips (10:547, 15:945) are 8 by 14 inside: "Mobile app" is 100px wide. */
|
|
3932
|
+
:host([look='site']) .chip {
|
|
3933
|
+
padding-inline: 14px;
|
|
3934
|
+
}
|
|
3851
3935
|
.chip input {
|
|
3852
3936
|
position: absolute;
|
|
3853
3937
|
inset: 0;
|
|
@@ -3861,8 +3945,8 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3861
3945
|
background: ${t.surfaceSubtle};
|
|
3862
3946
|
}
|
|
3863
3947
|
.chip.on {
|
|
3864
|
-
color: ${
|
|
3865
|
-
background: ${
|
|
3948
|
+
color: ${x.onInverse};
|
|
3949
|
+
background: ${x.inverse};
|
|
3866
3950
|
}
|
|
3867
3951
|
.chip:has(input:focus-visible) {
|
|
3868
3952
|
outline: 2px solid transparent;
|
|
@@ -3895,29 +3979,29 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3895
3979
|
outline-color: Highlight;
|
|
3896
3980
|
}
|
|
3897
3981
|
}
|
|
3898
|
-
`]}renderLabel(){return
|
|
3899
|
-
${this.label}${this.required?
|
|
3900
|
-
</legend>`}chosen(e){return this.multiple?this.values.includes(e):this.value===e}choose(e,i){if(this.multiple){let r=i?[...this.values,e]:this.values.filter(
|
|
3901
|
-
${this.options.map((i,r)=>{let
|
|
3982
|
+
`]}renderLabel(){return n`<legend class="label" part="label">
|
|
3983
|
+
${this.label}${this.required?n`<span class="required"> (${this.requiredText})</span>`:d}
|
|
3984
|
+
</legend>`}chosen(e){return this.multiple?this.values.includes(e):this.value===e}choose(e,i){if(this.multiple){let r=i?[...this.values,e]:this.values.filter(s=>s!==e);this.values=this.options.filter(s=>r.includes(s.value)).map(s=>s.value),this.setFormValue(this.values.join(","))}else this.setFormValue(e);this.syncValidity()}syncValidity(){let e=this.multiple?this.values.length===0:!this.value;try{if(this.required&&e){let i=this.renderRoot?.querySelector?.("input")??void 0;this.internals?.setValidity({valueMissing:!0},this.missingText,i)}else this.internals?.setValidity({})}catch{}}renderControl(){let e=this.multiple?"checkbox":"radio";return n`<div class="chips">
|
|
3985
|
+
${this.options.map((i,r)=>{let s=this.chosen(i.value);return n`<label class="chip ${s?"on":""}" part="chip" style=${`--i:${r}`}>
|
|
3902
3986
|
<input
|
|
3903
3987
|
type=${e}
|
|
3904
3988
|
id=${r===0?this.controlId:this.id_(`opt-${r}`)}
|
|
3905
3989
|
name=${this.uid}
|
|
3906
3990
|
value=${i.value}
|
|
3907
|
-
.checked=${
|
|
3991
|
+
.checked=${s}
|
|
3908
3992
|
?disabled=${this.disabled}
|
|
3909
3993
|
?required=${!this.multiple&&this.required&&r===0}
|
|
3910
3994
|
@change=${c=>this.choose(i.value,c.target.checked)}
|
|
3911
3995
|
/><span>${i.label}</span>
|
|
3912
3996
|
</label>`})}
|
|
3913
|
-
</div>`}render(){return
|
|
3914
|
-
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":
|
|
3997
|
+
</div>`}render(){return n`
|
|
3998
|
+
<fieldset part="fieldset" aria-describedby=${this.describedBy} aria-invalid=${this.error?"true":d}>
|
|
3915
3999
|
${this.renderLabel()}
|
|
3916
|
-
${this.description?
|
|
4000
|
+
${this.description?n`<div class="description" id=${this.id_("description")} part="description">${this.description}</div>`:d}
|
|
3917
4001
|
${this.renderControl()}
|
|
3918
|
-
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||
|
|
4002
|
+
<div class="error" id=${this.id_("error")} part="error" aria-live="polite">${this.error||d}</div>
|
|
3919
4003
|
</fieldset>
|
|
3920
|
-
`}firstUpdated(){let e=this.multiple?this.values.join(","):this.value;this.internals?.setFormValue(e||null),this.syncValidity()}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error),(e.has("required")||e.has("multiple"))&&this.syncValidity()}formResetCallback(){this.value="",this.values=[],this.internals?.setFormValue(null),this.syncValidity()}};customElements.define("impakt-chip-group",
|
|
4004
|
+
`}firstUpdated(){let e=this.multiple?this.values.join(","):this.value;this.internals?.setFormValue(e||null),this.syncValidity()}updated(e){e.has("error")&&this.toggleAttribute("invalid",!!this.error),(e.has("required")||e.has("multiple"))&&this.syncValidity()}formResetCallback(){this.value="",this.values=[],this.internals?.setFormValue(null),this.syncValidity()}};customElements.define("impakt-chip-group",ei);var ti=class extends h{static{this.properties={label:{type:String},look:{type:String,reflect:!0},redactedText:{type:String,attribute:"redacted-text"}}}constructor(){super(),this.label="",this.look="solid",this.redactedText="Redacted"}static{this.styles=[...h.styles,u`
|
|
3921
4005
|
:host {
|
|
3922
4006
|
display: inline;
|
|
3923
4007
|
}
|
|
@@ -3926,13 +4010,13 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3926
4010
|
display: inline-block;
|
|
3927
4011
|
padding: 1px 8px;
|
|
3928
4012
|
font-family: ${t.fontMono};
|
|
3929
|
-
font-size: ${
|
|
3930
|
-
font-weight: ${
|
|
4013
|
+
font-size: ${x.small};
|
|
4014
|
+
font-weight: ${x.medium};
|
|
3931
4015
|
line-height: 1.4;
|
|
3932
4016
|
white-space: nowrap;
|
|
3933
|
-
color: ${
|
|
3934
|
-
background: ${
|
|
3935
|
-
border: 1px solid ${
|
|
4017
|
+
color: ${x.onInverse};
|
|
4018
|
+
background: ${x.inverse};
|
|
4019
|
+
border: 1px solid ${x.inverse};
|
|
3936
4020
|
border-radius: 0;
|
|
3937
4021
|
user-select: none;
|
|
3938
4022
|
}
|
|
@@ -3949,7 +4033,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3949
4033
|
border-color: CanvasText;
|
|
3950
4034
|
}
|
|
3951
4035
|
}
|
|
3952
|
-
`]}render(){return
|
|
4036
|
+
`]}render(){return n`<span class="tag" part="tag"><span class="visually-hidden">${this.redactedText}: </span>${this.label}</span>`}};customElements.define("impakt-redaction",ti);var ii=class extends h{static{this.properties={name:{type:String},description:{type:String},status:{type:String},statusTone:{type:String,attribute:"status-tone"},note:{type:String},href:{type:String},actionLabel:{type:String,attribute:"action-label"},owned:{type:Boolean,reflect:!0},state:{type:String,reflect:!0},headingLevel:{type:Number,attribute:"heading-level"},comingSoonText:{type:String,attribute:"coming-soon-text"},notOpenText:{type:String,attribute:"not-open-text"}}}constructor(){super(),this.name="",this.description="",this.status="",this.statusTone="ok",this.note="",this.href="",this.actionLabel="",this.owned=!1,this.state="open",this.headingLevel=3,this.comingSoonText="Coming soon",this.notOpenText="Not open yet."}static{this.styles=[...h.styles,v,u`
|
|
3953
4037
|
:host {
|
|
3954
4038
|
display: block;
|
|
3955
4039
|
}
|
|
@@ -3970,7 +4054,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3970
4054
|
margin: 0;
|
|
3971
4055
|
font-family: ${t.fontHeading};
|
|
3972
4056
|
font-size: 2rem;
|
|
3973
|
-
font-weight: ${
|
|
4057
|
+
font-weight: ${x.medium};
|
|
3974
4058
|
line-height: 1.1;
|
|
3975
4059
|
letter-spacing: ${t.trackingTight};
|
|
3976
4060
|
color: ${t.text};
|
|
@@ -3991,12 +4075,12 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
3991
4075
|
}
|
|
3992
4076
|
.note {
|
|
3993
4077
|
font-family: ${t.fontMono};
|
|
3994
|
-
font-size: ${
|
|
4078
|
+
font-size: ${x.small};
|
|
3995
4079
|
color: ${t.textMuted};
|
|
3996
4080
|
}
|
|
3997
4081
|
.muted {
|
|
3998
4082
|
margin: 0;
|
|
3999
|
-
font-size: ${
|
|
4083
|
+
font-size: ${x.small};
|
|
4000
4084
|
color: ${t.textMuted};
|
|
4001
4085
|
}
|
|
4002
4086
|
.action {
|
|
@@ -4008,7 +4092,7 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
4008
4092
|
margin-block-start: auto;
|
|
4009
4093
|
padding: ${a(2.5)} ${a(5)};
|
|
4010
4094
|
font-family: ${t.fontBody};
|
|
4011
|
-
font-size: ${
|
|
4095
|
+
font-size: ${l("font.size.md","1rem")};
|
|
4012
4096
|
color: ${t.text};
|
|
4013
4097
|
background: ${t.surfaceCard};
|
|
4014
4098
|
border: 1px solid ${t.text};
|
|
@@ -4019,11 +4103,11 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
4019
4103
|
background: ${t.surfaceSubtle};
|
|
4020
4104
|
}
|
|
4021
4105
|
:host([owned]) .action {
|
|
4022
|
-
color: ${
|
|
4023
|
-
background: ${
|
|
4106
|
+
color: ${x.onInverse};
|
|
4107
|
+
background: ${x.inverse};
|
|
4024
4108
|
}
|
|
4025
4109
|
:host([owned]) .action:hover {
|
|
4026
|
-
background: color-mix(in srgb, ${
|
|
4110
|
+
background: color-mix(in srgb, ${x.inverse} 88%, ${x.onInverse});
|
|
4027
4111
|
}
|
|
4028
4112
|
.arrow {
|
|
4029
4113
|
font-size: 1.25em;
|
|
@@ -4035,16 +4119,16 @@ var Yt=globalThis,bi=s=>s,we=Yt.trustedTypes,fi=we?we.createPolicy("lit-html",{c
|
|
|
4035
4119
|
border-color: CanvasText;
|
|
4036
4120
|
}
|
|
4037
4121
|
}
|
|
4038
|
-
`]}renderStatus(){return this.state==="coming-soon"?
|
|
4039
|
-
<p class="muted">${this.notOpenText}</p>`:!this.status&&!this.note?
|
|
4040
|
-
${this.status?
|
|
4041
|
-
${this.note?
|
|
4042
|
-
</div>`}render(){let e=Math.min(6,Math.max(2,Number(this.headingLevel)||3)),i=this.actionLabel||`Open ${this.name}`;return
|
|
4122
|
+
`]}renderStatus(){return this.state==="coming-soon"?n`<div class="status"><impakt-status tone="neutral">${this.comingSoonText}</impakt-status></div>
|
|
4123
|
+
<p class="muted">${this.notOpenText}</p>`:!this.status&&!this.note?d:n`<div class="status">
|
|
4124
|
+
${this.status?n`<impakt-status tone=${this.statusTone}>${this.status}</impakt-status>`:d}
|
|
4125
|
+
${this.note?n`<span class="note">${this.note}</span>`:d}
|
|
4126
|
+
</div>`}render(){let e=Math.min(6,Math.max(2,Number(this.headingLevel)||3)),i=this.actionLabel||`Open ${this.name}`;return n`<article class="card" part="card" aria-labelledby=${this.id_("name")}>
|
|
4043
4127
|
<div class="name" role="heading" aria-level=${e} id=${this.id_("name")}>${this.name}</div>
|
|
4044
|
-
${this.description?
|
|
4128
|
+
${this.description?n`<p class="description">${this.description}</p>`:d}
|
|
4045
4129
|
${this.renderStatus()}
|
|
4046
|
-
${this.state!=="coming-soon"&&this.href?
|
|
4047
|
-
</article>`}};customElements.define("impakt-tool-card",
|
|
4130
|
+
${this.state!=="coming-soon"&&this.href?n`<a class="action" part="action" href=${this.href}><span>${i}</span><span class="arrow" aria-hidden="true">→</span></a>`:d}
|
|
4131
|
+
</article>`}};customElements.define("impakt-tool-card",ii);typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Be(),{once:!0}):Be());export{Te as CYCLE,y as FieldElement,vi as ICONS,Kr as ICON_NAMES,bt as ImpaktAccordion,Z as ImpaktAddressLookup,rt as ImpaktAlert,Xt as ImpaktAppBar,Ge as ImpaktAppShell,Dt as ImpaktAvatar,qt as ImpaktAvatarGroup,xt as ImpaktBadge,Ct as ImpaktBreadcrumbs,qe as ImpaktButton,ot as ImpaktCard,We as ImpaktCheckbox,kt as ImpaktCheckboxGroup,Kt as ImpaktChecked,$t as ImpaktChip,ei as ImpaktChipGroup,Qt as ImpaktCodeDiff,vt as ImpaktDateInput,Je as ImpaktDateTile,wt as ImpaktDialog,Lt as ImpaktDivider,pt as ImpaktDocumentLink,Bt as ImpaktDrawer,h as ImpaktElement,Ft as ImpaktEmptyState,Wt as ImpaktErrorSummary,Ht as ImpaktFieldset,oe as ImpaktFileUpload,Qe as ImpaktFilterChip,Tt as ImpaktGrid,nt as ImpaktHeading,zt as ImpaktHelp,De as ImpaktIcon,dt as ImpaktImage,Yt as ImpaktLanguageSwitch,lt as ImpaktLink,St as ImpaktList,ct as ImpaktLogo,Pt as ImpaktMenu,Jt as ImpaktMeter,Ae as ImpaktMoneyInput,At as ImpaktNav,Et as ImpaktPage,Ot as ImpaktPagination,ht as ImpaktPrice,ft as ImpaktProgress,it as ImpaktRadioGroup,Ut as ImpaktRangeInput,ti as ImpaktRedaction,Ze as ImpaktRow,Zt as ImpaktScoreBars,Mt as ImpaktSection,tt as ImpaktSegmentedControl,je as ImpaktSelect,Ue as ImpaktSideNav,jt as ImpaktSlotPicker,Gt as ImpaktSource,Rt as ImpaktSpacer,at as ImpaktStack,Ye as ImpaktStatTile,Ke as ImpaktStatus,ut as ImpaktSummaryList,et as ImpaktSwitch,Ve as ImpaktTabBar,mt as ImpaktTable,_t as ImpaktTabs,Vt as ImpaktTaskList,st as ImpaktText,Fe as ImpaktTextInput,yt as ImpaktTextarea,Nt as ImpaktToast,ii as ImpaktToolCard,It as ImpaktVisuallyHidden,J as LitElement,q as R,pi as REVEAL_SELECTOR,de as REVEAL_STATE,Se as TONE,ve as announceNavigate,lr as base,u as css,K as fieldWidths,v as focusRing,$ as fontSize,b as fontWeight,Ai as groupDigits,dr as hideOn,n as html,M as iconSvg,Si as isCurrent,W as lineHeight,oa as linkCurrent,Me as lockScroll,j as noChange,d as nothing,U as pageLocale,sr as reducedMotion,fe as render,Br as replayReveal,ui as revealAllowed,yi as revealAt,Qi as revealMode,ki as revealStyles,mi as revealTargets,S as say,a as space,D as spaceAround,Be as startReveal,k as svg,t,E as targetSize,l as token,Ti as toneOf,I as touchTarget,w as type,ae as unlockScroll,R as unsafeCSS,T as visuallyHidden};
|
|
4048
4132
|
/*! Bundled license information:
|
|
4049
4133
|
|
|
4050
4134
|
lit-html/lit-html.js:
|