Skip to content

A local-first personal finance app

:recycle: moving more components to the new component-lib pkg (#4346)

Matiss Janis Aboltins679b94a62600
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 41392b3e28..c4ed9c4b18 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -761,7 +761,7 @@ export default [
'packages/desktop-client/src/components/budget/MobileBudget.tsx',
'packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx',
'packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx',
- 'packages/desktop-client/src/components/common/Menu.tsx',
+ 'packages/component-library/src/Menu.tsx',
'packages/desktop-client/src/components/FinancesApp.tsx',
'packages/desktop-client/src/components/GlobalKeys.ts',
'packages/desktop-client/src/components/LoggedInUser.tsx',
diff --git a/packages/component-library/package.json b/packages/component-library/package.json
index 97816f502a..4379ff0066 100644
--- a/packages/component-library/package.json
+++ b/packages/component-library/package.json
@@ -15,10 +15,26 @@
},
"exports": {
"./icons/*": "./src/icons/*.tsx",
+ "./aligned-text": "./src/AlignedText.tsx",
+ "./block": "./src/Block.tsx",
"./button": "./src/Button.tsx",
+ "./card": "./src/Card.tsx",
+ "./form-error": "./src/FormError.tsx",
+ "./initial-focus": "./src/InitialFocus.ts",
+ "./inline-field": "./src/InlineField.tsx",
+ "./label": "./src/Label.tsx",
+ "./menu": "./src/Menu.tsx",
+ "./paragraph": "./src/Paragraph.tsx",
+ "./popover": "./src/Popover.tsx",
+ "./space-between": "./src/SpaceBetween.tsx",
+ "./stack": "./src/Stack.tsx",
"./styles": "./src/styles.ts",
+ "./text": "./src/Text.tsx",
+ "./text-one-line": "./src/TextOneLine.tsx",
"./theme": "./src/theme.ts",
"./tokens": "./src/tokens.ts",
+ "./toggle": "./src/Toggle.tsx",
+ "./tooltip": "./src/Tooltip.tsx",
"./view": "./src/View.tsx"
}
}
diff --git a/packages/desktop-client/src/components/common/AlignedText.tsx b/packages/component-library/src/AlignedText.tsx
similarity index 100%
rename from packages/desktop-client/src/components/common/AlignedText.tsx
rename to packages/component-library/src/AlignedText.tsx
diff --git a/packages/desktop-client/src/components/common/Block.tsx b/packages/component-library/src/Block.tsx
similarity index 89%
rename from packages/desktop-client/src/components/common/Block.tsx
rename to packages/component-library/src/Block.tsx
index 26ca9a1fea..a803510f9a 100644
--- a/packages/desktop-client/src/components/common/Block.tsx
+++ b/packages/component-library/src/Block.tsx
@@ -2,7 +2,7 @@ import { type HTMLProps, type Ref } from 'react';
import { css, cx } from '@emotion/css';
-import { type CSSProperties } from '../../style';
+import { type CSSProperties } from './styles';
type BlockProps = HTMLProps<HTMLDivElement> & {
innerRef?: Ref<HTMLDivElement>;
diff --git a/packages/desktop-client/src/components/common/Card.tsx b/packages/component-library/src/Card.tsx
similarity index 95%
rename from packages/desktop-client/src/components/common/Card.tsx
rename to packages/component-library/src/Card.tsx
index 14625a9cb0..5dd4eb5f9b 100644
--- a/packages/desktop-client/src/components/common/Card.tsx
+++ b/packages/component-library/src/Card.tsx
@@ -1,7 +1,6 @@
import { type ComponentProps, forwardRef } from 'react';
-import { theme } from '../../style';
-
+import { theme } from './theme';
import { View } from './View';
type CardProps = ComponentProps<typeof View>;
diff --git a/packages/desktop-client/src/components/common/FormError.tsx b/packages/component-library/src/FormError.tsx
similarity index 100%
rename from packages/desktop-client/src/components/common/FormError.tsx
rename to packages/component-library/src/FormError.tsx
diff --git a/packages/component-library/src/InitialFocus.ts b/packages/component-library/src/InitialFocus.ts
new file mode 100644
index 0000000000..c7ee965b08
--- /dev/null
+++ b/packages/component-library/src/InitialFocus.ts
@@ -0,0 +1,36 @@
+import {
+ type ReactElement,
+ type Ref,
+ cloneElement,
+ useEffect,
+ useRef,
+} from 'react';
+
+type InitialFocusProps = {
+ children:
+ | ReactElement<{ inputRef: Ref<HTMLInputElement> }>
+ | ((node: Ref<HTMLInputElement>) => ReactElement);
+};
+
+export function InitialFocus({ children }: InitialFocusProps) {
+ const node = useRef<HTMLInputElement>(null);
+
+ useEffect(() => {
+ if (node.current) {
+ // This is needed to avoid a strange interaction with
+ // `ScopeTab`, which doesn't allow it to be focused at first for
+ // some reason. Need to look into it.
+ setTimeout(() => {
+ if (node.current) {
+ node.current.focus();
+ node.current.setSelectionRange(0, 10000);
+ }
+ }, 0);
+ }
+ }, []);
+
+ if (typeof children === 'function') {
+ return children(node);
+ }
+ return cloneElement(children, { inputRef: node });
+}
diff --git a/packages/desktop-client/src/components/common/InlineField.tsx b/packages/component-library/src/InlineField.tsx
similarity index 93%
rename from packages/desktop-client/src/components/common/InlineField.tsx
rename to packages/component-library/src/InlineField.tsx
index 7127d87ee7..2a36845637 100644
--- a/packages/desktop-client/src/components/common/InlineField.tsx
+++ b/packages/component-library/src/InlineField.tsx
@@ -2,7 +2,7 @@ import { type ReactNode } from 'react';
import { css } from '@emotion/css';
-import { type CSSProperties } from '../../style';
+import { type CSSProperties } from './styles';
type InlineFieldProps = {
label: ReactNode;
diff --git a/packages/desktop-client/src/components/common/Label.tsx b/packages/component-library/src/Label.tsx
similarity index 89%
rename from packages/desktop-client/src/components/common/Label.tsx
rename to packages/component-library/src/Label.tsx
index aa39da9397..5e98bedb84 100644
--- a/packages/desktop-client/src/components/common/Label.tsx
+++ b/packages/component-library/src/Label.tsx
@@ -1,8 +1,8 @@
import { forwardRef, type ReactNode, type CSSProperties } from 'react';
-import { theme, styles } from '../../style';
-
+import { styles } from './styles';
import { Text } from './Text';
+import { theme } from './theme';
type LabelProps = {
title: ReactNode;
diff --git a/packages/desktop-client/src/components/common/Menu.tsx b/packages/component-library/src/Menu.tsx
similarity index 99%
rename from packages/desktop-client/src/components/common/Menu.tsx
rename to packages/component-library/src/Menu.tsx
index 1178bab93e..90b341b117 100644
--- a/packages/desktop-client/src/components/common/Menu.tsx
+++ b/packages/component-library/src/Menu.tsx
@@ -8,9 +8,8 @@ import {
type CSSProperties,
} from 'react';
-import { theme } from '../../style';
-
import { Text } from './Text';
+import { theme } from './theme';
import { Toggle } from './Toggle';
import { View } from './View';
diff --git a/packages/desktop-client/src/components/common/Paragraph.tsx b/packages/component-library/src/Paragraph.tsx
similarity index 90%
rename from packages/desktop-client/src/components/common/Paragraph.tsx
rename to packages/component-library/src/Paragraph.tsx
index 490363b27a..980424f651 100644
--- a/packages/desktop-client/src/components/common/Paragraph.tsx
+++ b/packages/component-library/src/Paragraph.tsx
@@ -2,7 +2,7 @@ import { type HTMLProps } from 'react';
import { css } from '@emotion/css';
-import { type CSSProperties } from '../../style';
+import { type CSSProperties } from './styles';
type ParagraphProps = HTMLProps<HTMLDivElement> & {
style?: CSSProperties;
diff --git a/packages/desktop-client/src/components/common/Popover.tsx b/packages/component-library/src/Popover.tsx
similarity index 97%
rename from packages/desktop-client/src/components/common/Popover.tsx
rename to packages/component-library/src/Popover.tsx
index c844c5b9c9..0d46644a46 100644
--- a/packages/desktop-client/src/components/common/Popover.tsx
+++ b/packages/component-library/src/Popover.tsx
@@ -3,7 +3,7 @@ import { Popover as ReactAriaPopover } from 'react-aria-components';
import { css } from '@emotion/css';
-import { styles } from '../../style';
+import { styles } from './styles';
type PopoverProps = ComponentProps<typeof ReactAriaPopover>;
diff --git a/packages/desktop-client/src/components/common/SpaceBetween.tsx b/packages/component-library/src/SpaceBetween.tsx
similarity index 100%
rename from packages/desktop-client/src/components/common/SpaceBetween.tsx
rename to packages/component-library/src/SpaceBetween.tsx
diff --git a/packages/desktop-client/src/components/common/Stack.tsx b/packages/component-library/src/Stack.tsx
similarity index 100%
rename from packages/desktop-client/src/components/common/Stack.tsx
rename to packages/component-library/src/Stack.tsx
diff --git a/packages/desktop-client/src/components/common/Text.tsx b/packages/component-library/src/Text.tsx
similarity index 92%
rename from packages/desktop-client/src/components/common/Text.tsx
rename to packages/component-library/src/Text.tsx
index 54aae39aac..445a1a28b6 100644
--- a/packages/desktop-client/src/components/common/Text.tsx
+++ b/packages/component-library/src/Text.tsx
@@ -7,7 +7,7 @@ import React, {
import { css, cx } from '@emotion/css';
-import { type CSSProperties } from '../../style';
+import { type CSSProperties } from './styles';
type TextProps = HTMLProps<HTMLSpanElement> & {
innerRef?: Ref<HTMLSpanElement>;
diff --git a/packages/desktop-client/src/components/common/TextOneLine.tsx b/packages/component-library/src/TextOneLine.tsx
similarity index 100%
rename from packages/desktop-client/src/components/common/TextOneLine.tsx
rename to packages/component-library/src/TextOneLine.tsx
diff --git a/packages/desktop-client/src/components/common/Toggle.tsx b/packages/component-library/src/Toggle.tsx
similarity index 98%
rename from packages/desktop-client/src/components/common/Toggle.tsx
rename to packages/component-library/src/Toggle.tsx
index 70a5dbdc56..ae9d1cb63e 100644
--- a/packages/desktop-client/src/components/common/Toggle.tsx
+++ b/packages/component-library/src/Toggle.tsx
@@ -2,8 +2,7 @@ import React, { type CSSProperties } from 'react';
import { css } from '@emotion/css';
-import { theme } from '../../style';
-
+import { theme } from './theme';
import { View } from './View';
type ToggleProps = {
diff --git a/packages/desktop-client/src/components/common/Tooltip.tsx b/packages/component-library/src/Tooltip.tsx
similarity index 97%
rename from packages/desktop-client/src/components/common/Tooltip.tsx
rename to packages/component-library/src/Tooltip.tsx
index 9011281f2c..ab2f9da6f7 100644
--- a/packages/desktop-client/src/components/common/Tooltip.tsx
+++ b/packages/component-library/src/Tooltip.tsx
@@ -8,8 +8,7 @@ import React, {
} from 'react';
import { Tooltip as AriaTooltip, TooltipTrigger } from 'react-aria-components';
-import { styles } from '../../style';
-
+import { styles } from './styles';
import { View } from './View';
type TooltipProps = Partial<ComponentProps<typeof AriaTooltip>> & {
diff --git a/packages/desktop-client/src/components/common/AlignedText.ts b/packages/desktop-client/src/components/common/AlignedText.ts
new file mode 100644
index 0000000000..1871f01745
--- /dev/null
+++ b/packages/desktop-client/src/components/common/AlignedText.ts
@@ -0,0 +1,4 @@
+import { AlignedText as ActualComponentAlignedText } from '@actual-app/components/aligned-text';
+
+/** @deprecated please import AlignedText from '@actual-app/components/aligned-text' */
+export const AlignedText = ActualComponentAlignedText;
diff --git a/packages/desktop-client/src/components/common/Block.ts b/packages/desktop-client/src/components/common/Block.ts
new file mode 100644
index 0000000000..a9c0e98f71
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Block.ts
@@ -0,0 +1,4 @@
+import { Block as ActualComponentBlock } from '@actual-app/components/block';
+
+/** @deprecated please import Block from '@actual-app/components/block' */
+export const Block = ActualComponentBlock;
diff --git a/packages/desktop-client/src/components/common/Button.tsx b/packages/desktop-client/src/components/common/Button.tsx
index 4ebfed37aa..0d52838648 100644
--- a/packages/desktop-client/src/components/common/Button.tsx
+++ b/packages/desktop-client/src/components/common/Button.tsx
@@ -1,12 +1,11 @@
import React, { forwardRef, type ElementType, type HTMLProps } from 'react';
+import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';
+import { styles, type CSSProperties } from '@actual-app/components/styles';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
import { css } from '@emotion/css';
-import { AnimatedLoading } from '../../icons/AnimatedLoading';
-import { styles, theme, type CSSProperties } from '../../style';
-
-import { View } from './View';
-
type ButtonProps = HTMLProps<HTMLButtonElement> & {
pressed?: boolean;
hover?: boolean;
diff --git a/packages/desktop-client/src/components/common/Card.ts b/packages/desktop-client/src/components/common/Card.ts
new file mode 100644
index 0000000000..ab9663033f
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Card.ts
@@ -0,0 +1,4 @@
+import { Card as ActualComponentCard } from '@actual-app/components/card';
+
+/** @deprecated please import Card from '@actual-app/components/card' */
+export const Card = ActualComponentCard;
diff --git a/packages/desktop-client/src/components/common/FormError.ts b/packages/desktop-client/src/components/common/FormError.ts
new file mode 100644
index 0000000000..81f37afb58
--- /dev/null
+++ b/packages/desktop-client/src/components/common/FormError.ts
@@ -0,0 +1,4 @@
+import { FormError as ActualComponentFormError } from '@actual-app/components/form-error';
+
+/** @deprecated please import FormError from '@actual-app/components/form-error' */
+export const FormError = ActualComponentFormError;
diff --git a/packages/desktop-client/src/components/common/InitialFocus.ts b/packages/desktop-client/src/components/common/InitialFocus.ts
index c7ee965b08..759add53a5 100644
--- a/packages/desktop-client/src/components/common/InitialFocus.ts
+++ b/packages/desktop-client/src/components/common/InitialFocus.ts
@@ -1,36 +1,4 @@
-import {
- type ReactElement,
- type Ref,
- cloneElement,
- useEffect,
- useRef,
-} from 'react';
+import { InitialFocus as ActualComponentInitialFocus } from '@actual-app/components/initial-focus';
-type InitialFocusProps = {
- children:
- | ReactElement<{ inputRef: Ref<HTMLInputElement> }>
- | ((node: Ref<HTMLInputElement>) => ReactElement);
-};
-
-export function InitialFocus({ children }: InitialFocusProps) {
- const node = useRef<HTMLInputElement>(null);
-
- useEffect(() => {
- if (node.current) {
- // This is needed to avoid a strange interaction with
- // `ScopeTab`, which doesn't allow it to be focused at first for
- // some reason. Need to look into it.
- setTimeout(() => {
- if (node.current) {
- node.current.focus();
- node.current.setSelectionRange(0, 10000);
- }
- }, 0);
- }
- }, []);
-
- if (typeof children === 'function') {
- return children(node);
- }
- return cloneElement(children, { inputRef: node });
-}
+/** @deprecated please import InitialFocus from '@actual-app/components/initial-focus' */
+export const InitialFocus = ActualComponentInitialFocus;
diff --git a/packages/desktop-client/src/components/common/InlineField.ts b/packages/desktop-client/src/components/common/InlineField.ts
new file mode 100644
index 0000000000..24019276be
--- /dev/null
+++ b/packages/desktop-client/src/components/common/InlineField.ts
@@ -0,0 +1,4 @@
+import { InlineField as ActualComponentInlineField } from '@actual-app/components/inline-field';
+
+/** @deprecated please import InlineField from '@actual-app/components/inline-field' */
+export const InlineField = ActualComponentInlineField;
diff --git a/packages/desktop-client/src/components/common/Label.ts b/packages/desktop-client/src/components/common/Label.ts
new file mode 100644
index 0000000000..c799cb06bb
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Label.ts
@@ -0,0 +1,4 @@
+import { Label as ActualComponentLabel } from '@actual-app/components/label';
+
+/** @deprecated please import Label from '@actual-app/components/label' */
+export const Label = ActualComponentLabel;
diff --git a/packages/desktop-client/src/components/common/Menu.ts b/packages/desktop-client/src/components/common/Menu.ts
new file mode 100644
index 0000000000..d736353e62
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Menu.ts
@@ -0,0 +1,10 @@
+import {
+ Menu as ActualComponentMenu,
+ type MenuItem as ActualComponentMenuItem,
+} from '@actual-app/components/menu';
+
+/** @deprecated please import Menu from '@actual-app/components/menu' */
+export const Menu = ActualComponentMenu;
+
+/** @deprecated please import MenuItem from '@actual-app/components/menu' */
+export type MenuItem = ActualComponentMenuItem;
diff --git a/packages/desktop-client/src/components/common/Modal.tsx b/packages/desktop-client/src/components/common/Modal.tsx
index f38f738467..7a62a2a1d6 100644
--- a/packages/desktop-client/src/components/common/Modal.tsx
+++ b/packages/desktop-client/src/components/common/Modal.tsx
@@ -16,22 +16,23 @@ import {
import { useHotkeysContext } from 'react-hotkeys-hook';
import { useTranslation } from 'react-i18next';
+import { Button } from '@actual-app/components/button';
+import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';
+import { styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { TextOneLine } from '@actual-app/components/text-one-line';
+import { theme } from '@actual-app/components/theme';
+import { tokens } from '@actual-app/components/tokens';
+import { View } from '@actual-app/components/view';
import { css } from '@emotion/css';
import { AutoTextSize } from 'auto-text-size';
import { useModalState } from '../../hooks/useModalState';
-import { AnimatedLoading } from '../../icons/AnimatedLoading';
import { SvgLogo } from '../../icons/logo';
import { SvgDelete } from '../../icons/v0';
-import { styles, theme } from '../../style';
-import { tokens } from '../../tokens';
import { useResponsive } from '../responsive/ResponsiveProvider';
-import { Button } from './Button2';
import { Input } from './Input';
-import { Text } from './Text';
-import { TextOneLine } from './TextOneLine';
-import { View } from './View';
type ModalProps = ComponentPropsWithRef<typeof ReactAriaModal> & {
name: string;
diff --git a/packages/desktop-client/src/components/common/Paragraph.ts b/packages/desktop-client/src/components/common/Paragraph.ts
new file mode 100644
index 0000000000..a69bd9c880
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Paragraph.ts
@@ -0,0 +1,4 @@
+import { Paragraph as ActualComponentParagraph } from '@actual-app/components/paragraph';
+
+/** @deprecated please import Paragraph from '@actual-app/components/paragraph' */
+export const Paragraph = ActualComponentParagraph;
diff --git a/packages/desktop-client/src/components/common/Popover.ts b/packages/desktop-client/src/components/common/Popover.ts
new file mode 100644
index 0000000000..c885af49d0
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Popover.ts
@@ -0,0 +1,4 @@
+import { Popover as ActualComponentPopover } from '@actual-app/components/popover';
+
+/** @deprecated please import Popover from '@actual-app/components/popover' */
+export const Popover = ActualComponentPopover;
diff --git a/packages/desktop-client/src/components/common/SpaceBetween.ts b/packages/desktop-client/src/components/common/SpaceBetween.ts
new file mode 100644
index 0000000000..d272bf9a32
--- /dev/null
+++ b/packages/desktop-client/src/components/common/SpaceBetween.ts
@@ -0,0 +1,4 @@
+import { SpaceBetween as ActualComponentSpaceBetween } from '@actual-app/components/space-between';
+
+/** @deprecated please import SpaceBetween from '@actual-app/components/space-between' */
+export const SpaceBetween = ActualComponentSpaceBetween;
diff --git a/packages/desktop-client/src/components/common/Stack.ts b/packages/desktop-client/src/components/common/Stack.ts
new file mode 100644
index 0000000000..e2a2f9b561
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Stack.ts
@@ -0,0 +1,4 @@
+import { Stack as ActualComponentStack } from '@actual-app/components/stack';
+
+/** @deprecated please import Stack from '@actual-app/components/stack' */
+export const Stack = ActualComponentStack;
diff --git a/packages/desktop-client/src/components/common/Text.ts b/packages/desktop-client/src/components/common/Text.ts
new file mode 100644
index 0000000000..74a1dcead7
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Text.ts
@@ -0,0 +1,4 @@
+import { Text as ActualComponentText } from '@actual-app/components/text';
+
+/** @deprecated please import Text from '@actual-app/components/text' */
+export const Text = ActualComponentText;
diff --git a/packages/desktop-client/src/components/common/TextOneLine.ts b/packages/desktop-client/src/components/common/TextOneLine.ts
new file mode 100644
index 0000000000..3f09be3487
--- /dev/null
+++ b/packages/desktop-client/src/components/common/TextOneLine.ts
@@ -0,0 +1,4 @@
+import { TextOneLine as ActualComponentTextOneLine } from '@actual-app/components/text-one-line';
+
+/** @deprecated please import TextOneLine from '@actual-app/components/text-one-line' */
+export const TextOneLine = ActualComponentTextOneLine;
diff --git a/packages/desktop-client/src/components/common/Toggle.ts b/packages/desktop-client/src/components/common/Toggle.ts
new file mode 100644
index 0000000000..1e244e2c86
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Toggle.ts
@@ -0,0 +1,4 @@
+import { Toggle as ActualComponentToggle } from '@actual-app/components/toggle';
+
+/** @deprecated please import Toggle from '@actual-app/components/toggle' */
+export const Toggle = ActualComponentToggle;
diff --git a/packages/desktop-client/src/components/common/Tooltip.ts b/packages/desktop-client/src/components/common/Tooltip.ts
new file mode 100644
index 0000000000..88c52e7995
--- /dev/null
+++ b/packages/desktop-client/src/components/common/Tooltip.ts
@@ -0,0 +1,4 @@
+import { Tooltip as ActualComponentTooltip } from '@actual-app/components/tooltip';
+
+/** @deprecated please import Tooltip from '@actual-app/components/tooltip' */
+export const Tooltip = ActualComponentTooltip;
diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
index 130c8662e1..bc983b2b24 100644
--- a/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
+++ b/packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx
@@ -9,6 +9,13 @@ import React, {
import { ListBox, Section, Header, Collection } from 'react-aria-components';
import { useTranslation } from 'react-i18next';
+import { Button } from '@actual-app/components/button';
+import { Menu, type MenuItemObject } from '@actual-app/components/menu';
+import { Popover } from '@actual-app/components/popover';
+import { styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { View } from '@actual-app/components/view';
+
import { setNotificationInset } from 'loot-core/client/actions';
import * as monthUtils from 'loot-core/shared/months';
import { isPreviewId } from 'loot-core/shared/transactions';
@@ -29,12 +36,7 @@ import { AnimatedLoading } from '../../../icons/AnimatedLoading';
import { SvgDelete } from '../../../icons/v0';
import { SvgDotsHorizontalTriple } from '../../../icons/v1';
import { useDispatch } from '../../../redux';
-import { styles, theme } from '../../../style';
-import { Button } from '../../common/Button2';
-import { Menu, type MenuItemObject } from '../../common/Menu';
-import { Popover } from '../../common/Popover';
-import { Text } from '../../common/Text';
-import { View } from '../../common/View';
+import { theme } from '../../../style';
import { useScrollListener } from '../../ScrollProvider';
import { FloatingActionBar } from '../FloatingActionBar';
diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsx
index af677264e8..06cbab4427 100644
--- a/packages/desktop-client/src/components/table.tsx
+++ b/packages/desktop-client/src/components/table.tsx
@@ -17,23 +17,25 @@ import React, {
} from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';
+import { Button } from '@actual-app/components/button';
+import { AnimatedLoading } from '@actual-app/components/icons/AnimatedLoading';
+import { Menu, type MenuItem } from '@actual-app/components/menu';
+import { Popover } from '@actual-app/components/popover';
+import { type CSSProperties, styles } from '@actual-app/components/styles';
+import { Text } from '@actual-app/components/text';
+import { theme } from '@actual-app/components/theme';
+import { View } from '@actual-app/components/view';
+
import { useModalState } from '../hooks/useModalState';
import {
AvoidRefocusScrollProvider,
useProperFocus,
} from '../hooks/useProperFocus';
import { useSelectedItems } from '../hooks/useSelected';
-import { AnimatedLoading } from '../icons/AnimatedLoading';
import { SvgDelete, SvgExpandArrow } from '../icons/v0';
import { SvgCheckmark } from '../icons/v1';
-import { type CSSProperties, styles, theme } from '../style';
-import { Button } from './common/Button2';
import { Input } from './common/Input';
-import { Menu, type MenuItem } from './common/Menu';
-import { Popover } from './common/Popover';
-import { Text } from './common/Text';
-import { View } from './common/View';
import { FixedSizeList } from './FixedSizeList';
import {
ConditionalPrivacyFilter,
diff --git a/upcoming-release-notes/4346.md b/upcoming-release-notes/4346.md
new file mode 100644
index 0000000000..14e6d0f568
--- /dev/null
+++ b/upcoming-release-notes/4346.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [MatissJanis]
+---
+
+Move more reusable components to `@actual-app/components`.