pixelize-design-library 2.2.63 → 2.2.74

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,31 @@
1
+ import React from 'react';
2
+ import { useCustomTheme } from "../Theme/useCustomTheme";
3
+
4
+ const DefaultLogo = () => {
5
+ const theme = useCustomTheme();
6
+ return (
7
+ <svg
8
+ width="12.09"
9
+ height="15.95"
10
+ viewBox="0 0 31 29"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ >
14
+ <path
15
+ d="M30.4999 6.26137V7.81058H15.9761H14.8787V22.8508V28.8862H12.5226C9.6824 28.8862 7.32632 26.4656 7.06812 23.3995C7.06812 23.2381 7.06812 23.0444 7.06812 22.8508V18.3323C7.06812 18.2677 7.06812 18.2032 7.06812 18.1063V15.5889V6.2291C7.06812 2.80793 9.84378 -5.72205e-06 13.2972 -5.72205e-06H24.8517C28.0147 0.355021 30.4676 3.00158 30.4676 6.2291L30.4999 6.26137Z"
16
+ fill={theme.colors.black}
17
+ />
18
+ <path
19
+ d="M7.10053 23.3672H7.03598C5.16402 23.2381 3.48571 22.4635 2.25926 21.3338C0.871428 20.0428 0 18.2677 0 16.3312V15.6211H7.06825V18.1386C7.06825 18.2032 7.06825 18.2677 7.06825 18.3645V22.883C7.06825 23.0767 7.06825 23.2381 7.06825 23.4317L7.10053 23.3672Z"
20
+ fill={theme.colors.black}
21
+ />
22
+ <path
23
+ d="M30.4678 12.0063V15.6211V17.1703C30.4678 20.6238 26.272 23.3994 21.0757 23.3994H14.8789V22.8508V15.6211H22.6572V7.81056C22.6895 7.81056 30.5001 7.81056 30.5001 7.81056V11.5868C30.5001 11.7159 30.5001 11.8772 30.5001 12.0063H30.4678Z"
24
+ fill={theme.colors.black}
25
+ />
26
+ </svg>
27
+
28
+ )
29
+ };
30
+
31
+ export default DefaultLogo;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ProductCardProps } from "./ProductCardProps";
3
- declare const ProductCard: ({ id, label, productImage, rating, reviews, tags, options, button, batch, description, avalabilitys, onAddToCart, onClick, size, }: ProductCardProps) => React.JSX.Element;
3
+ declare const ProductCard: ({ id, label, productImage, rating, reviews, tags, options, button, batch, description, avalabilitys, onAddToCart, onClick, addToCart, goToCart, OnGoToCart, size, }: ProductCardProps) => React.JSX.Element;
4
4
  export default ProductCard;
@@ -36,7 +36,7 @@ var ProductLabel_1 = __importDefault(require("./ProductLabel"));
36
36
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
37
37
  var ProductCard = function (_a) {
38
38
  var _b;
39
- var id = _a.id, label = _a.label, productImage = _a.productImage, rating = _a.rating, reviews = _a.reviews, tags = _a.tags, options = _a.options, button = _a.button, batch = _a.batch, description = _a.description, avalabilitys = _a.avalabilitys, onAddToCart = _a.onAddToCart, onClick = _a.onClick, _c = _a.size, size = _c === void 0 ? "sm" : _c;
39
+ var id = _a.id, label = _a.label, productImage = _a.productImage, rating = _a.rating, reviews = _a.reviews, tags = _a.tags, options = _a.options, button = _a.button, batch = _a.batch, description = _a.description, avalabilitys = _a.avalabilitys, onAddToCart = _a.onAddToCart, onClick = _a.onClick, addToCart = _a.addToCart, goToCart = _a.goToCart, OnGoToCart = _a.OnGoToCart, _c = _a.size, size = _c === void 0 ? "sm" : _c;
40
40
  var _d = (0, react_1.useState)(false), hover = _d[0], setHover = _d[1];
41
41
  var theme = (0, useCustomTheme_1.useCustomTheme)();
42
42
  var sizeStyles = {
@@ -73,6 +73,7 @@ var ProductCard = function (_a) {
73
73
  tags && react_1.default.createElement(ProductTags_1.default, { tags: tags, size: size }),
74
74
  options && react_1.default.createElement(ProductPrice_1.default, { options: options, size: size }),
75
75
  (button === null || button === void 0 ? void 0 : button.onClick) && (react_1.default.createElement(Button_1.default, { colorScheme: "red", size: safeSize, width: "100%", onClick: button === null || button === void 0 ? void 0 : button.onClick }, (_b = button.label) !== null && _b !== void 0 ? _b : "Add to Cart")),
76
- onAddToCart && (react_1.default.createElement(Button_1.default, { width: "100%", size: safeSize, onClick: function () { return onAddToCart === null || onAddToCart === void 0 ? void 0 : onAddToCart(id); }, colorScheme: "red" }, "Add to Cart")))));
76
+ addToCart && (react_1.default.createElement(Button_1.default, { width: "100%", size: safeSize, onClick: function () { return onAddToCart === null || onAddToCart === void 0 ? void 0 : onAddToCart(id); }, colorScheme: "red" }, "Add to Cart")),
77
+ goToCart && (react_1.default.createElement(Button_1.default, { width: "100%", size: safeSize, onClick: OnGoToCart, colorScheme: "red" }, "Go to Cart")))));
77
78
  };
78
79
  exports.default = ProductCard;
@@ -14,6 +14,9 @@ export type ProductCardProps = {
14
14
  onClick: () => void;
15
15
  };
16
16
  onAddToCart?: (id: string | number) => void;
17
+ addToCart?: boolean;
18
+ goToCart?: boolean;
19
+ OnGoToCart?: () => void;
17
20
  batch?: batch;
18
21
  size?: SizeType;
19
22
  avalabilitys?: boolean;
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import { ProductDetailsProps } from "./ProductDetailsProps";
3
- declare const ProductDetails: ({ id, price, label, shortdesc, tags, images, batch, category, onAddToCart, }: ProductDetailsProps) => React.JSX.Element;
3
+ declare const ProductDetails: ({ id, price, label, shortdesc, tags, images, batch, category, onAddToCart, addToCart, goToCart, OnGoToCart, }: ProductDetailsProps) => React.JSX.Element;
4
4
  export default ProductDetails;
@@ -13,7 +13,7 @@ var useCustomTheme_1 = require("../../Theme/useCustomTheme");
13
13
  var Button_1 = __importDefault(require("../Button/Button"));
14
14
  var lucide_react_1 = require("lucide-react");
15
15
  var ProductDetails = function (_a) {
16
- var id = _a.id, price = _a.price, label = _a.label, shortdesc = _a.shortdesc, tags = _a.tags, images = _a.images, batch = _a.batch, category = _a.category, onAddToCart = _a.onAddToCart;
16
+ var id = _a.id, price = _a.price, label = _a.label, shortdesc = _a.shortdesc, tags = _a.tags, images = _a.images, batch = _a.batch, category = _a.category, onAddToCart = _a.onAddToCart, addToCart = _a.addToCart, goToCart = _a.goToCart, OnGoToCart = _a.OnGoToCart;
17
17
  var theme = (0, useCustomTheme_1.useCustomTheme)();
18
18
  return (react_1.default.createElement(react_2.Flex, { direction: ["column", "row"], maxW: "6xl", mx: "auto", align: "start", gap: 5 },
19
19
  react_1.default.createElement(react_2.Box, { position: "relative", color: "white", borderRadius: "md", flex: "1", minH: "31.25rem" },
@@ -23,6 +23,7 @@ var ProductDetails = function (_a) {
23
23
  react_1.default.createElement(react_2.Text, { fontSize: "md", color: theme.colors.gray[700], my: 3 }, shortdesc),
24
24
  tags && react_1.default.createElement(ProductTags_1.default, { tags: tags, size: "sm" }),
25
25
  price && react_1.default.createElement(ProductDtlPrice_1.default, { price: price }),
26
- react_1.default.createElement(Button_1.default, { size: "sm", colorScheme: "red", leftIcon: react_1.default.createElement(lucide_react_1.ShoppingCartIcon, null), sx: { ml: "1.1rem" }, onClick: function () { return onAddToCart === null || onAddToCart === void 0 ? void 0 : onAddToCart(id); } }, "Add to cart"))));
26
+ addToCart && (react_1.default.createElement(Button_1.default, { size: "sm", colorScheme: "red", leftIcon: react_1.default.createElement(lucide_react_1.ShoppingCartIcon, null), sx: { ml: "1.1rem" }, onClick: function () { return onAddToCart === null || onAddToCart === void 0 ? void 0 : onAddToCart(id); } }, "Add to cart")),
27
+ goToCart && (react_1.default.createElement(Button_1.default, { size: "sm", colorScheme: "red", leftIcon: react_1.default.createElement(lucide_react_1.ShoppingCartIcon, null), sx: { ml: "1.1rem" }, onClick: OnGoToCart }, "Go to cart")))));
27
28
  };
28
29
  exports.default = ProductDetails;
@@ -9,6 +9,9 @@ export type ProductDetailsProps = {
9
9
  batch?: batch;
10
10
  category?: string;
11
11
  onAddToCart?: (id: string | number) => void;
12
+ addToCart?: boolean;
13
+ goToCart?: boolean;
14
+ OnGoToCart?: () => void;
12
15
  };
13
16
  export type price = {
14
17
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.2.63",
3
+ "version": "2.2.74",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",