scb-wc-test 0.1.346 → 0.1.348

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
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../scb-checkbox/scb-checkbox.js","../scb-checkbox/scb-checkbox-group.js","../scb-switch/scb-switch.js"])))=>i.map(i=>d[i]);
2
- import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a as L,E as c,x as n}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,d,l){try{customElements.get(e)||i(e,d,l)}catch(p){var o=String(p||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var T=Object.defineProperty,P=Object.getOwnPropertyDescriptor,V=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var l=d>1?void 0:d?P(i,e):i,o=t.length-1,p;o>=0;o--)(p=t[o])&&(l=(d?p(i,e,l):p(l))||l);return d&&l&&T(i,e,l),l},k=(t,i,e)=>i.has(t)||V("Cannot "+e),v=(t,i,e)=>(k(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?V("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(k(t,i,"write to private field"),i.set(t,e),e),$=(t,i,e)=>(k(t,i,"access private method"),e),f,y,m,u,w,x;let a=class extends E{constructor(){super(...arguments),g(this,u),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.density=0,this.noDivider=!1,g(this,f,!1),g(this,y,!1),g(this,m,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");t&&(t.checked=!t.checked),i&&(i.selected=!i.selected)},g(this,x,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return L`
2
+ import{_ as w}from"../../vendor/preload-helper.js";import{n as s,t as L,i as T,a as C,E as o,x as n}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,d,c){try{customElements.get(e)||i(e,d,c)}catch(h){var l=String(h||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var D=Object.defineProperty,P=Object.getOwnPropertyDescriptor,E=t=>{throw TypeError(t)},r=(t,i,e,d)=>{for(var c=d>1?void 0:d?P(i,e):i,l=t.length-1,h;l>=0;l--)(h=t[l])&&(c=(d?h(i,e,c):h(c))||c);return d&&c&&D(i,e,c),c},V=(t,i,e)=>i.has(t)||E("Cannot "+e),u=(t,i,e)=>(V(t,i,"read from private field"),e?e.call(t):i.get(t)),g=(t,i,e)=>i.has(t)?E("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e,d)=>(V(t,i,"write to private field"),i.set(t,e),e),f=(t,i,e)=>(V(t,i,"access private method"),e),y,b,m,v,x,k,S,$;let a=class extends T{constructor(){super(...arguments),g(this,v),this.type="text",this.href="",this.itemHref="",this.target="",this.disabled=!1,this.label="",this.supportingText="",this.overline="",this.leading=!1,this.leadingVariant="",this.leadingIcon="",this.avatarLabel="",this.avatarAlt="",this.avatarVariant="icon",this.avatarSrc="",this.imgHrefImage="",this.trailing=!1,this.trailingVariant="",this.trailingIcon="",this.trailingSwitchLabel="",this.trailingSwitchSelected=!1,this.density=0,this.noDivider=!1,g(this,y,!1),g(this,b,!1),g(this,m,!1),this.onRowClick=()=>{if(this.type==="link"&&(this.href||this.itemHref))return;const t=this.shadowRoot?.querySelector("scb-checkbox"),i=this.shadowRoot?.querySelector("scb-switch");if(t&&(t.checked=!t.checked),i){const e=!this.trailingSwitchSelected;i.selected=e,f(this,v,k).call(this,e,!0)}},g(this,S,t=>{const i=t.detail?.selected,e=typeof i=="boolean"?i:t.currentTarget?.selected??!1;f(this,v,k).call(this,e,!0)}),g(this,$,t=>{if(!t.defaultPrevented&&(t.key==="Enter"||t.key===" ")){if(this.type==="link"){const i=this.shadowRoot?.querySelector("a[href]");if(i){t.preventDefault(),i.click();return}}t.preventDefault(),this.onRowClick()}})}static get styles(){return C`
3
3
  :host {
4
4
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
5
5
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -106,7 +106,7 @@ import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a
106
106
  width: 100%;
107
107
  gap: 12px;
108
108
  }
109
- `}async firstUpdated(){await $(this,u,w).call(this),this.addEventListener("keydown",v(this,x))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&$(this,u,w).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:c;case"avatar":return n`
109
+ `}async firstUpdated(){await f(this,v,x).call(this),this.addEventListener("keydown",u(this,$))}updated(t){super.updated(t),(t.has("leading")||t.has("leadingVariant")||t.has("trailing")||t.has("trailingVariant")||t.has("type")||t.has("target"))&&f(this,v,x).call(this)}render(){const t=this.leading?(()=>{switch(this.leadingVariant){case"icon":return this.leadingIcon?n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>`:o;case"avatar":return n`
110
110
  <div class="leading">
111
111
  <scb-avatar
112
112
  label=${this.avatarLabel}
@@ -117,31 +117,34 @@ import{_ as b}from"../../vendor/preload-helper.js";import{n as s,t as I,i as E,a
117
117
  variant=${this.avatarVariant}
118
118
  ></scb-avatar>
119
119
  </div>
120
- `;case"image":return this.imgHrefImage?n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:c;default:return c}})():c,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",l=this.label?`Växla ${this.label}`:"Växla";let o=c;if(this.trailing)if(this.trailingVariant==="icon"){const h=this.trailingIcon||(this.type==="link"?e:"");o=h?n`<div class="trailing"><md-icon>${h}</md-icon></div>`:c}else this.trailingVariant==="checkbox"?o=n`
120
+ `;case"image":return this.imgHrefImage?n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>`:o;default:return o}})():o,i=this.href||this.itemHref||"",e=this.target==="_blank"?"open_in_new":"chevron_right",d=this.label?`Välj ${this.label}`:"Välj",c=this.label?`Växla ${this.label}`:"Växla";let l=o;if(this.trailing)if(this.trailingVariant==="icon"){const p=this.trailingIcon||(this.type==="link"?e:"");l=p?n`<div class="trailing"><md-icon>${p}</md-icon></div>`:o}else this.trailingVariant==="checkbox"?l=n`
121
121
  <div class="trailing">
122
122
  <scb-checkbox
123
123
  aria-label=${d}
124
- @click=${h=>h.stopPropagation()}
124
+ @click=${p=>p.stopPropagation()}
125
125
  ></scb-checkbox>
126
- </div>`:this.trailingVariant==="switch"&&(o=n`
126
+ </div>`:this.trailingVariant==="switch"&&(l=n`
127
127
  <div class="trailing">
128
128
  <scb-switch
129
- aria-label=${l}
130
- @click=${h=>h.stopPropagation()}
129
+ .selected=${this.trailingSwitchSelected}
130
+ label=${this.trailingSwitchLabel||o}
131
+ aria-label=${c}
132
+ @click=${p=>p.stopPropagation()}
133
+ @change=${u(this,S)}
131
134
  ></scb-switch>
132
- </div>`);else this.type==="link"&&(o=n`<div class="trailing"><md-icon>${e}</md-icon></div>`);const p=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":c,S=n`
135
+ </div>`);else this.type==="link"&&(l=n`<div class="trailing"><md-icon>${e}</md-icon></div>`);const h=this.type==="link"&&this.target==="_blank"?"noopener noreferrer":o,I=n`
133
136
  ${t}
134
137
  <div class="texts">
135
- ${this.overline?n`<div class="overline">${this.overline}</div>`:c}
138
+ ${this.overline?n`<div class="overline">${this.overline}</div>`:o}
136
139
  <div class="label">${this.label}</div>
137
- ${this.supportingText?n`<div class="supporting-text">${this.supportingText}</div>`:c}
140
+ ${this.supportingText?n`<div class="supporting-text">${this.supportingText}</div>`:o}
138
141
  </div>
139
- ${o}
142
+ ${l}
140
143
  `;return n`
141
144
  <div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled?"true":"false"}>
142
- ${this.type==="link"&&i?n`<a class="link" href=${i} target=${this.target||c} rel=${p}>${S}</a>`:S}
143
- ${this.type==="link"?n`<md-ripple></md-ripple>`:c}
145
+ ${this.type==="link"&&i?n`<a class="link" href=${i} target=${this.target||o} rel=${h}>${I}</a>`:I}
146
+ ${this.type==="link"?n`<md-ripple></md-ripple>`:o}
144
147
  </div>
145
148
 
146
149
  <md-focus-ring></md-focus-ring>
147
- `}};f=new WeakMap;y=new WeakMap;m=new WeakMap;u=new WeakSet;w=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!v(this,f)&&(await b(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,f,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!v(this,y)&&(await b(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="switch"&&!v(this,m)&&(await b(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,m,!0))};x=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([I("scb-list-item")],a);
150
+ `}};y=new WeakMap;b=new WeakMap;m=new WeakMap;v=new WeakSet;x=async function(){const t=this.type==="link"&&(!this.trailing||this.trailingVariant==="icon");(this.leading&&this.leadingVariant==="icon"||this.trailing&&this.trailingVariant==="icon"||t)&&!u(this,y)&&(await w(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),_(this,y,!0)),this.trailing&&this.trailingVariant==="checkbox"&&!u(this,b)&&(await w(()=>import("../scb-checkbox/scb-checkbox.js"),__vite__mapDeps([2,1,0,3]),import.meta.url),_(this,b,!0)),this.trailing&&this.trailingVariant==="switch"&&!u(this,m)&&(await w(()=>import("../scb-switch/scb-switch.js"),__vite__mapDeps([4,1,0]),import.meta.url),_(this,m,!0))};k=function(t,i){this.trailingSwitchSelected=t,i&&this.dispatchEvent(new CustomEvent("trailing-switch-change",{detail:{selected:t},bubbles:!0,composed:!0}))};S=new WeakMap;$=new WeakMap;r([s({type:String,reflect:!0,attribute:"type"})],a.prototype,"type",2);r([s({type:String})],a.prototype,"href",2);r([s({type:String,attribute:"item-href"})],a.prototype,"itemHref",2);r([s({type:String,attribute:"target"})],a.prototype,"target",2);r([s({type:Boolean,attribute:"disabled"})],a.prototype,"disabled",2);r([s({type:String,reflect:!0})],a.prototype,"label",2);r([s({type:String,attribute:"supporting-text"})],a.prototype,"supportingText",2);r([s({type:String,attribute:"overline"})],a.prototype,"overline",2);r([s({type:Boolean})],a.prototype,"leading",2);r([s({type:String,attribute:"leading-variant",reflect:!0})],a.prototype,"leadingVariant",2);r([s({type:String,attribute:"leading-icon"})],a.prototype,"leadingIcon",2);r([s({type:String,attribute:"avatar-label"})],a.prototype,"avatarLabel",2);r([s({type:String,attribute:"avatar-alt"})],a.prototype,"avatarAlt",2);r([s({type:String,attribute:"avatar-variant"})],a.prototype,"avatarVariant",2);r([s({type:String,attribute:"avatar-src"})],a.prototype,"avatarSrc",2);r([s({type:String,reflect:!0,attribute:"img-href-image"})],a.prototype,"imgHrefImage",2);r([s({type:Boolean})],a.prototype,"trailing",2);r([s({type:String,attribute:"trailing-variant",reflect:!0})],a.prototype,"trailingVariant",2);r([s({type:String,attribute:"trailing-icon"})],a.prototype,"trailingIcon",2);r([s({type:String,attribute:"trailing-switch-label"})],a.prototype,"trailingSwitchLabel",2);r([s({type:Boolean,attribute:"trailing-switch-selected",reflect:!0})],a.prototype,"trailingSwitchSelected",2);r([s({type:Number,reflect:!0})],a.prototype,"density",2);r([s({type:Boolean,attribute:"no-divider",reflect:!0})],a.prototype,"noDivider",2);a=r([L("scb-list-item")],a);
@@ -1,4 +1,4 @@
1
- import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-icon-button/scb-icon-button.js";import"../../vendor/preload-helper.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(s,a,r){try{customElements.get(s)||o(s,a,r)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,e=(t,o,s,a)=>{for(var r=a>1?void 0:a?m(o,s):o,l=t.length-1,p;l>=0;l--)(p=t[l])&&(r=(a?p(o,s,r):p(r))||r);return a&&r&&g(o,s,r),r};let i=class extends f{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.size="large",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const t=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);const o=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(o)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(t){const o=(t??"").trim();return o?/^\d+$/.test(o)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(o,10)))})`:o:""}__applySpacing(){const t=this.__resolveSpacingToken(this.spacingTop||this.spacing),o=this.__resolveSpacingToken(this.spacingBottom||this.spacing),s=this.__resolveSpacingToken(this.spacingLeft||this.spacing),a=this.__resolveSpacingToken(this.spacingRight||this.spacing);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),o?this.style.marginBlockEnd=o:this.style.removeProperty("margin-block-end"),s?this.style.marginInlineStart=s:this.style.removeProperty("margin-inline-start"),a?this.style.marginInlineEnd=a:this.style.removeProperty("margin-inline-end")}updated(t){super.updated(t),t.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){const t=this.direction==="vertical"?"vertical":"horizontal",o=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",s=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
1
+ import{a as h,n,i as f,x as c,t as g}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-icon-button/scb-icon-button.js";import"../../vendor/preload-helper.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(s,a,r){try{customElements.get(s)||o(s,a,r)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var d=Object.defineProperty,m=Object.getOwnPropertyDescriptor,e=(t,o,s,a)=>{for(var r=a>1?void 0:a?m(o,s):o,l=t.length-1,p;l>=0;l--)(p=t[l])&&(r=(a?p(o,s,r):p(r))||r);return a&&r&&d(o,s,r),r};let i=class extends f{constructor(){super(...arguments),this.variant="success",this.direction="horizontal",this.size="large",this.title="",this.subtitle="",this.supportingText="",this.open=!1,this.linkText="",this.linkHref="#",this.href="",this.showIcon=!1,this.showCloseButton=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.fullHeight=!1,this.fullWidth=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._closeNotification=()=>{this.open=!1;const t=new CustomEvent("close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(t);const o=new CustomEvent("Close",{detail:{open:this.open},bubbles:!0,composed:!0});this.dispatchEvent(o)}}_iconForVariant(){switch(this.variant){case"success":return"check_circle";case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}__resolveSpacingToken(t){const o=(t??"").trim();return o?/^\d+$/.test(o)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(o,10)))})`:o:""}__applySpacing(){const t=this.__resolveSpacingToken(this.spacingTop||this.spacing),o=this.__resolveSpacingToken(this.spacingBottom||this.spacing),s=this.__resolveSpacingToken(this.spacingLeft||this.spacing),a=this.__resolveSpacingToken(this.spacingRight||this.spacing);t?this.style.marginBlockStart=t:this.style.removeProperty("margin-block-start"),o?this.style.marginBlockEnd=o:this.style.removeProperty("margin-block-end"),s?this.style.marginInlineStart=s:this.style.removeProperty("margin-inline-start"),a?this.style.marginInlineEnd=a:this.style.removeProperty("margin-inline-end")}updated(t){super.updated(t),t.has("width")&&(this.width&&this.width.trim()!==""?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth&&this.maxWidth.trim()!==""?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height&&this.height.trim()!==""?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight&&this.maxHeight.trim()!==""?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing()}render(){const t=this.direction==="vertical"?"vertical":"horizontal",o=!!(this.title||this.subtitle),s=!!(this.supportingText&&!this.title&&!this.subtitle&&!this.linkText),a=this.variant==="success"?"--_icon-color: var(--md-sys-color-on-success-container, #007041);":this.variant==="error"?"--_icon-color: var(--md-sys-color-on-error-container, #942500);":this.variant==="warning"?"--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);":"--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);",r=this.linkHref&&this.linkHref!=="#"?this.linkHref:this.href||this.linkHref;return c`
2
2
  <div class="notification" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true">
3
3
  <div class="notification-main ${t}">
4
4
  ${this.showIcon?c`
@@ -6,15 +6,17 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
6
6
  <md-icon aria-hidden="true">${this._iconForVariant()}</md-icon>
7
7
  </div>
8
8
  `:null}
9
- <div class="notification-text-container">
10
- <div class="notification-title-container">
11
- ${this.title?c`<div class="notification-title">${this.title}</div>`:null}
12
- ${this.subtitle?c`<div class="notification-subtitle">${this.subtitle}</div>`:null}
13
- </div>
9
+ <div class="notification-text-container ${s?"no-gap":""}">
10
+ ${o?c`
11
+ <div class="notification-title-container">
12
+ ${this.title?c`<div class="notification-title">${this.title}</div>`:null}
13
+ ${this.subtitle?c`<div class="notification-subtitle">${this.subtitle}</div>`:null}
14
+ </div>
15
+ `:null}
14
16
  ${this.supportingText?c`<div class="notification-text">${this.supportingText}</div>`:null}
15
17
  ${this.linkText?c`
16
18
  <div class="notification-footer">
17
- <a class="footer-link" href="${s}">${this.linkText}</a>
19
+ <a class="footer-link" href="${r}">${this.linkText}</a>
18
20
  </div>
19
21
  `:null}
20
22
  </div>
@@ -24,7 +26,7 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
24
26
  <scb-icon-button
25
27
  aria-label="Stäng meddelande"
26
28
  icon="close"
27
- style=${o}
29
+ style=${a}
28
30
  @click=${this._closeNotification}
29
31
  >
30
32
  </scb-icon-button>
@@ -262,6 +264,10 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
262
264
  min-width: 0;
263
265
  }
264
266
 
267
+ .notification-text-container.no-gap {
268
+ gap: 0;
269
+ }
270
+
265
271
  .notification-title-container{
266
272
  display: flex;
267
273
  flex-direction: column;
@@ -349,4 +355,4 @@ import{a as h,n,i as f,x as c,t as d}from"../../vendor/vendor.js";import"../../v
349
355
  box-shadow: 0 0 0 2px var(--md-sys-color-primary, #1976d2);
350
356
  }
351
357
  }
352
- `];e([n({type:String})],i.prototype,"variant",2);e([n({type:String,reflect:!0})],i.prototype,"direction",2);e([n({type:String,reflect:!0})],i.prototype,"size",2);e([n({type:String})],i.prototype,"title",2);e([n({type:String})],i.prototype,"subtitle",2);e([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);e([n({type:Boolean,reflect:!0})],i.prototype,"open",2);e([n({type:String,attribute:"link-text"})],i.prototype,"linkText",2);e([n({type:String,attribute:"link-href"})],i.prototype,"linkHref",2);e([n({type:String})],i.prototype,"href",2);e([n({type:Boolean,attribute:"show-icon"})],i.prototype,"showIcon",2);e([n({type:Boolean,attribute:"show-close-button"})],i.prototype,"showCloseButton",2);e([n({type:String,reflect:!0})],i.prototype,"sizing",2);e([n({type:String,reflect:!0})],i.prototype,"width",2);e([n({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);e([n({type:String,reflect:!0})],i.prototype,"height",2);e([n({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-height"})],i.prototype,"fullHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-width"})],i.prototype,"fullWidth",2);e([n({type:String})],i.prototype,"spacing",2);e([n({type:String,attribute:"spacing-top"})],i.prototype,"spacingTop",2);e([n({type:String,attribute:"spacing-bottom"})],i.prototype,"spacingBottom",2);e([n({type:String,attribute:"spacing-left"})],i.prototype,"spacingLeft",2);e([n({type:String,attribute:"spacing-right"})],i.prototype,"spacingRight",2);i=e([d("scb-notification-card")],i);
358
+ `];e([n({type:String})],i.prototype,"variant",2);e([n({type:String,reflect:!0})],i.prototype,"direction",2);e([n({type:String,reflect:!0})],i.prototype,"size",2);e([n({type:String})],i.prototype,"title",2);e([n({type:String})],i.prototype,"subtitle",2);e([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);e([n({type:Boolean,reflect:!0})],i.prototype,"open",2);e([n({type:String,attribute:"link-text"})],i.prototype,"linkText",2);e([n({type:String,attribute:"link-href"})],i.prototype,"linkHref",2);e([n({type:String})],i.prototype,"href",2);e([n({type:Boolean,attribute:"show-icon"})],i.prototype,"showIcon",2);e([n({type:Boolean,attribute:"show-close-button"})],i.prototype,"showCloseButton",2);e([n({type:String,reflect:!0})],i.prototype,"sizing",2);e([n({type:String,reflect:!0})],i.prototype,"width",2);e([n({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);e([n({type:String,reflect:!0})],i.prototype,"height",2);e([n({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-height"})],i.prototype,"fullHeight",2);e([n({type:Boolean,reflect:!0,attribute:"full-width"})],i.prototype,"fullWidth",2);e([n({type:String})],i.prototype,"spacing",2);e([n({type:String,attribute:"spacing-top"})],i.prototype,"spacingTop",2);e([n({type:String,attribute:"spacing-bottom"})],i.prototype,"spacingBottom",2);e([n({type:String,attribute:"spacing-left"})],i.prototype,"spacingLeft",2);e([n({type:String,attribute:"spacing-right"})],i.prototype,"spacingRight",2);i=e([g("scb-notification-card")],i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.346",
3
+ "version": "0.1.348",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -414,5 +414,5 @@
414
414
  },
415
415
  "./mvc/*": "./mvc/*"
416
416
  },
417
- "buildHash": "1F8F3C129A32245DC4606ECB8E85CDD47C82413346CCBF053EB92D93868DE67E"
417
+ "buildHash": "9BE3B4226A6360E1BC78F046D8638AD8FF050366077245DE8DEFE58B1E2D9D0F"
418
418
  }
@@ -20,6 +20,8 @@ export declare class ScbListItem extends LitElement {
20
20
  trailing: boolean;
21
21
  trailingVariant: '' | 'icon' | 'checkbox' | 'switch';
22
22
  trailingIcon: string;
23
+ trailingSwitchLabel: string;
24
+ trailingSwitchSelected: boolean;
23
25
  density: -4 | -2 | 0;
24
26
  noDivider: boolean;
25
27
  static get styles(): import('lit').CSSResult;
@@ -1,22 +1,29 @@
1
- import { LitElement as V, css as I, nothing as o, html as n } from "lit";
2
- import { property as s, customElement as L } from "lit/decorators.js";
1
+ import { LitElement as L, css as C, nothing as c, html as o } from "lit";
2
+ import { property as s, customElement as z } from "lit/decorators.js";
3
3
  import "@material/web/focus/md-focus-ring.js";
4
4
  import "@material/web/ripple/ripple.js";
5
- var z = Object.defineProperty, C = Object.getOwnPropertyDescriptor, S = (t) => {
5
+ var T = Object.defineProperty, H = Object.getOwnPropertyDescriptor, I = (t) => {
6
6
  throw TypeError(t);
7
7
  }, r = (t, i, e, l) => {
8
- for (var c = l > 1 ? void 0 : l ? C(i, e) : i, p = t.length - 1, h; p >= 0; p--)
9
- (h = t[p]) && (c = (l ? h(i, e, c) : h(c)) || c);
10
- return l && c && z(i, e, c), c;
11
- }, x = (t, i, e) => i.has(t) || S("Cannot " + e), v = (t, i, e) => (x(t, i, "read from private field"), e ? e.call(t) : i.get(t)), g = (t, i, e) => i.has(t) ? S("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), b = (t, i, e, l) => (x(t, i, "write to private field"), i.set(t, e), e), $ = (t, i, e) => (x(t, i, "access private method"), e), f, u, m, y, w, k;
12
- let a = class extends V {
8
+ for (var n = l > 1 ? void 0 : l ? H(i, e) : i, p = t.length - 1, v; p >= 0; p--)
9
+ (v = t[p]) && (n = (l ? v(i, e, n) : v(n)) || n);
10
+ return l && n && T(i, e, n), n;
11
+ }, _ = (t, i, e) => i.has(t) || I("Cannot " + e), y = (t, i, e) => (_(t, i, "read from private field"), e ? e.call(t) : i.get(t)), h = (t, i, e) => i.has(t) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), w = (t, i, e, l) => (_(t, i, "write to private field"), i.set(t, e), e), f = (t, i, e) => (_(t, i, "access private method"), e), u, b, m, g, k, x, S, $;
12
+ let a = class extends L {
13
13
  constructor() {
14
- super(...arguments), g(this, y), this.type = "text", this.href = "", this.itemHref = "", this.target = "", this.disabled = !1, this.label = "", this.supportingText = "", this.overline = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.imgHrefImage = "", this.trailing = !1, this.trailingVariant = "", this.trailingIcon = "", this.density = 0, this.noDivider = !1, g(this, f, !1), g(this, u, !1), g(this, m, !1), this.onRowClick = () => {
14
+ super(...arguments), h(this, g), this.type = "text", this.href = "", this.itemHref = "", this.target = "", this.disabled = !1, this.label = "", this.supportingText = "", this.overline = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.imgHrefImage = "", this.trailing = !1, this.trailingVariant = "", this.trailingIcon = "", this.trailingSwitchLabel = "", this.trailingSwitchSelected = !1, this.density = 0, this.noDivider = !1, h(this, u, !1), h(this, b, !1), h(this, m, !1), this.onRowClick = () => {
15
15
  var e, l;
16
16
  if (this.type === "link" && (this.href || this.itemHref)) return;
17
17
  const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("scb-checkbox"), i = (l = this.shadowRoot) == null ? void 0 : l.querySelector("scb-switch");
18
- t && (t.checked = !t.checked), i && (i.selected = !i.selected);
19
- }, g(this, k, (t) => {
18
+ if (t && (t.checked = !t.checked), i) {
19
+ const n = !this.trailingSwitchSelected;
20
+ i.selected = n, f(this, g, x).call(this, n, !0);
21
+ }
22
+ }, h(this, S, (t) => {
23
+ var l, n;
24
+ const i = (l = t.detail) == null ? void 0 : l.selected, e = typeof i == "boolean" ? i : ((n = t.currentTarget) == null ? void 0 : n.selected) ?? !1;
25
+ f(this, g, x).call(this, e, !0);
26
+ }), h(this, $, (t) => {
20
27
  var i;
21
28
  if (!t.defaultPrevented && (t.key === "Enter" || t.key === " ")) {
22
29
  if (this.type === "link") {
@@ -31,7 +38,7 @@ let a = class extends V {
31
38
  });
32
39
  }
33
40
  static get styles() {
34
- return I`
41
+ return C`
35
42
  :host {
36
43
  border-bottom: var(--stroke-border, 1px) solid var(--md-sys-color-outline-variant);
37
44
  margin-bottom: calc(var(--stroke-border, 1px) * -1);
@@ -141,18 +148,18 @@ let a = class extends V {
141
148
  `;
142
149
  }
143
150
  async firstUpdated() {
144
- await $(this, y, w).call(this), this.addEventListener("keydown", v(this, k));
151
+ await f(this, g, k).call(this), this.addEventListener("keydown", y(this, $));
145
152
  }
146
153
  updated(t) {
147
- super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) && $(this, y, w).call(this);
154
+ super.updated(t), (t.has("leading") || t.has("leadingVariant") || t.has("trailing") || t.has("trailingVariant") || t.has("type") || t.has("target")) && f(this, g, k).call(this);
148
155
  }
149
156
  render() {
150
157
  const t = this.leading ? (() => {
151
158
  switch (this.leadingVariant) {
152
159
  case "icon":
153
- return this.leadingIcon ? n`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>` : o;
160
+ return this.leadingIcon ? o`<div class="leading"><md-icon>${this.leadingIcon}</md-icon></div>` : c;
154
161
  case "avatar":
155
- return n`
162
+ return o`
156
163
  <div class="leading">
157
164
  <scb-avatar
158
165
  label=${this.avatarLabel}
@@ -165,58 +172,69 @@ let a = class extends V {
165
172
  </div>
166
173
  `;
167
174
  case "image":
168
- return this.imgHrefImage ? n`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>` : o;
175
+ return this.imgHrefImage ? o`<div class="leading"><img class="img" part="leading-image" src="${this.imgHrefImage}" alt="" /></div>` : c;
169
176
  default:
170
- return o;
177
+ return c;
171
178
  }
172
- })() : o, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj", c = this.label ? `Växla ${this.label}` : "Växla";
173
- let p = o;
179
+ })() : c, i = this.href || this.itemHref || "", e = this.target === "_blank" ? "open_in_new" : "chevron_right", l = this.label ? `Välj ${this.label}` : "Välj", n = this.label ? `Växla ${this.label}` : "Växla";
180
+ let p = c;
174
181
  if (this.trailing)
175
182
  if (this.trailingVariant === "icon") {
176
183
  const d = this.trailingIcon || (this.type === "link" ? e : "");
177
- p = d ? n`<div class="trailing"><md-icon>${d}</md-icon></div>` : o;
178
- } else this.trailingVariant === "checkbox" ? p = n`
184
+ p = d ? o`<div class="trailing"><md-icon>${d}</md-icon></div>` : c;
185
+ } else this.trailingVariant === "checkbox" ? p = o`
179
186
  <div class="trailing">
180
187
  <scb-checkbox
181
188
  aria-label=${l}
182
189
  @click=${(d) => d.stopPropagation()}
183
190
  ></scb-checkbox>
184
- </div>` : this.trailingVariant === "switch" && (p = n`
191
+ </div>` : this.trailingVariant === "switch" && (p = o`
185
192
  <div class="trailing">
186
193
  <scb-switch
187
- aria-label=${c}
194
+ .selected=${this.trailingSwitchSelected}
195
+ label=${this.trailingSwitchLabel || c}
196
+ aria-label=${n}
188
197
  @click=${(d) => d.stopPropagation()}
198
+ @change=${y(this, S)}
189
199
  ></scb-switch>
190
200
  </div>`);
191
- else this.type === "link" && (p = n`<div class="trailing"><md-icon>${e}</md-icon></div>`);
192
- const h = this.type === "link" && this.target === "_blank" ? "noopener noreferrer" : o, _ = n`
201
+ else this.type === "link" && (p = o`<div class="trailing"><md-icon>${e}</md-icon></div>`);
202
+ const v = this.type === "link" && this.target === "_blank" ? "noopener noreferrer" : c, V = o`
193
203
  ${t}
194
204
  <div class="texts">
195
- ${this.overline ? n`<div class="overline">${this.overline}</div>` : o}
205
+ ${this.overline ? o`<div class="overline">${this.overline}</div>` : c}
196
206
  <div class="label">${this.label}</div>
197
- ${this.supportingText ? n`<div class="supporting-text">${this.supportingText}</div>` : o}
207
+ ${this.supportingText ? o`<div class="supporting-text">${this.supportingText}</div>` : c}
198
208
  </div>
199
209
  ${p}
200
210
  `;
201
- return n`
211
+ return o`
202
212
  <div class="row" @click=${this.onRowClick} ?inert=${this.disabled} aria-disabled=${this.disabled ? "true" : "false"}>
203
- ${this.type === "link" && i ? n`<a class="link" href=${i} target=${this.target || o} rel=${h}>${_}</a>` : _}
204
- ${this.type === "link" ? n`<md-ripple></md-ripple>` : o}
213
+ ${this.type === "link" && i ? o`<a class="link" href=${i} target=${this.target || c} rel=${v}>${V}</a>` : V}
214
+ ${this.type === "link" ? o`<md-ripple></md-ripple>` : c}
205
215
  </div>
206
216
 
207
217
  <md-focus-ring></md-focus-ring>
208
218
  `;
209
219
  }
210
220
  };
211
- f = /* @__PURE__ */ new WeakMap();
212
221
  u = /* @__PURE__ */ new WeakMap();
222
+ b = /* @__PURE__ */ new WeakMap();
213
223
  m = /* @__PURE__ */ new WeakMap();
214
- y = /* @__PURE__ */ new WeakSet();
215
- w = async function() {
224
+ g = /* @__PURE__ */ new WeakSet();
225
+ k = async function() {
216
226
  const t = this.type === "link" && (!this.trailing || this.trailingVariant === "icon");
217
- (this.leading && this.leadingVariant === "icon" || this.trailing && this.trailingVariant === "icon" || t) && !v(this, f) && (await import("@material/web/icon/icon.js"), b(this, f, !0)), this.trailing && this.trailingVariant === "checkbox" && !v(this, u) && (await import("../scb-checkbox/scb-checkbox.js"), b(this, u, !0)), this.trailing && this.trailingVariant === "switch" && !v(this, m) && (await import("../scb-switch/scb-switch.js"), b(this, m, !0));
227
+ (this.leading && this.leadingVariant === "icon" || this.trailing && this.trailingVariant === "icon" || t) && !y(this, u) && (await import("@material/web/icon/icon.js"), w(this, u, !0)), this.trailing && this.trailingVariant === "checkbox" && !y(this, b) && (await import("../scb-checkbox/scb-checkbox.js"), w(this, b, !0)), this.trailing && this.trailingVariant === "switch" && !y(this, m) && (await import("../scb-switch/scb-switch.js"), w(this, m, !0));
228
+ };
229
+ x = function(t, i) {
230
+ this.trailingSwitchSelected = t, i && this.dispatchEvent(new CustomEvent("trailing-switch-change", {
231
+ detail: { selected: t },
232
+ bubbles: !0,
233
+ composed: !0
234
+ }));
218
235
  };
219
- k = /* @__PURE__ */ new WeakMap();
236
+ S = /* @__PURE__ */ new WeakMap();
237
+ $ = /* @__PURE__ */ new WeakMap();
220
238
  r([
221
239
  s({ type: String, reflect: !0, attribute: "type" })
222
240
  ], a.prototype, "type", 2);
@@ -274,6 +292,12 @@ r([
274
292
  r([
275
293
  s({ type: String, attribute: "trailing-icon" })
276
294
  ], a.prototype, "trailingIcon", 2);
295
+ r([
296
+ s({ type: String, attribute: "trailing-switch-label" })
297
+ ], a.prototype, "trailingSwitchLabel", 2);
298
+ r([
299
+ s({ type: Boolean, attribute: "trailing-switch-selected", reflect: !0 })
300
+ ], a.prototype, "trailingSwitchSelected", 2);
277
301
  r([
278
302
  s({ type: Number, reflect: !0 })
279
303
  ], a.prototype, "density", 2);
@@ -281,7 +305,7 @@ r([
281
305
  s({ type: Boolean, attribute: "no-divider", reflect: !0 })
282
306
  ], a.prototype, "noDivider", 2);
283
307
  a = r([
284
- L("scb-list-item")
308
+ z("scb-list-item")
285
309
  ], a);
286
310
  export {
287
311
  a as ScbListItem
@@ -51,7 +51,7 @@ let i = class extends f {
51
51
  super.updated(n), n.has("width") && (this.width && this.width.trim() !== "" ? this.style.inlineSize = this.width : this.style.removeProperty("inline-size")), n.has("maxWidth") && (this.maxWidth && this.maxWidth.trim() !== "" ? this.style.maxInlineSize = this.maxWidth : this.style.removeProperty("max-inline-size")), n.has("height") && (this.height && this.height.trim() !== "" ? this.style.blockSize = this.height : this.style.removeProperty("block-size")), n.has("maxHeight") && (this.maxHeight && this.maxHeight.trim() !== "" ? this.style.maxBlockSize = this.maxHeight : this.style.removeProperty("max-block-size")), (n.has("spacing") || n.has("spacingTop") || n.has("spacingBottom") || n.has("spacingLeft") || n.has("spacingRight")) && this.__applySpacing();
52
52
  }
53
53
  render() {
54
- const n = this.direction === "vertical" ? "vertical" : "horizontal", o = this.variant === "success" ? "--_icon-color: var(--md-sys-color-on-success-container, #007041);" : this.variant === "error" ? "--_icon-color: var(--md-sys-color-on-error-container, #942500);" : this.variant === "warning" ? "--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);" : "--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);", s = this.linkHref && this.linkHref !== "#" ? this.linkHref : this.href || this.linkHref;
54
+ const n = this.direction === "vertical" ? "vertical" : "horizontal", o = !!(this.title || this.subtitle), s = !!(this.supportingText && !this.title && !this.subtitle && !this.linkText), a = this.variant === "success" ? "--_icon-color: var(--md-sys-color-on-success-container, #007041);" : this.variant === "error" ? "--_icon-color: var(--md-sys-color-on-error-container, #942500);" : this.variant === "warning" ? "--_icon-color: var(--md-sys-color-on-warning-container, #6B5600);" : "--_icon-color: var(--md-sys-color-on-info-container, #1E00BE);", r = this.linkHref && this.linkHref !== "#" ? this.linkHref : this.href || this.linkHref;
55
55
  return c`
56
56
  <div class="notification" type=${this.variant} role="alert" aria-live="assertive" aria-atomic="true">
57
57
  <div class="notification-main ${n}">
@@ -60,15 +60,17 @@ let i = class extends f {
60
60
  <md-icon aria-hidden="true">${this._iconForVariant()}</md-icon>
61
61
  </div>
62
62
  ` : null}
63
- <div class="notification-text-container">
64
- <div class="notification-title-container">
65
- ${this.title ? c`<div class="notification-title">${this.title}</div>` : null}
66
- ${this.subtitle ? c`<div class="notification-subtitle">${this.subtitle}</div>` : null}
67
- </div>
63
+ <div class="notification-text-container ${s ? "no-gap" : ""}">
64
+ ${o ? c`
65
+ <div class="notification-title-container">
66
+ ${this.title ? c`<div class="notification-title">${this.title}</div>` : null}
67
+ ${this.subtitle ? c`<div class="notification-subtitle">${this.subtitle}</div>` : null}
68
+ </div>
69
+ ` : null}
68
70
  ${this.supportingText ? c`<div class="notification-text">${this.supportingText}</div>` : null}
69
71
  ${this.linkText ? c`
70
72
  <div class="notification-footer">
71
- <a class="footer-link" href="${s}">${this.linkText}</a>
73
+ <a class="footer-link" href="${r}">${this.linkText}</a>
72
74
  </div>
73
75
  ` : null}
74
76
  </div>
@@ -78,7 +80,7 @@ let i = class extends f {
78
80
  <scb-icon-button
79
81
  aria-label="Stäng meddelande"
80
82
  icon="close"
81
- style=${o}
83
+ style=${a}
82
84
  @click=${this._closeNotification}
83
85
  >
84
86
  </scb-icon-button>
@@ -320,6 +322,10 @@ i.styles = [
320
322
  min-width: 0;
321
323
  }
322
324
 
325
+ .notification-text-container.no-gap {
326
+ gap: 0;
327
+ }
328
+
323
329
  .notification-title-container{
324
330
  display: flex;
325
331
  flex-direction: column;