@sphereon/ui-components.ssi-react-native 0.5.2-next.2 → 0.5.3-next.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.
|
@@ -15,11 +15,13 @@ const SSICredentialCardView = (props) => {
|
|
|
15
15
|
const { issuerName, properties } = props.body ?? {};
|
|
16
16
|
const { credentialStatus, expirationDate } = props.footer ?? {};
|
|
17
17
|
const { backgroundColor = ui_components_core_1.credentialCardColors.default, backgroundImage, textColor = ui_components_core_1.backgroundColors.primaryLight } = props.display ?? {};
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const RIBBON_STATES = [
|
|
19
|
+
ui_components_core_1.CredentialStatus.REVOKED,
|
|
20
|
+
ui_components_core_1.CredentialStatus.EXPIRED,
|
|
21
|
+
ui_components_core_1.CredentialStatus.SUSPENDED,
|
|
22
|
+
ui_components_core_1.CredentialStatus.UNTRUSTED,
|
|
23
|
+
];
|
|
24
|
+
const statusRibbonColor = credentialStatus && RIBBON_STATES.includes(credentialStatus) ? ui_components_core_1.statusColors[credentialStatus] : undefined;
|
|
23
25
|
const getPropertyElementsFrom = (properties) => {
|
|
24
26
|
return properties.slice(0, 2).map((property, index) => (<react_native_1.View key={index} style={{
|
|
25
27
|
...(properties.length > 1 && { width: 140 }),
|
|
@@ -62,9 +64,7 @@ const SSICredentialCardView = (props) => {
|
|
|
62
64
|
: ui_components_core_1.Localization.translate('credential_status_never_expires_date_label')}
|
|
63
65
|
</styles_1.SSITextH5LightStyled>
|
|
64
66
|
{credentialStatus && (<styles_1.SSICredentialCardViewStatusContainerStyled>
|
|
65
|
-
{credentialStatus && (<SSIStatusLabel_1.default status={credentialStatus} color={credentialStatus
|
|
66
|
-
? ui_components_core_1.statusColors[credentialStatus]
|
|
67
|
-
: textColor}/>)}
|
|
67
|
+
{credentialStatus && (<SSIStatusLabel_1.default status={credentialStatus} color={RIBBON_STATES.includes(credentialStatus) ? ui_components_core_1.statusColors[credentialStatus] : textColor}/>)}
|
|
68
68
|
</styles_1.SSICredentialCardViewStatusContainerStyled>)}
|
|
69
69
|
</styles_1.SSICredentialCardViewFooterContentContainerStyled>
|
|
70
70
|
</styles_1.SSICredentialCardViewFooterContainerStyled>)}
|
|
@@ -10,11 +10,13 @@ const SSILogo_1 = __importDefault(require("../../assets/logos/SSILogo"));
|
|
|
10
10
|
const styles_1 = require("../../../styles");
|
|
11
11
|
const SSICredentialMiniCardView = (props) => {
|
|
12
12
|
const { backgroundColor = ui_components_core_1.credentialCardColors.default, backgroundImage, logo, logoColor, credentialStatus, style } = props;
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const RIBBON_STATES = [
|
|
14
|
+
ui_components_core_1.CredentialStatus.REVOKED,
|
|
15
|
+
ui_components_core_1.CredentialStatus.EXPIRED,
|
|
16
|
+
ui_components_core_1.CredentialStatus.SUSPENDED,
|
|
17
|
+
ui_components_core_1.CredentialStatus.UNTRUSTED,
|
|
18
|
+
];
|
|
19
|
+
const ribbonColor = credentialStatus && RIBBON_STATES.includes(credentialStatus) ? ui_components_core_1.statusColors[credentialStatus] : undefined;
|
|
18
20
|
return (<styles_1.SSICredentialMiniCardViewContainerStyled style={[style, { backgroundColor }]}>
|
|
19
21
|
<styles_1.SSICredentialMiniCardViewBackgroundImageStyled source={backgroundImage}>{(!backgroundImage || logo) && <SSILogo_1.default logo={logo} color={logoColor}/>}</styles_1.SSICredentialMiniCardViewBackgroundImageStyled>
|
|
20
22
|
{ribbonColor && credentialStatus && (<react_native_1.View style={{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react-native",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.3-next.2+6890c77",
|
|
5
5
|
"description": "SSI UI components for React-Native",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
32
|
-
"@sphereon/ui-components.core": "0.5.
|
|
32
|
+
"@sphereon/ui-components.core": "0.5.3-next.2+6890c77",
|
|
33
33
|
"expo-blur": "^15.0.8",
|
|
34
34
|
"expo-image": "~2.0.6",
|
|
35
35
|
"expo-linear-gradient": "~13.0.2",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": ">= 18.2",
|
|
47
47
|
"react-native": "~0.74.3"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "6890c77c064756068d0f1751e49bf9349afd1689"
|
|
50
50
|
}
|