@mamrp/components 1.7.70 → 1.7.71
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/charts/index.d.mts +0 -0
- package/dist/charts/index.d.ts +0 -0
- package/dist/charts/index.js +0 -0
- package/dist/charts/index.js.map +0 -0
- package/dist/charts/index.mjs +0 -0
- package/dist/charts/index.mjs.map +0 -0
- package/dist/date-pickers/index.d.mts +0 -0
- package/dist/date-pickers/index.d.ts +0 -0
- package/dist/date-pickers/index.js +0 -0
- package/dist/date-pickers/index.js.map +0 -0
- package/dist/date-pickers/index.mjs +0 -0
- package/dist/date-pickers/index.mjs.map +0 -0
- package/dist/index.d.mts +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -61
- package/dist/index.mjs.map +1 -1
- package/dist/pagination/index.d.mts +0 -0
- package/dist/pagination/index.d.ts +0 -0
- package/dist/pagination/index.js +0 -0
- package/dist/pagination/index.js.map +0 -0
- package/dist/pagination/index.mjs +0 -0
- package/dist/pagination/index.mjs.map +0 -0
- package/dist/selectors/index.d.mts +0 -0
- package/dist/selectors/index.d.ts +0 -0
- package/dist/selectors/index.js +0 -0
- package/dist/selectors/index.js.map +1 -1
- package/dist/selectors/index.mjs +0 -0
- package/dist/selectors/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/charts/index.d.mts
CHANGED
|
File without changes
|
package/dist/charts/index.d.ts
CHANGED
|
File without changes
|
package/dist/charts/index.js
CHANGED
|
File without changes
|
package/dist/charts/index.js.map
CHANGED
|
File without changes
|
package/dist/charts/index.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/index.d.mts
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -1051,16 +1051,40 @@ function DraggablePaper({
|
|
|
1051
1051
|
...props
|
|
1052
1052
|
}) {
|
|
1053
1053
|
const nodeRef = (0, import_react8.useRef)(null);
|
|
1054
|
+
const [position, setPosition] = (0, import_react8.useState)({ x: 0, y: 0 });
|
|
1055
|
+
const [dragging, setDragging] = (0, import_react8.useState)(false);
|
|
1056
|
+
const handleDrag = (_, data) => {
|
|
1057
|
+
setPosition({ x: data.x, y: data.y });
|
|
1058
|
+
};
|
|
1059
|
+
const handleStart = () => {
|
|
1060
|
+
setDragging(true);
|
|
1061
|
+
};
|
|
1062
|
+
const handleStop = () => {
|
|
1063
|
+
setDragging(false);
|
|
1064
|
+
setPosition({ x: 0, y: 0 });
|
|
1065
|
+
};
|
|
1054
1066
|
return /* @__PURE__ */ React.createElement(
|
|
1055
1067
|
import_react_draggable.default,
|
|
1056
1068
|
{
|
|
1057
1069
|
nodeRef,
|
|
1058
1070
|
handle,
|
|
1059
1071
|
cancel,
|
|
1060
|
-
|
|
1061
|
-
|
|
1072
|
+
position,
|
|
1073
|
+
onStart: handleStart,
|
|
1074
|
+
onDrag: handleDrag,
|
|
1075
|
+
onStop: handleStop
|
|
1062
1076
|
},
|
|
1063
|
-
/* @__PURE__ */ React.createElement(
|
|
1077
|
+
/* @__PURE__ */ React.createElement(
|
|
1078
|
+
import_material10.Paper,
|
|
1079
|
+
{
|
|
1080
|
+
ref: nodeRef,
|
|
1081
|
+
...props,
|
|
1082
|
+
sx: {
|
|
1083
|
+
transition: dragging ? "none" : "transform 250ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
1084
|
+
...props.sx
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
)
|
|
1064
1088
|
);
|
|
1065
1089
|
}
|
|
1066
1090
|
|