mayak-common-library 0.0.98 → 0.0.99
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -5
- package/dist/index.mjs +2 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -55,13 +55,13 @@ interface SelectProProps {
|
|
|
55
55
|
freeChildWidth?: boolean;
|
|
56
56
|
disableCloseButton?: boolean;
|
|
57
57
|
openUp?: boolean;
|
|
58
|
-
collapse?: boolean;
|
|
59
58
|
intermediateChild?: ReactElement;
|
|
60
59
|
actionsComponent?: ReactElement;
|
|
61
60
|
accentBgColor?: true;
|
|
62
61
|
paperSx?: SystemStyleObject;
|
|
63
62
|
childContainerSx?: SystemStyleObject;
|
|
64
63
|
reverseAnimation?: boolean;
|
|
64
|
+
containerSx?: SystemStyleObject;
|
|
65
65
|
}
|
|
66
66
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
67
67
|
|
package/dist/index.d.ts
CHANGED
|
@@ -55,13 +55,13 @@ interface SelectProProps {
|
|
|
55
55
|
freeChildWidth?: boolean;
|
|
56
56
|
disableCloseButton?: boolean;
|
|
57
57
|
openUp?: boolean;
|
|
58
|
-
collapse?: boolean;
|
|
59
58
|
intermediateChild?: ReactElement;
|
|
60
59
|
actionsComponent?: ReactElement;
|
|
61
60
|
accentBgColor?: true;
|
|
62
61
|
paperSx?: SystemStyleObject;
|
|
63
62
|
childContainerSx?: SystemStyleObject;
|
|
64
63
|
reverseAnimation?: boolean;
|
|
64
|
+
containerSx?: SystemStyleObject;
|
|
65
65
|
}
|
|
66
66
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
67
67
|
|
package/dist/index.js
CHANGED
|
@@ -335,7 +335,7 @@ var SelectPro = ({
|
|
|
335
335
|
childContainerSx,
|
|
336
336
|
reverseAnimation = false,
|
|
337
337
|
actionsComponent,
|
|
338
|
-
|
|
338
|
+
containerSx
|
|
339
339
|
}) => {
|
|
340
340
|
const [btn, setAnchorEl] = (0, import_react2.useState)(null);
|
|
341
341
|
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
@@ -357,16 +357,13 @@ var SelectPro = ({
|
|
|
357
357
|
setAnchorEl(null);
|
|
358
358
|
}, 200);
|
|
359
359
|
};
|
|
360
|
-
(0, import_react2.useEffect)(() => {
|
|
361
|
-
if (collapse) handleClose();
|
|
362
|
-
}, [collapse]);
|
|
363
360
|
const childrenWithHandleChange = (0, import_react2.isValidElement)(children) ? (0, import_react2.cloneElement)(children, {
|
|
364
361
|
collapseParent: handleClose
|
|
365
362
|
}) : children;
|
|
366
363
|
const actionsComponentWithHandleChange = (0, import_react2.isValidElement)(actionsComponent) ? (0, import_react2.cloneElement)(actionsComponent, {
|
|
367
364
|
collapseParent: handleClose
|
|
368
365
|
}) : actionsComponent;
|
|
369
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material4.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { width: fullWidth ? "100%" : "inherit", children: [
|
|
366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_material4.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { width: fullWidth ? "100%" : "inherit", sx: __spreadValues({}, containerSx), children: [
|
|
370
367
|
clickComponent ? (0, import_react2.cloneElement)(clickComponent, {
|
|
371
368
|
ref: btn,
|
|
372
369
|
onClick: handleClick,
|
package/dist/index.mjs
CHANGED
|
@@ -276,7 +276,7 @@ var SelectPro = ({
|
|
|
276
276
|
childContainerSx,
|
|
277
277
|
reverseAnimation = false,
|
|
278
278
|
actionsComponent,
|
|
279
|
-
|
|
279
|
+
containerSx
|
|
280
280
|
}) => {
|
|
281
281
|
const [btn, setAnchorEl] = useState2(null);
|
|
282
282
|
const [open, setOpen] = useState2(false);
|
|
@@ -298,16 +298,13 @@ var SelectPro = ({
|
|
|
298
298
|
setAnchorEl(null);
|
|
299
299
|
}, 200);
|
|
300
300
|
};
|
|
301
|
-
useEffect2(() => {
|
|
302
|
-
if (collapse) handleClose();
|
|
303
|
-
}, [collapse]);
|
|
304
301
|
const childrenWithHandleChange = isValidElement(children) ? cloneElement(children, {
|
|
305
302
|
collapseParent: handleClose
|
|
306
303
|
}) : children;
|
|
307
304
|
const actionsComponentWithHandleChange = isValidElement(actionsComponent) ? cloneElement(actionsComponent, {
|
|
308
305
|
collapseParent: handleClose
|
|
309
306
|
}) : actionsComponent;
|
|
310
|
-
return /* @__PURE__ */ jsx7(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxs3(Box, { width: fullWidth ? "100%" : "inherit", children: [
|
|
307
|
+
return /* @__PURE__ */ jsx7(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxs3(Box, { width: fullWidth ? "100%" : "inherit", sx: __spreadValues({}, containerSx), children: [
|
|
311
308
|
clickComponent ? cloneElement(clickComponent, {
|
|
312
309
|
ref: btn,
|
|
313
310
|
onClick: handleClick,
|