orn-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 (407) hide show
  1. package/README.md +107 -0
  2. package/bin/orn-ui.mjs +228 -0
  3. package/lib/commonjs/atoms/Avatar.js +42 -0
  4. package/lib/commonjs/atoms/Avatar.js.map +1 -0
  5. package/lib/commonjs/atoms/Badge.js +82 -0
  6. package/lib/commonjs/atoms/Badge.js.map +1 -0
  7. package/lib/commonjs/atoms/Button.js +222 -0
  8. package/lib/commonjs/atoms/Button.js.map +1 -0
  9. package/lib/commonjs/atoms/Card.js +33 -0
  10. package/lib/commonjs/atoms/Card.js.map +1 -0
  11. package/lib/commonjs/atoms/Checkbox.js +107 -0
  12. package/lib/commonjs/atoms/Checkbox.js.map +1 -0
  13. package/lib/commonjs/atoms/Divider.js +27 -0
  14. package/lib/commonjs/atoms/Divider.js.map +1 -0
  15. package/lib/commonjs/atoms/EmptyState.js +69 -0
  16. package/lib/commonjs/atoms/EmptyState.js.map +1 -0
  17. package/lib/commonjs/atoms/Fab.js +62 -0
  18. package/lib/commonjs/atoms/Fab.js.map +1 -0
  19. package/lib/commonjs/atoms/IconButton.js +60 -0
  20. package/lib/commonjs/atoms/IconButton.js.map +1 -0
  21. package/lib/commonjs/atoms/Image.js +113 -0
  22. package/lib/commonjs/atoms/Image.js.map +1 -0
  23. package/lib/commonjs/atoms/Input.js +173 -0
  24. package/lib/commonjs/atoms/Input.js.map +1 -0
  25. package/lib/commonjs/atoms/KeyValueRow.js +60 -0
  26. package/lib/commonjs/atoms/KeyValueRow.js.map +1 -0
  27. package/lib/commonjs/atoms/PressableScale.js +60 -0
  28. package/lib/commonjs/atoms/PressableScale.js.map +1 -0
  29. package/lib/commonjs/atoms/Spinner.js +156 -0
  30. package/lib/commonjs/atoms/Spinner.js.map +1 -0
  31. package/lib/commonjs/atoms/Text.js +63 -0
  32. package/lib/commonjs/atoms/Text.js.map +1 -0
  33. package/lib/commonjs/atoms/index.js +135 -0
  34. package/lib/commonjs/atoms/index.js.map +1 -0
  35. package/lib/commonjs/icons/Icon.js +40 -0
  36. package/lib/commonjs/icons/Icon.js.map +1 -0
  37. package/lib/commonjs/icons/defaultIcons.js +386 -0
  38. package/lib/commonjs/icons/defaultIcons.js.map +1 -0
  39. package/lib/commonjs/icons/index.js +20 -0
  40. package/lib/commonjs/icons/index.js.map +1 -0
  41. package/lib/commonjs/icons/types.js +6 -0
  42. package/lib/commonjs/icons/types.js.map +1 -0
  43. package/lib/commonjs/index.js +61 -0
  44. package/lib/commonjs/index.js.map +1 -0
  45. package/lib/commonjs/molecules/AvatarHeader.js +87 -0
  46. package/lib/commonjs/molecules/AvatarHeader.js.map +1 -0
  47. package/lib/commonjs/molecules/FormActions.js +47 -0
  48. package/lib/commonjs/molecules/FormActions.js.map +1 -0
  49. package/lib/commonjs/molecules/InfoRow.js +83 -0
  50. package/lib/commonjs/molecules/InfoRow.js.map +1 -0
  51. package/lib/commonjs/molecules/OptionCard.js +98 -0
  52. package/lib/commonjs/molecules/OptionCard.js.map +1 -0
  53. package/lib/commonjs/molecules/Stepper.js +104 -0
  54. package/lib/commonjs/molecules/Stepper.js.map +1 -0
  55. package/lib/commonjs/molecules/Steps.js +220 -0
  56. package/lib/commonjs/molecules/Steps.js.map +1 -0
  57. package/lib/commonjs/molecules/ThemeToggle.js +91 -0
  58. package/lib/commonjs/molecules/ThemeToggle.js.map +1 -0
  59. package/lib/commonjs/molecules/index.js +55 -0
  60. package/lib/commonjs/molecules/index.js.map +1 -0
  61. package/lib/commonjs/organisms/Alert.js +223 -0
  62. package/lib/commonjs/organisms/Alert.js.map +1 -0
  63. package/lib/commonjs/organisms/AlertProvider.js +109 -0
  64. package/lib/commonjs/organisms/AlertProvider.js.map +1 -0
  65. package/lib/commonjs/organisms/BottomSheet.js +154 -0
  66. package/lib/commonjs/organisms/BottomSheet.js.map +1 -0
  67. package/lib/commonjs/organisms/DateField.js +147 -0
  68. package/lib/commonjs/organisms/DateField.js.map +1 -0
  69. package/lib/commonjs/organisms/DatePicker.js +253 -0
  70. package/lib/commonjs/organisms/DatePicker.js.map +1 -0
  71. package/lib/commonjs/organisms/List.js +143 -0
  72. package/lib/commonjs/organisms/List.js.map +1 -0
  73. package/lib/commonjs/organisms/Modal.js +286 -0
  74. package/lib/commonjs/organisms/Modal.js.map +1 -0
  75. package/lib/commonjs/organisms/Screen.js +75 -0
  76. package/lib/commonjs/organisms/Screen.js.map +1 -0
  77. package/lib/commonjs/organisms/SearchList.js +180 -0
  78. package/lib/commonjs/organisms/SearchList.js.map +1 -0
  79. package/lib/commonjs/organisms/Select.js +178 -0
  80. package/lib/commonjs/organisms/Select.js.map +1 -0
  81. package/lib/commonjs/organisms/Toast.js +157 -0
  82. package/lib/commonjs/organisms/Toast.js.map +1 -0
  83. package/lib/commonjs/organisms/ToastProvider.js +131 -0
  84. package/lib/commonjs/organisms/ToastProvider.js.map +1 -0
  85. package/lib/commonjs/organisms/Wizard.js +116 -0
  86. package/lib/commonjs/organisms/Wizard.js.map +1 -0
  87. package/lib/commonjs/organisms/index.js +127 -0
  88. package/lib/commonjs/organisms/index.js.map +1 -0
  89. package/lib/commonjs/package.json +1 -0
  90. package/lib/commonjs/theme/UIProvider.js +110 -0
  91. package/lib/commonjs/theme/UIProvider.js.map +1 -0
  92. package/lib/commonjs/theme/createStyles.js +42 -0
  93. package/lib/commonjs/theme/createStyles.js.map +1 -0
  94. package/lib/commonjs/theme/createTheme.js +50 -0
  95. package/lib/commonjs/theme/createTheme.js.map +1 -0
  96. package/lib/commonjs/theme/index.js +151 -0
  97. package/lib/commonjs/theme/index.js.map +1 -0
  98. package/lib/commonjs/theme/insets.js +15 -0
  99. package/lib/commonjs/theme/insets.js.map +1 -0
  100. package/lib/commonjs/theme/labels.js +18 -0
  101. package/lib/commonjs/theme/labels.js.map +1 -0
  102. package/lib/commonjs/theme/palettes.js +42 -0
  103. package/lib/commonjs/theme/palettes.js.map +1 -0
  104. package/lib/commonjs/theme/tokens.js +120 -0
  105. package/lib/commonjs/theme/tokens.js.map +1 -0
  106. package/lib/commonjs/theme/types.js +6 -0
  107. package/lib/commonjs/theme/types.js.map +1 -0
  108. package/lib/module/atoms/Avatar.js +37 -0
  109. package/lib/module/atoms/Avatar.js.map +1 -0
  110. package/lib/module/atoms/Badge.js +77 -0
  111. package/lib/module/atoms/Badge.js.map +1 -0
  112. package/lib/module/atoms/Button.js +217 -0
  113. package/lib/module/atoms/Button.js.map +1 -0
  114. package/lib/module/atoms/Card.js +28 -0
  115. package/lib/module/atoms/Card.js.map +1 -0
  116. package/lib/module/atoms/Checkbox.js +102 -0
  117. package/lib/module/atoms/Checkbox.js.map +1 -0
  118. package/lib/module/atoms/Divider.js +22 -0
  119. package/lib/module/atoms/Divider.js.map +1 -0
  120. package/lib/module/atoms/EmptyState.js +64 -0
  121. package/lib/module/atoms/EmptyState.js.map +1 -0
  122. package/lib/module/atoms/Fab.js +57 -0
  123. package/lib/module/atoms/Fab.js.map +1 -0
  124. package/lib/module/atoms/IconButton.js +55 -0
  125. package/lib/module/atoms/IconButton.js.map +1 -0
  126. package/lib/module/atoms/Image.js +108 -0
  127. package/lib/module/atoms/Image.js.map +1 -0
  128. package/lib/module/atoms/Input.js +168 -0
  129. package/lib/module/atoms/Input.js.map +1 -0
  130. package/lib/module/atoms/KeyValueRow.js +55 -0
  131. package/lib/module/atoms/KeyValueRow.js.map +1 -0
  132. package/lib/module/atoms/PressableScale.js +55 -0
  133. package/lib/module/atoms/PressableScale.js.map +1 -0
  134. package/lib/module/atoms/Spinner.js +151 -0
  135. package/lib/module/atoms/Spinner.js.map +1 -0
  136. package/lib/module/atoms/Text.js +58 -0
  137. package/lib/module/atoms/Text.js.map +1 -0
  138. package/lib/module/atoms/index.js +18 -0
  139. package/lib/module/atoms/index.js.map +1 -0
  140. package/lib/module/icons/Icon.js +35 -0
  141. package/lib/module/icons/Icon.js.map +1 -0
  142. package/lib/module/icons/defaultIcons.js +381 -0
  143. package/lib/module/icons/defaultIcons.js.map +1 -0
  144. package/lib/module/icons/index.js +5 -0
  145. package/lib/module/icons/index.js.map +1 -0
  146. package/lib/module/icons/types.js +4 -0
  147. package/lib/module/icons/types.js.map +1 -0
  148. package/lib/module/index.js +8 -0
  149. package/lib/module/index.js.map +1 -0
  150. package/lib/module/molecules/AvatarHeader.js +82 -0
  151. package/lib/module/molecules/AvatarHeader.js.map +1 -0
  152. package/lib/module/molecules/FormActions.js +42 -0
  153. package/lib/module/molecules/FormActions.js.map +1 -0
  154. package/lib/module/molecules/InfoRow.js +78 -0
  155. package/lib/module/molecules/InfoRow.js.map +1 -0
  156. package/lib/module/molecules/OptionCard.js +93 -0
  157. package/lib/module/molecules/OptionCard.js.map +1 -0
  158. package/lib/module/molecules/Stepper.js +99 -0
  159. package/lib/module/molecules/Stepper.js.map +1 -0
  160. package/lib/module/molecules/Steps.js +215 -0
  161. package/lib/module/molecules/Steps.js.map +1 -0
  162. package/lib/module/molecules/ThemeToggle.js +86 -0
  163. package/lib/module/molecules/ThemeToggle.js.map +1 -0
  164. package/lib/module/molecules/index.js +10 -0
  165. package/lib/module/molecules/index.js.map +1 -0
  166. package/lib/module/organisms/Alert.js +218 -0
  167. package/lib/module/organisms/Alert.js.map +1 -0
  168. package/lib/module/organisms/AlertProvider.js +103 -0
  169. package/lib/module/organisms/AlertProvider.js.map +1 -0
  170. package/lib/module/organisms/BottomSheet.js +149 -0
  171. package/lib/module/organisms/BottomSheet.js.map +1 -0
  172. package/lib/module/organisms/DateField.js +142 -0
  173. package/lib/module/organisms/DateField.js.map +1 -0
  174. package/lib/module/organisms/DatePicker.js +247 -0
  175. package/lib/module/organisms/DatePicker.js.map +1 -0
  176. package/lib/module/organisms/List.js +138 -0
  177. package/lib/module/organisms/List.js.map +1 -0
  178. package/lib/module/organisms/Modal.js +281 -0
  179. package/lib/module/organisms/Modal.js.map +1 -0
  180. package/lib/module/organisms/Screen.js +70 -0
  181. package/lib/module/organisms/Screen.js.map +1 -0
  182. package/lib/module/organisms/SearchList.js +175 -0
  183. package/lib/module/organisms/SearchList.js.map +1 -0
  184. package/lib/module/organisms/Select.js +173 -0
  185. package/lib/module/organisms/Select.js.map +1 -0
  186. package/lib/module/organisms/Toast.js +152 -0
  187. package/lib/module/organisms/Toast.js.map +1 -0
  188. package/lib/module/organisms/ToastProvider.js +125 -0
  189. package/lib/module/organisms/ToastProvider.js.map +1 -0
  190. package/lib/module/organisms/Wizard.js +111 -0
  191. package/lib/module/organisms/Wizard.js.map +1 -0
  192. package/lib/module/organisms/index.js +16 -0
  193. package/lib/module/organisms/index.js.map +1 -0
  194. package/lib/module/package.json +1 -0
  195. package/lib/module/theme/UIProvider.js +97 -0
  196. package/lib/module/theme/UIProvider.js.map +1 -0
  197. package/lib/module/theme/createStyles.js +38 -0
  198. package/lib/module/theme/createStyles.js.map +1 -0
  199. package/lib/module/theme/createTheme.js +45 -0
  200. package/lib/module/theme/createTheme.js.map +1 -0
  201. package/lib/module/theme/index.js +10 -0
  202. package/lib/module/theme/index.js.map +1 -0
  203. package/lib/module/theme/insets.js +11 -0
  204. package/lib/module/theme/insets.js.map +1 -0
  205. package/lib/module/theme/labels.js +14 -0
  206. package/lib/module/theme/labels.js.map +1 -0
  207. package/lib/module/theme/palettes.js +38 -0
  208. package/lib/module/theme/palettes.js.map +1 -0
  209. package/lib/module/theme/tokens.js +117 -0
  210. package/lib/module/theme/tokens.js.map +1 -0
  211. package/lib/module/theme/types.js +4 -0
  212. package/lib/module/theme/types.js.map +1 -0
  213. package/lib/typescript/atoms/Avatar.d.ts +15 -0
  214. package/lib/typescript/atoms/Avatar.d.ts.map +1 -0
  215. package/lib/typescript/atoms/Badge.d.ts +19 -0
  216. package/lib/typescript/atoms/Badge.d.ts.map +1 -0
  217. package/lib/typescript/atoms/Button.d.ts +30 -0
  218. package/lib/typescript/atoms/Button.d.ts.map +1 -0
  219. package/lib/typescript/atoms/Card.d.ts +8 -0
  220. package/lib/typescript/atoms/Card.d.ts.map +1 -0
  221. package/lib/typescript/atoms/Checkbox.d.ts +11 -0
  222. package/lib/typescript/atoms/Checkbox.d.ts.map +1 -0
  223. package/lib/typescript/atoms/Divider.d.ts +8 -0
  224. package/lib/typescript/atoms/Divider.d.ts.map +1 -0
  225. package/lib/typescript/atoms/EmptyState.d.ts +12 -0
  226. package/lib/typescript/atoms/EmptyState.d.ts.map +1 -0
  227. package/lib/typescript/atoms/Fab.d.ts +22 -0
  228. package/lib/typescript/atoms/Fab.d.ts.map +1 -0
  229. package/lib/typescript/atoms/IconButton.d.ts +23 -0
  230. package/lib/typescript/atoms/IconButton.d.ts.map +1 -0
  231. package/lib/typescript/atoms/Image.d.ts +45 -0
  232. package/lib/typescript/atoms/Image.d.ts.map +1 -0
  233. package/lib/typescript/atoms/Input.d.ts +24 -0
  234. package/lib/typescript/atoms/Input.d.ts.map +1 -0
  235. package/lib/typescript/atoms/KeyValueRow.d.ts +17 -0
  236. package/lib/typescript/atoms/KeyValueRow.d.ts.map +1 -0
  237. package/lib/typescript/atoms/PressableScale.d.ts +15 -0
  238. package/lib/typescript/atoms/PressableScale.d.ts.map +1 -0
  239. package/lib/typescript/atoms/Spinner.d.ts +20 -0
  240. package/lib/typescript/atoms/Spinner.d.ts.map +1 -0
  241. package/lib/typescript/atoms/Text.d.ts +13 -0
  242. package/lib/typescript/atoms/Text.d.ts.map +1 -0
  243. package/lib/typescript/atoms/index.d.ts +31 -0
  244. package/lib/typescript/atoms/index.d.ts.map +1 -0
  245. package/lib/typescript/icons/Icon.d.ts +18 -0
  246. package/lib/typescript/icons/Icon.d.ts.map +1 -0
  247. package/lib/typescript/icons/defaultIcons.d.ts +5 -0
  248. package/lib/typescript/icons/defaultIcons.d.ts.map +1 -0
  249. package/lib/typescript/icons/index.d.ts +5 -0
  250. package/lib/typescript/icons/index.d.ts.map +1 -0
  251. package/lib/typescript/icons/types.d.ts +10 -0
  252. package/lib/typescript/icons/types.d.ts.map +1 -0
  253. package/lib/typescript/index.d.ts +6 -0
  254. package/lib/typescript/index.d.ts.map +1 -0
  255. package/lib/typescript/molecules/AvatarHeader.d.ts +20 -0
  256. package/lib/typescript/molecules/AvatarHeader.d.ts.map +1 -0
  257. package/lib/typescript/molecules/FormActions.d.ts +21 -0
  258. package/lib/typescript/molecules/FormActions.d.ts.map +1 -0
  259. package/lib/typescript/molecules/InfoRow.d.ts +17 -0
  260. package/lib/typescript/molecules/InfoRow.d.ts.map +1 -0
  261. package/lib/typescript/molecules/OptionCard.d.ts +20 -0
  262. package/lib/typescript/molecules/OptionCard.d.ts.map +1 -0
  263. package/lib/typescript/molecules/Stepper.d.ts +15 -0
  264. package/lib/typescript/molecules/Stepper.d.ts.map +1 -0
  265. package/lib/typescript/molecules/Steps.d.ts +29 -0
  266. package/lib/typescript/molecules/Steps.d.ts.map +1 -0
  267. package/lib/typescript/molecules/ThemeToggle.d.ts +15 -0
  268. package/lib/typescript/molecules/ThemeToggle.d.ts.map +1 -0
  269. package/lib/typescript/molecules/index.d.ts +15 -0
  270. package/lib/typescript/molecules/index.d.ts.map +1 -0
  271. package/lib/typescript/organisms/Alert.d.ts +29 -0
  272. package/lib/typescript/organisms/Alert.d.ts.map +1 -0
  273. package/lib/typescript/organisms/AlertProvider.d.ts +32 -0
  274. package/lib/typescript/organisms/AlertProvider.d.ts.map +1 -0
  275. package/lib/typescript/organisms/BottomSheet.d.ts +15 -0
  276. package/lib/typescript/organisms/BottomSheet.d.ts.map +1 -0
  277. package/lib/typescript/organisms/DateField.d.ts +26 -0
  278. package/lib/typescript/organisms/DateField.d.ts.map +1 -0
  279. package/lib/typescript/organisms/DatePicker.d.ts +49 -0
  280. package/lib/typescript/organisms/DatePicker.d.ts.map +1 -0
  281. package/lib/typescript/organisms/List.d.ts +35 -0
  282. package/lib/typescript/organisms/List.d.ts.map +1 -0
  283. package/lib/typescript/organisms/Modal.d.ts +25 -0
  284. package/lib/typescript/organisms/Modal.d.ts.map +1 -0
  285. package/lib/typescript/organisms/Screen.d.ts +26 -0
  286. package/lib/typescript/organisms/Screen.d.ts.map +1 -0
  287. package/lib/typescript/organisms/SearchList.d.ts +40 -0
  288. package/lib/typescript/organisms/SearchList.d.ts.map +1 -0
  289. package/lib/typescript/organisms/Select.d.ts +25 -0
  290. package/lib/typescript/organisms/Select.d.ts.map +1 -0
  291. package/lib/typescript/organisms/Toast.d.ts +28 -0
  292. package/lib/typescript/organisms/Toast.d.ts.map +1 -0
  293. package/lib/typescript/organisms/ToastProvider.d.ts +36 -0
  294. package/lib/typescript/organisms/ToastProvider.d.ts.map +1 -0
  295. package/lib/typescript/organisms/Wizard.d.ts +40 -0
  296. package/lib/typescript/organisms/Wizard.d.ts.map +1 -0
  297. package/lib/typescript/organisms/index.d.ts +27 -0
  298. package/lib/typescript/organisms/index.d.ts.map +1 -0
  299. package/lib/typescript/theme/UIProvider.d.ts +47 -0
  300. package/lib/typescript/theme/UIProvider.d.ts.map +1 -0
  301. package/lib/typescript/theme/createStyles.d.ts +21 -0
  302. package/lib/typescript/theme/createStyles.d.ts.map +1 -0
  303. package/lib/typescript/theme/createTheme.d.ts +9 -0
  304. package/lib/typescript/theme/createTheme.d.ts.map +1 -0
  305. package/lib/typescript/theme/index.d.ts +14 -0
  306. package/lib/typescript/theme/index.d.ts.map +1 -0
  307. package/lib/typescript/theme/insets.d.ts +9 -0
  308. package/lib/typescript/theme/insets.d.ts.map +1 -0
  309. package/lib/typescript/theme/labels.d.ts +13 -0
  310. package/lib/typescript/theme/labels.d.ts.map +1 -0
  311. package/lib/typescript/theme/palettes.d.ts +24 -0
  312. package/lib/typescript/theme/palettes.d.ts.map +1 -0
  313. package/lib/typescript/theme/tokens.d.ts +41 -0
  314. package/lib/typescript/theme/tokens.d.ts.map +1 -0
  315. package/lib/typescript/theme/types.d.ts +24 -0
  316. package/lib/typescript/theme/types.d.ts.map +1 -0
  317. package/package.json +311 -0
  318. package/registry/alert-provider.json +21 -0
  319. package/registry/alert.json +19 -0
  320. package/registry/avatar-header.json +18 -0
  321. package/registry/avatar.json +18 -0
  322. package/registry/badge.json +18 -0
  323. package/registry/bottom-sheet.json +18 -0
  324. package/registry/button.json +18 -0
  325. package/registry/card.json +18 -0
  326. package/registry/checkbox.json +18 -0
  327. package/registry/core.json +64 -0
  328. package/registry/date-field.json +24 -0
  329. package/registry/date-picker.json +23 -0
  330. package/registry/divider.json +18 -0
  331. package/registry/empty-state.json +18 -0
  332. package/registry/fab.json +19 -0
  333. package/registry/form-actions.json +19 -0
  334. package/registry/icon-button.json +19 -0
  335. package/registry/image.json +20 -0
  336. package/registry/index.json +465 -0
  337. package/registry/info-row.json +19 -0
  338. package/registry/input.json +18 -0
  339. package/registry/key-value-row.json +18 -0
  340. package/registry/list.json +20 -0
  341. package/registry/manifest.json +263 -0
  342. package/registry/modal.json +21 -0
  343. package/registry/option-card.json +18 -0
  344. package/registry/pressable-scale.json +18 -0
  345. package/registry/screen.json +18 -0
  346. package/registry/search-list.json +23 -0
  347. package/registry/select.json +18 -0
  348. package/registry/spinner.json +18 -0
  349. package/registry/stepper.json +18 -0
  350. package/registry/steps.json +18 -0
  351. package/registry/theme-toggle.json +18 -0
  352. package/registry/title.json +21 -0
  353. package/registry/toast-provider.json +20 -0
  354. package/registry/toast.json +18 -0
  355. package/registry/wizard.json +20 -0
  356. package/src/atoms/Avatar.tsx +40 -0
  357. package/src/atoms/Badge.tsx +55 -0
  358. package/src/atoms/Button.tsx +186 -0
  359. package/src/atoms/Card.tsx +27 -0
  360. package/src/atoms/Checkbox.tsx +75 -0
  361. package/src/atoms/Divider.tsx +14 -0
  362. package/src/atoms/EmptyState.tsx +60 -0
  363. package/src/atoms/Fab.tsx +63 -0
  364. package/src/atoms/IconButton.tsx +53 -0
  365. package/src/atoms/Image.tsx +137 -0
  366. package/src/atoms/Input.tsx +166 -0
  367. package/src/atoms/KeyValueRow.tsx +48 -0
  368. package/src/atoms/PressableScale.tsx +52 -0
  369. package/src/atoms/Spinner.tsx +127 -0
  370. package/src/atoms/Text.tsx +58 -0
  371. package/src/atoms/index.ts +30 -0
  372. package/src/icons/Icon.tsx +27 -0
  373. package/src/icons/defaultIcons.tsx +292 -0
  374. package/src/icons/index.ts +4 -0
  375. package/src/icons/types.ts +27 -0
  376. package/src/index.ts +5 -0
  377. package/src/molecules/AvatarHeader.tsx +69 -0
  378. package/src/molecules/FormActions.tsx +52 -0
  379. package/src/molecules/InfoRow.tsx +52 -0
  380. package/src/molecules/OptionCard.tsx +82 -0
  381. package/src/molecules/Stepper.tsx +76 -0
  382. package/src/molecules/Steps.tsx +198 -0
  383. package/src/molecules/ThemeToggle.tsx +67 -0
  384. package/src/molecules/index.ts +14 -0
  385. package/src/organisms/Alert.tsx +162 -0
  386. package/src/organisms/AlertProvider.tsx +125 -0
  387. package/src/organisms/BottomSheet.tsx +95 -0
  388. package/src/organisms/DateField.tsx +134 -0
  389. package/src/organisms/DatePicker.tsx +255 -0
  390. package/src/organisms/List.tsx +154 -0
  391. package/src/organisms/Modal.tsx +251 -0
  392. package/src/organisms/Screen.tsx +84 -0
  393. package/src/organisms/SearchList.tsx +186 -0
  394. package/src/organisms/Select.tsx +156 -0
  395. package/src/organisms/Toast.tsx +135 -0
  396. package/src/organisms/ToastProvider.tsx +166 -0
  397. package/src/organisms/Wizard.tsx +137 -0
  398. package/src/organisms/index.ts +26 -0
  399. package/src/theme/UIProvider.tsx +129 -0
  400. package/src/theme/createStyles.ts +40 -0
  401. package/src/theme/createTheme.ts +49 -0
  402. package/src/theme/index.ts +22 -0
  403. package/src/theme/insets.ts +9 -0
  404. package/src/theme/labels.ts +23 -0
  405. package/src/theme/palettes.ts +53 -0
  406. package/src/theme/tokens.ts +113 -0
  407. package/src/theme/types.ts +27 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTheme.d.ts","sourceRoot":"","sources":["../../../src/theme/createTheme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAuBhE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,CAAC,EAAE,cAAc,GAAG,SAAS,CAgBjE;AAED,eAAO,MAAM,YAAY,EAAE,SAAyB,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { spacing, radius, fontSize, fontWeight, lineHeight, duration, shadow, tokens } from './tokens';
2
+ export type { Tokens } from './tokens';
3
+ export { lightPalette, darkPalette } from './palettes';
4
+ export type { ThemeColors } from './palettes';
5
+ export { createTheme, defaultTheme } from './createTheme';
6
+ export type { Theme, ThemePair, ThemeOverrides, DeepPartial } from './types';
7
+ export { defaultLabels } from './labels';
8
+ export type { Labels } from './labels';
9
+ export { zeroInsets } from './insets';
10
+ export type { EdgeInsets } from './insets';
11
+ export { createStyles } from './createStyles';
12
+ export { UIProvider, useTheme, useColors, useThemeMode, useIcons, useInsets, useLabels, useAllowFontScaling, } from './UIProvider';
13
+ export type { UIProviderProps, ThemeMode } from './UIProvider';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvG,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,EACT,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** Estructuralmente igual a EdgeInsets de react-native-safe-area-context, sin depender del paquete. */
2
+ export interface EdgeInsets {
3
+ top: number;
4
+ right: number;
5
+ bottom: number;
6
+ left: number;
7
+ }
8
+ export declare const zeroInsets: EdgeInsets;
9
+ //# sourceMappingURL=insets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insets.d.ts","sourceRoot":"","sources":["../../../src/theme/insets.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,EAAE,UAAqD,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface Labels {
2
+ close: string;
3
+ cancel: string;
4
+ confirm: string;
5
+ loading: string;
6
+ loadingMore: string;
7
+ noResultsTitle: string;
8
+ noResultsDescription: string;
9
+ search: string;
10
+ selectPlaceholder: string;
11
+ }
12
+ export declare const defaultLabels: Labels;
13
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/theme/labels.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,EAAE,MAU3B,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Cada color es `string`, no un literal (`as const`): light y dark tienen
3
+ * valores distintos para la misma clave, y createTheme() debe poder
4
+ * aceptar cualquier hex/rgba en los overrides — literal typing lo impediría.
5
+ */
6
+ export interface ThemeColors {
7
+ primary: string;
8
+ secondary: string;
9
+ white: string;
10
+ black: string;
11
+ error: string;
12
+ success: string;
13
+ warning: string;
14
+ background: string;
15
+ surface: string;
16
+ text: string;
17
+ textLight: string;
18
+ border: string;
19
+ inputBackground: string;
20
+ overlay: string;
21
+ }
22
+ export declare const lightPalette: ThemeColors;
23
+ export declare const darkPalette: ThemeColors;
24
+ //# sourceMappingURL=palettes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palettes.d.ts","sourceRoot":"","sources":["../../../src/theme/palettes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAYD,eAAO,MAAM,YAAY,EAAE,WAS1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WASzB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { type ViewStyle } from 'react-native';
2
+ /**
3
+ * Escala de espaciado. Usar siempre estos valores en vez de números mágicos
4
+ * para que el ritmo vertical/horizontal sea consistente entre componentes.
5
+ */
6
+ export declare const spacing: Record<'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl', number>;
7
+ export declare const radius: Record<'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'full', number>;
8
+ export declare const fontSize: Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', number>;
9
+ export declare const fontWeight: {
10
+ readonly regular: "400";
11
+ readonly medium: "500";
12
+ readonly semibold: "600";
13
+ readonly bold: "700";
14
+ };
15
+ export declare const lineHeight: Record<'sm' | 'md' | 'lg', number>;
16
+ /** Duraciones en ms para Animated.timing/spring. */
17
+ export declare const duration: Record<'fast' | 'base' | 'slow', number>;
18
+ type ShadowStyle = Pick<ViewStyle, 'shadowColor' | 'shadowOffset' | 'shadowOpacity' | 'shadowRadius' | 'elevation'>;
19
+ /**
20
+ * Sombras cross-platform: shadow* para iOS, elevation para Android.
21
+ * `shadowColor` se deja en negro fijo — el color de sombra por tema es un
22
+ * detalle demasiado fino para justificar la complejidad de resolverlo aquí.
23
+ */
24
+ export declare const shadow: Record<'none' | 'sm' | 'md' | 'lg', ShadowStyle>;
25
+ export declare const tokens: {
26
+ spacing: Record<"xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl", number>;
27
+ radius: Record<"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "none" | "full", number>;
28
+ fontSize: Record<"xs" | "sm" | "md" | "lg" | "xl" | "xxl", number>;
29
+ fontWeight: {
30
+ readonly regular: "400";
31
+ readonly medium: "500";
32
+ readonly semibold: "600";
33
+ readonly bold: "700";
34
+ };
35
+ lineHeight: Record<"sm" | "md" | "lg", number>;
36
+ duration: Record<"fast" | "base" | "slow", number>;
37
+ shadow: Record<"sm" | "md" | "lg" | "none", ShadowStyle>;
38
+ };
39
+ export type Tokens = typeof tokens;
40
+ export {};
41
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/theme/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOxD;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,EAAE,MAAM,CAS7F,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,EAAE,MAAM,CAS7F,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,MAAM,CAO7E,CAAC;AAIF,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAIzD,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,MAAM,CAI7D,CAAC;AAEF,KAAK,WAAW,GAAG,IAAI,CACrB,SAAS,EACT,aAAa,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,WAAW,CAChF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,WAAW,CA0BnE,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAQlB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { Tokens } from './tokens';
2
+ import type { ThemeColors } from './palettes';
3
+ /** Theme resuelto: paleta de un scheme concreto + tokens compartidos. */
4
+ export interface Theme {
5
+ colors: ThemeColors;
6
+ tokens: Tokens;
7
+ scheme: 'light' | 'dark';
8
+ }
9
+ /** Par de themes light/dark que produce createTheme() y consume UIProvider. */
10
+ export interface ThemePair {
11
+ light: Theme;
12
+ dark: Theme;
13
+ }
14
+ export type DeepPartial<T> = {
15
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
16
+ };
17
+ export interface ThemeOverrides {
18
+ colors?: {
19
+ light?: Partial<ThemeColors>;
20
+ dark?: Partial<ThemeColors>;
21
+ };
22
+ tokens?: DeepPartial<Tokens>;
23
+ }
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/theme/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,yEAAyE;AACzE,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED,+EAA+E;AAC/E,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QAC7B,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;KAC7B,CAAC;IACF,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9B"}
package/package.json ADDED
@@ -0,0 +1,311 @@
1
+ {
2
+ "name": "orn-ui",
3
+ "version": "0.1.0",
4
+ "description": "Fast, tree-shakeable, atomic-design component library for React Native. Zero runtime dependencies.",
5
+ "main": "lib/commonjs/index.js",
6
+ "module": "lib/module/index.js",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index.ts",
9
+ "source": "src/index.ts",
10
+ "sideEffects": false,
11
+ "bin": {
12
+ "orn-ui": "./bin/orn-ui.mjs"
13
+ },
14
+ "files": [
15
+ "src",
16
+ "lib",
17
+ "bin",
18
+ "registry",
19
+ "!**/__tests__",
20
+ "!**/*.test.*"
21
+ ],
22
+ "exports": {
23
+ ".": {
24
+ "types": "./lib/typescript/index.d.ts",
25
+ "react-native": "./src/index.ts",
26
+ "default": "./lib/module/index.js"
27
+ },
28
+ "./title": {
29
+ "types": "./lib/typescript/atoms/Text.d.ts",
30
+ "react-native": "./src/atoms/Text.tsx",
31
+ "default": "./lib/module/atoms/Text.js"
32
+ },
33
+ "./subtitle": {
34
+ "types": "./lib/typescript/atoms/Text.d.ts",
35
+ "react-native": "./src/atoms/Text.tsx",
36
+ "default": "./lib/module/atoms/Text.js"
37
+ },
38
+ "./body": {
39
+ "types": "./lib/typescript/atoms/Text.d.ts",
40
+ "react-native": "./src/atoms/Text.tsx",
41
+ "default": "./lib/module/atoms/Text.js"
42
+ },
43
+ "./caption": {
44
+ "types": "./lib/typescript/atoms/Text.d.ts",
45
+ "react-native": "./src/atoms/Text.tsx",
46
+ "default": "./lib/module/atoms/Text.js"
47
+ },
48
+ "./button": {
49
+ "types": "./lib/typescript/atoms/Button.d.ts",
50
+ "react-native": "./src/atoms/Button.tsx",
51
+ "default": "./lib/module/atoms/Button.js"
52
+ },
53
+ "./icon-button": {
54
+ "types": "./lib/typescript/atoms/IconButton.d.ts",
55
+ "react-native": "./src/atoms/IconButton.tsx",
56
+ "default": "./lib/module/atoms/IconButton.js"
57
+ },
58
+ "./input": {
59
+ "types": "./lib/typescript/atoms/Input.d.ts",
60
+ "react-native": "./src/atoms/Input.tsx",
61
+ "default": "./lib/module/atoms/Input.js"
62
+ },
63
+ "./checkbox": {
64
+ "types": "./lib/typescript/atoms/Checkbox.d.ts",
65
+ "react-native": "./src/atoms/Checkbox.tsx",
66
+ "default": "./lib/module/atoms/Checkbox.js"
67
+ },
68
+ "./badge": {
69
+ "types": "./lib/typescript/atoms/Badge.d.ts",
70
+ "react-native": "./src/atoms/Badge.tsx",
71
+ "default": "./lib/module/atoms/Badge.js"
72
+ },
73
+ "./card": {
74
+ "types": "./lib/typescript/atoms/Card.d.ts",
75
+ "react-native": "./src/atoms/Card.tsx",
76
+ "default": "./lib/module/atoms/Card.js"
77
+ },
78
+ "./divider": {
79
+ "types": "./lib/typescript/atoms/Divider.d.ts",
80
+ "react-native": "./src/atoms/Divider.tsx",
81
+ "default": "./lib/module/atoms/Divider.js"
82
+ },
83
+ "./avatar": {
84
+ "types": "./lib/typescript/atoms/Avatar.d.ts",
85
+ "react-native": "./src/atoms/Avatar.tsx",
86
+ "default": "./lib/module/atoms/Avatar.js"
87
+ },
88
+ "./image": {
89
+ "types": "./lib/typescript/atoms/Image.d.ts",
90
+ "react-native": "./src/atoms/Image.tsx",
91
+ "default": "./lib/module/atoms/Image.js"
92
+ },
93
+ "./prefetch-image": {
94
+ "types": "./lib/typescript/atoms/Image.d.ts",
95
+ "react-native": "./src/atoms/Image.tsx",
96
+ "default": "./lib/module/atoms/Image.js"
97
+ },
98
+ "./spinner": {
99
+ "types": "./lib/typescript/atoms/Spinner.d.ts",
100
+ "react-native": "./src/atoms/Spinner.tsx",
101
+ "default": "./lib/module/atoms/Spinner.js"
102
+ },
103
+ "./empty-state": {
104
+ "types": "./lib/typescript/atoms/EmptyState.d.ts",
105
+ "react-native": "./src/atoms/EmptyState.tsx",
106
+ "default": "./lib/module/atoms/EmptyState.js"
107
+ },
108
+ "./key-value-row": {
109
+ "types": "./lib/typescript/atoms/KeyValueRow.d.ts",
110
+ "react-native": "./src/atoms/KeyValueRow.tsx",
111
+ "default": "./lib/module/atoms/KeyValueRow.js"
112
+ },
113
+ "./fab": {
114
+ "types": "./lib/typescript/atoms/Fab.d.ts",
115
+ "react-native": "./src/atoms/Fab.tsx",
116
+ "default": "./lib/module/atoms/Fab.js"
117
+ },
118
+ "./pressable-scale": {
119
+ "types": "./lib/typescript/atoms/PressableScale.d.ts",
120
+ "react-native": "./src/atoms/PressableScale.tsx",
121
+ "default": "./lib/module/atoms/PressableScale.js"
122
+ },
123
+ "./stepper": {
124
+ "types": "./lib/typescript/molecules/Stepper.d.ts",
125
+ "react-native": "./src/molecules/Stepper.tsx",
126
+ "default": "./lib/module/molecules/Stepper.js"
127
+ },
128
+ "./option-card": {
129
+ "types": "./lib/typescript/molecules/OptionCard.d.ts",
130
+ "react-native": "./src/molecules/OptionCard.tsx",
131
+ "default": "./lib/module/molecules/OptionCard.js"
132
+ },
133
+ "./info-row": {
134
+ "types": "./lib/typescript/molecules/InfoRow.d.ts",
135
+ "react-native": "./src/molecules/InfoRow.tsx",
136
+ "default": "./lib/module/molecules/InfoRow.js"
137
+ },
138
+ "./form-actions": {
139
+ "types": "./lib/typescript/molecules/FormActions.d.ts",
140
+ "react-native": "./src/molecules/FormActions.tsx",
141
+ "default": "./lib/module/molecules/FormActions.js"
142
+ },
143
+ "./avatar-header": {
144
+ "types": "./lib/typescript/molecules/AvatarHeader.d.ts",
145
+ "react-native": "./src/molecules/AvatarHeader.tsx",
146
+ "default": "./lib/module/molecules/AvatarHeader.js"
147
+ },
148
+ "./theme-toggle": {
149
+ "types": "./lib/typescript/molecules/ThemeToggle.d.ts",
150
+ "react-native": "./src/molecules/ThemeToggle.tsx",
151
+ "default": "./lib/module/molecules/ThemeToggle.js"
152
+ },
153
+ "./steps": {
154
+ "types": "./lib/typescript/molecules/Steps.d.ts",
155
+ "react-native": "./src/molecules/Steps.tsx",
156
+ "default": "./lib/module/molecules/Steps.js"
157
+ },
158
+ "./modal": {
159
+ "types": "./lib/typescript/organisms/Modal.d.ts",
160
+ "react-native": "./src/organisms/Modal.tsx",
161
+ "default": "./lib/module/organisms/Modal.js"
162
+ },
163
+ "./bottom-sheet": {
164
+ "types": "./lib/typescript/organisms/BottomSheet.d.ts",
165
+ "react-native": "./src/organisms/BottomSheet.tsx",
166
+ "default": "./lib/module/organisms/BottomSheet.js"
167
+ },
168
+ "./select": {
169
+ "types": "./lib/typescript/organisms/Select.d.ts",
170
+ "react-native": "./src/organisms/Select.tsx",
171
+ "default": "./lib/module/organisms/Select.js"
172
+ },
173
+ "./alert": {
174
+ "types": "./lib/typescript/organisms/Alert.d.ts",
175
+ "react-native": "./src/organisms/Alert.tsx",
176
+ "default": "./lib/module/organisms/Alert.js"
177
+ },
178
+ "./alert-provider": {
179
+ "types": "./lib/typescript/organisms/AlertProvider.d.ts",
180
+ "react-native": "./src/organisms/AlertProvider.tsx",
181
+ "default": "./lib/module/organisms/AlertProvider.js"
182
+ },
183
+ "./use-alert": {
184
+ "types": "./lib/typescript/organisms/AlertProvider.d.ts",
185
+ "react-native": "./src/organisms/AlertProvider.tsx",
186
+ "default": "./lib/module/organisms/AlertProvider.js"
187
+ },
188
+ "./screen": {
189
+ "types": "./lib/typescript/organisms/Screen.d.ts",
190
+ "react-native": "./src/organisms/Screen.tsx",
191
+ "default": "./lib/module/organisms/Screen.js"
192
+ },
193
+ "./list": {
194
+ "types": "./lib/typescript/organisms/List.d.ts",
195
+ "react-native": "./src/organisms/List.tsx",
196
+ "default": "./lib/module/organisms/List.js"
197
+ },
198
+ "./search-list": {
199
+ "types": "./lib/typescript/organisms/SearchList.d.ts",
200
+ "react-native": "./src/organisms/SearchList.tsx",
201
+ "default": "./lib/module/organisms/SearchList.js"
202
+ },
203
+ "./toast": {
204
+ "types": "./lib/typescript/organisms/Toast.d.ts",
205
+ "react-native": "./src/organisms/Toast.tsx",
206
+ "default": "./lib/module/organisms/Toast.js"
207
+ },
208
+ "./toast-provider": {
209
+ "types": "./lib/typescript/organisms/ToastProvider.d.ts",
210
+ "react-native": "./src/organisms/ToastProvider.tsx",
211
+ "default": "./lib/module/organisms/ToastProvider.js"
212
+ },
213
+ "./use-toast": {
214
+ "types": "./lib/typescript/organisms/ToastProvider.d.ts",
215
+ "react-native": "./src/organisms/ToastProvider.tsx",
216
+ "default": "./lib/module/organisms/ToastProvider.js"
217
+ },
218
+ "./date-picker": {
219
+ "types": "./lib/typescript/organisms/DatePicker.d.ts",
220
+ "react-native": "./src/organisms/DatePicker.tsx",
221
+ "default": "./lib/module/organisms/DatePicker.js"
222
+ },
223
+ "./build-month-grid": {
224
+ "types": "./lib/typescript/organisms/DatePicker.d.ts",
225
+ "react-native": "./src/organisms/DatePicker.tsx",
226
+ "default": "./lib/module/organisms/DatePicker.js"
227
+ },
228
+ "./default-month-names": {
229
+ "types": "./lib/typescript/organisms/DatePicker.d.ts",
230
+ "react-native": "./src/organisms/DatePicker.tsx",
231
+ "default": "./lib/module/organisms/DatePicker.js"
232
+ },
233
+ "./default-weekday-names": {
234
+ "types": "./lib/typescript/organisms/DatePicker.d.ts",
235
+ "react-native": "./src/organisms/DatePicker.tsx",
236
+ "default": "./lib/module/organisms/DatePicker.js"
237
+ },
238
+ "./date-field": {
239
+ "types": "./lib/typescript/organisms/DateField.d.ts",
240
+ "react-native": "./src/organisms/DateField.tsx",
241
+ "default": "./lib/module/organisms/DateField.js"
242
+ },
243
+ "./wizard": {
244
+ "types": "./lib/typescript/organisms/Wizard.d.ts",
245
+ "react-native": "./src/organisms/Wizard.tsx",
246
+ "default": "./lib/module/organisms/Wizard.js"
247
+ },
248
+ "./theme": {
249
+ "types": "./lib/typescript/theme/index.d.ts",
250
+ "react-native": "./src/theme/index.ts",
251
+ "default": "./lib/module/theme/index.js"
252
+ },
253
+ "./icons": {
254
+ "types": "./lib/typescript/icons/index.d.ts",
255
+ "react-native": "./src/icons/index.ts",
256
+ "default": "./lib/module/icons/index.js"
257
+ },
258
+ "./package.json": "./package.json"
259
+ },
260
+ "peerDependencies": {
261
+ "react": ">=18.0.0",
262
+ "react-native": ">=0.73.0"
263
+ },
264
+ "devDependencies": {
265
+ "@react-native/jest-preset": "^0.86.2",
266
+ "@types/jest": "^29.5.14",
267
+ "@testing-library/react-native": "^13.3.3",
268
+ "@types/react": "~19.2.14",
269
+ "@types/react-test-renderer": "^19.1.0",
270
+ "jest": "^29.7.0",
271
+ "react": "19.2.3",
272
+ "react-native": "0.86.2",
273
+ "react-native-builder-bob": "^0.35.3",
274
+ "react-test-renderer": "19.2.3",
275
+ "typescript": "~5.9.3"
276
+ },
277
+ "keywords": [
278
+ "react-native",
279
+ "ui",
280
+ "components",
281
+ "atomic-design"
282
+ ],
283
+ "license": "MIT",
284
+ "publishConfig": {
285
+ "access": "public"
286
+ },
287
+ "react-native-builder-bob": {
288
+ "source": "src",
289
+ "output": "lib",
290
+ "targets": [
291
+ "commonjs",
292
+ "module",
293
+ [
294
+ "typescript",
295
+ {
296
+ "project": "tsconfig.build.json"
297
+ }
298
+ ]
299
+ ]
300
+ },
301
+ "scripts": {
302
+ "gen:exports": "node scripts/gen-exports.mjs",
303
+ "gen:exports:check": "node scripts/gen-exports.mjs --check",
304
+ "build:registry": "node scripts/build-registry.mjs",
305
+ "test:cli": "node scripts/smoke-test-cli.mjs",
306
+ "build": "node scripts/gen-exports.mjs && node scripts/build-registry.mjs && bob build",
307
+ "typecheck": "tsc --noEmit",
308
+ "test": "jest",
309
+ "test:coverage": "jest --coverage"
310
+ }
311
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "AlertProvider",
3
+ "slug": "alert-provider",
4
+ "type": "component",
5
+ "category": "organisms",
6
+ "exportedNames": [
7
+ "AlertProvider",
8
+ "useAlert"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "organisms/AlertProvider.tsx",
13
+ "content": "import React, { createContext, useCallback, useContext, useMemo, useRef, useState } from 'react';\nimport { Alert, type AlertButton, type AlertType } from './Alert';\n\nexport interface AlertOptions {\n title: string;\n message?: string;\n type?: AlertType;\n confirmText?: string;\n cancelText?: string;\n}\n\nexport interface ConfirmOptions extends AlertOptions {\n /** Botón de confirmar en rojo/destructivo (para \"eliminar\", etc). */\n destructive?: boolean;\n}\n\ninterface AlertContextValue {\n /** Muestra un alert de un solo botón. Resuelve cuando se cierra. */\n alert: (options: AlertOptions) => Promise<void>;\n /** Muestra confirmar/cancelar. Resuelve true si se confirmó, false si se canceló. */\n confirm: (options: ConfirmOptions) => Promise<boolean>;\n hide: () => void;\n}\n\nconst AlertContext = createContext<AlertContextValue | undefined>(undefined);\n\ninterface InternalState {\n visible: boolean;\n title: string;\n message?: string;\n type: AlertType;\n buttons: AlertButton[];\n}\n\nconst HIDDEN: InternalState = { visible: false, title: '', type: 'info', buttons: [] };\n\n/**\n * AlertProvider\n * Monta un único <Alert> controlado imperativamente. Colocar una vez cerca\n * de la raíz (dentro de UIProvider). Los handlers async pueden hacer\n * `const ok = await confirm({ title: 'Eliminar', destructive: true })`.\n */\nexport function AlertProvider({ children }: { children: React.ReactNode }) {\n const [state, setState] = useState<InternalState>(HIDDEN);\n const resolverRef = useRef<((value: any) => void) | null>(null);\n\n const hide = useCallback(() => {\n setState(HIDDEN);\n resolverRef.current?.(undefined);\n resolverRef.current = null;\n }, []);\n\n const alertFn = useCallback((options: AlertOptions): Promise<void> => {\n return new Promise((resolve) => {\n resolverRef.current = resolve;\n setState({\n visible: true,\n title: options.title,\n message: options.message,\n type: options.type ?? 'info',\n buttons: [\n {\n text: options.confirmText ?? 'OK',\n onPress: () => {\n setState(HIDDEN);\n resolve();\n resolverRef.current = null;\n },\n },\n ],\n });\n });\n }, []);\n\n const confirmFn = useCallback((options: ConfirmOptions): Promise<boolean> => {\n return new Promise((resolve) => {\n resolverRef.current = resolve;\n setState({\n visible: true,\n title: options.title,\n message: options.message,\n type: options.type ?? 'question',\n buttons: [\n {\n text: options.cancelText ?? 'Cancel',\n style: 'cancel',\n variant: 'outline',\n onPress: () => {\n setState(HIDDEN);\n resolve(false);\n resolverRef.current = null;\n },\n },\n {\n text: options.confirmText ?? 'OK',\n variant: options.destructive ? 'destructive' : 'primary',\n style: options.destructive ? 'destructive' : 'default',\n onPress: () => {\n setState(HIDDEN);\n resolve(true);\n resolverRef.current = null;\n },\n },\n ],\n });\n });\n }, []);\n\n const value = useMemo<AlertContextValue>(() => ({ alert: alertFn, confirm: confirmFn, hide }), [alertFn, confirmFn, hide]);\n\n return (\n <AlertContext.Provider value={value}>\n {children}\n <Alert visible={state.visible} title={state.title} message={state.message} type={state.type} buttons={state.buttons} onClose={hide} />\n </AlertContext.Provider>\n );\n}\n\nexport function useAlert(): AlertContextValue {\n const ctx = useContext(AlertContext);\n if (!ctx) {\n throw new Error('orn-ui: useAlert must be used within an <AlertProvider>.');\n }\n return ctx;\n}\n"
14
+ }
15
+ ],
16
+ "registryDependencies": [
17
+ "core",
18
+ "alert",
19
+ "button"
20
+ ]
21
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "Alert",
3
+ "slug": "alert",
4
+ "type": "component",
5
+ "category": "organisms",
6
+ "exportedNames": [
7
+ "Alert"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "organisms/Alert.tsx",
12
+ "content": "import React, { memo } from 'react';\nimport { Modal, Text, TouchableWithoutFeedback, View } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors, useLabels } from '../theme/UIProvider';\nimport { Button, type ButtonVariant } from '../atoms/Button';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\n\nexport type AlertType = 'success' | 'error' | 'warning' | 'info' | 'question';\n\nexport interface AlertButton {\n text: string;\n onPress?: () => void;\n style?: 'cancel' | 'default' | 'destructive';\n variant?: ButtonVariant;\n}\n\nexport interface AlertProps {\n visible: boolean;\n title: string;\n message?: string;\n type?: AlertType;\n onClose?: () => void;\n buttons?: AlertButton[];\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n onCancel?: () => void;\n inline?: boolean;\n}\n\nconst ICON_BY_TYPE: Record<AlertType, IconName> = {\n success: 'check',\n error: 'alert',\n warning: 'warning',\n question: 'question',\n info: 'info',\n};\n\nconst useStyles = createStyles((theme) => ({\n overlay: { flex: 1, backgroundColor: theme.colors.overlay, justifyContent: 'center', alignItems: 'center', padding: theme.tokens.spacing.xl },\n overlayInline: { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, zIndex: 9999 },\n container: {\n backgroundColor: theme.colors.surface,\n borderRadius: theme.tokens.radius.xl,\n padding: theme.tokens.spacing.xl,\n width: '100%',\n maxWidth: 340,\n alignItems: 'center',\n ...theme.tokens.shadow.md,\n },\n iconContainer: { marginBottom: theme.tokens.spacing.lg - 1 },\n title: { fontSize: theme.tokens.fontSize.xl, fontWeight: theme.tokens.fontWeight.bold, color: theme.colors.text, textAlign: 'center', marginBottom: theme.tokens.spacing.md - 2 },\n message: { fontSize: theme.tokens.fontSize.md, color: theme.colors.textLight, textAlign: 'center', marginBottom: theme.tokens.spacing.xl, lineHeight: theme.tokens.lineHeight.md },\n buttonContainer: { flexDirection: 'row', justifyContent: 'center', gap: theme.tokens.spacing.sm + 2, width: '100%' },\n buttonContainerVertical: { flexDirection: 'column' },\n button: { paddingVertical: theme.tokens.spacing.md - 2, paddingHorizontal: theme.tokens.spacing.xl },\n buttonHorizontal: { flex: 1 },\n buttonVertical: { width: '100%' },\n}));\n\n/** Deriva la lista de botones a partir de props, sin mutar `buttons` recibido por props. */\nfunction resolveButtons(props: AlertProps, labels: { confirm: string; cancel: string; close: string }): AlertButton[] {\n const { buttons, confirmText, cancelText, onConfirm, onCancel, onClose } = props;\n if (buttons && buttons.length > 0) return buttons;\n\n if (confirmText || onConfirm) {\n const list: AlertButton[] = [];\n if (cancelText || onCancel) {\n list.push({ text: cancelText || labels.cancel, onPress: onCancel || onClose, variant: 'outline', style: 'cancel' });\n }\n list.push({ text: confirmText || labels.confirm, onPress: onConfirm, variant: 'primary' });\n return list;\n }\n\n return [{ text: labels.close, onPress: onClose, variant: 'outline' }];\n}\n\n/**\n * Alert\n * Componente declarativo de diálogo. Para uso imperativo (mostrar desde\n * un handler sin levantar estado propio), usar AlertProvider + useAlert().\n */\nexport const Alert = memo((props: AlertProps) => {\n const { visible, title, message, type = 'info', onClose, inline = false } = props;\n const colors = useColors();\n const styles = useStyles();\n const labels = useLabels();\n const allowFontScaling = useAllowFontScaling();\n\n if (!visible) return null;\n\n const iconColor: Record<AlertType, string> = {\n success: colors.success,\n error: colors.error,\n warning: colors.warning,\n question: colors.primary,\n info: colors.secondary,\n };\n\n const effectiveButtons = resolveButtons(props, { confirm: labels.confirm, cancel: labels.cancel, close: labels.close });\n const vertical = effectiveButtons.length > 2;\n\n const content = (\n <TouchableWithoutFeedback onPress={onClose} accessibilityRole=\"none\">\n <View style={[styles.overlay, inline && styles.overlayInline]}>\n <TouchableWithoutFeedback>\n <View style={styles.container} accessibilityRole=\"alert\" accessibilityViewIsModal>\n <View style={styles.iconContainer}>\n <Icon name={ICON_BY_TYPE[type]} size={48} color={iconColor[type]} />\n </View>\n\n <Text allowFontScaling={allowFontScaling} style={styles.title}>\n {title}\n </Text>\n\n {!!message && (\n <Text allowFontScaling={allowFontScaling} style={styles.message}>\n {message}\n </Text>\n )}\n\n <View style={[styles.buttonContainer, vertical && styles.buttonContainerVertical]}>\n {effectiveButtons.map((btn, index) => {\n const isCancel = btn.style === 'cancel';\n let variant: ButtonVariant = btn.variant || 'primary';\n if (!btn.variant && isCancel) variant = 'outline';\n if (!btn.variant && btn.style === 'destructive') variant = 'destructive';\n\n return (\n <Button\n key={index}\n title={btn.text}\n onPress={btn.onPress || onClose || (() => {})}\n variant={variant}\n style={[styles.button, vertical ? styles.buttonVertical : styles.buttonHorizontal]}\n textStyle={{ fontSize: 14 }}\n />\n );\n })}\n </View>\n </View>\n </TouchableWithoutFeedback>\n </View>\n </TouchableWithoutFeedback>\n );\n\n if (inline) {\n return (\n <View style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }} pointerEvents=\"box-none\">\n {content}\n </View>\n );\n }\n\n return (\n <Modal transparent visible={visible} animationType=\"fade\" statusBarTranslucent presentationStyle=\"overFullScreen\" onRequestClose={onClose || (() => {})}>\n {content}\n </Modal>\n );\n});\nAlert.displayName = 'Alert';\n"
13
+ }
14
+ ],
15
+ "registryDependencies": [
16
+ "core",
17
+ "button"
18
+ ]
19
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "AvatarHeader",
3
+ "slug": "avatar-header",
4
+ "type": "component",
5
+ "category": "molecules",
6
+ "exportedNames": [
7
+ "AvatarHeader"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "molecules/AvatarHeader.tsx",
12
+ "content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useColors } from '../theme/UIProvider';\nimport { Icon } from '../icons/Icon';\nimport type { IconName } from '../icons/types';\n\nexport interface AvatarHeaderProps {\n /** Ícono a mostrar dentro del círculo. Si se omite, se usan `initials`. */\n iconName?: IconName;\n iconColor?: string;\n /** Texto corto (ej. 2 letras) mostrado si no se pasa `iconName`. */\n initials?: string;\n title: string;\n subtitle?: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { alignItems: 'center', marginBottom: theme.tokens.spacing.xl },\n avatar: {\n width: 80,\n height: 80,\n borderRadius: 40,\n backgroundColor: theme.colors.primary + '20',\n justifyContent: 'center',\n alignItems: 'center',\n marginBottom: theme.tokens.spacing.md,\n },\n initials: { fontSize: theme.tokens.fontSize.xxl, fontWeight: theme.tokens.fontWeight.bold, color: theme.colors.primary },\n title: { fontSize: theme.tokens.fontSize.xl, fontWeight: theme.tokens.fontWeight.bold, textAlign: 'center', color: theme.colors.text, marginBottom: theme.tokens.spacing.xs },\n subtitle: { fontSize: theme.tokens.fontSize.md, color: theme.colors.textLight },\n}));\n\n/**\n * AvatarHeader\n * Círculo 80x80 con ícono o iniciales + título/subtítulo centrado. Header\n * típico de modales de detalle (cliente, producto, etc).\n */\nexport const AvatarHeader = memo(({ iconName, iconColor, initials, title, subtitle, style }: AvatarHeaderProps) => {\n const colors = useColors();\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n\n return (\n <View style={[styles.container, style]}>\n <View style={styles.avatar}>\n {iconName ? (\n <Icon name={iconName} size={40} color={iconColor || colors.primary} />\n ) : (\n <Text allowFontScaling={allowFontScaling} style={styles.initials}>\n {initials}\n </Text>\n )}\n </View>\n <Text allowFontScaling={allowFontScaling} style={styles.title}>\n {title}\n </Text>\n {typeof subtitle === 'string' ? (\n <Text allowFontScaling={allowFontScaling} style={styles.subtitle}>\n {subtitle}\n </Text>\n ) : (\n subtitle\n )}\n </View>\n );\n});\nAvatarHeader.displayName = 'AvatarHeader';\n"
13
+ }
14
+ ],
15
+ "registryDependencies": [
16
+ "core"
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Avatar",
3
+ "slug": "avatar",
4
+ "type": "component",
5
+ "category": "atoms",
6
+ "exportedNames": [
7
+ "Avatar"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "atoms/Avatar.tsx",
12
+ "content": "import React, { memo } from 'react';\nimport { StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { useColors } from '../theme/UIProvider';\n\nexport interface AvatarProps {\n size?: number;\n backgroundColor?: string;\n children: React.ReactNode;\n style?: StyleProp<ViewStyle>;\n}\n\nconst styles = StyleSheet.create({\n circle: { justifyContent: 'center', alignItems: 'center' },\n});\n\n/**\n * Avatar\n * Círculo con ícono/iniciales adentro. Usado a la izquierda de filas de\n * lista o como header de detalle (junto a AvatarHeader).\n */\nexport const Avatar = memo(({ size = 44, backgroundColor, children, style }: AvatarProps) => {\n const colors = useColors();\n return (\n <View\n style={[\n styles.circle,\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor: backgroundColor || colors.primary + '15',\n },\n style,\n ]}\n >\n {children}\n </View>\n );\n});\nAvatar.displayName = 'Avatar';\n"
13
+ }
14
+ ],
15
+ "registryDependencies": [
16
+ "core"
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Badge",
3
+ "slug": "badge",
4
+ "type": "component",
5
+ "category": "atoms",
6
+ "exportedNames": [
7
+ "Badge"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "atoms/Badge.tsx",
12
+ "content": "import React, { memo } from 'react';\nimport { Text, View, type StyleProp, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useAllowFontScaling, useTheme } from '../theme/UIProvider';\n\nexport type BadgeVariant = 'success' | 'error' | 'warning' | 'info' | 'neutral';\n\nexport interface BadgeProps {\n label: string;\n variant?: BadgeVariant;\n /** Override manual, gana sobre `variant`. */\n backgroundColor?: string;\n textColor?: string;\n style?: StyleProp<ViewStyle>;\n}\n\nconst useStyles = createStyles((theme) => ({\n badge: {\n paddingHorizontal: theme.tokens.spacing.md - 2,\n paddingVertical: theme.tokens.spacing.xs + 1,\n borderRadius: theme.tokens.radius.full,\n alignSelf: 'flex-start',\n },\n text: { fontSize: theme.tokens.fontSize.xs, fontWeight: theme.tokens.fontWeight.bold, letterSpacing: 0.3 },\n}));\n\n/**\n * Badge\n * Pill de estado. `variant` cubre los casos comunes (éxito/error/advertencia/\n * info/neutral); `backgroundColor`/`textColor` quedan para casos que no\n * encajan en el set semántico.\n */\nexport const Badge = memo(({ label, variant = 'neutral', backgroundColor, textColor, style }: BadgeProps) => {\n const theme = useTheme();\n const styles = useStyles();\n const allowFontScaling = useAllowFontScaling();\n const { colors } = theme;\n\n const palette: Record<BadgeVariant, { bg: string; fg: string }> = {\n success: { bg: colors.success + '20', fg: colors.success },\n error: { bg: colors.error + '20', fg: colors.error },\n warning: { bg: colors.warning + '20', fg: colors.warning },\n info: { bg: colors.secondary + '20', fg: colors.secondary },\n neutral: { bg: colors.inputBackground, fg: colors.textLight },\n };\n\n return (\n <View style={[styles.badge, { backgroundColor: backgroundColor ?? palette[variant].bg }, style]}>\n <Text allowFontScaling={allowFontScaling} style={[styles.text, { color: textColor ?? palette[variant].fg }]}>\n {label}\n </Text>\n </View>\n );\n});\nBadge.displayName = 'Badge';\n"
13
+ }
14
+ ],
15
+ "registryDependencies": [
16
+ "core"
17
+ ]
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "BottomSheet",
3
+ "slug": "bottom-sheet",
4
+ "type": "component",
5
+ "category": "organisms",
6
+ "exportedNames": [
7
+ "BottomSheet"
8
+ ],
9
+ "files": [
10
+ {
11
+ "path": "organisms/BottomSheet.tsx",
12
+ "content": "import React, { memo, useEffect, useRef, useState } from 'react';\nimport { Animated, Dimensions, Modal, PanResponder, Pressable, View, type ViewStyle } from 'react-native';\nimport { createStyles } from '../theme/createStyles';\nimport { useInsets } from '../theme/UIProvider';\n\nconst { height: SCREEN_HEIGHT } = Dimensions.get('window');\nconst DISMISS_THRESHOLD = 100;\n\nexport interface BottomSheetProps {\n visible: boolean;\n onClose: () => void;\n children: React.ReactNode;\n closeAccessibilityLabel?: string;\n}\n\nconst useStyles = createStyles((theme) => ({\n container: { flex: 1, justifyContent: 'flex-end' },\n backdrop: { backgroundColor: theme.colors.overlay },\n sheet: {\n backgroundColor: theme.colors.surface,\n borderTopLeftRadius: theme.tokens.radius.xxl,\n borderTopRightRadius: theme.tokens.radius.xxl,\n paddingHorizontal: theme.tokens.spacing.xl,\n ...theme.tokens.shadow.lg,\n },\n handleArea: { paddingVertical: theme.tokens.spacing.md, alignItems: 'center' },\n handle: { width: 40, height: 5, borderRadius: 3, backgroundColor: theme.colors.border },\n}));\n\nconst absoluteFill: ViewStyle = { position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 };\n\n/**\n * BottomSheet\n * Modal que aparece desde abajo: animación con Animated (no la del Modal\n * nativo) y arrastre para cerrar con PanResponder — no un gesture-handler\n * externo, para mantener la librería en cero dependencias.\n */\nexport const BottomSheet = memo(({ visible, onClose, children, closeAccessibilityLabel = 'Close' }: BottomSheetProps) => {\n const styles = useStyles();\n const insets = useInsets();\n const [mounted, setMounted] = useState(visible);\n const translateY = useRef(new Animated.Value(SCREEN_HEIGHT)).current;\n const backdropOpacity = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n if (visible) {\n setMounted(true);\n Animated.timing(translateY, { toValue: 0, duration: 250, useNativeDriver: true }).start();\n Animated.timing(backdropOpacity, { toValue: 1, duration: 250, useNativeDriver: true }).start();\n } else {\n Animated.timing(translateY, { toValue: SCREEN_HEIGHT, duration: 200, useNativeDriver: true }).start(({ finished }) => {\n if (finished) setMounted(false);\n });\n Animated.timing(backdropOpacity, { toValue: 0, duration: 200, useNativeDriver: true }).start();\n }\n }, [visible]);\n\n const panResponder = useRef(\n PanResponder.create({\n onMoveShouldSetPanResponder: (_, gesture) => gesture.dy > 5 && Math.abs(gesture.dy) > Math.abs(gesture.dx),\n onPanResponderMove: (_, gesture) => {\n if (gesture.dy > 0) translateY.setValue(gesture.dy);\n },\n onPanResponderRelease: (_, gesture) => {\n if (gesture.dy > DISMISS_THRESHOLD) {\n onClose();\n } else {\n Animated.timing(translateY, { toValue: 0, duration: 150, useNativeDriver: true }).start();\n }\n },\n })\n ).current;\n\n if (!mounted) return null;\n\n return (\n <Modal visible transparent animationType=\"none\" statusBarTranslucent onRequestClose={onClose}>\n <View style={styles.container}>\n <Animated.View style={[absoluteFill, styles.backdrop, { opacity: backdropOpacity }]}>\n <Pressable style={absoluteFill} onPress={onClose} accessibilityRole=\"button\" accessibilityLabel={closeAccessibilityLabel} />\n </Animated.View>\n\n <Animated.View\n style={[styles.sheet, { paddingBottom: Math.max(insets.bottom, 20) }, { transform: [{ translateY }] }]}\n >\n <View style={styles.handleArea} {...panResponder.panHandlers}>\n <View style={styles.handle} />\n </View>\n {children}\n </Animated.View>\n </View>\n </Modal>\n );\n});\nBottomSheet.displayName = 'BottomSheet';\n"
13
+ }
14
+ ],
15
+ "registryDependencies": [
16
+ "core"
17
+ ]
18
+ }