@zimyo/ui 1.1.11 → 1.2.1

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/dist/index.d.ts CHANGED
@@ -143,6 +143,16 @@ interface ModalProps extends Omit<DialogProps, 'title'> {
143
143
  }
144
144
  declare const Modal: ({ open, onClose, title, content, actions, fullWidth, maxWidth, ...rest }: ModalProps) => react_jsx_runtime.JSX.Element;
145
145
 
146
+ interface AnimatedDrawerProps {
147
+ open: boolean;
148
+ onClose: () => void;
149
+ anchor?: "left" | "right";
150
+ width?: number;
151
+ children: React$1.ReactNode;
152
+ closeButton?: boolean;
153
+ }
154
+ declare const Drawer: React$1.FC<AnimatedDrawerProps>;
155
+
146
156
  interface UILibraryThemeProviderProps {
147
157
  children: React$1.ReactNode;
148
158
  primaryColor?: string;
@@ -229,5 +239,5 @@ declare const designTokens: {
229
239
  };
230
240
  };
231
241
 
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 };
242
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Blockquote, Button, Caption, Code, Drawer, Heading, Lead, Modal, Muted, RadioGroup, Select, Strong, Switch, Text, TextInput, UILibraryThemeProvider, createCustomTheme, designTokens, theme };
243
+ export type { AccordionContentProps, AccordionItemProps, AccordionProps, AccordionTriggerProps, AnimatedDrawerProps, ButtonProps, ModalProps, RadioGroupProps, RadioOption, SelectProps, SwitchProps, TextInputProps, ThemeConfig, UILibraryThemeProviderProps };
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import React, { forwardRef, createElement } from 'react';
3
- import { Button as Button$1, CircularProgress, useTheme, Card, CardHeader as CardHeader$1, Typography, CardActions as CardActions$1, Box, Skeleton, FormControl, Select as Select$1, OutlinedInput, IconButton, MenuItem, ListItemText, FormHelperText, Chip, Accordion as Accordion$1, AccordionSummary, AccordionDetails, FormControlLabel, Switch as Switch$1, TextField, InputAdornment, FormLabel, RadioGroup as RadioGroup$1, Radio, Dialog, DialogTitle, DialogContent, DialogActions, GlobalStyles, CssBaseline } from '@mui/material';
3
+ import { Button as Button$1, CircularProgress, useTheme, Card, CardHeader as CardHeader$1, Typography, CardActions as CardActions$1, Box, Skeleton, FormControl, Select as Select$1, OutlinedInput, IconButton, MenuItem, ListItemText, FormHelperText, Chip, Accordion as Accordion$1, AccordionSummary, AccordionDetails, FormControlLabel, Switch as Switch$1, TextField, InputAdornment, FormLabel, RadioGroup as RadioGroup$1, Radio, Dialog, DialogTitle, DialogContent, DialogActions, Drawer as Drawer$1, Stack, GlobalStyles, CssBaseline } from '@mui/material';
4
4
  import MuiCardContent from '@mui/material/CardContent';
5
5
  import CardMedia from '@mui/material/CardMedia';
6
6
  import { createTheme, ThemeProvider } from '@mui/material/styles';
@@ -529,6 +529,13 @@ const Modal = ({ open, onClose, title, content, actions, fullWidth = true, maxWi
529
529
  }, ...rest, children: [!!title && (jsxs(DialogTitle, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [jsx(Heading, { level: 6, children: title }), jsx(IconButton, { edge: "end", onClick: onClose, children: jsx(X, { size: 18, strokeWidth: 2 }) })] })), !!content && jsx(DialogContent, { dividers: true, children: content }), !!actions && jsx(DialogActions, { children: actions })] }));
530
530
  };
531
531
 
532
+ const Drawer = ({ open, onClose, anchor = "right", width = 420, children, closeButton = true, }) => {
533
+ return (jsxs(Drawer$1, { anchor: anchor, open: open, onClose: onClose, transitionDuration: 400, PaperProps: {
534
+ elevation: 0,
535
+ sx: { width, overflow: 'hidden' }
536
+ }, children: [jsxs(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", p: 1, children: [jsx(Text, { size: "sm", fontWeight: 500, children: "Edit profile" }), jsx(IconButton, { size: "small", children: jsx(X, { style: { fontSize: 18 } }) })] }), jsx(Box, { overflow: 'hidden auto', flexGrow: 1, children: children }), jsxs(Stack, { direction: 'row', gap: 1, p: 1.5, justifyContent: "flex-end", children: [jsx(Button, { loading: true, loaderPosition: "end", variant: "outlined", children: "Cancel" }), jsx(Button, { loading: true, loadingText: "Saving..", children: "Save Changes" })] })] }));
537
+ };
538
+
532
539
  const designTokens = {
533
540
  colors: {
534
541
  primary: {
@@ -656,7 +663,7 @@ const createCustomTheme = (config = {}) => {
656
663
  styleOverrides: {
657
664
  root: {
658
665
  textTransform: 'none',
659
- fontWeight: 400,
666
+ fontWeight: 'normal',
660
667
  letterSpacing: '0.5px',
661
668
  padding: '6px 12px',
662
669
  },
@@ -758,4 +765,4 @@ const UILibraryThemeProvider = ({ children, primaryColor, secondaryColor, enable
758
765
  return (jsxs(ThemeProvider, { theme: theme, children: [enableCssBaseline && jsx(CssBaseline, {}), jsx(Fonts, {}), children] }));
759
766
  };
760
767
 
761
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Blockquote, Button, Caption, Code, Heading, Lead, Modal, Muted, RadioGroup, Select, Strong, Switch, Text, TextInput, UILibraryThemeProvider, createCustomTheme, designTokens, theme };
768
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Blockquote, Button, Caption, Code, Drawer, Heading, Lead, Modal, Muted, RadioGroup, Select, Strong, Switch, Text, TextInput, UILibraryThemeProvider, createCustomTheme, designTokens, theme };
package/dist/index.js CHANGED
@@ -531,6 +531,13 @@ const Modal = ({ open, onClose, title, content, actions, fullWidth = true, maxWi
531
531
  }, ...rest, children: [!!title && (jsxRuntime.jsxs(material.DialogTitle, { sx: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [jsxRuntime.jsx(Heading, { level: 6, children: title }), jsxRuntime.jsx(material.IconButton, { edge: "end", onClick: onClose, children: jsxRuntime.jsx(X, { size: 18, strokeWidth: 2 }) })] })), !!content && jsxRuntime.jsx(material.DialogContent, { dividers: true, children: content }), !!actions && jsxRuntime.jsx(material.DialogActions, { children: actions })] }));
532
532
  };
533
533
 
534
+ const Drawer = ({ open, onClose, anchor = "right", width = 420, children, closeButton = true, }) => {
535
+ return (jsxRuntime.jsxs(material.Drawer, { anchor: anchor, open: open, onClose: onClose, transitionDuration: 400, PaperProps: {
536
+ elevation: 0,
537
+ sx: { width, overflow: 'hidden' }
538
+ }, children: [jsxRuntime.jsxs(material.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center", p: 1, children: [jsxRuntime.jsx(Text, { size: "sm", fontWeight: 500, children: "Edit profile" }), jsxRuntime.jsx(material.IconButton, { size: "small", children: jsxRuntime.jsx(X, { style: { fontSize: 18 } }) })] }), jsxRuntime.jsx(material.Box, { overflow: 'hidden auto', flexGrow: 1, children: children }), jsxRuntime.jsxs(material.Stack, { direction: 'row', gap: 1, p: 1.5, justifyContent: "flex-end", children: [jsxRuntime.jsx(Button, { loading: true, loaderPosition: "end", variant: "outlined", children: "Cancel" }), jsxRuntime.jsx(Button, { loading: true, loadingText: "Saving..", children: "Save Changes" })] })] }));
539
+ };
540
+
534
541
  const designTokens = {
535
542
  colors: {
536
543
  primary: {
@@ -658,7 +665,7 @@ const createCustomTheme = (config = {}) => {
658
665
  styleOverrides: {
659
666
  root: {
660
667
  textTransform: 'none',
661
- fontWeight: 400,
668
+ fontWeight: 'normal',
662
669
  letterSpacing: '0.5px',
663
670
  padding: '6px 12px',
664
671
  },
@@ -768,6 +775,7 @@ exports.Blockquote = Blockquote;
768
775
  exports.Button = Button;
769
776
  exports.Caption = Caption;
770
777
  exports.Code = Code;
778
+ exports.Drawer = Drawer;
771
779
  exports.Heading = Heading;
772
780
  exports.Lead = Lead;
773
781
  exports.Modal = Modal;
@@ -129,7 +129,7 @@ const createCustomTheme = (config = {}) => {
129
129
  styleOverrides: {
130
130
  root: {
131
131
  textTransform: 'none',
132
- fontWeight: 400,
132
+ fontWeight: 'normal',
133
133
  letterSpacing: '0.5px',
134
134
  padding: '6px 12px',
135
135
  },
@@ -131,7 +131,7 @@ const createCustomTheme = (config = {}) => {
131
131
  styleOverrides: {
132
132
  root: {
133
133
  textTransform: 'none',
134
- fontWeight: 400,
134
+ fontWeight: 'normal',
135
135
  letterSpacing: '0.5px',
136
136
  padding: '6px 12px',
137
137
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zimyo/ui",
3
- "version": "1.1.11",
3
+ "version": "1.2.1",
4
4
  "description": "Zimyo UI library built on MUI Material",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",