diff --git a/packages/app/package.json b/packages/app/package.json index 39975c833f..edacf930fa 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -56,8 +56,8 @@ "styles": "workspace:*", "types": "workspace:*", "ui-buttons": "workspace:*", + "ui-core": "workspace:*", "ui-overlay": "workspace:*", - "ui-structure": "workspace:*", "usehooks-ts": "^3.0.2", "utils": "workspace:*", "viem": "^2.22.1", diff --git a/packages/app/src/Router.tsx b/packages/app/src/Router.tsx index 7c42cafefc..edf05d05ea 100644 --- a/packages/app/src/Router.tsx +++ b/packages/app/src/Router.tsx @@ -30,7 +30,7 @@ import { useLocation, } from 'react-router-dom' import { StakingApi } from 'StakingApi' -import { Body, Main } from 'ui-structure' +import { Body, Main } from 'ui-core/base' const RouterInner = () => { const { network } = useNetwork() diff --git a/packages/app/src/Themes.tsx b/packages/app/src/Themes.tsx index fe26c44f80..6517bfa19d 100644 --- a/packages/app/src/Themes.tsx +++ b/packages/app/src/Themes.tsx @@ -6,7 +6,7 @@ import { useNetwork } from 'contexts/Network' import { useTheme } from 'contexts/Themes' import { useEffect } from 'react' import { ThemeProvider } from 'styled-components' -import { Entry } from 'ui-structure' +import { Entry } from 'ui-core/base' // light / dark `mode` added to styled-components provider export const ThemedRouter = () => { diff --git a/packages/app/src/library/Help/index.tsx b/packages/app/src/library/Help/index.tsx index c6f15ef9bf..2c996cdf10 100644 --- a/packages/app/src/library/Help/index.tsx +++ b/packages/app/src/library/Help/index.tsx @@ -16,11 +16,7 @@ import { DefaultLocale } from 'locales' import { useCallback, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { ButtonPrimaryInvert } from 'ui-buttons' -import { - CanvasContainer, - CanvasScroll, - ModalContent, -} from 'ui-overlay/structure' +import { CanvasContainer, CanvasScroll, ModalContent } from 'ui-core/overlay' import { ActiveDefinition } from './Items/ActiveDefinition' import { Definition } from './Items/Definition' import { External } from './Items/External' diff --git a/packages/app/src/library/MainFooter/index.tsx b/packages/app/src/library/MainFooter/index.tsx index c741289452..47b2709a35 100644 --- a/packages/app/src/library/MainFooter/index.tsx +++ b/packages/app/src/library/MainFooter/index.tsx @@ -14,7 +14,7 @@ import { usePlugins } from 'contexts/Plugins' import { isCustomEvent } from 'controllers/utils' import { useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Footer } from 'ui-structure' +import { Footer } from 'ui-core/base' import { useEventListener } from 'usehooks-ts' import { Status } from './Status' import { TokenPrice } from './TokenPrice' diff --git a/packages/app/src/library/Modal/Title.tsx b/packages/app/src/library/Modal/Title.tsx index 05afe95461..1db06618b2 100644 --- a/packages/app/src/library/Modal/Title.tsx +++ b/packages/app/src/library/Modal/Title.tsx @@ -9,8 +9,8 @@ import { useHelp } from 'contexts/Help' import type { FunctionComponent, SVGProps } from 'react' import type { CSSProperties } from 'styled-components' import { ButtonHelp } from 'ui-buttons' +import { ModalTitle } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalTitle } from 'ui-overlay/structure' import { TitleWrapper } from './Wrappers' interface TitleProps { diff --git a/packages/app/src/library/PageWithTitle/index.tsx b/packages/app/src/library/PageWithTitle/index.tsx index a07638430d..290aca4f2a 100644 --- a/packages/app/src/library/PageWithTitle/index.tsx +++ b/packages/app/src/library/PageWithTitle/index.tsx @@ -4,7 +4,7 @@ import type { PageItem } from 'common-types' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' -import { Page } from 'ui-structure' +import { Page } from 'ui-core/base' export const PageWithTitle = ({ page }: { page: PageItem }) => { const { t } = useTranslation() diff --git a/packages/app/src/library/SideMenu/index.tsx b/packages/app/src/library/SideMenu/index.tsx index 4e7b80f9f3..52f1482c88 100644 --- a/packages/app/src/library/SideMenu/index.tsx +++ b/packages/app/src/library/SideMenu/index.tsx @@ -23,8 +23,8 @@ import { useUi } from 'contexts/UI' import type { UIContextInterface } from 'contexts/UI/types' import { useRef } from 'react' import { useTranslation } from 'react-i18next' +import { Side } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { Side } from 'ui-structure' import { Heading } from './Heading/Heading' import { Main } from './Main' import { Secondary } from './Secondary' diff --git a/packages/app/src/library/StatBoxList/index.tsx b/packages/app/src/library/StatBoxList/index.tsx index db3462b0ce..951c6e991b 100644 --- a/packages/app/src/library/StatBoxList/index.tsx +++ b/packages/app/src/library/StatBoxList/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { ReactNode } from 'react' -import { StatBoxRow } from 'ui-structure' +import { StatBoxRow } from 'ui-core/base' import { ListWrapper } from './Wrapper' export const StatBoxList = ({ children }: { children: ReactNode }) => ( diff --git a/packages/app/src/library/WithdrawPrompt/index.tsx b/packages/app/src/library/WithdrawPrompt/index.tsx index 117e1126ba..486be49f77 100644 --- a/packages/app/src/library/WithdrawPrompt/index.tsx +++ b/packages/app/src/library/WithdrawPrompt/index.tsx @@ -15,8 +15,8 @@ import { CardWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import type { BondFor } from 'types' import { ButtonPrimary } from 'ui-buttons' +import { ButtonRow, PageRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow, PageRow } from 'ui-structure' import { timeleftAsString } from 'utils' export const WithdrawPrompt = ({ bondFor }: { bondFor: BondFor }) => { diff --git a/packages/app/src/overlay/canvas/JoinPool/Header.tsx b/packages/app/src/overlay/canvas/JoinPool/Header.tsx index b2c349b3ed..b0fcebd7d5 100644 --- a/packages/app/src/overlay/canvas/JoinPool/Header.tsx +++ b/packages/app/src/overlay/canvas/JoinPool/Header.tsx @@ -12,8 +12,8 @@ import { determinePoolDisplay } from 'contexts/Pools/util' import { CanvasTitleWrapper } from 'overlay/canvas/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonPrimary, ButtonPrimaryInvert } from 'ui-buttons' +import { PageTitleTabs } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { PageTitleTabs } from 'ui-structure' import type { JoinPoolHeaderProps } from './types' export const Header = ({ diff --git a/packages/app/src/overlay/canvas/PoolMembers/Prompts/UnbondMember.tsx b/packages/app/src/overlay/canvas/PoolMembers/Prompts/UnbondMember.tsx index f8f5de20f5..fbc3f88179 100644 --- a/packages/app/src/overlay/canvas/PoolMembers/Prompts/UnbondMember.tsx +++ b/packages/app/src/overlay/canvas/PoolMembers/Prompts/UnbondMember.tsx @@ -20,7 +20,7 @@ import { SubmitTx } from 'library/SubmitTx' import { StaticNote } from 'overlay/modals/Utils/StaticNote' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-overlay/structure' +import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-core/overlay' import { planckToUnitBn, timeleftAsString } from 'utils' export const UnbondMember = ({ diff --git a/packages/app/src/overlay/canvas/PoolMembers/Prompts/WithdrawMember.tsx b/packages/app/src/overlay/canvas/PoolMembers/Prompts/WithdrawMember.tsx index 1da3c8dce9..406c190d65 100644 --- a/packages/app/src/overlay/canvas/PoolMembers/Prompts/WithdrawMember.tsx +++ b/packages/app/src/overlay/canvas/PoolMembers/Prompts/WithdrawMember.tsx @@ -19,7 +19,7 @@ import { SubmitTx } from 'library/SubmitTx' import type { RefObject } from 'react' import { useState } from 'react' import { useTranslation } from 'react-i18next' -import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-overlay/structure' +import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-core/overlay' import { planckToUnitBn } from 'utils' export const WithdrawMember = ({ diff --git a/packages/app/src/overlay/modals/Accounts/index.tsx b/packages/app/src/overlay/modals/Accounts/index.tsx index e3ee6596f5..5c681ebbe7 100644 --- a/packages/app/src/overlay/modals/Accounts/index.tsx +++ b/packages/app/src/overlay/modals/Accounts/index.tsx @@ -14,8 +14,8 @@ import { Fragment, useEffect } from 'react' import { useTranslation } from 'react-i18next' import type { MaybeAddress } from 'types' import { ButtonPrimaryInvert, ButtonText } from 'ui-buttons' +import { ModalCustomHeader, ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalCustomHeader, ModalPadding } from 'ui-overlay/structure' import { AccountButton } from './Account' import { Delegates } from './Delegates' import { AccountSeparator, AccountWrapper } from './Wrappers' diff --git a/packages/app/src/overlay/modals/BalanceTest/index.tsx b/packages/app/src/overlay/modals/BalanceTest/index.tsx index dd77f4c918..8331a401f5 100644 --- a/packages/app/src/overlay/modals/BalanceTest/index.tsx +++ b/packages/app/src/overlay/modals/BalanceTest/index.tsx @@ -9,8 +9,8 @@ import { useBatchCall } from 'hooks/useBatchCall' import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic' import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' +import { ModalPadding, ModalTitle } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle } from 'ui-overlay/structure' export const BalanceTest = () => { const { diff --git a/packages/app/src/overlay/modals/Bio/index.tsx b/packages/app/src/overlay/modals/Bio/index.tsx index b523c404fc..366dd6eda1 100644 --- a/packages/app/src/overlay/modals/Bio/index.tsx +++ b/packages/app/src/overlay/modals/Bio/index.tsx @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only import { Title } from 'library/Modal/Title' +import { ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding } from 'ui-overlay/structure' import { Wrapper } from './Wrapper' export const Bio = () => { diff --git a/packages/app/src/overlay/modals/Bond/index.tsx b/packages/app/src/overlay/modals/Bond/index.tsx index 324951a51c..41470046aa 100644 --- a/packages/app/src/overlay/modals/Bond/index.tsx +++ b/packages/app/src/overlay/modals/Bond/index.tsx @@ -18,8 +18,8 @@ import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' +import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-overlay/structure' import { planckToUnitBn } from 'utils' export const Bond = () => { diff --git a/packages/app/src/overlay/modals/ChangePoolRoles/index.tsx b/packages/app/src/overlay/modals/ChangePoolRoles/index.tsx index 1cfcfd1df0..db75e7cd60 100644 --- a/packages/app/src/overlay/modals/ChangePoolRoles/index.tsx +++ b/packages/app/src/overlay/modals/ChangePoolRoles/index.tsx @@ -9,8 +9,8 @@ import { useSubmitExtrinsic } from 'hooks/useSubmitExtrinsic' import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' import { useTranslation } from 'react-i18next' +import { ModalPadding, ModalTitle } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle } from 'ui-overlay/structure' import { RoleChange } from './RoleChange' import { Wrapper } from './Wrapper' diff --git a/packages/app/src/overlay/modals/ChooseLanguage/index.tsx b/packages/app/src/overlay/modals/ChooseLanguage/index.tsx index f70a6fdf4f..2733b55867 100644 --- a/packages/app/src/overlay/modals/ChooseLanguage/index.tsx +++ b/packages/app/src/overlay/modals/ChooseLanguage/index.tsx @@ -5,8 +5,8 @@ import LanguageSVG from 'assets/svg/language.svg?react' import { Title } from 'library/Modal/Title' import { changeLanguage, locales } from 'locales' import { useTranslation } from 'react-i18next' +import { ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding } from 'ui-overlay/structure' import { ContentWrapper, LocaleButton } from './Wrapper' export const ChooseLanguage = () => { diff --git a/packages/app/src/overlay/modals/ClaimPayouts/Forms.tsx b/packages/app/src/overlay/modals/ClaimPayouts/Forms.tsx index f5d5010d8b..c864b335df 100644 --- a/packages/app/src/overlay/modals/ClaimPayouts/Forms.tsx +++ b/packages/app/src/overlay/modals/ClaimPayouts/Forms.tsx @@ -19,8 +19,8 @@ import type { ForwardedRef } from 'react' import { forwardRef, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' import type { ActivePayout, FormProps } from './types' import { ContentWrapper } from './Wrappers' diff --git a/packages/app/src/overlay/modals/ClaimPayouts/Overview.tsx b/packages/app/src/overlay/modals/ClaimPayouts/Overview.tsx index 945cd09e10..c42fc8e6fe 100644 --- a/packages/app/src/overlay/modals/ClaimPayouts/Overview.tsx +++ b/packages/app/src/overlay/modals/ClaimPayouts/Overview.tsx @@ -6,7 +6,7 @@ import { usePayouts } from 'contexts/Payouts' import type { Ref } from 'react' import { Fragment, forwardRef } from 'react' import { useTranslation } from 'react-i18next' -import { ModalNotes, ModalPadding } from 'ui-overlay/structure' +import { ModalNotes, ModalPadding } from 'ui-core/overlay' import { Item } from './Item' import type { OverviewProps } from './types' import { ContentWrapper } from './Wrappers' diff --git a/packages/app/src/overlay/modals/ClaimPayouts/index.tsx b/packages/app/src/overlay/modals/ClaimPayouts/index.tsx index 7c01e4735e..d6ac6936f1 100644 --- a/packages/app/src/overlay/modals/ClaimPayouts/index.tsx +++ b/packages/app/src/overlay/modals/ClaimPayouts/index.tsx @@ -6,13 +6,13 @@ import { usePayouts } from 'contexts/Payouts' import { Title } from 'library/Modal/Title' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useOverlay } from 'ui-overlay' import { ModalFixedTitle, ModalMulti, ModalMultiTwo, ModalSection, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { Forms } from './Forms' import { Overview } from './Overview' import type { ActivePayout } from './types' diff --git a/packages/app/src/overlay/modals/ClaimReward/index.tsx b/packages/app/src/overlay/modals/ClaimReward/index.tsx index 95656677a0..cfce4861b0 100644 --- a/packages/app/src/overlay/modals/ClaimReward/index.tsx +++ b/packages/app/src/overlay/modals/ClaimReward/index.tsx @@ -15,8 +15,8 @@ import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' +import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-overlay/structure' export const ClaimReward = () => { const { t } = useTranslation('modals') diff --git a/packages/app/src/overlay/modals/Connect/index.tsx b/packages/app/src/overlay/modals/Connect/index.tsx index 08b84f4890..1672ab9cff 100644 --- a/packages/app/src/overlay/modals/Connect/index.tsx +++ b/packages/app/src/overlay/modals/Connect/index.tsx @@ -13,7 +13,6 @@ import { SelectItems } from 'library/SelectItems' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonPrimaryInvert, ButtonTab } from 'ui-buttons' -import { useOverlay } from 'ui-overlay' import { ModalCustomHeader, ModalFixedTitle, @@ -21,7 +20,8 @@ import { ModalMultiThree, ModalPadding, ModalSection, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { Extension } from './Extension' import { Ledger } from './Ledger' import { Proxies } from './Proxies' diff --git a/packages/app/src/overlay/modals/DiscordSupport/index.tsx b/packages/app/src/overlay/modals/DiscordSupport/index.tsx index be95d2f70c..d670dbb5bf 100644 --- a/packages/app/src/overlay/modals/DiscordSupport/index.tsx +++ b/packages/app/src/overlay/modals/DiscordSupport/index.tsx @@ -7,7 +7,7 @@ import DiscordOutlineSvg from 'assets/svg/discordOutline.svg?react' import { DiscordSupportUrl } from 'consts' import { Title } from 'library/Modal/Title' import { useTranslation } from 'react-i18next' -import { ModalPadding } from 'ui-overlay/structure' +import { ModalPadding } from 'ui-core/overlay' import { SupportWrapper } from './Wrapper' export const DiscordSupport = () => { diff --git a/packages/app/src/overlay/modals/DismissTips/index.tsx b/packages/app/src/overlay/modals/DismissTips/index.tsx index bb2dcd8805..d5cfa0adba 100644 --- a/packages/app/src/overlay/modals/DismissTips/index.tsx +++ b/packages/app/src/overlay/modals/DismissTips/index.tsx @@ -5,9 +5,9 @@ import { usePlugins } from 'contexts/Plugins' import { Title } from 'library/Modal/Title' import { useTranslation } from 'react-i18next' import { ButtonSubmit } from 'ui-buttons' +import { ButtonRow } from 'ui-core/base' +import { ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding } from 'ui-overlay/structure' -import { ButtonRow } from 'ui-structure' export const DismissTips = () => { const { t } = useTranslation('tips') diff --git a/packages/app/src/overlay/modals/LeavePool/index.tsx b/packages/app/src/overlay/modals/LeavePool/index.tsx index 07c7aa765c..5d511ed5ac 100644 --- a/packages/app/src/overlay/modals/LeavePool/index.tsx +++ b/packages/app/src/overlay/modals/LeavePool/index.tsx @@ -21,8 +21,8 @@ import { StaticNote } from 'overlay/modals/Utils/StaticNote' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' import { planckToUnitBn, timeleftAsString } from 'utils' export const LeavePool = ({ diff --git a/packages/app/src/overlay/modals/MailSupport/index.tsx b/packages/app/src/overlay/modals/MailSupport/index.tsx index dbc62da1a1..a99f78ead1 100644 --- a/packages/app/src/overlay/modals/MailSupport/index.tsx +++ b/packages/app/src/overlay/modals/MailSupport/index.tsx @@ -5,7 +5,7 @@ import MailSVG from 'assets/svg/mail.svg?react' import { MailSupportAddress } from 'consts' import { Title } from 'library/Modal/Title' import { useTranslation } from 'react-i18next' -import { ModalPadding } from 'ui-overlay/structure' +import { ModalPadding } from 'ui-core/overlay' import { SupportWrapper } from './Wrapper' export const MailSupport = () => { diff --git a/packages/app/src/overlay/modals/ManageFastUnstake/index.tsx b/packages/app/src/overlay/modals/ManageFastUnstake/index.tsx index bf947c7d44..74f5619088 100644 --- a/packages/app/src/overlay/modals/ManageFastUnstake/index.tsx +++ b/packages/app/src/overlay/modals/ManageFastUnstake/index.tsx @@ -20,13 +20,13 @@ import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useOverlay } from 'ui-overlay' import { ModalNotes, ModalPadding, ModalTitle, ModalWarnings, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { planckToUnitBn } from 'utils' export const ManageFastUnstake = () => { diff --git a/packages/app/src/overlay/modals/ManagePool/Forms/ClaimCommission/index.tsx b/packages/app/src/overlay/modals/ManagePool/Forms/ClaimCommission/index.tsx index 0a1ef2fb49..8c246e006b 100644 --- a/packages/app/src/overlay/modals/ManagePool/Forms/ClaimCommission/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/Forms/ClaimCommission/index.tsx @@ -17,8 +17,8 @@ import type { Dispatch, SetStateAction } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalNotes, ModalPadding, ModalWarnings } from 'ui-overlay/structure' import { planckToUnitBn } from 'utils' export const ClaimCommission = ({ diff --git a/packages/app/src/overlay/modals/ManagePool/Forms/ManageCommission/index.tsx b/packages/app/src/overlay/modals/ManagePool/Forms/ManageCommission/index.tsx index 15196d2cf3..223b555862 100644 --- a/packages/app/src/overlay/modals/ManagePool/Forms/ManageCommission/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/Forms/ManageCommission/index.tsx @@ -21,8 +21,8 @@ import 'rc-slider/assets/index.css' import { useEffect, useState, type Dispatch, type SetStateAction } from 'react' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' import { ChangeRate } from './ChangeRate' import { CommissionCurrent } from './CommissionCurrent' import { MaxCommission } from './MaxCommission' diff --git a/packages/app/src/overlay/modals/ManagePool/Forms/RenamePool/index.tsx b/packages/app/src/overlay/modals/ManagePool/Forms/RenamePool/index.tsx index 832f3f97da..eaa23f7c9a 100644 --- a/packages/app/src/overlay/modals/ManagePool/Forms/RenamePool/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/Forms/RenamePool/index.tsx @@ -17,8 +17,8 @@ import type { Dispatch, FormEvent, SetStateAction } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' export const RenamePool = ({ setSection, diff --git a/packages/app/src/overlay/modals/ManagePool/Forms/SetClaimPermission/index.tsx b/packages/app/src/overlay/modals/ManagePool/Forms/SetClaimPermission/index.tsx index c0648d1f06..b8c106e927 100644 --- a/packages/app/src/overlay/modals/ManagePool/Forms/SetClaimPermission/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/Forms/SetClaimPermission/index.tsx @@ -18,8 +18,8 @@ import type { Dispatch, SetStateAction } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' export const SetClaimPermission = ({ setSection, diff --git a/packages/app/src/overlay/modals/ManagePool/Forms/SetPoolState/index.tsx b/packages/app/src/overlay/modals/ManagePool/Forms/SetPoolState/index.tsx index 1a7c63efdc..7bc273af8e 100644 --- a/packages/app/src/overlay/modals/ManagePool/Forms/SetPoolState/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/Forms/SetPoolState/index.tsx @@ -16,8 +16,8 @@ import type { Dispatch, SetStateAction } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' export const SetPoolState = ({ setSection, diff --git a/packages/app/src/overlay/modals/ManagePool/index.tsx b/packages/app/src/overlay/modals/ManagePool/index.tsx index 757f984fe3..5be16c6902 100644 --- a/packages/app/src/overlay/modals/ManagePool/index.tsx +++ b/packages/app/src/overlay/modals/ManagePool/index.tsx @@ -6,14 +6,14 @@ import { useActivePool } from 'contexts/Pools/ActivePool' import { Title } from 'library/Modal/Title' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useOverlay } from 'ui-overlay' import { ModalFixedTitle, ModalMulti, ModalMultiTwo, ModalPadding, ModalSection, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { Forms } from './Forms' import { Tasks } from './Tasks' diff --git a/packages/app/src/overlay/modals/Networks/index.tsx b/packages/app/src/overlay/modals/Networks/index.tsx index 5ea145d598..1bd4d8372d 100644 --- a/packages/app/src/overlay/modals/Networks/index.tsx +++ b/packages/app/src/overlay/modals/Networks/index.tsx @@ -15,8 +15,8 @@ import { Title } from 'library/Modal/Title' import { useEffect } from 'react' import { Trans, useTranslation } from 'react-i18next' import { ButtonTertiary } from 'ui-buttons' +import { ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding } from 'ui-overlay/structure' import { ProvidersPrompt } from './ProvidersPrompt' import { BraveWarning, diff --git a/packages/app/src/overlay/modals/Settings/index.tsx b/packages/app/src/overlay/modals/Settings/index.tsx index 9fd1d6bfea..42672ffa54 100644 --- a/packages/app/src/overlay/modals/Settings/index.tsx +++ b/packages/app/src/overlay/modals/Settings/index.tsx @@ -5,7 +5,7 @@ import { usePlugins } from 'contexts/Plugins' import { Title } from 'library/Modal/Title' import { StatusButton } from 'library/StatusButton' import { useTranslation } from 'react-i18next' -import { ModalPadding } from 'ui-overlay/structure' +import { ModalPadding } from 'ui-core/overlay' import { ContentWrapper } from '../Networks/Wrapper' export const Settings = () => { diff --git a/packages/app/src/overlay/modals/StopNominations/index.tsx b/packages/app/src/overlay/modals/StopNominations/index.tsx index 9468d7dd3f..ba369fe855 100644 --- a/packages/app/src/overlay/modals/StopNominations/index.tsx +++ b/packages/app/src/overlay/modals/StopNominations/index.tsx @@ -15,8 +15,8 @@ import { Close } from 'library/Modal/Close' import { SubmitTx } from 'library/SubmitTx' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' +import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-overlay/structure' export const StopNominations = () => { const { t } = useTranslation('modals') diff --git a/packages/app/src/overlay/modals/Unbond/index.tsx b/packages/app/src/overlay/modals/Unbond/index.tsx index 5153ca5cde..da305ff2da 100644 --- a/packages/app/src/overlay/modals/Unbond/index.tsx +++ b/packages/app/src/overlay/modals/Unbond/index.tsx @@ -25,13 +25,13 @@ import { SubmitTx } from 'library/SubmitTx' import { StaticNote } from 'overlay/modals/Utils/StaticNote' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useOverlay } from 'ui-overlay' import { ModalNotes, ModalPadding, ModalTitle, ModalWarnings, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { planckToUnitBn, timeleftAsString } from 'utils' export const Unbond = () => { diff --git a/packages/app/src/overlay/modals/UnlockChunks/Forms.tsx b/packages/app/src/overlay/modals/UnlockChunks/Forms.tsx index 6fc2e9b13f..60fbc751a1 100644 --- a/packages/app/src/overlay/modals/UnlockChunks/Forms.tsx +++ b/packages/app/src/overlay/modals/UnlockChunks/Forms.tsx @@ -24,8 +24,8 @@ import { SubmitTx } from 'library/SubmitTx' import { forwardRef, useEffect, useState, type ForwardedRef } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSubmitInvert } from 'ui-buttons' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' import { planckToUnitBn } from 'utils' import type { FormsProps } from './types' import { ContentWrapper } from './Wrappers' diff --git a/packages/app/src/overlay/modals/UnlockChunks/Overview.tsx b/packages/app/src/overlay/modals/UnlockChunks/Overview.tsx index 6478111905..a60e5ebb94 100644 --- a/packages/app/src/overlay/modals/UnlockChunks/Overview.tsx +++ b/packages/app/src/overlay/modals/UnlockChunks/Overview.tsx @@ -17,7 +17,7 @@ import { forwardRef } from 'react' import { useTranslation } from 'react-i18next' import type { BondFor } from 'types' import { ButtonSubmit } from 'ui-buttons' -import { ModalNotes, ModalPadding } from 'ui-overlay/structure' +import { ModalNotes, ModalPadding } from 'ui-core/overlay' import { planckToUnitBn, timeleftAsString } from 'utils' import { Chunk } from './Chunk' import { ContentWrapper } from './Wrappers' diff --git a/packages/app/src/overlay/modals/UnlockChunks/index.tsx b/packages/app/src/overlay/modals/UnlockChunks/index.tsx index 9d45c1aab0..ddcce97b44 100644 --- a/packages/app/src/overlay/modals/UnlockChunks/index.tsx +++ b/packages/app/src/overlay/modals/UnlockChunks/index.tsx @@ -10,13 +10,13 @@ import { useActivePool } from 'contexts/Pools/ActivePool' import { Title } from 'library/Modal/Title' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { useOverlay } from 'ui-overlay' import { ModalFixedTitle, ModalMulti, ModalMultiTwo, ModalSection, -} from 'ui-overlay/structure' +} from 'ui-core/overlay' +import { useOverlay } from 'ui-overlay' import { Forms } from './Forms' import { Overview } from './Overview' diff --git a/packages/app/src/overlay/modals/Unstake/index.tsx b/packages/app/src/overlay/modals/Unstake/index.tsx index e7516c6450..27323ab42a 100644 --- a/packages/app/src/overlay/modals/Unstake/index.tsx +++ b/packages/app/src/overlay/modals/Unstake/index.tsx @@ -22,8 +22,8 @@ import { SubmitTx } from 'library/SubmitTx' import { StaticNote } from 'overlay/modals/Utils/StaticNote' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' +import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalTitle, ModalWarnings } from 'ui-overlay/structure' import { planckToUnitBn, timeleftAsString } from 'utils' export const Unstake = () => { diff --git a/packages/app/src/overlay/modals/UpdatePayee/index.tsx b/packages/app/src/overlay/modals/UpdatePayee/index.tsx index 44923563c4..e21d56ac62 100644 --- a/packages/app/src/overlay/modals/UpdatePayee/index.tsx +++ b/packages/app/src/overlay/modals/UpdatePayee/index.tsx @@ -20,8 +20,8 @@ import { SubmitTx } from 'library/SubmitTx' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import type { MaybeAddress } from 'types' +import { ModalPadding, ModalWarnings } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding, ModalWarnings } from 'ui-overlay/structure' export const UpdatePayee = () => { const { t } = useTranslation('modals') diff --git a/packages/app/src/overlay/modals/UpdateReserve/index.tsx b/packages/app/src/overlay/modals/UpdateReserve/index.tsx index 714b957b1c..01f8d9e9e6 100644 --- a/packages/app/src/overlay/modals/UpdateReserve/index.tsx +++ b/packages/app/src/overlay/modals/UpdateReserve/index.tsx @@ -19,8 +19,8 @@ import 'rc-slider/assets/index.css' import { useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonPrimaryInvert } from 'ui-buttons' +import { ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalPadding } from 'ui-overlay/structure' import { planckToUnitBn } from 'utils' export const UpdateReserve = () => { diff --git a/packages/app/src/overlay/modals/ValidatorGeo/index.tsx b/packages/app/src/overlay/modals/ValidatorGeo/index.tsx index 37811b701e..880a8284fd 100644 --- a/packages/app/src/overlay/modals/ValidatorGeo/index.tsx +++ b/packages/app/src/overlay/modals/ValidatorGeo/index.tsx @@ -20,8 +20,8 @@ import { StatusLabel } from 'library/StatusLabel' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonHelp } from 'ui-buttons' +import { ModalAddressHeader } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalAddressHeader } from 'ui-overlay/structure' export const ValidatorGeo = () => { const { t } = useTranslation('modals') diff --git a/packages/app/src/overlay/modals/ValidatorMetrics/index.tsx b/packages/app/src/overlay/modals/ValidatorMetrics/index.tsx index fc0fb8e67b..b38ba85df8 100644 --- a/packages/app/src/overlay/modals/ValidatorMetrics/index.tsx +++ b/packages/app/src/overlay/modals/ValidatorMetrics/index.tsx @@ -24,8 +24,8 @@ import { StatusLabel } from 'library/StatusLabel' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonHelp } from 'ui-buttons' +import { ModalAddressHeader, ModalPadding } from 'ui-core/overlay' import { useOverlay } from 'ui-overlay' -import { ModalAddressHeader, ModalPadding } from 'ui-overlay/structure' import { planckToUnitBn } from 'utils' export const ValidatorMetrics = () => { diff --git a/packages/app/src/pages/Community/Entity.tsx b/packages/app/src/pages/Community/Entity.tsx index ae68168f8a..84fc718070 100644 --- a/packages/app/src/pages/Community/Entity.tsx +++ b/packages/app/src/pages/Community/Entity.tsx @@ -11,7 +11,7 @@ import { ValidatorList } from 'library/ValidatorList' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonSecondary } from 'ui-buttons' -import { PageHeading, PageRow } from 'ui-structure' +import { PageHeading, PageRow } from 'ui-core/base' import { Item } from './Item' import { ItemsWrapper } from './Wrappers' import { useCommunitySections } from './context' diff --git a/packages/app/src/pages/Community/List.tsx b/packages/app/src/pages/Community/List.tsx index 0b1a74ad18..8bd43ada6e 100644 --- a/packages/app/src/pages/Community/List.tsx +++ b/packages/app/src/pages/Community/List.tsx @@ -5,7 +5,7 @@ import type { ValidatorEntry } from '@w3ux/validator-assets' import { useCommunity } from 'contexts/Community' import { useNetwork } from 'contexts/Network' import { useEffect, useState } from 'react' -import { PageRow } from 'ui-structure' +import { PageRow } from 'ui-core/base' import { Item } from './Item' import { ItemsWrapper } from './Wrappers' import { useCommunitySections } from './context' diff --git a/packages/app/src/pages/Community/index.tsx b/packages/app/src/pages/Community/index.tsx index 5a80a46f32..69ef223ccc 100644 --- a/packages/app/src/pages/Community/index.tsx +++ b/packages/app/src/pages/Community/index.tsx @@ -3,7 +3,7 @@ import type { PageProps } from 'common-types' import { useTranslation } from 'react-i18next' -import { PageTitle } from 'ui-structure' +import { PageTitle } from 'ui-core/base' import { Entity } from './Entity' import { List } from './List' import { Wrapper } from './Wrappers' diff --git a/packages/app/src/pages/Nominate/Active/CommissionPrompt.tsx b/packages/app/src/pages/Nominate/Active/CommissionPrompt.tsx index f7ccfecb37..8719bdd287 100644 --- a/packages/app/src/pages/Nominate/Active/CommissionPrompt.tsx +++ b/packages/app/src/pages/Nominate/Active/CommissionPrompt.tsx @@ -16,8 +16,8 @@ import { useSyncing } from 'hooks/useSyncing' import { CardWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonPrimary } from 'ui-buttons' +import { ButtonRow, PageRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow, PageRow } from 'ui-structure' export const CommissionPrompt = () => { const { t } = useTranslation('pages') diff --git a/packages/app/src/pages/Nominate/Active/ManageBond.tsx b/packages/app/src/pages/Nominate/Active/ManageBond.tsx index 9bdd4adb72..d94d3f78ec 100644 --- a/packages/app/src/pages/Nominate/Active/ManageBond.tsx +++ b/packages/app/src/pages/Nominate/Active/ManageBond.tsx @@ -18,8 +18,8 @@ import { BondedChart } from 'library/BarChart/BondedChart' import { CardHeaderWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonPrimary } from 'ui-buttons' +import { ButtonRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow } from 'ui-structure' import { planckToUnitBn } from 'utils' export const ManageBond = () => { diff --git a/packages/app/src/pages/Nominate/Active/Status/index.tsx b/packages/app/src/pages/Nominate/Active/Status/index.tsx index 12c6bf3ac3..e9dfcef8e3 100644 --- a/packages/app/src/pages/Nominate/Active/Status/index.tsx +++ b/packages/app/src/pages/Nominate/Active/Status/index.tsx @@ -7,7 +7,7 @@ import { usePlugins } from 'contexts/Plugins' import { useStaking } from 'contexts/Staking' import { useSyncing } from 'hooks/useSyncing' import { CardWrapper } from 'library/Card/Wrappers' -import { Separator } from 'ui-structure' +import { Separator } from 'ui-core/base' import { NewNominator } from './NewNominator' import { NominationStatus } from './NominationStatus' import { PayoutDestinationStatus } from './PayoutDestinationStatus' diff --git a/packages/app/src/pages/Nominate/Active/UnstakePrompts.tsx b/packages/app/src/pages/Nominate/Active/UnstakePrompts.tsx index 79608589f7..de039704d5 100644 --- a/packages/app/src/pages/Nominate/Active/UnstakePrompts.tsx +++ b/packages/app/src/pages/Nominate/Active/UnstakePrompts.tsx @@ -11,8 +11,8 @@ import { useUnstaking } from 'hooks/useUnstaking' import { CardWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonPrimary } from 'ui-buttons' +import { ButtonRow, PageRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow, PageRow } from 'ui-structure' export const UnstakePrompts = () => { const { t } = useTranslation('pages') diff --git a/packages/app/src/pages/Nominate/Active/index.tsx b/packages/app/src/pages/Nominate/Active/index.tsx index 411398baf8..ec76605d75 100644 --- a/packages/app/src/pages/Nominate/Active/index.tsx +++ b/packages/app/src/pages/Nominate/Active/index.tsx @@ -16,8 +16,8 @@ import { StatBoxList } from 'library/StatBoxList' import { WithdrawPrompt } from 'library/WithdrawPrompt' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonPrimary } from 'ui-buttons' +import { PageRow, RowSection } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { PageRow, RowSection } from 'ui-structure' import { CommissionPrompt } from './CommissionPrompt' import { ManageBond } from './ManageBond' import { ActiveNominators } from './Stats/ActiveNominators' diff --git a/packages/app/src/pages/Nominate/NominationGeo/NominationGeoList/index.tsx b/packages/app/src/pages/Nominate/NominationGeo/NominationGeoList/index.tsx index 53e900740e..8c7c4f842f 100644 --- a/packages/app/src/pages/Nominate/NominationGeo/NominationGeoList/index.tsx +++ b/packages/app/src/pages/Nominate/NominationGeo/NominationGeoList/index.tsx @@ -10,7 +10,7 @@ import { CardHeaderWrapper } from 'library/Card/Wrappers' import { Header, List, Wrapper as ListWrapper } from 'library/List' import { MotionContainer } from 'library/List/MotionContainer' import { ButtonHelp, ButtonPrimaryInvert } from 'ui-buttons' -import { Separator } from 'ui-structure' +import { Separator } from 'ui-core/base' import type { NomninationGeoListProps } from '../types' import { Node } from './Node' diff --git a/packages/app/src/pages/Nominate/NominationGeo/index.tsx b/packages/app/src/pages/Nominate/NominationGeo/index.tsx index 0798225d71..bf32c0c204 100644 --- a/packages/app/src/pages/Nominate/NominationGeo/index.tsx +++ b/packages/app/src/pages/Nominate/NominationGeo/index.tsx @@ -25,7 +25,7 @@ import { GraphWrapper } from 'library/Graphs/Wrapper' import { PluginLabel } from 'library/PluginLabel' import { StatusLabel } from 'library/StatusLabel' import { ButtonHelp } from 'ui-buttons' -import { PageRow } from 'ui-structure' +import { PageRow } from 'ui-core/base' import { NominationGeoList } from './NominationGeoList' import { GraphsWrapper } from './Wrappers' diff --git a/packages/app/src/pages/Nominate/index.tsx b/packages/app/src/pages/Nominate/index.tsx index b19860beb4..83db4ae79b 100644 --- a/packages/app/src/pages/Nominate/index.tsx +++ b/packages/app/src/pages/Nominate/index.tsx @@ -4,7 +4,7 @@ import { usePlugins } from 'contexts/Plugins' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { PageTitle } from 'ui-structure' +import { PageTitle } from 'ui-core/base' import { Active } from './Active' import { NominationGeo } from './NominationGeo' import { Wrapper } from './Wrappers' diff --git a/packages/app/src/pages/Overview/AccountBalance/BalanceLinks.tsx b/packages/app/src/pages/Overview/AccountBalance/BalanceLinks.tsx index 25caed6a50..25336afd77 100644 --- a/packages/app/src/pages/Overview/AccountBalance/BalanceLinks.tsx +++ b/packages/app/src/pages/Overview/AccountBalance/BalanceLinks.tsx @@ -7,7 +7,7 @@ import { useNetwork } from 'contexts/Network' import { useStaking } from 'contexts/Staking' import { useTranslation } from 'react-i18next' import { ButtonPrimaryInvert } from 'ui-buttons' -import { Separator } from 'ui-structure' +import { Separator } from 'ui-core/base' import { MoreWrapper } from '../Wrappers' export const BalanceLinks = () => { diff --git a/packages/app/src/pages/Overview/StakeStatus/index.tsx b/packages/app/src/pages/Overview/StakeStatus/index.tsx index cd8e6083b6..9f244956eb 100644 --- a/packages/app/src/pages/Overview/StakeStatus/index.tsx +++ b/packages/app/src/pages/Overview/StakeStatus/index.tsx @@ -7,7 +7,7 @@ import { useStaking } from 'contexts/Staking' import { CardWrapper } from 'library/Card/Wrappers' import { NominationStatus } from 'pages/Nominate/Active/Status/NominationStatus' import { MembershipStatus } from 'pages/Pools/Status/MembershipStatus' -import { RowSection } from 'ui-structure' +import { RowSection } from 'ui-core/base' import { Tips } from './Tips' import { StatusWrapper } from './Wrappers' diff --git a/packages/app/src/pages/Overview/index.tsx b/packages/app/src/pages/Overview/index.tsx index 7e0eefb46e..4dd22a62da 100644 --- a/packages/app/src/pages/Overview/index.tsx +++ b/packages/app/src/pages/Overview/index.tsx @@ -4,7 +4,7 @@ import { CardWrapper } from 'library/Card/Wrappers' import { StatBoxList } from 'library/StatBoxList' import { useTranslation } from 'react-i18next' -import { PageHeading, PageRow, PageTitle, RowSection } from 'ui-structure' +import { PageHeading, PageRow, PageTitle, RowSection } from 'ui-core/base' import { BalanceChart } from './AccountBalance/BalanceChart' import { BalanceLinks } from './AccountBalance/BalanceLinks' import { AccountControls } from './AccountControls' diff --git a/packages/app/src/pages/Payouts/index.tsx b/packages/app/src/pages/Payouts/index.tsx index 0b4f1591b0..c6f773754a 100644 --- a/packages/app/src/pages/Payouts/index.tsx +++ b/packages/app/src/pages/Payouts/index.tsx @@ -23,7 +23,7 @@ import type { RewardResults } from 'plugin-staking-api/types' import { useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import { ButtonHelp } from 'ui-buttons' -import { PageRow, PageTitle } from 'ui-structure' +import { PageRow, PageTitle } from 'ui-core/base' import { ActiveGraph } from './ActiveGraph' import { InactiveGraph } from './InactiveGraph' import { PayoutList } from './PayoutList' diff --git a/packages/app/src/pages/Pools/ClosurePrompts.tsx b/packages/app/src/pages/Pools/ClosurePrompts.tsx index 848d0b35f6..51ac3c266c 100644 --- a/packages/app/src/pages/Pools/ClosurePrompts.tsx +++ b/packages/app/src/pages/Pools/ClosurePrompts.tsx @@ -11,8 +11,8 @@ import { useSyncing } from 'hooks/useSyncing' import { CardWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonPrimary } from 'ui-buttons' +import { ButtonRow, PageRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow, PageRow } from 'ui-structure' export const ClosurePrompts = () => { const { t } = useTranslation('pages') diff --git a/packages/app/src/pages/Pools/Favorites/index.tsx b/packages/app/src/pages/Pools/Favorites/index.tsx index 5f584612d8..a7c2f99934 100644 --- a/packages/app/src/pages/Pools/Favorites/index.tsx +++ b/packages/app/src/pages/Pools/Favorites/index.tsx @@ -12,7 +12,7 @@ import { PoolListProvider } from 'library/PoolList/context' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import type { BondedPool } from 'types' -import { PageRow } from 'ui-structure' +import { PageRow } from 'ui-core/base' export const PoolFavorites = () => { const { t } = useTranslation('pages') diff --git a/packages/app/src/pages/Pools/ManageBond.tsx b/packages/app/src/pages/Pools/ManageBond.tsx index 621a30b23e..55f0b51203 100644 --- a/packages/app/src/pages/Pools/ManageBond.tsx +++ b/packages/app/src/pages/Pools/ManageBond.tsx @@ -15,8 +15,8 @@ import { BondedChart } from 'library/BarChart/BondedChart' import { CardHeaderWrapper } from 'library/Card/Wrappers' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonPrimary } from 'ui-buttons' +import { ButtonRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { ButtonRow } from 'ui-structure' import { planckToUnitBn } from 'utils' export const ManageBond = () => { diff --git a/packages/app/src/pages/Pools/ManagePool/index.tsx b/packages/app/src/pages/Pools/ManagePool/index.tsx index 7605a5aca3..26a6dcf5aa 100644 --- a/packages/app/src/pages/Pools/ManagePool/index.tsx +++ b/packages/app/src/pages/Pools/ManagePool/index.tsx @@ -9,8 +9,8 @@ import { CardHeaderWrapper, CardWrapper } from 'library/Card/Wrappers' import { Nominations } from 'library/Nominations' import { useTranslation } from 'react-i18next' import { ButtonHelp, ButtonPrimary } from 'ui-buttons' +import { PageRow } from 'ui-core/base' import { useOverlay } from 'ui-overlay' -import { PageRow } from 'ui-structure' export const ManagePool = () => { const { t } = useTranslation() diff --git a/packages/app/src/pages/Pools/Status/index.tsx b/packages/app/src/pages/Pools/Status/index.tsx index bd87c83c5b..47aae952c8 100644 --- a/packages/app/src/pages/Pools/Status/index.tsx +++ b/packages/app/src/pages/Pools/Status/index.tsx @@ -6,7 +6,7 @@ import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts' import { useActivePool } from 'contexts/Pools/ActivePool' import { useSyncing } from 'hooks/useSyncing' import { CardWrapper } from 'library/Card/Wrappers' -import { Separator } from 'ui-structure' +import { Separator } from 'ui-core/base' import { MembershipStatus } from './MembershipStatus' import { NewMember } from './NewMember' import { PoolStatus } from './PoolStatus' diff --git a/packages/app/src/pages/Pools/index.tsx b/packages/app/src/pages/Pools/index.tsx index 81f1208f7c..032c7f99f1 100644 --- a/packages/app/src/pages/Pools/index.tsx +++ b/packages/app/src/pages/Pools/index.tsx @@ -12,7 +12,7 @@ import { StatBoxList } from 'library/StatBoxList' import { WithdrawPrompt } from 'library/WithdrawPrompt' import { useEffect } from 'react' import { useTranslation } from 'react-i18next' -import { PageRow, PageTitle, RowSection } from 'ui-structure' +import { PageRow, PageTitle, RowSection } from 'ui-core/base' import { ClosurePrompts } from './ClosurePrompts' import { PoolFavorites } from './Favorites' import { ManageBond } from './ManageBond' diff --git a/packages/app/src/pages/Validators/AllValidators.tsx b/packages/app/src/pages/Validators/AllValidators.tsx index a290d8633c..dd92dfa8be 100644 --- a/packages/app/src/pages/Validators/AllValidators.tsx +++ b/packages/app/src/pages/Validators/AllValidators.tsx @@ -7,7 +7,7 @@ import { CardWrapper } from 'library/Card/Wrappers' import { StatBoxList } from 'library/StatBoxList' import { ValidatorList } from 'library/ValidatorList' import { useTranslation } from 'react-i18next' -import { PageRow } from 'ui-structure' +import { PageRow } from 'ui-core/base' import { ActiveValidators } from './Stats/ActiveValidators' import { AverageCommission } from './Stats/AverageCommission' import { TotalValidators } from './Stats/TotalValidators' diff --git a/packages/app/src/pages/Validators/Favorites.tsx b/packages/app/src/pages/Validators/Favorites.tsx index fd5c0f7706..d87a4c71d6 100644 --- a/packages/app/src/pages/Validators/Favorites.tsx +++ b/packages/app/src/pages/Validators/Favorites.tsx @@ -7,7 +7,7 @@ import { CardWrapper } from 'library/Card/Wrappers' import { ListStatusHeader } from 'library/List' import { ValidatorList } from 'library/ValidatorList' import { useTranslation } from 'react-i18next' -import { PageRow } from 'ui-structure' +import { PageRow } from 'ui-core/base' export const ValidatorFavorites = () => { const { t } = useTranslation('pages') diff --git a/packages/app/src/pages/Validators/index.tsx b/packages/app/src/pages/Validators/index.tsx index ab415f6b6f..cfadfff6af 100644 --- a/packages/app/src/pages/Validators/index.tsx +++ b/packages/app/src/pages/Validators/index.tsx @@ -4,7 +4,7 @@ import { useFavoriteValidators } from 'contexts/Validators/FavoriteValidators' import { useEffect } from 'react' import { useTranslation } from 'react-i18next' -import { PageTitle } from 'ui-structure' +import { PageTitle } from 'ui-core/base' import { AllValidators } from './AllValidators' import { ValidatorFavorites } from './Favorites' import { ValidatorsTabsProvider, useValidatorsTabs } from './context' diff --git a/packages/ui-structure/package.json b/packages/ui-core/package.json similarity index 65% rename from packages/ui-structure/package.json rename to packages/ui-core/package.json index 46358d5e79..41f282d33f 100644 --- a/packages/ui-structure/package.json +++ b/packages/ui-core/package.json @@ -1,14 +1,18 @@ { - "name": "ui-structure", + "name": "ui-core", "version": "1.0.0", "license": "GPL-3.0-only", "type": "module", - "main": "src/index.tsx", "scripts": { "clear": "rm -rf build tsconfig.tsbuildinfo dist", "reset": "yarn run clear && rm -rf node_modules yarn.lock && yarn" }, "dependencies": { "@fortawesome/react-fontawesome": "^0.2.2" + }, + "exports": { + "./types": "./src/types.ts", + "./base": "./src/base/index.tsx", + "./overlay": "./src/overlay/index.tsx" } } diff --git a/packages/ui-structure/src/Body/index.module.scss b/packages/ui-core/src/base/Body/index.module.scss similarity index 100% rename from packages/ui-structure/src/Body/index.module.scss rename to packages/ui-core/src/base/Body/index.module.scss diff --git a/packages/ui-structure/src/Body/index.tsx b/packages/ui-core/src/base/Body/index.tsx similarity index 100% rename from packages/ui-structure/src/Body/index.tsx rename to packages/ui-core/src/base/Body/index.tsx diff --git a/packages/ui-structure/src/ButtonRow/index.module.scss b/packages/ui-core/src/base/ButtonRow/index.module.scss similarity index 100% rename from packages/ui-structure/src/ButtonRow/index.module.scss rename to packages/ui-core/src/base/ButtonRow/index.module.scss diff --git a/packages/ui-structure/src/ButtonRow/index.tsx b/packages/ui-core/src/base/ButtonRow/index.tsx similarity index 92% rename from packages/ui-structure/src/ButtonRow/index.tsx rename to packages/ui-core/src/base/ButtonRow/index.tsx index b0056f4b48..11330ae8c8 100644 --- a/packages/ui-structure/src/ButtonRow/index.tsx +++ b/packages/ui-core/src/base/ButtonRow/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import classNames from 'classnames' -import type { RowProps } from '../types' +import type { RowProps } from '../../types' import classes from './index.module.scss' /** diff --git a/packages/ui-structure/src/Entry/index.module.scss b/packages/ui-core/src/base/Entry/index.module.scss similarity index 100% rename from packages/ui-structure/src/Entry/index.module.scss rename to packages/ui-core/src/base/Entry/index.module.scss diff --git a/packages/ui-structure/src/Entry/index.tsx b/packages/ui-core/src/base/Entry/index.tsx similarity index 100% rename from packages/ui-structure/src/Entry/index.tsx rename to packages/ui-core/src/base/Entry/index.tsx diff --git a/packages/ui-structure/src/Footer/index.module.scss b/packages/ui-core/src/base/Footer/index.module.scss similarity index 100% rename from packages/ui-structure/src/Footer/index.module.scss rename to packages/ui-core/src/base/Footer/index.module.scss diff --git a/packages/ui-structure/src/Footer/index.tsx b/packages/ui-core/src/base/Footer/index.tsx similarity index 100% rename from packages/ui-structure/src/Footer/index.tsx rename to packages/ui-core/src/base/Footer/index.tsx diff --git a/packages/ui-structure/src/Main/index.module.scss b/packages/ui-core/src/base/Main/index.module.scss similarity index 100% rename from packages/ui-structure/src/Main/index.module.scss rename to packages/ui-core/src/base/Main/index.module.scss diff --git a/packages/ui-structure/src/Main/index.tsx b/packages/ui-core/src/base/Main/index.tsx similarity index 100% rename from packages/ui-structure/src/Main/index.tsx rename to packages/ui-core/src/base/Main/index.tsx diff --git a/packages/ui-structure/src/Page/index.module.scss b/packages/ui-core/src/base/Page/index.module.scss similarity index 100% rename from packages/ui-structure/src/Page/index.module.scss rename to packages/ui-core/src/base/Page/index.module.scss diff --git a/packages/ui-structure/src/Page/index.tsx b/packages/ui-core/src/base/Page/index.tsx similarity index 100% rename from packages/ui-structure/src/Page/index.tsx rename to packages/ui-core/src/base/Page/index.tsx diff --git a/packages/ui-structure/src/PageHeading/index.module.scss b/packages/ui-core/src/base/PageHeading/index.module.scss similarity index 100% rename from packages/ui-structure/src/PageHeading/index.module.scss rename to packages/ui-core/src/base/PageHeading/index.module.scss diff --git a/packages/ui-structure/src/PageHeading/index.tsx b/packages/ui-core/src/base/PageHeading/index.tsx similarity index 100% rename from packages/ui-structure/src/PageHeading/index.tsx rename to packages/ui-core/src/base/PageHeading/index.tsx diff --git a/packages/ui-structure/src/PageRow/index.module.scss b/packages/ui-core/src/base/PageRow/index.module.scss similarity index 100% rename from packages/ui-structure/src/PageRow/index.module.scss rename to packages/ui-core/src/base/PageRow/index.module.scss diff --git a/packages/ui-structure/src/PageRow/index.tsx b/packages/ui-core/src/base/PageRow/index.tsx similarity index 93% rename from packages/ui-structure/src/PageRow/index.tsx rename to packages/ui-core/src/base/PageRow/index.tsx index b69b363d1b..c67eb08297 100644 --- a/packages/ui-structure/src/PageRow/index.tsx +++ b/packages/ui-core/src/base/PageRow/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import classNames from 'classnames' -import type { RowProps } from '../types' +import type { RowProps } from '../../types' import classes from './index.module.scss' /** diff --git a/packages/ui-structure/src/PageTitle/index.module.scss b/packages/ui-core/src/base/PageTitle/index.module.scss similarity index 100% rename from packages/ui-structure/src/PageTitle/index.module.scss rename to packages/ui-core/src/base/PageTitle/index.module.scss diff --git a/packages/ui-structure/src/PageTitle/index.tsx b/packages/ui-core/src/base/PageTitle/index.tsx similarity index 95% rename from packages/ui-structure/src/PageTitle/index.tsx rename to packages/ui-core/src/base/PageTitle/index.tsx index 9bd9238e88..24e43965eb 100644 --- a/packages/ui-structure/src/PageTitle/index.tsx +++ b/packages/ui-core/src/base/PageTitle/index.tsx @@ -5,8 +5,8 @@ import { faBars } from '@fortawesome/free-solid-svg-icons' import classNames from 'classnames' import { useEffect, useRef, useState } from 'react' import { ButtonSecondary } from 'ui-buttons' -import { PageTitleTabs } from 'ui-structure' -import type { PageTitleProps } from '../types' +import { PageTitleTabs } from 'ui-core/base' +import type { PageTitleProps } from '../../types' import classes from './index.module.scss' /** diff --git a/packages/ui-structure/src/PageTitleTabs/index.module.scss b/packages/ui-core/src/base/PageTitleTabs/index.module.scss similarity index 100% rename from packages/ui-structure/src/PageTitleTabs/index.module.scss rename to packages/ui-core/src/base/PageTitleTabs/index.module.scss diff --git a/packages/ui-structure/src/PageTitleTabs/index.tsx b/packages/ui-core/src/base/PageTitleTabs/index.tsx similarity index 95% rename from packages/ui-structure/src/PageTitleTabs/index.tsx rename to packages/ui-core/src/base/PageTitleTabs/index.tsx index 39b9f1d302..085bd4b646 100644 --- a/packages/ui-structure/src/PageTitleTabs/index.tsx +++ b/packages/ui-core/src/base/PageTitleTabs/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { ButtonTab } from 'ui-buttons' -import type { PageTitleProps, PageTitleTabProps } from '../types' +import type { PageTitleProps, PageTitleTabProps } from '../../types' import classes from './index.module.scss' /** diff --git a/packages/ui-structure/src/RowSection/index.module.scss b/packages/ui-core/src/base/RowSection/index.module.scss similarity index 100% rename from packages/ui-structure/src/RowSection/index.module.scss rename to packages/ui-core/src/base/RowSection/index.module.scss diff --git a/packages/ui-structure/src/RowSection/index.tsx b/packages/ui-core/src/base/RowSection/index.tsx similarity index 100% rename from packages/ui-structure/src/RowSection/index.tsx rename to packages/ui-core/src/base/RowSection/index.tsx diff --git a/packages/ui-structure/src/RowSection/types.ts b/packages/ui-core/src/base/RowSection/types.ts similarity index 100% rename from packages/ui-structure/src/RowSection/types.ts rename to packages/ui-core/src/base/RowSection/types.ts diff --git a/packages/ui-structure/src/Separator/index.module.scss b/packages/ui-core/src/base/Separator/index.module.scss similarity index 100% rename from packages/ui-structure/src/Separator/index.module.scss rename to packages/ui-core/src/base/Separator/index.module.scss diff --git a/packages/ui-structure/src/Separator/index.tsx b/packages/ui-core/src/base/Separator/index.tsx similarity index 100% rename from packages/ui-structure/src/Separator/index.tsx rename to packages/ui-core/src/base/Separator/index.tsx diff --git a/packages/ui-structure/src/Side/index.module.scss b/packages/ui-core/src/base/Side/index.module.scss similarity index 100% rename from packages/ui-structure/src/Side/index.module.scss rename to packages/ui-core/src/base/Side/index.module.scss diff --git a/packages/ui-structure/src/Side/index.tsx b/packages/ui-core/src/base/Side/index.tsx similarity index 100% rename from packages/ui-structure/src/Side/index.tsx rename to packages/ui-core/src/base/Side/index.tsx diff --git a/packages/ui-structure/src/Side/types.ts b/packages/ui-core/src/base/Side/types.ts similarity index 100% rename from packages/ui-structure/src/Side/types.ts rename to packages/ui-core/src/base/Side/types.ts diff --git a/packages/ui-structure/src/StatBoxRow/index.module.scss b/packages/ui-core/src/base/StatBoxRow/index.module.scss similarity index 100% rename from packages/ui-structure/src/StatBoxRow/index.module.scss rename to packages/ui-core/src/base/StatBoxRow/index.module.scss diff --git a/packages/ui-structure/src/StatBoxRow/index.tsx b/packages/ui-core/src/base/StatBoxRow/index.tsx similarity index 100% rename from packages/ui-structure/src/StatBoxRow/index.tsx rename to packages/ui-core/src/base/StatBoxRow/index.tsx diff --git a/packages/ui-structure/src/index.tsx b/packages/ui-core/src/base/index.tsx similarity index 100% rename from packages/ui-structure/src/index.tsx rename to packages/ui-core/src/base/index.tsx diff --git a/packages/ui-overlay/src/structure/CanvasContainer/index.module.scss b/packages/ui-core/src/overlay/CanvasContainer/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/CanvasContainer/index.module.scss rename to packages/ui-core/src/overlay/CanvasContainer/index.module.scss diff --git a/packages/ui-overlay/src/structure/CanvasContainer/index.tsx b/packages/ui-core/src/overlay/CanvasContainer/index.tsx similarity index 88% rename from packages/ui-overlay/src/structure/CanvasContainer/index.tsx rename to packages/ui-core/src/overlay/CanvasContainer/index.tsx index 6b058538c2..d640d4bd64 100644 --- a/packages/ui-overlay/src/structure/CanvasContainer/index.tsx +++ b/packages/ui-core/src/overlay/CanvasContainer/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import type { ModalAnimationProps } from '../../types' +import type { ModalAnimationProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/CanvasContent/index.module.scss b/packages/ui-core/src/overlay/CanvasContent/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/CanvasContent/index.module.scss rename to packages/ui-core/src/overlay/CanvasContent/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalTitle/index.tsx b/packages/ui-core/src/overlay/CanvasContent/index.tsx similarity index 59% rename from packages/ui-overlay/src/structure/ModalTitle/index.tsx rename to packages/ui-core/src/overlay/CanvasContent/index.tsx index a390d123cc..5deb89ddab 100644 --- a/packages/ui-overlay/src/structure/ModalTitle/index.tsx +++ b/packages/ui-core/src/overlay/CanvasContent/index.tsx @@ -4,6 +4,8 @@ import type { ComponentBase } from '@w3ux/types' import classes from './index.module.scss' -export const ModalTitle = ({ children }: ComponentBase) => ( -

{children}

+export const CanvasContent = ({ children, style }: ComponentBase) => ( +
+ {children} +
) diff --git a/packages/ui-overlay/src/structure/CanvasScroll/index.module.scss b/packages/ui-core/src/overlay/CanvasScroll/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/CanvasScroll/index.module.scss rename to packages/ui-core/src/overlay/CanvasScroll/index.module.scss diff --git a/packages/ui-overlay/src/structure/CanvasScroll/index.tsx b/packages/ui-core/src/overlay/CanvasScroll/index.tsx similarity index 85% rename from packages/ui-overlay/src/structure/CanvasScroll/index.tsx rename to packages/ui-core/src/overlay/CanvasScroll/index.tsx index 301433fc71..37dd1d0a32 100644 --- a/packages/ui-overlay/src/structure/CanvasScroll/index.tsx +++ b/packages/ui-core/src/overlay/CanvasScroll/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import { motion } from 'framer-motion' -import type { CanvasScrollProps } from '../../types' +import type { CanvasScrollProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' export const CanvasScroll = ({ diff --git a/packages/ui-overlay/src/structure/ModalAddressHeader/index.module.scss b/packages/ui-core/src/overlay/ModalAddressHeader/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalAddressHeader/index.module.scss rename to packages/ui-core/src/overlay/ModalAddressHeader/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalAddressHeader/index.tsx b/packages/ui-core/src/overlay/ModalAddressHeader/index.tsx similarity index 57% rename from packages/ui-overlay/src/structure/ModalAddressHeader/index.tsx rename to packages/ui-core/src/overlay/ModalAddressHeader/index.tsx index 6038ec8d94..b8b147298c 100644 --- a/packages/ui-overlay/src/structure/ModalAddressHeader/index.tsx +++ b/packages/ui-core/src/overlay/ModalAddressHeader/index.tsx @@ -4,6 +4,8 @@ import type { ComponentBase } from '@w3ux/types' import classes from './index.module.scss' -export const ModalAddressHeader = ({ children }: ComponentBase) => ( -
{children}
+export const ModalAddressHeader = ({ children, style }: ComponentBase) => ( +
+ {children} +
) diff --git a/packages/ui-overlay/src/structure/ModalCard/index.module.scss b/packages/ui-core/src/overlay/ModalCard/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalCard/index.module.scss rename to packages/ui-core/src/overlay/ModalCard/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalCard/index.tsx b/packages/ui-core/src/overlay/ModalCard/index.tsx similarity index 75% rename from packages/ui-overlay/src/structure/ModalCard/index.tsx rename to packages/ui-core/src/overlay/ModalCard/index.tsx index d46550dad1..5aeafc6515 100644 --- a/packages/ui-overlay/src/structure/ModalCard/index.tsx +++ b/packages/ui-core/src/overlay/ModalCard/index.tsx @@ -4,19 +4,19 @@ import classNames from 'classnames' import type { ForwardedRef } from 'react' import { forwardRef } from 'react' -import type { ModalCardProps } from '../../types' +import type { ModalCardProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' export const ModalCard = forwardRef( ( - { children, dimmed }: ModalCardProps, + { children, dimmed, style }: ModalCardProps, ref?: ForwardedRef ) => { const allClasses = classNames(classes.modalCard, { [classes.dimmed]: dimmed, }) return ( -
+
{children}
) diff --git a/packages/ui-overlay/src/structure/ModalContainer/index.module.scss b/packages/ui-core/src/overlay/ModalContainer/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalContainer/index.module.scss rename to packages/ui-core/src/overlay/ModalContainer/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalContainer/index.tsx b/packages/ui-core/src/overlay/ModalContainer/index.tsx similarity index 85% rename from packages/ui-overlay/src/structure/ModalContainer/index.tsx rename to packages/ui-core/src/overlay/ModalContainer/index.tsx index f1298bf086..7eb98c0169 100644 --- a/packages/ui-overlay/src/structure/ModalContainer/index.tsx +++ b/packages/ui-core/src/overlay/ModalContainer/index.tsx @@ -3,8 +3,8 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import { useOverlay } from '../../Provider' -import type { ModalAnimationProps } from '../../types' +import { useOverlay } from '../../../../ui-overlay/src/Provider' +import type { ModalAnimationProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/ModalContent/index.module.scss b/packages/ui-core/src/overlay/ModalContent/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalContent/index.module.scss rename to packages/ui-core/src/overlay/ModalContent/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalContent/index.tsx b/packages/ui-core/src/overlay/ModalContent/index.tsx similarity index 55% rename from packages/ui-overlay/src/structure/ModalContent/index.tsx rename to packages/ui-core/src/overlay/ModalContent/index.tsx index f15195a9c3..edad54a20c 100644 --- a/packages/ui-overlay/src/structure/ModalContent/index.tsx +++ b/packages/ui-core/src/overlay/ModalContent/index.tsx @@ -3,12 +3,20 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import type { ModalContentProps } from '../../types' +import type { ModalContentProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' -export const ModalContent = ({ children, canvas }: ModalContentProps) => { +export const ModalContent = ({ + children, + canvas, + style, +}: ModalContentProps) => { const allClasses = classNames(classes.modalContent, { [classes.canvas]: canvas, }) - return {children} + return ( + + {children} + + ) } diff --git a/packages/ui-overlay/src/structure/ModalCustomHeader/index.module.scss b/packages/ui-core/src/overlay/ModalCustomHeader/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalCustomHeader/index.module.scss rename to packages/ui-core/src/overlay/ModalCustomHeader/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalCustomHeader/index.tsx b/packages/ui-core/src/overlay/ModalCustomHeader/index.tsx similarity index 100% rename from packages/ui-overlay/src/structure/ModalCustomHeader/index.tsx rename to packages/ui-core/src/overlay/ModalCustomHeader/index.tsx diff --git a/packages/ui-overlay/src/structure/ModalFixedTitle/index.module.scss b/packages/ui-core/src/overlay/ModalFixedTitle/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalFixedTitle/index.module.scss rename to packages/ui-core/src/overlay/ModalFixedTitle/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalFixedTitle/index.tsx b/packages/ui-core/src/overlay/ModalFixedTitle/index.tsx similarity index 90% rename from packages/ui-overlay/src/structure/ModalFixedTitle/index.tsx rename to packages/ui-core/src/overlay/ModalFixedTitle/index.tsx index da27c3aa16..42c67806ed 100644 --- a/packages/ui-overlay/src/structure/ModalFixedTitle/index.tsx +++ b/packages/ui-core/src/overlay/ModalFixedTitle/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import type { ForwardedRef } from 'react' import { forwardRef } from 'react' -import type { ModalFixedTitleProps } from '../../types' +import type { ModalFixedTitleProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' export const ModalFixedTitle = forwardRef( diff --git a/packages/ui-overlay/src/structure/ModalMulti/index.module.scss b/packages/ui-core/src/overlay/ModalMulti/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalMulti/index.module.scss rename to packages/ui-core/src/overlay/ModalMulti/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalMulti/index.tsx b/packages/ui-core/src/overlay/ModalMulti/index.tsx similarity index 70% rename from packages/ui-overlay/src/structure/ModalMulti/index.tsx rename to packages/ui-core/src/overlay/ModalMulti/index.tsx index 72e7891154..9fdc432111 100644 --- a/packages/ui-overlay/src/structure/ModalMulti/index.tsx +++ b/packages/ui-core/src/overlay/ModalMulti/index.tsx @@ -7,7 +7,11 @@ import { motion } from 'framer-motion' import commonClasses from '../common.module.scss' import classes from './index.module.scss' -export const ModalMulti = ({ children }: ComponentBase) => { +export const ModalMulti = ({ children, style }: ComponentBase) => { const allClasses = classNames(commonClasses.scrollBar, classes.multi) - return {children} + return ( + + {children} + + ) } diff --git a/packages/ui-overlay/src/structure/ModalMultiThree/index.module.scss b/packages/ui-core/src/overlay/ModalMultiThree/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalMultiThree/index.module.scss rename to packages/ui-core/src/overlay/ModalMultiThree/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalMultiThree/index.tsx b/packages/ui-core/src/overlay/ModalMultiThree/index.tsx similarity index 87% rename from packages/ui-overlay/src/structure/ModalMultiThree/index.tsx rename to packages/ui-core/src/overlay/ModalMultiThree/index.tsx index 66e744f1f5..e3d613fd95 100644 --- a/packages/ui-overlay/src/structure/ModalMultiThree/index.tsx +++ b/packages/ui-core/src/overlay/ModalMultiThree/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import type { ModalAnimationProps } from '../../types' +import type { ModalAnimationProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/ModalMultiTwo/index.module.scss b/packages/ui-core/src/overlay/ModalMultiTwo/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalMultiTwo/index.module.scss rename to packages/ui-core/src/overlay/ModalMultiTwo/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalMultiTwo/index.tsx b/packages/ui-core/src/overlay/ModalMultiTwo/index.tsx similarity index 87% rename from packages/ui-overlay/src/structure/ModalMultiTwo/index.tsx rename to packages/ui-core/src/overlay/ModalMultiTwo/index.tsx index 1d41e030a9..ae214ae7fb 100644 --- a/packages/ui-overlay/src/structure/ModalMultiTwo/index.tsx +++ b/packages/ui-core/src/overlay/ModalMultiTwo/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import type { ModalAnimationProps } from '../../types' +import type { ModalAnimationProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/ModalNotes/index.module.scss b/packages/ui-core/src/overlay/ModalNotes/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalNotes/index.module.scss rename to packages/ui-core/src/overlay/ModalNotes/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalNotes/index.tsx b/packages/ui-core/src/overlay/ModalNotes/index.tsx similarity index 54% rename from packages/ui-overlay/src/structure/ModalNotes/index.tsx rename to packages/ui-core/src/overlay/ModalNotes/index.tsx index bdb673351b..4abce333ab 100644 --- a/packages/ui-overlay/src/structure/ModalNotes/index.tsx +++ b/packages/ui-core/src/overlay/ModalNotes/index.tsx @@ -2,12 +2,20 @@ // SPDX-License-Identifier: GPL-3.0-only import classNames from 'classnames' -import type { ModalNotesProps } from '../../types' +import type { ModalNotesProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' -export const ModalNotes = ({ children, withPadding }: ModalNotesProps) => { +export const ModalNotes = ({ + children, + style, + withPadding, +}: ModalNotesProps) => { const allClasses = classNames(classes.modalNotes, { [classes.withPadding]: withPadding, }) - return
{children}
+ return ( +
+ {children} +
+ ) } diff --git a/packages/ui-overlay/src/structure/ModalPadding/index.module.scss b/packages/ui-core/src/overlay/ModalPadding/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalPadding/index.module.scss rename to packages/ui-core/src/overlay/ModalPadding/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalPadding/index.tsx b/packages/ui-core/src/overlay/ModalPadding/index.tsx similarity index 91% rename from packages/ui-overlay/src/structure/ModalPadding/index.tsx rename to packages/ui-core/src/overlay/ModalPadding/index.tsx index 4566080ea6..2c927cf30a 100644 --- a/packages/ui-overlay/src/structure/ModalPadding/index.tsx +++ b/packages/ui-core/src/overlay/ModalPadding/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import type { ForwardedRef } from 'react' import { forwardRef } from 'react' -import type { ModalPaddingProps } from '../../types' +import type { ModalPaddingProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' export const ModalPadding = forwardRef( diff --git a/packages/ui-overlay/src/structure/ModalScroll/index.module.scss b/packages/ui-core/src/overlay/ModalScroll/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalScroll/index.module.scss rename to packages/ui-core/src/overlay/ModalScroll/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalScroll/index.tsx b/packages/ui-core/src/overlay/ModalScroll/index.tsx similarity index 91% rename from packages/ui-overlay/src/structure/ModalScroll/index.tsx rename to packages/ui-core/src/overlay/ModalScroll/index.tsx index e8a48373b2..b0075137aa 100644 --- a/packages/ui-overlay/src/structure/ModalScroll/index.tsx +++ b/packages/ui-core/src/overlay/ModalScroll/index.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames' import type { ForwardedRef } from 'react' import { forwardRef } from 'react' -import type { ModalScrollProps } from '../../types' +import type { ModalScrollProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/ModalSection/index.module.scss b/packages/ui-core/src/overlay/ModalSection/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalSection/index.module.scss rename to packages/ui-core/src/overlay/ModalSection/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalSection/index.tsx b/packages/ui-core/src/overlay/ModalSection/index.tsx similarity index 87% rename from packages/ui-overlay/src/structure/ModalSection/index.tsx rename to packages/ui-core/src/overlay/ModalSection/index.tsx index 489ae9c8cc..89795691f3 100644 --- a/packages/ui-overlay/src/structure/ModalSection/index.tsx +++ b/packages/ui-core/src/overlay/ModalSection/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import classNames from 'classnames' -import type { ModalSectionProps } from '../../types' +import type { ModalSectionProps } from '../../../../ui-overlay/src/types' import classes from './index.module.scss' export const ModalSection = ({ children, style, type }: ModalSectionProps) => { diff --git a/packages/ui-overlay/src/structure/ModalTitle/index.module.scss b/packages/ui-core/src/overlay/ModalTitle/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalTitle/index.module.scss rename to packages/ui-core/src/overlay/ModalTitle/index.module.scss diff --git a/packages/ui-overlay/src/structure/CanvasContent/index.tsx b/packages/ui-core/src/overlay/ModalTitle/index.tsx similarity index 59% rename from packages/ui-overlay/src/structure/CanvasContent/index.tsx rename to packages/ui-core/src/overlay/ModalTitle/index.tsx index 413fc8828d..ef0fe95495 100644 --- a/packages/ui-overlay/src/structure/CanvasContent/index.tsx +++ b/packages/ui-core/src/overlay/ModalTitle/index.tsx @@ -4,6 +4,8 @@ import type { ComponentBase } from '@w3ux/types' import classes from './index.module.scss' -export const CanvasContent = ({ children }: ComponentBase) => ( -
{children}
+export const ModalTitle = ({ children, style }: ComponentBase) => ( +

+ {children} +

) diff --git a/packages/ui-overlay/src/structure/ModalWarnings/index.module.scss b/packages/ui-core/src/overlay/ModalWarnings/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/ModalWarnings/index.module.scss rename to packages/ui-core/src/overlay/ModalWarnings/index.module.scss diff --git a/packages/ui-overlay/src/structure/ModalWarnings/index.tsx b/packages/ui-core/src/overlay/ModalWarnings/index.tsx similarity index 100% rename from packages/ui-overlay/src/structure/ModalWarnings/index.tsx rename to packages/ui-core/src/overlay/ModalWarnings/index.tsx diff --git a/packages/ui-overlay/src/structure/OverlayBackground/index.module.scss b/packages/ui-core/src/overlay/OverlayBackground/index.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/OverlayBackground/index.module.scss rename to packages/ui-core/src/overlay/OverlayBackground/index.module.scss diff --git a/packages/ui-overlay/src/structure/OverlayBackground/index.tsx b/packages/ui-core/src/overlay/OverlayBackground/index.tsx similarity index 90% rename from packages/ui-overlay/src/structure/OverlayBackground/index.tsx rename to packages/ui-core/src/overlay/OverlayBackground/index.tsx index 150e563773..17ad94fd8e 100644 --- a/packages/ui-overlay/src/structure/OverlayBackground/index.tsx +++ b/packages/ui-core/src/overlay/OverlayBackground/index.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames' import { motion } from 'framer-motion' -import type { ModalOverlayProps } from '../../types' +import type { ModalOverlayProps } from '../../../../ui-overlay/src/types' import commonClasses from '../common.module.scss' import classes from './index.module.scss' diff --git a/packages/ui-overlay/src/structure/common.module.scss b/packages/ui-core/src/overlay/common.module.scss similarity index 100% rename from packages/ui-overlay/src/structure/common.module.scss rename to packages/ui-core/src/overlay/common.module.scss diff --git a/packages/ui-overlay/src/structure/index.tsx b/packages/ui-core/src/overlay/index.tsx similarity index 100% rename from packages/ui-overlay/src/structure/index.tsx rename to packages/ui-core/src/overlay/index.tsx diff --git a/packages/ui-structure/src/types.ts b/packages/ui-core/src/types.ts similarity index 100% rename from packages/ui-structure/src/types.ts rename to packages/ui-core/src/types.ts diff --git a/packages/ui-structure/tsconfig.json b/packages/ui-core/tsconfig.json similarity index 100% rename from packages/ui-structure/tsconfig.json rename to packages/ui-core/tsconfig.json diff --git a/packages/ui-overlay/package.json b/packages/ui-overlay/package.json index 4da72b21bf..6796d1b01a 100644 --- a/packages/ui-overlay/package.json +++ b/packages/ui-overlay/package.json @@ -7,10 +7,12 @@ "clear": "rm -rf build tsconfig.tsbuildinfo dist", "reset": "yarn run clear && rm -rf node_modules yarn.lock && yarn" }, + "dependencies": { + "ui-core": "workspace:*" + }, "exports": { ".": "./src/index.tsx", "./types": "./src/types.ts", - "./structure": "./src/structure/index.tsx", "./css": "./src/index.scss" } } diff --git a/packages/ui-overlay/src/Background.tsx b/packages/ui-overlay/src/Background.tsx index ec739b4356..5987def407 100644 --- a/packages/ui-overlay/src/Background.tsx +++ b/packages/ui-overlay/src/Background.tsx @@ -3,9 +3,9 @@ import { useAnimation } from 'framer-motion' import { useEffect } from 'react' +import { OverlayBackground } from '../../ui-core/src/overlay/OverlayBackground' import { useOverlay } from './Provider' import type { CanvasStatus } from './Provider/types' -import { OverlayBackground } from './structure/OverlayBackground' export const Background = ({ externalOverlayStatus, diff --git a/packages/ui-overlay/src/Canvas.tsx b/packages/ui-overlay/src/Canvas.tsx index 3944756897..6a9b3631e4 100644 --- a/packages/ui-overlay/src/Canvas.tsx +++ b/packages/ui-overlay/src/Canvas.tsx @@ -5,12 +5,12 @@ import { useAnimation } from 'framer-motion' import type { FC } from 'react' import { useEffect } from 'react' import { ErrorBoundary } from 'react-error-boundary' +import { CanvasContainer } from '../../ui-core/src/overlay/CanvasContainer' +import { CanvasContent } from '../../ui-core/src/overlay/CanvasContent' +import { CanvasScroll } from '../../ui-core/src/overlay/CanvasScroll' +import { ModalContent } from '../../ui-core/src/overlay/ModalContent' import { useOverlay } from './Provider' import type { CanvasProps } from './Provider/types' -import { CanvasContainer } from './structure/CanvasContainer' -import { CanvasContent } from './structure/CanvasContent' -import { CanvasScroll } from './structure/CanvasScroll' -import { ModalContent } from './structure/ModalContent' export const Canvas = ({ canvas, diff --git a/packages/ui-overlay/src/Modal.tsx b/packages/ui-overlay/src/Modal.tsx index f348ca1d05..c4e0585737 100644 --- a/packages/ui-overlay/src/Modal.tsx +++ b/packages/ui-overlay/src/Modal.tsx @@ -5,11 +5,11 @@ import { useAnimation } from 'framer-motion' import type { FC } from 'react' import { useEffect, useRef } from 'react' import { ErrorBoundary } from 'react-error-boundary' +import { ModalCard } from '../../ui-core/src/overlay/ModalCard' +import { ModalContainer } from '../../ui-core/src/overlay/ModalContainer' +import { ModalScroll } from '../../ui-core/src/overlay/ModalScroll' import { useOverlay } from './Provider' import type { ModalProps } from './Provider/types' -import { ModalCard } from './structure/ModalCard' -import { ModalContainer } from './structure/ModalContainer' -import { ModalScroll } from './structure/ModalScroll' export const Modal = ({ modals, diff --git a/release-please-config.json b/release-please-config.json index 83d8243a5d..fc3212cf99 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -10,6 +10,6 @@ "packages/plugin-staking-api": {}, "packages/types": {}, "packages/ui-buttons": {}, - "packages/ui-structure": {} + "packages/ui-core": {} } } diff --git a/yarn.lock b/yarn.lock index 665d8bc037..2d4be8d220 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5020,8 +5020,8 @@ __metadata: styles: "workspace:*" types: "workspace:*" ui-buttons: "workspace:*" + ui-core: "workspace:*" ui-overlay: "workspace:*" - ui-structure: "workspace:*" usehooks-ts: "npm:^3.0.2" utils: "workspace:*" viem: "npm:^2.22.1" @@ -11922,17 +11922,19 @@ __metadata: languageName: unknown linkType: soft -"ui-overlay@workspace:*, ui-overlay@workspace:packages/ui-overlay": +"ui-core@workspace:*, ui-core@workspace:packages/ui-core": version: 0.0.0-use.local - resolution: "ui-overlay@workspace:packages/ui-overlay" + resolution: "ui-core@workspace:packages/ui-core" + dependencies: + "@fortawesome/react-fontawesome": "npm:^0.2.2" languageName: unknown linkType: soft -"ui-structure@workspace:*, ui-structure@workspace:packages/ui-structure": +"ui-overlay@workspace:*, ui-overlay@workspace:packages/ui-overlay": version: 0.0.0-use.local - resolution: "ui-structure@workspace:packages/ui-structure" + resolution: "ui-overlay@workspace:packages/ui-overlay" dependencies: - "@fortawesome/react-fontawesome": "npm:^0.2.2" + ui-core: "workspace:*" languageName: unknown linkType: soft