mayak-common-library 0.0.40 → 0.0.41

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 CHANGED
@@ -19,6 +19,8 @@ import { PatternFormatProps } from 'react-number-format/types/types';
19
19
  import { UseControllerProps } from 'react-hook-form';
20
20
  export { default as MapIcon } from '@/icons/map-search.svg';
21
21
  import { ListProps } from '@mui/material/List/List';
22
+ import { CheckboxProps } from '@mui/material/Checkbox';
23
+ import { FormControlLabelProps as FormControlLabelProps$1 } from '@mui/material/FormControlLabel/FormControlLabel';
22
24
 
23
25
  declare function Greet(props: {
24
26
  name: string;
@@ -234,4 +236,12 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
234
236
  }
235
237
  declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
236
238
 
237
- export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomChip as 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 };
239
+ interface CustomCheckboxProps {
240
+ labelProps?: FormControlLabelProps$1;
241
+ checkboxProps?: CheckboxProps;
242
+ label?: string;
243
+ toggleView?: boolean;
244
+ }
245
+ declare const CustomCheckbox: FC<CustomCheckboxProps>;
246
+
247
+ export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox, CustomChip as 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
@@ -19,6 +19,8 @@ import { PatternFormatProps } from 'react-number-format/types/types';
19
19
  import { UseControllerProps } from 'react-hook-form';
20
20
  export { default as MapIcon } from '@/icons/map-search.svg';
21
21
  import { ListProps } from '@mui/material/List/List';
22
+ import { CheckboxProps } from '@mui/material/Checkbox';
23
+ import { FormControlLabelProps as FormControlLabelProps$1 } from '@mui/material/FormControlLabel/FormControlLabel';
22
24
 
23
25
  declare function Greet(props: {
24
26
  name: string;
@@ -234,4 +236,12 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
234
236
  }
235
237
  declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
236
238
 
237
- export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomChip as 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 };
239
+ interface CustomCheckboxProps {
240
+ labelProps?: FormControlLabelProps$1;
241
+ checkboxProps?: CheckboxProps;
242
+ label?: string;
243
+ toggleView?: boolean;
244
+ }
245
+ declare const CustomCheckbox: FC<CustomCheckboxProps>;
246
+
247
+ export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BigNumber, Button, CategoryCard, CustomCheckbox as Checkbox, CustomChip as 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
@@ -67,6 +67,7 @@ __export(src_exports, {
67
67
  BigNumber: () => BigNumber_default,
68
68
  Button: () => Button_default,
69
69
  CategoryCard: () => CategoryCard_default,
70
+ Checkbox: () => Checkbox_default,
70
71
  Chip: () => Chip_default,
71
72
  FromToInput: () => FromToInput_default,
72
73
  Greet: () => Greet,
@@ -1341,6 +1342,52 @@ var ToggleButtonsWithLabel = (props) => {
1341
1342
  ] });
1342
1343
  };
1343
1344
  var ToggleButtonsWithLabel_default = ToggleButtonsWithLabel;
1345
+
1346
+ // src/components/Checkbox/Checkbox.tsx
1347
+ var import_Checkbox = __toESM(require("@mui/material/Checkbox"));
1348
+ var import_material31 = require("@mui/material");
1349
+ var import_Typography9 = __toESM(require("@mui/material/Typography"));
1350
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1351
+ var BpIcon = (0, import_material31.styled)("span")(() => ({
1352
+ width: 16,
1353
+ height: 16,
1354
+ backgroundColor: "white"
1355
+ }));
1356
+ var BpCheckedIcon = (0, import_material31.styled)(BpIcon)({
1357
+ "&::before": {
1358
+ width: 16,
1359
+ height: 16,
1360
+ display: "flex",
1361
+ alignItems: "center",
1362
+ justifyContent: "center",
1363
+ content: `url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.66667L4.82353 8L11 1' stroke='%23343434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`
1364
+ }
1365
+ });
1366
+ var CustomCheckbox = (props) => {
1367
+ const { label, labelProps, checkboxProps, toggleView = false } = props;
1368
+ if (label)
1369
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1370
+ import_material31.FormControlLabel,
1371
+ __spreadProps(__spreadValues({
1372
+ className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
1373
+ control: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1374
+ import_Checkbox.default,
1375
+ __spreadProps(__spreadValues({}, checkboxProps), {
1376
+ className: "p-0",
1377
+ disableRipple: true,
1378
+ color: "default",
1379
+ checkedIcon: toggleView ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(BpCheckedIcon, {}),
1380
+ icon: toggleView ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_jsx_runtime48.Fragment, {}) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(BpIcon, {})
1381
+ })
1382
+ )
1383
+ }, labelProps), {
1384
+ label: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Typography9.default, { className: "text-xs leading-6", children: label }),
1385
+ labelPlacement: "start"
1386
+ })
1387
+ );
1388
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Checkbox.default, __spreadValues({}, checkboxProps));
1389
+ };
1390
+ var Checkbox_default = CustomCheckbox;
1344
1391
  // Annotate the CommonJS export names for ESM import in node:
1345
1392
  0 && (module.exports = {
1346
1393
  AppBar,
@@ -1351,6 +1398,7 @@ var ToggleButtonsWithLabel_default = ToggleButtonsWithLabel;
1351
1398
  BigNumber,
1352
1399
  Button,
1353
1400
  CategoryCard,
1401
+ Checkbox,
1354
1402
  Chip,
1355
1403
  FromToInput,
1356
1404
  Greet,
package/dist/index.mjs CHANGED
@@ -1294,6 +1294,52 @@ var ToggleButtonsWithLabel = (props) => {
1294
1294
  ] });
1295
1295
  };
1296
1296
  var ToggleButtonsWithLabel_default = ToggleButtonsWithLabel;
1297
+
1298
+ // src/components/Checkbox/Checkbox.tsx
1299
+ import Checkbox from "@mui/material/Checkbox";
1300
+ import { FormControlLabel as FormControlLabel2, styled as styled11 } from "@mui/material";
1301
+ import Typography18 from "@mui/material/Typography";
1302
+ import { Fragment as Fragment5, jsx as jsx47 } from "react/jsx-runtime";
1303
+ var BpIcon = styled11("span")(() => ({
1304
+ width: 16,
1305
+ height: 16,
1306
+ backgroundColor: "white"
1307
+ }));
1308
+ var BpCheckedIcon = styled11(BpIcon)({
1309
+ "&::before": {
1310
+ width: 16,
1311
+ height: 16,
1312
+ display: "flex",
1313
+ alignItems: "center",
1314
+ justifyContent: "center",
1315
+ content: `url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 3.66667L4.82353 8L11 1' stroke='%23343434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`
1316
+ }
1317
+ });
1318
+ var CustomCheckbox = (props) => {
1319
+ const { label, labelProps, checkboxProps, toggleView = false } = props;
1320
+ if (label)
1321
+ return /* @__PURE__ */ jsx47(
1322
+ FormControlLabel2,
1323
+ __spreadProps(__spreadValues({
1324
+ className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
1325
+ control: /* @__PURE__ */ jsx47(
1326
+ Checkbox,
1327
+ __spreadProps(__spreadValues({}, checkboxProps), {
1328
+ className: "p-0",
1329
+ disableRipple: true,
1330
+ color: "default",
1331
+ checkedIcon: toggleView ? /* @__PURE__ */ jsx47(Fragment5, {}) : /* @__PURE__ */ jsx47(BpCheckedIcon, {}),
1332
+ icon: toggleView ? /* @__PURE__ */ jsx47(Fragment5, {}) : /* @__PURE__ */ jsx47(BpIcon, {})
1333
+ })
1334
+ )
1335
+ }, labelProps), {
1336
+ label: /* @__PURE__ */ jsx47(Typography18, { className: "text-xs leading-6", children: label }),
1337
+ labelPlacement: "start"
1338
+ })
1339
+ );
1340
+ return /* @__PURE__ */ jsx47(Checkbox, __spreadValues({}, checkboxProps));
1341
+ };
1342
+ var Checkbox_default = CustomCheckbox;
1297
1343
  export {
1298
1344
  AppBar_default as AppBar,
1299
1345
  ArticleCard_default as ArticleCard,
@@ -1303,6 +1349,7 @@ export {
1303
1349
  BigNumber_default as BigNumber,
1304
1350
  Button_default as Button,
1305
1351
  CategoryCard_default as CategoryCard,
1352
+ Checkbox_default as Checkbox,
1306
1353
  Chip_default as Chip,
1307
1354
  FromToInput_default as FromToInput,
1308
1355
  Greet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",