@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.
@@ -1,3 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { DialogProps } from './types';
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 index_1 = require("../index");
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)(index_1.DialogTitle, Object.assign({ onClose: onClose }, { children: title })), children] })));
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
@@ -1,2 +1 @@
1
1
  export * from './Dialog';
2
- export * from './types';
package/Dialog/index.js CHANGED
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Dialog"), exports);
18
- __exportStar(require("./types"), exports);
@@ -1,3 +1,14 @@
1
1
  /// <reference types="react" />
2
- import { DialogProps } from './types';
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;
@@ -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 '../index';
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 &&
@@ -1,2 +1 @@
1
1
  export * from './Dialog';
2
- export * from './types';
@@ -1,2 +1 @@
1
1
  export * from './Dialog';
2
- export * from './types';
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "1.41.0",
3
+ "version": "1.42.0",
4
4
  "browser": "./esm/index.js",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@astral/icons": "^1.41.0",
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
@@ -1,6 +0,0 @@
1
- import { DialogProps as MuiDialogProps } from '@mui/material';
2
- import { WithoutEmotionSpecific } from '../types';
3
- export type DialogProps = WithoutEmotionSpecific<MuiDialogProps> & {
4
- title?: string;
5
- disableBackdropClick?: boolean;
6
- };
package/Dialog/types.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { DialogProps as MuiDialogProps } from '@mui/material';
2
- import { WithoutEmotionSpecific } from '../types';
3
- export type DialogProps = WithoutEmotionSpecific<MuiDialogProps> & {
4
- title?: string;
5
- disableBackdropClick?: boolean;
6
- };
@@ -1 +0,0 @@
1
- export {};