scb-wc-test 0.1.77 → 0.1.79
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-dialog/scb-dialog.js +3 -3
- package/mvc/components/scb-drawer/scb-drawer.js +2 -2
- package/mvc/components/scb-radio-button/scb-radio-button.js +1 -1
- package/package.json +2 -2
- package/scb-dialog/scb-dialog.js +1 -1
- package/scb-drawer/scb-drawer.js +2 -2
- package/scb-radio-button/scb-radio-button.js +15 -14
- package/scb-wc-test.bundle.js +33 -33
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-textfield/scb-textfield.js","../../vendor/preload-helper.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../../vendor/vendor-material.js","../scb-checkbox/scb-checkbox-group.js","../scb-radio-button/scb-radio-button.js","../scb-switch/scb-switch.js","../scb-chip/scb-chip.js","../scb-button/scb-button.js","../scb-icon-button/scb-icon-button.js","../scb-tooltip/scb-tooltip.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as d}from"../../vendor/preload-helper.js";import{a as h,n,i as m,E as p,x as a,t as _}from"../../vendor/vendor.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(o,c,r){try{customElements.get(o)||e(o,c,r)}catch(u){var l=String(u||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw u}}}}catch{}})();var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,s=(t,e,o,c)=>{for(var r=c>1?void 0:c?f(e,o):e,l=t.length-1,u;l>=0;l--)(u=t[l])&&(r=(c?u(e,o,r):u(r))||r);return c&&r&&b(e,o,r),r};let i=class extends m{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>d(()=>import("../scb-textfield/scb-textfield.js"),__vite__mapDeps([0,1,2]),import.meta.url),"SCB-CHECKBOX":()=>d(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([3,2,4,5]),import.meta.url),"SCB-RADIO-BUTTON":()=>d(()=>import("../scb-radio-button/scb-radio-button.js"),__vite__mapDeps([6,2,4]),import.meta.url),"SCB-SWITCH":()=>d(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../scb-textfield/scb-textfield.js","../../vendor/preload-helper.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../../vendor/vendor-material.js","../scb-checkbox/scb-checkbox-group.js","../scb-radio-button/scb-radio-button.js","../scb-radio-button/scb-radio-group.js","../scb-switch/scb-switch.js","../scb-chip/scb-chip.js","../scb-button/scb-button.js","../scb-icon-button/scb-icon-button.js","../scb-tooltip/scb-tooltip.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as d}from"../../vendor/preload-helper.js";import{a as h,n,i as m,E as p,x as a,t as _}from"../../vendor/vendor.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(o,c,r){try{customElements.get(o)||e(o,c,r)}catch(u){var l=String(u||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw u}}}}catch{}})();var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,s=(t,e,o,c)=>{for(var r=c>1?void 0:c?f(e,o):e,l=t.length-1,u;l>=0;l--)(u=t[l])&&(r=(c?u(e,o,r):u(r))||r);return c&&r&&b(e,o,r),r};let i=class extends m{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>d(()=>import("../scb-textfield/scb-textfield.js"),__vite__mapDeps([0,1,2]),import.meta.url),"SCB-CHECKBOX":()=>d(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([3,2,4,5]),import.meta.url),"SCB-RADIO-BUTTON":()=>d(()=>import("../scb-radio-button/scb-radio-button.js"),__vite__mapDeps([6,2,4,7]),import.meta.url),"SCB-SWITCH":()=>d(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([8,1,2]),import.meta.url),"SCB-CHIP":()=>d(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([9,1,2]),import.meta.url)},this.__onDocumentClick=t=>{this.__getActionFromEvent(t)==="toggle"&&(this.__setOpen(!this.open),t.stopPropagation())},this.__onDocumentKeydown=t=>{this.open&&t.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=()=>{this.shadowRoot?.querySelector("form")?.reset(),(this.shadowRoot?.querySelector("slot")?.assignedElements({flatten:!0})??[]).forEach(e=>{const o=e.tagName;o==="SCB-TEXTFIELD"&&(e.value=""),o==="SCB-CHECKBOX"&&(e.checked=!1),o==="SCB-RADIO-BUTTON"&&(e.checked=!1),o==="SCB-SWITCH"&&(e.selected=!1),o==="SCB-CHIP"&&(e.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{this.shadowRoot?.querySelector("form")?.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=t=>{if(!this.open||t.key!=="Tab")return;const e=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(r=>!r.hasAttribute("disabled"));if(!e.length)return;const o=e[0],c=e[e.length-1];t.shiftKey&&document.activeElement===o?(c.focus(),t.preventDefault()):!t.shiftKey&&document.activeElement===c&&(o.focus(),t.preventDefault())}}async firstUpdated(){await d(()=>import("../scb-button/scb-button.js"),__vite__mapDeps([10,1,2]),import.meta.url),await d(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([11,1,2,4,12,10]),import.meta.url),this.icon&&await d(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([4,2]),import.meta.url),await this.__ensureSlottedDeps()}async __ensureSlottedDeps(){const t=this.shadowRoot?.querySelector("slot");if(!t)return;const e=async o=>{const c=new Set(o.map(r=>r.tagName));for(const r of c){const l=this.__slotDeps[r];l&&await l()}};await e(t.assignedElements({flatten:!0})),t.addEventListener("slotchange",async()=>e(t.assignedElements({flatten:!0})))}__getActionFromEvent(t){if(!this.id)return null;for(const e of t.composedPath())if(e instanceof Element){if(e.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=e,"toggle";if(e.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=e,"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(t){if(t.has("open")){const e=t.get("open");this.__updateTriggersExpanded(),this.open&&!e?this.updateComplete.then(()=>{this.shadowRoot?.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')?.focus?.()}):!this.open&&e&&this.__lastTriggerEl?.focus?.(),this.__toggleScrollLock(this.open)}t.has("icon")&&this.icon&&d(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([4,2]),import.meta.url)}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(t=>{t.hasAttribute("aria-controls")&&t.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(t){if(this.inSb)return;const e=document.documentElement;e.style.overflow=t?"hidden":""}__setOpen(t){this.open=t,this.__fire(t?"open":"close")}__fire(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,composed:!0}))}__slotIsEmpty(){const t=this.shadowRoot?.querySelector("slot");return t?t.assignedElements({flatten:!0}).length===0:!0}renderHeader(t){const e=this.variant==="form"||this.variant==="floating";return a`
|
|
3
3
|
<div class="header">
|
|
4
4
|
<div class="title">
|
|
5
5
|
${this.icon?a`<md-icon class="dialog-icon">${this.icon}</md-icon>`:p}
|
|
@@ -49,7 +49,7 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as h,n,i as m,E as p
|
|
|
49
49
|
:host {
|
|
50
50
|
display:block;
|
|
51
51
|
position:relative;
|
|
52
|
-
font-family:
|
|
52
|
+
font-family: var(--brand, Inter);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.scrim {
|
|
@@ -37,6 +37,7 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
37
37
|
color: var(--md-sys-color-on-surface);
|
|
38
38
|
padding: var(--spacing-4, 12px);
|
|
39
39
|
background: var(--md-sys-color-surface-container-low);
|
|
40
|
+
font-family: var(--brand-font);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
:host([floating]) {
|
|
@@ -57,6 +58,7 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
57
58
|
visibility: hidden;
|
|
58
59
|
pointer-events: none;
|
|
59
60
|
will-change: transform;
|
|
61
|
+
font-family: var(--brand-font);
|
|
60
62
|
}
|
|
61
63
|
@media (prefers-reduced-motion: reduce) {
|
|
62
64
|
:host([floating]) { transition: none; }
|
|
@@ -83,7 +85,6 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
.scb-drawer-label {
|
|
86
|
-
font-family: var(--brand-font);
|
|
87
88
|
font-size: var(--md-sys-typescale-label-large-size);
|
|
88
89
|
line-height: var(--md-sys-typescale-label-large-line-height);
|
|
89
90
|
font-weight: var(--md-sys-typescale-label-large-weight, var(--weight-semibold));
|
|
@@ -92,7 +93,6 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
.scb-drawer-sublabel {
|
|
95
|
-
font-family: var(--brand-font);
|
|
96
96
|
font-size: var(--md-sys-typescale-body-small-size);
|
|
97
97
|
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
98
98
|
font-weight: var(--md-sys-typescale-body-small-weight, var(--weight-regular));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as p,x as c,a as h,n as l,t as u}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,o,i){try{customElements.get(r)||t(r,o,i)}catch(d){var n=String(d||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(e,t,r,o)=>{for(var i=o>1?void 0:o?b(t,r):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(i=(o?d(t,r,i):d(i))||i);return o&&i&&g(t,r,i),i};let a=class extends p{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(){const e=this.shadowRoot?.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`
|
|
1
|
+
import{i as p,x as c,a as h,n as l,t as u}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"./scb-radio-group.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,o,i){try{customElements.get(r)||t(r,o,i)}catch(d){var n=String(d||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(e,t,r,o)=>{for(var i=o>1?void 0:o?b(t,r):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(i=(o?d(t,r,i):d(i))||i);return o&&i&&g(t,r,i),i};let a=class extends p{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(){const e=this.shadowRoot?.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`
|
|
2
2
|
<label class="wrap">
|
|
3
3
|
<div class="radio-wrap">
|
|
4
4
|
<md-radio
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -304,5 +304,5 @@
|
|
|
304
304
|
},
|
|
305
305
|
"./mvc/*": "./mvc/*"
|
|
306
306
|
},
|
|
307
|
-
"buildHash": "
|
|
307
|
+
"buildHash": "A025DA143C5C313400B4618F2D2CE0FC2482C46E11E183E4BBFECB47B52CD149"
|
|
308
308
|
}
|
package/scb-dialog/scb-dialog.js
CHANGED
package/scb-drawer/scb-drawer.js
CHANGED
|
@@ -175,6 +175,7 @@ e.styles = u`
|
|
|
175
175
|
color: var(--md-sys-color-on-surface);
|
|
176
176
|
padding: var(--spacing-4, 12px);
|
|
177
177
|
background: var(--md-sys-color-surface-container-low);
|
|
178
|
+
font-family: var(--brand-font);
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
:host([floating]) {
|
|
@@ -195,6 +196,7 @@ e.styles = u`
|
|
|
195
196
|
visibility: hidden;
|
|
196
197
|
pointer-events: none;
|
|
197
198
|
will-change: transform;
|
|
199
|
+
font-family: var(--brand-font);
|
|
198
200
|
}
|
|
199
201
|
@media (prefers-reduced-motion: reduce) {
|
|
200
202
|
:host([floating]) { transition: none; }
|
|
@@ -221,7 +223,6 @@ e.styles = u`
|
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
.scb-drawer-label {
|
|
224
|
-
font-family: var(--brand-font);
|
|
225
226
|
font-size: var(--md-sys-typescale-label-large-size);
|
|
226
227
|
line-height: var(--md-sys-typescale-label-large-line-height);
|
|
227
228
|
font-weight: var(--md-sys-typescale-label-large-weight, var(--weight-semibold));
|
|
@@ -230,7 +231,6 @@ e.styles = u`
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
.scb-drawer-sublabel {
|
|
233
|
-
font-family: var(--brand-font);
|
|
234
234
|
font-size: var(--md-sys-typescale-body-small-size);
|
|
235
235
|
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
236
236
|
font-weight: var(--md-sys-typescale-body-small-weight, var(--weight-regular));
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LitElement as c, html as p, css as h } from "lit";
|
|
2
2
|
import { property as s, customElement as u } from "lit/decorators.js";
|
|
3
3
|
import "@material/web/radio/radio.js";
|
|
4
|
+
import "./scb-radio-group.js";
|
|
4
5
|
var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, r = (e, t, n, o) => {
|
|
5
|
-
for (var
|
|
6
|
-
(l = e[d]) && (
|
|
7
|
-
return o &&
|
|
6
|
+
for (var a = o > 1 ? void 0 : o ? m(t, n) : t, d = e.length - 1, l; d >= 0; d--)
|
|
7
|
+
(l = e[d]) && (a = (o ? l(t, n, a) : l(a)) || a);
|
|
8
|
+
return o && a && g(t, n, a), a;
|
|
8
9
|
};
|
|
9
|
-
let
|
|
10
|
+
let i = class extends c {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments), this.disabled = !1, this.checked = !1, this.name = "", this.value = "", this.label = "", this.supportingText = "", this._radioId = "", this._onMdRadioChange = (e) => {
|
|
12
13
|
if (this.disabled) return;
|
|
@@ -77,7 +78,7 @@ let a = class extends c {
|
|
|
77
78
|
`;
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
|
-
|
|
81
|
+
i.styles = h`
|
|
81
82
|
/* layout med inline-grid */
|
|
82
83
|
:host {
|
|
83
84
|
display: inline-grid;
|
|
@@ -146,25 +147,25 @@ a.styles = h`
|
|
|
146
147
|
`;
|
|
147
148
|
r([
|
|
148
149
|
s({ type: Boolean, reflect: !0 })
|
|
149
|
-
],
|
|
150
|
+
], i.prototype, "disabled", 2);
|
|
150
151
|
r([
|
|
151
152
|
s({ type: Boolean, reflect: !0 })
|
|
152
|
-
],
|
|
153
|
+
], i.prototype, "checked", 2);
|
|
153
154
|
r([
|
|
154
155
|
s({ type: String, reflect: !0 })
|
|
155
|
-
],
|
|
156
|
+
], i.prototype, "name", 2);
|
|
156
157
|
r([
|
|
157
158
|
s({ type: String, reflect: !0 })
|
|
158
|
-
],
|
|
159
|
+
], i.prototype, "value", 2);
|
|
159
160
|
r([
|
|
160
161
|
s({ type: String })
|
|
161
|
-
],
|
|
162
|
+
], i.prototype, "label", 2);
|
|
162
163
|
r([
|
|
163
164
|
s({ type: String, attribute: "supporting-text" })
|
|
164
|
-
],
|
|
165
|
-
|
|
165
|
+
], i.prototype, "supportingText", 2);
|
|
166
|
+
i = r([
|
|
166
167
|
u("scb-radio-button")
|
|
167
|
-
],
|
|
168
|
+
], i);
|
|
168
169
|
export {
|
|
169
|
-
|
|
170
|
+
i as ScbRadioButton
|
|
170
171
|
};
|
package/scb-wc-test.bundle.js
CHANGED
|
@@ -3812,7 +3812,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
3812
3812
|
color: var(--md-sys-color-on-surface);
|
|
3813
3813
|
}
|
|
3814
3814
|
}
|
|
3815
|
-
`,Se([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Se([l({type:String})],a.ScbChip.prototype,"label",2),Se([l({type:String})],a.ScbChip.prototype,"icon",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Se([l({type:String})],a.ScbChip.prototype,"href",2),Se([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=Se([f("scb-chip")],a.ScbChip);const _d=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,V=(o,e,t,i)=>{for(var r=i>1?void 0:i?wd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&xd(e,t,r),r};a.ScbDialog=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>Promise.resolve().then(()=>dp),"SCB-CHECKBOX":()=>Promise.resolve().then(()=>ns),"SCB-RADIO-BUTTON":()=>Promise.resolve().then(()=>
|
|
3815
|
+
`,Se([l({type:String,reflect:!0})],a.ScbChip.prototype,"variant",2),Se([l({type:String})],a.ScbChip.prototype,"label",2),Se([l({type:String})],a.ScbChip.prototype,"icon",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"disabled",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"elevated",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"removable",2),Se([l({type:Boolean,reflect:!0})],a.ScbChip.prototype,"selected",2),Se([l({type:String})],a.ScbChip.prototype,"href",2),Se([l({type:String})],a.ScbChip.prototype,"target",2),a.ScbChip=Se([f("scb-chip")],a.ScbChip);const _d=Object.freeze(Object.defineProperty({__proto__:null,get ScbChip(){return a.ScbChip}},Symbol.toStringTag,{value:"Module"}));var xd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,V=(o,e,t,i)=>{for(var r=i>1?void 0:i?wd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&xd(e,t,r),r};a.ScbDialog=class extends y{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.scrimClose=!0,this.variant="basic",this.label="",this.icon="",this.supportingText="",this.okButton="OK",this.cancelButton="Avbryt",this.deleteButton="Delete",this.confirmButton="Ta bort",this.denyButton="Avbryt",this.resetButton="Återställ",this.submitButton="Spara",this.formId="",this.formAction="",this.formMethod="",this.__lastTriggerEl=null,this.__slotDeps={"SCB-TEXTFIELD":()=>Promise.resolve().then(()=>dp),"SCB-CHECKBOX":()=>Promise.resolve().then(()=>ns),"SCB-RADIO-BUTTON":()=>Promise.resolve().then(()=>Rh),"SCB-SWITCH":()=>Promise.resolve().then(()=>$s),"SCB-CHIP":()=>Promise.resolve().then(()=>_d)},this.__onDocumentClick=e=>{this.__getActionFromEvent(e)==="toggle"&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var t,i,r,s;(i=(t=this.shadowRoot)==null?void 0:t.querySelector("form"))==null||i.reset(),(((s=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}))??[]).forEach(n=>{const h=n.tagName;h==="SCB-TEXTFIELD"&&(n.value=""),h==="SCB-CHECKBOX"&&(n.checked=!1),h==="SCB-RADIO-BUTTON"&&(n.checked=!1),h==="SCB-SWITCH"&&(n.selected=!1),h==="SCB-CHIP"&&(n.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var e,t;(t=(e=this.shadowRoot)==null?void 0:e.querySelector("form"))==null||t.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!=="Tab")return;const t=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled"));if(!t.length)return;const i=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===i?(r.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===r&&(i.focus(),e.preventDefault())}}async firstUpdated(){await Promise.resolve().then(()=>Tc),await Promise.resolve().then(()=>Qa),this.icon&&await Promise.resolve().then(()=>Y),await this.__ensureSlottedDeps()}async __ensureSlottedDeps(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=async r=>{const s=new Set(r.map(n=>n.tagName));for(const n of s){const h=this.__slotDeps[n];h&&await h()}};await t(e.assignedElements({flatten:!0})),e.addEventListener("slotchange",async()=>t(e.assignedElements({flatten:!0})))}__getActionFromEvent(e){if(!this.id)return null;for(const t of e.composedPath())if(t instanceof Element){if(t.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=t,"toggle";if(t.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=t,"toggle"}return null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}updated(e){var t,i;if(e.has("open")){const r=e.get("open");this.__updateTriggersExpanded(),this.open&&!r?this.updateComplete.then(()=>{var s,n,h;(h=(n=(s=this.shadowRoot)==null?void 0:s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'))==null?void 0:n.focus)==null||h.call(n)}):!this.open&&r&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}e.has("icon")&&this.icon&&Promise.resolve().then(()=>Y)}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(e){if(this.inSb)return;const t=document.documentElement;t.style.overflow=e?"hidden":""}__setOpen(e){this.open=e,this.__fire(e?"open":"close")}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__slotIsEmpty(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).length===0:!0}renderHeader(e){const t=this.variant==="form"||this.variant==="floating";return c`
|
|
3816
3816
|
<div class="header">
|
|
3817
3817
|
<div class="title">
|
|
3818
3818
|
${this.icon?c`<md-icon class="dialog-icon">${this.icon}</md-icon>`:u}
|
|
@@ -3862,7 +3862,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
3862
3862
|
:host {
|
|
3863
3863
|
display:block;
|
|
3864
3864
|
position:relative;
|
|
3865
|
-
font-family:
|
|
3865
|
+
font-family: var(--brand, Inter);
|
|
3866
3866
|
}
|
|
3867
3867
|
|
|
3868
3868
|
.scrim {
|
|
@@ -4241,6 +4241,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
4241
4241
|
color: var(--md-sys-color-on-surface);
|
|
4242
4242
|
padding: var(--spacing-4, 12px);
|
|
4243
4243
|
background: var(--md-sys-color-surface-container-low);
|
|
4244
|
+
font-family: var(--brand-font);
|
|
4244
4245
|
}
|
|
4245
4246
|
|
|
4246
4247
|
:host([floating]) {
|
|
@@ -4261,6 +4262,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
4261
4262
|
visibility: hidden;
|
|
4262
4263
|
pointer-events: none;
|
|
4263
4264
|
will-change: transform;
|
|
4265
|
+
font-family: var(--brand-font);
|
|
4264
4266
|
}
|
|
4265
4267
|
@media (prefers-reduced-motion: reduce) {
|
|
4266
4268
|
:host([floating]) { transition: none; }
|
|
@@ -4287,7 +4289,6 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
4287
4289
|
}
|
|
4288
4290
|
|
|
4289
4291
|
.scb-drawer-label {
|
|
4290
|
-
font-family: var(--brand-font);
|
|
4291
4292
|
font-size: var(--md-sys-typescale-label-large-size);
|
|
4292
4293
|
line-height: var(--md-sys-typescale-label-large-line-height);
|
|
4293
4294
|
font-weight: var(--md-sys-typescale-label-large-weight, var(--weight-semibold));
|
|
@@ -4296,7 +4297,6 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
4296
4297
|
}
|
|
4297
4298
|
|
|
4298
4299
|
.scb-drawer-sublabel {
|
|
4299
|
-
font-family: var(--brand-font);
|
|
4300
4300
|
font-size: var(--md-sys-typescale-body-small-size);
|
|
4301
4301
|
line-height: var(--md-sys-typescale-body-small-line-height);
|
|
4302
4302
|
font-weight: var(--md-sys-typescale-body-small-weight, var(--weight-regular));
|
|
@@ -6071,7 +6071,34 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
6071
6071
|
50% { margin-left: 30%; width: 60%; }
|
|
6072
6072
|
100% { margin-left: 100%; width: 40%; }
|
|
6073
6073
|
}
|
|
6074
|
-
`],ci([l({type:String})],a.ScbProgressIndicator.prototype,"id",2),ci([l({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),ci([l({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),ci([l({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=ci([f("scb-progress-indicator")],a.ScbProgressIndicator);var Th=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,
|
|
6074
|
+
`],ci([l({type:String})],a.ScbProgressIndicator.prototype,"id",2),ci([l({type:String,reflect:!0})],a.ScbProgressIndicator.prototype,"type",2),ci([l({type:Number,reflect:!0})],a.ScbProgressIndicator.prototype,"progress",2),ci([l({type:Boolean,attribute:"is-static"})],a.ScbProgressIndicator.prototype,"isStatic",2),a.ScbProgressIndicator=ci([f("scb-progress-indicator")],a.ScbProgressIndicator);var Th=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,xs=o=>{throw TypeError(o)},Tt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Oh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Th(e,t,r),r},Ph=(o,e,t)=>e.has(o)||xs("Cannot "+t),di=(o,e,t)=>(Ph(o,e,"read from private field"),t?t.call(o):e.get(o)),ws=(o,e,t)=>e.has(o)?xs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),hi,ur;a.ScbRadioGroup=class extends y{constructor(){super(...arguments),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="item",ws(this,hi,()=>{var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-radio-button");for(const r of t)this.name&&r.setAttribute("name",this.name),this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled"),this.orientation==="horizontal"?r.setAttribute("orientation","horizontal"):r.removeAttribute("orientation"),this.spacing==="group"?r.style.setProperty("--scb-radio-gap","0"):r.style.removeProperty("--scb-radio-gap")}),ws(this,ur,e=>{var r,s;const t=e.composedPath().find(n=>{var h;return((h=n==null?void 0:n.tagName)==null?void 0:h.toLowerCase())==="scb-radio-button"}),i=(t==null?void 0:t.value)??((r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,"value"))??((s=e.target)==null?void 0:s.value)??"";this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
6075
|
+
<div
|
|
6076
|
+
class="g"
|
|
6077
|
+
role="radiogroup"
|
|
6078
|
+
aria-disabled=${String(this.disabled)}
|
|
6079
|
+
aria-label=${this.ariaLabel??""}
|
|
6080
|
+
style=${`--_dir:${e}`}
|
|
6081
|
+
>
|
|
6082
|
+
<slot @slotchange=${di(this,hi)}></slot>
|
|
6083
|
+
</div>
|
|
6084
|
+
`}firstUpdated(){di(this,hi).call(this),this.addEventListener("change",di(this,ur))}disconnectedCallback(){this.removeEventListener("change",di(this,ur)),super.disconnectedCallback()}updated(e){(e.has("name")||e.has("disabled")||e.has("orientation"))&&di(this,hi).call(this)}},hi=new WeakMap,ur=new WeakMap,a.ScbRadioGroup.styles=b`
|
|
6085
|
+
:host { display: block; }
|
|
6086
|
+
|
|
6087
|
+
.g {
|
|
6088
|
+
display: flex;
|
|
6089
|
+
flex-direction: var(--_dir, column);
|
|
6090
|
+
gap: 0; /* default: inget extra gap */
|
|
6091
|
+
align-items: flex-start;
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6094
|
+
/* Om gruppen ska äga spacing: använder gap och nollar radios egen syskonmarginal */
|
|
6095
|
+
:host([spacing="group"]) .g {
|
|
6096
|
+
gap: var(--scb-radio-gap, 12px);
|
|
6097
|
+
}
|
|
6098
|
+
:host([spacing="group"]) ::slotted(scb-radio-button) {
|
|
6099
|
+
--scb-radio-gap: 0;
|
|
6100
|
+
}
|
|
6101
|
+
`,Tt([l({type:String})],a.ScbRadioGroup.prototype,"name",2),Tt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Tt([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Tt([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Tt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=Tt([f("scb-radio-group")],a.ScbRadioGroup);var Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Lh(e,t,r),r};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`
|
|
6075
6102
|
<label class="wrap">
|
|
6076
6103
|
<div class="radio-wrap">
|
|
6077
6104
|
<md-radio
|
|
@@ -6159,34 +6186,7 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
|
|
|
6159
6186
|
.lbl { color: var(--md-sys-color-on-surface); }
|
|
6160
6187
|
.supporting-text { color: var(--md-sys-color-on-surface-variant); }
|
|
6161
6188
|
}
|
|
6162
|
-
`,ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),ut([l({type:String})],a.ScbRadioButton.prototype,"label",2),ut([l({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=ut([f("scb-radio-button")],a.ScbRadioButton);const
|
|
6163
|
-
<div
|
|
6164
|
-
class="g"
|
|
6165
|
-
role="radiogroup"
|
|
6166
|
-
aria-disabled=${String(this.disabled)}
|
|
6167
|
-
aria-label=${this.ariaLabel??""}
|
|
6168
|
-
style=${`--_dir:${e}`}
|
|
6169
|
-
>
|
|
6170
|
-
<slot @slotchange=${di(this,hi)}></slot>
|
|
6171
|
-
</div>
|
|
6172
|
-
`}firstUpdated(){di(this,hi).call(this),this.addEventListener("change",di(this,ur))}disconnectedCallback(){this.removeEventListener("change",di(this,ur)),super.disconnectedCallback()}updated(e){(e.has("name")||e.has("disabled")||e.has("orientation"))&&di(this,hi).call(this)}},hi=new WeakMap,ur=new WeakMap,a.ScbRadioGroup.styles=b`
|
|
6173
|
-
:host { display: block; }
|
|
6174
|
-
|
|
6175
|
-
.g {
|
|
6176
|
-
display: flex;
|
|
6177
|
-
flex-direction: var(--_dir, column);
|
|
6178
|
-
gap: 0; /* default: inget extra gap */
|
|
6179
|
-
align-items: flex-start;
|
|
6180
|
-
}
|
|
6181
|
-
|
|
6182
|
-
/* Om gruppen ska äga spacing: använder gap och nollar radios egen syskonmarginal */
|
|
6183
|
-
:host([spacing="group"]) .g {
|
|
6184
|
-
gap: var(--scb-radio-gap, 12px);
|
|
6185
|
-
}
|
|
6186
|
-
:host([spacing="group"]) ::slotted(scb-radio-button) {
|
|
6187
|
-
--scb-radio-gap: 0;
|
|
6188
|
-
}
|
|
6189
|
-
`,Tt([l({type:String})],a.ScbRadioGroup.prototype,"name",2),Tt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Tt([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Tt([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Tt([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=Tt([f("scb-radio-group")],a.ScbRadioGroup);var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Ot=(o,e,t,i)=>{for(var r=i>1?void 0:i?Mh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Bh(e,t,r),r};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var n;const e=this.parentElement,t=(n=e==null?void 0:e.hasAttribute)==null?void 0:n.call(e,"disabled"),i=this.disabled||t,r=!!this.icon,s=!!this.label;return c`
|
|
6189
|
+
`,ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"disabled",2),ut([l({type:Boolean,reflect:!0})],a.ScbRadioButton.prototype,"checked",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"name",2),ut([l({type:String,reflect:!0})],a.ScbRadioButton.prototype,"value",2),ut([l({type:String})],a.ScbRadioButton.prototype,"label",2),ut([l({type:String,attribute:"supporting-text"})],a.ScbRadioButton.prototype,"supportingText",2),a.ScbRadioButton=ut([f("scb-radio-button")],a.ScbRadioButton);const Rh=Object.freeze(Object.defineProperty({__proto__:null,get ScbRadioButton(){return a.ScbRadioButton}},Symbol.toStringTag,{value:"Module"}));var Bh=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Ot=(o,e,t,i)=>{for(var r=i>1?void 0:i?Mh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Bh(e,t,r),r};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var n;const e=this.parentElement,t=(n=e==null?void 0:e.hasAttribute)==null?void 0:n.call(e,"disabled"),i=this.disabled||t,r=!!this.icon,s=!!this.label;return c`
|
|
6190
6190
|
<div class="segmented-item${r||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${i?"true":"false"}">
|
|
6191
6191
|
<md-ripple ?disabled="${i}"></md-ripple>
|
|
6192
6192
|
${this.selected?r&&s?c`<md-icon>check</md-icon>`:r?c`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>`:c`<md-icon>check</md-icon>`:r?c`<md-icon>${this.icon}</md-icon>`:""}
|