@nativescript-community/ui-material-ripple 7.1.4 → 7.2.0
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.d.ts +1 -1
- package/ripple.android.js +8 -8
- package/ripple.android.js.map +1 -1
- package/angular/index.d.ts +0 -10
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-material-ripple",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.2.0",
|
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.
|
49
|
+
"@nativescript-community/ui-material-core": "^7.2.0"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "6f0934230139071de6eb0579837644924313334d"
|
52
52
|
}
|
package/ripple.android.d.ts
CHANGED
@@ -5,5 +5,5 @@ export declare class Ripple extends RippleBase {
|
|
5
5
|
createNativeView(): globalAndroid.view.View;
|
6
6
|
rippleDrawable: android.graphics.drawable.Drawable;
|
7
7
|
getRippleColor(): any;
|
8
|
-
setRippleDrawable(view: android.view.View,
|
8
|
+
setRippleDrawable(view: android.view.View, topLeftRadius?: number, topRightRadius?: number, bottomRightRadius?: number, bottomLeftRadius?: number): void;
|
9
9
|
}
|
package/ripple.android.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { getRippleColor, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { createRippleDrawable, getColorStateList, isPostLollipopMR1, isPostMarshmallow } from '@nativescript-community/ui-material-core/android/utils';
|
3
|
+
import { Background, Color, Length, backgroundInternalProperty } from '@nativescript/core';
|
4
4
|
import { RippleBase } from './ripple-common';
|
5
5
|
let MDStackLayout;
|
6
6
|
const DEFAULT_STROKE_VALUE = -1;
|
7
7
|
function initMDStackLayout() {
|
8
8
|
if (!MDStackLayout) {
|
9
|
-
if (isPostLollipopMR1
|
9
|
+
if (isPostLollipopMR1) {
|
10
10
|
MDStackLayout = org.nativescript.widgets.StackLayout;
|
11
11
|
}
|
12
12
|
else {
|
@@ -174,20 +174,20 @@ export class Ripple extends RippleBase {
|
|
174
174
|
}
|
175
175
|
return getRippleColor(themer.getAccentColor());
|
176
176
|
}
|
177
|
-
setRippleDrawable(view,
|
177
|
+
setRippleDrawable(view, topLeftRadius = 0, topRightRadius = 0, bottomRightRadius = 0, bottomLeftRadius = 0) {
|
178
178
|
if (!this.rippleDrawable) {
|
179
|
-
this.rippleDrawable = createRippleDrawable(this.getRippleColor(),
|
180
|
-
if (isPostMarshmallow
|
179
|
+
this.rippleDrawable = createRippleDrawable(this.getRippleColor(), topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius);
|
180
|
+
if (isPostMarshmallow) {
|
181
181
|
view.setForeground(this.rippleDrawable);
|
182
182
|
}
|
183
183
|
}
|
184
184
|
}
|
185
185
|
[rippleColorProperty.setNative](color) {
|
186
186
|
if (!this.rippleDrawable) {
|
187
|
-
this.setRippleDrawable(this.nativeViewProtected);
|
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
|
-
if (isPostLollipopMR1
|
190
|
+
if (isPostLollipopMR1) {
|
191
191
|
this.rippleDrawable.setColor(getColorStateList(color.android));
|
192
192
|
}
|
193
193
|
else {
|
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;AACvG,OAAO,EAAE,
|
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;AACvG,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;AAE/D,MAAM,oBAAoB,GAAG,CAAC,CAAC,CAAC;AAChC,SAAS,iBAAiB;IACtB,IAAI,CAAC,aAAa,EAAE;QAChB,IAAI,iBAAiB,EAAE;YACnB,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC;SACxD;aAAM;YACH,gCAAgC,EAAE,CAAC;YACnC,aAAa,GAAG,sBAA6B,CAAC;SACjD;KACJ;AACL,CAAC;AAMD,wCAAwC;AACxC,IAAI,sBAA8C,CAAC;AAEnD,SAAS,gCAAgC;IACrC,IAAI,sBAAsB,EAAE;QACxB,OAAO;KACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoKD,sBAAsB,GAAG,0BAAiC,CAAC;AAC/D,CAAC;AAED,MAAM,OAAO,MAAO,SAAQ,UAAU;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SACL;aAAM;YACH,IAAI,iBAAiB,EAAE;gBAClB,IAAI,CAAC,cAA2D,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aAChH;iBAAM;gBACF,IAAI,CAAC,cAAsB,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;aACvF;SACJ;IACL,CAAC;IAED,CAAC,0BAA0B,CAAC,SAAS,CAAC,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,CAAC,CAAC;aAC/E;SACJ;IACL,CAAC;CACJ"}
|
package/angular/index.d.ts
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as i0 from "@angular/core";
|
2
|
-
export declare class MaterialRippleDirective {
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MaterialRippleDirective, never>;
|
4
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MaterialRippleDirective, "MDRipple", never, {}, {}, never, never, false, never>;
|
5
|
-
}
|
6
|
-
export declare class NativeScriptMaterialRippleModule {
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NativeScriptMaterialRippleModule, never>;
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NativeScriptMaterialRippleModule, [typeof MaterialRippleDirective], never, [typeof MaterialRippleDirective]>;
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NativeScriptMaterialRippleModule>;
|
10
|
-
}
|