@verma-consulting/design-library 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # design-library
2
+
3
+ Verma Consulting design library
@@ -0,0 +1,149 @@
1
+ import { SelectChangeEvent } from '@mui/material';
2
+ export * from '@mui/material';
3
+ import React$1, { FC } from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ export { ThemeProvider, createTheme, styled, useTheme } from '@mui/material/styles';
6
+ export { makeStyles } from '@mui/styles';
7
+ import { SwitchProps } from '@mui/material/Switch';
8
+
9
+ interface ClearableSelectProps {
10
+ name: string;
11
+ label: string;
12
+ value: string | number | (string | number)[];
13
+ onChange: (event: SelectChangeEvent<string | number | (string | number)[]>) => void;
14
+ size?: "small" | "medium";
15
+ style?: React$1.CSSProperties;
16
+ disabled?: boolean;
17
+ onClear?: () => void;
18
+ multiple?: boolean;
19
+ defaultEditMode?: boolean;
20
+ renderValue?: () => null;
21
+ children: React$1.ReactNode;
22
+ }
23
+ declare const ClearableSelect: React$1.FC<ClearableSelectProps>;
24
+
25
+ interface TabPanelProps {
26
+ children?: React$1.ReactNode;
27
+ index: number;
28
+ value: number;
29
+ }
30
+ declare const TabPanel: (props: TabPanelProps) => react_jsx_runtime.JSX.Element;
31
+
32
+ type LogoProps = {
33
+ loggedIn?: boolean;
34
+ organization?: {
35
+ name?: string;
36
+ logo?: {
37
+ url?: string;
38
+ };
39
+ } | null;
40
+ defaultLogo?: React$1.ReactNode;
41
+ companyComponent?: React$1.ReactNode;
42
+ handleClick?: () => void;
43
+ };
44
+ declare const Logo: React$1.FC<LogoProps>;
45
+
46
+ declare const FormDialog: ({ open, setOpen, title, actions, children, maxWidth, ...props }: {
47
+ [x: string]: any;
48
+ open?: boolean | undefined;
49
+ setOpen: any;
50
+ title?: string | undefined;
51
+ actions: any;
52
+ children: any;
53
+ maxWidth?: string | undefined;
54
+ }) => react_jsx_runtime.JSX.Element;
55
+
56
+ declare const InputFileUpload: ({ name, onChange, title }: {
57
+ name?: string | undefined;
58
+ onChange?: (() => null) | undefined;
59
+ title?: string | undefined;
60
+ }) => react_jsx_runtime.JSX.Element;
61
+
62
+ type ImageUploadAvatarProps = {
63
+ name?: string;
64
+ defaultValue?: string | null;
65
+ onChange?: (file: File | null, previewSrc: string | null) => void;
66
+ size?: number;
67
+ variant?: "circular" | "rounded" | "square";
68
+ accept?: string;
69
+ disabled?: boolean;
70
+ allowClear?: boolean;
71
+ };
72
+ declare const ImageUploadAvatar: React$1.FC<ImageUploadAvatarProps>;
73
+
74
+ declare const FormSnackBar: ({ snackBar, setSnackBar }: {
75
+ snackBar?: {} | undefined;
76
+ setSnackBar?: (() => null) | undefined;
77
+ }) => react_jsx_runtime.JSX.Element;
78
+
79
+ interface LoaderProps {
80
+ size?: number;
81
+ color?: "primary" | "secondary" | "inherit" | "success" | "error" | "info" | "warning";
82
+ }
83
+ declare const Loader: React$1.FC<LoaderProps>;
84
+
85
+ type PillProps = {
86
+ label?: string;
87
+ leftIcon?: string;
88
+ rightIcon?: string;
89
+ color?: string;
90
+ isSelected?: boolean;
91
+ onClick?: () => void;
92
+ disabled?: boolean;
93
+ };
94
+ declare const Pill: ({ variant, leftIcon, rightIcon, color, isSelected, onClick, label, disabled, }: PillProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ declare const IOSSwitch: React$1.FC<SwitchProps>;
97
+
98
+ declare enum userStatus {
99
+ Pending = "Pending",
100
+ Invited = "Invited",
101
+ Active = "Active",
102
+ Inactive = "Inactive"
103
+ }
104
+
105
+ interface StatusPillProps {
106
+ status: userStatus;
107
+ }
108
+ declare const StatusPill: React$1.FC<StatusPillProps>;
109
+
110
+ interface FormPopoverProps {
111
+ row?: any;
112
+ children: (props: {
113
+ row: any;
114
+ handleClose: () => void;
115
+ }) => React$1.ReactNode;
116
+ title?: string;
117
+ }
118
+ declare const FormPopover: FC<FormPopoverProps>;
119
+
120
+ interface GenericPayload {
121
+ label?: string;
122
+ value?: string;
123
+ }
124
+
125
+ interface SearchableSelectProps {
126
+ name: string;
127
+ label: string;
128
+ value: string;
129
+ onChange: (value: string) => void;
130
+ options: GenericPayload[];
131
+ size?: "small" | "medium";
132
+ style?: React$1.CSSProperties;
133
+ disabled?: boolean;
134
+ onClear?: () => void;
135
+ defaultEditMode?: boolean;
136
+ multiple?: boolean;
137
+ }
138
+ declare const SearchableSelect: React$1.FC<SearchableSelectProps>;
139
+
140
+ interface FormDrawerProps {
141
+ open: boolean;
142
+ setOpen: () => void;
143
+ title?: string | null;
144
+ actions?: React.ReactNode;
145
+ children: React.ReactNode;
146
+ }
147
+ declare const FormDrawer: React.FC<FormDrawerProps>;
148
+
149
+ export { ClearableSelect, FormDialog, FormDrawer, FormPopover, FormSnackBar, IOSSwitch, ImageUploadAvatar, InputFileUpload, Loader, Logo, Pill, SearchableSelect, StatusPill, TabPanel };
@@ -0,0 +1,149 @@
1
+ import { SelectChangeEvent } from '@mui/material';
2
+ export * from '@mui/material';
3
+ import React$1, { FC } from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ export { ThemeProvider, createTheme, styled, useTheme } from '@mui/material/styles';
6
+ export { makeStyles } from '@mui/styles';
7
+ import { SwitchProps } from '@mui/material/Switch';
8
+
9
+ interface ClearableSelectProps {
10
+ name: string;
11
+ label: string;
12
+ value: string | number | (string | number)[];
13
+ onChange: (event: SelectChangeEvent<string | number | (string | number)[]>) => void;
14
+ size?: "small" | "medium";
15
+ style?: React$1.CSSProperties;
16
+ disabled?: boolean;
17
+ onClear?: () => void;
18
+ multiple?: boolean;
19
+ defaultEditMode?: boolean;
20
+ renderValue?: () => null;
21
+ children: React$1.ReactNode;
22
+ }
23
+ declare const ClearableSelect: React$1.FC<ClearableSelectProps>;
24
+
25
+ interface TabPanelProps {
26
+ children?: React$1.ReactNode;
27
+ index: number;
28
+ value: number;
29
+ }
30
+ declare const TabPanel: (props: TabPanelProps) => react_jsx_runtime.JSX.Element;
31
+
32
+ type LogoProps = {
33
+ loggedIn?: boolean;
34
+ organization?: {
35
+ name?: string;
36
+ logo?: {
37
+ url?: string;
38
+ };
39
+ } | null;
40
+ defaultLogo?: React$1.ReactNode;
41
+ companyComponent?: React$1.ReactNode;
42
+ handleClick?: () => void;
43
+ };
44
+ declare const Logo: React$1.FC<LogoProps>;
45
+
46
+ declare const FormDialog: ({ open, setOpen, title, actions, children, maxWidth, ...props }: {
47
+ [x: string]: any;
48
+ open?: boolean | undefined;
49
+ setOpen: any;
50
+ title?: string | undefined;
51
+ actions: any;
52
+ children: any;
53
+ maxWidth?: string | undefined;
54
+ }) => react_jsx_runtime.JSX.Element;
55
+
56
+ declare const InputFileUpload: ({ name, onChange, title }: {
57
+ name?: string | undefined;
58
+ onChange?: (() => null) | undefined;
59
+ title?: string | undefined;
60
+ }) => react_jsx_runtime.JSX.Element;
61
+
62
+ type ImageUploadAvatarProps = {
63
+ name?: string;
64
+ defaultValue?: string | null;
65
+ onChange?: (file: File | null, previewSrc: string | null) => void;
66
+ size?: number;
67
+ variant?: "circular" | "rounded" | "square";
68
+ accept?: string;
69
+ disabled?: boolean;
70
+ allowClear?: boolean;
71
+ };
72
+ declare const ImageUploadAvatar: React$1.FC<ImageUploadAvatarProps>;
73
+
74
+ declare const FormSnackBar: ({ snackBar, setSnackBar }: {
75
+ snackBar?: {} | undefined;
76
+ setSnackBar?: (() => null) | undefined;
77
+ }) => react_jsx_runtime.JSX.Element;
78
+
79
+ interface LoaderProps {
80
+ size?: number;
81
+ color?: "primary" | "secondary" | "inherit" | "success" | "error" | "info" | "warning";
82
+ }
83
+ declare const Loader: React$1.FC<LoaderProps>;
84
+
85
+ type PillProps = {
86
+ label?: string;
87
+ leftIcon?: string;
88
+ rightIcon?: string;
89
+ color?: string;
90
+ isSelected?: boolean;
91
+ onClick?: () => void;
92
+ disabled?: boolean;
93
+ };
94
+ declare const Pill: ({ variant, leftIcon, rightIcon, color, isSelected, onClick, label, disabled, }: PillProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ declare const IOSSwitch: React$1.FC<SwitchProps>;
97
+
98
+ declare enum userStatus {
99
+ Pending = "Pending",
100
+ Invited = "Invited",
101
+ Active = "Active",
102
+ Inactive = "Inactive"
103
+ }
104
+
105
+ interface StatusPillProps {
106
+ status: userStatus;
107
+ }
108
+ declare const StatusPill: React$1.FC<StatusPillProps>;
109
+
110
+ interface FormPopoverProps {
111
+ row?: any;
112
+ children: (props: {
113
+ row: any;
114
+ handleClose: () => void;
115
+ }) => React$1.ReactNode;
116
+ title?: string;
117
+ }
118
+ declare const FormPopover: FC<FormPopoverProps>;
119
+
120
+ interface GenericPayload {
121
+ label?: string;
122
+ value?: string;
123
+ }
124
+
125
+ interface SearchableSelectProps {
126
+ name: string;
127
+ label: string;
128
+ value: string;
129
+ onChange: (value: string) => void;
130
+ options: GenericPayload[];
131
+ size?: "small" | "medium";
132
+ style?: React$1.CSSProperties;
133
+ disabled?: boolean;
134
+ onClear?: () => void;
135
+ defaultEditMode?: boolean;
136
+ multiple?: boolean;
137
+ }
138
+ declare const SearchableSelect: React$1.FC<SearchableSelectProps>;
139
+
140
+ interface FormDrawerProps {
141
+ open: boolean;
142
+ setOpen: () => void;
143
+ title?: string | null;
144
+ actions?: React.ReactNode;
145
+ children: React.ReactNode;
146
+ }
147
+ declare const FormDrawer: React.FC<FormDrawerProps>;
148
+
149
+ export { ClearableSelect, FormDialog, FormDrawer, FormPopover, FormSnackBar, IOSSwitch, ImageUploadAvatar, InputFileUpload, Loader, Logo, Pill, SearchableSelect, StatusPill, TabPanel };