@ape.swap/bonds-sdk 4.5.0-test.12 → 4.5.0-test.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChainId, Token } from '@ape.swap/apeswap-lists';
|
|
3
|
-
declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, }: {
|
|
2
|
+
import { ChainId, MarketingCampaign, Token } from '@ape.swap/apeswap-lists';
|
|
3
|
+
declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled, marketingCampaign, }: {
|
|
4
4
|
typedValue: string;
|
|
5
5
|
setTypedValue: (value: React.SetStateAction<string>) => void;
|
|
6
6
|
selectedToken?: "NATIVE" | Token;
|
|
@@ -12,5 +12,6 @@ declare const TokenSelectorPanel: ({ typedValue, setTypedValue, selectedToken, b
|
|
|
12
12
|
selectedTokenPrice?: number;
|
|
13
13
|
bondPrincipalToken?: Token;
|
|
14
14
|
inputDisabled?: boolean;
|
|
15
|
+
marketingCampaign?: MarketingCampaign;
|
|
15
16
|
}) => React.JSX.Element;
|
|
16
17
|
export default TokenSelectorPanel;
|
package/dist/main.js
CHANGED
|
@@ -67651,61 +67651,52 @@ const AddFavToken = ({ tokenSymbol, hotBond }) => {
|
|
|
67651
67651
|
}, children: jsx$2(AnimatePresence, { mode: "wait", children: jsx$2(motion.div, { initial: false, animate: { opacity: 1, scale: 1.0 }, exit: { opacity: 0, scale: 0.8 }, transition: { duration: 0.2 }, style: { display: 'flex' }, children: isFavToken ? (jsx$2(Svg, { icon: "StarFilled", width: 22, height: 22, color: '#DE62F3' })) : (jsx$2(Svg, { icon: hotBond ? 'FirePink' : 'Star', width: hotBond ? 25 : 20, height: hotBond ? 25 : 20, color: '#73728E' })) }, isFavToken ? 'StarFilled' : 'Star') }) }));
|
|
67652
67652
|
};
|
|
67653
67653
|
|
|
67654
|
-
// Styles of the row in the bonds list. In other words "/bonds" page.
|
|
67655
|
-
const bondRowCampaignStyles = {
|
|
67656
|
-
[main.MarketingCampaign.Christmas2025]: {
|
|
67657
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fire.png)',
|
|
67658
|
-
backgroundSize: 'cover',
|
|
67659
|
-
},
|
|
67660
|
-
};
|
|
67661
67654
|
// Styles of the tag component.
|
|
67662
|
-
const
|
|
67655
|
+
const MCTagStyles = {
|
|
67663
67656
|
[main.MarketingCampaign.Christmas2025]: {
|
|
67664
|
-
background: '#
|
|
67657
|
+
background: '#DF4141',
|
|
67665
67658
|
color: '#fff',
|
|
67666
67659
|
},
|
|
67667
67660
|
};
|
|
67668
|
-
|
|
67661
|
+
// Styles of the buy bond modal.
|
|
67662
|
+
const MCBuyComponentStyles = {
|
|
67669
67663
|
[main.MarketingCampaign.Christmas2025]: {
|
|
67670
|
-
|
|
67671
|
-
|
|
67672
|
-
|
|
67673
|
-
zIndex: 1,
|
|
67674
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/fireTag.png)',
|
|
67675
|
-
backgroundSize: 'contain',
|
|
67676
|
-
backgroundRepeat: 'no-repeat',
|
|
67677
|
-
backgroundPosition: 'center',
|
|
67678
|
-
width: '50px',
|
|
67679
|
-
height: '35px',
|
|
67680
|
-
marginRight: '4px',
|
|
67681
|
-
top: '50%',
|
|
67682
|
-
transform: 'translateY(-50%)',
|
|
67664
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-buy.png)',
|
|
67665
|
+
backgroundSize: 'cover',
|
|
67666
|
+
opacity: 1,
|
|
67683
67667
|
},
|
|
67684
67668
|
};
|
|
67685
|
-
|
|
67686
|
-
const buyComponentStyles = {
|
|
67669
|
+
const MCBondRowStyles = {
|
|
67687
67670
|
[main.MarketingCampaign.Christmas2025]: {
|
|
67688
|
-
backgroundImage: 'url(https://
|
|
67671
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-row.png)',
|
|
67689
67672
|
backgroundSize: 'cover',
|
|
67673
|
+
opacity: 1,
|
|
67674
|
+
},
|
|
67675
|
+
};
|
|
67676
|
+
const MCColorMapping = {
|
|
67677
|
+
white3: {
|
|
67678
|
+
[main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
|
|
67679
|
+
},
|
|
67680
|
+
white4: {
|
|
67681
|
+
[main.MarketingCampaign.Christmas2025]: '#348C9E33 !important',
|
|
67690
67682
|
},
|
|
67691
67683
|
};
|
|
67692
67684
|
// Styles of the token image displayed in the buy bond modal.
|
|
67693
|
-
const
|
|
67685
|
+
const MCTokenIconStyles = {
|
|
67694
67686
|
[main.MarketingCampaign.Christmas2025]: {
|
|
67695
|
-
|
|
67696
|
-
top: '
|
|
67697
|
-
left: '
|
|
67698
|
-
|
|
67699
|
-
|
|
67700
|
-
|
|
67701
|
-
|
|
67702
|
-
backgroundImage: 'url(https://www.ape.bond/images/hotSummerCampaign/littleFire.png)',
|
|
67687
|
+
position: 'absolute',
|
|
67688
|
+
top: '-25px',
|
|
67689
|
+
left: '18%',
|
|
67690
|
+
width: '100%',
|
|
67691
|
+
height: '50px',
|
|
67692
|
+
zIndex: 10,
|
|
67693
|
+
backgroundImage: 'url(https://ape.bond/images/mc/christmas-hat.png)',
|
|
67703
67694
|
backgroundRepeat: 'no-repeat',
|
|
67704
67695
|
backgroundSize: 'contain',
|
|
67705
67696
|
backgroundPosition: 'center',
|
|
67706
67697
|
},
|
|
67707
67698
|
};
|
|
67708
|
-
const
|
|
67699
|
+
const MCTagNameMapping = {
|
|
67709
67700
|
[main.MarketingCampaign.Christmas2025]: 'Christmas Sale',
|
|
67710
67701
|
};
|
|
67711
67702
|
|
|
@@ -67745,13 +67736,13 @@ const TokenInfoAndName = ({ tokenSymbol, chain, tag, vestEnds, isHotBond, market
|
|
|
67745
67736
|
} }), jsx$2(Flex, { className: "tokeninfoname chain", children: jsx$2(Svg, { width: 20, height: 20, icon: chain ? NETWORK_ICONS[chain] : 'question' }) }), jsxs(Flex, { className: "tokeninfoname tokencontainer", sx: {
|
|
67746
67737
|
marginTop: vestEnds ? ['10px', '10px', '10px', '0px'] : 0,
|
|
67747
67738
|
maxWidth: ['175px', '175px', '140px', '190px', '190px'],
|
|
67748
|
-
}, children: [jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
|
|
67739
|
+
}, children: [jsxs(Flex, { sx: { position: 'relative', minWidth: '33px' }, children: [jsx$2(Flex, { sx: MCTokenIconStyles[marketingCampaign] }), jsx$2(TokenImage, { symbol: tokenSymbol === 'AIX' && chain === main.ChainId.SOL ? 'SOLAIX' : tokenSymbol, size: 33 })] }), jsxs(Flex, { className: "tokeninfoname tokentext", children: [jsx$2(Flex, { sx: { justifyContent: 'space-between', width: '100%', alignItems: 'center' }, children: jsx$2(Text, { sx: { fontSize: ['12px', '12px', '14px', '16px'] }, children: tokenSymbol }) }), vestEnds && (jsx$2(Flex, { sx: { fontSize: '12px', fontWeight: 400, opacity: 0.6, lineHeight: '14px' }, children: vestEnds }))] }), jsx$2(Flex, { className: "tokeninfofav", sx: {
|
|
67749
67740
|
minWidth: '25px',
|
|
67750
67741
|
p: '5px',
|
|
67751
67742
|
}, children: jsx$2(AddFavToken, { tokenSymbol: tokenSymbol, hotBond: !vestEnds && isHotBond }) })] }), jsx$2(Flex, { sx: {
|
|
67752
67743
|
justifyContent: isHotBond ? 'center' : 'flex-start',
|
|
67753
67744
|
alignItems: 'center',
|
|
67754
|
-
}, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: (tag || marketingCampaign) && (jsx$2(ListTag, { text:
|
|
67745
|
+
}, children: jsx$2(Flex, { sx: { display: isHotBond ? 'flex' : ['none', 'none', 'none', 'none', 'flex'] }, children: (tag || marketingCampaign) && (jsx$2(ListTag, { text: MCTagNameMapping[marketingCampaign] || tag, marketingCampaign: marketingCampaign })) }) })] }));
|
|
67755
67746
|
};
|
|
67756
67747
|
|
|
67757
67748
|
//TODO: remove this shit
|
|
@@ -77154,7 +77145,7 @@ const TokenSelectorModal = ({ bondPrincipalToken, handleCurrencySelect, chainId,
|
|
|
77154
77145
|
}) })] }) }) }));
|
|
77155
77146
|
};
|
|
77156
77147
|
|
|
77157
|
-
const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, }) => {
|
|
77148
|
+
const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChainId, handleValueBtn, handleCurrencySelect, enableZap, tokenBalance, selectedTokenPrice, bondPrincipalToken, inputDisabled = false, marketingCampaign, }) => {
|
|
77158
77149
|
var _a, _b;
|
|
77159
77150
|
const { address: account } = useEVMAccount();
|
|
77160
77151
|
const { publicKey: solanaAccount } = useSOLAccount();
|
|
@@ -77165,7 +77156,7 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
|
|
|
77165
77156
|
setTypedValue(event.target.value);
|
|
77166
77157
|
};
|
|
77167
77158
|
const [onTokenSelectorModal] = useModal(jsx$2(TokenSelectorModal, { bondPrincipalToken: bondPrincipalToken, handleCurrencySelect: handleCurrencySelect, chainId: bondChainId }), true, false, `tokenSelectorOnLiquidityModal${(_b = bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.address) === null || _b === void 0 ? void 0 : _b[bondChainId]}-${bondPrincipalToken === null || bondPrincipalToken === void 0 ? void 0 : bondPrincipalToken.symbol}`);
|
|
77168
|
-
return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal',
|
|
77159
|
+
return (jsxs(Flex$1, { className: "token-selector-panel", sx: { borderRadius: 'normal', background: MCColorMapping.white3[marketingCampaign] }, children: [jsxs(Flex$1, { className: "input-container inputrow", children: [jsx$2(Flex$1, { className: "input-container input", children: jsx$2(Input$1, { placeholder: "0.0", value: typedValue, pattern: "^[0-9]*[.,]?[0-9]*$", onChange: handleInputChange, onInput: (v) => {
|
|
77169
77160
|
if (v.currentTarget.value.includes(',')) {
|
|
77170
77161
|
v.currentTarget.value = v.currentTarget.value.replace(/,/g, '.');
|
|
77171
77162
|
}
|
|
@@ -77179,7 +77170,11 @@ const TokenSelectorPanel = ({ typedValue, setTypedValue, selectedToken, bondChai
|
|
|
77179
77170
|
!!v.currentTarget.value && isNumber$1(v.currentTarget.value) && parseFloat(v.currentTarget.value) >= 0
|
|
77180
77171
|
? v.currentTarget.value
|
|
77181
77172
|
: v.currentTarget.value.slice(0, v.currentTarget.value.length - 1);
|
|
77182
|
-
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: {
|
|
77173
|
+
}, disabled: inputDisabled }) }), jsxs(Flex$1, { className: "input-container token", onClick: () => (enableZap ? onTokenSelectorModal() : null), sx: {
|
|
77174
|
+
cursor: enableZap ? 'pointer' : 'default',
|
|
77175
|
+
borderRadius: 'normal',
|
|
77176
|
+
background: MCColorMapping.white4[marketingCampaign],
|
|
77177
|
+
}, children: [jsxs(Flex$1, { sx: { alignItems: 'center', gap: '10px' }, children: [jsx$2(Flex$1, { className: "input-container bondicon", children: lodashExports.isArray(splited) ? (jsx$2(TokenImage, { symbol: splited[0], symbol2: splited[1], size: 28, chain: bondChainId })) : (jsx$2(TokenImage, { symbol: getSymbol(selectedToken, bondChainId), size: 28, chain: bondChainId })) }), jsx$2(Flex$1, { className: "title-container tokenname", children: getSymbol(selectedToken, bondChainId) })] }), enableZap && (jsx$2(Flex$1, { sx: { mr: '8px' }, children: jsx$2(Svg, { icon: "caret" }) }))] })] }), jsxs(Flex$1, { className: "input-container balancerow", children: [jsx$2(Flex$1, { sx: { opacity: 0.6 }, children: selectedTokenPrice && typedValue
|
|
77183
77178
|
? `$${formatUSDNumber((selectedTokenPrice * parseFloat(typedValue)).toFixed(2))}`
|
|
77184
77179
|
: '' }), jsxs(Flex$1, { children: [showBalance && jsxs(Flex$1, { className: "balancerow text", children: ["Balance: ", tokenBalanceString] }), jsx$2(Flex$1, { className: "balancerow max", children: showBalance && tokenBalance && tokenBalance !== '0' && handleValueBtn && (jsx$2(Fragment$1, { children: jsx$2(Button, { className: "max-button", onClick: () => { var _a; return handleValueBtn((_a = new BigNumber$1(tokenBalance !== null && tokenBalance !== void 0 ? tokenBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, children: "Max" }) })) })] })] })] }));
|
|
77185
77180
|
};
|
|
@@ -78818,7 +78813,7 @@ const BondModalHeader = ({ bondData, onDismiss, showProjectInfoButton, }) => {
|
|
|
78818
78813
|
height: '30px',
|
|
78819
78814
|
mb: ['10px', '10px', '10px', '0px'],
|
|
78820
78815
|
justifyContent: ['space-between', 'space-between', 'space-between', 'flex-end'],
|
|
78821
|
-
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx:
|
|
78816
|
+
}, children: [jsx$2(Flex, { sx: { display: ['flex', 'flex', 'flex', 'none'] }, children: jsx$2(BondModalMinTierHeader, { minTier: minTier }) }), jsx$2(Flex, { sx: { cursor: 'pointer' }, children: onDismiss ? (jsxs(Fragment$1, { children: [showProjectInfoButton && jsx$2(ExpandedViewButton, { handleNavigation: handleProjectViewNavigation }), jsx$2(Flex, { sx: { mx: '25px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) }), jsx$2(Flex, { onClick: handleClose, children: jsx$2(Svg, { icon: "close", color: "text", width: isMobile ? '12px' : '18px' }) })] })) : (jsx$2(Flex, { sx: { py: '3px', mt: '10px' }, onClick: onOpenSlippageModal, children: jsx$2(Svg, { icon: "cog", width: isMobile ? '16px' : '20px' }) })) })] }), jsxs(Flex, { sx: { width: '100%' }, children: [jsxs(Flex, { className: "title-container bondicon", children: [jsx$2(Flex, { sx: MCTokenIconStyles[bondData.marketingCampaign] }), jsx$2(TokenImage, { symbol: (_b = bondData.showcaseTokenName) !== null && _b !== void 0 ? _b : bondData.earnToken.symbol, size: 50, chain: bondData.chainId })] }), jsxs(Flex, { sx: {
|
|
78822
78817
|
display: 'flex',
|
|
78823
78818
|
flexDirection: 'column',
|
|
78824
78819
|
pl: ['10px', '10px', '10px', '20px'],
|
|
@@ -78953,6 +78948,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78953
78948
|
borderBottomRightRadius: 'normal',
|
|
78954
78949
|
borderBottomLeftRadius: 'normal',
|
|
78955
78950
|
},
|
|
78951
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78956
78952
|
}, children: [jsxs(Flex, { className: "bond-card-title", children: [SDKConfig.namingPreference, jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Discount }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(BonusComponent, { trueBondPrices: SDKConfig.namingPreference !== 'Discount' ? bondData.trueBondPrices : undefined, minTier: bondData.minTier, tooltipPosition: isMobile ? 'bottomRight' : 'bottomLeft', bonus: SDKConfig.namingPreference === 'Discount' ? `${(_a = bondData === null || bondData === void 0 ? void 0 : bondData.discountWithFee) === null || _a === void 0 ? void 0 : _a.toFixed(2)}%` : undefined })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78957
78953
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78958
78954
|
'&:first-of-type': {
|
|
@@ -78963,6 +78959,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78963
78959
|
borderBottomRightRadius: 'normal',
|
|
78964
78960
|
borderBottomLeftRadius: 'normal',
|
|
78965
78961
|
},
|
|
78962
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78966
78963
|
}, children: [jsxs("div", { className: "bond-card-title", children: ["Terms", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.Terms }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs("div", { className: "bond-card-content", children: [getVestingTermsString(bondData), bondData.vestingCliff && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: getVestingTermsTooltipString(bondData) }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78967
78964
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78968
78965
|
'&:first-of-type': {
|
|
@@ -78973,6 +78970,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78973
78970
|
borderBottomRightRadius: 'normal',
|
|
78974
78971
|
borderBottomLeftRadius: 'normal',
|
|
78975
78972
|
},
|
|
78973
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78976
78974
|
}, children: [jsxs("div", { className: "bond-card-title", children: ["Max Buy", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.MaxBuy((_b = bondData === null || bondData === void 0 ? void 0 : bondData.earnToken) === null || _b === void 0 ? void 0 : _b.symbol) }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsxs(Flex, { className: "bond-card-content", sx: { alignItems: 'center' }, children: [jsx$2("div", { style: { paddingRight: '3px' }, children: jsx$2(TokenImage, { symbol: (_c = bondData.showcaseTokenName) !== null && _c !== void 0 ? _c : bondData.earnToken.symbol, size: 22, chain: bondData.chainId }) }), formatNumberSI(maxBuy(bondData, SDKConfig.showLowValueBonds).toFixed(0), 2)] })] }), jsxs("div", { className: "bond-card-block", sx: {
|
|
78977
78975
|
borderRadius: ['0px', '0px', '0px', 'normal'],
|
|
78978
78976
|
'&:first-of-type': {
|
|
@@ -78983,6 +78981,7 @@ const BondCards = ({ bondData }) => {
|
|
|
78983
78981
|
borderBottomRightRadius: 'normal',
|
|
78984
78982
|
borderBottomLeftRadius: 'normal',
|
|
78985
78983
|
},
|
|
78984
|
+
background: MCColorMapping.white3[bondData.marketingCampaign],
|
|
78986
78985
|
}, children: [jsxs(Flex, { className: "bond-card-title", children: ["Tokens Remaining", jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: TooltipText.TokensRemaining }), width: "230px", placement: "bottomLeft", transformTip: "translate(-5%, -5%)", children: jsx$2("div", { className: "bond-card-tooltip", children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) })] }), jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: remainingPercentage(bondData) }), style: {
|
|
78987
78986
|
width: '127px',
|
|
78988
78987
|
height: '25px',
|
|
@@ -79655,7 +79654,7 @@ const BuyComponent = ({ onDismiss, bondAddress, bondChain, handlePurchasedBond,
|
|
|
79655
79654
|
}
|
|
79656
79655
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
79657
79656
|
}, [rateChanged]);
|
|
79658
|
-
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({},
|
|
79657
|
+
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss, showProjectInfoButton: (SDKConfig === null || SDKConfig === void 0 ? void 0 : SDKConfig.referenceId) === 'apebond' }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: zapEnabled, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance, selectedTokenPrice: inputTokenPrice, inputDisabled: isUserRestricted, marketingCampaign: bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign }), SDKConfig.useTiers && jsx$2(GetUpToComponent, { bond: bondData, depositAmount: depositAmount }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
|
|
79659
79658
|
width: '100%',
|
|
79660
79659
|
background: '#DE62F366',
|
|
79661
79660
|
// justifyContent: 'center',
|
|
@@ -81113,7 +81112,7 @@ const BuyComponentSolana = ({ onDismiss, bondAddress, bondChain, isProjectView,
|
|
|
81113
81112
|
}
|
|
81114
81113
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
81115
81114
|
}, [inputCurrencyBalance, zapListFetched]);
|
|
81116
|
-
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({},
|
|
81115
|
+
return bondData ? (jsx$2(Flex, { className: "modal-content", sx: Object.assign({}, MCBuyComponentStyles[bondData === null || bondData === void 0 ? void 0 : bondData.marketingCampaign]), children: jsxs(Flex, { className: "modaltable-container", children: [jsx$2(BondModalHeader, { bondData: bondData, onDismiss: onDismiss }), jsx$2(ProjectDescription, { description: bondData.shortDescription, isProjectView: true }), jsx$2(Flex, { sx: { width: '100%', display: isProjectView ? ['flex', 'flex', 'flex', 'none'] : 'flex' }, children: jsx$2(BondCards, { bondData: bondData }) }), jsx$2(Estimations, { depositAmount: depositAmount, bondData: bondData, youSpendString: youSpendString, isZap: isZap, fetchingZapQuote: fetchingZapQuote, zapError: zapError }), jsx$2(TokenSelectorPanel, { typedValue: inputValue, setTypedValue: setInputValue, selectedToken: inputToken, handleValueBtn: () => { var _a; return setInputValue((_a = new BigNumber$1(inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : '0')) === null || _a === void 0 ? void 0 : _a.toString()); }, handleCurrencySelect: handleCurrencySelect, bondChainId: bondData === null || bondData === void 0 ? void 0 : bondData.chainId, enableZap: true, bondPrincipalToken: bondData === null || bondData === void 0 ? void 0 : bondData.lpToken, tokenBalance: inputCurrencyBalance !== null && inputCurrencyBalance !== void 0 ? inputCurrencyBalance : undefined, selectedTokenPrice: inputTokenPrice }), (bondData === null || bondData === void 0 ? void 0 : bondData.warningCard) && (jsx$2(Flex, { sx: {
|
|
81117
81116
|
width: '100%',
|
|
81118
81117
|
background: '#DE62F366',
|
|
81119
81118
|
justifyContent: 'center',
|
|
@@ -81742,7 +81741,7 @@ const BondRow = ({ bondAddress, bondChain, marketingCampaign, payoutToken, billT
|
|
|
81742
81741
|
});
|
|
81743
81742
|
};
|
|
81744
81743
|
return (jsxs("div", { className: "bond-row" // Insert special campaign styles here
|
|
81745
|
-
, onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' },
|
|
81744
|
+
, onClick: handleOpenModal, sx: Object.assign(Object.assign({ borderRadius: 'normal' }, MCBondRowStyles[marketingCampaign]), { cursor: !bondSoldOut || (soldoutBondsCount && !isOpen) ? 'pointer' : 'default' }), children: [jsx$2("div", { className: "token-info-container", sx: { width: ['40%', '40%', '40%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag, marketingCampaign: marketingCampaign }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: "short-description", children: jsx$2(SafeHTMLComponent, { html: shortDescription }) })), jsxs("div", { className: "bond-info-columns", sx: { width: ['60%', '60%', '60%', '70%'] }, children: [!SDKConfig.useCardsView && jsx$2(Flex, { sx: { display: ['none', 'none', 'none', 'flex'], width: '125px' } }), jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, airdropTooltip: airdropTooltip }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble", body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: bondSoldOut ? ('-') : (jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
|
|
81746
81745
|
width: '127px',
|
|
81747
81746
|
height: '25px',
|
|
81748
81747
|
flexDirection: 'column',
|
|
@@ -87634,7 +87633,7 @@ const SelectItem = (_a) => {
|
|
|
87634
87633
|
};
|
|
87635
87634
|
|
|
87636
87635
|
const ListTag = ({ text = '', marketingCampaign }) => {
|
|
87637
|
-
return (
|
|
87636
|
+
return (jsx$2(Flex, { sx: { position: 'relative' }, children: jsx$2(Flex, { sx: Object.assign({ background: '#3C6AB530', color: '#3b78d3', fontSize: '10px', fontWeight: 600, lineHeight: '15px', p: '2px 6px', borderRadius: '5px', width: 'fit-content', zIndex: 2 }, MCTagStyles[marketingCampaign]), children: text.toUpperCase() }) }));
|
|
87638
87637
|
};
|
|
87639
87638
|
|
|
87640
87639
|
const Context = createContext$1({
|
package/dist/styles.css
CHANGED
|
@@ -73,18 +73,20 @@
|
|
|
73
73
|
}
|
|
74
74
|
.bonds-cards .bond-card-block {
|
|
75
75
|
display: flex;
|
|
76
|
-
padding:
|
|
76
|
+
padding: 6px 12px;
|
|
77
77
|
background: var(--theme-ui-colors-white3);
|
|
78
78
|
width: 100%;
|
|
79
79
|
align-items: center;
|
|
80
80
|
justify-content: space-between;
|
|
81
|
-
|
|
81
|
+
border-bottom: 1px solid var(--theme-ui-colors-white2);
|
|
82
|
+
max-height: 32px;
|
|
82
83
|
}
|
|
83
84
|
@media screen and (min-width: 800px) {
|
|
84
85
|
.bonds-cards .bond-card-block {
|
|
85
86
|
width: 350px;
|
|
86
87
|
flex-direction: column;
|
|
87
88
|
padding: 12px;
|
|
89
|
+
max-height: none;
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
.bonds-cards .bond-card-block .bond-card-title {
|
|
@@ -379,12 +381,11 @@
|
|
|
379
381
|
flex-direction: row;
|
|
380
382
|
align-items: center;
|
|
381
383
|
justify-content: space-between;
|
|
382
|
-
opacity: 0.8;
|
|
383
384
|
padding-left: 6px;
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
.balancerow.text {
|
|
387
|
-
opacity: 0.
|
|
388
|
+
opacity: 0.6;
|
|
388
389
|
align-items: center;
|
|
389
390
|
font-size: 12px;
|
|
390
391
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { ThemeUIStyleObject } from 'theme-ui';
|
|
2
2
|
import { MarketingCampaign } from '@ape.swap/apeswap-lists';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
export declare const MCTagStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
4
|
+
export declare const MCBuyComponentStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
5
|
+
export declare const MCBondRowStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
6
|
+
export declare const MCColorMapping: {
|
|
7
|
+
white3: {
|
|
8
|
+
Christmas2025: string;
|
|
9
|
+
};
|
|
10
|
+
white4: {
|
|
11
|
+
Christmas2025: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const MCTokenIconStyles: Partial<Record<MarketingCampaign, ThemeUIStyleObject>>;
|
|
15
|
+
export declare const MCTagNameMapping: Partial<Record<MarketingCampaign, string>>;
|