mayak-common-library 0.0.105 → 0.0.106

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
@@ -258,4 +258,12 @@ interface CustomCheckboxProps {
258
258
  }
259
259
  declare const CustomCheckbox: FC<CustomCheckboxProps>;
260
260
 
261
- 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 };
261
+ interface IBannerBlock {
262
+ videoLink?: string;
263
+ bigText?: string;
264
+ smallText?: string;
265
+ classes?: string;
266
+ }
267
+ declare function BannerBlock({ bigText, smallText, classes, videoLink, }: IBannerBlock): react_jsx_runtime.JSX.Element;
268
+
269
+ export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BannerBlock, 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
@@ -258,4 +258,12 @@ interface CustomCheckboxProps {
258
258
  }
259
259
  declare const CustomCheckbox: FC<CustomCheckboxProps>;
260
260
 
261
- 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 };
261
+ interface IBannerBlock {
262
+ videoLink?: string;
263
+ bigText?: string;
264
+ smallText?: string;
265
+ classes?: string;
266
+ }
267
+ declare function BannerBlock({ bigText, smallText, classes, videoLink, }: IBannerBlock): react_jsx_runtime.JSX.Element;
268
+
269
+ export { AppBar, ArticleCard, Autocomplete, CustomAvatar as Avatar, CustomBadge as Badge, BannerBlock, 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
@@ -64,6 +64,7 @@ __export(src_exports, {
64
64
  Autocomplete: () => Autocomplete_default,
65
65
  Avatar: () => Avatar_default,
66
66
  Badge: () => Badge_default,
67
+ BannerBlock: () => BannerBlock,
67
68
  BigNumber: () => BigNumber_default,
68
69
  Button: () => Button_default,
69
70
  CategoryCard: () => CategoryCard_default,
@@ -1454,6 +1455,91 @@ var CustomCheckbox = (props) => {
1454
1455
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_Checkbox.default, __spreadValues({}, checkboxProps));
1455
1456
  };
1456
1457
  var Checkbox_default = CustomCheckbox;
1458
+
1459
+ // src/c/blocks/BannerBlock.tsx
1460
+ var import_material32 = require("@mui/material");
1461
+
1462
+ // src/lib/hooks/useWindowsSize.ts
1463
+ var import_react8 = require("react");
1464
+ function useWindowSize() {
1465
+ const [windowSize, setWindowSize] = (0, import_react8.useState)(0);
1466
+ const [loading, setLoading] = (0, import_react8.useState)(true);
1467
+ const handleResize = (0, import_react8.useCallback)(() => {
1468
+ setWindowSize(window.innerWidth);
1469
+ setLoading(false);
1470
+ }, []);
1471
+ const xl = windowSize < WINDOW_SIZE.xl;
1472
+ const lg = windowSize < WINDOW_SIZE.lg;
1473
+ const md = windowSize < WINDOW_SIZE.md;
1474
+ const sm = windowSize < WINDOW_SIZE.sm;
1475
+ const xs = windowSize < WINDOW_SIZE.xs;
1476
+ (0, import_react8.useEffect)(() => {
1477
+ if (typeof window !== "undefined") {
1478
+ window.addEventListener("resize", handleResize);
1479
+ handleResize();
1480
+ return () => window.removeEventListener("resize", handleResize);
1481
+ }
1482
+ }, [handleResize]);
1483
+ return {
1484
+ windowSize,
1485
+ xs,
1486
+ md,
1487
+ lg,
1488
+ xl,
1489
+ sm,
1490
+ loading
1491
+ };
1492
+ }
1493
+
1494
+ // src/c/blocks/BannerBlock.tsx
1495
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1496
+ function BannerBlock({
1497
+ bigText,
1498
+ smallText,
1499
+ classes,
1500
+ videoLink
1501
+ }) {
1502
+ const { sm, loading: loadingWindowSize } = useWindowSize();
1503
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material32.Box, { className: `h-screen relative${classes ? " " + classes : ""}`, children: [
1504
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1505
+ import_material32.Box,
1506
+ {
1507
+ sx: {
1508
+ background: `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))`
1509
+ },
1510
+ className: `absolute h-full w-full bg-cover z-[5]`
1511
+ }
1512
+ ),
1513
+ !loadingWindowSize && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1514
+ "video",
1515
+ {
1516
+ autoPlay: !sm,
1517
+ muted: true,
1518
+ loop: true,
1519
+ className: "absolute w-full h-full object-cover",
1520
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("source", { src: videoLink, type: "video/mp4" })
1521
+ }
1522
+ ),
1523
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1524
+ import_material32.Container,
1525
+ {
1526
+ className: "pt-[282px] pb-[96px] flex flex-col gap-11 relative z-[10] h-full justify-center md:pt-[215px] md:pb-[54px] md:gap-[20px] sm:pt-[115px] sm:pb-[30px]",
1527
+ maxWidth: CONTAINER_WIDTH,
1528
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_material32.Box, { className: "flex flex-col gap-2.5 text-light md:gap-[6px] w-1/2 md:w-2/3 sm:gap-[4px] sm:!w-full", children: [
1529
+ bigText && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1530
+ import_material32.Typography,
1531
+ {
1532
+ className: "uppercase text-40 font-extrabold md:text-26 sm:text-22",
1533
+ component: "h1",
1534
+ children: bigText
1535
+ }
1536
+ ),
1537
+ smallText && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_material32.Typography, { className: "text-base md:text-14", component: "span", children: smallText })
1538
+ ] })
1539
+ }
1540
+ )
1541
+ ] });
1542
+ }
1457
1543
  // Annotate the CommonJS export names for ESM import in node:
1458
1544
  0 && (module.exports = {
1459
1545
  AppBar,
@@ -1461,6 +1547,7 @@ var Checkbox_default = CustomCheckbox;
1461
1547
  Autocomplete,
1462
1548
  Avatar,
1463
1549
  Badge,
1550
+ BannerBlock,
1464
1551
  BigNumber,
1465
1552
  Button,
1466
1553
  CategoryCard,
package/dist/index.mjs CHANGED
@@ -1409,12 +1409,98 @@ var CustomCheckbox = (props) => {
1409
1409
  return /* @__PURE__ */ jsx47(Checkbox, __spreadValues({}, checkboxProps));
1410
1410
  };
1411
1411
  var Checkbox_default = CustomCheckbox;
1412
+
1413
+ // src/c/blocks/BannerBlock.tsx
1414
+ import { Box as Box14, Container as Container4, Typography as Typography19 } from "@mui/material";
1415
+
1416
+ // src/lib/hooks/useWindowsSize.ts
1417
+ import { useCallback, useEffect as useEffect3, useState as useState6 } from "react";
1418
+ function useWindowSize() {
1419
+ const [windowSize, setWindowSize] = useState6(0);
1420
+ const [loading, setLoading] = useState6(true);
1421
+ const handleResize = useCallback(() => {
1422
+ setWindowSize(window.innerWidth);
1423
+ setLoading(false);
1424
+ }, []);
1425
+ const xl = windowSize < WINDOW_SIZE.xl;
1426
+ const lg = windowSize < WINDOW_SIZE.lg;
1427
+ const md = windowSize < WINDOW_SIZE.md;
1428
+ const sm = windowSize < WINDOW_SIZE.sm;
1429
+ const xs = windowSize < WINDOW_SIZE.xs;
1430
+ useEffect3(() => {
1431
+ if (typeof window !== "undefined") {
1432
+ window.addEventListener("resize", handleResize);
1433
+ handleResize();
1434
+ return () => window.removeEventListener("resize", handleResize);
1435
+ }
1436
+ }, [handleResize]);
1437
+ return {
1438
+ windowSize,
1439
+ xs,
1440
+ md,
1441
+ lg,
1442
+ xl,
1443
+ sm,
1444
+ loading
1445
+ };
1446
+ }
1447
+
1448
+ // src/c/blocks/BannerBlock.tsx
1449
+ import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
1450
+ function BannerBlock({
1451
+ bigText,
1452
+ smallText,
1453
+ classes,
1454
+ videoLink
1455
+ }) {
1456
+ const { sm, loading: loadingWindowSize } = useWindowSize();
1457
+ return /* @__PURE__ */ jsxs19(Box14, { className: `h-screen relative${classes ? " " + classes : ""}`, children: [
1458
+ /* @__PURE__ */ jsx48(
1459
+ Box14,
1460
+ {
1461
+ sx: {
1462
+ background: `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))`
1463
+ },
1464
+ className: `absolute h-full w-full bg-cover z-[5]`
1465
+ }
1466
+ ),
1467
+ !loadingWindowSize && /* @__PURE__ */ jsx48(
1468
+ "video",
1469
+ {
1470
+ autoPlay: !sm,
1471
+ muted: true,
1472
+ loop: true,
1473
+ className: "absolute w-full h-full object-cover",
1474
+ children: /* @__PURE__ */ jsx48("source", { src: videoLink, type: "video/mp4" })
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ jsx48(
1478
+ Container4,
1479
+ {
1480
+ className: "pt-[282px] pb-[96px] flex flex-col gap-11 relative z-[10] h-full justify-center md:pt-[215px] md:pb-[54px] md:gap-[20px] sm:pt-[115px] sm:pb-[30px]",
1481
+ maxWidth: CONTAINER_WIDTH,
1482
+ children: /* @__PURE__ */ jsxs19(Box14, { className: "flex flex-col gap-2.5 text-light md:gap-[6px] w-1/2 md:w-2/3 sm:gap-[4px] sm:!w-full", children: [
1483
+ bigText && /* @__PURE__ */ jsx48(
1484
+ Typography19,
1485
+ {
1486
+ className: "uppercase text-40 font-extrabold md:text-26 sm:text-22",
1487
+ component: "h1",
1488
+ children: bigText
1489
+ }
1490
+ ),
1491
+ smallText && /* @__PURE__ */ jsx48(Typography19, { className: "text-base md:text-14", component: "span", children: smallText })
1492
+ ] })
1493
+ }
1494
+ )
1495
+ ] });
1496
+ }
1412
1497
  export {
1413
1498
  AppBar_default as AppBar,
1414
1499
  ArticleCard_default as ArticleCard,
1415
1500
  Autocomplete_default as Autocomplete,
1416
1501
  Avatar_default as Avatar,
1417
1502
  Badge_default as Badge,
1503
+ BannerBlock,
1418
1504
  BigNumber_default as BigNumber,
1419
1505
  Button_default as Button,
1420
1506
  CategoryCard_default as CategoryCard,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.105",
3
+ "version": "0.0.106",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",