@ton/appkit-react 0.0.2 → 0.0.4

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.
Files changed (100) hide show
  1. package/dist/esm/features/network/hooks/use-default-network.js +28 -0
  2. package/dist/esm/features/network/hooks/use-default-network.js.map +1 -0
  3. package/dist/esm/features/network/hooks/use-networks.js +10 -3
  4. package/dist/esm/features/network/hooks/use-networks.js.map +1 -1
  5. package/dist/esm/features/network/index.js +1 -0
  6. package/dist/esm/features/network/index.js.map +1 -1
  7. package/dist/esm/features/nft/hooks/use-nfts-by-address.js +1 -1
  8. package/dist/esm/features/nft/hooks/use-nfts.js +2 -2
  9. package/dist/esm/features/transaction/components/transaction-progress/index.js +10 -0
  10. package/dist/esm/features/transaction/components/transaction-progress/index.js.map +1 -0
  11. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js +14 -0
  12. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js.map +1 -0
  13. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-provider.js +42 -0
  14. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-provider.js.map +1 -0
  15. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js +44 -0
  16. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js.map +1 -0
  17. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.module.css +44 -0
  18. package/dist/esm/features/transaction/hooks/use-transaction-status.js +35 -0
  19. package/dist/esm/features/transaction/hooks/use-transaction-status.js.map +1 -0
  20. package/dist/esm/features/transaction/index.js +2 -0
  21. package/dist/esm/features/transaction/index.js.map +1 -1
  22. package/dist/esm/locales/en.js +5 -0
  23. package/dist/esm/locales/en.js.map +1 -1
  24. package/dist/esm/styles/index.css +1 -0
  25. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  26. package/dist/types/features/network/hooks/use-default-network.d.ts +17 -0
  27. package/dist/types/features/network/hooks/use-default-network.d.ts.map +1 -0
  28. package/dist/types/features/network/hooks/use-networks.d.ts.map +1 -1
  29. package/dist/types/features/network/index.d.ts +1 -0
  30. package/dist/types/features/network/index.d.ts.map +1 -1
  31. package/dist/types/features/nft/hooks/use-nfts-by-address.d.ts +1 -1
  32. package/dist/types/features/transaction/components/transaction-progress/index.d.ts +10 -0
  33. package/dist/types/features/transaction/components/transaction-progress/index.d.ts.map +1 -0
  34. package/dist/types/features/transaction/components/transaction-progress/transaction-progress-icons.d.ts +15 -0
  35. package/dist/types/features/transaction/components/transaction-progress/transaction-progress-icons.d.ts.map +1 -0
  36. package/dist/types/features/transaction/components/transaction-progress/transaction-progress-provider.d.ts +23 -0
  37. package/dist/types/features/transaction/components/transaction-progress/transaction-progress-provider.d.ts.map +1 -0
  38. package/dist/types/features/transaction/components/transaction-progress/transaction-progress.d.ts +32 -0
  39. package/dist/types/features/transaction/components/transaction-progress/transaction-progress.d.ts.map +1 -0
  40. package/dist/types/features/transaction/hooks/use-transaction-status.d.ts +33 -0
  41. package/dist/types/features/transaction/hooks/use-transaction-status.d.ts.map +1 -0
  42. package/dist/types/features/transaction/index.d.ts +2 -0
  43. package/dist/types/features/transaction/index.d.ts.map +1 -1
  44. package/dist/types/libs/i18n.d.ts +5 -0
  45. package/dist/types/libs/i18n.d.ts.map +1 -1
  46. package/dist/types/locales/en.d.ts +5 -0
  47. package/dist/types/locales/en.d.ts.map +1 -1
  48. package/package.json +14 -7
  49. package/src/features/network/hooks/use-default-network.ts +47 -0
  50. package/src/features/network/hooks/use-networks.ts +14 -3
  51. package/src/features/network/index.ts +1 -0
  52. package/src/features/nft/hooks/use-nfts-by-address.ts +1 -1
  53. package/src/features/nft/hooks/use-nfts.ts +2 -2
  54. package/src/features/transaction/components/transaction-progress/index.ts +10 -0
  55. package/src/features/transaction/components/transaction-progress/transaction-progress-icons.tsx +80 -0
  56. package/src/features/transaction/components/transaction-progress/transaction-progress-provider.tsx +60 -0
  57. package/src/features/transaction/components/transaction-progress/transaction-progress.tsx +97 -0
  58. package/src/features/transaction/hooks/use-transaction-status.ts +55 -0
  59. package/src/features/transaction/index.ts +2 -0
  60. package/src/locales/en.ts +5 -0
  61. package/dist/esm/components/block/block.stories.js +0 -27
  62. package/dist/esm/components/block/block.stories.js.map +0 -1
  63. package/dist/esm/components/button/button.stories.js +0 -30
  64. package/dist/esm/components/button/button.stories.js.map +0 -1
  65. package/dist/esm/components/circle-icon/circle-icon.stories.js +0 -56
  66. package/dist/esm/components/circle-icon/circle-icon.stories.js.map +0 -1
  67. package/dist/esm/components/ton-icon/ton-icon.stories.js +0 -56
  68. package/dist/esm/components/ton-icon/ton-icon.stories.js.map +0 -1
  69. package/dist/esm/features/balances/components/balance-badge/balance-badge.stories.js +0 -23
  70. package/dist/esm/features/balances/components/balance-badge/balance-badge.stories.js.map +0 -1
  71. package/dist/esm/features/balances/components/currency-item/currency-item.stories.js +0 -61
  72. package/dist/esm/features/balances/components/currency-item/currency-item.stories.js.map +0 -1
  73. package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.stories.js +0 -41
  74. package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.stories.js.map +0 -1
  75. package/dist/esm/features/balances/components/send-ton-button/send-ton-button.stories.js +0 -36
  76. package/dist/esm/features/balances/components/send-ton-button/send-ton-button.stories.js.map +0 -1
  77. package/dist/esm/features/nft/components/nft-item/nft-item.stories.js +0 -52
  78. package/dist/esm/features/nft/components/nft-item/nft-item.stories.js.map +0 -1
  79. package/dist/esm/features/transaction/components/transaction/transaction.stories.js +0 -47
  80. package/dist/esm/features/transaction/components/transaction/transaction.stories.js.map +0 -1
  81. package/dist/types/components/block/block.stories.d.ts +0 -15
  82. package/dist/types/components/block/block.stories.d.ts.map +0 -1
  83. package/dist/types/components/button/button.stories.d.ts +0 -16
  84. package/dist/types/components/button/button.stories.d.ts.map +0 -1
  85. package/dist/types/components/circle-icon/circle-icon.stories.d.ts +0 -18
  86. package/dist/types/components/circle-icon/circle-icon.stories.d.ts.map +0 -1
  87. package/dist/types/components/ton-icon/ton-icon.stories.d.ts +0 -20
  88. package/dist/types/components/ton-icon/ton-icon.stories.d.ts.map +0 -1
  89. package/dist/types/features/balances/components/balance-badge/balance-badge.stories.d.ts +0 -16
  90. package/dist/types/features/balances/components/balance-badge/balance-badge.stories.d.ts.map +0 -1
  91. package/dist/types/features/balances/components/currency-item/currency-item.stories.d.ts +0 -19
  92. package/dist/types/features/balances/components/currency-item/currency-item.stories.d.ts.map +0 -1
  93. package/dist/types/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts +0 -22
  94. package/dist/types/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts.map +0 -1
  95. package/dist/types/features/balances/components/send-ton-button/send-ton-button.stories.d.ts +0 -21
  96. package/dist/types/features/balances/components/send-ton-button/send-ton-button.stories.d.ts.map +0 -1
  97. package/dist/types/features/nft/components/nft-item/nft-item.stories.d.ts +0 -25
  98. package/dist/types/features/nft/components/nft-item/nft-item.stories.d.ts.map +0 -1
  99. package/dist/types/features/transaction/components/transaction/transaction.stories.d.ts +0 -23
  100. package/dist/types/features/transaction/components/transaction/transaction.stories.d.ts.map +0 -1
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { useMemo } from 'react';
10
+ import type { FC, ReactNode, ComponentProps } from 'react';
11
+ import { clsx } from 'clsx';
12
+
13
+ import { useI18n } from '../../../../hooks/use-i18n';
14
+ import { TransactionProgressProvider, useTransactionProgressContext } from './transaction-progress-provider';
15
+ import type { TransactionProgressContextValue } from './transaction-progress-provider';
16
+ import { TransactionProgressIcon } from './transaction-progress-icons';
17
+ import styles from './transaction-progress.module.css';
18
+
19
+ export interface TransactionProgressTexts {
20
+ pending: string;
21
+ completed: string;
22
+ failed: string;
23
+ }
24
+
25
+ export interface TransactionProgressRenderProps extends TransactionProgressContextValue {
26
+ texts: TransactionProgressTexts;
27
+ }
28
+
29
+ export interface TransactionProgressProps extends Omit<ComponentProps<'div'>, 'children'> {
30
+ /** BOC of the transaction to strictly track status */
31
+ boc: string;
32
+ /** Render props function for full control over rendering */
33
+ children?: (props: TransactionProgressRenderProps) => ReactNode;
34
+ /** Allows targeting specific internal elements for styling */
35
+ classNames?: {
36
+ container?: string;
37
+ icon?: string;
38
+ message?: string;
39
+ };
40
+ }
41
+
42
+ export const TransactionProgressContent: FC<Omit<TransactionProgressProps, 'boc'>> = ({
43
+ children,
44
+ className,
45
+ classNames = {},
46
+ ...props
47
+ }) => {
48
+ const context = useTransactionProgressContext();
49
+ const { status, onchainMessages, totalMessages, error } = context;
50
+ const { t } = useI18n();
51
+
52
+ const texts = useMemo(
53
+ () => ({
54
+ pending: t('transaction.status.pending'),
55
+ completed: t('transaction.status.completed'),
56
+ failed: t('transaction.status.failed'),
57
+ }),
58
+ [t],
59
+ );
60
+
61
+ if (children) {
62
+ return <>{children({ ...context, texts })}</>;
63
+ }
64
+
65
+ const isPending = status === 'pending' && !error;
66
+ const isCompleted = status === 'completed';
67
+ const isFailed = status === 'failed' || !!error;
68
+
69
+ let messageText = texts.pending;
70
+ if (isCompleted) messageText = texts.completed;
71
+ if (isFailed) messageText = texts.failed;
72
+
73
+ let progressText = null;
74
+ if (isPending && totalMessages > 0) {
75
+ progressText = `(${onchainMessages} / ${totalMessages})`;
76
+ }
77
+
78
+ return (
79
+ <div className={clsx(styles.container, className, classNames.container)} {...props}>
80
+ <div className={clsx(styles.iconContainer, classNames.icon)}>
81
+ <TransactionProgressIcon status={status} isError={!!error} />
82
+ </div>
83
+
84
+ <div className={clsx(styles.message, classNames.message)}>
85
+ {messageText} {progressText}
86
+ </div>
87
+ </div>
88
+ );
89
+ };
90
+
91
+ export const TransactionProgress: FC<TransactionProgressProps> = ({ boc, ...rest }) => {
92
+ return (
93
+ <TransactionProgressProvider boc={boc}>
94
+ <TransactionProgressContent {...rest} />
95
+ </TransactionProgressProvider>
96
+ );
97
+ };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type {
10
+ GetTransactionStatusData,
11
+ GetTransactionStatusErrorType,
12
+ GetTransactionStatusParameters,
13
+ GetTransactionStatusQueryConfig,
14
+ } from '@ton/appkit/queries';
15
+ import { getTransactionStatusQueryOptions } from '@ton/appkit/queries';
16
+
17
+ import { useQuery } from '../../../libs/query';
18
+ import type { UseQueryReturnType } from '../../../libs/query';
19
+ import { useAppKit } from '../../../hooks/use-app-kit';
20
+
21
+ export type UseTransactionStatusParameters<selectData = GetTransactionStatusData> = GetTransactionStatusParameters &
22
+ GetTransactionStatusQueryConfig<selectData>;
23
+
24
+ export type UseTransactionStatusReturnType<selectData = GetTransactionStatusData> = UseQueryReturnType<
25
+ selectData,
26
+ GetTransactionStatusErrorType
27
+ >;
28
+
29
+ /**
30
+ * Hook to get the status of a transaction trace by BOC.
31
+ *
32
+ * This hook polls the toncenter API to track the progress of a transaction trace.
33
+ * It is useful for tracking complex operations like swaps or multi-step flows.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * const { data: status } = useTransactionStatus({
38
+ * boc: 'te6cc...',
39
+ * query: {
40
+ * refetchInterval: 2000, // Poll every 2 seconds
41
+ * }
42
+ * });
43
+ *
44
+ * if (status?.status === 'pending') {
45
+ * console.log(`Progress: ${status.completedMessages}/${status.totalMessages}`);
46
+ * }
47
+ * ```
48
+ */
49
+ export const useTransactionStatus = <selectData = GetTransactionStatusData>(
50
+ parameters: UseTransactionStatusParameters<selectData>,
51
+ ): UseTransactionStatusReturnType<selectData> => {
52
+ const appKit = useAppKit();
53
+
54
+ return useQuery(getTransactionStatusQueryOptions(appKit, parameters));
55
+ };
@@ -8,5 +8,7 @@
8
8
 
9
9
  export * from './hooks/use-send-transaction';
10
10
  export * from './hooks/use-transfer-ton';
11
+ export * from './hooks/use-transaction-status';
11
12
 
12
13
  export * from './components/transaction';
14
+ export * from './components/transaction-progress';
package/src/locales/en.ts CHANGED
@@ -19,6 +19,11 @@ export default {
19
19
  transaction: {
20
20
  sendTransaction: 'Send Transaction',
21
21
  processing: 'Processing...',
22
+ status: {
23
+ pending: 'Processing...',
24
+ completed: 'Success',
25
+ failed: 'Failed',
26
+ },
22
27
  },
23
28
 
24
29
  // Balances
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Block } from './block';
3
- const meta = {
4
- title: 'Private/Components/Block',
5
- component: Block,
6
- tags: ['autodocs'],
7
- argTypes: {
8
- direction: {
9
- control: 'radio',
10
- options: ['row', 'column'],
11
- },
12
- },
13
- };
14
- export default meta;
15
- export const Column = {
16
- args: {
17
- direction: 'column',
18
- children: (_jsxs(_Fragment, { children: [_jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 1" }), _jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 2" }), _jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 3" })] })),
19
- },
20
- };
21
- export const Row = {
22
- args: {
23
- direction: 'row',
24
- children: (_jsxs(_Fragment, { children: [_jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 1" }), _jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 2" }), _jsx("div", { style: { padding: '8px', background: '#0098EB', color: 'white' }, children: "Item 3" })] })),
25
- },
26
- };
27
- //# sourceMappingURL=block.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.stories.js","sourceRoot":"","sources":["../../../../src/components/block/block.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,IAAI,GAAuB;IAC7B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,KAAK;IAChB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,SAAS,EAAE;YACP,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;SAC7B;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,MAAM,GAAU;IACzB,IAAI,EAAE;QACF,SAAS,EAAE,QAAQ;QACnB,QAAQ,EAAE,CACN,8BACI,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,EACnF,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,EACnF,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,IACpF,CACN;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAU;IACtB,IAAI,EAAE;QACF,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,CACN,8BACI,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,EACnF,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,EACnF,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,uBAAc,IACpF,CACN;KACJ;CACJ,CAAC"}
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from './button';
3
- const meta = {
4
- title: 'Public/Components/Button',
5
- component: Button,
6
- tags: ['autodocs'],
7
- argTypes: {
8
- disabled: {
9
- control: 'boolean',
10
- },
11
- },
12
- };
13
- export default meta;
14
- export const Default = {
15
- args: {
16
- children: 'Click me',
17
- },
18
- };
19
- export const Disabled = {
20
- args: {
21
- children: 'Disabled Button',
22
- disabled: true,
23
- },
24
- };
25
- export const WithIcon = {
26
- args: {
27
- children: (_jsxs(_Fragment, { children: [_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M12 5V19M5 12H19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), "Add Item"] })),
28
- },
29
- };
30
- //# sourceMappingURL=button.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../src/components/button/button.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,IAAI,GAAwB;IAC9B,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,QAAQ,EAAE;YACN,OAAO,EAAE,SAAS;SACrB;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,QAAQ,EAAE,UAAU;KACvB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC3B,IAAI,EAAE;QACF,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,IAAI;KACjB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC3B,IAAI,EAAE;QACF,QAAQ,EAAE,CACN,8BACI,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,YAC1F,eACI,CAAC,EAAC,kBAAkB,EACpB,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,GAAG,EACf,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACxB,GACA,gBAEP,CACN;KACJ;CACJ,CAAC"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Copyright (c) TonTech.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- import { CircleIcon } from './circle-icon';
9
- const meta = {
10
- title: 'Private/Components/CircleIcon',
11
- component: CircleIcon,
12
- tags: ['autodocs'],
13
- argTypes: {
14
- size: {
15
- control: { type: 'range', min: 20, max: 100, step: 5 },
16
- },
17
- },
18
- };
19
- export default meta;
20
- export const WithImage = {
21
- args: {
22
- size: 48,
23
- src: 'https://ton.org/download/ton_symbol.png',
24
- alt: 'TON',
25
- },
26
- };
27
- export const WithFallback = {
28
- args: {
29
- size: 48,
30
- fallback: 'T',
31
- alt: 'TON',
32
- },
33
- };
34
- export const WithInvalidImage = {
35
- args: {
36
- size: 48,
37
- src: 'https://invalid-url.com/image.png',
38
- alt: 'Fallback',
39
- fallback: 'F',
40
- },
41
- };
42
- export const SmallSize = {
43
- args: {
44
- size: 24,
45
- src: 'https://ton.org/download/ton_symbol.png',
46
- alt: 'TON',
47
- },
48
- };
49
- export const LargeSize = {
50
- args: {
51
- size: 80,
52
- src: 'https://ton.org/download/ton_symbol.png',
53
- alt: 'TON',
54
- },
55
- };
56
- //# sourceMappingURL=circle-icon.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"circle-icon.stories.js","sourceRoot":"","sources":["../../../../src/components/circle-icon/circle-icon.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,IAAI,GAA4B;IAClC,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE;SACzD;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,SAAS,GAAU;IAC5B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,KAAK;KACb;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IAC/B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,GAAG;QACb,GAAG,EAAE,KAAK;KACb;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACnC,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,mCAAmC;QACxC,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,GAAG;KAChB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC5B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,KAAK;KACb;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC5B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,yCAAyC;QAC9C,GAAG,EAAE,KAAK;KACb;CACJ,CAAC"}
@@ -1,56 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TonIcon, TonIconCircle } from './ton-icon';
3
- const meta = {
4
- title: 'Private/Components/TonIcon',
5
- component: TonIcon,
6
- tags: ['autodocs'],
7
- argTypes: {
8
- size: {
9
- control: { type: 'range', min: 12, max: 64, step: 4 },
10
- },
11
- },
12
- decorators: [
13
- (Story) => (_jsx("div", { style: { color: 'white' }, children: _jsx(Story, {}) })),
14
- ],
15
- };
16
- export default meta;
17
- export const Default = {
18
- args: {
19
- size: 24,
20
- },
21
- };
22
- export const Small = {
23
- args: {
24
- size: 16,
25
- },
26
- };
27
- export const Large = {
28
- args: {
29
- size: 48,
30
- },
31
- };
32
- export const CustomColor = {
33
- args: {
34
- size: 32,
35
- style: { color: '#0098EB' },
36
- },
37
- };
38
- export const Circle = {
39
- render: (args) => _jsx(TonIconCircle, { ...args }),
40
- args: {
41
- size: 48,
42
- },
43
- };
44
- export const CircleSmall = {
45
- render: (args) => _jsx(TonIconCircle, { ...args }),
46
- args: {
47
- size: 24,
48
- },
49
- };
50
- export const CircleLarge = {
51
- render: (args) => _jsx(TonIconCircle, { ...args }),
52
- args: {
53
- size: 72,
54
- },
55
- };
56
- //# sourceMappingURL=ton-icon.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ton-icon.stories.js","sourceRoot":"","sources":["../../../../src/components/ton-icon/ton-icon.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,IAAI,GAAyB;IAC/B,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;SACxD;KACJ;IACD,UAAU,EAAE;QACR,CAAC,KAAK,EAAE,EAAE,CAAC,CACP,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,YAC1B,KAAC,KAAK,KAAG,GACP,CACT;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IACxB,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IACxB,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAC9B,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;KAC9B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAmC;IAClD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,aAAa,OAAK,IAAI,GAAI;IAC7C,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAmC;IACvD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,aAAa,OAAK,IAAI,GAAI;IAC7C,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAmC;IACvD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAC,aAAa,OAAK,IAAI,GAAI;IAC7C,IAAI,EAAE;QACF,IAAI,EAAE,EAAE;KACX;CACJ,CAAC"}
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { BalanceBadge } from './balance-badge';
3
- const meta = {
4
- title: 'Public/Features/Balances/BalanceBadge',
5
- tags: ['autodocs'],
6
- parameters: {
7
- layout: 'centered',
8
- },
9
- };
10
- export default meta;
11
- export const TonBalance = {
12
- render: () => (_jsxs(BalanceBadge.Container, { children: [_jsx(BalanceBadge.Icon, { src: "https://ton.org/download/ton_symbol.png", alt: "TON", size: 40 }), _jsxs(BalanceBadge.BalanceBlock, { children: [_jsx(BalanceBadge.Balance, { balance: "1500000000", decimals: 9 }), _jsx(BalanceBadge.Symbol, { symbol: "TON" })] })] })),
13
- };
14
- export const JettonBalance = {
15
- render: () => (_jsxs(BalanceBadge.Container, { children: [_jsx(BalanceBadge.Icon, { fallback: "U", alt: "USDT", size: 40 }), _jsxs(BalanceBadge.BalanceBlock, { children: [_jsx(BalanceBadge.Balance, { balance: "100000000", decimals: 6 }), _jsx(BalanceBadge.Symbol, { symbol: "USDT" })] })] })),
16
- };
17
- export const ZeroBalance = {
18
- render: () => (_jsxs(BalanceBadge.Container, { children: [_jsx(BalanceBadge.Icon, { src: "https://ton.org/download/ton_symbol.png", alt: "TON", size: 40 }), _jsxs(BalanceBadge.BalanceBlock, { children: [_jsx(BalanceBadge.Balance, { balance: "", decimals: 9 }), _jsx(BalanceBadge.Symbol, { symbol: "TON" })] })] })),
19
- };
20
- export const LargeBalance = {
21
- render: () => (_jsxs(BalanceBadge.Container, { children: [_jsx(BalanceBadge.Icon, { src: "https://ton.org/download/ton_symbol.png", alt: "TON", size: 40 }), _jsxs(BalanceBadge.BalanceBlock, { children: [_jsx(BalanceBadge.Balance, { balance: "999999999999999999", decimals: 9 }), _jsx(BalanceBadge.Symbol, { symbol: "TON" })] })] })),
22
- };
23
- //# sourceMappingURL=balance-badge.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"balance-badge.stories.js","sourceRoot":"","sources":["../../../../../../src/features/balances/components/balance-badge/balance-badge.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,IAAI,GAAS;IACf,KAAK,EAAE,uCAAuC;IAC9C,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,UAAU,GAAU;IAC7B,MAAM,E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,GAAU;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,CACV,MAAC,YAAY,CAAC,SAAS,eACnB,KAAC,YAAY,CAAC,IAAI,IAAC,GAAG,EAAC,yCAAyC,EAAC,GAAG,EAAC,KAAK,EAAC,IAAI,EAAE,EAAE,GAAI,EACvF,MAAC,YAAY,CAAC,YAAY,eACtB,KAAC,YAAY,CAAC,OAAO,IAAC,OAAO,EAAC,oBAAoB,EAAC,QAAQ,EAAE,CAAC,GAAI,EAClE,KAAC,YAAY,CAAC,MAAM,IAAC,MAAM,EAAC,KAAK,GAAG,IACZ,IACP,CAC5B;CACJ,CAAC"}
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { fn } from '@storybook/test';
3
- import { CurrencyItem } from './currency-item';
4
- const meta = {
5
- title: 'Public/Features/Balances/CurrencyItem',
6
- component: CurrencyItem,
7
- tags: ['autodocs'],
8
- parameters: {
9
- layout: 'centered',
10
- },
11
- args: {
12
- onClick: fn(),
13
- },
14
- };
15
- export default meta;
16
- export const TON = {
17
- args: {
18
- ticker: 'TON',
19
- name: 'Toncoin',
20
- balance: '55',
21
- icon: 'https://ton.org/download/ton_symbol.png',
22
- isVerified: true,
23
- },
24
- };
25
- export const USDT = {
26
- args: {
27
- ticker: 'USDT',
28
- name: 'Tether USD',
29
- balance: '10',
30
- isVerified: true,
31
- },
32
- };
33
- export const Unverified = {
34
- args: {
35
- ticker: 'MEME',
36
- name: 'Meme Token',
37
- balance: '10000',
38
- isVerified: false,
39
- },
40
- };
41
- export const ZeroBalance = {
42
- args: {
43
- ticker: 'TON',
44
- name: 'Toncoin',
45
- balance: '0',
46
- icon: 'https://ton.org/download/ton_symbol.png',
47
- isVerified: true,
48
- },
49
- };
50
- export const NoBalance = {
51
- args: {
52
- ticker: 'TON',
53
- name: 'Toncoin',
54
- icon: 'https://ton.org/download/ton_symbol.png',
55
- isVerified: true,
56
- },
57
- };
58
- export const CurrencyList = {
59
- render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px', width: '320px' }, children: [_jsx(CurrencyItem, { ticker: "TON", name: "Toncoin", balance: "55", icon: "https://ton.org/download/ton_symbol.png", isVerified: true, onClick: fn() }), _jsx(CurrencyItem, { ticker: "USDT", name: "Tether USD", balance: "10", isVerified: true, onClick: fn() }), _jsx(CurrencyItem, { ticker: "NOT", name: "Notcoin", balance: "500", isVerified: true, onClick: fn() })] })),
60
- };
61
- //# sourceMappingURL=currency-item.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency-item.stories.js","sourceRoot":"","sources":["../../../../../../src/features/balances/components/currency-item/currency-item.stories.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,IAAI,GAA8B;IACpC,KAAK,EAAE,uCAAuC;IAC9C,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;IACD,IAAI,EAAE;QACF,OAAO,EAAE,EAAE,EAAE;KAChB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,GAAG,GAAU;IACtB,IAAI,EAAE;QACF,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,yCAAyC;QAC/C,UAAU,EAAE,IAAI;KACnB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACvB,IAAI,EAAE;QACF,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;KACnB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC7B,IAAI,EAAE;QACF,MAAM,EAAE,MAAM;QACd,IAA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onPreview = ({ text = 'Send USDT', isLoading = false, disabled = false, }) => {
4
- return _jsx(Button, { disabled: disabled || isLoading, children: isLoading ? 'Processing...' : text });
5
- };
6
- const meta = {
7
- title: 'Public/Features/Balances/SendJettonButton',
8
- component: SendJettonButtonPreview,
9
- tags: ['autodocs'],
10
- parameters: {
11
- layout: 'centered',
12
- },
13
- };
14
- export default meta;
15
- export const USDT = {
16
- args: {
17
- text: 'Send 100 USDT',
18
- },
19
- };
20
- export const NOT = {
21
- args: {
22
- text: 'Send 500 NOT',
23
- },
24
- };
25
- export const WithoutAmount = {
26
- args: {
27
- text: 'Send USDT',
28
- },
29
- };
30
- export const Loading = {
31
- args: {
32
- isLoading: true,
33
- },
34
- };
35
- export const Disabled = {
36
- args: {
37
- text: 'Send 100 USDT',
38
- disabled: true,
39
- },
40
- };
41
- //# sourceMappingURL=send-jetton-button.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-jetton-button.stories.js","sourceRoot":"","sources":["../../../../../../src/features/balances/components/send-jetton-button/send-jetton-button.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,MAAM,uBAAuB,GAAG,CAAC,EAC7B,IAAI,GAAG,WAAW,EAClB,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,GAKnB,EAAE,EAAE;IACD,OAAO,KAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,IAAI,SAAS,YAAG,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,GAAU,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,IAAI,GAAyC;IAC/C,KAAK,EAAE,2CAA2C;IAClD,SAAS,EAAE,uBAAuB;IAClC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,IAAI,GAAU;IACvB,IAAI,EAAE;QACF,IAAI,EAAE,eAAe;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAU;IACtB,IAAI,EAAE;QACF,IAAI,EAAE,cAAc;KACvB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAChC,IAAI,EAAE;QACF,IAAI,EAAE,WAAW;KACpB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC3B,IAAI,EAAE;QACF,IAAI,EAAE,eAAe;QACrB,QAAQ,EAAE,IAAI;KACjB;CACJ,CAAC"}
@@ -1,36 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button } from '../../../../components/button';
3
- const SendTonButtonPreview = ({ text = 'Send TON', isLoading = false, disabled = false, }) => {
4
- return _jsx(Button, { disabled: disabled || isLoading, children: isLoading ? 'Processing...' : text });
5
- };
6
- const meta = {
7
- title: 'Public/Features/Balances/SendTonButton',
8
- component: SendTonButtonPreview,
9
- tags: ['autodocs'],
10
- parameters: {
11
- layout: 'centered',
12
- },
13
- };
14
- export default meta;
15
- export const Default = {
16
- args: {
17
- text: 'Send 1.5 TON',
18
- },
19
- };
20
- export const LargeAmount = {
21
- args: {
22
- text: 'Send 999.99 TON',
23
- },
24
- };
25
- export const Loading = {
26
- args: {
27
- isLoading: true,
28
- },
29
- };
30
- export const Disabled = {
31
- args: {
32
- text: 'Send 1.5 TON',
33
- disabled: true,
34
- },
35
- };
36
- //# sourceMappingURL=send-ton-button.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-ton-button.stories.js","sourceRoot":"","sources":["../../../../../../src/features/balances/components/send-ton-button/send-ton-button.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,MAAM,oBAAoB,GAAG,CAAC,EAC1B,IAAI,GAAG,UAAU,EACjB,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,GAKnB,EAAE,EAAE;IACD,OAAO,KAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,IAAI,SAAS,YAAG,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,GAAU,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,IAAI,GAAsC;IAC5C,KAAK,EAAE,wCAAwC;IAC/C,SAAS,EAAE,oBAAoB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,IAAI,EAAE,cAAc;KACvB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAC9B,IAAI,EAAE;QACF,IAAI,EAAE,iBAAiB;KAC1B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC3B,IAAI,EAAE;QACF,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,IAAI;KACjB;CACJ,CAAC"}
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { fn } from '@storybook/test';
3
- import clsx from 'clsx';
4
- import styles from './nft-item.module.css';
5
- const PlaceholderIcon = () => (_jsx("svg", { className: styles.placeholderIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }));
6
- const NftItemPreview = ({ name, collectionName, image, isOnSale = false, onClick, className, }) => {
7
- return (_jsxs("button", { onClick: onClick, className: clsx(styles.nftItem, className), children: [_jsxs("div", { className: styles.imageWrapper, children: [image ? _jsx("img", { src: image, alt: name, className: styles.image }) : _jsx(PlaceholderIcon, {}), isOnSale && _jsx("span", { className: styles.saleBadge, children: "On Sale" })] }), _jsxs("div", { className: styles.info, children: [_jsx("h4", { className: styles.name, children: name }), _jsx("p", { className: styles.collectionName, children: collectionName })] })] }));
8
- };
9
- const meta = {
10
- title: 'Public/Features/NFT/NftItem',
11
- component: NftItemPreview,
12
- tags: ['autodocs'],
13
- parameters: {
14
- layout: 'centered',
15
- },
16
- args: {
17
- onClick: fn(),
18
- },
19
- };
20
- export default meta;
21
- export const WithImage = {
22
- args: {
23
- name: 'TON Diamond #1234',
24
- collectionName: 'TON Diamonds',
25
- image: 'https://picsum.photos/200',
26
- },
27
- };
28
- export const WithoutImage = {
29
- args: {
30
- name: 'Mystery NFT',
31
- collectionName: 'Unknown Collection',
32
- },
33
- };
34
- export const OnSale = {
35
- args: {
36
- name: 'Rare NFT #001',
37
- collectionName: 'Rare Collection',
38
- image: 'https://picsum.photos/201',
39
- isOnSale: true,
40
- },
41
- };
42
- export const LongName = {
43
- args: {
44
- name: 'Very Long NFT Name That Might Overflow The Container',
45
- collectionName: 'Long Collection Name Here',
46
- image: 'https://picsum.photos/202',
47
- },
48
- };
49
- export const NftGrid = {
50
- render: () => (_jsxs("div", { style: { display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: '16px' }, children: [_jsx(NftItemPreview, { name: "TON Diamond #1", collectionName: "TON Diamonds", image: "https://picsum.photos/200", onClick: fn() }), _jsx(NftItemPreview, { name: "TON Diamond #2", collectionName: "TON Diamonds", image: "https://picsum.photos/201", isOnSale: true, onClick: fn() }), _jsx(NftItemPreview, { name: "Mystery NFT", collectionName: "Unknown", onClick: fn() }), _jsx(NftItemPreview, { name: "Rare Item #123", collectionName: "Rare Items", image: "https://picsum.photos/203", onClick: fn() })] })),
51
- };
52
- //# sourceMappingURL=nft-item.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nft-item.stories.js","sourceRoot":"","sources":["../../../../../../src/features/nft/components/nft-item/nft-item.stories.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,CAC1B,cAAK,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,YACzF,eACI,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,2JAA2J,GAC/J,GACA,CACT,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EACpB,IAAI,EACJ,cAAc,EACd,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,SAAS,GAQZ,EAAE,EAAE;IACD,OAAO,CACH,kBAAQ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,aAChE,eAAK,SAAS,EAAE,MAAM,CAAC,YAAY,aAC9B,KAAK,CAAC,CAAC,CAAC,cAAK,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,GAAI,CAAC,CAAC,CAAC,KAAC,eAAe,KAAG,EACrF,QAAQ,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,SAAS,wBAAgB,IAC5D,EACN,eAAK,SAAS,EAAE,MAAM,CAAC,IAAI,aACvB,aAAI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