@tedi-design-system/angular 6.2.0-rc.12 → 6.2.0-rc.13
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/community/components/form/input/input.component.d.ts +3 -0
- package/community/components/form/input/input.component.d.ts.map +1 -1
- package/fesm2022/tedi-design-system-angular-community.mjs +3 -0
- package/fesm2022/tedi-design-system-angular-community.mjs.map +1 -1
- package/fesm2022/tedi-design-system-angular-tedi.mjs +203 -9
- package/fesm2022/tedi-design-system-angular-tedi.mjs.map +1 -1
- package/package.json +1 -1
- package/tedi/components/form/form-field/form-field-control.d.ts +31 -0
- package/tedi/components/form/form-field/form-field-control.d.ts.map +1 -0
- package/tedi/components/form/form-field/form-field.component.d.ts +57 -0
- package/tedi/components/form/form-field/form-field.component.d.ts.map +1 -0
- package/tedi/components/form/index.d.ts +2 -0
- package/tedi/components/form/index.d.ts.map +1 -1
- package/tedi/components/form/text-field/text-field.component.d.ts +38 -0
- package/tedi/components/form/text-field/text-field.component.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InjectionToken, Signal } from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Interface implemented by controls that can be used inside `tedi-form-field`.
|
|
4
|
+
* Allows the form field container to interact with the underlying control.
|
|
5
|
+
*/
|
|
6
|
+
export interface FormFieldControl<T = unknown> {
|
|
7
|
+
/**
|
|
8
|
+
* Current value of the control.
|
|
9
|
+
*/
|
|
10
|
+
value: Signal<T>;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the control is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled: Signal<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the control is currently in an invalid state.
|
|
17
|
+
* Usually derived from Angular form validation state.
|
|
18
|
+
*/
|
|
19
|
+
invalid: Signal<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Optional method used by the form field clear button.
|
|
22
|
+
* If implemented, the form field can trigger clearing the value.
|
|
23
|
+
*/
|
|
24
|
+
clearField?(): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Injection token used by `tedi-form-field` to obtain
|
|
28
|
+
* the associated control instance.
|
|
29
|
+
*/
|
|
30
|
+
export declare const TEDI_FORM_FIELD_CONTROL: InjectionToken<FormFieldControl<unknown>>;
|
|
31
|
+
//# sourceMappingURL=form-field-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field-control.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/form/form-field/form-field-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAEzB;;;OAGG;IACH,UAAU,CAAC,IAAI,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,2CAEnC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { FormFieldControl } from "./form-field-control";
|
|
2
|
+
import { IconColor, IconSize, IconType, IconVariant } from "../../../components/base/icon/icon.component";
|
|
3
|
+
import { FeedbackTextComponent } from "../feedback-text/feedback-text.component";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type InputSize = "small" | "large" | "default";
|
|
6
|
+
export type InputState = "valid" | "error" | "default";
|
|
7
|
+
type ValidationState = "invalid" | "valid" | "neutral";
|
|
8
|
+
export interface FormFieldIcon {
|
|
9
|
+
name: string;
|
|
10
|
+
size?: IconSize;
|
|
11
|
+
color?: IconColor;
|
|
12
|
+
type?: IconType;
|
|
13
|
+
variant?: IconVariant;
|
|
14
|
+
}
|
|
15
|
+
export declare class FormFieldComponent {
|
|
16
|
+
/**
|
|
17
|
+
* The size of the form field.
|
|
18
|
+
* @default "default"
|
|
19
|
+
*/
|
|
20
|
+
size: import("@angular/core").InputSignal<InputSize>;
|
|
21
|
+
/**
|
|
22
|
+
* Icon name or configuration object.
|
|
23
|
+
*/
|
|
24
|
+
icon: import("@angular/core").InputSignal<string | FormFieldIcon | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the form field includes a clear button.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
clearable: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Custom CSS classes for the input.
|
|
32
|
+
*/
|
|
33
|
+
inputClass: import("@angular/core").InputSignal<string | null>;
|
|
34
|
+
control?: FormFieldControl;
|
|
35
|
+
feedback?: FeedbackTextComponent;
|
|
36
|
+
readonly resolvedIcon: import("@angular/core").Signal<FormFieldIcon | undefined>;
|
|
37
|
+
readonly validationState: import("@angular/core").Signal<ValidationState>;
|
|
38
|
+
showClearButton: import("@angular/core").Signal<boolean>;
|
|
39
|
+
readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
40
|
+
readonly hostClasses: import("@angular/core").Signal<{
|
|
41
|
+
"tedi-form-field": boolean;
|
|
42
|
+
"tedi-form-field--valid": boolean;
|
|
43
|
+
"tedi-form-field--invalid": boolean;
|
|
44
|
+
"tedi-form-field--disabled": boolean | undefined;
|
|
45
|
+
"tedi-form-field--small": boolean;
|
|
46
|
+
"tedi-form-field--large": boolean;
|
|
47
|
+
"tedi-form-field--with-icon": boolean;
|
|
48
|
+
}>;
|
|
49
|
+
readonly inputClasses: import("@angular/core").Signal<{
|
|
50
|
+
"tedi-form-field__input": boolean;
|
|
51
|
+
}>;
|
|
52
|
+
clear(): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "tedi-form-field", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; }, {}, ["control", "feedback"], ["label[tedi-label]", "input[tedi-text-field]", "tedi-feedback-text"], true, never>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=form-field.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/form/form-field/form-field.component.ts"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,SAAS,EAET,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,MAAM,8CAA8C,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;;AAEjF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;AACvD,KAAK,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,qBAkBa,kBAAkB;IAC7B;;;OAGG;IACH,IAAI,iDAA+B;IACnC;;OAEG;IACH,IAAI,0EAA+C;IACnD;;;OAGG;IACH,SAAS,+CAAyB;IAClC;;OAEG;IACH,UAAU,qDAA8B;IAGxC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAG3B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,QAAQ,CAAC,YAAY,4DAKlB;IAEH,QAAQ,CAAC,eAAe,kDAQrB;IAEH,eAAe,0CAGZ;IAEH,QAAQ,CAAC,UAAU,0CAAqD;IAExE,QAAQ,CAAC,WAAW;;;;;;;;OAUjB;IAEH,QAAQ,CAAC,YAAY;;OAOlB;IAEH,KAAK;yCAvEM,kBAAkB;2CAAlB,kBAAkB;CA0E9B"}
|
|
@@ -4,4 +4,6 @@ export * from "./feedback-text/feedback-text.component";
|
|
|
4
4
|
export * from "./label/label.component";
|
|
5
5
|
export * from "./number-field/number-field.component";
|
|
6
6
|
export * from "./toggle/toggle.component";
|
|
7
|
+
export * from "./form-field/form-field.component";
|
|
8
|
+
export * from "./text-field/text-field.component";
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor, NgControl } from "@angular/forms";
|
|
3
|
+
import { FormFieldControl } from "../form-field/form-field-control";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TextFieldComponent implements ControlValueAccessor, FormFieldControl {
|
|
6
|
+
private el;
|
|
7
|
+
private ngControl;
|
|
8
|
+
/**
|
|
9
|
+
* Value of the input field. Supports two-way binding, use with form controls.
|
|
10
|
+
*/
|
|
11
|
+
value: import("@angular/core").ModelSignal<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to hide arrows for number inputs.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
arrowsHidden: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
/**
|
|
18
|
+
* Callback triggered when the clear button is clicked.
|
|
19
|
+
*/
|
|
20
|
+
readonly clear: import("@angular/core").OutputEmitterRef<void>;
|
|
21
|
+
constructor(el: ElementRef<HTMLInputElement>, ngControl: NgControl | null);
|
|
22
|
+
readonly disabled: import("@angular/core").Signal<boolean>;
|
|
23
|
+
readonly invalid: import("@angular/core").Signal<boolean>;
|
|
24
|
+
private formDisabled;
|
|
25
|
+
private onChange;
|
|
26
|
+
private onTouched;
|
|
27
|
+
private setValue;
|
|
28
|
+
writeValue(value: string | null): void;
|
|
29
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
30
|
+
registerOnTouched(fn: () => void): void;
|
|
31
|
+
setDisabledState(isDisabled: boolean): void;
|
|
32
|
+
handleInputChange(event: Event): void;
|
|
33
|
+
handleBlur(): void;
|
|
34
|
+
clearField(): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextFieldComponent, [null, { optional: true; self: true; }]>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextFieldComponent, "input[tedi-text-field]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "arrowsHidden": { "alias": "arrowsHidden"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "clear": "clear"; }, never, never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=text-field.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.component.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/form/text-field/text-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,UAAU,EAGX,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EAEpB,SAAS,EACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAEjB,MAAM,kCAAkC,CAAC;;AAE1C,qBA0Ba,kBACX,YAAW,oBAAoB,EAAE,gBAAgB;IAiB/C,OAAO,CAAC,EAAE;IACU,OAAO,CAAC,SAAS;IAhBvC;;OAEG;IACH,KAAK,8CAAqB;IAC1B;;;OAGG;IACH,YAAY,+CAAwB;IACpC;;OAEG;IACH,QAAQ,CAAC,KAAK,iDAAkB;gBAGtB,EAAE,EAAE,UAAU,CAAC,gBAAgB,CAAC,EACZ,SAAS,EAAE,SAAS,GAAG,IAAI;IAOzD,QAAQ,CAAC,QAAQ,0CAEf;IACF,QAAQ,CAAC,OAAO,0CAGb;IAEH,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,QAAQ,CAAqC;IACrD,OAAO,CAAC,SAAS,CAAwB;IAEzC,OAAO,CAAC,QAAQ;IAKhB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAItC,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAInD,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IAIvC,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAK3C,iBAAiB,CAAC,KAAK,EAAE,KAAK;IAQ9B,UAAU;IAIV,UAAU;yCAxEC,kBAAkB;2CAAlB,kBAAkB;CAgF9B"}
|