@sphereon/ui-components.ssi-react-native 0.1.1-next.18

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.
Files changed (31) hide show
  1. package/LICENSE +636 -0
  2. package/README.md +30 -0
  3. package/dist/components/assets/badges/SSICheckmarkBadge/index.d.ts +9 -0
  4. package/dist/components/assets/badges/SSICheckmarkBadge/index.js +14 -0
  5. package/dist/components/assets/badges/SSIExclamationMarkBadge/index.d.ts +9 -0
  6. package/dist/components/assets/badges/SSIExclamationMarkBadge/index.js +14 -0
  7. package/dist/components/assets/logos/SSILogo/index.d.ts +11 -0
  8. package/dist/components/assets/logos/SSILogo/index.js +13 -0
  9. package/dist/components/assets/logos/SSIPlaceholderLogo/index.d.ts +9 -0
  10. package/dist/components/assets/logos/SSIPlaceholderLogo/index.js +18 -0
  11. package/dist/components/labels/SSIStatusLabel/index.d.ts +11 -0
  12. package/dist/components/labels/SSIStatusLabel/index.js +29 -0
  13. package/dist/components/views/SSICardView/index.d.ts +33 -0
  14. package/dist/components/views/SSICardView/index.js +63 -0
  15. package/dist/index.d.ts +7 -0
  16. package/dist/index.js +7 -0
  17. package/dist/styles/components/components/SSICardView/index.d.ts +14 -0
  18. package/dist/styles/components/components/SSICardView/index.js +52 -0
  19. package/dist/styles/components/components/SSIStatusLabel/index.d.ts +4 -0
  20. package/dist/styles/components/components/SSIStatusLabel/index.js +15 -0
  21. package/dist/styles/components/components/index.d.ts +2 -0
  22. package/dist/styles/components/components/index.js +2 -0
  23. package/dist/styles/components/containers/index.d.ts +9 -0
  24. package/dist/styles/components/containers/index.js +21 -0
  25. package/dist/styles/components/fonts/index.d.ts +9 -0
  26. package/dist/styles/components/fonts/index.js +43 -0
  27. package/dist/styles/components/index.d.ts +3 -0
  28. package/dist/styles/components/index.js +3 -0
  29. package/dist/styles/typography.d.ts +4 -0
  30. package/dist/styles/typography.js +86 -0
  31. package/package.json +50 -0
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import Svg, { Circle, Path } from 'react-native-svg';
4
+ import { fontColors, statusColors } from '@sphereon/ui-components.core';
5
+ const SSICheckmarkBadge = (props) => {
6
+ const { size = 15, color = fontColors.light, backgroundColor = statusColors.valid } = props;
7
+ return (<View style={{ width: size, aspectRatio: 1 }}>
8
+ <Svg width="100%" height="100%" viewBox="0 0 15 15" fill="none">
9
+ <Circle cx="7.5" cy="7.5" r="7.5" fill={backgroundColor}/>
10
+ <Path d="M5.91233 11.0361H5.9092C5.84998 11.0357 5.79144 11.0236 5.73697 11.0005C5.6825 10.9774 5.63319 10.9437 5.59192 10.9015L3.13412 8.38546C3.09155 8.34399 3.05776 8.29447 3.03473 8.23981C3.0117 8.18516 2.99989 8.12647 3 8.06722C3.00011 8.00796 3.01214 7.94932 3.03538 7.89475C3.05862 7.84018 3.09259 7.79079 3.13531 7.74947C3.17803 7.70815 3.22863 7.67575 3.28412 7.65417C3.33962 7.63259 3.3989 7.62226 3.45847 7.6238C3.51804 7.62534 3.5767 7.63871 3.63099 7.66312C3.68529 7.68754 3.73413 7.72251 3.77463 7.76597L5.91665 9.95833L10.9927 4.91088C11.077 4.82993 11.1898 4.78514 11.307 4.78615C11.4242 4.78716 11.5363 4.8339 11.6191 4.91629C11.702 4.99869 11.749 5.11015 11.75 5.22667C11.751 5.34319 11.706 5.45544 11.6246 5.53926L6.22827 10.9059C6.14448 10.9893 6.03084 11.0361 5.91233 11.0361Z" fill={color}/>
11
+ </Svg>
12
+ </View>);
13
+ };
14
+ export default SSICheckmarkBadge;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { ColorValue } from 'react-native';
3
+ type Props = {
4
+ size?: number;
5
+ color?: ColorValue;
6
+ backgroundColor?: ColorValue;
7
+ };
8
+ declare const SSIExclamationMarkBadge: FC<Props>;
9
+ export default SSIExclamationMarkBadge;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import Svg, { Circle, Path } from 'react-native-svg';
4
+ import { fontColors, statusColors } from '@sphereon/ui-components.core';
5
+ const SSIExclamationMarkBadge = (props) => {
6
+ const { size = 15, color = fontColors.light, backgroundColor = statusColors.error } = props;
7
+ return (<View style={{ width: size, aspectRatio: 1 }}>
8
+ <Svg width="100%" height="100%" viewBox="0 0 15 15" fill="none">
9
+ <Circle cx="7.5" cy="7.5" r="7.5" fill={backgroundColor}/>
10
+ <Path fill-rule="evenodd" clip-rule="evenodd" d="M6.78571 3.48218C6.78571 3.33429 6.94559 3.21429 7.14279 3.21429H7.8572C8.05439 3.21429 8.21428 3.33429 8.21428 3.48218V9.37504C8.21428 9.52293 8.05439 9.64283 7.8572 9.64283H7.14279C6.94559 9.64283 6.78571 9.52292 6.78571 9.37504V3.48218ZM6.78571 10.9822C6.78571 10.8342 6.94559 10.7143 7.14279 10.7143H7.8572C8.05439 10.7143 8.21428 10.8342 8.21428 10.9822V11.5178C8.21428 11.6657 8.05439 11.7857 7.8572 11.7857H7.14279C6.94559 11.7857 6.78571 11.6657 6.78571 11.5178V10.9822Z" fill={color}/>
11
+ </Svg>
12
+ </View>);
13
+ };
14
+ export default SSIExclamationMarkBadge;
@@ -0,0 +1,11 @@
1
+ import { ImageAttributes } from '@sphereon/ui-components.core';
2
+ import { FC } from 'react';
3
+ import { ColorValue, ViewStyle } from 'react-native';
4
+ type Props = {
5
+ logo?: ImageAttributes;
6
+ size?: number;
7
+ color?: ColorValue;
8
+ style?: ViewStyle;
9
+ };
10
+ declare const SSILogo: FC<Props>;
11
+ export default SSILogo;
@@ -0,0 +1,13 @@
1
+ import { calculateAspectRatio, logoColors } from '@sphereon/ui-components.core';
2
+ import React from 'react';
3
+ import FastImage from 'react-native-fast-image';
4
+ import SSIPlaceholderLogo from '../SSIPlaceholderLogo';
5
+ const SSILogo = (props) => {
6
+ const { logo, color = logoColors.default, size = 32, style } = props;
7
+ return logo ? (<FastImage style={{
8
+ ...style,
9
+ aspectRatio: logo?.dimensions && calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height),
10
+ height: 32,
11
+ }} source={logo}/>) : (<SSIPlaceholderLogo style={style} size={size} color={color}/>);
12
+ };
13
+ export default SSILogo;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { ColorValue, ViewStyle } from 'react-native';
3
+ type Props = {
4
+ size?: number;
5
+ color?: ColorValue;
6
+ style?: ViewStyle;
7
+ };
8
+ declare const SSIPlaceholderLogo: FC<Props>;
9
+ export default SSIPlaceholderLogo;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import Svg, { Path } from 'react-native-svg';
4
+ import { logoColors } from '@sphereon/ui-components.core';
5
+ const SSIPlaceholderLogo = (props) => {
6
+ const { color = logoColors.default, size = 32, style } = props;
7
+ return (<View style={[style, { width: size, aspectRatio: 1 }]}>
8
+ <Svg width="100%" height="100%" viewBox="0 0 32 32" fill="none">
9
+ <Path d="M15.9997 31.9999C11.7563 31.9999 7.68645 30.3141 4.68603 27.3136C1.68548 24.313 0 20.2435 0 15.9999C0 11.7563 1.68548 7.68669 4.68603 4.68627C7.68657 1.68572 11.7561 0 15.9997 0C20.2433 0 24.3129 1.68572 27.3133 4.68627C30.3139 7.68657 31.9994 11.7563 31.9994 15.9999C31.9947 20.2419 30.3075 24.3089 27.3079 27.3082C24.3083 30.3077 20.2415 31.9949 15.9997 31.9999ZM15.9997 0.914927V0.914691C11.9987 0.914691 8.16186 2.50412 5.33238 5.33317C2.50339 8.1624 0.9139 11.9997 0.9139 16.0005C0.9139 20.0015 2.50333 23.8383 5.33238 26.6678C8.16137 29.4968 11.9983 31.0863 15.9997 31.0863C20.0011 31.0863 23.8375 29.4968 26.667 26.6678C29.496 23.8388 31.0855 20.0018 31.0855 16.0005C31.081 12.0009 29.4901 8.16627 26.662 5.33861C23.834 2.51059 19.9997 0.919705 16.0002 0.915174L15.9997 0.914927Z" fill={color}/>
10
+ <Path d="M30.1659 10.0545C30.0927 10.0545 30.0205 10.0368 29.9556 10.0028C26.3647 8.13584 21.2781 7.06476 15.9997 7.06476C10.7214 7.06476 5.63448 8.13578 2.04387 10.0028C1.93604 10.0625 1.80862 10.0762 1.6904 10.0405C1.57241 10.0049 1.47355 9.92327 1.41668 9.81378C1.35981 9.70429 1.34966 9.5764 1.38836 9.45936C1.42706 9.34232 1.51154 9.24581 1.62244 9.19177C5.39433 7.23065 10.4993 6.15039 16 6.15039C21.5006 6.15039 26.6056 7.23065 30.3775 9.19177C30.5643 9.28899 30.6604 9.50136 30.6104 9.70594C30.5603 9.91052 30.377 10.0545 30.1663 10.0545L30.1659 10.0545Z" fill={color}/>
11
+ <Path d="M15.9996 25.848C10.4929 25.848 5.38486 24.7664 1.61726 22.8022C1.39333 22.6856 1.30626 22.4095 1.42282 22.1856C1.53963 21.9617 1.8157 21.8746 2.03964 21.9912C5.62728 23.8614 10.7147 24.9339 15.9997 24.9339C21.2848 24.9339 26.3722 23.8614 29.9598 21.9914V21.9912C30.1838 21.8746 30.4598 21.9617 30.5766 22.1856C30.6932 22.4096 30.6061 22.6856 30.3822 22.8022C26.6146 24.7666 21.5066 25.8481 15.9999 25.8481L15.9996 25.848Z" fill={color}/>
12
+ <Path d="M15.9995 32.0001C11.3852 32.0001 7.77148 24.9717 7.77148 16.0007C7.77148 7.02959 11.3855 0.0012207 15.9995 0.0012207C20.6136 0.0012207 24.2276 7.02899 24.2276 16.0007C24.2276 24.9723 20.6136 32.0001 15.9995 32.0001ZM15.9995 0.915181C11.9666 0.915181 8.68545 7.68078 8.68545 16.0007C8.68545 24.3205 11.9668 31.0861 15.9995 31.0861C20.0323 31.0861 23.3136 24.3205 23.3136 16.0007C23.3136 7.68078 20.0323 0.915181 15.9995 0.915181Z" fill={color}/>
13
+ <Path d="M16 31.9998C15.7476 31.9998 15.543 31.795 15.543 31.5425V0.457553C15.543 0.205069 15.7476 0.000488281 16 0.000488281C16.2525 0.000488281 16.4571 0.205069 16.4571 0.457553V31.5425C16.4571 31.6638 16.409 31.7801 16.3233 31.8658C16.2377 31.9514 16.1213 31.9998 16 31.9998V31.9998Z" fill={color}/>
14
+ <Path d="M31.542 16.4571H0.457065C0.204581 16.4571 0 16.2525 0 16C0 15.7476 0.204581 15.543 0.457065 15.543H31.542C31.7945 15.543 31.9991 15.7476 31.9991 16C31.9991 16.2525 31.7945 16.4571 31.542 16.4571Z" fill={color}/>
15
+ </Svg>
16
+ </View>);
17
+ };
18
+ export default SSIPlaceholderLogo;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { ColorValue, ViewStyle } from 'react-native';
3
+ import { LabelStatus } from '@sphereon/ui-components.core';
4
+ type Props = {
5
+ status: LabelStatus;
6
+ showIcon?: boolean;
7
+ color?: ColorValue;
8
+ style?: ViewStyle;
9
+ };
10
+ declare const SSIStatusLabel: FC<Props>;
11
+ export default SSIStatusLabel;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
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
+ import SSICheckmarkBadge from '../../../components/assets/badges/SSICheckmarkBadge';
5
+ import SSIExclamationMarkBadge from '../../../components/assets/badges/SSIExclamationMarkBadge';
6
+ const SSIStatusLabel = (props) => {
7
+ const { status, color = statusColors[status], style, showIcon = false } = props;
8
+ return (<Container style={[style, { borderColor: color }]}>
9
+ {showIcon && <BadgeContainer>{getStatusBadge(status, color)}</BadgeContainer>}
10
+ <StatusCaption style={{ color }}>{getStatusTranslation(status)}</StatusCaption>
11
+ </Container>);
12
+ };
13
+ const getStatusBadge = (status, backgroundColor) => {
14
+ switch (status) {
15
+ case IssuerStatus.VERIFIED:
16
+ return <SSICheckmarkBadge backgroundColor={backgroundColor}/>;
17
+ case IssuerStatus.UNVERIFIED:
18
+ return <SSIExclamationMarkBadge backgroundColor={backgroundColor}/>;
19
+ case CredentialStatus.VALID:
20
+ return <SSICheckmarkBadge backgroundColor={backgroundColor}/>;
21
+ case CredentialStatus.EXPIRED:
22
+ return <SSIExclamationMarkBadge backgroundColor={backgroundColor}/>;
23
+ case CredentialStatus.REVOKED:
24
+ throw new Error(`${status} not yet implemented`);
25
+ default:
26
+ throw new Error(`${status} not supported`);
27
+ }
28
+ };
29
+ export default SSIStatusLabel;
@@ -0,0 +1,33 @@
1
+ import { FC } from 'react';
2
+ import { ColorValue } from 'react-native';
3
+ import { CredentialStatus, ImageAttributes } from '@sphereon/ui-components.core';
4
+ type CardProperty = {
5
+ name: string;
6
+ value: string;
7
+ };
8
+ type CardHeader = {
9
+ credentialTitle?: string;
10
+ credentialSubtitle?: string;
11
+ logo?: ImageAttributes;
12
+ };
13
+ type CardBody = {
14
+ issuerName?: string;
15
+ properties?: Array<CardProperty>;
16
+ };
17
+ type CardFooter = {
18
+ expirationDate?: number;
19
+ credentialStatus?: CredentialStatus;
20
+ };
21
+ type CardDisplay = {
22
+ backgroundColor?: ColorValue;
23
+ backgroundImage?: ImageAttributes;
24
+ textColor?: ColorValue;
25
+ };
26
+ type Props = {
27
+ header?: CardHeader;
28
+ body?: CardBody;
29
+ footer?: CardFooter;
30
+ display?: CardDisplay;
31
+ };
32
+ declare const SSICardView: FC<Props>;
33
+ export default SSICardView;
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import FastImage from 'react-native-fast-image';
4
+ import { backgroundColors, credentialCardColors, Localization, toLocalDateString, } from '@sphereon/ui-components.core';
5
+ import { SSIAlphaContainerStyled as AlphaContainer, SSIBlurredContainerStyled as BlurredView, SSICardViewContainerStyled as Container, SSICardViewContentMainContainerStyled as ContentMainContainer, SSICardViewContentSubContainerStyled as ContentSubContainer, SSICardViewSSICredentialStatusStyled as CredentialStatusContainer, SSICardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICardViewFooterContainerStyled as FooterContainer, SSICardViewFooterContentContainerStyled as FooterContentContainer, SSITextH4LightStyled as H4Text, SSICardViewHeaderContainerStyled as HeaderContainer, SSICardViewContentIssueNameContainerStyled as IssueNameContainer, SSICardViewHeaderLogoContainerStyled as LogoContainer, SSICardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICardViewHeaderTitleContainerStyled as TitleContainer, } from '../../../styles/components';
6
+ import SSILogo from '../../assets/logos/SSILogo';
7
+ import SSIStatusLabel from '../../labels/SSIStatusLabel';
8
+ const SSICardView = (props) => {
9
+ const { header, body, footer } = props;
10
+ const { credentialTitle, credentialSubtitle, logo } = props.header ?? {};
11
+ const { issuerName, properties } = props.body ?? {};
12
+ const { credentialStatus, expirationDate } = props.footer ?? {};
13
+ const { backgroundColor = credentialCardColors.default, backgroundImage = { uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' }, textColor = backgroundColors.primaryLight, } = props.display ?? {};
14
+ const getPropertyElementsFrom = (properties) => {
15
+ return properties.slice(0, 2).map((property, index) => (<View key={index} style={{
16
+ ...(properties.length > 1 && { width: 140 }),
17
+ ...(index > 0 && { marginLeft: 10 }),
18
+ }}>
19
+ <H4Text style={{ color: textColor }}>{property.name}</H4Text>
20
+ <PropertyValueText style={{ color: textColor }}>{property.value}</PropertyValueText>
21
+ </View>));
22
+ };
23
+ return (<Container style={{ backgroundColor }}>
24
+ <FastImage style={{ flex: 1 }} source={backgroundImage} resizeMode="cover">
25
+ <AlphaContainer>
26
+ {header && (<HeaderContainer>
27
+ <LogoContainer>
28
+ <SSILogo logo={logo} color={textColor}/>
29
+ </LogoContainer>
30
+ {credentialTitle && (<TitleContainer>
31
+ <CredentialTitleText style={{ color: textColor }} numberOfLines={2}>
32
+ {credentialTitle}
33
+ </CredentialTitleText>
34
+ {credentialSubtitle && <CredentialSubtitleText style={{ color: textColor }}>{credentialSubtitle}</CredentialSubtitleText>}
35
+ </TitleContainer>)}
36
+ </HeaderContainer>)}
37
+ {body && (<ContentMainContainer>
38
+ <ContentSubContainer>
39
+ {issuerName && (<IssueNameContainer>
40
+ <H4Text style={{ color: textColor }}>{issuerName}</H4Text>
41
+ </IssueNameContainer>)}
42
+ {properties && <PropertiesContainer>{getPropertyElementsFrom(properties)}</PropertiesContainer>}
43
+ </ContentSubContainer>
44
+ </ContentMainContainer>)}
45
+ {footer && (<FooterContainer>
46
+ <BlurredView>
47
+ <FooterContentContainer>
48
+ <ExpirationDateText style={{ color: textColor }}>
49
+ {expirationDate
50
+ ? `${Localization.translate('credential_card_expires_message')} ${toLocalDateString(expirationDate)}`
51
+ : Localization.translate('credential_status_never_expires_date_label')}
52
+ </ExpirationDateText>
53
+ {credentialStatus && (<CredentialStatusContainer>
54
+ {credentialStatus && <SSIStatusLabel status={credentialStatus} color={textColor}/>}
55
+ </CredentialStatusContainer>)}
56
+ </FooterContentContainer>
57
+ </BlurredView>
58
+ </FooterContainer>)}
59
+ </AlphaContainer>
60
+ </FastImage>
61
+ </Container>);
62
+ };
63
+ export default SSICardView;
@@ -0,0 +1,7 @@
1
+ import SSIStatusLabel from './components/labels/SSIStatusLabel';
2
+ import SSICardView from './components/views/SSICardView';
3
+ import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
4
+ import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
5
+ import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
6
+ import SSILogo from './components/assets/logos/SSILogo';
7
+ export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo };
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import SSIStatusLabel from './components/labels/SSIStatusLabel';
2
+ import SSICardView from './components/views/SSICardView';
3
+ import SSICheckmarkBadge from './components/assets/badges/SSICheckmarkBadge';
4
+ import SSIExclamationMarkBadge from './components/assets/badges/SSIExclamationMarkBadge';
5
+ import SSIPlaceholderLogo from './components/assets/logos/SSIPlaceholderLogo';
6
+ import SSILogo from './components/assets/logos/SSILogo';
7
+ export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo };
@@ -0,0 +1,14 @@
1
+ /// <reference types="styled-components-react-native" />
2
+ export declare const SSICardViewContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, any, {}, never>;
3
+ export declare const SSICardViewHeaderContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, any, {}, never>;
4
+ export declare const SSICardViewHeaderLogoContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const SSICardViewHeaderTitleContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const SSICardViewContentMainContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const SSICardViewContentSubContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const SSICardViewContentIssueNameContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const SSICardViewContentPropertiesContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, any, {}, never>;
10
+ export declare const SSICardViewFooterContentContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, any, {}, never>;
11
+ export declare const SSICardViewFooterContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
12
+ export declare const SSICardViewCredentialTitleTextStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
13
+ export declare const SSICardViewCredentialSubtitleTextStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
14
+ export declare const SSICardViewSSICredentialStatusStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,52 @@
1
+ import styled from 'styled-components/native';
2
+ import { SSIFlexDirectionRowViewStyled, SSIRoundedContainerStyled } from '../../containers';
3
+ import { SSITextH4SemiBoldLightStyled, SSITextH5LightStyled } from '../../fonts';
4
+ export const SSICardViewContainerStyled = styled(SSIRoundedContainerStyled) `
5
+ width: 327px;
6
+ height: 186px;
7
+ `;
8
+ export const SSICardViewHeaderContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
9
+ height: 32px;
10
+ margin-top: 16px;
11
+ `;
12
+ export const SSICardViewHeaderLogoContainerStyled = styled.View `
13
+ margin-left: 9px;
14
+ margin-right: 12px;
15
+ `;
16
+ export const SSICardViewHeaderTitleContainerStyled = styled.View `
17
+ flex: 1;
18
+ margin: 0px 13px 0px auto;
19
+ `;
20
+ export const SSICardViewContentMainContainerStyled = styled.View `
21
+ flex: 1;
22
+ `;
23
+ export const SSICardViewContentSubContainerStyled = styled.View `
24
+ margin-top: auto;
25
+ `;
26
+ export const SSICardViewContentIssueNameContainerStyled = styled.View `
27
+ padding: 2px 9px 2px 12px;
28
+ `;
29
+ export const SSICardViewContentPropertiesContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
30
+ justify-content: flex-start;
31
+ margin: 1px 0px 1px 0px;
32
+ padding: 2px 9px 4px 12px;
33
+ `;
34
+ export const SSICardViewFooterContentContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
35
+ padding: 11px 12px 11px 12px;
36
+ background-color: transparent;
37
+ `;
38
+ export const SSICardViewFooterContainerStyled = styled.View `
39
+ height: 39px; // 39
40
+ margin-top: auto;
41
+ overflow: hidden;
42
+ `;
43
+ export const SSICardViewCredentialTitleTextStyled = styled(SSITextH4SemiBoldLightStyled) `
44
+ flex: 1;
45
+ text-align: right;
46
+ `;
47
+ export const SSICardViewCredentialSubtitleTextStyled = styled(SSITextH5LightStyled) `
48
+ text-align: right;
49
+ `;
50
+ export const SSICardViewSSICredentialStatusStyled = styled.View `
51
+ margin-left: auto;
52
+ `;
@@ -0,0 +1,4 @@
1
+ /// <reference types="styled-components-react-native" />
2
+ export declare const SSIStatusLabelContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, any, {}, never>;
3
+ export declare const SSIStatusLabelStatusCaptionStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
4
+ export declare const SSIStatusLabelBadgeContainer: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,15 @@
1
+ import styled from 'styled-components/native';
2
+ import { SSIFlexDirectionRowViewStyled } from '../../containers';
3
+ import { SSITextH5LightStyled } from '../../fonts';
4
+ export const SSIStatusLabelContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
5
+ border-radius: 9px;
6
+ border-width: 1px;
7
+ `;
8
+ export const SSIStatusLabelStatusCaptionStyled = styled(SSITextH5LightStyled) `
9
+ margin-left: 7px;
10
+ margin-right: 7px;
11
+ `;
12
+ export const SSIStatusLabelBadgeContainer = styled.View `
13
+ margin-top: auto;
14
+ margin-bottom: auto;
15
+ `;
@@ -0,0 +1,2 @@
1
+ export * from './SSICardView';
2
+ export * from './SSIStatusLabel';
@@ -0,0 +1,2 @@
1
+ export * from './SSICardView';
2
+ export * from './SSIStatusLabel';
@@ -0,0 +1,9 @@
1
+ /// <reference types="styled-components-react-native" />
2
+ /// <reference types="react" />
3
+ export declare const SSIAlphaContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const SSIBlurredContainerStyled: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@react-native-community/blur").BlurViewProps & import("react").RefAttributes<import("react-native").View>>, any, {
5
+ blurType: "light";
6
+ blurAmount: 3;
7
+ }, "blurType" | "blurAmount">;
8
+ export declare const SSIFlexDirectionRowViewStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const SSIRoundedContainerStyled: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,21 @@
1
+ import { BlurView } from '@react-native-community/blur';
2
+ import styled from 'styled-components/native';
3
+ import { SSIRoundedEdgesCss } from '@sphereon/ui-components.core';
4
+ export const SSIAlphaContainerStyled = styled.View `
5
+ flex: 1;
6
+ background-color: rgba(0, 0, 0, 0.2);
7
+ `;
8
+ export const SSIBlurredContainerStyled = styled(BlurView).attrs({
9
+ blurType: 'light',
10
+ blurAmount: 3,
11
+ }) `
12
+ flex: 1;
13
+ background-color: rgba(255, 255, 255, 0.25);
14
+ `;
15
+ export const SSIFlexDirectionRowViewStyled = styled.View `
16
+ flex-direction: row;
17
+ `;
18
+ export const SSIRoundedContainerStyled = styled.View `
19
+ ${SSIRoundedEdgesCss};
20
+ overflow: hidden;
21
+ `;
@@ -0,0 +1,9 @@
1
+ /// <reference types="styled-components-react-native" />
2
+ export declare const SSITextH4Styled: import("styled-components").StyledComponent<typeof import("react-native").Text, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const SSITextH4SemiBoldStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const SSITextH4LightStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
5
+ export declare const SSITextH4SemiBoldLightStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
6
+ export declare const SSITextH5Styled: import("styled-components").StyledComponent<typeof import("react-native").Text, import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const SSITextH5LightStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
8
+ export declare const SSITextH6Styled: import("styled-components").StyledComponent<typeof import("react-native").Text, import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const SSITextH6LightStyled: import("styled-components").StyledComponent<typeof import("react-native").Text, any, {}, never>;
@@ -0,0 +1,43 @@
1
+ import styled from 'styled-components/native';
2
+ import { fontColors } from '@sphereon/ui-components.core';
3
+ import { fontStyle } from '../../typography';
4
+ export const SSITextH4Styled = styled.Text `
5
+ font-family: ${fontStyle.h4Regular.fontFamily};
6
+ font-size: ${fontStyle.h4Regular.fontSize}px;
7
+ font-weight: ${fontStyle.h4Regular.fontWeight};
8
+ line-height: ${fontStyle.h4Regular.lineHeight}px;
9
+ height: auto;
10
+ `;
11
+ export const SSITextH4SemiBoldStyled = styled.Text `
12
+ font-family: ${fontStyle.h4SemiBold.fontFamily};
13
+ font-size: ${fontStyle.h4SemiBold.fontSize}px;
14
+ font-weight: ${fontStyle.h4SemiBold.fontWeight};
15
+ line-height: ${fontStyle.h4SemiBold.lineHeight}px;
16
+ height: auto;
17
+ `;
18
+ export const SSITextH4LightStyled = styled(SSITextH4Styled) `
19
+ color: ${fontColors.light};
20
+ `;
21
+ export const SSITextH4SemiBoldLightStyled = styled(SSITextH4SemiBoldStyled) `
22
+ color: ${fontColors.light};
23
+ `;
24
+ export const SSITextH5Styled = styled.Text `
25
+ font-family: ${fontStyle.h5Regular.fontFamily};
26
+ font-size: ${fontStyle.h5Regular.fontSize}px;
27
+ font-weight: ${fontStyle.h5Regular.fontWeight};
28
+ line-height: ${fontStyle.h5Regular.lineHeight}px;
29
+ height: auto;
30
+ `;
31
+ export const SSITextH5LightStyled = styled(SSITextH5Styled) `
32
+ color: ${fontColors.light};
33
+ `;
34
+ export const SSITextH6Styled = styled.Text `
35
+ font-family: ${fontStyle.h6.fontFamily};
36
+ font-size: ${fontStyle.h6.fontSize}px;
37
+ font-weight: ${fontStyle.h6.fontWeight};
38
+ line-height: ${fontStyle.h6.lineHeight}px;
39
+ height: auto;
40
+ `;
41
+ export const SSITextH6LightStyled = styled(SSITextH6Styled) `
42
+ color: ${fontColors.light};
43
+ `;
@@ -0,0 +1,3 @@
1
+ export * from './containers';
2
+ export * from './components';
3
+ export * from './fonts';
@@ -0,0 +1,3 @@
1
+ export * from './containers';
2
+ export * from './components';
3
+ export * from './fonts';
@@ -0,0 +1,4 @@
1
+ import { FontStyle, FontSize } from '@sphereon/ui-components.core';
2
+ import { TextStyle } from 'react-native';
3
+ export declare const fontSize: Record<FontSize, number>;
4
+ export declare const fontStyle: Record<FontStyle, TextStyle>;
@@ -0,0 +1,86 @@
1
+ import { fontSize as fontSizes, fontWeight, lineHeight } from '@sphereon/ui-components.core';
2
+ import { moderateScale } from 'react-native-size-matters';
3
+ export const fontSize = {
4
+ 100: moderateScale(fontSizes['100']),
5
+ 200: moderateScale(fontSizes['200']),
6
+ 300: moderateScale(fontSizes['300']),
7
+ 400: moderateScale(fontSizes['400']),
8
+ 500: moderateScale(fontSizes['500']),
9
+ 600: moderateScale(fontSizes['600']),
10
+ 700: moderateScale(fontSizes['700']),
11
+ 800: moderateScale(fontSizes['800']),
12
+ };
13
+ export const fontStyle = {
14
+ h0SemiBold: {
15
+ fontFamily: 'Poppins-SemiBold',
16
+ fontSize: fontSize[800],
17
+ fontWeight: fontWeight[600],
18
+ lineHeight: lineHeight[800],
19
+ },
20
+ h1SemiBold: {
21
+ fontFamily: 'Poppins-SemiBold',
22
+ fontSize: fontSize[700],
23
+ fontWeight: fontWeight[600],
24
+ lineHeight: lineHeight[700],
25
+ },
26
+ h2Regular: {
27
+ fontFamily: 'Poppins-Regular',
28
+ fontSize: fontSize[600],
29
+ fontWeight: fontWeight[400],
30
+ lineHeight: lineHeight[600],
31
+ },
32
+ h2SemiBold: {
33
+ fontFamily: 'Poppins-SemiBold',
34
+ fontSize: fontSize[600],
35
+ fontWeight: fontWeight[600],
36
+ lineHeight: lineHeight[600],
37
+ },
38
+ h3Regular: {
39
+ fontFamily: 'Poppins-Regular',
40
+ fontSize: fontSize[500],
41
+ fontWeight: fontWeight[400],
42
+ lineHeight: lineHeight[500],
43
+ },
44
+ h3SemiBold: {
45
+ fontFamily: 'Poppins-SemiBold',
46
+ fontSize: fontSize[500],
47
+ fontWeight: fontWeight[600],
48
+ lineHeight: lineHeight[500],
49
+ },
50
+ h4Regular: {
51
+ fontFamily: 'Poppins-Regular',
52
+ fontSize: fontSize[300],
53
+ fontWeight: fontWeight[400],
54
+ lineHeight: lineHeight[300],
55
+ },
56
+ h4SemiBold: {
57
+ fontFamily: 'Poppins-SemiBold',
58
+ fontSize: fontSize[300],
59
+ fontWeight: fontWeight[400],
60
+ lineHeight: lineHeight[300],
61
+ },
62
+ h5Regular: {
63
+ fontFamily: 'Poppins-Regular',
64
+ fontSize: fontSize[200],
65
+ fontWeight: fontWeight[400],
66
+ lineHeight: lineHeight[200],
67
+ },
68
+ h5SemiBold: {
69
+ fontFamily: 'Poppins-SemiBold',
70
+ fontSize: fontSize[200],
71
+ fontWeight: fontWeight[600],
72
+ lineHeight: lineHeight[200],
73
+ },
74
+ h6: {
75
+ fontFamily: 'Poppins',
76
+ fontSize: fontSize[100],
77
+ fontWeight: fontWeight[400],
78
+ lineHeight: lineHeight[100],
79
+ },
80
+ h7SemiBold: {
81
+ fontFamily: 'Poppins-SemiBold',
82
+ fontSize: fontSize[400],
83
+ fontWeight: fontWeight[600],
84
+ lineHeight: lineHeight[400],
85
+ },
86
+ };
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@sphereon/ui-components.ssi-react-native",
3
+ "private": false,
4
+ "version": "0.1.1-next.18+45ffd0a",
5
+ "description": "SSI UI components for React-Native",
6
+ "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
+ "author": "Sphereon <dev@sphereon.com>",
8
+ "license": "Apache-2.0",
9
+ "keywords": [
10
+ "Frontend",
11
+ "User interface",
12
+ "React-Native",
13
+ "Self-sovereign identity (SSI)"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "build:clean": "tsc --build --clean && tsc --build"
18
+ },
19
+ "source": "src/index.ts",
20
+ "main": "dist/index.js",
21
+ "types": "dist/index.d.ts",
22
+ "files": [
23
+ "dist/**/*",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "dependencies": {
31
+ "@react-native-community/blur": "^4.3.0",
32
+ "@sphereon/ui-components.core": "0.1.1-next.18+45ffd0a",
33
+ "react-native-fast-image": "^8.6.3",
34
+ "react-native-size-matters": "^0.4.0",
35
+ "react-native-svg": "13.4.0",
36
+ "styled-components": "^5.3.3"
37
+ },
38
+ "devDependencies": {
39
+ "@types/react": "~18.0.14",
40
+ "@types/react-native": "0.71.3",
41
+ "@types/styled-components": "^5.1.15",
42
+ "@types/styled-components-react-native": "^5.1.2",
43
+ "typescript": "4.9.5"
44
+ },
45
+ "peerDependencies": {
46
+ "react": ">= 16.8.0",
47
+ "react-native": ">= 0.64.0"
48
+ },
49
+ "gitHead": "45ffd0a1f2d1aa4dbb492141b681c21db7d8a3a8"
50
+ }