@ordergroove/offers 2.28.1 → 2.28.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/CHANGELOG.md +8 -0
- package/dist/bundle-report.html +4 -4
- package/dist/examples.js +7 -0
- package/dist/examples.js.map +1 -1
- package/dist/offers.js +2 -1
- package/dist/offers.js.map +2 -2
- package/package.json +3 -3
- package/src/components/Offer.js +1 -0
- package/src/components/Tooltip.js +1 -1
- package/src/components/__tests__/Tooltip.spec.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"throttle-debounce": "^2.1.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@ordergroove/offers-templates": "^0.4.
|
|
48
|
+
"@ordergroove/offers-templates": "^0.4.17"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0dae2ce3e9690f602b03af9511f2c242023ac438"
|
|
51
51
|
}
|
package/src/components/Offer.js
CHANGED
|
@@ -32,7 +32,6 @@ export class Tooltip extends LitElement {
|
|
|
32
32
|
background-color: var(--og-tooltip-background, #ececec);
|
|
33
33
|
box-shadow: var(--og-tooltip-box-shadow, 2px 2px 6px rgba(0, 0, 0, 0.28));
|
|
34
34
|
display: block;
|
|
35
|
-
width: 200px;
|
|
36
35
|
opacity: 0;
|
|
37
36
|
padding: var(--og-tooltip-padding, 0.5em);
|
|
38
37
|
text-align: var(--og-tooltip-text-align, left);
|
|
@@ -155,6 +154,7 @@ export class Tooltip extends LitElement {
|
|
|
155
154
|
|
|
156
155
|
.tooltip:hover .content {
|
|
157
156
|
opacity: 1;
|
|
157
|
+
width: 200px;
|
|
158
158
|
pointer-events: auto;
|
|
159
159
|
transform: translateY(0px);
|
|
160
160
|
}
|
|
@@ -41,7 +41,7 @@ describe('Tooltip', () => {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
it('should set top placement by default', async () => {
|
|
44
|
-
await checkContentStyles({ top: '', left: '-100px' });
|
|
44
|
+
await checkContentStyles({ top: '', left: '-100px' }, null, { width: '200px' });
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
it('should adjust the left style value to the width of the content', async () => {
|
|
@@ -49,11 +49,11 @@ describe('Tooltip', () => {
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it('should set the "left" style property if placement is top', async () => {
|
|
52
|
-
await checkContentStyles({ top: '', left: '-100px' }, 'top');
|
|
52
|
+
await checkContentStyles({ top: '', left: '-100px' }, 'top', { width: '200px' });
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
it('should set calculate the "left" style property if placement is bottom', async () => {
|
|
56
|
-
await checkContentStyles({ top: '', left: '-100px' }, 'bottom');
|
|
56
|
+
await checkContentStyles({ top: '', left: '-100px' }, 'bottom', { width: '200px' });
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
it('should adjust the "top" style value to the height of the content if placement is left', async () => {
|