shirkasoft-ui-components 2.0.0 → 2.1.0
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 +209 -53
- package/fesm2022/shirkasoft-ui-components-config.mjs +610 -72
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +79 -6
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +74 -3
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +6 -6
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +70 -2
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +76 -14
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +11 -0
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +80 -18
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +262 -165
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme.mjs +2 -24
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +36 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shirkasoft-ui-components-config.d.ts +246 -20
- package/types/shirkasoft-ui-components-date-picker.d.ts +35 -1
- package/types/shirkasoft-ui-components-file-upload.d.ts +35 -1
- package/types/shirkasoft-ui-components-icons.d.ts +6 -6
- package/types/shirkasoft-ui-components-price-input.d.ts +36 -2
- package/types/shirkasoft-ui-components-select.d.ts +36 -2
- package/types/shirkasoft-ui-components-text-field.d.ts +36 -4
- package/types/shirkasoft-ui-components-theme-picker.d.ts +40 -12
- package/types/shirkasoft-ui-components-theme.d.ts +17 -9
- package/types/shirkasoft-ui-components-utils.d.ts +34 -1
|
@@ -8,7 +8,7 @@ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
|
8
8
|
import { merge } from "rxjs";
|
|
9
9
|
import { TranslocoService } from "@jsverse/transloco";
|
|
10
10
|
import { LucideEye, ShkIconDirective } from "shirkasoft-ui-components/icons";
|
|
11
|
-
import { getIcon } from "shirkasoft-ui-components/utils";
|
|
11
|
+
import { errorMessagesFromMap, getIcon, signalErrorsToMap } from "shirkasoft-ui-components/utils";
|
|
12
12
|
var TextFieldComponent = class TextFieldComponent {
|
|
13
13
|
get _value() {
|
|
14
14
|
return this.value;
|
|
@@ -28,6 +28,10 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
28
28
|
this.formGroup = input(void 0, ...ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []);
|
|
29
29
|
this.control = input(void 0, ...ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []);
|
|
30
30
|
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.errors = input([], ...ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.touched = input(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.dirty = input(false, ...ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []);
|
|
31
35
|
this.errorMessage = input("", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
32
36
|
this.isTextArea = input(false, ...ngDevMode ? [{ debugName: "isTextArea" }] : /* istanbul ignore next */ []);
|
|
33
37
|
this.textAreaHeight = input("h-28", ...ngDevMode ? [{ debugName: "textAreaHeight" }] : /* istanbul ignore next */ []);
|
|
@@ -58,14 +62,16 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
58
62
|
const lbl = this.label();
|
|
59
63
|
if (fg && lbl) return fg.get(lbl) ?? void 0;
|
|
60
64
|
}, ...ngDevMode ? [{ debugName: "externalControl" }] : /* istanbul ignore next */ []);
|
|
61
|
-
this.
|
|
65
|
+
this.usesSignalForms = computed(() => !this.externalControl(), ...ngDevMode ? [{ debugName: "usesSignalForms" }] : /* istanbul ignore next */ []);
|
|
62
66
|
this.actualControl = computed(() => this.externalControl() ?? this.innerControl, ...ngDevMode ? [{ debugName: "actualControl" }] : /* istanbul ignore next */ []);
|
|
63
67
|
this.shouldShowError = computed(() => {
|
|
68
|
+
if (this.usesSignalForms()) return this.invalid() && (this.touched() || this.dirty());
|
|
64
69
|
this.errorTracker();
|
|
65
70
|
const ctrl = this.actualControl();
|
|
66
71
|
return ctrl?.invalid && (ctrl?.dirty || ctrl?.touched);
|
|
67
72
|
}, ...ngDevMode ? [{ debugName: "shouldShowError" }] : /* istanbul ignore next */ []);
|
|
68
73
|
this.wasFixedError = computed(() => {
|
|
74
|
+
if (this.usesSignalForms()) return this.hadError() && !this.invalid() && this.touched();
|
|
69
75
|
this.errorTracker();
|
|
70
76
|
const ctrl = this.actualControl();
|
|
71
77
|
return this.hadError() && ctrl?.valid && ctrl?.touched;
|
|
@@ -74,21 +80,12 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
74
80
|
this.errorTracker();
|
|
75
81
|
const customError = this.errorMessage();
|
|
76
82
|
if (customError) return [customError];
|
|
83
|
+
const customErrors = this.errorMessages();
|
|
84
|
+
const translate = (key, params) => this.transloco.translate(key, params);
|
|
85
|
+
if (this.usesSignalForms()) return errorMessagesFromMap(signalErrorsToMap(this.errors()), customErrors, translate);
|
|
77
86
|
const ctrl = this.actualControl();
|
|
78
87
|
if (!ctrl?.errors) return [];
|
|
79
|
-
|
|
80
|
-
const t = this.transloco;
|
|
81
|
-
return Object.keys(ctrl.errors).map((errorKey) => {
|
|
82
|
-
if (customErrors[errorKey]) return customErrors[errorKey];
|
|
83
|
-
switch (errorKey) {
|
|
84
|
-
case "required": return t.translate("validation.required");
|
|
85
|
-
case "email": return t.translate("validation.email");
|
|
86
|
-
case "minlength": return t.translate("validation.minlength", { min: ctrl.errors["minlength"].requiredLength });
|
|
87
|
-
case "maxlength": return t.translate("validation.maxlength", { max: ctrl.errors["maxlength"].requiredLength });
|
|
88
|
-
case "pattern": return t.translate("validation.pattern");
|
|
89
|
-
default: return t.translate("validation.invalid");
|
|
90
|
-
}
|
|
91
|
-
});
|
|
88
|
+
return errorMessagesFromMap(ctrl.errors, customErrors, translate);
|
|
92
89
|
}, ...ngDevMode ? [{ debugName: "getErrorMessages" }] : /* istanbul ignore next */ []);
|
|
93
90
|
this.effectiveType = computed(() => {
|
|
94
91
|
if (this.isTextArea()) return "text";
|
|
@@ -100,7 +97,7 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
100
97
|
this.onTouched = () => {};
|
|
101
98
|
this.destroyRef = inject(DestroyRef);
|
|
102
99
|
effect(() => {
|
|
103
|
-
if (!this.
|
|
100
|
+
if (!this.usesSignalForms()) return;
|
|
104
101
|
const value = this.value() ?? "";
|
|
105
102
|
const disabled = this.isDisabled();
|
|
106
103
|
untracked(() => {
|
|
@@ -109,6 +106,10 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
109
106
|
if (!disabled && this.innerControl.disabled) this.innerControl.enable({ emitEvent: false });
|
|
110
107
|
});
|
|
111
108
|
});
|
|
109
|
+
effect(() => {
|
|
110
|
+
if (!this.usesSignalForms()) return;
|
|
111
|
+
if (this.invalid() && (this.touched() || this.dirty())) this.hadError.set(true);
|
|
112
|
+
});
|
|
112
113
|
effect(() => {
|
|
113
114
|
const ctrl = this.actualControl();
|
|
114
115
|
const shouldDisable = this.isDisabled();
|
|
@@ -163,6 +164,7 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
163
164
|
this.onTouched();
|
|
164
165
|
this.touch.emit();
|
|
165
166
|
this.errorTracker.update((v) => v + 1);
|
|
167
|
+
if (this.usesSignalForms()) return;
|
|
166
168
|
const ctrl = this.actualControl();
|
|
167
169
|
if (ctrl?.invalid && ctrl?.touched) this.hadError.set(true);
|
|
168
170
|
}
|
|
@@ -343,6 +345,34 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
343
345
|
isRequired: false,
|
|
344
346
|
transformFunction: null
|
|
345
347
|
},
|
|
348
|
+
errors: {
|
|
349
|
+
classPropertyName: "errors",
|
|
350
|
+
publicName: "errors",
|
|
351
|
+
isSignal: true,
|
|
352
|
+
isRequired: false,
|
|
353
|
+
transformFunction: null
|
|
354
|
+
},
|
|
355
|
+
invalid: {
|
|
356
|
+
classPropertyName: "invalid",
|
|
357
|
+
publicName: "invalid",
|
|
358
|
+
isSignal: true,
|
|
359
|
+
isRequired: false,
|
|
360
|
+
transformFunction: null
|
|
361
|
+
},
|
|
362
|
+
touched: {
|
|
363
|
+
classPropertyName: "touched",
|
|
364
|
+
publicName: "touched",
|
|
365
|
+
isSignal: true,
|
|
366
|
+
isRequired: false,
|
|
367
|
+
transformFunction: null
|
|
368
|
+
},
|
|
369
|
+
dirty: {
|
|
370
|
+
classPropertyName: "dirty",
|
|
371
|
+
publicName: "dirty",
|
|
372
|
+
isSignal: true,
|
|
373
|
+
isRequired: false,
|
|
374
|
+
transformFunction: null
|
|
375
|
+
},
|
|
346
376
|
errorMessage: {
|
|
347
377
|
classPropertyName: "errorMessage",
|
|
348
378
|
publicName: "errorMessage",
|
|
@@ -417,7 +447,7 @@ var TextFieldComponent = class TextFieldComponent {
|
|
|
417
447
|
isSignal: true
|
|
418
448
|
}],
|
|
419
449
|
ngImport: i0,
|
|
420
|
-
template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl()
|
|
450
|
+
template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl().disabled || isDisabled();\n <input\n #input\n [id]=\"id()\"\n type=\"text\"\n [value]=\"displayValue() || ''\"\n [placeholder]=\"placeholder() || label()\"\n [readOnly]=\"true\"\n [disabled]=\"isDisabledSearch\"\n (click)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (keydown.enter)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (blur)=\"onBlur()\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"(shouldShowError() && !isDisabledSearch) || null\"\n [class.cursor-pointer]=\"!isDisabledSearch\"\n [class.cursor-not-allowed]=\"isDisabledSearch\"\n [class._shk-bg-surface-50]=\"isDisabledSearch\"\n [class._shk-text-surface-400]=\"isDisabledSearch\"\n class=\"shk-control shk-control-addon block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-l-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500': shouldShowError() && !isDisabledSearch,\n '_shk-border': !shouldShowError() || isDisabledSearch,\n 'cursor-pointer': !isDisabledSearch,\n 'cursor-not-allowed _shk-text-surface-400 dark:[color:var(--shk-surface-400)]': isDisabledSearch\n }\"\n />\n <button\n type=\"button\"\n (click)=\"searchButtonClick.emit()\"\n tabindex=\"-1\"\n [disabled]=\"isDisabledSearch\"\n class=\"px-3 flex items-center justify-center shrink-0 _shk-bg-primary hover:[background-color:var(--shk-primary-700)] text-white border _shk-border-primary rounded-r-lg transition-colors duration-200 disabled:[background-color:var(--shk-surface-300)] dark:disabled:[background-color:var(--shk-surface-200)] disabled:[border-color:var(--shk-surface-300)] dark:disabled:[border-color:var(--shk-surface-200)] disabled:cursor-not-allowed\"\n >\n <svg [shkIcon]=\"getIcon('search')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n\n @if (!searchMode()) {\n <input\n #input\n [id]=\"id()\"\n [maxlength]=\"maxLength() || (formatCard() ? 19 : null)\"\n [min]=\"type() === 'number' && preventNegative() ? '0' : null\"\n (keypress)=\"type() === 'number' || numbersOnly() ? numberValidation($event) : null\"\n [type]=\"effectiveType()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onBlur()\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n [class.pr-8]=\"type() === 'password' && actualControl().value?.length > 0\"\n [class.pr-3]=\"type() !== 'password' || !actualControl().value?.length\"\n />\n\n @if (type() === 'password' && actualControl().value?.length > 0) {\n <button\n type=\"button\"\n (click)=\"togglePasswordVisibility()\"\n [disabled]=\"actualControl().disabled\"\n class=\"absolute right-3 top-1/2 -translate-y-1/2 _shk-text-surface-400 hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-600)] focus:outline-none\"\n >\n @if (showPassword()) {\n <svg [shkIcon]=\"getIcon('eye-off')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('eye')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n }\n </div>\n }\n\n @if (isTextArea()) {\n <textarea\n #textarea\n [id]=\"id()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class]=\"isTextArea() ? textAreaHeight() : 'h-28'\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 resize-none disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed disabled:[color:var(--shk-surface-400)] dark:disabled:[color:var(--shk-surface-400)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n ></textarea>\n }\n </div>\n\n @if (shouldShowError()) {\n <div class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\" tabindex=\"-1\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n",
|
|
421
451
|
dependencies: [
|
|
422
452
|
{
|
|
423
453
|
kind: "ngmodule",
|
|
@@ -497,7 +527,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
497
527
|
useExisting: forwardRef(() => TextFieldComponent),
|
|
498
528
|
multi: true
|
|
499
529
|
}],
|
|
500
|
-
template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl()
|
|
530
|
+
template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl().disabled || isDisabled();\n <input\n #input\n [id]=\"id()\"\n type=\"text\"\n [value]=\"displayValue() || ''\"\n [placeholder]=\"placeholder() || label()\"\n [readOnly]=\"true\"\n [disabled]=\"isDisabledSearch\"\n (click)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (keydown.enter)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (blur)=\"onBlur()\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"(shouldShowError() && !isDisabledSearch) || null\"\n [class.cursor-pointer]=\"!isDisabledSearch\"\n [class.cursor-not-allowed]=\"isDisabledSearch\"\n [class._shk-bg-surface-50]=\"isDisabledSearch\"\n [class._shk-text-surface-400]=\"isDisabledSearch\"\n class=\"shk-control shk-control-addon block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-l-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500': shouldShowError() && !isDisabledSearch,\n '_shk-border': !shouldShowError() || isDisabledSearch,\n 'cursor-pointer': !isDisabledSearch,\n 'cursor-not-allowed _shk-text-surface-400 dark:[color:var(--shk-surface-400)]': isDisabledSearch\n }\"\n />\n <button\n type=\"button\"\n (click)=\"searchButtonClick.emit()\"\n tabindex=\"-1\"\n [disabled]=\"isDisabledSearch\"\n class=\"px-3 flex items-center justify-center shrink-0 _shk-bg-primary hover:[background-color:var(--shk-primary-700)] text-white border _shk-border-primary rounded-r-lg transition-colors duration-200 disabled:[background-color:var(--shk-surface-300)] dark:disabled:[background-color:var(--shk-surface-200)] disabled:[border-color:var(--shk-surface-300)] dark:disabled:[border-color:var(--shk-surface-200)] disabled:cursor-not-allowed\"\n >\n <svg [shkIcon]=\"getIcon('search')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n\n @if (!searchMode()) {\n <input\n #input\n [id]=\"id()\"\n [maxlength]=\"maxLength() || (formatCard() ? 19 : null)\"\n [min]=\"type() === 'number' && preventNegative() ? '0' : null\"\n (keypress)=\"type() === 'number' || numbersOnly() ? numberValidation($event) : null\"\n [type]=\"effectiveType()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onBlur()\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n [class.pr-8]=\"type() === 'password' && actualControl().value?.length > 0\"\n [class.pr-3]=\"type() !== 'password' || !actualControl().value?.length\"\n />\n\n @if (type() === 'password' && actualControl().value?.length > 0) {\n <button\n type=\"button\"\n (click)=\"togglePasswordVisibility()\"\n [disabled]=\"actualControl().disabled\"\n class=\"absolute right-3 top-1/2 -translate-y-1/2 _shk-text-surface-400 hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-600)] focus:outline-none\"\n >\n @if (showPassword()) {\n <svg [shkIcon]=\"getIcon('eye-off')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('eye')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n }\n </div>\n }\n\n @if (isTextArea()) {\n <textarea\n #textarea\n [id]=\"id()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class]=\"isTextArea() ? textAreaHeight() : 'h-28'\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 resize-none disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed disabled:[color:var(--shk-surface-400)] dark:disabled:[color:var(--shk-surface-400)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n ></textarea>\n }\n </div>\n\n @if (shouldShowError()) {\n <div class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\" tabindex=\"-1\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n"
|
|
501
531
|
}]
|
|
502
532
|
}],
|
|
503
533
|
ctorParameters: () => [],
|
|
@@ -606,6 +636,38 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
606
636
|
required: false
|
|
607
637
|
}]
|
|
608
638
|
}],
|
|
639
|
+
errors: [{
|
|
640
|
+
type: i0.Input,
|
|
641
|
+
args: [{
|
|
642
|
+
isSignal: true,
|
|
643
|
+
alias: "errors",
|
|
644
|
+
required: false
|
|
645
|
+
}]
|
|
646
|
+
}],
|
|
647
|
+
invalid: [{
|
|
648
|
+
type: i0.Input,
|
|
649
|
+
args: [{
|
|
650
|
+
isSignal: true,
|
|
651
|
+
alias: "invalid",
|
|
652
|
+
required: false
|
|
653
|
+
}]
|
|
654
|
+
}],
|
|
655
|
+
touched: [{
|
|
656
|
+
type: i0.Input,
|
|
657
|
+
args: [{
|
|
658
|
+
isSignal: true,
|
|
659
|
+
alias: "touched",
|
|
660
|
+
required: false
|
|
661
|
+
}]
|
|
662
|
+
}],
|
|
663
|
+
dirty: [{
|
|
664
|
+
type: i0.Input,
|
|
665
|
+
args: [{
|
|
666
|
+
isSignal: true,
|
|
667
|
+
alias: "dirty",
|
|
668
|
+
required: false
|
|
669
|
+
}]
|
|
670
|
+
}],
|
|
609
671
|
errorMessage: [{
|
|
610
672
|
type: i0.Input,
|
|
611
673
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-text-field.mjs","names":["getIconFromCentral"],"sources":["../../../projects/ui-components/text-field/text-field.component.ts","../../../projects/ui-components/text-field/text-field.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n input,\n model,\n forwardRef,\n signal,\n computed,\n effect,\n viewChild,\n ElementRef,\n ChangeDetectionStrategy,\n DestroyRef,\n inject,\n output,\n ChangeDetectorRef,\n untracked,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormGroup,\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge, Subscription } from 'rxjs';\nimport type { FormValueControl } from '@angular/forms/signals';\nimport { TranslocoService } from '@jsverse/transloco';\nimport {\n ShkIconDirective,\n LucideEye,\n} from 'shirkasoft-ui-components/icons';\nimport { getIcon as getIconFromCentral } from 'shirkasoft-ui-components/utils';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Text input (or textarea) that implements ControlValueAccessor with built-in\n * validation messages, card/number formatting, password reveal and search mode.\n */\n@Component({\n selector: 'shk-text-field',\n imports: [CommonModule, ReactiveFormsModule, ShkIconDirective],\n templateUrl: './text-field.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextFieldComponent),\n multi: true,\n },\n ],\n})\nexport class TextFieldComponent implements ControlValueAccessor, FormValueControl<any> {\n private cdr = inject(ChangeDetectorRef);\n\n /** id attribute applied to the native input. */\n id = input<string>('');\n /** Formats the value as a credit card number (XXXX-XXXX-XXXX-XXXX). */\n formatCard = input<boolean>(false);\n /** Blocks the minus sign from being typed. */\n preventNegative = input<boolean>(false);\n /** Label rendered above the field. */\n label = input<string>('');\n /** Native input type ('text', 'password', 'number', etc.). */\n type = input<string>('text');\n /** Allows digits only, stripping any other character. */\n numbersOnly = input<boolean>(false);\n /** When true, allows decimals and normalizes ',' to '.'. */\n allowDecimals = input<boolean>(false);\n /** Maximum number of characters the user can type. */\n maxLength = input<number | undefined>(undefined);\n /** Placeholder text of the native input. */\n placeholder = input<string>('');\n /** Custom messages keyed by validation error name. */\n errorMessages = input<{ [key: string]: string }>({});\n /** Parent reactive form used to resolve the control by label. */\n formGroup = input<FormGroup | undefined>(undefined);\n /** Reactive control bound directly to this field. */\n control = input<FormControl | undefined>(undefined);\n /** Disables the field. */\n disabled = input<boolean>(false);\n /** Custom error message shown regardless of validation errors. */\n errorMessage = input<string>('');\n /** Renders a textarea instead of an input. */\n isTextArea = input<boolean>(false);\n /** Height classes applied when `isTextArea` is true. */\n textAreaHeight = input<string>('h-28');\n /** Renders the field as a read-only search trigger. */\n searchMode = input<boolean>(false);\n /** Value shown when `searchMode` is enabled. */\n displayValue = input<string>('');\n /** Native autocomplete attribute. */\n autocomplete = input<string>('');\n /** Emitted when the search button is clicked (search mode). */\n searchButtonClick = output<void>();\n /** Emitted on blur so Signal Forms can mark the field as touched. */\n touch = output<void>();\n protected readonly getIcon = (name: any) => getIconFromCentral(name, LucideEye);\n\n /** Reference to the native input element. */\n inputElement = viewChild<ElementRef<HTMLInputElement>>('input');\n /** Reference to the native textarea element. */\n textareaElement = viewChild<ElementRef<HTMLTextAreaElement>>('textarea');\n\n /** Field value. Two-way bindable and used by Signal Forms `[formField]`. */\n value = model<any>('');\n /** Internal alias kept for the existing implementation. */\n private get _value() {\n return this.value;\n }\n /** Reactive disabled state from the form control. */\n private _disabledState = signal<boolean>(false);\n /** Whether the password is currently revealed. */\n showPassword = signal<boolean>(false);\n /** Tracks whether the control was in error at some point (for \"was fixed\" UX). */\n hadError = signal<boolean>(false);\n /** Counter bumped to trigger recomputation of derived error signals. */\n private errorTracker = signal<number>(0);\n\n /** Text displayed in search mode when `displayValue` is set. */\n displayLabel = computed(() => {\n if (this.searchMode() && this.displayValue()) {\n return this.displayValue();\n }\n return '';\n });\n /** Control whose status/value changes are currently observed. */\n private observedControl: FormControl | null = null;\n /** Subscription to `observedControl`; replaced when the control changes. */\n private controlSubscription?: Subscription;\n\n /** Effective disabled state combining the input and the form binding. */\n isDisabled = computed(() => this.disabled() || this._disabledState());\n\n /**\n * Internal control used when no reactive control is supplied (`[formField]`,\n * `formControlName`/`ngModel` on the host, or plain `[(value)]`). The native\n * input always needs a control for its `[formControl]` binding.\n */\n private readonly innerControl = new FormControl<any>('');\n\n /** Explicit `control`, or `formGroup.get(label)`, or `undefined` if none. */\n private externalControl = computed<FormControl | undefined>(() => {\n const ctrl = this.control();\n if (ctrl) return ctrl;\n\n const fg = this.formGroup();\n const lbl = this.label();\n if (fg && lbl) {\n return (fg.get(lbl) as FormControl | null) ?? undefined;\n }\n return undefined;\n });\n\n /** True when the field is driven by its internal control (no reactive control given). */\n private usesInnerControl = computed(() => !this.externalControl());\n\n /** Resolves the reactive control: external one if any, otherwise the internal one. */\n actualControl = computed<FormControl>(() => this.externalControl() ?? this.innerControl);\n\n /** True when the resolved control is invalid and dirty or touched. */\n shouldShowError = computed(() => {\n this.errorTracker();\n\n const ctrl = this.actualControl();\n return ctrl?.invalid && (ctrl?.dirty || ctrl?.touched);\n });\n\n /** True when the control had an error before and is now valid (success state). */\n wasFixedError = computed(() => {\n this.errorTracker();\n\n const ctrl = this.actualControl();\n return this.hadError() && ctrl?.valid && ctrl?.touched;\n });\n\n /** Resolved list of error messages for the current control state. */\n getErrorMessages = computed(() => {\n this.errorTracker();\n\n const customError = this.errorMessage();\n if (customError) {\n return [customError];\n }\n\n const ctrl = this.actualControl();\n if (!ctrl?.errors) return [];\n\n const customErrors = this.errorMessages();\n const t = this.transloco;\n\n return Object.keys(ctrl.errors).map((errorKey) => {\n if (customErrors[errorKey]) return customErrors[errorKey];\n\n switch (errorKey) {\n case 'required':\n return t.translate('validation.required');\n case 'email':\n return t.translate('validation.email');\n case 'minlength':\n return t.translate('validation.minlength', {\n min: ctrl.errors!['minlength'].requiredLength,\n });\n case 'maxlength':\n return t.translate('validation.maxlength', {\n max: ctrl.errors!['maxlength'].requiredLength,\n });\n case 'pattern':\n return t.translate('validation.pattern');\n default:\n return t.translate('validation.invalid');\n }\n });\n });\n\n /** Effective input type (handles textarea and password reveal). */\n effectiveType = computed(() => {\n if (this.isTextArea()) return 'text';\n if (this.type() === 'password' && this.showPassword()) return 'text';\n return this.type();\n });\n\n private transloco = inject(TranslocoService);\n /** Callback notified with the new value (ControlValueAccessor). */\n private onChange: (value: any) => void = () => {};\n\n /** Callback notified when the field is touched (ControlValueAccessor). */\n private onTouched: () => void = () => {};\n private destroyRef = inject(DestroyRef);\n\n constructor() {\n // Internal-control mode: mirror the value model and disabled state into it\n // so the native input shows what the form (CVA / Signal Forms) writes.\n effect(() => {\n if (!this.usesInnerControl()) return;\n const value = this.value() ?? '';\n const disabled = this.isDisabled();\n untracked(() => {\n if (this.innerControl.value !== value) {\n this.innerControl.setValue(value, { emitEvent: false });\n }\n if (disabled && this.innerControl.enabled) this.innerControl.disable({ emitEvent: false });\n if (!disabled && this.innerControl.disabled) this.innerControl.enable({ emitEvent: false });\n });\n });\n\n effect(() => {\n const ctrl = this.actualControl();\n const shouldDisable = this.isDisabled();\n\n if (ctrl && shouldDisable) {\n Promise.resolve().then(() => {\n ctrl.disable();\n });\n }\n });\n\n // Observe the current control's status/value changes. Re-subscribes when\n // the control changes (e.g. `[control]` arrives after init, or the field\n // switches from its internal control to an external one).\n effect(() => {\n const ctrl = this.actualControl();\n if (ctrl === this.observedControl) return;\n\n this.controlSubscription?.unsubscribe();\n this.observedControl = ctrl;\n\n if (ctrl.invalid && ctrl.touched) {\n this.hadError.set(true);\n }\n\n this.controlSubscription = merge(ctrl.statusChanges, ctrl.valueChanges).subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n if (ctrl.invalid && ctrl.touched) {\n this.hadError.set(true);\n }\n });\n });\n this.destroyRef.onDestroy(() => this.controlSubscription?.unsubscribe());\n\n this.transloco.langChanges$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n });\n }\n\n /** Prevents disallowed characters based on the `numbersOnly`/`allowDecimals` config. */\n numberValidation(event: KeyboardEvent) {\n const allowedKeys = [\n 'Backspace',\n 'Tab',\n 'End',\n 'Home',\n 'ArrowLeft',\n 'ArrowRight',\n 'Delete',\n ];\n\n if (this.numbersOnly()) {\n const isNumber = /^\\d$/.test(event.key);\n if (!isNumber && !allowedKeys.includes(event.key)) {\n event.preventDefault();\n }\n return;\n }\n\n if (this.allowDecimals() || this.type() === 'number') {\n allowedKeys.push('.');\n }\n\n const isDecimal = event.key === '.' || event.key === ',';\n const isNumber = !isNaN(Number(event.key));\n\n if (allowedKeys.includes(event.key)) {\n if (isDecimal) {\n const input = event.target as HTMLInputElement;\n const currentValue = input.value;\n\n const hasDecimalSeparator =\n currentValue.includes('.') || currentValue.includes(',');\n\n if (hasDecimalSeparator) {\n event.preventDefault();\n }\n }\n return;\n }\n\n if (isNumber) {\n return;\n }\n\n event.preventDefault();\n }\n\n /** Marks the field as touched and refreshes the error state. */\n onBlur(): void {\n this.onTouched();\n this.touch.emit();\n\n this.errorTracker.update((v) => v + 1);\n\n const ctrl = this.actualControl();\n if (ctrl?.invalid && ctrl?.touched) {\n this.hadError.set(true);\n }\n }\n\n /** Formats the raw input as a credit card number and notifies the control. */\n onCardInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n let value = input.value.replace(/[^0-9]/g, '');\n\n if (value.length > 16) {\n value = value.substring(0, 16);\n }\n\n let formatted = '';\n for (let i = 0; i < value.length; i++) {\n if (i > 0 && i % 4 === 0) {\n formatted += '-';\n }\n formatted += value[i];\n }\n\n input.value = formatted;\n this._value.set(formatted);\n this.onChange(formatted);\n }\n\n /** Handles raw input: applies number/card/max-length formatting and notifies the control. */\n onInput(event: Event): void {\n const input = event.target as HTMLInputElement | HTMLTextAreaElement;\n let newValue = input.value;\n\n if (this.allowDecimals()) {\n newValue = newValue.replace(/,/g, '.');\n\n const parts = newValue.split('.');\n if (parts.length > 2) {\n newValue = parts[0] + '.' + parts.slice(1).join('');\n }\n\n if (parts.length > 1 && parts[1].length > 2) {\n newValue = parts[0] + '.' + parts[1].substring(0, 2);\n }\n }\n\n if (this.numbersOnly()) {\n newValue = newValue.replace(/[^0-9]/g, '');\n }\n\n const maxLen = this.maxLength();\n if (maxLen && newValue.length > maxLen) {\n newValue = newValue.substring(0, maxLen);\n input.value = newValue;\n\n const ctrl = this.actualControl();\n setTimeout(() => {\n ctrl?.updateValueAndValidity();\n this.errorTracker.update((v) => v + 1);\n });\n }\n\n if (this.formatCard()) {\n this.onCardInput(event);\n } else {\n this._value.set(newValue);\n this.onChange(newValue);\n }\n }\n\n /** Toggles the visibility of a password field. */\n togglePasswordVisibility(): void {\n this.showPassword.update((v) => !v);\n }\n\n /** Sets the value from the form control applying the same formatting rules. */\n writeValue(value: any): void {\n let processedValue = value;\n\n if (this.allowDecimals() && value) {\n processedValue = String(value).replace(/,/g, '.');\n }\n\n if (this.numbersOnly() && value) {\n processedValue = value.toString().replace(/[^0-9]/g, '');\n }\n\n const maxLen = this.maxLength();\n if (maxLen && processedValue?.length > maxLen) {\n processedValue = processedValue.substring(0, maxLen);\n }\n\n if (this.formatCard() && processedValue) {\n const cleaned = processedValue.replace(/[^0-9]/g, '');\n let formatted = '';\n for (let i = 0; i < cleaned.length; i++) {\n if (i > 0 && i % 4 === 0) formatted += '-';\n formatted += cleaned[i];\n }\n this._value.set(formatted);\n } else {\n this._value.set(processedValue);\n }\n }\n\n /** Registers the callback invoked on value changes (ControlValueAccessor). */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Registers the callback invoked when the field is touched. */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** Reflects the disabled state of the form control. */\n setDisabledState(isDisabled: boolean): void {\n this._disabledState.set(isDisabled);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl()?.disabled || isDisabled();\n <input\n #input\n [id]=\"id()\"\n type=\"text\"\n [value]=\"displayValue() || ''\"\n [placeholder]=\"placeholder() || label()\"\n [readOnly]=\"true\"\n [disabled]=\"isDisabledSearch\"\n (click)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (keydown.enter)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (blur)=\"onBlur()\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"(shouldShowError() && !isDisabledSearch) || null\"\n [class.cursor-pointer]=\"!isDisabledSearch\"\n [class.cursor-not-allowed]=\"isDisabledSearch\"\n [class._shk-bg-surface-50]=\"isDisabledSearch\"\n [class._shk-text-surface-400]=\"isDisabledSearch\"\n class=\"shk-control shk-control-addon block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-l-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500': shouldShowError() && !isDisabledSearch,\n '_shk-border': !shouldShowError() || isDisabledSearch,\n 'cursor-pointer': !isDisabledSearch,\n 'cursor-not-allowed _shk-text-surface-400 dark:[color:var(--shk-surface-400)]': isDisabledSearch\n }\"\n />\n <button\n type=\"button\"\n (click)=\"searchButtonClick.emit()\"\n tabindex=\"-1\"\n [disabled]=\"isDisabledSearch\"\n class=\"px-3 flex items-center justify-center shrink-0 _shk-bg-primary hover:[background-color:var(--shk-primary-700)] text-white border _shk-border-primary rounded-r-lg transition-colors duration-200 disabled:[background-color:var(--shk-surface-300)] dark:disabled:[background-color:var(--shk-surface-200)] disabled:[border-color:var(--shk-surface-300)] dark:disabled:[border-color:var(--shk-surface-200)] disabled:cursor-not-allowed\"\n >\n <svg [shkIcon]=\"getIcon('search')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n\n @if (!searchMode()) {\n <input\n #input\n [id]=\"id()\"\n [maxlength]=\"maxLength() || (formatCard() ? 19 : null)\"\n [min]=\"type() === 'number' && preventNegative() ? '0' : null\"\n (keypress)=\"type() === 'number' || numbersOnly() ? numberValidation($event) : null\"\n [type]=\"effectiveType()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onBlur()\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n [class.pr-8]=\"type() === 'password' && actualControl()?.value?.length > 0\"\n [class.pr-3]=\"type() !== 'password' || !actualControl()?.value?.length\"\n />\n\n @if (type() === 'password' && actualControl()?.value?.length > 0) {\n <button\n type=\"button\"\n (click)=\"togglePasswordVisibility()\"\n [disabled]=\"actualControl()?.disabled\"\n class=\"absolute right-3 top-1/2 -translate-y-1/2 _shk-text-surface-400 hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-600)] focus:outline-none\"\n >\n @if (showPassword()) {\n <svg [shkIcon]=\"getIcon('eye-off')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('eye')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n }\n </div>\n }\n\n @if (isTextArea()) {\n <textarea\n #textarea\n [id]=\"id()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class]=\"isTextArea() ? textAreaHeight() : 'h-28'\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 resize-none disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed disabled:[color:var(--shk-surface-400)] dark:disabled:[color:var(--shk-surface-400)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n ></textarea>\n }\n </div>\n\n @if (shouldShowError()) {\n <div class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\" tabindex=\"-1\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;;;AA0DA,IAAa,qBAAb,MAAa,mBAAkB;CAuD7B,IAAY,SAAM;EAChB,OAAO,KAAK;CACd;CAyHA,cAAA;EAjLQ,KAAA,MAAM,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AA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,GAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,aAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-text-field.mjs","names":["getIconFromCentral"],"sources":["../../../projects/ui-components/text-field/text-field.component.ts","../../../projects/ui-components/text-field/text-field.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n input,\n model,\n forwardRef,\n signal,\n computed,\n effect,\n viewChild,\n ElementRef,\n ChangeDetectionStrategy,\n DestroyRef,\n inject,\n output,\n ChangeDetectorRef,\n untracked,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormGroup,\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { merge, Subscription } from 'rxjs';\nimport type { FormValueControl, ValidationError } from '@angular/forms/signals';\nimport { TranslocoService } from '@jsverse/transloco';\nimport {\n ShkIconDirective,\n LucideEye,\n} from 'shirkasoft-ui-components/icons';\nimport {\n errorMessagesFromMap,\n getIcon as getIconFromCentral,\n signalErrorsToMap,\n} from 'shirkasoft-ui-components/utils';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Text input (or textarea) that implements ControlValueAccessor with built-in\n * validation messages, card/number formatting, password reveal and search mode.\n */\n@Component({\n selector: 'shk-text-field',\n imports: [CommonModule, ReactiveFormsModule, ShkIconDirective],\n templateUrl: './text-field.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextFieldComponent),\n multi: true,\n },\n ],\n})\nexport class TextFieldComponent implements ControlValueAccessor, FormValueControl<any> {\n private cdr = inject(ChangeDetectorRef);\n\n /** id attribute applied to the native input. */\n id = input<string>('');\n /** Formats the value as a credit card number (XXXX-XXXX-XXXX-XXXX). */\n formatCard = input<boolean>(false);\n /** Blocks the minus sign from being typed. */\n preventNegative = input<boolean>(false);\n /** Label rendered above the field. */\n label = input<string>('');\n /** Native input type ('text', 'password', 'number', etc.). */\n type = input<string>('text');\n /** Allows digits only, stripping any other character. */\n numbersOnly = input<boolean>(false);\n /** When true, allows decimals and normalizes ',' to '.'. */\n allowDecimals = input<boolean>(false);\n /** Maximum number of characters the user can type. */\n maxLength = input<number | undefined>(undefined);\n /** Placeholder text of the native input. */\n placeholder = input<string>('');\n /** Custom messages keyed by validation error name. */\n errorMessages = input<{ [key: string]: string }>({});\n /** Parent reactive form used to resolve the control by label. */\n formGroup = input<FormGroup | undefined>(undefined);\n /** Reactive control bound directly to this field. */\n control = input<FormControl | undefined>(undefined);\n /** Disables the field. */\n disabled = input<boolean>(false);\n /** Errors bound automatically by the Signal Forms `[formField]` directive. */\n errors = input<readonly ValidationError.WithOptionalFieldTree[]>([]);\n /** Invalid status bound automatically by `[formField]`. */\n invalid = input<boolean>(false);\n /** Touched status bound automatically by `[formField]`. */\n touched = input<boolean>(false);\n /** Dirty status bound automatically by `[formField]`. */\n dirty = input<boolean>(false);\n /** Custom error message shown regardless of validation errors. */\n errorMessage = input<string>('');\n /** Renders a textarea instead of an input. */\n isTextArea = input<boolean>(false);\n /** Height classes applied when `isTextArea` is true. */\n textAreaHeight = input<string>('h-28');\n /** Renders the field as a read-only search trigger. */\n searchMode = input<boolean>(false);\n /** Value shown when `searchMode` is enabled. */\n displayValue = input<string>('');\n /** Native autocomplete attribute. */\n autocomplete = input<string>('');\n /** Emitted when the search button is clicked (search mode). */\n searchButtonClick = output<void>();\n /** Emitted on blur so Signal Forms can mark the field as touched. */\n touch = output<void>();\n protected readonly getIcon = (name: any) => getIconFromCentral(name, LucideEye);\n\n /** Reference to the native input element. */\n inputElement = viewChild<ElementRef<HTMLInputElement>>('input');\n /** Reference to the native textarea element. */\n textareaElement = viewChild<ElementRef<HTMLTextAreaElement>>('textarea');\n\n /** Field value. Two-way bindable and used by Signal Forms `[formField]`. */\n value = model<any>('');\n /** Internal alias kept for the existing implementation. */\n private get _value() {\n return this.value;\n }\n /** Reactive disabled state from the form control. */\n private _disabledState = signal<boolean>(false);\n /** Whether the password is currently revealed. */\n showPassword = signal<boolean>(false);\n /** Tracks whether the control was in error at some point (for \"was fixed\" UX). */\n hadError = signal<boolean>(false);\n /** Counter bumped to trigger recomputation of derived error signals. */\n private errorTracker = signal<number>(0);\n\n /** Text displayed in search mode when `displayValue` is set. */\n displayLabel = computed(() => {\n if (this.searchMode() && this.displayValue()) {\n return this.displayValue();\n }\n return '';\n });\n /** Control whose status/value changes are currently observed. */\n private observedControl: FormControl | null = null;\n /** Subscription to `observedControl`; replaced when the control changes. */\n private controlSubscription?: Subscription;\n\n /** Effective disabled state combining the input and the form binding. */\n isDisabled = computed(() => this.disabled() || this._disabledState());\n\n /**\n * Internal control used when no reactive control is supplied (`[formField]`,\n * `formControlName`/`ngModel` on the host, or plain `[(value)]`). The native\n * input always needs a control for its `[formControl]` binding.\n */\n private readonly innerControl = new FormControl<any>('');\n\n /** Explicit `control`, or `formGroup.get(label)`, or `undefined` if none. */\n private externalControl = computed<FormControl | undefined>(() => {\n const ctrl = this.control();\n if (ctrl) return ctrl;\n\n const fg = this.formGroup();\n const lbl = this.label();\n if (fg && lbl) {\n return (fg.get(lbl) as FormControl | null) ?? undefined;\n }\n return undefined;\n });\n\n /**\n * True when the field is driven by Signal Forms (or plain `[(value)]`) instead\n * of a reactive control. Detected by the absence of an external control:\n * `[formField]` then provides `errors`/`invalid`/`touched`/`dirty`.\n */\n protected usesSignalForms = computed(() => !this.externalControl());\n\n /** Resolves the reactive control: external one if any, otherwise the internal one. */\n actualControl = computed<FormControl>(() => this.externalControl() ?? this.innerControl);\n\n /** True when the field should display its validation errors. */\n shouldShowError = computed(() => {\n if (this.usesSignalForms()) {\n return this.invalid() && (this.touched() || this.dirty());\n }\n\n this.errorTracker();\n\n const ctrl = this.actualControl();\n return ctrl?.invalid && (ctrl?.dirty || ctrl?.touched);\n });\n\n /** True when the control had an error before and is now valid (success state). */\n wasFixedError = computed(() => {\n if (this.usesSignalForms()) {\n return this.hadError() && !this.invalid() && this.touched();\n }\n\n this.errorTracker();\n\n const ctrl = this.actualControl();\n return this.hadError() && ctrl?.valid && ctrl?.touched;\n });\n\n /** Resolved list of error messages for the current control state. */\n getErrorMessages = computed(() => {\n this.errorTracker();\n\n const customError = this.errorMessage();\n if (customError) {\n return [customError];\n }\n\n const customErrors = this.errorMessages();\n const translate = (key: string, params?: Record<string, any>) =>\n this.transloco.translate(key, params);\n\n if (this.usesSignalForms()) {\n return errorMessagesFromMap(signalErrorsToMap(this.errors()), customErrors, translate);\n }\n\n const ctrl = this.actualControl();\n if (!ctrl?.errors) return [];\n\n return errorMessagesFromMap(ctrl.errors, customErrors, translate);\n });\n\n /** Effective input type (handles textarea and password reveal). */\n effectiveType = computed(() => {\n if (this.isTextArea()) return 'text';\n if (this.type() === 'password' && this.showPassword()) return 'text';\n return this.type();\n });\n\n private transloco = inject(TranslocoService);\n /** Callback notified with the new value (ControlValueAccessor). */\n private onChange: (value: any) => void = () => {};\n\n /** Callback notified when the field is touched (ControlValueAccessor). */\n private onTouched: () => void = () => {};\n private destroyRef = inject(DestroyRef);\n\n constructor() {\n // Internal-control mode: mirror the value model and disabled state into it\n // so the native input shows what the form (CVA / Signal Forms) writes.\n effect(() => {\n if (!this.usesSignalForms()) return;\n const value = this.value() ?? '';\n const disabled = this.isDisabled();\n untracked(() => {\n if (this.innerControl.value !== value) {\n this.innerControl.setValue(value, { emitEvent: false });\n }\n if (disabled && this.innerControl.enabled) this.innerControl.disable({ emitEvent: false });\n if (!disabled && this.innerControl.disabled) this.innerControl.enable({ emitEvent: false });\n });\n });\n\n // Signal Forms: remember when the field entered the error state so the\n // \"fixed\" (green) state can be shown once the user corrects it.\n effect(() => {\n if (!this.usesSignalForms()) return;\n\n if (this.invalid() && (this.touched() || this.dirty())) {\n this.hadError.set(true);\n }\n });\n\n effect(() => {\n const ctrl = this.actualControl();\n const shouldDisable = this.isDisabled();\n\n if (ctrl && shouldDisable) {\n Promise.resolve().then(() => {\n ctrl.disable();\n });\n }\n });\n\n // Observe the current control's status/value changes. Re-subscribes when\n // the control changes (e.g. `[control]` arrives after init, or the field\n // switches from its internal control to an external one).\n effect(() => {\n const ctrl = this.actualControl();\n if (ctrl === this.observedControl) return;\n\n this.controlSubscription?.unsubscribe();\n this.observedControl = ctrl;\n\n if (ctrl.invalid && ctrl.touched) {\n this.hadError.set(true);\n }\n\n this.controlSubscription = merge(ctrl.statusChanges, ctrl.valueChanges).subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n if (ctrl.invalid && ctrl.touched) {\n this.hadError.set(true);\n }\n });\n });\n this.destroyRef.onDestroy(() => this.controlSubscription?.unsubscribe());\n\n this.transloco.langChanges$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n });\n }\n\n /** Prevents disallowed characters based on the `numbersOnly`/`allowDecimals` config. */\n numberValidation(event: KeyboardEvent) {\n const allowedKeys = [\n 'Backspace',\n 'Tab',\n 'End',\n 'Home',\n 'ArrowLeft',\n 'ArrowRight',\n 'Delete',\n ];\n\n if (this.numbersOnly()) {\n const isNumber = /^\\d$/.test(event.key);\n if (!isNumber && !allowedKeys.includes(event.key)) {\n event.preventDefault();\n }\n return;\n }\n\n if (this.allowDecimals() || this.type() === 'number') {\n allowedKeys.push('.');\n }\n\n const isDecimal = event.key === '.' || event.key === ',';\n const isNumber = !isNaN(Number(event.key));\n\n if (allowedKeys.includes(event.key)) {\n if (isDecimal) {\n const input = event.target as HTMLInputElement;\n const currentValue = input.value;\n\n const hasDecimalSeparator =\n currentValue.includes('.') || currentValue.includes(',');\n\n if (hasDecimalSeparator) {\n event.preventDefault();\n }\n }\n return;\n }\n\n if (isNumber) {\n return;\n }\n\n event.preventDefault();\n }\n\n /** Marks the field as touched and refreshes the error state. */\n onBlur(): void {\n this.onTouched();\n this.touch.emit();\n\n this.errorTracker.update((v) => v + 1);\n\n if (this.usesSignalForms()) {\n return;\n }\n\n const ctrl = this.actualControl();\n if (ctrl?.invalid && ctrl?.touched) {\n this.hadError.set(true);\n }\n }\n\n /** Formats the raw input as a credit card number and notifies the control. */\n onCardInput(event: Event): void {\n const input = event.target as HTMLInputElement;\n let value = input.value.replace(/[^0-9]/g, '');\n\n if (value.length > 16) {\n value = value.substring(0, 16);\n }\n\n let formatted = '';\n for (let i = 0; i < value.length; i++) {\n if (i > 0 && i % 4 === 0) {\n formatted += '-';\n }\n formatted += value[i];\n }\n\n input.value = formatted;\n this._value.set(formatted);\n this.onChange(formatted);\n }\n\n /** Handles raw input: applies number/card/max-length formatting and notifies the control. */\n onInput(event: Event): void {\n const input = event.target as HTMLInputElement | HTMLTextAreaElement;\n let newValue = input.value;\n\n if (this.allowDecimals()) {\n newValue = newValue.replace(/,/g, '.');\n\n const parts = newValue.split('.');\n if (parts.length > 2) {\n newValue = parts[0] + '.' + parts.slice(1).join('');\n }\n\n if (parts.length > 1 && parts[1].length > 2) {\n newValue = parts[0] + '.' + parts[1].substring(0, 2);\n }\n }\n\n if (this.numbersOnly()) {\n newValue = newValue.replace(/[^0-9]/g, '');\n }\n\n const maxLen = this.maxLength();\n if (maxLen && newValue.length > maxLen) {\n newValue = newValue.substring(0, maxLen);\n input.value = newValue;\n\n const ctrl = this.actualControl();\n setTimeout(() => {\n ctrl?.updateValueAndValidity();\n this.errorTracker.update((v) => v + 1);\n });\n }\n\n if (this.formatCard()) {\n this.onCardInput(event);\n } else {\n this._value.set(newValue);\n this.onChange(newValue);\n }\n }\n\n /** Toggles the visibility of a password field. */\n togglePasswordVisibility(): void {\n this.showPassword.update((v) => !v);\n }\n\n /** Sets the value from the form control applying the same formatting rules. */\n writeValue(value: any): void {\n let processedValue = value;\n\n if (this.allowDecimals() && value) {\n processedValue = String(value).replace(/,/g, '.');\n }\n\n if (this.numbersOnly() && value) {\n processedValue = value.toString().replace(/[^0-9]/g, '');\n }\n\n const maxLen = this.maxLength();\n if (maxLen && processedValue?.length > maxLen) {\n processedValue = processedValue.substring(0, maxLen);\n }\n\n if (this.formatCard() && processedValue) {\n const cleaned = processedValue.replace(/[^0-9]/g, '');\n let formatted = '';\n for (let i = 0; i < cleaned.length; i++) {\n if (i > 0 && i % 4 === 0) formatted += '-';\n formatted += cleaned[i];\n }\n this._value.set(formatted);\n } else {\n this._value.set(processedValue);\n }\n }\n\n /** Registers the callback invoked on value changes (ControlValueAccessor). */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** Registers the callback invoked when the field is touched. */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** Reflects the disabled state of the form control. */\n setDisabledState(isDisabled: boolean): void {\n this._disabledState.set(isDisabled);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n @if (!isTextArea()) {\n <div class=\"flex\">\n @if (searchMode()) {\n @let isDisabledSearch = actualControl().disabled || isDisabled();\n <input\n #input\n [id]=\"id()\"\n type=\"text\"\n [value]=\"displayValue() || ''\"\n [placeholder]=\"placeholder() || label()\"\n [readOnly]=\"true\"\n [disabled]=\"isDisabledSearch\"\n (click)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (keydown.enter)=\"!isDisabledSearch && searchButtonClick.emit()\"\n (blur)=\"onBlur()\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"(shouldShowError() && !isDisabledSearch) || null\"\n [class.cursor-pointer]=\"!isDisabledSearch\"\n [class.cursor-not-allowed]=\"isDisabledSearch\"\n [class._shk-bg-surface-50]=\"isDisabledSearch\"\n [class._shk-text-surface-400]=\"isDisabledSearch\"\n class=\"shk-control shk-control-addon block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-l-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500': shouldShowError() && !isDisabledSearch,\n '_shk-border': !shouldShowError() || isDisabledSearch,\n 'cursor-pointer': !isDisabledSearch,\n 'cursor-not-allowed _shk-text-surface-400 dark:[color:var(--shk-surface-400)]': isDisabledSearch\n }\"\n />\n <button\n type=\"button\"\n (click)=\"searchButtonClick.emit()\"\n tabindex=\"-1\"\n [disabled]=\"isDisabledSearch\"\n class=\"px-3 flex items-center justify-center shrink-0 _shk-bg-primary hover:[background-color:var(--shk-primary-700)] text-white border _shk-border-primary rounded-r-lg transition-colors duration-200 disabled:[background-color:var(--shk-surface-300)] dark:disabled:[background-color:var(--shk-surface-200)] disabled:[border-color:var(--shk-surface-300)] dark:disabled:[border-color:var(--shk-surface-200)] disabled:cursor-not-allowed\"\n >\n <svg [shkIcon]=\"getIcon('search')\" class=\"w-4 h-4\"></svg>\n </button>\n }\n\n @if (!searchMode()) {\n <input\n #input\n [id]=\"id()\"\n [maxlength]=\"maxLength() || (formatCard() ? 19 : null)\"\n [min]=\"type() === 'number' && preventNegative() ? '0' : null\"\n (keypress)=\"type() === 'number' || numbersOnly() ? numberValidation($event) : null\"\n [type]=\"effectiveType()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n [autocomplete]=\"autocomplete()\"\n (blur)=\"onBlur()\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n [class.pr-8]=\"type() === 'password' && actualControl().value?.length > 0\"\n [class.pr-3]=\"type() !== 'password' || !actualControl().value?.length\"\n />\n\n @if (type() === 'password' && actualControl().value?.length > 0) {\n <button\n type=\"button\"\n (click)=\"togglePasswordVisibility()\"\n [disabled]=\"actualControl().disabled\"\n class=\"absolute right-3 top-1/2 -translate-y-1/2 _shk-text-surface-400 hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-600)] focus:outline-none\"\n >\n @if (showPassword()) {\n <svg [shkIcon]=\"getIcon('eye-off')\" class=\"w-4 h-4\"></svg>\n } @else {\n <svg [shkIcon]=\"getIcon('eye')\" class=\"w-4 h-4\"></svg>\n }\n </button>\n }\n }\n </div>\n }\n\n @if (isTextArea()) {\n <textarea\n #textarea\n [id]=\"id()\"\n [formControl]=\"$any(actualControl())\"\n [placeholder]=\"placeholder() || label()\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n [class]=\"isTextArea() ? textAreaHeight() : 'h-28'\"\n [attr.aria-invalid]=\"shouldShowError() || null\"\n [class.shk-control-valid]=\"wasFixedError()\"\n class=\"shk-control block w-full px-3 py-2 _shk-text-surface-700 _shk-bg-surface-50 border rounded-lg transition-colors placeholder:[color:var(--shk-surface-400)] dark:placeholder:[color:var(--shk-surface-400)] focus:outline-none focus:[background-color:var(--shk-surface-50)] dark:focus:[background-color:var(--shk-surface-100)] focus:ring-1 resize-none disabled:[background-color:var(--shk-surface-50)] dark:disabled:[background-color:var(--shk-surface-100)] disabled:cursor-not-allowed disabled:[color:var(--shk-surface-400)] dark:disabled:[color:var(--shk-surface-400)] sm:text-sm\"\n [ngClass]=\"{\n 'border-red-500 focus:border-red-500 focus:ring-red-500': shouldShowError(),\n 'border-green-500 focus:border-green-500 focus:ring-green-500': wasFixedError(),\n '_shk-border focus:[border-color:var(--shk-primary-500)] focus:[--tw-ring-color:var(--shk-primary-500)]': !shouldShowError() && !wasFixedError()\n }\"\n ></textarea>\n }\n </div>\n\n @if (shouldShowError()) {\n <div class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\" tabindex=\"-1\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;;;AA8DA,IAAa,qBAAb,MAAa,mBAAkB;CA+D7B,IAAY,SAAM;EAChB,OAAO,KAAK;CACd;CAqHA,cAAA;EArLQ,KAAA,MAAM,OAAO,iBAAiB;EAGtC,KAAA,KAAK,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;EAEtB,KAAA,aAAa,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAElC,KAAA,kBAAkB,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;EAEvC,KAAA,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAEzB,KAAA,OAAO,MAAc,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAE5B,KAAA,cAAc,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAEnC,KAAA,gBAAgB,MAAe,OAAM,GAAA,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