@rango-dev/widget-embedded 0.30.0 → 0.30.1-next.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.30.0",
3
+ "version": "0.30.1-next.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -30,7 +30,7 @@
30
30
  "@rango-dev/queue-manager-rango-preset": "^0.35.0",
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
32
32
  "@rango-dev/signer-solana": "^0.30.0",
33
- "@rango-dev/ui": "^0.36.0",
33
+ "@rango-dev/ui": "^0.36.1-next.0",
34
34
  "@rango-dev/wallets-react": "^0.21.0",
35
35
  "@rango-dev/wallets-shared": "^0.35.0",
36
36
  "bignumber.js": "^9.1.1",
@@ -11,6 +11,16 @@ export const Container = styled('div', {
11
11
 
12
12
  export const HeaderDetails = styled('div', {
13
13
  width: '100%',
14
+ '& ._icon-button': {
15
+ '&:hover': {
16
+ '& svg': {
17
+ color: '$secondary550',
18
+ [`.${darkTheme} &`]: {
19
+ color: '$secondary500',
20
+ },
21
+ },
22
+ },
23
+ },
14
24
  });
15
25
 
16
26
  export const StepsList = styled(ScrollableArea, {
@@ -11,6 +11,7 @@ import {
11
11
  Button,
12
12
  CopyIcon,
13
13
  Divider,
14
+ DoneIcon,
14
15
  IconButton,
15
16
  QuoteCost,
16
17
  RangoExplorerIcon,
@@ -88,7 +89,7 @@ export function SwapDetails(props: SwapDetailsProps) {
88
89
  const retry = useQuoteStore.use.retry();
89
90
  const isActiveTab = useUiStore.use.isActiveTab();
90
91
  const navigate = useNavigate();
91
- const [_, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
92
+ const [isCopied, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
92
93
  const listRef = useRef<HTMLDivElement | null>(null);
93
94
  const [modalState, setModalState] = useState<ModalState>(null);
94
95
  const [showCompletedModal, setShowCompletedModal] = useState<
@@ -318,11 +319,28 @@ export function SwapDetails(props: SwapDetailsProps) {
318
319
  <Typography variant="label" size="small" color="neutral700">
319
320
  {requestId}
320
321
  </Typography>
321
- <IconButton
322
- variant="ghost"
323
- onClick={handleCopy.bind(null, requestId || '')}>
324
- <CopyIcon size={16} color="gray" />
325
- </IconButton>
322
+ <Tooltip
323
+ container={getContainer()}
324
+ content={
325
+ isCopied
326
+ ? i18n.t('Copied To Clipboard')
327
+ : i18n.t('Copy Request ID')
328
+ }
329
+ open={isCopied || undefined}
330
+ side="bottom"
331
+ alignOffset={-16}
332
+ align="end">
333
+ <IconButton
334
+ variant="ghost"
335
+ onClick={handleCopy.bind(null, requestId || '')}>
336
+ {isCopied ? (
337
+ <DoneIcon size={16} color="secondary" />
338
+ ) : (
339
+ <CopyIcon size={16} color="gray" />
340
+ )}
341
+ </IconButton>
342
+ </Tooltip>
343
+
326
344
  <StyledLink
327
345
  target="_blank"
328
346
  href={`${SCANNER_BASE_URL}/swap/${requestId}`}>