codexly-ui 0.10.88 → 0.10.90
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/assets/styles/_theme.css +12 -1
- package/assets/styles/styles.css +1 -1
- package/fesm2022/codexly-ui.mjs +228 -3
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +69 -11
package/assets/styles/_theme.css
CHANGED
|
@@ -24,9 +24,15 @@
|
|
|
24
24
|
--clx-text: #0f172a; /* slate-900 — body text */
|
|
25
25
|
--clx-text-label: #475569; /* slate-600 — field labels */
|
|
26
26
|
--clx-text-muted: #64748b; /* slate-500 — secondary text, body in alerts */
|
|
27
|
-
--clx-text-subtle: #94a3b8; /* slate-400 — hints,
|
|
27
|
+
--clx-text-subtle: #94a3b8; /* slate-400 — hints, idle nav */
|
|
28
28
|
--clx-text-faint: #cbd5e1; /* slate-300 — out-of-range calendar days */
|
|
29
29
|
|
|
30
|
+
/* Fixed input placeholder color — intentionally NOT derived from --clx-text-subtle:
|
|
31
|
+
a custom theme can set --clx-text-subtle close to --clx-text-label (e.g. via the
|
|
32
|
+
theme picker), which collapses placeholder/typed-text contrast. Placeholders need
|
|
33
|
+
a guaranteed-low-contrast color regardless of the user's theme customization. */
|
|
34
|
+
--clx-placeholder: #94a3b8; /* slate-400 */
|
|
35
|
+
|
|
30
36
|
/* ── Borders ── */
|
|
31
37
|
--clx-border: #e2e8f0; /* slate-200 — default input/card border */
|
|
32
38
|
--clx-border-soft: #f1f5f9; /* slate-100 — card/modal header-footer divider */
|
|
@@ -63,6 +69,10 @@
|
|
|
63
69
|
--clx-text-subtle: #64748b; /* slate-500 */
|
|
64
70
|
--clx-text-faint: #475569; /* slate-600 */
|
|
65
71
|
|
|
72
|
+
/* Fixed input placeholder color — see :root definition above for why this is independent
|
|
73
|
+
of --clx-text-subtle. */
|
|
74
|
+
--clx-placeholder: #64748b; /* slate-500 */
|
|
75
|
+
|
|
66
76
|
/* ── Borders ── */
|
|
67
77
|
--clx-border: #334155; /* slate-700 */
|
|
68
78
|
--clx-border-soft: #1e293b; /* slate-800 */
|
|
@@ -87,6 +97,7 @@
|
|
|
87
97
|
--color-clx-text-muted: var(--clx-text-muted);
|
|
88
98
|
--color-clx-text-subtle: var(--clx-text-subtle);
|
|
89
99
|
--color-clx-text-faint: var(--clx-text-faint);
|
|
100
|
+
--color-clx-placeholder: var(--clx-placeholder);
|
|
90
101
|
--color-clx-border: var(--clx-border);
|
|
91
102
|
--color-clx-border-soft: var(--clx-border-soft);
|
|
92
103
|
--color-clx-primary: var(--clx-primary);
|
package/assets/styles/styles.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
@source inline("text-{black,white}");
|
|
10
10
|
@source inline("focus:ring-2 focus-within:ring-2 ring-2");
|
|
11
11
|
@source inline("{bg,border,text}-clx-{surface,surface-2,surface-3,bg,text,text-label,text-muted,text-subtle,text-faint,border,border-soft}");
|
|
12
|
-
@source inline("placeholder:text-clx-
|
|
12
|
+
@source inline("placeholder:text-clx-placeholder");
|
|
13
13
|
|
|
14
14
|
/* ── Shared backdrop base ── */
|
|
15
15
|
.clx-modal-backdrop,
|
package/fesm2022/codexly-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, ElementRef, HostAttributeToken, output, Directive, forwardRef, contentChild, ApplicationRef, EnvironmentInjector, RendererFactory2, createComponent, DestroyRef, untracked, HostListener, viewChild, ViewChild, Injector, ChangeDetectorRef, NgZone, model, contentChildren, ContentChildren,
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken, inject, PLATFORM_ID, signal, effect, Injectable, ElementRef, HostAttributeToken, output, Directive, forwardRef, contentChild, ApplicationRef, EnvironmentInjector, RendererFactory2, createComponent, DestroyRef, untracked, ViewChildren, HostListener, viewChild, ViewChild, Injector, ChangeDetectorRef, NgZone, model, contentChildren, ContentChildren, numberAttribute, booleanAttribute, Input } from '@angular/core';
|
|
3
3
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
4
4
|
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT, NgStyle, CurrencyPipe, DecimalPipe } from '@angular/common';
|
|
5
5
|
import * as i1$1 from '@angular/forms';
|
|
@@ -2008,7 +2008,8 @@ const CLX_BG_SECTION = 'bg-clx-surface-2'; // card/modal header+footer
|
|
|
2008
2008
|
const CLX_BG_ICON_WRAP = 'bg-clx-surface-3'; // empty-state icon wrapper
|
|
2009
2009
|
const CLX_BG_ADDON = 'bg-clx-surface-3'; // prefix/suffix text addon
|
|
2010
2010
|
// ── Placeholder ───────────────────────────────────────────────────────────────
|
|
2011
|
-
|
|
2011
|
+
// Fixed color independent of --clx-text-subtle — see _theme.css for why.
|
|
2012
|
+
const CLX_PLACEHOLDER = 'placeholder:text-clx-placeholder';
|
|
2012
2013
|
// ── Disabled borders ──────────────────────────────────────────────────────────
|
|
2013
2014
|
const CLX_BORDER_DISABLED = 'border-clx-border';
|
|
2014
2015
|
// ── Addon (prefix/suffix text) ────────────────────────────────────────────────
|
|
@@ -3185,6 +3186,230 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
3185
3186
|
}]
|
|
3186
3187
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], prefixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixIcon", required: false }] }], suffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixIcon", required: false }] }], prefixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefixText", required: false }] }], suffixText: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixText", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], statusMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusMessage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }] } });
|
|
3187
3188
|
|
|
3189
|
+
const OTP_SIZE_MAP = {
|
|
3190
|
+
xs: { box: 'w-8 h-8 text-sm', text: 'text-sm', gap: 'gap-1.5' },
|
|
3191
|
+
sm: { box: 'w-10 h-10 text-base', text: 'text-base', gap: 'gap-2' },
|
|
3192
|
+
md: { box: 'w-12 h-12 text-lg', text: 'text-lg', gap: 'gap-2.5' },
|
|
3193
|
+
lg: { box: 'w-14 h-14 text-xl', text: 'text-xl', gap: 'gap-3' },
|
|
3194
|
+
};
|
|
3195
|
+
|
|
3196
|
+
class ClxOtpComponent {
|
|
3197
|
+
_themeSvc = inject(ClxThemeService);
|
|
3198
|
+
// ── Inputs ─────────────────────────────────────────────────────────────────
|
|
3199
|
+
length = input(4, ...(ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []));
|
|
3200
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
3201
|
+
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
3202
|
+
size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
3203
|
+
hint = input('', ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
3204
|
+
status = input('default', ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
|
|
3205
|
+
errorMessage = input('Código inválido', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
3206
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
3207
|
+
/** Autofocus the first box on init */
|
|
3208
|
+
autoFocus = input(false, ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
|
|
3209
|
+
_color = computed(() => this.color() ?? this._themeSvc.config().primaryColor, ...(ngDevMode ? [{ debugName: "_color" }] : /* istanbul ignore next */ []));
|
|
3210
|
+
_size = computed(() => (this.size() ?? this._themeSvc.config().defaultSize), ...(ngDevMode ? [{ debugName: "_size" }] : /* istanbul ignore next */ []));
|
|
3211
|
+
_sizeConfig = computed(() => OTP_SIZE_MAP[this._size()], ...(ngDevMode ? [{ debugName: "_sizeConfig" }] : /* istanbul ignore next */ []));
|
|
3212
|
+
_statusCfg = computed(() => INPUT_STATUS_MAP[this.status()], ...(ngDevMode ? [{ debugName: "_statusCfg" }] : /* istanbul ignore next */ []));
|
|
3213
|
+
_indices = computed(() => Array.from({ length: this.length() }, (_, i) => i), ...(ngDevMode ? [{ debugName: "_indices" }] : /* istanbul ignore next */ []));
|
|
3214
|
+
// ── Internal state ───────────────────────────────────────────────────────────
|
|
3215
|
+
static _seq = 0;
|
|
3216
|
+
_labelId = `clx-otp-label-${++ClxOtpComponent._seq}`;
|
|
3217
|
+
_digits = signal([], ...(ngDevMode ? [{ debugName: "_digits" }] : /* istanbul ignore next */ []));
|
|
3218
|
+
_wasTouched = signal(false, ...(ngDevMode ? [{ debugName: "_wasTouched" }] : /* istanbul ignore next */ []));
|
|
3219
|
+
_cvaDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_cvaDisabled" }] : /* istanbul ignore next */ []));
|
|
3220
|
+
_boxes;
|
|
3221
|
+
_onChange = () => { };
|
|
3222
|
+
_onTouched = () => { };
|
|
3223
|
+
ngAfterViewInit() {
|
|
3224
|
+
if (this.autoFocus())
|
|
3225
|
+
this._focusBox(0);
|
|
3226
|
+
}
|
|
3227
|
+
_isInvalid = computed(() => this._wasTouched() && this.status() === 'error', ...(ngDevMode ? [{ debugName: "_isInvalid" }] : /* istanbul ignore next */ []));
|
|
3228
|
+
// ── Classes ──────────────────────────────────────────────────────────────────
|
|
3229
|
+
_labelClass = computed(() => `text-sm font-medium ${CLX_TEXT_LABEL} leading-none`, ...(ngDevMode ? [{ debugName: "_labelClass" }] : /* istanbul ignore next */ []));
|
|
3230
|
+
_hintClass = computed(() => `text-xs ${CLX_TEXT_HINT}`, ...(ngDevMode ? [{ debugName: "_hintClass" }] : /* istanbul ignore next */ []));
|
|
3231
|
+
_groupClass = computed(() => `flex ${this._sizeConfig().gap}`, ...(ngDevMode ? [{ debugName: "_groupClass" }] : /* istanbul ignore next */ []));
|
|
3232
|
+
_boxClass = computed(() => {
|
|
3233
|
+
const s = this._sizeConfig();
|
|
3234
|
+
const radius = resolveRadius(this._themeSvc.config().borderRadius);
|
|
3235
|
+
const base = `${s.box} text-center font-semibold outline-none border transition-[border-color,box-shadow] duration-200 ${radius}`;
|
|
3236
|
+
if (this._cvaDisabled() || this.disabled()) {
|
|
3237
|
+
return `${base} ${CLX_BORDER_DISABLED} ${CLX_BG_DISABLED} ${CLX_TEXT_DISABLED} cursor-not-allowed`;
|
|
3238
|
+
}
|
|
3239
|
+
if (this.status() === 'error') {
|
|
3240
|
+
return `${base} ${CLX_BG_SURFACE} ${CLX_TEXT_INPUT} ${this._statusCfg().border} focus:ring-2 focus:ring-red-500/20 focus:border-red-500`;
|
|
3241
|
+
}
|
|
3242
|
+
return `${base} ${CLX_BG_SURFACE} ${CLX_TEXT_INPUT} border-clx-border ${resolveColor(this._color()).focusDirect}`;
|
|
3243
|
+
}, ...(ngDevMode ? [{ debugName: "_boxClass" }] : /* istanbul ignore next */ []));
|
|
3244
|
+
// ── Handlers ─────────────────────────────────────────────────────────────────
|
|
3245
|
+
_onInput(index, event) {
|
|
3246
|
+
const el = event.target;
|
|
3247
|
+
const raw = el.value.replace(/[^0-9]/g, '').slice(-1);
|
|
3248
|
+
el.value = raw;
|
|
3249
|
+
const next = [...this._digits()];
|
|
3250
|
+
next[index] = raw;
|
|
3251
|
+
this._digits.set(next);
|
|
3252
|
+
this._emit();
|
|
3253
|
+
if (raw && index < this.length() - 1) {
|
|
3254
|
+
this._focusBox(index + 1);
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
_onKeydown(index, event) {
|
|
3258
|
+
if (event.key === 'Backspace' && !this._digits()[index] && index > 0) {
|
|
3259
|
+
event.preventDefault();
|
|
3260
|
+
const next = [...this._digits()];
|
|
3261
|
+
next[index - 1] = '';
|
|
3262
|
+
this._digits.set(next);
|
|
3263
|
+
this._emit();
|
|
3264
|
+
this._focusBox(index - 1);
|
|
3265
|
+
return;
|
|
3266
|
+
}
|
|
3267
|
+
if (event.key === 'ArrowLeft' && index > 0) {
|
|
3268
|
+
event.preventDefault();
|
|
3269
|
+
this._focusBox(index - 1);
|
|
3270
|
+
}
|
|
3271
|
+
if (event.key === 'ArrowRight' && index < this.length() - 1) {
|
|
3272
|
+
event.preventDefault();
|
|
3273
|
+
this._focusBox(index + 1);
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
_onPaste(event) {
|
|
3277
|
+
event.preventDefault();
|
|
3278
|
+
const text = event.clipboardData?.getData('text') ?? '';
|
|
3279
|
+
const digits = text.replace(/[^0-9]/g, '').slice(0, this.length()).split('');
|
|
3280
|
+
if (!digits.length)
|
|
3281
|
+
return;
|
|
3282
|
+
const next = Array.from({ length: this.length() }, (_, i) => digits[i] ?? '');
|
|
3283
|
+
this._digits.set(next);
|
|
3284
|
+
this._emit();
|
|
3285
|
+
const lastIndex = Math.min(digits.length, this.length() - 1);
|
|
3286
|
+
this._focusBox(lastIndex);
|
|
3287
|
+
}
|
|
3288
|
+
_onFocus(index) {
|
|
3289
|
+
// Select the digit on focus so typing over it replaces instead of appending —
|
|
3290
|
+
// maxlength=1 already blocks a second char, but selecting avoids the visual
|
|
3291
|
+
// flash of the old digit before the new one lands.
|
|
3292
|
+
queueMicrotask(() => this._boxes?.get(index)?.nativeElement.select());
|
|
3293
|
+
}
|
|
3294
|
+
_handleBlur() {
|
|
3295
|
+
this._wasTouched.set(true);
|
|
3296
|
+
this._onTouched();
|
|
3297
|
+
}
|
|
3298
|
+
_focusBox(index) {
|
|
3299
|
+
this._boxes?.get(index)?.nativeElement.focus();
|
|
3300
|
+
}
|
|
3301
|
+
_emit() {
|
|
3302
|
+
const value = this._digits().join('');
|
|
3303
|
+
this._onChange(value);
|
|
3304
|
+
}
|
|
3305
|
+
// ── CVA ──────────────────────────────────────────────────────────────────────
|
|
3306
|
+
writeValue(val) {
|
|
3307
|
+
const chars = (val ?? '').replace(/[^0-9]/g, '').slice(0, this.length()).split('');
|
|
3308
|
+
this._digits.set(Array.from({ length: this.length() }, (_, i) => chars[i] ?? ''));
|
|
3309
|
+
}
|
|
3310
|
+
registerOnChange(fn) {
|
|
3311
|
+
this._onChange = fn;
|
|
3312
|
+
}
|
|
3313
|
+
registerOnTouched(fn) {
|
|
3314
|
+
this._onTouched = fn;
|
|
3315
|
+
}
|
|
3316
|
+
setDisabledState(disabled) {
|
|
3317
|
+
this._cvaDisabled.set(disabled);
|
|
3318
|
+
}
|
|
3319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxOtpComponent, isStandalone: true, selector: "clx-otp", inputs: { length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1.5" }, providers: [
|
|
3321
|
+
{
|
|
3322
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3323
|
+
useExisting: forwardRef(() => ClxOtpComponent),
|
|
3324
|
+
multi: true,
|
|
3325
|
+
},
|
|
3326
|
+
], viewQueries: [{ propertyName: "_boxes", predicate: ["box"], descendants: true }], ngImport: i0, template: `
|
|
3327
|
+
@if (label()) {
|
|
3328
|
+
<span [id]="_labelId" [class]="_labelClass()">{{ label() }}</span>
|
|
3329
|
+
}
|
|
3330
|
+
|
|
3331
|
+
<div [class]="_groupClass()" role="group" [attr.aria-labelledby]="label() ? _labelId : null">
|
|
3332
|
+
@for (i of _indices(); track i) {
|
|
3333
|
+
<input
|
|
3334
|
+
#box
|
|
3335
|
+
type="text"
|
|
3336
|
+
inputmode="numeric"
|
|
3337
|
+
autocomplete="one-time-code"
|
|
3338
|
+
maxlength="1"
|
|
3339
|
+
[attr.aria-label]="'Dígito ' + (i + 1)"
|
|
3340
|
+
[disabled]="disabled()"
|
|
3341
|
+
[class]="_boxClass()"
|
|
3342
|
+
[value]="_digits()[i] ?? ''"
|
|
3343
|
+
(input)="_onInput(i, $event)"
|
|
3344
|
+
(keydown)="_onKeydown(i, $event)"
|
|
3345
|
+
(paste)="_onPaste($event)"
|
|
3346
|
+
(focus)="_onFocus(i)"
|
|
3347
|
+
(blur)="_handleBlur()"
|
|
3348
|
+
/>
|
|
3349
|
+
}
|
|
3350
|
+
</div>
|
|
3351
|
+
|
|
3352
|
+
@if (_isInvalid()) {
|
|
3353
|
+
<p [class]="_hintClass()" style="color:#ef4444">{{ errorMessage() }}</p>
|
|
3354
|
+
} @else if (hint()) {
|
|
3355
|
+
<p [class]="_hintClass()">{{ hint() }}</p>
|
|
3356
|
+
}
|
|
3357
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3358
|
+
}
|
|
3359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxOtpComponent, decorators: [{
|
|
3360
|
+
type: Component,
|
|
3361
|
+
args: [{
|
|
3362
|
+
selector: 'clx-otp',
|
|
3363
|
+
standalone: true,
|
|
3364
|
+
imports: [],
|
|
3365
|
+
providers: [
|
|
3366
|
+
{
|
|
3367
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3368
|
+
useExisting: forwardRef(() => ClxOtpComponent),
|
|
3369
|
+
multi: true,
|
|
3370
|
+
},
|
|
3371
|
+
],
|
|
3372
|
+
template: `
|
|
3373
|
+
@if (label()) {
|
|
3374
|
+
<span [id]="_labelId" [class]="_labelClass()">{{ label() }}</span>
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
<div [class]="_groupClass()" role="group" [attr.aria-labelledby]="label() ? _labelId : null">
|
|
3378
|
+
@for (i of _indices(); track i) {
|
|
3379
|
+
<input
|
|
3380
|
+
#box
|
|
3381
|
+
type="text"
|
|
3382
|
+
inputmode="numeric"
|
|
3383
|
+
autocomplete="one-time-code"
|
|
3384
|
+
maxlength="1"
|
|
3385
|
+
[attr.aria-label]="'Dígito ' + (i + 1)"
|
|
3386
|
+
[disabled]="disabled()"
|
|
3387
|
+
[class]="_boxClass()"
|
|
3388
|
+
[value]="_digits()[i] ?? ''"
|
|
3389
|
+
(input)="_onInput(i, $event)"
|
|
3390
|
+
(keydown)="_onKeydown(i, $event)"
|
|
3391
|
+
(paste)="_onPaste($event)"
|
|
3392
|
+
(focus)="_onFocus(i)"
|
|
3393
|
+
(blur)="_handleBlur()"
|
|
3394
|
+
/>
|
|
3395
|
+
}
|
|
3396
|
+
</div>
|
|
3397
|
+
|
|
3398
|
+
@if (_isInvalid()) {
|
|
3399
|
+
<p [class]="_hintClass()" style="color:#ef4444">{{ errorMessage() }}</p>
|
|
3400
|
+
} @else if (hint()) {
|
|
3401
|
+
<p [class]="_hintClass()">{{ hint() }}</p>
|
|
3402
|
+
}
|
|
3403
|
+
`,
|
|
3404
|
+
encapsulation: ViewEncapsulation.None,
|
|
3405
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3406
|
+
host: { class: 'flex flex-col gap-1.5' },
|
|
3407
|
+
}]
|
|
3408
|
+
}], propDecorators: { length: [{ type: i0.Input, args: [{ isSignal: true, alias: "length", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], _boxes: [{
|
|
3409
|
+
type: ViewChildren,
|
|
3410
|
+
args: ['box']
|
|
3411
|
+
}] } });
|
|
3412
|
+
|
|
3188
3413
|
// ── Size map ─────────────────────────────────────────────────────────────────
|
|
3189
3414
|
const TEXTAREA_SIZE_MAP = {
|
|
3190
3415
|
sm: {
|
|
@@ -16496,5 +16721,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
16496
16721
|
* Generated bundle index. Do not edit.
|
|
16497
16722
|
*/
|
|
16498
16723
|
|
|
16499
|
-
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
16724
|
+
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNumberComponent, ClxOtpComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
16500
16725
|
//# sourceMappingURL=codexly-ui.mjs.map
|