mayak-common-library 0.0.81 → 0.0.83

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,7 @@ interface SelectProProps {
55
56
  openUp?: boolean;
56
57
  intermediateChild?: ReactElement;
57
58
  accentBgColor?: true;
59
+ paperSx?: SystemStyleObject;
58
60
  }
59
61
  declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
60
62
 
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,7 @@ interface SelectProProps {
55
56
  openUp?: boolean;
56
57
  intermediateChild?: ReactElement;
57
58
  accentBgColor?: true;
59
+ paperSx?: SystemStyleObject;
58
60
  }
59
61
  declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
60
62
 
package/dist/index.js CHANGED
@@ -307,7 +307,8 @@ var SelectPro = ({
307
307
  freeChildWidth = false,
308
308
  openUp,
309
309
  intermediateChild,
310
- accentBgColor
310
+ accentBgColor,
311
+ paperSx
311
312
  }) => {
312
313
  const [btn, setAnchorEl] = (0, import_react2.useState)(null);
313
314
  const [open, setOpen] = (0, import_react2.useState)(false);
@@ -378,7 +379,8 @@ var SelectPro = ({
378
379
  btn ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
379
380
  import_material4.Paper,
380
381
  {
381
- sx: (theme2) => ({
382
+ sx: (theme2) => __spreadValues({
383
+ backgroundColor: accentBgColor ? "#F5F5F5" : "#fff",
382
384
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
383
385
  // left: fullContainerWidth ? 0 : "initial",
384
386
  right: fullContainerWidth ? 0 : "initial",
@@ -386,8 +388,8 @@ var SelectPro = ({
386
388
  [theme2.breakpoints.up("sm")]: {
387
389
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
388
390
  }
389
- }),
390
- className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}${accentBgColor ? "bg-accent-silver" : "bg-accent-white"}`,
391
+ }, paperSx),
392
+ className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
391
393
  children: [
392
394
  intermediateChild ? intermediateChild : null,
393
395
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_material4.Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
package/dist/index.mjs CHANGED
@@ -248,7 +248,8 @@ var SelectPro = ({
248
248
  freeChildWidth = false,
249
249
  openUp,
250
250
  intermediateChild,
251
- accentBgColor
251
+ accentBgColor,
252
+ paperSx
252
253
  }) => {
253
254
  const [btn, setAnchorEl] = useState2(null);
254
255
  const [open, setOpen] = useState2(false);
@@ -319,7 +320,8 @@ var SelectPro = ({
319
320
  btn ? /* @__PURE__ */ jsxs3(
320
321
  Paper,
321
322
  {
322
- sx: (theme2) => ({
323
+ sx: (theme2) => __spreadValues({
324
+ backgroundColor: accentBgColor ? "#F5F5F5" : "#fff",
323
325
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "100%",
324
326
  // left: fullContainerWidth ? 0 : "initial",
325
327
  right: fullContainerWidth ? 0 : "initial",
@@ -327,8 +329,8 @@ var SelectPro = ({
327
329
  [theme2.breakpoints.up("sm")]: {
328
330
  width: freeChildWidth ? "fit-content" : !fullContainerWidth && btn ? btn.offsetWidth : "115%"
329
331
  }
330
- }),
331
- className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}${accentBgColor ? "bg-accent-silver" : "bg-accent-white"}`,
332
+ }, paperSx),
333
+ className: `absolute select ${open ? "select--open" : "select--close"} z-50 rounded-none shadow-none ${intermediateChild ? "mt-[1px]" : "m-0"}`,
332
334
  children: [
333
335
  intermediateChild ? intermediateChild : null,
334
336
  /* @__PURE__ */ jsxs3(Box, { className: `flex flex-col py-3 px-4 gap-2 shadow-sm`, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",