@ordergroove/offers 2.34.3-alpha-PR-779-4.16 → 2.34.4

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": "@ordergroove/offers",
3
- "version": "2.34.3-alpha-PR-779-4.16+3f8016c7",
3
+ "version": "2.34.4",
4
4
  "description": "offer state component",
5
5
  "author": "Eugenio Lattanzio <eugenio63@gmail.com>",
6
6
  "homepage": "https://github.com/ordergroove/plush-toys#readme",
@@ -47,5 +47,5 @@
47
47
  "devDependencies": {
48
48
  "@ordergroove/offers-templates": "^0.9.1"
49
49
  },
50
- "gitHead": "3f8016c7cf813017bc1df684c0fa582fa499cbcf"
50
+ "gitHead": "cd24a15b855b86dd7f51d7bbbd3fa63f8d29f2c4"
51
51
  }
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-element';
1
+ import { html, css } from 'lit-element';
2
2
  import { connect } from '../core/connect';
3
3
 
4
4
  import { withProduct } from '../core/resolveProperties';
@@ -19,6 +19,28 @@ export class Price extends withProduct(TemplateElement) {
19
19
  };
20
20
  }
21
21
 
22
+ static get styles() {
23
+ return css`
24
+ :host::before {
25
+ clip-path: inset(100%);
26
+ clip: rect(1px, 1px, 1px, 1px);
27
+ height: 1px;
28
+ overflow: hidden;
29
+ position: absolute;
30
+ white-space: nowrap;
31
+ width: 1px;
32
+ }
33
+
34
+ :host([subscription])::before {
35
+ content: 'Discounted subscription price';
36
+ }
37
+
38
+ :host([regular])::before {
39
+ content: 'Regular price';
40
+ }
41
+ `;
42
+ }
43
+
22
44
  get value() {
23
45
  const realProductId = safeProductId(this.product);
24
46
  const frequency = this.frequency || this.configDefaultFrequency || this.offer?.defaultFrequency;