Revert "fix(deps): update dependency @edx/paragon to v13.17.5" (#243)

* Revert "fix(deps): update dependency @edx/paragon to v13.17.5 (#223)"

This reverts commit 913e839986.

* fix dropdown icon size
This commit is contained in:
Waheed Ahmed
2021-04-13 19:07:48 +05:00
committed by GitHub
parent 913e839986
commit 0758cab290
11 changed files with 102 additions and 56 deletions

12
package-lock.json generated
View File

@@ -3924,9 +3924,9 @@
}
},
"@edx/paragon": {
"version": "13.17.5",
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-13.17.5.tgz",
"integrity": "sha512-ZLgZU/8kQBfHT3gd1s3w6AQZIOfufqMU4hItB4dSaqVcCX8ECmtE/AAMdwasTNxyhGCzfITuVe8xB9wYOnU/Xw==",
"version": "13.16.1",
"resolved": "https://registry.npmjs.org/@edx/paragon/-/paragon-13.16.1.tgz",
"integrity": "sha512-8GxeS0OQLKJKrkqUa6HRk+wi/96IvhuY6JjjQYIf4+SA6TXLu57SwvtsQN6sLuB3PTxnW64WQF3MepvpNo9VpQ==",
"requires": {
"@fortawesome/fontawesome-svg-core": "^1.2.30",
"@fortawesome/free-solid-svg-icons": "^5.14.0",
@@ -20980,9 +20980,9 @@
}
},
"react-popper": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.5.tgz",
"integrity": "sha512-kxGkS80eQGtLl18+uig1UIf9MKixFSyPxglsgLBxlYnyDf65BiY9B3nZSc6C9XUNDgStROB0fMQlTEz1KxGddw==",
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.2.4.tgz",
"integrity": "sha512-NacOu4zWupdQjVXq02XpTD3yFPSfg5a7fex0wa3uGKVkFK7UN6LvVxgcb+xYr56UCuWiNPMH20tntdVdJRwYew==",
"requires": {
"react-fast-compare": "^3.0.1",
"warning": "^4.0.2"

View File

@@ -38,7 +38,7 @@
"@edx/frontend-component-cookie-policy-banner": "2.1.12",
"@edx/frontend-component-header": "2.2.5",
"@edx/frontend-platform": "1.8.4",
"@edx/paragon": "13.17.5",
"@edx/paragon": "13.16.1",
"@fortawesome/fontawesome-svg-core": "1.2.32",
"@fortawesome/free-brands-svg-icons": "5.15.1",
"@fortawesome/free-regular-svg-icons": "5.15.1",

View File

@@ -329,3 +329,7 @@ $apple-focus-black: $apple-black;
}
}
}
.custom-select-size {
background-size: 8px 10px;
}

View File

@@ -72,7 +72,7 @@ const AuthnCustomValidationFormGroup = (props) => {
if (props.type === 'select') {
inputProps.options = props.selectOptions;
inputProps.className = props.value === '' ? 'text-muted border-gray-600' : null;
inputProps.className = props.value === '' ? `${props.inputFieldStyle} text-muted` : null;
}
if (props.type === 'checkbox') {
inputProps.checked = props.isChecked;

View File

@@ -15,14 +15,14 @@ describe('AuthnCustomValidationFormGroup', () => {
it('should show label in place of placeholder when field is empty', () => {
const validationFormGroup = mount(<AuthnCustomValidationFormGroup {...props} />);
expect(validationFormGroup.find('label').prop('className')).toEqual('pgn__form-label pt-10 focus-out');
expect(validationFormGroup.find('label').prop('className')).toEqual('pt-10 focus-out form-label');
});
it('should show label on top of field when field is focused in', () => {
const validationFormGroup = mount(<AuthnCustomValidationFormGroup {...props} />);
validationFormGroup.find('input').simulate('focus');
expect(validationFormGroup.find('label').prop('className')).toEqual('pgn__form-label pt-10 h6');
expect(validationFormGroup.find('label').prop('className')).toEqual('pt-10 h6 form-label');
});
it('should keep label hidden for checkbox field', () => {
@@ -32,7 +32,7 @@ describe('AuthnCustomValidationFormGroup', () => {
optionalFieldCheckbox: true,
};
const validationFormGroup = mount(<AuthnCustomValidationFormGroup {...props} />);
expect(validationFormGroup.find('label').prop('className')).toEqual('pgn__form-label sr-only');
expect(validationFormGroup.find('label').prop('className')).toEqual('sr-only form-label');
});
it('should keep label hidden when input field is not empty', () => {
@@ -41,6 +41,6 @@ describe('AuthnCustomValidationFormGroup', () => {
value: 'test',
};
const validationFormGroup = mount(<AuthnCustomValidationFormGroup {...props} />);
expect(validationFormGroup.find('label').prop('className')).toEqual('pgn__form-label sr-only');
expect(validationFormGroup.find('label').prop('className')).toEqual('sr-only form-label');
});
});

View File

@@ -24,7 +24,8 @@ exports[`ForgotPasswordPage should match default section snapshot 1`] = `
className="form-group mb-0 w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="forgot-password-input"
>
Email
</label>
@@ -146,7 +147,8 @@ exports[`ForgotPasswordPage should match forbidden section snapshot 1`] = `
className="form-group mb-0 w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="forgot-password-input"
>
Email
</label>
@@ -253,7 +255,8 @@ exports[`ForgotPasswordPage should match pending section snapshot 1`] = `
className="form-group mb-0 w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="forgot-password-input"
>
Email
</label>

View File

@@ -37,7 +37,8 @@ exports[`LoginPage should match TPA provider snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email
</label>
@@ -62,7 +63,8 @@ exports[`LoginPage should match TPA provider snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password
</label>
@@ -233,7 +235,8 @@ exports[`LoginPage should match default section snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email
</label>
@@ -258,7 +261,8 @@ exports[`LoginPage should match default section snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password
</label>
@@ -427,7 +431,8 @@ exports[`LoginPage should match forget password alert message snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email
</label>
@@ -452,7 +457,8 @@ exports[`LoginPage should match forget password alert message snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password
</label>
@@ -581,7 +587,8 @@ exports[`LoginPage should match pending button state snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email
</label>
@@ -606,7 +613,8 @@ exports[`LoginPage should match pending button state snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password
</label>
@@ -772,7 +780,8 @@ exports[`LoginPage should show error message 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email
</label>
@@ -797,7 +806,8 @@ exports[`LoginPage should show error message 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password
</label>

View File

@@ -38,6 +38,7 @@ const OptionalFields = (props) => {
className="mb-20 opt-inline-field data-hj-suppress"
onChange={(e) => onChangeHandler('gender', e.target.value)}
selectOptions={getOptions().genderOptions}
inputFieldStyle="border-gray-600 custom-select-size"
/>
<AuthnValidationFormGroup
label={intl.formatMessage(messages['registration.year.of.birth.label'])}
@@ -49,6 +50,7 @@ const OptionalFields = (props) => {
className="mb-20 opt-inline-field opt-year-field data-hj-suppress"
onChange={(e) => onChangeHandler('yearOfBirth', e.target.value)}
selectOptions={getOptions().yearOfBirthOptions}
inputFieldStyle="border-gray-600 custom-select-size"
/>
<AuthnValidationFormGroup
label={intl.formatMessage(messages['registration.field.education.levels.label'])}
@@ -60,6 +62,7 @@ const OptionalFields = (props) => {
className="mb-20 data-hj-suppress"
onChange={(e) => onChangeHandler('levelOfEducation', e.target.value)}
selectOptions={getOptions().educationLevelOptions}
inputFieldStyle="border-gray-600 custom-select-size"
/>
<AuthnValidationFormGroup
label={intl.formatMessage(messages['registration.goals.label'])}
@@ -70,7 +73,7 @@ const OptionalFields = (props) => {
value={values.goals}
className="mb-20"
onChange={(e) => onChangeHandler('goals', e.target.value)}
inputFieldStyle="border-gray-600"
inputFieldStyle="border-gray-600 custom-select-size"
/>
</>
);

View File

@@ -549,7 +549,7 @@ class RegistrationPage extends React.Component {
onBlur={(e) => this.handleOnBlur(e)}
onChange={(e) => this.handleOnChange(e)}
selectOptions={this.getCountryOptions()}
inputFieldStyle="border-gray-600"
inputFieldStyle="border-gray-600 custom-select-size"
/>
<div id="honor-code" className="pt-10 small">
<FormattedMessage

View File

@@ -36,7 +36,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="name"
>
Full name (required)
</label>
@@ -61,7 +62,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="username"
>
Public username (required)
</label>
@@ -86,7 +88,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email (required)
</label>
@@ -111,7 +114,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password (required)
</label>
@@ -136,7 +140,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group mb-0 data-hj-suppress"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="country"
>
Country or region of residence (required)
</label>
@@ -144,7 +149,7 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
aria-describedby=""
aria-invalid={false}
autoComplete="on"
className="form-control text-muted border-gray-600"
className="form-control border-gray-600 custom-select-size text-muted"
id="country"
name="country"
onBlur={[Function]}
@@ -1466,7 +1471,8 @@ exports[`RegistrationPageTests should match TPA provider snapshot 1`] = `
className="form-group custom-control pt-10 mb-0"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="optional"
>
Support education research by providing additional information. (Optional)
</label>
@@ -1599,7 +1605,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="name"
>
Full name (required)
</label>
@@ -1624,7 +1631,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="username"
>
Public username (required)
</label>
@@ -1649,7 +1657,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email (required)
</label>
@@ -1674,7 +1683,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password (required)
</label>
@@ -1699,7 +1709,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group mb-0 data-hj-suppress"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="country"
>
Country or region of residence (required)
</label>
@@ -1707,7 +1718,7 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
aria-describedby=""
aria-invalid={false}
autoComplete="on"
className="form-control text-muted border-gray-600"
className="form-control border-gray-600 custom-select-size text-muted"
id="country"
name="country"
onBlur={[Function]}
@@ -3029,7 +3040,8 @@ exports[`RegistrationPageTests should match default section snapshot 1`] = `
className="form-group custom-control pt-10 mb-0"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="optional"
>
Support education research by providing additional information. (Optional)
</label>
@@ -3117,7 +3129,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="name"
>
Full name (required)
</label>
@@ -3142,7 +3155,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="username"
>
Public username (required)
</label>
@@ -3167,7 +3181,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group data-hj-suppress"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="email"
>
Email (required)
</label>
@@ -3192,7 +3207,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="password"
>
Password (required)
</label>
@@ -3217,7 +3233,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group mb-0 data-hj-suppress"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="country"
>
Country or region of residence (required)
</label>
@@ -3225,7 +3242,7 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
aria-describedby=""
aria-invalid={false}
autoComplete="on"
className="form-control text-muted border-gray-600"
className="form-control border-gray-600 custom-select-size text-muted"
id="country"
name="country"
onBlur={[Function]}
@@ -4547,7 +4564,8 @@ exports[`RegistrationPageTests should match pending button state snapshot 1`] =
className="form-group custom-control pt-10 mb-0"
>
<label
className="pgn__form-label sr-only"
className="sr-only form-label"
htmlFor="optional"
>
Support education research by providing additional information. (Optional)
</label>

View File

@@ -25,7 +25,8 @@ exports[`ResetPasswordPage should match invalid token message section snapshot 1
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="reset-password-input"
>
New password
</label>
@@ -50,7 +51,8 @@ exports[`ResetPasswordPage should match invalid token message section snapshot 1
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="confirm-password-input"
>
Confirm password
</label>
@@ -124,7 +126,8 @@ exports[`ResetPasswordPage should match pending reset message section snapshot 1
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="reset-password-input"
>
New password
</label>
@@ -149,7 +152,8 @@ exports[`ResetPasswordPage should match pending reset message section snapshot 1
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="confirm-password-input"
>
Confirm password
</label>
@@ -244,7 +248,8 @@ exports[`ResetPasswordPage should match reset password default section snapshot
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="reset-password-input"
>
New password
</label>
@@ -269,7 +274,8 @@ exports[`ResetPasswordPage should match reset password default section snapshot
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="confirm-password-input"
>
Confirm password
</label>
@@ -381,7 +387,8 @@ exports[`ResetPasswordPage show spinner component during token validation 1`] =
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="reset-password-input"
>
New password
</label>
@@ -406,7 +413,8 @@ exports[`ResetPasswordPage show spinner component during token validation 1`] =
className="form-group w-100"
>
<label
className="pgn__form-label pt-10 focus-out"
className="pt-10 focus-out form-label"
htmlFor="confirm-password-input"
>
Confirm password
</label>