@connectid-tools/idp-selector-react 6.4.1 → 6.5.0
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/Benefits.d.ts +2 -0
- package/Benefits.js +10 -2
- package/CidButton.js +4 -2
- package/IntroText.js +3 -1
- package/README.md +3 -0
- package/package.json +10 -10
- package/types.d.ts +1 -1
package/Benefits.d.ts
CHANGED
package/Benefits.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import './Benefits.css';
|
|
4
4
|
import { ThemeContext } from './ThemeContext';
|
|
5
|
-
export const Benefits = ({ full }) => {
|
|
5
|
+
export const Benefits = ({ full, introTextType }) => {
|
|
6
6
|
const theme = useContext(ThemeContext);
|
|
7
7
|
const defaultBenefits = [
|
|
8
8
|
"Reduce the data you share online by only sharing what's required",
|
|
@@ -14,7 +14,15 @@ export const Benefits = ({ full }) => {
|
|
|
14
14
|
'Details are only shared with your review and consent',
|
|
15
15
|
'Accredited by the Australian government as an identity exchange',
|
|
16
16
|
];
|
|
17
|
+
const fullBenefitsBankDetails = [
|
|
18
|
+
"ConnectID doesn't see or store your information",
|
|
19
|
+
'No document uploads',
|
|
20
|
+
'Details are only shared with your review and consent',
|
|
21
|
+
'Accredited by the Australian government as an identity exchange',
|
|
22
|
+
];
|
|
23
|
+
const bankDetailsIntroTextTypes = ['bank-details-plus-personal-info', 'bank-details-only'];
|
|
24
|
+
const adjustedFullBenefits = bankDetailsIntroTextTypes.includes(introTextType) ? fullBenefitsBankDetails : fullBenefits;
|
|
17
25
|
const listItemClasses = `cid-idp-selector-benefit ${theme === 'light' ? 'cid-idp-selector-benefit--light' : ''}`;
|
|
18
|
-
const benefits = full ?
|
|
26
|
+
const benefits = full ? adjustedFullBenefits : defaultBenefits;
|
|
19
27
|
return (_jsx("ul", { className: `cid-idp-selector-benefits ${full ? 'cid-idp-selector-benefits--box' : ''} ${theme === 'light' ? 'cid-idp-selector-benefits--light' : ''}`, "data-testid": "benefits", children: benefits.map((benefit) => (_jsxs("li", { className: listItemClasses, "data-testid": "benefit-item", children: [_jsx("svg", { className: "cid-idp-selector-benefit-icon", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.28025 8.71975L14.25 1.75L15.3105 2.8105L7.28025 10.8407L3 6.5605L4.0605 5.5L7.28025 8.71975Z" }) }), benefit] }))) }));
|
|
20
28
|
};
|
package/CidButton.js
CHANGED
|
@@ -124,10 +124,12 @@ export const CidButton = ({ onProceed, claims, requiredClaims, rpLogoUrl, requir
|
|
|
124
124
|
}
|
|
125
125
|
const ctaText = `${label} with ConnectID`;
|
|
126
126
|
const connectIdButtonTypeConfig = type ? typeConfigMap[type] : undefined;
|
|
127
|
-
return (_jsxs(ThemeContext.Provider, { value: theme, children: [showPopup && (_jsxs(_Fragment, { children: [_jsx(Overlay, { onClick: handleClosePopup }), _jsx(Popup, { onProceed: handleOnProceed, onCancel: handleClosePopup, onError: onError, certificationStatus: certificationStatus, popupTitle: ctaText, requiredCertifications: requiredCertifications, rpLogoUrl: rpLogoUrl, rpDataSharingDescription: rpDataSharingDescription, claims: claims, requiredClaims: requiredClaims, enableManualVerification: enableManualVerification, showAllParticipants: showAllParticipants, participants: participants, error: error, isLoading: isLoading })] })), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasIntro) && introTextType && _jsx(IntroText, { type: introTextType }), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasBenefits) && _jsx(Benefits, { full: type === 'full benefits' }), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasProcess) &&
|
|
127
|
+
return (_jsxs(ThemeContext.Provider, { value: theme, children: [showPopup && (_jsxs(_Fragment, { children: [_jsx(Overlay, { onClick: handleClosePopup }), _jsx(Popup, { onProceed: handleOnProceed, onCancel: handleClosePopup, onError: onError, certificationStatus: certificationStatus, popupTitle: ctaText, requiredCertifications: requiredCertifications, rpLogoUrl: rpLogoUrl, rpDataSharingDescription: rpDataSharingDescription, claims: claims, requiredClaims: requiredClaims, enableManualVerification: enableManualVerification, showAllParticipants: showAllParticipants, participants: participants, error: error, isLoading: isLoading })] })), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasIntro) && introTextType && _jsx(IntroText, { type: introTextType }), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasBenefits) && (_jsx(Benefits, { full: type === 'full benefits', introTextType: introTextType || 'verify-trust' })), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasProcess) &&
|
|
128
128
|
(type === 'full process' ? _jsx(FullProcess, { collapsible: fullProcessCollapsible }) : _jsx(Process, {})), _jsxs("button", { className: `
|
|
129
129
|
cid-idp-selector-button cid-idp-selector-button--${theme}
|
|
130
130
|
${size === 'large' ? 'cid-idp-selector-button--large' : ''}
|
|
131
131
|
${type || showInfoContent ? 'cid-idp-selector-button--type' : ''}
|
|
132
|
-
`, onClick: handleButtonClick, type: "button", "data-testid": "cid-idp-selector-button", children: [_jsx("svg", { className: "cid-idp-selector-button-icon", viewBox: "0 0 132.37 157.84", children: _jsx("path", { d: "M102.22,91.65c0,19.9-16.13,36.03-36.03,36.03s-36.03-16.13-36.03-36.03,16.13-36.03,36.03-36.03c9.95,0,18.96,4.03,25.48,10.55l40.71-40.71c-6.52-6.52-10.55-15.52-10.55-25.46h-30.14c0,13.45,4.02,25.95,10.92,36.39-10.45-6.9-22.96-10.93-36.42-10.93C29.63,25.47,0,55.1,0,91.65s29.63,66.19,66.19,66.19,66.19-29.63,66.19-66.19h-30.16Z" }) }), ctaText] }), showInfoContent && (_jsxs("div", { className: "cid-show-info-content", "data-testid": "cid-show-info-content", children: [!error && _jsx(IdpLogoList, { loading: isLoading, logoLockupStyle: logoLockupStyle }), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasInfo) &&
|
|
132
|
+
`, onClick: handleButtonClick, type: "button", "data-testid": "cid-idp-selector-button", children: [_jsx("svg", { className: "cid-idp-selector-button-icon", viewBox: "0 0 132.37 157.84", children: _jsx("path", { d: "M102.22,91.65c0,19.9-16.13,36.03-36.03,36.03s-36.03-16.13-36.03-36.03,16.13-36.03,36.03-36.03c9.95,0,18.96,4.03,25.48,10.55l40.71-40.71c-6.52-6.52-10.55-15.52-10.55-25.46h-30.14c0,13.45,4.02,25.95,10.92,36.39-10.45-6.9-22.96-10.93-36.42-10.93C29.63,25.47,0,55.1,0,91.65s29.63,66.19,66.19,66.19,66.19-29.63,66.19-66.19h-30.16Z" }) }), ctaText] }), showInfoContent && (_jsxs("div", { className: "cid-show-info-content", "data-testid": "cid-show-info-content", children: [!error && _jsx(IdpLogoList, { loading: isLoading, logoLockupStyle: logoLockupStyle }), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasInfo) &&
|
|
133
|
+
introTextType !== 'bank-details-plus-personal-info' &&
|
|
134
|
+
introTextType !== 'bank-details-only' && _jsx(CidButtonInfo, {}), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasHowItWorks) && _jsx(CidButtonHowItWorks, {}), (connectIdButtonTypeConfig === null || connectIdButtonTypeConfig === void 0 ? void 0 : connectIdButtonTypeConfig.hasLearnMore) && _jsx(LearnMore, {})] }))] }));
|
|
133
135
|
};
|
package/IntroText.js
CHANGED
|
@@ -6,7 +6,9 @@ const introTextContent = {
|
|
|
6
6
|
'verify-trust': 'ConnectID lets you verify your identity through details stored with an organisation you already trust, like your bank.',
|
|
7
7
|
'verify-account': 'Verify your identity through an organisation you already have an account with, like your bank.',
|
|
8
8
|
'power': 'ConnectID gives you the power to choose how you share your details, using organisations you already trust.',
|
|
9
|
-
'sign-up': 'ConnectID lets you sign up using details stored with an organisation you already trust, like your bank.'
|
|
9
|
+
'sign-up': 'ConnectID lets you sign up using details stored with an organisation you already trust, like your bank.',
|
|
10
|
+
'bank-details-plus-personal-info': 'Provide your preferred bank account and personal details in a secure and simple way, without oversharing information.',
|
|
11
|
+
'bank-details-only': 'Provide your preferred bank account details in a secure and simple way, without oversharing information.',
|
|
10
12
|
};
|
|
11
13
|
export const IntroText = ({ type }) => {
|
|
12
14
|
const theme = useContext(ThemeContext);
|
package/README.md
CHANGED
|
@@ -220,6 +220,9 @@ The SVG image below the ConnectID button has either option dark or light mode. B
|
|
|
220
220
|
|
|
221
221
|
## 🚀 Release Notes
|
|
222
222
|
|
|
223
|
+
### 6.5.0 (Apr 28, 2025)
|
|
224
|
+
- Add new `introTextType` options: `bank-details-only` and `bank-details-plus-personal-info`.
|
|
225
|
+
|
|
223
226
|
### 6.4.1 (Feb 24, 2025)
|
|
224
227
|
- Update README.
|
|
225
228
|
- Add license file to bundle.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectid-tools/idp-selector-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "React component for IDP Selector.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/connectid-tools/idp-selector-react",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@babel/preset-typescript": "^7.
|
|
29
|
-
"@types/node": "^22.
|
|
30
|
-
"@types/react": "^18.3.
|
|
31
|
-
"@types/react-dom": "^18.3.
|
|
28
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
29
|
+
"@types/node": "^22.15.2",
|
|
30
|
+
"@types/react": "^18.3.20",
|
|
31
|
+
"@types/react-dom": "^18.3.6",
|
|
32
32
|
"cypress": "^13.17.0",
|
|
33
33
|
"jest-environment-jsdom": "^29.7.0",
|
|
34
|
-
"prettier": "^3.5.
|
|
34
|
+
"prettier": "^3.5.3",
|
|
35
35
|
"react": "^18.3.1",
|
|
36
36
|
"react-dom": "^18.3.1",
|
|
37
37
|
"replace-in-file": "^8.3.0",
|
|
38
38
|
"tsx": "^4.19.3",
|
|
39
|
-
"typescript": "^5.
|
|
40
|
-
"vite": "^5.4.
|
|
39
|
+
"typescript": "^5.8.3",
|
|
40
|
+
"vite": "^5.4.18"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"react-responsive": "^10.0.
|
|
44
|
-
"swr": "^2.3.
|
|
43
|
+
"react-responsive": "^10.0.1",
|
|
44
|
+
"swr": "^2.3.3"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type AnalyticsEvent = 'ConnectID Button Displayed' | 'ConnectID Button Cl
|
|
|
28
28
|
export type Analytics = {
|
|
29
29
|
track: (event: AnalyticsEvent, data?: Record<string, unknown>) => void;
|
|
30
30
|
};
|
|
31
|
-
export type IntroTextType = 'verify-trust' | 'verify-account' | 'power' | 'sign-up';
|
|
31
|
+
export type IntroTextType = 'verify-trust' | 'verify-account' | 'power' | 'sign-up' | 'bank-details-plus-personal-info' | 'bank-details-only';
|
|
32
32
|
export type CidButtonType = 'tiny' | 'medium benefits' | 'medium process' | 'full benefits' | 'full process';
|
|
33
33
|
export type CidButtonTypeConfig = {
|
|
34
34
|
hasIntro: boolean;
|