scb-wc-test 0.1.105 → 0.1.107
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-accordion/scb-accordion.js +8 -2
- package/mvc/components/scb-avatar/scb-avatar.js +19 -10
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +2 -3
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +13 -7
- package/mvc/components/scb-button/scb-button.js +34 -32
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +13 -11
- package/mvc/components/scb-card/scb-card.js +44 -41
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +15 -13
- package/mvc/components/scb-checkbox/scb-checkbox.js +6 -6
- package/mvc/components/scb-chip/scb-chip.js +27 -7
- package/mvc/components/scb-divider/scb-divider.js +41 -15
- package/mvc/components/scb-fact-card/scb-fact-card.js +37 -18
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +71 -43
- package/mvc/components/scb-icon-button/scb-icon-button.js +16 -10
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +6 -4
- package/mvc/components/scb-list/scb-list.js +3 -3
- package/mvc/components/scb-notification-card/scb-notification-card.js +5 -5
- package/mvc/components/scb-pagination/scb-pagination.js +165 -107
- package/mvc/components/scb-radio-button/scb-radio-group.js +22 -11
- package/mvc/components/scb-search/scb-search.js +84 -32
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +15 -13
- package/mvc/components/scb-status-pill/scb-status-pill.js +17 -13
- package/mvc/components/scb-stepper/scb-stepper.js +32 -29
- package/mvc/components/scb-switch/scb-switch.js +11 -8
- package/mvc/components/scb-tabs/scb-tabs.js +22 -19
- package/mvc/components/scb-textfield/scb-textfield.js +14 -10
- package/mvc/components/scb-toc/scb-toc.js +6 -3
- package/mvc/components/scb-viz/scb-viz.js +188 -178
- package/package.json +2 -2
- package/scb-accordion/scb-accordion.d.ts +13 -0
- package/scb-accordion/scb-accordion.js +53 -21
- package/scb-avatar/scb-avatar.d.ts +6 -0
- package/scb-avatar/scb-avatar.js +96 -61
- package/scb-breadcrumb/scb-breadcrumb-item.js +8 -9
- package/scb-breadcrumb/scb-breadcrumb.d.ts +6 -0
- package/scb-breadcrumb/scb-breadcrumb.js +61 -30
- package/scb-button/scb-button.d.ts +10 -0
- package/scb-button/scb-button.js +89 -65
- package/scb-calendar-card/scb-calendar-card.d.ts +5 -0
- package/scb-calendar-card/scb-calendar-card.js +79 -55
- package/scb-card/scb-card.d.ts +5 -0
- package/scb-card/scb-card.js +165 -140
- package/scb-checkbox/scb-checkbox-group.d.ts +3 -1
- package/scb-checkbox/scb-checkbox-group.js +59 -40
- package/scb-checkbox/scb-checkbox.d.ts +11 -0
- package/scb-checkbox/scb-checkbox.js +78 -56
- package/scb-chip/scb-chip.d.ts +24 -0
- package/scb-chip/scb-chip.js +137 -65
- package/scb-divider/scb-divider.d.ts +14 -0
- package/scb-divider/scb-divider.js +91 -43
- package/scb-fact-card/scb-fact-card.d.ts +10 -0
- package/scb-fact-card/scb-fact-card.js +135 -94
- package/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +10 -0
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +179 -120
- package/scb-icon-button/scb-icon-button.d.ts +10 -1
- package/scb-icon-button/scb-icon-button.js +88 -59
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +10 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +76 -52
- package/scb-list/scb-list.d.ts +7 -1
- package/scb-list/scb-list.js +62 -40
- package/scb-notification-card/scb-notification-card.d.ts +5 -0
- package/scb-notification-card/scb-notification-card.js +56 -39
- package/scb-pagination/scb-pagination.d.ts +12 -1
- package/scb-pagination/scb-pagination.js +235 -147
- package/scb-radio-button/scb-radio-group.d.ts +14 -3
- package/scb-radio-button/scb-radio-group.js +120 -67
- package/scb-search/scb-search.d.ts +15 -2
- package/scb-search/scb-search.js +152 -69
- package/scb-segmented-button/scb-segmented-button.d.ts +45 -4
- package/scb-segmented-button/scb-segmented-button.js +163 -72
- package/scb-status-pill/scb-status-pill.d.ts +12 -1
- package/scb-status-pill/scb-status-pill.js +51 -27
- package/scb-stepper/scb-stepper.d.ts +11 -3
- package/scb-stepper/scb-stepper.js +134 -101
- package/scb-switch/scb-switch.d.ts +21 -2
- package/scb-switch/scb-switch.js +97 -45
- package/scb-tabs/scb-tabs.d.ts +8 -0
- package/scb-tabs/scb-tabs.js +74 -44
- package/scb-textfield/scb-textfield.d.ts +7 -0
- package/scb-textfield/scb-textfield.js +43 -16
- package/scb-toc/scb-toc.d.ts +10 -1
- package/scb-toc/scb-toc.js +49 -18
- package/scb-viz/scb-viz.d.ts +10 -3
- package/scb-viz/scb-viz.js +278 -236
- package/scb-wc-test.bundle.js +1184 -901
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as f,n as d,i as _,x as u,t as b}from"../../vendor/vendor.js";import"./scb-accordion-item.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(s,i,a){try{customElements.get(s)||e(s,i,a)}catch(c){var o=String(c||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,g=t=>{throw TypeError(t)},n=(t,e,s,i)=>{for(var a=i>1?void 0:i?v(e,s):e,o=t.length-1,c;o>=0;o--)(c=t[o])&&(a=(i?c(e,s,a):c(a))||a);return i&&a&&m(e,s,a),a},y=(t,e,s)=>e.has(t)||g("Cannot "+s),S=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),h=(t,e,s)=>(y(t,e,"access private method"),s),p,l;let r=class extends _{constructor(){super(...arguments),S(this,p),this.detached=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}render(){return u`
|
|
2
2
|
<div class="scb-accordion" ?detached=${this.detached}>
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</div>
|
|
5
|
-
`}};
|
|
5
|
+
`}firstUpdated(){h(this,p,l).call(this)}updated(t){(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom"))&&h(this,p,l).call(this)}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}};p=new WeakSet;l=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,s=this.mapSpacingToken(this.spacingBottom)??t;e?this.style.setProperty("--scb-accordion-spacing-block-start",e):this.style.removeProperty("--scb-accordion-spacing-block-start"),s?this.style.setProperty("--scb-accordion-spacing-block-end",s):this.style.removeProperty("--scb-accordion-spacing-block-end")};r.styles=f`
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
margin-block-start: var(--scb-accordion-spacing-block-start, 0);
|
|
9
|
+
margin-block-end: var(--scb-accordion-spacing-block-end, 0);
|
|
10
|
+
}
|
|
11
|
+
`;n([d({type:Boolean,reflect:!0})],r.prototype,"detached",2);n([d({type:String,reflect:!0})],r.prototype,"spacing",2);n([d({type:String,attribute:"spacing-top",reflect:!0})],r.prototype,"spacingTop",2);n([d({type:String,attribute:"spacing-bottom",reflect:!0})],r.prototype,"spacingBottom",2);r=n([b("scb-accordion")],r);
|
|
@@ -1,19 +1,28 @@
|
|
|
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
|
|
2
|
+
import{_ as g}from"../../vendor/preload-helper.js";import{a as f,n as o,r as v,i as b,E as h,x as c,t as y}from"../../vendor/vendor.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(e,s,n){try{customElements.get(e)||i(e,s,n)}catch(p){var l=String(p||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw p}}}}catch{}})();var z=Object.defineProperty,S=Object.getOwnPropertyDescriptor,u=t=>{throw TypeError(t)},r=(t,i,e,s)=>{for(var n=s>1?void 0:s?S(i,e):i,l=t.length-1,p;l>=0;l--)(p=t[l])&&(n=(s?p(i,e,n):p(n))||n);return s&&n&&z(i,e,n),n},k=(t,i,e)=>i.has(t)||u("Cannot "+e),x=(t,i,e)=>i.has(t)?u("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,e),_=(t,i,e)=>(k(t,i,"access private method"),e),d,m;let a=class extends b{constructor(){super(...arguments),x(this,d),this.src="",this.alt="",this.label="",this.size="medium",this.shape="circular",this.iconName="",this.variant="image",this.spacing="",this.spacingTop="",this.spacingBottom="",this._imgError=!1,this._hasIconSlot=!1,this._onImgLoad=()=>{this._imgError=!1,this.dispatchEvent(new CustomEvent("image-load",{bubbles:!0,composed:!0}))},this._onImgError=()=>{this._imgError=!0,this.dispatchEvent(new CustomEvent("image-error",{bubbles:!0,composed:!0}))},this._onIconSlotChange=t=>{const i=t.currentTarget;this._hasIconSlot=(i.assignedNodes({flatten:!0})||[]).length>0}}async firstUpdated(){this.variant==="icon"&&await g(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),_(this,d,m).call(this)}updated(t){super.updated(t),t.has("variant")&&this.variant==="icon"&&g(()=>import("../../vendor/vendor-material.js").then(i=>i.i),__vite__mapDeps([0,1]),import.meta.url),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom"))&&_(this,d,m).call(this)}_initials(){const t=(this.label||this.alt||"").trim();if(!t)return"?";const i=t.split(/\s+/).filter(Boolean);if(i.length===1)return i[0].slice(0,1).toUpperCase();const e=i[0].slice(0,1),s=i[i.length-1].slice(0,1);return(e+s).toUpperCase()}_ariaLabel(){const t=(this.label||this.alt||"").trim();return t||null}mapSpacingToken(t){if(!t)return;const i=String(t).trim();if(i)return/^\d+$/.test(i)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(i,10)))})`:i}render(){const t=this._ariaLabel(),i=this.variant==="image"&&!!this.src&&!this._imgError,e=c`${h}
|
|
3
3
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
4
|
-
${this._hasIconSlot?
|
|
5
|
-
`,s=i?
|
|
6
|
-
|
|
4
|
+
${this._hasIconSlot?h:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
5
|
+
`,s=i?c`<img
|
|
6
|
+
class="photo"
|
|
7
|
+
part="image"
|
|
8
|
+
src=${this.src}
|
|
9
|
+
alt=${this.alt}
|
|
10
|
+
@load=${this._onImgLoad}
|
|
11
|
+
@error=${this._onImgError}
|
|
12
|
+
/>`:c`
|
|
7
13
|
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
8
|
-
${this._hasIconSlot?
|
|
9
|
-
`;return
|
|
10
|
-
<div class="container" part="container" role="img" aria-label=${t??
|
|
11
|
-
${this.variant==="icon"?
|
|
14
|
+
${this._hasIconSlot?h:this.iconName?c`<md-icon aria-hidden="true">${this.iconName}</md-icon>`:c`<div class="fallback" part="fallback">${this._initials()}</div>`}
|
|
15
|
+
`;return c`
|
|
16
|
+
<div class="container" part="container" role="img" aria-label=${t??h}>
|
|
17
|
+
${this.variant==="icon"?e:s}
|
|
12
18
|
</div>
|
|
13
|
-
`}};e.styles=
|
|
19
|
+
`}};d=new WeakSet;m=function(){const t=this.mapSpacingToken(this.spacing),i=this.mapSpacingToken(this.spacingTop)??t,e=this.mapSpacingToken(this.spacingBottom)??t;i?this.style.setProperty("--scb-avatar-spacing-block-start",i):this.style.removeProperty("--scb-avatar-spacing-block-start"),e?this.style.setProperty("--scb-avatar-spacing-block-end",e):this.style.removeProperty("--scb-avatar-spacing-block-end")};a.styles=f`
|
|
14
20
|
:host {
|
|
15
21
|
display: inline-block;
|
|
16
22
|
vertical-align: middle;
|
|
23
|
+
margin-block-start: var(--scb-avatar-spacing-block-start, 0);
|
|
24
|
+
margin-block-end: var(--scb-avatar-spacing-block-end, 0);
|
|
25
|
+
|
|
17
26
|
--_size: 40px;
|
|
18
27
|
--_font-size: 16px;
|
|
19
28
|
--_bg: var(--md-sys-color-primary-fixed-dim, var(--md-sys-color-primary-container));
|
|
@@ -96,4 +105,4 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as _,n as l,r as p,i
|
|
|
96
105
|
outline-offset: 2px;
|
|
97
106
|
border-radius: var(--_radius);
|
|
98
107
|
}
|
|
99
|
-
`;
|
|
108
|
+
`;r([o({type:String})],a.prototype,"src",2);r([o({type:String})],a.prototype,"alt",2);r([o({type:String})],a.prototype,"label",2);r([o({type:String,reflect:!0})],a.prototype,"size",2);r([o({type:String,reflect:!0})],a.prototype,"shape",2);r([o({type:String,attribute:"icon-name",reflect:!0})],a.prototype,"iconName",2);r([o({type:String,reflect:!0})],a.prototype,"variant",2);r([o({type:String,reflect:!0})],a.prototype,"spacing",2);r([o({type:String,attribute:"spacing-top",reflect:!0})],a.prototype,"spacingTop",2);r([o({type:String,attribute:"spacing-bottom",reflect:!0})],a.prototype,"spacingBottom",2);r([v()],a.prototype,"_imgError",2);r([v()],a.prototype,"_hasIconSlot",2);a=r([y("scb-avatar")],a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as o,t as b,i as p,a as d,x as l}from"../../vendor/vendor.js";import"../scb-link/scb-link.js";import"../../vendor/vendor-material.js";(function(){try{var r=typeof globalThis<"u"?globalThis:window;if(!r.__scb_ce_guard_installed__){r.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(t,a,e){try{customElements.get(t)||s(t,a,e)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var f=Object.defineProperty,m=Object.getOwnPropertyDescriptor,u=(r,s,t,a)=>{for(var e=a>1?void 0:a?m(s,t):s,n=r.length-1,i;n>=0;n--)(i=r[n])&&(e=(a?i(s,t,e):i(e))||e);return a&&e&&f(s,t,e),e};let c=class extends p{constructor(){super(...arguments),this.label="",this.isCurrent=!1,this.href=""}static get styles(){return d`
|
|
2
2
|
.breadcrumb-separator {
|
|
3
3
|
margin: var(--spacing-0) var(--spacing-3);
|
|
4
4
|
color: var(--md-sys-color-on-surface);
|
|
@@ -6,10 +6,9 @@ import{n as u,t as b,i as d,a as p,x as l}from"../../vendor/vendor.js";import"..
|
|
|
6
6
|
|
|
7
7
|
.breadcrumb-current {
|
|
8
8
|
color: var(--md-sys-color-on-surface);
|
|
9
|
-
font-weight: var(--weight-semibold);
|
|
10
9
|
font-family: var(--brand, Inter);
|
|
11
10
|
}
|
|
12
11
|
`}updated(r){r.has("isCurrent")&&this.dispatchEvent(new CustomEvent("current-changed",{detail:{isCurrent:this.isCurrent},bubbles:!0,composed:!0}))}render(){switch(!0){case this.isCurrent:return l`<span class="breadcrumb-current">${this.label}</span>`;default:return l`
|
|
13
12
|
<scb-link href="${this.href}">${this.label}</scb-link>
|
|
14
13
|
<span class="breadcrumb-separator">/</span>
|
|
15
|
-
`}}};
|
|
14
|
+
`}}};u([o({type:String})],c.prototype,"label",2);u([o({type:Boolean,attribute:"is-current",reflect:!0})],c.prototype,"isCurrent",2);u([o({type:String,attribute:"item-href"})],c.prototype,"href",2);c=u([b("scb-breadcrumb-item")],c);
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as p,t as u,i as f,a as g,x as d}from"../../vendor/vendor.js";import"./scb-breadcrumb-item.js";import"../../vendor/vendor-material.js";import"../scb-link/scb-link.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(t,a,r){try{customElements.get(t)||s(t,a,r)}catch(o){var i=String(o||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,h=e=>{throw TypeError(e)},c=(e,s,t,a)=>{for(var r=a>1?void 0:a?v(s,t):s,i=e.length-1,o;i>=0;i--)(o=e[i])&&(r=(a?o(s,t,r):o(r))||r);return a&&r&&y(s,t,r),r},_=(e,s,t)=>s.has(e)||h("Cannot "+t),w=(e,s,t)=>s.has(e)?h("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),m=(e,s,t)=>(_(e,s,"access private method"),t),l,b;let n=class extends f{constructor(){super(...arguments),w(this,l),this.showAll=!1,this.spacing="",this.spacingTop="",this.spacingBottom=""}static get styles(){return g`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
margin-block-start: var(--scb-breadcrumb-spacing-block-start, 0);
|
|
5
|
+
margin-block-end: var(--scb-breadcrumb-spacing-block-end, 0);
|
|
6
|
+
}
|
|
7
|
+
|
|
2
8
|
.scb-breadcrumb {
|
|
3
9
|
display: flex;
|
|
4
10
|
align-items: center;
|
|
@@ -66,15 +72,15 @@ import{n as d,t as b,i as p,a as u,x as o}from"../../vendor/vendor.js";import"./
|
|
|
66
72
|
transform: translateY(0);
|
|
67
73
|
}
|
|
68
74
|
}
|
|
69
|
-
`}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>{this.requestUpdate()}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this._observer?.disconnect()}updated(e){e.has("showAll")&&this.dispatchEvent(new CustomEvent("show-all-changed",{detail:{showAll:this.showAll},bubbles:!0,composed:!0}))}_onEllipsisClick(){this.showAll?this.showAll=!1:(this.showAll=!0,this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((
|
|
70
|
-
<div class="scb-breadcrumb ${
|
|
71
|
-
${
|
|
75
|
+
`}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>{this.requestUpdate()}),this._observer.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this._observer?.disconnect()}firstUpdated(){m(this,l,b).call(this)}updated(e){e.has("showAll")&&this.dispatchEvent(new CustomEvent("show-all-changed",{detail:{showAll:this.showAll},bubbles:!0,composed:!0})),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&m(this,l,b).call(this)}mapSpacingToken(e){if(!e)return;const s=String(e).trim();if(s)return/^\d+$/.test(s)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(s,10)))})`:s}_onEllipsisClick(){this.showAll?this.showAll=!1:(this.showAll=!0,this.updateComplete.then(()=>{const e=this.shadowRoot?.querySelectorAll(".scb-breadcrumb.expanded > scb-breadcrumb-item");e&&(e.forEach((s,t)=>{s.classList.add("breadcrumb-animate"),s.style.animationDelay=`${t*60}ms`}),setTimeout(()=>{e.forEach(s=>{s.classList.remove("breadcrumb-animate"),s.style.animationDelay=""})},600))}))}render(){let e=[];if(this.children.length||(e=Array.from(this.shadowRoot?this.shadowRoot.querySelectorAll("scb-breadcrumb-item"):[])),e.length||(e=Array.from(this.children).filter(t=>t.tagName.toLowerCase()==="scb-breadcrumb-item")),e.length>0){const t=e.length-1;e.forEach((a,r)=>{a.toggleAttribute("is-current",r===t)})}const s=e.length>6&&!this.showAll;return d`
|
|
76
|
+
<div class="scb-breadcrumb ${s?"collapsed":"expanded"}">
|
|
77
|
+
${s?e.map((t,a)=>a===3?d`<span
|
|
72
78
|
class="ellipsis"
|
|
73
79
|
aria-label="Visa alla"
|
|
74
80
|
role="button"
|
|
75
81
|
tabindex="0"
|
|
76
82
|
@click=${this._onEllipsisClick}
|
|
77
|
-
@keydown=${
|
|
83
|
+
@keydown=${r=>{(r.key==="Enter"||r.key===" ")&&this._onEllipsisClick()}}
|
|
78
84
|
>
|
|
79
85
|
<md-icon>
|
|
80
86
|
<md-focus-ring></md-focus-ring>
|
|
@@ -82,6 +88,6 @@ import{n as d,t as b,i as p,a as u,x as o}from"../../vendor/vendor.js";import"./
|
|
|
82
88
|
</md-icon>
|
|
83
89
|
</span>
|
|
84
90
|
<span class="breadcrumb-separator">/</span>
|
|
85
|
-
${
|
|
91
|
+
${t}`:d`${t}`):e.map(t=>t)}
|
|
86
92
|
</div>
|
|
87
|
-
`}};c([
|
|
93
|
+
`}};l=new WeakSet;b=function(){const e=this.mapSpacingToken(this.spacing),s=this.mapSpacingToken(this.spacingTop)??e,t=this.mapSpacingToken(this.spacingBottom)??e;s?this.style.setProperty("--scb-breadcrumb-spacing-block-start",s):this.style.removeProperty("--scb-breadcrumb-spacing-block-start"),t?this.style.setProperty("--scb-breadcrumb-spacing-block-end",t):this.style.removeProperty("--scb-breadcrumb-spacing-block-end")};c([p({type:Boolean,attribute:"show-all",reflect:!0})],n.prototype,"showAll",2);c([p({type:String,reflect:!0})],n.prototype,"spacing",2);c([p({type:String,attribute:"spacing-top",reflect:!0})],n.prototype,"spacingTop",2);c([p({type:String,attribute:"spacing-bottom",reflect:!0})],n.prototype,"spacingBottom",2);n=c([u("scb-breadcrumb")],n);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import{n as
|
|
1
|
+
import{n as s,t as I,i as k,a as T,x as h,E as i}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(r,a,l){try{customElements.get(r)||e(r,a,l)}catch(d){var c=String(d||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var B=Object.defineProperty,O=Object.getOwnPropertyDescriptor,A=t=>{throw TypeError(t)},n=(t,e,r,a)=>{for(var l=a>1?void 0:a?O(e,r):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(l=(a?d(e,r,l):d(l))||l);return a&&l&&B(e,r,l),l},w=(t,e,r)=>e.has(t)||A("Cannot "+r),E=(t,e,r)=>e.has(t)?A("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),$=(t,e,r)=>(w(t,e,"access private method"),r),m,g;let o=class extends k{constructor(){super(...arguments),E(this,m),this.variant="filled",this.type="button",this.label="Button",this.trailingIcon=!1,this.icon="",this.disabled=!1,this.href="",this.target="",this.rel="",this.spacing="",this.spacingTop="",this.spacingBottom=""}__getMdHost(){return this.renderRoot.querySelector("md-filled-button, md-outlined-button, md-filled-tonal-button, md-text-button")}__getInnerNativeButton(t){return t?.shadowRoot?.querySelector("button")??null}__syncAriaToInner(){const t=this.__getMdHost(),e=this.__getInnerNativeButton(t);if(!t||!e)return;const r=(this.getAttribute("aria-label")||"").trim(),a=(t.getAttribute("aria-label")||"").trim(),l=this.label.trim()===""?(this.icon||"").trim():"",c=r||a||l;c?e.setAttribute("aria-label",c):e.removeAttribute("aria-label");const d=this.getAttribute("aria-controls");d!==null?e.setAttribute("aria-controls",d):e.removeAttribute("aria-controls");const y=this.getAttribute("aria-expanded");y!==null?e.setAttribute("aria-expanded",y):e.removeAttribute("aria-expanded"),t.removeAttribute("aria-label"),t.removeAttribute("aria-controls"),t.removeAttribute("aria-expanded"),this.removeAttribute("aria-expanded"),this.__ariaObserver?.disconnect(),this.__ariaObserver=new MutationObserver(x=>{const b=this.__getMdHost(),p=this.__getInnerNativeButton(b);if(!(!b||!p)){for(const f of x){if(f.type!=="attributes"||!f.attributeName)continue;const u=f.attributeName,v=this.getAttribute(u);if(u==="aria-label"){const S=(b.getAttribute("aria-label")||"").trim(),_=(v||S||(this.label.trim()===""?(this.icon||"").trim():"")).trim();_?p.setAttribute("aria-label",_):p.removeAttribute("aria-label"),b.removeAttribute("aria-label")}else(u==="aria-controls"||u==="aria-expanded")&&(v===null?p.removeAttribute(u):p.setAttribute(u,v),u==="aria-expanded"&&this.removeAttribute("aria-expanded"))}b.removeAttribute("aria-label"),b.removeAttribute("aria-controls"),b.removeAttribute("aria-expanded")}}),this.__ariaObserver.observe(this,{attributes:!0,attributeFilter:["aria-label","aria-controls","aria-expanded"]})}firstUpdated(){(this.type==="submit"||this.type==="reset")&&this.addEventListener("click",()=>{if(!this.disabled){const t=this.closest("form");t&&(this.type==="submit"&&t.requestSubmit(),this.type==="reset"&&t.reset())}}),this.__syncAriaToInner(),$(this,m,g).call(this)}updated(t){t.has("variant")&&this.__syncAriaToInner(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom"))&&$(this,m,g).call(this)}disconnectedCallback(){this.__ariaObserver?.disconnect(),super.disconnectedCallback()}mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}static get styles(){return T`
|
|
2
2
|
/* Gör hosten stretchbar i t.ex. flex/grid */
|
|
3
3
|
:host {
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
block-size: var(--scb-button-block-size, auto);
|
|
6
|
+
margin-block-start: var(--scb-button-spacing-block-start, 0);
|
|
7
|
+
margin-block-end: var(--scb-button-spacing-block-end, 0);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
/* Låt inre md-
|
|
10
|
+
/* Låt inre md-knappar fylla hostens höjd */
|
|
9
11
|
md-filled-button,
|
|
10
12
|
md-outlined-button,
|
|
11
13
|
md-filled-tonal-button,
|
|
@@ -57,64 +59,64 @@ import{n as c,t as $,i as A,a as x,x as h,E as r}from"../../vendor/vendor.js";im
|
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
*/
|
|
60
|
-
`}render(){const t=!!this.icon?.trim(),e=t?h`<md-icon slot="icon">${this.icon}</md-icon>`:r
|
|
62
|
+
`}render(){const t=!!this.icon?.trim(),e=t?h`<md-icon slot="icon">${this.icon}</md-icon>`:i,r=i,a=this.label.trim()===""?this.icon:void 0;switch(this.variant){case"filled":return h`
|
|
61
63
|
<md-filled-button
|
|
62
64
|
type=${this.type}
|
|
63
|
-
variant=${
|
|
65
|
+
variant=${r}
|
|
64
66
|
?trailing-icon=${this.trailingIcon}
|
|
65
67
|
?disabled=${this.disabled}
|
|
66
|
-
aria-label=${
|
|
67
|
-
href=${this.href||
|
|
68
|
-
target=${this.target||
|
|
69
|
-
rel=${this.rel||
|
|
68
|
+
aria-label=${a}
|
|
69
|
+
href=${this.href||i}
|
|
70
|
+
target=${this.target||i}
|
|
71
|
+
rel=${this.rel||i}
|
|
70
72
|
>
|
|
71
|
-
${t&&!this.trailingIcon?e:
|
|
73
|
+
${t&&!this.trailingIcon?e:i}
|
|
72
74
|
${this.label}
|
|
73
|
-
${t&&this.trailingIcon?e:
|
|
75
|
+
${t&&this.trailingIcon?e:i}
|
|
74
76
|
</md-filled-button>
|
|
75
77
|
`;case"outlined":return h`
|
|
76
78
|
<md-outlined-button
|
|
77
79
|
type=${this.type}
|
|
78
|
-
variant=${
|
|
80
|
+
variant=${r}
|
|
79
81
|
?trailing-icon=${this.trailingIcon}
|
|
80
82
|
?disabled=${this.disabled}
|
|
81
|
-
aria-label=${
|
|
82
|
-
href=${this.href||
|
|
83
|
-
target=${this.target||
|
|
84
|
-
rel=${this.rel||
|
|
83
|
+
aria-label=${a}
|
|
84
|
+
href=${this.href||i}
|
|
85
|
+
target=${this.target||i}
|
|
86
|
+
rel=${this.rel||i}
|
|
85
87
|
>
|
|
86
|
-
${t&&!this.trailingIcon?e:
|
|
88
|
+
${t&&!this.trailingIcon?e:i}
|
|
87
89
|
${this.label}
|
|
88
|
-
${t&&this.trailingIcon?e:
|
|
90
|
+
${t&&this.trailingIcon?e:i}
|
|
89
91
|
</md-outlined-button>
|
|
90
92
|
`;case"filled-tonal":return h`
|
|
91
93
|
<md-filled-tonal-button
|
|
92
94
|
type=${this.type}
|
|
93
|
-
variant=${
|
|
95
|
+
variant=${r}
|
|
94
96
|
?trailing-icon=${this.trailingIcon}
|
|
95
97
|
?disabled=${this.disabled}
|
|
96
|
-
aria-label=${
|
|
97
|
-
href=${this.href||
|
|
98
|
-
target=${this.target||
|
|
99
|
-
rel=${this.rel||
|
|
98
|
+
aria-label=${a}
|
|
99
|
+
href=${this.href||i}
|
|
100
|
+
target=${this.target||i}
|
|
101
|
+
rel=${this.rel||i}
|
|
100
102
|
>
|
|
101
|
-
${t&&!this.trailingIcon?e:
|
|
103
|
+
${t&&!this.trailingIcon?e:i}
|
|
102
104
|
${this.label}
|
|
103
|
-
${t&&this.trailingIcon?e:
|
|
105
|
+
${t&&this.trailingIcon?e:i}
|
|
104
106
|
</md-filled-tonal-button>
|
|
105
107
|
`;case"text":return h`
|
|
106
108
|
<md-text-button
|
|
107
109
|
type=${this.type}
|
|
108
|
-
variant=${
|
|
110
|
+
variant=${r}
|
|
109
111
|
?trailing-icon=${this.trailingIcon}
|
|
110
112
|
?disabled=${this.disabled}
|
|
111
|
-
aria-label=${
|
|
112
|
-
href=${this.href||
|
|
113
|
-
target=${this.target||
|
|
114
|
-
rel=${this.rel||
|
|
113
|
+
aria-label=${a}
|
|
114
|
+
href=${this.href||i}
|
|
115
|
+
target=${this.target||i}
|
|
116
|
+
rel=${this.rel||i}
|
|
115
117
|
>
|
|
116
|
-
${t&&!this.trailingIcon?e:
|
|
118
|
+
${t&&!this.trailingIcon?e:i}
|
|
117
119
|
${this.label}
|
|
118
|
-
${t&&this.trailingIcon?e:
|
|
120
|
+
${t&&this.trailingIcon?e:i}
|
|
119
121
|
</md-text-button>
|
|
120
|
-
`;default:return h``}}};
|
|
122
|
+
`;default:return h``}}};m=new WeakSet;g=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop)??t,r=this.mapSpacingToken(this.spacingBottom)??t;e?this.style.setProperty("--scb-button-spacing-block-start",e):this.style.removeProperty("--scb-button-spacing-block-start"),r?this.style.setProperty("--scb-button-spacing-block-end",r):this.style.removeProperty("--scb-button-spacing-block-end")};n([s({type:String,reflect:!0})],o.prototype,"variant",2);n([s({type:String,reflect:!0})],o.prototype,"type",2);n([s({type:String})],o.prototype,"label",2);n([s({type:Boolean,attribute:"trailing-icon"})],o.prototype,"trailingIcon",2);n([s({type:String})],o.prototype,"icon",2);n([s({type:Boolean,reflect:!0})],o.prototype,"disabled",2);n([s({type:String})],o.prototype,"href",2);n([s({type:String})],o.prototype,"target",2);n([s({type:String})],o.prototype,"rel",2);n([s({type:String,reflect:!0})],o.prototype,"spacing",2);n([s({type:String,attribute:"spacing-top",reflect:!0})],o.prototype,"spacingTop",2);n([s({type:String,attribute:"spacing-bottom",reflect:!0})],o.prototype,"spacingBottom",2);o=n([I("scb-button")],o);
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
2
|
+
import{_ as g}from"../../vendor/preload-helper.js";import{a as v,n as a,i as b,x as d,t as x}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(s,o,n){try{customElements.get(s)||t(s,o,n)}catch(c){var l=String(c||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=e=>{throw TypeError(e)},r=(e,t,s,o)=>{for(var n=o>1?void 0:o?_(t,s):t,l=e.length-1,c;l>=0;l--)(c=e[l])&&(n=(o?c(t,s,n):c(n))||n);return o&&n&&w(t,s,n),n},z=(e,t,s)=>t.has(e)||y("Cannot "+s),k=(e,t,s)=>t.has(e)?y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),f=(e,t,s)=>(z(e,t,"access private method"),s),p,h;let i=class extends b{constructor(){super(...arguments),k(this,p),this.variant="default",this.direction="horizontal",this.title="",this.subtitle="",this.supportingText="",this.cardHref="",this.cardHrefNav="",this.showMedia=null,this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.width="",this.maxWidth="",this.minWidth="",this.height="",this.maxHeight="",this.minHeight="",this.sizing="stretch",this.spacing="",this.spacingTop="",this.spacingBottom=""}async firstUpdated(){i.__iconLoaded||(await g(()=>import("../../vendor/vendor-material.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url),i.__iconLoaded=!0),i.__rippleLoaded||(await g(()=>import("../../vendor/vendor-material.js").then(e=>e.r),__vite__mapDeps([0,1]),import.meta.url),i.__rippleLoaded=!0),this.__applyInnerSizing(),f(this,p,h).call(this)}render(){const e=this.variant?`${this.variant.toLowerCase()}`:"",t=this.direction?`${this.direction.toLowerCase()}`:"",s=this.cardHref?"clickable":"",o=1,n="Jan",l=this.mediaWidth&&this.mediaWidth.trim()!==""?this.mediaWidth:"",c=this.mediaHeight&&this.mediaHeight.trim()!==""?this.mediaHeight:"",m=this.mediaAspect&&this.mediaAspect.trim()!==""?this.mediaAspect:"",u=`${l?`inline-size:${l};`:""}${c?`block-size:${c};`:""}${m?`aspect-ratio:${m};`:""}`;return d`
|
|
3
3
|
<div
|
|
4
|
-
class="calendar-card ${
|
|
4
|
+
class="calendar-card ${t} ${s} ${e}"
|
|
5
5
|
role="${this.cardHref?"link":"group"}"
|
|
6
6
|
aria-label="${this.title||"Kalenderkort"}"
|
|
7
7
|
tabindex="${this.cardHref?"0":"-1"}"
|
|
@@ -9,24 +9,24 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as f,n as r,i as g,x
|
|
|
9
9
|
@keydown=${this.cardHref?this._onKeyDown:null}
|
|
10
10
|
style="cursor: ${this.cardHref?"pointer":"default"};"
|
|
11
11
|
>
|
|
12
|
-
${this.cardHref?
|
|
13
|
-
${this.showMedia?
|
|
14
|
-
<div class="media" style="${
|
|
12
|
+
${this.cardHref?d`<md-ripple></md-ripple>`:""}
|
|
13
|
+
${this.showMedia?d`
|
|
14
|
+
<div class="media" style="${u}" aria-label="Datum: ${o} ${n}">
|
|
15
15
|
<div class="day">${o}</div>
|
|
16
|
-
<div class="month">${
|
|
16
|
+
<div class="month">${n}</div>
|
|
17
17
|
</div>
|
|
18
18
|
`:""}
|
|
19
19
|
<div class="container">
|
|
20
20
|
<div class="header-container">
|
|
21
21
|
<div class="header">${this.title}</div>
|
|
22
|
-
${this.cardHref?
|
|
22
|
+
${this.cardHref?d`<md-icon>arrow_forward</md-icon>`:""}
|
|
23
23
|
</div>
|
|
24
|
-
${this.subtitle?
|
|
25
|
-
${this.supportingText?
|
|
24
|
+
${this.subtitle?d`<div class="subtitle">${this.subtitle}</div>`:""}
|
|
25
|
+
${this.supportingText?d`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
<md-focus-ring></md-focus-ring>
|
|
29
|
-
`}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");if(!e)return;this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size")}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(window.open(this.cardHref,"_self"),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}updated(e){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("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-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")),e.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing()}};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=
|
|
29
|
+
`}__applyInnerSizing(){const e=this.renderRoot.querySelector(".calendar-card");if(!e)return;this.width&&this.width.trim()!==""?(e.style.inlineSize="100%",e.style.maxInlineSize="100%"):(e.style.removeProperty("inline-size"),e.style.removeProperty("max-inline-size")),this.height&&this.height.trim()!==""||this.sizing==="stretch"?e.style.blockSize="100%":e.style.removeProperty("block-size"),this.maxHeight&&this.maxHeight.trim()!==""?e.style.maxBlockSize="100%":e.style.removeProperty("max-block-size")}_onKeyDown(e){(e.key==="Enter"||e.key===" ")&&this.cardHref&&(window.open(this.cardHref,"_self"),e.preventDefault())}_handleHrefNavigation(){this.cardHref&&(this.cardHrefNav==="tab"?window.open(this.cardHref,"_blank"):this.cardHrefNav==="window"?window.open(this.cardHref,"_blank","noopener,noreferrer,width=800,height=600"):window.open(this.cardHref,"_self"))}mapSpacingToken(e){if(!e)return;const t=String(e).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}updated(e){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("minWidth")&&(this.minWidth?this.style.minInlineSize=this.minWidth:this.style.removeProperty("min-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")),e.has("minHeight")&&(this.minHeight?this.style.minBlockSize=this.minHeight:this.style.removeProperty("min-block-size")),(e.has("width")||e.has("height")||e.has("maxHeight")||e.has("sizing"))&&this.__applyInnerSizing(),(e.has("spacing")||e.has("spacingTop")||e.has("spacingBottom"))&&f(this,p,h).call(this)}};p=new WeakSet;h=function(){const e=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??e,s=this.mapSpacingToken(this.spacingBottom)??e;t?this.style.setProperty("--scb-calendar-card-spacing-block-start",t):this.style.removeProperty("--scb-calendar-card-spacing-block-start"),s?this.style.setProperty("--scb-calendar-card-spacing-block-end",s):this.style.removeProperty("--scb-calendar-card-spacing-block-end")};i.__iconLoaded=!1;i.__rippleLoaded=!1;i.styles=v`
|
|
30
30
|
:host {
|
|
31
31
|
display: block;
|
|
32
32
|
position: relative;
|
|
@@ -34,6 +34,8 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as f,n as r,i as g,x
|
|
|
34
34
|
inline-size: 100%;
|
|
35
35
|
min-inline-size: 0;
|
|
36
36
|
padding: var(--scb-calendar-card-focus-ring-gap, 4px);
|
|
37
|
+
margin-block-start: var(--scb-calendar-card-spacing-block-start, 0);
|
|
38
|
+
margin-block-end: var(--scb-calendar-card-spacing-block-end, 0);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
:host([sizing='stretch']) {
|
|
@@ -243,4 +245,4 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as f,n as r,i as g,x
|
|
|
243
245
|
overflow: visible;
|
|
244
246
|
text-overflow: clip;
|
|
245
247
|
}
|
|
246
|
-
`;
|
|
248
|
+
`;r([a({type:String,reflect:!0})],i.prototype,"variant",2);r([a({type:String,reflect:!0})],i.prototype,"direction",2);r([a({type:String,reflect:!0})],i.prototype,"title",2);r([a({type:String,reflect:!0})],i.prototype,"subtitle",2);r([a({type:String,attribute:"supporting-text",reflect:!0})],i.prototype,"supportingText",2);r([a({type:String,attribute:"card-href"})],i.prototype,"cardHref",2);r([a({type:String,attribute:"card-href-nav"})],i.prototype,"cardHrefNav",2);r([a({type:Boolean,reflect:!0,attribute:"show-media"})],i.prototype,"showMedia",2);r([a({type:String,attribute:"media-width"})],i.prototype,"mediaWidth",2);r([a({type:String,attribute:"media-height"})],i.prototype,"mediaHeight",2);r([a({type:String,attribute:"media-aspect"})],i.prototype,"mediaAspect",2);r([a({type:String,reflect:!0})],i.prototype,"width",2);r([a({type:String,reflect:!0,attribute:"max-width"})],i.prototype,"maxWidth",2);r([a({type:String,attribute:"min-width"})],i.prototype,"minWidth",2);r([a({type:String,reflect:!0})],i.prototype,"height",2);r([a({type:String,reflect:!0,attribute:"max-height"})],i.prototype,"maxHeight",2);r([a({type:String,attribute:"min-height"})],i.prototype,"minHeight",2);r([a({type:String,reflect:!0})],i.prototype,"sizing",2);r([a({type:String,reflect:!0})],i.prototype,"spacing",2);r([a({type:String,attribute:"spacing-top",reflect:!0})],i.prototype,"spacingTop",2);r([a({type:String,attribute:"spacing-bottom",reflect:!0})],i.prototype,"spacingBottom",2);i=r([x("scb-calendar-card")],i);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as
|
|
2
|
+
import{_ as g}from"../../vendor/preload-helper.js";import{a as f,n as r,i as y,x as s,t as x}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 i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(n,o,c){try{customElements.get(n)||t(n,o,c)}catch(l){var d=String(l||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var $=Object.defineProperty,_=Object.getOwnPropertyDescriptor,v=i=>{throw TypeError(i)},a=(i,t,n,o)=>{for(var c=o>1?void 0:o?_(t,n):t,d=i.length-1,l;d>=0;d--)(l=i[d])&&(c=(o?l(t,n,c):l(c))||c);return o&&c&&$(t,n,c),c},z=(i,t,n)=>t.has(i)||v("Cannot "+n),w=(i,t,n)=>t.has(i)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,n),b=(i,t,n)=>(z(i,t,"access private method"),n),h,m;let e=class extends y{constructor(){super(...arguments),w(this,h),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.spacing="",this.spacingTop="",this.spacingBottom="",this.__onImgLoad=i=>{const t=i.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=i=>{(i.key==="Enter"||i.key===" ")&&this.cardHref&&(i.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=i=>{this.cardHref&&(i.target.closest("a")||window.open(this.cardHref,"_self"))}}__calcAspectWH(i){const t=(i||"").trim();if(!t)return{w:640,h:360};const n=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(n&&n.length===2){const c=Number(n[0]),d=Number(n[1]);if(c>0&&d>0)return{w:c,h:d}}const o=Number(t);return isFinite(o)&&o>0?{w:1e3,h:Math.round(1e3/o)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return s`
|
|
3
3
|
<div class="media">
|
|
4
4
|
<slot name="media">
|
|
5
5
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
6
6
|
</slot>
|
|
7
7
|
</div>
|
|
8
|
-
`;if(this.mediaHref||this.mediaSrcset){let
|
|
9
|
-
<div class="media ${d}" style="${
|
|
8
|
+
`;if(this.mediaHref||this.mediaSrcset){let t=Number(this.mediaWidth)||0,n=Number(this.mediaHeight)||0;const o=(this.mediaAspect||"").trim();if(!t||!n){const u=this.__calcAspectWH(o||"16/9");t||(t=u.w),n||(n=u.h)}const c=`aspect-ratio:${o||`${t}/${n}`};`,d=this.mediaPlaceholder?"has-ph":"",l=this.mediaFit||"cover",p=this.mediaPosition||"center";return s`
|
|
9
|
+
<div class="media ${d}" style="${c}">
|
|
10
10
|
<slot name="media-sources"></slot>
|
|
11
11
|
<img
|
|
12
12
|
src="${this.mediaHref||""}"
|
|
@@ -16,17 +16,17 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as b,x
|
|
|
16
16
|
loading="${this.mediaLoading}"
|
|
17
17
|
decoding="${this.mediaDecoding}"
|
|
18
18
|
fetchpriority="${this.mediaFetchPriority}"
|
|
19
|
-
style="object-fit:${
|
|
20
|
-
width="${
|
|
19
|
+
style="object-fit:${l};object-position:${p};"
|
|
20
|
+
width="${t}"
|
|
21
21
|
height="${n}"
|
|
22
22
|
@load=${this.__onImgLoad}
|
|
23
23
|
/>
|
|
24
24
|
</div>
|
|
25
|
-
`}return null}render(){const
|
|
25
|
+
`}return null}mapSpacingToken(i){if(!i)return;const t=String(i).trim();if(t)return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}render(){const i=this.variant?`${this.variant.toLowerCase()}`:"",t=this.type==="list"?"vertical":this.direction?this.direction.toLowerCase():"",n=this.cardHref?"clickable":"",o=this.date instanceof Date?this.date.toISOString().slice(0,10):this.date||"",c=(p=!1)=>p?s`<a class="title" href="${this.cardHref}" tabindex="0"
|
|
26
26
|
>${this.title}</a
|
|
27
|
-
><md-icon>arrow_forward</md-icon>`:
|
|
27
|
+
><md-icon>arrow_forward</md-icon>`:s`<span class="title">${this.title}</span>`,d=()=>this.__mediaTemplate(),l=p=>s`
|
|
28
28
|
<div
|
|
29
|
-
class="scb-card ${
|
|
29
|
+
class="scb-card ${i} ${t} ${n}"
|
|
30
30
|
@click=${this.cardHref?this.__handleHrefNavigation:null}
|
|
31
31
|
@keydown=${this.cardHref?this.__onKeyDown:null}
|
|
32
32
|
style="cursor:${this.cardHref?"pointer":"default"};"
|
|
@@ -34,39 +34,39 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as b,x
|
|
|
34
34
|
tabindex=${this.cardHref?"0":"-1"}
|
|
35
35
|
aria-label=${this.title||"Kort"}
|
|
36
36
|
>
|
|
37
|
-
${this.cardHref?
|
|
37
|
+
${this.cardHref?s`<md-ripple></md-ripple>`:""}
|
|
38
38
|
${d()}
|
|
39
39
|
${p}
|
|
40
40
|
</div>
|
|
41
41
|
<md-focus-ring></md-focus-ring>
|
|
42
|
-
`;switch(this.type){case"standard":return
|
|
42
|
+
`;switch(this.type){case"standard":return l(s`
|
|
43
43
|
<div class="full-content">
|
|
44
44
|
<div class="top-content">
|
|
45
|
-
${this.title?
|
|
46
|
-
${this.subtitle?
|
|
47
|
-
${this.supportingText?
|
|
48
|
-
${
|
|
45
|
+
${this.title?s`<div class="header">${c(!!this.cardHref)}</div>`:""}
|
|
46
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
47
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
48
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
|
-
`);case"list":return
|
|
51
|
+
`);case"list":return l(s`
|
|
52
52
|
<div class="full-content">
|
|
53
53
|
<div class="top-content">
|
|
54
|
-
${this.title?
|
|
55
|
-
${this.subtitle?
|
|
56
|
-
${this.supportingText?
|
|
57
|
-
${
|
|
54
|
+
${this.title?s`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
55
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
56
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
57
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
58
58
|
</div>
|
|
59
59
|
<div class="content list">
|
|
60
60
|
<slot></slot>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
|
-
`);case"social":return
|
|
63
|
+
`);case"social":return l(s`
|
|
64
64
|
<div class="full-content">
|
|
65
65
|
<div class="top-content">
|
|
66
|
-
${this.title?
|
|
67
|
-
${this.subtitle?
|
|
68
|
-
${this.supportingText?
|
|
69
|
-
${
|
|
66
|
+
${this.title?s`<div class="header">${c(!!this.cardHref)}</div>`:""}
|
|
67
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
68
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
69
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
70
70
|
</div>
|
|
71
71
|
<div class="content">
|
|
72
72
|
<div class="social-metrics">
|
|
@@ -81,40 +81,40 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as b,x
|
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
</div>
|
|
84
|
-
`);case"link":return
|
|
84
|
+
`);case"link":return l(s`
|
|
85
85
|
<div class="full-content">
|
|
86
86
|
<div class="top-content">
|
|
87
|
-
${this.title?
|
|
88
|
-
${this.subtitle?
|
|
89
|
-
${this.supportingText?
|
|
90
|
-
${
|
|
87
|
+
${this.title?s`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
88
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
89
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
90
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
91
91
|
</div>
|
|
92
92
|
<div class="content links">
|
|
93
93
|
<slot></slot>
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
|
-
`);case"action":return
|
|
96
|
+
`);case"action":return l(s`
|
|
97
97
|
<div class="full-content">
|
|
98
98
|
<div class="top-content">
|
|
99
|
-
${this.title?
|
|
100
|
-
${this.subtitle?
|
|
101
|
-
${this.supportingText?
|
|
102
|
-
${
|
|
99
|
+
${this.title?s`<div class="header"><span class="title">${this.title}</span></div>`:""}
|
|
100
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
101
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
102
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
103
103
|
</div>
|
|
104
104
|
<div class="content actions">
|
|
105
105
|
<slot></slot>
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
|
-
`);default:return
|
|
108
|
+
`);default:return l(s`
|
|
109
109
|
<div class="full-content">
|
|
110
110
|
<div class="top-content">
|
|
111
|
-
${this.title?
|
|
112
|
-
${this.subtitle?
|
|
113
|
-
${this.supportingText?
|
|
114
|
-
${
|
|
111
|
+
${this.title?s`<div class="header">${c(!!this.cardHref)}</div>`:""}
|
|
112
|
+
${this.subtitle?s`<div class="sub-label">${this.subtitle}</div>`:""}
|
|
113
|
+
${this.supportingText?s`<div class="supporting-text">${this.supportingText}</div>`:""}
|
|
114
|
+
${o?s`<div class="date">${o}</div>`:""}
|
|
115
115
|
</div>
|
|
116
116
|
</div>
|
|
117
|
-
`)}}updated(
|
|
117
|
+
`)}}updated(i){super.updated(i),i.has("width")&&(this.width?this.style.inlineSize=this.width:this.style.removeProperty("inline-size")),i.has("maxWidth")&&(this.maxWidth?this.style.maxInlineSize=this.maxWidth:this.style.removeProperty("max-inline-size")),i.has("height")&&(this.height?this.style.blockSize=this.height:this.style.removeProperty("block-size")),i.has("maxHeight")&&(this.maxHeight?this.style.maxBlockSize=this.maxHeight:this.style.removeProperty("max-block-size")),i.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"),(i.has("spacing")||i.has("spacingTop")||i.has("spacingBottom"))&&b(this,h,m).call(this)}async firstUpdated(i){e.__iconLoaded||(await g(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),e.__iconLoaded=!0),e.__rippleLoaded||(await g(()=>import("../../vendor/vendor-material.js").then(t=>t.r),__vite__mapDeps([0,1]),import.meta.url),e.__rippleLoaded=!0),b(this,h,m).call(this)}};h=new WeakSet;m=function(){const i=this.mapSpacingToken(this.spacing),t=this.mapSpacingToken(this.spacingTop)??i,n=this.mapSpacingToken(this.spacingBottom)??i;t?this.style.setProperty("--scb-card-spacing-block-start",t):this.style.removeProperty("--scb-card-spacing-block-start"),n?this.style.setProperty("--scb-card-spacing-block-end",n):this.style.removeProperty("--scb-card-spacing-block-end")};e.__iconLoaded=!1;e.__rippleLoaded=!1;e.styles=f`
|
|
118
118
|
:host {
|
|
119
119
|
display: block;
|
|
120
120
|
box-sizing: border-box;
|
|
@@ -127,6 +127,9 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as b,x
|
|
|
127
127
|
--scb-card-horizontal-media-max: 176px;
|
|
128
128
|
--scb-card-horizontal-media-min: 96px;
|
|
129
129
|
--scb-card-horizontal-media-aspect: 16 / 9;
|
|
130
|
+
|
|
131
|
+
margin-block-start: var(--scb-card-spacing-block-start, 0);
|
|
132
|
+
margin-block-end: var(--scb-card-spacing-block-end, 0);
|
|
130
133
|
}
|
|
131
134
|
:host([type='standard']) {
|
|
132
135
|
--scb-card-max-w: var(--scb-card-standard-max-w);
|
|
@@ -416,4 +419,4 @@ import{_ as m}from"../../vendor/preload-helper.js";import{a as u,n as s,i as b,x
|
|
|
416
419
|
.scb-card.filled .content.list ::slotted(scb-list) {
|
|
417
420
|
--scb-list-bg: var(--md-sys-color-surface-dim);
|
|
418
421
|
}
|
|
419
|
-
`;
|
|
422
|
+
`;a([r({type:String,reflect:!0})],e.prototype,"type",2);a([r({type:String,reflect:!0})],e.prototype,"variant",2);a([r({type:String,reflect:!0})],e.prototype,"direction",2);a([r({type:String,attribute:"media-type"})],e.prototype,"mediaType",2);a([r({type:String,attribute:"media-href"})],e.prototype,"mediaHref",2);a([r({type:String,attribute:"media-alt"})],e.prototype,"mediaAlt",2);a([r({type:String,attribute:"media-srcset"})],e.prototype,"mediaSrcset",2);a([r({type:String,attribute:"media-sizes"})],e.prototype,"mediaSizes",2);a([r({type:String,attribute:"media-loading"})],e.prototype,"mediaLoading",2);a([r({type:String,attribute:"media-decoding"})],e.prototype,"mediaDecoding",2);a([r({type:String,attribute:"media-fetchpriority"})],e.prototype,"mediaFetchPriority",2);a([r({type:String,attribute:"media-fit"})],e.prototype,"mediaFit",2);a([r({type:String,attribute:"media-position"})],e.prototype,"mediaPosition",2);a([r({type:String,attribute:"media-width"})],e.prototype,"mediaWidth",2);a([r({type:String,attribute:"media-height"})],e.prototype,"mediaHeight",2);a([r({type:String,attribute:"media-aspect"})],e.prototype,"mediaAspect",2);a([r({type:Boolean,attribute:"media-placeholder"})],e.prototype,"mediaPlaceholder",2);a([r({type:String,attribute:"card-href",reflect:!0})],e.prototype,"cardHref",2);a([r({type:String,reflect:!0})],e.prototype,"title",2);a([r({type:String,reflect:!0})],e.prototype,"subtitle",2);a([r({type:String,attribute:"supporting-text",reflect:!0})],e.prototype,"supportingText",2);a([r({type:Date,reflect:!0})],e.prototype,"date",2);a([r({type:String,attribute:"social-comments-text",reflect:!0})],e.prototype,"commentsText",2);a([r({type:Number,attribute:"social-comments",reflect:!0})],e.prototype,"comments",2);a([r({type:String,attribute:"social-likes-text",reflect:!0})],e.prototype,"likesText",2);a([r({type:Number,attribute:"social-likes",reflect:!0})],e.prototype,"likes",2);a([r({type:String,reflect:!0})],e.prototype,"sizing",2);a([r({type:String,reflect:!0})],e.prototype,"width",2);a([r({type:String,reflect:!0,attribute:"max-width"})],e.prototype,"maxWidth",2);a([r({type:String,reflect:!0})],e.prototype,"height",2);a([r({type:String,reflect:!0,attribute:"max-height"})],e.prototype,"maxHeight",2);a([r({type:String,reflect:!0})],e.prototype,"spacing",2);a([r({type:String,attribute:"spacing-top",reflect:!0})],e.prototype,"spacingTop",2);a([r({type:String,attribute:"spacing-bottom",reflect:!0})],e.prototype,"spacingBottom",2);e=a([x("scb-card")],e);
|