From 00a3dd801da5c63da9e5010e5fd920d2ffd1f249 Mon Sep 17 00:00:00 2001 From: Joel Jeremy Marquez Date: Fri, 22 Dec 2023 13:13:51 -0800 Subject: [PATCH 1/4] ESLint no default exports - part 3 --- .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/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/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 +- 115 files changed, 177 insertions(+), 168 deletions(-) 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 (