scb-wc-test 0.1.268 → 0.1.270
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-chip/scb-chip.js +15 -14
- package/mvc/components/scb-viz/scb-viz.js +136 -97
- package/package.json +2 -2
- package/scb-chip/scb-chip.js +60 -59
- package/scb-viz/scb-viz.d.ts +6 -0
- package/scb-viz/scb-viz.js +310 -206
- package/scb-wc-test.bundle.js +539 -499
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as
|
|
2
|
+
import{_ as h}from"../../vendor/preload-helper.js";import{a as v,n as a,i as _,x as p,t as f}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 e=customElements.define.bind(customElements);customElements.define=function(r,l,o){try{customElements.get(r)||e(r,l,o)}catch(c){var n=String(c||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var y=Object.defineProperty,g=Object.getOwnPropertyDescriptor,b=t=>{throw TypeError(t)},i=(t,e,r,l)=>{for(var o=l>1?void 0:l?g(e,r):e,n=t.length-1,c;n>=0;n--)(c=t[n])&&(o=(l?c(e,r,o):c(o))||o);return l&&o&&y(e,r,o),o},S=(t,e,r)=>e.has(t)||b("Cannot "+r),E=(t,e,r)=>e.has(t)?b("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),u=(t,e,r)=>(S(t,e,"access private method"),r),d,m;let s=class extends _{constructor(){super(),E(this,d),this.variant="assist",this.label="",this.icon="",this.disabled=!1,this.elevated=!1,this.removable=!1,this.selected=!1,this.href="",this.target="",this.name="",this.value="",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.size="medium",this._internals=null,this.__loadedVariants=new Set,this.__chipSetLoaded=!1,this.__iconLoaded=!1,"attachInternals"in this&&(this._internals=this.attachInternals())}updated(t){super.updated(t),(t.has("variant")||t.has("icon"))&&this.__ensureDepsLoaded(),t.has("disabled")&&(this.toggleAttribute("aria-disabled",this.disabled),this.dispatchEvent(new CustomEvent("disabled-changed",{detail:{disabled:this.disabled},bubbles:!0,composed:!0}))),t.has("variant")&&this.dispatchEvent(new CustomEvent("variant-changed",{detail:{variant:this.variant},bubbles:!0,composed:!0})),t.has("label")&&this.dispatchEvent(new CustomEvent("label-changed",{detail:{label:this.label},bubbles:!0,composed:!0})),t.has("elevated")&&this.dispatchEvent(new CustomEvent("elevated-changed",{detail:{elevated:this.elevated},bubbles:!0,composed:!0})),t.has("icon")&&this.dispatchEvent(new CustomEvent("icon-changed",{detail:{icon:this.icon},bubbles:!0,composed:!0})),t.has("size")&&this.dispatchEvent(new CustomEvent("size-changed",{detail:{size:this.size},bubbles:!0,composed:!0})),(t.has("selected")||t.has("disabled")||t.has("variant")||t.has("value")||t.has("name"))&&this._updateFormValue(),(t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&u(this,d,m).call(this)}firstUpdated(){this.__ensureDepsLoaded(),u(this,d,m).call(this),this._updateFormValue()}async __ensureDepsLoaded(){if(!this.__loadedVariants.has(this.variant)){switch(this.variant){case"assist":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.e),__vite__mapDeps([0,1]),import.meta.url);break;case"filter":await h(()=>import("../../vendor/vendor-material.js").then(t=>t.g),__vite__mapDeps([0,1]),import.meta.url);break}this.__loadedVariants.add(this.variant)}!this._insideChipSet&&!this.__chipSetLoaded&&(await h(()=>import("../../vendor/vendor-material.js").then(t=>t.h),__vite__mapDeps([0,1]),import.meta.url),this.__chipSetLoaded=!0),this.icon&&!this.__iconLoaded&&(await h(()=>import("../../vendor/vendor-material.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),this.__iconLoaded=!0)}get _insideChipSet(){return!!this.closest("md-chip-set")}render(){const t=this._renderChip();return this._insideChipSet?t:p`<md-chip-set>${t}</md-chip-set>`}_renderChip(){const t=this.icon?p`<md-icon slot="icon">${this.icon}</md-icon>`:null;switch(this.variant){case"assist":{const e=this.target==="_blank"?"noopener noreferrer":void 0;return p`
|
|
3
3
|
<md-assist-chip
|
|
4
4
|
label=${this.label}
|
|
5
5
|
?disabled=${this.disabled}
|
|
@@ -11,7 +11,7 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as v,n as a,i as _,x
|
|
|
11
11
|
>
|
|
12
12
|
${t}
|
|
13
13
|
</md-assist-chip>
|
|
14
|
-
`}case"filter":return
|
|
14
|
+
`}case"filter":return p`
|
|
15
15
|
<md-filter-chip
|
|
16
16
|
label=${this.label}
|
|
17
17
|
?disabled=${this.disabled}
|
|
@@ -23,7 +23,7 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as v,n as a,i as _,x
|
|
|
23
23
|
>
|
|
24
24
|
${t}
|
|
25
25
|
</md-filter-chip>
|
|
26
|
-
`;default:return
|
|
26
|
+
`;default:return p``}}_toggleSelected(){this.selected=!this.selected,this.dispatchEvent(new CustomEvent("selected-changed",{detail:{selected:this.selected},bubbles:!0,composed:!0})),this._updateFormValue()}_onRemove(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove",{detail:{label:this.label},bubbles:!0,composed:!0}))}_forward(t){this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail,bubbles:!0,composed:!0}))}_updateFormValue(){if(!this._internals)return;if(!(this.variant==="filter"&&this.selected&&!this.disabled&&!!this.name)){this._internals.setFormValue(null),this._internals.setValidity({});return}const e=this.value||this.label||"";this._internals.setFormValue(e,this.name),this._internals.setValidity({})}formDisabledCallback(t){this.disabled=t}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}};d=new WeakSet;m=function(){const t=this.mapSpacingToken(this.spacing),e=this.mapSpacingToken(this.spacingTop),r=this.mapSpacingToken(this.spacingBottom),l=this.mapSpacingToken(this.spacingLeft),o=this.mapSpacingToken(this.spacingRight),n=e??t,c=r??t;n?this.style.setProperty("--scb-chip-spacing-block-start",n):this.style.removeProperty("--scb-chip-spacing-block-start"),c?this.style.setProperty("--scb-chip-spacing-block-end",c):this.style.removeProperty("--scb-chip-spacing-block-end"),l?this.style.setProperty("--scb-chip-spacing-inline-start",l):this.style.removeProperty("--scb-chip-spacing-inline-start"),o?this.style.setProperty("--scb-chip-spacing-inline-end",o):this.style.removeProperty("--scb-chip-spacing-inline-end")};s.formAssociated=!0;s.styles=v`
|
|
27
27
|
:host {
|
|
28
28
|
display: inline-block;
|
|
29
29
|
margin-block-start: var(--scb-chip-spacing-block-start, 0);
|
|
@@ -44,22 +44,23 @@ import{_ as p}from"../../vendor/preload-helper.js";import{a as v,n as a,i as _,x
|
|
|
44
44
|
Medium (default) är Material-standardvärdena. */
|
|
45
45
|
:host([size='small']) md-assist-chip,
|
|
46
46
|
:host([size='small']) md-filter-chip {
|
|
47
|
-
--md-assist-chip-
|
|
48
|
-
--md-filter-chip-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
--md-assist-chip-label-text-size: var(--md-sys-typescale-label-small-size);
|
|
48
|
+
--md-filter-chip-label-text-size: var(--md-sys-typescale-label-small-size);
|
|
49
|
+
}
|
|
50
|
+
:host([size='medium']) md-assist-chip,
|
|
51
|
+
:host([size='medium']) md-filter-chip {
|
|
52
|
+
--md-assist-chip-label-text-size: var(--md-sys-typescale-label-medium-size);
|
|
53
|
+
--md-filter-chip-label-text-size: var(--md-sys-typescale-label-medium-size);
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
:host([size='large']) md-assist-chip,
|
|
54
57
|
:host([size='large']) md-filter-chip {
|
|
55
|
-
--md-assist-chip-
|
|
56
|
-
--md-filter-chip-
|
|
57
|
-
--md-assist-chip-label-text-size: 0.9375rem;
|
|
58
|
-
--md-filter-chip-label-text-size: 0.9375rem;
|
|
58
|
+
--md-assist-chip-label-text-size: var(--md-sys-typescale-body-large-size);
|
|
59
|
+
--md-filter-chip-label-text-size: var(--md-sys-typescale-body-large-size);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
/* md-icon {
|
|
62
63
|
color: var(--md-sys-color-on-surface);
|
|
63
64
|
font-size: var(--md-sys-typescale-body-large-size);
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
65
|
+
} */
|
|
66
|
+
`;i([a({type:String,reflect:!0})],s.prototype,"variant",2);i([a({type:String})],s.prototype,"label",2);i([a({type:String})],s.prototype,"icon",2);i([a({type:Boolean,reflect:!0})],s.prototype,"disabled",2);i([a({type:Boolean,reflect:!0})],s.prototype,"elevated",2);i([a({type:Boolean,reflect:!0})],s.prototype,"removable",2);i([a({type:Boolean,reflect:!0})],s.prototype,"selected",2);i([a({type:String})],s.prototype,"href",2);i([a({type:String})],s.prototype,"target",2);i([a({type:String})],s.prototype,"name",2);i([a({type:String})],s.prototype,"value",2);i([a({type:String,reflect:!0})],s.prototype,"spacing",2);i([a({type:String,reflect:!0,attribute:"spacing-top"})],s.prototype,"spacingTop",2);i([a({type:String,reflect:!0,attribute:"spacing-bottom"})],s.prototype,"spacingBottom",2);i([a({type:String,reflect:!0,attribute:"spacing-left"})],s.prototype,"spacingLeft",2);i([a({type:String,reflect:!0,attribute:"spacing-right"})],s.prototype,"spacingRight",2);i([a({type:String,reflect:!0})],s.prototype,"size",2);s=i([f("scb-chip")],s);
|