diff --git a/packages/desktop-client/src/auth/ProtectedRoute.tsx b/packages/desktop-client/src/auth/ProtectedRoute.tsx index 0dad71a1c38..202980b9b21 100644 --- a/packages/desktop-client/src/auth/ProtectedRoute.tsx +++ b/packages/desktop-client/src/auth/ProtectedRoute.tsx @@ -1,8 +1,9 @@ import { useEffect, useState, type ReactElement } from 'react'; +import { View } from '@actual-app/components/view'; + import { type RemoteFile, type SyncedLocalFile } from 'loot-core/types/file'; -import { View } from '../components/common/View'; import { useMetadataPref } from '../hooks/useMetadataPref'; import { useSelector } from '../redux'; diff --git a/packages/desktop-client/src/components/AnimatedRefresh.tsx b/packages/desktop-client/src/components/AnimatedRefresh.tsx index b9273bf9556..d794c34f704 100644 --- a/packages/desktop-client/src/components/AnimatedRefresh.tsx +++ b/packages/desktop-client/src/components/AnimatedRefresh.tsx @@ -1,12 +1,11 @@ // @ts-strict-ignore import React, { type CSSProperties } from 'react'; +import { View } from '@actual-app/components/view'; import { keyframes } from '@emotion/css'; import { SvgRefresh } from '../icons/v1'; -import { View } from './common/View'; - const spin = keyframes({ '0%': { transform: 'rotateZ(0deg)' }, '100%': { transform: 'rotateZ(360deg)' }, diff --git a/packages/desktop-client/src/components/App.tsx b/packages/desktop-client/src/components/App.tsx index e6a09c936c2..1960539e6ef 100644 --- a/packages/desktop-client/src/components/App.tsx +++ b/packages/desktop-client/src/components/App.tsx @@ -11,6 +11,9 @@ import { HotkeysProvider } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; import { BrowserRouter } from 'react-router-dom'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { addNotification, closeBudget, @@ -27,12 +30,11 @@ import { handleGlobalEvents } from '../global-events'; import { useMetadataPref } from '../hooks/useMetadataPref'; import { installPolyfills } from '../polyfills'; import { useDispatch, useSelector, useStore } from '../redux'; -import { styles, hasHiddenScrollbars, ThemeStyle, useTheme } from '../style'; +import { hasHiddenScrollbars, ThemeStyle, useTheme } from '../style'; import { ExposeNavigate } from '../util/router-tools'; import { AppBackground } from './AppBackground'; import { BudgetMonthCountProvider } from './budget/BudgetMonthCountContext'; -import { View } from './common/View'; import { DevelopmentTopBar } from './DevelopmentTopBar'; import { FatalError } from './FatalError'; import { FinancesApp } from './FinancesApp'; diff --git a/packages/desktop-client/src/components/BankSyncStatus.tsx b/packages/desktop-client/src/components/BankSyncStatus.tsx index 843b62d3e3f..554a37c2748 100644 --- a/packages/desktop-client/src/components/BankSyncStatus.tsx +++ b/packages/desktop-client/src/components/BankSyncStatus.tsx @@ -2,12 +2,14 @@ import React from 'react'; import { Trans } from 'react-i18next'; import { useTransition, animated } from 'react-spring'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useSelector } from '../redux'; -import { theme, styles } from '../style'; +import { theme } from '../style'; import { AnimatedRefresh } from './AnimatedRefresh'; -import { Text } from './common/Text'; -import { View } from './common/View'; export function BankSyncStatus() { const accountsSyncing = useSelector(state => state.account.accountsSyncing); diff --git a/packages/desktop-client/src/components/DevelopmentTopBar.tsx b/packages/desktop-client/src/components/DevelopmentTopBar.tsx index c92375a402d..9fd121551e2 100644 --- a/packages/desktop-client/src/components/DevelopmentTopBar.tsx +++ b/packages/desktop-client/src/components/DevelopmentTopBar.tsx @@ -1,7 +1,8 @@ +import { View } from '@actual-app/components/view'; + import { theme } from '../style'; import { Link } from './common/Link'; -import { View } from './common/View'; export function DevelopmentTopBar() { return ( diff --git a/packages/desktop-client/src/components/EditablePageHeaderTitle.tsx b/packages/desktop-client/src/components/EditablePageHeaderTitle.tsx index 0552bb4bb33..2e883ddd89e 100644 --- a/packages/desktop-client/src/components/EditablePageHeaderTitle.tsx +++ b/packages/desktop-client/src/components/EditablePageHeaderTitle.tsx @@ -1,12 +1,13 @@ import React, { useCallback, useEffect, useState } from 'react'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { View } from '@actual-app/components/view'; + import { SvgPencil1 } from '../icons/v2'; import { theme } from '../style'; -import { Button } from './common/Button2'; -import { InitialFocus } from './common/InitialFocus'; import { Input } from './common/Input'; -import { View } from './common/View'; type EditablePageHeaderTitleProps = { title: string; diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx index b56947979bd..156cc95cf02 100644 --- a/packages/desktop-client/src/components/FinancesApp.tsx +++ b/packages/desktop-client/src/components/FinancesApp.tsx @@ -9,6 +9,8 @@ import { useHref, } from 'react-router-dom'; +import { View } from '@actual-app/components/view'; + import { addNotification } from 'loot-core/client/actions'; import { sync } from 'loot-core/client/app/appSlice'; import * as undo from 'loot-core/platform/client/undo'; @@ -26,7 +28,6 @@ import { getIsOutdated, getLatestVersion } from '../util/versions'; import { UserAccessPage } from './admin/UserAccess/UserAccessPage'; import { BankSync } from './banksync'; import { BankSyncStatus } from './BankSyncStatus'; -import { View } from './common/View'; import { GlobalKeys } from './GlobalKeys'; import { ManageRulesPage } from './ManageRulesPage'; import { Category } from './mobile/budget/Category'; diff --git a/packages/desktop-client/src/components/FixedSizeList.tsx b/packages/desktop-client/src/components/FixedSizeList.tsx index 0baf528d125..7fe51ccca70 100644 --- a/packages/desktop-client/src/components/FixedSizeList.tsx +++ b/packages/desktop-client/src/components/FixedSizeList.tsx @@ -9,10 +9,9 @@ import { type CSSProperties, } from 'react'; +import { View } from '@actual-app/components/view'; import memoizeOne from 'memoize-one'; -import { View } from './common/View'; - const IS_SCROLLING_DEBOUNCE_INTERVAL = 150; const defaultItemKey: FixedSizeListProps['itemKey'] = (index: number) => index; diff --git a/packages/desktop-client/src/components/HelpMenu.tsx b/packages/desktop-client/src/components/HelpMenu.tsx index 40a4208ed41..8b28ccafac9 100644 --- a/packages/desktop-client/src/components/HelpMenu.tsx +++ b/packages/desktop-client/src/components/HelpMenu.tsx @@ -3,6 +3,10 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { Trans, useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { SpaceBetween } from '@actual-app/components/space-between'; import { useToggle } from 'usehooks-ts'; import { pushModal } from 'loot-core/client/actions/modals'; @@ -11,11 +15,6 @@ import { useFeatureFlag } from '../hooks/useFeatureFlag'; import { SvgHelp } from '../icons/v2/Help'; import { useDispatch } from '../redux'; -import { Button } from './common/Button2'; -import { Menu } from './common/Menu'; -import { Popover } from './common/Popover'; -import { SpaceBetween } from './common/SpaceBetween'; - const getPageDocs = (page: string) => { switch (page) { case '/budget': diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx index 8ee81e32b7d..b8b849ab610 100644 --- a/packages/desktop-client/src/components/LoggedInUser.tsx +++ b/packages/desktop-client/src/components/LoggedInUser.tsx @@ -2,6 +2,13 @@ import React, { useState, useEffect, useRef, type CSSProperties } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Menu } 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 { closeBudget, getUserData, signOut } from 'loot-core/client/actions'; import { listen } from 'loot-core/platform/client/fetch'; import { type RemoteFile, type SyncedLocalFile } from 'loot-core/types/file'; @@ -12,13 +19,8 @@ import { Permissions } from '../auth/types'; import { useMetadataPref } from '../hooks/useMetadataPref'; import { useNavigate } from '../hooks/useNavigate'; import { useSelector, useDispatch } from '../redux'; -import { theme, styles } from '../style'; +import { theme } from '../style'; -import { Button } from './common/Button2'; -import { Menu } from './common/Menu'; -import { Popover } from './common/Popover'; -import { Text } from './common/Text'; -import { View } from './common/View'; import { PrivacyFilter } from './PrivacyFilter'; import { useMultiuserEnabled, useServerURL } from './ServerContext'; diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index 5963995aab1..7e8e9aeabeb 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -9,6 +9,11 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions/modals'; import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { initiallyLoadPayees } from 'loot-core/client/queries/queriesSlice'; @@ -27,13 +32,9 @@ import { useSelected, SelectedProvider } from '../hooks/useSelected'; import { useDispatch } from '../redux'; import { theme } from '../style'; -import { Button } from './common/Button2'; import { Link } from './common/Link'; import { Search } from './common/Search'; import { SimpleTable } from './common/SimpleTable'; -import { Stack } from './common/Stack'; -import { Text } from './common/Text'; -import { View } from './common/View'; import { RulesHeader } from './rules/RulesHeader'; import { RulesList } from './rules/RulesList'; diff --git a/packages/desktop-client/src/components/Notes.tsx b/packages/desktop-client/src/components/Notes.tsx index 2f131a7f6a9..2fd4af9b8cb 100644 --- a/packages/desktop-client/src/components/Notes.tsx +++ b/packages/desktop-client/src/components/Notes.tsx @@ -3,13 +3,13 @@ import React, { useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import ReactMarkdown from 'react-markdown'; +import { Text } from '@actual-app/components/text'; import { css } from '@emotion/css'; import remarkGfm from 'remark-gfm'; import { type CSSProperties, theme } from '../style'; import { remarkBreaks, sequentialNewlinesPlugin } from '../util/markdown'; -import { Text } from './common/Text'; import { useResponsive } from './responsive/ResponsiveProvider'; const remarkPlugins = [sequentialNewlinesPlugin, remarkGfm, remarkBreaks]; diff --git a/packages/desktop-client/src/components/NotesButton.tsx b/packages/desktop-client/src/components/NotesButton.tsx index 56624163a18..5bdc8390107 100644 --- a/packages/desktop-client/src/components/NotesButton.tsx +++ b/packages/desktop-client/src/components/NotesButton.tsx @@ -7,16 +7,17 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; + import { send } from 'loot-core/platform/client/fetch'; import { useNotes } from '../hooks/useNotes'; import { SvgCustomNotesPaper } from '../icons/v2'; import { theme } from '../style'; -import { Button } from './common/Button2'; -import { Popover } from './common/Popover'; -import { Tooltip } from './common/Tooltip'; -import { View } from './common/View'; import { Notes } from './Notes'; type NotesButtonProps = { diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsx index 652ff2524e2..53524f4eafc 100644 --- a/packages/desktop-client/src/components/Notifications.tsx +++ b/packages/desktop-client/src/components/Notifications.tsx @@ -8,6 +8,11 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { removeNotification } from 'loot-core/client/actions'; @@ -16,13 +21,9 @@ import type { NotificationWithId } from 'loot-core/client/state-types/notificati import { AnimatedLoading } from '../icons/AnimatedLoading'; import { SvgDelete } from '../icons/v0'; import { useSelector, useDispatch } from '../redux'; -import { styles, theme } from '../style'; +import { theme } from '../style'; -import { Button, ButtonWithLoading } from './common/Button2'; import { Link } from './common/Link'; -import { Stack } from './common/Stack'; -import { Text } from './common/Text'; -import { View } from './common/View'; import { useResponsive } from './responsive/ResponsiveProvider'; function compileMessage( diff --git a/packages/desktop-client/src/components/Page.tsx b/packages/desktop-client/src/components/Page.tsx index 6e750ce13d1..4683dab9a8e 100644 --- a/packages/desktop-client/src/components/Page.tsx +++ b/packages/desktop-client/src/components/Page.tsx @@ -1,9 +1,11 @@ import React, { type ReactNode, type CSSProperties } from 'react'; -import { theme, styles } from '../style'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + +import { theme } from '../style'; -import { Text } from './common/Text'; -import { View } from './common/View'; import { useResponsive } from './responsive/ResponsiveProvider'; const HEADER_HEIGHT = 50; diff --git a/packages/desktop-client/src/components/PrivacyFilter.tsx b/packages/desktop-client/src/components/PrivacyFilter.tsx index 652b927ac2b..80998adc3bc 100644 --- a/packages/desktop-client/src/components/PrivacyFilter.tsx +++ b/packages/desktop-client/src/components/PrivacyFilter.tsx @@ -5,11 +5,11 @@ import React, { type ReactNode, } from 'react'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { usePrivacyMode } from '../hooks/usePrivacyMode'; -import { View } from './common/View'; import { useResponsive } from './responsive/ResponsiveProvider'; type ConditionalPrivacyFilterProps = { diff --git a/packages/desktop-client/src/components/ThemeSelector.tsx b/packages/desktop-client/src/components/ThemeSelector.tsx index d14c0e1d04d..659158b1a35 100644 --- a/packages/desktop-client/src/components/ThemeSelector.tsx +++ b/packages/desktop-client/src/components/ThemeSelector.tsx @@ -1,14 +1,15 @@ import React, { useRef, useState, type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; + import type { Theme } from 'loot-core/types/prefs'; import { SvgMoonStars, SvgSun, SvgSystem } from '../icons/v2'; import { themeOptions, useTheme } from '../style'; -import { Button } from './common/Button2'; -import { Menu } from './common/Menu'; -import { Popover } from './common/Popover'; import { useResponsive } from './responsive/ResponsiveProvider'; type ThemeSelectorProps = { diff --git a/packages/desktop-client/src/components/Titlebar.tsx b/packages/desktop-client/src/components/Titlebar.tsx index 0fd74e7cbe4..f8e630935c5 100644 --- a/packages/desktop-client/src/components/Titlebar.tsx +++ b/packages/desktop-client/src/components/Titlebar.tsx @@ -3,6 +3,11 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; import { Routes, Route, useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { SpaceBetween } from '@actual-app/components/space-between'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { sync } from 'loot-core/client/app/appSlice'; @@ -26,16 +31,12 @@ import { SvgViewShow, } from '../icons/v2'; import { useDispatch } from '../redux'; -import { theme, styles, type CSSProperties } from '../style'; +import { theme, type CSSProperties } from '../style'; import { AccountSyncCheck } from './accounts/AccountSyncCheck'; import { AnimatedRefresh } from './AnimatedRefresh'; import { MonthCountSelector } from './budget/MonthCountSelector'; -import { Button } from './common/Button2'; import { Link } from './common/Link'; -import { SpaceBetween } from './common/SpaceBetween'; -import { Text } from './common/Text'; -import { View } from './common/View'; import { HelpMenu } from './HelpMenu'; import { LoggedInUser } from './LoggedInUser'; import { useResponsive } from './responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/UpdateNotification.tsx b/packages/desktop-client/src/components/UpdateNotification.tsx index 6d5fbba55d9..5b7301242f3 100644 --- a/packages/desktop-client/src/components/UpdateNotification.tsx +++ b/packages/desktop-client/src/components/UpdateNotification.tsx @@ -1,16 +1,17 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { setAppState, updateApp } from 'loot-core/client/app/appSlice'; import { SvgClose } from '../icons/v1'; import { useSelector, useDispatch } from '../redux'; import { theme } from '../style'; -import { Button } from './common/Button2'; import { Link } from './common/Link'; -import { Text } from './common/Text'; -import { View } from './common/View'; export function UpdateNotification() { const { t } = useTranslation(); diff --git a/packages/desktop-client/src/components/accounts/Account.tsx b/packages/desktop-client/src/components/accounts/Account.tsx index 0f5b199bb85..a882d7397a1 100644 --- a/packages/desktop-client/src/components/accounts/Account.tsx +++ b/packages/desktop-client/src/components/accounts/Account.tsx @@ -9,6 +9,10 @@ import React, { import { Trans } from 'react-i18next'; import { Navigate, useParams, useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { debounce } from 'debounce'; import { t } from 'i18next'; import { v4 as uuidv4 } from 'uuid'; @@ -83,10 +87,7 @@ import { import { useSyncedPref } from '../../hooks/useSyncedPref'; import { useTransactionBatchActions } from '../../hooks/useTransactionBatchActions'; import { useSelector, useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { type SavedFilter } from '../filters/SavedFilterMenuButton'; import { TransactionList } from '../transactions/TransactionList'; import { validateAccountName } from '../util/accountValidation'; diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx index f91425bbaec..cf1143ccd2b 100644 --- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx +++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx @@ -2,6 +2,10 @@ import React, { useCallback, useRef, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; + import { unlinkAccount } from 'loot-core/client/accounts/accountsSlice'; import { type AccountEntity } from 'loot-core/types/models'; @@ -11,10 +15,7 @@ import { useFailedAccounts } from '../../hooks/useFailedAccounts'; import { SvgExclamationOutline } from '../../icons/v1'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; function useErrorMessage() { const { t } = useTranslation(); diff --git a/packages/desktop-client/src/components/accounts/Balance.tsx b/packages/desktop-client/src/components/accounts/Balance.tsx index b0c37a5de40..136a0c0fc7b 100644 --- a/packages/desktop-client/src/components/accounts/Balance.tsx +++ b/packages/desktop-client/src/components/accounts/Balance.tsx @@ -1,6 +1,9 @@ import React, { useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { useHover } from 'usehooks-ts'; import { useCachedSchedules } from 'loot-core/client/data-hooks/schedules'; @@ -12,9 +15,6 @@ import { type AccountEntity } from 'loot-core/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; import { SvgArrowButtonRight1 } from '../../icons/v2'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { PrivacyFilter } from '../PrivacyFilter'; import { type Binding } from '../spreadsheet'; import { CellValue, CellValueText } from '../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/accounts/Header.tsx b/packages/desktop-client/src/components/accounts/Header.tsx index 08e7147a416..59534cab9a1 100644 --- a/packages/desktop-client/src/components/accounts/Header.tsx +++ b/packages/desktop-client/src/components/accounts/Header.tsx @@ -8,6 +8,14 @@ import React, { import { useHotkeys } from 'react-hotkeys-hook'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type AccountEntity, type RuleConditionEntity, @@ -27,17 +35,11 @@ import { SvgLockClosed, SvgPencil1, } from '../../icons/v2'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { AnimatedRefresh } from '../AnimatedRefresh'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Input } from '../common/Input'; -import { Menu } from '../common/Menu'; import { MenuButton } from '../common/MenuButton'; -import { Popover } from '../common/Popover'; import { Search } from '../common/Search'; -import { Stack } from '../common/Stack'; -import { View } from '../common/View'; import { FilterButton } from '../filters/FiltersMenu'; import { FiltersStack } from '../filters/FiltersStack'; import { type SavedFilter } from '../filters/SavedFilterMenuButton'; diff --git a/packages/desktop-client/src/components/accounts/Reconcile.tsx b/packages/desktop-client/src/components/accounts/Reconcile.tsx index b98eedbddd4..a05a943a58c 100644 --- a/packages/desktop-client/src/components/accounts/Reconcile.tsx +++ b/packages/desktop-client/src/components/accounts/Reconcile.tsx @@ -1,6 +1,12 @@ import React, { useState } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import * as queries from 'loot-core/client/queries'; import { type Query } from 'loot-core/shared/query'; import { currencyToInteger } from 'loot-core/shared/util'; @@ -8,12 +14,8 @@ import { type AccountEntity } from 'loot-core/types/models'; import { type TransObjectLiteral } from 'loot-core/types/util'; import { SvgCheckCircle1 } from '../../icons/v2'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; +import { theme } from '../../style'; import { Input } from '../common/Input'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useFormat } from '../spreadsheet/useFormat'; import { useSheetValue } from '../spreadsheet/useSheetValue'; diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx index 38290d3d939..64996f470a8 100644 --- a/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx +++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx @@ -10,6 +10,10 @@ import React, { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, pushModal } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import * as undo from 'loot-core/platform/client/undo'; @@ -22,12 +26,9 @@ import { SvgLockOpen } from '../../../icons/v1'; import { SvgLockClosed } from '../../../icons/v2'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; import { Link } from '../../common/Link'; import { Search } from '../../common/Search'; import { SimpleTable } from '../../common/SimpleTable'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { UserAccessHeader } from './UserAccessHeader'; import { UserAccessRow } from './UserAccessRow'; diff --git a/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx b/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx index ae9d5915c4e..88eca07c9a0 100644 --- a/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx +++ b/packages/desktop-client/src/components/admin/UserAccess/UserAccessRow.tsx @@ -2,6 +2,8 @@ import React, { memo, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { addNotification, signOut } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import { getUserAccessErrors } from 'loot-core/shared/errors'; @@ -10,7 +12,6 @@ import { type UserAvailable } from 'loot-core/types/models'; import { useMetadataPref } from '../../../hooks/useMetadataPref'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { View } from '../../common/View'; import { Checkbox } from '../../forms'; import { Row, Cell } from '../../table'; diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx index db659eada28..77341079403 100644 --- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx +++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx @@ -10,6 +10,11 @@ import { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, signOut } from 'loot-core/client/actions'; import { pushModal } from 'loot-core/client/actions/modals'; import { send } from 'loot-core/platform/client/fetch'; @@ -22,13 +27,9 @@ import { import { SelectedProvider, useSelected } from '../../../hooks/useSelected'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; import { Link } from '../../common/Link'; import { Search } from '../../common/Search'; import { SimpleTable } from '../../common/SimpleTable'; -import { Stack } from '../../common/Stack'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { UserDirectoryHeader } from './UserDirectoryHeader'; import { UserDirectoryRow } from './UserDirectoryRow'; diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryPage.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryPage.tsx index ec8fd223f6e..58cf88afa01 100644 --- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryPage.tsx +++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryPage.tsx @@ -1,9 +1,10 @@ import React, { type ReactNode } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { useNavigate } from '../../../hooks/useNavigate'; -import { Button } from '../../common/Button2'; -import { View } from '../../common/View'; import { Page } from '../../Page'; import { UserDirectory } from './UserDirectory'; diff --git a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx index 391b9f33912..a26c7050c2f 100644 --- a/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx +++ b/packages/desktop-client/src/components/admin/UserDirectory/UserDirectoryRow.tsx @@ -2,12 +2,13 @@ import React, { memo } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { PossibleRoles, type UserEntity } from 'loot-core/types/models/user'; import { useSelectedDispatch } from '../../../hooks/useSelected'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { View } from '../../common/View'; import { Checkbox } from '../../forms'; import { SelectCell, Row, Cell } from '../../table'; diff --git a/packages/desktop-client/src/components/alerts.tsx b/packages/desktop-client/src/components/alerts.tsx index ee04560d1ff..7ab8b324004 100644 --- a/packages/desktop-client/src/components/alerts.tsx +++ b/packages/desktop-client/src/components/alerts.tsx @@ -5,11 +5,12 @@ import React, { type CSSProperties, } from 'react'; -import { SvgExclamationOutline, SvgInformationOutline } from '../icons/v1'; -import { styles, theme } from '../style'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; -import { Text } from './common/Text'; -import { View } from './common/View'; +import { SvgExclamationOutline, SvgInformationOutline } from '../icons/v1'; +import { theme } from '../style'; type AlertProps = { icon?: ComponentType<{ width?: number; style?: CSSProperties }>; diff --git a/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx index 967e2630705..a4786f9576b 100644 --- a/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx @@ -8,14 +8,15 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; import { css, cx } from '@emotion/css'; import { type AccountEntity } from 'loot-core/types/models'; import { useAccounts } from '../../hooks/useAccounts'; -import { theme, styles } from '../../style'; -import { TextOneLine } from '../common/TextOneLine'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { Autocomplete } from './Autocomplete'; diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index 914cb0db7c3..c79698da2de 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -11,17 +11,18 @@ import React, { useState, } from 'react'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css, cx } from '@emotion/css'; import Downshift, { type StateChangeTypes } from 'downshift'; import { getNormalisedString } from 'loot-core/shared/normalisation'; import { SvgRemove } from '../../icons/v2'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { Button } from '../common/Button'; import { Input } from '../common/Input'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; type CommonAutocompleteProps = { diff --git a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx index c3ba3d990b0..913a7bc19a9 100644 --- a/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx @@ -12,6 +12,10 @@ import React, { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; import { css, cx } from '@emotion/css'; import { trackingBudget, envelopeBudget } from 'loot-core/client/queries'; @@ -25,12 +29,9 @@ import { import { useCategories } from '../../hooks/useCategories'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { SvgSplit } from '../../icons/v0'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { useEnvelopeSheetValue } from '../budget/envelope/EnvelopeBudgetComponents'; import { makeAmountFullStyle } from '../budget/util'; -import { Text } from '../common/Text'; -import { TextOneLine } from '../common/TextOneLine'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { useSheetValue } from '../spreadsheet/useSheetValue'; diff --git a/packages/desktop-client/src/components/autocomplete/FilterList.tsx b/packages/desktop-client/src/components/autocomplete/FilterList.tsx index 1e4e0191b68..f5332b48f8a 100644 --- a/packages/desktop-client/src/components/autocomplete/FilterList.tsx +++ b/packages/desktop-client/src/components/autocomplete/FilterList.tsx @@ -1,8 +1,9 @@ import React, { type ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style/theme'; -import { View } from '../common/View'; import { ItemHeader } from './ItemHeader'; diff --git a/packages/desktop-client/src/components/autocomplete/ItemHeader.tsx b/packages/desktop-client/src/components/autocomplete/ItemHeader.tsx index 1d9bf95c12d..18cbb9c9ed2 100644 --- a/packages/desktop-client/src/components/autocomplete/ItemHeader.tsx +++ b/packages/desktop-client/src/components/autocomplete/ItemHeader.tsx @@ -1,6 +1,8 @@ import React, { type CSSProperties } from 'react'; -import { styles, theme } from '../../style'; +import { styles } from '@actual-app/components/styles'; + +import { theme } from '../../style'; import { useResponsive } from '../responsive/ResponsiveProvider'; type ItemHeaderProps = { diff --git a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx index f1113913a50..0b14526a9eb 100644 --- a/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx @@ -13,6 +13,9 @@ import React, { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; import { css, cx } from '@emotion/css'; import { @@ -26,10 +29,8 @@ import { useAccounts } from '../../hooks/useAccounts'; import { useCommonPayees, usePayees } from '../../hooks/usePayees'; import { SvgAdd, SvgBookmark } from '../../icons/v1'; import { useDispatch } from '../../redux'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { Button } from '../common/Button'; -import { TextOneLine } from '../common/TextOneLine'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { diff --git a/packages/desktop-client/src/components/autocomplete/ReportList.tsx b/packages/desktop-client/src/components/autocomplete/ReportList.tsx index f4fb2cb553c..c1212931871 100644 --- a/packages/desktop-client/src/components/autocomplete/ReportList.tsx +++ b/packages/desktop-client/src/components/autocomplete/ReportList.tsx @@ -1,8 +1,9 @@ import React, { Fragment, type ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style/theme'; -import { View } from '../common/View'; import { ItemHeader } from './ItemHeader'; diff --git a/packages/desktop-client/src/components/banksync/AccountRow.tsx b/packages/desktop-client/src/components/banksync/AccountRow.tsx index 4934b9f6741..e98d2242f92 100644 --- a/packages/desktop-client/src/components/banksync/AccountRow.tsx +++ b/packages/desktop-client/src/components/banksync/AccountRow.tsx @@ -1,12 +1,13 @@ import React, { memo } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; + import { format } from 'loot-core/src/shared/months'; import { type AccountEntity } from 'loot-core/src/types/models'; import { useDateFormat } from '../../hooks/useDateFormat'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Row, Cell } from '../table'; const tsToString = (ts: string | null, dateFormat: string) => { diff --git a/packages/desktop-client/src/components/banksync/AccountsList.tsx b/packages/desktop-client/src/components/banksync/AccountsList.tsx index d1930bef993..4bff9360ac4 100644 --- a/packages/desktop-client/src/components/banksync/AccountsList.tsx +++ b/packages/desktop-client/src/components/banksync/AccountsList.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { type AccountEntity } from 'loot-core/src/types/models'; +import { View } from '@actual-app/components/view'; -import { View } from '../common/View'; +import { type AccountEntity } from 'loot-core/src/types/models'; import { AccountRow } from './AccountRow'; diff --git a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx index 32426028998..f820d99061b 100644 --- a/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx +++ b/packages/desktop-client/src/components/banksync/EditSyncAccount.tsx @@ -1,6 +1,10 @@ import React, { useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; + import { useTransactions } from 'loot-core/client/data-hooks/transactions'; import { defaultMappings, @@ -15,10 +19,7 @@ import { } from 'loot-core/src/types/models'; import { useSyncedPref } from '../../hooks/useSyncedPref'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; import { CheckboxOption } from '../modals/ImportTransactionsModal/CheckboxOption'; import { FieldMapping } from './FieldMapping'; diff --git a/packages/desktop-client/src/components/banksync/FieldMapping.tsx b/packages/desktop-client/src/components/banksync/FieldMapping.tsx index 4c73963e6a2..e4b61f71c32 100644 --- a/packages/desktop-client/src/components/banksync/FieldMapping.tsx +++ b/packages/desktop-client/src/components/banksync/FieldMapping.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; + import { SvgRightArrow2 } from '../../icons/v0'; import { SvgEquals } from '../../icons/v1'; import { theme } from '../../style'; import { Select } from '../common/Select'; -import { Text } from '../common/Text'; import { Row, Cell, TableHeader } from '../table'; import { diff --git a/packages/desktop-client/src/components/banksync/index.tsx b/packages/desktop-client/src/components/banksync/index.tsx index e1615f47cee..4526920cad4 100644 --- a/packages/desktop-client/src/components/banksync/index.tsx +++ b/packages/desktop-client/src/components/banksync/index.tsx @@ -1,6 +1,9 @@ import { useMemo, useState, useCallback } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/src/client/actions/modals'; import { type BankSyncProviders, @@ -10,8 +13,6 @@ import { import { useAccounts } from '../../hooks/useAccounts'; import { useGlobalPref } from '../../hooks/useGlobalPref'; import { useDispatch } from '../../redux'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { MOBILE_NAV_HEIGHT } from '../mobile/MobileNavTabs'; import { Page } from '../Page'; import { useResponsive } from '../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx index 320c29dc7be..5a63b14c41f 100644 --- a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx +++ b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx @@ -7,15 +7,16 @@ import React, { } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { type TransObjectLiteral } from 'loot-core/types/util'; import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { SvgArrowThinRight } from '../../icons/v1'; -import { theme, styles } from '../../style'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { type Binding } from '../spreadsheet'; import { CellValue, CellValueText } from '../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/budget/BudgetCategories.jsx b/packages/desktop-client/src/components/budget/BudgetCategories.jsx index 12efffd809b..b3a08e22782 100644 --- a/packages/desktop-client/src/components/budget/BudgetCategories.jsx +++ b/packages/desktop-client/src/components/budget/BudgetCategories.jsx @@ -1,8 +1,10 @@ import React, { memo, useState, useMemo } from 'react'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { useLocalPref } from '../../hooks/useLocalPref'; -import { theme, styles } from '../../style'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { DropHighlightPosContext } from '../sort'; import { Row } from '../table'; diff --git a/packages/desktop-client/src/components/budget/BudgetPageHeader.tsx b/packages/desktop-client/src/components/budget/BudgetPageHeader.tsx index dfdb5844885..ef61f4c0401 100644 --- a/packages/desktop-client/src/components/budget/BudgetPageHeader.tsx +++ b/packages/desktop-client/src/components/budget/BudgetPageHeader.tsx @@ -1,7 +1,7 @@ // @ts-strict-ignore import React, { type ComponentProps, memo } from 'react'; -import { View } from '../common/View'; +import { View } from '@actual-app/components/view'; import { MonthPicker } from './MonthPicker'; import { getScrollbarWidth } from './util'; diff --git a/packages/desktop-client/src/components/budget/BudgetSummaries.tsx b/packages/desktop-client/src/components/budget/BudgetSummaries.tsx index 5308e8a36ac..8dffb677d65 100644 --- a/packages/desktop-client/src/components/budget/BudgetSummaries.tsx +++ b/packages/desktop-client/src/components/budget/BudgetSummaries.tsx @@ -7,12 +7,12 @@ import React, { } from 'react'; import { useSpring, animated } from 'react-spring'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { addMonths, subMonths } from 'loot-core/shared/months'; import { useResizeObserver } from '../../hooks/useResizeObserver'; -import { View } from '../common/View'; import { type BudgetSummary as EnvelopeBudgetSummary } from './envelope/budgetsummary/BudgetSummary'; import { MonthsContext } from './MonthsContext'; diff --git a/packages/desktop-client/src/components/budget/BudgetTable.tsx b/packages/desktop-client/src/components/budget/BudgetTable.tsx index 66481fd64af..bcdf1719277 100644 --- a/packages/desktop-client/src/components/budget/BudgetTable.tsx +++ b/packages/desktop-client/src/components/budget/BudgetTable.tsx @@ -4,6 +4,9 @@ import React, { useState, } from 'react'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type CategoryEntity, type CategoryGroupEntity, @@ -11,8 +14,7 @@ import { import { useCategories } from '../../hooks/useCategories'; import { useLocalPref } from '../../hooks/useLocalPref'; -import { theme, styles } from '../../style'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { type DropPosition } from '../sort'; import { BudgetCategories } from './BudgetCategories'; diff --git a/packages/desktop-client/src/components/budget/BudgetTotals.tsx b/packages/desktop-client/src/components/budget/BudgetTotals.tsx index fa3e348b28f..59b9a2f4bc1 100644 --- a/packages/desktop-client/src/components/budget/BudgetTotals.tsx +++ b/packages/desktop-client/src/components/budget/BudgetTotals.tsx @@ -1,12 +1,14 @@ import React, { type ComponentProps, memo, useRef, useState } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { SvgDotsHorizontalTriple } from '../../icons/v1'; -import { theme, styles } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { RenderMonths } from './RenderMonths'; import { getScrollbarWidth } from './util'; diff --git a/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx b/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx index 416c6be8d14..0875fda55dc 100644 --- a/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx +++ b/packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx @@ -3,9 +3,9 @@ import React, { useEffect, type ComponentProps } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import AutoSizer from 'react-virtualized-auto-sizer'; -import * as monthUtils from 'loot-core/shared/months'; +import { View } from '@actual-app/components/view'; -import { View } from '../common/View'; +import * as monthUtils from 'loot-core/shared/months'; import { useBudgetMonthCount } from './BudgetMonthCountContext'; import { BudgetPageHeader } from './BudgetPageHeader'; diff --git a/packages/desktop-client/src/components/budget/ExpenseCategory.tsx b/packages/desktop-client/src/components/budget/ExpenseCategory.tsx index f11721c2063..ed6877dee96 100644 --- a/packages/desktop-client/src/components/budget/ExpenseCategory.tsx +++ b/packages/desktop-client/src/components/budget/ExpenseCategory.tsx @@ -1,13 +1,14 @@ // @ts-strict-ignore import React, { type ComponentProps } from 'react'; +import { View } from '@actual-app/components/view'; + import { type CategoryGroupEntity, type CategoryEntity, } from 'loot-core/types/models'; import { theme } from '../../style'; -import { View } from '../common/View'; import { useDraggable, useDroppable, diff --git a/packages/desktop-client/src/components/budget/ExpenseGroup.tsx b/packages/desktop-client/src/components/budget/ExpenseGroup.tsx index 5fdbf16d848..61dad6f1e23 100644 --- a/packages/desktop-client/src/components/budget/ExpenseGroup.tsx +++ b/packages/desktop-client/src/components/budget/ExpenseGroup.tsx @@ -1,8 +1,9 @@ // @ts-strict-ignore import React, { type ComponentProps } from 'react'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style'; -import { View } from '../common/View'; import { useDraggable, useDroppable, diff --git a/packages/desktop-client/src/components/budget/IncomeHeader.tsx b/packages/desktop-client/src/components/budget/IncomeHeader.tsx index 193188fcf9d..3f3fbc1db3e 100644 --- a/packages/desktop-client/src/components/budget/IncomeHeader.tsx +++ b/packages/desktop-client/src/components/budget/IncomeHeader.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { Trans } from 'react-i18next'; -import { Button } from '../common/Button2'; -import { View } from '../common/View'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; import { RenderMonths } from './RenderMonths'; diff --git a/packages/desktop-client/src/components/budget/MonthCountSelector.tsx b/packages/desktop-client/src/components/budget/MonthCountSelector.tsx index 22019451ae3..13a0163450a 100644 --- a/packages/desktop-client/src/components/budget/MonthCountSelector.tsx +++ b/packages/desktop-client/src/components/budget/MonthCountSelector.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { SvgCalendar } from '../../icons/v2'; import { theme } from '../../style'; -import { View } from '../common/View'; import { useBudgetMonthCount } from './BudgetMonthCountContext'; diff --git a/packages/desktop-client/src/components/budget/MonthPicker.tsx b/packages/desktop-client/src/components/budget/MonthPicker.tsx index d75c9725dc7..2085f52f7f2 100644 --- a/packages/desktop-client/src/components/budget/MonthPicker.tsx +++ b/packages/desktop-client/src/components/budget/MonthPicker.tsx @@ -2,13 +2,15 @@ import React, { type CSSProperties, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { useResizeObserver } from '../../hooks/useResizeObserver'; import { SvgCalendar } from '../../icons/v2'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { Link } from '../common/Link'; -import { View } from '../common/View'; import { type MonthBounds } from './MonthsContext'; diff --git a/packages/desktop-client/src/components/budget/RenderMonths.tsx b/packages/desktop-client/src/components/budget/RenderMonths.tsx index 4a80049c8ce..2b761c862f0 100644 --- a/packages/desktop-client/src/components/budget/RenderMonths.tsx +++ b/packages/desktop-client/src/components/budget/RenderMonths.tsx @@ -5,10 +5,11 @@ import React, { type ComponentType, } from 'react'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { theme } from '../../style'; -import { View } from '../common/View'; import { NamespaceContext } from '../spreadsheet/NamespaceContext'; import { MonthsContext } from './MonthsContext'; diff --git a/packages/desktop-client/src/components/budget/SidebarCategory.tsx b/packages/desktop-client/src/components/budget/SidebarCategory.tsx index 91cf34c7986..c64880840dc 100644 --- a/packages/desktop-client/src/components/budget/SidebarCategory.tsx +++ b/packages/desktop-client/src/components/budget/SidebarCategory.tsx @@ -2,6 +2,11 @@ import React, { type CSSProperties, type Ref, useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; + import { type CategoryGroupEntity, type CategoryEntity, @@ -10,10 +15,6 @@ import { import { useContextMenu } from '../../hooks/useContextMenu'; import { SvgCheveronDown } from '../../icons/v1'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { NotesButton } from '../NotesButton'; import { InputCell } from '../table'; diff --git a/packages/desktop-client/src/components/budget/SidebarGroup.tsx b/packages/desktop-client/src/components/budget/SidebarGroup.tsx index c2109682bf0..a31da308347 100644 --- a/packages/desktop-client/src/components/budget/SidebarGroup.tsx +++ b/packages/desktop-client/src/components/budget/SidebarGroup.tsx @@ -3,16 +3,17 @@ import React, { type CSSProperties, useRef } from 'react'; import { type ConnectDragSource } from 'react-dnd'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useContextMenu } from '../../hooks/useContextMenu'; import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { SvgExpandArrow } from '../../icons/v0'; import { SvgCheveronDown } from '../../icons/v1'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { NotesButton } from '../NotesButton'; import { InputCell } from '../table'; diff --git a/packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx b/packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx index 1619428b2d2..a51c9a804d7 100644 --- a/packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx @@ -1,9 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; -import { envelopeBudget } from 'loot-core/client/queries'; +import { Menu } from '@actual-app/components/menu'; -import { Menu } from '../../common/Menu'; +import { envelopeBudget } from 'loot-core/client/queries'; import { useEnvelopeSheetValue } from './EnvelopeBudgetComponents'; diff --git a/packages/desktop-client/src/components/budget/envelope/BudgetMenu.tsx b/packages/desktop-client/src/components/budget/envelope/BudgetMenu.tsx index f19b6a0ae5a..35c865b9113 100644 --- a/packages/desktop-client/src/components/budget/envelope/BudgetMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/BudgetMenu.tsx @@ -1,8 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { useFeatureFlag } from '../../../hooks/useFeatureFlag'; -import { Menu } from '../../common/Menu'; type BudgetMenuProps = Omit< ComponentPropsWithoutRef, diff --git a/packages/desktop-client/src/components/budget/envelope/CoverMenu.tsx b/packages/desktop-client/src/components/budget/envelope/CoverMenu.tsx index cac3186bb11..bd2fe69b306 100644 --- a/packages/desktop-client/src/components/budget/envelope/CoverMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/CoverMenu.tsx @@ -1,13 +1,14 @@ import React, { useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { View } from '@actual-app/components/view'; + import { type CategoryEntity } from 'loot-core/types/models'; import { useCategories } from '../../../hooks/useCategories'; import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete'; -import { Button } from '../../common/Button2'; -import { InitialFocus } from '../../common/InitialFocus'; -import { View } from '../../common/View'; import { addToBeBudgetedGroup, removeCategoriesFromGroups } from '../util'; type CoverMenuProps = { diff --git a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx index 14489e8f77b..eee049d1353 100644 --- a/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx @@ -6,6 +6,11 @@ import React, { } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +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 { css } from '@emotion/css'; import { envelopeBudget } from 'loot-core/client/queries'; @@ -16,11 +21,7 @@ import { integerToCurrency, amountToInteger } from 'loot-core/shared/util'; import { useContextMenu } from '../../../hooks/useContextMenu'; import { useUndo } from '../../../hooks/useUndo'; import { SvgCheveronDown } from '../../../icons/v1'; -import { styles, theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Popover } from '../../common/Popover'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { type Binding, type SheetFields } from '../../spreadsheet'; import { CellValue, CellValueText } from '../../spreadsheet/CellValue'; import { useSheetName } from '../../spreadsheet/useSheetName'; diff --git a/packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx b/packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx index d09f101c970..57afe34d497 100644 --- a/packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx @@ -6,14 +6,15 @@ import React, { } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { View } from '@actual-app/components/view'; + import { useSpreadsheet } from 'loot-core/client/SpreadsheetProvider'; import { evalArithmetic } from 'loot-core/shared/arithmetic'; import { integerToCurrency, amountToInteger } from 'loot-core/shared/util'; -import { Button } from '../../common/Button2'; -import { InitialFocus } from '../../common/InitialFocus'; import { Input } from '../../common/Input'; -import { View } from '../../common/View'; import { NamespaceContext } from '../../spreadsheet/NamespaceContext'; type HoldMenuProps = { diff --git a/packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx b/packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx index e5e893f25f1..41793ed9c12 100644 --- a/packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/TransferMenu.tsx @@ -1,16 +1,17 @@ import React, { useMemo, useState } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { View } from '@actual-app/components/view'; + import { evalArithmetic } from 'loot-core/shared/arithmetic'; import { integerToCurrency, amountToInteger } from 'loot-core/shared/util'; import { type CategoryEntity } from 'loot-core/types/models'; import { useCategories } from '../../../hooks/useCategories'; import { CategoryAutocomplete } from '../../autocomplete/CategoryAutocomplete'; -import { Button } from '../../common/Button2'; -import { InitialFocus } from '../../common/InitialFocus'; import { Input } from '../../common/Input'; -import { View } from '../../common/View'; import { addToBeBudgetedGroup, removeCategoriesFromGroups } from '../util'; type TransferMenuProps = { diff --git a/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetMonthMenu.tsx b/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetMonthMenu.tsx index 2244bc4c6af..30016e9ce05 100644 --- a/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetMonthMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetMonthMenu.tsx @@ -1,8 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { useFeatureFlag } from '../../../../hooks/useFeatureFlag'; -import { Menu } from '../../../common/Menu'; type BudgetMonthMenuProps = Omit< ComponentPropsWithoutRef, diff --git a/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx index 21888cca50a..b8347ddc67d 100644 --- a/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx @@ -1,6 +1,10 @@ import React, { useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import * as monthUtils from 'loot-core/shared/months'; @@ -8,10 +12,7 @@ import * as monthUtils from 'loot-core/shared/months'; import { useUndo } from '../../../../hooks/useUndo'; import { SvgDotsHorizontalTriple } from '../../../../icons/v1'; import { SvgArrowButtonDown1, SvgArrowButtonUp1 } from '../../../../icons/v2'; -import { theme, styles } from '../../../../style'; -import { Button } from '../../../common/Button2'; -import { Popover } from '../../../common/Popover'; -import { View } from '../../../common/View'; +import { theme } from '../../../../style'; import { NotesButton } from '../../../NotesButton'; import { NamespaceContext } from '../../../spreadsheet/NamespaceContext'; import { useEnvelopeBudget } from '../EnvelopeBudgetContext'; diff --git a/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx b/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx index 42f32fac392..c3b788392de 100644 --- a/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx +++ b/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx @@ -5,11 +5,12 @@ import React, { useState, } from 'react'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; + import { envelopeBudget } from 'loot-core/client/queries'; import { useContextMenu } from '../../../../hooks/useContextMenu'; -import { Popover } from '../../../common/Popover'; -import { View } from '../../../common/View'; import { CoverMenu } from '../CoverMenu'; import { useEnvelopeSheetValue } from '../EnvelopeBudgetComponents'; import { HoldMenu } from '../HoldMenu'; diff --git a/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx b/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx index 3dd9b4a6857..3cb15da8dd2 100644 --- a/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx +++ b/packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudgetMenu.tsx @@ -1,9 +1,10 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { envelopeBudget } from 'loot-core/client/queries'; -import { Menu } from '../../../common/Menu'; import { useEnvelopeSheetValue } from '../EnvelopeBudgetComponents'; type ToBudgetMenuProps = Omit< diff --git a/packages/desktop-client/src/components/budget/index.tsx b/packages/desktop-client/src/components/budget/index.tsx index 04778aa2937..e62b0de395c 100644 --- a/packages/desktop-client/src/components/budget/index.tsx +++ b/packages/desktop-client/src/components/budget/index.tsx @@ -2,6 +2,9 @@ import React, { memo, useMemo, useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { addNotification, pushModal } from 'loot-core/client/actions'; import { applyBudgetAction, @@ -25,8 +28,6 @@ import { useLocalPref } from '../../hooks/useLocalPref'; import { useNavigate } from '../../hooks/useNavigate'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { useDispatch } from '../../redux'; -import { styles } from '../../style'; -import { View } from '../common/View'; import { NamespaceContext } from '../spreadsheet/NamespaceContext'; import { DynamicBudgetTable } from './DynamicBudgetTable'; diff --git a/packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx b/packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx index 22e3f5446bf..d5e39f3fce5 100644 --- a/packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx +++ b/packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx @@ -1,9 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; -import { trackingBudget } from 'loot-core/client/queries'; +import { Menu } from '@actual-app/components/menu'; -import { Menu } from '../../common/Menu'; +import { trackingBudget } from 'loot-core/client/queries'; import { useTrackingSheetValue } from './TrackingBudgetComponents'; diff --git a/packages/desktop-client/src/components/budget/tracking/BudgetMenu.tsx b/packages/desktop-client/src/components/budget/tracking/BudgetMenu.tsx index b5f2f38c265..7144f409919 100644 --- a/packages/desktop-client/src/components/budget/tracking/BudgetMenu.tsx +++ b/packages/desktop-client/src/components/budget/tracking/BudgetMenu.tsx @@ -1,8 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { useFeatureFlag } from '../../../hooks/useFeatureFlag'; -import { Menu } from '../../common/Menu'; type BudgetMenuProps = Omit< ComponentPropsWithoutRef, diff --git a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx index 9bf9e9e536f..3afc6948e00 100644 --- a/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx +++ b/packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx @@ -8,6 +8,11 @@ import React, { } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +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 { css } from '@emotion/css'; import { trackingBudget } from 'loot-core/client/queries'; @@ -17,11 +22,7 @@ import { integerToCurrency, amountToInteger } from 'loot-core/shared/util'; import { useUndo } from '../../../hooks/useUndo'; import { SvgCheveronDown } from '../../../icons/v1'; -import { styles, theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Popover } from '../../common/Popover'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { type Binding, type SheetFields } from '../../spreadsheet'; import { CellValue, CellValueText } from '../../spreadsheet/CellValue'; import { useSheetValue } from '../../spreadsheet/useSheetValue'; diff --git a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetMonthMenu.tsx b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetMonthMenu.tsx index d4b5e4c9cad..d1f941b21c4 100644 --- a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetMonthMenu.tsx +++ b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetMonthMenu.tsx @@ -1,8 +1,9 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { useFeatureFlag } from '../../../../hooks/useFeatureFlag'; -import { Menu } from '../../../common/Menu'; type BudgetMonthMenuProps = Omit< ComponentPropsWithoutRef, diff --git a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx index 8df1ec15045..16eef91be3a 100644 --- a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx @@ -2,6 +2,11 @@ import React, { useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import * as monthUtils from 'loot-core/shared/months'; @@ -9,11 +14,7 @@ import * as monthUtils from 'loot-core/shared/months'; import { useUndo } from '../../../../hooks/useUndo'; import { SvgDotsHorizontalTriple } from '../../../../icons/v1'; import { SvgArrowButtonDown1, SvgArrowButtonUp1 } from '../../../../icons/v2'; -import { theme, styles } from '../../../../style'; -import { Button } from '../../../common/Button2'; -import { Popover } from '../../../common/Popover'; -import { Stack } from '../../../common/Stack'; -import { View } from '../../../common/View'; +import { theme } from '../../../../style'; import { NotesButton } from '../../../NotesButton'; import { NamespaceContext } from '../../../spreadsheet/NamespaceContext'; import { useTrackingBudget } from '../TrackingBudgetContext'; diff --git a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetTotal.tsx b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetTotal.tsx index 7e65d730e25..a5da04fa886 100644 --- a/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetTotal.tsx +++ b/packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetTotal.tsx @@ -6,9 +6,11 @@ import React, { } from 'react'; import { Trans } from 'react-i18next'; -import { theme, styles } from '../../../../style'; -import { Text } from '../../../common/Text'; -import { View } from '../../../common/View'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + +import { theme } from '../../../../style'; import { type SheetFields, type Binding } from '../../../spreadsheet'; import { CellValue, CellValueText } from '../../../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/budget/util.ts b/packages/desktop-client/src/components/budget/util.ts index 679d5e0c600..7d0bde3f547 100644 --- a/packages/desktop-client/src/components/budget/util.ts +++ b/packages/desktop-client/src/components/budget/util.ts @@ -1,6 +1,7 @@ // @ts-strict-ignore import { type CSSProperties } from 'react'; +import { styles } from '@actual-app/components/styles'; import { t } from 'i18next'; import { type useSpreadsheet } from 'loot-core/client/SpreadsheetProvider'; @@ -13,7 +14,7 @@ import { } from 'loot-core/types/models'; import { type SyncedPrefs } from 'loot-core/types/prefs'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { type DropPosition } from '../sort'; import { getValidMonthBounds } from './MonthsContext'; diff --git a/packages/desktop-client/src/components/common/Button2.ts b/packages/desktop-client/src/components/common/Button2.ts deleted file mode 100644 index 7871daccf4d..00000000000 --- a/packages/desktop-client/src/components/common/Button2.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { - Button as ActualComponentButton, - ButtonWithLoading as ActualComponentButtonWithLoading, -} from '@actual-app/components/button'; - -/** @deprecated please import Button from '@actual-app/components/button' */ -export const Button = ActualComponentButton; - -/** @deprecated please import ButtonWithLoading from '@actual-app/components/button' */ -export const ButtonWithLoading = ActualComponentButtonWithLoading; diff --git a/packages/desktop-client/src/components/common/Card.ts b/packages/desktop-client/src/components/common/Card.ts deleted file mode 100644 index ab9663033fa..00000000000 --- a/packages/desktop-client/src/components/common/Card.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 81f37afb588..00000000000 --- a/packages/desktop-client/src/components/common/FormError.ts +++ /dev/null @@ -1,4 +0,0 @@ -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/InfoBubble.tsx b/packages/desktop-client/src/components/common/InfoBubble.tsx index d28879d80e0..69d7f271e35 100644 --- a/packages/desktop-client/src/components/common/InfoBubble.tsx +++ b/packages/desktop-client/src/components/common/InfoBubble.tsx @@ -1,12 +1,12 @@ import React, { useState } from 'react'; import { useLocation } from 'react-router-dom'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { SvgInformationCircle } from '../../icons/v2'; import { theme } from '../../style'; -import { Text } from './Text'; -import { View } from './View'; - type InfoBubbleProps = { label: string; textWidth?: number; diff --git a/packages/desktop-client/src/components/common/InitialFocus.ts b/packages/desktop-client/src/components/common/InitialFocus.ts deleted file mode 100644 index 759add53a52..00000000000 --- a/packages/desktop-client/src/components/common/InitialFocus.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { InitialFocus as ActualComponentInitialFocus } from '@actual-app/components/initial-focus'; - -/** @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 deleted file mode 100644 index 24019276be1..00000000000 --- a/packages/desktop-client/src/components/common/InlineField.ts +++ /dev/null @@ -1,4 +0,0 @@ -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/Input.tsx b/packages/desktop-client/src/components/common/Input.tsx index a8173627ba1..158fb7251a5 100644 --- a/packages/desktop-client/src/components/common/Input.tsx +++ b/packages/desktop-client/src/components/common/Input.tsx @@ -5,11 +5,12 @@ import React, { useRef, } from 'react'; +import { styles } from '@actual-app/components/styles'; import { css, cx } from '@emotion/css'; import { useMergedRefs } from '../../hooks/useMergedRefs'; import { useProperFocus } from '../../hooks/useProperFocus'; -import { styles, theme, type CSSProperties } from '../../style'; +import { theme, type CSSProperties } from '../../style'; export const defaultInputStyle = { outline: 0, diff --git a/packages/desktop-client/src/components/common/InputWithContent.tsx b/packages/desktop-client/src/components/common/InputWithContent.tsx index 15f17394faa..6c60398bf83 100644 --- a/packages/desktop-client/src/components/common/InputWithContent.tsx +++ b/packages/desktop-client/src/components/common/InputWithContent.tsx @@ -1,9 +1,10 @@ import { useState, type ComponentProps, type ReactNode } from 'react'; +import { View } from '@actual-app/components/view'; + import { theme, type CSSProperties } from '../../style'; import { Input, defaultInputStyle } from './Input'; -import { View } from './View'; type InputWithContentProps = ComponentProps & { leftContent?: ReactNode; diff --git a/packages/desktop-client/src/components/common/Label.ts b/packages/desktop-client/src/components/common/Label.ts deleted file mode 100644 index c799cb06bbb..00000000000 --- a/packages/desktop-client/src/components/common/Label.ts +++ /dev/null @@ -1,4 +0,0 @@ -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/Link.tsx b/packages/desktop-client/src/components/common/Link.tsx index 00225844537..d79c8ddc03a 100644 --- a/packages/desktop-client/src/components/common/Link.tsx +++ b/packages/desktop-client/src/components/common/Link.tsx @@ -5,15 +5,15 @@ import React, { } from 'react'; import { NavLink, useMatch } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; import { css } from '@emotion/css'; import { useNavigate } from '../../hooks/useNavigate'; -import { type CSSProperties, styles } from '../../style'; +import { type CSSProperties } from '../../style'; import { theme } from '../../style/theme'; -import { Button } from './Button2'; -import { Text } from './Text'; - type TextLinkProps = { style?: CSSProperties; onClick?: MouseEventHandler; diff --git a/packages/desktop-client/src/components/common/Menu.ts b/packages/desktop-client/src/components/common/Menu.ts deleted file mode 100644 index d736353e625..00000000000 --- a/packages/desktop-client/src/components/common/Menu.ts +++ /dev/null @@ -1,10 +0,0 @@ -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/MenuButton.tsx b/packages/desktop-client/src/components/common/MenuButton.tsx index bf55a955cc5..acb763cab44 100644 --- a/packages/desktop-client/src/components/common/MenuButton.tsx +++ b/packages/desktop-client/src/components/common/MenuButton.tsx @@ -1,8 +1,8 @@ import React, { type ComponentPropsWithoutRef, forwardRef } from 'react'; -import { SvgDotsHorizontalTriple } from '../../icons/v1'; +import { Button } from '@actual-app/components/button'; -import { Button } from './Button2'; +import { SvgDotsHorizontalTriple } from '../../icons/v1'; type MenuButtonProps = ComponentPropsWithoutRef; diff --git a/packages/desktop-client/src/components/common/Paragraph.ts b/packages/desktop-client/src/components/common/Paragraph.ts deleted file mode 100644 index a69bd9c880c..00000000000 --- a/packages/desktop-client/src/components/common/Paragraph.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index c885af49d00..00000000000 --- a/packages/desktop-client/src/components/common/Popover.ts +++ /dev/null @@ -1,4 +0,0 @@ -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/Search.tsx b/packages/desktop-client/src/components/common/Search.tsx index dd154c80bd8..6a90f74d0e3 100644 --- a/packages/desktop-client/src/components/common/Search.tsx +++ b/packages/desktop-client/src/components/common/Search.tsx @@ -1,12 +1,13 @@ import { type Ref } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { SvgRemove, SvgSearchAlternate } from '../../icons/v2'; import { theme } from '../../style'; -import { Button } from './Button2'; import { InputWithContent } from './InputWithContent'; -import { View } from './View'; type SearchProps = { inputRef?: Ref; diff --git a/packages/desktop-client/src/components/common/Select.tsx b/packages/desktop-client/src/components/common/Select.tsx index f30dd3b3199..7f438eccc00 100644 --- a/packages/desktop-client/src/components/common/Select.tsx +++ b/packages/desktop-client/src/components/common/Select.tsx @@ -1,11 +1,11 @@ import { useRef, useState, type CSSProperties } from 'react'; -import { SvgExpandArrow } from '../../icons/v0'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; -import { Button } from './Button2'; -import { Menu } from './Menu'; -import { Popover } from './Popover'; -import { View } from './View'; +import { SvgExpandArrow } from '../../icons/v0'; function isValueOption( option: readonly [Value, string] | typeof Menu.line, diff --git a/packages/desktop-client/src/components/common/SimpleTable.tsx b/packages/desktop-client/src/components/common/SimpleTable.tsx index 6539d7655c0..fc059ba8385 100644 --- a/packages/desktop-client/src/components/common/SimpleTable.tsx +++ b/packages/desktop-client/src/components/common/SimpleTable.tsx @@ -6,7 +6,7 @@ import React, { type CSSProperties, } from 'react'; -import { View } from './View'; +import { View } from '@actual-app/components/view'; type SimpleTableProps = { loadMore?: () => void; diff --git a/packages/desktop-client/src/components/common/SpaceBetween.ts b/packages/desktop-client/src/components/common/SpaceBetween.ts deleted file mode 100644 index d272bf9a324..00000000000 --- a/packages/desktop-client/src/components/common/SpaceBetween.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index e2a2f9b561f..00000000000 --- a/packages/desktop-client/src/components/common/Stack.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 74a1dcead77..00000000000 --- a/packages/desktop-client/src/components/common/Text.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 3f09be34873..00000000000 --- a/packages/desktop-client/src/components/common/TextOneLine.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 1e244e2c863..00000000000 --- a/packages/desktop-client/src/components/common/Toggle.ts +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 88c52e79957..00000000000 --- a/packages/desktop-client/src/components/common/Tooltip.ts +++ /dev/null @@ -1,4 +0,0 @@ -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/common/View.ts b/packages/desktop-client/src/components/common/View.ts deleted file mode 100644 index 1de101a9a21..00000000000 --- a/packages/desktop-client/src/components/common/View.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { View as ActualComponentView } from '@actual-app/components/view'; - -/** @deprecated please import View from '@actual-app/components/view' */ -export const View = ActualComponentView; diff --git a/packages/desktop-client/src/components/filters/AppliedFilters.tsx b/packages/desktop-client/src/components/filters/AppliedFilters.tsx index c1fa10aaf70..3f0ff1cb694 100644 --- a/packages/desktop-client/src/components/filters/AppliedFilters.tsx +++ b/packages/desktop-client/src/components/filters/AppliedFilters.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { type RuleConditionEntity } from 'loot-core/types/models'; +import { View } from '@actual-app/components/view'; -import { View } from '../common/View'; +import { type RuleConditionEntity } from 'loot-core/types/models'; import { ConditionsOpMenu } from './ConditionsOpMenu'; import { FilterExpression } from './FilterExpression'; diff --git a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx index a9b1abe04fa..f94000ec147 100644 --- a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { Button } from '@actual-app/components/button'; + import { SvgFilter } from '../../icons/v1'; -import { Button } from '../common/Button2'; export function CompactFiltersButton({ onPress }: { onPress: () => void }) { return ( diff --git a/packages/desktop-client/src/components/filters/ConditionsOpMenu.tsx b/packages/desktop-client/src/components/filters/ConditionsOpMenu.tsx index 41bf5be269b..e326c023dd8 100644 --- a/packages/desktop-client/src/components/filters/ConditionsOpMenu.tsx +++ b/packages/desktop-client/src/components/filters/ConditionsOpMenu.tsx @@ -1,10 +1,11 @@ import React from 'react'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type RuleConditionEntity } from 'loot-core/types/models'; import { theme } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FieldSelect } from '../modals/EditRuleModal'; export function ConditionsOpMenu({ diff --git a/packages/desktop-client/src/components/filters/FilterExpression.tsx b/packages/desktop-client/src/components/filters/FilterExpression.tsx index 47f2d9fd5c0..7906a6737d0 100644 --- a/packages/desktop-client/src/components/filters/FilterExpression.tsx +++ b/packages/desktop-client/src/components/filters/FilterExpression.tsx @@ -1,16 +1,17 @@ import React, { useRef, useState, type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { mapField, friendlyOp } from 'loot-core/shared/rules'; import { integerToCurrency } from 'loot-core/shared/util'; import { type RuleConditionEntity } from 'loot-core/types/models'; import { SvgDelete } from '../../icons/v0'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Value } from '../rules/Value'; import { FilterEditor } from './FiltersMenu'; diff --git a/packages/desktop-client/src/components/filters/FilterMenu.tsx b/packages/desktop-client/src/components/filters/FilterMenu.tsx index 94d389998c7..ea2e12dc7b7 100644 --- a/packages/desktop-client/src/components/filters/FilterMenu.tsx +++ b/packages/desktop-client/src/components/filters/FilterMenu.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Menu } from '../common/Menu'; +import { Menu } from '@actual-app/components/menu'; import { type SavedFilter } from './SavedFilterMenuButton'; diff --git a/packages/desktop-client/src/components/filters/FiltersButton.tsx b/packages/desktop-client/src/components/filters/FiltersButton.tsx index 1568986f0a8..91c78535c12 100644 --- a/packages/desktop-client/src/components/filters/FiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/FiltersButton.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { Button } from '@actual-app/components/button'; + import { SvgFilter } from '../../icons/v1/Filter'; -import { Button } from '../common/Button2'; export function FiltersButton({ onPress }: { onPress: () => void }) { return ( diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsx index d0c80f27595..941bf949492 100644 --- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx +++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx @@ -4,6 +4,14 @@ import { Form } from 'react-aria-components'; import { useHotkeys } from 'react-hotkeys-hook'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; import { parse as parseDate, format as formatDate, @@ -24,15 +32,8 @@ import { import { titleFirst } from 'loot-core/shared/util'; import { useDateFormat } from '../../hooks/useDateFormat'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; +import { theme } from '../../style'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; import { GenericInput } from '../util/GenericInput'; import { CompactFiltersButton } from './CompactFiltersButton'; diff --git a/packages/desktop-client/src/components/filters/FiltersStack.tsx b/packages/desktop-client/src/components/filters/FiltersStack.tsx index f145c786864..2b021b86d4b 100644 --- a/packages/desktop-client/src/components/filters/FiltersStack.tsx +++ b/packages/desktop-client/src/components/filters/FiltersStack.tsx @@ -1,11 +1,11 @@ import React from 'react'; +import { Stack } from '@actual-app/components/stack'; +import { View } from '@actual-app/components/view'; + import { type TransactionFilterEntity } from 'loot-core/types/models'; import { type RuleConditionEntity } from 'loot-core/types/models/rule'; -import { Stack } from '../common/Stack'; -import { View } from '../common/View'; - import { AppliedFilters } from './AppliedFilters'; import { type SavedFilter, diff --git a/packages/desktop-client/src/components/filters/NameFilter.tsx b/packages/desktop-client/src/components/filters/NameFilter.tsx index 827b15fe860..336bf6be247 100644 --- a/packages/desktop-client/src/components/filters/NameFilter.tsx +++ b/packages/desktop-client/src/components/filters/NameFilter.tsx @@ -2,11 +2,12 @@ import React, { useRef, useEffect } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; + import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Input } from '../common/Input'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; import { FormField, FormLabel } from '../forms'; export function NameFilter({ diff --git a/packages/desktop-client/src/components/filters/OpButton.tsx b/packages/desktop-client/src/components/filters/OpButton.tsx index 0afac5deaf2..19a8a457532 100644 --- a/packages/desktop-client/src/components/filters/OpButton.tsx +++ b/packages/desktop-client/src/components/filters/OpButton.tsx @@ -1,11 +1,11 @@ import React, { type CSSProperties } from 'react'; +import { Button } from '@actual-app/components/button'; import { css } from '@emotion/css'; import { friendlyOp } from 'loot-core/shared/rules'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; type OpButtonProps = { op: string; diff --git a/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx b/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx index b51be581bec..57e6633d430 100644 --- a/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx +++ b/packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx @@ -1,15 +1,16 @@ import React, { useRef, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { send, sendCatch } from 'loot-core/platform/client/fetch'; import { type TransactionFilterEntity } from 'loot-core/types/models'; import { type RuleConditionEntity } from 'loot-core/types/models/rule'; import { SvgExpandArrow } from '../../icons/v0'; -import { Button } from '../common/Button2'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FilterMenu } from './FilterMenu'; import { NameFilter } from './NameFilter'; diff --git a/packages/desktop-client/src/components/forms.tsx b/packages/desktop-client/src/components/forms.tsx index 439acfae812..c86688e07bb 100644 --- a/packages/desktop-client/src/components/forms.tsx +++ b/packages/desktop-client/src/components/forms.tsx @@ -1,12 +1,11 @@ import React, { type ReactNode, type ComponentProps } from 'react'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { theme, type CSSProperties } from '../style'; -import { Text } from './common/Text'; -import { View } from './common/View'; - type SectionLabelProps = { title?: string; style?: CSSProperties; diff --git a/packages/desktop-client/src/components/gocardless/GoCardlessLink.tsx b/packages/desktop-client/src/components/gocardless/GoCardlessLink.tsx index 2a3312242e9..14e0a59b7df 100644 --- a/packages/desktop-client/src/components/gocardless/GoCardlessLink.tsx +++ b/packages/desktop-client/src/components/gocardless/GoCardlessLink.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { View } from '@actual-app/components/view'; + import { Modal, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { View } from '../common/View'; export function GoCardlessLink() { window.close(); diff --git a/packages/desktop-client/src/components/manager/BudgetList.tsx b/packages/desktop-client/src/components/manager/BudgetList.tsx index 5bcc4b123f4..0925434582a 100644 --- a/packages/desktop-client/src/components/manager/BudgetList.tsx +++ b/packages/desktop-client/src/components/manager/BudgetList.tsx @@ -7,6 +7,14 @@ import React, { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } 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 { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; + import { closeAndDownloadBudget, closeAndLoadBudget, @@ -43,14 +51,8 @@ import { } from '../../icons/v1'; import { SvgCloudUnknown, SvgKey, SvgRefreshArrow } from '../../icons/v2'; import { useSelector, useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { tokens } from '../../tokens'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { useMultiuserEnabled } from '../ServerContext'; diff --git a/packages/desktop-client/src/components/manager/ConfigServer.tsx b/packages/desktop-client/src/components/manager/ConfigServer.tsx index 44642b4c60e..3508aa10d47 100644 --- a/packages/desktop-client/src/components/manager/ConfigServer.tsx +++ b/packages/desktop-client/src/components/manager/ConfigServer.tsx @@ -2,6 +2,10 @@ import React, { useState, useEffect, useCallback } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { createBudget, loggedIn, signOut } from 'loot-core/client/actions'; import { isNonProductionEnvironment, @@ -12,11 +16,8 @@ import { useGlobalPref } from '../../hooks/useGlobalPref'; import { useNavigate } from '../../hooks/useNavigate'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button, ButtonWithLoading } from '../common/Button2'; import { BigInput } from '../common/Input'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useServerURL, useSetServerURL } from '../ServerContext'; import { Title } from './subscribe/common'; diff --git a/packages/desktop-client/src/components/manager/ManagementApp.tsx b/packages/desktop-client/src/components/manager/ManagementApp.tsx index 12d2c79ffe0..8be567824ea 100644 --- a/packages/desktop-client/src/components/manager/ManagementApp.tsx +++ b/packages/desktop-client/src/components/manager/ManagementApp.tsx @@ -1,6 +1,9 @@ import React, { useEffect } from 'react'; import { Navigate, Route, Routes } from 'react-router-dom'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { loggedIn } from 'loot-core/client/actions'; import { setAppState } from 'loot-core/client/app/appSlice'; @@ -15,8 +18,6 @@ import { UserDirectoryPage, } from '../admin/UserDirectory/UserDirectoryPage'; import { AppBackground } from '../AppBackground'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { LoggedInUser } from '../LoggedInUser'; import { Notifications } from '../Notifications'; import { useResponsive } from '../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/manager/ServerURL.tsx b/packages/desktop-client/src/components/manager/ServerURL.tsx index d2d96bc7065..71b2c634b10 100644 --- a/packages/desktop-client/src/components/manager/ServerURL.tsx +++ b/packages/desktop-client/src/components/manager/ServerURL.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { Link } from '../common/Link'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useServerURL } from '../ServerContext'; export function ServerURL() { diff --git a/packages/desktop-client/src/components/manager/WelcomeScreen.tsx b/packages/desktop-client/src/components/manager/WelcomeScreen.tsx index 7586402a78b..a8ff0fb6982 100644 --- a/packages/desktop-client/src/components/manager/WelcomeScreen.tsx +++ b/packages/desktop-client/src/components/manager/WelcomeScreen.tsx @@ -1,15 +1,17 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { createBudget, pushModal } from 'loot-core/client/actions'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; +import { theme } from '../../style'; import { Link } from '../common/Link'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; export function WelcomeScreen() { const { t } = useTranslation(); diff --git a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx index 8b001f4f473..6687977c1ce 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx @@ -2,17 +2,18 @@ import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { createBudget } from 'loot-core/client/actions/budgets'; import { send } from 'loot-core/platform/client/fetch'; import { useNavigate } from '../../../hooks/useNavigate'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; import { Link } from '../../common/Link'; -import { Paragraph } from '../../common/Paragraph'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { useRefreshLoginMethods } from '../../ServerContext'; import { useBootstrapped, Title } from './common'; diff --git a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx index 0b4d6c0ee01..0d1c5eb7c68 100644 --- a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx @@ -2,13 +2,14 @@ import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { send } from 'loot-core/platform/client/fetch'; import { useNavigate } from '../../../hooks/useNavigate'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { Title } from './common'; import { ConfirmPasswordForm } from './ConfirmPasswordForm'; diff --git a/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx b/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx index cfb64077e44..7cd4b614c56 100644 --- a/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx @@ -2,10 +2,11 @@ import React, { type ChangeEvent, type ReactNode, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../../style'; -import { ButtonWithLoading } from '../../common/Button2'; import { BigInput } from '../../common/Input'; -import { View } from '../../common/View'; type ConfirmPasswordFormProps = { buttons: ReactNode; diff --git a/packages/desktop-client/src/components/manager/subscribe/Error.tsx b/packages/desktop-client/src/components/manager/subscribe/Error.tsx index 9168d9fbe02..623bb5e329b 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Error.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Error.tsx @@ -3,11 +3,12 @@ import React from 'react'; import { Trans } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useNavigate } from '../../../hooks/useNavigate'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; function getErrorMessage(reason) { switch (reason) { diff --git a/packages/desktop-client/src/components/manager/subscribe/Login.tsx b/packages/desktop-client/src/components/manager/subscribe/Login.tsx index 5c8ce27ab7b..df5de6965ab 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Login.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Login.tsx @@ -3,6 +3,12 @@ import React, { useState, useEffect } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useSearchParams } from 'react-router-dom'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { Label } from '@actual-app/components/label'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { loggedIn } from 'loot-core/client/actions/user'; import { send } from 'loot-core/platform/client/fetch'; import { isElectron } from 'loot-core/shared/environment'; @@ -11,14 +17,10 @@ import { type OpenIdConfig } from 'loot-core/types/models/openid'; import { useNavigate } from '../../../hooks/useNavigate'; import { AnimatedLoading } from '../../../icons/AnimatedLoading'; import { useDispatch } from '../../../redux'; -import { styles, theme } from '../../../style'; -import { Button, ButtonWithLoading } from '../../common/Button2'; +import { theme } from '../../../style'; import { BigInput } from '../../common/Input'; -import { Label } from '../../common/Label'; import { Link } from '../../common/Link'; import { Select } from '../../common/Select'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { useResponsive } from '../../responsive/ResponsiveProvider'; import { useAvailableLoginMethods, useLoginMethod } from '../../ServerContext'; diff --git a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx index 3a59f525b1f..ffb50ace57d 100644 --- a/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx @@ -2,20 +2,22 @@ import { type ReactNode, useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useLocation, type Location } from 'react-router-dom'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import { type Handlers } from 'loot-core/types/handlers'; import { type OpenIdConfig } from 'loot-core/types/models/openid'; -import { theme, styles } from '../../../style'; -import { ButtonWithLoading } from '../../common/Button2'; +import { theme } from '../../../style'; import { Input } from '../../common/Input'; import { Link } from '../../common/Link'; -import { Menu } from '../../common/Menu'; import { Select } from '../../common/Select'; -import { Stack } from '../../common/Stack'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { FormField, FormLabel } from '../../forms'; import { useServerURL } from '../../ServerContext'; diff --git a/packages/desktop-client/src/components/mobile/FloatingActionBar.tsx b/packages/desktop-client/src/components/mobile/FloatingActionBar.tsx index dbee0a6cb85..fc8b1ad75b3 100644 --- a/packages/desktop-client/src/components/mobile/FloatingActionBar.tsx +++ b/packages/desktop-client/src/components/mobile/FloatingActionBar.tsx @@ -1,7 +1,8 @@ import { type PropsWithChildren, type CSSProperties } from 'react'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style'; -import { View } from '../common/View'; type FloatingActionBarProps = PropsWithChildren & { style: CSSProperties; diff --git a/packages/desktop-client/src/components/mobile/MobileBackButton.tsx b/packages/desktop-client/src/components/mobile/MobileBackButton.tsx index ab528289105..ac9cc7e0d02 100644 --- a/packages/desktop-client/src/components/mobile/MobileBackButton.tsx +++ b/packages/desktop-client/src/components/mobile/MobileBackButton.tsx @@ -1,11 +1,12 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; + import { useNavigate } from '../../hooks/useNavigate'; import { SvgCheveronLeft } from '../../icons/v1'; -import { styles } from '../../style'; -import { Button } from '../common/Button2'; -import { Text } from '../common/Text'; type MobileBackButtonProps = ComponentPropsWithoutRef; diff --git a/packages/desktop-client/src/components/mobile/MobileForms.tsx b/packages/desktop-client/src/components/mobile/MobileForms.tsx index 6f3035a4c0a..58ebcd0106e 100644 --- a/packages/desktop-client/src/components/mobile/MobileForms.tsx +++ b/packages/desktop-client/src/components/mobile/MobileForms.tsx @@ -6,14 +6,15 @@ import React, { type CSSProperties, } from 'react'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Toggle } from '@actual-app/components/toggle'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { Button } from '../common/Button'; import { Input } from '../common/Input'; -import { Text } from '../common/Text'; -import { Toggle } from '../common/Toggle'; -import { View } from '../common/View'; type FieldLabelProps = { title: string; diff --git a/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx b/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx index 1ca7c37492e..23ba2248a33 100644 --- a/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx +++ b/packages/desktop-client/src/components/mobile/MobileNavTabs.tsx @@ -8,6 +8,8 @@ import React, { import { NavLink } from 'react-router-dom'; import { useSpring, animated, config } from 'react-spring'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { useDrag } from '@use-gesture/react'; import { @@ -20,8 +22,7 @@ import { } from '../../icons/v1'; import { SvgReports } from '../../icons/v1/Reports'; import { SvgCalendar } from '../../icons/v2'; -import { theme, styles } from '../../style'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { useScrollListener } from '../ScrollProvider'; diff --git a/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx b/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx index 6979ea5200e..61cd9165fbb 100644 --- a/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx @@ -6,6 +6,11 @@ import React, { useState, } from 'react'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { collapseModals, openAccountCloseModal, @@ -39,10 +44,7 @@ import { useDateFormat } from '../../../hooks/useDateFormat'; import { useFailedAccounts } from '../../../hooks/useFailedAccounts'; import { useNavigate } from '../../../hooks/useNavigate'; import { useSelector, useDispatch } from '../../../redux'; -import { styles, theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { MobilePageHeader, Page } from '../../Page'; import { MobileBackButton } from '../MobileBackButton'; import { AddTransactionButton } from '../transactions/AddTransactionButton'; diff --git a/packages/desktop-client/src/components/mobile/accounts/Accounts.tsx b/packages/desktop-client/src/components/mobile/accounts/Accounts.tsx index 11cb2fece99..87a2f68d541 100644 --- a/packages/desktop-client/src/components/mobile/accounts/Accounts.tsx +++ b/packages/desktop-client/src/components/mobile/accounts/Accounts.tsx @@ -1,6 +1,11 @@ import React, { type CSSProperties, useCallback } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { replaceModal } from 'loot-core/client/actions'; @@ -14,12 +19,8 @@ import { useNavigate } from '../../../hooks/useNavigate'; import { useSyncedPref } from '../../../hooks/useSyncedPref'; import { SvgAdd, SvgCheveronRight } from '../../../icons/v1'; import { useDispatch, useSelector } from '../../../redux'; -import { theme, styles } from '../../../style'; +import { theme } from '../../../style'; import { makeAmountFullStyle } from '../../budget/util'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { TextOneLine } from '../../common/TextOneLine'; -import { View } from '../../common/View'; import { MobilePageHeader, Page } from '../../Page'; import { type Binding, type SheetFields } from '../../spreadsheet'; import { CellValue, CellValueText } from '../../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx index e634efb0c6a..2ae4eb17a5c 100644 --- a/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx +++ b/packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx @@ -1,6 +1,12 @@ import React, { memo, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Card } from '@actual-app/components/card'; +import { Label } from '@actual-app/components/label'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { AutoTextSize } from 'auto-text-size'; import memoizeOne from 'memoize-one'; @@ -31,15 +37,10 @@ import { } from '../../../icons/v1'; import { SvgCalendar, SvgViewShow } from '../../../icons/v2'; import { useDispatch } from '../../../redux'; -import { theme, styles } from '../../../style'; +import { theme } from '../../../style'; import { BalanceWithCarryover } from '../../budget/BalanceWithCarryover'; import { makeAmountGrey, makeBalanceAmountStyle } from '../../budget/util'; -import { Button } from '../../common/Button2'; -import { Card } from '../../common/Card'; -import { Label } from '../../common/Label'; import { Link } from '../../common/Link'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { MobilePageHeader, Page } from '../../Page'; import { PrivacyFilter } from '../../PrivacyFilter'; import { useResponsive } from '../../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx b/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx index d196d053d16..c99a0934e3f 100644 --- a/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx +++ b/packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx @@ -1,5 +1,8 @@ import React, { useCallback, useEffect, useState } from 'react'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; + import { useTransactions, useTransactionsSearch, @@ -17,8 +20,6 @@ import { import { useDateFormat } from '../../../hooks/useDateFormat'; import { useNavigate } from '../../../hooks/useNavigate'; import { useDispatch } from '../../../redux'; -import { TextOneLine } from '../../common/TextOneLine'; -import { View } from '../../common/View'; import { MobilePageHeader, Page } from '../../Page'; import { MobileBackButton } from '../MobileBackButton'; import { AddTransactionButton } from '../transactions/AddTransactionButton'; diff --git a/packages/desktop-client/src/components/mobile/budget/ListItem.tsx b/packages/desktop-client/src/components/mobile/budget/ListItem.tsx index f8c7c753335..b797cf23ef0 100644 --- a/packages/desktop-client/src/components/mobile/budget/ListItem.tsx +++ b/packages/desktop-client/src/components/mobile/budget/ListItem.tsx @@ -4,8 +4,9 @@ import React, { type CSSProperties, } from 'react'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../../style'; -import { View } from '../../common/View'; const ROW_HEIGHT = 50; diff --git a/packages/desktop-client/src/components/mobile/budget/index.tsx b/packages/desktop-client/src/components/mobile/budget/index.tsx index 77481c32498..b9a95363cb7 100644 --- a/packages/desktop-client/src/components/mobile/budget/index.tsx +++ b/packages/desktop-client/src/components/mobile/budget/index.tsx @@ -1,6 +1,8 @@ // @ts-strict-ignore import React, { useCallback, useEffect, useState } from 'react'; +import { View } from '@actual-app/components/view'; + import { collapseModals, pushModal } from 'loot-core/client/actions'; import { sync } from 'loot-core/client/app/appSlice'; import { @@ -25,7 +27,6 @@ import { AnimatedLoading } from '../../../icons/AnimatedLoading'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; import { prewarmMonth } from '../../budget/util'; -import { View } from '../../common/View'; import { NamespaceContext } from '../../spreadsheet/NamespaceContext'; import { SyncRefresh } from '../../SyncRefresh'; diff --git a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx index 2024205c3c0..372c3540381 100644 --- a/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/AddTransactionButton.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; + import { useNavigate } from '../../../hooks/useNavigate'; import { SvgAdd } from '../../../icons/v1'; -import { Button } from '../../common/Button2'; type AddTransactionButtonProps = { to?: string; diff --git a/packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx b/packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx index cf3fcd18027..feee7554ce4 100644 --- a/packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx @@ -9,6 +9,9 @@ import React, { type CSSProperties, } from 'react'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { @@ -21,9 +24,6 @@ import { useMergedRefs } from '../../../hooks/useMergedRefs'; import { useSyncedPref } from '../../../hooks/useSyncedPref'; import { theme } from '../../../style'; import { makeAmountFullStyle } from '../../budget/util'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; type AmountInputProps = { value: number; diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx index 4a95a2d6a40..ebc1ea76047 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx @@ -10,6 +10,10 @@ import React, { import { useTranslation } from 'react-i18next'; import { useLocation, useParams } from 'react-router-dom'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Toggle } from '@actual-app/components/toggle'; +import { View } from '@actual-app/components/view'; import { format as formatDate, parse as parseDate, @@ -57,11 +61,8 @@ import { SvgSplit } from '../../../icons/v0'; import { SvgAdd, SvgPiggyBank, SvgTrash } from '../../../icons/v1'; import { SvgPencilWriteAlternate } from '../../../icons/v2'; import { useSelector, useDispatch } from '../../../redux'; -import { styles, theme } from '../../../style'; +import { theme } from '../../../style'; import { Button } from '../../common/Button'; -import { Text } from '../../common/Text'; -import { Toggle } from '../../common/Toggle'; -import { View } from '../../common/View'; import { MobilePageHeader, Page } from '../../Page'; import { AmountInput } from '../../util/AmountInput'; import { MobileBackButton } from '../MobileBackButton'; diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx index 8d50fbae5b8..1bde3e51d2e 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx @@ -5,6 +5,11 @@ import React, { import { mergeProps } from 'react-aria'; import { ListBoxItem } from 'react-aria-components'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { TextOneLine } from '@actual-app/components/text-one-line'; +import { View } from '@actual-app/components/view'; import { PressResponder, usePress, @@ -25,12 +30,8 @@ import { SvgLockClosed, } from '../../../icons/v2'; import { useSelector } from '../../../redux'; -import { styles, theme } from '../../../style'; +import { theme } from '../../../style'; import { makeAmountFullStyle } from '../../budget/util'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { TextOneLine } from '../../common/TextOneLine'; -import { View } from '../../common/View'; import { getPrettyPayee } from '../utils'; import { lookupName, Status } from './TransactionEdit'; diff --git a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx index 34260f1f9ce..a8da911d1d0 100644 --- a/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx +++ b/packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx @@ -1,14 +1,16 @@ import React, { type ComponentProps, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Label } from '@actual-app/components/label'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type TransactionEntity } from 'loot-core/types/models/transaction'; import { SelectedProvider, useSelected } from '../../../hooks/useSelected'; import { SvgSearchAlternate } from '../../../icons/v2'; -import { styles, theme } from '../../../style'; +import { theme } from '../../../style'; import { InputWithContent } from '../../common/InputWithContent'; -import { Label } from '../../common/Label'; -import { View } from '../../common/View'; import type { Binding, SheetNames, SheetFields } from '../../spreadsheet'; import { CellValue, CellValueText } from '../../spreadsheet/CellValue'; import { useSheetValue } from '../../spreadsheet/useSheetValue'; diff --git a/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx index 6e3b3170231..b1f78abb479 100644 --- a/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx +++ b/packages/desktop-client/src/components/modals/AccountAutocompleteModal.tsx @@ -1,6 +1,8 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style'; import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; import { @@ -9,7 +11,6 @@ import { ModalTitle, ModalHeader, } from '../common/Modal'; -import { View } from '../common/View'; import { SectionLabel } from '../forms'; import { useResponsive } from '../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/modals/AccountMenuModal.tsx b/packages/desktop-client/src/components/modals/AccountMenuModal.tsx index a7553c384c5..b36318ea864 100644 --- a/packages/desktop-client/src/components/modals/AccountMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/AccountMenuModal.tsx @@ -7,6 +7,12 @@ import { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type AccountEntity } from 'loot-core/types/models'; import { useAccount } from '../../hooks/useAccount'; @@ -14,17 +20,13 @@ import { useAccounts } from '../../hooks/useAccounts'; import { useNotes } from '../../hooks/useNotes'; import { SvgClose, SvgDotsHorizontalTriple, SvgLockOpen } from '../../icons/v1'; import { SvgNotesPaper } from '../../icons/v2'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader, ModalTitle, } from '../common/Modal'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { Notes } from '../Notes'; import { validateAccountName } from '../util/accountValidation'; diff --git a/packages/desktop-client/src/components/modals/BudgetListModal.tsx b/packages/desktop-client/src/components/modals/BudgetListModal.tsx index 1d1d5fc77f5..7e51f6b9bf6 100644 --- a/packages/desktop-client/src/components/modals/BudgetListModal.tsx +++ b/packages/desktop-client/src/components/modals/BudgetListModal.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useMetadataPref } from '../../hooks/useMetadataPref'; import { useSelector } from '../../redux'; import { Modal, ModalHeader, ModalCloseButton } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { BudgetList } from '../manager/BudgetList'; export function BudgetListModal() { diff --git a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx index e96abcdc8e7..733076afdad 100644 --- a/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/BudgetPageMenuModal.tsx @@ -4,9 +4,11 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; +import { styles } from '@actual-app/components/styles'; + import { useLocalPref } from '../../hooks/useLocalPref'; -import { theme, styles } from '../../style'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; type BudgetPageMenuModalProps = ComponentPropsWithoutRef; diff --git a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx index 269e552ee6d..d64b468dc48 100644 --- a/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx +++ b/packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx @@ -1,6 +1,8 @@ import React, { type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { theme } from '../../style'; @@ -11,7 +13,6 @@ import { ModalTitle, ModalHeader, } from '../common/Modal'; -import { View } from '../common/View'; import { SectionLabel } from '../forms'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { NamespaceContext } from '../spreadsheet/NamespaceContext'; diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx index bf22caa105b..f502a62f41c 100644 --- a/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx @@ -7,23 +7,25 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type CategoryGroupEntity } from 'loot-core/types/models'; import { useCategories } from '../../hooks/useCategories'; import { useNotes } from '../../hooks/useNotes'; import { SvgDotsHorizontalTriple, SvgAdd, SvgTrash } from '../../icons/v1'; import { SvgNotesPaper, SvgViewHide, SvgViewShow } from '../../icons/v2'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader, ModalTitle, } from '../common/Modal'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { Notes } from '../Notes'; type CategoryGroupMenuModalProps = { diff --git a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx index edec24657d4..4b3271769f6 100644 --- a/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/CategoryMenuModal.tsx @@ -2,6 +2,12 @@ import React, { useRef, useState, type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type CategoryEntity } from 'loot-core/types/models'; import { useCategory } from '../../hooks/useCategory'; @@ -9,17 +15,13 @@ import { useCategoryGroup } from '../../hooks/useCategoryGroup'; import { useNotes } from '../../hooks/useNotes'; import { SvgDotsHorizontalTriple, SvgTrash } from '../../icons/v1'; import { SvgNotesPaper, SvgViewHide, SvgViewShow } from '../../icons/v2'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader, ModalTitle, } from '../common/Modal'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { Notes } from '../Notes'; type CategoryMenuModalProps = { diff --git a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx index 1519db34919..cc698bb6361 100644 --- a/packages/desktop-client/src/components/modals/CloseAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/CloseAccountModal.tsx @@ -3,6 +3,13 @@ import React, { type FormEvent, useState, type CSSProperties } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { FormError } from '@actual-app/components/form-error'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { closeAccount } from 'loot-core/client/queries/queriesSlice'; import { integerToCurrency } from 'loot-core/shared/util'; @@ -12,16 +19,11 @@ import { type TransObjectLiteral } from 'loot-core/types/util'; import { useAccounts } from '../../hooks/useAccounts'; import { useCategories } from '../../hooks/useCategories'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete'; -import { Button } from '../common/Button2'; -import { FormError } from '../common/FormError'; import { Link } from '../common/Link'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; function needsCategory( diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx index 5b5315df73f..0acaea9cca8 100644 --- a/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmTransactionDeleteModal.tsx @@ -1,12 +1,13 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { styles } from '../../style'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; type ConfirmTransactionDeleteProps = { diff --git a/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx b/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx index d77fee203b0..a3ed1078ad1 100644 --- a/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmUnlinkAccountModal.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { View } from '@actual-app/components/view'; + import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { View } from '../common/View'; type ConfirmUnlinkAccountProps = { accountName: string; diff --git a/packages/desktop-client/src/components/modals/CoverModal.tsx b/packages/desktop-client/src/components/modals/CoverModal.tsx index 31b0437ad99..0c0de7ddc40 100644 --- a/packages/desktop-client/src/components/modals/CoverModal.tsx +++ b/packages/desktop-client/src/components/modals/CoverModal.tsx @@ -1,19 +1,20 @@ import React, { useCallback, useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { type CategoryEntity } from 'loot-core/types/models'; import { useCategories } from '../../hooks/useCategories'; import { useDispatch } from '../../redux'; -import { styles } from '../../style'; import { addToBeBudgetedGroup, removeCategoriesFromGroups, } from '../budget/util'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { FieldLabel, TapField } from '../mobile/MobileForms'; type CoverModalProps = { diff --git a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx index 3c5c1a3fe5b..5b554f45bf8 100644 --- a/packages/desktop-client/src/components/modals/CreateAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccountModal.tsx @@ -2,6 +2,14 @@ import React, { useEffect, useState } from 'react'; import { DialogTrigger } from 'react-aria-components'; import { Trans, useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Menu } from '@actual-app/components/menu'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; @@ -15,15 +23,8 @@ import { SvgDotsHorizontalTriple } from '../../icons/v1'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; import { Warning } from '../alerts'; -import { Button, ButtonWithLoading } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Link } from '../common/Link'; -import { Menu } from '../common/Menu'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useMultiuserEnabled } from '../ServerContext'; type CreateAccountProps = { diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx index cb7353de519..a2733b37a6d 100644 --- a/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx +++ b/packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx @@ -3,6 +3,12 @@ import React, { useState } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation, Trans } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { loadAllFiles, loadGlobalPrefs } from 'loot-core/client/actions'; @@ -11,9 +17,7 @@ import { send } from 'loot-core/platform/client/fetch'; import { getCreateKeyError } from 'loot-core/shared/errors'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { ButtonWithLoading } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; +import { theme } from '../../style'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; import { @@ -22,9 +26,6 @@ import { ModalCloseButton, ModalHeader, } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; type CreateEncryptionKeyModalProps = { diff --git a/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx b/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx index 29a43ce6410..a30344bbcc2 100644 --- a/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx +++ b/packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx @@ -3,6 +3,13 @@ import { type FormEvent, useState } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { FormError } from '@actual-app/components/form-error'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { InlineField } from '@actual-app/components/inline-field'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { closeModal } from 'loot-core/client/actions'; import { createAccount } from 'loot-core/client/queries/queriesSlice'; import { toRelaxedNumber } from 'loot-core/shared/util'; @@ -11,10 +18,6 @@ import * as useAccounts from '../../hooks/useAccounts'; import { useNavigate } from '../../hooks/useNavigate'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { FormError } from '../common/FormError'; -import { InitialFocus } from '../common/InitialFocus'; -import { InlineField } from '../common/InlineField'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; import { @@ -24,8 +27,6 @@ import { ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { validateAccountName } from '../util/accountValidation'; diff --git a/packages/desktop-client/src/components/modals/EditAccess.tsx b/packages/desktop-client/src/components/modals/EditAccess.tsx index aaef96cfb3d..923b69ccab2 100644 --- a/packages/desktop-client/src/components/modals/EditAccess.tsx +++ b/packages/desktop-client/src/components/modals/EditAccess.tsx @@ -1,6 +1,12 @@ import { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, popModal, signOut } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import { getUserAccessErrors } from 'loot-core/shared/errors'; @@ -8,13 +14,9 @@ import { type Handlers } from 'loot-core/types/handlers'; import { type UserAccessEntity } from 'loot-core/types/models/userAccess'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type EditUserAccessProps = { diff --git a/packages/desktop-client/src/components/modals/EditFieldModal.tsx b/packages/desktop-client/src/components/modals/EditFieldModal.tsx index 92503b70e89..cc6d55fe695 100644 --- a/packages/desktop-client/src/components/modals/EditFieldModal.tsx +++ b/packages/desktop-client/src/components/modals/EditFieldModal.tsx @@ -6,6 +6,8 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; import { parseISO, format as formatDate, parse as parseDate } from 'date-fns'; import { currentDay, dayFromDate } from 'loot-core/shared/months'; @@ -13,10 +15,8 @@ import { amountToInteger } from 'loot-core/shared/util'; import { useDateFormat } from '../../hooks/useDateFormat'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Input } from '../common/Input'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { SectionLabel } from '../forms'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { DateSelect } from '../select/DateSelect'; diff --git a/packages/desktop-client/src/components/modals/EditRuleModal.jsx b/packages/desktop-client/src/components/modals/EditRuleModal.jsx index 8dfb9b59473..2be379fe424 100644 --- a/packages/desktop-client/src/components/modals/EditRuleModal.jsx +++ b/packages/desktop-client/src/components/modals/EditRuleModal.jsx @@ -1,6 +1,13 @@ import React, { useState, useEffect, useRef, useMemo } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { v4 as uuid } from 'uuid'; @@ -35,15 +42,9 @@ import { useSelected, SelectedProvider } from '../../hooks/useSelected'; import { SvgDelete, SvgAdd, SvgSubtract } from '../../icons/v0'; import { SvgAlignLeft, SvgCode, SvgInformationOutline } from '../../icons/v1'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; import { StatusBadge } from '../schedules/StatusBadge'; import { SimpleTransactionsTable } from '../transactions/SimpleTransactionsTable'; import { BetweenAmountInput } from '../util/AmountInput'; diff --git a/packages/desktop-client/src/components/modals/EditUser.tsx b/packages/desktop-client/src/components/modals/EditUser.tsx index 0543fe98b40..081e14b8af2 100644 --- a/packages/desktop-client/src/components/modals/EditUser.tsx +++ b/packages/desktop-client/src/components/modals/EditUser.tsx @@ -1,19 +1,21 @@ import { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, popModal, signOut } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import { PossibleRoles, type UserEntity } from 'loot-core/types/models/user'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; +import { theme } from '../../style'; import { Input } from '../common/Input'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox, FormField, FormLabel } from '../forms'; type User = UserEntity; diff --git a/packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx b/packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx index 5dc42192978..6625973d8a0 100644 --- a/packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx @@ -4,10 +4,14 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { envelopeBudget } from 'loot-core/client/queries'; import { useCategory } from '../../hooks/useCategory'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { BalanceWithCarryover, CarryoverIndicator, @@ -19,8 +23,6 @@ import { ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { CellValueText } from '../spreadsheet/CellValue'; type EnvelopeBalanceMenuModalProps = ComponentPropsWithoutRef< diff --git a/packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx b/packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx index a7f1d9eb5a3..4d32cce5f0c 100644 --- a/packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/EnvelopeBudgetMenuModal.tsx @@ -6,11 +6,15 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { envelopeBudget } from 'loot-core/client/queries'; import { amountToInteger, integerToAmount } from 'loot-core/shared/util'; import { useCategory } from '../../hooks/useCategory'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { BudgetMenu } from '../budget/envelope/BudgetMenu'; import { useEnvelopeSheetValue } from '../budget/envelope/EnvelopeBudgetComponents'; import { @@ -19,8 +23,6 @@ import { ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FocusableAmountInput } from '../mobile/transactions/FocusableAmountInput'; type EnvelopeBudgetMenuModalProps = ComponentPropsWithoutRef< diff --git a/packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx b/packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx index 543b13784fa..932b58ee216 100644 --- a/packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/EnvelopeBudgetMonthMenuModal.tsx @@ -2,6 +2,9 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import * as monthUtils from 'loot-core/shared/months'; @@ -10,11 +13,9 @@ import { useNotes } from '../../hooks/useNotes'; import { useUndo } from '../../hooks/useUndo'; import { SvgCheveronDown, SvgCheveronUp } from '../../icons/v1'; import { SvgNotesPaper } from '../../icons/v2'; -import { styles, theme, type CSSProperties } from '../../style'; +import { theme, type CSSProperties } from '../../style'; import { BudgetMonthMenu } from '../budget/envelope/budgetsummary/BudgetMonthMenu'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { Notes } from '../Notes'; type EnvelopeBudgetMonthMenuModalProps = { diff --git a/packages/desktop-client/src/components/modals/EnvelopeBudgetSummaryModal.tsx b/packages/desktop-client/src/components/modals/EnvelopeBudgetSummaryModal.tsx index 1acd608fe8c..f860b0950c8 100644 --- a/packages/desktop-client/src/components/modals/EnvelopeBudgetSummaryModal.tsx +++ b/packages/desktop-client/src/components/modals/EnvelopeBudgetSummaryModal.tsx @@ -1,6 +1,8 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; + import { collapseModals, pushModal } from 'loot-core/client/actions'; import { envelopeBudget } from 'loot-core/client/queries'; import { format, sheetForMonth, prevMonth } from 'loot-core/shared/months'; @@ -9,7 +11,6 @@ import { groupById, integerToCurrency } from 'loot-core/shared/util'; import { useCategories } from '../../hooks/useCategories'; import { useUndo } from '../../hooks/useUndo'; import { useDispatch } from '../../redux'; -import { styles } from '../../style'; import { ToBudgetAmount } from '../budget/envelope/budgetsummary/ToBudgetAmount'; import { TotalsList } from '../budget/envelope/budgetsummary/TotalsList'; import { useEnvelopeSheetValue } from '../budget/envelope/EnvelopeBudgetComponents'; diff --git a/packages/desktop-client/src/components/modals/EnvelopeToBudgetMenuModal.tsx b/packages/desktop-client/src/components/modals/EnvelopeToBudgetMenuModal.tsx index 3466db52d69..43371ccaff6 100644 --- a/packages/desktop-client/src/components/modals/EnvelopeToBudgetMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/EnvelopeToBudgetMenuModal.tsx @@ -3,7 +3,9 @@ import React, { type CSSProperties, } from 'react'; -import { theme, styles } from '../../style'; +import { styles } from '@actual-app/components/styles'; + +import { theme } from '../../style'; import { ToBudgetMenu } from '../budget/envelope/budgetsummary/ToBudgetMenu'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; diff --git a/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx b/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx index 91c3cd01094..904e00ba2b2 100644 --- a/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx +++ b/packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx @@ -3,13 +3,18 @@ import React, { useState } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type FinanceModals } from 'loot-core/client/state-types/modals'; import { send } from 'loot-core/platform/client/fetch'; import { getTestKeyError } from 'loot-core/shared/errors'; -import { styles, theme } from '../../style'; -import { Button, ButtonWithLoading } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; +import { theme } from '../../style'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; import { @@ -18,9 +23,6 @@ import { ModalCloseButton, ModalHeader, } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; type FixEncryptionKeyModalProps = { diff --git a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx index c89f1a424f4..c477d1178c1 100644 --- a/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx +++ b/packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx @@ -2,6 +2,10 @@ import React, { useEffect, useState, useRef } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions/modals'; import { sendCatch } from 'loot-core/platform/client/fetch'; import { @@ -15,11 +19,8 @@ import { useDispatch } from '../../redux'; import { theme } from '../../style'; import { Error, Warning } from '../alerts'; import { Autocomplete } from '../autocomplete/Autocomplete'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; import { COUNTRY_OPTIONS } from '../util/countries'; diff --git a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx index 39cac360de4..0bdd4761fd4 100644 --- a/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx +++ b/packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx @@ -2,12 +2,15 @@ import React, { useState } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { send } from 'loot-core/platform/client/fetch'; import { getSecretsError } from 'loot-core/shared/errors'; import { Error } from '../alerts'; -import { ButtonWithLoading } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; import { @@ -16,8 +19,6 @@ import { ModalCloseButton, ModalHeader, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type GoCardlessInitialiseProps = { diff --git a/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx b/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx index 12b06548ad0..6b50547378d 100644 --- a/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx +++ b/packages/desktop-client/src/components/modals/GoalTemplateModal.tsx @@ -1,10 +1,11 @@ import { Trans, useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style'; import { Link } from '../common/Link'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { TableHeader, Row, Field } from '../table'; export function GoalTemplateModal() { diff --git a/packages/desktop-client/src/components/modals/HoldBufferModal.tsx b/packages/desktop-client/src/components/modals/HoldBufferModal.tsx index 199411c00c5..c94b3a52c6e 100644 --- a/packages/desktop-client/src/components/modals/HoldBufferModal.tsx +++ b/packages/desktop-client/src/components/modals/HoldBufferModal.tsx @@ -1,14 +1,15 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { envelopeBudget } from 'loot-core/client/queries'; -import { styles } from '../../style'; import { useEnvelopeSheetValue } from '../budget/envelope/EnvelopeBudgetComponents'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { FieldLabel } from '../mobile/MobileForms'; import { AmountInput } from '../util/AmountInput'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx index 5af399a4396..b456f71d637 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/CheckboxOption.tsx @@ -4,8 +4,9 @@ import React, { type ReactNode, } from 'react'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../../style'; -import { View } from '../../common/View'; import { Checkbox } from '../../forms'; type CheckboxOptionProps = { diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/DateFormatSelect.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/DateFormatSelect.tsx index d743c71dedc..5e543568c3d 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/DateFormatSelect.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/DateFormatSelect.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { View } from '@actual-app/components/view'; + import { Select } from '../../common/Select'; -import { View } from '../../common/View'; import { SectionLabel } from '../../forms'; import { diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx index e4a0ab4e80a..dc92a26bfd5 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/FieldMappings.tsx @@ -1,7 +1,8 @@ import React from 'react'; -import { Stack } from '../../common/Stack'; -import { View } from '../../common/View'; +import { Stack } from '@actual-app/components/stack'; +import { View } from '@actual-app/components/view'; + import { SectionLabel } from '../../forms'; import { SelectField } from './SelectField'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx index aaf616cb7d0..a54e8993a48 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx @@ -1,6 +1,10 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import deepEqual from 'deep-equal'; import { @@ -16,13 +20,9 @@ import { useDateFormat } from '../../../hooks/useDateFormat'; import { useSyncedPrefs } from '../../../hooks/useSyncedPrefs'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button, ButtonWithLoading } from '../../common/Button2'; import { Input } from '../../common/Input'; import { Modal, ModalCloseButton, ModalHeader } from '../../common/Modal'; import { Select } from '../../common/Select'; -import { Stack } from '../../common/Stack'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { SectionLabel } from '../../forms'; import { TableHeader, TableWithNavigator } from '../../table'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx index 80b565789ad..07f52985366 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { View } from '@actual-app/components/view'; + import { Input } from '../../common/Input'; -import { View } from '../../common/View'; import { CheckboxOption } from './CheckboxOption'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx index 4eb4fd23dca..4c48384f0bf 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx @@ -1,7 +1,8 @@ import React, { type ComponentProps } from 'react'; +import { View } from '@actual-app/components/view'; + import { Input } from '../../common/Input'; -import { View } from '../../common/View'; import { CheckboxOption } from './CheckboxOption'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx index c32c9e09c69..7a6beded1b4 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/ParsedDate.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; + import { theme } from '../../../style'; -import { Text } from '../../common/Text'; import { formatDate, parseDate } from './utils'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/SubLabel.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/SubLabel.tsx index 7994c94fcf7..58a3490279c 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/SubLabel.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/SubLabel.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { Text } from '@actual-app/components/text'; + import { theme } from '../../../style'; -import { Text } from '../../common/Text'; type SubLabelProps = { title: string; diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx index 738ab9494ab..257c4833d8a 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx +++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx @@ -1,13 +1,15 @@ import React, { type ComponentProps, useMemo } from 'react'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; + import { amountToCurrency } from 'loot-core/shared/util'; import { type CategoryEntity } from 'loot-core/types/models'; import { SvgDownAndRightArrow } from '../../../icons/v2'; -import { theme, styles } from '../../../style'; -import { Stack } from '../../common/Stack'; -import { Tooltip } from '../../common/Tooltip'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { Checkbox } from '../../forms'; import { Row, Field } from '../../table'; diff --git a/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx b/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx index fb75b1a11cd..cbe97472759 100644 --- a/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx +++ b/packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx @@ -2,11 +2,12 @@ import { type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import * as Platform from 'loot-core/client/platform'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; type KeyIconProps = { shortcut: string; diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.tsx b/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.tsx index 9dbf9df1036..33b79a8f88a 100644 --- a/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.tsx +++ b/packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.tsx @@ -1,6 +1,11 @@ import React, { useState, useRef, useEffect, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { replaceModal } from 'loot-core/client/actions/modals'; import { send } from 'loot-core/platform/client/fetch'; import { type PayeeEntity } from 'loot-core/types/models'; @@ -9,11 +14,7 @@ import { usePayees } from '../../hooks/usePayees'; import { useSelector, useDispatch } from '../../redux'; import { theme } from '../../style'; import { Information } from '../alerts'; -import { Button } from '../common/Button2'; import { Modal, ModalButtons } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; const highlightStyle = { color: theme.pageTextPositive }; diff --git a/packages/desktop-client/src/components/modals/NotesModal.tsx b/packages/desktop-client/src/components/modals/NotesModal.tsx index 716828ccdb2..de105976b62 100644 --- a/packages/desktop-client/src/components/modals/NotesModal.tsx +++ b/packages/desktop-client/src/components/modals/NotesModal.tsx @@ -2,11 +2,12 @@ import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { useNotes } from '../../hooks/useNotes'; import { SvgCheck } from '../../icons/v2'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { Notes } from '../Notes'; type NotesModalProps = { diff --git a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx index 18dbd7b6caf..de4729edd9a 100644 --- a/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx +++ b/packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx @@ -1,6 +1,11 @@ import { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Label } from '@actual-app/components/label'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { closeBudget, popModal } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import * as asyncStorage from 'loot-core/platform/server/asyncStorage'; @@ -8,12 +13,9 @@ import { getOpenIdErrors } from 'loot-core/shared/errors'; import { type OpenIdConfig } from 'loot-core/types/models/openid'; import { useDispatch } from '../../redux'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { Error } from '../alerts'; -import { Button } from '../common/Button2'; -import { Label } from '../common/Label'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { OpenIdForm } from '../manager/subscribe/OpenIdForm'; import { useRefreshLoginMethods } from '../ServerContext'; diff --git a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx index 2a904f26345..a8aa2c09895 100644 --- a/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx +++ b/packages/desktop-client/src/components/modals/OutOfSyncMigrationsModal.tsx @@ -1,15 +1,16 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { closeBudget } from 'loot-core/client/actions'; import { useDispatch } from '../../redux'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; import { Modal, ModalHeader, ModalTitle } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; export function OutOfSyncMigrationsModal() { const dispatch = useDispatch(); diff --git a/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx b/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx index 067d127fcf1..1567a775fab 100644 --- a/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx +++ b/packages/desktop-client/src/components/modals/PasswordEnableModal.tsx @@ -1,17 +1,19 @@ import { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Label } from '@actual-app/components/label'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { closeBudget, popModal } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import * as asyncStorage from 'loot-core/platform/server/asyncStorage'; import { useDispatch } from '../../redux'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { Error as ErrorAlert } from '../alerts'; -import { Button } from '../common/Button2'; -import { Label } from '../common/Label'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { FormField } from '../forms'; import { ConfirmOldPasswordForm, diff --git a/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx b/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx index 53efee0fa35..ec148781abe 100644 --- a/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/ScheduledTransactionMenuModal.tsx @@ -5,6 +5,11 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { format } from 'loot-core/shared/months'; import { q } from 'loot-core/shared/query'; @@ -13,16 +18,13 @@ import { extractScheduleConds, } from 'loot-core/shared/schedules'; -import { theme, styles } from '../../style'; -import { Menu } from '../common/Menu'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; type ScheduledTransactionMenuModalProps = ScheduledTransactionMenuProps; diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx index 10c3fd8777d..545c47caefb 100644 --- a/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx +++ b/packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.jsx @@ -1,6 +1,10 @@ import React, { useState } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { linkAccount, linkAccountSimpleFin, @@ -12,10 +16,7 @@ import { useAccounts } from '../../hooks/useAccounts'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; import { Autocomplete } from '../autocomplete/Autocomplete'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { PrivacyFilter } from '../PrivacyFilter'; import { TableHeader, Table, Row, Field } from '../table'; diff --git a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx index d051d30f9be..c5460661436 100644 --- a/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx +++ b/packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx @@ -2,11 +2,14 @@ import React, { useState } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { send } from 'loot-core/platform/client/fetch'; import { getSecretsError } from 'loot-core/shared/errors'; import { Error } from '../alerts'; -import { ButtonWithLoading } from '../common/Button2'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; import { @@ -15,8 +18,6 @@ import { ModalCloseButton, ModalHeader, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type SimpleFinInitialiseProps = { diff --git a/packages/desktop-client/src/components/modals/SingleInputModal.tsx b/packages/desktop-client/src/components/modals/SingleInputModal.tsx index c1d5a12ed68..e56fa50844b 100644 --- a/packages/desktop-client/src/components/modals/SingleInputModal.tsx +++ b/packages/desktop-client/src/components/modals/SingleInputModal.tsx @@ -7,12 +7,13 @@ import React, { } from 'react'; import { Form } from 'react-aria-components'; -import { styles } from '../../style'; -import { Button } from '../common/Button2'; -import { FormError } from '../common/FormError'; -import { InitialFocus } from '../common/InitialFocus'; +import { Button } from '@actual-app/components/button'; +import { FormError } from '@actual-app/components/form-error'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { Modal, ModalCloseButton, type ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { InputField } from '../mobile/MobileForms'; type SingleInputModalProps = { diff --git a/packages/desktop-client/src/components/modals/TrackingBalanceMenuModal.tsx b/packages/desktop-client/src/components/modals/TrackingBalanceMenuModal.tsx index 2a070152c53..9d20517b6a3 100644 --- a/packages/desktop-client/src/components/modals/TrackingBalanceMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/TrackingBalanceMenuModal.tsx @@ -4,10 +4,14 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { trackingBudget } from 'loot-core/client/queries'; import { useCategory } from '../../hooks/useCategory'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { BalanceWithCarryover, CarryoverIndicator, @@ -19,8 +23,6 @@ import { ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { CellValueText } from '../spreadsheet/CellValue'; type TrackingBalanceMenuModalProps = ComponentPropsWithoutRef< diff --git a/packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx b/packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx index 33d8738caf7..abceb5c7d46 100644 --- a/packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/TrackingBudgetMenuModal.tsx @@ -6,11 +6,15 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { trackingBudget } from 'loot-core/client/queries'; import { amountToInteger, integerToAmount } from 'loot-core/shared/util'; import { useCategory } from '../../hooks/useCategory'; -import { theme, styles } from '../../style'; +import { theme } from '../../style'; import { BudgetMenu } from '../budget/tracking/BudgetMenu'; import { useTrackingSheetValue } from '../budget/tracking/TrackingBudgetComponents'; import { @@ -19,8 +23,6 @@ import { ModalHeader, ModalTitle, } from '../common/Modal'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FocusableAmountInput } from '../mobile/transactions/FocusableAmountInput'; type TrackingBudgetMenuModalProps = ComponentPropsWithoutRef< diff --git a/packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx b/packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx index b2aeb325d65..f136a8ac430 100644 --- a/packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx +++ b/packages/desktop-client/src/components/modals/TrackingBudgetMonthMenuModal.tsx @@ -2,6 +2,9 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import * as monthUtils from 'loot-core/shared/months'; @@ -10,11 +13,9 @@ import { useNotes } from '../../hooks/useNotes'; import { useUndo } from '../../hooks/useUndo'; import { SvgCheveronDown, SvgCheveronUp } from '../../icons/v1'; import { SvgNotesPaper } from '../../icons/v2'; -import { type CSSProperties, styles, theme } from '../../style'; +import { type CSSProperties, theme } from '../../style'; import { BudgetMonthMenu } from '../budget/tracking/budgetsummary/BudgetMonthMenu'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { Notes } from '../Notes'; type TrackingBudgetMonthMenuModalProps = { diff --git a/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx b/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx index 52309e339fa..1c1b75237e7 100644 --- a/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx +++ b/packages/desktop-client/src/components/modals/TrackingBudgetSummaryModal.tsx @@ -1,15 +1,16 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; + import { sheetForMonth } from 'loot-core/shared/months'; import * as monthUtils from 'loot-core/shared/months'; -import { styles } from '../../style'; import { ExpenseTotal } from '../budget/tracking/budgetsummary/ExpenseTotal'; import { IncomeTotal } from '../budget/tracking/budgetsummary/IncomeTotal'; import { Saved } from '../budget/tracking/budgetsummary/Saved'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Stack } from '../common/Stack'; import { NamespaceContext } from '../spreadsheet/NamespaceContext'; type TrackingBudgetSummaryModalProps = { diff --git a/packages/desktop-client/src/components/modals/TransferModal.tsx b/packages/desktop-client/src/components/modals/TransferModal.tsx index 9cf1a7fa64b..8fdb02ba225 100644 --- a/packages/desktop-client/src/components/modals/TransferModal.tsx +++ b/packages/desktop-client/src/components/modals/TransferModal.tsx @@ -1,20 +1,21 @@ import React, { useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { type CategoryEntity } from 'loot-core/types/models'; import { useCategories } from '../../hooks/useCategories'; import { useDispatch } from '../../redux'; -import { styles } from '../../style'; import { addToBeBudgetedGroup, removeCategoriesFromGroups, } from '../budget/util'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { View } from '../common/View'; import { FieldLabel, TapField } from '../mobile/MobileForms'; import { AmountInput } from '../util/AmountInput'; diff --git a/packages/desktop-client/src/components/modals/TransferOwnership.tsx b/packages/desktop-client/src/components/modals/TransferOwnership.tsx index 72c886ba457..b03f87c13b5 100644 --- a/packages/desktop-client/src/components/modals/TransferOwnership.tsx +++ b/packages/desktop-client/src/components/modals/TransferOwnership.tsx @@ -1,6 +1,12 @@ import { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, closeAndLoadBudget, @@ -14,13 +20,9 @@ import { type Handlers } from 'loot-core/types/handlers'; import { useMetadataPref } from '../../hooks/useMetadataPref'; import { useDispatch, useSelector } from '../../redux'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; +import { theme } from '../../style'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type TransferOwnershipProps = { diff --git a/packages/desktop-client/src/components/modals/manager/ConfirmChangeDocumentDir.tsx b/packages/desktop-client/src/components/modals/manager/ConfirmChangeDocumentDir.tsx index 97f7b9aa22d..1ff4529be6b 100644 --- a/packages/desktop-client/src/components/modals/manager/ConfirmChangeDocumentDir.tsx +++ b/packages/desktop-client/src/components/modals/manager/ConfirmChangeDocumentDir.tsx @@ -1,16 +1,18 @@ import React, { useCallback, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification } from 'loot-core/client/actions'; import { useGlobalPref } from '../../../hooks/useGlobalPref'; import { useDispatch } from '../../../redux'; -import { theme, styles } from '../../../style'; +import { theme } from '../../../style'; import { Information } from '../../alerts'; -import { Button, ButtonWithLoading } from '../../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../../common/Modal'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { Checkbox } from '../../forms'; function DirectoryDisplay({ directory }: { directory: string }) { diff --git a/packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx b/packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx index fb5ffda8d32..2f927f7b2a5 100644 --- a/packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx +++ b/packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx @@ -1,15 +1,16 @@ import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { deleteBudget } from 'loot-core/client/actions'; import { type File } from 'loot-core/types/file'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { ButtonWithLoading } from '../../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../../common/Modal'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; type DeleteFileProps = { file: File; diff --git a/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx b/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx index 7c5afeb9307..4e030163233 100644 --- a/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx +++ b/packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx @@ -1,6 +1,13 @@ import React, { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button, ButtonWithLoading } from '@actual-app/components/button'; +import { FormError } from '@actual-app/components/form-error'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { InlineField } from '@actual-app/components/inline-field'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { addNotification, duplicateBudget, @@ -11,10 +18,6 @@ import { type File } from 'loot-core/types/file'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button, ButtonWithLoading } from '../../common/Button2'; -import { FormError } from '../../common/FormError'; -import { InitialFocus } from '../../common/InitialFocus'; -import { InlineField } from '../../common/InlineField'; import { Input } from '../../common/Input'; import { Modal, @@ -22,8 +25,6 @@ import { ModalCloseButton, ModalHeader, } from '../../common/Modal'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; type DuplicateFileProps = { file: File; diff --git a/packages/desktop-client/src/components/modals/manager/FilesSettingsModal.tsx b/packages/desktop-client/src/components/modals/manager/FilesSettingsModal.tsx index 0e2a0b0d9b2..10cd1e939ae 100644 --- a/packages/desktop-client/src/components/modals/manager/FilesSettingsModal.tsx +++ b/packages/desktop-client/src/components/modals/manager/FilesSettingsModal.tsx @@ -1,16 +1,18 @@ import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { loadAllFiles, pushModal } from 'loot-core/client/actions'; import { useGlobalPref } from '../../../hooks/useGlobalPref'; import { SvgPencil1 } from '../../../icons/v2'; import { useDispatch } from '../../../redux'; -import { theme, styles } from '../../../style'; -import { Button } from '../../common/Button2'; +import { theme } from '../../../style'; import { Modal, ModalCloseButton, ModalHeader } from '../../common/Modal'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; function FileLocationSettings() { const [documentDir, _setDocumentDirPref] = useGlobalPref('documentDir'); diff --git a/packages/desktop-client/src/components/payees/CategoryLearning.tsx b/packages/desktop-client/src/components/payees/CategoryLearning.tsx index ac1b8851c12..f6dc054bd0d 100644 --- a/packages/desktop-client/src/components/payees/CategoryLearning.tsx +++ b/packages/desktop-client/src/components/payees/CategoryLearning.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; + import { useSyncedPref } from '../../hooks/useSyncedPref'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; export function CategoryLearning() { const { t } = useTranslation(); diff --git a/packages/desktop-client/src/components/payees/ManagePayees.tsx b/packages/desktop-client/src/components/payees/ManagePayees.tsx index 8125bcbeb78..b94ed08dc9c 100644 --- a/packages/desktop-client/src/components/payees/ManagePayees.tsx +++ b/packages/desktop-client/src/components/payees/ManagePayees.tsx @@ -7,6 +7,9 @@ import { } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; import memoizeOne from 'memoize-one'; import { pushModal } from 'loot-core/client/actions'; @@ -23,10 +26,7 @@ import { import { SvgExpandArrow } from '../../icons/v0'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Popover } from '../common/Popover'; import { Search } from '../common/Search'; -import { View } from '../common/View'; import { TableHeader, Cell, SelectCell } from '../table'; import { PayeeMenu } from './PayeeMenu'; diff --git a/packages/desktop-client/src/components/payees/PayeeMenu.tsx b/packages/desktop-client/src/components/payees/PayeeMenu.tsx index ac01298c8d7..759672f5ad6 100644 --- a/packages/desktop-client/src/components/payees/PayeeMenu.tsx +++ b/packages/desktop-client/src/components/payees/PayeeMenu.tsx @@ -1,13 +1,14 @@ import { useTranslation, Trans } from 'react-i18next'; +import { Menu, type MenuItem } from '@actual-app/components/menu'; +import { View } from '@actual-app/components/view'; + import { type PayeeEntity } from 'loot-core/types/models'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { SvgDelete, SvgMerge } from '../../icons/v0'; import { SvgBookmark, SvgLightBulb } from '../../icons/v1'; import { theme } from '../../style'; -import { Menu, type MenuItem } from '../common/Menu'; -import { View } from '../common/View'; type PayeeMenuProps = { payeesById: Record; diff --git a/packages/desktop-client/src/components/payees/PayeeTable.tsx b/packages/desktop-client/src/components/payees/PayeeTable.tsx index aa491e060f1..51c722866d6 100644 --- a/packages/desktop-client/src/components/payees/PayeeTable.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTable.tsx @@ -8,10 +8,11 @@ import { type ComponentRef, } from 'react'; +import { View } from '@actual-app/components/view'; + import { type PayeeEntity } from 'loot-core/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; -import { View } from '../common/View'; import { useTableNavigator, Table } from '../table'; import { PayeeTableRow } from './PayeeTableRow'; diff --git a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx index dbf4a1f5369..24de3c42b69 100644 --- a/packages/desktop-client/src/components/payees/PayeeTableRow.tsx +++ b/packages/desktop-client/src/components/payees/PayeeTableRow.tsx @@ -2,6 +2,11 @@ import { memo, useRef, type CSSProperties } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; + import { type PayeeEntity } from 'loot-core/types/models'; import { useContextMenu } from '../../hooks/useContextMenu'; @@ -9,10 +14,6 @@ import { useSelectedDispatch } from '../../hooks/useSelected'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { SvgArrowThinRight, SvgBookmark, SvgLightBulb } from '../../icons/v1'; import { theme } from '../../style'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; import { Cell, CellButton, diff --git a/packages/desktop-client/src/components/reports/CategorySelector.tsx b/packages/desktop-client/src/components/reports/CategorySelector.tsx index 0159324c191..39c8d36fd81 100644 --- a/packages/desktop-client/src/components/reports/CategorySelector.tsx +++ b/packages/desktop-client/src/components/reports/CategorySelector.tsx @@ -2,6 +2,10 @@ import React, { Fragment, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type CategoryEntity, type CategoryGroupEntity, @@ -13,9 +17,6 @@ import { SvgViewHide, SvgViewShow, } from '../../icons/v2'; -import { Button } from '../common/Button2'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { GraphButton } from './GraphButton'; diff --git a/packages/desktop-client/src/components/reports/ChooseGraph.tsx b/packages/desktop-client/src/components/reports/ChooseGraph.tsx index 0d28d6bff5c..9bcee37ea9a 100644 --- a/packages/desktop-client/src/components/reports/ChooseGraph.tsx +++ b/packages/desktop-client/src/components/reports/ChooseGraph.tsx @@ -1,10 +1,10 @@ import React, { type UIEvent, useRef, type CSSProperties } from 'react'; +import { styles } from '@actual-app/components/styles'; + import { type DataEntity } from 'loot-core/types/models/reports'; import { type RuleConditionEntity } from 'loot-core/types/models/rule'; -import { styles } from '../../style/styles'; - import { AreaGraph } from './graphs/AreaGraph'; import { BarGraph } from './graphs/BarGraph'; import { BarLineGraph } from './graphs/BarLineGraph'; diff --git a/packages/desktop-client/src/components/reports/Container.tsx b/packages/desktop-client/src/components/reports/Container.tsx index 3aa5fdfafc1..638eb283854 100644 --- a/packages/desktop-client/src/components/reports/Container.tsx +++ b/packages/desktop-client/src/components/reports/Container.tsx @@ -1,7 +1,7 @@ import React, { useRef, type ReactNode, type CSSProperties } from 'react'; import AutoSizer from 'react-virtualized-auto-sizer'; -import { View } from '../common/View'; +import { View } from '@actual-app/components/view'; type ContainerProps = { style?: CSSProperties; diff --git a/packages/desktop-client/src/components/reports/GraphButton.tsx b/packages/desktop-client/src/components/reports/GraphButton.tsx index dcb95e4d736..0eec5ee5b0b 100644 --- a/packages/desktop-client/src/components/reports/GraphButton.tsx +++ b/packages/desktop-client/src/components/reports/GraphButton.tsx @@ -1,9 +1,11 @@ import React, { type HTMLProps, type CSSProperties } from 'react'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; + +import { theme } from '../../style'; type GraphButtonProps = HTMLProps & { selected?: boolean; diff --git a/packages/desktop-client/src/components/reports/Header.tsx b/packages/desktop-client/src/components/reports/Header.tsx index bcca664ca90..c0be1356c8c 100644 --- a/packages/desktop-client/src/components/reports/Header.tsx +++ b/packages/desktop-client/src/components/reports/Header.tsx @@ -1,6 +1,10 @@ import { type ComponentProps, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { SpaceBetween } from '@actual-app/components/space-between'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { type RuleConditionEntity, @@ -8,10 +12,7 @@ import { } from 'loot-core/types/models'; import { type SyncedPrefs } from 'loot-core/types/prefs'; -import { Button } from '../common/Button2'; import { Select } from '../common/Select'; -import { SpaceBetween } from '../common/SpaceBetween'; -import { View } from '../common/View'; import { AppliedFilters } from '../filters/AppliedFilters'; import { FilterButton } from '../filters/FiltersMenu'; import { useResponsive } from '../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/reports/LegendItem.tsx b/packages/desktop-client/src/components/reports/LegendItem.tsx index 534c1ae9bdf..5a2506415d8 100644 --- a/packages/desktop-client/src/components/reports/LegendItem.tsx +++ b/packages/desktop-client/src/components/reports/LegendItem.tsx @@ -1,7 +1,7 @@ import React, { type CSSProperties } from 'react'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; export function LegendItem({ color, diff --git a/packages/desktop-client/src/components/reports/ModeButton.tsx b/packages/desktop-client/src/components/reports/ModeButton.tsx index 879ea780ee3..3813d0cbdc6 100644 --- a/packages/desktop-client/src/components/reports/ModeButton.tsx +++ b/packages/desktop-client/src/components/reports/ModeButton.tsx @@ -1,9 +1,9 @@ import React, { type ReactNode, type CSSProperties } from 'react'; +import { Button } from '@actual-app/components/button'; import { css } from '@emotion/css'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; type ModeButtonProps = { selected: boolean; diff --git a/packages/desktop-client/src/components/reports/Overview.tsx b/packages/desktop-client/src/components/reports/Overview.tsx index 88516403246..5c8bfedfe00 100644 --- a/packages/desktop-client/src/components/reports/Overview.tsx +++ b/packages/desktop-client/src/components/reports/Overview.tsx @@ -4,6 +4,11 @@ import { useHotkeys } from 'react-hotkeys-hook'; import { Trans, useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; + import { addNotification, removeNotification } from 'loot-core/client/actions'; import { useDashboard } from 'loot-core/client/data-hooks/dashboard'; import { useReports } from 'loot-core/client/data-hooks/reports'; @@ -21,11 +26,7 @@ import { useSyncedPref } from '../../hooks/useSyncedPref'; import { useUndo } from '../../hooks/useUndo'; import { useDispatch } from '../../redux'; import { breakpoints } from '../../tokens'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; import { MenuButton } from '../common/MenuButton'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { MOBILE_NAV_HEIGHT } from '../mobile/MobileNavTabs'; import { MobilePageHeader, Page, PageHeader } from '../Page'; import { useResponsive } from '../responsive/ResponsiveProvider'; diff --git a/packages/desktop-client/src/components/reports/ReportCard.tsx b/packages/desktop-client/src/components/reports/ReportCard.tsx index 2ec2acb2246..b1270ee2438 100644 --- a/packages/desktop-client/src/components/reports/ReportCard.tsx +++ b/packages/desktop-client/src/components/reports/ReportCard.tsx @@ -5,14 +5,15 @@ import React, { type CSSProperties, } from 'react'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { View } from '@actual-app/components/view'; + import { useContextMenu } from '../../hooks/useContextMenu'; import { useIsInViewport } from '../../hooks/useIsInViewport'; import { useNavigate } from '../../hooks/useNavigate'; import { theme } from '../../style'; -import { Menu } from '../common/Menu'; import { MenuButton } from '../common/MenuButton'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { NON_DRAGGABLE_AREA_CLASS_NAME } from './constants'; diff --git a/packages/desktop-client/src/components/reports/ReportLegend.tsx b/packages/desktop-client/src/components/reports/ReportLegend.tsx index 3e9d473a022..06dbc931c07 100644 --- a/packages/desktop-client/src/components/reports/ReportLegend.tsx +++ b/packages/desktop-client/src/components/reports/ReportLegend.tsx @@ -1,8 +1,10 @@ import React from 'react'; -import { theme, styles } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + +import { theme } from '../../style'; import { LegendItem } from './LegendItem'; import { ReportOptions } from './ReportOptions'; diff --git a/packages/desktop-client/src/components/reports/ReportSidebar.tsx b/packages/desktop-client/src/components/reports/ReportSidebar.tsx index cd886066463..64a10a4a840 100644 --- a/packages/desktop-client/src/components/reports/ReportSidebar.tsx +++ b/packages/desktop-client/src/components/reports/ReportSidebar.tsx @@ -1,6 +1,15 @@ import React, { useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { SpaceBetween } from '@actual-app/components/space-between'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { type CategoryEntity } from 'loot-core/types/models/category'; import { type CategoryGroupEntity } from 'loot-core/types/models/category-group'; @@ -11,17 +20,9 @@ import { } from 'loot-core/types/models/reports'; import { type SyncedPrefs } from 'loot-core/types/prefs'; -import { styles } from '../../style/styles'; import { theme } from '../../style/theme'; import { Information } from '../alerts'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; import { Select, type SelectOption } from '../common/Select'; -import { SpaceBetween } from '../common/SpaceBetween'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; import { CategorySelector } from './CategorySelector'; import { defaultsList, disabledList } from './disabledList'; diff --git a/packages/desktop-client/src/components/reports/ReportSummary.tsx b/packages/desktop-client/src/components/reports/ReportSummary.tsx index 3c506f345e6..30f620c9a14 100644 --- a/packages/desktop-client/src/components/reports/ReportSummary.tsx +++ b/packages/desktop-client/src/components/reports/ReportSummary.tsx @@ -1,6 +1,10 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { amountToCurrency, @@ -12,9 +16,7 @@ import { type DataEntity, } from 'loot-core/types/models/reports'; -import { theme, styles } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { PrivacyFilter } from '../PrivacyFilter'; import { ReportOptions } from './ReportOptions'; diff --git a/packages/desktop-client/src/components/reports/ReportTopbar.tsx b/packages/desktop-client/src/components/reports/ReportTopbar.tsx index 2a973e44de9..b998ed0c39a 100644 --- a/packages/desktop-client/src/components/reports/ReportTopbar.tsx +++ b/packages/desktop-client/src/components/reports/ReportTopbar.tsx @@ -1,6 +1,9 @@ import React, { type ComponentProps } from 'react'; import { useTranslation } from 'react-i18next'; +import { SpaceBetween } from '@actual-app/components/space-between'; +import { View } from '@actual-app/components/view'; + import { type CustomReportEntity } from 'loot-core/types/models/reports'; import { type RuleConditionEntity } from 'loot-core/types/models/rule'; @@ -15,8 +18,6 @@ import { } from '../../icons/v1'; import { SvgChartArea } from '../../icons/v1/ChartArea'; import { theme } from '../../style'; -import { SpaceBetween } from '../common/SpaceBetween'; -import { View } from '../common/View'; import { FilterButton } from '../filters/FiltersMenu'; import { GraphButton } from './GraphButton'; diff --git a/packages/desktop-client/src/components/reports/SaveReport.tsx b/packages/desktop-client/src/components/reports/SaveReport.tsx index d7193b0d811..d3e13d2fd5f 100644 --- a/packages/desktop-client/src/components/reports/SaveReport.tsx +++ b/packages/desktop-client/src/components/reports/SaveReport.tsx @@ -1,14 +1,15 @@ import React, { createRef, useRef, useState } from 'react'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { useReports } from 'loot-core/client/data-hooks/reports'; import { send, sendCatch } from 'loot-core/platform/client/fetch'; import { type CustomReportEntity } from 'loot-core/types/models'; import { SvgExpandArrow } from '../../icons/v0'; -import { Button } from '../common/Button2'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { SaveReportChoose } from './SaveReportChoose'; import { SaveReportDelete } from './SaveReportDelete'; diff --git a/packages/desktop-client/src/components/reports/SaveReportChoose.tsx b/packages/desktop-client/src/components/reports/SaveReportChoose.tsx index 27d561ff30a..689eefea651 100644 --- a/packages/desktop-client/src/components/reports/SaveReportChoose.tsx +++ b/packages/desktop-client/src/components/reports/SaveReportChoose.tsx @@ -2,11 +2,12 @@ import React, { createRef, useEffect, useState } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { theme } from '../../style/theme'; -import { Button } from '../common/Button2'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { GenericInput } from '../util/GenericInput'; type SaveReportChooseProps = { diff --git a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx index 3e11e2cb961..b9922373bcd 100644 --- a/packages/desktop-client/src/components/reports/SaveReportDelete.tsx +++ b/packages/desktop-client/src/components/reports/SaveReportDelete.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type TransObjectLiteral } from 'loot-core/types/util'; import { theme } from '../../style/theme'; -import { Button } from '../common/Button2'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; type SaveReportDeleteProps = { onDelete: () => void; diff --git a/packages/desktop-client/src/components/reports/SaveReportMenu.tsx b/packages/desktop-client/src/components/reports/SaveReportMenu.tsx index 719b0d9224f..38d607579e8 100644 --- a/packages/desktop-client/src/components/reports/SaveReportMenu.tsx +++ b/packages/desktop-client/src/components/reports/SaveReportMenu.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Menu, type MenuItem } from '../common/Menu'; +import { Menu, type MenuItem } from '@actual-app/components/menu'; export function SaveReportMenu({ onMenuSelect, diff --git a/packages/desktop-client/src/components/reports/SaveReportName.tsx b/packages/desktop-client/src/components/reports/SaveReportName.tsx index 85ea6436585..f0b92002655 100644 --- a/packages/desktop-client/src/components/reports/SaveReportName.tsx +++ b/packages/desktop-client/src/components/reports/SaveReportName.tsx @@ -2,14 +2,15 @@ import React, { type RefObject, useEffect } from 'react'; import { Form } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type CustomReportEntity } from 'loot-core/types/models/reports'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Input } from '../common/Input'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; type SaveReportNameProps = { diff --git a/packages/desktop-client/src/components/reports/SummaryNumber.tsx b/packages/desktop-client/src/components/reports/SummaryNumber.tsx index 7d2b9c1bcd0..f93c02b0cbd 100644 --- a/packages/desktop-client/src/components/reports/SummaryNumber.tsx +++ b/packages/desktop-client/src/components/reports/SummaryNumber.tsx @@ -1,12 +1,12 @@ import React, { type Ref, useRef, useState } from 'react'; +import { View } from '@actual-app/components/view'; import { debounce } from 'debounce'; import { amountToCurrency } from 'loot-core/shared/util'; import { useMergedRefs } from '../../hooks/useMergedRefs'; import { useResizeObserver } from '../../hooks/useResizeObserver'; -import { View } from '../common/View'; import { PrivacyFilter } from '../PrivacyFilter'; import { chartTheme } from './chart-theme'; diff --git a/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx b/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx index 6918939ebb9..4e9fd26080a 100644 --- a/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx +++ b/packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx @@ -1,6 +1,10 @@ import { type Ref, useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; import { addDays, format, @@ -14,10 +18,7 @@ import { amountToCurrency } from 'loot-core/shared/util'; import { type SyncedPrefs } from 'loot-core/types/prefs'; import { useResizeObserver } from '../../../hooks/useResizeObserver'; -import { styles, theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Tooltip } from '../../common/Tooltip'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { PrivacyFilter } from '../../PrivacyFilter'; import { chartTheme } from '../chart-theme'; diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx index 4a6118fe5be..410e0fca3e4 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/RenderTableRow.tsx @@ -1,8 +1,8 @@ import React, { type ReactNode, type CSSProperties } from 'react'; -import { type GroupedEntity } from 'loot-core/types/models/reports'; +import { View } from '@actual-app/components/view'; -import { View } from '../../../common/View'; +import { type GroupedEntity } from 'loot-core/types/models/reports'; import { type renderRowProps } from './ReportTable'; diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx index a4494f76de4..74ff355a888 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx @@ -5,13 +5,14 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { type balanceTypeOpType, type IntervalEntity, } from 'loot-core/types/models/reports'; import { theme } from '../../../../style'; -import { View } from '../../../common/View'; import { Row, Cell } from '../../../table'; import { ReportOptions } from '../../ReportOptions'; diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx index 802f91f738f..45008a2a5ec 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableList.tsx @@ -1,12 +1,13 @@ import React, { type ReactNode, type CSSProperties } from 'react'; +import { View } from '@actual-app/components/view'; + import { type GroupedEntity, type DataEntity, } from 'loot-core/types/models/reports'; import { theme } from '../../../../style'; -import { View } from '../../../common/View'; import { Row } from '../../../table'; import { RenderTableRow } from './RenderTableRow'; diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx index 8c6057a694d..4d190dbd2e0 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx @@ -5,6 +5,9 @@ import React, { type CSSProperties, } from 'react'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { amountToCurrency, amountToInteger, @@ -20,8 +23,6 @@ import { useAccounts } from '../../../../hooks/useAccounts'; import { useCategories } from '../../../../hooks/useCategories'; import { useNavigate } from '../../../../hooks/useNavigate'; import { theme } from '../../../../style'; -import { Text } from '../../../common/Text'; -import { View } from '../../../common/View'; import { useResponsive } from '../../../responsive/ResponsiveProvider'; import { Row, Cell } from '../../../table'; import { showActivity } from '../showActivity'; diff --git a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx index 5b3fb78a72f..98f2e014d19 100644 --- a/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx +++ b/packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx @@ -7,14 +7,15 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; + import { type GroupedEntity, type DataEntity, } from 'loot-core/types/models/reports'; import { theme } from '../../../../style'; -import { styles } from '../../../../style/styles'; -import { View } from '../../../common/View'; import { type renderTotalsProps } from './ReportTable'; diff --git a/packages/desktop-client/src/components/reports/index.tsx b/packages/desktop-client/src/components/reports/index.tsx index 3a8165db1e3..b79de48f615 100644 --- a/packages/desktop-client/src/components/reports/index.tsx +++ b/packages/desktop-client/src/components/reports/index.tsx @@ -1,6 +1,7 @@ import { useTranslation } from 'react-i18next'; -import { View } from '../common/View'; +import { View } from '@actual-app/components/view'; + import { LoadComponent } from '../util/LoadComponent'; export function Reports() { diff --git a/packages/desktop-client/src/components/reports/reports/Calendar.tsx b/packages/desktop-client/src/components/reports/reports/Calendar.tsx index 1cd85d836a6..a5bcc5d2e2a 100644 --- a/packages/desktop-client/src/components/reports/reports/Calendar.tsx +++ b/packages/desktop-client/src/components/reports/reports/Calendar.tsx @@ -10,6 +10,9 @@ import { Trans, useTranslation } from 'react-i18next'; import { useParams, useSearchParams } from 'react-router-dom'; import { useSpring, animated, config } from 'react-spring'; +import { Button } from '@actual-app/components/button'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { useDrag } from '@use-gesture/react'; import { format, parseISO } from 'date-fns'; @@ -48,9 +51,7 @@ import { SvgCheveronUp, } from '../../../icons/v1'; import { useDispatch } from '../../../redux'; -import { styles, theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { EditablePageHeaderTitle } from '../../EditablePageHeaderTitle'; import { MobileBackButton } from '../../mobile/MobileBackButton'; import { TransactionList as TransactionListMobile } from '../../mobile/transactions/TransactionList'; diff --git a/packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx b/packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx index cef007cc035..6b4aef81df7 100644 --- a/packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx +++ b/packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx @@ -1,13 +1,13 @@ import React, { useState, useMemo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; import { Bar, BarChart, LabelList, ResponsiveContainer } from 'recharts'; import { integerToCurrency } from 'loot-core/shared/util'; import { type CashFlowWidget } from 'loot-core/types/models'; import { theme } from '../../../style'; -import { View } from '../../common/View'; import { PrivacyFilter } from '../../PrivacyFilter'; import { Change } from '../Change'; import { chartTheme } from '../chart-theme'; diff --git a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx index 1f7775826f5..c2f0c1e5ecb 100644 --- a/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx +++ b/packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx @@ -1,6 +1,11 @@ import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; + import { addNotification } from 'loot-core/client/actions'; import { calculateHasWarning } from 'loot-core/client/reports'; import { send, sendCatch } from 'loot-core/platform/client/fetch/index'; @@ -13,11 +18,7 @@ import { usePayees } from '../../../hooks/usePayees'; import { useSyncedPref } from '../../../hooks/useSyncedPref'; import { SvgExclamationSolid } from '../../../icons/v1'; import { useDispatch } from '../../../redux'; -import { styles } from '../../../style/index'; import { theme } from '../../../style/theme'; -import { Text } from '../../common/Text'; -import { Tooltip } from '../../common/Tooltip'; -import { View } from '../../common/View'; import { DateRange } from '../DateRange'; import { ReportCard } from '../ReportCard'; import { ReportCardName } from '../ReportCardName'; diff --git a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx b/packages/desktop-client/src/components/reports/reports/GetCardData.tsx index c1907dae065..d4e8e542081 100644 --- a/packages/desktop-client/src/components/reports/reports/GetCardData.tsx +++ b/packages/desktop-client/src/components/reports/reports/GetCardData.tsx @@ -2,6 +2,9 @@ import React, { useMemo } from 'react'; import { ErrorBoundary } from 'react-error-boundary'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; + import * as monthUtils from 'loot-core/shared/months'; import { type AccountEntity } from 'loot-core/types/models/account'; import { type CategoryEntity } from 'loot-core/types/models/category'; @@ -10,9 +13,7 @@ import { type PayeeEntity } from 'loot-core/types/models/payee'; import { type CustomReportEntity } from 'loot-core/types/models/reports'; import { type SyncedPrefs } from 'loot-core/types/prefs'; -import { styles } from '../../../style/styles'; import { theme } from '../../../style/theme'; -import { Text } from '../../common/Text'; import { useResponsive } from '../../responsive/ResponsiveProvider'; import { ChooseGraph } from '../ChooseGraph'; import { getLiveRange } from '../getLiveRange'; diff --git a/packages/desktop-client/src/components/reports/reports/MarkdownCard.tsx b/packages/desktop-client/src/components/reports/reports/MarkdownCard.tsx index 53b07a622d5..47e11138f4f 100644 --- a/packages/desktop-client/src/components/reports/reports/MarkdownCard.tsx +++ b/packages/desktop-client/src/components/reports/reports/MarkdownCard.tsx @@ -3,14 +3,15 @@ import { TextArea } from 'react-aria-components'; import { useTranslation } from 'react-i18next'; import ReactMarkdown from 'react-markdown'; +import { Menu } from '@actual-app/components/menu'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { type MarkdownWidget } from 'loot-core/types/models'; -import { styles, theme } from '../../../style'; -import { Menu } from '../../common/Menu'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { NON_DRAGGABLE_AREA_CLASS_NAME } from '../constants'; import { ReportCard } from '../ReportCard'; diff --git a/packages/desktop-client/src/components/reports/reports/MissingReportCard.tsx b/packages/desktop-client/src/components/reports/reports/MissingReportCard.tsx index 427fd5ca4ac..b75aa522e6f 100644 --- a/packages/desktop-client/src/components/reports/reports/MissingReportCard.tsx +++ b/packages/desktop-client/src/components/reports/reports/MissingReportCard.tsx @@ -1,6 +1,7 @@ import React, { type ReactNode } from 'react'; -import { View } from '../../common/View'; +import { View } from '@actual-app/components/view'; + import { ReportCard } from '../ReportCard'; type MissingReportCardProps = { diff --git a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx b/packages/desktop-client/src/components/reports/reports/NetWorth.tsx index 42992b1c3bb..b31a1c97ac9 100644 --- a/packages/desktop-client/src/components/reports/reports/NetWorth.tsx +++ b/packages/desktop-client/src/components/reports/reports/NetWorth.tsx @@ -2,6 +2,10 @@ import React, { useState, useEffect, useMemo } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import * as d from 'date-fns'; import { addNotification } from 'loot-core/client/actions'; @@ -16,10 +20,7 @@ import { useFilters } from '../../../hooks/useFilters'; import { useNavigate } from '../../../hooks/useNavigate'; import { useSyncedPref } from '../../../hooks/useSyncedPref'; import { useDispatch } from '../../../redux'; -import { theme, styles } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Paragraph } from '../../common/Paragraph'; -import { View } from '../../common/View'; +import { theme } from '../../../style'; import { EditablePageHeaderTitle } from '../../EditablePageHeaderTitle'; import { MobileBackButton } from '../../mobile/MobileBackButton'; import { MobilePageHeader, Page, PageHeader } from '../../Page'; diff --git a/packages/desktop-client/src/components/reports/reports/Summary.tsx b/packages/desktop-client/src/components/reports/reports/Summary.tsx index 78f0260d24f..728dabc0386 100644 --- a/packages/desktop-client/src/components/reports/reports/Summary.tsx +++ b/packages/desktop-client/src/components/reports/reports/Summary.tsx @@ -2,6 +2,9 @@ import React, { useState, useEffect, useMemo, type CSSProperties } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { parseISO } from 'date-fns'; import { addNotification } from 'loot-core/client/actions'; @@ -24,9 +27,6 @@ import { SvgOpenParenthesis } from '../../../icons/v2/OpenParenthesis'; import { SvgSum } from '../../../icons/v2/Sum'; import { useDispatch } from '../../../redux'; import { theme } from '../../../style'; -import { Button } from '../../common/Button2'; -import { Text } from '../../common/Text'; -import { View } from '../../common/View'; import { EditablePageHeaderTitle } from '../../EditablePageHeaderTitle'; import { AppliedFilters } from '../../filters/AppliedFilters'; import { FilterButton } from '../../filters/FiltersMenu'; diff --git a/packages/desktop-client/src/components/reports/reports/SummaryCard.tsx b/packages/desktop-client/src/components/reports/reports/SummaryCard.tsx index 3a132bd9c40..0ec4c9190c2 100644 --- a/packages/desktop-client/src/components/reports/reports/SummaryCard.tsx +++ b/packages/desktop-client/src/components/reports/reports/SummaryCard.tsx @@ -1,13 +1,14 @@ import React, { useState, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import * as monthUtils from 'loot-core/shared/months'; import { type SummaryContent, type SummaryWidget, } from 'loot-core/types/models'; -import { View } from '../../common/View'; import { DateRange } from '../DateRange'; import { LoadingIndicator } from '../LoadingIndicator'; import { ReportCard } from '../ReportCard'; diff --git a/packages/desktop-client/src/components/rules/ActionExpression.tsx b/packages/desktop-client/src/components/rules/ActionExpression.tsx index 80c1f017702..77fcbac2865 100644 --- a/packages/desktop-client/src/components/rules/ActionExpression.tsx +++ b/packages/desktop-client/src/components/rules/ActionExpression.tsx @@ -1,6 +1,9 @@ import React, { type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { mapField, friendlyOp, @@ -16,8 +19,6 @@ import { } from 'loot-core/types/models'; import { theme } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { ScheduleValue } from './ScheduleValue'; import { Value } from './Value'; diff --git a/packages/desktop-client/src/components/rules/ConditionExpression.tsx b/packages/desktop-client/src/components/rules/ConditionExpression.tsx index 603496f3169..98f95db6555 100644 --- a/packages/desktop-client/src/components/rules/ConditionExpression.tsx +++ b/packages/desktop-client/src/components/rules/ConditionExpression.tsx @@ -1,10 +1,11 @@ import React, { type CSSProperties } from 'react'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { mapField, friendlyOp } from 'loot-core/shared/rules'; import { theme } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Value } from './Value'; diff --git a/packages/desktop-client/src/components/rules/RuleRow.tsx b/packages/desktop-client/src/components/rules/RuleRow.tsx index da5416d2fd9..d46661872e8 100644 --- a/packages/desktop-client/src/components/rules/RuleRow.tsx +++ b/packages/desktop-client/src/components/rules/RuleRow.tsx @@ -2,6 +2,13 @@ import React, { memo, useRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Stack } from '@actual-app/components/stack'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { v4 as uuid } from 'uuid'; import { friendlyOp } from 'loot-core/shared/rules'; @@ -10,13 +17,7 @@ import { type RuleEntity } from 'loot-core/types/models'; import { useContextMenu } from '../../hooks/useContextMenu'; import { useSelectedDispatch } from '../../hooks/useSelected'; import { SvgRightArrow2 } from '../../icons/v0'; -import { styles, theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { SelectCell, Row, Field, Cell } from '../table'; import { ActionExpression } from './ActionExpression'; diff --git a/packages/desktop-client/src/components/rules/RulesList.tsx b/packages/desktop-client/src/components/rules/RulesList.tsx index 349e7926ef8..9df971d2818 100644 --- a/packages/desktop-client/src/components/rules/RulesList.tsx +++ b/packages/desktop-client/src/components/rules/RulesList.tsx @@ -1,9 +1,9 @@ // @ts-strict-ignore import React from 'react'; -import { type RuleEntity } from 'loot-core/types/models'; +import { View } from '@actual-app/components/view'; -import { View } from '../common/View'; +import { type RuleEntity } from 'loot-core/types/models'; import { RuleRow } from './RuleRow'; diff --git a/packages/desktop-client/src/components/rules/ScheduleValue.tsx b/packages/desktop-client/src/components/rules/ScheduleValue.tsx index dc39c98e400..55a051c92b6 100644 --- a/packages/desktop-client/src/components/rules/ScheduleValue.tsx +++ b/packages/desktop-client/src/components/rules/ScheduleValue.tsx @@ -1,5 +1,7 @@ import React, { useMemo } from 'react'; +import { View } from '@actual-app/components/view'; + import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { getPayeesById } from 'loot-core/client/queries/queriesSlice'; import { q } from 'loot-core/shared/query'; @@ -8,7 +10,6 @@ import { type ScheduleEntity } from 'loot-core/types/models'; import { usePayees } from '../../hooks/usePayees'; import { AnimatedLoading } from '../../icons/AnimatedLoading'; -import { View } from '../common/View'; import { Value } from './Value'; diff --git a/packages/desktop-client/src/components/rules/Value.tsx b/packages/desktop-client/src/components/rules/Value.tsx index 8009b34e906..101e186681b 100644 --- a/packages/desktop-client/src/components/rules/Value.tsx +++ b/packages/desktop-client/src/components/rules/Value.tsx @@ -2,6 +2,7 @@ import React, { useState, type CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; import { format as formatDate, parseISO } from 'date-fns'; import { getMonthYearFormat } from 'loot-core/shared/months'; @@ -14,7 +15,6 @@ import { useDateFormat } from '../../hooks/useDateFormat'; import { usePayees } from '../../hooks/usePayees'; import { theme } from '../../style'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; type ValueProps = { value: T; diff --git a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx index c2a15e9261f..54a39d9a33f 100644 --- a/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx +++ b/packages/desktop-client/src/components/schedules/DiscoverSchedules.tsx @@ -2,6 +2,11 @@ import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Stack } from '@actual-app/components/stack'; +import { View } from '@actual-app/components/view'; + import { runQuery } from 'loot-core/client/query-helpers'; import { send } from 'loot-core/platform/client/fetch'; import { q } from 'loot-core/shared/query'; @@ -17,11 +22,7 @@ import { } from '../../hooks/useSelected'; import { useSendPlatformRequest } from '../../hooks/useSendPlatformRequest'; import { theme } from '../../style'; -import { ButtonWithLoading } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Stack } from '../common/Stack'; -import { View } from '../common/View'; import { Table, TableHeader, Row, Field, SelectCell } from '../table'; import { DisplayId } from '../util/DisplayId'; diff --git a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx index 53f9ec8ad5d..97de4c8dc61 100644 --- a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx +++ b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.tsx @@ -2,6 +2,11 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; + import { popModal } from 'loot-core/client/actions'; import { send } from 'loot-core/platform/client/fetch'; import { type PayeeEntity } from 'loot-core/types/models'; @@ -9,11 +14,7 @@ import { type PayeeEntity } from 'loot-core/types/models'; import { useFormatList } from '../../hooks/useFormatList'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; import { DisplayId } from '../util/DisplayId'; export function PostsOfflineNotification() { diff --git a/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx b/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx index d7cfcf9ba8f..dce7afb46db 100644 --- a/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx +++ b/packages/desktop-client/src/components/schedules/ScheduleDetails.tsx @@ -2,6 +2,11 @@ import React, { useEffect, useReducer } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { t } from 'i18next'; import { pushModal } from 'loot-core/client/actions/modals'; @@ -25,12 +30,7 @@ import { useDispatch } from '../../redux'; import { theme } from '../../style'; import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; import { PayeeAutocomplete } from '../autocomplete/PayeeAutocomplete'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel, Checkbox } from '../forms'; import { OpSelect } from '../modals/EditRuleModal'; import { DateSelect } from '../select/DateSelect'; diff --git a/packages/desktop-client/src/components/schedules/ScheduleLink.tsx b/packages/desktop-client/src/components/schedules/ScheduleLink.tsx index 22a12894ea7..ef030372d18 100644 --- a/packages/desktop-client/src/components/schedules/ScheduleLink.tsx +++ b/packages/desktop-client/src/components/schedules/ScheduleLink.tsx @@ -2,6 +2,11 @@ import React, { useMemo, useRef, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { send } from 'loot-core/platform/client/fetch'; @@ -13,12 +18,8 @@ import { import { SvgAdd } from '../../icons/v0'; import { useDispatch } from '../../redux'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; import { Search } from '../common/Search'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { ROW_HEIGHT, SchedulesTable } from './SchedulesTable'; diff --git a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx index f46722615e3..9fd23c6f3e1 100644 --- a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx +++ b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx @@ -2,6 +2,12 @@ import React, { useRef, useState, useMemo, type CSSProperties } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type ScheduleStatusType, type ScheduleStatuses, @@ -19,11 +25,6 @@ import { usePayees } from '../../hooks/usePayees'; import { SvgDotsHorizontalTriple } from '../../icons/v1'; import { SvgCheck } from '../../icons/v2'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { PrivacyFilter } from '../PrivacyFilter'; import { Table, TableHeader, Row, Field, Cell } from '../table'; import { DisplayId } from '../util/DisplayId'; diff --git a/packages/desktop-client/src/components/schedules/StatusBadge.tsx b/packages/desktop-client/src/components/schedules/StatusBadge.tsx index 82d5834191f..bf250e3cd4e 100644 --- a/packages/desktop-client/src/components/schedules/StatusBadge.tsx +++ b/packages/desktop-client/src/components/schedules/StatusBadge.tsx @@ -1,5 +1,8 @@ import React from 'react'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { type ScheduleStatusType } from 'loot-core/client/data-hooks/schedules'; import { titleFirst } from 'loot-core/shared/util'; @@ -14,8 +17,6 @@ import { SvgValidationCheck, } from '../../icons/v2'; import { theme } from '../../style'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; // Consists of Schedule Statuses + Transaction statuses type StatusTypes = ScheduleStatusType | 'cleared' | 'pending' | 'reconciled'; diff --git a/packages/desktop-client/src/components/schedules/UpcomingLength.tsx b/packages/desktop-client/src/components/schedules/UpcomingLength.tsx index 7ca665b6112..e263b32b244 100644 --- a/packages/desktop-client/src/components/schedules/UpcomingLength.tsx +++ b/packages/desktop-client/src/components/schedules/UpcomingLength.tsx @@ -1,14 +1,15 @@ import React, { useEffect, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { View } from '@actual-app/components/view'; + import { type SyncedPrefs } from 'loot-core/types/prefs'; import { useSyncedPref } from '../../hooks/useSyncedPref'; -import { Button } from '../common/Button2'; import { Modal, ModalCloseButton, ModalHeader } from '../common/Modal'; -import { Paragraph } from '../common/Paragraph'; import { Select } from '../common/Select'; -import { View } from '../common/View'; import { CustomUpcomingLength } from './CustomUpcomingLength'; diff --git a/packages/desktop-client/src/components/schedules/index.tsx b/packages/desktop-client/src/components/schedules/index.tsx index e9844c72475..b45bfbc4c2f 100644 --- a/packages/desktop-client/src/components/schedules/index.tsx +++ b/packages/desktop-client/src/components/schedules/index.tsx @@ -1,6 +1,9 @@ import React, { useCallback, useMemo, useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { pushModal } from 'loot-core/client/actions'; import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { send } from 'loot-core/platform/client/fetch'; @@ -9,9 +12,7 @@ import { type ScheduleEntity } from 'loot-core/types/models'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Search } from '../common/Search'; -import { View } from '../common/View'; import { Page } from '../Page'; import { type ScheduleItemAction, SchedulesTable } from './SchedulesTable'; diff --git a/packages/desktop-client/src/components/select/DateSelect.tsx b/packages/desktop-client/src/components/select/DateSelect.tsx index 903f3d44a76..fe76db19e49 100644 --- a/packages/desktop-client/src/components/select/DateSelect.tsx +++ b/packages/desktop-client/src/components/select/DateSelect.tsx @@ -12,6 +12,9 @@ import React, { type MutableRefObject, } from 'react'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { parse, parseISO, format, subDays, addDays, isValid } from 'date-fns'; import Pikaday from 'pikaday'; @@ -27,10 +30,8 @@ import { } from 'loot-core/shared/months'; import { useSyncedPref } from '../../hooks/useSyncedPref'; -import { styles, theme, type CSSProperties } from '../../style'; +import { theme, type CSSProperties } from '../../style'; import { Input } from '../common/Input'; -import { Popover } from '../common/Popover'; -import { View } from '../common/View'; import DateSelectLeft from './DateSelect.left.png'; import DateSelectRight from './DateSelect.right.png'; diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx index 16960ebc398..291abefc40e 100644 --- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx +++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx @@ -8,6 +8,14 @@ import { } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Stack } from '@actual-app/components/stack'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { sendCatch } from 'loot-core/platform/client/fetch'; import * as monthUtils from 'loot-core/shared/months'; import { getRecurringDescription } from 'loot-core/shared/schedules'; @@ -20,15 +28,8 @@ import { import { useDateFormat } from '../../hooks/useDateFormat'; import { SvgAdd, SvgSubtract } from '../../icons/v0'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Input } from '../common/Input'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; import { Select } from '../common/Select'; -import { Stack } from '../common/Stack'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { DateSelect } from './DateSelect'; diff --git a/packages/desktop-client/src/components/settings/AuthSettings.tsx b/packages/desktop-client/src/components/settings/AuthSettings.tsx index 83af5bffdce..c5f3ed3d518 100644 --- a/packages/desktop-client/src/components/settings/AuthSettings.tsx +++ b/packages/desktop-client/src/components/settings/AuthSettings.tsx @@ -1,14 +1,15 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Label } from '@actual-app/components/label'; +import { Text } from '@actual-app/components/text'; + import { pushModal } from 'loot-core/client/actions'; import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { Label } from '../common/Label'; -import { Text } from '../common/Text'; import { useMultiuserEnabled, useLoginMethod } from '../ServerContext'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Backups.tsx b/packages/desktop-client/src/components/settings/Backups.tsx index e31d2293cd5..bf7e0240c4b 100644 --- a/packages/desktop-client/src/components/settings/Backups.tsx +++ b/packages/desktop-client/src/components/settings/Backups.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Trans } from 'react-i18next'; -import { Text } from '../common/Text'; +import { Text } from '@actual-app/components/text'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx index b22ec3b7244..48905556bc4 100644 --- a/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx +++ b/packages/desktop-client/src/components/settings/BudgetTypeSettings.tsx @@ -1,10 +1,11 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; + import { useSyncedPref } from '../../hooks/useSyncedPref'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsx index da47d999c8e..91da20cdf32 100644 --- a/packages/desktop-client/src/components/settings/Encryption.tsx +++ b/packages/desktop-client/src/components/settings/Encryption.tsx @@ -1,14 +1,15 @@ import React from 'react'; import { Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; + import { pushModal } from 'loot-core/client/actions'; import { useMetadataPref } from '../../hooks/useMetadataPref'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; import { useServerURL } from '../ServerContext'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Experimental.tsx b/packages/desktop-client/src/components/settings/Experimental.tsx index dad3b8689f3..4097b6aa9b0 100644 --- a/packages/desktop-client/src/components/settings/Experimental.tsx +++ b/packages/desktop-client/src/components/settings/Experimental.tsx @@ -1,14 +1,15 @@ import { type ReactNode, useState } from 'react'; import { Trans } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import type { FeatureFlag } from 'loot-core/types/prefs'; import { useFeatureFlag } from '../../hooks/useFeatureFlag'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { theme } from '../../style'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Format.tsx b/packages/desktop-client/src/components/settings/Format.tsx index fb2bcc9b462..79cd84cbf4c 100644 --- a/packages/desktop-client/src/components/settings/Format.tsx +++ b/packages/desktop-client/src/components/settings/Format.tsx @@ -2,6 +2,8 @@ import React, { type ReactNode } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { numberFormats } from 'loot-core/shared/util'; @@ -12,8 +14,6 @@ import { useSyncedPref } from '../../hooks/useSyncedPref'; import { theme } from '../../style'; import { tokens } from '../../tokens'; import { Select } from '../common/Select'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { useSidebar } from '../sidebar/SidebarProvider'; diff --git a/packages/desktop-client/src/components/settings/LanguageSettings.tsx b/packages/desktop-client/src/components/settings/LanguageSettings.tsx index 861090597ea..ab479f4cb8b 100644 --- a/packages/desktop-client/src/components/settings/LanguageSettings.tsx +++ b/packages/desktop-client/src/components/settings/LanguageSettings.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; +import { Text } from '@actual-app/components/text'; import { type TFunction } from 'i18next'; import { useGlobalPref } from '../../hooks/useGlobalPref'; import { availableLanguages, setI18NextLanguage } from '../../i18n'; import { Link } from '../common/Link'; -import { Menu } from '../common/Menu'; import { Select, type SelectOption } from '../common/Select'; -import { Text } from '../common/Text'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/RepairTransactions.tsx b/packages/desktop-client/src/components/settings/RepairTransactions.tsx index 6f01d6fb44e..f48353ddf91 100644 --- a/packages/desktop-client/src/components/settings/RepairTransactions.tsx +++ b/packages/desktop-client/src/components/settings/RepairTransactions.tsx @@ -1,14 +1,15 @@ import React, { useState } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Paragraph } from '@actual-app/components/paragraph'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { send } from 'loot-core/platform/client/fetch'; import { type Handlers } from 'loot-core/types/handlers'; import { theme } from '../../style'; -import { ButtonWithLoading } from '../common/Button2'; -import { Paragraph } from '../common/Paragraph'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Reset.tsx b/packages/desktop-client/src/components/settings/Reset.tsx index f022e2466f4..05616cea2d6 100644 --- a/packages/desktop-client/src/components/settings/Reset.tsx +++ b/packages/desktop-client/src/components/settings/Reset.tsx @@ -1,13 +1,14 @@ import React, { useState } from 'react'; import { Trans } from 'react-i18next'; +import { ButtonWithLoading } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; + import { resetSync } from 'loot-core/client/app/appSlice'; import { send } from 'loot-core/platform/client/fetch'; import { useMetadataPref } from '../../hooks/useMetadataPref'; import { useDispatch } from '../../redux'; -import { ButtonWithLoading } from '../common/Button2'; -import { Text } from '../common/Text'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/Themes.tsx b/packages/desktop-client/src/components/settings/Themes.tsx index ebf00de1b0d..8da67b36411 100644 --- a/packages/desktop-client/src/components/settings/Themes.tsx +++ b/packages/desktop-client/src/components/settings/Themes.tsx @@ -1,6 +1,8 @@ import React, { type ReactNode } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { type DarkTheme, type Theme } from 'loot-core/types/prefs'; @@ -14,8 +16,6 @@ import { } from '../../style'; import { tokens } from '../../tokens'; import { Select } from '../common/Select'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { useSidebar } from '../sidebar/SidebarProvider'; import { Setting } from './UI'; diff --git a/packages/desktop-client/src/components/settings/UI.tsx b/packages/desktop-client/src/components/settings/UI.tsx index c36b79a6491..28ff1b9df13 100644 --- a/packages/desktop-client/src/components/settings/UI.tsx +++ b/packages/desktop-client/src/components/settings/UI.tsx @@ -2,12 +2,12 @@ import React, { useState, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { type CSSProperties, theme } from '../../style'; import { tokens } from '../../tokens'; import { Link } from '../common/Link'; -import { View } from '../common/View'; type SettingProps = { primaryAction?: ReactNode; diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx index 46a7022e1bd..aea6fac6c1e 100644 --- a/packages/desktop-client/src/components/settings/index.tsx +++ b/packages/desktop-client/src/components/settings/index.tsx @@ -1,6 +1,9 @@ import React, { type ReactNode, useEffect } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { closeBudget, loadPrefs } from 'loot-core/client/actions'; @@ -13,11 +16,8 @@ import { useMetadataPref } from '../../hooks/useMetadataPref'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; import { tokens } from '../../tokens'; -import { Button } from '../common/Button2'; import { Input } from '../common/Input'; import { Link } from '../common/Link'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; import { FormField, FormLabel } from '../forms'; import { MOBILE_NAV_HEIGHT } from '../mobile/MobileNavTabs'; import { Page } from '../Page'; diff --git a/packages/desktop-client/src/components/sidebar/Accounts.tsx b/packages/desktop-client/src/components/sidebar/Accounts.tsx index fb8eadfaea3..0e465687688 100644 --- a/packages/desktop-client/src/components/sidebar/Accounts.tsx +++ b/packages/desktop-client/src/components/sidebar/Accounts.tsx @@ -1,6 +1,8 @@ import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from '@actual-app/components/view'; + import { moveAccount } from 'loot-core/client/accounts/accountsSlice'; import * as queries from 'loot-core/client/queries'; import { type AccountEntity } from 'loot-core/types/models'; @@ -14,7 +16,6 @@ import { useOnBudgetAccounts } from '../../hooks/useOnBudgetAccounts'; import { useUpdatedAccounts } from '../../hooks/useUpdatedAccounts'; import { useSelector, useDispatch } from '../../redux'; import { theme } from '../../style'; -import { View } from '../common/View'; import { Account } from './Account'; import { SecondaryItem } from './SecondaryItem'; diff --git a/packages/desktop-client/src/components/sidebar/BudgetName.tsx b/packages/desktop-client/src/components/sidebar/BudgetName.tsx index 6ebee459c34..30db766eda7 100644 --- a/packages/desktop-client/src/components/sidebar/BudgetName.tsx +++ b/packages/desktop-client/src/components/sidebar/BudgetName.tsx @@ -1,6 +1,13 @@ import React, { type ReactNode, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { InitialFocus } from '@actual-app/components/initial-focus'; +import { Menu } from '@actual-app/components/menu'; +import { Popover } from '@actual-app/components/popover'; +import { Text } from '@actual-app/components/text'; +import { View } from '@actual-app/components/view'; + import { closeBudget } from 'loot-core/client/actions'; import * as Platform from 'loot-core/client/platform'; @@ -10,13 +17,7 @@ import { useNavigate } from '../../hooks/useNavigate'; import { SvgExpandArrow } from '../../icons/v0'; import { useDispatch } from '../../redux'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { InitialFocus } from '../common/InitialFocus'; import { Input } from '../common/Input'; -import { Menu } from '../common/Menu'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { View } from '../common/View'; type BudgetNameProps = { children?: ReactNode; diff --git a/packages/desktop-client/src/components/sidebar/ItemContent.tsx b/packages/desktop-client/src/components/sidebar/ItemContent.tsx index e44602c0c96..c106764667a 100644 --- a/packages/desktop-client/src/components/sidebar/ItemContent.tsx +++ b/packages/desktop-client/src/components/sidebar/ItemContent.tsx @@ -4,9 +4,10 @@ import React, { type ComponentProps, } from 'react'; +import { View } from '@actual-app/components/view'; + import { type CSSProperties } from '../../style'; import { Link } from '../common/Link'; -import { View } from '../common/View'; type ItemContentProps = { style: ComponentProps['style']; diff --git a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx index 067151409e1..6e0e1a18320 100644 --- a/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx +++ b/packages/desktop-client/src/components/sidebar/PrimaryButtons.tsx @@ -2,6 +2,8 @@ import React, { useState, useCallback, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; +import { View } from '@actual-app/components/view'; + import { useSyncServerStatus } from '../../hooks/useSyncServerStatus'; import { SvgCheveronDown, @@ -14,7 +16,6 @@ import { SvgWallet, } from '../../icons/v1'; import { SvgCalendar } from '../../icons/v2'; -import { View } from '../common/View'; import { Item } from './Item'; import { SecondaryItem } from './SecondaryItem'; diff --git a/packages/desktop-client/src/components/sidebar/SecondaryButtons.tsx b/packages/desktop-client/src/components/sidebar/SecondaryButtons.tsx index f879efba051..e53173114ae 100644 --- a/packages/desktop-client/src/components/sidebar/SecondaryButtons.tsx +++ b/packages/desktop-client/src/components/sidebar/SecondaryButtons.tsx @@ -1,6 +1,6 @@ import React, { type ComponentType, type SVGProps } from 'react'; -import { View } from '../common/View'; +import { View } from '@actual-app/components/view'; import { SecondaryItem } from './SecondaryItem'; diff --git a/packages/desktop-client/src/components/sidebar/Sidebar.tsx b/packages/desktop-client/src/components/sidebar/Sidebar.tsx index 9a728f27e64..4d8c01f42ca 100644 --- a/packages/desktop-client/src/components/sidebar/Sidebar.tsx +++ b/packages/desktop-client/src/components/sidebar/Sidebar.tsx @@ -1,6 +1,8 @@ import React, { type CSSProperties, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { Resizable } from 're-resizable'; @@ -12,8 +14,7 @@ import { useLocalPref } from '../../hooks/useLocalPref'; import { useResizeObserver } from '../../hooks/useResizeObserver'; import { SvgAdd } from '../../icons/v1'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; -import { View } from '../common/View'; +import { theme } from '../../style'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { Accounts } from './Accounts'; diff --git a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx index 53928b62b7c..89b713def09 100644 --- a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx +++ b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx @@ -4,11 +4,12 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { SvgPin } from '../../icons/v1'; import { SvgArrowButtonLeft1 } from '../../icons/v2'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; -import { View } from '../common/View'; type ToggleButtonProps = { isFloating: boolean; diff --git a/packages/desktop-client/src/components/sidebar/index.tsx b/packages/desktop-client/src/components/sidebar/index.tsx index 4fd72f93056..16c74c5cd6e 100644 --- a/packages/desktop-client/src/components/sidebar/index.tsx +++ b/packages/desktop-client/src/components/sidebar/index.tsx @@ -1,9 +1,9 @@ import React from 'react'; +import { View } from '@actual-app/components/view'; import { useDebounceCallback } from 'usehooks-ts'; import { useGlobalPref } from '../../hooks/useGlobalPref'; -import { View } from '../common/View'; import { useResponsive } from '../responsive/ResponsiveProvider'; import { Sidebar } from './Sidebar'; diff --git a/packages/desktop-client/src/components/sort.tsx b/packages/desktop-client/src/components/sort.tsx index 3a93640bedd..930341aaed9 100644 --- a/packages/desktop-client/src/components/sort.tsx +++ b/packages/desktop-client/src/components/sort.tsx @@ -10,11 +10,11 @@ import React, { } from 'react'; import { useDrag, useDrop } from 'react-dnd'; +import { View } from '@actual-app/components/view'; + import { useMergedRefs } from '../hooks/useMergedRefs'; import { theme } from '../style'; -import { View } from './common/View'; - export type DragState = { state: 'start-preview' | 'start' | 'end'; type?: string; diff --git a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx index 579a80ff000..e0783c23f24 100644 --- a/packages/desktop-client/src/components/spreadsheet/CellValue.tsx +++ b/packages/desktop-client/src/components/spreadsheet/CellValue.tsx @@ -5,8 +5,9 @@ import React, { type CSSProperties, } from 'react'; -import { styles } from '../../style'; -import { Text } from '../common/Text'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; + import { PrivacyFilter } from '../PrivacyFilter'; import { type FormatType, useFormat } from './useFormat'; diff --git a/packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx b/packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx index 40d140aa115..60fe4ea2f30 100644 --- a/packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx +++ b/packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx @@ -2,6 +2,8 @@ import { useMemo } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { pushModal } from 'loot-core/client/actions'; import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { validForTransfer } from 'loot-core/client/transfer'; @@ -15,7 +17,6 @@ import { type TransactionEntity } from 'loot-core/types/models'; import { useSelectedItems } from '../../hooks/useSelected'; import { useDispatch } from '../../redux'; -import { Menu } from '../common/Menu'; import { SelectedItemsButton } from '../table'; type SelectedTransactionsButtonProps = { diff --git a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.tsx b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.tsx index c5dc78dbfb7..e4f259d420d 100644 --- a/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.tsx +++ b/packages/desktop-client/src/components/transactions/SimpleTransactionsTable.tsx @@ -7,6 +7,7 @@ import React, { } from 'react'; import { useTranslation, Trans } from 'react-i18next'; +import { styles } from '@actual-app/components/styles'; import { format as formatDate, isValid as isDateValid, @@ -22,7 +23,7 @@ import { useCategory } from '../../hooks/useCategory'; import { useDateFormat } from '../../hooks/useDateFormat'; import { useSelectedItems, useSelectedDispatch } from '../../hooks/useSelected'; import { SvgArrowsSynchronize } from '../../icons/v2'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { Cell, Field, Row, SelectCell, Table } from '../table'; import { DisplayId } from '../util/DisplayId'; diff --git a/packages/desktop-client/src/components/transactions/TransactionMenu.tsx b/packages/desktop-client/src/components/transactions/TransactionMenu.tsx index ead66da9e5e..b25fa88ff78 100644 --- a/packages/desktop-client/src/components/transactions/TransactionMenu.tsx +++ b/packages/desktop-client/src/components/transactions/TransactionMenu.tsx @@ -1,6 +1,8 @@ import React, { useMemo, type ComponentPropsWithoutRef } from 'react'; import { useTranslation } from 'react-i18next'; +import { Menu } from '@actual-app/components/menu'; + import { pushModal } from 'loot-core/client/actions'; import { useSchedules } from 'loot-core/client/data-hooks/schedules'; import { q } from 'loot-core/shared/query'; @@ -12,7 +14,6 @@ import { isPreviewId } from 'loot-core/shared/transactions'; import { type TransactionEntity } from 'loot-core/types/models'; import { useDispatch } from '../../redux'; -import { Menu } from '../common/Menu'; type BalanceMenuProps = Omit< ComponentPropsWithoutRef, diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx index b8f832a6f7a..354aa2af153 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx @@ -13,6 +13,12 @@ import React, { import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { Popover } from '@actual-app/components/popover'; +import { styles } from '@actual-app/components/styles'; +import { Text } from '@actual-app/components/text'; +import { Tooltip } from '@actual-app/components/tooltip'; +import { View } from '@actual-app/components/view'; import { css } from '@emotion/css'; import { format as formatDate, @@ -60,15 +66,10 @@ import { SvgHyperlink2, } from '../../icons/v2'; import { useDispatch } from '../../redux'; -import { styles, theme } from '../../style'; +import { theme } from '../../style'; import { AccountAutocomplete } from '../autocomplete/AccountAutocomplete'; import { CategoryAutocomplete } from '../autocomplete/CategoryAutocomplete'; import { PayeeAutocomplete } from '../autocomplete/PayeeAutocomplete'; -import { Button } from '../common/Button2'; -import { Popover } from '../common/Popover'; -import { Text } from '../common/Text'; -import { Tooltip } from '../common/Tooltip'; -import { View } from '../common/View'; import { getStatusProps } from '../schedules/StatusBadge'; import { DateSelect } from '../select/DateSelect'; import { NamespaceContext } from '../spreadsheet/NamespaceContext'; diff --git a/packages/desktop-client/src/components/util/AmountInput.tsx b/packages/desktop-client/src/components/util/AmountInput.tsx index 833c0b32795..1a0e9f59069 100644 --- a/packages/desktop-client/src/components/util/AmountInput.tsx +++ b/packages/desktop-client/src/components/util/AmountInput.tsx @@ -10,6 +10,9 @@ import React, { } from 'react'; import { useTranslation } from 'react-i18next'; +import { Button } from '@actual-app/components/button'; +import { View } from '@actual-app/components/view'; + import { evalArithmetic } from 'loot-core/shared/arithmetic'; import { amountToInteger, appendDecimals } from 'loot-core/shared/util'; @@ -17,9 +20,7 @@ import { useMergedRefs } from '../../hooks/useMergedRefs'; import { useSyncedPref } from '../../hooks/useSyncedPref'; import { SvgAdd, SvgSubtract } from '../../icons/v1'; import { theme } from '../../style'; -import { Button } from '../common/Button2'; import { InputWithContent } from '../common/InputWithContent'; -import { View } from '../common/View'; import { useFormat } from '../spreadsheet/useFormat'; type AmountInputProps = { diff --git a/packages/desktop-client/src/components/util/DisplayId.tsx b/packages/desktop-client/src/components/util/DisplayId.tsx index 162744a1772..17ed79fb0a9 100644 --- a/packages/desktop-client/src/components/util/DisplayId.tsx +++ b/packages/desktop-client/src/components/util/DisplayId.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Text } from '@actual-app/components/text'; + import { useAccount } from '../../hooks/useAccount'; import { usePayee } from '../../hooks/usePayee'; import { theme } from '../../style'; -import { Text } from '../common/Text'; type DisplayIdProps = { type: 'accounts' | 'payees'; diff --git a/packages/desktop-client/src/components/util/GenericInput.jsx b/packages/desktop-client/src/components/util/GenericInput.jsx index cf6f2bee112..d1331589250 100644 --- a/packages/desktop-client/src/components/util/GenericInput.jsx +++ b/packages/desktop-client/src/components/util/GenericInput.jsx @@ -1,5 +1,7 @@ import React from 'react'; +import { View } from '@actual-app/components/view'; + import { useReports } from 'loot-core/client/data-hooks/reports'; import { getMonthYearFormat } from 'loot-core/shared/months'; import { integerToAmount, amountToInteger } from 'loot-core/shared/util'; @@ -14,7 +16,6 @@ import { FilterAutocomplete } from '../autocomplete/FilterAutocomplete'; import { PayeeAutocomplete } from '../autocomplete/PayeeAutocomplete'; import { ReportAutocomplete } from '../autocomplete/ReportAutocomplete'; import { Input } from '../common/Input'; -import { View } from '../common/View'; import { Checkbox } from '../forms'; import { DateSelect } from '../select/DateSelect'; import { RecurringSchedulePicker } from '../select/RecurringSchedulePicker'; diff --git a/packages/desktop-client/src/style/styles.ts b/packages/desktop-client/src/style/styles.ts index 3d0643cfe39..5ea78501c78 100644 --- a/packages/desktop-client/src/style/styles.ts +++ b/packages/desktop-client/src/style/styles.ts @@ -1,13 +1,10 @@ // @ts-strict-ignore -import { styles as baseStyles } from '@actual-app/components/styles'; +import { styles } from '@actual-app/components/styles'; import * as Platform from 'loot-core/client/platform'; export { type CSSProperties } from '@actual-app/components/styles'; -/** @deprecated please import styles from '@actual-app/components/styles' */ -export const styles = baseStyles; - let hiddenScrollbars = false; // need both styles defined for primary and secondary colors diff --git a/upcoming-release-notes/4385.md b/upcoming-release-notes/4385.md new file mode 100644 index 00000000000..753e89eeab0 --- /dev/null +++ b/upcoming-release-notes/4385.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [AlbertoCortina] +--- + +Remove deprecated components in favour of components from @actual-app library