@openedx/frontend-app-authn 1.0.0-alpha.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/LICENSE +661 -0
- package/README.rst +204 -0
- package/package.json +79 -0
- package/src/Main.tsx +23 -0
- package/src/__mocks__/file.js +1 -0
- package/src/__mocks__/svg.js +1 -0
- package/src/app.scss +6 -0
- package/src/app.ts +43 -0
- package/src/base-container/components/default-layout/DefaultLayout.test.jsx +48 -0
- package/src/base-container/components/default-layout/LargeLayout.jsx +42 -0
- package/src/base-container/components/default-layout/MediumLayout.jsx +49 -0
- package/src/base-container/components/default-layout/SmallLayout.jsx +37 -0
- package/src/base-container/components/default-layout/index.jsx +3 -0
- package/src/base-container/components/default-layout/messages.js +16 -0
- package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +31 -0
- package/src/base-container/components/image-layout/LargeLayout.jsx +32 -0
- package/src/base-container/components/image-layout/MediumLayout.jsx +32 -0
- package/src/base-container/components/image-layout/SmallLayout.jsx +31 -0
- package/src/base-container/components/image-layout/index.jsx +4 -0
- package/src/base-container/components/image-layout/index.scss +37 -0
- package/src/base-container/components/image-layout/messages.js +16 -0
- package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +46 -0
- package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +49 -0
- package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +38 -0
- package/src/base-container/components/welcome-page-layout/index.jsx +3 -0
- package/src/base-container/components/welcome-page-layout/messages.js +21 -0
- package/src/base-container/index.jsx +70 -0
- package/src/base-container/tests/BaseContainer.test.jsx +44 -0
- package/src/common-components/EmbeddedRegistrationRoute.jsx +26 -0
- package/src/common-components/EnterpriseSSO.jsx +110 -0
- package/src/common-components/FormGroup.jsx +106 -0
- package/src/common-components/InstitutionLogistration.jsx +102 -0
- package/src/common-components/NotFoundPage.jsx +15 -0
- package/src/common-components/PasswordField.jsx +175 -0
- package/src/common-components/RedirectLogistration.jsx +94 -0
- package/src/common-components/RegisterFaIcons.jsx +8 -0
- package/src/common-components/SocialAuthProviders.jsx +75 -0
- package/src/common-components/ThirdPartyAuth.jsx +123 -0
- package/src/common-components/ThirdPartyAuthAlert.jsx +49 -0
- package/src/common-components/UnAuthOnlyRoute.jsx +41 -0
- package/src/common-components/data/actions.js +27 -0
- package/src/common-components/data/reducers.js +63 -0
- package/src/common-components/data/sagas.js +32 -0
- package/src/common-components/data/selectors.js +28 -0
- package/src/common-components/data/service.js +23 -0
- package/src/common-components/data/tests/reducer.test.js +82 -0
- package/src/common-components/data/tests/sagas.test.js +71 -0
- package/src/common-components/index.jsx +14 -0
- package/src/common-components/messages.jsx +127 -0
- package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +76 -0
- package/src/common-components/tests/FormField.test.jsx +289 -0
- package/src/common-components/tests/SocialAuthProviders.test.jsx +75 -0
- package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +39 -0
- package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +73 -0
- package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +156 -0
- package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +53 -0
- package/src/constants.ts +1 -0
- package/src/data/configureStore.js +33 -0
- package/src/data/constants.js +38 -0
- package/src/data/countries.ts +59 -0
- package/src/data/oneTrust.js +3 -0
- package/src/data/reducers.js +36 -0
- package/src/data/sagas.js +19 -0
- package/src/data/tests/cookies.test.js +42 -0
- package/src/data/tests/dataUtils.test.js +19 -0
- package/src/data/tests/reduxUtils.test.js +14 -0
- package/src/data/utils/cookies.js +12 -0
- package/src/data/utils/dataUtils.js +81 -0
- package/src/data/utils/index.js +11 -0
- package/src/data/utils/reduxUtils.js +34 -0
- package/src/data/utils/useMobileResponsive.js +24 -0
- package/src/field-renderer/FieldRenderer.jsx +156 -0
- package/src/field-renderer/index.jsx +2 -0
- package/src/field-renderer/tests/FieldRenderer.test.jsx +201 -0
- package/src/forgot-password/ForgotPasswordAlert.jsx +97 -0
- package/src/forgot-password/ForgotPasswordPage.jsx +193 -0
- package/src/forgot-password/data/actions.js +32 -0
- package/src/forgot-password/data/reducers.js +58 -0
- package/src/forgot-password/data/sagas.js +35 -0
- package/src/forgot-password/data/selectors.js +10 -0
- package/src/forgot-password/data/service.js +21 -0
- package/src/forgot-password/data/tests/reducers.test.js +34 -0
- package/src/forgot-password/data/tests/sagas.test.js +67 -0
- package/src/forgot-password/index.js +5 -0
- package/src/forgot-password/messages.js +128 -0
- package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +269 -0
- package/src/i18n/index.js +25 -0
- package/src/index.ts +3 -0
- package/src/login/AccountActivationMessage.jsx +78 -0
- package/src/login/ChangePasswordPrompt.jsx +91 -0
- package/src/login/LoginFailure.jsx +231 -0
- package/src/login/LoginPage.jsx +368 -0
- package/src/login/data/actions.js +39 -0
- package/src/login/data/constants.js +20 -0
- package/src/login/data/reducers.js +76 -0
- package/src/login/data/sagas.js +45 -0
- package/src/login/data/service.js +24 -0
- package/src/login/data/tests/reducers.test.js +155 -0
- package/src/login/data/tests/sagas.test.js +110 -0
- package/src/login/index.js +5 -0
- package/src/login/messages.jsx +211 -0
- package/src/login/tests/AccountActivationMessage.test.jsx +122 -0
- package/src/login/tests/ChangePasswordPrompt.test.jsx +75 -0
- package/src/login/tests/LoginFailure.test.jsx +323 -0
- package/src/login/tests/LoginPage.test.jsx +839 -0
- package/src/logistration/Logistration.jsx +189 -0
- package/src/logistration/Logistration.test.jsx +275 -0
- package/src/progressive-profiling/ProgressiveProfiling.jsx +313 -0
- package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +56 -0
- package/src/progressive-profiling/data/actions.js +22 -0
- package/src/progressive-profiling/data/reducers.js +38 -0
- package/src/progressive-profiling/data/sagas.js +24 -0
- package/src/progressive-profiling/data/selectors.js +14 -0
- package/src/progressive-profiling/data/service.js +17 -0
- package/src/progressive-profiling/index.js +5 -0
- package/src/progressive-profiling/messages.jsx +57 -0
- package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +322 -0
- package/src/register/RegistrationFields/CountryField/CountryField.jsx +164 -0
- package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +204 -0
- package/src/register/RegistrationFields/CountryField/validator.js +32 -0
- package/src/register/RegistrationFields/EmailField/EmailField.jsx +140 -0
- package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +236 -0
- package/src/register/RegistrationFields/EmailField/constants.js +131 -0
- package/src/register/RegistrationFields/EmailField/validator.js +126 -0
- package/src/register/RegistrationFields/EmailField/validator.test.js +39 -0
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +104 -0
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +70 -0
- package/src/register/RegistrationFields/NameField/NameField.jsx +68 -0
- package/src/register/RegistrationFields/NameField/NameField.test.jsx +146 -0
- package/src/register/RegistrationFields/NameField/validator.js +22 -0
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +58 -0
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +55 -0
- package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +162 -0
- package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +319 -0
- package/src/register/RegistrationFields/UsernameField/validator.js +16 -0
- package/src/register/RegistrationFields/index.js +6 -0
- package/src/register/RegistrationPage.jsx +428 -0
- package/src/register/RegistrationPage.test.jsx +854 -0
- package/src/register/components/ConfigurableRegistrationForm.jsx +244 -0
- package/src/register/components/RegistrationFailure.jsx +80 -0
- package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +401 -0
- package/src/register/components/tests/RegistrationFailure.test.jsx +212 -0
- package/src/register/components/tests/ThirdPartyAuth.test.jsx +439 -0
- package/src/register/data/actions.js +85 -0
- package/src/register/data/constants.js +13 -0
- package/src/register/data/reducers.js +140 -0
- package/src/register/data/sagas.js +58 -0
- package/src/register/data/selectors.js +34 -0
- package/src/register/data/service.js +45 -0
- package/src/register/data/tests/reducers.test.js +277 -0
- package/src/register/data/tests/sagas.test.js +239 -0
- package/src/register/data/tests/utils.test.js +98 -0
- package/src/register/data/utils.js +153 -0
- package/src/register/index.js +4 -0
- package/src/register/messages.jsx +206 -0
- package/src/reset-password/ResetPasswordFailure.jsx +55 -0
- package/src/reset-password/ResetPasswordPage.jsx +224 -0
- package/src/reset-password/ResetPasswordSuccess.jsx +19 -0
- package/src/reset-password/data/actions.js +50 -0
- package/src/reset-password/data/constants.js +16 -0
- package/src/reset-password/data/reducers.js +44 -0
- package/src/reset-password/data/sagas.js +67 -0
- package/src/reset-password/data/selectors.js +10 -0
- package/src/reset-password/data/service.js +61 -0
- package/src/reset-password/data/tests/sagas.test.js +185 -0
- package/src/reset-password/index.js +5 -0
- package/src/reset-password/messages.js +88 -0
- package/src/reset-password/tests/ResetPasswordPage.test.jsx +241 -0
- package/src/routes.jsx +79 -0
- package/src/sass/_base_component.scss +202 -0
- package/src/sass/_forgot_password.scss +3 -0
- package/src/sass/_login_page.scss +3 -0
- package/src/sass/_progressive_profiling_page.scss +30 -0
- package/src/sass/_registration.scss +123 -0
- package/src/sass/_reset_password.scss +3 -0
- package/src/sass/_style.scss +465 -0
- package/src/setupTest.js +68 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
@use "@openedx/paragon/scss/core/core" as paragon;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
.register-button {
|
|
5
|
+
min-width: 14.4rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.pgn__form-autosuggest__wrapper>.pgn__form-group {
|
|
9
|
+
margin-bottom: 0 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.email-suggestion-alert-error {
|
|
13
|
+
padding: 0.5rem 1rem;
|
|
14
|
+
|
|
15
|
+
.email-suggestion__close {
|
|
16
|
+
float: right;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.email-suggestion__text {
|
|
24
|
+
font-size: 0.75rem;
|
|
25
|
+
line-height: 1.25rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.alert-link {
|
|
29
|
+
color: paragon.$primary !important;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
text-decoration: underline;
|
|
33
|
+
color: paragon.$info-700 !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.email-suggestion-alert-warning {
|
|
39
|
+
color: paragon.$info-500 !important;
|
|
40
|
+
|
|
41
|
+
&:hover {
|
|
42
|
+
text-decoration: underline;
|
|
43
|
+
color: paragon.$info-700 !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.form-field--checkbox {
|
|
48
|
+
.pgn__form-label {
|
|
49
|
+
font-size: 0.75rem;
|
|
50
|
+
line-height: 1.25rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
margin-left: 3px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.username-suggestions--chip {
|
|
57
|
+
padding: 1px 0.5rem;
|
|
58
|
+
margin: 0.25rem;
|
|
59
|
+
border-radius: 0.375rem;
|
|
60
|
+
line-height: 24px;
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
font-weight: normal;
|
|
63
|
+
color: paragon.$primary-700;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.username-suggestion--label {
|
|
67
|
+
font-size: 0.75rem;
|
|
68
|
+
line-height: 1.25rem;
|
|
69
|
+
margin-right: 0.25rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.username-suggestions {
|
|
73
|
+
position: relative;
|
|
74
|
+
margin-top: -2.5rem;
|
|
75
|
+
margin-left: 15px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.username-suggestions__close__button {
|
|
79
|
+
right: 1rem;
|
|
80
|
+
position: absolute;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.username-suggestions__error {
|
|
84
|
+
position: relative;
|
|
85
|
+
margin-top: -13.7%;
|
|
86
|
+
margin-bottom: 11%;
|
|
87
|
+
margin-left: 15px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.username-scroll-suggested--form-field {
|
|
91
|
+
width: 20rem;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
overflow-x: auto;
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 372px) {
|
|
98
|
+
.username-scroll-suggested--form-field {
|
|
99
|
+
width: 11rem !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.username-suggestions__close__button {
|
|
103
|
+
right: 0.5rem;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media (max-width: map.get(paragon.$grid-breakpoints, "sm")) {
|
|
108
|
+
.username-scroll-suggested--form-field {
|
|
109
|
+
width: 15rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.username-suggestions__close__button {
|
|
113
|
+
right: 0.5rem;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.form-field-error {
|
|
118
|
+
border: 1px solid var(--danger-300, #CA3A2F) !important;
|
|
119
|
+
|
|
120
|
+
input {
|
|
121
|
+
border: none;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
@use "@openedx/paragon/scss/core/core" as paragon;
|
|
2
|
+
|
|
3
|
+
// Load component based styles
|
|
4
|
+
@use "_base_component.scss";
|
|
5
|
+
@use "_registration.scss";
|
|
6
|
+
@use "_reset_password.scss";
|
|
7
|
+
@use "_progressive_profiling_page.scss";
|
|
8
|
+
@use "_login_page.scss";
|
|
9
|
+
@use "_forgot_password.scss";
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
// ----------------------------
|
|
13
|
+
// #COLORS
|
|
14
|
+
// ----------------------------
|
|
15
|
+
$white: #FFFFFF;
|
|
16
|
+
|
|
17
|
+
// social platforms
|
|
18
|
+
$facebook-blue: #1877F2;
|
|
19
|
+
$facebook-focus-blue: #29487d;
|
|
20
|
+
$google-blue: #4285f4;
|
|
21
|
+
$google-focus-blue: #287ae6;
|
|
22
|
+
$microsoft-black: #2f2f2f;
|
|
23
|
+
$microsoft-focus-black: #000;
|
|
24
|
+
$apple-black: #000000;
|
|
25
|
+
$apple-focus-black: $apple-black;
|
|
26
|
+
|
|
27
|
+
$elevation-level-2-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.15);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// Forgot Password Page
|
|
31
|
+
.forgot-password-button-width {
|
|
32
|
+
min-width: 6rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.spinner--position-centered {
|
|
36
|
+
left: 0;
|
|
37
|
+
right: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
top: 0;
|
|
40
|
+
position: absolute;
|
|
41
|
+
margin: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.main-content {
|
|
45
|
+
@extend .pt-4;
|
|
46
|
+
min-width: 464px !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.welcome-page-content {
|
|
50
|
+
min-width: 464px !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.stateful-button-width {
|
|
54
|
+
width: 12rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tpa-skeleton {
|
|
58
|
+
margin-bottom: 0.75rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.sr-only {
|
|
62
|
+
position: absolute;
|
|
63
|
+
left: -10000px;
|
|
64
|
+
top: auto;
|
|
65
|
+
width: 1px;
|
|
66
|
+
height: 1px;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.close {
|
|
71
|
+
padding-bottom: 0px !important;
|
|
72
|
+
padding-top: 3px !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.focus-out {
|
|
76
|
+
position: absolute;
|
|
77
|
+
padding-left: 17px;
|
|
78
|
+
opacity: 0.75;
|
|
79
|
+
z-index: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.alert-link {
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
color: paragon.$info-300 !important;
|
|
86
|
+
|
|
87
|
+
&:hover {
|
|
88
|
+
color: paragon.$info-500 !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.form-control {
|
|
93
|
+
background-color: $white !important;
|
|
94
|
+
font-size: 0.875rem;
|
|
95
|
+
line-height: 1.5;
|
|
96
|
+
height: 2.75rem;
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.btn-social {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
align-items: center;
|
|
104
|
+
|
|
105
|
+
margin-bottom: 1rem;
|
|
106
|
+
font-size: 14px;
|
|
107
|
+
|
|
108
|
+
background-color: $white;
|
|
109
|
+
border: 1px solid paragon.$primary;
|
|
110
|
+
width: 224px;
|
|
111
|
+
height: 36px;
|
|
112
|
+
color: paragon.$primary;
|
|
113
|
+
|
|
114
|
+
.btn-tpa__image-icon {
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
max-height: 24px;
|
|
117
|
+
max-width: 24px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.btn-tpa {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: row;
|
|
124
|
+
justify-content: flex-start;
|
|
125
|
+
align-items: center;
|
|
126
|
+
padding-left: 1rem;
|
|
127
|
+
width: 14rem;
|
|
128
|
+
|
|
129
|
+
.btn-tpa__image-icon {
|
|
130
|
+
background-color: transparent;
|
|
131
|
+
max-height: 24px;
|
|
132
|
+
max-width: 24px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.btn-tpa__font-container {
|
|
137
|
+
background-color: paragon.$primary;
|
|
138
|
+
color: $white;
|
|
139
|
+
font-size: 11px;
|
|
140
|
+
|
|
141
|
+
margin-left: -6px;
|
|
142
|
+
padding-top: 10px;
|
|
143
|
+
min-width: 30px;
|
|
144
|
+
height: 35px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.btn-oa2-facebook {
|
|
148
|
+
color: $white;
|
|
149
|
+
border-color: $facebook-blue;
|
|
150
|
+
background-color: $facebook-blue;
|
|
151
|
+
|
|
152
|
+
&:hover,
|
|
153
|
+
&:focus {
|
|
154
|
+
background-color: $facebook-focus-blue;
|
|
155
|
+
border: 1px solid $facebook-focus-blue;
|
|
156
|
+
color: $white;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.btn-oa2-google-oauth2 {
|
|
161
|
+
color: $white;
|
|
162
|
+
border-color: $google-blue;
|
|
163
|
+
background-color: $google-blue;
|
|
164
|
+
|
|
165
|
+
.ibtn-tpa__image-icon {
|
|
166
|
+
margin-left: -6px;
|
|
167
|
+
max-height: 34px;
|
|
168
|
+
max-width: 34px;
|
|
169
|
+
height: 34px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&:hover,
|
|
173
|
+
&:focus {
|
|
174
|
+
background-color: $google-focus-blue;
|
|
175
|
+
border: 1px solid $google-focus-blue;
|
|
176
|
+
color: $white;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.btn-oa2-apple-id {
|
|
181
|
+
color: $white;
|
|
182
|
+
border-color: $apple-black;
|
|
183
|
+
background-color: $apple-black;
|
|
184
|
+
font-size: 16px;
|
|
185
|
+
|
|
186
|
+
.ibtn-tpa__image-icon {
|
|
187
|
+
max-height: 1.8em;
|
|
188
|
+
max-width: 2.0em;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:hover,
|
|
192
|
+
&:focus {
|
|
193
|
+
background-color: $apple-focus-black;
|
|
194
|
+
border: 1px solid $apple-focus-black;
|
|
195
|
+
color: $white;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.btn-oa2-azuread-oauth2 {
|
|
200
|
+
color: $white;
|
|
201
|
+
border-color: $microsoft-black;
|
|
202
|
+
background-color: $microsoft-black;
|
|
203
|
+
|
|
204
|
+
&:hover,
|
|
205
|
+
&:focus {
|
|
206
|
+
background-color: $microsoft-focus-black;
|
|
207
|
+
border: 1px solid $microsoft-focus-black;
|
|
208
|
+
color: $white;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.submit {
|
|
213
|
+
display: inherit;
|
|
214
|
+
margin: 0 auto;
|
|
215
|
+
margin-bottom: 2rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.institute-icon {
|
|
219
|
+
@extend .mr-1;
|
|
220
|
+
@extend .text-gray;
|
|
221
|
+
|
|
222
|
+
display: inline-block;
|
|
223
|
+
margin-bottom: 0.25rem;
|
|
224
|
+
height: 18px;
|
|
225
|
+
width: 18px;
|
|
226
|
+
|
|
227
|
+
svg {
|
|
228
|
+
display: inline-block;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.login-help {
|
|
233
|
+
padding-left: 14px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.invalid-feedback {
|
|
237
|
+
color: paragon.$red;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.full-vertical-height {
|
|
241
|
+
height: 100vh;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.help-links {
|
|
245
|
+
margin-left: -5px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
select.form-control {
|
|
249
|
+
background: none !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
#honor-code p {
|
|
253
|
+
margin: 0;
|
|
254
|
+
padding: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
#honor-code a span {
|
|
258
|
+
@extend .sr-only;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.font-weight-500 {
|
|
262
|
+
font-weight: 500 !important;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.mw-420 {
|
|
266
|
+
max-width: 420px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.mw-500 {
|
|
270
|
+
max-width: 500px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.mw-32em {
|
|
274
|
+
max-width: 32em;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.h-90 {
|
|
278
|
+
height: 90%;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.mt-10 {
|
|
282
|
+
margin-top: 10px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.mt-7 {
|
|
286
|
+
margin-top: 7rem;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.pt-10 {
|
|
290
|
+
padding-top: 10px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
#password-requirement-left {
|
|
294
|
+
opacity: 1;
|
|
295
|
+
@extend .x-small;
|
|
296
|
+
filter: drop-shadow($elevation-level-2-shadow) drop-shadow($elevation-level-2-shadow) !important;
|
|
297
|
+
right: 0.2rem !important;
|
|
298
|
+
|
|
299
|
+
.tooltip-inner {
|
|
300
|
+
background: $white;
|
|
301
|
+
display: block;
|
|
302
|
+
color: paragon.$gray-500;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.arrow::before {
|
|
306
|
+
border-left-color: $white;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
#password-requirement-top {
|
|
311
|
+
@extend .x-small;
|
|
312
|
+
filter: drop-shadow($elevation-level-2-shadow) drop-shadow($elevation-level-2-shadow) !important;
|
|
313
|
+
opacity: 1;
|
|
314
|
+
width: 90%;
|
|
315
|
+
bottom: 10px !important;
|
|
316
|
+
display: flex;
|
|
317
|
+
justify-content: center;
|
|
318
|
+
|
|
319
|
+
.tooltip-inner {
|
|
320
|
+
min-width: 464px !important;
|
|
321
|
+
background: $white;
|
|
322
|
+
display: block;
|
|
323
|
+
color: paragon.$gray-500;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.arrow::before {
|
|
327
|
+
border-top-color: $white;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.yellow-border {
|
|
333
|
+
border: 2px solid paragon.$accent-b;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.institutions__heading {
|
|
337
|
+
color: paragon.$primary-700;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.logistration-button {
|
|
341
|
+
color: paragon.$gray-700;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.logistration-button:hover {
|
|
345
|
+
color: paragon.$gray-700;
|
|
346
|
+
text-decoration: none;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
#forgot-password {
|
|
351
|
+
&:hover {
|
|
352
|
+
text-decoration: underline;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.icon-size {
|
|
357
|
+
width: 2.3rem;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.has-floating-label {
|
|
361
|
+
color: paragon.$gray-500;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.pgn__form-control-floating-label .pgn__form-control-floating-label-content {
|
|
365
|
+
font-size: 0.875rem;
|
|
366
|
+
line-height: 1.5;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.pgn__form-text {
|
|
370
|
+
font-size: 0.75rem;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.form-group__form-field .form-control:focus~.pgn__form-control-floating-label .pgn__form-control-floating-label-content {
|
|
374
|
+
font-size: 16px;
|
|
375
|
+
color: paragon.$primary-700;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.form-group__form-field .form-control:not([value='']):not(:focus)~.pgn__form-control-floating-label .pgn__form-control-floating-label-content {
|
|
379
|
+
font-size: 16px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.pgn__form-group {
|
|
383
|
+
margin-bottom: 1.75rem;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.form-text-size {
|
|
387
|
+
margin-top: 0.188rem !important;
|
|
388
|
+
line-height: 1.25rem;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
@media (min-width: 1024px) {
|
|
392
|
+
.mw-500 {
|
|
393
|
+
width: 500px;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@media (max-width: 600px) {
|
|
398
|
+
.form-control {
|
|
399
|
+
width: 100%;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@media (min-width: 463px) {
|
|
404
|
+
.reset-password-container {
|
|
405
|
+
width: 420px;
|
|
406
|
+
max-width: 420px;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.tpa-skeleton {
|
|
410
|
+
min-width: 464px !important;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
@media (max-width: 767px) {
|
|
416
|
+
.welcome-page-content {
|
|
417
|
+
padding-top: 1.5rem !important;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
.alert {
|
|
423
|
+
p:last-child {
|
|
424
|
+
margin-bottom: 0;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Smaller than Extra Small (Mobile Screens)
|
|
429
|
+
@media (max-width: 464px) {
|
|
430
|
+
.btn-social {
|
|
431
|
+
min-width: 100%;
|
|
432
|
+
margin-bottom: 0.75rem;
|
|
433
|
+
margin-right: 0 !important;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.welcome-page-content,
|
|
437
|
+
.main-content {
|
|
438
|
+
min-width: 100vw !important;
|
|
439
|
+
padding: 1.5rem !important;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
#password-requirement-top {
|
|
443
|
+
display: unset;
|
|
444
|
+
|
|
445
|
+
.tooltip-inner {
|
|
446
|
+
max-width: inherit;
|
|
447
|
+
min-width: unset !important;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.table-striped tbody tr:nth-of-type(odd) {
|
|
453
|
+
background-color: paragon.$light-200;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.institutions--provider-link {
|
|
457
|
+
font-weight: normal;
|
|
458
|
+
font-size: 0.875rem;
|
|
459
|
+
line-height: 1.5rem;
|
|
460
|
+
color: paragon.$primary-700
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.pgn__form-control-decorator-trailing {
|
|
464
|
+
right: 0 !important;
|
|
465
|
+
}
|
package/src/setupTest.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import siteConfig from 'site.config';
|
|
2
|
+
|
|
3
|
+
import { addAppConfigs, configureAnalytics, configureAuth, configureLogging, getSiteConfig, mergeSiteConfig, MockAnalyticsService, MockAuthService, MockLoggingService } from '@openedx/frontend-base';
|
|
4
|
+
|
|
5
|
+
mergeSiteConfig(siteConfig);
|
|
6
|
+
addAppConfigs();
|
|
7
|
+
|
|
8
|
+
export function initializeMockServices() {
|
|
9
|
+
const loggingService = configureLogging(MockLoggingService, {
|
|
10
|
+
config: getSiteConfig(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const authService = configureAuth(MockAuthService, {
|
|
14
|
+
config: getSiteConfig(),
|
|
15
|
+
loggingService,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const analyticsService = configureAnalytics(MockAnalyticsService, {
|
|
19
|
+
config: getSiteConfig(),
|
|
20
|
+
httpClient: authService.getAuthenticatedHttpClient(),
|
|
21
|
+
loggingService,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return { analyticsService, authService, loggingService };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
class ResizeObserver {
|
|
28
|
+
observe() {
|
|
29
|
+
// do nothing
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
unobserve() {
|
|
33
|
+
// do nothing
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
disconnect() {
|
|
37
|
+
// do nothing
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
window.ResizeObserver = ResizeObserver;
|
|
42
|
+
window.scrollTo = (x, y) => {
|
|
43
|
+
document.documentElement.scrollTop = y;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const location = new URL('https://authn.edx.org');
|
|
47
|
+
location.assign = jest.fn();
|
|
48
|
+
location.replace = jest.fn();
|
|
49
|
+
location.reload = jest.fn();
|
|
50
|
+
delete window.location;
|
|
51
|
+
window.location = location;
|
|
52
|
+
|
|
53
|
+
const localStorageMock = jest.fn(() => {
|
|
54
|
+
let store = {};
|
|
55
|
+
return {
|
|
56
|
+
getItem: (key) => (store[key] ?? null),
|
|
57
|
+
setItem: (key, value) => {
|
|
58
|
+
store[key] = value.toString();
|
|
59
|
+
},
|
|
60
|
+
clear: () => {
|
|
61
|
+
store = {};
|
|
62
|
+
},
|
|
63
|
+
removeItem: (key) => {
|
|
64
|
+
delete store[key];
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
})();
|
|
68
|
+
Object.defineProperty(window, 'localStorage', { value: localStorageMock });
|