@magic-spells/gift-with-purchase 1.0.0 → 2.0.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/README.md +56 -16
- package/dist/{gift-with-purchase.cjs.css → gift-with-purchase.css} +12 -9
- package/dist/gift-with-purchase.esm.js +226 -205
- package/dist/gift-with-purchase.min.css +2 -2
- package/dist/gift-with-purchase.min.js +1 -2
- package/package.json +16 -23
- package/dist/gift-with-purchase.cjs.css.map +0 -1
- package/dist/gift-with-purchase.cjs.js +0 -429
- package/dist/gift-with-purchase.cjs.js.map +0 -1
- package/dist/gift-with-purchase.esm.css +0 -46
- package/dist/gift-with-purchase.esm.css.map +0 -1
- package/dist/gift-with-purchase.esm.js.map +0 -1
- package/dist/gift-with-purchase.min.css.map +0 -1
- package/dist/gift-with-purchase.min.js.map +0 -1
- package/dist/gift-with-purchase.scss +0 -75
- package/src/gift-with-purchase.js +0 -428
- package/src/gift-with-purchase.scss +0 -75
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// SCSS Variables (can be overridden before import)
|
|
2
|
-
$gwp-border-radius: 8px !default;
|
|
3
|
-
$gwp-padding: 1rem !default;
|
|
4
|
-
$gwp-gap: 1rem !default;
|
|
5
|
-
|
|
6
|
-
// Colors
|
|
7
|
-
$gwp-bg-active: #e8f5e8 !default;
|
|
8
|
-
$gwp-bg-added: #d4edda !default;
|
|
9
|
-
$gwp-border-active: #28a745 !default;
|
|
10
|
-
$gwp-border-added: #155724 !default;
|
|
11
|
-
$gwp-text-active: #155724 !default;
|
|
12
|
-
$gwp-text-added: #155724 !default;
|
|
13
|
-
|
|
14
|
-
// Gift with purchase component styles
|
|
15
|
-
gift-with-purchase {
|
|
16
|
-
// CSS Custom Properties for customization
|
|
17
|
-
--gwp-border-radius: #{$gwp-border-radius};
|
|
18
|
-
--gwp-padding: #{$gwp-padding};
|
|
19
|
-
--gwp-gap: #{$gwp-gap};
|
|
20
|
-
--gwp-bg-active: #{$gwp-bg-active};
|
|
21
|
-
--gwp-bg-added: #{$gwp-bg-added};
|
|
22
|
-
--gwp-border-active: #{$gwp-border-active};
|
|
23
|
-
--gwp-border-added: #{$gwp-border-added};
|
|
24
|
-
--gwp-text-active: #{$gwp-text-active};
|
|
25
|
-
--gwp-text-added: #{$gwp-text-added};
|
|
26
|
-
|
|
27
|
-
display: block;
|
|
28
|
-
border: 2px solid var(--gwp-border-active);
|
|
29
|
-
border-radius: var(--gwp-border-radius);
|
|
30
|
-
padding: var(--gwp-padding);
|
|
31
|
-
background-color: var(--gwp-bg-active);
|
|
32
|
-
color: var(--gwp-text-active);
|
|
33
|
-
|
|
34
|
-
// Basic product layout - image left, content right
|
|
35
|
-
.gwp-product {
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: flex-start;
|
|
38
|
-
gap: var(--gwp-gap);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Basic image styling
|
|
42
|
-
[data-gwp-image] {
|
|
43
|
-
flex-shrink: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Content takes remaining space
|
|
47
|
-
.gwp-content {
|
|
48
|
-
flex: 1;
|
|
49
|
-
min-width: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// State: Active (threshold reached, gift not yet added)
|
|
53
|
-
&[state='active'] {
|
|
54
|
-
background-color: var(--gwp-bg-active);
|
|
55
|
-
border-color: var(--gwp-border-active);
|
|
56
|
-
color: var(--gwp-text-active);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// State: Added (gift in cart)
|
|
60
|
-
&[state='added'] {
|
|
61
|
-
background-color: var(--gwp-bg-added);
|
|
62
|
-
border-color: var(--gwp-border-added);
|
|
63
|
-
color: var(--gwp-text-added);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// State: Ended (promo ended - component hidden)
|
|
67
|
-
&[state='ended'] {
|
|
68
|
-
display: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// State: Disabled (product unavailable - component hidden)
|
|
72
|
-
&[state='disabled'] {
|
|
73
|
-
display: none;
|
|
74
|
-
}
|
|
75
|
-
}
|