@cere/cere-design-system 0.0.4 → 0.0.6
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 +72 -7
- package/dist/index.d.ts +72 -7
- package/dist/index.js +379 -151
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +342 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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';
|
|
@@ -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
|
|
|
@@ -491,10 +499,10 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
|
|
|
491
499
|
}
|
|
492
500
|
declare const Dialog: React.FC<DialogProps>;
|
|
493
501
|
|
|
494
|
-
interface DrawerProps extends DrawerProps$1 {
|
|
502
|
+
interface DrawerProps extends Omit<DrawerProps$1, 'title'> {
|
|
495
503
|
/**
|
|
496
504
|
* Width of the drawer when open
|
|
497
|
-
* @default 240
|
|
505
|
+
* @default 400 for temporary/temporary variant, 240 for permanent
|
|
498
506
|
*/
|
|
499
507
|
width?: number;
|
|
500
508
|
/**
|
|
@@ -507,16 +515,73 @@ interface DrawerProps extends DrawerProps$1 {
|
|
|
507
515
|
* @default false
|
|
508
516
|
*/
|
|
509
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;
|
|
510
561
|
}
|
|
511
562
|
/**
|
|
512
563
|
* Drawer component for navigation drawers and side panels
|
|
564
|
+
* Can be used as a replacement for Dialog for better UX
|
|
513
565
|
*
|
|
514
566
|
* @example
|
|
515
567
|
* ```tsx
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
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>
|
|
520
585
|
* </Drawer>
|
|
521
586
|
* ```
|
|
522
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
|
|
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';
|
|
@@ -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
|
|
|
@@ -491,10 +499,10 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
|
|
|
491
499
|
}
|
|
492
500
|
declare const Dialog: React.FC<DialogProps>;
|
|
493
501
|
|
|
494
|
-
interface DrawerProps extends DrawerProps$1 {
|
|
502
|
+
interface DrawerProps extends Omit<DrawerProps$1, 'title'> {
|
|
495
503
|
/**
|
|
496
504
|
* Width of the drawer when open
|
|
497
|
-
* @default 240
|
|
505
|
+
* @default 400 for temporary/temporary variant, 240 for permanent
|
|
498
506
|
*/
|
|
499
507
|
width?: number;
|
|
500
508
|
/**
|
|
@@ -507,16 +515,73 @@ interface DrawerProps extends DrawerProps$1 {
|
|
|
507
515
|
* @default false
|
|
508
516
|
*/
|
|
509
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;
|
|
510
561
|
}
|
|
511
562
|
/**
|
|
512
563
|
* Drawer component for navigation drawers and side panels
|
|
564
|
+
* Can be used as a replacement for Dialog for better UX
|
|
513
565
|
*
|
|
514
566
|
* @example
|
|
515
567
|
* ```tsx
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
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>
|
|
520
585
|
* </Drawer>
|
|
521
586
|
* ```
|
|
522
587
|
*/
|