scb-wc-test 0.1.246 → 0.1.247

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.
@@ -1,4 +1,4 @@
1
- import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor/vendor.js";import"../scb-chip/scb-chip.js";import"../scb-segmented-button/scb-segmented-button.js";import"../scb-segmented-button/scb-segmented-item.js";import"../scb-accordion/scb-accordion.js";import"../scb-divider/scb-divider.js";import"../scb-horizontal-scroller/scb-horizontal-scroller.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.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(c,o,i){try{customElements.get(c)||e(c,o,i)}catch(a){var r=String(a||"");if(r.indexOf("already been used")===-1&&r.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,T=t=>{throw TypeError(t)},n=(t,e,c,o)=>{for(var i=o>1?void 0:o?R(e,c):e,r=t.length-1,a;r>=0;r--)(a=t[r])&&(i=(o?a(e,c,i):a(i))||i);return o&&i&&H(e,c,i),i},E=(t,e,c)=>e.has(t)||T("Cannot "+c),I=(t,e,c)=>e.has(t)?T("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,c),m=(t,e,c)=>(E(t,e,"access private method"),c),g,L,y;const C=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
1
+ import{a as V,n as h,r as R,i as D,k as T,x as s,E as A,l as z,t as H}from"../../vendor/vendor.js";import"../scb-chip/scb-chip.js";import"../scb-segmented-button/scb-segmented-button.js";import"../scb-segmented-button/scb-segmented-item.js";import"../scb-accordion/scb-accordion.js";import"../scb-divider/scb-divider.js";import"../scb-horizontal-scroller/scb-horizontal-scroller.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-accordion/scb-accordion-item.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.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(l,r,i){try{customElements.get(l)||e(l,r,i)}catch(a){var n=String(a||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw a}}}}catch{}})();var E=Object.defineProperty,P=Object.getOwnPropertyDescriptor,k=t=>{throw TypeError(t)},o=(t,e,l,r)=>{for(var i=r>1?void 0:r?P(e,l):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(i=(r?a(e,l,i):a(i))||i);return r&&i&&E(e,l,i),i},I=(t,e,l)=>e.has(t)||k("Cannot "+l),W=(t,e,l)=>e.has(t)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,l),b=(t,e,l)=>(I(t,e,"access private method"),l),v,M,y,L;const C=`<svg version="1.1" id="Lager_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
2
2
  viewBox="0 0 727.3 87.3" style="enable-background:new 0 0 727.3 87.3;" xml:space="preserve" fill="currentColor">
3
3
  <style type="text/css">
4
4
  .st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}
@@ -113,19 +113,19 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
113
113
  <path d="M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z"/>
114
114
  <path d="M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z"/>
115
115
  </svg>
116
- `;let l=class extends D{constructor(){super(...arguments),I(this,g),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}firstUpdated(t){this._readTableDataFromSlot(),m(this,g,L).call(this),this._syncChipClass()}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&this._syncChipClass(),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&m(this,g,L).call(this)}_onTableSlotChange(t){const e=t.target;e&&this._readTableDataFromSlot(e)}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const c=e.assignedElements({flatten:!0}),o=[];c.forEach(h=>{if(h.tagName==="TABLE"){o.push(h);return}h.querySelectorAll("table").forEach(v=>o.push(v))});const i=o[0];if(!i){this._slottedTableData=void 0;return}const r=[],a=[],d=[],b=h=>h?(h.textContent??"").replace(/\s+/g," ").trim():"",f=h=>h?{html:(h.innerHTML??"").trim(),text:b(h)}:{html:"",text:""},u=i.querySelector("thead tr");u&&Array.from(u.querySelectorAll("th, td")).forEach(v=>r.push(f(v)));const S=Array.from(i.querySelectorAll("tbody tr")),w=S.length>0?S:Array.from(i.querySelectorAll("tr")).filter(h=>h.closest("thead")===null);if(w.forEach(h=>{const v=Array.from(h.querySelectorAll("th, td"));if(v.length===0)return;const $=v[0].tagName==="TH"&&h.closest("thead")===null&&h.closest("tfoot")===null;d.push($);const _=[];v.forEach(z=>_.push(f(z))),a.push(_)}),!u&&a.length>0){const h=a[0],v=w[0],$=Array.from(v?.querySelectorAll("th, td")??[]);$.length>0&&$.every(z=>z.tagName==="TH")&&v?.closest("tbody")===null&&(r.splice(0,r.length,...h),a.shift(),d.shift())}this._slottedTableData={headers:r.length>0?r:void 0,rows:a,rowHeaderRows:d.length>0?d:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(i=>i.length)),c=i=>{if(i==null)return!1;if(typeof i=="number")return!0;const r=String(i).replace(/[\u00A0\u202F\s]+/g,"").trim();return r?/^-?\d+(?:[.,]\d+)?$/.test(r):!1},o=[];for(let i=0;i<e;i+=1){if(i===0){o.push("left");continue}const r=t.rows.map(d=>this._normalizeRenderableCell(d[i]).text).filter(d=>d!==""&&d!==null&&d!==void 0),a=r.length>0&&r.every(c);o.push(a?"right":"left")}return o}_renderTable(){const t=this.tableData??this._slottedTableData;if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),c=Math.max(t.headers?.length??0,...t.rows.map(a=>a.length)),o=(t.headers??[]).map(a=>this._normalizeRenderableCell(a)),i=t.rows.map(a=>{const d=a.map(b=>this._normalizeRenderableCell(b));for(;d.length<c;)d.push({html:"",text:""});return d}),r=t.rowHeaderRows??[];return s`
116
+ `;let c=class extends D{constructor(){super(...arguments),W(this,v),this.variant="Standard",this.selectedChip="Diagram",this.title="",this.subtitle="",this.description="",this.comment="",this.source="",this.footnote="",this.lang="sv",this.imageHref="",this.officialStatistics=!1,this.disableToggle=!1,this.contentMaxWidth="",this.containerMaxWidth="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0}get descriptionLabel(){return this.lang==="en"?"Description of the chart":"Beskrivning av diagrammet"}get moreAboutStatsLabel(){return this.lang==="en"?"More about the statistics":"Mer om statistiken"}get commentLabel(){return this.lang==="en"?"Comments":"Kommentar"}get sourceLabel(){return this.lang==="en"?"Source":"Källa"}get footnoteLabel(){return this.lang==="en"?"Footnotes":"Fotnot"}get officialStatisticsLabel(){return this.lang==="en"?"Official statistics of Sweden":"Sveriges officiella statistik"}get officialStatisticsTitle(){return this.lang==="en"?"Part of Official statistics of Sweden":"Tillhör Sveriges officiella statistik"}get officialStatisticsAlt(){return this.lang==="en"?"Read more about Official statistics of Sweden":"Läs mer om Sveriges officiella statistik"}firstUpdated(t){this._readTableDataFromSlot(),b(this,v,M).call(this),b(this,v,L).call(this),this._syncChipClass()}updated(t){super.updated(t),(t.has("selectedChip")||t.has("variant"))&&this._syncChipClass(),t.has("selectedChip")&&this._dispatchSelectedChipChanged(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&b(this,v,M).call(this),t.has("containerMaxWidth")&&b(this,v,L).call(this)}_onTableSlotChange(t){const e=t.target;e&&this._readTableDataFromSlot(e)}_normalizeRenderableCell(t){return t&&typeof t=="object"&&"html"in t&&"text"in t?{html:typeof t.html=="string"?t.html:"",text:typeof t.text=="string"?t.text:""}:{html:"",text:t==null?"":String(t)}}_readTableDataFromSlot(t){const e=t||this.shadowRoot?.querySelector('slot[name="table"]');if(!e)return;const l=e.assignedElements({flatten:!0}),r=[];l.forEach(d=>{if(d.tagName==="TABLE"){r.push(d);return}d.querySelectorAll("table").forEach(g=>r.push(g))});const i=r[0];if(!i){this._slottedTableData=void 0;return}const n=[],a=[],p=[],m=d=>d?(d.textContent??"").replace(/\s+/g," ").trim():"",f=d=>d?{html:(d.innerHTML??"").trim(),text:m(d)}:{html:"",text:""},u=i.querySelector("thead tr");u&&Array.from(u.querySelectorAll("th, td")).forEach(g=>n.push(f(g)));const w=Array.from(i.querySelectorAll("tbody tr")),$=w.length>0?w:Array.from(i.querySelectorAll("tr")).filter(d=>d.closest("thead")===null);if($.forEach(d=>{const g=Array.from(d.querySelectorAll("th, td"));if(g.length===0)return;const S=g[0].tagName==="TH"&&d.closest("thead")===null&&d.closest("tfoot")===null;p.push(S);const _=[];g.forEach(x=>_.push(f(x))),a.push(_)}),!u&&a.length>0){const d=a[0],g=$[0],S=Array.from(g?.querySelectorAll("th, td")??[]);S.length>0&&S.every(x=>x.tagName==="TH")&&g?.closest("tbody")===null&&(n.splice(0,n.length,...d),a.shift(),p.shift())}this._slottedTableData={headers:n.length>0?n:void 0,rows:a,rowHeaderRows:p.length>0?p:void 0}}_inferTableAlignments(t){const e=Math.max(t.headers?.length??0,...t.rows.map(i=>i.length)),l=i=>{if(i==null)return!1;if(typeof i=="number")return!0;const n=String(i).replace(/[\u00A0\u202F\s]+/g,"").trim();return n?/^-?\d+(?:[.,]\d+)?$/.test(n):!1},r=[];for(let i=0;i<e;i+=1){if(i===0){r.push("left");continue}const n=t.rows.map(p=>this._normalizeRenderableCell(p[i]).text).filter(p=>p!==""&&p!==null&&p!==void 0),a=n.length>0&&n.every(l);r.push(a?"right":"left")}return r}_getResolvedContentMaxWidth(){return this.contentMaxWidth?.trim()||""}_renderTable(){const t=this.tableData??this._slottedTableData;if(!t||!t.rows||t.rows.length===0)return null;const e=this._inferTableAlignments(t),l=Math.max(t.headers?.length??0,...t.rows.map(a=>a.length)),r=(t.headers??[]).map(a=>this._normalizeRenderableCell(a)),i=t.rows.map(a=>{const p=a.map(m=>this._normalizeRenderableCell(m));for(;p.length<l;)p.push({html:"",text:""});return p}),n=t.rowHeaderRows??[];return s`
117
117
  <table class="scb-viz-table" part="table">
118
- ${o.length>0?s`
118
+ ${r.length>0?s`
119
119
  <thead>
120
120
  <tr>
121
- ${o.map((a,d)=>{const b=e[d]==="right"?"align-right":"align-left";return s`<th scope="col" class=${b}>${a.html?M(a.html):a.text}</th>`})}
121
+ ${r.map((a,p)=>{const m=e[p]==="right"?"align-right":"align-left";return s`<th scope="col" class=${m}>${a.html?T(a.html):a.text}</th>`})}
122
122
  </tr>
123
123
  </thead>
124
124
  `:""}
125
125
  <tbody>
126
- ${i.map((a,d)=>{const b=r[d]===!0;return s`
126
+ ${i.map((a,p)=>{const m=n[p]===!0;return s`
127
127
  <tr>
128
- ${a.map((f,u)=>{const S=e[u]==="right"?"align-right":"align-left",w=f.html?M(f.html):f.text;return u===0&&b?s`<th scope="row" class=${S}>${w}</th>`:s`<td class=${S}>${w}</td>`})}
128
+ ${a.map((f,u)=>{const w=e[u]==="right"?"align-right":"align-left",$=f.html?T(f.html):f.text;return u===0&&m?s`<th scope="row" class=${w}>${$}</th>`:s`<td class=${w}>${$}</td>`})}
129
129
  </tr>
130
130
  `})}
131
131
  </tbody>
@@ -186,7 +186,7 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
186
186
  aria-label="${this.officialStatisticsAlt}"
187
187
  >
188
188
  <span class="sos-logotype-small" aria-hidden="true">
189
- ${x(C)}
189
+ ${z(C)}
190
190
  </span>
191
191
  </a>
192
192
  `:""}
@@ -208,7 +208,10 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
208
208
  ${this.title?s` <div class="label">${this.title}</div> `:""}
209
209
  ${this.subtitle?s` <div class="sub-label">${this.subtitle}</div> `:""}
210
210
  </div>
211
- <div class="content image-content">
211
+ <div
212
+ class="content image-content"
213
+ style=${this._getResolvedContentMaxWidth()?`max-width: ${this._getResolvedContentMaxWidth()}; --scb-viz-content-max-width: ${this._getResolvedContentMaxWidth()};`:""}
214
+ >
212
215
  <img src="${this.imageHref}" alt="Image figure" />
213
216
  </div>
214
217
  <div class="footer">
@@ -251,7 +254,7 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
251
254
  aria-label="${this.officialStatisticsAlt}"
252
255
  >
253
256
  <span class="sos-logotype-small" aria-hidden="true">
254
- ${x(C)}
257
+ ${z(C)}
255
258
  </span>
256
259
  </a>
257
260
  `:""}
@@ -294,12 +297,17 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
294
297
  `:""}
295
298
  <div class="content">
296
299
  <scb-horizontal-scroller
297
- width="600px"
300
+ width=${this._getResolvedContentMaxWidth()||A}
298
301
  class="diagram-scroller"
299
302
  variant="inline"
300
303
  show-scrollbar
301
304
  >
302
- <slot name="diagram"></slot>
305
+ <div
306
+ class="diagram-content"
307
+ style=${this._getResolvedContentMaxWidth()?`--scb-viz-content-max-width: ${this._getResolvedContentMaxWidth()};`:""}
308
+ >
309
+ <slot name="diagram"></slot>
310
+ </div>
303
311
  </scb-horizontal-scroller>
304
312
  <scb-horizontal-scroller
305
313
  width="600px"
@@ -350,7 +358,7 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
350
358
  aria-label="${this.officialStatisticsAlt}"
351
359
  >
352
360
  <span class="sos-logotype-small" aria-hidden="true">
353
- ${x(C)}
361
+ ${z(C)}
354
362
  </span>
355
363
  </a>
356
364
  `:""}
@@ -366,14 +374,14 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
366
374
  ></slot>
367
375
  <slot></slot>
368
376
  </div>
369
- `}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}};g=new WeakSet;L=function(){const t=m(this,g,y).call(this,this.spacing),e=m(this,g,y).call(this,this.spacingTop)??t,c=m(this,g,y).call(this,this.spacingBottom)??t,o=m(this,g,y).call(this,this.spacingLeft),i=m(this,g,y).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),c?this.style.setProperty("--scb-viz-spacing-block-end",c):this.style.removeProperty("--scb-viz-spacing-block-end"),o?this.style.setProperty("--scb-viz-spacing-inline-start",o):this.style.removeProperty("--scb-viz-spacing-inline-start"),i?this.style.setProperty("--scb-viz-spacing-inline-end",i):this.style.removeProperty("--scb-viz-spacing-inline-end")};y=function(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};l.styles=k`
377
+ `}}_syncChipClass(){const t=this.variant==="Standard";this.classList.toggle("chip-diagram",t&&this.selectedChip==="Diagram"),this.classList.toggle("chip-table",t&&this.selectedChip==="Table")}_dispatchSelectedChipChanged(){const t={selectedChip:this.selectedChip};this.dispatchEvent(new CustomEvent("selected-chip-changed",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("selectedchipchanged",{detail:t,bubbles:!0,composed:!0}))}_onSegmentedChange(t){const e=t.detail?.value;this.selectedChip===e?this.selectedChip=null:this.selectedChip=e}};v=new WeakSet;M=function(){const t=b(this,v,y).call(this,this.spacing),e=b(this,v,y).call(this,this.spacingTop)??t,l=b(this,v,y).call(this,this.spacingBottom)??t,r=b(this,v,y).call(this,this.spacingLeft),i=b(this,v,y).call(this,this.spacingRight);e?this.style.setProperty("--scb-viz-spacing-block-start",e):this.style.removeProperty("--scb-viz-spacing-block-start"),l?this.style.setProperty("--scb-viz-spacing-block-end",l):this.style.removeProperty("--scb-viz-spacing-block-end"),r?this.style.setProperty("--scb-viz-spacing-inline-start",r):this.style.removeProperty("--scb-viz-spacing-inline-start"),i?this.style.setProperty("--scb-viz-spacing-inline-end",i):this.style.removeProperty("--scb-viz-spacing-inline-end")};y=function(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};L=function(){const t=this.containerMaxWidth?.trim();t?this.style.setProperty("--scb-viz-container-max-width",t):this.style.removeProperty("--scb-viz-container-max-width")};c.styles=V`
370
378
  :host {
371
379
  display: block;
372
380
  font-family: var(--brand-font);
373
381
  color: var(--md-sys-color-on-surface);
374
382
  background: var(--md-sys-color-surface);
375
383
  padding: var(--spacing-7);
376
- max-width: 100%;
384
+ max-width: var(--scb-viz-container-max-width, 100%);
377
385
  border-radius: var(--spacing-04, 16px);
378
386
  border: 1px solid var(--md-sys-color-outline-variant);
379
387
  /* Avstånd till omgivande innehåll styrs av spacing-attributen via CSS-variabler */
@@ -478,6 +486,22 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
478
486
  display: none;
479
487
  }
480
488
 
489
+ .image-content {
490
+ display: none;
491
+ width: 100%;
492
+ }
493
+
494
+ .diagram-content {
495
+ width: 100%;
496
+ max-width: var(--scb-viz-content-max-width, 100%);
497
+ }
498
+
499
+ ::slotted([slot='diagram']) {
500
+ display: block;
501
+ width: 100%;
502
+ max-width: 100%;
503
+ }
504
+
481
505
  :host([variant='Table']) .table-scroller {
482
506
  display: flex;
483
507
  }
@@ -548,4 +572,4 @@ import{a as k,n as p,r as V,i as D,k as M,x as s,l as x,t as A}from"../../vendor
548
572
  text-align: right;
549
573
  white-space: nowrap;
550
574
  }
551
- `;n([p({type:String,reflect:!0})],l.prototype,"variant",2);n([p({type:String,reflect:!0,attribute:"selected-chip"})],l.prototype,"selectedChip",2);n([p({type:String,reflect:!0})],l.prototype,"title",2);n([p({type:String,reflect:!0})],l.prototype,"subtitle",2);n([p({type:String,reflect:!0})],l.prototype,"description",2);n([p({type:String,reflect:!0})],l.prototype,"comment",2);n([p({type:String,reflect:!0})],l.prototype,"source",2);n([p({type:String,reflect:!0})],l.prototype,"footnote",2);n([p({type:String,reflect:!0,attribute:"lang"})],l.prototype,"lang",2);n([p({type:String,reflect:!0,attribute:"image-href"})],l.prototype,"imageHref",2);n([p({type:Boolean,reflect:!0,attribute:"official-statistics"})],l.prototype,"officialStatistics",2);n([p({type:Boolean,reflect:!0,attribute:"disable-toggle"})],l.prototype,"disableToggle",2);n([p({attribute:!1})],l.prototype,"tableData",2);n([V()],l.prototype,"_slottedTableData",2);n([p({type:String,reflect:!0})],l.prototype,"spacing",2);n([p({type:String,attribute:"spacing-top",reflect:!0})],l.prototype,"spacingTop",2);n([p({type:String,attribute:"spacing-bottom",reflect:!0})],l.prototype,"spacingBottom",2);n([p({type:String,attribute:"spacing-left",reflect:!0})],l.prototype,"spacingLeft",2);n([p({type:String,attribute:"spacing-right",reflect:!0})],l.prototype,"spacingRight",2);l=n([A("scb-viz")],l);
575
+ `;o([h({type:String,reflect:!0})],c.prototype,"variant",2);o([h({type:String,reflect:!0,attribute:"selected-chip"})],c.prototype,"selectedChip",2);o([h({type:String,reflect:!0})],c.prototype,"title",2);o([h({type:String,reflect:!0})],c.prototype,"subtitle",2);o([h({type:String,reflect:!0})],c.prototype,"description",2);o([h({type:String,reflect:!0})],c.prototype,"comment",2);o([h({type:String,reflect:!0})],c.prototype,"source",2);o([h({type:String,reflect:!0})],c.prototype,"footnote",2);o([h({type:String,reflect:!0,attribute:"lang"})],c.prototype,"lang",2);o([h({type:String,reflect:!0,attribute:"image-href"})],c.prototype,"imageHref",2);o([h({type:Boolean,reflect:!0,attribute:"official-statistics"})],c.prototype,"officialStatistics",2);o([h({type:Boolean,reflect:!0,attribute:"disable-toggle"})],c.prototype,"disableToggle",2);o([h({type:String,attribute:"content-max-width"})],c.prototype,"contentMaxWidth",2);o([h({type:String,attribute:"container-max-width"})],c.prototype,"containerMaxWidth",2);o([h({attribute:!1})],c.prototype,"tableData",2);o([R()],c.prototype,"_slottedTableData",2);o([h({type:String,reflect:!0})],c.prototype,"spacing",2);o([h({type:String,attribute:"spacing-top",reflect:!0})],c.prototype,"spacingTop",2);o([h({type:String,attribute:"spacing-bottom",reflect:!0})],c.prototype,"spacingBottom",2);o([h({type:String,attribute:"spacing-left",reflect:!0})],c.prototype,"spacingLeft",2);o([h({type:String,attribute:"spacing-right",reflect:!0})],c.prototype,"spacingRight",2);c=o([H("scb-viz")],c);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.246",
3
+ "version": "0.1.247",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -382,5 +382,5 @@
382
382
  },
383
383
  "./mvc/*": "./mvc/*"
384
384
  },
385
- "buildHash": "0B7C0DD7A1BC6ED812C01A00B82C453939B6A752DEE200C4CF9C76E27E40D51A"
385
+ "buildHash": "9A67DE3C4F1EBD1A13CC87D2134B1FC204D73222BC8DBC1F01F73E706573F584"
386
386
  }
@@ -24,6 +24,8 @@ export declare class ScbViz extends LitElement {
24
24
  imageHref: string;
25
25
  officialStatistics: boolean;
26
26
  disableToggle: boolean;
27
+ contentMaxWidth: string;
28
+ containerMaxWidth: string;
27
29
  tableData: ScbVizTableData | undefined;
28
30
  private _slottedTableData;
29
31
  /** Vertikalt avstånd ovanför/under komponenten. 0–14 mappar till spacing-tokens, annars CSS-värde. */
@@ -51,6 +53,7 @@ export declare class ScbViz extends LitElement {
51
53
  private _normalizeRenderableCell;
52
54
  private _readTableDataFromSlot;
53
55
  private _inferTableAlignments;
56
+ private _getResolvedContentMaxWidth;
54
57
  private _renderTable;
55
58
  render(): import('lit-html').TemplateResult<1>;
56
59
  private _syncChipClass;