nestiq-component-library 1.0.46 → 1.1.0

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 (74) hide show
  1. package/dist/components/FloorPlanPopup/FloorPlanPopup.d.ts +7 -0
  2. package/dist/components/ImageListPopup/ImageListPopup.d.ts +1 -0
  3. package/dist/components/Popup/Popup.d.ts +1 -0
  4. package/dist/components/PropertyCard/PropertyCard.d.ts +4 -3
  5. package/dist/components/PropertyImageList/PropertyImageList.d.ts +1 -0
  6. package/dist/components/SharePopup/SharePopup.d.ts +4 -0
  7. package/dist/components/ToastWrapper/ToastWrapper.d.ts +4 -0
  8. package/dist/functions/util.d.ts +1 -0
  9. package/dist/index.d.ts +5 -0
  10. package/dist/index.es.js +105 -36
  11. package/dist/index.es.js.map +1 -1
  12. package/dist/index.js +108 -34
  13. package/dist/index.js.map +1 -1
  14. package/package.json +4 -1
  15. package/rollup.config.mjs +35 -35
  16. package/src/components/FloorPlanPopup/FloorPlanPopup.css +3 -0
  17. package/src/components/FloorPlanPopup/FloorPlanPopup.tsx +83 -0
  18. package/src/components/ImageListPopup/ImageListPopup.css +83 -107
  19. package/src/components/ImageListPopup/ImageListPopup.tsx +141 -140
  20. package/src/components/Popup/Popup.css +0 -13
  21. package/src/components/Popup/Popup.tsx +29 -28
  22. package/src/components/PropertyCard/PropertyCard.css +6 -5
  23. package/src/components/PropertyCard/PropertyCard.tsx +136 -135
  24. package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +80 -84
  25. package/src/components/PropertyImageList/PropertyImageList.tsx +198 -173
  26. package/src/components/SharePopup/{PopUp.css → SharePopup.css} +0 -14
  27. package/src/components/SharePopup/{PopUp.tsx → SharePopup.tsx} +139 -140
  28. package/src/components/ToastWrapper/ToastWrapper.tsx +25 -0
  29. package/src/functions/util.ts +3 -0
  30. package/src/index.tsx +20 -7
  31. package/src/styles/common.css +12 -0
  32. package/dist/assets/images/Icon_rightArrow.svg +0 -3
  33. package/dist/assets/images/LayersIcon.svg +0 -5
  34. package/dist/assets/images/blackarrow-Right.svg +0 -3
  35. package/dist/assets/images/blckarrow-Left.svg +0 -3
  36. package/dist/assets/images/chevron-left.svg +0 -3
  37. package/dist/assets/images/default-property.jpg +0 -0
  38. package/dist/assets/images/heartIcon.svg +0 -3
  39. package/dist/assets/images/icon-close-white.webp +0 -0
  40. package/dist/assets/images/icon_close 2.e41bb9a4db48e048.png +0 -0
  41. package/dist/assets/images/icon_close_2.png +0 -0
  42. package/dist/assets/images/icon_gallery.svg +0 -4
  43. package/dist/assets/images/icon_map.svg +0 -10
  44. package/dist/assets/images/icon_share_1.svg +0 -3
  45. package/dist/assets/images/layer_icon.svg +0 -5
  46. package/dist/assets/images/locationIcon.svg +0 -4
  47. package/dist/assets/images/locationIconBlack.svg +0 -4
  48. package/dist/assets/images/no-image-icon.png +0 -0
  49. package/dist/components/Button/Button.js +0 -6
  50. package/dist/components/ImageListPopup/ImageListPopup.js +0 -26
  51. package/dist/components/Popup/Popup.js +0 -12
  52. package/dist/components/SharePopup/PopUp.d.ts +0 -7
  53. package/src/assets/images/Logo-Nestiq_black.svg +0 -7
  54. package/src/assets/images/arrow-right-short.svg +0 -3
  55. package/src/assets/images/arrow-right.svg +0 -10
  56. package/src/assets/images/close_white.png +0 -0
  57. package/src/assets/images/dropdownIcon.svg +0 -16
  58. package/src/assets/images/facebook_icon.svg +0 -3
  59. package/src/assets/images/google_icon.svg +0 -10
  60. package/src/assets/images/heartIcon.svg +0 -3
  61. package/src/assets/images/icon-close-white.webp +0 -0
  62. package/src/assets/images/icon_checkmark.svg +0 -10
  63. package/src/assets/images/icon_close 2.png +0 -0
  64. package/src/assets/images/icon_share 1.svg +0 -3
  65. package/src/assets/images/icon_user.png +0 -0
  66. package/src/assets/images/left arrow.svg +0 -16
  67. package/src/assets/images/left-arrow.svg +0 -4
  68. package/src/assets/images/mail-icon.png +0 -0
  69. package/src/assets/images/no-image-icon.png +0 -0
  70. package/src/assets/images/right arrow.svg +0 -16
  71. package/src/assets/images/right-arrow.svg +0 -4
  72. package/src/assets/images/warning.svg +0 -11
  73. package/src/assets/images/x.svg +0 -3
  74. package/src/components/PropertyCard/PropertyDaet.json +0 -1210
@@ -1,107 +1,83 @@
1
- .popup-overlay {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- background-color: rgba(0, 0, 0, 0.7);
8
- display: flex;
9
- justify-content: center;
10
- align-items: center;
11
- z-index: 10000;
12
- }
13
-
14
- .popup-container {
15
- background-color: transparent;
16
- border-radius: 8px;
17
- max-width: 90%;
18
- max-height: 90%;
19
- display: flex;
20
- flex-direction: column;
21
- align-items: center;
22
- position: relative;
23
- }
24
-
25
- .popup-header {
26
- display: flex;
27
- justify-content: center;
28
- align-items: center;
29
- width: 100%;
30
- padding: 1rem;
31
- position: absolute;
32
- top: 0;
33
- }
34
-
35
- .popup-title {
36
- color: white;
37
- font-size: 24px;
38
- font-weight: bold;
39
- }
40
-
41
- .btn-close {
42
- position: absolute;
43
- right: 1rem;
44
- top: 1rem;
45
- background: none;
46
- border: none;
47
- color: white;
48
- font-size: 24px;
49
- cursor: pointer;
50
- }
51
-
52
- .popup-body {
53
- display: flex;
54
- justify-content: center;
55
- align-items: center;
56
- padding: 1rem;
57
- position: relative;
58
- flex: 1;
59
- }
60
-
61
- .main-image {
62
- max-width: 100%;
63
- max-height: 80vh;
64
- border-radius: 8px;
65
- }
66
-
67
- .btn-prev,
68
- .btn-next {
69
- background: none;
70
- border: none;
71
- color: white;
72
- font-size: 48px;
73
- cursor: pointer;
74
- position: absolute;
75
- top: 50%;
76
- transform: translateY(-50%);
77
- }
78
-
79
- .btn-prev {
80
- left: 10px;
81
- }
82
-
83
- .btn-next {
84
- right: 10px;
85
- }
86
-
87
- .popup-thumbnails {
88
- display: flex;
89
- justify-content: center;
90
- align-items: center;
91
- gap: 10px;
92
- padding: 1rem;
93
- }
94
-
95
- .thumbnail {
96
- width: 60px;
97
- height: 60px;
98
- object-fit: cover;
99
- border-radius: 8px;
100
- cursor: pointer;
101
- opacity: 0.6;
102
- }
103
-
104
- .thumbnail.active {
105
- border: 2px solid white;
106
- opacity: 1;
107
- }
1
+ .popup-header {
2
+ display: flex;
3
+ justify-content: center;
4
+ align-items: center;
5
+ width: 100%;
6
+ padding: 1rem;
7
+ position: absolute;
8
+ top: 0;
9
+ }
10
+
11
+ .popup-title {
12
+ color: white;
13
+ font-size: 24px;
14
+ font-weight: bold;
15
+ }
16
+
17
+ .btn-close {
18
+ position: absolute;
19
+ right: 1rem;
20
+ top: 1rem;
21
+ background: none;
22
+ border: none;
23
+ color: white;
24
+ font-size: 24px;
25
+ cursor: pointer;
26
+ }
27
+
28
+ .popup-body {
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ padding: 1rem;
33
+ position: relative;
34
+ flex: 1;
35
+ }
36
+
37
+ .main-image {
38
+ max-width: 100%;
39
+ max-height: 80vh;
40
+ border-radius: 8px;
41
+ }
42
+
43
+ .btn-prev,
44
+ .btn-next {
45
+ background: none;
46
+ border: none;
47
+ color: white;
48
+ font-size: 48px;
49
+ cursor: pointer;
50
+ position: absolute;
51
+ top: 50%;
52
+ transform: translateY(-50%);
53
+ }
54
+
55
+ .btn-prev {
56
+ left: 10px;
57
+ }
58
+
59
+ .btn-next {
60
+ right: 10px;
61
+ }
62
+
63
+ .popup-thumbnails {
64
+ display: flex;
65
+ justify-content: center;
66
+ align-items: center;
67
+ gap: 10px;
68
+ padding: 1rem;
69
+ }
70
+
71
+ .thumbnail {
72
+ width: 60px;
73
+ height: 60px;
74
+ object-fit: cover;
75
+ border-radius: 8px;
76
+ cursor: pointer;
77
+ opacity: 0.6;
78
+ }
79
+
80
+ .thumbnail.active {
81
+ border: 2px solid white;
82
+ opacity: 1;
83
+ }
@@ -1,140 +1,141 @@
1
- import "./ImageListPopup.css";
2
- import React, { useRef, useState } from "react";
3
- import blcIconArrowRight from "../../assets/Images/blackarrow-Right.svg";
4
- import blcIconArrowLeft from "../../assets/Images/blckarrow-Left.svg";
5
- import iconClose from "../../assets/images/close.png";
6
-
7
- interface PopupProps {
8
- pictureUrls: { title: string; url: string }[];
9
- }
10
-
11
- export default function ImageListPopup(props: PopupProps) {
12
- const [showPopUp, setShowPopUp] = useState(true);
13
- const [currentImageIndex, setCurrentImageIndex] = useState(0);
14
- const imageListRef = useRef<HTMLDivElement | null>(null);
15
-
16
- const handleArrowClickInMainImage = (direction: any) => {
17
- if (props.pictureUrls.length === 0) return;
18
-
19
- let newIndex = currentImageIndex;
20
- if (direction === "left") {
21
- newIndex =
22
- (currentImageIndex - 1 + props.pictureUrls.length) %
23
- props.pictureUrls.length;
24
- } else if (direction === "right") {
25
- newIndex = (currentImageIndex + 1) % props.pictureUrls.length;
26
- }
27
-
28
- setCurrentImageIndex(newIndex);
29
-
30
- imageListRef.current!.scrollTo({
31
- left: newIndex * 150,
32
- behavior: "smooth",
33
- });
34
- };
35
-
36
- const handleClose = () => {
37
- setShowPopUp(false);
38
- };
39
-
40
- return (
41
- <div>
42
- {showPopUp && (
43
- <div className="popup-overlay">
44
- <div className=" d-flex w-50 flex-column col-6 ">
45
- <div className="d-flex align-self-end me-5 mt-5">
46
- <img
47
- src={iconClose}
48
- alt="close"
49
- className="closeIcon mt-5"
50
- onClick={handleClose}
51
- />
52
- </div>
53
- <span className="text-white align-self-center">
54
- {props.pictureUrls[currentImageIndex].title}
55
- </span>
56
- <div className="d-flex justify-content-center">
57
- <div className="p-2 bd-highlight align-self-center align-items-center me-5">
58
- <div
59
- className="rounded-circle border onImageArrow start-0 d-flex "
60
- role="button"
61
- onClick={() => handleArrowClickInMainImage("left")}
62
- >
63
- <img
64
- src={blcIconArrowLeft}
65
- className="blackArrow align-self-center"
66
- alt="Left Arrow"
67
- />
68
- </div>
69
- </div>
70
- <div className="p-2 bd-highlight">
71
- <div
72
- className=" rounded-5 mainImage "
73
- style={{
74
- backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
75
- height: "350px",
76
- width: "600px",
77
- backgroundSize: "cover",
78
- backgroundPosition: "center",
79
- }}
80
- ></div>
81
- </div>
82
- <div className="p-2 bd-highlight align-self-center ms-5">
83
- {" "}
84
- <div
85
- role="button"
86
- className="rounded-circle border onImageArrow d-flex justify-content-center"
87
- onClick={() => handleArrowClickInMainImage("right")}
88
- >
89
- <img
90
- src={blcIconArrowRight}
91
- className="blackArrow align-self-center"
92
- alt="Right Arrow"
93
- />
94
- </div>
95
- </div>
96
- </div>
97
- <div className="d-flex flex-row">
98
- {/* Arrows on the main image */}
99
- </div>
100
- <div className="d-flex flex-row gap-4 w-100 secondList ">
101
- <div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
102
- <div className="col-12 position-relative d-flex justify-content-center">
103
- <div
104
- className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
105
- ref={imageListRef}
106
- >
107
- {props.pictureUrls.length > 0 && (
108
- <div className="col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3">
109
- {props.pictureUrls.map((picture, index) => (
110
- <div
111
- key={index}
112
- className="col-lg-12 h-100 d-flex"
113
- onClick={() => {
114
- setCurrentImageIndex(index);
115
- imageListRef.current!.scrollTo({
116
- left: index * 150,
117
- behavior: "smooth",
118
- });
119
- }}
120
- role="button"
121
- >
122
- <img
123
- src={picture.url}
124
- alt={`Image ${index + 1}`}
125
- className="col-12 h-100 rounded-3 object-fit-cover"
126
- />
127
- </div>
128
- ))}
129
- </div>
130
- )}
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
- </div>
136
- </div>
137
- )}
138
- </div>
139
- );
140
- }
1
+ import "./ImageListPopup.css";
2
+ import React, { useRef, useState } from "react";
3
+ import blcIconArrowRight from "../../assets/images/blackarrow-Right.svg";
4
+ import blcIconArrowLeft from "../../assets/images/blckarrow-Left.svg";
5
+ import iconClose from "../../assets/images/close.png";
6
+ import "../../styles/common.css";
7
+
8
+ interface PopupProps {
9
+ pictureUrls: { title: string; url: string }[];
10
+ }
11
+
12
+ export default function ImageListPopup(props: PopupProps) {
13
+ const [showPopUp, setShowPopUp] = useState(true);
14
+ const [currentImageIndex, setCurrentImageIndex] = useState(0);
15
+ const imageListRef = useRef<HTMLDivElement | null>(null);
16
+
17
+ const handleArrowClickInMainImage = (direction: any) => {
18
+ if (props.pictureUrls.length === 0) return;
19
+
20
+ let newIndex = currentImageIndex;
21
+ if (direction === "left") {
22
+ newIndex =
23
+ (currentImageIndex - 1 + props.pictureUrls.length) %
24
+ props.pictureUrls.length;
25
+ } else if (direction === "right") {
26
+ newIndex = (currentImageIndex + 1) % props.pictureUrls.length;
27
+ }
28
+
29
+ setCurrentImageIndex(newIndex);
30
+
31
+ imageListRef.current!.scrollTo({
32
+ left: newIndex * 150,
33
+ behavior: "smooth",
34
+ });
35
+ };
36
+
37
+ const handleClose = () => {
38
+ setShowPopUp(false);
39
+ };
40
+
41
+ return (
42
+ <div>
43
+ {showPopUp && (
44
+ <div className="popup-overlay">
45
+ <div className=" d-flex w-50 flex-column col-6 ">
46
+ <div className="d-flex align-self-end me-5 mt-5">
47
+ <img
48
+ src={iconClose}
49
+ alt="close"
50
+ className="closeIcon mt-5"
51
+ onClick={handleClose}
52
+ />
53
+ </div>
54
+ <span className="text-white align-self-center">
55
+ {props.pictureUrls[currentImageIndex].title}
56
+ </span>
57
+ <div className="d-flex justify-content-center">
58
+ <div className="p-2 bd-highlight align-self-center align-items-center me-5">
59
+ <div
60
+ className="rounded-circle border onImageArrow start-0 d-flex "
61
+ role="button"
62
+ onClick={() => handleArrowClickInMainImage("left")}
63
+ >
64
+ <img
65
+ src={blcIconArrowLeft}
66
+ className="blackArrow align-self-center"
67
+ alt="Left Arrow"
68
+ />
69
+ </div>
70
+ </div>
71
+ <div className="p-2 bd-highlight">
72
+ <div
73
+ className=" rounded-5 mainImage "
74
+ style={{
75
+ backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
76
+ height: "350px",
77
+ width: "600px",
78
+ backgroundSize: "cover",
79
+ backgroundPosition: "center",
80
+ }}
81
+ ></div>
82
+ </div>
83
+ <div className="p-2 bd-highlight align-self-center ms-5">
84
+ {" "}
85
+ <div
86
+ role="button"
87
+ className="rounded-circle border onImageArrow d-flex justify-content-center"
88
+ onClick={() => handleArrowClickInMainImage("right")}
89
+ >
90
+ <img
91
+ src={blcIconArrowRight}
92
+ className="blackArrow align-self-center"
93
+ alt="Right Arrow"
94
+ />
95
+ </div>
96
+ </div>
97
+ </div>
98
+ <div className="d-flex flex-row">
99
+ {/* Arrows on the main image */}
100
+ </div>
101
+ <div className="d-flex flex-row gap-4 w-100 secondList ">
102
+ <div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
103
+ <div className="col-12 position-relative d-flex justify-content-center">
104
+ <div
105
+ className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
106
+ ref={imageListRef}
107
+ >
108
+ {props.pictureUrls.length > 0 && (
109
+ <div className="col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3">
110
+ {props.pictureUrls.map((picture, index) => (
111
+ <div
112
+ key={index}
113
+ className="col-lg-12 h-100 d-flex"
114
+ onClick={() => {
115
+ setCurrentImageIndex(index);
116
+ imageListRef.current!.scrollTo({
117
+ left: index * 150,
118
+ behavior: "smooth",
119
+ });
120
+ }}
121
+ role="button"
122
+ >
123
+ <img
124
+ src={picture.url}
125
+ alt={`Image ${index + 1}`}
126
+ className="col-12 h-100 rounded-3 object-fit-cover"
127
+ />
128
+ </div>
129
+ ))}
130
+ </div>
131
+ )}
132
+ </div>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ )}
139
+ </div>
140
+ );
141
+ }
@@ -1,16 +1,3 @@
1
- .popup-overlay {
2
- position: fixed; /* Fixed position to cover the whole screen */
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
8
- display: flex; /* Flexbox to center the popup */
9
- justify-content: center; /* Center horizontally */
10
- align-items: center; /* Center vertically */
11
- z-index: 10000; /* Ensure it's above other content */
12
- }
13
-
14
1
  .popUpHeader {
15
2
  height: 48px;
16
3
  font-size: 32px;
@@ -1,28 +1,29 @@
1
- import React from "react";
2
- import closeIcon from "../../assets/images/icon_close_2.png";
3
- import "./Popup.css";
4
-
5
- interface PopupProps {
6
- children: React.ReactNode;
7
- onCloseClick: () => void;
8
- }
9
-
10
- const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
11
- return (
12
- <div className="popup-overlay">
13
- <div className="shareSection col-12 d-flex position-relative flex-column mx-auto justify-content-center col-5 col-lg-6 d-flex gap-4">
14
- <div className="end-0 top-0 position-absolute ">
15
- <img
16
- src={closeIcon}
17
- alt="close"
18
- className="closeIcon me-2"
19
- onClick={onCloseClick}
20
- />
21
- </div>
22
- {children}
23
- </div>
24
- </div>
25
- );
26
- };
27
-
28
- export default Popup;
1
+ import React from "react";
2
+ import closeIcon from "../../assets/images/icon_close_2.png";
3
+ import "./Popup.css";
4
+ import "../../styles/common.css";
5
+
6
+ interface PopupProps {
7
+ children: React.ReactNode;
8
+ onCloseClick: () => void;
9
+ }
10
+
11
+ const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
12
+ return (
13
+ <div className="popup-overlay">
14
+ <div className="shareSection col-12 d-flex position-relative flex-column mx-auto justify-content-center col-5 col-lg-6 d-flex gap-4">
15
+ <div className="end-0 top-0 position-absolute ">
16
+ <img
17
+ src={closeIcon}
18
+ alt="close"
19
+ className="closeIcon me-2"
20
+ onClick={onCloseClick}
21
+ />
22
+ </div>
23
+ {children}
24
+ </div>
25
+ </div>
26
+ );
27
+ };
28
+
29
+ export default Popup;
@@ -28,9 +28,9 @@
28
28
  background-color: #fff;
29
29
  }
30
30
 
31
- .thirdLabel {
32
- padding: 8px;
33
- width: 130px;
31
+ .thirdLabels {
32
+ padding: 4px;
33
+ width: 110px;
34
34
  height: 25px;
35
35
  border-radius: 16px;
36
36
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
@@ -38,8 +38,9 @@
38
38
  background-color: #fff;
39
39
  }
40
40
 
41
- .fourthLabel {
42
- padding: 6px;
41
+ .fourthLabels {
42
+ padding: 2px;
43
+
43
44
  width: 100px;
44
45
  height: 25px;
45
46
  border-radius: 16px;