@astral/ui 1.41.0 → 1.42.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.
- package/Dialog/Dialog.d.ts +12 -1
- package/Dialog/Dialog.js +2 -2
- package/Dialog/index.d.ts +0 -1
- package/Dialog/index.js +0 -1
- package/esm/Dialog/Dialog.d.ts +12 -1
- package/esm/Dialog/Dialog.js +2 -2
- package/esm/Dialog/index.d.ts +0 -1
- package/esm/Dialog/index.js +0 -1
- package/package.json +2 -2
- package/Dialog/types.d.ts +0 -6
- package/Dialog/types.js +0 -2
- package/esm/Dialog/types.d.ts +0 -6
- package/esm/Dialog/types.js +0 -1
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DialogProps } from '
|
|
2
|
+
import { DialogProps as MuiDialogProps } from '@mui/material';
|
|
3
|
+
import { WithoutEmotionSpecific } from '../types';
|
|
4
|
+
export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title'>> & {
|
|
5
|
+
/**
|
|
6
|
+
* Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: JSX.Element | JSX.Element[] | string;
|
|
9
|
+
/**
|
|
10
|
+
* Отключить кликабельность фонового компонента
|
|
11
|
+
*/
|
|
12
|
+
disableBackdropClick?: boolean;
|
|
13
|
+
};
|
|
3
14
|
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
|
package/Dialog/Dialog.js
CHANGED
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.Dialog = void 0;
|
|
15
15
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
const material_1 = require("@mui/material");
|
|
17
|
-
const
|
|
17
|
+
const DialogTitle_1 = require("../DialogTitle");
|
|
18
18
|
const Dialog = (_a) => {
|
|
19
19
|
var { children, title, disableBackdropClick, onClose } = _a, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
|
|
20
20
|
const handleClose = onClose &&
|
|
@@ -24,6 +24,6 @@ const Dialog = (_a) => {
|
|
|
24
24
|
}
|
|
25
25
|
onClose(event, reason);
|
|
26
26
|
});
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ onClose: handleClose }, props, { children: [title && (0, jsx_runtime_1.jsx)(
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, Object.assign({ onClose: handleClose }, props, { children: [title && (0, jsx_runtime_1.jsx)(DialogTitle_1.DialogTitle, Object.assign({ onClose: onClose }, { children: title })), children] })));
|
|
28
28
|
};
|
|
29
29
|
exports.Dialog = Dialog;
|
package/Dialog/index.d.ts
CHANGED
package/Dialog/index.js
CHANGED
package/esm/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DialogProps } from '
|
|
2
|
+
import { DialogProps as MuiDialogProps } from '@mui/material';
|
|
3
|
+
import { WithoutEmotionSpecific } from '../types';
|
|
4
|
+
export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title'>> & {
|
|
5
|
+
/**
|
|
6
|
+
* Заголовок
|
|
7
|
+
*/
|
|
8
|
+
title?: JSX.Element | JSX.Element[] | string;
|
|
9
|
+
/**
|
|
10
|
+
* Отключить кликабельность фонового компонента
|
|
11
|
+
*/
|
|
12
|
+
disableBackdropClick?: boolean;
|
|
13
|
+
};
|
|
3
14
|
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
|
package/esm/Dialog/Dialog.js
CHANGED
|
@@ -10,8 +10,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Dialog as MuiDialog } from '@mui/material';
|
|
14
|
-
import { DialogTitle } from '../
|
|
13
|
+
import { Dialog as MuiDialog, } from '@mui/material';
|
|
14
|
+
import { DialogTitle } from '../DialogTitle';
|
|
15
15
|
export const Dialog = (_a) => {
|
|
16
16
|
var { children, title, disableBackdropClick, onClose } = _a, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
|
|
17
17
|
const handleClose = onClose &&
|
package/esm/Dialog/index.d.ts
CHANGED
package/esm/Dialog/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.42.0",
|
|
4
4
|
"browser": "./esm/index.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@astral/icons": "^1.
|
|
7
|
+
"@astral/icons": "^1.42.0",
|
|
8
8
|
"@emotion/cache": "11.7.1",
|
|
9
9
|
"@emotion/react": "11.9.0",
|
|
10
10
|
"@emotion/server": "11.4.0",
|
package/Dialog/types.d.ts
DELETED
package/Dialog/types.js
DELETED
package/esm/Dialog/types.d.ts
DELETED
package/esm/Dialog/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|