mayak-common-library 0.0.82 → 0.0.84
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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -15
- package/dist/index.mjs +24 -15
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import React__default, { FC, PropsWithChildren, ReactElement, MouseEvent } from 'react';
|
|
5
5
|
import { IconButtonProps } from '@mui/material/IconButton/IconButton';
|
|
6
6
|
import { SelectProps } from '@mui/material/Select/Select';
|
|
7
|
+
import { SystemStyleObject } from '@mui/system/styleFunctionSx/styleFunctionSx';
|
|
7
8
|
import { ChipProps, ToggleButtonGroupProps as ToggleButtonGroupProps$1, ToggleButtonProps } from '@mui/material';
|
|
8
9
|
import { BadgeProps } from '@mui/material/Badge/Badge';
|
|
9
10
|
import { AvatarProps } from '@mui/material/Avatar/Avatar';
|
|
@@ -55,6 +56,8 @@ interface SelectProProps {
|
|
|
55
56
|
openUp?: boolean;
|
|
56
57
|
intermediateChild?: ReactElement;
|
|
57
58
|
accentBgColor?: true;
|
|
59
|
+
paperSx?: SystemStyleObject;
|
|
60
|
+
childContainerSx?: SystemStyleObject;
|
|
58
61
|
}
|
|
59
62
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
60
63
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import React__default, { FC, PropsWithChildren, ReactElement, MouseEvent } from 'react';
|
|
5
5
|
import { IconButtonProps } from '@mui/material/IconButton/IconButton';
|
|
6
6
|
import { SelectProps } from '@mui/material/Select/Select';
|
|
7
|
+
import { SystemStyleObject } from '@mui/system/styleFunctionSx/styleFunctionSx';
|
|
7
8
|
import { ChipProps, ToggleButtonGroupProps as ToggleButtonGroupProps$1, ToggleButtonProps } from '@mui/material';
|
|
8
9
|
import { BadgeProps } from '@mui/material/Badge/Badge';
|
|
9
10
|
import { AvatarProps } from '@mui/material/Avatar/Avatar';
|
|
@@ -55,6 +56,8 @@ interface SelectProProps {
|
|
|
55
56
|
openUp?: boolean;
|
|
56
57
|
intermediateChild?: ReactElement;
|
|
57
58
|
accentBgColor?: true;
|
|
59
|
+
paperSx?: SystemStyleObject;
|
|
60
|
+
childContainerSx?: SystemStyleObject;
|
|
58
61
|
}
|
|
59
62
|
declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
60
63
|
|
package/dist/index.js
CHANGED
|
@@ -307,7 +307,9 @@ var SelectPro = ({
|
|
|
307
307
|
freeChildWidth = false,
|
|
308
308
|
openUp,
|
|
309
309
|
intermediateChild,
|
|
310
|
-
accentBgColor
|
|
310
|
+
accentBgColor,
|
|
311
|
+
paperSx,
|
|
312
|
+
childContainerSx
|
|
311
313
|
}) => {
|
|
312
314
|
const [btn, setAnchorEl] = (0, import_react2.useState)(null);
|
|
313
315
|
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
@@ -378,7 +380,7 @@ var SelectPro = ({
|
|
|
378
380
|
btn ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
379
381
|
import_material4.Paper,
|
|
380
382
|
{
|
|
381
|
-
sx: (theme2) => ({
|
|
383
|
+
sx: (theme2) => __spreadValues({
|
|
382
384
|
backgroundColor: accentBgColor ? "#F5F5F5" : "#fff",
|
|
383
385
|
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
384
386
|
// left: fullContainerWidth ? 0 : "initial",
|
|
@@ -387,22 +389,29 @@ var SelectPro = ({
|
|
|
387
389
|
[theme2.breakpoints.up("sm")]: {
|
|
388
390
|
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
|
|
389
391
|
}
|
|
390
|
-
}),
|
|
392
|
+
}, paperSx),
|
|
391
393
|
className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
|
|
392
394
|
children: [
|
|
393
395
|
intermediateChild ? intermediateChild : null,
|
|
394
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
397
|
+
import_material4.Box,
|
|
398
|
+
{
|
|
399
|
+
className: `flex flex-col py-3 px-4 gap-2 shadow-sm`,
|
|
400
|
+
sx: childContainerSx,
|
|
401
|
+
children: [
|
|
402
|
+
overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
403
|
+
IconButton_default,
|
|
404
|
+
{
|
|
405
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
406
|
+
onClick: handleClose,
|
|
407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
|
|
408
|
+
}
|
|
409
|
+
) : null,
|
|
410
|
+
childTitle ? childTitle : null,
|
|
411
|
+
childrenWithHandleChange
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
)
|
|
406
415
|
]
|
|
407
416
|
}
|
|
408
417
|
) : null
|
package/dist/index.mjs
CHANGED
|
@@ -248,7 +248,9 @@ var SelectPro = ({
|
|
|
248
248
|
freeChildWidth = false,
|
|
249
249
|
openUp,
|
|
250
250
|
intermediateChild,
|
|
251
|
-
accentBgColor
|
|
251
|
+
accentBgColor,
|
|
252
|
+
paperSx,
|
|
253
|
+
childContainerSx
|
|
252
254
|
}) => {
|
|
253
255
|
const [btn, setAnchorEl] = useState2(null);
|
|
254
256
|
const [open, setOpen] = useState2(false);
|
|
@@ -319,7 +321,7 @@ var SelectPro = ({
|
|
|
319
321
|
btn ? /* @__PURE__ */ jsxs3(
|
|
320
322
|
Paper,
|
|
321
323
|
{
|
|
322
|
-
sx: (theme2) => ({
|
|
324
|
+
sx: (theme2) => __spreadValues({
|
|
323
325
|
backgroundColor: accentBgColor ? "#F5F5F5" : "#fff",
|
|
324
326
|
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
325
327
|
// left: fullContainerWidth ? 0 : "initial",
|
|
@@ -328,22 +330,29 @@ var SelectPro = ({
|
|
|
328
330
|
[theme2.breakpoints.up("sm")]: {
|
|
329
331
|
width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
|
|
330
332
|
}
|
|
331
|
-
}),
|
|
333
|
+
}, paperSx),
|
|
332
334
|
className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
|
|
333
335
|
children: [
|
|
334
336
|
intermediateChild ? intermediateChild : null,
|
|
335
|
-
/* @__PURE__ */ jsxs3(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
337
|
+
/* @__PURE__ */ jsxs3(
|
|
338
|
+
Box,
|
|
339
|
+
{
|
|
340
|
+
className: `flex flex-col py-3 px-4 gap-2 shadow-sm`,
|
|
341
|
+
sx: childContainerSx,
|
|
342
|
+
children: [
|
|
343
|
+
overButton ? /* @__PURE__ */ jsx7(
|
|
344
|
+
IconButton_default,
|
|
345
|
+
{
|
|
346
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
347
|
+
onClick: handleClose,
|
|
348
|
+
children: /* @__PURE__ */ jsx7(close_default, {})
|
|
349
|
+
}
|
|
350
|
+
) : null,
|
|
351
|
+
childTitle ? childTitle : null,
|
|
352
|
+
childrenWithHandleChange
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
)
|
|
347
356
|
]
|
|
348
357
|
}
|
|
349
358
|
) : null
|