@stridge/kit 0.1.0-alpha.5 → 0.1.0-alpha.50

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 (394) hide show
  1. package/README.md +22 -6
  2. package/dist/KitProvider.d.ts +29 -0
  3. package/dist/KitProvider.js +1 -1
  4. package/dist/_internal/deposit/widgets/index.d.ts +3 -1
  5. package/dist/_internal/deposit/widgets/index.js +1 -1
  6. package/dist/_internal/drivers/stridge/index.d.ts +3 -2
  7. package/dist/_internal/drivers/stridge/index.js +1 -1
  8. package/dist/_internal/withdraw/driver/index.d.ts +2 -2
  9. package/dist/_internal/withdraw/widgets/index.d.ts +3 -1
  10. package/dist/_internal/withdraw/widgets/index.js +1 -1
  11. package/dist/activity-history/compound/index.d.ts +9 -0
  12. package/dist/activity-history/compound/index.js +1 -0
  13. package/dist/deposit/compound/index.d.ts +4 -3
  14. package/dist/drivers/stridge/catalog.d.ts +54 -0
  15. package/dist/drivers/stridge/catalog.js +1 -0
  16. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
  17. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  18. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
  19. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  20. package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
  21. package/dist/drivers/stridge/internal/pollOnce.js +1 -1
  22. package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
  23. package/dist/drivers/stridge/internal/retry.js +1 -0
  24. package/dist/drivers/stridge/internal/supportedChains.js +1 -0
  25. package/dist/drivers/stridge/types.d.ts +20 -14
  26. package/dist/drivers/stridge/types.js +1 -1
  27. package/dist/drivers/stridge/wagmiSigner.js +1 -1
  28. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +4 -2
  29. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  30. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +17 -4
  31. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  32. package/dist/drivers/stridge-mock/fixtures.d.ts +14 -12
  33. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  34. package/dist/events/bus/createBus.d.ts +7 -0
  35. package/dist/events/bus/createBus.js +1 -0
  36. package/dist/events/bus/flowIdRegistry.d.ts +17 -0
  37. package/dist/events/bus/flowIdRegistry.js +1 -0
  38. package/dist/events/bus/index.js +1 -0
  39. package/dist/events/bus/metadata.js +1 -0
  40. package/dist/events/context.js +1 -0
  41. package/dist/events/emit/index.js +1 -0
  42. package/dist/events/emit/mapFailure.js +1 -0
  43. package/dist/events/emit/useDepositEmissions.js +1 -0
  44. package/dist/events/emit/useKitEmitter.js +1 -0
  45. package/dist/events/emit/useWithdrawEmissions.js +1 -0
  46. package/dist/events/hooks/index.d.ts +6 -0
  47. package/dist/events/hooks/index.js +1 -0
  48. package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
  49. package/dist/events/hooks/useCurrentFlowId.js +1 -0
  50. package/dist/events/hooks/useStableHandler.js +1 -0
  51. package/dist/events/hooks/useStridgeEvent.d.ts +8 -0
  52. package/dist/events/hooks/useStridgeEvent.js +1 -0
  53. package/dist/events/hooks/useStridgeEventBus.d.ts +33 -0
  54. package/dist/events/hooks/useStridgeEventBus.js +1 -0
  55. package/dist/events/hooks/useStridgeEvents.d.ts +6 -0
  56. package/dist/events/hooks/useStridgeEvents.js +1 -0
  57. package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
  58. package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
  59. package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
  60. package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
  61. package/dist/events/index.d.ts +14 -0
  62. package/dist/events/index.js +1 -0
  63. package/dist/events/publish.js +1 -0
  64. package/dist/events/types/deposit.d.ts +235 -0
  65. package/dist/events/types/envelope.d.ts +145 -0
  66. package/dist/events/types/index.d.ts +31 -0
  67. package/dist/events/types/kit.d.ts +23 -0
  68. package/dist/events/types/withdraw.d.ts +150 -0
  69. package/dist/flows/deposit/dialog/DepositDialog.d.ts +20 -82
  70. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  71. package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
  72. package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
  73. package/dist/flows/deposit/driver/payloads.d.ts +17 -4
  74. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
  75. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
  76. package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
  77. package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
  78. package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
  79. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
  80. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
  81. package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
  82. package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
  83. package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
  84. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
  85. package/dist/flows/deposit/driver/types.d.ts +64 -3
  86. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  87. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  88. package/dist/flows/deposit/orchestrator/types.d.ts +103 -1
  89. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
  90. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
  91. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.d.ts +40 -0
  92. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +1 -0
  93. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +38 -0
  94. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +1 -0
  95. package/dist/flows/deposit/widgets/activity-history/index.d.ts +2 -0
  96. package/dist/flows/deposit/widgets/activity-history/index.js +1 -0
  97. package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +1 -0
  98. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
  99. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  100. package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
  101. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +22 -4
  102. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  103. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
  104. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  105. package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +33 -4
  106. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  107. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +32 -0
  108. package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
  109. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
  110. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
  111. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
  112. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
  113. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
  114. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +10 -0
  115. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  116. package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +6 -0
  117. package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
  118. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
  119. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
  120. package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +1 -0
  121. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +6 -3
  122. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
  123. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  124. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
  125. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
  126. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
  127. package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
  128. package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
  129. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  130. package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
  131. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
  132. package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
  133. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
  134. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
  135. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
  136. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
  137. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
  138. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  139. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
  140. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
  141. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +5 -0
  142. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  143. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
  144. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  145. package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
  146. package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
  147. package/dist/flows/shared/transformers/index.d.ts +1 -0
  148. package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
  149. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
  150. package/dist/flows/shared/transformers/testnets.js +1 -0
  151. package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
  152. package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
  153. package/dist/flows/withdraw/bindings/index.d.ts +1 -0
  154. package/dist/flows/withdraw/bindings/index.js +1 -0
  155. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +35 -71
  156. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  157. package/dist/flows/withdraw/driver/dto.d.ts +8 -7
  158. package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
  159. package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
  160. package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
  161. package/dist/flows/withdraw/driver/types.d.ts +111 -14
  162. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  163. package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
  164. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  165. package/dist/flows/withdraw/orchestrator/types.d.ts +201 -32
  166. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
  167. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
  168. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.d.ts +39 -0
  169. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +1 -0
  170. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +36 -0
  171. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +1 -0
  172. package/dist/flows/withdraw/widgets/activity-history/index.d.ts +2 -0
  173. package/dist/flows/withdraw/widgets/activity-history/index.js +1 -0
  174. package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +1 -0
  175. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
  176. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
  177. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
  178. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
  179. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
  180. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
  181. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
  182. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
  183. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
  184. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
  185. package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
  186. package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
  187. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
  188. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
  189. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
  190. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  191. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
  192. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
  193. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  194. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
  195. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  196. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
  197. package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
  198. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
  199. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
  200. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
  201. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
  202. package/dist/i18n/index.d.ts +5 -4
  203. package/dist/i18n/index.js +1 -1
  204. package/dist/i18n/locales/ar.js +1 -1
  205. package/dist/i18n/locales/es.js +1 -1
  206. package/dist/i18n/locales/source-keys.d.ts +12 -0
  207. package/dist/i18n/locales/source-keys.js +0 -0
  208. package/dist/icons/index.d.ts +3 -1
  209. package/dist/icons/index.js +1 -1
  210. package/dist/index.d.ts +22 -9
  211. package/dist/index.js +1 -1
  212. package/dist/package.js +1 -1
  213. package/dist/scope/KitPortalScope.js +1 -1
  214. package/dist/scope/KitScope.d.ts +18 -1
  215. package/dist/scope/KitScope.js +1 -1
  216. package/dist/scope/context.d.ts +17 -1
  217. package/dist/scope/index.d.ts +1 -1
  218. package/dist/shared/attribution/Attribution.js +1 -0
  219. package/dist/shared/attribution/Attribution.slots.js +1 -0
  220. package/dist/shared/attribution/Attribution.styles.js +1 -0
  221. package/dist/shared/attribution/index.js +1 -0
  222. package/dist/shared/chains/index.d.ts +48 -29
  223. package/dist/shared/chains/index.js +1 -1
  224. package/dist/shared/constants/brand-intercom.js +1 -0
  225. package/dist/shared/cuer/Cuer.js +1 -1
  226. package/dist/shared/dialog/Frame.js +1 -1
  227. package/dist/shared/dialog/LoadingState.js +1 -0
  228. package/dist/shared/dialog/LoadingState.styles.js +1 -0
  229. package/dist/shared/dialog/StepTransition.js +1 -1
  230. package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
  231. package/dist/shared/driver/types.d.ts +4 -3
  232. package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
  233. package/dist/shared/i18n/KitI18nProvider.js +1 -1
  234. package/dist/shared/i18n/createKitI18n.d.ts +79 -16
  235. package/dist/shared/i18n/createKitI18n.js +1 -1
  236. package/dist/shared/i18n/useLingui.d.ts +11 -3
  237. package/dist/shared/icons/HistoryIcon.d.ts +12 -0
  238. package/dist/shared/icons/HistoryIcon.js +1 -0
  239. package/dist/shared/icons/LogoIcon.d.ts +13 -0
  240. package/dist/shared/icons/LogoIcon.js +1 -0
  241. package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
  242. package/dist/shared/merchant-link/MerchantLink.js +1 -0
  243. package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
  244. package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
  245. package/dist/shared/merchant-link/index.d.ts +1 -0
  246. package/dist/shared/merchant-link/index.js +1 -0
  247. package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
  248. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
  249. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  250. package/dist/shared/support/SupportConfigContext.d.ts +1 -0
  251. package/dist/shared/support/SupportConfigContext.js +1 -0
  252. package/dist/shared/support/SupportLink.d.ts +1 -0
  253. package/dist/shared/support/SupportLink.js +1 -0
  254. package/dist/shared/support/SupportSpinner.d.ts +1 -0
  255. package/dist/shared/support/SupportSpinner.js +1 -0
  256. package/dist/shared/support/index.d.ts +2 -0
  257. package/dist/shared/support/index.js +1 -0
  258. package/dist/shared/support/intercom-loader.d.ts +17 -0
  259. package/dist/shared/support/intercom-loader.js +1 -0
  260. package/dist/shared/support/types.d.ts +43 -0
  261. package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
  262. package/dist/shared/support/useIntercomMerchantContext.js +1 -0
  263. package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
  264. package/dist/shared/support/useMerchantContext.d.ts +1 -0
  265. package/dist/shared/support/useMerchantContext.js +1 -0
  266. package/dist/shared/support/useSupportTrigger.js +1 -0
  267. package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
  268. package/dist/shared/terms/TermsConfigContext.js +1 -0
  269. package/dist/shared/terms/TermsLink.d.ts +1 -0
  270. package/dist/shared/terms/TermsLink.js +1 -0
  271. package/dist/shared/terms/index.d.ts +1 -0
  272. package/dist/shared/terms/index.js +1 -0
  273. package/dist/shared/terms/types.d.ts +43 -0
  274. package/dist/shared/ui/Card/Card.styles.js +1 -1
  275. package/dist/shared/ui/Details/Details.d.ts +9 -1
  276. package/dist/shared/ui/Details/Details.styles.js +1 -1
  277. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  278. package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
  279. package/dist/shared/ui/Select/Select.js +1 -1
  280. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
  281. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
  282. package/dist/shared/ui/Steps/Steps.d.ts +52 -0
  283. package/dist/shared/ui/Steps/Steps.js +1 -0
  284. package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
  285. package/dist/shared/ui/Steps/Steps.slots.js +1 -0
  286. package/dist/shared/ui/Steps/Steps.styles.js +1 -0
  287. package/dist/shared/ui/Steps/index.d.ts +2 -0
  288. package/dist/shared/ui/Steps/index.js +1 -0
  289. package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
  290. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  291. package/dist/shared/utils/logos/types.d.ts +1 -1
  292. package/dist/shared/utils/useDeepMemo.js +1 -0
  293. package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
  294. package/dist/shared/wallet/ConnectWalletContext.js +1 -0
  295. package/dist/shared/widgets/activity-history/ActivityTrigger.js +1 -0
  296. package/dist/shared/widgets/activity-history/ActivityTrigger.styles.js +1 -0
  297. package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +1 -0
  298. package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +95 -0
  299. package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +1 -0
  300. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +22 -0
  301. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +1 -0
  302. package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +1 -0
  303. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts +75 -0
  304. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +1 -0
  305. package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +21 -0
  306. package/dist/shared/widgets/activity-history/compound/Row.slots.js +1 -0
  307. package/dist/shared/widgets/activity-history/compound/Row.styles.js +1 -0
  308. package/dist/shared/widgets/activity-history/compound/components/Empty.d.ts +15 -0
  309. package/dist/shared/widgets/activity-history/compound/components/Empty.js +1 -0
  310. package/dist/shared/widgets/activity-history/compound/components/ErrorView.d.ts +26 -0
  311. package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +1 -0
  312. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts +39 -0
  313. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +1 -0
  314. package/dist/shared/widgets/activity-history/compound/components/List.d.ts +23 -0
  315. package/dist/shared/widgets/activity-history/compound/components/List.js +1 -0
  316. package/dist/shared/widgets/activity-history/compound/components/Row.d.ts +54 -0
  317. package/dist/shared/widgets/activity-history/compound/components/Row.js +1 -0
  318. package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +1 -0
  319. package/dist/shared/widgets/activity-history/compound/context.d.ts +79 -0
  320. package/dist/shared/widgets/activity-history/compound/context.js +1 -0
  321. package/dist/shared/widgets/activity-history/index.js +1 -0
  322. package/dist/shared/widgets/activity-history/payloads.d.ts +81 -0
  323. package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +1 -0
  324. package/dist/shared/widgets/activity-history/transformers/resolveDirection.js +1 -0
  325. package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +4 -1
  326. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  327. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +1 -0
  328. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
  329. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  330. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
  331. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
  332. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
  333. package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
  334. package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
  335. package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
  336. package/dist/shared/widgets/amount-entry/compound/types.d.ts +26 -1
  337. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
  338. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
  339. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
  340. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
  341. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
  342. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
  343. package/dist/shared/widgets/asset-picker/compound/types.d.ts +14 -0
  344. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
  345. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
  346. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
  347. package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
  348. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
  349. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
  350. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
  351. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
  352. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
  353. package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
  354. package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
  355. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
  356. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
  357. package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
  358. package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
  359. package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
  360. package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
  361. package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
  362. package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
  363. package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
  364. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
  365. package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
  366. package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
  367. package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
  368. package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
  369. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
  370. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
  371. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
  372. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
  373. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
  374. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
  375. package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
  376. package/dist/stridge/StridgeProvider.d.ts +165 -35
  377. package/dist/stridge/StridgeProvider.js +1 -1
  378. package/dist/stridge/depositOwner.js +1 -0
  379. package/dist/stridge/optionalWagmi.js +1 -0
  380. package/dist/stridge/stubs.js +1 -1
  381. package/dist/styles/index.css +228 -10
  382. package/dist/types.d.ts +5 -4
  383. package/dist/ui/index.d.ts +3 -1
  384. package/dist/ui/index.js +1 -1
  385. package/dist/withdraw/compound/index.d.ts +5 -2
  386. package/dist/withdraw/compound/index.js +1 -1
  387. package/dist/withdraw/dialog/index.d.ts +3 -1
  388. package/package.json +15 -7
  389. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
  390. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
  391. package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
  392. package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
  393. package/dist/stridge/StridgeContext.d.ts +0 -29
  394. package/dist/stridge/StridgeContext.js +0 -1
@@ -0,0 +1,54 @@
1
+ import { ActivityHistoryRowPayload } from "../../payloads.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/shared/widgets/activity-history/compound/components/Row.d.ts
5
+ /**
6
+ * Props the row needs to render — pre-formatted by the driver's transformer. The widget
7
+ * never re-formats inputs (`title` / `formattedAmount.formatted` / `formattedDate.formatted`
8
+ * are display strings already). Click fires the row's settlement id back to the source
9
+ * context so the FSM can transition into the detail view.
10
+ */
11
+ interface Props {
12
+ /**
13
+ * Pre-formatted payload from the driver. Carries every visible string (`title`,
14
+ * `formattedAmount`, `formattedDate`, `ariaLabel`) plus the asset / chain identity slots
15
+ * the leading {@link TokenLogo} resolves against.
16
+ */
17
+ payload: ActivityHistoryRowPayload;
18
+ /**
19
+ * Row click handler. Receives the settlement id from the payload; the parent compound
20
+ * forwards it to {@link import("../context").ActivityHistorySourceValue.selectSettlement}.
21
+ */
22
+ onSelect: (settlementId: string) => void;
23
+ }
24
+ /**
25
+ * Public alias for {@link Props}. Preserved as the externally visible name so the
26
+ * compound's `index.ts` and the API-extractor snapshot keep referencing
27
+ * `ActivityHistoryRowProps`.
28
+ */
29
+ type ActivityHistoryRowProps = Props;
30
+ /**
31
+ * One row of the activity surface — leading asset glyph (with corner status pip), title +
32
+ * date stack, trailing amount + chevron. Composes
33
+ * `<SelectableTile shape="card" interactive="navigation">` so the surface treatment (hover
34
+ * wash, focus ring, border palette) matches the kit's asset-picker rows; the `rowLayout`
35
+ * override keeps the row's 68px height byte-identical to the design (44px disc + 12px block
36
+ * padding + 16px inline padding + 12px gap). `aria-label` encodes direction + amount + date
37
+ * because the leading icon doesn't carry direction on its own.
38
+ *
39
+ * Designed against Paper artboard `1HA2-0` (Deposit Tracker — Cards, Dark) — see
40
+ * {@link import("../Row.styles").styles} for the per-property snap rationale.
41
+ *
42
+ * **Asset glyph composition (Paper artboard `1HA2-0`).** The artboard shows the status pip
43
+ * in the bottom-trailing corner of the asset logo AND omits the chain glyph badge entirely.
44
+ * Row density is the optimization target, and the user is already inside the brand's dialog
45
+ * so chain identity carries lower weight than recognising the action+status at a glance.
46
+ * {@link TokenLogo}'s built-in chain badge is therefore disabled via `hideChainBadge` and
47
+ * the {@link StatusPip} renders inside the row's leading slot instead.
48
+ */
49
+ declare function ActivityHistoryRow({
50
+ payload,
51
+ onSelect
52
+ }: Props): _$react_jsx_runtime0.JSX.Element;
53
+ //#endregion
54
+ export { ActivityHistoryRow, ActivityHistoryRowProps };
@@ -0,0 +1 @@
1
+ "use client";import{ChevronRightIcon as e}from"../../../../icons/ChevronRightIcon.js";import"../../../../../icons/index.js";import{SelectableTile as t}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as n}from"../../../../ui/Text/Text.js";import"../../../../ui/Text/index.js";import{TokenLogo as r}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import{ACTIVITY_HISTORY_ROW_SLOTS as i}from"../Row.slots.js";import{styles as a}from"../Row.styles.js";import{StatusPip as o}from"./StatusPip.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({payload:u,onSelect:d}){return c(t,{shape:`card`,interactive:`navigation`,"data-stridge-slot":i.root,"aria-label":u.ariaLabel,onClick:()=>d(u.id),...l.props(a.rowLayout),children:[c(`span`,{"data-stridge-slot":i.leading,...l.props(a.leading),children:[s(r,{symbol:u.assetSymbol,...u.chainId===void 0?{}:{chainId:u.chainId},...u.assetLogoUrl===void 0?{}:{logoUrl:u.assetLogoUrl},...u.chainLogoUrl===void 0?{}:{chainLogoUrl:u.chainLogoUrl},size:44,hideChainBadge:!0}),s(o,{kind:u.status.kind})]}),c(`span`,{"data-stridge-slot":i.text,...l.props(a.text),children:[s(n.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":i.title,...l.props(a.title),children:u.title}),s(n.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,"data-stridge-slot":i.date,...l.props(a.date),children:u.formattedDate.formatted})]}),c(`span`,{"data-stridge-slot":i.trailing,...l.props(a.trailing),children:[s(n.span,{size:`sm`,fontWeight:`semibold`,leading:`tight`,color:`default`,"data-stridge-slot":i.amount,children:u.formattedAmount.formatted}),s(e,{"aria-hidden":!0,"data-stridge-slot":i.chevron,...l.props(a.chevron)})]})]})}export{u as ActivityHistoryRow};
@@ -0,0 +1 @@
1
+ "use client";import{CheckIcon as e}from"../../../../icons/CheckIcon.js";import{LoaderIcon as t}from"../../../../icons/LoaderIcon.js";import{XIcon as n}from"../../../../icons/XIcon.js";import"../../../../../icons/index.js";import{ACTIVITY_HISTORY_ROW_SLOTS as r}from"../Row.slots.js";import{styles as i}from"../Row.styles.js";import{jsx as a}from"react/jsx-runtime";import*as o from"@stylexjs/stylex";function s({kind:s}){let c=s===`completed`?i.statusPipCompleted:s===`failed`?i.statusPipFailed:i.statusPipPending;return a(`span`,{"data-stridge-slot":r.statusPip,...o.props(i.statusPip,c),children:s===`completed`?a(e,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):s===`failed`?a(n,{"aria-hidden":!0,...o.props(i.statusPipIcon)}):a(t,{"aria-hidden":!0,...o.props(i.statusPipSpinner)})})}export{s as StatusPip};
@@ -0,0 +1,79 @@
1
+ import { Entity } from "../../../driver/types.js";
2
+ import { ActivityHistoryPayload } from "../payloads.js";
3
+ import { SettlementPayloadContext } from "../../../../flows/deposit/driver/transformers/settlementToPayload.js";
4
+ import * as _$react from "react";
5
+ import { GatewayPollResponse, GatewayUdaDto } from "@stridge/sdk";
6
+
7
+ //#region src/shared/widgets/activity-history/compound/context.d.ts
8
+ /**
9
+ * Source of truth handed to `<ActivityHistory>` and `<ActivityHistoryDetail>` from whichever
10
+ * dialog (deposit / withdraw) mounts them. Each dialog assembles this value once from its own
11
+ * snapshot + actions and wraps the activity-history step body in
12
+ * `<ActivityHistorySourceProvider value={…}>`. The compound stays flow-agnostic — it reads
13
+ * the entity and the imperative actions from this single value.
14
+ *
15
+ * View routing is external: the FSM now exposes `historyList` and `historyDetail` as separate
16
+ * state names; the dialog's step router mounts {@link ActivityHistory} for the list step and
17
+ * {@link ActivityHistoryDetail} for the detail step. Each orchestrated wrapper supplies the
18
+ * source value with the slots its step needs (the list wrapper omits `settlementId`; the
19
+ * detail wrapper sets it).
20
+ *
21
+ * @see {@link ActivityHistorySourceProvider}
22
+ * @see {@link useActivityHistorySource}
23
+ */
24
+ interface ActivityHistorySourceValue {
25
+ /**
26
+ * The driver's `history` entity. Same shape on both flows (`DepositSnapshot["history"]`
27
+ * and `WithdrawSnapshot["history"]` are structurally identical — both back onto the
28
+ * multi-UDA envelope from `GET /gateway/{owner}`). Status discriminator drives the
29
+ * compound's branch (idle / loading → skeleton; ready / stale → rows; error → retry).
30
+ */
31
+ entity: Entity<ActivityHistoryPayload, ReadonlyArray<GatewayUdaDto>, GatewayPollResponse>;
32
+ /**
33
+ * Trigger a fresh one-shot fetch. Wired by each dialog to `driver.refreshHistory(signal)`.
34
+ * The compound calls this from the error-view retry button; each call passes an
35
+ * `AbortSignal` the compound owns so it can cancel mid-fetch on rapid re-clicks. Recurring
36
+ * updates while the list is visible land separately via the controller-mounted
37
+ * `watchHistory` watcher — this callback is not the steady-state polling surface.
38
+ */
39
+ refresh: (signal: AbortSignal) => void;
40
+ /**
41
+ * Dispatch a row selection. Wired to `actions.selectSettlement(id)` — the FSM transitions
42
+ * from `historyList` to `historyDetail` carrying the selected `settlementId`.
43
+ */
44
+ selectSettlement: (settlementId: string) => void;
45
+ /**
46
+ * Back chevron handler. Wired to `actions.back()` — the FSM disambiguates via the current
47
+ * state name (`historyDetail → historyList → source`). The compound renders the chevron in
48
+ * both the list step's header AND inside the detail step's header composition.
49
+ */
50
+ back: () => void;
51
+ /**
52
+ * Selected settlement id when the dialog is mounting the detail step. Carried so the
53
+ * `<ActivityHistoryDetail>` compound can look up the matching `GatewaySettlementDto`
54
+ * inside `entity.raw[].settlements[]` and feed it to {@link
55
+ * import("../adapters").settlementToWidgetProps}. Absent when the list wrapper supplies
56
+ * the source value.
57
+ */
58
+ settlementId?: string;
59
+ /**
60
+ * Context the detail compound's adapter passes to {@link
61
+ * import("#/flows/deposit/driver/transformers").settlementToPayload}. Each dialog
62
+ * assembles this from its own driver snapshot — deposit reads `wallet`, `brand`, the
63
+ * driver's explorers map; withdraw reads its equivalents. Carrying the resolved context
64
+ * here keeps the compound flow-agnostic.
65
+ */
66
+ settlementContext: SettlementPayloadContext;
67
+ }
68
+ /**
69
+ * Provider for {@link ActivityHistorySourceValue}. Each dialog mounts one above its
70
+ * activity-history step body — see `DepositDialog` / `WithdrawDialog`.
71
+ */
72
+ declare const ActivityHistorySourceProvider: _$react.Provider<ActivityHistorySourceValue | null>;
73
+ /**
74
+ * Read the active {@link ActivityHistorySourceValue}. Throws when called outside an
75
+ * `<ActivityHistorySourceProvider>`.
76
+ */
77
+ declare function useActivityHistorySource(consumer: string): ActivityHistorySourceValue;
78
+ //#endregion
79
+ export { ActivityHistorySourceProvider, ActivityHistorySourceValue, useActivityHistorySource };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`ActivityHistorySourceContext`;const r=n.Provider;function i(e){let r=t(n);if(!r)throw Error(`${e} must be rendered inside <ActivityHistorySourceProvider>. Mount the provider above <ActivityHistory> with the value derived from the flow's snapshot + actions — see DepositDialog / WithdrawDialog for the canonical wiring.`);return r}export{r as ActivityHistorySourceProvider,i as useActivityHistorySource};
@@ -0,0 +1 @@
1
+ import"./ActivityTrigger.js";
@@ -0,0 +1,81 @@
1
+ import { FormattedField } from "../../format/types.js";
2
+ //#region src/shared/widgets/activity-history/payloads.d.ts
3
+ /**
4
+ * Which flow produced the settlement — `"deposit"` for UDAs whose destination is the connected
5
+ * wallet, `"withdraw"` for UDAs whose source is the brand-currency balance the user is cashing
6
+ * out from. Discriminated by `uda.metadata.kit_flow` when present, with an address-comparison
7
+ * fallback for legacy UDAs that pre-date the metadata convention.
8
+ */
9
+ type ActivityHistoryDirection = "deposit" | "withdraw";
10
+ /**
11
+ * Lifecycle bucket for a single settlement row. Maps onto the kit's existing settlement-status
12
+ * model (`pending → succeeded → failed`) but flattens it to the 3-value set the row renders
13
+ * against — the inline status indicator picks an icon from this discriminator alone.
14
+ */
15
+ type ActivityHistoryStatusType = "pending" | "completed" | "failed";
16
+ /**
17
+ * Wrapper carrying the lifecycle bucket plus room for future status-scoped metadata (e.g. a
18
+ * settlement-level `failureKind` tag the row could surface). Kept separate from
19
+ * {@link ActivityHistoryStatusType} so the discriminator string stays stable as the shape grows.
20
+ */
21
+ interface ActivityHistoryStatus {
22
+ kind: ActivityHistoryStatusType;
23
+ }
24
+ /**
25
+ * One settlement row in the activity history list. Pre-formatted by the driver's transformer —
26
+ * widgets render directly from these fields and never re-format inputs themselves.
27
+ *
28
+ * Detail-view rendering happens off the entity's `raw: ReadonlyArray<GatewayUdaDto>` slot: the
29
+ * row carries `udaId` + `id` so the detail component can locate the matching
30
+ * `GatewaySettlementDto` and feed it back through {@link
31
+ * import("#/flows/deposit/driver/transformers").settlementToPayload} to produce a full
32
+ * `SuccessStateProps` / `ErrorStateProps` / pending payload at display time.
33
+ */
34
+ interface ActivityHistoryRowPayload {
35
+ /** Settlement id — unique within the multi-UDA envelope. The detail lookup keys on this. */
36
+ id: string;
37
+ /** Parent UDA id — settlements nest inside UDAs; the detail walker scans `udas[].settlements[]`. */
38
+ udaId: string;
39
+ /** Flow that produced this settlement. Drives the title prefix and the accessible label. */
40
+ direction: ActivityHistoryDirection;
41
+ /** Lifecycle bucket. Drives the inline status indicator (spinner / red-X / none). */
42
+ status: ActivityHistoryStatus;
43
+ /** Localized action+status string (e.g. `"Deposit completed"`, `"Withdrawal in progress"`). */
44
+ title: string;
45
+ /**
46
+ * USD-formatted amount for this row. For deposits this is the credited receive amount; for
47
+ * withdrawals the source send amount. The widget renders `formatted` verbatim.
48
+ */
49
+ formattedAmount: FormattedField<number>;
50
+ /**
51
+ * Settlement `updated_at` (unix-ms in `value`). `formatted` is the smart-relative form for
52
+ * settlements younger than 7 days, otherwise an absolute date — both follow the active Lingui
53
+ * locale.
54
+ */
55
+ formattedDate: FormattedField<number>;
56
+ /** Destination asset symbol — what the leading {@link import("#/shared/ui").TokenLogo} renders. */
57
+ assetSymbol: string;
58
+ /** Resolved token icon URL, when known. */
59
+ assetLogoUrl?: string;
60
+ /** EIP-155 chain id of the destination chain. */
61
+ chainId?: number;
62
+ /** Human-readable destination network name (e.g. `"Ethereum"`, `"BSC"`). */
63
+ chainName?: string;
64
+ /** Resolved chain glyph URL — overlaid in the corner of the asset logo. */
65
+ chainLogoUrl?: string;
66
+ /**
67
+ * Accessible label rendered as the row's `aria-label`. Encodes direction + amount + date
68
+ * because the leading icon does not carry direction.
69
+ */
70
+ ariaLabel: string;
71
+ }
72
+ /**
73
+ * Entity payload for the owner-scoped activity surface. Backed by the multi-UDA envelope from
74
+ * `GET /gateway/{owner}`; `rows` is sorted newest-first and capped at 20 entries per fetch.
75
+ */
76
+ interface ActivityHistoryPayload {
77
+ /** Newest-first row payloads, capped at 20 per fetch. */
78
+ rows: ReadonlyArray<ActivityHistoryRowPayload>;
79
+ }
80
+ //#endregion
81
+ export { ActivityHistoryDirection, ActivityHistoryPayload, ActivityHistoryRowPayload, ActivityHistoryStatus, ActivityHistoryStatusType };
@@ -0,0 +1 @@
1
+ import{parseIsoMs as e}from"../../../../flows/shared/transformers/parseIsoMs.js";import{formatTimestamp as t}from"../../../format/formatTimestamp.js";import{formatTokenAmount as n}from"../../../format/formatTokenAmount.js";import{formatUsd as r}from"../../../format/formatUsd.js";import{resolveDirection as i}from"./resolveDirection.js";function a(e,t){let n=t.now??Date.now(),r=t.ownerAddress.toLowerCase(),i=[];for(let t of e.udas)for(let e of t.settlements)i.push({settlement:e,uda:t});i.sort((e,t)=>e.settlement.updated_at===t.settlement.updated_at?0:e.settlement.updated_at<t.settlement.updated_at?1:-1);let a=[];for(let{settlement:e,uda:s}of i.slice(0,20))a.push(o(e,s,t,n,r));return{rows:a}}function o(t,n,r,a,o){let u=i(n,o),d=s(t.status),f=c(u,d.kind,r.i18n),p=l(t,n,u,r.i18n),g=e(t.updated_at)??e(t.created_at)??a,_={value:g,formatted:m(g,a,r.i18n)},v=h(u,p.formatted,_.formatted,r.i18n),y=n.destination.eip155_id?Number(n.destination.eip155_id):void 0,b=y===void 0?void 0:r.chainLogoFor?.(y),x=t.to?.logo??void 0;return{id:t.id,udaId:n.uda_id,direction:u,status:d,title:f,formattedAmount:p,formattedDate:_,assetSymbol:n.destination.asset_symbol,...x?{assetLogoUrl:x}:{},...y===void 0?{}:{chainId:y},...n.destination.network_name?{chainName:n.destination.network_name}:{},...b?{chainLogoUrl:b}:{},ariaLabel:v}}function s(e){switch(e){case`created`:case`routing`:return{kind:`pending`};case`completed`:return{kind:`completed`};case`failed`:return{kind:`failed`};default:return{kind:`pending`}}}function c(e,t,n){return e===`deposit`?t===`completed`?n._({id:`Deposit completed`,message:`Deposit completed`}):t===`failed`?n._({id:`Deposit failed`,message:`Deposit failed`}):n._({id:`Deposit in progress`,message:`Deposit in progress`}):t===`completed`?n._({id:`Withdrawal completed`,message:`Withdrawal completed`}):t===`failed`?n._({id:`Withdrawal failed`,message:`Withdrawal failed`}):n._({id:`Withdrawal in progress`,message:`Withdrawal in progress`})}function l(e,t,i,a){let o=i===`deposit`?e.to:e.from,s=o?.amount_usd;if(s){let e=Number.parseFloat(s);if(Number.isFinite(e))return{value:e,formatted:r(e,a)}}let c=t.destination.asset_decimals,l=u(o,c),d=t.destination.asset_symbol;return{value:l,formatted:`${n(l,a,{maxDecimals:c})} ${d}`}}function u(e,t){if(!e)return 0;if(e.amount){let t=Number.parseFloat(e.amount);if(Number.isFinite(t)&&t>=0)return t}if(e.raw_amount){let n=e.raw_amount;try{let e=BigInt(n);if(t===0)return Number(e);let r=10n**BigInt(t),i=e/r,a=(e%r).toString().padStart(t,`0`);return Number(`${i}.${a}`)}catch{return 0}}return 0}const d=6e4,f=36e5,p=864e5;function m(e,n,r){let i=n-e;if(i<d)return r._({id:`Just now`,message:`Just now`});let a=new Intl.RelativeTimeFormat(r.locale,{numeric:`auto`});if(i<f){let e=Math.floor(i/d);return a.format(-e,`minute`)}if(i<p){let e=Math.floor(i/f);return a.format(-e,`hour`)}let o=Math.floor(i/p);return o===1?r._({id:`Yesterday`,message:`Yesterday`}):o<7?a.format(-o,`day`):t(e,r)}function h(e,t,n,r){return e===`deposit`?r._({id:`Deposit of {amount}, {date}`,message:`Deposit of {amount}, {date}`,values:{amount:t,date:n}}):r._({id:`Withdrawal of {amount}, {date}`,message:`Withdrawal of {amount}, {date}`,values:{amount:t,date:n}})}export{a as historyResponseToPayload};
@@ -0,0 +1 @@
1
+ function e(e,t){let n=e.metadata?.kit_flow;return n===`deposit`?`deposit`:n===`withdraw`?`withdraw`:(e.destination.address??``).toLowerCase()===t?`deposit`:`withdraw`}export{e as resolveDirection};
@@ -1,8 +1,9 @@
1
- import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPillsProps, AmountEntryProps } from "./types.js";
1
+ import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryNoticeProps, AmountEntryPillsProps, AmountEntryProps } from "./types.js";
2
2
  import { AmountEntryFlow } from "./components/Flow.js";
3
3
  import { AmountEntryFooter } from "./components/Footer.js";
4
4
  import { AmountEntryHeader } from "./components/Header.js";
5
5
  import { AmountEntryHero } from "./components/Hero/Hero.js";
6
+ import { AmountEntryNotice } from "./components/Notice.js";
6
7
  import { AmountEntryPills } from "./components/Pills.js";
7
8
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
9
 
@@ -46,6 +47,7 @@ declare namespace AmountEntry {
46
47
  type PillsProps = AmountEntryPillsProps;
47
48
  type FlowProps = AmountEntryFlowProps;
48
49
  type FooterProps = AmountEntryFooterProps;
50
+ type NoticeProps = AmountEntryNoticeProps;
49
51
  type DialogProps = AmountEntryDialogProps;
50
52
  const Header: typeof AmountEntryHeader;
51
53
  const Body: typeof AmountEntryBody;
@@ -53,6 +55,7 @@ declare namespace AmountEntry {
53
55
  const Pills: typeof AmountEntryPills;
54
56
  const Flow: typeof AmountEntryFlow;
55
57
  const Footer: typeof AmountEntryFooter;
58
+ const Notice: typeof AmountEntryNotice;
56
59
  const Dialog: typeof AmountEntryDialog;
57
60
  }
58
61
  //#endregion
@@ -1 +1 @@
1
- "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{AMOUNT_ENTRY_SLOTS as i}from"./AmountEntry.slots.js";import{styles as a}from"./AmountEntry.styles.js";import{AmountEntryContext as o}from"./context.js";import{AmountEntryFlow as s}from"./components/Flow.js";import{AmountEntryFooter as c}from"./components/Footer.js";import{AmountEntryHeader as l}from"./components/Header.js";import{AmountEntryHero as u}from"./components/Hero/Hero.js";import"./components/Hero/index.js";import{AmountEntryPills as d}from"./components/Pills.js";import{useMemo as f}from"react";import{jsx as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";const h={useGrouping:!0,maximumFractionDigits:8},g=[];function _(e){let{amount:t,sendToken:s,receiveToken:c,locale:l,format:u,min:d=0,max:_,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w=g,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,children:A}=e,j=f(()=>({amount:t,sendToken:s,receiveToken:c,locale:l,format:u??h,min:d,max:_,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k}),[t,s,c,l,u,d,_,v,y,b,x,S,C,w,T,E,D,O,k]);return p(o.Provider,{value:j,children:p(n.Provider,{children:p(r,{"data-stridge-slot":i.root,...m.props(a.root),children:A})})})}function v(e){return p(t.Body,{"data-stridge-slot":i.body,...e})}function y({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return p(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:p(_,{...o,children:a})})}(function(e){e.Header=l,e.Body=v,e.Hero=u,e.Pills=d,e.Flow=s,e.Footer=c,e.Dialog=y})(_||={});export{_ as AmountEntry};
1
+ "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{AMOUNT_ENTRY_SLOTS as i}from"./AmountEntry.slots.js";import{styles as a}from"./AmountEntry.styles.js";import{AmountEntryContext as o}from"./context.js";import{AmountEntryFlow as s}from"./components/Flow.js";import{AmountEntryFooter as c}from"./components/Footer.js";import{AmountEntryHeader as l}from"./components/Header.js";import{AmountEntryHero as u}from"./components/Hero/Hero.js";import"./components/Hero/index.js";import{AmountEntryNotice as d}from"./components/Notice.js";import{AmountEntryPills as f}from"./components/Pills.js";import{useMemo as p}from"react";import{jsx as m}from"react/jsx-runtime";import*as h from"@stylexjs/stylex";const g={useGrouping:!0,maximumFractionDigits:8},_=[];function v(e){let{amount:t,sendToken:s,receiveToken:c,locale:l,format:u,min:d=0,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w=_,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A,headerTrailing:j,children:M}=e,N=p(()=>({amount:t,sendToken:s,receiveToken:c,locale:l,format:u??g,min:d,max:f,onAmountChange:v,headerTitle:y,onBack:b,currencySymbol:x,subLine:S,subLineAmount:C,presets:w,activePreset:T,onPresetSelect:E,bridge:D,footerLabel:O,onContinue:k,notice:A,headerTrailing:j}),[t,s,c,l,u,d,f,v,y,b,x,S,C,w,T,E,D,O,k,A,j]);return m(o.Provider,{value:N,children:m(n.Provider,{children:m(r,{"data-stridge-slot":i.root,...h.props(a.root),children:M})})})}function y(e){return m(t.Body,{"data-stridge-slot":i.body,...e})}function b({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return m(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:m(v,{...o,children:a})})}(function(e){e.Header=l,e.Body=y,e.Hero=u,e.Pills=f,e.Flow=s,e.Footer=c,e.Notice=d,e.Dialog=b})(v||={});export{v as AmountEntry};
@@ -9,6 +9,7 @@ declare const AMOUNT_ENTRY_SLOTS: {
9
9
  readonly hero: "amount-entry-hero";
10
10
  readonly heroBand: "amount-entry-hero-band";
11
11
  readonly heroSwap: "amount-entry-hero-swap";
12
+ readonly notice: "amount-entry-notice";
12
13
  };
13
14
  type AmountEntrySlot = (typeof AMOUNT_ENTRY_SLOTS)[keyof typeof AMOUNT_ENTRY_SLOTS];
14
15
  //#endregion
@@ -1 +1 @@
1
- const e={root:`amount-entry`,header:`amount-entry-header`,body:`amount-entry-body`,footer:`amount-entry-footer`,flow:`amount-entry-flow`,pills:`amount-entry-pills`,hero:`amount-entry-hero`,heroBand:`amount-entry-hero-band`,heroSwap:`amount-entry-hero-swap`};export{e as AMOUNT_ENTRY_SLOTS};
1
+ const e={root:`amount-entry`,header:`amount-entry-header`,body:`amount-entry-body`,footer:`amount-entry-footer`,flow:`amount-entry-flow`,pills:`amount-entry-pills`,hero:`amount-entry-hero`,heroBand:`amount-entry-hero-band`,heroSwap:`amount-entry-hero-swap`,notice:`amount-entry-notice`};export{e as AMOUNT_ENTRY_SLOTS};
@@ -1 +1 @@
1
- const e={root:{"AmountEntry__styles.root":`AmountEntry__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:18`},header:{"AmountEntry__styles.header":`AmountEntry__styles.header`,"gap-kOIVth":`x1v2ro7d`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1l90r2v`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:25`},headerTitle:{"AmountEntry__styles.headerTitle":`AmountEntry__styles.headerTitle`,"margin-kogj98":`x1ghz6dp`,"flexGrow-kzQI83":`x1iyjqo2`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:32`},backIcon:{"AmountEntry__styles.backIcon":`AmountEntry__styles.backIcon`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:36`},closeIcon:{"AmountEntry__styles.closeIcon":`AmountEntry__styles.closeIcon`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:40`},heroBlock:{"AmountEntry__styles.heroBlock":`AmountEntry__styles.heroBlock`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"paddingTop-kLKAdn":`x1byr4rc`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInlineStart-kZCmMZ":`xz7312c`,"gap-kOIVth":`x167g77z`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:52`},hero:{"AmountEntry__styles.hero":`AmountEntry__styles.hero`,"gap-kOIVth":`x1nj97wv`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:68`},heroCurrency:{"AmountEntry__styles.heroCurrency":`AmountEntry__styles.heroCurrency`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xsfzzmd`,"lineHeight-kLWn49":`xo5v014`,"letterSpacing-kb6lSQ":`x1b4dsll`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:71`},heroAmount:{"AmountEntry__styles.heroAmount":`AmountEntry__styles.heroAmount`,"fontSize-kGuDYH":`xrv4cvt`,"lineHeight-kLWn49":`xo5v014`,"letterSpacing-kb6lSQ":`xo2cfqc`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:77`},subLine:{"AmountEntry__styles.subLine":`AmountEntry__styles.subLine`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:82`},subLineIcon:{"AmountEntry__styles.subLineIcon":`AmountEntry__styles.subLineIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:88`},bigSlot:{"AmountEntry__styles.bigSlot":`AmountEntry__styles.bigSlot`,"position-kVAEAm":`x1n2onr6`,"zIndex-kY2c9j":`x1fina04`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x1pha0wt`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:97`},swapToggle:{"AmountEntry__styles.swapToggle":`AmountEntry__styles.swapToggle`,"appearance-kysU6D":`xjyslct`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,"backgroundColor-kWkggS":`x1qkydf4`,"margin-kogj98":`x1ghz6dp`,"paddingBlock-k8WAf4":`x12ulsxz`,"paddingInline-kg3NbH":`x1awh872`,"font-kVVagm":`xln7xf2`,"color-kMwMTN":`xi96bwj`,"cursor-kkrTdU":`x1ypdohk`,"borderRadius-kaIpWk":`x1npxkrn`,"transitionProperty-k1ekBW":`xs2xxs2`,"transitionDuration-kIyJzY":`x9dyr19`,"transitionTimingFunction-kAMwcw":`x9lcvmn`,":hover_backgroundColor-kGzVvX":`x1tkvd9a`,":hover_color-kDPRdz":`xpscirx`,":focus-visible_outline-k3Woio":`x67ar3w`,":focus-visible_outlineOffset-kiEn40":`x7s97pk`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:104`},swapIcon:{"AmountEntry__styles.swapIcon":`AmountEntry__styles.swapIcon`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:131`},swapTextWrap:{"AmountEntry__styles.swapTextWrap":`AmountEntry__styles.swapTextWrap`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:140`},swapText:{"AmountEntry__styles.swapText":`AmountEntry__styles.swapText`,"position-kVAEAm":`x1n2onr6`,"zIndex-kY2c9j":`x11uqc5h`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xkpwil5`,"lineHeight-kLWn49":`x132q4wb`,"fontWeight-k63SB2":`xk50ysn`,"letterSpacing-kb6lSQ":`xjat59b`,"whiteSpace-khDVqt":`xuxw1ft`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:144`},swapSymbol:{"AmountEntry__styles.swapSymbol":`AmountEntry__styles.swapSymbol`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xkpwil5`,"lineHeight-kLWn49":`x132q4wb`,"fontWeight-k63SB2":`xk50ysn`,"letterSpacing-kb6lSQ":`xjat59b`,"whiteSpace-khDVqt":`x1sdyfia`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:155`},swapBackdrop:{"AmountEntry__styles.swapBackdrop":`AmountEntry__styles.swapBackdrop`,"position-kVAEAm":`x10l6tqk`,"inset-kpwlN0":`x1v1xp8j`,"zIndex-kY2c9j":`x8knxv4`,"filter-ku685b":`x1qgin71`,"pointerEvents-kfzvcC":`x47corl`,"backgroundImage-kKwaWg":`x1bmns5n`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:165`},pills:{"AmountEntry__styles.pills":`AmountEntry__styles.pills`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"width-kzqmXN":`xh8yej3`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:178`},flowWrap:{"AmountEntry__styles.flowWrap":`AmountEntry__styles.flowWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:191`},flow:{"AmountEntry__styles.flow":`AmountEntry__styles.flow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"backgroundColor-kWkggS":`x12obg9s`,"borderColor-kVAM5u":`x1bue7yx`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"borderRadius-kaIpWk":`x1npxkrn`,"paddingBlock-k8WAf4":`xxlmvz2`,"paddingInline-kg3NbH":`x65v0h`,"gap-kOIVth":`x1c1vhfx`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:198`},flowSide:{"AmountEntry__styles.flowSide":`AmountEntry__styles.flowSide`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:212`},flowLabels:{"AmountEntry__styles.flowLabels":`AmountEntry__styles.flowLabels`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x12mrbbr`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:219`},flowBridge:{"AmountEntry__styles.flowBridge":`AmountEntry__styles.flowBridge`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:225`},flowBridgeIcon:{"AmountEntry__styles.flowBridgeIcon":`AmountEntry__styles.flowBridgeIcon`,"width-kzqmXN":`x1kky2od`,"height-kZKoxP":`xlup9mm`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:232`},footer:{"AmountEntry__styles.footer":`AmountEntry__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1t4gjm`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:240`},cta:{"AmountEntry__styles.cta":`AmountEntry__styles.cta`,"width-kzqmXN":`xh8yej3`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:250`},ctaInteractive:{"AmountEntry__styles.ctaInteractive":`AmountEntry__styles.ctaInteractive`,"cursor-kkrTdU":`x1ypdohk`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:253`},ctaInert:{"AmountEntry__styles.ctaInert":`AmountEntry__styles.ctaInert`,"cursor-kkrTdU":`xt0e3qv`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:256`}};export{e as styles};
1
+ const e={root:{"AmountEntry__styles.root":`AmountEntry__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:18`},header:{"AmountEntry__styles.header":`AmountEntry__styles.header`,"gap-kOIVth":`x1v2ro7d`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1l90r2v`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:25`},headerTitle:{"AmountEntry__styles.headerTitle":`AmountEntry__styles.headerTitle`,"margin-kogj98":`x1ghz6dp`,"flexGrow-kzQI83":`x1iyjqo2`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:32`},headerTrailing:{"AmountEntry__styles.headerTrailing":`AmountEntry__styles.headerTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:39`},backIcon:{"AmountEntry__styles.backIcon":`AmountEntry__styles.backIcon`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:44`},closeIcon:{"AmountEntry__styles.closeIcon":`AmountEntry__styles.closeIcon`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:48`},heroBlock:{"AmountEntry__styles.heroBlock":`AmountEntry__styles.heroBlock`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"paddingTop-kLKAdn":`x1byr4rc`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`xwib8y2`,"paddingInlineStart-kZCmMZ":`xz7312c`,"gap-kOIVth":`x167g77z`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:60`},hero:{"AmountEntry__styles.hero":`AmountEntry__styles.hero`,"gap-kOIVth":`x1nj97wv`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:76`},heroCurrency:{"AmountEntry__styles.heroCurrency":`AmountEntry__styles.heroCurrency`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xsfzzmd`,"lineHeight-kLWn49":`xo5v014`,"letterSpacing-kb6lSQ":`x1b4dsll`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:79`},heroAmount:{"AmountEntry__styles.heroAmount":`AmountEntry__styles.heroAmount`,"fontSize-kGuDYH":`xrv4cvt`,"lineHeight-kLWn49":`xo5v014`,"letterSpacing-kb6lSQ":`xo2cfqc`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:85`},subLine:{"AmountEntry__styles.subLine":`AmountEntry__styles.subLine`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:90`},subLineIcon:{"AmountEntry__styles.subLineIcon":`AmountEntry__styles.subLineIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:96`},bigSlot:{"AmountEntry__styles.bigSlot":`AmountEntry__styles.bigSlot`,"position-kVAEAm":`x1n2onr6`,"zIndex-kY2c9j":`x1fina04`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x1pha0wt`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:105`},swapToggle:{"AmountEntry__styles.swapToggle":`AmountEntry__styles.swapToggle`,"appearance-kysU6D":`xjyslct`,"display-k1xSpc":`x3nfvp2`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x17d4w8g`,"backgroundColor-kWkggS":`x1qkydf4`,"margin-kogj98":`x1ghz6dp`,"paddingBlock-k8WAf4":`x12ulsxz`,"paddingInline-kg3NbH":`x1awh872`,"font-kVVagm":`xln7xf2`,"color-kMwMTN":`xi96bwj`,"cursor-kkrTdU":`x1ypdohk`,"borderRadius-kaIpWk":`x1npxkrn`,"transitionProperty-k1ekBW":`xs2xxs2`,"transitionDuration-kIyJzY":`x9dyr19`,"transitionTimingFunction-kAMwcw":`x9lcvmn`,":hover_backgroundColor-kGzVvX":`x1tkvd9a`,":hover_color-kDPRdz":`xpscirx`,":focus-visible_outline-k3Woio":`x67ar3w`,":focus-visible_outlineOffset-kiEn40":`x7s97pk`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:112`},swapIcon:{"AmountEntry__styles.swapIcon":`AmountEntry__styles.swapIcon`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:139`},swapTextWrap:{"AmountEntry__styles.swapTextWrap":`AmountEntry__styles.swapTextWrap`,"display-k1xSpc":`x3nfvp2`,"alignItems-kGNEyG":`x6s0dn4`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:148`},swapText:{"AmountEntry__styles.swapText":`AmountEntry__styles.swapText`,"position-kVAEAm":`x1n2onr6`,"zIndex-kY2c9j":`x11uqc5h`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xkpwil5`,"lineHeight-kLWn49":`x132q4wb`,"fontWeight-k63SB2":`xk50ysn`,"letterSpacing-kb6lSQ":`xjat59b`,"whiteSpace-khDVqt":`xuxw1ft`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:152`},swapSymbol:{"AmountEntry__styles.swapSymbol":`AmountEntry__styles.swapSymbol`,"display-k1xSpc":`x1rg5ohu`,"fontSize-kGuDYH":`xkpwil5`,"lineHeight-kLWn49":`x132q4wb`,"fontWeight-k63SB2":`xk50ysn`,"letterSpacing-kb6lSQ":`xjat59b`,"whiteSpace-khDVqt":`x1sdyfia`,"color-kMwMTN":`x1heor9g`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:163`},swapBackdrop:{"AmountEntry__styles.swapBackdrop":`AmountEntry__styles.swapBackdrop`,"position-kVAEAm":`x10l6tqk`,"inset-kpwlN0":`x1v1xp8j`,"zIndex-kY2c9j":`x8knxv4`,"filter-ku685b":`x1qgin71`,"pointerEvents-kfzvcC":`x47corl`,"backgroundImage-kKwaWg":`x1bmns5n`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:173`},pills:{"AmountEntry__styles.pills":`AmountEntry__styles.pills`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"width-kzqmXN":`xh8yej3`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:186`},flowWrap:{"AmountEntry__styles.flowWrap":`AmountEntry__styles.flowWrap`,"display-k1xSpc":`x78zum5`,"justifyContent-kjj79g":`xl56j7k`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:199`},flow:{"AmountEntry__styles.flow":`AmountEntry__styles.flow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"backgroundColor-kWkggS":`x12obg9s`,"borderColor-kVAM5u":`x1bue7yx`,"borderStyle-ksu8eU":`x1y0btm7`,"borderWidth-kMzoRj":`xmkeg23`,"borderRadius-kaIpWk":`x1npxkrn`,"paddingBlock-k8WAf4":`xxlmvz2`,"paddingInline-kg3NbH":`x65v0h`,"gap-kOIVth":`x1c1vhfx`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:206`},flowSide:{"AmountEntry__styles.flowSide":`AmountEntry__styles.flowSide`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`x1q0g3np`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1v2ro7d`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:220`},flowLabels:{"AmountEntry__styles.flowLabels":`AmountEntry__styles.flowLabels`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x12mrbbr`,"minWidth-k7Eaqz":`xeuugli`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:227`},flowBridge:{"AmountEntry__styles.flowBridge":`AmountEntry__styles.flowBridge`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`xl56j7k`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:233`},flowBridgeIcon:{"AmountEntry__styles.flowBridgeIcon":`AmountEntry__styles.flowBridgeIcon`,"width-kzqmXN":`x1kky2od`,"height-kZKoxP":`xlup9mm`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:240`},footer:{"AmountEntry__styles.footer":`AmountEntry__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x9desvi`,"paddingInlineEnd-kwRFfy":`x1o5r3ls`,"paddingBottom-kGO01o":`x1t4gjm`,"paddingInlineStart-kZCmMZ":`xz7312c`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:248`},cta:{"AmountEntry__styles.cta":`AmountEntry__styles.cta`,"width-kzqmXN":`xh8yej3`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:258`},ctaInteractive:{"AmountEntry__styles.ctaInteractive":`AmountEntry__styles.ctaInteractive`,"cursor-kkrTdU":`x1ypdohk`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:261`},ctaInert:{"AmountEntry__styles.ctaInert":`AmountEntry__styles.ctaInert`,"cursor-kkrTdU":`xt0e3qv`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:264`},noticeText:{"AmountEntry__styles.noticeText":`AmountEntry__styles.noticeText`,"marginBlock-kqGvvJ":`x10im51j`,"textAlign-k9WMMc":`x2b8uid`,$$css:`@stridge/kit:src/shared/widgets/amount-entry/compound/AmountEntry.styles.ts:268`}};export{e as styles};
@@ -6,10 +6,15 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  * Header part — back button and title laid out over `Card.Header`.
7
7
  * `Dialog.CloseButton` renders as the trailing flex child only when the
8
8
  * widget is mounted inside `Dialog.Content`.
9
+ *
10
+ * Optional `trailing` slot — Renders before the close X (e.g. the
11
+ * activity-history icon). Defaults to the root's `headerTrailing`; pass
12
+ * `trailing: null` to force the slot empty even when the root supplies a node.
9
13
  */
10
14
  declare function AmountEntryHeader({
11
15
  title,
12
- onBack
16
+ onBack,
17
+ trailing
13
18
  }?: AmountEntryHeaderProps): _$react_jsx_runtime0.JSX.Element;
14
19
  //#endregion
15
20
  export { AmountEntryHeader };
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{AMOUNT_ENTRY_SLOTS as o}from"../AmountEntry.slots.js";import{styles as s}from"../AmountEntry.styles.js";import{useAmountEntryContext as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:f,onBack:p}={}){let m=c(`AmountEntry.Header`),{_:h}=e(),g=f??m.headerTitle??h({id:`AOPSKq`,message:`Deposit {0}`,values:{0:m.receiveToken.symbol}}),_=p===null?void 0:p??m.onBack;return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[typeof _==`function`?l(n,{"aria-label":h({id:`iH8pgl`,message:`Back`}),onClick:_,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...d.props(s.headerTitle),children:g}),l(r.CloseButton,{})]})}export{f as AmountEntryHeader};
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{AMOUNT_ENTRY_SLOTS as o}from"../AmountEntry.slots.js";import{styles as s}from"../AmountEntry.styles.js";import{useAmountEntryContext as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:f,onBack:p,trailing:m}={}){let h=c(`AmountEntry.Header`),{_:g}=e(),_=f??h.headerTitle??g({id:`AOPSKq`,message:`Deposit {0}`,values:{0:h.receiveToken.symbol}}),v=p===null?void 0:p??h.onBack,y=m===null?null:m??h.headerTrailing;return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[typeof v==`function`?l(n,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:v,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...d.props(s.headerTitle),children:_}),u(`div`,{...d.props(s.headerTrailing),children:[y,l(r.CloseButton,{})]})]})}export{f as AmountEntryHeader};
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ArrowRightLeftIcon as t}from"../../../../../icons/ArrowRightLeftIcon.js";import"../../../../../../icons/index.js";import{parseAmountInputValue as n}from"../../../../../ui/AmountInput/utils.js";import{AmountInput as r}from"../../../../../ui/AmountInput/AmountInput.js";import"../../../../../ui/AmountInput/index.js";import{AMOUNT_ENTRY_SLOTS as i}from"../../AmountEntry.slots.js";import{styles as a}from"../../AmountEntry.styles.js";import{useAmountEntryContext as o}from"../../context.js";import{detectAssetDecimals as s,formatAmountForBand as c,formatFiatLine as l,splitSubLine as u}from"./utils.js";import{StaticBand as ee}from"./StaticBand.js";import{ICON_TRANSITION as d,SWAP_TRANSITION as f,SYMBOL_TRANSITION as p,WIDTH_TRANSITION as te}from"./transitions.js";import{SwapBackdrop as m}from"./SwapBackdrop.js";import{useSwapState as h}from"./useSwapState.js";import{useCallback as g,useEffect as _,useId as v,useRef as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import*as C from"@stylexjs/stylex";import{LayoutGroup as w,motion as T}from"motion/react";function E({currencySymbol:l,subLine:u,subLineAmount:E}={}){let D=o(`AmountEntry.Hero`),O=l??D.currencySymbol??`$`,k=u??D.subLine,A=E??D.subLineAmount,{_:j}=e(),M=typeof D.onAmountChange==`function`,N=v(),P=y(null),F=y(null),[I,re]=b(null);_(()=>{let e=F.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>{let t=window.getComputedStyle(e),n=(Number.parseFloat(t.paddingInlineStart)||0)+(Number.parseFloat(t.paddingInlineEnd)||0),r=e.clientWidth-n;re(e=>e===r||r<=0?e:r)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let L=D.format?.maximumFractionDigits??5,R=D.format?.useGrouping!==!1,z=s(A,L),B=g((e,t)=>c(e,t,{locale:D.locale,fiatFormat:D.format,fiatMaxDecimals:L,assetDecimals:z,useGrouping:R}),[D.locale,D.format,L,z,R]),{swapped:V,isAnimating:H,onSwap:U}=h({inputRef:P,onAfterSwap:g(e=>{D.amount!==null&&K(B(D.amount,e))},[D.amount,B])}),W=D.amount===null?``:B(D.amount,V),[G,K]=b(W);_(()=>{document.activeElement!==P.current&&K(W)},[W]);let q=e=>{K(e),D.onAmountChange?.(n(e,D.locale))},J=`${N}-fiat`,Y=`${N}-asset`,X=V?Y:J,Z=V?J:Y,Q=ne({swapped:V,ctx:D,currencySymbol:O,subLineAmount:A}),$=C.props(a.heroBlock),ie=I===null?void 0:{"--stridge-amt-available-width":`${I}px`};return x(w,{id:N,children:S(`div`,{ref:F,"data-stridge-slot":i.hero,className:$.className,style:$.style,children:[S(T.div,{layoutId:X,dir:`ltr`,transition:f,...C.props(a.bigSlot),children:[x(m,{active:H}),M?S(r,{"data-stridge-slot":i.heroBand,value:G,onValueChange:q,locale:D.locale??`en-US`,maxDecimals:V?z:L,useGrouping:R,placeholder:`0`,className:C.props(a.hero).className,style:{...C.props(a.hero).style,...ie},children:[!V&&x(r.Prefix,{...C.props(a.heroCurrency),children:O}),x(r.Field,{"aria-label":V?`Amount in ${D.receiveToken.symbol}`:`Amount in ${O}`,ref:P,autoFocus:!0,...C.props(a.heroAmount)})]}):x(ee,{swapped:V,ctx:D,currencySymbol:O,assetDecimals:z})]},X),k??S(`button`,{type:`button`,dir:`ltr`,"data-stridge-slot":i.heroSwap,"aria-label":j({id:`GwkmPx`,message:`Swap displayed amount`}),"aria-pressed":V,onClick:U,...C.props(a.swapToggle),children:[x(T.span,{"aria-hidden":!0,animate:{scaleY:V?-1:1},transition:d,...C.props(a.swapIcon),children:x(t,{width:`14`,height:`14`})}),S(T.span,{layout:!0,transition:te,...C.props(a.swapTextWrap),children:[S(T.span,{layoutId:Z,transition:f,...C.props(a.swapText),children:[Q.digits,x(m,{active:H})]},Z),Q.symbol&&x(T.span,{initial:{opacity:0},animate:{opacity:1},transition:p,...C.props(a.swapSymbol),children:Q.symbol},`symbol-${Q.symbol}`)]})]})]})})}function ne({swapped:e,ctx:t,currencySymbol:n,subLineAmount:r}){if(e)return{digits:l(t.amount,n,t.locale,t.format),symbol:null};let i=u(r);return{digits:i.digits||`${t.amount??0}`,symbol:i.symbol||` ${t.receiveToken.symbol}`}}export{E as AmountEntryHero};
1
+ "use client";import{useLingui as e}from"../../../../../i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ArrowRightLeftIcon as t}from"../../../../../icons/ArrowRightLeftIcon.js";import"../../../../../../icons/index.js";import{parseAmountInputValue as n}from"../../../../../ui/AmountInput/utils.js";import{AmountInput as r}from"../../../../../ui/AmountInput/AmountInput.js";import"../../../../../ui/AmountInput/index.js";import{AMOUNT_ENTRY_SLOTS as i}from"../../AmountEntry.slots.js";import{styles as a}from"../../AmountEntry.styles.js";import{useAmountEntryContext as o}from"../../context.js";import{detectAssetDecimals as s,formatAmountForBand as c,formatFiatLine as l,splitSubLine as u}from"./utils.js";import{StaticBand as ee}from"./StaticBand.js";import{ICON_TRANSITION as d,SWAP_TRANSITION as f,SYMBOL_TRANSITION as p,WIDTH_TRANSITION as te}from"./transitions.js";import{SwapBackdrop as m}from"./SwapBackdrop.js";import{useSwapState as h}from"./useSwapState.js";import{useCallback as g,useEffect as _,useId as v,useRef as y,useState as b}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{LayoutGroup as C,m as w}from"motion/react";import*as T from"@stylexjs/stylex";function E({currencySymbol:l,subLine:u,subLineAmount:E}={}){let D=o(`AmountEntry.Hero`),O=l??D.currencySymbol??`$`,k=u??D.subLine,A=E??D.subLineAmount,{_:j}=e(),M=typeof D.onAmountChange==`function`,N=v(),P=y(null),F=y(null),[I,re]=b(null);_(()=>{let e=F.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>{let t=window.getComputedStyle(e),n=(Number.parseFloat(t.paddingInlineStart)||0)+(Number.parseFloat(t.paddingInlineEnd)||0),r=e.clientWidth-n;re(e=>e===r||r<=0?e:r)};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let L=D.format?.maximumFractionDigits??5,R=D.format?.useGrouping!==!1,z=s(A,L),B=g((e,t)=>c(e,t,{locale:D.locale,fiatFormat:D.format,fiatMaxDecimals:L,assetDecimals:z,useGrouping:R}),[D.locale,D.format,L,z,R]),{swapped:V,isAnimating:H,onSwap:U}=h({inputRef:P,onAfterSwap:g(e=>{D.amount!==null&&K(B(D.amount,e))},[D.amount,B])}),W=D.amount===null?``:B(D.amount,V),[G,K]=b(W);_(()=>{document.activeElement!==P.current&&K(W)},[W]);let q=e=>{K(e),D.onAmountChange?.(n(e,D.locale))},J=`${N}-fiat`,Y=`${N}-asset`,X=V?Y:J,Z=V?J:Y,Q=ne({swapped:V,ctx:D,currencySymbol:O,subLineAmount:A}),$=T.props(a.heroBlock),ie=I===null?void 0:{"--stridge-amt-available-width":`${I}px`};return x(C,{id:N,children:S(`div`,{ref:F,"data-stridge-slot":i.hero,className:$.className,style:$.style,children:[S(w.div,{layoutId:X,dir:`ltr`,transition:f,...T.props(a.bigSlot),children:[x(m,{active:H}),M?S(r,{"data-stridge-slot":i.heroBand,value:G,onValueChange:q,locale:D.locale??`en-US`,maxDecimals:V?z:L,useGrouping:R,placeholder:`0`,className:T.props(a.hero).className,style:{...T.props(a.hero).style,...ie},children:[!V&&x(r.Prefix,{...T.props(a.heroCurrency),children:O}),x(r.Field,{"aria-label":V?`Amount in ${D.receiveToken.symbol}`:`Amount in ${O}`,ref:P,autoFocus:!0,...T.props(a.heroAmount)})]}):x(ee,{swapped:V,ctx:D,currencySymbol:O,assetDecimals:z})]},X),k??S(`button`,{type:`button`,dir:`ltr`,"data-stridge-slot":i.heroSwap,"aria-label":j({id:`GwkmPx`,message:`Swap displayed amount`}),"aria-pressed":V,onClick:U,...T.props(a.swapToggle),children:[x(w.span,{"aria-hidden":!0,animate:{scaleY:V?-1:1},transition:d,...T.props(a.swapIcon),children:x(t,{width:`14`,height:`14`})}),S(w.span,{layout:!0,transition:te,...T.props(a.swapTextWrap),children:[S(w.span,{layoutId:Z,transition:f,...T.props(a.swapText),children:[Q.digits,x(m,{active:H})]},Z),Q.symbol&&x(w.span,{initial:{opacity:0},animate:{opacity:1},transition:p,...T.props(a.swapSymbol),children:Q.symbol},`symbol-${Q.symbol}`)]})]})]})})}function ne({swapped:e,ctx:t,currencySymbol:n,subLineAmount:r}){if(e)return{digits:l(t.amount,n,t.locale,t.format),symbol:null};let i=u(r);return{digits:i.digits||`${t.amount??0}`,symbol:i.symbol||` ${t.receiveToken.symbol}`}}export{E as AmountEntryHero};
@@ -1 +1 @@
1
- "use client";import{styles as e}from"../../AmountEntry.styles.js";import{SWAP_TRANSITION as t}from"./transitions.js";import{jsx as n}from"react/jsx-runtime";import*as r from"@stylexjs/stylex";import{motion as i}from"motion/react";function a({active:a}){return n(i.span,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:+!!a},transition:t,...r.props(e.swapBackdrop)})}export{a as SwapBackdrop};
1
+ "use client";import{styles as e}from"../../AmountEntry.styles.js";import{SWAP_TRANSITION as t}from"./transitions.js";import{jsx as n}from"react/jsx-runtime";import{m as r}from"motion/react";import*as i from"@stylexjs/stylex";function a({active:a}){return n(r.span,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:+!!a},transition:t,...i.props(e.swapBackdrop)})}export{a as SwapBackdrop};
@@ -0,0 +1,7 @@
1
+ import { AmountEntryNoticeProps } from "../types.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/shared/widgets/amount-entry/compound/components/Notice.d.ts
5
+ declare function AmountEntryNotice(_props?: AmountEntryNoticeProps): _$react_jsx_runtime0.JSX.Element;
6
+ //#endregion
7
+ export { AmountEntryNotice };
@@ -0,0 +1 @@
1
+ "use client";import{text as e}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{AMOUNT_ENTRY_SLOTS as t}from"../AmountEntry.slots.js";import{styles as n}from"../AmountEntry.styles.js";import{useAmountEntryContext as r}from"../context.js";import{jsx as i}from"react/jsx-runtime";import{AnimatePresence as a,m as o}from"motion/react";import*as s from"@stylexjs/stylex";const c={enter:{opacity:0,height:0,filter:`blur(2px)`},center:{opacity:1,height:`auto`,filter:`blur(0px)`,transition:{duration:.22,delay:.05}},exit:{opacity:0,height:0,filter:`blur(2px)`,transition:{duration:.18}}};function l(l={}){let u=r(`AmountEntry.Notice`);return i(a,{initial:!1,children:u.notice?i(o.div,{variants:c,initial:`enter`,animate:`center`,exit:`exit`,style:{overflow:`hidden`},"data-stridge-slot":t.notice,role:`status`,"aria-live":`polite`,children:i(e.p,{size:`sm`,color:`subdued`,...s.props(n.noticeText),children:u.notice})},`notice-slot`):null})}export{l as AmountEntryNotice};
@@ -127,9 +127,27 @@ interface AmountEntryProps {
127
127
  * Footer CTA click handler. When undefined the CTA renders inert.
128
128
  */
129
129
  onContinue?: () => void;
130
+ /**
131
+ * Validation hint surfaced below the swap-direction Flow row when the typed amount sits
132
+ * outside the host's allowed range (min / max / above balance). Omit when no hint is
133
+ * applicable; the {@link AmountEntry.Notice} part renders nothing in that case.
134
+ */
135
+ notice?: ReactNode;
136
+ /**
137
+ * Optional trailing-edge chrome rendered next to the `<Dialog.CloseButton />` inside
138
+ * `AmountEntry.Header`. Use this slot to attach flow-specific affordances such as the
139
+ * activity-history trigger. Per-Header `trailing` overrides this root-level prop; pass
140
+ * `trailing: null` on the Header to force the slot empty.
141
+ */
142
+ headerTrailing?: ReactNode;
130
143
  /** Compound parts; see `AmountEntry.Header`, `AmountEntry.Hero`, etc. */
131
144
  children?: ReactNode;
132
145
  }
146
+ /**
147
+ * Notice part props — typically rendered without explicit props; the part reads `notice` from
148
+ * the {@link AmountEntry} root via context.
149
+ */
150
+ type AmountEntryNoticeProps = ComponentProps<"div">;
133
151
  /**
134
152
  * Body slot part props. Forwards every native `<div>` prop through to the
135
153
  * underlying `Card.Body`, which becomes the scrollable region when the
@@ -152,6 +170,13 @@ interface AmountEntryHeaderProps {
152
170
  * the chevron hidden even when the root supplies a callback.
153
171
  */
154
172
  onBack?: (() => void) | null;
173
+ /**
174
+ * Optional override for the trailing-edge chrome rendered next to
175
+ * `<Dialog.CloseButton />`. Defaults to the `headerTrailing` set on the
176
+ * {@link AmountEntry} root. Pass `null` to force the slot empty even
177
+ * when the root supplies a node (mirroring `onBack`).
178
+ */
179
+ trailing?: ReactNode | null;
155
180
  }
156
181
  /**
157
182
  * Hero (large fiat amount block) part props.
@@ -221,4 +246,4 @@ interface AmountEntryFooterProps {
221
246
  onContinue?: () => void;
222
247
  }
223
248
  //#endregion
224
- export { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken };
249
+ export { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryNoticeProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken };
@@ -1 +1 @@
1
- "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{ASSET_PICKER_SLOTS as i}from"./AssetPicker.slots.js";import{styles as a}from"./AssetPicker.styles.js";import{AssetPickerContext as o}from"./context.js";import{AssetPickerAsset as s}from"./components/Asset.js";import{AssetPickerFooter as c}from"./components/Footer.js";import{AssetPickerHeader as l}from"./components/Header.js";import{AssetPickerList as u}from"./components/List.js";import{useMemo as d}from"react";import{jsx as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";const m=[];function h(e){let{token:t,selectedId:s,onSelect:c,assets:l=m,headerTitle:u,onBack:h,footerLabel:g,onContinue:_,children:v}=e,y=d(()=>({token:t,selectedId:s,onSelect:c,assets:l,headerTitle:u,onBack:h,footerLabel:g,onContinue:_}),[t,s,c,l,u,h,g,_]);return f(o.Provider,{value:y,children:f(n.Provider,{children:f(r,{"data-stridge-slot":i.root,...p.props(a.root),children:v})})})}function g(e){return f(t.Body,{"data-stridge-slot":i.body,...e})}function _({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return f(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:f(h,{...o,children:a})})}(function(e){e.Header=l,e.Body=g,e.List=u,e.Asset=s,e.Footer=c,e.Dialog=_})(h||={});export{h as AssetPicker};
1
+ "use client";import{DialogShell as e}from"../../../dialog/DialogShell.js";import{Card as t}from"../../../ui/Card/Card.js";import{Tooltip as n}from"../../../ui/Tooltip/Tooltip.js";import"../../../ui/Tooltip/index.js";import"../../../../ui/index.js";import{Frame as r}from"../../../dialog/Frame.js";import{ASSET_PICKER_SLOTS as i}from"./AssetPicker.slots.js";import{styles as a}from"./AssetPicker.styles.js";import{AssetPickerContext as o}from"./context.js";import{AssetPickerAsset as s}from"./components/Asset.js";import{AssetPickerFooter as c}from"./components/Footer.js";import{AssetPickerHeader as l}from"./components/Header.js";import{AssetPickerList as u}from"./components/List.js";import{useMemo as d}from"react";import{jsx as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";const m=[];function h(e){let{token:t,selectedId:s,onSelect:c,assets:l=m,headerTitle:u,onBack:h,footerLabel:g,onContinue:_,headerTrailing:v,children:y}=e,b=d(()=>({token:t,selectedId:s,onSelect:c,assets:l,headerTitle:u,onBack:h,footerLabel:g,onContinue:_,headerTrailing:v}),[t,s,c,l,u,h,g,_,v]);return f(o.Provider,{value:b,children:f(n.Provider,{children:f(r,{"data-stridge-slot":i.root,...p.props(a.root),children:y})})})}function g(e){return f(t.Body,{"data-stridge-slot":i.body,...e})}function _({open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:a,...o}){return f(e,{open:t,defaultOpen:n,onOpenChange:r,trigger:i,children:f(h,{...o,children:a})})}(function(e){e.Header=l,e.Body=g,e.List=u,e.Asset=s,e.Footer=c,e.Dialog=_})(h||={});export{h as AssetPicker};
@@ -1 +1 @@
1
- const e={root:{"AssetPicker__styles.root":`AssetPicker__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:5`},header:{"AssetPicker__styles.header":`AssetPicker__styles.header`,"gap-kOIVth":`x1v2ro7d`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1l90r2v`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:12`},headerTitle:{"AssetPicker__styles.headerTitle":`AssetPicker__styles.headerTitle`,"flexGrow-kzQI83":`x1iyjqo2`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:19`},backIcon:{"AssetPicker__styles.backIcon":`AssetPicker__styles.backIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:23`},closeIcon:{"AssetPicker__styles.closeIcon":`AssetPicker__styles.closeIcon`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:30`},list:{"AssetPicker__styles.list":`AssetPicker__styles.list`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x109j2v6`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:38`},assetRow:{"AssetPicker__styles.assetRow":`AssetPicker__styles.assetRow`,"gap-kOIVth":`x1af02g3`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:51`},textBlock:{"AssetPicker__styles.textBlock":`AssetPicker__styles.textBlock`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"minWidth-k7Eaqz":`xeuugli`,"gap-kOIVth":`x195vfkc`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:55`},fiat:{"AssetPicker__styles.fiat":`AssetPicker__styles.fiat`,"flexShrink-kmuXW":`x2lah0s`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:65`},lowBalanceBadge:{"AssetPicker__styles.lowBalanceBadge":`AssetPicker__styles.lowBalanceBadge`,"flexShrink-kmuXW":`x2lah0s`,"backgroundColor-kWkggS":`xp5aqsh`,"borderColor-kVAM5u":`x1bue7yx`,"color-kMwMTN":`x137ha3m`,"fontSize-kGuDYH":`x1j6dyjg`,"fontWeight-k63SB2":`xk50ysn`,"lineHeight-kLWn49":`x1xxsxie`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"minHeight-kAzted":`xj9xw9b`,"paddingInlineStart-kZCmMZ":`x7coems`,"paddingInlineEnd-kwRFfy":`xrw5ot4`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:78`},footer:{"AssetPicker__styles.footer":`AssetPicker__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1t4gjm`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:92`},cta:{"AssetPicker__styles.cta":`AssetPicker__styles.cta`,"width-kzqmXN":`xh8yej3`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:100`},ctaInteractive:{"AssetPicker__styles.ctaInteractive":`AssetPicker__styles.ctaInteractive`,"cursor-kkrTdU":`x1ypdohk`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:103`},ctaInert:{"AssetPicker__styles.ctaInert":`AssetPicker__styles.ctaInert`,"cursor-kkrTdU":`xt0e3qv`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:106`}};export{e as styles};
1
+ const e={root:{"AssetPicker__styles.root":`AssetPicker__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:5`},header:{"AssetPicker__styles.header":`AssetPicker__styles.header`,"gap-kOIVth":`x1v2ro7d`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1l90r2v`,"paddingInlineStart-kZCmMZ":`xf7dkkf`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:12`},headerTitle:{"AssetPicker__styles.headerTitle":`AssetPicker__styles.headerTitle`,"flexGrow-kzQI83":`x1iyjqo2`,"margin-kogj98":`x1ghz6dp`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:19`},headerTrailing:{"AssetPicker__styles.headerTrailing":`AssetPicker__styles.headerTrailing`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x1a6yh9e`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:26`},backIcon:{"AssetPicker__styles.backIcon":`AssetPicker__styles.backIcon`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhxwl1`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:31`},closeIcon:{"AssetPicker__styles.closeIcon":`AssetPicker__styles.closeIcon`,"width-kzqmXN":`xsmyaan`,"height-kZKoxP":`x1kpxq89`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`xzn0pkc`,"strokeWidth-kfJifR":`xhr4kjn`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:38`},list:{"AssetPicker__styles.list":`AssetPicker__styles.list`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x167g77z`,"paddingTop-kLKAdn":`x109j2v6`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:46`},assetRow:{"AssetPicker__styles.assetRow":`AssetPicker__styles.assetRow`,"gap-kOIVth":`x1af02g3`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:59`},textBlock:{"AssetPicker__styles.textBlock":`AssetPicker__styles.textBlock`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"flexBasis-kCS8Yb":`x1r8uery`,"flexGrow-kzQI83":`x1iyjqo2`,"flexShrink-kmuXW":`xs83m0k`,"minWidth-k7Eaqz":`xeuugli`,"gap-kOIVth":`x195vfkc`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:63`},fiat:{"AssetPicker__styles.fiat":`AssetPicker__styles.fiat`,"flexShrink-kmuXW":`x2lah0s`,"whiteSpace-khDVqt":`xuxw1ft`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:73`},lowBalanceBadge:{"AssetPicker__styles.lowBalanceBadge":`AssetPicker__styles.lowBalanceBadge`,"flexShrink-kmuXW":`x2lah0s`,"backgroundColor-kWkggS":`xp5aqsh`,"borderColor-kVAM5u":`x1bue7yx`,"color-kMwMTN":`x137ha3m`,"fontSize-kGuDYH":`x1j6dyjg`,"fontWeight-k63SB2":`xk50ysn`,"lineHeight-kLWn49":`x1xxsxie`,"letterSpacing-kb6lSQ":`x1ixy4ik`,"minHeight-kAzted":`xj9xw9b`,"paddingInlineStart-kZCmMZ":`x7coems`,"paddingInlineEnd-kwRFfy":`xrw5ot4`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:86`},footer:{"AssetPicker__styles.footer":`AssetPicker__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"paddingTop-kLKAdn":`xyamay9`,"paddingInlineEnd-kwRFfy":`x1x5flf6`,"paddingBottom-kGO01o":`x1t4gjm`,"paddingInlineStart-kZCmMZ":`xwn43p0`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:100`},cta:{"AssetPicker__styles.cta":`AssetPicker__styles.cta`,"width-kzqmXN":`xh8yej3`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:108`},ctaInteractive:{"AssetPicker__styles.ctaInteractive":`AssetPicker__styles.ctaInteractive`,"cursor-kkrTdU":`x1ypdohk`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:111`},ctaInert:{"AssetPicker__styles.ctaInert":`AssetPicker__styles.ctaInert`,"cursor-kkrTdU":`xt0e3qv`,$$css:`@stridge/kit:src/shared/widgets/asset-picker/compound/AssetPicker.styles.ts:114`}};export{e as styles};
@@ -6,7 +6,13 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  * A single row inside `AssetPicker.List`, laid out as:
7
7
  *
8
8
  * [icon + chain badge] [symbol] [low balance?] [fiat]
9
- * [balance]
9
+ * [chain · balance]
10
+ *
11
+ * The chain prefix on the secondary line disambiguates same-symbol rows on multi-chain
12
+ * pickers (e.g. `BSC · 5.7166 USDC` next to `Ethereum · 4 USDC`) so sighted users don't
13
+ * have to decode the small chain badge on the token logo to tell rows apart. The screen-
14
+ * reader announcement still comes from the row's `aria-label` (`"USDC on BSC"`) because the
15
+ * native concat of icon `alt`s + dual symbol text + chain badge `alt` is verbose and stutters.
10
16
  *
11
17
  * Selection state is read from context, so consumers only manage a single `selectedId` on the root rather than
12
18
  * threading `isSelected` onto each row.
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{Badge as t}from"../../../../ui/Badge/Badge.js";import"../../../../ui/Badge/index.js";import{SelectableTile as n}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as r}from"../../../../ui/Text/Text.js";import{TokenLogo as i}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{styles as a}from"../AssetPicker.styles.js";import{useAssetPickerContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({id:u,symbol:d,chain:f,balanceFormatted:p,fiatFormatted:m,lowBalance:h=!1,disabled:g=!1,chainId:_,contractAddress:v,isNative:y,logoUrl:b,chainLogoUrl:x,pinnedLogoUrl:S}){let C=o(`AssetPicker.Asset`),{_:w}=e();return c(n,{shape:`card`,value:u,selected:C.selectedId===u,disabled:g,"aria-label":`${d} on ${f}`,"data-asset-id":u,"data-chain":f,...l.props(a.assetRow),children:[s(i,{size:36,symbol:d,..._===void 0?{}:{chainId:_},...v===void 0?{}:{address:v},...y===void 0?{}:{isNative:y},...b===void 0?{}:{logoUrl:b},...x===void 0?{}:{chainLogoUrl:x},...S===void 0?{}:{pinnedLogoUrl:S}}),c(`span`,{...l.props(a.textBlock),children:[s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,children:d}),s(r.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,truncate:!0,children:p})]}),h?s(t,{variant:`outline`,color:`secondary`,size:`sm`,roundness:`lg`,...l.props(a.lowBalanceBadge),children:w({id:`Wqz0SO`,message:`Low Balance`})}):null,s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...l.props(a.fiat),children:m})]})}export{u as AssetPickerAsset};
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{Badge as t}from"../../../../ui/Badge/Badge.js";import"../../../../ui/Badge/index.js";import{SelectableTile as n}from"../../../../ui/SelectableTile/SelectableTile.js";import"../../../../ui/SelectableTile/index.js";import{text as r}from"../../../../ui/Text/Text.js";import{TokenLogo as i}from"../../../../ui/TokenLogo/TokenLogo.js";import"../../../../ui/TokenLogo/index.js";import"../../../../../ui/index.js";import{styles as a}from"../AssetPicker.styles.js";import{useAssetPickerContext as o}from"../context.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u({id:u,symbol:d,chain:f,balanceFormatted:p,fiatFormatted:m,lowBalance:h=!1,disabled:g=!1,chainId:_,contractAddress:v,isNative:y,logoUrl:b,chainLogoUrl:x,pinnedLogoUrl:S}){let C=o(`AssetPicker.Asset`),{_:w}=e();return c(n,{shape:`card`,value:u,selected:C.selectedId===u,disabled:g,"aria-label":`${d} on ${f}`,"data-asset-id":u,"data-chain":f,...l.props(a.assetRow),children:[s(i,{size:36,symbol:d,..._===void 0?{}:{chainId:_},...v===void 0?{}:{address:v},...y===void 0?{}:{isNative:y},...b===void 0?{}:{logoUrl:b},...x===void 0?{}:{chainLogoUrl:x},...S===void 0?{}:{pinnedLogoUrl:S}}),c(`span`,{...l.props(a.textBlock),children:[s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,children:d}),c(r.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,truncate:!0,children:[f,` · `,p]})]}),h?s(t,{variant:`outline`,color:`secondary`,size:`sm`,roundness:`lg`,...l.props(a.lowBalanceBadge),children:w({id:`Wqz0SO`,message:`Low Balance`})}):null,s(r.span,{size:`callout`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,...l.props(a.fiat),children:m})]})}export{u as AssetPickerAsset};
@@ -10,10 +10,15 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
10
10
  * Reads the title and back callback from the {@link AssetPicker} root by
11
11
  * default; pass `title` / `onBack` to override per-instance, or `onBack:
12
12
  * null` to force the chevron hidden even when the root supplies one.
13
+ *
14
+ * Optional `trailing` slot — Renders before the close X (e.g. the
15
+ * activity-history icon). Defaults to the root's `headerTrailing`; pass
16
+ * `trailing: null` to force the slot empty even when the root supplies a node.
13
17
  */
14
18
  declare function AssetPickerHeader({
15
19
  title,
16
- onBack
20
+ onBack,
21
+ trailing
17
22
  }?: AssetPickerHeaderProps): _$react_jsx_runtime0.JSX.Element;
18
23
  //#endregion
19
24
  export { AssetPickerHeader };
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{ASSET_PICKER_SLOTS as o}from"../AssetPicker.slots.js";import{styles as s}from"../AssetPicker.styles.js";import{useAssetPickerContext as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:f,onBack:p}={}){let m=c(`AssetPicker.Header`),{_:h}=e(),g=m.token?.symbol??`USDC`,_=f??m.headerTitle??h({id:`oFmN8a`,message:`Deposit {symbol}`,values:{symbol:g}}),v=p===null?void 0:p??m.onBack;return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[typeof v==`function`?l(n,{"aria-label":h({id:`iH8pgl`,message:`Back`}),onClick:v,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,...d.props(s.headerTitle),children:_}),l(r.CloseButton,{})]})}export{f as AssetPickerHeader};
1
+ "use client";import{useLingui as e}from"../../../../i18n/useLingui.js";import"../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../icons/ChevronLeftIcon.js";import"../../../../../icons/index.js";import{IconButton as n}from"../../../../ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../ui/Dialog/Dialog.js";import"../../../../ui/Dialog/index.js";import{Card as i}from"../../../../ui/Card/Card.js";import{text as a}from"../../../../ui/Text/Text.js";import"../../../../../ui/index.js";import{ASSET_PICKER_SLOTS as o}from"../AssetPicker.slots.js";import{styles as s}from"../AssetPicker.styles.js";import{useAssetPickerContext as c}from"../context.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";import*as d from"@stylexjs/stylex";function f({title:f,onBack:p,trailing:m}={}){let h=c(`AssetPicker.Header`),{_:g}=e(),_=h.token?.symbol??`USDC`,v=f??h.headerTitle??g({id:`oFmN8a`,message:`Deposit {symbol}`,values:{symbol:_}}),y=p===null?void 0:p??h.onBack,b=m===null?null:m??h.headerTrailing;return u(i.Header,{"data-stridge-slot":o.header,...d.props(s.header),children:[typeof y==`function`?l(n,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:y,children:l(t,{"aria-hidden":!0,...d.props(s.backIcon)})}):null,l(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,truncate:!0,...d.props(s.headerTitle),children:v}),u(`div`,{...d.props(s.headerTrailing),children:[b,l(r.CloseButton,{})]})]})}export{f as AssetPickerHeader};