@oxy.so/bloom 23.5.0 → 23.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/NOTICE +28 -0
  2. package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +3 -1
  3. package/android/src/main/java/so/oxy/bloom/icons/BloomIcon.kt +251 -0
  4. package/android/src/main/java/so/oxy/bloom/icons/IconPathParser.java +660 -0
  5. package/docs/adoption-matrix.mdx +1 -4
  6. package/docs/bloom-language-codemod.mdx +6 -2
  7. package/docs/bloom-language-modifiers.mdx +22 -6
  8. package/docs/bloom-language-nodes.mdx +3 -58
  9. package/docs/bloom-language.mdx +15 -36
  10. package/docs/empty-state.mdx +2 -3
  11. package/docs/icons.mdx +29 -1
  12. package/docs/public-parts.mdx +2 -7
  13. package/docs/task-catalog.json +1 -1
  14. package/docs/task-catalog.mdx +1 -1
  15. package/lib/commonjs/icons/TEMPLATE.js +25 -160
  16. package/lib/commonjs/icons/TEMPLATE.js.map +1 -1
  17. package/lib/commonjs/icons/glyph-svg.js +47 -0
  18. package/lib/commonjs/icons/glyph-svg.js.map +1 -0
  19. package/lib/commonjs/icons/glyph.js +29 -0
  20. package/lib/commonjs/icons/glyph.js.map +1 -0
  21. package/lib/commonjs/icons/glyph.native.js +112 -0
  22. package/lib/commonjs/icons/glyph.native.js.map +1 -0
  23. package/lib/commonjs/index.js +279 -485
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/index.web.js +279 -485
  26. package/lib/commonjs/index.web.js.map +1 -1
  27. package/lib/commonjs/locale/translations/ar.js +0 -39
  28. package/lib/commonjs/locale/translations/ar.js.map +1 -1
  29. package/lib/commonjs/locale/translations/bn.js +0 -34
  30. package/lib/commonjs/locale/translations/bn.js.map +1 -1
  31. package/lib/commonjs/locale/translations/ca.js +0 -35
  32. package/lib/commonjs/locale/translations/ca.js.map +1 -1
  33. package/lib/commonjs/locale/translations/de.js +0 -35
  34. package/lib/commonjs/locale/translations/de.js.map +1 -1
  35. package/lib/commonjs/locale/translations/es.js +0 -35
  36. package/lib/commonjs/locale/translations/es.js.map +1 -1
  37. package/lib/commonjs/locale/translations/fr.js +0 -35
  38. package/lib/commonjs/locale/translations/fr.js.map +1 -1
  39. package/lib/commonjs/locale/translations/hi.js +0 -35
  40. package/lib/commonjs/locale/translations/hi.js.map +1 -1
  41. package/lib/commonjs/locale/translations/id.js +0 -34
  42. package/lib/commonjs/locale/translations/id.js.map +1 -1
  43. package/lib/commonjs/locale/translations/it.js +0 -35
  44. package/lib/commonjs/locale/translations/it.js.map +1 -1
  45. package/lib/commonjs/locale/translations/ja.js +0 -34
  46. package/lib/commonjs/locale/translations/ja.js.map +1 -1
  47. package/lib/commonjs/locale/translations/pt.js +0 -35
  48. package/lib/commonjs/locale/translations/pt.js.map +1 -1
  49. package/lib/commonjs/locale/translations/ru.js +0 -37
  50. package/lib/commonjs/locale/translations/ru.js.map +1 -1
  51. package/lib/commonjs/locale/translations/tr.js +0 -34
  52. package/lib/commonjs/locale/translations/tr.js.map +1 -1
  53. package/lib/commonjs/locale/translations/zh.js +0 -34
  54. package/lib/commonjs/locale/translations/zh.js.map +1 -1
  55. package/lib/commonjs/subtle-hover/SubtleHover.js +94 -31
  56. package/lib/commonjs/subtle-hover/SubtleHover.js.map +1 -1
  57. package/lib/commonjs/subtle-hover/index.js +7 -0
  58. package/lib/commonjs/subtle-hover/index.js.map +1 -1
  59. package/lib/commonjs/subtle-hover/use-press-highlight.js +95 -0
  60. package/lib/commonjs/subtle-hover/use-press-highlight.js.map +1 -0
  61. package/lib/module/icons/TEMPLATE.js +25 -158
  62. package/lib/module/icons/TEMPLATE.js.map +1 -1
  63. package/lib/module/icons/glyph-svg.js +41 -0
  64. package/lib/module/icons/glyph-svg.js.map +1 -0
  65. package/lib/module/icons/glyph.js +25 -0
  66. package/lib/module/icons/glyph.js.map +1 -0
  67. package/lib/module/icons/glyph.native.js +108 -0
  68. package/lib/module/icons/glyph.native.js.map +1 -0
  69. package/lib/module/index.js +0 -14
  70. package/lib/module/index.js.map +1 -1
  71. package/lib/module/index.web.js +0 -14
  72. package/lib/module/index.web.js.map +1 -1
  73. package/lib/module/locale/translations/ar.js +0 -39
  74. package/lib/module/locale/translations/ar.js.map +1 -1
  75. package/lib/module/locale/translations/bn.js +0 -34
  76. package/lib/module/locale/translations/bn.js.map +1 -1
  77. package/lib/module/locale/translations/ca.js +0 -35
  78. package/lib/module/locale/translations/ca.js.map +1 -1
  79. package/lib/module/locale/translations/de.js +0 -35
  80. package/lib/module/locale/translations/de.js.map +1 -1
  81. package/lib/module/locale/translations/es.js +0 -35
  82. package/lib/module/locale/translations/es.js.map +1 -1
  83. package/lib/module/locale/translations/fr.js +0 -35
  84. package/lib/module/locale/translations/fr.js.map +1 -1
  85. package/lib/module/locale/translations/hi.js +0 -35
  86. package/lib/module/locale/translations/hi.js.map +1 -1
  87. package/lib/module/locale/translations/id.js +0 -34
  88. package/lib/module/locale/translations/id.js.map +1 -1
  89. package/lib/module/locale/translations/it.js +0 -35
  90. package/lib/module/locale/translations/it.js.map +1 -1
  91. package/lib/module/locale/translations/ja.js +0 -34
  92. package/lib/module/locale/translations/ja.js.map +1 -1
  93. package/lib/module/locale/translations/pt.js +0 -35
  94. package/lib/module/locale/translations/pt.js.map +1 -1
  95. package/lib/module/locale/translations/ru.js +0 -37
  96. package/lib/module/locale/translations/ru.js.map +1 -1
  97. package/lib/module/locale/translations/tr.js +0 -34
  98. package/lib/module/locale/translations/tr.js.map +1 -1
  99. package/lib/module/locale/translations/zh.js +0 -34
  100. package/lib/module/locale/translations/zh.js.map +1 -1
  101. package/lib/module/subtle-hover/SubtleHover.js +95 -32
  102. package/lib/module/subtle-hover/SubtleHover.js.map +1 -1
  103. package/lib/module/subtle-hover/index.js +1 -0
  104. package/lib/module/subtle-hover/index.js.map +1 -1
  105. package/lib/module/subtle-hover/use-press-highlight.js +92 -0
  106. package/lib/module/subtle-hover/use-press-highlight.js.map +1 -0
  107. package/lib/typescript/commonjs/icons/TEMPLATE.d.ts +1 -1
  108. package/lib/typescript/commonjs/icons/TEMPLATE.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/icons/glyph-svg.d.ts +17 -0
  110. package/lib/typescript/commonjs/icons/glyph-svg.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/icons/glyph.d.ts +11 -0
  112. package/lib/typescript/commonjs/icons/glyph.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/icons/glyph.native.d.ts +20 -0
  114. package/lib/typescript/commonjs/icons/glyph.native.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/index.d.ts +0 -9
  116. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/index.web.d.ts +0 -9
  118. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/locale/translations/types.d.ts +0 -6
  133. package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts +4 -1
  136. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/subtle-hover/index.d.ts +1 -0
  138. package/lib/typescript/commonjs/subtle-hover/index.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/subtle-hover/types.d.ts +6 -0
  140. package/lib/typescript/commonjs/subtle-hover/types.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts +42 -0
  142. package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts.map +1 -0
  143. package/lib/typescript/module/icons/TEMPLATE.d.ts +1 -1
  144. package/lib/typescript/module/icons/TEMPLATE.d.ts.map +1 -1
  145. package/lib/typescript/module/icons/glyph-svg.d.ts +17 -0
  146. package/lib/typescript/module/icons/glyph-svg.d.ts.map +1 -0
  147. package/lib/typescript/module/icons/glyph.d.ts +11 -0
  148. package/lib/typescript/module/icons/glyph.d.ts.map +1 -0
  149. package/lib/typescript/module/icons/glyph.native.d.ts +20 -0
  150. package/lib/typescript/module/icons/glyph.native.d.ts.map +1 -0
  151. package/lib/typescript/module/index.d.ts +0 -9
  152. package/lib/typescript/module/index.d.ts.map +1 -1
  153. package/lib/typescript/module/index.web.d.ts +0 -9
  154. package/lib/typescript/module/index.web.d.ts.map +1 -1
  155. package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
  156. package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
  157. package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
  158. package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
  159. package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
  160. package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
  161. package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
  162. package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
  163. package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
  164. package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
  165. package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
  166. package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
  167. package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
  168. package/lib/typescript/module/locale/translations/types.d.ts +0 -6
  169. package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
  170. package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
  171. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts +4 -1
  172. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts.map +1 -1
  173. package/lib/typescript/module/subtle-hover/index.d.ts +1 -0
  174. package/lib/typescript/module/subtle-hover/index.d.ts.map +1 -1
  175. package/lib/typescript/module/subtle-hover/types.d.ts +6 -0
  176. package/lib/typescript/module/subtle-hover/types.d.ts.map +1 -1
  177. package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts +42 -0
  178. package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts.map +1 -0
  179. package/package.json +1 -52
  180. package/src/__tests__/support/public-part-classifications.json +0 -5
  181. package/src/icons/TEMPLATE.tsx +28 -49
  182. package/src/icons/glyph-svg.tsx +54 -0
  183. package/src/icons/glyph.native.tsx +138 -0
  184. package/src/icons/glyph.tsx +15 -0
  185. package/src/index.ts +0 -62
  186. package/src/index.web.ts +0 -62
  187. package/src/locale/translations/ar.ts +0 -36
  188. package/src/locale/translations/bn.ts +0 -36
  189. package/src/locale/translations/ca.ts +0 -36
  190. package/src/locale/translations/de.ts +0 -36
  191. package/src/locale/translations/es.ts +0 -36
  192. package/src/locale/translations/fr.ts +0 -36
  193. package/src/locale/translations/hi.ts +0 -36
  194. package/src/locale/translations/id.ts +0 -36
  195. package/src/locale/translations/it.ts +0 -36
  196. package/src/locale/translations/ja.ts +0 -36
  197. package/src/locale/translations/pt.ts +0 -36
  198. package/src/locale/translations/ru.ts +0 -36
  199. package/src/locale/translations/tr.ts +0 -36
  200. package/src/locale/translations/types.ts +0 -6
  201. package/src/locale/translations/zh.ts +0 -36
  202. package/src/subtle-hover/SubtleHover.tsx +33 -2
  203. package/src/subtle-hover/index.ts +5 -0
  204. package/src/subtle-hover/types.ts +6 -0
  205. package/src/subtle-hover/use-press-highlight.ts +93 -0
  206. package/docs/checkout-summary.mdx +0 -94
  207. package/docs/order-confirmation.mdx +0 -66
  208. package/docs/vendor-card.mdx +0 -83
  209. package/lib/commonjs/checkout-summary/CheckoutConfirm.js +0 -243
  210. package/lib/commonjs/checkout-summary/CheckoutConfirm.js.map +0 -1
  211. package/lib/commonjs/checkout-summary/CheckoutSummary.js +0 -432
  212. package/lib/commonjs/checkout-summary/CheckoutSummary.js.map +0 -1
  213. package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js +0 -277
  214. package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js.map +0 -1
  215. package/lib/commonjs/checkout-summary/constants.js +0 -66
  216. package/lib/commonjs/checkout-summary/constants.js.map +0 -1
  217. package/lib/commonjs/checkout-summary/index.js +0 -95
  218. package/lib/commonjs/checkout-summary/index.js.map +0 -1
  219. package/lib/commonjs/checkout-summary/messages.js +0 -23
  220. package/lib/commonjs/checkout-summary/messages.js.map +0 -1
  221. package/lib/commonjs/checkout-summary/shared.js +0 -43
  222. package/lib/commonjs/checkout-summary/shared.js.map +0 -1
  223. package/lib/commonjs/checkout-summary/types.js +0 -6
  224. package/lib/commonjs/checkout-summary/types.js.map +0 -1
  225. package/lib/commonjs/order-confirmation/OrderConfirmation.js +0 -305
  226. package/lib/commonjs/order-confirmation/OrderConfirmation.js.map +0 -1
  227. package/lib/commonjs/order-confirmation/constants.js +0 -26
  228. package/lib/commonjs/order-confirmation/constants.js.map +0 -1
  229. package/lib/commonjs/order-confirmation/index.js +0 -38
  230. package/lib/commonjs/order-confirmation/index.js.map +0 -1
  231. package/lib/commonjs/order-confirmation/messages.js +0 -18
  232. package/lib/commonjs/order-confirmation/messages.js.map +0 -1
  233. package/lib/commonjs/order-confirmation/types.js +0 -6
  234. package/lib/commonjs/order-confirmation/types.js.map +0 -1
  235. package/lib/commonjs/vendor-card/VendorCard.js +0 -1051
  236. package/lib/commonjs/vendor-card/VendorCard.js.map +0 -1
  237. package/lib/commonjs/vendor-card/constants.js +0 -54
  238. package/lib/commonjs/vendor-card/constants.js.map +0 -1
  239. package/lib/commonjs/vendor-card/index.js +0 -69
  240. package/lib/commonjs/vendor-card/index.js.map +0 -1
  241. package/lib/commonjs/vendor-card/message-helpers.js +0 -23
  242. package/lib/commonjs/vendor-card/message-helpers.js.map +0 -1
  243. package/lib/commonjs/vendor-card/messages.js +0 -32
  244. package/lib/commonjs/vendor-card/messages.js.map +0 -1
  245. package/lib/commonjs/vendor-card/shared.js +0 -116
  246. package/lib/commonjs/vendor-card/shared.js.map +0 -1
  247. package/lib/commonjs/vendor-card/types.js +0 -6
  248. package/lib/commonjs/vendor-card/types.js.map +0 -1
  249. package/lib/module/checkout-summary/CheckoutConfirm.js +0 -237
  250. package/lib/module/checkout-summary/CheckoutConfirm.js.map +0 -1
  251. package/lib/module/checkout-summary/CheckoutSummary.js +0 -426
  252. package/lib/module/checkout-summary/CheckoutSummary.js.map +0 -1
  253. package/lib/module/checkout-summary/CheckoutSummaryRow.js +0 -273
  254. package/lib/module/checkout-summary/CheckoutSummaryRow.js.map +0 -1
  255. package/lib/module/checkout-summary/constants.js +0 -63
  256. package/lib/module/checkout-summary/constants.js.map +0 -1
  257. package/lib/module/checkout-summary/index.js +0 -8
  258. package/lib/module/checkout-summary/index.js.map +0 -1
  259. package/lib/module/checkout-summary/messages.js +0 -20
  260. package/lib/module/checkout-summary/messages.js.map +0 -1
  261. package/lib/module/checkout-summary/shared.js +0 -36
  262. package/lib/module/checkout-summary/shared.js.map +0 -1
  263. package/lib/module/checkout-summary/types.js +0 -4
  264. package/lib/module/checkout-summary/types.js.map +0 -1
  265. package/lib/module/order-confirmation/OrderConfirmation.js +0 -299
  266. package/lib/module/order-confirmation/OrderConfirmation.js.map +0 -1
  267. package/lib/module/order-confirmation/constants.js +0 -23
  268. package/lib/module/order-confirmation/constants.js.map +0 -1
  269. package/lib/module/order-confirmation/index.js +0 -5
  270. package/lib/module/order-confirmation/index.js.map +0 -1
  271. package/lib/module/order-confirmation/messages.js +0 -15
  272. package/lib/module/order-confirmation/messages.js.map +0 -1
  273. package/lib/module/order-confirmation/types.js +0 -4
  274. package/lib/module/order-confirmation/types.js.map +0 -1
  275. package/lib/module/vendor-card/VendorCard.js +0 -1046
  276. package/lib/module/vendor-card/VendorCard.js.map +0 -1
  277. package/lib/module/vendor-card/constants.js +0 -50
  278. package/lib/module/vendor-card/constants.js.map +0 -1
  279. package/lib/module/vendor-card/index.js +0 -6
  280. package/lib/module/vendor-card/index.js.map +0 -1
  281. package/lib/module/vendor-card/message-helpers.js +0 -18
  282. package/lib/module/vendor-card/message-helpers.js.map +0 -1
  283. package/lib/module/vendor-card/messages.js +0 -29
  284. package/lib/module/vendor-card/messages.js.map +0 -1
  285. package/lib/module/vendor-card/shared.js +0 -107
  286. package/lib/module/vendor-card/shared.js.map +0 -1
  287. package/lib/module/vendor-card/types.js +0 -4
  288. package/lib/module/vendor-card/types.js.map +0 -1
  289. package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts +0 -40
  290. package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
  291. package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts +0 -36
  292. package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts.map +0 -1
  293. package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
  294. package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
  295. package/lib/typescript/commonjs/checkout-summary/constants.d.ts +0 -39
  296. package/lib/typescript/commonjs/checkout-summary/constants.d.ts.map +0 -1
  297. package/lib/typescript/commonjs/checkout-summary/index.d.ts +0 -8
  298. package/lib/typescript/commonjs/checkout-summary/index.d.ts.map +0 -1
  299. package/lib/typescript/commonjs/checkout-summary/messages.d.ts +0 -23
  300. package/lib/typescript/commonjs/checkout-summary/messages.d.ts.map +0 -1
  301. package/lib/typescript/commonjs/checkout-summary/shared.d.ts +0 -27
  302. package/lib/typescript/commonjs/checkout-summary/shared.d.ts.map +0 -1
  303. package/lib/typescript/commonjs/checkout-summary/types.d.ts +0 -147
  304. package/lib/typescript/commonjs/checkout-summary/types.d.ts.map +0 -1
  305. package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts +0 -40
  306. package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts.map +0 -1
  307. package/lib/typescript/commonjs/order-confirmation/constants.d.ts +0 -17
  308. package/lib/typescript/commonjs/order-confirmation/constants.d.ts.map +0 -1
  309. package/lib/typescript/commonjs/order-confirmation/index.d.ts +0 -4
  310. package/lib/typescript/commonjs/order-confirmation/index.d.ts.map +0 -1
  311. package/lib/typescript/commonjs/order-confirmation/messages.d.ts +0 -12
  312. package/lib/typescript/commonjs/order-confirmation/messages.d.ts.map +0 -1
  313. package/lib/typescript/commonjs/order-confirmation/types.d.ts +0 -88
  314. package/lib/typescript/commonjs/order-confirmation/types.d.ts.map +0 -1
  315. package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts +0 -6
  316. package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts.map +0 -1
  317. package/lib/typescript/commonjs/vendor-card/constants.d.ts +0 -30
  318. package/lib/typescript/commonjs/vendor-card/constants.d.ts.map +0 -1
  319. package/lib/typescript/commonjs/vendor-card/index.d.ts +0 -5
  320. package/lib/typescript/commonjs/vendor-card/index.d.ts.map +0 -1
  321. package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts +0 -13
  322. package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts.map +0 -1
  323. package/lib/typescript/commonjs/vendor-card/messages.d.ts +0 -22
  324. package/lib/typescript/commonjs/vendor-card/messages.d.ts.map +0 -1
  325. package/lib/typescript/commonjs/vendor-card/shared.d.ts +0 -24
  326. package/lib/typescript/commonjs/vendor-card/shared.d.ts.map +0 -1
  327. package/lib/typescript/commonjs/vendor-card/types.d.ts +0 -111
  328. package/lib/typescript/commonjs/vendor-card/types.d.ts.map +0 -1
  329. package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts +0 -40
  330. package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
  331. package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts +0 -36
  332. package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts.map +0 -1
  333. package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
  334. package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
  335. package/lib/typescript/module/checkout-summary/constants.d.ts +0 -39
  336. package/lib/typescript/module/checkout-summary/constants.d.ts.map +0 -1
  337. package/lib/typescript/module/checkout-summary/index.d.ts +0 -8
  338. package/lib/typescript/module/checkout-summary/index.d.ts.map +0 -1
  339. package/lib/typescript/module/checkout-summary/messages.d.ts +0 -23
  340. package/lib/typescript/module/checkout-summary/messages.d.ts.map +0 -1
  341. package/lib/typescript/module/checkout-summary/shared.d.ts +0 -27
  342. package/lib/typescript/module/checkout-summary/shared.d.ts.map +0 -1
  343. package/lib/typescript/module/checkout-summary/types.d.ts +0 -147
  344. package/lib/typescript/module/checkout-summary/types.d.ts.map +0 -1
  345. package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts +0 -40
  346. package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts.map +0 -1
  347. package/lib/typescript/module/order-confirmation/constants.d.ts +0 -17
  348. package/lib/typescript/module/order-confirmation/constants.d.ts.map +0 -1
  349. package/lib/typescript/module/order-confirmation/index.d.ts +0 -4
  350. package/lib/typescript/module/order-confirmation/index.d.ts.map +0 -1
  351. package/lib/typescript/module/order-confirmation/messages.d.ts +0 -12
  352. package/lib/typescript/module/order-confirmation/messages.d.ts.map +0 -1
  353. package/lib/typescript/module/order-confirmation/types.d.ts +0 -88
  354. package/lib/typescript/module/order-confirmation/types.d.ts.map +0 -1
  355. package/lib/typescript/module/vendor-card/VendorCard.d.ts +0 -6
  356. package/lib/typescript/module/vendor-card/VendorCard.d.ts.map +0 -1
  357. package/lib/typescript/module/vendor-card/constants.d.ts +0 -30
  358. package/lib/typescript/module/vendor-card/constants.d.ts.map +0 -1
  359. package/lib/typescript/module/vendor-card/index.d.ts +0 -5
  360. package/lib/typescript/module/vendor-card/index.d.ts.map +0 -1
  361. package/lib/typescript/module/vendor-card/message-helpers.d.ts +0 -13
  362. package/lib/typescript/module/vendor-card/message-helpers.d.ts.map +0 -1
  363. package/lib/typescript/module/vendor-card/messages.d.ts +0 -22
  364. package/lib/typescript/module/vendor-card/messages.d.ts.map +0 -1
  365. package/lib/typescript/module/vendor-card/shared.d.ts +0 -24
  366. package/lib/typescript/module/vendor-card/shared.d.ts.map +0 -1
  367. package/lib/typescript/module/vendor-card/types.d.ts +0 -111
  368. package/lib/typescript/module/vendor-card/types.d.ts.map +0 -1
  369. package/src/checkout-summary/CheckoutConfirm.tsx +0 -119
  370. package/src/checkout-summary/CheckoutSummary.tsx +0 -221
  371. package/src/checkout-summary/CheckoutSummaryRow.tsx +0 -172
  372. package/src/checkout-summary/constants.ts +0 -64
  373. package/src/checkout-summary/index.ts +0 -22
  374. package/src/checkout-summary/messages.ts +0 -33
  375. package/src/checkout-summary/shared.ts +0 -40
  376. package/src/checkout-summary/types.ts +0 -152
  377. package/src/order-confirmation/OrderConfirmation.tsx +0 -197
  378. package/src/order-confirmation/constants.ts +0 -20
  379. package/src/order-confirmation/index.ts +0 -12
  380. package/src/order-confirmation/messages.ts +0 -18
  381. package/src/order-confirmation/types.ts +0 -98
  382. package/src/vendor-card/VendorCard.tsx +0 -509
  383. package/src/vendor-card/constants.ts +0 -58
  384. package/src/vendor-card/index.ts +0 -15
  385. package/src/vendor-card/message-helpers.ts +0 -20
  386. package/src/vendor-card/messages.ts +0 -36
  387. package/src/vendor-card/shared.ts +0 -136
  388. package/src/vendor-card/types.ts +0 -115
@@ -0,0 +1,93 @@
1
+ import { useMemo } from 'react';
2
+ import { Platform, type PressableProps } from 'react-native';
3
+ import { Easing, type SharedValue, useSharedValue, withTiming } from 'react-native-reanimated';
4
+
5
+ import { useTheme } from '../theme';
6
+
7
+ /** The props a row's pressable host spreads for its press highlight. */
8
+ export interface PressHighlightHostProps {
9
+ /** Android: the platform ripple, bounded by the row. */
10
+ android_ripple?: PressableProps['android_ripple'];
11
+ /** iOS: lights `pressed`. Call it from the host's own `onPressIn` if it has one. */
12
+ onPressIn?: () => void;
13
+ /** iOS: fades `pressed` out. Call it from the host's own `onPressOut` if it has one. */
14
+ onPressOut?: () => void;
15
+ }
16
+
17
+ export interface PressHighlight {
18
+ /** Spread on the row's `Pressable`; nothing on the web. */
19
+ hostProps: PressHighlightHostProps;
20
+ /**
21
+ * iOS: hand it to the row's `SubtleHover` (`<SubtleHover pressed={…} />`),
22
+ * whose wash it drives on the UI thread. `undefined` elsewhere.
23
+ */
24
+ pressed: SharedValue<number> | undefined;
25
+ }
26
+
27
+ /** The release's fade, as `SubtleHover`'s cross-fade. */
28
+ const FADE_OUT = { duration: 150, easing: Easing.bezier(0.4, 0, 0.2, 1) };
29
+
30
+ const NONE: PressHighlight = Object.freeze({ hostProps: Object.freeze({}), pressed: undefined });
31
+
32
+ /**
33
+ * Android: the ripple React Native draws for a `Pressable` (`android_ripple`).
34
+ * The press reaches the view as a command, without a React render, and the
35
+ * ripple animates on the render thread.
36
+ */
37
+ function useRipple(): PressHighlight {
38
+ const color = useTheme().colors.contrast50;
39
+ return useMemo(
40
+ () => ({ hostProps: { android_ripple: { color, borderless: false } }, pressed: undefined }),
41
+ [color],
42
+ );
43
+ }
44
+
45
+ /**
46
+ * iOS: a wash the press lights at once and the release fades, as a table
47
+ * cell's highlight. Press in and out only set a shared value: no React render,
48
+ * and the wash's opacity follows it on the UI thread.
49
+ */
50
+ function useWash(): PressHighlight {
51
+ const pressed = useSharedValue(0);
52
+ return useMemo(
53
+ () => ({
54
+ hostProps: {
55
+ onPressIn: () => {
56
+ pressed.value = 1;
57
+ },
58
+ onPressOut: () => {
59
+ pressed.value = withTiming(0, FADE_OUT);
60
+ },
61
+ },
62
+ pressed,
63
+ }),
64
+ [pressed],
65
+ );
66
+ }
67
+
68
+ function useNone(): PressHighlight {
69
+ return NONE;
70
+ }
71
+
72
+ /**
73
+ * A pressable row's pressed state on native, in the wash `SubtleHover` paints:
74
+ * the theme's `contrast50`, the fill an unfilled Bloom control takes while
75
+ * held. Android draws its ripple; iOS lights the row's `SubtleHover`. The web
76
+ * has the pointer's hover wash and gets nothing here.
77
+ *
78
+ * Spread `hostProps` only on a row that takes a press: a `Pressable` without
79
+ * `onPress` still answers a touch.
80
+ *
81
+ * ```tsx
82
+ * const highlight = usePressHighlight();
83
+ * <Pressable onPress={open} {...highlight.hostProps}>
84
+ * <SubtleHover pressed={highlight.pressed} />
85
+ * …
86
+ * </Pressable>
87
+ * ```
88
+ *
89
+ * A child that takes its own press (a button, a link) holds the touch, so the
90
+ * row does not light; a scroll that takes the touch releases it.
91
+ */
92
+ export const usePressHighlight: () => PressHighlight =
93
+ Platform.OS === 'android' ? useRipple : Platform.OS === 'ios' ? useWash : useNone;
@@ -1,94 +0,0 @@
1
- ---
2
- title: Checkout summary
3
- description: Review and confirm — the rows a buyer checks before paying, each showing its chosen value and opening the thing that changes it, the totals from price-breakdown, and one confirm control that cannot place two orders.
4
- order: 137
5
- ---
6
-
7
- # Checkout summary
8
-
9
- Between "I want this" and "it is ordered" there is one screen: where it goes, when, how
10
- it is paid, what it costs, and the note to the seller. This family is that screen's body.
11
-
12
- ```tsx
13
- import { CheckoutSummary } from '@oxy.so/bloom/checkout-summary';
14
-
15
- <CheckoutSummary
16
- address={{ title: 'Home', subtitle: 'Carrer de l’Om 14, 2nd floor', kind: 'saved', onPress: pickAddress }}
17
- delivery={{ label: 'Delivery window', value: 'Friday 24, 17:00 – 19:00', onPress: pickWindow }}
18
- payment={<PaymentMethodRow onPress={pickCard} />}
19
- note={{ label: 'Note for the shop', placeholder: 'Add a note', onPress: editNote }}
20
- price={{ lines, total: { label: 'Total', amount: '€49.62' } }}
21
- confirm={{ amount: '€49.62', terms: 'By placing this order you agree to the shop’s terms.', busy, onConfirm: place }}
22
- />;
23
- ```
24
-
25
- ## The row is the summary AND the trigger
26
-
27
- A label with a "Change" button beside it is two targets for one decision, and two screen
28
- reader stops that do not mention each other. Here the whole row is the button: its name is
29
- `"<label>: <value>"`, its hint is what pressing it opens, and the chevron is decoration.
30
- A row with no `onPress` draws no chevron and is a static receipt line — which is what the
31
- same component is after the order is placed.
32
-
33
- **Known gap: the hint is NATIVE ONLY.** react-native-web has no `accessibilityHint` — not
34
- a wrong mapping, no mapping at all — so on web the affordance is the `button` role and the
35
- chevron, and the row says nothing about what pressing it opens. It is pinned in the suite
36
- rather than hidden, and it is not swapped for an `aria-describedby` because native would
37
- then announce the same sentence twice.
38
-
39
- The row reads label-first and value-below (`caption-2-bold` uppercase over `body-medium`),
40
- which is the other way round from `GroupedSectionItem`'s title-with-a-value-on-the-right.
41
- The difference is length: a settings value is a word, and a checkout value is an address,
42
- a two-hour window and a masked card number — none of which fits in the right half of a
43
- 390 row without truncating the thing the reader came to check.
44
-
45
- ## What this family does not own
46
-
47
- - **The totals are `price-breakdown`'s `PriceSummary`**, passed straight through as
48
- `price`. There is no second breakdown here and no arithmetic anywhere: every amount is
49
- a string the app formatted, including the one on the confirm button.
50
- - **The address row is `address`'s `AddressRow`.** It goes inside the summary row's value
51
- column with `leading={null}` — the row already drew the gutter, which is the case
52
- `AddressRow` documents — and with `Item`'s padding reset in the LONGHANDS `Item` itself
53
- writes, so there is one row's chrome rather than two. (Overriding `paddingVertical`
54
- with `paddingTop`/`paddingBottom` would have worked on native and been silently
55
- dropped on web, where the atomic sheet ranks the shorthand higher whatever the array's
56
- order.)
57
- - **`payment` is a SLOT**, not data. The payment-method row is its own family; a
58
- placeholder drawn here would be a second spelling of it. An app that has no such family
59
- yet renders a `CheckoutSummaryRow` in the same register, which is what the stories do.
60
- - **Tracking, afterwards, is `order-status`**, and the screen that says it worked is
61
- `order-confirmation`.
62
-
63
- ## The group publishes its surface
64
-
65
- The rows sit in a group one rung above whatever the summary was dropped on, and that rung
66
- is PUBLISHED with `SurfaceLevelProvider`. Without it every row's glyph tile resolves one
67
- step off the PAGE rather than one step off the group, and the tiles disappear into the
68
- group on exactly the surfaces where a summary is most often put — a sheet, a panel, a
69
- card.
70
-
71
- ## Two guards against a double order
72
-
73
- `busy` is the app's: while the order is in flight the button spins, is renamed to
74
- `busyLabel`, and drops every press. That is not enough on its own. A press calls
75
- `onConfirm`, the app sets its state, and `busy` only arrives on the NEXT commit — the
76
- second tap of a double-tap lands inside that window and places a second order. So
77
- `CheckoutConfirm` also latches on its own press, synchronously, in a ref: React state
78
- would not do, because two presses in one tick read the same render's value.
79
-
80
- The latch clears on the first commit where `busy` is false again. An app that never sets
81
- `busy` — a confirm that navigates away, a story — therefore gets exactly one press per
82
- tick and is never wedged; an app that does sets the button inert for the whole flight.
83
-
84
- ## The amount is on the button
85
-
86
- The number a press commits to and the press are one decision. A total elsewhere on the
87
- screen and a button reading "Place order" are two, and the gap between them is where a
88
- reader confirms a figure they last saw before a tip picker changed it. The separator is a
89
- middle dot: "Place order - €49.62" reads as a subtraction at a glance in a row that is
90
- otherwise full of money.
91
-
92
- The button carries ONE amount — the one the charge is made in. A second currency is
93
- `secondaryAmount` (`"≈ 49,62 €"`), pre-formatted like `amount` and drawn de-emphasised,
94
- centred 8 under the button, above the terms.
@@ -1,66 +0,0 @@
1
- ---
2
- title: Order confirmation
3
- description: It is placed — the mark, the reference, the tracking strip from order-status, where it goes, what was charged, what was ordered, and the two things you do next.
4
- order: 139
5
- ---
6
-
7
- # Order confirmation
8
-
9
- ```tsx
10
- import { OrderConfirmation } from '@oxy.so/bloom/order-confirmation';
11
-
12
- <OrderConfirmation
13
- description="We have sent the receipt to your inbox."
14
- reference="A-4821"
15
- status={{ status: 'Being prepared', eta: 'Arrives 17:35', icon: RiBikeLine, progress }}
16
- address={{ title: 'Home', subtitle: 'Carrer de l’Om 14, 2nd floor', kind: 'saved' }}
17
- facts={[
18
- { label: 'Arrives', value: 'Friday 24, 17:00 – 19:00' },
19
- { label: 'Paid with', value: 'Card ending 4417' },
20
- { label: 'Total', value: '€49.62' },
21
- ]}
22
- items={<OrderLines lines={lines} />}
23
- action={{ label: 'Track order', onPress: track }}
24
- secondaryAction={{ label: 'Get help', onPress: help }}
25
- />;
26
- ```
27
-
28
- ## It IS an `EmptyState`
29
-
30
- Not "looks like one". A mark, a heading, a line of explanation, a block of content and up
31
- to two actions is exactly that family's shape, and a "done" screen is the same object as a
32
- "nothing here" screen with a different reason for existing. Building it a second time is
33
- how two centred columns with different paddings ship inside one library.
34
-
35
- That also means `variant="compact"` works here for the same reason it works there: the
36
- panel rung, for a confirmation inside a card rather than as the whole screen.
37
-
38
- ## The mark is static, and that is a decision
39
-
40
- `AnimatedCheck` draws its ring and its check on only when a caller kicks it through its
41
- ref — at rest it is invisible. A mark nobody can see until a method runs is not a mark,
42
- and a user with reduce-motion would never see it at all. So the default is a check on a
43
- success-tinted disc: `IconCircle` with its own primary pair overridden TOGETHER (the one
44
- way its docs allow), from `resolveAccentColors(colors, 'success', 'subtle')` — a resolved
45
- pair, never a token with alpha appended.
46
-
47
- An app that wants the draw-on passes `<AnimatedCheck>` as `mark` and plays it itself.
48
- `mark={null}` draws none, for a surface that already carries a brand header.
49
-
50
- ## The tracking strip is `order-status`'s
51
-
52
- `status` is `OrderStatusBarProps`, passed straight through. "Where it is right now" has
53
- one component in this library; this is a place that shows it, not a second one. The
54
- address row is `address`'s `AddressRow` and the fact box is the label/value box Bloom's
55
- action cards already draw.
56
-
57
- ## `items` is a slot
58
-
59
- A line of an order is a dish, a parcel or a seat depending on the app, and each already
60
- has a row family of its own. The family draws the caption above whatever comes and stays
61
- out of the way.
62
-
63
- ## It computes nothing
64
-
65
- Every amount, every time and every reading is a string the app formatted — including the
66
- reference, prefix and all.
@@ -1,83 +0,0 @@
1
- ---
2
- title: Vendor Card
3
- description: A restaurant or a shop in a list — one cover, the cuisines as pills, the rating, the delivery readings, a promo mark and the paused/closed states, as a wide shelf card or a dense search row.
4
- order: 134
5
- ---
6
-
7
- # Vendor Card
8
-
9
- `@oxy.so/bloom/vendor-card`
10
-
11
- A place you can order from, in a list of places you can order from.
12
-
13
- ```tsx
14
- import { VendorCard } from '@oxy.so/bloom/vendor-card';
15
-
16
- <VendorCard
17
- name="Fig & Ember"
18
- photo="fig-ember-cover"
19
- cuisines={['Wood-fired', 'Flatbread', 'Small plates']}
20
- rating={4.8}
21
- reviewCount={214}
22
- deliveryTime="25–35 min"
23
- deliveryFee="€1.90"
24
- distance="1.2 km"
25
- promo="2 for 1 on flatbreads"
26
- favorite={saved}
27
- onFavoriteChange={setSaved}
28
- onPress={open}
29
- />
30
- ```
31
-
32
- ## It is the housing card with a vendor's data in it
33
-
34
- That is a decision, not a coincidence. A food app and a housing app put the same object on a screen: a photograph with a wash over it, a status pill in its top-left corner, a heart in its top-right, a title with a rating beside it, and a row of small readings under it. `vendor-card` therefore draws itself with `listing-card`'s own parts — the wash, the status pill, the fact row, the heart, the photo placeholder and every colour in `resolveListingCardPaint` — and owns only the four things that differ:
35
-
36
- | this family | why it is not `listing-card`'s |
37
- | --- | --- |
38
- | the cover is **16:9** | a shelf is scanned sideways, and `listing-card`'s near-square 20:19 pushes the name off the first screen at shelf width |
39
- | the **cuisines** | a home has offerings (a closed set of four); a vendor has words the app supplies |
40
- | the **four readings** | delivery time, fee, distance, minimum order — a home's facts are bedrooms and square metres |
41
- | the **promo mark** | a home has no price promotion that is a pill |
42
-
43
- A second copy of the other eleven colours is how two cards that are meant to be the same hand drift apart.
44
-
45
- ## Two densities, one component
46
-
47
- `comfortable` is the wide card that sits in a shelf: cover, then 12 below it the text. `compact` is the search-result row: a 112 square thumbnail — `listing-card`'s own `COMPACT_PHOTO_SIZE` — with the text beside it and the marks *above* the name, because a 112 thumbnail has no room for pills over it.
48
-
49
- They are one component because the data is identical. A results screen that switches at a breakpoint must not switch components: a card and a row that are two components are two places for the promo to go missing.
50
-
51
- ## The cover is one picture
52
-
53
- There is no pager, no dots and no arrows. A shelf scrolls sideways through *vendors*, not through one vendor's photos, and a card that paged would put two horizontal gestures on the same row. A vendor's gallery belongs on its own screen.
54
-
55
- ## Availability
56
-
57
- `open` draws nothing at all. `paused` (open, but not taking orders for a while) and `closed` (outside its hours) both wash the cover 50% toward the page and draw the status pill — because what a reader acts on is "not now", and the word is what says which kind.
58
-
59
- `opensAt` is a sentence the app wrote — "Opens at 07:30", "Taking orders again at 19:00". It is drawn **only while the vendor is not open**: a line telling you when an open shop opens is noise. The component never reads a clock and never formats a time.
60
-
61
- ## The readings are drawn one way and announced another
62
-
63
- "25–35 min" beside a clock is unambiguous to an eye and meaningless to a screen reader, which is not told about the glyph. So each reading carries a **word**, localised via `BloomProvider locale` along with the status pill, "New" and the rating sentence; `factLabels` overrides the four words with your own:
64
-
65
- ```tsx
66
- <VendorCard
67
- factLabels={{ deliveryTime: 'Arrives in', deliveryFee: 'Courier' }}
68
- …
69
- />
70
- ```
71
-
72
- The card's accessible name is the whole card as one sentence, in reading order — including **every** cuisine, not only the ones that fit. The pill row clips because it ran out of width; that is not a reason to withhold a word from somebody who is listening.
73
-
74
- ## The pill row clips, it does not truncate
75
-
76
- Cuisines wrap inside a box exactly one pill tall and the overflow is hidden, so a pill that does not fit drops out **whole** rather than being cut to "Flatbr…". `VENDOR_CUISINE_LIMIT` caps it before that — four in the comfortable density, three in the compact — because past a handful the row is a list rather than a mark.
77
-
78
- ## Traps
79
-
80
- - **The heart is a sibling of the link, not its child.** A button inside an anchor is invalid HTML and makes the heart's press open the vendor. The card keeps `listing-card`'s arrangement: the photo and the text inside one pressable, the heart in an overlay laid over the cover from outside it.
81
- - **The card adopts two stylesheets.** Its own, for the link's focus ring, and `listing-card`'s, because `FavoriteButton`'s `:focus-visible` rule lives there and the heart does not adopt it itself. Both are replaced by id, so a page of cards adopts each once.
82
- - **Every amount and duration is a string the app formatted.** Nothing here parses "25–35 min", converts a currency or compares a fee.
83
- - `promoTone` defaults to `success` — the tone `price-breakdown` gives money coming back — and takes any `AccentTone` for an app whose promotions mean something else.
@@ -1,243 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CheckoutConfirm = void 0;
7
- var _compilerRuntime = require("react/compiler-runtime");
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactNative = require("react-native");
10
- var _ActionCard = require("../booking/ActionCard.js");
11
- var _button = require("../button");
12
- var _messages = require("../locale/messages.js");
13
- var _messages2 = require("./messages.js");
14
- var _shared = require("./shared.js");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- var cache;
17
- function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, default: e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
18
- /**
19
- * The press that places the order: the words, the amount it commits to, the
20
- * terms under it, and the state where it must not fire twice.
21
- *
22
- * button `Button` primary large, full width, "Place order · €24.80"
23
- * second `secondaryAmount` ("≈ 12,00 €"), 8 under the button, the same
24
- * centred secondary line as the terms — the button carries ONE
25
- * amount, the one the charge is made in
26
- * terms 12 under it; the centred secondary line every Bloom action card
27
- * draws under its primary (`ActionCardNote`)
28
- * footer 16 under the terms
29
- *
30
- * ## Why the amount is ON the button
31
- *
32
- * The number a press commits to and the press are one decision. A total
33
- * elsewhere on the screen and a button reading "Place order" are two, and the
34
- * gap between them is where a reader confirms a figure they last saw before a
35
- * tip picker changed it.
36
- *
37
- * ## Why there are TWO guards against a double order
38
- *
39
- * `busy` is the app's: while the order is in flight the button spins and every
40
- * press is dropped. It is not enough on its own — a press calls `onConfirm`,
41
- * the app sets its state, and `busy` only reaches this component on the NEXT
42
- * commit; the second tap of a double-tap lands inside that window and places a
43
- * second order. So the component also latches on its own press, synchronously,
44
- * in a ref: state would not do, because two presses in one tick both read the
45
- * same render's value.
46
- *
47
- * The latch clears on the first commit where `busy` is false again — so an app
48
- * that never sets `busy` (a confirm that navigates away, a demo) gets exactly
49
- * one press per tick and is never wedged, and an app that does keeps the button
50
- * inert for the whole flight.
51
- */
52
- function CheckoutConfirmComponent(t0) {
53
- const $ = (0, _compilerRuntime.c)(39);
54
- const {
55
- label: labelProp,
56
- amount,
57
- secondaryAmount,
58
- terms,
59
- onConfirm,
60
- disabled: t1,
61
- busy: t2,
62
- busyLabel: busyLabelProp,
63
- footer,
64
- style,
65
- testID
66
- } = t0;
67
- const disabled = t1 === undefined ? false : t1;
68
- const busy = t2 === undefined ? false : t2;
69
- const {
70
- messages
71
- } = (0, _messages.useMessages)(_messages2.CHECKOUT_SUMMARY_MESSAGES);
72
- const label = labelProp ?? messages.placeOrder;
73
- const busyLabel = busyLabelProp ?? messages.placingOrder;
74
- const latch = (0, _react.useRef)(false);
75
- const [latched, setLatched] = (0, _react.useState)(false);
76
- let t3;
77
- if ($[0] !== busy || $[1] !== disabled || $[2] !== onConfirm) {
78
- t3 = () => {
79
- if (disabled || busy || latch.current) {
80
- return;
81
- }
82
- latch.current = true;
83
- setLatched(true);
84
- onConfirm?.();
85
- };
86
- $[0] = busy;
87
- $[1] = disabled;
88
- $[2] = onConfirm;
89
- $[3] = t3;
90
- } else {
91
- t3 = $[3];
92
- }
93
- const handlePress = t3;
94
- let t4;
95
- let t5;
96
- if ($[4] !== busy || $[5] !== latched) {
97
- t4 = () => {
98
- if (!latched || busy) {
99
- return;
100
- }
101
- latch.current = false;
102
- setLatched(false);
103
- };
104
- t5 = [latched, busy];
105
- $[4] = busy;
106
- $[5] = latched;
107
- $[6] = t4;
108
- $[7] = t5;
109
- } else {
110
- t4 = $[6];
111
- t5 = $[7];
112
- }
113
- (0, _react.useEffect)(t4, t5);
114
- let t6;
115
- if ($[8] !== testID) {
116
- t6 = part => testID ? `${testID}-${part}` : undefined;
117
- $[8] = testID;
118
- $[9] = t6;
119
- } else {
120
- t6 = $[9];
121
- }
122
- const id = t6;
123
- let t7;
124
- if ($[10] !== amount || $[11] !== label) {
125
- t7 = (0, _shared.checkoutConfirmLabel)(label, amount);
126
- $[10] = amount;
127
- $[11] = label;
128
- $[12] = t7;
129
- } else {
130
- t7 = $[12];
131
- }
132
- const words = t7;
133
- const t8 = busy ? busyLabel : words;
134
- let t9;
135
- if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
136
- t9 = {
137
- alignSelf: "stretch"
138
- };
139
- $[13] = t9;
140
- } else {
141
- t9 = $[13];
142
- }
143
- let t10;
144
- if ($[14] !== id) {
145
- t10 = id("button");
146
- $[14] = id;
147
- $[15] = t10;
148
- } else {
149
- t10 = $[15];
150
- }
151
- let t11;
152
- if ($[16] !== busy || $[17] !== disabled || $[18] !== handlePress || $[19] !== t10 || $[20] !== t8 || $[21] !== words) {
153
- t11 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
154
- size: "lg",
155
- fullWidth: true,
156
- onPress: handlePress,
157
- disabled: disabled,
158
- loading: busy,
159
- accessibilityLabel: t8,
160
- style: t9,
161
- testID: t10,
162
- tone: "accent",
163
- appearance: "solid",
164
- children: words
165
- });
166
- $[16] = busy;
167
- $[17] = disabled;
168
- $[18] = handlePress;
169
- $[19] = t10;
170
- $[20] = t8;
171
- $[21] = words;
172
- $[22] = t11;
173
- } else {
174
- t11 = $[22];
175
- }
176
- let t12;
177
- if ($[23] !== id || $[24] !== secondaryAmount) {
178
- t12 = secondaryAmount ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionCard.ActionCardNote, {
179
- style: {
180
- marginTop: 8
181
- },
182
- testID: id("secondary-amount"),
183
- children: secondaryAmount
184
- }) : null;
185
- $[23] = id;
186
- $[24] = secondaryAmount;
187
- $[25] = t12;
188
- } else {
189
- t12 = $[25];
190
- }
191
- let t13;
192
- if ($[26] !== id || $[27] !== terms) {
193
- t13 = terms != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionCard.ActionCardNote, {
194
- style: {
195
- marginTop: 12
196
- },
197
- testID: id("terms"),
198
- children: terms
199
- }) : null;
200
- $[26] = id;
201
- $[27] = terms;
202
- $[28] = t13;
203
- } else {
204
- t13 = $[28];
205
- }
206
- let t14;
207
- if ($[29] !== footer || $[30] !== id) {
208
- t14 = footer != null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
209
- style: {
210
- marginTop: 16,
211
- alignItems: "center"
212
- },
213
- testID: id("footer"),
214
- children: footer
215
- }) : null;
216
- $[29] = footer;
217
- $[30] = id;
218
- $[31] = t14;
219
- } else {
220
- t14 = $[31];
221
- }
222
- let t15;
223
- if ($[32] !== style || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== testID) {
224
- t15 = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
225
- testID: testID,
226
- style: style,
227
- children: [t11, t12, t13, t14]
228
- });
229
- $[32] = style;
230
- $[33] = t11;
231
- $[34] = t12;
232
- $[35] = t13;
233
- $[36] = t14;
234
- $[37] = testID;
235
- $[38] = t15;
236
- } else {
237
- t15 = $[38];
238
- }
239
- return t15;
240
- }
241
- const CheckoutConfirm = exports.CheckoutConfirm = /*#__PURE__*/(0, _react.memo)(CheckoutConfirmComponent);
242
- CheckoutConfirm.displayName = 'CheckoutConfirm';
243
- //# sourceMappingURL=CheckoutConfirm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_ActionCard","_button","_messages","_messages2","_shared","_jsxRuntime","cache","e","t","__esModule","r","c","a","Object","defineProperty","n","__proto__","default","WeakMap","has","get","set","hasOwnProperty","call","getOwnPropertyDescriptor","CheckoutConfirmComponent","t0","$","_compilerRuntime","label","labelProp","amount","secondaryAmount","terms","onConfirm","disabled","t1","busy","t2","busyLabel","busyLabelProp","footer","style","testID","undefined","messages","useMessages","CHECKOUT_SUMMARY_MESSAGES","placeOrder","placingOrder","latch","useRef","latched","setLatched","useState","t3","current","handlePress","t4","t5","useEffect","t6","part","id","t7","checkoutConfirmLabel","words","t8","t9","Symbol","for","alignSelf","t10","t11","jsx","Button","size","fullWidth","accessibilityLabel","tone","appearance","children","t12","ActionCardNote","marginTop","t13","t14","View","alignItems","t15","jsxs","CheckoutConfirm","exports","memo","displayName"],"sourceRoot":"../../../src","sources":["checkout-summary/CheckoutConfirm.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,KAAA;AAAA,SAAAT,wBAAAU,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAE,UAAA,SAAAF,CAAA,MAAAG,CAAA,EAAAC,CAAA,EAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,QAAAM,MAAA,CAAAN,CAAA,MAAAA,CAAA,SAAAQ,CAAA,MAAAT,KAAA,yBAAAY,OAAA,KAAAZ,KAAA,OAAAY,OAAA,KAAAZ,KAAA,QAAAA,KAAA,CAAAa,GAAA,CAAAZ,CAAA,UAAAD,KAAA,CAAAc,GAA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