@cere/cere-design-system 0.0.3 → 0.0.5

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.mts CHANGED
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
3
3
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
4
4
  import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
5
5
  import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab';
6
- import { ButtonGroupProps as ButtonGroupProps$1, SelectProps, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, StepperProps as StepperProps$1, StepProps as StepProps$1, StepLabelProps as StepLabelProps$1, StepContentProps as StepContentProps$1, StepButtonProps as StepButtonProps$1, MenuProps as MenuProps$1, DialogProps as DialogProps$1, ListProps as ListProps$1, ListItemProps as ListItemProps$1, TableProps as TableProps$1, AccordionProps as AccordionProps$1, AppBarProps as AppBarProps$1, CollapseProps as CollapseProps$1, CircularProgressProps as CircularProgressProps$1, BoxProps } from '@mui/material';
6
+ import { ButtonGroupProps as ButtonGroupProps$1, SelectProps, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, StepperProps as StepperProps$1, StepProps as StepProps$1, StepLabelProps as StepLabelProps$1, StepContentProps as StepContentProps$1, StepButtonProps as StepButtonProps$1, MenuProps as MenuProps$1, DialogProps as DialogProps$1, BoxProps, ListProps as ListProps$1, ListItemProps as ListItemProps$1, TableProps as TableProps$1, AccordionProps as AccordionProps$1, AppBarProps as AppBarProps$1, CollapseProps as CollapseProps$1, CircularProgressProps as CircularProgressProps$1 } from '@mui/material';
7
7
  export { Box, BoxProps, Container, ContainerProps, FormControl, FormControlLabel, FormControlLabelProps, FormControlProps, FormHelperText, FormHelperTextProps, FormLabel, FormLabelProps, Grid, Grid2Props, GridProps, InputAdornment, InputAdornmentProps, InputLabel, InputLabelProps, ListItemIcon, ListItemSecondaryAction, ListItemText, Stack, StackProps, Toolbar, ToolbarProps, Typography, TypographyProps } from '@mui/material';
8
8
  import { TextFieldProps as TextFieldProps$1 } from '@mui/material/TextField';
9
9
  import { SwitchProps as SwitchProps$1 } from '@mui/material/Switch';
@@ -210,7 +210,7 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
210
210
  }
211
211
  declare const ToggleButtonGroup: React.FC<ToggleButtonGroupProps>;
212
212
 
213
- interface SwitchProps extends Omit<SwitchProps$1, 'color'> {
213
+ interface SwitchProps extends SwitchProps$1 {
214
214
  label?: string;
215
215
  labelPosition?: 'left' | 'right';
216
216
  }
@@ -306,6 +306,14 @@ interface ServiceSelectorButtonProps {
306
306
  * @default 350
307
307
  */
308
308
  panelWidth?: number;
309
+ /**
310
+ * Callback when Settings button is clicked
311
+ */
312
+ onOpenSettings?: (serviceId: string) => void;
313
+ /**
314
+ * Callback when Add Member button is clicked
315
+ */
316
+ onOpenAddMember?: (serviceId: string) => void;
309
317
  }
310
318
  declare const ServiceSelectorButton: React.FC<ServiceSelectorButtonProps>;
311
319
 
@@ -483,13 +491,18 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
483
491
  children: ReactNode;
484
492
  dividers?: boolean;
485
493
  confirmBeforeClose?: boolean;
494
+ /**
495
+ * Custom actions to render instead of default actions
496
+ * If provided, showActions is ignored and custom actions are used
497
+ */
498
+ customActions?: ReactNode;
486
499
  }
487
500
  declare const Dialog: React.FC<DialogProps>;
488
501
 
489
- interface DrawerProps extends DrawerProps$1 {
502
+ interface DrawerProps extends Omit<DrawerProps$1, 'title'> {
490
503
  /**
491
504
  * Width of the drawer when open
492
- * @default 240
505
+ * @default 400 for temporary/temporary variant, 240 for permanent
493
506
  */
494
507
  width?: number;
495
508
  /**
@@ -502,16 +515,73 @@ interface DrawerProps extends DrawerProps$1 {
502
515
  * @default false
503
516
  */
504
517
  collapsed?: boolean;
518
+ /**
519
+ * Title to display in the drawer header
520
+ */
521
+ title?: ReactNode;
522
+ /**
523
+ * Custom header content (replaces title if provided)
524
+ */
525
+ header?: ReactNode;
526
+ /**
527
+ * Show close button in header
528
+ * @default true for temporary variant, false for permanent
529
+ */
530
+ showCloseButton?: boolean;
531
+ /**
532
+ * Tab labels for tabbed drawer content
533
+ */
534
+ tabs?: string[];
535
+ /**
536
+ * Active tab index
537
+ */
538
+ activeTab?: number;
539
+ /**
540
+ * Callback when tab changes
541
+ */
542
+ onTabChange?: (index: number) => void;
543
+ /**
544
+ * Footer content (actions, buttons, etc.)
545
+ */
546
+ footer?: ReactNode;
547
+ /**
548
+ * Props for drawer content container
549
+ */
550
+ contentProps?: BoxProps;
551
+ /**
552
+ * Anchor position
553
+ * @default 'right'
554
+ */
555
+ anchor?: 'left' | 'right' | 'top' | 'bottom';
556
+ /**
557
+ * Top offset in pixels (e.g., for header + breadcrumbs)
558
+ * @default 0
559
+ */
560
+ topOffset?: number;
505
561
  }
506
562
  /**
507
563
  * Drawer component for navigation drawers and side panels
564
+ * Can be used as a replacement for Dialog for better UX
508
565
  *
509
566
  * @example
510
567
  * ```tsx
511
- * <Drawer open={true} variant="permanent" width={240}>
512
- * <List>
513
- * <ListItem>Item 1</ListItem>
514
- * </List>
568
+ * // Simple drawer
569
+ * <Drawer open={true} variant="temporary" width={400} title="Settings" onClose={handleClose}>
570
+ * <Box p={2}>Content here</Box>
571
+ * </Drawer>
572
+ *
573
+ * // Drawer with tabs
574
+ * <Drawer
575
+ * open={true}
576
+ * variant="temporary"
577
+ * width={600}
578
+ * title="Edit Stream"
579
+ * tabs={['General', 'Rules', 'Settings']}
580
+ * activeTab={activeTab}
581
+ * onTabChange={setActiveTab}
582
+ * onClose={handleClose}
583
+ * >
584
+ * <Box p={2}>{tabContent}</Box>
515
585
  * </Drawer>
516
586
  * ```
517
587
  */
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import React, { ReactNode } from 'react';
3
3
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
4
4
  import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
5
5
  import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab';
6
- import { ButtonGroupProps as ButtonGroupProps$1, SelectProps, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, StepperProps as StepperProps$1, StepProps as StepProps$1, StepLabelProps as StepLabelProps$1, StepContentProps as StepContentProps$1, StepButtonProps as StepButtonProps$1, MenuProps as MenuProps$1, DialogProps as DialogProps$1, ListProps as ListProps$1, ListItemProps as ListItemProps$1, TableProps as TableProps$1, AccordionProps as AccordionProps$1, AppBarProps as AppBarProps$1, CollapseProps as CollapseProps$1, CircularProgressProps as CircularProgressProps$1, BoxProps } from '@mui/material';
6
+ import { ButtonGroupProps as ButtonGroupProps$1, SelectProps, ToggleButtonProps as ToggleButtonProps$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, StepperProps as StepperProps$1, StepProps as StepProps$1, StepLabelProps as StepLabelProps$1, StepContentProps as StepContentProps$1, StepButtonProps as StepButtonProps$1, MenuProps as MenuProps$1, DialogProps as DialogProps$1, BoxProps, ListProps as ListProps$1, ListItemProps as ListItemProps$1, TableProps as TableProps$1, AccordionProps as AccordionProps$1, AppBarProps as AppBarProps$1, CollapseProps as CollapseProps$1, CircularProgressProps as CircularProgressProps$1 } from '@mui/material';
7
7
  export { Box, BoxProps, Container, ContainerProps, FormControl, FormControlLabel, FormControlLabelProps, FormControlProps, FormHelperText, FormHelperTextProps, FormLabel, FormLabelProps, Grid, Grid2Props, GridProps, InputAdornment, InputAdornmentProps, InputLabel, InputLabelProps, ListItemIcon, ListItemSecondaryAction, ListItemText, Stack, StackProps, Toolbar, ToolbarProps, Typography, TypographyProps } from '@mui/material';
8
8
  import { TextFieldProps as TextFieldProps$1 } from '@mui/material/TextField';
9
9
  import { SwitchProps as SwitchProps$1 } from '@mui/material/Switch';
@@ -210,7 +210,7 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
210
210
  }
211
211
  declare const ToggleButtonGroup: React.FC<ToggleButtonGroupProps>;
212
212
 
213
- interface SwitchProps extends Omit<SwitchProps$1, 'color'> {
213
+ interface SwitchProps extends SwitchProps$1 {
214
214
  label?: string;
215
215
  labelPosition?: 'left' | 'right';
216
216
  }
@@ -306,6 +306,14 @@ interface ServiceSelectorButtonProps {
306
306
  * @default 350
307
307
  */
308
308
  panelWidth?: number;
309
+ /**
310
+ * Callback when Settings button is clicked
311
+ */
312
+ onOpenSettings?: (serviceId: string) => void;
313
+ /**
314
+ * Callback when Add Member button is clicked
315
+ */
316
+ onOpenAddMember?: (serviceId: string) => void;
309
317
  }
310
318
  declare const ServiceSelectorButton: React.FC<ServiceSelectorButtonProps>;
311
319
 
@@ -483,13 +491,18 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
483
491
  children: ReactNode;
484
492
  dividers?: boolean;
485
493
  confirmBeforeClose?: boolean;
494
+ /**
495
+ * Custom actions to render instead of default actions
496
+ * If provided, showActions is ignored and custom actions are used
497
+ */
498
+ customActions?: ReactNode;
486
499
  }
487
500
  declare const Dialog: React.FC<DialogProps>;
488
501
 
489
- interface DrawerProps extends DrawerProps$1 {
502
+ interface DrawerProps extends Omit<DrawerProps$1, 'title'> {
490
503
  /**
491
504
  * Width of the drawer when open
492
- * @default 240
505
+ * @default 400 for temporary/temporary variant, 240 for permanent
493
506
  */
494
507
  width?: number;
495
508
  /**
@@ -502,16 +515,73 @@ interface DrawerProps extends DrawerProps$1 {
502
515
  * @default false
503
516
  */
504
517
  collapsed?: boolean;
518
+ /**
519
+ * Title to display in the drawer header
520
+ */
521
+ title?: ReactNode;
522
+ /**
523
+ * Custom header content (replaces title if provided)
524
+ */
525
+ header?: ReactNode;
526
+ /**
527
+ * Show close button in header
528
+ * @default true for temporary variant, false for permanent
529
+ */
530
+ showCloseButton?: boolean;
531
+ /**
532
+ * Tab labels for tabbed drawer content
533
+ */
534
+ tabs?: string[];
535
+ /**
536
+ * Active tab index
537
+ */
538
+ activeTab?: number;
539
+ /**
540
+ * Callback when tab changes
541
+ */
542
+ onTabChange?: (index: number) => void;
543
+ /**
544
+ * Footer content (actions, buttons, etc.)
545
+ */
546
+ footer?: ReactNode;
547
+ /**
548
+ * Props for drawer content container
549
+ */
550
+ contentProps?: BoxProps;
551
+ /**
552
+ * Anchor position
553
+ * @default 'right'
554
+ */
555
+ anchor?: 'left' | 'right' | 'top' | 'bottom';
556
+ /**
557
+ * Top offset in pixels (e.g., for header + breadcrumbs)
558
+ * @default 0
559
+ */
560
+ topOffset?: number;
505
561
  }
506
562
  /**
507
563
  * Drawer component for navigation drawers and side panels
564
+ * Can be used as a replacement for Dialog for better UX
508
565
  *
509
566
  * @example
510
567
  * ```tsx
511
- * <Drawer open={true} variant="permanent" width={240}>
512
- * <List>
513
- * <ListItem>Item 1</ListItem>
514
- * </List>
568
+ * // Simple drawer
569
+ * <Drawer open={true} variant="temporary" width={400} title="Settings" onClose={handleClose}>
570
+ * <Box p={2}>Content here</Box>
571
+ * </Drawer>
572
+ *
573
+ * // Drawer with tabs
574
+ * <Drawer
575
+ * open={true}
576
+ * variant="temporary"
577
+ * width={600}
578
+ * title="Edit Stream"
579
+ * tabs={['General', 'Rules', 'Settings']}
580
+ * activeTab={activeTab}
581
+ * onTabChange={setActiveTab}
582
+ * onClose={handleClose}
583
+ * >
584
+ * <Box p={2}>{tabContent}</Box>
515
585
  * </Drawer>
516
586
  * ```
517
587
  */