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.
Files changed (40) hide show
  1. package/dist/cjs/index.css +1 -1
  2. package/dist/cjs/index.css.map +1 -1
  3. package/dist/cjs/index.js +2 -2
  4. package/dist/cjs/index.js.map +1 -1
  5. package/dist/cjs/types/components/FormElements/CheckBox/CheckBox.d.ts +4 -0
  6. package/dist/cjs/types/components/FormElements/CheckBox/index.d.ts +1 -0
  7. package/dist/cjs/types/components/FormElements/InputValidation/InputValidation.d.ts +16 -0
  8. package/dist/cjs/types/components/FormElements/InputValidation/index.d.ts +1 -0
  9. package/dist/cjs/types/components/FormElements/Label/Label.d.ts +7 -0
  10. package/dist/cjs/types/components/FormElements/Label/index.d.ts +1 -0
  11. package/dist/cjs/types/components/FormElements/RadioButton/RadioButton.d.ts +7 -0
  12. package/dist/cjs/types/components/FormElements/RadioButton/index.d.ts +1 -0
  13. package/dist/cjs/types/components/FormElements/Select/Select.d.ts +7 -0
  14. package/dist/cjs/types/components/FormElements/Select/index.d.ts +1 -0
  15. package/dist/cjs/types/components/FormElements/Textarea/Textarea.d.ts +49 -0
  16. package/dist/cjs/types/components/FormElements/Textarea/index.d.ts +1 -0
  17. package/dist/cjs/types/components/FormElements/index.d.ts +7 -0
  18. package/dist/cjs/types/components/index.d.ts +1 -1
  19. package/dist/cjs/types/shared/models/components/base.model.d.ts +95 -1
  20. package/dist/esm/index.css +1 -1
  21. package/dist/esm/index.css.map +1 -1
  22. package/dist/esm/index.js +3 -3
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/types/components/FormElements/CheckBox/CheckBox.d.ts +4 -0
  25. package/dist/esm/types/components/FormElements/CheckBox/index.d.ts +1 -0
  26. package/dist/esm/types/components/FormElements/InputValidation/InputValidation.d.ts +16 -0
  27. package/dist/esm/types/components/FormElements/InputValidation/index.d.ts +1 -0
  28. package/dist/esm/types/components/FormElements/Label/Label.d.ts +7 -0
  29. package/dist/esm/types/components/FormElements/Label/index.d.ts +1 -0
  30. package/dist/esm/types/components/FormElements/RadioButton/RadioButton.d.ts +7 -0
  31. package/dist/esm/types/components/FormElements/RadioButton/index.d.ts +1 -0
  32. package/dist/esm/types/components/FormElements/Select/Select.d.ts +7 -0
  33. package/dist/esm/types/components/FormElements/Select/index.d.ts +1 -0
  34. package/dist/esm/types/components/FormElements/Textarea/Textarea.d.ts +49 -0
  35. package/dist/esm/types/components/FormElements/Textarea/index.d.ts +1 -0
  36. package/dist/esm/types/components/FormElements/index.d.ts +7 -0
  37. package/dist/esm/types/components/index.d.ts +1 -1
  38. package/dist/esm/types/shared/models/components/base.model.d.ts +95 -1
  39. package/dist/index.d.ts +378 -137
  40. package/package.json +8 -3
package/dist/index.d.ts CHANGED
@@ -1,160 +1,401 @@
1
1
  /// <reference types="react" />
2
- import React$1, { InputHTMLAttributes, FC } from 'react';
2
+ import React$1, {
3
+ InputHTMLAttributes,
4
+ SelectHTMLAttributes,
5
+ FC,
6
+ TextareaHTMLAttributes,
7
+ } from "react";
3
8
 
4
9
  type AlignmentType = "center" | "left" | "right";
5
- type IconColorTypes = "white" | "black-900" | "gray-220" | "gray-720" | "inherit" | "gray-300" | string;
6
- type IconType = "Home" | "Info" | "Email" | "RightArrow" | "DropDown" | "DropDownArrow" | "WhiteArrow" | "TrashIcon" | "AddNewitemIcon" | "OkIcon" | "EditIcon" | "Delete" | "AddIcon" | "RemoveTrashIcon" | "RoundTickIcon" | "ValidationWarningIcon" | "WarningIcon" | "NeturalIcon" | "SuccessIcon" | string;
7
- interface ChildrenProp {
8
- /**
9
- * Se the child node and element;
10
- */
11
- children?: React.ReactNode;
10
+ type IconColorTypes =
11
+ | "white"
12
+ | "black-900"
13
+ | "gray-220"
14
+ | "gray-720"
15
+ | "inherit"
16
+ | "gray-300"
17
+ | string;
18
+ type IconType =
19
+ | "Home"
20
+ | "Info"
21
+ | "Email"
22
+ | "RightArrow"
23
+ | "DropDown"
24
+ | "DropDownArrow"
25
+ | "WhiteArrow"
26
+ | "TrashIcon"
27
+ | "AddNewitemIcon"
28
+ | "OkIcon"
29
+ | "EditIcon"
30
+ | "Delete"
31
+ | "AddIcon"
32
+ | "RemoveTrashIcon"
33
+ | "RoundTickIcon"
34
+ | "ValidationWarningIcon"
35
+ | "WarningIcon"
36
+ | "NeturalIcon"
37
+ | "SuccessIcon"
38
+ | string;
39
+ interface IChildrenProp {
40
+ /**
41
+ * Se the child node and element;
42
+ */
43
+ children?: React.ReactNode;
12
44
  }
13
- interface IconTypeProp {
14
- /**
15
- * Set icon type
16
- */
17
- iconType?: IconType;
18
- /**
19
- * Set the Icon Color
20
- */
21
- iconColor?: IconColorTypes;
45
+ interface IIconTypeProp {
46
+ /**
47
+ * Set icon type
48
+ */
49
+ iconType?: IconType;
50
+ /**
51
+ * Set the Icon Color
52
+ */
53
+ iconColor?: IconColorTypes;
22
54
  }
23
- interface AdditionalClassesProp {
24
- /**
25
- * Optional | Set the additional classes
26
- */
27
- additionalClasses?: string | undefined;
55
+ interface IAdditionalClassesProp {
56
+ /**
57
+ * Optional | Set the additional classes
58
+ */
59
+ additionalClasses?: string | undefined;
28
60
  }
29
- interface OnClickEventProps {
30
- onClick?: () => void;
61
+ interface IOnClickEventProps {
62
+ onClick?: () => void;
31
63
  }
32
- type TyphoTypes = "h1" | "h1Bold" | "h1ExtraBold" | "h2" | "h2Bold" | "h2ExtraBold" | "h10" | "h10Bold" | "h10ExtraBold" | "h6" | "h6Bold" | "h6ExtraBold" | "header1" | "header2" | "label1" | "label2";
64
+ type TyphoTypes =
65
+ | "h1"
66
+ | "h1Bold"
67
+ | "h1ExtraBold"
68
+ | "h2"
69
+ | "h2Bold"
70
+ | "h2ExtraBold"
71
+ | "h10"
72
+ | "h10Bold"
73
+ | "h10ExtraBold"
74
+ | "h6"
75
+ | "h6Bold"
76
+ | "h6ExtraBold"
77
+ | "header1"
78
+ | "header2"
79
+ | "label1"
80
+ | "label2";
33
81
  type TyphoComponents = "p" | "span" | "em" | "div" | undefined;
34
82
 
35
- interface ButtonProps extends ChildrenProp, AdditionalClassesProp, IconTypeProp, OnClickEventProps {
36
- /**
37
- * Set the button type
38
- */
39
- type?: "submit" | "button";
40
- /**
41
- * Button Variants
42
- */
43
- variants?: "large" | "small" | "extraSmall" | "largeOutlined" | "smallOutlined" | "extraSmallOutlined" | "default" | "defaultOutlined";
44
- /**
45
- * Set the button disable state
46
- */
47
- isDisabled?: boolean;
48
- /**
49
- * Set the button Label
50
- */
51
- buttonLabel?: string | number;
52
- /**
53
- * Set the icon visibility
54
- */
55
- isIconEnabled?: boolean;
56
- /**
57
- * Set the icon Alignment
58
- */
59
- iconAlignment?: AlignmentType;
60
- /**
61
- * Set icon classes
62
- */
63
- iconClass?: string;
83
+ interface ButtonProps
84
+ extends ChildrenProp,
85
+ AdditionalClassesProp,
86
+ IconTypeProp,
87
+ OnClickEventProps {
88
+ /**
89
+ * Set the button type
90
+ */
91
+ type?: "submit" | "button";
92
+ /**
93
+ * Button Variants
94
+ */
95
+ variants?:
96
+ | "large"
97
+ | "small"
98
+ | "extraSmall"
99
+ | "largeOutlined"
100
+ | "smallOutlined"
101
+ | "extraSmallOutlined"
102
+ | "default"
103
+ | "defaultOutlined";
104
+ /**
105
+ * Set the button disable state
106
+ */
107
+ isDisabled?: boolean;
108
+ /**
109
+ * Set the button Label
110
+ */
111
+ buttonLabel?: string | number;
112
+ /**
113
+ * Set the icon visibility
114
+ */
115
+ isIconEnabled?: boolean;
116
+ /**
117
+ * Set the icon Alignment
118
+ */
119
+ iconAlignment?: AlignmentType;
120
+ /**
121
+ * Set icon classes
122
+ */
123
+ iconClass?: string;
64
124
  }
65
- interface TyphographyProps extends ChildrenProp, AdditionalClassesProp {
66
- /**
67
- * Set element type
68
- */
69
- type?: TyphoTypes;
70
- /**
71
- * Set element node of the content wrapper
72
- */
73
- component?: TyphoComponents;
74
- /**
75
- * Set font-color of the content
76
- */
77
- color?: string;
78
- onClick?: () => void;
125
+ interface ITyphographyProps extends ChildrenProp, AdditionalClassesProp {
126
+ /**
127
+ * Set element type
128
+ */
129
+ type?: TyphoTypes;
130
+ /**
131
+ * Set element node of the content wrapper
132
+ */
133
+ component?: TyphoComponents;
134
+ /**
135
+ * Set font-color of the content
136
+ */
137
+ color?: string;
138
+ onClick?: () => void;
79
139
  }
80
- type InputType = "text" | "email" | "password" | "name" | "date";
81
- interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
82
- /**
83
- * Set Input type
84
- */
85
- type?: InputType;
86
- /**
87
- * Set new variant of the input
88
- */
89
- inputVariant?: "default" | "large";
90
- /**
91
- * Set Input name
92
- */
93
- id?: string;
94
- /**
95
- * Set Input name
96
- */
97
- labelName?: string;
98
- /**
99
- * Set the Label Type
100
- */
101
- labelType?: "default" | "black" | "smallSelect" | "blackSmall";
102
- /**
103
- * Set Input label name
104
- */
105
- label?: string | undefined;
106
- /**
107
- * Ser Error message
108
- */
109
- error?: string;
110
- /**
111
- * Ser Error message
112
- */
113
- isBorderedError?: boolean;
114
- /**
115
- * Set Wrapper classes, new classes will overide the existing default classes
116
- */
117
- wrapperClass?: string | undefined;
118
- /**
119
- * Optional for additional classes
120
- */
121
- additionalClasses?: string | undefined;
122
- /**
123
- * Enable read only
124
- */
125
- readonly?: boolean;
126
- /**
127
- * LabelClasses
128
- */
129
- labelClasses?: string | undefined;
130
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
131
- placeholder?: string;
132
- /**
133
- * Set label only
134
- */
135
- onlyLabel?: boolean | undefined;
136
- /**
137
- * inner span Classes
138
- */
139
- labelSpanClasses?: string;
140
- /**
141
- * add additional InputValidation Classes
142
- */
143
- additionalErrorClasses?: string;
144
- isAdditionalErrorInput?: boolean;
145
- fullError?: boolean;
140
+ type InputType$1 = "text" | "email" | "password" | "name" | "date";
141
+ interface IHookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
142
+ /**
143
+ * Set Input type
144
+ */
145
+ type?: InputType$1;
146
+ /**
147
+ * Set new variant of the input
148
+ */
149
+ inputVariant?: "default" | "large";
150
+ /**
151
+ * Set Input name
152
+ */
153
+ id?: string;
154
+ /**
155
+ * Set Input name
156
+ */
157
+ labelName?: string;
158
+ /**
159
+ * Set the Label Type
160
+ */
161
+ labelType?: "default" | "black" | "smallSelect" | "blackSmall";
162
+ /**
163
+ * Set Input label name
164
+ */
165
+ label?: string | undefined;
166
+ /**
167
+ * Ser Error message
168
+ */
169
+ error?: string;
170
+ /**
171
+ * Ser Error message
172
+ */
173
+ isBorderedError?: boolean;
174
+ /**
175
+ * Set Wrapper classes, new classes will overide the existing default classes
176
+ */
177
+ wrapperClass?: string | undefined;
178
+ /**
179
+ * Optional for additional classes
180
+ */
181
+ additionalClasses?: string | undefined;
182
+ /**
183
+ * Enable read only
184
+ */
185
+ readonly?: boolean;
186
+ /**
187
+ * LabelClasses
188
+ */
189
+ labelClasses?: string | undefined;
190
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
191
+ placeholder?: string;
192
+ /**
193
+ * Set label only
194
+ */
195
+ onlyLabel?: boolean | undefined;
196
+ /**
197
+ * inner span Classes
198
+ */
199
+ labelSpanClasses?: string;
200
+ /**
201
+ * add additional InputValidation Classes
202
+ */
203
+ additionalErrorClasses?: string;
204
+ isAdditionalErrorInput?: boolean;
205
+ fullError?: boolean;
206
+ }
207
+ interface CheckboxProps {
208
+ onChange?: (checked: boolean) => void;
209
+ checked?: boolean;
210
+ id?: any;
211
+ label?: string;
212
+ }
213
+ type LABELTYPE = "default" | "black" | "smallSelect" | "blackSmall" | undefined;
214
+ interface ILabelProps {
215
+ /**
216
+ * Set the Label Type
217
+ */
218
+ labelType?: LABELTYPE;
219
+ /**
220
+ * Label name
221
+ */
222
+ name: string | undefined;
223
+ /**
224
+ * Label contents
225
+ */
226
+ label?: string | undefined;
227
+ /**
228
+ * Add children
229
+ */
230
+ children?: React.ReactNode;
231
+ /**
232
+ * Optional for additional classes
233
+ */
234
+ additionalClasses?: string | undefined;
235
+ /**
236
+ * inner span Classes
237
+ */
238
+ labelSpanClasses?: string;
239
+ }
240
+ interface ISelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
241
+ /**
242
+ * Type
243
+ */
244
+ selectType?: "small" | "medium";
245
+ /**
246
+ * Set Input type
247
+ */
248
+ options?: (string | number)[];
249
+ /**
250
+ * Set Input name
251
+ */
252
+ name: string;
253
+ /**
254
+ * Set Label type
255
+ */
256
+ labelType?: "default" | "black" | "smallSelect" | "blackSmall";
257
+ /**
258
+ * Set Input label name
259
+ */
260
+ label?: string | undefined;
261
+ /**
262
+ * LabelClasses
263
+ */
264
+ labelClasses?: string;
265
+ /**
266
+ * Default text for placeholder
267
+ */
268
+ defaultText?: string | undefined;
269
+ /**
270
+ * Ser Error message
271
+ */
272
+ error?: string;
273
+ /**
274
+ * Set Wrapper classes, new classes will overide the existing default classes
275
+ */
276
+ wrapperClass?: string | undefined;
277
+ /**
278
+ * Optional for additional classes
279
+ */
280
+ additionalClasses?: string | undefined;
281
+ updateInputValue?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
282
+ defaultValue?: string;
146
283
  }
147
284
 
148
- declare const Button: ({ type, isDisabled, buttonLabel, iconType, iconColor, iconAlignment, isIconEnabled, variants, additionalClasses, iconClass, onClick, }: ButtonProps) => React$1.JSX.Element;
285
+ declare const Button: ({
286
+ type,
287
+ isDisabled,
288
+ buttonLabel,
289
+ iconType,
290
+ iconColor,
291
+ iconAlignment,
292
+ isIconEnabled,
293
+ variants,
294
+ additionalClasses,
295
+ iconClass,
296
+ onClick,
297
+ }: ButtonProps) => React$1.JSX.Element;
149
298
 
150
299
  /**
151
300
  * Primary UI component
152
301
  */
153
- declare const Typhography: ({ type, component, color, additionalClasses, children, onClick, ...rest }: TyphographyProps) => React$1.JSX.Element;
302
+ declare const Typhography: ({
303
+ type,
304
+ component,
305
+ color,
306
+ additionalClasses,
307
+ children,
308
+ onClick,
309
+ ...rest
310
+ }: TyphographyProps) => React$1.JSX.Element;
311
+
312
+ declare const Checkbox: React$1.FC<CheckboxProps>;
313
+
314
+ interface IInputValidationProps {
315
+ /**
316
+ * Set validation message
317
+ */
318
+ message?: string | undefined;
319
+ /**
320
+ * Optional for additional classes
321
+ */
322
+ additionalClasses?: string | undefined;
323
+ }
324
+ /**
325
+ * Primary UI component for user interaction
326
+ */
327
+ declare const InputValidation: React$1.FC<InputValidationProps>;
154
328
 
155
329
  /**
156
330
  * Primary UI component for user interaction
157
331
  */
158
332
  declare const Input: FC<HookFormsInputProps>;
159
333
 
160
- export { Button, Input, Typhography };
334
+ /**
335
+ * Primary UI component for user interaction
336
+ */
337
+ declare const Label: React$1.FC<LabelProps>;
338
+
339
+ /**
340
+ * Primary UI component for user interaction
341
+ */
342
+ declare const Select: React$1.FC<SelectProps>;
343
+
344
+ type InputType = "text" | "email" | "password" | "name";
345
+ interface IInputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
346
+ /**
347
+ * Set Input type
348
+ */
349
+ type?: InputType;
350
+ /**
351
+ * Set Input name
352
+ */
353
+ name: string;
354
+ /**
355
+ * Set the Label Type
356
+ */
357
+ labelType?: "default" | "black" | "smallSelect";
358
+ /**
359
+ * Set Input label name
360
+ */
361
+ label?: string | undefined;
362
+ /**
363
+ * Ser Error message
364
+ */
365
+ error?: string;
366
+ /**
367
+ * Set Wrapper classes, new classes will overide the existing default classes
368
+ */
369
+ wrapperClass?: string | undefined;
370
+ /**
371
+ * Optional for additional classes
372
+ */
373
+ additionalClasses?: string | undefined;
374
+ /**
375
+ * Enable read only
376
+ */
377
+ readonly?: boolean;
378
+ /**
379
+ * LabelClasses
380
+ */
381
+ labelClasses?: string;
382
+ /**
383
+ * Set label only
384
+ */
385
+ onlyLabel?: boolean;
386
+ }
387
+ /**
388
+ * Primary UI component for user interaction
389
+ */
390
+ declare const Textarea: React$1.FC<InputProps>;
391
+
392
+ export {
393
+ Button,
394
+ Checkbox as CheckBox,
395
+ Input,
396
+ InputValidation,
397
+ Label,
398
+ Select,
399
+ Textarea,
400
+ Typhography,
401
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfh-ui-library",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c --bundleConfigAsCjs",
@@ -16,14 +16,16 @@
16
16
  "@babel/preset-typescript": "^7.23.3",
17
17
  "@rollup/plugin-sucrase": "^5.0.2",
18
18
  "@rollup/plugin-terser": "^0.4.4",
19
- "@storybook/addon-docs": "^7.5.3",
20
- "@storybook/theming": "^7.5.3",
21
19
  "@tailwindcss/forms": "^0.5.7",
22
20
  "@types/react": "^18.2.37",
23
21
  "autoprefixer": "^10.4.16",
24
22
  "classnames": "^2.3.2",
23
+ "lodash": "^4.17.21",
24
+ "moment": "^2.29.4",
25
25
  "react": "^18.2.0",
26
+ "react-datepicker": "^4.23.0",
26
27
  "react-dom": "^18.2.0",
28
+ "react-tooltip": "^5.24.0",
27
29
  "rollup-plugin-peer-deps-external": "^2.2.4",
28
30
  "rollup-plugin-scss": "^4.0.0",
29
31
  "tailwindcss": "^3.3.5",
@@ -48,7 +50,10 @@
48
50
  "@testing-library/jest-dom": "^6.1.4",
49
51
  "@testing-library/react": "^14.1.2",
50
52
  "@testing-library/user-event": "^14.5.1",
53
+ "@storybook/addon-docs": "^7.5.3",
54
+ "@storybook/theming": "^7.5.3",
51
55
  "@types/jest": "^29.5.9",
56
+ "@types/react-datepicker": "^4.19.3",
52
57
  "@typescript-eslint/eslint-plugin": "^6.12.0",
53
58
  "@typescript-eslint/parser": "^6.12.0",
54
59
  "autoprefixer": "^10.4.16",