@app-studio/web 0.3.53 → 0.3.55

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 (50) hide show
  1. package/dist/components/File/File.d.ts +1 -3
  2. package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +2 -2
  3. package/dist/components/Form/DatePicker/examples/index.d.ts +0 -1
  4. package/dist/components/Form/Form.d.ts +0 -8
  5. package/dist/components/Form/Password/Password/Password.state.d.ts +2 -2
  6. package/dist/components/Form/Select/Select/Select.props.d.ts +5 -5
  7. package/dist/components/Form/Select/Select/Select.state.d.ts +2 -2
  8. package/dist/components/Form/TextArea/TextArea/TextArea.props.d.ts +2 -2
  9. package/dist/components/Form/TextArea/TextArea/TextArea.state.d.ts +3 -3
  10. package/dist/components/Form/TextArea/examples/index.d.ts +0 -2
  11. package/dist/components/Form/TextField/TextField/TextField.props.d.ts +2 -2
  12. package/dist/components/Form/TextField/TextField/TextField.state.d.ts +3 -3
  13. package/dist/components/Form/TextField/examples/index.d.ts +0 -2
  14. package/dist/components/Formik/Formik.Checkbox.d.ts +6 -0
  15. package/dist/components/Formik/Formik.CountryPicker.d.ts +6 -0
  16. package/dist/components/Formik/Formik.DatePicker.d.ts +6 -0
  17. package/dist/components/Formik/Formik.Form.d.ts +25 -0
  18. package/dist/components/Formik/Formik.Hook.d.ts +1 -0
  19. package/dist/components/Formik/Formik.Password.d.ts +6 -0
  20. package/dist/components/Formik/Formik.Select.d.ts +6 -0
  21. package/dist/components/Formik/Formik.Switch.d.ts +3 -0
  22. package/dist/components/Formik/Formik.TextArea.d.ts +6 -0
  23. package/dist/components/Formik/Formik.TextField.d.ts +6 -0
  24. package/dist/components/Formik/examples/FormikCheckbox.d.ts +2 -0
  25. package/dist/components/Formik/examples/FormikPassword.d.ts +2 -0
  26. package/dist/components/Formik/examples/FormikTextArea.d.ts +2 -0
  27. package/dist/components/Formik/examples/FormikTextField.d.ts +2 -0
  28. package/dist/components/Formik/examples/index.d.ts +9 -0
  29. package/dist/components/Formik/index.d.ts +9 -0
  30. package/dist/components/Layout/View/View.d.ts +1 -1
  31. package/dist/pages/formik.page.d.ts +3 -0
  32. package/dist/web.cjs.development.js +95 -100
  33. package/dist/web.cjs.development.js.map +1 -1
  34. package/dist/web.cjs.production.min.js +1 -1
  35. package/dist/web.cjs.production.min.js.map +1 -1
  36. package/dist/web.esm.js +95 -100
  37. package/dist/web.esm.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/components/Form/FormField.d.ts +0 -10
  40. package/dist/components/Form/Password/example/FormikErrorInput.d.ts +0 -2
  41. package/dist/components/Form/Password/example/FormikHelperText.d.ts +0 -2
  42. package/dist/components/Form/TextArea/examples/FormikErrorInput.d.ts +0 -2
  43. package/dist/components/Form/TextArea/examples/FormikHelperText.d.ts +0 -2
  44. package/dist/components/Form/TextField/examples/FormikErrorInput.d.ts +0 -2
  45. package/dist/components/Form/TextField/examples/FormikHelperText.d.ts +0 -2
  46. package/dist/utils/form.d.ts +0 -10
  47. /package/dist/components/{Form/CountryPicker/examples/Formik.d.ts → Formik/examples/FormikCountryPicker.d.ts} +0 -0
  48. /package/dist/components/{Form/DatePicker/examples/Formik.d.ts → Formik/examples/FormikDatePicker.d.ts} +0 -0
  49. /package/dist/components/{Form/Select/examples/Formik.d.ts → Formik/examples/FormikSelect.d.ts} +0 -0
  50. /package/dist/components/{Form/Switch/examples/Formik.d.ts → Formik/examples/FormikSwitch.d.ts} +0 -0
@@ -3,6 +3,4 @@ export declare const FileSVG: ({ src, color, ...props }: {
3
3
  src: string;
4
4
  color?: string | undefined;
5
5
  }) => React.JSX.Element;
6
- export declare const FileImage: ({ path, ...props }: {
7
- path: string;
8
- }) => React.JSX.Element;
6
+ export declare const FileImage: ({ path, ...props }: any) => React.JSX.Element;
@@ -10,6 +10,6 @@ export declare const useCountryPickerState: ({ placeholder }: CountryPickerProps
10
10
  setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
11
11
  isFocused: boolean;
12
12
  setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
13
- selected: string;
14
- setSelected: React.Dispatch<React.SetStateAction<string>>;
13
+ value: string;
14
+ setValue: React.Dispatch<React.SetStateAction<string>>;
15
15
  };
@@ -3,7 +3,6 @@ export * from '../../../Form/DatePicker/examples/Default';
3
3
  export * from '../../../Form/DatePicker/examples/DisabledInput';
4
4
  export * from '../../../Form/DatePicker/examples/ErrorCheckbox';
5
5
  export * from '../../../Form/DatePicker/examples/FormCheckout';
6
- export * from '../../../Form/DatePicker/examples/Formik';
7
6
  export * from '../../../Form/DatePicker/examples/helperTextDatePicker';
8
7
  export * from '../../../Form/DatePicker/examples/ReadOnlyInput';
9
8
  export * from '../../../Form/DatePicker/examples/Shadow';
@@ -1,4 +1,3 @@
1
- import React, { PureComponent } from 'react';
2
1
  export * from './Checkbox/Checkbox';
3
2
  export * from './DatePicker/DatePicker';
4
3
  export * from './Label/Label';
@@ -8,10 +7,3 @@ export * from './Switch/Switch';
8
7
  export * from './TextArea/TextArea';
9
8
  export * from './TextField/TextField';
10
9
  export * from './Password/Password';
11
- import type { FieldProps } from 'formik';
12
- import { FormProps } from 'app-studio';
13
- export declare function Form(props: FormProps): React.JSX.Element;
14
- declare class FormContainer extends PureComponent<FieldProps> {
15
- render(): React.JSX.Element;
16
- }
17
- export default FormContainer;
@@ -7,8 +7,8 @@ export declare const usePasswordState: (props: PasswordProps) => {
7
7
  setIsFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
8
  isHovered: boolean;
9
9
  setIsHovered: import("react").Dispatch<import("react").SetStateAction<boolean>>;
10
- inputValue: string;
11
- setInputValue: import("react").Dispatch<import("react").SetStateAction<string>>;
10
+ setValue: import("react").Dispatch<any>;
11
+ value: any;
12
12
  isVisible: boolean;
13
13
  setIsVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
14
14
  };
@@ -80,11 +80,11 @@ export interface SelectViewProps extends SelectProps {
80
80
  /**
81
81
  * Optional prop indicating if an option is selected
82
82
  */
83
- selected: string | Array<string>;
83
+ value: string | Array<string>;
84
84
  /**
85
85
  * Optional callback prop to update the selected option
86
86
  */
87
- setSelected: Function;
87
+ setValue: Function;
88
88
  /**
89
89
  * Prop to determine if the select dropdown is hidden
90
90
  */
@@ -112,9 +112,9 @@ export interface SelectViewProps extends SelectProps {
112
112
  }
113
113
  export interface SelectBoxProps {
114
114
  /**
115
- * The option that will be selected
115
+ * The option that will be selected value
116
116
  */
117
- selected?: string | Array<string>;
117
+ value?: string | Array<string>;
118
118
  /**
119
119
  * If true, the select will be unusable
120
120
  */
@@ -184,7 +184,7 @@ export interface HiddenSelectProps {
184
184
  /**
185
185
  * The option that has been selected
186
186
  */
187
- selected: string | Array<string>;
187
+ value: string | Array<string>;
188
188
  /**
189
189
  * If true, multiple options can be selected
190
190
  */
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { SelectProps } from './Select.props';
3
3
  export declare const useSelectState: ({ placeholder, isMulti, options, }: SelectProps) => {
4
- selected: string | string[];
5
- setSelected: React.Dispatch<React.SetStateAction<string | string[]>>;
4
+ value: string | string[];
5
+ setValue: React.Dispatch<React.SetStateAction<string | string[]>>;
6
6
  hide: boolean;
7
7
  setHide: React.Dispatch<React.SetStateAction<boolean>>;
8
8
  isHovered: boolean;
@@ -128,11 +128,11 @@ export interface TextAreaViewProps extends TextAreaProps {
128
128
  /**
129
129
  * The current value of the textarea input.
130
130
  */
131
- inputValue?: string | number;
131
+ value?: string | number;
132
132
  /**
133
133
  * Callback prop to update the value of the textarea input.
134
134
  */
135
- setInputValue?: Function;
135
+ setValue?: Function;
136
136
  /**
137
137
  * Prop indicating if the textarea is currently focused.
138
138
  */
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { TextAreaProps } from './TextArea.props';
3
- export declare const useTextAreaState: ({ label, placeholder, defaultValue, value, }: TextAreaProps) => {
3
+ export declare const useTextAreaState: ({ label, placeholder, value: defaultValue }: TextAreaProps) => {
4
4
  hint: string | undefined;
5
5
  setHint: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
6
6
  isHovered: boolean;
7
7
  setIsHovered: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
- inputValue: string | number;
9
- setInputValue: import("react").Dispatch<import("react").SetStateAction<string | number>>;
8
+ value: string | number;
9
+ setValue: import("react").Dispatch<import("react").SetStateAction<string | number>>;
10
10
  isFocused: boolean;
11
11
  setIsFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
12
  };
@@ -2,8 +2,6 @@ export { ColorArea } from '../../../Form/TextArea/examples/ColorScheme';
2
2
  export { DefaultArea } from '../../../Form/TextArea/examples/Default';
3
3
  export { DisabledArea } from '../../../Form/TextArea/examples/DisabledInput';
4
4
  export { ErrorArea } from '../../../Form/TextArea/examples/ErrorInput';
5
- export { FormikErrorArea } from '../../../Form/TextArea/examples/FormikErrorInput';
6
- export { FormikHelperTextArea } from '../../../Form/TextArea/examples/FormikHelperText';
7
5
  export { HelperTextArea } from '../../../Form/TextArea/examples/HelperText';
8
6
  export { LabelArea } from '../../../Form/TextArea/examples/LabelInput';
9
7
  export { MaxArea } from '../../../Form/TextArea/examples/MaxRowCol';
@@ -118,7 +118,7 @@ export interface TextFieldViewProps extends TextFieldProps {
118
118
  /** Function to set the hovered state of the text field */
119
119
  setIsHovered?: Function;
120
120
  /** The current value of the text field */
121
- inputValue?: string;
121
+ value?: string;
122
122
  /** Function to set the value of the text field */
123
- setInputValue?: Function;
123
+ setValue?: Function;
124
124
  }
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { TextFieldProps } from './TextField.props';
3
- export declare const useTextFieldState: ({ label, placeholder, value, }: TextFieldProps) => {
3
+ export declare const useTextFieldState: ({ label, placeholder, value: defaultValue }: TextFieldProps) => {
4
4
  hint: string | undefined;
5
5
  setHint: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
6
6
  isFocused: boolean;
7
7
  setIsFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
8
  isHovered: boolean;
9
9
  setIsHovered: import("react").Dispatch<import("react").SetStateAction<boolean>>;
10
- inputValue: string;
11
- setInputValue: import("react").Dispatch<import("react").SetStateAction<string>>;
10
+ setValue: import("react").Dispatch<import("react").SetStateAction<string>>;
11
+ value: string;
12
12
  };
@@ -3,8 +3,6 @@ export * from '../../../Form/TextField/examples/ColorScheme';
3
3
  export * from '../../../Form/TextField/examples/Default';
4
4
  export * from '../../../Form/TextField/examples/DisabledInput';
5
5
  export * from '../../../Form/TextField/examples/ErrorInput';
6
- export * from '../../../Form/TextField/examples/FormikErrorInput';
7
- export * from '../../../Form/TextField/examples/FormikHelperText';
8
6
  export * from '../../../Form/TextField/examples/HelperText';
9
7
  export * from '../../../Form/TextField/examples/LabelInput';
10
8
  export * from '../../../Form/TextField/examples/LeftChild';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { CheckboxProps } from '../Form/Checkbox/Checkbox/Checkbox.props';
3
+ /**
4
+ * Checkbox allows users to select one or more options from a list of choices.
5
+ */
6
+ export declare const Checkbox: React.FC<CheckboxProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { CountryPickerProps } from '../Form/CountryPicker/CountryPicker/CountryPicker.props';
3
+ /**
4
+ * Country picker allows users to select a country from a dropdown list or search field.
5
+ */
6
+ export declare const CountryPicker: React.FC<CountryPickerProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DatePickerProps } from '../Form/DatePicker/DatePicker/DatePicker.props';
3
+ /**
4
+ * Date picker allows users to select a date from a calendar view.
5
+ */
6
+ export declare const DatePicker: React.FC<DatePickerProps>;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { FormikConfig } from 'formik';
3
+ interface CustomFormProps<T> extends FormikConfig<T> {
4
+ autoFocus?: boolean;
5
+ initFocus?: string;
6
+ }
7
+ interface FocusContextType {
8
+ active: boolean;
9
+ focusNextInput: (name: string) => void;
10
+ setInputRef: (name: string, ref: HTMLInputElement | null) => void;
11
+ handleSubmitEditing: (name: string) => void;
12
+ getReturnKeyType: (name: string) => 'next' | 'done';
13
+ }
14
+ interface CustomFormProps<T> extends FormikConfig<T> {
15
+ autoFocus?: boolean;
16
+ initFocus?: string;
17
+ }
18
+ interface FocusContextType {
19
+ active: boolean;
20
+ focusNextInput: (name: string) => void;
21
+ setInputRef: (name: string, ref: HTMLInputElement | null) => void;
22
+ }
23
+ export declare const useFormFocus: () => FocusContextType;
24
+ export declare const Form: <T extends {}>({ children, autoFocus, initFocus, }: any) => React.JSX.Element;
25
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useFormikInput: ({ name, type, ...props }: any) => any;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { PasswordProps } from '../Form/Password/Password/Password.props';
3
+ /**
4
+ * To allow users to securely enter sensitive information
5
+ */
6
+ export declare const Password: React.FC<PasswordProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { SelectProps } from '../Form/Select/Select/Select.props';
3
+ /**
4
+ * Select provides a dropdown list of options for the user to choose from.
5
+ */
6
+ export declare const Select: React.FC<SelectProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { SwitchProps } from '../Form/Switch/Switch/Switch.props';
3
+ export declare const Switch: React.FC<SwitchProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { TextAreaProps } from '../Form/TextArea/TextArea/TextArea.props';
3
+ /**
4
+ * Text Area is an component used to create a multi-line input field.
5
+ */
6
+ export declare const TextArea: React.FC<TextAreaProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { TextFieldProps } from '../Form/TextField/TextField/TextField.props';
3
+ /**
4
+ * TextField is used to capture text data from users.
5
+ */
6
+ export declare const TextField: React.FC<TextFieldProps>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FormCheckbox: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FormikPassword: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FormikTextArea: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const FormikTextField: () => React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ export * from './FormikTextField';
2
+ export * from './FormikCountryPicker';
3
+ export * from './FormikCheckbox';
4
+ export * from './FormikTextArea';
5
+ export * from './FormikDatePicker';
6
+ export * from './FormikTextField';
7
+ export * from './FormikPassword';
8
+ export * from './FormikSelect';
9
+ export * from './FormikSwitch';
@@ -0,0 +1,9 @@
1
+ export { Checkbox } from './Formik.Checkbox';
2
+ export { DatePicker } from './Formik.DatePicker';
3
+ export { CountryPicker } from './Formik.CountryPicker';
4
+ export { Select } from './Formik.Select';
5
+ export { Switch } from './Formik.Switch';
6
+ export { TextArea } from './Formik.TextArea';
7
+ export { TextField } from './Formik.TextField';
8
+ export { Password } from './Formik.Password';
9
+ export { Form } from './Formik.Form';
@@ -5,4 +5,4 @@ export declare const Bottom: (props: any) => React.JSX.Element;
5
5
  export declare const Left: (props: any) => React.JSX.Element;
6
6
  export declare const Right: (props: any) => React.JSX.Element;
7
7
  export declare const Inline: (props: any) => React.JSX.Element;
8
- export declare const View: (props: import("app-studio").ViewProps) => React.JSX.Element;
8
+ export declare const View: React.FC<import("app-studio").ViewProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const FormikPage: () => React.JSX.Element;
3
+ export default FormikPage;