@astral/ui 4.21.0 → 4.21.2

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 (43) hide show
  1. package/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActionsSkeleton/styles.d.ts +1 -1
  2. package/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActionsSkeleton/styles.js +1 -1
  3. package/components/Dialog/styles.js +6 -0
  4. package/components/DialogActions/DialogActions.d.ts +1 -1
  5. package/components/DialogActions/DialogActions.js +4 -2
  6. package/components/DialogActions/constants.d.ts +3 -0
  7. package/components/DialogActions/constants.js +4 -0
  8. package/components/DialogActions/index.d.ts +1 -0
  9. package/components/DialogActions/index.js +1 -0
  10. package/components/DialogActions/public.d.ts +1 -0
  11. package/components/DialogActions/public.js +1 -0
  12. package/components/DialogContent/DialogContent.d.ts +1 -1
  13. package/components/DialogContent/DialogContent.js +3 -1
  14. package/components/DialogContent/constants.d.ts +3 -0
  15. package/components/DialogContent/constants.js +4 -0
  16. package/components/DialogContent/index.d.ts +1 -0
  17. package/components/DialogContent/index.js +1 -0
  18. package/components/DialogContent/public.d.ts +1 -0
  19. package/components/DialogContent/public.js +1 -0
  20. package/components/ThemeProvider/ThemeProvider.js +1 -1
  21. package/components/theme/types.d.ts +1 -1
  22. package/node/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActionsSkeleton/styles.d.ts +1 -1
  23. package/node/components/DataGridActionCell/DataGridSecondaryActions/DataGridSecondaryActionsSkeleton/styles.js +2 -5
  24. package/node/components/Dialog/styles.js +6 -0
  25. package/node/components/DialogActions/DialogActions.d.ts +1 -1
  26. package/node/components/DialogActions/DialogActions.js +4 -2
  27. package/node/components/DialogActions/constants.d.ts +3 -0
  28. package/node/components/DialogActions/constants.js +7 -0
  29. package/node/components/DialogActions/index.d.ts +1 -0
  30. package/node/components/DialogActions/index.js +3 -0
  31. package/node/components/DialogActions/public.d.ts +1 -0
  32. package/node/components/DialogActions/public.js +3 -0
  33. package/node/components/DialogContent/DialogContent.d.ts +1 -1
  34. package/node/components/DialogContent/DialogContent.js +3 -1
  35. package/node/components/DialogContent/constants.d.ts +3 -0
  36. package/node/components/DialogContent/constants.js +7 -0
  37. package/node/components/DialogContent/index.d.ts +1 -0
  38. package/node/components/DialogContent/index.js +3 -0
  39. package/node/components/DialogContent/public.d.ts +1 -0
  40. package/node/components/DialogContent/public.js +3 -0
  41. package/node/components/ThemeProvider/ThemeProvider.js +2 -5
  42. package/node/components/theme/types.d.ts +1 -1
  43. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const SkeletonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
+ export declare const SkeletonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,4 +1,4 @@
1
- import styled from '@mui/material/styles/styled';
1
+ import { styled } from '@mui/material/styles';
2
2
  export const SkeletonWrapper = styled('div') `
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -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,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ThemeProvider as EmotionThemeProvider } from '@emotion/react';
3
- import MuiThemeProvider from '@mui/material/styles/ThemeProvider';
3
+ import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
4
4
  import { GlobalStyles } from '../GlobalStyles';
5
5
  export const ThemeProvider = (props) => {
6
6
  const { children, theme, withScopedStyles = false } = props;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="src/components/declaration/emotion" />
2
- import type { Theme as MuiTheme } from '@mui/material/styles/createTheme';
2
+ import type { Theme as MuiTheme } from '@mui/material/styles';
3
3
  import { type Typography } from '@mui/material/styles/createTypography';
4
4
  import { type CSSProperties } from 'react';
5
5
  import type { Elevation } from './elevation';
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export declare const SkeletonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
+ export declare const SkeletonWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.SkeletonWrapper = void 0;
7
- const styled_1 = __importDefault(require("@mui/material/styles/styled"));
8
- exports.SkeletonWrapper = (0, styled_1.default)('div') `
4
+ const styles_1 = require("@mui/material/styles");
5
+ exports.SkeletonWrapper = (0, styles_1.styled)('div') `
9
6
  display: flex;
10
7
  flex-direction: column;
11
8
  gap: ${({ theme }) => theme.spacing(5)};
@@ -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,15 +1,12 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.ThemeProvider = void 0;
7
4
  const jsx_runtime_1 = require("react/jsx-runtime");
8
5
  const react_1 = require("@emotion/react");
9
- const ThemeProvider_1 = __importDefault(require("@mui/material/styles/ThemeProvider"));
6
+ const styles_1 = require("@mui/material/styles");
10
7
  const GlobalStyles_1 = require("../GlobalStyles");
11
8
  const ThemeProvider = (props) => {
12
9
  const { children, theme, withScopedStyles = false } = props;
13
- return ((0, jsx_runtime_1.jsx)(ThemeProvider_1.default, { theme: theme, children: (0, jsx_runtime_1.jsx)(react_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(GlobalStyles_1.GlobalStyles, { withScopedStyles: withScopedStyles, children: children }) }) }));
10
+ return ((0, jsx_runtime_1.jsx)(styles_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(react_1.ThemeProvider, { theme: theme, children: (0, jsx_runtime_1.jsx)(GlobalStyles_1.GlobalStyles, { withScopedStyles: withScopedStyles, children: children }) }) }));
14
11
  };
15
12
  exports.ThemeProvider = ThemeProvider;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="src/components/declaration/emotion" />
2
- import type { Theme as MuiTheme } from '@mui/material/styles/createTheme';
2
+ import type { Theme as MuiTheme } from '@mui/material/styles';
3
3
  import { type Typography } from '@mui/material/styles/createTypography';
4
4
  import { type CSSProperties } from 'react';
5
5
  import type { Elevation } from './elevation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.21.0",
3
+ "version": "4.21.2",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {