scb-wc-test 0.1.75 → 0.1.76
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/mvc/components/scb-app-bar/scb-app-bar.js +3 -2
- package/mvc/components/scb-dialog/scb-dialog.js +5 -1
- package/mvc/components/scb-menu/scb-menu.js +4 -2
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -0
- package/package.json +2 -2
- package/scb-app-bar/scb-app-bar.d.ts +1 -0
- package/scb-app-bar/scb-app-bar.js +33 -28
- package/scb-dialog/scb-dialog.js +5 -1
- package/scb-menu/scb-menu.js +2 -0
- package/scb-segmented-button/scb-segmented-button.js +5 -4
- package/scb-wc-test.bundle.js +317 -309
package/scb-wc-test.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,
|
|
1
|
+
var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=arguments.length,s=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var h=o.length-1;h>=0;h--)(n=o[h])&&(s=(r<3?n(s):r>3?n(e,t,s):n(e,t))||s);return r>3&&s&&Object.defineProperty(e,t,s),s}typeof SuppressedError=="function"&&SuppressedError;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -6,15 +6,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2019 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const
|
|
9
|
+
*/const ui=globalThis,gr=ui.ShadowRoot&&(ui.ShadyCSS===void 0||ui.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yr=Symbol(),No=new WeakMap;let qo=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==yr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(gr&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=No.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&No.set(t,e))}return e}toString(){return this.cssText}};const Is=o=>new qo(typeof o=="string"?o:o+"",void 0,yr),b=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,r,s)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[s+1],o[0]);return new qo(t,o,yr)},zs=(o,e)=>{if(gr)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),r=ui.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=t.cssText,o.appendChild(i)}},Vo=gr?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Is(t)})(o):o;/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:Ts,defineProperty:Os,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:Ls,getOwnPropertySymbols:Ds,getPrototypeOf:Rs}=Object,Me=globalThis,Uo=Me.trustedTypes,Bs=Uo?Uo.emptyScript:"",
|
|
13
|
+
*/const{is:Ts,defineProperty:Os,getOwnPropertyDescriptor:Ps,getOwnPropertyNames:Ls,getOwnPropertySymbols:Ds,getPrototypeOf:Rs}=Object,Me=globalThis,Uo=Me.trustedTypes,Bs=Uo?Uo.emptyScript:"",_r=Me.reactiveElementPolyfillSupport,Dt=(o,e)=>o,vi={toAttribute(o,e){switch(e){case Boolean:o=o?Bs: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}},xr=(o,e)=>!Ts(o,e),jo={attribute:!0,type:String,converter:vi,reflect:!1,useDefault:!1,hasChanged:xr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Me.litPropertyMetadata??(Me.litPropertyMetadata=new WeakMap);let mt=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=jo){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&&Os(this.prototype,e,r)}}static getPropertyDescriptor(e,t,i){const{get:r,set:s}=Ps(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)??jo}static _$Ei(){if(this.hasOwnProperty(Dt("elementProperties")))return;const e=Rs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dt("properties"))){const t=this.properties,i=[...Ls(t),...Ds(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(Vo(r))}else e!==void 0&&t.push(Vo(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 zs(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:vi).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:vi;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??xr)(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){}};mt.elementStyles=[],mt.shadowRootOptions={mode:"open"},mt[Dt("elementProperties")]=new Map,mt[Dt("finalized")]=new Map,_r==null||_r({ReactiveElement:mt}),(Me.reactiveElementVersions??(Me.reactiveElementVersions=[])).push("2.1.1");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/const Ms={attribute:!0,type:String,converter:
|
|
17
|
+
*/const Ms={attribute:!0,type:String,converter:vi,reflect:!1,hasChanged:xr},Fs=(o=Ms,e,t)=>{const{kind:i,metadata:r}=t;let s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),i==="setter"&&((o=Object.create(o)).wrapped=!0),s.set(t.name,o),i==="accessor"){const{name:n}=t;return{set(h){const p=e.get.call(this);e.set.call(this,h),this.requestUpdate(n,p,o)},init(h){return h!==void 0&&this.C(n,void 0,o,h),h}}}if(i==="setter"){const{name:n}=t;return function(h){const p=this[n];e.call(this,h),this.requestUpdate(n,p,o)}}throw Error("Unsupported decorator location: "+i)};function l(o){return(e,t)=>typeof t=="object"?Fs(o,e,t):((i,r,s)=>{const n=r.hasOwnProperty(s);return r.constructor.createProperty(s,i),n?Object.getOwnPropertyDescriptor(r,s):void 0})(o,e,t)}/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -26,7 +26,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/function k(o,e){return(t,r
|
|
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 Rt(t,i,{get(){return s(this)}})}}/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -34,25 +34,25 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/function Wo(o){return(e,t)=>Rt(e,t,{async get(){var
|
|
37
|
+
*/function Wo(o){return(e,t)=>Rt(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 G(o){return(e,t)=>{const{slot:
|
|
41
|
+
*/function G(o){return(e,t)=>{const{slot:i,selector:r}=o??{},s="slot"+(i?`[name=${i}]`:":not([name])");return Rt(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
|
|
45
|
+
*/function wr(o){return(e,t)=>{const{slot:i}=o??{},r="slot"+(i?`[name=${i}]`:":not([name])");return Rt(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 Bt=globalThis,
|
|
50
|
-
\f\r]`,Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xo=/-->/g,Zo=/>/g,et=RegExp(`>|${
|
|
51
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jo=/'/g,Qo=/"/g,ea=/^(?:script|style|textarea|title)$/i,Us=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Us(1),ne=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ta=new WeakMap,tt=Qe.createTreeWalker(Qe,129);function
|
|
49
|
+
*/const Bt=globalThis,mi=Bt.trustedTypes,Go=mi?mi.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ko="$lit$",Fe=`lit$${Math.random().toFixed(9).slice(2)}$`,Yo="?"+Fe,qs=`<${Yo}>`,Qe=document,Mt=()=>Qe.createComment(""),Ft=o=>o===null||typeof o!="object"&&typeof o!="function",Sr=Array.isArray,Vs=o=>Sr(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",kr=`[
|
|
50
|
+
\f\r]`,Ht=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xo=/-->/g,Zo=/>/g,et=RegExp(`>|${kr}(?:([^\\s"'>=/]+)(${kr}*=${kr}*(?:[^
|
|
51
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jo=/'/g,Qo=/"/g,ea=/^(?:script|style|textarea|title)$/i,Us=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Us(1),ne=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ta=new WeakMap,tt=Qe.createTreeWalker(Qe,129);function ia(o,e){if(!Sr(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Go!==void 0?Go.createHTML(e):e}const js=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",n=Ht;for(let h=0;h<t;h++){const p=o[h];let v,g,m=-1,_=0;for(;_<p.length&&(n.lastIndex=_,g=n.exec(p),g!==null);)_=n.lastIndex,n===Ht?g[1]==="!--"?n=Xo:g[1]!==void 0?n=Zo:g[2]!==void 0?(ea.test(g[2])&&(r=RegExp("</"+g[2],"g")),n=et):g[3]!==void 0&&(n=et):n===et?g[0]===">"?(n=r??Ht,m=-1):g[1]===void 0?m=-2:(m=n.lastIndex-g[2].length,v=g[1],n=g[3]===void 0?et:g[3]==='"'?Qo:Jo):n===Qo||n===Jo?n=et:n===Xo||n===Zo?n=Ht:(n=et,r=void 0);const x=n===et&&o[h+1].startsWith("/>")?" ":"";s+=n===Ht?p+qs:m>=0?(i.push(v),p.slice(0,m)+Ko+p.slice(m)+Fe+x):p+Fe+(m===-2?h:x)}return[ia(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Nt{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,n=0;const h=e.length-1,p=this.parts,[v,g]=js(e,t);if(this.el=Nt.createElement(v,i),tt.currentNode=this.el.content,t===2||t===3){const m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(r=tt.nextNode())!==null&&p.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const m of r.getAttributeNames())if(m.endsWith(Ko)){const _=g[n++],x=r.getAttribute(m).split(Fe),S=/([.?@])?(.*)/.exec(_);p.push({type:1,index:s,name:S[2],strings:x,ctor:S[1]==="."?Gs:S[1]==="?"?Ks:S[1]==="@"?Ys:bi}),r.removeAttribute(m)}else m.startsWith(Fe)&&(p.push({type:6,index:s}),r.removeAttribute(m));if(ea.test(r.tagName)){const m=r.textContent.split(Fe),_=m.length-1;if(_>0){r.textContent=mi?mi.emptyScript:"";for(let x=0;x<_;x++)r.append(m[x],Mt()),tt.nextNode(),p.push({type:2,index:++s});r.append(m[_],Mt())}}}else if(r.nodeType===8)if(r.data===Yo)p.push({type:2,index:s});else{let m=-1;for(;(m=r.data.indexOf(Fe,m+1))!==-1;)p.push({type:7,index:s}),m+=Fe.length-1}s++}}static createElement(e,t){const i=Qe.createElement("template");return i.innerHTML=e,i}}function bt(o,e,t=o,i){var n,h;if(e===ne)return e;let r=i!==void 0?(n=t._$Co)==null?void 0:n[i]:t._$Cl;const s=Ft(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=bt(o,r._$AS(o,e.values),r,i)),e}class Ws{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)??Qe).importNode(t,!0);tt.currentNode=r;let s=tt.nextNode(),n=0,h=0,p=i[0];for(;p!==void 0;){if(n===p.index){let v;p.type===2?v=new qt(s,s.nextSibling,this,e):p.type===1?v=new p.ctor(s,p.name,p.strings,this,e):p.type===6&&(v=new Xs(s,this,e)),this._$AV.push(v),p=i[++h]}n!==(p==null?void 0:p.index)&&(s=tt.nextNode(),n++)}return tt.currentNode=Qe,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 qt{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=bt(this,e,t),Ft(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==ne&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Vs(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&&Ft(this._$AH)?this._$AA.nextSibling.data=e:this.T(Qe.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=Nt.createElement(ia(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 Ws(r,this),h=n.u(this.options);n.p(t),this.T(h),this._$AH=n}}_$AC(e){let t=ta.get(e.strings);return t===void 0&&ta.set(e.strings,t=new Nt(e)),t}k(e){Sr(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 qt(this.O(Mt()),this.O(Mt()),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 bi{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=bt(this,e,t,0),n=!Ft(e)||e!==this._$AH&&e!==ne,n&&(this._$AH=e);else{const h=e;let p,v;for(e=s[0],p=0;p<s.length-1;p++)v=bt(this,h[i+p],t,p),v===ne&&(v=this._$AH[p]),n||(n=!Ft(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 Gs extends bi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class Ks extends bi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class Ys extends bi{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=bt(this,e,t,0)??u)===ne)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 Xs{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){bt(this,e)}}const $r=Bt.litHtmlPolyfillSupport;$r==null||$r(Nt,qt),(Bt.litHtmlVersions??(Bt.litHtmlVersions=[])).push("3.3.1");const Cr=(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 qt(e.insertBefore(Mt(),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 it=globalThis;let y=class extends mt{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=Cr(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 ne}};y._$litElement$=!0,y.finalized=!0,(Es=it.litElementHydrateSupport)==null||Es.call(it,{LitElement:y});const Er=it.litElementPolyfillSupport;Er==null||Er({LitElement:y}),(it.litElementVersions??(it.litElementVersions=[])).push("4.2.1");/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2022 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -65,15 +65,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2022 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: Apache-2.0
|
|
68
|
-
*/let
|
|
68
|
+
*/let Ar=class extends Zs{};Ar.styles=[Js],Ar=d([f("md-elevation")],Ar);/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2023 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: Apache-2.0
|
|
72
|
-
*/const
|
|
72
|
+
*/const ra=Symbol("attachableController");let fi;fi=new MutationObserver(o=>{var e;for(const t of o)(e=t.target[ra])==null||e.hostConnected()});class oa{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(e){e===null?this.host.removeAttribute("for"):this.host.setAttribute("for",e)}get control(){return this.host.hasAttribute("for")?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(e){e?this.attach(e):this.detach()}constructor(e,t){this.host=e,this.onControlChange=t,this.currentControl=null,e.addController(this),e[ra]=this,fi==null||fi.observe(e,{attributeFilter:["for"]})}attach(e){e!==this.currentControl&&(this.setCurrentControl(e),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(e){this.onControlChange(this.currentControl,e),this.currentControl=e}}/**
|
|
73
73
|
* @license
|
|
74
74
|
* Copyright 2021 Google LLC
|
|
75
75
|
* SPDX-License-Identifier: Apache-2.0
|
|
76
|
-
*/const Qs=["focusin","focusout","pointerdown"];class
|
|
76
|
+
*/const Qs=["focusin","focusout","pointerdown"];class Ir extends y{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new oa(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")}handleEvent(e){var t;if(!e[aa]){switch(e.type){default:return;case"focusin":this.visible=((t=this.control)==null?void 0:t.matches(":focus-visible"))??!1;break;case"focusout":case"pointerdown":this.visible=!1;break}e[aa]=!0}}onControlChange(e,t){for(const i of Qs)e==null||e.removeEventListener(i,this),t==null||t.addEventListener(i,this)}update(e){e.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(e)}}d([l({type:Boolean,reflect:!0})],Ir.prototype,"visible",void 0),d([l({type:Boolean,reflect:!0})],Ir.prototype,"inward",void 0);const aa=Symbol("handledByFocusRing");/**
|
|
77
77
|
* @license
|
|
78
78
|
* Copyright 2024 Google LLC
|
|
79
79
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -82,15 +82,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2021 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: Apache-2.0
|
|
85
|
-
*/let
|
|
85
|
+
*/let gi=class extends Ir{};gi.styles=[en],gi=d([f("md-focus-ring")],gi);const tn=Object.freeze(Object.defineProperty({__proto__:null,get MdFocusRing(){return gi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
86
86
|
* @license
|
|
87
87
|
* Copyright 2017 Google LLC
|
|
88
88
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
89
|
-
*/const He={ATTRIBUTE:1,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},
|
|
89
|
+
*/const He={ATTRIBUTE:1,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},zr=o=>(...e)=>({_$litDirective$:o,values:e});let Tr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
90
90
|
* @license
|
|
91
91
|
* Copyright 2018 Google LLC
|
|
92
92
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
93
|
-
*/const L=
|
|
93
|
+
*/const L=zr(class extends Tr{constructor(o){var e;if(super(o),o.type!==He.ATTRIBUTE||o.name!=="class"||((e=o.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(e=>o[e]).join(" ")+" "}update(o,[e]){var i,r;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in e)e[s]&&!((i=this.nt)!=null&&i.has(s))&&this.st.add(s);return this.render(e)}const t=o.element.classList;for(const s of this.st)s in e||(t.remove(s),this.st.delete(s));for(const s in e){const n=!!e[s];n===this.st.has(s)||(r=this.nt)!=null&&r.has(s)||(n?(t.add(s),this.st.add(s)):(t.remove(s),this.st.delete(s)))}return ne}});/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2021 Google LLC
|
|
96
96
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -98,7 +98,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
98
98
|
* @license
|
|
99
99
|
* Copyright 2022 Google LLC
|
|
100
100
|
* SPDX-License-Identifier: Apache-2.0
|
|
101
|
-
*/const on=450,sa=225,an=.2,sn=10,nn=75,ln=.35,cn="::after",dn="forwards";var K;(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"})(K||(K={}));const hn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],pn=150,
|
|
101
|
+
*/const on=450,sa=225,an=.2,sn=10,nn=75,ln=.35,cn="::after",dn="forwards";var K;(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"})(K||(K={}));const hn=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],pn=150,Or=window.matchMedia("(forced-colors: active)");class Vt extends y{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=K.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new oa(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 ${L(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!==K.INACTIVE&&this.endPressAnimation())}handlePointerup(e){if(this.shouldReactToEvent(e)){if(this.state===K.HOLDING){this.state=K.WAITING_FOR_CLICK;return}if(this.state===K.TOUCH_DELAY){this.state=K.WAITING_FOR_CLICK,this.startPressAnimation(this.rippleStartEvent);return}}}async handlePointerdown(e){if(this.shouldReactToEvent(e)){if(this.rippleStartEvent=e,!this.isTouch(e)){this.state=K.WAITING_FOR_CLICK,this.startPressAnimation(e);return}this.checkBoundsAfterContextMenu&&!this.inBounds(e)||(this.checkBoundsAfterContextMenu=!1,this.state=K.TOUCH_DELAY,await new Promise(t=>{setTimeout(t,pn)}),this.state===K.TOUCH_DELAY&&(this.state=K.HOLDING,this.startPressAnimation(e)))}}handleClick(){if(!this.disabled){if(this.state===K.WAITING_FOR_CLICK){this.endPressAnimation();return}this.state===K.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(ln*i,nn),s=Math.floor(i*an),h=Math.sqrt(t**2+e**2)+sn;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:cn,duration:on,easing:pe.STANDARD,fill:dn})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=K.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>=sa){this.pressed=!1;return}await new Promise(i=>{setTimeout(i,sa-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(!(Or!=null&&Or.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 hn)e==null||e.removeEventListener(i,this),t==null||t.addEventListener(i,this)}}d([l({type:Boolean,reflect:!0})],Vt.prototype,"disabled",void 0),d([w()],Vt.prototype,"hovered",void 0),d([w()],Vt.prototype,"pressed",void 0),d([k(".surface")],Vt.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 Es;function d(o,e,t,r){var i=argument
|
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2022 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: Apache-2.0
|
|
110
|
-
*/let
|
|
110
|
+
*/let yi=class extends Vt{};yi.styles=[un],yi=d([f("md-ripple")],yi);const _i=Object.freeze(Object.defineProperty({__proto__:null,get MdRipple(){return yi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2023 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -119,41 +119,41 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
119
119
|
* @license
|
|
120
120
|
* Copyright 2023 Google LLC
|
|
121
121
|
* SPDX-License-Identifier: Apache-2.0
|
|
122
|
-
*/const U=Symbol("internals"),
|
|
122
|
+
*/const U=Symbol("internals"),Pr=Symbol("privateInternals");function Ne(o){class e extends o{get[U](){return this[Pr]||(this[Pr]=this.attachInternals()),this[Pr]}}return e}/**
|
|
123
123
|
* @license
|
|
124
124
|
* Copyright 2023 Google LLC
|
|
125
125
|
* SPDX-License-Identifier: Apache-2.0
|
|
126
|
-
*/function ca(o){o.addInitializer(e=>{const t=e;t.addEventListener("click",async
|
|
126
|
+
*/function ca(o){o.addInitializer(e=>{const t=e;t.addEventListener("click",async i=>{const{type:r,[U]:s}=t,{form:n}=s;if(!(!n||r==="button")&&(await new Promise(h=>{setTimeout(h)}),!i.defaultPrevented)){if(r==="reset"){n.reset();return}n.addEventListener("submit",h=>{Object.defineProperty(h,"submitter",{configurable:!0,enumerable:!0,get:()=>t})},{capture:!0,once:!0}),s.setFormValue(t.value),n.requestSubmit()}})})}/**
|
|
127
127
|
* @license
|
|
128
128
|
* Copyright 2021 Google LLC
|
|
129
129
|
* SPDX-License-Identifier: Apache-2.0
|
|
130
|
-
*/function
|
|
130
|
+
*/function xi(o){const e=new MouseEvent("click",{bubbles:!0});return o.dispatchEvent(e),e}function Ut(o){return o.currentTarget!==o.target||o.composedPath()[0]!==o.target||o.target.disabled?!1:!vn(o)}function vn(o){const e=Lr;return e&&(o.preventDefault(),o.stopImmediatePropagation()),mn(),e}let Lr=!1;async function mn(){Lr=!0,await null,Lr=!1}/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright 2019 Google LLC
|
|
133
133
|
* SPDX-License-Identifier: Apache-2.0
|
|
134
|
-
*/const bn=Ne(y);class N extends bn{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[U].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{!Ut(e)||!this.buttonElement||(this.focus(),
|
|
135
|
-
${(
|
|
134
|
+
*/const bn=Ne(y);class N extends bn{get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[U].form}constructor(){super(),this.disabled=!1,this.href="",this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.type="submit",this.value="",this.handleActivationClick=e=>{!Ut(e)||!this.buttonElement||(this.focus(),xi(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
|
+
${(r=this.renderElevationOrOutline)==null?void 0:r.call(this)}
|
|
136
136
|
<div class="background"></div>
|
|
137
|
-
<md-focus-ring part="focus-ring" for=${
|
|
137
|
+
<md-focus-ring part="focus-ring" for=${i}></md-focus-ring>
|
|
138
138
|
<md-ripple
|
|
139
139
|
part="ripple"
|
|
140
|
-
for=${
|
|
140
|
+
for=${i}
|
|
141
141
|
?disabled="${e}"></md-ripple>
|
|
142
142
|
${t}
|
|
143
|
-
`}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:
|
|
143
|
+
`}renderButton(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:i}=this;return c`<button
|
|
144
144
|
id="button"
|
|
145
145
|
class="button"
|
|
146
146
|
?disabled=${this.disabled}
|
|
147
147
|
aria-label="${e||u}"
|
|
148
148
|
aria-haspopup="${t||u}"
|
|
149
|
-
aria-expanded="${
|
|
149
|
+
aria-expanded="${i||u}">
|
|
150
150
|
${this.renderContent()}
|
|
151
|
-
</button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:
|
|
151
|
+
</button>`}renderLink(){const{ariaLabel:e,ariaHasPopup:t,ariaExpanded:i}=this;return c`<a
|
|
152
152
|
id="link"
|
|
153
153
|
class="button"
|
|
154
154
|
aria-label="${e||u}"
|
|
155
155
|
aria-haspopup="${t||u}"
|
|
156
|
-
aria-expanded="${
|
|
156
|
+
aria-expanded="${i||u}"
|
|
157
157
|
href=${this.href}
|
|
158
158
|
target=${this.target||u}
|
|
159
159
|
>${this.renderContent()}
|
|
@@ -177,7 +177,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
177
177
|
* @license
|
|
178
178
|
* Copyright 2024 Google LLC
|
|
179
179
|
* SPDX-License-Identifier: Apache-2.0
|
|
180
|
-
*/const
|
|
180
|
+
*/const Dr=b`md-elevation{transition-duration:280ms}:host([disabled]) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host([disabled]) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
|
|
181
181
|
`;/**
|
|
182
182
|
* @license
|
|
183
183
|
* Copyright 2024 Google LLC
|
|
@@ -187,7 +187,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
187
187
|
* @license
|
|
188
188
|
* Copyright 2021 Google LLC
|
|
189
189
|
* SPDX-License-Identifier: Apache-2.0
|
|
190
|
-
*/let
|
|
190
|
+
*/let Rr=class extends fn{};Rr.styles=[jt,Dr,gn],Rr=d([f("md-elevated-button")],Rr);/**
|
|
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 Es;function d(o,e,t,r){var i=argument
|
|
|
200
200
|
* @license
|
|
201
201
|
* Copyright 2021 Google LLC
|
|
202
202
|
* SPDX-License-Identifier: Apache-2.0
|
|
203
|
-
*/let
|
|
203
|
+
*/let wi=class extends yn{};wi.styles=[jt,Dr,_n],wi=d([f("md-filled-button")],wi);const xn=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledButton(){return wi}},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 Es;function d(o,e,t,r){var i=argument
|
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright 2021 Google LLC
|
|
215
215
|
* SPDX-License-Identifier: Apache-2.0
|
|
216
|
-
*/let
|
|
216
|
+
*/let Si=class extends wn{};Si.styles=[jt,Dr,Sn],Si=d([f("md-filled-tonal-button")],Si);const kn=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledTonalButton(){return Si}},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 Es;function d(o,e,t,r){var i=argument
|
|
|
226
226
|
* @license
|
|
227
227
|
* Copyright 2021 Google LLC
|
|
228
228
|
* SPDX-License-Identifier: Apache-2.0
|
|
229
|
-
*/let
|
|
229
|
+
*/let ki=class extends $n{};ki.styles=[jt,Cn],ki=d([f("md-outlined-button")],ki);const En=Object.freeze(Object.defineProperty({__proto__:null,get MdOutlinedButton(){return ki}},Symbol.toStringTag,{value:"Module"}));/**
|
|
230
230
|
* @license
|
|
231
231
|
* Copyright 2021 Google LLC
|
|
232
232
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -239,31 +239,31 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
239
239
|
* @license
|
|
240
240
|
* Copyright 2021 Google LLC
|
|
241
241
|
* SPDX-License-Identifier: Apache-2.0
|
|
242
|
-
*/let $
|
|
242
|
+
*/let $i=class extends An{};$i.styles=[jt,In],$i=d([f("md-text-button")],$i);const zn=Object.freeze(Object.defineProperty({__proto__:null,get MdTextButton(){return $i}},Symbol.toStringTag,{value:"Module"}));/**
|
|
243
243
|
* @license
|
|
244
244
|
* Copyright 2021 Google LLC
|
|
245
245
|
* SPDX-License-Identifier: Apache-2.0
|
|
246
|
-
*/function qe(o,e){e.bubbles&&(!o.shadowRoot||e.composed)&&e.stopPropagation();const t=Reflect.construct(e.constructor,[e.type,e]),
|
|
246
|
+
*/function qe(o,e){e.bubbles&&(!o.shadowRoot||e.composed)&&e.stopPropagation();const t=Reflect.construct(e.constructor,[e.type,e]),i=o.dispatchEvent(t);return i||e.preventDefault(),i}/**
|
|
247
247
|
* @license
|
|
248
248
|
* Copyright 2023 Google LLC
|
|
249
249
|
* SPDX-License-Identifier: Apache-2.0
|
|
250
|
-
*/const
|
|
250
|
+
*/const rt=Symbol("createValidator"),ot=Symbol("getValidityAnchor"),Br=Symbol("privateValidator"),$e=Symbol("privateSyncValidity"),Ci=Symbol("privateCustomValidationMessage");function Wt(o){var e;class t extends o{constructor(){super(...arguments),this[e]=""}get validity(){return this[$e](),this[U].validity}get validationMessage(){return this[$e](),this[U].validationMessage}get willValidate(){return this[$e](),this[U].willValidate}checkValidity(){return this[$e](),this[U].checkValidity()}reportValidity(){return this[$e](),this[U].reportValidity()}setCustomValidity(r){this[Ci]=r,this[$e]()}requestUpdate(r,s,n){super.requestUpdate(r,s,n),this[$e]()}firstUpdated(r){super.firstUpdated(r),this[$e]()}[(e=Ci,$e)](){this[Br]||(this[Br]=this[rt]());const{validity:r,validationMessage:s}=this[Br].getValidity(),n=!!this[Ci],h=this[Ci]||s;this[U].setValidity({...r,customError:n},h,this[ot]()??void 0)}[rt](){throw new Error("Implement [createValidator]")}[ot](){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 Ce=Symbol("getFormValue"),Gt=Symbol("getFormState");function ft(o){class e extends o{get form(){return this[U].form}get labels(){return this[U].labels}get name(){return this.getAttribute("name")??""}set name(
|
|
254
|
+
*/const Ce=Symbol("getFormValue"),Gt=Symbol("getFormState");function ft(o){class e extends o{get form(){return this[U].form}get labels(){return this[U].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[U].setFormValue(this[Ce](),this[Gt]())}[Ce](){throw new Error("Implement [getFormValue]")}[Gt](){return this[Ce]()}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
|
|
258
|
-
*/class
|
|
258
|
+
*/class Ei{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:i,validationMessage:r}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:r,validity:{badInput:i.badInput,customError:i.customError,patternMismatch:i.patternMismatch,rangeOverflow:i.rangeOverflow,rangeUnderflow:i.rangeUnderflow,stepMismatch:i.stepMismatch,tooLong:i.tooLong,tooShort:i.tooShort,typeMismatch:i.typeMismatch,valueMissing:i.valueMissing}},this.currentValidity}}/**
|
|
259
259
|
* @license
|
|
260
260
|
* Copyright 2023 Google LLC
|
|
261
261
|
* SPDX-License-Identifier: Apache-2.0
|
|
262
|
-
*/class da extends
|
|
262
|
+
*/class da extends Ei{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}/**
|
|
263
263
|
* @license
|
|
264
264
|
* Copyright 2019 Google LLC
|
|
265
265
|
* SPDX-License-Identifier: Apache-2.0
|
|
266
|
-
*/const Tn=Wt(ft(Ne(y)));class ue extends Tn{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=>{!Ut(e)||!this.input||(this.focus(),
|
|
266
|
+
*/const Tn=Wt(ft(Ne(y)));class ue extends Tn{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=>{!Ut(e)||!this.input||(this.focus(),xi(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=L({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 Es;function d(o,e,t,r){var i=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){qe(this,e)}[Ce](){return!this.checked||this.indeterminate?null:this.value}[Gt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[
|
|
290
|
+
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){qe(this,e)}[Ce](){return!this.checked||this.indeterminate?null:this.value}[Gt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new da(()=>this)}[ot](){return this.input}}Z(ue),ue.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean})],ue.prototype,"checked",void 0),d([l({type:Boolean})],ue.prototype,"indeterminate",void 0),d([l({type:Boolean})],ue.prototype,"required",void 0),d([l()],ue.prototype,"value",void 0),d([w()],ue.prototype,"prevChecked",void 0),d([w()],ue.prototype,"prevDisabled",void 0),d([w()],ue.prototype,"prevIndeterminate",void 0),d([k("input")],ue.prototype,"input",void 0);/**
|
|
291
291
|
* @license
|
|
292
292
|
* Copyright 2024 Google LLC
|
|
293
293
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -296,7 +296,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
296
296
|
* @license
|
|
297
297
|
* Copyright 2018 Google LLC
|
|
298
298
|
* SPDX-License-Identifier: Apache-2.0
|
|
299
|
-
*/let
|
|
299
|
+
*/let Mr=class extends ue{};Mr.styles=[On],Mr=d([f("md-checkbox")],Mr);/**
|
|
300
300
|
* @license
|
|
301
301
|
* Copyright 2023 Google LLC
|
|
302
302
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -348,21 +348,21 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
348
348
|
* @license
|
|
349
349
|
* Copyright 2024 Google LLC
|
|
350
350
|
* SPDX-License-Identifier: Apache-2.0
|
|
351
|
-
*/const
|
|
351
|
+
*/const Fr=b`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}}
|
|
352
352
|
`;/**
|
|
353
353
|
* @license
|
|
354
354
|
* Copyright 2024 Google LLC
|
|
355
355
|
* SPDX-License-Identifier: Apache-2.0
|
|
356
|
-
*/const
|
|
356
|
+
*/const Ai=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);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host([disabled]){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}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)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;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);height:100%;text-overflow:ellipsis;user-select:none;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled){cursor:inherit}
|
|
357
357
|
`;/**
|
|
358
358
|
* @license
|
|
359
359
|
* Copyright 2023 Google LLC
|
|
360
360
|
* SPDX-License-Identifier: Apache-2.0
|
|
361
|
-
*/let
|
|
361
|
+
*/let Ii=class extends Kt{};Ii.styles=[Ai,Fr,Pn],Ii=d([f("md-assist-chip")],Ii);const Ln=Object.freeze(Object.defineProperty({__proto__:null,get MdAssistChip(){return Ii}},Symbol.toStringTag,{value:"Module"}));/**
|
|
362
362
|
* @license
|
|
363
363
|
* Copyright 2023 Google LLC
|
|
364
364
|
* SPDX-License-Identifier: Apache-2.0
|
|
365
|
-
*/class ha extends y{get chips(){return this.childElements.filter(e=>e instanceof Ee)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar"}render(){return c`<slot @slotchange=${this.updateTabIndices}></slot>`}handleKeyDown(e){const t=e.key==="ArrowLeft",
|
|
365
|
+
*/class ha extends y{get chips(){return this.childElements.filter(e=>e instanceof Ee)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar"}render(){return c`<slot @slotchange=${this.updateTabIndices}></slot>`}handleKeyDown(e){const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(!t&&!i&&!r&&!s)return;const{chips:n}=this;if(n.length<2)return;if(e.preventDefault(),r||s){const _=r?0:n.length-1;n[_].focus({trailing:s}),this.updateTabIndices();return}const p=getComputedStyle(this).direction==="rtl"?t:i,v=n.find(_=>_.matches(":focus-within"));if(!v){(p?n[0]:n[n.length-1]).focus({trailing:!p}),this.updateTabIndices();return}const g=n.indexOf(v);let m=p?g+1:g-1;for(;m!==g;){m>=n.length?m=0:m<0&&(m=n.length-1);const _=n[m];if(_.disabled&&!_.alwaysFocusable){p?m++:m--;continue}_.focus({trailing:!p}),this.updateTabIndices();break}}updateTabIndices(){const{chips:e}=this;let t;for(const i of e){const r=i.alwaysFocusable||!i.disabled;if(i.matches(":focus-within")&&r){t=i;continue}r&&!t&&(t=i),i.tabIndex=-1}t&&(t.tabIndex=0)}}d([G()],ha.prototype,"childElements",void 0);/**
|
|
366
366
|
* @license
|
|
367
367
|
* Copyright 2024 Google LLC
|
|
368
368
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -371,22 +371,22 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
371
371
|
* @license
|
|
372
372
|
* Copyright 2023 Google LLC
|
|
373
373
|
* SPDX-License-Identifier: Apache-2.0
|
|
374
|
-
*/let
|
|
374
|
+
*/let zi=class extends ha{};zi.styles=[Dn],zi=d([f("md-chip-set")],zi);const Rn=Object.freeze(Object.defineProperty({__proto__:null,get MdChipSet(){return zi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
375
375
|
* @license
|
|
376
376
|
* Copyright 2023 Google LLC
|
|
377
377
|
* SPDX-License-Identifier: Apache-2.0
|
|
378
|
-
*/const
|
|
378
|
+
*/const Ti="aria-label-remove";class pa extends Ee{get ariaLabelRemove(){if(this.hasAttribute(Ti))return this.getAttribute(Ti);const{ariaLabel:e}=this;return`Remove ${e||this.label}`}set ariaLabelRemove(e){const t=this.ariaLabelRemove;e!==t&&(e===null?this.removeAttribute(Ti):this.setAttribute(Ti,e),this.requestUpdate())}constructor(){super(),this.handleTrailingActionFocus=this.handleTrailingActionFocus.bind(this),this.addEventListener("keydown",this.handleKeyDown.bind(this))}focus(e){if((this.alwaysFocusable||!this.disabled)&&(e!=null&&e.trailing)&&this.trailingAction){this.trailingAction.focus(e);return}super.focus(e)}renderContainerContent(){return c`
|
|
379
379
|
${super.renderContainerContent()}
|
|
380
380
|
${this.renderTrailingAction(this.handleTrailingActionFocus)}
|
|
381
|
-
`}handleKeyDown(e){var v,g;const t=e.key==="ArrowLeft",
|
|
381
|
+
`}handleKeyDown(e){var v,g;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight";if(!t&&!i||!this.primaryAction||!this.trailingAction)return;const s=getComputedStyle(this).direction==="rtl"?t:i,n=(v=this.primaryAction)==null?void 0:v.matches(":focus-within"),h=(g=this.trailingAction)==null?void 0:g.matches(":focus-within");if(s&&h||!s&&n)return;e.preventDefault(),e.stopPropagation(),(s?this.trailingAction:this.primaryAction).focus()}handleTrailingActionFocus(){const{primaryAction:e,trailingAction:t}=this;!e||!t||(e.tabIndex=-1,t.addEventListener("focusout",()=>{e.tabIndex=0},{once:!0}))}}/**
|
|
382
382
|
* @license
|
|
383
383
|
* Copyright 2023 Google LLC
|
|
384
384
|
* SPDX-License-Identifier: Apache-2.0
|
|
385
|
-
*/function ua({ariaLabel:o,disabled:e,focusListener:t,tabbable:
|
|
385
|
+
*/function ua({ariaLabel:o,disabled:e,focusListener:t,tabbable:i=!1}){return c`
|
|
386
386
|
<button
|
|
387
387
|
class="trailing action"
|
|
388
388
|
aria-label=${o}
|
|
389
|
-
tabindex=${
|
|
389
|
+
tabindex=${i?u:-1}
|
|
390
390
|
@click=${Bn}
|
|
391
391
|
@focus=${t}>
|
|
392
392
|
<md-focus-ring part="trailing-focus-ring"></md-focus-ring>
|
|
@@ -441,7 +441,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
441
441
|
* @license
|
|
442
442
|
* Copyright 2023 Google LLC
|
|
443
443
|
* SPDX-License-Identifier: Apache-2.0
|
|
444
|
-
*/let
|
|
444
|
+
*/let Oi=class extends at{};Oi.styles=[Ai,Fr,ma,va,Mn],Oi=d([f("md-filter-chip")],Oi);const Fn=Object.freeze(Object.defineProperty({__proto__:null,get MdFilterChip(){return Oi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
445
445
|
* @license
|
|
446
446
|
* Copyright 2023 Google LLC
|
|
447
447
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -476,7 +476,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
476
476
|
* @license
|
|
477
477
|
* Copyright 2023 Google LLC
|
|
478
478
|
* SPDX-License-Identifier: Apache-2.0
|
|
479
|
-
*/let
|
|
479
|
+
*/let Hr=class extends st{};Hr.styles=[Ai,ma,va,Hn],Hr=d([f("md-input-chip")],Hr);/**
|
|
480
480
|
* @license
|
|
481
481
|
* Copyright 2023 Google LLC
|
|
482
482
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -489,11 +489,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
489
489
|
* @license
|
|
490
490
|
* Copyright 2023 Google LLC
|
|
491
491
|
* SPDX-License-Identifier: Apache-2.0
|
|
492
|
-
*/let
|
|
492
|
+
*/let Nr=class extends Nn{};Nr.styles=[Ai,Fr,qn],Nr=d([f("md-suggestion-chip")],Nr);/**
|
|
493
493
|
* @license
|
|
494
494
|
* Copyright 2023 Google LLC
|
|
495
495
|
* SPDX-License-Identifier: Apache-2.0
|
|
496
|
-
*/class
|
|
496
|
+
*/class Pi extends y{constructor(){super(...arguments),this.inset=!1,this.insetStart=!1,this.insetEnd=!1}}d([l({type:Boolean,reflect:!0})],Pi.prototype,"inset",void 0),d([l({type:Boolean,reflect:!0,attribute:"inset-start"})],Pi.prototype,"insetStart",void 0),d([l({type:Boolean,reflect:!0,attribute:"inset-end"})],Pi.prototype,"insetEnd",void 0);/**
|
|
497
497
|
* @license
|
|
498
498
|
* Copyright 2024 Google LLC
|
|
499
499
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -502,7 +502,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
502
502
|
* @license
|
|
503
503
|
* Copyright 2023 Google LLC
|
|
504
504
|
* SPDX-License-Identifier: Apache-2.0
|
|
505
|
-
*/let
|
|
505
|
+
*/let qr=class extends Pi{};qr.styles=[Vn],qr=d([f("md-divider")],qr);/**
|
|
506
506
|
* @license
|
|
507
507
|
* Copyright 2023 Google LLC
|
|
508
508
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -510,7 +510,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
510
510
|
* @license
|
|
511
511
|
* Copyright 2023 Google LLC
|
|
512
512
|
* SPDX-License-Identifier: Apache-2.0
|
|
513
|
-
*/class R extends y{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute("open",""),this.show()):(this.removeAttribute("open"),this.close()))}constructor(){super(),this.quick=!1,this.returnValue="",this.noFocusTrap=!1,this.getOpenAnimation=()=>Un,this.getCloseAnimation=()=>jn,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){var
|
|
513
|
+
*/class R extends y{get open(){return this.isOpen}set open(e){e!==this.isOpen&&(this.isOpen=e,e?(this.setAttribute("open",""),this.show()):(this.removeAttribute("open"),this.close()))}constructor(){super(),this.quick=!1,this.returnValue="",this.noFocusTrap=!1,this.getOpenAnimation=()=>Un,this.getCloseAnimation=()=>jn,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.nextClickIsFromContent=!1,this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.escapePressedWithoutCancel=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT),this.addEventListener("submit",this.handleSubmit)}async show(){var i;this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const e=this.dialog;if(e.open||!this.isOpening){this.isOpening=!1;return}if(!this.dispatchEvent(new Event("open",{cancelable:!0}))){this.open=!1,this.isOpening=!1;return}e.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),(i=this.querySelector("[autofocus]"))==null||i.focus(),await this.animateDialog(this.getOpenAnimation()),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(e=this.returnValue){if(this.isOpening=!1,!this.isConnected){this.open=!1;return}await this.updateComplete;const t=this.dialog;if(!t.open||this.isOpening){this.open=!1;return}const i=this.returnValue;if(this.returnValue=e,!this.dispatchEvent(new Event("close",{cancelable:!0}))){this.returnValue=i;return}await this.animateDialog(this.getCloseAnimation()),t.close(e),this.open=!1,this.dispatchEvent(new Event("closed"))}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}render(){const e=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),t={"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:e,"show-top-divider":e&&!this.isAtScrollTop,"show-bottom-divider":e&&!this.isAtScrollBottom},i=this.open&&!this.noFocusTrap,r=c`
|
|
514
514
|
<div
|
|
515
515
|
class="focus-trap"
|
|
516
516
|
tabindex="0"
|
|
@@ -528,7 +528,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
528
528
|
@close=${this.handleClose}
|
|
529
529
|
@keydown=${this.handleKeydown}
|
|
530
530
|
.returnValue=${this.returnValue||u}>
|
|
531
|
-
${r
|
|
531
|
+
${i?r:u}
|
|
532
532
|
<div class="container" @click=${this.handleContentClick}>
|
|
533
533
|
<div class="headline">
|
|
534
534
|
<div class="icon" aria-hidden="true">
|
|
@@ -553,9 +553,9 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
553
553
|
<slot name="actions" @slotchange=${this.handleActionsChange}></slot>
|
|
554
554
|
</div>
|
|
555
555
|
</div>
|
|
556
|
-
${r
|
|
556
|
+
${i?r:u}
|
|
557
557
|
</dialog>
|
|
558
|
-
`}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const t=e.target,{submitter:
|
|
558
|
+
`}firstUpdated(){this.intersectionObserver=new IntersectionObserver(e=>{for(const t of e)this.handleAnchorIntersection(t)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}handleDialogClick(){if(this.nextClickIsFromContent){this.nextClickIsFromContent=!1;return}this.dispatchEvent(new Event("cancel",{cancelable:!0}))&&this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(e){const t=e.target,{submitter:i}=e;t.method!=="dialog"||!i||this.close(i.getAttribute("value")??this.returnValue)}handleCancel(e){if(e.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const t=!qe(this,e);e.preventDefault(),!t&&this.close()}handleClose(){var e;this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,(e=this.dialog)==null||e.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(e){e.key==="Escape"&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}async animateDialog(e){var z;if((z=this.cancelAnimations)==null||z.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:t,scrim:i,container:r,headline:s,content:n,actions:h}=this;if(!t||!i||!r||!s||!n||!h)return;const{container:p,dialog:v,scrim:g,headline:m,content:_,actions:x}=e,S=[[t,v??[]],[i,g??[]],[r,p??[]],[s,m??[]],[n,_??[]],[h,x??[]]],C=[];for(const[T,O]of S)for(const se of O){const W=T.animate(...se);this.cancelAnimations.signal.addEventListener("abort",()=>{W.cancel()}),C.push(W)}await Promise.all(C.map(T=>T.finished.catch(()=>{})))}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}handleAnchorIntersection(e){const{target:t,isIntersecting:i}=e;t===this.topAnchor&&(this.isAtScrollTop=i),t===this.bottomAnchor&&(this.isAtScrollBottom=i)}getIsConnectedPromise(){return new Promise(e=>{this.isConnectedPromiseResolve=e})}handleFocusTrapFocus(e){var m;const[t,i]=this.getFirstAndLastFocusableChildren();if(!t||!i){(m=this.dialog)==null||m.focus();return}const r=e.target===this.firstFocusTrap,s=!r,n=e.relatedTarget===t,h=e.relatedTarget===i,p=!n&&!h;if(s&&h||r&&p){t.focus();return}if(r&&n||s&&p){i.focus();return}}getFirstAndLastFocusableChildren(){let e=null,t=null;for(this.treewalker.currentNode=this.treewalker.root;this.treewalker.nextNode();){const i=this.treewalker.currentNode;Wn(i)&&(e||(e=i),t=i)}return[e,t]}}Z(R),d([l({type:Boolean})],R.prototype,"open",null),d([l({type:Boolean})],R.prototype,"quick",void 0),d([l({attribute:!1})],R.prototype,"returnValue",void 0),d([l()],R.prototype,"type",void 0),d([l({type:Boolean,attribute:"no-focus-trap"})],R.prototype,"noFocusTrap",void 0),d([k("dialog")],R.prototype,"dialog",void 0),d([k(".scrim")],R.prototype,"scrim",void 0),d([k(".container")],R.prototype,"container",void 0),d([k(".headline")],R.prototype,"headline",void 0),d([k(".content")],R.prototype,"content",void 0),d([k(".actions")],R.prototype,"actions",void 0),d([w()],R.prototype,"isAtScrollTop",void 0),d([w()],R.prototype,"isAtScrollBottom",void 0),d([k(".scroller")],R.prototype,"scroller",void 0),d([k(".top.anchor")],R.prototype,"topAnchor",void 0),d([k(".bottom.anchor")],R.prototype,"bottomAnchor",void 0),d([k(".focus-trap")],R.prototype,"firstFocusTrap",void 0),d([w()],R.prototype,"hasHeadline",void 0),d([w()],R.prototype,"hasActions",void 0),d([w()],R.prototype,"hasIcon",void 0);function Wn(o){var s;const e=":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])",t=":not(:disabled,[disabled])";return o.matches(e+t+':not([tabindex^="-"])')?!0:!o.localName.includes("-")||!o.matches(t)?!1:((s=o.shadowRoot)==null?void 0:s.delegatesFocus)??!1}/**
|
|
559
559
|
* @license
|
|
560
560
|
* Copyright 2024 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -564,7 +564,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
564
564
|
* @license
|
|
565
565
|
* Copyright 2023 Google LLC
|
|
566
566
|
* SPDX-License-Identifier: Apache-2.0
|
|
567
|
-
*/let
|
|
567
|
+
*/let Vr=class extends R{};Vr.styles=[Gn],Vr=d([f("md-dialog")],Vr);/**
|
|
568
568
|
* @license
|
|
569
569
|
* Copyright 2023 Google LLC
|
|
570
570
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -587,7 +587,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
587
587
|
* @license
|
|
588
588
|
* Copyright 2023 Google LLC
|
|
589
589
|
* SPDX-License-Identifier: Apache-2.0
|
|
590
|
-
*/class
|
|
590
|
+
*/class Ur extends gt{constructor(){super(...arguments),this.variant="surface"}getRenderClasses(){return{...super.getRenderClasses(),primary:this.variant==="primary",secondary:this.variant==="secondary",tertiary:this.variant==="tertiary"}}}d([l()],Ur.prototype,"variant",void 0);/**
|
|
591
591
|
* @license
|
|
592
592
|
* Copyright 2024 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -606,7 +606,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
606
606
|
* @license
|
|
607
607
|
* Copyright 2023 Google LLC
|
|
608
608
|
* SPDX-License-Identifier: Apache-2.0
|
|
609
|
-
*/let
|
|
609
|
+
*/let jr=class extends Ur{getRenderClasses(){return{...super.getRenderClasses(),primary:!1,secondary:!1,tertiary:!1,small:!1}}};jr.styles=[fa,Kn,ba],jr=d([f("md-branded-fab")],jr);/**
|
|
610
610
|
* @license
|
|
611
611
|
* Copyright 2024 Google LLC
|
|
612
612
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -615,21 +615,21 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
615
615
|
* @license
|
|
616
616
|
* Copyright 2022 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: Apache-2.0
|
|
618
|
-
*/let
|
|
618
|
+
*/let Wr=class extends Ur{};Wr.styles=[fa,Yn,ba],Wr=d([f("md-fab")],Wr);/**
|
|
619
619
|
* @license
|
|
620
620
|
* Copyright 2021 Google LLC
|
|
621
621
|
* SPDX-License-Identifier: Apache-2.0
|
|
622
|
-
*/class D extends y{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){var s,n,h;const e=this.renderLabel(!0),t=this.renderLabel(!1),
|
|
623
|
-
<div class="field ${L(
|
|
622
|
+
*/class D extends y{constructor(){super(...arguments),this.disabled=!1,this.error=!1,this.focused=!1,this.label="",this.noAsterisk=!1,this.populated=!1,this.required=!1,this.resizable=!1,this.supportingText="",this.errorText="",this.count=-1,this.max=-1,this.hasStart=!1,this.hasEnd=!1,this.isAnimating=!1,this.refreshErrorAlert=!1,this.disableTransitions=!1}get counterText(){const e=this.count??-1,t=this.max??-1;return e<0||t<=0?"":`${e} / ${t}`}get supportingOrErrorText(){return this.error&&this.errorText?this.errorText:this.supportingText}reannounceError(){this.refreshErrorAlert=!0}update(e){e.has("disabled")&&e.get("disabled")!==void 0&&(this.disableTransitions=!0),this.disabled&&this.focused&&(e.set("focused",!0),this.focused=!1),this.animateLabelIfNeeded({wasFocused:e.get("focused"),wasPopulated:e.get("populated")}),super.update(e)}render(){var s,n,h;const e=this.renderLabel(!0),t=this.renderLabel(!1),i=(s=this.renderOutline)==null?void 0:s.call(this,e),r={disabled:this.disabled,"disable-transitions":this.disableTransitions,error:this.error&&!this.disabled,focused:this.focused,"with-start":this.hasStart,"with-end":this.hasEnd,populated:this.populated,resizable:this.resizable,required:this.required,"no-label":!this.label};return c`
|
|
623
|
+
<div class="field ${L(r)}">
|
|
624
624
|
<div class="container-overflow">
|
|
625
|
-
${(n=this.renderBackground)==null?void 0:n.call(this)} ${(h=this.renderIndicator)==null?void 0:h.call(this)} ${
|
|
625
|
+
${(n=this.renderBackground)==null?void 0:n.call(this)} ${(h=this.renderIndicator)==null?void 0:h.call(this)} ${i}
|
|
626
626
|
<div class="container">
|
|
627
627
|
<div class="start">
|
|
628
628
|
<slot name="start"></slot>
|
|
629
629
|
</div>
|
|
630
630
|
<div class="middle">
|
|
631
631
|
<div class="label-wrapper">
|
|
632
|
-
${t} ${
|
|
632
|
+
${t} ${i?u:e}
|
|
633
633
|
</div>
|
|
634
634
|
<div class="content">
|
|
635
635
|
<slot></slot>
|
|
@@ -642,16 +642,16 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
642
642
|
</div>
|
|
643
643
|
${this.renderSupportingText()}
|
|
644
644
|
</div>
|
|
645
|
-
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame(()=>{this.refreshErrorAlert=!1}),this.disableTransitions&&requestAnimationFrame(()=>{this.disableTransitions=!1})}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return u;const
|
|
646
|
-
<div class="supporting-text" role=${n}>${
|
|
645
|
+
`}updated(e){(e.has("supportingText")||e.has("errorText")||e.has("count")||e.has("max"))&&this.updateSlottedAriaDescribedBy(),this.refreshErrorAlert&&requestAnimationFrame(()=>{this.refreshErrorAlert=!1}),this.disableTransitions&&requestAnimationFrame(()=>{this.disableTransitions=!1})}renderSupportingText(){const{supportingOrErrorText:e,counterText:t}=this;if(!e&&!t)return u;const i=c`<span>${e}</span>`,r=t?c`<span class="counter">${t}</span>`:u,n=this.error&&this.errorText&&!this.refreshErrorAlert?"alert":u;return c`
|
|
646
|
+
<div class="supporting-text" role=${n}>${i}${r}</div>
|
|
647
647
|
<slot
|
|
648
648
|
name="aria-describedby"
|
|
649
649
|
@slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
650
|
-
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)
|
|
651
|
-
<span class="label ${L(
|
|
652
|
-
>${
|
|
650
|
+
`}updateSlottedAriaDescribedBy(){for(const e of this.slottedAriaDescribedBy)Cr(c`${this.supportingOrErrorText} ${this.counterText}`,e),e.setAttribute("hidden","")}renderLabel(e){if(!this.label)return u;let t;e?t=this.focused||this.populated||this.isAnimating:t=!this.focused&&!this.populated&&!this.isAnimating;const i={hidden:!t,floating:e,resting:!e},r=`${this.label}${this.required&&!this.noAsterisk?"*":""}`;return c`
|
|
651
|
+
<span class="label ${L(i)}" aria-hidden=${!t}
|
|
652
|
+
>${r}</span
|
|
653
653
|
>
|
|
654
|
-
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){var s,n,h;if(!this.label)return;e??(e=this.focused),t??(t=this.populated);const
|
|
654
|
+
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){var s,n,h;if(!this.label)return;e??(e=this.focused),t??(t=this.populated);const i=e||t,r=this.focused||this.populated;i!==r&&(this.isAnimating=!0,(s=this.labelAnimation)==null||s.cancel(),this.labelAnimation=(n=this.floatingLabelEl)==null?void 0:n.animate(this.getLabelKeyframes(),{duration:150,easing:pe.STANDARD}),(h=this.labelAnimation)==null||h.addEventListener("finish",()=>{this.isAnimating=!1}))}getLabelKeyframes(){const{floatingLabelEl:e,restingLabelEl:t}=this;if(!e||!t)return[];const{x:i,y:r,height:s}=e.getBoundingClientRect(),{x:n,y:h,height:p}=t.getBoundingClientRect(),v=e.scrollWidth,g=t.scrollWidth,m=g/v,_=n-i,x=h-r+Math.round((p-s*m)/2),S=`translateX(${_}px) translateY(${x}px) scale(${m})`,C="translateX(0) translateY(0) scale(1)",z=t.clientWidth,O=g>z?`${z/m}px`:"";return this.focused||this.populated?[{transform:S,width:O},{transform:C,width:O}]:[{transform:C,width:O},{transform:S,width:O}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}d([l({type:Boolean})],D.prototype,"disabled",void 0),d([l({type:Boolean})],D.prototype,"error",void 0),d([l({type:Boolean})],D.prototype,"focused",void 0),d([l()],D.prototype,"label",void 0),d([l({type:Boolean,attribute:"no-asterisk"})],D.prototype,"noAsterisk",void 0),d([l({type:Boolean})],D.prototype,"populated",void 0),d([l({type:Boolean})],D.prototype,"required",void 0),d([l({type:Boolean})],D.prototype,"resizable",void 0),d([l({attribute:"supporting-text"})],D.prototype,"supportingText",void 0),d([l({attribute:"error-text"})],D.prototype,"errorText",void 0),d([l({type:Number})],D.prototype,"count",void 0),d([l({type:Number})],D.prototype,"max",void 0),d([l({type:Boolean,attribute:"has-start"})],D.prototype,"hasStart",void 0),d([l({type:Boolean,attribute:"has-end"})],D.prototype,"hasEnd",void 0),d([G({slot:"aria-describedby"})],D.prototype,"slottedAriaDescribedBy",void 0),d([w()],D.prototype,"isAnimating",void 0),d([w()],D.prototype,"refreshErrorAlert",void 0),d([w()],D.prototype,"disableTransitions",void 0),d([k(".label.floating")],D.prototype,"floatingLabelEl",void 0),d([k(".label.resting")],D.prototype,"restingLabelEl",void 0),d([k(".container")],D.prototype,"containerEl",void 0);/**
|
|
655
655
|
* @license
|
|
656
656
|
* Copyright 2021 Google LLC
|
|
657
657
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -672,7 +672,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
672
672
|
* @license
|
|
673
673
|
* Copyright 2021 Google LLC
|
|
674
674
|
* SPDX-License-Identifier: Apache-2.0
|
|
675
|
-
*/let
|
|
675
|
+
*/let Gr=class extends Xn{};Gr.styles=[ga,Zn],Gr=d([f("md-filled-field")],Gr);/**
|
|
676
676
|
* @license
|
|
677
677
|
* Copyright 2021 Google LLC
|
|
678
678
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -695,7 +695,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
695
695
|
* @license
|
|
696
696
|
* Copyright 2021 Google LLC
|
|
697
697
|
* SPDX-License-Identifier: Apache-2.0
|
|
698
|
-
*/let
|
|
698
|
+
*/let Kr=class extends Jn{};Kr.styles=[ga,Qn],Kr=d([f("md-outlined-field")],Kr);/**
|
|
699
699
|
* @license
|
|
700
700
|
* Copyright 2022 Google LLC
|
|
701
701
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -708,17 +708,17 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
708
708
|
* @license
|
|
709
709
|
* Copyright 2022 Google LLC
|
|
710
710
|
* SPDX-License-Identifier: Apache-2.0
|
|
711
|
-
*/let
|
|
711
|
+
*/let Li=class extends el{};Li.styles=[tl],Li=d([f("md-icon")],Li);const Y=Object.freeze(Object.defineProperty({__proto__:null,get MdIcon(){return Li}},Symbol.toStringTag,{value:"Module"}));/**
|
|
712
712
|
* @license
|
|
713
713
|
* Copyright 2024 Google LLC
|
|
714
714
|
* SPDX-License-Identifier: Apache-2.0
|
|
715
|
-
*/const
|
|
715
|
+
*/const il=b`:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:disabled{color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:disabled::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:disabled .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled:not(:disabled)::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled)::before{background-color:var(--_selected-container-color)}
|
|
716
716
|
`;/**
|
|
717
717
|
* @license
|
|
718
718
|
* Copyright 2020 Google LLC
|
|
719
719
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
720
|
-
*/const ya=Symbol.for(""),
|
|
721
|
-
take care to ensure page security.`)})(
|
|
720
|
+
*/const ya=Symbol.for(""),rl=o=>{if((o==null?void 0:o.r)===ya)return o==null?void 0:o._$litStatic$},J=(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:ya}),_a=new Map,ol=o=>(e,...t)=>{const i=t.length;let r,s;const n=[],h=[];let p,v=0,g=!1;for(;v<i;){for(p=e[v];v<i&&(s=t[v],(r=rl(s))!==void 0);)p+=r+e[++v],g=!0;v!==i&&h.push(s),n.push(p),v++}if(v===i&&n.push(e[i]),g){const m=n.join("$$lit$$");(e=_a.get(m))===void 0&&(n.raw=n,_a.set(m,e=n)),t=h}return o(e,...t)},Yt=ol(c);/**
|
|
722
722
|
* @license
|
|
723
723
|
* Copyright 2022 Google LLC
|
|
724
724
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -726,12 +726,12 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
726
726
|
* @license
|
|
727
727
|
* Copyright 2018 Google LLC
|
|
728
728
|
* SPDX-License-Identifier: Apache-2.0
|
|
729
|
-
*/const al=Ne(y);class q extends al{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=xa(this,this.flipIconInRtl)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[U].form}get labels(){return this[U].labels}willUpdate(){this.href&&(this.disabled=!1)}render(){const e=this.href?J`div`:J`button`,{ariaLabel:t,ariaHasPopup:
|
|
729
|
+
*/const al=Ne(y);class q extends al{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=xa(this,this.flipIconInRtl)}get name(){return this.getAttribute("name")??""}set name(e){this.setAttribute("name",e)}get form(){return this[U].form}get labels(){return this[U].labels}willUpdate(){this.href&&(this.disabled=!1)}render(){const e=this.href?J`div`:J`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),Yt`<${e}
|
|
730
730
|
class="icon-button ${L(this.getRenderClasses())}"
|
|
731
731
|
id="button"
|
|
732
732
|
aria-label="${h||u}"
|
|
733
|
-
aria-haspopup="${!this.href&&
|
|
734
|
-
aria-expanded="${!this.href&&
|
|
733
|
+
aria-haspopup="${!this.href&&i||u}"
|
|
734
|
+
aria-expanded="${!this.href&&r||u}"
|
|
735
735
|
aria-pressed="${n}"
|
|
736
736
|
?disabled="${!this.href&&this.disabled}"
|
|
737
737
|
@click="${this.handleClick}">
|
|
@@ -758,12 +758,12 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
758
758
|
* @license
|
|
759
759
|
* Copyright 2024 Google LLC
|
|
760
760
|
* SPDX-License-Identifier: Apache-2.0
|
|
761
|
-
*/const
|
|
761
|
+
*/const Di=b`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}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]){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;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)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;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)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{height:100%;outline:none;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host([disabled]){--_disabled-icon-opacity: 1}}
|
|
762
762
|
`;/**
|
|
763
763
|
* @license
|
|
764
764
|
* Copyright 2022 Google LLC
|
|
765
765
|
* SPDX-License-Identifier: Apache-2.0
|
|
766
|
-
*/let
|
|
766
|
+
*/let Ri=class extends q{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};Ri.styles=[Di,il],Ri=d([f("md-filled-icon-button")],Ri);const sl=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledIconButton(){return Ri}},Symbol.toStringTag,{value:"Module"}));/**
|
|
767
767
|
* @license
|
|
768
768
|
* Copyright 2024 Google LLC
|
|
769
769
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -772,7 +772,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
772
772
|
* @license
|
|
773
773
|
* Copyright 2022 Google LLC
|
|
774
774
|
* SPDX-License-Identifier: Apache-2.0
|
|
775
|
-
*/let
|
|
775
|
+
*/let Bi=class extends q{getRenderClasses(){return{...super.getRenderClasses(),"filled-tonal":!0,"toggle-filled-tonal":this.toggle}}};Bi.styles=[Di,nl],Bi=d([f("md-filled-tonal-icon-button")],Bi);const ll=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledTonalIconButton(){return Bi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
776
776
|
* @license
|
|
777
777
|
* Copyright 2024 Google LLC
|
|
778
778
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -781,7 +781,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
781
781
|
* @license
|
|
782
782
|
* Copyright 2021 Google LLC
|
|
783
783
|
* SPDX-License-Identifier: Apache-2.0
|
|
784
|
-
*/let
|
|
784
|
+
*/let Mi=class extends q{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};Mi.styles=[Di,cl],Mi=d([f("md-icon-button")],Mi);const dl=Object.freeze(Object.defineProperty({__proto__:null,get MdIconButton(){return Mi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
785
785
|
* @license
|
|
786
786
|
* Copyright 2024 Google LLC
|
|
787
787
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -790,15 +790,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
790
790
|
* @license
|
|
791
791
|
* Copyright 2022 Google LLC
|
|
792
792
|
* SPDX-License-Identifier: Apache-2.0
|
|
793
|
-
*/let
|
|
793
|
+
*/let Fi=class extends q{getRenderClasses(){return{...super.getRenderClasses(),outlined:!0}}};Fi.styles=[Di,hl],Fi=d([f("md-outlined-icon-button")],Fi);const pl=Object.freeze(Object.defineProperty({__proto__:null,get MdOutlinedIconButton(){return Fi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
794
794
|
* @license
|
|
795
795
|
* Copyright 2023 Google LLC
|
|
796
796
|
* SPDX-License-Identifier: Apache-2.0
|
|
797
|
-
*/function wa(o,e=fe){const t=
|
|
797
|
+
*/function wa(o,e=fe){const t=Hi(o,e);return t&&(t.tabIndex=0,t.focus()),t}function Sa(o,e=fe){const t=ka(o,e);return t&&(t.tabIndex=0,t.focus()),t}function ul(o,e=fe){const t=yt(o,e);return t&&(t.item.tabIndex=-1),t}function yt(o,e=fe){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 Hi(o,e=fe){for(const t of o)if(e(t))return t;return null}function ka(o,e=fe){for(let t=o.length-1;t>=0;t--){const i=o[t];if(e(i))return i}return null}function vl(o,e,t=fe,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 ml(o,e,t=fe,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 $a(o,e,t=fe,i=!0){if(e){const r=vl(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return wa(o,t)}function Ca(o,e,t=fe,i=!0){if(e){const r=ml(o,e.index,t,i);return r&&(r.tabIndex=0,r.focus()),r}else return Sa(o,t)}function Ni(){return new Event("deactivate-items",{bubbles:!0,composed:!0})}function Ea(){return new Event("request-activation",{bubbles:!0,composed:!0})}function fe(o){return!o.disabled}/**
|
|
798
798
|
* @license
|
|
799
799
|
* Copyright 2023 Google LLC
|
|
800
800
|
* SPDX-License-Identifier: Apache-2.0
|
|
801
|
-
*/const j={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Aa{constructor(e){this.handleKeydown=g=>{const m=g.key;if(g.defaultPrevented||!this.isNavigableKey(m))return;const _=this.items;if(!_.length)return;const x=yt(_,this.isActivatable);g.preventDefault();const S=this.isRtl(),C=S?j.ArrowRight:j.ArrowLeft,z=S?j.ArrowLeft:j.ArrowRight;let T=null;switch(m){case j.ArrowDown:case z:T=$a(_,x,this.isActivatable,this.wrapNavigation());break;case j.ArrowUp:case C:T=Ca(_,x,this.isActivatable,this.wrapNavigation());break;case j.Home:T=wa(_,this.isActivatable);break;case j.End:T=Sa(_,this.isActivatable);break}T&&x&&x.item!==T&&(x.item.tabIndex=-1)},this.onDeactivateItems=()=>{const g=this.items;for(const m of g)this.deactivateItem(m)},this.onRequestActivation=g=>{this.onDeactivateItems();const m=g.target;this.activateItem(m),m.focus()},this.onSlotchange=()=>{const g=this.items;let m=!1;for(const x of g){if(!x.disabled&&x.tabIndex>-1&&!m){m=!0,x.tabIndex=0;continue}x.tabIndex=-1}if(m)return;const _=
|
|
801
|
+
*/const j={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Aa{constructor(e){this.handleKeydown=g=>{const m=g.key;if(g.defaultPrevented||!this.isNavigableKey(m))return;const _=this.items;if(!_.length)return;const x=yt(_,this.isActivatable);g.preventDefault();const S=this.isRtl(),C=S?j.ArrowRight:j.ArrowLeft,z=S?j.ArrowLeft:j.ArrowRight;let T=null;switch(m){case j.ArrowDown:case z:T=$a(_,x,this.isActivatable,this.wrapNavigation());break;case j.ArrowUp:case C:T=Ca(_,x,this.isActivatable,this.wrapNavigation());break;case j.Home:T=wa(_,this.isActivatable);break;case j.End:T=Sa(_,this.isActivatable);break}T&&x&&x.item!==T&&(x.item.tabIndex=-1)},this.onDeactivateItems=()=>{const g=this.items;for(const m of g)this.deactivateItem(m)},this.onRequestActivation=g=>{this.onDeactivateItems();const m=g.target;this.activateItem(m),m.focus()},this.onSlotchange=()=>{const g=this.items;let m=!1;for(const x of g){if(!x.disabled&&x.tabIndex>-1&&!m){m=!0,x.tabIndex=0;continue}x.tabIndex=-1}if(m)return;const _=Hi(g,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=yt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),$a(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=yt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ca(e,t,this.isActivatable,this.wrapNavigation())}}/**
|
|
802
802
|
* @license
|
|
803
803
|
* Copyright 2021 Google LLC
|
|
804
804
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -817,11 +817,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
817
817
|
* @license
|
|
818
818
|
* Copyright 2021 Google LLC
|
|
819
819
|
* SPDX-License-Identifier: Apache-2.0
|
|
820
|
-
*/let
|
|
820
|
+
*/let qi=class extends Ia{};qi.styles=[fl],qi=d([f("md-list")],qi);const gl=Object.freeze(Object.defineProperty({__proto__:null,get MdList(){return qi}},Symbol.toStringTag,{value:"Module"}));/**
|
|
821
821
|
* @license
|
|
822
822
|
* Copyright 2023 Google LLC
|
|
823
823
|
* SPDX-License-Identifier: Apache-2.0
|
|
824
|
-
*/class
|
|
824
|
+
*/class Yr extends y{constructor(){super(...arguments),this.multiline=!1}render(){return c`
|
|
825
825
|
<slot name="container"></slot>
|
|
826
826
|
<slot class="non-text" name="start"></slot>
|
|
827
827
|
<div class="text">
|
|
@@ -836,7 +836,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
836
836
|
</div>
|
|
837
837
|
<slot class="non-text" name="trailing-supporting-text"></slot>
|
|
838
838
|
<slot class="non-text" name="end"></slot>
|
|
839
|
-
`}handleTextSlotChange(){let e=!1,t=0;for(const
|
|
839
|
+
`}handleTextSlotChange(){let e=!1,t=0;for(const i of this.textSlots)if(yl(i)&&(t+=1),t>1){e=!0;break}this.multiline=e}}d([l({type:Boolean,reflect:!0})],Yr.prototype,"multiline",void 0),d([Ns(".text slot")],Yr.prototype,"textSlots",void 0);function yl(o){var e;for(const t of o.assignedNodes({flatten:!0})){const i=t.nodeType===Node.ELEMENT_NODE,r=t.nodeType===Node.TEXT_NODE&&((e=t.textContent)==null?void 0:e.match(/\S/));if(i||r)return!0}return!1}/**
|
|
840
840
|
* @license
|
|
841
841
|
* Copyright 2024 Google LLC
|
|
842
842
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -845,7 +845,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
845
845
|
* @license
|
|
846
846
|
* Copyright 2023 Google LLC
|
|
847
847
|
* SPDX-License-Identifier: Apache-2.0
|
|
848
|
-
*/let
|
|
848
|
+
*/let Xr=class extends Yr{};Xr.styles=[_l],Xr=d([f("md-item")],Xr);/**
|
|
849
849
|
* @license
|
|
850
850
|
* Copyright 2022 Google LLC
|
|
851
851
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -858,10 +858,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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
|
|
862
|
-
<${
|
|
861
|
+
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.type){case"link":i=J`a`;break;case"button":i=J`button`;break;default:case"text":i=J`li`;break}const r=this.type!=="text",s=t&&this.target?this.target:u;return Yt`
|
|
862
|
+
<${i}
|
|
863
863
|
id="item"
|
|
864
|
-
tabindex="${this.isDisabled||!
|
|
864
|
+
tabindex="${this.isDisabled||!r?-1:0}"
|
|
865
865
|
?disabled=${this.isDisabled}
|
|
866
866
|
role="listitem"
|
|
867
867
|
aria-selected=${this.ariaSelected||u}
|
|
@@ -872,7 +872,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
872
872
|
href=${this.href||u}
|
|
873
873
|
target=${s}
|
|
874
874
|
@focus=${this.onFocus}
|
|
875
|
-
>${e}</${
|
|
875
|
+
>${e}</${i}>
|
|
876
876
|
`}renderRipple(){return this.type==="text"?u:c` <md-ripple
|
|
877
877
|
part="ripple"
|
|
878
878
|
for="item"
|
|
@@ -897,27 +897,27 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
897
897
|
* @license
|
|
898
898
|
* Copyright 2022 Google LLC
|
|
899
899
|
* SPDX-License-Identifier: Apache-2.0
|
|
900
|
-
*/let
|
|
900
|
+
*/let Zr=class extends Ae{};Zr.styles=[xl],Zr=d([f("md-list-item")],Zr);/**
|
|
901
901
|
* @license
|
|
902
902
|
* Copyright 2018 Google LLC
|
|
903
903
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
904
|
-
*/const za="important",wl=" !"+za,nt=
|
|
904
|
+
*/const za="important",wl=" !"+za,nt=zr(class extends Tr{constructor(o){var e;if(super(o),o.type!==He.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(wl);i.includes("-")||s?t.setProperty(i,s?r.slice(0,-11):r,s?za:""):t[i]=r}}return ne}});/**
|
|
905
905
|
* @license
|
|
906
906
|
* Copyright 2023 Google LLC
|
|
907
907
|
* SPDX-License-Identifier: Apache-2.0
|
|
908
|
-
*/function Sl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Ta=Sl;function kl(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function
|
|
908
|
+
*/function Sl(o,e){return new CustomEvent("close-menu",{bubbles:!0,composed:!0,detail:{initiator:o,reason:e,itemPath:[o]}})}const Ta=Sl;function kl(){return new Event("deactivate-typeahead",{bubbles:!0,composed:!0})}function Jr(){return new Event("activate-typeahead",{bubbles:!0,composed:!0})}const Ve={RIGHT:"ArrowRight",LEFT:"ArrowLeft"},_t={SPACE:"Space",ENTER:"Enter"},Qr={CLICK_SELECTION:"click-selection",KEYDOWN:"keydown"},eo={ESCAPE:"Escape",SPACE:_t.SPACE,ENTER:_t.ENTER};function Oa(o){return Object.values(eo).some(e=>e===o)}function $l(o){return Object.values(_t).some(e=>e===o)}function to(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 ve={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
|
|
912
|
+
*/const Vi={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class Cl{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(),g=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,z=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const T=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),O=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[se,W]=g.split("-"),[F,Ye]=v.split("-"),Xe=getComputedStyle(e).direction==="ltr";let{blockInset:Re,blockOutOfBoundsCorrection:Ze,surfaceBlockProperty:fr}=this.calculateBlock({surfaceRect:T,anchorRect:O,anchorBlock:F,surfaceBlock:se,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});if(Ze){const Fo=se==="start"?"end":"start",Ho=F==="start"?"end":"start",Be=this.calculateBlock({surfaceRect:T,anchorRect:O,anchorBlock:Ho,surfaceBlock:Fo,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});Ze>Be.blockOutOfBoundsCorrection&&(Re=Be.blockInset,Ze=Be.blockOutOfBoundsCorrection,fr=Be.surfaceBlockProperty)}let{inlineInset:Je,inlineOutOfBoundsCorrection:Lt,surfaceInlineProperty:As}=this.calculateInline({surfaceRect:T,anchorRect:O,anchorInline:Ye,surfaceInline:W,xOffset:n,positioning:s,isLTR:Xe,windowInnerWidth:m,inlineScrollbarWidth:z});if(Lt){const Fo=W==="start"?"end":"start",Ho=Ye==="start"?"end":"start",Be=this.calculateInline({surfaceRect:T,anchorRect:O,anchorInline:Ho,surfaceInline:Fo,xOffset:n,positioning:s,isLTR:Xe,windowInnerWidth:m,inlineScrollbarWidth:z});Math.abs(Lt)>Math.abs(Be.inlineOutOfBoundsCorrection)&&(Je=Be.inlineInset,Lt=Be.inlineOutOfBoundsCorrection,As=Be.surfaceInlineProperty)}p==="move"&&(Re=Re-Ze,Je=Je-Lt),this.surfaceStylesInternal={display:"block",opacity:"1",[fr]:`${Re}px`,[As]:`${Je}px`},p==="resize"&&(Ze&&(this.surfaceStylesInternal.height=`${T.height-Ze}px`),Lt&&(this.surfaceStylesInternal.width=`${T.width-Lt}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:i,anchorBlock:r,surfaceBlock:s,yOffset:n,positioning:h,windowInnerHeight:p,blockScrollbarHeight:v}=e,g=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,z=_*i.top+x*(p-i.bottom-v),T=_*window.scrollY-x*window.scrollY,O=Math.abs(Math.min(0,p-z-C-t.height));return{blockInset:g*z+m*T+C,blockOutOfBoundsCorrection:O,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:g}=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,z=i==="end"?1:0,O=(r!==i?1:0)*s.width+h,se=C*s.left+z*(v-s.right-g),W=C*(v-s.right-g)+z*s.left,F=x*se+S*W,Ye=C*window.scrollX-z*window.scrollX,Xe=z*window.scrollX-C*window.scrollX,Re=x*Ye+S*Xe,Ze=Math.abs(Math.min(0,v-F-O-n.width)),fr=m*F+O+_*Re;let Je=i==="start"?"inset-inline-start":"inset-inline-end";return(p==="document"||p==="fixed")&&(i==="start"&&t||i==="end"&&!t?Je="left":Je="right"),{inlineInset:fr,inlineOutOfBoundsCorrection:Ze,surfaceInlineProperty:Je}}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
|
|
916
|
-
*/const le={INDEX:0,ITEM:1,TEXT:2};class El{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=t=>{this.isTypingAhead?this.typeahead(t):this.beginTypeahead(t)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code==="Space"||e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((t,
|
|
916
|
+
*/const le={INDEX:0,ITEM:1,TEXT:2};class El{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer="",this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=t=>{this.isTypingAhead?this.typeahead(t):this.beginTypeahead(t)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer="",this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code==="Space"||e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((t,i)=>[i,t,t.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(t=>t[le.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[le.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code==="Enter"||e.code.startsWith("Arrow")||e.code==="Escape"){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[le.ITEM].tabIndex=-1);return}e.code==="Space"&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();const t=this.lastActiveRecord?this.lastActiveRecord[le.INDEX]:-1,i=this.typeaheadRecords.length,r=p=>(p[le.INDEX]+i-t)%i,s=this.typeaheadRecords.filter(p=>!p[le.ITEM].disabled&&p[le.TEXT].startsWith(this.typaheadBuffer)).sort((p,v)=>r(p)-r(v));if(s.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[le.ITEM].tabIndex=-1),this.endTypeahead();return}const n=this.typaheadBuffer.length===1;let h;this.lastActiveRecord===s[0]&&n?h=s[1]??s[0]:h=s[0],this.lastActiveRecord&&(this.lastActiveRecord[le.ITEM].tabIndex=-1),this.lastActiveRecord=h,h[le.ITEM].tabIndex=0,h[le.ITEM].focus()}}/**
|
|
917
917
|
* @license
|
|
918
918
|
* Copyright 2023 Google LLC
|
|
919
919
|
* SPDX-License-Identifier: Apache-2.0
|
|
920
|
-
*/const Pa=200,La=new Set([j.ArrowDown,j.ArrowUp,j.Home,j.End]),Al=new Set([j.ArrowLeft,j.ArrowRight,...La]);function Il(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 M 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=Pa,this.anchorCorner=
|
|
920
|
+
*/const Pa=200,La=new Set([j.ArrowDown,j.ArrowUp,j.Home,j.End]),Al=new Set([j.ArrowLeft,j.ArrowRight,...La]);function Il(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 M 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=Pa,this.anchorCorner=Vi.END_START,this.menuCorner=Vi.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=ve.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=rn(),this.listController=new Aa({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 Al.has(e);const i=getComputedStyle(this).direction==="rtl"?j.ArrowLeft:j.ArrowRight;return e===i?!0:La.has(e)},wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new El(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new Cl(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(to(e.relatedTarget,this)||this.pointerPath.length!==0&&to(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=Il();const e=this.items,t=yt(e);t&&this.defaultFocus!==ve.NONE&&(t.item.tabIndex=-1);let i=!this.quick;switch(this.quick?this.dispatchEvent(new Event("opening")):i=!!await this.animateOpen(),this.defaultFocus){case ve.FIRST_ITEM:const r=Hi(e);r&&(r.tabIndex=0,r.focus(),await r.updateComplete);break;case ve.LAST_ITEM:const s=ka(e);s&&(s.tabIndex=0,s.focus(),await s.updateComplete);break;case ve.LIST_ROOT:this.focus();break;default:case ve.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 ${L(this.getSurfaceClasses())}"
|
|
923
923
|
style=${nt(this.menuPositionController.surfaceStyles)}
|
|
@@ -935,7 +935,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
935
935
|
@activate-typeahead=${this.handleActivateTypeahead}
|
|
936
936
|
@stay-open-on-focusout=${this.handleStayOpenOnFocusout}
|
|
937
937
|
@close-on-focusout=${this.handleCloseOnFocusout}
|
|
938
|
-
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return c`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning==="fixed","has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Oa(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const
|
|
938
|
+
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return c`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning==="fixed","has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&Oa(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){const e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;const i=this.openDirection;this.dispatchEvent(new Event("opening")),e.classList.toggle("animating",!0);const r=this.openCloseAnimationSignal.start(),s=e.offsetHeight,n=i==="UP",h=this.items,p=500,v=50,g=250,m=(p-g)/h.length,_=e.animate([{height:"0px"},{height:`${s}px`}],{duration:p,easing:pe.EMPHASIZED}),x=t.animate([{transform:n?`translateY(-${s}px)`:""},{transform:""}],{duration:p,easing:pe.EMPHASIZED}),S=e.animate([{opacity:0},{opacity:1}],v),C=[];for(let O=0;O<h.length;O++){const se=n?h.length-1-O:O,W=h[se],F=W.animate([{opacity:0},{opacity:1}],{duration:g,delay:m*O});W.classList.toggle("md-menu-hidden",!0),F.addEventListener("finish",()=>{W.classList.toggle("md-menu-hidden",!1)}),C.push([W,F])}let z=O=>{};const T=new Promise(O=>{z=O});return r.addEventListener("abort",()=>{_.cancel(),x.cancel(),S.cancel(),C.forEach(([O,se])=>{O.classList.toggle("md-menu-hidden",!1),se.cancel()}),z(!0)}),_.addEventListener("finish",()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),z(!1)}),await T}animateClose(){let e;const t=new Promise(F=>{e=F}),i=this.surfaceEl,r=this.slotEl;if(!i||!r)return e(!1),t;const n=this.openDirection==="UP";this.dispatchEvent(new Event("closing")),i.classList.toggle("animating",!0);const h=this.openCloseAnimationSignal.start(),p=i.offsetHeight,v=this.items,g=150,m=50,_=g-m,x=50,S=50,C=.35,z=(g-S-x)/v.length,T=i.animate([{height:`${p}px`},{height:`${p*C}px`}],{duration:g,easing:pe.EMPHASIZED_ACCELERATE}),O=r.animate([{transform:""},{transform:n?`translateY(-${p*(1-C)}px)`:""}],{duration:g,easing:pe.EMPHASIZED_ACCELERATE}),se=i.animate([{opacity:1},{opacity:0}],{duration:m,delay:_}),W=[];for(let F=0;F<v.length;F++){const Ye=n?F:v.length-1-F,Xe=v[Ye],Re=Xe.animate([{opacity:1},{opacity:0}],{duration:x,delay:S+z*F});Re.addEventListener("finish",()=>{Xe.classList.toggle("md-menu-hidden",!0)}),W.push([Xe,Re])}return h.addEventListener("abort",()=>{T.cancel(),O.cancel(),se.cancel(),W.forEach(([F,Ye])=>{Ye.cancel(),F.classList.toggle("md-menu-hidden",!1)}),e(!1)}),T.addEventListener("finish",()=>{i.classList.toggle("animating",!1),W.forEach(([F])=>{F.classList.toggle("md-menu-hidden",!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event("closed")),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener("click",this.onDocumentClick,{capture:!0}),window.addEventListener("pointerdown",this.onWindowPointerdown),document.addEventListener("resize",this.onWindowResize,{passive:!0}),window.addEventListener("resize",this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener("click",this.onDocumentClick,{capture:!0}),window.removeEventListener("pointerdown",this.onWindowPointerdown),document.removeEventListener("resize",this.onWindowResize),window.removeEventListener("resize",this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(t=>{var i;(i=t.close)==null||i.call(t)})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}}d([k(".menu")],M.prototype,"surfaceEl",void 0),d([k("slot")],M.prototype,"slotEl",void 0),d([l()],M.prototype,"anchor",void 0),d([l()],M.prototype,"positioning",void 0),d([l({type:Boolean})],M.prototype,"quick",void 0),d([l({type:Boolean,attribute:"has-overflow"})],M.prototype,"hasOverflow",void 0),d([l({type:Boolean,reflect:!0})],M.prototype,"open",void 0),d([l({type:Number,attribute:"x-offset"})],M.prototype,"xOffset",void 0),d([l({type:Number,attribute:"y-offset"})],M.prototype,"yOffset",void 0),d([l({type:Number,attribute:"typeahead-delay"})],M.prototype,"typeaheadDelay",void 0),d([l({attribute:"anchor-corner"})],M.prototype,"anchorCorner",void 0),d([l({attribute:"menu-corner"})],M.prototype,"menuCorner",void 0),d([l({type:Boolean,attribute:"stay-open-on-outside-click"})],M.prototype,"stayOpenOnOutsideClick",void 0),d([l({type:Boolean,attribute:"stay-open-on-focusout"})],M.prototype,"stayOpenOnFocusout",void 0),d([l({type:Boolean,attribute:"skip-restore-focus"})],M.prototype,"skipRestoreFocus",void 0),d([l({attribute:"default-focus"})],M.prototype,"defaultFocus",void 0),d([l({type:Boolean,attribute:"no-navigation-wrap"})],M.prototype,"noNavigationWrap",void 0),d([G({flatten:!0})],M.prototype,"slotItems",void 0),d([w()],M.prototype,"typeaheadActive",void 0);/**
|
|
939
939
|
* @license
|
|
940
940
|
* Copyright 2024 Google LLC
|
|
941
941
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -944,11 +944,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
944
944
|
* @license
|
|
945
945
|
* Copyright 2022 Google LLC
|
|
946
946
|
* SPDX-License-Identifier: Apache-2.0
|
|
947
|
-
*/let
|
|
947
|
+
*/let io=class extends M{};io.styles=[zl],io=d([f("md-menu")],io);/**
|
|
948
948
|
* @license
|
|
949
949
|
* Copyright 2023 Google LLC
|
|
950
950
|
* SPDX-License-Identifier: Apache-2.0
|
|
951
|
-
*/class Da{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ta(this.host,{kind:
|
|
951
|
+
*/class Da{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(Ta(this.host,{kind:Qr.CLICK_SELECTION}))},this.onKeydown=i=>{if(this.host.href&&i.code==="Enter"){const s=this.getInteractiveElement();s instanceof HTMLAnchorElement&&s.click()}if(i.defaultPrevented)return;const r=i.code;this.host.keepOpen&&r!=="Escape"||Oa(r)&&(i.preventDefault(),this.host.dispatchEvent(Ta(this.host,{kind:Qr.KEYDOWN,key:r})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;const e=this.getHeadlineElements(),t=[];return e.forEach(i=>{i.textContent&&i.textContent.trim()&&t.push(i.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(i=>{i.textContent&&i.textContent.trim()&&t.push(i.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(i=>{i.textContent&&i.textContent.trim()&&t.push(i.textContent.trim())}),t.join(" ")}get tagName(){switch(this.host.type){case"link":return"a";case"button":return"button";default:case"menuitem":case"option":return"li"}}get role(){return this.host.type==="option"?"option":"menuitem"}hostConnected(){this.host.toggleAttribute("md-menu-item",!0)}hostUpdate(){this.host.href&&(this.host.type="link")}setTypeaheadText(e){this.internalTypeaheadText=e}}/**
|
|
952
952
|
* @license
|
|
953
953
|
* Copyright 2022 Google LLC
|
|
954
954
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -961,8 +961,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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
|
|
965
|
-
<${
|
|
964
|
+
`)}renderListItem(e){const t=this.type==="link";let i;switch(this.menuItemController.tagName){case"a":i=J`a`;break;case"button":i=J`button`;break;default:case"li":i=J`li`;break}const r=t&&this.target?this.target:u;return Yt`
|
|
965
|
+
<${i}
|
|
966
966
|
id="item"
|
|
967
967
|
tabindex=${this.disabled&&!t?-1:0}
|
|
968
968
|
role=${this.menuItemController.role}
|
|
@@ -973,10 +973,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
973
973
|
aria-haspopup=${this.ariaHasPopup||u}
|
|
974
974
|
class="list-item ${L(this.getRenderClasses())}"
|
|
975
975
|
href=${this.href||u}
|
|
976
|
-
target=${
|
|
976
|
+
target=${r}
|
|
977
977
|
@click=${this.menuItemController.onClick}
|
|
978
978
|
@keydown=${this.menuItemController.onKeydown}
|
|
979
|
-
>${e}</${
|
|
979
|
+
>${e}</${i}>
|
|
980
980
|
`}renderRipple(){return c` <md-ripple
|
|
981
981
|
part="ripple"
|
|
982
982
|
for="item"
|
|
@@ -991,7 +991,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
991
991
|
<slot
|
|
992
992
|
name="trailing-supporting-text"
|
|
993
993
|
slot="trailing-supporting-text"></slot>
|
|
994
|
-
`}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}Z(Q),Q.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),d([l()],Q.prototype,"type",void 0),d([l()],Q.prototype,"href",void 0),d([l()],Q.prototype,"target",void 0),d([l({type:Boolean,attribute:"keep-open"})],Q.prototype,"keepOpen",void 0),d([l({type:Boolean})],Q.prototype,"selected",void 0),d([k(".list-item")],Q.prototype,"listItemRoot",void 0),d([G({slot:"headline"})],Q.prototype,"headlineElements",void 0),d([G({slot:"supporting-text"})],Q.prototype,"supportingTextElements",void 0),d([
|
|
994
|
+
`}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}Z(Q),Q.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),d([l()],Q.prototype,"type",void 0),d([l()],Q.prototype,"href",void 0),d([l()],Q.prototype,"target",void 0),d([l({type:Boolean,attribute:"keep-open"})],Q.prototype,"keepOpen",void 0),d([l({type:Boolean})],Q.prototype,"selected",void 0),d([k(".list-item")],Q.prototype,"listItemRoot",void 0),d([G({slot:"headline"})],Q.prototype,"headlineElements",void 0),d([G({slot:"supporting-text"})],Q.prototype,"supportingTextElements",void 0),d([wr({slot:""})],Q.prototype,"defaultElements",void 0),d([l({attribute:"typeahead-text"})],Q.prototype,"typeaheadText",null);/**
|
|
995
995
|
* @license
|
|
996
996
|
* Copyright 2024 Google LLC
|
|
997
997
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1000,11 +1000,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1000
1000
|
* @license
|
|
1001
1001
|
* Copyright 2022 Google LLC
|
|
1002
1002
|
* SPDX-License-Identifier: Apache-2.0
|
|
1003
|
-
*/let
|
|
1003
|
+
*/let ro=class extends Q{};ro.styles=[Ra],ro=d([f("md-menu-item")],ro);/**
|
|
1004
1004
|
* @license
|
|
1005
1005
|
* Copyright 2023 Google LLC
|
|
1006
1006
|
* SPDX-License-Identifier: Apache-2.0
|
|
1007
|
-
*/class Ue extends y{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=
|
|
1007
|
+
*/class Ue extends y{get item(){return this.items[0]??null}get menu(){return this.menus[0]??null}constructor(){super(),this.anchorCorner=Vi.START_END,this.menuCorner=Vi.START_START,this.hoverOpenDelay=400,this.hoverCloseDelay=400,this.isSubMenu=!0,this.previousOpenTimeout=0,this.previousCloseTimeout=0,this.onMouseenter=()=>{var e;clearTimeout(this.previousOpenTimeout),clearTimeout(this.previousCloseTimeout),!((e=this.menu)!=null&&e.open)&&(this.hoverOpenDelay?this.previousOpenTimeout=setTimeout(()=>{this.show()},this.hoverOpenDelay):this.show())},this.onMouseleave=()=>{clearTimeout(this.previousCloseTimeout),clearTimeout(this.previousOpenTimeout),this.hoverCloseDelay?this.previousCloseTimeout=setTimeout(()=>{this.close()},this.hoverCloseDelay):this.close()},this.addEventListener("mouseenter",this.onMouseenter),this.addEventListener("mouseleave",this.onMouseleave)}render(){return c`
|
|
1008
1008
|
<slot
|
|
1009
1009
|
name="item"
|
|
1010
1010
|
@click=${this.onClick}
|
|
@@ -1017,7 +1017,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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(
|
|
1020
|
+
`}firstUpdated(){this.onSlotchange()}async show(){const e=this.menu;if(!e||e.open)return;e.addEventListener("closed",()=>{this.item.ariaExpanded="false",this.dispatchEvent(Jr()),this.dispatchEvent(Ni()),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(Ni()),this.dispatchEvent(kl()),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(Jr()),e.quick=!0,e.close(),this.dispatchEvent(Ni());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&&(Ve.LEFT===e.code||Ve.RIGHT===e.code);if((e.code===_t.SPACE||i)&&(e.preventDefault(),i&&e.stopPropagation()),!t)return;const r=this.menu;if(!r)return;const s=r.items,n=Hi(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(Jr()),i.kind===Qr.KEYDOWN&&i.key===eo.ESCAPE){e.stopPropagation(),this.item.dispatchEvent(Ea());return}this.dispatchEvent(Ni())}async onSubMenuKeydown(e){var r;if(e.defaultPrevented)return;const{close:t,keyCode:i}=this.isSubmenuCloseKey(e.code);t&&(e.preventDefault(),(i===Ve.LEFT||i===Ve.RIGHT)&&e.stopPropagation(),await this.close(),ul(this.menu.items),(r=this.item)==null||r.focus(),this.item.tabIndex=0,this.item.focus())}isSubmenuOpenKey(e){const i=getComputedStyle(this).direction==="rtl"?Ve.LEFT:Ve.RIGHT;switch(e){case i:case _t.SPACE:case _t.ENTER:return!0;default:return!1}}isSubmenuCloseKey(e){const i=getComputedStyle(this).direction==="rtl"?Ve.RIGHT:Ve.LEFT;switch(e){case i:case eo.ESCAPE:return{close:!0,keyCode:e};default:return{close:!1}}}}d([l({attribute:"anchor-corner"})],Ue.prototype,"anchorCorner",void 0),d([l({attribute:"menu-corner"})],Ue.prototype,"menuCorner",void 0),d([l({type:Number,attribute:"hover-open-delay"})],Ue.prototype,"hoverOpenDelay",void 0),d([l({type:Number,attribute:"hover-close-delay"})],Ue.prototype,"hoverCloseDelay",void 0),d([l({type:Boolean,reflect:!0,attribute:"md-sub-menu"})],Ue.prototype,"isSubMenu",void 0),d([G({slot:"item",flatten:!0})],Ue.prototype,"items",void 0),d([G({slot:"menu",flatten:!0})],Ue.prototype,"menus",void 0);/**
|
|
1021
1021
|
* @license
|
|
1022
1022
|
* Copyright 2024 Google LLC
|
|
1023
1023
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1072,7 +1072,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1072
1072
|
* @license
|
|
1073
1073
|
* Copyright 2023 Google LLC
|
|
1074
1074
|
* SPDX-License-Identifier: Apache-2.0
|
|
1075
|
-
*/class Ba extends lt{constructor(){super(...arguments),this.buffer=0}renderIndicator(){const e={transform:`scaleX(${(this.indeterminate?1:this.value/this.max)*100}%)`},t=this.buffer??0,
|
|
1075
|
+
*/class Ba extends lt{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
1077
|
<div class="inactive-track" style=${nt(s)}></div>
|
|
1078
1078
|
<div class="bar primary-bar" style=${nt(e)}>
|
|
@@ -1094,15 +1094,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1094
1094
|
* @license
|
|
1095
1095
|
* Copyright 2023 Google LLC
|
|
1096
1096
|
* SPDX-License-Identifier: Apache-2.0
|
|
1097
|
-
*/const
|
|
1097
|
+
*/const Ui=Symbol("isFocusable"),no=Symbol("privateIsFocusable"),ji=Symbol("externalTabIndex"),Wi=Symbol("isUpdatingTabIndex"),Gi=Symbol("updateTabIndex");function Ma(o){var e,t,i;class r extends o{constructor(){super(...arguments),this[e]=!0,this[t]=null,this[i]=!1}get[Ui](){return this[no]}set[Ui](n){this[Ui]!==n&&(this[no]=n,this[Gi]())}connectedCallback(){super.connectedCallback(),this[Gi]()}attributeChangedCallback(n,h,p){if(n!=="tabindex"){super.attributeChangedCallback(n,h,p);return}if(this.requestUpdate("tabIndex",Number(h??-1)),!this[Wi]){if(!this.hasAttribute("tabindex")){this[ji]=null,this[Gi]();return}this[ji]=this.tabIndex}}[(e=no,t=ji,i=Wi,Gi)](){const n=this[Ui]?0:-1,h=this[ji]??n;this[Wi]=!0,this.tabIndex=h,this[Wi]=!1}}return d([l({noAccessor:!0})],r.prototype,"tabIndex",void 0),r}/**
|
|
1098
1098
|
* @license
|
|
1099
1099
|
* Copyright 2023 Google LLC
|
|
1100
1100
|
* SPDX-License-Identifier: Apache-2.0
|
|
1101
|
-
*/class Dl extends
|
|
1101
|
+
*/class Dl extends Ei{computeValidity(e){this.radioElement||(this.radioElement=document.createElement("input"),this.radioElement.type="radio",this.radioElement.name="group");let t=!1,i=!1;for(const{checked:r,required:s}of e)s&&(t=!0),r&&(i=!0);return this.radioElement.checked=i,this.radioElement.required=t,{validity:{valueMissing:t&&!i},validationMessage:this.radioElement.validationMessage}}equals(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],s=t[i];if(r.checked!==s.checked||r.required!==s.required)return!1}return!0}copy(e){return e.map(({checked:t,required:i})=>({checked:t,required:i}))}}/**
|
|
1102
1102
|
* @license
|
|
1103
1103
|
* Copyright 2022 Google LLC
|
|
1104
1104
|
* SPDX-License-Identifier: Apache-2.0
|
|
1105
|
-
*/class Rl{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const
|
|
1105
|
+
*/class Rl{get controls(){const e=this.host.getAttribute("name");return!e||!this.root||!this.host.isConnected?[this.host]:Array.from(this.root.querySelectorAll(`[name="${e}"]`))}constructor(e){this.host=e,this.focused=!1,this.root=null,this.handleFocusIn=()=>{this.focused=!0,this.updateTabIndices()},this.handleFocusOut=()=>{this.focused=!1,this.updateTabIndices()},this.handleKeyDown=t=>{const i=t.key==="ArrowDown",r=t.key==="ArrowUp",s=t.key==="ArrowLeft",n=t.key==="ArrowRight";if(!s&&!n&&!i&&!r)return;const h=this.controls;if(!h.length)return;t.preventDefault();const v=getComputedStyle(this.host).direction==="rtl"?s||i:n||i,g=h.indexOf(this.host);let m=v?g+1:g-1;for(;m!==g;){m>=h.length?m=0:m<0&&(m=h.length-1);const _=h[m];if(_.hasAttribute("disabled")){v?m++:m--;continue}for(const x of h)x!==_&&(x.checked=!1,x.tabIndex=-1,x.blur());_.checked=!0,_.tabIndex=0,_.focus(),_.dispatchEvent(new Event("change",{bubbles:!0}));break}}}hostConnected(){this.root=this.host.getRootNode(),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("focusin",this.handleFocusIn),this.host.addEventListener("focusout",this.handleFocusOut),this.host.checked&&this.uncheckSiblings(),this.updateTabIndices()}hostDisconnected(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("focusin",this.handleFocusIn),this.host.removeEventListener("focusout",this.handleFocusOut),this.updateTabIndices(),this.root=null}handleCheckedChange(){this.host.checked&&(this.uncheckSiblings(),this.updateTabIndices())}uncheckSiblings(){for(const e of this.controls)e!==this.host&&(e.checked=!1)}updateTabIndices(){const e=this.controls,t=e.find(i=>i.checked);if(t||this.focused){const i=t||this.host;i.tabIndex=0;for(const r of e)r!==i&&(r.tabIndex=-1);return}for(const i of e)i.tabIndex=0}}/**
|
|
1106
1106
|
* @license
|
|
1107
1107
|
* Copyright 2018 Google LLC
|
|
1108
1108
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1135,7 +1135,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1135
1135
|
.value=${this.value}
|
|
1136
1136
|
?disabled=${this.disabled} />
|
|
1137
1137
|
</div>
|
|
1138
|
-
`}updated(){this[U].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(Ut(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()}[(Fa=lo,Ce)](){return this.checked?this.value:null}[Gt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[
|
|
1138
|
+
`}updated(){this[U].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(Ut(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()}[(Fa=lo,Ce)](){return this.checked?this.value:null}[Gt](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[rt](){return new Dl(()=>this.selectionController?this.selectionController.controls:[this])}[ot](){return this.container}}d([l({type:Boolean})],Xt.prototype,"checked",null),d([l({type:Boolean})],Xt.prototype,"required",void 0),d([l()],Xt.prototype,"value",void 0),d([k(".container")],Xt.prototype,"container",void 0);/**
|
|
1139
1139
|
* @license
|
|
1140
1140
|
* Copyright 2024 Google LLC
|
|
1141
1141
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1148,19 +1148,19 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1148
1148
|
* @license
|
|
1149
1149
|
* Copyright 2023 Google LLC
|
|
1150
1150
|
* SPDX-License-Identifier: Apache-2.0
|
|
1151
|
-
*/const
|
|
1151
|
+
*/const Ki=Symbol("onReportValidity"),Yi=Symbol("privateCleanupFormListeners"),Xi=Symbol("privateDoNotReportInvalid"),Zi=Symbol("privateIsSelfReportingValidity"),Ji=Symbol("privateCallOnReportValidity");function Ha(o){var e,t,i;class r extends o{constructor(...n){super(...n),this[e]=new AbortController,this[t]=!1,this[i]=!1,this.addEventListener("invalid",h=>{this[Xi]||!h.isTrusted||this.addEventListener("invalid",()=>{this[Ji](h)},{once:!0})},{capture:!0})}checkValidity(){this[Xi]=!0;const n=super.checkValidity();return this[Xi]=!1,n}reportValidity(){this[Zi]=!0;const n=super.reportValidity();return n&&this[Ji](null),this[Zi]=!1,n}[(e=Yi,t=Xi,i=Zi,Ji)](n){const h=n==null?void 0:n.defaultPrevented;h||(this[Ki](n),!(!h&&(n==null?void 0:n.defaultPrevented)))||(this[Zi]||ql(this[U].form,this))&&this.focus()}[Ki](n){throw new Error("Implement [onReportValidity]")}formAssociatedCallback(n){super.formAssociatedCallback&&super.formAssociatedCallback(n),this[Yi].abort(),n&&(this[Yi]=new AbortController,Hl(this,n,()=>{this[Ji](null)},this[Yi].signal))}}return r}function Hl(o,e,t,i){const r=Nl(e);let s=!1,n,h=!1;r.addEventListener("before",()=>{h=!0,n=new AbortController,s=!1,o.addEventListener("invalid",()=>{s=!0},{signal:n.signal})},{signal:i}),r.addEventListener("after",()=>{h=!1,n==null||n.abort(),!s&&t()},{signal:i}),e.addEventListener("submit",()=>{h||t()},{signal:i})}const ho=new WeakMap;function Nl(o){if(!ho.has(o)){const e=new EventTarget;ho.set(o,e);for(const t of["reportValidity","requestSubmit"]){const i=o[t];o[t]=function(){e.dispatchEvent(new Event("before"));const r=Reflect.apply(i,this,arguments);return e.dispatchEvent(new Event("after")),r}}}return ho.get(o)}function ql(o,e){if(!o)return!0;let t;for(const i of o.elements)if(i.matches(":invalid")){t=i;break}return t===e}/**
|
|
1152
1152
|
* @license
|
|
1153
1153
|
* Copyright 2023 Google LLC
|
|
1154
1154
|
* SPDX-License-Identifier: Apache-2.0
|
|
1155
|
-
*/class Vl extends
|
|
1155
|
+
*/class Vl extends Ei{computeValidity(e){return this.selectControl||(this.selectControl=document.createElement("select")),Cr(c`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}}/**
|
|
1156
1156
|
* @license
|
|
1157
1157
|
* Copyright 2023 Google LLC
|
|
1158
1158
|
* SPDX-License-Identifier: Apache-2.0
|
|
1159
|
-
*/function Ul(o){const e=[];for(let t=0;t<o.length;t++){const
|
|
1159
|
+
*/function Ul(o){const e=[];for(let t=0;t<o.length;t++){const i=o[t];i.selected&&e.push([i,t])}return e}/**
|
|
1160
1160
|
* @license
|
|
1161
1161
|
* Copyright 2023 Google LLC
|
|
1162
1162
|
* SPDX-License-Identifier: Apache-2.0
|
|
1163
|
-
*/var Na;const
|
|
1163
|
+
*/var Na;const Qi=Symbol("value"),jl=Ha(Wt(ft(Ne(y))));class P extends jl{get value(){return this[Qi]}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=Pa,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[Na]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=ve.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=""}[(Na=Qi,Ki)](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 ${L(this.getRenderClasses())}"
|
|
1166
1166
|
@focusout=${this.handleFocusout}>
|
|
@@ -1242,7 +1242,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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,
|
|
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=ve.NONE;break;case"End":this.defaultFocus=ve.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=ve.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[le.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&to(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Ul(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[Qi]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[Qi]="",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!==ve.NONE)return;const t=this.menu.items,i=(h=yt(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){qe(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"&&$l(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}[Ce](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){var e;(e=this.field)==null||e.click()}[rt](){return new Vl(()=>this)}[ot](){return this.field}}Z(P),P.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean})],P.prototype,"quick",void 0),d([l({type:Boolean})],P.prototype,"required",void 0),d([l({type:String,attribute:"error-text"})],P.prototype,"errorText",void 0),d([l()],P.prototype,"label",void 0),d([l({type:Boolean,attribute:"no-asterisk"})],P.prototype,"noAsterisk",void 0),d([l({type:String,attribute:"supporting-text"})],P.prototype,"supportingText",void 0),d([l({type:Boolean,reflect:!0})],P.prototype,"error",void 0),d([l({attribute:"menu-positioning"})],P.prototype,"menuPositioning",void 0),d([l({type:Boolean,attribute:"clamp-menu-width"})],P.prototype,"clampMenuWidth",void 0),d([l({type:Number,attribute:"typeahead-delay"})],P.prototype,"typeaheadDelay",void 0),d([l({type:Boolean,attribute:"has-leading-icon"})],P.prototype,"hasLeadingIcon",void 0),d([l({attribute:"display-text"})],P.prototype,"displayText",void 0),d([l({attribute:"menu-align"})],P.prototype,"menuAlign",void 0),d([l()],P.prototype,"value",null),d([l({type:Number,attribute:"selected-index"})],P.prototype,"selectedIndex",null),d([w()],P.prototype,"nativeError",void 0),d([w()],P.prototype,"nativeErrorText",void 0),d([w()],P.prototype,"focused",void 0),d([w()],P.prototype,"open",void 0),d([w()],P.prototype,"defaultFocus",void 0),d([k(".field")],P.prototype,"field",void 0),d([k("md-menu")],P.prototype,"menu",void 0),d([k("#label")],P.prototype,"labelEl",void 0),d([G({slot:"leading-icon",flatten:!0})],P.prototype,"leadingIcons",void 0);/**
|
|
1246
1246
|
* @license
|
|
1247
1247
|
* Copyright 2023 Google LLC
|
|
1248
1248
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1277,7 +1277,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1277
1277
|
* @license
|
|
1278
1278
|
* Copyright 2023 Google LLC
|
|
1279
1279
|
* SPDX-License-Identifier: Apache-2.0
|
|
1280
|
-
*/function Xl(){return new Event("request-selection",{bubbles:!0,composed:!0})}function Zl(){return new Event("request-deselection",{bubbles:!0,composed:!0})}class Jl{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText!==null?this.internalDisplayText:this.menuItemController.typeaheadText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.lastSelected=this.host.selected,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=
|
|
1280
|
+
*/function Xl(){return new Event("request-selection",{bubbles:!0,composed:!0})}function Zl(){return new Event("request-deselection",{bubbles:!0,composed:!0})}class Jl{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText!==null?this.internalDisplayText:this.menuItemController.typeaheadText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.lastSelected=this.host.selected,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=i=>{this.menuItemController.onKeydown(i)},this.menuItemController=new Da(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?"true":"false")}hostUpdated(){this.lastSelected!==this.host.selected&&!this.firstUpdate&&(this.host.selected?this.host.dispatchEvent(Xl()):this.host.dispatchEvent(Zl())),this.lastSelected=this.host.selected,this.firstUpdate=!1}}/**
|
|
1281
1281
|
* @license
|
|
1282
1282
|
* Copyright 2023 Google LLC
|
|
1283
1283
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1319,7 +1319,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1319
1319
|
<slot
|
|
1320
1320
|
name="trailing-supporting-text"
|
|
1321
1321
|
slot="trailing-supporting-text"></slot>
|
|
1322
|
-
`}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}Z(ee),ee.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean,reflect:!0})],ee.prototype,"disabled",void 0),d([l({type:Boolean,attribute:"md-menu-item",reflect:!0})],ee.prototype,"isMenuItem",void 0),d([l({type:Boolean})],ee.prototype,"selected",void 0),d([l()],ee.prototype,"value",void 0),d([k(".list-item")],ee.prototype,"listItemRoot",void 0),d([G({slot:"headline"})],ee.prototype,"headlineElements",void 0),d([G({slot:"supporting-text"})],ee.prototype,"supportingTextElements",void 0),d([
|
|
1322
|
+
`}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}Z(ee),ee.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Boolean,reflect:!0})],ee.prototype,"disabled",void 0),d([l({type:Boolean,attribute:"md-menu-item",reflect:!0})],ee.prototype,"isMenuItem",void 0),d([l({type:Boolean})],ee.prototype,"selected",void 0),d([l()],ee.prototype,"value",void 0),d([k(".list-item")],ee.prototype,"listItemRoot",void 0),d([G({slot:"headline"})],ee.prototype,"headlineElements",void 0),d([G({slot:"supporting-text"})],ee.prototype,"supportingTextElements",void 0),d([wr({slot:""})],ee.prototype,"defaultElements",void 0),d([l({attribute:"typeahead-text"})],ee.prototype,"typeaheadText",null),d([l({attribute:"display-text"})],ee.prototype,"displayText",null);/**
|
|
1323
1323
|
* @license
|
|
1324
1324
|
* Copyright 2023 Google LLC
|
|
1325
1325
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1336,7 +1336,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1336
1336
|
* @license
|
|
1337
1337
|
* Copyright 2023 Google LLC
|
|
1338
1338
|
* SPDX-License-Identifier: Apache-2.0
|
|
1339
|
-
*/const ec=ft(Ne(y));class A extends ec{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=>{!Ut(e)||!this.inputEnd||(this.focus(),
|
|
1339
|
+
*/const ec=ft(Ne(y));class A extends ec{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=>{!Ut(e)||!this.inputEnd||(this.focus(),xi(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=tc(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},g={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 ${L(n)}"
|
|
1341
1341
|
style=${nt(s)}>
|
|
1342
1342
|
${mo(this.range,()=>this.renderInput(v))}
|
|
@@ -1354,8 +1354,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1354
1354
|
${this.ticks?c`<div class="tickmarks"></div>`:u}
|
|
1355
1355
|
`}renderLabel(e){return c`<div class="label" aria-hidden="true">
|
|
1356
1356
|
<span class="labelContent" part="label">${e}</span>
|
|
1357
|
-
</div>`}renderHandle({start:e,hover:t,label:
|
|
1358
|
-
class="handle ${L({[n]:!0,hover:t,onTop:
|
|
1357
|
+
</div>`}renderHandle({start:e,hover:t,label:i}){const r=!this.disabled&&e===this.startOnTop,s=!this.disabled&&this.handlesOverlapping,n=e?"start":"end";return c`<div
|
|
1358
|
+
class="handle ${L({[n]:!0,hover:t,onTop:r,isOverlapping:s})}">
|
|
1359
1359
|
<md-focus-ring part="focus-ring" for=${n}></md-focus-ring>
|
|
1360
1360
|
<md-ripple
|
|
1361
1361
|
for=${n}
|
|
@@ -1364,8 +1364,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1364
1364
|
<div class="handleNub">
|
|
1365
1365
|
<md-elevation part="elevation"></md-elevation>
|
|
1366
1366
|
</div>
|
|
1367
|
-
${mo(this.labeled,()=>this.renderLabel(
|
|
1368
|
-
</div>`}renderInput({start:e,value:t,ariaLabel:
|
|
1367
|
+
${mo(this.labeled,()=>this.renderLabel(i))}
|
|
1368
|
+
</div>`}renderInput({start:e,value:t,ariaLabel:i,ariaValueText:r,ariaMin:s,ariaMax:n}){const h=e?"start":"end";return c`<input
|
|
1369
1369
|
type="range"
|
|
1370
1370
|
class="${L({start:e,end:!e})}"
|
|
1371
1371
|
@focus=${this.handleFocus}
|
|
@@ -1387,25 +1387,25 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1387
1387
|
.step=${String(this.step)}
|
|
1388
1388
|
.value=${String(t)}
|
|
1389
1389
|
.tabIndex=${e?1:0}
|
|
1390
|
-
aria-label=${
|
|
1391
|
-
aria-valuetext=${
|
|
1390
|
+
aria-label=${i||u}
|
|
1391
|
+
aria-valuetext=${r} />`}async toggleRippleHover(e,t){const i=await e;i&&(t?i.handlePointerenter(new PointerEvent("pointerenter",{isPrimary:!0,pointerId:this.ripplePointerId})):i.handlePointerleave(new PointerEvent("pointerleave",{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){const t=e.target,i=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type==="pointerdown",flipped:!1,target:t,fixed:i,values:new Map([[t,t.valueAsNumber],[i,i==null?void 0:i.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;const t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;const{target:t,values:i,flipped:r}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),r&&t.valueAsNumber!==i.get(t)&&t.dispatchEvent(new Event("change",{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&Va(e,this.handleStart),this.handleEndHover=!this.disabled&&Va(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains("start")}needsClamping(){if(!this.action)return!1;const{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber<t.valueAsNumber}isActionFlipped(){const{action:e}=this;if(!e)return!1;const{target:t,fixed:i,values:r}=e;return e.canFlip&&r.get(t)===r.get(i)&&this.needsClamping()&&(e.canFlip=!1,e.flipped=!0,e.target=i,e.fixed=t),e.flipped}flipAction(){if(!this.action)return!1;const{target:e,fixed:t,values:i}=this.action,r=e.valueAsNumber!==t.valueAsNumber;return e.valueAsNumber=t.valueAsNumber,t.valueAsNumber=i.get(t),r}clampAction(){if(!this.needsClamping()||!this.action)return!1;const{target:e,fixed:t}=this.action;return e.valueAsNumber=t.valueAsNumber,!0}handleInput(e){if(this.isRedispatchingEvent)return;let t=!1,i=!1;this.range&&(this.isActionFlipped()&&(t=!0,i=this.flipAction()),this.clampAction()&&(t=!0,i=!1));const r=e.target;this.updateOnTop(r),this.range?(this.valueStart=this.inputStart.valueAsNumber,this.valueEnd=this.inputEnd.valueAsNumber):this.value=this.inputEnd.valueAsNumber,t&&e.stopPropagation(),i&&(this.isRedispatchingEvent=!0,qe(r,e),this.isRedispatchingEvent=!1)}handleChange(e){const t=e.target,{target:i,values:r}=this.action??{};i&&i.valueAsNumber===r.get(t)||qe(this,e),this.finishAction(e)}[Ce](){if(this.range){const e=new FormData;return e.append(this.nameStart,String(this.valueStart)),e.append(this.nameEnd,String(this.valueEnd)),e}return String(this.value)}formResetCallback(){if(this.range){const t=this.getAttribute("value-start");this.valueStart=t!==null?Number(t):void 0;const i=this.getAttribute("value-end");this.valueEnd=i!==null?Number(i):void 0;return}const e=this.getAttribute("value");this.value=e!==null?Number(e):void 0}formStateRestoreCallback(e){if(Array.isArray(e)){const[[,t],[,i]]=e;this.valueStart=Number(t),this.valueEnd=Number(i),this.range=!0;return}this.value=Number(e),this.range=!1}}Z(A),A.shadowRootOptions={...y.shadowRootOptions,delegatesFocus:!0},d([l({type:Number})],A.prototype,"min",void 0),d([l({type:Number})],A.prototype,"max",void 0),d([l({type:Number})],A.prototype,"value",void 0),d([l({type:Number,attribute:"value-start"})],A.prototype,"valueStart",void 0),d([l({type:Number,attribute:"value-end"})],A.prototype,"valueEnd",void 0),d([l({attribute:"value-label"})],A.prototype,"valueLabel",void 0),d([l({attribute:"value-label-start"})],A.prototype,"valueLabelStart",void 0),d([l({attribute:"value-label-end"})],A.prototype,"valueLabelEnd",void 0),d([l({attribute:"aria-label-start"})],A.prototype,"ariaLabelStart",void 0),d([l({attribute:"aria-valuetext-start"})],A.prototype,"ariaValueTextStart",void 0),d([l({attribute:"aria-label-end"})],A.prototype,"ariaLabelEnd",void 0),d([l({attribute:"aria-valuetext-end"})],A.prototype,"ariaValueTextEnd",void 0),d([l({type:Number})],A.prototype,"step",void 0),d([l({type:Boolean})],A.prototype,"ticks",void 0),d([l({type:Boolean})],A.prototype,"labeled",void 0),d([l({type:Boolean})],A.prototype,"range",void 0),d([k("input.start")],A.prototype,"inputStart",void 0),d([k(".handle.start")],A.prototype,"handleStart",void 0),d([Wo("md-ripple.start")],A.prototype,"rippleStart",void 0),d([k("input.end")],A.prototype,"inputEnd",void 0),d([k(".handle.end")],A.prototype,"handleEnd",void 0),d([Wo("md-ripple.end")],A.prototype,"rippleEnd",void 0),d([w()],A.prototype,"handleStartHover",void 0),d([w()],A.prototype,"handleEndHover",void 0),d([w()],A.prototype,"startOnTop",void 0),d([w()],A.prototype,"handlesOverlapping",void 0),d([w()],A.prototype,"renderValueStart",void 0),d([w()],A.prototype,"renderValueEnd",void 0);function Va({x:o,y:e},t){if(!t)return!1;const{top:i,left:r,bottom:s,right:n}=t.getBoundingClientRect();return o>=r&&o<=n&&e>=i&&e<=s}function tc(o,e){if(!(o&&e))return!1;const t=o.getBoundingClientRect(),i=e.getBoundingClientRect();return!(t.top>i.bottom||t.right<i.left||t.bottom<i.top||t.left>i.right)}/**
|
|
1392
1392
|
* @license
|
|
1393
1393
|
* Copyright 2024 Google LLC
|
|
1394
1394
|
* SPDX-License-Identifier: Apache-2.0
|
|
1395
|
-
*/const rc=b`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);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);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)}
|
|
1395
|
+
*/const ic=b`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);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);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)}
|
|
1396
1396
|
`;/**
|
|
1397
1397
|
* @license
|
|
1398
1398
|
* Copyright 2023 Google LLC
|
|
1399
1399
|
* SPDX-License-Identifier: Apache-2.0
|
|
1400
|
-
*/let bo=class extends A{};bo.styles=[
|
|
1400
|
+
*/let bo=class extends A{};bo.styles=[ic,Ql],bo=d([f("md-slider")],bo);/**
|
|
1401
1401
|
* @license
|
|
1402
1402
|
* Copyright 2023 Google LLC
|
|
1403
1403
|
* SPDX-License-Identifier: Apache-2.0
|
|
1404
|
-
*/const Ua=Symbol("dispatchHooks");function
|
|
1404
|
+
*/const Ua=Symbol("dispatchHooks");function rc(o,e){const t=o[Ua];if(!t)throw new Error(`'${o.type}' event needs setupDispatchHooks().`);t.addEventListener("after",e)}const ja=new WeakMap;function oc(o,...e){let t=ja.get(o);t||(t=new Set,ja.set(o,t));for(const i of e){if(t.has(i))continue;let r=!1;o.addEventListener(i,s=>{if(r)return;s.stopImmediatePropagation();const n=Reflect.construct(s.constructor,[s.type,s]),h=new EventTarget;n[Ua]=h,r=!0;const p=o.dispatchEvent(n);r=!1,p||s.preventDefault(),h.dispatchEvent(new Event("after"))},{capture:!0}),t.add(i)}}/**
|
|
1405
1405
|
* @license
|
|
1406
1406
|
* Copyright 2021 Google LLC
|
|
1407
1407
|
* SPDX-License-Identifier: Apache-2.0
|
|
1408
|
-
*/const ac=Wt(ft(Ne(y)));class Ie extends ac{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",e=>{!Ut(e)||!this.input||(this.focus(),
|
|
1408
|
+
*/const ac=Wt(ft(Ne(y)));class Ie extends ac{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",e=>{!Ut(e)||!this.input||(this.focus(),xi(this.input))}),oc(this,"keydown"),this.addEventListener("keydown",e=>{rc(e,()=>{e.defaultPrevented||e.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return c`
|
|
1409
1409
|
<div class="switch ${L(this.getRenderClasses())}">
|
|
1410
1410
|
<input
|
|
1411
1411
|
id="switch"
|
|
@@ -1449,7 +1449,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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){qe(this,e)}[Ce](){return this.selected?this.value:null}[Gt](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(e){this.selected=e==="true"}[
|
|
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){qe(this,e)}[Ce](){return this.selected?this.value:null}[Gt](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(e){this.selected=e==="true"}[rt](){return new da(()=>({checked:this.selected,required:this.required}))}[ot](){return this.input}}Z(Ie),Ie.shadowRootOptions={mode:"open",delegatesFocus:!0},d([l({type:Boolean})],Ie.prototype,"selected",void 0),d([l({type:Boolean})],Ie.prototype,"icons",void 0),d([l({type:Boolean,attribute:"show-only-selected-icon"})],Ie.prototype,"showOnlySelectedIcon",void 0),d([l({type:Boolean})],Ie.prototype,"required",void 0),d([l()],Ie.prototype,"value",void 0),d([k("input")],Ie.prototype,"input",void 0);/**
|
|
1453
1453
|
* @license
|
|
1454
1454
|
* Copyright 2024 Google LLC
|
|
1455
1455
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1458,7 +1458,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1458
1458
|
* @license
|
|
1459
1459
|
* Copyright 2021 Google LLC
|
|
1460
1460
|
* SPDX-License-Identifier: Apache-2.0
|
|
1461
|
-
*/let
|
|
1461
|
+
*/let er=class extends Ie{};er.styles=[sc],er=d([f("md-switch")],er);const nc=Object.freeze(Object.defineProperty({__proto__:null,get MdSwitch(){return er}},Symbol.toStringTag,{value:"Module"}));/**
|
|
1462
1462
|
* @license
|
|
1463
1463
|
* Copyright 2023 Google LLC
|
|
1464
1464
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1477,7 +1477,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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()}[(Wa=xt,Ga)](e){if(!this[xt])return;this[xt].getAnimations().forEach(
|
|
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()}[(Wa=xt,Ga)](e){if(!this[xt])return;this[xt].getAnimations().forEach(i=>{i.cancel()});const t=this.getKeyframes(e);t!==null&&this[xt].animate(t,{duration:250,easing:pe.EMPHASIZED})}getKeyframes(e){var m;const t=cc();if(!this.active)return t?[{opacity:1},{transform:"none"}]:null;const i={},r=((m=e[xt])==null?void 0:m.getBoundingClientRect())??{},s=r.left,n=r.width,h=this[xt].getBoundingClientRect(),p=h.left,v=h.width,g=n/v;return!t&&s!==void 0&&p!==void 0&&!isNaN(g)?i.transform=`translateX(${(s-p).toFixed(4)}px) scaleX(${g.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"})],me.prototype,"isTab",void 0),d([l({type:Boolean,reflect:!0})],me.prototype,"active",void 0),d([l({type:Boolean})],me.prototype,"selected",null),d([l({type:Boolean,attribute:"has-icon"})],me.prototype,"hasIcon",void 0),d([l({type:Boolean,attribute:"icon-only"})],me.prototype,"iconOnly",void 0),d([k(".indicator")],me.prototype,Wa,void 0),d([w()],me.prototype,"fullWidthIndicator",void 0),d([wr({flatten:!0})],me.prototype,"assignedDefaultNodes",void 0),d([G({slot:"icon",flatten:!0})],me.prototype,"assignedIcons",void 0);function cc(){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
|
|
@@ -1512,14 +1512,14 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1512
1512
|
* @license
|
|
1513
1513
|
* Copyright 2023 Google LLC
|
|
1514
1514
|
* SPDX-License-Identifier: Apache-2.0
|
|
1515
|
-
*/class wt 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
|
|
1515
|
+
*/class wt 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,g=Math.min(p,Math.max(v,s)),m=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:m,top:0,left:g})}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||!uc(t)||t.active)&&this.activateTab(t)}activateTab(e){const{tabs:t}=this,
|
|
1522
|
+
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!uc(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[Ga](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 g=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:m}=this;if(!m)h=g?0:n.length-1;else{const _=this.tabs.indexOf(m);h=g?_+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([G({flatten:!0,selector:"[md-tab]"})],wt.prototype,"tabs",void 0),d([l({type:Number,attribute:"active-tab-index"})],wt.prototype,"activeTabIndex",null),d([l({type:Boolean,attribute:"auto-activate"})],wt.prototype,"autoActivate",void 0),d([k(".tabs")],wt.prototype,"tabsScrollerElement",void 0),d([k("slot")],wt.prototype,"slotElement",void 0);function uc(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
|
|
@@ -1541,7 +1541,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1541
1541
|
* @license
|
|
1542
1542
|
* Copyright 2020 Google LLC
|
|
1543
1543
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1544
|
-
*/const Xa=
|
|
1544
|
+
*/const Xa=zr(class extends Tr{constructor(o){if(super(o),o.type!==He.PROPERTY&&o.type!==He.ATTRIBUTE&&o.type!==He.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!bc(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[e]){if(e===ne||e===u)return e;const t=o.element,i=o.name;if(o.type===He.PROPERTY){if(e===t[i])return ne}else if(o.type===He.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return ne}else if(o.type===He.ATTRIBUTE&&t.getAttribute(i)===e+"")return ne;return gc(o),e}});/**
|
|
1545
1545
|
* @license
|
|
1546
1546
|
* Copyright 2022 Google LLC
|
|
1547
1547
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1549,11 +1549,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1549
1549
|
* @license
|
|
1550
1550
|
* Copyright 2023 Google LLC
|
|
1551
1551
|
* SPDX-License-Identifier: Apache-2.0
|
|
1552
|
-
*/class _c extends
|
|
1552
|
+
*/class _c extends Ei{computeValidity({state:e,renderedControl:t}){let i=t;ei(e)&&!i?(i=this.inputControl||document.createElement("input"),this.inputControl=i):i||(i=this.textAreaControl||document.createElement("textarea"),this.textAreaControl=i);const r=ei(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!ei(e)||!ei(t)?i:i&&e.pattern===t.pattern&&e.min===t.min&&e.max===t.max&&e.step===t.step}copy({state:e}){return{state:ei(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 ei(o){return o.type!=="textarea"}/**
|
|
1553
1553
|
* @license
|
|
1554
1554
|
* Copyright 2021 Google LLC
|
|
1555
1555
|
* SPDX-License-Identifier: Apache-2.0
|
|
1556
|
-
*/const xc=Ha(Wt(ft(Ne(y))));class $ extends xc{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,
|
|
1556
|
+
*/const xc=Ha(Wt(ft(Ne(y))));class $ extends xc{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 ${L(e)}">
|
|
1558
1558
|
${this.renderField()}
|
|
1559
1559
|
</span>
|
|
@@ -1586,17 +1586,17 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1586
1586
|
<span class="icon trailing" slot="end">
|
|
1587
1587
|
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
1588
1588
|
</span>
|
|
1589
|
-
`}renderInputOrTextarea(){const e={direction:this.textDirection},t=this.ariaLabel||this.label||u,
|
|
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
1592
|
style=${nt(e)}
|
|
1593
1593
|
aria-describedby="description"
|
|
1594
1594
|
aria-invalid=${this.hasError}
|
|
1595
1595
|
aria-label=${t}
|
|
1596
|
-
autocomplete=${
|
|
1596
|
+
autocomplete=${i||u}
|
|
1597
1597
|
name=${this.name||u}
|
|
1598
1598
|
?disabled=${this.disabled}
|
|
1599
|
-
maxlength=${
|
|
1599
|
+
maxlength=${r?this.maxLength:u}
|
|
1600
1600
|
minlength=${s?this.minLength:u}
|
|
1601
1601
|
placeholder=${this.placeholder||u}
|
|
1602
1602
|
?readonly=${this.readOnly}
|
|
@@ -1618,12 +1618,12 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1618
1618
|
aria-describedby="description"
|
|
1619
1619
|
aria-invalid=${this.hasError}
|
|
1620
1620
|
aria-label=${t}
|
|
1621
|
-
autocomplete=${
|
|
1621
|
+
autocomplete=${i||u}
|
|
1622
1622
|
name=${this.name||u}
|
|
1623
1623
|
?disabled=${this.disabled}
|
|
1624
1624
|
inputmode=${p||u}
|
|
1625
1625
|
max=${this.max||u}
|
|
1626
|
-
maxlength=${
|
|
1626
|
+
maxlength=${r?this.maxLength:u}
|
|
1627
1627
|
min=${this.min||u}
|
|
1628
1628
|
minlength=${s?this.minLength:u}
|
|
1629
1629
|
pattern=${this.pattern||u}
|
|
@@ -1641,7 +1641,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=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="${L({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){qe(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}[Ce](){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="${L({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){qe(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}[Ce](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[rt](){return new _c(()=>({state:this,renderedControl:this.inputOrTextarea}))}[ot](){return this.inputOrTextarea}[Ki](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())}}Z($),$.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:yc})],$.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([G({slot:"leading-icon"})],$.prototype,"leadingIcons",void 0),d([G({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 Es;function d(o,e,t,r){var i=argument
|
|
|
1667
1667
|
* @license
|
|
1668
1668
|
* Copyright 2021 Google LLC
|
|
1669
1669
|
* SPDX-License-Identifier: Apache-2.0
|
|
1670
|
-
*/let go=class extends kc{constructor(){super(...arguments),this.fieldTag=J`md-outlined-field`}};go.styles=[Za,Sc],go=d([f("md-outlined-text-field")],go);var $c=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,X=(o,e,t,
|
|
1670
|
+
*/let go=class extends kc{constructor(){super(...arguments),this.fieldTag=J`md-outlined-field`}};go.styles=[Za,Sc],go=d([f("md-outlined-text-field")],go);var $c=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,X=(o,e,t,i)=>{for(var r=i>1?void 0:i?Cc(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&&$c(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(()=>Y),a.ScbAccordionItem._mdIconLoaded=!0),a.ScbAccordionItem._mdRippleLoaded||(await Promise.resolve().then(()=>_i),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}
|
|
@@ -1686,7 +1686,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1686
1686
|
>
|
|
1687
1687
|
<md-ripple></md-ripple>
|
|
1688
1688
|
|
|
1689
|
-
${this.leading?c`<div class="leading">${
|
|
1689
|
+
${this.leading?c`<div class="leading">${i}</div>`:u}
|
|
1690
1690
|
|
|
1691
1691
|
<div class="texts">
|
|
1692
1692
|
${this.overline?c`<div class="overline">${this.overline}</div>`:u}
|
|
@@ -1835,11 +1835,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1835
1835
|
@media (prefers-reduced-motion: reduce) {
|
|
1836
1836
|
md-ripple { display: none; }
|
|
1837
1837
|
}
|
|
1838
|
-
`],X([l({type:Boolean,reflect:!0})],a.ScbAccordionItem.prototype,"open",2),X([l({type:String,reflect:!0})],a.ScbAccordionItem.prototype,"title",2),X([l({type:String})],a.ScbAccordionItem.prototype,"content",2),X([l({type:String,attribute:"overline"})],a.ScbAccordionItem.prototype,"overline",2),X([l({type:String,attribute:"supporting-text"})],a.ScbAccordionItem.prototype,"supportingText",2),X([l({type:Boolean})],a.ScbAccordionItem.prototype,"leading",2),X([l({type:String,attribute:"leading-variant",reflect:!0})],a.ScbAccordionItem.prototype,"leadingVariant",2),X([l({type:String,attribute:"leading-icon"})],a.ScbAccordionItem.prototype,"leadingIcon",2),X([l({type:String,attribute:"img-href-image",reflect:!0})],a.ScbAccordionItem.prototype,"imgHrefImage",2),X([l({type:String,attribute:"avatar-label"})],a.ScbAccordionItem.prototype,"avatarLabel",2),X([l({type:String,attribute:"avatar-alt"})],a.ScbAccordionItem.prototype,"avatarAlt",2),X([l({type:String,attribute:"avatar-variant"})],a.ScbAccordionItem.prototype,"avatarVariant",2),X([l({type:String,attribute:"avatar-src"})],a.ScbAccordionItem.prototype,"avatarSrc",2),X([l({type:Number,reflect:!0})],a.ScbAccordionItem.prototype,"density",2),a.ScbAccordionItem=X([f("scb-accordion-item")],a.ScbAccordionItem);var Ec=Object.defineProperty,Ac=Object.getOwnPropertyDescriptor,Ja=(o,e,t,
|
|
1838
|
+
`],X([l({type:Boolean,reflect:!0})],a.ScbAccordionItem.prototype,"open",2),X([l({type:String,reflect:!0})],a.ScbAccordionItem.prototype,"title",2),X([l({type:String})],a.ScbAccordionItem.prototype,"content",2),X([l({type:String,attribute:"overline"})],a.ScbAccordionItem.prototype,"overline",2),X([l({type:String,attribute:"supporting-text"})],a.ScbAccordionItem.prototype,"supportingText",2),X([l({type:Boolean})],a.ScbAccordionItem.prototype,"leading",2),X([l({type:String,attribute:"leading-variant",reflect:!0})],a.ScbAccordionItem.prototype,"leadingVariant",2),X([l({type:String,attribute:"leading-icon"})],a.ScbAccordionItem.prototype,"leadingIcon",2),X([l({type:String,attribute:"img-href-image",reflect:!0})],a.ScbAccordionItem.prototype,"imgHrefImage",2),X([l({type:String,attribute:"avatar-label"})],a.ScbAccordionItem.prototype,"avatarLabel",2),X([l({type:String,attribute:"avatar-alt"})],a.ScbAccordionItem.prototype,"avatarAlt",2),X([l({type:String,attribute:"avatar-variant"})],a.ScbAccordionItem.prototype,"avatarVariant",2),X([l({type:String,attribute:"avatar-src"})],a.ScbAccordionItem.prototype,"avatarSrc",2),X([l({type:Number,reflect:!0})],a.ScbAccordionItem.prototype,"density",2),a.ScbAccordionItem=X([f("scb-accordion-item")],a.ScbAccordionItem);var Ec=Object.defineProperty,Ac=Object.getOwnPropertyDescriptor,Ja=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ac(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&&Ec(e,t,r),r};a.ScbAccordion=class extends y{constructor(){super(...arguments),this.detached=!1}render(){return c`
|
|
1839
1839
|
<div class="scb-accordion" ?detached=${this.detached}>
|
|
1840
1840
|
<slot></slot>
|
|
1841
1841
|
</div>
|
|
1842
|
-
`}},Ja([l({type:Boolean,reflect:!0})],a.ScbAccordion.prototype,"detached",2),a.ScbAccordion=Ja([f("scb-accordion")],a.ScbAccordion);var Ic=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,ge=(o,e,t,
|
|
1842
|
+
`}},Ja([l({type:Boolean,reflect:!0})],a.ScbAccordion.prototype,"detached",2),a.ScbAccordion=Ja([f("scb-accordion")],a.ScbAccordion);var Ic=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,ge=(o,e,t,i)=>{for(var r=i>1?void 0:i?zc(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&&Ic(e,t,r),r};a.ScbButton=class extends y{constructor(){super(...arguments),this.variant="filled",this.type="button",this.label="Button",this.trailingIcon=!1,this.icon="",this.disabled=!1,this.href="",this.target="",this.rel="",this.__loadedButtons=new Set,this.__iconLoaded=!1}async __ensureDepsLoaded(){if(!this.__loadedButtons.has(this.variant)){switch(this.variant){case"filled":await Promise.resolve().then(()=>xn);break;case"outlined":await Promise.resolve().then(()=>En);break;case"filled-tonal":await Promise.resolve().then(()=>kn);break;case"text":await Promise.resolve().then(()=>zn);break}this.__loadedButtons.add(this.variant)}this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>Y),this.__iconLoaded=!0)}__getMdHost(){return this.renderRoot.querySelector("md-filled-button, md-outlined-button, md-filled-tonal-button, md-text-button")}__getInnerNativeButton(e){var t;return((t=e==null?void 0:e.shadowRoot)==null?void 0:t.querySelector("button"))??null}__syncAriaToInner(){var v;const e=this.__getMdHost(),t=this.__getInnerNativeButton(e);if(!e||!t)return;const i=(this.getAttribute("aria-label")||"").trim(),r=(e.getAttribute("aria-label")||"").trim(),s=this.label.trim()===""?(this.icon||"").trim():"",n=i||r||s;n?t.setAttribute("aria-label",n):t.removeAttribute("aria-label");const h=this.getAttribute("aria-controls");h!==null?t.setAttribute("aria-controls",h):t.removeAttribute("aria-controls");const p=this.getAttribute("aria-expanded");p!==null?t.setAttribute("aria-expanded",p):t.removeAttribute("aria-expanded"),e.removeAttribute("aria-label"),e.removeAttribute("aria-controls"),e.removeAttribute("aria-expanded"),this.removeAttribute("aria-expanded"),(v=this.__ariaObserver)==null||v.disconnect(),this.__ariaObserver=new MutationObserver(g=>{const m=this.__getMdHost(),_=this.__getInnerNativeButton(m);if(!(!m||!_)){for(const x of g){if(x.type!=="attributes"||!x.attributeName)continue;const S=x.attributeName,C=this.getAttribute(S);if(S==="aria-label"){const z=(m.getAttribute("aria-label")||"").trim(),T=(C||z||(this.label.trim()===""?(this.icon||"").trim():"")).trim();T?_.setAttribute("aria-label",T):_.removeAttribute("aria-label"),m.removeAttribute("aria-label")}else(S==="aria-controls"||S==="aria-expanded")&&(C===null?_.removeAttribute(S):_.setAttribute(S,C),S==="aria-expanded"&&this.removeAttribute("aria-expanded"))}m.removeAttribute("aria-label"),m.removeAttribute("aria-controls"),m.removeAttribute("aria-expanded")}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-label","aria-controls","aria-expanded"]})}firstUpdated(){(this.type==="submit"||this.type==="reset")&&this.addEventListener("click",()=>{if(!this.disabled){const e=this.closest("form");e&&(this.type==="submit"&&e.requestSubmit(),this.type==="reset"&&e.reset())}}),this.__ensureDepsLoaded(),this.__syncAriaToInner()}updated(e){(e.has("variant")||e.has("icon")&&this.icon)&&this.__ensureDepsLoaded(),e.has("variant")&&this.__syncAriaToInner()}disconnectedCallback(){var e;(e=this.__ariaObserver)==null||e.disconnect(),super.disconnectedCallback()}static get styles(){return b`
|
|
1843
1843
|
/* Gör hosten stretchbar i t.ex. flex/grid */
|
|
1844
1844
|
:host {
|
|
1845
1845
|
display: inline-flex;
|
|
@@ -1898,13 +1898,13 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1898
1898
|
}
|
|
1899
1899
|
}
|
|
1900
1900
|
*/
|
|
1901
|
-
`}render(){var s;const e=!!((s=this.icon)!=null&&s.trim()),t=e?c`<md-icon slot="icon">${this.icon}</md-icon>`:u,
|
|
1901
|
+
`}render(){var s;const e=!!((s=this.icon)!=null&&s.trim()),t=e?c`<md-icon slot="icon">${this.icon}</md-icon>`:u,i=u,r=this.label.trim()===""?this.icon:void 0;switch(this.variant){case"filled":return c`
|
|
1902
1902
|
<md-filled-button
|
|
1903
1903
|
type=${this.type}
|
|
1904
|
-
variant=${
|
|
1904
|
+
variant=${i}
|
|
1905
1905
|
?trailing-icon=${this.trailingIcon}
|
|
1906
1906
|
?disabled=${this.disabled}
|
|
1907
|
-
aria-label=${
|
|
1907
|
+
aria-label=${r}
|
|
1908
1908
|
href=${this.href||u}
|
|
1909
1909
|
target=${this.target||u}
|
|
1910
1910
|
rel=${this.rel||u}
|
|
@@ -1916,10 +1916,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1916
1916
|
`;case"outlined":return c`
|
|
1917
1917
|
<md-outlined-button
|
|
1918
1918
|
type=${this.type}
|
|
1919
|
-
variant=${
|
|
1919
|
+
variant=${i}
|
|
1920
1920
|
?trailing-icon=${this.trailingIcon}
|
|
1921
1921
|
?disabled=${this.disabled}
|
|
1922
|
-
aria-label=${
|
|
1922
|
+
aria-label=${r}
|
|
1923
1923
|
href=${this.href||u}
|
|
1924
1924
|
target=${this.target||u}
|
|
1925
1925
|
rel=${this.rel||u}
|
|
@@ -1931,10 +1931,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1931
1931
|
`;case"filled-tonal":return c`
|
|
1932
1932
|
<md-filled-tonal-button
|
|
1933
1933
|
type=${this.type}
|
|
1934
|
-
variant=${
|
|
1934
|
+
variant=${i}
|
|
1935
1935
|
?trailing-icon=${this.trailingIcon}
|
|
1936
1936
|
?disabled=${this.disabled}
|
|
1937
|
-
aria-label=${
|
|
1937
|
+
aria-label=${r}
|
|
1938
1938
|
href=${this.href||u}
|
|
1939
1939
|
target=${this.target||u}
|
|
1940
1940
|
rel=${this.rel||u}
|
|
@@ -1946,10 +1946,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1946
1946
|
`;case"text":return c`
|
|
1947
1947
|
<md-text-button
|
|
1948
1948
|
type=${this.type}
|
|
1949
|
-
variant=${
|
|
1949
|
+
variant=${i}
|
|
1950
1950
|
?trailing-icon=${this.trailingIcon}
|
|
1951
1951
|
?disabled=${this.disabled}
|
|
1952
|
-
aria-label=${
|
|
1952
|
+
aria-label=${r}
|
|
1953
1953
|
href=${this.href||u}
|
|
1954
1954
|
target=${this.target||u}
|
|
1955
1955
|
rel=${this.rel||u}
|
|
@@ -1958,7 +1958,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1958
1958
|
${this.label}
|
|
1959
1959
|
${e&&this.trailingIcon?t:u}
|
|
1960
1960
|
</md-text-button>
|
|
1961
|
-
`;default:return c``}}},ge([l({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),ge([l({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),ge([l({type:String})],a.ScbButton.prototype,"label",2),ge([l({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),ge([l({type:String})],a.ScbButton.prototype,"icon",2),ge([l({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),ge([l({type:String})],a.ScbButton.prototype,"href",2),ge([l({type:String})],a.ScbButton.prototype,"target",2),ge([l({type:String})],a.ScbButton.prototype,"rel",2),a.ScbButton=ge([f("scb-button")],a.ScbButton);const Tc=Object.freeze(Object.defineProperty({__proto__:null,get ScbButton(){return a.ScbButton}},Symbol.toStringTag,{value:"Module"}));var Oc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,ye=(o,e,t,
|
|
1961
|
+
`;default:return c``}}},ge([l({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),ge([l({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),ge([l({type:String})],a.ScbButton.prototype,"label",2),ge([l({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),ge([l({type:String})],a.ScbButton.prototype,"icon",2),ge([l({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),ge([l({type:String})],a.ScbButton.prototype,"href",2),ge([l({type:String})],a.ScbButton.prototype,"target",2),ge([l({type:String})],a.ScbButton.prototype,"rel",2),a.ScbButton=ge([f("scb-button")],a.ScbButton);const Tc=Object.freeze(Object.defineProperty({__proto__:null,get ScbButton(){return a.ScbButton}},Symbol.toStringTag,{value:"Module"}));var Oc=Object.defineProperty,Pc=Object.getOwnPropertyDescriptor,ye=(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&&Oc(e,t,r),r};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=1,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this.handleEventElement=e=>{var s;const r=(s=e.currentTarget.parentElement.shadowRoot)==null?void 0:s.querySelector(".scb-tooltip");r&&(e.type==="mouseenter"?(this._hoverActive=!0,this.openTooltip(r)):e.type==="mouseleave"?(this._hoverActive=!1,this._clickActive||(this.closeTooltip(r),this.addHidden(r))):e.type==="click"&&(this._clickActive=!this._clickActive,this._clickActive?this.openTooltip(r):this._hoverActive||(this.closeTooltip(r),this.addHidden(r))))}}render(){const e=this.arrow?c`<svg class="scb-tooltip-arrow" xmlns="http://www.w3.org/2000/svg" width="13" height="6" viewBox="0 0 13 6" fill="none">
|
|
1962
1962
|
<path d="M6.5 6L0.5 0H12.5L6.5 6Z" fill="var(--md-sys-color-inverse-surface, #0F0865)" />
|
|
1963
1963
|
</svg>`:u;return this.variant==="rich"?c`
|
|
1964
1964
|
<div class="scb-tooltip hidden" role="tooltip" aria-label=${this.label||this.supportingtext}>
|
|
@@ -1979,7 +1979,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
1979
1979
|
${e}
|
|
1980
1980
|
</div>
|
|
1981
1981
|
<slot> </slot>
|
|
1982
|
-
`}firstUpdated(){this.setAnchorName(),this.setDelay(),this.setPosition(),this.setVariant(),this.setOffset(),this.handleEventlistnerClick(),this.handleEventlistnerHover()}setVariant(){this.hasAttribute("variant")&&this.style.setProperty("--variant",this.variant)}setAnchorName(){const e=Array.from({length:15},()=>"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]).join("");this.style.setProperty("--anchorname","--"+e)}setDelay(){this.hasAttribute("delay")&&this.style.setProperty("--delay",this.delay+"s")}setPosition(){this.hasAttribute("position")&&(this.style.setProperty("--position",this.position),this.style.setProperty("--oposition",this.position))}setDefaultPosition(){if(this.hasAttribute("position")){let e=getComputedStyle(this).getPropertyValue("--oposition");if(getComputedStyle(this).getPropertyValue("--position")!==e){this.style.setProperty("--position",e),this.setAttribute("position",e);return}}}setOffset(){let e=getComputedStyle(this).getPropertyValue("--position");this.hasAttribute("offset")&&this.hasAttribute("position")&&(e==="top"?this.style.setProperty("--offset","-"+(this.offset+8)+"px"):this.style.setProperty("--offset",this.offset+8+"px"))}handleEventlistnerClick(){const e=this.children[0];e&&e.hasAttribute("scb-tooltip-button")&&(this.getAttribute("trigger")==="click"||this.getAttribute("trigger")==="hover-click")&&e.addEventListener("click",this.handleEventElement)}handleEventlistnerHover(){const e=this.children[0];e&&e.hasAttribute("scb-tooltip-button")&&(this.getAttribute("trigger")==="hover"||this.getAttribute("trigger")==="hover-click")&&(e.addEventListener("mouseenter",this.handleEventElement),e.addEventListener("mouseleave",this.handleEventElement))}addHidden(e){const
|
|
1982
|
+
`}firstUpdated(){this.setAnchorName(),this.setDelay(),this.setPosition(),this.setVariant(),this.setOffset(),this.handleEventlistnerClick(),this.handleEventlistnerHover()}setVariant(){this.hasAttribute("variant")&&this.style.setProperty("--variant",this.variant)}setAnchorName(){const e=Array.from({length:15},()=>"abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)]).join("");this.style.setProperty("--anchorname","--"+e)}setDelay(){this.hasAttribute("delay")&&this.style.setProperty("--delay",this.delay+"s")}setPosition(){this.hasAttribute("position")&&(this.style.setProperty("--position",this.position),this.style.setProperty("--oposition",this.position))}setDefaultPosition(){if(this.hasAttribute("position")){let e=getComputedStyle(this).getPropertyValue("--oposition");if(getComputedStyle(this).getPropertyValue("--position")!==e){this.style.setProperty("--position",e),this.setAttribute("position",e);return}}}setOffset(){let e=getComputedStyle(this).getPropertyValue("--position");this.hasAttribute("offset")&&this.hasAttribute("position")&&(e==="top"?this.style.setProperty("--offset","-"+(this.offset+8)+"px"):this.style.setProperty("--offset",this.offset+8+"px"))}handleEventlistnerClick(){const e=this.children[0];e&&e.hasAttribute("scb-tooltip-button")&&(this.getAttribute("trigger")==="click"||this.getAttribute("trigger")==="hover-click")&&e.addEventListener("click",this.handleEventElement)}handleEventlistnerHover(){const e=this.children[0];e&&e.hasAttribute("scb-tooltip-button")&&(this.getAttribute("trigger")==="hover"||this.getAttribute("trigger")==="hover-click")&&(e.addEventListener("mouseenter",this.handleEventElement),e.addEventListener("mouseleave",this.handleEventElement))}addHidden(e){const i=(parseFloat(getComputedStyle(this).getPropertyValue("--delay"))||1)*1e3;this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},i)}openTooltip(e){this.setDefaultPosition(),this.adjustTooltipPosition(e),e.classList.remove("hidden"),this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null)}closeTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true")}adjustTooltipPosition(e){e&&(this.closeTooltip(e),setTimeout(()=>{const t=e.getBoundingClientRect();t.right>window.innerWidth&&(this.style.setProperty("--position","left"),this.setAttribute("position","left")),t.left<0&&(this.style.setProperty("--position","right"),this.setAttribute("position","right")),t.top<0&&(this.style.setProperty("--position","bottom"),this.setAttribute("position","bottom")),t.bottom>window.innerHeight&&(this.style.setProperty("--position","top"),this.setAttribute("position","top")),this.setOffset(),e.setAttribute("open",""),e.setAttribute("aria-hidden","false")},10))}},a.ScbTooltip.styles=[b`
|
|
1983
1983
|
--anchorname: randomString;
|
|
1984
1984
|
--position: top;
|
|
1985
1985
|
--variant: plain;
|
|
@@ -2172,52 +2172,52 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2172
2172
|
opacity:1;
|
|
2173
2173
|
visibility: visible;
|
|
2174
2174
|
}
|
|
2175
|
-
`],ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"variant",2),ye([l({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"arrow",2),ye([l({type:String,attribute:"supporting-text"})],a.ScbTooltip.prototype,"supportingtext",2),ye([l({type:String})],a.ScbTooltip.prototype,"label",2),ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"trigger",2),ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"position",2),ye([l({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"open",2),ye([l({type:Number,reflect:!0})],a.ScbTooltip.prototype,"delay",2),ye([l({type:Number,reflect:!0})],a.ScbTooltip.prototype,"offset",2),a.ScbTooltip=ye([f("scb-tooltip")],a.ScbTooltip);var Lc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,_e=(o,e,t,
|
|
2175
|
+
`],ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"variant",2),ye([l({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"arrow",2),ye([l({type:String,attribute:"supporting-text"})],a.ScbTooltip.prototype,"supportingtext",2),ye([l({type:String})],a.ScbTooltip.prototype,"label",2),ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"trigger",2),ye([l({type:String,reflect:!0})],a.ScbTooltip.prototype,"position",2),ye([l({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"open",2),ye([l({type:Number,reflect:!0})],a.ScbTooltip.prototype,"delay",2),ye([l({type:Number,reflect:!0})],a.ScbTooltip.prototype,"offset",2),a.ScbTooltip=ye([f("scb-tooltip")],a.ScbTooltip);var Lc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,_e=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dc(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.ScbIconButton=class extends y{constructor(){super(...arguments),this.ariaLabel="",this.tooltip="",this.variant="standard",this.icon="home",this.toggle=!1,this.selected=!1,this.toggleofficon="add",this.toggleonicon="remove",this.disabled=!1,this.__loadedVariants=new Set,this.__iconLoaded=!1,this.__onInnerChange=()=>{const e=this.__getMdHost(),t=!!(e!=null&&e.selected);this.toggle&&(this.selected=t),this.dispatchEvent(new CustomEvent("change",{detail:{selected:t},bubbles:!0,composed:!0}))}}async firstUpdated(){await this.__ensureDepsLoaded(),await this.updateComplete,this.__attachChangeListener(),this.__syncAria()}updated(e){super.updated(e),e.has("variant")||e.has("toggle")||e.has("icon")||e.has("ariaLabel")||e.has("selected")||e.has("disabled")||e.has("tooltip")?this.__ensureDepsLoaded().then(()=>queueMicrotask(()=>{this.__attachChangeListener(),this.__syncAria()})):queueMicrotask(()=>this.__attachChangeListener())}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),(t=(e=this.__lastBtn)==null?void 0:e.removeEventListener)==null||t.call(e,"change",this.__onInnerChange),this.__lastBtn=null,(i=this.__ariaObserver)==null||i.disconnect()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"filled":await Promise.resolve().then(()=>sl);break;case"outlined":await Promise.resolve().then(()=>pl);break;case"filled-tonal":await Promise.resolve().then(()=>ll);break;default:await Promise.resolve().then(()=>dl);break}this.__loadedVariants.add(this.variant)}this.__iconLoaded||(await Promise.resolve().then(()=>Y),this.__iconLoaded=!0)}__getMdHost(){const e=this.renderRoot.querySelector("md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button");if(e)return e;const t=this.renderRoot.querySelector("scb-tooltip");if(t){const i=t.querySelector("md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button");if(i)return i}return null}__getInnerButton(e){const t=e==null?void 0:e.shadowRoot;return t?t.querySelector("button")||t.querySelector('[role="button"]'):null}__stripNativeTitles(e){if(!e)return;e.removeAttribute("title");const t=this.__getInnerButton(e);t==null||t.removeAttribute("title");const i=e.shadowRoot;i&&i.querySelectorAll("[title]").forEach(r=>r.removeAttribute("title"))}__syncAria(){var n;const e=this.__getMdHost();if(!e)return;const t=this.__getInnerButton(e),i=(this.ariaLabel||this.getAttribute("aria-label")||"").trim()||this.icon.trim(),r=this.getAttribute("aria-controls"),s=this.getAttribute("aria-expanded");t&&(i?t.setAttribute("aria-label",i):t.removeAttribute("aria-label"),r!==null?t.setAttribute("aria-controls",r):t.removeAttribute("aria-controls"),s!==null?t.setAttribute("aria-expanded",s):t.removeAttribute("aria-expanded"),t.removeAttribute("title")),e.removeAttribute("aria-label"),e.removeAttribute("aria-controls"),e.removeAttribute("aria-expanded"),e.removeAttribute("title"),this.hasAttribute("aria-label")&&this.removeAttribute("aria-label"),this.hasAttribute("aria-controls")&&this.removeAttribute("aria-controls"),this.hasAttribute("aria-expanded")&&this.removeAttribute("aria-expanded"),this.__stripNativeTitles(e),(n=this.__ariaObserver)==null||n.disconnect(),this.__ariaObserver=new MutationObserver(()=>{const h=this.__getMdHost(),p=this.__getInnerButton(h);if(!h||!p)return;const v=(this.ariaLabel||this.getAttribute("aria-label")||"").trim()||this.icon.trim(),g=this.getAttribute("aria-controls"),m=this.getAttribute("aria-expanded");v?p.setAttribute("aria-label",v):p.removeAttribute("aria-label"),g!==null?p.setAttribute("aria-controls",g):p.removeAttribute("aria-controls"),m!==null?p.setAttribute("aria-expanded",m):p.removeAttribute("aria-expanded"),this.__stripNativeTitles(h),h.removeAttribute("aria-label"),h.removeAttribute("aria-controls"),h.removeAttribute("aria-expanded"),h.removeAttribute("title"),this.hasAttribute("aria-label")&&this.removeAttribute("aria-label"),this.hasAttribute("aria-controls")&&this.removeAttribute("aria-controls"),this.hasAttribute("aria-expanded")&&this.removeAttribute("aria-expanded")}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-label","aria-controls","aria-expanded"]})}__attachChangeListener(){var t,i;const e=this.__getMdHost();e&&e!==this.__lastBtn&&((i=(t=this.__lastBtn)==null?void 0:t.removeEventListener)==null||i.call(t,"change",this.__onInnerChange),e.addEventListener("change",this.__onInnerChange),this.__lastBtn=e),this.toggle&&e&&"selected"in e&&(e.selected=this.selected),this.__stripNativeTitles(e||null)}__renderMd(e=!1){const t=!!e,i=c`
|
|
2176
2176
|
<md-icon aria-hidden="true">${this.toggleofficon}</md-icon>
|
|
2177
2177
|
<md-icon slot="selected" aria-hidden="true">${this.toggleonicon}</md-icon>
|
|
2178
|
-
`,
|
|
2178
|
+
`,r=c`<md-icon aria-hidden="true">${this.icon}</md-icon>`;if(this.toggle)switch(this.variant){case"filled":return c`
|
|
2179
2179
|
<md-filled-icon-button
|
|
2180
2180
|
?scb-tooltip-button=${t}
|
|
2181
2181
|
toggle
|
|
2182
2182
|
?selected=${this.selected}
|
|
2183
2183
|
?disabled=${this.disabled}
|
|
2184
|
-
>${
|
|
2184
|
+
>${i}</md-filled-icon-button>
|
|
2185
2185
|
`;case"outlined":return c`
|
|
2186
2186
|
<md-outlined-icon-button
|
|
2187
2187
|
?scb-tooltip-button=${t}
|
|
2188
2188
|
toggle
|
|
2189
2189
|
?selected=${this.selected}
|
|
2190
2190
|
?disabled=${this.disabled}
|
|
2191
|
-
>${
|
|
2191
|
+
>${i}</md-outlined-icon-button>
|
|
2192
2192
|
`;case"filled-tonal":return c`
|
|
2193
2193
|
<md-filled-tonal-icon-button
|
|
2194
2194
|
?scb-tooltip-button=${t}
|
|
2195
2195
|
toggle
|
|
2196
2196
|
?selected=${this.selected}
|
|
2197
2197
|
?disabled=${this.disabled}
|
|
2198
|
-
>${
|
|
2198
|
+
>${i}</md-filled-tonal-icon-button>
|
|
2199
2199
|
`;default:return c`
|
|
2200
2200
|
<md-icon-button
|
|
2201
2201
|
?scb-tooltip-button=${t}
|
|
2202
2202
|
toggle
|
|
2203
2203
|
?selected=${this.selected}
|
|
2204
2204
|
?disabled=${this.disabled}
|
|
2205
|
-
>${
|
|
2205
|
+
>${i}</md-icon-button>
|
|
2206
2206
|
`}switch(this.variant){case"filled":return c`
|
|
2207
2207
|
<md-filled-icon-button ?scb-tooltip-button=${t} ?disabled=${this.disabled}>
|
|
2208
|
-
${
|
|
2208
|
+
${r}
|
|
2209
2209
|
</md-filled-icon-button>
|
|
2210
2210
|
`;case"outlined":return c`
|
|
2211
2211
|
<md-outlined-icon-button ?scb-tooltip-button=${t} ?disabled=${this.disabled}>
|
|
2212
|
-
${
|
|
2212
|
+
${r}
|
|
2213
2213
|
</md-outlined-icon-button>
|
|
2214
2214
|
`;case"filled-tonal":return c`
|
|
2215
2215
|
<md-filled-tonal-icon-button ?scb-tooltip-button=${t} ?disabled=${this.disabled}>
|
|
2216
|
-
${
|
|
2216
|
+
${r}
|
|
2217
2217
|
</md-filled-tonal-icon-button>
|
|
2218
2218
|
`;default:return c`
|
|
2219
2219
|
<md-icon-button ?scb-tooltip-button=${t} ?disabled=${this.disabled}>
|
|
2220
|
-
${
|
|
2220
|
+
${r}
|
|
2221
2221
|
</md-icon-button>
|
|
2222
2222
|
`}}render(){const e=(this.tooltip||this.ariaLabel||"").trim();return e?c`
|
|
2223
2223
|
<scb-tooltip
|
|
@@ -2230,7 +2230,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2230
2230
|
>
|
|
2231
2231
|
${this.__renderMd(!0)}
|
|
2232
2232
|
</scb-tooltip>
|
|
2233
|
-
`:this.__renderMd(!1)}},a.ScbIconButton.styles=b``,_e([l({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),_e([l({type:String})],a.ScbIconButton.prototype,"tooltip",2),_e([l({type:String})],a.ScbIconButton.prototype,"variant",2),_e([l({type:String})],a.ScbIconButton.prototype,"icon",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),_e([l({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),_e([l({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),a.ScbIconButton=_e([f("scb-icon-button")],a.ScbIconButton);const Qa=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return a.ScbIconButton}},Symbol.toStringTag,{value:"Module"}));var Rc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,es=o=>{throw TypeError(o)},B=(o,e,t,
|
|
2233
|
+
`:this.__renderMd(!1)}},a.ScbIconButton.styles=b``,_e([l({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),_e([l({type:String})],a.ScbIconButton.prototype,"tooltip",2),_e([l({type:String})],a.ScbIconButton.prototype,"variant",2),_e([l({type:String})],a.ScbIconButton.prototype,"icon",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),_e([l({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),_e([l({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),_e([l({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),a.ScbIconButton=_e([f("scb-icon-button")],a.ScbIconButton);const Qa=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return a.ScbIconButton}},Symbol.toStringTag,{value:"Module"}));var Rc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,es=o=>{throw TypeError(o)},B=(o,e,t,i)=>{for(var r=i>1?void 0:i?Bc(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&&Rc(e,t,r),r},yo=(o,e,t)=>e.has(o)||es("Cannot "+t),tr=(o,e,t)=>(yo(o,e,"read from private field"),t?t.call(o):e.get(o)),ti=(o,e,t)=>e.has(o)?es("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),_o=(o,e,t,i)=>(yo(o,e,"write to private field"),e.set(o,t),t),ts=(o,e,t)=>(yo(o,e,"access private method"),t),ir,rr,or,ar,xo,wo;a.ScbListItem=class extends y{constructor(){super(...arguments),ti(this,ar),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,ti(this,ir,!1),ti(this,rr,!1),ti(this,or,!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)},ti(this,wo,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`
|
|
2234
2234
|
:host {
|
|
2235
2235
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
2236
2236
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -2334,7 +2334,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2334
2334
|
}
|
|
2335
2335
|
|
|
2336
2336
|
.link { text-decoration: none; color: inherit; display: contents; }
|
|
2337
|
-
`}async firstUpdated(){await ts(this,
|
|
2337
|
+
`}async firstUpdated(){await ts(this,ar,xo).call(this),this.addEventListener("keydown",tr(this,wo))}updated(e){super.updated(e),(e.has("leading")||e.has("leadingVariant")||e.has("trailing")||e.has("trailingVariant")||e.has("type")||e.has("target"))&&ts(this,ar,xo).call(this)}render(){const e=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?c`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:u;case"avatar":return c`
|
|
2338
2338
|
<div class="leading">
|
|
2339
2339
|
<scb-avatar
|
|
2340
2340
|
label=${this.avatarLabel}
|
|
@@ -2345,10 +2345,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2345
2345
|
variant=${this.avatarVariant}
|
|
2346
2346
|
></scb-avatar>
|
|
2347
2347
|
</div>
|
|
2348
|
-
`;case"image":return this.imgHrefImage?c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:u;default:return u}})():u,t=this.href||this.itemHref||"",
|
|
2348
|
+
`;case"image":return this.imgHrefImage?c`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:u;default:return u}})():u,t=this.href||this.itemHref||"",i=this.target==="_blank"?"open_in_new":"chevron_right",r=this.label?`Välj ${this.label}`:"Välj",s=this.label?`Växla ${this.label}`:"Växla";let n=u;if(this.trailing)if(this.trailingVariant==="icon"){const v=this.trailingIcon||(this.type==="link"?i:"");n=v?c`<div class="trailing"><md-icon>${v}</md-icon></div>`:u}else this.trailingVariant==="checkbox"?n=c`
|
|
2349
2349
|
<div class="trailing">
|
|
2350
2350
|
<scb-checkbox
|
|
2351
|
-
aria-label=${
|
|
2351
|
+
aria-label=${r}
|
|
2352
2352
|
@click=${v=>v.stopPropagation()}
|
|
2353
2353
|
></scb-checkbox>
|
|
2354
2354
|
</div>`:this.trailingVariant==="switch"&&(n=c`
|
|
@@ -2357,7 +2357,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2357
2357
|
aria-label=${s}
|
|
2358
2358
|
@click=${v=>v.stopPropagation()}
|
|
2359
2359
|
></scb-switch>
|
|
2360
|
-
</div>`);else this.type==="link"&&(n=c`<div class="trailing"><md-icon>${
|
|
2360
|
+
</div>`);else this.type==="link"&&(n=c`<div class="trailing"><md-icon>${i}</md-icon></div>`);const h=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":u,p=c`
|
|
2361
2361
|
${e}
|
|
2362
2362
|
<div class="texts">
|
|
2363
2363
|
${this.overline?c`<div class="overline">${this.overline}</div>`:u}
|
|
@@ -2372,11 +2372,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2372
2372
|
</div>
|
|
2373
2373
|
|
|
2374
2374
|
<md-focus-ring></md-focus-ring>
|
|
2375
|
-
`}},
|
|
2375
|
+
`}},ir=new WeakMap,rr=new WeakMap,or=new WeakMap,ar=new WeakSet,xo=async function(){const o=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||o)&&!tr(this,ir)&&(await Promise.resolve().then(()=>Y),_o(this,ir,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!tr(this,rr)&&(await Promise.resolve().then(()=>ns),_o(this,rr,!0)),this.trailing&&this.trailingVariant==="switch"&&!tr(this,or)&&(await Promise.resolve().then(()=>$s),_o(this,or,!0))},wo=new WeakMap,B([l({type:String,reflect:!0,attribute:"type"})],a.ScbListItem.prototype,"type",2),B([l({type:String})],a.ScbListItem.prototype,"href",2),B([l({type:String,attribute:"item-href"})],a.ScbListItem.prototype,"itemHref",2),B([l({type:String,attribute:"target"})],a.ScbListItem.prototype,"target",2),B([l({type:Boolean,attribute:"disabled"})],a.ScbListItem.prototype,"disabled",2),B([l({type:String,reflect:!0})],a.ScbListItem.prototype,"label",2),B([l({type:String,attribute:"supporting-text"})],a.ScbListItem.prototype,"supportingText",2),B([l({type:String,attribute:"overline"})],a.ScbListItem.prototype,"overline",2),B([l({type:Boolean})],a.ScbListItem.prototype,"leading",2),B([l({type:String,attribute:"leading-variant",reflect:!0})],a.ScbListItem.prototype,"leadingVariant",2),B([l({type:String,attribute:"leading-icon"})],a.ScbListItem.prototype,"leadingIcon",2),B([l({type:String,attribute:"avatar-label"})],a.ScbListItem.prototype,"avatarLabel",2),B([l({type:String,attribute:"avatar-alt"})],a.ScbListItem.prototype,"avatarAlt",2),B([l({type:String,attribute:"avatar-variant"})],a.ScbListItem.prototype,"avatarVariant",2),B([l({type:String,attribute:"avatar-src"})],a.ScbListItem.prototype,"avatarSrc",2),B([l({type:String,reflect:!0,attribute:"img-href-image"})],a.ScbListItem.prototype,"imgHrefImage",2),B([l({type:Boolean})],a.ScbListItem.prototype,"trailing",2),B([l({type:String,attribute:"trailing-variant",reflect:!0})],a.ScbListItem.prototype,"trailingVariant",2),B([l({type:String,attribute:"trailing-icon"})],a.ScbListItem.prototype,"trailingIcon",2),B([l({type:Number,reflect:!0})],a.ScbListItem.prototype,"density",2),B([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbListItem.prototype,"noDivider",2),a.ScbListItem=B([f("scb-list-item")],a.ScbListItem);var Mc=Object.defineProperty,Fc=Object.getOwnPropertyDescriptor,is=o=>{throw TypeError(o)},So=(o,e,t,i)=>{for(var r=i>1?void 0:i?Fc(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&&Mc(e,t,r),r},rs=(o,e,t)=>e.has(o)||is("Cannot "+t),Hc=(o,e,t)=>(rs(o,e,"read from private field"),e.get(o)),Nc=(o,e,t)=>e.has(o)?is("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),qc=(o,e,t,i)=>(rs(o,e,"write to private field"),e.set(o,t),t),sr;a.ScbList=class extends y{constructor(){super(...arguments),Nc(this,sr,!1),this.noDivider=!1,this._onSlotChange=()=>this._setupItems()}async firstUpdated(){Hc(this,sr)||(await Promise.resolve().then(()=>gl),qc(this,sr,!0)),this._setupItems()}_getItems(){var t;return(((t=this._slotEl)==null?void 0:t.assignedElements({flatten:!0}))??[]).filter(i=>i instanceof HTMLElement)}_setupItems(){var i;this._getItems().forEach((r,s)=>{r.hasAttribute("role")||r.setAttribute("role","listitem"),r.setAttribute("tabindex",s===0?"0":"-1")});const t=(i=this.renderRoot)==null?void 0:i.querySelector("md-list");t&&!t.hasAttribute("data-kbd")&&(t.setAttribute("data-kbd","true"),t.addEventListener("keydown",r=>this._onKeyDown(r)))}_onKeyDown(e){const t=this._getItems();if(!t.length)return;const i=t.findIndex(s=>s.getAttribute("tabindex")==="0"),r=s=>{const n=(s%t.length+t.length)%t.length;t.forEach(p=>p.setAttribute("tabindex","-1"));const h=t[n];h.setAttribute("tabindex","0"),h.focus()};switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),r(i<0?0:i+1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),r(i<0?0:i-1);break;case"Home":e.preventDefault(),r(0);break;case"End":e.preventDefault(),r(t.length-1);break}}render(){return c`
|
|
2376
2376
|
<md-list role="list" @slotchange=${this._onSlotChange}>
|
|
2377
2377
|
<slot></slot>
|
|
2378
2378
|
</md-list>
|
|
2379
|
-
`}},
|
|
2379
|
+
`}},sr=new WeakMap,a.ScbList.styles=[b`
|
|
2380
2380
|
:host {
|
|
2381
2381
|
display: block;
|
|
2382
2382
|
--scb-list-bg: transparent;
|
|
@@ -2396,7 +2396,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2396
2396
|
:host([no-divider]) ::slotted(scb-list-item) {
|
|
2397
2397
|
--stroke-border: 0px;
|
|
2398
2398
|
}
|
|
2399
|
-
`],So([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),So([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=So([f("scb-list")],a.ScbList);var Vc=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,St=(o,e,t,
|
|
2399
|
+
`],So([l({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),So([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=So([f("scb-list")],a.ScbList);var Vc=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,St=(o,e,t,i)=>{for(var r=i>1?void 0:i?Uc(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&&Vc(e,t,r),r};let jc=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-${++jc}`,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`
|
|
2400
2400
|
<div class="ripple-wrapper">
|
|
2401
2401
|
<md-icon class="leading">${e?"arrow_back":"search"}</md-icon>
|
|
2402
2402
|
|
|
@@ -2430,7 +2430,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2430
2430
|
</scb-list>
|
|
2431
2431
|
<md-focus-ring id="optionRing" class="option-ring"></md-focus-ring>
|
|
2432
2432
|
`:u}
|
|
2433
|
-
`}submit(){const e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this.dispatchEvent(new CustomEvent("scb-search-submit",{detail:t,bubbles:!0,composed:!0}))}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName("scb-list-item")).some(t=>!t.hasAttribute("hidden")&&t.style.display!=="none")}_onSlotChange(){this._filterSuggestions(this.value)}_onInput(e){const t=e.target;this.value=t.value,this._filterSuggestions(this.value),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y(),this.dispatchEvent(new CustomEvent("scb-search-input",{detail:{value:this.value},bubbles:!0,composed:!0}))}_onFocus(){this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._updateComboboxA11y(),this.requestUpdate()}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this.requestUpdate()},100)}_updateInputRingVisibility(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".ripple-wrapper");e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute("data-kb-focus","true"):e.removeAttribute("data-kb-focus"))}_handleKey(e){if(!this._inputEl())return;const
|
|
2433
|
+
`}submit(){const e=this._getActiveItem(),t={value:this.value};e&&(t.active=this._itemPayload(e)),this.dispatchEvent(new CustomEvent("scb-search-submit",{detail:t,bubbles:!0,composed:!0}))}get _hasSuggestions(){return this._visibleSuggestions>=0?this._visibleSuggestions>0:Array.from(this.getElementsByTagName("scb-list-item")).some(t=>!t.hasAttribute("hidden")&&t.style.display!=="none")}_onSlotChange(){this._filterSuggestions(this.value)}_onInput(e){const t=e.target;this.value=t.value,this._filterSuggestions(this.value),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y(),this.dispatchEvent(new CustomEvent("scb-search-input",{detail:{value:this.value},bubbles:!0,composed:!0}))}_onFocus(){this._inputFocused=!0,this._updateInputRingVisibility(),this._filterSuggestions(this.value),this._updateComboboxA11y(),this.requestUpdate()}_onBlur(){setTimeout(()=>{this._inputFocused=!1,this._activeIndex=-1,this._kbMode=!1,this._updateInputRingVisibility(),this._updateComboboxA11y(),this._hideOptionRing(),this.requestUpdate()},100)}_updateInputRingVisibility(){var t;const e=(t=this.renderRoot)==null?void 0:t.querySelector(".ripple-wrapper");e&&(this._inputFocused&&this._kbShouldShowRing?e.setAttribute("data-kb-focus","true"):e.removeAttribute("data-kb-focus"))}_handleKey(e){if(!this._inputEl())return;const i=this._getVisibleItems(),r=(this.value??"").trim().length>0,s=this._inputFocused&&r&&i.length>0,n=e.key,h=e.keyCode,p=n==="ArrowDown"||n==="Down"||h===40,v=n==="ArrowUp"||n==="Up"||h===38,g=n==="Home"||h===36,m=n==="End"||h===35,_=n==="Enter"||h===13,x=n==="Escape"||n==="Esc"||h===27;if(p){if(!s)return;e.preventDefault(),this._kbMode=!0,this._moveActive(i,1);return}if(v){if(!s)return;e.preventDefault(),this._kbMode=!0,this._moveActive(i,-1);return}if(g){if(!s)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=i.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(m){if(!s)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=i.length?i.length-1:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(_){if(!s){this.submit();return}e.preventDefault();const S=this._getActiveItem();if(S){const C=S.getAttribute("label")||"";this.value=C,this.dispatchEvent(new CustomEvent("scb-search-submit",{detail:{value:this.value,active:this._itemPayload(S)},bubbles:!0,composed:!0})),this._visibleSuggestions=0,this._activeIndex=-1,this._kbMode=!1,this._hideOptionRing(),this.requestUpdate()}else this.submit();return}if(x){e.preventDefault(),this._clearInput();return}}_clearInput(){this.value="",this._activeIndex=-1,this._kbMode=!1;const e=this._inputEl();e==null||e.focus(),e&&(e.value=""),this._filterSuggestions(""),this._updateComboboxA11y(),this._hideOptionRing(),this.dispatchEvent(new CustomEvent("scb-search-clear",{bubbles:!0,composed:!0}))}_filterSuggestions(e){const t=(e??"").trim().toLowerCase(),i=Array.from(this.querySelectorAll("scb-list-item"));let r=0;for(const s of i){const n=(s.getAttribute("label")||"").toLowerCase(),h=(s.getAttribute("supporting-text")||"").toLowerCase(),p=`${n} ${h}`.trim();t!==""&&p.includes(t)?(s.removeAttribute("hidden"),r++):s.setAttribute("hidden",""),this._ensureOptionA11y(s)}this._visibleSuggestions=r,this._activeIndex>=r&&(this._activeIndex=-1),this._updateComboboxA11y(),this.requestUpdate()}_inputEl(){var e;return((e=this.renderRoot)==null?void 0:e.querySelector("#searchInput"))??null}_listEl(){var e;return((e=this.renderRoot)==null?void 0:e.querySelector("scb-list.suggestion-list"))??null}_ringEl(){var e;return((e=this.renderRoot)==null?void 0:e.querySelector("#optionRing"))??null}_getVisibleItems(){return Array.from(this.querySelectorAll("scb-list-item")).filter(t=>!t.hasAttribute("hidden")&&t.style.display!=="none")}_getActiveItem(){const e=this._getVisibleItems();return this._activeIndex<0||this._activeIndex>=e.length?null:e[this._activeIndex]??null}_moveActive(e,t){if(!e.length){this._activeIndex=-1,this._updateComboboxA11y(),this._hideOptionRing();return}let i=this._activeIndex+t;this._activeIndex===-1?i=t>0?0:e.length-1:(i<0&&(i=0),i>=e.length&&(i=e.length-1)),this._activeIndex=i,this._updateComboboxA11y(),this._scrollActiveIntoView()}_scrollActiveIntoView(){const e=this._getActiveItem();e&&e.scrollIntoView({block:"nearest"})}_itemPayload(e){return{label:e.getAttribute("label")||"",supportingText:e.getAttribute("supporting-text")||"",href:e.getAttribute("href")||"",type:e.getAttribute("type")||"",id:e.id||""}}_ensureListboxA11y(){const e=this._listEl();e&&(e.id||(e.id=this._listboxId),e.setAttribute("role","listbox"),e.setAttribute("aria-label","Sökförslag")),Array.from(this.querySelectorAll("scb-list-item")).forEach(i=>this._ensureOptionA11y(i))}_ensureOptionA11y(e){e.id||(e.id=`${this._listboxId}-opt-${Math.random().toString(36).slice(2,8)}`),e.setAttribute("role","option"),e.setAttribute("tabindex","-1")}_updateComboboxA11y(){const e=this._inputEl();if(!e)return;const t=this._getVisibleItems(),i=(this.value??"").trim().length>0,r=this._inputFocused&&i&&t.length>0;e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-controls",this._listboxId),e.setAttribute("aria-expanded",String(r));const s=r?this._getActiveItem():null;s!=null&&s.id?e.setAttribute("aria-activedescendant",s.id):e.removeAttribute("aria-activedescendant"),this._kbMode&&s&&r?this._positionOptionRing(s):this._hideOptionRing()}_positionOptionRing(e){const t=this._ringEl(),i=this._listEl();if(!t||!i)return;const r=this.getBoundingClientRect(),s=e.getBoundingClientRect(),n=s.top-r.top,h=s.left-r.left,p=s.width,v=s.height;t.style.top=`${n}px`,t.style.left=`${h}px`,t.style.width=`${p}px`,t.style.height=`${v}px`,t.setAttribute("data-show","true")}_hideOptionRing(){const e=this._ringEl();e&&e.removeAttribute("data-show")}_onWindowResize(){const e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)}_attachListScrollListener(){const e=this._listEl();!e||this._listWithHandler===e||(this._detachListScrollListener(),e.addEventListener("scroll",this._listScrollHandler,{passive:!0}),this._listWithHandler=e)}_detachListScrollListener(){this._listWithHandler&&(this._listWithHandler.removeEventListener("scroll",this._listScrollHandler),this._listWithHandler=void 0)}},a.ScbSearch.styles=b`
|
|
2434
2434
|
:host {
|
|
2435
2435
|
display: flex;
|
|
2436
2436
|
flex-direction: column;
|
|
@@ -2617,16 +2617,16 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2617
2617
|
@media (prefers-color-scheme: dark) {
|
|
2618
2618
|
:host { color: var(--md-sys-color-on-surface); }
|
|
2619
2619
|
}
|
|
2620
|
-
`,St([l({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),St([l({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),St([l({type:String})],a.ScbSearch.prototype,"value",2),St([l({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),St([l({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=St([f("scb-search")],a.ScbSearch);const Wc=Object.freeze(Object.defineProperty({__proto__:null,get ScbSearch(){return a.ScbSearch}},Symbol.toStringTag,{value:"Module"}));var Gc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,xe=(o,e,t,
|
|
2620
|
+
`,St([l({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),St([l({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),St([l({type:String})],a.ScbSearch.prototype,"value",2),St([l({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),St([l({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=St([f("scb-search")],a.ScbSearch);const Wc=Object.freeze(Object.defineProperty({__proto__:null,get ScbSearch(){return a.ScbSearch}},Symbol.toStringTag,{value:"Module"}));var Gc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,xe=(o,e,t,i)=>{for(var r=i>1?void 0:i?Kc(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&&Gc(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(()=>Y)}_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}
|
|
2621
2621
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
2622
2622
|
${this._hasIconSlot?u:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
2623
|
-
`,
|
|
2623
|
+
`,r=t?c`<img class="photo" part="image" src=${this.src} alt=${this.alt}
|
|
2624
2624
|
@load=${this._onImgLoad} @error=${this._onImgError} />`:c`
|
|
2625
2625
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
2626
2626
|
${this._hasIconSlot?u:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
2627
2627
|
`;return c`
|
|
2628
2628
|
<div class="container" part="container" role="img" aria-label=${e??u}>
|
|
2629
|
-
${this.variant==="icon"?r
|
|
2629
|
+
${this.variant==="icon"?i:r}
|
|
2630
2630
|
</div>
|
|
2631
2631
|
`}},a.ScbAvatar.styles=b`
|
|
2632
2632
|
:host {
|
|
@@ -2714,7 +2714,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2714
2714
|
outline-offset: 2px;
|
|
2715
2715
|
border-radius: var(--_radius);
|
|
2716
2716
|
}
|
|
2717
|
-
`,xe([l({type:String})],a.ScbAvatar.prototype,"src",2),xe([l({type:String})],a.ScbAvatar.prototype,"alt",2),xe([l({type:String})],a.ScbAvatar.prototype,"label",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),xe([l({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),xe([w()],a.ScbAvatar.prototype,"_imgError",2),xe([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=xe([f("scb-avatar")],a.ScbAvatar);var Yc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,
|
|
2717
|
+
`,xe([l({type:String})],a.ScbAvatar.prototype,"src",2),xe([l({type:String})],a.ScbAvatar.prototype,"alt",2),xe([l({type:String})],a.ScbAvatar.prototype,"label",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),xe([l({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),xe([l({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),xe([w()],a.ScbAvatar.prototype,"_imgError",2),xe([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=xe([f("scb-avatar")],a.ScbAvatar);var Yc=Object.defineProperty,Xc=Object.getOwnPropertyDescriptor,ii=(o,e,t,i)=>{for(var r=i>1?void 0:i?Xc(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&&Yc(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`
|
|
2718
2718
|
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
|
|
2719
2719
|
<div class="leading">
|
|
2720
2720
|
<slot name="leading"></slot>
|
|
@@ -2778,6 +2778,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2778
2778
|
`}}},a.ScbAppBar.styles=[b`
|
|
2779
2779
|
:host {
|
|
2780
2780
|
display: block;
|
|
2781
|
+
font-family: var(--brand, Inter);
|
|
2781
2782
|
position: relative;
|
|
2782
2783
|
container-type: inline-size;
|
|
2783
2784
|
container-name: app-bar-container;
|
|
@@ -2871,13 +2872,13 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2871
2872
|
display: flex;
|
|
2872
2873
|
align-items: center;
|
|
2873
2874
|
}
|
|
2874
|
-
`],
|
|
2875
|
+
`],ii([l({type:String})],a.ScbAppBar.prototype,"title",2),ii([l({type:String})],a.ScbAppBar.prototype,"type",2),ii([l({type:String,reflect:!0})],a.ScbAppBar.prototype,"position",2),ii([l({type:String,attribute:"search-supporting-text"})],a.ScbAppBar.prototype,"searchSupportingText",2),a.ScbAppBar=ii([f("scb-app-bar")],a.ScbAppBar);var Zc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,ze=(o,e,t,i)=>{for(var r=i>1?void 0:i?Jc(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&&Zc(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`
|
|
2875
2876
|
<div class="badge-content">
|
|
2876
2877
|
<slot></slot>
|
|
2877
2878
|
<div
|
|
2878
|
-
class="badge ${t} ${
|
|
2879
|
+
class="badge ${t} ${i}"
|
|
2879
2880
|
role="status"
|
|
2880
|
-
aria-label="${this.variant==="dot",
|
|
2881
|
+
aria-label="${this.variant==="dot",r}"
|
|
2881
2882
|
aria-hidden="${this.variant==="dot"&&!this.label?"true":"false"}">${this.variant==="dot"?"":e}</div>
|
|
2882
2883
|
</div>
|
|
2883
2884
|
`}},a.ScbBadge.styles=b`
|
|
@@ -2946,16 +2947,16 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
2946
2947
|
* @license
|
|
2947
2948
|
* Copyright 2018 Google LLC
|
|
2948
2949
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2949
|
-
*/const
|
|
2950
|
+
*/const ri=o=>o??u;var Qc=Object.defineProperty,ed=Object.getOwnPropertyDescriptor,os=o=>{throw TypeError(o)},ct=(o,e,t,i)=>{for(var r=i>1?void 0:i?ed(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&&Qc(e,t,r),r},td=(o,e,t)=>e.has(o)||os("Cannot "+t),id=(o,e,t)=>(td(o,e,"read from private field"),t?t.call(o):e.get(o)),rd=(o,e,t)=>e.has(o)?os("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ko;a.ScbLink=class extends y{constructor(){super(...arguments),this.href="",this.disabled=!1,this.ariaLabel="",rd(this,ko,e=>{this.disabled&&(e.preventDefault(),e.stopPropagation())})}render(){const e=this.target==="_blank"&&!this.rel?"noopener noreferrer":this.rel;return c`
|
|
2950
2951
|
<a
|
|
2951
2952
|
part="anchor"
|
|
2952
|
-
href=${
|
|
2953
|
-
target=${
|
|
2954
|
-
rel=${
|
|
2955
|
-
download=${
|
|
2953
|
+
href=${ri(this.disabled?void 0:this.href||void 0)}
|
|
2954
|
+
target=${ri(this.target)}
|
|
2955
|
+
rel=${ri(e)}
|
|
2956
|
+
download=${ri(this.download)}
|
|
2956
2957
|
aria-disabled=${this.disabled?"true":"false"}
|
|
2957
|
-
aria-label=${
|
|
2958
|
-
@click=${
|
|
2958
|
+
aria-label=${ri(this.ariaLabel||void 0)}
|
|
2959
|
+
@click=${id(this,ko)}
|
|
2959
2960
|
><slot></slot></a>
|
|
2960
2961
|
|
|
2961
2962
|
<md-focus-ring></md-focus-ring>
|
|
@@ -3002,7 +3003,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3002
3003
|
text-decoration: none;
|
|
3003
3004
|
cursor: default;
|
|
3004
3005
|
}
|
|
3005
|
-
`,ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"href",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"target",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"rel",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"download",2),ct([l({type:Boolean,reflect:!0})],a.ScbLink.prototype,"disabled",2),ct([l({type:String,attribute:"aria-label"})],a.ScbLink.prototype,"ariaLabel",2),a.ScbLink=ct([f("scb-link")],a.ScbLink);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,
|
|
3006
|
+
`,ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"href",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"target",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"rel",2),ct([l({type:String,reflect:!0})],a.ScbLink.prototype,"download",2),ct([l({type:Boolean,reflect:!0})],a.ScbLink.prototype,"disabled",2),ct([l({type:String,attribute:"aria-label"})],a.ScbLink.prototype,"ariaLabel",2),a.ScbLink=ct([f("scb-link")],a.ScbLink);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,nr=(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.SCBBreadcrumbItem=class extends y{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return b`
|
|
3006
3007
|
.breadcrumb-separator {
|
|
3007
3008
|
margin: var(--spacing-0) var(--spacing-3);
|
|
3008
3009
|
color: var(--md-sys-color-on-surface);
|
|
@@ -3010,7 +3011,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3010
3011
|
`}render(){switch(!0){case this.isCurrent:return c`<span class="breadcrumb-current">${this.label}</span>`;default:return c`
|
|
3011
3012
|
<scb-link href="${this.href}">${this.label}</scb-link>
|
|
3012
3013
|
<span class="breadcrumb-separator">/</span>
|
|
3013
|
-
`}}},
|
|
3014
|
+
`}}},nr([l({type:String})],a.SCBBreadcrumbItem.prototype,"label",2),nr([l({type:Boolean,attribute:"is-current"})],a.SCBBreadcrumbItem.prototype,"isCurrent",2),nr([l({type:String,attribute:"item-href"})],a.SCBBreadcrumbItem.prototype,"href",2),a.SCBBreadcrumbItem=nr([f("scb-breadcrumb-item")],a.SCBBreadcrumbItem);var sd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,as=(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.SCBBreadcrumb=class extends y{constructor(){super(...arguments),this.showAll=!1}static get styles(){return b`
|
|
3014
3015
|
.scb-breadcrumb {
|
|
3015
3016
|
display: flex;
|
|
3016
3017
|
align-items: center;
|
|
@@ -3064,20 +3065,20 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3064
3065
|
transform: translateY(0);
|
|
3065
3066
|
}
|
|
3066
3067
|
}
|
|
3067
|
-
`}_onEllipsisClick(){this.showAll?this.showAll=!1:(this.showAll=!0,this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((r
|
|
3068
|
+
`}_onEllipsisClick(){this.showAll?this.showAll=!1:(this.showAll=!0,this.updateComplete.then(()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((i,r)=>{i.classList.add("breadcrumb-animate"),i.style.animationDelay=`${r*60}ms`}),setTimeout(()=>{e.forEach(i=>{i.classList.remove("breadcrumb-animate"),i.style.animationDelay=""})},600))}))}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>{this.requestUpdate()}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._observer)==null||e.disconnect()}render(){let e=[];this.children.length||(e=Array.from(this.shadowRoot?this.shadowRoot.querySelectorAll("scb-breadcrumb-item"):[])),e.length||(e=Array.from(this.children).filter(i=>i.tagName.toLowerCase()==="scb-breadcrumb-item")),e.length>0&&e[e.length-1].setAttribute("is-current","true");const t=e.length>6&&!this.showAll;return c`
|
|
3068
3069
|
<div class="scb-breadcrumb ${t?"collapsed":"expanded"}">
|
|
3069
|
-
${t?e.map((r
|
|
3070
|
+
${t?e.map((i,r)=>r===3?c`<span
|
|
3070
3071
|
class="ellipsis"
|
|
3071
3072
|
aria-label="Visa alla"
|
|
3072
3073
|
role="button"
|
|
3073
3074
|
tabindex="0"
|
|
3074
3075
|
@click=${this._onEllipsisClick}
|
|
3075
3076
|
@keydown=${s=>{(s.key==="Enter"||s.key===" ")&&this._onEllipsisClick()}}
|
|
3076
|
-
><md-icon><md-focus-ring></md-focus-ring>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${
|
|
3077
|
+
><md-icon><md-focus-ring></md-focus-ring>more_horiz</md-icon></span><span class="breadcrumb-separator">/</span>${i}`:c`${i}`):e.map(i=>i)}
|
|
3077
3078
|
</div>
|
|
3078
|
-
`}},as([l({type:Boolean})],a.SCBBreadcrumb.prototype,"showAll",2),a.SCBBreadcrumb=as([f("scb-breadcrumb")],a.SCBBreadcrumb);var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,H=(o,e,t,
|
|
3079
|
+
`}},as([l({type:Boolean})],a.SCBBreadcrumb.prototype,"showAll",2),a.SCBBreadcrumb=as([f("scb-breadcrumb")],a.SCBBreadcrumb);var ld=Object.defineProperty,cd=Object.getOwnPropertyDescriptor,H=(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};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(()=>Y),a.ScbCalendarCard.__iconLoaded=!0),a.ScbCalendarCard.__rippleLoaded||(await Promise.resolve().then(()=>_i),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`
|
|
3079
3080
|
<div
|
|
3080
|
-
class="calendar-card ${t} ${
|
|
3081
|
+
class="calendar-card ${t} ${i} ${e}"
|
|
3081
3082
|
role="${this.cardHref?"link":"group"}"
|
|
3082
3083
|
aria-label="${this.title||"Kalenderkort"}"
|
|
3083
3084
|
tabindex="${this.cardHref?"0":"-1"}"
|
|
@@ -3087,8 +3088,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3087
3088
|
>
|
|
3088
3089
|
${this.cardHref?c`<md-ripple></md-ripple>`:""}
|
|
3089
3090
|
${this.showMedia?c`
|
|
3090
|
-
<div class="media" style="${v}" aria-label="Datum: ${
|
|
3091
|
-
<div class="day">${
|
|
3091
|
+
<div class="media" style="${v}" aria-label="Datum: ${r} ${s}">
|
|
3092
|
+
<div class="day">${r}</div>
|
|
3092
3093
|
<div class="month">${s}</div>
|
|
3093
3094
|
</div>
|
|
3094
3095
|
`:""}
|
|
@@ -3309,13 +3310,13 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3309
3310
|
overflow: visible;
|
|
3310
3311
|
text-overflow: clip;
|
|
3311
3312
|
}
|
|
3312
|
-
`,H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),H([l({type:String})],a.ScbCalendarCard.prototype,"title",2),H([l({type:String})],a.ScbCalendarCard.prototype,"subtitle",2),H([l({type:String,attribute:"supporting-text"})],a.ScbCalendarCard.prototype,"supportingText",2),H([l({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),H([l({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),H([l({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),H([l({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),H([l({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),H([l({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),H([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),H([l({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),H([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),H([l({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),a.ScbCalendarCard=H([f("scb-calendar-card")],a.ScbCalendarCard);var dd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,E=(o,e,t,
|
|
3313
|
+
`,H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),H([l({type:String})],a.ScbCalendarCard.prototype,"title",2),H([l({type:String})],a.ScbCalendarCard.prototype,"subtitle",2),H([l({type:String,attribute:"supporting-text"})],a.ScbCalendarCard.prototype,"supportingText",2),H([l({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),H([l({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),H([l({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),H([l({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),H([l({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),H([l({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),H([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),H([l({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),H([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),H([l({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),a.ScbCalendarCard=H([f("scb-calendar-card")],a.ScbCalendarCard);var dd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,E=(o,e,t,i)=>{for(var r=i>1?void 0:i?hd(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&&dd(e,t,r),r};a.ScbCard=class extends y{constructor(){super(...arguments),this.type="",this.variant="",this.direction="",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.comments=0,this.likesText="",this.likes=0,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.__onImgLoad=e=>{const t=e.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||window.open(this.cardHref,"_self"))}}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:640,h:360};const i=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(i&&i.length===2){const s=Number(i[0]),n=Number(i[1]);if(s>0&&n>0)return{w:s,h:n}}const r=Number(t);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return c`
|
|
3313
3314
|
<div class="media">
|
|
3314
3315
|
<slot name="media">
|
|
3315
3316
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
3316
3317
|
</slot>
|
|
3317
3318
|
</div>
|
|
3318
|
-
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,
|
|
3319
|
+
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,i=Number(this.mediaHeight)||0;const r=(this.mediaAspect||"").trim();if(!t||!i){const v=this.__calcAspectWH(r||"16/9");t||(t=v.w),i||(i=v.h)}const s=`aspect-ratio:${r||`${t}/${i}`};`,n=this.mediaPlaceholder?"has-ph":"",h=this.mediaFit||"cover",p=this.mediaPosition||"center";return c`
|
|
3319
3320
|
<div class="media ${n}" style="${s}">
|
|
3320
3321
|
<!-- Tillåt egna <source>-element via slot om man vill använda <picture> -->
|
|
3321
3322
|
<slot name="media-sources"></slot>
|
|
@@ -3329,13 +3330,13 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3329
3330
|
fetchpriority="${this.mediaFetchPriority}"
|
|
3330
3331
|
style="object-fit:${h};object-position:${p};"
|
|
3331
3332
|
width="${t}"
|
|
3332
|
-
height="${
|
|
3333
|
+
height="${i}"
|
|
3333
3334
|
@load=${this.__onImgLoad}
|
|
3334
3335
|
/>
|
|
3335
3336
|
</div>
|
|
3336
|
-
`}return null}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.type==="list"?"vertical":this.direction?this.direction.toLowerCase():"",
|
|
3337
|
+
`}return null}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.type==="list"?"vertical":this.direction?this.direction.toLowerCase():"",i=this.cardHref?"clickable":"",r=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",s=(p=!1)=>p?c`<a class="title" href="${this.cardHref}" tabindex="0">${this.title}</a><md-icon>arrow_forward</md-icon>`:c`<span class="title">${this.title}</span>`,n=()=>this.__mediaTemplate(),h=p=>c`
|
|
3337
3338
|
<div
|
|
3338
|
-
class="scb-card ${e} ${t} ${
|
|
3339
|
+
class="scb-card ${e} ${t} ${i}"
|
|
3339
3340
|
@click=${this.cardHref?this.__handleHrefNavigation:null}
|
|
3340
3341
|
@keydown=${this.cardHref?this.__onKeyDown:null}
|
|
3341
3342
|
style="cursor:${this.cardHref?"pointer":"default"};"
|
|
@@ -3354,7 +3355,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3354
3355
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3355
3356
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3356
3357
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3357
|
-
${
|
|
3358
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3358
3359
|
</div>
|
|
3359
3360
|
</div>
|
|
3360
3361
|
`);case"list":return h(c`
|
|
@@ -3363,7 +3364,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3363
3364
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3364
3365
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3365
3366
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3366
|
-
${
|
|
3367
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3367
3368
|
</div>
|
|
3368
3369
|
<div class="content list">
|
|
3369
3370
|
<slot></slot>
|
|
@@ -3375,7 +3376,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3375
3376
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3376
3377
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3377
3378
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3378
|
-
${
|
|
3379
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3379
3380
|
</div>
|
|
3380
3381
|
<div class="content">
|
|
3381
3382
|
<div class="social-metrics">
|
|
@@ -3390,7 +3391,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3390
3391
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3391
3392
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3392
3393
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3393
|
-
${
|
|
3394
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3394
3395
|
</div>
|
|
3395
3396
|
<div class="content links">
|
|
3396
3397
|
<slot></slot>
|
|
@@ -3402,7 +3403,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3402
3403
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3403
3404
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3404
3405
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3405
|
-
${
|
|
3406
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3406
3407
|
</div>
|
|
3407
3408
|
<div class="content actions">
|
|
3408
3409
|
<slot></slot>
|
|
@@ -3414,10 +3415,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3414
3415
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3415
3416
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3416
3417
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3417
|
-
${
|
|
3418
|
+
${r?c`<div class="date">${r}</div>`:""}
|
|
3418
3419
|
</div>
|
|
3419
3420
|
</div>
|
|
3420
|
-
`)}}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(){a.ScbCard.__iconLoaded||(await Promise.resolve().then(()=>Y),a.ScbCard.__iconLoaded=!0),a.ScbCard.__rippleLoaded||(await Promise.resolve().then(()=>
|
|
3421
|
+
`)}}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(){a.ScbCard.__iconLoaded||(await Promise.resolve().then(()=>Y),a.ScbCard.__iconLoaded=!0),a.ScbCard.__rippleLoaded||(await Promise.resolve().then(()=>_i),a.ScbCard.__rippleLoaded=!0)}},a.ScbCard.__iconLoaded=!1,a.ScbCard.__rippleLoaded=!1,a.ScbCard.styles=b`
|
|
3421
3422
|
:host {
|
|
3422
3423
|
display: block;
|
|
3423
3424
|
box-sizing: border-box;
|
|
@@ -3664,11 +3665,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3664
3665
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
3665
3666
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
3666
3667
|
}
|
|
3667
|
-
`,E([l({type:String})],a.ScbCard.prototype,"type",2),E([l({type:String})],a.ScbCard.prototype,"variant",2),E([l({type:String})],a.ScbCard.prototype,"direction",2),E([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([l({type:String,attribute:"card-href"})],a.ScbCard.prototype,"cardHref",2),E([l({type:String})],a.ScbCard.prototype,"title",2),E([l({type:String})],a.ScbCard.prototype,"subtitle",2),E([l({type:String,attribute:"supporting-text"})],a.ScbCard.prototype,"supportingText",2),E([l({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),E([l({type:String,attribute:"social-comments-text"})],a.ScbCard.prototype,"commentsText",2),E([l({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),E([l({type:String,attribute:"social-likes-text"})],a.ScbCard.prototype,"likesText",2),E([l({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),E([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),E([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),a.ScbCard=E([f("scb-card")],a.ScbCard);var pd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,ss=o=>{throw TypeError(o)},
|
|
3668
|
+
`,E([l({type:String})],a.ScbCard.prototype,"type",2),E([l({type:String})],a.ScbCard.prototype,"variant",2),E([l({type:String})],a.ScbCard.prototype,"direction",2),E([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([l({type:String,attribute:"card-href"})],a.ScbCard.prototype,"cardHref",2),E([l({type:String})],a.ScbCard.prototype,"title",2),E([l({type:String})],a.ScbCard.prototype,"subtitle",2),E([l({type:String,attribute:"supporting-text"})],a.ScbCard.prototype,"supportingText",2),E([l({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),E([l({type:String,attribute:"social-comments-text"})],a.ScbCard.prototype,"commentsText",2),E([l({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),E([l({type:String,attribute:"social-likes-text"})],a.ScbCard.prototype,"likesText",2),E([l({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),E([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),E([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),a.ScbCard=E([f("scb-card")],a.ScbCard);var pd=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,ss=o=>{throw TypeError(o)},lr=(o,e,t,i)=>{for(var r=i>1?void 0:i?ud(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},vd=(o,e,t)=>e.has(o)||ss("Cannot "+t),$o=(o,e,t)=>(vd(o,e,"read from private field"),t?t.call(o):e.get(o)),md=(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),oi;a.ScbCheckboxGroup=class extends y{constructor(){super(...arguments),this.orientation="vertical",this.disabled=!1,this.spacing="group",md(this,oi,()=>{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`
|
|
3668
3669
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${e}`}>
|
|
3669
|
-
<slot @slotchange=${$o(this,
|
|
3670
|
+
<slot @slotchange=${$o(this,oi)}></slot>
|
|
3670
3671
|
</div>
|
|
3671
|
-
`}firstUpdated(){$o(this,
|
|
3672
|
+
`}firstUpdated(){$o(this,oi).call(this)}updated(e){(e.has("disabled")||e.has("orientation")||e.has("spacing"))&&$o(this,oi).call(this)}},oi=new WeakMap,a.ScbCheckboxGroup.styles=b`
|
|
3672
3673
|
:host {
|
|
3673
3674
|
display: block;
|
|
3674
3675
|
--scb-checkbox-gap: var(--spacing-4, 12px);
|
|
@@ -3691,7 +3692,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3691
3692
|
:host([spacing="group"]) ::slotted(scb-checkbox) {
|
|
3692
3693
|
--scb-checkbox-gap: 0;
|
|
3693
3694
|
}
|
|
3694
|
-
`,
|
|
3695
|
+
`,lr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"orientation",2),lr([l({type:Boolean,reflect:!0})],a.ScbCheckboxGroup.prototype,"disabled",2),lr([l({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"spacing",2),a.ScbCheckboxGroup=lr([f("scb-checkbox-group")],a.ScbCheckboxGroup);var bd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,dt=(o,e,t,i)=>{for(var r=i>1?void 0:i?fd(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.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`
|
|
3695
3696
|
<label class="wrap">
|
|
3696
3697
|
<div class="box-wrap">
|
|
3697
3698
|
<md-checkbox
|
|
@@ -3699,7 +3700,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3699
3700
|
?disabled=${this.disabled}
|
|
3700
3701
|
?indeterminate=${this.indeterminate}
|
|
3701
3702
|
?checked=${this.checked}
|
|
3702
|
-
aria-label=${
|
|
3703
|
+
aria-label=${i}
|
|
3703
3704
|
></md-checkbox>
|
|
3704
3705
|
</div>
|
|
3705
3706
|
${t?c`<span class="lbl" id="${this._checkboxId}-label">${this.label}</span>`:u}
|
|
@@ -3765,7 +3766,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3765
3766
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
3766
3767
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
3767
3768
|
}
|
|
3768
|
-
`,dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"disabled",2),dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"indeterminate",2),dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"checked",2),dt([l({type:String})],a.ScbCheckbox.prototype,"label",2),dt([l({type:String,attribute:"supporting-text"})],a.ScbCheckbox.prototype,"supportingText",2),dt([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbCheckbox.prototype,"ariaLabel",2),a.ScbCheckbox=dt([f("scb-checkbox")],a.ScbCheckbox);const ns=Object.freeze(Object.defineProperty({__proto__:null,get ScbCheckbox(){return a.ScbCheckbox}},Symbol.toStringTag,{value:"Module"}));var gd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,we=(o,e,t,
|
|
3769
|
+
`,dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"disabled",2),dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"indeterminate",2),dt([l({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"checked",2),dt([l({type:String})],a.ScbCheckbox.prototype,"label",2),dt([l({type:String,attribute:"supporting-text"})],a.ScbCheckbox.prototype,"supportingText",2),dt([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbCheckbox.prototype,"ariaLabel",2),a.ScbCheckbox=dt([f("scb-checkbox")],a.ScbCheckbox);const ns=Object.freeze(Object.defineProperty({__proto__:null,get ScbCheckbox(){return a.ScbCheckbox}},Symbol.toStringTag,{value:"Module"}));var gd=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,we=(o,e,t,i)=>{for(var r=i>1?void 0:i?yd(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&&gd(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(()=>Ln);break;case"filter":await Promise.resolve().then(()=>Fn);break}this.__loadedVariants.add(this.variant)}!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>Rn),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>Y),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`
|
|
3769
3770
|
<md-assist-chip
|
|
3770
3771
|
label=${this.label}
|
|
3771
3772
|
?disabled=${this.disabled}
|
|
@@ -3811,7 +3812,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3811
3812
|
color: var(--md-sys-color-on-surface);
|
|
3812
3813
|
}
|
|
3813
3814
|
}
|
|
3814
|
-
`,we([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),we([l({type:String})],a.ScbChip.prototype,"label",2),we([l({type:String})],a.ScbChip.prototype,"icon",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),we([l({type:String})],a.ScbChip.prototype,"href",2),we([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=we([f("scb-chip")],a.ScbChip);const _d=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,V=(o,e,t,
|
|
3815
|
+
`,we([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),we([l({type:String})],a.ScbChip.prototype,"label",2),we([l({type:String})],a.ScbChip.prototype,"icon",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),we([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),we([l({type:String})],a.ScbChip.prototype,"href",2),we([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=we([f("scb-chip")],a.ScbChip);const _d=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,V=(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};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(()=>dp),"SCB-CHECKBOX":()=>Promise.resolve().then(()=>ns),"SCB-RADIO-BUTTON":()=>Promise.resolve().then(()=>Ph),"SCB-SWITCH":()=>Promise.resolve().then(()=>$s),"SCB-CHIP":()=>Promise.resolve().then(()=>_d)},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(()=>Tc),await Promise.resolve().then(()=>Qa),this.icon&&await Promise.resolve().then(()=>Y),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(()=>Y)}__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`
|
|
3815
3816
|
<div class="header">
|
|
3816
3817
|
<div class="title">
|
|
3817
3818
|
${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:u}
|
|
@@ -3858,7 +3859,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3858
3859
|
${this.renderBody(e,t)}
|
|
3859
3860
|
</div>
|
|
3860
3861
|
`}},a.ScbDialog.styles=b`
|
|
3861
|
-
:host {
|
|
3862
|
+
:host {
|
|
3863
|
+
display:block;
|
|
3864
|
+
position:relative;
|
|
3865
|
+
font-family: var(--brand, Inter);
|
|
3866
|
+
}
|
|
3862
3867
|
|
|
3863
3868
|
.scrim {
|
|
3864
3869
|
position: var(--scb-dialog-scrim-position, fixed);
|
|
@@ -3967,7 +3972,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
3967
3972
|
display:block;
|
|
3968
3973
|
margin-block: var(--scb-choice-gap, 6px);
|
|
3969
3974
|
}
|
|
3970
|
-
`,V([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),V([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),V([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),V([l({type:String})],a.ScbDialog.prototype,"variant",2),V([l({type:String})],a.ScbDialog.prototype,"label",2),V([l({type:String})],a.ScbDialog.prototype,"icon",2),V([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),V([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),V([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),V([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),V([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),V([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),V([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),V([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),V([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),V([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),V([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=V([f("scb-dialog")],a.ScbDialog);var Sd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,kt=(o,e,t,
|
|
3975
|
+
`,V([l({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),V([l({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),V([l({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),V([l({type:String})],a.ScbDialog.prototype,"variant",2),V([l({type:String})],a.ScbDialog.prototype,"label",2),V([l({type:String})],a.ScbDialog.prototype,"icon",2),V([l({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),V([l({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),V([l({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),V([l({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),V([l({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),V([l({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),V([l({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),V([l({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),V([l({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),V([l({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),V([l({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=V([f("scb-dialog")],a.ScbDialog);var Sd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,kt=(o,e,t,i)=>{for(var r=i>1?void 0:i?kd(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.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`
|
|
3971
3976
|
:host {
|
|
3972
3977
|
--scb-divider-color: var(--md-sys-color-outline-variant);
|
|
3973
3978
|
--scb-divider-thickness: 1px;
|
|
@@ -4009,7 +4014,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4009
4014
|
}
|
|
4010
4015
|
:host([overlay][direction="vertical"][anchor="end"]) { right: calc(var(--scb-divider-gap) / -2); }
|
|
4011
4016
|
:host([overlay][direction="vertical"][anchor="start"]){ left: calc(var(--scb-divider-gap) / -2); }
|
|
4012
|
-
`,kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),kt([l({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),a.ScbDivider=kt([f("scb-divider")],a.ScbDivider);var $d=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,ht=(o,e,t,
|
|
4017
|
+
`,kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),kt([l({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),kt([l({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),a.ScbDivider=kt([f("scb-divider")],a.ScbDivider);var $d=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,ht=(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.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,g,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(),(g=(v=t[0].shadowRoot)==null?void 0:v.querySelector(".scb-drawer-label-text"))==null||g.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(()=>_i),a.ScbDrawerItem.__rippleLoaded=!0),a.ScbDrawerItem.__focusRingLoaded||(await Promise.resolve().then(()=>tn),a.ScbDrawerItem.__focusRingLoaded=!0),this.leadingIcon&&!a.ScbDrawerItem.__iconLoaded&&(await Promise.resolve().then(()=>Y),a.ScbDrawerItem.__iconLoaded=!0),this.hasSlotContent&&!a.ScbDrawerItem.__iconButtonLoaded&&(await Promise.resolve().then(()=>Qa),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`
|
|
4013
4018
|
<div class="scb-drawer-item">
|
|
4014
4019
|
<div class="scb-drawer-item-label" ?selected=${this.selected}>
|
|
4015
4020
|
${t?c`
|
|
@@ -4036,8 +4041,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4036
4041
|
class="scb-drawer-label-text"
|
|
4037
4042
|
@click=${this._onButtonClick}
|
|
4038
4043
|
@keydown=${this._onKeyDown}
|
|
4039
|
-
${
|
|
4040
|
-
${
|
|
4044
|
+
${i?"aria-expanded="+String(this.expanded):""}
|
|
4045
|
+
${i?"aria-controls="+this.__submenuId:""}
|
|
4041
4046
|
>
|
|
4042
4047
|
<span class="scb-drawer-click ${e?"has-icon":""}">
|
|
4043
4048
|
<md-ripple></md-ripple>
|
|
@@ -4047,12 +4052,12 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4047
4052
|
</button>
|
|
4048
4053
|
<md-focus-ring for=${this.__focusId} inward></md-focus-ring>
|
|
4049
4054
|
`}
|
|
4050
|
-
${
|
|
4055
|
+
${i?c`
|
|
4051
4056
|
<scb-icon-button
|
|
4052
4057
|
icon="${this.expanded?"expand_less":"expand_more"}"
|
|
4053
4058
|
role="presentation"
|
|
4054
4059
|
tabindex="-1"
|
|
4055
|
-
@click=${
|
|
4060
|
+
@click=${r=>{r.stopPropagation(),this._toggleExpand(r)}}
|
|
4056
4061
|
></scb-icon-button>
|
|
4057
4062
|
`:""}
|
|
4058
4063
|
</div>
|
|
@@ -4162,7 +4167,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4162
4167
|
@media (prefers-reduced-motion: reduce) {
|
|
4163
4168
|
.submenu { transition: none; }
|
|
4164
4169
|
}
|
|
4165
|
-
`,ht([l({type:String})],a.ScbDrawerItem.prototype,"label",2),ht([l({type:Boolean,reflect:!0})],a.ScbDrawerItem.prototype,"selected",2),ht([l({type:String,attribute:"leading-icon"})],a.ScbDrawerItem.prototype,"leadingIcon",2),ht([l({type:String,attribute:"item-href"})],a.ScbDrawerItem.prototype,"itemHref",2),ht([w()],a.ScbDrawerItem.prototype,"hasSlotContent",2),ht([w()],a.ScbDrawerItem.prototype,"expanded",2),a.ScbDrawerItem=ht([f("scb-drawer-item")],a.ScbDrawerItem);const Ed=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerItem(){return a.ScbDrawerItem}},Symbol.toStringTag,{value:"Module"}));var Ad=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,ls=(o,e,t,
|
|
4170
|
+
`,ht([l({type:String})],a.ScbDrawerItem.prototype,"label",2),ht([l({type:Boolean,reflect:!0})],a.ScbDrawerItem.prototype,"selected",2),ht([l({type:String,attribute:"leading-icon"})],a.ScbDrawerItem.prototype,"leadingIcon",2),ht([l({type:String,attribute:"item-href"})],a.ScbDrawerItem.prototype,"itemHref",2),ht([w()],a.ScbDrawerItem.prototype,"hasSlotContent",2),ht([w()],a.ScbDrawerItem.prototype,"expanded",2),a.ScbDrawerItem=ht([f("scb-drawer-item")],a.ScbDrawerItem);const Ed=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerItem(){return a.ScbDrawerItem}},Symbol.toStringTag,{value:"Module"}));var Ad=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,ls=(o,e,t,i)=>{for(var r=i>1?void 0:i?Id(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&&Ad(e,t,r),r};a.ScbDrawerSection=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`
|
|
4166
4171
|
<scb-divider></scb-divider>
|
|
4167
4172
|
${this.label?c`
|
|
4168
4173
|
<div class="scb-drawer-section">
|
|
@@ -4198,7 +4203,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4198
4203
|
margin-block: var(--spacing-2, 4px);
|
|
4199
4204
|
margin-inline: var(--spacing-4, 12px);
|
|
4200
4205
|
}
|
|
4201
|
-
`,ls([l({type:String})],a.ScbDrawerSection.prototype,"label",2),a.ScbDrawerSection=ls([f("scb-drawer-section")],a.ScbDrawerSection);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerSection(){return a.ScbDrawerSection}},Symbol.toStringTag,{value:"Module"}));var Td=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,be=(o,e,t,
|
|
4206
|
+
`,ls([l({type:String})],a.ScbDrawerSection.prototype,"label",2),a.ScbDrawerSection=ls([f("scb-drawer-section")],a.ScbDrawerSection);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerSection(){return a.ScbDrawerSection}},Symbol.toStringTag,{value:"Module"}));var Td=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,be=(o,e,t,i)=>{for(var r=i>1?void 0:i?Od(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&&Td(e,t,r),r};a.ScbDrawer=class extends y{constructor(){super(...arguments),this.label="",this.subLabel="",this.floating=!1,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.__lastTriggerEl=null,this._onGlobalSelect=e=>{const t=e;this.querySelectorAll("scb-drawer-item").forEach(r=>r.selected=!1),this.contains(t.detail.item)&&(t.detail.item.selected=!0)},this.__onDocumentClick=e=>{const t=this.__getActionFromEvent(e);if(t){t==="open"&&this.__setOpen(!0),t==="close"&&this.__setOpen(!1),t==="toggle"&&this.__setOpen(!this.open),e.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(e.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=e=>{if(this.open){if(e.key==="Escape"){this.__setOpen(!1);return}if(this.overlay&&e.key==="Tab"){const t=this.__getFocusable();if(t.length===0)return;const i=t[0],r=t[t.length-1],s=this.renderRoot,n=s.activeElement||document.activeElement;e.shiftKey?(n===i||!s.contains(n))&&(e.preventDefault(),r.focus()):(n===r||!s.contains(n))&&(e.preventDefault(),i.focus())}}}}static async __ensureParts(){a.ScbDrawer.__partsReady||(a.ScbDrawer.__partsLoading||(a.ScbDrawer.__partsLoading=Promise.all([Promise.resolve().then(()=>Ed),Promise.resolve().then(()=>zd),Promise.resolve().then(()=>Rd)]).then(()=>{a.ScbDrawer.__partsReady=!0})),await a.ScbDrawer.__partsLoading)}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const e=document.createElement("style");e.id="scb-drawer-overlay-styles",e.textContent=`
|
|
4202
4207
|
.scb-drawer-global-overlay {
|
|
4203
4208
|
position: fixed;
|
|
4204
4209
|
inset: 0;
|
|
@@ -4230,7 +4235,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4230
4235
|
`:u}
|
|
4231
4236
|
<div class="panel"><slot></slot></div>
|
|
4232
4237
|
</nav>
|
|
4233
|
-
`}connectedCallback(){super.connectedCallback(),window.addEventListener("scb-drawer-select",this._onGlobalSelect),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){window.removeEventListener("scb-drawer-select",this._onGlobalSelect),document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(a.ScbDrawer.__hideOverlay(this),this.lockScroll&&a.ScbDrawer.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const
|
|
4238
|
+
`}connectedCallback(){super.connectedCallback(),window.addEventListener("scb-drawer-select",this._onGlobalSelect),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){window.removeEventListener("scb-drawer-select",this._onGlobalSelect),document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(a.ScbDrawer.__hideOverlay(this),this.lockScroll&&a.ScbDrawer.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const i of t)if(i instanceof Element){if(i.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=i,"open";if(i.getAttribute("data-drawer-close")===this.id)return this.__lastTriggerEl=i,"close";if(i.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=i,"toggle";if(i.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=i,"toggle"}return null}__getFocusable(){const e=this.renderRoot;return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>!t.hasAttribute("disabled")&&t.tabIndex>=0)}__setOpen(e){this.open=e}updated(e){if(e.has("open")){const t=!!e.get("open");this.__applyOpenSideEffects(t,this.open)}e.has("right")&&this.right&&this.left&&(this.left=!1),e.has("left")&&this.left&&this.right&&(this.right=!1)}__applyOpenSideEffects(e,t){var i,r;t&&!e?(this.floating&&this.overlay&&(a.ScbDrawer.__showOverlay(this),this.lockScroll&&a.ScbDrawer.__lockScrollEnable()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),a.ScbDrawer.__ensureParts(),this.__updateTriggersExpanded(),this.updateComplete.then(()=>{var n;const s=this.__getFocusable()[0];(n=s==null?void 0:s.focus)==null||n.call(s)}),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0}))):!t&&e&&(this.floating&&this.overlay&&(a.ScbDrawer.__hideOverlay(this),this.lockScroll&&a.ScbDrawer.__lockScrollDisable()),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.__updateTriggersExpanded(),(r=(i=this.__lastTriggerEl)==null?void 0:i.focus)==null||r.call(i),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})))}__updateTriggersExpanded(){if(!this.id)return;document.querySelectorAll(`[aria-controls="${this.id}"], [data-drawer-open="${this.id}"], [data-drawer-close="${this.id}"], [data-drawer-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}},a.ScbDrawer.__overlayEl=null,a.ScbDrawer.__overlayStack=[],a.ScbDrawer.__lockedCount=0,a.ScbDrawer.__prevDocOverflow=null,a.ScbDrawer.__prevBodyOverflow=null,a.ScbDrawer.__partsReady=!1,a.ScbDrawer.__partsLoading=null,a.ScbDrawer.styles=b`
|
|
4234
4239
|
:host {
|
|
4235
4240
|
display: block;
|
|
4236
4241
|
color: var(--md-sys-color-on-surface);
|
|
@@ -4314,7 +4319,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4314
4319
|
content-visibility: auto;
|
|
4315
4320
|
contain-intrinsic-size: 0 600px;
|
|
4316
4321
|
}
|
|
4317
|
-
`,be([l({type:String})],a.ScbDrawer.prototype,"label",2),be([l({type:String,attribute:"sub-label"})],a.ScbDrawer.prototype,"subLabel",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"floating",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"left",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"right",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"open",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"overlay",2),be([l({type:Boolean,reflect:!0,attribute:"lock-scroll"})],a.ScbDrawer.prototype,"lockScroll",2),be([l({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],a.ScbDrawer.prototype,"closeOnOverlay",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"modal",2),a.ScbDrawer=be([f("scb-drawer")],a.ScbDrawer);const Pd=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawer(){return a.ScbDrawer}},Symbol.toStringTag,{value:"Module"}));var Ld=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,cs=(o,e,t,
|
|
4322
|
+
`,be([l({type:String})],a.ScbDrawer.prototype,"label",2),be([l({type:String,attribute:"sub-label"})],a.ScbDrawer.prototype,"subLabel",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"floating",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"left",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"right",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"open",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"overlay",2),be([l({type:Boolean,reflect:!0,attribute:"lock-scroll"})],a.ScbDrawer.prototype,"lockScroll",2),be([l({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],a.ScbDrawer.prototype,"closeOnOverlay",2),be([l({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"modal",2),a.ScbDrawer=be([f("scb-drawer")],a.ScbDrawer);const Pd=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawer(){return a.ScbDrawer}},Symbol.toStringTag,{value:"Module"}));var Ld=Object.defineProperty,Dd=Object.getOwnPropertyDescriptor,cs=(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&&Ld(e,t,r),r};a.ScbSubDrawer=class extends y{constructor(){super(...arguments),this.label="",this._onGlobalSelect=e=>{const t=e;this.querySelectorAll("scb-drawer-item").forEach(r=>r.selected=!1),this.contains(t.detail.item)&&(t.detail.item.selected=!0)}}connectedCallback(){super.connectedCallback(),window.addEventListener("scb-drawer-select",this._onGlobalSelect)}disconnectedCallback(){window.removeEventListener("scb-drawer-select",this._onGlobalSelect),super.disconnectedCallback()}render(){return c`
|
|
4318
4323
|
<nav aria-label="${this.label}">
|
|
4319
4324
|
<slot></slot>
|
|
4320
4325
|
</nav>
|
|
@@ -4323,7 +4328,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4323
4328
|
display: block;
|
|
4324
4329
|
width: 100%;
|
|
4325
4330
|
}
|
|
4326
|
-
`,cs([l({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=cs([f("scb-sub-drawer")],a.ScbSubDrawer);const Rd=Object.freeze(Object.defineProperty({__proto__:null,get ScbSubDrawer(){return a.ScbSubDrawer}},Symbol.toStringTag,{value:"Module"}));var Bd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,
|
|
4331
|
+
`,cs([l({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=cs([f("scb-sub-drawer")],a.ScbSubDrawer);const Rd=Object.freeze(Object.defineProperty({__proto__:null,get ScbSubDrawer(){return a.ScbSubDrawer}},Symbol.toStringTag,{value:"Module"}));var Bd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,cr=(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.ScbFactCardContent=class extends y{constructor(){super(...arguments),this.title="",this.subtitle="",this.supportingText=""}render(){return c`
|
|
4327
4332
|
${this.title?c`
|
|
4328
4333
|
<div class="label">
|
|
4329
4334
|
${this.title}
|
|
@@ -4332,7 +4337,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4332
4337
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
4333
4338
|
<slot @slotchange=${this.requestUpdate}></slot>
|
|
4334
4339
|
${this._hasSlotContent()?c`<div class="content links"><slot></slot></div>`:""}
|
|
4335
|
-
`}_hasSlotContent(){const e=this.shadowRoot&&this.shadowRoot.querySelector("slot");if(!e)return!1;const t=e.assignedNodes({flatten:!0});return t.length>0&&t.some(
|
|
4340
|
+
`}_hasSlotContent(){const e=this.shadowRoot&&this.shadowRoot.querySelector("slot");if(!e)return!1;const t=e.assignedNodes({flatten:!0});return t.length>0&&t.some(i=>{var r;return i.nodeType===Node.TEXT_NODE?(r=i.textContent)==null?void 0:r.trim():!0})}},a.ScbFactCardContent.styles=b`
|
|
4336
4341
|
:host {
|
|
4337
4342
|
display: flex;
|
|
4338
4343
|
flex-direction: column;
|
|
@@ -4366,7 +4371,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4366
4371
|
flex-direction: column;
|
|
4367
4372
|
gap: var(--spacing-3);
|
|
4368
4373
|
}
|
|
4369
|
-
`,
|
|
4374
|
+
`,cr([l({type:String,attribute:"title"})],a.ScbFactCardContent.prototype,"title",2),cr([l({type:String,attribute:"subtitle"})],a.ScbFactCardContent.prototype,"subtitle",2),cr([l({type:String,attribute:"supporting-text"})],a.ScbFactCardContent.prototype,"supportingText",2),a.ScbFactCardContent=cr([f("scb-fact-card-content")],a.ScbFactCardContent);var Fd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,te=(o,e,t,i)=>{for(var r=i>1?void 0:i?Hd(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.ScbFactCard=class extends y{constructor(){super(...arguments),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.title="",this.subtitle="",this.supportingText="",this.icon="",this.showCloseButton=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight=""}static __handleDocClick(e){const t=e.composedPath();for(const i of t){if(!(i instanceof Element))continue;const r=i.getAttribute("data-fact-card-toggle")||i.getAttribute("aria-controls");if(!r)continue;const s=a.ScbFactCard.__instances.get(r);if(!s){a.ScbFactCard.__instances.delete(r);continue}s.__lastTriggerEl=i,s.__setOpen(!s.open),e.stopPropagation();break}}static __ensureDocListener(){a.ScbFactCard.__docListenerAttached||(document.addEventListener("click",a.ScbFactCard.__handleDocClick,!0),a.ScbFactCard.__docListenerAttached=!0)}static __maybeRemoveDocListener(){a.ScbFactCard.__docListenerAttached&&a.ScbFactCard.__instances.size===0&&(document.removeEventListener("click",a.ScbFactCard.__handleDocClick,!0),a.ScbFactCard.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&a.ScbFactCard.__instances.set(this.id,this),a.ScbFactCard.__ensureDocListener()}disconnectedCallback(){this.id&&a.ScbFactCard.__instances.delete(this.id),a.ScbFactCard.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has("open")&&this.__updateTriggersExpanded(),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"))}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__setOpen(e){const t=this.open;this.open=e,e&&!t?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):!e&&t&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){if(!this.open)return c``;const e=this.variant==="outlined"?"outlined":"filled",t=!!this.icon;return c`
|
|
4370
4375
|
<div class="outer ${t?"has-icon":""}">
|
|
4371
4376
|
${t?c`<div class="icon-wrapper ${e}"><md-icon>${this.icon}</md-icon></div>`:""}
|
|
4372
4377
|
<div class="scb-fact-card ${e} ${this.showCloseButton?"has-close":""}">
|
|
@@ -4497,9 +4502,9 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4497
4502
|
overflow-wrap: normal;
|
|
4498
4503
|
hyphens: auto;
|
|
4499
4504
|
}
|
|
4500
|
-
`,te([l({type:String})],a.ScbFactCard.prototype,"variant",2),te([l({type:String,attribute:"title"})],a.ScbFactCard.prototype,"title",2),te([l({type:String,attribute:"subtitle"})],a.ScbFactCard.prototype,"subtitle",2),te([l({type:String,attribute:"supporting-text"})],a.ScbFactCard.prototype,"supportingText",2),te([l({type:String})],a.ScbFactCard.prototype,"icon",2),te([l({type:Boolean,attribute:"show-close-button"})],a.ScbFactCard.prototype,"showCloseButton",2),te([l({type:Boolean,reflect:!0})],a.ScbFactCard.prototype,"open",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"sizing",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"width",2),te([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbFactCard.prototype,"maxWidth",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"height",2),te([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbFactCard.prototype,"maxHeight",2),a.ScbFactCard=te([f("scb-fact-card")],a.ScbFactCard);var Nd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,ds=(o,e,t,
|
|
4505
|
+
`,te([l({type:String})],a.ScbFactCard.prototype,"variant",2),te([l({type:String,attribute:"title"})],a.ScbFactCard.prototype,"title",2),te([l({type:String,attribute:"subtitle"})],a.ScbFactCard.prototype,"subtitle",2),te([l({type:String,attribute:"supporting-text"})],a.ScbFactCard.prototype,"supportingText",2),te([l({type:String})],a.ScbFactCard.prototype,"icon",2),te([l({type:Boolean,attribute:"show-close-button"})],a.ScbFactCard.prototype,"showCloseButton",2),te([l({type:Boolean,reflect:!0})],a.ScbFactCard.prototype,"open",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"sizing",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"width",2),te([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbFactCard.prototype,"maxWidth",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"height",2),te([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbFactCard.prototype,"maxHeight",2),a.ScbFactCard=te([f("scb-fact-card")],a.ScbFactCard);var Nd=Object.defineProperty,qd=Object.getOwnPropertyDescriptor,ds=(o,e,t,i)=>{for(var r=i>1?void 0:i?qd(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&&Nd(e,t,r),r};a.ScbFooterSection=class extends y{constructor(){super(...arguments),this.title=""}render(){return c`<slot></slot>`}},a.ScbFooterSection.styles=b`
|
|
4501
4506
|
:host { display: none; }
|
|
4502
|
-
`,ds([l({type:String,reflect:!0})],a.ScbFooterSection.prototype,"title",2),a.ScbFooterSection=ds([f("scb-footer-section")],a.ScbFooterSection);var Vd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,hs=o=>{throw TypeError(o)},
|
|
4507
|
+
`,ds([l({type:String,reflect:!0})],a.ScbFooterSection.prototype,"title",2),a.ScbFooterSection=ds([f("scb-footer-section")],a.ScbFooterSection);var Vd=Object.defineProperty,Ud=Object.getOwnPropertyDescriptor,hs=o=>{throw TypeError(o)},ie=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ud(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&&Vd(e,t,r),r},jd=(o,e,t)=>e.has(o)||hs("Cannot "+t),Wd=(o,e,t)=>e.has(o)?hs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),$t=(o,e,t)=>(jd(o,e,"access private method"),t),je,Co,ai;a.ScbGrid=class extends y{constructor(){super(...arguments),Wd(this,je),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(){$t(this,je,Co).call(this)}updated(){$t(this,je,Co).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>`}},je=new WeakSet,Co=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);$t(this,je,ai).call(this,"--scb-grid-max-width",this.maxWidth),$t(this,je,ai).call(this,"--scb-grid-padding-inline",r??""),$t(this,je,ai).call(this,"--scb-grid-padding-block",s??""),$t(this,je,ai).call(this,"--scb-grid-auto-rows",this.autoRows)},ai=function(o,e){e?this.style.setProperty(o,e):this.style.removeProperty(o)},a.ScbGrid.styles=b`
|
|
4503
4508
|
:host {
|
|
4504
4509
|
box-sizing: border-box;
|
|
4505
4510
|
display: block;
|
|
@@ -4596,7 +4601,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4596
4601
|
}
|
|
4597
4602
|
}
|
|
4598
4603
|
}
|
|
4599
|
-
`,
|
|
4604
|
+
`,ie([l({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),ie([l({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),ie([l({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),ie([l({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),ie([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),ie([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),ie([l({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),ie([l({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),ie([l({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),ie([l({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),ie([l({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),ie([l({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=ie([f("scb-grid")],a.ScbGrid);var Gd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,ps=o=>{throw TypeError(o)},ce=(o,e,t,i)=>{for(var r=i>1?void 0:i?Kd(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&&Gd(e,t,r),r},Yd=(o,e,t)=>e.has(o)||ps("Cannot "+t),Xd=(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),Se=(o,e,t)=>(Yd(o,e,"access private method"),t),de,Eo,Te;a.ScbGridItem=class extends y{constructor(){super(...arguments),Xd(this,de),this.fit=!1}firstUpdated(){Se(this,de,Eo).call(this)}updated(){Se(this,de,Eo).call(this)}render(){return c`<slot></slot>`}},de=new WeakSet,Eo=function(){Se(this,de,Te).call(this,"--col-span",this.hasAttribute("col-span")?String(this.colSpan):null),Se(this,de,Te).call(this,"--col-span-compact",this.hasAttribute("col-span-compact")?String(this.colSpanCompact):null),Se(this,de,Te).call(this,"--col-span-medium",this.hasAttribute("col-span-medium")?String(this.colSpanMedium):null),Se(this,de,Te).call(this,"--col-span-expanded",this.hasAttribute("col-span-expanded")?String(this.colSpanExpanded):null),Se(this,de,Te).call(this,"--row-rule",this.hasAttribute("row-span")?`span ${this.rowSpan}`:null),Se(this,de,Te).call(this,"--row-rule-compact",this.hasAttribute("row-span-compact")?`span ${this.rowSpanCompact}`:null),Se(this,de,Te).call(this,"--row-rule-medium",this.hasAttribute("row-span-medium")?`span ${this.rowSpanMedium}`:null),Se(this,de,Te).call(this,"--row-rule-expanded",this.hasAttribute("row-span-expanded")?`span ${this.rowSpanExpanded}`:null),this.align?(this.style.setProperty("--scb-grid-item-align",this.align),this.style.setProperty("align-self",this.align)):(this.style.removeProperty("--scb-grid-item-align"),this.style.removeProperty("align-self")),this.justify?(this.style.setProperty("--scb-grid-item-justify",this.justify),this.style.setProperty("justify-self",this.justify)):(this.style.removeProperty("--scb-grid-item-justify"),this.style.removeProperty("justify-self"))},Te=function(o,e){e===null||e===""?this.style.removeProperty(o):this.style.setProperty(o,e)},a.ScbGridItem.styles=b`
|
|
4600
4605
|
:host {
|
|
4601
4606
|
box-sizing: border-box;
|
|
4602
4607
|
display: block;
|
|
@@ -4606,7 +4611,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4606
4611
|
}
|
|
4607
4612
|
:host([fit]) { block-size: 100%; }
|
|
4608
4613
|
:host([fit]) ::slotted(*) { block-size: 100%; }
|
|
4609
|
-
`,ce([l({type:Number,attribute:"col-span",reflect:!0})],a.ScbGridItem.prototype,"colSpan",2),ce([l({type:Number,attribute:"col-span-compact",reflect:!0})],a.ScbGridItem.prototype,"colSpanCompact",2),ce([l({type:Number,attribute:"col-span-medium",reflect:!0})],a.ScbGridItem.prototype,"colSpanMedium",2),ce([l({type:Number,attribute:"col-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"colSpanExpanded",2),ce([l({type:Number,attribute:"row-span",reflect:!0})],a.ScbGridItem.prototype,"rowSpan",2),ce([l({type:Number,attribute:"row-span-compact",reflect:!0})],a.ScbGridItem.prototype,"rowSpanCompact",2),ce([l({type:Number,attribute:"row-span-medium",reflect:!0})],a.ScbGridItem.prototype,"rowSpanMedium",2),ce([l({type:Number,attribute:"row-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"rowSpanExpanded",2),ce([l({type:String,reflect:!0})],a.ScbGridItem.prototype,"align",2),ce([l({type:String,reflect:!0})],a.ScbGridItem.prototype,"justify",2),ce([l({type:Boolean,reflect:!0})],a.ScbGridItem.prototype,"fit",2),a.ScbGridItem=ce([f("scb-grid-item")],a.ScbGridItem);var Zd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,us=o=>{throw TypeError(o)},
|
|
4614
|
+
`,ce([l({type:Number,attribute:"col-span",reflect:!0})],a.ScbGridItem.prototype,"colSpan",2),ce([l({type:Number,attribute:"col-span-compact",reflect:!0})],a.ScbGridItem.prototype,"colSpanCompact",2),ce([l({type:Number,attribute:"col-span-medium",reflect:!0})],a.ScbGridItem.prototype,"colSpanMedium",2),ce([l({type:Number,attribute:"col-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"colSpanExpanded",2),ce([l({type:Number,attribute:"row-span",reflect:!0})],a.ScbGridItem.prototype,"rowSpan",2),ce([l({type:Number,attribute:"row-span-compact",reflect:!0})],a.ScbGridItem.prototype,"rowSpanCompact",2),ce([l({type:Number,attribute:"row-span-medium",reflect:!0})],a.ScbGridItem.prototype,"rowSpanMedium",2),ce([l({type:Number,attribute:"row-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"rowSpanExpanded",2),ce([l({type:String,reflect:!0})],a.ScbGridItem.prototype,"align",2),ce([l({type:String,reflect:!0})],a.ScbGridItem.prototype,"justify",2),ce([l({type:Boolean,reflect:!0})],a.ScbGridItem.prototype,"fit",2),a.ScbGridItem=ce([f("scb-grid-item")],a.ScbGridItem);var Zd=Object.defineProperty,Jd=Object.getOwnPropertyDescriptor,us=o=>{throw TypeError(o)},si=(o,e,t,i)=>{for(var r=i>1?void 0:i?Jd(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&&Zd(e,t,r),r},Ao=(o,e,t)=>e.has(o)||us("Cannot "+t),Oe=(o,e,t)=>(Ao(o,e,"read from private field"),t?t.call(o):e.get(o)),Ct=(o,e,t)=>e.has(o)?us("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),pt=(o,e,t,i)=>(Ao(o,e,"write to private field"),e.set(o,t),t),Pe=(o,e,t)=>(Ao(o,e,"access private method"),t),Et,ni,At,li,he,vs,Io,ms,zo,To,bs,fs,Oo;a.ScbFooter=class extends y{constructor(){super(...arguments),Ct(this,he),this.maxWidth="1440px",this.deferPaint=!1,this.sections=[],this.description="Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.",Ct(this,Et,null),Ct(this,ni,""),Ct(this,At),Ct(this,li,!1),Ct(this,To,8)}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-footer-max-width",this.maxWidth),Pe(this,he,zo).call(this,!0),Pe(this,he,vs).call(this)}updated(e){e.has("maxWidth")&&this.style.setProperty("--scb-footer-max-width",this.maxWidth)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=Oe(this,At))==null||e.disconnect()}render(){const e=Oe(this,he,ms);return c`
|
|
4610
4615
|
<footer class="outer" role="contentinfo">
|
|
4611
4616
|
<nav aria-label="Sidfot med länkar">
|
|
4612
4617
|
<scb-grid
|
|
@@ -4635,17 +4640,17 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4635
4640
|
</div>
|
|
4636
4641
|
</div>
|
|
4637
4642
|
</footer>
|
|
4638
|
-
`}},Et=new WeakMap,
|
|
4643
|
+
`}},Et=new WeakMap,ni=new WeakMap,At=new WeakMap,li=new WeakMap,he=new WeakSet,vs=function(){var o;(o=Oe(this,At))==null||o.disconnect(),pt(this,At,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){Pe(this,he,Io).call(this);return}}if(t.type==="attributes"&&(t.target.tagName==="SCB-FOOTER-SECTION"||t.target.tagName==="SCB-LINK")){Pe(this,he,Io).call(this);return}}})),Oe(this,At).observe(this,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["title","href","target"]})},Io=function(){Oe(this,li)||(pt(this,li,!0),queueMicrotask(()=>{pt(this,li,!1),Pe(this,he,zo).call(this,!1)}))},ms=function(){return Oe(this,Et)??this.sections??[]},zo=function(o=!1){const e=Array.from(this.querySelectorAll("scb-footer-section"));if(!e.length){Oe(this,Et)!==null&&(pt(this,Et,null),pt(this,ni,""),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!==Oe(this,ni)&&(pt(this,ni,i),pt(this,Et,t),o||this.requestUpdate())},To=new WeakMap,bs=function(o){const e=[],i=o.length;if(i>0&&i<4)return e.push(c`
|
|
4639
4644
|
<scb-grid-item
|
|
4640
4645
|
col-span-compact="4"
|
|
4641
4646
|
col-span-medium="8"
|
|
4642
4647
|
col-span-expanded="${Oe(this,To)}"
|
|
4643
4648
|
>
|
|
4644
4649
|
<div class="center-row">
|
|
4645
|
-
${o.map((
|
|
4650
|
+
${o.map((r,s)=>Pe(this,he,Oo).call(this,r,s,!0))}
|
|
4646
4651
|
</div>
|
|
4647
4652
|
</scb-grid-item>
|
|
4648
|
-
`),e;for(let
|
|
4653
|
+
`),e;for(let r=0;r<i;r++)e.push(Pe(this,he,fs).call(this,o[r],r));return e},fs=function(o,e){return c`
|
|
4649
4654
|
<scb-grid-item
|
|
4650
4655
|
col-span-compact="4"
|
|
4651
4656
|
col-span-medium="4"
|
|
@@ -4657,9 +4662,9 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4657
4662
|
<section class="group ${t?"group--centered":""}" aria-labelledby=${`scb-footer-sec-${e}`}>
|
|
4658
4663
|
<h3 id=${`scb-footer-sec-${e}`} class="title">${o.title}</h3>
|
|
4659
4664
|
<ul>
|
|
4660
|
-
${o.links.map(
|
|
4665
|
+
${o.links.map(i=>c`
|
|
4661
4666
|
<li>
|
|
4662
|
-
<scb-link .href=${
|
|
4667
|
+
<scb-link .href=${i.href} .target=${i.target??void 0}>${i.label}</scb-link>
|
|
4663
4668
|
</li>
|
|
4664
4669
|
`)}
|
|
4665
4670
|
</ul>
|
|
@@ -4813,7 +4818,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4813
4818
|
|
|
4814
4819
|
.spacer { display: none; }
|
|
4815
4820
|
@media (min-width: 840px) { .spacer { display: block; } }
|
|
4816
|
-
`,
|
|
4821
|
+
`,si([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),si([l({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),si([l({type:Array})],a.ScbFooter.prototype,"sections",2),si([l({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=si([f("scb-footer")],a.ScbFooter);var Qd=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,gs=o=>{throw TypeError(o)},Le=(o,e,t,i)=>{for(var r=i>1?void 0:i?eh(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&&Qd(e,t,r),r},th=(o,e,t)=>e.has(o)||gs("Cannot "+t),ih=(o,e,t)=>e.has(o)?gs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ys=(o,e,t)=>(th(o,e,"access private method"),t),dr,Po;a.ScbStack=class extends y{constructor(){super(...arguments),ih(this,dr),this.direction="column",this.gap="",this.rowGap="",this.columnGap="",this.align="stretch",this.justify="start",this.wrap=!1,this.inline=!1}firstUpdated(){ys(this,dr,Po).call(this)}updated(){ys(this,dr,Po).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="base"><slot></slot></div>`}},dr=new WeakSet,Po=function(){this.style.setProperty("--scb-stack-direction",this.direction);const o="var(--spacing-5, 16px)",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-stack-gap",`${t}`),this.style.setProperty("--scb-stack-row-gap",t),this.style.setProperty("--scb-stack-column-gap",i);const r={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},s={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};this.style.setProperty("--scb-stack-align",r[this.align]??"stretch"),this.style.setProperty("--scb-stack-justify",s[this.justify]??"flex-start"),this.style.setProperty("--scb-stack-wrap",this.wrap?"wrap":"nowrap")},a.ScbStack.styles=b`
|
|
4817
4822
|
:host {
|
|
4818
4823
|
box-sizing: border-box;
|
|
4819
4824
|
display: block;
|
|
@@ -4845,26 +4850,26 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4845
4850
|
:host([direction="row"]) ::slotted(*) {
|
|
4846
4851
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
4847
4852
|
}
|
|
4848
|
-
`,Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Le([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Le([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Le([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Le([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Le([f("scb-stack")],a.ScbStack);var ih=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,Lo=(o,e,t,r)=>{for(var i=r>1?void 0:r?oh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&ih(e,t,i),i};a.ScbHeaderDrawerGroup=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerGroup.styles=b`:host{display:none !important}`,Lo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"label",2),Lo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"icon",2),a.ScbHeaderDrawerGroup=Lo([f("scb-header-drawer-group")],a.ScbHeaderDrawerGroup);var ah=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,hi=(o,e,t,r)=>{for(var i=r>1?void 0:r?sh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&ah(e,t,i),i};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}`,hi([l({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),hi([l({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),hi([l({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=hi([f("scb-header-drawer-item")],a.ScbHeaderDrawerItem);var nh=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,Do=(o,e,t,r)=>{for(var i=r>1?void 0:r?lh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&nh(e,t,i),i};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}`,Do([l({type:String})],a.ScbHeaderTab.prototype,"label",2),Do([l({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Do([f("scb-header-tab")],a.ScbHeaderTab);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,pi=(o,e,t,r)=>{for(var i=r>1?void 0:r?dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&ch(e,t,i),i};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}`,pi([l({type:String})],a.ScbHeaderUtility.prototype,"label",2),pi([l({type:String})],a.ScbHeaderUtility.prototype,"href",2),pi([l({type:String})],a.ScbHeaderUtility.prototype,"target",2),a.ScbHeaderUtility=pi([f("scb-header-utility")],a.ScbHeaderUtility);var hh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,I=(o,e,t,r)=>{for(var i=r>1?void 0:r?ph(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&hh(e,t,i),i};const Ro={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}),r=[],i=[],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"){r.push({label:h.getAttribute("label")??"",href:h.getAttribute("href")??"#"});continue}if(p==="scb-header-utility"){i.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=r,this._slotUtils=i,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 r=window.innerWidth,i=e.clientWidth,s=this._overflows(this._util),n=this._overflows(this._tabsEl),h=r<this.BP_MD||s||n;this._collapsed?!h&&i>=this._unlockAtWidth&&this._setCollapsed(!1):h&&(this._unlockAtWidth=i+this._HYST,this._setCollapsed(!0));let p=!1;if(this.showSearch&&r>=this.BP_SM&&r<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)),z=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),T=this.showDrawer&&(r<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+z+C+z+T+8>i+.5}this._setHideSearch(p);let v=!1;if(this.showDrawer&&(r<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),z=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(i>=this._logoTextUnlockAt):z>i+.5&&(v=!0,this._logoTextUnlockAt=i+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 i;const t=this._searchEl;if(t!=null&&t.submit&&typeof t.submit=="function"){t.submit();return}const r=(t==null?void 0:t.value)??"";this.searchText=r,this.dispatchEvent(new CustomEvent("search-click",{detail:{value:r},bubbles:!0,composed:!0})),(i=t==null?void 0:t.focus)==null||i.call(t)},this._onTabsChange=e=>{var n,h,p;const t=e,r=((n=t==null?void 0:t.detail)==null?void 0:n.activeTabIndex)??((h=e.target)==null?void 0:h.activeTabIndex)??0;this.activeTab=r;const s=((p=(this._slotTabs.length?this._slotTabs:this.tabs)[r])==null?void 0:p.href)??"";this.dispatchEvent(new CustomEvent("tab-change",{detail:{index:r,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,r;this.searchText=((t=e.detail)==null?void 0:t.value)??"",this.dispatchEvent(new CustomEvent("search-change",{detail:{value:this.searchText,active:(r=e.detail)==null?void 0:r.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(()=>Pd),this.__drawerLoaded=!0})()),this.__ensureDrawerPromise}async __ensureTabs(){if(!this.__tabsLoaded)return this.__ensureTabsPromise??(this.__ensureTabsPromise=(async()=>{await Promise.all([Promise.resolve().then(()=>np),Promise.resolve().then(()=>op)]),this.__tabsLoaded=!0})()),this.__ensureTabsPromise}async __ensureSearch(){if(!this.__searchLoaded)return this.__ensureSearchPromise??(this.__ensureSearchPromise=(async()=>{await Promise.resolve().then(()=>Wc),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(r=>{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 r=Number.parseFloat(String(e??"").trim());return Number.isFinite(r)?r:t}_tokenPx(e,t){const r=getComputedStyle(this);return this._num(r.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,r=()=>this._ensureDrawerMounted();t==null||t.addEventListener("pointerenter",r,{once:!0}),t==null||t.addEventListener("focusin",r,{once:!0}),t==null||t.addEventListener("touchstart",r,{once:!0,passive:!0});const i=s=>"requestIdleCallback"in window?window.requestIdleCallback(s,{timeout:1500}):setTimeout(s,600);this.showDrawer&&i(()=>{this.__ensureDrawer()}),this._collapsed||i(()=>{this.__ensureTabs()}),this.showSearch&&i(()=>{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,r;const e=this.renderRoot.querySelector(`#${this._drawerId}`);e&&(e.open=!0,e.setAttribute("open",""),(t=e.show)==null||t.call(e),(r=e.openDrawer)==null||r.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((r,i)=>{r.selected=i===this.activeTab})}_renderDrawerNodes(e){return!e||e.length===0?c``:c`${e.map(t=>{const r=Array.isArray(t.children)&&t.children.length>0;return c`
|
|
4853
|
+
`,Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Le([l({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Le([l({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Le([l({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Le([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Le([l({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Le([f("scb-stack")],a.ScbStack);var rh=Object.defineProperty,oh=Object.getOwnPropertyDescriptor,Lo=(o,e,t,i)=>{for(var r=i>1?void 0:i?oh(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.ScbHeaderDrawerGroup=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerGroup.styles=b`:host{display:none !important}`,Lo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"label",2),Lo([l({type:String})],a.ScbHeaderDrawerGroup.prototype,"icon",2),a.ScbHeaderDrawerGroup=Lo([f("scb-header-drawer-group")],a.ScbHeaderDrawerGroup);var ah=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,hr=(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&&ah(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}`,hr([l({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),hr([l({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),hr([l({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=hr([f("scb-header-drawer-item")],a.ScbHeaderDrawerItem);var nh=Object.defineProperty,lh=Object.getOwnPropertyDescriptor,Do=(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&&nh(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}`,Do([l({type:String})],a.ScbHeaderTab.prototype,"label",2),Do([l({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Do([f("scb-header-tab")],a.ScbHeaderTab);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,pr=(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&&ch(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}`,pr([l({type:String})],a.ScbHeaderUtility.prototype,"label",2),pr([l({type:String})],a.ScbHeaderUtility.prototype,"href",2),pr([l({type:String})],a.ScbHeaderUtility.prototype,"target",2),a.ScbHeaderUtility=pr([f("scb-header-utility")],a.ScbHeaderUtility);var hh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,I=(o,e,t,i)=>{for(var r=i>1?void 0:i?ph(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&&hh(e,t,r),r};const Ro={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)),z=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),T=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+z+C+z+T+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),z=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(r>=this._logoTextUnlockAt):z>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(()=>Pd),this.__drawerLoaded=!0})()),this.__ensureDrawerPromise}async __ensureTabs(){if(!this.__tabsLoaded)return this.__ensureTabsPromise??(this.__ensureTabsPromise=(async()=>{await Promise.all([Promise.resolve().then(()=>np),Promise.resolve().then(()=>op)]),this.__tabsLoaded=!0})()),this.__ensureTabsPromise}async __ensureSearch(){if(!this.__searchLoaded)return this.__ensureSearchPromise??(this.__ensureSearchPromise=(async()=>{await Promise.resolve().then(()=>Wc),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`
|
|
4849
4854
|
<scb-drawer-item
|
|
4850
4855
|
label=${t.label}
|
|
4851
4856
|
?selected=${!1}
|
|
4852
4857
|
leading-icon=${t.icon??""}
|
|
4853
4858
|
item-href=${t.href??""}
|
|
4854
4859
|
>
|
|
4855
|
-
${
|
|
4860
|
+
${i?c`
|
|
4856
4861
|
<scb-sub-drawer label=${t.label}>
|
|
4857
|
-
${t.children.map(
|
|
4862
|
+
${t.children.map(r=>c`
|
|
4858
4863
|
<scb-drawer-item
|
|
4859
|
-
label=${
|
|
4860
|
-
item-href=${
|
|
4861
|
-
leading-icon=${
|
|
4864
|
+
label=${r.label}
|
|
4865
|
+
item-href=${r.href??""}
|
|
4866
|
+
leading-icon=${r.icon??""}
|
|
4862
4867
|
></scb-drawer-item>
|
|
4863
4868
|
`)}
|
|
4864
4869
|
</scb-sub-drawer>
|
|
4865
4870
|
`:u}
|
|
4866
4871
|
</scb-drawer-item>
|
|
4867
|
-
`})}`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}render(){const e=this._slotTabs.length?this._slotTabs:this.tabs,t=this._slotUtils.length?this._slotUtils:this.utilityItems,
|
|
4872
|
+
`})}`}_syncFlags(e,t){this.toggleAttribute("data-no-utility",e),this.toggleAttribute("data-no-search",t)}render(){const e=this._slotTabs.length?this._slotTabs:this.tabs,t=this._slotUtils.length?this._slotUtils:this.utilityItems,i=this._slotMenu.length?this._slotMenu:this.menuData??[];this._syncFlags(t.length===0,!this.showSearch);const r=this.searchHeight&&this.searchHeight.trim()?`--scb-search-height:${this.searchHeight.trim()}`:u;return c`
|
|
4868
4873
|
<slot id="data-slot" @slotchange=${()=>{this._harvest(),this._attachSlotObservers()}} hidden></slot>
|
|
4869
4874
|
|
|
4870
4875
|
<div
|
|
@@ -4888,11 +4893,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4888
4893
|
</nav>
|
|
4889
4894
|
|
|
4890
4895
|
${this.showSearch?c`
|
|
4891
|
-
<div class="search" style=${
|
|
4896
|
+
<div class="search" style=${r} @focusin=${()=>this.__ensureSearch()} @pointerenter=${()=>this.__ensureSearch()}>
|
|
4892
4897
|
<scb-search
|
|
4893
4898
|
id=${this._searchId}
|
|
4894
4899
|
size="compact"
|
|
4895
|
-
style=${
|
|
4900
|
+
style=${r}
|
|
4896
4901
|
.value=${this.searchText}
|
|
4897
4902
|
.supportingText=${this.searchPlaceholder??""}
|
|
4898
4903
|
@scb-search-input=${this._onSearchInput}
|
|
@@ -4950,7 +4955,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
4950
4955
|
|
|
4951
4956
|
${this.drawerSectionLabel?c`<scb-drawer-section .label=${this.drawerSectionLabel}></scb-drawer-section>`:u}
|
|
4952
4957
|
|
|
4953
|
-
${this._renderDrawerNodes(
|
|
4958
|
+
${this._renderDrawerNodes(i)}
|
|
4954
4959
|
|
|
4955
4960
|
${this.includeUtilityInDrawer&&((t==null?void 0:t.length)??0)>0?c`
|
|
4956
4961
|
<scb-drawer-section label=''></scb-drawer-section>
|
|
@@ -5115,7 +5120,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5115
5120
|
:host([data-hide-logo-text]) .logo-text {
|
|
5116
5121
|
display: none;
|
|
5117
5122
|
}
|
|
5118
|
-
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),I([l({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),I([l({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),I([l({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),I([l({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),I([l({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),I([l({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),I([l({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),I([l({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),I([l({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),I([l({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),I([l({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),I([l({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),I([l({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),I([l({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),I([l({attribute:"show-drawer",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"showDrawer",2),I([l({attribute:"show-search",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"showSearch",2),I([l({attribute:"include-utility-in-drawer",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),I([l({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),I([l({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),I([l({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),I([l({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),I([w()],a.ScbHeader.prototype,"_drawerId",2),I([w()],a.ScbHeader.prototype,"_drawerMounted",2),I([w()],a.ScbHeader.prototype,"_drawerExpanded",2),I([w()],a.ScbHeader.prototype,"_searchId",2),I([w()],a.ScbHeader.prototype,"_slotTabs",2),I([w()],a.ScbHeader.prototype,"_slotUtils",2),I([w()],a.ScbHeader.prototype,"_slotMenu",2),I([w()],a.ScbHeader.prototype,"_collapsed",2),I([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=I([f("scb-header")],a.ScbHeader);var uh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,It=(o,e,t,
|
|
5123
|
+
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),I([l({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),I([l({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),I([l({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),I([l({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),I([l({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),I([l({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),I([l({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),I([l({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),I([l({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),I([l({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),I([l({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),I([l({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),I([l({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),I([l({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),I([l({attribute:"show-drawer",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"showDrawer",2),I([l({attribute:"show-search",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"showSearch",2),I([l({attribute:"include-utility-in-drawer",reflect:!0,converter:Ro})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),I([l({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),I([l({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),I([l({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),I([l({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),I([w()],a.ScbHeader.prototype,"_drawerId",2),I([w()],a.ScbHeader.prototype,"_drawerMounted",2),I([w()],a.ScbHeader.prototype,"_drawerExpanded",2),I([w()],a.ScbHeader.prototype,"_searchId",2),I([w()],a.ScbHeader.prototype,"_slotTabs",2),I([w()],a.ScbHeader.prototype,"_slotUtils",2),I([w()],a.ScbHeader.prototype,"_slotMenu",2),I([w()],a.ScbHeader.prototype,"_collapsed",2),I([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=I([f("scb-header")],a.ScbHeader);var uh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,It=(o,e,t,i)=>{for(var r=i>1?void 0:i?vh(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&&uh(e,t,r),r};a.ScbHorizontalScroller=class extends y{constructor(){super(...arguments),this.variant="standard",this.width="100%",this.showScrollbar=!1,this.rightScrollButtonLabel="Scrolla höger",this.leftScrollButtonLabel="Scrolla vänster",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(g){g.deltaY!==0&&(g.preventDefault(),e.scrollLeft+=g.deltaY)},{passive:!1}));const s=()=>{if(r&&t&&i){const g=r.getBoundingClientRect();t.style.height=`${g.height}px`,i.style.height=`${g.height}px`}};s(),r&&new ResizeObserver(s).observe(r),this.updateScrollButtons()}updated(e){var h,p,v,g;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=(g=this.shadowRoot)==null?void 0:g.querySelector(".scb-horizontal-scroller");s&&(s.addEventListener("scroll",this.handleScroll),s.addEventListener("wheel",function(m){m.deltaY!==0&&(m.preventDefault(),s.scrollLeft+=m.deltaY)},{passive:!1})),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(){switch(this.variant){case"inline":return c`
|
|
5119
5124
|
<div class="scb-horizontal-scroller" tabindex="0">
|
|
5120
5125
|
<div class="scroll-shadow-left"></div>
|
|
5121
5126
|
<slot></slot>
|
|
@@ -5248,12 +5253,12 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5248
5253
|
gap: var(--spacing-5);
|
|
5249
5254
|
}
|
|
5250
5255
|
|
|
5251
|
-
`,It([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),It([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),It([l({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),It([l({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),It([l({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),a.ScbHorizontalScroller=It([f("scb-horizontal-scroller")],a.ScbHorizontalScroller);var mh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,
|
|
5256
|
+
`,It([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),It([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),It([l({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),It([l({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),It([l({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),a.ScbHorizontalScroller=It([f("scb-horizontal-scroller")],a.ScbHorizontalScroller);var mh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,re=(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&&mh(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," ")}render(){const e=!!this.cardHref,t=this.formatNumber(this.keyfigure),i=(this.unit||"").trim(),r=i?`${t} ${i}`:t;return c`
|
|
5252
5257
|
<div
|
|
5253
5258
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
5254
5259
|
role=${e?"link":"group"}
|
|
5255
5260
|
tabindex=${e?"0":"-1"}
|
|
5256
|
-
aria-label=${this.subtitle||
|
|
5261
|
+
aria-label=${this.subtitle||r}
|
|
5257
5262
|
@click=${e?this.__handleHrefNavigation:null}
|
|
5258
5263
|
@keydown=${e?this.__onKeyDown:null}
|
|
5259
5264
|
style="cursor:${e?"pointer":"default"};"
|
|
@@ -5263,8 +5268,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5263
5268
|
|
|
5264
5269
|
${this.keyfigure!==void 0&&this.keyfigure!==null&&this.keyfigure!==""?c`
|
|
5265
5270
|
<div class="keyfigure">
|
|
5266
|
-
<span class="value" aria-label="${
|
|
5267
|
-
${t}${
|
|
5271
|
+
<span class="value" aria-label="${r}">
|
|
5272
|
+
${t}${i?c`<span class="unit" aria-hidden="true">\u00A0${i}</span>`:""}
|
|
5268
5273
|
</span>
|
|
5269
5274
|
${e?c`<md-icon>arrow_forward</md-icon>`:""}
|
|
5270
5275
|
</div>
|
|
@@ -5384,7 +5389,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5384
5389
|
line-height: var(--md-sys-typescale-display-medium-line-height);
|
|
5385
5390
|
letter-spacing: var(--md-sys-typescale-display-medium-tracking);
|
|
5386
5391
|
}
|
|
5387
|
-
`,
|
|
5392
|
+
`,re([l({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),re([l({type:String,attribute:"subtitle"})],a.ScbKeyFigureCard.prototype,"subtitle",2),re([l({type:String,attribute:"supporting-text"})],a.ScbKeyFigureCard.prototype,"supportingText",2),re([l({type:String,attribute:"card-href"})],a.ScbKeyFigureCard.prototype,"cardHref",2),re([l({type:String})],a.ScbKeyFigureCard.prototype,"icon",2),re([l({type:String})],a.ScbKeyFigureCard.prototype,"size",2),re([l({type:String})],a.ScbKeyFigureCard.prototype,"unit",2),re([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"width",2),re([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbKeyFigureCard.prototype,"maxWidth",2),re([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"height",2),re([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbKeyFigureCard.prototype,"maxHeight",2),re([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"sizing",2),a.ScbKeyFigureCard=re([f("scb-keyfigure-card")],a.ScbKeyFigureCard);var fh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,We=(o,e,t,i)=>{for(var r=i>1?void 0:i?gh(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&&fh(e,t,r),r};a.ScbMenuItem=class extends y{constructor(){super(...arguments),this.label="",this.hasSubMenu=!1,this.openLeft=!1,this.divider=!1,this.leadingIcon="",this.trailingIcon="",this.itemHref="",this.handleClick=e=>{this.itemHref?this._navigateToHref(e):this._toggleSubMenu()},this._onBlur=e=>{const t=this.closest("scb-sub-menu");if(t&&t.open){const i=e.relatedTarget;(!i||!t.contains(i))&&t.dispatchEvent(new CustomEvent("hide-submenu",{bubbles:!0,composed:!0}))}},this._onFocus=()=>{const e=this.nextElementSibling;this.classList.contains("open-submenu")&&(e&&e.tagName==="SCB-SUB-MENU"&&e.hasAttribute("open")||this.classList.remove("open-submenu"))},this._onKeyDown=e=>{var t,i,r,s,n,h;if(e.key==="Enter"||e.key===" "){e.preventDefault(),this.handleClick(e);return}if(e.key==="ArrowDown"){e.preventDefault();let p=this.nextElementSibling;for(;p&&p.tagName!=="SCB-MENU-ITEM";)p=p.nextElementSibling;p&&((i=(t=p.shadowRoot)==null?void 0:t.querySelector("li"))==null||i.focus());return}if(e.key==="ArrowUp"){e.preventDefault();let p=this.previousElementSibling;for(;p&&p.tagName!=="SCB-MENU-ITEM";)p=p.previousElementSibling;p&&((s=(r=p.shadowRoot)==null?void 0:r.querySelector("li"))==null||s.focus());return}if(e.key==="ArrowRight"){e.preventDefault();const p=this.nextElementSibling;p&&p.tagName==="SCB-SUB-MENU"&&(p.hasAttribute("open")||(this._toggleSubMenu(),p.dispatchEvent(new CustomEvent("show-submenu",{bubbles:!0,composed:!0}))),setTimeout(()=>{var g,m;const v=p.querySelector("scb-menu-item");v&&((m=(g=v.shadowRoot)==null?void 0:g.querySelector("li"))==null||m.focus())},0));return}if(e.key==="ArrowLeft"){e.preventDefault();const p=this.nextElementSibling;if(p&&p.tagName==="SCB-SUB-MENU"&&p.hasAttribute("open")){this._toggleSubMenu(),p.dispatchEvent(new CustomEvent("hide-submenu",{bubbles:!0,composed:!0}));return}const v=this.closest("scb-sub-menu");if(v){const g=v.previousElementSibling;g&&g.tagName==="SCB-MENU-ITEM"&&((h=(n=g.shadowRoot)==null?void 0:n.querySelector("li"))==null||h.focus())}return}}}updated(){const e=this.nextElementSibling;this.hasSubMenu=!!(e&&e.tagName==="SCB-SUB-MENU"),this.openLeft=!!(this.hasSubMenu&&e&&e.hasAttribute("open-left"))}render(){return c`
|
|
5388
5393
|
${this.divider?c`<scb-divider></scb-divider>`:""}
|
|
5389
5394
|
<li @click=${this.handleClick} @keydown=${this._onKeyDown} @blur=${this._onBlur} @focus=${this._onFocus} role="menuitem" tabindex="0">
|
|
5390
5395
|
|
|
@@ -5445,7 +5450,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5445
5450
|
:host li:focus {
|
|
5446
5451
|
outline: none;
|
|
5447
5452
|
}
|
|
5448
|
-
`,We([l({type:String})],a.ScbMenuItem.prototype,"label",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"hasSubMenu",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"openLeft",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"divider",2),We([l({type:String,attribute:"leading-icon"})],a.ScbMenuItem.prototype,"leadingIcon",2),We([l({type:String,attribute:"trailing-icon"})],a.ScbMenuItem.prototype,"trailingIcon",2),We([l({type:String,attribute:"item-href"})],a.ScbMenuItem.prototype,"itemHref",2),a.ScbMenuItem=We([f("scb-menu-item")],a.ScbMenuItem);var yh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,_s=(o,e,t,
|
|
5453
|
+
`,We([l({type:String})],a.ScbMenuItem.prototype,"label",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"hasSubMenu",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"openLeft",2),We([l({type:Boolean})],a.ScbMenuItem.prototype,"divider",2),We([l({type:String,attribute:"leading-icon"})],a.ScbMenuItem.prototype,"leadingIcon",2),We([l({type:String,attribute:"trailing-icon"})],a.ScbMenuItem.prototype,"trailingIcon",2),We([l({type:String,attribute:"item-href"})],a.ScbMenuItem.prototype,"itemHref",2),a.ScbMenuItem=We([f("scb-menu-item")],a.ScbMenuItem);var yh=Object.defineProperty,_h=Object.getOwnPropertyDescriptor,_s=(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&&yh(e,t,r),r};a.ScbSubMenu=class extends y{constructor(){super(...arguments),this.open=!1,this._show=()=>{this.setAttribute("open",""),this.open=!0},this._hide=e=>{this.removeAttribute("open"),this.open=!1,e&&e.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("show-submenu",this._show),this.addEventListener("hide-submenu",this._hide)}disconnectedCallback(){this.removeEventListener("show-submenu",this._show),this.removeEventListener("hide-submenu",this._hide),super.disconnectedCallback()}firstUpdated(){let e=0,t=this.parentElement;for(;t;)t.tagName==="SCB-SUB-MENU"&&e++,t=t.parentElement;e%2===1?this.setAttribute("open-left",""):this.removeAttribute("open-left")}render(){return c`
|
|
5449
5454
|
<div role="menu" class="submenu${this.open?" open":""}">
|
|
5450
5455
|
<slot></slot>
|
|
5451
5456
|
</div>
|
|
@@ -5477,20 +5482,22 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5477
5482
|
.submenu.open {
|
|
5478
5483
|
display: block;
|
|
5479
5484
|
}
|
|
5480
|
-
`,_s([l({type:Boolean,reflect:!0})],a.ScbSubMenu.prototype,"open",2),a.ScbSubMenu=_s([f("scb-sub-menu")],a.ScbSubMenu);var xh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,Bo=(o,e,t,
|
|
5485
|
+
`,_s([l({type:Boolean,reflect:!0})],a.ScbSubMenu.prototype,"open",2),a.ScbSubMenu=_s([f("scb-sub-menu")],a.ScbSubMenu);var xh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,Bo=(o,e,t,i)=>{for(var r=i>1?void 0:i?wh(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.ScbMenu=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.__lastTriggerEl=null,this.__onDocumentClick=e=>{if(!this.inSb&&this.open&&!this.isClickInScbMenu(e)){this.__setOpen(!1);return}const t=this.__getActionFromEvent(e);if(t){t==="open"&&(this.__setOpen(!0),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),t==="close"&&(this.__setOpen(!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))),t==="toggle"&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0}))),e.stopPropagation();return}},this.__onDocumentKeydown=e=>{if(this.open&&e.key==="Escape"){this.__setOpen(!1);return}}}render(){return c`
|
|
5481
5486
|
<div
|
|
5482
5487
|
role="menu"
|
|
5483
5488
|
class="scb-menu-panel${this.open?" open":""}"
|
|
5484
5489
|
>
|
|
5485
5490
|
<slot></slot>
|
|
5486
5491
|
</div>
|
|
5487
|
-
`}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const
|
|
5492
|
+
`}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),super.disconnectedCallback()}__setOpen(e){this.open=e}__getActionFromEvent(e){if(!this.id)return null;const t=e.composedPath();for(const i of t)if(i instanceof Element){if(i.getAttribute("data-menu-open")===this.id)return this.__lastTriggerEl=i,"open";if(i.getAttribute("data-menu-close")===this.id)return this.__lastTriggerEl=i,"close";if(i.getAttribute("data-menu-toggle")===this.id)return this.__lastTriggerEl=i,"toggle";if(i.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=i,"toggle"}return null}isClickInScbMenu(e){return e.composedPath().some(i=>i instanceof Element&&(i.tagName==="SCB-MENU"||i.tagName==="SCB-SUB-MENU"))}updated(e){e.has("open")&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}__applyOpenSideEffects(){this.__updateTriggersExpanded()}__updateTriggersExpanded(){if(!this.id)return;document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}},a.ScbMenu.styles=b`
|
|
5488
5493
|
:host {
|
|
5489
5494
|
position: absolute;
|
|
5490
5495
|
display: block;
|
|
5491
5496
|
width: fit-content;
|
|
5497
|
+
font-family: var(--brand-font);
|
|
5492
5498
|
--scb-menu-max-width: 300px;
|
|
5493
5499
|
--scb-menu-max-height: 600px;
|
|
5500
|
+
z-index: 1000;
|
|
5494
5501
|
}
|
|
5495
5502
|
:host > .scb-menu-panel {
|
|
5496
5503
|
padding: var(--spacing-3) 0;
|
|
@@ -5520,7 +5527,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5520
5527
|
opacity 0.25s cubic-bezier(0.23, 1, 0.32, 1),
|
|
5521
5528
|
transform 0.32s cubic-bezier(0.23, 1, 0.32, 1);
|
|
5522
5529
|
}
|
|
5523
|
-
`,Bo([l({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),Bo([l({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=Bo([f("scb-menu")],a.ScbMenu);var Sh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,Ge=(o,e,t,
|
|
5530
|
+
`,Bo([l({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),Bo([l({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=Bo([f("scb-menu")],a.ScbMenu);var Sh=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,Ge=(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&&Sh(e,t,r),r};a.ScbNotification=class extends y{constructor(){super(...arguments),this.open=!1,this.label="",this.type="success",this.linkText="",this.linkhref="#",this.showIcon=!1,this.showCloseButton=!1,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open}});this.dispatchEvent(e)}}_iconForType(){switch(this.type){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":return"info";default:return"info"}}render(){return c`
|
|
5524
5531
|
<div class="notification" type=${this.type} role="alert" aria-live="assertive" aria-atomic="true" style="display: ${this.open?"flex":"none"};">
|
|
5525
5532
|
${this.showIcon||this.showCloseButton?c`<div class="notification-header">
|
|
5526
5533
|
${this.showIcon?c`<md-icon>${this._iconForType()}</md-icon>`:""}
|
|
@@ -5639,8 +5646,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5639
5646
|
opacity: 0;
|
|
5640
5647
|
pointer-events: none;
|
|
5641
5648
|
}
|
|
5642
|
-
`],Ge([l({type:Boolean,reflect:!0})],a.ScbNotification.prototype,"open",2),Ge([l({type:String})],a.ScbNotification.prototype,"label",2),Ge([l({type:String})],a.ScbNotification.prototype,"type",2),Ge([l({type:String,attribute:"link-text"})],a.ScbNotification.prototype,"linkText",2),Ge([l({type:String,attribute:"link-href"})],a.ScbNotification.prototype,"linkhref",2),Ge([l({type:Boolean,attribute:"show-icon"})],a.ScbNotification.prototype,"showIcon",2),Ge([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotification.prototype,"showCloseButton",2),a.ScbNotification=Ge([f("scb-notification")],a.ScbNotification);var $h=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,oe=(o,e,t,
|
|
5643
|
-
<div class="notification ${t} ${
|
|
5649
|
+
`],Ge([l({type:Boolean,reflect:!0})],a.ScbNotification.prototype,"open",2),Ge([l({type:String})],a.ScbNotification.prototype,"label",2),Ge([l({type:String})],a.ScbNotification.prototype,"type",2),Ge([l({type:String,attribute:"link-text"})],a.ScbNotification.prototype,"linkText",2),Ge([l({type:String,attribute:"link-href"})],a.ScbNotification.prototype,"linkhref",2),Ge([l({type:Boolean,attribute:"show-icon"})],a.ScbNotification.prototype,"showIcon",2),Ge([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotification.prototype,"showCloseButton",2),a.ScbNotification=Ge([f("scb-notification")],a.ScbNotification);var $h=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,oe=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ch(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};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.fullHeight=!1,this.fullWidth=!1,this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open}});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":return"info";default:return"info"}}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",i=this.linkhref?"clickable":"";return c`
|
|
5650
|
+
<div class="notification ${t} ${i} ${e}" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true" style="display: ${this.open?"flex":"none"};">
|
|
5644
5651
|
<div class="notification-content">
|
|
5645
5652
|
${this.showIcon||this.showCloseButton?c`<div class="notification-header">
|
|
5646
5653
|
${this.showIcon?c`<md-icon>${this._iconForVariant()}</md-icon>`:""}
|
|
@@ -5814,7 +5821,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5814
5821
|
50% { box-shadow: 0 0 0 7px var(--md-sys-color-primary, #1976d2); }
|
|
5815
5822
|
100% { box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2); }
|
|
5816
5823
|
}
|
|
5817
|
-
`],oe([l({type:String})],a.ScbNotificationCard.prototype,"variant",2),oe([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),oe([l({type:String})],a.ScbNotificationCard.prototype,"title",2),oe([l({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),oe([l({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),oe([l({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),oe([l({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),oe([l({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkhref",2),oe([l({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),oe([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),oe([l({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),oe([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),a.ScbNotificationCard=oe([f("scb-notification-card")],a.ScbNotificationCard);var Eh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,De=(o,e,t,
|
|
5824
|
+
`],oe([l({type:String})],a.ScbNotificationCard.prototype,"variant",2),oe([l({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),oe([l({type:String})],a.ScbNotificationCard.prototype,"title",2),oe([l({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),oe([l({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),oe([l({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),oe([l({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),oe([l({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkhref",2),oe([l({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),oe([l({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),oe([l({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),oe([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),a.ScbNotificationCard=oe([f("scb-notification-card")],a.ScbNotificationCard);var Eh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,De=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ah(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&&Eh(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`
|
|
5818
5825
|
<li>
|
|
5819
5826
|
<span
|
|
5820
5827
|
class="page-number active"
|
|
@@ -5825,15 +5832,15 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5825
5832
|
`:c`
|
|
5826
5833
|
<li>
|
|
5827
5834
|
<scb-link
|
|
5828
|
-
class="page-number${p===
|
|
5835
|
+
class="page-number${p===i?" active":""}"
|
|
5829
5836
|
@click=${()=>{this.page=p,this.dispatchEvent(new CustomEvent("page-change",{detail:{page:p}}))}}
|
|
5830
|
-
aria-current=${p===
|
|
5837
|
+
aria-current=${p===i?"page":void 0}
|
|
5831
5838
|
aria-label="${this.pagingNumberAriaLabel} ${p}"
|
|
5832
5839
|
href=${this.pagingHref}${p}
|
|
5833
|
-
?disabled=${p===
|
|
5840
|
+
?disabled=${p===i}>${p}
|
|
5834
5841
|
</scb-link>
|
|
5835
5842
|
</li>
|
|
5836
|
-
`;if(
|
|
5843
|
+
`;if(r<=8)for(let p=1;p<=r;p++)t.push(h(p));else if(t.push(h(1)),i<=4&&!s){for(let p=2;p<=5;p++)t.push(h(p));r>6?(t.push(c`<li><span class="ellipsis" aria-hidden="true">…</span></li>`),t.push(h(r))):r===6&&t.push(h(r))}else if(i<=3&&s){for(let p=2;p<=3;p++)t.push(h(p));r>4?(t.push(c`<li><span class="ellipsis" aria-hidden="true">…</span></li>`),t.push(h(r))):r===4&&t.push(h(r))}else if(i>=r-(n+1)){t.push(c`<li><span class="ellipsis" aria-hidden="true">…</span></li>`);for(let p=r-n*2;p<=r;p++)p>1&&t.push(h(p))}else{t.push(c`<li><span class="ellipsis" aria-hidden="true">…</span></li>`);for(let p=i-n;p<=i+n;p++)p>1&&p<r&&t.push(h(p));t.push(c`<li><span class="ellipsis" aria-hidden="true">…</span></li>`),t.push(h(r))}return s?c`
|
|
5837
5844
|
<nav aria-label="${this.paginationAriaLabel}" class="pagination ${e}">
|
|
5838
5845
|
<div class="pagination-row">
|
|
5839
5846
|
<div class="prev">
|
|
@@ -5988,7 +5995,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
5988
5995
|
margin-top: 8px;
|
|
5989
5996
|
}
|
|
5990
5997
|
}
|
|
5991
|
-
`],De([l({type:String})],a.ScbPagination.prototype,"variant",2),De([l({type:Number})],a.ScbPagination.prototype,"page",2),De([l({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),De([l({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),De([l({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),De([l({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),De([l({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),De([l({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),a.ScbPagination=De([f("scb-pagination")],a.ScbPagination);var Ih=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,
|
|
5998
|
+
`],De([l({type:String})],a.ScbPagination.prototype,"variant",2),De([l({type:Number})],a.ScbPagination.prototype,"page",2),De([l({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),De([l({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),De([l({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),De([l({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),De([l({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),De([l({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),a.ScbPagination=De([f("scb-pagination")],a.ScbPagination);var Ih=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,ci=(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&&Ih(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`
|
|
5992
5999
|
<div class="scb-progress-indicator">
|
|
5993
6000
|
${this.type==="circular"?c`
|
|
5994
6001
|
<div class="circular">
|
|
@@ -6064,7 +6071,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6064
6071
|
50% { margin-left: 30%; width: 60%; }
|
|
6065
6072
|
100% { margin-left: 100%; width: 40%; }
|
|
6066
6073
|
}
|
|
6067
|
-
`],
|
|
6074
|
+
`],ci([l({type:String})],a.ScbProgressIndicator.prototype,"id",2),ci([l({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),ci([l({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),ci([l({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=ci([f("scb-progress-indicator")],a.ScbProgressIndicator);var Th=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?Oh(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&&Th(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`
|
|
6068
6075
|
<label class="wrap">
|
|
6069
6076
|
<div class="radio-wrap">
|
|
6070
6077
|
<md-radio
|
|
@@ -6152,7 +6159,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6152
6159
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
6153
6160
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
6154
6161
|
}
|
|
6155
|
-
`,ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),ut([l({type:String})],a.ScbRadioButton.prototype,"label",2),ut([l({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=ut([f("scb-radio-button")],a.ScbRadioButton);const Ph=Object.freeze(Object.defineProperty({__proto__:null,get ScbRadioButton(){return a.ScbRadioButton}},Symbol.toStringTag,{value:"Module"}));var Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,xs=o=>{throw TypeError(o)},zt=(o,e,t,
|
|
6162
|
+
`,ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),ut([l({type:String})],a.ScbRadioButton.prototype,"label",2),ut([l({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=ut([f("scb-radio-button")],a.ScbRadioButton);const Ph=Object.freeze(Object.defineProperty({__proto__:null,get ScbRadioButton(){return a.ScbRadioButton}},Symbol.toStringTag,{value:"Module"}));var Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,xs=o=>{throw TypeError(o)},zt=(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&&Lh(e,t,r),r},Rh=(o,e,t)=>e.has(o)||xs("Cannot "+t),di=(o,e,t)=>(Rh(o,e,"read from private field"),t?t.call(o):e.get(o)),ws=(o,e,t)=>e.has(o)?xs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),hi,ur;a.ScbRadioGroup=class extends y{constructor(){super(...arguments),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="item",ws(this,hi,()=>{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")}),ws(this,ur,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`
|
|
6156
6163
|
<div
|
|
6157
6164
|
class="g"
|
|
6158
6165
|
role="radiogroup"
|
|
@@ -6160,9 +6167,9 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6160
6167
|
aria-label=${this.ariaLabel??""}
|
|
6161
6168
|
style=${`--_dir:${e}`}
|
|
6162
6169
|
>
|
|
6163
|
-
<slot @slotchange=${
|
|
6170
|
+
<slot @slotchange=${di(this,hi)}></slot>
|
|
6164
6171
|
</div>
|
|
6165
|
-
`}firstUpdated(){
|
|
6172
|
+
`}firstUpdated(){di(this,hi).call(this),this.addEventListener("change",di(this,ur))}disconnectedCallback(){this.removeEventListener("change",di(this,ur)),super.disconnectedCallback()}updated(e){(e.has("name")||e.has("disabled")||e.has("orientation"))&&di(this,hi).call(this)}},hi=new WeakMap,ur=new WeakMap,a.ScbRadioGroup.styles=b`
|
|
6166
6173
|
:host { display: block; }
|
|
6167
6174
|
|
|
6168
6175
|
.g {
|
|
@@ -6179,10 +6186,10 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6179
6186
|
:host([spacing="group"]) ::slotted(scb-radio-button) {
|
|
6180
6187
|
--scb-radio-gap: 0;
|
|
6181
6188
|
}
|
|
6182
|
-
`,zt([l({type:String})],a.ScbRadioGroup.prototype,"name",2),zt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),zt([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),zt([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),zt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=zt([f("scb-radio-group")],a.ScbRadioGroup);var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Tt=(o,e,t,
|
|
6183
|
-
<div class="segmented-item${
|
|
6184
|
-
<md-ripple ?disabled="${
|
|
6185
|
-
${this.selected?
|
|
6189
|
+
`,zt([l({type:String})],a.ScbRadioGroup.prototype,"name",2),zt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),zt([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),zt([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),zt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=zt([f("scb-radio-group")],a.ScbRadioGroup);var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Tt=(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&&Bh(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`
|
|
6190
|
+
<div class="segmented-item${r||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${i?"true":"false"}">
|
|
6191
|
+
<md-ripple ?disabled="${i}"></md-ripple>
|
|
6192
|
+
${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>`:""}
|
|
6186
6193
|
${s?c`<span>${this.label}</span>`:""}
|
|
6187
6194
|
<md-focus-ring inward></md-focus-ring>
|
|
6188
6195
|
</div>
|
|
@@ -6253,7 +6260,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6253
6260
|
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
6254
6261
|
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
6255
6262
|
}
|
|
6256
|
-
`,Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),Tt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),Tt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=Tt([f("scb-segmented-item")],a.ScbSegmentedItem);var Fh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,
|
|
6263
|
+
`,Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),Tt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),Tt([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),Tt([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=Tt([f("scb-segmented-item")],a.ScbSegmentedItem);var Fh=Object.defineProperty,Hh=Object.getOwnPropertyDescriptor,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&&Fh(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`
|
|
6257
6264
|
:host {
|
|
6258
6265
|
--scb-segmented-button-width: 100%;
|
|
6259
6266
|
--scb-segmented-button-height: 48px;
|
|
@@ -6262,6 +6269,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6262
6269
|
display: grid;
|
|
6263
6270
|
grid-auto-flow: column;
|
|
6264
6271
|
grid-auto-columns: 1fr;
|
|
6272
|
+
font-family: var(--brand, Inter);
|
|
6265
6273
|
}
|
|
6266
6274
|
/* Border radius only on first and last button */
|
|
6267
6275
|
::slotted(scb-segmented-item:first-child .segmented-item),
|
|
@@ -6279,8 +6287,8 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6279
6287
|
::slotted([role="button"]:first-child .segmented-item) {
|
|
6280
6288
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
6281
6289
|
}
|
|
6282
|
-
`,
|
|
6283
|
-
<div class="${
|
|
6290
|
+
`,pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),pi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),pi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=pi([f("scb-segmented-button")],a.ScbSegmentedButton);var Nh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Ke=(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.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")),this.open=!1}handleClose(){this.dispatchEvent(new CustomEvent("snackbar-close")),this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open")):this.dispatchEvent(new CustomEvent("snackbar-close"))),(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`
|
|
6291
|
+
<div class="${i}" ?hidden=${!this.open}>
|
|
6284
6292
|
${this.withLongerAction?c`
|
|
6285
6293
|
<div class="message">${this.message}</div>
|
|
6286
6294
|
<div class="actions">
|
|
@@ -6363,7 +6371,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6363
6371
|
--md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
|
|
6364
6372
|
}
|
|
6365
6373
|
|
|
6366
|
-
`,Ke([l({type:String})],a.ScbSnackbar.prototype,"message",2),Ke([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),Ke([l({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),Ke([l({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),Ke([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),Ke([l({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),Ke([l({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=Ke([f("scb-snackbar")],a.ScbSnackbar);var Vh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,
|
|
6374
|
+
`,Ke([l({type:String})],a.ScbSnackbar.prototype,"message",2),Ke([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),Ke([l({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),Ke([l({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),Ke([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),Ke([l({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),Ke([l({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=Ke([f("scb-snackbar")],a.ScbSnackbar);var Vh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,vr=(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&&Vh(e,t,r),r};a.ScbStatusPill=class extends y{constructor(){super(...arguments),this.status="",this.label="",this.showIcon=!1}render(){return c`
|
|
6367
6375
|
${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>`:"":""}
|
|
6368
6376
|
<span class="label">${this.label}</span>
|
|
6369
6377
|
`}},a.ScbStatusPill.styles=b`
|
|
@@ -6397,7 +6405,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6397
6405
|
background: var(--md-sys-color-error-container);
|
|
6398
6406
|
color: var(--md-sys-color-on-error-container);
|
|
6399
6407
|
}
|
|
6400
|
-
`,
|
|
6408
|
+
`,vr([l({type:String})],a.ScbStatusPill.prototype,"status",2),vr([l({type:String})],a.ScbStatusPill.prototype,"label",2),vr([l({type:Boolean,attribute:"show-icon"})],a.ScbStatusPill.prototype,"showIcon",2),a.ScbStatusPill=vr([f("scb-status-pill")],a.ScbStatusPill);var jh=Object.defineProperty,Wh=Object.getOwnPropertyDescriptor,ke=(o,e,t,i)=>{for(var r=i>1?void 0:i?Wh(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.ScbStep=class extends y{constructor(){super(...arguments),this.label="",this.symbolVariant="number",this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant="horizontal",this.icon=""}render(){switch(this.symbolVariant){case"icon":return c`
|
|
6401
6409
|
<div class="symbol">
|
|
6402
6410
|
${this.completed&&this.changeOnCompleted?c`<md-icon>check</md-icon>`:c`<md-icon>${this.icon}</md-icon>`}
|
|
6403
6411
|
</div>
|
|
@@ -6491,7 +6499,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6491
6499
|
min-width: 16px;
|
|
6492
6500
|
height: 16px;
|
|
6493
6501
|
}
|
|
6494
|
-
`,ke([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),ke([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),ke([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"changeOnCompleted",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),ke([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),ke([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=ke([f("scb-step")],a.ScbStep);var Gh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Ot=(o,e,t,
|
|
6502
|
+
`,ke([l({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),ke([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),ke([l({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"changeOnCompleted",2),ke([l({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),ke([l({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),ke([l({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=ke([f("scb-step")],a.ScbStep);var Gh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Ot=(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&&Gh(e,t,r),r};a.ScbStepper=class extends y{constructor(){super(...arguments),this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.activeIndex=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){this.activeIndex=e,this._updateSteps()}_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`
|
|
6495
6503
|
<div class="steps" style="flex-direction: ${this.variant==="vertical"?"column":"row"}; align-items: ${this.variant==="vertical","flex-start"};" @click=${this._onStepContainerClick}>
|
|
6496
6504
|
<slot></slot>
|
|
6497
6505
|
</div>
|
|
@@ -6568,7 +6576,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6568
6576
|
z-index: 0;
|
|
6569
6577
|
transform: translateX(-50%);
|
|
6570
6578
|
}
|
|
6571
|
-
`,Ot([l({type:String,reflect:!0})],a.ScbStepper.prototype,"label",2),Ot([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStepper.prototype,"changeOnCompleted",2),Ot([l({type:String})],a.ScbStepper.prototype,"variant",2),Ot([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStepper.prototype,"symbolVariant",2),Ot([w()],a.ScbStepper.prototype,"activeIndex",2),a.ScbStepper=Ot([f("scb-stepper")],a.ScbStepper);var Yh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Ss=o=>{throw TypeError(o)},vt=(o,e,t,
|
|
6579
|
+
`,Ot([l({type:String,reflect:!0})],a.ScbStepper.prototype,"label",2),Ot([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStepper.prototype,"changeOnCompleted",2),Ot([l({type:String})],a.ScbStepper.prototype,"variant",2),Ot([l({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStepper.prototype,"symbolVariant",2),Ot([w()],a.ScbStepper.prototype,"activeIndex",2),a.ScbStepper=Ot([f("scb-stepper")],a.ScbStepper);var Yh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Ss=o=>{throw TypeError(o)},vt=(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&&Yh(e,t,r),r},ks=(o,e,t)=>e.has(o)||Ss("Cannot "+t),Zh=(o,e,t)=>(ks(o,e,"read from private field"),e.get(o)),Jh=(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),Qh=(o,e,t,i)=>(ks(o,e,"write to private field"),e.set(o,t),t),mr;a.ScbSwitch=class extends y{constructor(){super(...arguments),this.label="",this.ariaLabel="",this.icons=!1,this.selected=!1,this.disabled=!1,this.fullWidth=!1,Jh(this,mr,!1)}updated(){this.toggleAttribute("aria-disabled",this.disabled)}async firstUpdated(){var t;Zh(this,mr)||(await Promise.resolve().then(()=>nc),Qh(this,mr,!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`
|
|
6572
6580
|
<md-switch
|
|
6573
6581
|
?icons=${this.icons}
|
|
6574
6582
|
?selected=${this.selected}
|
|
@@ -6578,9 +6586,9 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6578
6586
|
`;return e?c`
|
|
6579
6587
|
<label class="switch-container" ?disabled=${this.disabled}>
|
|
6580
6588
|
<span class="switch-label">${this.label}</span>
|
|
6581
|
-
${
|
|
6589
|
+
${i}
|
|
6582
6590
|
</label>
|
|
6583
|
-
`:
|
|
6591
|
+
`:i}},mr=new WeakMap,a.ScbSwitch.styles=b`
|
|
6584
6592
|
:host {
|
|
6585
6593
|
display: block;
|
|
6586
6594
|
}
|
|
@@ -6620,17 +6628,17 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6620
6628
|
/* Ärver färg från container */
|
|
6621
6629
|
color: var(--scb-switch-label-color, inherit);
|
|
6622
6630
|
}
|
|
6623
|
-
`,vt([l({type:String})],a.ScbSwitch.prototype,"label",2),vt([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbSwitch.prototype,"ariaLabel",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"icons",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"selected",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"disabled",2),vt([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbSwitch.prototype,"fullWidth",2),a.ScbSwitch=vt([f("scb-switch")],a.ScbSwitch);const $s=Object.freeze(Object.defineProperty({__proto__:null,get ScbSwitch(){return a.ScbSwitch}},Symbol.toStringTag,{value:"Module"}));var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,
|
|
6631
|
+
`,vt([l({type:String})],a.ScbSwitch.prototype,"label",2),vt([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbSwitch.prototype,"ariaLabel",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"icons",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"selected",2),vt([l({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"disabled",2),vt([l({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbSwitch.prototype,"fullWidth",2),a.ScbSwitch=vt([f("scb-switch")],a.ScbSwitch);const $s=Object.freeze(Object.defineProperty({__proto__:null,get ScbSwitch(){return a.ScbSwitch}},Symbol.toStringTag,{value:"Module"}));var ep=Object.defineProperty,tp=Object.getOwnPropertyDescriptor,br=(o,e,t,i)=>{for(var r=i>1?void 0:i?tp(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&&ep(e,t,r),r};a.ScbPrimaryTab=class extends Zt{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(()=>Y),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=[...Zt.styles,b`
|
|
6624
6632
|
/* Icon-only: dölj textslot */
|
|
6625
6633
|
:host([icon-only]) slot:not([name='icon']) {
|
|
6626
6634
|
display: none;
|
|
6627
6635
|
}
|
|
6628
|
-
`],
|
|
6636
|
+
`],br([l({type:String})],a.ScbPrimaryTab.prototype,"icon",1),br([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbPrimaryTab.prototype,"iconOnly",2),br([l({type:Boolean,reflect:!0,attribute:"inline-icon"})],a.ScbPrimaryTab.prototype,"inlineIcon",2),a.ScbPrimaryTab=br([f("scb-primary-tab")],a.ScbPrimaryTab);var ip=Object.defineProperty,rp=Object.getOwnPropertyDescriptor,Mo=(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.ScbSecondaryTab=class extends Jt{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(()=>Y),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=[...Jt.styles,b`
|
|
6629
6637
|
/* Icon-only: göm all text utom slot="icon" */
|
|
6630
6638
|
:host([icon-only]) slot:not([name='icon']) {
|
|
6631
6639
|
display: none;
|
|
6632
6640
|
}
|
|
6633
|
-
`],Mo([l({type:String})],a.ScbSecondaryTab.prototype,"icon",1),Mo([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=Mo([f("scb-secondary-tab")],a.ScbSecondaryTab);const op=Object.freeze(Object.defineProperty({__proto__:null,get ScbSecondaryTab(){return a.ScbSecondaryTab}},Symbol.toStringTag,{value:"Module"}));var ap=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,Cs=(o,e,t,
|
|
6641
|
+
`],Mo([l({type:String})],a.ScbSecondaryTab.prototype,"icon",1),Mo([l({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=Mo([f("scb-secondary-tab")],a.ScbSecondaryTab);const op=Object.freeze(Object.defineProperty({__proto__:null,get ScbSecondaryTab(){return a.ScbSecondaryTab}},Symbol.toStringTag,{value:"Module"}));var ap=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,Cs=(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&&ap(e,t,r),r};a.ScbTabs=class extends Qt{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=[...Qt.styles,b`
|
|
6634
6642
|
:host {
|
|
6635
6643
|
/*Containerfärg */
|
|
6636
6644
|
--md-primary-tab-container-color: var(--md-sys-color-surface);
|
|
@@ -6652,7 +6660,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6652
6660
|
--md-secondary-tab-hover-state-layer-color: var(--md-sys-color-on-surface);
|
|
6653
6661
|
}
|
|
6654
6662
|
|
|
6655
|
-
`],Cs([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbTabs.prototype,"ariaLabel",2),a.ScbTabs=Cs([f("scb-tabs")],a.ScbTabs);const np=Object.freeze(Object.defineProperty({__proto__:null,get ScbTabs(){return a.ScbTabs}},Symbol.toStringTag,{value:"Module"}));var lp=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,ae=(o,e,t,
|
|
6663
|
+
`],Cs([l({type:String,reflect:!0,attribute:"aria-label"})],a.ScbTabs.prototype,"ariaLabel",2),a.ScbTabs=Cs([f("scb-tabs")],a.ScbTabs);const np=Object.freeze(Object.defineProperty({__proto__:null,get ScbTabs(){return a.ScbTabs}},Symbol.toStringTag,{value:"Module"}));var lp=Object.defineProperty,cp=Object.getOwnPropertyDescriptor,ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?cp(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&&lp(e,t,r),r};a.ScbTextField2=class extends y{constructor(){super(...arguments),this.type="text",this.label="",this.supportingText="",this.errorText="",this.leadingIcon="",this.name="",this.pattern="",this.value="",this.underLabel="",this.error=!1,this.disabled=!1,this.required=!1,this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._inputId=""}render(){const e=this.leadingIcon?c`<md-icon class="scb-textfield-icon">${this.leadingIcon}</md-icon>`:null,t=this.error?c`<md-icon class="scb-textfield-error-icon" aria-hidden="true">error</md-icon>`:null;this.underLabel=this.error?this.errorText||"Ogiltig inmatning.":this.supportingText,this.value=this.value||"";const i=this.underLabel?`${this._inputId}-supporting-text`:void 0;return this.type==="textarea"?c`
|
|
6656
6664
|
<label class="scb-textfield-label" for="${this._inputId}">${this.label}</label>
|
|
6657
6665
|
<span
|
|
6658
6666
|
class="scb-textfield-supporting-text"
|
|
@@ -6666,7 +6674,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6666
6674
|
id="${this._inputId}"
|
|
6667
6675
|
?required=${this.required}
|
|
6668
6676
|
aria-invalid=${this.error?"true":"false"}
|
|
6669
|
-
aria-describedby=${
|
|
6677
|
+
aria-describedby=${i}
|
|
6670
6678
|
>${this.value}</textarea>
|
|
6671
6679
|
</div>
|
|
6672
6680
|
`:c`
|
|
@@ -6686,11 +6694,11 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6686
6694
|
?disabled=${this.disabled}
|
|
6687
6695
|
?required=${this.required}
|
|
6688
6696
|
aria-invalid=${this.error?"true":"false"}
|
|
6689
|
-
aria-describedby=${
|
|
6697
|
+
aria-describedby=${i}
|
|
6690
6698
|
/>
|
|
6691
6699
|
${t}
|
|
6692
6700
|
</div>
|
|
6693
|
-
`}firstUpdated(e){var
|
|
6701
|
+
`}firstUpdated(e){var i;super.firstUpdated(e),this._initialValue=this.value,(this.leadingIcon||this.error)&&this.__ensureMdIconLoaded();const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-textfield");t&&(t.addEventListener("input",r=>{const s=t;if(this.value=s.value,this.pattern){const n=new RegExp(this.pattern);this.error=!n.test(this.value)}this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("onValueChanged",{detail:{value:this.value},bubbles:!0,composed:!0}))}),t.addEventListener("change",r=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}),t.addEventListener("select",r=>{this.dispatchEvent(new Event("select",{bubbles:!0,composed:!0}))}))}updated(e){super.updated(e),(e.has("leadingIcon")||e.has("error"))&&(this.leadingIcon&&this.leadingIcon.trim()||this.error)&&this.__ensureMdIconLoaded(),this.toggleAttribute("aria-disabled",this.disabled)}connectedCallback(){super.connectedCallback(),this._inputId=this.id||`scb-textfield-${Math.random().toString(36).substr(2,9)}`,this._formSubmitHandler=e=>{this.reportValidity()||(e.preventDefault(),e.stopPropagation())},this._form=this.closest("form"),this._form&&(this._form.addEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler=()=>{var t;this.value=this._initialValue;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-textfield");e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(e.value=this._initialValue),this.error=!1},this._form.addEventListener("reset",this._formResetHandler,!0))}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formSubmitHandler&&(this._form.removeEventListener("submit",this._formSubmitHandler,!0),this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0))}reportValidity(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-textfield");if(e&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){this.required&&!e.value?e.setCustomValidity(this.errorText||"Ogiltig inmatning."):e.setCustomValidity("");const i=e.reportValidity();return this.error=!i,i||(this.errorText=this.errorText||e.validationMessage||"Ogiltig inmatning."),i}return!0}async __ensureMdIconLoaded(){window.__scb_md_icon_loaded||(await Promise.resolve().then(()=>Y),window.__scb_md_icon_loaded=!0)}},a.ScbTextField2.styles=[b`
|
|
6694
6702
|
:host{
|
|
6695
6703
|
--scb-textfield-number-max-width:280px;
|
|
6696
6704
|
--scb-textfield-text-max-width:400px;
|
|
@@ -6822,7 +6830,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6822
6830
|
.scb-textfield.has-error-icon {
|
|
6823
6831
|
padding-right: 44px; /* Adjust as needed for icon size and spacing */
|
|
6824
6832
|
}
|
|
6825
|
-
`],ae([l({type:String,reflect:!0})],a.ScbTextField2.prototype,"type",2),ae([l({type:String})],a.ScbTextField2.prototype,"label",2),ae([l({type:String,attribute:"supporting-text"})],a.ScbTextField2.prototype,"supportingText",2),ae([l({type:String,attribute:"error-text"})],a.ScbTextField2.prototype,"errorText",2),ae([l({type:String,attribute:"leading-icon"})],a.ScbTextField2.prototype,"leadingIcon",2),ae([l({type:String})],a.ScbTextField2.prototype,"name",2),ae([l({type:String})],a.ScbTextField2.prototype,"pattern",2),ae([l({type:String,attribute:"value"})],a.ScbTextField2.prototype,"value",2),ae([l({type:String})],a.ScbTextField2.prototype,"underLabel",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"error",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"disabled",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"required",2),a.ScbTextField2=ae([f("scb-textfield")],a.ScbTextField2);const dp=Object.freeze(Object.defineProperty({__proto__:null,get ScbTextField2(){return a.ScbTextField2}},Symbol.toStringTag,{value:"Module"}));var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Pt=(o,e,t,
|
|
6833
|
+
`],ae([l({type:String,reflect:!0})],a.ScbTextField2.prototype,"type",2),ae([l({type:String})],a.ScbTextField2.prototype,"label",2),ae([l({type:String,attribute:"supporting-text"})],a.ScbTextField2.prototype,"supportingText",2),ae([l({type:String,attribute:"error-text"})],a.ScbTextField2.prototype,"errorText",2),ae([l({type:String,attribute:"leading-icon"})],a.ScbTextField2.prototype,"leadingIcon",2),ae([l({type:String})],a.ScbTextField2.prototype,"name",2),ae([l({type:String})],a.ScbTextField2.prototype,"pattern",2),ae([l({type:String,attribute:"value"})],a.ScbTextField2.prototype,"value",2),ae([l({type:String})],a.ScbTextField2.prototype,"underLabel",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"error",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"disabled",2),ae([l({type:Boolean,reflect:!0})],a.ScbTextField2.prototype,"required",2),a.ScbTextField2=ae([f("scb-textfield")],a.ScbTextField2);const dp=Object.freeze(Object.defineProperty({__proto__:null,get ScbTextField2(){return a.ScbTextField2}},Symbol.toStringTag,{value:"Module"}));var hp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,Pt=(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.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}`;return c`
|
|
6826
6834
|
<div
|
|
6827
6835
|
class="scb-toc-item"
|
|
6828
6836
|
role="listitem"
|
|
@@ -6905,7 +6913,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,r){var i=argument
|
|
|
6905
6913
|
.scb-toc-item{
|
|
6906
6914
|
color: var(--md-sys-color-on-surface);
|
|
6907
6915
|
}
|
|
6908
|
-
`],Pt([l({type:Boolean})],a.ScbTocItem.prototype,"expanded",2),Pt([l({type:String,reflect:!0})],a.ScbTocItem.prototype,"label",2),Pt([l({type:String,attribute:"supporting-text"})],a.ScbTocItem.prototype,"supportingText",2),Pt([l({type:String,attribute:"item-href"})],a.ScbTocItem.prototype,"itemHref",2),Pt([l({type:Boolean,attribute:"divider"})],a.ScbTocItem.prototype,"divider",2),a.ScbTocItem=Pt([f("scb-toc-item")],a.ScbTocItem);var up=Object.getOwnPropertyDescriptor,vp=(o,e,t,
|
|
6916
|
+
`],Pt([l({type:Boolean})],a.ScbTocItem.prototype,"expanded",2),Pt([l({type:String,reflect:!0})],a.ScbTocItem.prototype,"label",2),Pt([l({type:String,attribute:"supporting-text"})],a.ScbTocItem.prototype,"supportingText",2),Pt([l({type:String,attribute:"item-href"})],a.ScbTocItem.prototype,"itemHref",2),Pt([l({type:Boolean,attribute:"divider"})],a.ScbTocItem.prototype,"divider",2),a.ScbTocItem=Pt([f("scb-toc-item")],a.ScbTocItem);var up=Object.getOwnPropertyDescriptor,vp=(o,e,t,i)=>{for(var r=i>1?void 0:i?up(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=n(r)||r);return r};return a.ScbToc=class extends y{render(){return c`
|
|
6909
6917
|
<div role="list">
|
|
6910
6918
|
<slot></slot>
|
|
6911
6919
|
</div>
|