Commit 661d2b6a authored by eddie's avatar eddie Committed by GitHub

feat: add zIndex to widget theme (#5915)

* feat: create feature flag for swap widget

* feat: add new flag to modal

* fix: missing defaultField usage

* feat: add zIndex to widget theme
parent c560b943
import { Theme } from '@uniswap/widgets' import { Theme } from '@uniswap/widgets'
import { darkTheme, lightTheme } from 'theme/colors' import { darkTheme, lightTheme } from 'theme/colors'
import { Z_INDEX } from 'theme/zIndex'
const zIndex = {
modal: Z_INDEX.modal,
}
const fonts = { const fonts = {
fontFamily: 'Inter custom', fontFamily: 'Inter custom',
...@@ -31,6 +36,7 @@ export const LIGHT_THEME: Theme = { ...@@ -31,6 +36,7 @@ export const LIGHT_THEME: Theme = {
error: lightTheme.accentCritical, error: lightTheme.accentCritical,
...fonts, ...fonts,
zIndex,
} }
export const DARK_THEME: Theme = { export const DARK_THEME: Theme = {
...@@ -58,4 +64,5 @@ export const DARK_THEME: Theme = { ...@@ -58,4 +64,5 @@ export const DARK_THEME: Theme = {
error: darkTheme.accentCritical, error: darkTheme.accentCritical,
...fonts, ...fonts,
zIndex,
} }
...@@ -469,12 +469,45 @@ export enum NftRarityProvider { ...@@ -469,12 +469,45 @@ export enum NftRarityProvider {
RaritySniper = 'RARITY_SNIPER' RaritySniper = 'RARITY_SNIPER'
} }
export type NftRouteResponse = {
__typename?: 'NftRouteResponse';
calldata: Scalars['String'];
id: Scalars['ID'];
route?: Maybe<Array<NftTrade>>;
sendAmount: TokenAmount;
toAddress: Scalars['String'];
};
export enum NftStandard { export enum NftStandard {
Erc721 = 'ERC721', Erc721 = 'ERC721',
Erc1155 = 'ERC1155', Erc1155 = 'ERC1155',
Noncompliant = 'NONCOMPLIANT' Noncompliant = 'NONCOMPLIANT'
} }
export type NftTrade = {
__typename?: 'NftTrade';
amount: Scalars['Int'];
contractAddress: Scalars['String'];
id: Scalars['ID'];
marketplace: NftMarketplace;
/** price represents the current price of the NFT, which can be different from quotePrice */
price: TokenAmount;
/** quotePrice represents the last quoted price of the NFT */
quotePrice?: Maybe<TokenAmount>;
tokenId: Scalars['String'];
tokenType: NftStandard;
};
export type NftTradeInput = {
amount: Scalars['Int'];
contractAddress: Scalars['String'];
id: Scalars['ID'];
marketplace: NftMarketplace;
quotePrice?: InputMaybe<TokenAmountInput>;
tokenId: Scalars['String'];
tokenType: NftStandard;
};
export type NftTransfer = { export type NftTransfer = {
__typename?: 'NftTransfer'; __typename?: 'NftTransfer';
asset: NftAsset; asset: NftAsset;
...@@ -505,6 +538,22 @@ export type PageInfo = { ...@@ -505,6 +538,22 @@ export type PageInfo = {
startCursor?: Maybe<Scalars['String']>; startCursor?: Maybe<Scalars['String']>;
}; };
/** v2 pool parameters as defined by https://github.com/Uniswap/v2-sdk/blob/main/src/entities/pair.ts */
export type PairInput = {
tokenAmountA: TokenAmountInput;
tokenAmountB: TokenAmountInput;
};
/** v3 pool parameters as defined by https://github.com/Uniswap/v3-sdk/blob/main/src/entities/pool.ts */
export type PoolInput = {
fee: Scalars['Int'];
liquidity: Scalars['String'];
sqrtRatioX96: Scalars['String'];
tickCurrent: Scalars['String'];
tokenA: TokenInput;
tokenB: TokenInput;
};
export type Portfolio = { export type Portfolio = {
__typename?: 'Portfolio'; __typename?: 'Portfolio';
assetActivities?: Maybe<Array<Maybe<AssetActivity>>>; assetActivities?: Maybe<Array<Maybe<AssetActivity>>>;
...@@ -535,6 +584,7 @@ export type Query = { ...@@ -535,6 +584,7 @@ export type Query = {
nftBalances?: Maybe<NftBalanceConnection>; nftBalances?: Maybe<NftBalanceConnection>;
nftCollections?: Maybe<NftCollectionConnection>; nftCollections?: Maybe<NftCollectionConnection>;
nftCollectionsById?: Maybe<Array<Maybe<NftCollection>>>; nftCollectionsById?: Maybe<Array<Maybe<NftCollection>>>;
nftRoute?: Maybe<NftRouteResponse>;
portfolios?: Maybe<Array<Maybe<Portfolio>>>; portfolios?: Maybe<Array<Maybe<Portfolio>>>;
searchTokenProjects?: Maybe<Array<Maybe<TokenProject>>>; searchTokenProjects?: Maybe<Array<Maybe<TokenProject>>>;
searchTokens?: Maybe<Array<Maybe<Token>>>; searchTokens?: Maybe<Array<Maybe<Token>>>;
...@@ -590,6 +640,14 @@ export type QueryNftCollectionsByIdArgs = { ...@@ -590,6 +640,14 @@ export type QueryNftCollectionsByIdArgs = {
}; };
export type QueryNftRouteArgs = {
chain?: InputMaybe<Chain>;
nftTrades: Array<NftTradeInput>;
senderAddress: Scalars['String'];
tokenTrades?: InputMaybe<Array<TokenTradeInput>>;
};
export type QueryPortfoliosArgs = { export type QueryPortfoliosArgs = {
ownerAddresses: Array<Scalars['String']>; ownerAddresses: Array<Scalars['String']>;
useAltDataSource?: InputMaybe<Scalars['Boolean']>; useAltDataSource?: InputMaybe<Scalars['Boolean']>;
...@@ -662,6 +720,18 @@ export type TokenMarketArgs = { ...@@ -662,6 +720,18 @@ export type TokenMarketArgs = {
currency?: InputMaybe<Currency>; currency?: InputMaybe<Currency>;
}; };
export type TokenAmount = {
__typename?: 'TokenAmount';
currency: Currency;
id: Scalars['ID'];
value: Scalars['String'];
};
export type TokenAmountInput = {
amount: Scalars['String'];
token: TokenInput;
};
export type TokenApproval = { export type TokenApproval = {
__typename?: 'TokenApproval'; __typename?: 'TokenApproval';
approvedAddress: Scalars['String']; approvedAddress: Scalars['String'];
...@@ -684,6 +754,13 @@ export type TokenBalance = { ...@@ -684,6 +754,13 @@ export type TokenBalance = {
tokenProjectMarket?: Maybe<TokenProjectMarket>; tokenProjectMarket?: Maybe<TokenProjectMarket>;
}; };
export type TokenInput = {
address: Scalars['String'];
chainId: Scalars['Int'];
decimals: Scalars['Int'];
isNative: Scalars['Boolean'];
};
export type TokenMarket = { export type TokenMarket = {
__typename?: 'TokenMarket'; __typename?: 'TokenMarket';
id: Scalars['ID']; id: Scalars['ID'];
...@@ -789,6 +866,30 @@ export enum TokenStandard { ...@@ -789,6 +866,30 @@ export enum TokenStandard {
Native = 'NATIVE' Native = 'NATIVE'
} }
export type TokenTradeInput = {
routes?: InputMaybe<TokenTradeRoutesInput>;
slippageToleranceBasisPoints?: InputMaybe<Scalars['Int']>;
tokenAmount: TokenAmountInput;
};
export type TokenTradeRouteInput = {
inputAmount: TokenAmountInput;
outputAmount: TokenAmountInput;
pools: Array<TradePoolInput>;
};
export type TokenTradeRoutesInput = {
mixedRoutes?: InputMaybe<Array<TokenTradeRouteInput>>;
tradeType: TokenTradeType;
v2Routes?: InputMaybe<Array<TokenTradeRouteInput>>;
v3Routes?: InputMaybe<Array<TokenTradeRouteInput>>;
};
export enum TokenTradeType {
ExactInput = 'EXACT_INPUT',
ExactOutput = 'EXACT_OUTPUT'
}
export type TokenTransfer = { export type TokenTransfer = {
__typename?: 'TokenTransfer'; __typename?: 'TokenTransfer';
asset: Token; asset: Token;
...@@ -801,6 +902,11 @@ export type TokenTransfer = { ...@@ -801,6 +902,11 @@ export type TokenTransfer = {
transactedValue?: Maybe<Amount>; transactedValue?: Maybe<Amount>;
}; };
export type TradePoolInput = {
pair?: InputMaybe<PairInput>;
pool?: InputMaybe<PoolInput>;
};
export type Transaction = { export type Transaction = {
__typename?: 'Transaction'; __typename?: 'Transaction';
blockNumber: Scalars['Int']; blockNumber: Scalars['Int'];
......
...@@ -5194,10 +5194,10 @@ ...@@ -5194,10 +5194,10 @@
"@uniswap/v3-core" "1.0.0" "@uniswap/v3-core" "1.0.0"
"@uniswap/v3-periphery" "^1.0.1" "@uniswap/v3-periphery" "^1.0.1"
"@uniswap/widgets@^2.26.0": "@uniswap/widgets@^2.27.0":
version "2.26.0" version "2.27.0"
resolved "https://registry.yarnpkg.com/@uniswap/widgets/-/widgets-2.26.0.tgz#ed2d2b0965fc2139874a5eaca44c8070184d9e74" resolved "https://registry.yarnpkg.com/@uniswap/widgets/-/widgets-2.27.0.tgz#debd946e6ff736a501a98321a2b8f98d7b055f22"
integrity sha512-LIfd3wgJxNiPXduyxXAihOzye5LrayyPDt0/OErSr1hF3BIiQqdVc3KyHDFJ4PC0pCp4+dfE2HPH1FrClO54Uw== integrity sha512-CHOoIORI0nYWN29s0ZrjGRVPiOWGy3hy8ZFhKM+CSz+mDNPWnlVssmDNBYhzM+tl2g/PcJpR49ggY+QWPlyDEQ==
dependencies: dependencies:
"@babel/runtime" ">=7.17.0" "@babel/runtime" ">=7.17.0"
"@fontsource/ibm-plex-mono" "^4.5.1" "@fontsource/ibm-plex-mono" "^4.5.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment