scb-wc-test 0.1.357 → 0.1.359
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mvc/components/scb-card/scb-card.js +35 -29
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +1 -0
- package/mvc/components/scb-vignette/scb-vignette.js +4 -7
- package/mvc/components/scb-viz/scb-viz.js +2 -2
- package/package.json +2 -2
- package/scb-card/scb-card.d.ts +5 -6
- package/scb-card/scb-card.js +71 -69
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +1 -0
- package/scb-vignette/scb-vignette.js +32 -35
- package/scb-viz/scb-viz.js +2 -2
- package/scb-wc-test.bundle.js +125 -121
|
@@ -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 W,n as a,i as I,x as r,E as b,t as M}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,l){try{customElements.get(n)||e(n,o,l)}catch(p){var d=String(p||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var O=Object.defineProperty,V=Object.getOwnPropertyDescriptor,A=t=>{throw TypeError(t)},s=(t,e,n,o)=>{for(var l=o>1?void 0:o?V(e,n):e,d=t.length-1,p;d>=0;d--)(p=t[d])&&(l=(o?p(e,n,l):p(l))||l);return o&&l&&O(e,n,l),l},j=(t,e,n)=>e.has(t)||A("Cannot "+n),K=(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)=>(j(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 I{constructor(){super(...arguments),K(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.vignetteSpacing=void 0,this.vignetteSpacingTop=void 0,this.vignetteSpacingBottom=void 0,this.vignetteSpacingLeft=void 0,this.vignetteSpacingRight=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 l=Number(n[0]),d=Number(n[1]);if(l>0&&d>0)return{w:l,h:d}}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 l=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:n});return this.dispatchEvent(l),!l.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 o=(this.mediaAspect||"").trim();if(!e||!n){const p=this.__calcAspectWH(o||"3/2");e||(e=p.w),n||(n=p.h)}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 l=`aspect-ratio:${o||`${e}/${n}`};`,d=this.mediaPlaceholder?"has-ph":"";return r`
|
|
9
|
+
<div class="media ${d}" style="${l}">
|
|
10
10
|
<slot name="media-sources"></slot>
|
|
11
11
|
<img
|
|
12
12
|
src="${this.mediaHref||""}"
|
|
@@ -21,16 +21,25 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,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}
|
|
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(),o=this.type!=="list"&&this.type!=="container"&&e!=="vertical"&&e!=="horizontal"?"dynamic-direction":"",l=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":"",g=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>`,E=()=>this.__mediaTemplate(),C=this.
|
|
26
|
+
><md-icon>arrow_forward</md-icon>`:r`<span class="title">${this.title}</span>`,E=()=>this.__mediaTemplate(),C=this.vignetteSpacing||b,F=this.vignetteSpacingTop||b,H=this.vignetteSpacingBottom||(this.vignetteSpacing?b:"5"),B=this.vignetteSpacingLeft||b,D=this.vignetteSpacingRight||b,m=()=>this.vignette&&this.vignette.trim()?r`<scb-vignette
|
|
27
|
+
class="content-vignette"
|
|
28
|
+
variant="${this.vignetteVariant}"
|
|
29
|
+
label="${this.vignette}"
|
|
30
|
+
spacing=${C}
|
|
31
|
+
spacing-top=${F}
|
|
32
|
+
spacing-bottom=${H}
|
|
33
|
+
spacing-left=${B}
|
|
34
|
+
spacing-right=${D}
|
|
35
|
+
></scb-vignette>`:b,v=u=>r`
|
|
27
36
|
<div
|
|
28
|
-
class="scb-card ${t} ${
|
|
37
|
+
class="scb-card ${t} ${l} ${o} ${L}"
|
|
29
38
|
@click=${p?this.__handleHrefNavigation:null}
|
|
30
39
|
@keydown=${p?this.__onKeyDown:null}
|
|
31
40
|
style="cursor:${p?"pointer":"default"};"
|
|
32
|
-
role=${p?"link":
|
|
33
|
-
tabindex=${p?"0":
|
|
41
|
+
role=${p?"link":b}
|
|
42
|
+
tabindex=${p?"0":b}
|
|
34
43
|
aria-label=${this.title||this.subtitle||"Kort"}
|
|
35
44
|
>
|
|
36
45
|
${p?r`<md-ripple></md-ripple>`:""}
|
|
@@ -42,10 +51,10 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
42
51
|
<div class="full-content">
|
|
43
52
|
${m()}
|
|
44
53
|
<div class="top-content">
|
|
45
|
-
${this.title?r`<div class="header">${k(!!
|
|
54
|
+
${this.title?r`<div class="header">${k(!!d)}</div>`:""}
|
|
46
55
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
47
56
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
48
|
-
${
|
|
57
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
49
58
|
</div>
|
|
50
59
|
</div>
|
|
51
60
|
`);case"list":return v(r`
|
|
@@ -55,13 +64,13 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
55
64
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
56
65
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
57
66
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
58
|
-
${
|
|
67
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
59
68
|
</div>
|
|
60
69
|
<div class="content list">
|
|
61
70
|
<slot></slot>
|
|
62
71
|
</div>
|
|
63
72
|
</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"))},
|
|
73
|
+
`);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"))},R=this.commentsText?`${this.commentsText}: `:"",N=this.likesText?`${this.likesText}: `:"",_=h=>f=>{f.stopPropagation(),this.__dispatchSocialActionEvent(h,f)},T=this.likesDisabled?b:r`
|
|
65
74
|
<span
|
|
66
75
|
class="likes"
|
|
67
76
|
@mouseenter=${()=>y(!0)}
|
|
@@ -79,16 +88,16 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
79
88
|
@hover=${h=>{h.preventDefault(),h.stopPropagation(),this.__dispatchLikeEvent("like-hover",{hasLiked:this.hasLiked,likes:this.likes??0})}}
|
|
80
89
|
></scb-icon-button>
|
|
81
90
|
`:r`<md-icon>thumb_up</md-icon>`}
|
|
82
|
-
<span class="social-text">${
|
|
91
|
+
<span class="social-text">${N}${this.likes??0}</span>
|
|
83
92
|
</span>
|
|
84
93
|
`;return v(r`
|
|
85
94
|
<div class="full-content">
|
|
86
95
|
${m()}
|
|
87
96
|
<div class="top-content">
|
|
88
|
-
${this.title?r`<div class="header">${k(!!
|
|
97
|
+
${this.title?r`<div class="header">${k(!!d)}</div>`:""}
|
|
89
98
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
90
99
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
91
|
-
${
|
|
100
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
92
101
|
</div>
|
|
93
102
|
<div class="content">
|
|
94
103
|
<div class="social-metrics">
|
|
@@ -103,7 +112,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
103
112
|
>${this.authorText}</a
|
|
104
113
|
>
|
|
105
114
|
`:""}
|
|
106
|
-
${this.commentsDisabled?
|
|
115
|
+
${this.commentsDisabled?b:r`
|
|
107
116
|
<span
|
|
108
117
|
class="comments"
|
|
109
118
|
@mouseenter=${()=>y(!0)}
|
|
@@ -121,7 +130,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
121
130
|
`:r`
|
|
122
131
|
<md-icon>comment</md-icon>
|
|
123
132
|
`}
|
|
124
|
-
<span class="social-text">${
|
|
133
|
+
<span class="social-text">${R}${this.comments??0}</span>
|
|
125
134
|
</span>
|
|
126
135
|
`}
|
|
127
136
|
${this.likesHoverContent?r`
|
|
@@ -145,7 +154,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
145
154
|
></scb-icon-button>
|
|
146
155
|
<span class="social-text">Svara</span>
|
|
147
156
|
</span>
|
|
148
|
-
`:
|
|
157
|
+
`:b}
|
|
149
158
|
${this.editEnabled?r`
|
|
150
159
|
<span class="social-action">
|
|
151
160
|
<scb-icon-button
|
|
@@ -156,7 +165,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
156
165
|
></scb-icon-button>
|
|
157
166
|
<span class="social-text">Redigera</span>
|
|
158
167
|
</span>
|
|
159
|
-
`:
|
|
168
|
+
`:b}
|
|
160
169
|
${this.deleteEnabled?r`
|
|
161
170
|
<span class="social-action">
|
|
162
171
|
<scb-icon-button
|
|
@@ -167,7 +176,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
167
176
|
></scb-icon-button>
|
|
168
177
|
<span class="social-text">Ta bort</span>
|
|
169
178
|
</span>
|
|
170
|
-
`:
|
|
179
|
+
`:b}
|
|
171
180
|
</div>
|
|
172
181
|
</div>
|
|
173
182
|
</div>
|
|
@@ -178,7 +187,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
178
187
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
179
188
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
180
189
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
181
|
-
${
|
|
190
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
182
191
|
</div>
|
|
183
192
|
<div class="content links">
|
|
184
193
|
<slot></slot>
|
|
@@ -191,7 +200,7 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
191
200
|
${this.title?r`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
192
201
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
193
202
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
194
|
-
${
|
|
203
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
195
204
|
</div>
|
|
196
205
|
<div class="content actions">
|
|
197
206
|
<slot></slot>
|
|
@@ -212,13 +221,13 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
212
221
|
<div class="full-content">
|
|
213
222
|
${m()}
|
|
214
223
|
<div class="top-content">
|
|
215
|
-
${this.title?r`<div class="header">${k(!!
|
|
224
|
+
${this.title?r`<div class="header">${k(!!d)}</div>`:""}
|
|
216
225
|
${this.subtitle?r`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
217
226
|
${this.supportingText?r`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
218
|
-
${
|
|
227
|
+
${g?r`<div class="date">${g}</div>`:""}
|
|
219
228
|
</div>
|
|
220
229
|
</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
|
|
230
|
+
`)}}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,S).call(this),(t.has("innerPadding")||t.has("paddingTop")||t.has("paddingBottom")||t.has("paddingLeft")||t.has("paddingRight"))&&z(this,x,$).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,S).call(this),z(this,x,$).call(this),this.__syncSocialAttributes()}};x=new WeakSet;S=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,n=this.mapSpacingToken(this.spacingBottom)??t,o=this.mapSpacingToken(this.spacingLeft),l=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"),l?this.style.setProperty("--scb-card-spacing-inline-end",l):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,o=this.mapSpacingToken(this.paddingLeft)??t,l=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"),l?this.style.setProperty("--scb-card-content-padding-inline-end",l):this.style.removeProperty("--scb-card-content-padding-inline-end")};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=W`
|
|
222
231
|
:host {
|
|
223
232
|
display: block;
|
|
224
233
|
container-type: inline-size;
|
|
@@ -489,9 +498,6 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
489
498
|
overflow: hidden;
|
|
490
499
|
border-radius: var(--md-sys-shape-corner-large, 16px);
|
|
491
500
|
}
|
|
492
|
-
.content-vignette {
|
|
493
|
-
margin-block-end: var(--spacing-5, 12px);
|
|
494
|
-
}
|
|
495
501
|
.media img {
|
|
496
502
|
display: block;
|
|
497
503
|
inline-size: 100%;
|
|
@@ -752,4 +758,4 @@ import{_ as P}from"../../vendor/preload-helper.js";import{a as D,n as a,i as B,x
|
|
|
752
758
|
.scb-card.filled-alternative .content.list ::slotted(scb-list) {
|
|
753
759
|
--scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
|
|
754
760
|
}
|
|
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-
|
|
761
|
+
`;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-spacing",reflect:!0,converter:c})],i.prototype,"vignetteSpacing",2);s([a({type:String,attribute:"vignette-spacing-top",reflect:!0,converter:c})],i.prototype,"vignetteSpacingTop",2);s([a({type:String,attribute:"vignette-spacing-bottom",reflect:!0,converter:c})],i.prototype,"vignetteSpacingBottom",2);s([a({type:String,attribute:"vignette-spacing-left",reflect:!0,converter:c})],i.prototype,"vignetteSpacingLeft",2);s([a({type:String,attribute:"vignette-spacing-right",reflect:!0,converter:c})],i.prototype,"vignetteSpacingRight",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([M("scb-card")],i);
|
|
@@ -111,6 +111,7 @@ import{a as v,n as a,r as b,i as S,x as h,t as m}from"../../vendor/vendor.js";im
|
|
|
111
111
|
}
|
|
112
112
|
slot {
|
|
113
113
|
display: block;
|
|
114
|
+
box-sizing: border-box;
|
|
114
115
|
padding-block: var(--spacing-3);
|
|
115
116
|
padding-inline: 2px;
|
|
116
117
|
min-width: var(--scb-horizontal-scroller-width, auto);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as g,n as
|
|
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
|
-
`}};
|
|
5
|
+
`}};n.styles=g`
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
8
|
margin-block-start: var(--scb-vignette-spacing-block-start, 0);
|
|
@@ -13,10 +13,7 @@ import{a as g,n as o,i as l,x as d,t as v}from"../../vendor/vendor.js";(function
|
|
|
13
13
|
|
|
14
14
|
.vignette {
|
|
15
15
|
--scb-vignette-color: var(--md-sys-color-on-surface, #0F0865);
|
|
16
|
-
padding
|
|
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);
|
|
16
|
+
padding: 3px 11px;
|
|
20
17
|
border-radius: 8px;
|
|
21
18
|
border: 1px solid var(--md-sys-color-outline);
|
|
22
19
|
width: fit-content;
|
|
@@ -37,4 +34,4 @@ import{a as g,n as o,i as l,x as d,t as v}from"../../vendor/vendor.js";(function
|
|
|
37
34
|
margin: 0;
|
|
38
35
|
color: var(--md-sys-color-on-surface);
|
|
39
36
|
}
|
|
40
|
-
`;
|
|
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);
|
|
@@ -342,7 +342,7 @@ import{a as at,n as b,r as V,i as nt,x as p,k as q,l as rt,t as ot}from"../../ve
|
|
|
342
342
|
aria-describedby=${this._getContentAriaDescribedBy()}
|
|
343
343
|
>
|
|
344
344
|
<scb-horizontal-scroller
|
|
345
|
-
width="
|
|
345
|
+
width="100%"
|
|
346
346
|
class="table-scroller"
|
|
347
347
|
variant="inline"
|
|
348
348
|
show-scrollbar
|
|
@@ -417,7 +417,7 @@ import{a as at,n as b,r as V,i as nt,x as p,k as q,l as rt,t as ot}from"../../ve
|
|
|
417
417
|
>
|
|
418
418
|
<div class="table-panel-scroll">
|
|
419
419
|
<scb-horizontal-scroller
|
|
420
|
-
width="
|
|
420
|
+
width="100%"
|
|
421
421
|
class="standard-table-scroller"
|
|
422
422
|
variant="inline"
|
|
423
423
|
show-scrollbar
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.359",
|
|
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": "96F93B0D9373EA0669E396FFFD217B626F712D15C37D327ADA746F1389C11B38"
|
|
432
432
|
}
|
package/scb-card/scb-card.d.ts
CHANGED
|
@@ -29,11 +29,11 @@ export declare class ScbCard extends LitElement {
|
|
|
29
29
|
subtitle: string;
|
|
30
30
|
vignette: string;
|
|
31
31
|
vignetteVariant: 'outline' | 'filled';
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
vignetteSpacing: undefined;
|
|
33
|
+
vignetteSpacingTop: undefined;
|
|
34
|
+
vignetteSpacingBottom: undefined;
|
|
35
|
+
vignetteSpacingLeft: undefined;
|
|
36
|
+
vignetteSpacingRight: undefined;
|
|
37
37
|
supportingText: string;
|
|
38
38
|
date?: Date;
|
|
39
39
|
commentsText: string;
|
|
@@ -83,7 +83,6 @@ export declare class ScbCard extends LitElement {
|
|
|
83
83
|
private __navigate;
|
|
84
84
|
private __mediaTemplate;
|
|
85
85
|
private mapSpacingToken;
|
|
86
|
-
private __vignettePaddingStyle;
|
|
87
86
|
private __syncStringAttribute;
|
|
88
87
|
private __syncNumberAttribute;
|
|
89
88
|
private __syncBooleanAttribute;
|