@sphereon/ui-components.ssi-react 0.5.3 → 0.5.4-next.3
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.
|
@@ -17,7 +17,7 @@ const SSICredentialCardView = (props) => {
|
|
|
17
17
|
};
|
|
18
18
|
return (_jsx(Container, { style: { backgroundColor }, children: _jsx(BackgroundImage, { style: {
|
|
19
19
|
...(backgroundImage?.uri && { background: `url(${backgroundImage.uri})`, backgroundSize: 'cover' }),
|
|
20
|
-
}, children: _jsxs(AlphaContainer, { children: [header && (_jsxs(HeaderContainer, { children: [(!backgroundImage || logo) && (_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) })), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, { style: { color: textColor }, children: credentialTitle }), credentialSubtitle && _jsx(CredentialSubtitleText, { style: { color: textColor }, children: credentialSubtitle })] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, { style: { color: textColor }, children: issuerName }) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [showExpirationDate && (_jsx(ExpirationDateText, { style: { color: textColor }, children: expirationDate
|
|
20
|
+
}, children: _jsxs(AlphaContainer, { "$hasBackgroundImage": !!backgroundImage?.uri, children: [header && (_jsxs(HeaderContainer, { children: [(!backgroundImage || logo) && (_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) })), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, { style: { color: textColor }, children: credentialTitle }), credentialSubtitle && _jsx(CredentialSubtitleText, { style: { color: textColor }, children: credentialSubtitle })] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, { style: { color: textColor }, children: issuerName }) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [showExpirationDate && (_jsx(ExpirationDateText, { style: { color: textColor }, children: expirationDate
|
|
21
21
|
? `${Localization.translate('credential_card_expires_message')} ${toLocalDateString(expirationDate)}`
|
|
22
22
|
: Localization.translate('credential_status_never_expires_date_label') })), credentialStatus && (_jsx(StatusContainer, { children: credentialStatus && _jsx(SSIStatusLabel, { status: credentialStatus, color: textColor }) }))] }))] }) }) }));
|
|
23
23
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { IStyledComponent } from 'styled-components';
|
|
2
2
|
export declare const SSIFlexDirectionRowViewStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
3
3
|
export declare const SSIFlexDirectionColumnViewStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
4
|
-
export declare const SSIAlphaContainerStyled:
|
|
4
|
+
export declare const SSIAlphaContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
|
|
5
|
+
$hasBackgroundImage?: boolean;
|
|
6
|
+
}>;
|
|
5
7
|
export declare const SSIRoundedContainerStyled: IStyledComponent<'web', React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
2
|
import { SSIRoundedEdgesCss } from '@sphereon/ui-components.core';
|
|
3
3
|
export const SSIFlexDirectionRowViewStyled = styled.div `
|
|
4
4
|
display: flex;
|
|
@@ -8,9 +8,16 @@ export const SSIFlexDirectionColumnViewStyled = styled.div `
|
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
`;
|
|
11
|
-
export const SSIAlphaContainerStyled = styled
|
|
11
|
+
export const SSIAlphaContainerStyled = styled.div `
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
12
14
|
flex-grow: 1;
|
|
13
|
-
background
|
|
15
|
+
// Only darken the card when a background image is set (to keep text legible);
|
|
16
|
+
// a user-chosen solid background color must render as-is.
|
|
17
|
+
${props => props.$hasBackgroundImage &&
|
|
18
|
+
css `
|
|
19
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
20
|
+
`}
|
|
14
21
|
`;
|
|
15
22
|
export const SSIRoundedContainerStyled = styled.div `
|
|
16
23
|
${SSIRoundedEdgesCss};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.3",
|
|
4
|
+
"version": "0.5.4-next.3+3305acf",
|
|
5
5
|
"description": "SSI UI components for React",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@mui/x-date-pickers": "^8.18.0",
|
|
51
51
|
"@sphereon/ssi-sdk.data-store-types": "0.37.0",
|
|
52
52
|
"@sphereon/ssi-types": "0.37.0",
|
|
53
|
-
"@sphereon/ui-components.core": "0.5.3",
|
|
53
|
+
"@sphereon/ui-components.core": "0.5.4-next.3+3305acf",
|
|
54
54
|
"@tanstack/react-table": "^8.9.3",
|
|
55
55
|
"ajv": "^8.17.1",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">= 18"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "3305acf2f6211ef052448fccaa8fdfa507daaf3e"
|
|
76
76
|
}
|