@ordergroove/offers 2.24.2-alpha-PR-568-5.12 → 2.24.2

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
@@ -31,11 +31,10 @@ const settings = {
31
31
 
32
32
  const textCopy = {
33
33
  showTooltip: true,
34
- offerOptInLabel: 'Subscribe and Save',
35
- offerIncentiveText: 'Save {{ogIncentive DiscountPercent}} when you subscribe',
36
- offerOptOutLabel: 'Deliver one-time only',
37
- offerEveryLabel: 'Deliver every',
38
- offerTooltipTrigger: '[?]',
34
+ offerOptInLabel: 'Subscribe and SAVE {{ogIncentive DiscountAmount 10}}',
35
+ offerOptOutLabel: 'Purchase one time',
36
+ offerEveryLabel: 'Ships Every:',
37
+ offerTooltipTrigger: 'Hover for additional info',
39
38
  offerTooltipContent: 'Seems this is a great subscription offering. Many fun details about this program exist.',
40
39
  optinButtonLabel: '•',
41
40
  optoutButtonLabel: '•',
@@ -326,11 +325,7 @@ Add item to order on
326
325
  {
327
326
  name: 'Tooltip',
328
327
  selector: 'og-offer[location="tooltip-placement"]',
329
- markup: [
330
- ['top-left', 'top', 'top-right'],
331
- ['left', '', 'right'],
332
- ['bottom-left', 'bottom', 'bottom-right']
333
- ]
328
+ markup: [['top-left', 'top', 'top-right'], ['left', '', 'right'], ['bottom-left', 'bottom', 'bottom-right']]
334
329
  .map(options =>
335
330
  options
336
331
  .map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordergroove/offers",
3
- "version": "2.24.2-alpha-PR-568-5.12+8d911f4f",
3
+ "version": "2.24.2",
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.2-alpha-PR-568-5.12+8d911f4f"
46
+ "@ordergroove/offers-templates": "^0.4.2"
47
47
  },
48
- "gitHead": "8d911f4fdf6099e66242a1a43c6a0fd7f2a57b5a"
48
+ "gitHead": "15d044be78de0e47b82dd310d3d1c4d06fecc98f"
49
49
  }
package/schema.json CHANGED
@@ -274,27 +274,22 @@
274
274
  "properties": {
275
275
  "defaultFrequencyCopy": {
276
276
  "type": "string",
277
- "default": "(Most Popular)",
277
+ "default": "Recommended",
278
278
  "title": "Default frequency copy"
279
279
  },
280
280
  "offerOptInLabel": {
281
281
  "type": "string",
282
- "default": "Subscribe and Save",
283
- "title": "Subscription copy"
284
- },
285
- "offerIncentiveText": {
286
- "type": "string",
287
- "default": "Save {{ogIncentive DiscountPercent}} when you subscribe",
288
- "title": "Subscription sub copy"
282
+ "default": "Subscribe and get 20% off",
283
+ "title": "Subscribe option copy"
289
284
  },
290
285
  "offerEveryLabel": {
291
286
  "type": "string",
292
- "default": "Deliver Every",
287
+ "default": "Ships Every: ",
293
288
  "title": "Subscribe frequency label"
294
289
  },
295
290
  "offerOptOutLabel": {
296
291
  "type": "string",
297
- "default": "Deliver one-time only",
292
+ "default": "One-time",
298
293
  "title": "One-time option copy"
299
294
  },
300
295
  "showTooltip": {
@@ -447,8 +442,7 @@
447
442
  },
448
443
  "textCopy": {
449
444
  "defaultFrequencyCopy": "Recommended",
450
- "offerOptInLabel": "Subscribe and Save",
451
- "offerIncentiveText": "Save {{ogIncentive DiscountPercent}} when you subscribe",
445
+ "offerOptInLabel": "Subscribe and get 20% off",
452
446
  "offerEveryLabel": "Ships Every: ",
453
447
  "offerOptOutLabel": "One-time",
454
448
  "showTooltip": false,
@@ -142,7 +142,7 @@ export class Offer extends TemplateElement {
142
142
  <og-optin-button>
143
143
  <og-text key="offerOptInLabel"></og-text>
144
144
  </og-optin-button>
145
- <og-tooltip placement="bottom">
145
+ <og-tooltip placement="top-right">
146
146
  <div slot="trigger">
147
147
  <og-text key="offerTooltipTrigger"></og-text>
148
148
  </div>
@@ -151,7 +151,7 @@ export class Offer extends TemplateElement {
151
151
  </div>
152
152
  </og-tooltip>
153
153
  </div>
154
- <div style="margin-left: 1.9em">
154
+ <div style="margin-left: 1.5em">
155
155
  <og-text key="offerEveryLabel"></og-text>
156
156
  <og-select-frequency>
157
157
  <option value="3_1" selected>3 Days</option>
@@ -1,4 +1,4 @@
1
- import { html, css } from 'lit-element';
1
+ import { html } from 'lit-element';
2
2
  import { optinProduct } from '../core/actions';
3
3
  import { OptinStatus, mapStateToProps } from './OptinStatus';
4
4
  import { connect } from '../core/connect';
@@ -23,8 +23,6 @@ export class OptinStatus extends withProduct(TemplateElement) {
23
23
  :host {
24
24
  cursor: default;
25
25
  display: inline-block;
26
- font-family: var(--og-global-family, Roboto, sans-serif);
27
- color: var(--og-global-color, #090909);
28
26
  }
29
27
 
30
28
  :host[hidden] {
@@ -44,13 +42,6 @@ export class OptinStatus extends withProduct(TemplateElement) {
44
42
  color: var(--og-primary-color, black);
45
43
  }
46
44
 
47
- .radio,
48
- .checkbox {
49
- margin: 0 0.5em;
50
- transform: scale(1.2);
51
- cursor: pointer;
52
- }
53
-
54
45
  .radio {
55
46
  text-indent: -9999px;
56
47
  }
@@ -58,7 +49,6 @@ export class OptinStatus extends withProduct(TemplateElement) {
58
49
  .checkbox {
59
50
  border-radius: 3px;
60
51
  }
61
-
62
52
  .checkbox.active::after,
63
53
  .radio.active::after {
64
54
  content: ' ';
@@ -21,10 +21,9 @@ export class Select extends LitElement {
21
21
  font-family: inherit;
22
22
  font-size: 1em;
23
23
  line-height: 1.3;
24
- padding: var(--og-select-padding, 0.4em 2.8em 0.4em 0.5em);
24
+ padding: var(--og-select-padding, 0.4em 1.8em 0.3em 0.5em);
25
25
  width: 100%;
26
26
  max-width: 100%;
27
- min-width: 150px;
28
27
  box-sizing: border-box;
29
28
  margin: 0;
30
29
  border: none;
@@ -51,10 +50,11 @@ export class Select extends LitElement {
51
50
  }
52
51
  span {
53
52
  position: absolute;
53
+ // background: white;
54
54
  color: inherit;
55
55
  fill: white;
56
56
  pointer-events: none;
57
- right: 0.3em;
57
+ right: 0.4em;
58
58
  top: 50%;
59
59
  z-index: 1;
60
60
  font-size: 1em;
@@ -32,15 +32,14 @@ export class SelectFrequency extends withChildOptions(FrequencyStatus) {
32
32
  static get styles() {
33
33
  return css`
34
34
  :host {
35
- display: table;
35
+ display: inline-block;
36
36
  cursor: pointer;
37
- background-color: var(--og-select-bg-color, #f8f8f8);
38
- border: var(--og-select-border, 1px solid #090909);
37
+ background-color: var(--og-select-bg-color, #fff);
38
+ border: var(--og-select-border, 1px solid #aaa);
39
39
  border-radius: var(--og-select-border-radius, 0.5em);
40
40
  border-width: var(--og-select-border-width, 1px);
41
41
  box-shadow: 0 1px 0 1px rgba(0, 0, 0, 0.04);
42
42
  z-index: 1;
43
- font-size: var(--og-select-font-size, 12px);
44
43
  }
45
44
  `;
46
45
  }
@@ -25,24 +25,20 @@ export class Tooltip extends LitElement {
25
25
 
26
26
  .content {
27
27
  box-sizing: border-box;
28
- font-family: var(--og-tooltip-family, Roboto, sans-serif);
29
- font-size: var(--og-tooltip-size, 12px);
30
- color: var(--og-tooltip-color, #090909);
31
- background-color: var(--og-tooltip-background, #ffffff);
28
+ font-family: var(--og-tooltip-family, inherit);
29
+ font-size: var(--og-tooltip-size, inherit);
30
+ color: var(--og-tooltip-color, inherit);
31
+ background-color: var(--og-tooltip-background, #ececec);
32
32
  box-shadow: var(--og-tooltip-box-shadow, 2px 2px 6px rgba(0, 0, 0, 0.28));
33
- border: var(--og-tooltop-border, 1px solid #cdcdcd);
34
33
  display: block;
35
34
  width: 200px;
36
35
  opacity: 0;
37
- padding: 1em;
38
- border-radius: 5px;
36
+ padding: 0.5em;
39
37
  pointer-events: none;
40
38
  position: absolute;
41
39
  transform: translateY(10px);
42
40
  transition: transform 0.25s ease-out;
43
41
  z-index: 99999;
44
- text-align: center;
45
- line-height: 1.3;
46
42
  }
47
43
 
48
44
  .content:after {
@@ -116,7 +112,7 @@ export class Tooltip extends LitElement {
116
112
  .top-right:after,
117
113
  .top:after {
118
114
  bottom: -10px;
119
- border-top: solid var(--og-tooltip-background, #ffffff) 10px;
115
+ border-top: solid var(--og-tooltip-background, #ececec) 10px;
120
116
  }
121
117
  .bottom-left:after,
122
118
  .top-left:after {
@@ -135,7 +131,7 @@ export class Tooltip extends LitElement {
135
131
  .bottom-right:after,
136
132
  .bottom:after {
137
133
  top: -10px;
138
- border-bottom: solid var(--og-tooltip-background, #ffffff) 10px;
134
+ border-bottom: solid var(--og-tooltip-background, #ececec) 10px;
139
135
  }
140
136
 
141
137
  .left:after,
@@ -147,11 +143,11 @@ export class Tooltip extends LitElement {
147
143
  }
148
144
  .right:after {
149
145
  left: -10px;
150
- border-right: solid var(--og-tooltip-background, #ffffff) 10px;
146
+ border-right: solid var(--og-tooltip-background, #ececec) 10px;
151
147
  }
152
148
  .left:after {
153
149
  right: -10px;
154
- border-left: solid var(--og-tooltip-background, #ffffff) 10px;
150
+ border-left: solid var(--og-tooltip-background, #ececec) 10px;
155
151
  }
156
152
 
157
153
  .tooltip:hover .content {
@@ -187,13 +183,13 @@ export class Tooltip extends LitElement {
187
183
 
188
184
  render() {
189
185
  return html`
190
- <span class="tooltip bottom">
186
+ <span class="tooltip">
191
187
  <span class="trigger">
192
188
  <slot name="trigger">
193
189
  ${this.trigger}
194
190
  </slot>
195
191
  </span>
196
- <div class="content ${this.placement || 'bottom'}">
192
+ <div class="content ${this.placement || 'top'}">
197
193
  <slot name="content">
198
194
  ${this.content}
199
195
  </slot>
@@ -61,11 +61,11 @@ describe('Tooltip', () => {
61
61
  });
62
62
 
63
63
  it('should set the "top" style property if placement is left', async () => {
64
- await checkContentStyles({ top: '-13px', left: '' }, 'left');
64
+ await checkContentStyles({ top: '-8px', left: '' }, 'left');
65
65
  });
66
66
 
67
67
  it('should set the "top" style property if placement is right', async () => {
68
- await checkContentStyles({ top: '-13px', left: '' }, 'right');
68
+ await checkContentStyles({ top: '-8px', left: '' }, 'right');
69
69
  });
70
70
 
71
71
  it('should not set style properties if placement is top-right', async () => {
@@ -332,11 +332,10 @@ export const environment = (state = {}, action) => {
332
332
 
333
333
  export const locale = (
334
334
  state = {
335
- offerOptInLabel: 'Subscribe and Save',
336
- offerIncentiveText: 'Save {{ogIncentive DiscountPercent}} when you subscribe',
337
- offerOptOutLabel: 'Deliver one-time only',
338
- offerEveryLabel: 'Delivery Every',
339
- offerTooltipTrigger: '[?]',
335
+ offerOptInLabel: 'Subscribe',
336
+ offerOptOutLabel: 'Purchase one time',
337
+ offerEveryLabel: 'Every',
338
+ offerTooltipTrigger: 'Hover for additional info',
340
339
  offerTooltipContent: 'Seems this is a great subscription offering. Many fun details about this program exist.',
341
340
  optinButtonLabel: '•',
342
341
  optoutButtonLabel: '•',
@@ -351,7 +350,7 @@ export const locale = (
351
350
  upsellModalTitle: 'Impulse Upsell',
352
351
  upsellModalConfirmLabel: 'Ok',
353
352
  upsellModalCancelLabel: 'Cancel',
354
- defaultFrequencyCopy: '(Most Popular)',
353
+ defaultFrequencyCopy: '(Recommended)',
355
354
  frequencyPeriods: {
356
355
  '1': 'day',
357
356
  '2': 'week',