@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
package/package.json ADDED
@@ -0,0 +1,116 @@
1
+ {
2
+ "name": "@bacon-pos/ui",
3
+ "version": "0.1.0",
4
+ "description": "Bacon POS design system — React Native component library",
5
+ "main": "./lib/commonjs/index.js",
6
+ "module": "./lib/module/index.js",
7
+ "types": "./lib/typescript/commonjs/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./lib/typescript/module/index.d.ts",
12
+ "default": "./lib/module/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./lib/typescript/commonjs/index.d.ts",
16
+ "default": "./lib/commonjs/index.js"
17
+ }
18
+ },
19
+ "./package.json": "./package.json"
20
+ },
21
+ "files": [
22
+ "src",
23
+ "lib",
24
+ "!**/__tests__",
25
+ "!**/*.test.ts",
26
+ "!**/*.test.tsx",
27
+ "!**/*.stories.ts",
28
+ "!**/*.stories.tsx"
29
+ ],
30
+ "sideEffects": false,
31
+ "scripts": {
32
+ "clean": "del-cli lib",
33
+ "build": "bob build",
34
+ "prepare": "bob build",
35
+ "typecheck": "tsc --noEmit",
36
+ "gen:icons": "node scripts/generate-icons.mjs",
37
+ "gen:graphics": "node scripts/generate-graphics.mjs",
38
+ "test": "jest",
39
+ "storybook": "storybook dev -p 6006",
40
+ "build-storybook": "storybook build",
41
+ "release": "changeset publish",
42
+ "version": "changeset version"
43
+ },
44
+ "keywords": [
45
+ "react-native",
46
+ "expo",
47
+ "design-system",
48
+ "component-library",
49
+ "ui",
50
+ "bacon-pos"
51
+ ],
52
+ "license": "MIT",
53
+ "publishConfig": {
54
+ "access": "public"
55
+ },
56
+ "peerDependencies": {
57
+ "react": ">=18.0.0",
58
+ "react-native": ">=0.74.0",
59
+ "react-native-svg": ">=15.0.0"
60
+ },
61
+ "devDependencies": {
62
+ "@babel/core": "^7.25.2",
63
+ "@changesets/cli": "^2.27.11",
64
+ "@react-native/babel-preset": "0.79.5",
65
+ "@storybook/addon-essentials": "^8.6.14",
66
+ "@storybook/react": "^8.6.14",
67
+ "@storybook/react-native-web-vite": "^8.6.14",
68
+ "@svgr/cli": "^8.1.0",
69
+ "@svgr/core": "^8.1.0",
70
+ "@svgr/plugin-jsx": "^8.1.0",
71
+ "@testing-library/react-native": "^13.0.1",
72
+ "@types/jest": "^29.5.14",
73
+ "@types/react": "~19.0.10",
74
+ "del-cli": "^6.0.0",
75
+ "jest": "^29.7.0",
76
+ "react": "19.0.0",
77
+ "react-dom": "19.0.0",
78
+ "react-native": "0.79.5",
79
+ "react-native-builder-bob": "^0.40.5",
80
+ "react-native-svg": "15.11.2",
81
+ "react-native-web": "^0.20.0",
82
+ "react-test-renderer": "19.0.0",
83
+ "storybook": "^8.6.14",
84
+ "typescript": "~5.8.3",
85
+ "vite": "^6.0.0"
86
+ },
87
+ "jest": {
88
+ "preset": "react-native",
89
+ "modulePathIgnorePatterns": [
90
+ "<rootDir>/lib/"
91
+ ],
92
+ "transformIgnorePatterns": [
93
+ "node_modules/.pnpm/(?!(?:@react-native|react-native))"
94
+ ]
95
+ },
96
+ "react-native-builder-bob": {
97
+ "source": "src",
98
+ "output": "lib",
99
+ "targets": [
100
+ [
101
+ "commonjs",
102
+ {
103
+ "esm": true
104
+ }
105
+ ],
106
+ [
107
+ "module",
108
+ {
109
+ "esm": true
110
+ }
111
+ ],
112
+ "typescript"
113
+ ]
114
+ },
115
+ "packageManager": "pnpm@10.12.1+sha512.f0dda8580f0ee9481c5c79a1d927b9164f2c478e90992ad268bbb2465a736984391d6333d2c327913578b2804af33474ca554ba29c04a8b13060a717675ae3ac"
116
+ }
@@ -0,0 +1,111 @@
1
+ import { useState } from 'react';
2
+ import { Image, View, type ImageSourcePropType, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { useTheme } from '../../theme';
4
+ import type { TypographyVariant } from '../../theme/typography';
5
+ import { Text } from '../Text/Text';
6
+
7
+ export type AvatarSize = 'sm' | 'md' | 'lg';
8
+
9
+ export interface AvatarProps {
10
+ /** Image source; when omitted or it fails to load, initials are shown. */
11
+ source?: ImageSourcePropType;
12
+ /** Full name used to derive the initials. */
13
+ name?: string;
14
+ /** Explicit initials (overrides `name`). */
15
+ initials?: string;
16
+ /** How many initials to show: 1 or 2. Defaults to 2. */
17
+ initialsCount?: 1 | 2;
18
+ /** Size preset: `sm` 32 / `md` 40 / `lg` 56. Defaults to `md`. */
19
+ size?: AvatarSize;
20
+ /** Custom diameter in px. Overrides `size` when set; initials scale to fit. */
21
+ diameter?: number;
22
+ /** Initials color. Defaults to a neutral foreground. */
23
+ color?: string;
24
+ /** Background behind initials (kept lighter than the initials). Defaults to a light neutral. */
25
+ backgroundColor?: string;
26
+ /** Override the container style. */
27
+ style?: StyleProp<ViewStyle>;
28
+ /** Accessibility label (defaults to `name`). */
29
+ accessibilityLabel?: string;
30
+ }
31
+
32
+ const SIZES: Record<AvatarSize, { diameter: number; text: TypographyVariant }> = {
33
+ sm: { diameter: 32, text: 'bodySmall' },
34
+ md: { diameter: 40, text: 'bodyMedium' },
35
+ lg: { diameter: 56, text: 'h3' },
36
+ };
37
+
38
+ function getInitials(name: string | undefined, explicit: string | undefined, count: 1 | 2): string {
39
+ if (explicit) return explicit.slice(0, count).toUpperCase();
40
+ if (!name) return '';
41
+ const words = name.trim().split(/\s+/).filter(Boolean);
42
+ const first = words[0];
43
+ if (!first) return '';
44
+ if (count === 1) return first.charAt(0).toUpperCase();
45
+ const second = words[1];
46
+ if (second) return (first.charAt(0) + second.charAt(0)).toUpperCase();
47
+ return first.slice(0, 2).toUpperCase();
48
+ }
49
+
50
+ /**
51
+ * Avatar — circular user image with an initials fallback. Shows the photo when
52
+ * `source` loads; otherwise shows 1–2 uppercase initials on a lighter background.
53
+ * Sizes: sm / md / lg.
54
+ */
55
+ export function Avatar({
56
+ source,
57
+ name,
58
+ initials,
59
+ initialsCount = 2,
60
+ size = 'md',
61
+ diameter,
62
+ color,
63
+ backgroundColor,
64
+ style,
65
+ accessibilityLabel,
66
+ }: AvatarProps) {
67
+ const theme = useTheme();
68
+ const cfg = SIZES[size];
69
+ const [errored, setErrored] = useState(false);
70
+ const showImage = source != null && !errored;
71
+
72
+ const d = diameter ?? cfg.diameter;
73
+ const bg = backgroundColor ?? theme.colors.background.muted;
74
+ const fg = color ?? theme.colors.text.secondary;
75
+ // With a custom diameter, scale the initials to fit; otherwise use the preset.
76
+ const initialsStyle = diameter
77
+ ? { fontSize: Math.round(d * 0.4), lineHeight: Math.round(d * 0.5) }
78
+ : undefined;
79
+
80
+ return (
81
+ <View
82
+ accessibilityRole="image"
83
+ accessibilityLabel={accessibilityLabel ?? name}
84
+ style={[
85
+ {
86
+ width: d,
87
+ height: d,
88
+ borderRadius: d / 2,
89
+ overflow: 'hidden',
90
+ alignItems: 'center',
91
+ justifyContent: 'center',
92
+ backgroundColor: showImage ? theme.colors.background.default : bg,
93
+ },
94
+ style,
95
+ ]}
96
+ >
97
+ {showImage ? (
98
+ <Image
99
+ source={source}
100
+ resizeMode="cover"
101
+ onError={() => setErrored(true)}
102
+ style={{ width: '100%', height: '100%' }}
103
+ />
104
+ ) : (
105
+ <Text variant={cfg.text} weight="semibold" color={fg} style={initialsStyle}>
106
+ {getInitials(name, initials, initialsCount)}
107
+ </Text>
108
+ )}
109
+ </View>
110
+ );
111
+ }
@@ -0,0 +1 @@
1
+ export { Avatar, type AvatarProps, type AvatarSize } from './Avatar';
@@ -0,0 +1,216 @@
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 ViewStyle,
10
+ } from 'react-native';
11
+ import { useTheme, type Theme } from '../../theme';
12
+ import type { TypographyVariant } from '../../theme/typography';
13
+ import { Text } from '../Text/Text';
14
+
15
+ /** Visual styles — 1:1 with the Figma "Round buttons" style variants. */
16
+ export type ButtonVariant =
17
+ | 'default'
18
+ | 'secondary'
19
+ | 'inverse'
20
+ | 'destructive'
21
+ | 'success'
22
+ | 'successSubtle';
23
+
24
+ export type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
25
+
26
+ /** `round` = pill (default), `square` = 16px corner radius. */
27
+ export type ButtonShape = 'round' | 'square';
28
+
29
+ export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
30
+ /** Visual style. Defaults to `default` (the lime accent action). */
31
+ variant?: ButtonVariant;
32
+ /** Control height and typography. Defaults to `lg`. */
33
+ size?: ButtonSize;
34
+ /** Corner style. Defaults to `round` (pill). */
35
+ shape?: ButtonShape;
36
+ /** Button label. */
37
+ label: string;
38
+ /** Show a spinner in the leading slot and block presses. The label stays visible. */
39
+ loading?: boolean;
40
+ /** Disable interaction and apply disabled tokens. */
41
+ disabled?: boolean;
42
+ /** Stretch to the full width of the parent. */
43
+ fullWidth?: boolean;
44
+ /** Element rendered before the label (sized to the size's icon box). */
45
+ leftIcon?: ReactNode;
46
+ /** Element rendered after the label. */
47
+ rightIcon?: ReactNode;
48
+ /**
49
+ * Element rendered above the label in a vertical stack. Only applies when
50
+ * `shape="square"` — ignored otherwise. Takes precedence over left/right icons.
51
+ */
52
+ topIcon?: ReactNode;
53
+ /** Override the container style. */
54
+ style?: StyleProp<ViewStyle>;
55
+ }
56
+
57
+ const SIZES: Record<
58
+ ButtonSize,
59
+ { height: number; paddingHorizontal: number; gap: number; textVariant: TypographyVariant; iconSize: number }
60
+ > = {
61
+ sm: { height: 48, paddingHorizontal: 16, gap: 10, textVariant: 'bodyMedium', iconSize: 20 },
62
+ md: { height: 58, paddingHorizontal: 24, gap: 10, textVariant: 'bodyLarge', iconSize: 24 },
63
+ lg: { height: 74, paddingHorizontal: 24, gap: 10, textVariant: 'bodyLarge', iconSize: 24 },
64
+ xl: { height: 90, paddingHorizontal: 24, gap: 10, textVariant: 'bodyLarge', iconSize: 24 },
65
+ };
66
+
67
+ interface VariantColors {
68
+ backgroundColor: string;
69
+ textColor: string;
70
+ borderColor: string;
71
+ borderWidth: number;
72
+ }
73
+
74
+ function getVariantColors(theme: Theme, variant: ButtonVariant): VariantColors {
75
+ const { action, state, border } = theme.colors;
76
+ const base: Omit<VariantColors, 'backgroundColor' | 'textColor'> = {
77
+ borderColor: 'transparent',
78
+ borderWidth: 0,
79
+ };
80
+ switch (variant) {
81
+ case 'secondary':
82
+ return {
83
+ backgroundColor: action.secondary,
84
+ textColor: action.secondaryForeground,
85
+ borderColor: border.default,
86
+ borderWidth: 1,
87
+ };
88
+ case 'inverse':
89
+ return { backgroundColor: action.inverse, textColor: action.inverseForeground, ...base };
90
+ case 'destructive':
91
+ return {
92
+ backgroundColor: state.destructiveSubtle,
93
+ textColor: state.destructiveSubtleForeground,
94
+ ...base,
95
+ };
96
+ case 'success':
97
+ return { backgroundColor: state.success, textColor: state.successForeground, ...base };
98
+ case 'successSubtle':
99
+ return {
100
+ backgroundColor: state.successSubtle,
101
+ textColor: state.successSubtleForeground,
102
+ ...base,
103
+ };
104
+ case 'default':
105
+ default:
106
+ return { backgroundColor: action.primary, textColor: action.primaryForeground, ...base };
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Text button — faithful to the Bacon POS Figma "Buttons" frame.
112
+ * Colors, sizes, radii and states are driven by theme tokens.
113
+ */
114
+ export function Button({
115
+ variant = 'default',
116
+ size = 'lg',
117
+ shape = 'round',
118
+ label,
119
+ loading = false,
120
+ disabled = false,
121
+ fullWidth = false,
122
+ leftIcon,
123
+ rightIcon,
124
+ topIcon,
125
+ style,
126
+ ...rest
127
+ }: ButtonProps) {
128
+ const theme = useTheme();
129
+ const sizeConfig = SIZES[size];
130
+ const isDisabled = disabled || loading;
131
+
132
+ const colors = useMemo<VariantColors>(() => {
133
+ const variantColors = getVariantColors(theme, variant);
134
+ if (!isDisabled) return variantColors;
135
+ return {
136
+ backgroundColor: theme.colors.disabled.background,
137
+ textColor: theme.colors.disabled.foreground,
138
+ borderColor: variantColors.borderWidth > 0 ? theme.colors.disabled.border : 'transparent',
139
+ borderWidth: variantColors.borderWidth,
140
+ };
141
+ }, [theme, variant, isDisabled]);
142
+
143
+ const borderRadius = shape === 'square' ? theme.radii.xl : theme.radii.pill;
144
+ // Vertical (icon-on-top) layout is only allowed for the square shape.
145
+ const isVertical = shape === 'square' && !!topIcon;
146
+
147
+ const containerStyle = useMemo(
148
+ () =>
149
+ ({ pressed }: PressableStateCallbackType): StyleProp<ViewStyle> => [
150
+ {
151
+ ...(isVertical
152
+ ? { paddingVertical: 16, flexDirection: 'column' as const }
153
+ : { height: sizeConfig.height, flexDirection: 'row' as const }),
154
+ paddingHorizontal: sizeConfig.paddingHorizontal,
155
+ borderRadius,
156
+ borderWidth: colors.borderWidth,
157
+ borderColor: colors.borderColor,
158
+ backgroundColor: colors.backgroundColor,
159
+ alignItems: 'center',
160
+ justifyContent: 'center',
161
+ gap: isVertical ? 16 : sizeConfig.gap,
162
+ opacity: pressed && !isDisabled ? 0.9 : 1,
163
+ alignSelf: fullWidth ? 'stretch' : 'flex-start',
164
+ } satisfies ViewStyle,
165
+ style,
166
+ ],
167
+ [isVertical, sizeConfig, borderRadius, colors, isDisabled, fullWidth, style],
168
+ );
169
+
170
+ const iconBox: ViewStyle = {
171
+ width: sizeConfig.iconSize,
172
+ height: sizeConfig.iconSize,
173
+ alignItems: 'center',
174
+ justifyContent: 'center',
175
+ };
176
+
177
+ return (
178
+ <Pressable
179
+ accessibilityRole="button"
180
+ accessibilityState={{ disabled: isDisabled, busy: loading }}
181
+ disabled={isDisabled}
182
+ style={containerStyle}
183
+ {...rest}
184
+ >
185
+ {isVertical ? (
186
+ <>
187
+ {loading ? (
188
+ <ActivityIndicator color={colors.textColor} size="small" />
189
+ ) : (
190
+ <View style={iconBox}>{topIcon}</View>
191
+ )}
192
+ <Text
193
+ variant={sizeConfig.textVariant}
194
+ weight="medium"
195
+ color={colors.textColor}
196
+ align="center"
197
+ >
198
+ {label}
199
+ </Text>
200
+ </>
201
+ ) : (
202
+ <>
203
+ {loading ? (
204
+ <ActivityIndicator color={colors.textColor} size="small" />
205
+ ) : leftIcon ? (
206
+ <View style={iconBox}>{leftIcon}</View>
207
+ ) : null}
208
+ <Text variant={sizeConfig.textVariant} weight="medium" color={colors.textColor}>
209
+ {label}
210
+ </Text>
211
+ {!loading && rightIcon ? <View style={iconBox}>{rightIcon}</View> : null}
212
+ </>
213
+ )}
214
+ </Pressable>
215
+ );
216
+ }
@@ -0,0 +1,6 @@
1
+ export {
2
+ Button,
3
+ type ButtonProps,
4
+ type ButtonVariant,
5
+ type ButtonSize,
6
+ } from './Button';
@@ -0,0 +1,145 @@
1
+ import { useMemo, type ReactNode } from 'react';
2
+ import {
3
+ Pressable,
4
+ View,
5
+ type PressableStateCallbackType,
6
+ type StyleProp,
7
+ type ViewStyle,
8
+ } from 'react-native';
9
+ import { useTheme, type Theme } from '../../theme';
10
+ import { Icon } from '../Icon/Icon';
11
+ import type { IconName } from '../Icon/icons.generated';
12
+ import { Text } from '../Text/Text';
13
+
14
+ export interface CardProps {
15
+ /** Bold card title (H3). */
16
+ title?: string;
17
+ /** Supporting description below the title. */
18
+ description?: string;
19
+ /** Optional leading icon shown above the title. */
20
+ icon?: IconName;
21
+ /** Selected state — lime surface, lime border + focus ring, checked radio. */
22
+ selected?: boolean;
23
+ /** Show the radio indicator in the top-right corner. Defaults to true. */
24
+ showRadio?: boolean;
25
+ /** Makes the card pressable (to select it). */
26
+ onPress?: () => void;
27
+ /** Dim and block presses. */
28
+ disabled?: boolean;
29
+ /** Extra content rendered after the description. */
30
+ children?: ReactNode;
31
+ /** Override the container style. */
32
+ style?: StyleProp<ViewStyle>;
33
+ /** Accessibility label (defaults to `title`). */
34
+ accessibilityLabel?: string;
35
+ }
36
+
37
+ function Radio({ selected, theme }: { selected: boolean; theme: Theme }) {
38
+ return (
39
+ <View
40
+ style={{
41
+ width: 20,
42
+ height: 20,
43
+ borderRadius: 10,
44
+ alignItems: 'center',
45
+ justifyContent: 'center',
46
+ ...(selected
47
+ ? { backgroundColor: theme.colors.action.primary }
48
+ : { borderWidth: 1.5, borderColor: theme.colors.border.strong }),
49
+ }}
50
+ >
51
+ {selected ? <Icon name="check" size={14} color={theme.colors.action.primaryForeground} /> : null}
52
+ </View>
53
+ );
54
+ }
55
+
56
+ /**
57
+ * Selectable card — faithful to the Bacon POS Figma "Card". A padded rounded
58
+ * surface with an optional icon, title, description and a radio indicator;
59
+ * `selected` applies the lime surface, border and focus ring.
60
+ */
61
+ export function Card({
62
+ title,
63
+ description,
64
+ icon,
65
+ selected = false,
66
+ showRadio = true,
67
+ onPress,
68
+ disabled = false,
69
+ children,
70
+ style,
71
+ accessibilityLabel,
72
+ }: CardProps) {
73
+ const theme = useTheme();
74
+
75
+ const baseStyle = useMemo<ViewStyle>(() => {
76
+ return {
77
+ gap: theme.spacing.md,
78
+ padding: theme.spacing['2xl'],
79
+ borderRadius: theme.radii['3xl'],
80
+ overflow: 'hidden',
81
+ borderWidth: 1,
82
+ borderColor: selected ? theme.colors.border.focus : 'transparent',
83
+ backgroundColor: selected
84
+ ? theme.colors.brand.accentSubtle // surface/selected #faffe6 (accent tint)
85
+ : theme.colors.background.default,
86
+ ...(selected
87
+ ? {
88
+ boxShadow: [
89
+ {
90
+ offsetX: 0,
91
+ offsetY: 0,
92
+ blurRadius: 0,
93
+ spreadDistance: 6,
94
+ color: 'rgba(201, 255, 0, 0.15)',
95
+ },
96
+ ] as ViewStyle['boxShadow'],
97
+ }
98
+ : null),
99
+ opacity: disabled ? 0.5 : 1,
100
+ };
101
+ }, [theme, selected, disabled]);
102
+
103
+ const content = (
104
+ <>
105
+ {icon ? <Icon name={icon} size={24} color="primary" /> : null}
106
+ {title ? (
107
+ <Text variant="h3" weight="semibold" color="primary" numberOfLines={1}>
108
+ {title}
109
+ </Text>
110
+ ) : null}
111
+ {description ? (
112
+ <Text variant="bodyMedium" color="tertiary">
113
+ {description}
114
+ </Text>
115
+ ) : null}
116
+ {children}
117
+ {showRadio ? (
118
+ <View style={{ position: 'absolute', top: 24, right: 24 }}>
119
+ <Radio selected={selected} theme={theme} />
120
+ </View>
121
+ ) : null}
122
+ </>
123
+ );
124
+
125
+ if (!onPress) {
126
+ return <View style={[baseStyle, style]}>{content}</View>;
127
+ }
128
+
129
+ return (
130
+ <Pressable
131
+ accessibilityRole="button"
132
+ accessibilityState={{ selected, disabled }}
133
+ accessibilityLabel={accessibilityLabel ?? title}
134
+ disabled={disabled}
135
+ onPress={onPress}
136
+ style={({ pressed }: PressableStateCallbackType) => [
137
+ baseStyle,
138
+ { opacity: disabled ? 0.5 : pressed ? 0.96 : 1 },
139
+ style,
140
+ ]}
141
+ >
142
+ {content}
143
+ </Pressable>
144
+ );
145
+ }
@@ -0,0 +1 @@
1
+ export { Card, type CardProps } from './Card';
@@ -0,0 +1,86 @@
1
+ import { View, type StyleProp, type ViewStyle } from 'react-native';
2
+ import { useTheme } from '../../theme';
3
+ import { Icon } from '../Icon/Icon';
4
+ import { Labeled, type LabelPosition } from '../_internal/Labeled';
5
+
6
+ export interface CheckboxProps {
7
+ /** Checked state. */
8
+ checked: boolean;
9
+ /** Called with the next checked value when pressed. */
10
+ onChange: (checked: boolean) => void;
11
+ /** Show the indeterminate (mixed) mark instead of a check. */
12
+ indeterminate?: boolean;
13
+ /** Disable and dim the control. */
14
+ disabled?: boolean;
15
+ /** Optional label. */
16
+ label?: string;
17
+ /** Where the label sits: top / bottom / left / right. Defaults to `right`. */
18
+ labelPosition?: LabelPosition;
19
+ /** Override the container style. */
20
+ style?: StyleProp<ViewStyle>;
21
+ }
22
+
23
+ /**
24
+ * Checkbox — faithful to the Bacon POS Figma "Form controls". 24px rounded box:
25
+ * unchecked (outlined), checked (dark fill + white check), indeterminate (dash).
26
+ * Standalone or with a positionable label.
27
+ */
28
+ export function Checkbox({
29
+ checked,
30
+ onChange,
31
+ indeterminate = false,
32
+ disabled = false,
33
+ label,
34
+ labelPosition,
35
+ style,
36
+ }: CheckboxProps) {
37
+ const theme = useTheme();
38
+ const on = checked || indeterminate;
39
+
40
+ let backgroundColor: string;
41
+ let borderWidth = 0;
42
+ let borderColor = 'transparent';
43
+ let markColor = theme.colors.background.default;
44
+
45
+ if (disabled) {
46
+ backgroundColor = on ? theme.colors.disabled.backgroundStrong : theme.colors.disabled.background;
47
+ borderWidth = on ? 0 : 1;
48
+ borderColor = theme.colors.disabled.border;
49
+ markColor = theme.colors.disabled.foreground;
50
+ } else if (on) {
51
+ backgroundColor = theme.colors.text.primary;
52
+ } else {
53
+ backgroundColor = theme.colors.background.default;
54
+ borderWidth = 1;
55
+ borderColor = theme.colors.border.strong;
56
+ }
57
+
58
+ const mark = indeterminate ? 'minus' : checked ? 'check' : null;
59
+
60
+ return (
61
+ <Labeled
62
+ label={label}
63
+ labelPosition={labelPosition}
64
+ disabled={disabled}
65
+ onPress={() => onChange(!checked)}
66
+ accessibilityRole="checkbox"
67
+ accessibilityState={{ checked: indeterminate ? 'mixed' : checked, disabled }}
68
+ style={style}
69
+ >
70
+ <View
71
+ style={{
72
+ width: 24,
73
+ height: 24,
74
+ borderRadius: theme.radii.md,
75
+ backgroundColor,
76
+ borderWidth,
77
+ borderColor,
78
+ alignItems: 'center',
79
+ justifyContent: 'center',
80
+ }}
81
+ >
82
+ {mark ? <Icon name={mark} size={18} color={markColor} /> : null}
83
+ </View>
84
+ </Labeled>
85
+ );
86
+ }
@@ -0,0 +1 @@
1
+ export { Checkbox, type CheckboxProps } from './Checkbox';