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 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)(import_material4.Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
395
- overButton ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
396
- IconButton_default,
397
- {
398
- className: "bg-accent-silver p-1 self-end absolute",
399
- onClick: handleClose,
400
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
401
- }
402
- ) : null,
403
- childTitle ? childTitle : null,
404
- childrenWithHandleChange
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(Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
336
- overButton ? /* @__PURE__ */ jsx7(
337
- IconButton_default,
338
- {
339
- className: "bg-accent-silver p-1 self-end absolute",
340
- onClick: handleClose,
341
- children: /* @__PURE__ */ jsx7(close_default, {})
342
- }
343
- ) : null,
344
- childTitle ? childTitle : null,
345
- childrenWithHandleChange
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",