Feat/tokens + darkmode + theme support (#7876)

This commit is contained in:
sean-brydon authored and GitHub committed 2023-04-05 18:14:46 +00:00
1 parent 4f92f60d85
commit 4b0d22655d
345 files changed
+3016 -3150

No files matched your search

+10 -5
View File
@@ -1,6 +1,7 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import Link from "next/link";
import { classNames } from "@calcom/lib";
import type { RouterOutputs } from "@calcom/trpc/react";
import { Switch } from "@calcom/ui";
@@ -28,16 +29,20 @@ export default function AppCard({
const [animationRef] = useAutoAnimate<HTMLDivElement>();
return (
<div className={`mb-4 mt-2 rounded-md border border-gray-200 ${!app.enabled && "grayscale"}`}>
<div className={`border-subtle mb-4 mt-2 rounded-md border ${!app.enabled && "grayscale"}`}>
<div className="p-4 text-sm sm:p-6">
<div className="flex w-full flex-col gap-2 sm:flex-row sm:gap-0">
{/* Don't know why but w-[42px] isn't working, started happening when I started using next/dynamic */}
<Link href={"/apps/" + app.slug} className="mr-3 h-auto w-10 rounded-sm">
<img className="w-full" src={app?.logo} alt={app?.name} />
<img
className={classNames(app?.logo.includes("-dark") && "dark:invert", "w-full min-w-[40px]")}
src={app?.logo}
alt={app?.name}
/>
</Link>
<div className="flex flex-col">
<span className="text-base font-semibold leading-4 text-black">{app?.name}</span>
<p className="mb-2 pt-2 text-sm font-normal text-gray-600 ltr:pr-2 rtl:pl-2">
<span className="text-emphasis text-base font-semibold leading-4">{app?.name}</span>
<p className="text-default mb-2 pt-2 text-sm font-normal ltr:pr-2 rtl:pl-2">
{description || app?.description}
</p>
</div>
@@ -64,7 +69,7 @@ export default function AppCard({
</div>
</div>
<div ref={animationRef}>
{app?.isInstalled && switchChecked && <hr />}
{app?.isInstalled && switchChecked && <hr className="border-subtle" />}
{app?.isInstalled && switchChecked ? <div className="p-4 text-sm sm:px-8">{children}</div> : null}
</div>
</div>
@@ -5,7 +5,7 @@ import { DynamicComponent } from "./DynamicComponent";
export const AppSettings = (props: { slug: string }) => {
return (
<DynamicComponent<typeof AppSettingsComponentsMap>
wrapperClassName="border-t border-gray-200 p-6"
wrapperClassName="border-t border-subtle p-6"
componentMap={AppSettingsComponentsMap}
{...props}
/>
@@ -20,8 +20,8 @@ export default function AppleCalendarSetup() {
const [errorMessage, setErrorMessage] = useState("");
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-y-0 md:space-x-5">
<div>
{/* eslint-disable @next/next/no-img-element */}
@@ -32,7 +32,7 @@ export default function AppleCalendarSetup() {
/>
</div>
<div>
<h1 className="text-gray-600">{t("connect_apple_server")}</h1>
<h1 className="text-default">{t("connect_apple_server")}</h1>
<div className="mt-1 text-sm">
{t("apple_server_generate_password", { appName: APP_NAME })}{" "}
@@ -21,8 +21,8 @@ export default function CalDavCalendarSetup() {
const [errorActionUrl, setErrorActionUrl] = useState("");
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-y-0 md:space-x-5">
<div>
{/* eslint-disable @next/next/no-img-element */}
@@ -33,7 +33,7 @@ export default function CalDavCalendarSetup() {
/>
</div>
<div className="flex w-10/12 flex-col">
<h1 className="text-gray-600">{t("connect_caldav_server")}</h1>
<h1 className="text-default">{t("connect_caldav_server")}</h1>
<div className="mt-1 text-sm">{t("credentials_stored_encrypted")}</div>
<div className="my-2 mt-3">
<Form
@@ -35,8 +35,8 @@ export default function CloseComSetup() {
}, [testPassed]);
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[520px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[520px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-y-0 md:space-x-5">
<div>
{/* eslint-disable @next/next/no-img-element */}
@@ -47,7 +47,7 @@ export default function CloseComSetup() {
/>
</div>
<div>
<h1 className="text-gray-600">{t("provide_api_key")}</h1>
<h1 className="text-default">{t("provide_api_key")}</h1>
<div className="mt-1 text-sm">
{t("generate_api_key_description", { appName: "Close.com" })}{" "}
@@ -111,8 +111,8 @@ export default function CloseComSetup() {
className={
testPassed !== undefined
? testPassed
? " !bg-green-100 !text-green-700 hover:bg-green-100"
: "!border-red-700 bg-red-100 !text-red-700 hover:bg-red-100"
? " !bg-success hover:bg-success !text-green-700"
: "bg-error hover:bg-error !border-red-700 !text-red-700"
: "secondary"
}
color={testPassed === true ? "minimal" : "secondary"}
+3 -5
View File
@@ -91,9 +91,7 @@ export const AppDependencyComponent = ({
<div
className={classNames(
"rounded-md py-3 px-4",
dependencyData && dependencyData.some((dependency) => !dependency.installed)
? "bg-blue-100"
: "bg-gray-100"
dependencyData && dependencyData.some((dependency) => !dependency.installed) ? "bg-info" : "bg-subtle"
)}>
{dependencyData &&
dependencyData.map((dependency) => {
@@ -122,7 +120,7 @@ export const AppDependencyComponent = ({
</div>
) : (
<div className="items-start space-x-2.5">
<div className="flex items-start text-blue-900">
<div className="text-info flex items-start">
<div>
<FiAlertCircle className="mt-1 mr-2 font-semibold" />
</div>
@@ -136,7 +134,7 @@ export const AppDependencyComponent = ({
<>
<Link
href={`${CAL_URL}/apps/${dependency.slug}`}
className="flex items-center text-blue-900 underline">
className="text-info flex items-center underline">
<span className="mr-1">
{t("connect_app", { dependencyName: dependency.name })}
</span>
@@ -20,8 +20,8 @@ export default function Exchange2013CalendarSetup() {
const [errorMessage, setErrorMessage] = useState("");
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div>
<img
src="/api/app-store/exchange2013calendar/icon.svg"
@@ -30,7 +30,7 @@ export default function Exchange2013CalendarSetup() {
/>
</div>
<div className="flex w-10/12 flex-col">
<h1 className="text-gray-600">{t("add_exchange2013")}</h1>
<h1 className="text-default">{t("add_exchange2013")}</h1>
<div className="mt-1 text-sm">{t("credentials_stored_encrypted")}</div>
<div className="my-2 mt-3">
<Form
@@ -20,8 +20,8 @@ export default function Exchange2016CalendarSetup() {
const [errorMessage, setErrorMessage] = useState("");
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div>
<img
src="/api/app-store/exchange2016calendar/icon.svg"
@@ -30,7 +30,7 @@ export default function Exchange2016CalendarSetup() {
/>
</div>
<div className="flex w-10/12 flex-col">
<h1 className="text-gray-600">{t("add_exchange2016")}</h1>
<h1 className="text-default">{t("add_exchange2016")}</h1>
<div className="mt-1 text-sm">{t("credentials_stored_encrypted")}</div>
<div className="my-2 mt-3">
<Form
@@ -42,8 +42,8 @@ export default function ExchangeSetup() {
];
return (
<>
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[560px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[560px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-y-0 md:space-x-5">
<div>
{/* eslint-disable @next/next/no-img-element */}
@@ -54,7 +54,7 @@ export default function ExchangeSetup() {
/>
</div>
<div className="grow">
<h1 className="text-gray-600">{t("exchange_add")}</h1>
<h1 className="text-default">{t("exchange_add")}</h1>
<div className="text-sm">{t("credentials_stored_encrypted")}</div>
<div className="my-2 mt-5">
<Form
@@ -88,7 +88,7 @@ export const SearchDialog = (props: ISearchDialog) => {
<div
className={classNames(
"flex cursor-pointer items-center border-b-2 p-2 text-sm",
selectedMode === mode ? "border-black" : "border-transparent text-gray-500"
selectedMode === mode ? "border-black" : "text-subtle border-transparent"
)}
onClick={() => {
setKeyword("");
@@ -113,10 +113,10 @@ export const SearchDialog = (props: ISearchDialog) => {
return (
<Dialog open={isOpenDialog} onOpenChange={setIsOpenDialog}>
<DialogContent>
<h3 className="leading-16 font-cal text-xl text-gray-900" id="modal-title">
<h3 className="leading-16 font-cal text-emphasis text-xl" id="modal-title">
{t("add_gif_to_confirmation")}
</h3>
<p className="mb-3 text-sm font-light text-gray-500">{t("find_gif_spice_confirmation")}</p>
<p className="text-subtle mb-3 text-sm font-light">{t("find_gif_spice_confirmation")}</p>
<div className="flex items-center border-b border-solid">
{renderTab(SearchIcon, t("search_giphy"), MODE_SEARCH)}
{renderTab(LinkIcon, t("add_link_from_giphy"), MODE_URL)}
@@ -127,7 +127,7 @@ export const SearchDialog = (props: ISearchDialog) => {
<div className="relative block w-full pt-2">
<input
type="text"
className="block w-full rounded-sm border-gray-300 shadow-sm sm:text-sm"
className="border-default block w-full rounded-sm shadow-sm sm:text-sm"
placeholder={
selectedMode === MODE_SEARCH
? t("search_giphy")
@@ -145,11 +145,11 @@ export const SearchDialog = (props: ISearchDialog) => {
</form>
{gifImage && (
<div className="flex flex-col items-center space-x-2 space-y-2 pt-3 rtl:space-x-reverse">
<div className="flex w-full items-center justify-center bg-gray-100">
<div className="bg-subtle flex w-full items-center justify-center">
{isLoading ? (
<div className="flex h-[200px] w-full items-center justify-center bg-gray-400 pt-3 pb-3">
<svg
className={classNames("mx-4 h-5 w-5 animate-spin", "text-white dark:text-black")}
className={classNames("mx-4 h-5 w-5 animate-spin", "text-inverted dark:text-emphasis")}
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24">
@@ -177,7 +177,7 @@ export const SearchDialog = (props: ISearchDialog) => {
{errorMessage && <Alert severity="error" title={errorMessage} className="my-4" />}
{gifImage && selectedMode === MODE_SEARCH && (
<div className="mt-4 flex items-center justify-between space-x-2 rtl:space-x-reverse">
<div className="text-sm font-light text-gray-500">Not the perfect GIF?</div>
<div className="text-subtle text-sm font-light">Not the perfect GIF?</div>
<Button
size="sm"
color="secondary"
@@ -8,7 +8,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
const { t } = useLocale();
return gCalInstalled ? (
<div className="rounded-md bg-gray-100 py-3 px-4">
<div className="bg-subtle rounded-md py-3 px-4">
<div className="items-start space-x-2.5">
<div className="flex items-start">
<div>
@@ -26,7 +26,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
</div>
</div>
) : (
<div className="rounded-md bg-blue-100 py-3 px-4 text-blue-900">
<div className="bg-info text-info rounded-md py-3 px-4">
<div className="items-start space-x-2.5">
<div className="flex items-start">
<div>
@@ -39,7 +39,7 @@ const ExistingGoogleCal = ({ gCalInstalled, appName }: { gCalInstalled?: boolean
<>
<Link
href={`${CAL_URL}/apps/google-calendar`}
className="flex items-center text-blue-900 underline">
className="text-info flex items-center underline">
<span className="mr-1">{t("connect_google_calendar")}</span>
<FiArrowRight />
</Link>
@@ -19,7 +19,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
<Tooltip content={eventTypeURL}>
<a download href={QR_URL} target="_blank" rel="noreferrer">
<img
className="border hover:bg-gray-50 hover:shadow-sm"
className="hover:bg-muted border hover:shadow-sm"
style={{ padding: size / 16, borderRadius: size / 20 }}
width={size}
src={QR_URL}
@@ -22,7 +22,7 @@ const RainbowInstallForm: React.FC<RainbowInstallFormProps> = ({
<>
<div className="mt-4 block items-center sm:flex">
<div className="min-w-48 mb-4 sm:mb-0">
<label htmlFor="blockchainId" className="flex text-sm font-medium text-gray-700">
<label htmlFor="blockchainId" className="text-default flex text-sm font-medium">
{t("Blockchain")}
</label>
</div>
@@ -38,7 +38,7 @@ const RainbowInstallForm: React.FC<RainbowInstallFormProps> = ({
</div>
<div className="block items-center sm:flex">
<div className="min-w-48 mb-4 sm:mb-0">
<label htmlFor="smartContractAddress" className="flex text-sm font-medium text-gray-700">
<label htmlFor="smartContractAddress" className="text-default flex text-sm font-medium">
{t("token_address")}
</label>
</div>
@@ -46,7 +46,7 @@ const RainbowInstallForm: React.FC<RainbowInstallFormProps> = ({
<div className="relative mt-1 rounded-sm">
<input
type="text"
className="block w-full rounded-sm border-gray-300 text-sm "
className="border-default block w-full rounded-sm text-sm "
placeholder={t("Example: 0x71c7656ec7ab88b098defb751b7401b5f6d8976f")}
defaultValue={(smartContractAddress || "") as string}
onChange={(e) => {
@@ -111,9 +111,9 @@ const BalanceCheck: React.FC<RainbowGateProps> = ({ chainId, setToken, tokenAddr
return (
<main className="mx-auto max-w-3xl py-24 px-4">
<div className="rounded-md border border-neutral-200 dark:border-neutral-700 dark:hover:border-neutral-600">
<div className="hover:border-brand dark:bg-darkgray-100 flex min-h-[120px] grow flex-col border-b border-neutral-200 bg-white p-6 text-center first:rounded-t-md last:rounded-b-md last:border-b-0 hover:bg-white dark:border-neutral-700 dark:hover:border-neutral-600 md:flex-row md:text-left">
<div className="hover:border-brand-default dark:bg-darkgray-100 bg-default hover:bg-default flex min-h-[120px] grow flex-col border-b border-neutral-200 p-6 text-center first:rounded-t-md last:rounded-b-md last:border-b-0 dark:border-neutral-700 dark:hover:border-neutral-600 md:flex-row md:text-left">
<span className="mb-4 grow md:mb-0">
<h2 className="mb-2 grow font-semibold text-gray-900 dark:text-white">Token Gate</h2>
<h2 className="text-emphasis dark:text-inverted mb-2 grow font-semibold">Token Gate</h2>
{isLoading && (
<>
<SkeletonText className="mb-3 h-1 w-full" />
@@ -122,7 +122,7 @@ const BalanceCheck: React.FC<RainbowGateProps> = ({ chainId, setToken, tokenAddr
)}
{!isLoading && contractData && contractData.data && (
<>
<p className="text-gray-300 dark:text-white">
<p className="dark:text-inverted text-gray-300">
<Trans i18nKey="rainbow_connect_wallet_gate" t={t}>
Connect your wallet if you own {contractData.data.name} ({contractData.data.symbol}) .
</Trans>
@@ -89,11 +89,11 @@ function NewFormDialog({ appUrl }: { appUrl: string }) {
<Dialog name="new-form" clearQueryParamsOnClose={["target", "action"]}>
<DialogContent className="overflow-y-auto">
<div className="mb-4">
<h3 className="text-lg font-bold leading-6 text-gray-900" id="modal-title">
<h3 className="text-emphasis text-lg font-bold leading-6" id="modal-title">
{t("add_new_form")}
</h3>
<div>
<p className="text-sm text-gray-500">{t("form_description")}</p>
<p className="text-subtle text-sm">{t("form_description")}</p>
</div>
</div>
<Form
@@ -414,7 +414,7 @@ export const FormAction = forwardRef(function FormAction<T extends typeof Button
return <></>;
}
return (
<div {...restProps} className="self-center rounded-md p-2 hover:bg-gray-200">
<div {...restProps} className="hover:bg-emphasis self-center rounded-md p-2">
<Switch
checked={!routingForm.disabled}
label={label}
@@ -40,10 +40,7 @@ export default function FormInputFields(props: Props) {
return (
<div key={field.id} className="mb-4 block flex-col sm:flex ">
<div className="min-w-48 mb-2 flex-grow">
<label
id="slug-label"
htmlFor="slug"
className="flex text-sm font-medium text-gray-700 dark:text-white">
<label id="slug-label" htmlFor="slug" className="text-default flex text-sm font-medium">
{field.label}
</label>
</div>
@@ -309,8 +309,10 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
{form.routers.length ? (
<div className="mt-6">
<div className="mb-2 block text-sm font-semibold leading-none text-black ">Routers</div>
<p className="-mt-1 text-xs leading-normal text-gray-600">
<div className="text-emphasis mb-2 block text-sm font-semibold leading-none ">
Routers
</div>
<p className="text-default -mt-1 text-xs leading-normal">
{t("modifications_in_fields_warning")}
</p>
<div className="flex">
@@ -329,10 +331,10 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
{connectedForms?.length ? (
<div className="mt-6">
<div className="mb-2 block text-sm font-semibold leading-none text-black ">
<div className="text-emphasis mb-2 block text-sm font-semibold leading-none ">
{t("connected_forms")}
</div>
<p className="-mt-1 text-xs leading-normal text-gray-600">
<p className="text-default -mt-1 text-xs leading-normal">
{t("form_modifications_warning")}
</p>
<div className="flex">
@@ -368,7 +370,7 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
</>
)}
</div>
<div className="w-full rounded-md border border-gray-200 p-8">
<div className="border-subtle w-full rounded-md border p-8">
<RoutingNavBar appUrl={appUrl} form={form} />
<Page hookForm={hookForm} form={form} appUrl={appUrl} />
</div>
@@ -391,7 +393,7 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
</div>
<div>
{decidedAction && (
<div className="mt-5 rounded-md bg-gray-100 p-3">
<div className="bg-subtle text-default mt-5 rounded-md p-3">
<div className="font-bold ">{t("route_to")}:</div>
<div className="mt-2">
{RoutingPages.map((page) => {
@@ -404,11 +406,11 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
})}
:{" "}
{decidedAction.type === "customPageMessage" ? (
<span className="text-gray-700" data-testid="test-routing-result">
<span className="text-default" data-testid="test-routing-result">
{decidedAction.value}
</span>
) : decidedAction.type === "externalRedirectUrl" ? (
<span className="text-gray-700 underline">
<span className="text-default underline">
<a
target="_blank"
data-testid="test-routing-result"
@@ -423,7 +425,7 @@ function SingleForm({ form, appUrl, Page }: SingleFormComponentProps) {
</a>
</span>
) : (
<span className="text-gray-700 underline">
<span className="text-default underline">
<a
target="_blank"
href={`/${decidedAction.value}`}
@@ -122,7 +122,6 @@
}
.cal-query-builder .rule {
background-color: white;
border: 1px solid transparent;
padding: 10px;
flex: 1;
@@ -85,7 +85,7 @@ const TextAreaWidget = (props: TextLikeComponentPropsRAQB) => {
disabled={readOnly}
onChange={onChange}
maxLength={maxLength}
className="dark:placeholder:text-darkgray-600 focus:border-brand dark:border-darkgray-300 dark:text-darkgray-900 block w-full rounded-md border-gray-300 text-sm focus:ring-black disabled:bg-gray-200 disabled:hover:cursor-not-allowed dark:bg-transparent dark:selection:bg-green-500 disabled:dark:text-gray-500"
className=" border-default bg-default dark:bg-muted text-default disabled:bg-emphasis disabled:dark:text-subtle placeholder:text-subtle block w-full rounded-md text-sm focus:ring-black disabled:hover:cursor-not-allowed "
{...customProps}
{...remainingProps}
/>
@@ -112,7 +112,7 @@ const TextWidget = (props: TextLikeComponentPropsRAQB) => {
<TextField
containerClassName="w-full"
type={type}
className="dark:placeholder:text-darkgray-600 focus:border-brand dark:border-darkgray-300 dark:text-darkgray-900 block w-full rounded-md border-gray-300 text-sm focus:ring-black disabled:bg-gray-200 disabled:hover:cursor-not-allowed dark:bg-transparent dark:selection:bg-green-500 disabled:dark:text-gray-500"
className="focus:border-brand-default bg-default dark:bg-muted border-default disabled:bg-emphasis focus:ring-brand block w-full rounded-md text-sm disabled:hover:cursor-not-allowed"
value={textValue}
labelSrOnly={noLabel}
placeholder={placeholder}
@@ -130,7 +130,7 @@ function NumberWidget({ value, setValue, ...remainingProps }: TextLikeComponentP
type="number"
labelSrOnly={remainingProps.noLabel}
containerClassName="w-full"
className="dark:placeholder:text-darkgray-600 focus:border-brand dark:border-darkgray-300 dark:text-darkgray-900 block w-full rounded-md border-gray-300 text-sm focus:ring-black disabled:bg-gray-200 disabled:hover:cursor-not-allowed dark:bg-transparent dark:selection:bg-green-500 disabled:dark:text-gray-500"
className="focus:border-brand-default bg-default dark:bg-muted border-default disabled:bg-emphasis focus:ring-brand block w-full rounded-md text-sm disabled:hover:cursor-not-allowed"
value={value}
onChange={(e) => {
setValue(e.target.value);
@@ -162,7 +162,7 @@ const MultiSelectWidget = ({
return (
<Select
className="dark:border-darkgray-300 mb-2 block w-full min-w-0 flex-1 rounded-none rounded-r-sm border-gray-300 dark:bg-transparent dark:text-white dark:selection:bg-green-500 disabled:dark:text-gray-500 sm:text-sm"
className="mb-2"
onChange={(items) => {
setValue(items?.map((item) => item.value));
}}
@@ -189,7 +189,7 @@ function SelectWidget({ listValues, setValue, value, ...remainingProps }: Select
return (
<Select
className="data-testid-select dark:border-darkgray-300 mb-2 block w-full min-w-0 flex-1 rounded-none rounded-r-sm border-gray-300 dark:bg-transparent dark:text-white dark:selection:bg-green-500 disabled:dark:text-gray-500 sm:text-sm"
className="data-testid-select mb-2"
onChange={(item) => {
if (!item) {
return;
@@ -208,7 +208,7 @@ function Button({ config, type, label, onClick, readonly }: ButtonProps) {
if (type === "delRule" || type == "delGroup") {
return (
<button className="ml-5">
<FiTrash className="m-0 h-4 w-4 text-gray-500" onClick={onClick} />
<FiTrash className="text-subtle m-0 h-4 w-4" onClick={onClick} />
</button>
);
}
+2 -2
View File
@@ -4,8 +4,8 @@
"title": "Routing Forms",
"slug": "routing-forms",
"type": "routing-forms_other",
"imageSrc": "/api/app-store/routing-forms/icon.svg",
"logo": "/api/app-store/routing-forms/icon.svg",
"imageSrc": "/api/app-store/routing-forms/icon-dark.svg",
"logo": "/api/app-store/routing-forms/icon-dark.svg",
"url": "https://cal.com/apps/routing-forms",
"variant": "other",
"categories": ["other"],
@@ -332,6 +332,7 @@ export default function FormEditPage({
/>
);
}
FormEditPage.isThemeSupported = true;
FormEditPage.getLayout = (page: React.ReactElement) => {
return (
@@ -110,7 +110,11 @@ export default function RoutingForms({
<Button color="primary" href={`${WEBAPP_URL}/settings/teams/new`}>
{t("upgrade")}
</Button>
<Button color="minimal" href="https://go.cal.com/teams-video" target="_blank">
<Button
color="minimal"
className="text-inverted !bg-transparent opacity-50 hover:opacity-100"
href="https://go.cal.com/teams-video"
target="_blank">
{t("learn_more")}
</Button>
</ButtonGroup>
@@ -128,7 +132,7 @@ export default function RoutingForms({
/>
) : null}
{forms?.length ? (
<div className="mb-16 overflow-hidden bg-white">
<div className="bg-default mb-16 overflow-hidden">
<List data-testid="routing-forms-list">
{forms.map((form, index) => {
if (!form) {
@@ -252,6 +256,8 @@ export default function RoutingForms({
);
}
RoutingForms.isThemeSupported = true;
RoutingForms.getLayout = (page: React.ReactElement) => {
return <Shell withoutMain={true}>{page}</Shell>;
};
@@ -64,12 +64,14 @@ const Result = ({ formId, jsonLogicQuery }: { formId: string; jsonLogicQuery: Js
<div className="w-full max-w-[2000px] overflow-x-scroll">
<table
data-testid="reporting-table"
className="table-fixed border-separate border-spacing-0 rounded-md border border-gray-300 bg-gray-100">
<tr data-testid="reporting-header" className="border-b border-gray-300 bg-gray-200">
className="border-default bg-subtle mx-3 mb-4 table-fixed border-separate border-spacing-0 overflow-hidden rounded-md border">
<tr
data-testid="reporting-header"
className="border-default text-default bg-emphasis rounded-md border-b">
{headers.current?.map((header, index) => (
<th
className={classNames(
"border-b border-gray-300 py-3 px-2 text-left text-base font-medium",
"border-default border-b py-3 px-2 text-left text-base font-medium",
index !== (headers.current?.length || 0) - 1 ? "border-r" : ""
)}
key={index}>
@@ -87,7 +89,7 @@ const Result = ({ formId, jsonLogicQuery }: { formId: string; jsonLogicQuery: Js
data-testid="reporting-row"
className={classNames(
"text-center text-sm",
rowIndex % 2 ? "" : "bg-white",
rowIndex % 2 ? "" : "bg-default",
isLastRow ? "" : "border-b"
)}>
{responses.map((r, columnIndex) => {
@@ -95,7 +97,7 @@ const Result = ({ formId, jsonLogicQuery }: { formId: string; jsonLogicQuery: Js
return (
<td
className={classNames(
"overflow-x-hidden border-gray-300 py-3 px-2 text-left",
"border-default overflow-x-hidden py-3 px-2 text-left",
isLastRow ? "" : "border-b",
isLastColumn ? "" : "border-r"
)}
@@ -109,16 +111,18 @@ const Result = ({ formId, jsonLogicQuery }: { formId: string; jsonLogicQuery: Js
});
})}
</table>
{isLoading ? <div className="p-2">Report is loading</div> : ""}
<Button
type="button"
color="minimal"
ref={buttonInView.ref}
loading={isFetchingNextPage}
disabled={!hasNextPage}
onClick={() => fetchNextPage()}>
{hasNextPage ? t("load_more_results") : t("no_more_results")}
</Button>
{isLoading ? <div className="text-default p-2">{t("loading")}</div> : ""}
{hasNextPage && (
<Button
type="button"
color="minimal"
ref={buttonInView.ref}
loading={isFetchingNextPage}
disabled={!hasNextPage}
onClick={() => fetchNextPage()}>
{hasNextPage ? t("load_more_results") : t("no_more_results")}
</Button>
)}
</div>
);
};
@@ -193,6 +197,8 @@ export default function ReporterWrapper({
);
}
ReporterWrapper.isThemeSupported = true;
ReporterWrapper.getLayout = (page: React.ReactElement) => {
return (
<Shell backPath="/apps/routing-forms/forms" withoutMain={true}>
@@ -16,6 +16,7 @@ import {
TextArea,
TextField,
Badge,
Divider,
} from "@calcom/ui";
import SingleForm, {
@@ -143,7 +144,7 @@ const Route = ({
<span className="font-semibold">{route.name}</span>
</Badge>
</Link>
<p className="mt-2 text-sm text-gray-500">
<p className="text-subtle mt-2 text-sm">
Fields available in <span className="font-bold">{route.name}</span> will be added to this form.
</p>
</div>
@@ -168,7 +169,7 @@ const Route = ({
<div className="-mx-4 mb-4 flex w-full items-center sm:mx-0">
<div className="cal-query-builder w-full ">
<div>
<div className="flex w-full items-center text-sm text-gray-900">
<div className="text-emphasis flex w-full items-center text-sm">
<div className="flex flex-grow-0 whitespace-nowrap">
<span>Send Booker to</span>
</div>
@@ -202,7 +203,7 @@ const Route = ({
required
disabled={disabled}
name="customPageMessage"
className="flex w-full flex-grow border-gray-300"
className="border-default flex w-full flex-grow"
value={route.action.value}
onChange={(e) => {
setRoute(route.id, { action: { ...route.action, value: e.target.value } });
@@ -212,7 +213,7 @@ const Route = ({
<TextField
disabled={disabled}
name="externalRedirectUrl"
className="flex w-full flex-grow border-gray-300 text-sm"
className="border-default flex w-full flex-grow text-sm"
containerClassName="w-full mt-2"
type="text"
required
@@ -244,7 +245,7 @@ const Route = ({
{((route.isFallback && hasRules(route)) || !route.isFallback) && (
<>
<hr className="my-6 text-gray-200" />
<Divider className="mt-3 mb-6" />
<Query
{...config}
value={route.state.tree}
@@ -522,6 +523,7 @@ export default function RouteBuilder({
/>
);
}
RouteBuilder.isThemeSupported = true;
RouteBuilder.getLayout = (page: React.ReactElement) => {
return (
@@ -17,7 +17,7 @@ export default function Router({ form, message }: inferSSRProps<typeof getServer
</Head>
<div className="mx-auto my-0 max-w-3xl md:my-24">
<div className="w-full max-w-4xl ltr:mr-2 rtl:ml-2">
<div className="-mx-4 rounded-sm border border-neutral-200 bg-white p-4 py-6 sm:mx-0 sm:px-8">
<div className="bg-default -mx-4 rounded-sm border border-neutral-200 p-4 py-6 sm:mx-0 sm:px-8">
<div>{message}</div>
</div>
</div>
@@ -26,6 +26,8 @@ export default function Router({ form, message }: inferSSRProps<typeof getServer
);
}
Router.isThemeSupported = true;
const querySchema = z
.object({
form: z.string(),
@@ -6,25 +6,43 @@ import { Toaster } from "react-hot-toast";
import { v4 as uuidv4 } from "uuid";
import { sdkActionManager, useIsEmbed } from "@calcom/embed-core/embed-iframe";
import CustomBranding from "@calcom/lib/CustomBranding";
import classNames from "@calcom/lib/classNames";
import useGetBrandingColours from "@calcom/lib/getBrandColours";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import useTheme from "@calcom/lib/hooks/useTheme";
import { trpc } from "@calcom/trpc/react";
import type { AppGetServerSidePropsContext, AppPrisma } from "@calcom/types/AppGetServerSideProps";
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
import { Button, showToast } from "@calcom/ui";
import { Button, showToast, useCalcomTheme } from "@calcom/ui";
import FormInputFields from "../../components/FormInputFields";
import { getSerializableForm } from "../../lib/getSerializableForm";
import { processRoute } from "../../lib/processRoute";
import type { Response, Route } from "../../types/types";
const useBrandColors = ({
brandColor,
darkBrandColor,
}: {
brandColor?: string | null;
darkBrandColor?: string | null;
}) => {
const brandTheme = useGetBrandingColours({
lightVal: brandColor,
darkVal: darkBrandColor,
});
useCalcomTheme(brandTheme);
};
function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getServerSideProps>) {
const [customPageMessage, setCustomPageMessage] = useState<Route["action"]["value"]>("");
const formFillerIdRef = useRef(uuidv4());
const isEmbed = useIsEmbed(restProps.isEmbed);
useTheme(profile.theme);
useBrandColors({
brandColor: profile.brandColor,
darkBrandColor: profile.darkBrandColor,
});
// TODO: We might want to prevent spam from a single user by having same formFillerId across pageviews
// But technically, a user can fill form multiple times due to any number of reasons and we currently can't differentiate b/w that.
// - like a network error
@@ -94,8 +112,6 @@ function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getSe
return (
<div>
<CustomBranding lightVal={profile.brandColor} darkVal={profile.darkBrandColor} />
<div>
{!customPageMessage ? (
<>
@@ -104,18 +120,16 @@ function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getSe
</Head>
<div className={classNames("mx-auto my-0 max-w-3xl", isEmbed ? "" : "md:my-24")}>
<div className="w-full max-w-4xl ltr:mr-2 rtl:ml-2">
<div className="main border-bookinglightest dark:bg-darkgray-100 sm:dark:border-darkgray-300 mx-0 rounded-md bg-white p-4 py-6 sm:-mx-4 sm:px-8 md:border">
<div className="main border-bookinglightest dark:bg-darkgray-100 sm:dark:border-darkgray-300 bg-default mx-0 rounded-md p-4 py-6 sm:-mx-4 sm:px-8 md:border">
<Toaster position="bottom-right" />
<form onSubmit={handleOnSubmit}>
<div className="mb-8">
<h1 className="font-cal mb-1 text-xl font-bold tracking-wide text-gray-900 dark:text-white">
<h1 className="font-cal text-emphasis mb-1 text-xl font-bold tracking-wide">
{form.name}
</h1>
{form.description ? (
<p className="min-h-10 text-sm text-gray-500 ltr:mr-4 rtl:ml-4 dark:text-white">
{form.description}
</p>
<p className="min-h-10 text-subtle text-sm ltr:mr-4 rtl:ml-4">{form.description}</p>
) : null}
</div>
<FormInputFields form={form} response={response} setResponse={setResponse} />
@@ -136,8 +150,8 @@ function RoutingForm({ form, profile, ...restProps }: inferSSRProps<typeof getSe
) : (
<div className="mx-auto my-0 max-w-3xl md:my-24">
<div className="w-full max-w-4xl ltr:mr-2 rtl:ml-2">
<div className="main dark:bg-darkgray-100 sm:dark:border-darkgray-300 -mx-4 rounded-md border border-neutral-200 bg-white p-4 py-6 sm:mx-0 sm:px-8">
<div className="dark:text-white">{customPageMessage}</div>
<div className="main dark:bg-darkgray-100 sm:dark:border-darkgray-300 bg-default -mx-4 rounded-md border border-neutral-200 p-4 py-6 sm:mx-0 sm:px-8">
<div className="text-emphasis">{customPageMessage}</div>
</div>
</div>
</div>
@@ -35,14 +35,14 @@ export default function SendgridSetup() {
}, [testPassed]);
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-5 md:w-[520px] md:p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-5 md:w-[520px] md:p-10">
<div className="flex flex-col space-y-5 md:flex-row md:space-y-0 md:space-x-5">
<div>
<img src="/api/app-store/sendgrid/logo.png" alt="Sendgrid" className="h-12 w-12 max-w-2xl" />
</div>
<div>
<h1 className="text-gray-600">{t("provide_api_key")}</h1>
<h1 className="text-default">{t("provide_api_key")}</h1>
<div className="mt-1 text-sm">
{t("generate_api_key_description", { appName: "Sendgrid" })}{" "}
@@ -106,8 +106,8 @@ export default function SendgridSetup() {
className={
testPassed !== undefined
? testPassed
? " !bg-green-100 !text-green-700 hover:bg-green-100"
: "!border-red-700 bg-red-100 !text-red-700 hover:bg-red-100"
? " !bg-success hover:bg-success !text-green-700"
: "bg-error hover:bg-error !border-red-700 !text-red-700"
: "secondary"
}
color={testPassed === true ? "minimal" : "secondary"}
+2 -2
View File
@@ -3,8 +3,8 @@
"name": "Sirius Video",
"slug": "sirius_video",
"type": "sirius_video_video",
"imageSrc": "/api/app-store/sirius_video/icon.svg",
"logo": "/api/app-store/sirius_video/icon.svg",
"imageSrc": "/api/app-store/sirius_video/icon-dark.svg",
"logo": "/api/app-store/sirius_video/icon-dark.svg",
"url": "https://cal.com/apps/sirius_video",
"variant": "conferencing",
"categories": ["video"],
@@ -62,7 +62,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
min="0.5"
type="number"
required
className="block w-full rounded-sm border-gray-300 pl-2 pr-12 text-sm"
className="border-default block w-full rounded-sm pl-2 pr-12 text-sm"
placeholder="Price"
onChange={(e) => {
setAppData("price", Number(e.target.value) * 100);
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "Typeform",
"slug": "typeform",
"type": "typeform_other",
"logo": "/api/app-store/typeform/icon.svg",
"logo": "/api/app-store/typeform/icon-dark.svg",
"url": "https://cal.com/apps/typeform",
"variant": "other",
"categories": ["other"],
@@ -7,18 +7,18 @@ import { FiExternalLink } from "@calcom/ui/components/icon";
export default function HowToUse() {
const { t } = useLocale();
return (
<div className="flex h-screen bg-gray-200">
<div className="m-auto rounded bg-white p-10">
<div className="bg-emphasis flex h-screen">
<div className="bg-default m-auto rounded p-10">
<div className="flex flex-row">
<div className="mr-5">
<img className="w-11" src="/api/app-store/typeform/icon.svg" alt="Zapier Logo" />
</div>
<div className="ml-5">
<div className="text-md text-gray-800">How to route a Typeform with Cal.com Routing</div>
<div className="text-md text-default">How to route a Typeform with Cal.com Routing</div>
<ol className="mt-5 mb-5 ml-5 list-decimal ltr:mr-5 rtl:ml-5">
<li>
Make sure that you have{" "}
<Link href="/apps/routing-forms" className="text-base text-gray-500">
<Link href="/apps/routing-forms" className="text-subtle text-base">
Routing Forms
</Link>{" "}
app installed
@@ -30,8 +30,8 @@ export default function HowToUse() {
<Link
href="/api/app-store/typeform/copy-typeform-redirect-url.png"
target="_blank"
className="inline-flex items-baseline text-base text-gray-500">
<FiExternalLink className="h-4 w-4 text-gray-500 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
className="text-subtle inline-flex items-baseline text-base">
<FiExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
Click &quot;Copy Typeform Redirect URL&quot;
</Link>
</li>
@@ -41,8 +41,8 @@ export default function HowToUse() {
<Link
href="https://www.typeform.com/help/a/end-screens-and-redirects-360051791392/#h_01G0CFXF21W2EQ8PXKSB4KSC8P"
target="_blank"
className="inline-flex items-baseline text-base text-gray-500">
<FiExternalLink className="h-4 w-4 text-gray-500 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
className="text-subtle inline-flex items-baseline text-base">
<FiExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
Redirect to your typeform
</Link>
</li>
@@ -51,8 +51,8 @@ export default function HowToUse() {
<Link
href="https://www.typeform.com/help/a/use-recall-information-to-reference-typeform-answers-variables-and-more-360052320011/"
target="_blank"
className="inline-flex items-baseline text-base text-gray-500">
<FiExternalLink className="h-4 w-4 text-gray-500 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
className="text-subtle inline-flex items-baseline text-base">
<FiExternalLink className="text-subtle h-4 w-4 ltr:mr-2 rtl:ml-2" aria-hidden="true" />
Recall Information in Typeform
</Link>{" "}
to add values to query params.
@@ -138,7 +138,7 @@ const AppConfiguration = (props: IAppConfigurationProps) => {
setSleepValue(Number(e.currentTarget.value));
setTouchedForm(true);
}}
className="pr-12shadow-sm mt-1 block w-full rounded-sm border border-gray-300 py-2 pl-6 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
className="pr-12shadow-sm border-default mt-1 block w-full rounded-sm border py-2 pl-6 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"
/>
<p className="ml-2">
<strong>{t("vital_app_hours", { ns: "vital" })}</strong>
+2 -2
View File
@@ -4,8 +4,8 @@
"title": "Whereby",
"slug": "whereby",
"type": "whereby_video",
"imageSrc": "/api/app-store/whereby/icon.svg",
"logo": "/api/app-store/whereby/icon.svg",
"imageSrc": "/api/app-store/whereby/icon-dark.svg",
"logo": "/api/app-store/whereby/icon-dark.svg",
"url": "https://cal.com/apps/whereby",
"variant": "conferencing",
"categories": ["video"],
@@ -86,9 +86,9 @@ export const ConfirmDialog = (props: IConfirmDialogWipe) => {
</div>
<div className="pt-1">
<DialogHeader title="Wipe My Calendar" />
<p className="mt-2 text-sm text-gray-500">
<p className="text-subtle mt-2 text-sm">
This will cancel all upcoming meetings from: <br />{" "}
<strong className="text-black">
<strong className="text-emphasis">
{initialDate.format(dateFormat)} - {endDate.format(dateFormat)}
</strong>
</p>
+2 -2
View File
@@ -3,8 +3,8 @@
"name": "Wordpress",
"slug": "wordpress",
"type": "wordpress_other",
"imageSrc": "/api/app-store/wordpress/icon.svg",
"logo": "/api/app-store/wordpress/icon.svg",
"imageSrc": "/api/app-store/wordpress/icon-dark.svg",
"logo": "/api/app-store/wordpress/icon-dark.svg",
"url": "https://github.com/calcom/wp-plugin",
"variant": "other",
"categories": ["other"],
@@ -0,0 +1 @@
<svg viewBox="0 0 122.52 122.523" xmlns="http://www.w3.org/2000/svg"><g fill="#000"><path d="m8.708 61.26c0 20.802 12.089 38.779 29.619 47.298l-25.069-68.686c-2.916 6.536-4.55 13.769-4.55 21.388z"/><path d="m96.74 58.608c0-6.495-2.333-10.993-4.334-14.494-2.664-4.329-5.161-7.995-5.161-12.324 0-4.831 3.664-9.328 8.825-9.328.233 0 .454.029.681.042-9.35-8.566-21.807-13.796-35.489-13.796-18.36 0-34.513 9.42-43.91 23.688 1.233.037 2.395.063 3.382.063 5.497 0 14.006-.667 14.006-.667 2.833-.167 3.167 3.994.337 4.329 0 0-2.847.335-6.015.501l19.138 56.925 11.501-34.493-8.188-22.434c-2.83-.166-5.511-.501-5.511-.501-2.832-.166-2.5-4.496.332-4.329 0 0 8.679.667 13.843.667 5.496 0 14.006-.667 14.006-.667 2.835-.167 3.168 3.994.337 4.329 0 0-2.853.335-6.015.501l18.992 56.494 5.242-17.517c2.272-7.269 4.001-12.49 4.001-16.989z"/><path d="m62.184 65.857-15.768 45.819c4.708 1.384 9.687 2.141 14.846 2.141 6.12 0 11.989-1.058 17.452-2.979-.141-.225-.269-.464-.374-.724z"/><path d="m107.376 36.046c.226 1.674.354 3.471.354 5.404 0 5.333-.996 11.328-3.996 18.824l-16.053 46.413c15.624-9.111 26.133-26.038 26.133-45.426.001-9.137-2.333-17.729-6.438-25.215z"/><path d="m61.262 0c-33.779 0-61.262 27.481-61.262 61.26 0 33.783 27.483 61.263 61.262 61.263 33.778 0 61.265-27.48 61.265-61.263-.001-33.779-27.487-61.26-61.265-61.26zm0 119.715c-32.23 0-58.453-26.223-58.453-58.455 0-32.23 26.222-58.451 58.453-58.451 32.229 0 58.45 26.221 58.45 58.451 0 32.232-26.221 58.455-58.45 58.455z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -1 +0,0 @@
<svg viewBox="0 0 122.52 122.523" xmlns="http://www.w3.org/2000/svg"><g fill="#464342"><path d="m8.708 61.26c0 20.802 12.089 38.779 29.619 47.298l-25.069-68.686c-2.916 6.536-4.55 13.769-4.55 21.388z"/><path d="m96.74 58.608c0-6.495-2.333-10.993-4.334-14.494-2.664-4.329-5.161-7.995-5.161-12.324 0-4.831 3.664-9.328 8.825-9.328.233 0 .454.029.681.042-9.35-8.566-21.807-13.796-35.489-13.796-18.36 0-34.513 9.42-43.91 23.688 1.233.037 2.395.063 3.382.063 5.497 0 14.006-.667 14.006-.667 2.833-.167 3.167 3.994.337 4.329 0 0-2.847.335-6.015.501l19.138 56.925 11.501-34.493-8.188-22.434c-2.83-.166-5.511-.501-5.511-.501-2.832-.166-2.5-4.496.332-4.329 0 0 8.679.667 13.843.667 5.496 0 14.006-.667 14.006-.667 2.835-.167 3.168 3.994.337 4.329 0 0-2.853.335-6.015.501l18.992 56.494 5.242-17.517c2.272-7.269 4.001-12.49 4.001-16.989z"/><path d="m62.184 65.857-15.768 45.819c4.708 1.384 9.687 2.141 14.846 2.141 6.12 0 11.989-1.058 17.452-2.979-.141-.225-.269-.464-.374-.724z"/><path d="m107.376 36.046c.226 1.674.354 3.471.354 5.404 0 5.333-.996 11.328-3.996 18.824l-16.053 46.413c15.624-9.111 26.133-26.038 26.133-45.426.001-9.137-2.333-17.729-6.438-25.215z"/><path d="m61.262 0c-33.779 0-61.262 27.481-61.262 61.26 0 33.783 27.483 61.263 61.262 61.263 33.778 0 61.265-27.48 61.265-61.263-.001-33.779-27.487-61.26-61.265-61.26zm0 119.715c-32.23 0-58.453-26.223-58.453-58.455 0-32.23 26.222-58.451 58.453-58.451 32.229 0 58.45 26.221 58.45 58.451 0 32.232-26.221 58.455-58.45 58.455z"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

@@ -4,7 +4,7 @@ import type { Template } from "./AppSettingsInterface";
export default function TemplateCard({ template }: { template: Template }) {
return (
<div className="min-h-16 sticky flex flex-col justify-between gap-4 rounded-md border border-gray-200 bg-white p-5">
<div className="min-h-16 bg-default border-subtle sticky flex flex-col justify-between gap-4 rounded-md border p-5">
<div className="flex items-start justify-start">
<div>
<div className="mr-4 flex h-12 w-12 items-center justify-center rounded-md p-1">
@@ -13,8 +13,8 @@ export default function TemplateCard({ template }: { template: Template }) {
</div>
<div className="mr-4">
<div>
<p className="truncate text-sm font-medium leading-4 text-gray-900">{template.app}</p>
<p className="mt-[2px] text-sm text-gray-500">{template.text}</p>
<p className="text-emphasis truncate text-sm font-medium leading-4">{template.app}</p>
<p className="text-subtle mt-[2px] text-sm">{template.text}</p>
</div>
</div>
</div>
@@ -41,19 +41,19 @@ export default function ZapierSetup(props: IZapierSetupProps) {
}
if (integrations.isLoading) {
return <div className="absolute z-50 flex h-screen w-full items-center bg-gray-200" />;
return <div className="bg-emphasis absolute z-50 flex h-screen w-full items-center" />;
}
return (
<div className="flex h-screen bg-gray-200">
<div className="bg-emphasis flex h-screen">
{showContent ? (
<div className="m-auto max-w-[43em] overflow-auto rounded bg-white pb-10 md:p-10">
<div className="bg-default m-auto max-w-[43em] overflow-auto rounded pb-10 md:p-10">
<div className="md:flex md:flex-row">
<div className="invisible md:visible">
<img className="h-11" src="/api/app-store/zapier/icon.svg" alt="Zapier Logo" />
</div>
<div className="ml-2 ltr:mr-2 rtl:ml-2 md:ml-5">
<div className="text-gray-600">{t("setting_up_zapier")}</div>
<div className="text-default">{t("setting_up_zapier")}</div>
{!newApiKey ? (
<>
<div className="mt-1 text-xl">{t("generate_api_key")}:</div>
@@ -65,7 +65,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
<>
<div className="mt-1 text-xl">{t("your_unique_api_key")}</div>
<div className="my-2 mt-3 flex-wrap sm:flex sm:flex-nowrap">
<code className="h-full w-full whitespace-pre-wrap rounded-md bg-gray-100 py-[6px] pl-2 pr-2 sm:rounded-r-none sm:pr-5">
<code className="bg-subtle h-full w-full whitespace-pre-wrap rounded-md py-[6px] pl-2 pr-2 sm:rounded-r-none sm:pr-5">
{newApiKey}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
@@ -81,9 +81,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
</Button>
</Tooltip>
</div>
<div className="mt-2 mb-5 text-sm font-semibold text-gray-600">
{t("copy_safe_api_key")}
</div>
<div className="text-default mt-2 mb-5 text-sm font-semibold">{t("copy_safe_api_key")}</div>
</>
)}
+49 -97
View File
@@ -15,32 +15,20 @@ module.exports = {
theme: {
extend: {
colors: {
/* your primary brand color */
brandcontrast: "var(--brand-text-color)",
darkmodebrand: "var(--brand-color-dark-mode)",
darkmodebrandcontrast: "var(--brand-text-color-dark-mode)",
bookinglightest: "var(--booking-lightest-color)",
bookinglighter: "var(--booking-lighter-color)",
bookinglight: "var(--booking-light-color)",
bookingmedian: "var(--booking-median-color)",
bookingdark: "var(--booking-dark-color)",
bookingdarker: "var(--booking-darker-color)",
bookinghighlight: "var(--booking-highlight-color)",
emphasis: "var(--cal-bg-emphasis)",
default: "var(--cal-bg, white)",
subtle: "var(--cal-bg-subtle)",
muted: "var(--cal-bg-muted)",
inverted: "var(--cal-bg-inverted)",
info: "var(--cal-bg-info)",
success: "var(--cal-bg-success)",
attention: "var(--cal-bg-attention)",
error: "var(--cal-bg-error)",
black: "#111111",
brand: {
// Figure out a way to automate this for self hosted users
// Goto https://javisperez.github.io/tailwindcolorshades to generate your brand color
50: "#d1d5db",
100: "#9ca3af",
200: "#6b7280",
300: "#4b5563",
400: "#374151",
500: "#111827", // Brand color
600: "#0f1623",
700: "#0d121d",
800: "#0a0e17",
900: "#080c13",
DEFAULT: "var(--brand-color)",
default: "var(--cal-brand,'#111827')",
emphasis: "var(--cal-brand-emphasis,'#101010')",
subtle: "var(--cal-brand-subtle,'#9CA3AF')",
},
gray: {
50: "#F9FAFB",
@@ -54,79 +42,6 @@ module.exports = {
800: "#1F2937",
900: "#111827",
},
primary: {
50: "#F4F4F4",
100: "#E8E8E8",
200: "#C6C6C6",
300: "#A3A3A3",
400: "#5F5F5F",
500: "#1A1A1A",
600: "#171717",
700: "#141414",
800: "#101010",
900: "#0D0D0D",
},
secondary: {
50: "#F5F8F7",
100: "#EBF0F0",
200: "#CDDAD9",
300: "#AEC4C2",
400: "#729894",
500: "#356C66",
600: "#30615C",
700: "#28514D",
800: "#20413D",
900: "#223B41",
},
red: {
50: "#FFF5F5",
100: "#FFE3E2",
200: "#FFC9C9",
300: "#FEA8A8",
400: "#FF8787",
500: "#FF6B6B",
600: "#FA5352",
700: "#F03E3F",
800: "#E03130",
900: "#C92B2B",
},
orange: {
50: "#FFF4E5",
100: "#FFE8CC",
200: "#FFD8A8",
300: "#FFBF78",
400: "#FFA94E",
500: "#FF922B",
600: "#FD7E14",
700: "#F76706",
800: "#E8580C",
900: "#D94810",
},
green: {
50: "#EBFCEE",
100: "#D2F9D9",
200: "#B1F2BA",
300: "#8CE99A",
400: "#69DB7C",
500: "#51CF66",
600: "#40C057",
700: "#36B24D",
800: "#2F9E44",
900: "#2B8A3E",
},
blue: {
50: "#E7F5FF",
100: "#D0EBFF",
200: "#A4D8FF",
300: "#74C0FC",
400: "#4DABF7",
500: "#339AF0",
600: "#238BE6",
700: "#1C7ED7",
800: "#1971C2",
900: "#1763AB",
},
darkgray: {
50: "#101010",
100: "#1c1c1c",
@@ -140,6 +55,36 @@ module.exports = {
900: "#f3f4f6",
},
},
borderColor: {
emphasis: "var(--cal-border-emphasis, #9CA3AF)",
default: "var(--cal-border, #D1D5DB)",
subtle: "var(--cal-border-subtle, #E5E7EB)",
muted: "var(--cal-border-muted, #F3F4F6)",
},
textColor: {
emphasis: "var(--cal-text-emphasis, #111827)",
default: "var(--cal-text, #374151)",
subtle: "var(--cal-text-subtle, #6B7280)",
muted: "var(--cal-text-muted, #9CA3AF)",
inverted: "var(--cal-text-inverted, white)",
info: "var(--cal-text-info, #253985)",
success: "var(--cal-text-success, #285231)",
attention: "var(--cal-text-attention, #73321B)",
error: "var(--cal-text-error, #752522)",
brand: "var(--cal-brand-text,'white')",
},
fill: {
emphasis: "var(--cal-text-emphasis, #111827)",
default: "var(--cal-text, #374151)",
subtle: "var(--cal-text-subtle, #6B7280)",
muted: "var(--cal-text-muted, #9CA3AF)",
inverted: "var(--cal-text-inverted, white)",
info: "var(--cal-text-info, #253985)",
success: "var(--cal-text-success, #285231)",
attention: "var(--cal-text-attention, #73321B)",
error: "var(--cal-text-error, #752522)",
brand: "var(--cal-brand-text)",
},
screens: {
pwa: { raw: "(display-mode: standalone)" },
},
@@ -208,6 +153,13 @@ module.exports = {
addVariant("windows", ".windows &");
addVariant("ios", ".ios &");
}),
plugin(({ addBase, theme }) => {
addBase({
hr: {
borderColor: theme("subtle"),
},
});
}),
],
variants: {
scrollbar: ["rounded", "dark"],
+86
View File
@@ -0,0 +1,86 @@
:root {
/* background */
--cal-bg-emphasis: #E5E7EB;
--cal-bg: white;
--cal-bg-subtle: #F3F4F6;
--cal-bg-muted: #F9FAFB;
--cal-bg-inverted: #111827;
/* background -> components*/
--cal-bg-info: #DEE9FC;
--cal-bg-success: #E2FBE8;
--cal-bg-attention: #FCEED8;
--cal-bg-error: #F9E3E2;
/* Borders */
--cal-border-emphasis:#9CA3AF;
--cal-border: #D1D5DB:
--cal-border-subtle:#E5E7EB;
--cal-border-muted:#F3F4F6;
/* Content/Text */
--cal-text-emphasis: #111827;
--cal-text:#374151;
--cal-text-subtle:#6B7280;
--cal-text-muted:#9CA3AF;
--cal-text-inverted:white;
/* Content/Text -> components */
--cal-text-info:#253985;
--cal-text-success:#285231;
--cal-text-attention:#73321B;
--cal-text-error:#752522;
/* Brand shenanigans
-> These will be computed for the users theme at runtime.
*/
--cal-brand:#111827;
--cal-brand-emphasis:#101010;
}
/* Darkmode Colors -- TODO: WIP*/
.dark {
/* background */
--cal-bg-emphasis: #2b2b2b;
--cal-bg: #111111;
--cal-bg-subtle: #1c1c1c;
--cal-bg-muted: #101010;
--cal-bg-inverted: #f3f4f6;
/* background -> components*/
--cal-bg-info: #DEE9FC;
--cal-bg-success: #E2FBE8;
--cal-bg-attention: #FCEED8;
--cal-bg-error: #F9E3E2;
/* Borders */
--cal-border-emphasis:#575757;
--cal-border: #444444;
--cal-border-subtle:#2b2b2b;
--cal-border-muted:#1c1c1c;
/* Content/Text */
--cal-text-emphasis: #f3f4f6;
--cal-text:#d6d6d6;
--cal-text-subtle:#767676;
--cal-text-muted:#575757;
--cal-text-inverted:white;
/* Content/Text -> components */
--cal-text-info:#253985;
--cal-text-success:#285231;
--cal-text-attention:#73321B;
--cal-text-error:#752522;
/* Brand shenanigans
-> These will be computed for the users theme at runtime.
*/
--cal-brand:#111827;
--cal-brand-emphasis:#101010;
}
+85
View File
@@ -0,0 +1,85 @@
import type { Color, HSL, Shade } from "./interfaces";
// Yeah i stole this...
const hexToHSL = (hex: string): HSL => {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex) || [];
try {
let r = parseInt(result[1], 16);
let g = parseInt(result[2], 16);
let b = parseInt(result[3], 16);
(r /= 255), (g /= 255), (b /= 255);
const max = Math.max(r, g, b),
min = Math.min(r, g, b);
let h = 0,
s,
// eslint-disable-next-line prefer-const
l = (max + min) / 2;
if (max == min) {
h = s = 0; // achromatic
} else {
const d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
break;
}
h /= 6;
}
const HSL: HSL = { h: 0, s: 0, l: 0 };
HSL.h = Math.round(h * 360);
HSL.s = Math.round(s * 100);
HSL.l = Math.round(l * 100);
return HSL;
} catch (error) {
console.log(hex);
return { h: 0, s: 0, l: 0 };
}
};
const hslToHex = ({ h, s, l }: HSL): string => {
l /= 100;
const a = (s * Math.min(l, 1 - l)) / 100;
const f = (n: number) => {
const k = (n + h / 30) % 12;
const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
return Math.round(255 * color)
.toString(16)
.padStart(2, "0"); // convert to Hex and prefix "0" if needed
};
return `#${f(0)}${f(8)}${f(4)}`;
};
const HSL_SHADES: Shade[] = [
{ name: "50", lightness: 98 },
{ name: "100", lightness: 95 },
{ name: "200", lightness: 90 },
{ name: "300", lightness: 82 },
{ name: "400", lightness: 64 },
{ name: "500", lightness: 46 },
{ name: "600", lightness: 33 },
{ name: "700", lightness: 24 },
{ name: "800", lightness: 14 },
{ name: "900", lightness: 7 },
];
const generateColor = ({ hex }: { hex: string }): Color => {
const colorHSL = hexToHSL(hex);
const obj: Color = {};
HSL_SHADES.forEach(({ name, lightness }: Shade) => {
const { h, s } = colorHSL;
const hsl: HSL = { h, s, l: lightness };
const hex = hslToHex(hsl);
obj[name] = hex;
});
return obj;
};
export { generateColor };
+17
View File
@@ -0,0 +1,17 @@
interface Color {
[key: string]: string;
}
interface HSL {
h: number;
s: number;
l: number;
}
interface Palette {
[key: string]: Color;
}
interface Shade {
name: string;
lightness: number;
}
export type { Color, HSL, Palette, Shade };
@@ -1,5 +1,5 @@
const html = `<div id="wrapper" style="top:50%; left:50%;transform:translate(-50%,-50%)" class="absolute z-highest">
<div class="loader border-brand dark:border-darkmodebrand">
<div class="loader border-brand-default dark:border-darkmodebrand">
<span class="loader-inner bg-brand dark:bg-darkmodebrand"></span>
</div>
<div id="error" style="transform:translate(-50%,-50%)" class="hidden">
@@ -46,11 +46,11 @@ const html = `<style>
<div class="modal-box">
<div class="body">
<div id="wrapper" class="z-[999999999999] absolute flex w-full items-center">
<div class="loader modal-loader border-brand dark:border-darkmodebrand">
<div class="loader modal-loader border-brand-default dark:border-darkmodebrand">
<span class="loader-inner bg-brand dark:bg-darkmodebrand"></span>
</div>
</div>
<div id="error" class="hidden left-1/2 -translate-x-1/2 relative text-white"></div>
<div id="error" class="hidden left-1/2 -translate-x-1/2 relative text-inverted"></div>
<slot></slot>
</div>
</div>
@@ -98,13 +98,6 @@ interface EmbedNonStylesConfig {
align?: "left";
branding?: {
brandColor?: string;
lightColor?: string;
lighterColor?: string;
lightestColor?: string;
highlightColor?: string;
darkColor?: string;
darkerColor?: string;
medianColor?: string;
};
}
+1 -1
View File
@@ -152,7 +152,7 @@ const AdminAppsList = ({
<form
{...rest}
className={
classNames?.form ?? "max-w-80 mb-4 rounded-md bg-white px-0 pt-0 md:max-w-full md:px-8 md:pt-10"
classNames?.form ?? "max-w-80 bg-default mb-4 rounded-md px-0 pt-0 md:max-w-full md:px-8 md:pt-10"
}
onSubmit={(e) => {
e.preventDefault();
@@ -50,13 +50,13 @@ export const EventTypeFilter = () => {
{groupedEventTypes &&
Object.keys(groupedEventTypes).map((teamName) => (
<Fragment key={teamName}>
<div className="p-4 text-xs font-medium uppercase leading-none text-gray-500">
<div className="text-subtle p-4 text-xs font-medium uppercase leading-none">
{teamName === "user_own_event_types" ? t("individual") : teamName}
</div>
{groupedEventTypes[teamName].map((eventType) => (
<Fragment key={eventType.id}>
<div className="item-center flex px-4 py-[6px]">
<p className="block self-center truncate text-sm font-medium text-gray-700">
<p className="text-default block self-center truncate text-sm font-medium">
{eventType.title}
</p>
<div className="ml-auto">
@@ -64,7 +64,7 @@ export const EventTypeFilter = () => {
type="checkbox"
name=""
id=""
className="text-primary-600 focus:ring-primary-500 h-4 w-4 rounded border-gray-300 ltr:mr-2 rtl:ml-2 "
className="text-primary-600 focus:ring-primary-500 border-default h-4 w-4 rounded ltr:mr-2 rtl:ml-2 "
/>
</div>
</div>
@@ -20,11 +20,11 @@ export const PeopleFilter = () => {
return (
<AnimatedPopover text={userNames && userNames.length > 0 ? `${userNames.join(", ")}` : dropdownTitle}>
<div className="item-center flex px-4 py-[6px] focus-within:bg-gray-100 hover:cursor-pointer hover:bg-gray-50">
<div className="flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<div className="item-center focus-within:bg-subtle hover:bg-muted flex px-4 py-[6px] hover:cursor-pointer">
<div className="text-default flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<FiUser className="h-5 w-5" />
</div>
<label htmlFor="allUsers" className="mr-auto self-center truncate text-sm font-medium text-gray-700">
<label htmlFor="allUsers" className="text-default mr-auto self-center truncate text-sm font-medium">
{t("all_users_filter_label")}
</label>
@@ -37,13 +37,13 @@ export const PeopleFilter = () => {
// Always clear userIds on toggle as this is the toggle box for all users. No params means we are currently selecting all users
removeByKey("userIds");
}}
className="text-primary-600 focus:ring-primary-500 inline-flex h-4 w-4 place-self-center justify-self-end rounded border-gray-300 "
className="text-primary-600 focus:ring-primary-500 border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
/>
</div>
{data &&
data.map((user) => (
<div
className="item-center flex px-4 py-[6px] focus-within:bg-gray-100 focus-within:bg-gray-100 hover:cursor-pointer hover:bg-gray-50"
className="item-center focus-within:bg-subtle focus-within:bg-subtle hover:bg-muted flex px-4 py-[6px] hover:cursor-pointer"
key={`${user.id}`}>
<Avatar
imageSrc={user.avatar}
@@ -55,7 +55,7 @@ export const PeopleFilter = () => {
/>
<label
htmlFor={user.name ?? "NamelessUser"}
className="ml-2 mr-auto self-center truncate text-sm font-medium text-gray-700 hover:cursor-pointer">
className="text-default ml-2 mr-auto self-center truncate text-sm font-medium hover:cursor-pointer">
{user.name}
</label>
@@ -72,7 +72,7 @@ export const PeopleFilter = () => {
removeItemByKeyAndValue("userIds", user.id);
}
}}
className="text-primary-600 focus:ring-primary-500 inline-flex h-4 w-4 place-self-center justify-self-end rounded border-gray-300 "
className="text-primary-600 focus:ring-primary-500 border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
/>
</div>
))}
@@ -22,13 +22,13 @@ export const TeamsMemberFilter = () => {
return (
<AnimatedPopover text={teamNames && teamNames.length > 0 ? `${teamNames.join(", ")}` : dropdownTitle}>
<div className="item-center flex px-4 py-[6px] focus-within:bg-gray-100 hover:cursor-pointer hover:bg-gray-50">
<div className="flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<div className="item-center focus-within:bg-subtle hover:bg-muted flex px-4 py-[6px] hover:cursor-pointer">
<div className="text-default flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<FiLayers className="h-5 w-5" />
</div>
<label
htmlFor="allBookings"
className="mr-auto self-center truncate text-sm font-medium text-gray-700">
className="text-default mr-auto self-center truncate text-sm font-medium">
{t("all_bookings_filter_label")}
</label>
@@ -40,16 +40,16 @@ export const TeamsMemberFilter = () => {
setDropdownTitle(t("all_bookings_filter_label"));
removeByKey("teamIds"); // Always clear on toggle or not toggle (seems weird but when you know the behviour it works well )
}}
className="text-primary-600 focus:ring-primary-500 inline-flex h-4 w-4 place-self-center justify-self-end rounded border-gray-300 "
className="text-primary-600 focus:ring-primary-500 border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
/>
</div>
<div className="item-center flex px-4 py-[6px] focus-within:bg-gray-100 hover:cursor-pointer hover:bg-gray-50">
<div className="flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<div className="item-center focus-within:bg-subtle hover:bg-muted flex px-4 py-[6px] hover:cursor-pointer">
<div className="text-default flex h-6 w-6 items-center justify-center ltr:mr-2 rtl:ml-2">
<FiUser className="h-5 w-5" />
</div>
<label
htmlFor="yourBookings"
className="mr-auto self-center truncate text-sm font-medium text-gray-700">
className="text-default mr-auto self-center truncate text-sm font-medium">
{t("your_bookings_filter_label")}
</label>
@@ -66,13 +66,13 @@ export const TeamsMemberFilter = () => {
removeItemByKeyAndValue("userIds", session.data?.user.id || 0);
}
}}
className="text-primary-600 focus:ring-primary-500 inline-flex h-4 w-4 place-self-center justify-self-end rounded border-gray-300 "
className="text-primary-600 focus:ring-primary-500 border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
/>
</div>
{data &&
data.map((team) => (
<div
className="item-center flex px-4 py-[6px] focus-within:bg-gray-100 hover:cursor-pointer hover:bg-gray-50"
className="item-center focus-within:bg-subtle hover:bg-muted flex px-4 py-[6px] hover:cursor-pointer"
key={`${team.id}`}>
<Avatar
imageSrc={team.logo}
@@ -84,7 +84,7 @@ export const TeamsMemberFilter = () => {
/>
<label
htmlFor={team.name}
className="ml-2 mr-auto select-none self-center truncate text-sm font-medium text-gray-700 hover:cursor-pointer">
className="text-default ml-2 mr-auto select-none self-center truncate text-sm font-medium hover:cursor-pointer">
{team.name}
</label>
@@ -101,7 +101,7 @@ export const TeamsMemberFilter = () => {
removeItemByKeyAndValue("teamIds", team.id);
}
}}
className="text-primary-600 focus:ring-primary-500 inline-flex h-4 w-4 place-self-center justify-self-end rounded border-gray-300 "
className="text-primary-600 focus:ring-primary-500 border-default inline-flex h-4 w-4 place-self-center justify-self-end rounded "
/>
</div>
))}
+16 -20
View File
@@ -51,12 +51,12 @@ export const Day = ({
type="button"
style={disabled ? { ...disabledDateButtonEmbedStyles } : { ...enabledDateButtonEmbedStyles }}
className={classNames(
"disabled:text-bookinglighter absolute top-0 left-0 right-0 bottom-0 mx-auto w-full rounded-md border-2 border-transparent text-center font-medium disabled:cursor-default disabled:border-transparent disabled:font-light disabled:dark:border-transparent",
"disabled:text-bookinglighter absolute top-0 left-0 right-0 bottom-0 mx-auto w-full rounded-md border-2 border-transparent text-center text-sm font-medium disabled:cursor-default disabled:border-transparent disabled:font-light ",
active
? "dark:bg-darkmodebrand dark:hover:border-darkmodebrand dark:text-darkmodebrandcontrast bg-brand text-brandcontrast border-2"
? "bg-brand-default text-brand"
: !disabled
? "dark:bg-darkgray-200 hover:border-brand dark:hover:border-darkmodebrand bg-gray-100 dark:text-white"
: ""
? " hover:border-brand-default text-emphasis bg-emphasis"
: "text-muted"
)}
data-testid="day"
data-disabled={disabled}
@@ -80,10 +80,8 @@ const NoAvailabilityOverlay = ({
const { t } = useLocale();
return (
<div className="dark:border-darkgray-300 dark:bg-darkgray-200 absolute top-40 left-1/2 -mt-10 w-max -translate-x-1/2 -translate-y-1/2 transform rounded-md border border-gray-200 bg-gray-50 p-8 shadow-sm">
<h4 className="mb-4 font-medium text-gray-900 dark:text-white">
{t("no_availability_in_month", { month: month })}
</h4>
<div className=" bg-muted border-subtle absolute top-40 left-1/2 -mt-10 w-max -translate-x-1/2 -translate-y-1/2 transform rounded-md border p-8 shadow-sm">
<h4 className="text-emphasis mb-4 font-medium">{t("no_availability_in_month", { month: month })}</h4>
<Button onClick={nextMonthButton} color="primary" EndIcon={FiArrowRight}>
{t("view_next_month")}
</Button>
@@ -146,7 +144,7 @@ const Days = ({
<div key={`e-${idx}`} />
) : props.isLoading ? (
<button
className="dark:bg-darkgray-200 absolute top-0 left-0 right-0 bottom-0 mx-auto flex w-full items-center justify-center rounded-sm border-transparent bg-gray-50 text-center text-gray-400 opacity-50 dark:text-gray-400"
className=" bg-muted text-muted opcaity-50 absolute top-0 left-0 right-0 bottom-0 mx-auto flex w-full items-center justify-center rounded-sm border-transparent text-center"
key={`e-${idx}`}
disabled>
<SkeletonText className="h-4 w-5" />
@@ -199,23 +197,23 @@ const DatePicker = ({
return (
<div className={className}>
<div className="mb-4 flex items-center justify-between text-xl font-light">
<span className="w-1/2 text-base dark:text-white">
<span className="text-default w-1/2 text-base">
{browsingDate ? (
<>
<strong className="text-bookingdarker font-semibold dark:text-white">{month}</strong>{" "}
<span className="text-bookinglight">{browsingDate.format("YYYY")}</span>
<strong className="text-emphasis font-semibold">{month}</strong>{" "}
<span className="text-subtle">{browsingDate.format("YYYY")}</span>
</>
) : (
<SkeletonText className="h-8 w-24" />
)}
</span>
<div className="text-black dark:text-white">
<div className="text-emphasis">
<div className="flex">
<Button
className={classNames(
"group p-1 opacity-50 hover:opacity-100",
"group p-1 opacity-70 hover:opacity-100",
!browsingDate.isAfter(dayjs()) &&
"disabled:text-bookinglighter hover:bg-background hover:opacity-50"
"disabled:text-bookinglighter hover:bg-background hover:opacity-70"
)}
onClick={() => changeMonth(-1)}
disabled={!browsingDate.isAfter(dayjs())}
@@ -225,7 +223,7 @@ const DatePicker = ({
StartIcon={ChevronLeftIcon}
/>
<Button
className="group p-1 opacity-50 hover:opacity-100"
className="group p-1 opacity-70 hover:opacity-100"
onClick={() => changeMonth(+1)}
data-testid="incrementMonth"
color="minimal"
@@ -235,11 +233,9 @@ const DatePicker = ({
</div>
</div>
</div>
<div className="border-bookinglightest mb-2 grid grid-cols-7 gap-4 border-t border-b text-center dark:border-neutral-900 md:mb-0 md:border-0">
<div className="border-subtle mb-2 grid grid-cols-7 gap-4 border-t border-b text-center md:mb-0 md:border-0">
{weekdayNames(locale, weekStart, "short").map((weekDay) => (
<div
key={weekDay}
className="text-bookinglight dark:text-darkgray-900 my-4 text-xs uppercase tracking-widest">
<div key={weekDay} className="text-emphasis my-4 text-xs uppercase tracking-widest">
{weekDay}
</div>
))}
@@ -28,7 +28,7 @@ const SingleValueComponent = ({ ...props }: SingleValueProps<Option>) => {
const { label, subtitle } = props.data;
return (
<components.SingleValue {...props} className="flex space-x-1">
<p>{label}</p> <p className=" text-gray-500">{subtitle}</p>
<p>{label}</p> <p className=" text-subtle">{subtitle}</p>
</components.SingleValue>
);
};
@@ -128,7 +128,7 @@ const DestinationCalendarSelector = ({
!hidePlaceholder ? (
`${t("select_destination_calendar")}`
) : (
<span className="min-w-0 overflow-hidden truncate whitespace-nowrap">
<span className="text-default min-w-0 overflow-hidden truncate whitespace-nowrap">
{t("default_calendar_selected")}{" "}
{queryDestinationCalendar.name &&
`| ${queryDestinationCalendar.name} (${queryDestinationCalendar?.integrationTitle} - ${queryDestinationCalendar.primaryEmail})`}
@@ -151,7 +151,7 @@ const DestinationCalendarSelector = ({
}}
isSearchable={false}
className={classNames(
"mt-1 mb-2 block w-full min-w-0 flex-1 rounded-none rounded-r-sm border-gray-300 text-sm"
"border-default mt-1 mb-2 block w-full min-w-0 flex-1 rounded-none rounded-r-sm text-sm"
)}
onChange={(newValue) => {
setSelectedOption(newValue);
@@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef } from "react";
import { useCalendarStore } from "../state/store";
import "../styles/styles.css";
import { CalendarComponentProps } from "../types/state";
import type { CalendarComponentProps } from "../types/state";
import { getDaysBetweenDates, getHoursToDisplay } from "../utils";
import { DateValues } from "./DateValues";
import { BlockedList } from "./blocking/BlockedList";
@@ -44,7 +44,7 @@ export function Calendar(props: CalendarComponentProps) {
{ "--one-minute-height": `calc(1.75rem/(60/${usersCellsStopsPerHour}))` } as React.CSSProperties // This can't live in the css file because it's a dynamic value and css variable gets super
}>
<SchedulerHeading />
<div ref={container} className="relative isolate flex flex-auto flex-col bg-white">
<div ref={container} className="bg-default relative isolate flex flex-auto flex-col">
<div
style={{ width: "165%" }}
className="flex max-w-full flex-none flex-col sm:max-w-none md:max-w-full">
@@ -56,7 +56,7 @@ export function Calendar(props: CalendarComponentProps) {
containerRef={container}
/> */}
<div className="flex flex-auto">
<div className="sticky left-0 z-10 w-14 flex-none bg-white ring-1 ring-gray-100" />
<div className="bg-default sticky left-0 z-10 w-14 flex-none ring-1 ring-muted" />
<div className="grid flex-auto grid-cols-1 grid-rows-1 ">
<HorizontalLines
hours={hours}
@@ -125,7 +125,7 @@ const MobileNotSupported = ({ children }: { children: React.ReactNode }) => {
<>
<div className="flex h-full flex-col items-center justify-center sm:hidden">
<h1 className="text-2xl font-bold">Mobile not supported yet </h1>
<p className="text-gray-500">Please use a desktop browser to view this page</p>
<p className="text-subtle">Please use a desktop browser to view this page</p>
</div>
<div className="hidden sm:block">{children}</div>
</>
@@ -12,8 +12,8 @@ export function DateValues({ days, containerNavRef }: Props) {
return (
<div
ref={containerNavRef}
className="sticky top-0 z-30 flex-none border-b border-b-gray-300 bg-white sm:pr-8">
<div className="flex text-sm leading-6 text-gray-500 sm:hidden" data-dayslength={days.length}>
className="bg-default sticky top-0 z-30 flex-none border-b border-b-gray-300 sm:pr-8">
<div className="text-subtle flex text-sm leading-6 sm:hidden" data-dayslength={days.length}>
{days.map((day) => {
const isToday = dayjs().isSame(day, "day");
return (
@@ -24,8 +24,8 @@ export function DateValues({ days, containerNavRef }: Props) {
{day.format("dd")}{" "}
<span
className={classNames(
"mt-1 flex h-8 w-8 items-center justify-center font-semibold text-gray-900",
isToday && "rounded-full bg-gray-900 text-white"
"text-emphasis mt-1 flex h-8 w-8 items-center justify-center font-semibold",
isToday && "bg-inverted text-inverted rounded-full"
)}>
{day.format("D")}
</span>
@@ -33,7 +33,7 @@ export function DateValues({ days, containerNavRef }: Props) {
);
})}
</div>
<div className="-mr-px hidden auto-cols-fr text-sm leading-6 text-gray-500 sm:flex ">
<div className="text-subtle -mr-px hidden auto-cols-fr text-sm leading-6 sm:flex ">
<div className="col-end-1 w-14" />
{days.map((day) => {
const isToday = dayjs().isSame(day, "day");
@@ -46,7 +46,7 @@ export function DateValues({ days, containerNavRef }: Props) {
<span
className={classNames(
"items-center justify-center p-1",
isToday && "rounded-full bg-gray-900 text-white"
isToday && "bg-inverted text-inverted rounded-full"
)}>
{day.format("DD")}
</span>
@@ -1,7 +1,8 @@
import shallow from "zustand/shallow";
import { useCalendarStore } from "../../state/store";
import { gridCellToDateTime, GridCellToDateProps } from "../../utils";
import type { GridCellToDateProps } from "../../utils";
import { gridCellToDateTime } from "../../utils";
export function EmptyCell(props: GridCellToDateProps) {
const { onEmptyCellClick, hoverEventDuration } = useCalendarStore(
@@ -27,9 +28,9 @@ export function EmptyCell(props: GridCellToDateProps) {
onClick={() => onEmptyCellClick && onEmptyCellClick(cellToDate.toDate())}>
{hoverEventDuration !== 0 && (
<div
className="opacity-4 absolute inset-x-1 hidden rounded-[4px] border-[1px] border-gray-900 bg-gray-100
py-1
px-[6px] text-xs font-semibold leading-5 text-gray-900 hover:bg-gray-200 group-hover:block group-hover:cursor-pointer"
className="opacity-4 bg-subtle hover:bg-emphasis text-emphasis absolute inset-x-1 hidden rounded-[4px]
border-[1px]
border-gray-900 py-1 px-[6px] text-xs font-semibold leading-5 group-hover:block group-hover:cursor-pointer"
style={{
height: `calc(${hoverEventDuration}*var(--one-minute-height))`,
zIndex: 49,
@@ -1,7 +1,7 @@
import dayjs from "@calcom/dayjs";
import { classNames } from "@calcom/lib";
import { CalendarEvent } from "../../types/events";
import type { CalendarEvent } from "../../types/events";
type EventProps = {
event: CalendarEvent;
@@ -29,18 +29,18 @@ export function Event({
"group flex h-full w-full flex-col overflow-y-auto rounded-[4px] py-1 px-[6px] text-xs font-semibold leading-5 ",
event.status === "ACCEPTED" &&
!selected &&
"border-[1px] border-gray-900 bg-gray-100 text-gray-900 hover:bg-gray-200",
"bg-subtle hover:bg-emphasis text-emphasis border-[1px] border-gray-900",
event.status === "PENDING" &&
!selected &&
"border-[1px] border-dashed border-gray-900 bg-white text-gray-900",
selected && "border-[1px] border-transparent bg-gray-900 text-white",
"bg-default text-emphasis border-[1px] border-dashed border-gray-900",
selected && "bg-inverted text-inverted border-[1px] border-transparent",
disabled ? "hover:cursor-default" : "hover:cursor-pointer"
)}>
<div className="w-full overflow-hidden overflow-ellipsis whitespace-nowrap text-left leading-4">
{event.title}
</div>
{eventDuration >= 30 && (
<p className="text-left text-[10px] leading-none text-gray-500">
<p className="text-subtle text-left text-[10px] leading-none">
{dayjs(event.start).format("HH:mm")} - {dayjs(event.end).format("HH:mm")}
</p>
)}
@@ -13,9 +13,9 @@ export function SchedulerHeading() {
return (
<header className="flex flex-none flex-col justify-between py-4 sm:flex-row sm:items-center">
<h1 className="text-xl font-semibold text-gray-900">
<h1 className="text-emphasis text-xl font-semibold">
{startDate.format("MMM DD")}-{endDate.format("DD")}
<span className="text-gray-500">,{startDate.format("YYYY")}</span>
<span className="text-subtle">,{startDate.format("YYYY")}</span>
</h1>
<div className="flex items-center space-x-2 rtl:space-x-reverse">
{/* TODO: Renable when we have daily/mobile support */}
@@ -1,6 +1,6 @@
import { useId } from "react";
import dayjs from "@calcom/dayjs";
import type dayjs from "@calcom/dayjs";
export const HorizontalLines = ({
hours,
@@ -23,14 +23,14 @@ export const HorizontalLines = ({
{hours.map((hour) => (
<>
<div key={`${id}-${hour.get("hour")}`}>
<div className="sticky left-0 z-20 -mt-2.5 -ml-14 w-14 pr-2 text-right text-xs leading-5 text-gray-400">
<div className="text-muted sticky left-0 z-20 -mt-2.5 -ml-14 w-14 pr-2 text-right text-xs leading-5">
{hour.format("h A")}
</div>
</div>
</>
))}
<div key={`${id}-${finalHour}`}>
<div className="sticky left-0 z-20 -mt-2.5 -ml-14 w-14 pr-2 text-right text-xs leading-5 text-gray-400">
<div className="text-muted sticky left-0 z-20 -mt-2.5 -ml-14 w-14 pr-2 text-right text-xs leading-5">
{finalHour}
</div>
</div>
@@ -52,17 +52,17 @@ export default function ApiKeyDialogForm({
{successfulNewApiKeyModal ? (
<>
<div className="mb-10">
<h2 className="font-semi-bold font-cal mb-2 text-xl tracking-wide text-gray-900">
<h2 className="font-semi-bold font-cal text-emphasis mb-2 text-xl tracking-wide">
{t("success_api_key_created")}
</h2>
<div className="text-sm text-gray-900">
<div className="text-emphasis text-sm">
<span className="font-semibold">{t("success_api_key_created_bold_tagline")}</span>{" "}
{t("you_will_only_view_it_once")}
</div>
</div>
<div>
<div className="flex">
<code className="mb-2 w-full truncate rounded-md rounded-r-none bg-gray-100 py-[6px] pl-2 pr-2 align-middle font-mono text-gray-800">
<code className="bg-subtle text-default mb-2 w-full truncate rounded-md rounded-r-none py-[6px] pl-2 pr-2 align-middle font-mono">
{" "}
{apiKey}
</code>
@@ -79,7 +79,7 @@ export default function ApiKeyDialogForm({
</Button>
</Tooltip>
</div>
<span className="text-sm text-gray-400">
<span className="text-muted text-sm">
{apiKeyDetails.neverExpires
? t("never_expire_key")
: `${t("expires")} ${apiKeyDetails?.expiresAt?.toLocaleDateString()}`}
@@ -108,10 +108,10 @@ export default function ApiKeyDialogForm({
}}
className="space-y-4">
<div className="mt-1 mb-10">
<h2 className="font-semi-bold font-cal text-xl tracking-wide text-gray-900">
<h2 className="font-semi-bold font-cal text-emphasis text-xl tracking-wide">
{defaultValues ? t("edit_api_key") : t("create_api_key")}
</h2>
<p className="mt-1 mb-5 text-sm text-gray-500">{t("api_key_modal_subtitle")}</p>
<p className="text-subtle mt-1 mb-5 text-sm">{t("api_key_modal_subtitle")}</p>
</div>
<div>
<Controller
@@ -134,7 +134,7 @@ export default function ApiKeyDialogForm({
{!defaultValues && (
<div className="flex flex-col">
<div className="flex justify-between py-2">
<span className="block text-sm font-medium text-gray-700">{t("expire_date")}</span>
<span className="text-default block text-sm font-medium">{t("expire_date")}</span>
<Controller
name="neverExpires"
control={form.control}
@@ -1,7 +1,8 @@
import dayjs from "@calcom/dayjs";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import {
Badge,
Button,
@@ -45,10 +46,10 @@ const ApiKeyListItem = ({
<div className="flex items-center space-x-3.5">
{!neverExpires && isExpired && <Badge variant="red">{t("expired")}</Badge>}
{!isExpired && <Badge variant="green">{t("active")}</Badge>}
<p className="text-xs text-gray-600">
<p className="text-default text-xs">
{" "}
{neverExpires ? (
<div className="flex flex-row space-x-3 text-gray-500">{t("api_key_never_expires")}</div>
<div className="text-subtle flex flex-row space-x-3">{t("api_key_never_expires")}</div>
) : (
`${isExpired ? t("expired") : t("expires")} ${dayjs(apiKey?.expiresAt?.toString()).fromNow()}`
)}
@@ -1,17 +1,19 @@
import { CardElement, useElements, useStripe } from "@stripe/react-stripe-js";
import stripejs, { StripeCardElementChangeEvent, StripeElementLocale } from "@stripe/stripe-js";
import type { StripeCardElementChangeEvent, StripeElementLocale } from "@stripe/stripe-js";
import type stripejs from "@stripe/stripe-js";
import { useRouter } from "next/router";
import { stringify } from "querystring";
import { SyntheticEvent, useEffect, useState } from "react";
import type { SyntheticEvent } from "react";
import { useEffect, useState } from "react";
import { StripePaymentData } from "@calcom/app-store/stripepayment/lib/server";
import type { StripePaymentData } from "@calcom/app-store/stripepayment/lib/server";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui";
const CARD_OPTIONS: stripejs.StripeCardElementOptions = {
iconStyle: "solid" as const,
classes: {
base: "block p-2 w-full border-solid border-2 border-gray-300 rounded-md dark:bg-black dark:text-white dark:border-black focus-within:ring-black focus-within:border-black text-sm",
base: "block p-2 w-full border-solid border-2 border-default rounded-md dark:bg-black dark:text-inverted dark:border-black focus-within:ring-black focus-within:border-black text-sm",
},
style: {
base: {
@@ -116,7 +118,7 @@ export default function PaymentComponent(props: Props) {
</Button>
</div>
{state.status === "error" && (
<div className="mt-4 text-center text-gray-700 dark:text-gray-300" role="alert">
<div className="text-default mt-4 text-center dark:text-gray-300" role="alert">
{state.error.message}
</div>
)}
@@ -1,12 +1,13 @@
import { Elements } from "@stripe/react-stripe-js";
import classNames from "classnames";
import Head from "next/head";
import { FC, useEffect, useState } from "react";
import type { FC } from "react";
import { useEffect, useState } from "react";
import { FormattedNumber, IntlProvider } from "react-intl";
import { getSuccessPageLocationMessage } from "@calcom/app-store/locations";
import getStripe from "@calcom/app-store/stripepayment/lib/client";
import { StripePaymentData } from "@calcom/app-store/stripepayment/lib/server";
import type { StripePaymentData } from "@calcom/app-store/stripepayment/lib/server";
import dayjs from "@calcom/dayjs";
import { sdkActionManager, useIsEmbed } from "@calcom/embed-core/embed-iframe";
import { APP_NAME, WEBSITE_URL } from "@calcom/lib/constants";
@@ -72,24 +73,24 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
</span>
<div
className={classNames(
"main inline-block transform overflow-hidden rounded-lg border border-neutral-200 bg-white px-8 pt-5 pb-4 text-left align-bottom transition-all dark:border-neutral-700 dark:bg-gray-800 sm:w-full sm:max-w-lg sm:py-6 sm:align-middle",
"main bg-default inline-block transform overflow-hidden rounded-lg border border-neutral-200 px-8 pt-5 pb-4 text-left align-bottom transition-all dark:border-neutral-700 dark:bg-gray-800 sm:w-full sm:max-w-lg sm:py-6 sm:align-middle",
isEmbed ? "" : "sm:my-8"
)}
role="dialog"
aria-modal="true"
aria-labelledby="modal-headline">
<div>
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100">
<div className="bg-success mx-auto flex h-12 w-12 items-center justify-center rounded-full">
<FiCreditCard className="h-8 w-8 text-green-600" />
</div>
<div className="mt-3 text-center sm:mt-5">
<h3
className="text-2xl font-semibold leading-6 text-gray-900 dark:text-white"
className="text-emphasis dark:text-inverted text-2xl font-semibold leading-6"
id="modal-headline">
{t("payment")}
</h3>
<div className="mt-4 grid grid-cols-3 border-t border-b py-4 text-left text-gray-700 dark:border-gray-900 dark:text-gray-300">
<div className="text-default mt-4 grid grid-cols-3 border-t border-b py-4 text-left dark:border-gray-900 dark:text-gray-300">
<div className="font-medium">{t("what")}</div>
<div className="col-span-2 mb-6">{eventName}</div>
<div className="font-medium">{t("when")}</div>
@@ -97,7 +98,7 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
{date.format("dddd, DD MMMM YYYY")}
<br />
{date.format(is24h ? "H:mm" : "h:mma")} - {props.eventType.length} mins{" "}
<span className="text-gray-500">({timezone})</span>
<span className="text-subtle">({timezone})</span>
</div>
{props.booking.location && (
<>
@@ -122,7 +123,7 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
</div>
<div>
{props.payment.success && !props.payment.refunded && (
<div className="mt-4 text-center text-gray-700 dark:text-gray-300">{t("paid")}</div>
<div className="text-default mt-4 text-center dark:text-gray-300">{t("paid")}</div>
)}
{props.payment.appId === "stripe" && !props.payment.success && (
<Elements
@@ -138,11 +139,11 @@ const PaymentPage: FC<PaymentPageProps> = (props) => {
</Elements>
)}
{props.payment.refunded && (
<div className="mt-4 text-center text-gray-700 dark:text-gray-300">{t("refunded")}</div>
<div className="text-default mt-4 text-center dark:text-gray-300">{t("refunded")}</div>
)}
</div>
{!props.profile.hideBranding && (
<div className="mt-4 border-t pt-4 text-center text-xs text-gray-400 dark:border-gray-900 dark:text-white">
<div className="text-muted dark:text-inverted mt-4 border-t pt-4 text-center text-xs dark:border-gray-900">
<a href={`${WEBSITE_URL}/signup`}>
{t("create_booking_link_with_calcom", { appName: APP_NAME })}
</a>
@@ -88,7 +88,7 @@ const SAMLInfo = ({ acsUrl, entityId }: { acsUrl: string | null; entityId: strin
<Label>ACS URL</Label>
</div>
<div className="flex">
<code className="flex w-full items-center truncate rounded rounded-r-none bg-gray-100 pl-2 font-mono text-gray-800">
<code className="bg-subtle text-default flex w-full items-center truncate rounded rounded-r-none pl-2 font-mono">
{acsUrl}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
@@ -110,7 +110,7 @@ const SAMLInfo = ({ acsUrl, entityId }: { acsUrl: string | null; entityId: strin
<Label>Entity ID</Label>
</div>
<div className="flex">
<code className="flex w-full items-center truncate rounded rounded-r-none bg-gray-100 pl-2 font-mono text-gray-800">
<code className="bg-subtle text-default flex w-full items-center truncate rounded rounded-r-none pl-2 font-mono">
{entityId}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
@@ -146,7 +146,7 @@ const OIDCInfo = ({ callbackUrl }: { callbackUrl: string | null }) => {
<Label>Callback URL</Label>
</div>
<div className="flex">
<code className="flex w-full items-center truncate rounded rounded-r-none bg-gray-100 pl-2 font-mono text-gray-800">
<code className="bg-subtle text-default flex w-full items-center truncate rounded rounded-r-none pl-2 font-mono">
{callbackUrl}
</code>
<Tooltip side="top" content={t("copy_to_clipboard")}>
@@ -27,7 +27,7 @@ export default function OIDCConnection({
<div className="flex flex-col sm:flex-row">
<div>
<h2 className="font-medium">{t("sso_oidc_heading")}</h2>
<p className="text-sm font-normal leading-6 text-gray-700 dark:text-gray-300">
<p className="text-default text-sm font-normal leading-6 dark:text-gray-300">
{t("sso_oidc_description")}
</p>
</div>
@@ -89,10 +89,10 @@ const CreateConnectionDialog = ({
});
}}>
<div className="mb-10 mt-1">
<h2 className="font-semi-bold font-cal text-xl tracking-wide text-gray-900">
<h2 className="font-semi-bold font-cal text-emphasis text-xl tracking-wide">
{t("sso_oidc_configuration_title")}
</h2>
<p className="mt-1 mb-5 text-sm text-gray-500">{t("sso_oidc_configuration_description")}</p>
<p className="text-subtle mt-1 mb-5 text-sm">{t("sso_oidc_configuration_description")}</p>
</div>
<div className="space-y-5">
<Controller
@@ -25,7 +25,7 @@ export default function SAMLConnection({
<div className="flex flex-col sm:flex-row">
<div>
<h2 className="font-medium">{t("sso_saml_heading")}</h2>
<p className="text-sm font-normal leading-6 text-gray-700 dark:text-gray-300">
<p className="text-default text-sm font-normal leading-6 dark:text-gray-300">
{t("sso_saml_description")}
</p>
</div>
@@ -83,10 +83,10 @@ const CreateConnectionDialog = ({
});
}}>
<div className="mb-10 mt-1">
<h2 className="font-semi-bold font-cal text-xl tracking-wide text-gray-900">
<h2 className="font-semi-bold font-cal text-emphasis text-xl tracking-wide">
{t("sso_saml_configuration_title")}
</h2>
<p className="mt-1 mb-5 text-sm text-gray-500">{t("sso_saml_configuration_description")}</p>
<p className="text-subtle mt-1 mb-5 text-sm">{t("sso_saml_configuration_description")}</p>
</div>
<Controller
control={form.control}
@@ -41,7 +41,7 @@ const SAMLSSO = () => {
}
return (
<div className="w-full bg-white sm:mx-0 xl:mt-0">
<div className="w-full bg-default sm:mx-0 xl:mt-0">
<Meta title={t("sso_configuration")} description={t("sso_configuration_description")} />
<SSOConfiguration teamId={teamId} />
</div>
@@ -19,7 +19,7 @@ const SAMLSSO = () => {
}, []);
return (
<div className="w-full bg-white sm:mx-0 xl:mt-0">
<div className="w-full bg-default sm:mx-0 xl:mt-0">
<Meta title={t("sso_configuration")} description={t("sso_configuration_description")} />
<SSOConfiguration teamId={null} />
</div>
@@ -4,7 +4,7 @@ import { useChat } from "react-live-chat-loader";
import classNames from "@calcom/lib/classNames";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { Button, showToast } from "@calcom/ui";
import { Button, showToast, TextArea } from "@calcom/ui";
import { FiExternalLink, FiAlertTriangle } from "@calcom/ui/components/icon";
import { useFreshChat } from "../lib/freshchat/FreshChatProvider";
@@ -45,19 +45,19 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
};
return (
<div className="w-full rounded-md border-gray-300 bg-white">
<div className="bg-default border-default w-full rounded-md">
<div className="w-full py-5">
<p className="mb-1 px-5 text-gray-500">{t("resources").toUpperCase()}</p>
<p className="text-subtle mb-1 px-5">{t("resources").toUpperCase()}</p>
<a
onClick={() => onHelpItemSelect()}
href="https://cal.com/docs/"
target="_blank"
className="flex w-full px-5 py-2 pr-4 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900"
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium"
rel="noreferrer">
{t("documentation")}
<FiExternalLink
className={classNames(
"text-gray-400 group-hover:text-gray-500",
"group-hover:text-subtle text-muted",
"ml-1 mt-px h-4 w-4 flex-shrink-0 ltr:mr-3"
)}
/>
@@ -67,17 +67,12 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
</div>
</div>
<hr className="bg-gray-200 " />
<hr className="border-muted" />
<div className="w-full p-5">
<p className="mb-1 text-gray-500">{t("feedback").toUpperCase()}</p>
<p className="flex w-full py-2 text-sm font-medium text-gray-700">{t("comments")}</p>
<textarea
id="comment"
name="comment"
rows={3}
onChange={(event) => setComment(event.target.value)}
className="my-1 block w-full rounded-sm border-gray-300 py-2 pb-2 text-sm"
/>
<p className="text-subtle mb-1">{t("feedback").toUpperCase()}</p>
<p className="text-default flex w-full py-2 text-sm font-medium">{t("comments")}</p>
<TextArea id="comment" name="comment" rows={3} onChange={(event) => setComment(event.target.value)} />
<div className="my-3 flex justify-end">
<button
@@ -177,7 +172,7 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
</Button>
</div>
{mutation.isError && (
<div className="mb-4 flex bg-red-100 p-4 text-sm text-red-700">
<div className="bg-error mb-4 flex p-4 text-sm text-red-700">
<div className="flex-shrink-0">
<FiAlertTriangle className="h-5 w-5" />
</div>
@@ -188,10 +183,10 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
</div>
)}
</div>
<div className="w-full bg-neutral-50 p-5 text-gray-500">
<div className="text-subtle bg-muted w-full p-5">
<p className="">{t("specific_issue")}</p>
<button
className="font-medium underline hover:text-gray-700"
className="hover:text-emphasis text-defualt font-medium underline"
onClick={() => {
setActive(true);
if (isFreshChatEnabled) {
@@ -209,8 +204,8 @@ export default function HelpMenuItem({ onHelpItemSelect }: HelpMenuItemProps) {
<span> {t("or").toLowerCase()} </span>
<a
onClick={() => onHelpItemSelect()}
className="font-medium underline hover:text-gray-700"
href="https://cal.com/docs/"
className="hover:text-emphasis text-defualt font-medium underline"
href="https://cal.com/docs"
target="_blank"
rel="noreferrer">
{t("browse_our_docs")}
@@ -22,7 +22,7 @@ export default function FreshChatMenuItem(props: FreshChatMenuItemProps) {
setActive(true);
onHelpItemSelect();
}}
className="flex w-full px-5 py-2 pr-4 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900">
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium">
{t("contact_support")}
</button>
</>
@@ -27,7 +27,7 @@ export default function HelpscoutMenuItem(props: HelpscoutMenuItemProps) {
<>
<button
onClick={handleClick}
className="flex w-full px-5 py-2 pr-4 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900">
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium">
{t("contact_support")}
</button>
@@ -19,7 +19,7 @@ export default function IntercomMenuItem(props: IntercomMenuItemProps) {
open();
onHelpItemSelect();
}}
className="flex w-full px-5 py-2 pr-4 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900">
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium">
{t("contact_support")}
</button>
);
@@ -24,7 +24,7 @@ export default function ZendeskMenuItem(props: ZendeskMenuItemProps) {
setActive(true);
onHelpItemSelect();
}}
className="flex w-full px-5 py-2 pr-4 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900">
className="hover:bg-subtle hover:text-emphasis text-default flex w-full px-5 py-2 pr-4 text-sm font-medium">
{t("contact_support")}
</button>
{active && (
@@ -72,7 +72,7 @@ export const AddNewTeamMembersForm = ({
return (
<>
<div>
<ul className="rounded-md border" data-testid="pending-member-list">
<ul className="border-subtle rounded-md border" data-testid="pending-member-list">
{defaultValues.members.map((member, index) => (
<PendingMemberItem key={member.email} member={member} index={index} teamId={teamId} />
))}
@@ -100,7 +100,7 @@ export const AddNewTeamMembersForm = ({
}}
members={defaultValues.members}
/>
<hr className="my-6 border-neutral-200" />
<hr className="border-subtle my-6" />
<Button
EndIcon={FiArrowRight}
className="mt-6 w-full justify-center"
@@ -121,7 +121,7 @@ const AddNewTeamMemberSkeleton = () => {
<SkeletonContainer className="rounded-md border">
<div className="flex w-full justify-between p-4">
<div>
<p className="text-sm font-medium text-gray-900">
<p className="text-emphasis text-sm font-medium">
<SkeletonText className="h-4 w-56" />
</p>
<div className="mt-2.5 w-max">
@@ -170,9 +170,9 @@ const PendingMemberItem = (props: { member: TeamMember; index: number; teamId: n
{member.role === "ADMIN" && <Badge variant="default">{t("admin")}</Badge>}
</div>
{member.username ? (
<p className="text-gray-600">{`${WEBAPP_URL}/${member.username}`}</p>
<p className="text-default">{`${WEBAPP_URL}/${member.username}`}</p>
) : (
<p className="text-gray-600">{t("not_on_cal", { appName: APP_NAME })}</p>
<p className="text-default">{t("not_on_cal", { appName: APP_NAME })}</p>
)}
</div>
</div>
@@ -72,6 +72,7 @@ export const CreateANewTeamForm = () => {
<>
<TextField
className="mt-2"
placeholder="Acme Inc."
name="name"
label={t("team_name")}
defaultValue={value}
@@ -97,6 +98,7 @@ export const CreateANewTeamForm = () => {
<TextField
className="mt-2"
name="slug"
placeholder="acme"
label={t("team_url")}
addOnLeading={`${process.env.NEXT_PUBLIC_WEBSITE_URL?.replace("https://", "")?.replace(
"http://",
@@ -37,12 +37,12 @@ const DisableTeamImpersonation = ({
<h2
className={classNames(
"font-cal mb-0.5 text-sm font-semibold leading-6",
disabled ? "text-gray-400 " : "text-gray-900 "
disabled ? "text-muted " : "text-emphasis "
)}>
{t("user_impersonation_heading")}
</h2>
</div>
<p className={classNames("text-sm leading-5 ", disabled ? "text-gray-300" : "text-gray-600")}>
<p className={classNames("text-sm leading-5 ", disabled ? "text-gray-300" : "text-default")}>
{t("team_impersonation_description")}
</p>
</div>
@@ -1,5 +1,6 @@
import { MembershipRole } from "@prisma/client";
import { SyntheticEvent, useMemo, useState } from "react";
import type { SyntheticEvent } from "react";
import { useMemo, useState } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
@@ -71,14 +72,14 @@ export default function MemberChangeRoleModal(props: {
<>
<div className="mb-4 sm:flex sm:items-start">
<div className="text-center sm:text-left">
<h3 className="text-lg font-medium leading-6 text-gray-900" id="modal-title">
<h3 className="text-emphasis text-lg font-medium leading-6" id="modal-title">
{t("change_member_role")}
</h3>
</div>
</div>
<form onSubmit={changeRole}>
<div className="mb-4">
<label className="mb-2 block text-sm font-medium tracking-wide text-gray-700" htmlFor="role">
<label className="text-default mb-2 block text-sm font-medium tracking-wide" htmlFor="role">
{t("role")}
</label>
{/*<option value="OWNER">{t("owner")}</option> - needs dialog to confirm change of ownership */}
@@ -88,7 +89,7 @@ export default function MemberChangeRoleModal(props: {
value={role}
onChange={(option) => option && setRole(option)}
id="role"
className="mt-1 block w-full rounded-md border-gray-300 text-sm"
className="border-default mt-1 block w-full rounded-md text-sm"
/>
</div>
{errorMessage && (
@@ -1,4 +1,4 @@
import { MembershipRole } from "@prisma/client";
import type { MembershipRole } from "@prisma/client";
import { Trans } from "next-i18next";
import { useMemo } from "react";
import { Controller, useForm } from "react-hook-form";
@@ -17,7 +17,7 @@ import {
ToggleGroup,
} from "@calcom/ui";
import { PendingMember } from "../lib/types";
import type { PendingMember } from "../lib/types";
type MemberInvitationModalProps = {
isOpen: boolean;
@@ -69,9 +69,9 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
title={t("invite_new_member")}
description={
IS_TEAM_BILLING_ENABLED ? (
<span className="text-sm leading-tight text-gray-500">
<span className="text-subtle text-sm leading-tight">
<Trans i18nKey="invite_new_member_description">
Note: This will <span className="font-medium text-gray-900">cost an extra seat ($15/m)</span>{" "}
Note: This will <span className="text-emphasis font-medium">cost an extra seat ($15/m)</span>{" "}
on your subscription.
</Trans>
</span>
@@ -108,7 +108,7 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
defaultValue={options[0].value}
render={({ field: { onChange } }) => (
<div>
<Label className="font-medium text-gray-900" htmlFor="role">
<Label className="text-emphasis font-medium" htmlFor="role">
{t("role")}
</Label>
<ToggleGroup
@@ -110,25 +110,22 @@ export default function MemberListItem(props: Props) {
<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>
<span className="text-default mr-1 text-sm font-bold leading-4">{name}</span>
{!props.member.accepted && <TeamPill color="orange" text={t("pending")} />}
{props.member.role && <TeamRole role={props.member.role} />}
</div>
<div className="flex items-center">
<span
className="block text-sm text-gray-600"
data-testid="member-email"
data-email={props.member.email}>
<div className="text-default flex items-center">
<span className=" block text-sm" data-testid="member-email" data-email={props.member.email}>
{props.member.email}
</span>
{bookingLink && (
<>
<span className="mx-2 block text-gray-600">•</span>
<span className="mx-2 block text-default">•</span>
<a
target="_blank"
href={`${WEBAPP_URL}/${props.member.username}`}
className="block text-sm text-gray-600">
className="block text-sm text-default">
{bookingLink}
</a>
</>
@@ -139,7 +136,7 @@ export default function MemberListItem(props: Props) {
</div>
{props.team.membership.accepted && (
<div className="flex items-center justify-center">
<ButtonGroup combined containerProps={{ className: "border-gray-300 hidden md:flex" }}>
<ButtonGroup combined containerProps={{ className: "border-default hidden md:flex" }}>
{/* TODO: bring availability back. right now its ugly and broken
<Tooltip
content={
@@ -3,7 +3,7 @@ import { SkeletonText } from "@calcom/ui";
function SkeletonLoaderTeamList() {
return (
<>
<ul className="-mx-4 animate-pulse divide-y divide-neutral-200 rounded-md border border-gray-200 bg-white sm:mx-0 sm:overflow-hidden">
<ul className="-mx-4 animate-pulse divide-y divide-neutral-200 rounded-md border border-subtle bg-default sm:mx-0 sm:overflow-hidden">
<SkeletonItem />
<SkeletonItem />
<SkeletonItem />
@@ -2,7 +2,8 @@ import { useEffect, useState } from "react";
import dayjs from "@calcom/dayjs";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { ITimezone } from "@calcom/ui";
import { Avatar, DatePickerField as DatePicker, Select, TimezoneSelect } from "@calcom/ui";
@@ -38,12 +39,12 @@ export default function TeamAvailabilityModal(props: Props) {
className="h-14 w-14 rounded-full"
/>
<div className="inline-block pt-1 ltr:ml-3 rtl:mr-3">
<span className="text-lg font-bold text-gray-700">{props.member?.name}</span>
<span className="-mt-1 block text-sm text-gray-400">{props.member?.email}</span>
<span className="text-default text-lg font-bold">{props.member?.name}</span>
<span className="text-muted -mt-1 block text-sm">{props.member?.email}</span>
</div>
</div>
<div className="flex flex-col">
<span className="font-bold text-gray-600">Date</span>
<span className="text-default font-bold">Date</span>
<DatePicker
date={selectedDate.toDate()}
onDatesChange={(newDate) => {
@@ -52,17 +53,17 @@ export default function TeamAvailabilityModal(props: Props) {
/>
</div>
<div>
<span className="font-bold text-gray-600">Timezone</span>
<span className="text-default font-bold">Timezone</span>
<TimezoneSelect
id="timeZone"
value={selectedTimeZone}
onChange={(timezone) => setSelectedTimeZone(timezone.value)}
classNamePrefix="react-select"
className="react-select-container mt-1 block w-full rounded-sm border border-gray-300 text-sm focus:border-neutral-800 focus:ring-neutral-800"
className="react-select-container border-default mt-1 block w-full rounded-sm border text-sm focus:border-neutral-800 focus:ring-neutral-800"
/>
</div>
<div>
<span className="font-bold text-gray-600">Slot Length</span>
<span className="text-default font-bold">Slot Length</span>
<Select
options={[
{ value: 15, label: "15 minutes" },
@@ -71,7 +72,7 @@ export default function TeamAvailabilityModal(props: Props) {
]}
isSearchable={false}
classNamePrefix="react-select"
className="react-select-container focus:ring-primary-500 focus:border-primary-500 block w-full min-w-0 flex-1 rounded-sm border border-gray-300 text-sm"
className="react-select-container focus:ring-primary-500 focus:border-primary-500 border-default block w-full min-w-0 flex-1 rounded-sm border text-sm"
value={{ value: frequency, label: `${frequency} minutes` }}
onChange={(newFrequency) => setFrequency(newFrequency?.value ?? 30)}
/>
@@ -1,10 +1,12 @@
import { CSSProperties, useEffect, useState } from "react";
import type { CSSProperties } from "react";
import { useEffect, useState } from "react";
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList as List } from "react-window";
import dayjs from "@calcom/dayjs";
import { CAL_URL } from "@calcom/lib/constants";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { ITimezone } from "@calcom/ui";
import { Avatar, DatePickerField as DatePicker, Select, TimezoneSelect } from "@calcom/ui";
@@ -32,7 +34,7 @@ export default function TeamAvailabilityScreen(props: Props) {
if (!member) return <></>;
return (
<div key={member.id} style={style} className="flex border-r border-gray-200 pl-4 ">
<div key={member.id} style={style} className="flex border-r border-subtle pl-4 ">
<TeamAvailabilityTimes
teamId={props.team?.id as number}
memberId={member.id}
@@ -48,8 +50,8 @@ export default function TeamAvailabilityScreen(props: Props) {
className="min-w-10 min-h-10 mt-1 h-10 w-10 rounded-full"
/>
<div className="inline-block overflow-hidden pt-1 ltr:ml-3 rtl:mr-3">
<span className="truncate text-lg font-bold text-gray-700">{member?.name}</span>
<span className="-mt-1 block truncate text-sm text-gray-400">{member?.email}</span>
<span className="text-default truncate text-lg font-bold">{member?.name}</span>
<span className="text-muted -mt-1 block truncate text-sm">{member?.email}</span>
</div>
</div>
}
@@ -59,10 +61,10 @@ export default function TeamAvailabilityScreen(props: Props) {
};
return (
<div className="flex flex-1 flex-col rounded-sm border border-neutral-200 bg-white">
<div className="flex w-full space-x-5 border-b border-gray-200 p-4 rtl:space-x-reverse">
<div className="bg-default flex flex-1 flex-col rounded-sm border border-neutral-200">
<div className="flex w-full space-x-5 border-b border-subtle p-4 rtl:space-x-reverse">
<div className="flex flex-col">
<span className="text-sm font-medium text-gray-700">Date</span>
<span className="text-default text-sm font-medium">Date</span>
<DatePicker
date={selectedDate.toDate()}
className="p-1.5"
@@ -72,17 +74,17 @@ export default function TeamAvailabilityScreen(props: Props) {
/>
</div>
<div className="flex flex-col">
<span className="text-sm font-medium text-gray-700">Timezone</span>
<span className="text-default text-sm font-medium">Timezone</span>
<TimezoneSelect
id="timeZone"
value={selectedTimeZone}
onChange={(timezone) => setSelectedTimeZone(timezone.value)}
classNamePrefix="react-select"
className="react-select-container w-full rounded-sm border border-gray-300 text-sm"
className="react-select-container border-default w-full rounded-sm border text-sm"
/>
</div>
<div className="hidden sm:block">
<span className="text-sm font-medium text-gray-700">Slot Length</span>
<span className="text-default text-sm font-medium">Slot Length</span>
<Select
options={[
{ value: 15, label: "15 minutes" },
@@ -90,7 +92,7 @@ export default function TeamAvailabilityScreen(props: Props) {
{ value: 60, label: "60 minutes" },
]}
isSearchable={false}
className="block w-full min-w-0 flex-1 rounded-sm border border-gray-300 text-sm"
className="border-default block w-full min-w-0 flex-1 rounded-sm border text-sm"
value={{ value: frequency, label: `${frequency} minutes` }}
onChange={(newFrequency) => setFrequency(newFrequency?.value ?? 30)}
/>
@@ -1,8 +1,8 @@
import classNames from "classnames";
import React from "react";
import { ITimezone } from "react-timezone-select";
import type { ITimezone } from "react-timezone-select";
import { Dayjs } from "@calcom/dayjs";
import type { Dayjs } from "@calcom/dayjs";
import getSlots from "@calcom/lib/slots";
import { trpc } from "@calcom/trpc/react";
import { Loader } from "@calcom/ui";
@@ -47,13 +47,13 @@ export default function TeamAvailabilityTimes(props: Props) {
{isLoading && slots.length === 0 && <Loader />}
{!isLoading && slots.length === 0 && (
<div className="flex flex-col items-center justify-center pt-4">
<span className="text-sm text-gray-500">No Available Slots</span>
<span className="text-subtle text-sm">No Available Slots</span>
</div>
)}
{slots.map((slot) => (
<div key={slot.time.format()} className="flex flex-row items-center">
<a
className="min-w-48 border-brand text-bookingdarker hover:bg-brand hover:text-brandcontrast dark:hover:bg-darkmodebrand dark:hover:text-darkmodebrandcontrast dark:text-darkgray-800 mb-2 mr-3 block flex-grow rounded-sm border bg-white py-2 text-center font-medium dark:border-transparent dark:bg-gray-600 dark:hover:border-black dark:hover:bg-black dark:hover:text-white"
className="min-w-48 border-brand-default text-bookingdarker hover:bg-brand hover:text-brandcontrast dark:hover:bg-darkmodebrand dark:hover:text-darkmodebrandcontrast bg-default dark:hover:text-inverted mb-2 mr-3 block flex-grow rounded-sm border py-2 text-center font-medium dark:border-transparent dark:bg-gray-600 dark:hover:border-black dark:hover:bg-black"
data-testid="time">
{slot.time.format("HH:mm")}
</a>
@@ -47,7 +47,7 @@ export default function TeamInviteList(props: Props) {
return (
<div>
<ul className="mb-8 divide-y divide-neutral-200 rounded bg-white">
<ul className="mb-8 divide-y divide-neutral-200 rounded bg-default">
{props.teams.map((team) => (
<TeamInviteListItem
key={team?.id as number}
@@ -68,8 +68,8 @@ export default function TeamInviteListItem(props: Props) {
className=""
/>
<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">
<span className="text-emphasis text-sm font-semibold">{team.name}</span>
<span className="text-default block text-sm leading-5">
{t("invited_by_team", { teamName: team.name, role: t(team.role.toLocaleLowerCase()) })}
</span>
</div>
@@ -77,7 +77,7 @@ export default function TeamInviteListItem(props: Props) {
);
return (
<li className="divide-y rounded-md border border-gray-400 bg-gray-100 px-5 py-4">
<li className="bg-subtle border-emphasis divide-y rounded-md border px-5 py-4">
<div
className={classNames(
"flex items-center justify-between",
@@ -89,7 +89,7 @@ export default function TeamInviteListItem(props: Props) {
<div className="hidden sm:flex">
<Button
type="button"
className="mr-3 border-gray-700"
className="mr-3 border-empthasis"
variant="icon"
color="secondary"
onClick={declineInvite}
@@ -97,7 +97,7 @@ export default function TeamInviteListItem(props: Props) {
/>
<Button
type="button"
className="border-gray-700"
className="border-empthasis"
variant="icon"
color="secondary"
onClick={acceptInvite}
@@ -43,7 +43,7 @@ export default function TeamList(props: Props) {
}
return (
<ul className="mb-2 divide-y divide-neutral-200 rounded border bg-white">
<ul className="bg-default divide-subtle border-subtle mb-2 divide-y rounded border">
{props.teams.map((team) => (
<TeamListItem
key={team?.id as number}
@@ -62,8 +62,8 @@ export default function TeamList(props: Props) {
(team, i) =>
team.role !== "MEMBER" &&
i === 0 && (
<div className="bg-gray-100 p-6">
<h3 className="mb-4 text-sm font-semibold text-gray-900">{t("recommended_next_steps")}</h3>
<div className="bg-subtle p-6">
<h3 className="text-emphasis mb-4 text-sm font-semibold">{t("recommended_next_steps")}</h3>
<div className="grid-col-1 grid gap-2 md:grid-cols-3">
<Card
icon={<FiUserPlus className="h-5 w-5 text-green-700" />}
@@ -75,7 +75,7 @@ export default function TeamList(props: Props) {
child: t("invite"),
}}
/>
{/* @TODO: uncomment once managed event types is live
{/* @TODO: uncomment once managed event types is live
<Card
icon={<FiUnlock className="h-5 w-5 text-blue-700" />}
variant="basic"
@@ -106,8 +106,8 @@ export default function TeamListItem(props: Props) {
className="inline-flex justify-center"
/>
<div className="inline-block ltr:ml-3 rtl:mr-3">
<span className="text-sm font-bold text-gray-700">{team.name}</span>
<span className="block text-xs text-gray-400">
<span className="text-default text-sm font-bold">{team.name}</span>
<span className="text-muted block text-xs">
{team.slug ? `${process.env.NEXT_PUBLIC_WEBSITE_URL}/team/${team.slug}` : "Unpublished team"}
</span>
</div>
@@ -132,11 +132,7 @@ export default function TeamListItem(props: Props) {
}}
members={teamQuery?.data?.members || []}
/>
<div
className={classNames(
"flex items-center justify-between",
!isInvitee && "group hover:bg-neutral-50"
)}>
<div className={classNames("flex items-center justify-between", !isInvitee && "hover:bg-muted group")}>
{!isInvitee ? (
<Link
href={"/settings/teams/" + team.id + "/profile"}
@@ -14,10 +14,10 @@ export default function TeamPill(props: Props) {
return (
<div
className={classNames("text-medium self-center rounded-md px-1 py-0.5 text-xs ltr:mr-1 rtl:ml-1", {
" bg-gray-100 text-gray-800": !props.color,
" bg-blue-100 text-blue-800": props.color === "blue",
" bg-red-100 text-red-800 ": props.color === "red",
" bg-orange-100 text-orange-800": props.color === "orange",
" bg-subtle text-emphasis": !props.color,
" bg-info text-blue-800": props.color === "blue",
" bg-error text-red-800 ": props.color === "red",
" bg-attention text-orange-800": props.color === "orange",
})}>
{props.text}
</div>
@@ -86,10 +86,8 @@ export function TeamsListing() {
}>
<>
{invites.length > 0 && (
<div className="mb-6 rounded-md bg-gray-100 p-5">
<Label className="dark:text-darkgray-900 pb-2 font-semibold text-gray-900">
{t("pending_invites")}
</Label>
<div className="bg-subtle mb-6 rounded-md p-5">
<Label className=" text-emphasis pb-2 font-semibold">{t("pending_invites")}</Label>
<TeamList teams={invites} pending />
</div>
)}
@@ -3,7 +3,8 @@ import { useEffect, useState } from "react";
import dayjs from "@calcom/dayjs";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { ITimezone } from "@calcom/ui";
import { Avatar, DatePicker, Label, Select, TimezoneSelect } from "@calcom/ui";
@@ -42,7 +43,7 @@ export default function TeamAvailabilityModal(props: Props) {
alt={props.member?.name || ""}
/>
<div className="flex items-center justify-center ">
<span className="ml-2 text-base font-semibold leading-4 text-gray-500">
<span className="text-subtle ml-2 text-base font-semibold leading-4">
{props.member?.name}
</span>
</div>
@@ -1,10 +1,12 @@
import { CSSProperties, useEffect, useState } from "react";
import type { CSSProperties } from "react";
import { useEffect, useState } from "react";
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList as List } from "react-window";
import dayjs from "@calcom/dayjs";
import { CAL_URL } from "@calcom/lib/constants";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import type { ITimezone } from "@calcom/ui";
import { Avatar, DatePickerField as DatePicker, Select, TimezoneSelect } from "@calcom/ui";
@@ -32,7 +34,7 @@ export default function TeamAvailabilityScreen(props: Props) {
if (!member) return <></>;
return (
<div key={member.id} style={style} className="flex border-r border-gray-200 pl-4 ">
<div key={member.id} style={style} className="flex border-r border-subtle pl-4 ">
<TeamAvailabilityTimes
teamId={props.team?.id as number}
memberId={member.id}
@@ -48,8 +50,8 @@ export default function TeamAvailabilityScreen(props: Props) {
className="min-w-10 min-h-10 mt-1 h-10 w-10 rounded-full"
/>
<div className="inline-block overflow-hidden pt-1 ltr:ml-3 rtl:mr-3">
<span className="truncate text-lg font-bold text-gray-700">{member?.name}</span>
<span className="-mt-1 block truncate text-sm text-gray-400">{member?.email}</span>
<span className="text-default truncate text-lg font-bold">{member?.name}</span>
<span className="text-muted -mt-1 block truncate text-sm">{member?.email}</span>
</div>
</div>
}
@@ -59,10 +61,10 @@ export default function TeamAvailabilityScreen(props: Props) {
};
return (
<div className="flex flex-1 flex-col rounded-sm border border-neutral-200 bg-white">
<div className="flex w-full space-x-5 border-b border-gray-200 p-4 rtl:space-x-reverse">
<div className="bg-default flex flex-1 flex-col rounded-sm border border-neutral-200">
<div className="flex w-full space-x-5 border-b border-subtle p-4 rtl:space-x-reverse">
<div className="flex flex-col">
<span className="text-sm font-medium text-gray-700">Date</span>
<span className="text-default text-sm font-medium">Date</span>
<DatePicker
date={selectedDate.toDate()}
className="p-1.5"
@@ -72,17 +74,17 @@ export default function TeamAvailabilityScreen(props: Props) {
/>
</div>
<div className="flex flex-col">
<span className="text-sm font-medium text-gray-700">Timezone</span>
<span className="text-default text-sm font-medium">Timezone</span>
<TimezoneSelect
id="timeZone"
value={selectedTimeZone}
onChange={(timezone) => setSelectedTimeZone(timezone.value)}
classNamePrefix="react-select"
className="react-select-container w-full rounded-sm border border-gray-300 text-sm"
className="react-select-container border-default w-full rounded-sm border text-sm"
/>
</div>
<div className="hidden sm:block">
<span className="text-sm font-medium text-gray-700">Slot Length</span>
<span className="text-default text-sm font-medium">Slot Length</span>
<Select
options={[
{ value: 15, label: "15 minutes" },
@@ -90,7 +92,7 @@ export default function TeamAvailabilityScreen(props: Props) {
{ value: 60, label: "60 minutes" },
]}
isSearchable={false}
className="block w-full min-w-0 flex-1 rounded-sm border border-gray-300 text-sm"
className="border-default block w-full min-w-0 flex-1 rounded-sm border text-sm"
value={{ value: frequency, label: `${frequency} minutes` }}
onChange={(newFrequency) => setFrequency(newFrequency?.value ?? 30)}
/>
@@ -52,16 +52,16 @@ export default function TeamAvailabilityTimes(props: Props) {
{isLoading && slots.length === 0 && <SkeletonLoader />}
{!isLoading && slots.length === 0 ? (
<div className="flex flex-col items-center justify-center pt-4">
<span className="text-sm text-gray-500">{t("no_available_slots")}</span>
<span className="text-subtle text-sm">{t("no_available_slots")}</span>
</div>
) : (
<>{!isLoading && <p className="mb-3 text-sm text-gray-600">{t("time_available")}</p>}</>
<>{!isLoading && <p className="text-default mb-3 text-sm">{t("time_available")}</p>}</>
)}
<div className="max-h-[390px] overflow-scroll">
{slots.map((slot) => (
<div key={slot.time.format()} className="flex flex-row items-center ">
<a
className="min-w-48 border-brand text-bookingdarker dark:text-darkgray-800 mb-2 mr-3 block flex-grow rounded-md border bg-white py-2 text-center font-medium dark:border-transparent dark:bg-gray-600 "
className="min-w-48 border-brand-default text-bookingdarker bg-default mb-2 mr-3 block flex-grow rounded-md border py-2 text-center font-medium dark:border-transparent dark:bg-gray-600 "
data-testid="time">
{slot.time.tz(props.selectedTimeZone.toString()).format("HH:mm")}
</a>
@@ -24,7 +24,7 @@ const SkeletonLoader = ({ title, description }: { title: string; description: st
return (
<SkeletonContainer>
<Meta title={title} description={description} />
<div className="mt-6 mb-8 space-y-6 divide-y">
<div className="mt-6 mb-8 space-y-6">
<div className="flex items-center">
<SkeletonButton className="mr-6 h-32 w-48 rounded-md p-5" />
<SkeletonButton className="mr-6 h-32 w-48 rounded-md p-5" />
@@ -106,7 +106,7 @@ const ProfileView = () => {
<div className="mb-6 flex items-center text-sm">
<div>
<p className="font-semibold">{t("theme")}</p>
<p className="text-gray-600">{t("theme_applies_note")}</p>
<p className="text-default">{t("theme_applies_note")}</p>
</div>
</div>
<div className="flex flex-col justify-between sm:flex-row">
@@ -133,11 +133,11 @@ const ProfileView = () => {
/>
</div>
<hr className="my-8 border-gray-200" />
<div className="mb-6 flex items-center text-sm">
<hr className="border-subtle my-8" />
<div className="text-default mb-6 flex items-center text-sm">
<div>
<p className="font-semibold">{t("custom_brand_colors")}</p>
<p className="mt-0.5 leading-5 text-gray-600">{t("customize_your_brand_colors")}</p>
<p className="mt-0.5 leading-5">{t("customize_your_brand_colors")}</p>
</div>
</div>
@@ -148,7 +148,7 @@ const ProfileView = () => {
defaultValue={team.brandColor}
render={() => (
<div>
<p className="mb-2 block text-sm font-medium text-gray-900">{t("light_brand_color")}</p>
<p className="text-emphasis mb-2 block text-sm font-medium">{t("light_brand_color")}</p>
<ColorPicker
defaultValue={team.brandColor}
onChange={(value) => form.setValue("brandColor", value, { shouldDirty: true })}
@@ -162,7 +162,7 @@ const ProfileView = () => {
defaultValue={team.darkBrandColor}
render={() => (
<div className="mt-6 sm:mt-0">
<p className="mb-2 block text-sm font-medium text-gray-900">{t("dark_brand_color")}</p>
<p className="text-emphasis mb-2 block text-sm font-medium">{t("dark_brand_color")}</p>
<ColorPicker
defaultValue={team.darkBrandColor}
onChange={(value) => form.setValue("darkBrandColor", value, { shouldDirty: true })}
@@ -171,15 +171,15 @@ const ProfileView = () => {
)}
/>
</div>
<hr className="my-8 border-gray-200" />
<hr className="border-subtle my-8" />
<div className="flex flex-col gap-8">
<div className="relative flex items-start">
<div className="flex-grow text-sm">
<label htmlFor="hide-branding" className="font-medium text-gray-700">
<label htmlFor="hide-branding" className="text-default font-medium">
{t("disable_cal_branding", { appName: APP_NAME })}
</label>
<p className="text-gray-500">
<p className="text-subtle">
{t("team_disable_cal_branding_description", { appName: APP_NAME })}
</p>
</div>
@@ -202,10 +202,10 @@ const ProfileView = () => {
</div>
<div className="relative flex items-start">
<div className="flex-grow text-sm">
<label htmlFor="hide-branding" className="font-medium text-gray-700">
<label htmlFor="hide-branding" className="text-default font-medium">
{t("hide_book_a_team_member")}
</label>
<p className="text-gray-500">{t("hide_book_a_team_member_description")}</p>
<p className="text-subtle">{t("hide_book_a_team_member_description")}</p>
</div>
<div className="flex-none">
<Controller
@@ -229,8 +229,8 @@ const ProfileView = () => {
</Button>
</Form>
) : (
<div className="rounded-md border border-gray-200 p-5">
<span className="text-sm text-gray-600">{t("only_owner_change")}</span>
<div className="border-subtle rounded-md border p-5">
<span className="text-default text-sm">{t("only_owner_change")}</span>
</div>
)}
</>
@@ -15,7 +15,7 @@ const BillingView = () => {
return (
<>
<Meta title={t("team_billing")} description={t("team_billing_description")} />
<div className="flex flex-col text-sm sm:flex-row">
<div className="text-default flex flex-col text-sm sm:flex-row">
<div>
<h2 className="font-medium">{t("billing_manage_details_title")}</h2>
<p>{t("billing_manage_details_description")}</p>
@@ -97,13 +97,13 @@ const MembersView = () => {
</>
)}
<div>
<ul className="divide-y divide-gray-200 rounded-md border ">
<ul className="divide-subtle border-subtle divide-y rounded-md border ">
{team?.members.map((member) => {
return <MemberListItem key={member.id} team={team} member={member} />;
})}
</ul>
</div>
<hr className="my-8 border-gray-200" />
<hr className="border-subtle my-8" />
{team && session.data && (
<DisableTeamImpersonation
@@ -112,7 +112,7 @@ const MembersView = () => {
disabled={isInviteOpen}
/>
)}
<hr className="my-8 border-gray-200" />
<hr className="border-subtle my-8" />
</div>
{showMemberInvitationModal && team && (
<MemberInvitationModal
@@ -181,7 +181,7 @@ const ProfileView = () => {
/>
</div>
<hr className="my-8 border-gray-200" />
<hr className="border-subtle my-8" />
<Controller
control={form.control}
@@ -226,7 +226,7 @@ const ProfileView = () => {
disableLists
/>
</div>
<p className="mt-2 text-sm text-gray-600">{t("team_description")}</p>
<p className="text-default mt-2 text-sm">{t("team_description")}</p>
<Button color="primary" className="mt-8" type="submit" loading={mutation.isLoading}>
{t("update")}
</Button>
@@ -248,15 +248,15 @@ const ProfileView = () => {
<div className="flex">
<div className="flex-grow">
<div>
<Label className="text-black">{t("team_name")}</Label>
<p className="text-sm text-gray-800">{team?.name}</p>
<Label className="text-emphasis">{t("team_name")}</Label>
<p className="text-default text-sm">{team?.name}</p>
</div>
{team && !isBioEmpty && (
<>
<Label className="mt-5 text-black">{t("about")}</Label>
<Label className="text-emphasis mt-5">{t("about")}</Label>
<div
className="dark:text-darkgray-600 text-sm text-gray-500 [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
dangerouslySetInnerHTML={{ __html: team.safeBio || "" }}
className=" text-subtle text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
dangerouslySetInnerHTML={{ __html: md.render(team.bio || "") }}
/>
</>
)}
@@ -276,9 +276,9 @@ const ProfileView = () => {
</div>
</div>
)}
<hr className="my-8 border border-gray-200" />
<hr className="border-subtle my-8 border" />
<div className="mb-3 text-base font-semibold">{t("danger_zone")}</div>
<div className="text-default mb-3 text-base font-semibold">{t("danger_zone")}</div>
{team?.membership.role === "OWNER" ? (
<Dialog>
<DialogTrigger asChild>
@@ -127,9 +127,7 @@ const ViewRecordingsList = ({ roomName, hasPaidPlan }: { roomName: string; hasPa
<h1 className="text-sm font-semibold">
{t("recording")} {index + 1}
</h1>
<p className="text-sm font-normal text-gray-500">
{convertSecondsToMs(recording.duration)}
</p>
<p className="text-subtle text-sm font-normal">{convertSecondsToMs(recording.duration)}</p>
</div>
{hasPaidPlan ? (
<Button
Loaded 100 of 345 files, more files were not shown because too many files have changed in this diff. Show more