diff --git a/README.md b/README.md index 513a0ff60..8bef8a596 100644 --- a/README.md +++ b/README.md @@ -107,12 +107,11 @@ If you have questions, you are welcome to contact us. One of the best places to ## Ecosystem -| Name | | | -| ----------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| [@toeverything/component](https://github.com/toeverything/design/tree/main/packages/components) | Toeverything Shared Component Resources | | -| [@affine/component](packages/frontend/component) | AFFiNE Component Resources | [![](https://img.shields.io/codecov/c/github/toeverything/affine?style=flat-square)](https://affine-storybook.vercel.app/) | -| [@toeverything/y-indexeddb](packages/common/y-indexeddb) | IndexedDB database adapter for Yjs | [![](https://img.shields.io/npm/dm/@toeverything/y-indexeddb?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/y-indexeddb) | -| [@toeverything/theme](packages/common/theme) | AFFiNE theme | [![](https://img.shields.io/npm/dm/@toeverything/theme?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/theme) | +| Name | | | +| -------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| [@affine/component](packages/frontend/component) | AFFiNE Component Resources | [![](https://img.shields.io/codecov/c/github/toeverything/affine?style=flat-square)](https://affine-storybook.vercel.app/) | +| [@toeverything/y-indexeddb](packages/common/y-indexeddb) | IndexedDB database adapter for Yjs | [![](https://img.shields.io/npm/dm/@toeverything/y-indexeddb?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/y-indexeddb) | +| [@toeverything/theme](packages/common/theme) | AFFiNE theme | [![](https://img.shields.io/npm/dm/@toeverything/theme?style=flat-square&color=eee)](https://www.npmjs.com/package/@toeverything/theme) | ## Plugins diff --git a/packages/frontend/component/package.json b/packages/frontend/component/package.json index 717ee513f..161fd3d70 100644 --- a/packages/frontend/component/package.json +++ b/packages/frontend/component/package.json @@ -5,6 +5,7 @@ "exports": { ".": "./src/index.ts", "./theme/*": "./src/theme/*", + "./ui/*": "./src/ui/*/index.ts", "./*": "./src/components/*/index.tsx" }, "peerDependencies": { diff --git a/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx b/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx index 3a9eea2ef..ea251d895 100644 --- a/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx +++ b/packages/frontend/component/src/components/affine-banner/local-demo-tips.tsx @@ -1,5 +1,5 @@ +import { Button, IconButton } from '@affine/component/ui/button'; import { CloseIcon } from '@blocksuite/icons'; -import { Button, IconButton } from '@toeverything/components/button'; import { useCallback } from 'react'; import * as styles from './index.css'; diff --git a/packages/frontend/component/src/components/app-sidebar/app-updater-button/index.tsx b/packages/frontend/component/src/components/app-sidebar/app-updater-button/index.tsx index 4d7a442c8..d1c51a3b6 100644 --- a/packages/frontend/component/src/components/app-sidebar/app-updater-button/index.tsx +++ b/packages/frontend/component/src/components/app-sidebar/app-updater-button/index.tsx @@ -1,7 +1,6 @@ import { Unreachable } from '@affine/env/constant'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { CloseIcon, NewIcon, ResetIcon } from '@blocksuite/icons'; -import { Tooltip } from '@toeverything/components/tooltip'; import { changelogCheckedAtom, currentChangelogUnreadAtom, @@ -15,6 +14,7 @@ import clsx from 'clsx'; import { useAtomValue, useSetAtom } from 'jotai'; import { startTransition, useCallback } from 'react'; +import { Tooltip } from '../../../ui/tooltip'; import * as styles from './index.css'; export interface AddPageButtonPureProps { diff --git a/packages/frontend/component/src/components/app-sidebar/sidebar-header/index.tsx b/packages/frontend/component/src/components/app-sidebar/sidebar-header/index.tsx index 539231831..09c0e5491 100644 --- a/packages/frontend/component/src/components/app-sidebar/sidebar-header/index.tsx +++ b/packages/frontend/component/src/components/app-sidebar/sidebar-header/index.tsx @@ -1,10 +1,10 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useAtomValue } from 'jotai'; import { useMemo } from 'react'; +import { IconButton } from '../../../ui/button'; +import { Tooltip } from '../../../ui/tooltip'; import type { History } from '..'; import { navHeaderButton, diff --git a/packages/frontend/component/src/components/app-sidebar/sidebar-header/sidebar-switch.tsx b/packages/frontend/component/src/components/app-sidebar/sidebar-header/sidebar-switch.tsx index e4210e65a..d8fe62a8d 100644 --- a/packages/frontend/component/src/components/app-sidebar/sidebar-header/sidebar-switch.tsx +++ b/packages/frontend/component/src/components/app-sidebar/sidebar-header/sidebar-switch.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { SidebarIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useAtom } from 'jotai'; +import { IconButton } from '../../../ui/button'; +import { Tooltip } from '../../../ui/tooltip'; import { appSidebarOpenAtom } from '../index.jotai'; import * as styles from './sidebar-switch.css'; diff --git a/packages/frontend/component/src/components/auth-components/back-button.tsx b/packages/frontend/component/src/components/auth-components/back-button.tsx index a63d41790..129116017 100644 --- a/packages/frontend/component/src/components/auth-components/back-button.tsx +++ b/packages/frontend/component/src/components/auth-components/back-button.tsx @@ -1,8 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowLeftSmallIcon } from '@blocksuite/icons'; -import { Button, type ButtonProps } from '@toeverything/components/button'; import { type FC } from 'react'; +import { Button, type ButtonProps } from '../../ui/button'; + export const BackButton: FC = props => { const t = useAFFiNEI18N(); return ( diff --git a/packages/frontend/component/src/components/auth-components/change-email-page.tsx b/packages/frontend/component/src/components/auth-components/change-email-page.tsx index c39ccb7b3..e8560c2df 100644 --- a/packages/frontend/component/src/components/auth-components/change-email-page.tsx +++ b/packages/frontend/component/src/components/auth-components/change-email-page.tsx @@ -1,7 +1,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useCallback, useState } from 'react'; +import { Button } from '../../ui/button'; import { AuthInput } from './auth-input'; import { AuthPageContainer } from './auth-page-container'; import { emailRegex } from './utils'; diff --git a/packages/frontend/component/src/components/auth-components/change-password-page.tsx b/packages/frontend/component/src/components/auth-components/change-password-page.tsx index 95aa6e72e..cb11b6898 100644 --- a/packages/frontend/component/src/components/auth-components/change-password-page.tsx +++ b/packages/frontend/component/src/components/auth-components/change-password-page.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useSetAtom } from 'jotai'; import type { FC } from 'react'; import { useCallback, useState } from 'react'; +import { Button } from '../../ui/button'; import { pushNotificationAtom } from '../notification-center'; import { AuthPageContainer } from './auth-page-container'; import { SetPassword } from './set-password'; diff --git a/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx b/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx index baafb0c95..bd4949533 100644 --- a/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx +++ b/packages/frontend/component/src/components/auth-components/confirm-change-email.tsx @@ -1,7 +1,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import type { FC } from 'react'; +import { Button } from '../../ui/button'; import { AuthPageContainer } from './auth-page-container'; export const ConfirmChangeEmail: FC<{ diff --git a/packages/frontend/component/src/components/auth-components/modal.tsx b/packages/frontend/component/src/components/auth-components/modal.tsx index 44baa65a2..856196380 100644 --- a/packages/frontend/component/src/components/auth-components/modal.tsx +++ b/packages/frontend/component/src/components/auth-components/modal.tsx @@ -1,6 +1,7 @@ -import { Modal } from '@toeverything/components/modal'; import type { FC, PropsWithChildren } from 'react'; +import { Modal } from '../../ui/modal'; + export type AuthModalProps = { open: boolean; setOpen: (value: boolean) => void; diff --git a/packages/frontend/component/src/components/auth-components/set-password-page.tsx b/packages/frontend/component/src/components/auth-components/set-password-page.tsx index d420533d7..09639d596 100644 --- a/packages/frontend/component/src/components/auth-components/set-password-page.tsx +++ b/packages/frontend/component/src/components/auth-components/set-password-page.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useSetAtom } from 'jotai'; import type { FC } from 'react'; import { useCallback, useState } from 'react'; +import { Button } from '../../ui/button'; import { pushNotificationAtom } from '../notification-center'; import { AuthPageContainer } from './auth-page-container'; import { SetPassword } from './set-password'; diff --git a/packages/frontend/component/src/components/auth-components/set-password.tsx b/packages/frontend/component/src/components/auth-components/set-password.tsx index 579950d1e..42e4a9ed3 100644 --- a/packages/frontend/component/src/components/auth-components/set-password.tsx +++ b/packages/frontend/component/src/components/auth-components/set-password.tsx @@ -1,7 +1,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { type FC, useCallback, useRef, useState } from 'react'; +import { Button } from '../../ui/button'; import { Wrapper } from '../../ui/layout'; import { PasswordInput } from './password-input'; diff --git a/packages/frontend/component/src/components/auth-components/sign-in-success-page.tsx b/packages/frontend/component/src/components/auth-components/sign-in-success-page.tsx index 807269d8a..37b0083e8 100644 --- a/packages/frontend/component/src/components/auth-components/sign-in-success-page.tsx +++ b/packages/frontend/component/src/components/auth-components/sign-in-success-page.tsx @@ -1,7 +1,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import type { FC } from 'react'; +import { Button } from '../../ui/button'; import { AuthPageContainer } from './auth-page-container'; export const SignInSuccessPage: FC<{ diff --git a/packages/frontend/component/src/components/auth-components/sign-up-page.tsx b/packages/frontend/component/src/components/auth-components/sign-up-page.tsx index 7fb6eba91..684b6cdd9 100644 --- a/packages/frontend/component/src/components/auth-components/sign-up-page.tsx +++ b/packages/frontend/component/src/components/auth-components/sign-up-page.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useSetAtom } from 'jotai'; import type { FC } from 'react'; import { useCallback, useState } from 'react'; +import { Button } from '../../ui/button'; import { pushNotificationAtom } from '../notification-center'; import { AuthPageContainer } from './auth-page-container'; import { SetPassword } from './set-password'; diff --git a/packages/frontend/component/src/components/card/workspace-card/index.tsx b/packages/frontend/component/src/components/card/workspace-card/index.tsx index 3df908a3f..a8d6049a9 100644 --- a/packages/frontend/component/src/components/card/workspace-card/index.tsx +++ b/packages/frontend/component/src/components/card/workspace-card/index.tsx @@ -2,16 +2,16 @@ import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import type { RootWorkspaceMetadata } from '@affine/workspace/atom'; import { CollaborationIcon, SettingsIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Divider } from '@toeverything/components/divider'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useBlockSuiteWorkspaceAvatarUrl } from '@toeverything/hooks/use-block-suite-workspace-avatar-url'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { getBlockSuiteWorkspaceAtom } from '@toeverything/infra/__internal__/workspace'; import { useAtomValue } from 'jotai/react'; import { useCallback } from 'react'; +import { Avatar } from '../../../ui/avatar'; +import { Divider } from '../../../ui/divider'; import { Skeleton } from '../../../ui/skeleton'; +import { Tooltip } from '../../../ui/tooltip'; import { StyledCard, StyledIconContainer, diff --git a/packages/frontend/component/src/components/card/workspace-card/styles.ts b/packages/frontend/component/src/components/card/workspace-card/styles.ts index bd1d64500..46d48c2de 100644 --- a/packages/frontend/component/src/components/card/workspace-card/styles.ts +++ b/packages/frontend/component/src/components/card/workspace-card/styles.ts @@ -1,6 +1,5 @@ -import { IconButton } from '@toeverything/components/button'; - import { displayFlex, styled, textEllipsis } from '../../../styles'; +import { IconButton } from '../../../ui/button'; export const StyledWorkspaceInfo = styled('div')(() => { return { diff --git a/packages/frontend/component/src/components/disable-public-link/index.tsx b/packages/frontend/component/src/components/disable-public-link/index.tsx index 5402eff74..0b4868f82 100644 --- a/packages/frontend/component/src/components/disable-public-link/index.tsx +++ b/packages/frontend/component/src/components/disable-public-link/index.tsx @@ -1,8 +1,6 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { - ConfirmModal, - type ConfirmModalProps, -} from '@toeverything/components/modal'; + +import { ConfirmModal, type ConfirmModalProps } from '../../ui/modal'; export const PublicLinkDisableModal = (props: ConfirmModalProps) => { const t = useAFFiNEI18N(); diff --git a/packages/frontend/component/src/components/import-page/index.tsx b/packages/frontend/component/src/components/import-page/index.tsx index 66563ba8d..53784b1af 100644 --- a/packages/frontend/component/src/components/import-page/index.tsx +++ b/packages/frontend/component/src/components/import-page/index.tsx @@ -6,9 +6,9 @@ import { NewIcon, NotionIcon, } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; +import { IconButton } from '../../ui/button'; +import { Tooltip } from '../../ui/tooltip'; import { BlockCard } from '../card/block-card'; import { importPageBodyStyle, diff --git a/packages/frontend/component/src/components/member-components/accept-invite-page.tsx b/packages/frontend/component/src/components/member-components/accept-invite-page.tsx index 574a19a8e..03cae33da 100644 --- a/packages/frontend/component/src/components/member-components/accept-invite-page.tsx +++ b/packages/frontend/component/src/components/member-components/accept-invite-page.tsx @@ -1,9 +1,9 @@ import { AuthPageContainer } from '@affine/component/auth-components'; import { type GetInviteInfoQuery } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Avatar } from '@toeverything/components/avatar'; -import { Button } from '@toeverything/components/button'; +import { Avatar } from '../../ui/avatar'; +import { Button } from '../../ui/button'; import { FlexWrapper } from '../../ui/layout'; import * as styles from './styles.css'; export const AcceptInvitePage = ({ diff --git a/packages/frontend/component/src/components/member-components/invite-modal.tsx b/packages/frontend/component/src/components/member-components/invite-modal.tsx index 9371a50a7..920671319 100644 --- a/packages/frontend/component/src/components/member-components/invite-modal.tsx +++ b/packages/frontend/component/src/components/member-components/invite-modal.tsx @@ -1,8 +1,8 @@ import { Permission } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { ConfirmModal } from '@toeverything/components/modal'; import { useCallback, useEffect, useState } from 'react'; +import { ConfirmModal } from '../../ui/modal'; import { AuthInput } from '..//auth-components'; import { emailRegex } from '..//auth-components/utils'; diff --git a/packages/frontend/component/src/components/not-found-page/not-found-page.tsx b/packages/frontend/component/src/components/not-found-page/not-found-page.tsx index fe3aa2cc0..aad290e81 100644 --- a/packages/frontend/component/src/components/not-found-page/not-found-page.tsx +++ b/packages/frontend/component/src/components/not-found-page/not-found-page.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { SignOutIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Button, IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; +import { Avatar } from '../../ui/avatar'; +import { Button, IconButton } from '../../ui/button'; +import { Tooltip } from '../../ui/tooltip'; import { NotFoundPattern } from './not-found-pattern'; import { largeButtonEffect, diff --git a/packages/frontend/component/src/components/notification-center/index.tsx b/packages/frontend/component/src/components/notification-center/index.tsx index 5574b82a8..73870ad83 100644 --- a/packages/frontend/component/src/components/notification-center/index.tsx +++ b/packages/frontend/component/src/components/notification-center/index.tsx @@ -4,7 +4,6 @@ import { CloseIcon, InformationFillDuotoneIcon } from '@blocksuite/icons'; import * as Toast from '@radix-ui/react-toast'; -import { IconButton } from '@toeverything/components/button'; import clsx from 'clsx'; import { useAtom, useAtomValue, useSetAtom } from 'jotai'; import type { ReactNode } from 'react'; @@ -17,6 +16,7 @@ import { useState, } from 'react'; +import { IconButton } from '../../ui/button'; import { SuccessIcon } from './icons'; import * as styles from './index.css'; import type { Notification } from './index.jotai'; diff --git a/packages/frontend/component/src/components/page-list/components/favorite-tag.tsx b/packages/frontend/component/src/components/page-list/components/favorite-tag.tsx index 7256ff2e1..b035f6811 100644 --- a/packages/frontend/component/src/components/page-list/components/favorite-tag.tsx +++ b/packages/frontend/component/src/components/page-list/components/favorite-tag.tsx @@ -1,13 +1,10 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { FavoritedIcon, FavoriteIcon } from '@blocksuite/icons'; -import { - IconButton, - type IconButtonProps, -} from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import Lottie from 'lottie-react'; import { forwardRef, useCallback, useState } from 'react'; +import { IconButton, type IconButtonProps } from '../../../ui/button'; +import { Tooltip } from '../../../ui/tooltip'; import favoritedAnimation from './favorited-animation/data.json'; export const FavoriteTag = forwardRef< diff --git a/packages/frontend/component/src/components/page-list/components/new-page-buttton.tsx b/packages/frontend/component/src/components/page-list/components/new-page-buttton.tsx index 613277af2..5267b25b2 100644 --- a/packages/frontend/component/src/components/page-list/components/new-page-buttton.tsx +++ b/packages/frontend/component/src/components/page-list/components/new-page-buttton.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { EdgelessIcon, ImportIcon, PageIcon } from '@blocksuite/icons'; -import { Menu } from '@toeverything/components/menu'; import { type PropsWithChildren, useCallback, useState } from 'react'; import { DropdownButton } from '../../../ui/button'; +import { Menu } from '../../../ui/menu'; import { BlockCard } from '../../card/block-card'; import { menuContent } from './new-page-button.css'; diff --git a/packages/frontend/component/src/components/page-list/filter/condition.tsx b/packages/frontend/component/src/components/page-list/filter/condition.tsx index 462223c95..76db43323 100644 --- a/packages/frontend/component/src/components/page-list/filter/condition.tsx +++ b/packages/frontend/component/src/components/page-list/filter/condition.tsx @@ -1,9 +1,9 @@ import type { Filter, Literal } from '@affine/env/filter'; import type { PropertiesMeta } from '@affine/env/filter'; -import { Menu, MenuItem } from '@toeverything/components/menu'; import type { ReactNode } from 'react'; import { useMemo } from 'react'; +import { Menu, MenuItem } from '../../../ui/menu'; import { FilterTag } from './filter-tag-translation'; import * as styles from './index.css'; import { literalMatcher } from './literal-matcher'; diff --git a/packages/frontend/component/src/components/page-list/filter/filter-list.tsx b/packages/frontend/component/src/components/page-list/filter/filter-list.tsx index 3169814ca..56d8a0078 100644 --- a/packages/frontend/component/src/components/page-list/filter/filter-list.tsx +++ b/packages/frontend/component/src/components/page-list/filter/filter-list.tsx @@ -2,10 +2,10 @@ import type { Filter } from '@affine/env/filter'; import type { PropertiesMeta } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { CloseIcon, PlusIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { IconButton } from '@toeverything/components/button'; -import { Menu } from '@toeverything/components/menu'; +import { Button } from '../../../ui/button'; +import { IconButton } from '../../../ui/button'; +import { Menu } from '../../../ui/menu'; import { Condition } from './condition'; import * as styles from './index.css'; import { CreateFilterMenu } from './vars'; diff --git a/packages/frontend/component/src/components/page-list/filter/multi-select.tsx b/packages/frontend/component/src/components/page-list/filter/multi-select.tsx index 797a24876..84264c6ff 100644 --- a/packages/frontend/component/src/components/page-list/filter/multi-select.tsx +++ b/packages/frontend/component/src/components/page-list/filter/multi-select.tsx @@ -1,7 +1,7 @@ -import { Menu, MenuItem } from '@toeverything/components/menu'; import type { MouseEvent } from 'react'; import { useMemo } from 'react'; +import { Menu, MenuItem } from '../../../ui/menu'; import * as styles from './multi-select.css'; export const MultiSelect = ({ diff --git a/packages/frontend/component/src/components/page-list/filter/vars.tsx b/packages/frontend/component/src/components/page-list/filter/vars.tsx index bf4af661a..8bb53ab57 100644 --- a/packages/frontend/component/src/components/page-list/filter/vars.tsx +++ b/packages/frontend/component/src/components/page-list/filter/vars.tsx @@ -5,14 +5,10 @@ import type { VariableMap, } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { - MenuIcon, - MenuItem, - MenuSeparator, -} from '@toeverything/components/menu'; import dayjs from 'dayjs'; import type { ReactNode } from 'react'; +import { MenuIcon, MenuItem, MenuSeparator } from '../../../ui/menu'; import { FilterTag } from './filter-tag-translation'; import * as styles from './index.css'; import { tBoolean, tDate, tTag } from './logical/custom-type'; diff --git a/packages/frontend/component/src/components/page-list/operation-cell.tsx b/packages/frontend/component/src/components/page-list/operation-cell.tsx index 7e080448b..9dd04a262 100644 --- a/packages/frontend/component/src/components/page-list/operation-cell.tsx +++ b/packages/frontend/component/src/components/page-list/operation-cell.tsx @@ -7,13 +7,13 @@ import { OpenInNewIcon, ResetIcon, } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Menu, MenuIcon, MenuItem } from '@toeverything/components/menu'; -import { ConfirmModal } from '@toeverything/components/modal'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useState } from 'react'; import { Link } from 'react-router-dom'; +import { IconButton } from '../../ui/button'; +import { Menu, MenuIcon, MenuItem } from '../../ui/menu'; +import { ConfirmModal } from '../../ui/modal'; +import { Tooltip } from '../../ui/tooltip'; import { FavoriteTag } from './components/favorite-tag'; import { DisablePublicSharing, MoveToTrash } from './operation-menu-items'; import * as styles from './page-list.css'; diff --git a/packages/frontend/component/src/components/page-list/operation-menu-items/disable-public-sharing.tsx b/packages/frontend/component/src/components/page-list/operation-menu-items/disable-public-sharing.tsx index 296c220db..7456e7221 100644 --- a/packages/frontend/component/src/components/page-list/operation-menu-items/disable-public-sharing.tsx +++ b/packages/frontend/component/src/components/page-list/operation-menu-items/disable-public-sharing.tsx @@ -1,11 +1,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ShareIcon } from '@blocksuite/icons'; -import { - MenuIcon, - MenuItem, - type MenuItemProps, -} from '@toeverything/components/menu'; +import { MenuIcon, MenuItem, type MenuItemProps } from '../../../ui/menu'; import { PublicLinkDisableModal } from '../../disable-public-link'; export const DisablePublicSharing = (props: MenuItemProps) => { diff --git a/packages/frontend/component/src/components/page-list/operation-menu-items/export.tsx b/packages/frontend/component/src/components/page-list/operation-menu-items/export.tsx index a924f71e5..d37bb64a1 100644 --- a/packages/frontend/component/src/components/page-list/operation-menu-items/export.tsx +++ b/packages/frontend/component/src/components/page-list/operation-menu-items/export.tsx @@ -6,9 +6,9 @@ import { ExportToPdfIcon, ExportToPngIcon, } from '@blocksuite/icons'; -import { MenuIcon, MenuItem, MenuSub } from '@toeverything/components/menu'; import { type ReactNode, useMemo } from 'react'; +import { MenuIcon, MenuItem, MenuSub } from '../../../ui/menu'; import { transitionStyle } from './index.css'; interface ExportMenuItemProps { diff --git a/packages/frontend/component/src/components/page-list/operation-menu-items/move-to-trash.tsx b/packages/frontend/component/src/components/page-list/operation-menu-items/move-to-trash.tsx index 973838108..82abf8c15 100644 --- a/packages/frontend/component/src/components/page-list/operation-menu-items/move-to-trash.tsx +++ b/packages/frontend/component/src/components/page-list/operation-menu-items/move-to-trash.tsx @@ -1,14 +1,8 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { DeleteIcon } from '@blocksuite/icons'; -import { - MenuIcon, - MenuItem, - type MenuItemProps, -} from '@toeverything/components/menu'; -import { - ConfirmModal, - type ConfirmModalProps, -} from '@toeverything/components/modal'; + +import { MenuIcon, MenuItem, type MenuItemProps } from '../../../ui/menu'; +import { ConfirmModal, type ConfirmModalProps } from '../../../ui/modal'; export const MoveToTrash = (props: MenuItemProps) => { const t = useAFFiNEI18N(); diff --git a/packages/frontend/component/src/components/page-list/page-tags.tsx b/packages/frontend/component/src/components/page-list/page-tags.tsx index 3fd43ea9d..7fb86e9dc 100644 --- a/packages/frontend/component/src/components/page-list/page-tags.tsx +++ b/packages/frontend/component/src/components/page-list/page-tags.tsx @@ -1,10 +1,10 @@ import type { Tag } from '@affine/env/filter'; import { MoreHorizontalIcon } from '@blocksuite/icons'; -import { Menu } from '@toeverything/components/menu'; import { assignInlineVars } from '@vanilla-extract/dynamic'; import clsx from 'clsx'; import { useMemo } from 'react'; +import { Menu } from '../../ui/menu'; import * as styles from './page-tags.css'; import { stopPropagation } from './utils'; diff --git a/packages/frontend/component/src/components/page-list/view/collection-bar.tsx b/packages/frontend/component/src/components/page-list/view/collection-bar.tsx index 453dafa6a..2b8c10215 100644 --- a/packages/frontend/component/src/components/page-list/view/collection-bar.tsx +++ b/packages/frontend/component/src/components/page-list/view/collection-bar.tsx @@ -2,11 +2,11 @@ import type { DeleteCollectionInfo, PropertiesMeta } from '@affine/env/filter'; import type { GetPageInfoById } from '@affine/env/page-info'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ViewLayersIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import clsx from 'clsx'; import { useState } from 'react'; +import { Button } from '../../../ui/button'; +import { Tooltip } from '../../../ui/tooltip'; import { type CollectionsCRUDAtom, useCollectionManager, diff --git a/packages/frontend/component/src/components/page-list/view/collection-list.tsx b/packages/frontend/component/src/components/page-list/view/collection-list.tsx index 563bef041..80a31205b 100644 --- a/packages/frontend/component/src/components/page-list/view/collection-list.tsx +++ b/packages/frontend/component/src/components/page-list/view/collection-list.tsx @@ -6,11 +6,11 @@ import type { import type { PropertiesMeta } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { FilterIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Menu } from '@toeverything/components/menu'; import { useCallback, useState } from 'react'; +import { Button } from '../../../ui/button'; import { FlexWrapper } from '../../../ui/layout'; +import { Menu } from '../../../ui/menu'; import { CreateFilterMenu } from '../filter/vars'; import type { useCollectionManager } from '../use-collection-manager'; import * as styles from './collection-list.css'; diff --git a/packages/frontend/component/src/components/page-list/view/collection-operations.tsx b/packages/frontend/component/src/components/page-list/view/collection-operations.tsx index c7deb837a..fc2564c81 100644 --- a/packages/frontend/component/src/components/page-list/view/collection-operations.tsx +++ b/packages/frontend/component/src/components/page-list/view/collection-operations.tsx @@ -1,12 +1,6 @@ import type { Collection, DeleteCollectionInfo } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { DeleteIcon, EditIcon, FilterIcon } from '@blocksuite/icons'; -import { - Menu, - MenuIcon, - MenuItem, - type MenuItemProps, -} from '@toeverything/components/menu'; import { type PropsWithChildren, type ReactElement, @@ -14,6 +8,7 @@ import { useMemo, } from 'react'; +import { Menu, MenuIcon, MenuItem, type MenuItemProps } from '../../../ui/menu'; import type { useCollectionManager } from '../use-collection-manager'; import type { AllPageListConfig } from '.'; import * as styles from './collection-operations.css'; diff --git a/packages/frontend/component/src/components/page-list/view/create-collection.tsx b/packages/frontend/component/src/components/page-list/view/create-collection.tsx index a769e1c07..086c449e8 100644 --- a/packages/frontend/component/src/components/page-list/view/create-collection.tsx +++ b/packages/frontend/component/src/components/page-list/view/create-collection.tsx @@ -1,9 +1,9 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; -import { Modal } from '@toeverything/components/modal'; import { useCallback, useMemo, useState } from 'react'; +import { Button } from '../../../ui/button'; import Input from '../../../ui/input'; +import { Modal } from '../../../ui/modal'; import * as styles from './create-collection.css'; export interface CreateCollectionModalProps { diff --git a/packages/frontend/component/src/components/page-list/view/edit-collection/edit-collection.tsx b/packages/frontend/component/src/components/page-list/view/edit-collection/edit-collection.tsx index ad9140386..f789467b8 100644 --- a/packages/frontend/component/src/components/page-list/view/edit-collection/edit-collection.tsx +++ b/packages/frontend/component/src/components/page-list/view/edit-collection/edit-collection.tsx @@ -2,11 +2,11 @@ import type { Collection } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import type { PageMeta, Workspace } from '@blocksuite/store'; import type { DialogContentProps } from '@radix-ui/react-dialog'; -import { Button } from '@toeverything/components/button'; -import { Modal } from '@toeverything/components/modal'; import { type ReactNode, useCallback, useMemo, useState } from 'react'; -import { RadioButton, RadioButtonGroup } from '../../../../ui/button'; +import { RadioButton, RadioButtonGroup } from '../../../../index'; +import { Button } from '../../../../ui/button'; +import { Modal } from '../../../../ui/modal'; import * as styles from './edit-collection.css'; import { PagesMode } from './pages-mode'; import { RulesMode } from './rules-mode'; diff --git a/packages/frontend/component/src/components/page-list/view/edit-collection/hooks.tsx b/packages/frontend/component/src/components/page-list/view/edit-collection/hooks.tsx index 58fde6a7e..b21106f0f 100644 --- a/packages/frontend/component/src/components/page-list/view/edit-collection/hooks.tsx +++ b/packages/frontend/component/src/components/page-list/view/edit-collection/hooks.tsx @@ -1,6 +1,6 @@ -import { Modal } from '@toeverything/components/modal'; import { useCallback, useState } from 'react'; +import { Modal } from '../../../../ui/modal'; import type { AllPageListConfig } from './edit-collection'; import { SelectPage } from './select-page'; export const useSelectPage = ({ diff --git a/packages/frontend/component/src/components/page-list/view/edit-collection/pages-mode.tsx b/packages/frontend/component/src/components/page-list/view/edit-collection/pages-mode.tsx index 4f25b105e..d04a681e0 100644 --- a/packages/frontend/component/src/components/page-list/view/edit-collection/pages-mode.tsx +++ b/packages/frontend/component/src/components/page-list/view/edit-collection/pages-mode.tsx @@ -2,10 +2,10 @@ import type { Collection } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { FilterIcon } from '@blocksuite/icons'; import type { PageMeta } from '@blocksuite/store'; -import { Menu } from '@toeverything/components/menu'; import clsx from 'clsx'; import { type ReactNode, useCallback } from 'react'; +import { Menu } from '../../../../ui/menu'; import { FilterList } from '../../filter/filter-list'; import { VariableSelect } from '../../filter/vars'; import { VirtualizedPageList } from '../../virtualized-page-list'; diff --git a/packages/frontend/component/src/components/page-list/view/edit-collection/select-page.tsx b/packages/frontend/component/src/components/page-list/view/edit-collection/select-page.tsx index f4a4e7ffc..28616a4df 100644 --- a/packages/frontend/component/src/components/page-list/view/edit-collection/select-page.tsx +++ b/packages/frontend/component/src/components/page-list/view/edit-collection/select-page.tsx @@ -1,11 +1,11 @@ import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { FilterIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Menu } from '@toeverything/components/menu'; import clsx from 'clsx'; import { useCallback, useState } from 'react'; +import { Button } from '../../../../ui/button'; +import { Menu } from '../../../../ui/menu'; import { FilterList } from '../../filter'; import { VariableSelect } from '../../filter/vars'; import { VirtualizedPageList } from '../../virtualized-page-list'; diff --git a/packages/frontend/component/src/components/page-list/view/save-as-collection-button.tsx b/packages/frontend/component/src/components/page-list/view/save-as-collection-button.tsx index bcdd35c44..98e7fb423 100644 --- a/packages/frontend/component/src/components/page-list/view/save-as-collection-button.tsx +++ b/packages/frontend/component/src/components/page-list/view/save-as-collection-button.tsx @@ -1,10 +1,10 @@ import type { Collection } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { SaveIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; import { nanoid } from 'nanoid'; import { useCallback } from 'react'; +import { Button } from '../../../ui/button'; import { createEmptyCollection } from '../use-collection-manager'; import { useEditCollectionName } from './use-edit-collection'; diff --git a/packages/frontend/component/src/components/setting-components/storage-progess.tsx b/packages/frontend/component/src/components/setting-components/storage-progess.tsx index e98c56406..174b6c83d 100644 --- a/packages/frontend/component/src/components/setting-components/storage-progess.tsx +++ b/packages/frontend/component/src/components/setting-components/storage-progess.tsx @@ -1,11 +1,11 @@ import { SubscriptionPlan } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import bytes from 'bytes'; import clsx from 'clsx'; import { useMemo } from 'react'; +import { Button } from '../../ui/button'; +import { Tooltip } from '../../ui/tooltip'; import * as styles from './share.css'; export interface StorageProgressProgress { diff --git a/packages/frontend/component/src/components/tour-modal/tour-modal.tsx b/packages/frontend/component/src/components/tour-modal/tour-modal.tsx index 84e51eced..95610743a 100644 --- a/packages/frontend/component/src/components/tour-modal/tour-modal.tsx +++ b/packages/frontend/component/src/components/tour-modal/tour-modal.tsx @@ -1,10 +1,10 @@ /// import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons'; -import { Modal, type ModalProps } from '@toeverything/components/modal'; import clsx from 'clsx'; import { useState } from 'react'; +import { Modal, type ModalProps } from '../../ui/modal'; import editingVideo from './editingVideo.mp4'; import { arrowStyle, diff --git a/packages/frontend/core/package.json b/packages/frontend/core/package.json index fd30a0a01..64ee8a74f 100644 --- a/packages/frontend/core/package.json +++ b/packages/frontend/core/package.json @@ -47,7 +47,6 @@ "@react-hookz/web": "^23.1.0", "@sentry/integrations": "^7.83.0", "@sentry/react": "^7.83.0", - "@toeverything/components": "^0.0.46", "@toeverything/theme": "^0.7.20", "@vanilla-extract/css": "^1.13.0", "@vanilla-extract/dynamic": "^2.0.3", diff --git a/packages/frontend/core/src/app.tsx b/packages/frontend/core/src/app.tsx index be9deb4d5..d7db06564 100644 --- a/packages/frontend/core/src/app.tsx +++ b/packages/frontend/core/src/app.tsx @@ -1,6 +1,5 @@ import '@affine/component/theme/global.css'; import '@affine/component/theme/theme.css'; -import '@toeverything/components/style.css'; import { AffineContext } from '@affine/component/context'; import { GlobalLoading } from '@affine/component/global-loading'; diff --git a/packages/frontend/core/src/bootstrap/plugins/setup.ts b/packages/frontend/core/src/bootstrap/plugins/setup.ts index f89416536..8fc87d11b 100644 --- a/packages/frontend/core/src/bootstrap/plugins/setup.ts +++ b/packages/frontend/core/src/bootstrap/plugins/setup.ts @@ -156,12 +156,8 @@ function createSetupImpl(rootStore: ReturnType) { }, '@blocksuite/global/utils': import('@blocksuite/global/utils'), '@toeverything/infra/atom': import('@toeverything/infra/atom'), - '@toeverything/components/button': import( - '@toeverything/components/button' - ), - '@toeverything/components/tooltip': import( - '@toeverything/components/tooltip' - ), + '@affine/component/ui/button': import('@affine/component/ui/button'), + '@affine/component/ui/tooltip': import('@affine/component/ui/tooltip'), }); // pluginName -> module -> importName -> updater[] diff --git a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx index 2aa22a1f7..fc481979e 100644 --- a/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx +++ b/packages/frontend/core/src/components/affine/affine-error-boundary/error-basic/error-detail.tsx @@ -1,6 +1,6 @@ +import { Button } from '@affine/component/ui/button'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { type FC, diff --git a/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx b/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx index db76cc27b..e9e578d1a 100644 --- a/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx +++ b/packages/frontend/core/src/components/affine/auth/after-sign-in-send-email.tsx @@ -4,9 +4,9 @@ import { CountDownRender, ModalHeader, } from '@affine/component/auth-components'; +import { Button } from '@affine/component/ui/button'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import React, { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx b/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx index 384110462..dd5dd74b4 100644 --- a/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx +++ b/packages/frontend/core/src/components/affine/auth/after-sign-up-send-email.tsx @@ -4,8 +4,8 @@ import { CountDownRender, ModalHeader, } from '@affine/component/auth-components'; +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { type FC, useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/auth/send-email.tsx b/packages/frontend/core/src/components/affine/auth/send-email.tsx index 0b3399c1d..bd0b72dcf 100644 --- a/packages/frontend/core/src/components/affine/auth/send-email.tsx +++ b/packages/frontend/core/src/components/affine/auth/send-email.tsx @@ -6,6 +6,7 @@ import { ModalHeader, } from '@affine/component/auth-components'; import { pushNotificationAtom } from '@affine/component/notification-center'; +import { Button } from '@affine/component/ui/button'; import { sendChangeEmailMutation, sendChangePasswordEmailMutation, @@ -13,7 +14,6 @@ import { } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation } from '@affine/workspace/affine/gql'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useSetAtom } from 'jotai/react'; import { useCallback, useState } from 'react'; diff --git a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx index 9657c850c..8bea5bd67 100644 --- a/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx +++ b/packages/frontend/core/src/components/affine/auth/sign-in-with-password.tsx @@ -4,8 +4,8 @@ import { BackButton, ModalHeader, } from '@affine/component/auth-components'; +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; // eslint-disable-next-line @typescript-eslint/no-restricted-imports import { useSession } from 'next-auth/react'; diff --git a/packages/frontend/core/src/components/affine/auth/sign-in.tsx b/packages/frontend/core/src/components/affine/auth/sign-in.tsx index 93bd0d42b..df4e87d18 100644 --- a/packages/frontend/core/src/components/affine/auth/sign-in.tsx +++ b/packages/frontend/core/src/components/affine/auth/sign-in.tsx @@ -3,12 +3,12 @@ import { CountDownRender, ModalHeader, } from '@affine/component/auth-components'; +import { Button } from '@affine/component/ui/button'; import { type GetUserQuery, getUserQuery } from '@affine/graphql'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation } from '@affine/workspace/affine/gql'; import { ArrowDownBigIcon, GoogleDuotoneIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { GraphQLError } from 'graphql'; import { type FC, useState } from 'react'; diff --git a/packages/frontend/core/src/components/affine/auth/subscription-redirect.tsx b/packages/frontend/core/src/components/affine/auth/subscription-redirect.tsx index 26b720b60..c206883a2 100644 --- a/packages/frontend/core/src/components/affine/auth/subscription-redirect.tsx +++ b/packages/frontend/core/src/components/affine/auth/subscription-redirect.tsx @@ -1,5 +1,7 @@ import { SignUpPage } from '@affine/component/auth-components'; import { AffineShapeIcon } from '@affine/component/page-list'; +import { Button } from '@affine/component/ui/button'; +import { Loading } from '@affine/component/ui/loading'; import type { SubscriptionRecurring } from '@affine/graphql'; import { changePasswordMutation, @@ -8,8 +10,6 @@ import { } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation, useQuery } from '@affine/workspace/affine/gql'; -import { Button } from '@toeverything/components/button'; -import { Loading } from '@toeverything/components/loading'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { nanoid } from 'nanoid'; import { Suspense, useCallback, useEffect, useMemo } from 'react'; diff --git a/packages/frontend/core/src/components/affine/auth/user-plan-button.tsx b/packages/frontend/core/src/components/affine/auth/user-plan-button.tsx index dc1ecfdb2..fdc007828 100644 --- a/packages/frontend/core/src/components/affine/auth/user-plan-button.tsx +++ b/packages/frontend/core/src/components/affine/auth/user-plan-button.tsx @@ -1,6 +1,6 @@ +import { Tooltip } from '@affine/component/ui/tooltip'; import { SubscriptionPlan } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import Tooltip from '@toeverything/components/tooltip'; import { useSetAtom } from 'jotai'; import { useCallback } from 'react'; import { withErrorBoundary } from 'react-error-boundary'; diff --git a/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx b/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx index 0ec4f8920..682da9fa7 100644 --- a/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/create-workspace-modal/index.tsx @@ -1,14 +1,14 @@ import { Input, toast } from '@affine/component'; -import { DebugLogger } from '@affine/debug'; -import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { HelpIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; +import { Button } from '@affine/component/ui/button'; import { ConfirmModal, type ConfirmModalProps, Modal, -} from '@toeverything/components/modal'; -import { Tooltip } from '@toeverything/components/tooltip'; +} from '@affine/component/ui/modal'; +import { Tooltip } from '@affine/component/ui/tooltip'; +import { DebugLogger } from '@affine/debug'; +import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { HelpIcon } from '@blocksuite/icons'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import type { LoadDBFileResult, diff --git a/packages/frontend/core/src/components/affine/enable-affine-cloud-modal/index.tsx b/packages/frontend/core/src/components/affine/enable-affine-cloud-modal/index.tsx index e26990481..441e0a82b 100644 --- a/packages/frontend/core/src/components/affine/enable-affine-cloud-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/enable-affine-cloud-modal/index.tsx @@ -1,8 +1,8 @@ -import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ConfirmModal, type ConfirmModalProps, -} from '@toeverything/components/modal'; +} from '@affine/component/ui/modal'; +import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useSetAtom } from 'jotai'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/language-menu/index.tsx b/packages/frontend/core/src/components/affine/language-menu/index.tsx index 8856057dc..e16b3b4bf 100644 --- a/packages/frontend/core/src/components/affine/language-menu/index.tsx +++ b/packages/frontend/core/src/components/affine/language-menu/index.tsx @@ -1,4 +1,4 @@ -import { Menu, MenuItem, MenuTrigger } from '@toeverything/components/menu'; +import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu'; import { memo, type ReactElement } from 'react'; import { useLanguageHelper } from '../../../hooks/affine/use-language-helper'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx index c076117d2..6632476fa 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/delete/index.tsx @@ -1,12 +1,12 @@ import { Input } from '@affine/component'; +import { + ConfirmModal, + type ConfirmModalProps, +} from '@affine/component/ui/modal'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { - ConfirmModal, - type ConfirmModalProps, -} from '@toeverything/components/modal'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { useCallback, useState } from 'react'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/index.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/index.tsx index 86cd3ce6a..ad27044b7 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/index.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/delete-leave-workspace/index.tsx @@ -1,9 +1,9 @@ import { SettingRow } from '@affine/component/setting-components'; +import { ConfirmModal } from '@affine/component/ui/modal'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowRightSmallIcon } from '@blocksuite/icons'; -import { ConfirmModal } from '@toeverything/components/modal'; import { useCallback, useState } from 'react'; import type { WorkspaceSettingDetailProps } from '../types'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/export.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/export.tsx index 592ccf09c..a74908f90 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/export.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/export.tsx @@ -1,8 +1,8 @@ import { pushNotificationAtom } from '@affine/component/notification-center'; import { SettingRow } from '@affine/component/setting-components'; +import { Button } from '@affine/component/ui/button'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import type { SaveDBFileResult } from '@toeverything/infra/type'; import { useSetAtom } from 'jotai'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/members.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/members.tsx index 5901dce95..f1d5a0add 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/members.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/members.tsx @@ -8,16 +8,16 @@ import { } from '@affine/component/member-components'; import { pushNotificationAtom } from '@affine/component/notification-center'; import { SettingRow } from '@affine/component/setting-components'; +import { Avatar } from '@affine/component/ui/avatar'; +import { Button, IconButton } from '@affine/component/ui/button'; +import { Loading } from '@affine/component/ui/loading'; +import { Menu, MenuItem } from '@affine/component/ui/menu'; +import { Tooltip } from '@affine/component/ui/tooltip'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { Permission, SubscriptionPlan } from '@affine/graphql'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowRightBigIcon, MoreVerticalIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Button, IconButton } from '@toeverything/components/button'; -import { Loading } from '@toeverything/components/loading'; -import { Menu, MenuItem } from '@toeverything/components/menu'; -import { Tooltip } from '@toeverything/components/tooltip'; import clsx from 'clsx'; import { useSetAtom } from 'jotai'; import type { ReactElement } from 'react'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/profile.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/profile.tsx index ef9722ab5..59a06c6ed 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/profile.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/profile.tsx @@ -1,10 +1,10 @@ import { FlexWrapper, Input, Wrapper } from '@affine/component'; import { pushNotificationAtom } from '@affine/component/notification-center'; +import { Avatar } from '@affine/component/ui/avatar'; +import { Button } from '@affine/component/ui/button'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { CameraIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Button } from '@toeverything/components/button'; import { useBlockSuiteWorkspaceAvatarUrl } from '@toeverything/hooks/use-block-suite-workspace-avatar-url'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { useSetAtom } from 'jotai'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/publish.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/publish.tsx index 95652cdd9..f7869905f 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/publish.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/publish.tsx @@ -1,5 +1,7 @@ import { FlexWrapper, Input, Switch } from '@affine/component'; import { SettingRow } from '@affine/component/setting-components'; +import { Button } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { Unreachable } from '@affine/env/constant'; import type { AffineCloudWorkspace, @@ -9,8 +11,6 @@ import type { import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { noop } from 'foxact/noop'; diff --git a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/storage.tsx b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/storage.tsx index afe7b918f..9c6ac0887 100644 --- a/packages/frontend/core/src/components/affine/new-workspace-setting-detail/storage.tsx +++ b/packages/frontend/core/src/components/affine/new-workspace-setting-detail/storage.tsx @@ -1,9 +1,9 @@ import { FlexWrapper, toast } from '@affine/component'; import { SettingRow } from '@affine/component/setting-components'; +import { Button } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import type { AffineOfficialWorkspace } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import type { MoveDBFileResult } from '@toeverything/infra/type'; import { useMemo } from 'react'; import { useCallback, useEffect, useState } from 'react'; diff --git a/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx b/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx index 8eb7150e8..c78d85602 100644 --- a/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx +++ b/packages/frontend/core/src/components/affine/page-history-modal/history-modal.tsx @@ -3,12 +3,12 @@ import { BlockSuiteEditor, EditorLoading, } from '@affine/component/block-suite-editor'; +import { Button } from '@affine/component/ui/button'; +import { ConfirmModal, Modal } from '@affine/component/ui/modal'; import type { PageMode } from '@affine/core/atoms'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import type { Workspace } from '@blocksuite/store'; import type { DialogContentProps } from '@radix-ui/react-dialog'; -import { Button } from '@toeverything/components/button'; -import { ConfirmModal, Modal } from '@toeverything/components/modal'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useAtom, useAtomValue } from 'jotai'; import { diff --git a/packages/frontend/core/src/components/affine/payment-disable/index.tsx b/packages/frontend/core/src/components/affine/payment-disable/index.tsx index 58a29da3c..869837c7d 100644 --- a/packages/frontend/core/src/components/affine/payment-disable/index.tsx +++ b/packages/frontend/core/src/components/affine/payment-disable/index.tsx @@ -1,5 +1,5 @@ +import { ConfirmModal } from '@affine/component/ui/modal'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { ConfirmModal } from '@toeverything/components/modal'; import { useAtom } from 'jotai'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx index 4d82b3c5d..651dc953d 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/account-setting/index.tsx @@ -5,6 +5,8 @@ import { SettingRow, StorageProgress, } from '@affine/component/setting-components'; +import { Avatar } from '@affine/component/ui/avatar'; +import { Button } from '@affine/component/ui/button'; import { allBlobSizesQuery, removeAvatarMutation, @@ -14,8 +16,6 @@ import { import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation, useQuery } from '@affine/workspace/affine/gql'; import { ArrowRightSmallIcon, CameraIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { validateAndReduceImage } from '@toeverything/hooks/use-block-suite-workspace-avatar-url'; import bytes from 'bytes'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/about/update-check-section.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/about/update-check-section.tsx index 64f615169..4aaef0b70 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/about/update-check-section.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/about/update-check-section.tsx @@ -1,6 +1,6 @@ import { SettingRow } from '@affine/component/setting-components'; +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { downloadProgressAtom, diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/appearance/date-format-setting.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/appearance/date-format-setting.tsx index 1b790e86c..fb1be173a 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/appearance/date-format-setting.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/appearance/date-format-setting.tsx @@ -1,4 +1,4 @@ -import { Menu, MenuItem, MenuTrigger } from '@toeverything/components/menu'; +import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu'; import dayjs from 'dayjs'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx index 48b10075f..8fe1fdda4 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/billing/index.tsx @@ -5,6 +5,8 @@ import { SettingRow, SettingWrapper, } from '@affine/component/setting-components'; +import { Button, IconButton } from '@affine/component/ui/button'; +import { Loading } from '@affine/component/ui/loading'; import { createCustomerPortalMutation, getInvoicesCountQuery, @@ -20,8 +22,6 @@ import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation, useQuery } from '@affine/workspace/affine/gql'; import { ArrowRightSmallIcon } from '@blocksuite/icons'; -import { Button, IconButton } from '@toeverything/components/button'; -import { Loading } from '@toeverything/components/loading'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useSetAtom } from 'jotai'; import { Suspense, useCallback, useMemo, useState } from 'react'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/modals.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/modals.tsx index cd3531ab0..816d364e8 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/modals.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/modals.tsx @@ -1,11 +1,11 @@ -import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { DialogTrigger } from '@radix-ui/react-dialog'; -import { Button } from '@toeverything/components/button'; +import { Button } from '@affine/component/ui/button'; import { ConfirmModal, type ConfirmModalProps, Modal, -} from '@toeverything/components/modal'; +} from '@affine/component/ui/modal'; +import { useAFFiNEI18N } from '@affine/i18n/hooks'; +import { DialogTrigger } from '@radix-ui/react-dialog'; import { type ReactNode, useEffect, useRef } from 'react'; import * as styles from './style.css'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx index f8f415ee6..a160b5da3 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/general-setting/plans/plan-card.tsx @@ -1,3 +1,5 @@ +import { Button } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import type { Subscription, SubscriptionMutator, @@ -13,8 +15,6 @@ import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMutation } from '@affine/workspace/affine/gql'; import { DoneIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useSetAtom } from 'jotai'; import { useAtom } from 'jotai'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/index.tsx index 075a78b32..9651d5a0f 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/index.tsx @@ -1,7 +1,7 @@ import { WorkspaceDetailSkeleton } from '@affine/component/setting-components'; +import { Modal, type ModalProps } from '@affine/component/ui/modal'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ContactWithUsIcon } from '@blocksuite/icons'; -import { Modal, type ModalProps } from '@toeverything/components/modal'; import { debounce } from 'lodash-es'; import { Suspense, useCallback, useLayoutEffect, useRef } from 'react'; diff --git a/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx b/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx index 030b08fcc..a39509437 100644 --- a/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx +++ b/packages/frontend/core/src/components/affine/setting-modal/setting-sidebar/index.tsx @@ -2,13 +2,13 @@ import { WorkspaceListItemSkeleton, WorkspaceListSkeleton, } from '@affine/component/setting-components'; +import { Avatar } from '@affine/component/ui/avatar'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import type { RootWorkspaceMetadata } from '@affine/workspace/atom'; import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom'; import { Logo1Icon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useBlockSuiteWorkspaceAvatarUrl } from '@toeverything/hooks/use-block-suite-workspace-avatar-url'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { getBlockSuiteWorkspaceAtom } from '@toeverything/infra/__internal__/workspace'; diff --git a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-export.tsx b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-export.tsx index e8e081221..2f5895e20 100644 --- a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-export.tsx +++ b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-export.tsx @@ -1,9 +1,9 @@ import { ExportMenuItems } from '@affine/component/page-list'; +import { Button } from '@affine/component/ui/button'; +import { Divider } from '@affine/component/ui/divider'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { LinkIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Divider } from '@toeverything/components/divider'; import { useExportPage } from '../../../../hooks/affine/use-export-page'; import * as styles from './index.css'; diff --git a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-menu.tsx b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-menu.tsx index 9b364cc04..aa8f7df5a 100644 --- a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-menu.tsx +++ b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-menu.tsx @@ -1,3 +1,6 @@ +import { Button } from '@affine/component/ui/button'; +import { Divider } from '@affine/component/ui/divider'; +import { Menu } from '@affine/component/ui/menu'; import { type AffineCloudWorkspace, type AffineOfficialWorkspace, @@ -8,9 +11,6 @@ import { import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { WebIcon } from '@blocksuite/icons'; import type { Page } from '@blocksuite/store'; -import { Button } from '@toeverything/components/button'; -import { Divider } from '@toeverything/components/divider'; -import { Menu } from '@toeverything/components/menu'; import { useIsSharedPage } from '../../../../hooks/affine/use-is-shared-page'; import * as styles from './index.css'; diff --git a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx index 250bd718c..d56c40740 100644 --- a/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx +++ b/packages/frontend/core/src/components/affine/share-page-modal/share-menu/share-page.tsx @@ -6,11 +6,11 @@ import { toast, } from '@affine/component'; import { PublicLinkDisableModal } from '@affine/component/disable-public-link'; +import { Button } from '@affine/component/ui/button'; +import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ArrowRightSmallIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { Menu, MenuItem, MenuTrigger } from '@toeverything/components/menu'; import { useAtomValue } from 'jotai'; import { useMemo, useState } from 'react'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/affine/sign-out-modal/index.tsx b/packages/frontend/core/src/components/affine/sign-out-modal/index.tsx index e53ef9191..032c0972b 100644 --- a/packages/frontend/core/src/components/affine/sign-out-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/sign-out-modal/index.tsx @@ -1,8 +1,8 @@ -import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ConfirmModal, type ConfirmModalProps, -} from '@toeverything/components/modal'; +} from '@affine/component/ui/modal'; +import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { useMemo } from 'react'; type SignOutConfirmModalI18NKeys = diff --git a/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/index.tsx b/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/index.tsx index f581d23da..1d4e7e21f 100644 --- a/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/index.tsx +++ b/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/index.tsx @@ -1,7 +1,7 @@ import { Empty } from '@affine/component'; +import { Modal, type ModalProps } from '@affine/component/ui/modal'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Modal, type ModalProps } from '@toeverything/components/modal'; import { useCallback } from 'react'; import { diff --git a/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/style.ts b/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/style.ts index 24f4adde0..bbc181a3c 100644 --- a/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/style.ts +++ b/packages/frontend/core/src/components/affine/tmp-disable-affine-cloud-modal/style.ts @@ -1,5 +1,5 @@ import { displayFlex, styled } from '@affine/component'; -import { Button } from '@toeverything/components/button'; +import { Button } from '@affine/component/ui/button'; export const Header = styled('div')({ height: '44px', diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx index 2fa9a63ad..f02a7a13b 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-header-title/operation-menu.tsx @@ -1,5 +1,11 @@ import { FlexWrapper } from '@affine/component'; import { Export, MoveToTrash } from '@affine/component/page-list'; +import { + Menu, + MenuIcon, + MenuItem, + MenuSeparator, +} from '@affine/component/ui/menu'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { assertExists } from '@blocksuite/global/utils'; @@ -14,12 +20,6 @@ import { PageIcon, } from '@blocksuite/icons'; import type { PageMeta } from '@blocksuite/store'; -import { - Menu, - MenuIcon, - MenuItem, - MenuSeparator, -} from '@toeverything/components/menu'; import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta'; import { useAtomValue } from 'jotai'; import { useCallback, useRef, useState } from 'react'; diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-mode-switch/index.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-mode-switch/index.tsx index 477fa4be2..c522693ae 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-mode-switch/index.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-mode-switch/index.tsx @@ -1,6 +1,6 @@ +import { Tooltip } from '@affine/component/ui/tooltip'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { assertExists } from '@blocksuite/global/utils'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta'; import { useAtomValue } from 'jotai'; import type { CSSProperties } from 'react'; diff --git a/packages/frontend/core/src/components/bookmark.tsx b/packages/frontend/core/src/components/bookmark.tsx index 0792a71ae..18705f14b 100644 --- a/packages/frontend/core/src/components/bookmark.tsx +++ b/packages/frontend/core/src/components/bookmark.tsx @@ -1,8 +1,8 @@ +import { Menu, MenuItem } from '@affine/component/ui/menu'; import type { SerializedBlock } from '@blocksuite/blocks'; import type { BaseBlockModel } from '@blocksuite/store'; import type { Page } from '@blocksuite/store'; import type { VEditor } from '@blocksuite/virgo'; -import { Menu, MenuItem } from '@toeverything/components/menu'; import { useEffect, useState } from 'react'; import { createPortal } from 'react-dom'; diff --git a/packages/frontend/core/src/components/cloud/login-card.tsx b/packages/frontend/core/src/components/cloud/login-card.tsx index 747139f5c..a871ee339 100644 --- a/packages/frontend/core/src/components/cloud/login-card.tsx +++ b/packages/frontend/core/src/components/cloud/login-card.tsx @@ -1,6 +1,6 @@ +import { Avatar } from '@affine/component/ui/avatar'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { CloudWorkspaceIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useCurrentLoginStatus } from '../../hooks/affine/use-current-login-status'; diff --git a/packages/frontend/core/src/components/cloud/share-header-left-item/user-avatar.tsx b/packages/frontend/core/src/components/cloud/share-header-left-item/user-avatar.tsx index 43558bdd0..e63da0f7e 100644 --- a/packages/frontend/core/src/components/cloud/share-header-left-item/user-avatar.tsx +++ b/packages/frontend/core/src/components/cloud/share-header-left-item/user-avatar.tsx @@ -1,7 +1,7 @@ +import { Avatar } from '@affine/component/ui/avatar'; +import { Menu, MenuIcon, MenuItem } from '@affine/component/ui/menu'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { SignOutIcon } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Menu, MenuIcon, MenuItem } from '@toeverything/components/menu'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useMemo } from 'react'; import { useLocation } from 'react-router-dom'; diff --git a/packages/frontend/core/src/components/cloud/share-header-right-item/authenticated-item.tsx b/packages/frontend/core/src/components/cloud/share-header-right-item/authenticated-item.tsx index f92772336..a12fd6983 100644 --- a/packages/frontend/core/src/components/cloud/share-header-right-item/authenticated-item.tsx +++ b/packages/frontend/core/src/components/cloud/share-header-right-item/authenticated-item.tsx @@ -1,5 +1,5 @@ +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useCurrentUser } from '../../../hooks/affine/use-current-user'; import { useMembers } from '../../../hooks/affine/use-members'; diff --git a/packages/frontend/core/src/components/pure/file-upload/index.tsx b/packages/frontend/core/src/components/pure/file-upload/index.tsx index 76ca15ed0..8d09b530a 100644 --- a/packages/frontend/core/src/components/pure/file-upload/index.tsx +++ b/packages/frontend/core/src/components/pure/file-upload/index.tsx @@ -1,6 +1,6 @@ import { styled } from '@affine/component'; +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import type { ChangeEvent, PropsWithChildren } from 'react'; import { useRef } from 'react'; diff --git a/packages/frontend/core/src/components/pure/header-drop-down-button/index.tsx b/packages/frontend/core/src/components/pure/header-drop-down-button/index.tsx index dc9e1b8c9..8cb02f804 100644 --- a/packages/frontend/core/src/components/pure/header-drop-down-button/index.tsx +++ b/packages/frontend/core/src/components/pure/header-drop-down-button/index.tsx @@ -1,8 +1,5 @@ +import { IconButton, type IconButtonProps } from '@affine/component/ui/button'; import { ArrowDownSmallIcon } from '@blocksuite/icons'; -import { - IconButton, - type IconButtonProps, -} from '@toeverything/components/button'; import { forwardRef } from 'react'; import { headerMenuTrigger } from './styles.css'; diff --git a/packages/frontend/core/src/components/pure/help-island/index.tsx b/packages/frontend/core/src/components/pure/help-island/index.tsx index 714ce1514..a1df89cab 100644 --- a/packages/frontend/core/src/components/pure/help-island/index.tsx +++ b/packages/frontend/core/src/components/pure/help-island/index.tsx @@ -1,6 +1,6 @@ +import { Tooltip } from '@affine/component/ui/tooltip'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { CloseIcon, NewIcon, UserGuideIcon } from '@blocksuite/icons'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useSetAtom } from 'jotai/react'; import { useAtomValue } from 'jotai/react'; import { useCallback, useState } from 'react'; diff --git a/packages/frontend/core/src/components/pure/trash-button-group/index.tsx b/packages/frontend/core/src/components/pure/trash-button-group/index.tsx index f4592d4ea..f80633440 100644 --- a/packages/frontend/core/src/components/pure/trash-button-group/index.tsx +++ b/packages/frontend/core/src/components/pure/trash-button-group/index.tsx @@ -1,10 +1,10 @@ +import { Button } from '@affine/component/ui/button'; +import { ConfirmModal } from '@affine/component/ui/modal'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { WorkspaceSubPath } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { assertExists } from '@blocksuite/global/utils'; import { DeleteIcon, ResetIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; -import { ConfirmModal } from '@toeverything/components/modal'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta'; import { currentPageIdAtom } from '@toeverything/infra/atom'; import { useAtomValue } from 'jotai'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/add-collection-button.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/add-collection-button.tsx index 115784314..9dfc4ee38 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/add-collection-button.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/add-collection-button.tsx @@ -3,9 +3,9 @@ import { useCollectionManager, useEditCollectionName, } from '@affine/component/page-list'; +import { IconButton } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { PlusIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; import { nanoid } from 'nanoid'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx index 1dfa9edf4..277531876 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/collections-list.tsx @@ -10,6 +10,7 @@ import { useCollectionManager, useSavedCollections, } from '@affine/component/page-list'; +import { IconButton } from '@affine/component/ui/button'; import type { Collection, DeleteCollectionInfo } from '@affine/env/filter'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { InformationIcon, MoreHorizontalIcon } from '@blocksuite/icons'; @@ -17,7 +18,6 @@ import type { PageMeta, Workspace } from '@blocksuite/store'; import type { DragEndEvent } from '@dnd-kit/core'; import { useDroppable } from '@dnd-kit/core'; import * as Collapsible from '@radix-ui/react-collapsible'; -import { IconButton } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta'; import { useMemo, useState } from 'react'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/page.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/page.tsx index b4f701580..e50458dfd 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/page.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/collections/page.tsx @@ -1,4 +1,11 @@ import { MenuItem as CollectionItem } from '@affine/component/app-sidebar'; +import { IconButton } from '@affine/component/ui/button'; +import { + Menu, + MenuIcon, + MenuItem, + type MenuItemProps, +} from '@affine/component/ui/menu'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { DeleteIcon, @@ -9,13 +16,6 @@ import { } from '@blocksuite/icons'; import type { PageMeta, Workspace } from '@blocksuite/store'; import * as Collapsible from '@radix-ui/react-collapsible'; -import { IconButton } from '@toeverything/components/button'; -import { - Menu, - MenuIcon, - MenuItem, - type MenuItemProps, -} from '@toeverything/components/menu'; import { useBlockSuitePageReferences } from '@toeverything/hooks/use-block-suite-page-references'; import { useAtomValue } from 'jotai/index'; import type { ReactElement } from 'react'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/favorite/add-favourite-button.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/favorite/add-favourite-button.tsx index 92e04e86b..4db8ff54b 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/favorite/add-favourite-button.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/favorite/add-favourite-button.tsx @@ -1,6 +1,6 @@ +import { IconButton } from '@affine/component/ui/button'; import { PlusIcon } from '@blocksuite/icons'; import type { Workspace } from '@blocksuite/store'; -import { IconButton } from '@toeverything/components/button'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { usePageMetaHelper } from '@toeverything/hooks/use-block-suite-page-meta'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/add-workspace/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/add-workspace/index.tsx index 75f04e46b..52388e8a4 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/add-workspace/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/add-workspace/index.tsx @@ -1,6 +1,6 @@ +import { MenuItem } from '@affine/component/ui/menu'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { ImportIcon, PlusIcon } from '@blocksuite/icons'; -import { MenuItem } from '@toeverything/components/menu'; import * as styles from './index.css'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/index.tsx index b5a452405..ebd70789c 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/index.tsx @@ -1,8 +1,8 @@ +import { Divider } from '@affine/component/ui/divider'; +import { MenuItem } from '@affine/component/ui/menu'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom'; import { Logo1Icon } from '@blocksuite/icons'; -import { Divider } from '@toeverything/components/divider'; -import { MenuItem } from '@toeverything/components/menu'; import { useAtomValue, useSetAtom } from 'jotai'; // eslint-disable-next-line @typescript-eslint/no-restricted-imports import { useSession } from 'next-auth/react'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/user-account/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/user-account/index.tsx index 3e959c669..bb67ce51a 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/user-account/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/user-account/index.tsx @@ -1,12 +1,12 @@ +import { IconButton } from '@affine/component/ui/button'; +import { Divider } from '@affine/component/ui/divider'; +import { Menu, MenuIcon, MenuItem } from '@affine/component/ui/menu'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { AccountIcon, MoreHorizontalIcon, SignOutIcon, } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Divider } from '@toeverything/components/divider'; -import { Menu, MenuIcon, MenuItem } from '@toeverything/components/menu'; import { useSetAtom } from 'jotai'; import { useCallback } from 'react'; diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/workspace-list/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/workspace-list/index.tsx index 9d065ec44..4d4cd25ec 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/workspace-list/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/user-with-workspace-list/workspace-list/index.tsx @@ -1,4 +1,5 @@ import { ScrollableContainer } from '@affine/component'; +import { Divider } from '@affine/component/ui/divider'; import { WorkspaceList } from '@affine/component/workspace-list'; import type { AffineCloudWorkspace, @@ -10,7 +11,6 @@ import type { RootWorkspaceMetadata } from '@affine/workspace/atom'; import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom'; import type { DragEndEvent } from '@dnd-kit/core'; import { arrayMove } from '@dnd-kit/sortable'; -import { Divider } from '@toeverything/components/divider'; import { currentPageIdAtom, currentWorkspaceIdAtom, diff --git a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx index 223a30b02..d34b79e52 100644 --- a/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx +++ b/packages/frontend/core/src/components/pure/workspace-slider-bar/workspace-card/index.tsx @@ -1,3 +1,5 @@ +import { Avatar } from '@affine/component/ui/avatar'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { type SyncEngineStatus, @@ -10,8 +12,6 @@ import { NoNetworkIcon, UnsyncIcon, } from '@blocksuite/icons'; -import { Avatar } from '@toeverything/components/avatar'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useBlockSuiteWorkspaceAvatarUrl } from '@toeverything/hooks/use-block-suite-workspace-avatar-url'; import { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { debounce } from 'lodash-es'; diff --git a/packages/frontend/core/src/components/root-app-sidebar/index.tsx b/packages/frontend/core/src/components/root-app-sidebar/index.tsx index e08826e09..9696b991b 100644 --- a/packages/frontend/core/src/components/root-app-sidebar/index.tsx +++ b/packages/frontend/core/src/components/root-app-sidebar/index.tsx @@ -13,12 +13,12 @@ import { SidebarScrollableContainer, } from '@affine/component/app-sidebar'; import { MoveToTrash } from '@affine/component/page-list'; +import { Menu } from '@affine/component/ui/menu'; import { WorkspaceSubPath } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { FolderIcon, SettingsIcon } from '@blocksuite/icons'; import type { Page } from '@blocksuite/store'; import { useDroppable } from '@dnd-kit/core'; -import { Menu } from '@toeverything/components/menu'; import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks'; import { isAutoCheckUpdateAtom, diff --git a/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx b/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx index e132926ba..62fd5dcf9 100644 --- a/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx +++ b/packages/frontend/core/src/components/workspace-upgrade/upgrade.tsx @@ -1,6 +1,6 @@ import { AffineShapeIcon } from '@affine/component/page-list'; // TODO: import from page-list temporarily, need to defined common svg icon/images management. +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import type { MigrationPoint } from '@toeverything/infra/blocksuite'; import { useCallback, useMemo } from 'react'; diff --git a/packages/frontend/core/src/pages/expired.tsx b/packages/frontend/core/src/pages/expired.tsx index 5d4cd67ae..6c6efbcd6 100644 --- a/packages/frontend/core/src/pages/expired.tsx +++ b/packages/frontend/core/src/pages/expired.tsx @@ -1,6 +1,6 @@ import { AuthPageContainer } from '@affine/component/auth-components'; +import { Button } from '@affine/component/ui/button'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; -import { Button } from '@toeverything/components/button'; import { useCallback } from 'react'; import { RouteLogic, useNavigateHelper } from '../hooks/use-navigate-helper'; diff --git a/packages/frontend/core/src/pages/index.tsx b/packages/frontend/core/src/pages/index.tsx index a980a5879..0d98c9e85 100644 --- a/packages/frontend/core/src/pages/index.tsx +++ b/packages/frontend/core/src/pages/index.tsx @@ -1,6 +1,6 @@ +import { Menu } from '@affine/component/ui/menu'; import { DebugLogger } from '@affine/debug'; import { rootWorkspacesMetadataAtom } from '@affine/workspace/atom'; -import { Menu } from '@toeverything/components/menu'; import { getWorkspace } from '@toeverything/infra/__internal__/workspace'; import { getCurrentStore } from '@toeverything/infra/atom'; import { lazy } from 'react'; diff --git a/packages/frontend/core/src/pages/open-app.tsx b/packages/frontend/core/src/pages/open-app.tsx index b26da450f..6941a4528 100644 --- a/packages/frontend/core/src/pages/open-app.tsx +++ b/packages/frontend/core/src/pages/open-app.tsx @@ -1,9 +1,9 @@ +import { Button } from '@affine/component/ui/button'; import { type GetCurrentUserQuery, getCurrentUserQuery } from '@affine/graphql'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { fetcher } from '@affine/workspace/affine/gql'; import { Logo1Icon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; import { useCallback, useMemo } from 'react'; import { type LoaderFunction, diff --git a/packages/frontend/core/src/pages/upgrade-success.tsx b/packages/frontend/core/src/pages/upgrade-success.tsx index a8af870ea..ab0cdd168 100644 --- a/packages/frontend/core/src/pages/upgrade-success.tsx +++ b/packages/frontend/core/src/pages/upgrade-success.tsx @@ -1,8 +1,8 @@ import { Empty } from '@affine/component'; +import { Button } from '@affine/component/ui/button'; import { Trans } from '@affine/i18n'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { Logo1Icon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; import { useCallback } from 'react'; import { useNavigateHelper } from '../hooks/use-navigate-helper'; diff --git a/packages/plugins/copilot/package.json b/packages/plugins/copilot/package.json index 0a83ec6ad..76eb4a663 100644 --- a/packages/plugins/copilot/package.json +++ b/packages/plugins/copilot/package.json @@ -17,7 +17,6 @@ "@affine/component": "workspace:*", "@affine/sdk": "workspace:*", "@blocksuite/icons": "2.1.36", - "@toeverything/components": "^0.0.46", "@vanilla-extract/css": "^1.13.0", "clsx": "^2.0.0", "idb": "^7.1.1", diff --git a/packages/plugins/copilot/src/UI/debug-content.tsx b/packages/plugins/copilot/src/UI/debug-content.tsx index 1df626ca8..9cc0fb822 100644 --- a/packages/plugins/copilot/src/UI/debug-content.tsx +++ b/packages/plugins/copilot/src/UI/debug-content.tsx @@ -1,5 +1,5 @@ import { FlexWrapper, Input } from '@affine/component'; -import { Button } from '@toeverything/components/button'; +import { Button } from '@affine/component/ui/button'; import { useAtom } from 'jotai'; import { type ReactElement, useCallback } from 'react'; diff --git a/packages/plugins/copilot/src/UI/detail-content.tsx b/packages/plugins/copilot/src/UI/detail-content.tsx index 5a39732fa..78855ff67 100644 --- a/packages/plugins/copilot/src/UI/detail-content.tsx +++ b/packages/plugins/copilot/src/UI/detail-content.tsx @@ -1,5 +1,5 @@ +import { IconButton } from '@affine/component/ui/button'; import { SendIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; import { useAtomValue, useSetAtom } from 'jotai'; import type { ReactElement } from 'react'; import { Suspense, useCallback, useState } from 'react'; diff --git a/packages/plugins/copilot/src/UI/header-item.tsx b/packages/plugins/copilot/src/UI/header-item.tsx index 8dc7ea7ac..9f72c344f 100644 --- a/packages/plugins/copilot/src/UI/header-item.tsx +++ b/packages/plugins/copilot/src/UI/header-item.tsx @@ -1,7 +1,7 @@ +import { IconButton } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { deleteLayoutAtom, pushLayoutAtom } from '@affine/sdk/entry'; import { AiIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useSetAtom } from 'jotai'; import type { ComponentType, PropsWithChildren, ReactElement } from 'react'; import { useCallback, useState } from 'react'; diff --git a/packages/plugins/copilot/src/core/components/conversation/index.tsx b/packages/plugins/copilot/src/core/components/conversation/index.tsx index f4bbf19ca..8c4e5f517 100644 --- a/packages/plugins/copilot/src/core/components/conversation/index.tsx +++ b/packages/plugins/copilot/src/core/components/conversation/index.tsx @@ -1,5 +1,5 @@ +import { Button } from '@affine/component/ui/button'; import { PlusIcon, ResetIcon } from '@blocksuite/icons'; -import { Button } from '@toeverything/components/button'; import { clsx } from 'clsx'; import type { MessageType } from 'langchain/schema'; import { marked } from 'marked'; diff --git a/packages/plugins/hello-world/package.json b/packages/plugins/hello-world/package.json index 2054049fb..3d841355d 100644 --- a/packages/plugins/hello-world/package.json +++ b/packages/plugins/hello-world/package.json @@ -17,8 +17,7 @@ "dependencies": { "@affine/component": "workspace:*", "@affine/sdk": "workspace:*", - "@blocksuite/icons": "2.1.36", - "@toeverything/components": "^0.0.46" + "@blocksuite/icons": "2.1.36" }, "devDependencies": { "@affine/plugin-cli": "workspace:*" diff --git a/packages/plugins/hello-world/src/app.tsx b/packages/plugins/hello-world/src/app.tsx index 8639b900a..d79927f07 100644 --- a/packages/plugins/hello-world/src/app.tsx +++ b/packages/plugins/hello-world/src/app.tsx @@ -1,6 +1,6 @@ +import { IconButton } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { Logo1Icon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useCallback } from 'react'; export const HeaderItem = () => { diff --git a/packages/plugins/image-preview/package.json b/packages/plugins/image-preview/package.json index 93d7b351f..fc9ec6ebf 100644 --- a/packages/plugins/image-preview/package.json +++ b/packages/plugins/image-preview/package.json @@ -17,7 +17,6 @@ "@affine/component": "workspace:*", "@affine/sdk": "workspace:*", "@blocksuite/icons": "2.1.36", - "@toeverything/components": "^0.0.46", "@toeverything/theme": "^0.7.24", "clsx": "^2.0.0", "foxact": "^0.2.20", diff --git a/packages/plugins/image-preview/src/component/index.tsx b/packages/plugins/image-preview/src/component/index.tsx index 853ddd52a..b0ff6ef46 100644 --- a/packages/plugins/image-preview/src/component/index.tsx +++ b/packages/plugins/image-preview/src/component/index.tsx @@ -1,3 +1,5 @@ +import { Button, IconButton } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import type { ImageBlockModel } from '@blocksuite/blocks'; import { assertExists } from '@blocksuite/global/utils'; import { @@ -11,8 +13,6 @@ import { ViewBarIcon, } from '@blocksuite/icons'; import type { Workspace } from '@blocksuite/store'; -import { Button, IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import clsx from 'clsx'; import { useErrorBoundary } from 'foxact/use-error-boundary'; import { useAtom } from 'jotai'; diff --git a/packages/plugins/outline/package.json b/packages/plugins/outline/package.json index 8fd7b8cf3..87d3970ab 100644 --- a/packages/plugins/outline/package.json +++ b/packages/plugins/outline/package.json @@ -17,8 +17,7 @@ "dependencies": { "@affine/component": "workspace:*", "@affine/sdk": "workspace:*", - "@blocksuite/icons": "2.1.36", - "@toeverything/components": "^0.0.46" + "@blocksuite/icons": "2.1.36" }, "devDependencies": { "@affine/plugin-cli": "workspace:*", diff --git a/packages/plugins/outline/src/app.tsx b/packages/plugins/outline/src/app.tsx index caeb0eaa1..c22b0a2c6 100644 --- a/packages/plugins/outline/src/app.tsx +++ b/packages/plugins/outline/src/app.tsx @@ -1,3 +1,5 @@ +import { IconButton } from '@affine/component/ui/button'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { currentPageIdAtom, currentWorkspaceAtom, @@ -7,8 +9,6 @@ import { import { TOCNotesPanel } from '@blocksuite/blocks'; import { assertExists } from '@blocksuite/global/utils'; import { RightSidebarIcon } from '@blocksuite/icons'; -import { IconButton } from '@toeverything/components/button'; -import { Tooltip } from '@toeverything/components/tooltip'; import { useAtomValue, useSetAtom } from 'jotai'; import type { ComponentType, PropsWithChildren } from 'react'; import { useCallback, useRef, useState } from 'react'; diff --git a/tests/storybook/.storybook/preview.tsx b/tests/storybook/.storybook/preview.tsx index fc0d9253a..82f655b9a 100644 --- a/tests/storybook/.storybook/preview.tsx +++ b/tests/storybook/.storybook/preview.tsx @@ -1,7 +1,6 @@ import 'ses'; import '@affine/component/theme/global.css'; import '@affine/component/theme/theme.css'; -import '@toeverything/components/style.css'; import { createI18n } from '@affine/i18n'; import MockSessionContext, { mockAuthStates, diff --git a/tests/storybook/src/stories/card.stories.tsx b/tests/storybook/src/stories/card.stories.tsx index 305554f2a..296383629 100644 --- a/tests/storybook/src/stories/card.stories.tsx +++ b/tests/storybook/src/stories/card.stories.tsx @@ -1,6 +1,7 @@ import { toast } from '@affine/component'; import { BlockCard } from '@affine/component/card/block-card'; import { WorkspaceCard } from '@affine/component/card/workspace-card'; +import { Tooltip } from '@affine/component/ui/tooltip'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { getOrCreateWorkspace } from '@affine/workspace/manager'; import { @@ -10,7 +11,6 @@ import { PageIcon, } from '@blocksuite/icons'; import type { Meta } from '@storybook/react'; -import { Tooltip } from '@toeverything/components/tooltip'; export default { title: 'AFFiNE/Card', diff --git a/tests/storybook/src/stories/quick-search/quick-search-modal.stories.tsx b/tests/storybook/src/stories/quick-search/quick-search-modal.stories.tsx index 2b026b617..368df7e97 100644 --- a/tests/storybook/src/stories/quick-search/quick-search-modal.stories.tsx +++ b/tests/storybook/src/stories/quick-search/quick-search-modal.stories.tsx @@ -1,6 +1,6 @@ +import { Button } from '@affine/component/ui/button'; import { CMDKContainer, CMDKModal } from '@affine/core/components/pure/cmdk'; import type { Meta, StoryFn } from '@storybook/react'; -import { Button } from '@toeverything/components/button'; import { useState } from 'react'; export default { diff --git a/yarn.lock b/yarn.lock index b87736ed4..8d7c72100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -305,7 +305,6 @@ __metadata: "@affine/plugin-cli": "workspace:*" "@affine/sdk": "workspace:*" "@blocksuite/icons": "npm:2.1.36" - "@toeverything/components": "npm:^0.0.46" "@types/marked": "npm:^6.0.0" "@vanilla-extract/css": "npm:^1.13.0" clsx: "npm:^2.0.0" @@ -366,7 +365,6 @@ __metadata: "@svgr/webpack": "npm:^8.1.0" "@swc/core": "npm:^1.3.93" "@testing-library/react": "npm:^14.0.0" - "@toeverything/components": "npm:^0.0.46" "@toeverything/theme": "npm:^0.7.20" "@types/bytes": "npm:^3.1.3" "@types/lodash-es": "npm:^4.17.9" @@ -544,7 +542,6 @@ __metadata: "@affine/plugin-cli": "workspace:*" "@affine/sdk": "workspace:*" "@blocksuite/icons": "npm:2.1.36" - "@toeverything/components": "npm:^0.0.46" languageName: unknown linkType: soft @@ -569,7 +566,6 @@ __metadata: "@affine/plugin-cli": "workspace:*" "@affine/sdk": "workspace:*" "@blocksuite/icons": "npm:2.1.36" - "@toeverything/components": "npm:^0.0.46" "@toeverything/theme": "npm:^0.7.24" clsx: "npm:^2.0.0" foxact: "npm:^0.2.20" @@ -669,7 +665,6 @@ __metadata: "@affine/plugin-cli": "workspace:*" "@affine/sdk": "workspace:*" "@blocksuite/icons": "npm:2.1.36" - "@toeverything/components": "npm:^0.0.46" jotai: "npm:^2.5.1" react: "npm:18.2.0" react-dom: "npm:18.2.0" @@ -4142,7 +4137,7 @@ __metadata: languageName: node linkType: hard -"@blocksuite/icons@npm:2.1.36, @blocksuite/icons@npm:^2.1.33": +"@blocksuite/icons@npm:2.1.36": version: 2.1.36 resolution: "@blocksuite/icons@npm:2.1.36" peerDependencies: @@ -9836,7 +9831,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-dropdown-menu@npm:^2.0.5, @radix-ui/react-dropdown-menu@npm:^2.0.6": +"@radix-ui/react-dropdown-menu@npm:^2.0.6": version: 2.0.6 resolution: "@radix-ui/react-dropdown-menu@npm:2.0.6" dependencies: @@ -9974,7 +9969,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-popover@npm:^1.0.6, @radix-ui/react-popover@npm:^1.0.7": +"@radix-ui/react-popover@npm:^1.0.7": version: 1.0.7 resolution: "@radix-ui/react-popover@npm:1.0.7" dependencies: @@ -10513,7 +10508,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-tooltip@npm:^1.0.6, @radix-ui/react-tooltip@npm:^1.0.7": +"@radix-ui/react-tooltip@npm:^1.0.7": version: 1.0.7 resolution: "@radix-ui/react-tooltip@npm:1.0.7" dependencies: @@ -13118,24 +13113,6 @@ __metadata: languageName: node linkType: hard -"@toeverything/components@npm:^0.0.46": - version: 0.0.46 - resolution: "@toeverything/components@npm:0.0.46" - dependencies: - "@blocksuite/icons": "npm:^2.1.33" - "@radix-ui/react-dialog": "npm:^1.0.4" - "@radix-ui/react-dropdown-menu": "npm:^2.0.5" - "@radix-ui/react-popover": "npm:^1.0.6" - "@radix-ui/react-tooltip": "npm:^1.0.6" - peerDependencies: - "@radix-ui/react-avatar": ^1 - clsx: ^2 - react: ^18 - react-dom: ^18 - checksum: 1e74a620d82bc6f6c318ccac35a2f4f86d5e3b97761e798d0ad3f3b31a74f377e402338ad00a2af54c62dda7d88c231cc07b53f2aa9c9bff1de5088659e1c712 - languageName: node - linkType: hard - "@toeverything/hooks@workspace:*, @toeverything/hooks@workspace:packages/frontend/hooks": version: 0.0.0-use.local resolution: "@toeverything/hooks@workspace:packages/frontend/hooks"