mayak-common-library 0.0.22 → 0.0.24
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 +19 -20
- package/dist/index.mjs +13 -14
- package/package.json +1 -1
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:
|
|
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:
|
|
475
|
+
transition: theme2.transitions.create(["width"], {
|
|
476
476
|
duration: 200
|
|
477
477
|
})
|
|
478
478
|
},
|
|
@@ -584,6 +584,9 @@ var FromToInput = ({ label }) => {
|
|
|
584
584
|
};
|
|
585
585
|
var FromToInput_default = FromToInput;
|
|
586
586
|
|
|
587
|
+
// src/providers/Providers.tsx
|
|
588
|
+
var import_react8 = __toESM(require("react"));
|
|
589
|
+
|
|
587
590
|
// src/theme/index.tsx
|
|
588
591
|
var import_react6 = require("react");
|
|
589
592
|
var import_cache = __toESM(require("@emotion/cache"));
|
|
@@ -631,7 +634,7 @@ var _theme = {
|
|
|
631
634
|
};
|
|
632
635
|
|
|
633
636
|
// src/theme/index.tsx
|
|
634
|
-
var
|
|
637
|
+
var theme = (0, import_createTheme.default)(__spreadValues({}, _theme));
|
|
635
638
|
function ThemeRegistry(props) {
|
|
636
639
|
const { children } = props;
|
|
637
640
|
const [{ cache, flush }] = (0, import_react6.useState)(() => {
|
|
@@ -656,10 +659,6 @@ function ThemeRegistry(props) {
|
|
|
656
659
|
};
|
|
657
660
|
return { cache: cache2, flush: flush2 };
|
|
658
661
|
});
|
|
659
|
-
const theme = (0, import_react6.useMemo)(
|
|
660
|
-
() => (0, import_createTheme.default)(__spreadValues({}, _theme)),
|
|
661
|
-
[]
|
|
662
|
-
);
|
|
663
662
|
(0, import_navigation.useServerInsertedHTML)(() => {
|
|
664
663
|
const names = flush();
|
|
665
664
|
if (names.length === 0) return null;
|
|
@@ -678,23 +677,23 @@ function ThemeRegistry(props) {
|
|
|
678
677
|
}
|
|
679
678
|
);
|
|
680
679
|
});
|
|
681
|
-
return /* @__PURE__ */ React.createElement(
|
|
680
|
+
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
681
|
}
|
|
683
682
|
|
|
684
683
|
// src/providers/Providers.tsx
|
|
685
684
|
var Providers = ({ children }) => {
|
|
686
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ import_react8.default.createElement(ThemeRegistry, null, children);
|
|
687
686
|
};
|
|
688
687
|
var Providers_default = Providers;
|
|
689
688
|
|
|
690
689
|
// src/components/AppBar/AppBar.tsx
|
|
691
|
-
var
|
|
690
|
+
var import_react9 = require("react");
|
|
692
691
|
var import_material12 = require("@mui/material");
|
|
693
692
|
var import_link = __toESM(require("next/link"));
|
|
694
693
|
var AppBar = ({ links }) => {
|
|
695
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
696
|
-
const navItemsRef = (0,
|
|
697
|
-
(0,
|
|
694
|
+
const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
|
|
695
|
+
const navItemsRef = (0, import_react9.useRef)([]);
|
|
696
|
+
(0, import_react9.useEffect)(() => {
|
|
698
697
|
const indicator = document.querySelector(".nav-indicator");
|
|
699
698
|
const navItem = navItemsRef.current[activeIndex];
|
|
700
699
|
const navItemWidth = navItem.offsetWidth;
|
|
@@ -754,8 +753,8 @@ var ImageContainer = (props) => {
|
|
|
754
753
|
var ImageContainer_default = ImageContainer;
|
|
755
754
|
|
|
756
755
|
// src/icons/map-search.svg
|
|
757
|
-
var
|
|
758
|
-
var SvgMapSearch = (props) => /* @__PURE__ */
|
|
756
|
+
var React8 = __toESM(require("react"));
|
|
757
|
+
var SvgMapSearch = (props) => /* @__PURE__ */ React8.createElement("svg", __spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), /* @__PURE__ */ React8.createElement("path", { d: "M11 18L9 17M9 17L3 20V7L9 4M9 17V4M9 4L15 7M15 7L21 4V11.5M15 7V12M20.1992 20.1992L21.9992 21.9992M15 18C15 18.7956 15.3161 19.5587 15.8787 20.1213C16.4413 20.6839 17.2044 21 18 21C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18C21 17.2044 20.6839 16.4413 20.1213 15.8787C19.5587 15.3161 18.7956 15 18 15C17.2044 15 16.4413 15.3161 15.8787 15.8787C15.3161 16.4413 15 17.2044 15 18Z", stroke: "#343434", className: "stroke-current", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
759
758
|
var map_search_default = SvgMapSearch;
|
|
760
759
|
|
|
761
760
|
// src/components/Card/CategoryCard.tsx
|
|
@@ -869,7 +868,7 @@ var TeamPersonCard = (props) => {
|
|
|
869
868
|
var TeamPersonCard_default = TeamPersonCard;
|
|
870
869
|
|
|
871
870
|
// src/components/Autocomplete/Autocomplete.tsx
|
|
872
|
-
var
|
|
871
|
+
var import_react10 = require("react");
|
|
873
872
|
var import_material18 = require("@mui/material");
|
|
874
873
|
var import_react_hook_form = require("react-hook-form");
|
|
875
874
|
var RenderInputAutocomplete = (_a) => {
|
|
@@ -904,8 +903,8 @@ var CustomPaperComponent = (props) => {
|
|
|
904
903
|
};
|
|
905
904
|
var Autocomplete = (props) => {
|
|
906
905
|
const { values } = props;
|
|
907
|
-
const [open, setOpen] = (0,
|
|
908
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
906
|
+
const [open, setOpen] = (0, import_react10.useState)(false);
|
|
907
|
+
const [anchorEl, setAnchorEl] = (0, import_react10.useState)(null);
|
|
909
908
|
const { field } = (0, import_react_hook_form.useController)(props);
|
|
910
909
|
const handleClick = (event) => {
|
|
911
910
|
if (open)
|
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:
|
|
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:
|
|
425
|
+
transition: theme2.transitions.create(["width"], {
|
|
426
426
|
duration: 200
|
|
427
427
|
})
|
|
428
428
|
},
|
|
@@ -534,8 +534,11 @@ var FromToInput = ({ label }) => {
|
|
|
534
534
|
};
|
|
535
535
|
var FromToInput_default = FromToInput;
|
|
536
536
|
|
|
537
|
+
// src/providers/Providers.tsx
|
|
538
|
+
import React7 from "react";
|
|
539
|
+
|
|
537
540
|
// src/theme/index.tsx
|
|
538
|
-
import {
|
|
541
|
+
import { useState as useState3 } from "react";
|
|
539
542
|
import createCache from "@emotion/cache";
|
|
540
543
|
import { useServerInsertedHTML } from "next/navigation";
|
|
541
544
|
import { CacheProvider } from "@emotion/react";
|
|
@@ -581,7 +584,7 @@ var _theme = {
|
|
|
581
584
|
};
|
|
582
585
|
|
|
583
586
|
// src/theme/index.tsx
|
|
584
|
-
|
|
587
|
+
var theme = createTheme(__spreadValues({}, _theme));
|
|
585
588
|
function ThemeRegistry(props) {
|
|
586
589
|
const { children } = props;
|
|
587
590
|
const [{ cache, flush }] = useState3(() => {
|
|
@@ -606,10 +609,6 @@ function ThemeRegistry(props) {
|
|
|
606
609
|
};
|
|
607
610
|
return { cache: cache2, flush: flush2 };
|
|
608
611
|
});
|
|
609
|
-
const theme = useMemo(
|
|
610
|
-
() => createTheme(__spreadValues({}, _theme)),
|
|
611
|
-
[]
|
|
612
|
-
);
|
|
613
612
|
useServerInsertedHTML(() => {
|
|
614
613
|
const names = flush();
|
|
615
614
|
if (names.length === 0) return null;
|
|
@@ -628,12 +627,12 @@ function ThemeRegistry(props) {
|
|
|
628
627
|
}
|
|
629
628
|
);
|
|
630
629
|
});
|
|
631
|
-
return /* @__PURE__ */ React.createElement(
|
|
630
|
+
return /* @__PURE__ */ React.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React.createElement(CssBaseline, null), children));
|
|
632
631
|
}
|
|
633
632
|
|
|
634
633
|
// src/providers/Providers.tsx
|
|
635
634
|
var Providers = ({ children }) => {
|
|
636
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ React7.createElement(ThemeRegistry, null, children);
|
|
637
636
|
};
|
|
638
637
|
var Providers_default = Providers;
|
|
639
638
|
|
|
@@ -704,8 +703,8 @@ var ImageContainer = (props) => {
|
|
|
704
703
|
var ImageContainer_default = ImageContainer;
|
|
705
704
|
|
|
706
705
|
// src/icons/map-search.svg
|
|
707
|
-
import * as
|
|
708
|
-
var SvgMapSearch = (props) => /* @__PURE__ */
|
|
706
|
+
import * as React8 from "react";
|
|
707
|
+
var SvgMapSearch = (props) => /* @__PURE__ */ React8.createElement("svg", __spreadValues({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), /* @__PURE__ */ React8.createElement("path", { d: "M11 18L9 17M9 17L3 20V7L9 4M9 17V4M9 4L15 7M15 7L21 4V11.5M15 7V12M20.1992 20.1992L21.9992 21.9992M15 18C15 18.7956 15.3161 19.5587 15.8787 20.1213C16.4413 20.6839 17.2044 21 18 21C18.7956 21 19.5587 20.6839 20.1213 20.1213C20.6839 19.5587 21 18.7956 21 18C21 17.2044 20.6839 16.4413 20.1213 15.8787C19.5587 15.3161 18.7956 15 18 15C17.2044 15 16.4413 15.3161 15.8787 15.8787C15.3161 16.4413 15 17.2044 15 18Z", stroke: "#343434", className: "stroke-current", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
709
708
|
var map_search_default = SvgMapSearch;
|
|
710
709
|
|
|
711
710
|
// src/components/Card/CategoryCard.tsx
|