suis 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/README.md +3 -0
  2. package/esm2022/lib/components/index.mjs +4 -1
  3. package/esm2022/lib/components/suis-alert/suis-alert.component.mjs +1 -1
  4. package/esm2022/lib/components/suis-button/suis-button.component.mjs +2 -2
  5. package/esm2022/lib/components/suis-chip/suis-chip.component.mjs +2 -2
  6. package/esm2022/lib/components/suis-icon/suis-icon-type.pipe.mjs +5 -1
  7. package/esm2022/lib/components/suis-icon/suis-icon.component.mjs +10 -4
  8. package/esm2022/lib/components/suis-icon/suis-icon.enums.mjs +3 -1
  9. package/esm2022/lib/components/suis-input-chips/suis-input-chips.component.mjs +2 -2
  10. package/esm2022/lib/components/suis-input-number/index.mjs +2 -0
  11. package/esm2022/lib/components/suis-input-number/suis-input-number.component.mjs +51 -0
  12. package/esm2022/lib/components/suis-input-text/suis-input-text.component.mjs +4 -4
  13. package/esm2022/lib/components/suis-select/index.mjs +2 -0
  14. package/esm2022/lib/components/suis-select/suis-select-is-selected.pipe.mjs +18 -0
  15. package/esm2022/lib/components/suis-select/suis-select-label.pipe.mjs +23 -0
  16. package/esm2022/lib/components/suis-select/suis-select.component.mjs +69 -0
  17. package/esm2022/lib/components/suis-select-option/index.mjs +4 -0
  18. package/esm2022/lib/components/suis-select-option/suis-select-option.component.mjs +46 -0
  19. package/esm2022/lib/components/suis-select-option/suis-select-option.directive.mjs +21 -0
  20. package/esm2022/lib/components/suis-select-option/suis-select-option.interfaces.mjs +2 -0
  21. package/esm2022/lib/shared/classes/index.mjs +4 -0
  22. package/esm2022/lib/shared/classes/suis-button.base.mjs +35 -0
  23. package/esm2022/lib/shared/classes/suis-input.base.mjs +60 -0
  24. package/esm2022/lib/shared/classes/suis-select.base.mjs +80 -0
  25. package/esm2022/lib/shared/pipes/suis-select-filter-options.pipe.mjs +20 -0
  26. package/esm2022/lib/shared/pipes/suis-select-sort-options.pipe.mjs +18 -0
  27. package/fesm2022/suis.mjs +323 -10
  28. package/fesm2022/suis.mjs.map +1 -1
  29. package/lib/components/index.d.ts +3 -0
  30. package/lib/components/suis-button/suis-button.component.d.ts +1 -1
  31. package/lib/components/suis-icon/suis-icon.component.d.ts +6 -2
  32. package/lib/components/suis-icon/suis-icon.enums.d.ts +3 -1
  33. package/lib/components/suis-input-chips/suis-input-chips.component.d.ts +1 -1
  34. package/lib/components/suis-input-number/index.d.ts +1 -0
  35. package/lib/components/suis-input-number/suis-input-number.component.d.ts +14 -0
  36. package/lib/components/suis-input-text/suis-input-text.component.d.ts +1 -1
  37. package/lib/components/suis-select/index.d.ts +1 -0
  38. package/lib/components/suis-select/suis-select-is-selected.pipe.d.ts +7 -0
  39. package/lib/components/suis-select/suis-select-label.pipe.d.ts +8 -0
  40. package/lib/components/suis-select/suis-select.component.d.ts +12 -0
  41. package/lib/components/suis-select-option/index.d.ts +3 -0
  42. package/lib/components/suis-select-option/suis-select-option.component.d.ts +34 -0
  43. package/lib/components/suis-select-option/suis-select-option.directive.d.ts +10 -0
  44. package/lib/components/suis-select-option/suis-select-option.interfaces.d.ts +4 -0
  45. package/lib/{classes → shared/classes}/index.d.ts +1 -0
  46. package/lib/{classes → shared/classes}/suis-button.base.d.ts +1 -1
  47. package/lib/{classes → shared/classes}/suis-input.base.d.ts +3 -1
  48. package/lib/shared/classes/suis-select.base.d.ts +46 -0
  49. package/lib/shared/pipes/suis-select-filter-options.pipe.d.ts +8 -0
  50. package/lib/shared/pipes/suis-select-sort-options.pipe.d.ts +8 -0
  51. package/package.json +1 -1
  52. package/esm2022/lib/classes/index.mjs +0 -3
  53. package/esm2022/lib/classes/suis-button.base.mjs +0 -35
  54. package/esm2022/lib/classes/suis-input.base.mjs +0 -58
@@ -1,35 +0,0 @@
1
- import { Directive, ElementRef, Input, Renderer2, inject } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- class SuisButtonBase {
4
- constructor() {
5
- /** @internal */
6
- this.elementRef = inject(ElementRef);
7
- /** @internal */
8
- this.renderer2 = inject(Renderer2);
9
- /**
10
- * Sets button's color theme. Type of SuisPalleteColor | SuisInfoColor. By default set to 'primary'.
11
- */
12
- this.color = 'primary';
13
- /**
14
- * Sets button's disabled attribute. By default set to false.
15
- */
16
- this.disabled = false;
17
- /**
18
- * Shows loading spinner instead of content projection. By default set to false.
19
- */
20
- this.loading = false;
21
- }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonBase, inputs: { color: "color", disabled: "disabled", loading: "loading" }, ngImport: i0 }); }
24
- }
25
- export { SuisButtonBase };
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonBase, decorators: [{
27
- type: Directive
28
- }], propDecorators: { color: [{
29
- type: Input
30
- }], disabled: [{
31
- type: Input
32
- }], loading: [{
33
- type: Input
34
- }] } });
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1idXR0b24uYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NsYXNzZXMvc3Vpcy1idXR0b24uYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFHaEYsTUFDc0IsY0FBYztJQURwQztRQUVFLGdCQUFnQjtRQUNHLGVBQVUsR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUM7UUFFbkQsZ0JBQWdCO1FBQ0csY0FBUyx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hbGxldGVDb2xvciB8IFN1aXNJbmZvQ29sb3IgPSAncHJpbWFyeSc7XG5cbiAgLyoqXG4gICAqIFNldHMgYnV0dG9uJ3MgZGlzYWJsZWQgYXR0cmlidXRlLiBCeSBkZWZhdWx0IHNldCB0byBmYWxzZS5cbiAgICovXG4gIEBJbnB1dCgpIGRpc2FibGVkOiBib29sZWFuID0gZmFsc2U7XG5cbiAgLyoqXG4gICAqIFNob3dzIGxvYWRpbmcgc3Bpbm5lciBpbnN0ZWFkIG9mIGNvbnRlbnQgcHJvamVjdGlvbi4gQnkgZGVmYXVsdCBzZXQgdG8gZmFsc2UuXG4gICAqL1xuICBASW5wdXQoKSBsb2FkaW5nOiBib29sZWFuID0gZmFsc2U7XG59XG4iXX0=
@@ -1,58 +0,0 @@
1
- import { ChangeDetectorRef, Directive, 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
- /**
8
- * Sets input disabled state. By default set to false.
9
- */
10
- this.readonly = false;
11
- /**
12
- * Adds invalid styling to the input. By default set to false.
13
- */
14
- this.invalid = false;
15
- /**
16
- * Emits on value changed.
17
- */
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- this.changed = new EventEmitter();
20
- /**
21
- * Emits on input touched.
22
- */
23
- this.touched = new EventEmitter();
24
- // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
25
- this._onChange = (value) => { };
26
- // eslint-disable-next-line @typescript-eslint/no-empty-function
27
- this._onTouched = () => { };
28
- }
29
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
- registerOnChange(fn) {
31
- this._onChange = fn;
32
- }
33
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
- registerOnTouched(fn) {
35
- this._onTouched = fn;
36
- }
37
- /** @internal */
38
- onTouch() {
39
- this._onTouched();
40
- this.touched.emit();
41
- this.cdRef.markForCheck();
42
- }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
44
- 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 }); }
45
- }
46
- export { SuisInputBase };
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisInputBase, decorators: [{
48
- type: Directive
49
- }], propDecorators: { readonly: [{
50
- type: Input
51
- }], invalid: [{
52
- type: Input
53
- }], changed: [{
54
- type: Output
55
- }], touched: [{
56
- type: Output
57
- }] } });
58
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC5iYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY2xhc3Nlcy9zdWlzLWlucHV0LmJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLGlCQUFpQixFQUNqQixTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFDTCxNQUFNLEVBQ04sTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDOztBQUd2QixNQUNzQixhQUFhO0lBRG5DO1FBRUUsZ0JBQWdCO1FBQ0csVUFBSyxHQUFHLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO1FBRXJEOztXQUVHO1FBQ00sYUFBUSxHQUFZLEtBQUssQ0FBQztRQUVuQzs7V0FFRztRQUNNLFlBQU8sR0FBWSxLQUFLLENBQUM7UUFFbEM7O1dBRUc7UUFDSCw4REFBOEQ7UUFDcEQs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