mayak-common-library 0.0.21 → 0.0.23

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.js CHANGED
@@ -369,8 +369,8 @@ var SelectPro_default = SelectPro;
369
369
 
370
370
  // src/components/Chip/Chip.tsx
371
371
  var import_material5 = require("@mui/material");
372
- var StyledChip = (0, import_material5.styled)(import_material5.Chip)(({ theme }) => ({
373
- borderRadius: theme.shape.borderRadius
372
+ var StyledChip = (0, import_material5.styled)(import_material5.Chip)(({ theme: theme2 }) => ({
373
+ borderRadius: theme2.shape.borderRadius
374
374
  }));
375
375
  var ChipViews = {
376
376
  black: "bg-accent-dark text-accent-white py-1.5 px-4",
@@ -442,7 +442,7 @@ var RadioGroup_default = CustomRadioGroup;
442
442
  // src/components/Switch/Switch.tsx
443
443
  var import_material7 = require("@mui/material");
444
444
  var import_Typography3 = __toESM(require("@mui/material/Typography"));
445
- var Switch = (0, import_material7.styled)(import_material7.Switch)(({ theme }) => ({
445
+ var Switch = (0, import_material7.styled)(import_material7.Switch)(({ theme: theme2 }) => ({
446
446
  width: 60,
447
447
  height: 30,
448
448
  padding: 0,
@@ -472,7 +472,7 @@ var Switch = (0, import_material7.styled)(import_material7.Switch)(({ theme }) =
472
472
  width: 20,
473
473
  height: 20,
474
474
  borderRadius: "100%",
475
- transition: theme.transitions.create(["width"], {
475
+ transition: theme2.transitions.create(["width"], {
476
476
  duration: 200
477
477
  })
478
478
  },
@@ -631,7 +631,7 @@ var _theme = {
631
631
  };
632
632
 
633
633
  // src/theme/index.tsx
634
- var MUIWrapperContext = (0, import_react6.createContext)({});
634
+ var theme = (0, import_createTheme.default)(__spreadValues({}, _theme));
635
635
  function ThemeRegistry(props) {
636
636
  const { children } = props;
637
637
  const [{ cache, flush }] = (0, import_react6.useState)(() => {
@@ -656,10 +656,6 @@ function ThemeRegistry(props) {
656
656
  };
657
657
  return { cache: cache2, flush: flush2 };
658
658
  });
659
- const theme = (0, import_react6.useMemo)(
660
- () => (0, import_createTheme.default)(__spreadValues({}, _theme)),
661
- []
662
- );
663
659
  (0, import_navigation.useServerInsertedHTML)(() => {
664
660
  const names = flush();
665
661
  if (names.length === 0) return null;
@@ -678,7 +674,7 @@ function ThemeRegistry(props) {
678
674
  }
679
675
  );
680
676
  });
681
- return /* @__PURE__ */ React.createElement(MUIWrapperContext.Provider, { value: {} }, /* @__PURE__ */ React.createElement(import_react7.CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(import_ThemeProvider.default, { theme }, /* @__PURE__ */ React.createElement(import_CssBaseline.default, null), children)));
677
+ return /* @__PURE__ */ React.createElement(import_react7.CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(import_ThemeProvider.default, { theme }, /* @__PURE__ */ React.createElement(import_CssBaseline.default, null), children));
682
678
  }
683
679
 
684
680
  // src/providers/Providers.tsx
package/dist/index.mjs CHANGED
@@ -319,8 +319,8 @@ var SelectPro_default = SelectPro;
319
319
 
320
320
  // src/components/Chip/Chip.tsx
321
321
  import { Chip, styled as styled4 } from "@mui/material";
322
- var StyledChip = styled4(Chip)(({ theme }) => ({
323
- borderRadius: theme.shape.borderRadius
322
+ var StyledChip = styled4(Chip)(({ theme: theme2 }) => ({
323
+ borderRadius: theme2.shape.borderRadius
324
324
  }));
325
325
  var ChipViews = {
326
326
  black: "bg-accent-dark text-accent-white py-1.5 px-4",
@@ -392,7 +392,7 @@ var RadioGroup_default = CustomRadioGroup;
392
392
  // src/components/Switch/Switch.tsx
393
393
  import { Stack, styled as styled5, Switch as SwitchMUI } from "@mui/material";
394
394
  import Typography4 from "@mui/material/Typography";
395
- var Switch = styled5(SwitchMUI)(({ theme }) => ({
395
+ var Switch = styled5(SwitchMUI)(({ theme: theme2 }) => ({
396
396
  width: 60,
397
397
  height: 30,
398
398
  padding: 0,
@@ -422,7 +422,7 @@ var Switch = styled5(SwitchMUI)(({ theme }) => ({
422
422
  width: 20,
423
423
  height: 20,
424
424
  borderRadius: "100%",
425
- transition: theme.transitions.create(["width"], {
425
+ transition: theme2.transitions.create(["width"], {
426
426
  duration: 200
427
427
  })
428
428
  },
@@ -535,7 +535,7 @@ var FromToInput = ({ label }) => {
535
535
  var FromToInput_default = FromToInput;
536
536
 
537
537
  // src/theme/index.tsx
538
- import { createContext, useMemo, useState as useState3 } from "react";
538
+ import { useState as useState3 } from "react";
539
539
  import createCache from "@emotion/cache";
540
540
  import { useServerInsertedHTML } from "next/navigation";
541
541
  import { CacheProvider } from "@emotion/react";
@@ -581,7 +581,7 @@ var _theme = {
581
581
  };
582
582
 
583
583
  // src/theme/index.tsx
584
- var MUIWrapperContext = createContext({});
584
+ var theme = createTheme(__spreadValues({}, _theme));
585
585
  function ThemeRegistry(props) {
586
586
  const { children } = props;
587
587
  const [{ cache, flush }] = useState3(() => {
@@ -606,10 +606,6 @@ function ThemeRegistry(props) {
606
606
  };
607
607
  return { cache: cache2, flush: flush2 };
608
608
  });
609
- const theme = useMemo(
610
- () => createTheme(__spreadValues({}, _theme)),
611
- []
612
- );
613
609
  useServerInsertedHTML(() => {
614
610
  const names = flush();
615
611
  if (names.length === 0) return null;
@@ -628,7 +624,7 @@ function ThemeRegistry(props) {
628
624
  }
629
625
  );
630
626
  });
631
- return /* @__PURE__ */ React.createElement(MUIWrapperContext.Provider, { value: {} }, /* @__PURE__ */ React.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React.createElement(CssBaseline, null), children)));
627
+ return /* @__PURE__ */ React.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React.createElement(CssBaseline, null), children));
632
628
  }
633
629
 
634
630
  // src/providers/Providers.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",