@bluemarble/bm-components 2.4.5 → 2.4.7

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/dist/index.d.cts CHANGED
@@ -451,12 +451,13 @@ interface IBaseDialogInstanceProviderProps {
451
451
  name: symbol;
452
452
  }
453
453
 
454
- interface IBaseDialogContainerProps extends Omit<TModalProps, 'children' | 'open' | 'onClose'> {
454
+ interface IBaseDialogContainerProps {
455
+ BoxProps?: BoxProps;
455
456
  children: React__default.ReactNode | ((props: {
456
457
  close: () => void;
457
458
  }) => React__default.ReactNode);
458
459
  }
459
- declare const BaseDialogContainer: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
460
+ declare const BaseDialogContainer: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
460
461
  interface IBaseDialogBodyProps extends BoxProps {
461
462
  }
462
463
  declare const BaseDialogBody: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
@@ -468,7 +469,7 @@ declare const BaseDialogCreate: (name?: symbol) => {
468
469
  name: symbol;
469
470
  Trigger: (props: Omit<IBaseDialogTriggerProps, "name">) => React__default.JSX.Element;
470
471
  Root: (props: Omit<IBaseDialogInstanceProviderProps, "name">) => React__default.JSX.Element;
471
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
472
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
472
473
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
473
474
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
474
475
  };
@@ -477,14 +478,14 @@ declare const BaseDialog: {
477
478
  name: symbol;
478
479
  Trigger: (props: Omit<IBaseDialogTriggerProps, "name">) => React__default.JSX.Element;
479
480
  Root: (props: Omit<IBaseDialogInstanceProviderProps, "name">) => React__default.JSX.Element;
480
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
481
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
481
482
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
482
483
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
483
484
  };
484
485
  Trigger: ({ name, onClick, ...props }: IBaseDialogTriggerProps) => React__default.JSX.Element;
485
486
  Provider: (props: any) => React__default.JSX.Element;
486
487
  Root: (props: IBaseDialogInstanceProviderProps) => React__default.JSX.Element;
487
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
488
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
488
489
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
489
490
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
490
491
  };
@@ -544,7 +545,7 @@ interface HelperRequest {
544
545
  };
545
546
  cookies: Record<string, string>;
546
547
  body?: any;
547
- query?: Record<string, string | string[] | undefined>;
548
+ query: Record<string, string | string[]>;
548
549
  user?: any;
549
550
  }
550
551
  interface HelperResponse {
package/dist/index.d.ts CHANGED
@@ -451,12 +451,13 @@ interface IBaseDialogInstanceProviderProps {
451
451
  name: symbol;
452
452
  }
453
453
 
454
- interface IBaseDialogContainerProps extends Omit<TModalProps, 'children' | 'open' | 'onClose'> {
454
+ interface IBaseDialogContainerProps {
455
+ BoxProps?: BoxProps;
455
456
  children: React__default.ReactNode | ((props: {
456
457
  close: () => void;
457
458
  }) => React__default.ReactNode);
458
459
  }
459
- declare const BaseDialogContainer: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
460
+ declare const BaseDialogContainer: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
460
461
  interface IBaseDialogBodyProps extends BoxProps {
461
462
  }
462
463
  declare const BaseDialogBody: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
@@ -468,7 +469,7 @@ declare const BaseDialogCreate: (name?: symbol) => {
468
469
  name: symbol;
469
470
  Trigger: (props: Omit<IBaseDialogTriggerProps, "name">) => React__default.JSX.Element;
470
471
  Root: (props: Omit<IBaseDialogInstanceProviderProps, "name">) => React__default.JSX.Element;
471
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
472
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
472
473
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
473
474
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
474
475
  };
@@ -477,14 +478,14 @@ declare const BaseDialog: {
477
478
  name: symbol;
478
479
  Trigger: (props: Omit<IBaseDialogTriggerProps, "name">) => React__default.JSX.Element;
479
480
  Root: (props: Omit<IBaseDialogInstanceProviderProps, "name">) => React__default.JSX.Element;
480
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
481
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
481
482
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
482
483
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
483
484
  };
484
485
  Trigger: ({ name, onClick, ...props }: IBaseDialogTriggerProps) => React__default.JSX.Element;
485
486
  Provider: (props: any) => React__default.JSX.Element;
486
487
  Root: (props: IBaseDialogInstanceProviderProps) => React__default.JSX.Element;
487
- Container: ({ children, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
488
+ Container: ({ children, BoxProps, ...rest }: IBaseDialogContainerProps) => React__default.JSX.Element;
488
489
  Header: ({ title, onClose, IconButtonProps, TypographyProps, ...props }: DialogHeaderProps) => React__default.JSX.Element;
489
490
  Body: (props: IBaseDialogBodyProps) => React__default.JSX.Element;
490
491
  };
@@ -544,7 +545,7 @@ interface HelperRequest {
544
545
  };
545
546
  cookies: Record<string, string>;
546
547
  body?: any;
547
- query?: Record<string, string | string[] | undefined>;
548
+ query: Record<string, string | string[]>;
548
549
  user?: any;
549
550
  }
550
551
  interface HelperResponse {
package/dist/index.js CHANGED
@@ -4500,7 +4500,7 @@ function useBaseDialogInstance() {
4500
4500
  }
4501
4501
 
4502
4502
  // src/components/BaseDialog/BaseDialog.tsx
4503
- import { Box as Box8, Button as Button4 } from "@mui/material";
4503
+ import { Box as Box8, Button as Button4, Modal as Modal2 } from "@mui/material";
4504
4504
 
4505
4505
  // src/components/BaseDialog/BaseDialogHeader.tsx
4506
4506
  import React28 from "react";
@@ -4541,11 +4541,28 @@ var BaseDialogHeader = ({
4541
4541
  // src/components/BaseDialog/BaseDialog.tsx
4542
4542
  var BaseDialogContainer = ({
4543
4543
  children,
4544
+ BoxProps: BoxProps3 = {},
4544
4545
  ...rest
4545
4546
  }) => {
4546
4547
  const { name } = useBaseDialogInstance();
4547
4548
  const { isOpened, close: closeDialog } = useBaseDialog();
4548
- return /* @__PURE__ */ React29.createElement(Modal, { open: isOpened(name), onClose: () => closeDialog(name), ...rest }, children instanceof Function ? children({ close: () => closeDialog(name) }) : children);
4549
+ return /* @__PURE__ */ React29.createElement(Modal2, { open: isOpened(name), onClose: () => closeDialog(name), ...rest }, /* @__PURE__ */ React29.createElement(
4550
+ Box8,
4551
+ {
4552
+ ...BoxProps3,
4553
+ sx: {
4554
+ outline: "none",
4555
+ backgroundColor: "background.paper",
4556
+ position: "absolute",
4557
+ top: "50%",
4558
+ left: "50%",
4559
+ transform: "translate(-50%, -50%)",
4560
+ borderRadius: 1,
4561
+ ...BoxProps3?.sx
4562
+ }
4563
+ },
4564
+ children
4565
+ ));
4549
4566
  };
4550
4567
  var BaseDialogBody = (props) => {
4551
4568
  return /* @__PURE__ */ React29.createElement(Box8, { px: 2, pb: 2, width: "100vw", maxWidth: 650, ...props }, props.children);