@dreamworld/dw-ripple 2.5.0 → 2.6.0-ripple-rendring-not-cencel-on-pointer-move.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,48 +1,11 @@
1
1
  version: 2
2
2
  jobs:
3
- merge-to-development:
4
- machine: true
5
- steps:
6
- - run:
7
- name: Clone Repository
8
- working_directory: ~/workdir
9
- command: |
10
- echo "PR IS::"
11
- echo $CIRCLE_PULL_REQUEST
12
- if [[ -n ${CIRCLE_PULL_REQUEST} ]]
13
- then
14
- git clone https://${GH_TOKEN}@github.com/DreamworldSolutions/$CIRCLE_PROJECT_REPONAME.git my-repo
15
- else
16
- echo "No PR Attached, so not doing anything"
17
- fi
18
- - run:
19
- name: Merge PR branch to development
20
- working_directory: ~/workdir/my-repo
21
- command: |
22
- if [[ -n ${CIRCLE_PULL_REQUEST} ]]
23
- then
24
- # circleci has 2.14.x as of now!
25
- git --version
26
- git config credential.helper 'cache --timeout=120'
27
- git config user.email "dw-devops@dreamworld.solutions"
28
- git config user.name "DW Devops"
29
- git remote set-url --push origin https://${GH_TOKEN}@github.com/DreamworldSolutions/$CIRCLE_PROJECT_REPONAME.git
30
- (git checkout -b feature/development origin/master || true)
31
- (git pull origin feature/development || true)
32
- git merge origin/$CIRCLE_BRANCH --no-ff --no-edit
33
- git push origin feature/development
34
- # Push quietly to prevent showing the token in log
35
- git push -q origin feature/development
36
- else
37
- echo "No PR Attached, so not doing anything."
38
- fi
39
-
40
3
  release-snapshot:
41
4
  docker:
42
- - image: circleci/node:14
5
+ - image: circleci/node:lts
43
6
  steps:
44
7
  - checkout
45
- - run: yarn install --frozen-lockfile --non-interactive
8
+ - run: yarn install --frozen-lockfile --non-ineractive
46
9
  - run:
47
10
  name: Deploy
48
11
  command: |
@@ -51,27 +14,17 @@ jobs:
51
14
  npx semantic-release
52
15
  release:
53
16
  docker:
54
- - image: circleci/node:14
17
+ - image: circleci/node:lts
55
18
  steps:
56
19
  - checkout
57
- - run: yarn install --frozen-lockfile --non-interactive
20
+ - run: yarn install --frozen-lockfile --non-ineractive
58
21
  - run: echo "Running release job"
59
22
  - run:
60
23
  name: Deploy
61
24
  command: npx semantic-release
62
25
 
63
-
64
26
  workflows:
65
27
  version: 2
66
- merge-to-development:
67
- jobs:
68
- - merge-to-development:
69
- context: Dreamworld
70
- filters:
71
- branches:
72
- ignore:
73
- - master
74
- - feature/development
75
28
  release:
76
29
  jobs:
77
30
  - release-snapshot:
@@ -79,10 +32,10 @@ workflows:
79
32
  filters:
80
33
  branches:
81
34
  only:
82
- - feature/development
35
+ - /^feature\/.+$/
83
36
  - release:
84
37
  context: Dreamworld
85
38
  filters:
86
- branches:
87
- only:
88
- - master
39
+ branches:
40
+ only:
41
+ - master
package/dw-ripple.js CHANGED
@@ -9,8 +9,20 @@ export class DwRipple extends Ripple {
9
9
  return [
10
10
  super.styles,
11
11
  css`
12
+ :host([disabled]) {
13
+ --mdc-theme-on-surface: transparent;
14
+ }
15
+
16
+ :host([primary]) {
17
+ --mdc-theme-on-surface: var(--mdc-theme-primary);
18
+ }
19
+
12
20
  :host([secondary]) {
13
- --mdc-ripple-color: var(--mdc-theme-secondary);
21
+ --mdc-theme-on-surface: var(--mdc-theme-secondary);
22
+ }
23
+
24
+ .mdc-ripple-surface::before, .mdc-ripple-surface::after {
25
+ background-color: var(--mdc-theme-on-surface, #000);
14
26
  }
15
27
  `,
16
28
  ];
@@ -66,37 +78,45 @@ export class DwRipple extends Ripple {
66
78
  }
67
79
 
68
80
  __onMouseDown(e) {
81
+ console.debug("onMouseDown", e);
69
82
  this._timeoutRippleOnMouseDown = setTimeout(() => {
83
+ console.log("timeoutRippleOnMouseDown");
70
84
  window.addEventListener("mouseup", this.__onMouseUp);
71
85
  this._rippleHander.startPress(e);
72
86
  }, 50);
73
87
  }
74
88
 
75
89
  __onTouchStart(e) {
90
+ console.debug("onTouchStart", e);
76
91
  this._timeoutRippleOnTouchStart = setTimeout(() => {
92
+ console.debug("timeoutRippleOnTouchStart");
77
93
  window.addEventListener("touchend", this.__onTouchEnd);
78
94
  this._rippleHander.startPress(e);
79
95
  }, 50);
80
96
  }
81
97
 
82
98
  __onPointerMove() {
99
+ console.debug("onPointerMove");
83
100
  if (this._timeoutRippleOnMouseDown) {
84
101
  clearTimeout(this._timeoutRippleOnMouseDown);
85
102
  }
86
103
  }
87
104
 
88
105
  __onTouchMove() {
106
+ console.debug("onTouchMove");
89
107
  if (this._timeoutRippleOnTouchStart) {
90
108
  clearTimeout(this._timeoutRippleOnTouchStart);
91
109
  }
92
110
  }
93
111
 
94
112
  __onMouseUp() {
113
+ console.debug("onMouseUp");
95
114
  window.removeEventListener("mouseup", this.__onMouseUp);
96
115
  this._rippleHander.endPress();
97
116
  }
98
117
 
99
118
  __onTouchEnd() {
119
+ console.debug("onTouchEnd");
100
120
  window.removeEventListener("touchend", this.__onTouchEnd);
101
121
  this._rippleHander.endPress();
102
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamworld/dw-ripple",
3
- "version": "2.5.0",
3
+ "version": "2.6.0-ripple-rendring-not-cencel-on-pointer-move.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": {