mayak-common-library 0.0.7 → 0.0.9

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.mjs CHANGED
@@ -1,18 +1,45 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
1
33
  // src/components/Greet.tsx
2
- import { jsxs } from "react/jsx-runtime";
3
34
  function Greet(props) {
4
35
  const { name } = props;
5
- return /* @__PURE__ */ jsxs("div", { children: [
6
- "Hello ",
7
- name
8
- ] });
36
+ return /* @__PURE__ */ React.createElement("div", null, "Hello ", name);
9
37
  }
10
38
 
11
39
  // src/components/Button/Button.tsx
12
40
  import ButtonMUI from "@mui/material/Button";
13
41
  import { styled } from "@mui/material";
14
42
  import Typography from "@mui/material/Typography";
15
- import { jsx } from "react/jsx-runtime";
16
43
  var StyledButton = styled(ButtonMUI)(() => ({
17
44
  textTransform: "none",
18
45
  width: "fit-content",
@@ -31,31 +58,29 @@ var StyledButton = styled(ButtonMUI)(() => ({
31
58
  }
32
59
  }));
33
60
  var Button = (props) => {
34
- const { children, base, bolt, border, small, large, ...rest } = props;
35
- return /* @__PURE__ */ jsx(
61
+ const _a = props, { children, base, bolt, border, small, large } = _a, rest = __objRest(_a, ["children", "base", "bolt", "border", "small", "large"]);
62
+ return /* @__PURE__ */ React.createElement(
36
63
  StyledButton,
37
- {
38
- ...rest,
64
+ __spreadProps(__spreadValues({}, rest), {
39
65
  disableRipple: true,
40
66
  className: `${base ? "bg-accent-dark rounded-none text-white hover:bg-accent-beige text-base" : ""}
41
67
  ${small ? "py-1.5 px-4" : ""}
42
68
  ${large ? "py-5 px-10" : ""}
43
- ${border ? "border-b border-solid rounded-none" : ""}`,
44
- children: /* @__PURE__ */ jsx(
45
- Typography,
46
- {
47
- className: `${bolt ? "font-extrabold leading-4" : "font-normal leading-3"}`,
48
- children
49
- }
50
- )
51
- }
69
+ ${border ? "border-b border-solid rounded-none" : ""}`
70
+ }),
71
+ /* @__PURE__ */ React.createElement(
72
+ Typography,
73
+ {
74
+ className: `${bolt ? "font-extrabold leading-4" : "font-normal leading-3"}`
75
+ },
76
+ children
77
+ )
52
78
  );
53
79
  };
54
80
  var Button_default = Button;
55
81
 
56
82
  // src/components/Button/IconButton.tsx
57
83
  import { IconButton as IconButtonMUI, styled as styled2 } from "@mui/material";
58
- import { jsx as jsx2 } from "react/jsx-runtime";
59
84
  var StyledButton2 = styled2(IconButtonMUI)(() => ({
60
85
  width: "fit-content",
61
86
  borderRadius: 0,
@@ -69,8 +94,8 @@ var StyledButton2 = styled2(IconButtonMUI)(() => ({
69
94
  }
70
95
  }));
71
96
  var IconButton = (props) => {
72
- const { children, ...rest } = props;
73
- return /* @__PURE__ */ jsx2(StyledButton2, { ...rest, disableRipple: true, children });
97
+ const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
98
+ return /* @__PURE__ */ React.createElement(StyledButton2, __spreadProps(__spreadValues({}, rest), { disableRipple: true }), children);
74
99
  };
75
100
  var IconButton_default = IconButton;
76
101
 
@@ -82,7 +107,6 @@ import { Select, styled as styled3 } from "@mui/material";
82
107
  var dropdown_arrow_default = "./dropdown-arrow-CDZAF5GJ.svg";
83
108
 
84
109
  // src/components/Select/Select.tsx
85
- import { jsx as jsx3 } from "react/jsx-runtime";
86
110
  var StyledSelect = styled3(Select)(({ open }) => ({
87
111
  minWidth: 250,
88
112
  "&.MuiInputBase-root": {
@@ -120,7 +144,7 @@ var StyledSelect = styled3(Select)(({ open }) => ({
120
144
  }
121
145
  }));
122
146
  var CustomSelect = (props) => {
123
- const { children, placeholder, ...rest } = props;
147
+ const _a = props, { children, placeholder } = _a, rest = __objRest(_a, ["children", "placeholder"]);
124
148
  const myRef = useRef(null);
125
149
  const [open, setOpen] = useState(false);
126
150
  const uniqueId = "select_" + Math.random().toFixed(5).slice(2);
@@ -131,12 +155,12 @@ var CustomSelect = (props) => {
131
155
  setOpen(false);
132
156
  };
133
157
  useEffect(() => {
134
- if (!open) myRef.current?.classList.remove("Mui-focused");
158
+ var _a2;
159
+ if (!open) (_a2 = myRef.current) == null ? void 0 : _a2.classList.remove("Mui-focused");
135
160
  }, [open]);
136
- return /* @__PURE__ */ jsx3(
161
+ return /* @__PURE__ */ React.createElement(
137
162
  StyledSelect,
138
- {
139
- ...rest,
163
+ __spreadProps(__spreadValues({}, rest), {
140
164
  ref: myRef,
141
165
  open,
142
166
  onOpen: handleOpen,
@@ -159,9 +183,9 @@ var CustomSelect = (props) => {
159
183
  }
160
184
  }
161
185
  },
162
- IconComponent: () => /* @__PURE__ */ jsx3(dropdown_arrow_default, {}),
163
- children
164
- }
186
+ IconComponent: () => /* @__PURE__ */ React.createElement(dropdown_arrow_default, null)
187
+ }),
188
+ children
165
189
  );
166
190
  };
167
191
  var Select_default = CustomSelect;
@@ -187,7 +211,6 @@ import {
187
211
  var close_default = "./close-4XJDSDVO.svg";
188
212
 
189
213
  // src/components/Select/SelectPro.tsx
190
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
191
214
  var SelectPro = ({
192
215
  children,
193
216
  placeholder,
@@ -217,83 +240,73 @@ var SelectPro = ({
217
240
  const childrenWithHandleChange = isValidElement(children) ? cloneElement(children, {
218
241
  collapseParent: handleClose
219
242
  }) : children;
220
- return /* @__PURE__ */ jsx4(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxs2(Box, { children: [
221
- clickComponent ? cloneElement(clickComponent, {
243
+ return /* @__PURE__ */ React.createElement(ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ React.createElement(Box, null, clickComponent ? cloneElement(clickComponent, {
244
+ ref: btn,
245
+ onClick: handleClick
246
+ }) : /* @__PURE__ */ React.createElement(
247
+ Button2,
248
+ {
222
249
  ref: btn,
223
- onClick: handleClick
224
- }) : /* @__PURE__ */ jsxs2(
225
- Button2,
250
+ "aria-controls": open ? "basic-menu" : void 0,
251
+ "aria-haspopup": "true",
252
+ "aria-expanded": open ? "true" : void 0,
253
+ onClick: handleClick,
254
+ disableRipple: true,
255
+ fullWidth: true,
256
+ sx: {
257
+ height: small ? "34px" : "49px",
258
+ padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
259
+ },
260
+ className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`
261
+ },
262
+ /* @__PURE__ */ React.createElement(
263
+ Typography2,
226
264
  {
227
- ref: btn,
228
- "aria-controls": open ? "basic-menu" : void 0,
229
- "aria-haspopup": "true",
230
- "aria-expanded": open ? "true" : void 0,
231
- onClick: handleClick,
232
- disableRipple: true,
233
- fullWidth: true,
234
- sx: {
235
- height: small ? "34px" : "49px",
236
- padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
237
- },
238
- className: `border rounded-none border-solid normal-case text-accent-dark hover:bg-white ${open ? "!border-transparent bg-white" : ""} ${colorBorder ? "border-accent-beige flex-row-reverse justify-end gap-x-2" : "justify-between border-accent-dark"}`,
239
- children: [
240
- /* @__PURE__ */ jsx4(
241
- Typography2,
242
- {
243
- className: "text-sm leading-4",
244
- children: `${placeholder}`
245
- }
246
- ),
247
- colorBorder ? /* @__PURE__ */ jsx4(search_default, {}) : /* @__PURE__ */ jsx4(
248
- dropdown_arrow_default,
249
- {
250
- style: {
251
- transform: open ? "scaleY(-1)" : "scaleY(1)",
252
- transition: "0.3s ease-in-out"
253
- }
254
- }
255
- )
256
- ]
257
- }
265
+ className: "text-sm leading-4"
266
+ },
267
+ `${placeholder}`
258
268
  ),
259
- btn ? /* @__PURE__ */ jsx4(
260
- Paper,
269
+ colorBorder ? /* @__PURE__ */ React.createElement(search_default, null) : /* @__PURE__ */ React.createElement(
270
+ dropdown_arrow_default,
261
271
  {
262
- sx: {
263
- position: "absolute",
264
- width: !fullContainerWidth && btn ? btn.offsetWidth : "100%",
265
- left: fullContainerWidth ? 0 : "initial",
266
- right: fullContainerWidth ? 0 : "initial",
267
- top: overButton ? 0 : "initial"
268
- },
269
- className: `menu ${open ? "menu--open" : "menu--close"} z-50 rounded-none shadow-sm`,
270
- children: /* @__PURE__ */ jsxs2(Box, { className: `flex flex-col p-3 gap-3`, children: [
271
- overButton ? /* @__PURE__ */ jsx4(
272
- IconButton_default,
273
- {
274
- className: "bg-accent-silver p-1 self-end absolute",
275
- onClick: handleClose,
276
- children: /* @__PURE__ */ jsx4(close_default, {})
277
- }
278
- ) : null,
279
- childTitle ? /* @__PURE__ */ jsx4(
280
- Typography2,
281
- {
282
- className: "text-sm font-normal text-accent-silver-2",
283
- children: childTitle
284
- }
285
- ) : null,
286
- childrenWithHandleChange
287
- ] })
272
+ style: {
273
+ transform: open ? "scaleY(-1)" : "scaleY(1)",
274
+ transition: "0.3s ease-in-out"
275
+ }
288
276
  }
289
- ) : null
290
- ] }) });
277
+ )
278
+ ), btn ? /* @__PURE__ */ React.createElement(
279
+ Paper,
280
+ {
281
+ sx: {
282
+ position: "absolute",
283
+ width: !fullContainerWidth && btn ? btn.offsetWidth : "100%",
284
+ left: fullContainerWidth ? 0 : "initial",
285
+ right: fullContainerWidth ? 0 : "initial",
286
+ top: overButton ? 0 : "initial"
287
+ },
288
+ className: `menu ${open ? "menu--open" : "menu--close"} z-50 rounded-none shadow-sm`
289
+ },
290
+ /* @__PURE__ */ React.createElement(Box, { className: `flex flex-col p-3 gap-3` }, overButton ? /* @__PURE__ */ React.createElement(
291
+ IconButton_default,
292
+ {
293
+ className: "bg-accent-silver p-1 self-end absolute",
294
+ onClick: handleClose
295
+ },
296
+ /* @__PURE__ */ React.createElement(close_default, null)
297
+ ) : null, childTitle ? /* @__PURE__ */ React.createElement(
298
+ Typography2,
299
+ {
300
+ className: "text-sm font-normal text-accent-silver-2"
301
+ },
302
+ childTitle
303
+ ) : null, childrenWithHandleChange)
304
+ ) : null));
291
305
  };
292
306
  var SelectPro_default = SelectPro;
293
307
 
294
308
  // src/components/Chip/Chip.tsx
295
309
  import { Chip, styled as styled4 } from "@mui/material";
296
- import { jsx as jsx5 } from "react/jsx-runtime";
297
310
  var StyledChip = styled4(Chip)(({ theme: theme2 }) => ({
298
311
  borderRadius: theme2.shape.borderRadius
299
312
  }));
@@ -304,75 +317,69 @@ var ChipViews = {
304
317
  silver: "bg-accent-silver"
305
318
  };
306
319
  var CustomChip = (props) => {
307
- const { view, ...rest } = props;
308
- return /* @__PURE__ */ jsx5(
320
+ const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
321
+ return /* @__PURE__ */ React.createElement(
309
322
  StyledChip,
310
- {
311
- className: `rounded-none w-fit h-fit px-2.5 py-0 ${ChipViews[view]}`,
312
- ...rest
313
- }
323
+ __spreadValues({
324
+ className: `rounded-none w-fit h-fit px-2.5 py-0 ${ChipViews[view]}`
325
+ }, rest)
314
326
  );
315
327
  };
316
328
  var Chip_default = CustomChip;
317
329
 
318
330
  // src/components/Badge/Badge.tsx
319
331
  import { Badge } from "@mui/material";
320
- import { jsx as jsx6 } from "react/jsx-runtime";
321
332
  var CustomBadge = (props) => {
322
- return /* @__PURE__ */ jsx6(Badge, { ...props });
333
+ return /* @__PURE__ */ React.createElement(Badge, __spreadValues({}, props));
323
334
  };
324
335
  var Badge_default = CustomBadge;
325
336
 
326
337
  // src/components/Avatar/Avatar.tsx
327
338
  import Avatar from "@mui/material/Avatar";
328
- import { jsx as jsx7 } from "react/jsx-runtime";
329
339
  var CustomAvatar = (props) => {
330
- return /* @__PURE__ */ jsx7(Avatar, { ...props });
340
+ return /* @__PURE__ */ React.createElement(Avatar, __spreadValues({}, props));
331
341
  };
332
342
  var Avatar_default = CustomAvatar;
333
343
 
334
344
  // src/components/Text/Text.tsx
335
345
  import Typography3 from "@mui/material/Typography";
336
- import { jsx as jsx8 } from "react/jsx-runtime";
337
346
  var Text = (props) => {
338
- const { children, ...rest } = props;
339
- return /* @__PURE__ */ jsx8(Typography3, { ...rest, children });
347
+ const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
348
+ return /* @__PURE__ */ React.createElement(Typography3, __spreadValues({}, rest), children);
340
349
  };
341
350
  var Text_default = Text;
342
351
 
343
352
  // src/components/Radio/Radio.tsx
353
+ import React2 from "react";
344
354
  import Radio from "@mui/material/Radio";
345
355
  import FormControlLabel from "@mui/material/FormControlLabel";
346
- import { jsx as jsx9 } from "react/jsx-runtime";
347
356
  var CustomRadio = (props) => {
348
357
  const { value, label, radioProps, labelProps } = props;
349
358
  if (label && value)
350
- return /* @__PURE__ */ jsx9(
359
+ return /* @__PURE__ */ React2.createElement(
351
360
  FormControlLabel,
352
- {
361
+ __spreadValues({
353
362
  value,
354
- control: /* @__PURE__ */ jsx9(Radio, { ...radioProps }),
355
- label,
356
- ...labelProps
357
- }
363
+ control: /* @__PURE__ */ React2.createElement(Radio, __spreadValues({}, radioProps)),
364
+ label
365
+ }, labelProps)
358
366
  );
359
- return /* @__PURE__ */ jsx9(Radio, { ...radioProps });
367
+ return /* @__PURE__ */ React2.createElement(Radio, __spreadValues({}, radioProps));
360
368
  };
361
369
  var Radio_default = CustomRadio;
362
370
 
363
371
  // src/components/RadioGroup/RadioGroup.tsx
372
+ import React3 from "react";
364
373
  import RadioGroup from "@mui/material/RadioGroup";
365
- import { jsx as jsx10 } from "react/jsx-runtime";
366
374
  var CustomRadioGroup = (props) => {
367
- const { children, ...rest } = props;
368
- return /* @__PURE__ */ jsx10(RadioGroup, { ...rest, children });
375
+ const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
376
+ return /* @__PURE__ */ React3.createElement(RadioGroup, __spreadValues({}, rest), children);
369
377
  };
370
378
  var RadioGroup_default = CustomRadioGroup;
371
379
 
372
380
  // src/components/Switch/Switch.tsx
373
381
  import { Stack, styled as styled5, Switch as SwitchMUI } from "@mui/material";
374
382
  import Typography4 from "@mui/material/Typography";
375
- import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
376
383
  var Switch = styled5(SwitchMUI)(({ theme: theme2 }) => ({
377
384
  width: 60,
378
385
  height: 30,
@@ -415,27 +422,21 @@ var Switch = styled5(SwitchMUI)(({ theme: theme2 }) => ({
415
422
  }
416
423
  }));
417
424
  var CustomSwitch = (props) => {
418
- const { beforeText, afterText, ...rest } = props;
419
- return /* @__PURE__ */ jsxs3(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
420
- beforeText ? /* @__PURE__ */ jsx11(Typography4, { className: "text-base", children: beforeText }) : null,
421
- /* @__PURE__ */ jsx11(Switch, { defaultChecked: true, ...rest, disableRipple: true }),
422
- afterText ? /* @__PURE__ */ jsx11(Typography4, { className: "text-base", children: afterText }) : null
423
- ] });
425
+ const _a = props, { beforeText, afterText } = _a, rest = __objRest(_a, ["beforeText", "afterText"]);
426
+ return /* @__PURE__ */ React.createElement(Stack, { direction: "row", spacing: 1, alignItems: "center" }, beforeText ? /* @__PURE__ */ React.createElement(Typography4, { className: "text-base" }, beforeText) : null, /* @__PURE__ */ React.createElement(Switch, __spreadProps(__spreadValues({ defaultChecked: true }, rest), { disableRipple: true })), afterText ? /* @__PURE__ */ React.createElement(Typography4, { className: "text-base" }, afterText) : null);
424
427
  };
425
428
  var Switch_default = CustomSwitch;
426
429
 
427
430
  // src/components/Slider/Slider.tsx
428
431
  import { Slider, styled as styled6 } from "@mui/material";
429
- import { jsx as jsx12 } from "react/jsx-runtime";
430
432
  var StyledSlider = styled6(Slider)(() => ({}));
431
433
  var CustomSlider = (props) => {
432
- return /* @__PURE__ */ jsx12(StyledSlider, { ...props });
434
+ return /* @__PURE__ */ React.createElement(StyledSlider, __spreadValues({}, props));
433
435
  };
434
436
  var Slider_default = CustomSlider;
435
437
 
436
438
  // src/components/MenuItem/MenuItem.tsx
437
439
  import { MenuItem, styled as styled7 } from "@mui/material";
438
- import { jsx as jsx13 } from "react/jsx-runtime";
439
440
  var StyledMenuItem = styled7(MenuItem)(() => ({
440
441
  borderRadius: "5px",
441
442
  "&.Mui-selected": {
@@ -444,15 +445,14 @@ var StyledMenuItem = styled7(MenuItem)(() => ({
444
445
  }
445
446
  }));
446
447
  var CustomMenuItem = (props) => {
447
- const { children, ...rest } = props;
448
- return /* @__PURE__ */ jsx13(StyledMenuItem, { ...rest, children });
448
+ const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
449
+ return /* @__PURE__ */ React.createElement(StyledMenuItem, __spreadValues({}, rest), children);
449
450
  };
450
451
  var MenuItem_default = CustomMenuItem;
451
452
 
452
453
  // src/components/Input/Input.tsx
453
454
  import { InputAdornment, styled as styled8 } from "@mui/material";
454
455
  import Input from "@mui/material/Input";
455
- import { jsx as jsx14 } from "react/jsx-runtime";
456
456
  var StyledInput = styled8(Input)(() => ({
457
457
  "& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button": {
458
458
  display: "none"
@@ -462,28 +462,27 @@ var StyledInput = styled8(Input)(() => ({
462
462
  }
463
463
  }));
464
464
  var CustomInput = (props) => {
465
- const { type, adornmentText, value, ...rest } = props;
465
+ const _a = props, { type, adornmentText, value } = _a, rest = __objRest(_a, ["type", "adornmentText", "value"]);
466
466
  const handleKeyDown = (event) => {
467
467
  if (!/[0-9]/.test(event.key) && event.key !== "Backspace") {
468
468
  event.preventDefault();
469
469
  event.stopPropagation();
470
470
  }
471
471
  };
472
- return /* @__PURE__ */ jsx14(
472
+ return /* @__PURE__ */ React.createElement(
473
473
  StyledInput,
474
- {
474
+ __spreadValues({
475
475
  disableUnderline: true,
476
476
  onKeyDown: handleKeyDown,
477
- startAdornment: adornmentText ? /* @__PURE__ */ jsx14(InputAdornment, { position: "start", className: "text-sm", children: adornmentText }) : void 0,
477
+ startAdornment: adornmentText ? /* @__PURE__ */ React.createElement(InputAdornment, { position: "start", className: "text-sm" }, adornmentText) : void 0,
478
478
  value,
479
479
  componentsProps: {
480
480
  root: {
481
481
  className: "border border-black rounded-none border-solid py-1.5 px-2.5 h-8"
482
482
  }
483
483
  },
484
- type: type || "string",
485
- ...rest
486
- }
484
+ type: type || "string"
485
+ }, rest)
487
486
  );
488
487
  };
489
488
  var Input_default = CustomInput;
@@ -491,14 +490,12 @@ var Input_default = CustomInput;
491
490
  // src/components/Input/PhoneInput.tsx
492
491
  import { PatternFormat } from "react-number-format";
493
492
  import { forwardRef } from "react";
494
- import { jsx as jsx15 } from "react/jsx-runtime";
495
493
  var PhoneInput = forwardRef(
496
494
  function NumericFormatCustom(props, ref) {
497
- const { onChange, ...other } = props;
498
- return /* @__PURE__ */ jsx15(
495
+ const _a = props, { onChange } = _a, other = __objRest(_a, ["onChange"]);
496
+ return /* @__PURE__ */ React.createElement(
499
497
  PatternFormat,
500
- {
501
- ...other,
498
+ __spreadProps(__spreadValues({}, other), {
502
499
  getInputRef: ref,
503
500
  customInput: Input_default,
504
501
  onValueChange: (values) => {
@@ -511,7 +508,7 @@ var PhoneInput = forwardRef(
511
508
  },
512
509
  placeholder: "000 000 00 00",
513
510
  format: "### ### ## ##"
514
- }
511
+ })
515
512
  );
516
513
  }
517
514
  );
@@ -520,15 +517,8 @@ var PhoneInput_default = PhoneInput;
520
517
  // src/components/Input/FromToInput.tsx
521
518
  import { Stack as Stack2 } from "@mui/material";
522
519
  import Typography5 from "@mui/material/Typography";
523
- import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
524
520
  var FromToInput = ({ label }) => {
525
- return /* @__PURE__ */ jsxs4(Stack2, { children: [
526
- label ? /* @__PURE__ */ jsx16(Typography5, { className: "text-accent-dark text-xs", children: label }) : null,
527
- /* @__PURE__ */ jsxs4(Stack2, { direction: "row", spacing: 1, children: [
528
- /* @__PURE__ */ jsx16(Input_default, { adornmentText: "\u0432\u0456\u0434", fullWidth: true, type: "number" }),
529
- /* @__PURE__ */ jsx16(Input_default, { adornmentText: "\u0434\u043E", fullWidth: true, type: "number" })
530
- ] })
531
- ] });
521
+ return /* @__PURE__ */ React.createElement(Stack2, null, label ? /* @__PURE__ */ React.createElement(Typography5, { className: "text-accent-dark text-xs" }, label) : null, /* @__PURE__ */ React.createElement(Stack2, { direction: "row", spacing: 1 }, /* @__PURE__ */ React.createElement(Input_default, { adornmentText: "\u0432\u0456\u0434", fullWidth: true, type: "number" }), /* @__PURE__ */ React.createElement(Input_default, { adornmentText: "\u0434\u043E", fullWidth: true, type: "number" })));
532
522
  };
533
523
  var FromToInput_default = FromToInput;
534
524
 
@@ -541,7 +531,6 @@ import ThemeProvider from "@mui/material/styles/ThemeProvider";
541
531
  import createTheme from "@mui/material/styles/createTheme";
542
532
  import CssBaseline from "@mui/material/CssBaseline";
543
533
  import { prefixer } from "stylis";
544
- import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
545
534
  var theme = createTheme({});
546
535
  function ThemeRegistry(props) {
547
536
  const { children } = props;
@@ -576,27 +565,23 @@ function ThemeRegistry(props) {
576
565
  for (const name of names) {
577
566
  styles += cache.inserted[name];
578
567
  }
579
- return /* @__PURE__ */ jsx17(
568
+ return /* @__PURE__ */ React.createElement(
580
569
  "style",
581
570
  {
571
+ key: cache.key,
582
572
  "data-emotion": `${cache.key} ${names.join(" ")}`,
583
573
  dangerouslySetInnerHTML: {
584
574
  __html: styles
585
575
  }
586
- },
587
- cache.key
576
+ }
588
577
  );
589
578
  });
590
- return /* @__PURE__ */ jsx17(CacheProvider, { value: cache, children: /* @__PURE__ */ jsxs5(ThemeProvider, { theme, children: [
591
- /* @__PURE__ */ jsx17(CssBaseline, {}),
592
- children
593
- ] }) });
579
+ return /* @__PURE__ */ React.createElement(CacheProvider, { value: cache }, /* @__PURE__ */ React.createElement(ThemeProvider, { theme }, /* @__PURE__ */ React.createElement(CssBaseline, null), children));
594
580
  }
595
581
 
596
582
  // src/providers/Providers.tsx
597
- import { jsx as jsx18 } from "react/jsx-runtime";
598
583
  var Providers = ({ children }) => {
599
- return /* @__PURE__ */ jsx18(ThemeRegistry, { children });
584
+ return /* @__PURE__ */ React.createElement(ThemeRegistry, null, children);
600
585
  };
601
586
  var Providers_default = Providers;
602
587
 
@@ -604,7 +589,6 @@ var Providers_default = Providers;
604
589
  import { useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
605
590
  import { Box as Box2, Stack as Stack3 } from "@mui/material";
606
591
  import Link from "next/link";
607
- import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
608
592
  var AppBar = ({ links }) => {
609
593
  const [activeIndex, setActiveIndex] = useState4(0);
610
594
  const navItemsRef = useRef2([]);
@@ -614,7 +598,7 @@ var AppBar = ({ links }) => {
614
598
  const navItemWidth = navItem.offsetWidth;
615
599
  const navItemLeft = navItem.offsetLeft + navItemWidth / 2 - indicator.offsetWidth / 2;
616
600
  const navItemTop = navItem.offsetTop - 5;
617
- indicator?.setAttribute(
601
+ indicator == null ? void 0 : indicator.setAttribute(
618
602
  "style",
619
603
  `transform: translate(${navItemLeft}px, ${navItemTop}px);`
620
604
  );
@@ -622,22 +606,19 @@ var AppBar = ({ links }) => {
622
606
  const handleClick = (index) => {
623
607
  setActiveIndex(index);
624
608
  };
625
- return /* @__PURE__ */ jsxs6(Stack3, { direction: "row", spacing: 1, position: "relative", children: [
626
- /* @__PURE__ */ jsx19(Box2, { className: "nav-indicator" }),
627
- links.map((link, index) => /* @__PURE__ */ jsx19(
628
- Link,
629
- {
630
- ref: (el) => {
631
- navItemsRef.current[index] = el;
632
- },
633
- href: link.href,
634
- className: `nav-item ${index === activeIndex ? "active" : ""}`,
635
- onClick: () => handleClick(index),
636
- children: link.title
609
+ return /* @__PURE__ */ React.createElement(Stack3, { direction: "row", spacing: 1, position: "relative" }, /* @__PURE__ */ React.createElement(Box2, { className: "nav-indicator" }), links.map((link, index) => /* @__PURE__ */ React.createElement(
610
+ Link,
611
+ {
612
+ ref: (el) => {
613
+ navItemsRef.current[index] = el;
637
614
  },
638
- index
639
- ))
640
- ] });
615
+ key: index,
616
+ href: link.href,
617
+ className: `nav-item ${index === activeIndex ? "active" : ""}`,
618
+ onClick: () => handleClick(index)
619
+ },
620
+ link.title
621
+ )));
641
622
  };
642
623
  var AppBar_default = AppBar;
643
624
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -16,7 +16,6 @@
16
16
  "@emotion/react": "^11.11.4",
17
17
  "@emotion/styled": "^11.11.5",
18
18
  "@mui/material": "^5.15.20",
19
- "@mui/material-nextjs": "^5.15.11",
20
19
  "next": "14.2.4",
21
20
  "react": "^18",
22
21
  "react-dom": "^18",
@@ -40,6 +39,10 @@
40
39
  "tsup": "^8.1.0",
41
40
  "typescript": "^5"
42
41
  },
42
+ "peerDependencies": {
43
+ "react": ">=18",
44
+ "react-dom": ">=18"
45
+ },
43
46
  "browserslist": [
44
47
  ">0.3%",
45
48
  "not dead",
@@ -48,6 +51,7 @@
48
51
  "author": "anthony_k",
49
52
  "license": "MIT",
50
53
  "keywords": [
51
- "test", "next common library"
54
+ "test",
55
+ "next common library"
52
56
  ]
53
57
  }