@kms-ngx-ui/presentational 18.3.0 → 18.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/enums/buttonAppearance.enum.mjs +7 -0
- package/esm2022/lib/ui/button/button.component.mjs +10 -9
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/kms-ngx-ui-presentational.mjs +15 -14
- package/fesm2022/kms-ngx-ui-presentational.mjs.map +1 -1
- package/lib/enums/{buttonType.enum.d.ts → buttonAppearance.enum.d.ts} +1 -1
- package/lib/ui/button/button.component.d.ts +6 -6
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2022/lib/enums/buttonType.enum.mjs +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var ButtonAppearance;
|
|
2
|
+
(function (ButtonAppearance) {
|
|
3
|
+
ButtonAppearance["BASIC"] = "mat-button";
|
|
4
|
+
ButtonAppearance["FLAT"] = "mat-flat-button";
|
|
5
|
+
ButtonAppearance["RAISED"] = "mat-raised-button";
|
|
6
|
+
})(ButtonAppearance || (ButtonAppearance = {}));
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uQXBwZWFyYW5jZS5lbnVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva21zLW5neC11aS1wcmVzZW50YXRpb25hbC9zcmMvbGliL2VudW1zL2J1dHRvbkFwcGVhcmFuY2UuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxnQkFJWDtBQUpELFdBQVksZ0JBQWdCO0lBQzFCLHdDQUFvQixDQUFBO0lBQ3BCLDRDQUF3QixDQUFBO0lBQ3hCLGdEQUE0QixDQUFBO0FBQzlCLENBQUMsRUFKVyxnQkFBZ0IsS0FBaEIsZ0JBQWdCLFFBSTNCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gQnV0dG9uQXBwZWFyYW5jZSB7XG4gIEJBU0lDID0gJ21hdC1idXR0b24nLFxuICBGTEFUID0gJ21hdC1mbGF0LWJ1dHRvbicsXG4gIFJBSVNFRCA9ICdtYXQtcmFpc2VkLWJ1dHRvbicsXG59XG4iXX0=
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @copyright KMS GmbH
|
|
3
3
|
*/
|
|
4
4
|
import { Component, computed, input, output } from '@angular/core';
|
|
5
|
-
import {
|
|
5
|
+
import { ButtonAppearance } from '../../enums/buttonAppearance.enum';
|
|
6
6
|
import { Color, StylingTheme } from '../../enums/colors.enum';
|
|
7
7
|
import { IconSizePx } from '../../enums/iconSize.enum';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
@@ -13,17 +13,18 @@ import * as i4 from "../icon/icon.component";
|
|
|
13
13
|
export class ButtonComponent {
|
|
14
14
|
constructor() {
|
|
15
15
|
this.color = input(StylingTheme.PRIMARY);
|
|
16
|
-
this.type = input(
|
|
16
|
+
this.type = input('button');
|
|
17
|
+
this.appearance = input(ButtonAppearance.FLAT);
|
|
17
18
|
this.loading = input(false);
|
|
18
19
|
this.label = input('');
|
|
19
20
|
this.icon = input();
|
|
20
21
|
this.disabled = input(false);
|
|
21
|
-
this.
|
|
22
|
+
this.buttonClick = output();
|
|
22
23
|
this.StylingTheme = StylingTheme;
|
|
23
24
|
this.IconSize = IconSizePx;
|
|
24
|
-
this.
|
|
25
|
+
this.ButtonAppearance = ButtonAppearance;
|
|
25
26
|
this.iconColor = computed(() => {
|
|
26
|
-
if (this.
|
|
27
|
+
if (this.appearance() !== ButtonAppearance.BASIC) {
|
|
27
28
|
return Color.WHITE;
|
|
28
29
|
}
|
|
29
30
|
switch (this.color()) {
|
|
@@ -37,10 +38,10 @@ export class ButtonComponent {
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ButtonComponent, selector: "kms-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: {
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ButtonComponent, selector: "kms-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "@if (appearance() == ButtonAppearance.BASIC) {\n<button\n mat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--basic-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--basic-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--basic-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.FLAT) {\n<button\n mat-flat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--flat-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--flat-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--flat-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.RAISED) {\n<button\n mat-raised-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--raised-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--raised-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--raised-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n}\n\n<ng-template #buttonTemplate>\n @if(loading()){\n <mat-spinner diameter=\"22\"></mat-spinner>\n } @else { @if (icon()) {\n <kms-icon\n [color]=\"iconColor()\"\n [size]=\"IconSize.XXS\"\n [icon]=\"icon()\"\n ></kms-icon>\n }\n {{ label() }}\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4.IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }] }); }
|
|
41
42
|
}
|
|
42
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
43
44
|
type: Component,
|
|
44
|
-
args: [{ selector: 'kms-button', template: "@if (
|
|
45
|
-
}]
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
args: [{ selector: 'kms-button', template: "@if (appearance() == ButtonAppearance.BASIC) {\n<button\n mat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--basic-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--basic-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--basic-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.FLAT) {\n<button\n mat-flat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--flat-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--flat-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--flat-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.RAISED) {\n<button\n mat-raised-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--raised-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--raised-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--raised-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n}\n\n<ng-template #buttonTemplate>\n @if(loading()){\n <mat-spinner diameter=\"22\"></mat-spinner>\n } @else { @if (icon()) {\n <kms-icon\n [color]=\"iconColor()\"\n [size]=\"IconSize.XXS\"\n [icon]=\"icon()\"\n ></kms-icon>\n }\n {{ label() }}\n }\n</ng-template>\n" }]
|
|
46
|
+
}] });
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL2xpYi91aS9idXR0b24vYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL2xpYi91aS9idXR0b24vYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUUzRSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUNyRSxPQUFPLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQzs7Ozs7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jJcIj48L21hdC1zcGlubmVyPlxuICB9IEBlbHNlIHsgQGlmIChpY29uKCkpIHtcbiAgPGttcy1pY29uXG4gICAgW2NvbG9yXT1cImljb25Db2xvcigpXCJcbiAgICBbc2l6ZV09XCJJY29uU2l6ZS5YWFNcIlxuICAgIFtpY29uXT1cImljb24oKVwiXG4gID48L2ttcy1pY29uPlxuICB9XG4gIHt7IGxhYmVsKCkgfX1cbiAgfVxuPC9uZy10ZW1wbGF0ZT5cbiJdfQ==
|
package/esm2022/public-api.mjs
CHANGED
|
@@ -51,8 +51,8 @@ export * from './lib/pipes/safe-url.pipe';
|
|
|
51
51
|
export * from './lib/pipes/trim.pipe';
|
|
52
52
|
export * from './lib/pipes/typeof.pipe';
|
|
53
53
|
export * from './lib/parent-components/form.component';
|
|
54
|
-
export * from './lib/enums/
|
|
54
|
+
export * from './lib/enums/buttonAppearance.enum';
|
|
55
55
|
export * from './lib/enums/colors.enum';
|
|
56
56
|
export * from './lib/enums/iconSize.enum';
|
|
57
57
|
export * from './lib/enums/radioButtonSize.enum';
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDJDQUEyQyxDQUFDO0FBQzFELGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYyx5Q0FBeUMsQ0FBQztBQUV4RCxjQUFjLGlDQUFpQyxDQUFDO0FBRWhELGNBQWMseUNBQXlDLENBQUM7QUFDeEQsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLDhCQUE4QixDQU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GliL2VudW1zL2J1dHRvbkFwcGVhcmFuY2UuZW51bSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lbnVtcy9jb2xvcnMuZW51bSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lbnVtcy9pY29uU2l6ZS5lbnVtJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2VudW1zL3JhZGlvQnV0dG9uU2l6ZS5lbnVtJztcbiJdfQ==
|
|
@@ -2304,12 +2304,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2304
2304
|
args: ['window:scroll', []]
|
|
2305
2305
|
}] } });
|
|
2306
2306
|
|
|
2307
|
-
var
|
|
2308
|
-
(function (
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
})(
|
|
2307
|
+
var ButtonAppearance;
|
|
2308
|
+
(function (ButtonAppearance) {
|
|
2309
|
+
ButtonAppearance["BASIC"] = "mat-button";
|
|
2310
|
+
ButtonAppearance["FLAT"] = "mat-flat-button";
|
|
2311
|
+
ButtonAppearance["RAISED"] = "mat-raised-button";
|
|
2312
|
+
})(ButtonAppearance || (ButtonAppearance = {}));
|
|
2313
2313
|
|
|
2314
2314
|
/**
|
|
2315
2315
|
* @copyright KMS GmbH
|
|
@@ -2317,17 +2317,18 @@ var ButtonType;
|
|
|
2317
2317
|
class ButtonComponent {
|
|
2318
2318
|
constructor() {
|
|
2319
2319
|
this.color = input(StylingTheme.PRIMARY);
|
|
2320
|
-
this.type = input(
|
|
2320
|
+
this.type = input('button');
|
|
2321
|
+
this.appearance = input(ButtonAppearance.FLAT);
|
|
2321
2322
|
this.loading = input(false);
|
|
2322
2323
|
this.label = input('');
|
|
2323
2324
|
this.icon = input();
|
|
2324
2325
|
this.disabled = input(false);
|
|
2325
|
-
this.
|
|
2326
|
+
this.buttonClick = output();
|
|
2326
2327
|
this.StylingTheme = StylingTheme;
|
|
2327
2328
|
this.IconSize = IconSizePx;
|
|
2328
|
-
this.
|
|
2329
|
+
this.ButtonAppearance = ButtonAppearance;
|
|
2329
2330
|
this.iconColor = computed(() => {
|
|
2330
|
-
if (this.
|
|
2331
|
+
if (this.appearance() !== ButtonAppearance.BASIC) {
|
|
2331
2332
|
return Color.WHITE;
|
|
2332
2333
|
}
|
|
2333
2334
|
switch (this.color()) {
|
|
@@ -2341,12 +2342,12 @@ class ButtonComponent {
|
|
|
2341
2342
|
});
|
|
2342
2343
|
}
|
|
2343
2344
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2344
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ButtonComponent, selector: "kms-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: {
|
|
2345
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ButtonComponent, selector: "kms-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "@if (appearance() == ButtonAppearance.BASIC) {\n<button\n mat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--basic-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--basic-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--basic-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.FLAT) {\n<button\n mat-flat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--flat-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--flat-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--flat-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.RAISED) {\n<button\n mat-raised-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--raised-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--raised-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--raised-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n}\n\n<ng-template #buttonTemplate>\n @if(loading()){\n <mat-spinner diameter=\"22\"></mat-spinner>\n } @else { @if (icon()) {\n <kms-icon\n [color]=\"iconColor()\"\n [size]=\"IconSize.XXS\"\n [icon]=\"icon()\"\n ></kms-icon>\n }\n {{ label() }}\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: IconComponent, selector: "kms-icon", inputs: ["icon", "iconClass", "size", "dontUseSprite", "color"] }] }); }
|
|
2345
2346
|
}
|
|
2346
2347
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
2347
2348
|
type: Component,
|
|
2348
|
-
args: [{ selector: 'kms-button', template: "@if (
|
|
2349
|
-
}]
|
|
2349
|
+
args: [{ selector: 'kms-button', template: "@if (appearance() == ButtonAppearance.BASIC) {\n<button\n mat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--basic-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--basic-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--basic-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.FLAT) {\n<button\n mat-flat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--flat-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--flat-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--flat-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n} @else if (appearance() == ButtonAppearance.RAISED) {\n<button\n mat-raised-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--raised-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--raised-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--raised-warn': color() === StylingTheme.WARN,\n }\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"> </ng-container>\n</button>\n}\n\n<ng-template #buttonTemplate>\n @if(loading()){\n <mat-spinner diameter=\"22\"></mat-spinner>\n } @else { @if (icon()) {\n <kms-icon\n [color]=\"iconColor()\"\n [size]=\"IconSize.XXS\"\n [icon]=\"icon()\"\n ></kms-icon>\n }\n {{ label() }}\n }\n</ng-template>\n" }]
|
|
2350
|
+
}] });
|
|
2350
2351
|
|
|
2351
2352
|
class CardComponent {
|
|
2352
2353
|
constructor() {
|
|
@@ -3396,5 +3397,5 @@ var ButtonResponseType;
|
|
|
3396
3397
|
* Generated bundle index. Do not edit.
|
|
3397
3398
|
*/
|
|
3398
3399
|
|
|
3399
|
-
export { BackToTopComponent, Breakpoint, ButtonComponent, ButtonResponseType,
|
|
3400
|
+
export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DirectivesModule, DropdownFromDataComponent, EnumRadiogroupComponent, FileInputComponent, FlyoutComponent, FormParentComponent, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet, ImageSourceType, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent };
|
|
3400
3401
|
//# sourceMappingURL=kms-ngx-ui-presentational.mjs.map
|