@app-studio/web 0.3.7 → 0.3.12

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 (34) hide show
  1. package/dist/GlobalStyle.d.ts +2 -1
  2. package/dist/assets/svg/index.d.ts +2 -0
  3. package/dist/components/File/File.d.ts +8 -0
  4. package/dist/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +1 -1
  5. package/dist/components/Form/Form.d.ts +17 -0
  6. package/dist/components/Form/FormField.d.ts +10 -0
  7. package/dist/components/Form/Select/Select/Select.state.d.ts +1 -1
  8. package/dist/components/Form/TextArea/TextArea/TextArea.state.d.ts +1 -1
  9. package/dist/components/Form/TextField/TextField/TextField.props.d.ts +1 -1
  10. package/dist/components/Form/TextField/TextField/TextField.state.d.ts +1 -1
  11. package/dist/components/Layout/View/View.d.ts +7 -1
  12. package/dist/components/Message/Examples/CloseButtonMessage.d.ts +2 -0
  13. package/dist/components/Message/Examples/DefaultMessage.d.ts +2 -0
  14. package/dist/components/Message/Examples/VariantMessage.d.ts +2 -0
  15. package/dist/components/Message/Examples/index.d.ts +3 -0
  16. package/dist/components/Message/Message/Message.layout.d.ts +3 -0
  17. package/dist/components/Message/Message/Message.props.d.ts +115 -0
  18. package/dist/components/Message/Message/Message.store.d.ts +10 -0
  19. package/dist/components/Message/Message/Message.style.d.ts +5 -0
  20. package/dist/components/Message/Message/Message.view.d.ts +19 -0
  21. package/dist/components/Message/Message.d.ts +2 -0
  22. package/dist/components/Modal/Modal/Modal.layout.d.ts +3 -0
  23. package/dist/components/Modal/Modal/Modal.props.d.ts +9 -0
  24. package/dist/components/Modal/Modal/Modal.store.d.ts +11 -0
  25. package/dist/components/index.d.ts +1 -0
  26. package/dist/pages/message.page.d.ts +3 -0
  27. package/dist/utils/form.d.ts +10 -0
  28. package/dist/web.cjs.development.js +144 -60
  29. package/dist/web.cjs.development.js.map +1 -1
  30. package/dist/web.cjs.production.min.js +1 -1
  31. package/dist/web.cjs.production.min.js.map +1 -1
  32. package/dist/web.esm.js +130 -49
  33. package/dist/web.esm.js.map +1 -1
  34. package/package.json +7 -6
@@ -1,2 +1,3 @@
1
- declare const GlobalStyle: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
1
+ /// <reference types="react" />
2
+ declare const GlobalStyle: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
2
3
  export default GlobalStyle;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const FileSVG: ({ src, color, ...props }: {
3
+ src: string;
4
+ color?: string | undefined;
5
+ }) => React.JSX.Element;
6
+ export declare const FileImage: ({ path, ...props }: {
7
+ path: string;
8
+ }) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { CheckboxProps } from './Checkbox.props';
3
- export declare const useCheckboxState: ({ defaultIsSelected }: CheckboxProps) => {
3
+ export declare const useCheckboxState: ({ defaultIsSelected, }: CheckboxProps) => {
4
4
  isHovered: boolean;
5
5
  setIsHovered: React.Dispatch<React.SetStateAction<boolean>>;
6
6
  isSelected: boolean;
@@ -0,0 +1,17 @@
1
+ import React, { PureComponent } from 'react';
2
+ export * from './Checkbox/Checkbox';
3
+ export * from './DatePicker/DatePicker';
4
+ export * from './Label/Label';
5
+ export * from './CountryPicker/CountryPicker';
6
+ export * from './Select/Select';
7
+ export * from './Switch/Switch';
8
+ export * from './TextArea/TextArea';
9
+ export * from './TextField/TextField';
10
+ 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;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export declare type FormItemProps = {
3
+ children: React.ReactNode;
4
+ } & {
5
+ name: string;
6
+ label?: string;
7
+ type?: string;
8
+ labelProps: any;
9
+ };
10
+ export declare const FormField: ({ name, children, label, labelProps, ...restProps }: FormItemProps) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { SelectProps } from './Select.props';
3
- export declare const useSelectState: ({ placeholder, isMulti, options }: SelectProps) => {
3
+ export declare const useSelectState: ({ placeholder, isMulti, options, }: SelectProps) => {
4
4
  selected: string | string[];
5
5
  setSelected: React.Dispatch<React.SetStateAction<string | string[]>>;
6
6
  hide: boolean;
@@ -1,6 +1,6 @@
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, defaultValue, value, }: TextAreaProps) => {
4
4
  hint: string | undefined;
5
5
  setHint: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
6
6
  isHovered: boolean;
@@ -10,7 +10,7 @@ export interface TextFieldProps {
10
10
  /**
11
11
  * Specifies whether the input field should display an error state.
12
12
  */
13
- error?: boolean;
13
+ error?: any;
14
14
  /**
15
15
  * Provides additional information about the input field.
16
16
  */
@@ -1,6 +1,6 @@
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, }: TextFieldProps) => {
4
4
  hint: string | undefined;
5
5
  setHint: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
6
6
  isFocused: boolean;
@@ -1,2 +1,8 @@
1
+ import React from 'react';
1
2
  export type { ViewProps } from 'app-studio';
2
- export { View } from 'app-studio';
3
+ export declare const Top: (props: any) => React.JSX.Element;
4
+ export declare const Bottom: (props: any) => React.JSX.Element;
5
+ export declare const Left: (props: any) => React.JSX.Element;
6
+ export declare const Right: (props: any) => React.JSX.Element;
7
+ export declare const Inline: (props: any) => React.JSX.Element;
8
+ export declare const View: (props: import("app-studio").ViewProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CloseButtonMessage: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DefaultMessage: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const VariantMessage: () => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from '../../Message/Examples/CloseButtonMessage';
2
+ export * from '../../Message/Examples/DefaultMessage';
3
+ export * from '../../Message/Examples/VariantMessage';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { MessageLayoutProps } from './Message.props';
3
+ export declare const MessageLayout: ({ container, icons, text, icon, }: MessageLayoutProps) => React.JSX.Element | null;
@@ -0,0 +1,115 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { Elevation } from 'src/utils/elevation';
3
+ import { Shadow } from 'app-studio';
4
+ import { CloseButtonPosition, Position, Shape, Size } from './Message.type';
5
+ export interface MessageProps {
6
+ /**
7
+ * The content to be displayed inside the message.
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * The color of the close button in the header.
12
+ */
13
+ buttonColor?: string;
14
+ /**
15
+ * The size of the close button in the header.
16
+ */
17
+ iconSize?: Size;
18
+ /**
19
+ * Determines whether the message should have sharp or rounded edges.
20
+ */
21
+ shape?: Shape;
22
+ /**
23
+ * If set to true, the message will occupy the full width and height of the screen.
24
+ */
25
+ isFullScreen?: boolean;
26
+ /**
27
+ * Indicates the presence of a close button and its position within the header.
28
+ */
29
+ buttonPosition?: CloseButtonPosition;
30
+ /**
31
+ * The callback function to be executed when the close button is clicked or pressed.
32
+ */
33
+ onClose?: () => void;
34
+ /**
35
+ * The degree of blurriness applied to the overlay.
36
+ */
37
+ blur?: number;
38
+ /**
39
+ * If set to true, the message will be visible.
40
+ */
41
+ isOpen?: boolean;
42
+ /**
43
+ * If set to true, the message will remain open when the overlay is clicked.
44
+ */
45
+ isClosePrevented?: boolean;
46
+ /**
47
+ * The positioning of the message container.
48
+ */
49
+ position?: Position;
50
+ /**
51
+ * Applies a shadow effect to the button.
52
+ */
53
+ shadow?: Shadow | Elevation | CSSProperties;
54
+ /**
55
+ * Additional properties.
56
+ */
57
+ [x: string]: any;
58
+ }
59
+ export interface MessageType extends React.FunctionComponent<MessageProps> {
60
+ /**
61
+ * The container component of the message.
62
+ */
63
+ Container: React.FC<ContainerProps>;
64
+ /**
65
+ * The body component of the message.
66
+ */
67
+ Body: React.FC<BodyProps>;
68
+ /**
69
+ * The header component of the message.
70
+ */
71
+ Layout: React.FC<MessageLayoutProps>;
72
+ }
73
+ export interface MessageLayoutProps {
74
+ icons?: {
75
+ [x: string]: string;
76
+ };
77
+ container?: any;
78
+ text?: React.JSX.Element | React.FC<any>;
79
+ icon?: React.JSX.Element | React.FC<any>;
80
+ theme: {
81
+ [x: string]: any;
82
+ };
83
+ }
84
+ export interface ContainerProps {
85
+ /**
86
+ * The content of the message container
87
+ */
88
+ children: React.ReactNode;
89
+ /**
90
+ * To give a sharp or rounded edges to the message
91
+ */
92
+ shape?: Shape;
93
+ /**
94
+ * If true, the message will take the full width and height
95
+ */
96
+ isFullScreen?: boolean;
97
+ /**
98
+ * Set a shadow effect on the button.
99
+ */
100
+ shadow?: Shadow | Elevation | CSSProperties;
101
+ /**
102
+ * Other properties
103
+ */
104
+ [x: string]: any;
105
+ }
106
+ export interface BodyProps {
107
+ /**
108
+ * The content of the Body
109
+ */
110
+ children?: React.ReactNode;
111
+ /**
112
+ * Other properties
113
+ */
114
+ [x: string]: any;
115
+ }
@@ -0,0 +1,10 @@
1
+ export interface MessageState {
2
+ visible: boolean;
3
+ variant?: string;
4
+ message: string;
5
+ show: (variant?: string, message?: string) => void;
6
+ hide: () => void;
7
+ }
8
+ export declare const useMessageStore: any;
9
+ export declare const showMessage: (variant: string, message?: string | undefined) => void;
10
+ export declare const hideMessage: () => void;
@@ -0,0 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+ import { Position, Shape, Size } from './Message.type';
3
+ export declare const ContainerShapes: Record<Shape, CSSProperties>;
4
+ export declare const OverlayAlignments: Record<Position, CSSProperties>;
5
+ export declare const HeaderIconSizes: Record<Size, number>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ interface IMessage {
3
+ message: string;
4
+ variant?: string;
5
+ show?: boolean;
6
+ hide: Function;
7
+ closable?: boolean;
8
+ timeout?: number;
9
+ props?: any;
10
+ icons?: Record<string, string>;
11
+ text?: any;
12
+ icon?: any;
13
+ theme?: Record<string, any>;
14
+ iconProps?: any;
15
+ textProps?: any;
16
+ containerProps?: any;
17
+ }
18
+ export declare const MessageView: ({ variant, message, hide, props, timeout, closable, icons, text, theme, icon, }: IMessage) => React.JSX.Element;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ export { MessageLayout } from './Message/Message.layout';
2
+ export { MessageView } from './Message/Message.view';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ModalLayoutProps } from './Modal.props';
3
+ export declare const ModalLayout: ({ modals }: ModalLayoutProps) => React.JSX.Element | null;
@@ -77,6 +77,10 @@ export interface ModalType extends React.FunctionComponent<ModalProps> {
77
77
  * The footer component of the modal.
78
78
  */
79
79
  Footer: React.FC<FooterProps>;
80
+ /**
81
+ * The header component of the modal.
82
+ */
83
+ Layout: React.FC<ModalLayoutProps>;
80
84
  }
81
85
  export interface OverlayProps {
82
86
  /**
@@ -134,6 +138,11 @@ export interface HeaderProps {
134
138
  */
135
139
  [x: string]: any;
136
140
  }
141
+ export interface ModalLayoutProps {
142
+ modals: {
143
+ [x: string]: React.FC<any>;
144
+ };
145
+ }
137
146
  export interface ContainerProps {
138
147
  /**
139
148
  * The content of the modal container
@@ -1 +1,12 @@
1
+ export interface ModalState {
2
+ modal: string | boolean;
3
+ modalProps: any & {
4
+ isVisible: boolean;
5
+ };
6
+ overlayProps: any;
7
+ show: (modal: string, modalProps?: any, overlayProps?: any) => void;
8
+ hide: () => void;
9
+ }
1
10
  export declare const useModalStore: any;
11
+ export declare const showModal: (modal: string, modalProps?: any, overlayProps?: any) => void;
12
+ export declare const hideModal: () => void;
@@ -16,3 +16,4 @@ export * from './Link/Link';
16
16
  export * from './Loader/Loader';
17
17
  export * from './Modal/Modal';
18
18
  export * from './Text/Text';
19
+ export * from './File/File';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const ModalPage: () => React.JSX.Element;
3
+ export default ModalPage;
@@ -0,0 +1,10 @@
1
+ import type { FormikProps, FormikValues } from 'formik';
2
+ export declare const getForm: () => FormikProps<FormikValues>;
3
+ export declare const setForm: (newForm: FormikProps<FormikValues>) => void;
4
+ export interface InputFormProps {
5
+ name: string;
6
+ label?: string;
7
+ rightIcon?: any;
8
+ leftIcon?: any;
9
+ labelProps?: any;
10
+ }