nestiq-component-library 1.1.34 → 1.1.36

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.
@@ -0,0 +1,4 @@
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="50" height="50" rx="25" fill="#fff" fill-opacity=".8"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M29.127 17.18a.614.614 0 0 1 0 .872L22.177 25l6.95 6.948a.617.617 0 0 1-.871.872l-7.384-7.384a.616.616 0 0 1 0-.872l7.384-7.383a.616.616 0 0 1 .871 0z" fill="#000"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="50" height="50" rx="25" fill="#fff" fill-opacity=".8"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.873 32.82a.614.614 0 0 1 0-.872L27.823 25l-6.95-6.948a.617.617 0 0 1 .871-.872l7.384 7.384a.616.616 0 0 1 0 .872l-7.384 7.383a.616.616 0 0 1-.871 0z" fill="#000"/>
4
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg width="4" height="20" viewBox="0 0 4 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#fxcoqj8dma)" fill="#313131">
3
+ <circle cx="2" cy="2" r="2"/>
4
+ <circle cx="2" cy="10" r="2"/>
5
+ <circle cx="2" cy="18" r="2"/>
6
+ </g>
7
+ <defs>
8
+ <clipPath id="fxcoqj8dma">
9
+ <path fill="#fff" d="M0 0h4v20H0z"/>
10
+ </clipPath>
11
+ </defs>
12
+ </svg>
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import "../PropertyCard/PropertyCard.css";
3
+ interface PopupProps {
4
+ property: {
5
+ city: string;
6
+ historicalProtection: boolean;
7
+ basement: boolean;
8
+ balcony: boolean;
9
+ terrace: boolean;
10
+ guestBathroom: boolean;
11
+ bathrooms: string;
12
+ usableArea: string;
13
+ id: string;
14
+ rooms: string;
15
+ constructedArea: string;
16
+ evaluation?: {
17
+ askingPrice: number;
18
+ };
19
+ pictures: {
20
+ contentUrl: string;
21
+ }[];
22
+ };
23
+ onClick: any;
24
+ baseUrl: string;
25
+ title: string;
26
+ }
27
+ export default function PropertyCard(props: PopupProps): React.JSX.Element;
28
+ export {};
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { default as PropertyImageList } from "./components/PropertyImageList//Pr
6
6
  export { default as PropertyCard } from "./components/PropertyCard//PropertyCard";
7
7
  export { default as SharePopup } from "./components/SharePopup/SharePopup";
8
8
  export { default as FloorPlanPopup } from "./components/FloorPlanPopup/FloorPlanPopup";
9
+ export { default as NewPropertyCard } from "./components/NewPropertyCard/NewPropertyCard";
9
10
  export { default as ToastWrapper, showToast, } from "./components/ToastWrapper/ToastWrapper";
10
11
  export { formatPrice, formatPropertyArea } from "./functions/util";
11
12
  import "./styles/common.css";
package/dist/index.es.js CHANGED
@@ -176,7 +176,7 @@ var iconGallery = "/static/media/icon_gallery.269b721daf2ca907.svg";
176
176
 
177
177
  var iconMap = "/static/media/icon_map.2318ec664c3e615e.svg";
178
178
 
179
- var iconLayers = "/static/media/layer_icon.9b56c187199c44b5.svg";
179
+ var iconLayers$1 = "/static/media/layer_icon.9b56c187199c44b5.svg";
180
180
 
181
181
  var css_248z$2 = ".mainImage {\r\n height: 80%;\r\n}\r\n\r\n.secondList {\r\n height: 20%;\r\n}\r\n\r\n.listImageButton {\r\n background-color: black;\r\n align-items: center !important;\r\n justify-content: center !important;\r\n}\r\n\r\n.listImgText {\r\n height: 30px;\r\n font-size: 14px;\r\n line-height: 2.14;\r\n color: #fff;\r\n}\r\n\r\n.arroIconColour {\r\n height: 30px;\r\n fill: #fff !important;\r\n}\r\n\r\n.onImageArrow {\r\n width: 50px;\r\n height: 50px;\r\n padding: 23px 8px;\r\n background-color: rgba(255, 255, 255, 0.8);\r\n}\r\n\r\n.blackArrow {\r\n width: 20px;\r\n height: 20px;\r\n}\r\n\r\n.imagesArray {\r\n background-size: \"cover\" !important;\r\n}\r\n@media (max-width: 380px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 500px;\r\n width: 58vw;\r\n }\r\n}\r\n\r\n@media (min-width: 390px) and (max-width: 850px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 500px;\r\n width: 58vw;\r\n }\r\n}\r\n@media (min-width: 768px) and (max-width: 819px) {\r\n .Pimagelist {\r\n }\r\n .mainImage {\r\n height: 80%;\r\n width: 58vw;\r\n }\r\n}\r\n";
182
182
  styleInject(css_248z$2);
@@ -362,7 +362,7 @@ function PropertyImageList(prop) {
362
362
  React.createElement("span", { className: "listImgText" }, "Alle Fotos"))),
363
363
  React.createElement("div", { className: "col-lg-4 col-3 p-1", role: "button", onClick: floorPlanClickHandler },
364
364
  React.createElement("div", { className: "border col-lg-12 h-100 d-flex flex-column listImageButton border-0 rounded-3" },
365
- React.createElement("img", { src: iconLayers, alt: "Layers Icon" }),
365
+ React.createElement("img", { src: iconLayers$1, alt: "Layers Icon" }),
366
366
  React.createElement("span", { className: "listImgText" }, "Grundriss"))),
367
367
  React.createElement("div", { className: "col-lg-4 col-3 p-1", role: "button", onClick: function () {
368
368
  return window.scrollTo({
@@ -383,14 +383,14 @@ var locationIcon = "/static/media/locationIcon.0af399c78e0cdc20.svg";
383
383
  var css_248z = ".padding-global {\r\n height: 737px !important;\r\n padding: 0 40px;\r\n}\r\n.header {\r\n font-size: 48px;\r\n font-weight: 600;\r\n color: #1b1b1b;\r\n}\r\n\r\n.firstLabel {\r\n width: 100px;\r\n height: 25px;\r\n gap: 6px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #031012 !important;\r\n background-color: var(--main-yellow);\r\n}\r\n\r\n.secondLabel {\r\n width: 85px;\r\n height: 25px;\r\n padding: 0 7px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #000;\r\n background-color: #fff;\r\n}\r\n\r\n.thirdLabels {\r\n padding: 4px;\r\n width: 110px;\r\n height: 25px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #000;\r\n background-color: #fff;\r\n}\r\n\r\n.fourthLabels {\r\n padding: 2px;\r\n\r\n width: 100px;\r\n height: 25px;\r\n border-radius: 16px;\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n border: solid 1px #000;\r\n background-color: #fff;\r\n}\r\n\r\n.layersVector {\r\n width: 15.1px;\r\n height: 16px;\r\n}\r\n\r\n.layersText {\r\n font-size: 14px;\r\n color: #1b1b1b;\r\n}\r\n\r\n.style-img {\r\n object-fit: cover;\r\n border-radius: 30px !important;\r\n}\r\n\r\n.Vector {\r\n width: 12px;\r\n height: 16.1px;\r\n flex-grow: 0;\r\n margin: 0.4px 6px 0.4px 0;\r\n}\r\n\r\n.customButton {\r\n width: 262px;\r\n height: 43px;\r\n color: #000;\r\n cursor: pointer;\r\n border-color: var(--main-yellow);\r\n background-color: var(--main-yellow);\r\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);\r\n}\r\n.button_text {\r\n font-size: 16px;\r\n font-weight: 500;\r\n color: #1b1b1b;\r\n}\r\n\r\n.heartVector {\r\n width: 23px;\r\n height: 26.7px;\r\n cursor: pointer;\r\n}\r\n\r\n.heartVector.liked {\r\n fill: rgb(255, 255, 255) !important;\r\n}\r\n.locationText {\r\n font-size: 14px;\r\n color: white;\r\n text-align: center;\r\n}\r\n\r\n.arrowVector {\r\n width: 23px;\r\n height: 23px;\r\n flex-grow: 0;\r\n object-fit: contain;\r\n}\r\n\r\n.Price {\r\n font-size: 26px;\r\n font-weight: 500;\r\n font-stretch: normal;\r\n font-style: normal;\r\n line-height: normal;\r\n letter-spacing: normal;\r\n text-align: center;\r\n color: #fff;\r\n}\r\n\r\n.detail {\r\n font-size: 12px;\r\n text-align: center;\r\n color: #fff;\r\n}\r\n\r\n.class {\r\n background-color: #1b1b1b;\r\n}\r\n\r\n.header {\r\n height: 64px;\r\n justify-content: center;\r\n}\r\n\r\n.cardStyle {\r\n width: 405px;\r\n max-width: 2405px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 350px;\r\n border-radius: 30px !important;\r\n}\r\n\r\n.rightConer {\r\n width: 200px;\r\n}\r\n@media all and (min-width: 2560px) {\r\n .header {\r\n font-size: 38px;\r\n\r\n display: flex;\r\n }\r\n .cardStyle {\r\n gap: 0px;\r\n width: 350px;\r\n height: 300px;\r\n /* margin-left: 250px; */\r\n }\r\n}\r\n@media (max-width: 1399px) {\r\n .header {\r\n font-size: 38px;\r\n align-self: center;\r\n margin-left: 150px;\r\n }\r\n .cardStyle {\r\n gap: 0px;\r\n width: 350px;\r\n height: 300px;\r\n }\r\n}\r\n\r\n@media (max-width: 1199px) {\r\n .header {\r\n font-size: 38px;\r\n }\r\n .cardStyle {\r\n width: 300px;\r\n height: 250px;\r\n }\r\n}\r\n\r\n@media (max-width: 575px) {\r\n .detail {\r\n font-size: 11px;\r\n padding: 2px;\r\n }\r\n .Price {\r\n font-size: 19px;\r\n }\r\n .header {\r\n font-size: 28px;\r\n }\r\n .locationText {\r\n font-size: 12px;\r\n }\r\n .customButton {\r\n width: 200px !important;\r\n }\r\n .button_text {\r\n font-size: 13px;\r\n }\r\n}\r\n\r\n@media (max-width: 375px) {\r\n .labelTopClass {\r\n width: 105px !important;\r\n }\r\n .layersText {\r\n font-size: 9px;\r\n }\r\n .firstLabel {\r\n gap: 2px;\r\n }\r\n .layersVector {\r\n width: 9px;\r\n height: 10px;\r\n gap: 0px;\r\n }\r\n .cardStyle {\r\n width: 320px !important;\r\n height: 220px !important;\r\n }\r\n .header {\r\n font-size: 24px;\r\n }\r\n .detail {\r\n font-size: 10px;\r\n padding: 2px;\r\n }\r\n .Price {\r\n font-size: 18px;\r\n }\r\n .locationText {\r\n font-size: 10px;\r\n }\r\n .Vector {\r\n width: 8px;\r\n height: 16px;\r\n margin: 0px 2px 0.4px;\r\n }\r\n}\r\n\r\n@media (max-width: 280px) {\r\n .cardStyle {\r\n width: 260px !important;\r\n height: 160px !important;\r\n }\r\n .detail {\r\n margin-bottom: 5px;\r\n font-size: 0.6ch;\r\n }\r\n .Price {\r\n font-size: 9px;\r\n }\r\n .locationText {\r\n font-size: 6px;\r\n }\r\n .Vector {\r\n width: 7px;\r\n height: 10px;\r\n margin: 0px 2px 4px;\r\n }\r\n .heartVector {\r\n width: 15px;\r\n height: 20px;\r\n }\r\n}\r\n";
384
384
  styleInject(css_248z);
385
385
 
386
- var noImageIcon = "/static/media/default-property.9987f19670be82b6.jpg";
386
+ var noImageIcon$1 = "/static/media/default-property.9987f19670be82b6.jpg";
387
387
 
388
- function PropertyCard(props) {
388
+ function PropertyCard$1(props) {
389
389
  var _a, _b, _c, _d;
390
390
  var _e = useState(false); _e[0]; _e[1];
391
391
  var pictureUrl = props.property.pictures && props.property.pictures.length > 0
392
392
  ? "".concat(props.baseUrl).concat(props.property.pictures[0].contentUrl)
393
- : noImageIcon;
393
+ : noImageIcon$1;
394
394
  return (React.createElement("div", { key: props.property.id, className: "card-body me-4 mb-4 position-relative cardStyle", style: {
395
395
  backgroundImage: "url(".concat(pictureUrl, ")"),
396
396
  backgroundSize: "cover",
@@ -436,6 +436,148 @@ function PropertyCard(props) {
436
436
  React.createElement("span", null, "Wohnfl\u00E4che")))));
437
437
  }
438
438
 
439
+ var noImageIcon = "/static/media/default-property.9987f19670be82b6.jpg";
440
+
441
+ var shareIcon = "/static/media/icon_share_1.b9ec05630dc1087e.svg";
442
+
443
+ var moreIcon = "/static/media/more.1e158adc48fbb406.svg";
444
+
445
+ var arrowLeft = "/static/media/card-arrow-left.28090aba4b4f2006.svg";
446
+
447
+ var arrowRight = "/static/media/card-arrow-right.c60af4cbbd49f3aa.svg";
448
+
449
+ var iconLayers = "/static/media/layer_icon.9b56c187199c44b5.svg";
450
+
451
+ function PropertyCard(props) {
452
+ var _a, _b, _c, _d, _e, _f;
453
+ var _g = useState(false); _g[0]; _g[1];
454
+ var _h = useState(null), mainImage = _h[0], setMainImage = _h[1];
455
+ var _j = useState(0), currentImageIndex = _j[0], setCurrentImageIndex = _j[1];
456
+ var imageListRef = useRef(null);
457
+ var _k = useState(false), floorPlan = _k[0], setFloorPlan = _k[1];
458
+ var _l = useState(false); _l[0]; var setMessagPopUp = _l[1];
459
+ var _m = useState(false), sharePopUp = _m[0], setSharePopUp = _m[1];
460
+ var pictureUrls = ((_b = (_a = props.property) === null || _a === void 0 ? void 0 : _a.pictures) === null || _b === void 0 ? void 0 : _b.length) > 0
461
+ ? props.property.pictures.map(function (picture) { return "".concat(props.baseUrl).concat(picture.contentUrl); })
462
+ : [noImageIcon];
463
+ var floorPlanOnClick = function () {
464
+ setFloorPlan(true);
465
+ };
466
+ var handleMessagPopUp = function () {
467
+ setMessagPopUp(true);
468
+ };
469
+ var handleSharePopUp = function () {
470
+ setSharePopUp(true);
471
+ };
472
+ var handleArrowClickInMainImage = function (direction) {
473
+ if (!props.property || pictureUrls.length === 0)
474
+ return;
475
+ var newIndex = currentImageIndex;
476
+ if (direction === "left") {
477
+ newIndex =
478
+ (currentImageIndex - 1 + pictureUrls.length) % pictureUrls.length;
479
+ }
480
+ else if (direction === "right") {
481
+ newIndex = (currentImageIndex + 1) % pictureUrls.length;
482
+ }
483
+ setCurrentImageIndex(newIndex);
484
+ setMainImage(pictureUrls[newIndex]);
485
+ // Ensure the ref exists before calling scrollTo
486
+ if (imageListRef.current) {
487
+ imageListRef.current.scrollTo({
488
+ left: newIndex * 150,
489
+ behavior: "smooth",
490
+ });
491
+ }
492
+ else {
493
+ console.warn("imageListRef is not set");
494
+ }
495
+ };
496
+ return (React.createElement("div", { className: "d-flex flex-row " },
497
+ React.createElement("div", { className: "d-flex flex-column" },
498
+ React.createElement("div", { key: props.property.id, className: "card-body mb-4 position-relative cardStyles", style: {
499
+ backgroundImage: "url(".concat(mainImage || pictureUrls[0], ")"),
500
+ backgroundSize: "cover",
501
+ backgroundPosition: "center",
502
+ } },
503
+ React.createElement("div", { className: "d-flex flex-row justify-content-between gap-5" },
504
+ React.createElement("div", { className: "d-flex", style: { position: "absolute", left: "0" }, onClick: function () { return handleArrowClickInMainImage("left"); }, role: "button" },
505
+ React.createElement("img", { src: arrowLeft })),
506
+ React.createElement("div", null),
507
+ React.createElement("div", { onClick: function () { return handleArrowClickInMainImage("right"); }, role: "button" },
508
+ React.createElement("img", { src: arrowRight, style: { position: "absolute", right: "0" } }))),
509
+ React.createElement("div", { className: "d-flex flex-row align-self-end justify-item-start justify-content-between align-item-start gap-1 mb-2 ms-4", style: { position: "absolute", left: "0" } },
510
+ React.createElement("div", { className: "cardTag" }, "".concat(currentImageIndex + 1, "/").concat(pictureUrls.length)),
511
+ React.createElement("div", { className: "Grundriss kontact-button-text ", role: "button", onClick: floorPlanOnClick },
512
+ React.createElement("img", { src: iconLayers, className: "", style: { width: "18px" } }),
513
+ " ",
514
+ "Grundriss")))),
515
+ React.createElement("div", { className: "d-flex flex-column listing-compacts col-12" },
516
+ React.createElement("div", { className: "d-flex align-self-end justify-content-end gap-2" },
517
+ React.createElement("img", { src: shareIcon, alt: "Location Icon", className: "w-50 ", onClick: handleSharePopUp }),
518
+ React.createElement("img", { src: moreIcon, alt: "Location Icon", className: "" })),
519
+ React.createElement("div", null,
520
+ React.createElement("span", { className: "propertyTitle align-items-start " },
521
+ "Charmante Altbauwohnung in zentraler Lage \u2013 ideal f\u00FCr Familien oder Paare",
522
+ props.title)),
523
+ React.createElement("div", null,
524
+ " ",
525
+ React.createElement("div", { className: "d-flex " },
526
+ React.createElement("img", { src: locationIcon, alt: "Location Icon", className: "Vector" }),
527
+ React.createElement("span", { className: "locationTexts " }, props.property.city || "N/A"))),
528
+ React.createElement("div", { className: "d-flex flex-row " },
529
+ React.createElement("div", { className: "d-flex col-5" },
530
+ React.createElement("span", { className: "value " },
531
+ formatPrice((_e = (_d = (_c = props.property) === null || _c === void 0 ? void 0 : _c.evaluation) === null || _d === void 0 ? void 0 : _d.askingPrice) !== null && _e !== void 0 ? _e : 0),
532
+ " \u20AC",
533
+ React.createElement("br", null),
534
+ React.createElement("span", { className: "details" }, "Kaufpreis"))),
535
+ React.createElement("span", { className: "text-dark value col-lg-4 col-md-4 col-sm-6 text-truncate " },
536
+ +props.property.rooms,
537
+ React.createElement("br", null),
538
+ React.createElement("span", { className: "details" },
539
+ " ",
540
+ React.createElement("span", null, "Zimmer"))),
541
+ React.createElement("span", { className: "text-dark value col-lg-3 col-md-3 col-sm-4 text-truncate " },
542
+ +props.property.bathrooms,
543
+ React.createElement("br", null),
544
+ React.createElement("span", { className: "details" },
545
+ React.createElement("span", null, "Bad"))),
546
+ React.createElement("span", { className: "text-dark value col-lg-6 col-md-5 col-sm-7 me-3" },
547
+ props.property.usableArea,
548
+ " m\u00B2",
549
+ React.createElement("br", null),
550
+ React.createElement("span", { className: "details" },
551
+ React.createElement("span", null, "Wohnfl\u00E4che")))),
552
+ React.createElement("div", { className: "labelTopClass d-flex top-0 start-0 col-sm-5 col-lg-8 " },
553
+ React.createElement("div", { className: " align-items-center d-flex flex-row gap-2" },
554
+ props.property.historicalProtection && (React.createElement("label", { className: "thirdLabels justify-content-center align-items-center" },
555
+ React.createElement("span", { className: "layersText " }, "Denkmalschutz"))),
556
+ props.property.basement && (React.createElement("label", { className: "secondLabel justify-content-center align-items-center" },
557
+ React.createElement("span", { className: "layersText " }, "Keller"))),
558
+ props.property.balcony && (React.createElement("label", { className: "secondLabel justify-content-center align-items-center" },
559
+ React.createElement("span", { className: "layersText " }, "Balkon"))))),
560
+ React.createElement("div", { className: "d-flex flex-row align-items-center gap-2" },
561
+ props.property.terrace && (React.createElement("label", { className: "thirdLabels justify-content-center align-items-center " },
562
+ React.createElement("span", { className: "layersText" }, "Terrace"))),
563
+ React.createElement("div", { className: "d-flex " }, props.property.guestBathroom && (React.createElement("label", { className: "col-1 thirdLabels justify-content-center align-items-center " },
564
+ React.createElement("span", { className: "layersText " }, "Gäste-WC"))))),
565
+ React.createElement("div", { className: "Frame-136 d-flex flex-row" },
566
+ React.createElement("div", { className: "d-flex flex-column col-5 justify-content-between" },
567
+ React.createElement("span", { className: "h4" },
568
+ React.createElement("strong", null, "McGrath"),
569
+ " ")),
570
+ React.createElement("div", { className: "d-flex flex-column justify-content-between" },
571
+ React.createElement("span", null,
572
+ React.createElement("strong", null, "Herr John McGrath"),
573
+ " "),
574
+ React.createElement("span", null, "McGrath"),
575
+ React.createElement("button", { className: "kontactbutton text-light ", onClick: handleMessagPopUp, role: "button" },
576
+ React.createElement("span", { className: "kontact-button-text" }, "Kontakt aufnehmen "))))),
577
+ floorPlan && (React.createElement(FloorPlanPopup, { contentUrl: ((_f = props.property.pictures[0]) === null || _f === void 0 ? void 0 : _f.contentUrl) || noImageIcon, onCloseClick: function () { return setFloorPlan(false); } })),
578
+ sharePopUp && React.createElement(SharePopup, { onClick: function () { return setSharePopUp(false); } })));
579
+ }
580
+
439
581
  // Utility function to show a toast
440
582
  var showToast = function (message, type) {
441
583
  if (type === void 0) { type = "info"; }
@@ -443,5 +585,5 @@ var showToast = function (message, type) {
443
585
  };
444
586
  var ToastWrapper = function () { return (React.createElement(ToastContainer, { position: "top-right", autoClose: 5000, hideProgressBar: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })); };
445
587
 
446
- export { Button, FloorPlanPopup, Popup, PropertyCard, PropertyDetailsHeader, PropertyImageList, SharePopup, ToastWrapper, formatPrice, formatPropertyArea, showToast };
588
+ export { Button, FloorPlanPopup, PropertyCard as NewPropertyCard, Popup, PropertyCard$1 as PropertyCard, PropertyDetailsHeader, PropertyImageList, SharePopup, ToastWrapper, formatPrice, formatPropertyArea, showToast };
447
589
  //# sourceMappingURL=index.es.js.map