@bacon-pos/ui 0.1.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 (614) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +236 -0
  3. package/lib/commonjs/components/Avatar/Avatar.js +96 -0
  4. package/lib/commonjs/components/Avatar/Avatar.js.map +1 -0
  5. package/lib/commonjs/components/Avatar/Avatar.stories.js +87 -0
  6. package/lib/commonjs/components/Avatar/Avatar.stories.js.map +1 -0
  7. package/lib/commonjs/components/Avatar/Avatar.test.js +63 -0
  8. package/lib/commonjs/components/Avatar/Avatar.test.js.map +1 -0
  9. package/lib/commonjs/components/Avatar/index.js +13 -0
  10. package/lib/commonjs/components/Avatar/index.js.map +1 -0
  11. package/lib/commonjs/components/Button/Button.js +201 -0
  12. package/lib/commonjs/components/Button/Button.js.map +1 -0
  13. package/lib/commonjs/components/Button/Button.stories.js +139 -0
  14. package/lib/commonjs/components/Button/Button.stories.js.map +1 -0
  15. package/lib/commonjs/components/Button/Button.test.js +64 -0
  16. package/lib/commonjs/components/Button/Button.test.js.map +1 -0
  17. package/lib/commonjs/components/Button/index.js +13 -0
  18. package/lib/commonjs/components/Button/index.js.map +1 -0
  19. package/lib/commonjs/components/Card/Card.js +129 -0
  20. package/lib/commonjs/components/Card/Card.js.map +1 -0
  21. package/lib/commonjs/components/Card/Card.stories.js +87 -0
  22. package/lib/commonjs/components/Card/Card.stories.js.map +1 -0
  23. package/lib/commonjs/components/Card/Card.test.js +51 -0
  24. package/lib/commonjs/components/Card/Card.test.js.map +1 -0
  25. package/lib/commonjs/components/Card/index.js +13 -0
  26. package/lib/commonjs/components/Card/index.js.map +1 -0
  27. package/lib/commonjs/components/Checkbox/Checkbox.js +75 -0
  28. package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -0
  29. package/lib/commonjs/components/Checkbox/Checkbox.stories.js +69 -0
  30. package/lib/commonjs/components/Checkbox/Checkbox.stories.js.map +1 -0
  31. package/lib/commonjs/components/Checkbox/Checkbox.test.js +62 -0
  32. package/lib/commonjs/components/Checkbox/Checkbox.test.js.map +1 -0
  33. package/lib/commonjs/components/Checkbox/index.js +13 -0
  34. package/lib/commonjs/components/Checkbox/index.js.map +1 -0
  35. package/lib/commonjs/components/Chip/Chip.js +119 -0
  36. package/lib/commonjs/components/Chip/Chip.js.map +1 -0
  37. package/lib/commonjs/components/Chip/Chip.stories.js +112 -0
  38. package/lib/commonjs/components/Chip/Chip.stories.js.map +1 -0
  39. package/lib/commonjs/components/Chip/Chip.test.js +63 -0
  40. package/lib/commonjs/components/Chip/Chip.test.js.map +1 -0
  41. package/lib/commonjs/components/Chip/ChipGroup.js +54 -0
  42. package/lib/commonjs/components/Chip/ChipGroup.js.map +1 -0
  43. package/lib/commonjs/components/Chip/ChipGroup.stories.js +78 -0
  44. package/lib/commonjs/components/Chip/ChipGroup.stories.js.map +1 -0
  45. package/lib/commonjs/components/Chip/ChipGroup.test.js +70 -0
  46. package/lib/commonjs/components/Chip/ChipGroup.test.js.map +1 -0
  47. package/lib/commonjs/components/Chip/index.js +20 -0
  48. package/lib/commonjs/components/Chip/index.js.map +1 -0
  49. package/lib/commonjs/components/CodeInput/CodeInput.js +163 -0
  50. package/lib/commonjs/components/CodeInput/CodeInput.js.map +1 -0
  51. package/lib/commonjs/components/CodeInput/CodeInput.stories.js +98 -0
  52. package/lib/commonjs/components/CodeInput/CodeInput.stories.js.map +1 -0
  53. package/lib/commonjs/components/CodeInput/CodeInput.test.js +74 -0
  54. package/lib/commonjs/components/CodeInput/CodeInput.test.js.map +1 -0
  55. package/lib/commonjs/components/CodeInput/index.js +13 -0
  56. package/lib/commonjs/components/CodeInput/index.js.map +1 -0
  57. package/lib/commonjs/components/Icon/Icon.js +32 -0
  58. package/lib/commonjs/components/Icon/Icon.js.map +1 -0
  59. package/lib/commonjs/components/Icon/Icon.stories.js +94 -0
  60. package/lib/commonjs/components/Icon/Icon.stories.js.map +1 -0
  61. package/lib/commonjs/components/Icon/Icon.test.js +38 -0
  62. package/lib/commonjs/components/Icon/Icon.test.js.map +1 -0
  63. package/lib/commonjs/components/Icon/icons.generated.js +179 -0
  64. package/lib/commonjs/components/Icon/icons.generated.js.map +1 -0
  65. package/lib/commonjs/components/Icon/index.js +20 -0
  66. package/lib/commonjs/components/Icon/index.js.map +1 -0
  67. package/lib/commonjs/components/IconButton/IconButton.js +139 -0
  68. package/lib/commonjs/components/IconButton/IconButton.js.map +1 -0
  69. package/lib/commonjs/components/IconButton/IconButton.stories.js +119 -0
  70. package/lib/commonjs/components/IconButton/IconButton.stories.js.map +1 -0
  71. package/lib/commonjs/components/IconButton/IconButton.test.js +55 -0
  72. package/lib/commonjs/components/IconButton/IconButton.test.js.map +1 -0
  73. package/lib/commonjs/components/IconButton/index.js +13 -0
  74. package/lib/commonjs/components/IconButton/index.js.map +1 -0
  75. package/lib/commonjs/components/Input/Input.js +176 -0
  76. package/lib/commonjs/components/Input/Input.js.map +1 -0
  77. package/lib/commonjs/components/Input/Input.stories.js +116 -0
  78. package/lib/commonjs/components/Input/Input.stories.js.map +1 -0
  79. package/lib/commonjs/components/Input/Input.test.js +103 -0
  80. package/lib/commonjs/components/Input/Input.test.js.map +1 -0
  81. package/lib/commonjs/components/Input/index.js +13 -0
  82. package/lib/commonjs/components/Input/index.js.map +1 -0
  83. package/lib/commonjs/components/LinkButton/LinkButton.js +95 -0
  84. package/lib/commonjs/components/LinkButton/LinkButton.js.map +1 -0
  85. package/lib/commonjs/components/LinkButton/LinkButton.stories.js +91 -0
  86. package/lib/commonjs/components/LinkButton/LinkButton.stories.js.map +1 -0
  87. package/lib/commonjs/components/LinkButton/LinkButton.test.js +61 -0
  88. package/lib/commonjs/components/LinkButton/LinkButton.test.js.map +1 -0
  89. package/lib/commonjs/components/LinkButton/index.js +13 -0
  90. package/lib/commonjs/components/LinkButton/index.js.map +1 -0
  91. package/lib/commonjs/components/ProductCard/ProductCard.js +167 -0
  92. package/lib/commonjs/components/ProductCard/ProductCard.js.map +1 -0
  93. package/lib/commonjs/components/ProductCard/ProductCard.stories.js +118 -0
  94. package/lib/commonjs/components/ProductCard/ProductCard.stories.js.map +1 -0
  95. package/lib/commonjs/components/ProductCard/ProductCard.test.js +69 -0
  96. package/lib/commonjs/components/ProductCard/ProductCard.test.js.map +1 -0
  97. package/lib/commonjs/components/ProductCard/index.js +13 -0
  98. package/lib/commonjs/components/ProductCard/index.js.map +1 -0
  99. package/lib/commonjs/components/QuantityStepper/QuantityStepper.js +135 -0
  100. package/lib/commonjs/components/QuantityStepper/QuantityStepper.js.map +1 -0
  101. package/lib/commonjs/components/QuantityStepper/QuantityStepper.stories.js +90 -0
  102. package/lib/commonjs/components/QuantityStepper/QuantityStepper.stories.js.map +1 -0
  103. package/lib/commonjs/components/QuantityStepper/QuantityStepper.test.js +100 -0
  104. package/lib/commonjs/components/QuantityStepper/QuantityStepper.test.js.map +1 -0
  105. package/lib/commonjs/components/QuantityStepper/index.js +13 -0
  106. package/lib/commonjs/components/QuantityStepper/index.js.map +1 -0
  107. package/lib/commonjs/components/Radio/Radio.js +59 -0
  108. package/lib/commonjs/components/Radio/Radio.js.map +1 -0
  109. package/lib/commonjs/components/Radio/Radio.stories.js +60 -0
  110. package/lib/commonjs/components/Radio/Radio.stories.js.map +1 -0
  111. package/lib/commonjs/components/Radio/Radio.test.js +46 -0
  112. package/lib/commonjs/components/Radio/Radio.test.js.map +1 -0
  113. package/lib/commonjs/components/Radio/index.js +13 -0
  114. package/lib/commonjs/components/Radio/index.js.map +1 -0
  115. package/lib/commonjs/components/Surface/Surface.js +84 -0
  116. package/lib/commonjs/components/Surface/Surface.js.map +1 -0
  117. package/lib/commonjs/components/Surface/Surface.stories.js +97 -0
  118. package/lib/commonjs/components/Surface/Surface.stories.js.map +1 -0
  119. package/lib/commonjs/components/Surface/Surface.test.js +58 -0
  120. package/lib/commonjs/components/Surface/Surface.test.js.map +1 -0
  121. package/lib/commonjs/components/Surface/index.js +13 -0
  122. package/lib/commonjs/components/Surface/index.js.map +1 -0
  123. package/lib/commonjs/components/Switch/Switch.js +109 -0
  124. package/lib/commonjs/components/Switch/Switch.js.map +1 -0
  125. package/lib/commonjs/components/Switch/Switch.stories.js +89 -0
  126. package/lib/commonjs/components/Switch/Switch.stories.js.map +1 -0
  127. package/lib/commonjs/components/Switch/Switch.test.js +46 -0
  128. package/lib/commonjs/components/Switch/Switch.test.js.map +1 -0
  129. package/lib/commonjs/components/Switch/index.js +13 -0
  130. package/lib/commonjs/components/Switch/index.js.map +1 -0
  131. package/lib/commonjs/components/Text/Text.js +39 -0
  132. package/lib/commonjs/components/Text/Text.js.map +1 -0
  133. package/lib/commonjs/components/Text/Text.stories.js +47 -0
  134. package/lib/commonjs/components/Text/Text.stories.js.map +1 -0
  135. package/lib/commonjs/components/Text/index.js +13 -0
  136. package/lib/commonjs/components/Text/index.js.map +1 -0
  137. package/lib/commonjs/components/_internal/Labeled.js +50 -0
  138. package/lib/commonjs/components/_internal/Labeled.js.map +1 -0
  139. package/lib/commonjs/components/brand/Flag.js +45 -0
  140. package/lib/commonjs/components/brand/Flag.js.map +1 -0
  141. package/lib/commonjs/components/brand/Flag.stories.js +59 -0
  142. package/lib/commonjs/components/brand/Flag.stories.js.map +1 -0
  143. package/lib/commonjs/components/brand/Logo.js +30 -0
  144. package/lib/commonjs/components/brand/Logo.js.map +1 -0
  145. package/lib/commonjs/components/brand/Logo.stories.js +59 -0
  146. package/lib/commonjs/components/brand/Logo.stories.js.map +1 -0
  147. package/lib/commonjs/components/brand/brand.test.js +39 -0
  148. package/lib/commonjs/components/brand/brand.test.js.map +1 -0
  149. package/lib/commonjs/components/brand/generated/FlagBr.js +95 -0
  150. package/lib/commonjs/components/brand/generated/FlagBr.js.map +1 -0
  151. package/lib/commonjs/components/brand/generated/FlagUs.js +82 -0
  152. package/lib/commonjs/components/brand/generated/FlagUs.js.map +1 -0
  153. package/lib/commonjs/components/brand/generated/Mastercard.js +42 -0
  154. package/lib/commonjs/components/brand/generated/Mastercard.js.map +1 -0
  155. package/lib/commonjs/components/brand/generated/Visa.js +99 -0
  156. package/lib/commonjs/components/brand/generated/Visa.js.map +1 -0
  157. package/lib/commonjs/components/brand/index.js +27 -0
  158. package/lib/commonjs/components/brand/index.js.map +1 -0
  159. package/lib/commonjs/components/brand/registry.js +36 -0
  160. package/lib/commonjs/components/brand/registry.js.map +1 -0
  161. package/lib/commonjs/components/index.js +193 -0
  162. package/lib/commonjs/components/index.js.map +1 -0
  163. package/lib/commonjs/index.js +28 -0
  164. package/lib/commonjs/index.js.map +1 -0
  165. package/lib/commonjs/package.json +1 -0
  166. package/lib/commonjs/theme/ThemeProvider.js +52 -0
  167. package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
  168. package/lib/commonjs/theme/ThemeProvider.test.js +65 -0
  169. package/lib/commonjs/theme/ThemeProvider.test.js.map +1 -0
  170. package/lib/commonjs/theme/index.js +101 -0
  171. package/lib/commonjs/theme/index.js.map +1 -0
  172. package/lib/commonjs/theme/palette.js +94 -0
  173. package/lib/commonjs/theme/palette.js.map +1 -0
  174. package/lib/commonjs/theme/spacing.js +39 -0
  175. package/lib/commonjs/theme/spacing.js.map +1 -0
  176. package/lib/commonjs/theme/themes.js +171 -0
  177. package/lib/commonjs/theme/themes.js.map +1 -0
  178. package/lib/commonjs/theme/typography.js +65 -0
  179. package/lib/commonjs/theme/typography.js.map +1 -0
  180. package/lib/module/components/Avatar/Avatar.js +92 -0
  181. package/lib/module/components/Avatar/Avatar.js.map +1 -0
  182. package/lib/module/components/Avatar/Avatar.stories.js +83 -0
  183. package/lib/module/components/Avatar/Avatar.stories.js.map +1 -0
  184. package/lib/module/components/Avatar/Avatar.test.js +62 -0
  185. package/lib/module/components/Avatar/Avatar.test.js.map +1 -0
  186. package/lib/module/components/Avatar/index.js +4 -0
  187. package/lib/module/components/Avatar/index.js.map +1 -0
  188. package/lib/module/components/Button/Button.js +197 -0
  189. package/lib/module/components/Button/Button.js.map +1 -0
  190. package/lib/module/components/Button/Button.stories.js +135 -0
  191. package/lib/module/components/Button/Button.stories.js.map +1 -0
  192. package/lib/module/components/Button/Button.test.js +63 -0
  193. package/lib/module/components/Button/Button.test.js.map +1 -0
  194. package/lib/module/components/Button/index.js +4 -0
  195. package/lib/module/components/Button/index.js.map +1 -0
  196. package/lib/module/components/Card/Card.js +125 -0
  197. package/lib/module/components/Card/Card.js.map +1 -0
  198. package/lib/module/components/Card/Card.stories.js +83 -0
  199. package/lib/module/components/Card/Card.stories.js.map +1 -0
  200. package/lib/module/components/Card/Card.test.js +50 -0
  201. package/lib/module/components/Card/Card.test.js.map +1 -0
  202. package/lib/module/components/Card/index.js +4 -0
  203. package/lib/module/components/Card/index.js.map +1 -0
  204. package/lib/module/components/Checkbox/Checkbox.js +71 -0
  205. package/lib/module/components/Checkbox/Checkbox.js.map +1 -0
  206. package/lib/module/components/Checkbox/Checkbox.stories.js +65 -0
  207. package/lib/module/components/Checkbox/Checkbox.stories.js.map +1 -0
  208. package/lib/module/components/Checkbox/Checkbox.test.js +61 -0
  209. package/lib/module/components/Checkbox/Checkbox.test.js.map +1 -0
  210. package/lib/module/components/Checkbox/index.js +4 -0
  211. package/lib/module/components/Checkbox/index.js.map +1 -0
  212. package/lib/module/components/Chip/Chip.js +115 -0
  213. package/lib/module/components/Chip/Chip.js.map +1 -0
  214. package/lib/module/components/Chip/Chip.stories.js +108 -0
  215. package/lib/module/components/Chip/Chip.stories.js.map +1 -0
  216. package/lib/module/components/Chip/Chip.test.js +62 -0
  217. package/lib/module/components/Chip/Chip.test.js.map +1 -0
  218. package/lib/module/components/Chip/ChipGroup.js +50 -0
  219. package/lib/module/components/Chip/ChipGroup.js.map +1 -0
  220. package/lib/module/components/Chip/ChipGroup.stories.js +74 -0
  221. package/lib/module/components/Chip/ChipGroup.stories.js.map +1 -0
  222. package/lib/module/components/Chip/ChipGroup.test.js +69 -0
  223. package/lib/module/components/Chip/ChipGroup.test.js.map +1 -0
  224. package/lib/module/components/Chip/index.js +5 -0
  225. package/lib/module/components/Chip/index.js.map +1 -0
  226. package/lib/module/components/CodeInput/CodeInput.js +161 -0
  227. package/lib/module/components/CodeInput/CodeInput.js.map +1 -0
  228. package/lib/module/components/CodeInput/CodeInput.stories.js +94 -0
  229. package/lib/module/components/CodeInput/CodeInput.stories.js.map +1 -0
  230. package/lib/module/components/CodeInput/CodeInput.test.js +73 -0
  231. package/lib/module/components/CodeInput/CodeInput.test.js.map +1 -0
  232. package/lib/module/components/CodeInput/index.js +4 -0
  233. package/lib/module/components/CodeInput/index.js.map +1 -0
  234. package/lib/module/components/Icon/Icon.js +28 -0
  235. package/lib/module/components/Icon/Icon.js.map +1 -0
  236. package/lib/module/components/Icon/Icon.stories.js +90 -0
  237. package/lib/module/components/Icon/Icon.stories.js.map +1 -0
  238. package/lib/module/components/Icon/Icon.test.js +37 -0
  239. package/lib/module/components/Icon/Icon.test.js.map +1 -0
  240. package/lib/module/components/Icon/icons.generated.js +175 -0
  241. package/lib/module/components/Icon/icons.generated.js.map +1 -0
  242. package/lib/module/components/Icon/index.js +5 -0
  243. package/lib/module/components/Icon/index.js.map +1 -0
  244. package/lib/module/components/IconButton/IconButton.js +135 -0
  245. package/lib/module/components/IconButton/IconButton.js.map +1 -0
  246. package/lib/module/components/IconButton/IconButton.stories.js +115 -0
  247. package/lib/module/components/IconButton/IconButton.stories.js.map +1 -0
  248. package/lib/module/components/IconButton/IconButton.test.js +54 -0
  249. package/lib/module/components/IconButton/IconButton.test.js.map +1 -0
  250. package/lib/module/components/IconButton/index.js +4 -0
  251. package/lib/module/components/IconButton/index.js.map +1 -0
  252. package/lib/module/components/Input/Input.js +174 -0
  253. package/lib/module/components/Input/Input.js.map +1 -0
  254. package/lib/module/components/Input/Input.stories.js +112 -0
  255. package/lib/module/components/Input/Input.stories.js.map +1 -0
  256. package/lib/module/components/Input/Input.test.js +103 -0
  257. package/lib/module/components/Input/Input.test.js.map +1 -0
  258. package/lib/module/components/Input/index.js +4 -0
  259. package/lib/module/components/Input/index.js.map +1 -0
  260. package/lib/module/components/LinkButton/LinkButton.js +91 -0
  261. package/lib/module/components/LinkButton/LinkButton.js.map +1 -0
  262. package/lib/module/components/LinkButton/LinkButton.stories.js +87 -0
  263. package/lib/module/components/LinkButton/LinkButton.stories.js.map +1 -0
  264. package/lib/module/components/LinkButton/LinkButton.test.js +60 -0
  265. package/lib/module/components/LinkButton/LinkButton.test.js.map +1 -0
  266. package/lib/module/components/LinkButton/index.js +4 -0
  267. package/lib/module/components/LinkButton/index.js.map +1 -0
  268. package/lib/module/components/ProductCard/ProductCard.js +163 -0
  269. package/lib/module/components/ProductCard/ProductCard.js.map +1 -0
  270. package/lib/module/components/ProductCard/ProductCard.stories.js +114 -0
  271. package/lib/module/components/ProductCard/ProductCard.stories.js.map +1 -0
  272. package/lib/module/components/ProductCard/ProductCard.test.js +68 -0
  273. package/lib/module/components/ProductCard/ProductCard.test.js.map +1 -0
  274. package/lib/module/components/ProductCard/index.js +4 -0
  275. package/lib/module/components/ProductCard/index.js.map +1 -0
  276. package/lib/module/components/QuantityStepper/QuantityStepper.js +131 -0
  277. package/lib/module/components/QuantityStepper/QuantityStepper.js.map +1 -0
  278. package/lib/module/components/QuantityStepper/QuantityStepper.stories.js +86 -0
  279. package/lib/module/components/QuantityStepper/QuantityStepper.stories.js.map +1 -0
  280. package/lib/module/components/QuantityStepper/QuantityStepper.test.js +99 -0
  281. package/lib/module/components/QuantityStepper/QuantityStepper.test.js.map +1 -0
  282. package/lib/module/components/QuantityStepper/index.js +4 -0
  283. package/lib/module/components/QuantityStepper/index.js.map +1 -0
  284. package/lib/module/components/Radio/Radio.js +55 -0
  285. package/lib/module/components/Radio/Radio.js.map +1 -0
  286. package/lib/module/components/Radio/Radio.stories.js +56 -0
  287. package/lib/module/components/Radio/Radio.stories.js.map +1 -0
  288. package/lib/module/components/Radio/Radio.test.js +45 -0
  289. package/lib/module/components/Radio/Radio.test.js.map +1 -0
  290. package/lib/module/components/Radio/index.js +4 -0
  291. package/lib/module/components/Radio/index.js.map +1 -0
  292. package/lib/module/components/Surface/Surface.js +80 -0
  293. package/lib/module/components/Surface/Surface.js.map +1 -0
  294. package/lib/module/components/Surface/Surface.stories.js +93 -0
  295. package/lib/module/components/Surface/Surface.stories.js.map +1 -0
  296. package/lib/module/components/Surface/Surface.test.js +57 -0
  297. package/lib/module/components/Surface/Surface.test.js.map +1 -0
  298. package/lib/module/components/Surface/index.js +4 -0
  299. package/lib/module/components/Surface/index.js.map +1 -0
  300. package/lib/module/components/Switch/Switch.js +105 -0
  301. package/lib/module/components/Switch/Switch.js.map +1 -0
  302. package/lib/module/components/Switch/Switch.stories.js +85 -0
  303. package/lib/module/components/Switch/Switch.stories.js.map +1 -0
  304. package/lib/module/components/Switch/Switch.test.js +45 -0
  305. package/lib/module/components/Switch/Switch.test.js.map +1 -0
  306. package/lib/module/components/Switch/index.js +4 -0
  307. package/lib/module/components/Switch/index.js.map +1 -0
  308. package/lib/module/components/Text/Text.js +35 -0
  309. package/lib/module/components/Text/Text.js.map +1 -0
  310. package/lib/module/components/Text/Text.stories.js +43 -0
  311. package/lib/module/components/Text/Text.stories.js.map +1 -0
  312. package/lib/module/components/Text/index.js +4 -0
  313. package/lib/module/components/Text/index.js.map +1 -0
  314. package/lib/module/components/_internal/Labeled.js +46 -0
  315. package/lib/module/components/_internal/Labeled.js.map +1 -0
  316. package/lib/module/components/brand/Flag.js +41 -0
  317. package/lib/module/components/brand/Flag.js.map +1 -0
  318. package/lib/module/components/brand/Flag.stories.js +55 -0
  319. package/lib/module/components/brand/Flag.stories.js.map +1 -0
  320. package/lib/module/components/brand/Logo.js +26 -0
  321. package/lib/module/components/brand/Logo.js.map +1 -0
  322. package/lib/module/components/brand/Logo.stories.js +55 -0
  323. package/lib/module/components/brand/Logo.stories.js.map +1 -0
  324. package/lib/module/components/brand/brand.test.js +38 -0
  325. package/lib/module/components/brand/brand.test.js.map +1 -0
  326. package/lib/module/components/brand/generated/FlagBr.js +90 -0
  327. package/lib/module/components/brand/generated/FlagBr.js.map +1 -0
  328. package/lib/module/components/brand/generated/FlagUs.js +76 -0
  329. package/lib/module/components/brand/generated/FlagUs.js.map +1 -0
  330. package/lib/module/components/brand/generated/Mastercard.js +37 -0
  331. package/lib/module/components/brand/generated/Mastercard.js.map +1 -0
  332. package/lib/module/components/brand/generated/Visa.js +94 -0
  333. package/lib/module/components/brand/generated/Visa.js.map +1 -0
  334. package/lib/module/components/brand/index.js +6 -0
  335. package/lib/module/components/brand/index.js.map +1 -0
  336. package/lib/module/components/brand/registry.js +31 -0
  337. package/lib/module/components/brand/registry.js.map +1 -0
  338. package/lib/module/components/index.js +20 -0
  339. package/lib/module/components/index.js.map +1 -0
  340. package/lib/module/index.js +10 -0
  341. package/lib/module/index.js.map +1 -0
  342. package/lib/module/package.json +1 -0
  343. package/lib/module/theme/ThemeProvider.js +46 -0
  344. package/lib/module/theme/ThemeProvider.js.map +1 -0
  345. package/lib/module/theme/ThemeProvider.test.js +64 -0
  346. package/lib/module/theme/ThemeProvider.test.js.map +1 -0
  347. package/lib/module/theme/index.js +8 -0
  348. package/lib/module/theme/index.js.map +1 -0
  349. package/lib/module/theme/palette.js +90 -0
  350. package/lib/module/theme/palette.js.map +1 -0
  351. package/lib/module/theme/spacing.js +34 -0
  352. package/lib/module/theme/spacing.js.map +1 -0
  353. package/lib/module/theme/themes.js +166 -0
  354. package/lib/module/theme/themes.js.map +1 -0
  355. package/lib/module/theme/typography.js +61 -0
  356. package/lib/module/theme/typography.js.map +1 -0
  357. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +31 -0
  358. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/components/Avatar/index.d.ts +2 -0
  360. package/lib/typescript/commonjs/components/Avatar/index.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/components/Button/Button.d.ts +40 -0
  362. package/lib/typescript/commonjs/components/Button/Button.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/components/Button/index.d.ts +2 -0
  364. package/lib/typescript/commonjs/components/Button/index.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/components/Card/Card.d.ts +32 -0
  366. package/lib/typescript/commonjs/components/Card/Card.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/components/Card/index.d.ts +2 -0
  368. package/lib/typescript/commonjs/components/Card/index.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +25 -0
  370. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/components/Checkbox/index.d.ts +2 -0
  372. package/lib/typescript/commonjs/components/Checkbox/index.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +40 -0
  374. package/lib/typescript/commonjs/components/Chip/Chip.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/components/Chip/ChipGroup.d.ts +49 -0
  376. package/lib/typescript/commonjs/components/Chip/ChipGroup.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/components/Chip/index.d.ts +3 -0
  378. package/lib/typescript/commonjs/components/Chip/index.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/components/CodeInput/CodeInput.d.ts +41 -0
  380. package/lib/typescript/commonjs/components/CodeInput/CodeInput.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/components/CodeInput/index.d.ts +2 -0
  382. package/lib/typescript/commonjs/components/CodeInput/index.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/components/Icon/Icon.d.ts +19 -0
  384. package/lib/typescript/commonjs/components/Icon/Icon.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/components/Icon/icons.generated.d.ts +171 -0
  386. package/lib/typescript/commonjs/components/Icon/icons.generated.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/components/Icon/index.d.ts +3 -0
  388. package/lib/typescript/commonjs/components/Icon/index.d.ts.map +1 -0
  389. package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +34 -0
  390. package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts.map +1 -0
  391. package/lib/typescript/commonjs/components/IconButton/index.d.ts +2 -0
  392. package/lib/typescript/commonjs/components/IconButton/index.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/components/Input/Input.d.ts +38 -0
  394. package/lib/typescript/commonjs/components/Input/Input.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/components/Input/index.d.ts +2 -0
  396. package/lib/typescript/commonjs/components/Input/index.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/components/LinkButton/LinkButton.d.ts +31 -0
  398. package/lib/typescript/commonjs/components/LinkButton/LinkButton.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/components/LinkButton/index.d.ts +2 -0
  400. package/lib/typescript/commonjs/components/LinkButton/index.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/components/ProductCard/ProductCard.d.ts +31 -0
  402. package/lib/typescript/commonjs/components/ProductCard/ProductCard.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/components/ProductCard/index.d.ts +2 -0
  404. package/lib/typescript/commonjs/components/ProductCard/index.d.ts.map +1 -0
  405. package/lib/typescript/commonjs/components/QuantityStepper/QuantityStepper.d.ts +36 -0
  406. package/lib/typescript/commonjs/components/QuantityStepper/QuantityStepper.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/components/QuantityStepper/index.d.ts +2 -0
  408. package/lib/typescript/commonjs/components/QuantityStepper/index.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +23 -0
  410. package/lib/typescript/commonjs/components/Radio/Radio.d.ts.map +1 -0
  411. package/lib/typescript/commonjs/components/Radio/index.d.ts +2 -0
  412. package/lib/typescript/commonjs/components/Radio/index.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/components/Surface/Surface.d.ts +31 -0
  414. package/lib/typescript/commonjs/components/Surface/Surface.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/components/Surface/index.d.ts +2 -0
  416. package/lib/typescript/commonjs/components/Surface/index.d.ts.map +1 -0
  417. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +26 -0
  418. package/lib/typescript/commonjs/components/Switch/Switch.d.ts.map +1 -0
  419. package/lib/typescript/commonjs/components/Switch/index.d.ts +2 -0
  420. package/lib/typescript/commonjs/components/Switch/index.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/components/Text/Text.d.ts +21 -0
  422. package/lib/typescript/commonjs/components/Text/Text.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/components/Text/index.d.ts +2 -0
  424. package/lib/typescript/commonjs/components/Text/index.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/components/_internal/Labeled.d.ts +27 -0
  426. package/lib/typescript/commonjs/components/_internal/Labeled.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/components/brand/Flag.d.ts +14 -0
  428. package/lib/typescript/commonjs/components/brand/Flag.d.ts.map +1 -0
  429. package/lib/typescript/commonjs/components/brand/Logo.d.ts +15 -0
  430. package/lib/typescript/commonjs/components/brand/Logo.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/components/brand/generated/FlagBr.d.ts +4 -0
  432. package/lib/typescript/commonjs/components/brand/generated/FlagBr.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/components/brand/generated/FlagUs.d.ts +4 -0
  434. package/lib/typescript/commonjs/components/brand/generated/FlagUs.d.ts.map +1 -0
  435. package/lib/typescript/commonjs/components/brand/generated/Mastercard.d.ts +4 -0
  436. package/lib/typescript/commonjs/components/brand/generated/Mastercard.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/components/brand/generated/Visa.d.ts +4 -0
  438. package/lib/typescript/commonjs/components/brand/generated/Visa.d.ts.map +1 -0
  439. package/lib/typescript/commonjs/components/brand/index.d.ts +4 -0
  440. package/lib/typescript/commonjs/components/brand/index.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/components/brand/registry.d.ts +33 -0
  442. package/lib/typescript/commonjs/components/brand/registry.d.ts.map +1 -0
  443. package/lib/typescript/commonjs/components/index.d.ts +19 -0
  444. package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/index.d.ts +8 -0
  446. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  447. package/lib/typescript/commonjs/package.json +1 -0
  448. package/lib/typescript/commonjs/theme/ThemeProvider.d.ts +29 -0
  449. package/lib/typescript/commonjs/theme/ThemeProvider.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/theme/index.d.ts +6 -0
  451. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/theme/palette.d.ts +89 -0
  453. package/lib/typescript/commonjs/theme/palette.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/theme/spacing.d.ts +34 -0
  455. package/lib/typescript/commonjs/theme/spacing.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/theme/themes.d.ts +93 -0
  457. package/lib/typescript/commonjs/theme/themes.d.ts.map +1 -0
  458. package/lib/typescript/commonjs/theme/typography.d.ts +60 -0
  459. package/lib/typescript/commonjs/theme/typography.d.ts.map +1 -0
  460. package/lib/typescript/module/components/Avatar/Avatar.d.ts +31 -0
  461. package/lib/typescript/module/components/Avatar/Avatar.d.ts.map +1 -0
  462. package/lib/typescript/module/components/Avatar/index.d.ts +2 -0
  463. package/lib/typescript/module/components/Avatar/index.d.ts.map +1 -0
  464. package/lib/typescript/module/components/Button/Button.d.ts +40 -0
  465. package/lib/typescript/module/components/Button/Button.d.ts.map +1 -0
  466. package/lib/typescript/module/components/Button/index.d.ts +2 -0
  467. package/lib/typescript/module/components/Button/index.d.ts.map +1 -0
  468. package/lib/typescript/module/components/Card/Card.d.ts +32 -0
  469. package/lib/typescript/module/components/Card/Card.d.ts.map +1 -0
  470. package/lib/typescript/module/components/Card/index.d.ts +2 -0
  471. package/lib/typescript/module/components/Card/index.d.ts.map +1 -0
  472. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +25 -0
  473. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts.map +1 -0
  474. package/lib/typescript/module/components/Checkbox/index.d.ts +2 -0
  475. package/lib/typescript/module/components/Checkbox/index.d.ts.map +1 -0
  476. package/lib/typescript/module/components/Chip/Chip.d.ts +40 -0
  477. package/lib/typescript/module/components/Chip/Chip.d.ts.map +1 -0
  478. package/lib/typescript/module/components/Chip/ChipGroup.d.ts +49 -0
  479. package/lib/typescript/module/components/Chip/ChipGroup.d.ts.map +1 -0
  480. package/lib/typescript/module/components/Chip/index.d.ts +3 -0
  481. package/lib/typescript/module/components/Chip/index.d.ts.map +1 -0
  482. package/lib/typescript/module/components/CodeInput/CodeInput.d.ts +41 -0
  483. package/lib/typescript/module/components/CodeInput/CodeInput.d.ts.map +1 -0
  484. package/lib/typescript/module/components/CodeInput/index.d.ts +2 -0
  485. package/lib/typescript/module/components/CodeInput/index.d.ts.map +1 -0
  486. package/lib/typescript/module/components/Icon/Icon.d.ts +19 -0
  487. package/lib/typescript/module/components/Icon/Icon.d.ts.map +1 -0
  488. package/lib/typescript/module/components/Icon/icons.generated.d.ts +171 -0
  489. package/lib/typescript/module/components/Icon/icons.generated.d.ts.map +1 -0
  490. package/lib/typescript/module/components/Icon/index.d.ts +3 -0
  491. package/lib/typescript/module/components/Icon/index.d.ts.map +1 -0
  492. package/lib/typescript/module/components/IconButton/IconButton.d.ts +34 -0
  493. package/lib/typescript/module/components/IconButton/IconButton.d.ts.map +1 -0
  494. package/lib/typescript/module/components/IconButton/index.d.ts +2 -0
  495. package/lib/typescript/module/components/IconButton/index.d.ts.map +1 -0
  496. package/lib/typescript/module/components/Input/Input.d.ts +38 -0
  497. package/lib/typescript/module/components/Input/Input.d.ts.map +1 -0
  498. package/lib/typescript/module/components/Input/index.d.ts +2 -0
  499. package/lib/typescript/module/components/Input/index.d.ts.map +1 -0
  500. package/lib/typescript/module/components/LinkButton/LinkButton.d.ts +31 -0
  501. package/lib/typescript/module/components/LinkButton/LinkButton.d.ts.map +1 -0
  502. package/lib/typescript/module/components/LinkButton/index.d.ts +2 -0
  503. package/lib/typescript/module/components/LinkButton/index.d.ts.map +1 -0
  504. package/lib/typescript/module/components/ProductCard/ProductCard.d.ts +31 -0
  505. package/lib/typescript/module/components/ProductCard/ProductCard.d.ts.map +1 -0
  506. package/lib/typescript/module/components/ProductCard/index.d.ts +2 -0
  507. package/lib/typescript/module/components/ProductCard/index.d.ts.map +1 -0
  508. package/lib/typescript/module/components/QuantityStepper/QuantityStepper.d.ts +36 -0
  509. package/lib/typescript/module/components/QuantityStepper/QuantityStepper.d.ts.map +1 -0
  510. package/lib/typescript/module/components/QuantityStepper/index.d.ts +2 -0
  511. package/lib/typescript/module/components/QuantityStepper/index.d.ts.map +1 -0
  512. package/lib/typescript/module/components/Radio/Radio.d.ts +23 -0
  513. package/lib/typescript/module/components/Radio/Radio.d.ts.map +1 -0
  514. package/lib/typescript/module/components/Radio/index.d.ts +2 -0
  515. package/lib/typescript/module/components/Radio/index.d.ts.map +1 -0
  516. package/lib/typescript/module/components/Surface/Surface.d.ts +31 -0
  517. package/lib/typescript/module/components/Surface/Surface.d.ts.map +1 -0
  518. package/lib/typescript/module/components/Surface/index.d.ts +2 -0
  519. package/lib/typescript/module/components/Surface/index.d.ts.map +1 -0
  520. package/lib/typescript/module/components/Switch/Switch.d.ts +26 -0
  521. package/lib/typescript/module/components/Switch/Switch.d.ts.map +1 -0
  522. package/lib/typescript/module/components/Switch/index.d.ts +2 -0
  523. package/lib/typescript/module/components/Switch/index.d.ts.map +1 -0
  524. package/lib/typescript/module/components/Text/Text.d.ts +21 -0
  525. package/lib/typescript/module/components/Text/Text.d.ts.map +1 -0
  526. package/lib/typescript/module/components/Text/index.d.ts +2 -0
  527. package/lib/typescript/module/components/Text/index.d.ts.map +1 -0
  528. package/lib/typescript/module/components/_internal/Labeled.d.ts +27 -0
  529. package/lib/typescript/module/components/_internal/Labeled.d.ts.map +1 -0
  530. package/lib/typescript/module/components/brand/Flag.d.ts +14 -0
  531. package/lib/typescript/module/components/brand/Flag.d.ts.map +1 -0
  532. package/lib/typescript/module/components/brand/Logo.d.ts +15 -0
  533. package/lib/typescript/module/components/brand/Logo.d.ts.map +1 -0
  534. package/lib/typescript/module/components/brand/generated/FlagBr.d.ts +4 -0
  535. package/lib/typescript/module/components/brand/generated/FlagBr.d.ts.map +1 -0
  536. package/lib/typescript/module/components/brand/generated/FlagUs.d.ts +4 -0
  537. package/lib/typescript/module/components/brand/generated/FlagUs.d.ts.map +1 -0
  538. package/lib/typescript/module/components/brand/generated/Mastercard.d.ts +4 -0
  539. package/lib/typescript/module/components/brand/generated/Mastercard.d.ts.map +1 -0
  540. package/lib/typescript/module/components/brand/generated/Visa.d.ts +4 -0
  541. package/lib/typescript/module/components/brand/generated/Visa.d.ts.map +1 -0
  542. package/lib/typescript/module/components/brand/index.d.ts +4 -0
  543. package/lib/typescript/module/components/brand/index.d.ts.map +1 -0
  544. package/lib/typescript/module/components/brand/registry.d.ts +33 -0
  545. package/lib/typescript/module/components/brand/registry.d.ts.map +1 -0
  546. package/lib/typescript/module/components/index.d.ts +19 -0
  547. package/lib/typescript/module/components/index.d.ts.map +1 -0
  548. package/lib/typescript/module/index.d.ts +8 -0
  549. package/lib/typescript/module/index.d.ts.map +1 -0
  550. package/lib/typescript/module/package.json +1 -0
  551. package/lib/typescript/module/theme/ThemeProvider.d.ts +29 -0
  552. package/lib/typescript/module/theme/ThemeProvider.d.ts.map +1 -0
  553. package/lib/typescript/module/theme/index.d.ts +6 -0
  554. package/lib/typescript/module/theme/index.d.ts.map +1 -0
  555. package/lib/typescript/module/theme/palette.d.ts +89 -0
  556. package/lib/typescript/module/theme/palette.d.ts.map +1 -0
  557. package/lib/typescript/module/theme/spacing.d.ts +34 -0
  558. package/lib/typescript/module/theme/spacing.d.ts.map +1 -0
  559. package/lib/typescript/module/theme/themes.d.ts +93 -0
  560. package/lib/typescript/module/theme/themes.d.ts.map +1 -0
  561. package/lib/typescript/module/theme/typography.d.ts +60 -0
  562. package/lib/typescript/module/theme/typography.d.ts.map +1 -0
  563. package/package.json +116 -0
  564. package/src/components/Avatar/Avatar.tsx +111 -0
  565. package/src/components/Avatar/index.ts +1 -0
  566. package/src/components/Button/Button.tsx +216 -0
  567. package/src/components/Button/index.ts +6 -0
  568. package/src/components/Card/Card.tsx +145 -0
  569. package/src/components/Card/index.ts +1 -0
  570. package/src/components/Checkbox/Checkbox.tsx +86 -0
  571. package/src/components/Checkbox/index.ts +1 -0
  572. package/src/components/Chip/Chip.tsx +126 -0
  573. package/src/components/Chip/ChipGroup.tsx +88 -0
  574. package/src/components/Chip/index.ts +2 -0
  575. package/src/components/CodeInput/CodeInput.tsx +200 -0
  576. package/src/components/CodeInput/index.ts +1 -0
  577. package/src/components/Icon/Icon.tsx +32 -0
  578. package/src/components/Icon/icons.generated.ts +174 -0
  579. package/src/components/Icon/index.ts +2 -0
  580. package/src/components/IconButton/IconButton.tsx +156 -0
  581. package/src/components/IconButton/index.ts +7 -0
  582. package/src/components/Input/Input.tsx +230 -0
  583. package/src/components/Input/index.ts +1 -0
  584. package/src/components/LinkButton/LinkButton.tsx +118 -0
  585. package/src/components/LinkButton/index.ts +6 -0
  586. package/src/components/ProductCard/ProductCard.tsx +176 -0
  587. package/src/components/ProductCard/index.ts +1 -0
  588. package/src/components/QuantityStepper/QuantityStepper.tsx +162 -0
  589. package/src/components/QuantityStepper/index.ts +5 -0
  590. package/src/components/Radio/Radio.tsx +76 -0
  591. package/src/components/Radio/index.ts +1 -0
  592. package/src/components/Surface/Surface.tsx +99 -0
  593. package/src/components/Surface/index.ts +6 -0
  594. package/src/components/Switch/Switch.tsx +110 -0
  595. package/src/components/Switch/index.ts +1 -0
  596. package/src/components/Text/Text.tsx +51 -0
  597. package/src/components/Text/index.ts +1 -0
  598. package/src/components/_internal/Labeled.tsx +72 -0
  599. package/src/components/brand/Flag.tsx +41 -0
  600. package/src/components/brand/Logo.tsx +23 -0
  601. package/src/components/brand/generated/FlagBr.tsx +8 -0
  602. package/src/components/brand/generated/FlagUs.tsx +7 -0
  603. package/src/components/brand/generated/Mastercard.tsx +4 -0
  604. package/src/components/brand/generated/Visa.tsx +4 -0
  605. package/src/components/brand/index.ts +3 -0
  606. package/src/components/brand/registry.ts +27 -0
  607. package/src/components/index.ts +19 -0
  608. package/src/index.tsx +7 -0
  609. package/src/theme/ThemeProvider.tsx +66 -0
  610. package/src/theme/index.ts +31 -0
  611. package/src/theme/palette.ts +89 -0
  612. package/src/theme/spacing.ts +37 -0
  613. package/src/theme/themes.ts +248 -0
  614. package/src/theme/typography.ts +37 -0
@@ -0,0 +1,2 @@
1
+ export { Icon, type IconProps } from './Icon';
2
+ export { icons, type IconName } from './icons.generated';
@@ -0,0 +1,156 @@
1
+ import { useMemo } from 'react';
2
+ import {
3
+ ActivityIndicator,
4
+ Pressable,
5
+ type PressableProps,
6
+ type PressableStateCallbackType,
7
+ type StyleProp,
8
+ type ViewStyle,
9
+ } from 'react-native';
10
+ import { useTheme, type Theme } from '../../theme';
11
+ import { Icon } from '../Icon/Icon';
12
+ import type { IconName } from '../Icon/icons.generated';
13
+
14
+ /** Icon-only button styles — 1:1 with the Figma "Icon button" style variants. */
15
+ export type IconButtonVariant =
16
+ | 'default'
17
+ | 'secondary'
18
+ | 'inverse'
19
+ | 'destructive'
20
+ | 'ghost';
21
+
22
+ export type IconButtonSize = 'sm' | 'md' | 'lg';
23
+
24
+ /** `round` = circle (default), `square` = 16px corner radius. */
25
+ export type IconButtonShape = 'round' | 'square';
26
+
27
+ export interface IconButtonProps extends Omit<PressableProps, 'style' | 'children'> {
28
+ /** Icon name from the generated registry. */
29
+ icon: IconName;
30
+ /**
31
+ * Describes the action for screen readers — required since there is no visible
32
+ * label (e.g. "Delete item").
33
+ */
34
+ accessibilityLabel: string;
35
+ /** Visual style. Defaults to `default` (the lime accent action). */
36
+ variant?: IconButtonVariant;
37
+ /** Container size: `sm` = 40, `md` = 48, `lg` = 58. Defaults to `md`. */
38
+ size?: IconButtonSize;
39
+ /** Corner style. Defaults to `round` (circle). */
40
+ shape?: IconButtonShape;
41
+ /** Show a spinner and block presses. */
42
+ loading?: boolean;
43
+ /** Disable interaction and apply disabled tokens. */
44
+ disabled?: boolean;
45
+ /** Override the container style. */
46
+ style?: StyleProp<ViewStyle>;
47
+ }
48
+
49
+ const SIZES: Record<IconButtonSize, { box: number; iconSize: number }> = {
50
+ sm: { box: 40, iconSize: 20 },
51
+ md: { box: 48, iconSize: 24 },
52
+ lg: { box: 58, iconSize: 24 },
53
+ };
54
+
55
+ interface VariantColors {
56
+ backgroundColor: string;
57
+ iconColor: string;
58
+ borderColor: string;
59
+ borderWidth: number;
60
+ }
61
+
62
+ function getVariantColors(theme: Theme, variant: IconButtonVariant): VariantColors {
63
+ const { action, state, border, text } = theme.colors;
64
+ const noBorder = { borderColor: 'transparent', borderWidth: 0 };
65
+ switch (variant) {
66
+ case 'secondary':
67
+ return {
68
+ backgroundColor: action.secondary,
69
+ iconColor: action.secondaryForeground,
70
+ borderColor: border.default,
71
+ borderWidth: 1,
72
+ };
73
+ case 'inverse':
74
+ return { backgroundColor: action.inverse, iconColor: action.inverseForeground, ...noBorder };
75
+ case 'destructive':
76
+ return {
77
+ backgroundColor: state.destructiveSubtle,
78
+ iconColor: state.destructiveSubtleForeground,
79
+ ...noBorder,
80
+ };
81
+ case 'ghost':
82
+ return { backgroundColor: 'transparent', iconColor: text.primary, ...noBorder };
83
+ case 'default':
84
+ default:
85
+ return { backgroundColor: action.primary, iconColor: action.primaryForeground, ...noBorder };
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Icon-only button — faithful to the Bacon POS Figma "Icon button" frames.
91
+ * Circular or square, token-driven colors and states.
92
+ */
93
+ export function IconButton({
94
+ icon,
95
+ accessibilityLabel,
96
+ variant = 'default',
97
+ size = 'md',
98
+ shape = 'round',
99
+ loading = false,
100
+ disabled = false,
101
+ style,
102
+ ...rest
103
+ }: IconButtonProps) {
104
+ const theme = useTheme();
105
+ const sizeConfig = SIZES[size];
106
+ const isDisabled = disabled || loading;
107
+
108
+ const colors = useMemo<VariantColors>(() => {
109
+ const variantColors = getVariantColors(theme, variant);
110
+ if (!isDisabled) return variantColors;
111
+ return {
112
+ backgroundColor: variant === 'ghost' ? 'transparent' : theme.colors.disabled.background,
113
+ iconColor: theme.colors.disabled.foreground,
114
+ borderColor: variantColors.borderWidth > 0 ? theme.colors.disabled.border : 'transparent',
115
+ borderWidth: variantColors.borderWidth,
116
+ };
117
+ }, [theme, variant, isDisabled]);
118
+
119
+ const borderRadius = shape === 'square' ? theme.radii.xl : theme.radii.pill;
120
+
121
+ const containerStyle = useMemo(
122
+ () =>
123
+ ({ pressed }: PressableStateCallbackType): StyleProp<ViewStyle> => [
124
+ {
125
+ width: sizeConfig.box,
126
+ height: sizeConfig.box,
127
+ borderRadius,
128
+ borderWidth: colors.borderWidth,
129
+ borderColor: colors.borderColor,
130
+ backgroundColor: colors.backgroundColor,
131
+ alignItems: 'center',
132
+ justifyContent: 'center',
133
+ opacity: pressed && !isDisabled ? 0.9 : 1,
134
+ } satisfies ViewStyle,
135
+ style,
136
+ ],
137
+ [sizeConfig, borderRadius, colors, isDisabled, style],
138
+ );
139
+
140
+ return (
141
+ <Pressable
142
+ accessibilityRole="button"
143
+ accessibilityLabel={accessibilityLabel}
144
+ accessibilityState={{ disabled: isDisabled, busy: loading }}
145
+ disabled={isDisabled}
146
+ style={containerStyle}
147
+ {...rest}
148
+ >
149
+ {loading ? (
150
+ <ActivityIndicator color={colors.iconColor} size="small" />
151
+ ) : (
152
+ <Icon name={icon} size={sizeConfig.iconSize} color={colors.iconColor} />
153
+ )}
154
+ </Pressable>
155
+ );
156
+ }
@@ -0,0 +1,7 @@
1
+ export {
2
+ IconButton,
3
+ type IconButtonProps,
4
+ type IconButtonVariant,
5
+ type IconButtonSize,
6
+ type IconButtonShape,
7
+ } from './IconButton';
@@ -0,0 +1,230 @@
1
+ import { forwardRef, useState, type ReactNode } from 'react';
2
+ import {
3
+ Pressable,
4
+ TextInput,
5
+ View,
6
+ type NativeSyntheticEvent,
7
+ type StyleProp,
8
+ type TextInputFocusEventData,
9
+ type TextInputProps,
10
+ type TextStyle,
11
+ type ViewStyle,
12
+ } from 'react-native';
13
+ import { useTheme, textStyle } from '../../theme';
14
+ import type { TypographyVariant } from '../../theme/typography';
15
+ import { Icon } from '../Icon/Icon';
16
+ import { Text } from '../Text/Text';
17
+
18
+ /** Width of the focus ring, in px (Figma "Focus" effect: spread 6). */
19
+ const FOCUS_RING_SPREAD = 6;
20
+ /** Focus ring opacity (Figma color #..0x26 ≈ 15%). */
21
+ const FOCUS_RING_ALPHA = 0.15;
22
+
23
+ /**
24
+ * Removes the browser's default focus outline on web (react-native-web renders
25
+ * TextInput as a DOM input). No-op on native; our lime focus ring is the focus
26
+ * affordance instead.
27
+ */
28
+ const WEB_NO_OUTLINE = { outlineStyle: 'none', outlineWidth: 0 } as unknown as TextStyle;
29
+
30
+ /** Convert a `#RRGGBB` (or `#RGB`) token to an `rgba()` string at the given alpha. */
31
+ function hexToRgba(hex: string, alpha: number): string {
32
+ const h = hex.replace('#', '');
33
+ const full = h.length === 3 ? h.replace(/./g, (c) => c + c) : h;
34
+ const r = parseInt(full.slice(0, 2), 16);
35
+ const g = parseInt(full.slice(2, 4), 16);
36
+ const b = parseInt(full.slice(4, 6), 16);
37
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
38
+ }
39
+
40
+ export type InputSize = 'md' | 'lg';
41
+
42
+ export interface InputProps extends Omit<TextInputProps, 'style' | 'editable'> {
43
+ /** Field label rendered above the input. */
44
+ label?: string;
45
+ /** Helper text rendered below the input. Replaced by the error message when `error` is a string. */
46
+ helperText?: string;
47
+ /** Mark the field invalid. Pass a string to show it as the error message. */
48
+ error?: boolean | string;
49
+ /** Field height: `md` = 48, `lg` = 58. Defaults to `lg`. */
50
+ size?: InputSize;
51
+ /** Disable input and apply disabled tokens. */
52
+ disabled?: boolean;
53
+ /** Element rendered inside the field, before the text. */
54
+ leftIcon?: ReactNode;
55
+ /** Element rendered inside the field, after the text. */
56
+ rightIcon?: ReactNode;
57
+ /**
58
+ * Password field with a trailing eye toggle to reveal/hide the text. Starts
59
+ * masked; the toggle replaces `rightIcon`.
60
+ */
61
+ revealable?: boolean;
62
+ /** Accessibility labels for the reveal toggle. */
63
+ revealLabel?: string;
64
+ hideLabel?: string;
65
+ /** Style for the outer wrapper (label + field + helper). */
66
+ containerStyle?: StyleProp<ViewStyle>;
67
+ /** Style for the field row. */
68
+ fieldStyle?: StyleProp<ViewStyle>;
69
+ }
70
+
71
+ const SIZES: Record<
72
+ InputSize,
73
+ { height: number; gap: number; iconSize: number; textVariant: TypographyVariant }
74
+ > = {
75
+ md: { height: 48, gap: 8, iconSize: 20, textVariant: 'bodyMedium' },
76
+ lg: { height: 58, gap: 10, iconSize: 24, textVariant: 'bodyLarge' },
77
+ };
78
+
79
+ /**
80
+ * Text field — faithful to the Bacon POS Figma "Input rounds".
81
+ * Pill-shaped, with label, helper/error text, optional icons and a lime focus
82
+ * ring. Focus is tracked internally; error and disabled are controlled by props.
83
+ */
84
+ export const Input = forwardRef<TextInput, InputProps>(function Input(
85
+ {
86
+ label,
87
+ helperText,
88
+ error,
89
+ size = 'lg',
90
+ disabled = false,
91
+ leftIcon,
92
+ rightIcon,
93
+ revealable = false,
94
+ revealLabel = 'Show password',
95
+ hideLabel = 'Hide password',
96
+ secureTextEntry,
97
+ containerStyle,
98
+ fieldStyle,
99
+ onFocus,
100
+ onBlur,
101
+ ...rest
102
+ },
103
+ ref,
104
+ ) {
105
+ const theme = useTheme();
106
+ const sizeConfig = SIZES[size];
107
+ const [focused, setFocused] = useState(false);
108
+ const [revealed, setRevealed] = useState(false);
109
+
110
+ const effectiveSecure = revealable ? !revealed : secureTextEntry;
111
+ const trailing = revealable ? (
112
+ <Pressable
113
+ onPress={() => setRevealed((r) => !r)}
114
+ disabled={disabled}
115
+ hitSlop={8}
116
+ accessibilityRole="button"
117
+ accessibilityLabel={revealed ? hideLabel : revealLabel}
118
+ >
119
+ <Icon name={revealed ? 'eye' : 'eye-hide'} size={sizeConfig.iconSize} color="tertiary" />
120
+ </Pressable>
121
+ ) : (
122
+ rightIcon
123
+ );
124
+
125
+ const hasError = Boolean(error);
126
+ const message = typeof error === 'string' ? error : helperText;
127
+
128
+ const borderColor = disabled
129
+ ? theme.colors.disabled.border
130
+ : hasError
131
+ ? theme.colors.feedback.error
132
+ : focused
133
+ ? theme.colors.border.focus
134
+ : theme.colors.border.default;
135
+
136
+ // Outer focus ring — a colored spread with no blur (Figma "Focus" effect).
137
+ // `boxShadow` (RN 0.76+ / New Architecture, and react-native-web) is the only
138
+ // cross-platform way to get a colored spread: `shadow*` is iOS-only with no
139
+ // spread, and `elevation` is a grey Android-only shadow.
140
+ const showRing = focused && !disabled;
141
+ const ringColor = hasError ? theme.colors.feedback.error : theme.colors.border.focus;
142
+ const boxShadow: ViewStyle['boxShadow'] = showRing
143
+ ? [
144
+ {
145
+ offsetX: 0,
146
+ offsetY: 0,
147
+ blurRadius: 0,
148
+ spreadDistance: FOCUS_RING_SPREAD,
149
+ color: hexToRgba(ringColor, FOCUS_RING_ALPHA),
150
+ },
151
+ ]
152
+ : undefined;
153
+
154
+ const iconBox: ViewStyle = {
155
+ width: sizeConfig.iconSize,
156
+ height: sizeConfig.iconSize,
157
+ alignItems: 'center',
158
+ justifyContent: 'center',
159
+ };
160
+
161
+ const handleFocus = (e: NativeSyntheticEvent<TextInputFocusEventData>) => {
162
+ setFocused(true);
163
+ onFocus?.(e);
164
+ };
165
+ const handleBlur = (e: NativeSyntheticEvent<TextInputFocusEventData>) => {
166
+ setFocused(false);
167
+ onBlur?.(e);
168
+ };
169
+
170
+ return (
171
+ <View style={containerStyle}>
172
+ {label ? (
173
+ <Text variant="bodySmall" color="secondary" style={{ marginBottom: 4, marginLeft: 8 }}>
174
+ {label}
175
+ </Text>
176
+ ) : null}
177
+
178
+ <View
179
+ style={[
180
+ {
181
+ flexDirection: 'row',
182
+ alignItems: 'center',
183
+ gap: sizeConfig.gap,
184
+ height: sizeConfig.height,
185
+ paddingHorizontal: 16,
186
+ borderWidth: 1,
187
+ borderColor,
188
+ borderRadius: theme.radii.pill,
189
+ backgroundColor: disabled
190
+ ? theme.colors.disabled.background
191
+ : theme.colors.background.default,
192
+ boxShadow,
193
+ },
194
+ fieldStyle,
195
+ ]}
196
+ >
197
+ {leftIcon ? <View style={iconBox}>{leftIcon}</View> : null}
198
+ <TextInput
199
+ ref={ref}
200
+ editable={!disabled}
201
+ secureTextEntry={effectiveSecure}
202
+ placeholderTextColor={theme.colors.text.tertiary}
203
+ onFocus={handleFocus}
204
+ onBlur={handleBlur}
205
+ style={[
206
+ textStyle(theme, sizeConfig.textVariant, 'regular'),
207
+ {
208
+ flex: 1,
209
+ paddingVertical: 0,
210
+ color: disabled ? theme.colors.text.tertiary : theme.colors.text.primary,
211
+ },
212
+ WEB_NO_OUTLINE,
213
+ ]}
214
+ {...rest}
215
+ />
216
+ {trailing ? <View style={iconBox}>{trailing}</View> : null}
217
+ </View>
218
+
219
+ {message ? (
220
+ <Text
221
+ variant="bodySmall"
222
+ color={hasError ? theme.colors.feedback.error : 'tertiary'}
223
+ style={{ marginTop: 8, marginLeft: 8 }}
224
+ >
225
+ {message}
226
+ </Text>
227
+ ) : null}
228
+ </View>
229
+ );
230
+ });
@@ -0,0 +1 @@
1
+ export { Input, type InputProps, type InputSize } from './Input';
@@ -0,0 +1,118 @@
1
+ import { useMemo, type ReactNode } from 'react';
2
+ import {
3
+ ActivityIndicator,
4
+ Pressable,
5
+ View,
6
+ type PressableProps,
7
+ type PressableStateCallbackType,
8
+ type StyleProp,
9
+ type TextStyle,
10
+ type ViewStyle,
11
+ } from 'react-native';
12
+ import { useTheme } from '../../theme';
13
+ import type { TypographyVariant } from '../../theme/typography';
14
+ import { Text } from '../Text/Text';
15
+
16
+ /** Link styles — the Figma "Link buttons" frame (default / destructive). */
17
+ export type LinkButtonVariant = 'default' | 'destructive';
18
+
19
+ export type LinkButtonSize = 'md' | 'lg';
20
+
21
+ export interface LinkButtonProps extends Omit<PressableProps, 'style' | 'children'> {
22
+ /** Link label. */
23
+ label: string;
24
+ /** Color intent. Defaults to `default`. */
25
+ variant?: LinkButtonVariant;
26
+ /** Underline the label (Figma "underline" styles). Defaults to false. */
27
+ underline?: boolean;
28
+ /** Typography size: `md` = 16, `lg` = 18. Defaults to `md`. */
29
+ size?: LinkButtonSize;
30
+ /** Dim and block presses. */
31
+ disabled?: boolean;
32
+ /** Show a spinner in the leading slot and block presses. The label stays visible. */
33
+ loading?: boolean;
34
+ /** Element rendered before the label. */
35
+ leftIcon?: ReactNode;
36
+ /** Element rendered after the label. */
37
+ rightIcon?: ReactNode;
38
+ /** Override the container style. */
39
+ style?: StyleProp<ViewStyle>;
40
+ }
41
+
42
+ const SIZES: Record<LinkButtonSize, { textVariant: TypographyVariant; gap: number; iconSize: number }> = {
43
+ md: { textVariant: 'bodyMedium', gap: 8, iconSize: 20 },
44
+ lg: { textVariant: 'bodyLarge', gap: 10, iconSize: 24 },
45
+ };
46
+
47
+ /**
48
+ * Text link with an optional underline — faithful to the Bacon POS Figma
49
+ * "Link buttons" frame. No background; sits inline with copy.
50
+ */
51
+ export function LinkButton({
52
+ label,
53
+ variant = 'default',
54
+ underline = false,
55
+ size = 'md',
56
+ disabled = false,
57
+ loading = false,
58
+ leftIcon,
59
+ rightIcon,
60
+ style,
61
+ ...rest
62
+ }: LinkButtonProps) {
63
+ const theme = useTheme();
64
+ const sizeConfig = SIZES[size];
65
+ const isDisabled = disabled || loading;
66
+
67
+ const textColor = isDisabled
68
+ ? theme.colors.disabled.foreground
69
+ : variant === 'destructive'
70
+ ? theme.colors.state.destructiveSubtleForeground
71
+ : theme.colors.action.secondaryForeground; // neutral-800, Figma text/foreground
72
+
73
+ const labelStyle: TextStyle = underline ? { textDecorationLine: 'underline' } : {};
74
+
75
+ const containerStyle = useMemo(
76
+ () =>
77
+ ({ pressed }: PressableStateCallbackType): StyleProp<ViewStyle> => [
78
+ {
79
+ flexDirection: 'row',
80
+ alignItems: 'center',
81
+ alignSelf: 'flex-start',
82
+ gap: sizeConfig.gap,
83
+ paddingVertical: 2,
84
+ opacity: pressed && !isDisabled ? 0.6 : 1,
85
+ } satisfies ViewStyle,
86
+ style,
87
+ ],
88
+ [sizeConfig, isDisabled, style],
89
+ );
90
+
91
+ const iconBox: ViewStyle = {
92
+ width: sizeConfig.iconSize,
93
+ height: sizeConfig.iconSize,
94
+ alignItems: 'center',
95
+ justifyContent: 'center',
96
+ };
97
+
98
+ return (
99
+ <Pressable
100
+ accessibilityRole="link"
101
+ accessibilityState={{ disabled: isDisabled, busy: loading }}
102
+ disabled={isDisabled}
103
+ hitSlop={8}
104
+ style={containerStyle}
105
+ {...rest}
106
+ >
107
+ {loading ? (
108
+ <ActivityIndicator color={textColor} size="small" />
109
+ ) : leftIcon ? (
110
+ <View style={iconBox}>{leftIcon}</View>
111
+ ) : null}
112
+ <Text variant={sizeConfig.textVariant} weight="medium" color={textColor} style={labelStyle}>
113
+ {label}
114
+ </Text>
115
+ {!loading && rightIcon ? <View style={iconBox}>{rightIcon}</View> : null}
116
+ </Pressable>
117
+ );
118
+ }
@@ -0,0 +1,6 @@
1
+ export {
2
+ LinkButton,
3
+ type LinkButtonProps,
4
+ type LinkButtonVariant,
5
+ type LinkButtonSize,
6
+ } from './LinkButton';
@@ -0,0 +1,176 @@
1
+ import { useState } from 'react';
2
+ import {
3
+ Image,
4
+ Pressable,
5
+ View,
6
+ type ImageSourcePropType,
7
+ type PressableStateCallbackType,
8
+ type StyleProp,
9
+ type ViewStyle,
10
+ } from 'react-native';
11
+ import { useTheme } from '../../theme';
12
+ import { palette } from '../../theme/palette';
13
+ import { Icon } from '../Icon/Icon';
14
+ import { Text } from '../Text/Text';
15
+
16
+ const PHOTO_HEIGHT = 104;
17
+ const NO_PHOTO_ICON = 48;
18
+
19
+ export interface ProductCardProps {
20
+ /** Product name (up to 2 lines). */
21
+ name: string;
22
+ /** Pre-formatted price string, e.g. "$5.50". */
23
+ price: string;
24
+ /** Product image. Omit for the no-photo layout; on load error it falls back to a placeholder. */
25
+ image?: ImageSourcePropType;
26
+ /** Category label shown on the photo (e.g. "Starters"). */
27
+ category?: string;
28
+ /** Category pill background color. Defaults to the design's light category tint. */
29
+ categoryColor?: string;
30
+ /** When > 0, shows the lime quantity badge. */
31
+ quantity?: number;
32
+ /** Makes the card pressable. */
33
+ onPress?: () => void;
34
+ /** Dim and block presses. */
35
+ disabled?: boolean;
36
+ /** Override the container style (e.g. width in a grid). */
37
+ style?: StyleProp<ViewStyle>;
38
+ /** Accessibility label. Defaults to "{name}, {price}". */
39
+ accessibilityLabel?: string;
40
+ }
41
+
42
+ /**
43
+ * Product tile — faithful to the Bacon POS Figma "Product card". Photo with an
44
+ * optional category pill, name + price, and a lime quantity badge. Handles three
45
+ * states: with photo, image-load failure (placeholder), and no photo (shorter).
46
+ */
47
+ export function ProductCard({
48
+ name,
49
+ price,
50
+ image,
51
+ category,
52
+ categoryColor = '#FDD8D8', // dish-category/1-light (category-specific tint)
53
+ quantity,
54
+ onPress,
55
+ disabled = false,
56
+ style,
57
+ accessibilityLabel,
58
+ }: ProductCardProps) {
59
+ const theme = useTheme();
60
+ const [errored, setErrored] = useState(false);
61
+
62
+ const hasPhoto = image != null;
63
+ const showBadge = typeof quantity === 'number' && quantity > 0;
64
+
65
+ const containerStyle: ViewStyle = {
66
+ backgroundColor: theme.colors.background.default,
67
+ borderRadius: theme.radii['2xl'],
68
+ padding: 8,
69
+ overflow: 'hidden',
70
+ };
71
+
72
+ const categoryPill = (extra: ViewStyle) =>
73
+ category ? (
74
+ <View
75
+ style={{
76
+ backgroundColor: categoryColor,
77
+ paddingHorizontal: 8,
78
+ paddingVertical: 4,
79
+ borderRadius: theme.radii.pill,
80
+ ...extra,
81
+ }}
82
+ >
83
+ <Text variant="bodySmall" weight="medium" color="primary" numberOfLines={1}>
84
+ {category}
85
+ </Text>
86
+ </View>
87
+ ) : null;
88
+
89
+ const content = (
90
+ <>
91
+ {hasPhoto ? (
92
+ <View
93
+ style={{
94
+ height: PHOTO_HEIGHT,
95
+ width: '100%',
96
+ borderTopLeftRadius: theme.radii.xl,
97
+ borderTopRightRadius: theme.radii.xl,
98
+ overflow: 'hidden',
99
+ backgroundColor: errored ? palette.neutral[200] : theme.colors.background.default,
100
+ alignItems: 'center',
101
+ justifyContent: 'center',
102
+ }}
103
+ >
104
+ {errored ? (
105
+ <Icon name="no-photo" size={NO_PHOTO_ICON} color="tertiary" />
106
+ ) : (
107
+ <Image
108
+ source={image}
109
+ resizeMode="cover"
110
+ onError={() => setErrored(true)}
111
+ style={{ width: '100%', height: '100%' }}
112
+ />
113
+ )}
114
+ {/* Category pill sits on the photo, bottom-left. */}
115
+ {categoryPill({ position: 'absolute', left: 10, bottom: 8 })}
116
+ </View>
117
+ ) : null}
118
+
119
+ <View style={{ gap: 12, paddingTop: 16, paddingBottom: 10, paddingHorizontal: 10, width: '100%' }}>
120
+ {/* No photo: the category pill moves inline, above the name. */}
121
+ {!hasPhoto ? categoryPill({ alignSelf: 'flex-start' }) : null}
122
+ <Text variant="h2" weight="semibold" color="primary" numberOfLines={2}>
123
+ {name}
124
+ </Text>
125
+ <Text variant="bodyMedium" weight="medium" color="tertiary" numberOfLines={1}>
126
+ {price}
127
+ </Text>
128
+ </View>
129
+
130
+ {showBadge ? (
131
+ <View
132
+ style={{
133
+ position: 'absolute',
134
+ top: 16,
135
+ right: 16,
136
+ width: 32,
137
+ height: 32,
138
+ borderRadius: theme.radii.pill,
139
+ backgroundColor: theme.colors.action.primary,
140
+ alignItems: 'center',
141
+ justifyContent: 'center',
142
+ boxShadow: [
143
+ { offsetX: 0, offsetY: 10, blurRadius: 7.5, spreadDistance: 0, color: 'rgba(0,0,0,0.04)' },
144
+ { offsetX: 0, offsetY: 4, blurRadius: 3, spreadDistance: 0, color: 'rgba(0,0,0,0.04)' },
145
+ ] as ViewStyle['boxShadow'],
146
+ }}
147
+ >
148
+ <Text variant="bodyMedium" weight="medium" color={theme.colors.action.primaryForeground}>
149
+ {quantity}
150
+ </Text>
151
+ </View>
152
+ ) : null}
153
+ </>
154
+ );
155
+
156
+ if (!onPress) {
157
+ return <View style={[containerStyle, style]}>{content}</View>;
158
+ }
159
+
160
+ return (
161
+ <Pressable
162
+ accessibilityRole="button"
163
+ accessibilityLabel={accessibilityLabel ?? `${name}, ${price}`}
164
+ accessibilityState={{ disabled }}
165
+ disabled={disabled}
166
+ onPress={onPress}
167
+ style={({ pressed }: PressableStateCallbackType) => [
168
+ containerStyle,
169
+ { opacity: disabled ? 0.5 : pressed ? 0.96 : 1 },
170
+ style,
171
+ ]}
172
+ >
173
+ {content}
174
+ </Pressable>
175
+ );
176
+ }