dfh-ui-library 1.1.3 → 1.1.4

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.
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { HookFormsInputProps } from ".";
2
+ import { HookFormsInputProps } from "../../../shared/models/components/base.model";
3
3
  /**
4
4
  * Primary UI component for user interaction
5
5
  */
@@ -1,69 +1 @@
1
- import { InputHTMLAttributes } from "react";
2
- type InputType = "text" | "email" | "password" | "name" | "date";
3
- export interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
4
- /**
5
- * Set Input type
6
- */
7
- type?: InputType;
8
- /**
9
- * Set new variant of the input
10
- */
11
- inputVariant?: "default" | "large";
12
- /**
13
- * Set Input name
14
- */
15
- id?: string;
16
- /**
17
- * Set Input name
18
- */
19
- labelName?: string;
20
- /**
21
- * Set the Label Type
22
- */
23
- labelType?: "default" | "black" | "smallSelect" | "blackSmall";
24
- /**
25
- * Set Input label name
26
- */
27
- label?: string | undefined;
28
- /**
29
- * Ser Error message
30
- */
31
- error?: string;
32
- /**
33
- * Ser Error message
34
- */
35
- isBorderedError?: boolean;
36
- /**
37
- * Set Wrapper classes, new classes will overide the existing default classes
38
- */
39
- wrapperClass?: string | undefined;
40
- /**
41
- * Optional for additional classes
42
- */
43
- additionalClasses?: string | undefined;
44
- /**
45
- * Enable read only
46
- */
47
- readonly?: boolean;
48
- /**
49
- * LabelClasses
50
- */
51
- labelClasses?: string | undefined;
52
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
53
- placeholder?: string;
54
- /**
55
- * Set label only
56
- */
57
- onlyLabel?: boolean | undefined;
58
- /**
59
- * inner span Classes
60
- */
61
- labelSpanClasses?: string;
62
- /**
63
- * add additional InputValidation Classes
64
- */
65
- additionalErrorClasses?: string;
66
- isAdditionalErrorInput?: boolean;
67
- fullError?: boolean;
68
- }
69
- export {};
1
+ export { default } from "./Input";
@@ -1,3 +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 { default as Input } from "./FormElements/Input";
@@ -1,3 +1,4 @@
1
+ import { InputHTMLAttributes } from "react";
1
2
  import { AdditionalClassesProp, ChildrenProp, IconTypeProp, AlignmentType, OnClickEventProps, TyphoTypes, TyphoComponents, IconHoverColorTypes } from "./common.model";
2
3
  export interface ButtonProps extends ChildrenProp, AdditionalClassesProp, IconTypeProp, OnClickEventProps {
3
4
  /**
@@ -63,3 +64,71 @@ export interface IconProps extends AdditionalClassesProp, IconTypeProp {
63
64
  iconTextClasses?: string | undefined;
64
65
  onClick?: any;
65
66
  }
67
+ type InputType = "text" | "email" | "password" | "name" | "date";
68
+ export interface HookFormsInputProps extends InputHTMLAttributes<HTMLInputElement> {
69
+ /**
70
+ * Set Input type
71
+ */
72
+ type?: InputType;
73
+ /**
74
+ * Set new variant of the input
75
+ */
76
+ inputVariant?: "default" | "large";
77
+ /**
78
+ * Set Input name
79
+ */
80
+ id?: string;
81
+ /**
82
+ * Set Input name
83
+ */
84
+ labelName?: string;
85
+ /**
86
+ * Set the Label Type
87
+ */
88
+ labelType?: "default" | "black" | "smallSelect" | "blackSmall";
89
+ /**
90
+ * Set Input label name
91
+ */
92
+ label?: string | undefined;
93
+ /**
94
+ * Ser Error message
95
+ */
96
+ error?: string;
97
+ /**
98
+ * Ser Error message
99
+ */
100
+ isBorderedError?: boolean;
101
+ /**
102
+ * Set Wrapper classes, new classes will overide the existing default classes
103
+ */
104
+ wrapperClass?: string | undefined;
105
+ /**
106
+ * Optional for additional classes
107
+ */
108
+ additionalClasses?: string | undefined;
109
+ /**
110
+ * Enable read only
111
+ */
112
+ readonly?: boolean;
113
+ /**
114
+ * LabelClasses
115
+ */
116
+ labelClasses?: string | undefined;
117
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
118
+ placeholder?: string;
119
+ /**
120
+ * Set label only
121
+ */
122
+ onlyLabel?: boolean | undefined;
123
+ /**
124
+ * inner span Classes
125
+ */
126
+ labelSpanClasses?: string;
127
+ /**
128
+ * add additional InputValidation Classes
129
+ */
130
+ additionalErrorClasses?: string;
131
+ isAdditionalErrorInput?: boolean;
132
+ fullError?: boolean;
133
+ }
134
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import React$1 from 'react';
2
+ import React$1, { InputHTMLAttributes, FC } 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,6 +77,73 @@ interface TyphographyProps extends ChildrenProp, AdditionalClassesProp {
77
77
  color?: string;
78
78
  onClick?: () => void;
79
79
  }
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;
146
+ }
80
147
 
81
148
  declare const Button: ({ type, isDisabled, buttonLabel, iconType, iconColor, iconAlignment, isIconEnabled, variants, additionalClasses, iconClass, onClick, }: ButtonProps) => React$1.JSX.Element;
82
149
 
@@ -85,4 +152,9 @@ declare const Button: ({ type, isDisabled, buttonLabel, iconType, iconColor, ico
85
152
  */
86
153
  declare const Typhography: ({ type, component, color, additionalClasses, children, onClick, ...rest }: TyphographyProps) => React$1.JSX.Element;
87
154
 
88
- export { Button, Typhography };
155
+ /**
156
+ * Primary UI component for user interaction
157
+ */
158
+ declare const Input: FC<HookFormsInputProps>;
159
+
160
+ export { Button, Input, Typhography };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfh-ui-library",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c --bundleConfigAsCjs",