@softpak/components 19.4.0 → 19.5.0-beta.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/README.md +24 -24
- package/fesm2022/softpak-components-spx-alert.mjs +25 -159
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +56 -56
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-button.mjs +28 -111
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-card.mjs +80 -293
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +5 -5
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +52 -52
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +3 -3
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +22 -22
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +23 -202
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +441 -1286
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +44 -44
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +77 -79
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +2 -2
- package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +25 -25
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pipes.mjs +28 -0
- package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-progress-bar.mjs +14 -14
- package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +142 -142
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +2 -2
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +3 -47
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +93 -93
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +4 -7
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +2 -2
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +30 -26
- package/spx-alert/spx-alert.component.d.ts +9 -14
- package/spx-button/spx-button.component.d.ts +15 -18
- package/spx-card/public-api.d.ts +3 -3
- package/spx-card/{spx-card-grid.component.d.ts → spx-card-grid/spx-card-grid.component.d.ts} +2 -2
- package/spx-card/spx-card-item/spx-card-item.component.d.ts +15 -0
- package/spx-card/spx-card-line/spx-card-line.component.d.ts +16 -0
- package/spx-change-details/spx-change-details.component.d.ts +2 -2
- package/spx-form-view/spx-autocomplete-search.component.d.ts +3 -4
- package/spx-form-view/spx-form-field.interface.d.ts +1 -1
- package/spx-form-view/spx-form-view.component.d.ts +10 -10
- package/spx-inputs/input.service.d.ts +12 -0
- package/spx-inputs/public-api.d.ts +2 -2
- package/spx-inputs/{spx-dropdown.component.d.ts → spx-dropdown/spx-dropdown.component.d.ts} +7 -7
- package/spx-inputs/spx-input-box/spx-input-box.component.d.ts +37 -0
- package/spx-inputs/spx-input-date/spx-input-date.component.d.ts +8 -4
- package/spx-inputs/spx-input-float/spx-input-float.component.d.ts +30 -0
- package/spx-inputs/spx-input-number/spx-input-number.component.d.ts +23 -0
- package/spx-inputs/spx-input-radio/spx-input-radio.component.d.ts +27 -0
- package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +33 -0
- package/spx-inputs/spx-input-time/spx-input-time.component.d.ts +35 -0
- package/spx-inputs/{spx-input-time-modal.component.d.ts → spx-input-time-modal/spx-input-time-modal.component.d.ts} +6 -7
- package/spx-inputs/spx-input-type.enum.d.ts +2 -1
- package/spx-inputs/spx-input.component.d.ts +50 -49
- package/spx-number-check/spx-number-check.component.d.ts +1 -3
- package/spx-pipes/index.d.ts +5 -0
- package/spx-pipes/public-api.d.ts +1 -0
- package/spx-pipes/spx-severity-pipe.d.ts +8 -0
- package/tailwind.css +1 -1
- package/spx-card/spx-card-item.component.d.ts +0 -24
- package/spx-card/spx-card-line.component.d.ts +0 -17
- package/spx-inputs/spx-input-box.component.d.ts +0 -40
- package/spx-inputs/spx-input-float.component.d.ts +0 -30
- package/spx-inputs/spx-input-number.component.d.ts +0 -23
- package/spx-inputs/spx-input-radio.component.d.ts +0 -27
- package/spx-inputs/spx-input-text.component.d.ts +0 -31
- package/spx-inputs/spx-input-time.component.d.ts +0 -45
|
@@ -1,109 +1,51 @@
|
|
|
1
1
|
import { NgClass } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { input, output, viewChild, Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';
|
|
4
4
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
5
|
+
import { IsSeverityPipe } from '@softpak/components/spx-pipes';
|
|
5
6
|
|
|
6
7
|
class SpxButtonComponent {
|
|
7
8
|
constructor() {
|
|
8
|
-
this.spxDisabled = false;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
9
|
+
this.spxDisabled = input(false);
|
|
10
|
+
this.spxClass = input();
|
|
11
|
+
this.spxClassObject = input();
|
|
12
|
+
this.spxForm = input();
|
|
13
|
+
this.spxFullHeight = input();
|
|
14
|
+
this.spxFullWidth = input();
|
|
15
|
+
this.spxSeverity = input(SpxSeverityEnum.info);
|
|
16
|
+
this.spxSize = input('lg');
|
|
17
|
+
this.spxTabIndex = input();
|
|
18
|
+
this.spxType = input('submit');
|
|
19
|
+
this.spxClick = output();
|
|
20
|
+
this.buttonRef = viewChild('buttonRef');
|
|
21
|
+
this.SpxSeverity = SpxSeverityEnum;
|
|
13
22
|
this.hasShadowDom = (el) => {
|
|
14
23
|
return !!el.shadowRoot && !!el.attachShadow;
|
|
15
24
|
};
|
|
16
25
|
this.handleClick = () => {
|
|
17
|
-
if (!this.spxDisabled) {
|
|
26
|
+
if (!this.spxDisabled()) {
|
|
18
27
|
this.spxClick.emit();
|
|
19
28
|
}
|
|
20
29
|
};
|
|
21
30
|
}
|
|
22
|
-
get hostClassBlock() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
get
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
get
|
|
31
|
+
get hostClassBlock() {
|
|
32
|
+
return this.spxFullWidth();
|
|
33
|
+
}
|
|
34
|
+
get hostClassHFull() {
|
|
35
|
+
return this.spxFullHeight();
|
|
36
|
+
}
|
|
37
|
+
get hostClassWFull() {
|
|
38
|
+
return this.spxFullWidth();
|
|
39
|
+
}
|
|
29
40
|
spxSetFocus() {
|
|
30
|
-
|
|
31
|
-
this.buttonRef?.nativeElement?.focus();
|
|
41
|
+
this.buttonRef()?.nativeElement?.focus();
|
|
32
42
|
}
|
|
33
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
35
|
-
<button
|
|
36
|
-
#buttonRef
|
|
37
|
-
class="border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r"
|
|
38
|
-
[class.h-full]="this.spxFullHeight"
|
|
39
|
-
[class.w-full]="this.spxFullWidth"
|
|
40
|
-
[class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
|
|
41
|
-
[class.focus:ring-blue-600]="!this.spxSeverity || this.severityInfo"
|
|
42
|
-
[class.from-red-400]="this.severityError"
|
|
43
|
-
[class.to-red-600]="this.severityError"
|
|
44
|
-
[class.focus:ring-red-600]="this.severityError"
|
|
45
|
-
[class.from-lime-400]="this.severitySuccess"
|
|
46
|
-
[class.to-lime-600]="this.severitySuccess"
|
|
47
|
-
[class.focus:ring-lime-600]="this.severitySuccess"
|
|
48
|
-
[class.from-amber-400]="this.severityWarning"
|
|
49
|
-
[class.to-amber-600]="this.severityWarning"
|
|
50
|
-
[class.focus:ring-amber-600]="this.severityWarning"
|
|
51
|
-
[class.py-2]="!this.spxSize || this.spxSize === 'lg'"
|
|
52
|
-
[class.py-4]="!this.spxSize || this.spxSize === 'xl'"
|
|
53
|
-
[class.text-xl]="this.spxSize === 'xl'"
|
|
54
|
-
[class.text-lg]="this.spxSize === 'lg'"
|
|
55
|
-
[class.cursor-pointer]="!this.spxDisabled"
|
|
56
|
-
[class.cursor-not-allowed]="this.spxDisabled"
|
|
57
|
-
[class.opacity-50]="this.spxDisabled"
|
|
58
|
-
[class.focus:ring-0]="this.spxDisabled"
|
|
59
|
-
[ngClass]="this.spxClass ? this.spxClass : undefined"
|
|
60
|
-
[attr.disabled]="this.spxDisabled ? this.spxDisabled : undefined"
|
|
61
|
-
[attr.form]="this.spxForm ? this.spxForm : undefined"
|
|
62
|
-
[attr.tabindex]="this.spxTabIndex ? this.spxTabIndex : undefined"
|
|
63
|
-
[attr.type]="this.spxType ? this.spxType : undefined"
|
|
64
|
-
(click)="this.handleClick()"
|
|
65
|
-
part="button"><ng-content></ng-content></button>`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
44
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.5", type: SpxButtonComponent, isStandalone: true, selector: "spx-button", inputs: { spxDisabled: { classPropertyName: "spxDisabled", publicName: "spxDisabled", isSignal: true, isRequired: false, transformFunction: null }, spxClass: { classPropertyName: "spxClass", publicName: "spxClass", isSignal: true, isRequired: false, transformFunction: null }, spxClassObject: { classPropertyName: "spxClassObject", publicName: "spxClassObject", isSignal: true, isRequired: false, transformFunction: null }, spxForm: { classPropertyName: "spxForm", publicName: "spxForm", isSignal: true, isRequired: false, transformFunction: null }, spxFullHeight: { classPropertyName: "spxFullHeight", publicName: "spxFullHeight", isSignal: true, isRequired: false, transformFunction: null }, spxFullWidth: { classPropertyName: "spxFullWidth", publicName: "spxFullWidth", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxSize: { classPropertyName: "spxSize", publicName: "spxSize", isSignal: true, isRequired: false, transformFunction: null }, spxTabIndex: { classPropertyName: "spxTabIndex", publicName: "spxTabIndex", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClick: "spxClick" }, host: { properties: { "class.block": "this.hostClassBlock", "class.h-full": "this.hostClassHFull", "class.w-full": "this.hostClassWFull" } }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\r\n #buttonRef\r\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\r\n [class.h-full]=\"this.spxFullHeight()\"\r\n [class.w-full]=\"this.spxFullWidth()\"\r\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\r\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\r\n [class.text-xl]=\"this.spxSize() === 'xl'\"\r\n [class.text-lg]=\"this.spxSize() === 'lg'\"\r\n [class.cursor-pointer]=\"!this.spxDisabled()\"\r\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\r\n [class.opacity-50]=\"this.spxDisabled()\"\r\n [class.focus:ring-0]=\"this.spxDisabled()\"\r\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\r\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\r\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\r\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\r\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\r\n (click)=\"this.handleClick()\"\r\n part=\"button\">\r\n <ng-content></ng-content>\r\n </button>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
66
45
|
}
|
|
67
46
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxButtonComponent, decorators: [{
|
|
68
47
|
type: Component,
|
|
69
|
-
args: [{
|
|
70
|
-
selector: 'spx-button',
|
|
71
|
-
imports: [
|
|
72
|
-
NgClass,
|
|
73
|
-
],
|
|
74
|
-
template: `
|
|
75
|
-
<button
|
|
76
|
-
#buttonRef
|
|
77
|
-
class="border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r"
|
|
78
|
-
[class.h-full]="this.spxFullHeight"
|
|
79
|
-
[class.w-full]="this.spxFullWidth"
|
|
80
|
-
[class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
|
|
81
|
-
[class.focus:ring-blue-600]="!this.spxSeverity || this.severityInfo"
|
|
82
|
-
[class.from-red-400]="this.severityError"
|
|
83
|
-
[class.to-red-600]="this.severityError"
|
|
84
|
-
[class.focus:ring-red-600]="this.severityError"
|
|
85
|
-
[class.from-lime-400]="this.severitySuccess"
|
|
86
|
-
[class.to-lime-600]="this.severitySuccess"
|
|
87
|
-
[class.focus:ring-lime-600]="this.severitySuccess"
|
|
88
|
-
[class.from-amber-400]="this.severityWarning"
|
|
89
|
-
[class.to-amber-600]="this.severityWarning"
|
|
90
|
-
[class.focus:ring-amber-600]="this.severityWarning"
|
|
91
|
-
[class.py-2]="!this.spxSize || this.spxSize === 'lg'"
|
|
92
|
-
[class.py-4]="!this.spxSize || this.spxSize === 'xl'"
|
|
93
|
-
[class.text-xl]="this.spxSize === 'xl'"
|
|
94
|
-
[class.text-lg]="this.spxSize === 'lg'"
|
|
95
|
-
[class.cursor-pointer]="!this.spxDisabled"
|
|
96
|
-
[class.cursor-not-allowed]="this.spxDisabled"
|
|
97
|
-
[class.opacity-50]="this.spxDisabled"
|
|
98
|
-
[class.focus:ring-0]="this.spxDisabled"
|
|
99
|
-
[ngClass]="this.spxClass ? this.spxClass : undefined"
|
|
100
|
-
[attr.disabled]="this.spxDisabled ? this.spxDisabled : undefined"
|
|
101
|
-
[attr.form]="this.spxForm ? this.spxForm : undefined"
|
|
102
|
-
[attr.tabindex]="this.spxTabIndex ? this.spxTabIndex : undefined"
|
|
103
|
-
[attr.type]="this.spxType ? this.spxType : undefined"
|
|
104
|
-
(click)="this.handleClick()"
|
|
105
|
-
part="button"><ng-content></ng-content></button>`
|
|
106
|
-
}]
|
|
48
|
+
args: [{ selector: 'spx-button', imports: [NgClass, IsSeverityPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n #buttonRef\r\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\r\n [class.h-full]=\"this.spxFullHeight()\"\r\n [class.w-full]=\"this.spxFullWidth()\"\r\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\r\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\r\n [class.text-xl]=\"this.spxSize() === 'xl'\"\r\n [class.text-lg]=\"this.spxSize() === 'lg'\"\r\n [class.cursor-pointer]=\"!this.spxDisabled()\"\r\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\r\n [class.opacity-50]=\"this.spxDisabled()\"\r\n [class.focus:ring-0]=\"this.spxDisabled()\"\r\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\r\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\r\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\r\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\r\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\r\n (click)=\"this.handleClick()\"\r\n part=\"button\">\r\n <ng-content></ng-content>\r\n </button>" }]
|
|
107
49
|
}], propDecorators: { hostClassBlock: [{
|
|
108
50
|
type: HostBinding,
|
|
109
51
|
args: ['class.block']
|
|
@@ -113,31 +55,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
113
55
|
}], hostClassWFull: [{
|
|
114
56
|
type: HostBinding,
|
|
115
57
|
args: ['class.w-full']
|
|
116
|
-
}], spxDisabled: [{
|
|
117
|
-
type: Input
|
|
118
|
-
}], spxClass: [{
|
|
119
|
-
type: Input
|
|
120
|
-
}], spxClassObject: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], spxForm: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], spxFullHeight: [{
|
|
125
|
-
type: Input
|
|
126
|
-
}], spxFullWidth: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], spxSeverity: [{
|
|
129
|
-
type: Input
|
|
130
|
-
}], spxSize: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], spxTabIndex: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], spxType: [{
|
|
135
|
-
type: Input
|
|
136
|
-
}], spxClick: [{
|
|
137
|
-
type: Output
|
|
138
|
-
}], buttonRef: [{
|
|
139
|
-
type: ViewChild,
|
|
140
|
-
args: ['buttonRef', { static: true }]
|
|
141
58
|
}] } });
|
|
142
59
|
|
|
143
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport {
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/spx-button.component.html","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n HostBinding,\r\n input,\r\n output,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\r\n\r\n@Component({\r\n selector: 'spx-button',\r\n imports: [NgClass, IsSeverityPipe],\r\n templateUrl: './spx-button.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SpxButtonComponent {\r\n @HostBinding('class.block') get hostClassBlock() {\r\n return this.spxFullWidth();\r\n }\r\n @HostBinding('class.h-full') get hostClassHFull() {\r\n return this.spxFullHeight();\r\n }\r\n @HostBinding('class.w-full') get hostClassWFull() {\r\n return this.spxFullWidth();\r\n }\r\n\r\n readonly spxDisabled = input(false);\r\n readonly spxClass = input<string>();\r\n readonly spxClassObject = input<object>();\r\n readonly spxForm = input<string>();\r\n readonly spxFullHeight = input<boolean>();\r\n readonly spxFullWidth = input<boolean>();\r\n readonly spxSeverity = input<SpxSeverityEnum | undefined>(\r\n SpxSeverityEnum.info\r\n );\r\n readonly spxSize = input<'lg' | 'xl'>('lg');\r\n readonly spxTabIndex = input<number>();\r\n readonly spxType = input<'button' | 'submit'>('submit');\r\n spxClick = output();\r\n buttonRef = viewChild<ElementRef<HTMLInputElement>>('buttonRef');\r\n SpxSeverity = SpxSeverityEnum;\r\n\r\n hasShadowDom = (el: HTMLElement) => {\r\n return !!el.shadowRoot && !!(el as any).attachShadow;\r\n };\r\n handleClick = () => {\r\n if (!this.spxDisabled()) {\r\n this.spxClick.emit();\r\n }\r\n };\r\n\r\n spxSetFocus(): void {\r\n this.buttonRef()?.nativeElement?.focus();\r\n }\r\n}\r\n","<button\r\n #buttonRef\r\n class=\"border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 bg-gradient-to-r\"\r\n [class.h-full]=\"this.spxFullHeight()\"\r\n [class.w-full]=\"this.spxFullWidth()\"\r\n [class.bg-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.focus:ring-blue-600]=\"!this.spxSeverity() || (this.spxSeverity() | isSeverity: SpxSeverity.info)\"\r\n [class.from-red-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.to-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.focus:ring-red-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.error\"\r\n [class.from-lime-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.to-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.focus:ring-lime-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.success\"\r\n [class.from-amber-400]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.to-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.focus:ring-amber-600]=\"this.spxSeverity() | isSeverity: SpxSeverity.warning\"\r\n [class.py-2]=\"!this.spxSize() || this.spxSize() === 'lg'\"\r\n [class.py-4]=\"!this.spxSize() || this.spxSize() === 'xl'\"\r\n [class.text-xl]=\"this.spxSize() === 'xl'\"\r\n [class.text-lg]=\"this.spxSize() === 'lg'\"\r\n [class.cursor-pointer]=\"!this.spxDisabled()\"\r\n [class.cursor-not-allowed]=\"this.spxDisabled()\"\r\n [class.opacity-50]=\"this.spxDisabled()\"\r\n [class.focus:ring-0]=\"this.spxDisabled()\"\r\n [ngClass]=\"this.spxClass() ? this.spxClass() : undefined\"\r\n [attr.disabled]=\"this.spxDisabled() ? this.spxDisabled() : undefined\"\r\n [attr.form]=\"this.spxForm() ? this.spxForm() : undefined\"\r\n [attr.tabindex]=\"this.spxTabIndex() ? this.spxTabIndex() : undefined\"\r\n [attr.type]=\"this.spxType() ? this.spxType() : undefined\"\r\n (click)=\"this.handleClick()\"\r\n part=\"button\">\r\n <ng-content></ng-content>\r\n </button>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmBa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAiBW,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;QAC1B,IAAc,CAAA,cAAA,GAAG,KAAK,EAAU;QAChC,IAAO,CAAA,OAAA,GAAG,KAAK,EAAU;QACzB,IAAa,CAAA,aAAA,GAAG,KAAK,EAAW;QAChC,IAAY,CAAA,YAAA,GAAG,KAAK,EAAW;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAC1B,eAAe,CAAC,IAAI,CACrB;A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1
|
-
{"version":3,"file":"softpak-components-spx-capitalize.mjs","sources":["../../../../projects/softpak/components/spx-capitalize/spx-capitalize.pipe.ts","../../../../projects/softpak/components/spx-capitalize/softpak-components-spx-capitalize.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'capitalize',\n standalone: true,\n})\nexport class SpxCapitalizePipe implements PipeTransform {\n\n transform(value: string, ..._args: unknown[]): string {\n return value = value ? value.charAt(0).toUpperCase() + value.substr(1) : '';\n }\n\n static transform(value: string, ..._args: unknown[]): string {\n return new SpxCapitalizePipe().transform(value, _args);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QAC1C,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;;AAG7E,IAAA,OAAO,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QACjD,OAAO,IAAI,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;;8GAP7C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,YAAY;AAClB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-capitalize.mjs","sources":["../../../../projects/softpak/components/spx-capitalize/spx-capitalize.pipe.ts","../../../../projects/softpak/components/spx-capitalize/softpak-components-spx-capitalize.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'capitalize',\r\n standalone: true,\r\n})\r\nexport class SpxCapitalizePipe implements PipeTransform {\r\n\r\n transform(value: string, ..._args: unknown[]): string {\r\n return value = value ? value.charAt(0).toUpperCase() + value.substr(1) : '';\r\n }\r\n\r\n static transform(value: string, ..._args: unknown[]): string {\r\n return new SpxCapitalizePipe().transform(value, _args);\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QAC1C,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;;AAG7E,IAAA,OAAO,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QACjD,OAAO,IAAI,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;;8GAP7C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,YAAY;AAClB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
|