@astral/ui 4.21.1 → 4.21.3

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 (39) hide show
  1. package/components/Dialog/styles.js +6 -0
  2. package/components/DialogActions/DialogActions.d.ts +1 -1
  3. package/components/DialogActions/DialogActions.js +4 -2
  4. package/components/DialogActions/constants.d.ts +3 -0
  5. package/components/DialogActions/constants.js +4 -0
  6. package/components/DialogActions/index.d.ts +1 -0
  7. package/components/DialogActions/index.js +1 -0
  8. package/components/DialogActions/public.d.ts +1 -0
  9. package/components/DialogActions/public.js +1 -0
  10. package/components/DialogContent/DialogContent.d.ts +1 -1
  11. package/components/DialogContent/DialogContent.js +3 -1
  12. package/components/DialogContent/constants.d.ts +3 -0
  13. package/components/DialogContent/constants.js +4 -0
  14. package/components/DialogContent/index.d.ts +1 -0
  15. package/components/DialogContent/index.js +1 -0
  16. package/components/DialogContent/public.d.ts +1 -0
  17. package/components/DialogContent/public.js +1 -0
  18. package/components/PageContent/public.d.ts +1 -1
  19. package/components/PageContent/public.js +1 -0
  20. package/node/components/Dialog/styles.js +6 -0
  21. package/node/components/DialogActions/DialogActions.d.ts +1 -1
  22. package/node/components/DialogActions/DialogActions.js +4 -2
  23. package/node/components/DialogActions/constants.d.ts +3 -0
  24. package/node/components/DialogActions/constants.js +7 -0
  25. package/node/components/DialogActions/index.d.ts +1 -0
  26. package/node/components/DialogActions/index.js +3 -0
  27. package/node/components/DialogActions/public.d.ts +1 -0
  28. package/node/components/DialogActions/public.js +3 -0
  29. package/node/components/DialogContent/DialogContent.d.ts +1 -1
  30. package/node/components/DialogContent/DialogContent.js +3 -1
  31. package/node/components/DialogContent/constants.d.ts +3 -0
  32. package/node/components/DialogContent/constants.js +7 -0
  33. package/node/components/DialogContent/index.d.ts +1 -0
  34. package/node/components/DialogContent/index.js +3 -0
  35. package/node/components/DialogContent/public.d.ts +1 -0
  36. package/node/components/DialogContent/public.js +3 -0
  37. package/node/components/PageContent/public.d.ts +1 -1
  38. package/node/components/PageContent/public.js +4 -1
  39. package/package.json +1 -1
@@ -1,5 +1,7 @@
1
1
  import { backdropClasses } from '@mui/material/Backdrop';
2
2
  import MuiDialog, { dialogClasses } from '@mui/material/Dialog';
3
+ import { dialogActionsClassnames } from '../DialogActions';
4
+ import { dialogContentClassnames } from '../DialogContent';
3
5
  import { styled } from '../styled';
4
6
  import { DIALOG_SIZES } from './constants';
5
7
  const getSize = (size) => {
@@ -18,4 +20,8 @@ export const StyledDialog = styled(MuiDialog, {
18
20
  border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
19
21
  box-shadow: ${({ theme }) => theme.elevation[300]};
20
22
  }
23
+
24
+ &:not(:has(.${dialogActionsClassnames.root})) .${dialogContentClassnames.root} {
25
+ padding-bottom: ${({ theme }) => theme.spacing(6)};
26
+ }
21
27
  `;
@@ -1,4 +1,4 @@
1
1
  import type { DialogActionsProps as MuiDialogActionsProps } from '@mui/material/DialogActions';
2
2
  import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
3
3
  export type DialogActionsProps = WithoutEmotionSpecific<MuiDialogActionsProps>;
4
- export declare const DialogActions: ({ children, disableSpacing, ...props }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DialogActions: ({ children, className, disableSpacing, ...props }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from '../utils/classNames';
3
+ import { dialogActionsClassnames } from './constants';
2
4
  import { StyledDialogActions, StyledGrid } from './styles';
3
- export const DialogActions = ({ children, disableSpacing, ...props }) => {
4
- return (_jsx(StyledDialogActions, { ...props, children: _jsx(StyledGrid, { spacing: disableSpacing ? 0 : 3, children: children }) }));
5
+ export const DialogActions = ({ children, className, disableSpacing, ...props }) => {
6
+ return (_jsx(StyledDialogActions, { className: classNames(className, dialogActionsClassnames.root), ...props, children: _jsx(StyledGrid, { spacing: disableSpacing ? 0 : 3, children: children }) }));
5
7
  };
@@ -0,0 +1,3 @@
1
+ export declare const dialogActionsClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { createUIKitClassname } from '../utils/createUIKitClassname';
2
+ export const dialogActionsClassnames = {
3
+ root: createUIKitClassname('dialog-actions'),
4
+ };
@@ -1 +1,2 @@
1
1
  export * from './DialogActions';
2
+ export { dialogActionsClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './DialogActions';
2
+ export { dialogActionsClassnames } from './constants';
@@ -1 +1,2 @@
1
+ export { dialogActionsClassnames } from './constants';
1
2
  export * from './DialogActions';
@@ -1 +1,2 @@
1
+ export { dialogActionsClassnames } from './constants';
1
2
  export * from './DialogActions';
@@ -1,4 +1,4 @@
1
1
  import type { DialogContentProps as MuiDialogContentProps } from '@mui/material/DialogContent';
2
2
  import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
3
3
  export type DialogContentProps = WithoutEmotionSpecific<MuiDialogContentProps>;
4
- export declare const DialogContent: (props: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DialogContent: ({ className, ...restProps }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { classNames } from '../utils/classNames';
3
+ import { dialogContentClassnames } from './constants';
2
4
  import { StyledDialogContent } from './styles';
3
- export const DialogContent = (props) => (_jsx(StyledDialogContent, { ...props }));
5
+ export const DialogContent = ({ className, ...restProps }) => (_jsx(StyledDialogContent, { className: classNames(className, dialogContentClassnames.root), ...restProps }));
@@ -0,0 +1,3 @@
1
+ export declare const dialogContentClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { createUIKitClassname } from '../utils/createUIKitClassname';
2
+ export const dialogContentClassnames = {
3
+ root: createUIKitClassname('dialog-content'),
4
+ };
@@ -1 +1,2 @@
1
1
  export * from './DialogContent';
2
+ export { dialogContentClassnames } from './constants';
@@ -1 +1,2 @@
1
1
  export * from './DialogContent';
2
+ export { dialogContentClassnames } from './constants';
@@ -1 +1,2 @@
1
+ export { dialogContentClassnames } from './constants';
1
2
  export * from './DialogContent';
@@ -1 +1,2 @@
1
+ export { dialogContentClassnames } from './constants';
1
2
  export * from './DialogContent';
@@ -1,4 +1,4 @@
1
1
  export { pageContentClassnames } from './constants';
2
2
  export { PageContent } from './PageContent';
3
- export type { PageContentHeader, PageContentHeaderActions, PageContentHeaderActionsProps, PageContentHeaderProps, } from './PageContentHeader';
3
+ export { PageContentHeader, PageContentHeaderActions, type PageContentHeaderActionsProps, type PageContentHeaderProps, } from './PageContentHeader';
4
4
  export type { PageContentProps } from './types';
@@ -1,2 +1,3 @@
1
1
  export { pageContentClassnames } from './constants';
2
2
  export { PageContent } from './PageContent';
3
+ export { PageContentHeader, PageContentHeaderActions, } from './PageContentHeader';
@@ -26,6 +26,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.StyledDialog = void 0;
27
27
  const Backdrop_1 = require("@mui/material/Backdrop");
28
28
  const Dialog_1 = __importStar(require("@mui/material/Dialog"));
29
+ const DialogActions_1 = require("../DialogActions");
30
+ const DialogContent_1 = require("../DialogContent");
29
31
  const styled_1 = require("../styled");
30
32
  const constants_1 = require("./constants");
31
33
  const getSize = (size) => {
@@ -44,4 +46,8 @@ exports.StyledDialog = (0, styled_1.styled)(Dialog_1.default, {
44
46
  border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
45
47
  box-shadow: ${({ theme }) => theme.elevation[300]};
46
48
  }
49
+
50
+ &:not(:has(.${DialogActions_1.dialogActionsClassnames.root})) .${DialogContent_1.dialogContentClassnames.root} {
51
+ padding-bottom: ${({ theme }) => theme.spacing(6)};
52
+ }
47
53
  `;
@@ -1,4 +1,4 @@
1
1
  import type { DialogActionsProps as MuiDialogActionsProps } from '@mui/material/DialogActions';
2
2
  import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
3
3
  export type DialogActionsProps = WithoutEmotionSpecific<MuiDialogActionsProps>;
4
- export declare const DialogActions: ({ children, disableSpacing, ...props }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DialogActions: ({ children, className, disableSpacing, ...props }: DialogActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DialogActions = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const classNames_1 = require("../utils/classNames");
6
+ const constants_1 = require("./constants");
5
7
  const styles_1 = require("./styles");
6
- const DialogActions = ({ children, disableSpacing, ...props }) => {
7
- return ((0, jsx_runtime_1.jsx)(styles_1.StyledDialogActions, { ...props, children: (0, jsx_runtime_1.jsx)(styles_1.StyledGrid, { spacing: disableSpacing ? 0 : 3, children: children }) }));
8
+ const DialogActions = ({ children, className, disableSpacing, ...props }) => {
9
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledDialogActions, { className: (0, classNames_1.classNames)(className, constants_1.dialogActionsClassnames.root), ...props, children: (0, jsx_runtime_1.jsx)(styles_1.StyledGrid, { spacing: disableSpacing ? 0 : 3, children: children }) }));
8
10
  };
9
11
  exports.DialogActions = DialogActions;
@@ -0,0 +1,3 @@
1
+ export declare const dialogActionsClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dialogActionsClassnames = void 0;
4
+ const createUIKitClassname_1 = require("../utils/createUIKitClassname");
5
+ exports.dialogActionsClassnames = {
6
+ root: (0, createUIKitClassname_1.createUIKitClassname)('dialog-actions'),
7
+ };
@@ -1 +1,2 @@
1
1
  export * from './DialogActions';
2
+ export { dialogActionsClassnames } from './constants';
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.dialogActionsClassnames = void 0;
17
18
  __exportStar(require("./DialogActions"), exports);
19
+ var constants_1 = require("./constants");
20
+ Object.defineProperty(exports, "dialogActionsClassnames", { enumerable: true, get: function () { return constants_1.dialogActionsClassnames; } });
@@ -1 +1,2 @@
1
+ export { dialogActionsClassnames } from './constants';
1
2
  export * from './DialogActions';
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.dialogActionsClassnames = void 0;
18
+ var constants_1 = require("./constants");
19
+ Object.defineProperty(exports, "dialogActionsClassnames", { enumerable: true, get: function () { return constants_1.dialogActionsClassnames; } });
17
20
  __exportStar(require("./DialogActions"), exports);
@@ -1,4 +1,4 @@
1
1
  import type { DialogContentProps as MuiDialogContentProps } from '@mui/material/DialogContent';
2
2
  import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
3
3
  export type DialogContentProps = WithoutEmotionSpecific<MuiDialogContentProps>;
4
- export declare const DialogContent: (props: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const DialogContent: ({ className, ...restProps }: DialogContentProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DialogContent = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const classNames_1 = require("../utils/classNames");
6
+ const constants_1 = require("./constants");
5
7
  const styles_1 = require("./styles");
6
- const DialogContent = (props) => ((0, jsx_runtime_1.jsx)(styles_1.StyledDialogContent, { ...props }));
8
+ const DialogContent = ({ className, ...restProps }) => ((0, jsx_runtime_1.jsx)(styles_1.StyledDialogContent, { className: (0, classNames_1.classNames)(className, constants_1.dialogContentClassnames.root), ...restProps }));
7
9
  exports.DialogContent = DialogContent;
@@ -0,0 +1,3 @@
1
+ export declare const dialogContentClassnames: {
2
+ root: string;
3
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dialogContentClassnames = void 0;
4
+ const createUIKitClassname_1 = require("../utils/createUIKitClassname");
5
+ exports.dialogContentClassnames = {
6
+ root: (0, createUIKitClassname_1.createUIKitClassname)('dialog-content'),
7
+ };
@@ -1 +1,2 @@
1
1
  export * from './DialogContent';
2
+ export { dialogContentClassnames } from './constants';
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.dialogContentClassnames = void 0;
17
18
  __exportStar(require("./DialogContent"), exports);
19
+ var constants_1 = require("./constants");
20
+ Object.defineProperty(exports, "dialogContentClassnames", { enumerable: true, get: function () { return constants_1.dialogContentClassnames; } });
@@ -1 +1,2 @@
1
+ export { dialogContentClassnames } from './constants';
1
2
  export * from './DialogContent';
@@ -14,4 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.dialogContentClassnames = void 0;
18
+ var constants_1 = require("./constants");
19
+ Object.defineProperty(exports, "dialogContentClassnames", { enumerable: true, get: function () { return constants_1.dialogContentClassnames; } });
17
20
  __exportStar(require("./DialogContent"), exports);
@@ -1,4 +1,4 @@
1
1
  export { pageContentClassnames } from './constants';
2
2
  export { PageContent } from './PageContent';
3
- export type { PageContentHeader, PageContentHeaderActions, PageContentHeaderActionsProps, PageContentHeaderProps, } from './PageContentHeader';
3
+ export { PageContentHeader, PageContentHeaderActions, type PageContentHeaderActionsProps, type PageContentHeaderProps, } from './PageContentHeader';
4
4
  export type { PageContentProps } from './types';
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageContent = exports.pageContentClassnames = void 0;
3
+ exports.PageContentHeaderActions = exports.PageContentHeader = exports.PageContent = exports.pageContentClassnames = void 0;
4
4
  var constants_1 = require("./constants");
5
5
  Object.defineProperty(exports, "pageContentClassnames", { enumerable: true, get: function () { return constants_1.pageContentClassnames; } });
6
6
  var PageContent_1 = require("./PageContent");
7
7
  Object.defineProperty(exports, "PageContent", { enumerable: true, get: function () { return PageContent_1.PageContent; } });
8
+ var PageContentHeader_1 = require("./PageContentHeader");
9
+ Object.defineProperty(exports, "PageContentHeader", { enumerable: true, get: function () { return PageContentHeader_1.PageContentHeader; } });
10
+ Object.defineProperty(exports, "PageContentHeaderActions", { enumerable: true, get: function () { return PageContentHeader_1.PageContentHeaderActions; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.21.1",
3
+ "version": "4.21.3",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {