scb-wc-test 0.1.78 → 0.1.80

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,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([7,1,2]),import.meta.url),"SCB-CHIP":()=>d(()=>import("../scb-chip/scb-chip.js"),__vite__mapDeps([8,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([9,1,2]),import.meta.url),await d(()=>import("../scb-icon-button/scb-icon-button.js"),__vite__mapDeps([10,1,2,4,11,9]),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`
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}
@@ -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
@@ -1,85 +1,122 @@
1
- import{a as p,n as r,i as m,x as a,t as u}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(e,c,i){try{customElements.get(e)||o(e,c,i)}catch(d){var l=String(d||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var h=Object.defineProperty,b=Object.getOwnPropertyDescriptor,n=(t,o,e,c)=>{for(var i=c>1?void 0:c?b(o,e):o,l=t.length-1,d;l>=0;l--)(d=t[l])&&(i=(c?d(o,e,i):d(i))||i);return c&&i&&h(o,e,i),i};let s=class extends m{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action")),this.open=!1}handleClose(){this.dispatchEvent(new CustomEvent("snackbar-close")),this.open=!1}updated(t){super.updated(t),t.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open")):this.dispatchEvent(new CustomEvent("snackbar-close"))),(t.has("open")||t.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const t=!!this.actionText,o=!!this.showClose;let e="snackbar";return!t&&!o&&(e+=" no-actions"),this.withLongerAction&&(e+=" longer-action"),a`
2
- <div class="${e}" ?hidden=${!this.open}>
3
- ${this.withLongerAction?a`
4
- <div class="message">${this.message}</div>
5
- <div class="actions">
6
- ${t?a`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>`:""}
7
- ${o?a`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>`:""}
8
- </div>
9
- `:a`
10
- <span class="message">${this.message}</span>
11
- ${t?a`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>`:""}
12
- ${o?a`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>`:""}
13
- `}
14
-
15
- </div>
16
- `}};s.styles=p`
17
- :host {
18
- position: relative;
19
- display: block;
20
- min-width: 312px;
21
- max-width: 560px;
22
- }
23
- :host([fixed]) {
24
- position: fixed;
25
- z-index: 9999;
26
- left: 50%;
27
- bottom: 24px;
28
- transform: translateX(-50%);
29
- }
30
- .snackbar {
31
- background: var(--md-sys-color-inverse-surface);
32
- color: var(--md-sys-color-inverse-on-surface);
33
- border-radius: var(--md-sys-shape-corner-extra-small);
34
- box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.30);
35
- display: flex;
36
- align-items: center;
37
- padding: 14px var(--spacing-5);
38
- opacity: 0;
39
- transition: opacity 0.3s, bottom 0.3s;
40
- pointer-events: auto;
41
- position: relative;
42
- }
43
- .snackbar.longer-action {
44
- flex-direction: column;
45
- align-items: flex-start;
46
- }
47
- .snackbar .actions {
48
- display: flex;
49
- margin-top: 10px;
50
- width: 100%;
51
- justify-content: flex-end;
52
-
53
- }
54
- .message.no-actions {
55
- margin-right: 0;
56
- }
57
- :host([open]) .snackbar {
58
- opacity: 1;
59
- pointer-events: auto;
60
- }
61
- .message {
62
- flex: 1 1 auto;
63
- margin-right: var(--spacing-2);
64
- font-size: var(--md-sys-typescale-body-medium-size);
65
- line-height: var(--md-sys-typescale-body-medium-line-height);
66
- letter-spacing: var(--md-sys-typescale-body-medium-tracking);
67
- }
68
- .snackbar scb-icon-button{
69
- --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
70
- --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
71
- --md-icon-button-hover-state-layer-color: var(--md-sys-color-surface-container);
72
- --md-icon-button-focus-icon-color: var(--md-sys-color-inverse-on-surface);
73
- --md-icon-button-pressed-icon-color: var(--md-sys-color-inverse-on-surface);
74
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
75
- }
76
- .snackbar scb-button{
77
- --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
78
- --md-text-button-hover-label-text-color: var(--md-sys-color-inverse-primary);
79
- --md-text-button-hover-state-layer-color: var(--md-sys-color-surface-container);
80
- --md-text-button-focus-label-text-color: var(--md-sys-color-inverse-primary);
81
- --md-text-button-pressed-label-text-color: var(--md-sys-color-inverse-primary);
82
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
83
- }
84
-
85
- `;n([r({type:String})],s.prototype,"message",2);n([r({type:Boolean,reflect:!0})],s.prototype,"open",2);n([r({type:String,attribute:"action-text"})],s.prototype,"actionText",2);n([r({type:Boolean,attribute:"show-close"})],s.prototype,"showClose",2);n([r({type:Boolean,reflect:!0})],s.prototype,"fixed",2);n([r({type:Boolean})],s.prototype,"fadeout",2);n([r({type:Boolean,attribute:"with-longer-action"})],s.prototype,"withLongerAction",2);s=n([u("scb-snackbar")],s);
1
+ import{a as p,n as r,i as u,x as a,t as m}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-button/scb-button.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(t,c,i){try{customElements.get(t)||o(t,c,i)}catch(d){var l=String(d||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var b=Object.defineProperty,h=Object.getOwnPropertyDescriptor,n=(e,o,t,c)=>{for(var i=c>1?void 0:c?h(o,t):o,l=e.length-1,d;l>=0;l--)(d=e[l])&&(i=(c?d(o,t,i):d(i))||i);return c&&i&&b(o,t,i),i};let s=class extends u{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action",{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("snackbar-close",{bubbles:!0,composed:!0}))),(e.has("open")||e.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const e=!!this.actionText,o=!!this.showClose;let t="snackbar";return!e&&!o&&(t+=" no-actions"),this.withLongerAction&&(t+=" longer-action"),a`
2
+ <div class="${t}" ?hidden=${!this.open}>
3
+ ${this.withLongerAction?a`
4
+ <div class="message">${this.message}</div>
5
+ <div class="actions">
6
+ ${e?a`
7
+ <scb-button
8
+ variant="text"
9
+ label=${this.actionText}
10
+ @click=${this.handleAction}
11
+ ></scb-button>
12
+ `:""}
13
+ ${o?a`
14
+ <scb-icon-button
15
+ icon="close"
16
+ @click=${this.handleClose}
17
+ aria-label="Stäng"
18
+ ></scb-icon-button>
19
+ `:""}
20
+ </div>
21
+ `:a`
22
+ <span class="message">${this.message}</span>
23
+ ${e?a`
24
+ <scb-button
25
+ variant="text"
26
+ label=${this.actionText}
27
+ @click=${this.handleAction}
28
+ ></scb-button>
29
+ `:""}
30
+ ${o?a`
31
+ <scb-icon-button
32
+ icon="close"
33
+ @click=${this.handleClose}
34
+ aria-label="Stäng"
35
+ ></scb-icon-button>
36
+ `:""}
37
+ `}
38
+ </div>
39
+ `}};s.styles=p`
40
+ :host {
41
+ position: relative;
42
+ display: block;
43
+ min-width: 312px;
44
+ max-width: 560px;
45
+ }
46
+ :host([fixed]) {
47
+ position: fixed;
48
+ z-index: 9999;
49
+ left: 50%;
50
+ bottom: 24px;
51
+ transform: translateX(-50%);
52
+ }
53
+ .snackbar {
54
+ background: var(--md-sys-color-inverse-surface);
55
+ color: var(--md-sys-color-inverse-on-surface);
56
+ border-radius: var(--md-sys-shape-corner-extra-small);
57
+ box-shadow:
58
+ 0 4px 8px 3px rgba(0, 0, 0, 0.15),
59
+ 0 1px 3px 0 rgba(0, 0, 0, 0.3);
60
+ display: flex;
61
+ align-items: center;
62
+ padding: 14px var(--spacing-5);
63
+ opacity: 0;
64
+ transition: opacity 0.3s, bottom 0.3s;
65
+ pointer-events: auto;
66
+ position: relative;
67
+ }
68
+ .snackbar.longer-action {
69
+ flex-direction: column;
70
+ align-items: flex-start;
71
+ }
72
+ .snackbar .actions {
73
+ display: flex;
74
+ margin-top: 10px;
75
+ width: 100%;
76
+ justify-content: flex-end;
77
+ }
78
+ .message.no-actions {
79
+ margin-right: 0;
80
+ }
81
+ :host([open]) .snackbar {
82
+ opacity: 1;
83
+ pointer-events: auto;
84
+ }
85
+ .message {
86
+ flex: 1 1 auto;
87
+ margin-right: var(--spacing-2);
88
+ font-size: var(--md-sys-typescale-body-medium-size);
89
+ line-height: var(--md-sys-typescale-body-medium-line-height);
90
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
91
+ }
92
+ .snackbar scb-icon-button {
93
+ --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
94
+ --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
95
+ --md-icon-button-hover-state-layer-color: var(
96
+ --md-sys-color-surface-container
97
+ );
98
+ --md-icon-button-focus-icon-color: var(
99
+ --md-sys-color-inverse-on-surface
100
+ );
101
+ --md-icon-button-pressed-icon-color: var(
102
+ --md-sys-color-inverse-on-surface
103
+ );
104
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
105
+ }
106
+ .snackbar scb-button {
107
+ --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
108
+ --md-text-button-hover-label-text-color: var(
109
+ --md-sys-color-inverse-primary
110
+ );
111
+ --md-text-button-hover-state-layer-color: var(
112
+ --md-sys-color-surface-container
113
+ );
114
+ --md-text-button-focus-label-text-color: var(
115
+ --md-sys-color-inverse-primary
116
+ );
117
+ --md-text-button-pressed-label-text-color: var(
118
+ --md-sys-color-inverse-primary
119
+ );
120
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
121
+ }
122
+ `;n([r({type:String})],s.prototype,"message",2);n([r({type:Boolean,reflect:!0})],s.prototype,"open",2);n([r({type:String,attribute:"action-text"})],s.prototype,"actionText",2);n([r({type:Boolean,attribute:"show-close"})],s.prototype,"showClose",2);n([r({type:Boolean,reflect:!0})],s.prototype,"fixed",2);n([r({type:Boolean})],s.prototype,"fadeout",2);n([r({type:Boolean,attribute:"with-longer-action"})],s.prototype,"withLongerAction",2);s=n([m("scb-snackbar")],s);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
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": "A4FB9C1F6864EA0D23E8F3197169FF57A872B7DAD82070EAF5A9A6227A255E3D"
307
+ "buildHash": "004FE0A38192DE3DA698A1656F3FEAF00A27AA56AD89D2F315C7283CB54C4350"
308
308
  }
@@ -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 i = o > 1 ? void 0 : o ? m(t, n) : t, d = e.length - 1, l; d >= 0; d--)
6
- (l = e[d]) && (i = (o ? l(t, n, i) : l(i)) || i);
7
- return o && i && g(t, n, i), i;
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 a = class extends c {
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
- a.styles = h`
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
- ], a.prototype, "disabled", 2);
150
+ ], i.prototype, "disabled", 2);
150
151
  r([
151
152
  s({ type: Boolean, reflect: !0 })
152
- ], a.prototype, "checked", 2);
153
+ ], i.prototype, "checked", 2);
153
154
  r([
154
155
  s({ type: String, reflect: !0 })
155
- ], a.prototype, "name", 2);
156
+ ], i.prototype, "name", 2);
156
157
  r([
157
158
  s({ type: String, reflect: !0 })
158
- ], a.prototype, "value", 2);
159
+ ], i.prototype, "value", 2);
159
160
  r([
160
161
  s({ type: String })
161
- ], a.prototype, "label", 2);
162
+ ], i.prototype, "label", 2);
162
163
  r([
163
164
  s({ type: String, attribute: "supporting-text" })
164
- ], a.prototype, "supportingText", 2);
165
- a = r([
165
+ ], i.prototype, "supportingText", 2);
166
+ i = r([
166
167
  u("scb-radio-button")
167
- ], a);
168
+ ], i);
168
169
  export {
169
- a as ScbRadioButton
170
+ i as ScbRadioButton
170
171
  };
@@ -11,6 +11,6 @@ export declare class ScbSnackbar extends LitElement {
11
11
  static styles: import('lit').CSSResult;
12
12
  private handleAction;
13
13
  private handleClose;
14
- updated(changedProps: Map<string, any>): void;
14
+ updated(changedProps: Map<string, unknown>): void;
15
15
  render(): import('lit-html').TemplateResult<1>;
16
16
  }
@@ -1,141 +1,193 @@
1
- import { css as d, LitElement as m, html as a } from "lit";
2
- import { property as r, customElement as h } from "lit/decorators.js";
1
+ import { css as d, LitElement as m, html as r } from "lit";
2
+ import { property as a, customElement as u } from "lit/decorators.js";
3
3
  import "../scb-icon-button/scb-icon-button.js";
4
4
  import "../scb-button/scb-button.js";
5
- var u = Object.defineProperty, b = Object.getOwnPropertyDescriptor, s = (t, o, i, c) => {
6
- for (var n = c > 1 ? void 0 : c ? b(o, i) : o, l = t.length - 1, p; l >= 0; l--)
5
+ var b = Object.defineProperty, h = Object.getOwnPropertyDescriptor, s = (t, o, i, c) => {
6
+ for (var n = c > 1 ? void 0 : c ? h(o, i) : o, l = t.length - 1, p; l >= 0; l--)
7
7
  (p = t[l]) && (n = (c ? p(o, i, n) : p(n)) || n);
8
- return c && n && u(o, i, n), n;
8
+ return c && n && b(o, i, n), n;
9
9
  };
10
10
  let e = class extends m {
11
11
  constructor() {
12
12
  super(...arguments), this.message = "", this.open = !1, this.actionText = "", this.showClose = !1, this.fixed = !1, this.fadeout = !1, this.withLongerAction = !1;
13
13
  }
14
14
  handleAction() {
15
- this.dispatchEvent(new CustomEvent("snackbar-action")), this.open = !1;
15
+ this.dispatchEvent(
16
+ new CustomEvent("snackbar-action", {
17
+ bubbles: !0,
18
+ composed: !0
19
+ })
20
+ ), this.open = !1;
16
21
  }
17
22
  handleClose() {
18
- this.dispatchEvent(new CustomEvent("snackbar-close")), this.open = !1;
23
+ this.open = !1;
19
24
  }
20
25
  updated(t) {
21
- super.updated(t), t.has("open") && (this.open ? this.dispatchEvent(new CustomEvent("snackbar-open")) : this.dispatchEvent(new CustomEvent("snackbar-close"))), (t.has("open") || t.has("fadeout")) && (this.open && this.fadeout ? (window.clearTimeout(this._fadeoutTimer), this._fadeoutTimer = window.setTimeout(() => {
26
+ super.updated(t), t.has("open") && (this.open ? this.dispatchEvent(
27
+ new CustomEvent("snackbar-open", {
28
+ bubbles: !0,
29
+ composed: !0
30
+ })
31
+ ) : this.dispatchEvent(
32
+ new CustomEvent("snackbar-close", {
33
+ bubbles: !0,
34
+ composed: !0
35
+ })
36
+ )), (t.has("open") || t.has("fadeout")) && (this.open && this.fadeout ? (window.clearTimeout(this._fadeoutTimer), this._fadeoutTimer = window.setTimeout(() => {
22
37
  this.open = !1;
23
38
  }, 5e3)) : window.clearTimeout(this._fadeoutTimer));
24
39
  }
25
40
  render() {
26
41
  const t = !!this.actionText, o = !!this.showClose;
27
42
  let i = "snackbar";
28
- return !t && !o && (i += " no-actions"), this.withLongerAction && (i += " longer-action"), a`
29
- <div class="${i}" ?hidden=${!this.open}>
30
- ${this.withLongerAction ? a`
31
- <div class="message">${this.message}</div>
32
- <div class="actions">
33
- ${t ? a`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>` : ""}
34
- ${o ? a`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>` : ""}
35
- </div>
36
- ` : a`
37
- <span class="message">${this.message}</span>
38
- ${t ? a`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>` : ""}
39
- ${o ? a`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>` : ""}
40
- `}
41
-
42
- </div>
43
- `;
43
+ return !t && !o && (i += " no-actions"), this.withLongerAction && (i += " longer-action"), r`
44
+ <div class="${i}" ?hidden=${!this.open}>
45
+ ${this.withLongerAction ? r`
46
+ <div class="message">${this.message}</div>
47
+ <div class="actions">
48
+ ${t ? r`
49
+ <scb-button
50
+ variant="text"
51
+ label=${this.actionText}
52
+ @click=${this.handleAction}
53
+ ></scb-button>
54
+ ` : ""}
55
+ ${o ? r`
56
+ <scb-icon-button
57
+ icon="close"
58
+ @click=${this.handleClose}
59
+ aria-label="Stäng"
60
+ ></scb-icon-button>
61
+ ` : ""}
62
+ </div>
63
+ ` : r`
64
+ <span class="message">${this.message}</span>
65
+ ${t ? r`
66
+ <scb-button
67
+ variant="text"
68
+ label=${this.actionText}
69
+ @click=${this.handleAction}
70
+ ></scb-button>
71
+ ` : ""}
72
+ ${o ? r`
73
+ <scb-icon-button
74
+ icon="close"
75
+ @click=${this.handleClose}
76
+ aria-label="Stäng"
77
+ ></scb-icon-button>
78
+ ` : ""}
79
+ `}
80
+ </div>
81
+ `;
44
82
  }
45
83
  };
46
84
  e.styles = d`
47
- :host {
48
- position: relative;
49
- display: block;
50
- min-width: 312px;
51
- max-width: 560px;
52
- }
53
- :host([fixed]) {
54
- position: fixed;
55
- z-index: 9999;
56
- left: 50%;
57
- bottom: 24px;
58
- transform: translateX(-50%);
59
- }
60
- .snackbar {
61
- background: var(--md-sys-color-inverse-surface);
62
- color: var(--md-sys-color-inverse-on-surface);
63
- border-radius: var(--md-sys-shape-corner-extra-small);
64
- box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.30);
65
- display: flex;
66
- align-items: center;
67
- padding: 14px var(--spacing-5);
68
- opacity: 0;
69
- transition: opacity 0.3s, bottom 0.3s;
70
- pointer-events: auto;
71
- position: relative;
72
- }
73
- .snackbar.longer-action {
74
- flex-direction: column;
75
- align-items: flex-start;
76
- }
77
- .snackbar .actions {
78
- display: flex;
79
- margin-top: 10px;
80
- width: 100%;
81
- justify-content: flex-end;
82
-
83
- }
84
- .message.no-actions {
85
- margin-right: 0;
86
- }
87
- :host([open]) .snackbar {
88
- opacity: 1;
89
- pointer-events: auto;
90
- }
91
- .message {
92
- flex: 1 1 auto;
93
- margin-right: var(--spacing-2);
94
- font-size: var(--md-sys-typescale-body-medium-size);
95
- line-height: var(--md-sys-typescale-body-medium-line-height);
96
- letter-spacing: var(--md-sys-typescale-body-medium-tracking);
97
- }
98
- .snackbar scb-icon-button{
99
- --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
100
- --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
101
- --md-icon-button-hover-state-layer-color: var(--md-sys-color-surface-container);
102
- --md-icon-button-focus-icon-color: var(--md-sys-color-inverse-on-surface);
103
- --md-icon-button-pressed-icon-color: var(--md-sys-color-inverse-on-surface);
104
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
105
- }
106
- .snackbar scb-button{
107
- --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
108
- --md-text-button-hover-label-text-color: var(--md-sys-color-inverse-primary);
109
- --md-text-button-hover-state-layer-color: var(--md-sys-color-surface-container);
110
- --md-text-button-focus-label-text-color: var(--md-sys-color-inverse-primary);
111
- --md-text-button-pressed-label-text-color: var(--md-sys-color-inverse-primary);
112
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
113
- }
114
-
115
- `;
85
+ :host {
86
+ position: relative;
87
+ display: block;
88
+ min-width: 312px;
89
+ max-width: 560px;
90
+ }
91
+ :host([fixed]) {
92
+ position: fixed;
93
+ z-index: 9999;
94
+ left: 50%;
95
+ bottom: 24px;
96
+ transform: translateX(-50%);
97
+ }
98
+ .snackbar {
99
+ background: var(--md-sys-color-inverse-surface);
100
+ color: var(--md-sys-color-inverse-on-surface);
101
+ border-radius: var(--md-sys-shape-corner-extra-small);
102
+ box-shadow:
103
+ 0 4px 8px 3px rgba(0, 0, 0, 0.15),
104
+ 0 1px 3px 0 rgba(0, 0, 0, 0.3);
105
+ display: flex;
106
+ align-items: center;
107
+ padding: 14px var(--spacing-5);
108
+ opacity: 0;
109
+ transition: opacity 0.3s, bottom 0.3s;
110
+ pointer-events: auto;
111
+ position: relative;
112
+ }
113
+ .snackbar.longer-action {
114
+ flex-direction: column;
115
+ align-items: flex-start;
116
+ }
117
+ .snackbar .actions {
118
+ display: flex;
119
+ margin-top: 10px;
120
+ width: 100%;
121
+ justify-content: flex-end;
122
+ }
123
+ .message.no-actions {
124
+ margin-right: 0;
125
+ }
126
+ :host([open]) .snackbar {
127
+ opacity: 1;
128
+ pointer-events: auto;
129
+ }
130
+ .message {
131
+ flex: 1 1 auto;
132
+ margin-right: var(--spacing-2);
133
+ font-size: var(--md-sys-typescale-body-medium-size);
134
+ line-height: var(--md-sys-typescale-body-medium-line-height);
135
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
136
+ }
137
+ .snackbar scb-icon-button {
138
+ --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
139
+ --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
140
+ --md-icon-button-hover-state-layer-color: var(
141
+ --md-sys-color-surface-container
142
+ );
143
+ --md-icon-button-focus-icon-color: var(
144
+ --md-sys-color-inverse-on-surface
145
+ );
146
+ --md-icon-button-pressed-icon-color: var(
147
+ --md-sys-color-inverse-on-surface
148
+ );
149
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
150
+ }
151
+ .snackbar scb-button {
152
+ --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
153
+ --md-text-button-hover-label-text-color: var(
154
+ --md-sys-color-inverse-primary
155
+ );
156
+ --md-text-button-hover-state-layer-color: var(
157
+ --md-sys-color-surface-container
158
+ );
159
+ --md-text-button-focus-label-text-color: var(
160
+ --md-sys-color-inverse-primary
161
+ );
162
+ --md-text-button-pressed-label-text-color: var(
163
+ --md-sys-color-inverse-primary
164
+ );
165
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
166
+ }
167
+ `;
116
168
  s([
117
- r({ type: String })
169
+ a({ type: String })
118
170
  ], e.prototype, "message", 2);
119
171
  s([
120
- r({ type: Boolean, reflect: !0 })
172
+ a({ type: Boolean, reflect: !0 })
121
173
  ], e.prototype, "open", 2);
122
174
  s([
123
- r({ type: String, attribute: "action-text" })
175
+ a({ type: String, attribute: "action-text" })
124
176
  ], e.prototype, "actionText", 2);
125
177
  s([
126
- r({ type: Boolean, attribute: "show-close" })
178
+ a({ type: Boolean, attribute: "show-close" })
127
179
  ], e.prototype, "showClose", 2);
128
180
  s([
129
- r({ type: Boolean, reflect: !0 })
181
+ a({ type: Boolean, reflect: !0 })
130
182
  ], e.prototype, "fixed", 2);
131
183
  s([
132
- r({ type: Boolean })
184
+ a({ type: Boolean })
133
185
  ], e.prototype, "fadeout", 2);
134
186
  s([
135
- r({ type: Boolean, attribute: "with-longer-action" })
187
+ a({ type: Boolean, attribute: "with-longer-action" })
136
188
  ], e.prototype, "withLongerAction", 2);
137
189
  e = s([
138
- h("scb-snackbar")
190
+ u("scb-snackbar")
139
191
  ], e);
140
192
  export {
141
193
  e as ScbSnackbar
@@ -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(()=>Ph),"SCB-SWITCH":()=>Promise.resolve().then(()=>$s),"SCB-CHIP":()=>Promise.resolve().then(()=>_d)},this.__onDocumentClick=e=>{this.__getActionFromEvent(e)==="toggle"&&(this.__setOpen(!this.open),e.stopPropagation())},this.__onDocumentKeydown=e=>{this.open&&e.key==="Escape"&&(this.__fire("esc"),this.__setOpen(!1))},this.__onScrimClick=()=>{this.scrimClose&&(this.__fire("scrim"),this.__setOpen(!1))},this.__onOk=()=>{this.__fire("ok"),this.__setOpen(!1)},this.__onCancel=()=>{this.__fire("cancel"),this.__setOpen(!1)},this.__onConfirm=()=>{this.__fire("confirm"),this.__setOpen(!1)},this.__onDeny=()=>{this.__fire("deny"),this.__setOpen(!1)},this.__onReset=()=>{var t,i,r,s;(i=(t=this.shadowRoot)==null?void 0:t.querySelector("form"))==null||i.reset(),(((s=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}))??[]).forEach(n=>{const h=n.tagName;h==="SCB-TEXTFIELD"&&(n.value=""),h==="SCB-CHECKBOX"&&(n.checked=!1),h==="SCB-RADIO-BUTTON"&&(n.checked=!1),h==="SCB-SWITCH"&&(n.selected=!1),h==="SCB-CHIP"&&(n.selected=!1)}),this.__fire("reset")},this.__onSubmit=()=>{var e,t;(t=(e=this.shadowRoot)==null?void 0:e.querySelector("form"))==null||t.requestSubmit(),this.__fire("submit"),this.__setOpen(!1)},this.__onKeydownTrap=e=>{if(!this.open||e.key!=="Tab")return;const t=Array.from(this.shadowRoot.querySelectorAll('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled"));if(!t.length)return;const i=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===i?(r.focus(),e.preventDefault()):!e.shiftKey&&document.activeElement===r&&(i.focus(),e.preventDefault())}}async firstUpdated(){await Promise.resolve().then(()=>Tc),await Promise.resolve().then(()=>Qa),this.icon&&await Promise.resolve().then(()=>Y),await this.__ensureSlottedDeps()}async __ensureSlottedDeps(){var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=async r=>{const s=new Set(r.map(n=>n.tagName));for(const n of s){const h=this.__slotDeps[n];h&&await h()}};await t(e.assignedElements({flatten:!0})),e.addEventListener("slotchange",async()=>t(e.assignedElements({flatten:!0})))}__getActionFromEvent(e){if(!this.id)return null;for(const t of e.composedPath())if(t instanceof Element){if(t.getAttribute("data-dialog-toggle")===this.id)return this.__lastTriggerEl=t,"toggle";if(t.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=t,"toggle"}return null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0),this.addEventListener("keydown",this.__onKeydownTrap)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.removeEventListener("keydown",this.__onKeydownTrap),super.disconnectedCallback()}updated(e){var t,i;if(e.has("open")){const r=e.get("open");this.__updateTriggersExpanded(),this.open&&!r?this.updateComplete.then(()=>{var s,n,h;(h=(n=(s=this.shadowRoot)==null?void 0:s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])'))==null?void 0:n.focus)==null||h.call(n)}):!this.open&&r&&((i=(t=this.__lastTriggerEl)==null?void 0:t.focus)==null||i.call(t)),this.__toggleScrollLock(this.open)}e.has("icon")&&this.icon&&Promise.resolve().then(()=>Y)}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-dialog-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__toggleScrollLock(e){if(this.inSb)return;const t=document.documentElement;t.style.overflow=e?"hidden":""}__setOpen(e){this.open=e,this.__fire(e?"open":"close")}__fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}__slotIsEmpty(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");return e?e.assignedElements({flatten:!0}).length===0:!0}renderHeader(e){const t=this.variant==="form"||this.variant==="floating";return c`
3815
+ `,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}
@@ -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,ut=(o,e,t,i)=>{for(var r=i>1?void 0:i?Oh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Th(e,t,r),r};a.ScbRadioButton=class extends y{constructor(){super(...arguments),this.disabled=!1,this.checked=!1,this.name="",this.value="",this.label="",this.supportingText="",this._radioId="",this._onMdRadioChange=e=>{if(this.disabled)return;const t=e.target;t&&t.checked&&(this.checked=!0,this.dispatchEvent(new CustomEvent("scb-radio-change",{detail:{name:this.name,source:this},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{checked:this.checked,value:this.value},bubbles:!0,composed:!0})))},this._onRadioChange=e=>{e.detail.name===this.name&&e.detail.source!==this&&(this.checked=!1)}}connectedCallback(){super.connectedCallback(),this._radioId=this.id||`scb-radio-${Math.random().toString(36).substr(2,9)}`,document.addEventListener("scb-radio-change",this._onRadioChange)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("scb-radio-change",this._onRadioChange)}firstUpdated(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector("md-radio");e&&e.addEventListener("input",()=>{this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))})}updated(e){super.updated(e),e.has("disabled")&&this.toggleAttribute("aria-disabled",this.disabled)}render(){const e=this.supportingText?`${this._radioId}-supporting-text`:void 0;return c`
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 Ph=Object.freeze(Object.defineProperty({__proto__:null,get ScbRadioButton(){return a.ScbRadioButton}},Symbol.toStringTag,{value:"Module"}));var Lh=Object.defineProperty,Dh=Object.getOwnPropertyDescriptor,xs=o=>{throw TypeError(o)},Tt=(o,e,t,i)=>{for(var r=i>1?void 0:i?Dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Lh(e,t,r),r},Rh=(o,e,t)=>e.has(o)||xs("Cannot "+t),di=(o,e,t)=>(Rh(o,e,"read from private field"),t?t.call(o):e.get(o)),ws=(o,e,t)=>e.has(o)?xs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),hi,ur;a.ScbRadioGroup=class extends y{constructor(){super(...arguments),this.name="",this.orientation="vertical",this.disabled=!1,this.ariaLabel=null,this.spacing="item",ws(this,hi,()=>{var i;const e=(i=this.shadowRoot)==null?void 0:i.querySelector("slot");if(!e)return;const t=e.assignedElements({flatten:!0}).filter(r=>r.tagName.toLowerCase()==="scb-radio-button");for(const r of t)this.name&&r.setAttribute("name",this.name),this.disabled?r.setAttribute("disabled",""):r.removeAttribute("disabled"),this.orientation==="horizontal"?r.setAttribute("orientation","horizontal"):r.removeAttribute("orientation"),this.spacing==="group"?r.style.setProperty("--scb-radio-gap","0"):r.style.removeProperty("--scb-radio-gap")}),ws(this,ur,e=>{var r,s;const t=e.composedPath().find(n=>{var h;return((h=n==null?void 0:n.tagName)==null?void 0:h.toLowerCase())==="scb-radio-button"}),i=(t==null?void 0:t.value)??((r=t==null?void 0:t.getAttribute)==null?void 0:r.call(t,"value"))??((s=e.target)==null?void 0:s.value)??"";this.dispatchEvent(new CustomEvent("scb-change",{detail:{value:String(i??""),originalIsTrusted:(e==null?void 0:e.isTrusted)===!0},bubbles:!0,composed:!0}))})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
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>`:""}
@@ -6287,91 +6287,128 @@ var ScbWcTest=function(a){"use strict";var Es;function d(o,e,t,i){var r=argument
6287
6287
  ::slotted([role="button"]:first-child .segmented-item) {
6288
6288
  border-left: 1px solid var(--md-sys-color-outline);
6289
6289
  }
6290
- `,pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),pi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),pi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=pi([f("scb-segmented-button")],a.ScbSegmentedButton);var Nh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Ge=(o,e,t,i)=>{for(var r=i>1?void 0:i?qh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nh(e,t,r),r};a.ScbSnackbar=class extends y{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action")),this.open=!1}handleClose(){this.dispatchEvent(new CustomEvent("snackbar-close")),this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open")):this.dispatchEvent(new CustomEvent("snackbar-close"))),(e.has("open")||e.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const e=!!this.actionText,t=!!this.showClose;let i="snackbar";return!e&&!t&&(i+=" no-actions"),this.withLongerAction&&(i+=" longer-action"),c`
6291
- <div class="${i}" ?hidden=${!this.open}>
6292
- ${this.withLongerAction?c`
6293
- <div class="message">${this.message}</div>
6294
- <div class="actions">
6295
- ${e?c`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>`:""}
6296
- ${t?c`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>`:""}
6297
- </div>
6298
- `:c`
6299
- <span class="message">${this.message}</span>
6300
- ${e?c`<scb-button variant="text" label=${this.actionText} @click=${this.handleAction}></scb-button>`:""}
6301
- ${t?c`<scb-icon-button icon="close" @click=${this.handleClose} aria-label="Stäng"></scb-icon-button>`:""}
6302
- `}
6303
-
6304
- </div>
6305
- `}},a.ScbSnackbar.styles=b`
6306
- :host {
6307
- position: relative;
6308
- display: block;
6309
- min-width: 312px;
6310
- max-width: 560px;
6311
- }
6312
- :host([fixed]) {
6313
- position: fixed;
6314
- z-index: 9999;
6315
- left: 50%;
6316
- bottom: 24px;
6317
- transform: translateX(-50%);
6318
- }
6319
- .snackbar {
6320
- background: var(--md-sys-color-inverse-surface);
6321
- color: var(--md-sys-color-inverse-on-surface);
6322
- border-radius: var(--md-sys-shape-corner-extra-small);
6323
- box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px 0 rgba(0, 0, 0, 0.30);
6324
- display: flex;
6325
- align-items: center;
6326
- padding: 14px var(--spacing-5);
6327
- opacity: 0;
6328
- transition: opacity 0.3s, bottom 0.3s;
6329
- pointer-events: auto;
6330
- position: relative;
6331
- }
6332
- .snackbar.longer-action {
6333
- flex-direction: column;
6334
- align-items: flex-start;
6335
- }
6336
- .snackbar .actions {
6337
- display: flex;
6338
- margin-top: 10px;
6339
- width: 100%;
6340
- justify-content: flex-end;
6341
-
6342
- }
6343
- .message.no-actions {
6344
- margin-right: 0;
6345
- }
6346
- :host([open]) .snackbar {
6347
- opacity: 1;
6348
- pointer-events: auto;
6349
- }
6350
- .message {
6351
- flex: 1 1 auto;
6352
- margin-right: var(--spacing-2);
6353
- font-size: var(--md-sys-typescale-body-medium-size);
6354
- line-height: var(--md-sys-typescale-body-medium-line-height);
6355
- letter-spacing: var(--md-sys-typescale-body-medium-tracking);
6356
- }
6357
- .snackbar scb-icon-button{
6358
- --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
6359
- --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
6360
- --md-icon-button-hover-state-layer-color: var(--md-sys-color-surface-container);
6361
- --md-icon-button-focus-icon-color: var(--md-sys-color-inverse-on-surface);
6362
- --md-icon-button-pressed-icon-color: var(--md-sys-color-inverse-on-surface);
6363
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
6364
- }
6365
- .snackbar scb-button{
6366
- --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
6367
- --md-text-button-hover-label-text-color: var(--md-sys-color-inverse-primary);
6368
- --md-text-button-hover-state-layer-color: var(--md-sys-color-surface-container);
6369
- --md-text-button-focus-label-text-color: var(--md-sys-color-inverse-primary);
6370
- --md-text-button-pressed-label-text-color: var(--md-sys-color-inverse-primary);
6371
- --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
6372
- }
6373
-
6374
- `,Ge([l({type:String})],a.ScbSnackbar.prototype,"message",2),Ge([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),Ge([l({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),Ge([l({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),Ge([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),Ge([l({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),Ge([l({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=Ge([f("scb-snackbar")],a.ScbSnackbar);var Vh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,vr=(o,e,t,i)=>{for(var r=i>1?void 0:i?Uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Vh(e,t,r),r};a.ScbStatusPill=class extends y{constructor(){super(...arguments),this.status="",this.label="",this.showIcon=!1}render(){return c`
6290
+ `,pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"variant",2),pi([l({type:String,reflect:!0})],a.ScbSegmentedButton.prototype,"value",2),pi([l({type:Array})],a.ScbSegmentedButton.prototype,"values",2),pi([l({type:Boolean,reflect:!0})],a.ScbSegmentedButton.prototype,"disabled",2),a.ScbSegmentedButton=pi([f("scb-segmented-button")],a.ScbSegmentedButton);var Nh=Object.defineProperty,qh=Object.getOwnPropertyDescriptor,Ge=(o,e,t,i)=>{for(var r=i>1?void 0:i?qh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Nh(e,t,r),r};a.ScbSnackbar=class extends y{constructor(){super(...arguments),this.message="",this.open=!1,this.actionText="",this.showClose=!1,this.fixed=!1,this.fadeout=!1,this.withLongerAction=!1}handleAction(){this.dispatchEvent(new CustomEvent("snackbar-action",{bubbles:!0,composed:!0})),this.open=!1}handleClose(){this.open=!1}updated(e){super.updated(e),e.has("open")&&(this.open?this.dispatchEvent(new CustomEvent("snackbar-open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("snackbar-close",{bubbles:!0,composed:!0}))),(e.has("open")||e.has("fadeout"))&&(this.open&&this.fadeout?(window.clearTimeout(this._fadeoutTimer),this._fadeoutTimer=window.setTimeout(()=>{this.open=!1},5e3)):window.clearTimeout(this._fadeoutTimer))}render(){const e=!!this.actionText,t=!!this.showClose;let i="snackbar";return!e&&!t&&(i+=" no-actions"),this.withLongerAction&&(i+=" longer-action"),c`
6291
+ <div class="${i}" ?hidden=${!this.open}>
6292
+ ${this.withLongerAction?c`
6293
+ <div class="message">${this.message}</div>
6294
+ <div class="actions">
6295
+ ${e?c`
6296
+ <scb-button
6297
+ variant="text"
6298
+ label=${this.actionText}
6299
+ @click=${this.handleAction}
6300
+ ></scb-button>
6301
+ `:""}
6302
+ ${t?c`
6303
+ <scb-icon-button
6304
+ icon="close"
6305
+ @click=${this.handleClose}
6306
+ aria-label="Stäng"
6307
+ ></scb-icon-button>
6308
+ `:""}
6309
+ </div>
6310
+ `:c`
6311
+ <span class="message">${this.message}</span>
6312
+ ${e?c`
6313
+ <scb-button
6314
+ variant="text"
6315
+ label=${this.actionText}
6316
+ @click=${this.handleAction}
6317
+ ></scb-button>
6318
+ `:""}
6319
+ ${t?c`
6320
+ <scb-icon-button
6321
+ icon="close"
6322
+ @click=${this.handleClose}
6323
+ aria-label="Stäng"
6324
+ ></scb-icon-button>
6325
+ `:""}
6326
+ `}
6327
+ </div>
6328
+ `}},a.ScbSnackbar.styles=b`
6329
+ :host {
6330
+ position: relative;
6331
+ display: block;
6332
+ min-width: 312px;
6333
+ max-width: 560px;
6334
+ }
6335
+ :host([fixed]) {
6336
+ position: fixed;
6337
+ z-index: 9999;
6338
+ left: 50%;
6339
+ bottom: 24px;
6340
+ transform: translateX(-50%);
6341
+ }
6342
+ .snackbar {
6343
+ background: var(--md-sys-color-inverse-surface);
6344
+ color: var(--md-sys-color-inverse-on-surface);
6345
+ border-radius: var(--md-sys-shape-corner-extra-small);
6346
+ box-shadow:
6347
+ 0 4px 8px 3px rgba(0, 0, 0, 0.15),
6348
+ 0 1px 3px 0 rgba(0, 0, 0, 0.3);
6349
+ display: flex;
6350
+ align-items: center;
6351
+ padding: 14px var(--spacing-5);
6352
+ opacity: 0;
6353
+ transition: opacity 0.3s, bottom 0.3s;
6354
+ pointer-events: auto;
6355
+ position: relative;
6356
+ }
6357
+ .snackbar.longer-action {
6358
+ flex-direction: column;
6359
+ align-items: flex-start;
6360
+ }
6361
+ .snackbar .actions {
6362
+ display: flex;
6363
+ margin-top: 10px;
6364
+ width: 100%;
6365
+ justify-content: flex-end;
6366
+ }
6367
+ .message.no-actions {
6368
+ margin-right: 0;
6369
+ }
6370
+ :host([open]) .snackbar {
6371
+ opacity: 1;
6372
+ pointer-events: auto;
6373
+ }
6374
+ .message {
6375
+ flex: 1 1 auto;
6376
+ margin-right: var(--spacing-2);
6377
+ font-size: var(--md-sys-typescale-body-medium-size);
6378
+ line-height: var(--md-sys-typescale-body-medium-line-height);
6379
+ letter-spacing: var(--md-sys-typescale-body-medium-tracking);
6380
+ }
6381
+ .snackbar scb-icon-button {
6382
+ --md-icon-button-icon-color: var(--md-sys-color-inverse-on-surface);
6383
+ --md-icon-button-hover-icon-color: var(--md-sys-color-inverse-on-surface);
6384
+ --md-icon-button-hover-state-layer-color: var(
6385
+ --md-sys-color-surface-container
6386
+ );
6387
+ --md-icon-button-focus-icon-color: var(
6388
+ --md-sys-color-inverse-on-surface
6389
+ );
6390
+ --md-icon-button-pressed-icon-color: var(
6391
+ --md-sys-color-inverse-on-surface
6392
+ );
6393
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
6394
+ }
6395
+ .snackbar scb-button {
6396
+ --md-text-button-label-text-color: var(--md-sys-color-inverse-primary);
6397
+ --md-text-button-hover-label-text-color: var(
6398
+ --md-sys-color-inverse-primary
6399
+ );
6400
+ --md-text-button-hover-state-layer-color: var(
6401
+ --md-sys-color-surface-container
6402
+ );
6403
+ --md-text-button-focus-label-text-color: var(
6404
+ --md-sys-color-inverse-primary
6405
+ );
6406
+ --md-text-button-pressed-label-text-color: var(
6407
+ --md-sys-color-inverse-primary
6408
+ );
6409
+ --md-focus-ring-color: var(--md-sys-color-inverse-on-surface);
6410
+ }
6411
+ `,Ge([l({type:String})],a.ScbSnackbar.prototype,"message",2),Ge([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"open",2),Ge([l({type:String,attribute:"action-text"})],a.ScbSnackbar.prototype,"actionText",2),Ge([l({type:Boolean,attribute:"show-close"})],a.ScbSnackbar.prototype,"showClose",2),Ge([l({type:Boolean,reflect:!0})],a.ScbSnackbar.prototype,"fixed",2),Ge([l({type:Boolean})],a.ScbSnackbar.prototype,"fadeout",2),Ge([l({type:Boolean,attribute:"with-longer-action"})],a.ScbSnackbar.prototype,"withLongerAction",2),a.ScbSnackbar=Ge([f("scb-snackbar")],a.ScbSnackbar);var Vh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,vr=(o,e,t,i)=>{for(var r=i>1?void 0:i?Uh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&Vh(e,t,r),r};a.ScbStatusPill=class extends y{constructor(){super(...arguments),this.status="",this.label="",this.showIcon=!1}render(){return c`
6375
6412
  ${this.showIcon?this.status==="success"?c`<md-icon>check_circle</md-icon>`:this.status==="warning"?c`<md-icon>warning</md-icon>`:this.status==="error"?c`<md-icon>error</md-icon>`:"":""}
6376
6413
  <span class="label">${this.label}</span>
6377
6414
  `}},a.ScbStatusPill.styles=b`