@connectid-tools/idp-selector-react 6.12.0 → 6.12.1-alpha.1
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/FullProcess.css +1 -102
- package/FullProcess.js +10 -14
- package/FullProcessHorizontalList.css +20 -0
- package/FullProcessHorizontalList.d.ts +2 -0
- package/FullProcessHorizontalList.js +7 -0
- package/FullProcessVerticalList.css +17 -0
- package/FullProcessVerticalList.d.ts +2 -0
- package/FullProcessVerticalList.js +7 -0
- package/Step.css +48 -0
- package/Step.d.ts +6 -0
- package/Step.js +8 -0
- package/StepTitle.css +11 -0
- package/StepTitle.d.ts +6 -0
- package/StepTitle.js +8 -0
- package/package.json +4 -4
package/FullProcess.css
CHANGED
|
@@ -5,22 +5,8 @@
|
|
|
5
5
|
border: 1px solid var(--charcoal);
|
|
6
6
|
margin-bottom: 20px;
|
|
7
7
|
}
|
|
8
|
-
.cid-idp-selector-full-process.open {
|
|
9
|
-
border: 1px solid var(--charcoal);
|
|
10
|
-
}
|
|
11
|
-
.cid-idp-selector-full-process.close {
|
|
12
|
-
border: 1px solid var(--charcoal50);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.cid-idp-selector-full-process.open.light {
|
|
16
|
-
border: 1px solid var(--charcoal10);
|
|
17
|
-
}
|
|
18
|
-
.cid-idp-selector-full-process.close.light {
|
|
19
|
-
border: 1px solid var(--charcoal50);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
8
|
.cid-idp-selector-full-process--light {
|
|
23
|
-
border: 1px solid var(--
|
|
9
|
+
border: 1px solid var(--charcoal10);
|
|
24
10
|
background-color: transparent;
|
|
25
11
|
}
|
|
26
12
|
.cid-idp-selector-full-process-title {
|
|
@@ -49,87 +35,6 @@
|
|
|
49
35
|
.cid-idp-selector-full-process--light .cid-idp-selector-full-process-title {
|
|
50
36
|
color: white;
|
|
51
37
|
}
|
|
52
|
-
.cid-idp-selector-full-process-step {
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
}
|
|
56
|
-
.cid-idp-selector-full-process-dot {
|
|
57
|
-
width: 11px;
|
|
58
|
-
height: 11px;
|
|
59
|
-
background-color: var(--mint);
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
border: 1px solid var(--charcoal);
|
|
62
|
-
}
|
|
63
|
-
.cid-idp-selector-full-process-dot-wrapper {
|
|
64
|
-
width: 17px;
|
|
65
|
-
height: 17px;
|
|
66
|
-
background-color: white;
|
|
67
|
-
border-radius: 50%;
|
|
68
|
-
border: 1px solid var(--charcoal);
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
flex-shrink: 0;
|
|
73
|
-
}
|
|
74
|
-
.cid-idp-selector-full-process-line {
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 1px;
|
|
77
|
-
background-color: var(--charcoal);
|
|
78
|
-
}
|
|
79
|
-
.cid-idp-selector-full-process--light .cid-idp-selector-full-process-line {
|
|
80
|
-
background-color: white;
|
|
81
|
-
}
|
|
82
|
-
.cid-idp-selector-full-process-grid {
|
|
83
|
-
display: none;
|
|
84
|
-
grid-template-columns: 1fr 1fr 132px;
|
|
85
|
-
grid-row-gap: 8px;
|
|
86
|
-
}
|
|
87
|
-
.cid-idp-selector-full-process--open .cid-idp-selector-full-process-grid {
|
|
88
|
-
display: grid;
|
|
89
|
-
}
|
|
90
|
-
.cid-idp-selector-full-process-subtitle {
|
|
91
|
-
max-width: 132px;
|
|
92
|
-
font-size: 14px;
|
|
93
|
-
color: var(--charcoal);
|
|
94
|
-
display: none;
|
|
95
|
-
line-height: 130%;
|
|
96
|
-
margin-right: 26px;
|
|
97
|
-
}
|
|
98
|
-
.cid-idp-selector-full-process--light .cid-idp-selector-full-process-subtitle {
|
|
99
|
-
color: white;
|
|
100
|
-
}
|
|
101
|
-
.cid-idp-selector-full-process-subtitle.cid-idp-selector-full-process-subtitle--wide {
|
|
102
|
-
display: block;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@media (max-width: 1280px) {
|
|
106
|
-
.cid-idp-selector-full-process-grid {
|
|
107
|
-
grid-template-columns: 1fr 1fr;
|
|
108
|
-
}
|
|
109
|
-
.cid-idp-selector-full-process-subtitle.cid-idp-selector-full-process-subtitle--wide {
|
|
110
|
-
display: none;
|
|
111
|
-
}
|
|
112
|
-
.cid-idp-selector-full-process-subtitle {
|
|
113
|
-
display: block;
|
|
114
|
-
}
|
|
115
|
-
.cid-idp-selector-full-process-line {
|
|
116
|
-
width: 1px;
|
|
117
|
-
height: 26px;
|
|
118
|
-
background-color: var(--charcoal);
|
|
119
|
-
}
|
|
120
|
-
.cid-idp-selector-full-process-grid {
|
|
121
|
-
grid-template-columns: 19px 1fr;
|
|
122
|
-
column-gap: 8px;
|
|
123
|
-
grid-row-gap: 0;
|
|
124
|
-
}
|
|
125
|
-
.cid-idp-selector-full-process-step {
|
|
126
|
-
flex-direction: column;
|
|
127
|
-
}
|
|
128
|
-
.cid-idp-selector-full-process-subtitle {
|
|
129
|
-
max-width: 100%;
|
|
130
|
-
margin: 0;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
38
|
|
|
134
39
|
@media (max-width: 430px) {
|
|
135
40
|
.cid-idp-selector-full-process-title {
|
|
@@ -142,9 +47,3 @@
|
|
|
142
47
|
font-size: 16px;
|
|
143
48
|
}
|
|
144
49
|
}
|
|
145
|
-
|
|
146
|
-
@media(max-width: 320px) {
|
|
147
|
-
.cid-idp-selector-full-process-line {
|
|
148
|
-
height: 35px;
|
|
149
|
-
}
|
|
150
|
-
}
|
package/FullProcess.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useContext, useState } from "react";
|
|
3
3
|
import { ThemeContext } from "./ThemeContext.js";
|
|
4
4
|
import "./FullProcess.css";
|
|
5
|
-
|
|
5
|
+
import { FullProcessVerticalList } from "./FullProcessVerticalList.js";
|
|
6
|
+
import { FullProcessHorizontalList } from "./FullProcessHorizontalList.js";
|
|
7
|
+
// on a wide screen the layout is like this (FullProcessHorizontalList)
|
|
6
8
|
// .----------.----------.
|
|
7
9
|
// text text text
|
|
8
10
|
//
|
|
9
|
-
// however, when the screen is not wide, the layout is like this
|
|
11
|
+
// however, when the screen is not wide, the layout is like this (FullProcessVerticalList)
|
|
10
12
|
// . text
|
|
11
13
|
// |
|
|
12
14
|
// |
|
|
@@ -16,20 +18,14 @@ import "./FullProcess.css";
|
|
|
16
18
|
// . text
|
|
17
19
|
export const FullProcess = ({ collapsible = false }) => {
|
|
18
20
|
const theme = useContext(ThemeContext);
|
|
19
|
-
const
|
|
20
|
-
const [open, setOpen] = useState(shouldOpen);
|
|
21
|
+
const [open, setOpen] = useState(!collapsible);
|
|
21
22
|
const handleToggle = () => {
|
|
22
23
|
if (!collapsible)
|
|
23
24
|
return;
|
|
24
25
|
setOpen(!open);
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (open === true) {
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
return (_jsxs("div", { className: `cid-idp-selector-full-process ${theme === "light" ? "cid-idp-selector-full-process--light" : ""} ${open ? "cid-idp-selector-full-process--open" : ""} ${colorChanged() ? "open" : "close"} ${theme === "light" ? "light" : ""}`, "data-testid": "full-process", children: [_jsxs("h3", { className: "cid-idp-selector-full-process-title", children: ["How it works", collapsible && (_jsx("svg", { className: "cid-idp-selector-full-process-toggle", width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", onClick: handleToggle, "data-testid": "full-process-toggle", children: _jsx("path", { d: "M13.1684 5.3125L13.8125 5.9998L8.5 11.6875L3.1875 5.9998L3.82832 5.3125L8.5 10.3096L13.1684 5.3125Z" }) }))] }), _jsxs("div", { className: "cid-idp-selector-full-process-grid", "data-testid": "full-process-grid", children: [_jsxs("div", { className: "cid-idp-selector-full-process-step", children: [_jsx("div", { className: "cid-idp-selector-full-process-dot-wrapper", children: _jsx("div", { className: "cid-idp-selector-full-process-dot" }) }), _jsx("div", { className: "cid-idp-selector-full-process-line" })] }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle", children: "Select your trusted organisation" }), _jsxs("div", { className: "cid-idp-selector-full-process-step", children: [_jsx("div", { className: "cid-idp-selector-full-process-dot-wrapper", children: _jsx("div", { className: "cid-idp-selector-full-process-dot" }) }), _jsx("div", { className: "cid-idp-selector-full-process-line" })] }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle", children: "Log in to your existing account" }), _jsx("div", { className: "cid-idp-selector-full-process-step", children: _jsx("div", { className: "cid-idp-selector-full-process-dot-wrapper", children: _jsx("div", { className: "cid-idp-selector-full-process-dot" }) }) }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle", children: "Review your details and provide consent" }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle cid-idp-selector-full-process-subtitle--wide", children: "Select your trusted organisation" }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle cid-idp-selector-full-process-subtitle--wide", children: "Log in to your existing account" }), _jsx("div", { className: "cid-idp-selector-full-process-subtitle cid-idp-selector-full-process-subtitle--wide", children: "Review your details and provide consent" })] })] }));
|
|
27
|
+
return (_jsxs("div", { className: `cid-idp-selector-full-process
|
|
28
|
+
${theme === "light" ? "cid-idp-selector-full-process--light" : ""}
|
|
29
|
+
${open ? "cid-idp-selector-full-process--open" : ""}
|
|
30
|
+
`, "data-testid": "full-process", children: [_jsxs("h3", { className: "cid-idp-selector-full-process-title", "data-testid": "full-process-title", children: ["How it works", collapsible && (_jsx("svg", { className: "cid-idp-selector-full-process-toggle", width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", onClick: handleToggle, "data-testid": "full-process-toggle", children: _jsx("path", { d: "M13.1684 5.3125L13.8125 5.9998L8.5 11.6875L3.1875 5.9998L3.82832 5.3125L8.5 10.3096L13.1684 5.3125Z" }) }))] }), open && (_jsxs(_Fragment, { children: [_jsx(FullProcessVerticalList, {}), _jsx(FullProcessHorizontalList, {})] }))] }));
|
|
35
31
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.cid-idp-selector-full-process-h-list {
|
|
2
|
+
display: none;
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
list-style-type: none;
|
|
6
|
+
grid-template-columns: 1fr 1fr 132px;
|
|
7
|
+
grid-row-gap: 8px;
|
|
8
|
+
}
|
|
9
|
+
.cid-idp-selector-full-process-h-item {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (min-width: 1281px) {
|
|
17
|
+
.cid-idp-selector-full-process-h-list {
|
|
18
|
+
display: grid;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./FullProcessHorizontalList.css";
|
|
3
|
+
import { Step } from "./Step.js";
|
|
4
|
+
import { StepTitle } from "./StepTitle.js";
|
|
5
|
+
export const FullProcessHorizontalList = () => {
|
|
6
|
+
return (_jsxs("ol", { className: "cid-idp-selector-full-process-h-list", "data-testid": "full-process-h-list", children: [_jsxs("li", { className: "cid-idp-selector-full-process-h-item", children: [_jsx(Step, {}), _jsx(StepTitle, { title: "Select your trusted organisation" })] }), _jsxs("li", { className: "cid-idp-selector-full-process-h-item", children: [_jsx(Step, {}), _jsx(StepTitle, { title: "Log in to your existing account" })] }), _jsxs("li", { className: "cid-idp-selector-full-process-h-item", children: [_jsx(Step, { removeLine: true }), _jsx(StepTitle, { title: "Review your details and provide consent" })] })] }));
|
|
7
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.cid-idp-selector-full-process-v-list {
|
|
2
|
+
display: none;
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
list-style-type: none;
|
|
6
|
+
}
|
|
7
|
+
.cid-idp-selector-full-process-v-item {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: 19px 1fr;
|
|
10
|
+
grid-column-gap: 8px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media (max-width: 1280px) {
|
|
14
|
+
.cid-idp-selector-full-process-v-list {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./FullProcessVerticalList.css";
|
|
3
|
+
import { Step } from "./Step.js";
|
|
4
|
+
import { StepTitle } from "./StepTitle.js";
|
|
5
|
+
export const FullProcessVerticalList = () => {
|
|
6
|
+
return (_jsxs("ol", { className: "cid-idp-selector-full-process-v-list", "data-testid": "full-process-v-list", children: [_jsxs("li", { className: "cid-idp-selector-full-process-v-item", children: [_jsx(Step, {}), _jsx(StepTitle, { title: "Select your trusted organisation" })] }), _jsxs("li", { className: "cid-idp-selector-full-process-v-item", children: [_jsx(Step, {}), _jsx(StepTitle, { title: "Log in to your existing account" })] }), _jsxs("li", { className: "cid-idp-selector-full-process-v-item", children: [_jsx(Step, { removeLine: true }), _jsx(StepTitle, { title: "Review your details and provide consent" })] })] }));
|
|
7
|
+
};
|
package/Step.css
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.cid-idp-selector-step {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
}
|
|
6
|
+
.cid-idp-selector-step-dot {
|
|
7
|
+
width: 11px;
|
|
8
|
+
height: 11px;
|
|
9
|
+
background-color: var(--mint);
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
border: 1px solid var(--charcoal);
|
|
12
|
+
}
|
|
13
|
+
.cid-idp-selector-step-dot-wrapper {
|
|
14
|
+
width: 17px;
|
|
15
|
+
height: 17px;
|
|
16
|
+
background-color: white;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
border: 1px solid var(--charcoal);
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
}
|
|
24
|
+
.cid-idp-selector-step-line {
|
|
25
|
+
width: 1px;
|
|
26
|
+
height: 26px;
|
|
27
|
+
background-color: var(--charcoal);
|
|
28
|
+
}
|
|
29
|
+
.cid-idp-selector-step-line.cid-idp-selector-step-line--light {
|
|
30
|
+
background-color: white;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (max-width: 320px) {
|
|
34
|
+
.cid-idp-selector-step-line {
|
|
35
|
+
height: 35px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (min-width: 1281px) {
|
|
40
|
+
.cid-idp-selector-step {
|
|
41
|
+
flex-direction: row;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
.cid-idp-selector-step-line {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 1px;
|
|
47
|
+
}
|
|
48
|
+
}
|
package/Step.d.ts
ADDED
package/Step.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import "./Step.css";
|
|
4
|
+
import { ThemeContext } from "./ThemeContext.js";
|
|
5
|
+
export const Step = ({ removeLine = false }) => {
|
|
6
|
+
const theme = useContext(ThemeContext);
|
|
7
|
+
return (_jsxs("div", { className: "cid-idp-selector-step", "data-testid": "step", children: [_jsx("div", { className: "cid-idp-selector-step-dot-wrapper", children: _jsx("div", { className: "cid-idp-selector-step-dot" }) }), !removeLine && (_jsx("div", { className: `cid-idp-selector-step-line ${theme === "light" ? "cid-idp-selector-step-line--light" : ""}`, "data-testid": "step-line" }))] }));
|
|
8
|
+
};
|
package/StepTitle.css
ADDED
package/StepTitle.d.ts
ADDED
package/StepTitle.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import { ThemeContext } from "./ThemeContext.js";
|
|
4
|
+
import "./StepTitle.css";
|
|
5
|
+
export const StepTitle = ({ title }) => {
|
|
6
|
+
const theme = useContext(ThemeContext);
|
|
7
|
+
return (_jsx("div", { className: `cid-idp-selector-step-title ${theme === "light" ? "cid-idp-selector-step-title--light" : ""}`, "data-testid": "step-title", children: title }));
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectid-tools/idp-selector-react",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.1-alpha.1",
|
|
4
4
|
"description": "React component for IDP Selector.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"homepage": "https://github.com/connectid-tools/idp-selector-react",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/preset-typescript": "^7.27.1",
|
|
29
|
-
"@types/node": "^22.17.
|
|
30
|
-
"@types/react": "^18.3.
|
|
29
|
+
"@types/node": "^22.17.2",
|
|
30
|
+
"@types/react": "^18.3.24",
|
|
31
31
|
"@types/react-dom": "^18.3.7",
|
|
32
32
|
"cypress": "^14.5.4",
|
|
33
33
|
"jest-environment-jsdom": "^29.7.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react-dom": "^18.3.1",
|
|
37
37
|
"replace-in-file": "^8.3.0",
|
|
38
38
|
"ts-add-js-extension": "^1.6.6",
|
|
39
|
-
"tsx": "^4.20.
|
|
39
|
+
"tsx": "^4.20.5",
|
|
40
40
|
"typescript": "^5.9.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|