@astral/ui 0.9.0 → 0.10.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.
Files changed (75) hide show
  1. package/Dialog/Dialog.d.ts +3 -0
  2. package/Dialog/Dialog.js +39 -0
  3. package/Dialog/index.d.ts +2 -0
  4. package/Dialog/index.js +14 -0
  5. package/Dialog/types.d.ts +7 -0
  6. package/Dialog/types.js +2 -0
  7. package/DialogActions/DialogActions.d.ts +3 -0
  8. package/DialogActions/DialogActions.js +33 -0
  9. package/DialogActions/index.d.ts +1 -0
  10. package/DialogActions/index.js +13 -0
  11. package/DialogContent/DialogContent.d.ts +1 -0
  12. package/DialogContent/DialogContent.js +5 -0
  13. package/DialogContent/index.d.ts +1 -0
  14. package/DialogContent/index.js +13 -0
  15. package/DialogContentText/DialogContentText.d.ts +1 -0
  16. package/DialogContentText/DialogContentText.js +5 -0
  17. package/DialogContentText/index.d.ts +1 -0
  18. package/DialogContentText/index.js +13 -0
  19. package/DialogTitle/DialogTitle.d.ts +3 -0
  20. package/DialogTitle/DialogTitle.js +34 -0
  21. package/DialogTitle/index.d.ts +2 -0
  22. package/DialogTitle/index.js +14 -0
  23. package/DialogTitle/types.d.ts +4 -0
  24. package/DialogTitle/types.js +2 -0
  25. package/esm/Dialog/Dialog.d.ts +3 -0
  26. package/esm/Dialog/Dialog.js +35 -0
  27. package/esm/Dialog/index.d.ts +2 -0
  28. package/esm/Dialog/index.js +2 -0
  29. package/esm/Dialog/types.d.ts +7 -0
  30. package/esm/Dialog/types.js +1 -0
  31. package/esm/DialogActions/DialogActions.d.ts +3 -0
  32. package/esm/DialogActions/DialogActions.js +29 -0
  33. package/esm/DialogActions/index.d.ts +1 -0
  34. package/esm/DialogActions/index.js +1 -0
  35. package/esm/DialogContent/DialogContent.d.ts +1 -0
  36. package/esm/DialogContent/DialogContent.js +1 -0
  37. package/esm/DialogContent/index.d.ts +1 -0
  38. package/esm/DialogContent/index.js +1 -0
  39. package/esm/DialogContentText/DialogContentText.d.ts +1 -0
  40. package/esm/DialogContentText/DialogContentText.js +1 -0
  41. package/esm/DialogContentText/index.d.ts +1 -0
  42. package/esm/DialogContentText/index.js +1 -0
  43. package/esm/DialogTitle/DialogTitle.d.ts +3 -0
  44. package/esm/DialogTitle/DialogTitle.js +30 -0
  45. package/esm/DialogTitle/index.d.ts +2 -0
  46. package/esm/DialogTitle/index.js +2 -0
  47. package/esm/DialogTitle/types.d.ts +4 -0
  48. package/esm/DialogTitle/types.js +1 -0
  49. package/esm/index.d.ts +5 -0
  50. package/esm/index.js +5 -0
  51. package/esm/theme/components/MuiDialog.d.ts +3 -0
  52. package/esm/theme/components/MuiDialog.js +16 -0
  53. package/esm/theme/components/MuiDialogActions.d.ts +3 -0
  54. package/esm/theme/components/MuiDialogActions.js +13 -0
  55. package/esm/theme/components/MuiDialogContent.d.ts +3 -0
  56. package/esm/theme/components/MuiDialogContent.js +10 -0
  57. package/esm/theme/components/MuiDialogTitle.d.ts +3 -0
  58. package/esm/theme/components/MuiDialogTitle.js +19 -0
  59. package/esm/theme/components/components.js +8 -0
  60. package/esm/theme/palette/palette.d.ts +1 -0
  61. package/esm/theme/palette/palette.js +1 -0
  62. package/index.d.ts +5 -0
  63. package/index.js +5 -0
  64. package/package.json +2 -2
  65. package/theme/components/MuiDialog.d.ts +3 -0
  66. package/theme/components/MuiDialog.js +19 -0
  67. package/theme/components/MuiDialogActions.d.ts +3 -0
  68. package/theme/components/MuiDialogActions.js +16 -0
  69. package/theme/components/MuiDialogContent.d.ts +3 -0
  70. package/theme/components/MuiDialogContent.js +13 -0
  71. package/theme/components/MuiDialogTitle.d.ts +3 -0
  72. package/theme/components/MuiDialogTitle.js +22 -0
  73. package/theme/components/components.js +8 -0
  74. package/theme/palette/palette.d.ts +1 -0
  75. package/theme/palette/palette.js +1 -0
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogProps } from './types';
3
+ export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Dialog = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var material_1 = require("@mui/material");
28
+ var index_1 = require("../index");
29
+ var Dialog = function (_a) {
30
+ var children = _a.children, title = _a.title, disableBackdropClick = _a.disableBackdropClick, onClose = _a.onClose, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
31
+ var handleClose = onClose &&
32
+ (function (event, reason) {
33
+ if (disableBackdropClick && reason == 'backdropClick')
34
+ return;
35
+ onClose(event, reason);
36
+ });
37
+ return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, __assign({ onClose: handleClose }, props, { children: [title && (0, jsx_runtime_1.jsx)(index_1.DialogTitle, __assign({ onClose: onClose }, { children: title }), void 0), children] }), void 0));
38
+ };
39
+ exports.Dialog = Dialog;
@@ -0,0 +1,2 @@
1
+ export * from './Dialog';
2
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./Dialog"), exports);
14
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DialogProps as MuiDialogProps } from '@mui/material';
3
+ export declare type DialogProps = Omit<MuiDialogProps, 'onClose'> & {
4
+ title?: string;
5
+ disableBackdropClick?: boolean;
6
+ onClose?: (event?: React.MouseEvent<HTMLButtonElement>, reason?: 'backdropClick' | 'escapeKeyDown') => void;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogActionsProps } from '@mui/material';
3
+ export declare const DialogActions: ({ children, disableSpacing, ...props }: DialogActionsProps) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.DialogActions = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var material_1 = require("@mui/material");
28
+ var Grid_1 = require("../Grid");
29
+ var DialogActions = function (_a) {
30
+ var children = _a.children, disableSpacing = _a.disableSpacing, props = __rest(_a, ["children", "disableSpacing"]);
31
+ return ((0, jsx_runtime_1.jsx)(material_1.DialogActions, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(Grid_1.Grid, __assign({ container: true, autoFlow: "column", justifyContent: "end", spacing: disableSpacing ? 0 : 2 }, { children: children }), void 0) }), void 0));
32
+ };
33
+ exports.DialogActions = DialogActions;
@@ -0,0 +1 @@
1
+ export * from './DialogActions';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./DialogActions"), exports);
@@ -0,0 +1 @@
1
+ export { DialogContent } from '@mui/material';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DialogContent = void 0;
4
+ var material_1 = require("@mui/material");
5
+ Object.defineProperty(exports, "DialogContent", { enumerable: true, get: function () { return material_1.DialogContent; } });
@@ -0,0 +1 @@
1
+ export * from './DialogContent';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./DialogContent"), exports);
@@ -0,0 +1 @@
1
+ export { DialogContentText } from '@mui/material';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DialogContentText = void 0;
4
+ var material_1 = require("@mui/material");
5
+ Object.defineProperty(exports, "DialogContentText", { enumerable: true, get: function () { return material_1.DialogContentText; } });
@@ -0,0 +1 @@
1
+ export * from './DialogContentText';
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./DialogContentText"), exports);
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogTitleProps } from './types';
3
+ export declare const DialogTitle: ({ children, onClose, ...props }: DialogTitleProps) => JSX.Element;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.DialogTitle = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var material_1 = require("@mui/material");
28
+ var icons_1 = require("@astral/icons");
29
+ var IconButton_1 = require("../IconButton");
30
+ var DialogTitle = function (_a) {
31
+ var children = _a.children, onClose = _a.onClose, props = __rest(_a, ["children", "onClose"]);
32
+ return ((0, jsx_runtime_1.jsxs)(material_1.DialogTitle, __assign({}, props, { children: [children, onClose && ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, __assign({ variant: "text", onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(icons_1.CrossOutlineMd, {}, void 0) }), void 0))] }), void 0));
33
+ };
34
+ exports.DialogTitle = DialogTitle;
@@ -0,0 +1,2 @@
1
+ export * from './DialogTitle';
2
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./DialogTitle"), exports);
14
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,4 @@
1
+ import { DialogTitleProps as MuiDialogTitleProps } from '@mui/material';
2
+ export declare type DialogTitleProps = MuiDialogTitleProps & {
3
+ onClose?: () => void;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogProps } from './types';
3
+ export declare const Dialog: ({ children, title, disableBackdropClick, onClose, ...props }: DialogProps) => JSX.Element;
@@ -0,0 +1,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { Dialog as MuiDialog } from '@mui/material';
25
+ import { DialogTitle } from '../index';
26
+ export var Dialog = function (_a) {
27
+ var children = _a.children, title = _a.title, disableBackdropClick = _a.disableBackdropClick, onClose = _a.onClose, props = __rest(_a, ["children", "title", "disableBackdropClick", "onClose"]);
28
+ var handleClose = onClose &&
29
+ (function (event, reason) {
30
+ if (disableBackdropClick && reason == 'backdropClick')
31
+ return;
32
+ onClose(event, reason);
33
+ });
34
+ return (_jsxs(MuiDialog, __assign({ onClose: handleClose }, props, { children: [title && _jsx(DialogTitle, __assign({ onClose: onClose }, { children: title }), void 0), children] }), void 0));
35
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Dialog';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './Dialog';
2
+ export * from './types';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { DialogProps as MuiDialogProps } from '@mui/material';
3
+ export declare type DialogProps = Omit<MuiDialogProps, 'onClose'> & {
4
+ title?: string;
5
+ disableBackdropClick?: boolean;
6
+ onClose?: (event?: React.MouseEvent<HTMLButtonElement>, reason?: 'backdropClick' | 'escapeKeyDown') => void;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogActionsProps } from '@mui/material';
3
+ export declare const DialogActions: ({ children, disableSpacing, ...props }: DialogActionsProps) => JSX.Element;
@@ -0,0 +1,29 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { DialogActions as MuiDialogActions, } from '@mui/material';
25
+ import { Grid } from '../Grid';
26
+ export var DialogActions = function (_a) {
27
+ var children = _a.children, disableSpacing = _a.disableSpacing, props = __rest(_a, ["children", "disableSpacing"]);
28
+ return (_jsx(MuiDialogActions, __assign({}, props, { children: _jsx(Grid, __assign({ container: true, autoFlow: "column", justifyContent: "end", spacing: disableSpacing ? 0 : 2 }, { children: children }), void 0) }), void 0));
29
+ };
@@ -0,0 +1 @@
1
+ export * from './DialogActions';
@@ -0,0 +1 @@
1
+ export * from './DialogActions';
@@ -0,0 +1 @@
1
+ export { DialogContent } from '@mui/material';
@@ -0,0 +1 @@
1
+ export { DialogContent } from '@mui/material';
@@ -0,0 +1 @@
1
+ export * from './DialogContent';
@@ -0,0 +1 @@
1
+ export * from './DialogContent';
@@ -0,0 +1 @@
1
+ export { DialogContentText } from '@mui/material';
@@ -0,0 +1 @@
1
+ export { DialogContentText } from '@mui/material';
@@ -0,0 +1 @@
1
+ export * from './DialogContentText';
@@ -0,0 +1 @@
1
+ export * from './DialogContentText';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DialogTitleProps } from './types';
3
+ export declare const DialogTitle: ({ children, onClose, ...props }: DialogTitleProps) => JSX.Element;
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { DialogTitle as MuiDialogTitle } from '@mui/material';
25
+ import { CrossOutlineMd } from '@astral/icons';
26
+ import { IconButton } from '../IconButton';
27
+ export var DialogTitle = function (_a) {
28
+ var children = _a.children, onClose = _a.onClose, props = __rest(_a, ["children", "onClose"]);
29
+ return (_jsxs(MuiDialogTitle, __assign({}, props, { children: [children, onClose && (_jsx(IconButton, __assign({ variant: "text", onClick: onClose }, { children: _jsx(CrossOutlineMd, {}, void 0) }), void 0))] }), void 0));
30
+ };
@@ -0,0 +1,2 @@
1
+ export * from './DialogTitle';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './DialogTitle';
2
+ export * from './types';
@@ -0,0 +1,4 @@
1
+ import { DialogTitleProps as MuiDialogTitleProps } from '@mui/material';
2
+ export declare type DialogTitleProps = MuiDialogTitleProps & {
3
+ onClose?: () => void;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
package/esm/index.d.ts CHANGED
@@ -22,3 +22,8 @@ export * from './TextArea';
22
22
  export * from './DashboardLayout';
23
23
  export * from './Autocomplete';
24
24
  export * from './Select';
25
+ export * from './Dialog';
26
+ export * from './DialogTitle';
27
+ export * from './DialogContent';
28
+ export * from './DialogContentText';
29
+ export * from './DialogActions';
package/esm/index.js CHANGED
@@ -22,3 +22,8 @@ export * from './TextArea';
22
22
  export * from './DashboardLayout';
23
23
  export * from './Autocomplete';
24
24
  export * from './Select';
25
+ export * from './Dialog';
26
+ export * from './DialogTitle';
27
+ export * from './DialogContent';
28
+ export * from './DialogContentText';
29
+ export * from './DialogActions';
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialog: Components<Theme>['MuiDialog'];
@@ -0,0 +1,16 @@
1
+ export var MuiDialog = {
2
+ styleOverrides: {
3
+ root: function (_a) {
4
+ var theme = _a.theme;
5
+ return {
6
+ background: theme.palette.background.modalShadow,
7
+ };
8
+ },
9
+ paper: function (_a) {
10
+ var theme = _a.theme;
11
+ return {
12
+ borderRadius: theme.shape.small,
13
+ };
14
+ },
15
+ },
16
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogActions: Components<Theme>['MuiDialogActions'];
@@ -0,0 +1,13 @@
1
+ export var MuiDialogActions = {
2
+ styleOverrides: {
3
+ root: function (_a) {
4
+ var theme = _a.theme;
5
+ return {
6
+ padding: theme.spacing(4, 6, 6, 6),
7
+ '>div': {
8
+ width: '100%',
9
+ },
10
+ };
11
+ },
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogContent: Components<Theme>['MuiDialogContent'];
@@ -0,0 +1,10 @@
1
+ export var MuiDialogContent = {
2
+ styleOverrides: {
3
+ root: function (_a) {
4
+ var theme = _a.theme;
5
+ return {
6
+ padding: theme.spacing(0, 6),
7
+ };
8
+ },
9
+ },
10
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogTitle: Components<Theme>['MuiDialogTitle'];
@@ -0,0 +1,19 @@
1
+ export var MuiDialogTitle = {
2
+ styleOverrides: {
3
+ root: function (_a) {
4
+ var theme = _a.theme;
5
+ return {
6
+ padding: theme.spacing(6),
7
+ fontSize: theme.typography.h4.fontSize,
8
+ fontWeight: theme.typography.h4.fontWeight,
9
+ lineHeight: theme.typography.h4.lineHeight,
10
+ '& .ButtonUnstyled-root': {
11
+ position: 'absolute',
12
+ right: theme.spacing(5),
13
+ top: theme.spacing(5),
14
+ color: theme.palette.grey[800],
15
+ },
16
+ };
17
+ },
18
+ },
19
+ };
@@ -6,6 +6,10 @@ import { MuiInputLabel } from './MuiInputLabel';
6
6
  import { MuiOutlinedInput } from './MuiOutlinedInput';
7
7
  import { MuiTypography } from './MuiTypography';
8
8
  import { MuiAutocomplete } from './MuiAutocomplete';
9
+ import { MuiDialog } from './MuiDialog';
10
+ import { MuiDialogTitle } from './MuiDialogTitle';
11
+ import { MuiDialogContent } from './MuiDialogContent';
12
+ import { MuiDialogActions } from './MuiDialogActions';
9
13
  var getMuiCssBaseline = function (fontUrls) { return ({
10
14
  styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
11
15
  }); };
@@ -68,4 +72,8 @@ export var getComponents = function (fontUrls) { return ({
68
72
  MuiMenu: MuiMenu,
69
73
  MuiMenuItem: MuiMenuItem,
70
74
  MuiRadio: MuiRadio,
75
+ MuiDialog: MuiDialog,
76
+ MuiDialogTitle: MuiDialogTitle,
77
+ MuiDialogContent: MuiDialogContent,
78
+ MuiDialogActions: MuiDialogActions,
71
79
  }); };
@@ -16,6 +16,7 @@ export declare type PrimaryColorOptions = PaletteColorOptions & Color;
16
16
  export declare type Background = TypeBackground & {
17
17
  element: string;
18
18
  elementHover: string;
19
+ modalShadow: string;
19
20
  };
20
21
  declare type PaletteOptions = MuiPaletteOptions & {
21
22
  red: Color;
@@ -99,6 +99,7 @@ export var getPalette = function (brand) {
99
99
  paper: '#FFF',
100
100
  element: '#FAFBFC',
101
101
  elementHover: '#EBECF0',
102
+ modalShadow: '#142A438A',
102
103
  },
103
104
  };
104
105
  };
package/index.d.ts CHANGED
@@ -22,3 +22,8 @@ export * from './TextArea';
22
22
  export * from './DashboardLayout';
23
23
  export * from './Autocomplete';
24
24
  export * from './Select';
25
+ export * from './Dialog';
26
+ export * from './DialogTitle';
27
+ export * from './DialogContent';
28
+ export * from './DialogContentText';
29
+ export * from './DialogActions';
package/index.js CHANGED
@@ -34,3 +34,8 @@ __exportStar(require("./TextArea"), exports);
34
34
  __exportStar(require("./DashboardLayout"), exports);
35
35
  __exportStar(require("./Autocomplete"), exports);
36
36
  __exportStar(require("./Select"), exports);
37
+ __exportStar(require("./Dialog"), exports);
38
+ __exportStar(require("./DialogTitle"), exports);
39
+ __exportStar(require("./DialogContent"), exports);
40
+ __exportStar(require("./DialogContentText"), exports);
41
+ __exportStar(require("./DialogActions"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "browser": "./src/index.ts",
5
5
  "jest": {
6
6
  "moduleNameMapper": {
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@astral/icons": "^0.9.0-preview",
11
+ "@astral/icons": "^0.9.0",
12
12
  "@emotion/cache": "11.7.1",
13
13
  "@emotion/react": "11.8.1",
14
14
  "@emotion/server": "11.4.0",
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialog: Components<Theme>['MuiDialog'];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiDialog = void 0;
4
+ exports.MuiDialog = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ background: theme.palette.background.modalShadow,
10
+ };
11
+ },
12
+ paper: function (_a) {
13
+ var theme = _a.theme;
14
+ return {
15
+ borderRadius: theme.shape.small,
16
+ };
17
+ },
18
+ },
19
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogActions: Components<Theme>['MuiDialogActions'];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiDialogActions = void 0;
4
+ exports.MuiDialogActions = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ padding: theme.spacing(4, 6, 6, 6),
10
+ '>div': {
11
+ width: '100%',
12
+ },
13
+ };
14
+ },
15
+ },
16
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogContent: Components<Theme>['MuiDialogContent'];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiDialogContent = void 0;
4
+ exports.MuiDialogContent = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ padding: theme.spacing(0, 6),
10
+ };
11
+ },
12
+ },
13
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiDialogTitle: Components<Theme>['MuiDialogTitle'];
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiDialogTitle = void 0;
4
+ exports.MuiDialogTitle = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ padding: theme.spacing(6),
10
+ fontSize: theme.typography.h4.fontSize,
11
+ fontWeight: theme.typography.h4.fontWeight,
12
+ lineHeight: theme.typography.h4.lineHeight,
13
+ '& .ButtonUnstyled-root': {
14
+ position: 'absolute',
15
+ right: theme.spacing(5),
16
+ top: theme.spacing(5),
17
+ color: theme.palette.grey[800],
18
+ },
19
+ };
20
+ },
21
+ },
22
+ };
@@ -9,6 +9,10 @@ var MuiInputLabel_1 = require("./MuiInputLabel");
9
9
  var MuiOutlinedInput_1 = require("./MuiOutlinedInput");
10
10
  var MuiTypography_1 = require("./MuiTypography");
11
11
  var MuiAutocomplete_1 = require("./MuiAutocomplete");
12
+ var MuiDialog_1 = require("./MuiDialog");
13
+ var MuiDialogTitle_1 = require("./MuiDialogTitle");
14
+ var MuiDialogContent_1 = require("./MuiDialogContent");
15
+ var MuiDialogActions_1 = require("./MuiDialogActions");
12
16
  var getMuiCssBaseline = function (fontUrls) { return ({
13
17
  styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
14
18
  }); };
@@ -71,5 +75,9 @@ var getComponents = function (fontUrls) { return ({
71
75
  MuiMenu: MuiMenu,
72
76
  MuiMenuItem: MuiMenuItem,
73
77
  MuiRadio: MuiRadio,
78
+ MuiDialog: MuiDialog_1.MuiDialog,
79
+ MuiDialogTitle: MuiDialogTitle_1.MuiDialogTitle,
80
+ MuiDialogContent: MuiDialogContent_1.MuiDialogContent,
81
+ MuiDialogActions: MuiDialogActions_1.MuiDialogActions,
74
82
  }); };
75
83
  exports.getComponents = getComponents;
@@ -16,6 +16,7 @@ export declare type PrimaryColorOptions = PaletteColorOptions & Color;
16
16
  export declare type Background = TypeBackground & {
17
17
  element: string;
18
18
  elementHover: string;
19
+ modalShadow: string;
19
20
  };
20
21
  declare type PaletteOptions = MuiPaletteOptions & {
21
22
  red: Color;
@@ -102,6 +102,7 @@ var getPalette = function (brand) {
102
102
  paper: '#FFF',
103
103
  element: '#FAFBFC',
104
104
  elementHover: '#EBECF0',
105
+ modalShadow: '#142A438A',
105
106
  },
106
107
  };
107
108
  };