ngx-core-components 0.3.16 → 0.3.18
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 +1 -0
- package/ai/ai-audio-wave/ai-audio-wave.component.d.ts +18 -4
- package/ai/ai-chat/ai-chat.component.d.ts +35 -2
- package/ai/ai-chat/models.d.ts +6 -0
- package/ai/ai-code-editor/ai-code-editor.component.d.ts +15 -1
- package/ai/ai-rag-inspector/ai-rag-inspector.component.d.ts +22 -0
- package/ai/ai-rag-inspector/models.d.ts +15 -0
- package/ai/public-api.d.ts +2 -0
- package/buttons/button/button.component.d.ts +15 -1
- package/buttons/split-button/split-button.component.d.ts +4 -0
- package/charts/bubble-chart/bubble-chart.component.d.ts +75 -0
- package/charts/public-api.d.ts +4 -0
- package/charts/sunburst-chart/sunburst-chart.component.d.ts +63 -0
- package/fesm2022/ngx-core-components-ai.mjs +910 -48
- package/fesm2022/ngx-core-components-ai.mjs.map +1 -1
- package/fesm2022/ngx-core-components-buttons.mjs +231 -30
- package/fesm2022/ngx-core-components-buttons.mjs.map +1 -1
- package/fesm2022/ngx-core-components-charts.mjs +940 -1
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +858 -237
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-layout.mjs +172 -25
- package/fesm2022/ngx-core-components-layout.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +422 -2
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +2 -2
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/inputs/checkbox/checkbox.component.d.ts +6 -2
- package/inputs/date-range-picker/date-range-picker.component.d.ts +1 -1
- package/inputs/dropdown/dropdown.component.d.ts +1 -0
- package/inputs/file-preview/file-preview.component.d.ts +1 -1
- package/inputs/file-upload/file-upload.component.d.ts +1 -0
- package/inputs/numeric-textbox/numeric-textbox.component.d.ts +5 -1
- package/inputs/radio/radio-group.component.d.ts +12 -2
- package/inputs/rating/rating.component.d.ts +17 -4
- package/inputs/segmented-control/segmented-control.component.d.ts +2 -2
- package/inputs/switch/switch.component.d.ts +14 -4
- package/inputs/textarea/textarea.component.d.ts +3 -1
- package/inputs/textbox/textbox.component.d.ts +4 -1
- package/layout/accordion/accordion.component.d.ts +2 -0
- package/layout/tab-strip/tab-strip.component.d.ts +5 -1
- package/package.json +2 -1
- package/public-api.d.ts +6 -2
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +64 -0
- package/themes/theme.css +34 -0
- package/views/calendar/calendar.component.d.ts +54 -0
- package/views/public-api.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, signal, computed, forwardRef, ChangeDetectionStrategy, Component, inject, ElementRef, HostListener,
|
|
2
|
+
import { input, output, signal, computed, forwardRef, ChangeDetectionStrategy, Component, inject, ElementRef, HostListener, model, effect, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -19,6 +19,8 @@ class TextBoxComponent {
|
|
|
19
19
|
prefixIcon = input('');
|
|
20
20
|
suffixIcon = input('');
|
|
21
21
|
passwordToggle = input(false);
|
|
22
|
+
// Enterprise status state
|
|
23
|
+
status = input('default');
|
|
22
24
|
valueChange = output();
|
|
23
25
|
focusChange = output();
|
|
24
26
|
isFocused = signal(false);
|
|
@@ -27,6 +29,12 @@ class TextBoxComponent {
|
|
|
27
29
|
_cvaActive = false;
|
|
28
30
|
_onChange = () => { };
|
|
29
31
|
_onTouched = () => { };
|
|
32
|
+
_id = 'ngx-txt-' + Math.random().toString(36).substring(2, 9);
|
|
33
|
+
_resolvedStatus = computed(() => {
|
|
34
|
+
if (this.error())
|
|
35
|
+
return 'error';
|
|
36
|
+
return this.status();
|
|
37
|
+
});
|
|
30
38
|
/** Merges reactive-form value (CVA) with template binding (input()). CVA takes precedence. */
|
|
31
39
|
_displayValue = computed(() => this._cvaActive ? this._cvaValue() : this.value());
|
|
32
40
|
_currentType = computed(() => {
|
|
@@ -76,18 +84,19 @@ class TextBoxComponent {
|
|
|
76
84
|
// reactive-form disable/enable is handled at the FormControl level.
|
|
77
85
|
}
|
|
78
86
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TextBoxComponent, isStandalone: true, selector: "ngx-textbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, showCharCount: { classPropertyName: "showCharCount", publicName: "showCharCount", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, passwordToggle: { classPropertyName: "passwordToggle", publicName: "passwordToggle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", focusChange: "focusChange" }, providers: [
|
|
87
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TextBoxComponent, isStandalone: true, selector: "ngx-textbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, showCharCount: { classPropertyName: "showCharCount", publicName: "showCharCount", isSignal: true, isRequired: false, transformFunction: null }, prefixIcon: { classPropertyName: "prefixIcon", publicName: "prefixIcon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, passwordToggle: { classPropertyName: "passwordToggle", publicName: "passwordToggle", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", focusChange: "focusChange" }, providers: [
|
|
80
88
|
{
|
|
81
89
|
provide: NG_VALUE_ACCESSOR,
|
|
82
90
|
useExisting: forwardRef(() => TextBoxComponent),
|
|
83
91
|
multi: true,
|
|
84
92
|
},
|
|
85
93
|
], ngImport: i0, template: `
|
|
86
|
-
<div class="ngx-textbox" [class.focused]="isFocused()" [class.has-error]="
|
|
94
|
+
<div class="ngx-textbox" [class.focused]="isFocused()" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()">
|
|
87
95
|
@if (label()) {
|
|
88
|
-
<label class="ngx-textbox-label"
|
|
96
|
+
<label class="ngx-textbox-label">{{ label() }}</label>
|
|
89
97
|
}
|
|
90
|
-
<div class="ngx-textbox-wrap">
|
|
98
|
+
<div class="ngx-textbox-wrap" [class]="'status-' + _resolvedStatus()">
|
|
99
|
+
<ng-content select="[prefix]" />
|
|
91
100
|
@if (prefixIcon()) {
|
|
92
101
|
<span class="ngx-textbox-affix ngx-textbox-prefix" aria-hidden="true">{{ prefixIcon() }}</span>
|
|
93
102
|
}
|
|
@@ -99,11 +108,27 @@ class TextBoxComponent {
|
|
|
99
108
|
[disabled]="disabled()"
|
|
100
109
|
[readOnly]="readonly()"
|
|
101
110
|
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
102
|
-
[attr.aria-invalid]="
|
|
111
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
103
112
|
(input)="onInput($event)"
|
|
104
113
|
(focus)="onFocus()"
|
|
105
114
|
(blur)="onBlur()"
|
|
106
115
|
/>
|
|
116
|
+
|
|
117
|
+
<!-- Status Indicator Icons -->
|
|
118
|
+
@if (_resolvedStatus() === 'success') {
|
|
119
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
120
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
121
|
+
</span>
|
|
122
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
123
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
124
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
125
|
+
</span>
|
|
126
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
127
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
128
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
129
|
+
</span>
|
|
130
|
+
}
|
|
131
|
+
|
|
107
132
|
@if (type() === 'password' && passwordToggle() && !disabled()) {
|
|
108
133
|
<button class="ngx-textbox-password-toggle" type="button" (click)="togglePasswordVisibility()" [attr.aria-label]="showPassword() ? 'Hide password' : 'Show password'">
|
|
109
134
|
@if (showPassword()) {
|
|
@@ -119,17 +144,22 @@ class TextBoxComponent {
|
|
|
119
144
|
@if (suffixIcon()) {
|
|
120
145
|
<span class="ngx-textbox-affix ngx-textbox-suffix" aria-hidden="true">{{ suffixIcon() }}</span>
|
|
121
146
|
}
|
|
147
|
+
<ng-content select="[suffix]" />
|
|
148
|
+
</div>
|
|
149
|
+
<div class="ngx-textbox-footer">
|
|
150
|
+
@if (error()) {
|
|
151
|
+
<div class="ngx-textbox-error" [attr.id]="'err-' + _id">{{ error() }}</div>
|
|
152
|
+
} @else if (hint()) {
|
|
153
|
+
<div class="ngx-textbox-hint">{{ hint() }}</div>
|
|
154
|
+
} @else {
|
|
155
|
+
<div></div>
|
|
156
|
+
}
|
|
157
|
+
@if (maxlength() > 0 && showCharCount()) {
|
|
158
|
+
<div class="ngx-textbox-charcount">{{ _displayValue().length }} / {{ maxlength() }}</div>
|
|
159
|
+
}
|
|
122
160
|
</div>
|
|
123
|
-
@if (maxlength() > 0 && showCharCount()) {
|
|
124
|
-
<div class="ngx-textbox-charcount">{{ _displayValue().length }} / {{ maxlength() }}</div>
|
|
125
|
-
}
|
|
126
|
-
@if (error()) {
|
|
127
|
-
<div class="ngx-textbox-error">{{ error() }}</div>
|
|
128
|
-
} @else if (hint()) {
|
|
129
|
-
<div class="ngx-textbox-hint">{{ hint() }}</div>
|
|
130
|
-
}
|
|
131
161
|
</div>
|
|
132
|
-
`, isInline: true, styles: [":host{display:block}.ngx-textbox{position:relative;font-family:inherit}.ngx-textbox-label{display:
|
|
162
|
+
`, isInline: true, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-textbox{position:relative;font-family:inherit}.ngx-textbox-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .ngx-textbox-label{color:var(--ngx-input-label-active);transform:translate(2px)}.ngx-textbox-wrap{position:relative;display:flex;align-items:center;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .ngx-textbox-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .ngx-textbox-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .ngx-textbox-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .ngx-textbox-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .ngx-textbox-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.ngx-textbox-input{flex:1;min-width:0;padding:10px 14px;border:none;outline:none;background:transparent;font-size:14px;color:var(--ngx-input-text);font-family:inherit}.ngx-textbox-input::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.ngx-textbox-input:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.ngx-textbox-footer{display:flex;justify-content:space-between;align-items:flex-start;margin-top:5px;font-size:12px}.ngx-textbox-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.ngx-textbox-hint{color:var(--ngx-input-label)}.ngx-textbox-charcount{color:var(--ngx-input-label);font-size:11px;margin-left:auto}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}.ngx-textbox-affix{display:flex;align-items:center;padding:0 10px;color:var(--ngx-input-label);font-size:14px;flex-shrink:0}.ngx-textbox-clear{background:none;border:none;cursor:pointer;color:var(--ngx-input-placeholder);font-size:12px;padding:0 8px;line-height:1;display:flex;align-items:center;flex-shrink:0;transition:color .15s}.ngx-textbox-clear:hover{color:var(--ngx-input-text)}.ngx-textbox-password-toggle{background:none;border:none;cursor:pointer;color:var(--ngx-input-placeholder);font-size:14px;padding:0 8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s}.ngx-textbox-password-toggle:hover{color:var(--ngx-input-text)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
133
163
|
}
|
|
134
164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextBoxComponent, decorators: [{
|
|
135
165
|
type: Component,
|
|
@@ -140,11 +170,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
140
170
|
multi: true,
|
|
141
171
|
},
|
|
142
172
|
], template: `
|
|
143
|
-
<div class="ngx-textbox" [class.focused]="isFocused()" [class.has-error]="
|
|
173
|
+
<div class="ngx-textbox" [class.focused]="isFocused()" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()">
|
|
144
174
|
@if (label()) {
|
|
145
|
-
<label class="ngx-textbox-label"
|
|
175
|
+
<label class="ngx-textbox-label">{{ label() }}</label>
|
|
146
176
|
}
|
|
147
|
-
<div class="ngx-textbox-wrap">
|
|
177
|
+
<div class="ngx-textbox-wrap" [class]="'status-' + _resolvedStatus()">
|
|
178
|
+
<ng-content select="[prefix]" />
|
|
148
179
|
@if (prefixIcon()) {
|
|
149
180
|
<span class="ngx-textbox-affix ngx-textbox-prefix" aria-hidden="true">{{ prefixIcon() }}</span>
|
|
150
181
|
}
|
|
@@ -156,11 +187,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
156
187
|
[disabled]="disabled()"
|
|
157
188
|
[readOnly]="readonly()"
|
|
158
189
|
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
159
|
-
[attr.aria-invalid]="
|
|
190
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
160
191
|
(input)="onInput($event)"
|
|
161
192
|
(focus)="onFocus()"
|
|
162
193
|
(blur)="onBlur()"
|
|
163
194
|
/>
|
|
195
|
+
|
|
196
|
+
<!-- Status Indicator Icons -->
|
|
197
|
+
@if (_resolvedStatus() === 'success') {
|
|
198
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
199
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
200
|
+
</span>
|
|
201
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
202
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
203
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
204
|
+
</span>
|
|
205
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
206
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
207
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
208
|
+
</span>
|
|
209
|
+
}
|
|
210
|
+
|
|
164
211
|
@if (type() === 'password' && passwordToggle() && !disabled()) {
|
|
165
212
|
<button class="ngx-textbox-password-toggle" type="button" (click)="togglePasswordVisibility()" [attr.aria-label]="showPassword() ? 'Hide password' : 'Show password'">
|
|
166
213
|
@if (showPassword()) {
|
|
@@ -176,17 +223,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
176
223
|
@if (suffixIcon()) {
|
|
177
224
|
<span class="ngx-textbox-affix ngx-textbox-suffix" aria-hidden="true">{{ suffixIcon() }}</span>
|
|
178
225
|
}
|
|
226
|
+
<ng-content select="[suffix]" />
|
|
227
|
+
</div>
|
|
228
|
+
<div class="ngx-textbox-footer">
|
|
229
|
+
@if (error()) {
|
|
230
|
+
<div class="ngx-textbox-error" [attr.id]="'err-' + _id">{{ error() }}</div>
|
|
231
|
+
} @else if (hint()) {
|
|
232
|
+
<div class="ngx-textbox-hint">{{ hint() }}</div>
|
|
233
|
+
} @else {
|
|
234
|
+
<div></div>
|
|
235
|
+
}
|
|
236
|
+
@if (maxlength() > 0 && showCharCount()) {
|
|
237
|
+
<div class="ngx-textbox-charcount">{{ _displayValue().length }} / {{ maxlength() }}</div>
|
|
238
|
+
}
|
|
179
239
|
</div>
|
|
180
|
-
@if (maxlength() > 0 && showCharCount()) {
|
|
181
|
-
<div class="ngx-textbox-charcount">{{ _displayValue().length }} / {{ maxlength() }}</div>
|
|
182
|
-
}
|
|
183
|
-
@if (error()) {
|
|
184
|
-
<div class="ngx-textbox-error">{{ error() }}</div>
|
|
185
|
-
} @else if (hint()) {
|
|
186
|
-
<div class="ngx-textbox-hint">{{ hint() }}</div>
|
|
187
|
-
}
|
|
188
240
|
</div>
|
|
189
|
-
`, styles: [":host{display:block}.ngx-textbox{position:relative;font-family:inherit}.ngx-textbox-label{display:
|
|
241
|
+
`, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-textbox{position:relative;font-family:inherit}.ngx-textbox-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .ngx-textbox-label{color:var(--ngx-input-label-active);transform:translate(2px)}.ngx-textbox-wrap{position:relative;display:flex;align-items:center;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .ngx-textbox-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .ngx-textbox-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .ngx-textbox-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.ngx-textbox-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .ngx-textbox-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .ngx-textbox-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.ngx-textbox-input{flex:1;min-width:0;padding:10px 14px;border:none;outline:none;background:transparent;font-size:14px;color:var(--ngx-input-text);font-family:inherit}.ngx-textbox-input::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.ngx-textbox-input:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.ngx-textbox-footer{display:flex;justify-content:space-between;align-items:flex-start;margin-top:5px;font-size:12px}.ngx-textbox-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.ngx-textbox-hint{color:var(--ngx-input-label)}.ngx-textbox-charcount{color:var(--ngx-input-label);font-size:11px;margin-left:auto}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}.ngx-textbox-affix{display:flex;align-items:center;padding:0 10px;color:var(--ngx-input-label);font-size:14px;flex-shrink:0}.ngx-textbox-clear{background:none;border:none;cursor:pointer;color:var(--ngx-input-placeholder);font-size:12px;padding:0 8px;line-height:1;display:flex;align-items:center;flex-shrink:0;transition:color .15s}.ngx-textbox-clear:hover{color:var(--ngx-input-text)}.ngx-textbox-password-toggle{background:none;border:none;cursor:pointer;color:var(--ngx-input-placeholder);font-size:14px;padding:0 8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:color .15s}.ngx-textbox-password-toggle:hover{color:var(--ngx-input-text)}\n"] }]
|
|
190
242
|
}] });
|
|
191
243
|
|
|
192
244
|
class CheckboxComponent {
|
|
@@ -194,12 +246,21 @@ class CheckboxComponent {
|
|
|
194
246
|
checked = input(false);
|
|
195
247
|
disabled = input(false);
|
|
196
248
|
indeterminate = input(false);
|
|
249
|
+
// Enterprise validation signals
|
|
250
|
+
status = input('default');
|
|
251
|
+
error = input('');
|
|
252
|
+
hint = input('');
|
|
197
253
|
checkedChange = output();
|
|
198
254
|
_checked = signal(false);
|
|
199
255
|
_cvaActive = false;
|
|
200
256
|
_onChange = () => { };
|
|
201
257
|
_onTouched = () => { };
|
|
202
258
|
_displayChecked = computed(() => this._cvaActive ? this._checked() : this.checked());
|
|
259
|
+
_resolvedStatus = computed(() => {
|
|
260
|
+
if (this.error())
|
|
261
|
+
return 'error';
|
|
262
|
+
return this.status();
|
|
263
|
+
});
|
|
203
264
|
toggle() {
|
|
204
265
|
if (this.disabled())
|
|
205
266
|
return;
|
|
@@ -220,32 +281,51 @@ class CheckboxComponent {
|
|
|
220
281
|
registerOnTouched(fn) {
|
|
221
282
|
this._onTouched = fn;
|
|
222
283
|
}
|
|
223
|
-
setDisabledState(
|
|
224
|
-
//
|
|
284
|
+
setDisabledState(isDisabled) {
|
|
285
|
+
// Handled at form control template level
|
|
225
286
|
}
|
|
226
287
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
227
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CheckboxComponent, isStandalone: true, selector: "ngx-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, providers: [
|
|
288
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CheckboxComponent, isStandalone: true, selector: "ngx-checkbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, providers: [
|
|
228
289
|
{
|
|
229
290
|
provide: NG_VALUE_ACCESSOR,
|
|
230
291
|
useExisting: forwardRef(() => CheckboxComponent),
|
|
231
292
|
multi: true,
|
|
232
293
|
},
|
|
233
294
|
], ngImport: i0, template: `
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
295
|
+
<div class="ngx-checkbox-container" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()" [class.status-success]="_resolvedStatus() === 'success'" [class.status-warning]="_resolvedStatus() === 'warning'">
|
|
296
|
+
<div class="ngx-checkbox-row">
|
|
297
|
+
<span
|
|
298
|
+
class="ngx-checkbox-box"
|
|
299
|
+
[class.checked]="_displayChecked()"
|
|
300
|
+
[class.indeterminate]="indeterminate()"
|
|
301
|
+
(click)="toggle()"
|
|
302
|
+
(keydown.space)="$event.preventDefault(); toggle()"
|
|
303
|
+
(keydown.enter)="$event.preventDefault(); toggle()"
|
|
304
|
+
role="checkbox"
|
|
305
|
+
[attr.aria-checked]="indeterminate() ? 'mixed' : _displayChecked()"
|
|
306
|
+
[attr.aria-disabled]="disabled()"
|
|
307
|
+
[attr.tabindex]="disabled() ? null : '0'"
|
|
308
|
+
>
|
|
309
|
+
@if (_displayChecked() && !indeterminate()) {
|
|
310
|
+
<svg class="ngx-checkbox-icon" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
311
|
+
<path d="M1 5L4.5 8.5L11 1" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
312
|
+
</svg>
|
|
313
|
+
} @else if (indeterminate()) {
|
|
314
|
+
<span class="ngx-checkbox-dash"></span>
|
|
315
|
+
}
|
|
316
|
+
</span>
|
|
317
|
+
@if (label()) {
|
|
318
|
+
<span class="ngx-checkbox-label" (click)="toggle()">{{ label() }}</span>
|
|
242
319
|
}
|
|
243
|
-
</
|
|
244
|
-
|
|
245
|
-
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
@if (error()) {
|
|
323
|
+
<div class="ngx-checkbox-error">{{ error() }}</div>
|
|
324
|
+
} @else if (hint()) {
|
|
325
|
+
<div class="ngx-checkbox-hint">{{ hint() }}</div>
|
|
246
326
|
}
|
|
247
|
-
</
|
|
248
|
-
`, isInline: true, styles: [":host{display:inline-block}.ngx-checkbox
|
|
327
|
+
</div>
|
|
328
|
+
`, isInline: true, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-checkbox-border: #cbd5e1;--ngx-checkbox-bg: #ffffff;--ngx-checkbox-active: #4f46e5;--ngx-checkbox-radius: 6px;--ngx-checkbox-text: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-checkbox-border: #475569;--ngx-checkbox-bg: #0f172a;--ngx-checkbox-active: #818cf8;--ngx-checkbox-text: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-checkbox-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.ngx-checkbox-row{display:inline-flex;align-items:center;gap:10px}.ngx-checkbox-box{width:20px;height:20px;flex-shrink:0;border:2px solid var(--ngx-checkbox-border);border-radius:var(--ngx-checkbox-radius);background:var(--ngx-checkbox-bg);display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;outline:none}.disabled .ngx-checkbox-box{cursor:not-allowed;opacity:.55;background:#f1f5f9;border-color:#cbd5e1}:host-context(.dark) .disabled .ngx-checkbox-box,:host-context(.dark-theme) .disabled .ngx-checkbox-box{background:#1e293b;border-color:#334155}.ngx-checkbox-box.checked,.ngx-checkbox-box.indeterminate{background:var(--ngx-checkbox-active);border-color:var(--ngx-checkbox-active);color:#fff}.ngx-checkbox-box:hover:not(.disabled){border-color:var(--ngx-checkbox-active);transform:scale(1.05)}.ngx-checkbox-box:focus-visible{border-color:var(--ngx-checkbox-active);box-shadow:0 0 0 3px #4f46e540}.status-success .ngx-checkbox-box{border-color:var(--ngx-input-success-border)}.status-success .ngx-checkbox-box.checked{background:var(--ngx-input-success-border)}.status-success .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-success-shadow)}.status-warning .ngx-checkbox-box{border-color:var(--ngx-input-warning-border)}.status-warning .ngx-checkbox-box.checked{background:var(--ngx-input-warning-border)}.status-warning .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-warning-shadow)}.has-error .ngx-checkbox-box{border-color:var(--ngx-input-error-border)}.has-error .ngx-checkbox-box.checked{background:var(--ngx-input-error-border)}.has-error .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-error-shadow)}.ngx-checkbox-icon{width:12px;height:10px;animation:checkmark-draw .18s cubic-bezier(.12,.4,.29,1.46) forwards}.ngx-checkbox-dash{width:10px;height:2px;background:#fff;border-radius:1px;animation:dash-draw .15s ease-out forwards}.ngx-checkbox-label{font-size:14px;color:var(--ngx-checkbox-text);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease}.disabled .ngx-checkbox-label{cursor:not-allowed;opacity:.55}.ngx-checkbox-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;margin-left:30px;animation:slide-down .2s ease-out}.ngx-checkbox-hint{color:#64748b;font-size:12px;margin-left:30px}@keyframes checkmark-draw{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@keyframes dash-draw{0%{transform:scaleX(.5);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
249
329
|
}
|
|
250
330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
251
331
|
type: Component,
|
|
@@ -256,35 +336,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
256
336
|
multi: true,
|
|
257
337
|
},
|
|
258
338
|
], template: `
|
|
259
|
-
<
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
339
|
+
<div class="ngx-checkbox-container" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()" [class.status-success]="_resolvedStatus() === 'success'" [class.status-warning]="_resolvedStatus() === 'warning'">
|
|
340
|
+
<div class="ngx-checkbox-row">
|
|
341
|
+
<span
|
|
342
|
+
class="ngx-checkbox-box"
|
|
343
|
+
[class.checked]="_displayChecked()"
|
|
344
|
+
[class.indeterminate]="indeterminate()"
|
|
345
|
+
(click)="toggle()"
|
|
346
|
+
(keydown.space)="$event.preventDefault(); toggle()"
|
|
347
|
+
(keydown.enter)="$event.preventDefault(); toggle()"
|
|
348
|
+
role="checkbox"
|
|
349
|
+
[attr.aria-checked]="indeterminate() ? 'mixed' : _displayChecked()"
|
|
350
|
+
[attr.aria-disabled]="disabled()"
|
|
351
|
+
[attr.tabindex]="disabled() ? null : '0'"
|
|
352
|
+
>
|
|
353
|
+
@if (_displayChecked() && !indeterminate()) {
|
|
354
|
+
<svg class="ngx-checkbox-icon" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
355
|
+
<path d="M1 5L4.5 8.5L11 1" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
356
|
+
</svg>
|
|
357
|
+
} @else if (indeterminate()) {
|
|
358
|
+
<span class="ngx-checkbox-dash"></span>
|
|
359
|
+
}
|
|
360
|
+
</span>
|
|
361
|
+
@if (label()) {
|
|
362
|
+
<span class="ngx-checkbox-label" (click)="toggle()">{{ label() }}</span>
|
|
267
363
|
}
|
|
268
|
-
</
|
|
269
|
-
|
|
270
|
-
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
@if (error()) {
|
|
367
|
+
<div class="ngx-checkbox-error">{{ error() }}</div>
|
|
368
|
+
} @else if (hint()) {
|
|
369
|
+
<div class="ngx-checkbox-hint">{{ hint() }}</div>
|
|
271
370
|
}
|
|
272
|
-
</
|
|
273
|
-
`, styles: [":host{display:inline-block}.ngx-checkbox
|
|
371
|
+
</div>
|
|
372
|
+
`, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-checkbox-border: #cbd5e1;--ngx-checkbox-bg: #ffffff;--ngx-checkbox-active: #4f46e5;--ngx-checkbox-radius: 6px;--ngx-checkbox-text: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-checkbox-border: #475569;--ngx-checkbox-bg: #0f172a;--ngx-checkbox-active: #818cf8;--ngx-checkbox-text: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-checkbox-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.ngx-checkbox-row{display:inline-flex;align-items:center;gap:10px}.ngx-checkbox-box{width:20px;height:20px;flex-shrink:0;border:2px solid var(--ngx-checkbox-border);border-radius:var(--ngx-checkbox-radius);background:var(--ngx-checkbox-bg);display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);cursor:pointer;outline:none}.disabled .ngx-checkbox-box{cursor:not-allowed;opacity:.55;background:#f1f5f9;border-color:#cbd5e1}:host-context(.dark) .disabled .ngx-checkbox-box,:host-context(.dark-theme) .disabled .ngx-checkbox-box{background:#1e293b;border-color:#334155}.ngx-checkbox-box.checked,.ngx-checkbox-box.indeterminate{background:var(--ngx-checkbox-active);border-color:var(--ngx-checkbox-active);color:#fff}.ngx-checkbox-box:hover:not(.disabled){border-color:var(--ngx-checkbox-active);transform:scale(1.05)}.ngx-checkbox-box:focus-visible{border-color:var(--ngx-checkbox-active);box-shadow:0 0 0 3px #4f46e540}.status-success .ngx-checkbox-box{border-color:var(--ngx-input-success-border)}.status-success .ngx-checkbox-box.checked{background:var(--ngx-input-success-border)}.status-success .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-success-shadow)}.status-warning .ngx-checkbox-box{border-color:var(--ngx-input-warning-border)}.status-warning .ngx-checkbox-box.checked{background:var(--ngx-input-warning-border)}.status-warning .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-warning-shadow)}.has-error .ngx-checkbox-box{border-color:var(--ngx-input-error-border)}.has-error .ngx-checkbox-box.checked{background:var(--ngx-input-error-border)}.has-error .ngx-checkbox-box:focus-visible{box-shadow:var(--ngx-input-error-shadow)}.ngx-checkbox-icon{width:12px;height:10px;animation:checkmark-draw .18s cubic-bezier(.12,.4,.29,1.46) forwards}.ngx-checkbox-dash{width:10px;height:2px;background:#fff;border-radius:1px;animation:dash-draw .15s ease-out forwards}.ngx-checkbox-label{font-size:14px;color:var(--ngx-checkbox-text);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease}.disabled .ngx-checkbox-label{cursor:not-allowed;opacity:.55}.ngx-checkbox-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;margin-left:30px;animation:slide-down .2s ease-out}.ngx-checkbox-hint{color:#64748b;font-size:12px;margin-left:30px}@keyframes checkmark-draw{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@keyframes dash-draw{0%{transform:scaleX(.5);opacity:0}to{transform:scaleX(1);opacity:1}}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
274
373
|
}] });
|
|
275
374
|
|
|
276
375
|
class RadioGroupComponent {
|
|
376
|
+
el;
|
|
277
377
|
options = input([]);
|
|
278
378
|
label = input('');
|
|
279
379
|
value = input(null);
|
|
280
380
|
disabled = input(false);
|
|
281
381
|
inline = input(false);
|
|
382
|
+
// Enterprise validation signals
|
|
383
|
+
status = input('default');
|
|
384
|
+
error = input('');
|
|
385
|
+
hint = input('');
|
|
282
386
|
valueChange = output();
|
|
283
387
|
_value = signal(null);
|
|
284
388
|
_cvaActive = false;
|
|
285
389
|
_onChange = () => { };
|
|
286
390
|
_onTouched = () => { };
|
|
287
391
|
_activeValue = computed(() => this._cvaActive ? this._value() : this.value());
|
|
392
|
+
_resolvedStatus = computed(() => {
|
|
393
|
+
if (this.error())
|
|
394
|
+
return 'error';
|
|
395
|
+
return this.status();
|
|
396
|
+
});
|
|
397
|
+
constructor(el) {
|
|
398
|
+
this.el = el;
|
|
399
|
+
}
|
|
288
400
|
isChecked(val) {
|
|
289
401
|
return this._activeValue() === val;
|
|
290
402
|
}
|
|
@@ -296,6 +408,47 @@ class RadioGroupComponent {
|
|
|
296
408
|
this._onTouched();
|
|
297
409
|
this.valueChange.emit(opt.value);
|
|
298
410
|
}
|
|
411
|
+
getTabindex(opt, idx) {
|
|
412
|
+
if (this.disabled() || opt.disabled)
|
|
413
|
+
return '-1';
|
|
414
|
+
const activeVal = this._activeValue();
|
|
415
|
+
const opts = this.options();
|
|
416
|
+
if (activeVal !== null && activeVal !== undefined) {
|
|
417
|
+
return this.isChecked(opt.value) ? '0' : '-1';
|
|
418
|
+
}
|
|
419
|
+
const firstEnabledIdx = opts.findIndex(o => !o.disabled);
|
|
420
|
+
return idx === firstEnabledIdx ? '0' : '-1';
|
|
421
|
+
}
|
|
422
|
+
onOptionKeyDown(event, opt, idx) {
|
|
423
|
+
if (this.disabled())
|
|
424
|
+
return;
|
|
425
|
+
let nextIdx = idx;
|
|
426
|
+
const opts = this.options();
|
|
427
|
+
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {
|
|
428
|
+
event.preventDefault();
|
|
429
|
+
do {
|
|
430
|
+
nextIdx = (nextIdx + 1) % opts.length;
|
|
431
|
+
} while (opts[nextIdx].disabled && nextIdx !== idx);
|
|
432
|
+
this.select(opts[nextIdx]);
|
|
433
|
+
this.focusOption(nextIdx);
|
|
434
|
+
}
|
|
435
|
+
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {
|
|
436
|
+
event.preventDefault();
|
|
437
|
+
do {
|
|
438
|
+
nextIdx = (nextIdx - 1 + opts.length) % opts.length;
|
|
439
|
+
} while (opts[nextIdx].disabled && nextIdx !== idx);
|
|
440
|
+
this.select(opts[nextIdx]);
|
|
441
|
+
this.focusOption(nextIdx);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
focusOption(idx) {
|
|
445
|
+
setTimeout(() => {
|
|
446
|
+
const radioBtns = this.el.nativeElement.querySelectorAll('.ngx-radio-btn');
|
|
447
|
+
if (radioBtns[idx]) {
|
|
448
|
+
radioBtns[idx].focus();
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}
|
|
299
452
|
// ControlValueAccessor
|
|
300
453
|
writeValue(val) {
|
|
301
454
|
this._cvaActive = true;
|
|
@@ -307,11 +460,11 @@ class RadioGroupComponent {
|
|
|
307
460
|
registerOnTouched(fn) {
|
|
308
461
|
this._onTouched = fn;
|
|
309
462
|
}
|
|
310
|
-
setDisabledState(
|
|
311
|
-
//
|
|
463
|
+
setDisabledState(isDisabled) {
|
|
464
|
+
// Handled at form control template level
|
|
312
465
|
}
|
|
313
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RadioGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
314
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: RadioGroupComponent, isStandalone: true, selector: "ngx-radio-group", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RadioGroupComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: RadioGroupComponent, isStandalone: true, selector: "ngx-radio-group", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
315
468
|
{
|
|
316
469
|
provide: NG_VALUE_ACCESSOR,
|
|
317
470
|
useExisting: forwardRef(() => RadioGroupComponent),
|
|
@@ -319,37 +472,51 @@ class RadioGroupComponent {
|
|
|
319
472
|
},
|
|
320
473
|
], ngImport: i0, template: `
|
|
321
474
|
<div
|
|
322
|
-
class="ngx-radio-group"
|
|
323
|
-
[class.
|
|
324
|
-
|
|
325
|
-
[
|
|
475
|
+
class="ngx-radio-group-container"
|
|
476
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
477
|
+
[class.disabled]="disabled()"
|
|
478
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
479
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
326
480
|
>
|
|
327
481
|
@if (label()) {
|
|
328
482
|
<span class="ngx-radio-group-label">{{ label() }}</span>
|
|
329
483
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
484
|
+
<div
|
|
485
|
+
class="ngx-radio-group-options"
|
|
486
|
+
[class.inline]="inline()"
|
|
487
|
+
role="radiogroup"
|
|
488
|
+
[attr.aria-label]="label()"
|
|
489
|
+
>
|
|
490
|
+
@for (opt of options(); track opt.value; let idx = $index) {
|
|
491
|
+
<label
|
|
492
|
+
class="ngx-radio"
|
|
493
|
+
[class.disabled]="disabled() || !!opt.disabled"
|
|
338
494
|
[class.checked]="isChecked(opt.value)"
|
|
339
|
-
(click)="select(opt)"
|
|
340
|
-
role="radio"
|
|
341
|
-
[attr.aria-checked]="isChecked(opt.value)"
|
|
342
|
-
tabindex="0"
|
|
343
|
-
(keydown.enter)="select(opt)"
|
|
344
|
-
(keydown.space)="select(opt)"
|
|
345
495
|
>
|
|
346
|
-
<span
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
496
|
+
<span
|
|
497
|
+
class="ngx-radio-btn"
|
|
498
|
+
[class.checked]="isChecked(opt.value)"
|
|
499
|
+
(click)="select(opt)"
|
|
500
|
+
role="radio"
|
|
501
|
+
[attr.aria-checked]="isChecked(opt.value)"
|
|
502
|
+
[attr.aria-disabled]="disabled() || opt.disabled"
|
|
503
|
+
[attr.tabindex]="getTabindex(opt, idx)"
|
|
504
|
+
(keydown)="onOptionKeyDown($event, opt, idx)"
|
|
505
|
+
>
|
|
506
|
+
<span class="ngx-radio-dot" [class.visible]="isChecked(opt.value)"></span>
|
|
507
|
+
</span>
|
|
508
|
+
<span class="ngx-radio-label" (click)="select(opt)">{{ opt.label }}</span>
|
|
509
|
+
</label>
|
|
510
|
+
}
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
@if (error()) {
|
|
514
|
+
<div class="ngx-radio-error">{{ error() }}</div>
|
|
515
|
+
} @else if (hint()) {
|
|
516
|
+
<div class="ngx-radio-hint">{{ hint() }}</div>
|
|
350
517
|
}
|
|
351
518
|
</div>
|
|
352
|
-
`, isInline: true, styles: [":host{display:block}.ngx-radio-
|
|
519
|
+
`, isInline: true, styles: [":host{display:block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-radio-border: #cbd5e1;--ngx-radio-bg: #ffffff;--ngx-radio-active: #4f46e5;--ngx-radio-text: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-radio-border: #475569;--ngx-radio-bg: #0f172a;--ngx-radio-active: #818cf8;--ngx-radio-text: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-radio-group-container{display:flex;flex-direction:column;gap:6px;font-family:inherit}.ngx-radio-group-label{display:block;font-size:13px;color:var(--ngx-radio-border);font-weight:600;margin-bottom:4px}.ngx-radio-group-options{display:flex;flex-direction:column;gap:10px}.ngx-radio-group-options.inline{flex-direction:row;flex-wrap:wrap;gap:20px}.ngx-radio{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.ngx-radio.disabled{cursor:not-allowed;opacity:.55}.ngx-radio-btn{width:20px;height:20px;flex-shrink:0;border:2px solid var(--ngx-radio-border);border-radius:50%;background:var(--ngx-radio-bg);display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.ngx-radio-btn.checked{border-color:var(--ngx-radio-active)}.ngx-radio-btn:hover:not(.disabled){border-color:var(--ngx-radio-active);transform:scale(1.05)}.ngx-radio-btn:focus-visible{border-color:var(--ngx-radio-active);box-shadow:0 0 0 3px #4f46e540}.status-success .ngx-radio-btn,.status-success .ngx-radio-btn.checked{border-color:var(--ngx-input-success-border)}.status-success .ngx-radio-dot{background:var(--ngx-input-success-border)}.status-success .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-success-shadow)}.status-warning .ngx-radio-btn,.status-warning .ngx-radio-btn.checked{border-color:var(--ngx-input-warning-border)}.status-warning .ngx-radio-dot{background:var(--ngx-input-warning-border)}.status-warning .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-warning-shadow)}.has-error .ngx-radio-btn,.has-error .ngx-radio-btn.checked{border-color:var(--ngx-input-error-border)}.has-error .ngx-radio-dot{background:var(--ngx-input-error-border)}.has-error .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-error-shadow)}.ngx-radio-dot{width:10px;height:10px;border-radius:50%;background:var(--ngx-radio-active);opacity:0;transform:scale(.4);transition:opacity .2s cubic-bezier(.175,.885,.32,1.275),transform .2s cubic-bezier(.175,.885,.32,1.275)}.ngx-radio-dot.visible{opacity:1;transform:scale(1)}.ngx-radio-label{font-size:14px;color:var(--ngx-radio-text);transition:color .15s ease}.disabled .ngx-radio-label{cursor:not-allowed;opacity:.55}.ngx-radio-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;animation:slide-down .2s ease-out}.ngx-radio-hint{color:#64748b;font-size:12px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
353
520
|
}
|
|
354
521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RadioGroupComponent, decorators: [{
|
|
355
522
|
type: Component,
|
|
@@ -361,38 +528,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
361
528
|
},
|
|
362
529
|
], template: `
|
|
363
530
|
<div
|
|
364
|
-
class="ngx-radio-group"
|
|
365
|
-
[class.
|
|
366
|
-
|
|
367
|
-
[
|
|
531
|
+
class="ngx-radio-group-container"
|
|
532
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
533
|
+
[class.disabled]="disabled()"
|
|
534
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
535
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
368
536
|
>
|
|
369
537
|
@if (label()) {
|
|
370
538
|
<span class="ngx-radio-group-label">{{ label() }}</span>
|
|
371
539
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
540
|
+
<div
|
|
541
|
+
class="ngx-radio-group-options"
|
|
542
|
+
[class.inline]="inline()"
|
|
543
|
+
role="radiogroup"
|
|
544
|
+
[attr.aria-label]="label()"
|
|
545
|
+
>
|
|
546
|
+
@for (opt of options(); track opt.value; let idx = $index) {
|
|
547
|
+
<label
|
|
548
|
+
class="ngx-radio"
|
|
549
|
+
[class.disabled]="disabled() || !!opt.disabled"
|
|
380
550
|
[class.checked]="isChecked(opt.value)"
|
|
381
|
-
(click)="select(opt)"
|
|
382
|
-
role="radio"
|
|
383
|
-
[attr.aria-checked]="isChecked(opt.value)"
|
|
384
|
-
tabindex="0"
|
|
385
|
-
(keydown.enter)="select(opt)"
|
|
386
|
-
(keydown.space)="select(opt)"
|
|
387
551
|
>
|
|
388
|
-
<span
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
552
|
+
<span
|
|
553
|
+
class="ngx-radio-btn"
|
|
554
|
+
[class.checked]="isChecked(opt.value)"
|
|
555
|
+
(click)="select(opt)"
|
|
556
|
+
role="radio"
|
|
557
|
+
[attr.aria-checked]="isChecked(opt.value)"
|
|
558
|
+
[attr.aria-disabled]="disabled() || opt.disabled"
|
|
559
|
+
[attr.tabindex]="getTabindex(opt, idx)"
|
|
560
|
+
(keydown)="onOptionKeyDown($event, opt, idx)"
|
|
561
|
+
>
|
|
562
|
+
<span class="ngx-radio-dot" [class.visible]="isChecked(opt.value)"></span>
|
|
563
|
+
</span>
|
|
564
|
+
<span class="ngx-radio-label" (click)="select(opt)">{{ opt.label }}</span>
|
|
565
|
+
</label>
|
|
566
|
+
}
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
@if (error()) {
|
|
570
|
+
<div class="ngx-radio-error">{{ error() }}</div>
|
|
571
|
+
} @else if (hint()) {
|
|
572
|
+
<div class="ngx-radio-hint">{{ hint() }}</div>
|
|
392
573
|
}
|
|
393
574
|
</div>
|
|
394
|
-
`, styles: [":host{display:block}.ngx-radio-
|
|
395
|
-
}] });
|
|
575
|
+
`, styles: [":host{display:block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-radio-border: #cbd5e1;--ngx-radio-bg: #ffffff;--ngx-radio-active: #4f46e5;--ngx-radio-text: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-radio-border: #475569;--ngx-radio-bg: #0f172a;--ngx-radio-active: #818cf8;--ngx-radio-text: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-radio-group-container{display:flex;flex-direction:column;gap:6px;font-family:inherit}.ngx-radio-group-label{display:block;font-size:13px;color:var(--ngx-radio-border);font-weight:600;margin-bottom:4px}.ngx-radio-group-options{display:flex;flex-direction:column;gap:10px}.ngx-radio-group-options.inline{flex-direction:row;flex-wrap:wrap;gap:20px}.ngx-radio{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.ngx-radio.disabled{cursor:not-allowed;opacity:.55}.ngx-radio-btn{width:20px;height:20px;flex-shrink:0;border:2px solid var(--ngx-radio-border);border-radius:50%;background:var(--ngx-radio-bg);display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.ngx-radio-btn.checked{border-color:var(--ngx-radio-active)}.ngx-radio-btn:hover:not(.disabled){border-color:var(--ngx-radio-active);transform:scale(1.05)}.ngx-radio-btn:focus-visible{border-color:var(--ngx-radio-active);box-shadow:0 0 0 3px #4f46e540}.status-success .ngx-radio-btn,.status-success .ngx-radio-btn.checked{border-color:var(--ngx-input-success-border)}.status-success .ngx-radio-dot{background:var(--ngx-input-success-border)}.status-success .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-success-shadow)}.status-warning .ngx-radio-btn,.status-warning .ngx-radio-btn.checked{border-color:var(--ngx-input-warning-border)}.status-warning .ngx-radio-dot{background:var(--ngx-input-warning-border)}.status-warning .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-warning-shadow)}.has-error .ngx-radio-btn,.has-error .ngx-radio-btn.checked{border-color:var(--ngx-input-error-border)}.has-error .ngx-radio-dot{background:var(--ngx-input-error-border)}.has-error .ngx-radio-btn:focus-visible{box-shadow:var(--ngx-input-error-shadow)}.ngx-radio-dot{width:10px;height:10px;border-radius:50%;background:var(--ngx-radio-active);opacity:0;transform:scale(.4);transition:opacity .2s cubic-bezier(.175,.885,.32,1.275),transform .2s cubic-bezier(.175,.885,.32,1.275)}.ngx-radio-dot.visible{opacity:1;transform:scale(1)}.ngx-radio-label{font-size:14px;color:var(--ngx-radio-text);transition:color .15s ease}.disabled .ngx-radio-label{cursor:not-allowed;opacity:.55}.ngx-radio-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;animation:slide-down .2s ease-out}.ngx-radio-hint{color:#64748b;font-size:12px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
576
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
396
577
|
|
|
397
578
|
class DropdownComponent {
|
|
398
579
|
options = input([]);
|
|
@@ -412,6 +593,7 @@ class DropdownComponent {
|
|
|
412
593
|
_cvaActive = false;
|
|
413
594
|
_onChange = () => { };
|
|
414
595
|
_onTouched = () => { };
|
|
596
|
+
uid = 'ngx-dd-' + Math.random().toString(36).substring(2, 9);
|
|
415
597
|
el = inject(ElementRef);
|
|
416
598
|
_activeValue = computed(() => this._cvaActive ? this._cvaValue() : this.value());
|
|
417
599
|
selectedLabel = computed(() => {
|
|
@@ -431,6 +613,13 @@ class DropdownComponent {
|
|
|
431
613
|
const opts = this.filteredOptions();
|
|
432
614
|
const selectedIndex = opts.findIndex(o => o.value === this._activeValue());
|
|
433
615
|
this.focusedIndex.set(selectedIndex >= 0 ? selectedIndex : (opts.length > 0 ? 0 : -1));
|
|
616
|
+
// Auto-focus search input if filterable
|
|
617
|
+
if (this.filterable()) {
|
|
618
|
+
setTimeout(() => {
|
|
619
|
+
const inputEl = this.el.nativeElement.querySelector('.popup-search-input');
|
|
620
|
+
inputEl?.focus();
|
|
621
|
+
}, 50);
|
|
622
|
+
}
|
|
434
623
|
}
|
|
435
624
|
else {
|
|
436
625
|
this.filterText.set('');
|
|
@@ -448,14 +637,21 @@ class DropdownComponent {
|
|
|
448
637
|
this.valueChange.emit(opt.value);
|
|
449
638
|
this.isOpen.set(false);
|
|
450
639
|
this.filterText.set('');
|
|
640
|
+
// Return focus to trigger
|
|
641
|
+
setTimeout(() => {
|
|
642
|
+
const triggerEl = this.el.nativeElement.querySelector('.ngx-dropdown-trigger');
|
|
643
|
+
triggerEl?.focus();
|
|
644
|
+
}, 0);
|
|
451
645
|
}
|
|
452
646
|
onTriggerKey(e) {
|
|
453
647
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
454
648
|
e.preventDefault();
|
|
455
649
|
this.toggle();
|
|
456
650
|
}
|
|
457
|
-
if (e.key === 'Escape')
|
|
651
|
+
if (e.key === 'Escape') {
|
|
458
652
|
this.isOpen.set(false);
|
|
653
|
+
this._onTouched();
|
|
654
|
+
}
|
|
459
655
|
if (e.key === 'ArrowDown') {
|
|
460
656
|
e.preventDefault();
|
|
461
657
|
if (!this.isOpen())
|
|
@@ -483,16 +679,39 @@ class DropdownComponent {
|
|
|
483
679
|
if (i >= 0 && i < opts.length)
|
|
484
680
|
this.selectOption(opts[i]);
|
|
485
681
|
}
|
|
486
|
-
if (e.key === 'Escape')
|
|
682
|
+
if (e.key === 'Escape') {
|
|
487
683
|
this.isOpen.set(false);
|
|
684
|
+
this.filterText.set('');
|
|
685
|
+
this.focusedIndex.set(-1);
|
|
686
|
+
this._onTouched();
|
|
687
|
+
// Return focus to trigger
|
|
688
|
+
setTimeout(() => {
|
|
689
|
+
const triggerEl = this.el.nativeElement.querySelector('.ngx-dropdown-trigger');
|
|
690
|
+
triggerEl?.focus();
|
|
691
|
+
}, 0);
|
|
692
|
+
}
|
|
488
693
|
}
|
|
489
694
|
moveFocus(delta) {
|
|
490
|
-
const
|
|
695
|
+
const opts = this.filteredOptions();
|
|
696
|
+
const n = opts.length;
|
|
491
697
|
if (n <= 0) {
|
|
492
698
|
this.focusedIndex.set(-1);
|
|
493
699
|
return;
|
|
494
700
|
}
|
|
495
|
-
|
|
701
|
+
let idx = this.focusedIndex();
|
|
702
|
+
const start = idx;
|
|
703
|
+
do {
|
|
704
|
+
idx += delta;
|
|
705
|
+
if (idx < 0)
|
|
706
|
+
idx = n - 1;
|
|
707
|
+
if (idx >= n)
|
|
708
|
+
idx = 0;
|
|
709
|
+
if (idx === start)
|
|
710
|
+
break;
|
|
711
|
+
} while (opts[idx].disabled);
|
|
712
|
+
if (!opts[idx].disabled) {
|
|
713
|
+
this.focusedIndex.set(idx);
|
|
714
|
+
}
|
|
496
715
|
}
|
|
497
716
|
onDocClick(e) {
|
|
498
717
|
if (!this.el.nativeElement.contains(e.target)) {
|
|
@@ -531,11 +750,9 @@ class DropdownComponent {
|
|
|
531
750
|
[class.open]="isOpen()"
|
|
532
751
|
[class.disabled]="disabled()"
|
|
533
752
|
[class.has-error]="!!error()"
|
|
534
|
-
[attr.aria-expanded]="isOpen()"
|
|
535
|
-
role="combobox"
|
|
536
753
|
>
|
|
537
754
|
@if (label()) {
|
|
538
|
-
<label class="ngx-dropdown-label">
|
|
755
|
+
<label [id]="uid + '-label'" class="ngx-dropdown-label">
|
|
539
756
|
{{ label() }}
|
|
540
757
|
@if (required()) { <span class="ngx-dropdown-required" aria-hidden="true">*</span> }
|
|
541
758
|
</label>
|
|
@@ -544,10 +761,18 @@ class DropdownComponent {
|
|
|
544
761
|
<!-- Trigger -->
|
|
545
762
|
<div
|
|
546
763
|
class="ngx-dropdown-trigger"
|
|
764
|
+
[id]="uid + '-trigger'"
|
|
765
|
+
role="combobox"
|
|
766
|
+
[attr.aria-expanded]="isOpen()"
|
|
767
|
+
[attr.aria-haspopup]="'listbox'"
|
|
768
|
+
[attr.aria-controls]="isOpen() ? uid + '-popup' : null"
|
|
769
|
+
[attr.aria-activedescendant]="isOpen() && focusedIndex() >= 0 ? uid + '-opt-' + focusedIndex() : null"
|
|
770
|
+
[attr.aria-autocomplete]="filterable() ? 'list' : 'none'"
|
|
771
|
+
[attr.aria-labelledby]="label() ? uid + '-label' : null"
|
|
547
772
|
[attr.tabindex]="disabled() ? -1 : 0"
|
|
548
773
|
(click)="toggle()"
|
|
549
774
|
(keydown)="onTriggerKey($event)"
|
|
550
|
-
[attr.aria-label]="selectedLabel() || placeholder()"
|
|
775
|
+
[attr.aria-label]="!label() ? (selectedLabel() || placeholder()) : null"
|
|
551
776
|
[attr.aria-disabled]="disabled()"
|
|
552
777
|
>
|
|
553
778
|
<span class="trigger-text" [class.placeholder]="!selectedLabel()">
|
|
@@ -558,7 +783,12 @@ class DropdownComponent {
|
|
|
558
783
|
|
|
559
784
|
<!-- Popup -->
|
|
560
785
|
@if (isOpen()) {
|
|
561
|
-
<div
|
|
786
|
+
<div
|
|
787
|
+
class="ngx-dropdown-popup"
|
|
788
|
+
[id]="uid + '-popup'"
|
|
789
|
+
role="listbox"
|
|
790
|
+
[attr.aria-labelledby]="label() ? uid + '-label' : null"
|
|
791
|
+
>
|
|
562
792
|
@if (filterable()) {
|
|
563
793
|
<div class="popup-search">
|
|
564
794
|
<input
|
|
@@ -568,6 +798,8 @@ class DropdownComponent {
|
|
|
568
798
|
[value]="filterText()"
|
|
569
799
|
(input)="filterText.set($any($event.target).value)"
|
|
570
800
|
(keydown)="onFilterKey($event)"
|
|
801
|
+
role="searchbox"
|
|
802
|
+
aria-label="Search options"
|
|
571
803
|
/>
|
|
572
804
|
</div>
|
|
573
805
|
}
|
|
@@ -575,28 +807,30 @@ class DropdownComponent {
|
|
|
575
807
|
@for (opt of filteredOptions(); track opt.value; let i = $index) {
|
|
576
808
|
<div
|
|
577
809
|
class="popup-item"
|
|
810
|
+
[id]="uid + '-opt-' + i"
|
|
578
811
|
[class.selected]="isSelected(opt)"
|
|
579
812
|
[class.focused]="focusedIndex() === i"
|
|
580
813
|
[class.disabled]="opt.disabled"
|
|
581
814
|
role="option"
|
|
582
815
|
[attr.aria-selected]="isSelected(opt)"
|
|
816
|
+
[attr.aria-disabled]="opt.disabled"
|
|
583
817
|
(click)="selectOption(opt)"
|
|
584
818
|
(mouseenter)="focusedIndex.set(i)"
|
|
585
819
|
>{{ opt.label }}</div>
|
|
586
820
|
}
|
|
587
821
|
@if (filteredOptions().length === 0) {
|
|
588
|
-
<div class="popup-empty">No results</div>
|
|
822
|
+
<div class="popup-empty" role="status">No results</div>
|
|
589
823
|
}
|
|
590
824
|
</div>
|
|
591
825
|
</div>
|
|
592
826
|
}
|
|
593
827
|
@if (error()) {
|
|
594
|
-
<div class="ngx-dropdown-error">{{ error() }}</div>
|
|
828
|
+
<div [id]="uid + '-error'" class="ngx-dropdown-error" role="alert">{{ error() }}</div>
|
|
595
829
|
} @else if (hint()) {
|
|
596
|
-
<div class="ngx-dropdown-hint">{{ hint() }}</div>
|
|
830
|
+
<div [id]="uid + '-hint'" class="ngx-dropdown-hint">{{ hint() }}</div>
|
|
597
831
|
}
|
|
598
832
|
</div>
|
|
599
|
-
`, isInline: true, styles: [":host{display:block}.ngx-dropdown{position:relative;font-family:inherit}.ngx-dropdown-label{display:block;font-size:13px;color:var(--ngx-input-label, #6c757d);margin-bottom:4px;font-weight:500}.ngx-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg, #fff);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;transition:all .2s cubic-bezier(.4,0,.2,1)}.ngx-dropdown-trigger:hover{border-color:var(--ngx-input-focus, #4f46e5)}.open .ngx-dropdown-trigger{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.disabled .ngx-dropdown-trigger{background:var(--ngx-input-disabled-bg, #f8f9fa);cursor:not-allowed;color:#adb5bd;opacity:.7}.trigger-text{flex:1;color:var(--ngx-input-text, #212529)}.trigger-text.placeholder{color:#adb5bd}.trigger-arrow{font-size:10px;color:#6c757d;transition:transform .15s}.trigger-arrow.open{transform:rotate(180deg)}.ngx-dropdown-popup{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1));overflow:hidden;transform-origin:top;animation:popup-slide .18s cubic-bezier(.4,0,.2,1)}@keyframes popup-slide{0%{opacity:0;transform:translateY(-4px) scaleY(.95)}to{opacity:1;transform:translateY(0) scaleY(1)}}.popup-search{padding:8px;border-bottom:1px solid var(--ngx-input-border, #ced4da)}.popup-search-input{width:100%;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--radius-sm, 6px);font-size:13px;outline:none;font-family:inherit;background:var(--bg-primary);color:var(--text-primary);transition:all .15s ease}.popup-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);background:var(--bg-secondary)}.popup-list{max-height:240px;overflow-y:auto}.popup-item{padding:8px 12px;font-size:14px;cursor:pointer;color:var(--ngx-input-text, #212529);transition:all .12s}.popup-item:hover,.popup-item.focused{background:var(--ngx-grid-hover-bg, #f1f3f5);color:var(--ngx-input-focus, #4f46e5)}.popup-item.selected{background:var(--ngx-grid-selected-bg, #e8f0fe);color:var(--ngx-input-focus, #4f46e5);font-weight:600}.popup-item.disabled{color:#adb5bd;cursor:not-allowed}.popup-item.disabled:hover{background:none}.popup-empty{padding:12px;text-align:center;color:#adb5bd;font-size:13px}.has-error .ngx-dropdown-trigger{border-color:var(--ngx-input-error, #e74c3c)}.has-error.focused .ngx-dropdown-trigger,.has-error.open .ngx-dropdown-trigger{box-shadow:0 0 0 2px #e74c3c2e}.ngx-dropdown-error{font-size:12px;color:var(--ngx-input-error, #e74c3c);margin-top:4px}.ngx-dropdown-hint{font-size:12px;color:var(--ngx-input-label, #6c757d);margin-top:4px}.ngx-dropdown-required{color:var(--ngx-input-error, #e74c3c);margin-left:2px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
833
|
+
`, isInline: true, styles: [":host{display:block}.ngx-dropdown{position:relative;font-family:inherit}.ngx-dropdown-label{display:block;font-size:13px;color:var(--ngx-input-label, #6c757d);margin-bottom:4px;font-weight:500}.ngx-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg, #fff);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.ngx-dropdown-trigger:hover{border-color:var(--ngx-input-focus, #4f46e5)}.ngx-dropdown-trigger:focus-visible{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));outline:none}.open .ngx-dropdown-trigger{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.disabled .ngx-dropdown-trigger{background:var(--ngx-input-disabled-bg, #f8f9fa);cursor:not-allowed;color:#adb5bd;opacity:.7}.trigger-text{flex:1;color:var(--ngx-input-text, #212529)}.trigger-text.placeholder{color:#adb5bd}.trigger-arrow{font-size:10px;color:#6c757d;transition:transform .15s}.trigger-arrow.open{transform:rotate(180deg)}.ngx-dropdown-popup{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1));overflow:hidden;transform-origin:top;animation:popup-slide .18s cubic-bezier(.4,0,.2,1)}@keyframes popup-slide{0%{opacity:0;transform:translateY(-4px) scaleY(.95)}to{opacity:1;transform:translateY(0) scaleY(1)}}.popup-search{padding:8px;border-bottom:1px solid var(--ngx-input-border, #ced4da)}.popup-search-input{width:100%;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--radius-sm, 6px);font-size:13px;outline:none;font-family:inherit;background:var(--bg-primary);color:var(--text-primary);transition:all .15s ease}.popup-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);background:var(--bg-secondary)}.popup-list{max-height:240px;overflow-y:auto}.popup-item{padding:8px 12px;font-size:14px;cursor:pointer;color:var(--ngx-input-text, #212529);transition:all .12s}.popup-item:hover,.popup-item.focused{background:var(--ngx-grid-hover-bg, #f1f3f5);color:var(--ngx-input-focus, #4f46e5)}.popup-item.selected{background:var(--ngx-grid-selected-bg, #e8f0fe);color:var(--ngx-input-focus, #4f46e5);font-weight:600}.popup-item.disabled{color:#adb5bd;cursor:not-allowed}.popup-item.disabled:hover{background:none}.popup-empty{padding:12px;text-align:center;color:#adb5bd;font-size:13px}.has-error .ngx-dropdown-trigger{border-color:var(--ngx-input-error, #e74c3c)}.has-error.focused .ngx-dropdown-trigger,.has-error.open .ngx-dropdown-trigger{box-shadow:0 0 0 2px #e74c3c2e}.ngx-dropdown-error{font-size:12px;color:var(--ngx-input-error, #e74c3c);margin-top:4px}.ngx-dropdown-hint{font-size:12px;color:var(--ngx-input-label, #6c757d);margin-top:4px}.ngx-dropdown-required{color:var(--ngx-input-error, #e74c3c);margin-left:2px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
600
834
|
}
|
|
601
835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
602
836
|
type: Component,
|
|
@@ -612,11 +846,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
612
846
|
[class.open]="isOpen()"
|
|
613
847
|
[class.disabled]="disabled()"
|
|
614
848
|
[class.has-error]="!!error()"
|
|
615
|
-
[attr.aria-expanded]="isOpen()"
|
|
616
|
-
role="combobox"
|
|
617
849
|
>
|
|
618
850
|
@if (label()) {
|
|
619
|
-
<label class="ngx-dropdown-label">
|
|
851
|
+
<label [id]="uid + '-label'" class="ngx-dropdown-label">
|
|
620
852
|
{{ label() }}
|
|
621
853
|
@if (required()) { <span class="ngx-dropdown-required" aria-hidden="true">*</span> }
|
|
622
854
|
</label>
|
|
@@ -625,10 +857,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
625
857
|
<!-- Trigger -->
|
|
626
858
|
<div
|
|
627
859
|
class="ngx-dropdown-trigger"
|
|
860
|
+
[id]="uid + '-trigger'"
|
|
861
|
+
role="combobox"
|
|
862
|
+
[attr.aria-expanded]="isOpen()"
|
|
863
|
+
[attr.aria-haspopup]="'listbox'"
|
|
864
|
+
[attr.aria-controls]="isOpen() ? uid + '-popup' : null"
|
|
865
|
+
[attr.aria-activedescendant]="isOpen() && focusedIndex() >= 0 ? uid + '-opt-' + focusedIndex() : null"
|
|
866
|
+
[attr.aria-autocomplete]="filterable() ? 'list' : 'none'"
|
|
867
|
+
[attr.aria-labelledby]="label() ? uid + '-label' : null"
|
|
628
868
|
[attr.tabindex]="disabled() ? -1 : 0"
|
|
629
869
|
(click)="toggle()"
|
|
630
870
|
(keydown)="onTriggerKey($event)"
|
|
631
|
-
[attr.aria-label]="selectedLabel() || placeholder()"
|
|
871
|
+
[attr.aria-label]="!label() ? (selectedLabel() || placeholder()) : null"
|
|
632
872
|
[attr.aria-disabled]="disabled()"
|
|
633
873
|
>
|
|
634
874
|
<span class="trigger-text" [class.placeholder]="!selectedLabel()">
|
|
@@ -639,7 +879,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
639
879
|
|
|
640
880
|
<!-- Popup -->
|
|
641
881
|
@if (isOpen()) {
|
|
642
|
-
<div
|
|
882
|
+
<div
|
|
883
|
+
class="ngx-dropdown-popup"
|
|
884
|
+
[id]="uid + '-popup'"
|
|
885
|
+
role="listbox"
|
|
886
|
+
[attr.aria-labelledby]="label() ? uid + '-label' : null"
|
|
887
|
+
>
|
|
643
888
|
@if (filterable()) {
|
|
644
889
|
<div class="popup-search">
|
|
645
890
|
<input
|
|
@@ -649,6 +894,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
649
894
|
[value]="filterText()"
|
|
650
895
|
(input)="filterText.set($any($event.target).value)"
|
|
651
896
|
(keydown)="onFilterKey($event)"
|
|
897
|
+
role="searchbox"
|
|
898
|
+
aria-label="Search options"
|
|
652
899
|
/>
|
|
653
900
|
</div>
|
|
654
901
|
}
|
|
@@ -656,28 +903,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
656
903
|
@for (opt of filteredOptions(); track opt.value; let i = $index) {
|
|
657
904
|
<div
|
|
658
905
|
class="popup-item"
|
|
906
|
+
[id]="uid + '-opt-' + i"
|
|
659
907
|
[class.selected]="isSelected(opt)"
|
|
660
908
|
[class.focused]="focusedIndex() === i"
|
|
661
909
|
[class.disabled]="opt.disabled"
|
|
662
910
|
role="option"
|
|
663
911
|
[attr.aria-selected]="isSelected(opt)"
|
|
912
|
+
[attr.aria-disabled]="opt.disabled"
|
|
664
913
|
(click)="selectOption(opt)"
|
|
665
914
|
(mouseenter)="focusedIndex.set(i)"
|
|
666
915
|
>{{ opt.label }}</div>
|
|
667
916
|
}
|
|
668
917
|
@if (filteredOptions().length === 0) {
|
|
669
|
-
<div class="popup-empty">No results</div>
|
|
918
|
+
<div class="popup-empty" role="status">No results</div>
|
|
670
919
|
}
|
|
671
920
|
</div>
|
|
672
921
|
</div>
|
|
673
922
|
}
|
|
674
923
|
@if (error()) {
|
|
675
|
-
<div class="ngx-dropdown-error">{{ error() }}</div>
|
|
924
|
+
<div [id]="uid + '-error'" class="ngx-dropdown-error" role="alert">{{ error() }}</div>
|
|
676
925
|
} @else if (hint()) {
|
|
677
|
-
<div class="ngx-dropdown-hint">{{ hint() }}</div>
|
|
926
|
+
<div [id]="uid + '-hint'" class="ngx-dropdown-hint">{{ hint() }}</div>
|
|
678
927
|
}
|
|
679
928
|
</div>
|
|
680
|
-
`, styles: [":host{display:block}.ngx-dropdown{position:relative;font-family:inherit}.ngx-dropdown-label{display:block;font-size:13px;color:var(--ngx-input-label, #6c757d);margin-bottom:4px;font-weight:500}.ngx-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg, #fff);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;transition:all .2s cubic-bezier(.4,0,.2,1)}.ngx-dropdown-trigger:hover{border-color:var(--ngx-input-focus, #4f46e5)}.open .ngx-dropdown-trigger{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.disabled .ngx-dropdown-trigger{background:var(--ngx-input-disabled-bg, #f8f9fa);cursor:not-allowed;color:#adb5bd;opacity:.7}.trigger-text{flex:1;color:var(--ngx-input-text, #212529)}.trigger-text.placeholder{color:#adb5bd}.trigger-arrow{font-size:10px;color:#6c757d;transition:transform .15s}.trigger-arrow.open{transform:rotate(180deg)}.ngx-dropdown-popup{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1));overflow:hidden;transform-origin:top;animation:popup-slide .18s cubic-bezier(.4,0,.2,1)}@keyframes popup-slide{0%{opacity:0;transform:translateY(-4px) scaleY(.95)}to{opacity:1;transform:translateY(0) scaleY(1)}}.popup-search{padding:8px;border-bottom:1px solid var(--ngx-input-border, #ced4da)}.popup-search-input{width:100%;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--radius-sm, 6px);font-size:13px;outline:none;font-family:inherit;background:var(--bg-primary);color:var(--text-primary);transition:all .15s ease}.popup-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);background:var(--bg-secondary)}.popup-list{max-height:240px;overflow-y:auto}.popup-item{padding:8px 12px;font-size:14px;cursor:pointer;color:var(--ngx-input-text, #212529);transition:all .12s}.popup-item:hover,.popup-item.focused{background:var(--ngx-grid-hover-bg, #f1f3f5);color:var(--ngx-input-focus, #4f46e5)}.popup-item.selected{background:var(--ngx-grid-selected-bg, #e8f0fe);color:var(--ngx-input-focus, #4f46e5);font-weight:600}.popup-item.disabled{color:#adb5bd;cursor:not-allowed}.popup-item.disabled:hover{background:none}.popup-empty{padding:12px;text-align:center;color:#adb5bd;font-size:13px}.has-error .ngx-dropdown-trigger{border-color:var(--ngx-input-error, #e74c3c)}.has-error.focused .ngx-dropdown-trigger,.has-error.open .ngx-dropdown-trigger{box-shadow:0 0 0 2px #e74c3c2e}.ngx-dropdown-error{font-size:12px;color:var(--ngx-input-error, #e74c3c);margin-top:4px}.ngx-dropdown-hint{font-size:12px;color:var(--ngx-input-label, #6c757d);margin-top:4px}.ngx-dropdown-required{color:var(--ngx-input-error, #e74c3c);margin-left:2px}\n"] }]
|
|
929
|
+
`, styles: [":host{display:block}.ngx-dropdown{position:relative;font-family:inherit}.ngx-dropdown-label{display:block;font-size:13px;color:var(--ngx-input-label, #6c757d);margin-bottom:4px;font-weight:500}.ngx-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg, #fff);cursor:pointer;-webkit-user-select:none;user-select:none;font-size:14px;transition:all .2s cubic-bezier(.4,0,.2,1);outline:none}.ngx-dropdown-trigger:hover{border-color:var(--ngx-input-focus, #4f46e5)}.ngx-dropdown-trigger:focus-visible{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15));outline:none}.open .ngx-dropdown-trigger{border-color:var(--ngx-input-focus, #4f46e5);box-shadow:0 0 0 3px var(--primary-glow, rgba(79, 70, 229, .15))}.disabled .ngx-dropdown-trigger{background:var(--ngx-input-disabled-bg, #f8f9fa);cursor:not-allowed;color:#adb5bd;opacity:.7}.trigger-text{flex:1;color:var(--ngx-input-text, #212529)}.trigger-text.placeholder{color:#adb5bd}.trigger-arrow{font-size:10px;color:#6c757d;transition:transform .15s}.trigger-arrow.open{transform:rotate(180deg)}.ngx-dropdown-popup{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:1000;background:var(--ngx-input-bg, #fff);border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--ngx-input-radius, 8px);box-shadow:var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,.1));overflow:hidden;transform-origin:top;animation:popup-slide .18s cubic-bezier(.4,0,.2,1)}@keyframes popup-slide{0%{opacity:0;transform:translateY(-4px) scaleY(.95)}to{opacity:1;transform:translateY(0) scaleY(1)}}.popup-search{padding:8px;border-bottom:1px solid var(--ngx-input-border, #ced4da)}.popup-search-input{width:100%;padding:6px 10px;border:1px solid var(--ngx-input-border, #ced4da);border-radius:var(--radius-sm, 6px);font-size:13px;outline:none;font-family:inherit;background:var(--bg-primary);color:var(--text-primary);transition:all .15s ease}.popup-search-input:focus{border-color:var(--ngx-input-focus, #4f46e5);background:var(--bg-secondary)}.popup-list{max-height:240px;overflow-y:auto}.popup-item{padding:8px 12px;font-size:14px;cursor:pointer;color:var(--ngx-input-text, #212529);transition:all .12s}.popup-item:hover,.popup-item.focused{background:var(--ngx-grid-hover-bg, #f1f3f5);color:var(--ngx-input-focus, #4f46e5)}.popup-item.selected{background:var(--ngx-grid-selected-bg, #e8f0fe);color:var(--ngx-input-focus, #4f46e5);font-weight:600}.popup-item.disabled{color:#adb5bd;cursor:not-allowed}.popup-item.disabled:hover{background:none}.popup-empty{padding:12px;text-align:center;color:#adb5bd;font-size:13px}.has-error .ngx-dropdown-trigger{border-color:var(--ngx-input-error, #e74c3c)}.has-error.focused .ngx-dropdown-trigger,.has-error.open .ngx-dropdown-trigger{box-shadow:0 0 0 2px #e74c3c2e}.ngx-dropdown-error{font-size:12px;color:var(--ngx-input-error, #e74c3c);margin-top:4px}.ngx-dropdown-hint{font-size:12px;color:var(--ngx-input-label, #6c757d);margin-top:4px}.ngx-dropdown-required{color:var(--ngx-input-error, #e74c3c);margin-left:2px}\n"] }]
|
|
681
930
|
}], propDecorators: { onDocClick: [{
|
|
682
931
|
type: HostListener,
|
|
683
932
|
args: ['document:click', ['$event']]
|
|
@@ -1566,35 +1815,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1566
1815
|
}] });
|
|
1567
1816
|
|
|
1568
1817
|
class SwitchComponent {
|
|
1569
|
-
checked =
|
|
1818
|
+
checked = model(false);
|
|
1570
1819
|
onLabel = input('On');
|
|
1571
1820
|
offLabel = input('Off');
|
|
1572
1821
|
size = input('md');
|
|
1573
1822
|
disabled = input(false);
|
|
1574
|
-
|
|
1575
|
-
|
|
1823
|
+
// Enterprise validation signals
|
|
1824
|
+
status = input('default');
|
|
1825
|
+
error = input('');
|
|
1826
|
+
hint = input('');
|
|
1827
|
+
_onChange = () => { };
|
|
1828
|
+
_onTouched = () => { };
|
|
1829
|
+
_resolvedStatus = computed(() => {
|
|
1830
|
+
if (this.error())
|
|
1831
|
+
return 'error';
|
|
1832
|
+
return this.status();
|
|
1833
|
+
});
|
|
1834
|
+
toggle() {
|
|
1835
|
+
if (this.disabled())
|
|
1836
|
+
return;
|
|
1837
|
+
this.checked.update(v => !v);
|
|
1838
|
+
this._onChange(this.checked());
|
|
1839
|
+
this._onTouched();
|
|
1840
|
+
}
|
|
1841
|
+
// ControlValueAccessor
|
|
1842
|
+
writeValue(val) {
|
|
1843
|
+
this.checked.set(!!val);
|
|
1844
|
+
}
|
|
1845
|
+
registerOnChange(fn) {
|
|
1846
|
+
this._onChange = fn;
|
|
1847
|
+
}
|
|
1848
|
+
registerOnTouched(fn) {
|
|
1849
|
+
this._onTouched = fn;
|
|
1850
|
+
}
|
|
1851
|
+
setDisabledState(isDisabled) {
|
|
1852
|
+
// Handled via disabled input
|
|
1853
|
+
}
|
|
1576
1854
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1577
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1855
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: SwitchComponent, isStandalone: true, selector: "ngx-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, providers: [
|
|
1856
|
+
{
|
|
1857
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1858
|
+
useExisting: forwardRef(() => SwitchComponent),
|
|
1859
|
+
multi: true
|
|
1860
|
+
}
|
|
1861
|
+
], ngImport: i0, template: `
|
|
1862
|
+
<div
|
|
1863
|
+
class="ngx-switch-container"
|
|
1864
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
1865
|
+
[class.disabled]="disabled()"
|
|
1866
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
1867
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
1868
|
+
>
|
|
1869
|
+
<div class="ngx-switch-row">
|
|
1870
|
+
@if (offLabel()) {
|
|
1871
|
+
<span class="switch-off-label" [class.active]="!checked()" (click)="disabled() ? null : (!checked() ? null : toggle())">{{ offLabel() }}</span>
|
|
1872
|
+
}
|
|
1873
|
+
<span
|
|
1874
|
+
class="switch-track"
|
|
1875
|
+
[class.checked]="checked()"
|
|
1876
|
+
[class]="'size-' + size()"
|
|
1877
|
+
(click)="toggle()"
|
|
1878
|
+
(keydown.space)="$event.preventDefault(); toggle()"
|
|
1879
|
+
(keydown.enter)="$event.preventDefault(); toggle()"
|
|
1880
|
+
role="switch"
|
|
1881
|
+
[attr.aria-checked]="checked()"
|
|
1882
|
+
[attr.aria-disabled]="disabled()"
|
|
1883
|
+
[attr.tabindex]="disabled() ? null : '0'"
|
|
1884
|
+
>
|
|
1885
|
+
<span class="switch-thumb"></span>
|
|
1886
|
+
</span>
|
|
1887
|
+
@if (onLabel()) {
|
|
1888
|
+
<span class="switch-on-label" [class.active]="checked()" (click)="disabled() ? null : (checked() ? null : toggle())">{{ onLabel() }}</span>
|
|
1889
|
+
}
|
|
1890
|
+
</div>
|
|
1891
|
+
|
|
1892
|
+
@if (error()) {
|
|
1893
|
+
<div class="ngx-switch-error">{{ error() }}</div>
|
|
1894
|
+
} @else if (hint()) {
|
|
1895
|
+
<div class="ngx-switch-hint">{{ hint() }}</div>
|
|
1896
|
+
}
|
|
1897
|
+
</div>
|
|
1898
|
+
`, isInline: true, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-switch-off-bg: #cbd5e1;--ngx-switch-on-bg: #4f46e5;--ngx-switch-thumb-bg: #ffffff;--ngx-switch-text: #475569;--ngx-switch-text-active: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-switch-off-bg: #475569;--ngx-switch-on-bg: #818cf8;--ngx-switch-text: #94a3b8;--ngx-switch-text-active: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-switch-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.ngx-switch-row{display:inline-flex;align-items:center;gap:10px}.switch-track{position:relative;border-radius:999px;background:var(--ngx-switch-off-bg);transition:all .25s cubic-bezier(.4,0,.2,1);flex-shrink:0;cursor:pointer;outline:none;box-shadow:inset 0 1px 3px #0000001a}.switch-track.size-sm{width:34px;height:20px}.switch-track.size-md{width:44px;height:24px}.switch-track.size-lg{width:56px;height:30px}.switch-track.checked{background:var(--ngx-switch-on-bg)}.switch-thumb{position:absolute;top:2px;left:2px;border-radius:50%;background:var(--ngx-switch-thumb-bg);box-shadow:0 2px 5px #00000026,0 1px 1px #0000001a;transition:transform .25s cubic-bezier(.34,1.56,.64,1);pointer-events:none}.size-sm .switch-thumb{width:16px;height:16px}.size-md .switch-thumb{width:20px;height:20px}.size-lg .switch-thumb{width:26px;height:26px}.size-sm.checked .switch-thumb{transform:translate(14px)}.size-md.checked .switch-thumb{transform:translate(20px)}.size-lg.checked .switch-thumb{transform:translate(26px)}.switch-track:focus-visible{box-shadow:0 0 0 3px #4f46e540,inset 0 1px 3px #0000001a}.switch-track:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(0)}.size-sm.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(14px)}.size-md.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(20px)}.size-lg.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(26px)}.disabled{opacity:.55;cursor:not-allowed}.disabled .switch-track{cursor:not-allowed;pointer-events:none}.switch-off-label,.switch-on-label{font-size:13px;color:var(--ngx-switch-text);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease}.switch-off-label.active,.switch-on-label.active{color:var(--ngx-switch-text-active);font-weight:600}.status-success .switch-track.checked{background:var(--ngx-input-success-border)}.status-success .switch-track:focus-visible{box-shadow:var(--ngx-input-success-shadow),inset 0 1px 3px #0000001a}.status-warning .switch-track.checked{background:var(--ngx-input-warning-border)}.status-warning .switch-track:focus-visible{box-shadow:var(--ngx-input-warning-shadow),inset 0 1px 3px #0000001a}.has-error .switch-track.checked{background:var(--ngx-input-error-border)}.has-error .switch-track:focus-visible{box-shadow:var(--ngx-input-error-shadow),inset 0 1px 3px #0000001a}.ngx-switch-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;animation:slide-down .2s ease-out}.ngx-switch-hint{color:#64748b;font-size:12px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] });
|
|
1586
1899
|
}
|
|
1587
1900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
1588
1901
|
type: Component,
|
|
1589
|
-
args: [{ selector: 'ngx-switch', standalone: true,
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1902
|
+
args: [{ selector: 'ngx-switch', standalone: true, providers: [
|
|
1903
|
+
{
|
|
1904
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1905
|
+
useExisting: forwardRef(() => SwitchComponent),
|
|
1906
|
+
multi: true
|
|
1907
|
+
}
|
|
1908
|
+
], template: `
|
|
1909
|
+
<div
|
|
1910
|
+
class="ngx-switch-container"
|
|
1911
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
1912
|
+
[class.disabled]="disabled()"
|
|
1913
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
1914
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
1915
|
+
>
|
|
1916
|
+
<div class="ngx-switch-row">
|
|
1917
|
+
@if (offLabel()) {
|
|
1918
|
+
<span class="switch-off-label" [class.active]="!checked()" (click)="disabled() ? null : (!checked() ? null : toggle())">{{ offLabel() }}</span>
|
|
1919
|
+
}
|
|
1920
|
+
<span
|
|
1921
|
+
class="switch-track"
|
|
1922
|
+
[class.checked]="checked()"
|
|
1923
|
+
[class]="'size-' + size()"
|
|
1924
|
+
(click)="toggle()"
|
|
1925
|
+
(keydown.space)="$event.preventDefault(); toggle()"
|
|
1926
|
+
(keydown.enter)="$event.preventDefault(); toggle()"
|
|
1927
|
+
role="switch"
|
|
1928
|
+
[attr.aria-checked]="checked()"
|
|
1929
|
+
[attr.aria-disabled]="disabled()"
|
|
1930
|
+
[attr.tabindex]="disabled() ? null : '0'"
|
|
1931
|
+
>
|
|
1932
|
+
<span class="switch-thumb"></span>
|
|
1933
|
+
</span>
|
|
1934
|
+
@if (onLabel()) {
|
|
1935
|
+
<span class="switch-on-label" [class.active]="checked()" (click)="disabled() ? null : (checked() ? null : toggle())">{{ onLabel() }}</span>
|
|
1936
|
+
}
|
|
1937
|
+
</div>
|
|
1938
|
+
|
|
1939
|
+
@if (error()) {
|
|
1940
|
+
<div class="ngx-switch-error">{{ error() }}</div>
|
|
1941
|
+
} @else if (hint()) {
|
|
1942
|
+
<div class="ngx-switch-hint">{{ hint() }}</div>
|
|
1943
|
+
}
|
|
1944
|
+
</div>
|
|
1945
|
+
`, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-switch-off-bg: #cbd5e1;--ngx-switch-on-bg: #4f46e5;--ngx-switch-thumb-bg: #ffffff;--ngx-switch-text: #475569;--ngx-switch-text-active: #0f172a}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-switch-off-bg: #475569;--ngx-switch-on-bg: #818cf8;--ngx-switch-text: #94a3b8;--ngx-switch-text-active: #f8fafc;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-switch-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.ngx-switch-row{display:inline-flex;align-items:center;gap:10px}.switch-track{position:relative;border-radius:999px;background:var(--ngx-switch-off-bg);transition:all .25s cubic-bezier(.4,0,.2,1);flex-shrink:0;cursor:pointer;outline:none;box-shadow:inset 0 1px 3px #0000001a}.switch-track.size-sm{width:34px;height:20px}.switch-track.size-md{width:44px;height:24px}.switch-track.size-lg{width:56px;height:30px}.switch-track.checked{background:var(--ngx-switch-on-bg)}.switch-thumb{position:absolute;top:2px;left:2px;border-radius:50%;background:var(--ngx-switch-thumb-bg);box-shadow:0 2px 5px #00000026,0 1px 1px #0000001a;transition:transform .25s cubic-bezier(.34,1.56,.64,1);pointer-events:none}.size-sm .switch-thumb{width:16px;height:16px}.size-md .switch-thumb{width:20px;height:20px}.size-lg .switch-thumb{width:26px;height:26px}.size-sm.checked .switch-thumb{transform:translate(14px)}.size-md.checked .switch-thumb{transform:translate(20px)}.size-lg.checked .switch-thumb{transform:translate(26px)}.switch-track:focus-visible{box-shadow:0 0 0 3px #4f46e540,inset 0 1px 3px #0000001a}.switch-track:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(0)}.size-sm.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(14px)}.size-md.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(20px)}.size-lg.checked:hover:not(.disabled) .switch-thumb{transform:scale(1.05) translate(26px)}.disabled{opacity:.55;cursor:not-allowed}.disabled .switch-track{cursor:not-allowed;pointer-events:none}.switch-off-label,.switch-on-label{font-size:13px;color:var(--ngx-switch-text);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease}.switch-off-label.active,.switch-on-label.active{color:var(--ngx-switch-text-active);font-weight:600}.status-success .switch-track.checked{background:var(--ngx-input-success-border)}.status-success .switch-track:focus-visible{box-shadow:var(--ngx-input-success-shadow),inset 0 1px 3px #0000001a}.status-warning .switch-track.checked{background:var(--ngx-input-warning-border)}.status-warning .switch-track:focus-visible{box-shadow:var(--ngx-input-warning-shadow),inset 0 1px 3px #0000001a}.has-error .switch-track.checked{background:var(--ngx-input-error-border)}.has-error .switch-track:focus-visible{box-shadow:var(--ngx-input-error-shadow),inset 0 1px 3px #0000001a}.ngx-switch-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;animation:slide-down .2s ease-out}.ngx-switch-hint{color:#64748b;font-size:12px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
1598
1946
|
}] });
|
|
1599
1947
|
|
|
1600
1948
|
class RatingComponent {
|
|
@@ -1602,60 +1950,185 @@ class RatingComponent {
|
|
|
1602
1950
|
label = input('');
|
|
1603
1951
|
readonly = input(false);
|
|
1604
1952
|
showValue = input(false);
|
|
1605
|
-
|
|
1953
|
+
// Enterprise validation signals
|
|
1954
|
+
status = input('default');
|
|
1955
|
+
error = input('');
|
|
1956
|
+
hint = input('');
|
|
1957
|
+
value = model(0);
|
|
1958
|
+
current = computed(() => this.value());
|
|
1606
1959
|
hovered = signal(0);
|
|
1607
1960
|
ratingChange = output();
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1961
|
+
_onChange = () => { };
|
|
1962
|
+
_onTouched = () => { };
|
|
1963
|
+
stars = computed(() => Array.from({ length: this.max() }, (_, i) => i + 1));
|
|
1964
|
+
_resolvedStatus = computed(() => {
|
|
1965
|
+
if (this.error())
|
|
1966
|
+
return 'error';
|
|
1967
|
+
return this.status();
|
|
1968
|
+
});
|
|
1969
|
+
setRating(star) {
|
|
1970
|
+
if (this.readonly())
|
|
1971
|
+
return;
|
|
1972
|
+
this.value.set(star);
|
|
1973
|
+
this._onChange(star);
|
|
1974
|
+
this._onTouched();
|
|
1611
1975
|
this.ratingChange.emit(star);
|
|
1612
|
-
}
|
|
1976
|
+
}
|
|
1977
|
+
onKeyDown(event) {
|
|
1978
|
+
if (this.readonly())
|
|
1979
|
+
return;
|
|
1980
|
+
const maxVal = this.max();
|
|
1981
|
+
const curr = this.value();
|
|
1982
|
+
if (event.key === 'ArrowRight' || event.key === 'ArrowUp') {
|
|
1983
|
+
event.preventDefault();
|
|
1984
|
+
this.setRating(Math.min(maxVal, curr + 1));
|
|
1985
|
+
}
|
|
1986
|
+
else if (event.key === 'ArrowLeft' || event.key === 'ArrowDown') {
|
|
1987
|
+
event.preventDefault();
|
|
1988
|
+
this.setRating(Math.max(0, curr - 1));
|
|
1989
|
+
}
|
|
1990
|
+
else if (event.key === 'Home') {
|
|
1991
|
+
event.preventDefault();
|
|
1992
|
+
this.setRating(0);
|
|
1993
|
+
}
|
|
1994
|
+
else if (event.key === 'End') {
|
|
1995
|
+
event.preventDefault();
|
|
1996
|
+
this.setRating(maxVal);
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
// ControlValueAccessor
|
|
2000
|
+
writeValue(val) {
|
|
2001
|
+
this.value.set(val ?? 0);
|
|
2002
|
+
}
|
|
2003
|
+
registerOnChange(fn) {
|
|
2004
|
+
this._onChange = fn;
|
|
2005
|
+
}
|
|
2006
|
+
registerOnTouched(fn) {
|
|
2007
|
+
this._onTouched = fn;
|
|
2008
|
+
}
|
|
2009
|
+
setDisabledState(isDisabled) {
|
|
2010
|
+
// Handled via readonly or template-level disabled
|
|
2011
|
+
}
|
|
1613
2012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1614
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: RatingComponent, isStandalone: true, selector: "ngx-rating", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null } },
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
2013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: RatingComponent, isStandalone: true, selector: "ngx-rating", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, showValue: { classPropertyName: "showValue", publicName: "showValue", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", ratingChange: "ratingChange" }, providers: [
|
|
2014
|
+
{
|
|
2015
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2016
|
+
useExisting: forwardRef(() => RatingComponent),
|
|
2017
|
+
multi: true
|
|
2018
|
+
}
|
|
2019
|
+
], ngImport: i0, template: `
|
|
2020
|
+
<div
|
|
2021
|
+
class="ngx-rating-container"
|
|
2022
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
2023
|
+
[class.disabled]="readonly()"
|
|
2024
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
2025
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
2026
|
+
>
|
|
2027
|
+
@if (label()) {
|
|
2028
|
+
<span class="rating-label">{{ label() }}</span>
|
|
2029
|
+
}
|
|
2030
|
+
<div class="ngx-rating-row">
|
|
2031
|
+
<div
|
|
2032
|
+
class="rating-stars"
|
|
2033
|
+
[attr.tabindex]="readonly() ? null : '0'"
|
|
2034
|
+
role="slider"
|
|
2035
|
+
[attr.aria-valuenow]="current()"
|
|
2036
|
+
[attr.aria-valuemin]="0"
|
|
2037
|
+
[attr.aria-valuemax]="max()"
|
|
2038
|
+
[attr.aria-label]="label() || 'Rating'"
|
|
2039
|
+
[attr.aria-disabled]="readonly()"
|
|
2040
|
+
(keydown)="onKeyDown($event)"
|
|
2041
|
+
>
|
|
2042
|
+
@for (star of stars(); track star) {
|
|
2043
|
+
<span
|
|
2044
|
+
class="rating-star"
|
|
2045
|
+
[class.filled]="(hovered() || current()) >= star"
|
|
2046
|
+
[class.hovered]="hovered() >= star"
|
|
2047
|
+
(mouseenter)="readonly() ? null : hovered.set(star)"
|
|
2048
|
+
(mouseleave)="readonly() ? null : hovered.set(0)"
|
|
2049
|
+
(click)="readonly() ? null : setRating(star)"
|
|
2050
|
+
>
|
|
2051
|
+
@if ((hovered() || current()) >= star) {
|
|
2052
|
+
★
|
|
2053
|
+
} @else {
|
|
2054
|
+
☆
|
|
2055
|
+
}
|
|
2056
|
+
</span>
|
|
2057
|
+
}
|
|
2058
|
+
</div>
|
|
2059
|
+
@if (showValue()) {
|
|
2060
|
+
<span class="rating-value">{{ current() }}/{{ max() }}</span>
|
|
1630
2061
|
}
|
|
1631
2062
|
</div>
|
|
1632
|
-
|
|
2063
|
+
|
|
2064
|
+
@if (error()) {
|
|
2065
|
+
<div class="ngx-rating-error">{{ error() }}</div>
|
|
2066
|
+
} @else if (hint()) {
|
|
2067
|
+
<div class="ngx-rating-hint">{{ hint() }}</div>
|
|
2068
|
+
}
|
|
1633
2069
|
</div>
|
|
1634
|
-
`, isInline: true, styles: [":host{display:inline-block}.ngx-rating{display:
|
|
2070
|
+
`, isInline: true, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-rating-empty: #cbd5e1;--ngx-rating-filled: #f59e0b;--ngx-rating-hover: #d97706;--ngx-rating-text: #64748b}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-rating-empty: #475569;--ngx-rating-filled: #fbbf24;--ngx-rating-hover: #f59e0b;--ngx-rating-text: #94a3b8;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-rating-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.rating-label{font-size:13px;font-weight:600;color:var(--ngx-rating-text);margin-bottom:2px}.ngx-rating-row{display:flex;align-items:center;gap:10px}.rating-stars{display:flex;gap:4px;padding:4px 8px;border-radius:8px;border:1px solid transparent;outline:none;transition:all .2s cubic-bezier(.4,0,.2,1)}.rating-stars:focus-visible{border-color:#cbd5e1;box-shadow:0 0 0 3px #4f46e526;background:#4f46e508}:host-context(.dark) .rating-stars:focus-visible,:host-context(.dark-theme) .rating-stars:focus-visible{border-color:#475569;background:#818cf80d}.rating-star{font-size:24px;line-height:1;color:var(--ngx-rating-empty);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease,transform .15s cubic-bezier(.34,1.56,.64,1)}.disabled .rating-star{cursor:not-allowed;opacity:.75}.rating-star.filled{color:var(--ngx-rating-filled)}.rating-star.hovered{color:var(--ngx-rating-hover);transform:scale(1.25) rotate(5deg)}.rating-value{font-size:13px;font-weight:600;color:var(--ngx-rating-text);min-width:32px}.status-success .rating-stars:focus-visible{box-shadow:var(--ngx-input-success-shadow);border-color:var(--ngx-input-success-border)}.status-warning .rating-stars:focus-visible{box-shadow:var(--ngx-input-warning-shadow);border-color:var(--ngx-input-warning-border)}.has-error .rating-stars:focus-visible{box-shadow:var(--ngx-input-error-shadow);border-color:var(--ngx-input-error-border)}.ngx-rating-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;margin-left:10px;animation:slide-down .2s ease-out}.ngx-rating-hint{color:#64748b;font-size:12px;margin-left:10px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] });
|
|
1635
2071
|
}
|
|
1636
2072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: RatingComponent, decorators: [{
|
|
1637
2073
|
type: Component,
|
|
1638
|
-
args: [{ selector: 'ngx-rating', standalone: true,
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
2074
|
+
args: [{ selector: 'ngx-rating', standalone: true, providers: [
|
|
2075
|
+
{
|
|
2076
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2077
|
+
useExisting: forwardRef(() => RatingComponent),
|
|
2078
|
+
multi: true
|
|
2079
|
+
}
|
|
2080
|
+
], template: `
|
|
2081
|
+
<div
|
|
2082
|
+
class="ngx-rating-container"
|
|
2083
|
+
[class.has-error]="_resolvedStatus() === 'error'"
|
|
2084
|
+
[class.disabled]="readonly()"
|
|
2085
|
+
[class.status-success]="_resolvedStatus() === 'success'"
|
|
2086
|
+
[class.status-warning]="_resolvedStatus() === 'warning'"
|
|
2087
|
+
>
|
|
2088
|
+
@if (label()) {
|
|
2089
|
+
<span class="rating-label">{{ label() }}</span>
|
|
2090
|
+
}
|
|
2091
|
+
<div class="ngx-rating-row">
|
|
2092
|
+
<div
|
|
2093
|
+
class="rating-stars"
|
|
2094
|
+
[attr.tabindex]="readonly() ? null : '0'"
|
|
2095
|
+
role="slider"
|
|
2096
|
+
[attr.aria-valuenow]="current()"
|
|
2097
|
+
[attr.aria-valuemin]="0"
|
|
2098
|
+
[attr.aria-valuemax]="max()"
|
|
2099
|
+
[attr.aria-label]="label() || 'Rating'"
|
|
2100
|
+
[attr.aria-disabled]="readonly()"
|
|
2101
|
+
(keydown)="onKeyDown($event)"
|
|
2102
|
+
>
|
|
2103
|
+
@for (star of stars(); track star) {
|
|
2104
|
+
<span
|
|
2105
|
+
class="rating-star"
|
|
2106
|
+
[class.filled]="(hovered() || current()) >= star"
|
|
2107
|
+
[class.hovered]="hovered() >= star"
|
|
2108
|
+
(mouseenter)="readonly() ? null : hovered.set(star)"
|
|
2109
|
+
(mouseleave)="readonly() ? null : hovered.set(0)"
|
|
2110
|
+
(click)="readonly() ? null : setRating(star)"
|
|
2111
|
+
>
|
|
2112
|
+
@if ((hovered() || current()) >= star) {
|
|
2113
|
+
★
|
|
2114
|
+
} @else {
|
|
2115
|
+
☆
|
|
2116
|
+
}
|
|
2117
|
+
</span>
|
|
2118
|
+
}
|
|
2119
|
+
</div>
|
|
2120
|
+
@if (showValue()) {
|
|
2121
|
+
<span class="rating-value">{{ current() }}/{{ max() }}</span>
|
|
1654
2122
|
}
|
|
1655
2123
|
</div>
|
|
1656
|
-
|
|
2124
|
+
|
|
2125
|
+
@if (error()) {
|
|
2126
|
+
<div class="ngx-rating-error">{{ error() }}</div>
|
|
2127
|
+
} @else if (hint()) {
|
|
2128
|
+
<div class="ngx-rating-hint">{{ hint() }}</div>
|
|
2129
|
+
}
|
|
1657
2130
|
</div>
|
|
1658
|
-
`, styles: [":host{display:inline-block}.ngx-rating{display:
|
|
2131
|
+
`, styles: [":host{display:inline-block;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .2);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .2);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .2);--ngx-rating-empty: #cbd5e1;--ngx-rating-filled: #f59e0b;--ngx-rating-hover: #d97706;--ngx-rating-text: #64748b}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-rating-empty: #475569;--ngx-rating-filled: #fbbf24;--ngx-rating-hover: #f59e0b;--ngx-rating-text: #94a3b8;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .3);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .3);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .3)}.ngx-rating-container{display:flex;flex-direction:column;gap:4px;font-family:inherit}.rating-label{font-size:13px;font-weight:600;color:var(--ngx-rating-text);margin-bottom:2px}.ngx-rating-row{display:flex;align-items:center;gap:10px}.rating-stars{display:flex;gap:4px;padding:4px 8px;border-radius:8px;border:1px solid transparent;outline:none;transition:all .2s cubic-bezier(.4,0,.2,1)}.rating-stars:focus-visible{border-color:#cbd5e1;box-shadow:0 0 0 3px #4f46e526;background:#4f46e508}:host-context(.dark) .rating-stars:focus-visible,:host-context(.dark-theme) .rating-stars:focus-visible{border-color:#475569;background:#818cf80d}.rating-star{font-size:24px;line-height:1;color:var(--ngx-rating-empty);cursor:pointer;-webkit-user-select:none;user-select:none;transition:color .15s ease,transform .15s cubic-bezier(.34,1.56,.64,1)}.disabled .rating-star{cursor:not-allowed;opacity:.75}.rating-star.filled{color:var(--ngx-rating-filled)}.rating-star.hovered{color:var(--ngx-rating-hover);transform:scale(1.25) rotate(5deg)}.rating-value{font-size:13px;font-weight:600;color:var(--ngx-rating-text);min-width:32px}.status-success .rating-stars:focus-visible{box-shadow:var(--ngx-input-success-shadow);border-color:var(--ngx-input-success-border)}.status-warning .rating-stars:focus-visible{box-shadow:var(--ngx-input-warning-shadow);border-color:var(--ngx-input-warning-border)}.has-error .rating-stars:focus-visible{box-shadow:var(--ngx-input-error-shadow);border-color:var(--ngx-input-error-border)}.ngx-rating-error{color:var(--ngx-input-error-border);font-size:12px;font-weight:550;margin-left:10px;animation:slide-down .2s ease-out}.ngx-rating-hint{color:#64748b;font-size:12px;margin-left:10px}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
1659
2132
|
}] });
|
|
1660
2133
|
|
|
1661
2134
|
class NumericTextBoxComponent {
|
|
@@ -1670,7 +2143,16 @@ class NumericTextBoxComponent {
|
|
|
1670
2143
|
prefix = input('');
|
|
1671
2144
|
suffix = input('');
|
|
1672
2145
|
focused = signal(false);
|
|
2146
|
+
// Enterprise validation inputs
|
|
2147
|
+
status = input('default');
|
|
2148
|
+
error = input('');
|
|
2149
|
+
hint = input('');
|
|
1673
2150
|
valueChange = output();
|
|
2151
|
+
_resolvedStatus = computed(() => {
|
|
2152
|
+
if (this.error())
|
|
2153
|
+
return 'error';
|
|
2154
|
+
return this.status();
|
|
2155
|
+
});
|
|
1674
2156
|
onChangeFn = () => { };
|
|
1675
2157
|
onTouchedFn = () => { };
|
|
1676
2158
|
constructor() {
|
|
@@ -1730,33 +2212,64 @@ class NumericTextBoxComponent {
|
|
|
1730
2212
|
// Handled at form control template level
|
|
1731
2213
|
}
|
|
1732
2214
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NumericTextBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1733
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: NumericTextBoxComponent, isStandalone: true, selector: "ngx-numeric-textbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
2215
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: NumericTextBoxComponent, isStandalone: true, selector: "ngx-numeric-textbox", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
1734
2216
|
{
|
|
1735
2217
|
provide: NG_VALUE_ACCESSOR,
|
|
1736
2218
|
useExisting: forwardRef(() => NumericTextBoxComponent),
|
|
1737
2219
|
multi: true
|
|
1738
2220
|
}
|
|
1739
2221
|
], ngImport: i0, template: `
|
|
1740
|
-
<div class="ngx-numeric" [class.disabled]="disabled()">
|
|
2222
|
+
<div class="ngx-numeric" [class.disabled]="disabled()" [class.focused]="focused()" [class.has-error]="_resolvedStatus() === 'error'">
|
|
1741
2223
|
@if (label()) { <label class="numeric-label">{{ label() }}</label> }
|
|
1742
|
-
<div class="numeric-input-wrap" [class
|
|
2224
|
+
<div class="numeric-input-wrap" [class]="'status-' + _resolvedStatus()">
|
|
2225
|
+
<ng-content select="[prefix]" />
|
|
1743
2226
|
@if (prefix()) { <span class="numeric-prefix">{{ prefix() }}</span> }
|
|
1744
2227
|
<input
|
|
1745
2228
|
type="number" class="numeric-input"
|
|
1746
2229
|
[min]="min()" [max]="max()" [step]="step()"
|
|
1747
2230
|
[value]="currentValue()" [disabled]="disabled()" [placeholder]="placeholder()"
|
|
2231
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
1748
2232
|
(focus)="focused.set(true)" (blur)="onBlur()"
|
|
1749
2233
|
(keydown)="onKeyDown($event)"
|
|
1750
2234
|
(change)="onChange($event)"
|
|
1751
2235
|
/>
|
|
2236
|
+
|
|
2237
|
+
<!-- Status Indicator Icons -->
|
|
2238
|
+
@if (_resolvedStatus() === 'success') {
|
|
2239
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
2240
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
2241
|
+
</span>
|
|
2242
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
2243
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
2244
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
2245
|
+
</span>
|
|
2246
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
2247
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
2248
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
2249
|
+
</span>
|
|
2250
|
+
}
|
|
2251
|
+
|
|
1752
2252
|
@if (suffix()) { <span class="numeric-suffix">{{ suffix() }}</span> }
|
|
2253
|
+
<ng-content select="[suffix]" />
|
|
1753
2254
|
<div class="numeric-spin">
|
|
1754
|
-
<button class="spin-btn" type="button" [disabled]="disabled() || currentValue() >= max()" (click)="spin(1)"
|
|
1755
|
-
|
|
2255
|
+
<button class="spin-btn spin-up" type="button" [disabled]="disabled() || currentValue() >= max()" (click)="spin(1)" aria-label="Increase value">
|
|
2256
|
+
<svg viewBox="0 0 24 24" width="8" height="8" fill="currentColor"><path d="M12 8l-6 6h12z"/></svg>
|
|
2257
|
+
</button>
|
|
2258
|
+
<button class="spin-btn spin-down" type="button" [disabled]="disabled() || currentValue() <= min()" (click)="spin(-1)" aria-label="Decrease value">
|
|
2259
|
+
<svg viewBox="0 0 24 24" width="8" height="8" fill="currentColor"><path d="M12 16l6-6H6z"/></svg>
|
|
2260
|
+
</button>
|
|
1756
2261
|
</div>
|
|
1757
2262
|
</div>
|
|
2263
|
+
|
|
2264
|
+
<div class="numeric-footer">
|
|
2265
|
+
@if (error()) {
|
|
2266
|
+
<div class="numeric-error">{{ error() }}</div>
|
|
2267
|
+
} @else if (hint()) {
|
|
2268
|
+
<div class="numeric-hint">{{ hint() }}</div>
|
|
2269
|
+
}
|
|
2270
|
+
</div>
|
|
1758
2271
|
</div>
|
|
1759
|
-
`, isInline: true, styles: [":host{display:block}.ngx-numeric{width:100
|
|
2272
|
+
`, isInline: true, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-numeric{width:100%;font-family:inherit}.numeric-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .numeric-label{color:var(--ngx-input-label-active);transform:translate(2px)}.numeric-input-wrap{display:flex;align-items:center;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);overflow:hidden;transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .numeric-input-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .numeric-input-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .numeric-input-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .numeric-input-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .numeric-input-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.numeric-input{flex:1;padding:10px 14px;border:none;background:transparent;font-size:14px;color:var(--ngx-input-text);outline:none;min-width:0;-moz-appearance:textfield}.numeric-input::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.numeric-input::-webkit-outer-spin-button,.numeric-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.numeric-input:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.numeric-prefix,.numeric-suffix{padding:0 10px;color:var(--ngx-input-label);font-size:14px;flex-shrink:0}.numeric-spin{display:flex;flex-direction:column;border-left:1px solid var(--ngx-input-border);align-self:stretch}.spin-btn{border:none;background:transparent;cursor:pointer;padding:0 10px;color:var(--ngx-input-label);flex:1;display:inline-flex;align-items:center;justify-content:center;transition:all .15s}.spin-btn:hover:not(:disabled){background:#4f46e514;color:var(--ngx-input-label-active)}.spin-btn:active:not(:disabled){background:#4f46e526}.spin-btn:disabled{opacity:.4;cursor:not-allowed}.spin-up{border-bottom:.5px solid var(--ngx-input-border)}.numeric-footer{margin-top:5px;font-size:12px}.numeric-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.numeric-hint{color:var(--ngx-input-label)}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] });
|
|
1760
2273
|
}
|
|
1761
2274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: NumericTextBoxComponent, decorators: [{
|
|
1762
2275
|
type: Component,
|
|
@@ -1767,26 +2280,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1767
2280
|
multi: true
|
|
1768
2281
|
}
|
|
1769
2282
|
], template: `
|
|
1770
|
-
<div class="ngx-numeric" [class.disabled]="disabled()">
|
|
2283
|
+
<div class="ngx-numeric" [class.disabled]="disabled()" [class.focused]="focused()" [class.has-error]="_resolvedStatus() === 'error'">
|
|
1771
2284
|
@if (label()) { <label class="numeric-label">{{ label() }}</label> }
|
|
1772
|
-
<div class="numeric-input-wrap" [class
|
|
2285
|
+
<div class="numeric-input-wrap" [class]="'status-' + _resolvedStatus()">
|
|
2286
|
+
<ng-content select="[prefix]" />
|
|
1773
2287
|
@if (prefix()) { <span class="numeric-prefix">{{ prefix() }}</span> }
|
|
1774
2288
|
<input
|
|
1775
2289
|
type="number" class="numeric-input"
|
|
1776
2290
|
[min]="min()" [max]="max()" [step]="step()"
|
|
1777
2291
|
[value]="currentValue()" [disabled]="disabled()" [placeholder]="placeholder()"
|
|
2292
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
1778
2293
|
(focus)="focused.set(true)" (blur)="onBlur()"
|
|
1779
2294
|
(keydown)="onKeyDown($event)"
|
|
1780
2295
|
(change)="onChange($event)"
|
|
1781
2296
|
/>
|
|
2297
|
+
|
|
2298
|
+
<!-- Status Indicator Icons -->
|
|
2299
|
+
@if (_resolvedStatus() === 'success') {
|
|
2300
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
2301
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
2302
|
+
</span>
|
|
2303
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
2304
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
2305
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
2306
|
+
</span>
|
|
2307
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
2308
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
2309
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
2310
|
+
</span>
|
|
2311
|
+
}
|
|
2312
|
+
|
|
1782
2313
|
@if (suffix()) { <span class="numeric-suffix">{{ suffix() }}</span> }
|
|
2314
|
+
<ng-content select="[suffix]" />
|
|
1783
2315
|
<div class="numeric-spin">
|
|
1784
|
-
<button class="spin-btn" type="button" [disabled]="disabled() || currentValue() >= max()" (click)="spin(1)"
|
|
1785
|
-
|
|
2316
|
+
<button class="spin-btn spin-up" type="button" [disabled]="disabled() || currentValue() >= max()" (click)="spin(1)" aria-label="Increase value">
|
|
2317
|
+
<svg viewBox="0 0 24 24" width="8" height="8" fill="currentColor"><path d="M12 8l-6 6h12z"/></svg>
|
|
2318
|
+
</button>
|
|
2319
|
+
<button class="spin-btn spin-down" type="button" [disabled]="disabled() || currentValue() <= min()" (click)="spin(-1)" aria-label="Decrease value">
|
|
2320
|
+
<svg viewBox="0 0 24 24" width="8" height="8" fill="currentColor"><path d="M12 16l6-6H6z"/></svg>
|
|
2321
|
+
</button>
|
|
1786
2322
|
</div>
|
|
1787
2323
|
</div>
|
|
2324
|
+
|
|
2325
|
+
<div class="numeric-footer">
|
|
2326
|
+
@if (error()) {
|
|
2327
|
+
<div class="numeric-error">{{ error() }}</div>
|
|
2328
|
+
} @else if (hint()) {
|
|
2329
|
+
<div class="numeric-hint">{{ hint() }}</div>
|
|
2330
|
+
}
|
|
2331
|
+
</div>
|
|
1788
2332
|
</div>
|
|
1789
|
-
`, styles: [":host{display:block}.ngx-numeric{width:100
|
|
2333
|
+
`, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-numeric{width:100%;font-family:inherit}.numeric-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .numeric-label{color:var(--ngx-input-label-active);transform:translate(2px)}.numeric-input-wrap{display:flex;align-items:center;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);overflow:hidden;transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .numeric-input-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .numeric-input-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .numeric-input-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.numeric-input-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .numeric-input-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .numeric-input-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.numeric-input{flex:1;padding:10px 14px;border:none;background:transparent;font-size:14px;color:var(--ngx-input-text);outline:none;min-width:0;-moz-appearance:textfield}.numeric-input::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.numeric-input::-webkit-outer-spin-button,.numeric-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.numeric-input:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:0 8px;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.numeric-prefix,.numeric-suffix{padding:0 10px;color:var(--ngx-input-label);font-size:14px;flex-shrink:0}.numeric-spin{display:flex;flex-direction:column;border-left:1px solid var(--ngx-input-border);align-self:stretch}.spin-btn{border:none;background:transparent;cursor:pointer;padding:0 10px;color:var(--ngx-input-label);flex:1;display:inline-flex;align-items:center;justify-content:center;transition:all .15s}.spin-btn:hover:not(:disabled){background:#4f46e514;color:var(--ngx-input-label-active)}.spin-btn:active:not(:disabled){background:#4f46e526}.spin-btn:disabled{opacity:.4;cursor:not-allowed}.spin-up{border-bottom:.5px solid var(--ngx-input-border)}.numeric-footer{margin-top:5px;font-size:12px}.numeric-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.numeric-hint{color:var(--ngx-input-label)}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
1790
2334
|
}], ctorParameters: () => [] });
|
|
1791
2335
|
|
|
1792
2336
|
class TextareaComponent {
|
|
@@ -1800,25 +2344,59 @@ class TextareaComponent {
|
|
|
1800
2344
|
error = input('');
|
|
1801
2345
|
value = signal('');
|
|
1802
2346
|
focused = signal(false);
|
|
2347
|
+
// Enterprise status state
|
|
2348
|
+
status = input('default');
|
|
1803
2349
|
charCount = computed(() => this.value().length);
|
|
1804
2350
|
valueChange = output();
|
|
1805
|
-
|
|
2351
|
+
_resolvedStatus = computed(() => {
|
|
2352
|
+
if (this.error())
|
|
2353
|
+
return 'error';
|
|
2354
|
+
return this.status();
|
|
2355
|
+
});
|
|
2356
|
+
onInput(e) {
|
|
2357
|
+
const v = e.target.value;
|
|
2358
|
+
this.value.set(v);
|
|
2359
|
+
this.valueChange.emit(v);
|
|
2360
|
+
}
|
|
1806
2361
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TextareaComponent, isStandalone: true, selector: "ngx-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
1808
|
-
<div class="ngx-textarea-
|
|
1809
|
-
@if (label()) {
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
[
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
2362
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: TextareaComponent, isStandalone: true, selector: "ngx-textarea", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, maxlength: { classPropertyName: "maxlength", publicName: "maxlength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, autoResize: { classPropertyName: "autoResize", publicName: "autoResize", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
2363
|
+
<div class="ngx-textarea-container" [class.focused]="focused()" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()">
|
|
2364
|
+
@if (label()) {
|
|
2365
|
+
<label class="textarea-label">{{ label() }}</label>
|
|
2366
|
+
}
|
|
2367
|
+
<div class="ngx-textarea-wrap" [class]="'status-' + _resolvedStatus()">
|
|
2368
|
+
<ng-content select="[prefix]" />
|
|
2369
|
+
<textarea
|
|
2370
|
+
class="ngx-textarea"
|
|
2371
|
+
[rows]="rows()"
|
|
2372
|
+
[placeholder]="placeholder()"
|
|
2373
|
+
[disabled]="disabled()"
|
|
2374
|
+
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
2375
|
+
[value]="value()"
|
|
2376
|
+
[class.auto-resize]="autoResize()"
|
|
2377
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
2378
|
+
(input)="onInput($event)"
|
|
2379
|
+
(focus)="focused.set(true)"
|
|
2380
|
+
(blur)="focused.set(false)"
|
|
2381
|
+
></textarea>
|
|
2382
|
+
|
|
2383
|
+
<!-- Status Indicator Icons -->
|
|
2384
|
+
@if (_resolvedStatus() === 'success') {
|
|
2385
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
2386
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
2387
|
+
</span>
|
|
2388
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
2389
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
2390
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
2391
|
+
</span>
|
|
2392
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
2393
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
2394
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
2395
|
+
</span>
|
|
2396
|
+
}
|
|
2397
|
+
<ng-content select="[suffix]" />
|
|
2398
|
+
</div>
|
|
2399
|
+
|
|
1822
2400
|
<div class="textarea-footer">
|
|
1823
2401
|
@if (error()) { <span class="textarea-error">{{ error() }}</span> }
|
|
1824
2402
|
@else if (hint()) { <span class="textarea-hint">{{ hint() }}</span> }
|
|
@@ -1826,25 +2404,48 @@ class TextareaComponent {
|
|
|
1826
2404
|
@if (maxlength() > 0) { <span class="textarea-counter" [class.near-limit]="charCount() > maxlength() * 0.8">{{ charCount() }}/{{ maxlength() }}</span> }
|
|
1827
2405
|
</div>
|
|
1828
2406
|
</div>
|
|
1829
|
-
`, isInline: true, styles: [":host{display:block}.ngx-textarea-
|
|
2407
|
+
`, isInline: true, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-textarea-container{position:relative;font-family:inherit}.textarea-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .textarea-label{color:var(--ngx-input-label-active);transform:translate(2px)}.ngx-textarea-wrap{position:relative;display:flex;align-items:flex-start;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .ngx-textarea-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .ngx-textarea-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .ngx-textarea-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .ngx-textarea-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .ngx-textarea-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.ngx-textarea{flex:1;min-width:0;padding:10px 14px;border:none;outline:none;background:transparent;font-size:14px;color:var(--ngx-input-text);font-family:inherit;resize:vertical;box-sizing:border-box}.ngx-textarea::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.ngx-textarea:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px 0 0;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.textarea-footer{display:flex;justify-content:space-between;align-items:flex-start;margin-top:5px;font-size:12px}.textarea-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.textarea-hint{color:var(--ngx-input-label)}.textarea-counter{color:var(--ngx-input-label);font-size:11px;margin-left:auto}.textarea-counter.near-limit{color:var(--ngx-input-error-border);font-weight:600}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] });
|
|
1830
2408
|
}
|
|
1831
2409
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1832
2410
|
type: Component,
|
|
1833
2411
|
args: [{ selector: 'ngx-textarea', standalone: true, template: `
|
|
1834
|
-
<div class="ngx-textarea-
|
|
1835
|
-
@if (label()) {
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
[
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
2412
|
+
<div class="ngx-textarea-container" [class.focused]="focused()" [class.has-error]="_resolvedStatus() === 'error'" [class.disabled]="disabled()">
|
|
2413
|
+
@if (label()) {
|
|
2414
|
+
<label class="textarea-label">{{ label() }}</label>
|
|
2415
|
+
}
|
|
2416
|
+
<div class="ngx-textarea-wrap" [class]="'status-' + _resolvedStatus()">
|
|
2417
|
+
<ng-content select="[prefix]" />
|
|
2418
|
+
<textarea
|
|
2419
|
+
class="ngx-textarea"
|
|
2420
|
+
[rows]="rows()"
|
|
2421
|
+
[placeholder]="placeholder()"
|
|
2422
|
+
[disabled]="disabled()"
|
|
2423
|
+
[attr.maxlength]="maxlength() > 0 ? maxlength() : null"
|
|
2424
|
+
[value]="value()"
|
|
2425
|
+
[class.auto-resize]="autoResize()"
|
|
2426
|
+
[attr.aria-invalid]="_resolvedStatus() === 'error' ? 'true' : null"
|
|
2427
|
+
(input)="onInput($event)"
|
|
2428
|
+
(focus)="focused.set(true)"
|
|
2429
|
+
(blur)="focused.set(false)"
|
|
2430
|
+
></textarea>
|
|
2431
|
+
|
|
2432
|
+
<!-- Status Indicator Icons -->
|
|
2433
|
+
@if (_resolvedStatus() === 'success') {
|
|
2434
|
+
<span class="status-icon status-icon-success" aria-hidden="true">
|
|
2435
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
|
2436
|
+
</span>
|
|
2437
|
+
} @else if (_resolvedStatus() === 'warning') {
|
|
2438
|
+
<span class="status-icon status-icon-warning" aria-hidden="true">
|
|
2439
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
|
|
2440
|
+
</span>
|
|
2441
|
+
} @else if (_resolvedStatus() === 'error') {
|
|
2442
|
+
<span class="status-icon status-icon-error" aria-hidden="true">
|
|
2443
|
+
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
|
2444
|
+
</span>
|
|
2445
|
+
}
|
|
2446
|
+
<ng-content select="[suffix]" />
|
|
2447
|
+
</div>
|
|
2448
|
+
|
|
1848
2449
|
<div class="textarea-footer">
|
|
1849
2450
|
@if (error()) { <span class="textarea-error">{{ error() }}</span> }
|
|
1850
2451
|
@else if (hint()) { <span class="textarea-hint">{{ hint() }}</span> }
|
|
@@ -1852,7 +2453,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
1852
2453
|
@if (maxlength() > 0) { <span class="textarea-counter" [class.near-limit]="charCount() > maxlength() * 0.8">{{ charCount() }}/{{ maxlength() }}</span> }
|
|
1853
2454
|
</div>
|
|
1854
2455
|
</div>
|
|
1855
|
-
`, styles: [":host{display:block}.ngx-textarea-
|
|
2456
|
+
`, styles: [":host{display:block;--ngx-input-bg: #ffffff;--ngx-input-text: #0f172a;--ngx-input-border: #cbd5e1;--ngx-input-focus-border: #4f46e5;--ngx-input-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .15);--ngx-input-disabled-bg: #f1f5f9;--ngx-input-label: #475569;--ngx-input-label-active: #4f46e5;--ngx-input-placeholder: #94a3b8;--ngx-input-success-border: #10b981;--ngx-input-success-shadow: 0 0 0 3px rgba(16, 185, 129, .15);--ngx-input-warning-border: #f59e0b;--ngx-input-warning-shadow: 0 0 0 3px rgba(245, 158, 11, .15);--ngx-input-error-border: #ef4444;--ngx-input-error-shadow: 0 0 0 3px rgba(239, 68, 68, .15)}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-input-bg: #0f172a;--ngx-input-text: #f8fafc;--ngx-input-border: #334155;--ngx-input-focus-border: #818cf8;--ngx-input-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-input-disabled-bg: #1e293b;--ngx-input-label: #94a3b8;--ngx-input-label-active: #818cf8;--ngx-input-placeholder: #475569;--ngx-input-success-border: #34d399;--ngx-input-success-shadow: 0 0 0 3px rgba(52, 211, 153, .25);--ngx-input-warning-border: #fbbf24;--ngx-input-warning-shadow: 0 0 0 3px rgba(251, 191, 36, .25);--ngx-input-error-border: #f87171;--ngx-input-error-shadow: 0 0 0 3px rgba(248, 113, 113, .25)}.ngx-textarea-container{position:relative;font-family:inherit}.textarea-label{display:inline-flex;align-items:center;font-size:12px;font-weight:600;color:var(--ngx-input-label);margin-bottom:6px;transition:all .2s cubic-bezier(.4,0,.2,1)}.focused .textarea-label{color:var(--ngx-input-label-active);transform:translate(2px)}.ngx-textarea-wrap{position:relative;display:flex;align-items:flex-start;border:1px solid var(--ngx-input-border);border-radius:var(--ngx-input-radius, 8px);background:var(--ngx-input-bg);transition:all .2s cubic-bezier(.4,0,.2,1);box-shadow:0 1px 2px #0000000d}.focused .ngx-textarea-wrap{border-color:var(--ngx-input-focus-border);box-shadow:var(--ngx-input-focus-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-success{border-color:var(--ngx-input-success-border)}.focused .ngx-textarea-wrap.status-success{box-shadow:var(--ngx-input-success-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-warning{border-color:var(--ngx-input-warning-border)}.focused .ngx-textarea-wrap.status-warning{box-shadow:var(--ngx-input-warning-shadow),0 1px 2px #0000000d}.ngx-textarea-wrap.status-error{border-color:var(--ngx-input-error-border)}.focused .ngx-textarea-wrap.status-error{box-shadow:var(--ngx-input-error-shadow),0 1px 2px #0000000d}.disabled .ngx-textarea-wrap{background:var(--ngx-input-disabled-bg);cursor:not-allowed;opacity:.7;box-shadow:none}.ngx-textarea{flex:1;min-width:0;padding:10px 14px;border:none;outline:none;background:transparent;font-size:14px;color:var(--ngx-input-text);font-family:inherit;resize:vertical;box-sizing:border-box}.ngx-textarea::placeholder{color:var(--ngx-input-placeholder);opacity:.8}.ngx-textarea:disabled{cursor:not-allowed}.status-icon{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px 0 0;flex-shrink:0;animation:icon-scale-in .2s cubic-bezier(.175,.885,.32,1.275) forwards}.status-icon-success{color:var(--ngx-input-success-border)}.status-icon-warning{color:var(--ngx-input-warning-border)}.status-icon-error{color:var(--ngx-input-error-border)}@keyframes icon-scale-in{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.textarea-footer{display:flex;justify-content:space-between;align-items:flex-start;margin-top:5px;font-size:12px}.textarea-error{color:var(--ngx-input-error-border);font-weight:550;animation:slide-down .2s ease-out}.textarea-hint{color:var(--ngx-input-label)}.textarea-counter{color:var(--ngx-input-label);font-size:11px;margin-left:auto}.textarea-counter.near-limit{color:var(--ngx-input-error-border);font-weight:600}@keyframes slide-down{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}\n"] }]
|
|
1856
2457
|
}] });
|
|
1857
2458
|
|
|
1858
2459
|
const COLORS = [
|
|
@@ -2459,6 +3060,16 @@ class FileUploadComponent {
|
|
|
2459
3060
|
// State
|
|
2460
3061
|
isDragOver = signal(false);
|
|
2461
3062
|
fileQueue = signal([]);
|
|
3063
|
+
onDropzoneKeyDown(event) {
|
|
3064
|
+
if (this.disabled())
|
|
3065
|
+
return;
|
|
3066
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
3067
|
+
event.preventDefault();
|
|
3068
|
+
const inputEl = event.currentTarget;
|
|
3069
|
+
const fileInputEl = inputEl.querySelector('.hidden-file-input');
|
|
3070
|
+
fileInputEl?.click();
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
2462
3073
|
onDragOver(event) {
|
|
2463
3074
|
if (this.disabled())
|
|
2464
3075
|
return;
|
|
@@ -2654,6 +3265,11 @@ class FileUploadComponent {
|
|
|
2654
3265
|
(dragleave)="onDragLeave($event)"
|
|
2655
3266
|
(drop)="onDrop($event)"
|
|
2656
3267
|
(click)="fileInput.click()"
|
|
3268
|
+
(keydown)="onDropzoneKeyDown($event)"
|
|
3269
|
+
[attr.tabindex]="disabled() ? -1 : 0"
|
|
3270
|
+
role="button"
|
|
3271
|
+
[attr.aria-disabled]="disabled()"
|
|
3272
|
+
aria-label="Upload files"
|
|
2657
3273
|
>
|
|
2658
3274
|
<input
|
|
2659
3275
|
#fileInput
|
|
@@ -2746,7 +3362,7 @@ class FileUploadComponent {
|
|
|
2746
3362
|
</div>
|
|
2747
3363
|
}
|
|
2748
3364
|
</div>
|
|
2749
|
-
`, isInline: true, styles: [":host{display:block;width:100%}.file-upload-wrapper{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:var(--radius-md, 10px);padding:16px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:16px;transition:all .25s}.file-upload-wrapper.drag-over{border-color:var(--primary-color, #4f46e5);background:#4f46e503}.file-upload-wrapper.disabled{opacity:.65;pointer-events:none}.dropzone-area{border:2px dashed var(--border-color, #cbd5e1);border-radius:var(--radius-md, 10px);padding:32px 20px;text-align:center;cursor:pointer;background:#00000001;transition:all .2s ease-in-out;position:relative}.dropzone-area:hover{border-color:var(--primary-color, #4f46e5);background:#4f46e505}.drag-over .dropzone-area{border-color:var(--primary-color, #4f46e5);background:#4f46e50d}.hidden-file-input{display:none}.dropzone-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;-webkit-user-select:none;user-select:none}.upload-icon-circle{width:44px;height:44px;border-radius:50%;background:var(--border-light, #f1f5f9);display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #475569);transition:all .2s}.dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #4f46e5);color:#fff;transform:scale(1.05)}.upload-arrow-svg{width:20px;height:20px}.upload-headline{font-family:var(--ngx-font-family, sans-serif);font-size:14px;font-weight:550;color:var(--text-primary, #0f172a)}.upload-headline .highlight{color:var(--primary-color, #4f46e5);font-weight:700}.upload-subtext{font-family:var(--ngx-font-family, sans-serif);font-size:11px;color:var(--text-secondary, #64748b)}.file-queue-list{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--border-color, #e2e8f0);padding-top:16px}.queue-header{display:flex;justify-content:space-between;align-items:center;font-family:var(--ngx-font-family, sans-serif)}.queue-header h4{margin:0;font-size:13px;font-weight:750;color:var(--text-primary, #0f172a);text-transform:uppercase;letter-spacing:.5px}.clear-all-btn{background:transparent;border:none;color:#ef4444;font-size:11px;font-weight:700;cursor:pointer;padding:2px 6px;border-radius:4px;transition:background .2s}.clear-all-btn:hover{background:#ef44440d}.queue-items{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto;padding-right:4px}.queue-item-card{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border-color, #e2e8f0);border-radius:8px;background:var(--bg-secondary, #ffffff);transition:all .2s}.queue-item-card:hover{border-color:var(--text-secondary, #94a3b8);box-shadow:var(--shadow-sm)}.queue-item-card.success{border-color:#10b9814d;background:#10b98101}.queue-item-card.error{border-color:#ef44444d;background:#ef444401}.item-icon{color:var(--text-secondary, #64748b);display:flex;align-items:center;justify-content:center}.file-icon-svg{width:20px;height:20px}.item-details{flex:1;display:flex;flex-direction:column;gap:4px;overflow:hidden;font-family:var(--ngx-font-family, sans-serif)}.item-meta{display:flex;justify-content:space-between;gap:8px}.item-name{font-size:13px;font-weight:600;color:var(--text-primary, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-size{font-size:11px;color:var(--text-secondary, #64748b);white-space:nowrap}.item-progress-wrap{display:flex;align-items:center;gap:8px}.progress-track{flex:1;height:4px;background:var(--border-light, #f1f5f9);border-radius:2px;overflow:hidden}.progress-bar-fill{height:100%;background:var(--primary-color, #4f46e5);border-radius:2px;transition:width .15s}.progress-text{font-size:10px;font-weight:700;color:var(--text-secondary, #475569);min-width:28px;text-align:right}.item-error-msg{font-size:11px;color:#ef4444;font-weight:600}.item-status-badge{font-size:10px;font-weight:700;border-radius:4px;padding:1px 6px;width:fit-content}.item-status-badge.success{background:#10b9811a;color:#10b981}.item-actions{display:flex;gap:6px}.action-btn{background:transparent;border:none;font-size:12px;cursor:pointer;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #64748b);transition:background .2s,color .2s}.action-btn:hover{background:var(--border-light, #f1f5f9);color:var(--text-primary, #0f172a)}.action-btn.remove-btn:hover{color:#ef4444;background:#ef44440d}.file-upload-wrapper.dark{background:#0f172a;border-color:#1f2937}.file-upload-wrapper.dark .dropzone-area{border-color:#374151}.file-upload-wrapper.dark .dropzone-area:hover{border-color:var(--primary-color, #6366f1);background:#6366f105}.file-upload-wrapper.dark .upload-icon-circle{background:#1e293b;color:#94a3b8}.file-upload-wrapper.dark .dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #6366f1);color:#fff}.file-upload-wrapper.dark .upload-headline{color:#e2e8f0}.file-upload-wrapper.dark .upload-headline .highlight{color:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .upload-subtext{color:#94a3b8}.file-upload-wrapper.dark .file-queue-list{border-top-color:#1f2937}.file-upload-wrapper.dark .queue-header h4{color:#e2e8f0}.file-upload-wrapper.dark .queue-item-card{border-color:#1f2937;background:#111827}.file-upload-wrapper.dark .queue-item-card:hover{border-color:#4b5563}.file-upload-wrapper.dark .queue-item-card.success{border-color:#10b98133}.file-upload-wrapper.dark .queue-item-card.error{border-color:#ef444433}.file-upload-wrapper.dark .item-name{color:#e2e8f0}.file-upload-wrapper.dark .item-size{color:#94a3b8}.file-upload-wrapper.dark .progress-track{background:#1e293b}.file-upload-wrapper.dark .progress-bar-fill{background:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .progress-text{color:#94a3b8}.file-upload-wrapper.dark .action-btn:hover{background:#1e293b;color:#f8fafc}.file-upload-wrapper.dark .action-btn.remove-btn:hover{background:#ef44441a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
3365
|
+
`, isInline: true, styles: [":host{display:block;width:100%}.file-upload-wrapper{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:var(--radius-md, 10px);padding:16px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:16px;transition:all .25s}.file-upload-wrapper.drag-over{border-color:var(--primary-color, #4f46e5);background:#4f46e503}.file-upload-wrapper.disabled{opacity:.65;pointer-events:none}.dropzone-area{border:2px dashed var(--border-color, #cbd5e1);border-radius:var(--radius-md, 10px);padding:32px 20px;text-align:center;cursor:pointer;background:#00000001;transition:all .2s ease-in-out;position:relative}.dropzone-area:hover{border-color:var(--primary-color, #4f46e5);background:#4f46e505}.dropzone-area:focus-visible{outline:2px dashed var(--primary-color, #4f46e5);outline-offset:2px;border-color:var(--primary-color, #4f46e5);background:#4f46e505}.drag-over .dropzone-area{border-color:var(--primary-color, #4f46e5);background:#4f46e50d}.hidden-file-input{display:none}.dropzone-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;-webkit-user-select:none;user-select:none}.upload-icon-circle{width:44px;height:44px;border-radius:50%;background:var(--border-light, #f1f5f9);display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #475569);transition:all .2s}.dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #4f46e5);color:#fff;transform:scale(1.05)}.upload-arrow-svg{width:20px;height:20px}.upload-headline{font-family:var(--ngx-font-family, sans-serif);font-size:14px;font-weight:550;color:var(--text-primary, #0f172a)}.upload-headline .highlight{color:var(--primary-color, #4f46e5);font-weight:700}.upload-subtext{font-family:var(--ngx-font-family, sans-serif);font-size:11px;color:var(--text-secondary, #64748b)}.file-queue-list{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--border-color, #e2e8f0);padding-top:16px}.queue-header{display:flex;justify-content:space-between;align-items:center;font-family:var(--ngx-font-family, sans-serif)}.queue-header h4{margin:0;font-size:13px;font-weight:750;color:var(--text-primary, #0f172a);text-transform:uppercase;letter-spacing:.5px}.clear-all-btn{background:transparent;border:none;color:#ef4444;font-size:11px;font-weight:700;cursor:pointer;padding:2px 6px;border-radius:4px;transition:background .2s}.clear-all-btn:hover{background:#ef44440d}.queue-items{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto;padding-right:4px}.queue-item-card{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border-color, #e2e8f0);border-radius:8px;background:var(--bg-secondary, #ffffff);transition:all .2s}.queue-item-card:hover{border-color:var(--text-secondary, #94a3b8);box-shadow:var(--shadow-sm)}.queue-item-card.success{border-color:#10b9814d;background:#10b98101}.queue-item-card.error{border-color:#ef44444d;background:#ef444401}.item-icon{color:var(--text-secondary, #64748b);display:flex;align-items:center;justify-content:center}.file-icon-svg{width:20px;height:20px}.item-details{flex:1;display:flex;flex-direction:column;gap:4px;overflow:hidden;font-family:var(--ngx-font-family, sans-serif)}.item-meta{display:flex;justify-content:space-between;gap:8px}.item-name{font-size:13px;font-weight:600;color:var(--text-primary, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-size{font-size:11px;color:var(--text-secondary, #64748b);white-space:nowrap}.item-progress-wrap{display:flex;align-items:center;gap:8px}.progress-track{flex:1;height:4px;background:var(--border-light, #f1f5f9);border-radius:2px;overflow:hidden}.progress-bar-fill{height:100%;background:var(--primary-color, #4f46e5);border-radius:2px;transition:width .15s}.progress-text{font-size:10px;font-weight:700;color:var(--text-secondary, #475569);min-width:28px;text-align:right}.item-error-msg{font-size:11px;color:#ef4444;font-weight:600}.item-status-badge{font-size:10px;font-weight:700;border-radius:4px;padding:1px 6px;width:fit-content}.item-status-badge.success{background:#10b9811a;color:#10b981}.item-actions{display:flex;gap:6px}.action-btn{background:transparent;border:none;font-size:12px;cursor:pointer;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #64748b);transition:background .2s,color .2s}.action-btn:hover{background:var(--border-light, #f1f5f9);color:var(--text-primary, #0f172a)}.action-btn.remove-btn:hover{color:#ef4444;background:#ef44440d}.file-upload-wrapper.dark{background:#0f172a;border-color:#1f2937}.file-upload-wrapper.dark .dropzone-area{border-color:#374151}.file-upload-wrapper.dark .dropzone-area:hover{border-color:var(--primary-color, #6366f1);background:#6366f105}.file-upload-wrapper.dark .upload-icon-circle{background:#1e293b;color:#94a3b8}.file-upload-wrapper.dark .dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #6366f1);color:#fff}.file-upload-wrapper.dark .upload-headline{color:#e2e8f0}.file-upload-wrapper.dark .upload-headline .highlight{color:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .upload-subtext{color:#94a3b8}.file-upload-wrapper.dark .file-queue-list{border-top-color:#1f2937}.file-upload-wrapper.dark .queue-header h4{color:#e2e8f0}.file-upload-wrapper.dark .queue-item-card{border-color:#1f2937;background:#111827}.file-upload-wrapper.dark .queue-item-card:hover{border-color:#4b5563}.file-upload-wrapper.dark .queue-item-card.success{border-color:#10b98133}.file-upload-wrapper.dark .queue-item-card.error{border-color:#ef444433}.file-upload-wrapper.dark .item-name{color:#e2e8f0}.file-upload-wrapper.dark .item-size{color:#94a3b8}.file-upload-wrapper.dark .progress-track{background:#1e293b}.file-upload-wrapper.dark .progress-bar-fill{background:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .progress-text{color:#94a3b8}.file-upload-wrapper.dark .action-btn:hover{background:#1e293b;color:#f8fafc}.file-upload-wrapper.dark .action-btn.remove-btn:hover{background:#ef44441a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
2750
3366
|
}
|
|
2751
3367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
2752
3368
|
type: Component,
|
|
@@ -2764,6 +3380,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
2764
3380
|
(dragleave)="onDragLeave($event)"
|
|
2765
3381
|
(drop)="onDrop($event)"
|
|
2766
3382
|
(click)="fileInput.click()"
|
|
3383
|
+
(keydown)="onDropzoneKeyDown($event)"
|
|
3384
|
+
[attr.tabindex]="disabled() ? -1 : 0"
|
|
3385
|
+
role="button"
|
|
3386
|
+
[attr.aria-disabled]="disabled()"
|
|
3387
|
+
aria-label="Upload files"
|
|
2767
3388
|
>
|
|
2768
3389
|
<input
|
|
2769
3390
|
#fileInput
|
|
@@ -2856,7 +3477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
2856
3477
|
</div>
|
|
2857
3478
|
}
|
|
2858
3479
|
</div>
|
|
2859
|
-
`, styles: [":host{display:block;width:100%}.file-upload-wrapper{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:var(--radius-md, 10px);padding:16px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:16px;transition:all .25s}.file-upload-wrapper.drag-over{border-color:var(--primary-color, #4f46e5);background:#4f46e503}.file-upload-wrapper.disabled{opacity:.65;pointer-events:none}.dropzone-area{border:2px dashed var(--border-color, #cbd5e1);border-radius:var(--radius-md, 10px);padding:32px 20px;text-align:center;cursor:pointer;background:#00000001;transition:all .2s ease-in-out;position:relative}.dropzone-area:hover{border-color:var(--primary-color, #4f46e5);background:#4f46e505}.drag-over .dropzone-area{border-color:var(--primary-color, #4f46e5);background:#4f46e50d}.hidden-file-input{display:none}.dropzone-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;-webkit-user-select:none;user-select:none}.upload-icon-circle{width:44px;height:44px;border-radius:50%;background:var(--border-light, #f1f5f9);display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #475569);transition:all .2s}.dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #4f46e5);color:#fff;transform:scale(1.05)}.upload-arrow-svg{width:20px;height:20px}.upload-headline{font-family:var(--ngx-font-family, sans-serif);font-size:14px;font-weight:550;color:var(--text-primary, #0f172a)}.upload-headline .highlight{color:var(--primary-color, #4f46e5);font-weight:700}.upload-subtext{font-family:var(--ngx-font-family, sans-serif);font-size:11px;color:var(--text-secondary, #64748b)}.file-queue-list{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--border-color, #e2e8f0);padding-top:16px}.queue-header{display:flex;justify-content:space-between;align-items:center;font-family:var(--ngx-font-family, sans-serif)}.queue-header h4{margin:0;font-size:13px;font-weight:750;color:var(--text-primary, #0f172a);text-transform:uppercase;letter-spacing:.5px}.clear-all-btn{background:transparent;border:none;color:#ef4444;font-size:11px;font-weight:700;cursor:pointer;padding:2px 6px;border-radius:4px;transition:background .2s}.clear-all-btn:hover{background:#ef44440d}.queue-items{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto;padding-right:4px}.queue-item-card{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border-color, #e2e8f0);border-radius:8px;background:var(--bg-secondary, #ffffff);transition:all .2s}.queue-item-card:hover{border-color:var(--text-secondary, #94a3b8);box-shadow:var(--shadow-sm)}.queue-item-card.success{border-color:#10b9814d;background:#10b98101}.queue-item-card.error{border-color:#ef44444d;background:#ef444401}.item-icon{color:var(--text-secondary, #64748b);display:flex;align-items:center;justify-content:center}.file-icon-svg{width:20px;height:20px}.item-details{flex:1;display:flex;flex-direction:column;gap:4px;overflow:hidden;font-family:var(--ngx-font-family, sans-serif)}.item-meta{display:flex;justify-content:space-between;gap:8px}.item-name{font-size:13px;font-weight:600;color:var(--text-primary, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-size{font-size:11px;color:var(--text-secondary, #64748b);white-space:nowrap}.item-progress-wrap{display:flex;align-items:center;gap:8px}.progress-track{flex:1;height:4px;background:var(--border-light, #f1f5f9);border-radius:2px;overflow:hidden}.progress-bar-fill{height:100%;background:var(--primary-color, #4f46e5);border-radius:2px;transition:width .15s}.progress-text{font-size:10px;font-weight:700;color:var(--text-secondary, #475569);min-width:28px;text-align:right}.item-error-msg{font-size:11px;color:#ef4444;font-weight:600}.item-status-badge{font-size:10px;font-weight:700;border-radius:4px;padding:1px 6px;width:fit-content}.item-status-badge.success{background:#10b9811a;color:#10b981}.item-actions{display:flex;gap:6px}.action-btn{background:transparent;border:none;font-size:12px;cursor:pointer;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #64748b);transition:background .2s,color .2s}.action-btn:hover{background:var(--border-light, #f1f5f9);color:var(--text-primary, #0f172a)}.action-btn.remove-btn:hover{color:#ef4444;background:#ef44440d}.file-upload-wrapper.dark{background:#0f172a;border-color:#1f2937}.file-upload-wrapper.dark .dropzone-area{border-color:#374151}.file-upload-wrapper.dark .dropzone-area:hover{border-color:var(--primary-color, #6366f1);background:#6366f105}.file-upload-wrapper.dark .upload-icon-circle{background:#1e293b;color:#94a3b8}.file-upload-wrapper.dark .dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #6366f1);color:#fff}.file-upload-wrapper.dark .upload-headline{color:#e2e8f0}.file-upload-wrapper.dark .upload-headline .highlight{color:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .upload-subtext{color:#94a3b8}.file-upload-wrapper.dark .file-queue-list{border-top-color:#1f2937}.file-upload-wrapper.dark .queue-header h4{color:#e2e8f0}.file-upload-wrapper.dark .queue-item-card{border-color:#1f2937;background:#111827}.file-upload-wrapper.dark .queue-item-card:hover{border-color:#4b5563}.file-upload-wrapper.dark .queue-item-card.success{border-color:#10b98133}.file-upload-wrapper.dark .queue-item-card.error{border-color:#ef444433}.file-upload-wrapper.dark .item-name{color:#e2e8f0}.file-upload-wrapper.dark .item-size{color:#94a3b8}.file-upload-wrapper.dark .progress-track{background:#1e293b}.file-upload-wrapper.dark .progress-bar-fill{background:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .progress-text{color:#94a3b8}.file-upload-wrapper.dark .action-btn:hover{background:#1e293b;color:#f8fafc}.file-upload-wrapper.dark .action-btn.remove-btn:hover{background:#ef44441a}\n"] }]
|
|
3480
|
+
`, styles: [":host{display:block;width:100%}.file-upload-wrapper{background:var(--bg-secondary, #ffffff);border:1px solid var(--border-color, #e2e8f0);border-radius:var(--radius-md, 10px);padding:16px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:16px;transition:all .25s}.file-upload-wrapper.drag-over{border-color:var(--primary-color, #4f46e5);background:#4f46e503}.file-upload-wrapper.disabled{opacity:.65;pointer-events:none}.dropzone-area{border:2px dashed var(--border-color, #cbd5e1);border-radius:var(--radius-md, 10px);padding:32px 20px;text-align:center;cursor:pointer;background:#00000001;transition:all .2s ease-in-out;position:relative}.dropzone-area:hover{border-color:var(--primary-color, #4f46e5);background:#4f46e505}.dropzone-area:focus-visible{outline:2px dashed var(--primary-color, #4f46e5);outline-offset:2px;border-color:var(--primary-color, #4f46e5);background:#4f46e505}.drag-over .dropzone-area{border-color:var(--primary-color, #4f46e5);background:#4f46e50d}.hidden-file-input{display:none}.dropzone-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;-webkit-user-select:none;user-select:none}.upload-icon-circle{width:44px;height:44px;border-radius:50%;background:var(--border-light, #f1f5f9);display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #475569);transition:all .2s}.dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #4f46e5);color:#fff;transform:scale(1.05)}.upload-arrow-svg{width:20px;height:20px}.upload-headline{font-family:var(--ngx-font-family, sans-serif);font-size:14px;font-weight:550;color:var(--text-primary, #0f172a)}.upload-headline .highlight{color:var(--primary-color, #4f46e5);font-weight:700}.upload-subtext{font-family:var(--ngx-font-family, sans-serif);font-size:11px;color:var(--text-secondary, #64748b)}.file-queue-list{display:flex;flex-direction:column;gap:12px;border-top:1px solid var(--border-color, #e2e8f0);padding-top:16px}.queue-header{display:flex;justify-content:space-between;align-items:center;font-family:var(--ngx-font-family, sans-serif)}.queue-header h4{margin:0;font-size:13px;font-weight:750;color:var(--text-primary, #0f172a);text-transform:uppercase;letter-spacing:.5px}.clear-all-btn{background:transparent;border:none;color:#ef4444;font-size:11px;font-weight:700;cursor:pointer;padding:2px 6px;border-radius:4px;transition:background .2s}.clear-all-btn:hover{background:#ef44440d}.queue-items{display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto;padding-right:4px}.queue-item-card{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border-color, #e2e8f0);border-radius:8px;background:var(--bg-secondary, #ffffff);transition:all .2s}.queue-item-card:hover{border-color:var(--text-secondary, #94a3b8);box-shadow:var(--shadow-sm)}.queue-item-card.success{border-color:#10b9814d;background:#10b98101}.queue-item-card.error{border-color:#ef44444d;background:#ef444401}.item-icon{color:var(--text-secondary, #64748b);display:flex;align-items:center;justify-content:center}.file-icon-svg{width:20px;height:20px}.item-details{flex:1;display:flex;flex-direction:column;gap:4px;overflow:hidden;font-family:var(--ngx-font-family, sans-serif)}.item-meta{display:flex;justify-content:space-between;gap:8px}.item-name{font-size:13px;font-weight:600;color:var(--text-primary, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-size{font-size:11px;color:var(--text-secondary, #64748b);white-space:nowrap}.item-progress-wrap{display:flex;align-items:center;gap:8px}.progress-track{flex:1;height:4px;background:var(--border-light, #f1f5f9);border-radius:2px;overflow:hidden}.progress-bar-fill{height:100%;background:var(--primary-color, #4f46e5);border-radius:2px;transition:width .15s}.progress-text{font-size:10px;font-weight:700;color:var(--text-secondary, #475569);min-width:28px;text-align:right}.item-error-msg{font-size:11px;color:#ef4444;font-weight:600}.item-status-badge{font-size:10px;font-weight:700;border-radius:4px;padding:1px 6px;width:fit-content}.item-status-badge.success{background:#10b9811a;color:#10b981}.item-actions{display:flex;gap:6px}.action-btn{background:transparent;border:none;font-size:12px;cursor:pointer;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-secondary, #64748b);transition:background .2s,color .2s}.action-btn:hover{background:var(--border-light, #f1f5f9);color:var(--text-primary, #0f172a)}.action-btn.remove-btn:hover{color:#ef4444;background:#ef44440d}.file-upload-wrapper.dark{background:#0f172a;border-color:#1f2937}.file-upload-wrapper.dark .dropzone-area{border-color:#374151}.file-upload-wrapper.dark .dropzone-area:hover{border-color:var(--primary-color, #6366f1);background:#6366f105}.file-upload-wrapper.dark .upload-icon-circle{background:#1e293b;color:#94a3b8}.file-upload-wrapper.dark .dropzone-area:hover .upload-icon-circle{background:var(--primary-color, #6366f1);color:#fff}.file-upload-wrapper.dark .upload-headline{color:#e2e8f0}.file-upload-wrapper.dark .upload-headline .highlight{color:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .upload-subtext{color:#94a3b8}.file-upload-wrapper.dark .file-queue-list{border-top-color:#1f2937}.file-upload-wrapper.dark .queue-header h4{color:#e2e8f0}.file-upload-wrapper.dark .queue-item-card{border-color:#1f2937;background:#111827}.file-upload-wrapper.dark .queue-item-card:hover{border-color:#4b5563}.file-upload-wrapper.dark .queue-item-card.success{border-color:#10b98133}.file-upload-wrapper.dark .queue-item-card.error{border-color:#ef444433}.file-upload-wrapper.dark .item-name{color:#e2e8f0}.file-upload-wrapper.dark .item-size{color:#94a3b8}.file-upload-wrapper.dark .progress-track{background:#1e293b}.file-upload-wrapper.dark .progress-bar-fill{background:var(--primary-color, #6366f1)}.file-upload-wrapper.dark .progress-text{color:#94a3b8}.file-upload-wrapper.dark .action-btn:hover{background:#1e293b;color:#f8fafc}.file-upload-wrapper.dark .action-btn.remove-btn:hover{background:#ef44441a}\n"] }]
|
|
2860
3481
|
}] });
|
|
2861
3482
|
|
|
2862
3483
|
class TagInputComponent {
|