mayak-common-library 0.0.9 → 0.0.11
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 +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +162 -116
- package/dist/index.mjs +153 -107
- package/package.json +1 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import react__default, { FC, PropsWithChildren, ReactElement } from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { FC, PropsWithChildren, ReactElement } from 'react';
|
|
4
5
|
import { IconButtonProps } from '@mui/material/IconButton/IconButton';
|
|
5
6
|
import { SelectProps } from '@mui/material/Select/Select';
|
|
6
7
|
import { ChipProps } from '@mui/material';
|
|
@@ -18,7 +19,7 @@ import { PatternFormatProps } from 'react-number-format/types/types';
|
|
|
18
19
|
|
|
19
20
|
declare function Greet(props: {
|
|
20
21
|
name: string;
|
|
21
|
-
}):
|
|
22
|
+
}): react_jsx_runtime.JSX.Element;
|
|
22
23
|
|
|
23
24
|
interface CustomButtonProps extends ButtonProps, PropsWithChildren {
|
|
24
25
|
bolt?: boolean;
|
|
@@ -51,9 +52,9 @@ interface CustomChipProps {
|
|
|
51
52
|
}
|
|
52
53
|
declare const CustomChip: FC<ChipProps & CustomChipProps>;
|
|
53
54
|
|
|
54
|
-
declare const CustomBadge: (props: BadgeProps) =>
|
|
55
|
+
declare const CustomBadge: (props: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
55
56
|
|
|
56
|
-
declare const CustomAvatar: (props: AvatarProps) =>
|
|
57
|
+
declare const CustomAvatar: (props: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
57
58
|
|
|
58
59
|
declare const Text: FC<TypographyOwnProps & PropsWithChildren>;
|
|
59
60
|
|
|
@@ -63,9 +64,9 @@ interface CustomRadioProps {
|
|
|
63
64
|
label?: string;
|
|
64
65
|
value?: string;
|
|
65
66
|
}
|
|
66
|
-
declare const CustomRadio:
|
|
67
|
+
declare const CustomRadio: React__default.FC<CustomRadioProps>;
|
|
67
68
|
|
|
68
|
-
declare const CustomRadioGroup:
|
|
69
|
+
declare const CustomRadioGroup: React__default.FC<RadioGroupProps & PropsWithChildren>;
|
|
69
70
|
|
|
70
71
|
interface CustomSwitchProps {
|
|
71
72
|
beforeText?: string;
|
|
@@ -92,7 +93,7 @@ interface PhoneInputProps {
|
|
|
92
93
|
}) => void;
|
|
93
94
|
name: string;
|
|
94
95
|
}
|
|
95
|
-
declare const PhoneInput:
|
|
96
|
+
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<PatternFormatProps>>;
|
|
96
97
|
|
|
97
98
|
interface FromToInputProps {
|
|
98
99
|
label?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import react__default, { FC, PropsWithChildren, ReactElement } from 'react';
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { FC, PropsWithChildren, ReactElement } from 'react';
|
|
4
5
|
import { IconButtonProps } from '@mui/material/IconButton/IconButton';
|
|
5
6
|
import { SelectProps } from '@mui/material/Select/Select';
|
|
6
7
|
import { ChipProps } from '@mui/material';
|
|
@@ -18,7 +19,7 @@ import { PatternFormatProps } from 'react-number-format/types/types';
|
|
|
18
19
|
|
|
19
20
|
declare function Greet(props: {
|
|
20
21
|
name: string;
|
|
21
|
-
}):
|
|
22
|
+
}): react_jsx_runtime.JSX.Element;
|
|
22
23
|
|
|
23
24
|
interface CustomButtonProps extends ButtonProps, PropsWithChildren {
|
|
24
25
|
bolt?: boolean;
|
|
@@ -51,9 +52,9 @@ interface CustomChipProps {
|
|
|
51
52
|
}
|
|
52
53
|
declare const CustomChip: FC<ChipProps & CustomChipProps>;
|
|
53
54
|
|
|
54
|
-
declare const CustomBadge: (props: BadgeProps) =>
|
|
55
|
+
declare const CustomBadge: (props: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
55
56
|
|
|
56
|
-
declare const CustomAvatar: (props: AvatarProps) =>
|
|
57
|
+
declare const CustomAvatar: (props: AvatarProps) => react_jsx_runtime.JSX.Element;
|
|
57
58
|
|
|
58
59
|
declare const Text: FC<TypographyOwnProps & PropsWithChildren>;
|
|
59
60
|
|
|
@@ -63,9 +64,9 @@ interface CustomRadioProps {
|
|
|
63
64
|
label?: string;
|
|
64
65
|
value?: string;
|
|
65
66
|
}
|
|
66
|
-
declare const CustomRadio:
|
|
67
|
+
declare const CustomRadio: React__default.FC<CustomRadioProps>;
|
|
67
68
|
|
|
68
|
-
declare const CustomRadioGroup:
|
|
69
|
+
declare const CustomRadioGroup: React__default.FC<RadioGroupProps & PropsWithChildren>;
|
|
69
70
|
|
|
70
71
|
interface CustomSwitchProps {
|
|
71
72
|
beforeText?: string;
|
|
@@ -92,7 +93,7 @@ interface PhoneInputProps {
|
|
|
92
93
|
}) => void;
|
|
93
94
|
name: string;
|
|
94
95
|
}
|
|
95
|
-
declare const PhoneInput:
|
|
96
|
+
declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps & React$1.RefAttributes<PatternFormatProps>>;
|
|
96
97
|
|
|
97
98
|
interface FromToInputProps {
|
|
98
99
|
label?: string;
|
package/dist/index.js
CHANGED
|
@@ -82,15 +82,20 @@ __export(src_exports, {
|
|
|
82
82
|
module.exports = __toCommonJS(src_exports);
|
|
83
83
|
|
|
84
84
|
// src/components/Greet.tsx
|
|
85
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
85
86
|
function Greet(props) {
|
|
86
87
|
const { name } = props;
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
89
|
+
"Hello ",
|
|
90
|
+
name
|
|
91
|
+
] });
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
// src/components/Button/Button.tsx
|
|
91
95
|
var import_Button = __toESM(require("@mui/material/Button"));
|
|
92
96
|
var import_material = require("@mui/material");
|
|
93
97
|
var import_Typography = __toESM(require("@mui/material/Typography"));
|
|
98
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
94
99
|
var StyledButton = (0, import_material.styled)(import_Button.default)(() => ({
|
|
95
100
|
textTransform: "none",
|
|
96
101
|
width: "fit-content",
|
|
@@ -110,28 +115,29 @@ var StyledButton = (0, import_material.styled)(import_Button.default)(() => ({
|
|
|
110
115
|
}));
|
|
111
116
|
var Button = (props) => {
|
|
112
117
|
const _a = props, { children, base, bolt, border, small, large } = _a, rest = __objRest(_a, ["children", "base", "bolt", "border", "small", "large"]);
|
|
113
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
119
|
StyledButton,
|
|
115
120
|
__spreadProps(__spreadValues({}, rest), {
|
|
116
121
|
disableRipple: true,
|
|
117
122
|
className: `${base ? "bg-accent-dark rounded-none text-white hover:bg-accent-beige text-base" : ""}
|
|
118
123
|
${small ? "py-1.5 px-4" : ""}
|
|
119
124
|
${large ? "py-5 px-10" : ""}
|
|
120
|
-
${border ? "border-b border-solid rounded-none" : ""}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
)
|
|
125
|
+
${border ? "border-b border-solid rounded-none" : ""}`,
|
|
126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
127
|
+
import_Typography.default,
|
|
128
|
+
{
|
|
129
|
+
className: `${bolt ? "font-extrabold leading-4" : "font-normal leading-3"}`,
|
|
130
|
+
children
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
})
|
|
129
134
|
);
|
|
130
135
|
};
|
|
131
136
|
var Button_default = Button;
|
|
132
137
|
|
|
133
138
|
// src/components/Button/IconButton.tsx
|
|
134
139
|
var import_material2 = require("@mui/material");
|
|
140
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
135
141
|
var StyledButton2 = (0, import_material2.styled)(import_material2.IconButton)(() => ({
|
|
136
142
|
width: "fit-content",
|
|
137
143
|
borderRadius: 0,
|
|
@@ -146,7 +152,7 @@ var StyledButton2 = (0, import_material2.styled)(import_material2.IconButton)(()
|
|
|
146
152
|
}));
|
|
147
153
|
var IconButton = (props) => {
|
|
148
154
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
149
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StyledButton2, __spreadProps(__spreadValues({}, rest), { disableRipple: true, children }));
|
|
150
156
|
};
|
|
151
157
|
var IconButton_default = IconButton;
|
|
152
158
|
|
|
@@ -158,6 +164,7 @@ var import_material3 = require("@mui/material");
|
|
|
158
164
|
var dropdown_arrow_default = "./dropdown-arrow-CDZAF5GJ.svg";
|
|
159
165
|
|
|
160
166
|
// src/components/Select/Select.tsx
|
|
167
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
161
168
|
var StyledSelect = (0, import_material3.styled)(import_material3.Select)(({ open }) => ({
|
|
162
169
|
minWidth: 250,
|
|
163
170
|
"&.MuiInputBase-root": {
|
|
@@ -209,7 +216,7 @@ var CustomSelect = (props) => {
|
|
|
209
216
|
var _a2;
|
|
210
217
|
if (!open) (_a2 = myRef.current) == null ? void 0 : _a2.classList.remove("Mui-focused");
|
|
211
218
|
}, [open]);
|
|
212
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
213
220
|
StyledSelect,
|
|
214
221
|
__spreadProps(__spreadValues({}, rest), {
|
|
215
222
|
ref: myRef,
|
|
@@ -234,9 +241,9 @@ var CustomSelect = (props) => {
|
|
|
234
241
|
}
|
|
235
242
|
}
|
|
236
243
|
},
|
|
237
|
-
IconComponent: () => /* @__PURE__ */
|
|
238
|
-
|
|
239
|
-
|
|
244
|
+
IconComponent: () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(dropdown_arrow_default, {}),
|
|
245
|
+
children
|
|
246
|
+
})
|
|
240
247
|
);
|
|
241
248
|
};
|
|
242
249
|
var Select_default = CustomSelect;
|
|
@@ -252,6 +259,7 @@ var import_material4 = require("@mui/material");
|
|
|
252
259
|
var close_default = "./close-4XJDSDVO.svg";
|
|
253
260
|
|
|
254
261
|
// src/components/Select/SelectPro.tsx
|
|
262
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
255
263
|
var SelectPro = ({
|
|
256
264
|
children,
|
|
257
265
|
placeholder,
|
|
@@ -281,73 +289,83 @@ var SelectPro = ({
|
|
|
281
289
|
const childrenWithHandleChange = (0, import_react2.isValidElement)(children) ? (0, import_react2.cloneElement)(children, {
|
|
282
290
|
collapseParent: handleClose
|
|
283
291
|
}) : children;
|
|
284
|
-
return /* @__PURE__ */
|
|
285
|
-
|
|
286
|
-
onClick: handleClick
|
|
287
|
-
}) : /* @__PURE__ */ React.createElement(
|
|
288
|
-
import_material4.Button,
|
|
289
|
-
{
|
|
292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material4.Box, { children: [
|
|
293
|
+
clickComponent ? (0, import_react2.cloneElement)(clickComponent, {
|
|
290
294
|
ref: btn,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
onClick: handleClick,
|
|
295
|
-
disableRipple: true,
|
|
296
|
-
fullWidth: true,
|
|
297
|
-
sx: {
|
|
298
|
-
height: small ? "34px" : "49px",
|
|
299
|
-
padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
|
|
300
|
-
},
|
|
301
|
-
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"}`
|
|
302
|
-
},
|
|
303
|
-
/* @__PURE__ */ React.createElement(
|
|
304
|
-
import_material4.Typography,
|
|
295
|
+
onClick: handleClick
|
|
296
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
297
|
+
import_material4.Button,
|
|
305
298
|
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
ref: btn,
|
|
300
|
+
"aria-controls": open ? "basic-menu" : void 0,
|
|
301
|
+
"aria-haspopup": "true",
|
|
302
|
+
"aria-expanded": open ? "true" : void 0,
|
|
303
|
+
onClick: handleClick,
|
|
304
|
+
disableRipple: true,
|
|
305
|
+
fullWidth: true,
|
|
306
|
+
sx: {
|
|
307
|
+
height: small ? "34px" : "49px",
|
|
308
|
+
padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
|
|
309
|
+
},
|
|
310
|
+
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"}`,
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
313
|
+
import_material4.Typography,
|
|
314
|
+
{
|
|
315
|
+
className: "text-sm leading-4",
|
|
316
|
+
children: `${placeholder}`
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
colorBorder ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(search_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
320
|
+
dropdown_arrow_default,
|
|
321
|
+
{
|
|
322
|
+
style: {
|
|
323
|
+
transform: open ? "scaleY(-1)" : "scaleY(1)",
|
|
324
|
+
transition: "0.3s ease-in-out"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
]
|
|
329
|
+
}
|
|
309
330
|
),
|
|
310
|
-
|
|
311
|
-
|
|
331
|
+
btn ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
332
|
+
import_material4.Paper,
|
|
312
333
|
{
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
334
|
+
sx: {
|
|
335
|
+
position: "absolute",
|
|
336
|
+
width: !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
337
|
+
left: fullContainerWidth ? 0 : "initial",
|
|
338
|
+
right: fullContainerWidth ? 0 : "initial",
|
|
339
|
+
top: overButton ? 0 : "initial"
|
|
340
|
+
},
|
|
341
|
+
className: `menu ${open ? "menu--open" : "menu--close"} z-50 rounded-none shadow-sm`,
|
|
342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_material4.Box, { className: `flex flex-col p-3 gap-3`, children: [
|
|
343
|
+
overButton ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
344
|
+
IconButton_default,
|
|
345
|
+
{
|
|
346
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
347
|
+
onClick: handleClose,
|
|
348
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(close_default, {})
|
|
349
|
+
}
|
|
350
|
+
) : null,
|
|
351
|
+
childTitle ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
352
|
+
import_material4.Typography,
|
|
353
|
+
{
|
|
354
|
+
className: "text-sm font-normal text-accent-silver-2",
|
|
355
|
+
children: childTitle
|
|
356
|
+
}
|
|
357
|
+
) : null,
|
|
358
|
+
childrenWithHandleChange
|
|
359
|
+
] })
|
|
317
360
|
}
|
|
318
|
-
)
|
|
319
|
-
)
|
|
320
|
-
import_material4.Paper,
|
|
321
|
-
{
|
|
322
|
-
sx: {
|
|
323
|
-
position: "absolute",
|
|
324
|
-
width: !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
325
|
-
left: fullContainerWidth ? 0 : "initial",
|
|
326
|
-
right: fullContainerWidth ? 0 : "initial",
|
|
327
|
-
top: overButton ? 0 : "initial"
|
|
328
|
-
},
|
|
329
|
-
className: `menu ${open ? "menu--open" : "menu--close"} z-50 rounded-none shadow-sm`
|
|
330
|
-
},
|
|
331
|
-
/* @__PURE__ */ React.createElement(import_material4.Box, { className: `flex flex-col p-3 gap-3` }, overButton ? /* @__PURE__ */ React.createElement(
|
|
332
|
-
IconButton_default,
|
|
333
|
-
{
|
|
334
|
-
className: "bg-accent-silver p-1 self-end absolute",
|
|
335
|
-
onClick: handleClose
|
|
336
|
-
},
|
|
337
|
-
/* @__PURE__ */ React.createElement(close_default, null)
|
|
338
|
-
) : null, childTitle ? /* @__PURE__ */ React.createElement(
|
|
339
|
-
import_material4.Typography,
|
|
340
|
-
{
|
|
341
|
-
className: "text-sm font-normal text-accent-silver-2"
|
|
342
|
-
},
|
|
343
|
-
childTitle
|
|
344
|
-
) : null, childrenWithHandleChange)
|
|
345
|
-
) : null));
|
|
361
|
+
) : null
|
|
362
|
+
] }) });
|
|
346
363
|
};
|
|
347
364
|
var SelectPro_default = SelectPro;
|
|
348
365
|
|
|
349
366
|
// src/components/Chip/Chip.tsx
|
|
350
367
|
var import_material5 = require("@mui/material");
|
|
368
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
351
369
|
var StyledChip = (0, import_material5.styled)(import_material5.Chip)(({ theme: theme2 }) => ({
|
|
352
370
|
borderRadius: theme2.shape.borderRadius
|
|
353
371
|
}));
|
|
@@ -359,7 +377,7 @@ var ChipViews = {
|
|
|
359
377
|
};
|
|
360
378
|
var CustomChip = (props) => {
|
|
361
379
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
362
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
363
381
|
StyledChip,
|
|
364
382
|
__spreadValues({
|
|
365
383
|
className: `rounded-none w-fit h-fit px-2.5 py-0 ${ChipViews[view]}`
|
|
@@ -370,57 +388,61 @@ var Chip_default = CustomChip;
|
|
|
370
388
|
|
|
371
389
|
// src/components/Badge/Badge.tsx
|
|
372
390
|
var import_material6 = require("@mui/material");
|
|
391
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
373
392
|
var CustomBadge = (props) => {
|
|
374
|
-
return /* @__PURE__ */
|
|
393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_material6.Badge, __spreadValues({}, props));
|
|
375
394
|
};
|
|
376
395
|
var Badge_default = CustomBadge;
|
|
377
396
|
|
|
378
397
|
// src/components/Avatar/Avatar.tsx
|
|
379
398
|
var import_Avatar = __toESM(require("@mui/material/Avatar"));
|
|
399
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
380
400
|
var CustomAvatar = (props) => {
|
|
381
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_Avatar.default, __spreadValues({}, props));
|
|
382
402
|
};
|
|
383
403
|
var Avatar_default = CustomAvatar;
|
|
384
404
|
|
|
385
405
|
// src/components/Text/Text.tsx
|
|
386
406
|
var import_Typography2 = __toESM(require("@mui/material/Typography"));
|
|
407
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
387
408
|
var Text = (props) => {
|
|
388
409
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
389
|
-
return /* @__PURE__ */
|
|
410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_Typography2.default, __spreadProps(__spreadValues({}, rest), { children }));
|
|
390
411
|
};
|
|
391
412
|
var Text_default = Text;
|
|
392
413
|
|
|
393
414
|
// src/components/Radio/Radio.tsx
|
|
394
|
-
var import_react3 = __toESM(require("react"));
|
|
395
415
|
var import_Radio = __toESM(require("@mui/material/Radio"));
|
|
396
416
|
var import_FormControlLabel = __toESM(require("@mui/material/FormControlLabel"));
|
|
417
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
397
418
|
var CustomRadio = (props) => {
|
|
398
419
|
const { value, label, radioProps, labelProps } = props;
|
|
399
420
|
if (label && value)
|
|
400
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
401
422
|
import_FormControlLabel.default,
|
|
402
423
|
__spreadValues({
|
|
403
424
|
value,
|
|
404
|
-
control: /* @__PURE__ */
|
|
425
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Radio.default, __spreadValues({}, radioProps)),
|
|
405
426
|
label
|
|
406
427
|
}, labelProps)
|
|
407
428
|
);
|
|
408
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Radio.default, __spreadValues({}, radioProps));
|
|
409
430
|
};
|
|
410
431
|
var Radio_default = CustomRadio;
|
|
411
432
|
|
|
412
433
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
413
|
-
var import_react4 = __toESM(require("react"));
|
|
414
434
|
var import_RadioGroup = __toESM(require("@mui/material/RadioGroup"));
|
|
435
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
415
436
|
var CustomRadioGroup = (props) => {
|
|
416
437
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
417
|
-
return /* @__PURE__ */
|
|
438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_RadioGroup.default, __spreadProps(__spreadValues({}, rest), { children }));
|
|
418
439
|
};
|
|
419
440
|
var RadioGroup_default = CustomRadioGroup;
|
|
420
441
|
|
|
421
442
|
// src/components/Switch/Switch.tsx
|
|
422
443
|
var import_material7 = require("@mui/material");
|
|
423
444
|
var import_Typography3 = __toESM(require("@mui/material/Typography"));
|
|
445
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
424
446
|
var Switch = (0, import_material7.styled)(import_material7.Switch)(({ theme: theme2 }) => ({
|
|
425
447
|
width: 60,
|
|
426
448
|
height: 30,
|
|
@@ -464,20 +486,26 @@ var Switch = (0, import_material7.styled)(import_material7.Switch)(({ theme: the
|
|
|
464
486
|
}));
|
|
465
487
|
var CustomSwitch = (props) => {
|
|
466
488
|
const _a = props, { beforeText, afterText } = _a, rest = __objRest(_a, ["beforeText", "afterText"]);
|
|
467
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_material7.Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
490
|
+
beforeText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Typography3.default, { className: "text-base", children: beforeText }) : null,
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Switch, __spreadProps(__spreadValues({ defaultChecked: true }, rest), { disableRipple: true })),
|
|
492
|
+
afterText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Typography3.default, { className: "text-base", children: afterText }) : null
|
|
493
|
+
] });
|
|
468
494
|
};
|
|
469
495
|
var Switch_default = CustomSwitch;
|
|
470
496
|
|
|
471
497
|
// src/components/Slider/Slider.tsx
|
|
472
498
|
var import_material8 = require("@mui/material");
|
|
499
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
473
500
|
var StyledSlider = (0, import_material8.styled)(import_material8.Slider)(() => ({}));
|
|
474
501
|
var CustomSlider = (props) => {
|
|
475
|
-
return /* @__PURE__ */
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(StyledSlider, __spreadValues({}, props));
|
|
476
503
|
};
|
|
477
504
|
var Slider_default = CustomSlider;
|
|
478
505
|
|
|
479
506
|
// src/components/MenuItem/MenuItem.tsx
|
|
480
507
|
var import_material9 = require("@mui/material");
|
|
508
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
481
509
|
var StyledMenuItem = (0, import_material9.styled)(import_material9.MenuItem)(() => ({
|
|
482
510
|
borderRadius: "5px",
|
|
483
511
|
"&.Mui-selected": {
|
|
@@ -487,13 +515,14 @@ var StyledMenuItem = (0, import_material9.styled)(import_material9.MenuItem)(()
|
|
|
487
515
|
}));
|
|
488
516
|
var CustomMenuItem = (props) => {
|
|
489
517
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
490
|
-
return /* @__PURE__ */
|
|
518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StyledMenuItem, __spreadProps(__spreadValues({}, rest), { children }));
|
|
491
519
|
};
|
|
492
520
|
var MenuItem_default = CustomMenuItem;
|
|
493
521
|
|
|
494
522
|
// src/components/Input/Input.tsx
|
|
495
523
|
var import_material10 = require("@mui/material");
|
|
496
524
|
var import_Input = __toESM(require("@mui/material/Input"));
|
|
525
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
497
526
|
var StyledInput = (0, import_material10.styled)(import_Input.default)(() => ({
|
|
498
527
|
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button": {
|
|
499
528
|
display: "none"
|
|
@@ -510,12 +539,12 @@ var CustomInput = (props) => {
|
|
|
510
539
|
event.stopPropagation();
|
|
511
540
|
}
|
|
512
541
|
};
|
|
513
|
-
return /* @__PURE__ */
|
|
542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
514
543
|
StyledInput,
|
|
515
544
|
__spreadValues({
|
|
516
545
|
disableUnderline: true,
|
|
517
546
|
onKeyDown: handleKeyDown,
|
|
518
|
-
startAdornment: adornmentText ? /* @__PURE__ */
|
|
547
|
+
startAdornment: adornmentText ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_material10.InputAdornment, { position: "start", className: "text-sm", children: adornmentText }) : void 0,
|
|
519
548
|
value,
|
|
520
549
|
componentsProps: {
|
|
521
550
|
root: {
|
|
@@ -530,11 +559,12 @@ var Input_default = CustomInput;
|
|
|
530
559
|
|
|
531
560
|
// src/components/Input/PhoneInput.tsx
|
|
532
561
|
var import_react_number_format = require("react-number-format");
|
|
533
|
-
var
|
|
534
|
-
var
|
|
562
|
+
var import_react3 = require("react");
|
|
563
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
564
|
+
var PhoneInput = (0, import_react3.forwardRef)(
|
|
535
565
|
function NumericFormatCustom(props, ref) {
|
|
536
566
|
const _a = props, { onChange } = _a, other = __objRest(_a, ["onChange"]);
|
|
537
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
538
568
|
import_react_number_format.PatternFormat,
|
|
539
569
|
__spreadProps(__spreadValues({}, other), {
|
|
540
570
|
getInputRef: ref,
|
|
@@ -558,24 +588,32 @@ var PhoneInput_default = PhoneInput;
|
|
|
558
588
|
// src/components/Input/FromToInput.tsx
|
|
559
589
|
var import_material11 = require("@mui/material");
|
|
560
590
|
var import_Typography4 = __toESM(require("@mui/material/Typography"));
|
|
591
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
561
592
|
var FromToInput = ({ label }) => {
|
|
562
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material11.Stack, { children: [
|
|
594
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Typography4.default, { className: "text-accent-dark text-xs", children: label }) : null,
|
|
595
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material11.Stack, { direction: "row", spacing: 1, children: [
|
|
596
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Input_default, { adornmentText: "\u0432\u0456\u0434", fullWidth: true, type: "number" }),
|
|
597
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Input_default, { adornmentText: "\u0434\u043E", fullWidth: true, type: "number" })
|
|
598
|
+
] })
|
|
599
|
+
] });
|
|
563
600
|
};
|
|
564
601
|
var FromToInput_default = FromToInput;
|
|
565
602
|
|
|
566
603
|
// src/theme/index.tsx
|
|
567
|
-
var
|
|
604
|
+
var import_react4 = require("react");
|
|
568
605
|
var import_cache = __toESM(require("@emotion/cache"));
|
|
569
606
|
var import_navigation = require("next/navigation");
|
|
570
|
-
var
|
|
607
|
+
var import_react5 = require("@emotion/react");
|
|
571
608
|
var import_ThemeProvider = __toESM(require("@mui/material/styles/ThemeProvider"));
|
|
572
609
|
var import_createTheme = __toESM(require("@mui/material/styles/createTheme"));
|
|
573
610
|
var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
|
|
574
611
|
var import_stylis = require("stylis");
|
|
612
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
575
613
|
var theme = (0, import_createTheme.default)({});
|
|
576
614
|
function ThemeRegistry(props) {
|
|
577
615
|
const { children } = props;
|
|
578
|
-
const [{ cache, flush }] = (0,
|
|
616
|
+
const [{ cache, flush }] = (0, import_react4.useState)(() => {
|
|
579
617
|
const cache2 = (0, import_cache.default)({
|
|
580
618
|
key: "mui",
|
|
581
619
|
stylisPlugins: [import_stylis.prefixer]
|
|
@@ -606,34 +644,39 @@ function ThemeRegistry(props) {
|
|
|
606
644
|
for (const name of names) {
|
|
607
645
|
styles += cache.inserted[name];
|
|
608
646
|
}
|
|
609
|
-
return /* @__PURE__ */
|
|
647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
610
648
|
"style",
|
|
611
649
|
{
|
|
612
|
-
key: cache.key,
|
|
613
650
|
"data-emotion": `${cache.key} ${names.join(" ")}`,
|
|
614
651
|
dangerouslySetInnerHTML: {
|
|
615
652
|
__html: styles
|
|
616
653
|
}
|
|
617
|
-
}
|
|
654
|
+
},
|
|
655
|
+
cache.key
|
|
618
656
|
);
|
|
619
657
|
});
|
|
620
|
-
return /* @__PURE__ */
|
|
658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react5.CacheProvider, { value: cache, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ThemeProvider.default, { theme, children: [
|
|
659
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_CssBaseline.default, {}),
|
|
660
|
+
children
|
|
661
|
+
] }) });
|
|
621
662
|
}
|
|
622
663
|
|
|
623
664
|
// src/providers/Providers.tsx
|
|
665
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
624
666
|
var Providers = ({ children }) => {
|
|
625
|
-
return /* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ThemeRegistry, { children });
|
|
626
668
|
};
|
|
627
669
|
var Providers_default = Providers;
|
|
628
670
|
|
|
629
671
|
// src/components/AppBar/AppBar.tsx
|
|
630
|
-
var
|
|
672
|
+
var import_react6 = require("react");
|
|
631
673
|
var import_material12 = require("@mui/material");
|
|
632
674
|
var import_link = __toESM(require("next/link"));
|
|
675
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
633
676
|
var AppBar = ({ links }) => {
|
|
634
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
635
|
-
const navItemsRef = (0,
|
|
636
|
-
(0,
|
|
677
|
+
const [activeIndex, setActiveIndex] = (0, import_react6.useState)(0);
|
|
678
|
+
const navItemsRef = (0, import_react6.useRef)([]);
|
|
679
|
+
(0, import_react6.useEffect)(() => {
|
|
637
680
|
const indicator = document.querySelector(".nav-indicator");
|
|
638
681
|
const navItem = navItemsRef.current[activeIndex];
|
|
639
682
|
const navItemWidth = navItem.offsetWidth;
|
|
@@ -647,19 +690,22 @@ var AppBar = ({ links }) => {
|
|
|
647
690
|
const handleClick = (index) => {
|
|
648
691
|
setActiveIndex(index);
|
|
649
692
|
};
|
|
650
|
-
return /* @__PURE__ */
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_material12.Stack, { direction: "row", spacing: 1, position: "relative", children: [
|
|
694
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_material12.Box, { className: "nav-indicator" }),
|
|
695
|
+
links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
696
|
+
import_link.default,
|
|
697
|
+
{
|
|
698
|
+
ref: (el) => {
|
|
699
|
+
navItemsRef.current[index] = el;
|
|
700
|
+
},
|
|
701
|
+
href: link.href,
|
|
702
|
+
className: `nav-item ${index === activeIndex ? "active" : ""}`,
|
|
703
|
+
onClick: () => handleClick(index),
|
|
704
|
+
children: link.title
|
|
655
705
|
},
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
onClick: () => handleClick(index)
|
|
660
|
-
},
|
|
661
|
-
link.title
|
|
662
|
-
)));
|
|
706
|
+
index
|
|
707
|
+
))
|
|
708
|
+
] });
|
|
663
709
|
};
|
|
664
710
|
var AppBar_default = AppBar;
|
|
665
711
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -31,15 +31,20 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/components/Greet.tsx
|
|
34
|
+
import { jsxs } from "react/jsx-runtime";
|
|
34
35
|
function Greet(props) {
|
|
35
36
|
const { name } = props;
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
38
|
+
"Hello ",
|
|
39
|
+
name
|
|
40
|
+
] });
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
// src/components/Button/Button.tsx
|
|
40
44
|
import ButtonMUI from "@mui/material/Button";
|
|
41
45
|
import { styled } from "@mui/material";
|
|
42
46
|
import Typography from "@mui/material/Typography";
|
|
47
|
+
import { jsx } from "react/jsx-runtime";
|
|
43
48
|
var StyledButton = styled(ButtonMUI)(() => ({
|
|
44
49
|
textTransform: "none",
|
|
45
50
|
width: "fit-content",
|
|
@@ -59,28 +64,29 @@ var StyledButton = styled(ButtonMUI)(() => ({
|
|
|
59
64
|
}));
|
|
60
65
|
var Button = (props) => {
|
|
61
66
|
const _a = props, { children, base, bolt, border, small, large } = _a, rest = __objRest(_a, ["children", "base", "bolt", "border", "small", "large"]);
|
|
62
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
63
68
|
StyledButton,
|
|
64
69
|
__spreadProps(__spreadValues({}, rest), {
|
|
65
70
|
disableRipple: true,
|
|
66
71
|
className: `${base ? "bg-accent-dark rounded-none text-white hover:bg-accent-beige text-base" : ""}
|
|
67
72
|
${small ? "py-1.5 px-4" : ""}
|
|
68
73
|
${large ? "py-5 px-10" : ""}
|
|
69
|
-
${border ? "border-b border-solid rounded-none" : ""}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
74
|
+
${border ? "border-b border-solid rounded-none" : ""}`,
|
|
75
|
+
children: /* @__PURE__ */ jsx(
|
|
76
|
+
Typography,
|
|
77
|
+
{
|
|
78
|
+
className: `${bolt ? "font-extrabold leading-4" : "font-normal leading-3"}`,
|
|
79
|
+
children
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
})
|
|
78
83
|
);
|
|
79
84
|
};
|
|
80
85
|
var Button_default = Button;
|
|
81
86
|
|
|
82
87
|
// src/components/Button/IconButton.tsx
|
|
83
88
|
import { IconButton as IconButtonMUI, styled as styled2 } from "@mui/material";
|
|
89
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
84
90
|
var StyledButton2 = styled2(IconButtonMUI)(() => ({
|
|
85
91
|
width: "fit-content",
|
|
86
92
|
borderRadius: 0,
|
|
@@ -95,7 +101,7 @@ var StyledButton2 = styled2(IconButtonMUI)(() => ({
|
|
|
95
101
|
}));
|
|
96
102
|
var IconButton = (props) => {
|
|
97
103
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
98
|
-
return /* @__PURE__ */
|
|
104
|
+
return /* @__PURE__ */ jsx2(StyledButton2, __spreadProps(__spreadValues({}, rest), { disableRipple: true, children }));
|
|
99
105
|
};
|
|
100
106
|
var IconButton_default = IconButton;
|
|
101
107
|
|
|
@@ -107,6 +113,7 @@ import { Select, styled as styled3 } from "@mui/material";
|
|
|
107
113
|
var dropdown_arrow_default = "./dropdown-arrow-CDZAF5GJ.svg";
|
|
108
114
|
|
|
109
115
|
// src/components/Select/Select.tsx
|
|
116
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
110
117
|
var StyledSelect = styled3(Select)(({ open }) => ({
|
|
111
118
|
minWidth: 250,
|
|
112
119
|
"&.MuiInputBase-root": {
|
|
@@ -158,7 +165,7 @@ var CustomSelect = (props) => {
|
|
|
158
165
|
var _a2;
|
|
159
166
|
if (!open) (_a2 = myRef.current) == null ? void 0 : _a2.classList.remove("Mui-focused");
|
|
160
167
|
}, [open]);
|
|
161
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ jsx3(
|
|
162
169
|
StyledSelect,
|
|
163
170
|
__spreadProps(__spreadValues({}, rest), {
|
|
164
171
|
ref: myRef,
|
|
@@ -183,9 +190,9 @@ var CustomSelect = (props) => {
|
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
192
|
},
|
|
186
|
-
IconComponent: () => /* @__PURE__ */
|
|
187
|
-
|
|
188
|
-
|
|
193
|
+
IconComponent: () => /* @__PURE__ */ jsx3(dropdown_arrow_default, {}),
|
|
194
|
+
children
|
|
195
|
+
})
|
|
189
196
|
);
|
|
190
197
|
};
|
|
191
198
|
var Select_default = CustomSelect;
|
|
@@ -211,6 +218,7 @@ import {
|
|
|
211
218
|
var close_default = "./close-4XJDSDVO.svg";
|
|
212
219
|
|
|
213
220
|
// src/components/Select/SelectPro.tsx
|
|
221
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
214
222
|
var SelectPro = ({
|
|
215
223
|
children,
|
|
216
224
|
placeholder,
|
|
@@ -240,73 +248,83 @@ var SelectPro = ({
|
|
|
240
248
|
const childrenWithHandleChange = isValidElement(children) ? cloneElement(children, {
|
|
241
249
|
collapseParent: handleClose
|
|
242
250
|
}) : children;
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
|
|
245
|
-
onClick: handleClick
|
|
246
|
-
}) : /* @__PURE__ */ React.createElement(
|
|
247
|
-
Button2,
|
|
248
|
-
{
|
|
251
|
+
return /* @__PURE__ */ jsx4(ClickAwayListener, { onClickAway: handleClose, children: /* @__PURE__ */ jsxs2(Box, { children: [
|
|
252
|
+
clickComponent ? cloneElement(clickComponent, {
|
|
249
253
|
ref: btn,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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,
|
|
254
|
+
onClick: handleClick
|
|
255
|
+
}) : /* @__PURE__ */ jsxs2(
|
|
256
|
+
Button2,
|
|
264
257
|
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
258
|
+
ref: btn,
|
|
259
|
+
"aria-controls": open ? "basic-menu" : void 0,
|
|
260
|
+
"aria-haspopup": "true",
|
|
261
|
+
"aria-expanded": open ? "true" : void 0,
|
|
262
|
+
onClick: handleClick,
|
|
263
|
+
disableRipple: true,
|
|
264
|
+
fullWidth: true,
|
|
265
|
+
sx: {
|
|
266
|
+
height: small ? "34px" : "49px",
|
|
267
|
+
padding: small ? "0 10px 0 6px" : "0 20px 0 19px"
|
|
268
|
+
},
|
|
269
|
+
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"}`,
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ jsx4(
|
|
272
|
+
Typography2,
|
|
273
|
+
{
|
|
274
|
+
className: "text-sm leading-4",
|
|
275
|
+
children: `${placeholder}`
|
|
276
|
+
}
|
|
277
|
+
),
|
|
278
|
+
colorBorder ? /* @__PURE__ */ jsx4(search_default, {}) : /* @__PURE__ */ jsx4(
|
|
279
|
+
dropdown_arrow_default,
|
|
280
|
+
{
|
|
281
|
+
style: {
|
|
282
|
+
transform: open ? "scaleY(-1)" : "scaleY(1)",
|
|
283
|
+
transition: "0.3s ease-in-out"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
]
|
|
288
|
+
}
|
|
268
289
|
),
|
|
269
|
-
|
|
270
|
-
|
|
290
|
+
btn ? /* @__PURE__ */ jsx4(
|
|
291
|
+
Paper,
|
|
271
292
|
{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
293
|
+
sx: {
|
|
294
|
+
position: "absolute",
|
|
295
|
+
width: !fullContainerWidth && btn ? btn.offsetWidth : "100%",
|
|
296
|
+
left: fullContainerWidth ? 0 : "initial",
|
|
297
|
+
right: fullContainerWidth ? 0 : "initial",
|
|
298
|
+
top: overButton ? 0 : "initial"
|
|
299
|
+
},
|
|
300
|
+
className: `menu ${open ? "menu--open" : "menu--close"} z-50 rounded-none shadow-sm`,
|
|
301
|
+
children: /* @__PURE__ */ jsxs2(Box, { className: `flex flex-col p-3 gap-3`, children: [
|
|
302
|
+
overButton ? /* @__PURE__ */ jsx4(
|
|
303
|
+
IconButton_default,
|
|
304
|
+
{
|
|
305
|
+
className: "bg-accent-silver p-1 self-end absolute",
|
|
306
|
+
onClick: handleClose,
|
|
307
|
+
children: /* @__PURE__ */ jsx4(close_default, {})
|
|
308
|
+
}
|
|
309
|
+
) : null,
|
|
310
|
+
childTitle ? /* @__PURE__ */ jsx4(
|
|
311
|
+
Typography2,
|
|
312
|
+
{
|
|
313
|
+
className: "text-sm font-normal text-accent-silver-2",
|
|
314
|
+
children: childTitle
|
|
315
|
+
}
|
|
316
|
+
) : null,
|
|
317
|
+
childrenWithHandleChange
|
|
318
|
+
] })
|
|
276
319
|
}
|
|
277
|
-
)
|
|
278
|
-
)
|
|
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));
|
|
320
|
+
) : null
|
|
321
|
+
] }) });
|
|
305
322
|
};
|
|
306
323
|
var SelectPro_default = SelectPro;
|
|
307
324
|
|
|
308
325
|
// src/components/Chip/Chip.tsx
|
|
309
326
|
import { Chip, styled as styled4 } from "@mui/material";
|
|
327
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
310
328
|
var StyledChip = styled4(Chip)(({ theme: theme2 }) => ({
|
|
311
329
|
borderRadius: theme2.shape.borderRadius
|
|
312
330
|
}));
|
|
@@ -318,7 +336,7 @@ var ChipViews = {
|
|
|
318
336
|
};
|
|
319
337
|
var CustomChip = (props) => {
|
|
320
338
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
321
|
-
return /* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ jsx5(
|
|
322
340
|
StyledChip,
|
|
323
341
|
__spreadValues({
|
|
324
342
|
className: `rounded-none w-fit h-fit px-2.5 py-0 ${ChipViews[view]}`
|
|
@@ -329,57 +347,61 @@ var Chip_default = CustomChip;
|
|
|
329
347
|
|
|
330
348
|
// src/components/Badge/Badge.tsx
|
|
331
349
|
import { Badge } from "@mui/material";
|
|
350
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
332
351
|
var CustomBadge = (props) => {
|
|
333
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ jsx6(Badge, __spreadValues({}, props));
|
|
334
353
|
};
|
|
335
354
|
var Badge_default = CustomBadge;
|
|
336
355
|
|
|
337
356
|
// src/components/Avatar/Avatar.tsx
|
|
338
357
|
import Avatar from "@mui/material/Avatar";
|
|
358
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
339
359
|
var CustomAvatar = (props) => {
|
|
340
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ jsx7(Avatar, __spreadValues({}, props));
|
|
341
361
|
};
|
|
342
362
|
var Avatar_default = CustomAvatar;
|
|
343
363
|
|
|
344
364
|
// src/components/Text/Text.tsx
|
|
345
365
|
import Typography3 from "@mui/material/Typography";
|
|
366
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
346
367
|
var Text = (props) => {
|
|
347
368
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
348
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ jsx8(Typography3, __spreadProps(__spreadValues({}, rest), { children }));
|
|
349
370
|
};
|
|
350
371
|
var Text_default = Text;
|
|
351
372
|
|
|
352
373
|
// src/components/Radio/Radio.tsx
|
|
353
|
-
import React2 from "react";
|
|
354
374
|
import Radio from "@mui/material/Radio";
|
|
355
375
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
376
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
356
377
|
var CustomRadio = (props) => {
|
|
357
378
|
const { value, label, radioProps, labelProps } = props;
|
|
358
379
|
if (label && value)
|
|
359
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ jsx9(
|
|
360
381
|
FormControlLabel,
|
|
361
382
|
__spreadValues({
|
|
362
383
|
value,
|
|
363
|
-
control: /* @__PURE__ */
|
|
384
|
+
control: /* @__PURE__ */ jsx9(Radio, __spreadValues({}, radioProps)),
|
|
364
385
|
label
|
|
365
386
|
}, labelProps)
|
|
366
387
|
);
|
|
367
|
-
return /* @__PURE__ */
|
|
388
|
+
return /* @__PURE__ */ jsx9(Radio, __spreadValues({}, radioProps));
|
|
368
389
|
};
|
|
369
390
|
var Radio_default = CustomRadio;
|
|
370
391
|
|
|
371
392
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
372
|
-
import React3 from "react";
|
|
373
393
|
import RadioGroup from "@mui/material/RadioGroup";
|
|
394
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
374
395
|
var CustomRadioGroup = (props) => {
|
|
375
396
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
376
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ jsx10(RadioGroup, __spreadProps(__spreadValues({}, rest), { children }));
|
|
377
398
|
};
|
|
378
399
|
var RadioGroup_default = CustomRadioGroup;
|
|
379
400
|
|
|
380
401
|
// src/components/Switch/Switch.tsx
|
|
381
402
|
import { Stack, styled as styled5, Switch as SwitchMUI } from "@mui/material";
|
|
382
403
|
import Typography4 from "@mui/material/Typography";
|
|
404
|
+
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
383
405
|
var Switch = styled5(SwitchMUI)(({ theme: theme2 }) => ({
|
|
384
406
|
width: 60,
|
|
385
407
|
height: 30,
|
|
@@ -423,20 +445,26 @@ var Switch = styled5(SwitchMUI)(({ theme: theme2 }) => ({
|
|
|
423
445
|
}));
|
|
424
446
|
var CustomSwitch = (props) => {
|
|
425
447
|
const _a = props, { beforeText, afterText } = _a, rest = __objRest(_a, ["beforeText", "afterText"]);
|
|
426
|
-
return /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ jsxs3(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
449
|
+
beforeText ? /* @__PURE__ */ jsx11(Typography4, { className: "text-base", children: beforeText }) : null,
|
|
450
|
+
/* @__PURE__ */ jsx11(Switch, __spreadProps(__spreadValues({ defaultChecked: true }, rest), { disableRipple: true })),
|
|
451
|
+
afterText ? /* @__PURE__ */ jsx11(Typography4, { className: "text-base", children: afterText }) : null
|
|
452
|
+
] });
|
|
427
453
|
};
|
|
428
454
|
var Switch_default = CustomSwitch;
|
|
429
455
|
|
|
430
456
|
// src/components/Slider/Slider.tsx
|
|
431
457
|
import { Slider, styled as styled6 } from "@mui/material";
|
|
458
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
432
459
|
var StyledSlider = styled6(Slider)(() => ({}));
|
|
433
460
|
var CustomSlider = (props) => {
|
|
434
|
-
return /* @__PURE__ */
|
|
461
|
+
return /* @__PURE__ */ jsx12(StyledSlider, __spreadValues({}, props));
|
|
435
462
|
};
|
|
436
463
|
var Slider_default = CustomSlider;
|
|
437
464
|
|
|
438
465
|
// src/components/MenuItem/MenuItem.tsx
|
|
439
466
|
import { MenuItem, styled as styled7 } from "@mui/material";
|
|
467
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
440
468
|
var StyledMenuItem = styled7(MenuItem)(() => ({
|
|
441
469
|
borderRadius: "5px",
|
|
442
470
|
"&.Mui-selected": {
|
|
@@ -446,13 +474,14 @@ var StyledMenuItem = styled7(MenuItem)(() => ({
|
|
|
446
474
|
}));
|
|
447
475
|
var CustomMenuItem = (props) => {
|
|
448
476
|
const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
|
|
449
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ jsx13(StyledMenuItem, __spreadProps(__spreadValues({}, rest), { children }));
|
|
450
478
|
};
|
|
451
479
|
var MenuItem_default = CustomMenuItem;
|
|
452
480
|
|
|
453
481
|
// src/components/Input/Input.tsx
|
|
454
482
|
import { InputAdornment, styled as styled8 } from "@mui/material";
|
|
455
483
|
import Input from "@mui/material/Input";
|
|
484
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
456
485
|
var StyledInput = styled8(Input)(() => ({
|
|
457
486
|
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button": {
|
|
458
487
|
display: "none"
|
|
@@ -469,12 +498,12 @@ var CustomInput = (props) => {
|
|
|
469
498
|
event.stopPropagation();
|
|
470
499
|
}
|
|
471
500
|
};
|
|
472
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ jsx14(
|
|
473
502
|
StyledInput,
|
|
474
503
|
__spreadValues({
|
|
475
504
|
disableUnderline: true,
|
|
476
505
|
onKeyDown: handleKeyDown,
|
|
477
|
-
startAdornment: adornmentText ? /* @__PURE__ */
|
|
506
|
+
startAdornment: adornmentText ? /* @__PURE__ */ jsx14(InputAdornment, { position: "start", className: "text-sm", children: adornmentText }) : void 0,
|
|
478
507
|
value,
|
|
479
508
|
componentsProps: {
|
|
480
509
|
root: {
|
|
@@ -490,10 +519,11 @@ var Input_default = CustomInput;
|
|
|
490
519
|
// src/components/Input/PhoneInput.tsx
|
|
491
520
|
import { PatternFormat } from "react-number-format";
|
|
492
521
|
import { forwardRef } from "react";
|
|
522
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
493
523
|
var PhoneInput = forwardRef(
|
|
494
524
|
function NumericFormatCustom(props, ref) {
|
|
495
525
|
const _a = props, { onChange } = _a, other = __objRest(_a, ["onChange"]);
|
|
496
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ jsx15(
|
|
497
527
|
PatternFormat,
|
|
498
528
|
__spreadProps(__spreadValues({}, other), {
|
|
499
529
|
getInputRef: ref,
|
|
@@ -517,8 +547,15 @@ var PhoneInput_default = PhoneInput;
|
|
|
517
547
|
// src/components/Input/FromToInput.tsx
|
|
518
548
|
import { Stack as Stack2 } from "@mui/material";
|
|
519
549
|
import Typography5 from "@mui/material/Typography";
|
|
550
|
+
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
520
551
|
var FromToInput = ({ label }) => {
|
|
521
|
-
return /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ jsxs4(Stack2, { children: [
|
|
553
|
+
label ? /* @__PURE__ */ jsx16(Typography5, { className: "text-accent-dark text-xs", children: label }) : null,
|
|
554
|
+
/* @__PURE__ */ jsxs4(Stack2, { direction: "row", spacing: 1, children: [
|
|
555
|
+
/* @__PURE__ */ jsx16(Input_default, { adornmentText: "\u0432\u0456\u0434", fullWidth: true, type: "number" }),
|
|
556
|
+
/* @__PURE__ */ jsx16(Input_default, { adornmentText: "\u0434\u043E", fullWidth: true, type: "number" })
|
|
557
|
+
] })
|
|
558
|
+
] });
|
|
522
559
|
};
|
|
523
560
|
var FromToInput_default = FromToInput;
|
|
524
561
|
|
|
@@ -531,6 +568,7 @@ import ThemeProvider from "@mui/material/styles/ThemeProvider";
|
|
|
531
568
|
import createTheme from "@mui/material/styles/createTheme";
|
|
532
569
|
import CssBaseline from "@mui/material/CssBaseline";
|
|
533
570
|
import { prefixer } from "stylis";
|
|
571
|
+
import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
534
572
|
var theme = createTheme({});
|
|
535
573
|
function ThemeRegistry(props) {
|
|
536
574
|
const { children } = props;
|
|
@@ -565,23 +603,27 @@ function ThemeRegistry(props) {
|
|
|
565
603
|
for (const name of names) {
|
|
566
604
|
styles += cache.inserted[name];
|
|
567
605
|
}
|
|
568
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ jsx17(
|
|
569
607
|
"style",
|
|
570
608
|
{
|
|
571
|
-
key: cache.key,
|
|
572
609
|
"data-emotion": `${cache.key} ${names.join(" ")}`,
|
|
573
610
|
dangerouslySetInnerHTML: {
|
|
574
611
|
__html: styles
|
|
575
612
|
}
|
|
576
|
-
}
|
|
613
|
+
},
|
|
614
|
+
cache.key
|
|
577
615
|
);
|
|
578
616
|
});
|
|
579
|
-
return /* @__PURE__ */
|
|
617
|
+
return /* @__PURE__ */ jsx17(CacheProvider, { value: cache, children: /* @__PURE__ */ jsxs5(ThemeProvider, { theme, children: [
|
|
618
|
+
/* @__PURE__ */ jsx17(CssBaseline, {}),
|
|
619
|
+
children
|
|
620
|
+
] }) });
|
|
580
621
|
}
|
|
581
622
|
|
|
582
623
|
// src/providers/Providers.tsx
|
|
624
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
583
625
|
var Providers = ({ children }) => {
|
|
584
|
-
return /* @__PURE__ */
|
|
626
|
+
return /* @__PURE__ */ jsx18(ThemeRegistry, { children });
|
|
585
627
|
};
|
|
586
628
|
var Providers_default = Providers;
|
|
587
629
|
|
|
@@ -589,6 +631,7 @@ var Providers_default = Providers;
|
|
|
589
631
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
|
|
590
632
|
import { Box as Box2, Stack as Stack3 } from "@mui/material";
|
|
591
633
|
import Link from "next/link";
|
|
634
|
+
import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
592
635
|
var AppBar = ({ links }) => {
|
|
593
636
|
const [activeIndex, setActiveIndex] = useState4(0);
|
|
594
637
|
const navItemsRef = useRef2([]);
|
|
@@ -606,19 +649,22 @@ var AppBar = ({ links }) => {
|
|
|
606
649
|
const handleClick = (index) => {
|
|
607
650
|
setActiveIndex(index);
|
|
608
651
|
};
|
|
609
|
-
return /* @__PURE__ */
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
652
|
+
return /* @__PURE__ */ jsxs6(Stack3, { direction: "row", spacing: 1, position: "relative", children: [
|
|
653
|
+
/* @__PURE__ */ jsx19(Box2, { className: "nav-indicator" }),
|
|
654
|
+
links.map((link, index) => /* @__PURE__ */ jsx19(
|
|
655
|
+
Link,
|
|
656
|
+
{
|
|
657
|
+
ref: (el) => {
|
|
658
|
+
navItemsRef.current[index] = el;
|
|
659
|
+
},
|
|
660
|
+
href: link.href,
|
|
661
|
+
className: `nav-item ${index === activeIndex ? "active" : ""}`,
|
|
662
|
+
onClick: () => handleClick(index),
|
|
663
|
+
children: link.title
|
|
614
664
|
},
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
onClick: () => handleClick(index)
|
|
619
|
-
},
|
|
620
|
-
link.title
|
|
621
|
-
)));
|
|
665
|
+
index
|
|
666
|
+
))
|
|
667
|
+
] });
|
|
622
668
|
};
|
|
623
669
|
var AppBar_default = AppBar;
|
|
624
670
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mayak-common-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -39,10 +39,6 @@
|
|
|
39
39
|
"tsup": "^8.1.0",
|
|
40
40
|
"typescript": "^5"
|
|
41
41
|
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"react": ">=18",
|
|
44
|
-
"react-dom": ">=18"
|
|
45
|
-
},
|
|
46
42
|
"browserslist": [
|
|
47
43
|
">0.3%",
|
|
48
44
|
"not dead",
|