mayak-common-library 0.0.63 → 0.0.65
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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +17 -14
- package/dist/index.mjs +19 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -44,7 +44,7 @@ declare const CustomSelect: FC<SelectProps & PropsWithChildren>;
|
|
|
44
44
|
|
|
45
45
|
interface SelectProProps {
|
|
46
46
|
placeholder?: string;
|
|
47
|
-
childTitle?:
|
|
47
|
+
childTitle?: ReactElement;
|
|
48
48
|
colorBorder?: boolean;
|
|
49
49
|
clickComponent?: ReactElement;
|
|
50
50
|
fullContainerWidth?: boolean;
|
|
@@ -60,7 +60,7 @@ declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
|
60
60
|
interface CustomChipProps {
|
|
61
61
|
view: "black" | "line" | "white" | "silver";
|
|
62
62
|
}
|
|
63
|
-
declare const
|
|
63
|
+
declare const Chip: FC<ChipProps & CustomChipProps>;
|
|
64
64
|
|
|
65
65
|
declare const CustomBadge: (props: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
@@ -208,6 +208,7 @@ interface ListItemProps {
|
|
|
208
208
|
title: string;
|
|
209
209
|
bold?: boolean;
|
|
210
210
|
onClick?: (value: string) => void;
|
|
211
|
+
value?: string;
|
|
211
212
|
}
|
|
212
213
|
declare const ListItem: FC<ListItemProps>;
|
|
213
214
|
|
|
@@ -246,4 +247,4 @@ interface CustomCheckboxProps {
|
|
|
246
247
|
}
|
|
247
248
|
declare const CustomCheckbox: FC<CustomCheckboxProps>;
|
|
248
249
|
|
|
249
|
-
export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox,
|
|
250
|
+
export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox, Chip, FromToInput, Greet, IconButton, ImageContainer, CustomInput as Input, JobCard, List, ListItem, CustomMenuItem as MenuItem, PhoneInput, Providers, CustomRadio as Radio, CustomRadioGroup as RadioGroup, RealtorCard, RealtyCard, SearchInput, CustomSelect as Select, SelectPro, CustomSlider as Slider, CustomSwitch as Switch, TeamPersonCard, Text, TextBlock, TitleBlock, ToggleButton, ToggleButtonGroup, ToggleButtonsWithLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare const CustomSelect: FC<SelectProps & PropsWithChildren>;
|
|
|
44
44
|
|
|
45
45
|
interface SelectProProps {
|
|
46
46
|
placeholder?: string;
|
|
47
|
-
childTitle?:
|
|
47
|
+
childTitle?: ReactElement;
|
|
48
48
|
colorBorder?: boolean;
|
|
49
49
|
clickComponent?: ReactElement;
|
|
50
50
|
fullContainerWidth?: boolean;
|
|
@@ -60,7 +60,7 @@ declare const SelectPro: FC<PropsWithChildren & SelectProProps>;
|
|
|
60
60
|
interface CustomChipProps {
|
|
61
61
|
view: "black" | "line" | "white" | "silver";
|
|
62
62
|
}
|
|
63
|
-
declare const
|
|
63
|
+
declare const Chip: FC<ChipProps & CustomChipProps>;
|
|
64
64
|
|
|
65
65
|
declare const CustomBadge: (props: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
@@ -208,6 +208,7 @@ interface ListItemProps {
|
|
|
208
208
|
title: string;
|
|
209
209
|
bold?: boolean;
|
|
210
210
|
onClick?: (value: string) => void;
|
|
211
|
+
value?: string;
|
|
211
212
|
}
|
|
212
213
|
declare const ListItem: FC<ListItemProps>;
|
|
213
214
|
|
|
@@ -246,4 +247,4 @@ interface CustomCheckboxProps {
|
|
|
246
247
|
}
|
|
247
248
|
declare const CustomCheckbox: FC<CustomCheckboxProps>;
|
|
248
249
|
|
|
249
|
-
export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox,
|
|
250
|
+
export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox, Chip, FromToInput, Greet, IconButton, ImageContainer, CustomInput as Input, JobCard, List, ListItem, CustomMenuItem as MenuItem, PhoneInput, Providers, CustomRadio as Radio, CustomRadioGroup as RadioGroup, RealtorCard, RealtyCard, SearchInput, CustomSelect as Select, SelectPro, CustomSlider as Slider, CustomSwitch as Switch, TeamPersonCard, Text, TextBlock, TitleBlock, ToggleButton, ToggleButtonGroup, ToggleButtonsWithLabel };
|
package/dist/index.js
CHANGED
|
@@ -365,7 +365,7 @@ var SelectPro = ({
|
|
|
365
365
|
dropdown_arrow_default,
|
|
366
366
|
{
|
|
367
367
|
style: {
|
|
368
|
-
transform: open ? "scaleY(
|
|
368
|
+
transform: open ? "scaleY(1)" : "scaleY(-1)",
|
|
369
369
|
transition: "0.3s ease-in-out"
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -395,13 +395,7 @@ var SelectPro = ({
|
|
|
395
395
|
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
|
|
396
396
|
}
|
|
397
397
|
) : null,
|
|
398
|
-
childTitle ?
|
|
399
|
-
import_material4.Typography,
|
|
400
|
-
{
|
|
401
|
-
className: "text-sm font-normal text-accent-silver-2",
|
|
402
|
-
children: childTitle
|
|
403
|
-
}
|
|
404
|
-
) : null,
|
|
398
|
+
childTitle ? childTitle : null,
|
|
405
399
|
childrenWithHandleChange
|
|
406
400
|
] })
|
|
407
401
|
]
|
|
@@ -427,7 +421,7 @@ var ChipViews = {
|
|
|
427
421
|
white: "!bg-accent-white text-accent-dark",
|
|
428
422
|
silver: "!bg-accent-silver text-accent-dark "
|
|
429
423
|
};
|
|
430
|
-
var
|
|
424
|
+
var Chip = (props) => {
|
|
431
425
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
432
426
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
433
427
|
StyledChip,
|
|
@@ -438,7 +432,7 @@ var CustomChip = (props) => {
|
|
|
438
432
|
})
|
|
439
433
|
);
|
|
440
434
|
};
|
|
441
|
-
var Chip_default =
|
|
435
|
+
var Chip_default = Chip;
|
|
442
436
|
|
|
443
437
|
// src/components/Badge/Badge.tsx
|
|
444
438
|
var import_material6 = require("@mui/material");
|
|
@@ -1227,12 +1221,12 @@ var import_ListItemIcon = __toESM(require("@mui/material/ListItemIcon"));
|
|
|
1227
1221
|
var import_ListItemText = __toESM(require("@mui/material/ListItemText"));
|
|
1228
1222
|
var import_Typography7 = __toESM(require("@mui/material/Typography"));
|
|
1229
1223
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1230
|
-
var ListItem = ({ icon, title, bold, onClick }) => {
|
|
1224
|
+
var ListItem = ({ icon, title, bold, value, onClick }) => {
|
|
1231
1225
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_material27.ListItem, { disablePadding: true, disableGutters: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
1232
1226
|
import_ListItemButton.default,
|
|
1233
1227
|
{
|
|
1234
1228
|
sx: { padding: 0, "&:hover": { backgroundColor: "unset" } },
|
|
1235
|
-
onClick: () => onClick && onClick(title),
|
|
1229
|
+
onClick: () => onClick && onClick(value ? value : title),
|
|
1236
1230
|
disableRipple: true,
|
|
1237
1231
|
children: [
|
|
1238
1232
|
icon ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_ListItemIcon.default, { sx: { minWidth: "24px" }, children: icon }) : null,
|
|
@@ -1339,7 +1333,7 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1339
1333
|
if (collapseOnClick && collapseParent) collapseParent();
|
|
1340
1334
|
};
|
|
1341
1335
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material30.Stack, { children: [
|
|
1342
|
-
label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography8.default, { className: "text-accent-silver-2 text-
|
|
1336
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography8.default, { className: "text-accent-silver-2 text-xs", children: label }) : null,
|
|
1343
1337
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1344
1338
|
ToggleButtonGroup_default,
|
|
1345
1339
|
__spreadProps(__spreadValues({}, field), {
|
|
@@ -1349,7 +1343,16 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1349
1343
|
onChange: handleFormat,
|
|
1350
1344
|
"aria-label": "text formatting",
|
|
1351
1345
|
className: `flex flex-${flexDirection} ${textView ? "gap-1 flex-nowrap flex-col" : " flex-wrap"}`,
|
|
1352
|
-
children: values.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1346
|
+
children: values.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1347
|
+
ToggleButton_default,
|
|
1348
|
+
{
|
|
1349
|
+
value: option.value,
|
|
1350
|
+
textView,
|
|
1351
|
+
className: "text-accent-dark",
|
|
1352
|
+
children: option.title
|
|
1353
|
+
},
|
|
1354
|
+
index
|
|
1355
|
+
))
|
|
1353
1356
|
})
|
|
1354
1357
|
)
|
|
1355
1358
|
] });
|
package/dist/index.mjs
CHANGED
|
@@ -306,7 +306,7 @@ var SelectPro = ({
|
|
|
306
306
|
dropdown_arrow_default,
|
|
307
307
|
{
|
|
308
308
|
style: {
|
|
309
|
-
transform: open ? "scaleY(
|
|
309
|
+
transform: open ? "scaleY(1)" : "scaleY(-1)",
|
|
310
310
|
transition: "0.3s ease-in-out"
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -336,13 +336,7 @@ var SelectPro = ({
|
|
|
336
336
|
children: /* @__PURE__ */ jsx7(close_default, {})
|
|
337
337
|
}
|
|
338
338
|
) : null,
|
|
339
|
-
childTitle ?
|
|
340
|
-
Typography2,
|
|
341
|
-
{
|
|
342
|
-
className: "text-sm font-normal text-accent-silver-2",
|
|
343
|
-
children: childTitle
|
|
344
|
-
}
|
|
345
|
-
) : null,
|
|
339
|
+
childTitle ? childTitle : null,
|
|
346
340
|
childrenWithHandleChange
|
|
347
341
|
] })
|
|
348
342
|
]
|
|
@@ -353,9 +347,9 @@ var SelectPro = ({
|
|
|
353
347
|
var SelectPro_default = SelectPro;
|
|
354
348
|
|
|
355
349
|
// src/components/Chip/Chip.tsx
|
|
356
|
-
import { Chip, styled as styled4 } from "@mui/material";
|
|
350
|
+
import { Chip as MUIChip, styled as styled4 } from "@mui/material";
|
|
357
351
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
358
|
-
var StyledChip = styled4(
|
|
352
|
+
var StyledChip = styled4(MUIChip)(({ theme: theme2 }) => ({
|
|
359
353
|
borderRadius: theme2.shape.borderRadius,
|
|
360
354
|
".MuiChip-label": { padding: 0 },
|
|
361
355
|
".MuiChip-icon": { margin: "0 6px 0 0" },
|
|
@@ -368,7 +362,7 @@ var ChipViews = {
|
|
|
368
362
|
white: "!bg-accent-white text-accent-dark",
|
|
369
363
|
silver: "!bg-accent-silver text-accent-dark "
|
|
370
364
|
};
|
|
371
|
-
var
|
|
365
|
+
var Chip = (props) => {
|
|
372
366
|
const _a = props, { view } = _a, rest = __objRest(_a, ["view"]);
|
|
373
367
|
return /* @__PURE__ */ jsx8(
|
|
374
368
|
StyledChip,
|
|
@@ -379,7 +373,7 @@ var CustomChip = (props) => {
|
|
|
379
373
|
})
|
|
380
374
|
);
|
|
381
375
|
};
|
|
382
|
-
var Chip_default =
|
|
376
|
+
var Chip_default = Chip;
|
|
383
377
|
|
|
384
378
|
// src/components/Badge/Badge.tsx
|
|
385
379
|
import { Badge } from "@mui/material";
|
|
@@ -1176,12 +1170,12 @@ import ListItemIcon from "@mui/material/ListItemIcon";
|
|
|
1176
1170
|
import ListItemText from "@mui/material/ListItemText";
|
|
1177
1171
|
import Typography16 from "@mui/material/Typography";
|
|
1178
1172
|
import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1179
|
-
var ListItem = ({ icon, title, bold, onClick }) => {
|
|
1173
|
+
var ListItem = ({ icon, title, bold, value, onClick }) => {
|
|
1180
1174
|
return /* @__PURE__ */ jsx43(MUIListItem, { disablePadding: true, disableGutters: true, children: /* @__PURE__ */ jsxs17(
|
|
1181
1175
|
ListItemButton,
|
|
1182
1176
|
{
|
|
1183
1177
|
sx: { padding: 0, "&:hover": { backgroundColor: "unset" } },
|
|
1184
|
-
onClick: () => onClick && onClick(title),
|
|
1178
|
+
onClick: () => onClick && onClick(value ? value : title),
|
|
1185
1179
|
disableRipple: true,
|
|
1186
1180
|
children: [
|
|
1187
1181
|
icon ? /* @__PURE__ */ jsx43(ListItemIcon, { sx: { minWidth: "24px" }, children: icon }) : null,
|
|
@@ -1294,7 +1288,7 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1294
1288
|
if (collapseOnClick && collapseParent) collapseParent();
|
|
1295
1289
|
};
|
|
1296
1290
|
return /* @__PURE__ */ jsxs18(Stack6, { children: [
|
|
1297
|
-
label ? /* @__PURE__ */ jsx46(Typography17, { className: "text-accent-silver-2 text-
|
|
1291
|
+
label ? /* @__PURE__ */ jsx46(Typography17, { className: "text-accent-silver-2 text-xs", children: label }) : null,
|
|
1298
1292
|
/* @__PURE__ */ jsx46(
|
|
1299
1293
|
ToggleButtonGroup_default,
|
|
1300
1294
|
__spreadProps(__spreadValues({}, field), {
|
|
@@ -1304,7 +1298,16 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1304
1298
|
onChange: handleFormat,
|
|
1305
1299
|
"aria-label": "text formatting",
|
|
1306
1300
|
className: `flex flex-${flexDirection} ${textView ? "gap-1 flex-nowrap flex-col" : " flex-wrap"}`,
|
|
1307
|
-
children: values.map((option, index) => /* @__PURE__ */ jsx46(
|
|
1301
|
+
children: values.map((option, index) => /* @__PURE__ */ jsx46(
|
|
1302
|
+
ToggleButton_default,
|
|
1303
|
+
{
|
|
1304
|
+
value: option.value,
|
|
1305
|
+
textView,
|
|
1306
|
+
className: "text-accent-dark",
|
|
1307
|
+
children: option.title
|
|
1308
|
+
},
|
|
1309
|
+
index
|
|
1310
|
+
))
|
|
1308
1311
|
})
|
|
1309
1312
|
)
|
|
1310
1313
|
] });
|