@ton/appkit-react 0.0.1-alpha.2 → 0.0.1
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/README.md +211 -1
- package/dist/components/block/block.d.ts +13 -0
- package/dist/components/block/block.d.ts.map +1 -0
- package/dist/components/block/block.js +18 -0
- package/dist/components/block/block.js.map +1 -0
- package/dist/components/block/block.mjs +11 -0
- package/dist/components/block/block.mjs.map +1 -0
- package/dist/components/block/block.module.css +13 -0
- package/dist/components/block/block.module.css.map +1 -0
- package/dist/components/block/block.stories.d.ts +15 -0
- package/dist/components/block/block.stories.d.ts.map +1 -0
- package/dist/components/block/block.stories.js +45 -0
- package/dist/components/block/block.stories.js.map +1 -0
- package/dist/components/block/block.stories.mjs +39 -0
- package/dist/components/block/block.stories.mjs.map +1 -0
- package/dist/components/block/index.d.ts +9 -0
- package/dist/components/block/index.d.ts.map +1 -0
- package/dist/components/block/index.js +14 -0
- package/dist/components/block/index.js.map +1 -0
- package/dist/components/block/index.mjs +3 -0
- package/dist/components/block/index.mjs.map +1 -0
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +18 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.mjs +11 -0
- package/dist/components/button/button.mjs.map +1 -0
- package/dist/components/button/button.module.css +33 -0
- package/dist/components/button/button.module.css.map +1 -0
- package/dist/components/button/button.stories.d.ts +16 -0
- package/dist/components/button/button.stories.d.ts.map +1 -0
- package/dist/components/button/button.stories.js +53 -0
- package/dist/components/button/button.stories.js.map +1 -0
- package/dist/components/button/button.stories.mjs +46 -0
- package/dist/components/button/button.stories.mjs.map +1 -0
- package/dist/components/button/index.d.ts +9 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +12 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/index.mjs +3 -0
- package/dist/components/button/index.mjs.map +1 -0
- package/dist/components/circle-icon/circle-icon.d.ts +16 -0
- package/dist/components/circle-icon/circle-icon.d.ts.map +1 -0
- package/dist/components/circle-icon/circle-icon.js +22 -0
- package/dist/components/circle-icon/circle-icon.js.map +1 -0
- package/dist/components/circle-icon/circle-icon.mjs +15 -0
- package/dist/components/circle-icon/circle-icon.mjs.map +1 -0
- package/dist/components/circle-icon/circle-icon.module.css +31 -0
- package/dist/components/circle-icon/circle-icon.module.css.map +1 -0
- package/dist/components/circle-icon/circle-icon.stories.d.ts +18 -0
- package/dist/components/circle-icon/circle-icon.stories.d.ts.map +1 -0
- package/dist/components/circle-icon/circle-icon.stories.js +62 -0
- package/dist/components/circle-icon/circle-icon.stories.js.map +1 -0
- package/dist/components/circle-icon/circle-icon.stories.mjs +53 -0
- package/dist/components/circle-icon/circle-icon.stories.mjs.map +1 -0
- package/dist/components/circle-icon/index.d.ts +9 -0
- package/dist/components/circle-icon/index.d.ts.map +1 -0
- package/dist/components/circle-icon/index.js +14 -0
- package/dist/components/circle-icon/index.js.map +1 -0
- package/dist/components/circle-icon/index.mjs +3 -0
- package/dist/components/circle-icon/index.mjs.map +1 -0
- package/dist/components/ton-icon/index.d.ts +9 -0
- package/dist/components/ton-icon/index.d.ts.map +1 -0
- package/dist/components/ton-icon/index.js +16 -0
- package/dist/components/ton-icon/index.js.map +1 -0
- package/dist/components/ton-icon/index.mjs +3 -0
- package/dist/components/ton-icon/index.mjs.map +1 -0
- package/dist/components/ton-icon/ton-icon.d.ts +14 -0
- package/dist/components/ton-icon/ton-icon.d.ts.map +1 -0
- package/dist/components/ton-icon/ton-icon.js +39 -0
- package/dist/components/ton-icon/ton-icon.js.map +1 -0
- package/dist/components/ton-icon/ton-icon.mjs +36 -0
- package/dist/components/ton-icon/ton-icon.mjs.map +1 -0
- package/dist/components/ton-icon/ton-icon.stories.d.ts +20 -0
- package/dist/components/ton-icon/ton-icon.stories.d.ts.map +1 -0
- package/dist/components/ton-icon/ton-icon.stories.js +71 -0
- package/dist/components/ton-icon/ton-icon.stories.js.map +1 -0
- package/dist/components/ton-icon/ton-icon.stories.mjs +60 -0
- package/dist/components/ton-icon/ton-icon.stories.mjs.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.d.ts +21 -0
- package/dist/features/balances/components/balance-badge/balance-badge.d.ts.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.js +41 -0
- package/dist/features/balances/components/balance-badge/balance-badge.js.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.mjs +34 -0
- package/dist/features/balances/components/balance-badge/balance-badge.mjs.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.module.css +19 -0
- package/dist/features/balances/components/balance-badge/balance-badge.module.css.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.d.ts +16 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.d.ts.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.js +59 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.js.map +1 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.mjs +51 -0
- package/dist/features/balances/components/balance-badge/balance-badge.stories.mjs.map +1 -0
- package/dist/features/balances/components/balance-badge/index.d.ts +9 -0
- package/dist/features/balances/components/balance-badge/index.d.ts.map +1 -0
- package/dist/features/balances/components/balance-badge/index.js +12 -0
- package/dist/features/balances/components/balance-badge/index.js.map +1 -0
- package/dist/features/balances/components/balance-badge/index.mjs +3 -0
- package/dist/features/balances/components/balance-badge/index.mjs.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.d.ts +17 -0
- package/dist/features/balances/components/currency-item/currency-item.d.ts.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.js +44 -0
- package/dist/features/balances/components/currency-item/currency-item.js.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.mjs +37 -0
- package/dist/features/balances/components/currency-item/currency-item.mjs.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.module.css +69 -0
- package/dist/features/balances/components/currency-item/currency-item.module.css.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.d.ts +19 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.d.ts.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.js +89 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.js.map +1 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.mjs +79 -0
- package/dist/features/balances/components/currency-item/currency-item.stories.mjs.map +1 -0
- package/dist/features/balances/components/currency-item/index.d.ts +9 -0
- package/dist/features/balances/components/currency-item/index.d.ts.map +1 -0
- package/dist/features/balances/components/currency-item/index.js +14 -0
- package/dist/features/balances/components/currency-item/index.js.map +1 -0
- package/dist/features/balances/components/currency-item/index.mjs +3 -0
- package/dist/features/balances/components/currency-item/index.mjs.map +1 -0
- package/dist/features/balances/components/send-jetton-button/index.d.ts +9 -0
- package/dist/features/balances/components/send-jetton-button/index.d.ts.map +1 -0
- package/dist/features/balances/components/send-jetton-button/index.js +14 -0
- package/dist/features/balances/components/send-jetton-button/index.js.map +1 -0
- package/dist/features/balances/components/send-jetton-button/index.mjs +3 -0
- package/dist/features/balances/components/send-jetton-button/index.mjs.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.d.ts +21 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.d.ts.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.js +56 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.js.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.mjs +54 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.mjs.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts +22 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.js +58 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.js.map +1 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.mjs +49 -0
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.mjs.map +1 -0
- package/dist/features/balances/components/send-ton-button/index.d.ts +9 -0
- package/dist/features/balances/components/send-ton-button/index.d.ts.map +1 -0
- package/dist/features/balances/components/send-ton-button/index.js +14 -0
- package/dist/features/balances/components/send-ton-button/index.js.map +1 -0
- package/dist/features/balances/components/send-ton-button/index.mjs +3 -0
- package/dist/features/balances/components/send-ton-button/index.mjs.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.d.ts +16 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.d.ts.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.js +33 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.js.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.mjs +31 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.mjs.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.d.ts +21 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.d.ts.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.js +52 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.js.map +1 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.mjs +44 -0
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.mjs.map +1 -0
- package/dist/features/balances/hooks/use-balance-by-address.d.ts +16 -0
- package/dist/features/balances/hooks/use-balance-by-address.d.ts.map +1 -0
- package/dist/features/balances/hooks/use-balance-by-address.js +14 -0
- package/dist/features/balances/hooks/use-balance-by-address.js.map +1 -0
- package/dist/features/balances/hooks/use-balance-by-address.mjs +12 -0
- package/dist/features/balances/hooks/use-balance-by-address.mjs.map +1 -0
- package/dist/features/balances/hooks/use-balance.d.ts +16 -0
- package/dist/features/balances/hooks/use-balance.d.ts.map +1 -0
- package/dist/features/balances/hooks/use-balance.js +13 -0
- package/dist/features/balances/hooks/use-balance.js.map +1 -0
- package/dist/features/balances/hooks/use-balance.mjs +11 -0
- package/dist/features/balances/hooks/use-balance.mjs.map +1 -0
- package/dist/features/balances/index.d.ts +14 -0
- package/dist/features/balances/index.d.ts.map +1 -0
- package/dist/features/balances/index.js +49 -0
- package/dist/features/balances/index.js.map +1 -0
- package/dist/features/balances/index.mjs +8 -0
- package/dist/features/balances/index.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.d.ts +16 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.js +14 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.js.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.mjs +12 -0
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-info.d.ts +16 -0
- package/dist/features/jettons/hooks/use-jetton-info.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-info.js +14 -0
- package/dist/features/jettons/hooks/use-jetton-info.js.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-info.mjs +12 -0
- package/dist/features/jettons/hooks/use-jetton-info.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.d.ts +16 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.js +14 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.js.map +1 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.mjs +12 -0
- package/dist/features/jettons/hooks/use-jetton-wallet-address.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.d.ts +16 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.js +14 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.js.map +1 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.mjs +12 -0
- package/dist/features/jettons/hooks/use-jettons-by-address.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-jettons.d.ts +16 -0
- package/dist/features/jettons/hooks/use-jettons.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-jettons.js +13 -0
- package/dist/features/jettons/hooks/use-jettons.js.map +1 -0
- package/dist/features/jettons/hooks/use-jettons.mjs +11 -0
- package/dist/features/jettons/hooks/use-jettons.mjs.map +1 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.d.ts +14 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.d.ts.map +1 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.js +14 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.js.map +1 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.mjs +12 -0
- package/dist/features/jettons/hooks/use-transfer-jetton.mjs.map +1 -0
- package/dist/features/jettons/index.d.ts +14 -0
- package/dist/features/jettons/index.d.ts.map +1 -0
- package/dist/features/jettons/index.js +49 -0
- package/dist/features/jettons/index.js.map +1 -0
- package/dist/features/jettons/index.mjs +8 -0
- package/dist/features/jettons/index.mjs.map +1 -0
- package/dist/features/network/hooks/use-network.d.ts +14 -0
- package/dist/features/network/hooks/use-network.d.ts.map +1 -0
- package/dist/features/network/hooks/use-network.js +13 -0
- package/dist/features/network/hooks/use-network.js.map +1 -0
- package/dist/features/network/hooks/use-network.mjs +11 -0
- package/dist/features/network/hooks/use-network.mjs.map +1 -0
- package/dist/features/network/hooks/use-networks.d.ts +14 -0
- package/dist/features/network/hooks/use-networks.d.ts.map +1 -0
- package/dist/features/network/hooks/use-networks.js +23 -0
- package/dist/features/network/hooks/use-networks.js.map +1 -0
- package/dist/features/network/hooks/use-networks.mjs +21 -0
- package/dist/features/network/hooks/use-networks.mjs.map +1 -0
- package/dist/features/network/index.d.ts +10 -0
- package/dist/features/network/index.d.ts.map +1 -0
- package/dist/features/network/index.js +17 -0
- package/dist/features/network/index.js.map +1 -0
- package/dist/features/network/index.mjs +4 -0
- package/dist/features/network/index.mjs.map +1 -0
- package/dist/features/nft/components/nft-item/index.d.ts +9 -0
- package/dist/features/nft/components/nft-item/index.d.ts.map +1 -0
- package/dist/features/nft/components/nft-item/index.js +14 -0
- package/dist/features/nft/components/nft-item/index.js.map +1 -0
- package/dist/features/nft/components/nft-item/index.mjs +3 -0
- package/dist/features/nft/components/nft-item/index.mjs.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.d.ts +14 -0
- package/dist/features/nft/components/nft-item/nft-item.d.ts.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.js +43 -0
- package/dist/features/nft/components/nft-item/nft-item.js.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.mjs +36 -0
- package/dist/features/nft/components/nft-item/nft-item.mjs.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.module.css +65 -0
- package/dist/features/nft/components/nft-item/nft-item.module.css.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.d.ts +25 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.d.ts.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.js +124 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.js.map +1 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.mjs +110 -0
- package/dist/features/nft/components/nft-item/nft-item.stories.mjs.map +1 -0
- package/dist/features/nft/hooks/use-nft.d.ts +16 -0
- package/dist/features/nft/hooks/use-nft.d.ts.map +1 -0
- package/dist/features/nft/hooks/use-nft.js +14 -0
- package/dist/features/nft/hooks/use-nft.js.map +1 -0
- package/dist/features/nft/hooks/use-nft.mjs +12 -0
- package/dist/features/nft/hooks/use-nft.mjs.map +1 -0
- package/dist/features/nft/hooks/use-nfts-by-address.d.ts +16 -0
- package/dist/features/nft/hooks/use-nfts-by-address.d.ts.map +1 -0
- package/dist/features/nft/hooks/use-nfts-by-address.js +14 -0
- package/dist/features/nft/hooks/use-nfts-by-address.js.map +1 -0
- package/dist/features/nft/hooks/use-nfts-by-address.mjs +12 -0
- package/dist/features/nft/hooks/use-nfts-by-address.mjs.map +1 -0
- package/dist/features/nft/hooks/use-nfts.d.ts +16 -0
- package/dist/features/nft/hooks/use-nfts.d.ts.map +1 -0
- package/dist/features/nft/hooks/use-nfts.js +13 -0
- package/dist/features/nft/hooks/use-nfts.js.map +1 -0
- package/dist/features/nft/hooks/use-nfts.mjs +11 -0
- package/dist/features/nft/hooks/use-nfts.mjs.map +1 -0
- package/dist/features/nft/hooks/use-transfer-nft.d.ts +14 -0
- package/dist/features/nft/hooks/use-transfer-nft.d.ts.map +1 -0
- package/dist/features/nft/hooks/use-transfer-nft.js +14 -0
- package/dist/features/nft/hooks/use-transfer-nft.js.map +1 -0
- package/dist/features/nft/hooks/use-transfer-nft.mjs +12 -0
- package/dist/features/nft/hooks/use-transfer-nft.mjs.map +1 -0
- package/dist/features/nft/index.d.ts +13 -0
- package/dist/features/nft/index.d.ts.map +1 -0
- package/dist/features/nft/index.js +42 -0
- package/dist/features/nft/index.js.map +1 -0
- package/dist/features/nft/index.mjs +7 -0
- package/dist/features/nft/index.mjs.map +1 -0
- package/dist/features/signing/hooks/use-sign-binary.d.ts +25 -0
- package/dist/features/signing/hooks/use-sign-binary.d.ts.map +1 -0
- package/dist/features/signing/hooks/use-sign-binary.js +14 -0
- package/dist/features/signing/hooks/use-sign-binary.js.map +1 -0
- package/dist/features/signing/hooks/use-sign-binary.mjs +12 -0
- package/dist/features/signing/hooks/use-sign-binary.mjs.map +1 -0
- package/dist/features/signing/hooks/use-sign-cell.d.ts +26 -0
- package/dist/features/signing/hooks/use-sign-cell.d.ts.map +1 -0
- package/dist/features/signing/hooks/use-sign-cell.js +14 -0
- package/dist/features/signing/hooks/use-sign-cell.js.map +1 -0
- package/dist/features/signing/hooks/use-sign-cell.mjs +12 -0
- package/dist/features/signing/hooks/use-sign-cell.mjs.map +1 -0
- package/dist/features/signing/hooks/use-sign-text.d.ts +25 -0
- package/dist/features/signing/hooks/use-sign-text.d.ts.map +1 -0
- package/dist/features/signing/hooks/use-sign-text.js +14 -0
- package/dist/features/signing/hooks/use-sign-text.js.map +1 -0
- package/dist/features/signing/hooks/use-sign-text.mjs +12 -0
- package/dist/features/signing/hooks/use-sign-text.mjs.map +1 -0
- package/dist/features/signing/index.d.ts +11 -0
- package/dist/features/signing/index.d.ts.map +1 -0
- package/dist/features/signing/index.js +28 -0
- package/dist/features/signing/index.js.map +1 -0
- package/dist/features/signing/index.mjs +5 -0
- package/dist/features/signing/index.mjs.map +1 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.d.ts +13 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.d.ts.map +1 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.js +14 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.js.map +1 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.mjs +12 -0
- package/dist/features/swap/hooks/use-build-swap-transaction.mjs.map +1 -0
- package/dist/features/swap/hooks/use-swap-quote.d.ts +13 -0
- package/dist/features/swap/hooks/use-swap-quote.d.ts.map +1 -0
- package/dist/features/swap/hooks/use-swap-quote.js +14 -0
- package/dist/features/swap/hooks/use-swap-quote.js.map +1 -0
- package/dist/features/swap/hooks/use-swap-quote.mjs +12 -0
- package/dist/features/swap/hooks/use-swap-quote.mjs.map +1 -0
- package/dist/features/swap/index.d.ts +10 -0
- package/dist/features/swap/index.d.ts.map +1 -0
- package/dist/features/swap/index.js +21 -0
- package/dist/features/swap/index.js.map +1 -0
- package/dist/features/swap/index.mjs +4 -0
- package/dist/features/swap/index.mjs.map +1 -0
- package/dist/features/transaction/components/transaction/index.d.ts +10 -0
- package/dist/features/transaction/components/transaction/index.d.ts.map +1 -0
- package/dist/features/transaction/components/transaction/index.js +12 -0
- package/dist/features/transaction/components/transaction/index.js.map +1 -0
- package/dist/features/transaction/components/transaction/index.mjs +3 -0
- package/dist/features/transaction/components/transaction/index.mjs.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.d.ts +30 -0
- package/dist/features/transaction/components/transaction/transaction.d.ts.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.js +49 -0
- package/dist/features/transaction/components/transaction/transaction.js.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.mjs +47 -0
- package/dist/features/transaction/components/transaction/transaction.mjs.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.stories.d.ts +23 -0
- package/dist/features/transaction/components/transaction/transaction.stories.d.ts.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.stories.js +64 -0
- package/dist/features/transaction/components/transaction/transaction.stories.js.map +1 -0
- package/dist/features/transaction/components/transaction/transaction.stories.mjs +54 -0
- package/dist/features/transaction/components/transaction/transaction.stories.mjs.map +1 -0
- package/dist/features/transaction/components/transaction-provider/index.d.ts +10 -0
- package/dist/features/transaction/components/transaction-provider/index.d.ts.map +1 -0
- package/dist/features/transaction/components/transaction-provider/index.js +20 -0
- package/dist/features/transaction/components/transaction-provider/index.js.map +1 -0
- package/dist/features/transaction/components/transaction-provider/index.mjs +3 -0
- package/dist/features/transaction/components/transaction-provider/index.mjs.map +1 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.d.ts +36 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.d.ts.map +1 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.js +76 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.js.map +1 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.mjs +72 -0
- package/dist/features/transaction/components/transaction-provider/transaction-provider.mjs.map +1 -0
- package/dist/features/transaction/hooks/use-send-transaction.d.ts +14 -0
- package/dist/features/transaction/hooks/use-send-transaction.d.ts.map +1 -0
- package/dist/features/transaction/hooks/use-send-transaction.js +14 -0
- package/dist/features/transaction/hooks/use-send-transaction.js.map +1 -0
- package/dist/features/transaction/hooks/use-send-transaction.mjs +12 -0
- package/dist/features/transaction/hooks/use-send-transaction.mjs.map +1 -0
- package/dist/features/transaction/hooks/use-transfer-ton.d.ts +14 -0
- package/dist/features/transaction/hooks/use-transfer-ton.d.ts.map +1 -0
- package/dist/features/transaction/hooks/use-transfer-ton.js +14 -0
- package/dist/features/transaction/hooks/use-transfer-ton.js.map +1 -0
- package/dist/features/transaction/hooks/use-transfer-ton.mjs +12 -0
- package/dist/features/transaction/hooks/use-transfer-ton.mjs.map +1 -0
- package/dist/features/transaction/index.d.ts +11 -0
- package/dist/features/transaction/index.d.ts.map +1 -0
- package/dist/features/transaction/index.js +28 -0
- package/dist/features/transaction/index.js.map +1 -0
- package/dist/features/transaction/index.mjs +5 -0
- package/dist/features/transaction/index.mjs.map +1 -0
- package/dist/features/wallets/components/connect-button/index.d.ts +9 -0
- package/dist/features/wallets/components/connect-button/index.d.ts.map +1 -0
- package/dist/features/wallets/components/connect-button/index.js +12 -0
- package/dist/features/wallets/components/connect-button/index.js.map +1 -0
- package/dist/features/wallets/components/connect-button/index.mjs +3 -0
- package/dist/features/wallets/components/connect-button/index.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-address.d.ts +13 -0
- package/dist/features/wallets/hooks/use-address.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-address.js +13 -0
- package/dist/features/wallets/hooks/use-address.js.map +1 -0
- package/dist/features/wallets/hooks/use-address.mjs +11 -0
- package/dist/features/wallets/hooks/use-address.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-connect.d.ts +14 -0
- package/dist/features/wallets/hooks/use-connect.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-connect.js +14 -0
- package/dist/features/wallets/hooks/use-connect.js.map +1 -0
- package/dist/features/wallets/hooks/use-connect.mjs +12 -0
- package/dist/features/wallets/hooks/use-connect.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-connected-wallets.d.ts +11 -0
- package/dist/features/wallets/hooks/use-connected-wallets.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-connected-wallets.js +23 -0
- package/dist/features/wallets/hooks/use-connected-wallets.js.map +1 -0
- package/dist/features/wallets/hooks/use-connected-wallets.mjs +21 -0
- package/dist/features/wallets/hooks/use-connected-wallets.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-connector-by-id.d.ts +10 -0
- package/dist/features/wallets/hooks/use-connector-by-id.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-connector-by-id.js +23 -0
- package/dist/features/wallets/hooks/use-connector-by-id.js.map +1 -0
- package/dist/features/wallets/hooks/use-connector-by-id.mjs +21 -0
- package/dist/features/wallets/hooks/use-connector-by-id.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-connectors.d.ts +11 -0
- package/dist/features/wallets/hooks/use-connectors.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-connectors.js +23 -0
- package/dist/features/wallets/hooks/use-connectors.js.map +1 -0
- package/dist/features/wallets/hooks/use-connectors.mjs +21 -0
- package/dist/features/wallets/hooks/use-connectors.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-disconnect.d.ts +14 -0
- package/dist/features/wallets/hooks/use-disconnect.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-disconnect.js +14 -0
- package/dist/features/wallets/hooks/use-disconnect.js.map +1 -0
- package/dist/features/wallets/hooks/use-disconnect.mjs +12 -0
- package/dist/features/wallets/hooks/use-disconnect.mjs.map +1 -0
- package/dist/features/wallets/hooks/use-selected-wallet.d.ts +14 -0
- package/dist/features/wallets/hooks/use-selected-wallet.d.ts.map +1 -0
- package/dist/features/wallets/hooks/use-selected-wallet.js +30 -0
- package/dist/features/wallets/hooks/use-selected-wallet.js.map +1 -0
- package/dist/features/wallets/hooks/use-selected-wallet.mjs +28 -0
- package/dist/features/wallets/hooks/use-selected-wallet.mjs.map +1 -0
- package/dist/features/wallets/index.d.ts +16 -0
- package/dist/features/wallets/index.d.ts.map +1 -0
- package/dist/features/wallets/index.js +63 -0
- package/dist/features/wallets/index.js.map +1 -0
- package/dist/features/wallets/index.mjs +10 -0
- package/dist/features/wallets/index.mjs.map +1 -0
- package/dist/global.d.js +4 -0
- package/dist/global.d.js.map +1 -0
- package/dist/global.d.mjs +3 -0
- package/dist/global.d.mjs.map +1 -0
- package/dist/hooks/use-app-kit-theme.d.ts +10 -0
- package/dist/hooks/use-app-kit-theme.d.ts.map +1 -0
- package/dist/hooks/use-app-kit-theme.js +16 -0
- package/dist/hooks/use-app-kit-theme.js.map +1 -0
- package/dist/hooks/use-app-kit-theme.mjs +14 -0
- package/dist/hooks/use-app-kit-theme.mjs.map +1 -0
- package/dist/hooks/use-app-kit.d.ts +9 -0
- package/dist/hooks/use-app-kit.d.ts.map +1 -0
- package/dist/hooks/use-app-kit.js +16 -0
- package/dist/hooks/use-app-kit.js.map +1 -0
- package/dist/hooks/use-app-kit.mjs +14 -0
- package/dist/hooks/use-app-kit.mjs.map +1 -0
- package/dist/hooks/use-i18n.d.ts +9 -0
- package/dist/hooks/use-i18n.d.ts.map +1 -0
- package/dist/hooks/use-i18n.js +16 -0
- package/dist/hooks/use-i18n.js.map +1 -0
- package/dist/hooks/use-i18n.mjs +14 -0
- package/dist/hooks/use-i18n.mjs.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +1 -0
- package/dist/libs/i18n.d.ts +34 -0
- package/dist/libs/i18n.d.ts.map +1 -0
- package/dist/libs/i18n.js +22 -0
- package/dist/libs/i18n.js.map +1 -0
- package/dist/libs/i18n.mjs +11 -0
- package/dist/libs/i18n.mjs.map +1 -0
- package/dist/libs/query.d.ts +26 -0
- package/dist/libs/query.d.ts.map +1 -0
- package/dist/libs/query.js +20 -0
- package/dist/libs/query.js.map +1 -0
- package/dist/libs/query.mjs +15 -0
- package/dist/libs/query.mjs.map +1 -0
- package/dist/locales/en.d.ts +29 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/en.js +30 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/en.mjs +28 -0
- package/dist/locales/en.mjs.map +1 -0
- package/dist/providers/app-kit-provider.d.ts +15 -0
- package/dist/providers/app-kit-provider.d.ts.map +1 -0
- package/dist/providers/app-kit-provider.js +16 -0
- package/dist/providers/app-kit-provider.js.map +1 -0
- package/dist/providers/app-kit-provider.mjs +13 -0
- package/dist/providers/app-kit-provider.mjs.map +1 -0
- package/dist/providers/i18n-provider.d.ts +22 -0
- package/dist/providers/i18n-provider.d.ts.map +1 -0
- package/dist/providers/i18n-provider.js +55 -0
- package/dist/providers/i18n-provider.js.map +1 -0
- package/dist/providers/i18n-provider.mjs +52 -0
- package/dist/providers/i18n-provider.mjs.map +1 -0
- package/dist/styles/index.css +73 -0
- package/dist/styles/index.css.map +1 -0
- package/dist/styles/typography.module.css +79 -0
- package/dist/styles/typography.module.css.map +1 -0
- package/dist/tonconnect/tonconnect-bridge.d.ts +19 -0
- package/dist/tonconnect/tonconnect-bridge.d.ts.map +1 -0
- package/dist/tonconnect/tonconnect-bridge.js +23 -0
- package/dist/tonconnect/tonconnect-bridge.js.map +1 -0
- package/dist/tonconnect/tonconnect-bridge.mjs +21 -0
- package/dist/tonconnect/tonconnect-bridge.mjs.map +1 -0
- package/package.json +63 -7
package/README.md
CHANGED
|
@@ -1 +1,211 @@
|
|
|
1
|
-
|
|
1
|
+
# @ton/appkit-react
|
|
2
|
+
|
|
3
|
+
React components and hooks for AppKit.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
- [Initialization](#initialization)
|
|
8
|
+
- [Basic Usage](#basic-usage)
|
|
9
|
+
- [Swap](#swap)
|
|
10
|
+
- [Creating a Swap Provider](./docs/creating-swap-provider.md): Implement your own swap provider for any DEX or protocol.
|
|
11
|
+
- [Hooks](./docs/hooks.md): React hooks for wallet connection, state, and data fetching.
|
|
12
|
+
- [Components](./docs/components.md): UI components for AppKit.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @ton/appkit-react @tanstack/react-query @tonconnect/ui-react @ton/core @ton/crypto
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
|
|
22
|
+
`@ton/appkit-react` requires the following peer dependencies:
|
|
23
|
+
|
|
24
|
+
- `react` (>= 18.0.0)
|
|
25
|
+
- `react-dom` (>= 18.0.0)
|
|
26
|
+
- `@tanstack/react-query` (>= 5.0.0)
|
|
27
|
+
- `@tonconnect/ui-react` (>= 2.4.1)
|
|
28
|
+
|
|
29
|
+
## Initialization
|
|
30
|
+
|
|
31
|
+
Initialize `QueryClient` and `AppKit`, then wrap your application in `QueryClientProvider` and `AppKitProvider`.
|
|
32
|
+
|
|
33
|
+
> [!NOTE]
|
|
34
|
+
> Don't forget to import styles from `@ton/appkit-react/styles.css`.
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
38
|
+
import { AppKit, Network, TonConnectConnector } from '@ton/appkit';
|
|
39
|
+
import { AppKitProvider } from '@ton/appkit-react';
|
|
40
|
+
import type { FC } from 'react';
|
|
41
|
+
|
|
42
|
+
// Import styles
|
|
43
|
+
import '@ton/appkit-react/styles.css';
|
|
44
|
+
|
|
45
|
+
// Initialize QueryClient
|
|
46
|
+
const queryClient = new QueryClient({
|
|
47
|
+
defaultOptions: {
|
|
48
|
+
queries: {
|
|
49
|
+
refetchOnWindowFocus: false,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Initialize AppKit
|
|
55
|
+
const appKit = new AppKit({
|
|
56
|
+
networks: {
|
|
57
|
+
[Network.mainnet().chainId]: {
|
|
58
|
+
apiClient: {
|
|
59
|
+
url: 'https://toncenter.com',
|
|
60
|
+
key: 'your-key',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
// Optional: add testnet
|
|
64
|
+
// [Network.testnet().chainId]: {
|
|
65
|
+
// apiClient: {
|
|
66
|
+
// url: 'https://testnet.toncenter.com',
|
|
67
|
+
// key: 'your-key',
|
|
68
|
+
// },
|
|
69
|
+
// },
|
|
70
|
+
},
|
|
71
|
+
connectors: [
|
|
72
|
+
new TonConnectConnector({
|
|
73
|
+
tonConnectOptions: {
|
|
74
|
+
manifestUrl: 'https://tonconnect-sdk-demo-dapp.vercel.app/tonconnect-manifest.json',
|
|
75
|
+
},
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const App: FC = () => {
|
|
81
|
+
return (
|
|
82
|
+
<QueryClientProvider client={queryClient}>
|
|
83
|
+
<AppKitProvider appKit={appKit}>{/* <AppContent /> */}</AppKitProvider>
|
|
84
|
+
</QueryClientProvider>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
[Read more about TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview)
|
|
89
|
+
|
|
90
|
+
### TonConnect Configuration
|
|
91
|
+
|
|
92
|
+
When using `TonConnectConnector`, you can pass `tonConnectOptions` which accepts standard [TonConnectUI options](https://github.com/ton-connect/sdk/tree/main/packages/ui-react#parameters), including `manifestUrl`, `uiOptions`, etc.
|
|
93
|
+
|
|
94
|
+
## Basic Usage
|
|
95
|
+
|
|
96
|
+
### Connect Wallet
|
|
97
|
+
|
|
98
|
+
Use `TonConnectButton` to allow users to connect their wallets. It handles the connection flow and UI.
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
import { TonConnectButton } from '@ton/appkit-react';
|
|
102
|
+
|
|
103
|
+
export const Header = () => {
|
|
104
|
+
return (
|
|
105
|
+
<header>
|
|
106
|
+
<TonConnectButton />
|
|
107
|
+
</header>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Get Wallet Address
|
|
113
|
+
|
|
114
|
+
Use `useAddress` to get the currently connected wallet address.
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
import { useAddress } from '@ton/appkit-react';
|
|
118
|
+
|
|
119
|
+
export const AddressBlock = () => {
|
|
120
|
+
const address = useAddress();
|
|
121
|
+
|
|
122
|
+
if (!address) {
|
|
123
|
+
return <div>Wallet not connected</div>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return <div>Address: {address}</div>;
|
|
127
|
+
};
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Get Balance
|
|
131
|
+
|
|
132
|
+
Use `useBalance` to fetch the TON balance of the connected wallet.
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
import { useBalance } from '@ton/appkit-react';
|
|
136
|
+
|
|
137
|
+
export const Balance = () => {
|
|
138
|
+
const { data: balance, isLoading } = useBalance();
|
|
139
|
+
|
|
140
|
+
if (isLoading) {
|
|
141
|
+
return <div>Loading...</div>;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return <div>Balance: {balance?.toString()} TON</div>;
|
|
145
|
+
};
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
> See [Hooks Documentation](./docs/hooks.md) for all available hooks and [Components Documentation](./docs/components.md) for UI components.
|
|
149
|
+
|
|
150
|
+
## Swap
|
|
151
|
+
|
|
152
|
+
AppKit uses a provider-based architecture for swaps. Any DEX or protocol can implement a swap provider by extending the `SwapProvider` class — AppKit handles routing, hooks, and transaction building through a unified interface.
|
|
153
|
+
|
|
154
|
+
`OmnistonSwapProvider` is an available provider. You can use it, replace it, or run multiple providers side by side. To implement your own, see [Creating a Swap Provider](./docs/creating-swap-provider.md).
|
|
155
|
+
|
|
156
|
+
### Installation
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm install @ston-fi/omniston-sdk
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Setup
|
|
163
|
+
|
|
164
|
+
Initialize `AppKit` with `OmnistonSwapProvider`:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
// Initialize AppKit with swap provider
|
|
168
|
+
const appKit = new AppKit({
|
|
169
|
+
networks: {
|
|
170
|
+
[Network.mainnet().chainId]: {
|
|
171
|
+
apiClient: {
|
|
172
|
+
url: 'https://toncenter.com',
|
|
173
|
+
key: 'your-key',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
providers: [
|
|
178
|
+
new OmnistonSwapProvider({
|
|
179
|
+
// Optional configuration
|
|
180
|
+
apiUrl: 'https://api.ston.fi',
|
|
181
|
+
defaultSlippageBps: 100, // 1%
|
|
182
|
+
}),
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Hooks
|
|
188
|
+
|
|
189
|
+
Use `useSwapQuote` to get a quote and `useBuildSwapTransaction` to build the transaction.
|
|
190
|
+
|
|
191
|
+
See [Swap Hooks](./docs/hooks.md#swap) for usage examples.
|
|
192
|
+
|
|
193
|
+
## Migration from TonConnect UI
|
|
194
|
+
|
|
195
|
+
`AppKitProvider` automatically bridges TonConnect if a `TonConnectConnector` is configured, so `@tonconnect/ui-react` hooks (like `useTonAddress`, `useTonWallet`, etc.) work out of the box inside `AppKitProvider`.
|
|
196
|
+
|
|
197
|
+
You can use standard TonConnect hooks in your components:
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
import { useTonAddress } from '@tonconnect/ui-react';
|
|
201
|
+
|
|
202
|
+
export const AppContent: FC = () => {
|
|
203
|
+
const address = useTonAddress();
|
|
204
|
+
|
|
205
|
+
return <p>Address: {address}</p>;
|
|
206
|
+
};
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
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 type { FC, ComponentProps } from 'react';
|
|
9
|
+
export interface BlockProps extends ComponentProps<'div'> {
|
|
10
|
+
direction?: 'row' | 'column';
|
|
11
|
+
}
|
|
12
|
+
export declare const Block: FC<BlockProps>;
|
|
13
|
+
//# sourceMappingURL=block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/components/block/block.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,KAAK,CAAC;IACrD,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAEhC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var styles = require('./block.module.css');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
10
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
11
|
+
|
|
12
|
+
const Block = ({ className, direction = "column", ...props }) => {
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx__default.default(styles__default.default.block, direction === "row" && styles__default.default.row, className), ...props });
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.Block = Block;
|
|
17
|
+
//# sourceMappingURL=block.js.map
|
|
18
|
+
//# sourceMappingURL=block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/block/block.tsx"],"names":["jsx","clsx","styles"],"mappings":";;;;;;;;;;;AAiBO,MAAM,KAAA,GAAwB,CAAC,EAAE,SAAA,EAAW,YAAY,QAAA,EAAU,GAAG,OAAM,KAAM;AACpF,EAAA,uBAAOA,cAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAWC,qBAAA,CAAKC,uBAAA,CAAO,KAAA,EAAO,SAAA,KAAc,KAAA,IAASA,uBAAA,CAAO,GAAA,EAAK,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxG","file":"block.js","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FC, ComponentProps } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './block.module.css';\n\nexport interface BlockProps extends ComponentProps<'div'> {\n direction?: 'row' | 'column';\n}\n\nexport const Block: FC<BlockProps> = ({ className, direction = 'column', ...props }) => {\n return <div className={clsx(styles.block, direction === 'row' && styles.row, className)} {...props} />;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import styles from './block.module.css';
|
|
4
|
+
|
|
5
|
+
const Block = ({ className, direction = "column", ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: clsx(styles.block, direction === "row" && styles.row, className), ...props });
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { Block };
|
|
10
|
+
//# sourceMappingURL=block.mjs.map
|
|
11
|
+
//# sourceMappingURL=block.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/block/block.tsx"],"names":[],"mappings":";;;;AAiBO,MAAM,KAAA,GAAwB,CAAC,EAAE,SAAA,EAAW,YAAY,QAAA,EAAU,GAAG,OAAM,KAAM;AACpF,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,IAAA,CAAK,MAAA,CAAO,KAAA,EAAO,SAAA,KAAc,KAAA,IAAS,MAAA,CAAO,GAAA,EAAK,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxG","file":"block.mjs","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FC, ComponentProps } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './block.module.css';\n\nexport interface BlockProps extends ComponentProps<'div'> {\n direction?: 'row' | 'column';\n}\n\nexport const Block: FC<BlockProps> = ({ className, direction = 'column', ...props }) => {\n return <div className={clsx(styles.block, direction === 'row' && styles.row, className)} {...props} />;\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.block {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
padding: 16px;
|
|
6
|
+
border-radius: var(--ta-border-radius-l);
|
|
7
|
+
background-color: var(--ta-color-block);
|
|
8
|
+
}
|
|
9
|
+
.row {
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
/*# sourceMappingURL=block.module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/block/block.module.css"],"sourcesContent":[".block {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: 16px;\n border-radius: var(--ta-border-radius-l);\n background-color: var(--ta-color-block);\n}\n\n.row {\n flex-direction: row;\n align-items: center;\n}\n"],"mappings":"AAAA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,cAAY;AACZ,WAAS;AACT,iBAAe,IAAI;AACnB,oBAAkB,IAAI;AACxB;AAEA,CAAC;AACC,kBAAgB;AAChB,eAAa;AACf;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 type { Meta, StoryObj } from '@storybook/react';
|
|
9
|
+
import { Block } from './block';
|
|
10
|
+
declare const meta: Meta<typeof Block>;
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof Block>;
|
|
13
|
+
export declare const Column: Story;
|
|
14
|
+
export declare const Row: Story;
|
|
15
|
+
//# sourceMappingURL=block.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block.stories.d.ts","sourceRoot":"","sources":["../../../src/components/block/block.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAU5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,MAAM,EAAE,KAWpB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAWjB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var block = require('./block');
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Private/Components/Block",
|
|
10
|
+
component: block.Block,
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
argTypes: {
|
|
13
|
+
direction: {
|
|
14
|
+
control: "radio",
|
|
15
|
+
options: ["row", "column"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var block_stories_default = meta;
|
|
20
|
+
const Column = {
|
|
21
|
+
args: {
|
|
22
|
+
direction: "column",
|
|
23
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 1" }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 2" }),
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 3" })
|
|
27
|
+
] })
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const Row = {
|
|
31
|
+
args: {
|
|
32
|
+
direction: "row",
|
|
33
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 1" }),
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 2" }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 3" })
|
|
37
|
+
] })
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.Column = Column;
|
|
42
|
+
exports.Row = Row;
|
|
43
|
+
exports.default = block_stories_default;
|
|
44
|
+
//# sourceMappingURL=block.stories.js.map
|
|
45
|
+
//# sourceMappingURL=block.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/block/block.stories.tsx"],"names":["Block","jsxs","Fragment","jsx"],"mappings":";;;;;;;AAYA,MAAM,IAAA,GAA2B;AAAA,EAC7B,KAAA,EAAO,0BAAA;AAAA,EACP,SAAA,EAAWA,WAAA;AAAA,EACX,IAAA,EAAM,CAAC,UAAU,CAAA;AAAA,EACjB,QAAA,EAAU;AAAA,IACN,SAAA,EAAW;AAAA,MACP,OAAA,EAAS,OAAA;AAAA,MACT,OAAA,EAAS,CAAC,KAAA,EAAO,QAAQ;AAAA;AAC7B;AAER,CAAA;AAEA,IAAO,qBAAA,GAAQ;AAIR,MAAM,MAAA,GAAgB;AAAA,EACzB,IAAA,EAAM;AAAA,IACF,SAAA,EAAW,QAAA;AAAA,IACX,0BACIC,eAAA,CAAAC,mBAAA,EAAA,EACI,QAAA,EAAA;AAAA,sBAAAC,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,YAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7EA,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7EA,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM;AAAA,KAAA,EACjF;AAAA;AAGZ;AAEO,MAAM,GAAA,GAAa;AAAA,EACtB,IAAA,EAAM;AAAA,IACF,SAAA,EAAW,KAAA;AAAA,IACX,0BACIF,eAAA,CAAAC,mBAAA,EAAA,EACI,QAAA,EAAA;AAAA,sBAAAC,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,YAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7EA,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7EA,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM;AAAA,KAAA,EACjF;AAAA;AAGZ","file":"block.stories.js","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Block } from './block';\n\nconst meta: Meta<typeof Block> = {\n title: 'Private/Components/Block',\n component: Block,\n tags: ['autodocs'],\n argTypes: {\n direction: {\n control: 'radio',\n options: ['row', 'column'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Block>;\n\nexport const Column: Story = {\n args: {\n direction: 'column',\n children: (\n <>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 1</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 2</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 3</div>\n </>\n ),\n },\n};\n\nexport const Row: Story = {\n args: {\n direction: 'row',\n children: (\n <>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 1</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 2</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 3</div>\n </>\n ),\n },\n};\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Block } from './block';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Private/Components/Block",
|
|
6
|
+
component: Block,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
direction: {
|
|
10
|
+
control: "radio",
|
|
11
|
+
options: ["row", "column"]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var block_stories_default = meta;
|
|
16
|
+
const Column = {
|
|
17
|
+
args: {
|
|
18
|
+
direction: "column",
|
|
19
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 1" }),
|
|
21
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 2" }),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 3" })
|
|
23
|
+
] })
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const Row = {
|
|
27
|
+
args: {
|
|
28
|
+
direction: "row",
|
|
29
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 1" }),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 2" }),
|
|
32
|
+
/* @__PURE__ */ jsx("div", { style: { padding: "8px", background: "#0098EB", color: "white" }, children: "Item 3" })
|
|
33
|
+
] })
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { Column, Row, block_stories_default as default };
|
|
38
|
+
//# sourceMappingURL=block.stories.mjs.map
|
|
39
|
+
//# sourceMappingURL=block.stories.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/block/block.stories.tsx"],"names":[],"mappings":";;;AAYA,MAAM,IAAA,GAA2B;AAAA,EAC7B,KAAA,EAAO,0BAAA;AAAA,EACP,SAAA,EAAW,KAAA;AAAA,EACX,IAAA,EAAM,CAAC,UAAU,CAAA;AAAA,EACjB,QAAA,EAAU;AAAA,IACN,SAAA,EAAW;AAAA,MACP,OAAA,EAAS,OAAA;AAAA,MACT,OAAA,EAAS,CAAC,KAAA,EAAO,QAAQ;AAAA;AAC7B;AAER,CAAA;AAEA,IAAO,qBAAA,GAAQ;AAIR,MAAM,MAAA,GAAgB;AAAA,EACzB,IAAA,EAAM;AAAA,IACF,SAAA,EAAW,QAAA;AAAA,IACX,0BACI,IAAA,CAAA,QAAA,EAAA,EACI,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,YAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7E,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7E,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM;AAAA,KAAA,EACjF;AAAA;AAGZ;AAEO,MAAM,GAAA,GAAa;AAAA,EACtB,IAAA,EAAM;AAAA,IACF,SAAA,EAAW,KAAA;AAAA,IACX,0BACI,IAAA,CAAA,QAAA,EAAA,EACI,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,YAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7E,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM,CAAA;AAAA,sBAC7E,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAO,EAAE,OAAA,EAAS,KAAA,EAAO,UAAA,EAAY,SAAA,EAAW,KAAA,EAAO,OAAA,EAAQ,EAAG,QAAA,EAAA,QAAA,EAAM;AAAA,KAAA,EACjF;AAAA;AAGZ","file":"block.stories.mjs","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Block } from './block';\n\nconst meta: Meta<typeof Block> = {\n title: 'Private/Components/Block',\n component: Block,\n tags: ['autodocs'],\n argTypes: {\n direction: {\n control: 'radio',\n options: ['row', 'column'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Block>;\n\nexport const Column: Story = {\n args: {\n direction: 'column',\n children: (\n <>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 1</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 2</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 3</div>\n </>\n ),\n },\n};\n\nexport const Row: Story = {\n args: {\n direction: 'row',\n children: (\n <>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 1</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 2</div>\n <div style={{ padding: '8px', background: '#0098EB', color: 'white' }}>Item 3</div>\n </>\n ),\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var block = require('./block');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(block).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return block[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs","sourcesContent":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 type { FC, ComponentProps } from 'react';
|
|
9
|
+
export declare const Button: FC<ComponentProps<'button'>>;
|
|
10
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKhD,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,CAE/C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var styles = require('./button.module.css');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
10
|
+
var styles__default = /*#__PURE__*/_interopDefault(styles);
|
|
11
|
+
|
|
12
|
+
const Button = ({ className, ...props }) => {
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { className: clsx__default.default(styles__default.default.button, className), ...props });
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.Button = Button;
|
|
17
|
+
//# sourceMappingURL=button.js.map
|
|
18
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.tsx"],"names":["jsx","clsx","styles"],"mappings":";;;;;;;;;;;AAaO,MAAM,SAAuC,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAAM;AAC7E,EAAA,uBAAOA,cAAA,CAAC,YAAO,SAAA,EAAWC,qBAAA,CAAKC,wBAAO,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACzE","file":"button.js","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FC, ComponentProps } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './button.module.css';\n\nexport const Button: FC<ComponentProps<'button'>> = ({ className, ...props }) => {\n return <button className={clsx(styles.button, className)} {...props} />;\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import styles from './button.module.css';
|
|
4
|
+
|
|
5
|
+
const Button = ({ className, ...props }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("button", { className: clsx(styles.button, className), ...props });
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { Button };
|
|
10
|
+
//# sourceMappingURL=button.mjs.map
|
|
11
|
+
//# sourceMappingURL=button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":";;;;AAaO,MAAM,SAAuC,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,KAAM;AAC7E,EAAA,uBAAO,GAAA,CAAC,YAAO,SAAA,EAAW,IAAA,CAAK,OAAO,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACzE","file":"button.mjs","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { FC, ComponentProps } from 'react';\nimport clsx from 'clsx';\n\nimport styles from './button.module.css';\n\nexport const Button: FC<ComponentProps<'button'>> = ({ className, ...props }) => {\n return <button className={clsx(styles.button, className)} {...props} />;\n};\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
composes: bodyMedium from "../../styles/typography.module.css";
|
|
3
|
+
appearance: none;
|
|
4
|
+
border: none;
|
|
5
|
+
outline: none;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
padding: 8px 16px;
|
|
9
|
+
border-radius: 20px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
background-color: var(--ta-color-primary);
|
|
15
|
+
color: var(--ta-color-primary-foreground);
|
|
16
|
+
transition: transform 0.125s ease-in-out, background-color 0.2s ease;
|
|
17
|
+
will-change: transform;
|
|
18
|
+
}
|
|
19
|
+
.button:hover {
|
|
20
|
+
transform: scale(1.02);
|
|
21
|
+
}
|
|
22
|
+
.button:active {
|
|
23
|
+
transform: scale(0.98);
|
|
24
|
+
}
|
|
25
|
+
.button:disabled {
|
|
26
|
+
opacity: 0.5;
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
.button:disabled:hover,
|
|
30
|
+
.button:disabled:active {
|
|
31
|
+
transform: none;
|
|
32
|
+
}
|
|
33
|
+
/*# sourceMappingURL=button.module.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.module.css"],"sourcesContent":[".button {\n composes: bodyMedium from \"../../styles/typography.module.css\";\n appearance: none;\n border: none;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n padding: 8px 16px;\n border-radius: 20px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n\n background-color: var(--ta-color-primary); \n color: var(--ta-color-primary-foreground);\n transition: transform 0.125s ease-in-out, background-color 0.2s ease;\n will-change: transform;\n}\n\n.button:hover {\n transform: scale(1.02);\n}\n\n.button:active {\n transform: scale(0.98);\n}\n\n.button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.button:disabled:hover,\n.button:disabled:active {\n transform: none;\n}\n"],"mappings":"AAAA,CAAC;AACC,YAAU,WAAW,KAAK;AAC1B,cAAY;AACZ,UAAQ;AACR,WAAS;AACT,UAAQ;AACR,cAAY;AACZ,WAAS,IAAI;AACb,iBAAe;AAEf,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK;AAEL,oBAAkB,IAAI;AACtB,SAAO,IAAI;AACX,cAAY,UAAU,OAAO,WAAW,EAAE,iBAAiB,KAAK;AAChE,eAAa;AACf;AAEA,CArBC,MAqBM;AACL,aAAW,MAAM;AACnB;AAEA,CAzBC,MAyBM;AACL,aAAW,MAAM;AACnB;AAEA,CA7BC,MA6BM;AACL,WAAS;AACT,UAAQ;AACV;AAEA,CAlCC,MAkCM,SAAS;AAChB,CAnCC,MAmCM,SAAS;AACd,aAAW;AACb;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
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 type { Meta, StoryObj } from '@storybook/react';
|
|
9
|
+
import { Button } from './button';
|
|
10
|
+
declare const meta: Meta<typeof Button>;
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof Button>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Disabled: Story;
|
|
15
|
+
export declare const WithIcon: Story;
|
|
16
|
+
//# sourceMappingURL=button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAS7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var button = require('./button');
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Public/Components/Button",
|
|
10
|
+
component: button.Button,
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
argTypes: {
|
|
13
|
+
disabled: {
|
|
14
|
+
control: "boolean"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var button_stories_default = meta;
|
|
19
|
+
const Default = {
|
|
20
|
+
args: {
|
|
21
|
+
children: "Click me"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const Disabled = {
|
|
25
|
+
args: {
|
|
26
|
+
children: "Disabled Button",
|
|
27
|
+
disabled: true
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const WithIcon = {
|
|
31
|
+
args: {
|
|
32
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
+
"path",
|
|
35
|
+
{
|
|
36
|
+
d: "M12 5V19M5 12H19",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
strokeWidth: "2",
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeLinejoin: "round"
|
|
41
|
+
}
|
|
42
|
+
) }),
|
|
43
|
+
"Add Item"
|
|
44
|
+
] })
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.Default = Default;
|
|
49
|
+
exports.Disabled = Disabled;
|
|
50
|
+
exports.WithIcon = WithIcon;
|
|
51
|
+
exports.default = button_stories_default;
|
|
52
|
+
//# sourceMappingURL=button.stories.js.map
|
|
53
|
+
//# sourceMappingURL=button.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/button/button.stories.tsx"],"names":["Button","jsxs","Fragment","jsx"],"mappings":";;;;;;;AAYA,MAAM,IAAA,GAA4B;AAAA,EAC9B,KAAA,EAAO,0BAAA;AAAA,EACP,SAAA,EAAWA,aAAA;AAAA,EACX,IAAA,EAAM,CAAC,UAAU,CAAA;AAAA,EACjB,QAAA,EAAU;AAAA,IACN,QAAA,EAAU;AAAA,MACN,OAAA,EAAS;AAAA;AACb;AAER,CAAA;AAEA,IAAO,sBAAA,GAAQ;AAIR,MAAM,OAAA,GAAiB;AAAA,EAC1B,IAAA,EAAM;AAAA,IACF,QAAA,EAAU;AAAA;AAElB;AAEO,MAAM,QAAA,GAAkB;AAAA,EAC3B,IAAA,EAAM;AAAA,IACF,QAAA,EAAU,iBAAA;AAAA,IACV,QAAA,EAAU;AAAA;AAElB;AAEO,MAAM,QAAA,GAAkB;AAAA,EAC3B,IAAA,EAAM;AAAA,IACF,0BACIC,eAAA,CAAAC,mBAAA,EAAA,EACI,QAAA,EAAA;AAAA,sBAAAC,cAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,IAAA,EAAK,MAAA,EAAO,IAAA,EAAK,SAAQ,WAAA,EAAY,IAAA,EAAK,MAAA,EAAO,KAAA,EAAM,4BAAA,EAC9D,QAAA,kBAAAA,cAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACG,CAAA,EAAE,kBAAA;AAAA,UACF,MAAA,EAAO,cAAA;AAAA,UACP,WAAA,EAAY,GAAA;AAAA,UACZ,aAAA,EAAc,OAAA;AAAA,UACd,cAAA,EAAe;AAAA;AAAA,OACnB,EACJ,CAAA;AAAA,MAAM;AAAA,KAAA,EAEV;AAAA;AAGZ","file":"button.stories.js","sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Button } from './button';\n\nconst meta: Meta<typeof Button> = {\n title: 'Public/Components/Button',\n component: Button,\n tags: ['autodocs'],\n argTypes: {\n disabled: {\n control: 'boolean',\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof Button>;\n\nexport const Default: Story = {\n args: {\n children: 'Click me',\n },\n};\n\nexport const Disabled: Story = {\n args: {\n children: 'Disabled Button',\n disabled: true,\n },\n};\n\nexport const WithIcon: Story = {\n args: {\n children: (\n <>\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M12 5V19M5 12H19\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n Add Item\n </>\n ),\n },\n};\n"]}
|