@kms-ngx-ui/presentational 18.3.0 → 18.3.1
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 +9 -8
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/kms-ngx-ui-presentational.mjs +14 -13
- 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 +5 -5
- 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,7 +13,8 @@ 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();
|
|
@@ -21,9 +22,9 @@ export class ButtonComponent {
|
|
|
21
22
|
this.click = 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: { click: "click" }, ngImport: i0, template: "@if (
|
|
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: { click: "click" }, 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)=\"click.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)=\"click.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)=\"click.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)=\"click.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)=\"click.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)=\"click.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL2xpYi91aS9idXR0b24vYnV0dG9uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL2xpYi91aS9idXR0b24vYnV0dG9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUUzRSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUNyRSxPQUFPLEVBQUUsS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQzs7Ozs7O0FBTXZELE1BQU0sT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l09XCJpY29uQ29sb3IoKVwiXG4gICAgW3NpemVdPVwiSWNvblNpemUuWFhTXCJcbiAgICBbaWNvbl09XCJpY29uKClcIlxuICA+PC9rbXMtaWNvbj5cbiAgfVxuICB7eyBsYWJlbCgpIH19XG4gIH1cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2ttcy1uZ3gtdWktcHJlc2VudGF0aW9uYWwvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDJDQUEyQyxDQUFDO0FBQzFELGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYyx5Q0FBeUMsQ0FBQztBQUV4RCxjQUFjLGlDQUFpQyxDQUFDO0FBRWhELGNBQWMseUNBQXlDLENBQUM7QUFDeEQsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsb0NBQW9DLENBQUM7QUFFbkQsY0FBYyxrQ0FBa0MsQ0FBQztBQUVqRCxjQUFjLDRDQUE0Qy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51bSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lbnVtcy9pY29uU2l6ZS5lbnVtJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2VudW1zL3JhZGlvQnV0dG9uU2l6ZS5lbnVtJztcbiJdfQ==
|
|
@@ -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,7 +2317,8 @@ 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();
|
|
@@ -2325,9 +2326,9 @@ class ButtonComponent {
|
|
|
2325
2326
|
this.click = 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: { click: "click" }, ngImport: i0, template: "@if (
|
|
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: { click: "click" }, 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)=\"click.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)=\"click.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)=\"click.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)=\"click.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)=\"click.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)=\"click.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
|