@nativescript-community/ui-material-ripple 7.2.11 → 7.2.12
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 +3 -3
- package/ripple.android.js +9 -3
- package/ripple.android.js.map +1 -1
- package/ripple.ios.js +7 -2
- package/ripple.ios.js.map +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-material-ripple",
|
3
|
-
"version": "7.2.
|
3
|
+
"version": "7.2.12",
|
4
4
|
"description": "The Material Design Ripple component provides a radial action in the form of a visual ripple expanding outward from the user's touch. Ripple is a visual form of feedback for touch events providing users a clear signal that an element is being touched.",
|
5
5
|
"main": "./ripple",
|
6
6
|
"sideEffects": false,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
},
|
47
47
|
"readmeFilename": "README.md",
|
48
48
|
"dependencies": {
|
49
|
-
"@nativescript-community/ui-material-core": "^7.2.
|
49
|
+
"@nativescript-community/ui-material-core": "^7.2.12"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "6a5bdc8e9ce9e545feebf93fb624ed7055feaebc"
|
52
52
|
}
|
package/ripple.android.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getRippleColor, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
|
1
|
+
import { getRippleColor, rippleColorAlphaProperty, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
|
2
2
|
import { createRippleDrawable, getColorStateList, isPostLollipopMR1, isPostMarshmallow } from '@nativescript-community/ui-material-core/android/utils';
|
3
3
|
import { Background, Color, Length, backgroundInternalProperty } from '@nativescript/core';
|
4
4
|
import { RippleBase } from './ripple-common';
|
@@ -187,14 +187,20 @@ export class Ripple extends RippleBase {
|
|
187
187
|
this.setRippleDrawable(this.nativeViewProtected, Length.toDevicePixels(this.style.borderTopLeftRadius), Length.toDevicePixels(this.style.borderTopRightRadius), Length.toDevicePixels(this.style.borderBottomRightRadius), Length.toDevicePixels(this.style.borderBottomLeftRadius));
|
188
188
|
}
|
189
189
|
else {
|
190
|
+
const nColor = getRippleColor(color, this.rippleColorAlpha);
|
190
191
|
if (isPostLollipopMR1) {
|
191
|
-
this.rippleDrawable.setColor(getColorStateList(
|
192
|
+
this.rippleDrawable.setColor(color ? getColorStateList(nColor) : null);
|
192
193
|
}
|
193
194
|
else {
|
194
|
-
this.rippleDrawable.rippleShape.getPaint().setColor(
|
195
|
+
this.rippleDrawable.rippleShape.getPaint().setColor(nColor);
|
195
196
|
}
|
196
197
|
}
|
197
198
|
}
|
199
|
+
[rippleColorAlphaProperty.setNative](value) {
|
200
|
+
if (this.rippleColor) {
|
201
|
+
this[rippleColorProperty.setNative](this.rippleColor);
|
202
|
+
}
|
203
|
+
}
|
198
204
|
[backgroundInternalProperty.setNative](value) {
|
199
205
|
super[backgroundInternalProperty.setNative](value);
|
200
206
|
if (this.nativeViewProtected) {
|
package/ripple.android.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ripple.android.js","sourceRoot":"../src/","sources":["ripple.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;
|
1
|
+
{"version":3,"file":"ripple.android.js","sourceRoot":"../src/","sources":["ripple.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAC;AACjI,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AACvJ,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,IAAI,aAA0D,CAAC;AA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AAC,CAAC,KAAsD;QACzF,KAAK,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC1B,IAAI,KAAK,YAAY,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE;aACxD;iBAAM;gBACH,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;gBAC3B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;aACxK;SACJ;IACL,CAAC;CACJ"}
|
package/ripple.ios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getRippleColor, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
|
1
|
+
import { getRippleColor, rippleColorAlphaProperty, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
|
2
2
|
import { Color } from '@nativescript/core';
|
3
3
|
import { RippleBase } from './ripple-common';
|
4
4
|
export class Ripple extends RippleBase {
|
@@ -14,7 +14,12 @@ export class Ripple extends RippleBase {
|
|
14
14
|
return view;
|
15
15
|
}
|
16
16
|
[rippleColorProperty.setNative](color) {
|
17
|
-
this.inkTouchController.rippleView.rippleColor = getRippleColor(color);
|
17
|
+
this.inkTouchController.rippleView.rippleColor = getRippleColor(color, this.rippleColorAlpha);
|
18
|
+
}
|
19
|
+
[rippleColorAlphaProperty.setNative](value) {
|
20
|
+
if (this.rippleColor) {
|
21
|
+
this[rippleColorProperty.setNative](this.rippleColor);
|
22
|
+
}
|
18
23
|
}
|
19
24
|
}
|
20
25
|
//# sourceMappingURL=ripple.ios.js.map
|
package/ripple.ios.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ripple.ios.js","sourceRoot":"../src/","sources":["ripple.ios.ts"],"names":[],"mappings":"A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