@webilix/ngx-form-m3 0.0.13 → 0.0.14
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/fesm2022/webilix-ngx-form-m3.mjs +40 -0
- package/fesm2022/webilix-ngx-form-m3.mjs.map +1 -1
- package/lib/inputs/icon/input-icon.component.d.ts +14 -0
- package/lib/inputs/icon/input-icon.interface.d.ts +9 -0
- package/lib/inputs/index.d.ts +2 -0
- package/lib/inputs/input.component.d.ts +5 -0
- package/lib/ngx-form.interface.d.ts +2 -2
- package/ngx-form-m3.css +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import { INgxFormValues } from '../../ngx-form.interface';
|
|
3
|
+
import { IInputConfig } from '../input.interface';
|
|
4
|
+
import { IInputIcon } from './input-icon.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class InputIconComponent {
|
|
7
|
+
formControl: FormControl;
|
|
8
|
+
input: IInputIcon;
|
|
9
|
+
config: IInputConfig;
|
|
10
|
+
values: INgxFormValues;
|
|
11
|
+
isButtonDisabled: boolean;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputIconComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputIconComponent, "ng-component", never, { "values": { "alias": "values"; "required": true; }; "isButtonDisabled": { "alias": "isButtonDisabled"; "required": true; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidatorFn, FormControl } from '@angular/forms';
|
|
2
|
+
import { InputMethods, IInput } from '../input.interface';
|
|
3
|
+
export interface IInputIcon extends Omit<IInput, 'english'> {
|
|
4
|
+
readonly type: 'ICON';
|
|
5
|
+
}
|
|
6
|
+
export declare class InputIconMethods extends InputMethods<IInputIcon, string | null> {
|
|
7
|
+
control(input: IInputIcon, validators: ValidatorFn[]): FormControl<string | null>;
|
|
8
|
+
value(value: any, input: IInputIcon): string | null;
|
|
9
|
+
}
|
package/lib/inputs/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export * from './email/input-email.component';
|
|
|
12
12
|
export * from './email/input-email.interface';
|
|
13
13
|
export * from './file/input-file.component';
|
|
14
14
|
export * from './file/input-file.interface';
|
|
15
|
+
export * from './icon/input-icon.component';
|
|
16
|
+
export * from './icon/input-icon.interface';
|
|
15
17
|
export * from './ip/input-ip.component';
|
|
16
18
|
export * from './ip/input-ip.interface';
|
|
17
19
|
export * from './mobile/input-mobile.component';
|
|
@@ -59,6 +59,11 @@ export declare class InputComponent implements OnInit, OnChanges {
|
|
|
59
59
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
60
60
|
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
61
61
|
};
|
|
62
|
+
ICON: {
|
|
63
|
+
readonly title: string;
|
|
64
|
+
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
65
|
+
readonly component: import("@angular/cdk/portal").ComponentType<any>;
|
|
66
|
+
};
|
|
62
67
|
IP: {
|
|
63
68
|
readonly title: string;
|
|
64
69
|
readonly methods: import("./input.interface").InputMethods<any, any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup, NgForm } from '@angular/forms';
|
|
3
3
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
4
|
-
import { IInputAutoComplete, IInputCheckbox, IInputColor, IInputComponent, IInputDate, IInputEmail, IInputFile, IInputIp, IInputMobile, IInputMoment, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
-
export type NgxFormInputs = IInputAutoComplete | IInputCheckbox | IInputColor | IInputComponent | IInputDate | IInputEmail | IInputFile | IInputIp | IInputMobile | IInputMoment | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
4
|
+
import { IInputAutoComplete, IInputCheckbox, IInputColor, IInputComponent, IInputDate, IInputEmail, IInputFile, IInputIcon, IInputIp, IInputMobile, IInputMoment, IInputName, IInputNumber, IInputPassword, IInputSelect, IInputText, IInputTextarea, IInputUrl } from './inputs';
|
|
5
|
+
export type NgxFormInputs = IInputAutoComplete | IInputCheckbox | IInputColor | IInputComponent | IInputDate | IInputEmail | IInputFile | IInputIcon | IInputIp | IInputMobile | IInputMoment | IInputName | IInputNumber | IInputPassword | IInputSelect | IInputText | IInputTextarea | IInputUrl;
|
|
6
6
|
type Inputs = NgxFormInputs | {
|
|
7
7
|
readonly header: string;
|
|
8
8
|
readonly input: NgxFormInputs;
|
package/ngx-form-m3.css
CHANGED
|
@@ -107,6 +107,26 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
/* INPUTS: ICON */
|
|
111
|
+
.ngx-helper-form-m3-icon-input {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
|
|
115
|
+
mat-icon {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
|
|
120
|
+
width: 24px !important;
|
|
121
|
+
height: 24px !important;
|
|
122
|
+
color: var(--primary);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
input {
|
|
126
|
+
flex: 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
110
130
|
/* INPUTS: FILE */
|
|
111
131
|
.ngx-helper-form-m3-file-input {
|
|
112
132
|
display: flex;
|