@zimyo/ui 1.2.0 → 1.3.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.
Files changed (40) hide show
  1. package/dist/Accordion/index.esm.js +5 -218
  2. package/dist/Accordion/index.js +5 -225
  3. package/dist/Badge/index.d.ts +29 -0
  4. package/dist/Badge/index.esm.js +1 -0
  5. package/dist/Badge/index.js +1 -0
  6. package/dist/Button/index.esm.js +1 -13
  7. package/dist/Button/index.js +1 -18
  8. package/dist/Card/index.esm.js +1 -36
  9. package/dist/Card/index.js +1 -38
  10. package/dist/Input/index.d.ts +18 -0
  11. package/dist/Input/index.esm.js +26 -0
  12. package/dist/Input/index.js +26 -0
  13. package/dist/Modal/index.d.ts +11 -9
  14. package/dist/Modal/index.esm.js +5 -123
  15. package/dist/Modal/index.js +5 -128
  16. package/dist/Notice/index.d.ts +19 -0
  17. package/dist/Notice/index.esm.js +26 -0
  18. package/dist/Notice/index.js +26 -0
  19. package/dist/Popover/index.esm.js +1 -22
  20. package/dist/Popover/index.js +1 -27
  21. package/dist/RadioGroup/index.esm.js +1 -91
  22. package/dist/RadioGroup/index.js +1 -96
  23. package/dist/Select/index.d.ts +15 -13
  24. package/dist/Select/index.esm.js +5 -173
  25. package/dist/Select/index.js +5 -178
  26. package/dist/Switch/index.esm.js +1 -9
  27. package/dist/Switch/index.js +1 -14
  28. package/dist/Tabs/index.esm.js +1 -202
  29. package/dist/Tabs/index.js +1 -207
  30. package/dist/Typography/index.esm.js +1 -57
  31. package/dist/Typography/index.js +1 -66
  32. package/dist/index.d.ts +120 -39
  33. package/dist/index.esm.js +5 -739
  34. package/dist/index.js +5 -762
  35. package/dist/theme/index.esm.js +1 -234
  36. package/dist/theme/index.js +1 -239
  37. package/package.json +33 -3
  38. package/dist/TextInput/index.d.ts +0 -18
  39. package/dist/TextInput/index.esm.js +0 -33
  40. package/dist/TextInput/index.js +0 -38
package/dist/index.d.ts CHANGED
@@ -1,8 +1,13 @@
1
- import React$1, { ReactNode } from 'react';
2
- import { ButtonProps as ButtonProps$1, SelectProps as SelectProps$1, SelectChangeEvent, AccordionProps as AccordionProps$1, AccordionSummaryProps, AccordionDetailsProps, SwitchProps as SwitchProps$1, TextFieldProps, TypographyProps, SxProps as SxProps$1, DialogProps } from '@mui/material';
1
+ import * as React$1 from 'react';
2
+ import React__default from 'react';
3
+ import { ButtonProps as ButtonProps$1, AccordionProps as AccordionProps$1, AccordionSummaryProps, AccordionDetailsProps, SwitchProps as SwitchProps$1, TextFieldProps, TypographyProps, SxProps as SxProps$1 } from '@mui/material';
3
4
  import { SxProps } from '@mui/system';
4
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { Props, GroupBase } from 'react-select';
7
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
8
+ import { VariantProps } from 'class-variance-authority';
5
9
  import { Theme } from '@mui/material/styles';
10
+ import { ClassValue } from 'clsx';
6
11
 
7
12
  interface ButtonProps extends Omit<ButtonProps$1, 'sx'> {
8
13
  loading?: boolean;
@@ -11,24 +16,26 @@ interface ButtonProps extends Omit<ButtonProps$1, 'sx'> {
11
16
  loaderSize?: number;
12
17
  loaderPosition?: 'start' | 'end' | 'center';
13
18
  }
14
- declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
19
+ declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
15
20
 
16
- interface OptionType {
21
+ interface Option {
17
22
  label: string;
18
23
  value: string | number;
24
+ [key: string]: any;
19
25
  }
20
- interface SelectProps extends Omit<SelectProps$1, 'value' | 'onChange'> {
26
+ type SelectSize = "sm" | "md" | "lg";
27
+ type SelectProps<OptionType extends Option> = {
21
28
  label?: string;
22
- options: OptionType[];
23
- error?: boolean;
24
- helperText?: string;
29
+ error?: string;
30
+ isClearable?: boolean;
31
+ isSearchable?: boolean;
32
+ className?: string;
33
+ size?: SelectSize;
25
34
  required?: boolean;
26
- placeholder?: string;
27
- value?: any;
28
- onChange?: (event: SelectChangeEvent<any>) => void;
29
- isMulti?: boolean;
30
- }
31
- declare const Select: React$1.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React$1.RefAttributes<any>>;
35
+ valueKey?: string;
36
+ labelKey?: string;
37
+ } & Props<OptionType, boolean, GroupBase<OptionType>>;
38
+ declare function Select<OptionType extends Option>({ label, error, className, size, required, valueKey, labelKey, ...props }: SelectProps<OptionType>): react_jsx_runtime.JSX.Element;
32
39
 
33
40
  interface AccordionProps extends Omit<AccordionProps$1, 'sx' | 'onChange' | 'expanded'> {
34
41
  type?: 'single' | 'multiple';
@@ -36,49 +43,49 @@ interface AccordionProps extends Omit<AccordionProps$1, 'sx' | 'onChange' | 'exp
36
43
  value?: string | string[];
37
44
  defaultValue?: string | string[];
38
45
  onValueChange?: (value: string | string[]) => void;
39
- children: React$1.ReactNode;
46
+ children: React__default.ReactNode;
40
47
  sx?: SxProps;
41
48
  }
42
49
  interface AccordionItemProps extends Omit<AccordionProps$1, 'sx'> {
43
50
  value: string;
44
- children: React$1.ReactNode;
51
+ children: React__default.ReactNode;
45
52
  sx?: SxProps;
46
53
  }
47
54
  interface AccordionTriggerProps extends Omit<AccordionSummaryProps, 'sx'> {
48
- children: React$1.ReactNode;
55
+ children: React__default.ReactNode;
49
56
  sx?: SxProps;
50
- expandIcon?: React$1.ReactNode;
57
+ expandIcon?: React__default.ReactNode;
51
58
  }
52
59
  interface AccordionContentProps extends Omit<AccordionDetailsProps, 'sx'> {
53
- children: React$1.ReactNode;
60
+ children: React__default.ReactNode;
54
61
  sx?: SxProps;
55
62
  }
56
- declare const Accordion: React$1.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
57
- declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<AccordionItemProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
58
- declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<AccordionTriggerProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
59
- declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
63
+ declare const Accordion: React__default.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
64
+ declare const AccordionItem: React__default.ForwardRefExoticComponent<Omit<AccordionItemProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
65
+ declare const AccordionTrigger: React__default.ForwardRefExoticComponent<Omit<AccordionTriggerProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
66
+ declare const AccordionContent: React__default.ForwardRefExoticComponent<Omit<AccordionContentProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
60
67
 
61
68
  interface SwitchProps extends Omit<SwitchProps$1, 'onChange'> {
62
69
  label?: string;
63
70
  helperText?: string;
64
71
  error?: boolean;
65
72
  required?: boolean | number;
66
- onChange?: (event: React$1.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
73
+ onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
67
74
  }
68
- declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
75
+ declare const Switch: React__default.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
69
76
 
70
77
  interface TextInputProps extends Omit<TextFieldProps, 'variant'> {
71
78
  label?: string;
72
79
  placeholder?: string;
73
80
  IS_MANDATORY?: boolean | number | string;
74
- startIcon?: React$1.ReactNode;
75
- endIcon?: React$1.ReactNode;
81
+ startIcon?: React__default.ReactNode;
82
+ endIcon?: React__default.ReactNode;
76
83
  error?: boolean;
77
84
  variant?: 'outlined' | 'filled' | 'standard';
78
85
  helperText?: string;
79
86
  type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'search';
80
87
  }
81
- declare const TextInput: React$1.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
88
+ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
82
89
 
83
90
  interface RadioOption {
84
91
  value: string;
@@ -104,7 +111,7 @@ interface RadioGroupProps {
104
111
  radioSx?: SxProps;
105
112
  labelSx?: SxProps;
106
113
  }
107
- declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
114
+ declare const RadioGroup: React__default.ForwardRefExoticComponent<RadioGroupProps & React__default.RefAttributes<HTMLDivElement>>;
108
115
 
109
116
  interface HeadingProps extends TypographyProps {
110
117
  level?: 1 | 2 | 3 | 4 | 5 | 6;
@@ -132,24 +139,95 @@ interface CodeProps {
132
139
  }
133
140
  declare const Code: ({ children, sx }: CodeProps) => react_jsx_runtime.JSX.Element;
134
141
 
135
- interface ModalProps extends Omit<DialogProps, 'title'> {
142
+ interface ModalProps {
136
143
  open: boolean;
137
144
  onClose: () => void;
138
- title?: ReactNode;
139
- content?: ReactNode;
140
- actions?: ReactNode;
141
- maxWidth?: DialogProps['maxWidth'];
145
+ title?: string;
146
+ description?: string;
147
+ children?: React$1.ReactNode;
148
+ actions?: React$1.ReactNode;
149
+ showCloseIcon?: boolean;
150
+ maxWidth?: false | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
142
151
  fullWidth?: boolean;
152
+ fullScreen?: boolean;
153
+ className?: string;
143
154
  }
144
- declare const Modal: ({ open, onClose, title, content, actions, fullWidth, maxWidth, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element;
155
+ declare const Modal: React$1.FC<ModalProps>;
145
156
 
146
- interface UILibraryThemeProviderProps {
157
+ interface DrawerProps {
158
+ open: boolean;
159
+ onClose: () => void;
160
+ title?: string;
147
161
  children: React$1.ReactNode;
162
+ footer?: React$1.ReactNode;
163
+ side?: "left" | "right" | "top" | "bottom";
164
+ className?: string;
165
+ showCloseIcon?: boolean;
166
+ withOverlay?: boolean;
167
+ stickyFooter?: boolean;
168
+ width?: number | string;
169
+ height?: number | string;
170
+ }
171
+ declare const Drawer: React$1.FC<DrawerProps>;
172
+
173
+ type Position = "start" | "end";
174
+ interface CustomColor {
175
+ bg?: string;
176
+ text?: string;
177
+ border?: string;
178
+ }
179
+ interface BadgeProps extends VariantProps<typeof badgeVariants> {
180
+ label: string;
181
+ icon?: React__default.ReactNode;
182
+ iconPosition?: Position;
183
+ dot?: boolean;
184
+ dotPosition?: Position;
185
+ color?: CustomColor;
186
+ className?: string;
187
+ }
188
+ declare const badgeVariants: (props?: ({
189
+ variant?: "text" | "outlined" | "contained" | null | undefined;
190
+ size?: "sm" | "md" | "lg" | null | undefined;
191
+ type?: "default" | "success" | "error" | "info" | "warning" | null | undefined;
192
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
193
+ declare const Badge: ({ label, icon, iconPosition, dot, dotPosition, variant, size, type, color, className, }: BadgeProps) => react_jsx_runtime.JSX.Element;
194
+
195
+ type InputSize = "sm" | "md" | "lg";
196
+ type InputVariant = "outlined" | "contained";
197
+ interface InputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
198
+ label?: string;
199
+ description?: string;
200
+ error?: string;
201
+ leftIcon?: React$1.ReactNode;
202
+ rightIcon?: React$1.ReactNode;
203
+ size?: InputSize;
204
+ variant?: InputVariant;
205
+ allowedPattern?: "number" | "alpha" | RegExp;
206
+ }
207
+ declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
208
+
209
+ type NoticeVariant = 'success' | 'error' | 'warning' | 'info';
210
+ type NoticeSize = 'sm' | 'md' | 'lg';
211
+ type NoticeStyleType = 'contained' | 'outlined';
212
+ interface NoticeProps {
213
+ title?: string;
214
+ message: string;
215
+ variant?: NoticeVariant;
216
+ size?: NoticeSize;
217
+ styleType?: NoticeStyleType;
218
+ onClose?: () => void;
219
+ className?: string;
220
+ showCloseIcon?: boolean;
221
+ }
222
+ declare const Notice: React$1.FC<NoticeProps>;
223
+
224
+ interface UILibraryThemeProviderProps {
225
+ children: React__default.ReactNode;
148
226
  primaryColor?: string;
149
227
  secondaryColor?: string;
150
228
  enableCssBaseline?: boolean;
151
229
  }
152
- declare const UILibraryThemeProvider: React$1.FC<UILibraryThemeProviderProps>;
230
+ declare const UILibraryThemeProvider: React__default.FC<UILibraryThemeProviderProps>;
153
231
 
154
232
  declare module '@mui/material/styles' {
155
233
  interface Theme {
@@ -229,5 +307,8 @@ declare const designTokens: {
229
307
  };
230
308
  };
231
309
 
232
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Blockquote, Button, Caption, Code, Heading, Lead, Modal, Muted, RadioGroup, Select, Strong, Switch, Text, TextInput, UILibraryThemeProvider, createCustomTheme, designTokens, theme };
233
- export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, ButtonProps, ModalProps, RadioGroupProps, RadioOption, SelectProps, SwitchProps, TextInputProps, ThemeConfig, UILibraryThemeProviderProps };
310
+ declare function cn(...inputs: ClassValue[]): string;
311
+ declare function useStableId(prefix?: string): string;
312
+
313
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Badge, Blockquote, Button, Caption, Code, Drawer, Heading, Input, Lead, Modal, Muted, Notice, RadioGroup, Select, Strong, Switch, Text, TextInput, UILibraryThemeProvider, cn, createCustomTheme, designTokens, theme, useStableId };
314
+ export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, BadgeProps, ButtonProps, DrawerProps, InputProps, ModalProps, NoticeProps, RadioGroupProps, RadioOption, SelectProps, SwitchProps, TextInputProps, ThemeConfig, UILibraryThemeProviderProps };