@mdtl/uikit 0.0.26 → 0.0.27

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.
@@ -11,5 +11,5 @@ interface IDialogProps {
11
11
  maxWidth?: Breakpoint | false;
12
12
  height?: string;
13
13
  }
14
- export declare const BaseDialog: (props: IDialogProps) => React.JSX.Element;
14
+ export declare const BaseDialog: React.FC<IDialogProps>;
15
15
  export {};
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { IHeaderConfig } from './interfaces';
3
+ declare const DefaultHeaderTemplate: React.FC<IHeaderConfig>;
4
+ export default DefaultHeaderTemplate;
@@ -0,0 +1,4 @@
1
+ import { ISectionsProps } from './interfaces';
2
+ import { default as React } from 'react';
3
+ declare const Sections: (props: ISectionsProps) => React.JSX.Element;
4
+ export default Sections;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { IStackPanelProps } from './interfaces';
3
+ /**
4
+ * Стек панель
5
+ * @param props
6
+ * @constructor
7
+ */
8
+ export declare const StackPanel: (props: IStackPanelProps) => React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { SxProps } from '@mui/system';
3
+ interface IStackPopupFooterButtonsProps {
4
+ buttons: {
5
+ onClick: () => void;
6
+ renderCondition?: boolean;
7
+ tooltip?: string;
8
+ disabled?: boolean;
9
+ styleType?: 'secondary' | 'primary';
10
+ text: string;
11
+ alignLeft?: boolean;
12
+ sx?: SxProps;
13
+ }[];
14
+ }
15
+ declare const StackPopupFooterButtons: FC<IStackPopupFooterButtonsProps>;
16
+ export default StackPopupFooterButtons;
@@ -0,0 +1,50 @@
1
+ import { SxProps } from '@mui/system';
2
+ import { Theme } from '@mui/material/styles';
3
+ import { OverridableStringUnion } from '@mui/types';
4
+ import { default as React, JSX } from 'react';
5
+ import { IconButtonPropsColorOverrides } from '@mui/material/IconButton';
6
+ /** Интерфейс конфига шапки стек панели */
7
+ export interface IHeaderConfig {
8
+ title?: string;
9
+ subtitle?: string;
10
+ infoTemplate?: React.ReactElement;
11
+ }
12
+ export interface IStackSection {
13
+ id: number;
14
+ title: string;
15
+ icon: JSX.Element;
16
+ checkBeforeNavigate?: (id: number) => Promise<boolean>;
17
+ }
18
+ export interface IStackAction extends IStackSection {
19
+ handler: () => void | Promise<void>;
20
+ color?: OverridableStringUnion<'default' | 'inherit' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning', IconButtonPropsColorOverrides>;
21
+ }
22
+ export interface IStackPanelProps {
23
+ children: React.ReactElement;
24
+ footer?: React.ReactElement;
25
+ headerTemplate?: React.ReactElement;
26
+ headerConfig?: IHeaderConfig;
27
+ open: boolean;
28
+ sections?: IStackSection[];
29
+ changeActiveSectionCallback?: (id: number) => void;
30
+ showClose?: boolean;
31
+ contrastClose?: boolean;
32
+ enableDragOver?: boolean;
33
+ onFileDrop?: (files: FileList) => void;
34
+ actions?: IStackAction[];
35
+ onOpen: () => void;
36
+ onClose: () => void;
37
+ showMaximize?: boolean;
38
+ fullWidth?: boolean;
39
+ sx?: SxProps<Theme>;
40
+ width?: `${number}%` | number;
41
+ isModal?: boolean;
42
+ activeSection?: number;
43
+ minWidth?: `${number}%` | number;
44
+ isResizable?: boolean;
45
+ }
46
+ export interface ISectionsProps {
47
+ sections: IStackPanelProps['sections'];
48
+ activeId: IStackSection['id'];
49
+ clickCallback: (item: IStackSection['id']) => void;
50
+ }
package/dist/index.d.ts CHANGED
@@ -4,4 +4,6 @@ export { CollapsibleSection } from './components/CollapsibleSection/CollapsibleS
4
4
  export { LinkRouter } from './components/LinkRouter/LinkRouter';
5
5
  export { Tabs } from './components/Tabs/Tabs';
6
6
  export { BaseDialog } from './components/BaseDialog/BaseDialog';
7
+ export { StackPanel } from './components/StackPanel/StackPanel';
8
+ export * from './components/StackPanel/interfaces';
7
9
  export { generateGuid } from './utils/generateGuid';