diff --git a/apps/core/package.json b/apps/core/package.json index 59767f2eb5..a9ae719ed7 100644 --- a/apps/core/package.json +++ b/apps/core/package.json @@ -39,7 +39,7 @@ "@emotion/styled": "^11.11.0", "@mui/material": "^5.14.6", "@react-hookz/web": "^23.1.0", - "@toeverything/components": "^0.0.17", + "@toeverything/components": "^0.0.19", "async-call-rpc": "^6.3.1", "cmdk": "^0.2.0", "css-spring": "^4.1.0", diff --git a/apps/core/src/bootstrap/plugins/setup.ts b/apps/core/src/bootstrap/plugins/setup.ts index 7e42aeda6d..213f77541d 100644 --- a/apps/core/src/bootstrap/plugins/setup.ts +++ b/apps/core/src/bootstrap/plugins/setup.ts @@ -158,6 +158,9 @@ function createSetupImpl(rootStore: ReturnType) { '@toeverything/components/button': import( '@toeverything/components/button' ), + '@toeverything/components/tooltip': import( + '@toeverything/components/tooltip' + ), }); // pluginName -> module -> importName -> updater[] diff --git a/apps/core/src/components/affine/create-workspace-modal/index.tsx b/apps/core/src/components/affine/create-workspace-modal/index.tsx index d40da0922f..806050da45 100644 --- a/apps/core/src/components/affine/create-workspace-modal/index.tsx +++ b/apps/core/src/components/affine/create-workspace-modal/index.tsx @@ -4,19 +4,19 @@ import { ModalCloseButton, ModalWrapper, toast, - Tooltip, } 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 { Tooltip } from '@toeverything/components/tooltip'; import type { LoadDBFileResult, SelectDBFileLocationResult, } from '@toeverything/infra/type'; import { useSetAtom } from 'jotai'; import type { KeyboardEvent } from 'react'; -import { useEffect } from 'react'; +import { useEffect, useRef } from 'react'; import { useLayoutEffect } from 'react'; import { useCallback, useState } from 'react'; @@ -125,6 +125,7 @@ const SetDBLocationContent = ({ onConfirmLocation, }: SetDBLocationContentProps) => { const t = useAFFiNEI18N(); + const ref = useRef(null); const defaultDBLocation = useDefaultDBLocation(); const [opening, setOpening] = useState(false); @@ -161,11 +162,12 @@ const SetDBLocationContent = ({ {t['Customize']()} diff --git a/apps/core/src/components/affine/new-workspace-setting-detail/publish.tsx b/apps/core/src/components/affine/new-workspace-setting-detail/publish.tsx index 4420c6f542..7aebc3c076 100644 --- a/apps/core/src/components/affine/new-workspace-setting-detail/publish.tsx +++ b/apps/core/src/components/affine/new-workspace-setting-detail/publish.tsx @@ -1,4 +1,4 @@ -import { FlexWrapper, Switch, Tooltip } from '@affine/component'; +import { FlexWrapper, Switch } from '@affine/component'; import { SettingRow } from '@affine/component/setting-components'; import { Unreachable } from '@affine/env/constant'; import type { @@ -8,6 +8,7 @@ import type { 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 { useBlockSuiteWorkspaceName } from '@toeverything/hooks/use-block-suite-workspace-name'; import { useCallback, useEffect, useState } from 'react'; @@ -93,10 +94,7 @@ const FakePublishPanelAffine = (_props: FakePublishPanelAffineProps) => { const t = useAFFiNEI18N(); return ( - +
diff --git a/apps/core/src/components/affine/new-workspace-setting-detail/storage.tsx b/apps/core/src/components/affine/new-workspace-setting-detail/storage.tsx index 9615902402..c2063949c7 100644 --- a/apps/core/src/components/affine/new-workspace-setting-detail/storage.tsx +++ b/apps/core/src/components/affine/new-workspace-setting-detail/storage.tsx @@ -1,7 +1,8 @@ -import { FlexWrapper, toast, Tooltip } from '@affine/component'; +import { FlexWrapper, toast } from '@affine/component'; import { SettingRow } from '@affine/component/setting-components'; 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'; @@ -75,9 +76,9 @@ export const StoragePanel = ({ workspace }: StoragePanelProps) => { secondaryPath ? (