scb-wc 0.1.26 → 0.1.28
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/README.md +2 -1
- package/all.js +5 -0
- package/bin/scb-wc.mjs +51 -117
- package/index.js +5 -0
- package/mvc/components/all.js +5 -0
- package/mvc/components/scb-card/scb-action-card.js +1 -0
- package/mvc/components/scb-card/scb-card.js +70 -70
- package/mvc/components/scb-card/scb-container-card.js +1 -0
- package/mvc/components/scb-card/scb-link-card.js +1 -0
- package/mvc/components/scb-card/scb-list-card.js +1 -0
- package/mvc/components/scb-card/scb-social-card.js +1 -0
- package/mvc/components/scb-collapse/scb-collapse.js +6 -3
- package/package.json +22 -2
- package/scb-card/scb-action-card.js +1 -0
- package/scb-card/scb-card.js +54 -41
- package/scb-card/scb-container-card.js +1 -0
- package/scb-card/scb-link-card.js +1 -0
- package/scb-card/scb-list-card.js +1 -0
- package/scb-card/scb-social-card.js +1 -0
- package/scb-collapse/scb-collapse.js +6 -3
- package/scb-components/index.d.ts +5 -0
- package/scb-components/scb-card/scb-action-card.d.ts +1 -0
- package/scb-components/scb-card/scb-card.d.ts +2 -0
- package/scb-components/scb-card/scb-container-card.d.ts +1 -0
- package/scb-components/scb-card/scb-link-card.d.ts +1 -0
- package/scb-components/scb-card/scb-list-card.d.ts +1 -0
- package/scb-components/scb-card/scb-social-card.d.ts +1 -0
- package/scb-wc.bundle.js +48 -45
- package/scb-wc.d.ts +10 -0
- package/starters/blazor/Components/Pages/Home.razor +3 -3
- package/starters/blazor/README.md +1 -1
- package/starters/blazor/ScbStarterApp.csproj +1 -1
- package/starters/blazor-service/Components/App.razor +23 -0
- package/starters/blazor-service/Components/Layout/MainLayout.razor +13 -0
- package/starters/blazor-service/Components/Pages/Home.razor +55 -0
- package/starters/blazor-service/Components/Routes.razor +14 -0
- package/starters/blazor-service/Components/_Imports.razor +11 -0
- package/starters/blazor-service/Program.cs +23 -0
- package/starters/blazor-service/README.md +29 -0
- package/starters/blazor-service/ScbStarterApp.csproj +8 -0
- package/starters/blazor-service/dot-gitignore +3 -0
- package/starters/blazor-service/package.json +14 -0
- package/starters/blazor-service/wwwroot/app.css +54 -0
- package/starters/html/main.js +3 -3
- package/starters/html-service/README.md +24 -0
- package/starters/html-service/dot-gitignore +2 -0
- package/starters/html-service/index.html +12 -0
- package/starters/html-service/main.js +78 -0
- package/starters/html-service/package.json +16 -0
- package/starters/react/README.md +1 -2
- package/starters/react/src/App.jsx +4 -4
- package/starters/react-service/README.md +24 -0
- package/starters/react-service/dot-gitignore +2 -0
- package/starters/react-service/index.html +12 -0
- package/starters/react-service/package.json +19 -0
- package/starters/react-service/src/App.jsx +67 -0
- package/starters/react-service/src/main.jsx +22 -0
- package/starters/react-service/vite.config.js +6 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js","../../vendor/vendor-lit.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import"../../vendor/vendor-material.js";import{_ as
|
|
2
|
+
import"../../vendor/vendor-material.js";import{_ as ct,b as ot,g as $,h as a,v as o,y as n}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as s}from"../../vendor/decorate.js";import{n as dt,t as v}from"../../vendor/assertClassBrand.js";import"../scb-button/scb-button.js";import{t as N}from"../../vendor/preload-helper.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-list/scb-list.js";import"../scb-avatar/scb-avatar.js";import"../scb-link/scb-link.js";import"../scb-chip/scb-chip.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var d=typeof globalThis<"u"?globalThis:window;if(!d.__scb_ce_guard_installed__){d.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,r,l){try{customElements.get(e)||t(e,r,l)}catch(b){var h=String(b||"");if(h.indexOf("already been used")===-1&&h.indexOf("NotSupportedError")===-1)throw b}}}}catch{}})();var m,_,S,lt=["standard","list","social","link","action","container"],c={fromAttribute:d=>d??"",toAttribute:d=>typeof d!="string"||d.trim()===""?null:d},i=(m=new WeakSet,_=class extends ct{constructor(...t){super(...t),dt(this,m),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.cardTitle="",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.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=e=>{const r=e.currentTarget.closest(".media");r&&r.classList.add("is-loaded")},this.__onKeyDown=e=>{const r=this.__effectiveHref();(e.key==="Enter"||e.key===" ")&&r&&(e.preventDefault(),this.__navigate(r,e))},this.__handleHrefNavigation=e=>{const r=this.__effectiveHref();r&&(e.target.closest("a")||this.__navigate(r,e))}}attributeChangedCallback(t,e,r){this.__isSyncingManagedSocialAttributes&&this.__managedSocialAttributes.has(t)||super.attributeChangedCallback(t,e,r)}get likeButton(){return this.cardType!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(t){const e=(t||"").trim();if(!e)return{w:600,h:400};const r=e.includes("/")?e.split("/"):e.includes(":")?e.split(":"):e.includes("x")?e.split("x"):null;if(r&&r.length===2){const h=Number(r[0]),b=Number(r[1]);if(h>0&&b>0)return{w:h,h:b}}const l=Number(e);return isFinite(l)&&l>0?{w:1e3,h:Math.round(1e3/l)}:{w:600,h:400}}__noWrapText(t){return(t??"").replace(/ /g," ").replace(/-/g,"‑")}__decodeHtmlEntities(t){const e=document.createElement("textarea");return e.innerHTML=t,e.value}__normalizePlainText(t){let e=String(t??"");for(let r=0;r<5;r+=1){const l=this.__decodeHtmlEntities(e);if(l===e)break;e=l}return e.replace(/<\s*(br|\/p|\/div|\/li|\/h[1-6]|\/tr)\b[^>]*>/gi," ").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()}get cardType(){const t=(this.type||"standard").toLowerCase();return lt.includes(t)?t:"standard"}__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 r={href:t,originalEvent:e},l=new CustomEvent("card-navigate",{bubbles:!0,composed:!0,cancelable:!0,detail:r});if(this.dispatchEvent(l),l.defaultPrevented)return!1;const h=new CustomEvent("cardnavigate",{bubbles:!0,composed:!0,cancelable:!0,detail:r});return this.dispatchEvent(h),!h.defaultPrevented}__effectiveHref(){return this.cardHref||this.href}__navigate(t,e){t&&this.__dispatchCardNavigate(t,e)&&window.open(t,"_self")}__hasSlottedContent(t){return Array.from(this.children).some(e=>e.getAttribute("slot")===t)}__mediaTemplate(){if(this.__hasSlottedContent("media"))return n`
|
|
3
3
|
<div class="media">
|
|
4
4
|
<slot name="media"></slot>
|
|
5
5
|
</div>
|
|
6
|
-
`;if((this.mediaType||"").toLowerCase()==="avatar")return
|
|
6
|
+
`;if((this.mediaType||"").toLowerCase()==="avatar")return n`
|
|
7
7
|
<div class="media">
|
|
8
8
|
<slot name="media">
|
|
9
|
-
<scb-avatar variant="icon" label="${T.call(v(
|
|
9
|
+
<scb-avatar variant="icon" label="${T.call(v(m,this))}" icon-name="person"></scb-avatar>
|
|
10
10
|
</slot>
|
|
11
11
|
</div>
|
|
12
|
-
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,
|
|
12
|
+
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,e=Number(this.mediaHeight)||0;const r=(this.mediaAspect||"").trim();if(!t||!e){const h=this.__calcAspectWH(r||"3/2");t||(t=h.w),e||(e=h.h)}const l=`aspect-ratio:${r||`${t}/${e}`};`;return n`
|
|
13
13
|
<div class="media ${this.mediaPlaceholder?"has-ph":""}" style="${l}">
|
|
14
14
|
<slot name="media-sources"></slot>
|
|
15
15
|
<img
|
|
@@ -21,74 +21,74 @@ import"../../vendor/vendor-material.js";import{_ as nt,b as ct,g as $,h as a,v a
|
|
|
21
21
|
decoding="${this.mediaDecoding}"
|
|
22
22
|
fetchpriority="${this.mediaFetchPriority}"
|
|
23
23
|
width="${t}"
|
|
24
|
-
height="${
|
|
24
|
+
height="${e}"
|
|
25
25
|
@load=${this.__onImgLoad}
|
|
26
26
|
/>
|
|
27
27
|
</div>
|
|
28
|
-
`}return null}mapSpacingToken(t){if(!t)return;const
|
|
28
|
+
`}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.cardType==="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.cardType,e=this.variant?`${this.variant.toLowerCase()}`:"",r=(this.direction||"dynamic").toLowerCase(),l=t!=="list"&&t!=="container"&&r!=="vertical"&&r!=="horizontal"?"dynamic-direction":"",h=t==="list"||t==="container"?"vertical":r==="horizontal"?"horizontal":"vertical",b=this.__effectiveHref(),f=(t==="standard"||t==="social")&&!!b,q=f?"clickable":"",P=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",E=t==="social"?this.__normalizePlainText(this.supportingText):this.supportingText,C=!!T.call(v(m,this))||this.__hasSlottedContent("heading"),L=!!this.subtitle||this.__hasSlottedContent("subtitle"),G=!!E||this.__hasSlottedContent("supporting-text"),X=!!P||this.__hasSlottedContent("date"),U=this.__hasSlottedContent("footer"),H=(g=!1)=>C?n`
|
|
29
29
|
<div class="header">
|
|
30
30
|
<slot name="heading">
|
|
31
|
-
${
|
|
31
|
+
${g?n`<a class="title" href="${b}" tabindex="-1">${T.call(v(m,this))}</a>`:n`<span class="title">${T.call(v(m,this))}</span>`}
|
|
32
32
|
</slot>
|
|
33
|
-
${
|
|
33
|
+
${g?n`<md-icon>arrow_forward</md-icon>`:o}
|
|
34
34
|
</div>
|
|
35
|
-
`:o,F=()=>
|
|
35
|
+
`:o,F=()=>L?n`<div class="sub-label"><slot name="subtitle">${this.subtitle}</slot></div>`:o,J=()=>G?n`<div class="supporting-text"><slot name="supporting-text">${E}</slot></div>`:o,Q=()=>X?n`<div class="date"><slot name="date">${P}</slot></div>`:o,Y=()=>this.__mediaTemplate(),Z=this.vignetteSpacing||o,tt=this.vignetteSpacingTop||o,et=this.vignetteSpacingBottom||(this.vignetteSpacing?o:"5"),it=this.vignetteSpacingLeft||o,st=this.vignetteSpacingRight||o,B=!!this.vignette?.trim(),at=B?n`<scb-chip
|
|
36
36
|
class="content-vignette"
|
|
37
37
|
variant="static"
|
|
38
38
|
static-variant="${this.vignetteVariant==="outline"||this.vignetteVariant==="outlined"?"outlined":"filled"}"
|
|
39
39
|
label="${this.vignette}"
|
|
40
|
-
spacing=${
|
|
41
|
-
spacing-top=${
|
|
42
|
-
spacing-bottom=${
|
|
43
|
-
spacing-left=${
|
|
44
|
-
spacing-right=${
|
|
45
|
-
></scb-chip>`:o,
|
|
46
|
-
${
|
|
40
|
+
spacing=${Z}
|
|
41
|
+
spacing-top=${tt}
|
|
42
|
+
spacing-bottom=${et}
|
|
43
|
+
spacing-left=${it}
|
|
44
|
+
spacing-right=${st}
|
|
45
|
+
></scb-chip>`:o,D=()=>this.__hasSlottedContent("scb-chip")?n`<div class="chip-slot"><slot name="scb-chip"></slot></div>`:B?n`<div class="chip-slot">${at}</div>`:o,z=(g=!1,w=!0,u=!0)=>n`
|
|
46
|
+
${D()}
|
|
47
47
|
<div class="top-content">
|
|
48
|
-
${
|
|
48
|
+
${H(g)}
|
|
49
49
|
${F()}
|
|
50
|
-
${w?
|
|
51
|
-
${u?
|
|
50
|
+
${w?J():o}
|
|
51
|
+
${u?Q():o}
|
|
52
52
|
</div>
|
|
53
|
-
`,
|
|
53
|
+
`,y=()=>U?n`
|
|
54
54
|
<div class="content footer">
|
|
55
55
|
<slot name="footer"></slot>
|
|
56
56
|
</div>
|
|
57
|
-
`:o,x=
|
|
57
|
+
`:o,x=g=>n`
|
|
58
58
|
<div
|
|
59
|
-
class="scb-card ${
|
|
60
|
-
@click=${
|
|
61
|
-
@keydown=${
|
|
62
|
-
style="cursor:${
|
|
63
|
-
role=${
|
|
64
|
-
tabindex=${
|
|
65
|
-
aria-label=${T.call(v(
|
|
59
|
+
class="scb-card ${e} ${h} ${l} ${q}"
|
|
60
|
+
@click=${f?this.__handleHrefNavigation:null}
|
|
61
|
+
@keydown=${f?this.__onKeyDown:null}
|
|
62
|
+
style="cursor:${f?"pointer":"default"};"
|
|
63
|
+
role=${f?"link":o}
|
|
64
|
+
tabindex=${f?"0":o}
|
|
65
|
+
aria-label=${T.call(v(m,this))||this.subtitle||"Kort"}
|
|
66
66
|
>
|
|
67
|
-
${
|
|
68
|
-
${
|
|
69
|
-
${
|
|
67
|
+
${f?n`<md-ripple></md-ripple>`:""}
|
|
68
|
+
${Y()}
|
|
69
|
+
${g}
|
|
70
70
|
</div>
|
|
71
71
|
<md-focus-ring></md-focus-ring>
|
|
72
|
-
`;switch(t){case"standard":return x(
|
|
72
|
+
`;switch(t){case"standard":return x(n`
|
|
73
73
|
<div class="full-content">
|
|
74
74
|
${z(!!b)}
|
|
75
|
-
${
|
|
75
|
+
${y()}
|
|
76
76
|
</div>
|
|
77
|
-
`);case"list":return x(
|
|
77
|
+
`);case"list":return x(n`
|
|
78
78
|
<div class="full-content">
|
|
79
79
|
${z(!1)}
|
|
80
80
|
<div class="content list">
|
|
81
81
|
<slot name="list"></slot><slot></slot>
|
|
82
82
|
</div>
|
|
83
|
-
${
|
|
83
|
+
${y()}
|
|
84
84
|
</div>
|
|
85
|
-
`);case"social":const
|
|
85
|
+
`);case"social":const g=this.commentsHref,w=p=>{p.stopPropagation()},u=p=>{const k=this.renderRoot?.querySelector(".scb-card");k&&(p?k.classList.add("no-hover"):k.classList.remove("no-hover"))},rt=this.commentsText?`${this.commentsText}: `:"",nt=this.likesText?`${this.likesText}: `:"",A=p=>k=>{k.stopPropagation(),this.__dispatchSocialActionEvent(p,k)},R=this.likesDisabled?o:n`
|
|
86
86
|
<span
|
|
87
87
|
class="likes"
|
|
88
88
|
@mouseenter=${()=>u(!0)}
|
|
89
89
|
@mouseleave=${()=>u(!1)}
|
|
90
90
|
>
|
|
91
|
-
${this.likesInteractive?
|
|
91
|
+
${this.likesInteractive?n`
|
|
92
92
|
<scb-icon-button
|
|
93
93
|
id="like-button"
|
|
94
94
|
variant="standard"
|
|
@@ -99,15 +99,15 @@ import"../../vendor/vendor-material.js";import{_ as nt,b as ct,g as $,h as a,v a
|
|
|
99
99
|
@keydown=${p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),p.stopPropagation(),this.hasLiked=!this.hasLiked,this.__dispatchLikeEvent("like-click",{hasLiked:this.hasLiked,likes:this.likes??0}))}}
|
|
100
100
|
@hover=${p=>{p.preventDefault(),p.stopPropagation(),this.__dispatchLikeEvent("like-hover",{hasLiked:this.hasLiked,likes:this.likes??0})}}
|
|
101
101
|
></scb-icon-button>
|
|
102
|
-
`:
|
|
103
|
-
<span class="social-text">${
|
|
102
|
+
`:n`<md-icon>thumb_up</md-icon>`}
|
|
103
|
+
<span class="social-text">${nt}${this.likes??0}</span>
|
|
104
104
|
</span>
|
|
105
|
-
`;return x(
|
|
105
|
+
`;return x(n`
|
|
106
106
|
<div class="full-content">
|
|
107
107
|
${z(!!b)}
|
|
108
108
|
<div class="content">
|
|
109
109
|
<div class="social-metrics">
|
|
110
|
-
${this.author?
|
|
110
|
+
${this.author?n`
|
|
111
111
|
<a
|
|
112
112
|
class="author social-text"
|
|
113
113
|
href="${this.authorHref||"#"}"
|
|
@@ -118,28 +118,28 @@ import"../../vendor/vendor-material.js";import{_ as nt,b as ct,g as $,h as a,v a
|
|
|
118
118
|
>${this.authorText}</a
|
|
119
119
|
>
|
|
120
120
|
`:""}
|
|
121
|
-
${this.commentsDisabled?o:
|
|
121
|
+
${this.commentsDisabled?o:n`
|
|
122
122
|
<span
|
|
123
123
|
class="comments"
|
|
124
124
|
@mouseenter=${()=>u(!0)}
|
|
125
125
|
@mouseleave=${()=>u(!1)}
|
|
126
126
|
>
|
|
127
|
-
${
|
|
127
|
+
${g!==""?n`
|
|
128
128
|
<scb-icon-button
|
|
129
|
-
href="${
|
|
129
|
+
href="${g}"
|
|
130
130
|
tabindex="0"
|
|
131
131
|
@click=${w}
|
|
132
132
|
variant="standard"
|
|
133
133
|
icon="comment"
|
|
134
134
|
aria-label="Gå till kommentarer"
|
|
135
135
|
></scb-icon-button>
|
|
136
|
-
`:
|
|
136
|
+
`:n`
|
|
137
137
|
<md-icon>comment</md-icon>
|
|
138
138
|
`}
|
|
139
|
-
<span class="social-text">${
|
|
139
|
+
<span class="social-text">${rt}${this.comments??0}</span>
|
|
140
140
|
</span>
|
|
141
141
|
`}
|
|
142
|
-
${this.likesHoverContent?
|
|
142
|
+
${this.likesHoverContent?n`
|
|
143
143
|
<scb-tooltip
|
|
144
144
|
variant="rich"
|
|
145
145
|
for="like-button"
|
|
@@ -147,80 +147,80 @@ import"../../vendor/vendor-material.js";import{_ as nt,b as ct,g as $,h as a,v a
|
|
|
147
147
|
trigger="hover"
|
|
148
148
|
position="right"
|
|
149
149
|
>
|
|
150
|
-
${
|
|
150
|
+
${R}
|
|
151
151
|
</scb-tooltip>
|
|
152
|
-
`:
|
|
153
|
-
${this.replyEnabled?
|
|
152
|
+
`:R}
|
|
153
|
+
${this.replyEnabled?n`
|
|
154
154
|
<span class="social-action">
|
|
155
155
|
<scb-icon-button
|
|
156
156
|
variant="standard"
|
|
157
157
|
icon="reply"
|
|
158
158
|
aria-label="Svara"
|
|
159
|
-
@click=${
|
|
159
|
+
@click=${A("reply")}
|
|
160
160
|
></scb-icon-button>
|
|
161
161
|
<span class="social-text">Svara</span>
|
|
162
162
|
</span>
|
|
163
163
|
`:o}
|
|
164
|
-
${this.editEnabled?
|
|
164
|
+
${this.editEnabled?n`
|
|
165
165
|
<span class="social-action">
|
|
166
166
|
<scb-icon-button
|
|
167
167
|
variant="standard"
|
|
168
168
|
icon="edit"
|
|
169
169
|
aria-label="Redigera"
|
|
170
|
-
@click=${
|
|
170
|
+
@click=${A("edit")}
|
|
171
171
|
></scb-icon-button>
|
|
172
172
|
<span class="social-text">Redigera</span>
|
|
173
173
|
</span>
|
|
174
174
|
`:o}
|
|
175
|
-
${this.deleteEnabled?
|
|
175
|
+
${this.deleteEnabled?n`
|
|
176
176
|
<span class="social-action">
|
|
177
177
|
<scb-icon-button
|
|
178
178
|
variant="standard"
|
|
179
179
|
icon="delete"
|
|
180
180
|
aria-label="Ta bort"
|
|
181
|
-
@click=${
|
|
181
|
+
@click=${A("delete")}
|
|
182
182
|
></scb-icon-button>
|
|
183
183
|
<span class="social-text">Ta bort</span>
|
|
184
184
|
</span>
|
|
185
185
|
`:o}
|
|
186
186
|
</div>
|
|
187
187
|
</div>
|
|
188
|
-
${
|
|
188
|
+
${y()}
|
|
189
189
|
</div>
|
|
190
|
-
`);case"link":return x(
|
|
190
|
+
`);case"link":return x(n`
|
|
191
191
|
<div class="full-content">
|
|
192
192
|
${z(!1)}
|
|
193
193
|
<div class="content links">
|
|
194
194
|
<slot name="links"></slot><slot></slot>
|
|
195
195
|
</div>
|
|
196
|
-
${
|
|
196
|
+
${y()}
|
|
197
197
|
</div>
|
|
198
|
-
`);case"action":return x(
|
|
198
|
+
`);case"action":return x(n`
|
|
199
199
|
<div class="full-content">
|
|
200
200
|
${z(!1)}
|
|
201
201
|
<div class="content actions">
|
|
202
202
|
<slot name="actions"></slot><slot></slot>
|
|
203
203
|
</div>
|
|
204
|
-
${
|
|
204
|
+
${y()}
|
|
205
205
|
</div>
|
|
206
|
-
`);case"container":return x(
|
|
207
|
-
<div class="container-content ${C||
|
|
208
|
-
${
|
|
209
|
-
${C||
|
|
206
|
+
`);case"container":return x(n`
|
|
207
|
+
<div class="container-content ${C||L?"has-header":""}">
|
|
208
|
+
${D()}
|
|
209
|
+
${C||L?n`
|
|
210
210
|
<div class="top-content">
|
|
211
|
-
${
|
|
211
|
+
${H(!1)}
|
|
212
212
|
${F()}
|
|
213
213
|
</div>
|
|
214
214
|
`:o}
|
|
215
215
|
<slot></slot>
|
|
216
|
-
${
|
|
216
|
+
${y()}
|
|
217
217
|
</div>
|
|
218
|
-
`);default:return x(
|
|
218
|
+
`);default:return x(n`
|
|
219
219
|
<div class="full-content">
|
|
220
220
|
${z(!!b)}
|
|
221
|
-
${
|
|
221
|
+
${y()}
|
|
222
222
|
</div>
|
|
223
|
-
`)}}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.cardType==="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"))&&v(
|
|
223
|
+
`)}}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.cardType==="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"))&&v(m,this,I).call(this),(t.has("innerPadding")||t.has("paddingTop")||t.has("paddingBottom")||t.has("paddingLeft")||t.has("paddingRight"))&&v(m,this,M).call(this)}async firstUpdated(t){S.__iconLoaded||(await N(()=>import("../../vendor/vendor-material.js").then(e=>e.p),__vite__mapDeps([0,1,2]),import.meta.url),S.__iconLoaded=!0),S.__rippleLoaded||(await N(()=>import("../../vendor/vendor-material.js").then(e=>e.f),__vite__mapDeps([0,1,2]),import.meta.url),S.__rippleLoaded=!0),v(m,this,I).call(this),v(m,this,M).call(this),this.__syncSocialAttributes()}},S=_,_.__iconLoaded=!1,_.__rippleLoaded=!1,_.styles=ot`
|
|
224
224
|
:host {
|
|
225
225
|
display: block;
|
|
226
226
|
container-type: inline-size;
|
|
@@ -824,4 +824,4 @@ import"../../vendor/vendor-material.js";import{_ as nt,b as ct,g as $,h as a,v a
|
|
|
824
824
|
.scb-card.filled-alternative .content.list ::slotted(scb-list) {
|
|
825
825
|
--scb-list-bg: var(--md-sys-color-surface-container, #EEF3FF);
|
|
826
826
|
}
|
|
827
|
-
`,_);function T(){return this.cardTitle||this.title}function
|
|
827
|
+
`,_);function T(){return this.cardTitle||this.title}function I(){const d=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??d,e=this.mapSpacingToken(this.spacingBottom)??d,r=this.mapSpacingToken(this.spacingLeft),l=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-card-spacing-block-start",t):this.style.removeProperty("--scb-card-spacing-block-start"),e?this.style.setProperty("--scb-card-spacing-block-end",e):this.style.removeProperty("--scb-card-spacing-block-end"),r?this.style.setProperty("--scb-card-spacing-inline-start",r):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 M(){const d=this.mapSpacingToken(this.innerPadding),t=this.mapSpacingToken(this.paddingTop)??d,e=this.mapSpacingToken(this.paddingBottom)??d,r=this.mapSpacingToken(this.paddingLeft)??d,l=this.mapSpacingToken(this.paddingRight)??d;t?this.style.setProperty("--scb-card-content-padding-block-start",t):this.style.removeProperty("--scb-card-content-padding-block-start"),e?this.style.setProperty("--scb-card-content-padding-block-end",e):this.style.removeProperty("--scb-card-content-padding-block-end"),r?this.style.setProperty("--scb-card-content-padding-inline-start",r):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")}s([a({type:String,reflect:!0,converter:c})],i.prototype,"type",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"variant",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"direction",void 0);s([a({type:String,reflect:!0})],i.prototype,"size",void 0);s([a({type:String,attribute:"media-type"})],i.prototype,"mediaType",void 0);s([a({type:String,attribute:"media-href"})],i.prototype,"mediaHref",void 0);s([a({type:String,attribute:"media-alt"})],i.prototype,"mediaAlt",void 0);s([a({type:String,attribute:"media-srcset"})],i.prototype,"mediaSrcset",void 0);s([a({type:String,attribute:"media-sizes"})],i.prototype,"mediaSizes",void 0);s([a({type:String,attribute:"media-loading"})],i.prototype,"mediaLoading",void 0);s([a({type:String,attribute:"media-decoding"})],i.prototype,"mediaDecoding",void 0);s([a({type:String,attribute:"media-fetchpriority"})],i.prototype,"mediaFetchPriority",void 0);s([a({type:String,attribute:"media-fit"})],i.prototype,"mediaFit",void 0);s([a({type:String,attribute:"media-position"})],i.prototype,"mediaPosition",void 0);s([a({type:String,attribute:"media-width"})],i.prototype,"mediaWidth",void 0);s([a({type:String,attribute:"media-height"})],i.prototype,"mediaHeight",void 0);s([a({type:String,attribute:"media-aspect"})],i.prototype,"mediaAspect",void 0);s([a({type:Boolean,attribute:"media-placeholder"})],i.prototype,"mediaPlaceholder",void 0);s([a({type:String,attribute:"card-href",reflect:!0,converter:c})],i.prototype,"cardHref",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"href",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"title",void 0);s([a({type:String,attribute:"card-title",reflect:!0,converter:c})],i.prototype,"cardTitle",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"subtitle",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"vignette",void 0);s([a({type:String,attribute:"vignette-variant",reflect:!0,converter:c})],i.prototype,"vignetteVariant",void 0);s([a({type:String,attribute:"vignette-spacing",reflect:!0,converter:c})],i.prototype,"vignetteSpacing",void 0);s([a({type:String,attribute:"vignette-spacing-top",reflect:!0,converter:c})],i.prototype,"vignetteSpacingTop",void 0);s([a({type:String,attribute:"vignette-spacing-bottom",reflect:!0,converter:c})],i.prototype,"vignetteSpacingBottom",void 0);s([a({type:String,attribute:"vignette-spacing-left",reflect:!0,converter:c})],i.prototype,"vignetteSpacingLeft",void 0);s([a({type:String,attribute:"vignette-spacing-right",reflect:!0,converter:c})],i.prototype,"vignetteSpacingRight",void 0);s([a({type:String,attribute:"supporting-text",reflect:!0,converter:c})],i.prototype,"supportingText",void 0);s([a({type:Date,reflect:!0})],i.prototype,"date",void 0);s([a({type:String,attribute:"social-comments-text"})],i.prototype,"commentsText",void 0);s([a({type:Number,attribute:"social-comments"})],i.prototype,"comments",void 0);s([a({type:Boolean,attribute:"social-comments-disabled"})],i.prototype,"commentsDisabled",void 0);s([a({type:String,attribute:"social-comments-href"})],i.prototype,"commentsHref",void 0);s([a({type:String,attribute:"social-likes-text"})],i.prototype,"likesText",void 0);s([a({type:Number,attribute:"social-likes"})],i.prototype,"likes",void 0);s([a({type:Boolean,attribute:"social-likes-disabled"})],i.prototype,"likesDisabled",void 0);s([a({type:String,attribute:"social-likes-hover-content"})],i.prototype,"likesHoverContent",void 0);s([a({type:Boolean,attribute:"social-has-liked"})],i.prototype,"hasLiked",void 0);s([a({type:Boolean,attribute:"social-likes-interactive"})],i.prototype,"likesInteractive",void 0);s([a({type:Boolean,attribute:"social-author"})],i.prototype,"author",void 0);s([a({type:String,attribute:"social-author-text"})],i.prototype,"authorText",void 0);s([a({type:String,attribute:"social-author-href"})],i.prototype,"authorHref",void 0);s([a({type:Boolean,attribute:"social-reply-enabled"})],i.prototype,"replyEnabled",void 0);s([a({type:Boolean,attribute:"social-edit-enabled"})],i.prototype,"editEnabled",void 0);s([a({type:Boolean,attribute:"social-delete-enabled"})],i.prototype,"deleteEnabled",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"sizing",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"width",void 0);s([a({type:String,reflect:!0,attribute:"max-width",converter:c})],i.prototype,"maxWidth",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"height",void 0);s([a({type:String,reflect:!0,attribute:"max-height",converter:c})],i.prototype,"maxHeight",void 0);s([a({type:String,reflect:!0,converter:c})],i.prototype,"spacing",void 0);s([a({type:String,attribute:"spacing-top",reflect:!0,converter:c})],i.prototype,"spacingTop",void 0);s([a({type:String,attribute:"spacing-bottom",reflect:!0,converter:c})],i.prototype,"spacingBottom",void 0);s([a({type:String,attribute:"spacing-left",reflect:!0,converter:c})],i.prototype,"spacingLeft",void 0);s([a({type:String,attribute:"spacing-right",reflect:!0,converter:c})],i.prototype,"spacingRight",void 0);s([a({type:String,attribute:"padding",reflect:!0,converter:c})],i.prototype,"innerPadding",void 0);s([a({type:String,attribute:"padding-top",reflect:!0,converter:c})],i.prototype,"paddingTop",void 0);s([a({type:String,attribute:"padding-bottom",reflect:!0,converter:c})],i.prototype,"paddingBottom",void 0);s([a({type:String,attribute:"padding-left",reflect:!0,converter:c})],i.prototype,"paddingLeft",void 0);s([a({type:String,attribute:"padding-right",reflect:!0,converter:c})],i.prototype,"paddingRight",void 0);i=S=s([$("scb-card")],i);var W=class extends i{constructor(){super(),this.type="list"}get cardType(){return"list"}};W=s([$("scb-list-card")],W);var V=class extends i{constructor(){super(),this.type="link"}get cardType(){return"link"}};V=s([$("scb-link-card")],V);var j=class extends i{constructor(){super(),this.type="action"}get cardType(){return"action"}};j=s([$("scb-action-card")],j);var O=class extends i{constructor(){super(),this.type="social"}get cardType(){return"social"}};O=s([$("scb-social-card")],O);var K=class extends i{constructor(){super(),this.type="container"}get cardType(){return"container"}};K=s([$("scb-container-card")],K);export{j as ScbActionCard,K as ScbContainerCard,V as ScbLinkCard,W as ScbListCard,O as ScbSocialCard};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./scb-card.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(e,o,d){try{customElements.get(e)||r(e,o,d)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./scb-card.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(e,d,o){try{customElements.get(e)||r(e,d,o)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./scb-card.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(e,d,o){try{customElements.get(e)||r(e,d,o)}catch(n){var i=String(n||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./scb-card.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(e,o,c){try{customElements.get(e)||r(e,o,c)}catch(n){var i=String(n||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{_ as f,b as v,g as y,h as a,y as h}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as n}from"../../vendor/decorate.js";import{n as _,t as d}from"../../vendor/assertClassBrand.js";import"../scb-button/scb-button.js";(function(){try{var l=typeof globalThis<"u"?globalThis:window;if(!l.__scb_ce_guard_installed__){l.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,i,s){try{customElements.get(e)||t(e,i,s)}catch(r){var p=String(r||"");if(p.indexOf("already been used")===-1&&p.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var c,u,o=(c=new WeakSet,u=class extends f{constructor(...t){super(...t),_(this,c),this._contentId=`scb-collapse-content-${Math.random().toString(36).substr(2,9)}`,this.variant="elements",this.collapsedHeight=40,this.visibleElements=1,this.expanded=!1,this._elementCount=0,this.expandButtonLabel="Mer",this.collapseButtonLabel="Mindre",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.itemsGap=void 0,this._contentHeight=0}get _regionLabel(){return`${this.expanded?this.collapseButtonLabel:this.expandButtonLabel} – ${this._contentId}`}toggle(){this.expanded=!this.expanded}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}willUpdate(t){t.has("variant")&&(this._measureContent(!1),this._countElements(!1))}firstUpdated(){requestAnimationFrame(()=>{this._measureContent(),this._countElements()});const t=this.shadowRoot?.querySelector("slot");t&&t.addEventListener("slotchange",()=>{requestAnimationFrame(()=>{this._measureContent(),this._countElements(),d(c,this,g).call(this)})}),d(c,this,b).call(this),d(c,this,g).call(this)}updated(t){(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&d(c,this,b).call(this),t.has("itemsGap")&&(d(c,this,g).call(this),this._measureContent()),t.has("expanded")&&(d(c,this,g).call(this),this.dispatchEvent(new CustomEvent("expandedchange",{detail:{expanded:this.expanded},bubbles:!0,composed:!0})))}_measureContent(t=!0){if(this.variant==="height"){const e=this.shadowRoot?.querySelector("slot");if(e){const i=e.assignedNodes({flatten:!0});let s=0;i.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE){const m=r;s+=m.offsetHeight||m.scrollHeight||0}});const p=s;p!==this._contentHeight&&(this._contentHeight=p,t&&this.requestUpdate())}}}_countElements(t=!0){if(this.variant==="elements"){const e=this.shadowRoot?.querySelector("slot");if(e){const i=e.assignedNodes({flatten:!0}).filter(s=>s.nodeType===Node.ELEMENT_NODE).length;i!==this._elementCount&&(this._elementCount=i,t&&this.requestUpdate())}}}render(){if(this.variant==="height"){const t=this.expanded?`${this._contentHeight}px`:`${this.collapsedHeight}px`,e=this._contentHeight>this.collapsedHeight;return h`
|
|
2
2
|
<div
|
|
3
|
-
class="collapse-content"
|
|
3
|
+
class="collapse-content ${this.expanded?"expanded":""}"
|
|
4
4
|
id="${this._contentId}"
|
|
5
5
|
style="max-height: ${t};"
|
|
6
6
|
role="region"
|
|
@@ -23,7 +23,7 @@ import{_ as f,b as v,g as y,h as a,y as h}from"../../vendor/vendor.js";import"..
|
|
|
23
23
|
`:""}
|
|
24
24
|
`}else{const t=typeof this.visibleElements=="string"?parseInt(this.visibleElements,10):this.visibleElements,e=this._elementCount>t;return setTimeout(()=>{const i=this.shadowRoot?.querySelector("slot");i&&i.assignedNodes({flatten:!0}).filter(s=>s.nodeType===Node.ELEMENT_NODE).forEach((s,p)=>{const r=s;!this.expanded&&p>=t?r.classList.add("scb-collapsed-hidden"):r.classList.remove("scb-collapsed-hidden")})},0),h`
|
|
25
25
|
<div
|
|
26
|
-
class="collapse-content"
|
|
26
|
+
class="collapse-content ${this.expanded?"expanded":""}"
|
|
27
27
|
id="${this._contentId}"
|
|
28
28
|
role="region"
|
|
29
29
|
aria-label="${this._regionLabel}"
|
|
@@ -55,6 +55,9 @@ import{_ as f,b as v,g as y,h as a,y as h}from"../../vendor/vendor.js";import"..
|
|
|
55
55
|
overflow: hidden;
|
|
56
56
|
transition: max-height var(--motion-duration-medium) var(--motion-easing-standard);
|
|
57
57
|
}
|
|
58
|
+
.collapse-content.expanded {
|
|
59
|
+
overflow: visible;
|
|
60
|
+
}
|
|
58
61
|
.collapse-gradient-overlay {
|
|
59
62
|
position: absolute;
|
|
60
63
|
left: 0;
|
|
@@ -83,7 +86,7 @@ import{_ as f,b as v,g as y,h as a,y as h}from"../../vendor/vendor.js";import"..
|
|
|
83
86
|
::slotted(*) {
|
|
84
87
|
max-height: 1000px;
|
|
85
88
|
transition: max-height var(--motion-duration-medium) var(--motion-easing-standard), opacity var(--motion-duration-medium) var(--motion-easing-standard);
|
|
86
|
-
overflow:
|
|
89
|
+
overflow: visible;
|
|
87
90
|
display: block;
|
|
88
91
|
}
|
|
89
92
|
`,u);function b(){const l=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??l,e=this.mapSpacingToken(this.spacingBottom)??l,i=this.mapSpacingToken(this.spacingLeft),s=this.mapSpacingToken(this.spacingRight);t?this.style.setProperty("--scb-collapse-spacing-block-start",t):this.style.removeProperty("--scb-collapse-spacing-block-start"),e?this.style.setProperty("--scb-collapse-spacing-block-end",e):this.style.removeProperty("--scb-collapse-spacing-block-end"),i?this.style.setProperty("--scb-collapse-spacing-inline-start",i):this.style.removeProperty("--scb-collapse-spacing-inline-start"),s?this.style.setProperty("--scb-collapse-spacing-inline-end",s):this.style.removeProperty("--scb-collapse-spacing-inline-end")}function g(){const l=this.mapSpacingToken(this.itemsGap);l?this.style.setProperty("--scb-collapse-items-gap",l):this.style.removeProperty("--scb-collapse-items-gap");const t=this.shadowRoot?.querySelector("slot");t&&t.assignedNodes({flatten:!0}).filter(e=>e.nodeType===Node.ELEMENT_NODE).forEach((e,i)=>{const s=e;i===0||!l?s.style.removeProperty("margin-block-start"):s.style.setProperty("margin-block-start","var(--scb-collapse-items-gap)")})}n([a({type:String})],o.prototype,"variant",void 0);n([a({type:Number,attribute:"collapsed-height",reflect:!0})],o.prototype,"collapsedHeight",void 0);n([a({type:Number,attribute:"visible-elements",reflect:!0})],o.prototype,"visibleElements",void 0);n([a({type:Boolean,reflect:!0})],o.prototype,"expanded",void 0);n([a({type:String,attribute:"expand-button-label",reflect:!0})],o.prototype,"expandButtonLabel",void 0);n([a({type:String,attribute:"collapse-button-label",reflect:!0})],o.prototype,"collapseButtonLabel",void 0);n([a({type:String,reflect:!0})],o.prototype,"spacing",void 0);n([a({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",void 0);n([a({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",void 0);n([a({type:String,attribute:"spacing-left",reflect:!0})],o.prototype,"spacingLeft",void 0);n([a({type:String,attribute:"spacing-right",reflect:!0})],o.prototype,"spacingRight",void 0);n([a({type:String,attribute:"items-gap",reflect:!0})],o.prototype,"itemsGap",void 0);o=n([y("scb-collapse")],o);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -107,6 +107,26 @@
|
|
|
107
107
|
"import": "./scb-card/scb-card.js",
|
|
108
108
|
"require": "./scb-card/scb-card.js"
|
|
109
109
|
},
|
|
110
|
+
"./scb-card/scb-action-card": {
|
|
111
|
+
"import": "./scb-card/scb-action-card.js",
|
|
112
|
+
"require": "./scb-card/scb-action-card.js"
|
|
113
|
+
},
|
|
114
|
+
"./scb-card/scb-container-card": {
|
|
115
|
+
"import": "./scb-card/scb-container-card.js",
|
|
116
|
+
"require": "./scb-card/scb-container-card.js"
|
|
117
|
+
},
|
|
118
|
+
"./scb-card/scb-link-card": {
|
|
119
|
+
"import": "./scb-card/scb-link-card.js",
|
|
120
|
+
"require": "./scb-card/scb-link-card.js"
|
|
121
|
+
},
|
|
122
|
+
"./scb-card/scb-list-card": {
|
|
123
|
+
"import": "./scb-card/scb-list-card.js",
|
|
124
|
+
"require": "./scb-card/scb-list-card.js"
|
|
125
|
+
},
|
|
126
|
+
"./scb-card/scb-social-card": {
|
|
127
|
+
"import": "./scb-card/scb-social-card.js",
|
|
128
|
+
"require": "./scb-card/scb-social-card.js"
|
|
129
|
+
},
|
|
110
130
|
"./scb-checkbox": {
|
|
111
131
|
"import": "./scb-checkbox/scb-checkbox.js",
|
|
112
132
|
"require": "./scb-checkbox/scb-checkbox.js"
|
|
@@ -417,5 +437,5 @@
|
|
|
417
437
|
},
|
|
418
438
|
"./mvc/*": "./mvc/*"
|
|
419
439
|
},
|
|
420
|
-
"buildHash": "
|
|
440
|
+
"buildHash": "AFBF8ABA1D36B04FB900ADC00638A36226C11847C595CD90A8922792E50DE4D7"
|
|
421
441
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./scb-card.js";
|