nestiq-component-library 1.1.0 → 1.1.2

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.
Files changed (40) hide show
  1. package/dist/assets/images/Icon_rightArrow.svg +3 -0
  2. package/dist/assets/images/LayersIcon.svg +5 -0
  3. package/dist/assets/images/blackarrow-Right.svg +3 -0
  4. package/dist/assets/images/blckarrow-Left.svg +3 -0
  5. package/dist/assets/images/chevron-left.svg +3 -0
  6. package/dist/assets/images/default-property.jpg +0 -0
  7. package/dist/assets/images/heartIcon.svg +3 -0
  8. package/dist/assets/images/icon-close-white.webp +0 -0
  9. package/dist/assets/images/icon_close 2.e41bb9a4db48e048.png +0 -0
  10. package/dist/assets/images/icon_close_2.png +0 -0
  11. package/dist/assets/images/icon_gallery.svg +4 -0
  12. package/dist/assets/images/icon_map.svg +10 -0
  13. package/dist/assets/images/icon_share_1.svg +3 -0
  14. package/dist/assets/images/layer_icon.svg +5 -0
  15. package/dist/assets/images/locationIcon.svg +4 -0
  16. package/dist/assets/images/locationIconBlack.svg +4 -0
  17. package/dist/assets/images/no-image-icon.png +0 -0
  18. package/dist/components/Button/Button.js +6 -0
  19. package/dist/components/ImageListPopup/ImageListPopup.js +26 -0
  20. package/dist/components/Popup/Popup.js +12 -0
  21. package/dist/components/PropertyDetailsHeader/PropertyDetailsHeader.d.ts +2 -2
  22. package/dist/components/SharePopup/PopUp.d.ts +7 -0
  23. package/dist/index.es.js +12 -13
  24. package/dist/index.es.js.map +1 -1
  25. package/dist/index.js +12 -13
  26. package/dist/index.js.map +1 -1
  27. package/package.json +1 -1
  28. package/rollup.config.mjs +35 -35
  29. package/src/components/FloorPlanPopup/FloorPlanPopup.css +3 -3
  30. package/src/components/FloorPlanPopup/FloorPlanPopup.tsx +83 -83
  31. package/src/components/ImageListPopup/ImageListPopup.css +83 -83
  32. package/src/components/ImageListPopup/ImageListPopup.tsx +141 -141
  33. package/src/components/Popup/Popup.tsx +29 -29
  34. package/src/components/PropertyCard/PropertyCard.tsx +136 -136
  35. package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +82 -80
  36. package/src/components/PropertyImageList/PropertyImageList.tsx +198 -198
  37. package/src/components/SharePopup/SharePopup.tsx +139 -139
  38. package/src/components/ToastWrapper/ToastWrapper.tsx +25 -25
  39. package/src/functions/util.ts +3 -3
  40. package/src/index.tsx +20 -20
@@ -1,136 +1,136 @@
1
- import React, { useState } from "react";
2
- // import { FormattedMessage } from "react-intl";
3
- import layerIcon from "../../assets/images/LayersIcon.svg";
4
- import heart from "../../assets/images/heart.svg";
5
- import locationIcon from "../../assets/images/locationIcon.svg";
6
- import "../PropertyCard/PropertyCard.css";
7
- import noImageIcon from "../../assets/images/default-property.jpg";
8
- import { formatPrice } from "../../functions/util";
9
-
10
- interface PopupProps {
11
- property: {
12
- city: string;
13
- historicalProtection: boolean;
14
- basement: boolean;
15
- balcony: boolean;
16
- terrace: boolean;
17
- guestBathroom: boolean;
18
- bathrooms: string;
19
- usableArea: string;
20
- id: string;
21
- rooms: string;
22
- evaluation?: {
23
- askingPrice: number;
24
- };
25
- pictures: { contentUrl: string }[];
26
- };
27
- onClick: any;
28
- baseUrl: string;
29
- }
30
-
31
- export default function PropertyCard(props: PopupProps) {
32
- const [liked, setLiked] = useState(false);
33
-
34
- const handleLike = () => {
35
- setLiked(!liked);
36
- };
37
- const pictureUrl =
38
- props.property.pictures && props.property.pictures.length > 0
39
- ? `${props.baseUrl}${props.property.pictures[0].contentUrl}`
40
- : noImageIcon;
41
- return (
42
- <div
43
- key={props.property.id}
44
- className="card-body me-4 mb-4 position-relative cardStyle"
45
- style={{
46
- backgroundImage: `url(${pictureUrl})`,
47
- backgroundSize: "cover",
48
- backgroundPosition: "center",
49
- }}
50
- onClick={props.onClick}
51
- role="button"
52
- >
53
- <div className="labelTopClass position-absolute top-0 start-0 col-sm-5 col-lg-8">
54
- <div className="d-flex align-items-center ms-2 mb-1 mt-2 gap-2">
55
- <label className="p-1 firstLabel d-flex flex-row justify-content-center align-items-center">
56
- <img src={layerIcon} alt="Location Icon" className="layersVector" />
57
- <span className="layersText">{"Grundriss"}</span>
58
- </label>
59
- {props.property.historicalProtection && (
60
- <label className="thirdLabels d-flex flex-row justify-content-center align-items-center">
61
- <span className="layersText p-1">{"Denkmalschutz"}</span>
62
- </label>
63
- )}
64
-
65
- {props.property.basement && (
66
- <label className="secondLabel d-flex flex-row justify-content-center align-items-center">
67
- <span className="layersText p-1">{"Keller"}</span>
68
- </label>
69
- )}
70
- </div>
71
- <div className="d-flex align-items-center ms-2 start-0 gap-2">
72
- {props.property.terrace && (
73
- <label className="p-1 thirdLabels d-flex flex-row justify-content-center align-items-center ">
74
- <span className="layersText">{"Terrace"}</span>
75
- </label>
76
- )}
77
- {props.property.balcony && (
78
- <label className="secondLabel d-flex flex-row justify-content-center align-items-center">
79
- <span className="layersText p-1">{"Balkon"}</span>
80
- </label>
81
- )}
82
-
83
- {props.property.guestBathroom && (
84
- <label className="col-1 fourthLabels d-flex flex-row justify-content-center align-items-center ">
85
- <span className="layersText p-1">{"Gäste-WC"}</span>
86
- </label>
87
- )}
88
- </div>
89
- </div>
90
- <div className="d-flex align-items-center position-absolute top-0 end-0 p-3">
91
- {/*<img*/}
92
- {/* src={heart}*/}
93
- {/* alt=" Heart Icon"*/}
94
- {/* className={`heartVector ${liked ? "liked" : ""}`}*/}
95
- {/* onClick={handleLike}*/}
96
- {/*/>*/}
97
- </div>
98
- <div className="d-flex align-items-center mb-3 position-absolute bottom-0 start-0 p-2">
99
- <span className="Price col-lg-12 col-md-12 col-sm-12 text-truncate p-1">
100
- {formatPrice(props.property?.evaluation?.askingPrice ?? 0)} €
101
- </span>
102
- </div>
103
- <div className="d-flex w-50 align-items-center position-absolute bottom-0 start-0 p-2">
104
- <img src={locationIcon} alt="Location Icon" className="Vector" />
105
- <span className="locationText text-truncate">
106
- {props.property.city || "N/A"}
107
- </span>
108
- </div>
109
- <div className="d-flex col-lg-6 col-md-6 col-sm-5 me-lg-0 me-md-0 me-sm-3 justify-content-center mb-2 position-absolute bottom-0 end-0">
110
- <span className="detail col-lg-4 col-md-4 col-sm-6 text-truncate border-end ">
111
- {+props.property.rooms}
112
- <br />
113
- {/* <FormattedMessage id="ROOMS" /> */}
114
- <span>Zimmer</span>
115
- </span>
116
- <span className="detail col-lg-3 col-md-3 col-sm-4 text-truncate ">
117
- {+props.property.bathrooms}
118
- <br />
119
- {/* <FormattedMessage
120
- id="BATHROOM"
121
- values={{ itemCount: +props.property.bathrooms }}
122
- /> */}
123
- {/* {+props.property.bathrooms} */}
124
-
125
- <span>Bäd</span>
126
- </span>
127
- <span className="detail col-lg-5 col-md-5 col-sm-7 text-truncate border-start me-3">
128
- {props.property.usableArea} m²
129
- <br />
130
- {/* <FormattedMessage id="LIVING_SPACE" /> */}
131
- <span>Wohnfläche</span>
132
- </span>
133
- </div>
134
- </div>
135
- );
136
- }
1
+ import React, { useState } from "react";
2
+ // import { FormattedMessage } from "react-intl";
3
+ import layerIcon from "../../assets/images/LayersIcon.svg";
4
+ import heart from "../../assets/images/heart.svg";
5
+ import locationIcon from "../../assets/images/locationIcon.svg";
6
+ import "../PropertyCard/PropertyCard.css";
7
+ import noImageIcon from "../../assets/images/default-property.jpg";
8
+ import { formatPrice } from "../../functions/util";
9
+
10
+ interface PopupProps {
11
+ property: {
12
+ city: string;
13
+ historicalProtection: boolean;
14
+ basement: boolean;
15
+ balcony: boolean;
16
+ terrace: boolean;
17
+ guestBathroom: boolean;
18
+ bathrooms: string;
19
+ usableArea: string;
20
+ id: string;
21
+ rooms: string;
22
+ evaluation?: {
23
+ askingPrice: number;
24
+ };
25
+ pictures: { contentUrl: string }[];
26
+ };
27
+ onClick: any;
28
+ baseUrl: string;
29
+ }
30
+
31
+ export default function PropertyCard(props: PopupProps) {
32
+ const [liked, setLiked] = useState(false);
33
+
34
+ const handleLike = () => {
35
+ setLiked(!liked);
36
+ };
37
+ const pictureUrl =
38
+ props.property.pictures && props.property.pictures.length > 0
39
+ ? `${props.baseUrl}${props.property.pictures[0].contentUrl}`
40
+ : noImageIcon;
41
+ return (
42
+ <div
43
+ key={props.property.id}
44
+ className="card-body me-4 mb-4 position-relative cardStyle"
45
+ style={{
46
+ backgroundImage: `url(${pictureUrl})`,
47
+ backgroundSize: "cover",
48
+ backgroundPosition: "center",
49
+ }}
50
+ onClick={props.onClick}
51
+ role="button"
52
+ >
53
+ <div className="labelTopClass position-absolute top-0 start-0 col-sm-5 col-lg-8">
54
+ <div className="d-flex align-items-center ms-2 mb-1 mt-2 gap-2">
55
+ <label className="p-1 firstLabel d-flex flex-row justify-content-center align-items-center">
56
+ <img src={layerIcon} alt="Location Icon" className="layersVector" />
57
+ <span className="layersText">{"Grundriss"}</span>
58
+ </label>
59
+ {props.property.historicalProtection && (
60
+ <label className="thirdLabels d-flex flex-row justify-content-center align-items-center">
61
+ <span className="layersText p-1">{"Denkmalschutz"}</span>
62
+ </label>
63
+ )}
64
+
65
+ {props.property.basement && (
66
+ <label className="secondLabel d-flex flex-row justify-content-center align-items-center">
67
+ <span className="layersText p-1">{"Keller"}</span>
68
+ </label>
69
+ )}
70
+ </div>
71
+ <div className="d-flex align-items-center ms-2 start-0 gap-2">
72
+ {props.property.terrace && (
73
+ <label className="p-1 thirdLabels d-flex flex-row justify-content-center align-items-center ">
74
+ <span className="layersText">{"Terrace"}</span>
75
+ </label>
76
+ )}
77
+ {props.property.balcony && (
78
+ <label className="secondLabel d-flex flex-row justify-content-center align-items-center">
79
+ <span className="layersText p-1">{"Balkon"}</span>
80
+ </label>
81
+ )}
82
+
83
+ {props.property.guestBathroom && (
84
+ <label className="col-1 fourthLabels d-flex flex-row justify-content-center align-items-center ">
85
+ <span className="layersText p-1">{"Gäste-WC"}</span>
86
+ </label>
87
+ )}
88
+ </div>
89
+ </div>
90
+ <div className="d-flex align-items-center position-absolute top-0 end-0 p-3">
91
+ {/*<img*/}
92
+ {/* src={heart}*/}
93
+ {/* alt=" Heart Icon"*/}
94
+ {/* className={`heartVector ${liked ? "liked" : ""}`}*/}
95
+ {/* onClick={handleLike}*/}
96
+ {/*/>*/}
97
+ </div>
98
+ <div className="d-flex align-items-center mb-3 position-absolute bottom-0 start-0 p-2">
99
+ <span className="Price col-lg-12 col-md-12 col-sm-12 text-truncate p-1">
100
+ {formatPrice(props.property?.evaluation?.askingPrice ?? 0)} €
101
+ </span>
102
+ </div>
103
+ <div className="d-flex w-50 align-items-center position-absolute bottom-0 start-0 p-2">
104
+ <img src={locationIcon} alt="Location Icon" className="Vector" />
105
+ <span className="locationText text-truncate">
106
+ {props.property.city || "N/A"}
107
+ </span>
108
+ </div>
109
+ <div className="d-flex col-lg-6 col-md-6 col-sm-5 me-lg-0 me-md-0 me-sm-3 justify-content-center mb-2 position-absolute bottom-0 end-0">
110
+ <span className="detail col-lg-4 col-md-4 col-sm-6 text-truncate border-end ">
111
+ {+props.property.rooms}
112
+ <br />
113
+ {/* <FormattedMessage id="ROOMS" /> */}
114
+ <span>Zimmer</span>
115
+ </span>
116
+ <span className="detail col-lg-3 col-md-3 col-sm-4 text-truncate ">
117
+ {+props.property.bathrooms}
118
+ <br />
119
+ {/* <FormattedMessage
120
+ id="BATHROOM"
121
+ values={{ itemCount: +props.property.bathrooms }}
122
+ /> */}
123
+ {/* {+props.property.bathrooms} */}
124
+
125
+ <span>Bad</span>
126
+ </span>
127
+ <span className="detail col-lg-5 col-md-5 col-sm-7 text-truncate border-start me-3">
128
+ {props.property.usableArea} m²
129
+ <br />
130
+ {/* <FormattedMessage id="LIVING_SPACE" /> */}
131
+ <span>Wohnfläche</span>
132
+ </span>
133
+ </div>
134
+ </div>
135
+ );
136
+ }
@@ -1,80 +1,82 @@
1
- import React, { useState } from "react";
2
- // import { FormattedMessage } from "react-intl";
3
- import ShareIcon from "../../assets/images/icon_share_1.svg";
4
- import locationIcon from "../../assets/images/locationIconBlack.svg";
5
- import "./PropertyDetailsHeader.css";
6
- import SharePopup from "../SharePopup/SharePopup";
7
-
8
- export interface PopupProps {
9
- property: {
10
- city: string;
11
- constructedArea: string;
12
- rooms: string;
13
- propertyArea: string;
14
- askingPrice: string;
15
- };
16
- title: string;
17
- }
18
-
19
- export default function PropertyDetailsHeader(props: PopupProps) {
20
- const [showPopUp, setShowPopUp] = useState(false);
21
-
22
- const handlePopUp = () => {
23
- setShowPopUp(!showPopUp);
24
- };
25
-
26
- return (
27
- <div className="Pheader compact d-flex col-12 col-lg-12 position-relative mt-5 ">
28
- <div className="header_Text d-flex col-lg-7 col-md-9 mt-4 ms-4 ">
29
- <strong>{props.title ?? "-"}</strong>
30
- </div>
31
- <div className="header_Text text-truncate col-lg-6 col-md-7 d-flex flex-row position-absolute ms-4">
32
- <img src={locationIcon} className="vector me-2" alt="location Icon" />
33
-
34
- <div className="propText text-truncate col-lg-6 col-md-6 d-flex align-items-center">
35
- {props.property.city}
36
- </div>
37
- </div>
38
- <div className="d-flex col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0 mt-4">
39
- {/* <img src={Hearticon} alt="Location Icon" className="v_share me-3" /> */}
40
- <img
41
- src={ShareIcon}
42
- alt="share icon"
43
- className="v_share me-3"
44
- onClick={handlePopUp}
45
- />
46
- </div>
47
- <div className="fetch_section d-flex align-items-center flex-row col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0">
48
- {props && (
49
- <div className=" propText col-lg-3 col-md-3 h-100 d-flex align-items-center justify-content-center ">
50
- {props.property.askingPrice} <br />
51
- Kaufpreis
52
- </div>
53
- )}
54
- {props && (
55
- <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
56
- {props.property.constructedArea} <br />
57
- Wohnfläche
58
- {/* <FormattedMessage id="LIVING_SPACE" /> */}
59
- </div>
60
- )}
61
- {props && (
62
- <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
63
- {props.property.rooms} <br />
64
- Zimmer
65
- {/* <FormattedMessage id="ROOMS" /> */}
66
- </div>
67
- )}
68
- {props && (
69
- <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
70
- {props.property.propertyArea}
71
- <br />
72
- Grundstück
73
- {/* <FormattedMessage id="Grundstück" /> */}
74
- </div>
75
- )}
76
- </div>
77
- {showPopUp && <SharePopup />}
78
- </div>
79
- );
80
- }
1
+ import React, { useState } from "react";
2
+ // import { FormattedMessage } from "react-intl";
3
+ import ShareIcon from "../../assets/images/icon_share_1.svg";
4
+ import locationIcon from "../../assets/images/locationIconBlack.svg";
5
+ import "./PropertyDetailsHeader.css";
6
+ import SharePopup from "../SharePopup/SharePopup";
7
+ import { formatPrice } from "../../functions/util";
8
+
9
+ export interface PopupProps {
10
+ property: {
11
+ city: string;
12
+ constructedArea: string;
13
+ rooms: string;
14
+ propertyArea: number;
15
+ askingPrice: number;
16
+ };
17
+ title: string;
18
+ }
19
+
20
+ export default function PropertyDetailsHeader(props: PopupProps) {
21
+ const [showPopUp, setShowPopUp] = useState(false);
22
+
23
+ const handlePopUp = () => {
24
+ setShowPopUp(!showPopUp);
25
+ };
26
+
27
+ return (
28
+ <div className="Pheader compact d-flex col-12 col-lg-12 position-relative mt-5 ">
29
+ <div className="header_Text d-flex col-lg-7 col-md-9 mt-4 ms-4 ">
30
+ <strong>{props.title ?? "-"}</strong>
31
+ </div>
32
+ <div className="header_Text text-truncate col-lg-6 col-md-7 d-flex flex-row position-absolute ms-4">
33
+ <img src={locationIcon} className="vector me-2" alt="location Icon" />
34
+
35
+ <div className="propText text-truncate col-lg-6 col-md-6 d-flex align-items-center">
36
+ {props.property.city}
37
+ </div>
38
+ </div>
39
+ <div className="d-flex col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0 mt-4">
40
+ {/* <img src={Hearticon} alt="Location Icon" className="v_share me-3" /> */}
41
+ <img
42
+ src={ShareIcon}
43
+ alt="share icon"
44
+ className="v_share me-3"
45
+ onClick={handlePopUp}
46
+ />
47
+ </div>
48
+ <div className="fetch_section d-flex align-items-center flex-row col-lg-5 col-md-6 col-sm-5 justify-content-end position-absolute end-0">
49
+ {props && (
50
+ <div className=" propText col-lg-3 col-md-3 h-100 d-flex align-items-center justify-content-center ">
51
+ {formatPrice(props.property?.askingPrice ?? 0)}
52
+ <br />
53
+ Kaufpreis
54
+ </div>
55
+ )}
56
+ {props && (
57
+ <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
58
+ {props.property.constructedArea} <br />
59
+ Wohnfläche
60
+ {/* <FormattedMessage id="LIVING_SPACE" /> */}
61
+ </div>
62
+ )}
63
+ {props && (
64
+ <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
65
+ {props.property.rooms} <br />
66
+ Zimmer
67
+ {/* <FormattedMessage id="ROOMS" /> */}
68
+ </div>
69
+ )}
70
+ {props && (
71
+ <div className="propText col-lg-3 col-md-3 d-flex h-100 align-items-center justify-content-center">
72
+ {formatPrice(props.property.propertyArea)} m²
73
+ <br />
74
+ Grundstück
75
+ {/* <FormattedMessage id="Grundstück" /> */}
76
+ </div>
77
+ )}
78
+ </div>
79
+ {showPopUp && <SharePopup />}
80
+ </div>
81
+ );
82
+ }