dfh-ui-library 1.1.4 → 1.1.5
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 +156 -4
- package/package.json +1 -1
|
@@ -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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React$1, { InputHTMLAttributes, FC } from 'react';
|
|
2
|
+
import React$1, { InputHTMLAttributes, SelectHTMLAttributes, FC, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
type AlignmentType = "center" | "left" | "right";
|
|
5
5
|
type IconColorTypes = "white" | "black-900" | "gray-220" | "gray-720" | "inherit" | "gray-300" | string;
|
|
@@ -77,12 +77,12 @@ interface TyphographyProps extends ChildrenProp, AdditionalClassesProp {
|
|
|
77
77
|
color?: string;
|
|
78
78
|
onClick?: () => void;
|
|
79
79
|
}
|
|
80
|
-
type InputType = "text" | "email" | "password" | "name" | "date";
|
|
80
|
+
type InputType$1 = "text" | "email" | "password" | "name" | "date";
|
|
81
81
|
interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
82
82
|
/**
|
|
83
83
|
* Set Input type
|
|
84
84
|
*/
|
|
85
|
-
type?: InputType;
|
|
85
|
+
type?: InputType$1;
|
|
86
86
|
/**
|
|
87
87
|
* Set new variant of the input
|
|
88
88
|
*/
|
|
@@ -144,6 +144,83 @@ interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
144
144
|
isAdditionalErrorInput?: boolean;
|
|
145
145
|
fullError?: boolean;
|
|
146
146
|
}
|
|
147
|
+
interface CheckboxProps {
|
|
148
|
+
onChange?: (checked: boolean) => void;
|
|
149
|
+
checked?: boolean;
|
|
150
|
+
id?: any;
|
|
151
|
+
label?: string;
|
|
152
|
+
}
|
|
153
|
+
type LABELTYPE = "default" | "black" | "smallSelect" | "blackSmall" | undefined;
|
|
154
|
+
interface LabelProps {
|
|
155
|
+
/**
|
|
156
|
+
* Set the Label Type
|
|
157
|
+
*/
|
|
158
|
+
labelType?: LABELTYPE;
|
|
159
|
+
/**
|
|
160
|
+
* Label name
|
|
161
|
+
*/
|
|
162
|
+
name: string | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Label contents
|
|
165
|
+
*/
|
|
166
|
+
label?: string | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Add children
|
|
169
|
+
*/
|
|
170
|
+
children?: React.ReactNode;
|
|
171
|
+
/**
|
|
172
|
+
* Optional for additional classes
|
|
173
|
+
*/
|
|
174
|
+
additionalClasses?: string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* inner span Classes
|
|
177
|
+
*/
|
|
178
|
+
labelSpanClasses?: string;
|
|
179
|
+
}
|
|
180
|
+
interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
181
|
+
/**
|
|
182
|
+
* Type
|
|
183
|
+
*/
|
|
184
|
+
selectType?: "small" | "medium";
|
|
185
|
+
/**
|
|
186
|
+
* Set Input type
|
|
187
|
+
*/
|
|
188
|
+
options?: (string | number)[];
|
|
189
|
+
/**
|
|
190
|
+
* Set Input name
|
|
191
|
+
*/
|
|
192
|
+
name: string;
|
|
193
|
+
/**
|
|
194
|
+
* Set Label type
|
|
195
|
+
*/
|
|
196
|
+
labelType?: "default" | "black" | "smallSelect" | "blackSmall";
|
|
197
|
+
/**
|
|
198
|
+
* Set Input label name
|
|
199
|
+
*/
|
|
200
|
+
label?: string | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* LabelClasses
|
|
203
|
+
*/
|
|
204
|
+
labelClasses?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Default text for placeholder
|
|
207
|
+
*/
|
|
208
|
+
defaultText?: string | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* Ser Error message
|
|
211
|
+
*/
|
|
212
|
+
error?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Set Wrapper classes, new classes will overide the existing default classes
|
|
215
|
+
*/
|
|
216
|
+
wrapperClass?: string | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Optional for additional classes
|
|
219
|
+
*/
|
|
220
|
+
additionalClasses?: string | undefined;
|
|
221
|
+
updateInputValue?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
222
|
+
defaultValue?: string;
|
|
223
|
+
}
|
|
147
224
|
|
|
148
225
|
declare const Button: ({ type, isDisabled, buttonLabel, iconType, iconColor, iconAlignment, isIconEnabled, variants, additionalClasses, iconClass, onClick, }: ButtonProps) => React$1.JSX.Element;
|
|
149
226
|
|
|
@@ -152,9 +229,84 @@ declare const Button: ({ type, isDisabled, buttonLabel, iconType, iconColor, ico
|
|
|
152
229
|
*/
|
|
153
230
|
declare const Typhography: ({ type, component, color, additionalClasses, children, onClick, ...rest }: TyphographyProps) => React$1.JSX.Element;
|
|
154
231
|
|
|
232
|
+
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
233
|
+
|
|
234
|
+
interface InputValidationProps {
|
|
235
|
+
/**
|
|
236
|
+
* Set validation message
|
|
237
|
+
*/
|
|
238
|
+
message?: string | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Optional for additional classes
|
|
241
|
+
*/
|
|
242
|
+
additionalClasses?: string | undefined;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Primary UI component for user interaction
|
|
246
|
+
*/
|
|
247
|
+
declare const InputValidation: React$1.FC<InputValidationProps>;
|
|
248
|
+
|
|
155
249
|
/**
|
|
156
250
|
* Primary UI component for user interaction
|
|
157
251
|
*/
|
|
158
252
|
declare const Input: FC<HookFormsInputProps>;
|
|
159
253
|
|
|
160
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Primary UI component for user interaction
|
|
256
|
+
*/
|
|
257
|
+
declare const Label: React$1.FC<LabelProps>;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Primary UI component for user interaction
|
|
261
|
+
*/
|
|
262
|
+
declare const Select: React$1.FC<SelectProps>;
|
|
263
|
+
|
|
264
|
+
type InputType = "text" | "email" | "password" | "name";
|
|
265
|
+
interface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
266
|
+
/**
|
|
267
|
+
* Set Input type
|
|
268
|
+
*/
|
|
269
|
+
type?: InputType;
|
|
270
|
+
/**
|
|
271
|
+
* Set Input name
|
|
272
|
+
*/
|
|
273
|
+
name: string;
|
|
274
|
+
/**
|
|
275
|
+
* Set the Label Type
|
|
276
|
+
*/
|
|
277
|
+
labelType?: "default" | "black" | "smallSelect";
|
|
278
|
+
/**
|
|
279
|
+
* Set Input label name
|
|
280
|
+
*/
|
|
281
|
+
label?: string | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* Ser Error message
|
|
284
|
+
*/
|
|
285
|
+
error?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Set Wrapper classes, new classes will overide the existing default classes
|
|
288
|
+
*/
|
|
289
|
+
wrapperClass?: string | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Optional for additional classes
|
|
292
|
+
*/
|
|
293
|
+
additionalClasses?: string | undefined;
|
|
294
|
+
/**
|
|
295
|
+
* Enable read only
|
|
296
|
+
*/
|
|
297
|
+
readonly?: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* LabelClasses
|
|
300
|
+
*/
|
|
301
|
+
labelClasses?: string;
|
|
302
|
+
/**
|
|
303
|
+
* Set label only
|
|
304
|
+
*/
|
|
305
|
+
onlyLabel?: boolean;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Primary UI component for user interaction
|
|
309
|
+
*/
|
|
310
|
+
declare const Textarea: React$1.FC<InputProps>;
|
|
311
|
+
|
|
312
|
+
export { Button, Checkbox as CheckBox, Input, InputValidation, Label, Select, Textarea, Typhography };
|