@btndprojects/loam-ui-native 0.1.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/dist/accordion/index.js +7 -3
  2. package/dist/adaptive/index.js +16 -2
  3. package/dist/address-block/index.js +23 -0
  4. package/dist/alert/index.js +8 -2
  5. package/dist/analyzer/index.js +17 -6
  6. package/dist/announcement/index.js +18 -5
  7. package/dist/appearance-picker/index.js +15 -0
  8. package/dist/audio-player/index.js +29 -3
  9. package/dist/avatar/index.js +5 -2
  10. package/dist/avatar-group/index.js +9 -3
  11. package/dist/badge/index.js +10 -4
  12. package/dist/banner/index.js +6 -2
  13. package/dist/board/index.js +18 -6
  14. package/dist/button/index.js +9 -3
  15. package/dist/camera-permission/index.js +23 -12
  16. package/dist/capture-result/index.js +30 -17
  17. package/dist/card/index.js +10 -3
  18. package/dist/card-form/index.js +19 -9
  19. package/dist/carousel/index.js +6 -2
  20. package/dist/chart/index.js +18 -5
  21. package/dist/charts/index.js +21 -6
  22. package/dist/chat/index.js +41 -0
  23. package/dist/checkbox/index.js +9 -5
  24. package/dist/checklist/index.js +20 -8
  25. package/dist/checkout/index.js +30 -12
  26. package/dist/chip/index.js +11 -5
  27. package/dist/chunk-2BZD3NAP.js +1110 -0
  28. package/dist/chunk-2YKVID2V.js +35 -0
  29. package/dist/{chunk-JUAMLEHX.js → chunk-36DA3IPO.js} +137 -37
  30. package/dist/chunk-3A56MIAN.js +599 -0
  31. package/dist/chunk-3SCKCWF5.js +298 -0
  32. package/dist/chunk-3TZNDHKO.js +187 -0
  33. package/dist/chunk-43K3BLXV.js +9 -0
  34. package/dist/chunk-46ZJIQ2Z.js +208 -0
  35. package/dist/chunk-4CZMQDQL.js +192 -0
  36. package/dist/chunk-5DTKORLI.js +255 -0
  37. package/dist/{chunk-LOE5YNN3.js → chunk-5J4WFXFA.js} +68 -24
  38. package/dist/chunk-5KJ7TEQ6.js +305 -0
  39. package/dist/chunk-5NU33TXK.js +529 -0
  40. package/dist/chunk-5Z5ZYMOJ.js +1 -0
  41. package/dist/chunk-6KSUS7DF.js +690 -0
  42. package/dist/chunk-6RV6UW2J.js +349 -0
  43. package/dist/chunk-6RZM7RP2.js +520 -0
  44. package/dist/{chunk-4BXMXBJO.js → chunk-75BDCC7K.js} +24 -11
  45. package/dist/{chunk-PZXZJBMP.js → chunk-7CGJBQUA.js} +357 -32
  46. package/dist/{chunk-CJ5EOYZE.js → chunk-7IVF6JLJ.js} +24 -7
  47. package/dist/chunk-7IWCGXYA.js +143 -0
  48. package/dist/chunk-7LM4ASFH.js +172 -0
  49. package/dist/chunk-7MCEJFWV.js +341 -0
  50. package/dist/chunk-7NGMUVNU.js +245 -0
  51. package/dist/chunk-7PBSIXT7.js +355 -0
  52. package/dist/chunk-7QOYGENL.js +443 -0
  53. package/dist/{chunk-H6NIOQHK.js → chunk-A7SWYDE5.js} +66 -15
  54. package/dist/chunk-ADHPJALR.js +3051 -0
  55. package/dist/chunk-ALJYZLNQ.js +509 -0
  56. package/dist/chunk-APCWFOZW.js +28 -0
  57. package/dist/chunk-AQ5FIG74.js +419 -0
  58. package/dist/chunk-AWKQIE5I.js +139 -0
  59. package/dist/chunk-B2MMZZQB.js +426 -0
  60. package/dist/{chunk-ZVFE5QGU.js → chunk-B7JZ3N5G.js} +174 -97
  61. package/dist/chunk-BL37SW6G.js +1314 -0
  62. package/dist/chunk-BTRMA7GC.js +21 -0
  63. package/dist/chunk-C7IUWIUZ.js +643 -0
  64. package/dist/chunk-CA3DUVYD.js +10 -0
  65. package/dist/{chunk-S7F6XLTK.js → chunk-CBCJSO2B.js} +213 -54
  66. package/dist/chunk-CHPX4MFI.js +239 -0
  67. package/dist/chunk-CLGAMIOT.js +648 -0
  68. package/dist/chunk-CUE7VML6.js +1141 -0
  69. package/dist/chunk-CVU6S2E5.js +1587 -0
  70. package/dist/{chunk-AZRX6SAC.js → chunk-CXPQMA6Z.js} +112 -37
  71. package/dist/chunk-D2LN4I7I.js +581 -0
  72. package/dist/{chunk-UWFLYMAR.js → chunk-D34LNBO5.js} +635 -238
  73. package/dist/chunk-D4BCQICM.js +765 -0
  74. package/dist/chunk-EABKIIA4.js +1 -0
  75. package/dist/chunk-EICSYRAG.js +341 -0
  76. package/dist/chunk-EMWAJMAS.js +83 -0
  77. package/dist/chunk-EOLZWRV6.js +149 -0
  78. package/dist/chunk-EOQVTGB6.js +350 -0
  79. package/dist/{chunk-BEDBFJND.js → chunk-ESGUHNB2.js} +119 -43
  80. package/dist/{chunk-Q72LJOVE.js → chunk-F2KNBPKY.js} +74 -18
  81. package/dist/{chunk-O7AE6DAF.js → chunk-G7H3NX3G.js} +57 -24
  82. package/dist/chunk-GM7YIPB7.js +1052 -0
  83. package/dist/chunk-GVQQG435.js +581 -0
  84. package/dist/chunk-HE43OMEL.js +1056 -0
  85. package/dist/chunk-HHOMFQ7R.js +2535 -0
  86. package/dist/chunk-HJFFOOJ4.js +1 -0
  87. package/dist/chunk-HNAKS4Z3.js +207 -0
  88. package/dist/chunk-HP6ST2OW.js +352 -0
  89. package/dist/chunk-HW3OWDTU.js +1 -0
  90. package/dist/{chunk-3ENTMPQY.js → chunk-HZDB44K4.js} +102 -52
  91. package/dist/chunk-I2KLQ2HA.js +19 -0
  92. package/dist/chunk-I6CUP2LW.js +1155 -0
  93. package/dist/chunk-ICV4Y2WY.js +27 -0
  94. package/dist/chunk-IHSIENOE.js +3950 -0
  95. package/dist/{chunk-CUMUNPXY.js → chunk-IMMALLRU.js} +68 -32
  96. package/dist/chunk-J64KGCGX.js +55 -0
  97. package/dist/{chunk-IVNRBPGC.js → chunk-JA6TK7H2.js} +255 -84
  98. package/dist/{chunk-OOPPQH27.js → chunk-JAVZ5JPV.js} +83 -29
  99. package/dist/chunk-JCMTP3E4.js +1251 -0
  100. package/dist/{chunk-U7TFM2JA.js → chunk-JCXFFK64.js} +75 -18
  101. package/dist/chunk-JWCVBFDU.js +236 -0
  102. package/dist/chunk-JXRTD5RI.js +414 -0
  103. package/dist/chunk-JYIUZUIQ.js +1567 -0
  104. package/dist/chunk-K3TK3GIV.js +219 -0
  105. package/dist/chunk-KEVZIHM2.js +1511 -0
  106. package/dist/chunk-KHZDNQQD.js +171 -0
  107. package/dist/chunk-KL4GDV4V.js +131 -0
  108. package/dist/chunk-KNILMM4H.js +225 -0
  109. package/dist/chunk-KRBUZV45.js +25 -0
  110. package/dist/{chunk-ITTYJZWX.js → chunk-KXLDK6HB.js} +161 -45
  111. package/dist/chunk-KZ3X7TSL.js +196 -0
  112. package/dist/chunk-L2WMOA2V.js +474 -0
  113. package/dist/chunk-L4D5LHCH.js +109 -0
  114. package/dist/chunk-LAUJPLDB.js +853 -0
  115. package/dist/{chunk-SBMNWWBV.js → chunk-LGNTP5XA.js} +89 -17
  116. package/dist/chunk-LUZFCCSD.js +271 -0
  117. package/dist/{chunk-HPPW424V.js → chunk-LXJCP4PL.js} +129 -37
  118. package/dist/chunk-MCOZJWPU.js +731 -0
  119. package/dist/chunk-MG4SKWLL.js +2587 -0
  120. package/dist/chunk-MPEPTSER.js +414 -0
  121. package/dist/chunk-MWPJ4YGP.js +1 -0
  122. package/dist/{chunk-TKQYWZ5V.js → chunk-N7AX4OA4.js} +108 -41
  123. package/dist/chunk-NHSLM6SE.js +523 -0
  124. package/dist/chunk-NNCOFLNE.js +24 -0
  125. package/dist/{chunk-J7Q7VCVC.js → chunk-NNJLVA7M.js} +54 -15
  126. package/dist/chunk-NZG75DGA.js +282 -0
  127. package/dist/chunk-O76QXRBV.js +431 -0
  128. package/dist/chunk-OANH27AK.js +223 -0
  129. package/dist/chunk-OCHPK5YV.js +609 -0
  130. package/dist/chunk-OMHVEVX4.js +436 -0
  131. package/dist/{chunk-YF4NSSMT.js → chunk-ONKQUJWD.js} +220 -65
  132. package/dist/chunk-OVTK7A6T.js +615 -0
  133. package/dist/chunk-PCEFCOLN.js +120 -0
  134. package/dist/chunk-PFLNFIVB.js +186 -0
  135. package/dist/chunk-PHSZY37H.js +300 -0
  136. package/dist/chunk-PJLTKDVY.js +18 -0
  137. package/dist/{chunk-4YIP3CWS.js → chunk-PK7BN3MI.js} +89 -19
  138. package/dist/{chunk-KMI5ML5I.js → chunk-PWFRDRGS.js} +155 -29
  139. package/dist/chunk-PYPMD46W.js +707 -0
  140. package/dist/chunk-Q6CCHDI7.js +331 -0
  141. package/dist/chunk-QFA5WS2A.js +750 -0
  142. package/dist/chunk-QJMMM4RC.js +124 -0
  143. package/dist/chunk-QNZII37O.js +10 -0
  144. package/dist/chunk-QYWEVAM6.js +407 -0
  145. package/dist/chunk-R5T4VZ7Z.js +126 -0
  146. package/dist/chunk-R77HFLZD.js +1 -0
  147. package/dist/{chunk-YC6WORFL.js → chunk-RAESDNU5.js} +228 -102
  148. package/dist/chunk-RBYQUXNL.js +1 -0
  149. package/dist/chunk-RCM3DT5E.js +1 -0
  150. package/dist/chunk-RGNY56L7.js +282 -0
  151. package/dist/chunk-RIK6UX2K.js +344 -0
  152. package/dist/{chunk-LAECSR4H.js → chunk-RJA3RXO3.js} +75 -60
  153. package/dist/chunk-RJYRJ3LD.js +1 -0
  154. package/dist/chunk-RMA3NOY4.js +599 -0
  155. package/dist/{chunk-DM5QUKKO.js → chunk-RSWKKAHK.js} +160 -66
  156. package/dist/chunk-RVOIIX3V.js +204 -0
  157. package/dist/chunk-SA2RRBGT.js +1077 -0
  158. package/dist/chunk-SG3J4R45.js +1428 -0
  159. package/dist/chunk-SPUK7JD4.js +238 -0
  160. package/dist/chunk-SWXV2K5N.js +434 -0
  161. package/dist/chunk-SYJEPXP6.js +1303 -0
  162. package/dist/{chunk-N32RGOA5.js → chunk-SZLI34TA.js} +93 -28
  163. package/dist/{chunk-4GBOGOTV.js → chunk-T77WJA74.js} +143 -18
  164. package/dist/chunk-TDWWVJA4.js +630 -0
  165. package/dist/chunk-TFHI5XDR.js +610 -0
  166. package/dist/chunk-TH4PW2WU.js +17 -0
  167. package/dist/chunk-TTQ24HQX.js +12 -0
  168. package/dist/chunk-TUACVJNG.js +12 -0
  169. package/dist/{chunk-CYRBHQQZ.js → chunk-TUL5RUIA.js} +201 -59
  170. package/dist/{chunk-4ZAHCY44.js → chunk-TYOSA7JG.js} +74 -38
  171. package/dist/chunk-TYQTMMEV.js +1 -0
  172. package/dist/chunk-TZO6YDS7.js +346 -0
  173. package/dist/chunk-U3ETF22F.js +328 -0
  174. package/dist/chunk-U6BYHD2N.js +213 -0
  175. package/dist/{chunk-WSW6ZFAQ.js → chunk-UF6EJXPQ.js} +20 -5
  176. package/dist/chunk-UNNQIPGK.js +792 -0
  177. package/dist/chunk-UQEN55EY.js +1 -0
  178. package/dist/chunk-UQVO6AJV.js +171 -0
  179. package/dist/chunk-VFDQAAIW.js +351 -0
  180. package/dist/chunk-VIUE3VQT.js +1 -0
  181. package/dist/chunk-VJLSSSGC.js +438 -0
  182. package/dist/chunk-VLMT6KYT.js +350 -0
  183. package/dist/chunk-VMHGBUGS.js +35 -0
  184. package/dist/{chunk-7O2FMUPT.js → chunk-VQKPBYW6.js} +400 -139
  185. package/dist/{chunk-EJBDRVIH.js → chunk-VSSTWLC5.js} +61 -16
  186. package/dist/chunk-VZYYZRPN.js +1992 -0
  187. package/dist/chunk-W23G6JLF.js +37 -0
  188. package/dist/chunk-WAIJCD2V.js +480 -0
  189. package/dist/chunk-WFMQ3WKM.js +378 -0
  190. package/dist/chunk-WJ2KDRMY.js +66 -0
  191. package/dist/chunk-WKFZJO54.js +437 -0
  192. package/dist/{chunk-SYNOJOQO.js → chunk-WVVD3XOV.js} +189 -93
  193. package/dist/chunk-XAIWMSLB.js +1 -0
  194. package/dist/chunk-XBXUBBJZ.js +98 -0
  195. package/dist/chunk-XCU7MYBJ.js +1 -0
  196. package/dist/chunk-XHE4PGCI.js +717 -0
  197. package/dist/chunk-XRSJ32M3.js +331 -0
  198. package/dist/chunk-XTCVOEAW.js +1 -0
  199. package/dist/chunk-XWGXVQF6.js +58 -0
  200. package/dist/{chunk-35OFI3JG.js → chunk-Y3XKKO5K.js} +258 -123
  201. package/dist/chunk-Y4QNMBLO.js +533 -0
  202. package/dist/chunk-Y5H4CTKO.js +1 -0
  203. package/dist/chunk-YBQIN75A.js +403 -0
  204. package/dist/chunk-YJ5PXOX3.js +158 -0
  205. package/dist/{chunk-AWJOCGFZ.js → chunk-YLRSRUPS.js} +81 -55
  206. package/dist/chunk-YM6MPJ4A.js +1 -0
  207. package/dist/chunk-YV7KZENV.js +200 -0
  208. package/dist/chunk-Z7I4ZSO6.js +316 -0
  209. package/dist/chunk-ZIRMWD2B.js +555 -0
  210. package/dist/chunk-ZPMG3FWU.js +75 -0
  211. package/dist/{chunk-QWCMU5B2.js → chunk-ZTXMK2G7.js} +289 -115
  212. package/dist/chunk-ZVJCWXAL.js +541 -0
  213. package/dist/{chunk-P23EQNRQ.js → chunk-ZYQ23DPT.js} +215 -49
  214. package/dist/coachmark/index.js +10 -3
  215. package/dist/code-block/index.js +6 -3
  216. package/dist/color-field/index.js +15 -5
  217. package/dist/color-picker/index.js +23 -0
  218. package/dist/commerce/index.js +31 -17
  219. package/dist/confirm/index.js +31 -0
  220. package/dist/connection-card/index.js +34 -0
  221. package/dist/connectivity/index.js +6 -2
  222. package/dist/context-menu/index.js +13 -3
  223. package/dist/copy-button/index.js +5 -2
  224. package/dist/data-grid/index.js +35 -17
  225. package/dist/date-range-picker/index.js +22 -9
  226. package/dist/description-list/index.js +6 -1
  227. package/dist/device-frame/index.js +30 -0
  228. package/dist/dialog/index.js +10 -2
  229. package/dist/divider/index.js +2 -0
  230. package/dist/empty-state/index.js +15 -2
  231. package/dist/error-summary/index.js +9 -2
  232. package/dist/fab/index.js +7 -2
  233. package/dist/file-manager/index.js +44 -0
  234. package/dist/file-upload/index.js +16 -7
  235. package/dist/filter-bar/index.js +14 -7
  236. package/dist/flow-run/index.js +23 -13
  237. package/dist/form/index.js +32 -3
  238. package/dist/gallery/index.js +8 -2
  239. package/dist/hold-to-confirm/index.js +6 -2
  240. package/dist/hover-card/index.js +18 -0
  241. package/dist/icon-tile/index.js +10 -0
  242. package/dist/image/index.js +9 -0
  243. package/dist/index.d.ts +30789 -12332
  244. package/dist/index.js +424 -135
  245. package/dist/infinite-list/index.js +6 -2
  246. package/dist/inline-edit/index.js +8 -5
  247. package/dist/input/index.js +7 -4
  248. package/dist/interactions/index.js +5 -1
  249. package/dist/invoice/index.js +22 -9
  250. package/dist/job-row/index.js +22 -0
  251. package/dist/json-inspector/index.js +20 -0
  252. package/dist/kbd/index.js +5 -1
  253. package/dist/keyboard/index.js +9 -2
  254. package/dist/level-meter/index.js +9 -0
  255. package/dist/list-row/index.js +14 -4
  256. package/dist/log-viewer/index.js +11 -2
  257. package/dist/map-view/index.js +16 -3
  258. package/dist/markdown/index.js +12 -6
  259. package/dist/metric/index.js +10 -4
  260. package/dist/metric-strip/index.js +12 -0
  261. package/dist/money/index.js +16 -3
  262. package/dist/nav-drawer/index.js +8 -2
  263. package/dist/nav-header/index.js +15 -0
  264. package/dist/navigation/index.js +32 -2
  265. package/dist/notification-center/index.js +28 -12
  266. package/dist/number-roll/index.js +7 -2
  267. package/dist/onboarding-pager/index.js +22 -0
  268. package/dist/one-handed/index.js +5 -3
  269. package/dist/os-surfaces/index.js +9 -3
  270. package/dist/otp/index.js +9 -5
  271. package/dist/page-header/index.js +3 -1
  272. package/dist/pagination/index.js +8 -0
  273. package/dist/payment-method/index.js +21 -11
  274. package/dist/payment-status/index.js +26 -15
  275. package/dist/permission/index.js +21 -2
  276. package/dist/picker/index.js +22 -6
  277. package/dist/progress/index.js +11 -3
  278. package/dist/provenance/index.js +16 -0
  279. package/dist/pull-to-refresh/index.js +4 -2
  280. package/dist/qr-code/index.js +16 -0
  281. package/dist/query-builder/index.js +30 -0
  282. package/dist/radio-group/index.js +9 -5
  283. package/dist/rating/index.js +10 -2
  284. package/dist/receivables/index.js +35 -17
  285. package/dist/recording-indicator/index.js +21 -0
  286. package/dist/refund/index.js +28 -15
  287. package/dist/repeatable-rows/index.js +19 -0
  288. package/dist/save-status/index.js +7 -3
  289. package/dist/screen/index.js +3 -0
  290. package/dist/scroll-area/index.js +3 -1
  291. package/dist/search-field/index.js +13 -0
  292. package/dist/secret-field/index.js +19 -0
  293. package/dist/section-header/index.js +4 -0
  294. package/dist/segmented-control/index.js +4 -3
  295. package/dist/sheet/index.js +11 -3
  296. package/dist/shortcuts-sheet/index.js +2 -0
  297. package/dist/sign-in-screen/index.js +25 -0
  298. package/dist/skeleton/index.js +5 -1
  299. package/dist/slider/index.js +5 -2
  300. package/dist/sortable/index.js +8 -0
  301. package/dist/spinner/index.js +4 -1
  302. package/dist/split-button/index.js +21 -6
  303. package/dist/spotlight/index.js +9 -1
  304. package/dist/stack/index.js +2 -0
  305. package/dist/stage-timeline/index.js +8 -3
  306. package/dist/status-dot/index.js +8 -2
  307. package/dist/stepper/index.js +11 -4
  308. package/dist/streaming-text/index.js +4 -2
  309. package/dist/survey/index.js +29 -16
  310. package/dist/switch/index.js +9 -3
  311. package/dist/system-state/index.js +15 -4
  312. package/dist/tab-bar/index.js +13 -2
  313. package/dist/tabs/index.js +12 -2
  314. package/dist/tags-input/index.js +13 -0
  315. package/dist/text/index.js +4 -0
  316. package/dist/textarea/index.js +8 -5
  317. package/dist/thinking/index.js +6 -1
  318. package/dist/tile-rail/index.js +10 -0
  319. package/dist/time-field/index.js +20 -0
  320. package/dist/time-range-control/index.js +36 -0
  321. package/dist/timeline/index.js +4 -2
  322. package/dist/toast/index.js +6 -2
  323. package/dist/toolbar/index.js +5 -2
  324. package/dist/tour/index.js +15 -10
  325. package/dist/transcript/index.js +28 -0
  326. package/dist/truncation-notice/index.js +5 -2
  327. package/dist/update-notice/index.js +19 -9
  328. package/dist/video-player/index.js +29 -2
  329. package/dist/viewfinder/index.js +15 -5
  330. package/dist/widget/index.js +14 -4
  331. package/dist/wizard/index.js +10 -4
  332. package/package.json +13 -12
  333. package/dist/chunk-223Q2T2Q.js +0 -229
  334. package/dist/chunk-2A5NIQAK.js +0 -254
  335. package/dist/chunk-2GK6PHGE.js +0 -363
  336. package/dist/chunk-2ZZ7TDJ4.js +0 -324
  337. package/dist/chunk-3ARE4TES.js +0 -195
  338. package/dist/chunk-3NMD74ZU.js +0 -4
  339. package/dist/chunk-3WPW4KUN.js +0 -182
  340. package/dist/chunk-423B7SPN.js +0 -993
  341. package/dist/chunk-47FWHGUN.js +0 -394
  342. package/dist/chunk-4DS5ZWVC.js +0 -83
  343. package/dist/chunk-4SZYY6AN.js +0 -99
  344. package/dist/chunk-4YQOR7JM.js +0 -204
  345. package/dist/chunk-52X2VYTD.js +0 -228
  346. package/dist/chunk-5YNTNN5A.js +0 -177
  347. package/dist/chunk-6HT2LP62.js +0 -504
  348. package/dist/chunk-6N33LFQA.js +0 -35
  349. package/dist/chunk-6X6PQ443.js +0 -432
  350. package/dist/chunk-7CFF4HXS.js +0 -126
  351. package/dist/chunk-AI4DWZCD.js +0 -162
  352. package/dist/chunk-BTTFCMKG.js +0 -166
  353. package/dist/chunk-BV3B2HYZ.js +0 -1635
  354. package/dist/chunk-C2NTXVWM.js +0 -98
  355. package/dist/chunk-CDRZHT42.js +0 -424
  356. package/dist/chunk-DHWADYZX.js +0 -144
  357. package/dist/chunk-F5XNPWS7.js +0 -1024
  358. package/dist/chunk-FMYDDECK.js +0 -1521
  359. package/dist/chunk-GDKZTW34.js +0 -395
  360. package/dist/chunk-GL7B2DOW.js +0 -134
  361. package/dist/chunk-GNNJ4GCC.js +0 -471
  362. package/dist/chunk-HET4LLMX.js +0 -129
  363. package/dist/chunk-HZ6CNMAF.js +0 -870
  364. package/dist/chunk-IIQTAY3J.js +0 -715
  365. package/dist/chunk-JNH2TYIN.js +0 -96
  366. package/dist/chunk-JNY4ZHAR.js +0 -634
  367. package/dist/chunk-JXJB2X6M.js +0 -131
  368. package/dist/chunk-LRJNDEIA.js +0 -302
  369. package/dist/chunk-LSS54GLJ.js +0 -116
  370. package/dist/chunk-LZLHELAG.js +0 -137
  371. package/dist/chunk-MOUJOP55.js +0 -425
  372. package/dist/chunk-NKB7BZYK.js +0 -167
  373. package/dist/chunk-NQYBUO3K.js +0 -1795
  374. package/dist/chunk-O4AEHWII.js +0 -464
  375. package/dist/chunk-OETCUXQP.js +0 -134
  376. package/dist/chunk-OPXFZ4Y5.js +0 -204
  377. package/dist/chunk-PJXUJYS6.js +0 -248
  378. package/dist/chunk-PUPM2YGF.js +0 -376
  379. package/dist/chunk-QCDXZBC5.js +0 -247
  380. package/dist/chunk-QDYDBCFP.js +0 -197
  381. package/dist/chunk-QJJ6MADV.js +0 -274
  382. package/dist/chunk-QKXCPTFS.js +0 -349
  383. package/dist/chunk-RIBDXGUG.js +0 -108
  384. package/dist/chunk-RJQOOHT2.js +0 -214
  385. package/dist/chunk-RNGLIHFA.js +0 -191
  386. package/dist/chunk-RQ3HASCC.js +0 -6
  387. package/dist/chunk-RSOJT5YW.js +0 -124
  388. package/dist/chunk-RUZHTGKB.js +0 -237
  389. package/dist/chunk-RW6ZL2FQ.js +0 -284
  390. package/dist/chunk-TKVFVF5D.js +0 -95
  391. package/dist/chunk-TOXAGRDQ.js +0 -144
  392. package/dist/chunk-TUTI5HOZ.js +0 -112
  393. package/dist/chunk-UC2WGUP3.js +0 -627
  394. package/dist/chunk-UYG5L34B.js +0 -87
  395. package/dist/chunk-VBOXAEPI.js +0 -336
  396. package/dist/chunk-VCDBXW5H.js +0 -188
  397. package/dist/chunk-VEAYTRPX.js +0 -414
  398. package/dist/chunk-VQHPQEUH.js +0 -273
  399. package/dist/chunk-VXDZFJGP.js +0 -874
  400. package/dist/chunk-XNUVB5OL.js +0 -375
  401. package/dist/chunk-XOSCY2CW.js +0 -242
  402. package/dist/chunk-XXXEFXY5.js +0 -99
  403. package/dist/chunk-YDGVJETP.js +0 -60
  404. package/dist/chunk-YG3ZJHGU.js +0 -223
  405. package/dist/chunk-YTFKPRUK.js +0 -845
  406. package/dist/chunk-Z7H7VSFZ.js +0 -323
  407. package/dist/header/index.js +0 -5
  408. package/dist/search-bar/index.js +0 -5
  409. /package/dist/{chunk-3ECPOSKO.js → chunk-3BKLBYPK.js} +0 -0
  410. /package/dist/{chunk-JRLTGLN4.js → chunk-3UG6JUCV.js} +0 -0
  411. /package/dist/{chunk-RTIKSY6A.js → chunk-4QCR3K2J.js} +0 -0
  412. /package/dist/{chunk-VFCUIDRT.js → chunk-5WWRTEPS.js} +0 -0
@@ -0,0 +1,1511 @@
1
+ import { PanelRoot } from './chunk-R5T4VZ7Z.js';
2
+ import { Amount, PriceRow } from './chunk-GVQQG435.js';
3
+ import { usePayLabels } from './chunk-QNZII37O.js';
4
+ import { MetricDelta } from './chunk-N7AX4OA4.js';
5
+ import { Checkbox } from './chunk-KNILMM4H.js';
6
+ import { Chip } from './chunk-7NGMUVNU.js';
7
+ import { Alert } from './chunk-Z7I4ZSO6.js';
8
+ import { Button } from './chunk-5DTKORLI.js';
9
+ import { resolveTextRole } from './chunk-L4D5LHCH.js';
10
+ import { Badge } from './chunk-LGNTP5XA.js';
11
+ import { SkeletonText, Skeleton } from './chunk-YJ5PXOX3.js';
12
+ import { softToneSkin } from './chunk-PJLTKDVY.js';
13
+ import { NAMED_ROLE, announce } from './chunk-W23G6JLF.js';
14
+ import { SegmentedControl } from './chunk-NZG75DGA.js';
15
+ import { RadioGroup, RadioGroupItem } from './chunk-PK7BN3MI.js';
16
+ import { TextField } from './chunk-KXLDK6HB.js';
17
+ import { isAndroidIdiom } from './chunk-TH4PW2WU.js';
18
+ import { useLabels, useLoamLocale } from './chunk-APCWFOZW.js';
19
+ import { Icon } from './chunk-PCEFCOLN.js';
20
+ import { useResolvedMotion, springConfig } from './chunk-J64KGCGX.js';
21
+ import * as React2 from 'react';
22
+ import { View, Text, Animated, AccessibilityInfo, Pressable } from 'react-native';
23
+ import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
24
+ import { arrivalText, refundRemaining, money, refundLedger, refundReasons, parseAmount, clampRefund, REFUND_FRACTIONS, refundFraction, evidenceTone, evidenceLabel, disputeWorthDefending, DISPUTE_ACCEPT_THRESHOLD_MINOR } from '@btndprojects/loam-pay';
25
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
26
+
27
+ // src/refund/refund-shell.ts
28
+ function refundShellStyle(theme, { variant = "default", elevation = "default", padding = "md", tone }) {
29
+ const raised = variant === "elevated" || elevation === "raised";
30
+ const flat = elevation === "flat";
31
+ return {
32
+ ...padding === "sm" ? { padding: theme.space.s4 } : null,
33
+ ...padding === "lg" ? { padding: theme.space.s6 } : null,
34
+ ...variant === "outline" ? { backgroundColor: "transparent" } : null,
35
+ ...tone && tone !== "neutral" ? { backgroundColor: softToneSkin(theme, tone).fill, borderColor: softToneSkin(theme, tone).edge } : null,
36
+ ...raised && !flat ? theme.shadow.lg : null
37
+ };
38
+ }
39
+ function panelBaseStyle(theme) {
40
+ return {
41
+ alignSelf: "stretch",
42
+ gap: theme.space.s5,
43
+ padding: theme.space.s5,
44
+ borderRadius: theme.radius.lg,
45
+ borderWidth: theme.borderWidth.base,
46
+ borderColor: theme.color.border,
47
+ backgroundColor: theme.color.surface
48
+ };
49
+ }
50
+
51
+ // src/refund/refund-labels.ts
52
+ var DEFAULT_LABELS = {
53
+ issuedTitle: "Refund issued",
54
+ refundAnother: "Refund another charge",
55
+ title: "Refund",
56
+ notify: "Email the customer",
57
+ irreversible: "A refund cannot be undone. Check the amount before you issue it.",
58
+ modeAria: "Refund amount mode",
59
+ modeFull: "Full",
60
+ modePartial: "Partial",
61
+ fullBalance: "Refunding the full remaining balance",
62
+ commit: (amount) => `Refund ${amount}`,
63
+ states: {
64
+ requested: "Requested",
65
+ processing: "Processing",
66
+ sent: "Sent",
67
+ arrived: "Arrived",
68
+ failed: "Failed"
69
+ },
70
+ of: "of",
71
+ stillRefundable: "still refundable",
72
+ ledgerCaption: (currency) => `Refund ledger \xB7 ${currency}`,
73
+ reason: "Reason",
74
+ amount: "Refund amount",
75
+ upTo: (max) => `Up to ${max}.`,
76
+ capped: (max) => `That is more than the ${max} left, so it was capped.`,
77
+ percent: (percent) => `${percent}%`,
78
+ fractionAria: (percent, amount) => `Refund ${percent}% \u2014 ${amount}`,
79
+ amountMode: "Amount mode",
80
+ fullRefund: "Full refund",
81
+ partialRefund: "Partial refund",
82
+ refunding: "Refunding",
83
+ notStated: "Not stated",
84
+ customerEmail: "Customer email",
85
+ notifyYes: (label) => `${label} \u2014 yes`,
86
+ notifyNo: (label) => `${label} \u2014 no`,
87
+ announceIssued: (title, amount) => `${title}. ${amount}`,
88
+ disputeTitle: "Chargeback",
89
+ disputeDescription: "The amount and the network fee have already left the account. Submitting evidence asks the network to reverse the first of those; the fee is not refundable either way, and the network decides \u2014 not us.",
90
+ submitEvidence: "Submit evidence",
91
+ acceptDispute: "Accept the dispute",
92
+ evidence: "Evidence",
93
+ attach: "Attach",
94
+ days: (n) => `${n} ${n === 1 ? "day" : "days"}`,
95
+ toRespond: (due) => `to respond \xB7 evidence due ${due}`,
96
+ disputed: "Disputed",
97
+ networkFee: "Network fee",
98
+ reasonNetwork: (reason, network) => `${reason} \xB7 ${network}`,
99
+ opened: "Opened",
100
+ guidance: (worth, threshold, complete) => `${worth ? `Above ${threshold} this is usually worth defending \u2014 the amount at stake exceeds the staff time a response costs.` : `Below ${threshold} the staff time spent defending this usually exceeds the amount at stake. Accepting is a legitimate answer, not a loss.`}${complete ? "" : " Some evidence is still missing; submitting now sends what is attached."}`
101
+ };
102
+ var REFUND_STATE = {
103
+ requested: { variant: "neutral" },
104
+ processing: { variant: "info" },
105
+ sent: { variant: "info" },
106
+ arrived: { variant: "good" },
107
+ failed: { variant: "danger" }
108
+ };
109
+ var ALIGN_JUSTIFY = {
110
+ start: { justifyContent: "flex-start" },
111
+ center: { justifyContent: "center" },
112
+ end: { justifyContent: "flex-end" }
113
+ };
114
+ function RefundStatus({
115
+ state,
116
+ label,
117
+ size = "sm",
118
+ variant,
119
+ count,
120
+ motion,
121
+ error = false,
122
+ labels: labelsProp
123
+ }) {
124
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
125
+ const { styles } = useStyles(sheet);
126
+ const meta = REFUND_STATE[state];
127
+ const tone = error ? "danger" : variant ?? meta.variant;
128
+ const pill = /* @__PURE__ */ jsx(Badge, { variant: tone, size, dot: true, children: label ?? labels.states[state] });
129
+ const hasCount = count !== void 0 && count > 0;
130
+ const message = typeof error === "string" && error ? error : null;
131
+ if (!hasCount && !message) return pill;
132
+ return /* @__PURE__ */ jsxs(View, { style: styles.statusRow, children: [
133
+ pill,
134
+ hasCount ? /* @__PURE__ */ jsx(Badge, { variant: tone, size, count, ...motion ? { motion } : null }) : null,
135
+ message ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "alert", style: styles.errorText, children: message }) : null
136
+ ] });
137
+ }
138
+ function RefundArrivalNote({
139
+ method,
140
+ window: text,
141
+ inline = false,
142
+ tone = "info",
143
+ variant,
144
+ dismissible,
145
+ onDismiss,
146
+ action,
147
+ icon = "clock",
148
+ size = "compact",
149
+ motion,
150
+ loading = false,
151
+ labels: labelsProp,
152
+ style,
153
+ error = false
154
+ }) {
155
+ const pay = usePayLabels(labelsProp);
156
+ const theme = useLoamTheme("refund");
157
+ const { styles } = useStyles(sheet);
158
+ const body = text ?? arrivalText(method, pay);
159
+ const message = typeof error === "string" && error ? error : null;
160
+ const noteTone = error ? "danger" : tone;
161
+ if (loading) {
162
+ return /* @__PURE__ */ jsx(View, { accessibilityState: { busy: true }, "aria-busy": true, style: [styles.arrivalInline, style], children: /* @__PURE__ */ jsx(SkeletonText, { lines: 1 }) });
163
+ }
164
+ if (!inline) {
165
+ return /* @__PURE__ */ jsx(View, { style, children: /* @__PURE__ */ jsx(
166
+ Alert,
167
+ {
168
+ tone: noteTone,
169
+ size: message ? "md" : size,
170
+ icon,
171
+ title: body,
172
+ ...variant ? { variant } : null,
173
+ ...dismissible !== void 0 ? { dismissible } : null,
174
+ ...onDismiss ? { onDismiss } : null,
175
+ ...action ? { action } : null,
176
+ ...motion ? { motion } : null,
177
+ children: message ? /* @__PURE__ */ jsx(Text, { style: styles.arrivalBlockError, children: message }) : null
178
+ }
179
+ ) });
180
+ }
181
+ return /* @__PURE__ */ jsxs(View, { style: [styles.arrivalInline, style], children: [
182
+ icon ? /* @__PURE__ */ jsx(
183
+ Icon,
184
+ {
185
+ name: icon,
186
+ size: theme.icon.sm,
187
+ color: noteTone === "info" || noteTone === "neutral" ? theme.color.text3 : theme.color[noteTone]
188
+ }
189
+ ) : null,
190
+ /* @__PURE__ */ jsx(Text, { style: [styles.arrivalInlineBody, size === "md" ? styles.arrivalInlineMd : null], children: body }),
191
+ message ? /* @__PURE__ */ jsx(Text, { role: "alert", accessibilityRole: "alert", style: styles.arrivalError, children: message }) : null
192
+ ] });
193
+ }
194
+ function RefundRemainingNote({
195
+ charge,
196
+ currency,
197
+ label: labelProp,
198
+ size = "sm",
199
+ unit,
200
+ tone,
201
+ loading = false,
202
+ align = "start",
203
+ locale: localeProp,
204
+ labels: labelsProp,
205
+ style,
206
+ error
207
+ }) {
208
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
209
+ const providerLocale = useLoamLocale();
210
+ const locale = localeProp ?? providerLocale;
211
+ const label = labelProp ?? labels.stillRefundable;
212
+ const { styles } = useStyles(sheet);
213
+ const code = currency ?? charge.currency ?? "USD";
214
+ const wordSize = size === "sm" ? null : size === "md" ? styles.wordMd : styles.wordLg;
215
+ return /* @__PURE__ */ jsxs(
216
+ View,
217
+ {
218
+ accessible: true,
219
+ accessibilityRole: NAMED_ROLE,
220
+ accessibilityLabel: `${money(refundRemaining(charge), code, { locale })} ${labels.of} ${money(charge.amountMinor, code, { locale })}${unit ? ` ${unit}` : ""} ${label}${error ? `. ${error}` : ""}`,
221
+ accessibilityState: loading ? { busy: true } : void 0,
222
+ "aria-busy": loading || void 0,
223
+ style: [styles.remaining, ALIGN_JUSTIFY[align], style],
224
+ children: [
225
+ /* @__PURE__ */ jsx(
226
+ Amount,
227
+ {
228
+ minor: refundRemaining(charge),
229
+ currency: code,
230
+ size,
231
+ weight: "bold",
232
+ locale,
233
+ loading,
234
+ ...error ? { tone: "danger" } : tone ? { tone } : null,
235
+ ...unit ? { noSymbol: true } : null
236
+ }
237
+ ),
238
+ /* @__PURE__ */ jsx(Text, { style: [styles.remainingWord, wordSize], children: labels.of }),
239
+ /* @__PURE__ */ jsx(
240
+ Amount,
241
+ {
242
+ minor: charge.amountMinor,
243
+ currency: code,
244
+ size,
245
+ locale,
246
+ loading,
247
+ ...unit ? { noSymbol: true } : null
248
+ }
249
+ ),
250
+ unit ? /* @__PURE__ */ jsx(Text, { style: [styles.remainingWord, wordSize], children: unit }) : null,
251
+ /* @__PURE__ */ jsx(Text, { style: [styles.remainingWord, wordSize], children: label }),
252
+ error ? /* @__PURE__ */ jsx(
253
+ Text,
254
+ {
255
+ role: "alert",
256
+ accessibilityRole: "alert",
257
+ style: [styles.remainingWord, wordSize, styles.remainingError],
258
+ children: error
259
+ }
260
+ ) : null
261
+ ]
262
+ }
263
+ );
264
+ }
265
+ function RefundLedger({
266
+ charge,
267
+ next = 0,
268
+ currency,
269
+ caption,
270
+ loading = false,
271
+ density,
272
+ orientation,
273
+ align,
274
+ size,
275
+ unit,
276
+ tone,
277
+ error,
278
+ locale: localeProp,
279
+ labels: labelsProp,
280
+ style
281
+ }) {
282
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
283
+ const pay = usePayLabels(labelsProp);
284
+ const providerLocale = useLoamLocale();
285
+ const locale = localeProp ?? providerLocale;
286
+ const theme = useLoamTheme("refund");
287
+ const { styles } = useStyles(sheet);
288
+ const code = currency ?? charge.currency ?? "USD";
289
+ const rows = refundLedger(charge, next, pay);
290
+ return /* @__PURE__ */ jsxs(
291
+ View,
292
+ {
293
+ accessibilityState: loading ? { busy: true } : void 0,
294
+ "aria-busy": loading || void 0,
295
+ style: [
296
+ styles.ledger,
297
+ density === "compact" ? styles.ledgerCompact : null,
298
+ tone && tone !== "neutral" ? {
299
+ backgroundColor: softToneSkin(theme, tone).fill,
300
+ borderColor: softToneSkin(theme, tone).edge
301
+ } : null,
302
+ style
303
+ ],
304
+ children: [
305
+ /* @__PURE__ */ jsx(
306
+ Text,
307
+ {
308
+ style: [
309
+ styles.overline,
310
+ align === "start" ? styles.captionStart : null,
311
+ // `text3` is measured against the neutral surfaces; a tint takes `text2`.
312
+ tone && tone !== "neutral" ? { color: theme.color.text2 } : null
313
+ ],
314
+ children: caption ?? labels.ledgerCaption(unit ?? code)
315
+ }
316
+ ),
317
+ rows.map((row) => /* @__PURE__ */ jsx(
318
+ PriceRow,
319
+ {
320
+ label: row.label,
321
+ minor: row.amountMinor,
322
+ currency: code,
323
+ tone: row.tone === "good" && !(tone && tone !== "neutral") ? "good" : void 0,
324
+ strong: row.strong,
325
+ rule: row.strong,
326
+ noSymbol: true,
327
+ locale,
328
+ loading,
329
+ ...density ? { density } : null,
330
+ ...orientation ? { orientation } : null,
331
+ ...align ? { align } : null,
332
+ ...size ? { size } : null,
333
+ ...unit ? { unit } : null
334
+ },
335
+ row.label
336
+ )),
337
+ error ? /* @__PURE__ */ jsx(Text, { accessibilityRole: "alert", style: styles.errorText, children: error }) : null
338
+ ]
339
+ }
340
+ );
341
+ }
342
+ function RefundReasonList({
343
+ value,
344
+ onChange,
345
+ reasons,
346
+ label,
347
+ showNotes = true,
348
+ size,
349
+ error,
350
+ disabled,
351
+ hint,
352
+ tone,
353
+ loading = false,
354
+ labels: labelsProp
355
+ }) {
356
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
357
+ const pay = usePayLabels(labelsProp);
358
+ const list = reasons ?? refundReasons(pay);
359
+ const { styles } = useStyles(sheet);
360
+ const theme = useLoamTheme("refund");
361
+ if (loading) {
362
+ return /* @__PURE__ */ jsxs(
363
+ View,
364
+ {
365
+ accessibilityState: { busy: true },
366
+ "aria-busy": true,
367
+ style: [styles.reasonRow, styles.reasonLoading],
368
+ children: [
369
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: label ?? labels.reason }),
370
+ list.map(([id]) => /* @__PURE__ */ jsx(Skeleton, { variant: "rect", height: theme.ctl.lg, decorative: true }, id))
371
+ ]
372
+ }
373
+ );
374
+ }
375
+ const skin = tone && tone !== "neutral" ? softToneSkin(theme, tone) : null;
376
+ const group = /* @__PURE__ */ jsx(
377
+ RadioGroup,
378
+ {
379
+ label: label ?? labels.reason,
380
+ size,
381
+ error,
382
+ disabled,
383
+ hint,
384
+ value: value ?? void 0,
385
+ onValueChange: (next) => onChange(next),
386
+ children: list.map(([id, text, note]) => /* @__PURE__ */ jsxs(View, { style: styles.reasonRow, children: [
387
+ /* @__PURE__ */ jsx(RadioGroupItem, { value: id, label: text, accessibilityLabel: `${text}. ${note}` }),
388
+ showNotes ? /* @__PURE__ */ jsx(Text, { style: [styles.reasonNote, skin ? { color: theme.color.text2 } : null], children: note }) : null
389
+ ] }, id))
390
+ }
391
+ );
392
+ return skin ? /* @__PURE__ */ jsx(View, { style: [styles.reasonTone, { backgroundColor: skin.fill, borderColor: skin.edge }], children: group }) : group;
393
+ }
394
+ function RefundAmountField({
395
+ valueMinor,
396
+ onChangeMinor,
397
+ remaining,
398
+ currency,
399
+ label,
400
+ hint,
401
+ error,
402
+ fractions = REFUND_FRACTIONS,
403
+ disabled = false,
404
+ readOnly = false,
405
+ size,
406
+ tone,
407
+ surface,
408
+ success,
409
+ loading,
410
+ clearable,
411
+ leadingIcon,
412
+ trailingIcon,
413
+ motion,
414
+ locale: localeProp,
415
+ labels: labelsProp,
416
+ style
417
+ }) {
418
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
419
+ const providerLocale = useLoamLocale();
420
+ const locale = localeProp ?? providerLocale;
421
+ const { styles } = useStyles(sheet);
422
+ const [draft, setDraft] = React2.useState(null);
423
+ const [capped, setCapped] = React2.useState(false);
424
+ const display = draft ?? money(valueMinor, currency, { noSymbol: true, locale });
425
+ const maxText = money(remaining, currency, { locale });
426
+ const chips = fractions === false || readOnly ? [] : fractions;
427
+ const cappedMessage = labels.capped(maxText);
428
+ React2.useEffect(() => {
429
+ if (capped) announce(cappedMessage);
430
+ }, [capped]);
431
+ return /* @__PURE__ */ jsxs(View, { style: [styles.amountBlock, style], children: [
432
+ /* @__PURE__ */ jsx(
433
+ TextField,
434
+ {
435
+ label: label ?? labels.amount,
436
+ hint: hint ?? labels.upTo(maxText),
437
+ error: error ?? (capped ? cappedMessage : void 0),
438
+ ...tone ? { validationState: tone === "good" ? "valid" : "invalid" } : null,
439
+ value: display,
440
+ editable: !disabled,
441
+ readOnly,
442
+ ...size ? { size } : null,
443
+ surface,
444
+ ...success !== void 0 ? { success } : null,
445
+ ...loading !== void 0 ? { loading } : null,
446
+ ...clearable !== void 0 ? { clearable } : null,
447
+ ...leadingIcon ? { leadingIcon } : null,
448
+ ...trailingIcon ? { trailingIcon } : null,
449
+ ...motion ? { motion } : null,
450
+ inputMode: "decimal",
451
+ autoComplete: "off",
452
+ autoCorrect: false,
453
+ keyboardType: "decimal-pad",
454
+ onChangeText: (text) => {
455
+ setDraft(text);
456
+ const parsed = parseAmount(text, currency);
457
+ setCapped(parsed !== null && parsed > remaining);
458
+ onChangeMinor(clampRefund(parsed ?? 0, remaining));
459
+ },
460
+ onBlur: () => setDraft(null)
461
+ }
462
+ ),
463
+ chips.length > 0 ? /* @__PURE__ */ jsx(View, { style: styles.chipRow, children: chips.map((percent) => {
464
+ const target = refundFraction(percent, remaining);
465
+ return /* @__PURE__ */ jsx(
466
+ Chip,
467
+ {
468
+ variant: "filter",
469
+ size: "sm",
470
+ disabled,
471
+ selected: !disabled && valueMinor === target && remaining > 0,
472
+ accessibilityLabel: labels.fractionAria(
473
+ percent,
474
+ money(target, currency, { locale })
475
+ ),
476
+ onSelectedChange: () => {
477
+ setDraft(null);
478
+ setCapped(false);
479
+ onChangeMinor(target);
480
+ },
481
+ children: labels.percent(percent)
482
+ },
483
+ percent
484
+ );
485
+ }) }) : null
486
+ ] });
487
+ }
488
+ var sheet = createStyleSheet((theme) => ({
489
+ errorText: {
490
+ fontFamily: theme.font.sans,
491
+ fontSize: theme.type.caption1.fontSize,
492
+ color: theme.color.dangerOnSoft
493
+ },
494
+ arrivalError: {
495
+ fontFamily: theme.font.sans,
496
+ fontSize: theme.type.footnote.fontSize,
497
+ color: theme.color.danger
498
+ },
499
+ arrivalBlockError: {
500
+ fontFamily: theme.font.sans,
501
+ fontSize: theme.type.footnote.fontSize,
502
+ color: theme.color.dangerOnSoft
503
+ },
504
+ remainingError: { color: theme.color.danger },
505
+ statusRow: { flexDirection: "row", alignItems: "center", gap: theme.space.s1 },
506
+ arrivalInline: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
507
+ arrivalInlineBody: {
508
+ flexShrink: 1,
509
+ fontFamily: theme.font.sans,
510
+ fontSize: theme.type.footnote.fontSize,
511
+ lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
512
+ color: theme.color.text2
513
+ },
514
+ arrivalInlineMd: {
515
+ fontSize: theme.type.subheadline.fontSize,
516
+ lineHeight: theme.type.subheadline.fontSize * theme.lineHeight.normal
517
+ },
518
+ remaining: {
519
+ flexDirection: "row",
520
+ flexWrap: "wrap",
521
+ alignItems: "baseline",
522
+ gap: theme.space.s1
523
+ },
524
+ wordMd: {
525
+ fontSize: theme.type.subheadline.fontSize,
526
+ lineHeight: theme.type.subheadline.lineHeight
527
+ },
528
+ wordLg: {
529
+ fontSize: theme.type.body.fontSize,
530
+ lineHeight: theme.type.body.lineHeight
531
+ },
532
+ remainingWord: {
533
+ fontFamily: theme.font.sans,
534
+ fontSize: theme.type.footnote.fontSize,
535
+ lineHeight: theme.type.footnote.lineHeight,
536
+ color: theme.color.text2
537
+ },
538
+ ledger: {
539
+ alignSelf: "stretch",
540
+ gap: theme.space.s2,
541
+ padding: theme.space.s4,
542
+ borderRadius: theme.radius.md,
543
+ borderWidth: theme.borderWidth.base,
544
+ borderColor: theme.color.border,
545
+ backgroundColor: theme.color.surface2
546
+ },
547
+ ledgerCompact: { gap: theme.space.s1, padding: theme.space.s3 },
548
+ captionStart: { textAlign: theme.rtl ? "right" : "left" },
549
+ overline: {
550
+ ...theme.type.overline,
551
+ fontFamily: theme.font.sans,
552
+ color: theme.color.text3
553
+ },
554
+ reasonRow: { gap: theme.space[2] },
555
+ reasonLoading: { gap: theme.space.s2 },
556
+ reasonTone: {
557
+ padding: theme.space.s3,
558
+ borderRadius: theme.radius.md,
559
+ borderWidth: theme.borderWidth.base
560
+ },
561
+ reasonNote: {
562
+ marginStart: theme.space.s7,
563
+ fontFamily: theme.font.sans,
564
+ fontSize: theme.type.caption1.fontSize,
565
+ lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
566
+ color: theme.color.text3
567
+ },
568
+ amountBlock: { alignSelf: "stretch", gap: theme.space.s2 },
569
+ chipRow: {
570
+ flexDirection: "row",
571
+ flexWrap: "wrap",
572
+ alignItems: "center",
573
+ gap: theme.space.s1
574
+ }
575
+ }));
576
+ function RefundConfirmation({
577
+ charge,
578
+ result,
579
+ method,
580
+ currency,
581
+ title: titleProp,
582
+ refundAnotherLabel,
583
+ onRefundAnother,
584
+ actions,
585
+ locale: localeProp,
586
+ labels: labelsProp,
587
+ platform,
588
+ style,
589
+ roll = false,
590
+ motion = "full",
591
+ variant,
592
+ elevation,
593
+ padding,
594
+ tone,
595
+ size = "hero",
596
+ delta,
597
+ loading = false,
598
+ error,
599
+ interactive = false,
600
+ onPress
601
+ }) {
602
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
603
+ const providerLocale = useLoamLocale();
604
+ const locale = localeProp ?? providerLocale;
605
+ const title = titleProp ?? labels.issuedTitle;
606
+ const theme = useLoamTheme("refund");
607
+ const android = isAndroidIdiom(theme, platform);
608
+ const titleType = resolveTextRole(theme, "surfaceTitle", android);
609
+ const { styles } = useStyles(sheet2);
610
+ const code = currency ?? charge.currency ?? "USD";
611
+ const level = useResolvedMotion(motion, "refund");
612
+ const rise = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
613
+ const pop = React2.useRef(new Animated.Value(level === "full" ? 0 : 1)).current;
614
+ React2.useEffect(() => {
615
+ AccessibilityInfo.announceForAccessibility(
616
+ labels.announceIssued(title, money(result.amountMinor, code, { locale }))
617
+ );
618
+ }, []);
619
+ React2.useEffect(() => {
620
+ if (level !== "full") return;
621
+ const run = Animated.parallel([
622
+ Animated.spring(rise, { ...springConfig(theme, "ds"), toValue: 1, useNativeDriver: true }),
623
+ Animated.sequence([
624
+ // loam-audit-ignore raw-duration — one stagger step after the panel starts rising.
625
+ Animated.delay(60),
626
+ Animated.spring(pop, { ...springConfig(theme, "fs"), toValue: 1, useNativeDriver: true })
627
+ ])
628
+ ]);
629
+ run.start();
630
+ return () => run.stop();
631
+ }, []);
632
+ return /* @__PURE__ */ jsxs(
633
+ PanelRoot,
634
+ {
635
+ interactive,
636
+ onPress,
637
+ role: "status",
638
+ accessibilityLiveRegion: "polite",
639
+ accessibilityLabel: title,
640
+ accessibilityState: loading ? { busy: true } : void 0,
641
+ "aria-busy": loading || void 0,
642
+ style: [styles.panel, refundShellStyle(theme, { variant, elevation, padding, tone }), style],
643
+ ...{ "aria-live": "polite" },
644
+ children: [
645
+ /* @__PURE__ */ jsxs(
646
+ Animated.View,
647
+ {
648
+ style: [
649
+ styles.confirmHead,
650
+ {
651
+ opacity: rise,
652
+ transform: [
653
+ {
654
+ translateY: rise.interpolate({
655
+ inputRange: [0, 1],
656
+ outputRange: [theme.space.s3, 0]
657
+ })
658
+ }
659
+ ]
660
+ }
661
+ ],
662
+ children: [
663
+ /* @__PURE__ */ jsx(
664
+ Animated.View,
665
+ {
666
+ "aria-hidden": true,
667
+ accessibilityElementsHidden: true,
668
+ importantForAccessibility: "no-hide-descendants",
669
+ style: [
670
+ styles.checkPlate,
671
+ {
672
+ opacity: pop,
673
+ transform: [
674
+ { scale: pop.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] }) }
675
+ ]
676
+ }
677
+ ],
678
+ children: /* @__PURE__ */ jsx(
679
+ Icon,
680
+ {
681
+ name: "check",
682
+ size: theme.icon.md,
683
+ color: theme.color.goodOnSoft,
684
+ strokeWidth: theme.icon.strokeBold
685
+ }
686
+ )
687
+ }
688
+ ),
689
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles.title, titleType], children: title }),
690
+ /* @__PURE__ */ jsx(
691
+ Amount,
692
+ {
693
+ minor: result.amountMinor,
694
+ currency: code,
695
+ size,
696
+ locale,
697
+ loading,
698
+ ...roll ? { roll: true, motion } : null
699
+ }
700
+ ),
701
+ delta !== void 0 ? /* @__PURE__ */ jsx(MetricDelta, { delta }) : null,
702
+ /* @__PURE__ */ jsxs(View, { style: styles.confirmMeta, children: [
703
+ /* @__PURE__ */ jsx(RefundStatus, { state: result.state, labels: labelsProp }),
704
+ result.issuedLabel ? /* @__PURE__ */ jsx(Text, { style: styles.meta, children: result.issuedLabel }) : null,
705
+ result.refundId ? /* @__PURE__ */ jsx(Text, { style: styles.mono, children: result.refundId }) : null
706
+ ] })
707
+ ]
708
+ }
709
+ ),
710
+ /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
711
+ /* @__PURE__ */ jsx(
712
+ RefundLedger,
713
+ {
714
+ charge,
715
+ next: result.amountMinor,
716
+ currency: code,
717
+ loading,
718
+ locale,
719
+ labels: labelsProp
720
+ }
721
+ ),
722
+ error ? /* @__PURE__ */ jsx(Alert, { tone: "danger", title: error }) : null,
723
+ /* @__PURE__ */ jsxs(View, { style: [styles.actionRow, android ? styles.actionRowEnd : null], children: [
724
+ onRefundAnother ? /* @__PURE__ */ jsx(View, { style: android ? null : styles.actionShare, children: /* @__PURE__ */ jsx(Button, { variant: "outline", fullWidth: !android, onPress: onRefundAnother, children: refundAnotherLabel ?? labels.refundAnother }) }) : null,
725
+ actions
726
+ ] })
727
+ ]
728
+ }
729
+ );
730
+ }
731
+ function RefundPanel({
732
+ charge,
733
+ method,
734
+ mode,
735
+ amountMinor,
736
+ reason,
737
+ notify,
738
+ currency,
739
+ title: titleProp,
740
+ chargeLabel,
741
+ error,
742
+ result,
743
+ busy = false,
744
+ notifyLabel: notifyLabelProp,
745
+ irreversibleNote: irreversibleNoteProp,
746
+ onModeChange,
747
+ onAmountChange,
748
+ onReasonChange,
749
+ onNotifyChange,
750
+ onSubmit,
751
+ onRefundAnother,
752
+ locale: localeProp,
753
+ roll = true,
754
+ labels: labelsProp,
755
+ platform,
756
+ style,
757
+ motion = "full",
758
+ variant,
759
+ elevation,
760
+ padding,
761
+ tone,
762
+ density = "comfortable",
763
+ size,
764
+ disabled = false,
765
+ interactive = false,
766
+ onPress
767
+ }) {
768
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
769
+ const pay = usePayLabels(labelsProp);
770
+ const providerLocale = useLoamLocale();
771
+ const locale = localeProp ?? providerLocale;
772
+ const title = titleProp ?? labels.title;
773
+ const notifyLabel = notifyLabelProp ?? labels.notify;
774
+ const irreversibleNote = irreversibleNoteProp ?? labels.irreversible;
775
+ const theme = useLoamTheme("refund");
776
+ const android = isAndroidIdiom(theme, platform);
777
+ const titleType = resolveTextRole(theme, "surfaceTitle", android);
778
+ const { styles } = useStyles(sheet2);
779
+ const code = currency ?? charge.currency ?? "USD";
780
+ const remaining = refundRemaining(charge);
781
+ const effective = mode === "full" ? remaining : amountMinor;
782
+ const reasonRow = reason === null ? void 0 : refundReasons(pay).find(([id]) => id === reason);
783
+ if (result) {
784
+ return /* @__PURE__ */ jsx(
785
+ RefundConfirmation,
786
+ {
787
+ charge,
788
+ result,
789
+ method,
790
+ currency: code,
791
+ onRefundAnother,
792
+ locale,
793
+ labels: labelsProp,
794
+ style,
795
+ variant,
796
+ elevation,
797
+ padding,
798
+ tone
799
+ }
800
+ );
801
+ }
802
+ return /* @__PURE__ */ jsxs(
803
+ PanelRoot,
804
+ {
805
+ interactive,
806
+ onPress,
807
+ role: "region",
808
+ accessibilityLabel: title,
809
+ style: [
810
+ styles.panel,
811
+ density === "compact" ? styles.panelCompact : null,
812
+ refundShellStyle(theme, { variant, elevation, padding, tone }),
813
+ style
814
+ ],
815
+ children: [
816
+ /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
817
+ /* @__PURE__ */ jsxs(View, { style: styles.headerRow, children: [
818
+ /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles.title, titleType], children: title }),
819
+ charge.receiptId ? /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(Text, { style: styles.mono, children: charge.receiptId }) }) : null
820
+ ] }),
821
+ chargeLabel ? /* @__PURE__ */ jsx(Text, { style: styles.chargeLabel, children: chargeLabel }) : null,
822
+ /* @__PURE__ */ jsx(RefundRemainingNote, { charge, currency: code, locale, labels: labelsProp })
823
+ ] }),
824
+ onModeChange ? /* @__PURE__ */ jsx(
825
+ SegmentedControl,
826
+ {
827
+ accessibilityLabel: labels.amountMode,
828
+ disabled,
829
+ value: mode,
830
+ onValueChange: (next) => onModeChange(next),
831
+ items: [
832
+ { value: "full", label: labels.modeFull },
833
+ { value: "partial", label: labels.modePartial }
834
+ ]
835
+ }
836
+ ) : /* @__PURE__ */ jsx(
837
+ Stated,
838
+ {
839
+ label: mode === "full" ? labels.fullRefund : labels.partialRefund,
840
+ overline: labels.amountMode
841
+ }
842
+ ),
843
+ mode === "full" ? /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
844
+ /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.fullBalance }),
845
+ /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(
846
+ Amount,
847
+ {
848
+ minor: remaining,
849
+ currency: code,
850
+ size: "lg",
851
+ weight: "bold",
852
+ locale,
853
+ roll
854
+ }
855
+ ) })
856
+ ] }) : onAmountChange ? /* @__PURE__ */ jsx(
857
+ RefundAmountField,
858
+ {
859
+ valueMinor: amountMinor,
860
+ onChangeMinor: onAmountChange,
861
+ remaining,
862
+ currency: code,
863
+ disabled,
864
+ ...size ? { size } : null,
865
+ locale,
866
+ labels: labelsProp
867
+ }
868
+ ) : /* @__PURE__ */ jsxs(View, { style: styles.fullBox, children: [
869
+ /* @__PURE__ */ jsx(Text, { style: styles.fullLabel, children: labels.refunding }),
870
+ /* @__PURE__ */ jsx(View, { style: styles.pushEnd, children: /* @__PURE__ */ jsx(
871
+ Amount,
872
+ {
873
+ minor: amountMinor,
874
+ currency: code,
875
+ size: "lg",
876
+ weight: "bold",
877
+ locale,
878
+ roll,
879
+ motion
880
+ }
881
+ ) })
882
+ ] }),
883
+ onReasonChange ? /* @__PURE__ */ jsx(
884
+ RefundReasonList,
885
+ {
886
+ value: reason,
887
+ onChange: onReasonChange,
888
+ disabled,
889
+ ...size ? { size: size === "sm" ? "sm" : "md" } : null,
890
+ labels: labelsProp
891
+ }
892
+ ) : /* @__PURE__ */ jsx(
893
+ Stated,
894
+ {
895
+ overline: labels.reason,
896
+ label: reasonRow ? reasonRow[1] : labels.notStated,
897
+ note: reasonRow ? reasonRow[2] : void 0
898
+ }
899
+ ),
900
+ onNotifyChange ? (
901
+ // The box and its text are one control: one tap target, one focus
902
+ // stop, read once as "<label>, checkbox".
903
+ /* @__PURE__ */ jsx(
904
+ Checkbox,
905
+ {
906
+ checked: notify,
907
+ disabled,
908
+ onCheckedChange: (next) => onNotifyChange(next),
909
+ label: notifyLabel
910
+ }
911
+ )
912
+ ) : /* @__PURE__ */ jsx(
913
+ Stated,
914
+ {
915
+ overline: labels.customerEmail,
916
+ label: notify ? labels.notifyYes(notifyLabel) : labels.notifyNo(notifyLabel)
917
+ }
918
+ ),
919
+ /* @__PURE__ */ jsx(
920
+ RefundLedger,
921
+ {
922
+ charge,
923
+ next: effective,
924
+ currency: code,
925
+ locale,
926
+ labels: labelsProp
927
+ }
928
+ ),
929
+ /* @__PURE__ */ jsx(RefundArrivalNote, { method, labels: labelsProp }),
930
+ error ? /* @__PURE__ */ jsx(Alert, { tone: "danger", title: error }) : null,
931
+ /* @__PURE__ */ jsxs(View, { style: styles.commitBlock, children: [
932
+ /* @__PURE__ */ jsxs(View, { style: styles.irreversibleRow, children: [
933
+ /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.text3 }),
934
+ /* @__PURE__ */ jsx(Text, { style: styles.irreversible, children: irreversibleNote })
935
+ ] }),
936
+ /* @__PURE__ */ jsx(Button, { loading: busy, disabled, ...size ? { size } : null, onPress: onSubmit, children: labels.commit(money(effective, code, { locale })) })
937
+ ] })
938
+ ]
939
+ }
940
+ );
941
+ }
942
+ function Stated({
943
+ overline,
944
+ label,
945
+ note
946
+ }) {
947
+ const { styles } = useStyles(sheet2);
948
+ return /* @__PURE__ */ jsxs(View, { style: styles.stated, children: [
949
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: overline }),
950
+ /* @__PURE__ */ jsx(Text, { style: styles.statedValue, children: label }),
951
+ note ? /* @__PURE__ */ jsx(Text, { style: styles.statedNote, children: note }) : null
952
+ ] });
953
+ }
954
+ var sheet2 = createStyleSheet((theme) => ({
955
+ panel: panelBaseStyle(theme),
956
+ panelCompact: { gap: theme.space.s3 },
957
+ header: { gap: theme.space.s1 },
958
+ headerRow: {
959
+ flexDirection: "row",
960
+ flexWrap: "wrap",
961
+ alignItems: "baseline",
962
+ gap: theme.space.s2
963
+ },
964
+ title: {
965
+ fontFamily: theme.font.display,
966
+ fontWeight: theme.font.displayWeight,
967
+ fontSize: theme.type.title3.fontSize,
968
+ lineHeight: theme.type.title3.lineHeight,
969
+ letterSpacing: theme.type.title3.letterSpacing,
970
+ color: theme.color.text
971
+ },
972
+ pushEnd: { marginStart: "auto" },
973
+ // Refinement 12: the one reference style — mono 12 / 500, tabular, text-2.
974
+ mono: {
975
+ fontFamily: theme.font.mono,
976
+ fontVariant: ["tabular-nums"],
977
+ fontSize: theme.fontSize[12],
978
+ fontWeight: theme.fontWeight.medium,
979
+ color: theme.color.text2
980
+ },
981
+ chargeLabel: {
982
+ fontFamily: theme.font.sans,
983
+ fontSize: theme.type.footnote.fontSize,
984
+ lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
985
+ color: theme.color.text2
986
+ },
987
+ fullBox: {
988
+ flexDirection: "row",
989
+ flexWrap: "wrap",
990
+ alignItems: "baseline",
991
+ gap: theme.space.s2,
992
+ padding: theme.space.s4,
993
+ borderRadius: theme.radius.md,
994
+ borderWidth: theme.borderWidth.base,
995
+ borderColor: theme.color.border,
996
+ backgroundColor: theme.color.surface2
997
+ },
998
+ fullLabel: {
999
+ fontFamily: theme.font.sans,
1000
+ fontSize: theme.type.footnote.fontSize,
1001
+ lineHeight: theme.type.footnote.lineHeight,
1002
+ color: theme.color.text2
1003
+ },
1004
+ stated: { gap: theme.space[2] },
1005
+ overline: {
1006
+ ...theme.type.overline,
1007
+ fontFamily: theme.font.sans,
1008
+ color: theme.color.text3
1009
+ },
1010
+ statedValue: {
1011
+ fontFamily: theme.font.sans,
1012
+ fontWeight: theme.fontWeight.semibold,
1013
+ fontSize: theme.type.footnote.fontSize,
1014
+ lineHeight: theme.type.footnote.lineHeight,
1015
+ color: theme.color.text
1016
+ },
1017
+ statedNote: {
1018
+ fontFamily: theme.font.sans,
1019
+ fontSize: theme.type.caption1.fontSize,
1020
+ lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1021
+ color: theme.color.text3
1022
+ },
1023
+ commitBlock: { gap: theme.space.s2 },
1024
+ irreversibleRow: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
1025
+ irreversible: {
1026
+ flexShrink: 1,
1027
+ fontFamily: theme.font.sans,
1028
+ fontSize: theme.type.caption1.fontSize,
1029
+ lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1030
+ color: theme.color.text3
1031
+ },
1032
+ confirmHead: { alignItems: "center", gap: theme.space.s3 },
1033
+ checkPlate: {
1034
+ width: theme.ctl.iconBtn,
1035
+ height: theme.ctl.iconBtn,
1036
+ alignItems: "center",
1037
+ justifyContent: "center",
1038
+ borderRadius: theme.radius.full,
1039
+ // The soft tint always carries its tone edge.
1040
+ borderWidth: theme.borderWidth.base,
1041
+ borderColor: theme.edge.good,
1042
+ backgroundColor: theme.color.goodSoft
1043
+ },
1044
+ confirmMeta: {
1045
+ flexDirection: "row",
1046
+ flexWrap: "wrap",
1047
+ alignItems: "center",
1048
+ justifyContent: "center",
1049
+ gap: theme.space.s2
1050
+ },
1051
+ meta: {
1052
+ fontFamily: theme.font.sans,
1053
+ fontSize: theme.type.footnote.fontSize,
1054
+ lineHeight: theme.type.footnote.lineHeight,
1055
+ color: theme.color.text3
1056
+ },
1057
+ actionRow: {
1058
+ flexDirection: "row",
1059
+ flexWrap: "wrap",
1060
+ alignItems: "center",
1061
+ gap: theme.space.s2
1062
+ },
1063
+ // iOS: footer actions share the width (F30); Android: end-aligned.
1064
+ actionShare: { flexGrow: 1, flexBasis: 0 },
1065
+ actionRowEnd: { justifyContent: "flex-end" }
1066
+ }));
1067
+ var BADGE_VARIANT = {
1068
+ info: "info",
1069
+ good: "good",
1070
+ warn: "warn",
1071
+ danger: "danger",
1072
+ "text-3": "neutral"
1073
+ };
1074
+ var EVIDENCE_ICON = {
1075
+ have: "check-circle",
1076
+ missing: "alert-circle",
1077
+ "n/a": "minus"
1078
+ };
1079
+ function DisputeDeadline({
1080
+ dispute,
1081
+ urgentAt = 3,
1082
+ size = "md",
1083
+ density = "comfortable",
1084
+ orientation = "vertical",
1085
+ align = "start",
1086
+ unit,
1087
+ loading = false,
1088
+ locale: localeProp,
1089
+ labels: labelsProp,
1090
+ style,
1091
+ error
1092
+ }) {
1093
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
1094
+ const providerLocale = useLoamLocale();
1095
+ const locale = localeProp ?? providerLocale;
1096
+ const theme = useLoamTheme("refund");
1097
+ const { styles } = useStyles(sheet3);
1098
+ const urgent = Boolean(error) || dispute.daysLeft <= urgentAt;
1099
+ const ink = urgent ? theme.color.dangerOnSoft : theme.color.warnOnSoft;
1100
+ return /* @__PURE__ */ jsxs(
1101
+ View,
1102
+ {
1103
+ accessibilityState: loading ? { busy: true } : void 0,
1104
+ "aria-busy": loading || void 0,
1105
+ style: [
1106
+ styles.deadline,
1107
+ density === "compact" ? styles.deadlineCompact : null,
1108
+ orientation === "horizontal" ? styles.deadlineRow : null,
1109
+ {
1110
+ // A soft tint always carries its tone edge.
1111
+ borderColor: urgent ? theme.edge.danger : theme.edge.warn,
1112
+ backgroundColor: urgent ? theme.color.dangerSoft : theme.color.warnSoft
1113
+ },
1114
+ style
1115
+ ],
1116
+ children: [
1117
+ /* @__PURE__ */ jsxs(
1118
+ View,
1119
+ {
1120
+ style: [
1121
+ styles.daysBox,
1122
+ align === "center" ? styles.daysCentre : align === "end" ? styles.daysEnd : null
1123
+ ],
1124
+ children: [
1125
+ loading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: theme.space[64], height: theme.fontSize[32], decorative: true }) : /* @__PURE__ */ jsx(
1126
+ Text,
1127
+ {
1128
+ style: [
1129
+ styles.daysLeft,
1130
+ size === "sm" ? styles.daysLeftSm : null,
1131
+ size === "lg" ? styles.daysLeftLg : null,
1132
+ align === "center" ? styles.textCentre : align === "end" ? styles.textEnd : null,
1133
+ { color: ink }
1134
+ ],
1135
+ children: unit ? `${dispute.daysLeft} ${unit}` : labels.days(dispute.daysLeft)
1136
+ }
1137
+ ),
1138
+ /* @__PURE__ */ jsx(
1139
+ Text,
1140
+ {
1141
+ style: [
1142
+ styles.daysNote,
1143
+ align === "center" ? styles.textCentre : align === "end" ? styles.textEnd : null,
1144
+ { color: ink }
1145
+ ],
1146
+ children: labels.toRespond(dispute.due)
1147
+ }
1148
+ )
1149
+ ]
1150
+ }
1151
+ ),
1152
+ /* @__PURE__ */ jsxs(View, { style: styles.factGrid, children: [
1153
+ /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
1154
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.disputed }),
1155
+ /* @__PURE__ */ jsx(
1156
+ Amount,
1157
+ {
1158
+ minor: dispute.amountMinor,
1159
+ currency: dispute.currency,
1160
+ size: "lg",
1161
+ weight: "bold",
1162
+ locale
1163
+ }
1164
+ )
1165
+ ] }),
1166
+ /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
1167
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.networkFee }),
1168
+ /* @__PURE__ */ jsx(Text, { style: styles.factValueNum, children: money(dispute.feeMinor, dispute.currency, { locale }) })
1169
+ ] }),
1170
+ /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
1171
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.reason }),
1172
+ /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: labels.reasonNetwork(dispute.reason, dispute.network) })
1173
+ ] }),
1174
+ /* @__PURE__ */ jsxs(View, { style: styles.fact, children: [
1175
+ /* @__PURE__ */ jsx(Text, { style: [styles.factTerm, { color: ink }], children: labels.opened }),
1176
+ /* @__PURE__ */ jsx(Text, { style: styles.factValue, children: dispute.opened })
1177
+ ] })
1178
+ ] }),
1179
+ error ? /* @__PURE__ */ jsx(Text, { role: "alert", accessibilityRole: "alert", style: [styles.evidenceError, { color: ink }], children: error }) : null
1180
+ ]
1181
+ }
1182
+ );
1183
+ }
1184
+ function DisputeEvidenceRow({
1185
+ item,
1186
+ attachLabel,
1187
+ onAttach,
1188
+ density = "comfortable",
1189
+ selected = false,
1190
+ disabled = false,
1191
+ onPress,
1192
+ loading = false,
1193
+ labels: labelsProp,
1194
+ style,
1195
+ error = false
1196
+ }) {
1197
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
1198
+ const pay = usePayLabels(labelsProp);
1199
+ const theme = useLoamTheme("refund");
1200
+ const { styles } = useStyles(sheet3);
1201
+ const tone = evidenceTone(item.state);
1202
+ const glyphColor = error ? theme.color.danger : tone === "good" ? theme.color.good : tone === "warn" ? theme.color.warn : theme.color.text3;
1203
+ const lead = /* @__PURE__ */ jsxs(Fragment, { children: [
1204
+ /* @__PURE__ */ jsx(Icon, { name: EVIDENCE_ICON[item.state], size: theme.icon.sm, color: glyphColor }),
1205
+ /* @__PURE__ */ jsx(View, { style: styles.evidenceBody, children: loading ? /* @__PURE__ */ jsx(SkeletonText, { lines: 2 }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1206
+ /* @__PURE__ */ jsx(Text, { style: styles.evidenceLabel, children: item.label }),
1207
+ /* @__PURE__ */ jsx(Text, { style: styles.evidenceNote, children: item.note }),
1208
+ typeof error === "string" && error ? /* @__PURE__ */ jsx(Text, { role: "alert", accessibilityRole: "alert", style: styles.evidenceError, children: error }) : null
1209
+ ] }) })
1210
+ ] });
1211
+ return /* @__PURE__ */ jsxs(
1212
+ View,
1213
+ {
1214
+ role: "listitem",
1215
+ accessibilityState: { disabled, busy: loading },
1216
+ ...selected ? { "aria-current": "true" } : null,
1217
+ "aria-disabled": disabled || void 0,
1218
+ "aria-busy": loading || void 0,
1219
+ "aria-invalid": error ? true : void 0,
1220
+ style: [
1221
+ styles.evidenceRow,
1222
+ density === "compact" ? styles.evidenceRowCompact : null,
1223
+ selected ? styles.evidenceRowSelected : null,
1224
+ disabled ? styles.evidenceRowDisabled : null,
1225
+ error ? { borderTopColor: theme.color.danger } : null,
1226
+ style
1227
+ ],
1228
+ children: [
1229
+ onPress && !loading ? /* @__PURE__ */ jsx(
1230
+ Pressable,
1231
+ {
1232
+ accessibilityRole: "button",
1233
+ accessibilityLabel: `${item.label}. ${item.note}`,
1234
+ accessibilityState: { selected, disabled },
1235
+ disabled,
1236
+ onPress: () => onPress(item),
1237
+ style: styles.evidenceLead,
1238
+ children: lead
1239
+ }
1240
+ ) : /* @__PURE__ */ jsx(View, { style: styles.evidenceLead, children: lead }),
1241
+ /* @__PURE__ */ jsxs(View, { style: styles.evidenceTrail, children: [
1242
+ /* @__PURE__ */ jsx(Badge, { style: styles.rowBadge, variant: BADGE_VARIANT[tone], size: "sm", children: evidenceLabel(item.state, pay) }),
1243
+ item.state === "missing" && onAttach ? /* @__PURE__ */ jsx(
1244
+ Button,
1245
+ {
1246
+ size: "sm",
1247
+ variant: "outline",
1248
+ leadingIcon: "upload",
1249
+ disabled,
1250
+ onPress: () => onAttach(item),
1251
+ children: attachLabel ?? labels.attach
1252
+ }
1253
+ ) : null
1254
+ ] })
1255
+ ]
1256
+ }
1257
+ );
1258
+ }
1259
+ function DisputePanel({
1260
+ dispute,
1261
+ title,
1262
+ description,
1263
+ submitLabel,
1264
+ acceptLabel,
1265
+ canSubmit = true,
1266
+ busy = false,
1267
+ showGuidance = true,
1268
+ onSubmitEvidence,
1269
+ onAccept,
1270
+ onAttach,
1271
+ variant,
1272
+ elevation,
1273
+ padding,
1274
+ tone,
1275
+ density = "comfortable",
1276
+ size,
1277
+ error,
1278
+ locale: localeProp,
1279
+ labels: labelsProp,
1280
+ platform,
1281
+ style,
1282
+ interactive = false,
1283
+ onPress
1284
+ }) {
1285
+ const labels = useLabels("refund", DEFAULT_LABELS, labelsProp);
1286
+ const providerLocale = useLoamLocale();
1287
+ const locale = localeProp ?? providerLocale;
1288
+ const theme = useLoamTheme("refund");
1289
+ const android = isAndroidIdiom(theme, platform);
1290
+ const { styles } = useStyles(sheet3);
1291
+ const worth = disputeWorthDefending(dispute.amountMinor);
1292
+ const threshold = money(DISPUTE_ACCEPT_THRESHOLD_MINOR, dispute.currency, { locale });
1293
+ return /* @__PURE__ */ jsxs(
1294
+ PanelRoot,
1295
+ {
1296
+ interactive,
1297
+ onPress,
1298
+ role: "region",
1299
+ accessibilityLabel: title ?? labels.disputeTitle,
1300
+ style: [
1301
+ styles.panel,
1302
+ density === "compact" ? styles.panelCompact : null,
1303
+ refundShellStyle(theme, { variant, elevation, padding, tone }),
1304
+ style
1305
+ ],
1306
+ children: [
1307
+ /* @__PURE__ */ jsxs(View, { style: styles.header, children: [
1308
+ /* @__PURE__ */ jsx(
1309
+ Text,
1310
+ {
1311
+ accessibilityRole: "header",
1312
+ style: [styles.title, resolveTextRole(theme, "surfaceTitle", android)],
1313
+ children: title ?? labels.disputeTitle
1314
+ }
1315
+ ),
1316
+ /* @__PURE__ */ jsx(DisputeDeadline, { dispute, locale, labels: labelsProp }),
1317
+ /* @__PURE__ */ jsx(Text, { style: styles.description, children: description ?? labels.disputeDescription })
1318
+ ] }),
1319
+ /* @__PURE__ */ jsxs(View, { style: styles.evidenceBlock, children: [
1320
+ /* @__PURE__ */ jsx(Text, { style: styles.overline, children: labels.evidence }),
1321
+ /* @__PURE__ */ jsx(View, { role: "list", accessibilityRole: "list", children: dispute.evidence.map((item) => /* @__PURE__ */ jsx(
1322
+ DisputeEvidenceRow,
1323
+ {
1324
+ item,
1325
+ onAttach,
1326
+ density,
1327
+ labels: labelsProp
1328
+ },
1329
+ item.label
1330
+ )) })
1331
+ ] }),
1332
+ showGuidance ? /* @__PURE__ */ jsxs(View, { style: styles.guidanceRow, children: [
1333
+ /* @__PURE__ */ jsx(Icon, { name: "info", size: theme.icon.sm, color: theme.color.text3 }),
1334
+ /* @__PURE__ */ jsx(Text, { style: styles.guidance, children: labels.guidance(worth, threshold, canSubmit) })
1335
+ ] }) : null,
1336
+ error ? /* @__PURE__ */ jsx(Alert, { tone: "danger", title: error }) : null,
1337
+ /* @__PURE__ */ jsx(View, { style: [styles.actionRow, android ? styles.actionRowEnd : null], children: android ? /* @__PURE__ */ jsxs(Fragment, { children: [
1338
+ /* @__PURE__ */ jsx(Button, { variant: "outline", ...size ? { size } : null, onPress: onAccept, children: acceptLabel ?? labels.acceptDispute }),
1339
+ /* @__PURE__ */ jsx(Button, { loading: busy, ...size ? { size } : null, onPress: onSubmitEvidence, children: submitLabel ?? labels.submitEvidence })
1340
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1341
+ /* @__PURE__ */ jsx(View, { style: styles.actionShare, children: /* @__PURE__ */ jsx(
1342
+ Button,
1343
+ {
1344
+ fullWidth: true,
1345
+ loading: busy,
1346
+ ...size ? { size } : null,
1347
+ onPress: onSubmitEvidence,
1348
+ children: submitLabel ?? labels.submitEvidence
1349
+ }
1350
+ ) }),
1351
+ /* @__PURE__ */ jsx(View, { style: styles.actionShare, children: /* @__PURE__ */ jsx(Button, { fullWidth: true, variant: "outline", ...size ? { size } : null, onPress: onAccept, children: acceptLabel ?? labels.acceptDispute }) })
1352
+ ] }) })
1353
+ ]
1354
+ }
1355
+ );
1356
+ }
1357
+ var sheet3 = createStyleSheet((theme) => ({
1358
+ panel: panelBaseStyle(theme),
1359
+ panelCompact: { gap: theme.space.s3 },
1360
+ header: { gap: theme.space.s3 },
1361
+ title: {
1362
+ fontFamily: theme.font.display,
1363
+ fontWeight: theme.font.displayWeight,
1364
+ fontSize: theme.type.title3.fontSize,
1365
+ lineHeight: theme.type.title3.lineHeight,
1366
+ letterSpacing: theme.type.title3.letterSpacing,
1367
+ color: theme.color.text
1368
+ },
1369
+ description: {
1370
+ fontFamily: theme.font.sans,
1371
+ fontSize: theme.type.footnote.fontSize,
1372
+ lineHeight: theme.type.footnote.fontSize * theme.lineHeight.normal,
1373
+ color: theme.color.text2
1374
+ },
1375
+ deadline: {
1376
+ gap: theme.space.s4,
1377
+ padding: theme.space.s4,
1378
+ borderRadius: theme.radius.md,
1379
+ borderWidth: theme.borderWidth.base
1380
+ },
1381
+ deadlineCompact: { gap: theme.space.s3, padding: theme.space.s3 },
1382
+ deadlineRow: { flexDirection: "row", flexWrap: "wrap", alignItems: "center" },
1383
+ // Shrinkable, so a long figure ("6 working days") wraps inside the banner instead of running off its edge.
1384
+ daysBox: { flexShrink: 1, minWidth: 0 },
1385
+ daysCentre: { alignItems: "center" },
1386
+ textCentre: { textAlign: "center" },
1387
+ daysEnd: { alignItems: "flex-end" },
1388
+ textEnd: { textAlign: theme.rtl ? "left" : "right" },
1389
+ daysLeftSm: {
1390
+ fontSize: theme.fontSize[24],
1391
+ lineHeight: theme.fontSize[24] * theme.lineHeight.tight
1392
+ },
1393
+ daysLeftLg: {
1394
+ fontSize: theme.fontSize[40],
1395
+ lineHeight: theme.fontSize[40] * theme.lineHeight.tight
1396
+ },
1397
+ daysLeft: {
1398
+ fontFamily: theme.font.sans,
1399
+ fontWeight: theme.fontWeight.bold,
1400
+ fontVariant: ["tabular-nums"],
1401
+ fontSize: theme.fontSize[32],
1402
+ lineHeight: theme.fontSize[32] * theme.lineHeight.tight
1403
+ },
1404
+ daysNote: {
1405
+ fontFamily: theme.font.sans,
1406
+ fontSize: theme.type.footnote.fontSize,
1407
+ lineHeight: theme.type.footnote.lineHeight
1408
+ },
1409
+ factGrid: {
1410
+ flexShrink: 1,
1411
+ minWidth: 0,
1412
+ maxWidth: "100%",
1413
+ flexDirection: "row",
1414
+ flexWrap: "wrap",
1415
+ columnGap: theme.space.s5,
1416
+ rowGap: theme.space.s2
1417
+ },
1418
+ fact: { gap: theme.space[2], flexShrink: 1, maxWidth: "100%" },
1419
+ // No `color` here: the fact terms are inked by the caller with the *tint's*
1420
+ // own measured ink (`dangerOnSoft` / `warnOnSoft`), the same one the days-left
1421
+ // figure uses. They used to be `theme.color.text3`, and `--text-3` is measured
1422
+ // against the neutral surface ramp only — on this banner's tint it read 4.20:1
1423
+ // on `--danger-soft` and 3.78:1 on `--warn-soft` in dark mode, 28 axe
1424
+ // `color-contrast` nodes from one style (seven deadlines x four terms).
1425
+ factTerm: {
1426
+ ...theme.type.overline,
1427
+ fontFamily: theme.font.sans
1428
+ },
1429
+ factValue: {
1430
+ fontFamily: theme.font.sans,
1431
+ fontSize: theme.type.footnote.fontSize,
1432
+ lineHeight: theme.type.footnote.lineHeight,
1433
+ color: theme.color.text
1434
+ },
1435
+ factValueNum: {
1436
+ fontFamily: theme.font.sans,
1437
+ fontWeight: theme.fontWeight.bold,
1438
+ fontVariant: ["tabular-nums"],
1439
+ fontSize: theme.type.footnote.fontSize,
1440
+ lineHeight: theme.type.footnote.lineHeight,
1441
+ color: theme.color.text
1442
+ },
1443
+ evidenceBlock: { gap: theme.space.s2 },
1444
+ overline: {
1445
+ ...theme.type.overline,
1446
+ fontFamily: theme.font.sans,
1447
+ color: theme.color.text3
1448
+ },
1449
+ evidenceRowCompact: { paddingVertical: theme.space.s2 },
1450
+ evidenceRowSelected: { backgroundColor: theme.state.selected },
1451
+ evidenceRowDisabled: { opacity: theme.state.disabledOpacity },
1452
+ evidenceLead: {
1453
+ flexDirection: "row",
1454
+ flexGrow: 1,
1455
+ flexShrink: 1,
1456
+ flexBasis: theme.panel.xs,
1457
+ alignItems: "flex-start",
1458
+ gap: theme.space.s3
1459
+ },
1460
+ evidenceRow: {
1461
+ flexDirection: "row",
1462
+ flexWrap: "wrap",
1463
+ alignItems: "flex-start",
1464
+ gap: theme.space.s3,
1465
+ paddingVertical: theme.space.s3,
1466
+ borderTopWidth: theme.borderWidth.base,
1467
+ borderTopColor: theme.color.border
1468
+ },
1469
+ // A floor, so the row wraps the badge and Attach under the text rather than
1470
+ // squeezing the note to a 126px column beside them.
1471
+ evidenceError: {
1472
+ fontFamily: theme.font.sans,
1473
+ fontSize: theme.type.footnote.fontSize,
1474
+ color: theme.color.danger
1475
+ },
1476
+ evidenceBody: { flexGrow: 1, flexShrink: 1, flexBasis: 0, gap: theme.space[2] },
1477
+ evidenceLabel: {
1478
+ fontFamily: theme.font.sans,
1479
+ fontWeight: theme.fontWeight.semibold,
1480
+ fontSize: theme.type.footnote.fontSize,
1481
+ lineHeight: theme.type.footnote.lineHeight,
1482
+ color: theme.color.text
1483
+ },
1484
+ evidenceNote: {
1485
+ fontFamily: theme.font.sans,
1486
+ fontSize: theme.type.caption1.fontSize,
1487
+ lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1488
+ color: theme.color.text3
1489
+ },
1490
+ evidenceTrail: { flexDirection: "row", alignItems: "center", gap: theme.space.s2 },
1491
+ guidanceRow: { flexDirection: "row", alignItems: "flex-start", gap: theme.space.s2 },
1492
+ guidance: {
1493
+ flexShrink: 1,
1494
+ fontFamily: theme.font.sans,
1495
+ fontSize: theme.type.caption1.fontSize,
1496
+ lineHeight: theme.type.caption1.fontSize * theme.lineHeight.normal,
1497
+ color: theme.color.text3
1498
+ },
1499
+ actionRow: {
1500
+ flexDirection: "row",
1501
+ flexWrap: "wrap",
1502
+ alignItems: "center",
1503
+ gap: theme.space.s2
1504
+ },
1505
+ actionShare: { flexGrow: 1, flexBasis: 0 },
1506
+ actionRowEnd: { justifyContent: "flex-end" },
1507
+ // Badge hugs with `flex-start`, which pins it to the top of this centred row.
1508
+ rowBadge: { alignSelf: "center" }
1509
+ }));
1510
+
1511
+ export { DisputeDeadline, DisputeEvidenceRow, DisputePanel, RefundAmountField, RefundArrivalNote, RefundConfirmation, RefundLedger, RefundPanel, RefundReasonList, RefundRemainingNote, RefundStatus };