@loadsmart/miranda-wc 1.20.1 → 1.21.0
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/dist/components/progress-bar/index.d.ts +1 -0
- package/dist/components/progress-bar/index.d.ts.map +1 -1
- package/dist/components/progress-bar/progress-bar.d.ts +9 -0
- package/dist/components/progress-bar/progress-bar.d.ts.map +1 -1
- package/dist/components/progress-bar/progress-bar.styles.d.ts.map +1 -1
- package/dist/index.js +19 -13
- package/dist/index.js.map +1 -1
- package/dist/styles/typography.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
export type ProgressBarVariant = 'success' | 'warning' | 'danger';
|
|
2
3
|
export interface ProgressBarProps {
|
|
4
|
+
variant?: ProgressBarVariant;
|
|
3
5
|
value: number;
|
|
4
6
|
max: number;
|
|
5
7
|
}
|
|
@@ -7,6 +9,9 @@ export declare class ProgressBar extends LitElement {
|
|
|
7
9
|
#private;
|
|
8
10
|
static styles: import("lit").CSSResult[];
|
|
9
11
|
static get properties(): {
|
|
12
|
+
variant: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
10
15
|
value: {
|
|
11
16
|
type: NumberConstructor;
|
|
12
17
|
noAccessor: boolean;
|
|
@@ -16,6 +21,10 @@ export declare class ProgressBar extends LitElement {
|
|
|
16
21
|
noAccessor: boolean;
|
|
17
22
|
};
|
|
18
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* ProgressBar variant.
|
|
26
|
+
*/
|
|
27
|
+
variant: ProgressBarProps['variant'];
|
|
19
28
|
set value(val: number);
|
|
20
29
|
get value(): number;
|
|
21
30
|
set max(val: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAQvC,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAChC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACZ;AAMD,qBAAa,WAAY,SAAQ,UAAU;;IAC1C,OAAgB,MAAM,4BAAc;IAEpC,WAAoB,UAAU;;;;;;;;;;;;MAM7B;IAED;;OAEG;IACK,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAc7C,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,EAMpB;IAED,IAAI,KAAK,IARM,MAAM,CAUpB;IAED,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,EAOlB;IAED,IAAI,GAAG,IATM,MAAM,CAWlB;;IAUQ,iBAAiB,IAAI,IAAI;cAOf,OAAO,IAAI,IAAI;IASzB,MAAM;CAiBf;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,WAAW,CAAC;KAC9B;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAQA,iBAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"progress-bar.styles.d.ts","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.styles.ts"],"names":[],"mappings":"AAQA,iBAAS,MAAM,4BAgDd;AAED,eAAe,MAAM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1108,22 +1108,14 @@ const bo=Symbol.for(""),go=t=>{if((null==t?void 0:t.r)===bo)return null==t?void
|
|
|
1108
1108
|
flex-basis: calc((var(--m-switcher-threshold) - 100%) * 999);
|
|
1109
1109
|
flex-grow: 1;
|
|
1110
1110
|
}
|
|
1111
|
-
`],window.customElements.define("m-switcher",Xo);class ie extends et{static get properties(){return{value:{type:Number,noAccessor:!0},max:{type:Number,noAccessor:!0}}}set value(e){const r=t(this,oe,"f");o(this,oe,Yo(e,0,t(this,ee,"f")),"f"),this.requestUpdate("value",r)}get value(){return t(this,oe,"f")}set max(e){const r=t(this,ee,"f");o(this,ee,e<=0?100:e,"f"),o(this,oe,Yo(t(this,oe,"f"),0,t(this,ee,"f")),"f"),this.requestUpdate("max",r)}get max(){return t(this,ee,"f")}constructor(){super(),te.add(this),oe.set(this,0),ee.set(this,100),this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(t(this,oe,"f"))),this.setAttribute("aria-valuemax",String(t(this,ee,"f")))}render(){return U`
|
|
1111
|
+
`],window.customElements.define("m-switcher",Xo);class ie extends et{static get properties(){return{variant:{type:String},value:{type:Number,noAccessor:!0},max:{type:Number,noAccessor:!0}}}set value(e){const r=t(this,oe,"f");o(this,oe,Yo(e,0,t(this,ee,"f")),"f"),this.requestUpdate("value",r)}get value(){return t(this,oe,"f")}set max(e){const r=t(this,ee,"f");o(this,ee,e<=0?100:e,"f"),o(this,oe,Yo(t(this,oe,"f"),0,t(this,ee,"f")),"f"),this.requestUpdate("max",r)}get max(){return t(this,ee,"f")}constructor(){super(),te.add(this),oe.set(this,0),ee.set(this,100),this.variant="success",this.value=0,this.max=100}connectedCallback(){super.connectedCallback(),this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0")}updated(){this.setAttribute("aria-valuenow",String(t(this,oe,"f"))),this.setAttribute("aria-valuemax",String(t(this,ee,"f")))}render(){return U`
|
|
1112
1112
|
<div class="bar">
|
|
1113
1113
|
<span
|
|
1114
|
-
class
|
|
1114
|
+
class=${lt({progress:!0,"-success":"success"===this.variant,"-warning":"warning"===this.variant,"-danger":"danger"===this.variant})}
|
|
1115
1115
|
style=${$o({width:`${t(this,te,"m",re).call(this)}%`})}
|
|
1116
1116
|
></span>
|
|
1117
1117
|
</div>
|
|
1118
1118
|
`}}oe=new WeakMap,ee=new WeakMap,te=new WeakSet,re=function(){return 100*t(this,oe,"f")/t(this,ee,"f")},ie.styles=[a`
|
|
1119
|
-
:host {
|
|
1120
|
-
--m-progress-bar-progress-background: linear-gradient(
|
|
1121
|
-
45deg,
|
|
1122
|
-
${Bt("color-brand-accent-1")} 22%,
|
|
1123
|
-
${Bt("color-brand-accent-2")} 88%
|
|
1124
|
-
);
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
1119
|
.bar {
|
|
1128
1120
|
display: flex;
|
|
1129
1121
|
flex-grow: 0;
|
|
@@ -1138,8 +1130,6 @@ const bo=Symbol.for(""),go=t=>{if((null==t?void 0:t.r)===bo)return null==t?void
|
|
|
1138
1130
|
height: ${uo("8px")};
|
|
1139
1131
|
|
|
1140
1132
|
border-radius: ${_t("border-radius-s")};
|
|
1141
|
-
|
|
1142
|
-
background-color: ${Bt("color-background-tertiary")};
|
|
1143
1133
|
}
|
|
1144
1134
|
|
|
1145
1135
|
.progress {
|
|
@@ -1147,7 +1137,7 @@ const bo=Symbol.for(""),go=t=>{if((null==t?void 0:t.r)===bo)return null==t?void
|
|
|
1147
1137
|
top: 0;
|
|
1148
1138
|
left: 0;
|
|
1149
1139
|
|
|
1150
|
-
${Ht([{property:"width"}])};
|
|
1140
|
+
${Ht([{property:"width"},{property:"background"}])};
|
|
1151
1141
|
|
|
1152
1142
|
height: ${uo("8px")};
|
|
1153
1143
|
|
|
@@ -1155,6 +1145,22 @@ const bo=Symbol.for(""),go=t=>{if((null==t?void 0:t.r)===bo)return null==t?void
|
|
|
1155
1145
|
|
|
1156
1146
|
background: var(--m-progress-bar-progress-background);
|
|
1157
1147
|
}
|
|
1148
|
+
|
|
1149
|
+
.-success {
|
|
1150
|
+
--m-progress-bar-progress-background: linear-gradient(
|
|
1151
|
+
45deg,
|
|
1152
|
+
${Bt("color-brand-accent-1")} 22%,
|
|
1153
|
+
${Bt("color-brand-accent-2")} 88%
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
.-warning {
|
|
1158
|
+
--m-progress-bar-progress-background: ${Bt("color-warning-60")};
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.-danger {
|
|
1162
|
+
--m-progress-bar-progress-background: ${Bt("color-danger-60")};
|
|
1163
|
+
}
|
|
1158
1164
|
`],window.customElements.define("m-progress-bar",ie);const ne="m-check";var se,le,ae;class ce extends et{static get properties(){return{value:{type:String},disabled:{type:Boolean,reflect:!0},checked:{type:Boolean,reflect:!0}}}constructor(){super(),se.add(this),this.disabled=!1,this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","radio"),this.addEventListener("click",this.handleClick)}updated(o){super.updated(o),o.has("disabled")&&t(this,se,"m",le).call(this),o.has("checked")&&t(this,se,"m",ae).call(this)}render(){return U`
|
|
1159
1165
|
<button
|
|
1160
1166
|
type="button"
|