@bluemarble/bm-components 2.4.4 → 2.4.6
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.cjs +28 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -451,7 +451,8 @@ interface IBaseDialogInstanceProviderProps {
|
|
|
451
451
|
name: symbol;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
interface IBaseDialogContainerProps
|
|
454
|
+
interface IBaseDialogContainerProps {
|
|
455
|
+
BoxProps?: BoxProps;
|
|
455
456
|
children: React__default.ReactNode | ((props: {
|
|
456
457
|
close: () => void;
|
|
457
458
|
}) => React__default.ReactNode);
|
package/dist/index.d.ts
CHANGED
|
@@ -451,7 +451,8 @@ interface IBaseDialogInstanceProviderProps {
|
|
|
451
451
|
name: symbol;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
interface IBaseDialogContainerProps
|
|
454
|
+
interface IBaseDialogContainerProps {
|
|
455
|
+
BoxProps?: BoxProps;
|
|
455
456
|
children: React__default.ReactNode | ((props: {
|
|
456
457
|
close: () => void;
|
|
457
458
|
}) => React__default.ReactNode);
|
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";
|
|
@@ -4545,7 +4545,23 @@ var BaseDialogContainer = ({
|
|
|
4545
4545
|
}) => {
|
|
4546
4546
|
const { name } = useBaseDialogInstance();
|
|
4547
4547
|
const { isOpened, close: closeDialog } = useBaseDialog();
|
|
4548
|
-
return /* @__PURE__ */ React29.createElement(
|
|
4548
|
+
return /* @__PURE__ */ React29.createElement(Modal2, { open: isOpened(name), onClose: () => closeDialog(name), ...rest }, /* @__PURE__ */ React29.createElement(
|
|
4549
|
+
Box8,
|
|
4550
|
+
{
|
|
4551
|
+
...rest?.BoxProps,
|
|
4552
|
+
sx: {
|
|
4553
|
+
outline: "none",
|
|
4554
|
+
backgroundColor: "background.paper",
|
|
4555
|
+
position: "absolute",
|
|
4556
|
+
top: "50%",
|
|
4557
|
+
left: "50%",
|
|
4558
|
+
transform: "translate(-50%, -50%)",
|
|
4559
|
+
borderRadius: 1,
|
|
4560
|
+
...rest?.BoxProps?.sx
|
|
4561
|
+
}
|
|
4562
|
+
},
|
|
4563
|
+
children
|
|
4564
|
+
));
|
|
4549
4565
|
};
|
|
4550
4566
|
var BaseDialogBody = (props) => {
|
|
4551
4567
|
return /* @__PURE__ */ React29.createElement(Box8, { px: 2, pb: 2, width: "100vw", maxWidth: 650, ...props }, props.children);
|
|
@@ -5393,6 +5409,7 @@ var _ApiHelper = class _ApiHelper {
|
|
|
5393
5409
|
return async (req, res) => {
|
|
5394
5410
|
const methods = factory(req, res);
|
|
5395
5411
|
const handler = methods[req.method];
|
|
5412
|
+
if (req.method === "OPTIONS") return res.status(200).end();
|
|
5396
5413
|
if (!handler) return res.status(405).json({ error: "M\xE9todo inv\xE1lido" });
|
|
5397
5414
|
const methodWithMiddlewares = this.middlewares.reduce((acc, fn) => {
|
|
5398
5415
|
return fn(acc, options);
|