pixelize-design-library 2.1.40 → 2.1.41

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.
@@ -84,14 +84,25 @@ var ProductPrice = function (_a) {
84
84
  return Math.round(option.price - (option.price * option.offer) / 100);
85
85
  };
86
86
  (0, react_1.useEffect)(function () {
87
- if (isOpen && buttonRef.current) {
88
- var rect = buttonRef.current.getBoundingClientRect();
89
- setDropdownPosition({
90
- top: rect.bottom + window.scrollY,
91
- left: rect.left + window.scrollX,
92
- width: rect.width,
93
- });
87
+ var updatePosition = function () {
88
+ if (buttonRef.current) {
89
+ var rect = buttonRef.current.getBoundingClientRect();
90
+ setDropdownPosition({
91
+ top: rect.bottom + window.scrollY,
92
+ left: rect.left + window.scrollX,
93
+ width: rect.width
94
+ });
95
+ }
96
+ };
97
+ if (isOpen) {
98
+ updatePosition();
99
+ window.addEventListener("resize", updatePosition);
100
+ window.addEventListener("scroll", updatePosition, true); // listen to scroll of any container
94
101
  }
102
+ return function () {
103
+ window.removeEventListener("resize", updatePosition);
104
+ window.removeEventListener("scroll", updatePosition, true);
105
+ };
95
106
  }, [isOpen]);
96
107
  return (react_1.default.createElement(react_1.default.Fragment, null,
97
108
  isSingleOption ? (react_1.default.createElement(react_2.Box, { border: "0.063rem solid", borderColor: "red.300", bg: "#fff5f5", px: cfg.px, py: cfg.py, rounded: "md", display: "inline-block", w: "100%" },
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var ProductCard_1 = __importDefault(require("../Components/ProductCard/ProductCard"));
8
+ var react_2 = require("@chakra-ui/react");
8
9
  var productCaard = function () {
9
10
  var option = [{
10
11
  label: "100 G",
@@ -103,7 +104,97 @@ var productCaard = function () {
103
104
  // }}
104
105
  // />
105
106
  // </div>
106
- react_1.default.createElement("div", { style: { display: "flex", justifyContent: "space-between" } },
107
+ react_1.default.createElement(react_2.SimpleGrid, { columns: { base: 1, sm: 2, md: 3, lg: 4 }, spacing: 6 },
108
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
109
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
110
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
111
+ },
112
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
113
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
114
+ label: "Special",
115
+ color: "red",
116
+ } }),
117
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
118
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
119
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
120
+ },
121
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
122
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
123
+ label: "Special",
124
+ color: "red",
125
+ } }),
126
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
127
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
128
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
129
+ },
130
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
131
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
132
+ label: "Special",
133
+ color: "red",
134
+ } }),
135
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
136
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
137
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
138
+ },
139
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
140
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
141
+ label: "Special",
142
+ color: "red",
143
+ } }),
144
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
145
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
146
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
147
+ },
148
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
149
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
150
+ label: "Special",
151
+ color: "red",
152
+ } }),
153
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
154
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
155
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
156
+ },
157
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
158
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
159
+ label: "Special",
160
+ color: "red",
161
+ } }),
162
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
163
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
164
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
165
+ },
166
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
167
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
168
+ label: "Special",
169
+ color: "red",
170
+ } }),
171
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
172
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
173
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
174
+ },
175
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
176
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
177
+ label: "Special",
178
+ color: "red",
179
+ } }),
180
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
181
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
182
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
183
+ },
184
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
185
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
186
+ label: "Special",
187
+ color: "red",
188
+ } }),
189
+ react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
190
+ visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
191
+ hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
192
+ },
193
+ // tags={['Melt in Mouth', 'Authentic Taste', 'No Preservatives']}
194
+ rating: 4.76, reviews: 596, options: option, size: "xs", onAddToCart: function () { }, onClick: function () { }, batch: {
195
+ label: "Special",
196
+ color: "red",
197
+ } }),
107
198
  react_1.default.createElement(ProductCard_1.default, { label: "Ghee Mysorepaku (Soft)", description: "Special Ghee mysorepaku", productImage: {
108
199
  visibile: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754538444/main_service/1754538444014-GM-Back%20%284%29.png",
109
200
  hover: "https://res.cloudinary.com/drmkh6z50/image/upload/v1754573075/main_service/1754573075361-istockphoto-1054228718-612x612.jpg",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.1.40",
3
+ "version": "2.1.41",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",