Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update various form components with updated GCDS styles #4361

Merged
merged 3 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ContactForm = () => {
)}

<h1>{t("contactus.title")}</h1>
<p className="mb-6 mt-[-2rem] text-[1.6rem]">{t("contactus.useThisForm")}</p>
<p className="-mt-8 mb-6 text-[1.6rem]">{t("contactus.useThisForm")}</p>
<p className="mb-14">
{t("contactus.gcFormsTeamPart1")}{" "}
<Link href={`https://www.canada.ca/${language}/contact.html`}>
Expand Down Expand Up @@ -119,7 +119,7 @@ export const ContactForm = () => {
error={getError("request")}
/>
</fieldset>
<div className="focus-group">
<div className="gcds-textarea-wrapper">
<Label id={"label-description"} htmlFor={"description"} className="required" required>
{t("contactus.description.title")}
</Label>
Expand All @@ -134,8 +134,8 @@ export const ContactForm = () => {
error={getError("description")}
/>
</div>
<p className="mt-14 text-[1.6rem]">{t("contactus.followUp")}</p>
<div className="focus-group mt-14">
<h3>{t("contactus.followUp")}</h3>
<div className="gcds-input-wrapper">
<Label id={"label-name"} htmlFor={"name"} className="required" required>
{t("contactus.name")}
</Label>
Expand All @@ -147,7 +147,7 @@ export const ContactForm = () => {
error={getError("name")}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-email"} htmlFor={"email"} className="required" required>
{t("contactus.email")}
</Label>
Expand All @@ -160,7 +160,7 @@ export const ContactForm = () => {
error={getError("email")}
/>
</div>
<div className="focus-group mt-14">
<div className="gcds-input-wrapper">
<Label id="label-department" htmlFor="department" className="required" required>
{t("contactus.department")}
</Label>
Expand All @@ -172,7 +172,7 @@ export const ContactForm = () => {
error={getError("department")}
/>
</div>
<div className="focus-group mt-14">
<div className="gcds-input-wrapper">
<Label id={"label-branch"} htmlFor={"branch"}>
{t("contactus.branch")}
</Label>
Expand All @@ -184,7 +184,7 @@ export const ContactForm = () => {
error={getError("branch")}
/>
</div>
<div className="focus-group mt-14">
<div className="gcds-input-wrapper">
<Label id={"label-jobTitle"} htmlFor={"jobTitle"}>
{t("contactus.jobTitle")}
</Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const SupportForm = () => {
)}

<h1>{t("support.title")}</h1>
<p className="mb-6 mt-[-2rem] text-[1.6rem]">
<p className="-mt-8 mb-6 text-[1.6rem]">
{t("support.experience")}
<Link href={`https://articles.alpha.canada.ca/forms-formulaires/${language}/guidance`}>
{t("support.guidanceLink")}
Expand All @@ -87,7 +87,7 @@ export const SupportForm = () => {
</Alert.Danger>
)}

<div className="focus-group mt-14">
<div className="gcds-input-wrapper mt-14">
<Label id={"label-name"} htmlFor={"name"} className="required" required>
{t("support.name")}
</Label>
Expand All @@ -99,7 +99,7 @@ export const SupportForm = () => {
error={getError("name")}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-email"} htmlFor={"email"} className="required" required>
{t("support.email")}
</Label>
Expand Down Expand Up @@ -146,7 +146,7 @@ export const SupportForm = () => {
error={getError("request")}
/>
</fieldset>
<div className="focus-group">
<div className="gcds-textarea-wrapper">
<Label id={"label-description"} htmlFor={"description"} className="required" required>
{t("support.description.title")}
</Label>
Expand All @@ -156,7 +156,7 @@ export const SupportForm = () => {
<TextArea
id="description"
name="description"
className="required w-[34rem] mt-4"
className="required mt-4 w-[34rem]"
error={getError("description")}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ export default async function Page() {
const { t, i18n } = await serverTranslation(["signup"]);

return (
<div id="auth-panel">
<h1 className="border-b-0 mt-6 mb-12">{t("accountCreated.title")}</h1>
<h2>{t("accountCreated.yourAccountListDescription")}</h2>
<ul>
<div>
<h1 className="mb-12 mt-6 border-b-0">{t("accountCreated.title")}</h1>
<h3 className="!mb-2">{t("accountCreated.yourAccountListDescription")}</h3>
<ul className="mb-4">
<li>{t("accountCreated.yourAccountList.item1")}</li>
<li>{t("accountCreated.yourAccountList.item2")}</li>
<li>{t("accountCreated.yourAccountList.item3")}</li>
</ul>
<h2 className="mt-8">{t("accountCreated.notIncluded.title")}</h2>
<p>{t("accountCreated.notIncluded.paragraph1")}</p>
<h2 className="mt-8">{t("accountCreated.unlockPublishing.title")}</h2>
<p>{t("accountCreated.unlockPublishing.paragraph1")}</p>
<p className="mt-6">{t("accountCreated.unlockPublishing.paragraph2")}</p>
<h3 className="!mb-2">{t("accountCreated.notIncluded.title")}</h3>
<p className="mb-8">{t("accountCreated.notIncluded.paragraph1")}</p>
<h3 className="!mb-2">{t("accountCreated.unlockPublishing.title")}</h3>
<p className="mb-4">{t("accountCreated.unlockPublishing.paragraph1")}</p>
<p>{t("accountCreated.unlockPublishing.paragraph2")}</p>
<div className="mt-20">
<LinkButton.Primary href={`/${i18n.language}/unlock-publishing/`} className="mr-4">
{t("accountCreated.unlockPublishingButton")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function Page({ params: { locale } }: { params: { locale: s
const supportHref = `/${locale}/support`;
return (
<div>
<h2 className="mt-4 mb-6 p-0">{t("title")}</h2>
<h2 className="mb-6 mt-4 p-0">{t("title")}</h2>
<p className="mb-10">{t("description")}</p>
<div className="laptop:flex">
<LinkButton.Primary href={supportHref} className="mb-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const LoginForm = () => {
<Link href={`/${language}/auth/register`}>{t("signUpLink")}</Link>
</p>
<form id="login" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-username"} htmlFor={"username"} className="required" required>
{t("fields.username.label")}
</Label>
Expand All @@ -92,7 +92,7 @@ export const LoginForm = () => {
}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-password"} htmlFor={"password"} className="required" required>
{t("fields.password.label")}
</Label>
Expand All @@ -107,7 +107,7 @@ export const LoginForm = () => {
}
/>
</div>
<p className="-mt-6 mb-10">
<p className="mb-10">
<Link href={`/${language}/auth/reset-password`} className="-mt-8 mb-10">
{t("resetPasswordText")}
</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const MFAForm = () => {
</div>
) : (
<form id="verificationCodeForm" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id={"label-verificationCode"}
htmlFor="verificationCode"
Expand All @@ -168,7 +168,7 @@ export const MFAForm = () => {
{t("verify.fields.confirmationCode.description")}
</div>
<TextInput
className="h-10 w-36 rounded"
className="!w-36"
type="text"
id="verificationCode"
name="verificationCode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const RegistrationForm = () => {
</Link>
</p>
<form id="registration" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-name"} htmlFor={"name"} className="required" required>
{t("signUpRegistration.fields.name.label")}
</Label>
Expand All @@ -113,7 +113,7 @@ export const RegistrationForm = () => {
validationError={state.validationErrors?.find((e) => e.fieldKey === "name")?.fieldValue}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-username"} htmlFor={"username"} className="required" required>
{t("signUpRegistration.fields.username.label")}
</Label>
Expand All @@ -131,13 +131,13 @@ export const RegistrationForm = () => {
}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id={"label-password"} htmlFor={"password"} className="required" required>
{t("signUpRegistration.fields.password.label")}
</Label>
<div className="mb-2 text-sm text-black" id={"password-hint"}>
{t("signUpRegistration.fields.password.hintList.title")}
<ul className="mt-2">
<ul className="mb-4 mt-2">
<li>{t("signUpRegistration.fields.password.hintList.characters")}</li>
<li>{t("signUpRegistration.fields.password.hintList.number")}</li>
<li>{t("signUpRegistration.fields.password.hintList.capital")}</li>
Expand All @@ -155,7 +155,7 @@ export const RegistrationForm = () => {
}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id={"label-passwordConfirmation"}
htmlFor={"passwordConfirmation"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const InitiateResetForm = ({
)}
<h1 className="mb-12 mt-6 border-b-0">{t("provideUsername.title")}</h1>
<form id="provideUsername" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id="label-username" htmlFor="username" className="required" required>
{t("provideUsername.fields.username.label")}
</Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const PasswordResetForm = ({ email }: { email: string }) => {
)}
<h1 className="mb-12 mt-6 border-b-0">{t("resetPassword.title")}</h1>
<form id="resetPassword" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id="label-confirmationCode"
htmlFor="confirmationCode"
Expand All @@ -86,7 +86,7 @@ export const PasswordResetForm = ({ email }: { email: string }) => {
{t("resetPassword.fields.confirmationCode.label")}
</Label>
<TextInput
className="h-10 w-36 rounded"
className="!w-36"
type="text"
id="confirmationCode"
name="confirmationCode"
Expand All @@ -96,15 +96,14 @@ export const PasswordResetForm = ({ email }: { email: string }) => {
}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label id="label-password" htmlFor="password" className="required" required>
{t("account.fields.password.label", { ns: "common" })}
</Label>
<Description className="text-xl text-black-default" id="password-hint">
{t("account.fields.password.hint", { ns: "common" })}
</Description>
<TextInput
className="h-10 w-full max-w-lg rounded"
type="password"
id="password"
name="password"
Expand All @@ -114,7 +113,7 @@ export const PasswordResetForm = ({ email }: { email: string }) => {
}
/>
</div>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id="label-passwordConfirmation"
htmlFor="passwordConfirmation"
Expand All @@ -124,7 +123,6 @@ export const PasswordResetForm = ({ email }: { email: string }) => {
{t("account.fields.passwordConfirmation.label", { ns: "common" })}
</Label>
<TextInput
className="h-10 w-full max-w-lg rounded"
type="password"
id="passwordConfirmation"
name="passwordConfirmation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const QuestionChallengeForm = ({
<h1 className="mb-12 mt-6 border-b-0">{t("securityQuestions.title")}</h1>
<p className="mb-6 max-w-lg">{t("securityQuestions.description")}</p>
<form id="resetPassword" action={formAction} noValidate>
<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id="label-question1"
htmlFor="question1"
Expand All @@ -97,7 +97,6 @@ export const QuestionChallengeForm = ({
{userSecurityQuestions[0][langKey]}
</Label>
<TextInput
className="h-10 w-[75%] rounded"
type="text"
id="question1"
name="question1"
Expand All @@ -108,7 +107,7 @@ export const QuestionChallengeForm = ({
/>
</div>

<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id="label-question2"
htmlFor="question2"
Expand All @@ -118,7 +117,6 @@ export const QuestionChallengeForm = ({
{userSecurityQuestions[1][langKey]}
</Label>
<TextInput
className="h-10 w-[75%] rounded"
type="text"
id="question2"
name="question2"
Expand All @@ -129,7 +127,7 @@ export const QuestionChallengeForm = ({
/>
</div>

<div className="focus-group">
<div className="gcds-input-wrapper">
<Label
id="label-question3"
htmlFor="question3"
Expand All @@ -139,7 +137,6 @@ export const QuestionChallengeForm = ({
{userSecurityQuestions[2][langKey]}
</Label>
<TextInput
className="h-10 w-[75%] rounded"
type="text"
id="question3"
name="question3"
Expand Down
Loading
Loading