@ordergroove/offers 2.26.3 → 2.26.5

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/examples/index.js CHANGED
@@ -105,6 +105,18 @@ const exampleTemplates = [
105
105
  textCopy: { ...textCopy }
106
106
  }
107
107
  },
108
+ {
109
+ name: 'cart',
110
+ selector: 'og-offer[location="cart"]',
111
+ defaultPreviewMode: 'subscribed',
112
+ config: {
113
+ settings: {
114
+ ...settings,
115
+ offerType: 'cart'
116
+ },
117
+ textCopy: { ...textCopy }
118
+ }
119
+ },
108
120
  {
109
121
  name: 'side-by-side',
110
122
  selector: 'og-offer[location="side-by-side"]',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordergroove/offers",
3
- "version": "2.26.3",
3
+ "version": "2.26.5",
4
4
  "description": "offer state component",
5
5
  "author": "Eugenio Lattanzio <eugenio63@gmail.com>",
6
6
  "homepage": "https://github.com/ordergroove/plush-toys#readme",
@@ -43,7 +43,7 @@
43
43
  "throttle-debounce": "^2.1.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@ordergroove/offers-templates": "^0.4.5"
46
+ "@ordergroove/offers-templates": "^0.4.7"
47
47
  },
48
- "gitHead": "5bb94712de1b6e5365088c8645fdcc7e89a6a894"
48
+ "gitHead": "4206968685f93ae2d8778f20feb911ee4197707e"
49
49
  }
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-element';
1
+ import { html, css } from 'lit-element';
2
2
 
3
3
  import { optinProduct, optoutProduct } from '../core/actions';
4
4
  import { OptinStatus, mapStateToProps } from './OptinStatus';
@@ -12,6 +12,42 @@ export class OptinToggle extends OptinStatus {
12
12
  };
13
13
  }
14
14
 
15
+ static get styles() {
16
+ return css`
17
+ :host {
18
+ cursor: default;
19
+ display: inline-block;
20
+ }
21
+
22
+ .btn {
23
+ position: relative;
24
+ width: var(--og-radio-width, 1.4em);
25
+ height: var(--og-radio-height, 1.4em);
26
+ margin: var(--og-radio-margin, 0);
27
+ padding: 0;
28
+ border: 1px solid var(--og-primary-color, black);
29
+ background: #fff;
30
+ vertical-align: middle;
31
+ color: var(--og-primary-color, black);
32
+ display: inline-flex;
33
+ justify-content: center;
34
+ align-items: center;
35
+ border-radius: 3px;
36
+ }
37
+
38
+ .btn.active {
39
+ background: #090909;
40
+ }
41
+
42
+ .btn.active:after {
43
+ content: '✓';
44
+ color: #fff;
45
+ transform: scale(1.6);
46
+ margin-left: 2px;
47
+ }
48
+ `;
49
+ }
50
+
15
51
  handleClick(ev) {
16
52
  if (this.subscribed) this.optoutProduct(this.product);
17
53
  else this.optinProduct(this.product, this.frequency || this.defaultFrequency);