scb-wc-test 0.1.114 → 0.1.115
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-accordion/scb-accordion-item.js +43 -7
- package/mvc/components/scb-toc/scb-toc-item.js +163 -44
- package/mvc/components/scb-toc/scb-toc.js +1 -1
- package/mvc/scb-wc-test.css +1 -1
- package/package.json +2 -2
- package/scb-accordion/scb-accordion-item.js +70 -34
- package/scb-toc/scb-toc-item.d.ts +15 -5
- package/scb-toc/scb-toc-item.js +302 -134
- package/scb-wc-test.bundle.js +340 -185
- package/scb-wc-test.css +1 -1
package/scb-wc-test.bundle.js
CHANGED
|
@@ -2,7 +2,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const g=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2019 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -30,7 +30,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2017 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/let
|
|
33
|
+
*/let Bl;function Rl(o){return(e,t)=>si(e,t,{get(){return(this.renderRoot??Bl??(Bl=document.createDocumentFragment())).querySelectorAll(o)}})}/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -48,7 +48,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
49
|
*/const ni=globalThis,Qi=ni.trustedTypes,bs=Qi?Qi.createPolicy("lit-html",{createHTML:o=>o}):void 0,ms="$lit$",rt=`lit$${Math.random().toFixed(9).slice(2)}$`,fs="?"+rt,Ml=`<${fs}>`,bt=document,li=()=>bt.createComment(""),ci=o=>o===null||typeof o!="object"&&typeof o!="function",ko=Array.isArray,Fl=o=>ko(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",$o=`[
|
|
50
50
|
\f\r]`,di=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,gs=/-->/g,ys=/>/g,mt=RegExp(`>|${$o}(?:([^\\s"'>=/]+)(${$o}*=${$o}*(?:[^
|
|
51
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),_s=/'/g,xs=/"/g,ws=/^(?:script|style|textarea|title)$/i,Hl=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Hl(1),ve=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Ss=new WeakMap,ft=bt.createTreeWalker(bt,129);function ks(o,e){if(!ko(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bs!==void 0?bs.createHTML(e):e}const Nl=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",l=di;for(let h=0;h<t;h++){const p=o[h];let v,
|
|
51
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),_s=/'/g,xs=/"/g,ws=/^(?:script|style|textarea|title)$/i,Hl=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),c=Hl(1),ve=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),Ss=new WeakMap,ft=bt.createTreeWalker(bt,129);function ks(o,e){if(!ko(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bs!==void 0?bs.createHTML(e):e}const Nl=(o,e)=>{const t=o.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",l=di;for(let h=0;h<t;h++){const p=o[h];let v,f,b=-1,_=0;for(;_<p.length&&(l.lastIndex=_,f=l.exec(p),f!==null);)_=l.lastIndex,l===di?f[1]==="!--"?l=gs:f[1]!==void 0?l=ys:f[2]!==void 0?(ws.test(f[2])&&(r=RegExp("</"+f[2],"g")),l=mt):f[3]!==void 0&&(l=mt):l===mt?f[0]===">"?(l=r??di,b=-1):f[1]===void 0?b=-2:(b=l.lastIndex-f[2].length,v=f[1],l=f[3]===void 0?mt:f[3]==='"'?xs:_s):l===xs||l===_s?l=mt:l===gs||l===ys?l=di:(l=mt,r=void 0);const x=l===mt&&o[h+1].startsWith("/>")?" ":"";s+=l===di?p+Ml:b>=0?(i.push(v),p.slice(0,b)+ms+p.slice(b)+rt+x):p+rt+(b===-2?h:x)}return[ks(o,s+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class hi{constructor({strings:e,_$litType$:t},i){let r;this.parts=[];let s=0,l=0;const h=e.length-1,p=this.parts,[v,f]=Nl(e,t);if(this.el=hi.createElement(v,i),ft.currentNode=this.el.content,t===2||t===3){const b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=ft.nextNode())!==null&&p.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const b of r.getAttributeNames())if(b.endsWith(ms)){const _=f[l++],x=r.getAttribute(b).split(rt),S=/([.?@])?(.*)/.exec(_);p.push({type:1,index:s,name:S[2],strings:x,ctor:S[1]==="."?ql:S[1]==="?"?Ul:S[1]==="@"?Wl:er}),r.removeAttribute(b)}else b.startsWith(rt)&&(p.push({type:6,index:s}),r.removeAttribute(b));if(ws.test(r.tagName)){const b=r.textContent.split(rt),_=b.length-1;if(_>0){r.textContent=Qi?Qi.emptyScript:"";for(let x=0;x<_;x++)r.append(b[x],li()),ft.nextNode(),p.push({type:2,index:++s});r.append(b[_],li())}}}else if(r.nodeType===8)if(r.data===fs)p.push({type:2,index:s});else{let b=-1;for(;(b=r.data.indexOf(rt,b+1))!==-1;)p.push({type:7,index:s}),b+=rt.length-1}s++}}static createElement(e,t){const i=bt.createElement("template");return i.innerHTML=e,i}}function Vt(o,e,t=o,i){var l,h;if(e===ve)return e;let r=i!==void 0?(l=t._$Co)==null?void 0:l[i]:t._$Cl;const s=ci(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=Vt(o,r._$AS(o,e.values),r,i)),e}class Vl{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)??bt).importNode(t,!0);ft.currentNode=r;let s=ft.nextNode(),l=0,h=0,p=i[0];for(;p!==void 0;){if(l===p.index){let v;p.type===2?v=new pi(s,s.nextSibling,this,e):p.type===1?v=new p.ctor(s,p.name,p.strings,this,e):p.type===6&&(v=new jl(s,this,e)),this._$AV.push(v),p=i[++h]}l!==(p==null?void 0:p.index)&&(s=ft.nextNode(),l++)}return ft.currentNode=bt,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 pi{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=Vt(this,e,t),ci(e)?e===u||e==null||e===""?(this._$AH!==u&&this._$AR(),this._$AH=u):e!==this._$AH&&e!==ve&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Fl(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&&ci(this._$AH)?this._$AA.nextSibling.data=e:this.T(bt.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=hi.createElement(ks(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(t);else{const l=new Vl(r,this),h=l.u(this.options);l.p(t),this.T(h),this._$AH=l}}_$AC(e){let t=Ss.get(e.strings);return t===void 0&&Ss.set(e.strings,t=new hi(e)),t}k(e){ko(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 pi(this.O(li()),this.O(li()),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 er{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 l=!1;if(s===void 0)e=Vt(this,e,t,0),l=!ci(e)||e!==this._$AH&&e!==ve,l&&(this._$AH=e);else{const h=e;let p,v;for(e=s[0],p=0;p<s.length-1;p++)v=Vt(this,h[i+p],t,p),v===ve&&(v=this._$AH[p]),l||(l=!ci(v)||v!==this._$AH[p]),v===u?e=u:e!==u&&(e+=(v??"")+s[p+1]),this._$AH[p]=v}l&&!r&&this.j(e)}j(e){e===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ql extends er{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===u?void 0:e}}class Ul extends er{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==u)}}class Wl extends er{constructor(e,t,i,r,s){super(e,t,i,r,s),this.type=5}_$AI(e,t=this){if((e=Vt(this,e,t,0)??u)===ve)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 jl{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){Vt(this,e)}}const Co=ni.litHtmlPolyfillSupport;Co==null||Co(hi,pi),(ni.litHtmlVersions??(ni.litHtmlVersions=[])).push("3.3.1");const Eo=(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 pi(e.insertBefore(li(),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
|
|
@@ -65,7 +65,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
65
65
|
* @license
|
|
66
66
|
* Copyright 2022 Google LLC
|
|
67
67
|
* SPDX-License-Identifier: Apache-2.0
|
|
68
|
-
*/let Ao=class extends Kl{};Ao.styles=[Gl],Ao=d([
|
|
68
|
+
*/let Ao=class extends Kl{};Ao.styles=[Gl],Ao=d([g("md-elevation")],Ao);/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2023 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -82,7 +82,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2021 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: Apache-2.0
|
|
85
|
-
*/let ir=class extends zo{};ir.styles=[Xl],ir=d([
|
|
85
|
+
*/let ir=class extends zo{};ir.styles=[Xl],ir=d([g("md-focus-ring")],ir);const Zl=Object.freeze(Object.defineProperty({__proto__:null,get MdFocusRing(){return ir}},Symbol.toStringTag,{value:"Module"}));/**
|
|
86
86
|
* @license
|
|
87
87
|
* Copyright 2017 Google LLC
|
|
88
88
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -107,7 +107,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2022 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: Apache-2.0
|
|
110
|
-
*/let rr=class extends ui{};rr.styles=[lc],rr=d([
|
|
110
|
+
*/let rr=class extends ui{};rr.styles=[lc],rr=d([g("md-ripple")],rr);const or=Object.freeze(Object.defineProperty({__proto__:null,get MdRipple(){return rr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2023 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -177,7 +177,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
177
177
|
* @license
|
|
178
178
|
* Copyright 2024 Google LLC
|
|
179
179
|
* SPDX-License-Identifier: Apache-2.0
|
|
180
|
-
*/const
|
|
180
|
+
*/const Bo=m`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 kl;function d(o,e,t,i){var r=argument
|
|
|
187
187
|
* @license
|
|
188
188
|
* Copyright 2021 Google LLC
|
|
189
189
|
* SPDX-License-Identifier: Apache-2.0
|
|
190
|
-
*/let
|
|
190
|
+
*/let Ro=class extends pc{};Ro.styles=[bi,Bo,uc],Ro=d([g("md-elevated-button")],Ro);/**
|
|
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 kl;function d(o,e,t,i){var r=argument
|
|
|
200
200
|
* @license
|
|
201
201
|
* Copyright 2021 Google LLC
|
|
202
202
|
* SPDX-License-Identifier: Apache-2.0
|
|
203
|
-
*/let Mo=class extends vc{};Mo.styles=[bi,
|
|
203
|
+
*/let Mo=class extends vc{};Mo.styles=[bi,Bo,bc],Mo=d([g("md-filled-button")],Mo);/**
|
|
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 kl;function d(o,e,t,i){var r=argument
|
|
|
213
213
|
* @license
|
|
214
214
|
* Copyright 2021 Google LLC
|
|
215
215
|
* SPDX-License-Identifier: Apache-2.0
|
|
216
|
-
*/let Fo=class extends mc{};Fo.styles=[bi,
|
|
216
|
+
*/let Fo=class extends mc{};Fo.styles=[bi,Bo,fc],Fo=d([g("md-filled-tonal-button")],Fo);/**
|
|
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 kl;function d(o,e,t,i){var r=argument
|
|
|
226
226
|
* @license
|
|
227
227
|
* Copyright 2021 Google LLC
|
|
228
228
|
* SPDX-License-Identifier: Apache-2.0
|
|
229
|
-
*/let Ho=class extends gc{};Ho.styles=[bi,yc],Ho=d([
|
|
229
|
+
*/let Ho=class extends gc{};Ho.styles=[bi,yc],Ho=d([g("md-outlined-button")],Ho);/**
|
|
230
230
|
* @license
|
|
231
231
|
* Copyright 2021 Google LLC
|
|
232
232
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -239,7 +239,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
239
239
|
* @license
|
|
240
240
|
* Copyright 2021 Google LLC
|
|
241
241
|
* SPDX-License-Identifier: Apache-2.0
|
|
242
|
-
*/let No=class extends _c{};No.styles=[bi,xc],No=d([
|
|
242
|
+
*/let No=class extends _c{};No.styles=[bi,xc],No=d([g("md-text-button")],No);/**
|
|
243
243
|
* @license
|
|
244
244
|
* Copyright 2021 Google LLC
|
|
245
245
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -296,7 +296,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
296
296
|
* @license
|
|
297
297
|
* Copyright 2018 Google LLC
|
|
298
298
|
* SPDX-License-Identifier: Apache-2.0
|
|
299
|
-
*/let qo=class extends Se{};qo.styles=[Sc],qo=d([
|
|
299
|
+
*/let qo=class extends Se{};qo.styles=[Sc],qo=d([g("md-checkbox")],qo);/**
|
|
300
300
|
* @license
|
|
301
301
|
* Copyright 2023 Google LLC
|
|
302
302
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -358,11 +358,11 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
358
358
|
* @license
|
|
359
359
|
* Copyright 2023 Google LLC
|
|
360
360
|
* SPDX-License-Identifier: Apache-2.0
|
|
361
|
-
*/let cr=class extends gi{};cr.styles=[lr,Uo,kc],cr=d([
|
|
361
|
+
*/let cr=class extends gi{};cr.styles=[lr,Uo,kc],cr=d([g("md-assist-chip")],cr);const $c=Object.freeze(Object.defineProperty({__proto__:null,get MdAssistChip(){return cr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
362
362
|
* @license
|
|
363
363
|
* Copyright 2023 Google LLC
|
|
364
364
|
* SPDX-License-Identifier: Apache-2.0
|
|
365
|
-
*/class Os extends y{get chips(){return this.childElements.filter(e=>e instanceof Ne)}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:l}=this;if(l.length<2)return;if(e.preventDefault(),r||s){const _=r?0:l.length-1;l[_].focus({trailing:s}),this.updateTabIndices();return}const p=getComputedStyle(this).direction==="rtl"?t:i,v=l.find(_=>_.matches(":focus-within"));if(!v){(p?l[0]:l[l.length-1]).focus({trailing:!p}),this.updateTabIndices();return}const
|
|
365
|
+
*/class Os extends y{get chips(){return this.childElements.filter(e=>e instanceof Ne)}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:l}=this;if(l.length<2)return;if(e.preventDefault(),r||s){const _=r?0:l.length-1;l[_].focus({trailing:s}),this.updateTabIndices();return}const p=getComputedStyle(this).direction==="rtl"?t:i,v=l.find(_=>_.matches(":focus-within"));if(!v){(p?l[0]:l[l.length-1]).focus({trailing:!p}),this.updateTabIndices();return}const f=l.indexOf(v);let b=p?f+1:f-1;for(;b!==f;){b>=l.length?b=0:b<0&&(b=l.length-1);const _=l[b];if(_.disabled&&!_.alwaysFocusable){p?b++:b--;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([X()],Os.prototype,"childElements",void 0);/**
|
|
366
366
|
* @license
|
|
367
367
|
* Copyright 2024 Google LLC
|
|
368
368
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -371,14 +371,14 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
371
371
|
* @license
|
|
372
372
|
* Copyright 2023 Google LLC
|
|
373
373
|
* SPDX-License-Identifier: Apache-2.0
|
|
374
|
-
*/let dr=class extends Os{};dr.styles=[Cc],dr=d([
|
|
374
|
+
*/let dr=class extends Os{};dr.styles=[Cc],dr=d([g("md-chip-set")],dr);const Ec=Object.freeze(Object.defineProperty({__proto__:null,get MdChipSet(){return dr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
375
375
|
* @license
|
|
376
376
|
* Copyright 2023 Google LLC
|
|
377
377
|
* SPDX-License-Identifier: Apache-2.0
|
|
378
378
|
*/const hr="aria-label-remove";class Ls extends Ne{get ariaLabelRemove(){if(this.hasAttribute(hr))return this.getAttribute(hr);const{ariaLabel:e}=this;return`Remove ${e||this.label}`}set ariaLabelRemove(e){const t=this.ariaLabelRemove;e!==t&&(e===null?this.removeAttribute(hr):this.setAttribute(hr,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,
|
|
381
|
+
`}handleKeyDown(e){var v,f;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,l=(v=this.primaryAction)==null?void 0:v.matches(":focus-within"),h=(f=this.trailingAction)==null?void 0:f.matches(":focus-within");if(s&&h||!s&&l)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
|
|
@@ -431,17 +431,17 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
431
431
|
* @license
|
|
432
432
|
* Copyright 2024 Google LLC
|
|
433
433
|
* SPDX-License-Identifier: Apache-2.0
|
|
434
|
-
*/const
|
|
434
|
+
*/const Bs=m`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}}
|
|
435
435
|
`;/**
|
|
436
436
|
* @license
|
|
437
437
|
* Copyright 2024 Google LLC
|
|
438
438
|
* SPDX-License-Identifier: Apache-2.0
|
|
439
|
-
*/const
|
|
439
|
+
*/const Rs=m`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}}
|
|
440
440
|
`;/**
|
|
441
441
|
* @license
|
|
442
442
|
* Copyright 2023 Google LLC
|
|
443
443
|
* SPDX-License-Identifier: Apache-2.0
|
|
444
|
-
*/let pr=class extends xt{};pr.styles=[lr,Uo,Bs,
|
|
444
|
+
*/let pr=class extends xt{};pr.styles=[lr,Uo,Rs,Bs,Ac],pr=d([g("md-filter-chip")],pr);const zc=Object.freeze(Object.defineProperty({__proto__:null,get MdFilterChip(){return pr}},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 kl;function d(o,e,t,i){var r=argument
|
|
|
476
476
|
* @license
|
|
477
477
|
* Copyright 2023 Google LLC
|
|
478
478
|
* SPDX-License-Identifier: Apache-2.0
|
|
479
|
-
*/let Wo=class extends wt{};Wo.styles=[lr,Bs,
|
|
479
|
+
*/let Wo=class extends wt{};Wo.styles=[lr,Rs,Bs,Ic],Wo=d([g("md-input-chip")],Wo);/**
|
|
480
480
|
* @license
|
|
481
481
|
* Copyright 2023 Google LLC
|
|
482
482
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -489,7 +489,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
489
489
|
* @license
|
|
490
490
|
* Copyright 2023 Google LLC
|
|
491
491
|
* SPDX-License-Identifier: Apache-2.0
|
|
492
|
-
*/let jo=class extends Pc{};jo.styles=[lr,Uo,Oc],jo=d([
|
|
492
|
+
*/let jo=class extends Pc{};jo.styles=[lr,Uo,Oc],jo=d([g("md-suggestion-chip")],jo);/**
|
|
493
493
|
* @license
|
|
494
494
|
* Copyright 2023 Google LLC
|
|
495
495
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -502,15 +502,15 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
502
502
|
* @license
|
|
503
503
|
* Copyright 2023 Google LLC
|
|
504
504
|
* SPDX-License-Identifier: Apache-2.0
|
|
505
|
-
*/let Ko=class extends ur{};Ko.styles=[Lc],Ko=d([
|
|
505
|
+
*/let Ko=class extends ur{};Ko.styles=[Lc],Ko=d([g("md-divider")],Ko);/**
|
|
506
506
|
* @license
|
|
507
507
|
* Copyright 2023 Google LLC
|
|
508
508
|
* SPDX-License-Identifier: Apache-2.0
|
|
509
|
-
*/const Dc={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:we.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:we.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},
|
|
509
|
+
*/const Dc={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:we.EMPHASIZED}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:we.EMPHASIZED,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},Bc={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:we.EMPHASIZED_ACCELERATE}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:we.EMPHASIZED_ACCELERATE,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};/**
|
|
510
510
|
* @license
|
|
511
511
|
* Copyright 2023 Google LLC
|
|
512
512
|
* SPDX-License-Identifier: Apache-2.0
|
|
513
|
-
*/class
|
|
513
|
+
*/class B 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=()=>Dc,this.getCloseAnimation=()=>Bc,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"
|
|
@@ -555,7 +555,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
555
555
|
</div>
|
|
556
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: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=!st(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 T;if((T=this.cancelAnimations)==null||T.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:t,scrim:i,container:r,headline:s,content:l,actions:h}=this;if(!t||!i||!r||!s||!l||!h)return;const{container:p,dialog:v,scrim:
|
|
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=!st(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 T;if((T=this.cancelAnimations)==null||T.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:t,scrim:i,container:r,headline:s,content:l,actions:h}=this;if(!t||!i||!r||!s||!l||!h)return;const{container:p,dialog:v,scrim:f,headline:b,content:_,actions:x}=e,S=[[t,v??[]],[i,f??[]],[r,p??[]],[s,b??[]],[l,_??[]],[h,x??[]]],C=[];for(const[A,z]of S)for(const ee of z){const q=A.animate(...ee);this.cancelAnimations.signal.addEventListener("abort",()=>{q.cancel()}),C.push(q)}await Promise.all(C.map(A=>A.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 b;const[t,i]=this.getFirstAndLastFocusableChildren();if(!t||!i){(b=this.dialog)==null||b.focus();return}const r=e.target===this.firstFocusTrap,s=!r,l=e.relatedTarget===t,h=e.relatedTarget===i,p=!l&&!h;if(s&&h||r&&p){t.focus();return}if(r&&l||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;Rc(i)&&(e||(e=i),t=i)}return[e,t]}}re(B),d([n({type:Boolean})],B.prototype,"open",null),d([n({type:Boolean})],B.prototype,"quick",void 0),d([n({attribute:!1})],B.prototype,"returnValue",void 0),d([n()],B.prototype,"type",void 0),d([n({type:Boolean,attribute:"no-focus-trap"})],B.prototype,"noFocusTrap",void 0),d([k("dialog")],B.prototype,"dialog",void 0),d([k(".scrim")],B.prototype,"scrim",void 0),d([k(".container")],B.prototype,"container",void 0),d([k(".headline")],B.prototype,"headline",void 0),d([k(".content")],B.prototype,"content",void 0),d([k(".actions")],B.prototype,"actions",void 0),d([w()],B.prototype,"isAtScrollTop",void 0),d([w()],B.prototype,"isAtScrollBottom",void 0),d([k(".scroller")],B.prototype,"scroller",void 0),d([k(".top.anchor")],B.prototype,"topAnchor",void 0),d([k(".bottom.anchor")],B.prototype,"bottomAnchor",void 0),d([k(".focus-trap")],B.prototype,"firstFocusTrap",void 0),d([w()],B.prototype,"hasHeadline",void 0),d([w()],B.prototype,"hasActions",void 0),d([w()],B.prototype,"hasIcon",void 0);function Rc(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 kl;function d(o,e,t,i){var r=argument
|
|
|
564
564
|
* @license
|
|
565
565
|
* Copyright 2023 Google LLC
|
|
566
566
|
* SPDX-License-Identifier: Apache-2.0
|
|
567
|
-
*/let Go=class extends
|
|
567
|
+
*/let Go=class extends B{};Go.styles=[Mc],Go=d([g("md-dialog")],Go);/**
|
|
568
568
|
* @license
|
|
569
569
|
* Copyright 2023 Google LLC
|
|
570
570
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -606,7 +606,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
606
606
|
* @license
|
|
607
607
|
* Copyright 2023 Google LLC
|
|
608
608
|
* SPDX-License-Identifier: Apache-2.0
|
|
609
|
-
*/let Xo=class extends Yo{getRenderClasses(){return{...super.getRenderClasses(),primary:!1,secondary:!1,tertiary:!1,small:!1}}};Xo.styles=[Fs,Fc,Ms],Xo=d([
|
|
609
|
+
*/let Xo=class extends Yo{getRenderClasses(){return{...super.getRenderClasses(),primary:!1,secondary:!1,tertiary:!1,small:!1}}};Xo.styles=[Fs,Fc,Ms],Xo=d([g("md-branded-fab")],Xo);/**
|
|
610
610
|
* @license
|
|
611
611
|
* Copyright 2024 Google LLC
|
|
612
612
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -615,7 +615,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
615
615
|
* @license
|
|
616
616
|
* Copyright 2022 Google LLC
|
|
617
617
|
* SPDX-License-Identifier: Apache-2.0
|
|
618
|
-
*/let Zo=class extends Yo{};Zo.styles=[Fs,Hc,Ms],Zo=d([
|
|
618
|
+
*/let Zo=class extends Yo{};Zo.styles=[Fs,Hc,Ms],Zo=d([g("md-fab")],Zo);/**
|
|
619
619
|
* @license
|
|
620
620
|
* Copyright 2021 Google LLC
|
|
621
621
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -651,7 +651,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
651
651
|
<span class="label ${L(i)}" aria-hidden=${!t}
|
|
652
652
|
>${r}</span
|
|
653
653
|
>
|
|
654
|
-
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){var s,l,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=(l=this.floatingLabelEl)==null?void 0:l.animate(this.getLabelKeyframes(),{duration:150,easing:we.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:l,y:h,height:p}=t.getBoundingClientRect(),v=e.scrollWidth,
|
|
654
|
+
`}animateLabelIfNeeded({wasFocused:e,wasPopulated:t}){var s,l,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=(l=this.floatingLabelEl)==null?void 0:l.animate(this.getLabelKeyframes(),{duration:150,easing:we.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:l,y:h,height:p}=t.getBoundingClientRect(),v=e.scrollWidth,f=t.scrollWidth,b=f/v,_=l-i,x=h-r+Math.round((p-s*b)/2),S=`translateX(${_}px) translateY(${x}px) scale(${b})`,C="translateX(0) translateY(0) scale(1)",T=t.clientWidth,z=f>T?`${T/b}px`:"";return this.focused||this.populated?[{transform:S,width:z},{transform:C,width:z}]:[{transform:C,width:z},{transform:S,width:z}]}getSurfacePositionClientRect(){return this.containerEl.getBoundingClientRect()}}d([n({type:Boolean})],D.prototype,"disabled",void 0),d([n({type:Boolean})],D.prototype,"error",void 0),d([n({type:Boolean})],D.prototype,"focused",void 0),d([n()],D.prototype,"label",void 0),d([n({type:Boolean,attribute:"no-asterisk"})],D.prototype,"noAsterisk",void 0),d([n({type:Boolean})],D.prototype,"populated",void 0),d([n({type:Boolean})],D.prototype,"required",void 0),d([n({type:Boolean})],D.prototype,"resizable",void 0),d([n({attribute:"supporting-text"})],D.prototype,"supportingText",void 0),d([n({attribute:"error-text"})],D.prototype,"errorText",void 0),d([n({type:Number})],D.prototype,"count",void 0),d([n({type:Number})],D.prototype,"max",void 0),d([n({type:Boolean,attribute:"has-start"})],D.prototype,"hasStart",void 0),d([n({type:Boolean,attribute:"has-end"})],D.prototype,"hasEnd",void 0),d([X({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 kl;function d(o,e,t,i){var r=argument
|
|
|
672
672
|
* @license
|
|
673
673
|
* Copyright 2021 Google LLC
|
|
674
674
|
* SPDX-License-Identifier: Apache-2.0
|
|
675
|
-
*/let Jo=class extends Nc{};Jo.styles=[Hs,Vc],Jo=d([
|
|
675
|
+
*/let Jo=class extends Nc{};Jo.styles=[Hs,Vc],Jo=d([g("md-filled-field")],Jo);/**
|
|
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 kl;function d(o,e,t,i){var r=argument
|
|
|
695
695
|
* @license
|
|
696
696
|
* Copyright 2021 Google LLC
|
|
697
697
|
* SPDX-License-Identifier: Apache-2.0
|
|
698
|
-
*/let Qo=class extends qc{};Qo.styles=[Hs,Uc],Qo=d([
|
|
698
|
+
*/let Qo=class extends qc{};Qo.styles=[Hs,Uc],Qo=d([g("md-outlined-field")],Qo);/**
|
|
699
699
|
* @license
|
|
700
700
|
* Copyright 2022 Google LLC
|
|
701
701
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -708,7 +708,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
708
708
|
* @license
|
|
709
709
|
* Copyright 2022 Google LLC
|
|
710
710
|
* SPDX-License-Identifier: Apache-2.0
|
|
711
|
-
*/let vr=class extends Wc{};vr.styles=[jc],vr=d([
|
|
711
|
+
*/let vr=class extends Wc{};vr.styles=[jc],vr=d([g("md-icon")],vr);const Pe=Object.freeze(Object.defineProperty({__proto__:null,get MdIcon(){return vr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
712
712
|
* @license
|
|
713
713
|
* Copyright 2024 Google LLC
|
|
714
714
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -718,7 +718,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
718
718
|
* Copyright 2020 Google LLC
|
|
719
719
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
720
720
|
*/const Ns=Symbol.for(""),Gc=o=>{if((o==null?void 0:o.r)===Ns)return o==null?void 0:o._$litStatic$},oe=(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:Ns}),Vs=new Map,Yc=o=>(e,...t)=>{const i=t.length;let r,s;const l=[],h=[];let p,v=0,
|
|
721
|
+
take care to ensure page security.`)})(i)+o[r+1],o[0]),r:Ns}),Vs=new Map,Yc=o=>(e,...t)=>{const i=t.length;let r,s;const l=[],h=[];let p,v=0,f=!1;for(;v<i;){for(p=e[v];v<i&&(s=t[v],(r=Gc(s))!==void 0);)p+=r+e[++v],f=!0;v!==i&&h.push(s),l.push(p),v++}if(v===i&&l.push(e[i]),f){const b=l.join("$$lit$$");(e=Vs.get(b))===void 0&&(l.raw=l,Vs.set(b,e=l)),t=h}return o(e,...t)},yi=Yc(c);/**
|
|
722
722
|
* @license
|
|
723
723
|
* Copyright 2022 Google LLC
|
|
724
724
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -763,7 +763,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
763
763
|
* @license
|
|
764
764
|
* Copyright 2022 Google LLC
|
|
765
765
|
* SPDX-License-Identifier: Apache-2.0
|
|
766
|
-
*/let mr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};mr.styles=[br,Kc],mr=d([
|
|
766
|
+
*/let mr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),filled:!0,"toggle-filled":this.toggle}}};mr.styles=[br,Kc],mr=d([g("md-filled-icon-button")],mr);const Zc=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledIconButton(){return mr}},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 kl;function d(o,e,t,i){var r=argument
|
|
|
772
772
|
* @license
|
|
773
773
|
* Copyright 2022 Google LLC
|
|
774
774
|
* SPDX-License-Identifier: Apache-2.0
|
|
775
|
-
*/let fr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),"filled-tonal":!0,"toggle-filled-tonal":this.toggle}}};fr.styles=[br,Jc],fr=d([
|
|
775
|
+
*/let fr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),"filled-tonal":!0,"toggle-filled-tonal":this.toggle}}};fr.styles=[br,Jc],fr=d([g("md-filled-tonal-icon-button")],fr);const Qc=Object.freeze(Object.defineProperty({__proto__:null,get MdFilledTonalIconButton(){return fr}},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 kl;function d(o,e,t,i){var r=argument
|
|
|
781
781
|
* @license
|
|
782
782
|
* Copyright 2021 Google LLC
|
|
783
783
|
* SPDX-License-Identifier: Apache-2.0
|
|
784
|
-
*/let gr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};gr.styles=[br,ed],gr=d([
|
|
784
|
+
*/let gr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),standard:!0}}};gr.styles=[br,ed],gr=d([g("md-icon-button")],gr);const td=Object.freeze(Object.defineProperty({__proto__:null,get MdIconButton(){return gr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
785
785
|
* @license
|
|
786
786
|
* Copyright 2024 Google LLC
|
|
787
787
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -790,7 +790,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
790
790
|
* @license
|
|
791
791
|
* Copyright 2022 Google LLC
|
|
792
792
|
* SPDX-License-Identifier: Apache-2.0
|
|
793
|
-
*/let yr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),outlined:!0}}};yr.styles=[br,id],yr=d([
|
|
793
|
+
*/let yr=class extends W{getRenderClasses(){return{...super.getRenderClasses(),outlined:!0}}};yr.styles=[br,id],yr=d([g("md-outlined-icon-button")],yr);const rd=Object.freeze(Object.defineProperty({__proto__:null,get MdOutlinedIconButton(){return yr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
794
794
|
* @license
|
|
795
795
|
* Copyright 2023 Google LLC
|
|
796
796
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -798,7 +798,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
798
798
|
* @license
|
|
799
799
|
* Copyright 2023 Google LLC
|
|
800
800
|
* SPDX-License-Identifier: Apache-2.0
|
|
801
|
-
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Xs{constructor(e){this.handleKeydown=
|
|
801
|
+
*/const G={ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",Home:"Home",End:"End"};class Xs{constructor(e){this.handleKeydown=f=>{const b=f.key;if(f.defaultPrevented||!this.isNavigableKey(b))return;const _=this.items;if(!_.length)return;const x=Wt(_,this.isActivatable);f.preventDefault();const S=this.isRtl(),C=S?G.ArrowRight:G.ArrowLeft,T=S?G.ArrowLeft:G.ArrowRight;let A=null;switch(b){case G.ArrowDown:case T:A=Ks(_,x,this.isActivatable,this.wrapNavigation());break;case G.ArrowUp:case C:A=Gs(_,x,this.isActivatable,this.wrapNavigation());break;case G.Home:A=Us(_,this.isActivatable);break;case G.End:A=Ws(_,this.isActivatable);break}A&&x&&x.item!==A&&(x.item.tabIndex=-1)},this.onDeactivateItems=()=>{const f=this.items;for(const b of f)this.deactivateItem(b)},this.onRequestActivation=f=>{this.onDeactivateItems();const b=f.target;this.activateItem(b),b.focus()},this.onSlotchange=()=>{const f=this.items;let b=!1;for(const x of f){if(!x.disabled&&x.tabIndex>-1&&!b){b=!0,x.tabIndex=0;continue}x.tabIndex=-1}if(b)return;const _=_r(f,this.isActivatable);_&&(_.tabIndex=0)};const{isItem:t,getPossibleItems:i,isRtl:r,deactivateItem:s,activateItem:l,isNavigableKey:h,isActivatable:p,wrapNavigation:v}=e;this.isItem=t,this.getPossibleItems=i,this.isRtl=r,this.deactivateItem=s,this.activateItem=l,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=Wt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Ks(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){const e=this.items,t=Wt(e,this.isActivatable);return t&&(t.item.tabIndex=-1),Gs(e,t,this.isActivatable,this.wrapNavigation())}}/**
|
|
802
802
|
* @license
|
|
803
803
|
* Copyright 2021 Google LLC
|
|
804
804
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -817,7 +817,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
817
817
|
* @license
|
|
818
818
|
* Copyright 2021 Google LLC
|
|
819
819
|
* SPDX-License-Identifier: Apache-2.0
|
|
820
|
-
*/let wr=class extends Zs{};wr.styles=[ld],wr=d([
|
|
820
|
+
*/let wr=class extends Zs{};wr.styles=[ld],wr=d([g("md-list")],wr);const cd=Object.freeze(Object.defineProperty({__proto__:null,get MdList(){return wr}},Symbol.toStringTag,{value:"Module"}));/**
|
|
821
821
|
* @license
|
|
822
822
|
* Copyright 2023 Google LLC
|
|
823
823
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -836,7 +836,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=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 i of this.textSlots)if(dd(i)&&(t+=1),t>1){e=!0;break}this.multiline=e}}d([n({type:Boolean,reflect:!0})],ea.prototype,"multiline",void 0),d([
|
|
839
|
+
`}handleTextSlotChange(){let e=!1,t=0;for(const i of this.textSlots)if(dd(i)&&(t+=1),t>1){e=!0;break}this.multiline=e}}d([n({type:Boolean,reflect:!0})],ea.prototype,"multiline",void 0),d([Rl(".text slot")],ea.prototype,"textSlots",void 0);function dd(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 kl;function d(o,e,t,i){var r=argument
|
|
|
845
845
|
* @license
|
|
846
846
|
* Copyright 2023 Google LLC
|
|
847
847
|
* SPDX-License-Identifier: Apache-2.0
|
|
848
|
-
*/let ta=class extends ea{};ta.styles=[hd],ta=d([
|
|
848
|
+
*/let ta=class extends ea{};ta.styles=[hd],ta=d([g("md-item")],ta);/**
|
|
849
849
|
* @license
|
|
850
850
|
* Copyright 2022 Google LLC
|
|
851
851
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -897,7 +897,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
897
897
|
* @license
|
|
898
898
|
* Copyright 2022 Google LLC
|
|
899
899
|
* SPDX-License-Identifier: Apache-2.0
|
|
900
|
-
*/let ia=class extends Ve{};ia.styles=[pd],ia=d([
|
|
900
|
+
*/let ia=class extends Ve{};ia.styles=[pd],ia=d([g("md-list-item")],ia);/**
|
|
901
901
|
* @license
|
|
902
902
|
* Copyright 2018 Google LLC
|
|
903
903
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -909,7 +909,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
909
909
|
* @license
|
|
910
910
|
* Copyright 2023 Google LLC
|
|
911
911
|
* SPDX-License-Identifier: Apache-2.0
|
|
912
|
-
*/const Sr={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class fd{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:l,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),
|
|
912
|
+
*/const Sr={END_START:"end-start",START_START:"start-start",START_END:"start-end"};class fd{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:l,yOffset:h,repositionStrategy:p}=this.getProperties(),v=i.toLowerCase().trim(),f=r.toLowerCase().trim();if(!e||!t)return;const b=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,T=window.innerWidth-S.right;this.surfaceStylesInternal={display:"block",opacity:"0"},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();const A=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),z=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[ee,q]=f.split("-"),[H,et]=v.split("-"),tt=getComputedStyle(e).direction==="ltr";let{blockInset:xe,blockOutOfBoundsCorrection:pe,surfaceBlockProperty:Ht}=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:H,surfaceBlock:ee,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});if(pe){const Gi=ee==="start"?"end":"start",Yi=H==="start"?"end":"start",ze=this.calculateBlock({surfaceRect:A,anchorRect:z,anchorBlock:Yi,surfaceBlock:Gi,yOffset:h,positioning:s,windowInnerHeight:_,blockScrollbarHeight:C});pe>ze.blockOutOfBoundsCorrection&&(xe=ze.blockInset,pe=ze.blockOutOfBoundsCorrection,Ht=ze.surfaceBlockProperty)}let{inlineInset:Me,inlineOutOfBoundsCorrection:vt,surfaceInlineProperty:fo}=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:et,surfaceInline:q,xOffset:l,positioning:s,isLTR:tt,windowInnerWidth:b,inlineScrollbarWidth:T});if(vt){const Gi=q==="start"?"end":"start",Yi=et==="start"?"end":"start",ze=this.calculateInline({surfaceRect:A,anchorRect:z,anchorInline:Yi,surfaceInline:Gi,xOffset:l,positioning:s,isLTR:tt,windowInnerWidth:b,inlineScrollbarWidth:T});Math.abs(vt)>Math.abs(ze.inlineOutOfBoundsCorrection)&&(Me=ze.inlineInset,vt=ze.inlineOutOfBoundsCorrection,fo=ze.surfaceInlineProperty)}p==="move"&&(xe=xe-pe,Me=Me-vt),this.surfaceStylesInternal={display:"block",opacity:"1",[Ht]:`${xe}px`,[fo]:`${Me}px`},p==="resize"&&(pe&&(this.surfaceStylesInternal.height=`${A.height-pe}px`),vt&&(this.surfaceStylesInternal.width=`${A.width-vt}px`)),this.host.requestUpdate()}calculateBlock(e){const{surfaceRect:t,anchorRect:i,anchorBlock:r,surfaceBlock:s,yOffset:l,positioning:h,windowInnerHeight:p,blockScrollbarHeight:v}=e,f=h==="fixed"||h==="document"?1:0,b=h==="document"?1:0,_=s==="start"?1:0,x=s==="end"?1:0,C=(r!==s?1:0)*i.height+l,T=_*i.top+x*(p-i.bottom-v),A=_*window.scrollY-x*window.scrollY,z=Math.abs(Math.min(0,p-T-C-t.height));return{blockInset:f*T+b*A+C,blockOutOfBoundsCorrection:z,surfaceBlockProperty:s==="start"?"inset-block-start":"inset-block-end"}}calculateInline(e){const{isLTR:t,surfaceInline:i,anchorInline:r,anchorRect:s,surfaceRect:l,xOffset:h,positioning:p,windowInnerWidth:v,inlineScrollbarWidth:f}=e,b=p==="fixed"||p==="document"?1:0,_=p==="document"?1:0,x=t?1:0,S=t?0:1,C=i==="start"?1:0,T=i==="end"?1:0,z=(r!==i?1:0)*s.width+h,ee=C*s.left+T*(v-s.right-f),q=C*(v-s.right-f)+T*s.left,H=x*ee+S*q,et=C*window.scrollX-T*window.scrollX,tt=T*window.scrollX-C*window.scrollX,xe=x*et+S*tt,pe=Math.abs(Math.min(0,v-H-z-l.width)),Ht=b*H+z+_*xe;let Me=i==="start"?"inset-inline-start":"inset-inline-end";return(p==="document"||p==="fixed")&&(i==="start"&&t||i==="end"&&!t?Me="left":Me="right"),{inlineInset:Ht,inlineOutOfBoundsCorrection:pe,surfaceInlineProperty:Me}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){const e=this.getProperties();let t=!1;for(const[l,h]of Object.entries(e))if(t=t||h!==this.lastValues[l],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
|
|
@@ -935,7 +935,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=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&&en(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,l=i==="UP",h=this.items,p=500,v=50,
|
|
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&&en(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,l=i==="UP",h=this.items,p=500,v=50,f=250,b=(p-f)/h.length,_=e.animate([{height:"0px"},{height:`${s}px`}],{duration:p,easing:we.EMPHASIZED}),x=t.animate([{transform:l?`translateY(-${s}px)`:""},{transform:""}],{duration:p,easing:we.EMPHASIZED}),S=e.animate([{opacity:0},{opacity:1}],v),C=[];for(let z=0;z<h.length;z++){const ee=l?h.length-1-z:z,q=h[ee],H=q.animate([{opacity:0},{opacity:1}],{duration:f,delay:b*z});q.classList.toggle("md-menu-hidden",!0),H.addEventListener("finish",()=>{q.classList.toggle("md-menu-hidden",!1)}),C.push([q,H])}let T=z=>{};const A=new Promise(z=>{T=z});return r.addEventListener("abort",()=>{_.cancel(),x.cancel(),S.cancel(),C.forEach(([z,ee])=>{z.classList.toggle("md-menu-hidden",!1),ee.cancel()}),T(!0)}),_.addEventListener("finish",()=>{e.classList.toggle("animating",!1),this.openCloseAnimationSignal.finish(),T(!1)}),await A}animateClose(){let e;const t=new Promise(H=>{e=H}),i=this.surfaceEl,r=this.slotEl;if(!i||!r)return e(!1),t;const l=this.openDirection==="UP";this.dispatchEvent(new Event("closing")),i.classList.toggle("animating",!0);const h=this.openCloseAnimationSignal.start(),p=i.offsetHeight,v=this.items,f=150,b=50,_=f-b,x=50,S=50,C=.35,T=(f-S-x)/v.length,A=i.animate([{height:`${p}px`},{height:`${p*C}px`}],{duration:f,easing:we.EMPHASIZED_ACCELERATE}),z=r.animate([{transform:""},{transform:l?`translateY(-${p*(1-C)}px)`:""}],{duration:f,easing:we.EMPHASIZED_ACCELERATE}),ee=i.animate([{opacity:1},{opacity:0}],{duration:b,delay:_}),q=[];for(let H=0;H<v.length;H++){const et=l?H:v.length-1-H,tt=v[et],xe=tt.animate([{opacity:1},{opacity:0}],{duration:x,delay:S+T*H});xe.addEventListener("finish",()=>{tt.classList.toggle("md-menu-hidden",!0)}),q.push([tt,xe])}return h.addEventListener("abort",()=>{A.cancel(),z.cancel(),ee.cancel(),q.forEach(([H,et])=>{et.cancel(),H.classList.toggle("md-menu-hidden",!1)}),e(!1)}),A.addEventListener("finish",()=>{i.classList.toggle("animating",!1),q.forEach(([H])=>{H.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")],N.prototype,"surfaceEl",void 0),d([k("slot")],N.prototype,"slotEl",void 0),d([n()],N.prototype,"anchor",void 0),d([n()],N.prototype,"positioning",void 0),d([n({type:Boolean})],N.prototype,"quick",void 0),d([n({type:Boolean,attribute:"has-overflow"})],N.prototype,"hasOverflow",void 0),d([n({type:Boolean,reflect:!0})],N.prototype,"open",void 0),d([n({type:Number,attribute:"x-offset"})],N.prototype,"xOffset",void 0),d([n({type:Number,attribute:"y-offset"})],N.prototype,"yOffset",void 0),d([n({type:Number,attribute:"typeahead-delay"})],N.prototype,"typeaheadDelay",void 0),d([n({attribute:"anchor-corner"})],N.prototype,"anchorCorner",void 0),d([n({attribute:"menu-corner"})],N.prototype,"menuCorner",void 0),d([n({type:Boolean,attribute:"stay-open-on-outside-click"})],N.prototype,"stayOpenOnOutsideClick",void 0),d([n({type:Boolean,attribute:"stay-open-on-focusout"})],N.prototype,"stayOpenOnFocusout",void 0),d([n({type:Boolean,attribute:"skip-restore-focus"})],N.prototype,"skipRestoreFocus",void 0),d([n({attribute:"default-focus"})],N.prototype,"defaultFocus",void 0),d([n({type:Boolean,attribute:"no-navigation-wrap"})],N.prototype,"noNavigationWrap",void 0),d([X({flatten:!0})],N.prototype,"slotItems",void 0),d([w()],N.prototype,"typeaheadActive",void 0);/**
|
|
939
939
|
* @license
|
|
940
940
|
* Copyright 2024 Google LLC
|
|
941
941
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -944,7 +944,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
944
944
|
* @license
|
|
945
945
|
* Copyright 2022 Google LLC
|
|
946
946
|
* SPDX-License-Identifier: Apache-2.0
|
|
947
|
-
*/let na=class extends N{};na.styles=[xd],na=d([
|
|
947
|
+
*/let na=class extends N{};na.styles=[xd],na=d([g("md-menu")],na);/**
|
|
948
948
|
* @license
|
|
949
949
|
* Copyright 2023 Google LLC
|
|
950
950
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1000,7 +1000,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1000
1000
|
* @license
|
|
1001
1001
|
* Copyright 2022 Google LLC
|
|
1002
1002
|
* SPDX-License-Identifier: Apache-2.0
|
|
1003
|
-
*/let la=class extends ae{};la.styles=[an],la=d([
|
|
1003
|
+
*/let la=class extends ae{};la.styles=[an],la=d([g("md-menu-item")],la);/**
|
|
1004
1004
|
* @license
|
|
1005
1005
|
* Copyright 2023 Google LLC
|
|
1006
1006
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1026,7 +1026,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1026
1026
|
* @license
|
|
1027
1027
|
* Copyright 2023 Google LLC
|
|
1028
1028
|
* SPDX-License-Identifier: Apache-2.0
|
|
1029
|
-
*/let ca=class extends lt{};ca.styles=[wd],ca=d([
|
|
1029
|
+
*/let ca=class extends lt{};ca.styles=[wd],ca=d([g("md-sub-menu")],ca);/**
|
|
1030
1030
|
* @license
|
|
1031
1031
|
* Copyright 2023 Google LLC
|
|
1032
1032
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1068,7 +1068,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1068
1068
|
* @license
|
|
1069
1069
|
* Copyright 2023 Google LLC
|
|
1070
1070
|
* SPDX-License-Identifier: Apache-2.0
|
|
1071
|
-
*/let da=class extends Sd{};da.styles=[kd],da=d([
|
|
1071
|
+
*/let da=class extends Sd{};da.styles=[kd],da=d([g("md-circular-progress")],da);/**
|
|
1072
1072
|
* @license
|
|
1073
1073
|
* Copyright 2023 Google LLC
|
|
1074
1074
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1090,7 +1090,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1090
1090
|
* @license
|
|
1091
1091
|
* Copyright 2023 Google LLC
|
|
1092
1092
|
* SPDX-License-Identifier: Apache-2.0
|
|
1093
|
-
*/let ha=class extends sn{};ha.styles=[$d],ha=d([
|
|
1093
|
+
*/let ha=class extends sn{};ha.styles=[$d],ha=d([g("md-linear-progress")],ha);/**
|
|
1094
1094
|
* @license
|
|
1095
1095
|
* Copyright 2023 Google LLC
|
|
1096
1096
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1102,7 +1102,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1102
1102
|
* @license
|
|
1103
1103
|
* Copyright 2022 Google LLC
|
|
1104
1104
|
* SPDX-License-Identifier: Apache-2.0
|
|
1105
|
-
*/class Ed{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",l=t.key==="ArrowRight";if(!s&&!l&&!i&&!r)return;const h=this.controls;if(!h.length)return;t.preventDefault();const v=getComputedStyle(this.host).direction==="rtl"?s||i:l||i,
|
|
1105
|
+
*/class Ed{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",l=t.key==="ArrowRight";if(!s&&!l&&!i&&!r)return;const h=this.controls;if(!h.length)return;t.preventDefault();const v=getComputedStyle(this.host).direction==="rtl"?s||i:l||i,f=h.indexOf(this.host);let b=v?f+1:f-1;for(;b!==f;){b>=h.length?b=0:b<0&&(b=h.length-1);const _=h[b];if(_.hasAttribute("disabled")){v?b++:b--;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
|
|
@@ -1144,7 +1144,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1144
1144
|
* @license
|
|
1145
1145
|
* Copyright 2022 Google LLC
|
|
1146
1146
|
* SPDX-License-Identifier: Apache-2.0
|
|
1147
|
-
*/let va=class extends _i{};va.styles=[zd],va=d([
|
|
1147
|
+
*/let va=class extends _i{};va.styles=[zd],va=d([g("md-radio")],va);/**
|
|
1148
1148
|
* @license
|
|
1149
1149
|
* Copyright 2023 Google LLC
|
|
1150
1150
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1160,7 +1160,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1160
1160
|
* @license
|
|
1161
1161
|
* Copyright 2023 Google LLC
|
|
1162
1162
|
* SPDX-License-Identifier: Apache-2.0
|
|
1163
|
-
*/var dn;const Or=Symbol("value"),
|
|
1163
|
+
*/var dn;const Or=Symbol("value"),Bd=cn(mi(qt(at(y))));class O extends Bd{get value(){return this[Or]}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=tn,this.hasLeadingIcon=!1,this.displayText="",this.menuAlign="start",this[dn]="",this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText="",this.focused=!1,this.open=!1,this.defaultFocus=ke.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=""}[(dn=Or,Tr)](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}>
|
|
@@ -1246,7 +1246,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1246
1246
|
* @license
|
|
1247
1247
|
* Copyright 2023 Google LLC
|
|
1248
1248
|
* SPDX-License-Identifier: Apache-2.0
|
|
1249
|
-
*/class
|
|
1249
|
+
*/class Rd extends O{constructor(){super(...arguments),this.fieldTag=oe`md-filled-field`}}/**
|
|
1250
1250
|
* @license
|
|
1251
1251
|
* Copyright 2024 Google LLC
|
|
1252
1252
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1260,7 +1260,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1260
1260
|
* @license
|
|
1261
1261
|
* Copyright 2023 Google LLC
|
|
1262
1262
|
* SPDX-License-Identifier: Apache-2.0
|
|
1263
|
-
*/let ma=class extends
|
|
1263
|
+
*/let ma=class extends Rd{};ma.styles=[hn,Md],ma=d([g("md-filled-select")],ma);/**
|
|
1264
1264
|
* @license
|
|
1265
1265
|
* Copyright 2023 Google LLC
|
|
1266
1266
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1273,7 +1273,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1273
1273
|
* @license
|
|
1274
1274
|
* Copyright 2023 Google LLC
|
|
1275
1275
|
* SPDX-License-Identifier: Apache-2.0
|
|
1276
|
-
*/let fa=class extends Fd{};fa.styles=[hn,Hd],fa=d([
|
|
1276
|
+
*/let fa=class extends Fd{};fa.styles=[hn,Hd],fa=d([g("md-outlined-select")],fa);/**
|
|
1277
1277
|
* @license
|
|
1278
1278
|
* Copyright 2023 Google LLC
|
|
1279
1279
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1323,7 +1323,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1323
1323
|
* @license
|
|
1324
1324
|
* Copyright 2023 Google LLC
|
|
1325
1325
|
* SPDX-License-Identifier: Apache-2.0
|
|
1326
|
-
*/let ga=class extends ne{};ga.styles=[an],ga=d([
|
|
1326
|
+
*/let ga=class extends ne{};ga.styles=[an],ga=d([g("md-select-option")],ga);/**
|
|
1327
1327
|
* @license
|
|
1328
1328
|
* Copyright 2024 Google LLC
|
|
1329
1329
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1336,11 +1336,11 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1336
1336
|
* @license
|
|
1337
1337
|
* Copyright 2023 Google LLC
|
|
1338
1338
|
* SPDX-License-Identifier: Apache-2.0
|
|
1339
|
-
*/const Wd=qt(at(y));class I extends Wd{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=>{!vi(e)||!this.inputEnd||(this.focus(),ar(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=jd(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)},l={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},
|
|
1339
|
+
*/const Wd=qt(at(y));class I extends Wd{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=>{!vi(e)||!this.inputEnd||(this.focus(),ar(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=jd(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)},l={ranged:this.range},h=this.valueLabelStart||String(this.renderValueStart),p=(this.range?this.valueLabelEnd:this.valueLabel)||String(this.renderValueEnd),v={start:!0,value:this.renderValueStart,ariaLabel:this.renderAriaLabelStart,ariaValueText:this.renderAriaValueTextStart,ariaMin:this.min,ariaMax:this.valueEnd??this.max},f={start:!1,value:this.renderValueEnd,ariaLabel:this.renderAriaLabelEnd,ariaValueText:this.renderAriaValueTextEnd,ariaMin:this.range?this.valueStart??this.min:this.min,ariaMax:this.max},b={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(l)}"
|
|
1341
1341
|
style=${St(s)}>
|
|
1342
1342
|
${ya(this.range,()=>this.renderInput(v))}
|
|
1343
|
-
${this.renderInput(
|
|
1343
|
+
${this.renderInput(f)} ${this.renderTrack()}
|
|
1344
1344
|
<div class="handleContainerPadded">
|
|
1345
1345
|
<div class="handleContainerBlock">
|
|
1346
1346
|
<div class="handleContainer ${L(x)}">
|
|
@@ -1397,7 +1397,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1397
1397
|
* @license
|
|
1398
1398
|
* Copyright 2023 Google LLC
|
|
1399
1399
|
* SPDX-License-Identifier: Apache-2.0
|
|
1400
|
-
*/let _a=class extends I{};_a.styles=[Kd,Ud],_a=d([
|
|
1400
|
+
*/let _a=class extends I{};_a.styles=[Kd,Ud],_a=d([g("md-slider")],_a);/**
|
|
1401
1401
|
* @license
|
|
1402
1402
|
* Copyright 2023 Google LLC
|
|
1403
1403
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1458,7 +1458,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1458
1458
|
* @license
|
|
1459
1459
|
* Copyright 2021 Google LLC
|
|
1460
1460
|
* SPDX-License-Identifier: Apache-2.0
|
|
1461
|
-
*/let xa=class extends qe{};xa.styles=[Zd],xa=d([
|
|
1461
|
+
*/let xa=class extends qe{};xa.styles=[Zd],xa=d([g("md-switch")],xa);/**
|
|
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 kl;function d(o,e,t,i){var r=argument
|
|
|
1477
1477
|
${this.fullWidthIndicator?u:e}
|
|
1478
1478
|
</div>
|
|
1479
1479
|
${this.fullWidthIndicator?e:u}
|
|
1480
|
-
</div>`}getContentClasses(){return{"has-icon":this.hasIcon,"has-label":!this.iconOnly}}updated(){this.internals.ariaSelected=String(this.active)}async handleKeydown(e){await 0,!e.defaultPrevented&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}handleContentClick(e){e.stopPropagation(),this.click()}[(bn=Kt,mn)](e){if(!this[Kt])return;this[Kt].getAnimations().forEach(i=>{i.cancel()});const t=this.getKeyframes(e);t!==null&&this[Kt].animate(t,{duration:250,easing:we.EMPHASIZED})}getKeyframes(e){var b;const t=Qd();if(!this.active)return t?[{opacity:1},{transform:"none"}]:null;const i={},r=((b=e[Kt])==null?void 0:b.getBoundingClientRect())??{},s=r.left,l=r.width,h=this[Kt].getBoundingClientRect(),p=h.left,v=h.width,
|
|
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()}[(bn=Kt,mn)](e){if(!this[Kt])return;this[Kt].getAnimations().forEach(i=>{i.cancel()});const t=this.getKeyframes(e);t!==null&&this[Kt].animate(t,{duration:250,easing:we.EMPHASIZED})}getKeyframes(e){var b;const t=Qd();if(!this.active)return t?[{opacity:1},{transform:"none"}]:null;const i={},r=((b=e[Kt])==null?void 0:b.getBoundingClientRect())??{},s=r.left,l=r.width,h=this[Kt].getBoundingClientRect(),p=h.left,v=h.width,f=l/v;return!t&&s!==void 0&&p!==void 0&&!isNaN(f)?i.transform=`translateX(${(s-p).toFixed(4)}px) scaleX(${f.toFixed(4)})`:i.opacity=0,[i,{transform:"none"}]}handleSlotChange(){this.iconOnly=!1;for(const e of this.assignedDefaultNodes){const t=e.nodeType===Node.TEXT_NODE&&!!e.wholeText.match(/\S/);if(e.nodeType===Node.ELEMENT_NODE||t)return}this.iconOnly=!0}handleIconSlotChange(){this.hasIcon=this.assignedIcons.length>0}}d([n({type:Boolean,reflect:!0,attribute:"md-tab"})],$e.prototype,"isTab",void 0),d([n({type:Boolean,reflect:!0})],$e.prototype,"active",void 0),d([n({type:Boolean})],$e.prototype,"selected",null),d([n({type:Boolean,attribute:"has-icon"})],$e.prototype,"hasIcon",void 0),d([n({type:Boolean,attribute:"icon-only"})],$e.prototype,"iconOnly",void 0),d([k(".indicator")],$e.prototype,bn,void 0),d([w()],$e.prototype,"fullWidthIndicator",void 0),d([So({flatten:!0})],$e.prototype,"assignedDefaultNodes",void 0),d([X({slot:"icon",flatten:!0})],$e.prototype,"assignedIcons",void 0);function Qd(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}/**
|
|
1481
1481
|
* @license
|
|
1482
1482
|
* Copyright 2023 Google LLC
|
|
1483
1483
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1495,7 +1495,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1495
1495
|
* @license
|
|
1496
1496
|
* Copyright 2023 Google LLC
|
|
1497
1497
|
* SPDX-License-Identifier: Apache-2.0
|
|
1498
|
-
*/let xi=class extends fn{};xi.styles=[gn,eh],xi=d([
|
|
1498
|
+
*/let xi=class extends fn{};xi.styles=[gn,eh],xi=d([g("md-primary-tab")],xi);/**
|
|
1499
1499
|
* @license
|
|
1500
1500
|
* Copyright 2023 Google LLC
|
|
1501
1501
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1508,18 +1508,18 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1508
1508
|
* @license
|
|
1509
1509
|
* Copyright 2023 Google LLC
|
|
1510
1510
|
* SPDX-License-Identifier: Apache-2.0
|
|
1511
|
-
*/let wi=class extends th{};wi.styles=[gn,ih],wi=d([
|
|
1511
|
+
*/let wi=class extends th{};wi.styles=[gn,ih],wi=d([g("md-secondary-tab")],wi);/**
|
|
1512
1512
|
* @license
|
|
1513
1513
|
* Copyright 2023 Google LLC
|
|
1514
1514
|
* SPDX-License-Identifier: Apache-2.0
|
|
1515
|
-
*/class Gt 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,l=this.offsetWidth,h=48,p=i-h,v=i+r-l+h,
|
|
1515
|
+
*/class Gt 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,l=this.offsetWidth,h=48,p=i-h,v=i+r-l+h,f=Math.min(p,Math.max(v,s)),b=this.focusedTab?"auto":"instant";this.tabsScrollerElement.scrollTo({behavior:b,top:0,left:f})}render(){return c`
|
|
1516
1516
|
<div class="tabs">
|
|
1517
1517
|
<slot
|
|
1518
1518
|
@slotchange=${this.handleSlotChange}
|
|
1519
1519
|
@click=${this.handleTabClick}></slot>
|
|
1520
1520
|
</div>
|
|
1521
1521
|
<md-divider part="divider"></md-divider>
|
|
1522
|
-
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!rh(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[mn](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:l}=this;if(l.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:l.length-1;else{const
|
|
1522
|
+
`}async handleTabClick(e){const t=e.target;await 0,!(e.defaultPrevented||!rh(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[mn](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:l}=this;if(l.length<2)return;e.preventDefault();let h;if(r||s)h=r?0:l.length-1;else{const f=getComputedStyle(this).direction==="rtl"?t:i,{focusedTab:b}=this;if(!b)h=f?0:l.length-1;else{const _=this.tabs.indexOf(b);h=f?_+1:_-1,h>=l.length?h=0:h<0&&(h=l.length-1)}}const p=l[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([X({flatten:!0,selector:"[md-tab]"})],Gt.prototype,"tabs",void 0),d([n({type:Number,attribute:"active-tab-index"})],Gt.prototype,"activeTabIndex",null),d([n({type:Boolean,attribute:"auto-activate"})],Gt.prototype,"autoActivate",void 0),d([k(".tabs")],Gt.prototype,"tabsScrollerElement",void 0),d([k("slot")],Gt.prototype,"slotElement",void 0);function rh(o){return o instanceof HTMLElement&&o.hasAttribute("md-tab")}/**
|
|
1523
1523
|
* @license
|
|
1524
1524
|
* Copyright 2024 Google LLC
|
|
1525
1525
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1528,7 +1528,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1528
1528
|
* @license
|
|
1529
1529
|
* Copyright 2023 Google LLC
|
|
1530
1530
|
* SPDX-License-Identifier: Apache-2.0
|
|
1531
|
-
*/let Si=class extends Gt{};Si.styles=[oh],Si=d([
|
|
1531
|
+
*/let Si=class extends Gt{};Si.styles=[oh],Si=d([g("md-tabs")],Si);/**
|
|
1532
1532
|
* @license
|
|
1533
1533
|
* Copyright 2024 Google LLC
|
|
1534
1534
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1654,7 +1654,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1654
1654
|
* @license
|
|
1655
1655
|
* Copyright 2021 Google LLC
|
|
1656
1656
|
* SPDX-License-Identifier: Apache-2.0
|
|
1657
|
-
*/let wa=class extends ph{constructor(){super(...arguments),this.fieldTag=oe`md-filled-field`}};wa.styles=[_n,ah],wa=d([
|
|
1657
|
+
*/let wa=class extends ph{constructor(){super(...arguments),this.fieldTag=oe`md-filled-field`}};wa.styles=[_n,ah],wa=d([g("md-filled-text-field")],wa);/**
|
|
1658
1658
|
* @license
|
|
1659
1659
|
* Copyright 2024 Google LLC
|
|
1660
1660
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1667,7 +1667,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1667
1667
|
* @license
|
|
1668
1668
|
* Copyright 2021 Google LLC
|
|
1669
1669
|
* SPDX-License-Identifier: Apache-2.0
|
|
1670
|
-
*/let Sa=class extends vh{constructor(){super(...arguments),this.fieldTag=oe`md-outlined-field`}};Sa.styles=[_n,uh],Sa=d([
|
|
1670
|
+
*/let Sa=class extends vh{constructor(){super(...arguments),this.fieldTag=oe`md-outlined-field`}};Sa.styles=[_n,uh],Sa=d([g("md-outlined-text-field")],Sa);var bh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,ie=(o,e,t,i)=>{for(var r=i>1?void 0:i?mh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&bh(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}`}firstUpdated(){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,l=r.indexOf(s);switch(e.key){case"ArrowDown":e.preventDefault(),l<r.length-1&&r[l+1].focus();break;case"ArrowUp":e.preventDefault(),l>0&&r[l-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}
|
|
@@ -1711,8 +1711,8 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1711
1711
|
position: relative;
|
|
1712
1712
|
--scb-accordion-hover-radius: var(--radius-none, 0px);
|
|
1713
1713
|
--scb-accordion-chevron-nudge-y: 3px;
|
|
1714
|
-
--scb-accordion-transition-duration: 150ms;
|
|
1715
|
-
--scb-accordion-transition-easing: cubic-bezier(.69,.16,.2,.98);
|
|
1714
|
+
--scb-accordion-transition-duration: var(--motion-duration-medium, 150ms);
|
|
1715
|
+
--scb-accordion-transition-easing: var(--motion-easing-emphasized-accelerate, var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98)));
|
|
1716
1716
|
--scb-accordion-panel-padding-closed: var(--spacing-0, 0px);
|
|
1717
1717
|
}
|
|
1718
1718
|
|
|
@@ -1759,7 +1759,10 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1759
1759
|
padding-block: var(--spacing-4, 12px);
|
|
1760
1760
|
}
|
|
1761
1761
|
|
|
1762
|
-
|
|
1762
|
+
details[open] {
|
|
1763
|
+
--scb-accordion-transition-easing: var(--motion-easing-emphasized-decelerate, var(--motion-easing-standard, cubic-bezier(.69,.16,.2,.98)));
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1763
1766
|
.scb-accordion-bottom {
|
|
1764
1767
|
display: grid;
|
|
1765
1768
|
grid-template-rows: 0fr;
|
|
@@ -1782,6 +1785,40 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1782
1785
|
}
|
|
1783
1786
|
.bottom-inner { overflow: hidden; }
|
|
1784
1787
|
|
|
1788
|
+
/* Browsers med stöd för ::details-content och interpolate-size kan animera höjd till auto. */
|
|
1789
|
+
@supports selector(::details-content) and (interpolate-size: allow-keywords) {
|
|
1790
|
+
:host {
|
|
1791
|
+
interpolate-size: allow-keywords;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
details {
|
|
1795
|
+
interpolate-size: allow-keywords;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
details::details-content {
|
|
1799
|
+
height: 0;
|
|
1800
|
+
overflow: clip;
|
|
1801
|
+
content-visibility: hidden;
|
|
1802
|
+
transition:
|
|
1803
|
+
height var(--scb-accordion-transition-duration) var(--scb-accordion-transition-easing),
|
|
1804
|
+
content-visibility var(--scb-accordion-transition-duration) var(--scb-accordion-transition-easing)
|
|
1805
|
+
allow-discrete;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
details[open]::details-content {
|
|
1809
|
+
height: auto;
|
|
1810
|
+
content-visibility: visible;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.scb-accordion-bottom {
|
|
1814
|
+
display: block;
|
|
1815
|
+
grid-template-rows: unset;
|
|
1816
|
+
transition:
|
|
1817
|
+
opacity var(--scb-accordion-transition-duration) var(--scb-accordion-transition-easing),
|
|
1818
|
+
padding var(--scb-accordion-transition-duration) var(--scb-accordion-transition-easing);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1785
1822
|
.title {
|
|
1786
1823
|
font-family: var(--brand-font);
|
|
1787
1824
|
font-size: var(--md-sys-typescale-title-large-size);
|
|
@@ -1820,8 +1857,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1820
1857
|
.chevron {
|
|
1821
1858
|
margin-left: auto;
|
|
1822
1859
|
padding-top: var(--scb-accordion-chevron-nudge-y, 3px);
|
|
1823
|
-
|
|
1824
|
-
transition: transform var(--scb-accordion-transition-duration) var(--scb-accordion-transition-easing);
|
|
1860
|
+
transition: transform var(--motion-duration-medium, var(--scb-accordion-transition-duration)) var(--motion-easing-standard, var(--scb-accordion-transition-easing));
|
|
1825
1861
|
}
|
|
1826
1862
|
details[open] .chevron { transform: rotate(180deg); }
|
|
1827
1863
|
|
|
@@ -1835,7 +1871,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1835
1871
|
@media (prefers-reduced-motion: reduce) {
|
|
1836
1872
|
md-ripple { display: none; }
|
|
1837
1873
|
}
|
|
1838
|
-
`],ie([n({type:Boolean,reflect:!0})],a.ScbAccordionItem.prototype,"open",2),ie([n({type:String,reflect:!0})],a.ScbAccordionItem.prototype,"title",2),ie([n({type:String})],a.ScbAccordionItem.prototype,"content",2),ie([n({type:String,attribute:"overline"})],a.ScbAccordionItem.prototype,"overline",2),ie([n({type:String,attribute:"supporting-text"})],a.ScbAccordionItem.prototype,"supportingText",2),ie([n({type:Boolean})],a.ScbAccordionItem.prototype,"leading",2),ie([n({type:String,attribute:"leading-variant",reflect:!0})],a.ScbAccordionItem.prototype,"leadingVariant",2),ie([n({type:String,attribute:"leading-icon"})],a.ScbAccordionItem.prototype,"leadingIcon",2),ie([n({type:String,attribute:"img-href-image",reflect:!0})],a.ScbAccordionItem.prototype,"imgHrefImage",2),ie([n({type:String,attribute:"avatar-label"})],a.ScbAccordionItem.prototype,"avatarLabel",2),ie([n({type:String,attribute:"avatar-alt"})],a.ScbAccordionItem.prototype,"avatarAlt",2),ie([n({type:String,attribute:"avatar-variant"})],a.ScbAccordionItem.prototype,"avatarVariant",2),ie([n({type:String,attribute:"avatar-src"})],a.ScbAccordionItem.prototype,"avatarSrc",2),ie([n({type:Number,reflect:!0})],a.ScbAccordionItem.prototype,"density",2),a.ScbAccordionItem=ie([
|
|
1874
|
+
`],ie([n({type:Boolean,reflect:!0})],a.ScbAccordionItem.prototype,"open",2),ie([n({type:String,reflect:!0})],a.ScbAccordionItem.prototype,"title",2),ie([n({type:String})],a.ScbAccordionItem.prototype,"content",2),ie([n({type:String,attribute:"overline"})],a.ScbAccordionItem.prototype,"overline",2),ie([n({type:String,attribute:"supporting-text"})],a.ScbAccordionItem.prototype,"supportingText",2),ie([n({type:Boolean})],a.ScbAccordionItem.prototype,"leading",2),ie([n({type:String,attribute:"leading-variant",reflect:!0})],a.ScbAccordionItem.prototype,"leadingVariant",2),ie([n({type:String,attribute:"leading-icon"})],a.ScbAccordionItem.prototype,"leadingIcon",2),ie([n({type:String,attribute:"img-href-image",reflect:!0})],a.ScbAccordionItem.prototype,"imgHrefImage",2),ie([n({type:String,attribute:"avatar-label"})],a.ScbAccordionItem.prototype,"avatarLabel",2),ie([n({type:String,attribute:"avatar-alt"})],a.ScbAccordionItem.prototype,"avatarAlt",2),ie([n({type:String,attribute:"avatar-variant"})],a.ScbAccordionItem.prototype,"avatarVariant",2),ie([n({type:String,attribute:"avatar-src"})],a.ScbAccordionItem.prototype,"avatarSrc",2),ie([n({type:Number,reflect:!0})],a.ScbAccordionItem.prototype,"density",2),a.ScbAccordionItem=ie([g("scb-accordion-item")],a.ScbAccordionItem);var fh=Object.defineProperty,gh=Object.getOwnPropertyDescriptor,xn=o=>{throw TypeError(o)},$i=(o,e,t,i)=>{for(var r=i>1?void 0:i?gh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&fh(e,t,r),r},yh=(o,e,t)=>e.has(o)||xn("Cannot "+t),_h=(o,e,t)=>e.has(o)?xn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),wn=(o,e,t)=>(yh(o,e,"access private method"),t),Lr,ka;a.ScbAccordion=class extends y{constructor(){super(...arguments),_h(this,Lr),this.detached=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}render(){return c`
|
|
1839
1875
|
<div class="scb-accordion" ?detached=${this.detached}>
|
|
1840
1876
|
<slot></slot>
|
|
1841
1877
|
</div>
|
|
@@ -1845,7 +1881,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1845
1881
|
margin-block-start: var(--scb-accordion-spacing-block-start, 0);
|
|
1846
1882
|
margin-block-end: var(--scb-accordion-spacing-block-end, 0);
|
|
1847
1883
|
}
|
|
1848
|
-
`,$i([n({type:Boolean,reflect:!0})],a.ScbAccordion.prototype,"detached",2),$i([n({type:String,reflect:!0})],a.ScbAccordion.prototype,"spacing",2),$i([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbAccordion.prototype,"spacingTop",2),$i([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbAccordion.prototype,"spacingBottom",2),a.ScbAccordion=$i([
|
|
1884
|
+
`,$i([n({type:Boolean,reflect:!0})],a.ScbAccordion.prototype,"detached",2),$i([n({type:String,reflect:!0})],a.ScbAccordion.prototype,"spacing",2),$i([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbAccordion.prototype,"spacingTop",2),$i([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbAccordion.prototype,"spacingBottom",2),a.ScbAccordion=$i([g("scb-accordion")],a.ScbAccordion);var xh=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,Sn=o=>{throw TypeError(o)},le=(o,e,t,i)=>{for(var r=i>1?void 0:i?wh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&xh(e,t,r),r},Sh=(o,e,t)=>e.has(o)||Sn("Cannot "+t),kh=(o,e,t)=>e.has(o)?Sn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),kn=(o,e,t)=>(Sh(o,e,"access private method"),t),Dr,$a;a.ScbIconButton=class extends y{constructor(){super(...arguments),kh(this,Dr),this.icon="home",this.tooltip="",this.ariaLabel="",this.variant="standard",this.toggle=!1,this.selected=!1,this.toggleofficon="add",this.toggleonicon="remove",this.disabled=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this.__loadedVariants=new Set,this.__iconLoaded=!1,this.__lastMdHost=null,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.__syncTitleAndAria(),kn(this,Dr,$a).call(this)}updated(e){if(super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&kn(this,Dr,$a).call(this),e.has("variant")){this.__ensureDepsLoaded().then(()=>{queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})});return}(e.has("toggle")||e.has("icon")||e.has("toggleofficon")||e.has("toggleonicon")||e.has("selected")||e.has("disabled")||e.has("tooltip")||e.has("ariaLabel"))&&queueMicrotask(()=>{this.__attachChangeListener(),this.__syncTitleAndAria()})}disconnectedCallback(){var e,t;(t=(e=this.__lastMdHost)==null?void 0:e.removeEventListener)==null||t.call(e,"change",this.__onInnerChange),this.__lastMdHost=null,super.disconnectedCallback()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"filled":await Promise.resolve().then(()=>Zc);break;case"outlined":await Promise.resolve().then(()=>rd);break;case"filled-tonal":await Promise.resolve().then(()=>Qc);break;default:await Promise.resolve().then(()=>td);break}this.__loadedVariants.add(this.variant)}this.__iconLoaded||(await Promise.resolve().then(()=>Pe),this.__iconLoaded=!0)}__getMdHost(){return this.renderRoot.querySelector("md-filled-icon-button, md-outlined-icon-button, md-filled-tonal-icon-button, md-icon-button")}__attachChangeListener(){var t,i;const e=this.__getMdHost();e&&e!==this.__lastMdHost&&((i=(t=this.__lastMdHost)==null?void 0:t.removeEventListener)==null||i.call(t,"change",this.__onInnerChange),e.addEventListener("change",this.__onInnerChange),this.__lastMdHost=e),this.toggle&&e&&"selected"in e&&(e.selected=this.selected)}__syncTitleAndAria(){const e=this.__getMdHost();if(!e)return;const t=(this.tooltip||this.getAttribute("title")||"").trim(),i=(this.ariaLabel||this.getAttribute("aria-label")||"").trim(),r=this.getAttribute("aria-controls"),s=this.getAttribute("aria-expanded");this.tooltip&&this.setAttribute("title",t);const l=i||t||this.icon.trim()||void 0;l?e.setAttribute("aria-label",l):e.removeAttribute("aria-label"),t?e.setAttribute("title",t):e.removeAttribute("title"),r!==null?e.setAttribute("aria-controls",r):e.removeAttribute("aria-controls"),s!==null?e.setAttribute("aria-expanded",s):e.removeAttribute("aria-expanded")}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}__renderToggleIcons(){return c`
|
|
1849
1885
|
<md-icon aria-hidden="true">${this.toggleofficon}</md-icon>
|
|
1850
1886
|
<md-icon slot="selected" aria-hidden="true">${this.toggleonicon}</md-icon>
|
|
1851
1887
|
`}__renderSingleIcon(){return c`<md-icon aria-hidden="true">${this.icon}</md-icon>`}__renderMd(){const e=this.toggle?this.__renderToggleIcons():this.__renderSingleIcon();if(this.toggle)switch(this.variant){case"filled":return c`
|
|
@@ -1898,7 +1934,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
1898
1934
|
margin-block-start: var(--scb-icon-button-spacing-block-start, 0);
|
|
1899
1935
|
margin-block-end: var(--scb-icon-button-spacing-block-end, 0);
|
|
1900
1936
|
}
|
|
1901
|
-
`,le([n({type:String})],a.ScbIconButton.prototype,"icon",2),le([n({type:String})],a.ScbIconButton.prototype,"tooltip",2),le([n({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),le([n({type:String})],a.ScbIconButton.prototype,"variant",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),le([n({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),le([n({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),le([n({type:String,reflect:!0})],a.ScbIconButton.prototype,"spacing",2),le([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbIconButton.prototype,"spacingTop",2),le([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbIconButton.prototype,"spacingBottom",2),a.ScbIconButton=le([
|
|
1937
|
+
`,le([n({type:String})],a.ScbIconButton.prototype,"icon",2),le([n({type:String})],a.ScbIconButton.prototype,"tooltip",2),le([n({type:String,attribute:"aria-label"})],a.ScbIconButton.prototype,"ariaLabel",2),le([n({type:String})],a.ScbIconButton.prototype,"variant",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"toggle",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"selected",2),le([n({type:String})],a.ScbIconButton.prototype,"toggleofficon",2),le([n({type:String})],a.ScbIconButton.prototype,"toggleonicon",2),le([n({type:Boolean,reflect:!0})],a.ScbIconButton.prototype,"disabled",2),le([n({type:String,reflect:!0})],a.ScbIconButton.prototype,"spacing",2),le([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbIconButton.prototype,"spacingTop",2),le([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbIconButton.prototype,"spacingBottom",2),a.ScbIconButton=le([g("scb-icon-button")],a.ScbIconButton);const $h=Object.freeze(Object.defineProperty({__proto__:null,get ScbIconButton(){return a.ScbIconButton}},Symbol.toStringTag,{value:"Module"}));var Ch=Object.defineProperty,Eh=Object.getOwnPropertyDescriptor,$n=o=>{throw TypeError(o)},R=(o,e,t,i)=>{for(var r=i>1?void 0:i?Eh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Ch(e,t,r),r},Ca=(o,e,t)=>e.has(o)||$n("Cannot "+t),Br=(o,e,t)=>(Ca(o,e,"read from private field"),t?t.call(o):e.get(o)),Ci=(o,e,t)=>e.has(o)?$n("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ea=(o,e,t,i)=>(Ca(o,e,"write to private field"),e.set(o,t),t),Cn=(o,e,t)=>(Ca(o,e,"access private method"),t),Rr,Mr,Fr,Hr,Ta,Aa;a.ScbListItem=class extends y{constructor(){super(...arguments),Ci(this,Hr),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,Ci(this,Rr,!1),Ci(this,Mr,!1),Ci(this,Fr,!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)},Ci(this,Aa,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 m`
|
|
1902
1938
|
:host {
|
|
1903
1939
|
border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
|
|
1904
1940
|
margin-bottom: calc(var(--stroke-border, 1px) * -1);
|
|
@@ -2002,7 +2038,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2002
2038
|
}
|
|
2003
2039
|
|
|
2004
2040
|
.link { text-decoration: none; color: inherit; display: contents; }
|
|
2005
|
-
`}async firstUpdated(){await Cn(this,Hr,Ta).call(this),this.addEventListener("keydown",
|
|
2041
|
+
`}async firstUpdated(){await Cn(this,Hr,Ta).call(this),this.addEventListener("keydown",Br(this,Aa))}updated(e){super.updated(e),(e.has("leading")||e.has("leadingVariant")||e.has("trailing")||e.has("trailingVariant")||e.has("type")||e.has("target"))&&Cn(this,Hr,Ta).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`
|
|
2006
2042
|
<div class="leading">
|
|
2007
2043
|
<scb-avatar
|
|
2008
2044
|
label=${this.avatarLabel}
|
|
@@ -2040,7 +2076,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2040
2076
|
</div>
|
|
2041
2077
|
|
|
2042
2078
|
<md-focus-ring></md-focus-ring>
|
|
2043
|
-
`}},
|
|
2079
|
+
`}},Rr=new WeakMap,Mr=new WeakMap,Fr=new WeakMap,Hr=new WeakSet,Ta=async function(){const o=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||o)&&!Br(this,Rr)&&(await Promise.resolve().then(()=>Pe),Ea(this,Rr,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!Br(this,Mr)&&(await Promise.resolve().then(()=>fp),Ea(this,Mr,!0)),this.trailing&&this.trailingVariant==="switch"&&!Br(this,Fr)&&(await Promise.resolve().then(()=>Vp),Ea(this,Fr,!0))},Aa=new WeakMap,R([n({type:String,reflect:!0,attribute:"type"})],a.ScbListItem.prototype,"type",2),R([n({type:String})],a.ScbListItem.prototype,"href",2),R([n({type:String,attribute:"item-href"})],a.ScbListItem.prototype,"itemHref",2),R([n({type:String,attribute:"target"})],a.ScbListItem.prototype,"target",2),R([n({type:Boolean,attribute:"disabled"})],a.ScbListItem.prototype,"disabled",2),R([n({type:String,reflect:!0})],a.ScbListItem.prototype,"label",2),R([n({type:String,attribute:"supporting-text"})],a.ScbListItem.prototype,"supportingText",2),R([n({type:String,attribute:"overline"})],a.ScbListItem.prototype,"overline",2),R([n({type:Boolean})],a.ScbListItem.prototype,"leading",2),R([n({type:String,attribute:"leading-variant",reflect:!0})],a.ScbListItem.prototype,"leadingVariant",2),R([n({type:String,attribute:"leading-icon"})],a.ScbListItem.prototype,"leadingIcon",2),R([n({type:String,attribute:"avatar-label"})],a.ScbListItem.prototype,"avatarLabel",2),R([n({type:String,attribute:"avatar-alt"})],a.ScbListItem.prototype,"avatarAlt",2),R([n({type:String,attribute:"avatar-variant"})],a.ScbListItem.prototype,"avatarVariant",2),R([n({type:String,attribute:"avatar-src"})],a.ScbListItem.prototype,"avatarSrc",2),R([n({type:String,reflect:!0,attribute:"img-href-image"})],a.ScbListItem.prototype,"imgHrefImage",2),R([n({type:Boolean})],a.ScbListItem.prototype,"trailing",2),R([n({type:String,attribute:"trailing-variant",reflect:!0})],a.ScbListItem.prototype,"trailingVariant",2),R([n({type:String,attribute:"trailing-icon"})],a.ScbListItem.prototype,"trailingIcon",2),R([n({type:Number,reflect:!0})],a.ScbListItem.prototype,"density",2),R([n({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbListItem.prototype,"noDivider",2),a.ScbListItem=R([g("scb-list-item")],a.ScbListItem);var Th=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,En=o=>{throw TypeError(o)},Yt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ah(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Th(e,t,r),r},Tn=(o,e,t)=>e.has(o)||En("Cannot "+t),zh=(o,e,t)=>(Tn(o,e,"read from private field"),e.get(o)),Ih=(o,e,t)=>e.has(o)?En("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ph=(o,e,t,i)=>(Tn(o,e,"write to private field"),e.set(o,t),t),Nr;a.ScbList=class extends y{constructor(){super(...arguments),Ih(this,Nr,!1),this.noDivider=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this._onSlotChange=()=>this._setupItems()}async firstUpdated(){zh(this,Nr)||(await Promise.resolve().then(()=>cd),Ph(this,Nr,!0)),this._setupItems(),this._applySpacing()}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this._applySpacing()}_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 l=(s%t.length+t.length)%t.length;t.forEach(p=>p.setAttribute("tabindex","-1"));const h=t[l];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}}_mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_applySpacing(){const e=this._mapSpacingToken(this.spacing),t=this._mapSpacingToken(this.spacingTop)??e,i=this._mapSpacingToken(this.spacingBottom)??e;t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),i?this.style.marginBlockEnd=i:this.style.removeProperty("margin-block-end")}render(){return c`
|
|
2044
2080
|
<md-list role="list" @slotchange=${this._onSlotChange}>
|
|
2045
2081
|
<slot></slot>
|
|
2046
2082
|
</md-list>
|
|
@@ -2064,7 +2100,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2064
2100
|
:host([no-divider]) ::slotted(scb-list-item) {
|
|
2065
2101
|
--stroke-border: 0px;
|
|
2066
2102
|
}
|
|
2067
|
-
`],Yt([n({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Yt([n({type:String,reflect:!0})],a.ScbList.prototype,"spacing",2),Yt([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbList.prototype,"spacingTop",2),Yt([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbList.prototype,"spacingBottom",2),Yt([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Yt([
|
|
2103
|
+
`],Yt([n({type:Boolean,attribute:"no-divider",reflect:!0})],a.ScbList.prototype,"noDivider",2),Yt([n({type:String,reflect:!0})],a.ScbList.prototype,"spacing",2),Yt([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbList.prototype,"spacingTop",2),Yt([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbList.prototype,"spacingBottom",2),Yt([k("slot")],a.ScbList.prototype,"_slotEl",2),a.ScbList=Yt([g("scb-list")],a.ScbList);var Oh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,ct=(o,e,t,i)=>{for(var r=i>1?void 0:i?Lh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Oh(e,t,r),r};let Dh=0;a.ScbSearch=class extends y{constructor(){super(),this._internals=null,this.supportingText="Hinted search text",this.value="",this.name="",this.disabled=!1,this.size="default",this.fullScreen=!1,this._inputFocused=!1,this._visibleSuggestions=0,this._activeIndex=-1,this._listboxId=`scb-search-listbox-${++Dh}`,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._form=null,this._formResetHandler=null,this._initialValue="",this._listScrollHandler=()=>{const e=this._getActiveItem();this._kbMode&&e&&this._positionOptionRing(e)},"attachInternals"in this&&(this._internals=this.attachInternals())}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),this._initialValue=this.value??"",this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue;const e=this._inputEl();e&&(e.value=this._initialValue),this._syncFormValue(),this._filterSuggestions(this.value),this._activeIndex=-1,this._kbMode=!1,this._updateComboboxA11y()},this._form.addEventListener("reset",this._formResetHandler,!0)),this._syncFormValue()}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),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!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),e.disabled=this.disabled)}updated(e){if(super.updated(e),this._ensureListboxA11y(),this._updateComboboxA11y(),this._attachListScrollListener(),(e.has("value")||e.has("disabled"))&&this._syncFormValue(),e.has("disabled")){this.toggleAttribute("aria-disabled",this.disabled);const t=this._inputEl();t&&(t.disabled=this.disabled)}}render(){const e=(this.value??"").trim().length>0,t=this._inputFocused&&e&&this._hasSuggestions;return c`
|
|
2068
2104
|
<div class="ripple-wrapper">
|
|
2069
2105
|
<md-icon class="leading">${e?"arrow_back":"search"}</md-icon>
|
|
2070
2106
|
|
|
@@ -2106,7 +2142,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2106
2142
|
</scb-list>
|
|
2107
2143
|
<md-focus-ring id="optionRing" class="option-ring"></md-focus-ring>
|
|
2108
2144
|
`:u}
|
|
2109
|
-
`}formDisabledCallback(e){this.disabled=e}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._syncFormValue(),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.disabled||(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.disabled||!this._inputEl())return;const i=this._getVisibleItems(),r=(this.value??"").trim().length>0,s=this._inputFocused&&r&&i.length>0,l=e.key,h=e.keyCode,p=l==="ArrowDown"||l==="Down"||h===40,v=l==="ArrowUp"||l==="Up"||h===38,
|
|
2145
|
+
`}formDisabledCallback(e){this.disabled=e}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._syncFormValue(),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.disabled||(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.disabled||!this._inputEl())return;const i=this._getVisibleItems(),r=(this.value??"").trim().length>0,s=this._inputFocused&&r&&i.length>0,l=e.key,h=e.keyCode,p=l==="ArrowDown"||l==="Down"||h===40,v=l==="ArrowUp"||l==="Up"||h===38,f=l==="Home"||h===36,b=l==="End"||h===35,_=l==="Enter"||h===13,x=l==="Escape"||l==="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(f){if(!s)return;e.preventDefault(),this._kbMode=!0,this._activeIndex=i.length?0:-1,this._updateComboboxA11y(),this._scrollActiveIntoView();return}if(b){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._syncFormValue(),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(){if(this.disabled)return;this.value="",this._activeIndex=-1,this._kbMode=!1;const e=this._inputEl();e&&(e.value="",e.focus()),this._filterSuggestions(""),this._updateComboboxA11y(),this._hideOptionRing(),this._syncFormValue(),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 l=(s.getAttribute("label")||"").toLowerCase(),h=(s.getAttribute("supporting-text")||"").toLowerCase(),p=`${l} ${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(),l=s.top-r.top,h=s.left-r.left,p=s.width,v=s.height;t.style.top=`${l}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)}_syncFormValue(){if(!this._internals)return;const e=this.disabled?null:this.value;this._internals.setFormValue(e)}},a.ScbSearch.formAssociated=!0,a.ScbSearch.styles=m`
|
|
2110
2146
|
:host {
|
|
2111
2147
|
display: flex;
|
|
2112
2148
|
flex-direction: column;
|
|
@@ -2337,7 +2373,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2337
2373
|
color: var(--md-sys-color-on-surface);
|
|
2338
2374
|
}
|
|
2339
2375
|
}
|
|
2340
|
-
`,ct([n({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),ct([n({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),ct([n({type:String})],a.ScbSearch.prototype,"value",2),ct([n({type:String,reflect:!0})],a.ScbSearch.prototype,"name",2),ct([n({type:Boolean,reflect:!0})],a.ScbSearch.prototype,"disabled",2),ct([n({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),ct([n({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=ct([
|
|
2376
|
+
`,ct([n({type:String,attribute:"trailing-icon"})],a.ScbSearch.prototype,"trailingIcon",2),ct([n({type:String,attribute:"supporting-text"})],a.ScbSearch.prototype,"supportingText",2),ct([n({type:String})],a.ScbSearch.prototype,"value",2),ct([n({type:String,reflect:!0})],a.ScbSearch.prototype,"name",2),ct([n({type:Boolean,reflect:!0})],a.ScbSearch.prototype,"disabled",2),ct([n({type:String,reflect:!0})],a.ScbSearch.prototype,"size",2),ct([n({type:Boolean,attribute:"full-screen",reflect:!0})],a.ScbSearch.prototype,"fullScreen",2),a.ScbSearch=ct([g("scb-search")],a.ScbSearch);var Bh=Object.defineProperty,Rh=Object.getOwnPropertyDescriptor,An=o=>{throw TypeError(o)},ce=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Bh(e,t,r),r},Mh=(o,e,t)=>e.has(o)||An("Cannot "+t),Fh=(o,e,t)=>e.has(o)?An("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),zn=(o,e,t)=>(Mh(o,e,"access private method"),t),Vr,za;a.ScbAvatar=class extends y{constructor(){super(...arguments),Fh(this,Vr),this.src="",this.alt="",this.label="",this.size="medium",this.shape="circular",this.iconName="",this.variant="image",this.spacing="",this.spacingTop="",this.spacingBottom="",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(()=>Pe),zn(this,Vr,za).call(this)}updated(e){super.updated(e),e.has("variant")&&this.variant==="icon"&&Promise.resolve().then(()=>Pe),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&zn(this,Vr,za).call(this)}_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}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}render(){const e=this._ariaLabel(),t=this.variant==="image"&&!!this.src&&!this._imgError,i=c`${u}
|
|
2341
2377
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
2342
2378
|
${this._hasIconSlot?u:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
2343
2379
|
`,r=t?c`<img
|
|
@@ -2443,7 +2479,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2443
2479
|
outline-offset: 2px;
|
|
2444
2480
|
border-radius: var(--_radius);
|
|
2445
2481
|
}
|
|
2446
|
-
`,ce([n({type:String})],a.ScbAvatar.prototype,"src",2),ce([n({type:String})],a.ScbAvatar.prototype,"alt",2),ce([n({type:String})],a.ScbAvatar.prototype,"label",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),ce([n({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"spacing",2),ce([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbAvatar.prototype,"spacingTop",2),ce([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbAvatar.prototype,"spacingBottom",2),ce([w()],a.ScbAvatar.prototype,"_imgError",2),ce([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=ce([
|
|
2482
|
+
`,ce([n({type:String})],a.ScbAvatar.prototype,"src",2),ce([n({type:String})],a.ScbAvatar.prototype,"alt",2),ce([n({type:String})],a.ScbAvatar.prototype,"label",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"size",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"shape",2),ce([n({type:String,attribute:"icon-name",reflect:!0})],a.ScbAvatar.prototype,"iconName",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"variant",2),ce([n({type:String,reflect:!0})],a.ScbAvatar.prototype,"spacing",2),ce([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbAvatar.prototype,"spacingTop",2),ce([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbAvatar.prototype,"spacingBottom",2),ce([w()],a.ScbAvatar.prototype,"_imgError",2),ce([w()],a.ScbAvatar.prototype,"_hasIconSlot",2),a.ScbAvatar=ce([g("scb-avatar")],a.ScbAvatar);var Hh=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,Ei=(o,e,t,i)=>{for(var r=i>1?void 0:i?Nh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Hh(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`
|
|
2447
2483
|
<header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
|
|
2448
2484
|
<div class="leading">
|
|
2449
2485
|
<slot name="leading"></slot>
|
|
@@ -2601,7 +2637,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2601
2637
|
display: flex;
|
|
2602
2638
|
align-items: center;
|
|
2603
2639
|
}
|
|
2604
|
-
`],Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"title",2),Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"type",2),Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"position",2),Ei([n({type:String,attribute:"search-supporting-text",reflect:!0})],a.ScbAppBar.prototype,"searchSupportingText",2),a.ScbAppBar=Ei([
|
|
2640
|
+
`],Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"title",2),Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"type",2),Ei([n({type:String,reflect:!0})],a.ScbAppBar.prototype,"position",2),Ei([n({type:String,attribute:"search-supporting-text",reflect:!0})],a.ScbAppBar.prototype,"searchSupportingText",2),a.ScbAppBar=Ei([g("scb-app-bar")],a.ScbAppBar);var Vh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Ue=(o,e,t,i)=>{for(var r=i>1?void 0:i?qh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Vh(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`
|
|
2605
2641
|
<div class="badge-content">
|
|
2606
2642
|
<slot></slot>
|
|
2607
2643
|
<div
|
|
@@ -2672,7 +2708,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2672
2708
|
justify-content: center;
|
|
2673
2709
|
gap: var(--scb-badge-relative-gap);
|
|
2674
2710
|
}
|
|
2675
|
-
`,Ue([n({type:Boolean,reflect:!0,attribute:"auto-hide"})],a.ScbBadge.prototype,"autoHide",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"position",2),Ue([n({type:Number,attribute:"position-top"})],a.ScbBadge.prototype,"positionTop",2),Ue([n({type:Number,attribute:"position-right"})],a.ScbBadge.prototype,"positionRight",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"value",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"label",2),Ue([n({type:Boolean,reflect:!0})],a.ScbBadge.prototype,"hidden",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"variant",2),a.ScbBadge=Ue([
|
|
2711
|
+
`,Ue([n({type:Boolean,reflect:!0,attribute:"auto-hide"})],a.ScbBadge.prototype,"autoHide",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"position",2),Ue([n({type:Number,attribute:"position-top"})],a.ScbBadge.prototype,"positionTop",2),Ue([n({type:Number,attribute:"position-right"})],a.ScbBadge.prototype,"positionRight",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"value",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"label",2),Ue([n({type:Boolean,reflect:!0})],a.ScbBadge.prototype,"hidden",2),Ue([n({type:String,reflect:!0})],a.ScbBadge.prototype,"variant",2),a.ScbBadge=Ue([g("scb-badge")],a.ScbBadge);/**
|
|
2676
2712
|
* @license
|
|
2677
2713
|
* Copyright 2018 Google LLC
|
|
2678
2714
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -2732,7 +2768,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2732
2768
|
a:focus-visible + md-focus-ring {
|
|
2733
2769
|
display: block;
|
|
2734
2770
|
}
|
|
2735
|
-
`,$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"href",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"target",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"rel",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"download",2),$t([n({type:Boolean,reflect:!0})],a.ScbLink.prototype,"disabled",2),$t([n({type:String,attribute:"aria-label"})],a.ScbLink.prototype,"ariaLabel",2),a.ScbLink=$t([
|
|
2771
|
+
`,$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"href",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"target",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"rel",2),$t([n({type:String,reflect:!0})],a.ScbLink.prototype,"download",2),$t([n({type:Boolean,reflect:!0})],a.ScbLink.prototype,"disabled",2),$t([n({type:String,attribute:"aria-label"})],a.ScbLink.prototype,"ariaLabel",2),a.ScbLink=$t([g("scb-link")],a.ScbLink);var Yh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,qr=(o,e,t,i)=>{for(var r=i>1?void 0:i?Xh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Yh(e,t,r),r};a.SCBBreadcrumbItem=class extends y{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return m`
|
|
2736
2772
|
.breadcrumb-separator {
|
|
2737
2773
|
margin: var(--spacing-0) var(--spacing-3);
|
|
2738
2774
|
color: var(--md-sys-color-on-surface);
|
|
@@ -2745,7 +2781,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2745
2781
|
`}updated(e){e.has("isCurrent")&&this.dispatchEvent(new CustomEvent("current-changed",{detail:{isCurrent:this.isCurrent},bubbles:!0,composed:!0}))}render(){switch(!0){case this.isCurrent:return c`<span class="breadcrumb-current">${this.label}</span>`;default:return c`
|
|
2746
2782
|
<scb-link href="${this.href}">${this.label}</scb-link>
|
|
2747
2783
|
<span class="breadcrumb-separator">/</span>
|
|
2748
|
-
`}}},qr([n({type:String})],a.SCBBreadcrumbItem.prototype,"label",2),qr([n({type:Boolean,attribute:"is-current",reflect:!0})],a.SCBBreadcrumbItem.prototype,"isCurrent",2),qr([n({type:String,attribute:"item-href"})],a.SCBBreadcrumbItem.prototype,"href",2),a.SCBBreadcrumbItem=qr([
|
|
2784
|
+
`}}},qr([n({type:String})],a.SCBBreadcrumbItem.prototype,"label",2),qr([n({type:Boolean,attribute:"is-current",reflect:!0})],a.SCBBreadcrumbItem.prototype,"isCurrent",2),qr([n({type:String,attribute:"item-href"})],a.SCBBreadcrumbItem.prototype,"href",2),a.SCBBreadcrumbItem=qr([g("scb-breadcrumb-item")],a.SCBBreadcrumbItem);var Zh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,Pn=o=>{throw TypeError(o)},Ai=(o,e,t,i)=>{for(var r=i>1?void 0:i?Jh(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Zh(e,t,r),r},Qh=(o,e,t)=>e.has(o)||Pn("Cannot "+t),ep=(o,e,t)=>e.has(o)?Pn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),On=(o,e,t)=>(Qh(o,e,"access private method"),t),Ur,Pa;a.SCBBreadcrumb=class extends y{constructor(){super(...arguments),ep(this,Ur),this.showAll=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}static get styles(){return m`
|
|
2749
2785
|
:host {
|
|
2750
2786
|
display: block;
|
|
2751
2787
|
margin-block-start: var(--scb-breadcrumb-spacing-block-start, 0);
|
|
@@ -2837,7 +2873,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2837
2873
|
<span class="breadcrumb-separator">/</span>
|
|
2838
2874
|
${i}`:c`${i}`):e.map(i=>i)}
|
|
2839
2875
|
</div>
|
|
2840
|
-
`}},Ur=new WeakSet,Pa=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-breadcrumb-spacing-block-start",e):this.style.removeProperty("--scb-breadcrumb-spacing-block-start"),t?this.style.setProperty("--scb-breadcrumb-spacing-block-end",t):this.style.removeProperty("--scb-breadcrumb-spacing-block-end")},Ai([n({type:Boolean,attribute:"show-all",reflect:!0})],a.SCBBreadcrumb.prototype,"showAll",2),Ai([n({type:String,reflect:!0})],a.SCBBreadcrumb.prototype,"spacing",2),Ai([n({type:String,attribute:"spacing-top",reflect:!0})],a.SCBBreadcrumb.prototype,"spacingTop",2),Ai([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.SCBBreadcrumb.prototype,"spacingBottom",2),a.SCBBreadcrumb=Ai([
|
|
2876
|
+
`}},Ur=new WeakSet,Pa=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-breadcrumb-spacing-block-start",e):this.style.removeProperty("--scb-breadcrumb-spacing-block-start"),t?this.style.setProperty("--scb-breadcrumb-spacing-block-end",t):this.style.removeProperty("--scb-breadcrumb-spacing-block-end")},Ai([n({type:Boolean,attribute:"show-all",reflect:!0})],a.SCBBreadcrumb.prototype,"showAll",2),Ai([n({type:String,reflect:!0})],a.SCBBreadcrumb.prototype,"spacing",2),Ai([n({type:String,attribute:"spacing-top",reflect:!0})],a.SCBBreadcrumb.prototype,"spacingTop",2),Ai([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.SCBBreadcrumb.prototype,"spacingBottom",2),a.SCBBreadcrumb=Ai([g("scb-breadcrumb")],a.SCBBreadcrumb);var tp=Object.defineProperty,ip=Object.getOwnPropertyDescriptor,Ln=o=>{throw TypeError(o)},de=(o,e,t,i)=>{for(var r=i>1?void 0:i?ip(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&tp(e,t,r),r},rp=(o,e,t)=>e.has(o)||Ln("Cannot "+t),op=(o,e,t)=>e.has(o)?Ln("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Dn=(o,e,t)=>(rp(o,e,"access private method"),t),Wr,Oa;a.ScbButton=class extends y{constructor(){super(...arguments),op(this,Wr),this.variant="filled",this.type="button",this.label="Button",this.trailingIcon=!1,this.icon="",this.disabled=!1,this.href="",this.target="",this.rel="",this.spacing="",this.spacingTop="",this.spacingBottom=""}__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():"",l=i||r||s;l?t.setAttribute("aria-label",l):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(f=>{const b=this.__getMdHost(),_=this.__getInnerNativeButton(b);if(!(!b||!_)){for(const x of f){if(x.type!=="attributes"||!x.attributeName)continue;const S=x.attributeName,C=this.getAttribute(S);if(S==="aria-label"){const T=(b.getAttribute("aria-label")||"").trim(),A=(C||T||(this.label.trim()===""?(this.icon||"").trim():"")).trim();A?_.setAttribute("aria-label",A):_.removeAttribute("aria-label"),b.removeAttribute("aria-label")}else(S==="aria-controls"||S==="aria-expanded")&&(C===null?_.removeAttribute(S):_.setAttribute(S,C),S==="aria-expanded"&&this.removeAttribute("aria-expanded"))}b.removeAttribute("aria-label"),b.removeAttribute("aria-controls"),b.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.__syncAriaToInner(),Dn(this,Wr,Oa).call(this)}updated(e){e.has("variant")&&this.__syncAriaToInner(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Dn(this,Wr,Oa).call(this)}disconnectedCallback(){var e;(e=this.__ariaObserver)==null||e.disconnect(),super.disconnectedCallback()}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}static get styles(){return m`
|
|
2841
2877
|
/* Gör hosten stretchbar i t.ex. flex/grid */
|
|
2842
2878
|
:host {
|
|
2843
2879
|
display: inline-flex;
|
|
@@ -2958,7 +2994,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2958
2994
|
${this.label}
|
|
2959
2995
|
${e&&this.trailingIcon?t:u}
|
|
2960
2996
|
</md-text-button>
|
|
2961
|
-
`;default:return c``}}},Wr=new WeakSet,Oa=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-button-spacing-block-start",e):this.style.removeProperty("--scb-button-spacing-block-start"),t?this.style.setProperty("--scb-button-spacing-block-end",t):this.style.removeProperty("--scb-button-spacing-block-end")},de([n({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),de([n({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),de([n({type:String})],a.ScbButton.prototype,"label",2),de([n({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),de([n({type:String})],a.ScbButton.prototype,"icon",2),de([n({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),de([n({type:String})],a.ScbButton.prototype,"href",2),de([n({type:String})],a.ScbButton.prototype,"target",2),de([n({type:String})],a.ScbButton.prototype,"rel",2),de([n({type:String,reflect:!0})],a.ScbButton.prototype,"spacing",2),de([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbButton.prototype,"spacingTop",2),de([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbButton.prototype,"spacingBottom",2),a.ScbButton=de([
|
|
2997
|
+
`;default:return c``}}},Wr=new WeakSet,Oa=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-button-spacing-block-start",e):this.style.removeProperty("--scb-button-spacing-block-start"),t?this.style.setProperty("--scb-button-spacing-block-end",t):this.style.removeProperty("--scb-button-spacing-block-end")},de([n({type:String,reflect:!0})],a.ScbButton.prototype,"variant",2),de([n({type:String,reflect:!0})],a.ScbButton.prototype,"type",2),de([n({type:String})],a.ScbButton.prototype,"label",2),de([n({type:Boolean,attribute:"trailing-icon"})],a.ScbButton.prototype,"trailingIcon",2),de([n({type:String})],a.ScbButton.prototype,"icon",2),de([n({type:Boolean,reflect:!0})],a.ScbButton.prototype,"disabled",2),de([n({type:String})],a.ScbButton.prototype,"href",2),de([n({type:String})],a.ScbButton.prototype,"target",2),de([n({type:String})],a.ScbButton.prototype,"rel",2),de([n({type:String,reflect:!0})],a.ScbButton.prototype,"spacing",2),de([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbButton.prototype,"spacingTop",2),de([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbButton.prototype,"spacingBottom",2),a.ScbButton=de([g("scb-button")],a.ScbButton);var ap=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,Bn=o=>{throw TypeError(o)},M=(o,e,t,i)=>{for(var r=i>1?void 0:i?sp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&ap(e,t,r),r},np=(o,e,t)=>e.has(o)||Bn("Cannot "+t),lp=(o,e,t)=>e.has(o)?Bn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Rn=(o,e,t)=>(np(o,e,"access private method"),t),jr,La;a.ScbCalendarCard=class extends y{constructor(){super(...arguments),lp(this,jr),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",this.spacing="",this.spacingTop="",this.spacingBottom=""}async firstUpdated(){a.ScbCalendarCard.__iconLoaded||(await Promise.resolve().then(()=>Pe),a.ScbCalendarCard.__iconLoaded=!0),a.ScbCalendarCard.__rippleLoaded||(await Promise.resolve().then(()=>or),a.ScbCalendarCard.__rippleLoaded=!0),this.__applyInnerSizing(),Rn(this,jr,La).call(this)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",i=this.cardHref?"clickable":"",r=1,s="Jan",l=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",h=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",p=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",v=`${l?`inline-size:${l};`:""}${h?`block-size:${h};`:""}${p?`aspect-ratio:${p};`:""}`;return c`
|
|
2962
2998
|
<div
|
|
2963
2999
|
class="calendar-card ${t} ${i} ${e}"
|
|
2964
3000
|
role="${this.cardHref?"link":"group"}"
|
|
@@ -2985,7 +3021,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
2985
3021
|
</div>
|
|
2986
3022
|
</div>
|
|
2987
3023
|
<md-focus-ring></md-focus-ring>
|
|
2988
|
-
`}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");if(!e)return;this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size")}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(window.open(this.cardHref,"_self"),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}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("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-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("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&
|
|
3024
|
+
`}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");if(!e)return;this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size")}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(window.open(this.cardHref,"_self"),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}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("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-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("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Rn(this,jr,La).call(this)}},jr=new WeakSet,La=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-calendar-card-spacing-block-start",e):this.style.removeProperty("--scb-calendar-card-spacing-block-start"),t?this.style.setProperty("--scb-calendar-card-spacing-block-end",t):this.style.removeProperty("--scb-calendar-card-spacing-block-end")},a.ScbCalendarCard.__iconLoaded=!1,a.ScbCalendarCard.__rippleLoaded=!1,a.ScbCalendarCard.styles=m`
|
|
2989
3025
|
:host {
|
|
2990
3026
|
display: block;
|
|
2991
3027
|
position: relative;
|
|
@@ -3204,7 +3240,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3204
3240
|
overflow: visible;
|
|
3205
3241
|
text-overflow: clip;
|
|
3206
3242
|
}
|
|
3207
|
-
`,M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"title",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"subtitle",2),M([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCalendarCard.prototype,"supportingText",2),M([n({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),M([n({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),M([n({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),M([n({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),M([n({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),M([n({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),M([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),M([n({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),M([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),M([n({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"spacing",2),M([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCalendarCard.prototype,"spacingTop",2),M([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCalendarCard.prototype,"spacingBottom",2),a.ScbCalendarCard=M([
|
|
3243
|
+
`,M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"title",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"subtitle",2),M([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCalendarCard.prototype,"supportingText",2),M([n({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),M([n({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),M([n({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),M([n({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),M([n({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),M([n({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),M([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),M([n({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),M([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),M([n({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),M([n({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"spacing",2),M([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCalendarCard.prototype,"spacingTop",2),M([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCalendarCard.prototype,"spacingBottom",2),a.ScbCalendarCard=M([g("scb-calendar-card")],a.ScbCalendarCard);var cp=Object.defineProperty,dp=Object.getOwnPropertyDescriptor,Mn=o=>{throw TypeError(o)},E=(o,e,t,i)=>{for(var r=i>1?void 0:i?dp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&cp(e,t,r),r},hp=(o,e,t)=>e.has(o)||Mn("Cannot "+t),pp=(o,e,t)=>e.has(o)?Mn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Fn=(o,e,t)=>(hp(o,e,"access private method"),t),Kr,Da;a.ScbCard=class extends y{constructor(){super(...arguments),pp(this,Kr),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.spacing="",this.spacingTop="",this.spacingBottom="",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]),l=Number(i[1]);if(s>0&&l>0)return{w:s,h:l}}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`
|
|
3208
3244
|
<div class="media">
|
|
3209
3245
|
<slot name="media">
|
|
3210
3246
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
@@ -3624,11 +3660,11 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3624
3660
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
3625
3661
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
3626
3662
|
}
|
|
3627
|
-
`,E([n({type:String,reflect:!0})],a.ScbCard.prototype,"type",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"variant",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"direction",2),E([n({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([n({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([n({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([n({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([n({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([n({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([n({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([n({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([n({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([n({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([n({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([n({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([n({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([n({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([n({type:String,attribute:"card-href",reflect:!0})],a.ScbCard.prototype,"cardHref",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"title",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"subtitle",2),E([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCard.prototype,"supportingText",2),E([n({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),E([n({type:String,attribute:"social-comments-text",reflect:!0})],a.ScbCard.prototype,"commentsText",2),E([n({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),E([n({type:String,attribute:"social-likes-text",reflect:!0})],a.ScbCard.prototype,"likesText",2),E([n({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),E([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),E([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"spacing",2),E([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCard.prototype,"spacingTop",2),E([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCard.prototype,"spacingBottom",2),a.ScbCard=E([
|
|
3663
|
+
`,E([n({type:String,reflect:!0})],a.ScbCard.prototype,"type",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"variant",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"direction",2),E([n({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([n({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([n({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([n({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([n({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([n({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([n({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([n({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([n({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([n({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([n({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([n({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([n({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([n({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([n({type:String,attribute:"card-href",reflect:!0})],a.ScbCard.prototype,"cardHref",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"title",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"subtitle",2),E([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCard.prototype,"supportingText",2),E([n({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),E([n({type:String,attribute:"social-comments-text",reflect:!0})],a.ScbCard.prototype,"commentsText",2),E([n({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),E([n({type:String,attribute:"social-likes-text",reflect:!0})],a.ScbCard.prototype,"likesText",2),E([n({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),E([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),E([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),E([n({type:String,reflect:!0})],a.ScbCard.prototype,"spacing",2),E([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCard.prototype,"spacingTop",2),E([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCard.prototype,"spacingBottom",2),a.ScbCard=E([g("scb-card")],a.ScbCard);var up=Object.defineProperty,vp=Object.getOwnPropertyDescriptor,Hn=o=>{throw TypeError(o)},Xt=(o,e,t,i)=>{for(var r=i>1?void 0:i?vp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&up(e,t,r),r},Nn=(o,e,t)=>e.has(o)||Hn("Cannot "+t),Ba=(o,e,t)=>(Nn(o,e,"read from private field"),t?t.call(o):e.get(o)),Vn=(o,e,t)=>e.has(o)?Hn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),zi=(o,e,t)=>(Nn(o,e,"access private method"),t),Ii,Ct,Ra,Gr;a.ScbCheckboxGroup=class extends y{constructor(){super(...arguments),Vn(this,Ct),this.orientation="vertical",this.disabled=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",Vn(this,Ii,()=>{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")})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
3628
3664
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${e}`}>
|
|
3629
|
-
<slot @slotchange=${
|
|
3665
|
+
<slot @slotchange=${Ba(this,Ii)}></slot>
|
|
3630
3666
|
</div>
|
|
3631
|
-
`}firstUpdated(){zi(this,Ct,
|
|
3667
|
+
`}firstUpdated(){zi(this,Ct,Ra).call(this),Ba(this,Ii).call(this)}updated(e){(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&zi(this,Ct,Ra).call(this),(e.has("disabled")||e.has("orientation"))&&Ba(this,Ii).call(this)}},Ii=new WeakMap,Ct=new WeakSet,Ra=function(){const o=zi(this,Ct,Gr).call(this,this.spacing),e=zi(this,Ct,Gr).call(this,this.spacingTop)??o,t=zi(this,Ct,Gr).call(this,this.spacingBottom)??o;e?this.style.setProperty("--scb-checkbox-group-spacing-block-start",e):this.style.removeProperty("--scb-checkbox-group-spacing-block-start"),t?this.style.setProperty("--scb-checkbox-group-spacing-block-end",t):this.style.removeProperty("--scb-checkbox-group-spacing-block-end")},Gr=function(o){if(!o)return;const e=String(o).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e},a.ScbCheckboxGroup.styles=m`
|
|
3632
3668
|
:host {
|
|
3633
3669
|
display: block;
|
|
3634
3670
|
/* Vertikal standard-spacing mellan items i gruppen */
|
|
@@ -3654,7 +3690,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3654
3690
|
::slotted(scb-checkbox) {
|
|
3655
3691
|
--scb-checkbox-gap: 0;
|
|
3656
3692
|
}
|
|
3657
|
-
`,Xt([n({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"orientation",2),Xt([n({type:Boolean,reflect:!0})],a.ScbCheckboxGroup.prototype,"disabled",2),Xt([n({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"spacing",2),Xt([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCheckboxGroup.prototype,"spacingTop",2),Xt([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCheckboxGroup.prototype,"spacingBottom",2),a.ScbCheckboxGroup=Xt([
|
|
3693
|
+
`,Xt([n({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"orientation",2),Xt([n({type:Boolean,reflect:!0})],a.ScbCheckboxGroup.prototype,"disabled",2),Xt([n({type:String,reflect:!0})],a.ScbCheckboxGroup.prototype,"spacing",2),Xt([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbCheckboxGroup.prototype,"spacingTop",2),Xt([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbCheckboxGroup.prototype,"spacingBottom",2),a.ScbCheckboxGroup=Xt([g("scb-checkbox-group")],a.ScbCheckboxGroup);var bp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,We=(o,e,t,i)=>{for(var r=i>1?void 0:i?mp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&bp(e,t,r),r};a.ScbCheckbox=class extends y{constructor(){super(),this._internals=null,this.disabled=!1,this.indeterminate=!1,this.checked=!1,this.label="",this.supportingText="",this.ariaLabel="",this.name="",this.value="on",this._form=null,this._formResetHandler=null,this._initialChecked=!1,this._checkboxId="","attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._checkboxId=this.id||`scb-checkbox-${Math.random().toString(36).slice(2,11)}`,this._initialChecked=this.checked,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.checked=this._initialChecked,this.indeterminate=!1,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){super.disconnectedCallback(),this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0)}firstUpdated(){var i,r;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("md-checkbox");e&&e.addEventListener("change",()=>{const s=e,l=!!s.checked,h=!!s.indeterminate;this.checked=l,this.indeterminate=h,this.dispatchEvent(new CustomEvent("change",{detail:{checked:l,indeterminate:h},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 b,_,x;const v=p;return((_=(b=v==null?void 0:v.tagName)==null?void 0:b.toLowerCase)==null?void 0:_.call(b))==="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(),(e.has("checked")||e.has("disabled")||e.has("value"))&&this.__syncFormValue()}formDisabledCallback(e){this.disabled=e}__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`:"",l=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")),l?i.setAttribute("aria-describedby",l):i.removeAttribute("aria-describedby")}__syncFormValue(){if(!this._internals)return;const e=this.disabled||!this.checked?null:this.value;this._internals.setFormValue(e)}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`
|
|
3658
3694
|
<label class="wrap">
|
|
3659
3695
|
<div class="box-wrap">
|
|
3660
3696
|
<md-checkbox
|
|
@@ -3743,7 +3779,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3743
3779
|
color: var(--md-sys-color-on-surface-variant);
|
|
3744
3780
|
}
|
|
3745
3781
|
}
|
|
3746
|
-
`,We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"disabled",2),We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"indeterminate",2),We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"checked",2),We([n({type:String})],a.ScbCheckbox.prototype,"label",2),We([n({type:String,attribute:"supporting-text"})],a.ScbCheckbox.prototype,"supportingText",2),We([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbCheckbox.prototype,"ariaLabel",2),We([n({type:String})],a.ScbCheckbox.prototype,"name",2),We([n({type:String})],a.ScbCheckbox.prototype,"value",2),a.ScbCheckbox=We([
|
|
3782
|
+
`,We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"disabled",2),We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"indeterminate",2),We([n({type:Boolean,reflect:!0})],a.ScbCheckbox.prototype,"checked",2),We([n({type:String})],a.ScbCheckbox.prototype,"label",2),We([n({type:String,attribute:"supporting-text"})],a.ScbCheckbox.prototype,"supportingText",2),We([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbCheckbox.prototype,"ariaLabel",2),We([n({type:String})],a.ScbCheckbox.prototype,"name",2),We([n({type:String})],a.ScbCheckbox.prototype,"value",2),a.ScbCheckbox=We([g("scb-checkbox")],a.ScbCheckbox);const fp=Object.freeze(Object.defineProperty({__proto__:null,get ScbCheckbox(){return a.ScbCheckbox}},Symbol.toStringTag,{value:"Module"}));var gp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,qn=o=>{throw TypeError(o)},Z=(o,e,t,i)=>{for(var r=i>1?void 0:i?yp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&gp(e,t,r),r},_p=(o,e,t)=>e.has(o)||qn("Cannot "+t),xp=(o,e,t)=>e.has(o)?qn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Un=(o,e,t)=>(_p(o,e,"access private method"),t),Yr,Ma;a.ScbChip=class extends y{constructor(){super(),xp(this,Yr),this.variant="assist",this.label="",this.icon="",this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.href="",this.target="",this.name="",this.value="",this.spacing="",this.spacingTop="",this.spacingBottom="",this.size="",this._internals=null,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1,"attachInternals"in this&&(this._internals=this.attachInternals())}updated(e){super.updated(e),(e.has("variant")||e.has("icon"))&&this.__ensureDepsLoaded(),e.has("disabled")&&(this.toggleAttribute("aria-disabled",this.disabled),this.dispatchEvent(new CustomEvent("disabled-changed",{detail:{disabled:this.disabled},bubbles:!0,composed:!0}))),e.has("variant")&&this.dispatchEvent(new CustomEvent("variant-changed",{detail:{variant:this.variant},bubbles:!0,composed:!0})),e.has("label")&&this.dispatchEvent(new CustomEvent("label-changed",{detail:{label:this.label},bubbles:!0,composed:!0})),e.has("elevated")&&this.dispatchEvent(new CustomEvent("elevated-changed",{detail:{elevated:this.elevated},bubbles:!0,composed:!0})),e.has("icon")&&this.dispatchEvent(new CustomEvent("icon-changed",{detail:{icon:this.icon},bubbles:!0,composed:!0})),e.has("size")&&this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0})),(e.has("selected")||e.has("disabled")||e.has("variant")||e.has("value")||e.has("name"))&&this._updateFormValue(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Un(this,Yr,Ma).call(this)}firstUpdated(){this.__ensureDepsLoaded(),Un(this,Yr,Ma).call(this),this._updateFormValue()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"assist":await Promise.resolve().then(()=>$c);break;case"filter":await Promise.resolve().then(()=>zc);break}this.__loadedVariants.add(this.variant)}!this._insideChipSet&&!this.__chipSetLoaded&&(await Promise.resolve().then(()=>Ec),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await Promise.resolve().then(()=>Pe),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`
|
|
3747
3783
|
<md-assist-chip
|
|
3748
3784
|
label=${this.label}
|
|
3749
3785
|
?disabled=${this.disabled}
|
|
@@ -3804,7 +3840,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3804
3840
|
color: var(--md-sys-color-on-surface);
|
|
3805
3841
|
font-size: var(--md-sys-typescale-body-large-size);
|
|
3806
3842
|
}
|
|
3807
|
-
`,Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Z([n({type:String})],a.ScbChip.prototype,"label",2),Z([n({type:String})],a.ScbChip.prototype,"icon",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Z([n({type:String})],a.ScbChip.prototype,"href",2),Z([n({type:String})],a.ScbChip.prototype,"target",2),Z([n({type:String})],a.ScbChip.prototype,"name",2),Z([n({type:String})],a.ScbChip.prototype,"value",2),Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"spacing",2),Z([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbChip.prototype,"spacingTop",2),Z([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbChip.prototype,"spacingBottom",2),Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"size",2),a.ScbChip=Z([
|
|
3843
|
+
`,Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Z([n({type:String})],a.ScbChip.prototype,"label",2),Z([n({type:String})],a.ScbChip.prototype,"icon",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Z([n({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Z([n({type:String})],a.ScbChip.prototype,"href",2),Z([n({type:String})],a.ScbChip.prototype,"target",2),Z([n({type:String})],a.ScbChip.prototype,"name",2),Z([n({type:String})],a.ScbChip.prototype,"value",2),Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"spacing",2),Z([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbChip.prototype,"spacingTop",2),Z([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbChip.prototype,"spacingBottom",2),Z([n({type:String,reflect:!0})],a.ScbChip.prototype,"size",2),a.ScbChip=Z([g("scb-chip")],a.ScbChip);var wp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Pi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&wp(e,t,r),r};a.ScbCookiesConsent=class extends y{constructor(){super(...arguments),this.open=!0,this.title="",this.supportingText="",this.ariaLabel="Cookie-inställningar"}firstUpdated(){this.addEventListener("click",e=>{const t=e.target;t.slot==="buttons"&&(t.id==="accept-btn"?this.closeAndRemove("cookies-accept"):t.id==="decline-btn"?this.closeAndRemove("cookies-decline"):t.id==="handle-btn"&&this.closeAndRemove("cookies-handle"))})}connectedCallback(){super.connectedCallback(),this.id||(this.id="cookie-consent")}closeAndRemove(e){this.dispatchEvent(new CustomEvent(e)),this.remove()}render(){return this.open?c`
|
|
3808
3844
|
<div role="dialog" class="cookies-consent" aria-modal="true" aria-label=${this.ariaLabel}>
|
|
3809
3845
|
<h2>${this.title}</h2>
|
|
3810
3846
|
<div>
|
|
@@ -3854,7 +3890,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3854
3890
|
gap: 8px;
|
|
3855
3891
|
justify-content: flex-start;
|
|
3856
3892
|
}
|
|
3857
|
-
`,Pi([n({type:Boolean})],a.ScbCookiesConsent.prototype,"open",2),Pi([n({type:String,reflect:!0})],a.ScbCookiesConsent.prototype,"title",2),Pi([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCookiesConsent.prototype,"supportingText",2),Pi([n({type:String,attribute:"aria-label",reflect:!0})],a.ScbCookiesConsent.prototype,"ariaLabel",2),a.ScbCookiesConsent=Pi([
|
|
3893
|
+
`,Pi([n({type:Boolean})],a.ScbCookiesConsent.prototype,"open",2),Pi([n({type:String,reflect:!0})],a.ScbCookiesConsent.prototype,"title",2),Pi([n({type:String,attribute:"supporting-text",reflect:!0})],a.ScbCookiesConsent.prototype,"supportingText",2),Pi([n({type:String,attribute:"aria-label",reflect:!0})],a.ScbCookiesConsent.prototype,"ariaLabel",2),a.ScbCookiesConsent=Pi([g("scb-cookies-consent")],a.ScbCookiesConsent);var kp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,Wn=o=>{throw TypeError(o)},Et=(o,e,t,i)=>{for(var r=i>1?void 0:i?$p(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&kp(e,t,r),r},Cp=(o,e,t)=>e.has(o)||Wn("Cannot "+t),Ep=(o,e,t)=>e.has(o)?Wn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),jn=(o,e,t)=>(Cp(o,e,"access private method"),t),Xr,Fa;a.ScbDivider=class extends y{constructor(){super(...arguments),Ep(this,Xr),this.variant="thin",this.direction="horizontal",this.inset="none",this.overlay=!1,this.anchor="end",this.spacing=""}firstUpdated(){jn(this,Xr,Fa).call(this)}updated(e){e.has("spacing")&&jn(this,Xr,Fa).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}render(){return c``}},Xr=new WeakSet,Fa=function(){const o=this.mapSpacingToken(this.spacing);o?this.style.setProperty("--scb-divider-spacing-orth",o):this.style.removeProperty("--scb-divider-spacing-orth")},a.ScbDivider.styles=m`
|
|
3858
3894
|
:host {
|
|
3859
3895
|
--scb-divider-color: var(--md-sys-color-outline-variant);
|
|
3860
3896
|
--scb-divider-thickness: 1px;
|
|
@@ -3922,7 +3958,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
3922
3958
|
:host([overlay][direction='vertical'][anchor='start']) {
|
|
3923
3959
|
left: calc(var(--scb-divider-gap) / -2);
|
|
3924
3960
|
}
|
|
3925
|
-
`,Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),Et([n({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"spacing",2),a.ScbDivider=Et([
|
|
3961
|
+
`,Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"variant",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"direction",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"inset",2),Et([n({type:Boolean,reflect:!0})],a.ScbDivider.prototype,"overlay",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"anchor",2),Et([n({type:String,reflect:!0})],a.ScbDivider.prototype,"spacing",2),a.ScbDivider=Et([g("scb-divider")],a.ScbDivider);var Tp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,je=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ap(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Tp(e,t,r),r};a.ScbDatepicker=class extends y{constructor(){super(...arguments),this._currentDate=new Date,this._selectedDate=null,this._showMonthDropdown=!1,this._showYearDropdown=!1,this.variant="static",this.lang="sv",this.selectedValue="",this.open=!0,this._outsideClickHandler=e=>{this.variant!=="static"&&this.open&&(e.composedPath().includes(this)||this._close())},this._monthNames=[this.lang=="sv"?"Januari":"January",this.lang=="sv"?"Februari":"February",this.lang=="sv"?"Mars":"March",(this.lang=="sv","April"),this.lang=="sv"?"Maj":"May",this.lang=="sv"?"Juni":"June",this.lang=="sv"?"Juli":"July",this.lang=="sv"?"Augusti":"August",(this.lang=="sv","September"),this.lang=="sv"?"Oktober":"October",(this.lang=="sv","November"),(this.lang=="sv","December")],this._prevYear=()=>{const e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e-1,t,1)},this._nextYear=()=>{const e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e+1,t,1)},this._prevMonth=()=>{const e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e,t-1,1)},this._nextMonth=()=>{const e=this._currentDate.getFullYear(),t=this._currentDate.getMonth();this._currentDate=new Date(e,t+1,1)},this._close=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("datepicker-closed",{bubbles:!0,composed:!0})),window.removeEventListener("mousedown",this._outsideClickHandler)}}updated(e){if(super.updated(e),this.variant!=="static"&&this.open?window.addEventListener("mousedown",this._outsideClickHandler):window.removeEventListener("mousedown",this._outsideClickHandler),e.has("selectedValue")&&this.selectedValue){const t=new Date(this.selectedValue);isNaN(t.getTime())||(this._selectedDate=t,this._currentDate=new Date(t.getFullYear(),t.getMonth(),1))}}_getMonthDays(e,t){const i=new Date(e,t,1),r=new Date(e,t+1,0),s=[];let l=[],h=(i.getDay()+6)%7;for(let p=0;p<h;p++)l.push(null);for(let p=1;p<=r.getDate();p++){const v=new Date(e,t,p);l.push(v),l.length===7&&(s.push(l),l=[])}if(l.length){for(;l.length<7;)l.push(null);s.push(l)}return s}render(){if(!this.open)return c``;const e=this._currentDate.getFullYear(),t=this._currentDate.getMonth(),i=new Date,r=this._getMonthDays(e,t),s=Array.from({length:101},(l,h)=>i.getFullYear()-50+h);return c`
|
|
3926
3962
|
<div class="datepicker-popup ${this.variant==="popup"?"popup":"static"}">
|
|
3927
3963
|
<div class="header">
|
|
3928
3964
|
<div class="month-selector ${this._showMonthDropdown?"open":""} ${this._showYearDropdown?"disable":""}">
|
|
@@ -4197,7 +4233,7 @@ var ScbWcTest=function(a){"use strict";var kl;function d(o,e,t,i){var r=argument
|
|
|
4197
4233
|
.close-datepicker:hover {
|
|
4198
4234
|
background: var(--md-sys-color-primary-container, #e3f2fd);
|
|
4199
4235
|
}
|
|
4200
|
-
`],je([w()],a.ScbDatepicker.prototype,"_currentDate",2),je([w()],a.ScbDatepicker.prototype,"_selectedDate",2),je([w()],a.ScbDatepicker.prototype,"_showMonthDropdown",2),je([w()],a.ScbDatepicker.prototype,"_showYearDropdown",2),je([n({type:String})],a.ScbDatepicker.prototype,"variant",2),je([n({type:String})],a.ScbDatepicker.prototype,"lang",2),je([n({type:String})],a.ScbDatepicker.prototype,"selectedValue",2),je([n({type:Boolean})],a.ScbDatepicker.prototype,"open",2),a.ScbDatepicker=je([
|
|
4236
|
+
`],je([w()],a.ScbDatepicker.prototype,"_currentDate",2),je([w()],a.ScbDatepicker.prototype,"_selectedDate",2),je([w()],a.ScbDatepicker.prototype,"_showMonthDropdown",2),je([w()],a.ScbDatepicker.prototype,"_showYearDropdown",2),je([n({type:String})],a.ScbDatepicker.prototype,"variant",2),je([n({type:String})],a.ScbDatepicker.prototype,"lang",2),je([n({type:String})],a.ScbDatepicker.prototype,"selectedValue",2),je([n({type:Boolean})],a.ScbDatepicker.prototype,"open",2),a.ScbDatepicker=je([g("scb-datepicker")],a.ScbDatepicker);var zp=Object.defineProperty,Ip=Object.getOwnPropertyDescriptor,Kn=o=>{throw TypeError(o)},Y=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ip(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&zp(e,t,r),r},Pp=(o,e,t)=>e.has(o)||Kn("Cannot "+t),Op=(o,e,t)=>e.has(o)?Kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ke=(o,e,t)=>(Pp(o,e,"access private method"),t),Ce,Ha,Zr,Oi;a.ScbTextField=class extends y{constructor(){super(),Op(this,Ce),this._internals=null,this._inputFocused=!1,this._kbShouldShowRing=!1,this._onGlobalKeydown=e=>{e.key==="Tab"&&(this._kbShouldShowRing=!0,this._inputFocused&&Ke(this,Ce,Oi).call(this))},this._onGlobalPointerDown=()=>{this._kbShouldShowRing=!1,this._inputFocused&&Ke(this,Ce,Oi).call(this)},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.spacing="",this.spacingTop="",this.spacingBottom="",this._form=null,this._formSubmitHandler=null,this._formResetHandler=null,this._initialValue="",this._inputId="",this._showDatepicker=!1,this._toggleDatepicker=()=>{this._showDatepicker=!this._showDatepicker},this._onDateSelected=e=>{if(this.value=e.detail.value,this._showDatepicker=!1,this._internals){const t=this.disabled?null:this.value;this._internals.setFormValue(t)}if(this.pattern){const t=new RegExp(this.pattern);this.error=!t.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}))},"attachInternals"in this&&(this._internals=this.attachInternals())}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,r=this.type==="search"&&this.value?c`
|
|
4201
4237
|
<button
|
|
4202
4238
|
type="button"
|
|
4203
4239
|
class="scb-textfield-clear"
|
|
@@ -4550,7 +4586,7 @@ ${this.value}</textarea
|
|
|
4550
4586
|
transform: translateY(-50%);
|
|
4551
4587
|
z-index: 4;
|
|
4552
4588
|
}
|
|
4553
|
-
`],Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),Y([n({type:String})],a.ScbTextField.prototype,"label",2),Y([n({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),Y([n({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),Y([n({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),Y([n({type:String})],a.ScbTextField.prototype,"name",2),Y([n({type:String})],a.ScbTextField.prototype,"pattern",2),Y([n({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),Y([n({type:String})],a.ScbTextField.prototype,"underLabel",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"spacing",2),Y([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbTextField.prototype,"spacingTop",2),Y([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbTextField.prototype,"spacingBottom",2),Y([w()],a.ScbTextField.prototype,"_showDatepicker",2),a.ScbTextField=Y([
|
|
4589
|
+
`],Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"type",2),Y([n({type:String})],a.ScbTextField.prototype,"label",2),Y([n({type:String,attribute:"supporting-text"})],a.ScbTextField.prototype,"supportingText",2),Y([n({type:String,attribute:"error-text"})],a.ScbTextField.prototype,"errorText",2),Y([n({type:String,attribute:"leading-icon"})],a.ScbTextField.prototype,"leadingIcon",2),Y([n({type:String})],a.ScbTextField.prototype,"name",2),Y([n({type:String})],a.ScbTextField.prototype,"pattern",2),Y([n({type:String,attribute:"value"})],a.ScbTextField.prototype,"value",2),Y([n({type:String})],a.ScbTextField.prototype,"underLabel",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"error",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"disabled",2),Y([n({type:Boolean,reflect:!0})],a.ScbTextField.prototype,"required",2),Y([n({type:String,reflect:!0})],a.ScbTextField.prototype,"spacing",2),Y([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbTextField.prototype,"spacingTop",2),Y([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbTextField.prototype,"spacingBottom",2),Y([w()],a.ScbTextField.prototype,"_showDatepicker",2),a.ScbTextField=Y([g("scb-textfield")],a.ScbTextField);var Lp=Object.defineProperty,Dp=Object.getOwnPropertyDescriptor,Gn=o=>{throw TypeError(o)},Ge=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Lp(e,t,r),r},Yn=(o,e,t)=>e.has(o)||Gn("Cannot "+t),Tt=(o,e,t)=>(Yn(o,e,"read from private field"),t?t.call(o):e.get(o)),Jr=(o,e,t)=>e.has(o)?Gn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Li=(o,e,t)=>(Yn(o,e,"access private method"),t),Na,Zt,Qr,At,Va,eo;a.ScbRadioGroup=class extends y{constructor(){super(),Jr(this,At),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="",this.spacingTop="",this.spacingBottom="",this.value="",this._internals=null,this._form=null,this._formResetHandler=null,this._initialValue="",Jr(this,Na,()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).filter(i=>i.tagName.toLowerCase()==="scb-radio-button"):[]}),Jr(this,Zt,()=>{const e=Tt(this,Na).call(this);if(!e.length)return;let t=null;for(const i of e){const r=i;this.name&&i.setAttribute("name",this.name),this.disabled?i.setAttribute("disabled",""):i.removeAttribute("disabled"),this.orientation==="horizontal"?i.setAttribute("orientation","horizontal"):i.removeAttribute("orientation");const s=r.value??i.getAttribute("value")??"",l=typeof r.checked=="boolean"?r.checked:i.hasAttribute("checked");if(this.value){const h=String(s)===this.value;h&&!l?r.checked=!0:!h&&l&&(r.checked=!1)}else l&&t===null&&(t=String(s))}!this.value&&t!==null&&(this.value=t)}),Jr(this,Qr,e=>{var r,s;const t=e.composedPath().find(l=>{var h;return((h=l==null?void 0:l.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.value=String(i??""),this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))}),"attachInternals"in this&&(this._internals=this.attachInternals())}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
4554
4590
|
<div
|
|
4555
4591
|
class="g"
|
|
4556
4592
|
role="radiogroup"
|
|
@@ -4588,7 +4624,7 @@ ${this.value}</textarea
|
|
|
4588
4624
|
::slotted(scb-radio-button) {
|
|
4589
4625
|
--scb-radio-gap: 0;
|
|
4590
4626
|
}
|
|
4591
|
-
`,Ge([n({type:String})],a.ScbRadioGroup.prototype,"name",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Ge([n({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Ge([n({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),Ge([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbRadioGroup.prototype,"spacingTop",2),Ge([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbRadioGroup.prototype,"spacingBottom",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"value",2),a.ScbRadioGroup=Ge([
|
|
4627
|
+
`,Ge([n({type:String})],a.ScbRadioGroup.prototype,"name",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Ge([n({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Ge([n({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),Ge([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbRadioGroup.prototype,"spacingTop",2),Ge([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbRadioGroup.prototype,"spacingBottom",2),Ge([n({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"value",2),a.ScbRadioGroup=Ge([g("scb-radio-group")],a.ScbRadioGroup);var Bp=Object.defineProperty,Rp=Object.getOwnPropertyDescriptor,zt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Bp(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`
|
|
4592
4628
|
<label class="wrap">
|
|
4593
4629
|
<div class="radio-wrap">
|
|
4594
4630
|
<md-radio
|
|
@@ -4676,7 +4712,7 @@ ${this.value}</textarea
|
|
|
4676
4712
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
4677
4713
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
4678
4714
|
}
|
|
4679
|
-
`,zt([n({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),zt([n({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),zt([n({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),zt([n({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),zt([n({type:String})],a.ScbRadioButton.prototype,"label",2),zt([n({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=zt([
|
|
4715
|
+
`,zt([n({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),zt([n({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),zt([n({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),zt([n({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),zt([n({type:String})],a.ScbRadioButton.prototype,"label",2),zt([n({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=zt([g("scb-radio-button")],a.ScbRadioButton);var Mp=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,Xn=o=>{throw TypeError(o)},me=(o,e,t,i)=>{for(var r=i>1?void 0:i?Fp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Mp(e,t,r),r},Hp=(o,e,t)=>e.has(o)||Xn("Cannot "+t),Np=(o,e,t)=>e.has(o)?Xn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Di=(o,e,t)=>(Hp(o,e,"access private method"),t),It,qa,to;a.ScbSwitch=class extends y{constructor(){super(),Np(this,It),this._internals=null,this.label="",this.ariaLabel="",this.icons=!1,this.selected=!1,this.disabled=!1,this.fullWidth=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this.name="",this.value="on",this._form=null,this._formResetHandler=null,this._initialSelected=!1,"attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._initialSelected=this.selected,this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.selected=this._initialSelected,this.__syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0)),this.__syncFormValue()}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){var t;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}))}),Di(this,It,qa).call(this)}updated(e){super.updated(e),e.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled),(e.has("selected")||e.has("disabled")||e.has("value"))&&this.__syncFormValue(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Di(this,It,qa).call(this)}formDisabledCallback(e){this.disabled=e}__syncFormValue(){if(!this._internals)return;const e=this.disabled||!this.selected?null:this.value;this._internals.setFormValue(e)}render(){const e=this.label.trim().length>0,t=e?u:this.ariaLabel||u,i=c`
|
|
4680
4716
|
<md-switch
|
|
4681
4717
|
?icons=${this.icons}
|
|
4682
4718
|
?selected=${this.selected}
|
|
@@ -4731,7 +4767,7 @@ ${this.value}</textarea
|
|
|
4731
4767
|
/* Ärver färg från container */
|
|
4732
4768
|
color: var(--scb-switch-label-color, inherit);
|
|
4733
4769
|
}
|
|
4734
|
-
`,me([n({type:String})],a.ScbSwitch.prototype,"label",2),me([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbSwitch.prototype,"ariaLabel",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"icons",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"selected",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"disabled",2),me([n({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbSwitch.prototype,"fullWidth",2),me([n({type:String,reflect:!0})],a.ScbSwitch.prototype,"spacing",2),me([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbSwitch.prototype,"spacingTop",2),me([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbSwitch.prototype,"spacingBottom",2),me([n({type:String})],a.ScbSwitch.prototype,"name",2),me([n({type:String})],a.ScbSwitch.prototype,"value",2),a.ScbSwitch=me([
|
|
4770
|
+
`,me([n({type:String})],a.ScbSwitch.prototype,"label",2),me([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbSwitch.prototype,"ariaLabel",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"icons",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"selected",2),me([n({type:Boolean,reflect:!0})],a.ScbSwitch.prototype,"disabled",2),me([n({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbSwitch.prototype,"fullWidth",2),me([n({type:String,reflect:!0})],a.ScbSwitch.prototype,"spacing",2),me([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbSwitch.prototype,"spacingTop",2),me([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbSwitch.prototype,"spacingBottom",2),me([n({type:String})],a.ScbSwitch.prototype,"name",2),me([n({type:String})],a.ScbSwitch.prototype,"value",2),a.ScbSwitch=me([g("scb-switch")],a.ScbSwitch);const Vp=Object.freeze(Object.defineProperty({__proto__:null,get ScbSwitch(){return a.ScbSwitch}},Symbol.toStringTag,{value:"Module"}));var qp=Object.defineProperty,Up=Object.getOwnPropertyDescriptor,j=(o,e,t,i)=>{for(var r=i>1?void 0:i?Up(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&qp(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.__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(l=>{const h=l.tagName;h==="SCB-TEXTFIELD"&&(l.value=""),h==="SCB-CHECKBOX"&&(l.checked=!1),h==="SCB-RADIO-BUTTON"&&(l.checked=!1),h==="SCB-SWITCH"&&(l.selected=!1),h==="SCB-CHIP"&&(l.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())}}__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,l,h;(h=(l=(s=this.shadowRoot)==null?void 0:s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'))==null?void 0:l.focus)==null||h.call(l)}):!this.open&&r&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}}__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`
|
|
4735
4771
|
<div class="header">
|
|
4736
4772
|
<div class="title">
|
|
4737
4773
|
${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:u}
|
|
@@ -4891,7 +4927,7 @@ ${this.value}</textarea
|
|
|
4891
4927
|
display:block;
|
|
4892
4928
|
margin-block: var(--scb-choice-gap, 6px);
|
|
4893
4929
|
}
|
|
4894
|
-
`,j([n({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),j([n({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),j([n({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),j([n({type:String})],a.ScbDialog.prototype,"variant",2),j([n({type:String})],a.ScbDialog.prototype,"label",2),j([n({type:String})],a.ScbDialog.prototype,"icon",2),j([n({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),j([n({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),j([n({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),j([n({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),j([n({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),j([n({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),j([n({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),j([n({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),j([n({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),j([n({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),j([n({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=j([
|
|
4930
|
+
`,j([n({type:Boolean,reflect:!0})],a.ScbDialog.prototype,"open",2),j([n({type:Boolean,attribute:!1})],a.ScbDialog.prototype,"inSb",2),j([n({type:Boolean,attribute:"scrim-close"})],a.ScbDialog.prototype,"scrimClose",2),j([n({type:String})],a.ScbDialog.prototype,"variant",2),j([n({type:String})],a.ScbDialog.prototype,"label",2),j([n({type:String})],a.ScbDialog.prototype,"icon",2),j([n({type:String,attribute:"supporting-text"})],a.ScbDialog.prototype,"supportingText",2),j([n({type:String,attribute:"ok-button"})],a.ScbDialog.prototype,"okButton",2),j([n({type:String,attribute:"cancel-button"})],a.ScbDialog.prototype,"cancelButton",2),j([n({type:String,attribute:"delete-button"})],a.ScbDialog.prototype,"deleteButton",2),j([n({type:String,attribute:"confirm-button"})],a.ScbDialog.prototype,"confirmButton",2),j([n({type:String,attribute:"deny-button"})],a.ScbDialog.prototype,"denyButton",2),j([n({type:String,attribute:"reset-button"})],a.ScbDialog.prototype,"resetButton",2),j([n({type:String,attribute:"submit-button"})],a.ScbDialog.prototype,"submitButton",2),j([n({type:String,attribute:"form-id"})],a.ScbDialog.prototype,"formId",2),j([n({type:String,attribute:"form-action"})],a.ScbDialog.prototype,"formAction",2),j([n({type:String,attribute:"form-method"})],a.ScbDialog.prototype,"formMethod",2),a.ScbDialog=j([g("scb-dialog")],a.ScbDialog);var Wp=Object.defineProperty,jp=Object.getOwnPropertyDescriptor,Pt=(o,e,t,i)=>{for(var r=i>1?void 0:i?jp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Wp(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,l,h,p,v,f,b,_;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(),(l=(s=(t[i+1]||t[0]).shadowRoot)==null?void 0:s.querySelector(".scb-drawer-label-text"))==null||l.focus();break}case"ArrowUp":{e.preventDefault(),(p=(h=(t[i-1]||t[t.length-1]).shadowRoot)==null?void 0:h.querySelector(".scb-drawer-label-text"))==null||p.focus();break}case"Home":{e.preventDefault(),(f=(v=t[0].shadowRoot)==null?void 0:v.querySelector(".scb-drawer-label-text"))==null||f.focus();break}case"End":{e.preventDefault(),(_=(b=t[t.length-1].shadowRoot)==null?void 0:b.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(()=>or),a.ScbDrawerItem.__rippleLoaded=!0),a.ScbDrawerItem.__focusRingLoaded||(await Promise.resolve().then(()=>Zl),a.ScbDrawerItem.__focusRingLoaded=!0),this.leadingIcon&&!a.ScbDrawerItem.__iconLoaded&&(await Promise.resolve().then(()=>Pe),a.ScbDrawerItem.__iconLoaded=!0),this.hasSlotContent&&!a.ScbDrawerItem.__iconButtonLoaded&&(await Promise.resolve().then(()=>$h),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`
|
|
4895
4931
|
<div class="scb-drawer-item">
|
|
4896
4932
|
<div class="scb-drawer-item-label" ?selected=${this.selected}>
|
|
4897
4933
|
${t?c`
|
|
@@ -5052,7 +5088,7 @@ ${this.value}</textarea
|
|
|
5052
5088
|
transition: none;
|
|
5053
5089
|
}
|
|
5054
5090
|
}
|
|
5055
|
-
`,Pt([n({type:String})],a.ScbDrawerItem.prototype,"label",2),Pt([n({type:Boolean,reflect:!0})],a.ScbDrawerItem.prototype,"selected",2),Pt([n({type:String,attribute:"leading-icon"})],a.ScbDrawerItem.prototype,"leadingIcon",2),Pt([n({type:String,attribute:"item-href"})],a.ScbDrawerItem.prototype,"itemHref",2),Pt([w()],a.ScbDrawerItem.prototype,"hasSlotContent",2),Pt([w()],a.ScbDrawerItem.prototype,"expanded",2),a.ScbDrawerItem=Pt([
|
|
5091
|
+
`,Pt([n({type:String})],a.ScbDrawerItem.prototype,"label",2),Pt([n({type:Boolean,reflect:!0})],a.ScbDrawerItem.prototype,"selected",2),Pt([n({type:String,attribute:"leading-icon"})],a.ScbDrawerItem.prototype,"leadingIcon",2),Pt([n({type:String,attribute:"item-href"})],a.ScbDrawerItem.prototype,"itemHref",2),Pt([w()],a.ScbDrawerItem.prototype,"hasSlotContent",2),Pt([w()],a.ScbDrawerItem.prototype,"expanded",2),a.ScbDrawerItem=Pt([g("scb-drawer-item")],a.ScbDrawerItem);const Kp=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerItem(){return a.ScbDrawerItem}},Symbol.toStringTag,{value:"Module"}));var Gp=Object.defineProperty,Yp=Object.getOwnPropertyDescriptor,Zn=(o,e,t,i)=>{for(var r=i>1?void 0:i?Yp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Gp(e,t,r),r};a.ScbDrawerSection=class extends y{constructor(){super(...arguments),this.label=""}render(){return c`
|
|
5056
5092
|
<scb-divider></scb-divider>
|
|
5057
5093
|
${this.label?c`
|
|
5058
5094
|
<div class="scb-drawer-section">
|
|
@@ -5093,7 +5129,7 @@ ${this.value}</textarea
|
|
|
5093
5129
|
margin-block: var(--spacing-2, 4px);
|
|
5094
5130
|
margin-inline: var(--spacing-4, 12px);
|
|
5095
5131
|
}
|
|
5096
|
-
`,Zn([n({type:String})],a.ScbDrawerSection.prototype,"label",2),a.ScbDrawerSection=Zn([
|
|
5132
|
+
`,Zn([n({type:String})],a.ScbDrawerSection.prototype,"label",2),a.ScbDrawerSection=Zn([g("scb-drawer-section")],a.ScbDrawerSection);const Xp=Object.freeze(Object.defineProperty({__proto__:null,get ScbDrawerSection(){return a.ScbDrawerSection}},Symbol.toStringTag,{value:"Module"}));var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,Ee=(o,e,t,i)=>{for(var r=i>1?void 0:i?Jp(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Zp(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,l=s.activeElement||document.activeElement;e.shiftKey?(l===i||!s.contains(l))&&(e.preventDefault(),r.focus()):(l===r||!s.contains(l))&&(e.preventDefault(),i.focus())}}}}static async __ensureParts(){a.ScbDrawer.__partsReady||(a.ScbDrawer.__partsLoading||(a.ScbDrawer.__partsLoading=Promise.all([Promise.resolve().then(()=>Kp),Promise.resolve().then(()=>Xp),Promise.resolve().then(()=>tu)]).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=`
|
|
5097
5133
|
.scb-drawer-global-overlay {
|
|
5098
5134
|
position: fixed;
|
|
5099
5135
|
inset: 0;
|
|
@@ -5246,7 +5282,7 @@ ${this.value}</textarea
|
|
|
5246
5282
|
content-visibility: auto;
|
|
5247
5283
|
contain-intrinsic-size: 0 600px;
|
|
5248
5284
|
}
|
|
5249
|
-
`,Ee([n({type:String})],a.ScbDrawer.prototype,"label",2),Ee([n({type:String,attribute:"sub-label"})],a.ScbDrawer.prototype,"subLabel",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"floating",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"left",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"right",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"open",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"overlay",2),Ee([n({type:Boolean,reflect:!0,attribute:"lock-scroll"})],a.ScbDrawer.prototype,"lockScroll",2),Ee([n({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],a.ScbDrawer.prototype,"closeOnOverlay",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"modal",2),a.ScbDrawer=Ee([
|
|
5285
|
+
`,Ee([n({type:String})],a.ScbDrawer.prototype,"label",2),Ee([n({type:String,attribute:"sub-label"})],a.ScbDrawer.prototype,"subLabel",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"floating",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"left",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"right",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"open",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"overlay",2),Ee([n({type:Boolean,reflect:!0,attribute:"lock-scroll"})],a.ScbDrawer.prototype,"lockScroll",2),Ee([n({type:Boolean,reflect:!0,attribute:"close-on-overlay"})],a.ScbDrawer.prototype,"closeOnOverlay",2),Ee([n({type:Boolean,reflect:!0})],a.ScbDrawer.prototype,"modal",2),a.ScbDrawer=Ee([g("scb-drawer")],a.ScbDrawer);var Qp=Object.defineProperty,eu=Object.getOwnPropertyDescriptor,Jn=(o,e,t,i)=>{for(var r=i>1?void 0:i?eu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Qp(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`
|
|
5250
5286
|
<nav aria-label="${this.label}">
|
|
5251
5287
|
<slot></slot>
|
|
5252
5288
|
</nav>
|
|
@@ -5255,7 +5291,7 @@ ${this.value}</textarea
|
|
|
5255
5291
|
display: block;
|
|
5256
5292
|
width: 100%;
|
|
5257
5293
|
}
|
|
5258
|
-
`,Jn([n({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=Jn([
|
|
5294
|
+
`,Jn([n({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=Jn([g("scb-sub-drawer")],a.ScbSubDrawer);const tu=Object.freeze(Object.defineProperty({__proto__:null,get ScbSubDrawer(){return a.ScbSubDrawer}},Symbol.toStringTag,{value:"Module"}));var iu=Object.defineProperty,ru=Object.getOwnPropertyDescriptor,io=(o,e,t,i)=>{for(var r=i>1?void 0:i?ru(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&iu(e,t,r),r};a.ScbFactCardContent=class extends y{constructor(){super(...arguments),this.title="",this.subtitle="",this.supportingText=""}render(){return c`
|
|
5259
5295
|
${this.title?c`<div class="label">${this.title}</div>`:""}
|
|
5260
5296
|
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
5261
5297
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
@@ -5300,7 +5336,7 @@ ${this.value}</textarea
|
|
|
5300
5336
|
flex-direction: column;
|
|
5301
5337
|
gap: var(--spacing-3);
|
|
5302
5338
|
}
|
|
5303
|
-
`,io([n({type:String,reflect:!0,attribute:"title"})],a.ScbFactCardContent.prototype,"title",2),io([n({type:String,reflect:!0,attribute:"subtitle"})],a.ScbFactCardContent.prototype,"subtitle",2),io([n({type:String,reflect:!0,attribute:"supporting-text"})],a.ScbFactCardContent.prototype,"supportingText",2),a.ScbFactCardContent=io([
|
|
5339
|
+
`,io([n({type:String,reflect:!0,attribute:"title"})],a.ScbFactCardContent.prototype,"title",2),io([n({type:String,reflect:!0,attribute:"subtitle"})],a.ScbFactCardContent.prototype,"subtitle",2),io([n({type:String,reflect:!0,attribute:"supporting-text"})],a.ScbFactCardContent.prototype,"supportingText",2),a.ScbFactCardContent=io([g("scb-fact-card-content")],a.ScbFactCardContent);var ou=Object.defineProperty,au=Object.getOwnPropertyDescriptor,Qn=o=>{throw TypeError(o)},J=(o,e,t,i)=>{for(var r=i>1?void 0:i?au(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&ou(e,t,r),r},su=(o,e,t)=>e.has(o)||Qn("Cannot "+t),nu=(o,e,t)=>e.has(o)?Qn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),el=(o,e,t)=>(su(o,e,"access private method"),t),ro,Ua;a.ScbFactCard=class extends y{constructor(){super(...arguments),nu(this,ro),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="",this.spacing="",this.spacingTop="",this.spacingBottom=""}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")),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&el(this,ro,Ua).call(this)}__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`
|
|
5304
5340
|
<div class="outer ${t?"has-icon":""}">
|
|
5305
5341
|
${t?c`<div class="icon-wrapper ${e}"><md-icon>${this.icon}</md-icon></div>`:""}
|
|
5306
5342
|
<div class="scb-fact-card ${e} ${this.showCloseButton?"has-close":""}">
|
|
@@ -5450,9 +5486,9 @@ ${this.value}</textarea
|
|
|
5450
5486
|
overflow-wrap: normal;
|
|
5451
5487
|
hyphens: auto;
|
|
5452
5488
|
}
|
|
5453
|
-
`,J([n({type:String})],a.ScbFactCard.prototype,"variant",2),J([n({type:String,attribute:"title"})],a.ScbFactCard.prototype,"title",2),J([n({type:String,attribute:"subtitle"})],a.ScbFactCard.prototype,"subtitle",2),J([n({type:String,attribute:"supporting-text"})],a.ScbFactCard.prototype,"supportingText",2),J([n({type:String})],a.ScbFactCard.prototype,"icon",2),J([n({type:Boolean,attribute:"show-close-button"})],a.ScbFactCard.prototype,"showCloseButton",2),J([n({type:Boolean,reflect:!0})],a.ScbFactCard.prototype,"open",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"sizing",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"width",2),J([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbFactCard.prototype,"maxWidth",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"height",2),J([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbFactCard.prototype,"maxHeight",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"spacing",2),J([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbFactCard.prototype,"spacingTop",2),J([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbFactCard.prototype,"spacingBottom",2),a.ScbFactCard=J([
|
|
5489
|
+
`,J([n({type:String})],a.ScbFactCard.prototype,"variant",2),J([n({type:String,attribute:"title"})],a.ScbFactCard.prototype,"title",2),J([n({type:String,attribute:"subtitle"})],a.ScbFactCard.prototype,"subtitle",2),J([n({type:String,attribute:"supporting-text"})],a.ScbFactCard.prototype,"supportingText",2),J([n({type:String})],a.ScbFactCard.prototype,"icon",2),J([n({type:Boolean,attribute:"show-close-button"})],a.ScbFactCard.prototype,"showCloseButton",2),J([n({type:Boolean,reflect:!0})],a.ScbFactCard.prototype,"open",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"sizing",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"width",2),J([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbFactCard.prototype,"maxWidth",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"height",2),J([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbFactCard.prototype,"maxHeight",2),J([n({type:String,reflect:!0})],a.ScbFactCard.prototype,"spacing",2),J([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbFactCard.prototype,"spacingTop",2),J([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbFactCard.prototype,"spacingBottom",2),a.ScbFactCard=J([g("scb-fact-card")],a.ScbFactCard);var lu=Object.defineProperty,cu=Object.getOwnPropertyDescriptor,tl=(o,e,t,i)=>{for(var r=i>1?void 0:i?cu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&lu(e,t,r),r};a.ScbFooterSection=class extends y{constructor(){super(...arguments),this.title=""}render(){return c`<slot></slot>`}},a.ScbFooterSection.styles=m`
|
|
5454
5490
|
:host { display: none; }
|
|
5455
|
-
`,tl([n({type:String,reflect:!0})],a.ScbFooterSection.prototype,"title",2),a.ScbFooterSection=tl([
|
|
5491
|
+
`,tl([n({type:String,reflect:!0})],a.ScbFooterSection.prototype,"title",2),a.ScbFooterSection=tl([g("scb-footer-section")],a.ScbFooterSection);var du=Object.defineProperty,hu=Object.getOwnPropertyDescriptor,il=o=>{throw TypeError(o)},fe=(o,e,t,i)=>{for(var r=i>1?void 0:i?hu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&du(e,t,r),r},pu=(o,e,t)=>e.has(o)||il("Cannot "+t),uu=(o,e,t)=>e.has(o)?il("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Le=(o,e,t)=>(pu(o,e,"access private method"),t),ge,Wa,Ye;a.ScbGridItem=class extends y{constructor(){super(...arguments),uu(this,ge),this.fit=!1}firstUpdated(){Le(this,ge,Wa).call(this)}updated(){Le(this,ge,Wa).call(this)}render(){return c`<slot></slot>`}},ge=new WeakSet,Wa=function(){Le(this,ge,Ye).call(this,"--col-span",this.hasAttribute("col-span")?String(this.colSpan):null),Le(this,ge,Ye).call(this,"--col-span-compact",this.hasAttribute("col-span-compact")?String(this.colSpanCompact):null),Le(this,ge,Ye).call(this,"--col-span-medium",this.hasAttribute("col-span-medium")?String(this.colSpanMedium):null),Le(this,ge,Ye).call(this,"--col-span-expanded",this.hasAttribute("col-span-expanded")?String(this.colSpanExpanded):null),Le(this,ge,Ye).call(this,"--row-rule",this.hasAttribute("row-span")?`span ${this.rowSpan}`:null),Le(this,ge,Ye).call(this,"--row-rule-compact",this.hasAttribute("row-span-compact")?`span ${this.rowSpanCompact}`:null),Le(this,ge,Ye).call(this,"--row-rule-medium",this.hasAttribute("row-span-medium")?`span ${this.rowSpanMedium}`:null),Le(this,ge,Ye).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"))},Ye=function(o,e){e===null||e===""?this.style.removeProperty(o):this.style.setProperty(o,e)},a.ScbGridItem.styles=m`
|
|
5456
5492
|
:host {
|
|
5457
5493
|
box-sizing: border-box;
|
|
5458
5494
|
display: block;
|
|
@@ -5462,7 +5498,7 @@ ${this.value}</textarea
|
|
|
5462
5498
|
}
|
|
5463
5499
|
:host([fit]) { block-size: 100%; }
|
|
5464
5500
|
:host([fit]) ::slotted(*) { block-size: 100%; }
|
|
5465
|
-
`,fe([n({type:Number,attribute:"col-span",reflect:!0})],a.ScbGridItem.prototype,"colSpan",2),fe([n({type:Number,attribute:"col-span-compact",reflect:!0})],a.ScbGridItem.prototype,"colSpanCompact",2),fe([n({type:Number,attribute:"col-span-medium",reflect:!0})],a.ScbGridItem.prototype,"colSpanMedium",2),fe([n({type:Number,attribute:"col-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"colSpanExpanded",2),fe([n({type:Number,attribute:"row-span",reflect:!0})],a.ScbGridItem.prototype,"rowSpan",2),fe([n({type:Number,attribute:"row-span-compact",reflect:!0})],a.ScbGridItem.prototype,"rowSpanCompact",2),fe([n({type:Number,attribute:"row-span-medium",reflect:!0})],a.ScbGridItem.prototype,"rowSpanMedium",2),fe([n({type:Number,attribute:"row-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"rowSpanExpanded",2),fe([n({type:String,reflect:!0})],a.ScbGridItem.prototype,"align",2),fe([n({type:String,reflect:!0})],a.ScbGridItem.prototype,"justify",2),fe([n({type:Boolean,reflect:!0})],a.ScbGridItem.prototype,"fit",2),a.ScbGridItem=fe([
|
|
5501
|
+
`,fe([n({type:Number,attribute:"col-span",reflect:!0})],a.ScbGridItem.prototype,"colSpan",2),fe([n({type:Number,attribute:"col-span-compact",reflect:!0})],a.ScbGridItem.prototype,"colSpanCompact",2),fe([n({type:Number,attribute:"col-span-medium",reflect:!0})],a.ScbGridItem.prototype,"colSpanMedium",2),fe([n({type:Number,attribute:"col-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"colSpanExpanded",2),fe([n({type:Number,attribute:"row-span",reflect:!0})],a.ScbGridItem.prototype,"rowSpan",2),fe([n({type:Number,attribute:"row-span-compact",reflect:!0})],a.ScbGridItem.prototype,"rowSpanCompact",2),fe([n({type:Number,attribute:"row-span-medium",reflect:!0})],a.ScbGridItem.prototype,"rowSpanMedium",2),fe([n({type:Number,attribute:"row-span-expanded",reflect:!0})],a.ScbGridItem.prototype,"rowSpanExpanded",2),fe([n({type:String,reflect:!0})],a.ScbGridItem.prototype,"align",2),fe([n({type:String,reflect:!0})],a.ScbGridItem.prototype,"justify",2),fe([n({type:Boolean,reflect:!0})],a.ScbGridItem.prototype,"fit",2),a.ScbGridItem=fe([g("scb-grid-item")],a.ScbGridItem);var vu=Object.defineProperty,bu=Object.getOwnPropertyDescriptor,rl=o=>{throw TypeError(o)},Xe=(o,e,t,i)=>{for(var r=i>1?void 0:i?bu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&vu(e,t,r),r},mu=(o,e,t)=>e.has(o)||rl("Cannot "+t),fu=(o,e,t)=>e.has(o)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ol=(o,e,t)=>(mu(o,e,"access private method"),t),oo,ja;a.ScbStack=class extends y{constructor(){super(...arguments),fu(this,oo),this.direction="column",this.gap="",this.rowGap="",this.columnGap="",this.align="stretch",this.justify="start",this.wrap=!1,this.inline=!1}firstUpdated(){ol(this,oo,ja).call(this)}updated(){ol(this,oo,ja).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>`}},oo=new WeakSet,ja=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=m`
|
|
5466
5502
|
:host {
|
|
5467
5503
|
box-sizing: border-box;
|
|
5468
5504
|
display: block;
|
|
@@ -5494,7 +5530,7 @@ ${this.value}</textarea
|
|
|
5494
5530
|
:host([direction="row"]) ::slotted(*) {
|
|
5495
5531
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
5496
5532
|
}
|
|
5497
|
-
`,Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Xe([n({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Xe([n({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Xe([n({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Xe([n({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Xe([
|
|
5533
|
+
`,Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"direction",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"gap",2),Xe([n({type:String,attribute:"row-gap",reflect:!0})],a.ScbStack.prototype,"rowGap",2),Xe([n({type:String,attribute:"column-gap",reflect:!0})],a.ScbStack.prototype,"columnGap",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"align",2),Xe([n({type:String,reflect:!0})],a.ScbStack.prototype,"justify",2),Xe([n({type:Boolean,reflect:!0})],a.ScbStack.prototype,"wrap",2),Xe([n({type:Boolean,reflect:!0})],a.ScbStack.prototype,"inline",2),a.ScbStack=Xe([g("scb-stack")],a.ScbStack);var gu=Object.defineProperty,yu=Object.getOwnPropertyDescriptor,al=o=>{throw TypeError(o)},he=(o,e,t,i)=>{for(var r=i>1?void 0:i?yu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&gu(e,t,r),r},_u=(o,e,t)=>e.has(o)||al("Cannot "+t),xu=(o,e,t)=>e.has(o)?al("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Jt=(o,e,t)=>(_u(o,e,"access private method"),t),dt,Ka,Bi;a.ScbGrid=class extends y{constructor(){super(...arguments),xu(this,dt),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(){Jt(this,dt,Ka).call(this)}updated(){Jt(this,dt,Ka).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>`}},dt=new WeakSet,Ka=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);Jt(this,dt,Bi).call(this,"--scb-grid-max-width",this.maxWidth),Jt(this,dt,Bi).call(this,"--scb-grid-padding-inline",r??""),Jt(this,dt,Bi).call(this,"--scb-grid-padding-block",s??""),Jt(this,dt,Bi).call(this,"--scb-grid-auto-rows",this.autoRows)},Bi=function(o,e){e?this.style.setProperty(o,e):this.style.removeProperty(o)},a.ScbGrid.styles=m`
|
|
5498
5534
|
:host {
|
|
5499
5535
|
box-sizing: border-box;
|
|
5500
5536
|
display: block;
|
|
@@ -5591,7 +5627,7 @@ ${this.value}</textarea
|
|
|
5591
5627
|
}
|
|
5592
5628
|
}
|
|
5593
5629
|
}
|
|
5594
|
-
`,he([n({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),he([n({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),he([n({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),he([n({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),he([n({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),he([n({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),he([n({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),he([n({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),he([n({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),he([n({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),he([n({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),he([n({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=he([
|
|
5630
|
+
`,he([n({type:Number,attribute:"cols-compact",reflect:!0})],a.ScbGrid.prototype,"colsCompact",2),he([n({type:Number,attribute:"cols-medium",reflect:!0})],a.ScbGrid.prototype,"colsMedium",2),he([n({type:Number,attribute:"cols-expanded",reflect:!0})],a.ScbGrid.prototype,"colsExpanded",2),he([n({type:String,reflect:!0})],a.ScbGrid.prototype,"gap",2),he([n({type:String,attribute:"row-gap",reflect:!0})],a.ScbGrid.prototype,"rowGap",2),he([n({type:String,attribute:"column-gap",reflect:!0})],a.ScbGrid.prototype,"columnGap",2),he([n({type:String,attribute:"align-items",reflect:!0})],a.ScbGrid.prototype,"alignItems",2),he([n({type:String,attribute:"justify-items",reflect:!0})],a.ScbGrid.prototype,"justifyItems",2),he([n({type:String,attribute:"padding-inline",reflect:!0})],a.ScbGrid.prototype,"paddingInline",2),he([n({type:String,attribute:"padding-block",reflect:!0})],a.ScbGrid.prototype,"paddingBlock",2),he([n({type:String,attribute:"max-width",reflect:!0})],a.ScbGrid.prototype,"maxWidth",2),he([n({type:String,attribute:"auto-rows",reflect:!0})],a.ScbGrid.prototype,"autoRows",2),a.ScbGrid=he([g("scb-grid")],a.ScbGrid);var wu=Object.defineProperty,Su=Object.getOwnPropertyDescriptor,sl=o=>{throw TypeError(o)},Ri=(o,e,t,i)=>{for(var r=i>1?void 0:i?Su(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&wu(e,t,r),r},Ga=(o,e,t)=>e.has(o)||sl("Cannot "+t),Ze=(o,e,t)=>(Ga(o,e,"read from private field"),t?t.call(o):e.get(o)),Qt=(o,e,t)=>e.has(o)?sl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ot=(o,e,t,i)=>(Ga(o,e,"write to private field"),e.set(o,t),t),Je=(o,e,t)=>(Ga(o,e,"access private method"),t),ei,Mi,ti,Fi,ye,nl,Ya,ll,Xa,Za,cl,dl,Ja;a.ScbFooter=class extends y{constructor(){super(...arguments),Qt(this,ye),this.maxWidth="1440px",this.deferPaint=!1,this.sections=[],this.description="Statistikmyndigheten SCB förser samhället med statistik för beslutsfattande, debatt och forskning.",Qt(this,ei,null),Qt(this,Mi,""),Qt(this,ti),Qt(this,Fi,!1),Qt(this,Za,8)}connectedCallback(){super.connectedCallback(),this.style.setProperty("--scb-footer-max-width",this.maxWidth),Je(this,ye,Xa).call(this,!0),Je(this,ye,nl).call(this)}updated(e){e.has("maxWidth")&&this.style.setProperty("--scb-footer-max-width",this.maxWidth)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=Ze(this,ti))==null||e.disconnect()}render(){const e=Ze(this,ye,ll);return c`
|
|
5595
5631
|
<footer class="outer" role="contentinfo">
|
|
5596
5632
|
<nav aria-label="Sidfot med länkar">
|
|
5597
5633
|
<scb-grid
|
|
@@ -5798,15 +5834,15 @@ ${this.value}</textarea
|
|
|
5798
5834
|
|
|
5799
5835
|
.spacer { display: none; }
|
|
5800
5836
|
@media (min-width: 840px) { .spacer { display: block; } }
|
|
5801
|
-
`,
|
|
5837
|
+
`,Ri([n({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),Ri([n({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),Ri([n({type:Array})],a.ScbFooter.prototype,"sections",2),Ri([n({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=Ri([g("scb-footer")],a.ScbFooter);class hl extends HTMLElement{get label(){return this.getAttribute("label")??""}set label(e){this.setAttribute("label",e)}get icon(){return this.getAttribute("icon")??void 0}set icon(e){e==null||e===""?this.removeAttribute("icon"):this.setAttribute("icon",e)}connectedCallback(){this.style.display="none"}}customElements.define("scb-header-drawer-group",hl);var ku=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,ao=(o,e,t,i)=>{for(var r=i>1?void 0:i?$u(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&ku(e,t,r),r};a.ScbHeaderDrawerItem=class extends y{constructor(){super(...arguments),this.label="",this.href=""}render(){return c`<slot></slot>`}},a.ScbHeaderDrawerItem.styles=m`
|
|
5802
5838
|
:host {
|
|
5803
5839
|
display: none !important;
|
|
5804
5840
|
}
|
|
5805
|
-
`,ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=ao([
|
|
5841
|
+
`,ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"label",2),ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"href",2),ao([n({type:String})],a.ScbHeaderDrawerItem.prototype,"icon",2),a.ScbHeaderDrawerItem=ao([g("scb-header-drawer-item")],a.ScbHeaderDrawerItem);var Cu=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,Qa=(o,e,t,i)=>{for(var r=i>1?void 0:i?Eu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Cu(e,t,r),r};a.ScbHeaderTab=class extends y{constructor(){super(...arguments),this.label="",this.href=""}render(){return c`<slot></slot>`}},a.ScbHeaderTab.styles=m`
|
|
5806
5842
|
:host {
|
|
5807
5843
|
display: none !important;
|
|
5808
5844
|
}
|
|
5809
|
-
`,Qa([n({type:String})],a.ScbHeaderTab.prototype,"label",2),Qa([n({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Qa([f("scb-header-tab")],a.ScbHeaderTab);class pl extends HTMLElement{get label(){return this.getAttribute("label")??""}set label(e){this.setAttribute("label",e)}get href(){return this.getAttribute("href")??"#"}set href(e){this.setAttribute("href",e)}get target(){return this.getAttribute("target")??void 0}set target(e){e==null?this.removeAttribute("target"):this.setAttribute("target",e)}connectedCallback(){this.style.display="none"}}customElements.define("scb-header-utility",pl);var Tu=Object.defineProperty,Au=Object.getOwnPropertyDescriptor,P=(o,e,t,i)=>{for(var r=i>1?void 0:i?Au(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Tu(e,t,r),r};const so={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.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",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._harvest=()=>{const e=this._slotEl;if(!e)return;const t=e.assignedElements({flatten:!0}),i=[],r=[],s=[];let l=-1;const h=p=>({label:p.getAttribute("label")??"",href:p.getAttribute("href")??void 0,icon:p.getAttribute("icon")??void 0});for(const p of t){const v=p.tagName.toLowerCase();if(v==="scb-header-tab"){const g=p.getAttribute("label")??"",b=p.getAttribute("href"),_=b&&b.trim()!==""?b:void 0;(p.hasAttribute("selected")||p.getAttribute("selected")==="true"||p.getAttribute("active")==="true"||p.getAttribute("aria-current")==="page")&&l===-1&&(l=i.length),i.push({label:g,href:_});continue}if(v==="scb-header-utility"){r.push({label:p.getAttribute("label")??"",href:p.getAttribute("href")??"#",target:p.getAttribute("target")??void 0});continue}if(v==="scb-header-drawer-group"){const g={label:p.getAttribute("label")??"",icon:p.getAttribute("icon")??void 0,children:[]};p.querySelectorAll("scb-header-drawer-item").forEach(_=>g.children.push(h(_))),s.push(g);continue}v==="scb-header-drawer-item"&&s.push(h(p))}this._slotTabs=i,this._slotUtils=r,this._slotMenu=s,!this.hasAttribute("active-tab")&&l>=0&&(this.activeTab=l),queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{var b,_,x;const e=this._top,t=this._logoGroup;if(!e||!t)return;const i=window.innerWidth,r=e.clientWidth,s=this._overflows(this._util),l=this._overflows(this._tabsNav),h=i<this.BP_MD||s||l;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)),T=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),A=this.showDrawer&&(i<this.BP_MD||this._collapsed)?((b=this._menuBtn)==null?void 0:b.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48):0;p=t.getBoundingClientRect().width+T+C+T+A+8>r+.5}this._setHideSearch(p);let v=!1;if(this.showDrawer&&(i<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const S=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),C=((_=this._menuBtn)==null?void 0:_.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48),T=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(r>=this._logoTextUnlockAt):T>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 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._onTabClick=e=>{const t=e.currentTarget;if(!t)return;const i=t.tagName.toLowerCase()==="a";if(i&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;const r=t.getAttribute("data-index"),s=r!=null?Number(r):0;this.activeTab=s;const p=((this._slotTabs.length?this._slotTabs:this.tabs)[s]??{}).href??"",v=new CustomEvent("tab-change",{detail:{index:s,href:p},bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(v)&&i&&e.preventDefault()},this._onTabsKeydown=e=>{const t=e.key;if(t!=="ArrowLeft"&&t!=="ArrowRight"&&t!=="Home"&&t!=="End")return;const i=Array.from(this.renderRoot.querySelectorAll(".tab-link"));if(!i.length)return;const r=e.target;let s=i.indexOf(r??i[0]);s===-1&&(s=0),t==="ArrowRight"?s=(s+1)%i.length:t==="ArrowLeft"?s=(s-1+i.length)%i.length:t==="Home"?s=0:t==="End"&&(s=i.length-1),e.preventDefault();const l=i[s];l.focus();const h=l.getAttribute("data-index"),p=h!=null?Number(h):s;this.activeTab=p},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()}))}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 _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}`)}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_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","selected","aria-current","active"]})}_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})}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()})}disconnectedCallback(){var e,t;(e=this._ro)==null||e.disconnect(),(t=this._slotMo)==null||t.disconnect(),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_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))}_renderDrawerNodes(e){return!e||e.length===0?c``:c`${e.map(t=>{const i=Array.isArray(t.children)&&t.children.length>0;return c`
|
|
5845
|
+
`,Qa([n({type:String})],a.ScbHeaderTab.prototype,"label",2),Qa([n({type:String})],a.ScbHeaderTab.prototype,"href",2),a.ScbHeaderTab=Qa([g("scb-header-tab")],a.ScbHeaderTab);class pl extends HTMLElement{get label(){return this.getAttribute("label")??""}set label(e){this.setAttribute("label",e)}get href(){return this.getAttribute("href")??"#"}set href(e){this.setAttribute("href",e)}get target(){return this.getAttribute("target")??void 0}set target(e){e==null?this.removeAttribute("target"):this.setAttribute("target",e)}connectedCallback(){this.style.display="none"}}customElements.define("scb-header-utility",pl);var Tu=Object.defineProperty,Au=Object.getOwnPropertyDescriptor,P=(o,e,t,i)=>{for(var r=i>1?void 0:i?Au(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Tu(e,t,r),r};const so={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.drawerOverlay=!0,this.searchText="",this._drawerId="main-drawer",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._harvest=()=>{const e=this._slotEl;if(!e)return;const t=e.assignedElements({flatten:!0}),i=[],r=[],s=[];let l=-1;const h=p=>({label:p.getAttribute("label")??"",href:p.getAttribute("href")??void 0,icon:p.getAttribute("icon")??void 0});for(const p of t){const v=p.tagName.toLowerCase();if(v==="scb-header-tab"){const f=p.getAttribute("label")??"",b=p.getAttribute("href"),_=b&&b.trim()!==""?b:void 0;(p.hasAttribute("selected")||p.getAttribute("selected")==="true"||p.getAttribute("active")==="true"||p.getAttribute("aria-current")==="page")&&l===-1&&(l=i.length),i.push({label:f,href:_});continue}if(v==="scb-header-utility"){r.push({label:p.getAttribute("label")??"",href:p.getAttribute("href")??"#",target:p.getAttribute("target")??void 0});continue}if(v==="scb-header-drawer-group"){const f={label:p.getAttribute("label")??"",icon:p.getAttribute("icon")??void 0,children:[]};p.querySelectorAll("scb-header-drawer-item").forEach(_=>f.children.push(h(_))),s.push(f);continue}v==="scb-header-drawer-item"&&s.push(h(p))}this._slotTabs=i,this._slotUtils=r,this._slotMenu=s,!this.hasAttribute("active-tab")&&l>=0&&(this.activeTab=l),queueMicrotask(()=>{this.updateComplete.then(()=>{this._scheduleMeasure()})})},this._measure=()=>{var b,_,x;const e=this._top,t=this._logoGroup;if(!e||!t)return;const i=window.innerWidth,r=e.clientWidth,s=this._overflows(this._util),l=this._overflows(this._tabsNav),h=i<this.BP_MD||s||l;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)),T=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),A=this.showDrawer&&(i<this.BP_MD||this._collapsed)?((b=this._menuBtn)==null?void 0:b.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48):0;p=t.getBoundingClientRect().width+T+C+T+A+8>r+.5}this._setHideSearch(p);let v=!1;if(this.showDrawer&&(i<this.BP_MD||this._collapsed)&&!this._visible(this._util)&&!this._visible(this._searchWrap)){const S=this._num(getComputedStyle(e).gap,this._tokenPx("--spacing-7",24)),C=((_=this._menuBtn)==null?void 0:_.getBoundingClientRect().width)||this._tokenPx("--icon-size-large",48),T=(((x=this._logoGroup)==null?void 0:x.getBoundingClientRect().width)||0)+S+C;this._hideLogoText?v=!(r>=this._logoTextUnlockAt):T>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 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._onTabClick=e=>{const t=e.currentTarget;if(!t)return;const i=t.tagName.toLowerCase()==="a";if(i&&(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))return;const r=t.getAttribute("data-index"),s=r!=null?Number(r):0;this.activeTab=s;const p=((this._slotTabs.length?this._slotTabs:this.tabs)[s]??{}).href??"",v=new CustomEvent("tab-change",{detail:{index:s,href:p},bubbles:!0,composed:!0,cancelable:!0});!this.dispatchEvent(v)&&i&&e.preventDefault()},this._onTabsKeydown=e=>{const t=e.key;if(t!=="ArrowLeft"&&t!=="ArrowRight"&&t!=="Home"&&t!=="End")return;const i=Array.from(this.renderRoot.querySelectorAll(".tab-link"));if(!i.length)return;const r=e.target;let s=i.indexOf(r??i[0]);s===-1&&(s=0),t==="ArrowRight"?s=(s+1)%i.length:t==="ArrowLeft"?s=(s-1+i.length)%i.length:t==="Home"?s=0:t==="End"&&(s=i.length-1),e.preventDefault();const l=i[s];l.focus();const h=l.getAttribute("data-index"),p=h!=null?Number(h):s;this.activeTab=p},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()}))}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 _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}`)}get _tabsNav(){return this.renderRoot.querySelector(".tabs-nav")}_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","selected","aria-current","active"]})}_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})}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()})}disconnectedCallback(){var e,t;(e=this._ro)==null||e.disconnect(),(t=this._slotMo)==null||t.disconnect(),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}_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))}_renderDrawerNodes(e){return!e||e.length===0?c``:c`${e.map(t=>{const i=Array.isArray(t.children)&&t.children.length>0;return c`
|
|
5810
5846
|
<scb-drawer-item
|
|
5811
5847
|
label=${t.label}
|
|
5812
5848
|
?selected=${!1}
|
|
@@ -6294,7 +6330,7 @@ ${this.value}</textarea
|
|
|
6294
6330
|
:host([data-hide-logo-text]) .logo-text {
|
|
6295
6331
|
display: none;
|
|
6296
6332
|
}
|
|
6297
|
-
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),P([n({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),P([n({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),P([n({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),P([n({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),P([n({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),P([n({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),P([n({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),P([n({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),P([n({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),P([n({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),P([n({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),P([n({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),P([n({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),P([n({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),P([n({attribute:"show-drawer",reflect:!0,converter:so})],a.ScbHeader.prototype,"showDrawer",2),P([n({attribute:"show-search",reflect:!0,converter:so})],a.ScbHeader.prototype,"showSearch",2),P([n({attribute:"include-utility-in-drawer",reflect:!0,converter:so})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),P([n({attribute:"drawer-overlay",reflect:!0,converter:so})],a.ScbHeader.prototype,"drawerOverlay",2),P([n({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),P([n({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),P([n({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),P([n({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),P([w()],a.ScbHeader.prototype,"_drawerId",2),P([w()],a.ScbHeader.prototype,"_drawerExpanded",2),P([w()],a.ScbHeader.prototype,"_searchId",2),P([w()],a.ScbHeader.prototype,"_slotTabs",2),P([w()],a.ScbHeader.prototype,"_slotUtils",2),P([w()],a.ScbHeader.prototype,"_slotMenu",2),P([w()],a.ScbHeader.prototype,"_collapsed",2),P([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=P([
|
|
6333
|
+
`,a.ScbHeader._nextFrame=()=>new Promise(o=>requestAnimationFrame(()=>o())),P([n({type:String,attribute:"max-width"})],a.ScbHeader.prototype,"maxWidth",2),P([n({type:String,attribute:"logo-text"})],a.ScbHeader.prototype,"logoText",2),P([n({type:String,attribute:"logo-href"})],a.ScbHeader.prototype,"logoHref",2),P([n({type:Boolean,reflect:!0})],a.ScbHeader.prototype,"banner",2),P([n({type:String,attribute:"banner-label"})],a.ScbHeader.prototype,"bannerLabel",2),P([n({attribute:"tabs",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"tabs",2),P([n({type:Number,attribute:"active-tab"})],a.ScbHeader.prototype,"activeTab",2),P([n({attribute:"utility-items",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"utilityItems",2),P([n({type:String,attribute:"search-placeholder"})],a.ScbHeader.prototype,"searchPlaceholder",2),P([n({type:String,attribute:"drawer-label"})],a.ScbHeader.prototype,"drawerLabel",2),P([n({type:String,attribute:"drawer-sub-label"})],a.ScbHeader.prototype,"drawerSubLabel",2),P([n({type:String,attribute:"drawer-section-label"})],a.ScbHeader.prototype,"drawerSectionLabel",2),P([n({type:String,attribute:"drawer-search-placeholder"})],a.ScbHeader.prototype,"drawerSearchPlaceholder",2),P([n({attribute:"menu-data",converter:a.ScbHeader._JSON_ARRAY})],a.ScbHeader.prototype,"menuData",2),P([n({attribute:"show-drawer",reflect:!0,converter:so})],a.ScbHeader.prototype,"showDrawer",2),P([n({attribute:"show-search",reflect:!0,converter:so})],a.ScbHeader.prototype,"showSearch",2),P([n({attribute:"include-utility-in-drawer",reflect:!0,converter:so})],a.ScbHeader.prototype,"includeUtilityInDrawer",2),P([n({attribute:"drawer-overlay",reflect:!0,converter:so})],a.ScbHeader.prototype,"drawerOverlay",2),P([n({type:String,attribute:"search-max"})],a.ScbHeader.prototype,"searchMax",2),P([n({type:String,attribute:"search-min"})],a.ScbHeader.prototype,"searchMin",2),P([n({type:String,attribute:"search-height"})],a.ScbHeader.prototype,"searchHeight",2),P([n({type:String,attribute:"search-text",reflect:!0})],a.ScbHeader.prototype,"searchText",2),P([w()],a.ScbHeader.prototype,"_drawerId",2),P([w()],a.ScbHeader.prototype,"_drawerExpanded",2),P([w()],a.ScbHeader.prototype,"_searchId",2),P([w()],a.ScbHeader.prototype,"_slotTabs",2),P([w()],a.ScbHeader.prototype,"_slotUtils",2),P([w()],a.ScbHeader.prototype,"_slotMenu",2),P([w()],a.ScbHeader.prototype,"_collapsed",2),P([w()],a.ScbHeader.prototype,"_hideLogoText",2),a.ScbHeader=P([g("scb-header")],a.ScbHeader);var zu=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,ul=o=>{throw TypeError(o)},De=(o,e,t,i)=>{for(var r=i>1?void 0:i?Iu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&zu(e,t,r),r},Pu=(o,e,t)=>e.has(o)||ul("Cannot "+t),Ou=(o,e,t)=>e.has(o)?ul("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),vl=(o,e,t)=>(Pu(o,e,"access private method"),t),no,es;a.ScbHorizontalScroller=class extends y{constructor(){super(...arguments),Ou(this,no),this.variant="standard",this.width="100%",this.showScrollbar=!0,this.rightScrollButtonLabel="Scrolla höger",this.leftScrollButtonLabel="Scrolla vänster",this.spacing="",this.spacingTop="",this.spacingBottom="",this.contentFlex=!1,this.updateScrollButtons=()=>{var i;this.requestUpdate();const e=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");if(!e)return;e.scrollLeft>0?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left");const t=e;t.scrollLeft+t.clientWidth<t.scrollWidth-1?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")},this.lastScrollLeft=0,this.isScrolling=!1,this.scrollEndTimeout=null,this.handleScroll=()=>{var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-horizontal-scroller");e&&(this.updateScrollButtons(),this.dispatchCustomEvent("scb-scroll",{scrollLeft:e.scrollLeft}),this.isScrolling||(this.isScrolling=!0,this.dispatchCustomEvent("scb-scroll-start",{scrollLeft:e.scrollLeft})),clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=setTimeout(()=>{this.isScrolling=!1,this.dispatchCustomEvent("scb-scroll-end",{scrollLeft:e.scrollLeft})},120),e.scrollLeft>this.lastScrollLeft?this.dispatchCustomEvent("scb-scroll-right",{scrollLeft:e.scrollLeft}):e.scrollLeft<this.lastScrollLeft&&this.dispatchCustomEvent("scb-scroll-left",{scrollLeft:e.scrollLeft}),this.lastScrollLeft=e.scrollLeft)}}doScrollBy(e){var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");t&&t.scrollBy({left:e,behavior:"smooth"})}get canScrollLeft(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".scb-horizontal-scroller");return e?e.scrollLeft>0:!1}get canScrollRight(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector(".scb-horizontal-scroller");if(!e)return!1;const t=e;return t.scrollLeft+t.clientWidth<t.scrollWidth-1}connectedCallback(){super.connectedCallback(),this.addEventListener("scroll",this.updateScrollButtons,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("scroll",this.updateScrollButtons,!0)}dispatchCustomEvent(e,t={}){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}firstUpdated(){var l,h,p,v;const e=(l=this.shadowRoot)==null?void 0:l.querySelector(".scb-horizontal-scroller"),t=(h=this.shadowRoot)==null?void 0:h.querySelector(".scroll-shadow-left"),i=(p=this.shadowRoot)==null?void 0:p.querySelector(".scroll-shadow-right"),r=(v=this.shadowRoot)==null?void 0:v.querySelector("slot");e&&(e.addEventListener("scroll",this.handleScroll),e.addEventListener("wheel",function(f){f.deltaY!==0&&(f.preventDefault(),e.scrollLeft+=f.deltaY)},{passive:!1}));const s=()=>{if(r&&t&&i){const f=r.getBoundingClientRect();t.style.height=`${f.height}px`,i.style.height=`${f.height}px`}};s(),r&&new ResizeObserver(s).observe(r),this.updateComplete.then(()=>{this.updateScrollButtons()}),vl(this,no,es).call(this)}updated(e){var h,p,v,f;const t=(h=this.shadowRoot)==null?void 0:h.querySelector(".scroll-shadow-left"),i=(p=this.shadowRoot)==null?void 0:p.querySelector(".scroll-shadow-right"),r=(v=this.shadowRoot)==null?void 0:v.querySelector("slot"),s=(f=this.shadowRoot)==null?void 0:f.querySelector(".scb-horizontal-scroller");if(s){s.addEventListener("scroll",this.handleScroll),s.addEventListener("wheel",function(_){_.deltaY!==0&&(_.preventDefault(),s.scrollLeft+=_.deltaY)},{passive:!1}),s.scrollLeft>0?this.setAttribute("data-scroll-left",""):this.removeAttribute("data-scroll-left");const b=s;b.scrollLeft+b.clientWidth<b.scrollWidth-1?this.setAttribute("data-scroll-right",""):this.removeAttribute("data-scroll-right")}e.has("width")&&this.style.setProperty("--scb-horizontal-scroller-width",this.width);const l=()=>{if(r&&t&&i){const b=r.getBoundingClientRect();t.style.height=`${b.height}px`,i.style.height=`${b.height}px`}};l(),r&&new ResizeObserver(l).observe(r),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&vl(this,no,es).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}render(){const e=this.variant,t=!!(this.canScrollLeft||this.canScrollRight);switch(e){case"inline":return c`
|
|
6298
6334
|
<div class="scb-horizontal-scroller ${t?"canScroll":""}" tabindex="0">
|
|
6299
6335
|
${this.variant!="inline"?c`<div class="scroll-shadow-left"></div>`:""}
|
|
6300
6336
|
<slot></slot>
|
|
@@ -6466,7 +6502,7 @@ ${this.value}</textarea
|
|
|
6466
6502
|
:host([variant='inline'][show-scrollbar]) {
|
|
6467
6503
|
gap: var(--spacing-5);
|
|
6468
6504
|
}
|
|
6469
|
-
`,De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),De([n({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),De([n({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),De([n({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"spacing",2),De([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbHorizontalScroller.prototype,"spacingTop",2),De([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbHorizontalScroller.prototype,"spacingBottom",2),De([n({type:Boolean,reflect:!0,attribute:"content-flex"})],a.ScbHorizontalScroller.prototype,"contentFlex",2),a.ScbHorizontalScroller=De([
|
|
6505
|
+
`,De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),De([n({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),De([n({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),De([n({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),De([n({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"spacing",2),De([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbHorizontalScroller.prototype,"spacingTop",2),De([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbHorizontalScroller.prototype,"spacingBottom",2),De([n({type:Boolean,reflect:!0,attribute:"content-flex"})],a.ScbHorizontalScroller.prototype,"contentFlex",2),a.ScbHorizontalScroller=De([g("scb-horizontal-scroller")],a.ScbHorizontalScroller);var Lu=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,bl=o=>{throw TypeError(o)},Q=(o,e,t,i)=>{for(var r=i>1?void 0:i?Du(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Lu(e,t,r),r},Bu=(o,e,t)=>e.has(o)||bl("Cannot "+t),Ru=(o,e,t)=>e.has(o)?bl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ml=(o,e,t)=>(Bu(o,e,"access private method"),t),lo,ts;a.ScbKeyFigureCard=class extends y{constructor(){super(...arguments),Ru(this,lo),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.spacing="",this.spacingTop="",this.spacingBottom="",this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.location.href=this.cardHref)},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||(window.location.href=this.cardHref))}}formatNumber(e){if(typeof e=="number")return e.toLocaleString("sv-SE").replace(/\u00A0/g," ");const t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString("sv-SE").replace(/\u00A0/g," ")}async firstUpdated(){a.ScbKeyFigureCard.__iconLoaded||(await Promise.resolve().then(()=>Pe),a.ScbKeyFigureCard.__iconLoaded=!0),a.ScbKeyFigureCard.__rippleLoaded||(await Promise.resolve().then(()=>or),a.ScbKeyFigureCard.__rippleLoaded=!0),this.__applyInnerSizing(),ml(this,lo,ts).call(this)}render(){const e=!!this.cardHref,t=this.formatNumber(this.keyfigure),i=(this.unit||"").trim(),r=i?`${t} ${i}`:t;return c`
|
|
6470
6506
|
<div
|
|
6471
6507
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
6472
6508
|
role=${e?"link":"group"}
|
|
@@ -6616,7 +6652,7 @@ ${this.value}</textarea
|
|
|
6616
6652
|
line-height: var(--md-sys-typescale-display-medium-line-height);
|
|
6617
6653
|
letter-spacing: var(--md-sys-typescale-display-medium-tracking);
|
|
6618
6654
|
}
|
|
6619
|
-
`,Q([n({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),Q([n({type:String,attribute:"subtitle"})],a.ScbKeyFigureCard.prototype,"subtitle",2),Q([n({type:String,attribute:"supporting-text"})],a.ScbKeyFigureCard.prototype,"supportingText",2),Q([n({type:String,attribute:"card-href"})],a.ScbKeyFigureCard.prototype,"cardHref",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"icon",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"size",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"unit",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"width",2),Q([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbKeyFigureCard.prototype,"maxWidth",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"height",2),Q([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbKeyFigureCard.prototype,"maxHeight",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"sizing",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"spacing",2),Q([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbKeyFigureCard.prototype,"spacingTop",2),Q([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbKeyFigureCard.prototype,"spacingBottom",2),a.ScbKeyFigureCard=Q([
|
|
6655
|
+
`,Q([n({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),Q([n({type:String,attribute:"subtitle"})],a.ScbKeyFigureCard.prototype,"subtitle",2),Q([n({type:String,attribute:"supporting-text"})],a.ScbKeyFigureCard.prototype,"supportingText",2),Q([n({type:String,attribute:"card-href"})],a.ScbKeyFigureCard.prototype,"cardHref",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"icon",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"size",2),Q([n({type:String})],a.ScbKeyFigureCard.prototype,"unit",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"width",2),Q([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbKeyFigureCard.prototype,"maxWidth",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"height",2),Q([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbKeyFigureCard.prototype,"maxHeight",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"sizing",2),Q([n({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"spacing",2),Q([n({type:String,reflect:!0,attribute:"spacing-top"})],a.ScbKeyFigureCard.prototype,"spacingTop",2),Q([n({type:String,reflect:!0,attribute:"spacing-bottom"})],a.ScbKeyFigureCard.prototype,"spacingBottom",2),a.ScbKeyFigureCard=Q([g("scb-keyfigure-card")],a.ScbKeyFigureCard);var Mu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,ht=(o,e,t,i)=>{for(var r=i>1?void 0:i?Fu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Mu(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,l,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 f,b;const v=p.querySelector("scb-menu-item");v&&((b=(f=v.shadowRoot)==null?void 0:f.querySelector("li"))==null||b.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 f=v.previousElementSibling;f&&f.tagName==="SCB-MENU-ITEM"&&((h=(l=f.shadowRoot)==null?void 0:l.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`
|
|
6620
6656
|
${this.divider?c`<scb-divider></scb-divider>`:""}
|
|
6621
6657
|
<li @click=${this.handleClick} @keydown=${this._onKeyDown} @blur=${this._onBlur} @focus=${this._onFocus} role="menuitem" tabindex="0">
|
|
6622
6658
|
|
|
@@ -6677,7 +6713,7 @@ ${this.value}</textarea
|
|
|
6677
6713
|
:host li:focus {
|
|
6678
6714
|
outline: none;
|
|
6679
6715
|
}
|
|
6680
|
-
`,ht([n({type:String})],a.ScbMenuItem.prototype,"label",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"hasSubMenu",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"openLeft",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"divider",2),ht([n({type:String,attribute:"leading-icon"})],a.ScbMenuItem.prototype,"leadingIcon",2),ht([n({type:String,attribute:"trailing-icon"})],a.ScbMenuItem.prototype,"trailingIcon",2),ht([n({type:String,attribute:"item-href"})],a.ScbMenuItem.prototype,"itemHref",2),a.ScbMenuItem=ht([
|
|
6716
|
+
`,ht([n({type:String})],a.ScbMenuItem.prototype,"label",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"hasSubMenu",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"openLeft",2),ht([n({type:Boolean})],a.ScbMenuItem.prototype,"divider",2),ht([n({type:String,attribute:"leading-icon"})],a.ScbMenuItem.prototype,"leadingIcon",2),ht([n({type:String,attribute:"trailing-icon"})],a.ScbMenuItem.prototype,"trailingIcon",2),ht([n({type:String,attribute:"item-href"})],a.ScbMenuItem.prototype,"itemHref",2),a.ScbMenuItem=ht([g("scb-menu-item")],a.ScbMenuItem);var Hu=Object.defineProperty,Nu=Object.getOwnPropertyDescriptor,fl=(o,e,t,i)=>{for(var r=i>1?void 0:i?Nu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Hu(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`
|
|
6681
6717
|
<div role="menu" class="submenu${this.open?" open":""}">
|
|
6682
6718
|
<slot></slot>
|
|
6683
6719
|
</div>
|
|
@@ -6709,7 +6745,7 @@ ${this.value}</textarea
|
|
|
6709
6745
|
.submenu.open {
|
|
6710
6746
|
display: block;
|
|
6711
6747
|
}
|
|
6712
|
-
`,fl([n({type:Boolean,reflect:!0})],a.ScbSubMenu.prototype,"open",2),a.ScbSubMenu=fl([
|
|
6748
|
+
`,fl([n({type:Boolean,reflect:!0})],a.ScbSubMenu.prototype,"open",2),a.ScbSubMenu=fl([g("scb-sub-menu")],a.ScbSubMenu);var Vu=Object.defineProperty,qu=Object.getOwnPropertyDescriptor,is=(o,e,t,i)=>{for(var r=i>1?void 0:i?qu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Vu(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`
|
|
6713
6749
|
<div
|
|
6714
6750
|
role="menu"
|
|
6715
6751
|
class="scb-menu-panel${this.open?" open":""}"
|
|
@@ -6754,7 +6790,7 @@ ${this.value}</textarea
|
|
|
6754
6790
|
opacity 0.25s cubic-bezier(0.23, 1, 0.32, 1),
|
|
6755
6791
|
transform 0.32s cubic-bezier(0.23, 1, 0.32, 1);
|
|
6756
6792
|
}
|
|
6757
|
-
`,is([n({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),is([n({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=is([
|
|
6793
|
+
`,is([n({type:Boolean,reflect:!0})],a.ScbMenu.prototype,"open",2),is([n({type:Boolean,attribute:!1})],a.ScbMenu.prototype,"inSb",2),a.ScbMenu=is([g("scb-menu")],a.ScbMenu);var Uu=Object.defineProperty,Wu=Object.getOwnPropertyDescriptor,F=(o,e,t,i)=>{for(var r=i>1?void 0:i?Wu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Uu(e,t,r),r};a.ScbNotificationCard=class extends y{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing="",this.spacingTop="",this.spacingBottom="",this._closeNotification=()=>{this.open=!1;const e=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(e)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(e){const t=(e??"").trim();return t?/^(?:[0-9]|1[0-4])$/.test(t)?`var(--spacing-${t})`:t:""}__applySpacing(){const e=this.__resolveSpacingToken(this.spacingTop||this.spacing),t=this.__resolveSpacingToken(this.spacingBottom||this.spacing);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),t?this.style.marginBlockEnd=t:this.style.removeProperty("margin-block-end")}updated(e){super.updated(e),e.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this.__applySpacing()}render(){const e=this.direction==="vertical"?"vertical":"horizontal",t=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container);":"--_icon-color: var(--md-sys-color-on-info-container);";return c`
|
|
6758
6794
|
<div
|
|
6759
6795
|
class="notification"
|
|
6760
6796
|
type=${this.variant}
|
|
@@ -7050,7 +7086,7 @@ ${this.value}</textarea
|
|
|
7050
7086
|
box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
|
|
7051
7087
|
}
|
|
7052
7088
|
}
|
|
7053
|
-
`],F([n({type:String})],a.ScbNotificationCard.prototype,"variant",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),F([n({type:String})],a.ScbNotificationCard.prototype,"title",2),F([n({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),F([n({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),F([n({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),F([n({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),F([n({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkHref",2),F([n({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),F([n({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"sizing",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"width",2),F([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbNotificationCard.prototype,"maxWidth",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"height",2),F([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbNotificationCard.prototype,"maxHeight",2),F([n({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),F([n({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),F([n({type:String})],a.ScbNotificationCard.prototype,"spacing",2),F([n({type:String,attribute:"spacing-top"})],a.ScbNotificationCard.prototype,"spacingTop",2),F([n({type:String,attribute:"spacing-bottom"})],a.ScbNotificationCard.prototype,"spacingBottom",2),a.ScbNotificationCard=F([
|
|
7089
|
+
`],F([n({type:String})],a.ScbNotificationCard.prototype,"variant",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"direction",2),F([n({type:String})],a.ScbNotificationCard.prototype,"title",2),F([n({type:String})],a.ScbNotificationCard.prototype,"subtitle",2),F([n({type:String,attribute:"supporting-text"})],a.ScbNotificationCard.prototype,"supportingText",2),F([n({type:Boolean,reflect:!0})],a.ScbNotificationCard.prototype,"open",2),F([n({type:String,attribute:"link-text"})],a.ScbNotificationCard.prototype,"linkText",2),F([n({type:String,attribute:"link-href"})],a.ScbNotificationCard.prototype,"linkHref",2),F([n({type:Boolean,attribute:"show-icon"})],a.ScbNotificationCard.prototype,"showIcon",2),F([n({type:Boolean,attribute:"show-close-button"})],a.ScbNotificationCard.prototype,"showCloseButton",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"sizing",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"width",2),F([n({type:String,reflect:!0,attribute:"max-width"})],a.ScbNotificationCard.prototype,"maxWidth",2),F([n({type:String,reflect:!0})],a.ScbNotificationCard.prototype,"height",2),F([n({type:String,reflect:!0,attribute:"max-height"})],a.ScbNotificationCard.prototype,"maxHeight",2),F([n({type:Boolean,reflect:!0,attribute:"full-height"})],a.ScbNotificationCard.prototype,"fullHeight",2),F([n({type:Boolean,reflect:!0,attribute:"full-width"})],a.ScbNotificationCard.prototype,"fullWidth",2),F([n({type:String})],a.ScbNotificationCard.prototype,"spacing",2),F([n({type:String,attribute:"spacing-top"})],a.ScbNotificationCard.prototype,"spacingTop",2),F([n({type:String,attribute:"spacing-bottom"})],a.ScbNotificationCard.prototype,"spacingBottom",2),a.ScbNotificationCard=F([g("scb-notification-card")],a.ScbNotificationCard);var ju=Object.defineProperty,Ku=Object.getOwnPropertyDescriptor,_e=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ku(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&ju(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.spacing="",this.spacingTop="",this.spacingBottom="",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)}__resolveSpacingToken(e){const t=(e??"").trim();return t?/^(?:[0-9]|1[0-4])$/.test(t)?`var(--spacing-${t})`:t:""}__applySpacing(){const e=this.__resolveSpacingToken(this.spacingTop||this.spacing),t=this.__resolveSpacingToken(this.spacingBottom||this.spacing);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),t?this.style.marginBlockEnd=t:this.style.removeProperty("margin-block-end")}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this.__applySpacing()}render(){if(this.totalPages===0)return null;const e=this.variant?`${this.variant.toLowerCase()}`:"",t=[],{page:i,totalPages:r}=this,s=window.innerWidth<=768,l=s?1:2,h=p=>p===i?c`
|
|
7054
7090
|
<li>
|
|
7055
7091
|
<span
|
|
7056
7092
|
class="page-number active"
|
|
@@ -7282,7 +7318,7 @@ ${this.value}</textarea
|
|
|
7282
7318
|
margin-top: 8px;
|
|
7283
7319
|
}
|
|
7284
7320
|
}
|
|
7285
|
-
`],_e([n({type:String})],a.ScbPagination.prototype,"variant",2),_e([n({type:Number})],a.ScbPagination.prototype,"page",2),_e([n({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),_e([n({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),_e([n({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),_e([n({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),_e([n({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),_e([n({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),_e([n({type:String})],a.ScbPagination.prototype,"spacing",2),_e([n({type:String,attribute:"spacing-top"})],a.ScbPagination.prototype,"spacingTop",2),_e([n({type:String,attribute:"spacing-bottom"})],a.ScbPagination.prototype,"spacingBottom",2),a.ScbPagination=_e([
|
|
7321
|
+
`],_e([n({type:String})],a.ScbPagination.prototype,"variant",2),_e([n({type:Number})],a.ScbPagination.prototype,"page",2),_e([n({type:Number,attribute:"total-pages"})],a.ScbPagination.prototype,"totalPages",2),_e([n({type:String,attribute:"paging-href"})],a.ScbPagination.prototype,"pagingHref",2),_e([n({type:String,attribute:"pagination-aria-label"})],a.ScbPagination.prototype,"paginationAriaLabel",2),_e([n({type:String,attribute:"current-aria-label"})],a.ScbPagination.prototype,"currentAriaLabel",2),_e([n({type:String,attribute:"paging-number-aria-label"})],a.ScbPagination.prototype,"pagingNumberAriaLabel",2),_e([n({type:Boolean})],a.ScbPagination.prototype,"isNarrow",2),_e([n({type:String})],a.ScbPagination.prototype,"spacing",2),_e([n({type:String,attribute:"spacing-top"})],a.ScbPagination.prototype,"spacingTop",2),_e([n({type:String,attribute:"spacing-bottom"})],a.ScbPagination.prototype,"spacingBottom",2),a.ScbPagination=_e([g("scb-pagination")],a.ScbPagination);var Gu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Hi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Yu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Gu(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`
|
|
7286
7322
|
<div class="scb-progress-indicator">
|
|
7287
7323
|
${this.type==="circular"?c`
|
|
7288
7324
|
<div class="circular">
|
|
@@ -7358,7 +7394,7 @@ ${this.value}</textarea
|
|
|
7358
7394
|
50% { margin-left: 30%; width: 60%; }
|
|
7359
7395
|
100% { margin-left: 100%; width: 40%; }
|
|
7360
7396
|
}
|
|
7361
|
-
`],Hi([n({type:String})],a.ScbProgressIndicator.prototype,"id",2),Hi([n({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),Hi([n({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),Hi([n({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=Hi([
|
|
7397
|
+
`],Hi([n({type:String})],a.ScbProgressIndicator.prototype,"id",2),Hi([n({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),Hi([n({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),Hi([n({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=Hi([g("scb-progress-indicator")],a.ScbProgressIndicator);var Xu=Object.defineProperty,Zu=Object.getOwnPropertyDescriptor,pt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Zu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Xu(e,t,r),r};a.ScbProgressStep=class extends y{constructor(){super(...arguments),this.width="100%",this.active=!1,this.disabled=!1,this.href="",this.label="",this.position="top",this._stepId=`scb-step-${Math.random().toString(36).slice(2)}`}updated(e){var t;(t=super.updated)==null||t.call(this,e),this.style.setProperty("--progress-step-width",this.width)}_onClick(){this.dispatchEvent(new CustomEvent("step-click",{detail:{},bubbles:!0,composed:!0}))}firstUpdated(e){var t;(t=super.firstUpdated)==null||t.call(this,e),this._setupTooltipPositioning()}_setupTooltipPositioning(){new MutationObserver(()=>this._adjustTooltipPosition()).observe(this,{attributes:!0,childList:!0,subtree:!0}),window.addEventListener("resize",()=>this._adjustTooltipPosition())}_adjustTooltipPosition(){const e=this.renderRoot.querySelector(".tooltip");if(!e)return;e.style.left="50%",e.style.right="",e.style.transform="translateX(-50%)",e.classList.remove("tooltip-left","tooltip-right");const t=e.getBoundingClientRect(),i=8;t.right>window.innerWidth-i&&(e.style.left="auto",e.style.right=`${i}px`,e.style.transform="none",e.classList.add("tooltip-right")),t.left<i&&(e.style.left=`${i}px`,e.style.right="auto",e.style.transform="none",e.classList.add("tooltip-left"))}render(){const e=!!this.href&&!this.disabled;return c`
|
|
7362
7398
|
${e?c`
|
|
7363
7399
|
<a
|
|
7364
7400
|
id=${this._stepId}
|
|
@@ -7504,7 +7540,7 @@ ${this.value}</textarea
|
|
|
7504
7540
|
left: auto;
|
|
7505
7541
|
transform: none;
|
|
7506
7542
|
}
|
|
7507
|
-
`,pt([n({type:String})],a.ScbProgressStep.prototype,"width",2),pt([n({type:Boolean,reflect:!0})],a.ScbProgressStep.prototype,"active",2),pt([n({type:Boolean,reflect:!0})],a.ScbProgressStep.prototype,"disabled",2),pt([n({type:String,reflect:!0})],a.ScbProgressStep.prototype,"href",2),pt([n({type:String})],a.ScbProgressStep.prototype,"label",2),pt([n({type:String})],a.ScbProgressStep.prototype,"position",2),pt([w()],a.ScbProgressStep.prototype,"_stepId",2),a.ScbProgressStep=pt([
|
|
7543
|
+
`,pt([n({type:String})],a.ScbProgressStep.prototype,"width",2),pt([n({type:Boolean,reflect:!0})],a.ScbProgressStep.prototype,"active",2),pt([n({type:Boolean,reflect:!0})],a.ScbProgressStep.prototype,"disabled",2),pt([n({type:String,reflect:!0})],a.ScbProgressStep.prototype,"href",2),pt([n({type:String})],a.ScbProgressStep.prototype,"label",2),pt([n({type:String})],a.ScbProgressStep.prototype,"position",2),pt([w()],a.ScbProgressStep.prototype,"_stepId",2),a.ScbProgressStep=pt([g("scb-progress-step")],a.ScbProgressStep);var Ju=Object.defineProperty,Qu=Object.getOwnPropertyDescriptor,co=(o,e,t,i)=>{for(var r=i>1?void 0:i?Qu(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Ju(e,t,r),r};a.ScbProgressStepper=class extends y{constructor(){super(...arguments),this.progressWidth=23,this.height="normal",this.position="top"}updated(e){var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector("slot");if(!t)return;e.has("progressWidth")&&t.dispatchEvent(new Event("slotchange"));const i=t.assignedElements({flatten:!0}),r=this.progressWidth;let s=0;i.forEach((h,p)=>{if(h instanceof a.ScbProgressStep){const v=typeof h.width=="string"?parseFloat(h.width.replace("%","")):Number(h.width);s+=v,this.position=="bottom"?h.setAttribute("position","bottom"):h.setAttribute("position","top"),s<=r+2?h.setAttribute("active","true"):h.removeAttribute("active"),p===i.length-1?h.classList.add("last-step"):h.classList.remove("last-step")}})}render(){return c`
|
|
7508
7544
|
<div class="progress-bar">
|
|
7509
7545
|
<div class="progress-bar__fill" style="width: ${this.progressWidth}%;"></div>
|
|
7510
7546
|
</div>
|
|
@@ -7560,7 +7596,7 @@ ${this.value}</textarea
|
|
|
7560
7596
|
position: relative;
|
|
7561
7597
|
gap: 0;
|
|
7562
7598
|
}
|
|
7563
|
-
`,co([n({type:Number,reflect:!0,attribute:"progress-width",hasChanged:(o,e)=>o!==e})],a.ScbProgressStepper.prototype,"progressWidth",2),co([n({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"height",2),co([n({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"position",2),a.ScbProgressStepper=co([
|
|
7599
|
+
`,co([n({type:Number,reflect:!0,attribute:"progress-width",hasChanged:(o,e)=>o!==e})],a.ScbProgressStepper.prototype,"progressWidth",2),co([n({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"height",2),co([n({type:String,reflect:!0})],a.ScbProgressStepper.prototype,"position",2),a.ScbProgressStepper=co([g("scb-progress-stepper")],a.ScbProgressStepper);var ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,ii=(o,e,t,i)=>{for(var r=i>1?void 0:i?tv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&ev(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 l;const e=this.parentElement,t=(l=e==null?void 0:e.hasAttribute)==null?void 0:l.call(e,"disabled"),i=this.disabled||t,r=!!this.icon,s=!!this.label;return c`
|
|
7564
7600
|
<div class="segmented-item${r||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${i?"true":"false"}">
|
|
7565
7601
|
<md-ripple ?disabled="${i}"></md-ripple>
|
|
7566
7602
|
${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>`:""}
|
|
@@ -7634,7 +7670,7 @@ ${this.value}</textarea
|
|
|
7634
7670
|
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
7635
7671
|
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
7636
7672
|
}
|
|
7637
|
-
`,ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),ii([n({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),ii([n({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=ii([
|
|
7673
|
+
`,ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),ii([n({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),ii([n({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),ii([n({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=ii([g("scb-segmented-item")],a.ScbSegmentedItem);var iv=Object.defineProperty,rv=Object.getOwnPropertyDescriptor,gl=o=>{throw TypeError(o)},Qe=(o,e,t,i)=>{for(var r=i>1?void 0:i?rv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&iv(e,t,r),r},ov=(o,e,t)=>e.has(o)||gl("Cannot "+t),av=(o,e,t)=>e.has(o)?gl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),yl=(o,e,t)=>(ov(o,e,"access private method"),t),ho,rs;a.ScbSegmentedButton=class extends y{constructor(){super(),av(this,ho),this._internals=null,this.variant="single-select",this.value="",this.values=[],this.disabled=!1,this.name="",this.spacing="",this.spacingTop="",this.spacingBottom="",this._form=null,this._formResetHandler=null,this._initialValue="",this._initialValues=[],"attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),this._form=this.closest("form"),this._form&&(this._formResetHandler=()=>{this.value=this._initialValue,this.values=Array.isArray(this._initialValues)?[...this._initialValues]:[],this.updateSegments(),this._syncFormValue()},this._form.addEventListener("reset",this._formResetHandler,!0))}disconnectedCallback(){this._form&&this._formResetHandler&&this._form.removeEventListener("reset",this._formResetHandler,!0),super.disconnectedCallback()}firstUpdated(){var t;this._initialValue=this.value,this._initialValues=Array.isArray(this.values)?[...this.values]:[],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())}}})),this._syncFormValue(),yl(this,ho,rs).call(this)}updated(e){super.updated(e),this.updateSegments(),(e.has("value")||e.has("values")||e.has("disabled")||e.has("variant")||e.has("name"))&&this._syncFormValue(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&yl(this,ho,rs).call(this)}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(l=>l!==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 l=!1;this.variant==="multi-select"?l=!!this.values&&this.values.includes(s):l=s===this.value,r.setAttribute("aria-pressed",l?"true":"false"),l?r.setAttribute("selected","true"):r.removeAttribute("selected")}this.disabled&&r.setAttribute("disabled","true")}})}formDisabledCallback(e){this.disabled=e}_syncFormValue(){if(this._internals){if(this.disabled||!this.name){this._internals.setFormValue(null);return}if(this.variant==="multi-select"){if(!this.values||this.values.length===0){this._internals.setFormValue(null);return}const e=new FormData;for(const t of this.values)e.append(this.name,t);this._internals.setFormValue(e)}else{if(!this.value){this._internals.setFormValue(null);return}this._internals.setFormValue(this.value)}}}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}render(){return c`<slot></slot>`}},ho=new WeakSet,rs=function(){const o=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??o,t=this.mapSpacingToken(this.spacingBottom)??o;e?this.style.setProperty("--scb-segmented-button-spacing-block-start",e):this.style.removeProperty("--scb-segmented-button-spacing-block-start"),t?this.style.setProperty("--scb-segmented-button-spacing-block-end",t):this.style.removeProperty("--scb-segmented-button-spacing-block-end")},a.ScbSegmentedButton.formAssociated=!0,a.ScbSegmentedButton.styles=m`
|
|
7638
7674
|
:host {
|
|
7639
7675
|
--scb-segmented-button-width: 100%;
|
|
7640
7676
|
--scb-segmented-button-height: 48px;
|
|
@@ -7663,7 +7699,7 @@ ${this.value}</textarea
|
|
|
7663
7699
|
::slotted([role='button']:first-child .segmented-item) {
|
|
7664
7700
|
border-left: 1px solid var(--md-sys-color-outline);
|
|
7665
7701
|
}
|
|
7666
|
-
`,Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),Qe([n({type:Array})],a.ScbSegmentedButton.prototype,"values",2),Qe([n({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"name",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"spacing",2),Qe([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbSegmentedButton.prototype,"spacingTop",2),Qe([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbSegmentedButton.prototype,"spacingBottom",2),a.ScbSegmentedButton=Qe([
|
|
7702
|
+
`,Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),Qe([n({type:Array})],a.ScbSegmentedButton.prototype,"values",2),Qe([n({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"name",2),Qe([n({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"spacing",2),Qe([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbSegmentedButton.prototype,"spacingTop",2),Qe([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbSegmentedButton.prototype,"spacingBottom",2),a.ScbSegmentedButton=Qe([g("scb-segmented-button")],a.ScbSegmentedButton);var sv=Object.defineProperty,nv=Object.getOwnPropertyDescriptor,Lt=(o,e,t,i)=>{for(var r=i>1?void 0:i?nv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&sv(e,t,r),r};a.ScbSelectOption=class extends y{constructor(){super(...arguments),this.value="",this.disabled=!1,this.showCheckbox=!1,this.checked=!1,this.showRadio=!1,this.label=""}render(){return c`
|
|
7667
7703
|
<div tabindex="0" class="item ${this.checked?"checked":""}" value=${this.value} ?disabled=${this.disabled}>
|
|
7668
7704
|
<md-ripple></md-ripple>
|
|
7669
7705
|
${this.showCheckbox?c`<md-icon class="${this.checked?"checkbox-checked":""}">${this.checked?"check_box":"check_box_outline_blank"}</md-icon>`:null}
|
|
@@ -7695,7 +7731,7 @@ ${this.value}</textarea
|
|
|
7695
7731
|
md-icon.radio-checked{
|
|
7696
7732
|
color: var(--md-sys-color-primary);
|
|
7697
7733
|
}
|
|
7698
|
-
`,Lt([n({type:String})],a.ScbSelectOption.prototype,"value",2),Lt([n({type:Boolean,reflect:!0})],a.ScbSelectOption.prototype,"disabled",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"showCheckbox",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"checked",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"showRadio",2),Lt([n({type:String})],a.ScbSelectOption.prototype,"label",2),a.ScbSelectOption=Lt([
|
|
7734
|
+
`,Lt([n({type:String})],a.ScbSelectOption.prototype,"value",2),Lt([n({type:Boolean,reflect:!0})],a.ScbSelectOption.prototype,"disabled",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"showCheckbox",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"checked",2),Lt([n({type:Boolean})],a.ScbSelectOption.prototype,"showRadio",2),Lt([n({type:String})],a.ScbSelectOption.prototype,"label",2),a.ScbSelectOption=Lt([g("scb-select-option")],a.ScbSelectOption);var lv=Object.defineProperty,cv=Object.getOwnPropertyDescriptor,Te=(o,e,t,i)=>{for(var r=i>1?void 0:i?cv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&lv(e,t,r),r};a.ScbSelect=class extends y{constructor(){super(),this._internals=null,this.focusedIndex=-1,this.variant="single-select",this.value="",this.values=[],this.disabled=!1,this.open=!1,this.label="",this.name="",this.placeholder="",this.supportingText="",this.withRadiobuttons=!1,this._onDocumentClick=e=>{if(!this.open)return;e.composedPath().includes(this)||(this.open=!1,this.removeAttribute("open"))},this._onSlotClick=e=>{var l;const t=(l=this.shadowRoot)==null?void 0:l.querySelector("slot");if(!t)return;const i=t.assignedElements({flatten:!0}).filter(h=>h.tagName.toLowerCase()==="scb-select-option"),r=e.composedPath(),s=i.find(h=>r.includes(h));s&&(this._selectOption(s),e.stopPropagation())},this._onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this._toggleOpen())},this._onOptionKeyDown=e=>{var t;if(e.key==="Enter"||e.key===" "){e.preventDefault();const i=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");if(!i)return;const r=i.assignedElements({flatten:!0}).filter(h=>h.tagName.toLowerCase()==="scb-select-option"),s=e.composedPath(),l=r.find(h=>s.includes(h));l&&this._selectOption(l)}},"attachInternals"in this&&(this._internals=this.attachInternals())}connectedCallback(){super.connectedCallback(),document.addEventListener("mousedown",this._onDocumentClick)}disconnectedCallback(){document.removeEventListener("mousedown",this._onDocumentClick),super.disconnectedCallback()}_toggleOpen(){this.disabled||(this.open=!this.open,this.open?(this.focusedIndex=0,this.requestUpdate()):this.focusedIndex=-1)}_selectOption(e){e.disabled||(this.variant==="multi-select"?(this.values.indexOf(e.value)>-1?this.values=this.values.filter(i=>i!==e.value):this.values=[...this.values,e.value],this.value=this.values.join(","),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0}))):this.variant==="single-select"&&this.withRadiobuttons?(this.value=e.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))):(this.value=e.value,this.open=!1,this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))),this._updateOptionsChecked(),this.requestUpdate())}_getSelectedLabel(){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-select-option");if(this.variant==="multi-select"){const r=t.filter(s=>this.values.includes(s.value));return r&&r.length>0?r.map(s=>s.label).join(", "):""}else{const r=t.find(s=>s.value===this.value);return r?r.label:""}}firstUpdated(){this._updateOptionsChecked(),this._internals&&this._internals.setFormValue(this.value)}updated(){this._updateOptionsChecked(),this._internals&&this._internals.setFormValue(this.value)}_updateOptionsChecked(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-select-option").forEach(r=>{this.variant==="multi-select"?(r.showCheckbox=!0,r.checked=this.values.includes(r.value),r.showRadio=!1):(r.showCheckbox=!1,r.checked=this.value===r.value,this.withRadiobuttons&&(r.showRadio=!0))})}render(){return c`
|
|
7699
7735
|
${this.label||this.supportingText?c`
|
|
7700
7736
|
<label class="select-label" id="scb-select-label-${this.name}">
|
|
7701
7737
|
${this.label?c`
|
|
@@ -7856,7 +7892,7 @@ ${this.value}</textarea
|
|
|
7856
7892
|
padding: var(--spacing-6) 52px var(--spacing-6) var(--spacing-5);
|
|
7857
7893
|
}
|
|
7858
7894
|
|
|
7859
|
-
`,Te([n({type:String})],a.ScbSelect.prototype,"variant",2),Te([n({type:String})],a.ScbSelect.prototype,"value",2),Te([n({type:Array})],a.ScbSelect.prototype,"values",2),Te([n({type:Boolean})],a.ScbSelect.prototype,"disabled",2),Te([n({type:Boolean,reflect:!0})],a.ScbSelect.prototype,"open",2),Te([n({type:String})],a.ScbSelect.prototype,"label",2),Te([n({type:String})],a.ScbSelect.prototype,"name",2),Te([n({type:String})],a.ScbSelect.prototype,"placeholder",2),Te([n({type:String,attribute:"supporting-text"})],a.ScbSelect.prototype,"supportingText",2),Te([n({type:Boolean,attribute:"with-radiobuttons"})],a.ScbSelect.prototype,"withRadiobuttons",2),a.ScbSelect=Te([
|
|
7895
|
+
`,Te([n({type:String})],a.ScbSelect.prototype,"variant",2),Te([n({type:String})],a.ScbSelect.prototype,"value",2),Te([n({type:Array})],a.ScbSelect.prototype,"values",2),Te([n({type:Boolean})],a.ScbSelect.prototype,"disabled",2),Te([n({type:Boolean,reflect:!0})],a.ScbSelect.prototype,"open",2),Te([n({type:String})],a.ScbSelect.prototype,"label",2),Te([n({type:String})],a.ScbSelect.prototype,"name",2),Te([n({type:String})],a.ScbSelect.prototype,"placeholder",2),Te([n({type:String,attribute:"supporting-text"})],a.ScbSelect.prototype,"supportingText",2),Te([n({type:Boolean,attribute:"with-radiobuttons"})],a.ScbSelect.prototype,"withRadiobuttons",2),a.ScbSelect=Te([g("scb-select")],a.ScbSelect);var dv=Object.defineProperty,hv=Object.getOwnPropertyDescriptor,Ni=(o,e,t,i)=>{for(var r=i>1?void 0:i?hv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&dv(e,t,r),r};a.ScbSkeleton=class extends y{constructor(){super(...arguments),this.variant="rectangular",this.width="100%",this.height="100%",this.borderSize="small"}render(){return this.style.setProperty("--scb-skeleton-width",this.width),this.style.setProperty("--scb-skeleton-height",this.height),this.variant==="rounded"&&this.style.setProperty("--scb-skeleton-border-size",this.borderSize==="small"?"8px":this.borderSize==="medium"?"16px":this.borderSize==="large"?"24px":"8px"),c`
|
|
7860
7896
|
<div
|
|
7861
7897
|
class="skeleton${this.variant==="circular"?" circle":""} ${this.variant==="rounded"?" rounded":""}"
|
|
7862
7898
|
><slot></slot></div>
|
|
@@ -7888,7 +7924,7 @@ ${this.value}</textarea
|
|
|
7888
7924
|
background-position: -200% 0;
|
|
7889
7925
|
}
|
|
7890
7926
|
}
|
|
7891
|
-
`,Ni([n({type:String})],a.ScbSkeleton.prototype,"variant",2),Ni([n({type:String})],a.ScbSkeleton.prototype,"width",2),Ni([n({type:String})],a.ScbSkeleton.prototype,"height",2),Ni([n({type:String,attribute:"border-size"})],a.ScbSkeleton.prototype,"borderSize",2),a.ScbSkeleton=Ni([
|
|
7927
|
+
`,Ni([n({type:String})],a.ScbSkeleton.prototype,"variant",2),Ni([n({type:String})],a.ScbSkeleton.prototype,"width",2),Ni([n({type:String})],a.ScbSkeleton.prototype,"height",2),Ni([n({type:String,attribute:"border-size"})],a.ScbSkeleton.prototype,"borderSize",2),a.ScbSkeleton=Ni([g("scb-skeleton")],a.ScbSkeleton);var pv=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?uv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&pv(e,t,r),r};a.ScbSnackbar=class extends y{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action",{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("snackbar-close",{bubbles:!0,composed:!0}))),(e.has("open")||e.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const e=!!this.actionText,t=!!this.showClose;let i="snackbar";return!e&&!t&&(i+=" no-actions"),this.withLongerAction&&(i+=" longer-action"),c`
|
|
7892
7928
|
<div class="${i}" ?hidden=${!this.open}>
|
|
7893
7929
|
${this.withLongerAction?c`
|
|
7894
7930
|
<div class="message">${this.message}</div>
|
|
@@ -8010,7 +8046,7 @@ ${this.value}</textarea
|
|
|
8010
8046
|
);
|
|
8011
8047
|
--md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
|
|
8012
8048
|
}
|
|
8013
|
-
`,ut([n({type:String})],a.ScbSnackbar.prototype,"message",2),ut([n({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),ut([n({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),ut([n({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),ut([n({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),ut([n({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),ut([n({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=ut([
|
|
8049
|
+
`,ut([n({type:String})],a.ScbSnackbar.prototype,"message",2),ut([n({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),ut([n({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),ut([n({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),ut([n({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),ut([n({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),ut([n({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=ut([g("scb-snackbar")],a.ScbSnackbar);var vv=Object.defineProperty,bv=Object.getOwnPropertyDescriptor,Dt=(o,e,t,i)=>{for(var r=i>1?void 0:i?bv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&vv(e,t,r),r};a.ScbStatusPill=class extends y{constructor(){super(...arguments),this.status="",this.label="",this.showIcon=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}__resolveSpacingToken(e){const t=(e??"").trim();return t?/^(?:[0-9]|1[0-4])$/.test(t)?`var(--spacing-${t})`:t:""}__applySpacing(){const e=this.__resolveSpacingToken(this.spacingTop||this.spacing),t=this.__resolveSpacingToken(this.spacingBottom||this.spacing);e?this.style.marginBlockStart=e:this.style.removeProperty("margin-block-start"),t?this.style.marginBlockEnd=t:this.style.removeProperty("margin-block-end")}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&this.__applySpacing()}render(){return c`
|
|
8014
8050
|
${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>`:"":""}
|
|
8015
8051
|
<span class="label">${this.label}</span>
|
|
8016
8052
|
`}},a.ScbStatusPill.styles=m`
|
|
@@ -8048,7 +8084,7 @@ ${this.value}</textarea
|
|
|
8048
8084
|
background: var(--md-sys-color-error-container);
|
|
8049
8085
|
color: var(--md-sys-color-on-error-container);
|
|
8050
8086
|
}
|
|
8051
|
-
`,Dt([n({type:String})],a.ScbStatusPill.prototype,"status",2),Dt([n({type:String})],a.ScbStatusPill.prototype,"label",2),Dt([n({type:Boolean,attribute:"show-icon"})],a.ScbStatusPill.prototype,"showIcon",2),Dt([n({type:String})],a.ScbStatusPill.prototype,"spacing",2),Dt([n({type:String,attribute:"spacing-top"})],a.ScbStatusPill.prototype,"spacingTop",2),Dt([n({type:String,attribute:"spacing-bottom"})],a.ScbStatusPill.prototype,"spacingBottom",2),a.ScbStatusPill=Dt([
|
|
8087
|
+
`,Dt([n({type:String})],a.ScbStatusPill.prototype,"status",2),Dt([n({type:String})],a.ScbStatusPill.prototype,"label",2),Dt([n({type:Boolean,attribute:"show-icon"})],a.ScbStatusPill.prototype,"showIcon",2),Dt([n({type:String})],a.ScbStatusPill.prototype,"spacing",2),Dt([n({type:String,attribute:"spacing-top"})],a.ScbStatusPill.prototype,"spacingTop",2),Dt([n({type:String,attribute:"spacing-bottom"})],a.ScbStatusPill.prototype,"spacingBottom",2),a.ScbStatusPill=Dt([g("scb-status-pill")],a.ScbStatusPill);var mv=Object.defineProperty,fv=Object.getOwnPropertyDescriptor,Ae=(o,e,t,i)=>{for(var r=i>1?void 0:i?fv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&mv(e,t,r),r};a.ScbStep=class extends y{constructor(){super(...arguments),this.label="",this.subLabel="",this.symbolVariant="number",this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant="horizontal",this.icon=""}updated(){!this.subLabel||this.subLabel.trim()===""?this.setAttribute("no-content",""):this.removeAttribute("no-content")}handleKeyDown(e){e.key==="Enter"||e.key===" "?(e.preventDefault(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0}))):(e.key==="ArrowRight"||e.key==="ArrowLeft")&&(this.dispatchEvent(new CustomEvent("scb-stepper-keynav",{detail:{key:e.key},bubbles:!0,composed:!0})),e.preventDefault())}render(){const e=this.active?"step":void 0,t=this.label?`${this.label}${this.subLabel?": "+this.subLabel:""}`:void 0;switch(this.symbolVariant){case"icon":return c`
|
|
8052
8088
|
<div
|
|
8053
8089
|
class="scb-step-content"
|
|
8054
8090
|
tabindex="0"
|
|
@@ -8212,7 +8248,7 @@ ${this.value}</textarea
|
|
|
8212
8248
|
}
|
|
8213
8249
|
}
|
|
8214
8250
|
|
|
8215
|
-
`,Ae([n({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),Ae([n({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),Ae([n({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),Ae([n({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),Ae([n({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),Ae([n({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),Ae([n({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=Ae([
|
|
8251
|
+
`,Ae([n({type:String,reflect:!0})],a.ScbStep.prototype,"label",2),Ae([n({type:String,reflect:!0,attribute:"sub-label"})],a.ScbStep.prototype,"subLabel",2),Ae([n({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStep.prototype,"symbolVariant",2),Ae([n({type:Number,reflect:!0})],a.ScbStep.prototype,"number",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"active",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"completed",2),Ae([n({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStep.prototype,"changeOnCompleted",2),Ae([n({type:Boolean,reflect:!0})],a.ScbStep.prototype,"islast",2),Ae([n({type:String,reflect:!0})],a.ScbStep.prototype,"variant",2),Ae([n({type:String})],a.ScbStep.prototype,"icon",2),a.ScbStep=Ae([g("scb-step")],a.ScbStep);var gv=Object.defineProperty,yv=Object.getOwnPropertyDescriptor,_l=o=>{throw TypeError(o)},Be=(o,e,t,i)=>{for(var r=i>1?void 0:i?yv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&gv(e,t,r),r},_v=(o,e,t)=>e.has(o)||_l("Cannot "+t),xv=(o,e,t)=>e.has(o)?_l("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Vi=(o,e,t)=>(_v(o,e,"access private method"),t),Bt,os,po;a.ScbStepper=class extends y{constructor(){super(...arguments),xv(this,Bt),this.type="",this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.spacing="",this.spacingTop="",this.spacingBottom="",this.activeIndex=0,this._onKeyNav=e=>{const t=this._getSteps(),i=this.activeIndex;let r=i;e.detail.key==="ArrowRight"?i<t.length-1?r=i+1:r=0:e.detail.key==="ArrowLeft"&&(i>0?r=i-1:r=t.length-1),r!==i&&(this._onStepClick(r),setTimeout(()=>{var l;const s=(l=t[r].shadowRoot)==null?void 0:l.querySelector(".scb-step-content");s&&"focus"in s&&typeof s.focus=="function"&&s.focus()},0))},this._onStepContainerClick=e=>{const t=this._getSteps(),i=e.composedPath(),r=t.findIndex(s=>i.includes(s));r!==-1&&this._onStepClick(r)}}_onStepClick(e){const t=this.activeIndex;this.activeIndex=e,this._updateSteps(),this.dispatchEvent(new CustomEvent("scb-step-change",{detail:{index:this.activeIndex,step:this._getSteps()[this.activeIndex]},bubbles:!0,composed:!0})),e>t?this.dispatchEvent(new CustomEvent("scb-step-next",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0})):e<t&&this.dispatchEvent(new CustomEvent("scb-step-prev",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0}))}nextStep(){const e=this._getSteps();this.activeIndex<e.length-1&&this._onStepClick(this.activeIndex+1)}prevStep(){this.activeIndex>0&&this._onStepClick(this.activeIndex-1)}getActiveIndex(){return this.activeIndex}_updateSteps(){const e=this._getSteps();e.forEach((t,i)=>{t.active=i===this.activeIndex,t.completed=i<this.activeIndex,t.islast=!1,t.changeOnCompleted=this.changeOnCompleted,t.number=i+1,t.variant=this.variant,t.symbolVariant=this.symbolVariant}),e.length>0&&(e[e.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(e){this._updateSteps(),Vi(this,Bt,os).call(this)}updated(e){this._updateSteps(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Vi(this,Bt,os).call(this)}render(){return c`
|
|
8216
8252
|
<div
|
|
8217
8253
|
class="steps"
|
|
8218
8254
|
role="list"
|
|
@@ -8222,7 +8258,7 @@ ${this.value}</textarea
|
|
|
8222
8258
|
>
|
|
8223
8259
|
<slot></slot>
|
|
8224
8260
|
</div>
|
|
8225
|
-
`}},
|
|
8261
|
+
`}},Bt=new WeakSet,os=function(){const o=Vi(this,Bt,po).call(this,this.spacing),e=Vi(this,Bt,po).call(this,this.spacingTop)??o,t=Vi(this,Bt,po).call(this,this.spacingBottom)??o;e?this.style.setProperty("--scb-stepper-spacing-block-start",e):this.style.removeProperty("--scb-stepper-spacing-block-start"),t?this.style.setProperty("--scb-stepper-spacing-block-end",t):this.style.removeProperty("--scb-stepper-spacing-block-end")},po=function(o){if(!o)return;const e=String(o).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e},a.ScbStepper.styles=m`
|
|
8226
8262
|
:host {
|
|
8227
8263
|
--scb-stepper-width: 100%;
|
|
8228
8264
|
--scb-stepper-height: 100%;
|
|
@@ -8297,17 +8333,17 @@ ${this.value}</textarea
|
|
|
8297
8333
|
::slotted(scb-step[symbol-variant='marker']:not(:first-child))::before {
|
|
8298
8334
|
top: 20px;
|
|
8299
8335
|
}
|
|
8300
|
-
`,
|
|
8336
|
+
`,Be([n({type:String,reflect:!0})],a.ScbStepper.prototype,"type",2),Be([n({type:String,reflect:!0})],a.ScbStepper.prototype,"label",2),Be([n({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.ScbStepper.prototype,"changeOnCompleted",2),Be([n({type:String})],a.ScbStepper.prototype,"variant",2),Be([n({type:String,reflect:!0,attribute:"symbol-variant"})],a.ScbStepper.prototype,"symbolVariant",2),Be([n({type:String,reflect:!0})],a.ScbStepper.prototype,"spacing",2),Be([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbStepper.prototype,"spacingTop",2),Be([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbStepper.prototype,"spacingBottom",2),Be([w()],a.ScbStepper.prototype,"activeIndex",2),a.ScbStepper=Be([g("scb-stepper")],a.ScbStepper);var wv=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,uo=(o,e,t,i)=>{for(var r=i>1?void 0:i?Sv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&wv(e,t,r),r};a.ScbPrimaryTab=class extends xi{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)}}updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e==null||e.remove();return}if(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=[...xi.styles,m`
|
|
8301
8337
|
/* Icon-only: dölj textslot */
|
|
8302
8338
|
:host([icon-only]) slot:not([name='icon']) {
|
|
8303
8339
|
display: none;
|
|
8304
8340
|
}
|
|
8305
|
-
`],uo([n({type:String})],a.ScbPrimaryTab.prototype,"icon",1),uo([n({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbPrimaryTab.prototype,"iconOnly",2),uo([n({type:Boolean,reflect:!0,attribute:"inline-icon"})],a.ScbPrimaryTab.prototype,"inlineIcon",2),a.ScbPrimaryTab=uo([
|
|
8341
|
+
`],uo([n({type:String})],a.ScbPrimaryTab.prototype,"icon",1),uo([n({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbPrimaryTab.prototype,"iconOnly",2),uo([n({type:Boolean,reflect:!0,attribute:"inline-icon"})],a.ScbPrimaryTab.prototype,"inlineIcon",2),a.ScbPrimaryTab=uo([g("scb-primary-tab")],a.ScbPrimaryTab);var kv=Object.defineProperty,$v=Object.getOwnPropertyDescriptor,as=(o,e,t,i)=>{for(var r=i>1?void 0:i?$v(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&kv(e,t,r),r};a.ScbSecondaryTab=class extends wi{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)}}updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e==null||e.remove();return}if(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=[...wi.styles,m`
|
|
8306
8342
|
/* Icon-only: göm all text utom slot="icon" */
|
|
8307
8343
|
:host([icon-only]) slot:not([name='icon']) {
|
|
8308
8344
|
display: none;
|
|
8309
8345
|
}
|
|
8310
|
-
`],as([n({type:String})],a.ScbSecondaryTab.prototype,"icon",1),as([n({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=as([
|
|
8346
|
+
`],as([n({type:String})],a.ScbSecondaryTab.prototype,"icon",1),as([n({type:Boolean,reflect:!0,attribute:"icon-only"})],a.ScbSecondaryTab.prototype,"iconOnly",2),a.ScbSecondaryTab=as([g("scb-secondary-tab")],a.ScbSecondaryTab);var Cv=Object.defineProperty,Ev=Object.getOwnPropertyDescriptor,xl=o=>{throw TypeError(o)},qi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ev(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Cv(e,t,r),r},Tv=(o,e,t)=>e.has(o)||xl("Cannot "+t),Av=(o,e,t)=>e.has(o)?xl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ui=(o,e,t)=>(Tv(o,e,"access private method"),t),Rt,ss,vo;a.ScbTabs=class extends Si{constructor(){super(...arguments),Av(this,Rt),this.ariaLabel="",this.spacing="",this.spacingTop="",this.spacingBottom="",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),Ui(this,Rt,ss).call(this)}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Ui(this,Rt,ss).call(this)}},Rt=new WeakSet,ss=function(){const o=Ui(this,Rt,vo).call(this,this.spacing),e=Ui(this,Rt,vo).call(this,this.spacingTop)??o,t=Ui(this,Rt,vo).call(this,this.spacingBottom)??o;e?this.style.setProperty("--scb-tabs-spacing-block-start",e):this.style.removeProperty("--scb-tabs-spacing-block-start"),t?this.style.setProperty("--scb-tabs-spacing-block-end",t):this.style.removeProperty("--scb-tabs-spacing-block-end")},vo=function(o){if(!o)return;const e=String(o).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e},a.ScbTabs.styles=[...Si.styles,m`
|
|
8311
8347
|
:host {
|
|
8312
8348
|
/*Containerfärg */
|
|
8313
8349
|
--md-primary-tab-container-color: var(--md-sys-color-surface);
|
|
@@ -8332,50 +8368,85 @@ ${this.value}</textarea
|
|
|
8332
8368
|
margin-block-start: var(--scb-tabs-spacing-block-start, 0);
|
|
8333
8369
|
margin-block-end: var(--scb-tabs-spacing-block-end, 0);
|
|
8334
8370
|
}
|
|
8335
|
-
`],qi([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbTabs.prototype,"ariaLabel",2),qi([n({type:String,reflect:!0})],a.ScbTabs.prototype,"spacing",2),qi([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbTabs.prototype,"spacingTop",2),qi([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbTabs.prototype,"spacingBottom",2),a.ScbTabs=qi([
|
|
8336
|
-
<div
|
|
8337
|
-
class="scb-toc-item"
|
|
8338
|
-
role="listitem"
|
|
8339
|
-
aria-expanded=${this.expanded}
|
|
8340
|
-
aria-controls=${e}
|
|
8341
|
-
>
|
|
8371
|
+
`],qi([n({type:String,reflect:!0,attribute:"aria-label"})],a.ScbTabs.prototype,"ariaLabel",2),qi([n({type:String,reflect:!0})],a.ScbTabs.prototype,"spacing",2),qi([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbTabs.prototype,"spacingTop",2),qi([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbTabs.prototype,"spacingBottom",2),a.ScbTabs=qi([g("scb-tabs")],a.ScbTabs);var zv=Object.defineProperty,Iv=Object.getOwnPropertyDescriptor,ri=(o,e,t,i)=>{for(var r=i>1?void 0:i?Iv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&zv(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=a.ScbTocItem._uid(),this._overflowVisibleTimer=null,this._slotHasContent=!1,this._onSlotChange=()=>{const e=this.renderRoot.querySelector("slot"),t=!!e&&e.assignedElements({flatten:!0}).length>0;this._slotHasContent!==t&&(this._slotHasContent=t,this.requestUpdate()),!this._slotHasContent&&this.expanded&&(this.expanded=!1),this._applyInertByExpanded()},this._toggleAccordion=()=>{if(!this._slotHasContent)return;const e=!this.expanded;e&&this._collapseSiblingsIfNeeded(),this.expanded=e},this._onKeyDown=e=>{var p;const t=this.closest("scb-toc"),r=Array.from((t==null?void 0:t.querySelectorAll("scb-toc-item"))||[]).map(v=>({host:v,label:v.renderRoot.querySelector(".toc-item-label")||null})).filter(v=>!!v.label),s=r.findIndex(v=>v.host===this);if(s<0)return;const l=e.currentTarget,h=((p=l==null?void 0:l.classList)==null?void 0:p.contains("toc-chevron-button"))??!1;switch(e.key){case"Enter":case" ":if(!h)return;e.preventDefault(),this._toggleAccordion();break;case"ArrowDown":e.preventDefault(),s<r.length-1&&r[s+1].label.focus();break;case"ArrowUp":e.preventDefault(),s>0&&r[s-1].label.focus();break;case"Home":e.preventDefault(),r.length&&r[0].label.focus();break;case"End":e.preventDefault(),r.length&&r[r.length-1].label.focus();break}}}static _uid(){var e,t;return((t=(e=globalThis.crypto)==null?void 0:e.randomUUID)==null?void 0:t.call(e))??`${a.ScbTocItem._uidPrefix}-${++a.ScbTocItem._uidSeq}`}firstUpdated(){this._onSlotChange(),this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded()}updated(e){e.has("expanded")&&(this._applyInertByExpanded(),this._syncOverflowVisibilityByExpanded(),this.dispatchEvent(new CustomEvent("expanded-changed",{detail:{expanded:this.expanded,label:this.label},bubbles:!0,composed:!0})))}disconnectedCallback(){super.disconnectedCallback(),this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null)}_applyInertByExpanded(){const e=this.renderRoot.querySelector(".scb-toc-item-bottom");e&&(this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_syncOverflowVisibilityByExpanded(){if(this._overflowVisibleTimer!==null&&(window.clearTimeout(this._overflowVisibleTimer),this._overflowVisibleTimer=null),this.removeAttribute("data-expanded-settled"),!this.expanded)return;const e=this.renderRoot.querySelector(".scb-toc-item-bottom");if(!e){this.setAttribute("data-expanded-settled","");return}const t=this._getTransitionMs(e);if(t<=0){this.setAttribute("data-expanded-settled","");return}this._overflowVisibleTimer=window.setTimeout(()=>{this._overflowVisibleTimer=null,this.expanded&&this.setAttribute("data-expanded-settled","")},t)}_getTransitionMs(e){const t=getComputedStyle(e),i=t.transitionDuration.split(",").map(p=>p.trim()),r=t.transitionDelay.split(",").map(p=>p.trim()),s=p=>{const v=parseFloat(p);return Number.isFinite(v)?p.endsWith("ms")?v:p.endsWith("s")?v*1e3:v:0},l=Math.max(i.length,r.length);let h=0;for(let p=0;p<l;p+=1){const v=s(i[p]??i[i.length-1]??"0s"),f=s(r[p]??r[r.length-1]??"0s");h=Math.max(h,v+f)}return Math.ceil(h)}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const e=this.renderRoot.querySelector("slot");if(!e)return[];const t=e.assignedElements({flatten:!0}),i=[],r=s=>{s instanceof HTMLElement&&s.matches("a,button,input,select,textarea,[tabindex]")&&i.push(s)};return t.forEach(s=>{var l;r(s),(l=s.querySelectorAll)==null||l.call(s,"a,button,input,select,textarea,[tabindex]").forEach(h=>r(h))}),i}_removeTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const i=t.getAttribute("tabindex");i!==null&&t.setAttribute("data-scb-prev-tabindex",i),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const i=t.getAttribute("data-scb-prev-tabindex");i!==null?(t.setAttribute("tabindex",i),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}_collapseSiblingsIfNeeded(){const e=this.closest("scb-toc");if(!e||e.hasAttribute("detached"))return;e.querySelectorAll("scb-toc-item").forEach(i=>{i!==this&&i.expanded&&(i.expanded=!1)})}render(){const e=`bottom-${this._unique}`,t=`toc-label-${this._unique}`,i=`toc-chevron-${this._unique}`;return c`
|
|
8372
|
+
<div class="scb-toc-item" role="listitem">
|
|
8342
8373
|
<div class="scb-toc-item-top">
|
|
8343
8374
|
<div>
|
|
8344
8375
|
<div class="toc-item-label-wrapper">
|
|
8345
|
-
<a
|
|
8376
|
+
<a
|
|
8377
|
+
id=${t}
|
|
8378
|
+
class="toc-item-label"
|
|
8379
|
+
href=${this.itemHref}
|
|
8380
|
+
@keydown=${this._onKeyDown}
|
|
8381
|
+
>
|
|
8382
|
+
${this.label}
|
|
8383
|
+
</a>
|
|
8346
8384
|
<md-focus-ring for=${t} inward></md-focus-ring>
|
|
8347
8385
|
</div>
|
|
8348
8386
|
<div class="supporting-text">${this.supportingText}</div>
|
|
8349
8387
|
</div>
|
|
8388
|
+
|
|
8350
8389
|
${this._slotHasContent?c`
|
|
8351
|
-
<
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8390
|
+
<div class="toc-chevron-button-wrapper">
|
|
8391
|
+
<button
|
|
8392
|
+
id=${i}
|
|
8393
|
+
class="toc-chevron-button"
|
|
8394
|
+
type="button"
|
|
8395
|
+
aria-label=${this.expanded?"Fäll ihop avsnitt":"Fäll ut avsnitt"}
|
|
8396
|
+
aria-expanded=${this.expanded?"true":"false"}
|
|
8397
|
+
aria-controls=${e}
|
|
8398
|
+
@click=${this._toggleAccordion}
|
|
8399
|
+
@keydown=${this._onKeyDown}
|
|
8400
|
+
>
|
|
8401
|
+
<md-ripple></md-ripple>
|
|
8402
|
+
<md-icon class="toc-chevron-icon" aria-hidden="true">expand_more</md-icon>
|
|
8403
|
+
</button>
|
|
8404
|
+
<md-focus-ring for=${i} inward></md-focus-ring>
|
|
8405
|
+
</div>
|
|
8357
8406
|
`:""}
|
|
8358
8407
|
</div>
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
class="
|
|
8362
|
-
|
|
8363
|
-
|
|
8408
|
+
|
|
8409
|
+
<div id=${e} class="scb-toc-item-bottom" role="region" aria-labelledby=${t}>
|
|
8410
|
+
<div class="bottom-inner">
|
|
8411
|
+
<slot @slotchange=${this._onSlotChange}></slot>
|
|
8412
|
+
</div>
|
|
8364
8413
|
</div>
|
|
8414
|
+
|
|
8365
8415
|
${this.divider?c`<scb-divider></scb-divider>`:""}
|
|
8366
8416
|
</div>
|
|
8367
|
-
`}},a.ScbTocItem.styles=[m`
|
|
8417
|
+
`}},a.ScbTocItem._uidPrefix=`uid-${Math.random().toString(36).slice(2)}`,a.ScbTocItem._uidSeq=0,a.ScbTocItem.styles=[m`
|
|
8418
|
+
:host {
|
|
8419
|
+
display: block;
|
|
8420
|
+
--scb-toc-transition-duration: var(--motion-duration-medium, 150ms);
|
|
8421
|
+
--scb-toc-transition-easing: var(
|
|
8422
|
+
--motion-easing-emphasized-accelerate,
|
|
8423
|
+
var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98))
|
|
8424
|
+
);
|
|
8425
|
+
--scb-toc-panel-padding-closed: var(--spacing-0, 0px);
|
|
8426
|
+
color: var(--md-sys-color-on-surface);
|
|
8427
|
+
font-family: var(--brand-font, 'Inter', sans-serif);
|
|
8428
|
+
}
|
|
8429
|
+
|
|
8430
|
+
:host([expanded]) {
|
|
8431
|
+
--scb-toc-transition-easing: var(
|
|
8432
|
+
--motion-easing-emphasized-decelerate,
|
|
8433
|
+
var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98))
|
|
8434
|
+
);
|
|
8435
|
+
}
|
|
8436
|
+
|
|
8368
8437
|
.scb-toc-item-top {
|
|
8369
|
-
padding: var(--spacing-5) var(--spacing-3);
|
|
8438
|
+
padding: var(--spacing-5, 16px) var(--spacing-3, 8px);
|
|
8370
8439
|
display: flex;
|
|
8371
|
-
gap: var(--spacing-5);
|
|
8440
|
+
gap: var(--spacing-5, 16px);
|
|
8372
8441
|
flex-direction: row;
|
|
8373
8442
|
}
|
|
8443
|
+
|
|
8374
8444
|
.toc-item-label-wrapper {
|
|
8375
8445
|
position: relative;
|
|
8376
8446
|
display: block;
|
|
8377
8447
|
width: fit-content;
|
|
8378
8448
|
}
|
|
8449
|
+
|
|
8379
8450
|
.toc-item-label {
|
|
8380
8451
|
display: block;
|
|
8381
8452
|
width: fit-content;
|
|
@@ -8386,52 +8457,136 @@ ${this.value}</textarea
|
|
|
8386
8457
|
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
8387
8458
|
text-decoration: underline;
|
|
8388
8459
|
text-decoration-thickness: 1px;
|
|
8389
|
-
text-underline-offset: .1578em;
|
|
8390
|
-
margin-bottom: var(--spacing-3);
|
|
8460
|
+
text-underline-offset: 0.1578em;
|
|
8461
|
+
margin-bottom: var(--spacing-3, 8px);
|
|
8391
8462
|
}
|
|
8463
|
+
|
|
8392
8464
|
.toc-item-label:hover {
|
|
8393
8465
|
color: var(--md-sys-color-on-surface);
|
|
8394
8466
|
text-decoration-thickness: 2px;
|
|
8395
8467
|
}
|
|
8468
|
+
|
|
8396
8469
|
.toc-item-label:focus {
|
|
8397
8470
|
color: var(--md-sys-color-on-surface);
|
|
8398
8471
|
outline: none;
|
|
8399
|
-
|
|
8400
8472
|
}
|
|
8473
|
+
|
|
8401
8474
|
.toc-item-label-wrapper md-focus-ring {
|
|
8402
8475
|
position: absolute;
|
|
8403
8476
|
pointer-events: none;
|
|
8404
|
-
border-radius: var(--md-sys-shape-corner-small);
|
|
8477
|
+
border-radius: var(--md-sys-shape-corner-small, 8px);
|
|
8405
8478
|
--md-focus-ring-inward-offset: -7px;
|
|
8406
8479
|
}
|
|
8407
|
-
|
|
8480
|
+
|
|
8481
|
+
.supporting-text {
|
|
8482
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
8483
|
+
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
8484
|
+
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
|
8485
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
8486
|
+
}
|
|
8487
|
+
|
|
8488
|
+
.toc-chevron-button-wrapper {
|
|
8489
|
+
position: relative;
|
|
8408
8490
|
margin-left: auto;
|
|
8491
|
+
display: flex;
|
|
8492
|
+
align-items: flex-start;
|
|
8493
|
+
}
|
|
8494
|
+
|
|
8495
|
+
.toc-chevron-button {
|
|
8496
|
+
position: relative;
|
|
8497
|
+
display: inline-flex;
|
|
8498
|
+
align-items: center;
|
|
8499
|
+
justify-content: center;
|
|
8500
|
+
inline-size: 40px;
|
|
8501
|
+
block-size: 40px;
|
|
8502
|
+
padding: 0;
|
|
8503
|
+
border: 0;
|
|
8504
|
+
background: transparent;
|
|
8505
|
+
border-radius: 999px;
|
|
8506
|
+
cursor: pointer;
|
|
8507
|
+
color: inherit;
|
|
8508
|
+
-webkit-tap-highlight-color: transparent;
|
|
8509
|
+
}
|
|
8510
|
+
|
|
8511
|
+
.toc-chevron-button:focus {
|
|
8512
|
+
outline: none;
|
|
8513
|
+
}
|
|
8514
|
+
|
|
8515
|
+
.toc-chevron-button md-ripple {
|
|
8516
|
+
border-radius: inherit;
|
|
8517
|
+
}
|
|
8518
|
+
|
|
8519
|
+
.toc-chevron-button-wrapper md-focus-ring {
|
|
8520
|
+
position: absolute;
|
|
8521
|
+
inset: 0;
|
|
8522
|
+
pointer-events: none;
|
|
8523
|
+
border-radius: 999px;
|
|
8524
|
+
--md-focus-ring-inward-offset: -7px;
|
|
8525
|
+
height: var(--icon-size-large, 40px);
|
|
8526
|
+
}
|
|
8527
|
+
|
|
8528
|
+
.toc-chevron-icon {
|
|
8529
|
+
transform: rotate(0deg);
|
|
8530
|
+
transition: transform var(--motion-duration-medium, var(--scb-toc-transition-duration))
|
|
8531
|
+
var(--motion-easing-standard, var(--scb-toc-transition-easing));
|
|
8532
|
+
}
|
|
8533
|
+
|
|
8534
|
+
:host([expanded]) .toc-chevron-icon {
|
|
8535
|
+
transform: rotate(180deg);
|
|
8409
8536
|
}
|
|
8537
|
+
|
|
8410
8538
|
scb-divider {
|
|
8411
|
-
margin: var(--spacing-0) var(--spacing-3);
|
|
8539
|
+
margin: var(--spacing-0, 0px) var(--spacing-3, 8px);
|
|
8412
8540
|
}
|
|
8541
|
+
|
|
8542
|
+
/* Animerar panelen utan JS genom grid-template-rows 0fr till 1fr */
|
|
8413
8543
|
.scb-toc-item-bottom {
|
|
8544
|
+
display: grid;
|
|
8545
|
+
grid-template-rows: 0fr;
|
|
8546
|
+
transition:
|
|
8547
|
+
grid-template-rows var(--scb-toc-transition-duration) var(--scb-toc-transition-easing),
|
|
8548
|
+
opacity var(--scb-toc-transition-duration) var(--scb-toc-transition-easing),
|
|
8549
|
+
padding var(--scb-toc-transition-duration) var(--scb-toc-transition-easing);
|
|
8550
|
+
opacity: 0;
|
|
8551
|
+
overflow: hidden;
|
|
8552
|
+
padding-top: var(--spacing-0, 0px);
|
|
8553
|
+
padding-right: var(--spacing-5, 16px);
|
|
8554
|
+
padding-bottom: var(--scb-toc-panel-padding-closed);
|
|
8555
|
+
padding-left: var(--spacing-9, 32px);
|
|
8414
8556
|
font-size: var(--md-sys-typescale-body-medium-size);
|
|
8415
8557
|
line-height: var(--md-sys-typescale-body-medium-line-height); /* 150% */
|
|
8416
8558
|
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
|
8417
8559
|
}
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8560
|
+
|
|
8561
|
+
:host([expanded]) .scb-toc-item-bottom {
|
|
8562
|
+
grid-template-rows: 1fr;
|
|
8563
|
+
opacity: 1;
|
|
8564
|
+
padding-bottom: var(--spacing-5, 16px);
|
|
8565
|
+
}
|
|
8566
|
+
|
|
8567
|
+
.bottom-inner {
|
|
8421
8568
|
overflow: hidden;
|
|
8422
|
-
transition: .15s cubic-bezier(.69,.16,.2,.98);
|
|
8423
|
-
opacity: var(--spacing-0);
|
|
8424
8569
|
}
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
max-height: 100%;
|
|
8570
|
+
|
|
8571
|
+
:host([expanded][data-expanded-settled]) .scb-toc-item-bottom {
|
|
8572
|
+
overflow: visible;
|
|
8429
8573
|
}
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8574
|
+
|
|
8575
|
+
:host([expanded][data-expanded-settled]) .bottom-inner {
|
|
8576
|
+
overflow: visible;
|
|
8577
|
+
}
|
|
8578
|
+
|
|
8579
|
+
@media (prefers-reduced-motion: reduce) {
|
|
8580
|
+
.scb-toc-item-bottom,
|
|
8581
|
+
.toc-chevron-icon {
|
|
8582
|
+
transition: none;
|
|
8583
|
+
}
|
|
8584
|
+
|
|
8585
|
+
md-ripple {
|
|
8586
|
+
display: none;
|
|
8587
|
+
}
|
|
8433
8588
|
}
|
|
8434
|
-
`],ri([n({type:Boolean})],a.ScbTocItem.prototype,"expanded",2),ri([n({type:String,reflect:!0})],a.ScbTocItem.prototype,"label",2),ri([n({type:String,attribute:"supporting-text"})],a.ScbTocItem.prototype,"supportingText",2),ri([n({type:String,attribute:"item-href"})],a.ScbTocItem.prototype,"itemHref",2),ri([n({type:Boolean,attribute:"divider"})],a.ScbTocItem.prototype,"divider",2),a.ScbTocItem=ri([
|
|
8589
|
+
`],ri([n({type:Boolean,reflect:!0})],a.ScbTocItem.prototype,"expanded",2),ri([n({type:String,reflect:!0})],a.ScbTocItem.prototype,"label",2),ri([n({type:String,attribute:"supporting-text"})],a.ScbTocItem.prototype,"supportingText",2),ri([n({type:String,attribute:"item-href"})],a.ScbTocItem.prototype,"itemHref",2),ri([n({type:Boolean,attribute:"divider"})],a.ScbTocItem.prototype,"divider",2),a.ScbTocItem=ri([g("scb-toc-item")],a.ScbTocItem);var Pv=Object.defineProperty,Ov=Object.getOwnPropertyDescriptor,wl=o=>{throw TypeError(o)},Wi=(o,e,t,i)=>{for(var r=i>1?void 0:i?Ov(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Pv(e,t,r),r},Lv=(o,e,t)=>e.has(o)||wl("Cannot "+t),Dv=(o,e,t)=>e.has(o)?wl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ji=(o,e,t)=>(Lv(o,e,"access private method"),t),Mt,ns,bo;a.ScbToc=class extends y{constructor(){super(...arguments),Dv(this,Mt),this.detached=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}firstUpdated(e){ji(this,Mt,ns).call(this)}updated(e){super.updated(e),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&ji(this,Mt,ns).call(this)}render(){return c`
|
|
8435
8590
|
<div class="scb-toc-list" role="list">
|
|
8436
8591
|
<slot></slot>
|
|
8437
8592
|
</div>
|
|
@@ -8446,7 +8601,7 @@ ${this.value}</textarea
|
|
|
8446
8601
|
.scb-toc-list {
|
|
8447
8602
|
display: block;
|
|
8448
8603
|
}
|
|
8449
|
-
`],Wi([n({type:Boolean,reflect:!0})],a.ScbToc.prototype,"detached",2),Wi([n({type:String,reflect:!0})],a.ScbToc.prototype,"spacing",2),Wi([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbToc.prototype,"spacingTop",2),Wi([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbToc.prototype,"spacingBottom",2),a.ScbToc=Wi([
|
|
8604
|
+
`],Wi([n({type:Boolean,reflect:!0})],a.ScbToc.prototype,"detached",2),Wi([n({type:String,reflect:!0})],a.ScbToc.prototype,"spacing",2),Wi([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbToc.prototype,"spacingTop",2),Wi([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbToc.prototype,"spacingBottom",2),a.ScbToc=Wi([g("scb-toc")],a.ScbToc);var Bv=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,Re=(o,e,t,i)=>{for(var r=i>1?void 0:i?Rv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Bv(e,t,r),r};let Mv=0;a.ScbTooltip=class extends y{constructor(){super(...arguments),this.variant="plain",this.arrow=null,this.supportingtext="",this.label="",this.trigger="hover",this.position="top",this.open=!1,this.delay=.25,this.offset=0,this._hoverActive=!1,this._clickActive=!1,this._hideTimeout=null,this._triggerEl=null,this._originalPosition="top",this._tooltipId=`scb-tooltip-${++Mv}`,this._onTriggerMouseEnter=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerMouseLeave=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTriggerFocus=()=>{this._hoverActive=!0,this.open=!0},this._onTriggerBlur=()=>{this._hoverActive=!1,this._clickActive||(this.open=!1)},this._onTooltipMouseEnter=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!0,this.open=!0)},this._onTooltipMouseLeave=()=>{(this.trigger==="hover"||this.trigger==="hover-click")&&(this._hoverActive=!1,this._clickActive||(this.open=!1))},this._onTriggerClick=()=>{this._clickActive=!this._clickActive,this._clickActive?this.open=!0:this._hoverActive||(this.open=!1)}}firstUpdated(){if(this._originalPosition=this.position,this._updateDelayCss(),this._updateTriggerElement(),this._updateTooltipHoverListeners(),this.open){const e=this._getTooltipElement();e&&this._showTooltip(e)}}updated(e){if(e.has("trigger")&&(this._updateTriggerElement(),this._updateTooltipHoverListeners()),e.has("delay")&&this._updateDelayCss(),e.has("open")){const t=this._getTooltipElement();if(!t)return;this.open?this._showTooltip(t):this._hideTooltip(t)}}disconnectedCallback(){super.disconnectedCallback(),this._detachTriggerListeners();const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave)),this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null)}_getTooltipElement(){return this.renderRoot.querySelector(".scb-tooltip")}_updateDelayCss(){const e=Number.isFinite(this.delay)?this.delay:.25;this.style.setProperty("--delay",`${e}s`)}_findTriggerElement(){const e=this.querySelector("[scb-tooltip-anchor]:not([slot])");return e||(Array.from(this.children).find(i=>i.nodeType===Node.ELEMENT_NODE)??null)}_updateTriggerElement(){const e=this._triggerEl;e&&(this._detachTriggerListeners(),e.removeAttribute("aria-describedby"));const t=this._findTriggerElement();this._triggerEl=t,t&&(t.setAttribute("aria-describedby",this._tooltipId),(this.trigger==="click"||this.trigger==="hover-click")&&t.addEventListener("click",this._onTriggerClick),(this.trigger==="hover"||this.trigger==="hover-click")&&(t.addEventListener("mouseenter",this._onTriggerMouseEnter),t.addEventListener("mouseleave",this._onTriggerMouseLeave),t.addEventListener("focus",this._onTriggerFocus),t.addEventListener("blur",this._onTriggerBlur)))}_updateTooltipHoverListeners(){const e=this._getTooltipElement();e&&(e.removeEventListener("mouseenter",this._onTooltipMouseEnter),e.removeEventListener("mouseleave",this._onTooltipMouseLeave),(this.trigger==="hover"||this.trigger==="hover-click")&&(e.addEventListener("mouseenter",this._onTooltipMouseEnter),e.addEventListener("mouseleave",this._onTooltipMouseLeave)))}_detachTriggerListeners(){const e=this._triggerEl;e&&(e.removeEventListener("click",this._onTriggerClick),e.removeEventListener("mouseenter",this._onTriggerMouseEnter),e.removeEventListener("mouseleave",this._onTriggerMouseLeave),e.removeEventListener("focus",this._onTriggerFocus),e.removeEventListener("blur",this._onTriggerBlur))}_showTooltip(e){this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null);const t=this._triggerEl;this._resetPosition(),e.classList.remove("hidden"),e.setAttribute("aria-hidden","false"),requestAnimationFrame(()=>{t&&this._positionTooltip(e,t),e.setAttribute("open","")})}_hideTooltip(e){e.removeAttribute("open"),e.setAttribute("aria-hidden","true"),this._scheduleHidden(e)}_scheduleHidden(e){const t=(Number.isFinite(this.delay)?this.delay:.25)*1e3;if(t<=0){e.classList.add("hidden");return}this._hideTimeout=window.setTimeout(()=>{e.classList.add("hidden"),this._hideTimeout=null},t)}_resetPosition(){this.position=this._originalPosition}_positionTooltip(e,t){const i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.getBoundingClientRect(),p=(this.offset??0)+8,v=8,f=v,b=window.innerHeight-v,_=v,x=window.innerWidth-v,S=V=>V>=f&&V+r.height<=b,C=V=>V>=_&&V+r.width<=x,T=(V,ue,Ie,Xi)=>{let oi=0;V<Ie&&(oi+=Ie-V);const go=V+ue;return go>Xi&&(oi+=go-Xi),oi},A=V=>{let ue=0,Ie=0;switch(V){case"top":ue=i.top-s.top-r.height-p,Ie=i.left-s.left+(i.width-r.width)/2;break;case"bottom":ue=i.bottom-s.top+p,Ie=i.left-s.left+(i.width-r.width)/2;break;case"left":Ie=i.left-s.left-r.width-p,ue=i.top-s.top+(i.height-r.height)/2;break;case"right":Ie=i.right-s.left+p,ue=i.top-s.top+(i.height-r.height)/2;break}const Xi=ue+s.top,oi=Ie+s.left,go=T(Xi,r.height,f,b),qv=T(oi,r.width,_,x);return{pos:V,top:ue,left:Ie,fitsV:S(Xi),fitsH:C(oi),totalOverflow:go+qv}},z=this.position==="top"||this.position==="bottom",ee=this.position,q=this._getOppositePosition(ee),xe=[ee,q,z?"left":"top",z?"right":"bottom"].map(A);let pe=xe.find(V=>V.fitsV&&V.fitsH)??xe.reduce((V,ue)=>ue.totalOverflow<V.totalOverflow?ue:V);const Ht=(V,ue,Ie)=>Math.min(Math.max(V,ue),Ie),Me=f-s.top,vt=b-r.height-s.top,fo=_-s.left,Gi=x-r.width-s.left,Yi=Ht(pe.top,Me,vt),ze=Ht(pe.left,fo,Gi);e.style.top=`${Yi}px`,e.style.left=`${ze}px`,this.position!==pe.pos&&(this.position=pe.pos)}_getOppositePosition(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}_onDefaultSlotChange(){this._updateTriggerElement()}render(){const e=this.arrow?c`<svg
|
|
8450
8605
|
class="scb-tooltip-arrow"
|
|
8451
8606
|
xmlns="http://www.w3.org/2000/svg"
|
|
8452
8607
|
width="13"
|
|
@@ -8637,7 +8792,7 @@ ${this.value}</textarea
|
|
|
8637
8792
|
gap: var(--spacing-3);
|
|
8638
8793
|
align-self: stretch;
|
|
8639
8794
|
}
|
|
8640
|
-
`,
|
|
8795
|
+
`,Re([n({type:String,reflect:!0})],a.ScbTooltip.prototype,"variant",2),Re([n({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"arrow",2),Re([n({type:String,attribute:"supporting-text"})],a.ScbTooltip.prototype,"supportingtext",2),Re([n({type:String})],a.ScbTooltip.prototype,"label",2),Re([n({type:String,reflect:!0})],a.ScbTooltip.prototype,"trigger",2),Re([n({type:String,reflect:!0})],a.ScbTooltip.prototype,"position",2),Re([n({type:Boolean,reflect:!0})],a.ScbTooltip.prototype,"open",2),Re([n({type:Number,reflect:!0})],a.ScbTooltip.prototype,"delay",2),Re([n({type:Number,reflect:!0})],a.ScbTooltip.prototype,"offset",2),a.ScbTooltip=Re([g("scb-tooltip")],a.ScbTooltip);var Fv=Object.defineProperty,Hv=Object.getOwnPropertyDescriptor,Sl=o=>{throw TypeError(o)},se=(o,e,t,i)=>{for(var r=i>1?void 0:i?Hv(e,t):e,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(e,t,r):l(r))||r);return i&&r&&Fv(e,t,r),r},Nv=(o,e,t)=>e.has(o)||Sl("Cannot "+t),Vv=(o,e,t)=>e.has(o)?Sl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),Ki=(o,e,t)=>(Nv(o,e,"access private method"),t),Ft,ls,mo;return a.ScbViz=class extends y{constructor(){super(...arguments),Vv(this,Ft),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.spacing="",this.spacingTop="",this.spacingBottom=""}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}firstUpdated(e){var i;const t=(i=this.shadowRoot)==null?void 0:i.querySelector('slot[name="table"]');t&&(t.addEventListener("slotchange",()=>this._styleSlottedTable()),this._styleSlottedTable()),Ki(this,Ft,ls).call(this)}updated(e){super.updated(e),this._styleSlottedTable(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Ki(this,Ft,ls).call(this)}_styleSlottedTable(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector('slot[name="table"]');if(!e)return;e.assignedElements({flatten:!0}).forEach(r=>{if(r.tagName==="TABLE"){const s=r;s.style.borderCollapse="collapse",s.style.width="100%",r.querySelectorAll("tbody tr:nth-child(odd)").forEach(l=>{l.style.background="var(--md-sys-color-surface-container)"}),r.querySelectorAll("th").forEach(l=>{const h=l;h.style.border="1px solid var(--md-sys-color-on-surface)",h.style.padding="8px"}),r.querySelectorAll("td").forEach(l=>{const h=l;h.style.border="1px solid var(--md-sys-color-on-surface)",h.style.padding="8px"}),r.querySelectorAll("tr").forEach(l=>{const h=Array.from(l.children).filter(p=>p.tagName==="TD"||p.tagName==="TH");h.length>0&&(h[0].style.borderLeft="none",h[h.length-1].style.borderRight="none")})}})}render(){switch(this.variant){case"Table":return c`
|
|
8641
8796
|
<div part="container">
|
|
8642
8797
|
<div class="header">
|
|
8643
8798
|
${this.title?c` <div class="label">${this.title}</div> `:""}
|
|
@@ -8942,4 +9097,4 @@ ${this.value}</textarea
|
|
|
8942
9097
|
:host([variant='Standard'].chip-diagram) slot[name='diagram'] {
|
|
8943
9098
|
display: block;
|
|
8944
9099
|
}
|
|
8945
|
-
`,se([n({type:String,reflect:!0})],a.ScbViz.prototype,"variant",2),se([n({type:String})],a.ScbViz.prototype,"selectedChip",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"title",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"subtitle",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"description",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"comment",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"source",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"footnote",2),se([n({type:String,reflect:!0,attribute:"lang"})],a.ScbViz.prototype,"lang",2),se([n({type:String,reflect:!0,attribute:"image-href"})],a.ScbViz.prototype,"imageHref",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"spacing",2),se([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbViz.prototype,"spacingTop",2),se([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbViz.prototype,"spacingBottom",2),a.ScbViz=se([
|
|
9100
|
+
`,se([n({type:String,reflect:!0})],a.ScbViz.prototype,"variant",2),se([n({type:String})],a.ScbViz.prototype,"selectedChip",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"title",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"subtitle",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"description",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"comment",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"source",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"footnote",2),se([n({type:String,reflect:!0,attribute:"lang"})],a.ScbViz.prototype,"lang",2),se([n({type:String,reflect:!0,attribute:"image-href"})],a.ScbViz.prototype,"imageHref",2),se([n({type:String,reflect:!0})],a.ScbViz.prototype,"spacing",2),se([n({type:String,attribute:"spacing-top",reflect:!0})],a.ScbViz.prototype,"spacingTop",2),se([n({type:String,attribute:"spacing-bottom",reflect:!0})],a.ScbViz.prototype,"spacingBottom",2),a.ScbViz=se([g("scb-viz")],a.ScbViz),a.ScbHeaderDrawerGroup=hl,a.ScbHeaderUtility=pl,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),a}({});
|