scb-wc-test 0.1.87 → 0.1.89
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/all.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +36 -36
- package/mvc/components/all.js +1 -1
- package/mvc/components/scb-skeleton/scb-skeleton.js +33 -0
- package/package.json +6 -6
- package/scb-skeleton/scb-skeleton.d.ts +16 -0
- package/scb-skeleton/scb-skeleton.js +66 -0
- package/scb-wc-test.bundle.js +161 -248
- package/mvc/components/scb-notification/scb-notification.js +0 -120
- package/scb-notification/scb-notification.d.ts +0 -15
- package/scb-notification/scb-notification.js +0 -187
package/scb-wc-test.bundle.js
CHANGED
|
@@ -10,7 +10,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:Hs,defineProperty:Fs,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:qs,getOwnPropertySymbols:Vs,getPrototypeOf:js}=Object,We=globalThis,Jo=We.trustedTypes,Us=Jo?Jo.emptyScript:"",Ir=We.reactiveElementPolyfillSupport,
|
|
13
|
+
*/const{is:Hs,defineProperty:Fs,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:qs,getOwnPropertySymbols:Vs,getPrototypeOf:js}=Object,We=globalThis,Jo=We.trustedTypes,Us=Jo?Jo.emptyScript:"",Ir=We.reactiveElementPolyfillSupport,Ft=(o,e)=>o,ki={toAttribute(o,e){switch(e){case Boolean:o=o?Us:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Tr=(o,e)=>!Hs(o,e),Qo={attribute:!0,type:String,converter:ki,reflect:!1,useDefault:!1,hasChanged:Tr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),We.litPropertyMetadata??(We.litPropertyMetadata=new WeakMap);let wt=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Qo){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,t);r!==void 0&&Fs(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){const{get:r,set:s}=Ns(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:r,set(n){const h=r==null?void 0:r.call(this);s==null||s.call(this,n),this.requestUpdate(e,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Qo}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;const e=js(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){const t=this.properties,i=[...qs(t),...Vs(t)];for(const r of i)this.createProperty(r,t[r])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,r]of t)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const r=this._$Eu(t,i);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)t.unshift(Zo(r))}else e!==void 0&&t.push(Zo(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ms(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostConnected)==null?void 0:i.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var i;return(i=t.hostDisconnected)==null?void 0:i.call(t)})}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const n=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:ki).toAttribute(t,i.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,t){var s,n;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const h=i.getPropertyOptions(r),p=typeof h.converter=="function"?{fromAttribute:h.converter}:((s=h.converter)==null?void 0:s.fromAttribute)!==void 0?h.converter:ki;this._$Em=r;const v=p.fromAttribute(t,h.type);this[r]=v??((n=this._$Ej)==null?void 0:n.get(r))??v,this._$Em=null}}requestUpdate(e,t,i){var r;if(e!==void 0){const s=this.constructor,n=this[e];if(i??(i=s.getPropertyOptions(e)),!((i.hasChanged??Tr)(n,t)||i.useDefault&&i.reflect&&n===((r=this._$Ej)==null?void 0:r.get(e))&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:r,wrapped:s},n){i&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,n??t??this[e]),s!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[s,n]of r){const{wrapped:h}=n,p=this[s];h!==!0||this._$AL.has(s)||p===void 0||this.C(s,void 0,n,p)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(i=this._$EO)==null||i.forEach(r=>{var s;return(s=r.hostUpdate)==null?void 0:s.call(r)}),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),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=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};wt.elementStyles=[],wt.shadowRootOptions={mode:"open"},wt[Ft("elementProperties")]=new Map,wt[Ft("finalized")]=new Map,Ir==null||Ir({ReactiveElement:wt}),(We.reactiveElementVersions??(We.reactiveElementVersions=[])).push("2.1.1");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -22,37 +22,37 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
25
|
+
*/const Nt=(o,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(o,e,t),t);/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/function k(o,e){return(t,i,r)=>{const s=n=>{var h;return((h=n.renderRoot)==null?void 0:h.querySelector(o))??null};return
|
|
29
|
+
*/function k(o,e){return(t,i,r)=>{const s=n=>{var h;return((h=n.renderRoot)==null?void 0:h.querySelector(o))??null};return Nt(t,i,{get(){return s(this)}})}}/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/let Gs;function Ys(o){return(e,t)=>
|
|
33
|
+
*/let Gs;function Ys(o){return(e,t)=>Nt(e,t,{get(){return(this.renderRoot??Gs??(Gs=document.createDocumentFragment())).querySelectorAll(o)}})}/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/function ea(o){return(e,t)=>
|
|
37
|
+
*/function ea(o){return(e,t)=>Nt(e,t,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(o))??null}})}/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2021 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/function Y(o){return(e,t)=>{const{slot:i,selector:r}=o??{},s="slot"+(i?`[name=${i}]`:":not([name])");return
|
|
41
|
+
*/function Y(o){return(e,t)=>{const{slot:i,selector:r}=o??{},s="slot"+(i?`[name=${i}]`:":not([name])");return Nt(e,t,{get(){var p;const n=(p=this.renderRoot)==null?void 0:p.querySelector(s),h=(n==null?void 0:n.assignedElements(o))??[];return r===void 0?h:h.filter(v=>v.matches(r))}})}}/**
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function Or(o){return(e,t)=>{const{slot:i}=o??{},r="slot"+(i?`[name=${i}]`:":not([name])");return
|
|
45
|
+
*/function Or(o){return(e,t)=>{const{slot:i}=o??{},r="slot"+(i?`[name=${i}]`:":not([name])");return Nt(e,t,{get(){var n;const s=(n=this.renderRoot)==null?void 0:n.querySelector(r);return(s==null?void 0:s.assignedNodes(o))??[]}})}}/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const
|
|
50
|
-
\f\r]`,
|
|
51
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),sa=/'/g,na=/"/g,la=/^(?:script|style|textarea|title)$/i,Js=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Js(1),de=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ca=new WeakMap,
|
|
49
|
+
*/const qt=globalThis,$i=qt.trustedTypes,ta=$i?$i.createPolicy("lit-html",{createHTML:o=>o}):void 0,ia="$lit$",Ke=`lit$${Math.random().toFixed(9).slice(2)}$`,ra="?"+Ke,Xs=`<${ra}>`,rt=document,Vt=()=>rt.createComment(""),jt=o=>o===null||typeof o!="object"&&typeof o!="function",Lr=Array.isArray,Zs=o=>Lr(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Pr=`[
|
|
50
|
+
\f\r]`,Ut=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,oa=/-->/g,aa=/>/g,ot=RegExp(`>|${Pr}(?:([^\\s"'>=/]+)(${Pr}*=${Pr}*(?:[^
|
|
51
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),sa=/'/g,na=/"/g,la=/^(?:script|style|textarea|title)$/i,Js=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Js(1),de=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ca=new WeakMap,at=rt.createTreeWalker(rt,129);function da(o,e){if(!Lr(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ta!==void 0?ta.createHTML(e):e}const Qs=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",n=Ut;for(let h=0;h<t;h++){const p=o[h];let v,f,m=-1,_=0;for(;_<p.length&&(n.lastIndex=_,f=n.exec(p),f!==null);)_=n.lastIndex,n===Ut?f[1]==="!--"?n=oa:f[1]!==void 0?n=aa:f[2]!==void 0?(la.test(f[2])&&(r=RegExp("</"+f[2],"g")),n=ot):f[3]!==void 0&&(n=ot):n===ot?f[0]===">"?(n=r??Ut,m=-1):f[1]===void 0?m=-2:(m=n.lastIndex-f[2].length,v=f[1],n=f[3]===void 0?ot:f[3]==='"'?na:sa):n===na||n===sa?n=ot:n===oa||n===aa?n=Ut:(n=ot,r=void 0);const x=n===ot&&o[h+1].startsWith("/>")?" ":"";s+=n===Ut?p+Xs:m>=0?(i.push(v),p.slice(0,m)+ia+p.slice(m)+Ke+x):p+Ke+(m===-2?h:x)}return[da(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Wt{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,n=0;const h=e.length-1,p=this.parts,[v,f]=Qs(e,t);if(this.el=Wt.createElement(v,i),at.currentNode=this.el.content,t===2||t===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(r=at.nextNode())!==null&&p.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const m of r.getAttributeNames())if(m.endsWith(ia)){const _=f[n++],x=r.getAttribute(m).split(Ke),S=/([.?@])?(.*)/.exec(_);p.push({type:1,index:s,name:S[2],strings:x,ctor:S[1]==="."?tn:S[1]==="?"?rn:S[1]==="@"?on:Ci}),r.removeAttribute(m)}else m.startsWith(Ke)&&(p.push({type:6,index:s}),r.removeAttribute(m));if(la.test(r.tagName)){const m=r.textContent.split(Ke),_=m.length-1;if(_>0){r.textContent=$i?$i.emptyScript:"";for(let x=0;x<_;x++)r.append(m[x],Vt()),at.nextNode(),p.push({type:2,index:++s});r.append(m[_],Vt())}}}else if(r.nodeType===8)if(r.data===ra)p.push({type:2,index:s});else{let m=-1;for(;(m=r.data.indexOf(Ke,m+1))!==-1;)p.push({type:7,index:s}),m+=Ke.length-1}s++}}static createElement(e,t){const i=rt.createElement("template");return i.innerHTML=e,i}}function St(o,e,t=o,i){var n,h;if(e===de)return e;let r=i!==void 0?(n=t._$Co)==null?void 0:n[i]:t._$Cl;const s=jt(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),s===void 0?r=void 0:(r=new s(o),r._$AT(o,t,i)),i!==void 0?(t._$Co??(t._$Co=[]))[i]=r:t._$Cl=r),r!==void 0&&(e=St(o,r._$AS(o,e.values),r,i)),e}class en{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,r=((e==null?void 0:e.creationScope)??rt).importNode(t,!0);at.currentNode=r;let s=at.nextNode(),n=0,h=0,p=i[0];for(;p!==void 0;){if(n===p.index){let v;p.type===2?v=new Kt(s,s.nextSibling,this,e):p.type===1?v=new p.ctor(s,p.name,p.strings,this,e):p.type===6&&(v=new an(s,this,e)),this._$AV.push(v),p=i[++h]}n!==(p==null?void 0:p.index)&&(s=at.nextNode(),n++)}return at.currentNode=rt,r}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class Kt{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,i,r){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=St(this,e,t),jt(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==de&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Zs(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!==u&&jt(this._$AH)?this._$AA.nextSibling.data=e:this.T(rt.createTextNode(e)),this._$AH=e}$(e){var s;const{values:t,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Wt.createElement(da(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(t);else{const n=new en(r,this),h=n.u(this.options);n.p(t),this.T(h),this._$AH=n}}_$AC(e){let t=ca.get(e.strings);return t===void 0&&ca.set(e.strings,t=new Wt(e)),t}k(e){Lr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,r=0;for(const s of e)r===t.length?t.push(i=new Kt(this.O(Vt()),this.O(Vt()),this,this.options)):i=t[r],i._$AI(s),r++;r<t.length&&(this._$AR(i&&i._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class Ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,r,s){this.type=1,this._$AH=u,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=u}_$AI(e,t=this,i,r){const s=this.strings;let n=!1;if(s===void 0)e=St(this,e,t,0),n=!jt(e)||e!==this._$AH&&e!==de,n&&(this._$AH=e);else{const h=e;let p,v;for(e=s[0],p=0;p<s.length-1;p++)v=St(this,h[i+p],t,p),v===de&&(v=this._$AH[p]),n||(n=!jt(v)||v!==this._$AH[p]),v===u?e=u:e!==u&&(e+=(v??"")+s[p+1]),this._$AH[p]=v}n&&!r&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class tn extends Ci{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class rn extends Ci{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class on extends Ci{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=St(this,e,t,0)??u)===de)return;const i=this._$AH,r=e===u&&i!==u||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==u&&(i===u||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}class an{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){St(this,e)}}const Dr=qt.litHtmlPolyfillSupport;Dr==null||Dr(Wt,Kt),(qt.litHtmlVersions??(qt.litHtmlVersions=[])).push("3.3.1");const Rr=(o,e,t)=>{const i=(t==null?void 0:t.renderBefore)??e;let r=i._$litPart$;if(r===void 0){const s=(t==null?void 0:t.renderBefore)??null;i._$litPart$=r=new Kt(e.insertBefore(Vt(),s),s,void 0,t??{})}return r._$AI(o),r};/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const
|
|
55
|
+
*/const st=globalThis;let y=class extends wt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Rr(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return de}};y._$litElement$=!0,y.finalized=!0,(Rs=st.litElementHydrateSupport)==null||Rs.call(st,{LitElement:y});const Br=st.litElementPolyfillSupport;Br==null||Br({LitElement:y}),(st.litElementVersions??(st.litElementVersions=[])).push("4.2.1");/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2022 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -98,7 +98,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2022 Google LLC
|
|
100
100
|
* SPDX-License-Identifier: Apache-2.0
|
|
101
|
-
*/const pn=450,va=225,un=.2,vn=10,mn=75,bn=.35,fn="::after",gn="forwards";var J;(function(o){o[o.INACTIVE=0]="INACTIVE",o[o.TOUCH_DELAY=1]="TOUCH_DELAY",o[o.HOLDING=2]="HOLDING",o[o.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(J||(J={}));const yn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],_n=150,qr=window.matchMedia("(forced-colors: active)");class
|
|
101
|
+
*/const pn=450,va=225,un=.2,vn=10,mn=75,bn=.35,fn="::after",gn="forwards";var J;(function(o){o[o.INACTIVE=0]="INACTIVE",o[o.TOUCH_DELAY=1]="TOUCH_DELAY",o[o.HOLDING=2]="HOLDING",o[o.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(J||(J={}));const yn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],_n=150,qr=window.matchMedia("(forced-colors: active)");class Gt extends y{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=J.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new pa(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(e){this.attachableController.htmlFor=e}get control(){return this.attachableController.control}set control(e){this.attachableController.control=e}attach(e){this.attachableController.attach(e)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const e={hovered:this.hovered,pressed:this.pressed};return c`<div class="surface ${P(e)}"></div>`}update(e){e.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(e)}handlePointerenter(e){this.shouldReactToEvent(e)&&(this.hovered=!0)}handlePointerleave(e){this.shouldReactToEvent(e)&&(this.hovered=!1,this.state!==J.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state===J.HOLDING){this.state=J.WAITING_FOR_CLICK;return}if(this.state===J.TOUCH_DELAY){this.state=J.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e)){this.state=J.WAITING_FOR_CLICK,this.startPressAnimation(e);return}this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=J.TOUCH_DELAY,await new Promise(t=>{setTimeout(t,_n)}),this.state===J.TOUCH_DELAY&&(this.state=J.HOLDING,this.startPressAnimation(e)))}}handleClick(){if(!this.disabled){if(this.state===J.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===J.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation())}}handlePointercancel(e){this.shouldReactToEvent(e)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:e,width:t}=this.getBoundingClientRect(),i=Math.max(e,t),r=Math.max(bn*i,mn),s=Math.floor(i*un),h=Math.sqrt(t**2+e**2)+vn;this.initialSize=s,this.rippleScale=`${(h+r)/s}`,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(e){const{scrollX:t,scrollY:i}=window,{left:r,top:s}=this.getBoundingClientRect(),n=t+r,h=i+s,{pageX:p,pageY:v}=e;return{x:p-n,y:v-h}}getTranslationCoordinates(e){const{height:t,width:i}=this.getBoundingClientRect(),r={x:(i-this.initialSize)/2,y:(t-this.initialSize)/2};let s;return e instanceof PointerEvent?s=this.getNormalizedPointerEventCoords(e):s={x:i/2,y:t/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:r}}startPressAnimation(e){var n;if(!this.mdRoot)return;this.pressed=!0,(n=this.growAnimation)==null||n.cancel(),this.determineRippleSize();const{startPoint:t,endPoint:i}=this.getTranslationCoordinates(e),r=`${t.x}px, ${t.y}px`,s=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${r}) scale(1)`,`translate(${s}) scale(${this.rippleScale})`]},{pseudoElement:fn,duration:pn,easing:be.STANDARD,fill:gn})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=J.INACTIVE;const e=this.growAnimation;let t=1/0;if(typeof(e==null?void 0:e.currentTime)=="number"?t=e.currentTime:e!=null&&e.currentTime&&(t=e.currentTime.to("ms").value),t>=va){this.pressed=!1;return}await new Promise(i=>{setTimeout(i,va-t)}),this.growAnimation===e&&(this.pressed=!1)}shouldReactToEvent(e){if(this.disabled||!e.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==e.pointerId)return!1;if(e.type==="pointerenter"||e.type==="pointerleave")return!this.isTouch(e);const t=e.buttons===1;return this.isTouch(e)||t}inBounds({x:e,y:t}){const{top:i,left:r,bottom:s,right:n}=this.getBoundingClientRect();return e>=r&&e<=n&&t>=i&&t<=s}isTouch({pointerType:e}){return e==="touch"}async handleEvent(e){if(!(qr!=null&&qr.matches))switch(e.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(e);break;case"pointerdown":await this.handlePointerdown(e);break;case"pointerenter":this.handlePointerenter(e);break;case"pointerleave":this.handlePointerleave(e);break;case"pointerup":this.handlePointerup(e);break}}onControlChange(e,t){for(const i of yn)e==null||e.removeEventListener(i,this),t==null||t.addEventListener(i,this)}}d([l({type:Boolean,reflect:!0})],Gt.prototype,"disabled",void 0),d([w()],Gt.prototype,"hovered",void 0),d([w()],Gt.prototype,"pressed",void 0),d([k(".surface")],Gt.prototype,"mdRoot",void 0);/**
|
|
102
102
|
* @license
|
|
103
103
|
* Copyright 2024 Google LLC
|
|
104
104
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -107,7 +107,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2022 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: Apache-2.0
|
|
110
|
-
*/let zi=class extends
|
|
110
|
+
*/let zi=class extends Gt{};zi.styles=[xn],zi=d([g("md-ripple")],zi);const Yt=Object.freeze(Object.defineProperty({__proto__:null,get MdRipple(){return zi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2023 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -127,11 +127,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
127
127
|
* @license
|
|
128
128
|
* Copyright 2021 Google LLC
|
|
129
129
|
* SPDX-License-Identifier: Apache-2.0
|
|
130
|
-
*/function Ii(o){const e=new MouseEvent("click",{bubbles:!0});return o.dispatchEvent(e),e}function
|
|
130
|
+
*/function Ii(o){const e=new MouseEvent("click",{bubbles:!0});return o.dispatchEvent(e),e}function Xt(o){return o.currentTarget!==o.target||o.composedPath()[0]!==o.target||o.target.disabled?!1:!wn(o)}function wn(o){const e=jr;return e&&(o.preventDefault(),o.stopImmediatePropagation()),Sn(),e}let jr=!1;async function Sn(){jr=!0,await null,jr=!1}/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright 2019 Google LLC
|
|
133
133
|
* SPDX-License-Identifier: Apache-2.0
|
|
134
|
-
*/const kn=Ye(y);class V extends kn{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[K].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{!
|
|
134
|
+
*/const kn=Ye(y);class V extends kn{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[K].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{!Xt(e)||!this.buttonElement||(this.focus(),Ii(this.buttonElement))},this.addEventListener("click",this.handleActivationClick)}focus(){var e;(e=this.buttonElement)==null||e.focus()}blur(){var e;(e=this.buttonElement)==null||e.blur()}render(){var r;const e=this.disabled&&!this.href,t=this.href?this.renderLink():this.renderButton(),i=this.href?"link":"button";return c`
|
|
135
135
|
${(r=this.renderElevationOrOutline)==null?void 0:r.call(this)}
|
|
136
136
|
<div class="background"></div>
|
|
137
137
|
<md-focus-ring part="focus-ring" for=${i}></md-focus-ring>
|
|
@@ -182,12 +182,12 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
182
182
|
* @license
|
|
183
183
|
* Copyright 2024 Google LLC
|
|
184
184
|
* SPDX-License-Identifier: Apache-2.0
|
|
185
|
-
*/const
|
|
185
|
+
*/const Zt=b`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host([disabled]){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host([disabled]) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host([disabled]) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host([disabled]){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([disabled]) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
|
|
186
186
|
`;/**
|
|
187
187
|
* @license
|
|
188
188
|
* Copyright 2021 Google LLC
|
|
189
189
|
* SPDX-License-Identifier: Apache-2.0
|
|
190
|
-
*/let Wr=class extends $n{};Wr.styles=[
|
|
190
|
+
*/let Wr=class extends $n{};Wr.styles=[Zt,Ur,Cn],Wr=d([g("md-elevated-button")],Wr);/**
|
|
191
191
|
* @license
|
|
192
192
|
* Copyright 2021 Google LLC
|
|
193
193
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -200,7 +200,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
200
200
|
* @license
|
|
201
201
|
* Copyright 2021 Google LLC
|
|
202
202
|
* SPDX-License-Identifier: Apache-2.0
|
|
203
|
-
*/let Ti=class extends En{};Ti.styles=[
|
|
203
|
+
*/let Ti=class extends En{};Ti.styles=[Zt,Ur,An],Ti=d([g("md-filled-button")],Ti);const zn=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledButton(){return Ti}},Symbol.toStringTag,{value:"Module"}));/**
|
|
204
204
|
* @license
|
|
205
205
|
* Copyright 2021 Google LLC
|
|
206
206
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -213,7 +213,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright 2021 Google LLC
|
|
215
215
|
* SPDX-License-Identifier: Apache-2.0
|
|
216
|
-
*/let Oi=class extends In{};Oi.styles=[
|
|
216
|
+
*/let Oi=class extends In{};Oi.styles=[Zt,Ur,Tn],Oi=d([g("md-filled-tonal-button")],Oi);const On=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledTonalButton(){return Oi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
217
217
|
* @license
|
|
218
218
|
* Copyright 2021 Google LLC
|
|
219
219
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -226,7 +226,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
226
226
|
* @license
|
|
227
227
|
* Copyright 2021 Google LLC
|
|
228
228
|
* SPDX-License-Identifier: Apache-2.0
|
|
229
|
-
*/let Li=class extends Ln{};Li.styles=[
|
|
229
|
+
*/let Li=class extends Ln{};Li.styles=[Zt,Pn],Li=d([g("md-outlined-button")],Li);const Dn=Object.freeze(Object.defineProperty({__proto__:null,get MdOutlinedButton(){return Li}},Symbol.toStringTag,{value:"Module"}));/**
|
|
230
230
|
* @license
|
|
231
231
|
* Copyright 2021 Google LLC
|
|
232
232
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -239,7 +239,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
239
239
|
* @license
|
|
240
240
|
* Copyright 2021 Google LLC
|
|
241
241
|
* SPDX-License-Identifier: Apache-2.0
|
|
242
|
-
*/let Pi=class extends Rn{};Pi.styles=[
|
|
242
|
+
*/let Pi=class extends Rn{};Pi.styles=[Zt,Bn],Pi=d([g("md-text-button")],Pi);const Mn=Object.freeze(Object.defineProperty({__proto__:null,get MdTextButton(){return Pi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
243
243
|
* @license
|
|
244
244
|
* Copyright 2021 Google LLC
|
|
245
245
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -247,11 +247,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
247
247
|
* @license
|
|
248
248
|
* Copyright 2023 Google LLC
|
|
249
249
|
* SPDX-License-Identifier: Apache-2.0
|
|
250
|
-
*/const
|
|
250
|
+
*/const nt=Symbol("createValidator"),lt=Symbol("getValidityAnchor"),Kr=Symbol("privateValidator"),Le=Symbol("privateSyncValidity"),Di=Symbol("privateCustomValidationMessage");function Jt(o){var e;class t extends o{constructor(){super(...arguments),this[e]=""}get validity(){return this[Le](),this[K].validity}get validationMessage(){return this[Le](),this[K].validationMessage}get willValidate(){return this[Le](),this[K].willValidate}checkValidity(){return this[Le](),this[K].checkValidity()}reportValidity(){return this[Le](),this[K].reportValidity()}setCustomValidity(r){this[Di]=r,this[Le]()}requestUpdate(r,s,n){super.requestUpdate(r,s,n),this[Le]()}firstUpdated(r){super.firstUpdated(r),this[Le]()}[(e=Di,Le)](){this[Kr]||(this[Kr]=this[nt]());const{validity:r,validationMessage:s}=this[Kr].getValidity(),n=!!this[Di],h=this[Di]||s;this[K].setValidity({...r,customError:n},h,this[lt]()??void 0)}[nt](){throw new Error("Implement [createValidator]")}[lt](){throw new Error("Implement [getValidityAnchor]")}}return t}/**
|
|
251
251
|
* @license
|
|
252
252
|
* Copyright 2023 Google LLC
|
|
253
253
|
* SPDX-License-Identifier: Apache-2.0
|
|
254
|
-
*/const Pe=Symbol("getFormValue"),
|
|
254
|
+
*/const Pe=Symbol("getFormValue"),Qt=Symbol("getFormState");function kt(o){class e extends o{get form(){return this[K].form}get labels(){return this[K].labels}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get disabled(){return this.hasAttribute("disabled")}set disabled(i){this.toggleAttribute("disabled",i)}attributeChangedCallback(i,r,s){if(i==="name"||i==="disabled"){const n=i==="disabled"?r!==null:r;this.requestUpdate(i,n);return}super.attributeChangedCallback(i,r,s)}requestUpdate(i,r,s){super.requestUpdate(i,r,s),this[K].setFormValue(this[Pe](),this[Qt]())}[Pe](){throw new Error("Implement [getFormValue]")}[Qt](){return this[Pe]()}formDisabledCallback(i){this.disabled=i}}return e.formAssociated=!0,d([l({noAccessor:!0})],e.prototype,"name",null),d([l({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}/**
|
|
255
255
|
* @license
|
|
256
256
|
* Copyright 2023 Google LLC
|
|
257
257
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -263,7 +263,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright 2019 Google LLC
|
|
265
265
|
* SPDX-License-Identifier: Apache-2.0
|
|
266
|
-
*/const Hn=
|
|
266
|
+
*/const Hn=Jt(kt(Ye(y)));class fe extends Hn{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,this.addEventListener("click",e=>{!Xt(e)||!this.input||(this.focus(),Ii(this.input))})}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,i=this.prevIndeterminate,r=this.checked&&!this.indeterminate,s=this.indeterminate,n=P({disabled:this.disabled,selected:r||s,unselected:!r&&!s,checked:r,indeterminate:s,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":i,"prev-disabled":this.prevDisabled}),{ariaLabel:h,ariaInvalid:p}=this;return c`
|
|
267
267
|
<div class="container ${n}">
|
|
268
268
|
<input
|
|
269
269
|
type="checkbox"
|
|
@@ -287,7 +287,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
287
287
|
<rect class="mark long" />
|
|
288
288
|
</svg>
|
|
289
289
|
</div>
|
|
290
|
-
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){Xe(this,e)}[Pe](){return!this.checked||this.indeterminate?null:this.value}[
|
|
290
|
+
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){Xe(this,e)}[Pe](){return!this.checked||this.indeterminate?null:this.value}[Qt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[nt](){return new ga(()=>this)}[lt](){return this.input}}ee(fe),fe.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean})],fe.prototype,"checked",void 0),d([l({type:Boolean})],fe.prototype,"indeterminate",void 0),d([l({type:Boolean})],fe.prototype,"required",void 0),d([l()],fe.prototype,"value",void 0),d([w()],fe.prototype,"prevChecked",void 0),d([w()],fe.prototype,"prevDisabled",void 0),d([w()],fe.prototype,"prevIndeterminate",void 0),d([k("input")],fe.prototype,"input",void 0);/**
|
|
291
291
|
* @license
|
|
292
292
|
* Copyright 2024 Google LLC
|
|
293
293
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -321,7 +321,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
321
321
|
* @license
|
|
322
322
|
* Copyright 2023 Google LLC
|
|
323
323
|
* SPDX-License-Identifier: Apache-2.0
|
|
324
|
-
*/class
|
|
324
|
+
*/class ei extends De{constructor(){super(...arguments),this.elevated=!1,this.href="",this.target=""}get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&this.disabled}getContainerClasses(){return{...super.getContainerClasses(),disabled:!this.href&&this.disabled,elevated:this.elevated,link:!!this.href}}renderPrimaryAction(e){const{ariaLabel:t}=this;return this.href?c`
|
|
325
325
|
<a
|
|
326
326
|
class="primary action"
|
|
327
327
|
id="link"
|
|
@@ -339,7 +339,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
339
339
|
type="button"
|
|
340
340
|
>${e}</button
|
|
341
341
|
>
|
|
342
|
-
`}renderOutline(){return this.elevated?c`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}}d([l({type:Boolean})],
|
|
342
|
+
`}renderOutline(){return this.elevated?c`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}}d([l({type:Boolean})],ei.prototype,"elevated",void 0),d([l()],ei.prototype,"href",void 0),d([l()],ei.prototype,"target",void 0);/**
|
|
343
343
|
* @license
|
|
344
344
|
* Copyright 2024 Google LLC
|
|
345
345
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -358,7 +358,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
358
358
|
* @license
|
|
359
359
|
* Copyright 2023 Google LLC
|
|
360
360
|
* SPDX-License-Identifier: Apache-2.0
|
|
361
|
-
*/let Mi=class extends
|
|
361
|
+
*/let Mi=class extends ei{};Mi.styles=[Bi,Yr,Nn],Mi=d([g("md-assist-chip")],Mi);const qn=Object.freeze(Object.defineProperty({__proto__:null,get MdAssistChip(){return Mi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
362
362
|
* @license
|
|
363
363
|
* Copyright 2023 Google LLC
|
|
364
364
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -405,7 +405,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
405
405
|
* @license
|
|
406
406
|
* Copyright 2023 Google LLC
|
|
407
407
|
* SPDX-License-Identifier: Apache-2.0
|
|
408
|
-
*/class
|
|
408
|
+
*/class ct extends _a{constructor(){super(...arguments),this.elevated=!1,this.removable=!1,this.selected=!1,this.hasSelectedIcon=!1}get primaryId(){return"button"}getContainerClasses(){return{...super.getContainerClasses(),elevated:this.elevated,selected:this.selected,"has-trailing":this.removable,"has-icon":this.hasIcon||this.selected}}renderPrimaryAction(e){const{ariaLabel:t}=this;return c`
|
|
409
409
|
<button
|
|
410
410
|
class="primary action"
|
|
411
411
|
id="button"
|
|
@@ -422,7 +422,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
422
422
|
d="M6.75012 12.1274L3.62262 8.99988L2.55762 10.0574L6.75012 14.2499L15.7501 5.24988L14.6926 4.19238L6.75012 12.1274Z" />
|
|
423
423
|
</svg>
|
|
424
424
|
</slot>
|
|
425
|
-
`:super.renderLeadingIcon()}renderTrailingAction(e){return this.removable?xa({focusListener:e,ariaLabel:this.ariaLabelRemove,disabled:this.disabled}):u}renderOutline(){return this.elevated?c`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}handleClick(e){if(this.disabled)return;const t=this.selected;if(this.selected=!this.selected,!Xe(this,e)){this.selected=t;return}}}d([l({type:Boolean})],
|
|
425
|
+
`:super.renderLeadingIcon()}renderTrailingAction(e){return this.removable?xa({focusListener:e,ariaLabel:this.ariaLabelRemove,disabled:this.disabled}):u}renderOutline(){return this.elevated?c`<md-elevation part="elevation"></md-elevation>`:super.renderOutline()}handleClick(e){if(this.disabled)return;const t=this.selected;if(this.selected=!this.selected,!Xe(this,e)){this.selected=t;return}}}d([l({type:Boolean})],ct.prototype,"elevated",void 0),d([l({type:Boolean})],ct.prototype,"removable",void 0),d([l({type:Boolean,reflect:!0})],ct.prototype,"selected",void 0),d([l({type:Boolean,reflect:!0,attribute:"has-selected-icon"})],ct.prototype,"hasSelectedIcon",void 0),d([k(".primary.action")],ct.prototype,"primaryAction",void 0),d([k(".trailing.action")],ct.prototype,"trailingAction",void 0);/**
|
|
426
426
|
* @license
|
|
427
427
|
* Copyright 2024 Google LLC
|
|
428
428
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -441,11 +441,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
441
441
|
* @license
|
|
442
442
|
* Copyright 2023 Google LLC
|
|
443
443
|
* SPDX-License-Identifier: Apache-2.0
|
|
444
|
-
*/let Ni=class extends
|
|
444
|
+
*/let Ni=class extends ct{};Ni.styles=[Bi,Yr,Sa,wa,Wn],Ni=d([g("md-filter-chip")],Ni);const Kn=Object.freeze(Object.defineProperty({__proto__:null,get MdFilterChip(){return Ni}},Symbol.toStringTag,{value:"Module"}));/**
|
|
445
445
|
* @license
|
|
446
446
|
* Copyright 2023 Google LLC
|
|
447
447
|
* SPDX-License-Identifier: Apache-2.0
|
|
448
|
-
*/class
|
|
448
|
+
*/class dt extends _a{constructor(){super(...arguments),this.avatar=!1,this.href="",this.target="",this.removeOnly=!1,this.selected=!1}get primaryId(){return this.href?"link":this.removeOnly?"":"button"}get rippleDisabled(){return!this.href&&this.disabled}get primaryAction(){return this.removeOnly?null:this.renderRoot.querySelector(".primary.action")}getContainerClasses(){return{...super.getContainerClasses(),avatar:this.avatar,disabled:!this.href&&this.disabled,link:!!this.href,selected:this.selected,"has-trailing":!0}}renderPrimaryAction(e){const{ariaLabel:t}=this;return this.href?c`
|
|
449
449
|
<a
|
|
450
450
|
class="primary action"
|
|
451
451
|
id="link"
|
|
@@ -467,7 +467,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
467
467
|
type="button"
|
|
468
468
|
>${e}</button
|
|
469
469
|
>
|
|
470
|
-
`}renderTrailingAction(e){return xa({focusListener:e,ariaLabel:this.ariaLabelRemove,disabled:!this.href&&this.disabled,tabbable:this.removeOnly})}}d([l({type:Boolean})],
|
|
470
|
+
`}renderTrailingAction(e){return xa({focusListener:e,ariaLabel:this.ariaLabelRemove,disabled:!this.href&&this.disabled,tabbable:this.removeOnly})}}d([l({type:Boolean})],dt.prototype,"avatar",void 0),d([l()],dt.prototype,"href",void 0),d([l()],dt.prototype,"target",void 0),d([l({type:Boolean,attribute:"remove-only"})],dt.prototype,"removeOnly",void 0),d([l({type:Boolean,reflect:!0})],dt.prototype,"selected",void 0),d([k(".trailing.action")],dt.prototype,"trailingAction",void 0);/**
|
|
471
471
|
* @license
|
|
472
472
|
* Copyright 2024 Google LLC
|
|
473
473
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -476,11 +476,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
476
476
|
* @license
|
|
477
477
|
* Copyright 2023 Google LLC
|
|
478
478
|
* SPDX-License-Identifier: Apache-2.0
|
|
479
|
-
*/let Xr=class extends
|
|
479
|
+
*/let Xr=class extends dt{};Xr.styles=[Bi,Sa,wa,Gn],Xr=d([g("md-input-chip")],Xr);/**
|
|
480
480
|
* @license
|
|
481
481
|
* Copyright 2023 Google LLC
|
|
482
482
|
* SPDX-License-Identifier: Apache-2.0
|
|
483
|
-
*/class Yn extends
|
|
483
|
+
*/class Yn extends ei{}/**
|
|
484
484
|
* @license
|
|
485
485
|
* Copyright 2024 Google LLC
|
|
486
486
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -568,7 +568,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
568
568
|
* @license
|
|
569
569
|
* Copyright 2023 Google LLC
|
|
570
570
|
* SPDX-License-Identifier: Apache-2.0
|
|
571
|
-
*/class
|
|
571
|
+
*/class $t extends y{constructor(){super(...arguments),this.size="medium",this.label="",this.lowered=!1}render(){const{ariaLabel:e}=this;return c`
|
|
572
572
|
<button
|
|
573
573
|
class="fab ${P(this.getRenderClasses())}"
|
|
574
574
|
aria-label=${e||u}>
|
|
@@ -583,11 +583,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
583
583
|
aria-hidden=${e||this.label?"true":u}>
|
|
584
584
|
<span></span>
|
|
585
585
|
</slot>
|
|
586
|
-
</span>`}}ee(
|
|
586
|
+
</span>`}}ee($t),$t.shadowRootOptions={mode:"open",delegatesFocus:!0},d([l({reflect:!0})],$t.prototype,"size",void 0),d([l()],$t.prototype,"label",void 0),d([l({type:Boolean})],$t.prototype,"lowered",void 0);/**
|
|
587
587
|
* @license
|
|
588
588
|
* Copyright 2023 Google LLC
|
|
589
589
|
* SPDX-License-Identifier: Apache-2.0
|
|
590
|
-
*/class eo extends
|
|
590
|
+
*/class eo extends $t{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}d([l()],eo.prototype,"variant",void 0);/**
|
|
591
591
|
* @license
|
|
592
592
|
* Copyright 2024 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -718,7 +718,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
718
718
|
* Copyright 2020 Google LLC
|
|
719
719
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
720
720
|
*/const Ea=Symbol.for(""),hl=o=>{if((o==null?void 0:o.r)===Ea)return o==null?void 0:o._$litStatic$},te=(o,...e)=>({_$litStatic$:e.reduce((t,i,r)=>t+(s=>{if(s._$litStatic$!==void 0)return s._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${s}. Use 'unsafeStatic' to pass non-literal values, but
|
|
721
|
-
take care to ensure page security.`)})(i)+o[r+1],o[0]),r:Ea}),Aa=new Map,pl=o=>(e,...t)=>{const i=t.length;let r,s;const n=[],h=[];let p,v=0,f=!1;for(;v<i;){for(p=e[v];v<i&&(s=t[v],(r=hl(s))!==void 0);)p+=r+e[++v],f=!0;v!==i&&h.push(s),n.push(p),v++}if(v===i&&n.push(e[i]),f){const m=n.join("$$lit$$");(e=Aa.get(m))===void 0&&(n.raw=n,Aa.set(m,e=n)),t=h}return o(e,...t)},
|
|
721
|
+
take care to ensure page security.`)})(i)+o[r+1],o[0]),r:Ea}),Aa=new Map,pl=o=>(e,...t)=>{const i=t.length;let r,s;const n=[],h=[];let p,v=0,f=!1;for(;v<i;){for(p=e[v];v<i&&(s=t[v],(r=hl(s))!==void 0);)p+=r+e[++v],f=!0;v!==i&&h.push(s),n.push(p),v++}if(v===i&&n.push(e[i]),f){const m=n.join("$$lit$$");(e=Aa.get(m))===void 0&&(n.raw=n,Aa.set(m,e=n)),t=h}return o(e,...t)},ti=pl(c);/**
|
|
722
722
|
* @license
|
|
723
723
|
* Copyright 2022 Google LLC
|
|
724
724
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -726,7 +726,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
726
726
|
* @license
|
|
727
727
|
* Copyright 2018 Google LLC
|
|
728
728
|
* SPDX-License-Identifier: Apache-2.0
|
|
729
|
-
*/const ul=Ye(y);class j extends ul{constructor(){super(...arguments),this.disabled=!1,this.flipIconInRtl=!1,this.href="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=za(this,this.flipIconInRtl)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[K].form}get labels(){return this[K].labels}willUpdate(){this.href&&(this.disabled=!1)}render(){const e=this.href?te`div`:te`button`,{ariaLabel:t,ariaHasPopup:i,ariaExpanded:r}=this,s=t&&this.ariaLabelSelected,n=this.toggle?this.selected:u;let h=u;return this.href||(h=s&&this.selected?this.ariaLabelSelected:t),
|
|
729
|
+
*/const ul=Ye(y);class j extends ul{constructor(){super(...arguments),this.disabled=!1,this.flipIconInRtl=!1,this.href="",this.target="",this.ariaLabelSelected="",this.toggle=!1,this.selected=!1,this.type="submit",this.value="",this.flipIcon=za(this,this.flipIconInRtl)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[K].form}get labels(){return this[K].labels}willUpdate(){this.href&&(this.disabled=!1)}render(){const e=this.href?te`div`:te`button`,{ariaLabel:t,ariaHasPopup:i,ariaExpanded:r}=this,s=t&&this.ariaLabelSelected,n=this.toggle?this.selected:u;let h=u;return this.href||(h=s&&this.selected?this.ariaLabelSelected:t),ti`<${e}
|
|
730
730
|
class="icon-button ${P(this.getRenderClasses())}"
|
|
731
731
|
id="button"
|
|
732
732
|
aria-label="${h||u}"
|
|
@@ -794,11 +794,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
794
794
|
* @license
|
|
795
795
|
* Copyright 2023 Google LLC
|
|
796
796
|
* SPDX-License-Identifier: Apache-2.0
|
|
797
|
-
*/function Ia(o,e=$e){const t=Yi(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ta(o,e=$e){const t=Oa(o,e);return t&&(t.tabIndex=0,t.focus()),t}function xl(o,e=$e){const t=
|
|
797
|
+
*/function Ia(o,e=$e){const t=Yi(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Ta(o,e=$e){const t=Oa(o,e);return t&&(t.tabIndex=0,t.focus()),t}function xl(o,e=$e){const t=Ct(o,e);return t&&(t.item.tabIndex=-1),t}function Ct(o,e=$e){for(let t=0;t<o.length;t++){const i=o[t];if(i.tabIndex===0&&e(i))return{item:i,index:t}}return null}function Yi(o,e=$e){for(const t of o)if(e(t))return t;return null}function Oa(o,e=$e){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return i}return null}function wl(o,e,t=$e,i=!0){for(let r=1;r<o.length;r++){const s=(r+e)%o.length;if(s<e&&!i)return null;const n=o[s];if(t(n))return n}return o[e]?o[e]:null}function Sl(o,e,t=$e,i=!0){for(let r=1;r<o.length;r++){const s=(e-r+o.length)%o.length;if(s>e&&!i)return null;const n=o[s];if(t(n))return n}return o[e]?o[e]:null}function La(o,e,t=$e,i=!0){if(e){const r=wl(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return Ia(o,t)}function Pa(o,e,t=$e,i=!0){if(e){const r=Sl(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return Ta(o,t)}function Xi(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function Da(){return new Event("request-activation",{bubbles:!0,composed:!0})}function $e(o){return!o.disabled}/**
|
|
798
798
|
* @license
|
|
799
799
|
* Copyright 2023 Google LLC
|
|
800
800
|
* SPDX-License-Identifier: Apache-2.0
|
|
801
|
-
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Ra{constructor(e){this.handleKeydown=f=>{const m=f.key;if(f.defaultPrevented||!this.isNavigableKey(m))return;const _=this.items;if(!_.length)return;const x=
|
|
801
|
+
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Ra{constructor(e){this.handleKeydown=f=>{const m=f.key;if(f.defaultPrevented||!this.isNavigableKey(m))return;const _=this.items;if(!_.length)return;const x=Ct(_,this.isActivatable);f.preventDefault();const S=this.isRtl(),C=S?G.ArrowRight:G.ArrowLeft,E=S?G.ArrowLeft:G.ArrowRight;let A=null;switch(m){case G.ArrowDown:case E:A=La(_,x,this.isActivatable,this.wrapNavigation());break;case G.ArrowUp:case C:A=Pa(_,x,this.isActivatable,this.wrapNavigation());break;case G.Home:A=Ia(_,this.isActivatable);break;case G.End:A=Ta(_,this.isActivatable);break}A&&x&&x.item!==A&&(x.item.tabIndex=-1)},this.onDeactivateItems=()=>{const f=this.items;for(const m of f)this.deactivateItem(m)},this.onRequestActivation=f=>{this.onDeactivateItems();const m=f.target;this.activateItem(m),m.focus()},this.onSlotchange=()=>{const f=this.items;let m=!1;for(const x of f){if(!x.disabled&&x.tabIndex>-1&&!m){m=!0,x.tabIndex=0;continue}x.tabIndex=-1}if(m)return;const _=Yi(f,this.isActivatable);_&&(_.tabIndex=0)};const{isItem:t,getPossibleItems:i,isRtl:r,deactivateItem:s,activateItem:n,isNavigableKey:h,isActivatable:p,wrapNavigation:v}=e;this.isItem=t,this.getPossibleItems=i,this.isRtl=r,this.deactivateItem=s,this.activateItem=n,this.isNavigableKey=h,this.isActivatable=p,this.wrapNavigation=v??(()=>!0)}get items(){const e=this.getPossibleItems(),t=[];for(const i of e){if(this.isItem(i)){t.push(i);continue}const s=i.item;s&&this.isItem(s)&&t.push(s)}return t}activateNextItem(){const e=this.items,t=Ct(e,this.isActivatable);return t&&(t.item.tabIndex=-1),La(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=Ct(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Pa(e,t,this.isActivatable,this.wrapNavigation())}}/**
|
|
802
802
|
* @license
|
|
803
803
|
* Copyright 2021 Google LLC
|
|
804
804
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -858,7 +858,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
858
858
|
<slot name="end" slot="end"></slot>
|
|
859
859
|
${this.renderBody()}
|
|
860
860
|
</md-item>
|
|
861
|
-
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.type){case"link":i=te`a`;break;case"button":i=te`button`;break;default:case"text":i=te`li`;break}const r=this.type!=="text",s=t&&this.target?this.target:u;return
|
|
861
|
+
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.type){case"link":i=te`a`;break;case"button":i=te`button`;break;default:case"text":i=te`li`;break}const r=this.type!=="text",s=t&&this.target?this.target:u;return ti`
|
|
862
862
|
<${i}
|
|
863
863
|
id="item"
|
|
864
864
|
tabindex="${this.isDisabled||!r?-1:0}"
|
|
@@ -901,15 +901,15 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
901
901
|
* @license
|
|
902
902
|
* Copyright 2018 Google LLC
|
|
903
903
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
904
|
-
*/const Ma="important",Il=" !"+Ma,
|
|
904
|
+
*/const Ma="important",Il=" !"+Ma,ht=Fr(class extends Nr{constructor(o){var e;if(super(o),o.type!==Ge.ATTRIBUTE||o.name!=="style"||((e=o.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((e,t)=>{const i=o[t];return i==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[e]){const{style:t}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?t.removeProperty(i):t[i]=null);for(const i in e){const r=e[i];if(r!=null){this.ft.add(i);const s=typeof r=="string"&&r.endsWith(Il);i.includes("-")||s?t.setProperty(i,s?r.slice(0,-11):r,s?Ma:""):t[i]=r}}return de}});/**
|
|
905
905
|
* @license
|
|
906
906
|
* Copyright 2023 Google LLC
|
|
907
907
|
* SPDX-License-Identifier: Apache-2.0
|
|
908
|
-
*/function Tl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Ha=Tl;function Ol(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function lo(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const Ze={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},
|
|
908
|
+
*/function Tl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Ha=Tl;function Ol(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function lo(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const Ze={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},Et={SPACE:"Space",ENTER:"Enter"},co={CLICK_SELECTION:"click-selection",KEYDOWN:"keydown"},ho={ESCAPE:"Escape",SPACE:Et.SPACE,ENTER:Et.ENTER};function Fa(o){return Object.values(ho).some(e=>e===o)}function Ll(o){return Object.values(Et).some(e=>e===o)}function po(o,e){const t=new Event("md-contains",{bubbles:!0,composed:!0});let i=[];const r=n=>{i=n.composedPath()};return e.addEventListener("md-contains",r),o.dispatchEvent(t),e.removeEventListener("md-contains",r),i.length>0}const ge={NONE:"none",LIST_ROOT:"list-root",FIRST_ITEM:"first-item",LAST_ITEM:"last-item"};/**
|
|
909
909
|
* @license
|
|
910
910
|
* Copyright 2023 Google LLC
|
|
911
911
|
* SPDX-License-Identifier: Apache-2.0
|
|
912
|
-
*/const Ji={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class Pl{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:i,surfaceCorner:r,positioning:s,xOffset:n,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),f=r.toLowerCase().trim();if(!e||!t)return;const m=window.innerWidth,_=window.innerHeight,x=document.createElement("div");x.style.opacity="0",x.style.position="fixed",x.style.display="block",x.style.inset="0",document.body.appendChild(x);const S=x.getBoundingClientRect();x.remove();const C=window.innerHeight-S.bottom,E=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const A=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),z=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[Z,q]=f.split("-"),[M,je]=v.split("-"),Ue=getComputedStyle(e).direction==="ltr";let{blockInset:me,blockOutOfBoundsCorrection:le,surfaceBlockProperty:
|
|
912
|
+
*/const Ji={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class Pl{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:"none"},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){const{surfaceEl:e,anchorEl:t,anchorCorner:i,surfaceCorner:r,positioning:s,xOffset:n,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),f=r.toLowerCase().trim();if(!e||!t)return;const m=window.innerWidth,_=window.innerHeight,x=document.createElement("div");x.style.opacity="0",x.style.position="fixed",x.style.display="block",x.style.inset="0",document.body.appendChild(x);const S=x.getBoundingClientRect();x.remove();const C=window.innerHeight-S.bottom,E=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const A=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),z=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[Z,q]=f.split("-"),[M,je]=v.split("-"),Ue=getComputedStyle(e).direction==="ltr";let{blockInset:me,blockOutOfBoundsCorrection:le,surfaceBlockProperty:xt}=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:M,surfaceBlock:Z,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});if(le){const _i=Z==="start"?"end":"start",xi=M==="start"?"end":"start",Se=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:xi,surfaceBlock:_i,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});le>Se.blockOutOfBoundsCorrection&&(me=Se.blockInset,le=Se.blockOutOfBoundsCorrection,xt=Se.surfaceBlockProperty)}let{inlineInset:Oe,inlineOutOfBoundsCorrection:it,surfaceInlineProperty:Cr}=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:je,surfaceInline:q,xOffset:n,positioning:s,isLTR:Ue,windowInnerWidth:m,inlineScrollbarWidth:E});if(it){const _i=q==="start"?"end":"start",xi=je==="start"?"end":"start",Se=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:xi,surfaceInline:_i,xOffset:n,positioning:s,isLTR:Ue,windowInnerWidth:m,inlineScrollbarWidth:E});Math.abs(it)>Math.abs(Se.inlineOutOfBoundsCorrection)&&(Oe=Se.inlineInset,it=Se.inlineOutOfBoundsCorrection,Cr=Se.surfaceInlineProperty)}p==="move"&&(me=me-le,Oe=Oe-it),this.surfaceStylesInternal={display:"block",opacity:"1",[xt]:`${me}px`,[Cr]:`${Oe}px`},p==="resize"&&(le&&(this.surfaceStylesInternal.height=`${A.height-le}px`),it&&(this.surfaceStylesInternal.width=`${A.width-it}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:i,anchorBlock:r,surfaceBlock:s,yOffset:n,positioning:h,windowInnerHeight:p,blockScrollbarHeight:v}=e,f=h==="fixed"||h==="document"?1:0,m=h==="document"?1:0,_=s==="start"?1:0,x=s==="end"?1:0,C=(r!==s?1:0)*i.height+n,E=_*i.top+x*(p-i.bottom-v),A=_*window.scrollY-x*window.scrollY,z=Math.abs(Math.min(0,p-E-C-t.height));return{blockInset:f*E+m*A+C,blockOutOfBoundsCorrection:z,surfaceBlockProperty:s==="start"?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:i,anchorInline:r,anchorRect:s,surfaceRect:n,xOffset:h,positioning:p,windowInnerWidth:v,inlineScrollbarWidth:f}=e,m=p==="fixed"||p==="document"?1:0,_=p==="document"?1:0,x=t?1:0,S=t?0:1,C=i==="start"?1:0,E=i==="end"?1:0,z=(r!==i?1:0)*s.width+h,Z=C*s.left+E*(v-s.right-f),q=C*(v-s.right-f)+E*s.left,M=x*Z+S*q,je=C*window.scrollX-E*window.scrollX,Ue=E*window.scrollX-C*window.scrollX,me=x*je+S*Ue,le=Math.abs(Math.min(0,v-M-z-n.width)),xt=m*M+z+_*me;let Oe=i==="start"?"inset-inline-start":"inset-inline-end";return(p==="document"||p==="fixed")&&(i==="start"&&t||i==="end"&&!t?Oe="left":Oe="right"),{inlineInset:xt,inlineOutOfBoundsCorrection:le,surfaceInlineProperty:Oe}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[n,h]of Object.entries(e))if(t=t||h!==this.lastValues[n],t)break;const i=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,s=!!e.surfaceEl;t&&r&&s&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):i&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:"none"},this.host.requestUpdate();const e=this.getProperties().surfaceEl;e!=null&&e.popover&&(e!=null&&e.isConnected)&&e.hidePopover()}}/**
|
|
913
913
|
* @license
|
|
914
914
|
* Copyright 2023 Google LLC
|
|
915
915
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -917,10 +917,10 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
917
917
|
* @license
|
|
918
918
|
* Copyright 2023 Google LLC
|
|
919
919
|
* SPDX-License-Identifier: Apache-2.0
|
|
920
|
-
*/const Na=200,qa=new Set([G.ArrowDown,G.ArrowUp,G.Home,G.End]),Rl=new Set([G.ArrowLeft,G.ArrowRight,...qa]);function Bl(o=document){var t;let e=o.activeElement;for(;e&&((t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement);)e=e.shadowRoot.activeElement;return e}class H extends y{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=Na,this.anchorCorner=Ji.END_START,this.menuCorner=Ji.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=ge.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=hn(),this.listController=new Ra({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return Rl.has(e);const i=getComputedStyle(this).direction==="rtl"?G.ArrowLeft:G.ArrowRight;return e===i?!0:qa.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Dl(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Pl(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(po(e.relatedTarget,this)||this.pointerPath.length!==0&&po(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const i=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=i},this.onOpened=async()=>{this.lastFocusedElement=Bl();const e=this.items,t=
|
|
920
|
+
*/const Na=200,qa=new Set([G.ArrowDown,G.ArrowUp,G.Home,G.End]),Rl=new Set([G.ArrowLeft,G.ArrowRight,...qa]);function Bl(o=document){var t;let e=o.activeElement;for(;e&&((t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement);)e=e.shadowRoot.activeElement;return e}class H extends y{get openDirection(){return this.menuCorner.split("-")[0]==="start"?"DOWN":"UP"}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate("anchorElement")}constructor(){super(),this.anchor="",this.positioning="absolute",this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.typeaheadDelay=Na,this.anchorCorner=Ji.END_START,this.menuCorner=Ji.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=ge.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=hn(),this.listController=new Ra({isItem:e=>e.hasAttribute("md-menu-item"),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction==="rtl",deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>{if(!this.isSubmenu)return Rl.has(e);const i=getComputedStyle(this).direction==="rtl"?G.ArrowLeft:G.ArrowRight;return e===i?!0:qa.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Dl(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Pl(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning==="popover"?"document":this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!=="popover"?"move":"resize"})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!=="document"&&this.positioning!=="fixed"&&this.positioning!=="popover"||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{const t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(po(e.relatedTarget,this)||this.pointerPath.length!==0&&po(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;const i=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=i},this.onOpened=async()=>{this.lastFocusedElement=Bl();const e=this.items,t=Ct(e);t&&this.defaultFocus!==ge.NONE&&(t.item.tabIndex=-1);let i=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):i=!!await this.animateOpen(),this.defaultFocus){case ge.FIRST_ITEM:const r=Yi(e);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case ge.LAST_ITEM:const s=Oa(e);s&&(s.tabIndex=0,s.focus(),await s.updateComplete);break;case ge.LIST_ROOT:this.focus();break;default:case ge.NONE:break}i||this.dispatchEvent(new Event("opened"))},this.beforeClose=async()=>{var e,t;this.open=!1,this.skipRestoreFocus||(t=(e=this.lastFocusedElement)==null?void 0:e.focus)==null||t.call(e),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event("closing")),this.dispatchEvent(new Event("closed")))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;const t=e.composedPath();!this.stayOpenOnOutsideClick&&!t.includes(this)&&!t.includes(this.anchorElement)&&(this.open=!1)},this.internals.role="menu",this.addEventListener("keydown",this.handleKeydown),this.addEventListener("keydown",this.captureKeydown,{capture:!0}),this.addEventListener("focusout",this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){if(e.has("open")){if(this.open){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}update(e){e.has("open")&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has("positioning")&&this.positioning==="popover"&&!this.showPopover&&(this.positioning="fixed"),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return c`
|
|
921
921
|
<div
|
|
922
922
|
class="menu ${P(this.getSurfaceClasses())}"
|
|
923
|
-
style=${
|
|
923
|
+
style=${ht(this.menuPositionController.surfaceStyles)}
|
|
924
924
|
popover=${this.positioning==="popover"?"manual":u}>
|
|
925
925
|
${this.renderElevation()}
|
|
926
926
|
<div class="items">
|
|
@@ -961,7 +961,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
961
961
|
<slot name="end" slot="end"></slot>
|
|
962
962
|
${this.renderBody()}
|
|
963
963
|
</md-item>
|
|
964
|
-
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.menuItemController.tagName){case"a":i=te`a`;break;case"button":i=te`button`;break;default:case"li":i=te`li`;break}const r=t&&this.target?this.target:u;return
|
|
964
|
+
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.menuItemController.tagName){case"a":i=te`a`;break;case"button":i=te`button`;break;default:case"li":i=te`li`;break}const r=t&&this.target?this.target:u;return ti`
|
|
965
965
|
<${i}
|
|
966
966
|
id="item"
|
|
967
967
|
tabindex=${this.disabled&&!t?-1:0}
|
|
@@ -1017,7 +1017,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1017
1017
|
@close-menu=${this.onCloseSubmenu}
|
|
1018
1018
|
@slotchange=${this.onSlotchange}>
|
|
1019
1019
|
</slot>
|
|
1020
|
-
`}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(lo()),this.dispatchEvent(Xi()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(Xi()),this.dispatchEvent(Ol()),this.item.selected=!0,!t){let i=s=>{};const r=new Promise(s=>{i=s});e.addEventListener("opened",i,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(lo()),e.quick=!0,e.close(),this.dispatchEvent(Xi());let t=r=>{};const i=new Promise(r=>{t=r});e.addEventListener("closed",t,{once:!0}),await i}onSlotchange(){var t;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(t=this.menu)!=null&&t.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const i=t&&(Ze.LEFT===e.code||Ze.RIGHT===e.code);if((e.code===
|
|
1020
|
+
`}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(lo()),this.dispatchEvent(Xi()),e.ariaHidden="true"},{once:!0}),e.positioning==="document"&&(e.positioning="absolute"),e.quick=!0,e.hasOverflow=!0,e.anchorCorner=this.anchorCorner,e.menuCorner=this.menuCorner,e.anchorElement=this.item,e.defaultFocus="first-item",e.removeAttribute("aria-hidden"),e.skipRestoreFocus=!1;const t=e.open;if(e.show(),this.item.ariaExpanded="true",this.item.ariaHasPopup="menu",e.id&&this.item.setAttribute("aria-controls",e.id),this.dispatchEvent(Xi()),this.dispatchEvent(Ol()),this.item.selected=!0,!t){let i=s=>{};const r=new Promise(s=>{i=s});e.addEventListener("opened",i,{once:!0}),await r}}async close(){const e=this.menu;if(!e||!e.open)return;this.dispatchEvent(lo()),e.quick=!0,e.close(),this.dispatchEvent(Xi());let t=r=>{};const i=new Promise(r=>{t=r});e.addEventListener("closed",t,{once:!0}),await i}onSlotchange(){var t;if(!this.item)return;this.item.ariaExpanded="false",this.item.ariaHasPopup="menu",(t=this.menu)!=null&&t.id&&this.item.setAttribute("aria-controls",this.menu.id),this.item.keepOpen=!0;const e=this.menu;e&&(e.isSubmenu=!0,e.ariaHidden="true")}onClick(){this.show()}async onKeydown(e){const t=this.isSubmenuOpenKey(e.code);if(e.defaultPrevented)return;const i=t&&(Ze.LEFT===e.code||Ze.RIGHT===e.code);if((e.code===Et.SPACE||i)&&(e.preventDefault(),i&&e.stopPropagation()),!t)return;const r=this.menu;if(!r)return;const s=r.items,n=Yi(s);if(n){await this.show(),n.tabIndex=0,n.focus();return}}onCloseSubmenu(e){const{itemPath:t,reason:i}=e.detail;if(t.push(this.item),this.dispatchEvent(lo()),i.kind===co.KEYDOWN&&i.key===ho.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Da());return}this.dispatchEvent(Xi())}async onSubMenuKeydown(e){var r;if(e.defaultPrevented)return;const{close:t,keyCode:i}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(i===Ze.LEFT||i===Ze.RIGHT)&&e.stopPropagation(),await this.close(),xl(this.menu.items),(r=this.item)==null||r.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const i=getComputedStyle(this).direction==="rtl"?Ze.LEFT:Ze.RIGHT;switch(e){case i:case Et.SPACE:case Et.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const i=getComputedStyle(this).direction==="rtl"?Ze.RIGHT:Ze.LEFT;switch(e){case i:case ho.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}}d([l({attribute:"anchor-corner"})],Je.prototype,"anchorCorner",void 0),d([l({attribute:"menu-corner"})],Je.prototype,"menuCorner",void 0),d([l({type:Number,attribute:"hover-open-delay"})],Je.prototype,"hoverOpenDelay",void 0),d([l({type:Number,attribute:"hover-close-delay"})],Je.prototype,"hoverCloseDelay",void 0),d([l({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],Je.prototype,"isSubMenu",void 0),d([Y({slot:"item",flatten:!0})],Je.prototype,"items",void 0),d([Y({slot:"menu",flatten:!0})],Je.prototype,"menus",void 0);/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2024 Google LLC
|
|
1023
1023
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1030,7 +1030,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1030
1030
|
* @license
|
|
1031
1031
|
* Copyright 2023 Google LLC
|
|
1032
1032
|
* SPDX-License-Identifier: Apache-2.0
|
|
1033
|
-
*/class
|
|
1033
|
+
*/class pt extends y{constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.fourColor=!1}render(){const{ariaLabel:e}=this;return c`
|
|
1034
1034
|
<div
|
|
1035
1035
|
class="progress ${P(this.getRenderClasses())}"
|
|
1036
1036
|
role="progressbar"
|
|
@@ -1040,11 +1040,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1040
1040
|
aria-valuenow=${this.indeterminate?u:this.value}
|
|
1041
1041
|
>${this.renderIndicator()}</div
|
|
1042
1042
|
>
|
|
1043
|
-
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}ee(
|
|
1043
|
+
`}getRenderClasses(){return{indeterminate:this.indeterminate,"four-color":this.fourColor}}}ee(pt),d([l({type:Number})],pt.prototype,"value",void 0),d([l({type:Number})],pt.prototype,"max",void 0),d([l({type:Boolean})],pt.prototype,"indeterminate",void 0),d([l({type:Boolean,attribute:"four-color"})],pt.prototype,"fourColor",void 0);/**
|
|
1044
1044
|
* @license
|
|
1045
1045
|
* Copyright 2023 Google LLC
|
|
1046
1046
|
* SPDX-License-Identifier: Apache-2.0
|
|
1047
|
-
*/class Fl extends
|
|
1047
|
+
*/class Fl extends pt{renderIndicator(){return this.indeterminate?this.renderIndeterminateContainer():this.renderDeterminateContainer()}renderDeterminateContainer(){const e=(1-this.value/this.max)*100;return c`
|
|
1048
1048
|
<svg viewBox="0 0 4800 4800">
|
|
1049
1049
|
<circle class="track" pathLength="100"></circle>
|
|
1050
1050
|
<circle
|
|
@@ -1072,10 +1072,10 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1072
1072
|
* @license
|
|
1073
1073
|
* Copyright 2023 Google LLC
|
|
1074
1074
|
* SPDX-License-Identifier: Apache-2.0
|
|
1075
|
-
*/class Ua extends
|
|
1075
|
+
*/class Ua extends pt{constructor(){super(...arguments),this.buffer=0}renderIndicator(){const e={transform:`scaleX(${(this.indeterminate?1:this.value/this.max)*100}%)`},t=this.buffer??0,i=t>0,s={transform:`scaleX(${(this.indeterminate||!i?1:t/this.max)*100}%)`},n=this.indeterminate||!i||t>=this.max||this.value>=this.max;return c`
|
|
1076
1076
|
<div class="dots" ?hidden=${n}></div>
|
|
1077
|
-
<div class="inactive-track" style=${
|
|
1078
|
-
<div class="bar primary-bar" style=${
|
|
1077
|
+
<div class="inactive-track" style=${ht(s)}></div>
|
|
1078
|
+
<div class="bar primary-bar" style=${ht(e)}>
|
|
1079
1079
|
<div class="bar-inner"></div>
|
|
1080
1080
|
</div>
|
|
1081
1081
|
<div class="bar secondary-bar">
|
|
@@ -1106,7 +1106,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1106
1106
|
* @license
|
|
1107
1107
|
* Copyright 2018 Google LLC
|
|
1108
1108
|
* SPDX-License-Identifier: Apache-2.0
|
|
1109
|
-
*/var Ka;const yo=Symbol("checked");let Ul=0;const Wl=
|
|
1109
|
+
*/var Ka;const yo=Symbol("checked");let Ul=0;const Wl=Jt(kt(Ye(Wa(y))));class ii extends Wl{get checked(){return this[yo]}set checked(e){const t=this.checked;t!==e&&(this[yo]=e,this.requestUpdate("checked",t),this.selectionController.handleCheckedChange())}constructor(){super(),this.maskId=`cutout${++Ul}`,this[Ka]=!1,this.required=!1,this.value="on",this.selectionController=new jl(this),this.addController(this.selectionController),this[K].role="radio",this.addEventListener("click",this.handleClick.bind(this)),this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e={checked:this.checked};return c`
|
|
1110
1110
|
<div class="container ${P(e)}" aria-hidden="true">
|
|
1111
1111
|
<md-ripple
|
|
1112
1112
|
part="ripple"
|
|
@@ -1135,7 +1135,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1135
1135
|
.value=${this.value}
|
|
1136
1136
|
?disabled=${this.disabled} />
|
|
1137
1137
|
</div>
|
|
1138
|
-
`}updated(){this[K].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(
|
|
1138
|
+
`}updated(){this[K].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(Xt(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(Ka=yo,Pe)](){return this.checked?this.value:null}[Qt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[nt](){return new Vl(()=>this.selectionController?this.selectionController.controls:[this])}[lt](){return this.container}}d([l({type:Boolean})],ii.prototype,"checked",null),d([l({type:Boolean})],ii.prototype,"required",void 0),d([l()],ii.prototype,"value",void 0),d([k(".container")],ii.prototype,"container",void 0);/**
|
|
1139
1139
|
* @license
|
|
1140
1140
|
* Copyright 2024 Google LLC
|
|
1141
1141
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1144,7 +1144,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1144
1144
|
* @license
|
|
1145
1145
|
* Copyright 2022 Google LLC
|
|
1146
1146
|
* SPDX-License-Identifier: Apache-2.0
|
|
1147
|
-
*/let _o=class extends
|
|
1147
|
+
*/let _o=class extends ii{};_o.styles=[Kl],_o=d([g("md-radio")],_o);/**
|
|
1148
1148
|
* @license
|
|
1149
1149
|
* Copyright 2023 Google LLC
|
|
1150
1150
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1160,13 +1160,13 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1160
1160
|
* @license
|
|
1161
1161
|
* Copyright 2023 Google LLC
|
|
1162
1162
|
* SPDX-License-Identifier: Apache-2.0
|
|
1163
|
-
*/var Ya;const lr=Symbol("value"),Ql=Ga(
|
|
1163
|
+
*/var Ya;const lr=Symbol("value"),Ql=Ga(Jt(kt(Ye(y))));class L extends Ql{get value(){return this[lr]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){var e;return((e=this.menu)==null?void 0:e.items)??[]}get selectedIndex(){const[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([e])=>e)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.supportingText="",this.error=!1,this.menuPositioning="popover",this.clampMenuWidth=!1,this.typeaheadDelay=Na,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[Ya]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=ge.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener("focus",this.handleFocus.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}select(e){const t=this.options.find(i=>i.value===e);t&&this.selectItem(t)}selectIndex(e){const t=this.options[e];t&&this.selectItem(t)}reset(){for(const e of this.options)e.selected=e.hasAttribute("selected");this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=""}[(Ya=lr,rr)](e){var i;e==null||e.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&((i=this.field)==null||i.reannounceError())}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){const t=this.getBoundingClientRect();this.selectWidth=t.width}this.prevOpen=this.open,super.update(e)}render(){return c`
|
|
1164
1164
|
<span
|
|
1165
1165
|
class="select ${P(this.getRenderClasses())}"
|
|
1166
1166
|
@focusout=${this.handleFocusout}>
|
|
1167
1167
|
${this.renderField()} ${this.renderMenu()}
|
|
1168
1168
|
</span>
|
|
1169
|
-
`}async firstUpdated(e){var t;await((t=this.menu)==null?void 0:t.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),!this.lastSelectedOptionRecords.length&&!this.options.length&&setTimeout(()=>{this.updateValueAndDisplayText()}),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return
|
|
1169
|
+
`}async firstUpdated(e){var t;await((t=this.menu)==null?void 0:t.updateComplete),this.lastSelectedOptionRecords.length||this.initUserSelection(),!this.lastSelectedOptionRecords.length&&!this.options.length&&setTimeout(()=>{this.updateValueAndDisplayText()}),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){return ti`
|
|
1170
1170
|
<${this.fieldTag}
|
|
1171
1171
|
aria-haspopup="listbox"
|
|
1172
1172
|
role="combobox"
|
|
@@ -1225,7 +1225,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1225
1225
|
part="menu"
|
|
1226
1226
|
exportparts="focus-ring: menu-focus-ring"
|
|
1227
1227
|
anchor="field"
|
|
1228
|
-
style=${
|
|
1228
|
+
style=${ht({"--__menu-min-width":`${this.selectWidth}px`,"--__menu-max-width":this.clampMenuWidth?`${this.selectWidth}px`:void 0})}
|
|
1229
1229
|
no-navigation-wrap
|
|
1230
1230
|
.open=${this.open}
|
|
1231
1231
|
.quick=${this.quick}
|
|
@@ -1242,7 +1242,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1242
1242
|
@request-deselection=${this.handleRequestDeselection}>
|
|
1243
1243
|
${this.renderMenuContent()}
|
|
1244
1244
|
</md-menu>
|
|
1245
|
-
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=ge.NONE;break;case"End":this.defaultFocus=ge.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=ge.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:h}=t;if(!h)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(h[he.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&po(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Jl(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[lr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[lr]="",this.displayText="";return t}async handleOpening(e){var s,n,h;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==ge.NONE)return;const t=this.menu.items,i=(h=
|
|
1245
|
+
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=ge.NONE;break;case"End":this.defaultFocus=ge.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=ge.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:h}=t;if(!h)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(h[he.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&po(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Jl(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[lr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[lr]="",this.displayText="";return t}async handleOpening(e){var s,n,h;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==ge.NONE)return;const t=this.menu.items,i=(h=Ct(t))==null?void 0:h.item;let[r]=this.lastSelectedOptionRecords[0]??[null];i&&i!==r&&(i.tabIndex=-1),r=r??t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){Xe(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,i=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind==="click-selection"?r=this.selectItem(i):t.kind==="keydown"&&Ll(t.key)?r=this.selectItem(i):(i.tabIndex=-1,i.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([i])=>{e!==i&&(i.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[Pe](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){var e;(e=this.field)==null||e.click()}[nt](){return new Zl(()=>this)}[lt](){return this.field}}ee(L),L.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean})],L.prototype,"quick",void 0),d([l({type:Boolean})],L.prototype,"required",void 0),d([l({type:String,attribute:"error-text"})],L.prototype,"errorText",void 0),d([l()],L.prototype,"label",void 0),d([l({type:Boolean,attribute:"no-asterisk"})],L.prototype,"noAsterisk",void 0),d([l({type:String,attribute:"supporting-text"})],L.prototype,"supportingText",void 0),d([l({type:Boolean,reflect:!0})],L.prototype,"error",void 0),d([l({attribute:"menu-positioning"})],L.prototype,"menuPositioning",void 0),d([l({type:Boolean,attribute:"clamp-menu-width"})],L.prototype,"clampMenuWidth",void 0),d([l({type:Number,attribute:"typeahead-delay"})],L.prototype,"typeaheadDelay",void 0),d([l({type:Boolean,attribute:"has-leading-icon"})],L.prototype,"hasLeadingIcon",void 0),d([l({attribute:"display-text"})],L.prototype,"displayText",void 0),d([l({attribute:"menu-align"})],L.prototype,"menuAlign",void 0),d([l()],L.prototype,"value",null),d([l({type:Number,attribute:"selected-index"})],L.prototype,"selectedIndex",null),d([w()],L.prototype,"nativeError",void 0),d([w()],L.prototype,"nativeErrorText",void 0),d([w()],L.prototype,"focused",void 0),d([w()],L.prototype,"open",void 0),d([w()],L.prototype,"defaultFocus",void 0),d([k(".field")],L.prototype,"field",void 0),d([k("md-menu")],L.prototype,"menu",void 0),d([k("#label")],L.prototype,"labelEl",void 0),d([Y({slot:"leading-icon",flatten:!0})],L.prototype,"leadingIcons",void 0);/**
|
|
1246
1246
|
* @license
|
|
1247
1247
|
* Copyright 2023 Google LLC
|
|
1248
1248
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1336,9 +1336,9 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1336
1336
|
* @license
|
|
1337
1337
|
* Copyright 2023 Google LLC
|
|
1338
1338
|
* SPDX-License-Identifier: Apache-2.0
|
|
1339
|
-
*/const lc
|
|
1339
|
+
*/const lc=kt(Ye(y));class T extends lc{get nameStart(){return this.getAttribute("name-start")??this.name}set nameStart(e){this.setAttribute("name-start",e)}get nameEnd(){return this.getAttribute("name-end")??this.nameStart}set nameEnd(e){this.setAttribute("name-end",e)}get renderAriaLabelStart(){const{ariaLabel:e}=this;return this.ariaLabelStart||e&&`${e} start`||this.valueLabelStart||String(this.valueStart)}get renderAriaValueTextStart(){return this.ariaValueTextStart||this.valueLabelStart||String(this.valueStart)}get renderAriaLabelEnd(){const{ariaLabel:e}=this;return this.range?this.ariaLabelEnd||e&&`${e} end`||this.valueLabelEnd||String(this.valueEnd):e||this.valueLabel||String(this.value)}get renderAriaValueTextEnd(){if(this.range)return this.ariaValueTextEnd||this.valueLabelEnd||String(this.valueEnd);const{ariaValueText:e}=this;return e||this.valueLabel||String(this.value)}constructor(){super(),this.min=0,this.max=100,this.valueLabel="",this.valueLabelStart="",this.valueLabelEnd="",this.ariaLabelStart="",this.ariaValueTextStart="",this.ariaLabelEnd="",this.ariaValueTextEnd="",this.step=1,this.ticks=!1,this.labeled=!1,this.range=!1,this.handleStartHover=!1,this.handleEndHover=!1,this.startOnTop=!1,this.handlesOverlapping=!1,this.ripplePointerId=1,this.isRedispatchingEvent=!1,this.addEventListener("click",e=>{!Xt(e)||!this.inputEnd||(this.focus(),Ii(this.inputEnd))})}focus(){var e;(e=this.inputEnd)==null||e.focus()}willUpdate(e){var i,r;this.renderValueStart=e.has("valueStart")?this.valueStart:(i=this.inputStart)==null?void 0:i.valueAsNumber;const t=e.has("valueEnd")&&this.range||e.has("value");this.renderValueEnd=t?this.range?this.valueEnd:this.value:(r=this.inputEnd)==null?void 0:r.valueAsNumber,e.get("handleStartHover")!==void 0?this.toggleRippleHover(this.rippleStart,this.handleStartHover):e.get("handleEndHover")!==void 0&&this.toggleRippleHover(this.rippleEnd,this.handleEndHover)}updated(e){var t,i;if(this.range&&(this.renderValueStart=this.inputStart.valueAsNumber),this.renderValueEnd=this.inputEnd.valueAsNumber,this.range){const r=(this.max-this.min)/3;if(this.valueStart===void 0){this.inputStart.valueAsNumber=this.min+r;const s=this.inputStart.valueAsNumber;this.valueStart=this.renderValueStart=s}if(this.valueEnd===void 0){this.inputEnd.valueAsNumber=this.min+2*r;const s=this.inputEnd.valueAsNumber;this.valueEnd=this.renderValueEnd=s}}else this.value??(this.value=this.renderValueEnd);if(e.has("range")||e.has("renderValueStart")||e.has("renderValueEnd")||this.isUpdatePending){const r=(t=this.handleStart)==null?void 0:t.querySelector(".handleNub"),s=(i=this.handleEnd)==null?void 0:i.querySelector(".handleNub");this.handlesOverlapping=cc(r,s)}this.performUpdate()}render(){const e=this.step===0?1:this.step,t=Math.max(this.max-this.min,e),i=this.range?((this.renderValueStart??this.min)-this.min)/t:0,r=((this.renderValueEnd??this.min)-this.min)/t,s={"--_start-fraction":String(i),"--_end-fraction":String(r),"--_tick-count":String(t/e)},n={ranged:this.range},h=this.valueLabelStart||String(this.renderValueStart),p=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),v={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},f={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},m={start:!0,hover:this.handleStartHover,label:h},_={start:!1,hover:this.handleEndHover,label:p},x={hover:this.handleStartHover||this.handleEndHover};return c` <div
|
|
1340
1340
|
class="container ${P(n)}"
|
|
1341
|
-
style=${
|
|
1341
|
+
style=${ht(s)}>
|
|
1342
1342
|
${$o(this.range,()=>this.renderInput(v))}
|
|
1343
1343
|
${this.renderInput(f)} ${this.renderTrack()}
|
|
1344
1344
|
<div class="handleContainerPadded">
|
|
@@ -1405,7 +1405,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1405
1405
|
* @license
|
|
1406
1406
|
* Copyright 2021 Google LLC
|
|
1407
1407
|
* SPDX-License-Identifier: Apache-2.0
|
|
1408
|
-
*/const uc=
|
|
1408
|
+
*/const uc=Jt(kt(Ye(y)));class Be extends uc{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",e=>{!Xt(e)||!this.input||(this.focus(),Ii(this.input))}),pc(this,"keydown"),this.addEventListener("keydown",e=>{hc(e,()=>{e.defaultPrevented||e.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return c`
|
|
1409
1409
|
<div class="switch ${P(this.getRenderClasses())}">
|
|
1410
1410
|
<input
|
|
1411
1411
|
id="switch"
|
|
@@ -1449,7 +1449,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1449
1449
|
d="M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z" />
|
|
1450
1450
|
</svg>
|
|
1451
1451
|
</slot>
|
|
1452
|
-
`}renderTouchTarget(){return c`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){const t=e.target;this.selected=t.checked}handleChange(e){Xe(this,e)}[Pe](){return this.selected?this.value:null}[
|
|
1452
|
+
`}renderTouchTarget(){return c`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){const t=e.target;this.selected=t.checked}handleChange(e){Xe(this,e)}[Pe](){return this.selected?this.value:null}[Qt](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(e){this.selected=e==="true"}[nt](){return new ga(()=>({checked:this.selected,required:this.required}))}[lt](){return this.input}}ee(Be),Be.shadowRootOptions={mode:"open",delegatesFocus:!0},d([l({type:Boolean})],Be.prototype,"selected",void 0),d([l({type:Boolean})],Be.prototype,"icons",void 0),d([l({type:Boolean,attribute:"show-only-selected-icon"})],Be.prototype,"showOnlySelectedIcon",void 0),d([l({type:Boolean})],Be.prototype,"required",void 0),d([l()],Be.prototype,"value",void 0),d([k("input")],Be.prototype,"input",void 0);/**
|
|
1453
1453
|
* @license
|
|
1454
1454
|
* Copyright 2024 Google LLC
|
|
1455
1455
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1462,7 +1462,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1462
1462
|
* @license
|
|
1463
1463
|
* Copyright 2023 Google LLC
|
|
1464
1464
|
* SPDX-License-Identifier: Apache-2.0
|
|
1465
|
-
*/var es;const
|
|
1465
|
+
*/var es;const At=Symbol("indicator"),ts=Symbol("animateIndicator"),bc=Wa(y);class ye extends bc{get selected(){return this.active}set selected(e){this.active=e}constructor(){super(),this.isTab=!0,this.active=!1,this.hasIcon=!1,this.iconOnly=!1,this.fullWidthIndicator=!1,this.internals=this.attachInternals(),this.internals.role="tab",this.addEventListener("keydown",this.handleKeydown.bind(this))}render(){const e=c`<div class="indicator"></div>`;return c`<div
|
|
1466
1466
|
class="button"
|
|
1467
1467
|
role="presentation"
|
|
1468
1468
|
@click=${this.handleContentClick}>
|
|
@@ -1477,7 +1477,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1477
1477
|
${this.fullWidthIndicator?u:e}
|
|
1478
1478
|
</div>
|
|
1479
1479
|
${this.fullWidthIndicator?e:u}
|
|
1480
|
-
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(es=
|
|
1480
|
+
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(es=At,ts)](e){if(!this[At])return;this[At].getAnimations().forEach(i=>{i.cancel()});const t=this.getKeyframes(e);t!==null&&this[At].animate(t,{duration:250,easing:be.EMPHASIZED})}getKeyframes(e){var m;const t=fc();if(!this.active)return t?[{opacity:1},{transform:"none"}]:null;const i={},r=((m=e[At])==null?void 0:m.getBoundingClientRect())??{},s=r.left,n=r.width,h=this[At].getBoundingClientRect(),p=h.left,v=h.width,f=n/v;return!t&&s!==void 0&&p!==void 0&&!isNaN(f)?i.transform=`translateX(${(s-p).toFixed(4)}px) scaleX(${f.toFixed(4)})`:i.opacity=0,[i,{transform:"none"}]}handleSlotChange(){this.iconOnly=!1;for(const e of this.assignedDefaultNodes){const t=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||t)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}}d([l({type:Boolean,reflect:!0,attribute:"md-tab"})],ye.prototype,"isTab",void 0),d([l({type:Boolean,reflect:!0})],ye.prototype,"active",void 0),d([l({type:Boolean})],ye.prototype,"selected",null),d([l({type:Boolean,attribute:"has-icon"})],ye.prototype,"hasIcon",void 0),d([l({type:Boolean,attribute:"icon-only"})],ye.prototype,"iconOnly",void 0),d([k(".indicator")],ye.prototype,es,void 0),d([w()],ye.prototype,"fullWidthIndicator",void 0),d([Or({flatten:!0})],ye.prototype,"assignedDefaultNodes",void 0),d([Y({slot:"icon",flatten:!0})],ye.prototype,"assignedIcons",void 0);function fc(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}/**
|
|
1481
1481
|
* @license
|
|
1482
1482
|
* Copyright 2023 Google LLC
|
|
1483
1483
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1495,7 +1495,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1495
1495
|
* @license
|
|
1496
1496
|
* Copyright 2023 Google LLC
|
|
1497
1497
|
* SPDX-License-Identifier: Apache-2.0
|
|
1498
|
-
*/let
|
|
1498
|
+
*/let ri=class extends is{};ri.styles=[rs,gc],ri=d([g("md-primary-tab")],ri);/**
|
|
1499
1499
|
* @license
|
|
1500
1500
|
* Copyright 2023 Google LLC
|
|
1501
1501
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1508,18 +1508,18 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1508
1508
|
* @license
|
|
1509
1509
|
* Copyright 2023 Google LLC
|
|
1510
1510
|
* SPDX-License-Identifier: Apache-2.0
|
|
1511
|
-
*/let
|
|
1511
|
+
*/let oi=class extends yc{};oi.styles=[rs,_c],oi=d([g("md-secondary-tab")],oi);/**
|
|
1512
1512
|
* @license
|
|
1513
1513
|
* Copyright 2023 Google LLC
|
|
1514
1514
|
* SPDX-License-Identifier: Apache-2.0
|
|
1515
|
-
*/class
|
|
1515
|
+
*/class zt extends y{get activeTab(){return this.tabs.find(e=>e.active)??null}set activeTab(e){e&&this.activateTab(e)}get activeTabIndex(){return this.tabs.findIndex(e=>e.active)}set activeTabIndex(e){const t=()=>{const i=this.tabs[e];i&&this.activateTab(i)};if(!this.slotElement){this.updateComplete.then(t);return}t()}get focusedTab(){return this.tabs.find(e=>e.matches(":focus-within"))}constructor(){super(),this.autoActivate=!1,this.internals=this.attachInternals(),this.internals.role="tablist",this.addEventListener("keydown",this.handleKeydown.bind(this)),this.addEventListener("keyup",this.handleKeyup.bind(this)),this.addEventListener("focusout",this.handleFocusout.bind(this))}async scrollToTab(e){await this.updateComplete;const{tabs:t}=this;if(e??(e=this.activeTab),!e||!t.includes(e)||!this.tabsScrollerElement)return;for(const _ of this.tabs)await _.updateComplete;const i=e.offsetLeft,r=e.offsetWidth,s=this.scrollLeft,n=this.offsetWidth,h=48,p=i-h,v=i+r-n+h,f=Math.min(p,Math.max(v,s)),m=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:m,top:0,left:f})}render(){return c`
|
|
1516
1516
|
<div class="tabs">
|
|
1517
1517
|
<slot
|
|
1518
1518
|
@slotchange=${this.handleSlotChange}
|
|
1519
1519
|
@click=${this.handleTabClick}></slot>
|
|
1520
1520
|
</div>
|
|
1521
1521
|
<md-divider part="divider"></md-divider>
|
|
1522
|
-
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!xc(t)||t.active)&&this.activateTab(t)}activateTab(e){const{tabs:t}=this,i=this.activeTab;if(!(!t.includes(e)||i===e)){for(const r of t)r.active=r===e;if(i){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const s of t)s.active=s===i;return}e[ts](i)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const t of this.tabs)t.tabIndex=t===e?0:-1}async handleKeydown(e){await 0;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(e.defaultPrevented||!t&&!i&&!r&&!s)return;const{tabs:n}=this;if(n.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:n.length-1;else{const f=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:m}=this;if(!m)h=f?0:n.length-1;else{const _=this.tabs.indexOf(m);h=f?_+1:_-1,h>=n.length?h=0:h<0&&(h=n.length-1)}}const p=n[h];p.focus(),this.autoActivate?this.activateTab(p):this.updateFocusableTab(p)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}}d([Y({flatten:!0,selector:"[md-tab]"})],
|
|
1522
|
+
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!xc(t)||t.active)&&this.activateTab(t)}activateTab(e){const{tabs:t}=this,i=this.activeTab;if(!(!t.includes(e)||i===e)){for(const r of t)r.active=r===e;if(i){if(!this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))){for(const s of t)s.active=s===i;return}e[ts](i)}this.updateFocusableTab(e),this.scrollToTab(e)}}updateFocusableTab(e){for(const t of this.tabs)t.tabIndex=t===e?0:-1}async handleKeydown(e){await 0;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(e.defaultPrevented||!t&&!i&&!r&&!s)return;const{tabs:n}=this;if(n.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:n.length-1;else{const f=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:m}=this;if(!m)h=f?0:n.length-1;else{const _=this.tabs.indexOf(m);h=f?_+1:_-1,h>=n.length?h=0:h<0&&(h=n.length-1)}}const p=n[h];p.focus(),this.autoActivate?this.activateTab(p):this.updateFocusableTab(p)}handleKeyup(){this.scrollToTab(this.focusedTab??this.activeTab)}handleFocusout(){if(this.matches(":focus-within"))return;const{activeTab:e}=this;e&&this.updateFocusableTab(e)}handleSlotChange(){const e=this.tabs[0];!this.activeTab&&e&&this.activateTab(e),this.scrollToTab(this.activeTab)}}d([Y({flatten:!0,selector:"[md-tab]"})],zt.prototype,"tabs",void 0),d([l({type:Number,attribute:"active-tab-index"})],zt.prototype,"activeTabIndex",null),d([l({type:Boolean,attribute:"auto-activate"})],zt.prototype,"autoActivate",void 0),d([k(".tabs")],zt.prototype,"tabsScrollerElement",void 0),d([k("slot")],zt.prototype,"slotElement",void 0);function xc(o){return o instanceof HTMLElement&&o.hasAttribute("md-tab")}/**
|
|
1523
1523
|
* @license
|
|
1524
1524
|
* Copyright 2024 Google LLC
|
|
1525
1525
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1528,7 +1528,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1528
1528
|
* @license
|
|
1529
1529
|
* Copyright 2023 Google LLC
|
|
1530
1530
|
* SPDX-License-Identifier: Apache-2.0
|
|
1531
|
-
*/let
|
|
1531
|
+
*/let ai=class extends zt{};ai.styles=[wc],ai=d([g("md-tabs")],ai);/**
|
|
1532
1532
|
* @license
|
|
1533
1533
|
* Copyright 2024 Google LLC
|
|
1534
1534
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1549,15 +1549,15 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1549
1549
|
* @license
|
|
1550
1550
|
* Copyright 2023 Google LLC
|
|
1551
1551
|
* SPDX-License-Identifier: Apache-2.0
|
|
1552
|
-
*/class Ac extends Ri{computeValidity({state:e,renderedControl:t}){let i=t;
|
|
1552
|
+
*/class Ac extends Ri{computeValidity({state:e,renderedControl:t}){let i=t;si(e)&&!i?(i=this.inputControl||document.createElement("input"),this.inputControl=i):i||(i=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=i);const r=si(e)?i:null;if(r&&(r.type=e.type),i.value!==e.value&&(i.value=e.value),i.required=e.required,r){const s=e;s.pattern?r.pattern=s.pattern:r.removeAttribute("pattern"),s.min?r.min=s.min:r.removeAttribute("min"),s.max?r.max=s.max:r.removeAttribute("max"),s.step?r.step=s.step:r.removeAttribute("step")}return(e.minLength??-1)>-1?i.setAttribute("minlength",String(e.minLength)):i.removeAttribute("minlength"),(e.maxLength??-1)>-1?i.setAttribute("maxlength",String(e.maxLength)):i.removeAttribute("maxlength"),{validity:i.validity,validationMessage:i.validationMessage}}equals({state:e},{state:t}){const i=e.type===t.type&&e.value===t.value&&e.required===t.required&&e.minLength===t.minLength&&e.maxLength===t.maxLength;return!si(e)||!si(t)?i:i&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:si(e)?this.copyInput(e):this.copyTextArea(e),renderedControl:null}}copyInput(e){const{type:t,pattern:i,min:r,max:s,step:n}=e;return{...this.copySharedState(e),type:t,pattern:i,min:r,max:s,step:n}}copyTextArea(e){return{...this.copySharedState(e),type:e.type}}copySharedState({value:e,required:t,minLength:i,maxLength:r}){return{value:e,required:t,minLength:i,maxLength:r}}}function si(o){return o.type!=="textarea"}/**
|
|
1553
1553
|
* @license
|
|
1554
1554
|
* Copyright 2021 Google LLC
|
|
1555
1555
|
* SPDX-License-Identifier: Apache-2.0
|
|
1556
|
-
*/const zc=Ga(
|
|
1556
|
+
*/const zc=Ga(Jt(kt(Ye(y))));class $ extends zc{constructor(){super(...arguments),this.error=!1,this.errorText="",this.label="",this.noAsterisk=!1,this.required=!1,this.value="",this.prefixText="",this.suffixText="",this.hasLeadingIcon=!1,this.hasTrailingIcon=!1,this.supportingText="",this.textDirection="",this.rows=2,this.cols=20,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.noSpinner=!1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete="",this.dirty=!1,this.focused=!1,this.nativeError=!1,this.nativeErrorText=""}get selectionDirection(){return this.getInputOrTextarea().selectionDirection}set selectionDirection(e){this.getInputOrTextarea().selectionDirection=e}get selectionEnd(){return this.getInputOrTextarea().selectionEnd}set selectionEnd(e){this.getInputOrTextarea().selectionEnd=e}get selectionStart(){return this.getInputOrTextarea().selectionStart}set selectionStart(e){this.getInputOrTextarea().selectionStart=e}get valueAsNumber(){const e=this.getInput();return e?e.valueAsNumber:NaN}set valueAsNumber(e){const t=this.getInput();t&&(t.valueAsNumber=e,this.value=t.value)}get valueAsDate(){const e=this.getInput();return e?e.valueAsDate:null}set valueAsDate(e){const t=this.getInput();t&&(t.valueAsDate=e,this.value=t.value)}get hasError(){return this.error||this.nativeError}select(){this.getInputOrTextarea().select()}setRangeText(...e){this.getInputOrTextarea().setRangeText(...e),this.value=this.getInputOrTextarea().value}setSelectionRange(e,t,i){this.getInputOrTextarea().setSelectionRange(e,t,i)}stepDown(e){const t=this.getInput();t&&(t.stepDown(e),this.value=t.value)}stepUp(e){const t=this.getInput();t&&(t.stepUp(e),this.value=t.value)}reset(){this.dirty=!1,this.value=this.getAttribute("value")??"",this.nativeError=!1,this.nativeErrorText=""}attributeChangedCallback(e,t,i){e==="value"&&this.dirty||super.attributeChangedCallback(e,t,i)}render(){const e={disabled:this.disabled,error:!this.disabled&&this.hasError,textarea:this.type==="textarea","no-spinner":this.noSpinner};return c`
|
|
1557
1557
|
<span class="text-field ${P(e)}">
|
|
1558
1558
|
${this.renderField()}
|
|
1559
1559
|
</span>
|
|
1560
|
-
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return
|
|
1560
|
+
`}updated(e){const t=this.getInputOrTextarea().value;this.value!==t&&(this.value=t)}renderField(){return ti`<${this.fieldTag}
|
|
1561
1561
|
class="field"
|
|
1562
1562
|
count=${this.value.length}
|
|
1563
1563
|
?disabled=${this.disabled}
|
|
@@ -1589,7 +1589,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1589
1589
|
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||u,i=this.autocomplete,r=(this.maxLength??-1)>-1,s=(this.minLength??-1)>-1;if(this.type==="textarea")return c`
|
|
1590
1590
|
<textarea
|
|
1591
1591
|
class="input"
|
|
1592
|
-
style=${
|
|
1592
|
+
style=${ht(e)}
|
|
1593
1593
|
aria-describedby="description"
|
|
1594
1594
|
aria-invalid=${this.hasError}
|
|
1595
1595
|
aria-label=${t}
|
|
@@ -1614,7 +1614,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1614
1614
|
${n}
|
|
1615
1615
|
<input
|
|
1616
1616
|
class="input"
|
|
1617
|
-
style=${
|
|
1617
|
+
style=${ht(e)}
|
|
1618
1618
|
aria-describedby="description"
|
|
1619
1619
|
aria-invalid=${this.hasError}
|
|
1620
1620
|
aria-label=${t}
|
|
@@ -1641,7 +1641,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1641
1641
|
@select=${this.redispatchEvent} />
|
|
1642
1642
|
${h}
|
|
1643
1643
|
</div>
|
|
1644
|
-
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?c`<span class="${P({suffix:t,prefix:!t})}">${e}</span>`:u}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var e;this.focused=((e=this.inputOrTextarea)==null?void 0:e.matches(":focus"))??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){Xe(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Pe](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[
|
|
1644
|
+
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?c`<span class="${P({suffix:t,prefix:!t})}">${e}</span>`:u}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var e;this.focused=((e=this.inputOrTextarea)==null?void 0:e.matches(":focus"))??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){Xe(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Pe](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[nt](){return new Ac(()=>({state:this,renderedControl:this.inputOrTextarea}))}[lt](){return this.inputOrTextarea}[rr](e){var i;e==null||e.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&((i=this.field)==null||i.reannounceError())}}ee($),$.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean,reflect:!0})],$.prototype,"error",void 0),d([l({attribute:"error-text"})],$.prototype,"errorText",void 0),d([l()],$.prototype,"label",void 0),d([l({type:Boolean,attribute:"no-asterisk"})],$.prototype,"noAsterisk",void 0),d([l({type:Boolean,reflect:!0})],$.prototype,"required",void 0),d([l()],$.prototype,"value",void 0),d([l({attribute:"prefix-text"})],$.prototype,"prefixText",void 0),d([l({attribute:"suffix-text"})],$.prototype,"suffixText",void 0),d([l({type:Boolean,attribute:"has-leading-icon"})],$.prototype,"hasLeadingIcon",void 0),d([l({type:Boolean,attribute:"has-trailing-icon"})],$.prototype,"hasTrailingIcon",void 0),d([l({attribute:"supporting-text"})],$.prototype,"supportingText",void 0),d([l({attribute:"text-direction"})],$.prototype,"textDirection",void 0),d([l({type:Number})],$.prototype,"rows",void 0),d([l({type:Number})],$.prototype,"cols",void 0),d([l({reflect:!0})],$.prototype,"inputMode",void 0),d([l()],$.prototype,"max",void 0),d([l({type:Number})],$.prototype,"maxLength",void 0),d([l()],$.prototype,"min",void 0),d([l({type:Number})],$.prototype,"minLength",void 0),d([l({type:Boolean,attribute:"no-spinner"})],$.prototype,"noSpinner",void 0),d([l()],$.prototype,"pattern",void 0),d([l({reflect:!0,converter:Ec})],$.prototype,"placeholder",void 0),d([l({type:Boolean,reflect:!0})],$.prototype,"readOnly",void 0),d([l({type:Boolean,reflect:!0})],$.prototype,"multiple",void 0),d([l()],$.prototype,"step",void 0),d([l({reflect:!0})],$.prototype,"type",void 0),d([l({reflect:!0})],$.prototype,"autocomplete",void 0),d([w()],$.prototype,"dirty",void 0),d([w()],$.prototype,"focused",void 0),d([w()],$.prototype,"nativeError",void 0),d([w()],$.prototype,"nativeErrorText",void 0),d([k(".input")],$.prototype,"inputOrTextarea",void 0),d([k(".field")],$.prototype,"field",void 0),d([Y({slot:"leading-icon"})],$.prototype,"leadingIcons",void 0),d([Y({slot:"trailing-icon"})],$.prototype,"trailingIcons",void 0);/**
|
|
1645
1645
|
* @license
|
|
1646
1646
|
* Copyright 2021 Google LLC
|
|
1647
1647
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1667,7 +1667,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1667
1667
|
* @license
|
|
1668
1668
|
* Copyright 2021 Google LLC
|
|
1669
1669
|
* SPDX-License-Identifier: Apache-2.0
|
|
1670
|
-
*/let Ao=class extends Oc{constructor(){super(...arguments),this.fieldTag=te`md-outlined-field`}};Ao.styles=[as,Tc],Ao=d([g("md-outlined-text-field")],Ao);var Lc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,Q=(o,e,t,i)=>{for(var r=i>1?void 0:i?Pc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Lc(e,t,r),r};a.ScbAccordionItem=class extends y{constructor(){super(...arguments),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=a.ScbAccordionItem._uid(),this._onToggle=e=>{const t=e.currentTarget;this.open=!!t.open;const i=this.closest("scb-accordion");this.open&&i&&!i.hasAttribute("detached")&&i.querySelectorAll("scb-accordion-item").forEach(s=>{s!==this&&s.setOpen(!1)}),this._applyInertByOpen()}}static _uid(){var e,t;return((t=(e=globalThis.crypto)==null?void 0:e.randomUUID)==null?void 0:t.call(e))??`${a.ScbAccordionItem._uidPrefix}-${++a.ScbAccordionItem._uidSeq}`}async firstUpdated(){a.ScbAccordionItem._mdIconLoaded||(await Promise.resolve().then(()=>X),a.ScbAccordionItem._mdIconLoaded=!0),a.ScbAccordionItem._mdRippleLoaded||(await Promise.resolve().then(()=>
|
|
1670
|
+
*/let Ao=class extends Oc{constructor(){super(...arguments),this.fieldTag=te`md-outlined-field`}};Ao.styles=[as,Tc],Ao=d([g("md-outlined-text-field")],Ao);var Lc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,Q=(o,e,t,i)=>{for(var r=i>1?void 0:i?Pc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Lc(e,t,r),r};a.ScbAccordionItem=class extends y{constructor(){super(...arguments),this.open=!1,this.title="",this.content="",this.overline="",this.supportingText="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.imgHrefImage="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.density=0,this._unique=a.ScbAccordionItem._uid(),this._onToggle=e=>{const t=e.currentTarget;this.open=!!t.open;const i=this.closest("scb-accordion");this.open&&i&&!i.hasAttribute("detached")&&i.querySelectorAll("scb-accordion-item").forEach(s=>{s!==this&&s.setOpen(!1)}),this._applyInertByOpen()}}static _uid(){var e,t;return((t=(e=globalThis.crypto)==null?void 0:e.randomUUID)==null?void 0:t.call(e))??`${a.ScbAccordionItem._uidPrefix}-${++a.ScbAccordionItem._uidSeq}`}async firstUpdated(){a.ScbAccordionItem._mdIconLoaded||(await Promise.resolve().then(()=>X),a.ScbAccordionItem._mdIconLoaded=!0),a.ScbAccordionItem._mdRippleLoaded||(await Promise.resolve().then(()=>Yt),a.ScbAccordionItem._mdRippleLoaded=!0),this._applyInertByOpen()}_applyInertByOpen(){const e=this.renderRoot.querySelector(".scb-accordion-bottom"),t=this.renderRoot.querySelector("details");!e||!t||(t.open?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}_onKeyDown(e){const t=this.closest("scb-accordion"),r=Array.from((t==null?void 0:t.querySelectorAll("scb-accordion-item"))||[]).map(h=>{var p;return((p=h.renderRoot.querySelector("details"))==null?void 0:p.querySelector(".scb-accordion-top"))||null}).filter(h=>!!h),s=e.currentTarget,n=r.indexOf(s);switch(e.key){case"ArrowDown":e.preventDefault(),n<r.length-1&&r[n+1].focus();break;case"ArrowUp":e.preventDefault(),n>0&&r[n-1].focus();break;case"Home":e.preventDefault(),r.length&&r[0].focus();break;case"End":e.preventDefault(),r.length&&r[r.length-1].focus();break}}setOpen(e){this.open=!!e;const t=this.renderRoot.querySelector("details");t&&(t.open=this.open),this._applyInertByOpen()}updated(e){if(e.has("open")){const t=this.renderRoot.querySelector("details");t&&t.open!==this.open&&(t.open=this.open),this._applyInertByOpen(),this.dispatchEvent(new CustomEvent("open-changed",{detail:{open:this.open,title:this.title},bubbles:!0,composed:!0}))}}render(){const e=`bottom-${this._unique}`,t=`header-${this._unique}`,i=this.leading?this.leadingVariant==="image"&&this.imgHrefImage?c`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />`:this.leadingVariant==="avatar"?c`
|
|
1671
1671
|
<scb-avatar
|
|
1672
1672
|
label=${this.avatarLabel}
|
|
1673
1673
|
alt=${this.avatarAlt}
|
|
@@ -1958,7 +1958,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
1958
1958
|
${this.label}
|
|
1959
1959
|
${e&&this.trailingIcon?t:u}
|
|
1960
1960
|
</md-text-button>
|
|
1961
|
-
`;default:return c``}}},Ce([l({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),Ce([l({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),Ce([l({type:String})],a.ScbButton.prototype,"label",2),Ce([l({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),Ce([l({type:String})],a.ScbButton.prototype,"icon",2),Ce([l({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),Ce([l({type:String})],a.ScbButton.prototype,"href",2),Ce([l({type:String})],a.ScbButton.prototype,"target",2),Ce([l({type:String})],a.ScbButton.prototype,"rel",2),a.ScbButton=Ce([g("scb-button")],a.ScbButton);const Hc=Object.freeze(Object.defineProperty({__proto__:null,get ScbButton(){return a.ScbButton}},Symbol.toStringTag,{value:"Module"}));var Fc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Ee=(o,e,t,i)=>{for(var r=i>1?void 0:i?Nc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Fc(e,t,r),r};let qc=0;a.ScbTooltip=class extends y{constructor(){super(...arguments),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++qc}`,this._onTriggerMouseEnter=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTriggerFocus=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTooltipMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this.open=!0)},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||(this.open=!1))},this._onTriggerClick=()=>{this._clickActive=!this._clickActive,this._clickActive?this.open=!0:this._hoverActive||(this.open=!1)}}firstUpdated(){if(this._originalPosition=this.position,this._updateDelayCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open){const e=this._getTooltipElement();e&&this._showTooltip(e)}}updated(e){if(e.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has("delay")&&this._updateDelayCss(),e.has("open")){const t=this._getTooltipElement();if(!t)return;this.open?this._showTooltip(t):this._hideTooltip(t)}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null)}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_updateDelayCss(){const e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${e}s`)}_findTriggerElement(){const e=this.querySelector("[scb-tooltip-anchor]:not([slot])");return e||(Array.from(this.children).find(i=>i.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute("aria-describedby"));const t=this._findTriggerElement();this._triggerEl=t,t&&(t.setAttribute("aria-describedby",this._tooltipId),(this.trigger==="click"||this.trigger==="hover-click")&&t.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTriggerMouseEnter),t.addEventListener("mouseleave",this._onTriggerMouseLeave),t.addEventListener("focus",this._onTriggerFocus),t.addEventListener("blur",this._onTriggerBlur)))}_updateTooltipHoverListeners(){const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(e.addEventListener("mouseenter",this._onTooltipMouseEnter),e.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const e=this._triggerEl;e&&(e.removeEventListener("click",this._onTriggerClick),e.removeEventListener("mouseenter",this._onTriggerMouseEnter),e.removeEventListener("mouseleave",this._onTriggerMouseLeave),e.removeEventListener("focus",this._onTriggerFocus),e.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(e){this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const t=this._triggerEl;this._resetPosition(),e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute("open","")})}_hideTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true"),this._scheduleHidden(e)}_scheduleHidden(e){const t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add("hidden");return}this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.getBoundingClientRect(),p=(this.offset??0)+8,v=8,f=v,m=window.innerHeight-v,_=v,x=window.innerWidth-v,S=F=>F>=f&&F+r.height<=m,C=F=>F>=_&&F+r.width<=x,E=(F,ce,ke,wi)=>{let
|
|
1961
|
+
`;default:return c``}}},Ce([l({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),Ce([l({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),Ce([l({type:String})],a.ScbButton.prototype,"label",2),Ce([l({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),Ce([l({type:String})],a.ScbButton.prototype,"icon",2),Ce([l({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),Ce([l({type:String})],a.ScbButton.prototype,"href",2),Ce([l({type:String})],a.ScbButton.prototype,"target",2),Ce([l({type:String})],a.ScbButton.prototype,"rel",2),a.ScbButton=Ce([g("scb-button")],a.ScbButton);const Hc=Object.freeze(Object.defineProperty({__proto__:null,get ScbButton(){return a.ScbButton}},Symbol.toStringTag,{value:"Module"}));var Fc=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,Ee=(o,e,t,i)=>{for(var r=i>1?void 0:i?Nc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Fc(e,t,r),r};let qc=0;a.ScbTooltip=class extends y{constructor(){super(...arguments),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++qc}`,this._onTriggerMouseEnter=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTriggerFocus=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTooltipMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this.open=!0)},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||(this.open=!1))},this._onTriggerClick=()=>{this._clickActive=!this._clickActive,this._clickActive?this.open=!0:this._hoverActive||(this.open=!1)}}firstUpdated(){if(this._originalPosition=this.position,this._updateDelayCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open){const e=this._getTooltipElement();e&&this._showTooltip(e)}}updated(e){if(e.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has("delay")&&this._updateDelayCss(),e.has("open")){const t=this._getTooltipElement();if(!t)return;this.open?this._showTooltip(t):this._hideTooltip(t)}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null)}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_updateDelayCss(){const e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${e}s`)}_findTriggerElement(){const e=this.querySelector("[scb-tooltip-anchor]:not([slot])");return e||(Array.from(this.children).find(i=>i.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute("aria-describedby"));const t=this._findTriggerElement();this._triggerEl=t,t&&(t.setAttribute("aria-describedby",this._tooltipId),(this.trigger==="click"||this.trigger==="hover-click")&&t.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTriggerMouseEnter),t.addEventListener("mouseleave",this._onTriggerMouseLeave),t.addEventListener("focus",this._onTriggerFocus),t.addEventListener("blur",this._onTriggerBlur)))}_updateTooltipHoverListeners(){const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(e.addEventListener("mouseenter",this._onTooltipMouseEnter),e.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const e=this._triggerEl;e&&(e.removeEventListener("click",this._onTriggerClick),e.removeEventListener("mouseenter",this._onTriggerMouseEnter),e.removeEventListener("mouseleave",this._onTriggerMouseLeave),e.removeEventListener("focus",this._onTriggerFocus),e.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(e){this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const t=this._triggerEl;this._resetPosition(),e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute("open","")})}_hideTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true"),this._scheduleHidden(e)}_scheduleHidden(e){const t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add("hidden");return}this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.getBoundingClientRect(),p=(this.offset??0)+8,v=8,f=v,m=window.innerHeight-v,_=v,x=window.innerWidth-v,S=F=>F>=f&&F+r.height<=m,C=F=>F>=_&&F+r.width<=x,E=(F,ce,ke,wi)=>{let Ht=0;F<ke&&(Ht+=ke-F);const Er=F+ce;return Er>wi&&(Ht+=Er-wi),Ht},A=F=>{let ce=0,ke=0;switch(F){case"top":ce=i.top-s.top-r.height-p,ke=i.left-s.left+(i.width-r.width)/2;break;case"bottom":ce=i.bottom-s.top+p,ke=i.left-s.left+(i.width-r.width)/2;break;case"left":ke=i.left-s.left-r.width-p,ce=i.top-s.top+(i.height-r.height)/2;break;case"right":ke=i.right-s.left+p,ce=i.top-s.top+(i.height-r.height)/2;break}const wi=ce+s.top,Ht=ke+s.left,Er=E(wi,r.height,f,m),Cp=E(Ht,r.width,_,x);return{pos:F,top:ce,left:ke,fitsV:S(wi),fitsH:C(Ht),totalOverflow:Er+Cp}},z=this.position==="top"||this.position==="bottom",Z=this.position,q=this._getOppositePosition(Z),me=[Z,q,z?"left":"top",z?"right":"bottom"].map(A);let le=me.find(F=>F.fitsV&&F.fitsH)??me.reduce((F,ce)=>ce.totalOverflow<F.totalOverflow?ce:F);const xt=(F,ce,ke)=>Math.min(Math.max(F,ce),ke),Oe=f-s.top,it=m-r.height-s.top,Cr=_-s.left,_i=x-r.width-s.left,xi=xt(le.top,Oe,it),Se=xt(le.left,Cr,_i);e.style.top=`${xi}px`,e.style.left=`${Se}px`,this.position!==le.pos&&(this.position=le.pos)}_getOppositePosition(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}_onDefaultSlotChange(){this._updateTriggerElement()}render(){const e=this.arrow?c`<svg
|
|
1962
1962
|
class="scb-tooltip-arrow"
|
|
1963
1963
|
xmlns="http://www.w3.org/2000/svg"
|
|
1964
1964
|
width="13"
|
|
@@ -2207,7 +2207,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2207
2207
|
>
|
|
2208
2208
|
${this.__renderMd(!0)}
|
|
2209
2209
|
</scb-tooltip>
|
|
2210
|
-
`:this.__renderMd(!1)}},a.ScbIconButton.styles=b``,Ae([l({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),Ae([l({type:String})],a.ScbIconButton.prototype,"tooltip",2),Ae([l({type:String})],a.ScbIconButton.prototype,"variant",2),Ae([l({type:String})],a.ScbIconButton.prototype,"icon",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),Ae([l({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),Ae([l({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),a.ScbIconButton=Ae([g("scb-icon-button")],a.ScbIconButton);const ns=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return a.ScbIconButton}},Symbol.toStringTag,{value:"Module"}));var Uc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,ls=o=>{throw TypeError(o)},B=(o,e,t,i)=>{for(var r=i>1?void 0:i?Wc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Uc(e,t,r),r},zo=(o,e,t)=>e.has(o)||ls("Cannot "+t),dr=(o,e,t)=>(zo(o,e,"read from private field"),t?t.call(o):e.get(o)),
|
|
2210
|
+
`:this.__renderMd(!1)}},a.ScbIconButton.styles=b``,Ae([l({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),Ae([l({type:String})],a.ScbIconButton.prototype,"tooltip",2),Ae([l({type:String})],a.ScbIconButton.prototype,"variant",2),Ae([l({type:String})],a.ScbIconButton.prototype,"icon",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),Ae([l({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),Ae([l({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),Ae([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),a.ScbIconButton=Ae([g("scb-icon-button")],a.ScbIconButton);const ns=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return a.ScbIconButton}},Symbol.toStringTag,{value:"Module"}));var Uc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,ls=o=>{throw TypeError(o)},B=(o,e,t,i)=>{for(var r=i>1?void 0:i?Wc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Uc(e,t,r),r},zo=(o,e,t)=>e.has(o)||ls("Cannot "+t),dr=(o,e,t)=>(zo(o,e,"read from private field"),t?t.call(o):e.get(o)),ni=(o,e,t)=>e.has(o)?ls("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Io=(o,e,t,i)=>(zo(o,e,"write to private field"),e.set(o,t),t),cs=(o,e,t)=>(zo(o,e,"access private method"),t),hr,pr,ur,vr,To,Oo;a.ScbListItem=class extends y{constructor(){super(...arguments),ni(this,vr),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.density=0,this.noDivider=!1,ni(this,hr,!1),ni(this,pr,!1),ni(this,ur,!1),this.onRowClick=()=>{var i,r;if(this.type==="link"&&(this.href||this.itemHref))return;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("scb-checkbox"),t=(r=this.shadowRoot)==null?void 0:r.querySelector("scb-switch");e&&(e.checked=!e.checked),t&&(t.selected=!t.selected)},ni(this,Oo,e=>{var t;if(!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")){if(this.type==="link"){const i=(t=this.shadowRoot)==null?void 0:t.querySelector("a[href]");if(i){e.preventDefault(),i.click();return}}e.preventDefault(),this.onRowClick()}})}static get styles(){return b`
|
|
2211
2211
|
:host {
|
|
2212
2212
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
2213
2213
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -2373,7 +2373,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2373
2373
|
:host([no-divider]) ::slotted(scb-list-item) {
|
|
2374
2374
|
--stroke-border: 0px;
|
|
2375
2375
|
}
|
|
2376
|
-
`],Lo([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Lo([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Lo([g("scb-list")],a.ScbList);var Jc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,
|
|
2376
|
+
`],Lo([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Lo([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Lo([g("scb-list")],a.ScbList);var Jc=Object.defineProperty,Qc=Object.getOwnPropertyDescriptor,It=(o,e,t,i)=>{for(var r=i>1?void 0:i?Qc(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Jc(e,t,r),r};let ed=0;a.ScbSearch=class extends y{constructor(){super(...arguments),this.supportingText="Hinted search text",this.value="",this.size="default",this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++ed}`,this._kbMode=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key==="Tab"&&(this._kbShouldShowRing=!0,this._inputFocused&&this._updateInputRingVisibility())},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&this._updateInputRingVisibility()},this._listScrollHandler=()=>{const e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)}}connectedCallback(){super.connectedCallback(),this._onWindowResize=this._onWindowResize.bind(this),window.addEventListener("resize",this._onWindowResize,{passive:!0}),window.addEventListener("keydown",this._onGlobalKeydown,!0),window.addEventListener("pointerdown",this._onGlobalPointerDown,!0)}disconnectedCallback(){const e=this._inputEl();e&&this._boundNativeKeydown&&e.removeEventListener("keydown",this._boundNativeKeydown,!0),this._detachListScrollListener(),window.removeEventListener("resize",this._onWindowResize),window.removeEventListener("keydown",this._onGlobalKeydown,!0),window.removeEventListener("pointerdown",this._onGlobalPointerDown,!0),super.disconnectedCallback()}firstUpdated(){this._ensureListboxA11y(),this._updateComboboxA11y();const e=this._inputEl();e&&(this._boundNativeKeydown=t=>this._handleKey(t),e.addEventListener("keydown",this._boundNativeKeydown,!0))}updated(){this._ensureListboxA11y(),this._updateComboboxA11y(),this._attachListScrollListener()}render(){const e=(this.value??"").trim().length>0,t=this._inputFocused&&e&&this._hasSuggestions;return c`
|
|
2377
2377
|
<div class="ripple-wrapper">
|
|
2378
2378
|
<md-icon class="leading">${e?"arrow_back":"search"}</md-icon>
|
|
2379
2379
|
|
|
@@ -2594,7 +2594,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2594
2594
|
@media (prefers-color-scheme: dark) {
|
|
2595
2595
|
:host { color: var(--md-sys-color-on-surface); }
|
|
2596
2596
|
}
|
|
2597
|
-
`,
|
|
2597
|
+
`,It([l({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),It([l({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),It([l({type:String})],a.ScbSearch.prototype,"value",2),It([l({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),It([l({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=It([g("scb-search")],a.ScbSearch);const td=Object.freeze(Object.defineProperty({__proto__:null,get ScbSearch(){return a.ScbSearch}},Symbol.toStringTag,{value:"Module"}));var id=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,ze=(o,e,t,i)=>{for(var r=i>1?void 0:i?rd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&id(e,t,r),r};a.ScbAvatar=class extends y{constructor(){super(...arguments),this.src="",this.alt="",this.label="",this.size="medium",this.shape="circular",this.iconName="",this.variant="image",this._imgError=!1,this._hasIconSlot=!1,this._onImgLoad=()=>{this._imgError=!1,this.dispatchEvent(new CustomEvent("image-load",{bubbles:!0,composed:!0}))},this._onImgError=()=>{this._imgError=!0,this.dispatchEvent(new CustomEvent("image-error",{bubbles:!0,composed:!0}))},this._onIconSlotChange=e=>{const t=e.currentTarget;this._hasIconSlot=(t.assignedNodes({flatten:!0})||[]).length>0}}async firstUpdated(){this.variant==="icon"&&await Promise.resolve().then(()=>X)}_initials(){const e=(this.label||this.alt||"").trim();if(!e)return"?";const t=e.split(/\s+/).filter(Boolean);if(t.length===1)return t[0].slice(0,1).toUpperCase();const i=t[0].slice(0,1),r=t[t.length-1].slice(0,1);return(i+r).toUpperCase()}_ariaLabel(){const e=(this.label||this.alt||"").trim();return e||null}render(){const e=this._ariaLabel(),t=this.variant==="image"&&!!this.src&&!this._imgError,i=c`${u}
|
|
2598
2598
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
2599
2599
|
${this._hasIconSlot?u:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
2600
2600
|
`,r=t?c`<img class="photo" part="image" src=${this.src} alt=${this.alt}
|
|
@@ -2691,7 +2691,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2691
2691
|
outline-offset: 2px;
|
|
2692
2692
|
border-radius: var(--_radius);
|
|
2693
2693
|
}
|
|
2694
|
-
`,ze([l({type:String})],a.ScbAvatar.prototype,"src",2),ze([l({type:String})],a.ScbAvatar.prototype,"alt",2),ze([l({type:String})],a.ScbAvatar.prototype,"label",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),ze([l({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),ze([w()],a.ScbAvatar.prototype,"_imgError",2),ze([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=ze([g("scb-avatar")],a.ScbAvatar);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,
|
|
2694
|
+
`,ze([l({type:String})],a.ScbAvatar.prototype,"src",2),ze([l({type:String})],a.ScbAvatar.prototype,"alt",2),ze([l({type:String})],a.ScbAvatar.prototype,"label",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),ze([l({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),ze([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),ze([w()],a.ScbAvatar.prototype,"_imgError",2),ze([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=ze([g("scb-avatar")],a.ScbAvatar);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,li=(o,e,t,i)=>{for(var r=i>1?void 0:i?ad(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&od(e,t,r),r};a.ScbAppBar=class extends y{constructor(){super(...arguments),this.title="",this.type="default",this.position="default",this.searchSupportingText=""}handleAvatarSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(r=>{r.tagName==="SCB-AVATAR"&&r.setAttribute("size","small")})}updated(e){e.has("title")&&this.dispatchEvent(new CustomEvent("title-changed",{detail:{title:this.title},bubbles:!0,composed:!0})),e.has("position")&&this.dispatchEvent(new CustomEvent("position-changed",{detail:{position:this.position},bubbles:!0,composed:!0})),e.has("type")&&this.dispatchEvent(new CustomEvent("type-changed",{detail:{type:this.type},bubbles:!0,composed:!0})),e.has("searchSupportingText")&&this.dispatchEvent(new CustomEvent("search-supporting-text-changed",{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0}))}render(){switch(this.type){case"small-flexible":return c`
|
|
2695
2695
|
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
|
|
2696
2696
|
<div class="leading">
|
|
2697
2697
|
<slot name="leading"></slot>
|
|
@@ -2849,7 +2849,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2849
2849
|
display: flex;
|
|
2850
2850
|
align-items: center;
|
|
2851
2851
|
}
|
|
2852
|
-
`],
|
|
2852
|
+
`],li([l({type:String,reflect:!0})],a.ScbAppBar.prototype,"title",2),li([l({type:String,reflect:!0})],a.ScbAppBar.prototype,"type",2),li([l({type:String,reflect:!0})],a.ScbAppBar.prototype,"position",2),li([l({type:String,attribute:"search-supporting-text",reflect:!0})],a.ScbAppBar.prototype,"searchSupportingText",2),a.ScbAppBar=li([g("scb-app-bar")],a.ScbAppBar);var sd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,Me=(o,e,t,i)=>{for(var r=i>1?void 0:i?nd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&sd(e,t,r),r};a.ScbBadge=class extends y{constructor(){super(...arguments),this._slotClickHandler=e=>{var r;const t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),i=e.target;i&&i!==t&&i.dispatchEvent(new CustomEvent("hide-badge",{bubbles:!0,composed:!0}))},this.autoHide=!1,this.position="relative",this.positionTop=0,this.positionRight=12,this.value="",this.label="",this.hidden=!1,this.variant="dot",this._badgeVisible=!0,this._onHideBadge=()=>{this._badgeVisible=!1,this.requestUpdate()}}firstUpdated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");this.autoHide&&e&&e.addEventListener("click",this._slotClickHandler)}updated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e&&(this.autoHide?e.addEventListener("click",this._slotClickHandler):e.removeEventListener("click",this._slotClickHandler))}connectedCallback(){super.connectedCallback(),this.addEventListener("hide-badge",this._onHideBadge)}disconnectedCallback(){this.removeEventListener("hide-badge",this._onHideBadge),super.disconnectedCallback()}render(){this.style.setProperty("--scb-badge-absolute-top",this.positionTop+"px"),this.style.setProperty("--scb-badge-absolute-right",this.positionRight+"px");let e=this.value;!isNaN(Number(this.value))&&this.value.length>4&&(e=this.value.slice(0,4)+"+");const t=this.variant==="value"&&!this.value?"badge-value-empty":"",i=this._badgeVisible?"":"badge--hide",r=this.label||(this.variant==="dot"?"Indikator":`Märke: ${e}`);return c`
|
|
2853
2853
|
<div class="badge-content">
|
|
2854
2854
|
<slot></slot>
|
|
2855
2855
|
<div
|
|
@@ -2924,15 +2924,15 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2924
2924
|
* @license
|
|
2925
2925
|
* Copyright 2018 Google LLC
|
|
2926
2926
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2927
|
-
*/const
|
|
2927
|
+
*/const ci=o=>o??u;var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,ps=o=>{throw TypeError(o)},ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?cd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ld(e,t,r),r},dd=(o,e,t)=>e.has(o)||ps("Cannot "+t),hd=(o,e,t)=>(dd(o,e,"read from private field"),t?t.call(o):e.get(o)),pd=(o,e,t)=>e.has(o)?ps("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Po;a.ScbLink=class extends y{constructor(){super(...arguments),this.href="",this.disabled=!1,this.ariaLabel="",pd(this,Po,e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())})}render(){const e=this.target==="_blank"&&!this.rel?"noopener noreferrer":this.rel;return c`
|
|
2928
2928
|
<a
|
|
2929
2929
|
part="anchor"
|
|
2930
|
-
href=${
|
|
2931
|
-
target=${
|
|
2932
|
-
rel=${
|
|
2933
|
-
download=${
|
|
2930
|
+
href=${ci(this.disabled?void 0:this.href||void 0)}
|
|
2931
|
+
target=${ci(this.target)}
|
|
2932
|
+
rel=${ci(e)}
|
|
2933
|
+
download=${ci(this.download)}
|
|
2934
2934
|
aria-disabled=${this.disabled?"true":"false"}
|
|
2935
|
-
aria-label=${
|
|
2935
|
+
aria-label=${ci(this.ariaLabel||void 0)}
|
|
2936
2936
|
@click=${hd(this,Po)}
|
|
2937
2937
|
><slot></slot></a>
|
|
2938
2938
|
|
|
@@ -2980,7 +2980,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
2980
2980
|
text-decoration: none;
|
|
2981
2981
|
cursor: default;
|
|
2982
2982
|
}
|
|
2983
|
-
`,
|
|
2983
|
+
`,ut([l({type:String,reflect:!0})],a.ScbLink.prototype,"href",2),ut([l({type:String,reflect:!0})],a.ScbLink.prototype,"target",2),ut([l({type:String,reflect:!0})],a.ScbLink.prototype,"rel",2),ut([l({type:String,reflect:!0})],a.ScbLink.prototype,"download",2),ut([l({type:Boolean,reflect:!0})],a.ScbLink.prototype,"disabled",2),ut([l({type:String,attribute:"aria-label"})],a.ScbLink.prototype,"ariaLabel",2),a.ScbLink=ut([g("scb-link")],a.ScbLink);var ud=Object.defineProperty,vd=Object.getOwnPropertyDescriptor,br=(o,e,t,i)=>{for(var r=i>1?void 0:i?vd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ud(e,t,r),r};a.SCBBreadcrumbItem=class extends y{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return b`
|
|
2984
2984
|
.breadcrumb-separator {
|
|
2985
2985
|
margin: var(--spacing-0) var(--spacing-3);
|
|
2986
2986
|
color: var(--md-sys-color-on-surface);
|
|
@@ -3080,7 +3080,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3080
3080
|
<span class="breadcrumb-separator">/</span>
|
|
3081
3081
|
${i}`:c`${i}`):e.map(i=>i)}
|
|
3082
3082
|
</div>
|
|
3083
|
-
`}},us([l({type:Boolean,attribute:"show-all",reflect:!0})],a.SCBBreadcrumb.prototype,"showAll",2),a.SCBBreadcrumb=us([g("scb-breadcrumb")],a.SCBBreadcrumb);var fd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,N=(o,e,t,i)=>{for(var r=i>1?void 0:i?gd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&fd(e,t,r),r};a.ScbCalendarCard=class extends y{constructor(){super(...arguments),this.variant="default",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch"}async firstUpdated(){a.ScbCalendarCard.__iconLoaded||(await Promise.resolve().then(()=>X),a.ScbCalendarCard.__iconLoaded=!0),a.ScbCalendarCard.__rippleLoaded||(await Promise.resolve().then(()=>
|
|
3083
|
+
`}},us([l({type:Boolean,attribute:"show-all",reflect:!0})],a.SCBBreadcrumb.prototype,"showAll",2),a.SCBBreadcrumb=us([g("scb-breadcrumb")],a.SCBBreadcrumb);var fd=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,N=(o,e,t,i)=>{for(var r=i>1?void 0:i?gd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&fd(e,t,r),r};a.ScbCalendarCard=class extends y{constructor(){super(...arguments),this.variant="default",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch"}async firstUpdated(){a.ScbCalendarCard.__iconLoaded||(await Promise.resolve().then(()=>X),a.ScbCalendarCard.__iconLoaded=!0),a.ScbCalendarCard.__rippleLoaded||(await Promise.resolve().then(()=>Yt),a.ScbCalendarCard.__rippleLoaded=!0),this.__applyInnerSizing()}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",r=1,s="Jan",n=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",h=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",p=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",v=`${n?`inline-size:${n};`:""}${h?`block-size:${h};`:""}${p?`aspect-ratio:${p};`:""}`;return c`
|
|
3084
3084
|
<div
|
|
3085
3085
|
class="calendar-card ${t} ${i} ${e}"
|
|
3086
3086
|
role="${this.cardHref?"link":"group"}"
|
|
@@ -3439,7 +3439,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3439
3439
|
${r?c`<div class="date">${r}</div>`:""}
|
|
3440
3440
|
</div>
|
|
3441
3441
|
</div>
|
|
3442
|
-
`)}}updated(e){super.updated(e),e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),e.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.style.setProperty("--scb-card-media-fit",this.mediaFit||"cover"),this.style.setProperty("--scb-card-media-position",this.mediaPosition||"center")}async firstUpdated(e){a.ScbCard.__iconLoaded||(await Promise.resolve().then(()=>X),a.ScbCard.__iconLoaded=!0),a.ScbCard.__rippleLoaded||(await Promise.resolve().then(()=>
|
|
3442
|
+
`)}}updated(e){super.updated(e),e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),e.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.style.setProperty("--scb-card-media-fit",this.mediaFit||"cover"),this.style.setProperty("--scb-card-media-position",this.mediaPosition||"center")}async firstUpdated(e){a.ScbCard.__iconLoaded||(await Promise.resolve().then(()=>X),a.ScbCard.__iconLoaded=!0),a.ScbCard.__rippleLoaded||(await Promise.resolve().then(()=>Yt),a.ScbCard.__rippleLoaded=!0)}},a.ScbCard.__iconLoaded=!1,a.ScbCard.__rippleLoaded=!1,a.ScbCard.styles=b`
|
|
3443
3443
|
:host {
|
|
3444
3444
|
display: block;
|
|
3445
3445
|
box-sizing: border-box;
|
|
@@ -3741,11 +3741,11 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3741
3741
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
3742
3742
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
3743
3743
|
}
|
|
3744
|
-
`,I([l({type:String,reflect:!0})],a.ScbCard.prototype,"type",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"variant",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"direction",2),I([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),I([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),I([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),I([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),I([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),I([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),I([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),I([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),I([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),I([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),I([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),I([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),I([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),I([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),I([l({type:String,attribute:"card-href",reflect:!0})],a.ScbCard.prototype,"cardHref",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"title",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"subtitle",2),I([l({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCard.prototype,"supportingText",2),I([l({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),I([l({type:String,attribute:"social-comments-text",reflect:!0})],a.ScbCard.prototype,"commentsText",2),I([l({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),I([l({type:String,attribute:"social-likes-text",reflect:!0})],a.ScbCard.prototype,"likesText",2),I([l({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),I([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),I([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),a.ScbCard=I([g("scb-card")],a.ScbCard);var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,vs=o=>{throw TypeError(o)},fr=(o,e,t,i)=>{for(var r=i>1?void 0:i?wd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&xd(e,t,r),r},Sd=(o,e,t)=>e.has(o)||vs("Cannot "+t),Do=(o,e,t)=>(Sd(o,e,"read from private field"),t?t.call(o):e.get(o)),kd=(o,e,t)=>e.has(o)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),
|
|
3744
|
+
`,I([l({type:String,reflect:!0})],a.ScbCard.prototype,"type",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"variant",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"direction",2),I([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),I([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),I([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),I([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),I([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),I([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),I([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),I([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),I([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),I([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),I([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),I([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),I([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),I([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),I([l({type:String,attribute:"card-href",reflect:!0})],a.ScbCard.prototype,"cardHref",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"title",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"subtitle",2),I([l({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCard.prototype,"supportingText",2),I([l({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),I([l({type:String,attribute:"social-comments-text",reflect:!0})],a.ScbCard.prototype,"commentsText",2),I([l({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),I([l({type:String,attribute:"social-likes-text",reflect:!0})],a.ScbCard.prototype,"likesText",2),I([l({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),I([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),I([l({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),I([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),a.ScbCard=I([g("scb-card")],a.ScbCard);var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,vs=o=>{throw TypeError(o)},fr=(o,e,t,i)=>{for(var r=i>1?void 0:i?wd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&xd(e,t,r),r},Sd=(o,e,t)=>e.has(o)||vs("Cannot "+t),Do=(o,e,t)=>(Sd(o,e,"read from private field"),t?t.call(o):e.get(o)),kd=(o,e,t)=>e.has(o)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),di;a.ScbCheckboxGroup=class extends y{constructor(){super(...arguments),this.orientation="vertical",this.disabled=!1,this.spacing="group",kd(this,di,()=>{var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-checkbox");for(const r of t)this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled"),this.orientation==="horizontal"?r.setAttribute("orientation","horizontal"):r.removeAttribute("orientation"),this.spacing==="group"?r.style.setProperty("--scb-checkbox-gap","0"):r.style.removeProperty("--scb-checkbox-gap")})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
3745
3745
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${e}`}>
|
|
3746
|
-
<slot @slotchange=${Do(this,
|
|
3746
|
+
<slot @slotchange=${Do(this,di)}></slot>
|
|
3747
3747
|
</div>
|
|
3748
|
-
`}firstUpdated(){Do(this,
|
|
3748
|
+
`}firstUpdated(){Do(this,di).call(this)}updated(e){(e.has("disabled")||e.has("orientation")||e.has("spacing"))&&Do(this,di).call(this)}},di=new WeakMap,a.ScbCheckboxGroup.styles=b`
|
|
3749
3749
|
:host {
|
|
3750
3750
|
display: block;
|
|
3751
3751
|
--scb-checkbox-gap: var(--spacing-4, 12px);
|
|
@@ -3768,7 +3768,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3768
3768
|
:host([spacing="group"]) ::slotted(scb-checkbox) {
|
|
3769
3769
|
--scb-checkbox-gap: 0;
|
|
3770
3770
|
}
|
|
3771
|
-
`,fr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"orientation",2),fr([l({type:Boolean,reflect:!0})],a.ScbCheckboxGroup.prototype,"disabled",2),fr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"spacing",2),a.ScbCheckboxGroup=fr([g("scb-checkbox-group")],a.ScbCheckboxGroup);var $d=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,
|
|
3771
|
+
`,fr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"orientation",2),fr([l({type:Boolean,reflect:!0})],a.ScbCheckboxGroup.prototype,"disabled",2),fr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"spacing",2),a.ScbCheckboxGroup=fr([g("scb-checkbox-group")],a.ScbCheckboxGroup);var $d=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,vt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Cd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&$d(e,t,r),r};a.ScbCheckbox=class extends y{constructor(){super(...arguments),this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this._checkboxId=""}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`}firstUpdated(){var i,r;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("md-checkbox");e&&e.addEventListener("change",()=>{const s=e.checked;this.checked=s,this.dispatchEvent(new CustomEvent("change",{detail:{checked:s},bubbles:!0,composed:!0}))});const t=(r=this.shadowRoot)==null?void 0:r.querySelector("label.wrap");t==null||t.addEventListener("click",s=>{if(this.disabled)return;if(!s.composedPath().some(p=>{var m,_,x;const v=p;return((_=(m=v==null?void 0:v.tagName)==null?void 0:m.toLowerCase)==null?void 0:_.call(m))==="md-checkbox"||((x=v==null?void 0:v.classList)==null?void 0:x.contains("box-wrap"))})){s.preventDefault();const p=this.shadowRoot.querySelector("md-checkbox");p&&(p.checked=!p.checked,p.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}}),this.__syncInnerAria()}updated(e){super.updated(e),e.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(e.has("label")||e.has("supportingText")||e.has("ariaLabel"))&&this.__syncInnerAria()}__syncInnerAria(){var h,p,v;const e=(h=this.shadowRoot)==null?void 0:h.querySelector("md-checkbox"),t=e==null?void 0:e.shadowRoot;if(!t)return;const i=t.querySelector('[role="checkbox"]')||t.querySelector('input[type="checkbox"]');if(!i)return;const r=!!((p=this.label)!=null&&p.trim()),s=r?`${this._checkboxId}-label`:"",n=this.supportingText?`${this._checkboxId}-supporting-text`:"";r&&s?(i.setAttribute("aria-labelledby",s),i.removeAttribute("aria-label")):(i.removeAttribute("aria-labelledby"),(v=this.ariaLabel)!=null&&v.trim()?i.setAttribute("aria-label",this.ariaLabel.trim()):i.removeAttribute("aria-label")),n?i.setAttribute("aria-describedby",n):i.removeAttribute("aria-describedby")}render(){var r;const e=this.supportingText?`${this._checkboxId}-supporting-text`:void 0,t=!!((r=this.label)!=null&&r.trim()),i=t?u:this.ariaLabel||u;return c`
|
|
3772
3772
|
<label class="wrap">
|
|
3773
3773
|
<div class="box-wrap">
|
|
3774
3774
|
<md-checkbox
|
|
@@ -3842,7 +3842,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3842
3842
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
3843
3843
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
3844
3844
|
}
|
|
3845
|
-
`,
|
|
3845
|
+
`,vt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"disabled",2),vt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"indeterminate",2),vt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"checked",2),vt([l({type:String})],a.ScbCheckbox.prototype,"label",2),vt([l({type:String,attribute:"supporting-text"})],a.ScbCheckbox.prototype,"supportingText",2),vt([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbCheckbox.prototype,"ariaLabel",2),a.ScbCheckbox=vt([g("scb-checkbox")],a.ScbCheckbox);const ms=Object.freeze(Object.defineProperty({__proto__:null,get ScbCheckbox(){return a.ScbCheckbox}},Symbol.toStringTag,{value:"Module"}));var Ed=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,Ie=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ad(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ed(e,t,r),r};a.ScbChip=class extends y{constructor(){super(...arguments),this.variant="assist",this.label="",this.icon="",this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.href="",this.target="",this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1}updated(e){super.updated(e),(e.has("variant")||e.has("icon"))&&this.__ensureDepsLoaded()}firstUpdated(){this.__ensureDepsLoaded()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"assist":await Promise.resolve().then(()=>qn);break;case"filter":await Promise.resolve().then(()=>Kn);break}this.__loadedVariants.add(this.variant)}!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>jn),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>X),this.__iconLoaded=!0)}get _insideChipSet(){return!!this.closest("md-chip-set")}render(){const e=this._renderChip();return this._insideChipSet?e:c`<md-chip-set>${e}</md-chip-set>`}_renderChip(){const e=this.icon?c`<md-icon slot="icon">${this.icon}</md-icon>`:null;switch(this.variant){case"assist":{const t=this.target==="_blank"?"noopener noreferrer":void 0;return c`
|
|
3846
3846
|
<md-assist-chip
|
|
3847
3847
|
label=${this.label}
|
|
3848
3848
|
?disabled=${this.disabled}
|
|
@@ -3883,7 +3883,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
3883
3883
|
color: var(--md-sys-color-on-surface);
|
|
3884
3884
|
font-size: var(--md-sys-typescale-body-large-size);
|
|
3885
3885
|
}
|
|
3886
|
-
`,Ie([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Ie([l({type:String})],a.ScbChip.prototype,"label",2),Ie([l({type:String})],a.ScbChip.prototype,"icon",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Ie([l({type:String})],a.ScbChip.prototype,"href",2),Ie([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=Ie([g("scb-chip")],a.ScbChip);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var Id=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,U=(o,e,t,i)=>{for(var r=i>1?void 0:i?Td(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Id(e,t,r),r};a.ScbDialog=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>Promise.resolve().then(()=>yp),"SCB-CHECKBOX":()=>Promise.resolve().then(()=>ms),"SCB-RADIO-BUTTON":()=>Promise.resolve().then(()=>
|
|
3886
|
+
`,Ie([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Ie([l({type:String})],a.ScbChip.prototype,"label",2),Ie([l({type:String})],a.ScbChip.prototype,"icon",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Ie([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Ie([l({type:String})],a.ScbChip.prototype,"href",2),Ie([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=Ie([g("scb-chip")],a.ScbChip);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var Id=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,U=(o,e,t,i)=>{for(var r=i>1?void 0:i?Td(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Id(e,t,r),r};a.ScbDialog=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>Promise.resolve().then(()=>yp),"SCB-CHECKBOX":()=>Promise.resolve().then(()=>ms),"SCB-RADIO-BUTTON":()=>Promise.resolve().then(()=>Vh),"SCB-SWITCH":()=>Promise.resolve().then(()=>Ls),"SCB-CHIP":()=>Promise.resolve().then(()=>zd)},this.__onDocumentClick=e=>{this.__getActionFromEvent(e)==="toggle"&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var t,i,r,s;(i=(t=this.shadowRoot)==null?void 0:t.querySelector("form"))==null||i.reset(),(((s=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}))??[]).forEach(n=>{const h=n.tagName;h==="SCB-TEXTFIELD"&&(n.value=""),h==="SCB-CHECKBOX"&&(n.checked=!1),h==="SCB-RADIO-BUTTON"&&(n.checked=!1),h==="SCB-SWITCH"&&(n.selected=!1),h==="SCB-CHIP"&&(n.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var e,t;(t=(e=this.shadowRoot)==null?void 0:e.querySelector("form"))==null||t.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!=="Tab")return;const t=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled"));if(!t.length)return;const i=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===i?(r.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===r&&(i.focus(),e.preventDefault())}}async firstUpdated(){await Promise.resolve().then(()=>Hc),await Promise.resolve().then(()=>ns),this.icon&&await Promise.resolve().then(()=>X),await this.__ensureSlottedDeps()}async __ensureSlottedDeps(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=async r=>{const s=new Set(r.map(n=>n.tagName));for(const n of s){const h=this.__slotDeps[n];h&&await h()}};await t(e.assignedElements({flatten:!0})),e.addEventListener("slotchange",async()=>t(e.assignedElements({flatten:!0})))}__getActionFromEvent(e){if(!this.id)return null;for(const t of e.composedPath())if(t instanceof Element){if(t.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=t,"toggle";if(t.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=t,"toggle"}return null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}updated(e){var t,i;if(e.has("open")){const r=e.get("open");this.__updateTriggersExpanded(),this.open&&!r?this.updateComplete.then(()=>{var s,n,h;(h=(n=(s=this.shadowRoot)==null?void 0:s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'))==null?void 0:n.focus)==null||h.call(n)}):!this.open&&r&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}e.has("icon")&&this.icon&&Promise.resolve().then(()=>X)}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(e){if(this.inSb)return;const t=document.documentElement;t.style.overflow=e?"hidden":""}__setOpen(e){this.open=e,this.__fire(e?"open":"close")}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__slotIsEmpty(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).length===0:!0}renderHeader(e){const t=this.variant==="form"||this.variant==="floating";return c`
|
|
3887
3887
|
<div class="header">
|
|
3888
3888
|
<div class="title">
|
|
3889
3889
|
${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:u}
|
|
@@ -4043,7 +4043,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4043
4043
|
display:block;
|
|
4044
4044
|
margin-block: var(--scb-choice-gap, 6px);
|
|
4045
4045
|
}
|
|
4046
|
-
`,U([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),U([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),U([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),U([l({type:String})],a.ScbDialog.prototype,"variant",2),U([l({type:String})],a.ScbDialog.prototype,"label",2),U([l({type:String})],a.ScbDialog.prototype,"icon",2),U([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),U([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),U([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),U([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),U([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),U([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),U([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),U([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),U([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),U([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),U([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=U([g("scb-dialog")],a.ScbDialog);var Od=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,
|
|
4046
|
+
`,U([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),U([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),U([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),U([l({type:String})],a.ScbDialog.prototype,"variant",2),U([l({type:String})],a.ScbDialog.prototype,"label",2),U([l({type:String})],a.ScbDialog.prototype,"icon",2),U([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),U([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),U([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),U([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),U([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),U([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),U([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),U([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),U([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),U([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),U([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=U([g("scb-dialog")],a.ScbDialog);var Od=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,Tt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ld(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Od(e,t,r),r};a.ScbDivider=class extends y{constructor(){super(...arguments),this.variant="thin",this.direction="horizontal",this.inset="none",this.overlay=!1,this.anchor="end"}render(){return c``}},a.ScbDivider.styles=b`
|
|
4047
4047
|
:host {
|
|
4048
4048
|
--scb-divider-color: var(--md-sys-color-outline-variant);
|
|
4049
4049
|
--scb-divider-thickness: 1px;
|
|
@@ -4085,7 +4085,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4085
4085
|
}
|
|
4086
4086
|
:host([overlay][direction="vertical"][anchor="end"]) { right: calc(var(--scb-divider-gap) / -2); }
|
|
4087
4087
|
:host([overlay][direction="vertical"][anchor="start"]){ left: calc(var(--scb-divider-gap) / -2); }
|
|
4088
|
-
`,
|
|
4088
|
+
`,Tt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),Tt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),Tt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),Tt([l({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),Tt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),a.ScbDivider=Tt([g("scb-divider")],a.ScbDivider);var Pd=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,mt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Pd(e,t,r),r};a.ScbDrawerItem=class extends y{constructor(){super(...arguments),this.label="",this.selected=!1,this.leadingIcon="",this.itemHref="",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=e=>{e&&e.stopPropagation(),this.hasSlotContent&&this.__setExpanded(!this.expanded)},this._onButtonClick=e=>{e.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=e=>{var r,s,n,h,p,v,f,m,_;const t=Array.from(((r=this.parentElement)==null?void 0:r.querySelectorAll("scb-drawer-item"))||[]),i=t.indexOf(this);switch(e.key){case"ArrowDown":{e.preventDefault(),(n=(s=(t[i+1]||t[0]).shadowRoot)==null?void 0:s.querySelector(".scb-drawer-label-text"))==null||n.focus();break}case"ArrowUp":{e.preventDefault(),(p=(h=(t[i-1]||t[t.length-1]).shadowRoot)==null?void 0:h.querySelector(".scb-drawer-label-text"))==null||p.focus();break}case"Home":{e.preventDefault(),(f=(v=t[0].shadowRoot)==null?void 0:v.querySelector(".scb-drawer-label-text"))==null||f.focus();break}case"End":{e.preventDefault(),(_=(m=t[t.length-1].shadowRoot)==null?void 0:m.querySelector(".scb-drawer-label-text"))==null||_.focus();break}}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}async __ensureDepsLoaded(){a.ScbDrawerItem.__rippleLoaded||(await Promise.resolve().then(()=>Yt),a.ScbDrawerItem.__rippleLoaded=!0),a.ScbDrawerItem.__focusRingLoaded||(await Promise.resolve().then(()=>dn),a.ScbDrawerItem.__focusRingLoaded=!0),this.leadingIcon&&!a.ScbDrawerItem.__iconLoaded&&(await Promise.resolve().then(()=>X),a.ScbDrawerItem.__iconLoaded=!0),this.hasSlotContent&&!a.ScbDrawerItem.__iconButtonLoaded&&(await Promise.resolve().then(()=>ns),a.ScbDrawerItem.__iconButtonLoaded=!0)}_onSlotChange(e){const i=e.target.assignedElements({flatten:!0});this.hasSlotContent=i.length>0&&i.every(r=>r.tagName==="SCB-SUB-DRAWER")}__setExpanded(e){this.hasSlotContent&&(this.expanded=e,this.dispatchEvent(new CustomEvent("scb-drawer-expand",{bubbles:!0,composed:!0,detail:{item:this,expanded:e}})))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-drawer-select",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){const e=this.renderRoot.querySelector("slot");if(e){const t=e.assignedElements({flatten:!0});this.hasSlotContent=t.length>0&&t.every(i=>i.tagName==="SCB-SUB-DRAWER")}await this.__ensureDepsLoaded()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),e.has("hasSlotContent")&&this.hasSlotContent&&this.__ensureDepsLoaded(),e.has("expanded")&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.hasSlotContent;return c`
|
|
4089
4089
|
<div class="scb-drawer-item">
|
|
4090
4090
|
<div class="scb-drawer-item-label" ?selected=${this.selected}>
|
|
4091
4091
|
${t?c`
|
|
@@ -4238,7 +4238,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4238
4238
|
@media (prefers-reduced-motion: reduce) {
|
|
4239
4239
|
.submenu { transition: none; }
|
|
4240
4240
|
}
|
|
4241
|
-
`,
|
|
4241
|
+
`,mt([l({type:String})],a.ScbDrawerItem.prototype,"label",2),mt([l({type:Boolean,reflect:!0})],a.ScbDrawerItem.prototype,"selected",2),mt([l({type:String,attribute:"leading-icon"})],a.ScbDrawerItem.prototype,"leadingIcon",2),mt([l({type:String,attribute:"item-href"})],a.ScbDrawerItem.prototype,"itemHref",2),mt([w()],a.ScbDrawerItem.prototype,"hasSlotContent",2),mt([w()],a.ScbDrawerItem.prototype,"expanded",2),a.ScbDrawerItem=mt([g("scb-drawer-item")],a.ScbDrawerItem);const Rd=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerItem(){return a.ScbDrawerItem}},Symbol.toStringTag,{value:"Module"}));var Bd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,bs=(o,e,t,i)=>{for(var r=i>1?void 0:i?Md(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Bd(e,t,r),r};a.ScbDrawerSection=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`
|
|
4242
4242
|
<scb-divider></scb-divider>
|
|
4243
4243
|
${this.label?c`
|
|
4244
4244
|
<div class="scb-drawer-section">
|
|
@@ -4619,7 +4619,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4619
4619
|
:host([direction="row"]) ::slotted(*) {
|
|
4620
4620
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
4621
4621
|
}
|
|
4622
|
-
`,Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Fe([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Fe([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Fe([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Fe([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Fe([g("scb-stack")],a.ScbStack);var sh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,ws=o=>{throw TypeError(o)},ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?nh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&sh(e,t,r),r},lh=(o,e,t)=>e.has(o)||ws("Cannot "+t),ch=(o,e,t)=>e.has(o)?ws("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),
|
|
4622
|
+
`,Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Fe([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Fe([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Fe([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Fe([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Fe([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Fe([g("scb-stack")],a.ScbStack);var sh=Object.defineProperty,nh=Object.getOwnPropertyDescriptor,ws=o=>{throw TypeError(o)},ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?nh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&sh(e,t,r),r},lh=(o,e,t)=>e.has(o)||ws("Cannot "+t),ch=(o,e,t)=>e.has(o)?ws("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ot=(o,e,t)=>(lh(o,e,"access private method"),t),Qe,Mo,hi;a.ScbGrid=class extends y{constructor(){super(...arguments),ch(this,Qe),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap="",this.rowGap="",this.columnGap="",this.alignItems="stretch",this.justifyItems="stretch",this.paddingInline="",this.paddingBlock="",this.maxWidth="",this.autoRows=""}firstUpdated(){Ot(this,Qe,Mo).call(this)}updated(){Ot(this,Qe,Mo).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const i=this.mapSpacingToken(t[0]);return{row:i,col:i}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return c`<div class="grid"><slot></slot></div>`}},Qe=new WeakSet,Mo=function(){this.style.setProperty("--scb-grid-cols-compact",String(this.colsCompact)),this.style.setProperty("--scb-grid-cols-medium",String(this.colsMedium)),this.style.setProperty("--scb-grid-cols-expanded",String(this.colsExpanded));const o="var(--spacing-7, 24px)",e=this.parseGapShorthand(this.gap),t=this.mapSpacingToken(this.rowGap)??e.row??o,i=this.mapSpacingToken(this.columnGap)??e.col??o;this.style.setProperty("--scb-grid-row-gap",t),this.style.setProperty("--scb-grid-column-gap",i),this.style.setProperty("--scb-grid-gap",`${t} ${i}`),this.style.setProperty("--scb-grid-align-items",this.alignItems),this.style.setProperty("--scb-grid-justify-items",this.justifyItems);const r=this.mapSpacingToken(this.paddingInline),s=this.mapSpacingToken(this.paddingBlock);Ot(this,Qe,hi).call(this,"--scb-grid-max-width",this.maxWidth),Ot(this,Qe,hi).call(this,"--scb-grid-padding-inline",r??""),Ot(this,Qe,hi).call(this,"--scb-grid-padding-block",s??""),Ot(this,Qe,hi).call(this,"--scb-grid-auto-rows",this.autoRows)},hi=function(o,e){e?this.style.setProperty(o,e):this.style.removeProperty(o)},a.ScbGrid.styles=b`
|
|
4623
4623
|
:host {
|
|
4624
4624
|
box-sizing: border-box;
|
|
4625
4625
|
display: block;
|
|
@@ -4716,7 +4716,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4716
4716
|
}
|
|
4717
4717
|
}
|
|
4718
4718
|
}
|
|
4719
|
-
`,ae([l({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),ae([l({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),ae([l({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),ae([l({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),ae([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),ae([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),ae([l({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),ae([l({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),ae([l({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),ae([l({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),ae([l({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),ae([l({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=ae([g("scb-grid")],a.ScbGrid);var dh=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Ss=o=>{throw TypeError(o)},
|
|
4719
|
+
`,ae([l({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),ae([l({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),ae([l({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),ae([l({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),ae([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),ae([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),ae([l({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),ae([l({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),ae([l({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),ae([l({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),ae([l({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),ae([l({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=ae([g("scb-grid")],a.ScbGrid);var dh=Object.defineProperty,hh=Object.getOwnPropertyDescriptor,Ss=o=>{throw TypeError(o)},pi=(o,e,t,i)=>{for(var r=i>1?void 0:i?hh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&dh(e,t,r),r},Ho=(o,e,t)=>e.has(o)||Ss("Cannot "+t),Ne=(o,e,t)=>(Ho(o,e,"read from private field"),t?t.call(o):e.get(o)),Lt=(o,e,t)=>e.has(o)?Ss("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),bt=(o,e,t,i)=>(Ho(o,e,"write to private field"),e.set(o,t),t),qe=(o,e,t)=>(Ho(o,e,"access private method"),t),Pt,ui,Dt,vi,ve,ks,Fo,$s,No,qo,Cs,Es,Vo;a.ScbFooter=class extends y{constructor(){super(...arguments),Lt(this,ve),this.maxWidth="1440px",this.deferPaint=!1,this.sections=[],this.description="Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.",Lt(this,Pt,null),Lt(this,ui,""),Lt(this,Dt),Lt(this,vi,!1),Lt(this,qo,8)}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-footer-max-width",this.maxWidth),qe(this,ve,No).call(this,!0),qe(this,ve,ks).call(this)}updated(e){e.has("maxWidth")&&this.style.setProperty("--scb-footer-max-width",this.maxWidth)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=Ne(this,Dt))==null||e.disconnect()}render(){const e=Ne(this,ve,$s);return c`
|
|
4720
4720
|
<footer class="outer" role="contentinfo">
|
|
4721
4721
|
<nav aria-label="Sidfot med länkar">
|
|
4722
4722
|
<scb-grid
|
|
@@ -4745,7 +4745,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4745
4745
|
</div>
|
|
4746
4746
|
</div>
|
|
4747
4747
|
</footer>
|
|
4748
|
-
`}},
|
|
4748
|
+
`}},Pt=new WeakMap,ui=new WeakMap,Dt=new WeakMap,vi=new WeakMap,ve=new WeakSet,ks=function(){var o;(o=Ne(this,Dt))==null||o.disconnect(),bt(this,Dt,new MutationObserver(e=>{for(const t of e){if(t.type==="childList"){const i=[...t.addedNodes].some(s=>s.tagName==="SCB-FOOTER-SECTION"||s.tagName==="SCB-LINK"),r=[...t.removedNodes].some(s=>s.tagName==="SCB-FOOTER-SECTION"||s.tagName==="SCB-LINK");if(i||r){qe(this,ve,Fo).call(this);return}}if(t.type==="attributes"&&(t.target.tagName==="SCB-FOOTER-SECTION"||t.target.tagName==="SCB-LINK")){qe(this,ve,Fo).call(this);return}}})),Ne(this,Dt).observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["title","href","target"]})},Fo=function(){Ne(this,vi)||(bt(this,vi,!0),queueMicrotask(()=>{bt(this,vi,!1),qe(this,ve,No).call(this,!1)}))},$s=function(){return Ne(this,Pt)??this.sections??[]},No=function(o=!1){const e=Array.from(this.querySelectorAll("scb-footer-section"));if(!e.length){Ne(this,Pt)!==null&&(bt(this,Pt,null),bt(this,ui,""),o||this.requestUpdate());return}const t=e.map(r=>{const s=(r.getAttribute("title")||"").trim(),n=Array.from(r.querySelectorAll("scb-link")).map(h=>{const p=(h.getAttribute("href")||"").trim(),v=h.getAttribute("target"),m={label:(h.textContent||"").trim(),href:p};return v&&(m.target=v),m});return{title:s,links:n}}),i=JSON.stringify(t);i!==Ne(this,ui)&&(bt(this,ui,i),bt(this,Pt,t),o||this.requestUpdate())},qo=new WeakMap,Cs=function(o){const e=[],i=o.length;if(i>0&&i<4)return e.push(c`
|
|
4749
4749
|
<scb-grid-item
|
|
4750
4750
|
col-span-compact="4"
|
|
4751
4751
|
col-span-medium="8"
|
|
@@ -4923,7 +4923,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
4923
4923
|
|
|
4924
4924
|
.spacer { display: none; }
|
|
4925
4925
|
@media (min-width: 840px) { .spacer { display: block; } }
|
|
4926
|
-
`,ui([l({type:String,attribute:"max-width",reflect:!0,converter:{fromAttribute:o=>{if(o==null)return"1440px";const e=o.trim();return e===""?"1440px":/^\d+$/.test(e)?`${e}px`:e}}})],a.ScbFooter.prototype,"maxWidth",2),ui([l({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),ui([l({type:Array})],a.ScbFooter.prototype,"sections",2),ui([l({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=ui([g("scb-footer")],a.ScbFooter);var ph=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,jo=(o,e,t,i)=>{for(var r=i>1?void 0:i?uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ph(e,t,r),r};a.ScbHeaderDrawerGroup=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerGroup.styles=b`:host{display:none !important}`,jo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"label",2),jo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"icon",2),a.ScbHeaderDrawerGroup=jo([g("scb-header-drawer-group")],a.ScbHeaderDrawerGroup);var vh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,_r=(o,e,t,i)=>{for(var r=i>1?void 0:i?mh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&vh(e,t,r),r};a.ScbHeaderDrawerItem=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerItem.styles=b`:host{display:none !important}`,_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=_r([g("scb-header-drawer-item")],a.ScbHeaderDrawerItem);var bh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,Uo=(o,e,t,i)=>{for(var r=i>1?void 0:i?fh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&bh(e,t,r),r};a.ScbHeaderTab=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderTab.styles=b`:host{display:none !important}`,Uo([l({type:String})],a.ScbHeaderTab.prototype,"label",2),Uo([l({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Uo([g("scb-header-tab")],a.ScbHeaderTab);var gh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,xr=(o,e,t,i)=>{for(var r=i>1?void 0:i?yh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&gh(e,t,r),r};a.ScbHeaderUtility=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderUtility.styles=b`:host{display:none !important}`,xr([l({type:String})],a.ScbHeaderUtility.prototype,"label",2),xr([l({type:String})],a.ScbHeaderUtility.prototype,"href",2),xr([l({type:String})],a.ScbHeaderUtility.prototype,"target",2),a.ScbHeaderUtility=xr([g("scb-header-utility")],a.ScbHeaderUtility);var _h=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,O=(o,e,t,i)=>{for(var r=i>1?void 0:i?xh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&_h(e,t,r),r};const Wo={fromAttribute:o=>o==null?!0:!/^(false|0|off|no)$/i.test(o),toAttribute:o=>String(!!o)};a.ScbHeader=class extends y{constructor(){super(...arguments),this.maxWidth="1440px",this.logoText="",this.logoHref="/",this.banner=!1,this.tabs=[],this.activeTab=0,this.utilityItems=[],this.showDrawer=!0,this.showSearch=!0,this.includeUtilityInDrawer=!1,this.searchText="",this._drawerId="main-drawer",this._drawerMounted=!1,this._drawerExpanded=!1,this._searchId="header-search",this._slotTabs=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{this._scheduleMeasure()},this._onDrawerSelect=e=>{this.dispatchEvent(new CustomEvent("drawer-select",{detail:e.detail,bubbles:!0,composed:!0})),this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._harvestPending=!1,this.__drawerLoaded=!1,this.__tabsLoaded=!1,this.__searchLoaded=!1,this._harvest=()=>{const e=this._slotEl;if(!e)return;const t=e.assignedElements({flatten:!0}),i=[],r=[],s=[],n=h=>({label:h.getAttribute("label")??"",href:h.getAttribute("href")??void 0,icon:h.getAttribute("icon")??void 0});for(const h of t){const p=h.tagName.toLowerCase();if(p==="scb-header-tab"){i.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#"});continue}if(p==="scb-header-utility"){r.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#",target:h.getAttribute("target")??void 0});continue}if(p==="scb-header-drawer-group"){const v={label:h.getAttribute("label")??"",icon:h.getAttribute("icon")??void 0,children:[]};h.querySelectorAll("scb-header-drawer-item").forEach(m=>v.children.push(n(m))),s.push(v);continue}p==="scb-header-drawer-item"&&s.push(n(h))}this._slotTabs=i,this._slotUtils=r,this._slotMenu=s,queueMicrotask(()=>{this.updateComplete.then(()=>{this._applyActiveToTabs(),this._scheduleMeasure()})})},this._measure=()=>{var m,_,x;const e=this._top,t=this._logoGroup;if(!e||!t)return;const i=window.innerWidth,r=e.clientWidth,s=this._overflows(this._util),n=this._overflows(this._tabsEl),h=i<this.BP_MD||s||n;this._collapsed?!h&&r>=this._unlockAtWidth&&this._setCollapsed(!1):h&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0));let p=!1;if(this.showSearch&&i>=this.BP_SM&&i<this.BP_MD&&this._searchWrap){const S=getComputedStyle(this._searchWrap),C=Math.max(this._num(S.minWidth,this._tokenPx("--scb-header-search-min",320)),this._tokenPx("--scb-header-search-min",320)),E=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),A=this.showDrawer&&(i<this.BP_MD||this._collapsed)?((m=this._menuBtn)==null?void 0:m.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48):0;p=t.getBoundingClientRect().width+E+C+E+A+8>r+.5}this._setHideSearch(p);let v=!1;if(this.showDrawer&&(i<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const S=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),C=((_=this._menuBtn)==null?void 0:_.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48),E=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(r>=this._logoTextUnlockAt):E>r+.5&&(v=!0,this._logoTextUnlockAt=r+this._HYST)}else v=!1,this._logoTextUnlockAt=0;this._setHideLogoText(v)},this._onMenuClick=async e=>{e.preventDefault(),e.stopPropagation(),this.showDrawer&&(this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),await this._ensureDrawerMounted(),await a.ScbHeader._nextFrame(),await a.ScbHeader._nextFrame(),this._openDrawerNow())},this._onSearchClick=e=>{var r;const t=this._searchEl;if(t!=null&&t.submit&&typeof t.submit=="function"){t.submit();return}const i=(t==null?void 0:t.value)??"";this.searchText=i,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:i},bubbles:!0,composed:!0})),(r=t==null?void 0:t.focus)==null||r.call(t)},this._onTabsChange=e=>{var n,h,p;const t=e,i=((n=t==null?void 0:t.detail)==null?void 0:n.activeTabIndex)??((h=e.target)==null?void 0:h.activeTabIndex)??0;this.activeTab=i;const s=((p=(this._slotTabs.length?this._slotTabs:this.tabs)[i])==null?void 0:p.href)??"";this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:i,href:s},bubbles:!0,composed:!0}))},this._onSearchInput=e=>{var t;this.searchText=((t=e.detail)==null?void 0:t.value)??"",this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0}))},this._onSearchSubmit=e=>{var t,i;this.searchText=((t=e.detail)==null?void 0:t.value)??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:(i=e.detail)==null?void 0:i.active},bubbles:!0,composed:!0}))},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0}))}}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",a.ScbHeader.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",a.ScbHeader.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}async __ensureDrawer(){if(!this.__drawerLoaded)return this.__ensureDrawerPromise??(this.__ensureDrawerPromise=(async()=>{await Promise.resolve().then(()=>qd),this.__drawerLoaded=!0})()),this.__ensureDrawerPromise}async __ensureTabs(){if(!this.__tabsLoaded)return this.__ensureTabsPromise??(this.__ensureTabsPromise=(async()=>{await Promise.all([Promise.resolve().then(()=>bp),Promise.resolve().then(()=>up)]),this.__tabsLoaded=!0})()),this.__ensureTabsPromise}async __ensureSearch(){if(!this.__searchLoaded)return this.__ensureSearchPromise??(this.__ensureSearchPromise=(async()=>{await Promise.resolve().then(()=>td),this.__searchLoaded=!0})()),this.__ensureSearchPromise}get _slotEl(){var e;return((e=this.shadowRoot)==null?void 0:e.querySelector("slot#data-slot"))??null}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _tabsEl(){return this.renderRoot.querySelector("scb-tabs")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _searchEl(){return this.renderRoot.querySelector(`#${this._searchId}`)}_attachSlotObservers(){var t;(t=this._slotMo)==null||t.disconnect();const e=new MutationObserver(i=>{this._scheduleHarvest()});this._slotMo=e,e.observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["label","href","icon","target"]})}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_num(e,t){const i=Number.parseFloat(String(e??"").trim());return Number.isFinite(i)?i:t}_tokenPx(e,t){const i=getComputedStyle(this);return this._num(i.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}firstUpdated(){this.updateComplete.then(()=>{this._harvest(),this._attachSlotObservers()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0});const t=this._menuBtn,i=()=>this._ensureDrawerMounted();t==null||t.addEventListener("pointerenter",i,{once:!0}),t==null||t.addEventListener("focusin",i,{once:!0}),t==null||t.addEventListener("touchstart",i,{once:!0,passive:!0});const r=s=>"requestIdleCallback"in window?window.requestIdleCallback(s,{timeout:1500}):setTimeout(s,600);this.showDrawer&&r(()=>{this.__ensureDrawer()}),this._collapsed||r(()=>{this.__ensureTabs()}),this.showSearch&&r(()=>{this.__ensureSearch()})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"480px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"320px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("activeTab")||e.has("_slotTabs")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("showSearch")||e.has("searchMax")||e.has("searchMin"))&&this.updateComplete.then(()=>{this._scheduleMeasure(),this._applyActiveToTabs()}),e.has("showSearch")&&this.showSearch&&!this.__searchLoaded&&this.__ensureSearch()}disconnectedCallback(){var e,t;(e=this._ro)==null||e.disconnect(),(t=this._slotMo)==null||t.disconnect(),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}async _ensureDrawerMounted(){this._drawerMounted||(await this.__ensureDrawer(),this._drawerMounted=!0,await this.updateComplete)}_openDrawerNow(){var t,i;const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0,e.setAttribute("open",""),(t=e.show)==null||t.call(e),(i=e.openDrawer)==null||i.call(e),this._drawerExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})))}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1),this._drawerExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0}))}_syncMenuBtnAria(){const e=this.renderRoot.querySelector(".menu-trigger");e&&e.setAttribute("aria-expanded",String(this._drawerExpanded))}_applyActiveToTabs(){const e=this._tabsEl;if(!e)return;e.activeTabIndex=this.activeTab,e.querySelectorAll("scb-secondary-tab").forEach((i,r)=>{i.selected=r===this.activeTab})}_renderDrawerNodes(e){return!e||e.length===0?c``:c`${e.map(t=>{const i=Array.isArray(t.children)&&t.children.length>0;return c`
|
|
4926
|
+
`,pi([l({type:String,attribute:"max-width",reflect:!0,converter:{fromAttribute:o=>{if(o==null)return"1440px";const e=o.trim();return e===""?"1440px":/^\d+$/.test(e)?`${e}px`:e}}})],a.ScbFooter.prototype,"maxWidth",2),pi([l({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),pi([l({type:Array})],a.ScbFooter.prototype,"sections",2),pi([l({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=pi([g("scb-footer")],a.ScbFooter);var ph=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,jo=(o,e,t,i)=>{for(var r=i>1?void 0:i?uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ph(e,t,r),r};a.ScbHeaderDrawerGroup=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerGroup.styles=b`:host{display:none !important}`,jo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"label",2),jo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"icon",2),a.ScbHeaderDrawerGroup=jo([g("scb-header-drawer-group")],a.ScbHeaderDrawerGroup);var vh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,_r=(o,e,t,i)=>{for(var r=i>1?void 0:i?mh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&vh(e,t,r),r};a.ScbHeaderDrawerItem=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerItem.styles=b`:host{display:none !important}`,_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),_r([l({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=_r([g("scb-header-drawer-item")],a.ScbHeaderDrawerItem);var bh=Object.defineProperty,fh=Object.getOwnPropertyDescriptor,Uo=(o,e,t,i)=>{for(var r=i>1?void 0:i?fh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&bh(e,t,r),r};a.ScbHeaderTab=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderTab.styles=b`:host{display:none !important}`,Uo([l({type:String})],a.ScbHeaderTab.prototype,"label",2),Uo([l({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Uo([g("scb-header-tab")],a.ScbHeaderTab);var gh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,xr=(o,e,t,i)=>{for(var r=i>1?void 0:i?yh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&gh(e,t,r),r};a.ScbHeaderUtility=class extends y{constructor(){super(...arguments),this.label="",this.href="#"}render(){return c`<slot></slot>`}},a.ScbHeaderUtility.styles=b`:host{display:none !important}`,xr([l({type:String})],a.ScbHeaderUtility.prototype,"label",2),xr([l({type:String})],a.ScbHeaderUtility.prototype,"href",2),xr([l({type:String})],a.ScbHeaderUtility.prototype,"target",2),a.ScbHeaderUtility=xr([g("scb-header-utility")],a.ScbHeaderUtility);var _h=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,O=(o,e,t,i)=>{for(var r=i>1?void 0:i?xh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&_h(e,t,r),r};const Wo={fromAttribute:o=>o==null?!0:!/^(false|0|off|no)$/i.test(o),toAttribute:o=>String(!!o)};a.ScbHeader=class extends y{constructor(){super(...arguments),this.maxWidth="1440px",this.logoText="",this.logoHref="/",this.banner=!1,this.tabs=[],this.activeTab=0,this.utilityItems=[],this.showDrawer=!0,this.showSearch=!0,this.includeUtilityInDrawer=!1,this.searchText="",this._drawerId="main-drawer",this._drawerMounted=!1,this._drawerExpanded=!1,this._searchId="header-search",this._slotTabs=[],this._slotUtils=[],this._slotMenu=[],this._measureScheduled=!1,this._scheduleMeasure=()=>{this._measureScheduled||(this._measureScheduled=!0,requestAnimationFrame(()=>{this._measureScheduled=!1,this._measure()}))},this._onWindowResize=()=>{this._scheduleMeasure()},this._onDrawerSelect=e=>{this.dispatchEvent(new CustomEvent("drawer-select",{detail:e.detail,bubbles:!0,composed:!0})),this._closeDrawerNow()},this._collapsed=!1,this._unlockAtWidth=0,this._hideLogoText=!1,this._logoTextUnlockAt=0,this._harvestPending=!1,this.__drawerLoaded=!1,this.__tabsLoaded=!1,this.__searchLoaded=!1,this._harvest=()=>{const e=this._slotEl;if(!e)return;const t=e.assignedElements({flatten:!0}),i=[],r=[],s=[],n=h=>({label:h.getAttribute("label")??"",href:h.getAttribute("href")??void 0,icon:h.getAttribute("icon")??void 0});for(const h of t){const p=h.tagName.toLowerCase();if(p==="scb-header-tab"){i.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#"});continue}if(p==="scb-header-utility"){r.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#",target:h.getAttribute("target")??void 0});continue}if(p==="scb-header-drawer-group"){const v={label:h.getAttribute("label")??"",icon:h.getAttribute("icon")??void 0,children:[]};h.querySelectorAll("scb-header-drawer-item").forEach(m=>v.children.push(n(m))),s.push(v);continue}p==="scb-header-drawer-item"&&s.push(n(h))}this._slotTabs=i,this._slotUtils=r,this._slotMenu=s,queueMicrotask(()=>{this.updateComplete.then(()=>{this._applyActiveToTabs(),this._scheduleMeasure()})})},this._measure=()=>{var m,_,x;const e=this._top,t=this._logoGroup;if(!e||!t)return;const i=window.innerWidth,r=e.clientWidth,s=this._overflows(this._util),n=this._overflows(this._tabsEl),h=i<this.BP_MD||s||n;this._collapsed?!h&&r>=this._unlockAtWidth&&this._setCollapsed(!1):h&&(this._unlockAtWidth=r+this._HYST,this._setCollapsed(!0));let p=!1;if(this.showSearch&&i>=this.BP_SM&&i<this.BP_MD&&this._searchWrap){const S=getComputedStyle(this._searchWrap),C=Math.max(this._num(S.minWidth,this._tokenPx("--scb-header-search-min",320)),this._tokenPx("--scb-header-search-min",320)),E=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),A=this.showDrawer&&(i<this.BP_MD||this._collapsed)?((m=this._menuBtn)==null?void 0:m.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48):0;p=t.getBoundingClientRect().width+E+C+E+A+8>r+.5}this._setHideSearch(p);let v=!1;if(this.showDrawer&&(i<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const S=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),C=((_=this._menuBtn)==null?void 0:_.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48),E=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(r>=this._logoTextUnlockAt):E>r+.5&&(v=!0,this._logoTextUnlockAt=r+this._HYST)}else v=!1,this._logoTextUnlockAt=0;this._setHideLogoText(v)},this._onMenuClick=async e=>{e.preventDefault(),e.stopPropagation(),this.showDrawer&&(this.dispatchEvent(new CustomEvent("menu-click",{bubbles:!0,composed:!0})),await this._ensureDrawerMounted(),await a.ScbHeader._nextFrame(),await a.ScbHeader._nextFrame(),this._openDrawerNow())},this._onSearchClick=e=>{var r;const t=this._searchEl;if(t!=null&&t.submit&&typeof t.submit=="function"){t.submit();return}const i=(t==null?void 0:t.value)??"";this.searchText=i,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:i},bubbles:!0,composed:!0})),(r=t==null?void 0:t.focus)==null||r.call(t)},this._onTabsChange=e=>{var n,h,p;const t=e,i=((n=t==null?void 0:t.detail)==null?void 0:n.activeTabIndex)??((h=e.target)==null?void 0:h.activeTabIndex)??0;this.activeTab=i;const s=((p=(this._slotTabs.length?this._slotTabs:this.tabs)[i])==null?void 0:p.href)??"";this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:i,href:s},bubbles:!0,composed:!0}))},this._onSearchInput=e=>{var t;this.searchText=((t=e.detail)==null?void 0:t.value)??"",this.dispatchEvent(new CustomEvent("search-input",{detail:{value:this.searchText},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:this.searchText},bubbles:!0,composed:!0}))},this._onSearchSubmit=e=>{var t,i;this.searchText=((t=e.detail)==null?void 0:t.value)??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:(i=e.detail)==null?void 0:i.active},bubbles:!0,composed:!0}))},this._onSearchClear=()=>{this.searchText="",this.dispatchEvent(new CustomEvent("search-text-change",{detail:{value:""},bubbles:!0,composed:!0}))}}get _HYST(){return this._tokenPx("--spacing-11",64)}get BP_SM(){return this._tokenPx("--bp-sm",a.ScbHeader.BP_SM_DEFAULT)}get BP_MD(){return this._tokenPx("--bp-md",a.ScbHeader.BP_MD_DEFAULT)}_scheduleHarvest(){this._harvestPending||(this._harvestPending=!0,queueMicrotask(()=>{this._harvestPending=!1,this._harvest()}))}async __ensureDrawer(){if(!this.__drawerLoaded)return this.__ensureDrawerPromise??(this.__ensureDrawerPromise=(async()=>{await Promise.resolve().then(()=>qd),this.__drawerLoaded=!0})()),this.__ensureDrawerPromise}async __ensureTabs(){if(!this.__tabsLoaded)return this.__ensureTabsPromise??(this.__ensureTabsPromise=(async()=>{await Promise.all([Promise.resolve().then(()=>bp),Promise.resolve().then(()=>up)]),this.__tabsLoaded=!0})()),this.__ensureTabsPromise}async __ensureSearch(){if(!this.__searchLoaded)return this.__ensureSearchPromise??(this.__ensureSearchPromise=(async()=>{await Promise.resolve().then(()=>td),this.__searchLoaded=!0})()),this.__ensureSearchPromise}get _slotEl(){var e;return((e=this.shadowRoot)==null?void 0:e.querySelector("slot#data-slot"))??null}get _top(){return this.renderRoot.querySelector(".top-row")}get _util(){return this.renderRoot.querySelector(".utility")}get _tabsEl(){return this.renderRoot.querySelector("scb-tabs")}get _logoGroup(){return this.renderRoot.querySelector(".logo-wrap")||this.renderRoot.querySelector(".logo-group")}get _searchWrap(){return this.renderRoot.querySelector(".search")}get _menuBtn(){return this.renderRoot.querySelector(".menu-trigger")}get _searchEl(){return this.renderRoot.querySelector(`#${this._searchId}`)}_attachSlotObservers(){var t;(t=this._slotMo)==null||t.disconnect();const e=new MutationObserver(i=>{this._scheduleHarvest()});this._slotMo=e,e.observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["label","href","icon","target"]})}_setCollapsed(e){this._collapsed!==e&&(this._collapsed=e,e?this.setAttribute("data-collapsed",""):this.removeAttribute("data-collapsed"))}_setHideSearch(e){e?this.setAttribute("data-hide-search",""):this.removeAttribute("data-hide-search")}_setHideLogoText(e){this._hideLogoText!==e&&(this._hideLogoText=e,e?this.setAttribute("data-hide-logo-text",""):this.removeAttribute("data-hide-logo-text"))}_num(e,t){const i=Number.parseFloat(String(e??"").trim());return Number.isFinite(i)?i:t}_tokenPx(e,t){const i=getComputedStyle(this);return this._num(i.getPropertyValue(e),t)}_visible(e){return e?getComputedStyle(e).display!=="none":!1}_overflows(e){return!e||!this._visible(e)?!1:e.scrollWidth>e.clientWidth+1}firstUpdated(){this.updateComplete.then(()=>{this._harvest(),this._attachSlotObservers()});const e=this._top;e&&(this._ro=new ResizeObserver(()=>this._scheduleMeasure()),this._ro.observe(e)),window.addEventListener("resize",this._onWindowResize,{passive:!0});const t=this._menuBtn,i=()=>this._ensureDrawerMounted();t==null||t.addEventListener("pointerenter",i,{once:!0}),t==null||t.addEventListener("focusin",i,{once:!0}),t==null||t.addEventListener("touchstart",i,{once:!0,passive:!0});const r=s=>"requestIdleCallback"in window?window.requestIdleCallback(s,{timeout:1500}):setTimeout(s,600);this.showDrawer&&r(()=>{this.__ensureDrawer()}),this._collapsed||r(()=>{this.__ensureTabs()}),this.showSearch&&r(()=>{this.__ensureSearch()})}updated(e){e.has("searchMax")&&this.style.setProperty("--scb-header-search-max",this.searchMax??"480px"),e.has("searchMin")&&this.style.setProperty("--scb-header-search-min",this.searchMin??"320px"),e.has("searchHeight")&&(this.searchHeight&&this.searchHeight.trim()?this.style.setProperty("--scb-search-height",this.searchHeight.trim()):this.style.removeProperty("--scb-search-height")),(e.has("utilityItems")||e.has("tabs")||e.has("logoText")||e.has("activeTab")||e.has("_slotTabs")||e.has("_slotUtils")||e.has("_slotMenu")||e.has("showDrawer")||e.has("showSearch")||e.has("searchMax")||e.has("searchMin"))&&this.updateComplete.then(()=>{this._scheduleMeasure(),this._applyActiveToTabs()}),e.has("showSearch")&&this.showSearch&&!this.__searchLoaded&&this.__ensureSearch()}disconnectedCallback(){var e,t;(e=this._ro)==null||e.disconnect(),(t=this._slotMo)==null||t.disconnect(),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}async _ensureDrawerMounted(){this._drawerMounted||(await this.__ensureDrawer(),this._drawerMounted=!0,await this.updateComplete)}_openDrawerNow(){var t,i;const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0,e.setAttribute("open",""),(t=e.show)==null||t.call(e),(i=e.openDrawer)==null||i.call(e),this._drawerExpanded=!0,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-open",{bubbles:!0,composed:!0})))}_closeDrawerNow(){const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!1),this._drawerExpanded=!1,this._syncMenuBtnAria(),this.dispatchEvent(new CustomEvent("drawer-close",{bubbles:!0,composed:!0}))}_syncMenuBtnAria(){const e=this.renderRoot.querySelector(".menu-trigger");e&&e.setAttribute("aria-expanded",String(this._drawerExpanded))}_applyActiveToTabs(){const e=this._tabsEl;if(!e)return;e.activeTabIndex=this.activeTab,e.querySelectorAll("scb-secondary-tab").forEach((i,r)=>{i.selected=r===this.activeTab})}_renderDrawerNodes(e){return!e||e.length===0?c``:c`${e.map(t=>{const i=Array.isArray(t.children)&&t.children.length>0;return c`
|
|
4927
4927
|
<scb-drawer-item
|
|
4928
4928
|
label=${t.label}
|
|
4929
4929
|
?selected=${!1}
|
|
@@ -5193,7 +5193,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
5193
5193
|
:host([data-hide-logo-text]) .logo-text {
|
|
5194
5194
|
display: none;
|
|
5195
5195
|
}
|
|
5196
|
-
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),O([l({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),O([l({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),O([l({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),O([l({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),O([l({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),O([l({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),O([l({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),O([l({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),O([l({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),O([l({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),O([l({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),O([l({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),O([l({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),O([l({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),O([l({attribute:"show-drawer",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"showDrawer",2),O([l({attribute:"show-search",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"showSearch",2),O([l({attribute:"include-utility-in-drawer",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),O([l({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),O([l({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),O([l({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),O([l({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),O([w()],a.ScbHeader.prototype,"_drawerId",2),O([w()],a.ScbHeader.prototype,"_drawerMounted",2),O([w()],a.ScbHeader.prototype,"_drawerExpanded",2),O([w()],a.ScbHeader.prototype,"_searchId",2),O([w()],a.ScbHeader.prototype,"_slotTabs",2),O([w()],a.ScbHeader.prototype,"_slotUtils",2),O([w()],a.ScbHeader.prototype,"_slotMenu",2),O([w()],a.ScbHeader.prototype,"_collapsed",2),O([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=O([g("scb-header")],a.ScbHeader);var wh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,
|
|
5196
|
+
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),O([l({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),O([l({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),O([l({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),O([l({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),O([l({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),O([l({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),O([l({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),O([l({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),O([l({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),O([l({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),O([l({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),O([l({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),O([l({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),O([l({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),O([l({attribute:"show-drawer",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"showDrawer",2),O([l({attribute:"show-search",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"showSearch",2),O([l({attribute:"include-utility-in-drawer",reflect:!0,converter:Wo})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),O([l({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),O([l({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),O([l({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),O([l({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),O([w()],a.ScbHeader.prototype,"_drawerId",2),O([w()],a.ScbHeader.prototype,"_drawerMounted",2),O([w()],a.ScbHeader.prototype,"_drawerExpanded",2),O([w()],a.ScbHeader.prototype,"_searchId",2),O([w()],a.ScbHeader.prototype,"_slotTabs",2),O([w()],a.ScbHeader.prototype,"_slotUtils",2),O([w()],a.ScbHeader.prototype,"_slotMenu",2),O([w()],a.ScbHeader.prototype,"_collapsed",2),O([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=O([g("scb-header")],a.ScbHeader);var wh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,ft=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&wh(e,t,r),r};a.ScbHorizontalScroller=class extends y{constructor(){super(...arguments),this.variant="standard",this.width="100%",this.showScrollbar=!0,this.rightScrollButtonLabel="Scrolla höger",this.leftScrollButtonLabel="Scrolla vänster",this.contentFlex=!1,this.updateScrollButtons=()=>{var i;this.requestUpdate();const e=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");if(!e)return;e.scrollLeft>0?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left");const t=e;t.scrollLeft+t.clientWidth<t.scrollWidth-1?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.handleScroll=()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-horizontal-scroller");e&&(this.updateScrollButtons(),this.dispatchCustomEvent("scb-scroll",{scrollLeft:e.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEvent("scb-scroll-start",{scrollLeft:e.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEvent("scb-scroll-end",{scrollLeft:e.scrollLeft})},120),e.scrollLeft>this.lastScrollLeft?this.dispatchCustomEvent("scb-scroll-right",{scrollLeft:e.scrollLeft}):e.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEvent("scb-scroll-left",{scrollLeft:e.scrollLeft}),this.lastScrollLeft=e.scrollLeft)}}doScrollBy(e){var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");t&&t.scrollBy({left:e,behavior:"smooth"})}get canScrollLeft(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-horizontal-scroller");return e?e.scrollLeft>0:!1}get canScrollRight(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");if(!e)return!1;const t=e;return t.scrollLeft+t.clientWidth<t.scrollWidth-1}connectedCallback(){super.connectedCallback(),this.addEventListener("scroll",this.updateScrollButtons,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",this.updateScrollButtons,!0)}dispatchCustomEvent(e,t={}){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}firstUpdated(){var n,h,p,v;const e=(n=this.shadowRoot)==null?void 0:n.querySelector(".scb-horizontal-scroller"),t=(h=this.shadowRoot)==null?void 0:h.querySelector(".scroll-shadow-left"),i=(p=this.shadowRoot)==null?void 0:p.querySelector(".scroll-shadow-right"),r=(v=this.shadowRoot)==null?void 0:v.querySelector("slot");e&&(e.addEventListener("scroll",this.handleScroll),e.addEventListener("wheel",function(f){f.deltaY!==0&&(f.preventDefault(),e.scrollLeft+=f.deltaY)},{passive:!1}));const s=()=>{if(r&&t&&i){const f=r.getBoundingClientRect();t.style.height=`${f.height}px`,i.style.height=`${f.height}px`}};s(),r&&new ResizeObserver(s).observe(r),this.updateComplete.then(()=>{this.updateScrollButtons()})}updated(e){var h,p,v,f;const t=(h=this.shadowRoot)==null?void 0:h.querySelector(".scroll-shadow-left"),i=(p=this.shadowRoot)==null?void 0:p.querySelector(".scroll-shadow-right"),r=(v=this.shadowRoot)==null?void 0:v.querySelector("slot"),s=(f=this.shadowRoot)==null?void 0:f.querySelector(".scb-horizontal-scroller");if(s){s.addEventListener("scroll",this.handleScroll),s.addEventListener("wheel",function(_){_.deltaY!==0&&(_.preventDefault(),s.scrollLeft+=_.deltaY)},{passive:!1}),s.scrollLeft>0?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left");const m=s;m.scrollLeft+m.clientWidth<m.scrollWidth-1?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")}e.has("width")&&this.style.setProperty("--scb-horizontal-scroller-width",this.width);const n=()=>{if(r&&t&&i){const m=r.getBoundingClientRect();t.style.height=`${m.height}px`,i.style.height=`${m.height}px`}};n(),r&&new ResizeObserver(n).observe(r)}render(){const e=this.variant;var t=!!(this.canScrollLeft||this.canScrollRight);switch(e){case"inline":return c`
|
|
5197
5197
|
<div class="scb-horizontal-scroller ${t?"canScroll":""}" tabindex="0">
|
|
5198
5198
|
${this.variant!="inline"?c`<div class="scroll-shadow-left"></div>`:""}
|
|
5199
5199
|
<slot></slot>
|
|
@@ -5337,7 +5337,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
5337
5337
|
gap: var(--spacing-5);
|
|
5338
5338
|
}
|
|
5339
5339
|
|
|
5340
|
-
`,
|
|
5340
|
+
`,ft([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),ft([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),ft([l({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),ft([l({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),ft([l({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),ft([l({type:Boolean,reflect:!0,attribute:"content-flex"})],a.ScbHorizontalScroller.prototype,"contentFlex",2),a.ScbHorizontalScroller=ft([g("scb-horizontal-scroller")],a.ScbHorizontalScroller);var kh=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,se=(o,e,t,i)=>{for(var r=i>1?void 0:i?$h(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&kh(e,t,r),r};a.ScbKeyFigureCard=class extends y{constructor(){super(...arguments),this.keyfigure=0,this.subtitle="",this.supportingText="",this.cardHref="",this.icon="",this.size="standard",this.unit="",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.sizing="stretch",this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.location.href=this.cardHref)},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||(window.location.href=this.cardHref))}}formatNumber(e){if(typeof e=="number")return e.toLocaleString("sv-SE").replace(/\u00A0/g," ");const t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString("sv-SE").replace(/\u00A0/g," ")}async firstUpdated(){a.ScbKeyFigureCard.__iconLoaded||(await Promise.resolve().then(()=>X),a.ScbKeyFigureCard.__iconLoaded=!0),a.ScbKeyFigureCard.__rippleLoaded||(await Promise.resolve().then(()=>Yt),a.ScbKeyFigureCard.__rippleLoaded=!0),this.__applyInnerSizing()}render(){const e=!!this.cardHref,t=this.formatNumber(this.keyfigure),i=(this.unit||"").trim(),r=i?`${t} ${i}`:t;return c`
|
|
5341
5341
|
<div
|
|
5342
5342
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
5343
5343
|
role=${e?"link":"group"}
|
|
@@ -5623,126 +5623,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
5623
5623
|
opacity 0.25s cubic-bezier(0.23, 1, 0.32, 1),
|
|
5624
5624
|
transform 0.32s cubic-bezier(0.23, 1, 0.32, 1);
|
|
5625
5625
|
}
|
|
5626
|
-
`,Ko([l({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),Ko([l({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=Ko([g("scb-menu")],a.ScbMenu);var Oh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,
|
|
5627
|
-
<div class="notification" type=${this.type} role="alert" aria-live="assertive" aria-atomic="true" style="display: ${this.open?"flex":"none"};">
|
|
5628
|
-
${this.showIcon||this.showCloseButton?c`<div class="notification-header">
|
|
5629
|
-
${this.showIcon?c`<md-icon>${this._iconForType()}</md-icon>`:""}
|
|
5630
|
-
${this.showCloseButton?c`<scb-icon-button icon="close" @click=${this._closeNotification}></scb-icon-button>`:""}
|
|
5631
|
-
</div>`:""}
|
|
5632
|
-
<div class="notification-content">
|
|
5633
|
-
${this.label?c`<div class="notification-label">${this.label}</div>`:""}
|
|
5634
|
-
<slot></slot>
|
|
5635
|
-
${this.linkText?c`
|
|
5636
|
-
<div class="notification-footer">
|
|
5637
|
-
<a class="footer-link" href="${this.linkhref}">${this.linkText}</a>
|
|
5638
|
-
</div>
|
|
5639
|
-
`:""}
|
|
5640
|
-
<div>
|
|
5641
|
-
</div>
|
|
5642
|
-
`}},a.ScbNotification.styles=[b`
|
|
5643
|
-
:host {
|
|
5644
|
-
display: block;
|
|
5645
|
-
position: relative;
|
|
5646
|
-
container-type: inline-size;
|
|
5647
|
-
container-name: notification-container;
|
|
5648
|
-
}
|
|
5649
|
-
|
|
5650
|
-
.notification {
|
|
5651
|
-
border-radius: 12px;
|
|
5652
|
-
padding: 16px;
|
|
5653
|
-
display: flex;
|
|
5654
|
-
gap: 12px;
|
|
5655
|
-
flex-direction: column;
|
|
5656
|
-
|
|
5657
|
-
}
|
|
5658
|
-
@container notification-container (min-width: 400px) {
|
|
5659
|
-
.notification {
|
|
5660
|
-
flex-direction: row;
|
|
5661
|
-
}
|
|
5662
|
-
.notification-label {
|
|
5663
|
-
margin-right: 40px;
|
|
5664
|
-
}
|
|
5665
|
-
}
|
|
5666
|
-
.notification-label {
|
|
5667
|
-
font-weight: 600;
|
|
5668
|
-
font-size: 20px;
|
|
5669
|
-
line-height: 28px; /* 140% */
|
|
5670
|
-
letter-spacing: -0.4px;
|
|
5671
|
-
}
|
|
5672
|
-
.notification[type="success"] {
|
|
5673
|
-
background: var(--md-sys-color-success-container);
|
|
5674
|
-
color: var(--md-sys-color-on-success-container);
|
|
5675
|
-
|
|
5676
|
-
a{
|
|
5677
|
-
text-decoration: underline;
|
|
5678
|
-
text-decoration-thickness: 1px;
|
|
5679
|
-
text-underline-offset: .1578em;
|
|
5680
|
-
color: var(--md-sys-color-on-success-container);
|
|
5681
|
-
&:hover {text-decoration-thickness: 2px;}
|
|
5682
|
-
}
|
|
5683
|
-
}
|
|
5684
|
-
.notification[type="error"] {
|
|
5685
|
-
background: var(--md-sys-color-error-container);
|
|
5686
|
-
color: var(--md-sys-color-on-error-container);
|
|
5687
|
-
a{
|
|
5688
|
-
text-decoration: underline;
|
|
5689
|
-
text-decoration-thickness: 1px;
|
|
5690
|
-
text-underline-offset: .1578em;
|
|
5691
|
-
color: var(--md-sys-color-on-error-container);
|
|
5692
|
-
&:hover {text-decoration-thickness: 2px;}
|
|
5693
|
-
}
|
|
5694
|
-
}
|
|
5695
|
-
.notification[type="warning"] {
|
|
5696
|
-
background: var(--md-sys-color-warning-container);
|
|
5697
|
-
color: var(--md-sys-color-on-warning-container);
|
|
5698
|
-
a{
|
|
5699
|
-
text-decoration: underline;
|
|
5700
|
-
text-decoration-thickness: 1px;
|
|
5701
|
-
text-underline-offset: .1578em;
|
|
5702
|
-
color: var(--md-sys-color-on-warning-container);
|
|
5703
|
-
&:hover {text-decoration-thickness: 2px;}
|
|
5704
|
-
}
|
|
5705
|
-
}
|
|
5706
|
-
.notification[type="info"] {
|
|
5707
|
-
background: var(--md-sys-color-info-container);
|
|
5708
|
-
color: var(--md-sys-color-on-info-container);
|
|
5709
|
-
a{
|
|
5710
|
-
text-decoration: underline;
|
|
5711
|
-
text-decoration-thickness: 1px;
|
|
5712
|
-
text-underline-offset: .1578em;
|
|
5713
|
-
color: var(--md-sys-color-on-info-container);
|
|
5714
|
-
&:hover {text-decoration-thickness: 2px;}
|
|
5715
|
-
}
|
|
5716
|
-
}
|
|
5717
|
-
.notification-header scb-icon-button {
|
|
5718
|
-
position: absolute;
|
|
5719
|
-
right: 8px;
|
|
5720
|
-
top: 8px;
|
|
5721
|
-
}
|
|
5722
|
-
.notification-content{
|
|
5723
|
-
display: flex;
|
|
5724
|
-
flex-direction: column;
|
|
5725
|
-
gap: 4px;
|
|
5726
|
-
}
|
|
5727
|
-
slot{
|
|
5728
|
-
font-size: 18px;
|
|
5729
|
-
line-height: 26px;
|
|
5730
|
-
}
|
|
5731
|
-
.notification-footer {
|
|
5732
|
-
font-size: 18px;
|
|
5733
|
-
margin-top: 4px;
|
|
5734
|
-
line-height: 26px; /* 133% */
|
|
5735
|
-
}
|
|
5736
|
-
|
|
5737
|
-
:host([open]) .notification {
|
|
5738
|
-
opacity: 1;
|
|
5739
|
-
}
|
|
5740
|
-
|
|
5741
|
-
:host(:not([open])) .notification {
|
|
5742
|
-
opacity: 0;
|
|
5743
|
-
pointer-events: none;
|
|
5744
|
-
}
|
|
5745
|
-
`],tt([l({type:Boolean,reflect:!0})],a.ScbNotification.prototype,"open",2),tt([l({type:String})],a.ScbNotification.prototype,"label",2),tt([l({type:String})],a.ScbNotification.prototype,"type",2),tt([l({type:String,attribute:"link-text"})],a.ScbNotification.prototype,"linkText",2),tt([l({type:String,attribute:"link-href"})],a.ScbNotification.prototype,"linkhref",2),tt([l({type:Boolean,attribute:"show-icon"})],a.ScbNotification.prototype,"showIcon",2),tt([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotification.prototype,"showCloseButton",2),a.ScbNotification=tt([g("scb-notification")],a.ScbNotification);var Ph=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,W=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ph(e,t,r),r};a.ScbNotificationCard=class extends y{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}updated(e){super.updated(e),e.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size"))}render(){const e=this.direction==="vertical"?"vertical":"horizontal",t=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container);":"--_icon-color: var(--md-sys-color-on-info-container);";return c`
|
|
5626
|
+
`,Ko([l({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),Ko([l({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=Ko([g("scb-menu")],a.ScbMenu);var Oh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,W=(o,e,t,i)=>{for(var r=i>1?void 0:i?Lh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Oh(e,t,r),r};a.ScbNotificationCard=class extends y{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}updated(e){super.updated(e),e.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size"))}render(){const e=this.direction==="vertical"?"vertical":"horizontal",t=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container);":"--_icon-color: var(--md-sys-color-on-info-container);";return c`
|
|
5746
5627
|
<div
|
|
5747
5628
|
class="notification"
|
|
5748
5629
|
type=${this.variant}
|
|
@@ -6038,7 +5919,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6038
5919
|
box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
|
|
6039
5920
|
}
|
|
6040
5921
|
}
|
|
6041
|
-
`],W([l({type:String})],a.ScbNotificationCard.prototype,"variant",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),W([l({type:String})],a.ScbNotificationCard.prototype,"title",2),W([l({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),W([l({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),W([l({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),W([l({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),W([l({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkHref",2),W([l({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),W([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"sizing",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"width",2),W([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbNotificationCard.prototype,"maxWidth",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"height",2),W([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbNotificationCard.prototype,"maxHeight",2),W([l({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),W([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),a.ScbNotificationCard=W([g("scb-notification-card")],a.ScbNotificationCard);var
|
|
5922
|
+
`],W([l({type:String})],a.ScbNotificationCard.prototype,"variant",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),W([l({type:String})],a.ScbNotificationCard.prototype,"title",2),W([l({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),W([l({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),W([l({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),W([l({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),W([l({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkHref",2),W([l({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),W([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"sizing",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"width",2),W([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbNotificationCard.prototype,"maxWidth",2),W([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"height",2),W([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbNotificationCard.prototype,"maxHeight",2),W([l({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),W([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),a.ScbNotificationCard=W([g("scb-notification-card")],a.ScbNotificationCard);var Ph=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,Ve=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ph(e,t,r),r};a.ScbPagination=class extends y{constructor(){super(...arguments),this.variant="icon-text",this.page=1,this.totalPages=0,this.pagingHref="/products?page=",this.paginationAriaLabel="Paginering",this.currentAriaLabel="Nuvarande sida, ",this.pagingNumberAriaLabel="Gå till sida ",this.isNarrow=window.innerWidth<=768,this._onResize=()=>{this.isNarrow=window.innerWidth<=768}}_prevPage(){this.page>1&&this.page--,this.dispatchEvent(new CustomEvent("page-change",{detail:{page:this.page}}))}_nextPage(){this.page<this.totalPages&&this.page++,this.dispatchEvent(new CustomEvent("page-change",{detail:{page:this.page}}))}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._onResize),this._onResize()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._onResize)}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:r}=this,s=window.innerWidth<=768,n=s?1:2,h=p=>p===i?c`
|
|
6042
5923
|
<li>
|
|
6043
5924
|
<span
|
|
6044
5925
|
class="page-number active"
|
|
@@ -6212,7 +6093,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6212
6093
|
margin-top: 8px;
|
|
6213
6094
|
}
|
|
6214
6095
|
}
|
|
6215
|
-
`],Ve([l({type:String})],a.ScbPagination.prototype,"variant",2),Ve([l({type:Number})],a.ScbPagination.prototype,"page",2),Ve([l({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),Ve([l({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),Ve([l({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),Ve([l({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),Ve([l({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),Ve([l({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),a.ScbPagination=Ve([g("scb-pagination")],a.ScbPagination);var
|
|
6096
|
+
`],Ve([l({type:String})],a.ScbPagination.prototype,"variant",2),Ve([l({type:Number})],a.ScbPagination.prototype,"page",2),Ve([l({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),Ve([l({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),Ve([l({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),Ve([l({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),Ve([l({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),Ve([l({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),a.ScbPagination=Ve([g("scb-pagination")],a.ScbPagination);var Rh=Object.defineProperty,Bh=Object.getOwnPropertyDescriptor,mi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Bh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Rh(e,t,r),r};a.ScbProgressIndicator=class extends y{constructor(){super(...arguments),this.id="",this.type="circular",this.progress=25,this.isStatic=!0}render(){return c`
|
|
6216
6097
|
<div class="scb-progress-indicator">
|
|
6217
6098
|
${this.type==="circular"?c`
|
|
6218
6099
|
<div class="circular">
|
|
@@ -6288,7 +6169,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6288
6169
|
50% { margin-left: 30%; width: 60%; }
|
|
6289
6170
|
100% { margin-left: 100%; width: 40%; }
|
|
6290
6171
|
}
|
|
6291
|
-
`],
|
|
6172
|
+
`],mi([l({type:String})],a.ScbProgressIndicator.prototype,"id",2),mi([l({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),mi([l({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),mi([l({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=mi([g("scb-progress-indicator")],a.ScbProgressIndicator);var Mh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,zs=o=>{throw TypeError(o)},Rt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Hh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Mh(e,t,r),r},Fh=(o,e,t)=>e.has(o)||zs("Cannot "+t),bi=(o,e,t)=>(Fh(o,e,"read from private field"),t?t.call(o):e.get(o)),Is=(o,e,t)=>e.has(o)?zs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),fi,wr;a.ScbRadioGroup=class extends y{constructor(){super(...arguments),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="item",Is(this,fi,()=>{var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-radio-button");for(const r of t)this.name&&r.setAttribute("name",this.name),this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled"),this.orientation==="horizontal"?r.setAttribute("orientation","horizontal"):r.removeAttribute("orientation"),this.spacing==="group"?r.style.setProperty("--scb-radio-gap","0"):r.style.removeProperty("--scb-radio-gap")}),Is(this,wr,e=>{var r,s;const t=e.composedPath().find(n=>{var h;return((h=n==null?void 0:n.tagName)==null?void 0:h.toLowerCase())==="scb-radio-button"}),i=(t==null?void 0:t.value)??((r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,"value"))??((s=e.target)==null?void 0:s.value)??"";this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
6292
6173
|
<div
|
|
6293
6174
|
class="g"
|
|
6294
6175
|
role="radiogroup"
|
|
@@ -6296,9 +6177,9 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6296
6177
|
aria-label=${this.ariaLabel??""}
|
|
6297
6178
|
style=${`--_dir:${e}`}
|
|
6298
6179
|
>
|
|
6299
|
-
<slot @slotchange=${
|
|
6180
|
+
<slot @slotchange=${bi(this,fi)}></slot>
|
|
6300
6181
|
</div>
|
|
6301
|
-
`}firstUpdated(){
|
|
6182
|
+
`}firstUpdated(){bi(this,fi).call(this),this.addEventListener("change",bi(this,wr))}disconnectedCallback(){this.removeEventListener("change",bi(this,wr)),super.disconnectedCallback()}updated(e){(e.has("name")||e.has("disabled")||e.has("orientation"))&&bi(this,fi).call(this)}},fi=new WeakMap,wr=new WeakMap,a.ScbRadioGroup.styles=b`
|
|
6302
6183
|
:host { display: block; }
|
|
6303
6184
|
|
|
6304
6185
|
.g {
|
|
@@ -6315,7 +6196,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6315
6196
|
:host([spacing="group"]) ::slotted(scb-radio-button) {
|
|
6316
6197
|
--scb-radio-gap: 0;
|
|
6317
6198
|
}
|
|
6318
|
-
`,
|
|
6199
|
+
`,Rt([l({type:String})],a.ScbRadioGroup.prototype,"name",2),Rt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Rt([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Rt([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Rt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=Rt([g("scb-radio-group")],a.ScbRadioGroup);var Nh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,gt=(o,e,t,i)=>{for(var r=i>1?void 0:i?qh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nh(e,t,r),r};a.ScbRadioButton=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.name="",this.value="",this.label="",this.supportingText="",this._radioId="",this._onMdRadioChange=e=>{if(this.disabled)return;const t=e.target;t&&t.checked&&(this.checked=!0,this.dispatchEvent(new CustomEvent("scb-radio-change",{detail:{name:this.name,source:this},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value},bubbles:!0,composed:!0})))},this._onRadioChange=e=>{e.detail.name===this.name&&e.detail.source!==this&&(this.checked=!1)}}connectedCallback(){super.connectedCallback(),this._radioId=this.id||`scb-radio-${Math.random().toString(36).substr(2,9)}`,document.addEventListener("scb-radio-change",this._onRadioChange)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("scb-radio-change",this._onRadioChange)}firstUpdated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("md-radio");e&&e.addEventListener("input",()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})}updated(e){super.updated(e),e.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled)}render(){const e=this.supportingText?`${this._radioId}-supporting-text`:void 0;return c`
|
|
6319
6200
|
<label class="wrap">
|
|
6320
6201
|
<div class="radio-wrap">
|
|
6321
6202
|
<md-radio
|
|
@@ -6403,7 +6284,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6403
6284
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
6404
6285
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
6405
6286
|
}
|
|
6406
|
-
`,
|
|
6287
|
+
`,gt([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),gt([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),gt([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),gt([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),gt([l({type:String})],a.ScbRadioButton.prototype,"label",2),gt([l({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=gt([g("scb-radio-button")],a.ScbRadioButton);const Vh=Object.freeze(Object.defineProperty({__proto__:null,get ScbRadioButton(){return a.ScbRadioButton}},Symbol.toStringTag,{value:"Module"}));var jh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Bt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&jh(e,t,r),r};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var n;const e=this.parentElement,t=(n=e==null?void 0:e.hasAttribute)==null?void 0:n.call(e,"disabled"),i=this.disabled||t,r=!!this.icon,s=!!this.label;return c`
|
|
6407
6288
|
<div class="segmented-item${r||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${i?"true":"false"}">
|
|
6408
6289
|
<md-ripple ?disabled="${i}"></md-ripple>
|
|
6409
6290
|
${this.selected?r&&s?c`<md-icon>check</md-icon>`:r?c`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>`:c`<md-icon>check</md-icon>`:r?c`<md-icon>${this.icon}</md-icon>`:""}
|
|
@@ -6477,7 +6358,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6477
6358
|
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
6478
6359
|
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
6479
6360
|
}
|
|
6480
|
-
`,
|
|
6361
|
+
`,Bt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),Bt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),Bt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),Bt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),Bt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=Bt([g("scb-segmented-item")],a.ScbSegmentedItem);var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,gi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Kh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Wh(e,t,r),r};a.ScbSegmentedButton=class extends y{constructor(){super(...arguments),this.variant="single-select",this.value="",this.values=[],this.disabled=!1}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;const i=t.closest("scb-segmented-item");if(!i||this.disabled||i.hasAttribute("disabled"))return;const r=i.getAttribute("value")||"";r&&(this.variant==="multi-select"?(this.values.indexOf(r)===-1?this.values=[...this.values,r]:this.values=this.values.filter(n=>n!==r),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):r!==this.value&&(this.value=r,this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0})),this.updateSegments()))}updateSegments(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;e.assignedElements().forEach(r=>{if(r.tagName==="SCB-SEGMENTED-ITEM"){const s=r.getAttribute("value")||"";if(s){let n=!1;this.variant==="multi-select"?n=!!this.values&&this.values.includes(s):n=s===this.value,r.setAttribute("aria-pressed",n?"true":"false"),n?r.setAttribute("selected","true"):r.removeAttribute("selected")}this.disabled&&r.setAttribute("disabled","true")}})}firstUpdated(){var t;this.updateSegments();const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e&&(e.addEventListener("click",i=>this.onSlotClick(i)),e.addEventListener("focus",()=>{this.dispatchEvent(new CustomEvent("focus",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("blur",()=>{this.dispatchEvent(new CustomEvent("blur",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("keydown",i=>{if(i.code==="Space"||i.code==="Enter"||i.code==="NumpadEnter"){const r=i.target;if(r&&r.closest){const s=r.closest("scb-segmented-item");s&&!s.hasAttribute("disabled")&&!this.disabled&&(this.onSlotClick(i),i.preventDefault())}}}))}updated(){this.updateSegments()}render(){return c`<slot></slot>`}},a.ScbSegmentedButton.styles=b`
|
|
6481
6362
|
:host {
|
|
6482
6363
|
--scb-segmented-button-width: 100%;
|
|
6483
6364
|
--scb-segmented-button-height: 48px;
|
|
@@ -6504,7 +6385,39 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6504
6385
|
::slotted([role="button"]:first-child .segmented-item) {
|
|
6505
6386
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
6506
6387
|
}
|
|
6507
|
-
`,
|
|
6388
|
+
`,gi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),gi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),gi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),gi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=gi([g("scb-segmented-button")],a.ScbSegmentedButton);var Gh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,yi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Yh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Gh(e,t,r),r};a.ScbSkeleton=class extends y{constructor(){super(...arguments),this.variant="rectangular",this.width="100%",this.height="100%",this.borderSize="small"}render(){return this.style.setProperty("--scb-skeleton-width",this.width),this.style.setProperty("--scb-skeleton-height",this.height),this.variant==="rounded"&&this.style.setProperty("--scb-skeleton-border-size",this.borderSize==="small"?"8px":this.borderSize==="medium"?"16px":this.borderSize==="large"?"24px":"8px"),c`
|
|
6389
|
+
<div
|
|
6390
|
+
class="skeleton${this.variant==="circular"?" circle":""} ${this.variant==="rounded"?" rounded":""}"
|
|
6391
|
+
><slot></slot></div>
|
|
6392
|
+
`}},a.ScbSkeleton.styles=b`
|
|
6393
|
+
:host {
|
|
6394
|
+
display: inline-block;
|
|
6395
|
+
max-width: var(--scb-skeleton-width);
|
|
6396
|
+
width: 100%;
|
|
6397
|
+
height: var(--scb-skeleton-height);
|
|
6398
|
+
}
|
|
6399
|
+
.skeleton {
|
|
6400
|
+
background: linear-gradient(90deg, var(--md-sys-color-surface-container-high) 25%, var(--md-sys-color-surface-container-highest) 50%, var(--md-sys-color-surface-container-high) 75%);
|
|
6401
|
+
background-size: 200% 100%;
|
|
6402
|
+
animation: skeleton-loading 3.2s infinite linear;
|
|
6403
|
+
width: 100%;
|
|
6404
|
+
height: 100%;
|
|
6405
|
+
}
|
|
6406
|
+
.rounded {
|
|
6407
|
+
border-radius: var(--scb-skeleton-border-size);
|
|
6408
|
+
}
|
|
6409
|
+
.circle {
|
|
6410
|
+
border-radius: 50%;
|
|
6411
|
+
}
|
|
6412
|
+
@keyframes skeleton-loading {
|
|
6413
|
+
0% {
|
|
6414
|
+
background-position: 200% 0;
|
|
6415
|
+
}
|
|
6416
|
+
100% {
|
|
6417
|
+
background-position: -200% 0;
|
|
6418
|
+
}
|
|
6419
|
+
}
|
|
6420
|
+
`,yi([l({type:String})],a.ScbSkeleton.prototype,"variant",2),yi([l({type:String})],a.ScbSkeleton.prototype,"width",2),yi([l({type:String})],a.ScbSkeleton.prototype,"height",2),yi([l({type:String,attribute:"border-size"})],a.ScbSkeleton.prototype,"borderSize",2),a.ScbSkeleton=yi([g("scb-skeleton")],a.ScbSkeleton);var Xh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,tt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Zh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Xh(e,t,r),r};a.ScbSnackbar=class extends y{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action",{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("snackbar-close",{bubbles:!0,composed:!0}))),(e.has("open")||e.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const e=!!this.actionText,t=!!this.showClose;let i="snackbar";return!e&&!t&&(i+=" no-actions"),this.withLongerAction&&(i+=" longer-action"),c`
|
|
6508
6421
|
<div class="${i}" ?hidden=${!this.open}>
|
|
6509
6422
|
${this.withLongerAction?c`
|
|
6510
6423
|
<div class="message">${this.message}</div>
|
|
@@ -6626,7 +6539,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6626
6539
|
);
|
|
6627
6540
|
--md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
|
|
6628
6541
|
}
|
|
6629
|
-
`,
|
|
6542
|
+
`,tt([l({type:String})],a.ScbSnackbar.prototype,"message",2),tt([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),tt([l({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),tt([l({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),tt([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),tt([l({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),tt([l({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=tt([g("scb-snackbar")],a.ScbSnackbar);var Jh=Object.defineProperty,Qh=Object.getOwnPropertyDescriptor,Sr=(o,e,t,i)=>{for(var r=i>1?void 0:i?Qh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Jh(e,t,r),r};a.ScbStatusPill=class extends y{constructor(){super(...arguments),this.status="",this.label="",this.showIcon=!1}render(){return c`
|
|
6630
6543
|
${this.showIcon?this.status==="success"?c`<md-icon>check_circle</md-icon>`:this.status==="warning"?c`<md-icon>warning</md-icon>`:this.status==="error"?c`<md-icon>error</md-icon>`:"":""}
|
|
6631
6544
|
<span class="label">${this.label}</span>
|
|
6632
6545
|
`}},a.ScbStatusPill.styles=b`
|
|
@@ -6824,7 +6737,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6824
6737
|
}
|
|
6825
6738
|
}
|
|
6826
6739
|
|
|
6827
|
-
`,xe([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),xe([l({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),xe([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),xe([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),xe([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),xe([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),xe([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=xe([g("scb-step")],a.ScbStep);var ip=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,
|
|
6740
|
+
`,xe([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),xe([l({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),xe([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),xe([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),xe([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),xe([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),xe([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),xe([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=xe([g("scb-step")],a.ScbStep);var ip=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,yt=(o,e,t,i)=>{for(var r=i>1?void 0:i?rp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ip(e,t,r),r};a.ScbStepper=class extends y{constructor(){super(...arguments),this.type="",this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.activeIndex=0,this._onKeyNav=e=>{const t=this._getSteps(),i=this.activeIndex;let r=i;e.detail.key==="ArrowRight"?i<t.length-1?r=i+1:r=0:e.detail.key==="ArrowLeft"&&(i>0?r=i-1:r=t.length-1),r!==i&&(this._onStepClick(r),setTimeout(()=>{var n;const s=(n=t[r].shadowRoot)==null?void 0:n.querySelector(".scb-step-content");s&&"focus"in s&&typeof s.focus=="function"&&s.focus()},0))},this._onStepContainerClick=e=>{const t=this._getSteps(),i=e.composedPath(),r=t.findIndex(s=>i.includes(s));r!==-1&&this._onStepClick(r)}}_onStepClick(e){const t=this.activeIndex;this.activeIndex=e,this._updateSteps(),this.dispatchEvent(new CustomEvent("scb-step-change",{detail:{index:this.activeIndex,step:this._getSteps()[this.activeIndex]},bubbles:!0,composed:!0})),e>t?this.dispatchEvent(new CustomEvent("scb-step-next",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0})):e<t&&this.dispatchEvent(new CustomEvent("scb-step-prev",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0}))}nextStep(){const e=this._getSteps();this.activeIndex<e.length-1&&this._onStepClick(this.activeIndex+1)}prevStep(){this.activeIndex>0&&this._onStepClick(this.activeIndex-1)}getActiveIndex(){return this.activeIndex}_updateSteps(){const e=this._getSteps();e.forEach((t,i)=>{t.active=i===this.activeIndex,t.completed=i<this.activeIndex,t.islast=!1,t.changeOnCompleted=this.changeOnCompleted,t.number=i+1,t.variant=this.variant,t.symbolVariant=this.symbolVariant}),e.length>0&&(e[e.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(){this._updateSteps()}updated(){this._updateSteps()}render(){return c`
|
|
6828
6741
|
<div
|
|
6829
6742
|
class="steps"
|
|
6830
6743
|
role="list"
|
|
@@ -6906,7 +6819,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6906
6819
|
::slotted(scb-step[symbol-variant="marker"]:not(:first-child))::before {
|
|
6907
6820
|
top: 20px;
|
|
6908
6821
|
}
|
|
6909
|
-
`,
|
|
6822
|
+
`,yt([l({type:String,reflect:!0})],a.ScbStepper.prototype,"type",2),yt([l({type:String,reflect:!0})],a.ScbStepper.prototype,"label",2),yt([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStepper.prototype,"changeOnCompleted",2),yt([l({type:String})],a.ScbStepper.prototype,"variant",2),yt([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStepper.prototype,"symbolVariant",2),yt([w()],a.ScbStepper.prototype,"activeIndex",2),a.ScbStepper=yt([g("scb-stepper")],a.ScbStepper);var op=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,Ts=o=>{throw TypeError(o)},_t=(o,e,t,i)=>{for(var r=i>1?void 0:i?ap(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&op(e,t,r),r},Os=(o,e,t)=>e.has(o)||Ts("Cannot "+t),sp=(o,e,t)=>(Os(o,e,"read from private field"),e.get(o)),np=(o,e,t)=>e.has(o)?Ts("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),lp=(o,e,t,i)=>(Os(o,e,"write to private field"),e.set(o,t),t),kr;a.ScbSwitch=class extends y{constructor(){super(...arguments),this.label="",this.ariaLabel="",this.icons=!1,this.selected=!1,this.disabled=!1,this.fullWidth=!1,np(this,kr,!1)}updated(){this.toggleAttribute("aria-disabled",this.disabled)}async firstUpdated(){var t;sp(this,kr)||(await Promise.resolve().then(()=>mc),lp(this,kr,!0));const e=(t=this.shadowRoot)==null?void 0:t.querySelector("md-switch");e==null||e.addEventListener("change",i=>{this.selected=i.target.selected,this.dispatchEvent(new CustomEvent("change",{detail:{selected:this.selected},bubbles:!0,composed:!0}))})}render(){const e=this.label.trim().length>0,t=e?u:this.ariaLabel||u,i=c`
|
|
6910
6823
|
<md-switch
|
|
6911
6824
|
?icons=${this.icons}
|
|
6912
6825
|
?selected=${this.selected}
|
|
@@ -6958,17 +6871,17 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
6958
6871
|
/* Ärver färg från container */
|
|
6959
6872
|
color: var(--scb-switch-label-color, inherit);
|
|
6960
6873
|
}
|
|
6961
|
-
`,
|
|
6874
|
+
`,_t([l({type:String})],a.ScbSwitch.prototype,"label",2),_t([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbSwitch.prototype,"ariaLabel",2),_t([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"icons",2),_t([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"selected",2),_t([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"disabled",2),_t([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbSwitch.prototype,"fullWidth",2),a.ScbSwitch=_t([g("scb-switch")],a.ScbSwitch);const Ls=Object.freeze(Object.defineProperty({__proto__:null,get ScbSwitch(){return a.ScbSwitch}},Symbol.toStringTag,{value:"Module"}));var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,$r=(o,e,t,i)=>{for(var r=i>1?void 0:i?dp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&cp(e,t,r),r};a.ScbPrimaryTab=class extends ri{constructor(){super(...arguments),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{var t;const e=((t=this.textContent)==null?void 0:t.trim())??"";this.dispatchEvent(new CustomEvent("activate",{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(e){const t=this._icon;t!==e&&(this._icon=e,this.requestUpdate("icon",t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){var e;if(super.updated(),this.setAttribute("aria-selected",this.active?"true":"false"),this.iconOnly&&!this.hasAttribute("aria-label")){const t=((e=this.textContent)==null?void 0:e.trim())??"";t&&this.setAttribute("aria-label",t)}}async ensureMdIconLoaded(){const e=globalThis;e.__mdIconLoaded||(await Promise.resolve().then(()=>X),e.__mdIconLoaded=!0)}async updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e==null||e.remove();return}if(await this.ensureMdIconLoaded(),e)e.textContent=this._icon;else{const t=document.createElement("md-icon");t.setAttribute("slot","icon"),t.textContent=this._icon,this.appendChild(t)}}},a.ScbPrimaryTab.styles=[...ri.styles,b`
|
|
6962
6875
|
/* Icon-only: dölj textslot */
|
|
6963
6876
|
:host([icon-only]) slot:not([name='icon']) {
|
|
6964
6877
|
display: none;
|
|
6965
6878
|
}
|
|
6966
|
-
`],$r([l({type:String})],a.ScbPrimaryTab.prototype,"icon",1),$r([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbPrimaryTab.prototype,"iconOnly",2),$r([l({type:Boolean,reflect:!0,attribute:"inline-icon"})],a.ScbPrimaryTab.prototype,"inlineIcon",2),a.ScbPrimaryTab=$r([g("scb-primary-tab")],a.ScbPrimaryTab);var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Go=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hp(e,t,r),r};a.ScbSecondaryTab=class extends
|
|
6879
|
+
`],$r([l({type:String})],a.ScbPrimaryTab.prototype,"icon",1),$r([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbPrimaryTab.prototype,"iconOnly",2),$r([l({type:Boolean,reflect:!0,attribute:"inline-icon"})],a.ScbPrimaryTab.prototype,"inlineIcon",2),a.ScbPrimaryTab=$r([g("scb-primary-tab")],a.ScbPrimaryTab);var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Go=(o,e,t,i)=>{for(var r=i>1?void 0:i?pp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&hp(e,t,r),r};a.ScbSecondaryTab=class extends oi{constructor(){super(...arguments),this.iconOnly=!1,this._onActivate=()=>{var t;const e=((t=this.textContent)==null?void 0:t.trim())??"";this.dispatchEvent(new CustomEvent("activate",{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(e){const t=this._icon;t!==e&&(this._icon=e,this.requestUpdate("icon",t),this.updateIconSlot())}firstUpdated(e){var t;if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute("aria-label")){const i=((t=this.textContent)==null?void 0:t.trim())??"";i&&this.setAttribute("aria-label",i)}this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){var e;if(super.updated(),this.iconOnly&&!this.hasAttribute("aria-label")){const t=((e=this.textContent)==null?void 0:e.trim())??"";t&&this.setAttribute("aria-label",t)}}async ensureMdIconLoaded(){const e=globalThis;e.__mdIconLoaded||(await Promise.resolve().then(()=>X),e.__mdIconLoaded=!0)}async updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e==null||e.remove();return}if(await this.ensureMdIconLoaded(),e)e.textContent=this._icon;else{const t=document.createElement("md-icon");t.setAttribute("slot","icon"),t.textContent=this._icon,this.appendChild(t)}}},a.ScbSecondaryTab.styles=[...oi.styles,b`
|
|
6967
6880
|
/* Icon-only: göm all text utom slot="icon" */
|
|
6968
6881
|
:host([icon-only]) slot:not([name='icon']) {
|
|
6969
6882
|
display: none;
|
|
6970
6883
|
}
|
|
6971
|
-
`],Go([l({type:String})],a.ScbSecondaryTab.prototype,"icon",1),Go([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=Go([g("scb-secondary-tab")],a.ScbSecondaryTab);const up=Object.freeze(Object.defineProperty({__proto__:null,get ScbSecondaryTab(){return a.ScbSecondaryTab}},Symbol.toStringTag,{value:"Module"}));var vp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,Ps=(o,e,t,i)=>{for(var r=i>1?void 0:i?mp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&vp(e,t,r),r};a.ScbTabs=class extends
|
|
6884
|
+
`],Go([l({type:String})],a.ScbSecondaryTab.prototype,"icon",1),Go([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=Go([g("scb-secondary-tab")],a.ScbSecondaryTab);const up=Object.freeze(Object.defineProperty({__proto__:null,get ScbSecondaryTab(){return a.ScbSecondaryTab}},Symbol.toStringTag,{value:"Module"}));var vp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,Ps=(o,e,t,i)=>{for(var r=i>1?void 0:i?mp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&vp(e,t,r),r};a.ScbTabs=class extends ai{constructor(){super(...arguments),this.ariaLabel="",this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;const t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent("change",{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tablist")}firstUpdated(e){super.firstUpdated(e),this.addEventListener("change",this._onChange)}},a.ScbTabs.styles=[...ai.styles,b`
|
|
6972
6885
|
:host {
|
|
6973
6886
|
/*Containerfärg */
|
|
6974
6887
|
--md-primary-tab-container-color: var(--md-sys-color-surface);
|
|
@@ -7161,7 +7074,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
7161
7074
|
.scb-textfield.has-error-icon {
|
|
7162
7075
|
padding-right: 44px; /* Adjust as needed for icon size and spacing */
|
|
7163
7076
|
}
|
|
7164
|
-
`],ne([l({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),ne([l({type:String})],a.ScbTextField.prototype,"label",2),ne([l({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),ne([l({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),ne([l({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),ne([l({type:String})],a.ScbTextField.prototype,"name",2),ne([l({type:String})],a.ScbTextField.prototype,"pattern",2),ne([l({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),ne([l({type:String})],a.ScbTextField.prototype,"underLabel",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),a.ScbTextField=ne([g("scb-textfield")],a.ScbTextField);const yp=Object.freeze(Object.defineProperty({__proto__:null,get ScbTextField(){return a.ScbTextField}},Symbol.toStringTag,{value:"Module"}));var _p=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,
|
|
7077
|
+
`],ne([l({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),ne([l({type:String})],a.ScbTextField.prototype,"label",2),ne([l({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),ne([l({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),ne([l({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),ne([l({type:String})],a.ScbTextField.prototype,"name",2),ne([l({type:String})],a.ScbTextField.prototype,"pattern",2),ne([l({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),ne([l({type:String})],a.ScbTextField.prototype,"underLabel",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),ne([l({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),a.ScbTextField=ne([g("scb-textfield")],a.ScbTextField);const yp=Object.freeze(Object.defineProperty({__proto__:null,get ScbTextField(){return a.ScbTextField}},Symbol.toStringTag,{value:"Module"}));var _p=Object.defineProperty,xp=Object.getOwnPropertyDescriptor,Mt=(o,e,t,i)=>{for(var r=i>1?void 0:i?xp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&_p(e,t,r),r};a.ScbTocItem=class extends y{constructor(){super(...arguments),this.expanded=!1,this.label="",this.supportingText="",this.itemHref="#",this.divider=!0,this._unique=crypto.randomUUID(),this._slotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot");this._slotHasContent=!!e&&e.assignedNodes().length>0,this.requestUpdate(),this._updateTabbable()},this.toggleAccordion=()=>{const e=this.closest("scb-toc");e!=null&&e.hasAttribute("detached")||e.querySelectorAll("scb-toc-item").forEach(r=>{r!==this&&r.expanded&&(r.expanded=!1,this.toggleBottom(r),r.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:!1},bubbles:!0,composed:!0})))});const t=this.expanded;this.expanded=!this.expanded,this.toggleBottom(this),t!==this.expanded&&this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.addEventListener("slotchange",this._onSlotChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("slotchange",this._onSlotChange)}updated(e){e.has("expanded")&&this._updateTabbable()}_updateTabbable(){if(typeof window>"u")return;const e=this.renderRoot.querySelector("slot");if(!e)return;e.assignedElements({flatten:!0}).forEach(i=>{var r;i.matches("a,button,input,select,textarea,[tabindex]")&&(this.expanded?i.removeAttribute("tabindex"):i.setAttribute("tabindex","-1")),(r=i.querySelectorAll)==null||r.call(i,"a,button,input,select,textarea,[tabindex]").forEach(s=>{const n=s;this.expanded?n.removeAttribute("tabindex"):n.setAttribute("tabindex","-1")})})}toggleBottom(e){const t=e.renderRoot.querySelector(".scb-toc-item-bottom");t&&(e.expanded?(t.style.maxHeight=`${t.scrollHeight}px`,setTimeout(()=>t.style.maxHeight="unset",160)):(t.style.maxHeight=`${t.scrollHeight}px`,requestAnimationFrame(()=>t.style.maxHeight="0")))}_onKeyDown(e){const t=this.closest("scb-toc"),r=Array.from((t==null?void 0:t.querySelectorAll("scb-toc-item"))||[]).map(h=>h.renderRoot.querySelector(".scb-toc-item")).filter(h=>!!h),s=e.currentTarget,n=r.indexOf(s);switch(e.key){case"Enter":case" ":e.preventDefault(),this.toggleAccordion();break;case"ArrowDown":e.preventDefault(),n<r.length-1&&r[n+1].focus();break;case"ArrowUp":e.preventDefault(),n>0&&r[n-1].focus();break;case"Home":e.preventDefault(),r.length&&r[0].focus();break;case"End":e.preventDefault(),r.length&&r[r.length-1].focus();break}}render(){const e=`bottom-${this._unique}`,t=`toc-label-${this._unique}`;return c`
|
|
7165
7078
|
<div
|
|
7166
7079
|
class="scb-toc-item"
|
|
7167
7080
|
role="listitem"
|
|
@@ -7259,7 +7172,7 @@ var ScbWcTest=function(a){"use strict";var Rs;function d(o,e,t,i){var r=argument
|
|
|
7259
7172
|
.scb-toc-item {
|
|
7260
7173
|
color: var(--md-sys-color-on-surface);
|
|
7261
7174
|
}
|
|
7262
|
-
`],
|
|
7175
|
+
`],Mt([l({type:Boolean})],a.ScbTocItem.prototype,"expanded",2),Mt([l({type:String,reflect:!0})],a.ScbTocItem.prototype,"label",2),Mt([l({type:String,attribute:"supporting-text"})],a.ScbTocItem.prototype,"supportingText",2),Mt([l({type:String,attribute:"item-href"})],a.ScbTocItem.prototype,"itemHref",2),Mt([l({type:Boolean,attribute:"divider"})],a.ScbTocItem.prototype,"divider",2),a.ScbTocItem=Mt([g("scb-toc-item")],a.ScbTocItem);var wp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Ds=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sp(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&wp(e,t,r),r};a.ScbToc=class extends y{constructor(){super(...arguments),this.detached=!1}render(){return c`
|
|
7263
7176
|
<div class="scb-toc-list" role="list">
|
|
7264
7177
|
<slot></slot>
|
|
7265
7178
|
</div>
|