formik-form-components 2.0.2 → 2.0.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.
Files changed (65) hide show
  1. package/README.md +20 -22
  2. package/dist/Form/AppAutoCompleter.d.ts +10 -0
  3. package/dist/Form/AppAutoCompleter.d.ts.map +1 -0
  4. package/dist/Form/AppCheckBox.d.ts +15 -0
  5. package/dist/Form/AppCheckBox.d.ts.map +1 -0
  6. package/dist/Form/AppDateAndTimePicker.d.ts +14 -0
  7. package/dist/Form/AppDateAndTimePicker.d.ts.map +1 -0
  8. package/dist/Form/AppDatePicker.d.ts +11 -0
  9. package/dist/Form/AppDatePicker.d.ts.map +1 -0
  10. package/dist/Form/AppFormErrorMessage.d.ts +9 -0
  11. package/dist/Form/AppFormErrorMessage.d.ts.map +1 -0
  12. package/dist/Form/AppInputField.d.ts +9 -0
  13. package/dist/Form/AppInputField.d.ts.map +1 -0
  14. package/dist/Form/AppMultiSelector.d.ts +20 -0
  15. package/dist/Form/AppMultiSelector.d.ts.map +1 -0
  16. package/dist/Form/AppPhoneNoInput.d.ts +16 -0
  17. package/dist/Form/AppPhoneNoInput.d.ts.map +1 -0
  18. package/dist/Form/AppRadioGroup.d.ts +17 -0
  19. package/dist/Form/AppRadioGroup.d.ts.map +1 -0
  20. package/dist/Form/AppRating.d.ts +12 -0
  21. package/dist/Form/AppRating.d.ts.map +1 -0
  22. package/dist/Form/AppSelectInput.d.ts +15 -0
  23. package/dist/Form/AppSelectInput.d.ts.map +1 -0
  24. package/dist/Form/AppSimpleUploadFile.d.ts +14 -0
  25. package/dist/Form/AppSimpleUploadFile.d.ts.map +1 -0
  26. package/dist/Form/AppSwitch.d.ts +9 -0
  27. package/dist/Form/AppSwitch.d.ts.map +1 -0
  28. package/dist/Form/AppTagsCreator.d.ts +10 -0
  29. package/dist/Form/AppTagsCreator.d.ts.map +1 -0
  30. package/dist/Form/AppTextArea.d.ts +10 -0
  31. package/dist/Form/AppTextArea.d.ts.map +1 -0
  32. package/dist/Form/AppUploadFile.d.ts +20 -0
  33. package/dist/Form/AppUploadFile.d.ts.map +1 -0
  34. package/dist/Form/SubmitButton.d.ts +10 -0
  35. package/dist/Form/SubmitButton.d.ts.map +1 -0
  36. package/dist/Form/index.d.ts +10 -0
  37. package/dist/Form/index.d.ts.map +1 -0
  38. package/dist/assets/illustrations/BackgroundIllustration.d.ts +7 -0
  39. package/dist/assets/illustrations/BackgroundIllustration.d.ts.map +1 -0
  40. package/dist/assets/illustrations/UploadIllustration.d.ts +5 -0
  41. package/dist/assets/illustrations/UploadIllustration.d.ts.map +1 -0
  42. package/dist/assets/illustrations/index.d.ts +2 -0
  43. package/dist/assets/illustrations/index.d.ts.map +1 -0
  44. package/dist/file-thumbnail/types.d.ts +6 -0
  45. package/dist/file-thumbnail/types.d.ts.map +1 -0
  46. package/dist/file-thumbnail/utils.d.ts +26 -0
  47. package/dist/file-thumbnail/utils.d.ts.map +1 -0
  48. package/dist/index.d.ts +17 -0
  49. package/dist/lib/index.d.ts +46 -0
  50. package/dist/lib/index.d.ts.map +1 -0
  51. package/dist/lib/optional-deps.d.ts +13 -0
  52. package/dist/lib/optional-deps.d.ts.map +1 -0
  53. package/dist/upload/Upload.d.ts +5 -0
  54. package/dist/upload/Upload.d.ts.map +1 -0
  55. package/dist/upload/errors/RejectionFiles.d.ts +8 -0
  56. package/dist/upload/errors/RejectionFiles.d.ts.map +1 -0
  57. package/dist/upload/index.d.ts +6 -0
  58. package/dist/upload/index.d.ts.map +1 -0
  59. package/dist/upload/preview/MultiFilePreview.d.ts +11 -0
  60. package/dist/upload/preview/MultiFilePreview.d.ts.map +1 -0
  61. package/dist/upload/preview/SingleFilePreview.d.ts +9 -0
  62. package/dist/upload/preview/SingleFilePreview.d.ts.map +1 -0
  63. package/dist/upload/types.d.ts +40 -0
  64. package/dist/upload/types.d.ts.map +1 -0
  65. package/package.json +6 -6
package/README.md CHANGED
@@ -32,11 +32,28 @@ No configuration needed! Import and use:
32
32
  ```tsx
33
33
  import React from 'react';
34
34
  import { Form, AppInputField, AppTextArea } from "formik-form-components";
35
+ // Import your preferred validation library (Yup, Zod, Joi, etc.)
36
+ import * as Yup from 'yup'; // Example using Yup
37
+
38
+ // Define your validation schema (example using Yup)
39
+ const validationSchema = Yup.object({
40
+ name: Yup.string()
41
+ .min(2, 'Name must be at least 2 characters')
42
+ .required('Name is required'),
43
+ email: Yup.string()
44
+ .email('Invalid email address')
45
+ .required('Email is required'),
46
+ message: Yup.string()
47
+ .min(10, 'Message must be at least 10 characters')
48
+ .required('Message is required')
49
+ });
35
50
 
36
51
  function MyForm() {
37
- <Form
52
+ return (
53
+ <Form
38
54
  initialValues={{ name: "", email: "", message: "" }}
39
55
  onSubmit={(values: any) => console.log(values)}
56
+ validationSchema={validationSchema}
40
57
  >
41
58
  <AppInputField
42
59
  name="name"
@@ -58,6 +75,7 @@ function MyForm() {
58
75
  label="Message"
59
76
  rows={4}
60
77
  placeholder="Your message here..."
78
+ required
61
79
  />
62
80
  </Form>
63
81
  );
@@ -66,6 +84,7 @@ function MyForm() {
66
84
  export default MyForm;
67
85
  ```
68
86
 
87
+
69
88
  That's it! No Tailwind setup, no configuration files. Everything just works.
70
89
 
71
90
  ## 📚 Available Components
@@ -220,27 +239,6 @@ All components come pre-styled with Tailwind CSS. You can customize them by pass
220
239
  </SubmitButton>
221
240
  ```
222
241
 
223
- ## 🔧 Advanced Usage
224
-
225
- ### Form Validation with Yup
226
-
227
- ```tsx
228
- import * as Yup from 'yup';
229
-
230
- const validationSchema = Yup.object({
231
- name: Yup.string().required('Name is required'),
232
- email: Yup.string().email('Invalid email').required('Email is required'),
233
- age: Yup.number().min(18, 'Must be 18+').required('Age is required')
234
- });
235
-
236
- <Form
237
- initialValues={{ name: '', email: '', age: '' }}
238
- validationSchema={validationSchema}
239
- onSubmit={(values) => console.log(values)}
240
- >
241
- <AppInputField name="email" label="Email" />
242
- </Form>
243
- ```
244
242
 
245
243
  ### Submit Button with Loading State
246
244
 
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export interface AppAutoCompleterProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "value" | "onChange"> {
3
+ name: string;
4
+ label: string;
5
+ options: string[];
6
+ multiple?: boolean;
7
+ className?: string;
8
+ }
9
+ export default function AppAutoCompleter({ name, label, options, multiple, className, ...inputProps }: AppAutoCompleterProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=AppAutoCompleter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppAutoCompleter.d.ts","sourceRoot":"","sources":["../../src/Form/AppAutoCompleter.tsx"],"names":[],"mappings":";AAQA,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,OAAO,GAAG,UAAU,CAC9B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,KAAK,EACL,OAAY,EACZ,QAAgB,EAChB,SAAc,EACd,GAAG,UAAU,EACd,EAAE,qBAAqB,2CAgOvB"}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export interface CheckboxOption {
3
+ label: string;
4
+ value: string | number | boolean;
5
+ disabled?: boolean;
6
+ }
7
+ export interface AppCheckBoxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "type"> {
8
+ name: string;
9
+ options: CheckboxOption[];
10
+ label?: string;
11
+ row?: boolean;
12
+ }
13
+ declare const AppCheckBox: React.FC<AppCheckBoxProps>;
14
+ export default AppCheckBox;
15
+ //# sourceMappingURL=AppCheckBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppCheckBox.d.ts","sourceRoot":"","sources":["../../src/Form/AppCheckBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+E3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface AppDateTimeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "name" | "value" | "onChange" | "min" | "max"> {
3
+ name: string;
4
+ label?: string;
5
+ /** Disable selecting past date & time */
6
+ disablePast?: boolean;
7
+ /** Disable selecting future date & time */
8
+ disableFuture?: boolean;
9
+ min?: string;
10
+ max?: string;
11
+ }
12
+ declare const AppDateTimeInput: React.FC<AppDateTimeInputProps>;
13
+ export default AppDateTimeInput;
14
+ //# sourceMappingURL=AppDateAndTimePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppDateAndTimePicker.d.ts","sourceRoot":"","sources":["../../src/Form/AppDateAndTimePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,WAAW,qBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,CACvD;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2DrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface AppDatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange" | "min" | "max"> {
3
+ name: string;
4
+ label: string;
5
+ disablePast?: boolean;
6
+ disableFuture?: boolean;
7
+ className?: string;
8
+ }
9
+ declare const AppDatePicker: React.FC<AppDatePickerProps>;
10
+ export default AppDatePicker;
11
+ //# sourceMappingURL=AppDatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppDatePicker.d.ts","sourceRoot":"","sources":["../../src/Form/AppDatePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,CAC9C;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiD/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface AppFormErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ name: string;
4
+ alwaysShow?: boolean;
5
+ className?: string;
6
+ }
7
+ declare const AppFormErrorMessage: React.FC<AppFormErrorMessageProps>;
8
+ export default AppFormErrorMessage;
9
+ //# sourceMappingURL=AppFormErrorMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppFormErrorMessage.d.ts","sourceRoot":"","sources":["../../src/Form/AppFormErrorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqB3D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface AppInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name"> {
3
+ name: string;
4
+ label: React.ReactNode;
5
+ className?: string;
6
+ }
7
+ declare const AppInputField: React.FC<AppInputFieldProps>;
8
+ export default AppInputField;
9
+ //# sourceMappingURL=AppInputField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppInputField.d.ts","sourceRoot":"","sources":["../../src/Form/AppInputField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiE/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export interface AppSelectOption {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ icon?: React.ReactNode;
7
+ }
8
+ export interface AppMultiSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
9
+ name: string;
10
+ label?: string;
11
+ options: AppSelectOption[];
12
+ maxSelections?: number;
13
+ placeholder?: string;
14
+ showSelectedCount?: boolean;
15
+ className?: string;
16
+ onChange?: (value: Array<string | number>) => void;
17
+ }
18
+ declare const AppMultiSelect: React.FC<AppMultiSelectProps>;
19
+ export default AppMultiSelect;
20
+ //# sourceMappingURL=AppMultiSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppMultiSelector.d.ts","sourceRoot":"","sources":["../../src/Form/AppMultiSelector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwIjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import "react-phone-number-input/style.css";
3
+ import "../styles/PhoneInputCustom.css";
4
+ export interface AppPhoneNoInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> {
5
+ name: string;
6
+ label: string;
7
+ international?: boolean;
8
+ withCountryCallingCode?: boolean;
9
+ className?: string;
10
+ onChange?: (value: string | undefined) => void;
11
+ value?: string;
12
+ error?: string;
13
+ }
14
+ declare const AppPhoneNoInput: React.FC<AppPhoneNoInputProps>;
15
+ export default AppPhoneNoInput;
16
+ //# sourceMappingURL=AppPhoneNoInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppPhoneNoInput.d.ts","sourceRoot":"","sources":["../../src/Form/AppPhoneNoInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gCAAgC,CAAC;AAExC,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,OAAO,CACrB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiFnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ export interface RadioOption {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ }
7
+ export interface AppRadioGroupProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "name"> {
8
+ name: string;
9
+ options: RadioOption[];
10
+ label?: string;
11
+ className?: string;
12
+ row?: boolean;
13
+ onChange?: (value: string | number) => void;
14
+ }
15
+ declare const AppRadioGroup: React.FC<AppRadioGroupProps>;
16
+ export default AppRadioGroup;
17
+ //# sourceMappingURL=AppRadioGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppRadioGroup.d.ts","sourceRoot":"","sources":["../../src/Form/AppRadioGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,OAAO,GAAG,MAAM,CAC9B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiE/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export interface AppRatingProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value"> {
3
+ name: string;
4
+ label?: string;
5
+ max?: number;
6
+ helperText?: string;
7
+ onChange?: (value: number | null) => void;
8
+ className?: string;
9
+ }
10
+ declare const AppRating: React.ForwardRefExoticComponent<AppRatingProps & React.RefAttributes<HTMLDivElement>>;
11
+ export default AppRating;
12
+ //# sourceMappingURL=AppRating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppRating.d.ts","sourceRoot":"","sources":["../../src/Form/AppRating.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,MAAM,WAAW,cACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,OAAO,CACrB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,uFA2Ed,CAAC;AAIF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export interface AppSelectOption {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ }
7
+ export interface AppSelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
8
+ name: string;
9
+ options: AppSelectOption[];
10
+ label?: string;
11
+ helperText?: string;
12
+ clearable?: boolean;
13
+ }
14
+ export default function AppSelect({ name, options, label, helperText, clearable, className, id, ...divProps }: AppSelectProps): React.ReactElement;
15
+ //# sourceMappingURL=AppSelectInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSelectInput.d.ts","sourceRoot":"","sources":["../../src/Form/AppSelectInput.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAgB,EAChB,SAAc,EACd,EAAE,EACF,GAAG,QAAQ,EACZ,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CA2NrC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface AppSimpleUploadFileProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "onError"> {
3
+ name: string;
4
+ label?: string;
5
+ maxFiles?: number;
6
+ maxSizeInBytes?: number;
7
+ className?: string;
8
+ onAdd?: (file: File) => void;
9
+ onRemove?: (file: File) => void;
10
+ onError?: (error: string) => void;
11
+ }
12
+ declare const AppSimpleUploadFile: React.FC<AppSimpleUploadFileProps>;
13
+ export default AppSimpleUploadFile;
14
+ //# sourceMappingURL=AppSimpleUploadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSimpleUploadFile.d.ts","sourceRoot":"","sources":["../../src/Form/AppSimpleUploadFile.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAOtC,MAAM,WAAW,wBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA+H3D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface AppSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className"> {
3
+ name: string;
4
+ label?: string;
5
+ className?: string;
6
+ labelPlacement?: "start" | "end" | "top" | "bottom";
7
+ }
8
+ export default function AppSwitch({ name, label, className, labelPlacement, required, ...inputProps }: AppSwitchProps): React.JSX.Element;
9
+ //# sourceMappingURL=AppSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppSwitch.d.ts","sourceRoot":"","sources":["../../src/Form/AppSwitch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,SAAc,EACd,cAAwB,EACxB,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+DpC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface AppTagsCreatorProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "name" | "value" | "onChange"> {
3
+ name: string;
4
+ label?: string;
5
+ options?: string[];
6
+ multiple?: boolean;
7
+ helperText?: string;
8
+ }
9
+ export default function AppTagsCreator({ name, label, options, multiple, helperText, className, ...rest }: AppTagsCreatorProps): React.JSX.Element;
10
+ //# sourceMappingURL=AppTagsCreator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppTagsCreator.d.ts","sourceRoot":"","sources":["../../src/Form/AppTagsCreator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,OAAO,GAAG,UAAU,CAC9B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAI,EACJ,KAAK,EACL,OAAY,EACZ,QAAe,EACf,UAAU,EACV,SAAc,EACd,GAAG,IAAI,EACR,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6NzC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface AppTextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "name" | "onChange"> {
3
+ name: string;
4
+ label: string;
5
+ helperText?: string;
6
+ onChange?: (value: string) => void;
7
+ }
8
+ declare const AppTextArea: React.ForwardRefExoticComponent<AppTextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
9
+ export default AppTextArea;
10
+ //# sourceMappingURL=AppTextArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppTextArea.d.ts","sourceRoot":"","sources":["../../src/Form/AppTextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,gBACf,SAAQ,IAAI,CACV,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EACjD,MAAM,GAAG,UAAU,CACpB;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,QAAA,MAAM,WAAW,8FAqEhB,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import type { UploadProps } from "../upload";
3
+ export declare const base64toBlob: ({ b64Data, sliceSize, forcedMimeType, }: {
4
+ b64Data: string;
5
+ sliceSize?: number | undefined;
6
+ forcedMimeType?: string | undefined;
7
+ }) => Blob;
8
+ export declare const blobToBase64: (file: File) => Promise<string>;
9
+ export interface AppUploadFileProps extends Omit<UploadProps, "file" | "files" | "disabled"> {
10
+ name: string;
11
+ label?: string;
12
+ className?: string;
13
+ multiple?: boolean;
14
+ maxFiles?: number;
15
+ disabled?: boolean;
16
+ onFilesChange?: (files: File[] | File | null) => void;
17
+ }
18
+ declare const AppUploadFile: React.FC<AppUploadFileProps>;
19
+ export default AppUploadFile;
20
+ //# sourceMappingURL=AppUploadFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppUploadFile.d.ts","sourceRoot":"","sources":["../../src/Form/AppUploadFile.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAW7C,eAAO,MAAM,YAAY;aAKd,MAAM;;;MAGb,IAsBH,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,IAAI,KAAG,QAAQ,MAAM,CAOvD,CAAC;AAEF,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACvD;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiG/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface SubmitButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ loading?: boolean;
4
+ icon?: React.ReactNode;
5
+ variant?: "default" | "primary" | "secondary" | "danger" | "ghost" | "outline";
6
+ size?: "sm" | "md" | "lg";
7
+ }
8
+ declare const SubmitButton: React.ForwardRefExoticComponent<SubmitButtonProps & React.RefAttributes<HTMLButtonElement>>;
9
+ export default SubmitButton;
10
+ //# sourceMappingURL=SubmitButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../src/Form/SubmitButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EACJ,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,YAAY,6FAiGjB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode, ReactElement } from "react";
2
+ import type { FormikValues, FormikProps } from "formik";
3
+ import { FormikConfig } from "formik";
4
+ export interface FormProps<T> extends FormikConfig<T> {
5
+ children?: ((props: FormikProps<T>) => ReactNode) | ReactNode;
6
+ className?: string;
7
+ }
8
+ declare const Form: <T extends FormikValues>({ children, className, ...props }: FormProps<T>) => ReactElement;
9
+ export default Form;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Form/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAA8B,YAAY,EAAE,MAAM,QAAQ,CAAC;AAElE,MAAM,WAAW,SAAS,CAAC,CAAC,CAAE,SAAQ,YAAY,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,IAAI,+EAIQ,YAUjB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface BackgroundIllustrationProps {
3
+ primaryColor?: string;
4
+ }
5
+ declare const _default: React.NamedExoticComponent<BackgroundIllustrationProps>;
6
+ export default _default;
7
+ //# sourceMappingURL=BackgroundIllustration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackgroundIllustration.d.ts","sourceRoot":"","sources":["../../../src/assets/illustrations/BackgroundIllustration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,UAAU,2BAA2B;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;;AAqCD,wBAA4C"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare function UploadIllustration({ className, ...other }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
3
+ declare const _default: import("react").MemoExoticComponent<typeof UploadIllustration>;
4
+ export default _default;
5
+ //# sourceMappingURL=UploadIllustration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadIllustration.d.ts","sourceRoot":"","sources":["../../../src/assets/illustrations/UploadIllustration.tsx"],"names":[],"mappings":";AAKA,iBAAS,kBAAkB,CAAC,EAC1B,SAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwoB1D;;AAED,wBAAwC"}
@@ -0,0 +1,2 @@
1
+ export { default as UploadIllustration } from './UploadIllustration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/illustrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface ExtendFile extends File {
2
+ preview?: string;
3
+ path?: string;
4
+ lastModifiedDate?: string;
5
+ }
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/file-thumbnail/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,26 @@
1
+ import type { ExtendFile } from "./types";
2
+ export declare function fileFormat(fileUrl: string | undefined): string;
3
+ export declare function fileThumb(fileUrl: string): string;
4
+ export declare function fileTypeByUrl(fileUrl?: string): string;
5
+ export declare function fileNameByUrl(fileUrl: string): string | undefined;
6
+ export declare function fileData(file: ExtendFile | string): {
7
+ key: string;
8
+ preview: string;
9
+ name: string | undefined;
10
+ type: string;
11
+ size?: undefined;
12
+ path?: undefined;
13
+ lastModified?: undefined;
14
+ lastModifiedDate?: undefined;
15
+ } | {
16
+ key: string | undefined;
17
+ name: string;
18
+ size: number;
19
+ path: string | undefined;
20
+ type: string;
21
+ preview: string | undefined;
22
+ lastModified: number;
23
+ lastModifiedDate: string | undefined;
24
+ };
25
+ export declare function formatFileSize(bytes: number): string;
26
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/file-thumbnail/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAqB1C,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CA0C9D;AAID,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4CjD;AAID,wBAAgB,aAAa,CAAC,OAAO,SAAK,GAAG,MAAM,CAGlD;AAID,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEjE;AAKD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;;;;;;;;;;;;;;;;;;EAsBjD;AAGD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMpD"}
package/dist/index.d.ts CHANGED
@@ -23,6 +23,23 @@ export type { UploadProps, CustomFile, FileWithPreview } from '../upload/types';
23
23
  export type { FormProps } from '../Form/index';
24
24
  export type { FileItem } from '../upload/preview/MultiFilePreview';
25
25
  export type { ExtendFile } from '../file-thumbnail/types';
26
+ export type { AppAutoCompleterProps } from '../Form/AppAutoCompleter';
27
+ export type { AppCheckBoxProps, CheckboxOption } from '../Form/AppCheckBox';
28
+ export type { AppDateTimeInputProps } from '../Form/AppDateAndTimePicker';
29
+ export type { AppDatePickerProps } from '../Form/AppDatePicker';
30
+ export type { AppFormErrorMessageProps } from '../Form/AppFormErrorMessage';
31
+ export type { AppInputFieldProps } from '../Form/AppInputField';
32
+ export type { AppMultiSelectProps, AppSelectOption } from '../Form/AppMultiSelector';
33
+ export type { AppPhoneNoInputProps } from '../Form/AppPhoneNoInput';
34
+ export type { AppRadioGroupProps, RadioOption } from '../Form/AppRadioGroup';
35
+ export type { AppRatingProps } from '../Form/AppRating';
36
+ export type { AppSelectProps } from '../Form/AppSelectInput';
37
+ export type { AppSimpleUploadFileProps } from '../Form/AppSimpleUploadFile';
38
+ export type { AppSwitchProps } from '../Form/AppSwitch';
39
+ export type { AppTagsCreatorProps } from '../Form/AppTagsCreator';
40
+ export type { AppTextAreaProps } from '../Form/AppTextArea';
41
+ export type { AppUploadFileProps } from '../Form/AppUploadFile';
42
+ export type { SubmitButtonProps } from '../Form/SubmitButton';
26
43
  export { UploadIllustration } from '../assets/illustrations';
27
44
  export * from '../file-thumbnail/types';
28
45
  export * from '../file-thumbnail/utils';
@@ -0,0 +1,46 @@
1
+ import '../styles/compiled-tailwind.css';
2
+ import '../styles/PhoneInputCustom.css';
3
+ export { default as Form } from '../Form/index';
4
+ export { default as AppAutoCompleter } from '../Form/AppAutoCompleter';
5
+ export { default as AppCheckBox } from '../Form/AppCheckBox';
6
+ export { default as AppDateAndTimePicker } from '../Form/AppDateAndTimePicker';
7
+ export { default as AppDatePicker } from '../Form/AppDatePicker';
8
+ export { default as AppFormErrorMessage } from '../Form/AppFormErrorMessage';
9
+ export { default as AppInputField } from '../Form/AppInputField';
10
+ export { default as AppMultiSelector } from '../Form/AppMultiSelector';
11
+ export { default as AppPhoneNoInput } from '../Form/AppPhoneNoInput';
12
+ export { default as AppRadioGroup } from '../Form/AppRadioGroup';
13
+ export { default as AppRating } from '../Form/AppRating';
14
+ export { default as AppSelectInput } from '../Form/AppSelectInput';
15
+ export { default as AppSimpleUploadFile } from '../Form/AppSimpleUploadFile';
16
+ export { default as AppSwitch } from '../Form/AppSwitch';
17
+ export { default as AppTagsCreator } from '../Form/AppTagsCreator';
18
+ export { default as AppTextArea } from '../Form/AppTextArea';
19
+ export { default as AppUploadFile } from '../Form/AppUploadFile';
20
+ export { default as SubmitButton } from '../Form/SubmitButton';
21
+ export { Upload, RejectionFiles, MultiFilePreview, SingleFilePreview } from '../upload';
22
+ export type { UploadProps, CustomFile, FileWithPreview } from '../upload/types';
23
+ export type { FormProps } from '../Form/index';
24
+ export type { FileItem } from '../upload/preview/MultiFilePreview';
25
+ export type { ExtendFile } from '../file-thumbnail/types';
26
+ export type { AppAutoCompleterProps } from '../Form/AppAutoCompleter';
27
+ export type { AppCheckBoxProps, CheckboxOption } from '../Form/AppCheckBox';
28
+ export type { AppDateTimeInputProps } from '../Form/AppDateAndTimePicker';
29
+ export type { AppDatePickerProps } from '../Form/AppDatePicker';
30
+ export type { AppFormErrorMessageProps } from '../Form/AppFormErrorMessage';
31
+ export type { AppInputFieldProps } from '../Form/AppInputField';
32
+ export type { AppMultiSelectProps, AppSelectOption } from '../Form/AppMultiSelector';
33
+ export type { AppPhoneNoInputProps } from '../Form/AppPhoneNoInput';
34
+ export type { AppRadioGroupProps, RadioOption } from '../Form/AppRadioGroup';
35
+ export type { AppRatingProps } from '../Form/AppRating';
36
+ export type { AppSelectProps } from '../Form/AppSelectInput';
37
+ export type { AppSimpleUploadFileProps } from '../Form/AppSimpleUploadFile';
38
+ export type { AppSwitchProps } from '../Form/AppSwitch';
39
+ export type { AppTagsCreatorProps } from '../Form/AppTagsCreator';
40
+ export type { AppTextAreaProps } from '../Form/AppTextArea';
41
+ export type { AppUploadFileProps } from '../Form/AppUploadFile';
42
+ export type { SubmitButtonProps } from '../Form/SubmitButton';
43
+ export { UploadIllustration } from '../assets/illustrations';
44
+ export * from '../file-thumbnail/types';
45
+ export * from '../file-thumbnail/utils';
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,13 @@
1
+ declare let AnimatePresence: any;
2
+ declare let motion: any;
3
+ declare let Combobox: any;
4
+ declare let Transition: any;
5
+ declare let ChevronUpDownIcon: any;
6
+ declare let CheckIcon: any;
7
+ declare let ChevronDownIcon: any;
8
+ declare let XMarkIcon: any;
9
+ declare let ChevronUpIcon: any;
10
+ declare let PlusIcon: any;
11
+ declare let ExclamationCircleIcon: any;
12
+ export { AnimatePresence, motion, Combobox, Transition, ChevronUpDownIcon, CheckIcon, ChevronDownIcon, XMarkIcon, ChevronUpIcon, PlusIcon, ExclamationCircleIcon };
13
+ //# sourceMappingURL=optional-deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional-deps.d.ts","sourceRoot":"","sources":["../../src/lib/optional-deps.ts"],"names":[],"mappings":"AAKA,QAAA,IAAI,eAAe,EAAE,GAAqC,CAAC;AAC3D,QAAA,IAAI,MAAM,EAAE,GAIX,CAAC;AAWF,QAAA,IAAI,QAAQ,EAAE,GAAkF,CAAC;AACjG,QAAA,IAAI,UAAU,EAAE,GAAkF,CAAC;AA4BnG,QAAA,IAAI,iBAAiB,EAAE,GAA8C,CAAC;AACtE,QAAA,IAAI,SAAS,EAAE,GAAyC,CAAC;AACzD,QAAA,IAAI,eAAe,EAAE,GAA8C,CAAC;AACpE,QAAA,IAAI,SAAS,EAAE,GAAwC,CAAC;AACxD,QAAA,IAAI,aAAa,EAAE,GAA8C,CAAC;AAClE,QAAA,IAAI,QAAQ,EAAE,GAA0C,CAAC;AACzD,QAAA,IAAI,qBAAqB,EAAE,GAA+F,CAAC;AAe3H,OAAO,EACL,eAAe,EACf,MAAM,EACN,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,SAAS,EACT,aAAa,EACb,QAAQ,EACR,qBAAqB,EACtB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { UploadProps } from "./types";
3
+ declare const Upload: React.FC<UploadProps>;
4
+ export default Upload;
5
+ //# sourceMappingURL=Upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../src/upload/Upload.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAuD3C,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+FjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { FileRejection } from "react-dropzone";
3
+ type Props = {
4
+ fileRejections: readonly FileRejection[];
5
+ };
6
+ export default function RejectionFiles({ fileRejections, }: Props): React.JSX.Element | null;
7
+ export {};
8
+ //# sourceMappingURL=RejectionFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RejectionFiles.d.ts","sourceRoot":"","sources":["../../../src/upload/errors/RejectionFiles.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKpD,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;CAC1C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,cAAc,GACf,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAmClC"}
@@ -0,0 +1,6 @@
1
+ export * from "./types";
2
+ export { default as RejectionFiles } from "./errors/RejectionFiles";
3
+ export { default as MultiFilePreview } from "./preview/MultiFilePreview";
4
+ export { default as SingleFilePreview } from "./preview/SingleFilePreview";
5
+ export { default as Upload } from "./Upload";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/upload/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { UploadProps } from "../types";
3
+ export interface FileItem extends File {
4
+ id?: number | string;
5
+ preview?: string;
6
+ url?: string;
7
+ is_private?: boolean;
8
+ [key: string]: unknown;
9
+ }
10
+ export default function MultiFilePreview({ thumbnail, files, onRemove, className, isClickable, isEditable, onDeleteButtonClick, onPrivacyUpdateClick, }: UploadProps): React.JSX.Element | null;
11
+ //# sourceMappingURL=MultiFilePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiFilePreview.d.ts","sourceRoot":"","sources":["../../../src/upload/preview/MultiFilePreview.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,MAAM,WAAW,QAAS,SAAQ,IAAI;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,SAAc,EACd,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,oBAAoB,GACrB,EAAE,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgRxC"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { CustomFile } from "../types";
3
+ type Props = {
4
+ file: CustomFile | string | null;
5
+ className?: string;
6
+ };
7
+ export default function SingleFilePreview({ file, className, }: Props): React.JSX.Element | null;
8
+ export {};
9
+ //# sourceMappingURL=SingleFilePreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleFilePreview.d.ts","sourceRoot":"","sources":["../../../src/upload/preview/SingleFilePreview.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,IAAI,EACJ,SAAc,GACf,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAiElC"}
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import type { DropzoneOptions, FileRejection, DropEvent } from "react-dropzone";
3
+ import type { FileItem } from "./preview/MultiFilePreview";
4
+ export interface CustomFile extends File {
5
+ path?: string;
6
+ preview?: string;
7
+ lastModifiedDate?: Date;
8
+ url?: string;
9
+ name: string;
10
+ }
11
+ export interface UploadProps extends Omit<DropzoneOptions, "onDrop"> {
12
+ error?: boolean;
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ thumbnail?: boolean;
16
+ isClickable?: boolean;
17
+ placeholder?: React.ReactNode;
18
+ helperText?: React.ReactNode;
19
+ disableMultiple?: boolean;
20
+ isEditable?: boolean;
21
+ onDeleteButtonClick?: (file: FileItem) => void;
22
+ onPrivacyUpdateClick?: (file: FileItem) => void;
23
+ file?: CustomFile | string | File | null;
24
+ onDelete?: () => void;
25
+ files?: (File | string | {
26
+ name: string;
27
+ url: string;
28
+ preview?: string;
29
+ })[];
30
+ onUpload?: () => void;
31
+ onRemove?: (file: CustomFile | string) => void;
32
+ onRemoveAll?: () => void;
33
+ onDrop?: <T extends File>(acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent) => void;
34
+ }
35
+ export interface FileWithPreview extends File {
36
+ preview?: string;
37
+ url?: string;
38
+ }
39
+ export declare const isFileWithPreview: (file: unknown) => file is FileWithPreview;
40
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/upload/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAI3D,MAAM,WAAW,UAAW,SAAQ,IAAI;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC/C,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEhD,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,KAAK,CAAC,EAAE,CAAC,IAAI,GAAG,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC5E,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAEzB,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,EACtB,aAAa,EAAE,CAAC,EAAE,EAClB,cAAc,EAAE,aAAa,EAAE,EAC/B,KAAK,EAAE,SAAS,KACb,IAAI,CAAC;CACX;AAGD,MAAM,WAAW,eAAgB,SAAQ,IAAI;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,iBAAiB,SAAU,OAAO,4BAE9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formik-form-components",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Lightweight React form components built with Tailwind CSS - customizable, accessible, and ready to use",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -9,9 +9,7 @@
9
9
  "*.css"
10
10
  ],
11
11
  "files": [
12
- "dist/index.js",
13
- "dist/index.esm.js",
14
- "dist/index.d.ts",
12
+ "dist",
15
13
  "README.md"
16
14
  ],
17
15
  "scripts": {
@@ -50,7 +48,8 @@
50
48
  "@heroicons/react": ">=2.0.0",
51
49
  "framer-motion": ">=10.0.0",
52
50
  "react-dropzone": ">=14.0.0",
53
- "react-phone-number-input": ">=3.0.0"
51
+ "react-phone-number-input": ">=3.0.0",
52
+ "clsx": ">=2.0.0"
54
53
  },
55
54
  "dependencies": {
56
55
  "formik": "^2.4.9",
@@ -58,7 +57,8 @@
58
57
  "@heroicons/react": "^2.2.0",
59
58
  "framer-motion": "^12.23.26",
60
59
  "react-dropzone": "^14.3.8",
61
- "react-phone-number-input": "^3.4.14"
60
+ "react-phone-number-input": "^3.4.14",
61
+ "clsx": "^2.1.1"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@rollup/plugin-commonjs": "^25.0.8",