@snacky/ui 0.4.9 → 0.5.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.
- package/dist/index.cjs +21 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +136 -5
- package/dist/index.css.map +1 -1
- package/dist/index.js +21 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1061,28 +1061,30 @@ function ProductCard(props) {
|
|
|
1061
1061
|
if (props.variant === "details") {
|
|
1062
1062
|
const { productName: productName2, imageUrl: imageUrl2, price: price2, rating: rating2, originalPrice: originalPrice2, discountLabel: discountLabel2, ratingCount, favorited, onFavoriteClick, onShareClick, onChatClick, sold, ratingIcon: ratingIcon2, favoriteIcon, shareIcon, chatIcon, onClick: onClick2, className: className2 } = props;
|
|
1063
1063
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cx("snacky-product-card", "snacky-product-card--details", className2), children: [
|
|
1064
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__image-wrap", onClick: onClick2, children: [
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "snacky-product-card__image-block", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__image-wrap", onClick: onClick2, children: [
|
|
1065
1065
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { className: "snacky-product-card__image", src: imageUrl2, alt: productName2 }),
|
|
1066
1066
|
sold && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "snacky-product-card__sold-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SoldOutBadge, {}) })
|
|
1067
|
-
] }),
|
|
1068
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.
|
|
1069
|
-
|
|
1070
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
|
|
1075
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "snacky-product-card__rating", children: [
|
|
1076
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon2 ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(star, { width: 16, height: 16 }) }),
|
|
1077
|
-
rating2,
|
|
1078
|
-
" (",
|
|
1079
|
-
ratingCount,
|
|
1080
|
-
")"
|
|
1067
|
+
] }) }),
|
|
1068
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__details-body", children: [
|
|
1069
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "snacky-product-card__name", children: productName2 }),
|
|
1070
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__price-row", children: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "snacky-product-card__price", children: price2 }),
|
|
1072
|
+
originalPrice2 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "snacky-product-card__original-price", children: originalPrice2 }),
|
|
1073
|
+
discountLabel2 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DiscountTag, { label: discountLabel2 })
|
|
1081
1074
|
] }),
|
|
1082
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-
|
|
1083
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.
|
|
1084
|
-
|
|
1085
|
-
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__footer-row", children: [
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "snacky-product-card__rating", children: [
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "snacky-product-card__rating-icon", children: ratingIcon2 ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(star, { width: 16, height: 16 }) }),
|
|
1078
|
+
rating2,
|
|
1079
|
+
" (",
|
|
1080
|
+
ratingCount,
|
|
1081
|
+
")"
|
|
1082
|
+
] }),
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "snacky-product-card__actions snacky-product-card__actions--details", children: [
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton, { variant: "secondary", icon: favoriteIcon ?? (favorited ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(heart2, { width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(heart, { width: 20, height: 20 })), selected: favorited, onClick: onFavoriteClick, ariaLabel: "Favorite" }),
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton, { variant: "secondary", icon: shareIcon ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(share, { width: 20, height: 20 }), onClick: onShareClick, ariaLabel: "Share" }),
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconButton, { variant: "secondary", icon: chatIcon ?? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(chat, { width: 20, height: 20 }), onClick: onChatClick, ariaLabel: "Chat with seller" })
|
|
1087
|
+
] })
|
|
1086
1088
|
] })
|
|
1087
1089
|
] })
|
|
1088
1090
|
] });
|