chore: remove storybook (#19659)

* remove storybook

* remove storybook trpc provider

* add user-event

* fix lockk file

---------

Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
sean-brydonandBailey Pumfleet authored and GitHub committed 2025-03-04 14:14:56 -07:00
1 parent fff521e171
commit d38b35b626
79 files changed
+8751 -9265

No files matched your search

@@ -1,24 +0,0 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Title, CustomArgsTable } from "@calcom/storybook/components";
import { VerifyCodeDialog } from "./VerifyCodeDialog";
import * as VerifyCodeDialogStories from "./VerifyCodeDialog.stories";
<Meta of={VerifyCodeDialogStories} />
<Title title="VerifyCodeDialog" suffix="Brief" subtitle="Version 1.0 — Last Update: 11 Sep 2023" />
## Definition
The `VerifyCodeDialog` component allows users to enter a verification code sent to their email. The component provides feedback in case of an error and can handle different verification processes depending on whether the user session is required.
## Structure
This component contains an input form to capture a 6-digit verification code, error handling UI, and action buttons.
<CustomArgsTable of={VerifyCodeDialog} />
{/* ## VerifyCodeDialog Story
<Canvas of={VerifyCodeDialogStories.Default} /> */}
@@ -1,48 +0,0 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { ComponentProps } from "react";
import { StorybookTrpcProvider } from "@calcom/ui";
import { VerifyCodeDialog } from "./VerifyCodeDialog";
type StoryArgs = ComponentProps<typeof VerifyCodeDialog>;
const meta: Meta<StoryArgs> = {
component: VerifyCodeDialog,
title: "Features/VerifyCodeDialog",
argTypes: {
isOpenDialog: { control: "boolean", description: "Indicates whether the dialog is open or not." },
setIsOpenDialog: { action: "setIsOpenDialog", description: "Function to set the dialog state." },
email: { control: "text", description: "Email to which the verification code was sent." },
onSuccess: { action: "onSuccess", description: "Callback function when verification succeeds." },
// onError: { action: "onError", description: "Callback function when verification fails." },
isUserSessionRequiredToVerify: {
control: "boolean",
description: "Indicates if user session is required for verification.",
},
},
decorators: [
(Story) => (
<StorybookTrpcProvider>
<Story />
</StorybookTrpcProvider>
),
],
render: (args) => <VerifyCodeDialog {...args} />,
};
export default meta;
type Story = StoryObj<StoryArgs>;
export const Default: Story = {
name: "Dialog",
args: {
isOpenDialog: true,
email: "[email protected]",
// onError: (err) => {
// if (err.message === "invalid_code") {
// alert("Code provided is invalid");
// }
// },
},
};
@@ -1,13 +0,0 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Title } from "@calcom/storybook/components";
import * as EventMetaStories from "./EventMeta.stories";
<Meta of={EventMetaStories} />
<Title title="Event Meta" suffix="Brief" subtitle="Version 2.0 — Last Update: 12 Dec 2022" />
<Canvas of={EventMetaStories.ExampleStory} />
<Canvas of={EventMetaStories.AllVariants} />
@@ -1,67 +0,0 @@
import type { Meta, StoryObj } from "@storybook/react";
import type { ComponentProps } from "react";
import { Examples, Example, VariantsTable, VariantRow } from "@calcom/storybook/components";
import { EventDetails } from "./Details";
import { EventMembers } from "./Members";
import { EventTitle } from "./Title";
import { mockEvent } from "./event.mock";
type StoryArgs = ComponentProps<typeof EventDetails>;
const meta: Meta<StoryArgs> = {
component: EventDetails,
parameters: {
nextjs: {
appDirectory: true,
},
},
title: "Features/Events/Meta",
};
export default meta;
type Story = StoryObj<StoryArgs>;
export const ExampleStory: Story = {
name: "Examples",
render: () => (
<Examples title="Combined event meta block">
<div style={{ maxWidth: 300 }}>
<Example title="Event Title">
<EventTitle>{mockEvent.title}</EventTitle>
</Example>
<Example title="Event Details">
<EventDetails event={mockEvent} />
</Example>
</div>
</Examples>
),
};
export const AllVariants: Story = {
name: "All variants",
render: () => (
<VariantsTable titles={["Event Meta Components"]} columnMinWidth={150}>
<VariantRow variant="">
<div style={{ maxWidth: 300 }}>
<EventMembers
users={mockEvent.users}
schedulingType="COLLECTIVE"
entity={{
considerUnpublished: false,
fromRedirectOfNonOrgLink: true,
teamSlug: null,
name: "Example",
orgSlug: null,
}}
// TODO remove type assertion
profile={{ bookerLayouts: null }}
/>
<EventTitle>Quick catch-up</EventTitle>
<EventDetails event={mockEvent} />
</div>
</VariantRow>
</VariantsTable>
),
};
@@ -1,78 +0,0 @@
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
import {
Examples,
Example,
Title,
VariantsTable,
CustomArgsTable,
VariantRow,
} from "@calcom/storybook/components";
import dayjs from "@calcom/dayjs";
import DatePicker from "./DatePicker";
<Meta title="UI/DatePicker" component={DatePicker} />
<Title title="DatePicker" suffix="Brief" subtitle="Version 1.0 — Last Update: 21 Aug 2023" />
## Definition
DatePicker is a clickable element that allows the user to select a specific date from the available list in the component.
## Structure
DatePicker component offers a complete and customizable element for the user to select a specific date in the calendar.
<CustomArgsTable of={DatePicker} />
<Examples title="DatePicker">
<Example title="Default">
<DatePicker />
</Example>
</Examples>
<Title offset title="DatePicker" suffix="Variants" />
<Canvas>
<Story
name="DatePicker"
args={{
weekStart: 0,
excludedDates: ["2023-08-20", "2023-08-21"],
minDate: dayjs("2023-07-23").utc(),
maxDate: dayjs("2023-08-30").utc(),
selected: dayjs("2023-08-30").utc(),
isPending: false,
onChange: (newDate) => console.log(newDate),
onMonthChange: (newMonth) => console.log(newMonth),
}}
argTypes={{
weekStart: {
control: {
type: "inline-radio",
options: [0, 1, 2, 3, 4, 5, 6],
},
},
selected: {
control: "date"
}
}}>
{({ weekStart, excludedDates, onChange, onMonthChange, minDate, maxDate, selected, isPending }) => (
<VariantsTable titles={["Default"]} columnMinWidth={150}>
<VariantRow variant="Default">
<DatePicker
weekStart={weekStart}
excludedDates={excludedDates}
minDate={dayjs(minDate).utc()}
maxDate={dayjs(maxDate).utc()}
onChange={onChange}
onMonthChange={onMonthChange}
selected={dayjs(selected)}
isPending={isPending}
/>
</VariantRow>
</VariantsTable>
)}
</Story>
</Canvas>
@@ -1,84 +0,0 @@
import { Canvas, Meta, Story } from "@storybook/addon-docs";
import { TooltipProvider } from "@radix-ui/react-tooltip";
import {
Title,
CustomArgsTable,
} from "@calcom/storybook/components";
import { events, blockingDates } from "../_storybookData";
import "../styles/styles.css";
import { Calendar } from "./Calendar";
<Meta title="UI/Calendar" component="calendar" />
<Title title="Calendar" suffix="Brief" subtitle="Version 2.0 — Last Update: 22 Aug 2022" />
## Props
The Args Table below shows you a breakdown of what props can be passed into the Calendar component. All props should have a description to make it self explanatory to see what is going on.
<CustomArgsTable of="calendar" />
## Example
There will be a few examples of how to use the Calendar component to show different usecases.
export const Template = (args) => <TooltipProvider><Calendar {...args} /></TooltipProvider>;
<Canvas>
<Story
name="Customising Start Hour and EndHour"
argTypes={{
startHour: {
control: { type: "number", min: 0, max: 23, step: 1 },
},
endHour: {
control: { type: "number", min: 0, max: 23, step: 1 },
},
}}
args={{
sortEvents: true,
startHour: 8,
endHour: 20,
events: events,
hoverEventDuration: 0,
blockingDates: blockingDates,
}}>
{Template.bind({})}
</Story>
</Canvas>
<Canvas>
<Story
name="Onclick Handlers"
args={{
startHour: 8,
endHour: 17,
hoverEventDuration: 30,
}}
argTypes={{
startHour: {
control: { type: "number", min: 0, max: 23, step: 1 },
},
endHour: {
control: { type: "number", min: 0, max: 23, step: 1 },
},
hoverEventDuration: {
control: { type: "number", min: 0, max: 60, step: 1 },
},
}}>
{({ ...args }) => (
<TooltipProvider>
<Calendar
{...args}
events={events}
onEventClick={(e) => alert(e.title)}
onEmptyCellClick={(date) => alert(date.toString())}
sortEvents
/>
</TooltipProvider>
)}
</Story>
</Canvas>