@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
@@ -1,1046 +0,0 @@
1
- "use strict";
2
-
3
- import { c as _c } from "react/compiler-runtime";
4
- import React, { memo, useMemo } from 'react';
5
- import { Pressable, View } from 'react-native';
6
- import { openHref } from "../hooks/link-activation.js";
7
- import { BloomImage } from "../image/index.js";
8
- import { Badge } from "../badge/index.js";
9
- import { Chip } from "../chip/index.js";
10
- import { RiPriceTag3Line } from "../icons/remix/RiPriceTag3Line.js";
11
- import { useImageResolver } from "../image-resolver/context.js";
12
- import { useCommonMessages } from "../locale/common-messages.js";
13
- import { useMessages } from "../locale/messages.js";
14
- import { FavoriteButton } from "../listing-card/index.js";
15
- import { ListingFacts, ListingStatusPill } from "../listing-card/parts.js";
16
- import { COMPACT_PHOTO_RADIUS, COMPACT_PHOTO_SIZE, LISTING_CARD_CSS, LISTING_CARD_STYLE_ID, PHOTO_RADIUS, resolveListingCardPaint, resolvePhoto, STATUS_WASH_OPACITY } from "../listing-card/shared.js";
17
- import { OFFERING_BADGE_RUNG } from "../offering-badge/shared.js";
18
- import { Rating } from '../rating';
19
- import { Box as SkeletonBox } from "../skeleton/index.js";
20
- import { useInteractiveWebCss } from "../styles/interactive-web-css.js";
21
- import { webDataSet } from "../styles/web-data.js";
22
- import { useTheme } from "../theme/use-theme.js";
23
- import { Text } from "../typography/index.js";
24
- import { VENDOR_CUISINE_CHIP_HEIGHT, VENDOR_PHOTO_ASPECT_RATIO, VENDOR_TEXT_GAP } from "./constants.js";
25
- import { VENDOR_CARD_MESSAGES } from "./messages.js";
26
- import { availabilityLabelFor, composeVendorName, VENDOR_CARD_CSS, VENDOR_CARD_STYLE_ID, vendorCuisines, vendorFacts } from "./shared.js";
27
- import { IS_WEB } from "../styles/platform.js";
28
-
29
- /**
30
- * A restaurant or a shop in a list.
31
- *
32
- * comfortable a 16:9 cover (radius 16) with the marks over it, 12 below it
33
- * the name + `Rating`, the cuisines, the "opens at" line and
34
- * the fact row
35
- * compact a 112 square thumbnail (radius 12), 12 right of it the marks
36
- * row, the name + small `Rating`, the cuisines, the "opens at"
37
- * line and the fact row
38
- * marks the status pill first, then the promo — the reader decides
39
- * "can I order at all" before "is it cheap"
40
- * not open the cover washed 50% toward the page, exactly as a home that
41
- * is not available is
42
- *
43
- * IT IS `listing-card`'s CARD WITH A VENDOR'S DATA IN IT, deliberately. The
44
- * wash, the status pill, the fact row, the heart, the placeholder and every
45
- * colour are `listing-card`'s own parts — a food app and a housing app put the
46
- * same object on the screen, and this family owns only what is different: the
47
- * cover's shape, the cuisines, the four delivery readings and the promo mark.
48
- *
49
- * THE CARD IS A LINK AND THE CONTROLS ARE ITS SIBLINGS, NOT ITS CHILDREN — the
50
- * rule `ListingCard` records: a button inside an anchor is invalid HTML and
51
- * makes the heart's press open the vendor. The heart sits in an overlay laid
52
- * over the cover from outside the link.
53
- *
54
- * The cover is ONE picture. A vendor is not a gallery, so there is no pager, no
55
- * dots and no arrows; a shelf scrolls sideways through vendors, not through one
56
- * vendor's photos.
57
- */
58
-
59
- // ---------------------------------------------------------------------------
60
- // Cover
61
- // ---------------------------------------------------------------------------
62
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
63
- function coverStyle(density) {
64
- return density === 'compact' ? {
65
- width: COMPACT_PHOTO_SIZE,
66
- height: COMPACT_PHOTO_SIZE,
67
- borderRadius: COMPACT_PHOTO_RADIUS
68
- } : {
69
- width: '100%',
70
- aspectRatio: VENDOR_PHOTO_ASPECT_RATIO,
71
- borderRadius: PHOTO_RADIUS
72
- };
73
- }
74
- function Cover(t0) {
75
- const $ = _c(22);
76
- const {
77
- photo,
78
- photoVariant,
79
- density,
80
- paint,
81
- washed,
82
- testID
83
- } = t0;
84
- const resolver = useImageResolver();
85
- let t1;
86
- if ($[0] !== photo || $[1] !== photoVariant || $[2] !== resolver) {
87
- t1 = photo ? resolvePhoto(photo, resolver, photoVariant) : undefined;
88
- $[0] = photo;
89
- $[1] = photoVariant;
90
- $[2] = resolver;
91
- $[3] = t1;
92
- } else {
93
- t1 = $[3];
94
- }
95
- const uri = t1;
96
- let t2;
97
- if ($[4] !== density) {
98
- t2 = coverStyle(density);
99
- $[4] = density;
100
- $[5] = t2;
101
- } else {
102
- t2 = $[5];
103
- }
104
- let t3;
105
- if ($[6] !== paint.photoPlaceholder) {
106
- t3 = {
107
- flexShrink: 0,
108
- overflow: "hidden",
109
- backgroundColor: paint.photoPlaceholder
110
- };
111
- $[6] = paint.photoPlaceholder;
112
- $[7] = t3;
113
- } else {
114
- t3 = $[7];
115
- }
116
- let t4;
117
- if ($[8] !== t2 || $[9] !== t3) {
118
- t4 = [t2, t3];
119
- $[8] = t2;
120
- $[9] = t3;
121
- $[10] = t4;
122
- } else {
123
- t4 = $[10];
124
- }
125
- const t5 = testID ? `${testID}-photo` : undefined;
126
- let t6;
127
- if ($[11] !== uri) {
128
- t6 = uri ? /*#__PURE__*/_jsx(BloomImage, {
129
- source: {
130
- uri
131
- },
132
- contentFit: "cover",
133
- accessibilityIgnoresInvertColors: true,
134
- style: {
135
- width: "100%",
136
- height: "100%"
137
- }
138
- }) : null;
139
- $[11] = uri;
140
- $[12] = t6;
141
- } else {
142
- t6 = $[12];
143
- }
144
- let t7;
145
- if ($[13] !== paint.statusWash || $[14] !== testID || $[15] !== washed) {
146
- t7 = washed ? /*#__PURE__*/_jsx(View, {
147
- pointerEvents: "none",
148
- style: {
149
- position: "absolute",
150
- top: 0,
151
- right: 0,
152
- bottom: 0,
153
- left: 0,
154
- backgroundColor: paint.statusWash,
155
- opacity: STATUS_WASH_OPACITY
156
- },
157
- testID: testID ? `${testID}-wash` : undefined
158
- }) : null;
159
- $[13] = paint.statusWash;
160
- $[14] = testID;
161
- $[15] = washed;
162
- $[16] = t7;
163
- } else {
164
- t7 = $[16];
165
- }
166
- let t8;
167
- if ($[17] !== t4 || $[18] !== t5 || $[19] !== t6 || $[20] !== t7) {
168
- t8 = /*#__PURE__*/_jsxs(View, {
169
- style: t4,
170
- testID: t5,
171
- children: [t6, t7]
172
- });
173
- $[17] = t4;
174
- $[18] = t5;
175
- $[19] = t6;
176
- $[20] = t7;
177
- $[21] = t8;
178
- } else {
179
- t8 = $[21];
180
- }
181
- return t8;
182
- }
183
-
184
- // ---------------------------------------------------------------------------
185
- // Marks — the status pill and the promo, in one wrapping row
186
- // ---------------------------------------------------------------------------
187
-
188
- function Marks(t0) {
189
- const $ = _c(15);
190
- const {
191
- status,
192
- promo,
193
- promoTone,
194
- size,
195
- paint,
196
- testID
197
- } = t0;
198
- if (!status && !promo) {
199
- return null;
200
- }
201
- let t1;
202
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
203
- t1 = {
204
- flexDirection: "row",
205
- flexWrap: "wrap",
206
- alignItems: "flex-start",
207
- gap: 6
208
- };
209
- $[0] = t1;
210
- } else {
211
- t1 = $[0];
212
- }
213
- const t2 = testID ? `${testID}-marks` : undefined;
214
- let t3;
215
- if ($[1] !== paint || $[2] !== size || $[3] !== status || $[4] !== testID) {
216
- t3 = status ? /*#__PURE__*/_jsx(ListingStatusPill, {
217
- label: status,
218
- fill: paint.statusFill,
219
- text: paint.statusText,
220
- size: size,
221
- testID: testID ? `${testID}-status` : undefined
222
- }) : null;
223
- $[1] = paint;
224
- $[2] = size;
225
- $[3] = status;
226
- $[4] = testID;
227
- $[5] = t3;
228
- } else {
229
- t3 = $[5];
230
- }
231
- let t4;
232
- if ($[6] !== promo || $[7] !== promoTone || $[8] !== size || $[9] !== testID) {
233
- t4 = promo ? /*#__PURE__*/_jsx(Badge, {
234
- content: promo,
235
- variant: "solid",
236
- color: promoTone,
237
- size: OFFERING_BADGE_RUNG[size],
238
- icon: RiPriceTag3Line,
239
- testID: testID ? `${testID}-promo` : undefined
240
- }) : null;
241
- $[6] = promo;
242
- $[7] = promoTone;
243
- $[8] = size;
244
- $[9] = testID;
245
- $[10] = t4;
246
- } else {
247
- t4 = $[10];
248
- }
249
- let t5;
250
- if ($[11] !== t2 || $[12] !== t3 || $[13] !== t4) {
251
- t5 = /*#__PURE__*/_jsxs(View, {
252
- pointerEvents: "none",
253
- style: t1,
254
- testID: t2,
255
- children: [t3, t4]
256
- });
257
- $[11] = t2;
258
- $[12] = t3;
259
- $[13] = t4;
260
- $[14] = t5;
261
- } else {
262
- t5 = $[14];
263
- }
264
- return t5;
265
- }
266
-
267
- // ---------------------------------------------------------------------------
268
- // Cuisines
269
- // ---------------------------------------------------------------------------
270
-
271
- /**
272
- * The cuisines as pills, on ONE line. The row wraps inside a box one pill tall
273
- * and clips, so a pill that does not fit moves to a second line nobody sees —
274
- * cuisines drop out WHOLE from the end rather than each being truncated to
275
- * "Jap…". The card's accessible name carries every one of them.
276
- */
277
- function Cuisines(t0) {
278
- const $ = _c(12);
279
- const {
280
- cuisines,
281
- surface,
282
- style,
283
- testID
284
- } = t0;
285
- if (cuisines.length === 0) {
286
- return null;
287
- }
288
- let t1;
289
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
290
- t1 = {
291
- flexDirection: "row",
292
- flexWrap: "wrap",
293
- alignItems: "center",
294
- columnGap: 6,
295
- rowGap: 6,
296
- height: VENDOR_CUISINE_CHIP_HEIGHT,
297
- overflow: "hidden"
298
- };
299
- $[0] = t1;
300
- } else {
301
- t1 = $[0];
302
- }
303
- let t2;
304
- if ($[1] !== style) {
305
- t2 = [t1, style];
306
- $[1] = style;
307
- $[2] = t2;
308
- } else {
309
- t2 = $[2];
310
- }
311
- const t3 = testID ? `${testID}-cuisines` : undefined;
312
- let t4;
313
- if ($[3] !== cuisines || $[4] !== surface) {
314
- let t5;
315
- if ($[6] !== surface) {
316
- t5 = cuisine => /*#__PURE__*/_jsx(Chip, {
317
- size: "sm",
318
- variant: "subtle",
319
- color: "default",
320
- surface: surface,
321
- children: cuisine
322
- }, cuisine);
323
- $[6] = surface;
324
- $[7] = t5;
325
- } else {
326
- t5 = $[7];
327
- }
328
- t4 = cuisines.map(t5);
329
- $[3] = cuisines;
330
- $[4] = surface;
331
- $[5] = t4;
332
- } else {
333
- t4 = $[5];
334
- }
335
- let t5;
336
- if ($[8] !== t2 || $[9] !== t3 || $[10] !== t4) {
337
- t5 = /*#__PURE__*/_jsx(View, {
338
- "aria-hidden": true,
339
- importantForAccessibility: "no-hide-descendants",
340
- style: t2,
341
- testID: t3,
342
- children: t4
343
- });
344
- $[8] = t2;
345
- $[9] = t3;
346
- $[10] = t4;
347
- $[11] = t5;
348
- } else {
349
- t5 = $[11];
350
- }
351
- return t5;
352
- }
353
-
354
- // ---------------------------------------------------------------------------
355
- // Skeleton
356
- // ---------------------------------------------------------------------------
357
-
358
- function VendorCardSkeleton(t0) {
359
- const $ = _c(23);
360
- const {
361
- density,
362
- style,
363
- testID
364
- } = t0;
365
- const common = useCommonMessages();
366
- const compact = density === "compact";
367
- const t1 = compact ? "row" : "column";
368
- let t2;
369
- if ($[0] !== t1) {
370
- t2 = {
371
- flexDirection: t1,
372
- alignItems: "flex-start"
373
- };
374
- $[0] = t1;
375
- $[1] = t2;
376
- } else {
377
- t2 = $[1];
378
- }
379
- let t3;
380
- if ($[2] !== style || $[3] !== t2) {
381
- t3 = [t2, style];
382
- $[2] = style;
383
- $[3] = t2;
384
- $[4] = t3;
385
- } else {
386
- t3 = $[4];
387
- }
388
- let t4;
389
- if ($[5] !== compact) {
390
- t4 = compact ? /*#__PURE__*/_jsx(SkeletonBox, {
391
- width: COMPACT_PHOTO_SIZE,
392
- height: COMPACT_PHOTO_SIZE,
393
- borderRadius: COMPACT_PHOTO_RADIUS,
394
- style: {
395
- flexShrink: 0
396
- }
397
- }) : /*#__PURE__*/_jsx(SkeletonBox, {
398
- borderRadius: PHOTO_RADIUS,
399
- style: {
400
- width: "100%",
401
- aspectRatio: VENDOR_PHOTO_ASPECT_RATIO
402
- }
403
- });
404
- $[5] = compact;
405
- $[6] = t4;
406
- } else {
407
- t4 = $[6];
408
- }
409
- const t5 = compact ? 1 : undefined;
410
- const t6 = compact ? "center" : "stretch";
411
- const t7 = compact ? 0 : VENDOR_TEXT_GAP;
412
- const t8 = compact ? VENDOR_TEXT_GAP : 0;
413
- let t9;
414
- if ($[7] !== t5 || $[8] !== t6 || $[9] !== t7 || $[10] !== t8) {
415
- t9 = {
416
- flex: t5,
417
- alignSelf: t6,
418
- marginTop: t7,
419
- marginLeft: t8,
420
- gap: 8
421
- };
422
- $[7] = t5;
423
- $[8] = t6;
424
- $[9] = t7;
425
- $[10] = t8;
426
- $[11] = t9;
427
- } else {
428
- t9 = $[11];
429
- }
430
- let t10;
431
- let t11;
432
- let t12;
433
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
434
- t10 = /*#__PURE__*/_jsx(SkeletonBox, {
435
- width: "60%",
436
- height: 14,
437
- borderRadius: 4
438
- });
439
- t11 = /*#__PURE__*/_jsx(SkeletonBox, {
440
- width: "45%",
441
- height: 12,
442
- borderRadius: 4
443
- });
444
- t12 = /*#__PURE__*/_jsx(SkeletonBox, {
445
- width: "70%",
446
- height: 12,
447
- borderRadius: 4
448
- });
449
- $[12] = t10;
450
- $[13] = t11;
451
- $[14] = t12;
452
- } else {
453
- t10 = $[12];
454
- t11 = $[13];
455
- t12 = $[14];
456
- }
457
- let t13;
458
- if ($[15] !== t9) {
459
- t13 = /*#__PURE__*/_jsxs(View, {
460
- style: t9,
461
- children: [t10, t11, t12]
462
- });
463
- $[15] = t9;
464
- $[16] = t13;
465
- } else {
466
- t13 = $[16];
467
- }
468
- let t14;
469
- if ($[17] !== common.loading || $[18] !== t13 || $[19] !== t3 || $[20] !== t4 || $[21] !== testID) {
470
- t14 = /*#__PURE__*/_jsxs(View, {
471
- "aria-busy": true,
472
- accessibilityLabel: common.loading,
473
- style: t3,
474
- testID: testID,
475
- children: [t4, t13]
476
- });
477
- $[17] = common.loading;
478
- $[18] = t13;
479
- $[19] = t3;
480
- $[20] = t4;
481
- $[21] = testID;
482
- $[22] = t14;
483
- } else {
484
- t14 = $[22];
485
- }
486
- return t14;
487
- }
488
-
489
- // ---------------------------------------------------------------------------
490
- // Card
491
- // ---------------------------------------------------------------------------
492
-
493
- function VendorCardComponent(props) {
494
- const $ = _c(132);
495
- const {
496
- name,
497
- photo,
498
- photoVariant,
499
- cuisines,
500
- rating,
501
- reviewCount,
502
- newLabel,
503
- promo,
504
- promoTone: t0,
505
- availability,
506
- availabilityLabel,
507
- opensAt,
508
- favorite: t1,
509
- onFavoriteChange,
510
- saveLabel,
511
- removeLabel,
512
- onPress,
513
- href,
514
- loading: t2,
515
- density: t3,
516
- accessibilityLabel,
517
- style,
518
- testID
519
- } = props;
520
- const promoTone = t0 === undefined ? "success" : t0;
521
- const favorite = t1 === undefined ? false : t1;
522
- const loading = t2 === undefined ? false : t2;
523
- const density = t3 === undefined ? "comfortable" : t3;
524
- const theme = useTheme();
525
- const {
526
- messages
527
- } = useMessages(VENDOR_CARD_MESSAGES);
528
- useInteractiveWebCss(VENDOR_CARD_STYLE_ID, VENDOR_CARD_CSS);
529
- useInteractiveWebCss(LISTING_CARD_STYLE_ID, LISTING_CARD_CSS);
530
- let t4;
531
- if ($[0] !== theme) {
532
- t4 = resolveListingCardPaint(theme);
533
- $[0] = theme;
534
- $[1] = t4;
535
- } else {
536
- t4 = $[1];
537
- }
538
- const paint = t4;
539
- const compact = density === "compact";
540
- if (loading) {
541
- let t5;
542
- if ($[2] !== density || $[3] !== style || $[4] !== testID) {
543
- t5 = /*#__PURE__*/_jsx(VendorCardSkeleton, {
544
- density: density,
545
- style: style,
546
- testID: testID
547
- });
548
- $[2] = density;
549
- $[3] = style;
550
- $[4] = testID;
551
- $[5] = t5;
552
- } else {
553
- t5 = $[5];
554
- }
555
- return t5;
556
- }
557
- let t5;
558
- if ($[6] !== availability || $[7] !== availabilityLabel || $[8] !== messages) {
559
- t5 = availabilityLabelFor(availability, availabilityLabel, messages);
560
- $[6] = availability;
561
- $[7] = availabilityLabel;
562
- $[8] = messages;
563
- $[9] = t5;
564
- } else {
565
- t5 = $[9];
566
- }
567
- const status = t5;
568
- let t6;
569
- if ($[10] !== messages || $[11] !== props) {
570
- t6 = vendorFacts(props, messages);
571
- $[10] = messages;
572
- $[11] = props;
573
- $[12] = t6;
574
- } else {
575
- t6 = $[12];
576
- }
577
- const facts = t6;
578
- let t7;
579
- if ($[13] !== cuisines || $[14] !== density) {
580
- t7 = vendorCuisines(cuisines, density);
581
- $[13] = cuisines;
582
- $[14] = density;
583
- $[15] = t7;
584
- } else {
585
- t7 = $[15];
586
- }
587
- const shownCuisines = t7;
588
- const markSize = compact ? "sm" : "md";
589
- let t8;
590
- if ($[16] !== accessibilityLabel || $[17] !== messages || $[18] !== props) {
591
- t8 = accessibilityLabel ?? composeVendorName(props, messages);
592
- $[16] = accessibilityLabel;
593
- $[17] = messages;
594
- $[18] = props;
595
- $[19] = t8;
596
- } else {
597
- t8 = $[19];
598
- }
599
- const label = t8;
600
- let t9;
601
- if ($[20] !== href || $[21] !== onPress) {
602
- t9 = event => {
603
- if (onPress) {
604
- if (IS_WEB && href) {
605
- event.preventDefault();
606
- }
607
- onPress();
608
- return;
609
- }
610
- if (!IS_WEB && href) {
611
- openHref(href);
612
- }
613
- };
614
- $[20] = href;
615
- $[21] = onPress;
616
- $[22] = t9;
617
- } else {
618
- t9 = $[22];
619
- }
620
- const handlePress = t9;
621
- let t10;
622
- if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
623
- t10 = webDataSet({
624
- bloomVendorCardLink: ""
625
- });
626
- $[23] = t10;
627
- } else {
628
- t10 = $[23];
629
- }
630
- let t11;
631
- if ($[24] !== href) {
632
- t11 = IS_WEB && href ? {
633
- href
634
- } : null;
635
- $[24] = href;
636
- $[25] = t11;
637
- } else {
638
- t11 = $[25];
639
- }
640
- const t12 = href ? "link" : onPress ? "button" : undefined;
641
- const t13 = onPress || !IS_WEB && href ? handlePress : undefined;
642
- const t14 = testID ? `${testID}-link` : undefined;
643
- let t15;
644
- if ($[26] !== label || $[27] !== t10 || $[28] !== t11 || $[29] !== t12 || $[30] !== t13 || $[31] !== t14) {
645
- t15 = {
646
- ...t10,
647
- ...t11,
648
- role: t12,
649
- accessibilityLabel: label,
650
- onPress: t13,
651
- testID: t14
652
- };
653
- $[26] = label;
654
- $[27] = t10;
655
- $[28] = t11;
656
- $[29] = t12;
657
- $[30] = t13;
658
- $[31] = t14;
659
- $[32] = t15;
660
- } else {
661
- t15 = $[32];
662
- }
663
- const linkProps = t15;
664
- const t16 = compact ? "row" : "column";
665
- let t17;
666
- if ($[33] !== paint.ring || $[34] !== t16) {
667
- t17 = {
668
- flexDirection: t16,
669
- alignItems: "flex-start",
670
- "--bloom-vendor-card-ring": paint.ring
671
- };
672
- $[33] = paint.ring;
673
- $[34] = t16;
674
- $[35] = t17;
675
- } else {
676
- t17 = $[35];
677
- }
678
- const linkStyle = t17;
679
- const t18 = compact ? 1 : undefined;
680
- const t19 = compact ? "center" : "stretch";
681
- const t20 = compact ? 0 : VENDOR_TEXT_GAP;
682
- const t21 = compact ? VENDOR_TEXT_GAP : 0;
683
- let t22;
684
- if ($[36] !== t18 || $[37] !== t19 || $[38] !== t20 || $[39] !== t21) {
685
- t22 = {
686
- flex: t18,
687
- minWidth: 0,
688
- alignSelf: t19,
689
- marginTop: t20,
690
- marginLeft: t21,
691
- gap: 4
692
- };
693
- $[36] = t18;
694
- $[37] = t19;
695
- $[38] = t20;
696
- $[39] = t21;
697
- $[40] = t22;
698
- } else {
699
- t22 = $[40];
700
- }
701
- let t23;
702
- if ($[41] !== compact || $[42] !== markSize || $[43] !== paint || $[44] !== promo || $[45] !== promoTone || $[46] !== status || $[47] !== testID) {
703
- t23 = compact ? /*#__PURE__*/_jsx(Marks, {
704
- status: status,
705
- promo: promo,
706
- promoTone: promoTone,
707
- size: markSize,
708
- paint: paint,
709
- testID: testID
710
- }) : null;
711
- $[41] = compact;
712
- $[42] = markSize;
713
- $[43] = paint;
714
- $[44] = promo;
715
- $[45] = promoTone;
716
- $[46] = status;
717
- $[47] = testID;
718
- $[48] = t23;
719
- } else {
720
- t23 = $[48];
721
- }
722
- let t24;
723
- if ($[49] === Symbol.for("react.memo_cache_sentinel")) {
724
- t24 = {
725
- flexDirection: "row",
726
- alignItems: "center",
727
- gap: 8
728
- };
729
- $[49] = t24;
730
- } else {
731
- t24 = $[49];
732
- }
733
- const t25 = compact ? "body-semibold" : "headline-semibold";
734
- const t26 = testID ? `${testID}-name` : undefined;
735
- let t27;
736
- if ($[50] !== paint.text) {
737
- t27 = {
738
- flex: 1,
739
- minWidth: 0,
740
- color: paint.text
741
- };
742
- $[50] = paint.text;
743
- $[51] = t27;
744
- } else {
745
- t27 = $[51];
746
- }
747
- let t28;
748
- if ($[52] !== name || $[53] !== t25 || $[54] !== t26 || $[55] !== t27) {
749
- t28 = /*#__PURE__*/_jsx(Text, {
750
- variant: t25,
751
- numberOfLines: 1,
752
- testID: t26,
753
- style: t27,
754
- children: name
755
- });
756
- $[52] = name;
757
- $[53] = t25;
758
- $[54] = t26;
759
- $[55] = t27;
760
- $[56] = t28;
761
- } else {
762
- t28 = $[56];
763
- }
764
- let t29;
765
- if ($[57] !== compact || $[58] !== messages || $[59] !== newLabel || $[60] !== rating || $[61] !== reviewCount || $[62] !== testID) {
766
- t29 = rating !== undefined ? /*#__PURE__*/_jsx(Rating, {
767
- size: compact ? "sm" : "md",
768
- value: rating,
769
- count: reviewCount,
770
- newLabel: newLabel ?? messages.new,
771
- style: {
772
- flexShrink: 0
773
- },
774
- testID: testID ? `${testID}-rating` : undefined
775
- }) : null;
776
- $[57] = compact;
777
- $[58] = messages;
778
- $[59] = newLabel;
779
- $[60] = rating;
780
- $[61] = reviewCount;
781
- $[62] = testID;
782
- $[63] = t29;
783
- } else {
784
- t29 = $[63];
785
- }
786
- let t30;
787
- if ($[64] !== t28 || $[65] !== t29) {
788
- t30 = /*#__PURE__*/_jsxs(View, {
789
- style: t24,
790
- children: [t28, t29]
791
- });
792
- $[64] = t28;
793
- $[65] = t29;
794
- $[66] = t30;
795
- } else {
796
- t30 = $[66];
797
- }
798
- let t31;
799
- if ($[67] === Symbol.for("react.memo_cache_sentinel")) {
800
- t31 = {
801
- marginTop: 2
802
- };
803
- $[67] = t31;
804
- } else {
805
- t31 = $[67];
806
- }
807
- let t32;
808
- if ($[68] !== shownCuisines || $[69] !== testID || $[70] !== theme.colors.background) {
809
- t32 = /*#__PURE__*/_jsx(Cuisines, {
810
- cuisines: shownCuisines,
811
- surface: theme.colors.background,
812
- style: t31,
813
- testID: testID
814
- });
815
- $[68] = shownCuisines;
816
- $[69] = testID;
817
- $[70] = theme.colors.background;
818
- $[71] = t32;
819
- } else {
820
- t32 = $[71];
821
- }
822
- let t33;
823
- if ($[72] !== opensAt || $[73] !== paint.textSecondary || $[74] !== status || $[75] !== testID) {
824
- t33 = status && opensAt ? /*#__PURE__*/_jsx(Text, {
825
- variant: "body-2-regular",
826
- numberOfLines: 1,
827
- testID: testID ? `${testID}-opens-at` : undefined,
828
- style: {
829
- marginTop: 2,
830
- color: paint.textSecondary
831
- },
832
- children: opensAt
833
- }) : null;
834
- $[72] = opensAt;
835
- $[73] = paint.textSecondary;
836
- $[74] = status;
837
- $[75] = testID;
838
- $[76] = t33;
839
- } else {
840
- t33 = $[76];
841
- }
842
- let t34;
843
- if ($[77] !== compact || $[78] !== facts || $[79] !== paint.textSecondary || $[80] !== testID) {
844
- t34 = facts.length > 0 ? /*#__PURE__*/_jsx(ListingFacts, {
845
- facts: facts,
846
- size: compact ? "small" : "medium",
847
- color: paint.textSecondary,
848
- style: {
849
- marginTop: 2
850
- },
851
- testID: testID ? `${testID}-facts` : undefined
852
- }) : null;
853
- $[77] = compact;
854
- $[78] = facts;
855
- $[79] = paint.textSecondary;
856
- $[80] = testID;
857
- $[81] = t34;
858
- } else {
859
- t34 = $[81];
860
- }
861
- let t35;
862
- if ($[82] !== t22 || $[83] !== t23 || $[84] !== t30 || $[85] !== t32 || $[86] !== t33 || $[87] !== t34) {
863
- t35 = /*#__PURE__*/_jsxs(View, {
864
- style: t22,
865
- children: [t23, t30, t32, t33, t34]
866
- });
867
- $[82] = t22;
868
- $[83] = t23;
869
- $[84] = t30;
870
- $[85] = t32;
871
- $[86] = t33;
872
- $[87] = t34;
873
- $[88] = t35;
874
- } else {
875
- t35 = $[88];
876
- }
877
- const details = t35;
878
- let t36;
879
- if ($[89] !== density) {
880
- t36 = webDataSet({
881
- bloomVendorCard: density
882
- });
883
- $[89] = density;
884
- $[90] = t36;
885
- } else {
886
- t36 = $[90];
887
- }
888
- let t37;
889
- if ($[91] === Symbol.for("react.memo_cache_sentinel")) {
890
- t37 = {
891
- position: "relative"
892
- };
893
- $[91] = t37;
894
- } else {
895
- t37 = $[91];
896
- }
897
- let t38;
898
- if ($[92] !== style) {
899
- t38 = [t37, style];
900
- $[92] = style;
901
- $[93] = t38;
902
- } else {
903
- t38 = $[93];
904
- }
905
- const t39 = status != null;
906
- let t40;
907
- if ($[94] !== density || $[95] !== paint || $[96] !== photo || $[97] !== photoVariant || $[98] !== t39 || $[99] !== testID) {
908
- t40 = /*#__PURE__*/_jsx(Cover, {
909
- photo: photo,
910
- photoVariant: photoVariant,
911
- density: density,
912
- paint: paint,
913
- washed: t39,
914
- testID: testID
915
- });
916
- $[94] = density;
917
- $[95] = paint;
918
- $[96] = photo;
919
- $[97] = photoVariant;
920
- $[98] = t39;
921
- $[99] = testID;
922
- $[100] = t40;
923
- } else {
924
- t40 = $[100];
925
- }
926
- let t41;
927
- if ($[101] !== details || $[102] !== linkProps || $[103] !== linkStyle || $[104] !== t40) {
928
- t41 = /*#__PURE__*/_jsxs(Pressable, {
929
- ...linkProps,
930
- style: linkStyle,
931
- children: [t40, details]
932
- });
933
- $[101] = details;
934
- $[102] = linkProps;
935
- $[103] = linkStyle;
936
- $[104] = t40;
937
- $[105] = t41;
938
- } else {
939
- t41 = $[105];
940
- }
941
- let t42;
942
- if ($[106] !== compact || $[107] !== favorite || $[108] !== markSize || $[109] !== onFavoriteChange || $[110] !== paint || $[111] !== promo || $[112] !== promoTone || $[113] !== removeLabel || $[114] !== saveLabel || $[115] !== status || $[116] !== testID) {
943
- t42 = compact ? null : /*#__PURE__*/_jsxs(View, {
944
- pointerEvents: "box-none",
945
- style: {
946
- position: "absolute",
947
- top: 0,
948
- left: 0,
949
- right: 0,
950
- aspectRatio: VENDOR_PHOTO_ASPECT_RATIO
951
- },
952
- children: [/*#__PURE__*/_jsx(View, {
953
- style: {
954
- position: "absolute",
955
- top: 12,
956
- left: 12,
957
- right: 56
958
- },
959
- children: /*#__PURE__*/_jsx(Marks, {
960
- status: status,
961
- promo: promo,
962
- promoTone: promoTone,
963
- size: markSize,
964
- paint: paint,
965
- testID: testID
966
- })
967
- }), onFavoriteChange ? /*#__PURE__*/_jsx(View, {
968
- style: {
969
- position: "absolute",
970
- top: 6,
971
- right: 6
972
- },
973
- children: /*#__PURE__*/_jsx(FavoriteButton, {
974
- favorite: favorite,
975
- onFavoriteChange: onFavoriteChange,
976
- saveLabel: saveLabel,
977
- removeLabel: removeLabel,
978
- testID: testID ? `${testID}-favorite` : undefined
979
- })
980
- }) : null]
981
- });
982
- $[106] = compact;
983
- $[107] = favorite;
984
- $[108] = markSize;
985
- $[109] = onFavoriteChange;
986
- $[110] = paint;
987
- $[111] = promo;
988
- $[112] = promoTone;
989
- $[113] = removeLabel;
990
- $[114] = saveLabel;
991
- $[115] = status;
992
- $[116] = testID;
993
- $[117] = t42;
994
- } else {
995
- t42 = $[117];
996
- }
997
- let t43;
998
- if ($[118] !== compact || $[119] !== favorite || $[120] !== onFavoriteChange || $[121] !== removeLabel || $[122] !== saveLabel || $[123] !== testID) {
999
- t43 = compact && onFavoriteChange ? /*#__PURE__*/_jsx(View, {
1000
- style: {
1001
- position: "absolute",
1002
- top: 2,
1003
- left: COMPACT_PHOTO_SIZE - 34
1004
- },
1005
- children: /*#__PURE__*/_jsx(FavoriteButton, {
1006
- favorite: favorite,
1007
- size: 20,
1008
- onFavoriteChange: onFavoriteChange,
1009
- saveLabel: saveLabel,
1010
- removeLabel: removeLabel,
1011
- testID: testID ? `${testID}-favorite` : undefined
1012
- })
1013
- }) : null;
1014
- $[118] = compact;
1015
- $[119] = favorite;
1016
- $[120] = onFavoriteChange;
1017
- $[121] = removeLabel;
1018
- $[122] = saveLabel;
1019
- $[123] = testID;
1020
- $[124] = t43;
1021
- } else {
1022
- t43 = $[124];
1023
- }
1024
- let t44;
1025
- if ($[125] !== t36 || $[126] !== t38 || $[127] !== t41 || $[128] !== t42 || $[129] !== t43 || $[130] !== testID) {
1026
- t44 = /*#__PURE__*/_jsxs(View, {
1027
- ...t36,
1028
- style: t38,
1029
- testID: testID,
1030
- children: [t41, t42, t43]
1031
- });
1032
- $[125] = t36;
1033
- $[126] = t38;
1034
- $[127] = t41;
1035
- $[128] = t42;
1036
- $[129] = t43;
1037
- $[130] = testID;
1038
- $[131] = t44;
1039
- } else {
1040
- t44 = $[131];
1041
- }
1042
- return t44;
1043
- }
1044
- export const VendorCard = /*#__PURE__*/memo(VendorCardComponent);
1045
- VendorCard.displayName = 'VendorCard';
1046
- //# sourceMappingURL=VendorCard.js.map