@elcrm/form 0.0.62 → 0.0.64

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 (89) hide show
  1. package/README.md +113 -0
  2. package/dist/Form.d.ts +20 -0
  3. package/dist/Form.js +11 -0
  4. package/dist/FormInitContext.d.ts +25 -0
  5. package/dist/FormInitContext.js +20 -0
  6. package/dist/assets/styles/Field.module.css +1 -0
  7. package/dist/assets/styles/Form.module.css +1 -0
  8. package/dist/assets/styles/Select.module.css +1 -0
  9. package/dist/core/Field.d.ts +18 -0
  10. package/dist/core/Field.js +33 -0
  11. package/dist/events/onEvent.d.ts +55 -0
  12. package/dist/events/onEvent.js +67 -0
  13. package/dist/{src/lib/fields → fields}/Date.d.ts +7 -3
  14. package/dist/fields/Date.js +345 -0
  15. package/dist/{src/lib/fields → fields}/Input.d.ts +2 -2
  16. package/dist/fields/Input.js +55 -0
  17. package/dist/fields/Mask.d.ts +9 -0
  18. package/dist/fields/Mask.js +95 -0
  19. package/dist/fields/Modal.d.ts +25 -0
  20. package/dist/fields/Modal.js +55 -0
  21. package/dist/fields/Money.d.ts +35 -0
  22. package/dist/fields/Money.js +93 -0
  23. package/dist/fields/Numeric.d.ts +9 -0
  24. package/dist/fields/Numeric.js +69 -0
  25. package/dist/fields/Options.d.ts +30 -0
  26. package/dist/fields/Options.js +63 -0
  27. package/dist/fields/Password.d.ts +6 -0
  28. package/dist/fields/Password.js +100 -0
  29. package/dist/{src/lib/fields → fields}/Phone.d.ts +5 -1
  30. package/dist/fields/Phone.js +109 -0
  31. package/dist/fields/Range.d.ts +16 -0
  32. package/dist/fields/Range.js +101 -0
  33. package/dist/fields/Select.d.ts +21 -0
  34. package/dist/fields/Select.js +143 -0
  35. package/dist/{src/lib/fields → fields}/Textarea.d.ts +5 -1
  36. package/dist/fields/Textarea.js +47 -0
  37. package/dist/fields/Time.d.ts +26 -0
  38. package/dist/fields/Time.js +252 -0
  39. package/dist/fields/type.d.ts +42 -0
  40. package/dist/hooks/use.d.ts +42 -0
  41. package/dist/hooks/use.js +57 -0
  42. package/dist/index.d.ts +26 -2
  43. package/dist/index.js +26 -0
  44. package/dist/index.umd.js +2 -89
  45. package/dist/mask/MaskPhone.d.ts +8 -0
  46. package/dist/mask/MaskPhone.js +1384 -0
  47. package/dist/package.js +96 -0
  48. package/dist/style.css +5 -0
  49. package/dist/styles/Field.module.js +22 -0
  50. package/dist/styles/Form.module.js +12 -0
  51. package/dist/styles/Select.module.js +8 -0
  52. package/package.json +72 -11
  53. package/src/lib/styles/Field.module.scss +315 -0
  54. package/src/lib/styles/Form.module.scss +313 -0
  55. package/src/lib/styles/Select.module.scss +90 -0
  56. package/src/lib/styles/dark.css +47 -0
  57. package/src/lib/styles/light.css +51 -0
  58. package/dist/index.css +0 -1
  59. package/dist/index.es.js +0 -5045
  60. package/dist/src/lib/Captcha.d.ts +0 -1
  61. package/dist/src/lib/Check.d.ts +0 -13
  62. package/dist/src/lib/Code.d.ts +0 -22
  63. package/dist/src/lib/Color.d.ts +0 -22
  64. package/dist/src/lib/Field.d.ts +0 -13
  65. package/dist/src/lib/Files.d.ts +0 -20
  66. package/dist/src/lib/Generator.d.ts +0 -1
  67. package/dist/src/lib/Group.d.ts +0 -21
  68. package/dist/src/lib/Image.d.ts +0 -22
  69. package/dist/src/lib/Init.d.ts +0 -1
  70. package/dist/src/lib/MaskPhone.d.ts +0 -2
  71. package/dist/src/lib/Message.d.ts +0 -15
  72. package/dist/src/lib/Money.d.ts +0 -22
  73. package/dist/src/lib/Month.d.ts +0 -18
  74. package/dist/src/lib/Palette.d.ts +0 -9
  75. package/dist/src/lib/Progress.d.ts +0 -9
  76. package/dist/src/lib/Toogle.d.ts +0 -8
  77. package/dist/src/lib/Users.d.ts +0 -1
  78. package/dist/src/lib/_Time.d.ts +0 -0
  79. package/dist/src/lib/fields/Mask.d.ts +0 -19
  80. package/dist/src/lib/fields/Modal.d.ts +0 -19
  81. package/dist/src/lib/fields/Numeric.d.ts +0 -6
  82. package/dist/src/lib/fields/Options.d.ts +0 -22
  83. package/dist/src/lib/fields/Password.d.ts +0 -23
  84. package/dist/src/lib/fields/Select copy.d.ts +0 -23
  85. package/dist/src/lib/fields/Select.d.ts +0 -28
  86. package/dist/src/lib/fields/type.d.ts +0 -30
  87. package/dist/src/lib/index.d.ts +0 -16
  88. package/dist/src/lib/onEvent.d.ts +0 -2
  89. package/dist/src/lib/use.d.ts +0 -10
@@ -1 +0,0 @@
1
- export default function ({ value, onValue, maxLength, placeholder, name, }: any): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- interface Check {
2
- onValue: (a: any) => void;
3
- value?: any;
4
- className?: string;
5
- label?: string;
6
- title?: string;
7
- name?: string;
8
- reload?: boolean;
9
- text?: string;
10
- id?: string;
11
- }
12
- export default function ({ onValue, label, value, title, className, name, text, id, reload, }: Check): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,22 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onBlur?: Function;
5
- onSave?: Function;
6
- name?: string;
7
- placeholder?: string;
8
- title?: string;
9
- label?: string;
10
- error?: string;
11
- hide?: boolean;
12
- edit?: boolean;
13
- active?: Boolean;
14
- after?: string;
15
- show?: Boolean;
16
- view?: string;
17
- className?: string;
18
- real?: any;
19
- empty?: any;
20
- }
21
- export default function ({ className, title, error, edit, real, onValue, empty, name, }: Input): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,22 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onBlur?: Function;
5
- onSave?: Function;
6
- name?: string;
7
- placeholder?: string;
8
- title?: string;
9
- label?: string;
10
- error?: string;
11
- hide?: boolean;
12
- edit?: boolean;
13
- active?: Boolean;
14
- after?: string;
15
- length?: number;
16
- show?: Boolean;
17
- view?: string;
18
- id?: string;
19
- className?: string;
20
- }
21
- export default function ({ id, value, onValue, name, placeholder, title, error, hide, length, edit, active, after, show, view, onSave, className, }: Input): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,13 +0,0 @@
1
- interface Input {
2
- element_blok?: any;
3
- element_input?: any;
4
- title?: string;
5
- before?: any;
6
- type?: string;
7
- after?: any;
8
- children?: any;
9
- ref?: any;
10
- error?: string;
11
- }
12
- declare const MyComponent: import('react').ForwardRefExoticComponent<Omit<Input, "ref"> & import('react').RefAttributes<unknown>>;
13
- export default MyComponent;
@@ -1,20 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onBlur?: Function;
5
- onSave?: Function;
6
- name?: string;
7
- placeholder?: string;
8
- title?: string;
9
- label?: string;
10
- error?: string;
11
- hide?: boolean;
12
- edit?: boolean;
13
- active?: Boolean;
14
- after?: string;
15
- show?: Boolean;
16
- view?: string;
17
- className?: string;
18
- }
19
- export default function ({ value, onValue, name, placeholder, title, error, hide, edit, active, after, show, view, onSave, className, }: Input): import("react/jsx-runtime").JSX.Element | "";
20
- export {};
@@ -1 +0,0 @@
1
- export default function (props: any): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- label?: string;
9
- error?: string;
10
- hide?: boolean;
11
- edit?: boolean;
12
- active?: Boolean;
13
- after?: string;
14
- show?: Boolean;
15
- view?: string;
16
- separator: string;
17
- className?: string;
18
- max?: number;
19
- }
20
- export default function ({ value, onValue, name, placeholder, title, error, hide, edit, active, after, show, view, max, onSave, className, separator, }: Input): import("react/jsx-runtime").JSX.Element | "";
21
- export {};
@@ -1,22 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onBlur?: Function;
5
- onSave?: Function;
6
- name?: string;
7
- placeholder?: string;
8
- title?: string;
9
- label?: string;
10
- error?: string;
11
- hide?: boolean;
12
- edit?: boolean;
13
- active?: Boolean;
14
- after?: string;
15
- show?: Boolean;
16
- view?: string;
17
- link?: string;
18
- className?: string;
19
- type?: "png" | "jpeg" | "webp";
20
- }
21
- export default function ({ value, onValue, name, placeholder, title, link, error, hide, edit, active, after, show, type, view, onSave, className, }: Input): import("react/jsx-runtime").JSX.Element | "";
22
- export {};
@@ -1 +0,0 @@
1
- export default function (): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- declare const j: any;
2
- export default j;
@@ -1,15 +0,0 @@
1
- interface Message {
2
- value?: any;
3
- onValue?: any;
4
- onActive?: any;
5
- data?: any;
6
- name?: any;
7
- view?: any;
8
- edit?: any;
9
- active?: any;
10
- placeholder?: any;
11
- listen?: any;
12
- maxLength?: number;
13
- }
14
- export default function ({ value, onValue, onActive, data, name, view, maxLength, edit, active, placeholder, }: Message): any;
15
- export {};
@@ -1,22 +0,0 @@
1
- interface Input {
2
- value?: string | number;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- label?: string;
9
- error?: string;
10
- hide?: boolean;
11
- edit?: boolean;
12
- active?: Boolean;
13
- after?: string;
14
- show?: Boolean;
15
- view?: string;
16
- type?: string;
17
- className?: string;
18
- course?: number;
19
- isClear?: boolean;
20
- }
21
- export default function ({ value, onValue, name, placeholder, title, error, hide, edit, active, after, show, course, view, type, onSave, className, isClear, }: Input): import("react/jsx-runtime").JSX.Element | "";
22
- export {};
@@ -1,18 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- name?: string;
5
- placeholder?: string;
6
- title?: string;
7
- error?: string;
8
- hide?: string;
9
- edit?: Boolean;
10
- active?: Boolean;
11
- after?: string;
12
- show?: Boolean;
13
- view?: string;
14
- className?: string;
15
- icon?: JSX.Element;
16
- }
17
- export default function ({ value, onValue, name, error, icon, edit, active, title, placeholder, className, }: Input): import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,9 +0,0 @@
1
- interface Palette {
2
- onValue: Function;
3
- name?: string;
4
- item?: string;
5
- value?: string;
6
- label?: string;
7
- }
8
- declare const Palette: ({ label, onValue, value, name, item }: Palette) => import("react/jsx-runtime").JSX.Element;
9
- export default Palette;
@@ -1,9 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export type TProgress = {
3
- name?: string;
4
- className?: string;
5
- value?: any;
6
- title?: any;
7
- style?: CSSProperties;
8
- };
9
- export default function ({ name, value, title, style, className }: TProgress): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- interface Toogle {
2
- onValue: Function;
3
- name?: string;
4
- item?: string;
5
- value?: string;
6
- }
7
- declare const Toogle: ({ onValue, value, name, item }: Toogle) => import("react/jsx-runtime").JSX.Element;
8
- export default Toogle;
@@ -1 +0,0 @@
1
- export default function (props: any): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -1,19 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- error?: string;
9
- hide?: boolean;
10
- edit?: boolean;
11
- show?: boolean;
12
- active?: boolean;
13
- after?: string;
14
- view?: string;
15
- format?: string;
16
- className?: string;
17
- }
18
- export default function ({ value, onValue, onSave, name, format, placeholder, title, error, hide, edit, active, after, show, view, className, }: Input): import("react/jsx-runtime").JSX.Element;
19
- export {};
@@ -1,19 +0,0 @@
1
- interface Input {
2
- value?: string | [string | number, string];
3
- onValue?: Function;
4
- name: string;
5
- placeholder?: string;
6
- title?: string;
7
- error?: string;
8
- hide?: boolean;
9
- edit?: boolean;
10
- show?: boolean;
11
- active?: boolean;
12
- after?: string;
13
- view?: string;
14
- className?: string;
15
- modal: string;
16
- options?: any;
17
- }
18
- export default function ({ value, onValue, name, placeholder, title, error, hide, edit, show, active, after, view, modal, options, className, }: Input): import("react/jsx-runtime").JSX.Element;
19
- export {};
@@ -1,6 +0,0 @@
1
- import { TInput } from './type';
2
- type TNumeric = TInput & {
3
- max?: number;
4
- };
5
- export default function Number({ onValue, onSave, active, max, edit, title, error, show, hide, value, placeholder, className, maxLength, name, after, before, view, }: TNumeric): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,22 +0,0 @@
1
- interface Input {
2
- value?: string;
3
- onValue?: Function;
4
- name: string;
5
- placeholder?: string;
6
- title?: string;
7
- error?: string;
8
- hide?: boolean;
9
- edit?: boolean;
10
- show?: boolean;
11
- active?: boolean;
12
- after?: string;
13
- view?: string;
14
- className?: string;
15
- module?: string;
16
- modal?: string;
17
- options?: any;
18
- outFormat?: "array" | "string" | "object";
19
- separator?: string;
20
- }
21
- export default function ({ value, onValue, name, placeholder, separator, title, error, hide, edit, active, outFormat, after, modal, options, className, }: Input): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,23 +0,0 @@
1
- interface Data {
2
- value?: string;
3
- onValue?: Function;
4
- onSave?: Function;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- error?: string;
9
- hide?: string;
10
- edit?: Boolean;
11
- active?: Boolean;
12
- after?: any;
13
- show?: Boolean;
14
- view?: string;
15
- className?: string;
16
- reload?: boolean;
17
- native?: boolean;
18
- isShow?: boolean;
19
- maxLength?: number;
20
- eyes?: any;
21
- }
22
- export default function ({ value, onValue, onSave, name, placeholder, className, title, error, edit, active, reload, native, isShow, maxLength, eyes, after, }: Data): import("react/jsx-runtime").JSX.Element | "";
23
- export {};
@@ -1,23 +0,0 @@
1
- export type TSelect = {
2
- value?: number;
3
- onValue?: Function;
4
- name?: string;
5
- isReload?: boolean;
6
- placeholder?: string;
7
- title?: string;
8
- error?: string;
9
- hide?: boolean;
10
- edit?: Boolean;
11
- active?: Boolean;
12
- after?: string;
13
- show?: Boolean;
14
- view?: string;
15
- className?: string;
16
- isIcon?: Boolean;
17
- options?: Record<number, {
18
- n: string;
19
- s: number;
20
- }>;
21
- order?: any;
22
- };
23
- export default function ({ title, error, edit, active, hide, value, onValue, options, placeholder, className, isIcon, name, after, view, order, isReload, }: TSelect): import("react/jsx-runtime").JSX.Element | "";
@@ -1,28 +0,0 @@
1
- export type TSelect = {
2
- value?: number;
3
- onValue?: Function;
4
- name?: string;
5
- isReload?: boolean;
6
- placeholder?: string;
7
- title?: string;
8
- error?: string;
9
- hide?: boolean;
10
- edit?: Boolean;
11
- active?: Boolean;
12
- after?: string;
13
- show?: Boolean;
14
- view?: string;
15
- className?: string;
16
- isIcon?: Boolean;
17
- options?: Record<number, {
18
- n: string;
19
- s: number;
20
- }> | Array<{
21
- id?: number;
22
- i?: number;
23
- n: string;
24
- s?: number;
25
- }>;
26
- order?: any;
27
- };
28
- export default function ({ title, error, edit, active, hide, value, onValue, options, placeholder, className, isIcon, name, after, view, order, isReload, }: TSelect): import("react/jsx-runtime").JSX.Element | "";
@@ -1,30 +0,0 @@
1
- export type TInput = {
2
- value?: string;
3
- onValue?: (data: TValue) => void | Promise<void>;
4
- onSave?: (data: TValue) => void | Promise<void>;
5
- name?: string;
6
- placeholder?: string;
7
- title?: string;
8
- label?: string;
9
- disabled?: boolean;
10
- error?: string;
11
- hide?: boolean;
12
- edit?: boolean;
13
- active?: Boolean;
14
- after?: any;
15
- before?: any;
16
- show?: Boolean;
17
- view?: string;
18
- id?: string;
19
- className?: string;
20
- isCopy?: boolean;
21
- maxLength?: number;
22
- isReload?: boolean;
23
- spellCheck?: boolean;
24
- inputmode?: "text" | "email" | "none" | "tel" | "url" | "search" | "numeric" | "decimal";
25
- };
26
- export type TValue = {
27
- value: string;
28
- name: string;
29
- reload?: boolean;
30
- };
@@ -1,16 +0,0 @@
1
- export { default as Progress } from './Progress';
2
- export { default as Month } from './Month';
3
- export { default as Money } from './Money';
4
- export { default as MaskField } from './fields/Mask';
5
- export { default as DateField } from './fields/Date';
6
- export { default as TextareaField } from './fields/Textarea';
7
- export { default as PhoneField } from './fields/Phone';
8
- export { default as StringField } from './fields/Input';
9
- export { default as NumberField } from './fields/Numeric';
10
- export { default as OptionsField } from './fields/Options';
11
- export { default as SelectField } from './fields/Select';
12
- export { default as ModalField } from './fields/Modal';
13
- export { default as PasswordField } from './fields/Password';
14
- export { default as Check } from './Check';
15
- export { useData, setValue, runReload, useError } from './use';
16
- export type { TInput, TValue } from './fields/type';
@@ -1,2 +0,0 @@
1
- declare let on: any;
2
- export default on;
@@ -1,10 +0,0 @@
1
- export declare function useData(f?: {}): any[];
2
- type Value = {
3
- value: any;
4
- name: string;
5
- reload?: boolean;
6
- };
7
- export declare function setValue(f: Value): void;
8
- export declare function runReload(f: any): void;
9
- export declare function useError(f?: {}): any[];
10
- export {};