@dreamworld/dw-ripple 2.6.0-ripple-rendring-not-cencel-on-pointer-move.2 → 3.0.1

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.
@@ -1,5 +1,4 @@
1
- import { html, css } from "lit-element";
2
- import { LitElement } from "@dreamworld/pwa-helpers/lit-element.js";
1
+ import { LitElement, html, css } from '@dreamworld/pwa-helpers/lit.js';
3
2
 
4
3
  //These are the dw element needed by this element.
5
4
  import "../dw-ripple.js";
package/dw-ripple.js CHANGED
@@ -1,4 +1,4 @@
1
- import { css } from "lit-element";
1
+ import { css } from '@dreamworld/pwa-helpers/lit.js';
2
2
 
3
3
  // These are the mwc element needed by this element.
4
4
  import { Ripple } from "@material/mwc-ripple";
@@ -20,9 +20,8 @@ export class DwRipple extends Ripple {
20
20
  :host([secondary]) {
21
21
  --mdc-theme-on-surface: var(--mdc-theme-secondary);
22
22
  }
23
-
24
- .mdc-ripple-surface::before,
25
- .mdc-ripple-surface::after {
23
+
24
+ .mdc-ripple-surface::before, .mdc-ripple-surface::after {
26
25
  background-color: var(--mdc-theme-on-surface, #000);
27
26
  }
28
27
  `,
@@ -79,51 +78,37 @@ export class DwRipple extends Ripple {
79
78
  }
80
79
 
81
80
  __onMouseDown(e) {
82
- console.debug("__onMouseDown called", e);
83
81
  this._timeoutRippleOnMouseDown = setTimeout(() => {
84
- console.log("timeoutRippleOnMouseDown");
85
82
  window.addEventListener("mouseup", this.__onMouseUp);
86
83
  this._rippleHander.startPress(e);
87
84
  }, 50);
88
85
  }
89
86
 
90
87
  __onTouchStart(e) {
91
- console.debug("__onTouchStart called", e);
92
88
  this._timeoutRippleOnTouchStart = setTimeout(() => {
93
- console.debug("timeoutRippleOnTouchStart");
94
89
  window.addEventListener("touchend", this.__onTouchEnd);
95
90
  this._rippleHander.startPress(e);
96
91
  }, 50);
97
92
  }
98
93
 
99
94
  __onPointerMove() {
100
- console.debug("__onPointerMove called");
101
95
  if (this._timeoutRippleOnMouseDown) {
102
96
  clearTimeout(this._timeoutRippleOnMouseDown);
103
97
  }
104
- if (this._timeoutRippleOnTouchStart) {
105
- clearTimeout(this._timeoutRippleOnTouchStart);
106
- }
107
98
  }
108
99
 
109
100
  __onTouchMove() {
110
- console.debug("__onTouchMove called");
111
101
  if (this._timeoutRippleOnTouchStart) {
112
102
  clearTimeout(this._timeoutRippleOnTouchStart);
113
103
  }
114
- if (this._timeoutRippleOnMouseDown) {
115
- clearTimeout(this._timeoutRippleOnMouseDown);
116
- }
117
104
  }
118
105
 
119
106
  __onMouseUp() {
120
- console.debug("__onMouseUp called");
121
107
  window.removeEventListener("mouseup", this.__onMouseUp);
122
108
  this._rippleHander.endPress();
123
109
  }
124
110
 
125
111
  __onTouchEnd() {
126
- console.debug("__onTouchEnd called");
127
112
  window.removeEventListener("touchend", this.__onTouchEnd);
128
113
  this._rippleHander.endPress();
129
114
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dreamworld/dw-ripple",
3
- "version": "2.6.0-ripple-rendring-not-cencel-on-pointer-move.2",
3
+ "version": "3.0.1",
4
4
  "description": "Ripple element created as child-class of [`mwc-ripple`] (https://github.com/material-components/material-components-web-components/tree/master/packages/ripple)",
5
5
  "main": "dw-ripple.js",
6
6
  "scripts": {
7
- "start": "polymer serve",
7
+ "start": "wds --node-resolve --app-index demo/index.html --open --watch",
8
8
  "test": "echo \"Error: no test specified\" && exit 1"
9
9
  },
10
10
  "repository": {
@@ -18,14 +18,14 @@
18
18
  },
19
19
  "homepage": "https://github.com/DreamworldSolutions/dw-ripple#readme",
20
20
  "dependencies": {
21
- "@material/mwc-ripple": "^0.26.1",
22
- "lit-element": "^2.2.0"
21
+ "@material/mwc-ripple": "0.27.0"
23
22
  },
24
23
  "devDependencies": {
25
- "@dreamworld/material-styles": "^1.1.0",
26
- "@dreamworld/pwa-helpers": "^1.10.0",
27
- "@material/mwc-formfield": "^0.26.1",
28
- "@material/mwc-switch": "^0.26.1",
24
+ "@dreamworld/material-styles": "^3.0.0",
25
+ "@dreamworld/pwa-helpers": "^1.13.1",
26
+ "@material/mwc-formfield": "0.27.0",
27
+ "@material/mwc-switch": "0.27.0",
28
+ "@web/dev-server": "^0.1.34",
29
29
  "@webcomponents/webcomponentsjs": "^2.2.10",
30
30
  "semantic-release": "17.4.2"
31
31
  },