dfh-ui-library 1.2.54 → 1.2.56

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.
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ImageInputProps } from "../../../shared/models/components/common.model";
3
+ declare const ImageInput: React.FC<ImageInputProps>;
4
+ export default ImageInput;
@@ -0,0 +1 @@
1
+ export { default } from "./ImageInput";
@@ -6,3 +6,4 @@ export { default as Select } from "./Select";
6
6
  export { default as RadioButton } from "./RadioButton";
7
7
  export { default as Textarea } from "./Textarea";
8
8
  export { default as IconInput } from "./IconInput";
9
+ export { default as ImageInput } from "./ImageInput";
@@ -1,7 +1,7 @@
1
1
  import "../index.css";
2
2
  export { default as Button } from "./Button";
3
3
  export { default as Typhography } from "./Typhography";
4
- export { Input, Select, CheckBox, Label, InputValidation, Textarea, RadioButton, IconInput, } from "./FormElements";
4
+ export { Input, Select, CheckBox, Label, InputValidation, Textarea, RadioButton, IconInput, ImageInput, } from "./FormElements";
5
5
  export { default as Card } from "./Card";
6
6
  export { default as ComponentProvider } from "./ComponentProvider";
7
7
  export { default as Logo } from "./Logo";
@@ -7,3 +7,4 @@ export { MessageProps } from "./shared/models/components/common.model";
7
7
  export { VariantTypes } from "./shared/models/components/base.model";
8
8
  export { DropdownSearchProps } from "./shared/models/components/common.model";
9
9
  export { BtnOptionDropdown } from "./shared/models/components/common.model";
10
+ export { OptionProps } from "./shared/models/components/common.model";
@@ -122,6 +122,69 @@ export interface ImagePreviewProps {
122
122
  isSmall?: boolean;
123
123
  bgColor?: string;
124
124
  }
125
+ export interface ImageInputProps {
126
+ imageUrl?: string;
127
+ isImage?: boolean;
128
+ type?: InputType;
129
+ /**
130
+ * Set new variant of the input
131
+ */
132
+ inputVariant?: "default" | "large";
133
+ /**
134
+ * Set Input name
135
+ */
136
+ id?: string;
137
+ /**
138
+ * Set Input name
139
+ */
140
+ labelName?: string;
141
+ /**
142
+ * Set the Label Type
143
+ */
144
+ labelType?: LableTypes;
145
+ /**
146
+ * Set Input label name
147
+ */
148
+ label?: string | undefined;
149
+ /**
150
+ * Ser Error message
151
+ */
152
+ error?: string;
153
+ /**
154
+ * Ser Error message
155
+ */
156
+ isBorderedError?: boolean;
157
+ /**
158
+ * Set Wrapper classes, new classes will overide the existing default classes
159
+ */
160
+ wrapperClass?: string | undefined;
161
+ /**
162
+ * Optional for additional classes
163
+ */
164
+ additionalClasses?: string | undefined;
165
+ /**
166
+ * Enable read only
167
+ */
168
+ readonly?: boolean;
169
+ /**
170
+ * LabelClasses
171
+ */
172
+ labelClasses?: string | undefined;
173
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
174
+ placeholder?: string;
175
+ /**
176
+ * Set label only
177
+ */
178
+ onlyLabel?: boolean | undefined;
179
+ /**
180
+ * inner span Classes
181
+ */
182
+ labelSpanClasses?: string;
183
+ isAdditionalErrorInput?: boolean;
184
+ additionalErrorClasses?: string;
185
+ readOnly?: boolean;
186
+ value?: string;
187
+ }
125
188
  export interface CustomDatePickerProps {
126
189
  selectedDate: Date | null;
127
190
  onChange: (date: Date | null) => void;
@@ -217,7 +280,7 @@ export interface BtnOptionDropdown {
217
280
  variants?: VariantTypes;
218
281
  }
219
282
  export interface DropdownSearchProps {
220
- options: OptionProps[];
283
+ options?: OptionProps[];
221
284
  label?: string;
222
285
  labelType?: LableTypes;
223
286
  onSelectedValuesChange?: (selectedValue: OptionProps) => void;
package/dist/index.d.ts CHANGED
@@ -81,6 +81,69 @@ interface ImagePreviewProps {
81
81
  isSmall?: boolean;
82
82
  bgColor?: string;
83
83
  }
84
+ interface ImageInputProps {
85
+ imageUrl?: string;
86
+ isImage?: boolean;
87
+ type?: InputType;
88
+ /**
89
+ * Set new variant of the input
90
+ */
91
+ inputVariant?: "default" | "large";
92
+ /**
93
+ * Set Input name
94
+ */
95
+ id?: string;
96
+ /**
97
+ * Set Input name
98
+ */
99
+ labelName?: string;
100
+ /**
101
+ * Set the Label Type
102
+ */
103
+ labelType?: LableTypes;
104
+ /**
105
+ * Set Input label name
106
+ */
107
+ label?: string | undefined;
108
+ /**
109
+ * Ser Error message
110
+ */
111
+ error?: string;
112
+ /**
113
+ * Ser Error message
114
+ */
115
+ isBorderedError?: boolean;
116
+ /**
117
+ * Set Wrapper classes, new classes will overide the existing default classes
118
+ */
119
+ wrapperClass?: string | undefined;
120
+ /**
121
+ * Optional for additional classes
122
+ */
123
+ additionalClasses?: string | undefined;
124
+ /**
125
+ * Enable read only
126
+ */
127
+ readonly?: boolean;
128
+ /**
129
+ * LabelClasses
130
+ */
131
+ labelClasses?: string | undefined;
132
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
133
+ placeholder?: string;
134
+ /**
135
+ * Set label only
136
+ */
137
+ onlyLabel?: boolean | undefined;
138
+ /**
139
+ * inner span Classes
140
+ */
141
+ labelSpanClasses?: string;
142
+ isAdditionalErrorInput?: boolean;
143
+ additionalErrorClasses?: string;
144
+ readOnly?: boolean;
145
+ value?: string;
146
+ }
84
147
  interface CustomDatePickerProps {
85
148
  selectedDate: Date | null;
86
149
  onChange: (date: Date | null) => void;
@@ -176,7 +239,7 @@ interface BtnOptionDropdown {
176
239
  variants?: VariantTypes;
177
240
  }
178
241
  interface DropdownSearchProps {
179
- options: OptionProps[];
242
+ options?: OptionProps[];
180
243
  label?: string;
181
244
  labelType?: LableTypes;
182
245
  onSelectedValuesChange?: (selectedValue: OptionProps) => void;
@@ -575,6 +638,8 @@ declare const Textarea: React$1.FC<IInputProps>;
575
638
  */
576
639
  declare const IconInput: FC<IHookFormsInputProps>;
577
640
 
641
+ declare const ImageInput: React$1.FC<ImageInputProps>;
642
+
578
643
  /**
579
644
  * Primary UI component for user interaction
580
645
  */
@@ -662,4 +727,4 @@ declare const useSchemaProcessor: ({ schema, externalSetComponents, }: UseSchema
662
727
  componentsRtn: IComponent[] | undefined;
663
728
  };
664
729
 
665
- export { Breadcrumb, type BtnOptionDropdown, Button, ButtonGroup, Card, Checkbox as CheckBox, DFHFormProvider as ComponentProvider, CustomFileInput, CustomDatePicker as DatePicker, DialogBox, type DropdownSearchProps, Heading, IconInput, ImagePreview, Input, type InputType, InputValidation, Label, LoadingSpinner, Logo, type LogoProps, Message, type MessageProps, Modal, NavBar, PhoneNumberInput, RadioButton, Row, SearchDropdownWithButton, Select, TagSelect as TagDropdown, TagSelect, Textarea, Tooltip, Typhography, useSchemaProcessor as UseSchemaProcessor, type VariantTypes };
730
+ export { Breadcrumb, type BtnOptionDropdown, Button, ButtonGroup, Card, Checkbox as CheckBox, DFHFormProvider as ComponentProvider, CustomFileInput, CustomDatePicker as DatePicker, DialogBox, type DropdownSearchProps, Heading, IconInput, ImageInput, ImagePreview, Input, type InputType, InputValidation, Label, LoadingSpinner, Logo, type LogoProps, Message, type MessageProps, Modal, NavBar, type OptionProps, PhoneNumberInput, RadioButton, Row, SearchDropdownWithButton, Select, TagSelect as TagDropdown, TagSelect, Textarea, Tooltip, Typhography, useSchemaProcessor as UseSchemaProcessor, type VariantTypes };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfh-ui-library",
3
- "version": "1.2.54",
3
+ "version": "1.2.56",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c --bundleConfigAsCjs --environment NODE_ENV:production",