@kubex/zinc 1.1.149 → 1.1.150
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.
|
@@ -53493,7 +53493,7 @@
|
|
|
53493
53493
|
"package": {
|
|
53494
53494
|
"name": "@kubex/zinc",
|
|
53495
53495
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
53496
|
-
"version": "1.1.
|
|
53496
|
+
"version": "1.1.150",
|
|
53497
53497
|
"author": "",
|
|
53498
53498
|
"license": "MIT"
|
|
53499
53499
|
}
|
package/dist/web-types.json
CHANGED
package/dist/zn.min.js
CHANGED
|
@@ -2584,7 +2584,7 @@ import{a as Hn,b as z3,c as _r,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var e
|
|
|
2584
2584
|
${i}
|
|
2585
2585
|
</div>
|
|
2586
2586
|
</div>
|
|
2587
|
-
`}};Ri.styles=z(L1),c([d({reflect:!0})],Ri.prototype,"caption",2),c([d({reflect:!0})],Ri.prototype,"label",2),c([d({type:Number,reflect:!0})],Ri.prototype,"steps",2),c([d({type:Number,reflect:!0})],Ri.prototype,"value",2),c([d({type:Boolean,reflect:!0,attribute:"show-progress"})],Ri.prototype,"showProgress",2);var b8=Ri;Ri.define("zn-stepper");var q1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.stat-tile .caption,.stat-tile .description,.stat-tile .amount,.stat-tile .bottom{margin:0}.stat-tile .caption{margin-bottom:var(--zn-spacing-x-small);font-size:var(--zn-text-chart-minor-font-size);line-height:var(--zn-text-chart-minor-line-height);font-weight:var(--zn-text-chart-minor-font-weight);color:var(--zn-text-chart-minor-color)}.stat-tile .container{display:flex;flex-direction:row;gap:var(--zn-spacing-medium);height:100%}.stat-tile .left{flex-
|
|
2587
|
+
`}};Ri.styles=z(L1),c([d({reflect:!0})],Ri.prototype,"caption",2),c([d({reflect:!0})],Ri.prototype,"label",2),c([d({type:Number,reflect:!0})],Ri.prototype,"steps",2),c([d({type:Number,reflect:!0})],Ri.prototype,"value",2),c([d({type:Boolean,reflect:!0,attribute:"show-progress"})],Ri.prototype,"showProgress",2);var b8=Ri;Ri.define("zn-stepper");var q1=_`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}*,*::before,*::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.stat-tile .caption,.stat-tile .description,.stat-tile .amount,.stat-tile .bottom{margin:0}.stat-tile .caption{margin-bottom:var(--zn-spacing-x-small);font-size:var(--zn-text-chart-minor-font-size);line-height:var(--zn-text-chart-minor-line-height);font-weight:var(--zn-text-chart-minor-font-weight);color:var(--zn-text-chart-minor-color)}.stat-tile .container{display:flex;flex-direction:row;gap:var(--zn-spacing-medium);height:100%}.stat-tile .left{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}.stat-tile .amount{color:var(--zn-text-chart-major-color);font-weight:var(--zn-text-chart-major-font-weight);font-size:var(--zn-text-chart-major-font-size);line-height:var(--zn-text-chart-major-line-height);display:flex;flex-grow:1;align-items:center}.stat-tile .bottom{color:rgb(var(--zn-text));font-weight:400;padding-top:var(--zn-spacing-medium);font-size:var(--zn-font-size-small)}.stat-tile .bottom:empty{display:none}.stat-tile .diff .positive{color:rgb(var(--zn-color-success))}.stat-tile .diff .negative{color:rgb(var(--zn-color-error))}.stat-tile .diff .neutral{color:rgb(var(--zn-color-warning))}.stat-tile--chart .amount{padding-top:var(--zn-spacing-small)}.stat-tile--chart .bottom{padding-top:var(--zn-spacing-small)}.stat-tile--primary{color:rgb(var(--zn-primary))}.stat-tile--error{color:rgb(var(--zn-color-error))}.stat-tile--info{color:rgb(var(--zn-color-info))}.stat-tile--warning{color:rgb(var(--zn-color-warning))}.stat-tile--success{color:rgb(var(--zn-color-success))}.stat-tile--neutral{color:rgb(var(--zn-text))}@container (max-width:550px){.stat-tile ::slotted(.zn-col-1){flex-basis:170px}.stat-tile .amount{font-size:20px;line-height:20px;padding-top:5px}}`;var Fr=class extends S{constructor(){super(...arguments);this.caption="";this.description="";this.amount="0";this.type="number";this.previous="0";this.currency="";this.showDelta=!1;this.color="primary"}calcPercentageDifference(){let t=parseFloat(this.previous),n=(parseFloat(this.amount)-t)/t*100;return n=Math.round(n*10)/10,n}getCurrentAmount(){if(this.currency==="")return this.amount;let t=parseFloat(this.amount),r=this.currency,n=t.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${r}${n}`}getDisplayAmount(){if(this.currency!=="")return this.getCurrentAmount();if(this.type==="percent")return`${this.amount}%`;if(this.type==="time"){let t=parseInt(this.amount),r=Math.floor(t/60),n=Math.floor(r/60);return n<=0?[r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s":[n,r%60,t%60].map(a=>a.toString().padStart(2,"0")).join(":")+"s"}return this.amount}diffText(){if(this.showDelta){let t=this.calcPercentageDifference(),r="neutral",n="~";return t>0&&(r="positive",n="+"),t<0&&(r="negative",n="-"),u`<p class="diff"><span class="${r}">${n}${t}%</span> on Previous Period</p>`}return null}render(){return u`
|
|
2588
2588
|
<div class="${M({"stat-tile":!0,[`stat-tile--${this.color}`]:!0})}">
|
|
2589
2589
|
<div class="container">
|
|
2590
2590
|
<div class="left">
|
package/package.json
CHANGED
|
@@ -27,15 +27,12 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.left {
|
|
30
|
-
flex
|
|
30
|
+
flex: 1 1 auto;
|
|
31
|
+
min-width: 0;
|
|
31
32
|
display: flex;
|
|
32
33
|
flex-direction: column;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
.right {
|
|
36
|
-
flex-basis: 50%;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
36
|
.amount {
|
|
40
37
|
color: var(--zn-text-chart-major-color);
|
|
41
38
|
font-weight: var(--zn-text-chart-major-font-weight);
|