🧹 One calcom/ui import to rule them all (#5561)

* Removed emptyscreen component v1 version, migrated pages that still used it to v2, and removed v1 of workflow pages and components.

* updated workflow pages imports to remove v2 from path.

* Deleted v1 switch component, deleted v1 api-keys components, deleted old web integrations components that were unused.

* Removed v1 list component.

* Fixed event workflows tab path.

* Fixed import path for button in sandbox page.

* Cleanup and type fixes

* Making explicit indexes

* UI import migrations

* More import fixes

* More import fixes

* Submodule sync

* Type fixes

* Build fixes

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Jeroen Reumkensandzomars authored and GitHub committed 2022-11-22 19:55:25 -07:00
1 parent a36b46bd81
commit ccc2bdd25e
325 files changed
+2152 -5271

No files matched your search

@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantRow } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import {Avatar} from './Avatar';
import {AvatarGroup} from './AvatarGroup';
+3 -2
View File
@@ -1,2 +1,3 @@
export * from "./Avatar";
export * from "./AvatarGroup";
export { Avatar } from "./Avatar";
export type { AvatarProps } from "./Avatar";
export { AvatarGroup } from "./AvatarGroup";
+1 -1
View File
@@ -3,7 +3,7 @@ import { GoPrimitiveDot } from "react-icons/go";
import classNames from "@calcom/lib/classNames";
export const badgeClassNameByVariant = {
const badgeClassNameByVariant = {
default: "bg-orange-100 text-orange-800",
warning: "bg-orange-100 text-orange-800",
orange: "bg-orange-100 text-orange-800",
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable, VariantRow } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import { Badge } from './Badge';
<Meta title="UI/Badge" component={Badge} />
+2 -1
View File
@@ -1 +1,2 @@
export * from "./Badge";
export { Badge } from "./Badge";
export type { BadgeProps } from "./Badge";
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import { Breadcrumb } from './Breadcrumb';
+1 -1
View File
@@ -1 +1 @@
export * from "./Breadcrumb";
export { Breadcrumb, BreadcrumbContainer, BreadcrumbItem } from "./Breadcrumb";
+8 -3
View File
@@ -8,6 +8,8 @@ import { applyStyleToMultipleVariants } from "@calcom/lib/cva";
import Tooltip from "../../v2/core/Tooltip";
type InferredVariantProps = VariantProps<typeof buttonClasses>;
export type ButtonBaseProps = {
/** Action that happens when the button is clicked */
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
@@ -19,7 +21,9 @@ export type ButtonBaseProps = {
/**Tool tip used when icon size is set to small */
tooltip?: string;
flex?: boolean;
} & VariantProps<typeof buttonClasses>;
} & Omit<InferredVariantProps, "color"> & {
color?: NonNullable<InferredVariantProps["color"]>;
};
export type ButtonProps = ButtonBaseProps &
(
@@ -38,7 +42,8 @@ const buttonClasses = cva(
destructive: "",
},
size: {
base: "h-9 px-4 py-2.5 ",
sm: "px-3 py-2 leading-4 rounded-sm" /** For backwards compatibility */,
base: "h-9 px-4 py-2.5 ",
lg: "h-[36px] px-4 py-2.5 ",
icon: "flex justify-center min-h-[36px] min-w-[36px] ",
},
@@ -138,7 +143,7 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
) {
const {
loading = false,
color,
color = "primary",
size,
type = "button",
StartIcon,
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title, VariantsTable, VariantColumn, RowTitles, CustomArgsTable} from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import { Button } from './Button';
+2 -1
View File
@@ -1 +1,2 @@
export * from "./Button";
export { Button } from "./Button";
export type { ButtonBaseProps, ButtonProps } from "./Button";
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantsRow } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import { ButtonGroup} from './ButtonGroup';
import { Button} from '../button/Button';
+1 -1
View File
@@ -1 +1 @@
export * from "./ButtonGroup";
export { ButtonGroup } from "./ButtonGroup";
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable,VariantsRow } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import Checkbox from './Checkbox';
+17 -4
View File
@@ -1,4 +1,17 @@
export * from "./checkbox";
export * from "./inputs/HintOrErrors";
export * from "./inputs/Input";
export * from "./inputs/Label";
export { Checkbox } from "./checkbox";
export { HintsOrErrors } from "./inputs/HintOrErrors";
export {
EmailField,
EmailInput,
FieldsetLegend,
Form,
Input,
InputField,
InputGroupBox,
InputLeading,
PasswordField,
TextArea,
TextAreaField,
TextField,
} from "./inputs/Input";
export { Label } from "./inputs/Label";
+2 -6
View File
@@ -1,16 +1,12 @@
import { forwardRef, ReactElement, ReactNode, Ref, useCallback, useId, useState } from "react";
import React from "react";
import React, { forwardRef, ReactElement, ReactNode, Ref, useCallback, useId, useState } from "react";
import { Eye, EyeOff } from "react-feather";
import { FieldValues, FormProvider, SubmitHandler, useFormContext, UseFormReturn } from "react-hook-form";
import classNames from "@calcom/lib/classNames";
import { getErrorFromUnknown } from "@calcom/lib/errors";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Alert } from "@calcom/ui/v2/core/Alert";
import { Tooltip } from "@calcom/ui/v2/core/Tooltip";
import showToast from "@calcom/ui/v2/core/notifications";
import { Skeleton } from "@calcom/ui/v2/core/skeleton";
import { Alert, showToast, Skeleton, Tooltip } from "../../..";
import { HintsOrErrors } from "./HintOrErrors";
import { Label } from "./Label";
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable, VariantRow,VariantsTable} from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import {InputField} from "./Input"
+25 -6
View File
@@ -1,8 +1,27 @@
export * from "./avatar";
export * from "./badge";
export * from "./breadcrumb";
export * from "./button";
export * from "./buttonGroup";
export * from "./form";
export { Avatar, AvatarGroup } from "./avatar";
export type { AvatarProps } from "./avatar";
export { Badge } from "./badge";
export type { BadgeProps } from "./badge";
export { Breadcrumb, BreadcrumbContainer, BreadcrumbItem } from "./breadcrumb";
export { Button } from "./button";
export type { ButtonBaseProps, ButtonProps } from "./button";
export { ButtonGroup } from "./buttonGroup";
export {
Checkbox,
EmailField,
EmailInput,
FieldsetLegend,
Form,
HintsOrErrors,
Input,
InputField,
InputGroupBox,
InputLeading,
Label,
PasswordField,
TextArea,
TextAreaField,
TextField,
} from "./form";
export { TopBanner } from "./top-banner";
export type { TopBannerProps } from "./top-banner";
@@ -1,6 +1,6 @@
import { Canvas, Meta, Story, ArgsTable } from '@storybook/addon-docs';
import { Examples, Example, Note, Title,CustomArgsTable,VariantsTable, VariantRow } from '@calcom/storybook/components'
import { Icon } from "@calcom/ui/Icon";
import { Icon } from "@calcom/ui";
import { TopBanner } from './TopBanner'
<Meta title="UI/TopBanner" component={TopBanner} />
@@ -63,5 +63,3 @@ Each toast has a state to represent neutral, positive or negative responses.
/>
</Example>
</Examples>