@pradip1995/segment-product-card 0.3.7 → 0.3.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pradip1995/segment-product-card",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@pradip1995/segment-primitives": "^0.3.2",
|
|
29
|
-
"@pradip1995/segment-tokens": "^0.3.
|
|
29
|
+
"@pradip1995/segment-tokens": "^0.3.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@pradip1995/plugin-sdk": "^0.2.0",
|
|
@@ -35,8 +35,8 @@ export default function BeautyProductCard({
|
|
|
35
35
|
const originalPrice = variant?.calculated_price?.original_amount
|
|
36
36
|
const currency = region?.currency_code || variant?.calculated_price?.currency_code || "inr"
|
|
37
37
|
const countryCode =
|
|
38
|
-
countryCodeProp?.toLowerCase()
|
|
39
|
-
region?.countries?.[0]?.iso_2?.toLowerCase()
|
|
38
|
+
countryCodeProp?.toLowerCase() ||
|
|
39
|
+
region?.countries?.[0]?.iso_2?.toLowerCase() ||
|
|
40
40
|
"in"
|
|
41
41
|
|
|
42
42
|
const discountPct =
|
|
@@ -55,7 +55,7 @@ export default function BeautyProductCard({
|
|
|
55
55
|
href={`/products/${product.handle}`}
|
|
56
56
|
className="beauty-product-card__link flex flex-col h-full"
|
|
57
57
|
>
|
|
58
|
-
<div className="beauty-product-card__media relative aspect-square bg-[
|
|
58
|
+
<div className="beauty-product-card__media relative aspect-square bg-[var(--color-surface-muted)] overflow-hidden">
|
|
59
59
|
{product.thumbnail?.trim() ? (
|
|
60
60
|
<img
|
|
61
61
|
src={product.thumbnail.trim()}
|
|
@@ -27,8 +27,8 @@ export default function DefaultProductCard({
|
|
|
27
27
|
const originalPrice = variant?.calculated_price?.original_amount
|
|
28
28
|
const currency = region?.currency_code || variant?.calculated_price?.currency_code || "inr"
|
|
29
29
|
const countryCode =
|
|
30
|
-
countryCodeProp?.toLowerCase()
|
|
31
|
-
region?.countries?.[0]?.iso_2?.toLowerCase()
|
|
30
|
+
countryCodeProp?.toLowerCase() ||
|
|
31
|
+
region?.countries?.[0]?.iso_2?.toLowerCase() ||
|
|
32
32
|
"in"
|
|
33
33
|
|
|
34
34
|
const discountPct =
|
package/src/segment.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Beauty product card — Lumière cosmetics */
|
|
2
2
|
|
|
3
3
|
.beauty-product-card {
|
|
4
|
-
background:
|
|
4
|
+
background: var(--color-surface);
|
|
5
5
|
border: 1px solid rgba(139, 58, 98, 0.1);
|
|
6
6
|
box-shadow: 0 10px 28px rgba(42, 16, 32, 0.05);
|
|
7
7
|
transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.beauty-product-card__placeholder {
|
|
35
|
-
background: linear-gradient(135deg,
|
|
35
|
+
background: linear-gradient(135deg, var(--color-surface-muted) 0%, var(--color-brand-cream) 100%);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.beauty-product-card__badge {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.beauty-product-card__badge--sale {
|
|
51
|
-
background:
|
|
52
|
-
color:
|
|
51
|
+
background: var(--color-brand-primary);
|
|
52
|
+
color: var(--color-text-inverse);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.beauty-product-card .product-card__actions {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
width: 100%;
|
|
86
86
|
border-radius: 0;
|
|
87
87
|
background: rgba(0, 0, 0, 0.82);
|
|
88
|
-
color:
|
|
88
|
+
color: var(--color-text-inverse);
|
|
89
89
|
letter-spacing: 0.14em;
|
|
90
90
|
text-transform: uppercase;
|
|
91
91
|
font-size: 0.6875rem;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.beauty-product-card .product-card__quick-add:hover:not(:disabled) {
|
|
98
|
-
background:
|
|
98
|
+
background: var(--color-brand-primary);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
.beauty-product-card:not(:hover) .product-card__quick-add-wrap {
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.beauty-product-card__rating-stars {
|
|
175
|
-
color:
|
|
175
|
+
color: var(--color-brand-gold);
|
|
176
176
|
font-size: 0.8125rem;
|
|
177
177
|
}
|
|
178
178
|
|