@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,58 +0,0 @@
1
- import type { BloomIconComponent } from '../icons/icon-component';
2
- import { RiBikeLine } from '../icons/remix/RiBikeLine';
3
- import { RiShoppingBag3Line } from '../icons/remix/RiShoppingBag3Line';
4
- import { RiTimeLine } from '../icons/remix/RiTimeLine';
5
- import { RiWalkLine } from '../icons/remix/RiWalkLine';
6
- import { VENDOR_CARD_MESSAGES } from './messages';
7
- import type { VendorAvailability, VendorCardDensity, VendorFactKey } from './types';
8
-
9
- /**
10
- * The cover's shape in the comfortable density. 16:9 rather than the 20:19 a
11
- * home is drawn at: a shelf of vendors is scanned SIDEWAYS, and a near-square
12
- * cover at shelf width pushes the name off the first screen.
13
- */
14
- export const VENDOR_PHOTO_ASPECT_RATIO = 16 / 9;
15
-
16
- /** The readings, in the order the fact row draws them. */
17
- export const VENDOR_FACT_ORDER: readonly VendorFactKey[] = [
18
- 'deliveryTime',
19
- 'deliveryFee',
20
- 'distance',
21
- 'minimumOrder',
22
- ];
23
-
24
- /**
25
- * The glyph beside each reading. A bike for the fee because the fee is what the
26
- * ride costs; a walker for distance, which is the one reading that is about the
27
- * reader's own position rather than the order's.
28
- */
29
- export const VENDOR_FACT_ICON: Record<VendorFactKey, BloomIconComponent> = {
30
- deliveryTime: RiTimeLine,
31
- deliveryFee: RiBikeLine,
32
- distance: RiWalkLine,
33
- minimumOrder: RiShoppingBag3Line,
34
- };
35
-
36
- /**
37
- * The word said before each reading in the card's accessible name, in English.
38
- * The card itself speaks `VENDOR_CARD_MESSAGES` in the resolved locale.
39
- */
40
- export const VENDOR_FACT_LABELS: Record<VendorFactKey, string> = VENDOR_CARD_MESSAGES.en.facts;
41
-
42
- /** The English status pill labels. `open` draws none. The card speaks the resolved locale's. */
43
- export const VENDOR_AVAILABILITY_LABELS: Record<
44
- Exclude<VendorAvailability, 'open'>,
45
- string
46
- > = VENDOR_CARD_MESSAGES.en.availability;
47
-
48
- /** The cuisine pills' rung: 24 tall, caption weight — the densest pill Bloom has. */
49
- export const VENDOR_CUISINE_CHIP_HEIGHT = 24;
50
-
51
- /** Space between the cover and the text, and between the text lines. */
52
- export const VENDOR_TEXT_GAP = 12;
53
-
54
- /** How many cuisines are drawn at all. Past this the row is a list, not a mark. */
55
- export const VENDOR_CUISINE_LIMIT: Record<VendorCardDensity, number> = {
56
- comfortable: 4,
57
- compact: 3,
58
- };
@@ -1,15 +0,0 @@
1
- export { VendorCard } from './VendorCard';
2
- export {
3
- VENDOR_AVAILABILITY_LABELS,
4
- VENDOR_FACT_ICON,
5
- VENDOR_FACT_LABELS,
6
- VENDOR_FACT_ORDER,
7
- VENDOR_PHOTO_ASPECT_RATIO,
8
- } from './constants';
9
- export { availabilityLabelFor, composeVendorName, vendorCuisines, vendorFacts } from './shared';
10
- export type {
11
- VendorAvailability,
12
- VendorCardDensity,
13
- VendorCardProps,
14
- VendorFactKey,
15
- } from './types';
@@ -1,20 +0,0 @@
1
- /**
2
- * Helpers the vendor-card catalog's strings share across languages.
3
- * Kept apart from `messages.ts` so a language module can use them without
4
- * linking the family's English strings (see `src/locale/translations`).
5
- */
6
- import type { BloomLanguage } from '../locale/languages';
7
- import { type PluralCategory, plural, pluralCategory } from '../locale/plural';
8
-
9
- /** A count the app may hand over as a number or as its own text ("1.2k"). */
10
- export function counted(
11
- language: BloomLanguage,
12
- count: number | string,
13
- forms: Partial<Record<PluralCategory, string>> & { other: string },
14
- ): string {
15
- if (typeof count === 'number') return plural(language, count, forms);
16
- const form = /^\d+$/.test(count) ? forms[pluralCategory(language, Number(count))] : undefined;
17
- return (form ?? forms.other).replace('{n}', count);
18
- }
19
- export const has = (reviews: number | string | undefined): reviews is number | string =>
20
- reviews != null && reviews !== '';
@@ -1,36 +0,0 @@
1
- import { defineMessages, type MessageCatalog } from '../locale/messages';
2
- import type { VendorAvailability, VendorFactKey } from './types';
3
- import { counted, has } from './message-helpers';
4
-
5
- /**
6
- * Every fixed string the vendor card draws or announces, in each Bloom
7
- * language. A caller's `factLabels`, `availabilityLabel`, `newLabel` and
8
- * `accessibilityLabel` still win over any entry here.
9
- */
10
- export interface VendorCardMessages {
11
- /** The word said before each reading in the card's accessible name. */
12
- facts: Record<VendorFactKey, string>;
13
- /** The status pill. `open` draws none. */
14
- availability: Record<Exclude<VendorAvailability, 'open'>, string>;
15
- /** An unrated vendor's mark. */
16
- new: string;
17
- /**
18
- * The rating in the card's accessible name: "Rated 4.8 out of 5, 214
19
- * reviews". `reviews` is the app's count, a number or pre-formatted text.
20
- */
21
- rated: (value: string, reviews?: number | string) => string;
22
- }
23
-
24
- export const VENDOR_CARD_MESSAGES: MessageCatalog<VendorCardMessages> =
25
- defineMessages<VendorCardMessages>('VENDOR_CARD_MESSAGES', {
26
- facts: {
27
- deliveryTime: 'Delivery time',
28
- deliveryFee: 'Delivery',
29
- distance: 'Distance',
30
- minimumOrder: 'Minimum order',
31
- },
32
- availability: { paused: 'Paused', closed: 'Closed' },
33
- new: 'New',
34
- rated: (value, reviews) =>
35
- `Rated ${value} out of 5${has(reviews) ? `, ${counted('en', reviews, { one: '{n} review', other: '{n} reviews' })}` : ''}`,
36
- });
@@ -1,136 +0,0 @@
1
- /**
2
- * Everything the vendor card decides WITHOUT rendering: which readings the fact
3
- * row carries, what the status pill says, and the sentence a screen reader
4
- * hears. Pure, so `VendorCard.test.tsx` can assert each one directly instead of
5
- * inferring it from markup.
6
- *
7
- * The card's COLOURS are not here, because they are not this family's to pick:
8
- * a vendor card is the same object as a housing card — a photo with a wash, a
9
- * pill over it, a heart, a title and a fact row — and it paints itself with
10
- * `listing-card`'s own `resolveListingCardPaint`. A second table of the same
11
- * eleven colours is how two cards that are meant to be the same drift apart.
12
- */
13
- import { PHOTO_RADIUS } from '../listing-card/shared';
14
- import type { ListingFact } from '../listing-card/types';
15
- import { formatRatingValue } from '../rating/Rating';
16
- import { VENDOR_CUISINE_LIMIT, VENDOR_FACT_ICON, VENDOR_FACT_ORDER } from './constants';
17
- import { VENDOR_CARD_MESSAGES, type VendorCardMessages } from './messages';
18
- import type {
19
- VendorAvailability,
20
- VendorCardDensity,
21
- VendorCardProps,
22
- VendorFactKey,
23
- } from './types';
24
-
25
- /** The status pill's label, or `null` for a vendor that is taking orders. */
26
- export function availabilityLabelFor(
27
- availability: VendorAvailability | undefined,
28
- override?: string,
29
- messages: VendorCardMessages = VENDOR_CARD_MESSAGES.en,
30
- ): string | null {
31
- if (!availability || availability === 'open') return null;
32
- return override ?? messages.availability[availability];
33
- }
34
-
35
- /**
36
- * The readings the fact row draws, in {@link VENDOR_FACT_ORDER}, skipping the
37
- * ones the app did not give. Each carries the glyph it is drawn with and the
38
- * words it is ANNOUNCED with, which are not the same string: "€1.90" beside a
39
- * bike reads as a fee to an eye and as a price to a screen reader.
40
- */
41
- export function vendorFacts(
42
- props: Pick<
43
- VendorCardProps,
44
- 'deliveryTime' | 'deliveryFee' | 'distance' | 'minimumOrder' | 'factLabels'
45
- >,
46
- messages: VendorCardMessages = VENDOR_CARD_MESSAGES.en,
47
- ): ListingFact[] {
48
- const values: Record<VendorFactKey, string | undefined> = {
49
- deliveryTime: props.deliveryTime,
50
- deliveryFee: props.deliveryFee,
51
- distance: props.distance,
52
- minimumOrder: props.minimumOrder,
53
- };
54
- const facts: ListingFact[] = [];
55
- for (const key of VENDOR_FACT_ORDER) {
56
- const value = values[key];
57
- if (!value) continue;
58
- const word = props.factLabels?.[key] ?? messages.facts[key];
59
- facts.push({
60
- icon: VENDOR_FACT_ICON[key],
61
- label: value,
62
- accessibilityLabel: `${word} ${value}`,
63
- });
64
- }
65
- return facts;
66
- }
67
-
68
- /** The cuisines actually drawn: the first few, de-duplicated, in the order given. */
69
- export function vendorCuisines(
70
- cuisines: ReadonlyArray<string> | undefined,
71
- density: VendorCardDensity,
72
- ): string[] {
73
- if (!cuisines) return [];
74
- return Array.from(new Set(cuisines.filter((c) => c !== ''))).slice(
75
- 0,
76
- VENDOR_CUISINE_LIMIT[density],
77
- );
78
- }
79
-
80
- /**
81
- * The whole card as one sentence, in the order it is read on screen. EVERY
82
- * cuisine is in it, including the ones the clipped row dropped — the row drops
83
- * pills because it ran out of width, which is not a reason to withhold them
84
- * from someone who is listening rather than looking.
85
- */
86
- export function composeVendorName(
87
- props: VendorCardProps,
88
- messages: VendorCardMessages = VENDOR_CARD_MESSAGES.en,
89
- ): string {
90
- const parts: string[] = [props.name];
91
- const status = availabilityLabelFor(props.availability, props.availabilityLabel, messages);
92
- if (status) parts.push(status);
93
- if (status && props.opensAt) parts.push(props.opensAt);
94
- if (props.promo) parts.push(props.promo);
95
- for (const cuisine of props.cuisines ?? []) if (cuisine !== '') parts.push(cuisine);
96
- if (props.rating !== undefined) {
97
- const rated = props.rating !== null && props.rating !== '';
98
- if (rated) {
99
- parts.push(
100
- messages.rated(formatRatingValue(props.rating as number | string), props.reviewCount),
101
- );
102
- } else {
103
- parts.push(props.newLabel ?? messages.new);
104
- }
105
- }
106
- for (const fact of vendorFacts(props, messages))
107
- parts.push(fact.accessibilityLabel ?? fact.label);
108
- return parts.join(', ');
109
- }
110
-
111
- // ---------------------------------------------------------------------------
112
- // Web CSS — the focus ring on the card's own link. `adoptStyleSheet` no-ops
113
- // without a document, so this is inert on native.
114
- //
115
- // The heart is `listing-card`'s `FavoriteButton`, and ITS rules live in
116
- // `LISTING_CARD_CSS`. The card adopts that sheet too (same id, so two cards on
117
- // one page adopt it once) rather than restating the two rules here: a copy
118
- // would be a second place for the ring colour to be wrong.
119
- // ---------------------------------------------------------------------------
120
-
121
- export const VENDOR_CARD_STYLE_ID = 'bloom-vendor-card-web-css';
122
-
123
- const LINK = '[data-bloom-vendor-card-link]';
124
-
125
- export const VENDOR_CARD_CSS = `
126
- ${LINK} {
127
- outline: none;
128
- text-decoration: none;
129
- color: inherit;
130
- }
131
- ${LINK}:focus-visible {
132
- outline: 2px solid var(--bloom-vendor-card-ring, currentColor);
133
- outline-offset: 4px;
134
- border-radius: ${PHOTO_RADIUS + 4}px;
135
- }
136
- `;
@@ -1,115 +0,0 @@
1
- import type { StyleProp, ViewStyle } from 'react-native';
2
-
3
- import type { AccentTone } from '../theme/accent-colors';
4
-
5
- /**
6
- * Whether you can order from this vendor right now.
7
- *
8
- * `open` draws nothing at all. `paused` is a vendor that is open but has
9
- * stopped taking orders for a while (a kitchen that is under water); `closed`
10
- * is outside its hours. Both wash the cover toward the page and draw a status
11
- * pill, because the difference the reader acts on is "not now", and the two
12
- * words are what say which kind of "not now" it is.
13
- */
14
- export type VendorAvailability = 'open' | 'paused' | 'closed';
15
-
16
- /**
17
- * `comfortable` is the wide card that sits in a shelf of vendors; `compact` is
18
- * the dense row a search result is drawn as. ONE component, because the DATA is
19
- * the same and a screen that switches at a breakpoint must not switch
20
- * components.
21
- */
22
- export type VendorCardDensity = 'comfortable' | 'compact';
23
-
24
- /**
25
- * The four readings a vendor card can carry, in the order it draws them. Each
26
- * arrives PRE-FORMATTED — "25–35 min", "€1.90", "Free", "1.2 km", "€12" — and
27
- * nothing here parses, converts or adds up any of them.
28
- */
29
- export type VendorFactKey = 'deliveryTime' | 'deliveryFee' | 'distance' | 'minimumOrder';
30
-
31
- export interface VendorCardProps {
32
- /** The vendor's name. One line, truncated. */
33
- name: string;
34
- /**
35
- * The cover: an absolute URL, or an id the app's `ImageResolver` turns into
36
- * one (resolved with `photoVariant`). One picture — a vendor is not a gallery.
37
- */
38
- photo?: string;
39
- /** The `ImageResolver` rendition for a photo id (e.g. `'medium'`). Ignored for URLs. */
40
- photoVariant?: string;
41
- /**
42
- * What the vendor cooks or sells — "Japanese", "Sushi", "Poke". Drawn as a
43
- * clipped row of pills under the name; the ones that do not fit drop out
44
- * whole rather than being cut in half, and the card's accessible name still
45
- * carries every one of them.
46
- */
47
- cuisines?: ReadonlyArray<string>;
48
- /**
49
- * The rating on a 5 scale, drawn by Bloom's `Rating` right of the name.
50
- * `undefined` draws nothing; `null` or `''` draws the "New" label.
51
- */
52
- rating?: number | string | null;
53
- /** The review count, drawn after the rating ("(128)"). */
54
- reviewCount?: number | string;
55
- /** The "New" label of an unrated vendor (`"New"` in English). */
56
- newLabel?: string;
57
- /** Pre-formatted — "25–35 min". */
58
- deliveryTime?: string;
59
- /** Pre-formatted — "€1.90", "Free". */
60
- deliveryFee?: string;
61
- /** Pre-formatted — "1.2 km". */
62
- distance?: string;
63
- /** Pre-formatted — "€12". */
64
- minimumOrder?: string;
65
- /**
66
- * The WORD said before each reading in the card's accessible name —
67
- * "Delivery time 25–35 min". Defaults follow the locale ("Delivery time",
68
- * "Delivery", "Distance", "Minimum order" in English); a bare "25–35 min" beside a glyph
69
- * means nothing read aloud, and the glyph is not announced.
70
- */
71
- factLabels?: Partial<Record<VendorFactKey, string>>;
72
- /** The promotion, pre-formatted and short — "2 for 1", "−20% today". */
73
- promo?: string;
74
- /** The promo mark's tone. Default `success`, the tone `price-breakdown` gives money coming back. */
75
- promoTone?: AccentTone;
76
- /** Default `open`. */
77
- availability?: VendorAvailability;
78
- /** Replaces the localised status label ("Paused", "Closed" in English). */
79
- availabilityLabel?: string;
80
- /**
81
- * When the vendor takes orders again, PRE-FORMATTED by the app — "Opens at
82
- * 19:00", "Opens tomorrow at 12:00". Drawn under the name while the vendor is
83
- * not open, and ignored while it is: a line that said when an open shop opens
84
- * is noise.
85
- */
86
- opensAt?: string;
87
- /** Whether the vendor is saved. Omit `onFavoriteChange` too to hide the heart. */
88
- favorite?: boolean;
89
- /** Called with the next saved state. The heart is drawn only when this is given. */
90
- onFavoriteChange?: (favorite: boolean) => void;
91
- /** Names of the heart, passed to `FavoriteButton`. */
92
- saveLabel?: string;
93
- removeLabel?: string;
94
- /** Called when the card is pressed. */
95
- onPress?: () => void;
96
- /**
97
- * The vendor's URL. On web the card is a real `<a href>` (open in a new tab,
98
- * copy link); with `onPress` too the default navigation is prevented so a
99
- * router can take it. On native the card opens it with `Linking` when there is
100
- * no `onPress`.
101
- */
102
- href?: string;
103
- /** Draws a skeleton in the same geometry instead of the vendor. */
104
- loading?: boolean;
105
- /** Default `comfortable`. */
106
- density?: VendorCardDensity;
107
- /**
108
- * Replaces the composed accessible name ("Fig & Ember, Closed, Japanese,
109
- * Sushi, Rated 4.8 out of 5, 214 reviews, Delivery time 25–35 min" in
110
- * English), which follows the locale.
111
- */
112
- accessibilityLabel?: string;
113
- style?: StyleProp<ViewStyle>;
114
- testID?: string;
115
- }