@cdevhub/ngx-tw 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +264 -49
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-alert.mjs +43 -29
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs +103 -0
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +56 -31
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +61 -35
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +154 -93
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +35 -22
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +3 -3
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +416 -216
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +152 -81
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +99 -47
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +42 -29
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +46 -29
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +205 -110
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +141 -74
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs +16 -11
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +395 -149
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +305 -150
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +56 -43
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +51 -33
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +905 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +49 -26
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +133 -74
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +28 -17
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +37 -21
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +63 -48
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs +622 -0
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +142 -72
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +101 -46
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +57 -30
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +108 -57
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +46 -26
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +227 -122
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +21 -12
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +58 -44
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +25 -14
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +155 -79
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +47 -25
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs +29 -16
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -42
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +107 -64
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +113 -47
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +61 -32
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +88 -42
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-table.mjs +266 -118
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +102 -52
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +798 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +16 -8
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +22 -14
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +243 -95
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +149 -82
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +100 -55
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +50 -28
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs +1129 -0
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs +554 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw.mjs +7 -0
- package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -1
- package/package.json +45 -17
- package/theme/_dark.css +16 -12
- package/theme/_semantic.css +3 -2
- package/theme/index.css +10 -2
- package/types/cdevhub-ngx-tw-aspect-ratio.d.ts +40 -0
- package/types/cdevhub-ngx-tw-calendar.d.ts +39 -8
- package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
- package/types/cdevhub-ngx-tw-command-palette.d.ts +7 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +36 -10
- package/types/cdevhub-ngx-tw-file-upload.d.ts +250 -0
- package/types/cdevhub-ngx-tw-form-field.d.ts +22 -3
- package/types/cdevhub-ngx-tw-icon-lucide.d.ts +21 -3
- package/types/cdevhub-ngx-tw-number-input.d.ts +130 -0
- package/types/cdevhub-ngx-tw-popover.d.ts +8 -0
- package/types/cdevhub-ngx-tw-select.d.ts +1 -1
- package/types/cdevhub-ngx-tw-stepper.d.ts +30 -2
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +8 -0
- package/types/cdevhub-ngx-tw-table.d.ts +30 -1
- package/types/cdevhub-ngx-tw-tabs.d.ts +8 -0
- package/types/cdevhub-ngx-tw-tags-input.d.ts +217 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +31 -6
- package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
- package/types/cdevhub-ngx-tw-transfer.d.ts +330 -0
- package/types/cdevhub-ngx-tw-tree.d.ts +189 -0
- package/types/cdevhub-ngx-tw.d.ts +7 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, ElementRef, computed, isDevMode, Directive, input, contentChild, contentChildren, viewChild, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, computed, isDevMode, Directive, input, contentChild, contentChildren, viewChild, signal, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { tv } from 'tailwind-variants';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -26,6 +26,14 @@ class FormFieldControl {
|
|
|
26
26
|
* `providers: [{ provide: TW_FORM_FIELD_CONTROL, useExisting: MyControl }]`.
|
|
27
27
|
*/
|
|
28
28
|
const TW_FORM_FIELD_CONTROL = new InjectionToken('TW_FORM_FIELD_CONTROL');
|
|
29
|
+
/**
|
|
30
|
+
* Injection token exposing the wrapping {@link TwFormFieldParent}. The
|
|
31
|
+
* {@link FormFieldComponent} provides itself under this token; controls inject
|
|
32
|
+
* it with `{ optional: true }` to detect (and read label state from) a parent
|
|
33
|
+
* `tw-form-field` without referencing the concrete component class — keeping the
|
|
34
|
+
* form-field component out of each control's bundle.
|
|
35
|
+
*/
|
|
36
|
+
const TW_FORM_FIELD = new InjectionToken('TW_FORM_FIELD');
|
|
29
37
|
// ── Unique ID counters ──
|
|
30
38
|
let nextLabelId = 0;
|
|
31
39
|
let nextHintId = 0;
|
|
@@ -176,9 +184,11 @@ class LabelDirective {
|
|
|
176
184
|
/** @internal */
|
|
177
185
|
id = `tw-form-field-label-${nextLabelId++}`;
|
|
178
186
|
/** @internal */
|
|
179
|
-
controlId = computed(() => this.formField.control()?.id() ?? null,
|
|
187
|
+
controlId = computed(() => this.formField.control()?.id() ?? null, /* @ts-ignore */
|
|
188
|
+
...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
|
|
180
189
|
/** @internal */
|
|
181
|
-
classes = computed(() => this.formField.labelClasses(),
|
|
190
|
+
classes = computed(() => this.formField.labelClasses(), /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
182
192
|
constructor() {
|
|
183
193
|
if (isDevMode()) {
|
|
184
194
|
const tag = this.elementRef.nativeElement.tagName;
|
|
@@ -187,10 +197,10 @@ class LabelDirective {
|
|
|
187
197
|
}
|
|
188
198
|
}
|
|
189
199
|
}
|
|
190
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
191
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
201
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: LabelDirective, isStandalone: true, selector: "[twLabel]", host: { properties: { "attr.id": "id", "attr.for": "controlId()", "class": "classes()" } }, ngImport: i0 });
|
|
192
202
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LabelDirective, decorators: [{
|
|
194
204
|
type: Directive,
|
|
195
205
|
args: [{
|
|
196
206
|
selector: '[twLabel]',
|
|
@@ -207,18 +217,21 @@ class HintDirective {
|
|
|
207
217
|
/** @internal */
|
|
208
218
|
id = `tw-form-field-hint-${nextHintId++}`;
|
|
209
219
|
/** Alignment within the subscript row. `'end'` pushes the hint to the right. When unset, the form-field's `hintAlign` input supplies the default. */
|
|
210
|
-
align = input(undefined,
|
|
220
|
+
align = input(undefined, /* @ts-ignore */
|
|
221
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
211
222
|
/** @internal */
|
|
212
|
-
effectiveAlign = computed(() => this.align() ?? this.formField.hintAlign(),
|
|
223
|
+
effectiveAlign = computed(() => this.align() ?? this.formField.hintAlign(), /* @ts-ignore */
|
|
224
|
+
...(ngDevMode ? [{ debugName: "effectiveAlign" }] : /* istanbul ignore next */ []));
|
|
213
225
|
/** @internal */
|
|
214
226
|
classes = computed(() => {
|
|
215
227
|
const base = this.formField.hintClasses();
|
|
216
228
|
return this.effectiveAlign() === 'end' ? `${base} ml-auto` : base;
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
static
|
|
229
|
+
}, /* @ts-ignore */
|
|
230
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
232
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: HintDirective, isStandalone: true, selector: "[twHint]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id", "class": "classes()" } }, ngImport: i0 });
|
|
220
233
|
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: HintDirective, decorators: [{
|
|
222
235
|
type: Directive,
|
|
223
236
|
args: [{
|
|
224
237
|
selector: '[twHint]',
|
|
@@ -234,20 +247,23 @@ class ErrorDirective {
|
|
|
234
247
|
/** @internal */
|
|
235
248
|
id = `tw-form-field-error-${nextErrorId++}`;
|
|
236
249
|
/** Validation error key this message is bound to (e.g. `'required'`, `'email'`, `'minlength'`). When set, the error renders only while the surrounding control reports that key in its active validation errors. When omitted, the error displays whenever the form-field is in an error state — useful as a generic fallback. */
|
|
237
|
-
match = input(undefined,
|
|
250
|
+
match = input(undefined, /* @ts-ignore */
|
|
251
|
+
...(ngDevMode ? [{ debugName: "match" }] : /* istanbul ignore next */ []));
|
|
238
252
|
/** @internal Whether this error should display given the control's active error keys. */
|
|
239
253
|
shouldShow = computed(() => {
|
|
240
254
|
const key = this.match();
|
|
241
255
|
if (!key)
|
|
242
256
|
return true;
|
|
243
257
|
return this.formField.activeErrorKeys().has(key);
|
|
244
|
-
},
|
|
258
|
+
}, /* @ts-ignore */
|
|
259
|
+
...(ngDevMode ? [{ debugName: "shouldShow" }] : /* istanbul ignore next */ []));
|
|
245
260
|
/** @internal */
|
|
246
|
-
classes = computed(() => this.formField.errorClasses(),
|
|
247
|
-
|
|
248
|
-
static
|
|
261
|
+
classes = computed(() => this.formField.errorClasses(), /* @ts-ignore */
|
|
262
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
263
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
264
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: ErrorDirective, isStandalone: true, selector: "[twError]", inputs: { match: { classPropertyName: "match", publicName: "match", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "alert", "aria-live": "polite" }, properties: { "attr.id": "id", "class": "classes()", "class.hidden": "!shouldShow()" } }, ngImport: i0 });
|
|
249
265
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: ErrorDirective, decorators: [{
|
|
251
267
|
type: Directive,
|
|
252
268
|
args: [{
|
|
253
269
|
selector: '[twError]',
|
|
@@ -266,11 +282,12 @@ class PrefixDirective {
|
|
|
266
282
|
/** @internal Used by the form-field to measure the prefix area and align the resting label after it. */
|
|
267
283
|
elementRef = inject((ElementRef));
|
|
268
284
|
/** @internal */
|
|
269
|
-
prefixClasses = computed(() => this.formField.prefixClasses(),
|
|
270
|
-
|
|
271
|
-
static
|
|
285
|
+
prefixClasses = computed(() => this.formField.prefixClasses(), /* @ts-ignore */
|
|
286
|
+
...(ngDevMode ? [{ debugName: "prefixClasses" }] : /* istanbul ignore next */ []));
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
288
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: PrefixDirective, isStandalone: true, selector: "[twPrefix]", host: { properties: { "class": "prefixClasses()" } }, ngImport: i0 });
|
|
272
289
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PrefixDirective, decorators: [{
|
|
274
291
|
type: Directive,
|
|
275
292
|
args: [{
|
|
276
293
|
selector: '[twPrefix]',
|
|
@@ -283,11 +300,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
283
300
|
class SuffixDirective {
|
|
284
301
|
formField = inject(FormFieldComponent);
|
|
285
302
|
/** @internal */
|
|
286
|
-
suffixClasses = computed(() => this.formField.suffixClasses(),
|
|
287
|
-
|
|
288
|
-
static
|
|
303
|
+
suffixClasses = computed(() => this.formField.suffixClasses(), /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "suffixClasses" }] : /* istanbul ignore next */ []));
|
|
305
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
306
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SuffixDirective, isStandalone: true, selector: "[twSuffix]", host: { properties: { "class": "suffixClasses()" } }, ngImport: i0 });
|
|
289
307
|
}
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SuffixDirective, decorators: [{
|
|
291
309
|
type: Directive,
|
|
292
310
|
args: [{
|
|
293
311
|
selector: '[twSuffix]',
|
|
@@ -304,11 +322,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
304
322
|
// when computing the resting-label offset.
|
|
305
323
|
class PrefixIconDirective extends PrefixDirective {
|
|
306
324
|
/** @internal */
|
|
307
|
-
prefixClasses = computed(() => `${this.formField.prefixClasses()} size-5`,
|
|
308
|
-
|
|
309
|
-
static
|
|
325
|
+
prefixClasses = computed(() => `${this.formField.prefixClasses()} size-5`, /* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [{ debugName: "prefixClasses" }] : /* istanbul ignore next */ []));
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PrefixIconDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
328
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: PrefixIconDirective, isStandalone: true, selector: "[twPrefixIcon]", host: { properties: { "class": "prefixClasses()" } }, providers: [{ provide: PrefixDirective, useExisting: PrefixIconDirective }], usesInheritance: true, ngImport: i0 });
|
|
310
329
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PrefixIconDirective, decorators: [{
|
|
312
331
|
type: Directive,
|
|
313
332
|
args: [{
|
|
314
333
|
selector: '[twPrefixIcon]',
|
|
@@ -320,11 +339,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
320
339
|
}] });
|
|
321
340
|
class SuffixIconDirective extends SuffixDirective {
|
|
322
341
|
/** @internal */
|
|
323
|
-
suffixClasses = computed(() => `${this.formField.suffixClasses()} size-5`,
|
|
324
|
-
|
|
325
|
-
static
|
|
342
|
+
suffixClasses = computed(() => `${this.formField.suffixClasses()} size-5`, /* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [{ debugName: "suffixClasses" }] : /* istanbul ignore next */ []));
|
|
344
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SuffixIconDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
345
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: SuffixIconDirective, isStandalone: true, selector: "[twSuffixIcon]", host: { properties: { "class": "suffixClasses()" } }, providers: [{ provide: SuffixDirective, useExisting: SuffixIconDirective }], usesInheritance: true, ngImport: i0 });
|
|
326
346
|
}
|
|
327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: SuffixIconDirective, decorators: [{
|
|
328
348
|
type: Directive,
|
|
329
349
|
args: [{
|
|
330
350
|
selector: '[twSuffixIcon]',
|
|
@@ -337,19 +357,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
337
357
|
// ── FormFieldComponent ──
|
|
338
358
|
class FormFieldComponent {
|
|
339
359
|
/** Visual appearance of the field container. `'outline'` draws a full border around the control; `'filled'` uses a filled surface with a bottom border. Defaults to `'outline'`. */
|
|
340
|
-
appearance = input('outline',
|
|
360
|
+
appearance = input('outline', /* @ts-ignore */
|
|
361
|
+
...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
341
362
|
/** Density of the field container. Maps to the inline-padding scale (`px-2 py-1` xs … `px-5 py-3` xl) and the floating-label font scale. Defaults to `'md'`. */
|
|
342
|
-
size = input('md',
|
|
363
|
+
size = input('md', /* @ts-ignore */
|
|
364
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
343
365
|
/** Floating label behavior. `'auto'` floats when focused or non-empty; `'always'` stays floated; `'never'` disables floating entirely (the label wrapper is not rendered and the wrapped control's placeholder is always visible). Defaults to `'auto'`. */
|
|
344
|
-
floatLabel = input('auto',
|
|
366
|
+
floatLabel = input('auto', /* @ts-ignore */
|
|
367
|
+
...(ngDevMode ? [{ debugName: "floatLabel" }] : /* istanbul ignore next */ []));
|
|
345
368
|
/** Subscript sizing strategy. `'fixed'` always reserves a 20px row for hints/errors so adjacent fields align; `'dynamic'` collapses the row when no hint/error is projected. Defaults to `'fixed'`. */
|
|
346
|
-
subscriptSizing = input('fixed',
|
|
369
|
+
subscriptSizing = input('fixed', /* @ts-ignore */
|
|
370
|
+
...(ngDevMode ? [{ debugName: "subscriptSizing" }] : /* istanbul ignore next */ []));
|
|
347
371
|
/** Hides the visual required marker (`*`) even when the wrapped control is required. `aria-required` on the control is unaffected. Defaults to `false`. */
|
|
348
|
-
hideRequiredMarker = input(false,
|
|
372
|
+
hideRequiredMarker = input(false, /* @ts-ignore */
|
|
373
|
+
...(ngDevMode ? [{ debugName: "hideRequiredMarker" }] : /* istanbul ignore next */ []));
|
|
349
374
|
/** Semantic color for focused/active accents (focused border, floated label). Defaults to `'primary'`. */
|
|
350
|
-
color = input('primary',
|
|
375
|
+
color = input('primary', /* @ts-ignore */
|
|
376
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
351
377
|
/** Default alignment for a `twHint` element that does not specify its own `align`. Defaults to `'start'`. */
|
|
352
|
-
hintAlign = input('start',
|
|
378
|
+
hintAlign = input('start', /* @ts-ignore */
|
|
379
|
+
...(ngDevMode ? [{ debugName: "hintAlign" }] : /* istanbul ignore next */ []));
|
|
353
380
|
/** @internal */
|
|
354
381
|
control = contentChild(TW_FORM_FIELD_CONTROL, { ...(ngDevMode ? { debugName: "control" } : /* istanbul ignore next */ {}), descendants: true });
|
|
355
382
|
/** @internal */
|
|
@@ -361,23 +388,32 @@ class FormFieldComponent {
|
|
|
361
388
|
/** @internal */
|
|
362
389
|
prefixChildren = contentChildren(PrefixDirective, { ...(ngDevMode ? { debugName: "prefixChildren" } : /* istanbul ignore next */ {}), descendants: true });
|
|
363
390
|
/** @internal */
|
|
364
|
-
infixRef = viewChild('infix',
|
|
391
|
+
infixRef = viewChild('infix', /* @ts-ignore */
|
|
392
|
+
...(ngDevMode ? [{ debugName: "infixRef" }] : /* istanbul ignore next */ []));
|
|
365
393
|
/** @internal */
|
|
366
|
-
hasLabel = computed(() => !!this.labelChild(),
|
|
394
|
+
hasLabel = computed(() => !!this.labelChild(), /* @ts-ignore */
|
|
395
|
+
...(ngDevMode ? [{ debugName: "hasLabel" }] : /* istanbul ignore next */ []));
|
|
367
396
|
/** @internal */
|
|
368
|
-
hasPrefix = computed(() => this.prefixChildren().length > 0,
|
|
397
|
+
hasPrefix = computed(() => this.prefixChildren().length > 0, /* @ts-ignore */
|
|
398
|
+
...(ngDevMode ? [{ debugName: "hasPrefix" }] : /* istanbul ignore next */ []));
|
|
369
399
|
/** @internal Resting-label left offset in pixels, mirroring the infix's `offsetLeft` so the label sits right after any prefix. */
|
|
370
|
-
restingLabelOffset = signal(12,
|
|
400
|
+
restingLabelOffset = signal(12, /* @ts-ignore */
|
|
401
|
+
...(ngDevMode ? [{ debugName: "restingLabelOffset" }] : /* istanbul ignore next */ []));
|
|
371
402
|
/** @internal */
|
|
372
|
-
isFocused = computed(() => !!this.control()?.focused(),
|
|
403
|
+
isFocused = computed(() => !!this.control()?.focused(), /* @ts-ignore */
|
|
404
|
+
...(ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []));
|
|
373
405
|
/** @internal */
|
|
374
|
-
isInvalid = computed(() => !!this.control()?.errorState(),
|
|
406
|
+
isInvalid = computed(() => !!this.control()?.errorState(), /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []));
|
|
375
408
|
/** @internal */
|
|
376
|
-
isDisabled = computed(() => !!this.control()?.disabled(),
|
|
409
|
+
isDisabled = computed(() => !!this.control()?.disabled(), /* @ts-ignore */
|
|
410
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
377
411
|
/** @internal */
|
|
378
|
-
isRequired = computed(() => !!this.control()?.required(),
|
|
412
|
+
isRequired = computed(() => !!this.control()?.required(), /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "isRequired" }] : /* istanbul ignore next */ []));
|
|
379
414
|
/** @internal Whether the floating label wrapper should render at all. `'never'` opts out entirely. */
|
|
380
|
-
shouldRenderLabelWrapper = computed(() => this.hasLabel() && this.floatLabel() !== 'never',
|
|
415
|
+
shouldRenderLabelWrapper = computed(() => this.hasLabel() && this.floatLabel() !== 'never', /* @ts-ignore */
|
|
416
|
+
...(ngDevMode ? [{ debugName: "shouldRenderLabelWrapper" }] : /* istanbul ignore next */ []));
|
|
381
417
|
/** @internal */
|
|
382
418
|
shouldLabelFloat = computed(() => {
|
|
383
419
|
const mode = this.floatLabel();
|
|
@@ -389,32 +425,39 @@ class FormFieldComponent {
|
|
|
389
425
|
if (!ctrl)
|
|
390
426
|
return false;
|
|
391
427
|
return ctrl.focused() || !ctrl.empty();
|
|
392
|
-
},
|
|
428
|
+
}, /* @ts-ignore */
|
|
429
|
+
...(ngDevMode ? [{ debugName: "shouldLabelFloat" }] : /* istanbul ignore next */ []));
|
|
393
430
|
/** @internal Inline `left` value for the label wrapper. Floated labels pin to the container edge; resting labels align with the infix's left (after any prefix). */
|
|
394
|
-
labelLeft = computed(() => this.shouldLabelFloat() ? '0.5rem' : `${this.restingLabelOffset()}px`,
|
|
431
|
+
labelLeft = computed(() => this.shouldLabelFloat() ? '0.5rem' : `${this.restingLabelOffset()}px`, /* @ts-ignore */
|
|
432
|
+
...(ngDevMode ? [{ debugName: "labelLeft" }] : /* istanbul ignore next */ []));
|
|
395
433
|
/** @internal */
|
|
396
|
-
subscriptMode = computed(() => this.isInvalid() && this.errorChildren().length > 0 ? 'error' : 'hint',
|
|
434
|
+
subscriptMode = computed(() => this.isInvalid() && this.errorChildren().length > 0 ? 'error' : 'hint', /* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [{ debugName: "subscriptMode" }] : /* istanbul ignore next */ []));
|
|
397
436
|
/** @internal Set of validation error keys currently active on the bound control (e.g. `Set('required', 'email')`). Empty when the control has no `errors` signal or no active errors. Read by `[twError match="…"]` to decide whether to display. */
|
|
398
437
|
activeErrorKeys = computed(() => {
|
|
399
438
|
const errs = this.control()?.errors?.();
|
|
400
439
|
return new Set(errs ? Object.keys(errs) : []);
|
|
401
|
-
},
|
|
440
|
+
}, /* @ts-ignore */
|
|
441
|
+
...(ngDevMode ? [{ debugName: "activeErrorKeys" }] : /* istanbul ignore next */ []));
|
|
402
442
|
/** @internal Whether the subscript row has anything to render right now. */
|
|
403
443
|
hasSubscriptContent = computed(() => {
|
|
404
444
|
if (this.subscriptMode() === 'error')
|
|
405
445
|
return this.errorChildren().length > 0;
|
|
406
446
|
return this.hintChildren().length > 0;
|
|
407
|
-
},
|
|
447
|
+
}, /* @ts-ignore */
|
|
448
|
+
...(ngDevMode ? [{ debugName: "hasSubscriptContent" }] : /* istanbul ignore next */ []));
|
|
408
449
|
/** @internal Whether the subscript wrapper renders. In `'fixed'` mode it always renders to reserve vertical space; in `'dynamic'` mode it collapses when empty. */
|
|
409
450
|
shouldRenderSubscript = computed(() => {
|
|
410
451
|
if (this.subscriptSizing() === 'fixed')
|
|
411
452
|
return true;
|
|
412
453
|
return this.hasSubscriptContent();
|
|
413
|
-
},
|
|
454
|
+
}, /* @ts-ignore */
|
|
455
|
+
...(ngDevMode ? [{ debugName: "shouldRenderSubscript" }] : /* istanbul ignore next */ []));
|
|
414
456
|
controlTypeClass = computed(() => {
|
|
415
457
|
const type = this.control()?.controlType;
|
|
416
458
|
return type ? `tw-form-field-type-${type}` : '';
|
|
417
|
-
},
|
|
459
|
+
}, /* @ts-ignore */
|
|
460
|
+
...(ngDevMode ? [{ debugName: "controlTypeClass" }] : /* istanbul ignore next */ []));
|
|
418
461
|
variantResult = computed(() => formFieldVariants({
|
|
419
462
|
appearance: this.appearance(),
|
|
420
463
|
size: this.size(),
|
|
@@ -424,15 +467,18 @@ class FormFieldComponent {
|
|
|
424
467
|
labelFloated: this.shouldLabelFloat(),
|
|
425
468
|
subscriptReserve: this.subscriptSizing() === 'fixed',
|
|
426
469
|
disabled: this.isDisabled(),
|
|
427
|
-
}),
|
|
470
|
+
}), /* @ts-ignore */
|
|
471
|
+
...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
|
|
428
472
|
/** @internal */
|
|
429
473
|
rootClasses = computed(() => {
|
|
430
474
|
const base = this.variantResult().root();
|
|
431
475
|
const type = this.controlTypeClass();
|
|
432
476
|
return type ? `${base} ${type}` : base;
|
|
433
|
-
},
|
|
477
|
+
}, /* @ts-ignore */
|
|
478
|
+
...(ngDevMode ? [{ debugName: "rootClasses" }] : /* istanbul ignore next */ []));
|
|
434
479
|
/** @internal */
|
|
435
|
-
controlWrapperClasses = computed(() => this.variantResult().controlWrapper(),
|
|
480
|
+
controlWrapperClasses = computed(() => this.variantResult().controlWrapper(), /* @ts-ignore */
|
|
481
|
+
...(ngDevMode ? [{ debugName: "controlWrapperClasses" }] : /* istanbul ignore next */ []));
|
|
436
482
|
/** @internal */
|
|
437
483
|
infixClasses = computed(() => {
|
|
438
484
|
const base = this.variantResult().infix();
|
|
@@ -442,23 +488,32 @@ class FormFieldComponent {
|
|
|
442
488
|
return hidePlaceholder
|
|
443
489
|
? `${base} [&_input::placeholder]:opacity-0 [&_textarea::placeholder]:opacity-0`
|
|
444
490
|
: base;
|
|
445
|
-
},
|
|
491
|
+
}, /* @ts-ignore */
|
|
492
|
+
...(ngDevMode ? [{ debugName: "infixClasses" }] : /* istanbul ignore next */ []));
|
|
446
493
|
/** @internal */
|
|
447
|
-
labelWrapperClasses = computed(() => this.variantResult().labelWrapper(),
|
|
494
|
+
labelWrapperClasses = computed(() => this.variantResult().labelWrapper(), /* @ts-ignore */
|
|
495
|
+
...(ngDevMode ? [{ debugName: "labelWrapperClasses" }] : /* istanbul ignore next */ []));
|
|
448
496
|
/** @internal */
|
|
449
|
-
labelClasses = computed(() => this.variantResult().label(),
|
|
497
|
+
labelClasses = computed(() => this.variantResult().label(), /* @ts-ignore */
|
|
498
|
+
...(ngDevMode ? [{ debugName: "labelClasses" }] : /* istanbul ignore next */ []));
|
|
450
499
|
/** @internal */
|
|
451
|
-
requiredMarkerClasses = computed(() => this.variantResult().requiredMarker(),
|
|
500
|
+
requiredMarkerClasses = computed(() => this.variantResult().requiredMarker(), /* @ts-ignore */
|
|
501
|
+
...(ngDevMode ? [{ debugName: "requiredMarkerClasses" }] : /* istanbul ignore next */ []));
|
|
452
502
|
/** @internal */
|
|
453
|
-
prefixClasses = computed(() => this.variantResult().prefix(),
|
|
503
|
+
prefixClasses = computed(() => this.variantResult().prefix(), /* @ts-ignore */
|
|
504
|
+
...(ngDevMode ? [{ debugName: "prefixClasses" }] : /* istanbul ignore next */ []));
|
|
454
505
|
/** @internal */
|
|
455
|
-
suffixClasses = computed(() => this.variantResult().suffix(),
|
|
506
|
+
suffixClasses = computed(() => this.variantResult().suffix(), /* @ts-ignore */
|
|
507
|
+
...(ngDevMode ? [{ debugName: "suffixClasses" }] : /* istanbul ignore next */ []));
|
|
456
508
|
/** @internal */
|
|
457
|
-
subscriptWrapperClasses = computed(() => this.variantResult().subscriptWrapper(),
|
|
509
|
+
subscriptWrapperClasses = computed(() => this.variantResult().subscriptWrapper(), /* @ts-ignore */
|
|
510
|
+
...(ngDevMode ? [{ debugName: "subscriptWrapperClasses" }] : /* istanbul ignore next */ []));
|
|
458
511
|
/** @internal */
|
|
459
|
-
hintClasses = computed(() => this.variantResult().hint(),
|
|
512
|
+
hintClasses = computed(() => this.variantResult().hint(), /* @ts-ignore */
|
|
513
|
+
...(ngDevMode ? [{ debugName: "hintClasses" }] : /* istanbul ignore next */ []));
|
|
460
514
|
/** @internal */
|
|
461
|
-
errorClasses = computed(() => this.variantResult().error(),
|
|
515
|
+
errorClasses = computed(() => this.variantResult().error(), /* @ts-ignore */
|
|
516
|
+
...(ngDevMode ? [{ debugName: "errorClasses" }] : /* istanbul ignore next */ []));
|
|
462
517
|
constructor() {
|
|
463
518
|
// Push merged aria-describedby ids to the control whenever hint/error lists, the subscript mode, or per-error `match` visibility change.
|
|
464
519
|
effect(() => {
|
|
@@ -553,20 +608,24 @@ class FormFieldComponent {
|
|
|
553
608
|
_onContainerClick(event) {
|
|
554
609
|
this.control()?.onContainerClick(event);
|
|
555
610
|
}
|
|
556
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
557
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
611
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
612
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: FormFieldComponent, isStandalone: true, selector: "tw-form-field", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, subscriptSizing: { classPropertyName: "subscriptSizing", publicName: "subscriptSizing", isSignal: true, isRequired: false, transformFunction: null }, hideRequiredMarker: { classPropertyName: "hideRequiredMarker", publicName: "hideRequiredMarker", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, hintAlign: { classPropertyName: "hintAlign", publicName: "hintAlign", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_onContainerClick($event)" }, properties: { "class": "rootClasses()" } }, providers: [
|
|
613
|
+
{ provide: TW_FORM_FIELD, useExisting: forwardRef(() => FormFieldComponent) },
|
|
614
|
+
], queries: [{ propertyName: "control", first: true, predicate: TW_FORM_FIELD_CONTROL, descendants: true, isSignal: true }, { propertyName: "labelChild", first: true, predicate: LabelDirective, descendants: true, isSignal: true }, { propertyName: "hintChildren", predicate: HintDirective, descendants: true, isSignal: true }, { propertyName: "errorChildren", predicate: ErrorDirective, descendants: true, isSignal: true }, { propertyName: "prefixChildren", predicate: PrefixDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "infixRef", first: true, predicate: ["infix"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"controlWrapperClasses()\">\n <ng-content select=\"[twPrefix]\" />\n <ng-content select=\"[twPrefixIcon]\" />\n <div #infix [class]=\"infixClasses()\">\n <ng-content />\n </div>\n <ng-content select=\"[twSuffix]\" />\n <ng-content select=\"[twSuffixIcon]\" />\n @if (shouldRenderLabelWrapper()) {\n <div [class]=\"labelWrapperClasses()\" [style.left]=\"labelLeft()\">\n <ng-content select=\"[twLabel]\" />\n @if (!hideRequiredMarker() && isRequired()) {\n <span [class]=\"requiredMarkerClasses()\" aria-hidden=\"true\">*</span>\n }\n </div>\n }\n</div>\n\n@if (shouldRenderSubscript()) {\n <div [class]=\"subscriptWrapperClasses()\">\n @if (subscriptMode() === 'error') {\n <ng-content select=\"[twError]\" />\n } @else {\n <ng-content select=\"[twHint]\" />\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
558
615
|
}
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
560
617
|
type: Component,
|
|
561
618
|
args: [{ selector: 'tw-form-field', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
562
619
|
'[class]': 'rootClasses()',
|
|
563
620
|
'(click)': '_onContainerClick($event)',
|
|
564
|
-
},
|
|
621
|
+
}, providers: [
|
|
622
|
+
{ provide: TW_FORM_FIELD, useExisting: forwardRef(() => FormFieldComponent) },
|
|
623
|
+
], template: "<div [class]=\"controlWrapperClasses()\">\n <ng-content select=\"[twPrefix]\" />\n <ng-content select=\"[twPrefixIcon]\" />\n <div #infix [class]=\"infixClasses()\">\n <ng-content />\n </div>\n <ng-content select=\"[twSuffix]\" />\n <ng-content select=\"[twSuffixIcon]\" />\n @if (shouldRenderLabelWrapper()) {\n <div [class]=\"labelWrapperClasses()\" [style.left]=\"labelLeft()\">\n <ng-content select=\"[twLabel]\" />\n @if (!hideRequiredMarker() && isRequired()) {\n <span [class]=\"requiredMarkerClasses()\" aria-hidden=\"true\">*</span>\n }\n </div>\n }\n</div>\n\n@if (shouldRenderSubscript()) {\n <div [class]=\"subscriptWrapperClasses()\">\n @if (subscriptMode() === 'error') {\n <ng-content select=\"[twError]\" />\n } @else {\n <ng-content select=\"[twHint]\" />\n }\n </div>\n}\n" }]
|
|
565
624
|
}], ctorParameters: () => [], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], subscriptSizing: [{ type: i0.Input, args: [{ isSignal: true, alias: "subscriptSizing", required: false }] }], hideRequiredMarker: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideRequiredMarker", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], hintAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintAlign", required: false }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TW_FORM_FIELD_CONTROL), { ...{ descendants: true }, isSignal: true }] }], labelChild: [{ type: i0.ContentChild, args: [i0.forwardRef(() => LabelDirective), { ...{ descendants: true }, isSignal: true }] }], hintChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => HintDirective), { ...{ descendants: true }, isSignal: true }] }], errorChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ErrorDirective), { ...{ descendants: true }, isSignal: true }] }], prefixChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrefixDirective), { ...{ descendants: true }, isSignal: true }] }], infixRef: [{ type: i0.ViewChild, args: ['infix', { isSignal: true }] }] } });
|
|
566
625
|
|
|
567
626
|
/**
|
|
568
627
|
* Generated bundle index. Do not edit.
|
|
569
628
|
*/
|
|
570
629
|
|
|
571
|
-
export { ErrorDirective, FormFieldComponent, FormFieldControl, HintDirective, LabelDirective, PrefixDirective, PrefixIconDirective, SuffixDirective, SuffixIconDirective, TW_FORM_FIELD_CONTROL };
|
|
630
|
+
export { ErrorDirective, FormFieldComponent, FormFieldControl, HintDirective, LabelDirective, PrefixDirective, PrefixIconDirective, SuffixDirective, SuffixIconDirective, TW_FORM_FIELD, TW_FORM_FIELD_CONTROL };
|
|
572
631
|
//# sourceMappingURL=cdevhub-ngx-tw-form-field.mjs.map
|