From cad623b09f0646c6142c1bfecd39615caa3d3b6a Mon Sep 17 00:00:00 2001 From: artemis prime Date: Sun, 7 Jan 2024 12:29:41 -0800 Subject: [PATCH] app styled (initial view) --- app/components/BridgeMenu/Menu.tsx | 12 +- app/components/BridgeMenu/index.tsx | 8 +- .../Campaigns/Details/Leaderboard.tsx | 30 +-- app/components/Campaigns/Details/Rewards.tsx | 16 +- app/components/Campaigns/Details/index.tsx | 2 +- app/components/Campaigns/index.tsx | 8 +- app/components/ConnectNetwork.tsx | 4 +- app/components/ConnectedWallets.tsx | 22 +- .../FeeDetails/Campaign.tsx | 2 +- .../FeeDetails/DetailedEstimates.tsx | 6 +- .../FeeDetails/ReceiveAmounts.tsx | 70 ++++--- .../DisclosureComponents/FeeDetails/index.tsx | 4 +- app/components/ErrorFallback.tsx | 4 +- app/components/Input/Address.tsx | 36 ++-- app/components/Input/Amount.tsx | 82 ++++---- app/components/Input/CurrencyFormField.tsx | 107 +++++----- app/components/Input/EnhancedAmount.tsx | 198 +++++++++--------- app/components/Input/NetworkFormField.tsx | 2 +- app/components/Input/NumericInput.tsx | 176 ++++++++-------- app/components/LoadingCard.tsx | 4 +- app/components/MessageComponent.tsx | 4 +- app/components/NoCookies.tsx | 10 +- app/components/OptionToggle.tsx | 8 +- app/components/ReserveGasNote.tsx | 4 +- app/components/Sceletons.tsx | 32 +-- .../Select/Command/commandSelect.tsx | 2 +- .../Select/Popover/PopoverSelect.tsx | 26 +-- .../Select/Popover/PopoverSelectWrapper.tsx | 6 +- app/components/Select/Shared/SelectItem.tsx | 2 +- app/components/SendEmail.tsx | 30 +-- app/components/Swap/Form/Form.tsx | 190 +++++++++-------- app/components/Swap/Form/index.tsx | 12 +- app/components/Swap/NotFound.tsx | 2 +- app/components/Swap/Step.tsx | 6 +- app/components/Swap/Summary/Summary.tsx | 20 +- .../Swap/Withdraw/Coinbase/Authorize.tsx | 10 +- .../Swap/Withdraw/Coinbase/Coinbase2FA.tsx | 10 +- .../Withdraw/Coinbase/ConnectGuideScreens.tsx | 10 +- .../Swap/Withdraw/Coinbase/index.tsx | 4 +- app/components/Swap/Withdraw/External.tsx | 6 +- app/components/Swap/Withdraw/Failed.tsx | 14 +- app/components/Swap/Withdraw/FiatTransfer.tsx | 2 +- .../Swap/Withdraw/ManualTransfer.tsx | 20 +- .../Swap/Withdraw/Processing/Processing.tsx | 18 +- app/components/Swap/Withdraw/Success.tsx | 2 +- .../Wallet/ImtblxWalletWithdrawStep.tsx | 2 +- .../Wallet/StarknetWalletWithdraw.tsx | 6 +- .../WalletTransfer/TransferNativeToken.tsx | 6 +- .../Wallet/WalletTransfer/buttons.tsx | 2 +- .../Wallet/WalletTransfer/message.tsx | 12 +- .../Withdraw/Wallet/ZKsyncWalletWithdraw.tsx | 2 +- app/components/Swap/Withdraw/Wallet/index.tsx | 2 +- app/components/Swap/Withdraw/index.tsx | 12 +- app/components/Swap/index.tsx | 8 +- app/components/SwapGuide.tsx | 16 +- .../SwapHistory/SwapDetailsComponent.tsx | 26 +-- app/components/SwapHistory/index.tsx | 24 +-- app/components/Tabs/Header.tsx | 6 +- app/components/Tooltips/ClickTooltip.tsx | 2 +- app/components/VerifyEmailCode.tsx | 20 +- app/components/WarningMessage.tsx | 12 +- app/components/Widget/Footer.tsx | 6 +- app/components/Wizard/Wizard.tsx | 4 +- app/components/backgroundField.tsx | 17 +- app/components/banner.tsx | 4 +- app/components/buttons/connectButton.tsx | 10 +- app/components/buttons/iconButton.tsx | 2 +- app/components/buttons/secondaryButton.tsx | 82 ++++---- app/components/buttons/submitButton.tsx | 53 +++-- app/components/buttons/toggleButton.tsx | 4 +- app/components/cardContainer.tsx | 4 +- app/components/gasDetails.tsx | 10 +- app/components/globalFooter.tsx | 6 +- app/components/guestCard.tsx | 2 +- app/components/maintanance/maintanance.tsx | 10 +- app/components/sendFeedback.tsx | 6 +- app/components/shadcn/command.tsx | 12 +- app/components/shadcn/dialog._tsx_ | 8 +- app/components/shadcn/popover.tsx | 2 +- app/components/shadcn/select.tsx | 6 +- app/components/shadcn/tooltip.tsx | 2 +- app/components/swapComponent.tsx | 2 +- app/components/utils/GoHome.tsx | 2 +- app/next.config.js | 8 +- app/pages/404.tsx | 4 +- app/pages/nocookies.tsx | 2 +- app/pages/salon.tsx | 4 +- app/styles/globals.css | 6 +- shared-ui/style/colors.tailwind.js | 2 + 89 files changed, 876 insertions(+), 805 deletions(-) diff --git a/app/components/BridgeMenu/Menu.tsx b/app/components/BridgeMenu/Menu.tsx index 6eaca8c3..fabd59d9 100644 --- a/app/components/BridgeMenu/Menu.tsx +++ b/app/components/BridgeMenu/Menu.tsx @@ -15,7 +15,7 @@ const Menu = ({ const Group = ({ children }: PropsWithChildren) => { return (
-
+
{children}
@@ -26,11 +26,11 @@ const Item = (function Item({ children, pathname, onClick, icon, target = '_self return ( pathname ? - +
{icon}
-

{children}

+

{children}

{ target === '_self' ? @@ -42,12 +42,12 @@ const Item = (function Item({ children, pathname, onClick, icon, target = '_self ) @@ -70,7 +70,7 @@ type MenuIemProps = { const Footer = ({ children }: PropsWithChildren) => { return ( -
+
{children}
) diff --git a/app/components/BridgeMenu/index.tsx b/app/components/BridgeMenu/index.tsx index 407b914c..c7ababff 100644 --- a/app/components/BridgeMenu/index.tsx +++ b/app/components/BridgeMenu/index.tsx @@ -99,7 +99,7 @@ export default function BridgeMenu() { } return <> - + { <> @@ -186,12 +186,12 @@ export default function BridgeMenu() {

-

Media links & suggestions:

+

Media links & suggestions:

{navigation.social.map(({name, Icon, href, className}, index) => ( - +

{name}

@@ -207,7 +207,7 @@ export default function BridgeMenu() { userType == UserType.AuthenticatedUser ?
diff --git a/app/components/Campaigns/Details/Leaderboard.tsx b/app/components/Campaigns/Details/Leaderboard.tsx index d98d3ead..c1d3ddf3 100644 --- a/app/components/Campaigns/Details/Leaderboard.tsx +++ b/app/components/Campaigns/Details/Leaderboard.tsx @@ -60,24 +60,24 @@ const Component: FC = ({ campaign }) => { Top 10
} -

Users who earn the most throughout the program will be featured here.

-
+

Users who earn the most throughout the program will be featured here.

+
{leaderboard?.leaderboard?.length > 0 ?
{ leaderboard?.leaderboard?.filter(u => u.position < 4).map(user => (
-

{user.position}.

+

{user.position}.

-
+
{user?.address && network?.account_explorer_template && {user?.position === rewards?.user_reward?.position ? You : shortenAddress(user?.address)} }
-

{truncateDecimals(user.amount, campaignAsset?.precision)} {campaign?.asset}

+

{truncateDecimals(user.amount, campaignAsset?.precision)} {campaign?.asset}

@@ -99,7 +99,7 @@ const Component: FC = ({ campaign }) => { {leaderboardRewards[user.position - 1]} {campaign?.asset}

}> -
+
@@ -112,21 +112,21 @@ const Component: FC = ({ campaign }) => { { position >= 4 && address && rewards?.user_reward &&
4 ? "!mt-0 !pt-0" : ""}> - {position > 4 && < div className="text-2xl text-center leading-3 text-secondary-text my-3"> + {position > 4 && < div className="text-2xl text-center leading-3 text-foreground text-foreground-new my-3"> ...
}
-

{position}.

+

{position}.

-
+
{network?.account_explorer_template && You }
-

{truncateDecimals(rewards.user_reward.total_amount, campaignAsset?.precision)} {campaign?.asset}

+

{truncateDecimals(rewards.user_reward.total_amount, campaignAsset?.precision)} {campaign?.asset}

@@ -142,23 +142,23 @@ const Component: FC = ({ campaign }) => {
-
+
{ leaderboard?.leaderboard?.map(user => (
-

{user.position}.

+

{user.position}.

-
+
{user?.address && network?.account_explorer_template && {user.position === rewards?.user_reward?.position ? You : shortenAddress(user.address)} }
-

{truncateDecimals(user.amount, campaignAsset?.precision)} {campaign?.asset}

+

{truncateDecimals(user.amount, campaignAsset?.precision)} {campaign?.asset}

@@ -182,7 +182,7 @@ const Component: FC = ({ campaign }) => {

}> -
+
diff --git a/app/components/Campaigns/Details/Rewards.tsx b/app/components/Campaigns/Details/Rewards.tsx index 61a773af..86451d10 100644 --- a/app/components/Campaigns/Details/Rewards.tsx +++ b/app/components/Campaigns/Details/Rewards.tsx @@ -55,17 +55,17 @@ const Rewards: FC = ({ campaign }) => { return <>
-

+

Onboarding incentives that are earned by transferring to {network?.display_name} Learn more

-
+
{!campaignIsEnded && Pending Earnings  Next Airdrop} withoutBorder>
@@ -116,7 +116,7 @@ const Rewards: FC = ({ campaign }) => {
-
+

{campaign?.asset} pool @@ -127,7 +127,7 @@ const Rewards: FC = ({ campaign }) => {

-
{campaign?.distributed_amount.toFixed(0)} / {totalBudget} {campaign?.asset}
+
{campaign?.distributed_amount.toFixed(0)} / {totalBudget} {campaign?.asset}
@@ -136,11 +136,11 @@ const Rewards: FC = ({ campaign }) => { payouts.length > 0 &&

Payouts

-
+
- + {payouts.map((payout) => ( - diff --git a/app/components/Campaigns/Details/index.tsx b/app/components/Campaigns/Details/index.tsx index 1ad518f0..94ff647e 100644 --- a/app/components/Campaigns/Details/index.tsx +++ b/app/components/Campaigns/Details/index.tsx @@ -94,7 +94,7 @@ type BriefInformationProps = { network?: CryptoNetwork } const BriefInformation: FC = ({ campaign, network }) => -

+

You can earn $ {campaign?.asset}  tokens by transferring assets to  diff --git a/app/components/Campaigns/index.tsx b/app/components/Campaigns/index.tsx index f157b0df..62a9e162 100644 --- a/app/components/Campaigns/index.tsx +++ b/app/components/Campaigns/index.tsx @@ -25,10 +25,10 @@ const Rewards = () => { {!isLoading ? -

+

Campaigns

-
+
{ activeCampaigns.length > 0 ? @@ -52,7 +52,7 @@ const Rewards = () => { inactiveCampaigns.length > 0 &&

Old campaigns

-
+
{inactiveCampaigns.map(c => = ({ campaign, layers, resolveImgSrc }) => { campaignIsActive && - + {campaignDaysLeft} days left } diff --git a/app/components/ConnectNetwork.tsx b/app/components/ConnectNetwork.tsx index 44df28c0..2fe513e2 100644 --- a/app/components/ConnectNetwork.tsx +++ b/app/components/ConnectNetwork.tsx @@ -13,13 +13,13 @@ const ConnectNetwork: FC = ({ NetworkDisplayName, AppURL }) => { return (
-

+

{NetworkDisplayName} account with the provided address does not exist. To create one, go to {NetworkDisplayName} and connect your wallet.

-
+
window.open(AppURL, '_blank')}> Connect diff --git a/app/components/ConnectedWallets.tsx b/app/components/ConnectedWallets.tsx index 588e8aee..f9bbdfb0 100644 --- a/app/components/ConnectedWallets.tsx +++ b/app/components/ConnectedWallets.tsx @@ -25,7 +25,7 @@ export const WalletsHeader = () => { if (wallets.length > 0) { return ( <> - @@ -35,7 +35,7 @@ export const WalletsHeader = () => { return ( -
+
@@ -50,15 +50,15 @@ const WalletsIcons = ({ wallets }: { wallets: Wallet[] }) => {
{ firstWallet?.connector && - + } { secondWallet?.connector && - + } { wallets.length > 2 && -
+
+{wallets.length - 2}
} @@ -73,14 +73,14 @@ export const WalletsMenu = () => { if (wallets.length > 0) { return ( <> -
@@ -152,7 +152,7 @@ const ConnectedWalletsDialog = ({ openDialog, setOpenDialog }: { openDialog: boo
setOpenDialog(false)}> -
+
Link a new wallet diff --git a/app/components/DisclosureComponents/FeeDetails/Campaign.tsx b/app/components/DisclosureComponents/FeeDetails/Campaign.tsx index a2616080..d9e05672 100644 --- a/app/components/DisclosureComponents/FeeDetails/Campaign.tsx +++ b/app/components/DisclosureComponents/FeeDetails/Campaign.tsx @@ -62,7 +62,7 @@ const CampaignDisplay: FC = ({ campaign, fee, selected_cur y: "-100%", transition: { duration: 0.4, ease: [0.36, 0.66, 0.04, 1] }, }} - className='w-full flex items-center justify-between rounded-b-lg bg-secondary-700 relative bottom-2 z-0 pt-4 pb-2 px-3.5 text-right'> + className='w-full flex items-center justify-between rounded-b-lg bg-level-3 darker-2-class relative bottom-2 z-0 pt-4 pb-2 px-3.5 text-right'>

Est. {campaignAsset?.asset} Reward

The amount of onboarding reward that you’ll earn. Learn more} /> diff --git a/app/components/DisclosureComponents/FeeDetails/DetailedEstimates.tsx b/app/components/DisclosureComponents/FeeDetails/DetailedEstimates.tsx index 3f130205..2793e1a4 100644 --- a/app/components/DisclosureComponents/FeeDetails/DetailedEstimates.tsx +++ b/app/components/DisclosureComponents/FeeDetails/DetailedEstimates.tsx @@ -27,7 +27,7 @@ const DetailedEstimates: FC = ({ return <>
-
Tx Id @@ -156,7 +156,7 @@ const Rewards: FC = ({ campaign }) => {
+ {shortenAddress(payout.transaction_id)} {payout.amount}
@@ -101,7 +101,7 @@ export const SwapHistoryComponentSceleton = () => {
@@ -114,7 +114,7 @@ export const SwapHistoryComponentSceleton = () => {
@@ -124,7 +124,7 @@ export const SwapHistoryComponentSceleton = () => {
@@ -134,7 +134,7 @@ export const SwapHistoryComponentSceleton = () => {