scb-wc-test 0.1.352 → 0.1.354

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"])))=>i.map(i=>d[i]);
2
- import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x as r,E as g,t as D}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-list/scb-list-item.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(n,c,o){try{customElements.get(n)||e(n,c,o)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var B=Object.defineProperty,N=Object.getOwnPropertyDescriptor,P=t=>{throw TypeError(t)},s=(t,e,n,c)=>{for(var o=c>1?void 0:c?N(e,n):e,d=t.length-1,p;d>=0;d--)(p=t[d])&&(o=(c?p(e,n,o):p(o))||o);return c&&o&&B(e,n,o),o},R=(t,e,n)=>e.has(t)||P("Cannot "+n),W=(t,e,n)=>e.has(t)?P("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),x=(t,e,n)=>(R(t,e,"access private method"),n),f,_,$;const l={fromAttribute:t=>t??"",toAttribute:t=>typeof t!="string"||t.trim()===""?null:t};let i=class extends H{constructor(){super(...arguments),W(this,f),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=t=>{const e=t.currentTarget.closest(".media");e&&e.classList.add("is-loaded")},this.__onKeyDown=t=>{const e=this.__effectiveHref();(t.key==="Enter"||t.key===" ")&&e&&(t.preventDefault(),this.__navigate(e,t))},this.__handleHrefNavigation=t=>{const e=this.__effectiveHref();e&&(t.target.closest("a")||this.__navigate(e,t))}}attributeChangedCallback(t,e,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(t)||super.attributeChangedCallback(t,e,n)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const n=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(n&&n.length===2){const o=Number(n[0]),d=Number(n[1]);if(o>0&&d>0)return{w:o,h:d}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__noWrapText(t){return(t??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent(t.replace("-",""),{bubbles:!0,composed:!0,detail:e}))}__dispatchSocialActionEvent(t,e){this.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:e}}))}__dispatchCardNavigate(t,e){const n={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const o=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(o),!o.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return r`
2
+ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x as r,E as m,t as B}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-vignette/scb-vignette.js";import"../scb-list/scb-list-item.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(n,c,o){try{customElements.get(n)||e(n,c,o)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var N=Object.defineProperty,R=Object.getOwnPropertyDescriptor,A=t=>{throw TypeError(t)},s=(t,e,n,c)=>{for(var o=c>1?void 0:c?R(e,n):e,d=t.length-1,p;d>=0;d--)(p=t[d])&&(o=(c?p(e,n,o):p(o))||o);return c&&o&&N(e,n,o),o},W=(t,e,n)=>e.has(t)||A("Cannot "+n),I=(t,e,n)=>e.has(t)?A("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),z=(t,e,n)=>(W(t,e,"access private method"),n),x,$,S;const l={fromAttribute:t=>t??"",toAttribute:t=>typeof t!="string"||t.trim()===""?null:t};let i=class extends D{constructor(){super(...arguments),I(this,x),this.__managedSocialAttributes=new Set(["social-comments-text","social-comments","social-comments-href","social-likes-text","social-likes","social-likes-hover-content","social-has-liked","social-likes-interactive","social-author","social-author-text","social-author-href"]),this.__isSyncingManagedSocialAttributes=!1,this.type="standard",this.variant="standard",this.direction="dynamic",this.size="large",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.href="",this.title="",this.subtitle="",this.vignette="",this.vignetteVariant="filled",this.supportingText="",this.commentsText="",this.commentsDisabled=!1,this.commentsHref="",this.likesText="",this.likesDisabled=!1,this.likesHoverContent="",this.hasLiked=!1,this.likesInteractive=!0,this.author=!1,this.authorText="",this.authorHref="",this.replyEnabled=!1,this.editEnabled=!1,this.deleteEnabled=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.innerPadding=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.__onImgLoad=t=>{const e=t.currentTarget.closest(".media");e&&e.classList.add("is-loaded")},this.__onKeyDown=t=>{const e=this.__effectiveHref();(t.key==="Enter"||t.key===" ")&&e&&(t.preventDefault(),this.__navigate(e,t))},this.__handleHrefNavigation=t=>{const e=this.__effectiveHref();e&&(t.target.closest("a")||this.__navigate(e,t))}}attributeChangedCallback(t,e,n){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(t)||super.attributeChangedCallback(t,e,n)}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const n=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(n&&n.length===2){const o=Number(n[0]),d=Number(n[1]);if(o>0&&d>0)return{w:o,h:d}}const c=Number(e);return isFinite(c)&&c>0?{w:1e3,h:Math.round(1e3/c)}:{w:600,h:400}}__noWrapText(t){return(t??"").replace(/ /g," ").replace(/-/g,"‑")}__dispatchLikeEvent(t,e){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e})),this.dispatchEvent(new CustomEvent(t.replace("-",""),{bubbles:!0,composed:!0,detail:e}))}__dispatchSocialActionEvent(t,e){this.dispatchEvent(new CustomEvent(`social-${t}`,{bubbles:!0,composed:!0,detail:{action:t,originalEvent:e}}))}__dispatchCardNavigate(t,e){const n={href:t,originalEvent:e},c=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(c),c.defaultPrevented)return!1;const o=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(o),!o.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return r`
3
3
  <div class="media">
4
4
  <slot name="media">
5
5
  <scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
@@ -21,34 +21,36 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
21
21
  @load=${this.__onImgLoad}
22
22
  />
23
23
  </div>
24
- `}return null}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__syncStringAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{typeof e=="string"&&e.trim()!==""?this.setAttribute(t,e):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncNumberAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{typeof e=="number"&&Number.isFinite(e)?this.setAttribute(t,String(e)):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncBooleanAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{e?this.setAttribute(t,""):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncSocialAttributes(){this.type==="social"&&(this.__syncStringAttribute("social-comments-text",this.commentsText),this.__syncNumberAttribute("social-comments",this.comments),this.__syncStringAttribute("social-comments-href",this.commentsHref),this.__syncStringAttribute("social-likes-text",this.likesText),this.__syncNumberAttribute("social-likes",this.likes),this.__syncStringAttribute("social-likes-hover-content",this.likesHoverContent),this.__syncBooleanAttribute("social-has-liked",this.hasLiked),this.__syncBooleanAttribute("social-likes-interactive",this.likesInteractive),this.__syncBooleanAttribute("social-author",this.author),this.__syncStringAttribute("social-author-text",this.authorText),this.__syncStringAttribute("social-author-href",this.authorHref))}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",e=(this.direction||"dynamic").toLowerCase(),c=this.type!=="list"&&this.type!=="container"&&e!=="vertical"&&e!=="horizontal"?"dynamic-direction":"",o=this.type==="list"||this.type==="container"?"vertical":e==="horizontal"?"horizontal":"vertical",d=this.__effectiveHref(),p=(this.type==="standard"||this.type==="social")&&!!d,A=p?"clickable":"",b=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",z=(v=!1)=>v?r`<a class="title" href="${d}" tabindex="-1"
24
+ `}return null}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__syncStringAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{typeof e=="string"&&e.trim()!==""?this.setAttribute(t,e):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncNumberAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{typeof e=="number"&&Number.isFinite(e)?this.setAttribute(t,String(e)):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncBooleanAttribute(t,e){this.__isSyncingManagedSocialAttributes=!0;try{e?this.setAttribute(t,""):this.removeAttribute(t)}finally{this.__isSyncingManagedSocialAttributes=!1}}__syncSocialAttributes(){this.type==="social"&&(this.__syncStringAttribute("social-comments-text",this.commentsText),this.__syncNumberAttribute("social-comments",this.comments),this.__syncStringAttribute("social-comments-href",this.commentsHref),this.__syncStringAttribute("social-likes-text",this.likesText),this.__syncNumberAttribute("social-likes",this.likes),this.__syncStringAttribute("social-likes-hover-content",this.likesHoverContent),this.__syncBooleanAttribute("social-has-liked",this.hasLiked),this.__syncBooleanAttribute("social-likes-interactive",this.likesInteractive),this.__syncBooleanAttribute("social-author",this.author),this.__syncStringAttribute("social-author-text",this.authorText),this.__syncStringAttribute("social-author-href",this.authorHref))}render(){const t=this.variant?`${this.variant.toLowerCase()}`:"",e=(this.direction||"dynamic").toLowerCase(),c=this.type!=="list"&&this.type!=="container"&&e!=="vertical"&&e!=="horizontal"?"dynamic-direction":"",o=this.type==="list"||this.type==="container"?"vertical":e==="horizontal"?"horizontal":"vertical",d=this.__effectiveHref(),p=(this.type==="standard"||this.type==="social")&&!!d,L=p?"clickable":"",b=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",k=(u=!1)=>u?r`<a class="title" href="${d}" tabindex="-1"
25
25
  >${this.title}</a
26
- ><md-icon>arrow_forward</md-icon>`:r`<span class="title">${this.title}</span>`,L=()=>this.__mediaTemplate(),m=v=>r`
26
+ ><md-icon>arrow_forward</md-icon>`:r`<span class="title">${this.title}</span>`,E=()=>this.__mediaTemplate(),g=()=>this.vignette&&this.vignette.trim()?r`<scb-vignette class="content-vignette" variant="${this.vignetteVariant}" label="${this.vignette}"></scb-vignette>`:m,v=u=>r`
27
27
  <div
28
- class="scb-card ${t} ${o} ${c} ${A}"
28
+ class="scb-card ${t} ${o} ${c} ${L}"
29
29
  @click=${p?this.__handleHrefNavigation:null}
30
30
  @keydown=${p?this.__onKeyDown:null}
31
31
  style="cursor:${p?"pointer":"default"};"
32
- role=${p?"link":g}
33
- tabindex=${p?"0":g}
32
+ role=${p?"link":m}
33
+ tabindex=${p?"0":m}
34
34
  aria-label=${this.title||this.subtitle||"Kort"}
35
35
  >
36
36
  ${p?r`<md-ripple></md-ripple>`:""}
37
- ${L()}
38
- ${v}
37
+ ${E()}
38
+ ${u}
39
39
  </div>
40
40
  <md-focus-ring></md-focus-ring>
41
- `;switch(this.type){case"standard":return m(r`
41
+ `;switch(this.type){case"standard":return v(r`
42
42
  <div class="full-content">
43
+ ${g()}
43
44
  <div class="top-content">
44
- ${this.title?r`<div class="header">${z(!!d)}</div>`:""}
45
+ ${this.title?r`<div class="header">${k(!!d)}</div>`:""}
45
46
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
46
47
  ${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
47
48
  ${b?r`<div class="date">${b}</div>`:""}
48
49
  </div>
49
50
  </div>
50
- `);case"list":return m(r`
51
+ `);case"list":return v(r`
51
52
  <div class="full-content">
53
+ ${g()}
52
54
  <div class="top-content">
53
55
  ${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
54
56
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
@@ -59,11 +61,11 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
59
61
  <slot></slot>
60
62
  </div>
61
63
  </div>
62
- `);case"social":const v=this.commentsHref,S=h=>{h.stopPropagation()},u=h=>{const y=this.renderRoot?.querySelector(".scb-card");y&&(h?y.classList.add("no-hover"):y.classList.remove("no-hover"))},E=this.commentsText?`${this.commentsText}: `:"",C=this.likesText?`${this.likesText}: `:"",k=h=>y=>{y.stopPropagation(),this.__dispatchSocialActionEvent(h,y)},w=this.likesDisabled?g:r`
64
+ `);case"social":const u=this.commentsHref,w=h=>{h.stopPropagation()},y=h=>{const f=this.renderRoot?.querySelector(".scb-card");f&&(h?f.classList.add("no-hover"):f.classList.remove("no-hover"))},C=this.commentsText?`${this.commentsText}: `:"",F=this.likesText?`${this.likesText}: `:"",_=h=>f=>{f.stopPropagation(),this.__dispatchSocialActionEvent(h,f)},T=this.likesDisabled?m:r`
63
65
  <span
64
66
  class="likes"
65
- @mouseenter=${()=>u(!0)}
66
- @mouseleave=${()=>u(!1)}
67
+ @mouseenter=${()=>y(!0)}
68
+ @mouseleave=${()=>y(!1)}
67
69
  >
68
70
  ${this.likesInteractive?r`
69
71
  <scb-icon-button
@@ -77,12 +79,13 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
77
79
  @hover=${h=>{h.preventDefault(),h.stopPropagation(),this.__dispatchLikeEvent("like-hover",{hasLiked:this.hasLiked,likes:this.likes??0})}}
78
80
  ></scb-icon-button>
79
81
  `:r`<md-icon>thumb_up</md-icon>`}
80
- <span class="social-text">${C}${this.likes??0}</span>
82
+ <span class="social-text">${F}${this.likes??0}</span>
81
83
  </span>
82
- `;return m(r`
84
+ `;return v(r`
83
85
  <div class="full-content">
86
+ ${g()}
84
87
  <div class="top-content">
85
- ${this.title?r`<div class="header">${z(!!d)}</div>`:""}
88
+ ${this.title?r`<div class="header">${k(!!d)}</div>`:""}
86
89
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
87
90
  ${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
88
91
  ${b?r`<div class="date">${b}</div>`:""}
@@ -94,23 +97,23 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
94
97
  class="author social-text"
95
98
  href="${this.authorHref||"#"}"
96
99
  tabindex="0"
97
- @click=${S}
98
- @mouseenter=${()=>u(!0)}
99
- @mouseleave=${()=>u(!1)}
100
+ @click=${w}
101
+ @mouseenter=${()=>y(!0)}
102
+ @mouseleave=${()=>y(!1)}
100
103
  >${this.authorText}</a
101
104
  >
102
105
  `:""}
103
- ${this.commentsDisabled?g:r`
106
+ ${this.commentsDisabled?m:r`
104
107
  <span
105
108
  class="comments"
106
- @mouseenter=${()=>u(!0)}
107
- @mouseleave=${()=>u(!1)}
109
+ @mouseenter=${()=>y(!0)}
110
+ @mouseleave=${()=>y(!1)}
108
111
  >
109
- ${v!==""?r`
112
+ ${u!==""?r`
110
113
  <scb-icon-button
111
- href="${v}"
114
+ href="${u}"
112
115
  tabindex="0"
113
- @click=${S}
116
+ @click=${w}
114
117
  variant="standard"
115
118
  icon="comment"
116
119
  aria-label="Gå till kommentarer"
@@ -118,7 +121,7 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
118
121
  `:r`
119
122
  <md-icon>comment</md-icon>
120
123
  `}
121
- <span class="social-text">${E}${this.comments??0}</span>
124
+ <span class="social-text">${C}${this.comments??0}</span>
122
125
  </span>
123
126
  `}
124
127
  ${this.likesHoverContent?r`
@@ -129,47 +132,48 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
129
132
  trigger="hover"
130
133
  position="right"
131
134
  >
132
- ${w}
135
+ ${T}
133
136
  </scb-tooltip>
134
- `:w}
137
+ `:T}
135
138
  ${this.replyEnabled?r`
136
139
  <span class="social-action">
137
140
  <scb-icon-button
138
141
  variant="standard"
139
142
  icon="reply"
140
143
  aria-label="Svara"
141
- @click=${k("reply")}
144
+ @click=${_("reply")}
142
145
  ></scb-icon-button>
143
146
  <span class="social-text">Svara</span>
144
147
  </span>
145
- `:g}
148
+ `:m}
146
149
  ${this.editEnabled?r`
147
150
  <span class="social-action">
148
151
  <scb-icon-button
149
152
  variant="standard"
150
153
  icon="edit"
151
154
  aria-label="Redigera"
152
- @click=${k("edit")}
155
+ @click=${_("edit")}
153
156
  ></scb-icon-button>
154
157
  <span class="social-text">Redigera</span>
155
158
  </span>
156
- `:g}
159
+ `:m}
157
160
  ${this.deleteEnabled?r`
158
161
  <span class="social-action">
159
162
  <scb-icon-button
160
163
  variant="standard"
161
164
  icon="delete"
162
165
  aria-label="Ta bort"
163
- @click=${k("delete")}
166
+ @click=${_("delete")}
164
167
  ></scb-icon-button>
165
168
  <span class="social-text">Ta bort</span>
166
169
  </span>
167
- `:g}
170
+ `:m}
168
171
  </div>
169
172
  </div>
170
173
  </div>
171
- `);case"link":return m(r`
174
+ `);case"link":return v(r`
172
175
  <div class="full-content">
176
+ ${g()}
173
177
  <div class="top-content">
174
178
  ${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
175
179
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
@@ -180,8 +184,9 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
180
184
  <slot></slot>
181
185
  </div>
182
186
  </div>
183
- `);case"action":return m(r`
187
+ `);case"action":return v(r`
184
188
  <div class="full-content">
189
+ ${g()}
185
190
  <div class="top-content">
186
191
  ${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
187
192
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
@@ -192,8 +197,9 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
192
197
  <slot></slot>
193
198
  </div>
194
199
  </div>
195
- `);case"container":return m(r`
200
+ `);case"container":return v(r`
196
201
  <div class="container-content ${this.title||this.subtitle?"has-header":""}">
202
+ ${g()}
197
203
  ${this.title||this.subtitle?r`
198
204
  <div class="top-content">
199
205
  ${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
@@ -202,16 +208,17 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
202
208
  `:""}
203
209
  <slot></slot>
204
210
  </div>
205
- `);default:return m(r`
211
+ `);default:return v(r`
206
212
  <div class="full-content">
213
+ ${g()}
207
214
  <div class="top-content">
208
- ${this.title?r`<div class="header">${z(!!d)}</div>`:""}
215
+ ${this.title?r`<div class="header">${k(!!d)}</div>`:""}
209
216
  ${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
210
217
  ${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
211
218
  ${b?r`<div class="date">${b}</div>`:""}
212
219
  </div>
213
220
  </div>
214
- `)}}updated(t){super.updated(t),t.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),t.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.mediaFit&&this.mediaFit!=="cover"?this.style.setProperty("--scb-card-media-fit",this.mediaFit):this.style.removeProperty("--scb-card-media-fit"),this.mediaPosition&&this.mediaPosition!=="center"?this.style.setProperty("--scb-card-media-position",this.mediaPosition):this.style.removeProperty("--scb-card-media-position"),this.__syncSocialAttributes(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&x(this,f,_).call(this),(t.has("innerPadding")||t.has("paddingTop")||t.has("paddingBottom")||t.has("paddingLeft")||t.has("paddingRight"))&&x(this,f,$).call(this)}async firstUpdated(t){i.__iconLoaded||(await T(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),i.__iconLoaded=!0),i.__rippleLoaded||(await T(()=>import("../../vendor/vendor-material.js").then(e=>e.r),__vite__mapDeps([0,1]),import.meta.url),i.__rippleLoaded=!0),x(this,f,_).call(this),x(this,f,$).call(this),this.__syncSocialAttributes()}};f=new WeakSet;_=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,n=this.mapSpacingToken(this.spacingBottom)??t,c=this.mapSpacingToken(this.spacingLeft),o=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-card-spacing-block-start",e):this.style.removeProperty("--scb-card-spacing-block-start"),n?this.style.setProperty("--scb-card-spacing-block-end",n):this.style.removeProperty("--scb-card-spacing-block-end"),c?this.style.setProperty("--scb-card-spacing-inline-start",c):this.style.removeProperty("--scb-card-spacing-inline-start"),o?this.style.setProperty("--scb-card-spacing-inline-end",o):this.style.removeProperty("--scb-card-spacing-inline-end")};$=function(){const t=this.mapSpacingToken(this.innerPadding),e=this.mapSpacingToken(this.paddingTop)??t,n=this.mapSpacingToken(this.paddingBottom)??t,c=this.mapSpacingToken(this.paddingLeft)??t,o=this.mapSpacingToken(this.paddingRight)??t;e?this.style.setProperty("--scb-card-content-padding-block-start",e):this.style.removeProperty("--scb-card-content-padding-block-start"),n?this.style.setProperty("--scb-card-content-padding-block-end",n):this.style.removeProperty("--scb-card-content-padding-block-end"),c?this.style.setProperty("--scb-card-content-padding-inline-start",c):this.style.removeProperty("--scb-card-content-padding-inline-start"),o?this.style.setProperty("--scb-card-content-padding-inline-end",o):this.style.removeProperty("--scb-card-content-padding-inline-end")};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=F`
221
+ `)}}updated(t){super.updated(t),t.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),t.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),t.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),t.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),t.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.mediaFit&&this.mediaFit!=="cover"?this.style.setProperty("--scb-card-media-fit",this.mediaFit):this.style.removeProperty("--scb-card-media-fit"),this.mediaPosition&&this.mediaPosition!=="center"?this.style.setProperty("--scb-card-media-position",this.mediaPosition):this.style.removeProperty("--scb-card-media-position"),this.__syncSocialAttributes(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&z(this,x,$).call(this),(t.has("innerPadding")||t.has("paddingTop")||t.has("paddingBottom")||t.has("paddingLeft")||t.has("paddingRight"))&&z(this,x,S).call(this)}async firstUpdated(t){i.__iconLoaded||(await P(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),i.__iconLoaded=!0),i.__rippleLoaded||(await P(()=>import("../../vendor/vendor-material.js").then(e=>e.r),__vite__mapDeps([0,1]),import.meta.url),i.__rippleLoaded=!0),z(this,x,$).call(this),z(this,x,S).call(this),this.__syncSocialAttributes()}};x=new WeakSet;$=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,n=this.mapSpacingToken(this.spacingBottom)??t,c=this.mapSpacingToken(this.spacingLeft),o=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-card-spacing-block-start",e):this.style.removeProperty("--scb-card-spacing-block-start"),n?this.style.setProperty("--scb-card-spacing-block-end",n):this.style.removeProperty("--scb-card-spacing-block-end"),c?this.style.setProperty("--scb-card-spacing-inline-start",c):this.style.removeProperty("--scb-card-spacing-inline-start"),o?this.style.setProperty("--scb-card-spacing-inline-end",o):this.style.removeProperty("--scb-card-spacing-inline-end")};S=function(){const t=this.mapSpacingToken(this.innerPadding),e=this.mapSpacingToken(this.paddingTop)??t,n=this.mapSpacingToken(this.paddingBottom)??t,c=this.mapSpacingToken(this.paddingLeft)??t,o=this.mapSpacingToken(this.paddingRight)??t;e?this.style.setProperty("--scb-card-content-padding-block-start",e):this.style.removeProperty("--scb-card-content-padding-block-start"),n?this.style.setProperty("--scb-card-content-padding-block-end",n):this.style.removeProperty("--scb-card-content-padding-block-end"),c?this.style.setProperty("--scb-card-content-padding-inline-start",c):this.style.removeProperty("--scb-card-content-padding-inline-start"),o?this.style.setProperty("--scb-card-content-padding-inline-end",o):this.style.removeProperty("--scb-card-content-padding-inline-end")};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=H`
215
222
  :host {
216
223
  display: block;
217
224
  container-type: inline-size;
@@ -482,6 +489,9 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
482
489
  overflow: hidden;
483
490
  border-radius: var(--md-sys-shape-corner-large, 16px);
484
491
  }
492
+ .content-vignette {
493
+ margin-block-end: var(--spacing-5, 12px);
494
+ }
485
495
  .media img {
486
496
  display: block;
487
497
  inline-size: 100%;
@@ -742,4 +752,4 @@ import{_ as T}from"../../vendor/preload-helper.js";import{a as F,n as a,i as H,x
742
752
  .scb-card.filled-alternative .content.list ::slotted(scb-list) {
743
753
  --scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
744
754
  }
745
- `;s([a({type:String,reflect:!0,converter:l})],i.prototype,"type",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"variant",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"direction",2);s([a({type:String,reflect:!0})],i.prototype,"size",2);s([a({type:String,attribute:"media-type"})],i.prototype,"mediaType",2);s([a({type:String,attribute:"media-href"})],i.prototype,"mediaHref",2);s([a({type:String,attribute:"media-alt"})],i.prototype,"mediaAlt",2);s([a({type:String,attribute:"media-srcset"})],i.prototype,"mediaSrcset",2);s([a({type:String,attribute:"media-sizes"})],i.prototype,"mediaSizes",2);s([a({type:String,attribute:"media-loading"})],i.prototype,"mediaLoading",2);s([a({type:String,attribute:"media-decoding"})],i.prototype,"mediaDecoding",2);s([a({type:String,attribute:"media-fetchpriority"})],i.prototype,"mediaFetchPriority",2);s([a({type:String,attribute:"media-fit"})],i.prototype,"mediaFit",2);s([a({type:String,attribute:"media-position"})],i.prototype,"mediaPosition",2);s([a({type:String,attribute:"media-width"})],i.prototype,"mediaWidth",2);s([a({type:String,attribute:"media-height"})],i.prototype,"mediaHeight",2);s([a({type:String,attribute:"media-aspect"})],i.prototype,"mediaAspect",2);s([a({type:Boolean,attribute:"media-placeholder"})],i.prototype,"mediaPlaceholder",2);s([a({type:String,attribute:"card-href",reflect:!0,converter:l})],i.prototype,"cardHref",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"href",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"title",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"subtitle",2);s([a({type:String,attribute:"supporting-text",reflect:!0,converter:l})],i.prototype,"supportingText",2);s([a({type:Date,reflect:!0})],i.prototype,"date",2);s([a({type:String,attribute:"social-comments-text"})],i.prototype,"commentsText",2);s([a({type:Number,attribute:"social-comments"})],i.prototype,"comments",2);s([a({type:Boolean,attribute:"social-comments-disabled"})],i.prototype,"commentsDisabled",2);s([a({type:String,attribute:"social-comments-href"})],i.prototype,"commentsHref",2);s([a({type:String,attribute:"social-likes-text"})],i.prototype,"likesText",2);s([a({type:Number,attribute:"social-likes"})],i.prototype,"likes",2);s([a({type:Boolean,attribute:"social-likes-disabled"})],i.prototype,"likesDisabled",2);s([a({type:String,attribute:"social-likes-hover-content"})],i.prototype,"likesHoverContent",2);s([a({type:Boolean,attribute:"social-has-liked"})],i.prototype,"hasLiked",2);s([a({type:Boolean,attribute:"social-likes-interactive"})],i.prototype,"likesInteractive",2);s([a({type:Boolean,attribute:"social-author"})],i.prototype,"author",2);s([a({type:String,attribute:"social-author-text"})],i.prototype,"authorText",2);s([a({type:String,attribute:"social-author-href"})],i.prototype,"authorHref",2);s([a({type:Boolean,attribute:"social-reply-enabled"})],i.prototype,"replyEnabled",2);s([a({type:Boolean,attribute:"social-edit-enabled"})],i.prototype,"editEnabled",2);s([a({type:Boolean,attribute:"social-delete-enabled"})],i.prototype,"deleteEnabled",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"sizing",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"width",2);s([a({type:String,reflect:!0,attribute:"max-width",converter:l})],i.prototype,"maxWidth",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"height",2);s([a({type:String,reflect:!0,attribute:"max-height",converter:l})],i.prototype,"maxHeight",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"spacing",2);s([a({type:String,attribute:"spacing-top",reflect:!0,converter:l})],i.prototype,"spacingTop",2);s([a({type:String,attribute:"spacing-bottom",reflect:!0,converter:l})],i.prototype,"spacingBottom",2);s([a({type:String,attribute:"spacing-left",reflect:!0,converter:l})],i.prototype,"spacingLeft",2);s([a({type:String,attribute:"spacing-right",reflect:!0,converter:l})],i.prototype,"spacingRight",2);s([a({type:String,attribute:"padding",reflect:!0,converter:l})],i.prototype,"innerPadding",2);s([a({type:String,attribute:"padding-top",reflect:!0,converter:l})],i.prototype,"paddingTop",2);s([a({type:String,attribute:"padding-bottom",reflect:!0,converter:l})],i.prototype,"paddingBottom",2);s([a({type:String,attribute:"padding-left",reflect:!0,converter:l})],i.prototype,"paddingLeft",2);s([a({type:String,attribute:"padding-right",reflect:!0,converter:l})],i.prototype,"paddingRight",2);i=s([D("scb-card")],i);
755
+ `;s([a({type:String,reflect:!0,converter:l})],i.prototype,"type",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"variant",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"direction",2);s([a({type:String,reflect:!0})],i.prototype,"size",2);s([a({type:String,attribute:"media-type"})],i.prototype,"mediaType",2);s([a({type:String,attribute:"media-href"})],i.prototype,"mediaHref",2);s([a({type:String,attribute:"media-alt"})],i.prototype,"mediaAlt",2);s([a({type:String,attribute:"media-srcset"})],i.prototype,"mediaSrcset",2);s([a({type:String,attribute:"media-sizes"})],i.prototype,"mediaSizes",2);s([a({type:String,attribute:"media-loading"})],i.prototype,"mediaLoading",2);s([a({type:String,attribute:"media-decoding"})],i.prototype,"mediaDecoding",2);s([a({type:String,attribute:"media-fetchpriority"})],i.prototype,"mediaFetchPriority",2);s([a({type:String,attribute:"media-fit"})],i.prototype,"mediaFit",2);s([a({type:String,attribute:"media-position"})],i.prototype,"mediaPosition",2);s([a({type:String,attribute:"media-width"})],i.prototype,"mediaWidth",2);s([a({type:String,attribute:"media-height"})],i.prototype,"mediaHeight",2);s([a({type:String,attribute:"media-aspect"})],i.prototype,"mediaAspect",2);s([a({type:Boolean,attribute:"media-placeholder"})],i.prototype,"mediaPlaceholder",2);s([a({type:String,attribute:"card-href",reflect:!0,converter:l})],i.prototype,"cardHref",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"href",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"title",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"subtitle",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"vignette",2);s([a({type:String,attribute:"vignette-variant",reflect:!0,converter:l})],i.prototype,"vignetteVariant",2);s([a({type:String,attribute:"supporting-text",reflect:!0,converter:l})],i.prototype,"supportingText",2);s([a({type:Date,reflect:!0})],i.prototype,"date",2);s([a({type:String,attribute:"social-comments-text"})],i.prototype,"commentsText",2);s([a({type:Number,attribute:"social-comments"})],i.prototype,"comments",2);s([a({type:Boolean,attribute:"social-comments-disabled"})],i.prototype,"commentsDisabled",2);s([a({type:String,attribute:"social-comments-href"})],i.prototype,"commentsHref",2);s([a({type:String,attribute:"social-likes-text"})],i.prototype,"likesText",2);s([a({type:Number,attribute:"social-likes"})],i.prototype,"likes",2);s([a({type:Boolean,attribute:"social-likes-disabled"})],i.prototype,"likesDisabled",2);s([a({type:String,attribute:"social-likes-hover-content"})],i.prototype,"likesHoverContent",2);s([a({type:Boolean,attribute:"social-has-liked"})],i.prototype,"hasLiked",2);s([a({type:Boolean,attribute:"social-likes-interactive"})],i.prototype,"likesInteractive",2);s([a({type:Boolean,attribute:"social-author"})],i.prototype,"author",2);s([a({type:String,attribute:"social-author-text"})],i.prototype,"authorText",2);s([a({type:String,attribute:"social-author-href"})],i.prototype,"authorHref",2);s([a({type:Boolean,attribute:"social-reply-enabled"})],i.prototype,"replyEnabled",2);s([a({type:Boolean,attribute:"social-edit-enabled"})],i.prototype,"editEnabled",2);s([a({type:Boolean,attribute:"social-delete-enabled"})],i.prototype,"deleteEnabled",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"sizing",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"width",2);s([a({type:String,reflect:!0,attribute:"max-width",converter:l})],i.prototype,"maxWidth",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"height",2);s([a({type:String,reflect:!0,attribute:"max-height",converter:l})],i.prototype,"maxHeight",2);s([a({type:String,reflect:!0,converter:l})],i.prototype,"spacing",2);s([a({type:String,attribute:"spacing-top",reflect:!0,converter:l})],i.prototype,"spacingTop",2);s([a({type:String,attribute:"spacing-bottom",reflect:!0,converter:l})],i.prototype,"spacingBottom",2);s([a({type:String,attribute:"spacing-left",reflect:!0,converter:l})],i.prototype,"spacingLeft",2);s([a({type:String,attribute:"spacing-right",reflect:!0,converter:l})],i.prototype,"spacingRight",2);s([a({type:String,attribute:"padding",reflect:!0,converter:l})],i.prototype,"innerPadding",2);s([a({type:String,attribute:"padding-top",reflect:!0,converter:l})],i.prototype,"paddingTop",2);s([a({type:String,attribute:"padding-bottom",reflect:!0,converter:l})],i.prototype,"paddingBottom",2);s([a({type:String,attribute:"padding-left",reflect:!0,converter:l})],i.prototype,"paddingLeft",2);s([a({type:String,attribute:"padding-right",reflect:!0,converter:l})],i.prototype,"paddingRight",2);i=s([B("scb-card")],i);
@@ -1,8 +1,8 @@
1
- import{a as g,n as c,i as l,x as h,t as b}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(s,n,i){try{customElements.get(s)||e(s,n,i)}catch(o){var a=String(o||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var v=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p=(t,e,s,n)=>{for(var i=n>1?void 0:n?d(e,s):e,a=t.length-1,o;a>=0;a--)(o=t[a])&&(i=(n?o(e,s,i):o(i))||i);return n&&i&&v(e,s,i),i};let r=class extends l{constructor(){super(...arguments),this.label="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.applySpacing()}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,s=this.mapSpacingToken(this.spacingBottom)??t,n=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-vignette-spacing-block-start",e):this.style.removeProperty("--scb-vignette-spacing-block-start"),s?this.style.setProperty("--scb-vignette-spacing-block-end",s):this.style.removeProperty("--scb-vignette-spacing-block-end"),n?this.style.setProperty("--scb-vignette-spacing-inline-start",n):this.style.removeProperty("--scb-vignette-spacing-inline-start"),i?this.style.setProperty("--scb-vignette-spacing-inline-end",i):this.style.removeProperty("--scb-vignette-spacing-inline-end")}render(){return h`
1
+ import{a as g,n as a,i as l,x as v,t as b}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(s,r,i){try{customElements.get(s)||e(s,r,i)}catch(c){var p=String(c||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,o=(t,e,s,r)=>{for(var i=r>1?void 0:r?h(e,s):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(i=(r?c(e,s,i):c(i))||i);return r&&i&&d(e,s,i),i};let n=class extends l{constructor(){super(...arguments),this.label="",this.variant="outline",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}updated(t){super.updated(t),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.applySpacing()}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}applySpacing(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,s=this.mapSpacingToken(this.spacingBottom)??t,r=this.mapSpacingToken(this.spacingLeft),i=this.mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-vignette-spacing-block-start",e):this.style.removeProperty("--scb-vignette-spacing-block-start"),s?this.style.setProperty("--scb-vignette-spacing-block-end",s):this.style.removeProperty("--scb-vignette-spacing-block-end"),r?this.style.setProperty("--scb-vignette-spacing-inline-start",r):this.style.removeProperty("--scb-vignette-spacing-inline-start"),i?this.style.setProperty("--scb-vignette-spacing-inline-end",i):this.style.removeProperty("--scb-vignette-spacing-inline-end")}render(){return v`
2
2
  <div class="vignette">
3
3
  <p>${this.label}</p>
4
4
  </div>
5
- `}};r.styles=g`
5
+ `}};n.styles=g`
6
6
  :host {
7
7
  display: block;
8
8
  margin-block-start: var(--scb-vignette-spacing-block-start, 0);
@@ -12,11 +12,18 @@ import{a as g,n as c,i as l,x as h,t as b}from"../../vendor/vendor.js";(function
12
12
  }
13
13
 
14
14
  .vignette {
15
- padding: 4px 8px;
15
+ --scb-vignette-color: var(--md-sys-color-on-surface, #0F0865);
16
+ padding: 3px 11px;
16
17
  border-radius: 8px;
17
- border: 1px solid #484473;
18
+ border: 1px solid var(--md-sys-color-outline);
18
19
  width: fit-content;
19
- color: #484473;
20
+ color: var(--md-sys-color-on-surface);
21
+ }
22
+
23
+ :host([variant='filled']) .vignette {
24
+ background: color-mix(in srgb, var(--scb-vignette-color) 8%, transparent);
25
+ border: none;
26
+ color: var(--scb-vignette-color);
20
27
  }
21
28
 
22
29
  .vignette p {
@@ -27,4 +34,4 @@ import{a as g,n as c,i as l,x as h,t as b}from"../../vendor/vendor.js";(function
27
34
  margin: 0;
28
35
  color: var(--md-sys-color-on-surface);
29
36
  }
30
- `;p([c({type:String})],r.prototype,"label",2);p([c({type:String,reflect:!0})],r.prototype,"spacing",2);p([c({type:String,attribute:"spacing-top",reflect:!0})],r.prototype,"spacingTop",2);p([c({type:String,attribute:"spacing-bottom",reflect:!0})],r.prototype,"spacingBottom",2);p([c({type:String,attribute:"spacing-left",reflect:!0})],r.prototype,"spacingLeft",2);p([c({type:String,attribute:"spacing-right",reflect:!0})],r.prototype,"spacingRight",2);r=p([b("scb-vignette")],r);
37
+ `;o([a({type:String})],n.prototype,"label",2);o([a({type:String,reflect:!0})],n.prototype,"variant",2);o([a({type:String,reflect:!0})],n.prototype,"spacing",2);o([a({type:String,attribute:"spacing-top",reflect:!0})],n.prototype,"spacingTop",2);o([a({type:String,attribute:"spacing-bottom",reflect:!0})],n.prototype,"spacingBottom",2);o([a({type:String,attribute:"spacing-left",reflect:!0})],n.prototype,"spacingLeft",2);o([a({type:String,attribute:"spacing-right",reflect:!0})],n.prototype,"spacingRight",2);n=o([b("scb-vignette")],n);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.352",
3
+ "version": "0.1.354",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -426,5 +426,5 @@
426
426
  },
427
427
  "./mvc/*": "./mvc/*"
428
428
  },
429
- "buildHash": "B73507616BFC413BD85E78BCEEAD144DF989B1B457AD9F6AD678E76661A0D5A1"
429
+ "buildHash": "65FE11B96840C77A685BA94CD375C3BCF1688264E99750D8B8A1D9B277D33B41"
430
430
  }
@@ -27,6 +27,8 @@ export declare class ScbCard extends LitElement {
27
27
  href: string;
28
28
  title: string;
29
29
  subtitle: string;
30
+ vignette: string;
31
+ vignetteVariant: 'outline' | 'filled';
30
32
  supportingText: string;
31
33
  date?: Date;
32
34
  commentsText: string;