nestiq-component-library 1.0.35 → 1.0.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.
Files changed (46) hide show
  1. package/dist/components/ImageListPopup/ImageListPopup.d.ts +1 -0
  2. package/dist/components/Popup/Popup.d.ts +1 -0
  3. package/dist/components/SharePopup/SharePopup.d.ts +4 -0
  4. package/dist/components/ToastWrapper/ToastWrapper.d.ts +4 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.es.js +25 -15
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/index.js +27 -14
  9. package/dist/index.js.map +1 -1
  10. package/package.json +4 -1
  11. package/rollup.config.mjs +35 -35
  12. package/src/assets/images/Images/left-arrow.svg +4 -4
  13. package/src/assets/images/Images/right-arrow.svg +4 -4
  14. package/src/components/ImageListPopup/ImageListPopup.css +83 -107
  15. package/src/components/ImageListPopup/ImageListPopup.tsx +142 -140
  16. package/src/components/Popup/Popup.css +0 -13
  17. package/src/components/Popup/Popup.tsx +29 -28
  18. package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +80 -84
  19. package/src/components/SharePopup/{PopUp.css → SharePopup.css} +0 -14
  20. package/src/components/SharePopup/{PopUp.tsx → SharePopup.tsx} +139 -140
  21. package/src/components/ToastWrapper/ToastWrapper.tsx +25 -0
  22. package/src/index.tsx +13 -7
  23. package/src/styles/common.css +12 -0
  24. package/dist/assets/images/Icon_rightArrow.svg +0 -3
  25. package/dist/assets/images/LayersIcon.svg +0 -5
  26. package/dist/assets/images/blackarrow-Right.svg +0 -3
  27. package/dist/assets/images/blckarrow-Left.svg +0 -3
  28. package/dist/assets/images/chevron-left.svg +0 -3
  29. package/dist/assets/images/default-property.jpg +0 -0
  30. package/dist/assets/images/heartIcon.svg +0 -3
  31. package/dist/assets/images/icon-close-white.webp +0 -0
  32. package/dist/assets/images/icon_close 2.e41bb9a4db48e048.png +0 -0
  33. package/dist/assets/images/icon_close_2.png +0 -0
  34. package/dist/assets/images/icon_gallery.svg +0 -4
  35. package/dist/assets/images/icon_map.svg +0 -10
  36. package/dist/assets/images/icon_share_1.svg +0 -3
  37. package/dist/assets/images/layer_icon.svg +0 -5
  38. package/dist/assets/images/locationIcon.svg +0 -4
  39. package/dist/assets/images/locationIconBlack.svg +0 -4
  40. package/dist/assets/images/no-image-icon.png +0 -0
  41. package/dist/components/Button/Button.js +0 -6
  42. package/dist/components/ImageListPopup/ImageListPopup.js +0 -26
  43. package/dist/components/Popup/Popup.js +0 -12
  44. package/dist/components/SharePopup/PopUp.d.ts +0 -7
  45. package/src/assets/images/close.png +0 -0
  46. package/src/assets/images/close_white.png +0 -0
@@ -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,142 @@
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/Images/icon_close 2.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/icon_close_2.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 flex-column col-6 ">
46
+ <span className="txt-white">
47
+ {props.pictureUrls[currentImageIndex].title}
48
+ </span>
49
+ <div className="d-flex align-self-end me-0 ms-5">
50
+ <img
51
+ src={iconClose}
52
+ alt="close"
53
+ className="closeIcon"
54
+ onClick={handleClose}
55
+ />
56
+ </div>
57
+
58
+ <div className="d-flex justify-content-center">
59
+ <div className="p-2 bd-highlight align-self-center align-items-center me-5">
60
+ <div
61
+ className="rounded-circle border onImageArrow start-0 d-flex "
62
+ role="button"
63
+ onClick={() => handleArrowClickInMainImage("left")}
64
+ >
65
+ <img
66
+ src={blcIconArrowLeft}
67
+ className="blackArrow align-self-center"
68
+ alt="Left Arrow"
69
+ />
70
+ </div>
71
+ </div>
72
+ <div className="p-2 bd-highlight">
73
+ <div
74
+ className=" rounded-5 mainImage "
75
+ style={{
76
+ backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
77
+ height: "350px",
78
+ width: "600px",
79
+ backgroundSize: "cover",
80
+ backgroundPosition: "center",
81
+ }}
82
+ ></div>
83
+ </div>
84
+ <div className="p-2 bd-highlight align-self-center ms-5">
85
+ {" "}
86
+ <div
87
+ role="button"
88
+ className="rounded-circle border onImageArrow d-flex justify-content-center"
89
+ onClick={() => handleArrowClickInMainImage("right")}
90
+ >
91
+ <img
92
+ src={blcIconArrowRight}
93
+ className="blackArrow align-self-center"
94
+ alt="Right Arrow"
95
+ />
96
+ </div>
97
+ </div>
98
+ </div>
99
+ <div className="d-flex flex-row">
100
+ {/* Arrows on the main image */}
101
+ </div>
102
+ <div className="d-flex flex-row gap-4 w-100 secondList ">
103
+ <div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
104
+ <div className="col-12 position-relative d-flex justify-content-center">
105
+ <div
106
+ className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
107
+ ref={imageListRef}
108
+ >
109
+ {props.pictureUrls.length > 0 && (
110
+ <div className="col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3">
111
+ {props.pictureUrls.map((picture, index) => (
112
+ <div
113
+ key={index}
114
+ className="col-lg-12 h-100 d-flex"
115
+ onClick={() => {
116
+ setCurrentImageIndex(index);
117
+ imageListRef.current!.scrollTo({
118
+ left: index * 150,
119
+ behavior: "smooth",
120
+ });
121
+ }}
122
+ role="button"
123
+ >
124
+ <img
125
+ src={picture.url}
126
+ alt={`Image ${index + 1}`}
127
+ className="col-12 h-100 rounded-3 object-fit-cover"
128
+ />
129
+ </div>
130
+ ))}
131
+ </div>
132
+ )}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ )}
140
+ </div>
141
+ );
142
+ }
@@ -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;