scb-wc-test 0.1.355 → 0.1.357
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,12 +1,12 @@
|
|
|
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 P}from"../../vendor/preload-helper.js";import{a as
|
|
2
|
+
import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x as r,E as g,t as N}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,o,d){try{customElements.get(n)||e(n,o,d)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var R=Object.defineProperty,W=Object.getOwnPropertyDescriptor,A=t=>{throw TypeError(t)},s=(t,e,n,o)=>{for(var d=o>1?void 0:o?W(e,n):e,l=t.length-1,p;l>=0;l--)(p=t[l])&&(d=(o?p(e,n,d):p(d))||d);return o&&d&&R(e,n,d),d},I=(t,e,n)=>e.has(t)||A("Cannot "+n),M=(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)=>(I(t,e,"access private method"),n),x,$,S;const c={fromAttribute:t=>t??"",toAttribute:t=>typeof t!="string"||t.trim()===""?null:t};let i=class extends B{constructor(){super(...arguments),M(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.vignettePadding=void 0,this.vignettePaddingTop=void 0,this.vignettePaddingBottom=void 0,this.vignettePaddingLeft=void 0,this.vignettePaddingRight=void 0,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 d=Number(n[0]),l=Number(n[1]);if(d>0&&l>0)return{w:d,h:l}}const o=Number(e);return isFinite(o)&&o>0?{w:1e3,h:Math.round(1e3/o)}:{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},o=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});if(this.dispatchEvent(o),o.defaultPrevented)return!1;const d=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(d),!d.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>
|
|
6
6
|
</slot>
|
|
7
7
|
</div>
|
|
8
|
-
`;if(this.mediaHref||this.mediaSrcset){let e=Number(this.mediaWidth)||0,n=Number(this.mediaHeight)||0;const
|
|
9
|
-
<div class="media ${
|
|
8
|
+
`;if(this.mediaHref||this.mediaSrcset){let e=Number(this.mediaWidth)||0,n=Number(this.mediaHeight)||0;const o=(this.mediaAspect||"").trim();if(!e||!n){const p=this.__calcAspectWH(o||"3/2");e||(e=p.w),n||(n=p.h)}const d=`aspect-ratio:${o||`${e}/${n}`};`,l=this.mediaPlaceholder?"has-ph":"";return r`
|
|
9
|
+
<div class="media ${l}" style="${d}">
|
|
10
10
|
<slot name="media-sources"></slot>
|
|
11
11
|
<img
|
|
12
12
|
src="${this.mediaHref||""}"
|
|
@@ -21,16 +21,16 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,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(),
|
|
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}__vignettePaddingStyle(){const t=this.mapSpacingToken(this.vignettePadding),e=this.mapSpacingToken(this.vignettePaddingTop)??t,n=this.mapSpacingToken(this.vignettePaddingBottom)??t,o=this.mapSpacingToken(this.vignettePaddingLeft)??t,d=this.mapSpacingToken(this.vignettePaddingRight)??t,l=[];return e&&l.push(`--scb-vignette-padding-block-start:${e}`),n&&l.push(`--scb-vignette-padding-block-end:${n}`),o&&l.push(`--scb-vignette-padding-inline-start:${o}`),d&&l.push(`--scb-vignette-padding-inline-end:${d}`),l.join(";")}__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(),o=this.type!=="list"&&this.type!=="container"&&e!=="vertical"&&e!=="horizontal"?"dynamic-direction":"",d=this.type==="list"||this.type==="container"?"vertical":e==="horizontal"?"horizontal":"vertical",l=this.__effectiveHref(),p=(this.type==="standard"||this.type==="social")&&!!l,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="${l}" tabindex="-1"
|
|
25
25
|
>${this.title}</a
|
|
26
|
-
><md-icon>arrow_forward</md-icon>`:r`<span class="title">${this.title}</span>`,E=()=>this.__mediaTemplate(),
|
|
26
|
+
><md-icon>arrow_forward</md-icon>`:r`<span class="title">${this.title}</span>`,E=()=>this.__mediaTemplate(),C=this.__vignettePaddingStyle(),m=()=>this.vignette&&this.vignette.trim()?r`<scb-vignette class="content-vignette" variant="${this.vignetteVariant}" label="${this.vignette}" style=${C||g}></scb-vignette>`:g,v=u=>r`
|
|
27
27
|
<div
|
|
28
|
-
class="scb-card ${t} ${
|
|
28
|
+
class="scb-card ${t} ${d} ${o} ${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":
|
|
33
|
-
tabindex=${p?"0":
|
|
32
|
+
role=${p?"link":g}
|
|
33
|
+
tabindex=${p?"0":g}
|
|
34
34
|
aria-label=${this.title||this.subtitle||"Kort"}
|
|
35
35
|
>
|
|
36
36
|
${p?r`<md-ripple></md-ripple>`:""}
|
|
@@ -40,9 +40,9 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
40
40
|
<md-focus-ring></md-focus-ring>
|
|
41
41
|
`;switch(this.type){case"standard":return v(r`
|
|
42
42
|
<div class="full-content">
|
|
43
|
-
${
|
|
43
|
+
${m()}
|
|
44
44
|
<div class="top-content">
|
|
45
|
-
${this.title?r`<div class="header">${k(!!
|
|
45
|
+
${this.title?r`<div class="header">${k(!!l)}</div>`:""}
|
|
46
46
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
47
47
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
48
48
|
${b?r`<div class="date">${b}</div>`:""}
|
|
@@ -50,7 +50,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
50
50
|
</div>
|
|
51
51
|
`);case"list":return v(r`
|
|
52
52
|
<div class="full-content">
|
|
53
|
-
${
|
|
53
|
+
${m()}
|
|
54
54
|
<div class="top-content">
|
|
55
55
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
56
56
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
@@ -61,7 +61,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
61
61
|
<slot></slot>
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
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"))},
|
|
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"))},F=this.commentsText?`${this.commentsText}: `:"",H=this.likesText?`${this.likesText}: `:"",_=h=>f=>{f.stopPropagation(),this.__dispatchSocialActionEvent(h,f)},T=this.likesDisabled?g:r`
|
|
65
65
|
<span
|
|
66
66
|
class="likes"
|
|
67
67
|
@mouseenter=${()=>y(!0)}
|
|
@@ -79,13 +79,13 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
79
79
|
@hover=${h=>{h.preventDefault(),h.stopPropagation(),this.__dispatchLikeEvent("like-hover",{hasLiked:this.hasLiked,likes:this.likes??0})}}
|
|
80
80
|
></scb-icon-button>
|
|
81
81
|
`:r`<md-icon>thumb_up</md-icon>`}
|
|
82
|
-
<span class="social-text">${
|
|
82
|
+
<span class="social-text">${H}${this.likes??0}</span>
|
|
83
83
|
</span>
|
|
84
84
|
`;return v(r`
|
|
85
85
|
<div class="full-content">
|
|
86
|
-
${
|
|
86
|
+
${m()}
|
|
87
87
|
<div class="top-content">
|
|
88
|
-
${this.title?r`<div class="header">${k(!!
|
|
88
|
+
${this.title?r`<div class="header">${k(!!l)}</div>`:""}
|
|
89
89
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
90
90
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
91
91
|
${b?r`<div class="date">${b}</div>`:""}
|
|
@@ -103,7 +103,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
103
103
|
>${this.authorText}</a
|
|
104
104
|
>
|
|
105
105
|
`:""}
|
|
106
|
-
${this.commentsDisabled?
|
|
106
|
+
${this.commentsDisabled?g:r`
|
|
107
107
|
<span
|
|
108
108
|
class="comments"
|
|
109
109
|
@mouseenter=${()=>y(!0)}
|
|
@@ -121,7 +121,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
121
121
|
`:r`
|
|
122
122
|
<md-icon>comment</md-icon>
|
|
123
123
|
`}
|
|
124
|
-
<span class="social-text">${
|
|
124
|
+
<span class="social-text">${F}${this.comments??0}</span>
|
|
125
125
|
</span>
|
|
126
126
|
`}
|
|
127
127
|
${this.likesHoverContent?r`
|
|
@@ -145,7 +145,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
145
145
|
></scb-icon-button>
|
|
146
146
|
<span class="social-text">Svara</span>
|
|
147
147
|
</span>
|
|
148
|
-
`:
|
|
148
|
+
`:g}
|
|
149
149
|
${this.editEnabled?r`
|
|
150
150
|
<span class="social-action">
|
|
151
151
|
<scb-icon-button
|
|
@@ -156,7 +156,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
156
156
|
></scb-icon-button>
|
|
157
157
|
<span class="social-text">Redigera</span>
|
|
158
158
|
</span>
|
|
159
|
-
`:
|
|
159
|
+
`:g}
|
|
160
160
|
${this.deleteEnabled?r`
|
|
161
161
|
<span class="social-action">
|
|
162
162
|
<scb-icon-button
|
|
@@ -167,13 +167,13 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
167
167
|
></scb-icon-button>
|
|
168
168
|
<span class="social-text">Ta bort</span>
|
|
169
169
|
</span>
|
|
170
|
-
`:
|
|
170
|
+
`:g}
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|
|
174
174
|
`);case"link":return v(r`
|
|
175
175
|
<div class="full-content">
|
|
176
|
-
${
|
|
176
|
+
${m()}
|
|
177
177
|
<div class="top-content">
|
|
178
178
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
179
179
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
@@ -186,7 +186,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
186
186
|
</div>
|
|
187
187
|
`);case"action":return v(r`
|
|
188
188
|
<div class="full-content">
|
|
189
|
-
${
|
|
189
|
+
${m()}
|
|
190
190
|
<div class="top-content">
|
|
191
191
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
192
192
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
@@ -199,7 +199,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
199
199
|
</div>
|
|
200
200
|
`);case"container":return v(r`
|
|
201
201
|
<div class="container-content ${this.title||this.subtitle?"has-header":""}">
|
|
202
|
-
${
|
|
202
|
+
${m()}
|
|
203
203
|
${this.title||this.subtitle?r`
|
|
204
204
|
<div class="top-content">
|
|
205
205
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
@@ -210,15 +210,15 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
210
210
|
</div>
|
|
211
211
|
`);default:return v(r`
|
|
212
212
|
<div class="full-content">
|
|
213
|
-
${
|
|
213
|
+
${m()}
|
|
214
214
|
<div class="top-content">
|
|
215
|
-
${this.title?r`<div class="header">${k(!!
|
|
215
|
+
${this.title?r`<div class="header">${k(!!l)}</div>`:""}
|
|
216
216
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
217
217
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
218
218
|
${b?r`<div class="date">${b}</div>`:""}
|
|
219
219
|
</div>
|
|
220
220
|
</div>
|
|
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,
|
|
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,o=this.mapSpacingToken(this.spacingLeft),d=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"),o?this.style.setProperty("--scb-card-spacing-inline-start",o):this.style.removeProperty("--scb-card-spacing-inline-start"),d?this.style.setProperty("--scb-card-spacing-inline-end",d):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,o=this.mapSpacingToken(this.paddingLeft)??t,d=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"),o?this.style.setProperty("--scb-card-content-padding-inline-start",o):this.style.removeProperty("--scb-card-content-padding-inline-start"),d?this.style.setProperty("--scb-card-content-padding-inline-end",d):this.style.removeProperty("--scb-card-content-padding-inline-end")};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=D`
|
|
222
222
|
:host {
|
|
223
223
|
display: block;
|
|
224
224
|
container-type: inline-size;
|
|
@@ -752,4 +752,4 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as H,n as a,i as D,x
|
|
|
752
752
|
.scb-card.filled-alternative .content.list ::slotted(scb-list) {
|
|
753
753
|
--scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
|
|
754
754
|
}
|
|
755
|
-
`;s([a({type:String,reflect:!0,converter:
|
|
755
|
+
`;s([a({type:String,reflect:!0,converter:c})],i.prototype,"type",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"variant",2);s([a({type:String,reflect:!0,converter:c})],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:c})],i.prototype,"cardHref",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"href",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"title",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"subtitle",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"vignette",2);s([a({type:String,attribute:"vignette-variant",reflect:!0,converter:c})],i.prototype,"vignetteVariant",2);s([a({type:String,attribute:"vignette-padding",reflect:!0,converter:c})],i.prototype,"vignettePadding",2);s([a({type:String,attribute:"vignette-padding-top",reflect:!0,converter:c})],i.prototype,"vignettePaddingTop",2);s([a({type:String,attribute:"vignette-padding-bottom",reflect:!0,converter:c})],i.prototype,"vignettePaddingBottom",2);s([a({type:String,attribute:"vignette-padding-left",reflect:!0,converter:c})],i.prototype,"vignettePaddingLeft",2);s([a({type:String,attribute:"vignette-padding-right",reflect:!0,converter:c})],i.prototype,"vignettePaddingRight",2);s([a({type:String,attribute:"supporting-text",reflect:!0,converter:c})],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:c})],i.prototype,"sizing",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"width",2);s([a({type:String,reflect:!0,attribute:"max-width",converter:c})],i.prototype,"maxWidth",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"height",2);s([a({type:String,reflect:!0,attribute:"max-height",converter:c})],i.prototype,"maxHeight",2);s([a({type:String,reflect:!0,converter:c})],i.prototype,"spacing",2);s([a({type:String,attribute:"spacing-top",reflect:!0,converter:c})],i.prototype,"spacingTop",2);s([a({type:String,attribute:"spacing-bottom",reflect:!0,converter:c})],i.prototype,"spacingBottom",2);s([a({type:String,attribute:"spacing-left",reflect:!0,converter:c})],i.prototype,"spacingLeft",2);s([a({type:String,attribute:"spacing-right",reflect:!0,converter:c})],i.prototype,"spacingRight",2);s([a({type:String,attribute:"padding",reflect:!0,converter:c})],i.prototype,"innerPadding",2);s([a({type:String,attribute:"padding-top",reflect:!0,converter:c})],i.prototype,"paddingTop",2);s([a({type:String,attribute:"padding-bottom",reflect:!0,converter:c})],i.prototype,"paddingBottom",2);s([a({type:String,attribute:"padding-left",reflect:!0,converter:c})],i.prototype,"paddingLeft",2);s([a({type:String,attribute:"padding-right",reflect:!0,converter:c})],i.prototype,"paddingRight",2);i=s([N("scb-card")],i);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as g,n as
|
|
1
|
+
import{a as g,n as o,i as l,x as d,t as v}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(n,r,i){try{customElements.get(n)||e(n,r,i)}catch(c){var p=String(c||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var b=Object.defineProperty,h=Object.getOwnPropertyDescriptor,a=(t,e,n,r)=>{for(var i=r>1?void 0:r?h(e,n):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(i=(r?c(e,n,i):c(i))||i);return r&&i&&b(e,n,i),i};let s=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,n=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"),n?this.style.setProperty("--scb-vignette-spacing-block-end",n):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 d`
|
|
2
2
|
<div class="vignette">
|
|
3
3
|
<p>${this.label}</p>
|
|
4
4
|
</div>
|
|
5
|
-
`}};
|
|
5
|
+
`}};s.styles=g`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
margin-block-start: var(--scb-vignette-spacing-block-start, 0);
|
|
@@ -13,7 +13,10 @@ import{a as g,n as a,i as l,x as v,t as b}from"../../vendor/vendor.js";(function
|
|
|
13
13
|
|
|
14
14
|
.vignette {
|
|
15
15
|
--scb-vignette-color: var(--md-sys-color-on-surface, #0F0865);
|
|
16
|
-
padding: 3px
|
|
16
|
+
padding-block-start: var(--scb-vignette-padding-block-start, 3px);
|
|
17
|
+
padding-block-end: var(--scb-vignette-padding-block-end, 3px);
|
|
18
|
+
padding-inline-start: var(--scb-vignette-padding-inline-start, 11px);
|
|
19
|
+
padding-inline-end: var(--scb-vignette-padding-inline-end, 11px);
|
|
17
20
|
border-radius: 8px;
|
|
18
21
|
border: 1px solid var(--md-sys-color-outline);
|
|
19
22
|
width: fit-content;
|
|
@@ -34,4 +37,4 @@ import{a as g,n as a,i as l,x as v,t as b}from"../../vendor/vendor.js";(function
|
|
|
34
37
|
margin: 0;
|
|
35
38
|
color: var(--md-sys-color-on-surface);
|
|
36
39
|
}
|
|
37
|
-
`;
|
|
40
|
+
`;a([o({type:String})],s.prototype,"label",2);a([o({type:String,reflect:!0})],s.prototype,"variant",2);a([o({type:String,reflect:!0})],s.prototype,"spacing",2);a([o({type:String,attribute:"spacing-top",reflect:!0})],s.prototype,"spacingTop",2);a([o({type:String,attribute:"spacing-bottom",reflect:!0})],s.prototype,"spacingBottom",2);a([o({type:String,attribute:"spacing-left",reflect:!0})],s.prototype,"spacingLeft",2);a([o({type:String,attribute:"spacing-right",reflect:!0})],s.prototype,"spacingRight",2);s=a([v("scb-vignette")],s);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.357",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -428,5 +428,5 @@
|
|
|
428
428
|
},
|
|
429
429
|
"./mvc/*": "./mvc/*"
|
|
430
430
|
},
|
|
431
|
-
"buildHash": "
|
|
431
|
+
"buildHash": "452B473E26CE869943AD4C1E56AD47C1B1FA9A07335867058F754F3590480E3D"
|
|
432
432
|
}
|
package/scb-card/scb-card.d.ts
CHANGED
|
@@ -29,6 +29,11 @@ export declare class ScbCard extends LitElement {
|
|
|
29
29
|
subtitle: string;
|
|
30
30
|
vignette: string;
|
|
31
31
|
vignetteVariant: 'outline' | 'filled';
|
|
32
|
+
vignettePadding: undefined;
|
|
33
|
+
vignettePaddingTop: undefined;
|
|
34
|
+
vignettePaddingBottom: undefined;
|
|
35
|
+
vignettePaddingLeft: undefined;
|
|
36
|
+
vignettePaddingRight: undefined;
|
|
32
37
|
supportingText: string;
|
|
33
38
|
date?: Date;
|
|
34
39
|
commentsText: string;
|
|
@@ -78,6 +83,7 @@ export declare class ScbCard extends LitElement {
|
|
|
78
83
|
private __navigate;
|
|
79
84
|
private __mediaTemplate;
|
|
80
85
|
private mapSpacingToken;
|
|
86
|
+
private __vignettePaddingStyle;
|
|
81
87
|
private __syncStringAttribute;
|
|
82
88
|
private __syncNumberAttribute;
|
|
83
89
|
private __syncBooleanAttribute;
|