fix: component styles and sign up / onboarding dark mode (#12581)

* fix divider border for addOnLeading

* fix primary button in dark mode and password input border

* signup dark mode and corner fix

* onboarding dark mode

* fix css var issue and use inline vars for light and dark mode

* Invert google icon on dark mode

* Fix typo

* fix eslint errors with yarn lint:fix

* use css vars on login page as well

* running lint manually

* Fix subtle

* Fix

* Fix

* linting

* linting

* chore: restore main yarn.lock

* fix: lint error

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Sean Brydon <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: sean-brydon <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-12-06 21:10:14 +00:00
1 parent 8bed690ed6
commit 55d44ce789
10 files changed
+56 -85

No files matched your search

@@ -5,7 +5,7 @@ import { Toaster } from "react-hot-toast";
import { APP_NAME } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert, Button, Form, TextField } from "@calcom/ui";
import { Alert, Button, Form, PasswordField, TextField } from "@calcom/ui";
export default function AppleCalendarSetup() {
const { t } = useLocale();
@@ -20,8 +20,8 @@ export default function AppleCalendarSetup() {
const [errorMessage, setErrorMessage] = useState("");
return (
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen dark:bg-inherit">
<div className="bg-default dark:bg-muted border-subtle m-auto rounded p-5 dark:border md:w-[560px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-x-5 md:space-y-0">
<div>
{/* eslint-disable @next/next/no-img-element */}
@@ -32,12 +32,14 @@ export default function AppleCalendarSetup() {
/>
</div>
<div>
<h1 className="text-default">{t("connect_apple_server")}</h1>
<h1 className="text-default dark:text-emphasis mb-3 font-semibold">
{t("connect_apple_server")}
</h1>
<div className="mt-1 text-sm">
{t("apple_server_generate_password", { appName: APP_NAME })}{" "}
<a
className="text-indigo-400"
className="font-bold hover:underline"
href="https://appleid.apple.com/account/manage"
target="_blank"
rel="noopener noreferrer">
@@ -45,7 +47,7 @@ export default function AppleCalendarSetup() {
</a>
. {t("credentials_stored_encrypted")}
</div>
<div className="my-2 mt-3">
<div className="my-2 mt-4">
<Form
form={form}
handleSubmit={async (values) => {
@@ -65,7 +67,7 @@ export default function AppleCalendarSetup() {
}
}}>
<fieldset
className="space-y-2"
className="space-y-4"
disabled={form.formState.isSubmitting}
data-testid="apple-calendar-form">
<TextField
@@ -76,9 +78,8 @@ export default function AppleCalendarSetup() {
placeholder="[email protected]"
data-testid="apple-calendar-email"
/>
<TextField
<PasswordField
required
type="password"
{...form.register("password")}
label={t("password")}
placeholder="•••••••••••••"
+1 -1
View File
@@ -50,7 +50,7 @@ export const buttonClasses = cva(
primary:
"bg-brand-default hover:bg-brand-emphasis focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset focus-visible:ring-brand-default text-brand disabled:bg-brand-subtle disabled:text-brand-subtle disabled:opacity-40 disabled:hover:bg-brand-subtle disabled:hover:text-brand-default disabled:hover:opacity-40",
secondary:
"text-emphasis border border-default bg-default hover:bg-muted hover:border-emphasis focus-visible:bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset focus-visible:ring-empthasis disabled:border-subtle disabled:bg-opacity-30 disabled:text-muted disabled:hover:bg-opacity-30 disabled:hover:text-muted disabled:hover:border-subtle disabled:hover:bg-default",
"text-emphasis border border-default bg-default hover:bg-muted hover:border-emphasis focus-visible:bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset focus-visible:ring-empthasis disabled:border-subtle disabled:bg-opacity-30 disabled:text-muted disabled:hover:bg-opacity-30 disabled:hover:text-muted disabled:hover:border-subtle disabled:hover:bg-default",
minimal:
"text-emphasis hover:bg-subtle focus-visible:bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset focus-visible:ring-empthasis disabled:border-subtle disabled:bg-opacity-30 disabled:text-muted disabled:hover:bg-transparent disabled:hover:text-muted disabled:hover:border-subtle",
destructive:
+27 -29
View File
@@ -31,35 +31,33 @@ export const PasswordField = forwardRef<HTMLInputElement, InputFieldProps>(funct
const textLabel = isPasswordVisible ? t("hide_password") : t("show_password");
return (
<div className="[&_.group:hover_.addon-wrapper]:border-emphasis relative [&_.group:focus-within_.addon-wrapper]:border-neutral-300">
<InputField
type={isPasswordVisible ? "text" : "password"}
placeholder={props.placeholder || "•••••••••••••"}
ref={ref}
{...props}
className={classNames(
"addon-wrapper mb-0 ltr:border-r-0 ltr:pr-10 rtl:border-l-0 rtl:pl-10",
props.className
)}
addOnFilled={false}
addOnSuffix={
<Tooltip content={textLabel}>
<button
className="text-emphasis h-9"
tabIndex={-1}
type="button"
onClick={() => toggleIsPasswordVisible()}>
{isPasswordVisible ? (
<EyeOff className="h-4 stroke-[2.5px]" />
) : (
<Eye className="h-4 stroke-[2.5px]" />
)}
<span className="sr-only">{textLabel}</span>
</button>
</Tooltip>
}
/>
</div>
<InputField
type={isPasswordVisible ? "text" : "password"}
placeholder={props.placeholder || "•••••••••••••"}
ref={ref}
{...props}
className={classNames(
"addon-wrapper mb-0 ltr:border-r-0 ltr:pr-10 rtl:border-l-0 rtl:pl-10",
props.className
)}
addOnFilled={false}
addOnSuffix={
<Tooltip content={textLabel}>
<button
className="text-emphasis h-9"
tabIndex={-1}
type="button"
onClick={() => toggleIsPasswordVisible()}>
{isPasswordVisible ? (
<EyeOff className="h-4 stroke-[2.5px]" />
) : (
<Eye className="h-4 stroke-[2.5px]" />
)}
<span className="sr-only">{textLabel}</span>
</button>
</Tooltip>
}
/>
);
});
@@ -107,7 +107,9 @@ export const InputField = forwardRef<HTMLInputElement, InputFieldProps>(function
dir="ltr"
className="focus-within:ring-brand-default group relative mb-1 flex items-center rounded-md focus-within:outline-none focus-within:ring-2">
{addOnLeading && (
<Addon isFilled={addOnFilled} className={classNames("rounded-l-md border-r-0", addOnClassname)}>
<Addon
isFilled={addOnFilled}
className={classNames("ltr:rounded-l-md rtl:rounded-r-md", addOnClassname)}>
{addOnLeading}
</Addon>
)}
@@ -42,7 +42,7 @@ const Switch = (
{LockedIcon && <div className="mr-2">{LockedIcon}</div>}
<PrimitiveSwitch.Root
className={cx(
isChecked ? "bg-brand-default" : "bg-emphasis",
isChecked ? "bg-brand-default dark:bg-emphasis" : "bg-emphasis",
primitiveProps.disabled && "cursor-not-allowed",
"focus:ring-brand-default h-5 w-[34px] rounded-full shadow-none focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1",
props.className