scb-wc-test 0.1.67 → 0.1.69
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 +9 -9
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +11 -11
- package/mvc/components/scb-fact-card/scb-fact-card.js +2 -2
- package/mvc/components/scb-grid/scb-stack.js +15 -7
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/package.json +2 -2
- package/scb-card/scb-card.d.ts +1 -1
- package/scb-card/scb-card.js +13 -13
- package/scb-fact-card/scb-fact-card-content.d.ts +2 -2
- package/scb-fact-card/scb-fact-card-content.js +33 -33
- package/scb-fact-card/scb-fact-card.d.ts +2 -2
- package/scb-fact-card/scb-fact-card.js +5 -5
- package/scb-grid/scb-stack.js +20 -12
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +1 -1
- package/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/scb-wc-test.bundle.js +39 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as m}from"../../vendor/preload-helper.js";import{a as
|
|
2
|
+
import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as v,x as i,t as b}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-list/scb-list-item.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var o=customElements.define.bind(customElements);customElements.define=function(n,r,l){try{customElements.get(n)||o(n,r,l)}catch(d){var c=String(d||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var g=Object.defineProperty,f=Object.getOwnPropertyDescriptor,e=(a,o,n,r)=>{for(var l=r>1?void 0:r?f(o,n):o,c=a.length-1,d;c>=0;c--)(d=a[c])&&(l=(r?d(o,n,l):d(l))||l);return r&&l&&g(o,n,l),l};let t=class extends v{constructor(){super(...arguments),this.type="",this.variant="",this.direction="",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.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.comments=0,this.likesText="",this.likes=0,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.__onImgLoad=a=>{const o=a.currentTarget.closest(".media");o&&o.classList.add("is-loaded")},this.__onKeyDown=a=>{(a.key==="Enter"||a.key===" ")&&this.cardHref&&(a.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=a=>{this.cardHref&&(a.target.closest("a")||window.open(this.cardHref,"_self"))}}__calcAspectWH(a){const o=(a||"").trim();if(!o)return{w:640,h:360};const n=o.includes("/")?o.split("/"):o.includes(":")?o.split(":"):o.includes("x")?o.split("x"):null;if(n&&n.length===2){const l=Number(n[0]),c=Number(n[1]);if(l>0&&c>0)return{w:l,h:c}}const r=Number(o);return isFinite(r)&&r>0?{w:1e3,h:Math.round(1e3/r)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return i`
|
|
3
3
|
<div class="media">
|
|
4
4
|
<slot name="media">
|
|
5
5
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
@@ -42,7 +42,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
42
42
|
<div class="full-content">
|
|
43
43
|
<div class="top-content">
|
|
44
44
|
${this.title?i`<div class="header">${l(!!this.cardHref)}</div>`:""}
|
|
45
|
-
${this.
|
|
45
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
46
46
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
47
47
|
${r?i`<div class="date">${r}</div>`:""}
|
|
48
48
|
</div>
|
|
@@ -51,7 +51,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
51
51
|
<div class="full-content">
|
|
52
52
|
<div class="top-content">
|
|
53
53
|
${this.title?i`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
54
|
-
${this.
|
|
54
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
55
55
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
56
56
|
${r?i`<div class="date">${r}</div>`:""}
|
|
57
57
|
</div>
|
|
@@ -63,7 +63,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
63
63
|
<div class="full-content">
|
|
64
64
|
<div class="top-content">
|
|
65
65
|
${this.title?i`<div class="header">${l(!!this.cardHref)}</div>`:""}
|
|
66
|
-
${this.
|
|
66
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
67
67
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
68
68
|
${r?i`<div class="date">${r}</div>`:""}
|
|
69
69
|
</div>
|
|
@@ -78,7 +78,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
78
78
|
<div class="full-content">
|
|
79
79
|
<div class="top-content">
|
|
80
80
|
${this.title?i`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
81
|
-
${this.
|
|
81
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
82
82
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
83
83
|
${r?i`<div class="date">${r}</div>`:""}
|
|
84
84
|
</div>
|
|
@@ -90,7 +90,7 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
90
90
|
<div class="full-content">
|
|
91
91
|
<div class="top-content">
|
|
92
92
|
${this.title?i`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
93
|
-
${this.
|
|
93
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
94
94
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
95
95
|
${r?i`<div class="date">${r}</div>`:""}
|
|
96
96
|
</div>
|
|
@@ -102,12 +102,12 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
102
102
|
<div class="full-content">
|
|
103
103
|
<div class="top-content">
|
|
104
104
|
${this.title?i`<div class="header">${l(!!this.cardHref)}</div>`:""}
|
|
105
|
-
${this.
|
|
105
|
+
${this.subtitle?i`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
106
106
|
${this.supportingText?i`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
107
107
|
${r?i`<div class="date">${r}</div>`:""}
|
|
108
108
|
</div>
|
|
109
109
|
</div>
|
|
110
|
-
`)}}updated(a){super.updated(a),a.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),a.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),a.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),a.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),a.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.style.setProperty("--scb-card-media-fit",this.mediaFit||"cover"),this.style.setProperty("--scb-card-media-position",this.mediaPosition||"center")}async firstUpdated(){t.__iconLoaded||(await m(()=>import("../../vendor/vendor-material.js").then(a=>a.i),__vite__mapDeps([0,1]),import.meta.url),t.__iconLoaded=!0),t.__rippleLoaded||(await m(()=>import("../../vendor/vendor-material.js").then(a=>a.r),__vite__mapDeps([0,1]),import.meta.url),t.__rippleLoaded=!0)}};t.__iconLoaded=!1;t.__rippleLoaded=!1;t.styles=
|
|
110
|
+
`)}}updated(a){super.updated(a),a.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),a.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),a.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),a.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),a.has("type")&&(this.type==="list"?this.setAttribute("data-density","-2"):this.removeAttribute("data-density")),this.style.setProperty("--scb-card-media-fit",this.mediaFit||"cover"),this.style.setProperty("--scb-card-media-position",this.mediaPosition||"center")}async firstUpdated(){t.__iconLoaded||(await m(()=>import("../../vendor/vendor-material.js").then(a=>a.i),__vite__mapDeps([0,1]),import.meta.url),t.__iconLoaded=!0),t.__rippleLoaded||(await m(()=>import("../../vendor/vendor-material.js").then(a=>a.r),__vite__mapDeps([0,1]),import.meta.url),t.__rippleLoaded=!0)}};t.__iconLoaded=!1;t.__rippleLoaded=!1;t.styles=u`
|
|
111
111
|
:host {
|
|
112
112
|
display: block;
|
|
113
113
|
box-sizing: border-box;
|
|
@@ -354,4 +354,4 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as b,n as s,i as u,x
|
|
|
354
354
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
355
355
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
356
356
|
}
|
|
357
|
-
`;e([s({type:String})],t.prototype,"type",2);e([s({type:String})],t.prototype,"variant",2);e([s({type:String})],t.prototype,"direction",2);e([s({type:String,attribute:"media-type"})],t.prototype,"mediaType",2);e([s({type:String,attribute:"media-href"})],t.prototype,"mediaHref",2);e([s({type:String,attribute:"media-alt"})],t.prototype,"mediaAlt",2);e([s({type:String,attribute:"media-srcset"})],t.prototype,"mediaSrcset",2);e([s({type:String,attribute:"media-sizes"})],t.prototype,"mediaSizes",2);e([s({type:String,attribute:"media-loading"})],t.prototype,"mediaLoading",2);e([s({type:String,attribute:"media-decoding"})],t.prototype,"mediaDecoding",2);e([s({type:String,attribute:"media-fetchpriority"})],t.prototype,"mediaFetchPriority",2);e([s({type:String,attribute:"media-fit"})],t.prototype,"mediaFit",2);e([s({type:String,attribute:"media-position"})],t.prototype,"mediaPosition",2);e([s({type:String,attribute:"media-width"})],t.prototype,"mediaWidth",2);e([s({type:String,attribute:"media-height"})],t.prototype,"mediaHeight",2);e([s({type:String,attribute:"media-aspect"})],t.prototype,"mediaAspect",2);e([s({type:Boolean,attribute:"media-placeholder"})],t.prototype,"mediaPlaceholder",2);e([s({type:String,attribute:"card-href"})],t.prototype,"cardHref",2);e([s({type:String})],t.prototype,"title",2);e([s({type:String
|
|
357
|
+
`;e([s({type:String})],t.prototype,"type",2);e([s({type:String})],t.prototype,"variant",2);e([s({type:String})],t.prototype,"direction",2);e([s({type:String,attribute:"media-type"})],t.prototype,"mediaType",2);e([s({type:String,attribute:"media-href"})],t.prototype,"mediaHref",2);e([s({type:String,attribute:"media-alt"})],t.prototype,"mediaAlt",2);e([s({type:String,attribute:"media-srcset"})],t.prototype,"mediaSrcset",2);e([s({type:String,attribute:"media-sizes"})],t.prototype,"mediaSizes",2);e([s({type:String,attribute:"media-loading"})],t.prototype,"mediaLoading",2);e([s({type:String,attribute:"media-decoding"})],t.prototype,"mediaDecoding",2);e([s({type:String,attribute:"media-fetchpriority"})],t.prototype,"mediaFetchPriority",2);e([s({type:String,attribute:"media-fit"})],t.prototype,"mediaFit",2);e([s({type:String,attribute:"media-position"})],t.prototype,"mediaPosition",2);e([s({type:String,attribute:"media-width"})],t.prototype,"mediaWidth",2);e([s({type:String,attribute:"media-height"})],t.prototype,"mediaHeight",2);e([s({type:String,attribute:"media-aspect"})],t.prototype,"mediaAspect",2);e([s({type:Boolean,attribute:"media-placeholder"})],t.prototype,"mediaPlaceholder",2);e([s({type:String,attribute:"card-href"})],t.prototype,"cardHref",2);e([s({type:String})],t.prototype,"title",2);e([s({type:String})],t.prototype,"subtitle",2);e([s({type:String,attribute:"supporting-text"})],t.prototype,"supportingText",2);e([s({type:Date,reflect:!0})],t.prototype,"date",2);e([s({type:String,attribute:"social-comments-text"})],t.prototype,"commentsText",2);e([s({type:Number,attribute:"social-comments",reflect:!0})],t.prototype,"comments",2);e([s({type:String,attribute:"social-likes-text"})],t.prototype,"likesText",2);e([s({type:Number,attribute:"social-likes",reflect:!0})],t.prototype,"likes",2);e([s({type:String,reflect:!0})],t.prototype,"sizing",2);e([s({type:String,reflect:!0})],t.prototype,"width",2);e([s({type:String,reflect:!0,attribute:"max-width"})],t.prototype,"maxWidth",2);e([s({type:String,reflect:!0})],t.prototype,"height",2);e([s({type:String,reflect:!0,attribute:"max-height"})],t.prototype,"maxHeight",2);t=e([b("scb-card")],t);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a as p,n as d,i as u,x as o,t as h}from"../../vendor/vendor.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var
|
|
2
|
-
${this.
|
|
1
|
+
import{a as p,n as d,i as u,x as o,t as h}from"../../vendor/vendor.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,l,s){try{customElements.get(t)||e(t,l,s)}catch(a){var n=String(a||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var g=Object.defineProperty,y=Object.getOwnPropertyDescriptor,c=(i,e,t,l)=>{for(var s=l>1?void 0:l?y(e,t):e,n=i.length-1,a;n>=0;n--)(a=i[n])&&(s=(l?a(e,t,s):a(s))||s);return l&&s&&g(e,t,s),s};let r=class extends u{constructor(){super(...arguments),this.title="",this.subtitle="",this.supportingText=""}render(){return o`
|
|
2
|
+
${this.title?o`
|
|
3
3
|
<div class="label">
|
|
4
|
-
${this.
|
|
4
|
+
${this.title}
|
|
5
5
|
</div>`:""}
|
|
6
|
-
${this.
|
|
6
|
+
${this.subtitle?o`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
7
7
|
${this.supportingText?o`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
8
8
|
<slot @slotchange=${this.requestUpdate}></slot>
|
|
9
9
|
${this._hasSlotContent()?o`<div class="content links"><slot></slot></div>`:""}
|
|
10
|
-
`}_hasSlotContent(){const i=this.shadowRoot&&this.shadowRoot.querySelector("slot");if(!i)return!1;const
|
|
10
|
+
`}_hasSlotContent(){const i=this.shadowRoot&&this.shadowRoot.querySelector("slot");if(!i)return!1;const e=i.assignedNodes({flatten:!0});return e.length>0&&e.some(t=>t.nodeType===Node.TEXT_NODE?t.textContent?.trim():!0)}};r.styles=p`
|
|
11
11
|
:host {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
@@ -36,9 +36,9 @@ import{a as p,n as d,i as u,x as o,t as h}from"../../vendor/vendor.js";(function
|
|
|
36
36
|
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
37
37
|
}
|
|
38
38
|
.content.links ::slotted(*) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
`;c([d({type:String})],r.prototype,"
|
|
39
|
+
margin-top: var(--spacing-3);
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: var(--spacing-3);
|
|
43
|
+
}
|
|
44
|
+
`;c([d({type:String,attribute:"title"})],r.prototype,"title",2);c([d({type:String,attribute:"subtitle"})],r.prototype,"subtitle",2);c([d({type:String,attribute:"supporting-text"})],r.prototype,"supportingText",2);r=c([h("scb-fact-card-content")],r);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as h}from"../../vendor/preload-helper.js";import{a as p,n as r,i as u,x as d,t as b}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-fact-card-content.js";import"../scb-link/scb-link.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(n,a,s){try{customElements.get(n)||i(n,a,s)}catch(l){var c=String(l||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,o=(e,i,n,a)=>{for(var s=a>1?void 0:a?_(i,n):i,c=e.length-1,l;c>=0;c--)(l=e[c])&&(s=(a?l(i,n,s):l(s))||s);return a&&s&&f(i,n,s),s};let t=class extends u{constructor(){super(...arguments),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.
|
|
2
|
+
import{_ as h}from"../../vendor/preload-helper.js";import{a as p,n as r,i as u,x as d,t as b}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"./scb-fact-card-content.js";import"../scb-link/scb-link.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(n,a,s){try{customElements.get(n)||i(n,a,s)}catch(l){var c=String(l||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var f=Object.defineProperty,_=Object.getOwnPropertyDescriptor,o=(e,i,n,a)=>{for(var s=a>1?void 0:a?_(i,n):i,c=e.length-1,l;c>=0;c--)(l=e[c])&&(s=(a?l(i,n,s):l(s))||s);return a&&s&&f(i,n,s),s};let t=class extends u{constructor(){super(...arguments),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.title="",this.subtitle="",this.supportingText="",this.icon="",this.showCloseButton=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight=""}static __handleDocClick(e){const i=e.composedPath();for(const n of i){if(!(n instanceof Element))continue;const a=n.getAttribute("data-fact-card-toggle")||n.getAttribute("aria-controls");if(!a)continue;const s=t.__instances.get(a);if(!s){t.__instances.delete(a);continue}s.__lastTriggerEl=n,s.__setOpen(!s.open),e.stopPropagation();break}}static __ensureDocListener(){t.__docListenerAttached||(document.addEventListener("click",t.__handleDocClick,!0),t.__docListenerAttached=!0)}static __maybeRemoveDocListener(){t.__docListenerAttached&&t.__instances.size===0&&(document.removeEventListener("click",t.__handleDocClick,!0),t.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&t.__instances.set(this.id,this),t.__ensureDocListener()}disconnectedCallback(){this.id&&t.__instances.delete(this.id),t.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has("open")&&this.__updateTriggersExpanded(),e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size"))}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__setOpen(e){const i=this.open;this.open=e,e&&!i?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):!e&&i&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){if(!this.open)return d``;const e=this.variant==="outlined"?"outlined":"filled",i=!!this.icon;return d`
|
|
3
3
|
<div class="outer ${i?"has-icon":""}">
|
|
4
4
|
${i?d`<div class="icon-wrapper ${e}"><md-icon>${this.icon}</md-icon></div>`:""}
|
|
5
5
|
<div class="scb-fact-card ${e} ${this.showCloseButton?"has-close":""}">
|
|
@@ -130,4 +130,4 @@ import{_ as h}from"../../vendor/preload-helper.js";import{a as p,n as r,i as u,x
|
|
|
130
130
|
overflow-wrap: normal;
|
|
131
131
|
hyphens: auto;
|
|
132
132
|
}
|
|
133
|
-
`;o([r({type:String})],t.prototype,"variant",2);o([r({type:String})],t.prototype,"
|
|
133
|
+
`;o([r({type:String})],t.prototype,"variant",2);o([r({type:String,attribute:"title"})],t.prototype,"title",2);o([r({type:String,attribute:"subtitle"})],t.prototype,"subtitle",2);o([r({type:String,attribute:"supporting-text"})],t.prototype,"supportingText",2);o([r({type:String})],t.prototype,"icon",2);o([r({type:Boolean,attribute:"show-close-button"})],t.prototype,"showCloseButton",2);o([r({type:Boolean,reflect:!0})],t.prototype,"open",2);o([r({type:String,reflect:!0})],t.prototype,"sizing",2);o([r({type:String,reflect:!0})],t.prototype,"width",2);o([r({type:String,reflect:!0,attribute:"max-width"})],t.prototype,"maxWidth",2);o([r({type:String,reflect:!0})],t.prototype,"height",2);o([r({type:String,reflect:!0,attribute:"max-height"})],t.prototype,"maxHeight",2);t=o([b("scb-fact-card")],t);
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as u,n as o,i as y,x as g,t as b}from"../../vendor/vendor.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(s,i,a){try{customElements.get(s)||t(s,i,a)}catch(l){var c=String(l||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var v=Object.defineProperty,w=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},n=(e,t,s,i)=>{for(var a=i>1?void 0:i?w(t,s):t,c=e.length-1,l;c>=0;c--)(l=e[c])&&(a=(i?l(t,s,a):l(a))||a);return i&&a&&v(t,s,a),a},m=(e,t,s)=>t.has(e)||f("Cannot "+s),_=(e,t,s)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),d=(e,t,s)=>(m(e,t,"access private method"),s),p,h;let r=class extends y{constructor(){super(...arguments),_(this,p),this.direction="column",this.gap="",this.rowGap="",this.columnGap="",this.align="stretch",this.justify="start",this.wrap=!1,this.inline=!1}firstUpdated(){d(this,p,h).call(this)}updated(){d(this,p,h).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const s=this.mapSpacingToken(t[0]);return{row:s,col:s}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return g`<div class="base"><slot></slot></div>`}};p=new WeakSet;h=function(){this.style.setProperty("--scb-stack-direction",this.direction);const e="var(--spacing-5, 16px)",t=this.parseGapShorthand(this.gap),s=this.mapSpacingToken(this.rowGap)??t.row??e,i=this.mapSpacingToken(this.columnGap)??t.col??e;this.style.setProperty("--scb-stack-gap",`${s}`),this.style.setProperty("--scb-stack-row-gap",s),this.style.setProperty("--scb-stack-column-gap",i);const a={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},c={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};this.style.setProperty("--scb-stack-align",a[this.align]??"stretch"),this.style.setProperty("--scb-stack-justify",c[this.justify]??"flex-start"),this.style.setProperty("--scb-stack-wrap",this.wrap?"wrap":"nowrap")};r.styles=u`
|
|
2
2
|
:host {
|
|
3
3
|
box-sizing: border-box;
|
|
4
|
+
display: block;
|
|
5
|
+
width: auto;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
min-inline-size: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* Inre flexlayout så att gap även fungerar för slottat innehåll */
|
|
11
|
+
.base {
|
|
4
12
|
display: var(--scb-stack-display, flex);
|
|
5
13
|
flex-direction: var(--scb-stack-direction, column);
|
|
6
14
|
|
|
@@ -11,14 +19,14 @@ import{a as d,n as o,i as y,x as g,t as b}from"../../vendor/vendor.js";(function
|
|
|
11
19
|
align-items: var(--scb-stack-align, stretch);
|
|
12
20
|
justify-content: var(--scb-stack-justify, flex-start);
|
|
13
21
|
flex-wrap: var(--scb-stack-wrap, nowrap);
|
|
14
|
-
|
|
15
|
-
width: auto;
|
|
16
|
-
max-width: 100%;
|
|
17
|
-
min-inline-size: 0;
|
|
18
22
|
}
|
|
19
|
-
:host([inline]) { --scb-stack-display: inline-flex; }
|
|
20
23
|
|
|
21
|
-
/*
|
|
24
|
+
/* Gör att slotens tilldelade noder blir barn till .base */
|
|
25
|
+
slot { display: contents; }
|
|
26
|
+
|
|
27
|
+
:host([inline]) .base { --scb-stack-display: inline-flex; }
|
|
28
|
+
|
|
29
|
+
/* Barnens flex-beteende i row-läge kan styras via variabeln och defaultar till att inte ta full bredd */
|
|
22
30
|
:host([direction="row"]) ::slotted(*) {
|
|
23
31
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
24
32
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{a as d,n
|
|
1
|
+
import{a as d,n,i as u,x as l,t as p}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(r,a,o){try{customElements.get(r)||t(r,a,o)}catch(h){var c=String(h||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var y=Object.defineProperty,g=Object.getOwnPropertyDescriptor,s=(e,t,r,a)=>{for(var o=a>1?void 0:a?g(t,r):t,c=e.length-1,h;c>=0;c--)(h=e[c])&&(o=(a?h(t,r,o):h(o))||o);return a&&o&&y(t,r,o),o};let i=class extends u{constructor(){super(...arguments),this.keyfigure=0,this.subtitle="",this.supportingText="",this.cardHref="",this.icon="",this.size="standard",this.unit="",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.sizing="stretch",this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.location.href=this.cardHref)},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||(window.location.href=this.cardHref))}}formatNumber(e){if(typeof e=="number")return e.toLocaleString("sv-SE").replace(/\u00A0/g," ");const t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString("sv-SE").replace(/\u00A0/g," ")}render(){const e=!!this.cardHref,t=this.formatNumber(this.keyfigure),r=(this.unit||"").trim(),a=r?`${t} ${r}`:t;return l`
|
|
2
2
|
<div
|
|
3
3
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
4
4
|
role=${e?"link":"group"}
|
|
5
5
|
tabindex=${e?"0":"-1"}
|
|
6
|
-
aria-label=${this.
|
|
6
|
+
aria-label=${this.subtitle||a}
|
|
7
7
|
@click=${e?this.__handleHrefNavigation:null}
|
|
8
8
|
@keydown=${e?this.__onKeyDown:null}
|
|
9
9
|
style="cursor:${e?"pointer":"default"};"
|
|
@@ -13,16 +13,16 @@ import{a as d,n as a,i as u,x as l,t as p}from"../../vendor/vendor.js";import"..
|
|
|
13
13
|
|
|
14
14
|
${this.keyfigure!==void 0&&this.keyfigure!==null&&this.keyfigure!==""?l`
|
|
15
15
|
<div class="keyfigure">
|
|
16
|
-
<span class="value" aria-label="${
|
|
16
|
+
<span class="value" aria-label="${a}">
|
|
17
17
|
${t}${r?l`<span class="unit" aria-hidden="true">\u00A0${r}</span>`:""}
|
|
18
18
|
</span>
|
|
19
19
|
${e?l`<md-icon>arrow_forward</md-icon>`:""}
|
|
20
20
|
</div>
|
|
21
21
|
`:""}
|
|
22
22
|
|
|
23
|
-
${this.
|
|
23
|
+
${this.subtitle?l`
|
|
24
24
|
<div class="sub-label">
|
|
25
|
-
${e?l`<a href="${this.cardHref}" tabindex="-1">${this.
|
|
25
|
+
${e?l`<a href="${this.cardHref}" tabindex="-1">${this.subtitle}</a>`:this.subtitle}
|
|
26
26
|
</div>
|
|
27
27
|
`:""}
|
|
28
28
|
|
|
@@ -134,4 +134,4 @@ import{a as d,n as a,i as u,x as l,t as p}from"../../vendor/vendor.js";import"..
|
|
|
134
134
|
line-height: var(--md-sys-typescale-display-medium-line-height);
|
|
135
135
|
letter-spacing: var(--md-sys-typescale-display-medium-tracking);
|
|
136
136
|
}
|
|
137
|
-
`;s([
|
|
137
|
+
`;s([n({attribute:"keyfigure"})],i.prototype,"keyfigure",2);s([n({type:String,attribute:"subtitle"})],i.prototype,"subtitle",2);s([n({type:String,attribute:"supporting-text"})],i.prototype,"supportingText",2);s([n({type:String,attribute:"card-href"})],i.prototype,"cardHref",2);s([n({type:String})],i.prototype,"icon",2);s([n({type:String})],i.prototype,"size",2);s([n({type:String})],i.prototype,"unit",2);s([n({type:String,reflect:!0})],i.prototype,"width",2);s([n({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);s([n({type:String,reflect:!0})],i.prototype,"height",2);s([n({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);s([n({type:String,reflect:!0})],i.prototype,"sizing",2);i=s([p("scb-keyfigure-card")],i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -288,5 +288,5 @@
|
|
|
288
288
|
},
|
|
289
289
|
"./mvc/*": "./mvc/*"
|
|
290
290
|
},
|
|
291
|
-
"buildHash": "
|
|
291
|
+
"buildHash": "FE9B59510D9ECD28B7D24E5FB48881AD15C3F106C90BCCCB8F207A27AA59E61B"
|
|
292
292
|
}
|
package/scb-card/scb-card.d.ts
CHANGED
package/scb-card/scb-card.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { css as m, LitElement as
|
|
1
|
+
import { css as m, LitElement as v, html as i } from "lit";
|
|
2
2
|
import { property as s, customElement as u } from "lit/decorators.js";
|
|
3
3
|
import "@material/web/focus/md-focus-ring.js";
|
|
4
4
|
import "../scb-list/scb-list.js";
|
|
5
5
|
import "../scb-button/scb-button.js";
|
|
6
6
|
import "../scb-link/scb-link.js";
|
|
7
7
|
import "../scb-avatar/scb-avatar.js";
|
|
8
|
-
var
|
|
8
|
+
var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, e = (o, r, n, a) => {
|
|
9
9
|
for (var l = a > 1 ? void 0 : a ? g(r, n) : r, d = o.length - 1, c; d >= 0; d--)
|
|
10
10
|
(c = o[d]) && (l = (a ? c(r, n, l) : c(l)) || l);
|
|
11
|
-
return a && l &&
|
|
11
|
+
return a && l && b(r, n, l), l;
|
|
12
12
|
};
|
|
13
|
-
let t = class extends
|
|
13
|
+
let t = class extends v {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.type = "", this.variant = "", this.direction = "", 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.title = "", this.
|
|
15
|
+
super(...arguments), this.type = "", this.variant = "", this.direction = "", 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.title = "", this.subtitle = "", this.supportingText = "", this.commentsText = "", this.comments = 0, this.likesText = "", this.likes = 0, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.__onImgLoad = (o) => {
|
|
16
16
|
const r = o.currentTarget.closest(".media");
|
|
17
17
|
r && r.classList.add("is-loaded");
|
|
18
18
|
}, this.__onKeyDown = (o) => {
|
|
@@ -95,7 +95,7 @@ let t = class extends b {
|
|
|
95
95
|
<div class="full-content">
|
|
96
96
|
<div class="top-content">
|
|
97
97
|
${this.title ? i`<div class="header">${l(!!this.cardHref)}</div>` : ""}
|
|
98
|
-
${this.
|
|
98
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
99
99
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
100
100
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
101
101
|
</div>
|
|
@@ -106,7 +106,7 @@ let t = class extends b {
|
|
|
106
106
|
<div class="full-content">
|
|
107
107
|
<div class="top-content">
|
|
108
108
|
${this.title ? i`<div class="header"><span class="title">${this.title}</span></div>` : ""}
|
|
109
|
-
${this.
|
|
109
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
110
110
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
111
111
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
112
112
|
</div>
|
|
@@ -120,7 +120,7 @@ let t = class extends b {
|
|
|
120
120
|
<div class="full-content">
|
|
121
121
|
<div class="top-content">
|
|
122
122
|
${this.title ? i`<div class="header">${l(!!this.cardHref)}</div>` : ""}
|
|
123
|
-
${this.
|
|
123
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
124
124
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
125
125
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
126
126
|
</div>
|
|
@@ -137,7 +137,7 @@ let t = class extends b {
|
|
|
137
137
|
<div class="full-content">
|
|
138
138
|
<div class="top-content">
|
|
139
139
|
${this.title ? i`<div class="header"><span class="title">${this.title}</span></div>` : ""}
|
|
140
|
-
${this.
|
|
140
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
141
141
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
142
142
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
143
143
|
</div>
|
|
@@ -151,7 +151,7 @@ let t = class extends b {
|
|
|
151
151
|
<div class="full-content">
|
|
152
152
|
<div class="top-content">
|
|
153
153
|
${this.title ? i`<div class="header"><span class="title">${this.title}</span></div>` : ""}
|
|
154
|
-
${this.
|
|
154
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
155
155
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
156
156
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
157
157
|
</div>
|
|
@@ -165,7 +165,7 @@ let t = class extends b {
|
|
|
165
165
|
<div class="full-content">
|
|
166
166
|
<div class="top-content">
|
|
167
167
|
${this.title ? i`<div class="header">${l(!!this.cardHref)}</div>` : ""}
|
|
168
|
-
${this.
|
|
168
|
+
${this.subtitle ? i`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
169
169
|
${this.supportingText ? i`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
170
170
|
${a ? i`<div class="date">${a}</div>` : ""}
|
|
171
171
|
</div>
|
|
@@ -488,8 +488,8 @@ e([
|
|
|
488
488
|
s({ type: String })
|
|
489
489
|
], t.prototype, "title", 2);
|
|
490
490
|
e([
|
|
491
|
-
s({ type: String
|
|
492
|
-
], t.prototype, "
|
|
491
|
+
s({ type: String })
|
|
492
|
+
], t.prototype, "subtitle", 2);
|
|
493
493
|
e([
|
|
494
494
|
s({ type: String, attribute: "supporting-text" })
|
|
495
495
|
], t.prototype, "supportingText", 2);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class ScbFactCardContent extends LitElement {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
5
|
supportingText: string;
|
|
6
6
|
static styles: import('lit').CSSResult;
|
|
7
7
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { css as d, LitElement as h, html as
|
|
1
|
+
import { css as d, LitElement as h, html as a } from "lit";
|
|
2
2
|
import { property as c, customElement as g } from "lit/decorators.js";
|
|
3
|
-
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, n = (
|
|
4
|
-
for (var s =
|
|
5
|
-
(p =
|
|
6
|
-
return
|
|
3
|
+
var u = Object.defineProperty, y = Object.getOwnPropertyDescriptor, n = (r, t, i, e) => {
|
|
4
|
+
for (var s = e > 1 ? void 0 : e ? y(t, i) : t, o = r.length - 1, p; o >= 0; o--)
|
|
5
|
+
(p = r[o]) && (s = (e ? p(t, i, s) : p(s)) || s);
|
|
6
|
+
return e && s && u(t, i, s), s;
|
|
7
7
|
};
|
|
8
|
-
let
|
|
8
|
+
let l = class extends h {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this.
|
|
10
|
+
super(...arguments), this.title = "", this.subtitle = "", this.supportingText = "";
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return
|
|
14
|
-
${this.
|
|
13
|
+
return a`
|
|
14
|
+
${this.title ? a`
|
|
15
15
|
<div class="label">
|
|
16
|
-
${this.
|
|
16
|
+
${this.title}
|
|
17
17
|
</div>` : ""}
|
|
18
|
-
${this.
|
|
19
|
-
${this.supportingText ?
|
|
18
|
+
${this.subtitle ? a`<div class="sub-label">${this.subtitle}</div>` : ""}
|
|
19
|
+
${this.supportingText ? a`<div class="supporting-text">${this.supportingText}</div>` : ""}
|
|
20
20
|
<slot @slotchange=${this.requestUpdate}></slot>
|
|
21
|
-
${this._hasSlotContent() ?
|
|
21
|
+
${this._hasSlotContent() ? a`<div class="content links"><slot></slot></div>` : ""}
|
|
22
22
|
`;
|
|
23
23
|
}
|
|
24
24
|
_hasSlotContent() {
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
var
|
|
30
|
-
return
|
|
25
|
+
const r = this.shadowRoot && this.shadowRoot.querySelector("slot");
|
|
26
|
+
if (!r) return !1;
|
|
27
|
+
const t = r.assignedNodes({ flatten: !0 });
|
|
28
|
+
return t.length > 0 && t.some((i) => {
|
|
29
|
+
var e;
|
|
30
|
+
return i.nodeType === Node.TEXT_NODE ? (e = i.textContent) == null ? void 0 : e.trim() : !0;
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
l.styles = d`
|
|
35
35
|
:host {
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
@@ -60,24 +60,24 @@ i.styles = d`
|
|
|
60
60
|
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
61
61
|
}
|
|
62
62
|
.content.links ::slotted(*) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
margin-top: var(--spacing-3);
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: var(--spacing-3);
|
|
67
|
+
}
|
|
68
68
|
`;
|
|
69
69
|
n([
|
|
70
|
-
c({ type: String })
|
|
71
|
-
],
|
|
70
|
+
c({ type: String, attribute: "title" })
|
|
71
|
+
], l.prototype, "title", 2);
|
|
72
72
|
n([
|
|
73
|
-
c({ type: String, attribute: "
|
|
74
|
-
],
|
|
73
|
+
c({ type: String, attribute: "subtitle" })
|
|
74
|
+
], l.prototype, "subtitle", 2);
|
|
75
75
|
n([
|
|
76
76
|
c({ type: String, attribute: "supporting-text" })
|
|
77
|
-
],
|
|
78
|
-
|
|
77
|
+
], l.prototype, "supportingText", 2);
|
|
78
|
+
l = n([
|
|
79
79
|
g("scb-fact-card-content")
|
|
80
|
-
],
|
|
80
|
+
], l);
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
l as ScbFactCardContent
|
|
83
83
|
};
|
|
@@ -8,8 +8,8 @@ export declare class ScbFactCard extends LitElement {
|
|
|
8
8
|
private static __maybeRemoveDocListener;
|
|
9
9
|
private __onCloseClick;
|
|
10
10
|
variant: 'filled' | 'outlined';
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
title: string;
|
|
12
|
+
subtitle: string;
|
|
13
13
|
supportingText: string;
|
|
14
14
|
icon: string;
|
|
15
15
|
showCloseButton: boolean;
|
|
@@ -12,7 +12,7 @@ let t = class extends p {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments), this.__onCloseClick = (e) => {
|
|
14
14
|
e.stopPropagation(), this.__setOpen(!1);
|
|
15
|
-
}, this.variant = "filled", this.
|
|
15
|
+
}, this.variant = "filled", this.title = "", this.subtitle = "", this.supportingText = "", this.icon = "", this.showCloseButton = !1, this.open = !0, this.__lastTriggerEl = null, this.sizing = "stretch", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "";
|
|
16
16
|
}
|
|
17
17
|
static __handleDocClick(e) {
|
|
18
18
|
const s = e.composedPath();
|
|
@@ -201,11 +201,11 @@ i([
|
|
|
201
201
|
n({ type: String })
|
|
202
202
|
], t.prototype, "variant", 2);
|
|
203
203
|
i([
|
|
204
|
-
n({ type: String })
|
|
205
|
-
], t.prototype, "
|
|
204
|
+
n({ type: String, attribute: "title" })
|
|
205
|
+
], t.prototype, "title", 2);
|
|
206
206
|
i([
|
|
207
|
-
n({ type: String, attribute: "
|
|
208
|
-
], t.prototype, "
|
|
207
|
+
n({ type: String, attribute: "subtitle" })
|
|
208
|
+
], t.prototype, "subtitle", 2);
|
|
209
209
|
i([
|
|
210
210
|
n({ type: String, attribute: "supporting-text" })
|
|
211
211
|
], t.prototype, "supportingText", 2);
|
package/scb-grid/scb-stack.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { css as y, LitElement as
|
|
1
|
+
import { css as y, LitElement as d, html as g } from "lit";
|
|
2
2
|
import { property as i, customElement as b } from "lit/decorators.js";
|
|
3
|
-
var
|
|
3
|
+
var v = Object.defineProperty, m = Object.getOwnPropertyDescriptor, u = (e) => {
|
|
4
4
|
throw TypeError(e);
|
|
5
5
|
}, n = (e, t, s, c) => {
|
|
6
|
-
for (var r = c > 1 ? void 0 : c ?
|
|
6
|
+
for (var r = c > 1 ? void 0 : c ? m(t, s) : t, o = e.length - 1, l; o >= 0; o--)
|
|
7
7
|
(l = e[o]) && (r = (c ? l(t, s, r) : l(r)) || r);
|
|
8
|
-
return c && r &&
|
|
8
|
+
return c && r && v(t, s, r), r;
|
|
9
9
|
}, k = (e, t, s) => t.has(e) || u("Cannot " + s), w = (e, t, s) => t.has(e) ? u("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), f = (e, t, s) => (k(e, t, "access private method"), s), p, h;
|
|
10
|
-
let a = class extends
|
|
10
|
+
let a = class extends d {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), w(this, p), this.direction = "column", this.gap = "", this.rowGap = "", this.columnGap = "", this.align = "stretch", this.justify = "start", this.wrap = !1, this.inline = !1;
|
|
13
13
|
}
|
|
@@ -32,7 +32,7 @@ let a = class extends g {
|
|
|
32
32
|
return { row: this.mapSpacingToken(t[0]), col: this.mapSpacingToken(t[1]) };
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return
|
|
35
|
+
return g`<div class="base"><slot></slot></div>`;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
p = /* @__PURE__ */ new WeakSet();
|
|
@@ -59,6 +59,14 @@ h = function() {
|
|
|
59
59
|
a.styles = y`
|
|
60
60
|
:host {
|
|
61
61
|
box-sizing: border-box;
|
|
62
|
+
display: block;
|
|
63
|
+
width: auto;
|
|
64
|
+
max-width: 100%;
|
|
65
|
+
min-inline-size: 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Inre flexlayout så att gap även fungerar för slottat innehåll */
|
|
69
|
+
.base {
|
|
62
70
|
display: var(--scb-stack-display, flex);
|
|
63
71
|
flex-direction: var(--scb-stack-direction, column);
|
|
64
72
|
|
|
@@ -69,14 +77,14 @@ a.styles = y`
|
|
|
69
77
|
align-items: var(--scb-stack-align, stretch);
|
|
70
78
|
justify-content: var(--scb-stack-justify, flex-start);
|
|
71
79
|
flex-wrap: var(--scb-stack-wrap, nowrap);
|
|
72
|
-
|
|
73
|
-
width: auto;
|
|
74
|
-
max-width: 100%;
|
|
75
|
-
min-inline-size: 0;
|
|
76
80
|
}
|
|
77
|
-
:host([inline]) { --scb-stack-display: inline-flex; }
|
|
78
81
|
|
|
79
|
-
/*
|
|
82
|
+
/* Gör att slotens tilldelade noder blir barn till .base */
|
|
83
|
+
slot { display: contents; }
|
|
84
|
+
|
|
85
|
+
:host([inline]) .base { --scb-stack-display: inline-flex; }
|
|
86
|
+
|
|
87
|
+
/* Barnens flex-beteende i row-läge kan styras via variabeln och defaultar till att inte ta full bredd */
|
|
80
88
|
:host([direction="row"]) ::slotted(*) {
|
|
81
89
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
82
90
|
}
|
|
@@ -10,7 +10,7 @@ var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, t = (e, r, n
|
|
|
10
10
|
};
|
|
11
11
|
let i = class extends u {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.keyfigure = 0, this.
|
|
13
|
+
super(...arguments), this.keyfigure = 0, this.subtitle = "", this.supportingText = "", this.cardHref = "", this.icon = "", this.size = "standard", this.unit = "", this.width = "", this.maxWidth = "", this.height = "", this.maxHeight = "", this.sizing = "stretch", this.__onKeyDown = (e) => {
|
|
14
14
|
(e.key === "Enter" || e.key === " ") && this.cardHref && (e.preventDefault(), window.location.href = this.cardHref);
|
|
15
15
|
}, this.__handleHrefNavigation = (e) => {
|
|
16
16
|
this.cardHref && (e.target.closest("a") || (window.location.href = this.cardHref));
|
|
@@ -29,7 +29,7 @@ let i = class extends u {
|
|
|
29
29
|
class="scb-keyfigure-card ${e ? "clickable" : ""} ${this.size}"
|
|
30
30
|
role=${e ? "link" : "group"}
|
|
31
31
|
tabindex=${e ? "0" : "-1"}
|
|
32
|
-
aria-label=${this.
|
|
32
|
+
aria-label=${this.subtitle || o}
|
|
33
33
|
@click=${e ? this.__handleHrefNavigation : null}
|
|
34
34
|
@keydown=${e ? this.__onKeyDown : null}
|
|
35
35
|
style="cursor:${e ? "pointer" : "default"};"
|
|
@@ -46,9 +46,9 @@ let i = class extends u {
|
|
|
46
46
|
</div>
|
|
47
47
|
` : ""}
|
|
48
48
|
|
|
49
|
-
${this.
|
|
49
|
+
${this.subtitle ? a`
|
|
50
50
|
<div class="sub-label">
|
|
51
|
-
${e ? a`<a href="${this.cardHref}" tabindex="-1">${this.
|
|
51
|
+
${e ? a`<a href="${this.cardHref}" tabindex="-1">${this.subtitle}</a>` : this.subtitle}
|
|
52
52
|
</div>
|
|
53
53
|
` : ""}
|
|
54
54
|
|
|
@@ -179,8 +179,8 @@ t([
|
|
|
179
179
|
s({ attribute: "keyfigure" })
|
|
180
180
|
], i.prototype, "keyfigure", 2);
|
|
181
181
|
t([
|
|
182
|
-
s({ type: String, attribute: "
|
|
183
|
-
], i.prototype, "
|
|
182
|
+
s({ type: String, attribute: "subtitle" })
|
|
183
|
+
], i.prototype, "subtitle", 2);
|
|
184
184
|
t([
|
|
185
185
|
s({ type: String, attribute: "supporting-text" })
|
|
186
186
|
], i.prototype, "supportingText", 2);
|
package/scb-wc-test.bundle.js
CHANGED
|
@@ -3234,7 +3234,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3234
3234
|
overflow: visible;
|
|
3235
3235
|
text-overflow: clip;
|
|
3236
3236
|
}
|
|
3237
|
-
`,H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),H([l({type:String})],a.ScbCalendarCard.prototype,"title",2),H([l({type:String})],a.ScbCalendarCard.prototype,"subtitle",2),H([l({type:String,attribute:"supporting-text"})],a.ScbCalendarCard.prototype,"supportingText",2),H([l({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),H([l({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),H([l({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),H([l({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),H([l({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),H([l({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),H([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),H([l({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),H([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),H([l({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),a.ScbCalendarCard=H([g("scb-calendar-card")],a.ScbCalendarCard);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,E=(o,e,t,r)=>{for(var i=r>1?void 0:r?ad(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&od(e,t,i),i};a.ScbCard=class extends y{constructor(){super(...arguments),this.type="",this.variant="",this.direction="",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.title="",this.
|
|
3237
|
+
`,H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"variant",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"direction",2),H([l({type:String})],a.ScbCalendarCard.prototype,"title",2),H([l({type:String})],a.ScbCalendarCard.prototype,"subtitle",2),H([l({type:String,attribute:"supporting-text"})],a.ScbCalendarCard.prototype,"supportingText",2),H([l({type:String,attribute:"card-href"})],a.ScbCalendarCard.prototype,"cardHref",2),H([l({type:String,attribute:"card-href-nav"})],a.ScbCalendarCard.prototype,"cardHrefNav",2),H([l({type:Boolean,reflect:!0,attribute:"show-media"})],a.ScbCalendarCard.prototype,"showMedia",2),H([l({type:String,attribute:"media-width"})],a.ScbCalendarCard.prototype,"mediaWidth",2),H([l({type:String,attribute:"media-height"})],a.ScbCalendarCard.prototype,"mediaHeight",2),H([l({type:String,attribute:"media-aspect"})],a.ScbCalendarCard.prototype,"mediaAspect",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"width",2),H([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCalendarCard.prototype,"maxWidth",2),H([l({type:String,attribute:"min-width"})],a.ScbCalendarCard.prototype,"minWidth",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"height",2),H([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCalendarCard.prototype,"maxHeight",2),H([l({type:String,attribute:"min-height"})],a.ScbCalendarCard.prototype,"minHeight",2),H([l({type:String,reflect:!0})],a.ScbCalendarCard.prototype,"sizing",2),a.ScbCalendarCard=H([g("scb-calendar-card")],a.ScbCalendarCard);var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,E=(o,e,t,r)=>{for(var i=r>1?void 0:r?ad(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&od(e,t,i),i};a.ScbCard=class extends y{constructor(){super(...arguments),this.type="",this.variant="",this.direction="",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.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.comments=0,this.likesText="",this.likes=0,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.__onImgLoad=e=>{const t=e.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||window.open(this.cardHref,"_self"))}}__calcAspectWH(e){const t=(e||"").trim();if(!t)return{w:640,h:360};const r=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(r&&r.length===2){const s=Number(r[0]),n=Number(r[1]);if(s>0&&n>0)return{w:s,h:n}}const i=Number(t);return isFinite(i)&&i>0?{w:1e3,h:Math.round(1e3/i)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return c`
|
|
3238
3238
|
<div class="media">
|
|
3239
3239
|
<slot name="media">
|
|
3240
3240
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
@@ -3277,7 +3277,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3277
3277
|
<div class="full-content">
|
|
3278
3278
|
<div class="top-content">
|
|
3279
3279
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3280
|
-
${this.
|
|
3280
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3281
3281
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3282
3282
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3283
3283
|
</div>
|
|
@@ -3286,7 +3286,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3286
3286
|
<div class="full-content">
|
|
3287
3287
|
<div class="top-content">
|
|
3288
3288
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3289
|
-
${this.
|
|
3289
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3290
3290
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3291
3291
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3292
3292
|
</div>
|
|
@@ -3298,7 +3298,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3298
3298
|
<div class="full-content">
|
|
3299
3299
|
<div class="top-content">
|
|
3300
3300
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3301
|
-
${this.
|
|
3301
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3302
3302
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3303
3303
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3304
3304
|
</div>
|
|
@@ -3313,7 +3313,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3313
3313
|
<div class="full-content">
|
|
3314
3314
|
<div class="top-content">
|
|
3315
3315
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3316
|
-
${this.
|
|
3316
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3317
3317
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3318
3318
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3319
3319
|
</div>
|
|
@@ -3325,7 +3325,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3325
3325
|
<div class="full-content">
|
|
3326
3326
|
<div class="top-content">
|
|
3327
3327
|
${this.title?c`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
3328
|
-
${this.
|
|
3328
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3329
3329
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3330
3330
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3331
3331
|
</div>
|
|
@@ -3337,7 +3337,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3337
3337
|
<div class="full-content">
|
|
3338
3338
|
<div class="top-content">
|
|
3339
3339
|
${this.title?c`<div class="header">${s(!!this.cardHref)}</div>`:""}
|
|
3340
|
-
${this.
|
|
3340
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
3341
3341
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
3342
3342
|
${i?c`<div class="date">${i}</div>`:""}
|
|
3343
3343
|
</div>
|
|
@@ -3589,7 +3589,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
3589
3589
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
3590
3590
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
3591
3591
|
}
|
|
3592
|
-
`,E([l({type:String})],a.ScbCard.prototype,"type",2),E([l({type:String})],a.ScbCard.prototype,"variant",2),E([l({type:String})],a.ScbCard.prototype,"direction",2),E([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([l({type:String,attribute:"card-href"})],a.ScbCard.prototype,"cardHref",2),E([l({type:String})],a.ScbCard.prototype,"title",2),E([l({type:String
|
|
3592
|
+
`,E([l({type:String})],a.ScbCard.prototype,"type",2),E([l({type:String})],a.ScbCard.prototype,"variant",2),E([l({type:String})],a.ScbCard.prototype,"direction",2),E([l({type:String,attribute:"media-type"})],a.ScbCard.prototype,"mediaType",2),E([l({type:String,attribute:"media-href"})],a.ScbCard.prototype,"mediaHref",2),E([l({type:String,attribute:"media-alt"})],a.ScbCard.prototype,"mediaAlt",2),E([l({type:String,attribute:"media-srcset"})],a.ScbCard.prototype,"mediaSrcset",2),E([l({type:String,attribute:"media-sizes"})],a.ScbCard.prototype,"mediaSizes",2),E([l({type:String,attribute:"media-loading"})],a.ScbCard.prototype,"mediaLoading",2),E([l({type:String,attribute:"media-decoding"})],a.ScbCard.prototype,"mediaDecoding",2),E([l({type:String,attribute:"media-fetchpriority"})],a.ScbCard.prototype,"mediaFetchPriority",2),E([l({type:String,attribute:"media-fit"})],a.ScbCard.prototype,"mediaFit",2),E([l({type:String,attribute:"media-position"})],a.ScbCard.prototype,"mediaPosition",2),E([l({type:String,attribute:"media-width"})],a.ScbCard.prototype,"mediaWidth",2),E([l({type:String,attribute:"media-height"})],a.ScbCard.prototype,"mediaHeight",2),E([l({type:String,attribute:"media-aspect"})],a.ScbCard.prototype,"mediaAspect",2),E([l({type:Boolean,attribute:"media-placeholder"})],a.ScbCard.prototype,"mediaPlaceholder",2),E([l({type:String,attribute:"card-href"})],a.ScbCard.prototype,"cardHref",2),E([l({type:String})],a.ScbCard.prototype,"title",2),E([l({type:String})],a.ScbCard.prototype,"subtitle",2),E([l({type:String,attribute:"supporting-text"})],a.ScbCard.prototype,"supportingText",2),E([l({type:Date,reflect:!0})],a.ScbCard.prototype,"date",2),E([l({type:String,attribute:"social-comments-text"})],a.ScbCard.prototype,"commentsText",2),E([l({type:Number,attribute:"social-comments",reflect:!0})],a.ScbCard.prototype,"comments",2),E([l({type:String,attribute:"social-likes-text"})],a.ScbCard.prototype,"likesText",2),E([l({type:Number,attribute:"social-likes",reflect:!0})],a.ScbCard.prototype,"likes",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"sizing",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"width",2),E([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbCard.prototype,"maxWidth",2),E([l({type:String,reflect:!0})],a.ScbCard.prototype,"height",2),E([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbCard.prototype,"maxHeight",2),a.ScbCard=E([g("scb-card")],a.ScbCard);var sd=Object.defineProperty,nd=Object.getOwnPropertyDescriptor,rs=o=>{throw TypeError(o)},oi=(o,e,t,r)=>{for(var i=r>1?void 0:r?nd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&sd(e,t,i),i},ld=(o,e,t)=>e.has(o)||rs("Cannot "+t),xo=(o,e,t)=>(ld(o,e,"read from private field"),t?t.call(o):e.get(o)),cd=(o,e,t)=>e.has(o)?rs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),er;a.ScbCheckboxGroup=class extends y{constructor(){super(...arguments),this.orientation="vertical",this.disabled=!1,this.spacing="group",cd(this,er,()=>{var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");if(!e)return;const t=e.assignedElements({flatten:!0}).filter(i=>i.tagName.toLowerCase()==="scb-checkbox");for(const i of t)this.disabled?i.setAttribute("disabled",""):i.removeAttribute("disabled"),this.orientation==="horizontal"?i.setAttribute("orientation","horizontal"):i.removeAttribute("orientation"),this.spacing==="group"?i.style.setProperty("--scb-checkbox-gap","0"):i.style.removeProperty("--scb-checkbox-gap")})}render(){const e=this.orientation==="horizontal"?"row":"column";return c`
|
|
3593
3593
|
<div class="g" role="group" aria-disabled=${String(this.disabled)} style=${`--_dir:${e}`}>
|
|
3594
3594
|
<slot @slotchange=${xo(this,er)}></slot>
|
|
3595
3595
|
</div>
|
|
@@ -4248,12 +4248,12 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
4248
4248
|
display: block;
|
|
4249
4249
|
width: 100%;
|
|
4250
4250
|
}
|
|
4251
|
-
`,as([l({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=as([g("scb-sub-drawer")],a.ScbSubDrawer);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbSubDrawer(){return a.ScbSubDrawer}},Symbol.toStringTag,{value:"Module"}));var Td=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,ai=(o,e,t,r)=>{for(var i=r>1?void 0:r?Od(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Td(e,t,i),i};a.ScbFactCardContent=class extends y{constructor(){super(...arguments),this.
|
|
4252
|
-
${this.
|
|
4251
|
+
`,as([l({type:String})],a.ScbSubDrawer.prototype,"label",2),a.ScbSubDrawer=as([g("scb-sub-drawer")],a.ScbSubDrawer);const zd=Object.freeze(Object.defineProperty({__proto__:null,get ScbSubDrawer(){return a.ScbSubDrawer}},Symbol.toStringTag,{value:"Module"}));var Td=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,ai=(o,e,t,r)=>{for(var i=r>1?void 0:r?Od(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Td(e,t,i),i};a.ScbFactCardContent=class extends y{constructor(){super(...arguments),this.title="",this.subtitle="",this.supportingText=""}render(){return c`
|
|
4252
|
+
${this.title?c`
|
|
4253
4253
|
<div class="label">
|
|
4254
|
-
${this.
|
|
4254
|
+
${this.title}
|
|
4255
4255
|
</div>`:""}
|
|
4256
|
-
${this.
|
|
4256
|
+
${this.subtitle?c`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
4257
4257
|
${this.supportingText?c`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
4258
4258
|
<slot @slotchange=${this.requestUpdate}></slot>
|
|
4259
4259
|
${this._hasSlotContent()?c`<div class="content links"><slot></slot></div>`:""}
|
|
@@ -4286,12 +4286,12 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
4286
4286
|
letter-spacing: var(--md-sys-typescale-body-large-tracking);
|
|
4287
4287
|
}
|
|
4288
4288
|
.content.links ::slotted(*) {
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
`,ai([l({type:String})],a.ScbFactCardContent.prototype,"
|
|
4289
|
+
margin-top: var(--spacing-3);
|
|
4290
|
+
display: flex;
|
|
4291
|
+
flex-direction: column;
|
|
4292
|
+
gap: var(--spacing-3);
|
|
4293
|
+
}
|
|
4294
|
+
`,ai([l({type:String,attribute:"title"})],a.ScbFactCardContent.prototype,"title",2),ai([l({type:String,attribute:"subtitle"})],a.ScbFactCardContent.prototype,"subtitle",2),ai([l({type:String,attribute:"supporting-text"})],a.ScbFactCardContent.prototype,"supportingText",2),a.ScbFactCardContent=ai([g("scb-fact-card-content")],a.ScbFactCardContent);var Pd=Object.defineProperty,Ld=Object.getOwnPropertyDescriptor,te=(o,e,t,r)=>{for(var i=r>1?void 0:r?Ld(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Pd(e,t,i),i};a.ScbFactCard=class extends y{constructor(){super(...arguments),this.__onCloseClick=e=>{e.stopPropagation(),this.__setOpen(!1)},this.variant="filled",this.title="",this.subtitle="",this.supportingText="",this.icon="",this.showCloseButton=!1,this.open=!0,this.__lastTriggerEl=null,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight=""}static __handleDocClick(e){const t=e.composedPath();for(const r of t){if(!(r instanceof Element))continue;const i=r.getAttribute("data-fact-card-toggle")||r.getAttribute("aria-controls");if(!i)continue;const s=a.ScbFactCard.__instances.get(i);if(!s){a.ScbFactCard.__instances.delete(i);continue}s.__lastTriggerEl=r,s.__setOpen(!s.open),e.stopPropagation();break}}static __ensureDocListener(){a.ScbFactCard.__docListenerAttached||(document.addEventListener("click",a.ScbFactCard.__handleDocClick,!0),a.ScbFactCard.__docListenerAttached=!0)}static __maybeRemoveDocListener(){a.ScbFactCard.__docListenerAttached&&a.ScbFactCard.__instances.size===0&&(document.removeEventListener("click",a.ScbFactCard.__handleDocClick,!0),a.ScbFactCard.__docListenerAttached=!1)}connectedCallback(){super.connectedCallback(),this.id&&a.ScbFactCard.__instances.set(this.id,this),a.ScbFactCard.__ensureDocListener()}disconnectedCallback(){this.id&&a.ScbFactCard.__instances.delete(this.id),a.ScbFactCard.__maybeRemoveDocListener(),super.disconnectedCallback()}updated(e){e.has("open")&&this.__updateTriggersExpanded(),e.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),e.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),e.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),e.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size"))}__updateTriggersExpanded(){this.id&&document.querySelectorAll(`[aria-controls="${this.id}"], [data-fact-card-toggle="${this.id}"]`).forEach(e=>{e.hasAttribute("aria-controls")&&e.setAttribute("aria-expanded",String(this.open))})}__setOpen(e){const t=this.open;this.open=e,e&&!t?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):!e&&t&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}render(){if(!this.open)return c``;const e=this.variant==="outlined"?"outlined":"filled",t=!!this.icon;return c`
|
|
4295
4295
|
<div class="outer ${t?"has-icon":""}">
|
|
4296
4296
|
${t?c`<div class="icon-wrapper ${e}"><md-icon>${this.icon}</md-icon></div>`:""}
|
|
4297
4297
|
<div class="scb-fact-card ${e} ${this.showCloseButton?"has-close":""}">
|
|
@@ -4422,7 +4422,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
4422
4422
|
overflow-wrap: normal;
|
|
4423
4423
|
hyphens: auto;
|
|
4424
4424
|
}
|
|
4425
|
-
`,te([l({type:String})],a.ScbFactCard.prototype,"variant",2),te([l({type:String})],a.ScbFactCard.prototype,"
|
|
4425
|
+
`,te([l({type:String})],a.ScbFactCard.prototype,"variant",2),te([l({type:String,attribute:"title"})],a.ScbFactCard.prototype,"title",2),te([l({type:String,attribute:"subtitle"})],a.ScbFactCard.prototype,"subtitle",2),te([l({type:String,attribute:"supporting-text"})],a.ScbFactCard.prototype,"supportingText",2),te([l({type:String})],a.ScbFactCard.prototype,"icon",2),te([l({type:Boolean,attribute:"show-close-button"})],a.ScbFactCard.prototype,"showCloseButton",2),te([l({type:Boolean,reflect:!0})],a.ScbFactCard.prototype,"open",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"sizing",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"width",2),te([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbFactCard.prototype,"maxWidth",2),te([l({type:String,reflect:!0})],a.ScbFactCard.prototype,"height",2),te([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbFactCard.prototype,"maxHeight",2),a.ScbFactCard=te([g("scb-fact-card")],a.ScbFactCard);var Dd=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,ss=(o,e,t,r)=>{for(var i=r>1?void 0:r?Rd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Dd(e,t,i),i};a.ScbFooterSection=class extends y{constructor(){super(...arguments),this.title=""}render(){return c`<slot></slot>`}},a.ScbFooterSection.styles=b`
|
|
4426
4426
|
:host { display: none; }
|
|
4427
4427
|
`,ss([l({type:String,reflect:!0})],a.ScbFooterSection.prototype,"title",2),a.ScbFooterSection=ss([g("scb-footer-section")],a.ScbFooterSection);var Bd=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,ns=o=>{throw TypeError(o)},re=(o,e,t,r)=>{for(var i=r>1?void 0:r?Md(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Bd(e,t,i),i},Fd=(o,e,t)=>e.has(o)||ns("Cannot "+t),Hd=(o,e,t)=>e.has(o)?ns("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),wt=(o,e,t)=>(Fd(o,e,"access private method"),t),qe,wo,tr;a.ScbGrid=class extends y{constructor(){super(...arguments),Hd(this,qe),this.colsCompact=4,this.colsMedium=8,this.colsExpanded=12,this.gap="",this.rowGap="",this.columnGap="",this.alignItems="stretch",this.justifyItems="stretch",this.paddingInline="",this.paddingBlock="",this.maxWidth="",this.autoRows=""}firstUpdated(){wt(this,qe,wo).call(this)}updated(){wt(this,qe,wo).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const r=this.mapSpacingToken(t[0]);return{row:r,col:r}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return c`<div class="grid"><slot></slot></div>`}},qe=new WeakSet,wo=function(){this.style.setProperty("--scb-grid-cols-compact",String(this.colsCompact)),this.style.setProperty("--scb-grid-cols-medium",String(this.colsMedium)),this.style.setProperty("--scb-grid-cols-expanded",String(this.colsExpanded));const o="var(--spacing-7, 24px)",e=this.parseGapShorthand(this.gap),t=this.mapSpacingToken(this.rowGap)??e.row??o,r=this.mapSpacingToken(this.columnGap)??e.col??o;this.style.setProperty("--scb-grid-row-gap",t),this.style.setProperty("--scb-grid-column-gap",r),this.style.setProperty("--scb-grid-gap",`${t} ${r}`),this.style.setProperty("--scb-grid-align-items",this.alignItems),this.style.setProperty("--scb-grid-justify-items",this.justifyItems);const i=this.mapSpacingToken(this.paddingInline),s=this.mapSpacingToken(this.paddingBlock);wt(this,qe,tr).call(this,"--scb-grid-max-width",this.maxWidth),wt(this,qe,tr).call(this,"--scb-grid-padding-inline",i??""),wt(this,qe,tr).call(this,"--scb-grid-padding-block",s??""),wt(this,qe,tr).call(this,"--scb-grid-auto-rows",this.autoRows)},tr=function(o,e){e?this.style.setProperty(o,e):this.style.removeProperty(o)},a.ScbGrid.styles=b`
|
|
4428
4428
|
:host {
|
|
@@ -4738,9 +4738,17 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
4738
4738
|
|
|
4739
4739
|
.spacer { display: none; }
|
|
4740
4740
|
@media (min-width: 840px) { .spacer { display: block; } }
|
|
4741
|
-
`,rr([l({type:String,attribute:"max-width",reflect:!0,converter:{fromAttribute:o=>{if(o==null)return"1440px";const e=o.trim();return e===""?"1440px":/^\d+$/.test(e)?`${e}px`:e}}})],a.ScbFooter.prototype,"maxWidth",2),rr([l({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),rr([l({type:Array})],a.ScbFooter.prototype,"sections",2),rr([l({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=rr([g("scb-footer")],a.ScbFooter);var Gd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,vs=o=>{throw TypeError(o)},Oe=(o,e,t,r)=>{for(var i=r>1?void 0:r?Kd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Gd(e,t,i),i},Yd=(o,e,t)=>e.has(o)||vs("Cannot "+t),Xd=(o,e,t)=>e.has(o)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ms=(o,e,t)=>(Yd(o,e,"access private method"),t),si,Io;a.ScbStack=class extends y{constructor(){super(...arguments),Xd(this,si),this.direction="column",this.gap="",this.rowGap="",this.columnGap="",this.align="stretch",this.justify="start",this.wrap=!1,this.inline=!1}firstUpdated(){ms(this,si,Io).call(this)}updated(){ms(this,si,Io).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const r=this.mapSpacingToken(t[0]);return{row:r,col:r}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return c`<slot></slot>`}},si=new WeakSet,Io=function(){this.style.setProperty("--scb-stack-direction",this.direction);const o="var(--spacing-5, 16px)",e=this.parseGapShorthand(this.gap),t=this.mapSpacingToken(this.rowGap)??e.row??o,r=this.mapSpacingToken(this.columnGap)??e.col??o;this.style.setProperty("--scb-stack-gap",`${t}`),this.style.setProperty("--scb-stack-row-gap",t),this.style.setProperty("--scb-stack-column-gap",r);const i={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},s={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};this.style.setProperty("--scb-stack-align",i[this.align]??"stretch"),this.style.setProperty("--scb-stack-justify",s[this.justify]??"flex-start"),this.style.setProperty("--scb-stack-wrap",this.wrap?"wrap":"nowrap")},a.ScbStack.styles=b`
|
|
4741
|
+
`,rr([l({type:String,attribute:"max-width",reflect:!0,converter:{fromAttribute:o=>{if(o==null)return"1440px";const e=o.trim();return e===""?"1440px":/^\d+$/.test(e)?`${e}px`:e}}})],a.ScbFooter.prototype,"maxWidth",2),rr([l({type:Boolean,reflect:!0,attribute:"defer-paint"})],a.ScbFooter.prototype,"deferPaint",2),rr([l({type:Array})],a.ScbFooter.prototype,"sections",2),rr([l({type:String})],a.ScbFooter.prototype,"description",2),a.ScbFooter=rr([g("scb-footer")],a.ScbFooter);var Gd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,vs=o=>{throw TypeError(o)},Oe=(o,e,t,r)=>{for(var i=r>1?void 0:r?Kd(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&Gd(e,t,i),i},Yd=(o,e,t)=>e.has(o)||vs("Cannot "+t),Xd=(o,e,t)=>e.has(o)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),ms=(o,e,t)=>(Yd(o,e,"access private method"),t),si,Io;a.ScbStack=class extends y{constructor(){super(...arguments),Xd(this,si),this.direction="column",this.gap="",this.rowGap="",this.columnGap="",this.align="stretch",this.justify="start",this.wrap=!1,this.inline=!1}firstUpdated(){ms(this,si,Io).call(this)}updated(){ms(this,si,Io).call(this)}mapSpacingToken(e){if(!e)return;const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}parseGapShorthand(e){if(!e)return{};const t=e.trim().split(/\s+/);if(t.length===1){const r=this.mapSpacingToken(t[0]);return{row:r,col:r}}return{row:this.mapSpacingToken(t[0]),col:this.mapSpacingToken(t[1])}}render(){return c`<div class="base"><slot></slot></div>`}},si=new WeakSet,Io=function(){this.style.setProperty("--scb-stack-direction",this.direction);const o="var(--spacing-5, 16px)",e=this.parseGapShorthand(this.gap),t=this.mapSpacingToken(this.rowGap)??e.row??o,r=this.mapSpacingToken(this.columnGap)??e.col??o;this.style.setProperty("--scb-stack-gap",`${t}`),this.style.setProperty("--scb-stack-row-gap",t),this.style.setProperty("--scb-stack-column-gap",r);const i={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},s={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};this.style.setProperty("--scb-stack-align",i[this.align]??"stretch"),this.style.setProperty("--scb-stack-justify",s[this.justify]??"flex-start"),this.style.setProperty("--scb-stack-wrap",this.wrap?"wrap":"nowrap")},a.ScbStack.styles=b`
|
|
4742
4742
|
:host {
|
|
4743
4743
|
box-sizing: border-box;
|
|
4744
|
+
display: block;
|
|
4745
|
+
width: auto;
|
|
4746
|
+
max-width: 100%;
|
|
4747
|
+
min-inline-size: 0;
|
|
4748
|
+
}
|
|
4749
|
+
|
|
4750
|
+
/* Inre flexlayout så att gap även fungerar för slottat innehåll */
|
|
4751
|
+
.base {
|
|
4744
4752
|
display: var(--scb-stack-display, flex);
|
|
4745
4753
|
flex-direction: var(--scb-stack-direction, column);
|
|
4746
4754
|
|
|
@@ -4751,14 +4759,14 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
4751
4759
|
align-items: var(--scb-stack-align, stretch);
|
|
4752
4760
|
justify-content: var(--scb-stack-justify, flex-start);
|
|
4753
4761
|
flex-wrap: var(--scb-stack-wrap, nowrap);
|
|
4754
|
-
|
|
4755
|
-
width: auto;
|
|
4756
|
-
max-width: 100%;
|
|
4757
|
-
min-inline-size: 0;
|
|
4758
4762
|
}
|
|
4759
|
-
:host([inline]) { --scb-stack-display: inline-flex; }
|
|
4760
4763
|
|
|
4761
|
-
/*
|
|
4764
|
+
/* Gör att slotens tilldelade noder blir barn till .base */
|
|
4765
|
+
slot { display: contents; }
|
|
4766
|
+
|
|
4767
|
+
:host([inline]) .base { --scb-stack-display: inline-flex; }
|
|
4768
|
+
|
|
4769
|
+
/* Barnens flex-beteende i row-läge kan styras via variabeln och defaultar till att inte ta full bredd */
|
|
4762
4770
|
:host([direction="row"]) ::slotted(*) {
|
|
4763
4771
|
flex: var(--scb-stack-item-flex, 0 0 auto);
|
|
4764
4772
|
}
|
|
@@ -5161,12 +5169,12 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5161
5169
|
gap: var(--spacing-5);
|
|
5162
5170
|
}
|
|
5163
5171
|
|
|
5164
|
-
`,Ct([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),Ct([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),Ct([l({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),Ct([l({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),Ct([l({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),a.ScbHorizontalScroller=Ct([g("scb-horizontal-scroller")],a.ScbHorizontalScroller);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,ie=(o,e,t,r)=>{for(var i=r>1?void 0:r?dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&ch(e,t,i),i};a.ScbKeyFigureCard=class extends y{constructor(){super(...arguments),this.keyfigure=0,this.
|
|
5172
|
+
`,Ct([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"variant",2),Ct([l({type:String,reflect:!0})],a.ScbHorizontalScroller.prototype,"width",2),Ct([l({type:Boolean,reflect:!0,attribute:"show-scrollbar"})],a.ScbHorizontalScroller.prototype,"showScrollbar",2),Ct([l({type:String,reflect:!0,attribute:"right-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"rightScrollButtonLabel",2),Ct([l({type:String,reflect:!0,attribute:"left-scroll-button-label"})],a.ScbHorizontalScroller.prototype,"leftScrollButtonLabel",2),a.ScbHorizontalScroller=Ct([g("scb-horizontal-scroller")],a.ScbHorizontalScroller);var ch=Object.defineProperty,dh=Object.getOwnPropertyDescriptor,ie=(o,e,t,r)=>{for(var i=r>1?void 0:r?dh(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&ch(e,t,i),i};a.ScbKeyFigureCard=class extends y{constructor(){super(...arguments),this.keyfigure=0,this.subtitle="",this.supportingText="",this.cardHref="",this.icon="",this.size="standard",this.unit="",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.sizing="stretch",this.__onKeyDown=e=>{(e.key==="Enter"||e.key===" ")&&this.cardHref&&(e.preventDefault(),window.location.href=this.cardHref)},this.__handleHrefNavigation=e=>{this.cardHref&&(e.target.closest("a")||(window.location.href=this.cardHref))}}formatNumber(e){if(typeof e=="number")return e.toLocaleString("sv-SE").replace(/\u00A0/g," ");const t=Number(e);return Number.isNaN(t)?String(e):t.toLocaleString("sv-SE").replace(/\u00A0/g," ")}render(){const e=!!this.cardHref,t=this.formatNumber(this.keyfigure),r=(this.unit||"").trim(),i=r?`${t} ${r}`:t;return c`
|
|
5165
5173
|
<div
|
|
5166
5174
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
5167
5175
|
role=${e?"link":"group"}
|
|
5168
5176
|
tabindex=${e?"0":"-1"}
|
|
5169
|
-
aria-label=${this.
|
|
5177
|
+
aria-label=${this.subtitle||i}
|
|
5170
5178
|
@click=${e?this.__handleHrefNavigation:null}
|
|
5171
5179
|
@keydown=${e?this.__onKeyDown:null}
|
|
5172
5180
|
style="cursor:${e?"pointer":"default"};"
|
|
@@ -5183,9 +5191,9 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5183
5191
|
</div>
|
|
5184
5192
|
`:""}
|
|
5185
5193
|
|
|
5186
|
-
${this.
|
|
5194
|
+
${this.subtitle?c`
|
|
5187
5195
|
<div class="sub-label">
|
|
5188
|
-
${e?c`<a href="${this.cardHref}" tabindex="-1">${this.
|
|
5196
|
+
${e?c`<a href="${this.cardHref}" tabindex="-1">${this.subtitle}</a>`:this.subtitle}
|
|
5189
5197
|
</div>
|
|
5190
5198
|
`:""}
|
|
5191
5199
|
|
|
@@ -5297,7 +5305,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5297
5305
|
line-height: var(--md-sys-typescale-display-medium-line-height);
|
|
5298
5306
|
letter-spacing: var(--md-sys-typescale-display-medium-tracking);
|
|
5299
5307
|
}
|
|
5300
|
-
`,ie([l({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),ie([l({type:String,attribute:"
|
|
5308
|
+
`,ie([l({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),ie([l({type:String,attribute:"subtitle"})],a.ScbKeyFigureCard.prototype,"subtitle",2),ie([l({type:String,attribute:"supporting-text"})],a.ScbKeyFigureCard.prototype,"supportingText",2),ie([l({type:String,attribute:"card-href"})],a.ScbKeyFigureCard.prototype,"cardHref",2),ie([l({type:String})],a.ScbKeyFigureCard.prototype,"icon",2),ie([l({type:String})],a.ScbKeyFigureCard.prototype,"size",2),ie([l({type:String})],a.ScbKeyFigureCard.prototype,"unit",2),ie([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"width",2),ie([l({type:String,reflect:!0,attribute:"max-width"})],a.ScbKeyFigureCard.prototype,"maxWidth",2),ie([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"height",2),ie([l({type:String,reflect:!0,attribute:"max-height"})],a.ScbKeyFigureCard.prototype,"maxHeight",2),ie([l({type:String,reflect:!0})],a.ScbKeyFigureCard.prototype,"sizing",2),a.ScbKeyFigureCard=ie([g("scb-keyfigure-card")],a.ScbKeyFigureCard);var hh=Object.defineProperty,ph=Object.getOwnPropertyDescriptor,Ue=(o,e,t,r)=>{for(var i=r>1?void 0:r?ph(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(e,t,i):n(i))||i);return r&&i&&hh(e,t,i),i};a.ScbMenuItem=class extends y{constructor(){super(...arguments),this.label="",this.hasSubMenu=!1,this.openLeft=!1,this.divider=!1,this.leadingIcon="",this.trailingIcon="",this.itemHref="",this.handleClick=e=>{this.itemHref?this._navigateToHref(e):this._toggleSubMenu()},this._onBlur=e=>{const t=this.closest("scb-sub-menu");if(t&&t.open){const r=e.relatedTarget;(!r||!t.contains(r))&&t.dispatchEvent(new CustomEvent("hide-submenu",{bubbles:!0,composed:!0}))}},this._onFocus=()=>{const e=this.nextElementSibling;this.classList.contains("open-submenu")&&(e&&e.tagName==="SCB-SUB-MENU"&&e.hasAttribute("open")||this.classList.remove("open-submenu"))},this._onKeyDown=e=>{var t,r,i,s,n,h;if(e.key==="Enter"||e.key===" "){e.preventDefault(),this.handleClick(e);return}if(e.key==="ArrowDown"){e.preventDefault();let p=this.nextElementSibling;for(;p&&p.tagName!=="SCB-MENU-ITEM";)p=p.nextElementSibling;p&&((r=(t=p.shadowRoot)==null?void 0:t.querySelector("li"))==null||r.focus());return}if(e.key==="ArrowUp"){e.preventDefault();let p=this.previousElementSibling;for(;p&&p.tagName!=="SCB-MENU-ITEM";)p=p.previousElementSibling;p&&((s=(i=p.shadowRoot)==null?void 0:i.querySelector("li"))==null||s.focus());return}if(e.key==="ArrowRight"){e.preventDefault();const p=this.nextElementSibling;p&&p.tagName==="SCB-SUB-MENU"&&(p.hasAttribute("open")||(this._toggleSubMenu(),p.dispatchEvent(new CustomEvent("show-submenu",{bubbles:!0,composed:!0}))),setTimeout(()=>{var f,m;const v=p.querySelector("scb-menu-item");v&&((m=(f=v.shadowRoot)==null?void 0:f.querySelector("li"))==null||m.focus())},0));return}if(e.key==="ArrowLeft"){e.preventDefault();const p=this.nextElementSibling;if(p&&p.tagName==="SCB-SUB-MENU"&&p.hasAttribute("open")){this._toggleSubMenu(),p.dispatchEvent(new CustomEvent("hide-submenu",{bubbles:!0,composed:!0}));return}const v=this.closest("scb-sub-menu");if(v){const f=v.previousElementSibling;f&&f.tagName==="SCB-MENU-ITEM"&&((h=(n=f.shadowRoot)==null?void 0:n.querySelector("li"))==null||h.focus())}return}}}updated(){const e=this.nextElementSibling;this.hasSubMenu=!!(e&&e.tagName==="SCB-SUB-MENU"),this.openLeft=!!(this.hasSubMenu&&e&&e.hasAttribute("open-left"))}render(){return c`
|
|
5301
5309
|
${this.divider?c`<scb-divider></scb-divider>`:""}
|
|
5302
5310
|
<li @click=${this.handleClick} @keydown=${this._onKeyDown} @blur=${this._onBlur} @focus=${this._onFocus} role="menuitem" tabindex="0">
|
|
5303
5311
|
|