scb-wc-test 0.1.140 → 0.1.141
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{a as c,n
|
|
1
|
+
import{a as c,n,i as b,x as h,t as p}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(t,o,r){try{customElements.get(t)||s(t,o,r)}catch(d){var l=String(d||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var g=Object.defineProperty,u=Object.getOwnPropertyDescriptor,a=(e,s,t,o)=>{for(var r=o>1?void 0:o?u(s,t):s,l=e.length-1,d;l>=0;l--)(d=e[l])&&(r=(o?d(s,t,r):d(r))||r);return o&&r&&g(s,t,r),r};let i=class extends b{constructor(){super(...arguments),this._slotClickHandler=e=>{const s=this.shadowRoot?.querySelector("slot"),t=e.target;t&&t!==s&&t.dispatchEvent(new CustomEvent("hide-badge",{bubbles:!0,composed:!0}))},this.autoHide=!1,this.sizing="fit-content",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(){const e=this.shadowRoot?.querySelector("slot");this.autoHide&&e&&e.addEventListener("click",this._slotClickHandler)}updated(){const e=this.shadowRoot?.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 s=this.variant==="value"&&!this.value?"badge-value-empty":"",t=this._badgeVisible?"":"badge--hide",o=this.label||(this.variant==="dot"?"Indikator":`Märke: ${e}`);return h`
|
|
2
2
|
<div class="badge-content">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
<div
|
|
5
5
|
class="badge ${s} ${t}"
|
|
6
6
|
role="status"
|
|
7
|
-
aria-label="${this.variant==="dot",
|
|
7
|
+
aria-label="${this.variant==="dot",o}"
|
|
8
8
|
aria-hidden="${this.variant==="dot"&&!this.label?"true":"false"}">${this.variant==="dot"?"":e}</div>
|
|
9
9
|
</div>
|
|
10
10
|
`}};i.styles=c`
|
|
@@ -20,6 +20,9 @@ import{a as c,n as l,i as b,x as h,t as p}from"../../vendor/vendor.js";(function
|
|
|
20
20
|
--scb-badge-width: 8px;
|
|
21
21
|
--scb-badge-height: 8px;
|
|
22
22
|
}
|
|
23
|
+
:host([sizing="fit-parent"]) {
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
23
26
|
:host([variant="value"]) .badge {
|
|
24
27
|
width: fit-content;
|
|
25
28
|
padding: 6px;
|
|
@@ -69,4 +72,4 @@ import{a as c,n as l,i as b,x as h,t as p}from"../../vendor/vendor.js";(function
|
|
|
69
72
|
justify-content: center;
|
|
70
73
|
gap: var(--scb-badge-relative-gap);
|
|
71
74
|
}
|
|
72
|
-
`;
|
|
75
|
+
`;a([n({type:Boolean,reflect:!0,attribute:"auto-hide"})],i.prototype,"autoHide",2);a([n({type:String,reflect:!0})],i.prototype,"sizing",2);a([n({type:String,reflect:!0})],i.prototype,"position",2);a([n({type:Number,attribute:"position-top"})],i.prototype,"positionTop",2);a([n({type:Number,attribute:"position-right"})],i.prototype,"positionRight",2);a([n({type:String,reflect:!0})],i.prototype,"value",2);a([n({type:String,reflect:!0})],i.prototype,"label",2);a([n({type:Boolean,reflect:!0})],i.prototype,"hidden",2);a([n({type:String,reflect:!0})],i.prototype,"variant",2);i=a([p("scb-badge")],i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.141",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -365,5 +365,5 @@
|
|
|
365
365
|
},
|
|
366
366
|
"./mvc/*": "./mvc/*"
|
|
367
367
|
},
|
|
368
|
-
"buildHash": "
|
|
368
|
+
"buildHash": "F2FDB5C017DE6F1739F1B4F72895694BC9C6E10B63689D7B408C25F50BE28B3C"
|
|
369
369
|
}
|
package/scb-badge/scb-badge.d.ts
CHANGED
package/scb-badge/scb-badge.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { css as c, LitElement as
|
|
2
|
-
import { property as r, customElement as
|
|
3
|
-
var g = Object.defineProperty, u = Object.getOwnPropertyDescriptor,
|
|
4
|
-
for (var l = s > 1 ? void 0 : s ? u(
|
|
5
|
-
(d =
|
|
6
|
-
return s && l && g(
|
|
1
|
+
import { css as c, LitElement as p, html as b } from "lit";
|
|
2
|
+
import { property as r, customElement as h } from "lit/decorators.js";
|
|
3
|
+
var g = Object.defineProperty, u = Object.getOwnPropertyDescriptor, a = (t, e, o, s) => {
|
|
4
|
+
for (var l = s > 1 ? void 0 : s ? u(e, o) : e, n = t.length - 1, d; n >= 0; n--)
|
|
5
|
+
(d = t[n]) && (l = (s ? d(e, o, l) : d(l)) || l);
|
|
6
|
+
return s && l && g(e, o, l), l;
|
|
7
7
|
};
|
|
8
|
-
let i = class extends
|
|
8
|
+
let i = class extends p {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this._slotClickHandler = (
|
|
10
|
+
super(...arguments), this._slotClickHandler = (t) => {
|
|
11
11
|
var s;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
}, 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 = () => {
|
|
12
|
+
const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot"), o = t.target;
|
|
13
|
+
o && o !== e && o.dispatchEvent(new CustomEvent("hide-badge", { bubbles: !0, composed: !0 }));
|
|
14
|
+
}, this.autoHide = !1, this.sizing = "fit-content", this.position = "relative", this.positionTop = 0, this.positionRight = 12, this.value = "", this.label = "", this.hidden = !1, this.variant = "dot", this._badgeVisible = !0, this._onHideBadge = () => {
|
|
15
15
|
this._badgeVisible = !1, this.requestUpdate();
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
firstUpdated() {
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
this.autoHide &&
|
|
19
|
+
var e;
|
|
20
|
+
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
21
|
+
this.autoHide && t && t.addEventListener("click", this._slotClickHandler);
|
|
22
22
|
}
|
|
23
23
|
updated() {
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
|
|
24
|
+
var e;
|
|
25
|
+
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
26
|
+
t && (this.autoHide ? t.addEventListener("click", this._slotClickHandler) : t.removeEventListener("click", this._slotClickHandler));
|
|
27
27
|
}
|
|
28
28
|
connectedCallback() {
|
|
29
29
|
super.connectedCallback(), this.addEventListener("hide-badge", this._onHideBadge);
|
|
@@ -33,17 +33,17 @@ let i = class extends b {
|
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
this.style.setProperty("--scb-badge-absolute-top", this.positionTop + "px"), this.style.setProperty("--scb-badge-absolute-right", this.positionRight + "px");
|
|
36
|
-
let
|
|
37
|
-
!isNaN(Number(this.value)) && this.value.length > 4 && (
|
|
38
|
-
const
|
|
39
|
-
return
|
|
36
|
+
let t = this.value;
|
|
37
|
+
!isNaN(Number(this.value)) && this.value.length > 4 && (t = this.value.slice(0, 4) + "+");
|
|
38
|
+
const e = this.variant === "value" && !this.value ? "badge-value-empty" : "", o = this._badgeVisible ? "" : "badge--hide", s = this.label || (this.variant === "dot" ? "Indikator" : `Märke: ${t}`);
|
|
39
|
+
return b`
|
|
40
40
|
<div class="badge-content">
|
|
41
41
|
<slot></slot>
|
|
42
42
|
<div
|
|
43
|
-
class="badge ${
|
|
43
|
+
class="badge ${e} ${o}"
|
|
44
44
|
role="status"
|
|
45
45
|
aria-label="${this.variant === "dot", s}"
|
|
46
|
-
aria-hidden="${this.variant === "dot" && !this.label ? "true" : "false"}">${this.variant === "dot" ? "" :
|
|
46
|
+
aria-hidden="${this.variant === "dot" && !this.label ? "true" : "false"}">${this.variant === "dot" ? "" : t}</div>
|
|
47
47
|
</div>
|
|
48
48
|
`;
|
|
49
49
|
}
|
|
@@ -61,6 +61,9 @@ i.styles = c`
|
|
|
61
61
|
--scb-badge-width: 8px;
|
|
62
62
|
--scb-badge-height: 8px;
|
|
63
63
|
}
|
|
64
|
+
:host([sizing="fit-parent"]) {
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
64
67
|
:host([variant="value"]) .badge {
|
|
65
68
|
width: fit-content;
|
|
66
69
|
padding: 6px;
|
|
@@ -111,32 +114,35 @@ i.styles = c`
|
|
|
111
114
|
gap: var(--scb-badge-relative-gap);
|
|
112
115
|
}
|
|
113
116
|
`;
|
|
114
|
-
|
|
117
|
+
a([
|
|
115
118
|
r({ type: Boolean, reflect: !0, attribute: "auto-hide" })
|
|
116
119
|
], i.prototype, "autoHide", 2);
|
|
117
|
-
|
|
120
|
+
a([
|
|
121
|
+
r({ type: String, reflect: !0 })
|
|
122
|
+
], i.prototype, "sizing", 2);
|
|
123
|
+
a([
|
|
118
124
|
r({ type: String, reflect: !0 })
|
|
119
125
|
], i.prototype, "position", 2);
|
|
120
|
-
|
|
126
|
+
a([
|
|
121
127
|
r({ type: Number, attribute: "position-top" })
|
|
122
128
|
], i.prototype, "positionTop", 2);
|
|
123
|
-
|
|
129
|
+
a([
|
|
124
130
|
r({ type: Number, attribute: "position-right" })
|
|
125
131
|
], i.prototype, "positionRight", 2);
|
|
126
|
-
|
|
132
|
+
a([
|
|
127
133
|
r({ type: String, reflect: !0 })
|
|
128
134
|
], i.prototype, "value", 2);
|
|
129
|
-
|
|
135
|
+
a([
|
|
130
136
|
r({ type: String, reflect: !0 })
|
|
131
137
|
], i.prototype, "label", 2);
|
|
132
|
-
|
|
138
|
+
a([
|
|
133
139
|
r({ type: Boolean, reflect: !0 })
|
|
134
140
|
], i.prototype, "hidden", 2);
|
|
135
|
-
|
|
141
|
+
a([
|
|
136
142
|
r({ type: String, reflect: !0 })
|
|
137
143
|
], i.prototype, "variant", 2);
|
|
138
|
-
i =
|
|
139
|
-
|
|
144
|
+
i = a([
|
|
145
|
+
h("scb-badge")
|
|
140
146
|
], i);
|
|
141
147
|
export {
|
|
142
148
|
i as ScbBadge
|
package/scb-wc-test.bundle.js
CHANGED
|
@@ -247,11 +247,11 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
247
247
|
* @license
|
|
248
248
|
* Copyright 2023 Google LLC
|
|
249
249
|
* SPDX-License-Identifier: Apache-2.0
|
|
250
|
-
*/const $t=Symbol("createValidator"),Ct=Symbol("getValidityAnchor"),Ka=Symbol("privateValidator"),
|
|
250
|
+
*/const $t=Symbol("createValidator"),Ct=Symbol("getValidityAnchor"),Ka=Symbol("privateValidator"),Ge=Symbol("privateSyncValidity"),vr=Symbol("privateCustomValidationMessage");function Ci(a){var e;class t extends a{constructor(){super(...arguments),this[e]=""}get validity(){return this[Ge](),this[Q].validity}get validationMessage(){return this[Ge](),this[Q].validationMessage}get willValidate(){return this[Ge](),this[Q].willValidate}checkValidity(){return this[Ge](),this[Q].checkValidity()}reportValidity(){return this[Ge](),this[Q].reportValidity()}setCustomValidity(r){this[vr]=r,this[Ge]()}requestUpdate(r,s,n){super.requestUpdate(r,s,n),this[Ge]()}firstUpdated(r){super.firstUpdated(r),this[Ge]()}[(e=vr,Ge)](){this[Ka]||(this[Ka]=this[$t]());const{validity:r,validationMessage:s}=this[Ka].getValidity(),n=!!this[vr],d=this[vr]||s;this[Q].setValidity({...r,customError:n},d,this[Ct]()??void 0)}[$t](){throw new Error("Implement [createValidator]")}[Ct](){throw new Error("Implement [getValidityAnchor]")}}return t}/**
|
|
251
251
|
* @license
|
|
252
252
|
* Copyright 2023 Google LLC
|
|
253
253
|
* SPDX-License-Identifier: Apache-2.0
|
|
254
|
-
*/const
|
|
254
|
+
*/const Ye=Symbol("getFormValue"),Ei=Symbol("getFormState");function Zt(a){class e extends a{get form(){return this[Q].form}get labels(){return this[Q].labels}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get disabled(){return this.hasAttribute("disabled")}set disabled(i){this.toggleAttribute("disabled",i)}attributeChangedCallback(i,r,s){if(i==="name"||i==="disabled"){const n=i==="disabled"?r!==null:r;this.requestUpdate(i,n);return}super.attributeChangedCallback(i,r,s)}requestUpdate(i,r,s){super.requestUpdate(i,r,s),this[Q].setFormValue(this[Ye](),this[Ei]())}[Ye](){throw new Error("Implement [getFormValue]")}[Ei](){return this[Ye]()}formDisabledCallback(i){this.disabled=i}}return e.formAssociated=!0,p([l({noAccessor:!0})],e.prototype,"name",null),p([l({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}/**
|
|
255
255
|
* @license
|
|
256
256
|
* Copyright 2023 Google LLC
|
|
257
257
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -287,7 +287,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
287
287
|
<rect class="mark long" />
|
|
288
288
|
</svg>
|
|
289
289
|
</div>
|
|
290
|
-
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){pt(this,e)}[
|
|
290
|
+
`}handleInput(e){const t=e.target;this.checked=t.checked,this.indeterminate=t.indeterminate}handleChange(e){pt(this,e)}[Ye](){return!this.checked||this.indeterminate?null:this.value}[Ei](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[$t](){return new qs(()=>this)}[Ct](){return this.input}}ce(Oe),Oe.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Boolean})],Oe.prototype,"checked",void 0),p([l({type:Boolean})],Oe.prototype,"indeterminate",void 0),p([l({type:Boolean})],Oe.prototype,"required",void 0),p([l()],Oe.prototype,"value",void 0),p([E()],Oe.prototype,"prevChecked",void 0),p([E()],Oe.prototype,"prevDisabled",void 0),p([E()],Oe.prototype,"prevIndeterminate",void 0),p([A("input")],Oe.prototype,"input",void 0);/**
|
|
291
291
|
* @license
|
|
292
292
|
* Copyright 2024 Google LLC
|
|
293
293
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -300,7 +300,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
300
300
|
* @license
|
|
301
301
|
* Copyright 2023 Google LLC
|
|
302
302
|
* SPDX-License-Identifier: Apache-2.0
|
|
303
|
-
*/class
|
|
303
|
+
*/class Xe extends _{constructor(){super(...arguments),this.disabled=!1,this.alwaysFocusable=!1,this.label="",this.hasIcon=!1}get rippleDisabled(){return this.disabled}focus(e){this.disabled&&!this.alwaysFocusable||super.focus(e)}render(){return c`
|
|
304
304
|
<div class="container ${F(this.getContainerClasses())}">
|
|
305
305
|
${this.renderContainerContent()}
|
|
306
306
|
</div>
|
|
@@ -317,11 +317,11 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
317
317
|
</span>
|
|
318
318
|
<span class="label">${this.label}</span>
|
|
319
319
|
<span class="touch"></span>
|
|
320
|
-
`}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements({flatten:!0}).length>0}}ce(
|
|
320
|
+
`}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements({flatten:!0}).length>0}}ce(Xe),Xe.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Boolean,reflect:!0})],Xe.prototype,"disabled",void 0),p([l({type:Boolean,attribute:"always-focusable"})],Xe.prototype,"alwaysFocusable",void 0),p([l()],Xe.prototype,"label",void 0),p([l({type:Boolean,reflect:!0,attribute:"has-icon"})],Xe.prototype,"hasIcon",void 0);/**
|
|
321
321
|
* @license
|
|
322
322
|
* Copyright 2023 Google LLC
|
|
323
323
|
* SPDX-License-Identifier: Apache-2.0
|
|
324
|
-
*/class Ti extends
|
|
324
|
+
*/class Ti extends Xe{constructor(){super(...arguments),this.elevated=!1,this.href="",this.target=""}get primaryId(){return this.href?"link":"button"}get rippleDisabled(){return!this.href&&this.disabled}getContainerClasses(){return{...super.getContainerClasses(),disabled:!this.href&&this.disabled,elevated:this.elevated,link:!!this.href}}renderPrimaryAction(e){const{ariaLabel:t}=this;return this.href?c`
|
|
325
325
|
<a
|
|
326
326
|
class="primary action"
|
|
327
327
|
id="link"
|
|
@@ -362,7 +362,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
362
362
|
* @license
|
|
363
363
|
* Copyright 2023 Google LLC
|
|
364
364
|
* SPDX-License-Identifier: Apache-2.0
|
|
365
|
-
*/class Us extends _{get chips(){return this.childElements.filter(e=>e instanceof
|
|
365
|
+
*/class Us extends _{get chips(){return this.childElements.filter(e=>e instanceof Xe)}constructor(){super(),this.internals=this.attachInternals(),this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar"}render(){return c`<slot @slotchange=${this.updateTabIndices}></slot>`}handleKeyDown(e){const t=e.key==="ArrowLeft",i=e.key==="ArrowRight",r=e.key==="Home",s=e.key==="End";if(!t&&!i&&!r&&!s)return;const{chips:n}=this;if(n.length<2)return;if(e.preventDefault(),r||s){const x=r?0:n.length-1;n[x].focus({trailing:s}),this.updateTabIndices();return}const h=getComputedStyle(this).direction==="rtl"?t:i,u=n.find(x=>x.matches(":focus-within"));if(!u){(h?n[0]:n[n.length-1]).focus({trailing:!h}),this.updateTabIndices();return}const m=n.indexOf(u);let b=h?m+1:m-1;for(;b!==m;){b>=n.length?b=0:b<0&&(b=n.length-1);const x=n[b];if(x.disabled&&!x.alwaysFocusable){h?b++:b--;continue}x.focus({trailing:!h}),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)}}p([ie()],Us.prototype,"childElements",void 0);/**
|
|
366
366
|
* @license
|
|
367
367
|
* Copyright 2024 Google LLC
|
|
368
368
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -375,7 +375,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
375
375
|
* @license
|
|
376
376
|
* Copyright 2023 Google LLC
|
|
377
377
|
* SPDX-License-Identifier: Apache-2.0
|
|
378
|
-
*/const yr="aria-label-remove";class Ws extends
|
|
378
|
+
*/const yr="aria-label-remove";class Ws extends Xe{get ariaLabelRemove(){if(this.hasAttribute(yr))return this.getAttribute(yr);const{ariaLabel:e}=this;return`Remove ${e||this.label}`}set ariaLabelRemove(e){const t=this.ariaLabelRemove;e!==t&&(e===null?this.removeAttribute(yr):this.setAttribute(yr,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
381
|
`}handleKeyDown(e){var u,m;const t=e.key==="ArrowLeft",i=e.key==="ArrowRight";if(!t&&!i||!this.primaryAction||!this.trailingAction)return;const s=getComputedStyle(this).direction==="rtl"?t:i,n=(u=this.primaryAction)==null?void 0:u.matches(":focus-within"),d=(m=this.trailingAction)==null?void 0:m.matches(":focus-within");if(s&&d||!s&&n)return;e.preventDefault(),e.stopPropagation(),(s?this.trailingAction:this.primaryAction).focus()}handleTrailingActionFocus(){const{primaryAction:e,trailingAction:t}=this;!e||!t||(e.tabIndex=-1,t.addEventListener("focusout",()=>{e.tabIndex=0},{once:!0}))}}/**
|
|
@@ -849,7 +849,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
849
849
|
* @license
|
|
850
850
|
* Copyright 2022 Google LLC
|
|
851
851
|
* SPDX-License-Identifier: Apache-2.0
|
|
852
|
-
*/class
|
|
852
|
+
*/class Ze extends _{constructor(){super(...arguments),this.disabled=!1,this.type="text",this.isListItem=!0,this.href="",this.target=""}get isDisabled(){return this.disabled&&this.type!=="link"}willUpdate(e){this.href&&(this.type="link"),super.willUpdate(e)}render(){return this.renderListItem(c`
|
|
853
853
|
<md-item>
|
|
854
854
|
<div slot="container">
|
|
855
855
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
@@ -888,7 +888,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
888
888
|
<slot
|
|
889
889
|
name="trailing-supporting-text"
|
|
890
890
|
slot="trailing-supporting-text"></slot>
|
|
891
|
-
`}onFocus(){this.tabIndex===-1&&this.dispatchEvent(nn())}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}ce(
|
|
891
|
+
`}onFocus(){this.tabIndex===-1&&this.dispatchEvent(nn())}focus(){var e;(e=this.listItemRoot)==null||e.focus()}}ce(Ze),Ze.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Boolean,reflect:!0})],Ze.prototype,"disabled",void 0),p([l({reflect:!0})],Ze.prototype,"type",void 0),p([l({type:Boolean,attribute:"md-list-item",reflect:!0})],Ze.prototype,"isListItem",void 0),p([l()],Ze.prototype,"href",void 0),p([l()],Ze.prototype,"target",void 0),p([A(".list-item")],Ze.prototype,"listItemRoot",void 0);/**
|
|
892
892
|
* @license
|
|
893
893
|
* Copyright 2024 Google LLC
|
|
894
894
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -897,7 +897,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,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 no=class extends
|
|
900
|
+
*/let no=class extends Ze{};no.styles=[$d],no=p([y("md-list-item")],no);/**
|
|
901
901
|
* @license
|
|
902
902
|
* Copyright 2018 Google LLC
|
|
903
903
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1135,7 +1135,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1135
1135
|
.value=${this.value}
|
|
1136
1136
|
?disabled=${this.disabled} />
|
|
1137
1137
|
</div>
|
|
1138
|
-
`}updated(){this[Q].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(ki(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(yn=yo,
|
|
1138
|
+
`}updated(){this[Q].ariaChecked=String(this.checked)}async handleClick(e){this.disabled||(await 0,!e.defaultPrevented&&(ki(e)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}async handleKeydown(e){await 0,!(e.key!==" "||e.defaultPrevented)&&this.click()}[(yn=yo,Ye)](){return this.checked?this.value:null}[Ei](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("checked")}formStateRestoreCallback(e){this.checked=e==="true"}[$t](){return new Fd(()=>this.selectionController?this.selectionController.controls:[this])}[Ct](){return this.container}}p([l({type:Boolean})],Ii.prototype,"checked",null),p([l({type:Boolean})],Ii.prototype,"required",void 0),p([l()],Ii.prototype,"value",void 0),p([A(".container")],Ii.prototype,"container",void 0);/**
|
|
1139
1139
|
* @license
|
|
1140
1140
|
* Copyright 2024 Google LLC
|
|
1141
1141
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1242,7 +1242,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1242
1242
|
@request-deselection=${this.handleRequestDeselection}>
|
|
1243
1243
|
${this.renderMenuContent()}
|
|
1244
1244
|
</md-menu>
|
|
1245
|
-
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=De.NONE;break;case"End":this.defaultFocus=De.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=De.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:d}=t;if(!d)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(d[Se.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&po(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Gd(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[Nr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[Nr]="",this.displayText="";return t}async handleOpening(e){var s,n,d;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==De.NONE)return;const t=this.menu.items,i=(d=Qt(t))==null?void 0:d.item;let[r]=this.lastSelectedOptionRecords[0]??[null];i&&i!==r&&(i.tabIndex=-1),r=r??t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){pt(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,i=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind==="click-selection"?r=this.selectItem(i):t.kind==="keydown"&&Ad(t.key)?r=this.selectItem(i):(i.tabIndex=-1,i.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([i])=>{e!==i&&(i.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[
|
|
1245
|
+
</div>`}renderMenuContent(){return c`<slot></slot>`}handleKeydown(e){var s,n;if(this.open||this.disabled||!this.menu)return;const t=this.menu.typeaheadController,i=e.code==="Space"||e.code==="ArrowDown"||e.code==="ArrowUp"||e.code==="End"||e.code==="Home"||e.code==="Enter";if(!t.isTypingAhead&&i){switch(e.preventDefault(),this.open=!0,e.code){case"Space":case"ArrowDown":case"Enter":this.defaultFocus=De.NONE;break;case"End":this.defaultFocus=De.LAST_ITEM;break;case"ArrowUp":case"Home":this.defaultFocus=De.FIRST_ITEM;break}return}if(e.key.length===1){t.onKeydown(e),e.preventDefault();const{lastActiveRecord:d}=t;if(!d)return;(n=(s=this.labelEl)==null?void 0:s.setAttribute)==null||n.call(s,"aria-live","polite"),this.selectItem(d[Se.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&po(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;const e=this.menu.items;return this.lastSelectedOptionRecords=Gd(e),this.lastSelectedOptionRecords}async getUpdateComplete(){var e;return await((e=this.menu)==null?void 0:e.updateComplete),super.getUpdateComplete()}updateValueAndDisplayText(){const e=this.getSelectedOptions()??[];let t=!1;if(e.length){const[i]=e[0];t=this.lastSelectedOption!==i,this.lastSelectedOption=i,this[Nr]=i.value,this.displayText=i.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[Nr]="",this.displayText="";return t}async handleOpening(e){var s,n,d;if((n=(s=this.labelEl)==null?void 0:s.removeAttribute)==null||n.call(s,"aria-live"),this.redispatchEvent(e),this.defaultFocus!==De.NONE)return;const t=this.menu.items,i=(d=Qt(t))==null?void 0:d.item;let[r]=this.lastSelectedOptionRecords[0]??[null];i&&i!==r&&(i.tabIndex=-1),r=r??t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){pt(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){const t=e.detail.reason,i=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind==="click-selection"?r=this.selectItem(i):t.kind==="keydown"&&Ad(t.key)?r=this.selectItem(i):(i.tabIndex=-1,i.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([i])=>{e!==i&&(i.selected=!1)}),e.selected=!0,this.updateValueAndDisplayText()}handleRequestSelection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)||this.selectItem(t)}handleRequestDeselection(e){const t=e.target;this.lastSelectedOptionRecords.some(([i])=>i===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[Ye](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){var e;(e=this.field)==null||e.click()}[$t](){return new Kd(()=>this)}[Ct](){return this.field}}ce(M),M.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Boolean})],M.prototype,"quick",void 0),p([l({type:Boolean})],M.prototype,"required",void 0),p([l({type:String,attribute:"error-text"})],M.prototype,"errorText",void 0),p([l()],M.prototype,"label",void 0),p([l({type:Boolean,attribute:"no-asterisk"})],M.prototype,"noAsterisk",void 0),p([l({type:String,attribute:"supporting-text"})],M.prototype,"supportingText",void 0),p([l({type:Boolean,reflect:!0})],M.prototype,"error",void 0),p([l({attribute:"menu-positioning"})],M.prototype,"menuPositioning",void 0),p([l({type:Boolean,attribute:"clamp-menu-width"})],M.prototype,"clampMenuWidth",void 0),p([l({type:Number,attribute:"typeahead-delay"})],M.prototype,"typeaheadDelay",void 0),p([l({type:Boolean,attribute:"has-leading-icon"})],M.prototype,"hasLeadingIcon",void 0),p([l({attribute:"display-text"})],M.prototype,"displayText",void 0),p([l({attribute:"menu-align"})],M.prototype,"menuAlign",void 0),p([l()],M.prototype,"value",null),p([l({type:Number,attribute:"selected-index"})],M.prototype,"selectedIndex",null),p([E()],M.prototype,"nativeError",void 0),p([E()],M.prototype,"nativeErrorText",void 0),p([E()],M.prototype,"focused",void 0),p([E()],M.prototype,"open",void 0),p([E()],M.prototype,"defaultFocus",void 0),p([A(".field")],M.prototype,"field",void 0),p([A("md-menu")],M.prototype,"menu",void 0),p([A("#label")],M.prototype,"labelEl",void 0),p([ie({slot:"leading-icon",flatten:!0})],M.prototype,"leadingIcons",void 0);/**
|
|
1246
1246
|
* @license
|
|
1247
1247
|
* Copyright 2023 Google LLC
|
|
1248
1248
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1388,7 +1388,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1388
1388
|
.value=${String(t)}
|
|
1389
1389
|
.tabIndex=${e?1:0}
|
|
1390
1390
|
aria-label=${i||v}
|
|
1391
|
-
aria-valuetext=${r} />`}async toggleRippleHover(e,t){const i=await e;i&&(t?i.handlePointerenter(new PointerEvent("pointerenter",{isPrimary:!0,pointerId:this.ripplePointerId})):i.handlePointerleave(new PointerEvent("pointerleave",{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){const t=e.target,i=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type==="pointerdown",flipped:!1,target:t,fixed:i,values:new Map([[t,t.valueAsNumber],[i,i==null?void 0:i.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;const t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;const{target:t,values:i,flipped:r}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),r&&t.valueAsNumber!==i.get(t)&&t.dispatchEvent(new Event("change",{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&Sn(e,this.handleStart),this.handleEndHover=!this.disabled&&Sn(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains("start")}needsClamping(){if(!this.action)return!1;const{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber<t.valueAsNumber}isActionFlipped(){const{action:e}=this;if(!e)return!1;const{target:t,fixed:i,values:r}=e;return e.canFlip&&r.get(t)===r.get(i)&&this.needsClamping()&&(e.canFlip=!1,e.flipped=!0,e.target=i,e.fixed=t),e.flipped}flipAction(){if(!this.action)return!1;const{target:e,fixed:t,values:i}=this.action,r=e.valueAsNumber!==t.valueAsNumber;return e.valueAsNumber=t.valueAsNumber,t.valueAsNumber=i.get(t),r}clampAction(){if(!this.needsClamping()||!this.action)return!1;const{target:e,fixed:t}=this.action;return e.valueAsNumber=t.valueAsNumber,!0}handleInput(e){if(this.isRedispatchingEvent)return;let t=!1,i=!1;this.range&&(this.isActionFlipped()&&(t=!0,i=this.flipAction()),this.clampAction()&&(t=!0,i=!1));const r=e.target;this.updateOnTop(r),this.range?(this.valueStart=this.inputStart.valueAsNumber,this.valueEnd=this.inputEnd.valueAsNumber):this.value=this.inputEnd.valueAsNumber,t&&e.stopPropagation(),i&&(this.isRedispatchingEvent=!0,pt(r,e),this.isRedispatchingEvent=!1)}handleChange(e){const t=e.target,{target:i,values:r}=this.action??{};i&&i.valueAsNumber===r.get(t)||pt(this,e),this.finishAction(e)}[
|
|
1391
|
+
aria-valuetext=${r} />`}async toggleRippleHover(e,t){const i=await e;i&&(t?i.handlePointerenter(new PointerEvent("pointerenter",{isPrimary:!0,pointerId:this.ripplePointerId})):i.handlePointerleave(new PointerEvent("pointerleave",{isPrimary:!0,pointerId:this.ripplePointerId})))}handleFocus(e){this.updateOnTop(e.target)}startAction(e){const t=e.target,i=t===this.inputStart?this.inputEnd:this.inputStart;this.action={canFlip:e.type==="pointerdown",flipped:!1,target:t,fixed:i,values:new Map([[t,t.valueAsNumber],[i,i==null?void 0:i.valueAsNumber]])}}finishAction(e){this.action=void 0}handleKeydown(e){this.startAction(e)}handleKeyup(e){this.finishAction(e)}handleDown(e){this.startAction(e),this.ripplePointerId=e.pointerId;const t=e.target===this.inputStart;this.handleStartHover=!this.disabled&&t&&!!this.handleStart,this.handleEndHover=!this.disabled&&!t&&!!this.handleEnd}async handleUp(e){if(!this.action)return;const{target:t,values:i,flipped:r}=this.action;await new Promise(requestAnimationFrame),t!==void 0&&(t.focus(),r&&t.valueAsNumber!==i.get(t)&&t.dispatchEvent(new Event("change",{bubbles:!0}))),this.finishAction(e)}handleMove(e){this.handleStartHover=!this.disabled&&Sn(e,this.handleStart),this.handleEndHover=!this.disabled&&Sn(e,this.handleEnd)}handleEnter(e){this.handleMove(e)}handleLeave(){this.handleStartHover=!1,this.handleEndHover=!1}updateOnTop(e){this.startOnTop=e.classList.contains("start")}needsClamping(){if(!this.action)return!1;const{target:e,fixed:t}=this.action;return e===this.inputStart?e.valueAsNumber>t.valueAsNumber:e.valueAsNumber<t.valueAsNumber}isActionFlipped(){const{action:e}=this;if(!e)return!1;const{target:t,fixed:i,values:r}=e;return e.canFlip&&r.get(t)===r.get(i)&&this.needsClamping()&&(e.canFlip=!1,e.flipped=!0,e.target=i,e.fixed=t),e.flipped}flipAction(){if(!this.action)return!1;const{target:e,fixed:t,values:i}=this.action,r=e.valueAsNumber!==t.valueAsNumber;return e.valueAsNumber=t.valueAsNumber,t.valueAsNumber=i.get(t),r}clampAction(){if(!this.needsClamping()||!this.action)return!1;const{target:e,fixed:t}=this.action;return e.valueAsNumber=t.valueAsNumber,!0}handleInput(e){if(this.isRedispatchingEvent)return;let t=!1,i=!1;this.range&&(this.isActionFlipped()&&(t=!0,i=this.flipAction()),this.clampAction()&&(t=!0,i=!1));const r=e.target;this.updateOnTop(r),this.range?(this.valueStart=this.inputStart.valueAsNumber,this.valueEnd=this.inputEnd.valueAsNumber):this.value=this.inputEnd.valueAsNumber,t&&e.stopPropagation(),i&&(this.isRedispatchingEvent=!0,pt(r,e),this.isRedispatchingEvent=!1)}handleChange(e){const t=e.target,{target:i,values:r}=this.action??{};i&&i.valueAsNumber===r.get(t)||pt(this,e),this.finishAction(e)}[Ye](){if(this.range){const e=new FormData;return e.append(this.nameStart,String(this.valueStart)),e.append(this.nameEnd,String(this.valueEnd)),e}return String(this.value)}formResetCallback(){if(this.range){const t=this.getAttribute("value-start");this.valueStart=t!==null?Number(t):void 0;const i=this.getAttribute("value-end");this.valueEnd=i!==null?Number(i):void 0;return}const e=this.getAttribute("value");this.value=e!==null?Number(e):void 0}formStateRestoreCallback(e){if(Array.isArray(e)){const[[,t],[,i]]=e;this.valueStart=Number(t),this.valueEnd=Number(i),this.range=!0;return}this.value=Number(e),this.range=!1}}ce(R),R.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Number})],R.prototype,"min",void 0),p([l({type:Number})],R.prototype,"max",void 0),p([l({type:Number})],R.prototype,"value",void 0),p([l({type:Number,attribute:"value-start"})],R.prototype,"valueStart",void 0),p([l({type:Number,attribute:"value-end"})],R.prototype,"valueEnd",void 0),p([l({attribute:"value-label"})],R.prototype,"valueLabel",void 0),p([l({attribute:"value-label-start"})],R.prototype,"valueLabelStart",void 0),p([l({attribute:"value-label-end"})],R.prototype,"valueLabelEnd",void 0),p([l({attribute:"aria-label-start"})],R.prototype,"ariaLabelStart",void 0),p([l({attribute:"aria-valuetext-start"})],R.prototype,"ariaValueTextStart",void 0),p([l({attribute:"aria-label-end"})],R.prototype,"ariaLabelEnd",void 0),p([l({attribute:"aria-valuetext-end"})],R.prototype,"ariaValueTextEnd",void 0),p([l({type:Number})],R.prototype,"step",void 0),p([l({type:Boolean})],R.prototype,"ticks",void 0),p([l({type:Boolean})],R.prototype,"labeled",void 0),p([l({type:Boolean})],R.prototype,"range",void 0),p([A("input.start")],R.prototype,"inputStart",void 0),p([A(".handle.start")],R.prototype,"handleStart",void 0),p([$s("md-ripple.start")],R.prototype,"rippleStart",void 0),p([A("input.end")],R.prototype,"inputEnd",void 0),p([A(".handle.end")],R.prototype,"handleEnd",void 0),p([$s("md-ripple.end")],R.prototype,"rippleEnd",void 0),p([E()],R.prototype,"handleStartHover",void 0),p([E()],R.prototype,"handleEndHover",void 0),p([E()],R.prototype,"startOnTop",void 0),p([E()],R.prototype,"handlesOverlapping",void 0),p([E()],R.prototype,"renderValueStart",void 0),p([E()],R.prototype,"renderValueEnd",void 0);function Sn({x:a,y:e},t){if(!t)return!1;const{top:i,left:r,bottom:s,right:n}=t.getBoundingClientRect();return a>=r&&a<=n&&e>=i&&e<=s}function oh(a,e){if(!(a&&e))return!1;const t=a.getBoundingClientRect(),i=e.getBoundingClientRect();return!(t.top>i.bottom||t.right<i.left||t.bottom<i.top||t.left>i.right)}/**
|
|
1392
1392
|
* @license
|
|
1393
1393
|
* Copyright 2024 Google LLC
|
|
1394
1394
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1405,7 +1405,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1405
1405
|
* @license
|
|
1406
1406
|
* Copyright 2021 Google LLC
|
|
1407
1407
|
* SPDX-License-Identifier: Apache-2.0
|
|
1408
|
-
*/const ch=Ci(Zt(ht(_)));class
|
|
1408
|
+
*/const ch=Ci(Zt(ht(_)));class Je extends ch{constructor(){super(),this.selected=!1,this.icons=!1,this.showOnlySelectedIcon=!1,this.required=!1,this.value="on",this.addEventListener("click",e=>{!ki(e)||!this.input||(this.focus(),ur(this.input))}),lh(this,"keydown"),this.addEventListener("keydown",e=>{nh(e,()=>{e.defaultPrevented||e.key!=="Enter"||this.disabled||!this.input||this.input.click()})})}render(){return c`
|
|
1409
1409
|
<div class="switch ${F(this.getRenderClasses())}">
|
|
1410
1410
|
<input
|
|
1411
1411
|
id="switch"
|
|
@@ -1449,7 +1449,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1449
1449
|
d="M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z" />
|
|
1450
1450
|
</svg>
|
|
1451
1451
|
</slot>
|
|
1452
|
-
`}renderTouchTarget(){return c`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){const t=e.target;this.selected=t.checked}handleChange(e){pt(this,e)}[
|
|
1452
|
+
`}renderTouchTarget(){return c`<span class="touch"></span>`}shouldShowIcons(){return this.icons||this.showOnlySelectedIcon}handleInput(e){const t=e.target;this.selected=t.checked}handleChange(e){pt(this,e)}[Ye](){return this.selected?this.value:null}[Ei](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(e){this.selected=e==="true"}[$t](){return new qs(()=>({checked:this.selected,required:this.required}))}[Ct](){return this.input}}ce(Je),Je.shadowRootOptions={mode:"open",delegatesFocus:!0},p([l({type:Boolean})],Je.prototype,"selected",void 0),p([l({type:Boolean})],Je.prototype,"icons",void 0),p([l({type:Boolean,attribute:"show-only-selected-icon"})],Je.prototype,"showOnlySelectedIcon",void 0),p([l({type:Boolean})],Je.prototype,"required",void 0),p([l()],Je.prototype,"value",void 0),p([A("input")],Je.prototype,"input",void 0);/**
|
|
1453
1453
|
* @license
|
|
1454
1454
|
* Copyright 2024 Google LLC
|
|
1455
1455
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1458,7 +1458,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,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 Eo=class extends
|
|
1461
|
+
*/let Eo=class extends Je{};Eo.styles=[dh],Eo=p([y("md-switch")],Eo);/**
|
|
1462
1462
|
* @license
|
|
1463
1463
|
* Copyright 2023 Google LLC
|
|
1464
1464
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -1641,7 +1641,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
1641
1641
|
@select=${this.redispatchEvent} />
|
|
1642
1642
|
${d}
|
|
1643
1643
|
</div>
|
|
1644
|
-
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?c`<span class="${F({suffix:t,prefix:!t})}">${e}</span>`:v}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var e;this.focused=((e=this.inputOrTextarea)==null?void 0:e.matches(":focus"))??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){pt(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[
|
|
1644
|
+
`}renderPrefix(){return this.renderAffix(this.prefixText,!1)}renderSuffix(){return this.renderAffix(this.suffixText,!0)}renderAffix(e,t){return e?c`<span class="${F({suffix:t,prefix:!t})}">${e}</span>`:v}getErrorText(){return this.error?this.errorText:this.nativeErrorText}handleFocusChange(){var e;this.focused=((e=this.inputOrTextarea)==null?void 0:e.matches(":focus"))??!1}handleInput(e){this.dirty=!0,this.value=e.target.value}redispatchEvent(e){pt(this,e)}getInputOrTextarea(){return this.inputOrTextarea||(this.connectedCallback(),this.scheduleUpdate()),this.isUpdatePending&&this.scheduleUpdate(),this.inputOrTextarea}getInput(){return this.type==="textarea"?null:this.getInputOrTextarea()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0,this.hasTrailingIcon=this.trailingIcons.length>0}[Ye](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}focus(){this.getInputOrTextarea().focus()}[$t](){return new Sh(()=>({state:this,renderedControl:this.inputOrTextarea}))}[Ct](){return this.inputOrTextarea}[Rr](e){var i;e==null||e.preventDefault();const t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&((i=this.field)==null||i.reannounceError())}}ce(I),I.shadowRootOptions={..._.shadowRootOptions,delegatesFocus:!0},p([l({type:Boolean,reflect:!0})],I.prototype,"error",void 0),p([l({attribute:"error-text"})],I.prototype,"errorText",void 0),p([l()],I.prototype,"label",void 0),p([l({type:Boolean,attribute:"no-asterisk"})],I.prototype,"noAsterisk",void 0),p([l({type:Boolean,reflect:!0})],I.prototype,"required",void 0),p([l()],I.prototype,"value",void 0),p([l({attribute:"prefix-text"})],I.prototype,"prefixText",void 0),p([l({attribute:"suffix-text"})],I.prototype,"suffixText",void 0),p([l({type:Boolean,attribute:"has-leading-icon"})],I.prototype,"hasLeadingIcon",void 0),p([l({type:Boolean,attribute:"has-trailing-icon"})],I.prototype,"hasTrailingIcon",void 0),p([l({attribute:"supporting-text"})],I.prototype,"supportingText",void 0),p([l({attribute:"text-direction"})],I.prototype,"textDirection",void 0),p([l({type:Number})],I.prototype,"rows",void 0),p([l({type:Number})],I.prototype,"cols",void 0),p([l({reflect:!0})],I.prototype,"inputMode",void 0),p([l()],I.prototype,"max",void 0),p([l({type:Number})],I.prototype,"maxLength",void 0),p([l()],I.prototype,"min",void 0),p([l({type:Number})],I.prototype,"minLength",void 0),p([l({type:Boolean,attribute:"no-spinner"})],I.prototype,"noSpinner",void 0),p([l()],I.prototype,"pattern",void 0),p([l({reflect:!0,converter:wh})],I.prototype,"placeholder",void 0),p([l({type:Boolean,reflect:!0})],I.prototype,"readOnly",void 0),p([l({type:Boolean,reflect:!0})],I.prototype,"multiple",void 0),p([l()],I.prototype,"step",void 0),p([l({reflect:!0})],I.prototype,"type",void 0),p([l({reflect:!0})],I.prototype,"autocomplete",void 0),p([E()],I.prototype,"dirty",void 0),p([E()],I.prototype,"focused",void 0),p([E()],I.prototype,"nativeError",void 0),p([E()],I.prototype,"nativeErrorText",void 0),p([A(".input")],I.prototype,"inputOrTextarea",void 0),p([A(".field")],I.prototype,"field",void 0),p([ie({slot:"leading-icon"})],I.prototype,"leadingIcons",void 0),p([ie({slot:"trailing-icon"})],I.prototype,"trailingIcons",void 0);/**
|
|
1645
1645
|
* @license
|
|
1646
1646
|
* Copyright 2021 Google LLC
|
|
1647
1647
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -2005,21 +2005,21 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
2005
2005
|
${this.label}
|
|
2006
2006
|
${e&&this.trailingIcon?t:v}
|
|
2007
2007
|
</md-text-button>
|
|
2008
|
-
`;default:return c``}}},Vr=new WeakSet,Io=function(){const a=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??a,t=this.mapSpacingToken(this.spacingBottom)??a;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")},pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"variant",2),pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"type",2),pe([l({type:String})],o.ScbButton.prototype,"label",2),pe([l({type:Boolean,attribute:"trailing-icon"})],o.ScbButton.prototype,"trailingIcon",2),pe([l({type:String})],o.ScbButton.prototype,"icon",2),pe([l({type:Boolean,reflect:!0})],o.ScbButton.prototype,"disabled",2),pe([l({type:Boolean,attribute:"full-width",reflect:!0})],o.ScbButton.prototype,"fullWidth",2),pe([l({type:String})],o.ScbButton.prototype,"href",2),pe([l({type:String})],o.ScbButton.prototype,"target",2),pe([l({type:String})],o.ScbButton.prototype,"rel",2),pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"spacing",2),pe([l({type:String,attribute:"spacing-top",reflect:!0})],o.ScbButton.prototype,"spacingTop",2),pe([l({type:String,attribute:"spacing-bottom",reflect:!0})],o.ScbButton.prototype,"spacingBottom",2),o.ScbButton=pe([y("scb-button")],o.ScbButton);var Ph=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Pn=a=>{throw TypeError(a)},ri=(a,e,t,i)=>{for(var r=i>1?void 0:i?Lh(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ph(e,t,r),r},Rh=(a,e,t)=>e.has(a)||Pn("Cannot "+t),Bh=(a,e,t)=>e.has(a)?Pn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),zt=(a,e,t)=>(Rh(a,e,"access private method"),t),
|
|
2008
|
+
`;default:return c``}}},Vr=new WeakSet,Io=function(){const a=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??a,t=this.mapSpacingToken(this.spacingBottom)??a;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")},pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"variant",2),pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"type",2),pe([l({type:String})],o.ScbButton.prototype,"label",2),pe([l({type:Boolean,attribute:"trailing-icon"})],o.ScbButton.prototype,"trailingIcon",2),pe([l({type:String})],o.ScbButton.prototype,"icon",2),pe([l({type:Boolean,reflect:!0})],o.ScbButton.prototype,"disabled",2),pe([l({type:Boolean,attribute:"full-width",reflect:!0})],o.ScbButton.prototype,"fullWidth",2),pe([l({type:String})],o.ScbButton.prototype,"href",2),pe([l({type:String})],o.ScbButton.prototype,"target",2),pe([l({type:String})],o.ScbButton.prototype,"rel",2),pe([l({type:String,reflect:!0})],o.ScbButton.prototype,"spacing",2),pe([l({type:String,attribute:"spacing-top",reflect:!0})],o.ScbButton.prototype,"spacingTop",2),pe([l({type:String,attribute:"spacing-bottom",reflect:!0})],o.ScbButton.prototype,"spacingBottom",2),o.ScbButton=pe([y("scb-button")],o.ScbButton);var Ph=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,Pn=a=>{throw TypeError(a)},ri=(a,e,t,i)=>{for(var r=i>1?void 0:i?Lh(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Ph(e,t,r),r},Rh=(a,e,t)=>e.has(a)||Pn("Cannot "+t),Bh=(a,e,t)=>e.has(a)?Pn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),zt=(a,e,t)=>(Rh(a,e,"access private method"),t),Qe,Ln,Rn,zo,Bn,Oo;o.ScbAccordion=class extends _{constructor(){super(...arguments),Bh(this,Qe),this.detached=!1,this.showCloseAll=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}connectedCallback(){super.connectedCallback(),this.addEventListener("open-changed",zt(this,Qe,zo))}disconnectedCallback(){this.removeEventListener("open-changed",zt(this,Qe,zo)),super.disconnectedCallback()}render(){const e=this.detached&&this.showCloseAll,t=e?zt(this,Qe,Ln).call(this):!1;return c`
|
|
2009
2009
|
<div class="scb-accordion" ?detached=${this.detached}>
|
|
2010
2010
|
${e?c`
|
|
2011
2011
|
<div class="scb-accordion-actions" role="toolbar" aria-label="Accordionkontroller">
|
|
2012
2012
|
<scb-button
|
|
2013
2013
|
variant="text"
|
|
2014
2014
|
label=${t?"Stäng alla":"Öppna alla"}
|
|
2015
|
-
@click=${zt(this,
|
|
2015
|
+
@click=${zt(this,Qe,Rn)}
|
|
2016
2016
|
></scb-button>
|
|
2017
2017
|
</div>
|
|
2018
2018
|
`:v}
|
|
2019
2019
|
|
|
2020
|
-
<slot @slotchange=${zt(this,
|
|
2020
|
+
<slot @slotchange=${zt(this,Qe,Bn)}></slot>
|
|
2021
2021
|
</div>
|
|
2022
|
-
`}firstUpdated(){zt(this,
|
|
2022
|
+
`}firstUpdated(){zt(this,Qe,Oo).call(this)}updated(e){(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&zt(this,Qe,Oo).call(this),(e.has("detached")||e.has("showCloseAll"))&&this.requestUpdate()}_getDirectItems(){return Array.from(this.children).filter(e=>e.tagName==="SCB-ACCORDION-ITEM")}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}},Qe=new WeakSet,Ln=function(){const a=this._getDirectItems();return a.length>0&&a.every(e=>e.open)},Rn=function(){if(!this.detached||!this.showCloseAll)return;const a=this._getDirectItems(),e=a.length>0&&a.every(t=>t.open);a.forEach(t=>t.setOpen(!e))},zo=function(){!this.detached||!this.showCloseAll||this.requestUpdate()},Bn=function(){!this.detached||!this.showCloseAll||this.requestUpdate()},Oo=function(){const a=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??a,t=this.mapSpacingToken(this.spacingBottom)??a;e?this.style.setProperty("--scb-accordion-spacing-block-start",e):this.style.removeProperty("--scb-accordion-spacing-block-start"),t?this.style.setProperty("--scb-accordion-spacing-block-end",t):this.style.removeProperty("--scb-accordion-spacing-block-end")},o.ScbAccordion.styles=f`
|
|
2023
2023
|
:host {
|
|
2024
2024
|
display: block;
|
|
2025
2025
|
margin-block-start: var(--scb-accordion-spacing-block-start, 0);
|
|
@@ -2789,7 +2789,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
2789
2789
|
display: flex;
|
|
2790
2790
|
align-items: center;
|
|
2791
2791
|
}
|
|
2792
|
-
`],Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"title",2),Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"type",2),Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"position",2),Ri([l({type:String,attribute:"search-supporting-text",reflect:!0})],o.ScbAppBar.prototype,"searchSupportingText",2),o.ScbAppBar=Ri([y("scb-app-bar")],o.ScbAppBar);var op=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,
|
|
2792
|
+
`],Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"title",2),Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"type",2),Ri([l({type:String,reflect:!0})],o.ScbAppBar.prototype,"position",2),Ri([l({type:String,attribute:"search-supporting-text",reflect:!0})],o.ScbAppBar.prototype,"searchSupportingText",2),o.ScbAppBar=Ri([y("scb-app-bar")],o.ScbAppBar);var op=Object.defineProperty,sp=Object.getOwnPropertyDescriptor,Ue=(a,e,t,i)=>{for(var r=i>1?void 0:i?sp(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&op(e,t,r),r};o.ScbBadge=class extends _{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.sizing="fit-content",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`
|
|
2793
2793
|
<div class="badge-content">
|
|
2794
2794
|
<slot></slot>
|
|
2795
2795
|
<div
|
|
@@ -2811,6 +2811,9 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
2811
2811
|
--scb-badge-width: 8px;
|
|
2812
2812
|
--scb-badge-height: 8px;
|
|
2813
2813
|
}
|
|
2814
|
+
:host([sizing="fit-parent"]) {
|
|
2815
|
+
width: 100%;
|
|
2816
|
+
}
|
|
2814
2817
|
:host([variant="value"]) .badge {
|
|
2815
2818
|
width: fit-content;
|
|
2816
2819
|
padding: 6px;
|
|
@@ -2860,7 +2863,7 @@ var ScbWcTest=function(o){"use strict";var Bl;function p(a,e,t,i){var r=argument
|
|
|
2860
2863
|
justify-content: center;
|
|
2861
2864
|
gap: var(--scb-badge-relative-gap);
|
|
2862
2865
|
}
|
|
2863
|
-
`,
|
|
2866
|
+
`,Ue([l({type:Boolean,reflect:!0,attribute:"auto-hide"})],o.ScbBadge.prototype,"autoHide",2),Ue([l({type:String,reflect:!0})],o.ScbBadge.prototype,"sizing",2),Ue([l({type:String,reflect:!0})],o.ScbBadge.prototype,"position",2),Ue([l({type:Number,attribute:"position-top"})],o.ScbBadge.prototype,"positionTop",2),Ue([l({type:Number,attribute:"position-right"})],o.ScbBadge.prototype,"positionRight",2),Ue([l({type:String,reflect:!0})],o.ScbBadge.prototype,"value",2),Ue([l({type:String,reflect:!0})],o.ScbBadge.prototype,"label",2),Ue([l({type:Boolean,reflect:!0})],o.ScbBadge.prototype,"hidden",2),Ue([l({type:String,reflect:!0})],o.ScbBadge.prototype,"variant",2),o.ScbBadge=Ue([y("scb-badge")],o.ScbBadge);/**
|
|
2864
2867
|
* @license
|
|
2865
2868
|
* Copyright 2018 Google LLC
|
|
2866
2869
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -5892,7 +5895,7 @@ ${this.value}</textarea
|
|
|
5892
5895
|
}
|
|
5893
5896
|
`,oe([l({type:String})],o.ScbFactCard.prototype,"variant",2),oe([l({type:String,attribute:"title"})],o.ScbFactCard.prototype,"title",2),oe([l({type:String,attribute:"subtitle"})],o.ScbFactCard.prototype,"subtitle",2),oe([l({type:String,attribute:"supporting-text"})],o.ScbFactCard.prototype,"supportingText",2),oe([l({type:String})],o.ScbFactCard.prototype,"icon",2),oe([l({type:Boolean,attribute:"show-close-button"})],o.ScbFactCard.prototype,"showCloseButton",2),oe([l({type:Boolean,reflect:!0})],o.ScbFactCard.prototype,"open",2),oe([l({type:String,reflect:!0})],o.ScbFactCard.prototype,"sizing",2),oe([l({type:String,reflect:!0})],o.ScbFactCard.prototype,"width",2),oe([l({type:String,reflect:!0,attribute:"max-width"})],o.ScbFactCard.prototype,"maxWidth",2),oe([l({type:String,reflect:!0})],o.ScbFactCard.prototype,"height",2),oe([l({type:String,reflect:!0,attribute:"max-height"})],o.ScbFactCard.prototype,"maxHeight",2),oe([l({type:String,reflect:!0})],o.ScbFactCard.prototype,"spacing",2),oe([l({type:String,reflect:!0,attribute:"spacing-top"})],o.ScbFactCard.prototype,"spacingTop",2),oe([l({type:String,reflect:!0,attribute:"spacing-bottom"})],o.ScbFactCard.prototype,"spacingBottom",2),o.ScbFactCard=oe([y("scb-fact-card")],o.ScbFactCard);var Eu=Object.defineProperty,Tu=Object.getOwnPropertyDescriptor,bl=(a,e,t,i)=>{for(var r=i>1?void 0:i?Tu(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Eu(e,t,r),r};o.ScbFooterSection=class extends _{constructor(){super(...arguments),this.title=""}render(){return c`<slot></slot>`}},o.ScbFooterSection.styles=f`
|
|
5894
5897
|
:host { display: none; }
|
|
5895
|
-
`,bl([l({type:String,reflect:!0})],o.ScbFooterSection.prototype,"title",2),o.ScbFooterSection=bl([y("scb-footer-section")],o.ScbFooterSection);var Au=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,ml=a=>{throw TypeError(a)},$e=(a,e,t,i)=>{for(var r=i>1?void 0:i?Iu(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Au(e,t,r),r},zu=(a,e,t)=>e.has(a)||ml("Cannot "+t),Ou=(a,e,t)=>e.has(a)?ml("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),
|
|
5898
|
+
`,bl([l({type:String,reflect:!0})],o.ScbFooterSection.prototype,"title",2),o.ScbFooterSection=bl([y("scb-footer-section")],o.ScbFooterSection);var Au=Object.defineProperty,Iu=Object.getOwnPropertyDescriptor,ml=a=>{throw TypeError(a)},$e=(a,e,t,i)=>{for(var r=i>1?void 0:i?Iu(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Au(e,t,r),r},zu=(a,e,t)=>e.has(a)||ml("Cannot "+t),Ou=(a,e,t)=>e.has(a)?ml("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),We=(a,e,t)=>(zu(a,e,"access private method"),t),Ce,ts,it;o.ScbGridItem=class extends _{constructor(){super(...arguments),Ou(this,Ce),this.fit=!1}firstUpdated(){We(this,Ce,ts).call(this)}updated(){We(this,Ce,ts).call(this)}render(){return c`<slot></slot>`}},Ce=new WeakSet,ts=function(){We(this,Ce,it).call(this,"--col-span",this.hasAttribute("col-span")?String(this.colSpan):null),We(this,Ce,it).call(this,"--col-span-compact",this.hasAttribute("col-span-compact")?String(this.colSpanCompact):null),We(this,Ce,it).call(this,"--col-span-medium",this.hasAttribute("col-span-medium")?String(this.colSpanMedium):null),We(this,Ce,it).call(this,"--col-span-expanded",this.hasAttribute("col-span-expanded")?String(this.colSpanExpanded):null),We(this,Ce,it).call(this,"--row-rule",this.hasAttribute("row-span")?`span ${this.rowSpan}`:null),We(this,Ce,it).call(this,"--row-rule-compact",this.hasAttribute("row-span-compact")?`span ${this.rowSpanCompact}`:null),We(this,Ce,it).call(this,"--row-rule-medium",this.hasAttribute("row-span-medium")?`span ${this.rowSpanMedium}`:null),We(this,Ce,it).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"))},it=function(a,e){e===null||e===""?this.style.removeProperty(a):this.style.setProperty(a,e)},o.ScbGridItem.styles=f`
|
|
5896
5899
|
:host {
|
|
5897
5900
|
box-sizing: border-box;
|
|
5898
5901
|
display: block;
|
|
@@ -8838,7 +8841,7 @@ ${this.value}</textarea
|
|
|
8838
8841
|
}
|
|
8839
8842
|
}
|
|
8840
8843
|
|
|
8841
|
-
`,Fe([l({type:String,reflect:!0})],o.ScbStep.prototype,"label",2),Fe([l({type:String,reflect:!0,attribute:"sub-label"})],o.ScbStep.prototype,"subLabel",2),Fe([l({type:String,reflect:!0,attribute:"symbol-variant"})],o.ScbStep.prototype,"symbolVariant",2),Fe([l({type:Number,reflect:!0})],o.ScbStep.prototype,"number",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"active",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"completed",2),Fe([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],o.ScbStep.prototype,"changeOnCompleted",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"islast",2),Fe([l({type:String,reflect:!0})],o.ScbStep.prototype,"variant",2),Fe([l({type:String})],o.ScbStep.prototype,"icon",2),o.ScbStep=Fe([y("scb-step")],o.ScbStep);var Nv=Object.defineProperty,Vv=Object.getOwnPropertyDescriptor,Dl=a=>{throw TypeError(a)},
|
|
8844
|
+
`,Fe([l({type:String,reflect:!0})],o.ScbStep.prototype,"label",2),Fe([l({type:String,reflect:!0,attribute:"sub-label"})],o.ScbStep.prototype,"subLabel",2),Fe([l({type:String,reflect:!0,attribute:"symbol-variant"})],o.ScbStep.prototype,"symbolVariant",2),Fe([l({type:Number,reflect:!0})],o.ScbStep.prototype,"number",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"active",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"completed",2),Fe([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],o.ScbStep.prototype,"changeOnCompleted",2),Fe([l({type:Boolean,reflect:!0})],o.ScbStep.prototype,"islast",2),Fe([l({type:String,reflect:!0})],o.ScbStep.prototype,"variant",2),Fe([l({type:String})],o.ScbStep.prototype,"icon",2),o.ScbStep=Fe([y("scb-step")],o.ScbStep);var Nv=Object.defineProperty,Vv=Object.getOwnPropertyDescriptor,Dl=a=>{throw TypeError(a)},je=(a,e,t,i)=>{for(var r=i>1?void 0:i?Vv(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nv(e,t,r),r},qv=(a,e,t)=>e.has(a)||Dl("Cannot "+t),Uv=(a,e,t)=>e.has(a)?Dl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),Ji=(a,e,t)=>(qv(a,e,"access private method"),t),Wt,bs,ga;o.ScbStepper=class extends _{constructor(){super(...arguments),Uv(this,Wt),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 n;const s=(n=t[r].shadowRoot)==null?void 0:n.querySelector(".scb-step-content");s&&"focus"in s&&typeof s.focus=="function"&&s.focus()},0))},this._onStepContainerClick=e=>{const t=this._getSteps(),i=e.composedPath(),r=t.findIndex(s=>i.includes(s));r!==-1&&this._onStepClick(r)}}_onStepClick(e){const t=this.activeIndex;this.activeIndex=e,this._updateSteps(),this.dispatchEvent(new CustomEvent("scb-step-change",{detail:{index:this.activeIndex,step:this._getSteps()[this.activeIndex]},bubbles:!0,composed:!0})),e>t?this.dispatchEvent(new CustomEvent("scb-step-next",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0})):e<t&&this.dispatchEvent(new CustomEvent("scb-step-prev",{detail:{from:t,to:e,step:this._getSteps()[e]},bubbles:!0,composed:!0}))}nextStep(){const e=this._getSteps();this.activeIndex<e.length-1&&this._onStepClick(this.activeIndex+1)}prevStep(){this.activeIndex>0&&this._onStepClick(this.activeIndex-1)}getActiveIndex(){return this.activeIndex}_updateSteps(){const e=this._getSteps();e.forEach((t,i)=>{t.active=i===this.activeIndex,t.completed=i<this.activeIndex,t.islast=!1,t.changeOnCompleted=this.changeOnCompleted,t.number=i+1,t.variant=this.variant,t.symbolVariant=this.symbolVariant}),e.length>0&&(e[e.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(e){this._updateSteps(),Ji(this,Wt,bs).call(this)}updated(e){this._updateSteps(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&Ji(this,Wt,bs).call(this)}render(){return c`
|
|
8842
8845
|
<div
|
|
8843
8846
|
class="steps"
|
|
8844
8847
|
role="list"
|
|
@@ -8923,7 +8926,7 @@ ${this.value}</textarea
|
|
|
8923
8926
|
::slotted(scb-step[symbol-variant='marker']:not(:first-child))::before {
|
|
8924
8927
|
top: 20px;
|
|
8925
8928
|
}
|
|
8926
|
-
`,
|
|
8929
|
+
`,je([l({type:String,reflect:!0})],o.ScbStepper.prototype,"type",2),je([l({type:String,reflect:!0})],o.ScbStepper.prototype,"label",2),je([l({type:Boolean,reflect:!0,attribute:"change-on-completed"})],o.ScbStepper.prototype,"changeOnCompleted",2),je([l({type:String})],o.ScbStepper.prototype,"variant",2),je([l({type:String,reflect:!0,attribute:"symbol-variant"})],o.ScbStepper.prototype,"symbolVariant",2),je([l({type:String,reflect:!0})],o.ScbStepper.prototype,"spacing",2),je([l({type:String,attribute:"spacing-top",reflect:!0})],o.ScbStepper.prototype,"spacingTop",2),je([l({type:String,attribute:"spacing-bottom",reflect:!0})],o.ScbStepper.prototype,"spacingBottom",2),je([E()],o.ScbStepper.prototype,"activeIndex",2),o.ScbStepper=je([y("scb-stepper")],o.ScbStepper);var Wv=Object.defineProperty,jv=Object.getOwnPropertyDescriptor,ya=(a,e,t,i)=>{for(var r=i>1?void 0:i?jv(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Wv(e,t,r),r};o.ScbPrimaryTab=class extends zi{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)}}},o.ScbPrimaryTab.styles=[...zi.styles,f`
|
|
8927
8930
|
/* Icon-only: dölj textslot */
|
|
8928
8931
|
:host([icon-only]) slot:not([name='icon']) {
|
|
8929
8932
|
display: none;
|
|
@@ -9191,7 +9194,7 @@ ${this.value}</textarea
|
|
|
9191
9194
|
.scb-toc-list {
|
|
9192
9195
|
display: block;
|
|
9193
9196
|
}
|
|
9194
|
-
`],tr([l({type:Boolean,reflect:!0})],o.ScbToc.prototype,"detached",2),tr([l({type:String,reflect:!0})],o.ScbToc.prototype,"spacing",2),tr([l({type:String,attribute:"spacing-top",reflect:!0})],o.ScbToc.prototype,"spacingTop",2),tr([l({type:String,attribute:"spacing-bottom",reflect:!0})],o.ScbToc.prototype,"spacingBottom",2),o.ScbToc=tr([y("scb-toc")],o.ScbToc);var ob=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,
|
|
9197
|
+
`],tr([l({type:Boolean,reflect:!0})],o.ScbToc.prototype,"detached",2),tr([l({type:String,reflect:!0})],o.ScbToc.prototype,"spacing",2),tr([l({type:String,attribute:"spacing-top",reflect:!0})],o.ScbToc.prototype,"spacingTop",2),tr([l({type:String,attribute:"spacing-bottom",reflect:!0})],o.ScbToc.prototype,"spacingBottom",2),o.ScbToc=tr([y("scb-toc")],o.ScbToc);var ob=Object.defineProperty,sb=Object.getOwnPropertyDescriptor,Ke=(a,e,t,i)=>{for(var r=i>1?void 0:i?sb(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ob(e,t,r),r};let nb=0;o.ScbTooltip=class extends _{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-${++nb}`,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(),h=(this.offset??0)+8,u=8,m=u,b=window.innerHeight-u,x=u,g=window.innerWidth-u,w=G=>G>=m&&G+r.height<=b,k=G=>G>=x&&G+r.width<=g,S=(G,xe,Ne,ar)=>{let vi=0;G<Ne&&(vi+=Ne-G);const Sa=G+xe;return Sa>ar&&(vi+=Sa-ar),vi},$=G=>{let xe=0,Ne=0;switch(G){case"top":xe=i.top-s.top-r.height-h,Ne=i.left-s.left+(i.width-r.width)/2;break;case"bottom":xe=i.bottom-s.top+h,Ne=i.left-s.left+(i.width-r.width)/2;break;case"left":Ne=i.left-s.left-r.width-h,xe=i.top-s.top+(i.height-r.height)/2;break;case"right":Ne=i.right-s.left+h,xe=i.top-s.top+(i.height-r.height)/2;break}const ar=xe+s.top,vi=Ne+s.left,Sa=S(ar,r.height,m,b),pb=S(vi,r.width,x,g);return{pos:G,top:xe,left:Ne,fitsV:w(ar),fitsH:k(vi),totalOverflow:Sa+pb}},C=this.position==="top"||this.position==="bottom",O=this.position,D=this._getOppositePosition(O),j=[O,D,C?"left":"top",C?"right":"bottom"].map($);let L=j.find(G=>G.fitsV&&G.fitsH)??j.reduce((G,xe)=>xe.totalOverflow<G.totalOverflow?xe:G);const nt=(G,xe,Ne)=>Math.min(Math.max(G,xe),Ne),T=m-s.top,N=b-r.height-s.top,Ie=x-s.left,_e=g-r.width-s.left,He=nt(L.top,T,N),ve=nt(L.left,Ie,_e);e.style.top=`${He}px`,e.style.left=`${ve}px`,this.position!==L.pos&&(this.position=L.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
|
|
9195
9198
|
class="scb-tooltip-arrow"
|
|
9196
9199
|
xmlns="http://www.w3.org/2000/svg"
|
|
9197
9200
|
width="13"
|
|
@@ -9382,7 +9385,7 @@ ${this.value}</textarea
|
|
|
9382
9385
|
gap: var(--spacing-3);
|
|
9383
9386
|
align-self: stretch;
|
|
9384
9387
|
}
|
|
9385
|
-
`,
|
|
9388
|
+
`,Ke([l({type:String,reflect:!0})],o.ScbTooltip.prototype,"variant",2),Ke([l({type:Boolean,reflect:!0})],o.ScbTooltip.prototype,"arrow",2),Ke([l({type:String,attribute:"supporting-text"})],o.ScbTooltip.prototype,"supportingtext",2),Ke([l({type:String})],o.ScbTooltip.prototype,"label",2),Ke([l({type:String,reflect:!0})],o.ScbTooltip.prototype,"trigger",2),Ke([l({type:String,reflect:!0})],o.ScbTooltip.prototype,"position",2),Ke([l({type:Boolean,reflect:!0})],o.ScbTooltip.prototype,"open",2),Ke([l({type:Number,reflect:!0})],o.ScbTooltip.prototype,"delay",2),Ke([l({type:Number,reflect:!0})],o.ScbTooltip.prototype,"offset",2),o.ScbTooltip=Ke([y("scb-tooltip")],o.ScbTooltip);var lb=Object.defineProperty,cb=Object.getOwnPropertyDescriptor,Rl=a=>{throw TypeError(a)},ue=(a,e,t,i)=>{for(var r=i>1?void 0:i?cb(e,t):e,s=a.length-1,n;s>=0;s--)(n=a[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&lb(e,t,r),r},db=(a,e,t)=>e.has(a)||Rl("Cannot "+t),hb=(a,e,t)=>e.has(a)?Rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),rr=(a,e,t)=>(db(a,e,"access private method"),t),Gt,ys,wa;return o.ScbViz=class extends _{constructor(){super(...arguments),hb(this,Gt),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()),rr(this,Gt,ys).call(this)}updated(e){super.updated(e),this._styleSlottedTable(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&rr(this,Gt,ys).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(n=>{n.style.background="var(--md-sys-color-surface-container)"}),r.querySelectorAll("th").forEach(n=>{const d=n;d.style.border="1px solid var(--md-sys-color-on-surface)",d.style.padding="8px"}),r.querySelectorAll("td").forEach(n=>{const d=n;d.style.border="1px solid var(--md-sys-color-on-surface)",d.style.padding="8px"}),r.querySelectorAll("tr").forEach(n=>{const d=Array.from(n.children).filter(h=>h.tagName==="TD"||h.tagName==="TH");d.length>0&&(d[0].style.borderLeft="none",d[d.length-1].style.borderRight="none")})}})}render(){switch(this.variant){case"Table":return c`
|
|
9386
9389
|
<div part="container">
|
|
9387
9390
|
<div class="header">
|
|
9388
9391
|
${this.title?c` <div class="label">${this.title}</div> `:""}
|