dfh-ui-library 1.1.4 → 1.1.6
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/dist/cjs/index.css +1 -1
- package/dist/cjs/index.css.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/FormElements/CheckBox/CheckBox.d.ts +4 -0
- package/dist/cjs/types/components/FormElements/CheckBox/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/InputValidation/InputValidation.d.ts +16 -0
- package/dist/cjs/types/components/FormElements/InputValidation/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/Label/Label.d.ts +7 -0
- package/dist/cjs/types/components/FormElements/Label/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/RadioButton/RadioButton.d.ts +7 -0
- package/dist/cjs/types/components/FormElements/RadioButton/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/Select/Select.d.ts +7 -0
- package/dist/cjs/types/components/FormElements/Select/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/Textarea/Textarea.d.ts +49 -0
- package/dist/cjs/types/components/FormElements/Textarea/index.d.ts +1 -0
- package/dist/cjs/types/components/FormElements/index.d.ts +7 -0
- package/dist/cjs/types/components/index.d.ts +1 -1
- package/dist/cjs/types/shared/models/components/base.model.d.ts +95 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.css.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/FormElements/CheckBox/CheckBox.d.ts +4 -0
- package/dist/esm/types/components/FormElements/CheckBox/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/InputValidation/InputValidation.d.ts +16 -0
- package/dist/esm/types/components/FormElements/InputValidation/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/Label/Label.d.ts +7 -0
- package/dist/esm/types/components/FormElements/Label/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/RadioButton/RadioButton.d.ts +7 -0
- package/dist/esm/types/components/FormElements/RadioButton/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/Select/Select.d.ts +7 -0
- package/dist/esm/types/components/FormElements/Select/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/Textarea/Textarea.d.ts +49 -0
- package/dist/esm/types/components/FormElements/Textarea/index.d.ts +1 -0
- package/dist/esm/types/components/FormElements/index.d.ts +7 -0
- package/dist/esm/types/components/index.d.ts +1 -1
- package/dist/esm/types/shared/models/components/base.model.d.ts +95 -1
- package/dist/index.d.ts +378 -137
- package/package.json +8 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./CheckBox";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface InputValidationProps {
|
|
3
|
+
/**
|
|
4
|
+
* Set validation message
|
|
5
|
+
*/
|
|
6
|
+
message?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Optional for additional classes
|
|
9
|
+
*/
|
|
10
|
+
additionalClasses?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Primary UI component for user interaction
|
|
14
|
+
*/
|
|
15
|
+
declare const InputValidation: React.FC<InputValidationProps>;
|
|
16
|
+
export default InputValidation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./InputValidation";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./RadioButton";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Select";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { TextareaHTMLAttributes } from "react";
|
|
2
|
+
type InputType = "text" | "email" | "password" | "name";
|
|
3
|
+
interface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Set Input type
|
|
6
|
+
*/
|
|
7
|
+
type?: InputType;
|
|
8
|
+
/**
|
|
9
|
+
* Set Input name
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Set the Label Type
|
|
14
|
+
*/
|
|
15
|
+
labelType?: "default" | "black" | "smallSelect";
|
|
16
|
+
/**
|
|
17
|
+
* Set Input label name
|
|
18
|
+
*/
|
|
19
|
+
label?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Ser Error message
|
|
22
|
+
*/
|
|
23
|
+
error?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Set Wrapper classes, new classes will overide the existing default classes
|
|
26
|
+
*/
|
|
27
|
+
wrapperClass?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Optional for additional classes
|
|
30
|
+
*/
|
|
31
|
+
additionalClasses?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Enable read only
|
|
34
|
+
*/
|
|
35
|
+
readonly?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* LabelClasses
|
|
38
|
+
*/
|
|
39
|
+
labelClasses?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Set label only
|
|
42
|
+
*/
|
|
43
|
+
onlyLabel?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Primary UI component for user interaction
|
|
47
|
+
*/
|
|
48
|
+
declare const Textarea: React.FC<InputProps>;
|
|
49
|
+
export default Textarea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Textarea";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as CheckBox } from "./CheckBox";
|
|
2
|
+
export { default as InputValidation } from "./InputValidation";
|
|
3
|
+
export { default as Input } from "./Input";
|
|
4
|
+
export { default as Label } from "./Label";
|
|
5
|
+
export { default as Select } from "./Select";
|
|
6
|
+
export { default as RadioButton } from "./RadioButton";
|
|
7
|
+
export { default as Textarea } from "./Textarea";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../index.css";
|
|
2
2
|
export { default as Button } from "./Button";
|
|
3
3
|
export { default as Typhography } from "./Typhography";
|
|
4
|
-
export {
|
|
4
|
+
export { Input, Select, CheckBox, Label, InputValidation, Textarea, } from "./FormElements";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from "react";
|
|
1
|
+
import { InputHTMLAttributes, SelectHTMLAttributes } from "react";
|
|
2
2
|
import { AdditionalClassesProp, ChildrenProp, IconTypeProp, AlignmentType, OnClickEventProps, TyphoTypes, TyphoComponents, IconHoverColorTypes } from "./common.model";
|
|
3
3
|
export interface ButtonProps extends ChildrenProp, AdditionalClassesProp, IconTypeProp, OnClickEventProps {
|
|
4
4
|
/**
|
|
@@ -131,4 +131,98 @@ export interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElemen
|
|
|
131
131
|
isAdditionalErrorInput?: boolean;
|
|
132
132
|
fullError?: boolean;
|
|
133
133
|
}
|
|
134
|
+
export interface CheckboxProps {
|
|
135
|
+
onChange?: (checked: boolean) => void;
|
|
136
|
+
checked?: boolean;
|
|
137
|
+
id?: any;
|
|
138
|
+
label?: string;
|
|
139
|
+
}
|
|
140
|
+
export type LABELTYPE = "default" | "black" | "smallSelect" | "blackSmall" | undefined;
|
|
141
|
+
export interface LabelProps {
|
|
142
|
+
/**
|
|
143
|
+
* Set the Label Type
|
|
144
|
+
*/
|
|
145
|
+
labelType?: LABELTYPE;
|
|
146
|
+
/**
|
|
147
|
+
* Label name
|
|
148
|
+
*/
|
|
149
|
+
name: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Label contents
|
|
152
|
+
*/
|
|
153
|
+
label?: string | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Add children
|
|
156
|
+
*/
|
|
157
|
+
children?: React.ReactNode;
|
|
158
|
+
/**
|
|
159
|
+
* Optional for additional classes
|
|
160
|
+
*/
|
|
161
|
+
additionalClasses?: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* inner span Classes
|
|
164
|
+
*/
|
|
165
|
+
labelSpanClasses?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
168
|
+
/**
|
|
169
|
+
* Set Input name
|
|
170
|
+
*/
|
|
171
|
+
name?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Set Input label name
|
|
174
|
+
*/
|
|
175
|
+
label?: string | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* Optional for additional classes
|
|
178
|
+
*/
|
|
179
|
+
additionalClasses?: string | undefined;
|
|
180
|
+
id?: any;
|
|
181
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
182
|
+
isDeafult?: boolean;
|
|
183
|
+
}
|
|
184
|
+
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
185
|
+
/**
|
|
186
|
+
* Type
|
|
187
|
+
*/
|
|
188
|
+
selectType?: "small" | "medium";
|
|
189
|
+
/**
|
|
190
|
+
* Set Input type
|
|
191
|
+
*/
|
|
192
|
+
options?: (string | number)[];
|
|
193
|
+
/**
|
|
194
|
+
* Set Input name
|
|
195
|
+
*/
|
|
196
|
+
name: string;
|
|
197
|
+
/**
|
|
198
|
+
* Set Label type
|
|
199
|
+
*/
|
|
200
|
+
labelType?: "default" | "black" | "smallSelect" | "blackSmall";
|
|
201
|
+
/**
|
|
202
|
+
* Set Input label name
|
|
203
|
+
*/
|
|
204
|
+
label?: string | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* LabelClasses
|
|
207
|
+
*/
|
|
208
|
+
labelClasses?: string;
|
|
209
|
+
/**
|
|
210
|
+
* Default text for placeholder
|
|
211
|
+
*/
|
|
212
|
+
defaultText?: string | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* Ser Error message
|
|
215
|
+
*/
|
|
216
|
+
error?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Set Wrapper classes, new classes will overide the existing default classes
|
|
219
|
+
*/
|
|
220
|
+
wrapperClass?: string | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Optional for additional classes
|
|
223
|
+
*/
|
|
224
|
+
additionalClasses?: string | undefined;
|
|
225
|
+
updateInputValue?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
226
|
+
defaultValue?: string;
|
|
227
|
+
}
|
|
134
228
|
export {};
|