@nativescript-community/ui-card 1.0.1 → 1.0.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 +4 -0
- package/index.android.js +7 -9
- package/index.android.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.2](https://github.com/nativescript-community/ui-native-components/compare/v1.0.1...v1.0.2) (2026-10-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-card
|
|
9
|
+
|
|
6
10
|
## [1.0.1](https://github.com/nativescript-community/ui-native-components/compare/v1.0.0...v1.0.1) (2026-10-19)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/index.android.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Color, Utils, backgroundColorProperty, backgroundInternalProperty } from '@nativescript/core';
|
|
2
2
|
import { CardBase, variantProperty } from './index-common';
|
|
3
3
|
export * from './index-common';
|
|
4
|
-
// R
|
|
5
|
-
function getAttr(
|
|
6
|
-
return
|
|
7
|
-
.getDeclaredField(field)
|
|
8
|
-
.get(null);
|
|
4
|
+
// the R classes are blacklisted from the native metadata and stripped by R8 in some apps: look the ids up by name
|
|
5
|
+
function getAttr(name) {
|
|
6
|
+
return Utils.android.resources.getId(':attr/' + name);
|
|
9
7
|
}
|
|
10
8
|
function themeColor(context, attr, fallback) {
|
|
11
9
|
const value = new android.util.TypedValue();
|
|
@@ -37,17 +35,17 @@ export class Card extends CardBase {
|
|
|
37
35
|
const dp = (value) => Utils.layout.toDevicePixels(value);
|
|
38
36
|
let color;
|
|
39
37
|
let strokeWidth = 0;
|
|
40
|
-
let strokeColor = themeColor(context, getAttr('
|
|
38
|
+
let strokeColor = themeColor(context, getAttr('colorOutlineVariant'), android.graphics.Color.LTGRAY);
|
|
41
39
|
let elevation = 0;
|
|
42
40
|
if (variant === 'filled') {
|
|
43
|
-
color = themeColor(context, getAttr('
|
|
41
|
+
color = themeColor(context, getAttr('colorSurfaceContainerHighest'), android.graphics.Color.LTGRAY);
|
|
44
42
|
}
|
|
45
43
|
else if (variant === 'outlined') {
|
|
46
|
-
color = themeColor(context, getAttr('
|
|
44
|
+
color = themeColor(context, getAttr('colorSurface'), android.graphics.Color.WHITE);
|
|
47
45
|
strokeWidth = dp(1);
|
|
48
46
|
}
|
|
49
47
|
else {
|
|
50
|
-
color = themeColor(context, getAttr('
|
|
48
|
+
color = themeColor(context, getAttr('colorSurfaceContainerLow'), android.graphics.Color.WHITE);
|
|
51
49
|
elevation = dp(1);
|
|
52
50
|
}
|
|
53
51
|
const user = this.mUserBackground;
|
package/index.android.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../src/ui-card/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAe,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,cAAc,gBAAgB,CAAC;AAE/B,
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../src/ui-card/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAe,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACxE,cAAc,gBAAgB,CAAC;AAE/B,kHAAkH;AAClH,SAAS,OAAO,CAAC,IAAY;IACzB,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,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AAC,CAAC;QACjC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,KAAkB;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IACD,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,KAAY;QAC5C,IAAI,CAAC,UAAU,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1F,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IACD,wGAAwG;IACxG,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC,KAAiB;QACpD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-card",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Card for grouping content: Material 3 MaterialCardView on Android, a grouped rounded surface on iOS (no glass: the HIG keeps Liquid Glass for controls).",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"readmeFilename": "README.md",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@nativescript-community/ui-core": "^1.0.
|
|
47
|
+
"@nativescript-community/ui-core": "^1.0.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "b4ee0e6f8648feb7e7c50b4b017dedde0a802928"
|
|
50
50
|
}
|