scb-wc-test 0.1.66 → 0.1.68
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-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +9 -3
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +30 -27
- 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-keyfigure-card/scb-keyfigure-card.d.ts +1 -1
- package/scb-keyfigure-card/scb-keyfigure-card.js +6 -6
- package/scb-segmented-button/scb-segmented-button.js +62 -44
- package/scb-segmented-button/scb-segmented-item.js +46 -43
- package/scb-wc-test.bundle.js +59 -50
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 {
|
|
@@ -5161,12 +5161,12 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5161
5161
|
gap: var(--spacing-5);
|
|
5162
5162
|
}
|
|
5163
5163
|
|
|
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.
|
|
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.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
5165
|
<div
|
|
5166
5166
|
class="scb-keyfigure-card ${e?"clickable":""} ${this.size}"
|
|
5167
5167
|
role=${e?"link":"group"}
|
|
5168
5168
|
tabindex=${e?"0":"-1"}
|
|
5169
|
-
aria-label=${this.
|
|
5169
|
+
aria-label=${this.subtitle||i}
|
|
5170
5170
|
@click=${e?this.__handleHrefNavigation:null}
|
|
5171
5171
|
@keydown=${e?this.__onKeyDown:null}
|
|
5172
5172
|
style="cursor:${e?"pointer":"default"};"
|
|
@@ -5183,9 +5183,9 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5183
5183
|
</div>
|
|
5184
5184
|
`:""}
|
|
5185
5185
|
|
|
5186
|
-
${this.
|
|
5186
|
+
${this.subtitle?c`
|
|
5187
5187
|
<div class="sub-label">
|
|
5188
|
-
${e?c`<a href="${this.cardHref}" tabindex="-1">${this.
|
|
5188
|
+
${e?c`<a href="${this.cardHref}" tabindex="-1">${this.subtitle}</a>`:this.subtitle}
|
|
5189
5189
|
</div>
|
|
5190
5190
|
`:""}
|
|
5191
5191
|
|
|
@@ -5297,7 +5297,7 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5297
5297
|
line-height: var(--md-sys-typescale-display-medium-line-height);
|
|
5298
5298
|
letter-spacing: var(--md-sys-typescale-display-medium-tracking);
|
|
5299
5299
|
}
|
|
5300
|
-
`,ie([l({attribute:"keyfigure"})],a.ScbKeyFigureCard.prototype,"keyfigure",2),ie([l({type:String,attribute:"
|
|
5300
|
+
`,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
5301
|
${this.divider?c`<scb-divider></scb-divider>`:""}
|
|
5302
5302
|
<li @click=${this.handleClick} @keydown=${this._onKeyDown} @blur=${this._onBlur} @focus=${this._onFocus} role="menuitem" tabindex="0">
|
|
5303
5303
|
|
|
@@ -5918,38 +5918,41 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5918
5918
|
:host([spacing="group"]) ::slotted(scb-radio-button) {
|
|
5919
5919
|
--scb-radio-gap: 0;
|
|
5920
5920
|
}
|
|
5921
|
-
`,Et([l({type:String})],a.ScbRadioGroup.prototype,"name",2),Et([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Et([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Et([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Et([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=Et([g("scb-radio-group")],a.ScbRadioGroup);var Ih=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,At=(o,e,t,r)=>{for(var i=r>1?void 0:r?zh(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&&Ih(e,t,i),i};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var
|
|
5922
|
-
<div class="segmented-item" aria-disabled="${r?"true":"false"}">
|
|
5921
|
+
`,Et([l({type:String})],a.ScbRadioGroup.prototype,"name",2),Et([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"orientation",2),Et([l({type:Boolean,reflect:!0})],a.ScbRadioGroup.prototype,"disabled",2),Et([l({type:String,attribute:"aria-label"})],a.ScbRadioGroup.prototype,"ariaLabel",2),Et([l({type:String,reflect:!0})],a.ScbRadioGroup.prototype,"spacing",2),a.ScbRadioGroup=Et([g("scb-radio-group")],a.ScbRadioGroup);var Ih=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,At=(o,e,t,r)=>{for(var i=r>1?void 0:r?zh(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&&Ih(e,t,i),i};a.ScbSegmentedItem=class extends y{constructor(){super(...arguments),this.label="",this.value="",this.selected=!1,this.icon="",this.disabled=!1}render(){var n;const e=this.parentElement,t=(n=e==null?void 0:e.hasAttribute)==null?void 0:n.call(e,"disabled"),r=this.disabled||t,i=!!this.icon,s=!!this.label;return c`
|
|
5922
|
+
<div class="segmented-item${i||this.selected?" has-icon":""}${s?"":" no-label"}" aria-disabled="${r?"true":"false"}">
|
|
5923
5923
|
<md-ripple ?disabled="${r}"></md-ripple>
|
|
5924
|
-
${this.icon?c`<md-icon>${this.icon}</md-icon>`:""}
|
|
5925
|
-
|
|
5924
|
+
${this.selected?i&&s?c`<md-icon>check</md-icon>`:i?c`<md-icon>check</md-icon><md-icon>${this.icon}</md-icon>`:c`<md-icon>check</md-icon>`:i?c`<md-icon>${this.icon}</md-icon>`:""}
|
|
5925
|
+
${s?c`<span>${this.label}</span>`:""}
|
|
5926
5926
|
<md-focus-ring inward></md-focus-ring>
|
|
5927
5927
|
</div>
|
|
5928
5928
|
`}firstUpdated(){this.setAttribute("tabindex",this.disabled?"-1":"0"),this.setAttribute("role","button")}},a.ScbSegmentedItem.styles=b`
|
|
5929
5929
|
.segmented-item {
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5930
|
+
display: flex;
|
|
5931
|
+
gap: var(--spacing-3);
|
|
5932
|
+
align-items: center;
|
|
5933
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
5934
|
+
border-left: none;
|
|
5935
|
+
background-color: var(--md-sys-color-surface);
|
|
5936
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
5937
|
+
font: inherit;
|
|
5938
|
+
cursor: pointer;
|
|
5939
|
+
position: relative;
|
|
5940
|
+
font-size: var(--md-sys-typescale-label-medium-size);
|
|
5941
|
+
line-height: var(--md-sys-typescale-label-medium-line-height);
|
|
5942
|
+
font-weight: var(--md-sys-typescale-label-medium-weight);
|
|
5943
|
+
letter-spacing: var(--md-sys-typescale-label-medium-tracking);
|
|
5944
|
+
color: var(--md-sys-color-on-surface);
|
|
5945
|
+
justify-content: center;
|
|
5946
|
+
height: 100%;
|
|
5947
|
+
box-sizing: border-box;
|
|
5948
|
+
}
|
|
5949
|
+
.segmented-item span {
|
|
5950
|
+
white-space: nowrap;
|
|
5948
5951
|
}
|
|
5949
5952
|
md-icon {
|
|
5950
5953
|
font-size: 20px;
|
|
5951
|
-
width:
|
|
5952
|
-
height:
|
|
5954
|
+
width: 20px;
|
|
5955
|
+
height: 20px;
|
|
5953
5956
|
}
|
|
5954
5957
|
:host([disabled]) .segmented-item,
|
|
5955
5958
|
.segmented-item[aria-disabled="true"] {
|
|
@@ -5989,9 +5992,15 @@ var ScbWcTest=function(a){"use strict";var Ss;function d(o,e,t,r){var i=argument
|
|
|
5989
5992
|
border-top-right-radius: var(--md-sys-shape-corner-full);
|
|
5990
5993
|
border-bottom-right-radius: var(--md-sys-shape-corner-full);
|
|
5991
5994
|
}
|
|
5992
|
-
`,At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),At([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),At([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=At([g("scb-segmented-item")],a.ScbSegmentedItem);var Th=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,lr=(o,e,t,r)=>{for(var i=r>1?void 0:r?Oh(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&&Th(e,t,i),i};a.ScbSegmentedButton=class extends y{constructor(){super(...arguments),this.variant="single-select",this.value="",this.values=[],this.disabled=!1}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;const r=t.closest("scb-segmented-item");if(!r||this.disabled||r.hasAttribute("disabled"))return;const i=r.getAttribute("value")||"";i&&(this.variant==="multi-select"?(this.values.indexOf(i)===-1?this.values=[...this.values,i]:this.values=this.values.filter(n=>n!==i),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):i!==this.value&&(this.value=i,this.dispatchEvent(new CustomEvent("change",{detail:{value:i},bubbles:!0,composed:!0})),this.updateSegments()))}updateSegments(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");if(!e)return;e.assignedElements().forEach(i=>{if(i.tagName==="SCB-SEGMENTED-ITEM"){const s=i.getAttribute("value")||"";if(s){let n=!1;this.variant==="multi-select"?n=!!this.values&&this.values.includes(s):n=s===this.value,i.setAttribute("aria-pressed",n?"true":"false")}this.disabled&&i.setAttribute("disabled","true")}})}firstUpdated(){var t;this.updateSegments();const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e&&e.addEventListener("click",r=>this.onSlotClick(r))}updated(){this.updateSegments()}render(){return c`<slot></slot>`}},a.ScbSegmentedButton.styles=b`
|
|
5995
|
+
`,At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"label",2),At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"value",2),At([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"selected",2),At([l({type:String,reflect:!0})],a.ScbSegmentedItem.prototype,"icon",2),At([l({type:Boolean,reflect:!0})],a.ScbSegmentedItem.prototype,"disabled",2),a.ScbSegmentedItem=At([g("scb-segmented-item")],a.ScbSegmentedItem);var Th=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,lr=(o,e,t,r)=>{for(var i=r>1?void 0:r?Oh(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&&Th(e,t,i),i};a.ScbSegmentedButton=class extends y{constructor(){super(...arguments),this.variant="single-select",this.value="",this.values=[],this.disabled=!1}onSlotClick(e){let t=e.target;if(!t||!t.closest)return;const r=t.closest("scb-segmented-item");if(!r||this.disabled||r.hasAttribute("disabled"))return;const i=r.getAttribute("value")||"";i&&(this.variant==="multi-select"?(this.values.indexOf(i)===-1?this.values=[...this.values,i]:this.values=this.values.filter(n=>n!==i),this.dispatchEvent(new CustomEvent("change",{detail:{values:this.values},bubbles:!0,composed:!0})),this.updateSegments()):i!==this.value&&(this.value=i,this.dispatchEvent(new CustomEvent("change",{detail:{value:i},bubbles:!0,composed:!0})),this.updateSegments()))}updateSegments(){var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot");if(!e)return;e.assignedElements().forEach(i=>{if(i.tagName==="SCB-SEGMENTED-ITEM"){const s=i.getAttribute("value")||"";if(s){let n=!1;this.variant==="multi-select"?n=!!this.values&&this.values.includes(s):n=s===this.value,i.setAttribute("aria-pressed",n?"true":"false"),n?i.setAttribute("selected","true"):i.removeAttribute("selected")}this.disabled&&i.setAttribute("disabled","true")}})}firstUpdated(){var t;this.updateSegments();const e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e&&(e.addEventListener("click",r=>this.onSlotClick(r)),e.addEventListener("focus",()=>{this.dispatchEvent(new CustomEvent("focus",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("blur",()=>{this.dispatchEvent(new CustomEvent("blur",{detail:{},bubbles:!0,composed:!0}))},!0),e.addEventListener("keydown",r=>{if(r.code==="Space"||r.code==="Enter"||r.code==="NumpadEnter"){const i=r.target;if(i&&i.closest){const s=i.closest("scb-segmented-item");s&&!s.hasAttribute("disabled")&&!this.disabled&&(this.onSlotClick(r),r.preventDefault())}}}))}updated(){this.updateSegments()}render(){return c`<slot></slot>`}},a.ScbSegmentedButton.styles=b`
|
|
5993
5996
|
:host {
|
|
5994
|
-
|
|
5997
|
+
--scb-segmented-button-width: 100%;
|
|
5998
|
+
--scb-segmented-button-height: 48px;
|
|
5999
|
+
max-width: var(--scb-segmented-button-width);
|
|
6000
|
+
height: var(--scb-segmented-button-height);
|
|
6001
|
+
display: grid;
|
|
6002
|
+
grid-auto-flow: column;
|
|
6003
|
+
grid-auto-columns: 1fr;
|
|
5995
6004
|
}
|
|
5996
6005
|
/* Border radius only on first and last button */
|
|
5997
6006
|
::slotted(scb-segmented-item:first-child .segmented-item),
|