@litigiovirtual/ius-design-components 1.0.168 → 1.0.170
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/esm2022/lib/simple-card-contador/simple-card-contador.component.mjs +16 -30
- package/fesm2022/litigiovirtual-ius-design-components.mjs +15 -29
- package/fesm2022/litigiovirtual-ius-design-components.mjs.map +1 -1
- package/lib/simple-card-contador/simple-card-contador.component.d.ts +3 -5
- package/package.json +1 -1
|
@@ -4,50 +4,36 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export class SimpleCardContadorComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.title = '';
|
|
7
|
-
this.value =
|
|
8
|
-
this.maxValue = 0;
|
|
7
|
+
this.value = 0;
|
|
9
8
|
this.valueChange = new EventEmitter();
|
|
10
|
-
this.errorMaxValue = new EventEmitter();
|
|
11
9
|
}
|
|
12
10
|
step(el, dir) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
if (dir > 0)
|
|
12
|
+
el.stepUp();
|
|
13
|
+
else
|
|
14
|
+
el.stepDown();
|
|
15
|
+
this.syncAndEmit(el.value);
|
|
16
16
|
}
|
|
17
|
-
onTyped(
|
|
18
|
-
|
|
19
|
-
this.applyLimitsAndEmit(n, el);
|
|
17
|
+
onTyped(raw) {
|
|
18
|
+
this.syncAndEmit(raw);
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (this.maxValue > 0 && value > this.maxValue) {
|
|
27
|
-
value = this.maxValue;
|
|
28
|
-
this.errorMaxValue.emit('El valor sobrepasa el limite que puedes asignar');
|
|
29
|
-
}
|
|
30
|
-
this.value = value;
|
|
31
|
-
if (el) {
|
|
32
|
-
el.value = String(value);
|
|
33
|
-
}
|
|
34
|
-
this.valueChange.emit(value);
|
|
20
|
+
syncAndEmit(raw) {
|
|
21
|
+
const n = Number(raw);
|
|
22
|
+
const val = Number.isNaN(n) ? 0 : n;
|
|
23
|
+
this.value = val;
|
|
24
|
+
this.valueChange.emit(val);
|
|
35
25
|
}
|
|
36
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleCardContadorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SimpleCardContadorComponent, isStandalone: true, selector: "ius-simple-card-contador", inputs: { title: "title", value: "value"
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SimpleCardContadorComponent, isStandalone: true, selector: "ius-simple-card-contador", inputs: { title: "title", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [value]=\"value\"\r\n (input)=\"onTyped(num.value)\"\r\n />\r\n <button\r\n class=\"spin up\"\r\n (click)=\"step(num, +1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-up'\"\r\n ></ius-icon-xl>\r\n </button>\r\n\r\n <button\r\n class=\"spin down\"\r\n (click)=\"step(num, -1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-down'\"\r\n ></ius-icon-xl>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}.container{display:flex;padding:4px 4px 4px 12px;align-items:center;gap:0;align-self:stretch;border-radius:8px;border:1px solid #eaeaea;background:#fff;justify-content:space-between}.container .left{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;flex:1 1 auto;min-width:0;width:55%}.container .left p{display:flex;align-items:center;gap:10px;margin:0;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Rubik;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right{padding:var(--Spacing-Spacing-xs, 8px);display:flex;align-items:center;width:45%}.container .right .num-wrapper{position:relative;display:inline-flex;align-items:center;height:40px;border-radius:14px;background:#f5f5f5;padding:6px 44px 6px 12px}.container .right .num-wrapper input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:none;border:0;outline:0;width:100%;background:transparent;color:#8c8c8c;font-family:Rubik;font-size:.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right .num-wrapper input::-webkit-outer-spin-button,.container .right .num-wrapper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.container .right .num-wrapper .spin{position:absolute;right:8px;width:28px;height:18px;border:0;background:transparent;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}.container .right .num-wrapper .up{top:15px}.container .right .num-wrapper .down{bottom:-1px}\n"], dependencies: [{ kind: "component", type: IconXlComponent, selector: "ius-icon-xl", inputs: ["iconName", "color"] }] }); }
|
|
38
28
|
}
|
|
39
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleCardContadorComponent, decorators: [{
|
|
40
30
|
type: Component,
|
|
41
|
-
args: [{ selector: 'ius-simple-card-contador', standalone: true, imports: [IconXlComponent], template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [
|
|
31
|
+
args: [{ selector: 'ius-simple-card-contador', standalone: true, imports: [IconXlComponent], template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [value]=\"value\"\r\n (input)=\"onTyped(num.value)\"\r\n />\r\n <button\r\n class=\"spin up\"\r\n (click)=\"step(num, +1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-up'\"\r\n ></ius-icon-xl>\r\n </button>\r\n\r\n <button\r\n class=\"spin down\"\r\n (click)=\"step(num, -1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-down'\"\r\n ></ius-icon-xl>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}.container{display:flex;padding:4px 4px 4px 12px;align-items:center;gap:0;align-self:stretch;border-radius:8px;border:1px solid #eaeaea;background:#fff;justify-content:space-between}.container .left{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;flex:1 1 auto;min-width:0;width:55%}.container .left p{display:flex;align-items:center;gap:10px;margin:0;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Rubik;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right{padding:var(--Spacing-Spacing-xs, 8px);display:flex;align-items:center;width:45%}.container .right .num-wrapper{position:relative;display:inline-flex;align-items:center;height:40px;border-radius:14px;background:#f5f5f5;padding:6px 44px 6px 12px}.container .right .num-wrapper input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:none;border:0;outline:0;width:100%;background:transparent;color:#8c8c8c;font-family:Rubik;font-size:.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right .num-wrapper input::-webkit-outer-spin-button,.container .right .num-wrapper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.container .right .num-wrapper .spin{position:absolute;right:8px;width:28px;height:18px;border:0;background:transparent;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}.container .right .num-wrapper .up{top:15px}.container .right .num-wrapper .down{bottom:-1px}\n"] }]
|
|
42
32
|
}], propDecorators: { title: [{
|
|
43
33
|
type: Input
|
|
44
34
|
}], value: [{
|
|
45
35
|
type: Input
|
|
46
|
-
}], maxValue: [{
|
|
47
|
-
type: Input
|
|
48
36
|
}], valueChange: [{
|
|
49
37
|
type: Output
|
|
50
|
-
}], errorMaxValue: [{
|
|
51
|
-
type: Output
|
|
52
38
|
}] } });
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2ltcGxlLWNhcmQtY29udGFkb3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvaXVzLWRlc2lnbi1jb21wb25lbnRzL3NyYy9saWIvc2ltcGxlLWNhcmQtY29udGFkb3Ivc2ltcGxlLWNhcmQtY29udGFkb3IuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvaXVzLWRlc2lnbi1jb21wb25lbnRzL3NyYy9saWIvc2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B1cFwiXHJcbiAgICAgICAgICAoY2xpY2spPVwic3RlcChudW0sICsxKVwiXHJcbiAgICAgICAgPlxyXG4gICAgICAgICAgPGl1cy1pY29uLXhsXHJcbiAgICAgICAgICAgIFtpY29uTmFtZV09XCInaWNvbi1rZXlib2FyZC1hcnJvdy11cCdcIlxyXG4gICAgICAgICAgPjwvaXVzLWljb24teGw+XHJcbiAgICAgICAgPC9idXR0b24+XHJcblxyXG4gICAgICAgIDxidXR0b25cclxuICAgICAgICAgIGNsYXNzPVwic3BpbiBkb3duXCJcclxuICAgICAgICAgIChjbGljayk9XCJzdGVwKG51bSwgLTEpXCJcclxuICAgICAgICA+XHJcbiAgICAgICAgICA8aXVzLWljb24teGxcclxuICAgICAgICAgICAgW2ljb25OYW1lXT1cIidpY29uLWtleWJvYXJkLWFycm93LWRvd24nXCJcclxuICAgICAgICAgID48L2l1cy1pY29uLXhsPlxyXG4gICAgICAgIDwvYnV0dG9uPlxyXG4gICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG4gIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -5041,51 +5041,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
5041
5041
|
class SimpleCardContadorComponent {
|
|
5042
5042
|
constructor() {
|
|
5043
5043
|
this.title = '';
|
|
5044
|
-
this.value =
|
|
5045
|
-
this.maxValue = 0;
|
|
5044
|
+
this.value = 0;
|
|
5046
5045
|
this.valueChange = new EventEmitter();
|
|
5047
|
-
this.errorMaxValue = new EventEmitter();
|
|
5048
5046
|
}
|
|
5049
5047
|
step(el, dir) {
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5048
|
+
if (dir > 0)
|
|
5049
|
+
el.stepUp();
|
|
5050
|
+
else
|
|
5051
|
+
el.stepDown();
|
|
5052
|
+
this.syncAndEmit(el.value);
|
|
5053
5053
|
}
|
|
5054
|
-
onTyped(
|
|
5055
|
-
|
|
5056
|
-
this.applyLimitsAndEmit(n, el);
|
|
5054
|
+
onTyped(raw) {
|
|
5055
|
+
this.syncAndEmit(raw);
|
|
5057
5056
|
}
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
if (this.maxValue > 0 && value > this.maxValue) {
|
|
5064
|
-
value = this.maxValue;
|
|
5065
|
-
this.errorMaxValue.emit('El valor sobrepasa el limite que puedes asignar');
|
|
5066
|
-
}
|
|
5067
|
-
this.value = value;
|
|
5068
|
-
if (el) {
|
|
5069
|
-
el.value = String(value);
|
|
5070
|
-
}
|
|
5071
|
-
this.valueChange.emit(value);
|
|
5057
|
+
syncAndEmit(raw) {
|
|
5058
|
+
const n = Number(raw);
|
|
5059
|
+
const val = Number.isNaN(n) ? 0 : n;
|
|
5060
|
+
this.value = val;
|
|
5061
|
+
this.valueChange.emit(val);
|
|
5072
5062
|
}
|
|
5073
5063
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleCardContadorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5074
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SimpleCardContadorComponent, isStandalone: true, selector: "ius-simple-card-contador", inputs: { title: "title", value: "value"
|
|
5064
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SimpleCardContadorComponent, isStandalone: true, selector: "ius-simple-card-contador", inputs: { title: "title", value: "value" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [value]=\"value\"\r\n (input)=\"onTyped(num.value)\"\r\n />\r\n <button\r\n class=\"spin up\"\r\n (click)=\"step(num, +1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-up'\"\r\n ></ius-icon-xl>\r\n </button>\r\n\r\n <button\r\n class=\"spin down\"\r\n (click)=\"step(num, -1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-down'\"\r\n ></ius-icon-xl>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}.container{display:flex;padding:4px 4px 4px 12px;align-items:center;gap:0;align-self:stretch;border-radius:8px;border:1px solid #eaeaea;background:#fff;justify-content:space-between}.container .left{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;flex:1 1 auto;min-width:0;width:55%}.container .left p{display:flex;align-items:center;gap:10px;margin:0;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Rubik;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right{padding:var(--Spacing-Spacing-xs, 8px);display:flex;align-items:center;width:45%}.container .right .num-wrapper{position:relative;display:inline-flex;align-items:center;height:40px;border-radius:14px;background:#f5f5f5;padding:6px 44px 6px 12px}.container .right .num-wrapper input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:none;border:0;outline:0;width:100%;background:transparent;color:#8c8c8c;font-family:Rubik;font-size:.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right .num-wrapper input::-webkit-outer-spin-button,.container .right .num-wrapper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.container .right .num-wrapper .spin{position:absolute;right:8px;width:28px;height:18px;border:0;background:transparent;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}.container .right .num-wrapper .up{top:15px}.container .right .num-wrapper .down{bottom:-1px}\n"], dependencies: [{ kind: "component", type: IconXlComponent, selector: "ius-icon-xl", inputs: ["iconName", "color"] }] }); }
|
|
5075
5065
|
}
|
|
5076
5066
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SimpleCardContadorComponent, decorators: [{
|
|
5077
5067
|
type: Component,
|
|
5078
|
-
args: [{ selector: 'ius-simple-card-contador', standalone: true, imports: [IconXlComponent], template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [
|
|
5068
|
+
args: [{ selector: 'ius-simple-card-contador', standalone: true, imports: [IconXlComponent], template: "<div class=\"general-container\">\r\n <div class=\"container\">\r\n <div class=\"left\">\r\n <p>{{ title }}</p>\r\n </div>\r\n\r\n <div class=\"right\">\r\n <div class=\"num-wrapper\">\r\n <input\r\n #num\r\n type=\"number\"\r\n [step]=\"1\"\r\n [value]=\"value\"\r\n (input)=\"onTyped(num.value)\"\r\n />\r\n <button\r\n class=\"spin up\"\r\n (click)=\"step(num, +1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-up'\"\r\n ></ius-icon-xl>\r\n </button>\r\n\r\n <button\r\n class=\"spin down\"\r\n (click)=\"step(num, -1)\"\r\n >\r\n <ius-icon-xl\r\n [iconName]=\"'icon-keyboard-arrow-down'\"\r\n ></ius-icon-xl>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".h1{font-family:Roboto,sans-serif;font-size:2.375rem;font-weight:500;line-height:46px}.h2{font-family:Roboto,sans-serif;font-size:1.875rem;font-weight:700;line-height:38px}.h3{font-family:Roboto,sans-serif;font-size:1.5rem;font-weight:500;line-height:32px}.h4{font-family:Roboto,sans-serif;font-size:1.25rem;font-weight:700;line-height:26px}.h5{font-family:Roboto,sans-serif;font-size:1.125rem;font-weight:500;line-height:24px;letter-spacing:.18px}.label-large{font-family:Roboto,sans-serif;font-size:1rem;font-weight:500;line-height:22px}.body-large{font-family:Rubik,sans-serif;font-size:1rem;font-weight:400;line-height:22px}.label-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:500;line-height:20px;letter-spacing:.28px}.body-base{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;font-style:italic;letter-spacing:.28px}.body-base-1,.body-base-1-1{font-family:Rubik,sans-serif;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.body-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;letter-spacing:.28px}.body-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:400;line-height:16px;font-style:italic;letter-spacing:.28px}.caption-sm{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;letter-spacing:.28px}.caption-sm-italic{font-family:Rubik,sans-serif;font-size:.75rem;font-weight:500;line-height:16px;font-style:italic;letter-spacing:.28px}.general-container{position:relative}.container{display:flex;padding:4px 4px 4px 12px;align-items:center;gap:0;align-self:stretch;border-radius:8px;border:1px solid #eaeaea;background:#fff;justify-content:space-between}.container .left{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;flex:1 1 auto;min-width:0;width:55%}.container .left p{display:flex;align-items:center;gap:10px;margin:0;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Rubik;font-size:.875rem;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right{padding:var(--Spacing-Spacing-xs, 8px);display:flex;align-items:center;width:45%}.container .right .num-wrapper{position:relative;display:inline-flex;align-items:center;height:40px;border-radius:14px;background:#f5f5f5;padding:6px 44px 6px 12px}.container .right .num-wrapper input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:none;border:0;outline:0;width:100%;background:transparent;color:#8c8c8c;font-family:Rubik;font-size:.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:.28px}.container .right .num-wrapper input::-webkit-outer-spin-button,.container .right .num-wrapper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.container .right .num-wrapper .spin{position:absolute;right:8px;width:28px;height:18px;border:0;background:transparent;cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center}.container .right .num-wrapper .up{top:15px}.container .right .num-wrapper .down{bottom:-1px}\n"] }]
|
|
5079
5069
|
}], propDecorators: { title: [{
|
|
5080
5070
|
type: Input
|
|
5081
5071
|
}], value: [{
|
|
5082
5072
|
type: Input
|
|
5083
|
-
}], maxValue: [{
|
|
5084
|
-
type: Input
|
|
5085
5073
|
}], valueChange: [{
|
|
5086
5074
|
type: Output
|
|
5087
|
-
}], errorMaxValue: [{
|
|
5088
|
-
type: Output
|
|
5089
5075
|
}] } });
|
|
5090
5076
|
|
|
5091
5077
|
class SegmentComponent {
|