From 84a9269ae487db05aa4ece2002c282c9077e2ff0 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Sat, 6 Jan 2024 09:06:26 -0800 Subject: [PATCH 01/17] ESLint no-default-exports 1 (#2115) * ESLint no-default-imports part 1 * Release notes * Remove Notes.tsx default export * Fix Notes imports --- .eslintrc.js | 48 +++++++++++++++++++ packages/api/app/query.js | 2 +- packages/api/methods.js | 2 +- .../src/components/AnimatedRefresh.tsx | 2 +- .../desktop-client/src/components/App.tsx | 26 +++++----- .../src/components/AppBackground.tsx | 9 ++-- .../src/components/Background.tsx | 2 +- .../src/components/BankSyncStatus.tsx | 4 +- .../src/components/DevelopmentTopBar.tsx | 2 +- .../src/components/FatalError.tsx | 4 +- .../src/components/FinancesApp.tsx | 18 +++---- .../src/components/FixedSizeList.tsx | 2 +- .../src/components/GlobalKeys.ts | 2 +- .../src/components/LoggedInUser.tsx | 2 +- .../src/components/ManageRules.tsx | 2 +- .../src/components/ManageRulesPage.tsx | 2 +- .../src/components/MobileBackButton.tsx | 2 +- .../src/components/MobileWebMessage.tsx | 2 +- .../desktop-client/src/components/Modals.tsx | 2 +- .../desktop-client/src/components/Notes.tsx | 2 +- .../src/components/NotesButton.tsx | 4 +- .../src/components/Notifications.tsx | 2 +- .../src/components/PrivacyFilter.tsx | 4 +- .../src/components/ScrollProvider.tsx | 2 +- .../src/components/SyncRefresh.ts | 2 +- .../src/components/Titlebar.tsx | 6 +-- .../src/components/UpdateNotification.tsx | 2 +- .../src/components/accounts/Balance.jsx | 2 +- .../src/components/accounts/Header.jsx | 4 +- .../accounts/MobileAccountDetails.jsx | 2 +- .../src/components/budget/MobileBudget.jsx | 2 +- .../src/components/budget/SidebarCategory.tsx | 2 +- .../src/components/budget/SidebarGroup.tsx | 2 +- .../report/budgetsummary/BudgetSummary.tsx | 2 +- .../budget/report/budgetsummary/Saved.tsx | 2 +- .../rollover/budgetsummary/BudgetSummary.tsx | 2 +- .../rollover/budgetsummary/ToBudget.tsx | 2 +- .../src/components/common/Modal.tsx | 2 +- .../src/components/manager/BudgetList.jsx | 2 +- .../src/components/manager/ManagementApp.jsx | 6 +-- .../components/modals/CategoryGroupMenu.tsx | 2 +- .../src/components/modals/CategoryMenu.tsx | 2 +- .../components/modals/ManageRulesModal.tsx | 2 +- .../src/components/modals/Notes.tsx | 2 +- .../src/components/reports/ReportSummary.tsx | 2 +- .../components/reports/graphs/AreaGraph.tsx | 2 +- .../components/reports/graphs/BarGraph.tsx | 2 +- .../reports/graphs/BarLineGraph.tsx | 2 +- .../components/reports/graphs/LineGraph.tsx | 2 +- .../reports/graphs/StackedBarGraph.tsx | 2 +- .../components/reports/reports/CashFlow.tsx | 2 +- .../reports/reports/CashFlowCard.jsx | 2 +- .../reports/reports/CustomReport.jsx | 2 +- .../components/reports/reports/NetWorth.jsx | 2 +- .../reports/reports/NetWorthCard.jsx | 2 +- .../components/schedules/SchedulesTable.tsx | 2 +- .../src/components/settings/Format.tsx | 2 +- .../src/components/settings/UI.tsx | 2 +- .../src/components/settings/index.tsx | 2 +- .../src/components/spreadsheet/CellValue.tsx | 11 ++--- .../desktop-client/src/components/table.tsx | 11 +++-- .../transactions/MobileTransaction.jsx | 2 +- packages/desktop-client/src/index.tsx | 2 +- packages/desktop-client/src/polyfills.ts | 2 +- packages/desktop-client/src/setupTests.js | 2 +- packages/desktop-client/src/style/styles.ts | 2 +- packages/desktop-client/src/tokens.ts | 4 +- upcoming-release-notes/2115.md | 6 +++ 68 files changed, 161 insertions(+), 110 deletions(-) create mode 100644 upcoming-release-notes/2115.md diff --git a/.eslintrc.js b/.eslintrc.js index 0c2caca16c2..c89dc2f4f65 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -165,6 +165,7 @@ module.exports = { 'prefer-const': 'warn', 'prefer-spread': 'off', '@typescript-eslint/no-empty-function': 'off', + 'import/no-default-export': 'off', }, overrides: [ { @@ -238,6 +239,53 @@ module.exports = { 'no-restricted-imports': ['off', { patterns: restrictedImportColors }], }, }, + { + files: [ + './packages/api/*', + './packages/api/app/**/*', + './packages/crdt/**/*', + './packages/desktop-client/src/*', + './packages/desktop-client/src/components/*', + // './packages/desktop-client/src/components/accounts/**/*', + // './packages/desktop-client/src/components/autocomplete/**/*', + // './packages/desktop-client/src/components/budget/**/*', + // './packages/desktop-client/src/components/common/**/*', + // './packages/desktop-client/src/components/filters/**/*', + // './packages/desktop-client/src/components/gocardless/**/*', + // './packages/desktop-client/src/components/manager/**/*', + // './packages/desktop-client/src/components/mobile/**/*', + // './packages/desktop-client/src/components/modals/**/*', + // './packages/desktop-client/src/components/payees/**/*', + // './packages/desktop-client/src/components/reports/**/*', + // './packages/desktop-client/src/components/responsive/**/*', + // './packages/desktop-client/src/components/rules/**/*', + // './packages/desktop-client/src/components/schedules/**/*', + // './packages/desktop-client/src/components/select/**/*', + // './packages/desktop-client/src/components/settings/**/*', + // './packages/desktop-client/src/components/sidebar/**/*', + // './packages/desktop-client/src/components/spreadsheet/**/*', + // './packages/desktop-client/src/components/transactions/**/*', + // './packages/desktop-client/src/components/util/**/*', + // './packages/desktop-client/src/hooks/**/*', + // './packages/desktop-client/src/icons/**/*', + // './packages/desktop-client/src/style/**/*', + // './packages/desktop-client/src/types/**/*', + // './packages/desktop-client/src/util/**/*', + // './packages/desktop-electron/**/*', + // './packages/eslint-plugin-actual/**/*', + // './packages/loot-core/*', + // './packages/loot-core/src/client/**/*', + // './packages/loot-core/src/mocks/**/*', + // './packages/loot-core/src/platform/**/*', + // './packages/loot-core/src/server/**/*', + // './packages/loot-core/src/shared/**/*', + // './packages/loot-core/src/types/**/*', + // './packages/loot-core/webpack/**/*', + ], + rules: { + 'import/no-default-export': 'warn', + }, + }, ], settings: { 'import/resolver': { diff --git a/packages/api/app/query.js b/packages/api/app/query.js index dddb807de3e..f9f8079951e 100644 --- a/packages/api/app/query.js +++ b/packages/api/app/query.js @@ -99,6 +99,6 @@ class Query { } } -export default function q(table) { +export function q(table) { return new Query({ table }); } diff --git a/packages/api/methods.js b/packages/api/methods.js index 7d6ef8a29f2..9af541f2670 100644 --- a/packages/api/methods.js +++ b/packages/api/methods.js @@ -1,6 +1,6 @@ import * as injected from './injected'; -export { default as q } from './app/query'; +export { q } from './app/query'; function send(name, args) { return injected.send(name, args); diff --git a/packages/desktop-client/src/components/AnimatedRefresh.tsx b/packages/desktop-client/src/components/AnimatedRefresh.tsx index c6e613c956e..1f6ba9e7367 100644 --- a/packages/desktop-client/src/components/AnimatedRefresh.tsx +++ b/packages/desktop-client/src/components/AnimatedRefresh.tsx @@ -19,7 +19,7 @@ type AnimatedRefreshProps = { height?: number; }; -export default function AnimatedRefresh({ +export function AnimatedRefresh({ animating, iconStyle, width, diff --git a/packages/desktop-client/src/components/App.tsx b/packages/desktop-client/src/components/App.tsx index bf5334c42d7..9bae285f7df 100644 --- a/packages/desktop-client/src/components/App.tsx +++ b/packages/desktop-client/src/components/App.tsx @@ -14,20 +14,20 @@ import { import { type GlobalPrefs } from 'loot-core/src/types/prefs'; import { useActions } from '../hooks/useActions'; -import installPolyfills from '../polyfills'; +import { installPolyfills } from '../polyfills'; import { ResponsiveProvider } from '../ResponsiveProvider'; import { styles, hasHiddenScrollbars, ThemeStyle } from '../style'; -import AppBackground from './AppBackground'; +import { AppBackground } from './AppBackground'; import View from './common/View'; -import DevelopmentTopBar from './DevelopmentTopBar'; -import FatalError from './FatalError'; -import FinancesApp from './FinancesApp'; +import { DevelopmentTopBar } from './DevelopmentTopBar'; +import { FatalError } from './FatalError'; +import { FinancesApp } from './FinancesApp'; import ManagementApp from './manager/ManagementApp'; -import MobileWebMessage from './MobileWebMessage'; -import UpdateNotification from './UpdateNotification'; +import { MobileWebMessage } from './MobileWebMessage'; +import { UpdateNotification } from './UpdateNotification'; -type AppProps = { +type AppInnerProps = { budgetId: string; cloudFileId: string; loadingText: string; @@ -40,14 +40,14 @@ type AppProps = { loadGlobalPrefs: () => Promise; }; -function App({ +function AppInner({ budgetId, cloudFileId, loadingText, loadBudget, closeBudget, loadGlobalPrefs, -}: AppProps) { +}: AppInnerProps) { const [initializing, setInitializing] = useState(true); const { showBoundary: showErrorBoundary } = useErrorBoundary(); @@ -121,7 +121,7 @@ function ErrorFallback({ error }: FallbackProps) { ); } -function AppWrapper() { +export function App() { const budgetId = useSelector( state => state.prefs.local && state.prefs.local.id, ); @@ -178,7 +178,7 @@ function AppWrapper() { {process.env.REACT_APP_REVIEW_ID && !Platform.isPlaywright && ( )} - ); } - -export default AppWrapper; diff --git a/packages/desktop-client/src/components/AppBackground.tsx b/packages/desktop-client/src/components/AppBackground.tsx index b23e84af6ab..258ded5153a 100644 --- a/packages/desktop-client/src/components/AppBackground.tsx +++ b/packages/desktop-client/src/components/AppBackground.tsx @@ -5,7 +5,7 @@ import { css } from 'glamor'; import AnimatedLoading from '../icons/AnimatedLoading'; import { theme } from '../style'; -import Background from './Background'; +import { Background } from './Background'; import Block from './common/Block'; import View from './common/View'; @@ -14,7 +14,10 @@ type AppBackgroundProps = { loadingText?: string; }; -function AppBackground({ initializing, loadingText }: AppBackgroundProps) { +export function AppBackground({ + initializing, + loadingText, +}: AppBackgroundProps) { return ( <> @@ -41,5 +44,3 @@ function AppBackground({ initializing, loadingText }: AppBackgroundProps) { ); } - -export default AppBackground; diff --git a/packages/desktop-client/src/components/Background.tsx b/packages/desktop-client/src/components/Background.tsx index 3f2c687b50b..3aa8f367b33 100644 --- a/packages/desktop-client/src/components/Background.tsx +++ b/packages/desktop-client/src/components/Background.tsx @@ -4,7 +4,7 @@ import { theme } from '../style'; import { LoadComponent } from './util/LoadComponent'; -export default function Background() { +export function Background() { return (
state.account.accountsSyncing); const name = accountsSyncing diff --git a/packages/desktop-client/src/components/DevelopmentTopBar.tsx b/packages/desktop-client/src/components/DevelopmentTopBar.tsx index a98533e64c1..f163863fa73 100644 --- a/packages/desktop-client/src/components/DevelopmentTopBar.tsx +++ b/packages/desktop-client/src/components/DevelopmentTopBar.tsx @@ -3,7 +3,7 @@ import { theme } from '../style'; import ExternalLink from './common/ExternalLink'; import View from './common/View'; -export default function DevelopmentTopBar() { +export function DevelopmentTopBar() { return ( ); } - -export default FatalError; diff --git a/packages/desktop-client/src/components/FinancesApp.tsx b/packages/desktop-client/src/components/FinancesApp.tsx index 1d79cce61a5..c14a616368a 100644 --- a/packages/desktop-client/src/components/FinancesApp.tsx +++ b/packages/desktop-client/src/components/FinancesApp.tsx @@ -25,21 +25,21 @@ import { theme } from '../style'; import { ExposeNavigate } from '../util/router-tools'; import { getIsOutdated, getLatestVersion } from '../util/versions'; -import BankSyncStatus from './BankSyncStatus'; +import { BankSyncStatus } from './BankSyncStatus'; import { BudgetMonthCountProvider } from './budget/BudgetMonthCountContext'; import View from './common/View'; -import GlobalKeys from './GlobalKeys'; +import { GlobalKeys } from './GlobalKeys'; import { ManageRulesPage } from './ManageRulesPage'; import MobileNavTabs from './mobile/MobileNavTabs'; -import Modals from './Modals'; -import Notifications from './Notifications'; +import { Modals } from './Modals'; +import { Notifications } from './Notifications'; import { ManagePayeesPage } from './payees/ManagePayeesPage'; import Reports from './reports'; import { NarrowAlternate, WideComponent } from './responsive'; -import ScrollProvider from './ScrollProvider'; +import { ScrollProvider } from './ScrollProvider'; import Settings from './settings'; import FloatableSidebar, { SidebarProvider } from './sidebar'; -import Titlebar, { TitlebarProvider } from './Titlebar'; +import { Titlebar, TitlebarProvider } from './Titlebar'; import { TransactionEdit } from './transactions/MobileTransaction'; function NarrowNotSupported({ @@ -92,7 +92,7 @@ function RouterBehaviors({ getAccounts }) { return null; } -function FinancesApp() { +function FinancesAppWithoutContext() { const actions = useActions(); useEffect(() => { // The default key handler scope @@ -256,8 +256,8 @@ function FinancesApp() { ); } -export default function FinancesAppWithContext() { - const app = useMemo(() => , []); +export function FinancesApp() { + const app = useMemo(() => , []); return ( diff --git a/packages/desktop-client/src/components/FixedSizeList.tsx b/packages/desktop-client/src/components/FixedSizeList.tsx index f94bc890db0..d7dd84d8e22 100644 --- a/packages/desktop-client/src/components/FixedSizeList.tsx +++ b/packages/desktop-client/src/components/FixedSizeList.tsx @@ -73,7 +73,7 @@ type FixedSizeListState = { scrollUpdateWasRequested: boolean; }; -export default class FixedSizeList extends PureComponent< +export class FixedSizeList extends PureComponent< FixedSizeListProps, FixedSizeListState > { diff --git a/packages/desktop-client/src/components/GlobalKeys.ts b/packages/desktop-client/src/components/GlobalKeys.ts index edcfe148aab..11b72693a7e 100644 --- a/packages/desktop-client/src/components/GlobalKeys.ts +++ b/packages/desktop-client/src/components/GlobalKeys.ts @@ -4,7 +4,7 @@ import * as Platform from 'loot-core/src/client/platform'; import useNavigate from '../hooks/useNavigate'; -export default function GlobalKeys() { +export function GlobalKeys() { const navigate = useNavigate(); useEffect(() => { const handleKeys = e => { diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx index 91418dc0719..02db70b5d38 100644 --- a/packages/desktop-client/src/components/LoggedInUser.tsx +++ b/packages/desktop-client/src/components/LoggedInUser.tsx @@ -16,7 +16,7 @@ type LoggedInUserProps = { style?: CSSProperties; color?: string; }; -export default function LoggedInUser({ +export function LoggedInUser({ hideIfNoServer, style, color, diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index e9fe97548d6..5d921053e3c 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -327,7 +327,7 @@ type ManageRulesProps = { setLoading?: Dispatch>; }; -export default function ManageRules({ +export function ManageRules({ isModal, payeeId, setLoading = () => {}, diff --git a/packages/desktop-client/src/components/ManageRulesPage.tsx b/packages/desktop-client/src/components/ManageRulesPage.tsx index e64f57e8788..ad57e2bd2d9 100644 --- a/packages/desktop-client/src/components/ManageRulesPage.tsx +++ b/packages/desktop-client/src/components/ManageRulesPage.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import ManageRules from './ManageRules'; +import { ManageRules } from './ManageRules'; import { Page } from './Page'; export function ManageRulesPage() { diff --git a/packages/desktop-client/src/components/MobileBackButton.tsx b/packages/desktop-client/src/components/MobileBackButton.tsx index 6ea749fdbbd..061e8f03dfa 100644 --- a/packages/desktop-client/src/components/MobileBackButton.tsx +++ b/packages/desktop-client/src/components/MobileBackButton.tsx @@ -11,7 +11,7 @@ type MobileBackButtonProps = { style?: CSSProperties; }; -export default function MobileBackButton({ style }: MobileBackButtonProps) { +export function MobileBackButton({ style }: MobileBackButtonProps) { const navigate = useNavigate(); return ( ); }); - -export default Button; diff --git a/packages/desktop-client/src/components/common/ButtonLink.tsx b/packages/desktop-client/src/components/common/ButtonLink.tsx index 1ab6215b61d..ad953ecb611 100644 --- a/packages/desktop-client/src/components/common/ButtonLink.tsx +++ b/packages/desktop-client/src/components/common/ButtonLink.tsx @@ -4,7 +4,7 @@ import { useMatch } from 'react-router-dom'; import useNavigate from '../../hooks/useNavigate'; import { type CSSProperties } from '../../style'; -import Button from './Button'; +import { Button } from './Button'; type ButtonLinkProps = ComponentProps & { to: string; diff --git a/packages/desktop-client/src/components/common/Link.tsx b/packages/desktop-client/src/components/common/Link.tsx index 17b146cf349..ce847a48f38 100644 --- a/packages/desktop-client/src/components/common/Link.tsx +++ b/packages/desktop-client/src/components/common/Link.tsx @@ -6,7 +6,7 @@ import { css } from 'glamor'; import useNavigate from '../../hooks/useNavigate'; import { type CSSProperties, styles } from '../../style'; -import Button from './Button'; +import { Button } from './Button'; type ButtonLinkProps = ComponentProps & { to: string; diff --git a/packages/desktop-client/src/components/common/MenuButton.tsx b/packages/desktop-client/src/components/common/MenuButton.tsx index 66d4b58ec23..52f96f5787f 100644 --- a/packages/desktop-client/src/components/common/MenuButton.tsx +++ b/packages/desktop-client/src/components/common/MenuButton.tsx @@ -2,7 +2,7 @@ import React from 'react'; import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; -import Button from './Button'; +import { Button } from './Button'; export default function MenuButton({ onClick }) { return ( diff --git a/packages/desktop-client/src/components/common/Modal.tsx b/packages/desktop-client/src/components/common/Modal.tsx index a79e1bc4706..cf4a96f33a6 100644 --- a/packages/desktop-client/src/components/common/Modal.tsx +++ b/packages/desktop-client/src/components/common/Modal.tsx @@ -14,7 +14,7 @@ import Delete from '../../icons/v0/Delete'; import { type CSSProperties, styles, theme } from '../../style'; import { tokens } from '../../tokens'; -import Button from './Button'; +import { Button } from './Button'; import Input from './Input'; import Text from './Text'; import View from './View'; diff --git a/packages/desktop-client/src/components/common/Search.tsx b/packages/desktop-client/src/components/common/Search.tsx index 9281d75d57d..644be48f169 100644 --- a/packages/desktop-client/src/components/common/Search.tsx +++ b/packages/desktop-client/src/components/common/Search.tsx @@ -4,7 +4,7 @@ import SvgRemove from '../../icons/v2/Remove'; import SearchAlternate from '../../icons/v2/SearchAlternate'; import { theme } from '../../style'; -import Button from './Button'; +import { Button } from './Button'; import InputWithContent from './InputWithContent'; type SearchProps = { diff --git a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx index 28f73ef9a1b..98661197bb7 100644 --- a/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/CompactFiltersButton.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Filter } from '../../icons/v1'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; type CompactFiltersButtonProps = { onClick: (newValue) => void; diff --git a/packages/desktop-client/src/components/filters/FiltersButton.tsx b/packages/desktop-client/src/components/filters/FiltersButton.tsx index 7aff00b7ad3..c368cc81d61 100644 --- a/packages/desktop-client/src/components/filters/FiltersButton.tsx +++ b/packages/desktop-client/src/components/filters/FiltersButton.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { SettingsSliderAlternate } from '../../icons/v2'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; type FiltersButtonProps = { onClick: (newValue) => void; diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsx index e9382c1726a..95154f17003 100644 --- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx +++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx @@ -25,7 +25,7 @@ import { titleFirst, integerToCurrency } from 'loot-core/src/shared/util'; import DeleteIcon from '../../icons/v0/Delete'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import HoverTarget from '../common/HoverTarget'; import Menu from '../common/Menu'; import Select from '../common/Select'; diff --git a/packages/desktop-client/src/components/filters/SavedFilters.jsx b/packages/desktop-client/src/components/filters/SavedFilters.jsx index fce9af440cd..4cb2183f2e5 100644 --- a/packages/desktop-client/src/components/filters/SavedFilters.jsx +++ b/packages/desktop-client/src/components/filters/SavedFilters.jsx @@ -4,7 +4,7 @@ import { send, sendCatch } from 'loot-core/src/platform/client/fetch'; import ExpandArrow from '../../icons/v0/ExpandArrow'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import MenuTooltip from '../common/MenuTooltip'; import Stack from '../common/Stack'; diff --git a/packages/desktop-client/src/components/manager/BudgetList.jsx b/packages/desktop-client/src/components/manager/BudgetList.jsx index c42105615e6..42de48e86b5 100644 --- a/packages/desktop-client/src/components/manager/BudgetList.jsx +++ b/packages/desktop-client/src/components/manager/BudgetList.jsx @@ -15,7 +15,7 @@ import Key from '../../icons/v2/Key'; import RefreshArrow from '../../icons/v2/RefreshArrow'; import { styles, theme } from '../../style'; import { tokens } from '../../tokens'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/manager/ConfigServer.tsx b/packages/desktop-client/src/components/manager/ConfigServer.tsx index 20cf42356f7..8c4b34a7646 100644 --- a/packages/desktop-client/src/components/manager/ConfigServer.tsx +++ b/packages/desktop-client/src/components/manager/ConfigServer.tsx @@ -9,7 +9,7 @@ import { useActions } from '../../hooks/useActions'; import useNavigate from '../../hooks/useNavigate'; import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import { theme } from '../../style'; -import Button, { ButtonWithLoading } from '../common/Button'; +import { Button, ButtonWithLoading } from '../common/Button'; import { BigInput } from '../common/Input'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/manager/Import.tsx b/packages/desktop-client/src/components/manager/Import.tsx index 823a565cdf0..a2022e8ba9a 100644 --- a/packages/desktop-client/src/components/manager/Import.tsx +++ b/packages/desktop-client/src/components/manager/Import.tsx @@ -4,7 +4,7 @@ import { type BoundActions } from '../../hooks/useActions'; import { styles, theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import Block from '../common/Block'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/manager/WelcomeScreen.tsx b/packages/desktop-client/src/components/manager/WelcomeScreen.tsx index 89f45cf1074..32761410859 100644 --- a/packages/desktop-client/src/components/manager/WelcomeScreen.tsx +++ b/packages/desktop-client/src/components/manager/WelcomeScreen.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useActions } from '../../hooks/useActions'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import Paragraph from '../common/Paragraph'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx index 479833542a3..7d5c62e8288 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx @@ -6,7 +6,7 @@ import { loggedIn } from 'loot-core/src/client/actions/user'; import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../../style'; -import Button from '../../common/Button'; +import { Button } from '../../common/Button'; import ExternalLink from '../../common/ExternalLink'; import Paragraph from '../../common/Paragraph'; import Text from '../../common/Text'; diff --git a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx index 3988553ad6c..06b0594e606 100644 --- a/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/ChangePassword.tsx @@ -4,7 +4,7 @@ import { send } from 'loot-core/src/platform/client/fetch'; import useNavigate from '../../../hooks/useNavigate'; import { theme } from '../../../style'; -import Button from '../../common/Button'; +import { Button } from '../../common/Button'; import Text from '../../common/Text'; import View from '../../common/View'; diff --git a/packages/desktop-client/src/components/manager/subscribe/Error.tsx b/packages/desktop-client/src/components/manager/subscribe/Error.tsx index a26ff87c66b..242f6f53239 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Error.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Error.tsx @@ -3,7 +3,7 @@ import { useLocation } from 'react-router-dom'; import useNavigate from '../../../hooks/useNavigate'; import { theme } from '../../../style'; -import Button from '../../common/Button'; +import { Button } from '../../common/Button'; import Text from '../../common/Text'; import View from '../../common/View'; diff --git a/packages/desktop-client/src/components/manager/subscribe/Login.tsx b/packages/desktop-client/src/components/manager/subscribe/Login.tsx index 3ed5cef99a5..32cd1732ff7 100644 --- a/packages/desktop-client/src/components/manager/subscribe/Login.tsx +++ b/packages/desktop-client/src/components/manager/subscribe/Login.tsx @@ -6,7 +6,7 @@ import { loggedIn } from 'loot-core/src/client/actions/user'; import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../../style'; -import Button, { ButtonWithLoading } from '../../common/Button'; +import { Button, ButtonWithLoading } from '../../common/Button'; import { BigInput } from '../../common/Input'; import Text from '../../common/Text'; import View from '../../common/View'; diff --git a/packages/desktop-client/src/components/mobile/MobileAmountInput.jsx b/packages/desktop-client/src/components/mobile/MobileAmountInput.jsx index 0e89d2e98e0..c6275cb627f 100644 --- a/packages/desktop-client/src/components/mobile/MobileAmountInput.jsx +++ b/packages/desktop-client/src/components/mobile/MobileAmountInput.jsx @@ -8,7 +8,7 @@ import { import { useMergedRefs } from '../../hooks/useMergedRefs'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/mobile/MobileForms.jsx b/packages/desktop-client/src/components/mobile/MobileForms.jsx index 4a7334fbd84..8ebfda0a37f 100644 --- a/packages/desktop-client/src/components/mobile/MobileForms.jsx +++ b/packages/desktop-client/src/components/mobile/MobileForms.jsx @@ -3,7 +3,7 @@ import { forwardRef } from 'react'; import { css } from 'glamor'; import { theme, styles } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Input from '../common/Input'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx index e1d1d1c733b..1b753fec6aa 100644 --- a/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx +++ b/packages/desktop-client/src/components/modals/CategoryGroupMenu.tsx @@ -13,7 +13,7 @@ import ViewHide from '../../icons/v2/ViewHide'; import ViewShow from '../../icons/v2/ViewShow'; import { type CSSProperties, styles, theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import Modal from '../common/Modal'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/CategoryMenu.tsx b/packages/desktop-client/src/components/modals/CategoryMenu.tsx index 58962df061a..84952aa9eb4 100644 --- a/packages/desktop-client/src/components/modals/CategoryMenu.tsx +++ b/packages/desktop-client/src/components/modals/CategoryMenu.tsx @@ -12,7 +12,7 @@ import ViewHide from '../../icons/v2/ViewHide'; import ViewShow from '../../icons/v2/ViewShow'; import { type CSSProperties, styles, theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import Modal from '../common/Modal'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/CloseAccount.tsx b/packages/desktop-client/src/components/modals/CloseAccount.tsx index 2b58b0852d3..582ce0fe986 100644 --- a/packages/desktop-client/src/components/modals/CloseAccount.tsx +++ b/packages/desktop-client/src/components/modals/CloseAccount.tsx @@ -11,7 +11,7 @@ import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; import CategoryAutocomplete from '../autocomplete/CategoryAutocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import FormError from '../common/FormError'; import LinkButton from '../common/LinkButton'; import Modal from '../common/Modal'; diff --git a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx index 6b8c9bde2c5..f86c7b66a44 100644 --- a/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmCategoryDelete.tsx @@ -6,7 +6,7 @@ import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import CategoryAutocomplete from '../autocomplete/CategoryAutocomplete'; import Block from '../common/Block'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx index a15de63e2ad..096768a7270 100644 --- a/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx +++ b/packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { type CommonModalProps } from '../../types/modals'; import Block from '../common/Block'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/CreateAccount.tsx b/packages/desktop-client/src/components/modals/CreateAccount.tsx index dde2f32c854..a7ff9a680bf 100644 --- a/packages/desktop-client/src/components/modals/CreateAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccount.tsx @@ -6,7 +6,7 @@ import useGoCardlessStatus from '../../hooks/useGoCardlessStatus'; import { type SyncServerStatus } from '../../hooks/useSyncServerStatus'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button, { ButtonWithLoading } from '../common/Button'; +import { Button, ButtonWithLoading } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import Modal from '../common/Modal'; import Paragraph from '../common/Paragraph'; diff --git a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx index 5f5cc59e6ff..df1a5594785 100644 --- a/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateLocalAccount.tsx @@ -6,7 +6,7 @@ import { type BoundActions } from '../../hooks/useActions'; import useNavigate from '../../hooks/useNavigate'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import FormError from '../common/FormError'; import InitialFocus from '../common/InitialFocus'; diff --git a/packages/desktop-client/src/components/modals/EditRule.jsx b/packages/desktop-client/src/components/modals/EditRule.jsx index ee0707bad80..65e9404b2a1 100644 --- a/packages/desktop-client/src/components/modals/EditRule.jsx +++ b/packages/desktop-client/src/components/modals/EditRule.jsx @@ -30,7 +30,7 @@ import AddIcon from '../../icons/v0/Add'; import SubtractIcon from '../../icons/v0/Subtract'; import InformationOutline from '../../icons/v1/InformationOutline'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Select from '../common/Select'; import Stack from '../common/Stack'; diff --git a/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx b/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx index c7e0d96365a..a5335a52b65 100644 --- a/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx +++ b/packages/desktop-client/src/components/modals/FixEncryptionKey.tsx @@ -7,7 +7,7 @@ import { getTestKeyError } from 'loot-core/src/shared/errors'; import { type BoundActions } from '../../hooks/useActions'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button, { ButtonWithLoading } from '../common/Button'; +import { Button, ButtonWithLoading } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import InitialFocus from '../common/InitialFocus'; import Input from '../common/Input'; diff --git a/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx b/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx index ccdcad5a0a5..0ea0c279d71 100644 --- a/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx +++ b/packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx @@ -15,7 +15,7 @@ import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import { Error, Warning } from '../alerts'; import Autocomplete from '../autocomplete/Autocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import LinkButton from '../common/LinkButton'; import Menu from '../common/Menu'; diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.jsx b/packages/desktop-client/src/components/modals/ImportTransactions.jsx index b66597e1125..072f58a3d9d 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactions.jsx +++ b/packages/desktop-client/src/components/modals/ImportTransactions.jsx @@ -13,7 +13,7 @@ import { import { useActions } from '../../hooks/useActions'; import useFeatureFlag from '../../hooks/useFeatureFlag'; import { theme, styles } from '../../style'; -import Button, { ButtonWithLoading } from '../common/Button'; +import { Button, ButtonWithLoading } from '../common/Button'; import Input from '../common/Input'; import Modal from '../common/Modal'; import Select from '../common/Select'; diff --git a/packages/desktop-client/src/components/modals/LoadBackup.jsx b/packages/desktop-client/src/components/modals/LoadBackup.jsx index 64786e72407..1685baad181 100644 --- a/packages/desktop-client/src/components/modals/LoadBackup.jsx +++ b/packages/desktop-client/src/components/modals/LoadBackup.jsx @@ -4,7 +4,7 @@ import { send, listen, unlisten } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; import Block from '../common/Block'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx index d857cdd6a90..dcada00ae9b 100644 --- a/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx +++ b/packages/desktop-client/src/components/modals/MergeUnusedPayees.jsx @@ -6,7 +6,7 @@ import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; import { Information } from '../alerts'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal, { ModalButtons } from '../common/Modal'; import Paragraph from '../common/Paragraph'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/modals/Notes.tsx b/packages/desktop-client/src/components/modals/Notes.tsx index 8d6e27abad9..79fb3149498 100644 --- a/packages/desktop-client/src/components/modals/Notes.tsx +++ b/packages/desktop-client/src/components/modals/Notes.tsx @@ -5,7 +5,7 @@ import q from 'loot-core/src/shared/query'; import Check from '../../icons/v2/Check'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import View from '../common/View'; import { Notes as NotesComponent } from '../Notes'; diff --git a/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx b/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx index e9146a7e039..07afe4f3e85 100644 --- a/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx +++ b/packages/desktop-client/src/components/modals/PlaidExternalMsg.tsx @@ -4,7 +4,7 @@ import AnimatedLoading from '../../icons/AnimatedLoading'; import { theme } from '../../style'; import { type CommonModalProps } from '../../types/modals'; import { Error } from '../alerts'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal, { ModalButtons } from '../common/Modal'; import Paragraph from '../common/Paragraph'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx b/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx index 132f346688c..3f78b65c874 100644 --- a/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx +++ b/packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { theme } from '../../style'; import Autocomplete from '../autocomplete/Autocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/modals/SingleInput.tsx b/packages/desktop-client/src/components/modals/SingleInput.tsx index db2ed81a088..a4046910ada 100644 --- a/packages/desktop-client/src/components/modals/SingleInput.tsx +++ b/packages/desktop-client/src/components/modals/SingleInput.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { styles } from '../../style'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import FormError from '../common/FormError'; import InitialFocus from '../common/InitialFocus'; import Input from '../common/Input'; diff --git a/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx b/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx index 814d8c75573..801127f78a8 100644 --- a/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx +++ b/packages/desktop-client/src/components/modals/SwitchBudgetType.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useSelector } from 'react-redux'; import { type CommonModalProps } from '../../types/modals'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import Modal from '../common/Modal'; import Paragraph from '../common/Paragraph'; diff --git a/packages/desktop-client/src/components/payees/ManagePayees.jsx b/packages/desktop-client/src/components/payees/ManagePayees.jsx index 3e60c6a7508..a95724fc61e 100644 --- a/packages/desktop-client/src/components/payees/ManagePayees.jsx +++ b/packages/desktop-client/src/components/payees/ManagePayees.jsx @@ -21,7 +21,7 @@ import useSelected, { import useStableCallback from '../../hooks/useStableCallback'; import ExpandArrow from '../../icons/v0/ExpandArrow'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Search from '../common/Search'; import View from '../common/View'; import { TableHeader, Cell, SelectCell, useTableNavigator } from '../table'; diff --git a/packages/desktop-client/src/components/reports/CategorySelector.tsx b/packages/desktop-client/src/components/reports/CategorySelector.tsx index d83825eedb4..8033e6538f3 100644 --- a/packages/desktop-client/src/components/reports/CategorySelector.tsx +++ b/packages/desktop-client/src/components/reports/CategorySelector.tsx @@ -9,7 +9,7 @@ import { CheckAll, UncheckAll } from '../../icons/v2'; import ViewHide from '../../icons/v2/ViewHide'; import ViewShow from '../../icons/v2/ViewShow'; import { type CategoryListProps } from '../autocomplete/CategoryAutocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Text from '../common/Text'; import View from '../common/View'; import { Checkbox } from '../forms'; diff --git a/packages/desktop-client/src/components/reports/GraphButton.tsx b/packages/desktop-client/src/components/reports/GraphButton.tsx index 50c50297dd6..d7a06453e61 100644 --- a/packages/desktop-client/src/components/reports/GraphButton.tsx +++ b/packages/desktop-client/src/components/reports/GraphButton.tsx @@ -1,7 +1,7 @@ import React, { type HTMLProps } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import HoverTarget from '../common/HoverTarget'; import Text from '../common/Text'; import { Tooltip } from '../tooltips'; diff --git a/packages/desktop-client/src/components/reports/Header.jsx b/packages/desktop-client/src/components/reports/Header.jsx index dffee4321ca..a3db665b810 100644 --- a/packages/desktop-client/src/components/reports/Header.jsx +++ b/packages/desktop-client/src/components/reports/Header.jsx @@ -4,7 +4,7 @@ import * as monthUtils from 'loot-core/src/shared/months'; import ArrowLeft from '../../icons/v1/ArrowLeft'; import { styles } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ButtonLink from '../common/ButtonLink'; import Select from '../common/Select'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/reports/ModeButton.tsx b/packages/desktop-client/src/components/reports/ModeButton.tsx index e0f216d84fa..1cc1aed1f24 100644 --- a/packages/desktop-client/src/components/reports/ModeButton.tsx +++ b/packages/desktop-client/src/components/reports/ModeButton.tsx @@ -1,7 +1,7 @@ import React, { type MouseEventHandler, type ReactNode } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; type ModeButtonProps = { selected: boolean; diff --git a/packages/desktop-client/src/components/reports/SaveReport.tsx b/packages/desktop-client/src/components/reports/SaveReport.tsx index a634223c004..ed0476b1e17 100644 --- a/packages/desktop-client/src/components/reports/SaveReport.tsx +++ b/packages/desktop-client/src/components/reports/SaveReport.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import ExpandArrow from '../../icons/v0/ExpandArrow'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import MenuTooltip from '../common/MenuTooltip'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/rules/RuleRow.tsx b/packages/desktop-client/src/components/rules/RuleRow.tsx index c9977fb19bf..60630b39879 100644 --- a/packages/desktop-client/src/components/rules/RuleRow.tsx +++ b/packages/desktop-client/src/components/rules/RuleRow.tsx @@ -6,7 +6,7 @@ import { type RuleEntity } from 'loot-core/src/types/models'; import { useSelectedDispatch } from '../../hooks/useSelected'; import ArrowRight from '../../icons/v0/RightArrow2'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Stack from '../common/Stack'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/schedules/EditSchedule.jsx b/packages/desktop-client/src/components/schedules/EditSchedule.jsx index 5beaa5968c8..7f9f0c89e8c 100644 --- a/packages/desktop-client/src/components/schedules/EditSchedule.jsx +++ b/packages/desktop-client/src/components/schedules/EditSchedule.jsx @@ -12,7 +12,7 @@ import useSelected, { SelectedProvider } from '../../hooks/useSelected'; import { theme } from '../../style'; import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Stack from '../common/Stack'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx index 48c5c2d2edd..194d46cc5e1 100644 --- a/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx +++ b/packages/desktop-client/src/components/schedules/PostsOfflineNotification.jsx @@ -4,7 +4,7 @@ import { useLocation } from 'react-router-dom'; import { send } from 'loot-core/src/platform/client/fetch'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Modal from '../common/Modal'; import Paragraph from '../common/Paragraph'; import Stack from '../common/Stack'; diff --git a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx index 3484e67c144..e16efa873c2 100644 --- a/packages/desktop-client/src/components/schedules/SchedulesTable.tsx +++ b/packages/desktop-client/src/components/schedules/SchedulesTable.tsx @@ -15,7 +15,7 @@ import { type ScheduleEntity } from 'loot-core/src/types/models'; import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; import Check from '../../icons/v2/Check'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Menu from '../common/Menu'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/schedules/index.tsx b/packages/desktop-client/src/components/schedules/index.tsx index a4fb235e77d..04171948ddd 100644 --- a/packages/desktop-client/src/components/schedules/index.tsx +++ b/packages/desktop-client/src/components/schedules/index.tsx @@ -6,7 +6,7 @@ import { type ScheduleEntity } from 'loot-core/src/types/models'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Search from '../common/Search'; import View from '../common/View'; import { Page } from '../Page'; diff --git a/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx b/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx index 0bfd696308d..f865328e81c 100644 --- a/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx +++ b/packages/desktop-client/src/components/select/RecurringSchedulePicker.jsx @@ -8,7 +8,7 @@ import { getRecurringDescription } from 'loot-core/src/shared/schedules'; import AddIcon from '../../icons/v0/Add'; import SubtractIcon from '../../icons/v0/Subtract'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Input from '../common/Input'; import Select from '../common/Select'; import Stack from '../common/Stack'; diff --git a/packages/desktop-client/src/components/settings/Encryption.tsx b/packages/desktop-client/src/components/settings/Encryption.tsx index 9c5636793b6..cca17a173e4 100644 --- a/packages/desktop-client/src/components/settings/Encryption.tsx +++ b/packages/desktop-client/src/components/settings/Encryption.tsx @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import Text from '../common/Text'; import { useServerURL } from '../ServerContext'; diff --git a/packages/desktop-client/src/components/settings/Format.tsx b/packages/desktop-client/src/components/settings/Format.tsx index 38511f84c18..a140d23b9cd 100644 --- a/packages/desktop-client/src/components/settings/Format.tsx +++ b/packages/desktop-client/src/components/settings/Format.tsx @@ -6,7 +6,7 @@ import { type LocalPrefs } from 'loot-core/src/types/prefs'; import { useActions } from '../../hooks/useActions'; import { tokens } from '../../tokens'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Select from '../common/Select'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/settings/Global.tsx b/packages/desktop-client/src/components/settings/Global.tsx index 0a28d43d1c9..1b258becd59 100644 --- a/packages/desktop-client/src/components/settings/Global.tsx +++ b/packages/desktop-client/src/components/settings/Global.tsx @@ -4,7 +4,7 @@ import { useSelector } from 'react-redux'; import { useActions } from '../../hooks/useActions'; import { theme } from '../../style'; import { Information } from '../alerts'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Text from '../common/Text'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/settings/Themes.tsx b/packages/desktop-client/src/components/settings/Themes.tsx index c43a1447e2c..f528735fe72 100644 --- a/packages/desktop-client/src/components/settings/Themes.tsx +++ b/packages/desktop-client/src/components/settings/Themes.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useActions } from '../../hooks/useActions'; import { themeOptions, useTheme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Select from '../common/Select'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/settings/UI.tsx b/packages/desktop-client/src/components/settings/UI.tsx index ebdc6be7c10..82025dbb567 100644 --- a/packages/desktop-client/src/components/settings/UI.tsx +++ b/packages/desktop-client/src/components/settings/UI.tsx @@ -5,7 +5,7 @@ import { css, media } from 'glamor'; import { type CSSProperties, theme } from '../../style'; import { tokens } from '../../tokens'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import View from '../common/View'; type SettingProps = { diff --git a/packages/desktop-client/src/components/settings/index.tsx b/packages/desktop-client/src/components/settings/index.tsx index 3744b612055..6d4c82adb2e 100644 --- a/packages/desktop-client/src/components/settings/index.tsx +++ b/packages/desktop-client/src/components/settings/index.tsx @@ -12,7 +12,7 @@ import { useSetThemeColor } from '../../hooks/useSetThemeColor'; import { useResponsive } from '../../ResponsiveProvider'; import { theme } from '../../style'; import { tokens } from '../../tokens'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import ExternalLink from '../common/ExternalLink'; import Input from '../common/Input'; import Text from '../common/Text'; diff --git a/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx b/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx index 3ea71ba13f9..06ec2c65101 100644 --- a/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx +++ b/packages/desktop-client/src/components/sidebar/SidebarWithData.tsx @@ -11,7 +11,7 @@ import { useActions } from '../../hooks/useActions'; import useNavigate from '../../hooks/useNavigate'; import ExpandArrow from '../../icons/v0/ExpandArrow'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import InitialFocus from '../common/InitialFocus'; import Input from '../common/Input'; import Menu from '../common/Menu'; diff --git a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx index 69c7dfe4486..6e8f90f2a3a 100644 --- a/packages/desktop-client/src/components/sidebar/ToggleButton.tsx +++ b/packages/desktop-client/src/components/sidebar/ToggleButton.tsx @@ -3,7 +3,7 @@ import React, { type MouseEventHandler } from 'react'; import Pin from '../../icons/v1/Pin'; import ArrowButtonLeft1 from '../../icons/v2/ArrowButtonLeft1'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import View from '../common/View'; type ToggleButtonProps = { diff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsx index 1337c85b973..28f5776aa9b 100644 --- a/packages/desktop-client/src/components/table.tsx +++ b/packages/desktop-client/src/components/table.tsx @@ -28,7 +28,7 @@ import ExpandArrow from '../icons/v0/ExpandArrow'; import Checkmark from '../icons/v1/Checkmark'; import { type CSSProperties, styles, theme } from '../style'; -import Button from './common/Button'; +import { Button } from './common/Button'; import Input from './common/Input'; import Menu from './common/Menu'; import Text from './common/Text'; diff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx index a0a9a676920..30573af4782 100644 --- a/packages/desktop-client/src/components/transactions/MobileTransaction.jsx +++ b/packages/desktop-client/src/components/transactions/MobileTransaction.jsx @@ -61,7 +61,7 @@ import CheckCircle1 from '../../icons/v2/CheckCircle1'; import Lock from '../../icons/v2/LockClosed'; import PencilWriteAlternate from '../../icons/v2/PencilWriteAlternate'; import { styles, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Text from '../common/Text'; import TextOneLine from '../common/TextOneLine'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx index d97d77dbd38..6a9f5d65648 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx @@ -57,7 +57,7 @@ import { styles, theme } from '../../style'; import AccountAutocomplete from '../autocomplete/AccountAutocomplete'; import CategoryAutocomplete from '../autocomplete/CategoryAutocomplete'; import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import Text from '../common/Text'; import View from '../common/View'; import { getStatusProps } from '../schedules/StatusBadge'; diff --git a/packages/desktop-client/src/components/util/AmountInput.tsx b/packages/desktop-client/src/components/util/AmountInput.tsx index 9adec5f3adb..848672b01e6 100644 --- a/packages/desktop-client/src/components/util/AmountInput.tsx +++ b/packages/desktop-client/src/components/util/AmountInput.tsx @@ -13,7 +13,7 @@ import { useMergedRefs } from '../../hooks/useMergedRefs'; import Add from '../../icons/v1/Add'; import Subtract from '../../icons/v1/Subtract'; import { type CSSProperties, theme } from '../../style'; -import Button from '../common/Button'; +import { Button } from '../common/Button'; import InputWithContent from '../common/InputWithContent'; import View from '../common/View'; import useFormat from '../spreadsheet/useFormat'; diff --git a/upcoming-release-notes/2116.md b/upcoming-release-notes/2116.md new file mode 100644 index 00000000000..56222efbc89 --- /dev/null +++ b/upcoming-release-notes/2116.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [joel-jeremy] +--- + +eslint: no default exports - part 2 From d203def2309f4d0032e5b9f6f0400377f15491bf Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 6 Jan 2024 12:43:06 -0500 Subject: [PATCH 03/17] Fix when pressing Enter adds an extra split transaction when no split remains (#2144) * Fix pressing enter adds split transaction when no split remains * Added release notes * Refactor to use find indstead of findIndex --- .../src/components/transactions/TransactionsTable.jsx | 4 +++- upcoming-release-notes/2144.md | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 upcoming-release-notes/2144.md diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx index 6a9f5d65648..fe4549a1e0f 100644 --- a/packages/desktop-client/src/components/transactions/TransactionsTable.jsx +++ b/packages/desktop-client/src/components/transactions/TransactionsTable.jsx @@ -1968,7 +1968,9 @@ export const TransactionTable = forwardRef((props, ref) => { afterSave(() => { const transactions = latestState.current.transactions; const idx = transactions.findIndex(t => t.id === id); - const parent = transactionMap.get(transactions[idx]?.parent_id); + const parent = transactions.find( + t => t.id === transactions[idx]?.parent_id, + ); if ( isLastChild(transactions, idx) && diff --git a/upcoming-release-notes/2144.md b/upcoming-release-notes/2144.md new file mode 100644 index 00000000000..d03b7b0ce7d --- /dev/null +++ b/upcoming-release-notes/2144.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [jasonmichalski] +--- + +Fix when pressing Enter adds an extra split transaction when no split remains From 882fd9f5cdffa8835f9dcf2988792ed99cb41a83 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Sat, 6 Jan 2024 10:57:19 -0800 Subject: [PATCH 04/17] ESLint no-default-exports 3 (#2117) * ESLint no default exports - part 3 * Fix default imports * Release notes * Fix Menu --- .eslintrc.js | 17 +++++++++++++++++ .../src/components/AppBackground.tsx | 2 +- .../src/components/DevelopmentTopBar.tsx | 2 +- .../src/components/FatalError.tsx | 6 +++--- .../src/components/LoggedInUser.tsx | 2 +- .../src/components/ManageRules.tsx | 2 +- .../src/components/Notifications.tsx | 4 ++-- .../src/components/ThemeSelector.tsx | 2 +- .../desktop-client/src/components/Titlebar.tsx | 4 ++-- .../src/components/UpdateNotification.tsx | 2 +- .../components/accounts/AccountSyncCheck.jsx | 2 +- .../src/components/accounts/Header.jsx | 8 ++++---- .../accounts/MobileAccountDetails.jsx | 6 +++--- .../src/components/accounts/Reconcile.jsx | 4 ++-- .../components/autocomplete/Autocomplete.tsx | 2 +- .../src/components/budget/BudgetTotals.tsx | 2 +- .../src/components/budget/MobileBudgetTable.jsx | 6 +++--- .../src/components/budget/SidebarCategory.tsx | 2 +- .../src/components/budget/SidebarGroup.tsx | 2 +- .../components/budget/report/BalanceTooltip.tsx | 2 +- .../budget/report/ReportComponents.tsx | 2 +- .../report/budgetsummary/BudgetSummary.tsx | 2 +- .../budget/report/budgetsummary/Saved.tsx | 4 ++-- .../budget/rollover/BalanceTooltip.tsx | 2 +- .../components/budget/rollover/CoverTooltip.tsx | 2 +- .../components/budget/rollover/HoldTooltip.tsx | 4 ++-- .../budget/rollover/RolloverComponents.tsx | 2 +- .../budget/rollover/TransferTooltip.tsx | 4 ++-- .../rollover/budgetsummary/BudgetSummary.tsx | 2 +- .../budget/rollover/budgetsummary/ToBudget.tsx | 6 +++--- .../rollover/budgetsummary/TotalsList.tsx | 6 +++--- .../src/components/common/AlignedText.tsx | 4 ++-- .../src/components/common/AnchorLink.tsx | 2 +- .../src/components/common/Block.tsx | 2 +- .../src/components/common/ButtonLink.tsx | 2 +- .../src/components/common/Card.tsx | 4 +--- .../src/components/common/ExternalLink.tsx | 4 +--- .../src/components/common/FormError.tsx | 2 +- .../src/components/common/HoverTarget.tsx | 2 +- .../src/components/common/InitialFocus.ts | 2 +- .../src/components/common/InlineField.tsx | 2 +- .../src/components/common/Input.tsx | 2 +- .../src/components/common/InputWithContent.tsx | 4 ++-- .../src/components/common/Label.tsx | 2 +- .../src/components/common/Link.tsx | 2 +- .../src/components/common/LinkButton.tsx | 6 +----- .../src/components/common/Menu.tsx | 2 +- .../src/components/common/MenuTooltip.tsx | 2 +- .../src/components/common/Modal.tsx | 2 +- .../src/components/common/Search.tsx | 2 +- .../src/components/filters/FiltersMenu.jsx | 4 ++-- .../src/components/filters/SavedFilters.jsx | 4 ++-- .../src/components/manager/BudgetList.jsx | 2 +- .../src/components/manager/Import.tsx | 2 +- .../src/components/manager/ImportActual.tsx | 2 +- .../src/components/manager/ImportYNAB4.tsx | 2 +- .../src/components/manager/ImportYNAB5.tsx | 4 ++-- .../src/components/manager/ServerURL.tsx | 2 +- .../src/components/manager/WelcomeScreen.tsx | 2 +- .../components/manager/subscribe/Bootstrap.tsx | 2 +- .../src/components/mobile/MobileForms.jsx | 2 +- .../src/components/modals/CategoryGroupMenu.tsx | 2 +- .../src/components/modals/CategoryMenu.tsx | 2 +- .../src/components/modals/CloseAccount.tsx | 4 ++-- .../components/modals/ConfirmCategoryDelete.tsx | 2 +- .../modals/ConfirmTransactionEdit.tsx | 2 +- .../src/components/modals/CreateAccount.tsx | 2 +- .../components/modals/CreateEncryptionKey.tsx | 6 +++--- .../components/modals/CreateLocalAccount.tsx | 10 +++++----- .../src/components/modals/EditField.jsx | 2 +- .../src/components/modals/FixEncryptionKey.tsx | 6 +++--- .../components/modals/GoCardlessExternalMsg.tsx | 6 +++--- .../components/modals/GoCardlessInitialise.tsx | 4 ++-- .../components/modals/ImportTransactions.jsx | 2 +- .../src/components/modals/LoadBackup.jsx | 2 +- .../src/components/modals/SingleInput.tsx | 6 +++--- .../src/components/modals/SwitchBudgetType.tsx | 2 +- .../src/components/payees/PayeeMenu.tsx | 2 +- .../src/components/reports/Change.jsx | 2 +- .../src/components/reports/DateRange.tsx | 2 +- .../src/components/reports/GraphButton.tsx | 2 +- .../src/components/reports/Header.jsx | 2 +- .../src/components/reports/LoadingIndicator.tsx | 2 +- .../src/components/reports/ReportCard.tsx | 2 +- .../src/components/reports/SaveReport.tsx | 4 ++-- .../src/components/reports/graphs/AreaGraph.tsx | 2 +- .../src/components/reports/graphs/BarGraph.tsx | 2 +- .../components/reports/graphs/BarLineGraph.tsx | 2 +- .../src/components/reports/graphs/LineGraph.tsx | 2 +- .../components/reports/graphs/NetWorthGraph.tsx | 2 +- .../reports/graphs/StackedBarGraph.tsx | 2 +- .../src/components/reports/reports/CashFlow.tsx | 4 ++-- .../components/reports/reports/CashFlowCard.jsx | 2 +- .../reports/reports/CategorySpendingCard.jsx | 2 +- .../components/reports/reports/CustomReport.jsx | 4 ++-- .../reports/reports/CustomReportCard.jsx | 2 +- .../components/reports/reports/NetWorthCard.jsx | 2 +- .../components/reports/reports/SankeyCard.jsx | 2 +- .../spreadsheets/cash-flow-spreadsheet.tsx | 2 +- .../category-spending-spreadsheet.tsx | 2 +- .../src/components/rules/Value.tsx | 2 +- .../src/components/schedules/SchedulesTable.tsx | 2 +- .../src/components/select/DateSelect.tsx | 2 +- .../select/RecurringSchedulePicker.jsx | 2 +- .../src/components/settings/Encryption.tsx | 2 +- .../src/components/settings/Experimental.tsx | 2 +- .../src/components/settings/Export.tsx | 2 +- .../src/components/settings/index.tsx | 4 ++-- .../src/components/sidebar/Account.tsx | 4 ++-- .../src/components/sidebar/Item.tsx | 2 +- .../src/components/sidebar/ItemContent.tsx | 2 +- .../src/components/sidebar/SecondaryItem.tsx | 2 +- .../src/components/sidebar/SidebarWithData.tsx | 6 +++--- .../desktop-client/src/components/table.tsx | 4 ++-- .../transactions/SelectedTransactions.jsx | 2 +- .../src/components/util/AmountInput.tsx | 2 +- .../src/components/util/GenericInput.jsx | 2 +- .../src/components/util/LoadComponent.tsx | 2 +- upcoming-release-notes/2117.md | 6 ++++++ 119 files changed, 186 insertions(+), 171 deletions(-) create mode 100644 upcoming-release-notes/2117.md diff --git a/.eslintrc.js b/.eslintrc.js index 9b20e7bb39f..aabdb637eac 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -249,7 +249,24 @@ module.exports = { // './packages/desktop-client/src/components/accounts/**/*', // './packages/desktop-client/src/components/autocomplete/**/*', // './packages/desktop-client/src/components/budget/**/*', + './packages/desktop-client/src/components/common/AlignedText.tsx', + './packages/desktop-client/src/components/common/AnchorLink.tsx', + './packages/desktop-client/src/components/common/Block.tsx', './packages/desktop-client/src/components/common/Button.tsx', + './packages/desktop-client/src/components/common/ButtonLink.tsx', + './packages/desktop-client/src/components/common/Card.tsx', + './packages/desktop-client/src/components/common/ExternalLink.tsx', + './packages/desktop-client/src/components/common/FormError.tsx', + './packages/desktop-client/src/components/common/HoverTarget.tsx', + './packages/desktop-client/src/components/common/InitialFocus.tsx', + './packages/desktop-client/src/components/common/InlineField.tsx', + './packages/desktop-client/src/components/common/Input.tsx', + './packages/desktop-client/src/components/common/InputWithContent.tsx', + './packages/desktop-client/src/components/common/Label.tsx', + './packages/desktop-client/src/components/common/Link.tsx', + './packages/desktop-client/src/components/common/LinkButton.tsx', + './packages/desktop-client/src/components/common/Menu.tsx', + './packages/desktop-client/src/components/common/MenuTooltip.tsx', // './packages/desktop-client/src/components/common/**/*', // './packages/desktop-client/src/components/filters/**/*', // './packages/desktop-client/src/components/gocardless/**/*', diff --git a/packages/desktop-client/src/components/AppBackground.tsx b/packages/desktop-client/src/components/AppBackground.tsx index 258ded5153a..7f4d12b327b 100644 --- a/packages/desktop-client/src/components/AppBackground.tsx +++ b/packages/desktop-client/src/components/AppBackground.tsx @@ -6,7 +6,7 @@ import AnimatedLoading from '../icons/AnimatedLoading'; import { theme } from '../style'; import { Background } from './Background'; -import Block from './common/Block'; +import { Block } from './common/Block'; import View from './common/View'; type AppBackgroundProps = { diff --git a/packages/desktop-client/src/components/DevelopmentTopBar.tsx b/packages/desktop-client/src/components/DevelopmentTopBar.tsx index f163863fa73..170c90f1510 100644 --- a/packages/desktop-client/src/components/DevelopmentTopBar.tsx +++ b/packages/desktop-client/src/components/DevelopmentTopBar.tsx @@ -1,6 +1,6 @@ import { theme } from '../style'; -import ExternalLink from './common/ExternalLink'; +import { ExternalLink } from './common/ExternalLink'; import View from './common/View'; export function DevelopmentTopBar() { diff --git a/packages/desktop-client/src/components/FatalError.tsx b/packages/desktop-client/src/components/FatalError.tsx index 6fb0c803187..187a6270bf1 100644 --- a/packages/desktop-client/src/components/FatalError.tsx +++ b/packages/desktop-client/src/components/FatalError.tsx @@ -1,9 +1,9 @@ import React, { useState } from 'react'; -import Block from './common/Block'; +import { Block } from './common/Block'; import { Button } from './common/Button'; -import ExternalLink from './common/ExternalLink'; -import LinkButton from './common/LinkButton'; +import { ExternalLink } from './common/ExternalLink'; +import { LinkButton } from './common/LinkButton'; import Modal from './common/Modal'; import Paragraph from './common/Paragraph'; import Stack from './common/Stack'; diff --git a/packages/desktop-client/src/components/LoggedInUser.tsx b/packages/desktop-client/src/components/LoggedInUser.tsx index c834b88ca57..a3fddb94180 100644 --- a/packages/desktop-client/src/components/LoggedInUser.tsx +++ b/packages/desktop-client/src/components/LoggedInUser.tsx @@ -5,7 +5,7 @@ import { useActions } from '../hooks/useActions'; import { theme, styles, type CSSProperties } from '../style'; import { Button } from './common/Button'; -import Menu from './common/Menu'; +import { Menu } from './common/Menu'; import Text from './common/Text'; import View from './common/View'; import { useServerURL } from './ServerContext'; diff --git a/packages/desktop-client/src/components/ManageRules.tsx b/packages/desktop-client/src/components/ManageRules.tsx index 8caa447a81a..638fa13e22b 100644 --- a/packages/desktop-client/src/components/ManageRules.tsx +++ b/packages/desktop-client/src/components/ManageRules.tsx @@ -21,7 +21,7 @@ import useSelected, { SelectedProvider } from '../hooks/useSelected'; import { theme } from '../style'; import { Button } from './common/Button'; -import ExternalLink from './common/ExternalLink'; +import { ExternalLink } from './common/ExternalLink'; import Search from './common/Search'; import Stack from './common/Stack'; import Text from './common/Text'; diff --git a/packages/desktop-client/src/components/Notifications.tsx b/packages/desktop-client/src/components/Notifications.tsx index 881b562c648..48b8b229eaf 100644 --- a/packages/desktop-client/src/components/Notifications.tsx +++ b/packages/desktop-client/src/components/Notifications.tsx @@ -14,8 +14,8 @@ import Delete from '../icons/v0/Delete'; import { styles, theme, type CSSProperties } from '../style'; import { Button, ButtonWithLoading } from './common/Button'; -import ExternalLink from './common/ExternalLink'; -import LinkButton from './common/LinkButton'; +import { ExternalLink } from './common/ExternalLink'; +import { LinkButton } from './common/LinkButton'; import Stack from './common/Stack'; import Text from './common/Text'; import View from './common/View'; diff --git a/packages/desktop-client/src/components/ThemeSelector.tsx b/packages/desktop-client/src/components/ThemeSelector.tsx index 45987b63099..667fb272ba8 100644 --- a/packages/desktop-client/src/components/ThemeSelector.tsx +++ b/packages/desktop-client/src/components/ThemeSelector.tsx @@ -10,7 +10,7 @@ import { useResponsive } from '../ResponsiveProvider'; import { type CSSProperties, themeOptions, useTheme } from '../style'; import { Button } from './common/Button'; -import Menu from './common/Menu'; +import { Menu } from './common/Menu'; import { Tooltip } from './tooltips'; type ThemeSelectorProps = { diff --git a/packages/desktop-client/src/components/Titlebar.tsx b/packages/desktop-client/src/components/Titlebar.tsx index 34d61014b40..4b6bb75cda2 100644 --- a/packages/desktop-client/src/components/Titlebar.tsx +++ b/packages/desktop-client/src/components/Titlebar.tsx @@ -29,8 +29,8 @@ import AccountSyncCheck from './accounts/AccountSyncCheck'; import { AnimatedRefresh } from './AnimatedRefresh'; import { MonthCountSelector } from './budget/MonthCountSelector'; import { Button, ButtonWithLoading } from './common/Button'; -import ExternalLink from './common/ExternalLink'; -import Link from './common/Link'; +import { ExternalLink } from './common/ExternalLink'; +import { Link } from './common/Link'; import Paragraph from './common/Paragraph'; import Text from './common/Text'; import View from './common/View'; diff --git a/packages/desktop-client/src/components/UpdateNotification.tsx b/packages/desktop-client/src/components/UpdateNotification.tsx index f6d224accbc..9430f4e3ad4 100644 --- a/packages/desktop-client/src/components/UpdateNotification.tsx +++ b/packages/desktop-client/src/components/UpdateNotification.tsx @@ -6,7 +6,7 @@ import Close from '../icons/v1/Close'; import { theme } from '../style'; import { Button } from './common/Button'; -import LinkButton from './common/LinkButton'; +import { LinkButton } from './common/LinkButton'; import Text from './common/Text'; import View from './common/View'; diff --git a/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx index 7cb042e1083..05274e49445 100644 --- a/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx +++ b/packages/desktop-client/src/components/accounts/AccountSyncCheck.jsx @@ -7,7 +7,7 @@ import { useActions } from '../../hooks/useActions'; import ExclamationOutline from '../../icons/v1/ExclamationOutline'; import { theme } from '../../style'; import { Button } from '../common/Button'; -import ExternalLink from '../common/ExternalLink'; +import { ExternalLink } from '../common/ExternalLink'; import View from '../common/View'; import { Tooltip } from '../tooltips'; diff --git a/packages/desktop-client/src/components/accounts/Header.jsx b/packages/desktop-client/src/components/accounts/Header.jsx index e9738eb401f..d5bad60712d 100644 --- a/packages/desktop-client/src/components/accounts/Header.jsx +++ b/packages/desktop-client/src/components/accounts/Header.jsx @@ -10,11 +10,11 @@ import Pencil1 from '../../icons/v2/Pencil1'; import { theme, styles } from '../../style'; import { AnimatedRefresh } from '../AnimatedRefresh'; import { Button } from '../common/Button'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; -import Menu from '../common/Menu'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; +import { Menu } from '../common/Menu'; import MenuButton from '../common/MenuButton'; -import MenuTooltip from '../common/MenuTooltip'; +import { MenuTooltip } from '../common/MenuTooltip'; import Search from '../common/Search'; import Stack from '../common/Stack'; import View from '../common/View'; diff --git a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx index 37b0d016dd8..7fd1b09abd1 100644 --- a/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx +++ b/packages/desktop-client/src/components/accounts/MobileAccountDetails.jsx @@ -4,9 +4,9 @@ import { useActions } from '../../hooks/useActions'; import Add from '../../icons/v1/Add'; import SearchAlternate from '../../icons/v2/SearchAlternate'; import { theme } from '../../style'; -import ButtonLink from '../common/ButtonLink'; -import InputWithContent from '../common/InputWithContent'; -import Label from '../common/Label'; +import { ButtonLink } from '../common/ButtonLink'; +import { InputWithContent } from '../common/InputWithContent'; +import { Label } from '../common/Label'; import View from '../common/View'; import { MobileBackButton } from '../MobileBackButton'; import { Page } from '../Page'; diff --git a/packages/desktop-client/src/components/accounts/Reconcile.jsx b/packages/desktop-client/src/components/accounts/Reconcile.jsx index 0efd70f36cb..bd3f4a59b63 100644 --- a/packages/desktop-client/src/components/accounts/Reconcile.jsx +++ b/packages/desktop-client/src/components/accounts/Reconcile.jsx @@ -6,8 +6,8 @@ import { currencyToInteger } from 'loot-core/src/shared/util'; import CheckCircle1 from '../../icons/v2/CheckCircle1'; import { styles, theme } from '../../style'; import { Button } from '../common/Button'; -import InitialFocus from '../common/InitialFocus'; -import Input from '../common/Input'; +import { InitialFocus } from '../common/InitialFocus'; +import { Input } from '../common/Input'; import Text from '../common/Text'; import View from '../common/View'; import useFormat from '../spreadsheet/useFormat'; diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx index 81b838b725c..71d49edd1eb 100644 --- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx +++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx @@ -16,7 +16,7 @@ import { css } from 'glamor'; import Remove from '../../icons/v2/Remove'; import { theme, type CSSProperties } from '../../style'; import { Button } from '../common/Button'; -import Input from '../common/Input'; +import { Input } from '../common/Input'; import View from '../common/View'; import { Tooltip } from '../tooltips'; diff --git a/packages/desktop-client/src/components/budget/BudgetTotals.tsx b/packages/desktop-client/src/components/budget/BudgetTotals.tsx index 11e42842688..3864660d559 100644 --- a/packages/desktop-client/src/components/budget/BudgetTotals.tsx +++ b/packages/desktop-client/src/components/budget/BudgetTotals.tsx @@ -3,7 +3,7 @@ import React, { type ComponentProps, memo, useState } from 'react'; import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; import { theme, styles } from '../../style'; import { Button } from '../common/Button'; -import Menu from '../common/Menu'; +import { Menu } from '../common/Menu'; import View from '../common/View'; import { Tooltip } from '../tooltips'; diff --git a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx index c3297e72c30..59e50bc20e8 100644 --- a/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx +++ b/packages/desktop-client/src/components/budget/MobileBudgetTable.jsx @@ -13,9 +13,9 @@ import DotsHorizontalTriple from '../../icons/v1/DotsHorizontalTriple'; import { useResponsive } from '../../ResponsiveProvider'; import { theme, styles } from '../../style'; import { Button } from '../common/Button'; -import Card from '../common/Card'; -import Label from '../common/Label'; -import Menu from '../common/Menu'; +import { Card } from '../common/Card'; +import { Label } from '../common/Label'; +import { Menu } from '../common/Menu'; import Text from '../common/Text'; import View from '../common/View'; import { Page } from '../Page'; diff --git a/packages/desktop-client/src/components/budget/SidebarCategory.tsx b/packages/desktop-client/src/components/budget/SidebarCategory.tsx index 52947951e4b..9b367bb2189 100644 --- a/packages/desktop-client/src/components/budget/SidebarCategory.tsx +++ b/packages/desktop-client/src/components/budget/SidebarCategory.tsx @@ -5,7 +5,7 @@ import { type CategoryEntity } from 'loot-core/src/types/models'; import CheveronDown from '../../icons/v1/CheveronDown'; import { theme } from '../../style'; import { Button } from '../common/Button'; -import Menu from '../common/Menu'; +import { Menu } from '../common/Menu'; 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 9621b2b5a1d..8c951c62917 100644 --- a/packages/desktop-client/src/components/budget/SidebarGroup.tsx +++ b/packages/desktop-client/src/components/budget/SidebarGroup.tsx @@ -5,7 +5,7 @@ import ExpandArrow from '../../icons/v0/ExpandArrow'; import CheveronDown from '../../icons/v1/CheveronDown'; import { theme } from '../../style'; import { Button } from '../common/Button'; -import Menu from '../common/Menu'; +import { Menu } from '../common/Menu'; import Text from '../common/Text'; import View from '../common/View'; import { NotesButton } from '../NotesButton'; diff --git a/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx b/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx index c1c297518a8..ceefd77dcca 100644 --- a/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx +++ b/packages/desktop-client/src/components/budget/report/BalanceTooltip.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { reportBudget } from 'loot-core/src/client/queries'; -import Menu from '../../common/Menu'; +import { Menu } from '../../common/Menu'; import useSheetValue from '../../spreadsheet/useSheetValue'; import { Tooltip } from '../../tooltips'; diff --git a/packages/desktop-client/src/components/budget/report/ReportComponents.tsx b/packages/desktop-client/src/components/budget/report/ReportComponents.tsx index 13f03a653d7..5e96e234c94 100644 --- a/packages/desktop-client/src/components/budget/report/ReportComponents.tsx +++ b/packages/desktop-client/src/components/budget/report/ReportComponents.tsx @@ -8,7 +8,7 @@ import useFeatureFlag from '../../../hooks/useFeatureFlag'; import CheveronDown from '../../../icons/v1/CheveronDown'; import { styles, theme, type CSSProperties } from '../../../style'; import { Button } from '../../common/Button'; -import Menu from '../../common/Menu'; +import { Menu } from '../../common/Menu'; import Text from '../../common/Text'; import View from '../../common/View'; import CellValue from '../../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/budget/report/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/report/budgetsummary/BudgetSummary.tsx index 0bcc7e5ea09..ee4b80ca1d5 100644 --- a/packages/desktop-client/src/components/budget/report/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/report/budgetsummary/BudgetSummary.tsx @@ -10,7 +10,7 @@ import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1'; import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1'; import { theme, styles } from '../../../../style'; import { Button } from '../../../common/Button'; -import Menu from '../../../common/Menu'; +import { Menu } from '../../../common/Menu'; import Stack from '../../../common/Stack'; import View from '../../../common/View'; import { NotesButton } from '../../../NotesButton'; diff --git a/packages/desktop-client/src/components/budget/report/budgetsummary/Saved.tsx b/packages/desktop-client/src/components/budget/report/budgetsummary/Saved.tsx index 59ede1c3a2f..e1e94de9e16 100644 --- a/packages/desktop-client/src/components/budget/report/budgetsummary/Saved.tsx +++ b/packages/desktop-client/src/components/budget/report/budgetsummary/Saved.tsx @@ -5,8 +5,8 @@ import { css } from 'glamor'; import { reportBudget } from 'loot-core/src/client/queries'; import { theme, type CSSProperties, styles } from '../../../../style'; -import AlignedText from '../../../common/AlignedText'; -import HoverTarget from '../../../common/HoverTarget'; +import { AlignedText } from '../../../common/AlignedText'; +import { HoverTarget } from '../../../common/HoverTarget'; import Text from '../../../common/Text'; import View from '../../../common/View'; import { PrivacyFilter } from '../../../PrivacyFilter'; diff --git a/packages/desktop-client/src/components/budget/rollover/BalanceTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/BalanceTooltip.tsx index 6df17d977bc..1df4d380638 100644 --- a/packages/desktop-client/src/components/budget/rollover/BalanceTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/BalanceTooltip.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { rolloverBudget } from 'loot-core/src/client/queries'; -import Menu from '../../common/Menu'; +import { Menu } from '../../common/Menu'; import useSheetValue from '../../spreadsheet/useSheetValue'; import { Tooltip } from '../../tooltips'; diff --git a/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx index 6cbc8be7b70..e9a2294577d 100644 --- a/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/CoverTooltip.tsx @@ -3,7 +3,7 @@ import React, { type ComponentProps, useState } from 'react'; import useCategories from '../../../hooks/useCategories'; import CategoryAutocomplete from '../../autocomplete/CategoryAutocomplete'; import { Button } from '../../common/Button'; -import InitialFocus from '../../common/InitialFocus'; +import { InitialFocus } from '../../common/InitialFocus'; import View from '../../common/View'; import { Tooltip } from '../../tooltips'; import { addToBeBudgetedGroup } from '../util'; diff --git a/packages/desktop-client/src/components/budget/rollover/HoldTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/HoldTooltip.tsx index adf170f2e52..e072ae527f4 100644 --- a/packages/desktop-client/src/components/budget/rollover/HoldTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/HoldTooltip.tsx @@ -11,8 +11,8 @@ import evalArithmetic from 'loot-core/src/shared/arithmetic'; import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util'; import { Button } from '../../common/Button'; -import InitialFocus from '../../common/InitialFocus'; -import Input from '../../common/Input'; +import { InitialFocus } from '../../common/InitialFocus'; +import { Input } from '../../common/Input'; import View from '../../common/View'; import NamespaceContext from '../../spreadsheet/NamespaceContext'; import { Tooltip } from '../../tooltips'; diff --git a/packages/desktop-client/src/components/budget/rollover/RolloverComponents.tsx b/packages/desktop-client/src/components/budget/rollover/RolloverComponents.tsx index e29dbacf794..50fb3f62995 100644 --- a/packages/desktop-client/src/components/budget/rollover/RolloverComponents.tsx +++ b/packages/desktop-client/src/components/budget/rollover/RolloverComponents.tsx @@ -8,7 +8,7 @@ import useFeatureFlag from '../../../hooks/useFeatureFlag'; import CheveronDown from '../../../icons/v1/CheveronDown'; import { styles, theme, type CSSProperties } from '../../../style'; import { Button } from '../../common/Button'; -import Menu from '../../common/Menu'; +import { Menu } from '../../common/Menu'; import Text from '../../common/Text'; import View from '../../common/View'; import CellValue from '../../spreadsheet/CellValue'; diff --git a/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx b/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx index 6b397bbc35b..dea5dc50905 100644 --- a/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx +++ b/packages/desktop-client/src/components/budget/rollover/TransferTooltip.tsx @@ -12,8 +12,8 @@ import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util'; import useCategories from '../../../hooks/useCategories'; import CategoryAutocomplete from '../../autocomplete/CategoryAutocomplete'; import { Button } from '../../common/Button'; -import InitialFocus from '../../common/InitialFocus'; -import Input from '../../common/Input'; +import { InitialFocus } from '../../common/InitialFocus'; +import { Input } from '../../common/Input'; import View from '../../common/View'; import NamespaceContext from '../../spreadsheet/NamespaceContext'; import { Tooltip } from '../../tooltips'; diff --git a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx index 799fbbd81b9..584fdf2c55d 100644 --- a/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx +++ b/packages/desktop-client/src/components/budget/rollover/budgetsummary/BudgetSummary.tsx @@ -9,7 +9,7 @@ import ArrowButtonDown1 from '../../../../icons/v2/ArrowButtonDown1'; import ArrowButtonUp1 from '../../../../icons/v2/ArrowButtonUp1'; import { theme, styles } from '../../../../style'; import { Button } from '../../../common/Button'; -import Menu from '../../../common/Menu'; +import { Menu } from '../../../common/Menu'; import View from '../../../common/View'; import { NotesButton } from '../../../NotesButton'; import NamespaceContext from '../../../spreadsheet/NamespaceContext'; diff --git a/packages/desktop-client/src/components/budget/rollover/budgetsummary/ToBudget.tsx b/packages/desktop-client/src/components/budget/rollover/budgetsummary/ToBudget.tsx index cd3b7d09b9a..50e2da3b502 100644 --- a/packages/desktop-client/src/components/budget/rollover/budgetsummary/ToBudget.tsx +++ b/packages/desktop-client/src/components/budget/rollover/budgetsummary/ToBudget.tsx @@ -5,9 +5,9 @@ import { css } from 'glamor'; import { rolloverBudget } from 'loot-core/src/client/queries'; import { theme, styles, type CSSProperties } from '../../../../style'; -import Block from '../../../common/Block'; -import HoverTarget from '../../../common/HoverTarget'; -import Menu from '../../../common/Menu'; +import { Block } from '../../../common/Block'; +import { HoverTarget } from '../../../common/HoverTarget'; +import { Menu } from '../../../common/Menu'; import View from '../../../common/View'; import { PrivacyFilter } from '../../../PrivacyFilter'; import useFormat from '../../../spreadsheet/useFormat'; diff --git a/packages/desktop-client/src/components/budget/rollover/budgetsummary/TotalsList.tsx b/packages/desktop-client/src/components/budget/rollover/budgetsummary/TotalsList.tsx index 20a5fd4b9cf..fc85dfb07bf 100644 --- a/packages/desktop-client/src/components/budget/rollover/budgetsummary/TotalsList.tsx +++ b/packages/desktop-client/src/components/budget/rollover/budgetsummary/TotalsList.tsx @@ -3,9 +3,9 @@ import React from 'react'; import { rolloverBudget } from 'loot-core/src/client/queries'; import { styles, type CSSProperties } from '../../../../style'; -import AlignedText from '../../../common/AlignedText'; -import Block from '../../../common/Block'; -import HoverTarget from '../../../common/HoverTarget'; +import { AlignedText } from '../../../common/AlignedText'; +import { Block } from '../../../common/Block'; +import { HoverTarget } from '../../../common/HoverTarget'; import View from '../../../common/View'; import CellValue from '../../../spreadsheet/CellValue'; import useFormat from '../../../spreadsheet/useFormat'; diff --git a/packages/desktop-client/src/components/common/AlignedText.tsx b/packages/desktop-client/src/components/common/AlignedText.tsx index a119449a397..08085361940 100644 --- a/packages/desktop-client/src/components/common/AlignedText.tsx +++ b/packages/desktop-client/src/components/common/AlignedText.tsx @@ -2,7 +2,7 @@ import { type ComponentProps } from 'react'; import { type CSSProperties } from '../../style'; -import Block from './Block'; +import { Block } from './Block'; import View from './View'; type AlignedTextProps = ComponentProps & { @@ -13,7 +13,7 @@ type AlignedTextProps = ComponentProps & { rightStyle?: CSSProperties; truncate?: 'left' | 'right'; }; -export default function AlignedText({ +export function AlignedText({ left, right, style, diff --git a/packages/desktop-client/src/components/common/AnchorLink.tsx b/packages/desktop-client/src/components/common/AnchorLink.tsx index 2cc6ba3fd01..5defecba686 100644 --- a/packages/desktop-client/src/components/common/AnchorLink.tsx +++ b/packages/desktop-client/src/components/common/AnchorLink.tsx @@ -12,7 +12,7 @@ type AnchorLinkProps = { children?: ReactNode; }; -export default function AnchorLink({ +export function AnchorLink({ to, style, activeStyle, diff --git a/packages/desktop-client/src/components/common/Block.tsx b/packages/desktop-client/src/components/common/Block.tsx index 4a4db9b9686..a1603aef0cf 100644 --- a/packages/desktop-client/src/components/common/Block.tsx +++ b/packages/desktop-client/src/components/common/Block.tsx @@ -6,7 +6,7 @@ type BlockProps = HTMLProps & { innerRef?: Ref; }; -export default function Block(props: BlockProps) { +export function Block(props: BlockProps) { const { className = '', style, innerRef, ...restProps } = props; return (
& { to: string; activeStyle?: CSSProperties; }; -export default function ButtonLink({ +export function ButtonLink({ to, style, activeStyle, diff --git a/packages/desktop-client/src/components/common/Card.tsx b/packages/desktop-client/src/components/common/Card.tsx index 5f143cd3553..da6e177a8b3 100644 --- a/packages/desktop-client/src/components/common/Card.tsx +++ b/packages/desktop-client/src/components/common/Card.tsx @@ -6,7 +6,7 @@ import View from './View'; type CardProps = ComponentProps; -const Card = forwardRef( +export const Card = forwardRef( ({ children, ...props }, ref) => { return ( ( ); }, ); - -export default Card; diff --git a/packages/desktop-client/src/components/common/ExternalLink.tsx b/packages/desktop-client/src/components/common/ExternalLink.tsx index f31d240c9b5..979a62a9021 100644 --- a/packages/desktop-client/src/components/common/ExternalLink.tsx +++ b/packages/desktop-client/src/components/common/ExternalLink.tsx @@ -13,7 +13,7 @@ type ExternalLinkProps = { linkColor?: keyof typeof externalLinkColors; }; -const ExternalLink = forwardRef( +export const ExternalLink = forwardRef( ({ children, to, linkColor = 'blue' }, ref) => ( // we can’t use here for obvious reasons // eslint-disable-next-line no-restricted-syntax @@ -28,5 +28,3 @@ const ExternalLink = forwardRef( ), ); - -export default ExternalLink; diff --git a/packages/desktop-client/src/components/common/FormError.tsx b/packages/desktop-client/src/components/common/FormError.tsx index 505388caf4a..fafca109ad6 100644 --- a/packages/desktop-client/src/components/common/FormError.tsx +++ b/packages/desktop-client/src/components/common/FormError.tsx @@ -9,7 +9,7 @@ type FormErrorProps = { children?: ReactNode; }; -export default function FormError({ style, children }: FormErrorProps) { +export function FormError({ style, children }: FormErrorProps) { return ( {children} ); diff --git a/packages/desktop-client/src/components/common/HoverTarget.tsx b/packages/desktop-client/src/components/common/HoverTarget.tsx index 097ad9c013d..9df85a11f82 100644 --- a/packages/desktop-client/src/components/common/HoverTarget.tsx +++ b/packages/desktop-client/src/components/common/HoverTarget.tsx @@ -12,7 +12,7 @@ type HoverTargetProps = { disabled?: boolean; }; -export default function HoverTarget({ +export function HoverTarget({ style, contentStyle, children, diff --git a/packages/desktop-client/src/components/common/InitialFocus.ts b/packages/desktop-client/src/components/common/InitialFocus.ts index 6f88cbb60f0..1e8a0cb7062 100644 --- a/packages/desktop-client/src/components/common/InitialFocus.ts +++ b/packages/desktop-client/src/components/common/InitialFocus.ts @@ -10,7 +10,7 @@ type InitialFocusProps = { children?: ReactElement | ((node: Ref) => ReactElement); }; -export default function InitialFocus({ children }: InitialFocusProps) { +export function InitialFocus({ children }: InitialFocusProps) { const node = useRef(null); useEffect(() => { diff --git a/packages/desktop-client/src/components/common/InlineField.tsx b/packages/desktop-client/src/components/common/InlineField.tsx index 0a31f198651..9328f674fdf 100644 --- a/packages/desktop-client/src/components/common/InlineField.tsx +++ b/packages/desktop-client/src/components/common/InlineField.tsx @@ -12,7 +12,7 @@ type InlineFieldProps = { style?: CSSProperties; }; -export default function InlineField({ +export function InlineField({ label, labelWidth, children, diff --git a/packages/desktop-client/src/components/common/Input.tsx b/packages/desktop-client/src/components/common/Input.tsx index 6a4e6eaf965..aab2993a3d2 100644 --- a/packages/desktop-client/src/components/common/Input.tsx +++ b/packages/desktop-client/src/components/common/Input.tsx @@ -29,7 +29,7 @@ export type InputProps = InputHTMLAttributes & { focused?: boolean; }; -export default function Input({ +export function Input({ style, inputRef, onEnter, diff --git a/packages/desktop-client/src/components/common/InputWithContent.tsx b/packages/desktop-client/src/components/common/InputWithContent.tsx index 24b357342a8..e9a65695885 100644 --- a/packages/desktop-client/src/components/common/InputWithContent.tsx +++ b/packages/desktop-client/src/components/common/InputWithContent.tsx @@ -2,7 +2,7 @@ import { useState, type ComponentProps, type ReactNode } from 'react'; import { type CSSProperties, theme } from '../../style'; -import Input, { defaultInputStyle } from './Input'; +import { Input, defaultInputStyle } from './Input'; import View from './View'; type InputWithContentProps = ComponentProps & { @@ -13,7 +13,7 @@ type InputWithContentProps = ComponentProps & { style?: CSSProperties; getStyle?: (focused: boolean) => CSSProperties; }; -export default function InputWithContent({ +export function InputWithContent({ leftContent, rightContent, inputStyle, diff --git a/packages/desktop-client/src/components/common/Label.tsx b/packages/desktop-client/src/components/common/Label.tsx index a540214a53e..09dafa4e01f 100644 --- a/packages/desktop-client/src/components/common/Label.tsx +++ b/packages/desktop-client/src/components/common/Label.tsx @@ -9,7 +9,7 @@ type LabelProps = { style?: CSSProperties; }; -export default function Label({ title, style }: LabelProps) { +export function Label({ title, style }: LabelProps) { return ( ; diff --git a/packages/desktop-client/src/components/common/LinkButton.tsx b/packages/desktop-client/src/components/common/LinkButton.tsx index e5f1ba8a1aa..daec85d6843 100644 --- a/packages/desktop-client/src/components/common/LinkButton.tsx +++ b/packages/desktop-client/src/components/common/LinkButton.tsx @@ -6,11 +6,7 @@ import { styles, theme } from '../../style'; type LinkProps = HTMLAttributes; -export default function LinkButton({ - style, - children, - ...nativeProps -}: LinkProps) { +export function LinkButton({ style, children, ...nativeProps }: LinkProps) { return (