a11y: right-to-left improvements (#6235)
* fixed a ton of rtl issues * removed duplicant Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
90 files changed
+248
-207
No files matched your search
@@ -63,7 +63,7 @@ export const EventTypeFilter = () => {
|
||||
type="checkbox"
|
||||
name=""
|
||||
id=""
|
||||
className="text-primary-600 focus:ring-primary-500 mr-2 h-4 w-4 rounded border-gray-300 "
|
||||
className="text-primary-600 focus:ring-primary-500 h-4 w-4 rounded border-gray-300 ltr:mr-2 rtl:ml-2 "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@ const filters: Filter[] = [
|
||||
|
||||
export function FiltersContainer() {
|
||||
return (
|
||||
<div className="flex w-full space-x-2 overflow-x-scroll lg:justify-end ">
|
||||
<div className="flex w-full space-x-2 overflow-x-scroll rtl:space-x-reverse lg:justify-end ">
|
||||
{filters.map((filter) => {
|
||||
if (!filter.showByDefault) {
|
||||
// TODO: check if any of the controllingQueryParams are present in the query params and show the filter if so
|
||||
|
||||
@@ -18,7 +18,7 @@ export const PeopleFilter = () => {
|
||||
<AnimatedPopover
|
||||
text={userNames && userNames.length > 0 ? `${userNames.join(", ")}` : t("all_users_filter_label")}>
|
||||
<div className="item-center flex px-4 py-[6px] focus-within:bg-gray-100">
|
||||
<div className="mr-2 flex h-6 w-6 items-center justify-center">
|
||||
<div className="flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
|
||||
<Icon.FiUser className="h-full w-full" />
|
||||
</div>
|
||||
<label htmlFor="allUsers" className="mr-auto self-center truncate text-sm font-medium text-gray-700">
|
||||
|
||||
@@ -18,7 +18,7 @@ export const TeamsMemberFilter = () => {
|
||||
<AnimatedPopover
|
||||
text={teamNames && teamNames.length > 0 ? `${teamNames.join(", ")}` : t("all_bookings_filter_label")}>
|
||||
<div className="item-center flex px-4 py-[6px] focus-within:bg-gray-100">
|
||||
<div className="mr-2 flex h-6 w-6 items-center justify-center">
|
||||
<div className="flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
|
||||
<Icon.FiLayers className="h-full w-full" />
|
||||
</div>
|
||||
<label
|
||||
|
||||
@@ -16,7 +16,7 @@ export function SchedulerHeading() {
|
||||
{startDate.format("MMM DD")}-{endDate.format("DD")}
|
||||
<span className="text-gray-500">,{startDate.format("YYYY")}</span>
|
||||
</h1>
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className="flex items-center space-x-2 rtl:space-x-reverse">
|
||||
{/* TODO: Renable when we have daily/mobile support */}
|
||||
{/* <ToggleGroup
|
||||
options={[
|
||||
|
||||
@@ -83,7 +83,7 @@ export default function ApiKeyDialogForm({
|
||||
}}
|
||||
type="button"
|
||||
className="rounded-l-none py-[19px] text-base ">
|
||||
<ClipboardCopyIcon className="mr-2 h-5 w-5 text-neutral-100" />
|
||||
<ClipboardCopyIcon className="h-5 w-5 text-neutral-100 ltr:mr-2 rtl:ml-2" />
|
||||
{t("copy")}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
@@ -137,7 +137,7 @@ const PendingMemberItem = (props: { member: TeamMember; index: number; teamId: n
|
||||
key={member.email}
|
||||
className={classNames("flex items-center justify-between p-6 text-sm", index !== 0 && "border-t")}
|
||||
data-testid="pending-member-item">
|
||||
<div className="flex space-x-2">
|
||||
<div className="flex space-x-2 rtl:space-x-reverse">
|
||||
<Avatar
|
||||
gravatarFallbackMd5="teamMember"
|
||||
size="mdLg"
|
||||
|
||||
@@ -109,7 +109,7 @@ export const CreateANewTeamForm = () => {
|
||||
render={({ field: { value } }) => (
|
||||
<div className="flex items-center">
|
||||
<Avatar alt="" imageSrc={value || null} gravatarFallbackMd5="newTeam" size="lg" />
|
||||
<div className="ml-4">
|
||||
<div className="ltr:ml-4 rtl:mr-4">
|
||||
<ImageUploader
|
||||
target="avatar"
|
||||
id="avatar-upload"
|
||||
@@ -125,7 +125,7 @@ export const CreateANewTeamForm = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex space-x-2">
|
||||
<div className="flex space-x-2 rtl:space-x-reverse">
|
||||
<Button
|
||||
disabled={createTeamMutation.isLoading}
|
||||
color="secondary"
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function MemberChangeRoleModal(props: {
|
||||
</p>
|
||||
)}
|
||||
<div className="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
|
||||
<Button type="submit" color="primary" className="ltr:ml-2 rtl:mr-2">
|
||||
<Button type="submit" color="primary" className="ltr:ml-2 ltr:mr-2 rtl:ml-2">
|
||||
{t("save")}
|
||||
</Button>
|
||||
<Button type="button" color="secondary" onClick={props.onExit}>
|
||||
|
||||
@@ -151,7 +151,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
|
||||
<Button
|
||||
type="submit"
|
||||
color="primary"
|
||||
className="ltr:ml-2 rtl:mr-2"
|
||||
className="ltr:ml-2 ltr:mr-2 rtl:ml-2"
|
||||
data-testid="invite-new-member-button">
|
||||
{t("invite_new_member")}
|
||||
</Button>
|
||||
|
||||
@@ -104,7 +104,7 @@ export default function MemberListItem(props: Props) {
|
||||
className="h-10 w-10 rounded-full"
|
||||
/>
|
||||
|
||||
<div className="ml-3 inline-block">
|
||||
<div className="inline-block ltr:ml-3 rtl:mr-3">
|
||||
<div className="mb-1 flex">
|
||||
<span className="mr-1 text-sm font-bold leading-4">{name}</span>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ function SkeletonItem() {
|
||||
return (
|
||||
<li className="group flex w-full items-center justify-between px-3 py-4">
|
||||
<div className="flex-grow truncate text-sm">
|
||||
<div className="flex justify-start space-x-2 px-2">
|
||||
<div className="flex justify-start space-x-2 px-2 rtl:space-x-reverse">
|
||||
<SkeletonText className="h-10 w-10 rounded-full" />
|
||||
<div className="flex flex-col space-y-2">
|
||||
<SkeletonText className="h-4 w-32" />
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function TeamAvailabilityModal(props: Props) {
|
||||
alt={props.member?.name || ""}
|
||||
className="h-14 w-14 rounded-full"
|
||||
/>
|
||||
<div className="ml-3 inline-block pt-1">
|
||||
<div className="inline-block pt-1 ltr:ml-3 rtl:mr-3">
|
||||
<span className="text-lg font-bold text-neutral-700">{props.member?.name}</span>
|
||||
<span className="-mt-1 block text-sm text-gray-400">{props.member?.email}</span>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function TeamAvailabilityScreen(props: Props) {
|
||||
alt={member?.name || ""}
|
||||
className="min-w-10 min-h-10 mt-1 h-10 w-10 rounded-full"
|
||||
/>
|
||||
<div className="ml-3 inline-block overflow-hidden pt-1">
|
||||
<div className="inline-block overflow-hidden pt-1 ltr:ml-3 rtl:mr-3">
|
||||
<span className="truncate text-lg font-bold text-neutral-700">{member?.name}</span>
|
||||
<span className="-mt-1 block truncate text-sm text-gray-400">{member?.email}</span>
|
||||
</div>
|
||||
|
||||
@@ -66,7 +66,7 @@ export default function TeamInviteListItem(props: Props) {
|
||||
alt="Team Logo"
|
||||
className=""
|
||||
/>
|
||||
<div className="ml-3 inline-block">
|
||||
<div className="inline-block ltr:ml-3 rtl:mr-3">
|
||||
<span className="text-sm font-semibold text-black">{team.name}</span>
|
||||
<span className="block text-sm leading-5 text-gray-700">
|
||||
{t("invited_by_team", { teamName: team.name, role: t(team.role.toLocaleLowerCase()) })}
|
||||
|
||||
@@ -71,7 +71,7 @@ export default function TeamListItem(props: Props) {
|
||||
alt="Team Logo"
|
||||
className="min-h-9 min-w-9 h-9 w-9 rounded-full"
|
||||
/>
|
||||
<div className="ml-3 inline-block">
|
||||
<div className="inline-block ltr:ml-3 rtl:mr-3">
|
||||
<span className="text-sm font-bold text-neutral-700">{team.name}</span>
|
||||
<span className="block text-xs text-gray-400">
|
||||
{team.slug ? `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/${team.slug}` : "Unpublished team"}
|
||||
@@ -103,7 +103,11 @@ export default function TeamListItem(props: Props) {
|
||||
<Button type="button" color="secondary" onClick={declineInvite}>
|
||||
{t("reject")}
|
||||
</Button>
|
||||
<Button type="button" color="primary" className="ltr:ml-2 rtl:mr-2" onClick={acceptInvite}>
|
||||
<Button
|
||||
type="button"
|
||||
color="primary"
|
||||
className="ltr:ml-2 ltr:mr-2 rtl:ml-2"
|
||||
onClick={acceptInvite}>
|
||||
{t("accept")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,7 @@ export function TeamsListing() {
|
||||
<div className="mt-3 px-14">
|
||||
<h1 className="font-cal text-3xl">{t("calcom_is_better_with_team")}</h1>
|
||||
<p className="my-4 max-w-sm text-gray-600">{t("add_your_team_members")}</p>
|
||||
<div className="space-y-2 sm:space-x-2">
|
||||
<div className="space-y-2 rtl:space-x-reverse sm:space-x-2">
|
||||
<Button color="primary" href={`${WEBAPP_URL}/settings/teams/new`}>
|
||||
{t("create_team")}
|
||||
</Button>
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function TeamAvailabilityScreen(props: Props) {
|
||||
alt={member?.name || ""}
|
||||
className="min-w-10 min-h-10 mt-1 h-10 w-10 rounded-full"
|
||||
/>
|
||||
<div className="ml-3 inline-block overflow-hidden pt-1">
|
||||
<div className="inline-block overflow-hidden pt-1 ltr:ml-3 rtl:mr-3">
|
||||
<span className="truncate text-lg font-bold text-neutral-700">{member?.name}</span>
|
||||
<span className="-mt-1 block truncate text-sm text-gray-400">{member?.email}</span>
|
||||
</div>
|
||||
|
||||
@@ -160,7 +160,7 @@ const ProfileView = () => {
|
||||
render={({ field: { value } }) => (
|
||||
<>
|
||||
<Avatar alt="" imageSrc={getPlaceholderAvatar(value, team?.name as string)} size="lg" />
|
||||
<div className="ml-4">
|
||||
<div className="ltr:ml-4 rtl:mr-4">
|
||||
<ImageUploader
|
||||
target="avatar"
|
||||
id="avatar-upload"
|
||||
|
||||
@@ -125,14 +125,14 @@ const WorkflowListItem = (props: ItemProps) => {
|
||||
<Link href={`/workflows/${workflow.id}`} passHref={true}>
|
||||
<a target="_blank">
|
||||
<Button type="button" color="minimal" className="mr-4">
|
||||
<div className="mr-2 hidden sm:block">{t("edit")}</div>
|
||||
<div className="hidden ltr:mr-2 rtl:ml-2 sm:block">{t("edit")}</div>
|
||||
<Icon.FiExternalLink className="-mt-[2px] h-4 w-4 stroke-2 text-gray-600" />
|
||||
</Button>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
<Tooltip content={t("turn_off") as string}>
|
||||
<div className="mr-2">
|
||||
<div className="ltr:mr-2 rtl:ml-2">
|
||||
<Switch
|
||||
checked={isActive}
|
||||
onCheckedChange={() => {
|
||||
|
||||
@@ -21,7 +21,7 @@ function SkeletonItem() {
|
||||
<div className="mt-1 ml-4 flex flex-col space-y-1">
|
||||
<SkeletonText className="h-5 w-20 sm:w-24" />
|
||||
<div className="flex">
|
||||
<SkeletonText className="mr-2 h-4 w-16 sm:w-28" />
|
||||
<SkeletonText className="h-4 w-16 ltr:mr-2 rtl:ml-2 sm:w-28" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ function SkeletonItem() {
|
||||
<SkeletonText className="h-4 w-16 sm:w-24" />
|
||||
<div className="flex">
|
||||
<Icon.FiBell className="mt-0.5 mr-1.5 inline h-4 w-4 text-gray-200" />
|
||||
<SkeletonText className="mr-2 h-4 w-16 sm:w-28" />
|
||||
<SkeletonText className="h-4 w-16 ltr:mr-2 rtl:ml-2 sm:w-28" />
|
||||
<Icon.FiLink className="mt-0.5 mr-1.5 inline h-4 w-4 text-gray-200" />
|
||||
<SkeletonText className="h-4 w-28 sm:w-36" />
|
||||
</div>
|
||||
|
||||
@@ -196,7 +196,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div className="flex justify-center">
|
||||
<div className="min-w-80 w-full rounded-md border border-gray-200 bg-white p-7">
|
||||
<div className="flex">
|
||||
<div className="mt-[3px] mr-5 flex h-5 w-5 items-center justify-center rounded-full bg-gray-100 p-1 text-xs font-medium">
|
||||
<div className="mt-[3px] flex h-5 w-5 items-center justify-center rounded-full bg-gray-100 p-1 text-xs font-medium ltr:mr-5 rtl:ml-5">
|
||||
1
|
||||
</div>
|
||||
<div>
|
||||
@@ -277,7 +277,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div className="flex">
|
||||
<div className="w-full">
|
||||
<div className="flex">
|
||||
<div className="mt-[3px] mr-5 flex h-5 w-5 items-center justify-center rounded-full bg-gray-100 p-1 text-xs">
|
||||
<div className="mt-[3px] flex h-5 w-5 items-center justify-center rounded-full bg-gray-100 p-1 text-xs ltr:mr-5 rtl:ml-5">
|
||||
{step.stepNumber + 1}
|
||||
</div>
|
||||
<div>
|
||||
@@ -603,7 +603,7 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div className="mt-3 ">
|
||||
<button type="button" onClick={() => setIsAdditionalInputsDialogOpen(true)}>
|
||||
<div className="mt-2 flex text-sm text-gray-600">
|
||||
<Icon.FiHelpCircle className="mt-[3px] mr-2 h-3 w-3" />
|
||||
<Icon.FiHelpCircle className="mt-[3px] h-3 w-3 ltr:mr-2 rtl:ml-2" />
|
||||
<p className="text-left">{t("using_additional_inputs_as_variables")}</p>
|
||||
</div>
|
||||
</button>
|
||||
@@ -723,7 +723,9 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div className="mt-6">
|
||||
<p className="test-sm w-full font-medium">{t("example_1")}</p>
|
||||
<div className="mt-2 grid grid-cols-12">
|
||||
<div className="test-sm col-span-5 mr-2 text-gray-600">{t("additional_input_label")}</div>
|
||||
<div className="test-sm col-span-5 text-gray-600 ltr:mr-2 rtl:ml-2">
|
||||
{t("additional_input_label")}
|
||||
</div>
|
||||
<div className="test-sm col-span-7 text-gray-900">{t("company_size")}</div>
|
||||
<div className="test-sm col-span-5 w-full text-gray-600">{t("variable")}</div>
|
||||
|
||||
@@ -740,7 +742,9 @@ export default function WorkflowStepContainer(props: WorkflowStepProps) {
|
||||
<div className="mt-6">
|
||||
<p className="test-sm w-full font-medium">{t("example_2")}</p>
|
||||
<div className="mt-2 grid grid-cols-12">
|
||||
<div className="test-sm col-span-5 mr-2 text-gray-600">{t("additional_input_label")}</div>
|
||||
<div className="test-sm col-span-5 text-gray-600 ltr:mr-2 rtl:ml-2">
|
||||
{t("additional_input_label")}
|
||||
</div>
|
||||
<div className="test-sm col-span-7 text-gray-900">{t("what_help_needed")}</div>
|
||||
<div className="test-sm col-span-5 text-gray-600">{t("variable")}</div>
|
||||
<div className="test-sm col-span-7 break-words text-gray-900">
|
||||
|
||||
@@ -4,16 +4,16 @@ const SkeletonEventType = () => {
|
||||
return (
|
||||
<div className="dark:bg-darkgray-100 h-24 w-full bg-white">
|
||||
<div className="p-5">
|
||||
<div className="flex space-x-2">
|
||||
<div className="flex space-x-2 rtl:space-x-reverse">
|
||||
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
|
||||
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
|
||||
</div>
|
||||
<div className="flex space-x-2 py-2">
|
||||
<div className="flex space-x-2 py-2 rtl:space-x-reverse">
|
||||
<div className="dark:bg-darkgray-400 h-2 w-1/12 rounded-md bg-neutral-200" />
|
||||
<div className="dark:bg-darkgray-400 h-2 w-1/6 rounded-md bg-neutral-200" />
|
||||
<div className="dark:bg-darkgray-400 h-2 w-1/12 rounded-md bg-neutral-200" />
|
||||
</div>
|
||||
<div className="flex space-x-2 py-1">
|
||||
<div className="flex space-x-2 py-1 rtl:space-x-reverse">
|
||||
<div className="dark:bg-darkgray-200 h-6 w-1/6 rounded-md bg-neutral-300" />
|
||||
<div className="dark:bg-darkgray-200 h-6 w-1/6 rounded-md bg-neutral-300" />
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ export const EventTypeDescription = ({ eventType, className }: EventTypeDescript
|
||||
{eventType.description.length > 300 && "..."}
|
||||
</p>
|
||||
)}
|
||||
<ul className="mt-2 flex flex-wrap space-x-2 sm:flex-nowrap">
|
||||
<ul className="mt-2 flex flex-wrap space-x-2 rtl:space-x-reverse sm:flex-nowrap">
|
||||
{eventType.metadata?.multipleDuration ? (
|
||||
eventType.metadata.multipleDuration.map((dur, idx) => (
|
||||
<li key={idx}>
|
||||
|
||||
@@ -59,7 +59,7 @@ const DateOverrideList = ({
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
<div className="space-x-2">
|
||||
<div className="space-x-2 rtl:space-x-reverse">
|
||||
<DateOverrideInputDialog
|
||||
excludedDates={excludedDates}
|
||||
workingHours={workingHours}
|
||||
|
||||
@@ -55,7 +55,7 @@ const ScheduleDay = <TFieldValues extends FieldValues>({
|
||||
{/* Label & switch container */}
|
||||
<div className="flex h-11 items-center justify-between sm:w-32">
|
||||
<div>
|
||||
<label className="flex flex-row items-center space-x-2">
|
||||
<label className="flex flex-row items-center space-x-2 rtl:space-x-reverse">
|
||||
<div>
|
||||
<Switch
|
||||
disabled={!watchDayRange}
|
||||
@@ -400,7 +400,7 @@ const CopyTimes = ({
|
||||
</ol>
|
||||
</div>
|
||||
<hr />
|
||||
<div className="space-x-2 px-2">
|
||||
<div className="space-x-2 px-2 rtl:space-x-reverse">
|
||||
<Button color="minimal" onClick={() => onCancel()}>
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
|
||||
@@ -42,7 +42,7 @@ export function ScheduleListItem({
|
||||
<div className="group flex w-full items-center justify-between hover:bg-neutral-50 sm:px-6">
|
||||
<Link href={"/availability/" + schedule.id}>
|
||||
<a className="flex-grow truncate text-sm" title={schedule.name}>
|
||||
<div className="space-x-2">
|
||||
<div className="space-x-2 rtl:space-x-reverse">
|
||||
<span className="truncate font-medium text-neutral-900">{schedule.name}</span>
|
||||
{schedule.isDefault && (
|
||||
<Badge variant="success" className="text-xs">
|
||||
@@ -73,7 +73,7 @@ export function ScheduleListItem({
|
||||
</Link>
|
||||
</div>
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild className="mr-5">
|
||||
<DropdownMenuTrigger asChild className="mx-5">
|
||||
<Button type="button" size="icon" color="secondary" StartIcon={Icon.FiMoreHorizontal} />
|
||||
</DropdownMenuTrigger>
|
||||
{!isLoading && data && (
|
||||
|
||||
@@ -45,7 +45,12 @@ export default function WebhookListItem(props: {
|
||||
<Tooltip content={t("triggers_when")}>
|
||||
<div className="mt-2.5 w-4/5">
|
||||
{webhook.eventTriggers.map((trigger) => (
|
||||
<Badge key={trigger} className="mr-2" variant="gray" bold StartIcon={Icon.FiAlertCircle}>
|
||||
<Badge
|
||||
key={trigger}
|
||||
className="ltr:mr-2 rtl:ml-2"
|
||||
variant="gray"
|
||||
bold
|
||||
StartIcon={Icon.FiAlertCircle}>
|
||||
{t(`${trigger.toLowerCase()}`)}
|
||||
</Badge>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user