suis 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/README.md +1 -0
  2. package/esm2022/lib/components/index.mjs +2 -1
  3. package/esm2022/lib/components/suis-button/suis-button.component.mjs +2 -2
  4. package/esm2022/lib/components/suis-input-chips/suis-input-chips.component.mjs +2 -2
  5. package/esm2022/lib/components/suis-input-number/index.mjs +2 -0
  6. package/esm2022/lib/components/suis-input-number/suis-input-number.component.mjs +51 -0
  7. package/esm2022/lib/components/suis-input-text/suis-input-text.component.mjs +4 -4
  8. package/esm2022/lib/components/suis-select/suis-select.component.mjs +11 -65
  9. package/esm2022/lib/components/suis-select-option/suis-select-option.component.mjs +10 -4
  10. package/esm2022/lib/shared/classes/index.mjs +4 -0
  11. package/esm2022/lib/shared/classes/suis-button.base.mjs +35 -0
  12. package/esm2022/lib/shared/classes/suis-input.base.mjs +60 -0
  13. package/esm2022/lib/shared/classes/suis-select.base.mjs +80 -0
  14. package/esm2022/lib/shared/pipes/suis-select-filter-options.pipe.mjs +20 -0
  15. package/esm2022/lib/shared/pipes/suis-select-sort-options.pipe.mjs +18 -0
  16. package/fesm2022/suis.mjs +155 -83
  17. package/fesm2022/suis.mjs.map +1 -1
  18. package/lib/components/index.d.ts +1 -0
  19. package/lib/components/suis-button/suis-button.component.d.ts +1 -1
  20. package/lib/components/suis-input-chips/suis-input-chips.component.d.ts +1 -1
  21. package/lib/components/suis-input-number/index.d.ts +1 -0
  22. package/lib/components/suis-input-number/suis-input-number.component.d.ts +14 -0
  23. package/lib/components/suis-input-text/suis-input-text.component.d.ts +1 -1
  24. package/lib/components/suis-select/suis-select.component.d.ts +3 -34
  25. package/lib/components/suis-select-option/suis-select-option.component.d.ts +6 -2
  26. package/lib/{classes → shared/classes}/index.d.ts +1 -0
  27. package/lib/{classes → shared/classes}/suis-button.base.d.ts +1 -1
  28. package/lib/shared/classes/suis-select.base.d.ts +46 -0
  29. package/lib/{components/suis-select → shared/pipes}/suis-select-filter-options.pipe.d.ts +1 -1
  30. package/lib/{components/suis-select → shared/pipes}/suis-select-sort-options.pipe.d.ts +1 -1
  31. package/package.json +1 -1
  32. package/esm2022/lib/classes/index.mjs +0 -3
  33. package/esm2022/lib/classes/suis-button.base.mjs +0 -35
  34. package/esm2022/lib/classes/suis-input.base.mjs +0 -60
  35. package/esm2022/lib/components/suis-select/suis-select-filter-options.pipe.mjs +0 -20
  36. package/esm2022/lib/components/suis-select/suis-select-sort-options.pipe.mjs +0 -18
  37. /package/lib/{classes → shared/classes}/suis-input.base.d.ts +0 -0
@@ -0,0 +1,60 @@
1
+ import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Input, Output, inject, } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ class SuisInputBase {
4
+ constructor() {
5
+ /** @internal */
6
+ this.cdRef = inject(ChangeDetectorRef);
7
+ /** @internal */
8
+ this.elRef = inject(ElementRef);
9
+ /**
10
+ * Sets input disabled state. By default set to false.
11
+ */
12
+ this.readonly = false;
13
+ /**
14
+ * Adds invalid styling to the input. By default set to false.
15
+ */
16
+ this.invalid = false;
17
+ /**
18
+ * Emits on value changed.
19
+ */
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+ this.changed = new EventEmitter();
22
+ /**
23
+ * Emits on input touched.
24
+ */
25
+ this.touched = new EventEmitter();
26
+ // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
27
+ this._onChange = (value) => { };
28
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
29
+ this._onTouched = () => { };
30
+ }
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
+ registerOnChange(fn) {
33
+ this._onChange = fn;
34
+ }
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
+ registerOnTouched(fn) {
37
+ this._onTouched = fn;
38
+ }
39
+ /** @internal */
40
+ onTouch() {
41
+ this._onTouched();
42
+ this.touched.emit();
43
+ this.cdRef.markForCheck();
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputBase, inputs: { readonly: "readonly", invalid: "invalid" }, outputs: { changed: "changed", touched: "touched" }, ngImport: i0 }); }
47
+ }
48
+ export { SuisInputBase };
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputBase, decorators: [{
50
+ type: Directive
51
+ }], propDecorators: { readonly: [{
52
+ type: Input
53
+ }], invalid: [{
54
+ type: Input
55
+ }], changed: [{
56
+ type: Output
57
+ }], touched: [{
58
+ type: Output
59
+ }] } });
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC5iYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvc2hhcmVkL2NsYXNzZXMvc3Vpcy1pbnB1dC5iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxpQkFBaUIsRUFDakIsU0FBUyxFQUNULFVBQVUsRUFDVixZQUFZLEVBQ1osS0FBSyxFQUNMLE1BQU0sRUFDTixNQUFNLEdBQ1AsTUFBTSxlQUFlLENBQUM7O0FBR3ZCLE1BQ3NCLGFBQWE7SUFEbkM7UUFFRSxnQkFBZ0I7UUFDRyxVQUFLLEdBQUcsTUFBTSxDQUFDLGlCQUFpQixDQUFDLENBQUM7UUFFckQsZ0JBQWdCO1FBQ0csVUFBSyxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQztRQUU5Qzs7V0FFRztRQUNNLGFBQVEsR0FBWSxLQUFLL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HRoaXMudG91Y2hlZC5lbWl0KCk7XG4gICAgdGhpcy5jZFJlZi5tYXJrRm9yQ2hlY2soKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,80 @@
1
+ import { ContentChild, Directive, EventEmitter, HostListener, Input, Output, } from '@angular/core';
2
+ import { SuisInputBase } from './suis-input.base';
3
+ import { SuisSelectOptionDirective } from '../../components/suis-select-option/suis-select-option.directive';
4
+ import { SuisIconType } from '../../components/suis-icon/suis-icon.enums';
5
+ import * as i0 from "@angular/core";
6
+ class SuisSelectBase extends SuisInputBase {
7
+ constructor() {
8
+ super(...arguments);
9
+ /** @internal */
10
+ this.SuisIconType = SuisIconType;
11
+ /** @internal */
12
+ this.searchPhrase = '';
13
+ /** @internal */
14
+ this.expanded = false;
15
+ /**
16
+ * Options displayed in dropdown list. Type of SuisSelectOption[].
17
+ */
18
+ this.options = [];
19
+ /**
20
+ * Displays search input above options. By default set to true.
21
+ */
22
+ this.search = true;
23
+ /**
24
+ * Placeholder text displayed in options search. By default set to 'Search...'.
25
+ */
26
+ this.searchPlaceholder = 'Search...';
27
+ /**
28
+ * Placeholder text displayed when value is not selected. By default set to 'Select option...'.
29
+ */
30
+ this.placeholder = 'Select option...';
31
+ /**
32
+ * Emits on search phrase changed.
33
+ */
34
+ this.searchPhraseChanged = new EventEmitter();
35
+ }
36
+ onClear(event) {
37
+ this.clearValue();
38
+ event.stopPropagation();
39
+ }
40
+ onSearchPhraseChange(text) {
41
+ this.searchPhrase = text;
42
+ this.searchPhraseChanged.emit(text);
43
+ }
44
+ onExpand() {
45
+ this.toggle(!this.expanded);
46
+ this.onTouch();
47
+ }
48
+ toggle(value) {
49
+ this.expanded = value;
50
+ this.searchPhrase = '';
51
+ }
52
+ onDocumentClick(event) {
53
+ if (!this.elRef.nativeElement.contains(event.target)) {
54
+ this.expanded = false;
55
+ }
56
+ }
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
58
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectBase, inputs: { options: "options", search: "search", searchPlaceholder: "searchPlaceholder", placeholder: "placeholder" }, outputs: { searchPhraseChanged: "searchPhraseChanged" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, queries: [{ propertyName: "suisSelectOption", first: true, predicate: SuisSelectOptionDirective, descendants: true }], usesInheritance: true, ngImport: i0 }); }
59
+ }
60
+ export { SuisSelectBase };
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectBase, decorators: [{
62
+ type: Directive
63
+ }], propDecorators: { suisSelectOption: [{
64
+ type: ContentChild,
65
+ args: [SuisSelectOptionDirective]
66
+ }], options: [{
67
+ type: Input
68
+ }], search: [{
69
+ type: Input
70
+ }], searchPlaceholder: [{
71
+ type: Input
72
+ }], placeholder: [{
73
+ type: Input
74
+ }], searchPhraseChanged: [{
75
+ type: Output
76
+ }], onDocumentClick: [{
77
+ type: HostListener,
78
+ args: ['document:click', ['$event']]
79
+ }] } });
80
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QuYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL3NoYXJlZC9jbGFzc2VzL3N1aXMtc2VsZWN0LmJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFlBQVksRUFDWixTQUFTLEVBQ1QsWUFBWSxFQUNaLFlBQVksRUFDWixLQUFLLEVBQ0wsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIs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GV4dDogc3RyaW5nKTogdm9pZCB7XG4gICAgdGhpcy5zZWFyY2hQaHJhc2UgPSB0ZXh0O1xuICAgIHRoaXMuc2VhcmNoUGhyYXNlQ2hhbmdlZC5lbWl0KHRleHQpO1xuICB9XG5cbiAgb25FeHBhbmQoKTogdm9pZCB7XG4gICAgdGhpcy50b2dnbGUoIXRoaXMuZXhwYW5kZWQpO1xuICAgIHRoaXMub25Ub3VjaCgpO1xuICB9XG5cbiAgdG9nZ2xlKHZhbHVlOiBib29sZWFuKTogdm9pZCB7XG4gICAgdGhpcy5leHBhbmRlZCA9IHZhbHVlO1xuICAgIHRoaXMuc2VhcmNoUGhyYXNlID0gJyc7XG4gIH1cblxuICBASG9zdExpc3RlbmVyKCdkb2N1bWVudDpjbGljaycsIFsnJGV2ZW50J10pXG4gIG9uRG9jdW1lbnRDbGljayhldmVudDogRXZlbnQpOiB2b2lkIHtcbiAgICBpZiAoIXRoaXMuZWxSZWYubmF0aXZlRWxlbWVudC5jb250YWlucyhldmVudC50YXJnZXQpKSB7XG4gICAgICB0aGlzLmV4cGFuZGVkID0gZmFsc2U7XG4gICAgfVxuICB9XG59XG4iXX0=
@@ -0,0 +1,20 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ class SuisSelectFilterOptionsPipe {
4
+ transform(options, phrase) {
5
+ if (!phrase)
6
+ return options;
7
+ return options.filter((option) => option.label.toLocaleLowerCase().includes(phrase.toLocaleLowerCase()));
8
+ }
9
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectFilterOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
10
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectFilterOptionsPipe, isStandalone: true, name: "suisSelectFilterOptions" }); }
11
+ }
12
+ export { SuisSelectFilterOptionsPipe };
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectFilterOptionsPipe, decorators: [{
14
+ type: Pipe,
15
+ args: [{
16
+ standalone: true,
17
+ name: 'suisSelectFilterOptions',
18
+ }]
19
+ }] });
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtZmlsdGVyLW9wdGlvbnMucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL3NoYXJlZC9waXBlcy9zdWlzLXNlbGVjdC1maWx0ZXItb3B0aW9ucy5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQUdwRCxNQUlhLDJCQUEyQjtJQUN0QyxTQUFTLENBQ1AsT0FBOEIsRUFDOUIsTUFBYztRQUVkLElBQUksQ0FBQyxNQUFNO1lBQUUsT0FBTyxPQUFPLENBQUM7UUFDNUIsT0FBTyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FDL0IsTUFBTSxDQUFDLEtBQUssQ0FBQyxpQkFBaUIsRUFBRSxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsaUJBQWlCLEVBQUUsQ0FBQyxDQUN0RSxDQUFDO0lBQ0osQ0FBQzs4R0FUVSwyQkFBMkI7NEdBQTNCLDJCQUEyQjs7U0FBM0IsMkJBQTJCOzJGQUEzQiwyQkFBMkI7a0JBSnZDLElBQUk7bUJBQUM7b0JBQ0osVUFBVSxFQUFFLElBQUk7b0JBQ2hCLElBQUksRUFBRSx5QkFBeUI7aUJBQ2hDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUGlwZSwgUGlwZVRyYW5zZm9ybSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgU3Vpc1NlbGVjdE9wdGlvbiB9IGZyb20gJy4uLy4uL2NvbXBvbmVudHMvc3Vpcy1zZWxlY3Qtb3B0aW9uJztcblxuQFBpcGUoe1xuICBzdGFuZGFsb25lOiB0cnVlLFxuICBuYW1lOiAnc3Vpc1NlbGVjdEZpbHRlck9wdGlvbnMnLFxufSlcbmV4cG9ydCBjbGFzcyBTdWlzU2VsZWN0RmlsdGVyT3B0aW9uc1BpcGU8VD4gaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgdHJhbnNmb3JtKFxuICAgIG9wdGlvbnM6IFN1aXNTZWxlY3RPcHRpb248VD5bXSxcbiAgICBwaHJhc2U6IHN0cmluZ1xuICApOiBTdWlzU2VsZWN0T3B0aW9uPFQ+W10ge1xuICAgIGlmICghcGhyYXNlKSByZXR1cm4gb3B0aW9ucztcbiAgICByZXR1cm4gb3B0aW9ucy5maWx0ZXIoKG9wdGlvbikgPT5cbiAgICAgIG9wdGlvbi5sYWJlbC50b0xvY2FsZUxvd2VyQ2FzZSgpLmluY2x1ZGVzKHBocmFzZS50b0xvY2FsZUxvd2VyQ2FzZSgpKVxuICAgICk7XG4gIH1cbn1cbiJdfQ==
@@ -0,0 +1,18 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ class SuisSelectSortOptionsPipe {
4
+ transform(options) {
5
+ return options.sort((a, b) => a.label.localeCompare(b.label));
6
+ }
7
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectSortOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
8
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectSortOptionsPipe, isStandalone: true, name: "suisSelectSortOptions" }); }
9
+ }
10
+ export { SuisSelectSortOptionsPipe };
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectSortOptionsPipe, decorators: [{
12
+ type: Pipe,
13
+ args: [{
14
+ standalone: true,
15
+ name: 'suisSelectSortOptions',
16
+ }]
17
+ }] });
18
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3Qtc29ydC1vcHRpb25zLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9zaGFyZWQvcGlwZXMvc3Vpcy1zZWxlY3Qtc29ydC1vcHRpb25zLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7O0FBR3BELE1BSWEseUJBQXlCO0lBQ3BDLFNBQVMsQ0FBQyxPQUE4QjtRQUN0QyxPQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztJQUNoRSxDQUFDOzhHQUhVLHlCQUF5Qjs0R0FBekIseUJBQXlCOztTQUF6Qix5QkFBeUI7MkZBQXpCLHlCQUF5QjtrQkFKckMsSUFBSTttQkFBQztvQkFDSixVQUFVLEVBQUUsSUFBSTtvQkFDaEIsSUFBSSxFQUFFLHVCQUF1QjtpQkFDOUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBTdWlzU2VsZWN0T3B0aW9uIH0gZnJvbSAnLi4vLi4vY29tcG9uZW50cy9zdWlzLXNlbGVjdC1vcHRpb24nO1xuXG5AUGlwZSh7XG4gIHN0YW5kYWxvbmU6IHRydWUsXG4gIG5hbWU6ICdzdWlzU2VsZWN0U29ydE9wdGlvbnMnLFxufSlcbmV4cG9ydCBjbGFzcyBTdWlzU2VsZWN0U29ydE9wdGlvbnNQaXBlPFQ+IGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybShvcHRpb25zOiBTdWlzU2VsZWN0T3B0aW9uPFQ+W10pOiBTdWlzU2VsZWN0T3B0aW9uPFQ+W10ge1xuICAgIHJldHVybiBvcHRpb25zLnNvcnQoKGEsIGIpID0+IGEubGFiZWwubG9jYWxlQ29tcGFyZShiLmxhYmVsKSk7XG4gIH1cbn1cbiJdfQ==
package/fesm2022/suis.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Pipe, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, inject, ElementRef, Renderer2, Directive, ChangeDetectorRef, ViewEncapsulation, HostListener, forwardRef, ViewChild, TemplateRef, ContentChild } from '@angular/core';
2
+ import { Pipe, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, inject, ElementRef, Renderer2, Directive, ChangeDetectorRef, TemplateRef, ContentChild, HostListener, ViewEncapsulation, forwardRef, ViewChild } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
@@ -274,6 +274,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
274
274
  type: Output
275
275
  }] } });
276
276
 
277
+ class SuisSelectOptionDirective {
278
+ constructor() {
279
+ /**
280
+ * Custom template of the option.
281
+ */
282
+ this.templateRef = inject((TemplateRef));
283
+ }
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
285
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectOptionDirective, isStandalone: true, selector: "[suisSelectOption]", ngImport: i0 }); }
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionDirective, decorators: [{
288
+ type: Directive,
289
+ args: [{
290
+ selector: '[suisSelectOption]',
291
+ standalone: true,
292
+ }]
293
+ }] });
294
+
295
+ class SuisSelectBase extends SuisInputBase {
296
+ constructor() {
297
+ super(...arguments);
298
+ /** @internal */
299
+ this.SuisIconType = SuisIconType;
300
+ /** @internal */
301
+ this.searchPhrase = '';
302
+ /** @internal */
303
+ this.expanded = false;
304
+ /**
305
+ * Options displayed in dropdown list. Type of SuisSelectOption[].
306
+ */
307
+ this.options = [];
308
+ /**
309
+ * Displays search input above options. By default set to true.
310
+ */
311
+ this.search = true;
312
+ /**
313
+ * Placeholder text displayed in options search. By default set to 'Search...'.
314
+ */
315
+ this.searchPlaceholder = 'Search...';
316
+ /**
317
+ * Placeholder text displayed when value is not selected. By default set to 'Select option...'.
318
+ */
319
+ this.placeholder = 'Select option...';
320
+ /**
321
+ * Emits on search phrase changed.
322
+ */
323
+ this.searchPhraseChanged = new EventEmitter();
324
+ }
325
+ onClear(event) {
326
+ this.clearValue();
327
+ event.stopPropagation();
328
+ }
329
+ onSearchPhraseChange(text) {
330
+ this.searchPhrase = text;
331
+ this.searchPhraseChanged.emit(text);
332
+ }
333
+ onExpand() {
334
+ this.toggle(!this.expanded);
335
+ this.onTouch();
336
+ }
337
+ toggle(value) {
338
+ this.expanded = value;
339
+ this.searchPhrase = '';
340
+ }
341
+ onDocumentClick(event) {
342
+ if (!this.elRef.nativeElement.contains(event.target)) {
343
+ this.expanded = false;
344
+ }
345
+ }
346
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
347
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectBase, inputs: { options: "options", search: "search", searchPlaceholder: "searchPlaceholder", placeholder: "placeholder" }, outputs: { searchPhraseChanged: "searchPhraseChanged" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, queries: [{ propertyName: "suisSelectOption", first: true, predicate: SuisSelectOptionDirective, descendants: true }], usesInheritance: true, ngImport: i0 }); }
348
+ }
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectBase, decorators: [{
350
+ type: Directive
351
+ }], propDecorators: { suisSelectOption: [{
352
+ type: ContentChild,
353
+ args: [SuisSelectOptionDirective]
354
+ }], options: [{
355
+ type: Input
356
+ }], search: [{
357
+ type: Input
358
+ }], searchPlaceholder: [{
359
+ type: Input
360
+ }], placeholder: [{
361
+ type: Input
362
+ }], searchPhraseChanged: [{
363
+ type: Output
364
+ }], onDocumentClick: [{
365
+ type: HostListener,
366
+ args: ['document:click', ['$event']]
367
+ }] } });
368
+
277
369
  class SuisButtonComponent extends SuisButtonBase {
278
370
  ngAfterViewInit() {
279
371
  this.renderer2.addClass(this.elementRef.nativeElement, 'suis-button');
@@ -429,7 +521,7 @@ class SuisInputTextComponent extends SuisInputBase {
429
521
  multi: true,
430
522
  useExisting: forwardRef(() => SuisInputTextComponent),
431
523
  },
432
- ], usesInheritance: true, ngImport: i0, template: "<input\n class=\"suis-input\"\n [class.suis-input--invalid]=\"invalid\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n (keydown.enter)=\"onEnter()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input{background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;width:100%;height:2rem}.suis-input:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input--invalid{box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
524
+ ], usesInheritance: true, ngImport: i0, template: "<input\n class=\"suis-input-text\"\n [class.suis-input-text--invalid]=\"invalid\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n (keydown.enter)=\"onEnter()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input-text{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem}.suis-input-text:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-text--invalid{box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
433
525
  }
434
526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputTextComponent, decorators: [{
435
527
  type: Component,
@@ -439,7 +531,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
439
531
  multi: true,
440
532
  useExisting: forwardRef(() => SuisInputTextComponent),
441
533
  },
442
- ], template: "<input\n class=\"suis-input\"\n [class.suis-input--invalid]=\"invalid\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n (keydown.enter)=\"onEnter()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input{background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;width:100%;height:2rem}.suis-input:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input--invalid{box-shadow:0 2px 5px #ff4757bf}\n"] }]
534
+ ], template: "<input\n class=\"suis-input-text\"\n [class.suis-input-text--invalid]=\"invalid\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n (keydown.enter)=\"onEnter()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input-text{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem}.suis-input-text:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-text--invalid{box-shadow:0 2px 5px #ff4757bf}\n"] }]
443
535
  }], propDecorators: { type: [{
444
536
  type: Input
445
537
  }], placeholder: [{
@@ -530,6 +622,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
530
622
  args: ['document:click', ['$event']]
531
623
  }] } });
532
624
 
625
+ class SuisInputNumberComponent extends SuisInputBase {
626
+ constructor() {
627
+ super(...arguments);
628
+ /**
629
+ * Placeholder text displayed in input. By default set to empty string.
630
+ */
631
+ this.placeholder = '';
632
+ /** @internal */
633
+ this.value = null;
634
+ }
635
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
636
+ writeValue(obj) {
637
+ this.value = obj;
638
+ this._onChange(this.value);
639
+ this.cdRef.markForCheck();
640
+ }
641
+ onChange(event) {
642
+ const target = event.target;
643
+ this.value = target.value ? Number(target.value) : null;
644
+ this._onChange(this.value);
645
+ this.changed.emit(this.value);
646
+ this.cdRef.markForCheck();
647
+ }
648
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
649
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisInputNumberComponent, isStandalone: true, selector: "suis-input-number", inputs: { placeholder: "placeholder" }, providers: [
650
+ {
651
+ provide: NG_VALUE_ACCESSOR,
652
+ multi: true,
653
+ useExisting: forwardRef(() => SuisInputNumberComponent),
654
+ },
655
+ ], usesInheritance: true, ngImport: i0, template: "<input\n class=\"suis-input-number\"\n [class.suis-input-number--invalid]=\"invalid\"\n type=\"number\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input-number{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;-moz-appearance:textfield}.suis-input-number:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-number--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-input-number::-webkit-outer-spin-button,.suis-input-number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
656
+ }
657
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputNumberComponent, decorators: [{
658
+ type: Component,
659
+ args: [{ selector: 'suis-input-number', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
660
+ {
661
+ provide: NG_VALUE_ACCESSOR,
662
+ multi: true,
663
+ useExisting: forwardRef(() => SuisInputNumberComponent),
664
+ },
665
+ ], template: "<input\n class=\"suis-input-number\"\n [class.suis-input-number--invalid]=\"invalid\"\n type=\"number\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-input-number{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;-moz-appearance:textfield}.suis-input-number:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-number--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-input-number::-webkit-outer-spin-button,.suis-input-number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
666
+ }], propDecorators: { placeholder: [{
667
+ type: Input
668
+ }] } });
669
+
533
670
  class SuisLabelComponent {
534
671
  constructor() {
535
672
  /**
@@ -588,32 +725,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
588
725
  }]
589
726
  }] });
590
727
 
591
- class SuisSelectOptionDirective {
592
- constructor() {
593
- /**
594
- * Custom template of the option.
595
- */
596
- this.templateRef = inject((TemplateRef));
597
- }
598
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
599
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectOptionDirective, isStandalone: true, selector: "[suisSelectOption]", ngImport: i0 }); }
600
- }
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionDirective, decorators: [{
602
- type: Directive,
603
- args: [{
604
- selector: '[suisSelectOption]',
605
- standalone: true,
606
- }]
607
- }] });
608
-
609
728
  class SuisSelectOptionComponent {
610
729
  constructor() {
611
730
  /** @internal */
612
731
  this.SuisIconType = SuisIconType;
613
732
  /**
614
- * Adds checkmark icon to checkbox.
733
+ * Adds checkmark icon to checkbox (if checkbox input set to true). By default set to false.
615
734
  */
616
735
  this.selected = false;
736
+ /**
737
+ * Display checkbox next to option label. By default set to true.
738
+ */
739
+ this.checkbox = true;
617
740
  /**
618
741
  * Emits on option selected.
619
742
  */
@@ -624,11 +747,11 @@ class SuisSelectOptionComponent {
624
747
  this.clicked.emit();
625
748
  }
626
749
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
627
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectOptionComponent, isStandalone: true, selector: "suis-select-option", inputs: { option: "option", templateRef: "templateRef", selected: "selected" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"suis-select-option\"\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"onClick()\"\n>\n <span\n class=\"suis-select-option__checkbox\"\n [class.suis-select-option__checkbox--selected]=\"selected\"\n >\n <suis-icon\n *ngIf=\"selected\"\n [bold]=\"true\"\n color=\"primary\"\n [type]=\"SuisIconType.CHECK\"\n size=\"sm\"\n ></suis-icon>\n </span>\n <span class=\"suis-select-option__label\">\n <ng-container *ngIf=\"templateRef; else label\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: { $implicit: option }\"\n ></ng-container>\n </ng-container>\n <ng-template #label>\n {{ option?.label }}\n </ng-template>\n </span>\n</button>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-option{width:100%;display:flex;align-items:center;background-color:transparent;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem;cursor:pointer}.suis-select-option:hover{background-color:#f5f6fa}.suis-select-option__checkbox{width:1rem;height:1rem;border:.0625rem solid #dcdde1;margin-right:.75rem;display:flex;justify-content:center;align-items:center}.suis-select-option__checkbox--selected{border:.0625rem solid #bcbcbc}.suis-select-option__label{display:flex;justify-content:left;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
750
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectOptionComponent, isStandalone: true, selector: "suis-select-option", inputs: { option: "option", templateRef: "templateRef", selected: "selected", checkbox: "checkbox" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n class=\"suis-select-option\"\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"onClick()\"\n>\n <span\n class=\"suis-select-option__checkbox\"\n [class.suis-select-option__checkbox--selected]=\"selected\"\n *ngIf=\"checkbox\"\n >\n <suis-icon\n *ngIf=\"selected\"\n [bold]=\"true\"\n color=\"primary\"\n [type]=\"SuisIconType.CHECK\"\n size=\"sm\"\n ></suis-icon>\n </span>\n <span class=\"suis-select-option__label\">\n <ng-container *ngIf=\"templateRef; else label\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: { $implicit: option }\"\n ></ng-container>\n </ng-container>\n <ng-template #label>\n {{ option?.label }}\n </ng-template>\n </span>\n</button>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-option{width:100%;display:flex;align-items:center;background-color:transparent;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem;cursor:pointer}.suis-select-option:hover{background-color:#f5f6fa}.suis-select-option__checkbox{width:1rem;height:1rem;border:.0625rem solid #dcdde1;margin-right:.75rem;display:flex;justify-content:center;align-items:center}.suis-select-option__checkbox--selected{border:.0625rem solid #bcbcbc}.suis-select-option__label{display:flex;justify-content:left;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
628
751
  }
629
752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectOptionComponent, decorators: [{
630
753
  type: Component,
631
- args: [{ selector: 'suis-select-option', standalone: true, imports: [CommonModule, SuisIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"suis-select-option\"\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"onClick()\"\n>\n <span\n class=\"suis-select-option__checkbox\"\n [class.suis-select-option__checkbox--selected]=\"selected\"\n >\n <suis-icon\n *ngIf=\"selected\"\n [bold]=\"true\"\n color=\"primary\"\n [type]=\"SuisIconType.CHECK\"\n size=\"sm\"\n ></suis-icon>\n </span>\n <span class=\"suis-select-option__label\">\n <ng-container *ngIf=\"templateRef; else label\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: { $implicit: option }\"\n ></ng-container>\n </ng-container>\n <ng-template #label>\n {{ option?.label }}\n </ng-template>\n </span>\n</button>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-option{width:100%;display:flex;align-items:center;background-color:transparent;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem;cursor:pointer}.suis-select-option:hover{background-color:#f5f6fa}.suis-select-option__checkbox{width:1rem;height:1rem;border:.0625rem solid #dcdde1;margin-right:.75rem;display:flex;justify-content:center;align-items:center}.suis-select-option__checkbox--selected{border:.0625rem solid #bcbcbc}.suis-select-option__label{display:flex;justify-content:left;align-items:center}\n"] }]
754
+ args: [{ selector: 'suis-select-option', standalone: true, imports: [CommonModule, SuisIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"suis-select-option\"\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"onClick()\"\n>\n <span\n class=\"suis-select-option__checkbox\"\n [class.suis-select-option__checkbox--selected]=\"selected\"\n *ngIf=\"checkbox\"\n >\n <suis-icon\n *ngIf=\"selected\"\n [bold]=\"true\"\n color=\"primary\"\n [type]=\"SuisIconType.CHECK\"\n size=\"sm\"\n ></suis-icon>\n </span>\n <span class=\"suis-select-option__label\">\n <ng-container *ngIf=\"templateRef; else label\">\n <ng-container\n *ngTemplateOutlet=\"templateRef; context: { $implicit: option }\"\n ></ng-container>\n </ng-container>\n <ng-template #label>\n {{ option?.label }}\n </ng-template>\n </span>\n</button>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-option{width:100%;display:flex;align-items:center;background-color:transparent;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem;cursor:pointer}.suis-select-option:hover{background-color:#f5f6fa}.suis-select-option__checkbox{width:1rem;height:1rem;border:.0625rem solid #dcdde1;margin-right:.75rem;display:flex;justify-content:center;align-items:center}.suis-select-option__checkbox--selected{border:.0625rem solid #bcbcbc}.suis-select-option__label{display:flex;justify-content:left;align-items:center}\n"] }]
632
755
  }], propDecorators: { option: [{
633
756
  type: Input,
634
757
  args: [{ required: true }]
@@ -636,6 +759,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
636
759
  type: Input
637
760
  }], selected: [{
638
761
  type: Input
762
+ }], checkbox: [{
763
+ type: Input
639
764
  }], clicked: [{
640
765
  type: Output
641
766
  }] } });
@@ -672,33 +797,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
672
797
  }]
673
798
  }] });
674
799
 
675
- class SuisSelectComponent extends SuisInputBase {
800
+ class SuisSelectComponent extends SuisSelectBase {
676
801
  constructor() {
677
802
  super(...arguments);
678
803
  /** @internal */
679
- this.SuisIconType = SuisIconType;
680
- /** @internal */
681
804
  this.value = null;
682
- /** @internal */
683
- this.searchPhrase = '';
684
- /** @internal */
685
- this.expanded = false;
686
- /**
687
- * Options displayed in dropdown list. Type of SuisSelectOption[].
688
- */
689
- this.options = [];
690
- /**
691
- * Displays search input above options. By default set to true.
692
- */
693
- this.search = true;
694
- /**
695
- * Placeholder text displayed in options search. By default set to 'Search...'.
696
- */
697
- this.searchPlaceholder = 'Search...';
698
- /**
699
- * Placeholder text displayed when value is not selected. By default set to 'Select option...'.
700
- */
701
- this.placeholder = 'Select option...';
702
805
  }
703
806
  writeValue(obj) {
704
807
  this.value = obj;
@@ -710,10 +813,6 @@ class SuisSelectComponent extends SuisInputBase {
710
813
  return this.clearValue();
711
814
  this.setValue(value);
712
815
  }
713
- onExpand() {
714
- this.toggle(!this.expanded);
715
- this.onTouch();
716
- }
717
816
  clearValue() {
718
817
  this.setValue(null);
719
818
  }
@@ -724,27 +823,14 @@ class SuisSelectComponent extends SuisInputBase {
724
823
  this.changed.emit();
725
824
  this.cdRef.markForCheck();
726
825
  }
727
- onClear(event) {
728
- this.clearValue();
729
- event.stopPropagation();
730
- }
731
- toggle(value) {
732
- this.expanded = value;
733
- this.searchPhrase = '';
734
- }
735
- onDocumentClick(event) {
736
- if (!this.elRef.nativeElement.contains(event.target)) {
737
- this.expanded = false;
738
- }
739
- }
740
826
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
741
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectComponent, isStandalone: true, selector: "suis-select", inputs: { options: "options", search: "search", searchPlaceholder: "searchPlaceholder", placeholder: "placeholder" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [
827
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectComponent, isStandalone: true, selector: "suis-select", providers: [
742
828
  {
743
829
  provide: NG_VALUE_ACCESSOR,
744
830
  multi: true,
745
831
  useExisting: forwardRef(() => SuisSelectComponent),
746
832
  },
747
- ], queries: [{ propertyName: "suisSelectOption", first: true, predicate: SuisSelectOptionDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [(ngModel)]=\"searchPhrase\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{position:relative;width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 2.75rem .5rem 1rem;border:0;cursor:pointer;height:2rem}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;display:block}.suis-select__button__chevron{position:absolute;right:.5rem;top:.375rem}.suis-select__button__cross{position:absolute;right:1.75rem;top:.375rem}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisSelectOptionComponent, selector: "suis-select-option", inputs: ["option", "templateRef", "selected"], outputs: ["clicked"] }, { kind: "pipe", type: SuisSelectLabelPipe, name: "suisSelectLabel" }, { kind: "pipe", type: SuisSelectIsSelectedPipe, name: "suisSelectIsSelected" }, { kind: "pipe", type: SuisSelectSortOptionsPipe, name: "suisSelectSortOptions" }, { kind: "pipe", type: SuisSelectFilterOptionsPipe, name: "suisSelectFilterOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
833
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{position:relative;width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 2.75rem .5rem 1rem;border:0;cursor:pointer;height:2rem}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;display:block}.suis-select__button__chevron{position:absolute;right:.5rem;top:.375rem}.suis-select__button__cross{position:absolute;right:1.75rem;top:.375rem}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisSelectOptionComponent, selector: "suis-select-option", inputs: ["option", "templateRef", "selected", "checkbox"], outputs: ["clicked"] }, { kind: "pipe", type: SuisSelectLabelPipe, name: "suisSelectLabel" }, { kind: "pipe", type: SuisSelectIsSelectedPipe, name: "suisSelectIsSelected" }, { kind: "pipe", type: SuisSelectSortOptionsPipe, name: "suisSelectSortOptions" }, { kind: "pipe", type: SuisSelectFilterOptionsPipe, name: "suisSelectFilterOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
748
834
  }
749
835
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectComponent, decorators: [{
750
836
  type: Component,
@@ -763,22 +849,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
763
849
  multi: true,
764
850
  useExisting: forwardRef(() => SuisSelectComponent),
765
851
  },
766
- ], template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [(ngModel)]=\"searchPhrase\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{position:relative;width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 2.75rem .5rem 1rem;border:0;cursor:pointer;height:2rem}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;display:block}.suis-select__button__chevron{position:absolute;right:.5rem;top:.375rem}.suis-select__button__cross{position:absolute;right:1.75rem;top:.375rem}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"] }]
767
- }], propDecorators: { suisSelectOption: [{
768
- type: ContentChild,
769
- args: [SuisSelectOptionDirective]
770
- }], options: [{
771
- type: Input
772
- }], search: [{
773
- type: Input
774
- }], searchPlaceholder: [{
775
- type: Input
776
- }], placeholder: [{
777
- type: Input
778
- }], onDocumentClick: [{
779
- type: HostListener,
780
- args: ['document:click', ['$event']]
781
- }] } });
852
+ ], template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{position:relative;width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 2.75rem .5rem 1rem;border:0;cursor:pointer;height:2rem}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;display:block}.suis-select__button__chevron{position:absolute;right:.5rem;top:.375rem}.suis-select__button__cross{position:absolute;right:1.75rem;top:.375rem}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"] }]
853
+ }] });
782
854
 
783
855
  class SuisSpinnerComponent {
784
856
  constructor() {
@@ -842,5 +914,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
842
914
  * Generated bundle index. Do not edit.
843
915
  */
844
916
 
845
- export { SuisAlertComponent, SuisAnchorButtonComponent, SuisBoxComponent, SuisButtonComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputChipsComponent, SuisInputTextComponent, SuisLabelComponent, SuisNgClassPipe, SuisSelectComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent };
917
+ export { SuisAlertComponent, SuisAnchorButtonComponent, SuisBoxComponent, SuisButtonComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputChipsComponent, SuisInputNumberComponent, SuisInputTextComponent, SuisLabelComponent, SuisNgClassPipe, SuisSelectComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent };
846
918
  //# sourceMappingURL=suis.mjs.map