@sphereon/ui-components.ssi-react-native 0.1.3-unstable.25 → 0.1.3-unstable.30
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/dist/components/labels/SSIStatusLabel/index.js +1 -1
- package/dist/components/views/SSICredentialCardView/index.js +7 -10
- package/dist/components/views/SSICredentialMiniCardView/index.js +3 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/styles/components/components/SSICredentialMiniCardView/index.js +1 -1
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/index.js +2 -0
- package/package.json +3 -3
- package/dist/components/assets/loaders/SSILoader/index.d.ts +0 -14
- package/dist/components/assets/loaders/SSILoader/index.js +0 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CredentialStatus, IssuerStatus, statusColors, getStatusTranslation } from '@sphereon/ui-components.core';
|
|
3
|
-
import { SSIStatusLabelBadgeContainer as BadgeContainer, SSIStatusLabelContainerStyled as Container, SSIStatusLabelStatusCaptionStyled as StatusCaption, } from '../../../styles/components';
|
|
4
3
|
import SSICheckmarkBadge from '../../../components/assets/badges/SSICheckmarkBadge';
|
|
5
4
|
import SSIExclamationMarkBadge from '../../../components/assets/badges/SSIExclamationMarkBadge';
|
|
5
|
+
import { SSIStatusLabelBadgeContainer as BadgeContainer, SSIStatusLabelContainerStyled as Container, SSIStatusLabelStatusCaptionStyled as StatusCaption, } from '../../../styles';
|
|
6
6
|
const SSIStatusLabel = (props) => {
|
|
7
7
|
const { status, color = statusColors[status], style, showIcon = false } = props;
|
|
8
8
|
return (<Container style={[style, { borderColor: color }]}>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import { backgroundColors, credentialCardColors, Localization, toLocalDateString } from '@sphereon/ui-components.core';
|
|
3
|
+
import { backgroundColors, credentialCardColors, Localization, toLocalDateString, } from '@sphereon/ui-components.core';
|
|
4
4
|
import SSILogo from '../../assets/logos/SSILogo';
|
|
5
5
|
import SSIStatusLabel from '../../labels/SSIStatusLabel';
|
|
6
|
-
import { SSIAlphaContainerStyled as AlphaContainer, SSICredentialCardViewBackgroundImageStyled as BackgroundImage, SSIBlurredContainerStyled as BlurredView, SSICredentialCardViewContainerStyled as Container, SSICredentialCardViewContentMainContainerStyled as ContentMainContainer, SSICredentialCardViewContentSubContainerStyled as ContentSubContainer, SSICredentialCardViewStatusContainerStyled as StatusContainer, SSICredentialCardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICredentialCardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICredentialCardViewFooterContainerStyled as FooterContainer, SSICredentialCardViewFooterContentContainerStyled as FooterContentContainer, SSITextH4LightStyled as H4Text, SSICredentialCardViewHeaderContainerStyled as HeaderContainer, SSICredentialCardViewContentIssueNameContainerStyled as IssueNameContainer, SSICredentialCardViewHeaderLogoContainerStyled as LogoContainer, SSICredentialCardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICredentialCardViewHeaderTitleContainerStyled as TitleContainer, } from '../../../styles
|
|
6
|
+
import { SSIAlphaContainerStyled as AlphaContainer, SSICredentialCardViewBackgroundImageStyled as BackgroundImage, SSIBlurredContainerStyled as BlurredView, SSICredentialCardViewContainerStyled as Container, SSICredentialCardViewContentMainContainerStyled as ContentMainContainer, SSICredentialCardViewContentSubContainerStyled as ContentSubContainer, SSICredentialCardViewStatusContainerStyled as StatusContainer, SSICredentialCardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICredentialCardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICredentialCardViewFooterContainerStyled as FooterContainer, SSICredentialCardViewFooterContentContainerStyled as FooterContentContainer, SSITextH4LightStyled as H4Text, SSICredentialCardViewHeaderContainerStyled as HeaderContainer, SSICredentialCardViewContentIssueNameContainerStyled as IssueNameContainer, SSICredentialCardViewHeaderLogoContainerStyled as LogoContainer, SSICredentialCardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICredentialCardViewHeaderTitleContainerStyled as TitleContainer, } from '../../../styles';
|
|
7
7
|
const SSICredentialCardView = (props) => {
|
|
8
8
|
const { header, body, footer } = props;
|
|
9
9
|
const { credentialTitle, credentialSubtitle, logo } = props.header ?? {};
|
|
10
10
|
const { issuerName, properties } = props.body ?? {};
|
|
11
11
|
const { credentialStatus, expirationDate } = props.footer ?? {};
|
|
12
|
-
const { backgroundColor = credentialCardColors.default, backgroundImage, textColor = backgroundColors.primaryLight
|
|
12
|
+
const { backgroundColor = credentialCardColors.default, backgroundImage, textColor = backgroundColors.primaryLight } = props.display ?? {};
|
|
13
13
|
const getPropertyElementsFrom = (properties) => {
|
|
14
14
|
return properties.slice(0, 2).map((property, index) => (<View key={index} style={{
|
|
15
15
|
...(properties.length > 1 && { width: 140 }),
|
|
@@ -23,10 +23,9 @@ const SSICredentialCardView = (props) => {
|
|
|
23
23
|
<BackgroundImage source={backgroundImage}>
|
|
24
24
|
<AlphaContainer>
|
|
25
25
|
{header && (<HeaderContainer>
|
|
26
|
-
{(!backgroundImage || logo) &&
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</LogoContainer>}
|
|
26
|
+
{(!backgroundImage || logo) && (<LogoContainer>
|
|
27
|
+
<SSILogo logo={logo} color={textColor}/>
|
|
28
|
+
</LogoContainer>)}
|
|
30
29
|
{credentialTitle && (<TitleContainer>
|
|
31
30
|
<CredentialTitleText style={{ color: textColor }} numberOfLines={2}>
|
|
32
31
|
{credentialTitle}
|
|
@@ -50,9 +49,7 @@ const SSICredentialCardView = (props) => {
|
|
|
50
49
|
? `${Localization.translate('credential_card_expires_message')} ${toLocalDateString(expirationDate)}`
|
|
51
50
|
: Localization.translate('credential_status_never_expires_date_label')}
|
|
52
51
|
</ExpirationDateText>
|
|
53
|
-
{credentialStatus && (<StatusContainer>
|
|
54
|
-
{credentialStatus && <SSIStatusLabel status={credentialStatus} color={textColor}/>}
|
|
55
|
-
</StatusContainer>)}
|
|
52
|
+
{credentialStatus && (<StatusContainer>{credentialStatus && <SSIStatusLabel status={credentialStatus} color={textColor}/>}</StatusContainer>)}
|
|
56
53
|
</FooterContentContainer>
|
|
57
54
|
</BlurredView>
|
|
58
55
|
</FooterContainer>)}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { credentialCardColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSILogo from '../../assets/logos/SSILogo';
|
|
4
|
-
import { SSICredentialMiniCardViewBackgroundImageStyled as BackgroundImage, SSICredentialMiniCardViewContainerStyled as Container
|
|
4
|
+
import { SSICredentialMiniCardViewBackgroundImageStyled as BackgroundImage, SSICredentialMiniCardViewContainerStyled as Container } from '../../../styles';
|
|
5
5
|
const SSICredentialMiniCardView = (props) => {
|
|
6
6
|
const { backgroundColor = credentialCardColors.default, backgroundImage, logo, logoColor, style } = props;
|
|
7
7
|
return (<Container style={[style, { backgroundColor }]}>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<SSILogo logo={logo} color={logoColor}/>}
|
|
11
|
-
</BackgroundImage>
|
|
12
|
-
</Container>);
|
|
8
|
+
<BackgroundImage source={backgroundImage}>{(!backgroundImage || logo) && <SSILogo logo={logo} color={logoColor}/>}</BackgroundImage>
|
|
9
|
+
</Container>);
|
|
13
10
|
};
|
|
14
11
|
export default SSICredentialMiniCardView;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
|
|
|
5
5
|
import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
|
|
6
6
|
import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
|
|
7
7
|
import SSILogo from './components/assets/logos/SSILogo';
|
|
8
|
-
|
|
9
|
-
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo
|
|
8
|
+
export * from './styles/components/fonts';
|
|
9
|
+
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo };
|
package/dist/index.js
CHANGED
|
@@ -5,5 +5,5 @@ import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
|
|
|
5
5
|
import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
|
|
6
6
|
import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
|
|
7
7
|
import SSILogo from './components/assets/logos/SSILogo';
|
|
8
|
-
|
|
9
|
-
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo
|
|
8
|
+
export * from './styles/components/fonts';
|
|
9
|
+
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo };
|
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.1.3-unstable.
|
|
4
|
+
"version": "0.1.3-unstable.30+15069b0",
|
|
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-community/blur": "^4.3.0",
|
|
32
|
-
"@sphereon/ui-components.core": "0.1.3-unstable.
|
|
32
|
+
"@sphereon/ui-components.core": "0.1.3-unstable.30+15069b0",
|
|
33
33
|
"react-native-fast-image": "^8.6.3",
|
|
34
34
|
"react-native-size-matters": "^0.4.0",
|
|
35
35
|
"react-native-svg": "13.4.0",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react": ">= 16.8.0",
|
|
47
47
|
"react-native": ">= 0.64.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "15069b0fe7847904e9a164e3d7a7e8765b1f9578"
|
|
50
50
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PureComponent } from 'react';
|
|
2
|
-
import { ColorValue, NativeEventSubscription, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
type Props = {
|
|
4
|
-
size: number | 'small' | 'large';
|
|
5
|
-
color?: ColorValue;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export default class SSILoader extends PureComponent<Props> {
|
|
9
|
-
hardwareBackPressListener: NativeEventSubscription;
|
|
10
|
-
componentDidMount: () => void;
|
|
11
|
-
componentWillUnmount: () => void;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PureComponent } from 'react';
|
|
2
|
-
import { ActivityIndicator, BackHandler } from 'react-native';
|
|
3
|
-
export default class SSILoader extends PureComponent {
|
|
4
|
-
hardwareBackPressListener;
|
|
5
|
-
componentDidMount = () => {
|
|
6
|
-
this.hardwareBackPressListener = BackHandler.addEventListener('hardwareBackPress', () => true);
|
|
7
|
-
};
|
|
8
|
-
componentWillUnmount = () => {
|
|
9
|
-
this.hardwareBackPressListener.remove();
|
|
10
|
-
};
|
|
11
|
-
render() {
|
|
12
|
-
return (<ActivityIndicator style={this.props.style} size={this.props.size} color={this.props.color}/>);
|
|
13
|
-
}
|
|
14
|
-
}
|