suis 0.27.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/esm2022/lib/components/index.mjs +2 -1
- package/esm2022/lib/components/suis-input-checkbox/suis-input-checkbox.component.mjs +8 -28
- package/esm2022/lib/components/suis-toggle/index.mjs +2 -0
- package/esm2022/lib/components/suis-toggle/suis-toggle.component.mjs +28 -0
- package/esm2022/lib/shared/classes/index.mjs +2 -1
- package/esm2022/lib/shared/classes/suis-checkbox.base.mjs +42 -0
- package/fesm2022/suis.mjs +49 -10
- package/fesm2022/suis.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/suis-input-checkbox/suis-input-checkbox.component.d.ts +3 -11
- package/lib/components/suis-toggle/index.d.ts +1 -0
- package/lib/components/suis-toggle/suis-toggle.component.d.ts +6 -0
- package/lib/shared/classes/index.d.ts +1 -0
- package/lib/shared/classes/suis-checkbox.base.d.ts +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -45,6 +45,7 @@ Modern UI component library. Supports Angular in version 16 and uses its latest
|
|
45
45
|
| Input | SuisInput | suis-input | 0.26.0 |
|
46
46
|
| InputCheckbox | SuisInputCheckbox | suis-input-checkbox | 0.26.0 |
|
47
47
|
| InputRadio | SuisInputRadio | suis-input-radio | 0.27.0 |
|
48
|
+
| Toggle | SuisToggle | suis-toggle | 0.28.0 |
|
48
49
|
|
49
50
|
## Pipes
|
50
51
|
|
@@ -30,5 +30,6 @@ export * from './suis-spinner-container';
|
|
30
30
|
export * from './suis-table';
|
31
31
|
export * from './suis-tabs';
|
32
32
|
export * from './suis-title';
|
33
|
+
export * from './suis-toggle';
|
33
34
|
export * from './suis-toolbar';
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aX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Glvbic7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtbm90aWZpY2F0aW9ucyc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtcGFnaW5hdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtcHJvZ3Jlc3MtYmFyJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3QnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNlbGVjdC1vcHRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNlbGVjdC1tdWx0aSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtc3Bpbm5lcic7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtc3Bpbm5lci1jb250YWluZXInO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXRhYmxlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10YWJzJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10aXRsZSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtdG9nZ2xlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10b29sYmFyJztcbiJdfQ==
|
@@ -1,43 +1,25 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
1
|
+
import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
|
-
import { SuisInputBase } from '../../shared/classes/suis-input.base';
|
4
3
|
import { SuisLabelComponent } from '../suis-label/suis-label.component';
|
5
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
6
5
|
import { SuisIconComponent, SuisIconType } from '../suis-icon';
|
6
|
+
import { SuisCheckboxBase } from '../../shared/classes/suis-checkbox.base';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
import * as i1 from "@angular/common";
|
9
|
-
class SuisInputCheckboxComponent extends
|
9
|
+
class SuisInputCheckboxComponent extends SuisCheckboxBase {
|
10
10
|
constructor() {
|
11
11
|
super(...arguments);
|
12
12
|
/** @internal */
|
13
13
|
this.SuisIconType = SuisIconType;
|
14
|
-
/** @internal */
|
15
|
-
this.value = false;
|
16
|
-
/**
|
17
|
-
* Adds a red colored asterisk after the label. By default set to false.
|
18
|
-
*/
|
19
|
-
this.required = false;
|
20
|
-
}
|
21
|
-
writeValue(obj) {
|
22
|
-
this.value = obj;
|
23
|
-
this._onChange(this.value);
|
24
|
-
this.cdRef.markForCheck();
|
25
|
-
}
|
26
|
-
onChange(event) {
|
27
|
-
const target = event.target;
|
28
|
-
this.value = target.checked;
|
29
|
-
this._onChange(this.value);
|
30
|
-
this.changed.emit(this.value);
|
31
|
-
this.cdRef.markForCheck();
|
32
14
|
}
|
33
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputCheckboxComponent, isStandalone: true, selector: "suis-input-checkbox",
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputCheckboxComponent, isStandalone: true, selector: "suis-input-checkbox", providers: [
|
35
17
|
{
|
36
18
|
provide: NG_VALUE_ACCESSOR,
|
37
19
|
multi: true,
|
38
20
|
useExisting: forwardRef(() => SuisInputCheckboxComponent),
|
39
21
|
},
|
40
|
-
], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
22
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
41
23
|
}
|
42
24
|
export { SuisInputCheckboxComponent };
|
43
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputCheckboxComponent, decorators: [{
|
@@ -48,8 +30,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
48
30
|
multi: true,
|
49
31
|
useExisting: forwardRef(() => SuisInputCheckboxComponent),
|
50
32
|
},
|
51
|
-
], template: "<input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
52
|
-
}]
|
53
|
-
|
54
|
-
}] } });
|
55
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1jaGVja2JveC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY2hlY2tib3gvc3Vpcy1pbnB1dC1jaGVja2JveC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY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9uQ2hhbmdlKCRldmVudClcIlxuICAoZm9jdXMpPVwib25Ub3VjaCgpXCJcbi8+XG5cbjxzdWlzLWxhYmVsXG4gIFtmb3JdPVwiaWRcIlxuICBbcmVxdWlyZWRdPVwicmVxdWlyZWRcIlxuICBbcG9pbnRlcl09XCJ0cnVlXCJcbiAgW3JlYWRvbmx5XT1cInJlYWRvbmx5XCJcbj5cbiAgPGRpdlxuICAgIFt0YWJpbmRleF09XCJyZWFkb25seSA/IC0xIDogMFwiXG4gICAgY2xhc3M9XCJzdWlzLWlucHV0LWNoZWNrYm94X19jaGVja1wiXG4gICAgW2NsYXNzLnN1aXMtaW5wdXQtY2hlY2tib3hfX2NoZWNrLS1pbnZhbGlkXT1cImludmFsaWRcIlxuICAgIFtjbGFzcy5zdWlzLWlucHV0LWNoZWNrYm94X19jaGVjay0tcmVhZG9ubHldPVwicmVhZG9ubHlcIlxuICA+XG4gICAgPHN1aXMtaWNvblxuICAgICAgKm5nSWY9XCJ2YWx1ZVwiXG4gICAgICBbdHlwZV09XCJTdWlzSWNvblR5cGUuQ0hFQ0tcIlxuICAgICAgW2NvbG9yXT1cInJlYWRvbmx5ID8gJ3RlcnRpYXJ5JyA6ICdwcmltYXJ5J1wiXG4gICAgPjwvc3Vpcy1pY29uPlxuICA8L2Rpdj5cbiAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuPC9zdWlzLWxhYmVsPlxuIl19
|
33
|
+
], template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
34
|
+
}] });
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1jaGVja2JveC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY2hlY2tib3gvc3Vpcy1pbnB1dC1jaGVja2JveC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY2hlY2tib3gvc3Vpcy1pbnB1dC1jaGVja2JveC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlC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wicmVhZG9ubHkgPyAndGVydGlhcnknIDogJ3ByaW1hcnknXCJcbiAgICA+PC9zdWlzLWljb24+XG4gIDwvZGl2PlxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L3N1aXMtbGFiZWw+XG4iXX0=
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './suis-toggle.component';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtdG9nZ2xlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N1aXMtdG9nZ2xlLmNvbXBvbmVudCc7XG4iXX0=
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, forwardRef } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisCheckboxBase } from '../../shared/classes/suis-checkbox.base';
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
|
+
import { SuisLabelComponent } from '../suis-label';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
class SuisToggleComponent extends SuisCheckboxBase {
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisToggleComponent, isStandalone: true, selector: "suis-toggle", providers: [
|
10
|
+
{
|
11
|
+
provide: NG_VALUE_ACCESSOR,
|
12
|
+
multi: true,
|
13
|
+
useExisting: forwardRef(() => SuisToggleComponent),
|
14
|
+
},
|
15
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-toggle\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-toggle__container\"\n [class.suis-toggle__container--invalid]=\"invalid\"\n [class.suis-toggle__container--readonly]=\"readonly\"\n >\n <div\n class=\"suis-toggle__container__thumb\"\n [class.suis-toggle__container__thumb--active]=\"value\"\n ></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-toggle{display:none}.suis-toggle__container{width:2.25rem;height:1.25rem;border:.0625rem solid #192a56;border-radius:1rem;display:flex;align-items:center;margin-right:.5rem;background-color:#fff}.suis-toggle__container:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-toggle__container--readonly{border:.0625rem solid #dcdde1}.suis-toggle__container--readonly:focus{box-shadow:none}.suis-toggle__container--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-toggle__container__thumb{border-radius:100%;height:.75rem;width:.75rem;background-color:#dcdde1;transform:translate(.25rem);transition:.25s ease-in-out}.suis-toggle__container__thumb--active{background-color:#192a56;transform:translate(1.125rem)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
16
|
+
}
|
17
|
+
export { SuisToggleComponent };
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisToggleComponent, decorators: [{
|
19
|
+
type: Component,
|
20
|
+
args: [{ selector: 'suis-toggle', standalone: true, imports: [CommonModule, SuisLabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
21
|
+
{
|
22
|
+
provide: NG_VALUE_ACCESSOR,
|
23
|
+
multi: true,
|
24
|
+
useExisting: forwardRef(() => SuisToggleComponent),
|
25
|
+
},
|
26
|
+
], template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-toggle\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-toggle__container\"\n [class.suis-toggle__container--invalid]=\"invalid\"\n [class.suis-toggle__container--readonly]=\"readonly\"\n >\n <div\n class=\"suis-toggle__container__thumb\"\n [class.suis-toggle__container__thumb--active]=\"value\"\n ></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-toggle{display:none}.suis-toggle__container{width:2.25rem;height:1.25rem;border:.0625rem solid #192a56;border-radius:1rem;display:flex;align-items:center;margin-right:.5rem;background-color:#fff}.suis-toggle__container:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-toggle__container--readonly{border:.0625rem solid #dcdde1}.suis-toggle__container--readonly:focus{box-shadow:none}.suis-toggle__container--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-toggle__container__thumb{border-radius:100%;height:.75rem;width:.75rem;background-color:#dcdde1;transform:translate(.25rem);transition:.25s ease-in-out}.suis-toggle__container__thumb--active{background-color:#192a56;transform:translate(1.125rem)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JzdWlzLXRvZ2dsZV9fY29udGFpbmVyX190aHVtYlwiXG4gICAgICBbY2xhc3Muc3Vpcy10b2dnbGVfX2NvbnRhaW5lcl9fdGh1bWItLWFjdGl2ZV09XCJ2YWx1ZVwiXG4gICAgPjwvZGl2PlxuICA8L2Rpdj5cbiAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuPC9zdWlzLWxhYmVsPlxuIl19
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './suis-button.base';
|
2
|
+
export * from './suis-checkbox.base';
|
2
3
|
export * from './suis-input.base';
|
3
4
|
export * from './suis-select.base';
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9zaGFyZWQvY2xhc3Nlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLG9CQUFvQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLWJ1dHRvbi5iYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1jaGVja2JveC5iYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1pbnB1dC5iYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3QuYmFzZSc7XG4iXX0=
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { Directive, ElementRef, Input, ViewChild, } from '@angular/core';
|
2
|
+
import { SuisInputBase } from './suis-input.base';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
class SuisCheckboxBase extends SuisInputBase {
|
5
|
+
constructor() {
|
6
|
+
super(...arguments);
|
7
|
+
/** @internal */
|
8
|
+
this.value = false;
|
9
|
+
/**
|
10
|
+
* Adds a red colored asterisk after the label. By default set to false.
|
11
|
+
*/
|
12
|
+
this.required = false;
|
13
|
+
}
|
14
|
+
ngAfterViewInit() {
|
15
|
+
if (this.value)
|
16
|
+
(this.checkboxInput?.nativeElement).checked = true;
|
17
|
+
}
|
18
|
+
writeValue(obj) {
|
19
|
+
this.value = obj;
|
20
|
+
this._onChange(this.value);
|
21
|
+
this.cdRef.markForCheck();
|
22
|
+
}
|
23
|
+
onChange(event) {
|
24
|
+
const target = event.target;
|
25
|
+
this.value = target.checked;
|
26
|
+
this._onChange(this.value);
|
27
|
+
this.changed.emit(this.value);
|
28
|
+
this.cdRef.markForCheck();
|
29
|
+
}
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisCheckboxBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
31
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisCheckboxBase, inputs: { required: "required" }, viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0 }); }
|
32
|
+
}
|
33
|
+
export { SuisCheckboxBase };
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisCheckboxBase, decorators: [{
|
35
|
+
type: Directive
|
36
|
+
}], propDecorators: { checkboxInput: [{
|
37
|
+
type: ViewChild,
|
38
|
+
args: ['input']
|
39
|
+
}], required: [{
|
40
|
+
type: Input
|
41
|
+
}] } });
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1jaGVja2JveC5iYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInN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uICAgIGlmICh0aGlzLnZhbHVlKVxuICAgICAgKHRoaXMuY2hlY2tib3hJbnB1dD8ubmF0aXZlRWxlbWVudCBhcyBIVE1MSW5wdXRFbGVtZW50KS5jaGVja2VkID0gdHJ1ZTtcbiAgfVxuXG4gIG92ZXJyaWRlIHdyaXRlVmFsdWUob2JqOiBib29sZWFuKTogdm9pZCB7XG4gICAgdGhpcy52YWx1ZSA9IG9iajtcbiAgICB0aGlzLl9vbkNoYW5nZSh0aGlzLnZhbHVlKTtcbiAgICB0aGlzLmNkUmVmLm1hcmtGb3JDaGVjaygpO1xuICB9XG5cbiAgb25DaGFuZ2UoZXZlbnQ6IEV2ZW50KTogdm9pZCB7XG4gICAgY29uc3QgdGFyZ2V0ID0gZXZlbnQudGFyZ2V0IGFzIEhUTUxJbnB1dEVsZW1lbnQ7XG4gICAgdGhpcy52YWx1ZSA9IHRhcmdldC5jaGVja2VkO1xuICAgIHRoaXMuX29uQ2hhbmdlKHRoaXMudmFsdWUpO1xuICAgIHRoaXMuY2hhbmdlZC5lbWl0KHRoaXMudmFsdWUpO1xuICAgIHRoaXMuY2RSZWYubWFya0ZvckNoZWNrKCk7XG4gIH1cbn1cbiJdfQ==
|
package/fesm2022/suis.mjs
CHANGED
@@ -554,18 +554,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
554
554
|
type: Input
|
555
555
|
}] } });
|
556
556
|
|
557
|
-
class
|
557
|
+
class SuisCheckboxBase extends SuisInputBase {
|
558
558
|
constructor() {
|
559
559
|
super(...arguments);
|
560
560
|
/** @internal */
|
561
|
-
this.SuisIconType = SuisIconType;
|
562
|
-
/** @internal */
|
563
561
|
this.value = false;
|
564
562
|
/**
|
565
563
|
* Adds a red colored asterisk after the label. By default set to false.
|
566
564
|
*/
|
567
565
|
this.required = false;
|
568
566
|
}
|
567
|
+
ngAfterViewInit() {
|
568
|
+
if (this.value)
|
569
|
+
(this.checkboxInput?.nativeElement).checked = true;
|
570
|
+
}
|
569
571
|
writeValue(obj) {
|
570
572
|
this.value = obj;
|
571
573
|
this._onChange(this.value);
|
@@ -578,14 +580,32 @@ class SuisInputCheckboxComponent extends SuisInputBase {
|
|
578
580
|
this.changed.emit(this.value);
|
579
581
|
this.cdRef.markForCheck();
|
580
582
|
}
|
583
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisCheckboxBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
584
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisCheckboxBase, inputs: { required: "required" }, viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0 }); }
|
585
|
+
}
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisCheckboxBase, decorators: [{
|
587
|
+
type: Directive
|
588
|
+
}], propDecorators: { checkboxInput: [{
|
589
|
+
type: ViewChild,
|
590
|
+
args: ['input']
|
591
|
+
}], required: [{
|
592
|
+
type: Input
|
593
|
+
}] } });
|
594
|
+
|
595
|
+
class SuisInputCheckboxComponent extends SuisCheckboxBase {
|
596
|
+
constructor() {
|
597
|
+
super(...arguments);
|
598
|
+
/** @internal */
|
599
|
+
this.SuisIconType = SuisIconType;
|
600
|
+
}
|
581
601
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
582
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputCheckboxComponent, isStandalone: true, selector: "suis-input-checkbox",
|
602
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputCheckboxComponent, isStandalone: true, selector: "suis-input-checkbox", providers: [
|
583
603
|
{
|
584
604
|
provide: NG_VALUE_ACCESSOR,
|
585
605
|
multi: true,
|
586
606
|
useExisting: forwardRef(() => SuisInputCheckboxComponent),
|
587
607
|
},
|
588
|
-
], usesInheritance: true, ngImport: i0, template: "<input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
608
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
589
609
|
}
|
590
610
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputCheckboxComponent, decorators: [{
|
591
611
|
type: Component,
|
@@ -595,10 +615,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
595
615
|
multi: true,
|
596
616
|
useExisting: forwardRef(() => SuisInputCheckboxComponent),
|
597
617
|
},
|
598
|
-
], template: "<input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
599
|
-
}]
|
600
|
-
type: Input
|
601
|
-
}] } });
|
618
|
+
], template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-input-checkbox\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-checkbox__check\"\n [class.suis-input-checkbox__check--invalid]=\"invalid\"\n [class.suis-input-checkbox__check--readonly]=\"readonly\"\n >\n <suis-icon\n *ngIf=\"value\"\n [type]=\"SuisIconType.CHECK\"\n [color]=\"readonly ? 'tertiary' : 'primary'\"\n ></suis-icon>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-checkbox{display:none}.suis-input-checkbox__check{width:1.25rem;height:1.25rem;border:.0625rem solid #192a56;display:flex;justify-content:center;align-items:center;margin-right:.5rem;background-color:#fff}.suis-input-checkbox__check:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-checkbox__check--readonly{border:.0625rem solid #dcdde1}.suis-input-checkbox__check--readonly:focus{box-shadow:none}.suis-input-checkbox__check--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
619
|
+
}] });
|
602
620
|
|
603
621
|
class SuisInputChipsComponent extends SuisInputBase {
|
604
622
|
constructor() {
|
@@ -1990,6 +2008,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
1990
2008
|
args: [{ selector: 'suis-title', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<h1 class=\"suis-title\">\n <ng-content></ng-content>\n</h1>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-title{color:#192a56;font-weight:600;font-size:1.5rem}\n"] }]
|
1991
2009
|
}] });
|
1992
2010
|
|
2011
|
+
class SuisToggleComponent extends SuisCheckboxBase {
|
2012
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
2013
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisToggleComponent, isStandalone: true, selector: "suis-toggle", providers: [
|
2014
|
+
{
|
2015
|
+
provide: NG_VALUE_ACCESSOR,
|
2016
|
+
multi: true,
|
2017
|
+
useExisting: forwardRef(() => SuisToggleComponent),
|
2018
|
+
},
|
2019
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-toggle\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-toggle__container\"\n [class.suis-toggle__container--invalid]=\"invalid\"\n [class.suis-toggle__container--readonly]=\"readonly\"\n >\n <div\n class=\"suis-toggle__container__thumb\"\n [class.suis-toggle__container__thumb--active]=\"value\"\n ></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-toggle{display:none}.suis-toggle__container{width:2.25rem;height:1.25rem;border:.0625rem solid #192a56;border-radius:1rem;display:flex;align-items:center;margin-right:.5rem;background-color:#fff}.suis-toggle__container:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-toggle__container--readonly{border:.0625rem solid #dcdde1}.suis-toggle__container--readonly:focus{box-shadow:none}.suis-toggle__container--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-toggle__container__thumb{border-radius:100%;height:.75rem;width:.75rem;background-color:#dcdde1;transform:translate(.25rem);transition:.25s ease-in-out}.suis-toggle__container__thumb--active{background-color:#192a56;transform:translate(1.125rem)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2020
|
+
}
|
2021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisToggleComponent, decorators: [{
|
2022
|
+
type: Component,
|
2023
|
+
args: [{ selector: 'suis-toggle', standalone: true, imports: [CommonModule, SuisLabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
2024
|
+
{
|
2025
|
+
provide: NG_VALUE_ACCESSOR,
|
2026
|
+
multi: true,
|
2027
|
+
useExisting: forwardRef(() => SuisToggleComponent),
|
2028
|
+
},
|
2029
|
+
], template: "<input\n #input\n type=\"checkbox\"\n class=\"suis-toggle\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n\n<suis-label\n [for]=\"id\"\n [required]=\"required\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-toggle__container\"\n [class.suis-toggle__container--invalid]=\"invalid\"\n [class.suis-toggle__container--readonly]=\"readonly\"\n >\n <div\n class=\"suis-toggle__container__thumb\"\n [class.suis-toggle__container__thumb--active]=\"value\"\n ></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-toggle{display:none}.suis-toggle__container{width:2.25rem;height:1.25rem;border:.0625rem solid #192a56;border-radius:1rem;display:flex;align-items:center;margin-right:.5rem;background-color:#fff}.suis-toggle__container:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-toggle__container--readonly{border:.0625rem solid #dcdde1}.suis-toggle__container--readonly:focus{box-shadow:none}.suis-toggle__container--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-toggle__container__thumb{border-radius:100%;height:.75rem;width:.75rem;background-color:#dcdde1;transform:translate(.25rem);transition:.25s ease-in-out}.suis-toggle__container__thumb--active{background-color:#192a56;transform:translate(1.125rem)}\n"] }]
|
2030
|
+
}] });
|
2031
|
+
|
1993
2032
|
class SuisToolbarComponent {
|
1994
2033
|
constructor() {
|
1995
2034
|
/**
|
@@ -2011,5 +2050,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
2011
2050
|
* Generated bundle index. Do not edit.
|
2012
2051
|
*/
|
2013
2052
|
|
2014
|
-
export { SuisAlertComponent, SuisBoxComponent, SuisBreadcrumbsComponent, SuisButtonComponent, SuisButtonLinkComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisContainerComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputCheckboxComponent, SuisInputChipsComponent, SuisInputComponent, SuisInputNumberComponent, SuisInputRadioComponent, SuisLabelComponent, SuisNavigationComponent, SuisNavigationGroupComponent, SuisNavigationGroupItemComponent, SuisNavigationItemComponent, SuisNavigationItemDirective, SuisNavigationModule, SuisNgClassPipe, SuisNotificationComponent, SuisNotificationService, SuisNotificationsComponent, SuisPaginationComponent, SuisProgressBarComponent, SuisSelectComponent, SuisSelectModule, SuisSelectMultiComponent, SuisSelectMultiModule, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent, SuisTabDirective, SuisTableCellDirective, SuisTableColumnDirective, SuisTableComponent, SuisTableModule, SuisTabsComponent, SuisTabsModule, SuisTitleComponent, SuisToolbarComponent };
|
2053
|
+
export { SuisAlertComponent, SuisBoxComponent, SuisBreadcrumbsComponent, SuisButtonComponent, SuisButtonLinkComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisContainerComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputCheckboxComponent, SuisInputChipsComponent, SuisInputComponent, SuisInputNumberComponent, SuisInputRadioComponent, SuisLabelComponent, SuisNavigationComponent, SuisNavigationGroupComponent, SuisNavigationGroupItemComponent, SuisNavigationItemComponent, SuisNavigationItemDirective, SuisNavigationModule, SuisNgClassPipe, SuisNotificationComponent, SuisNotificationService, SuisNotificationsComponent, SuisPaginationComponent, SuisProgressBarComponent, SuisSelectComponent, SuisSelectModule, SuisSelectMultiComponent, SuisSelectMultiModule, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent, SuisTabDirective, SuisTableCellDirective, SuisTableColumnDirective, SuisTableComponent, SuisTableModule, SuisTabsComponent, SuisTabsModule, SuisTitleComponent, SuisToggleComponent, SuisToolbarComponent };
|
2015
2054
|
//# sourceMappingURL=suis.mjs.map
|