@oxyhq/bloom 0.6.24 → 0.7.1

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 (423) hide show
  1. package/lib/commonjs/alert-dialog/AlertDialog.js +109 -0
  2. package/lib/commonjs/alert-dialog/AlertDialog.js.map +1 -0
  3. package/lib/commonjs/alert-dialog/AlertDialogHost.js +50 -0
  4. package/lib/commonjs/alert-dialog/AlertDialogHost.js.map +1 -0
  5. package/lib/commonjs/alert-dialog/confirm-store.js +80 -0
  6. package/lib/commonjs/alert-dialog/confirm-store.js.map +1 -0
  7. package/lib/commonjs/alert-dialog/index.js +19 -0
  8. package/lib/commonjs/alert-dialog/index.js.map +1 -0
  9. package/lib/commonjs/alert-dialog/index.web.js +19 -0
  10. package/lib/commonjs/alert-dialog/index.web.js.map +1 -0
  11. package/lib/commonjs/alert-dialog/types.js +6 -0
  12. package/lib/commonjs/alert-dialog/types.js.map +1 -0
  13. package/lib/commonjs/combobox/Combobox.js +227 -0
  14. package/lib/commonjs/combobox/Combobox.js.map +1 -0
  15. package/lib/commonjs/combobox/index.js +11 -0
  16. package/lib/commonjs/combobox/index.js.map +1 -0
  17. package/lib/commonjs/combobox/index.web.js +11 -0
  18. package/lib/commonjs/combobox/index.web.js.map +1 -0
  19. package/lib/commonjs/combobox/types.js +6 -0
  20. package/lib/commonjs/combobox/types.js.map +1 -0
  21. package/lib/commonjs/command/Command.js +256 -0
  22. package/lib/commonjs/command/Command.js.map +1 -0
  23. package/lib/commonjs/command/index.js +10 -0
  24. package/lib/commonjs/command/index.js.map +1 -0
  25. package/lib/commonjs/command/index.web.js +10 -0
  26. package/lib/commonjs/command/index.web.js.map +1 -0
  27. package/lib/commonjs/command/types.js +6 -0
  28. package/lib/commonjs/command/types.js.map +1 -0
  29. package/lib/commonjs/field/Field.js +68 -0
  30. package/lib/commonjs/field/Field.js.map +1 -0
  31. package/lib/commonjs/field/index.js +13 -0
  32. package/lib/commonjs/field/index.js.map +1 -0
  33. package/lib/commonjs/field/types.js +6 -0
  34. package/lib/commonjs/field/types.js.map +1 -0
  35. package/lib/commonjs/index.js +117 -25
  36. package/lib/commonjs/index.js.map +1 -1
  37. package/lib/commonjs/index.web.js +117 -25
  38. package/lib/commonjs/index.web.js.map +1 -1
  39. package/lib/commonjs/input-group/InputGroup.js +172 -0
  40. package/lib/commonjs/input-group/InputGroup.js.map +1 -0
  41. package/lib/commonjs/input-group/index.js +19 -0
  42. package/lib/commonjs/input-group/index.js.map +1 -0
  43. package/lib/commonjs/input-group/types.js +6 -0
  44. package/lib/commonjs/input-group/types.js.map +1 -0
  45. package/lib/commonjs/item/Item.js +172 -0
  46. package/lib/commonjs/item/Item.js.map +1 -0
  47. package/lib/commonjs/item/index.js +13 -0
  48. package/lib/commonjs/item/index.js.map +1 -0
  49. package/lib/commonjs/item/types.js +6 -0
  50. package/lib/commonjs/item/types.js.map +1 -0
  51. package/lib/commonjs/kbd/Kbd.js +79 -0
  52. package/lib/commonjs/kbd/Kbd.js.map +1 -0
  53. package/lib/commonjs/kbd/index.js +13 -0
  54. package/lib/commonjs/kbd/index.js.map +1 -0
  55. package/lib/commonjs/kbd/types.js +6 -0
  56. package/lib/commonjs/kbd/types.js.map +1 -0
  57. package/lib/commonjs/label/Label.js +60 -0
  58. package/lib/commonjs/label/Label.js.map +1 -0
  59. package/lib/commonjs/label/index.js +13 -0
  60. package/lib/commonjs/label/index.js.map +1 -0
  61. package/lib/commonjs/label/types.js +6 -0
  62. package/lib/commonjs/label/types.js.map +1 -0
  63. package/lib/commonjs/popover/context.js +18 -0
  64. package/lib/commonjs/popover/context.js.map +1 -0
  65. package/lib/commonjs/popover/index.js +111 -0
  66. package/lib/commonjs/popover/index.js.map +1 -0
  67. package/lib/commonjs/popover/index.web.js +286 -0
  68. package/lib/commonjs/popover/index.web.js.map +1 -0
  69. package/lib/commonjs/popover/types.js +6 -0
  70. package/lib/commonjs/popover/types.js.map +1 -0
  71. package/lib/commonjs/react-native-css.d.js +2 -0
  72. package/lib/commonjs/react-native-css.d.js.map +1 -0
  73. package/lib/commonjs/slider/Slider.js +255 -0
  74. package/lib/commonjs/slider/Slider.js.map +1 -0
  75. package/lib/commonjs/slider/index.js +13 -0
  76. package/lib/commonjs/slider/index.js.map +1 -0
  77. package/lib/commonjs/slider/types.js +6 -0
  78. package/lib/commonjs/slider/types.js.map +1 -0
  79. package/lib/commonjs/theme/BloomThemeProvider.js +39 -7
  80. package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
  81. package/lib/commonjs/theme/color-presets.js +118 -118
  82. package/lib/commonjs/theme/color-presets.js.map +1 -1
  83. package/lib/commonjs/theme/color-scope/index.js +28 -6
  84. package/lib/commonjs/theme/color-scope/index.js.map +1 -1
  85. package/lib/commonjs/theme/color-scope/style-builder.js +35 -0
  86. package/lib/commonjs/theme/color-scope/style-builder.js.map +1 -1
  87. package/lib/commonjs/theme/native-root-vars.js +105 -0
  88. package/lib/commonjs/theme/native-root-vars.js.map +1 -0
  89. package/lib/commonjs/theme/native-root-vars.web.js +27 -0
  90. package/lib/commonjs/theme/native-root-vars.web.js.map +1 -0
  91. package/lib/commonjs/theme/preset-vars.js +4 -1
  92. package/lib/commonjs/theme/preset-vars.js.map +1 -1
  93. package/lib/module/alert-dialog/AlertDialog.js +104 -0
  94. package/lib/module/alert-dialog/AlertDialog.js.map +1 -0
  95. package/lib/module/alert-dialog/AlertDialogHost.js +45 -0
  96. package/lib/module/alert-dialog/AlertDialogHost.js.map +1 -0
  97. package/lib/module/alert-dialog/confirm-store.js +73 -0
  98. package/lib/module/alert-dialog/confirm-store.js.map +1 -0
  99. package/lib/module/alert-dialog/index.js +9 -0
  100. package/lib/module/alert-dialog/index.js.map +1 -0
  101. package/lib/module/alert-dialog/index.web.js +9 -0
  102. package/lib/module/alert-dialog/index.web.js.map +1 -0
  103. package/lib/module/alert-dialog/types.js +4 -0
  104. package/lib/module/alert-dialog/types.js.map +1 -0
  105. package/lib/module/combobox/Combobox.js +222 -0
  106. package/lib/module/combobox/Combobox.js.map +1 -0
  107. package/lib/module/combobox/index.js +6 -0
  108. package/lib/module/combobox/index.js.map +1 -0
  109. package/lib/module/combobox/index.web.js +6 -0
  110. package/lib/module/combobox/index.web.js.map +1 -0
  111. package/lib/module/combobox/types.js +4 -0
  112. package/lib/module/combobox/types.js.map +1 -0
  113. package/lib/module/command/Command.js +251 -0
  114. package/lib/module/command/Command.js.map +1 -0
  115. package/lib/module/command/index.js +6 -0
  116. package/lib/module/command/index.js.map +1 -0
  117. package/lib/module/command/index.web.js +6 -0
  118. package/lib/module/command/index.web.js.map +1 -0
  119. package/lib/module/command/types.js +4 -0
  120. package/lib/module/command/types.js.map +1 -0
  121. package/lib/module/field/Field.js +63 -0
  122. package/lib/module/field/Field.js.map +1 -0
  123. package/lib/module/field/index.js +4 -0
  124. package/lib/module/field/index.js.map +1 -0
  125. package/lib/module/field/types.js +4 -0
  126. package/lib/module/field/types.js.map +1 -0
  127. package/lib/module/index.js +10 -3
  128. package/lib/module/index.js.map +1 -1
  129. package/lib/module/index.web.js +10 -3
  130. package/lib/module/index.web.js.map +1 -1
  131. package/lib/module/input-group/InputGroup.js +167 -0
  132. package/lib/module/input-group/InputGroup.js.map +1 -0
  133. package/lib/module/input-group/index.js +4 -0
  134. package/lib/module/input-group/index.js.map +1 -0
  135. package/lib/module/input-group/types.js +4 -0
  136. package/lib/module/input-group/types.js.map +1 -0
  137. package/lib/module/item/Item.js +167 -0
  138. package/lib/module/item/Item.js.map +1 -0
  139. package/lib/module/item/index.js +4 -0
  140. package/lib/module/item/index.js.map +1 -0
  141. package/lib/module/item/types.js +4 -0
  142. package/lib/module/item/types.js.map +1 -0
  143. package/lib/module/kbd/Kbd.js +74 -0
  144. package/lib/module/kbd/Kbd.js.map +1 -0
  145. package/lib/module/kbd/index.js +4 -0
  146. package/lib/module/kbd/index.js.map +1 -0
  147. package/lib/module/kbd/types.js +4 -0
  148. package/lib/module/kbd/types.js.map +1 -0
  149. package/lib/module/label/Label.js +55 -0
  150. package/lib/module/label/Label.js.map +1 -0
  151. package/lib/module/label/index.js +4 -0
  152. package/lib/module/label/index.js.map +1 -0
  153. package/lib/module/label/types.js +4 -0
  154. package/lib/module/label/types.js.map +1 -0
  155. package/lib/module/popover/context.js +13 -0
  156. package/lib/module/popover/context.js.map +1 -0
  157. package/lib/module/popover/index.js +95 -0
  158. package/lib/module/popover/index.js.map +1 -0
  159. package/lib/module/popover/index.web.js +274 -0
  160. package/lib/module/popover/index.web.js.map +1 -0
  161. package/lib/module/popover/types.js +4 -0
  162. package/lib/module/popover/types.js.map +1 -0
  163. package/lib/module/react-native-css.d.js +2 -0
  164. package/lib/module/react-native-css.d.js.map +1 -0
  165. package/lib/module/slider/Slider.js +250 -0
  166. package/lib/module/slider/Slider.js.map +1 -0
  167. package/lib/module/slider/index.js +4 -0
  168. package/lib/module/slider/index.js.map +1 -0
  169. package/lib/module/slider/types.js +4 -0
  170. package/lib/module/slider/types.js.map +1 -0
  171. package/lib/module/theme/BloomThemeProvider.js +40 -8
  172. package/lib/module/theme/BloomThemeProvider.js.map +1 -1
  173. package/lib/module/theme/color-presets.js +118 -118
  174. package/lib/module/theme/color-presets.js.map +1 -1
  175. package/lib/module/theme/color-scope/index.js +29 -7
  176. package/lib/module/theme/color-scope/index.js.map +1 -1
  177. package/lib/module/theme/color-scope/style-builder.js +35 -0
  178. package/lib/module/theme/color-scope/style-builder.js.map +1 -1
  179. package/lib/module/theme/native-root-vars.js +101 -0
  180. package/lib/module/theme/native-root-vars.js.map +1 -0
  181. package/lib/module/theme/native-root-vars.web.js +23 -0
  182. package/lib/module/theme/native-root-vars.web.js.map +1 -0
  183. package/lib/module/theme/preset-vars.js +4 -1
  184. package/lib/module/theme/preset-vars.js.map +1 -1
  185. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts +21 -0
  186. package/lib/typescript/commonjs/alert-dialog/AlertDialog.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/alert-dialog/AlertDialogHost.d.ts +15 -0
  188. package/lib/typescript/commonjs/alert-dialog/AlertDialogHost.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/alert-dialog/confirm-store.d.ts +31 -0
  190. package/lib/typescript/commonjs/alert-dialog/confirm-store.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/alert-dialog/index.d.ts +8 -0
  192. package/lib/typescript/commonjs/alert-dialog/index.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/alert-dialog/index.web.d.ts +8 -0
  194. package/lib/typescript/commonjs/alert-dialog/index.web.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/alert-dialog/types.d.ts +44 -0
  196. package/lib/typescript/commonjs/alert-dialog/types.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/combobox/Combobox.d.ts +33 -0
  198. package/lib/typescript/commonjs/combobox/Combobox.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/combobox/index.d.ts +6 -0
  200. package/lib/typescript/commonjs/combobox/index.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/combobox/index.web.d.ts +6 -0
  202. package/lib/typescript/commonjs/combobox/index.web.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/combobox/types.d.ts +40 -0
  204. package/lib/typescript/commonjs/combobox/types.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/command/Command.d.ts +22 -0
  206. package/lib/typescript/commonjs/command/Command.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/command/index.d.ts +6 -0
  208. package/lib/typescript/commonjs/command/index.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/command/index.web.d.ts +6 -0
  210. package/lib/typescript/commonjs/command/index.web.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/command/types.d.ts +46 -0
  212. package/lib/typescript/commonjs/command/types.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/field/Field.d.ts +4 -0
  214. package/lib/typescript/commonjs/field/Field.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/field/index.d.ts +3 -0
  216. package/lib/typescript/commonjs/field/index.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/field/types.d.ts +26 -0
  218. package/lib/typescript/commonjs/field/types.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/icons/common.d.ts +8 -8
  220. package/lib/typescript/commonjs/index.d.ts +19 -0
  221. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/index.web.d.ts +19 -0
  223. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/input-group/InputGroup.d.ts +9 -0
  225. package/lib/typescript/commonjs/input-group/InputGroup.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/input-group/index.d.ts +3 -0
  227. package/lib/typescript/commonjs/input-group/index.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/input-group/types.d.ts +35 -0
  229. package/lib/typescript/commonjs/input-group/types.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/item/Item.d.ts +4 -0
  231. package/lib/typescript/commonjs/item/Item.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/item/index.d.ts +3 -0
  233. package/lib/typescript/commonjs/item/index.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/item/types.d.ts +45 -0
  235. package/lib/typescript/commonjs/item/types.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/kbd/Kbd.d.ts +4 -0
  237. package/lib/typescript/commonjs/kbd/Kbd.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/kbd/index.d.ts +3 -0
  239. package/lib/typescript/commonjs/kbd/index.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/kbd/types.d.ts +13 -0
  241. package/lib/typescript/commonjs/kbd/types.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/label/Label.d.ts +4 -0
  243. package/lib/typescript/commonjs/label/Label.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/label/index.d.ts +3 -0
  245. package/lib/typescript/commonjs/label/index.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/label/types.d.ts +27 -0
  247. package/lib/typescript/commonjs/label/types.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/popover/context.d.ts +15 -0
  249. package/lib/typescript/commonjs/popover/context.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/popover/index.d.ts +14 -0
  251. package/lib/typescript/commonjs/popover/index.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/popover/index.web.d.ts +14 -0
  253. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/popover/types.d.ts +54 -0
  255. package/lib/typescript/commonjs/popover/types.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/slider/Slider.d.ts +4 -0
  257. package/lib/typescript/commonjs/slider/Slider.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/slider/index.d.ts +3 -0
  259. package/lib/typescript/commonjs/slider/index.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/slider/types.d.ts +30 -0
  261. package/lib/typescript/commonjs/slider/types.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/theme/color-scope/index.d.ts +9 -2
  264. package/lib/typescript/commonjs/theme/color-scope/index.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts +32 -0
  266. package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/theme/native-root-vars.d.ts +89 -0
  268. package/lib/typescript/commonjs/theme/native-root-vars.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts +20 -0
  270. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
  272. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts +21 -0
  273. package/lib/typescript/module/alert-dialog/AlertDialog.d.ts.map +1 -0
  274. package/lib/typescript/module/alert-dialog/AlertDialogHost.d.ts +15 -0
  275. package/lib/typescript/module/alert-dialog/AlertDialogHost.d.ts.map +1 -0
  276. package/lib/typescript/module/alert-dialog/confirm-store.d.ts +31 -0
  277. package/lib/typescript/module/alert-dialog/confirm-store.d.ts.map +1 -0
  278. package/lib/typescript/module/alert-dialog/index.d.ts +8 -0
  279. package/lib/typescript/module/alert-dialog/index.d.ts.map +1 -0
  280. package/lib/typescript/module/alert-dialog/index.web.d.ts +8 -0
  281. package/lib/typescript/module/alert-dialog/index.web.d.ts.map +1 -0
  282. package/lib/typescript/module/alert-dialog/types.d.ts +44 -0
  283. package/lib/typescript/module/alert-dialog/types.d.ts.map +1 -0
  284. package/lib/typescript/module/combobox/Combobox.d.ts +33 -0
  285. package/lib/typescript/module/combobox/Combobox.d.ts.map +1 -0
  286. package/lib/typescript/module/combobox/index.d.ts +6 -0
  287. package/lib/typescript/module/combobox/index.d.ts.map +1 -0
  288. package/lib/typescript/module/combobox/index.web.d.ts +6 -0
  289. package/lib/typescript/module/combobox/index.web.d.ts.map +1 -0
  290. package/lib/typescript/module/combobox/types.d.ts +40 -0
  291. package/lib/typescript/module/combobox/types.d.ts.map +1 -0
  292. package/lib/typescript/module/command/Command.d.ts +22 -0
  293. package/lib/typescript/module/command/Command.d.ts.map +1 -0
  294. package/lib/typescript/module/command/index.d.ts +6 -0
  295. package/lib/typescript/module/command/index.d.ts.map +1 -0
  296. package/lib/typescript/module/command/index.web.d.ts +6 -0
  297. package/lib/typescript/module/command/index.web.d.ts.map +1 -0
  298. package/lib/typescript/module/command/types.d.ts +46 -0
  299. package/lib/typescript/module/command/types.d.ts.map +1 -0
  300. package/lib/typescript/module/field/Field.d.ts +4 -0
  301. package/lib/typescript/module/field/Field.d.ts.map +1 -0
  302. package/lib/typescript/module/field/index.d.ts +3 -0
  303. package/lib/typescript/module/field/index.d.ts.map +1 -0
  304. package/lib/typescript/module/field/types.d.ts +26 -0
  305. package/lib/typescript/module/field/types.d.ts.map +1 -0
  306. package/lib/typescript/module/icons/common.d.ts +8 -8
  307. package/lib/typescript/module/index.d.ts +19 -0
  308. package/lib/typescript/module/index.d.ts.map +1 -1
  309. package/lib/typescript/module/index.web.d.ts +19 -0
  310. package/lib/typescript/module/index.web.d.ts.map +1 -1
  311. package/lib/typescript/module/input-group/InputGroup.d.ts +9 -0
  312. package/lib/typescript/module/input-group/InputGroup.d.ts.map +1 -0
  313. package/lib/typescript/module/input-group/index.d.ts +3 -0
  314. package/lib/typescript/module/input-group/index.d.ts.map +1 -0
  315. package/lib/typescript/module/input-group/types.d.ts +35 -0
  316. package/lib/typescript/module/input-group/types.d.ts.map +1 -0
  317. package/lib/typescript/module/item/Item.d.ts +4 -0
  318. package/lib/typescript/module/item/Item.d.ts.map +1 -0
  319. package/lib/typescript/module/item/index.d.ts +3 -0
  320. package/lib/typescript/module/item/index.d.ts.map +1 -0
  321. package/lib/typescript/module/item/types.d.ts +45 -0
  322. package/lib/typescript/module/item/types.d.ts.map +1 -0
  323. package/lib/typescript/module/kbd/Kbd.d.ts +4 -0
  324. package/lib/typescript/module/kbd/Kbd.d.ts.map +1 -0
  325. package/lib/typescript/module/kbd/index.d.ts +3 -0
  326. package/lib/typescript/module/kbd/index.d.ts.map +1 -0
  327. package/lib/typescript/module/kbd/types.d.ts +13 -0
  328. package/lib/typescript/module/kbd/types.d.ts.map +1 -0
  329. package/lib/typescript/module/label/Label.d.ts +4 -0
  330. package/lib/typescript/module/label/Label.d.ts.map +1 -0
  331. package/lib/typescript/module/label/index.d.ts +3 -0
  332. package/lib/typescript/module/label/index.d.ts.map +1 -0
  333. package/lib/typescript/module/label/types.d.ts +27 -0
  334. package/lib/typescript/module/label/types.d.ts.map +1 -0
  335. package/lib/typescript/module/popover/context.d.ts +15 -0
  336. package/lib/typescript/module/popover/context.d.ts.map +1 -0
  337. package/lib/typescript/module/popover/index.d.ts +14 -0
  338. package/lib/typescript/module/popover/index.d.ts.map +1 -0
  339. package/lib/typescript/module/popover/index.web.d.ts +14 -0
  340. package/lib/typescript/module/popover/index.web.d.ts.map +1 -0
  341. package/lib/typescript/module/popover/types.d.ts +54 -0
  342. package/lib/typescript/module/popover/types.d.ts.map +1 -0
  343. package/lib/typescript/module/slider/Slider.d.ts +4 -0
  344. package/lib/typescript/module/slider/Slider.d.ts.map +1 -0
  345. package/lib/typescript/module/slider/index.d.ts +3 -0
  346. package/lib/typescript/module/slider/index.d.ts.map +1 -0
  347. package/lib/typescript/module/slider/types.d.ts +30 -0
  348. package/lib/typescript/module/slider/types.d.ts.map +1 -0
  349. package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
  350. package/lib/typescript/module/theme/color-scope/index.d.ts +9 -2
  351. package/lib/typescript/module/theme/color-scope/index.d.ts.map +1 -1
  352. package/lib/typescript/module/theme/color-scope/style-builder.d.ts +32 -0
  353. package/lib/typescript/module/theme/color-scope/style-builder.d.ts.map +1 -1
  354. package/lib/typescript/module/theme/native-root-vars.d.ts +89 -0
  355. package/lib/typescript/module/theme/native-root-vars.d.ts.map +1 -0
  356. package/lib/typescript/module/theme/native-root-vars.web.d.ts +20 -0
  357. package/lib/typescript/module/theme/native-root-vars.web.d.ts.map +1 -0
  358. package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
  359. package/package.json +141 -1
  360. package/src/__tests__/Field.test.tsx +55 -0
  361. package/src/__tests__/InputGroup.test.tsx +44 -0
  362. package/src/__tests__/Item.test.tsx +73 -0
  363. package/src/__tests__/Kbd.test.tsx +27 -0
  364. package/src/__tests__/Label.test.tsx +30 -0
  365. package/src/__tests__/Slider.test.tsx +38 -0
  366. package/src/__tests__/confirm-store.test.ts +58 -0
  367. package/src/__tests__/native-root-vars.test.ts +125 -0
  368. package/src/alert-dialog/AlertDialog.stories.tsx +61 -0
  369. package/src/alert-dialog/AlertDialog.tsx +120 -0
  370. package/src/alert-dialog/AlertDialogHost.tsx +51 -0
  371. package/src/alert-dialog/confirm-store.ts +77 -0
  372. package/src/alert-dialog/index.ts +13 -0
  373. package/src/alert-dialog/index.web.ts +13 -0
  374. package/src/alert-dialog/types.ts +46 -0
  375. package/src/combobox/Combobox.stories.tsx +40 -0
  376. package/src/combobox/Combobox.tsx +274 -0
  377. package/src/combobox/index.ts +6 -0
  378. package/src/combobox/index.web.ts +6 -0
  379. package/src/combobox/types.ts +41 -0
  380. package/src/command/Command.stories.tsx +60 -0
  381. package/src/command/Command.tsx +276 -0
  382. package/src/command/index.ts +6 -0
  383. package/src/command/index.web.ts +6 -0
  384. package/src/command/types.ts +47 -0
  385. package/src/field/Field.stories.tsx +54 -0
  386. package/src/field/Field.tsx +77 -0
  387. package/src/field/index.ts +2 -0
  388. package/src/field/types.ts +26 -0
  389. package/src/index.ts +23 -0
  390. package/src/index.web.ts +23 -0
  391. package/src/input-group/InputGroup.stories.tsx +65 -0
  392. package/src/input-group/InputGroup.tsx +184 -0
  393. package/src/input-group/index.ts +2 -0
  394. package/src/input-group/types.ts +36 -0
  395. package/src/item/Item.stories.tsx +43 -0
  396. package/src/item/Item.tsx +180 -0
  397. package/src/item/index.ts +2 -0
  398. package/src/item/types.ts +45 -0
  399. package/src/kbd/Kbd.stories.tsx +36 -0
  400. package/src/kbd/Kbd.tsx +76 -0
  401. package/src/kbd/index.ts +2 -0
  402. package/src/kbd/types.ts +13 -0
  403. package/src/label/Label.stories.tsx +32 -0
  404. package/src/label/Label.tsx +64 -0
  405. package/src/label/index.ts +2 -0
  406. package/src/label/types.ts +27 -0
  407. package/src/popover/Popover.stories.tsx +61 -0
  408. package/src/popover/context.ts +26 -0
  409. package/src/popover/index.tsx +104 -0
  410. package/src/popover/index.web.tsx +325 -0
  411. package/src/popover/types.ts +60 -0
  412. package/src/react-native-css.d.ts +69 -0
  413. package/src/slider/Slider.stories.tsx +46 -0
  414. package/src/slider/Slider.tsx +275 -0
  415. package/src/slider/index.ts +2 -0
  416. package/src/slider/types.ts +30 -0
  417. package/src/theme/BloomThemeProvider.tsx +32 -6
  418. package/src/theme/color-presets.ts +118 -118
  419. package/src/theme/color-scope/index.tsx +30 -8
  420. package/src/theme/color-scope/style-builder.ts +40 -0
  421. package/src/theme/native-root-vars.ts +102 -0
  422. package/src/theme/native-root-vars.web.ts +22 -0
  423. package/src/theme/preset-vars.ts +4 -1
@@ -0,0 +1,275 @@
1
+ import React, { memo, useCallback, useMemo, useRef, useState } from 'react';
2
+ import {
3
+ Animated,
4
+ PanResponder,
5
+ Platform,
6
+ StyleSheet,
7
+ View,
8
+ type GestureResponderEvent,
9
+ type LayoutChangeEvent,
10
+ type PanResponderGestureState,
11
+ } from 'react-native';
12
+
13
+ import { useTheme } from '../theme/use-theme';
14
+ import { animation } from '../styles/tokens';
15
+ import type { SliderProps } from './types';
16
+
17
+ function clamp(v: number, min: number, max: number): number {
18
+ return Math.min(max, Math.max(min, v));
19
+ }
20
+
21
+ function quantize(raw: number, min: number, max: number, step: number): number {
22
+ if (step <= 0) return clamp(raw, min, max);
23
+ const steps = Math.round((raw - min) / step);
24
+ const snapped = min + steps * step;
25
+ // Avoid floating-point drift accumulating in the reported value.
26
+ const decimals = (String(step).split('.')[1] ?? '').length;
27
+ const rounded = decimals > 0 ? Number(snapped.toFixed(decimals)) : snapped;
28
+ return clamp(rounded, min, max);
29
+ }
30
+
31
+ /**
32
+ * A draggable value slider. Track + fill + thumb, themed from Bloom tokens.
33
+ * Controlled via `value` / `onValueChange`, with `min` / `max` / `step`.
34
+ *
35
+ * Universal: gestures use RN's `PanResponder` (works on React Native and on
36
+ * web via react-native-web). On web the thumb is also focusable and responds
37
+ * to arrow / Home / End keys for accessibility.
38
+ */
39
+ const SliderComponent = function Slider({
40
+ value,
41
+ onValueChange,
42
+ onSlidingComplete,
43
+ min = 0,
44
+ max = 100,
45
+ step = 1,
46
+ disabled = false,
47
+ trackHeight = 4,
48
+ thumbSize = 20,
49
+ minimumTrackTintColor,
50
+ maximumTrackTintColor,
51
+ thumbTintColor,
52
+ style,
53
+ accessibilityLabel,
54
+ testID,
55
+ }: SliderProps) {
56
+ const theme = useTheme();
57
+ const [trackWidth, setTrackWidth] = useState(0);
58
+ const pressScale = useRef(new Animated.Value(0)).current;
59
+
60
+ // Latest props captured in refs so the PanResponder (created once) always
61
+ // reads current values without being re-created mid-gesture.
62
+ const stateRef = useRef({ value, trackWidth, min, max, step, disabled });
63
+ stateRef.current = { value, trackWidth, min, max, step, disabled };
64
+ const callbacksRef = useRef({ onValueChange, onSlidingComplete });
65
+ callbacksRef.current = { onValueChange, onSlidingComplete };
66
+ const gestureStartValueRef = useRef(value);
67
+
68
+ const range = max - min;
69
+ const fraction = range > 0 ? clamp((value - min) / range, 0, 1) : 0;
70
+
71
+ const fillColor = minimumTrackTintColor ?? theme.colors.primary;
72
+ const restColor = maximumTrackTintColor ?? theme.colors.border;
73
+ const thumbColor = thumbTintColor ?? theme.colors.primary;
74
+
75
+ const valueFromX = useCallback((x: number): number => {
76
+ const s = stateRef.current;
77
+ if (s.trackWidth <= 0) return s.value;
78
+ const f = clamp(x / s.trackWidth, 0, 1);
79
+ return quantize(s.min + f * (s.max - s.min), s.min, s.max, s.step);
80
+ }, []);
81
+
82
+ const animatePress = useCallback(
83
+ (to: number) => {
84
+ Animated.spring(pressScale, {
85
+ toValue: to,
86
+ useNativeDriver: true,
87
+ ...animation.spring.snappy,
88
+ }).start();
89
+ },
90
+ [pressScale],
91
+ );
92
+
93
+ const panResponder = useMemo(
94
+ () =>
95
+ PanResponder.create({
96
+ onStartShouldSetPanResponder: () => !stateRef.current.disabled,
97
+ onMoveShouldSetPanResponder: () => !stateRef.current.disabled,
98
+ onPanResponderGrant: (e: GestureResponderEvent) => {
99
+ if (stateRef.current.disabled) return;
100
+ gestureStartValueRef.current = stateRef.current.value;
101
+ animatePress(1);
102
+ const next = valueFromX(e.nativeEvent.locationX);
103
+ if (next !== stateRef.current.value) {
104
+ callbacksRef.current.onValueChange(next);
105
+ }
106
+ },
107
+ onPanResponderMove: (
108
+ _e: GestureResponderEvent,
109
+ g: PanResponderGestureState,
110
+ ) => {
111
+ if (stateRef.current.disabled) return;
112
+ const s = stateRef.current;
113
+ const startFraction =
114
+ s.max - s.min > 0
115
+ ? (gestureStartValueRef.current - s.min) / (s.max - s.min)
116
+ : 0;
117
+ const startX = startFraction * s.trackWidth;
118
+ const next = valueFromX(startX + g.dx);
119
+ if (next !== s.value) {
120
+ callbacksRef.current.onValueChange(next);
121
+ }
122
+ },
123
+ onPanResponderRelease: () => {
124
+ animatePress(0);
125
+ callbacksRef.current.onSlidingComplete?.(stateRef.current.value);
126
+ },
127
+ onPanResponderTerminate: () => {
128
+ animatePress(0);
129
+ callbacksRef.current.onSlidingComplete?.(stateRef.current.value);
130
+ },
131
+ }),
132
+ [animatePress, valueFromX],
133
+ );
134
+
135
+ const onLayout = useCallback((e: LayoutChangeEvent) => {
136
+ setTrackWidth(e.nativeEvent.layout.width);
137
+ }, []);
138
+
139
+ const onKeyStep = useCallback(
140
+ (delta: number, toEdge?: 'min' | 'max') => {
141
+ if (disabled) return;
142
+ const next =
143
+ toEdge === 'min'
144
+ ? min
145
+ : toEdge === 'max'
146
+ ? max
147
+ : quantize(value + delta, min, max, step);
148
+ if (next !== value) {
149
+ onValueChange(next);
150
+ onSlidingComplete?.(next);
151
+ }
152
+ },
153
+ [disabled, min, max, step, value, onValueChange, onSlidingComplete],
154
+ );
155
+
156
+ // Web-only keyboard handling for the focusable thumb.
157
+ const webKeyHandler: Record<string, unknown> =
158
+ Platform.OS === 'web'
159
+ ? {
160
+ tabIndex: disabled ? -1 : 0,
161
+ onKeyDown: (e: { key: string; preventDefault: () => void }) => {
162
+ switch (e.key) {
163
+ case 'ArrowRight':
164
+ case 'ArrowUp':
165
+ e.preventDefault();
166
+ onKeyStep(step);
167
+ break;
168
+ case 'ArrowLeft':
169
+ case 'ArrowDown':
170
+ e.preventDefault();
171
+ onKeyStep(-step);
172
+ break;
173
+ case 'Home':
174
+ e.preventDefault();
175
+ onKeyStep(0, 'min');
176
+ break;
177
+ case 'End':
178
+ e.preventDefault();
179
+ onKeyStep(0, 'max');
180
+ break;
181
+ default:
182
+ break;
183
+ }
184
+ },
185
+ }
186
+ : {};
187
+
188
+ const thumbScale = pressScale.interpolate({
189
+ inputRange: [0, 1],
190
+ outputRange: [1, 1.15],
191
+ });
192
+
193
+ const thumbLeft = fraction * trackWidth - thumbSize / 2;
194
+
195
+ return (
196
+ <View
197
+ testID={testID}
198
+ accessibilityRole="adjustable"
199
+ accessibilityLabel={accessibilityLabel}
200
+ accessibilityValue={{ min, max, now: value }}
201
+ accessibilityState={{ disabled }}
202
+ style={[
203
+ styles.root,
204
+ { height: Math.max(thumbSize, trackHeight) + 8 },
205
+ disabled && styles.disabled,
206
+ style,
207
+ ]}
208
+ {...panResponder.panHandlers}>
209
+ <View
210
+ onLayout={onLayout}
211
+ style={[
212
+ styles.track,
213
+ { height: trackHeight, borderRadius: trackHeight / 2, backgroundColor: restColor },
214
+ ]}>
215
+ <View
216
+ style={[
217
+ styles.fill,
218
+ {
219
+ width: `${fraction * 100}%`,
220
+ height: trackHeight,
221
+ borderRadius: trackHeight / 2,
222
+ backgroundColor: fillColor,
223
+ },
224
+ ]}
225
+ />
226
+ </View>
227
+ <Animated.View
228
+ {...webKeyHandler}
229
+ style={[
230
+ styles.thumb,
231
+ {
232
+ width: thumbSize,
233
+ height: thumbSize,
234
+ borderRadius: thumbSize / 2,
235
+ marginTop: -thumbSize / 2,
236
+ backgroundColor: thumbColor,
237
+ left: thumbLeft,
238
+ transform: [{ scale: thumbScale }],
239
+ shadowColor: theme.colors.shadow,
240
+ },
241
+ ]}
242
+ />
243
+ </View>
244
+ );
245
+ };
246
+
247
+ const styles = StyleSheet.create({
248
+ root: {
249
+ width: '100%',
250
+ justifyContent: 'center',
251
+ },
252
+ track: {
253
+ width: '100%',
254
+ overflow: 'hidden',
255
+ },
256
+ fill: {
257
+ position: 'absolute',
258
+ left: 0,
259
+ top: 0,
260
+ },
261
+ thumb: {
262
+ position: 'absolute',
263
+ top: '50%',
264
+ shadowOffset: { width: 0, height: 1 },
265
+ shadowOpacity: 0.2,
266
+ shadowRadius: 2,
267
+ elevation: 2,
268
+ },
269
+ disabled: {
270
+ opacity: 0.5,
271
+ },
272
+ });
273
+
274
+ export const Slider = memo(SliderComponent);
275
+ Slider.displayName = 'Slider';
@@ -0,0 +1,2 @@
1
+ export { Slider } from './Slider';
2
+ export type { SliderProps } from './types';
@@ -0,0 +1,30 @@
1
+ import type { StyleProp, ViewStyle } from 'react-native';
2
+
3
+ export interface SliderProps {
4
+ /** Current value (controlled). */
5
+ value: number;
6
+ /** Fired continuously as the user drags / steps the thumb. */
7
+ onValueChange: (value: number) => void;
8
+ /** Fired once when the drag gesture ends. */
9
+ onSlidingComplete?: (value: number) => void;
10
+ /** Minimum value. Defaults to `0`. */
11
+ min?: number;
12
+ /** Maximum value. Defaults to `100`. */
13
+ max?: number;
14
+ /** Step granularity. Defaults to `1`. Use a fractional step for fine control. */
15
+ step?: number;
16
+ disabled?: boolean;
17
+ /** Track thickness in px. Defaults to `4`. */
18
+ trackHeight?: number;
19
+ /** Thumb diameter in px. Defaults to `20`. */
20
+ thumbSize?: number;
21
+ /** Override the filled-track color. Defaults to the theme primary. */
22
+ minimumTrackTintColor?: string;
23
+ /** Override the unfilled-track color. Defaults to the theme border. */
24
+ maximumTrackTintColor?: string;
25
+ /** Override the thumb color. Defaults to the theme primary. */
26
+ thumbTintColor?: string;
27
+ style?: StyleProp<ViewStyle>;
28
+ accessibilityLabel?: string;
29
+ testID?: string;
30
+ }
@@ -27,7 +27,8 @@ import { FontLoader } from '../fonts/FontLoader';
27
27
  import { applyDarkClass, applyColorPresetVars } from './apply-dark-class';
28
28
  import { buildTheme } from './build-theme';
29
29
  import { type AppColorName } from './color-presets';
30
- import { buildNativePresetStyle } from './color-scope/style-builder';
30
+ import { buildScopeVars, getVariableContextProvider } from './color-scope/style-builder';
31
+ import { applyNativeRootVars } from './native-root-vars';
31
32
  import {
32
33
  readPersistedTheme,
33
34
  readPersistedThemeSync,
@@ -295,6 +296,17 @@ export function BloomThemeProvider({
295
296
  applyColorPresetVars(colorPreset, resolved);
296
297
  }, [effectiveMode, resolved, colorPreset]);
297
298
 
299
+ // Native only: publish the preset vars into react-native-css's GLOBAL root
300
+ // variable family so they reach the ENTIRE app tree — navigator screens and
301
+ // every portal/modal/bottom-sheet that paints outside the provider's React
302
+ // subtree (and therefore never sees the `VariableContextProvider` vars below).
303
+ // Web writes the same vars to `document.documentElement` above, so this no-ops
304
+ // there. Runs before paint via `useIsomorphicLayoutEffect`, matching the
305
+ // sibling `applyColorPresetVars` side effect.
306
+ useIsomorphicLayoutEffect(() => {
307
+ applyNativeRootVars(colorPreset, resolved);
308
+ }, [colorPreset, resolved]);
309
+
298
310
  const contextValue = useMemo<BloomThemeContextValue>(
299
311
  () => ({
300
312
  theme: buildTheme(colorPreset, resolved, isAdaptive),
@@ -310,10 +322,15 @@ export function BloomThemeProvider({
310
322
  const shouldAwait = awaitHydration ?? Boolean(persistKey && storage);
311
323
  const isGated = shouldAwait && !hydrated;
312
324
 
313
- const nativeVarsStyle = useMemo(
314
- () => (Platform.OS === 'web' ? undefined : buildNativePresetStyle(colorPreset, resolved)),
325
+ // The full `--name -> value` record for the active preset. On native this is
326
+ // handed to `VariableContextProvider` so descendants resolve `var(--primary)`
327
+ // etc. through react-native-css's real VariableContext. Web writes these to
328
+ // `document.documentElement` via `applyColorPresetVars`, so it's unused there.
329
+ const nativeVars = useMemo(
330
+ () => (Platform.OS === 'web' ? null : buildScopeVars(colorPreset, resolved)),
315
331
  [colorPreset, resolved],
316
332
  );
333
+ const VariableProvider = getVariableContextProvider();
317
334
 
318
335
  const content = (
319
336
  <FontLoader enabled={fonts} fallback={onFontsLoading}>
@@ -321,12 +338,21 @@ export function BloomThemeProvider({
321
338
  </FontLoader>
322
339
  );
323
340
 
341
+ if (Platform.OS === 'web') {
342
+ return <BloomThemeContext.Provider value={contextValue}>{content}</BloomThemeContext.Provider>;
343
+ }
344
+
345
+ // The flex wrapper is still needed for layout; the preset vars now flow
346
+ // through `VariableContextProvider` rather than an (inert) inline-vars style.
347
+ // If NativeWind isn't installed the wrapper still renders so we never crash.
348
+ const nativeTree = <View style={[{ flex: 1 }, nativeWrapperStyle]}>{content}</View>;
349
+
324
350
  return (
325
351
  <BloomThemeContext.Provider value={contextValue}>
326
- {Platform.OS === 'web' ? (
327
- content
352
+ {VariableProvider && nativeVars ? (
353
+ <VariableProvider value={nativeVars}>{nativeTree}</VariableProvider>
328
354
  ) : (
329
- <View style={[{ flex: 1 }, nativeVarsStyle, nativeWrapperStyle]}>{content}</View>
355
+ nativeTree
330
356
  )}
331
357
  </BloomThemeContext.Provider>
332
358
  );