wn-native-ui 0.0.0-stage → 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 (445) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +128 -3
  4. package/lib/module/components/Avatar/Avatar.js +131 -0
  5. package/lib/module/components/Avatar/index.js +3 -0
  6. package/lib/module/components/Avatar/styles.js +49 -0
  7. package/lib/module/components/BottomActionBar/BottomActionBar.js +43 -0
  8. package/lib/module/components/BottomActionBar/index.js +3 -0
  9. package/lib/module/components/BottomActionBar/styles.js +22 -0
  10. package/lib/module/components/BottomSheet/BottomSheet.js +103 -0
  11. package/lib/module/components/BottomSheet/index.js +3 -0
  12. package/lib/module/components/BottomSheet/styles.js +84 -0
  13. package/lib/module/components/Button/Button.js +38 -0
  14. package/lib/module/components/Button/index.js +3 -0
  15. package/lib/module/components/Button/styles.js +50 -0
  16. package/lib/module/components/Checkbox/Checkbox.js +131 -0
  17. package/lib/module/components/Checkbox/index.js +3 -0
  18. package/lib/module/components/Checkbox/styles.js +64 -0
  19. package/lib/module/components/DatePicker/DatePicker.js +521 -0
  20. package/lib/module/components/DatePicker/index.js +3 -0
  21. package/lib/module/components/DatePicker/model.js +255 -0
  22. package/lib/module/components/DatePicker/styles.js +273 -0
  23. package/lib/module/components/Dialog/Dialog.js +146 -0
  24. package/lib/module/components/Dialog/index.js +3 -0
  25. package/lib/module/components/Dialog/styles.js +112 -0
  26. package/lib/module/components/EmptyState/EmptyState.js +56 -0
  27. package/lib/module/components/EmptyState/index.js +3 -0
  28. package/lib/module/components/EmptyState/styles.js +84 -0
  29. package/lib/module/components/Field/Field.js +54 -0
  30. package/lib/module/components/Field/FieldContext.js +7 -0
  31. package/lib/module/components/Field/index.js +3 -0
  32. package/lib/module/components/Field/styles.js +56 -0
  33. package/lib/module/components/FilterChips/FilterChips.js +74 -0
  34. package/lib/module/components/FilterChips/index.js +3 -0
  35. package/lib/module/components/FilterChips/styles.js +72 -0
  36. package/lib/module/components/Form/Form.js +53 -0
  37. package/lib/module/components/Form/FormItem.js +128 -0
  38. package/lib/module/components/Form/context.js +4 -0
  39. package/lib/module/components/Form/index.js +10 -0
  40. package/lib/module/components/Form/model.js +327 -0
  41. package/lib/module/components/Form/styles.js +10 -0
  42. package/lib/module/components/ImagePreview/ImagePreview.js +189 -0
  43. package/lib/module/components/ImagePreview/index.js +3 -0
  44. package/lib/module/components/ImagePreview/styles.js +87 -0
  45. package/lib/module/components/InlineFeedback/InlineFeedback.js +78 -0
  46. package/lib/module/components/InlineFeedback/index.js +3 -0
  47. package/lib/module/components/InlineFeedback/styles.js +148 -0
  48. package/lib/module/components/Input/Input.js +50 -0
  49. package/lib/module/components/Input/index.js +3 -0
  50. package/lib/module/components/Input/styles.js +41 -0
  51. package/lib/module/components/ListSkeleton/ListSkeleton.js +50 -0
  52. package/lib/module/components/ListSkeleton/index.js +3 -0
  53. package/lib/module/components/ListSkeleton/styles.js +30 -0
  54. package/lib/module/components/NavigationBar/NavigationBar.js +170 -0
  55. package/lib/module/components/NavigationBar/index.js +3 -0
  56. package/lib/module/components/NavigationBar/styles.js +98 -0
  57. package/lib/module/components/Picker/Picker.js +156 -0
  58. package/lib/module/components/Picker/index.js +3 -0
  59. package/lib/module/components/Picker/styles.js +96 -0
  60. package/lib/module/components/Radio/Radio.js +114 -0
  61. package/lib/module/components/Radio/index.js +3 -0
  62. package/lib/module/components/Radio/styles.js +70 -0
  63. package/lib/module/components/SearchInput/SearchInput.js +102 -0
  64. package/lib/module/components/SearchInput/index.js +3 -0
  65. package/lib/module/components/SearchInput/styles.js +106 -0
  66. package/lib/module/components/SideDrawer/SideDrawer.js +161 -0
  67. package/lib/module/components/SideDrawer/index.js +3 -0
  68. package/lib/module/components/SideDrawer/styles.js +89 -0
  69. package/lib/module/components/Skeleton/Skeleton.js +66 -0
  70. package/lib/module/components/Skeleton/index.js +3 -0
  71. package/lib/module/components/Skeleton/styles.js +18 -0
  72. package/lib/module/components/Switch/Switch.js +61 -0
  73. package/lib/module/components/Switch/index.js +3 -0
  74. package/lib/module/components/Switch/styles.js +33 -0
  75. package/lib/module/components/TabBar/TabBar.js +68 -0
  76. package/lib/module/components/TabBar/index.js +3 -0
  77. package/lib/module/components/TabBar/styles.js +84 -0
  78. package/lib/module/components/Tabs/Tabs.js +65 -0
  79. package/lib/module/components/Tabs/index.js +3 -0
  80. package/lib/module/components/Tabs/styles.js +99 -0
  81. package/lib/module/components/Tag/Tag.js +171 -0
  82. package/lib/module/components/Tag/index.js +3 -0
  83. package/lib/module/components/Tag/styles.js +163 -0
  84. package/lib/module/components/TextArea/TextArea.js +74 -0
  85. package/lib/module/components/TextArea/index.js +3 -0
  86. package/lib/module/components/TextArea/styles.js +45 -0
  87. package/lib/module/components/TimePicker/TimePicker.js +262 -0
  88. package/lib/module/components/TimePicker/index.js +3 -0
  89. package/lib/module/components/TimePicker/model.js +63 -0
  90. package/lib/module/components/TimePicker/styles.js +143 -0
  91. package/lib/module/components/Timeline/Timeline.js +154 -0
  92. package/lib/module/components/Timeline/index.js +3 -0
  93. package/lib/module/components/Timeline/model.js +36 -0
  94. package/lib/module/components/Timeline/styles.js +115 -0
  95. package/lib/module/components/Toast/Toast.js +249 -0
  96. package/lib/module/components/Toast/index.js +3 -0
  97. package/lib/module/components/Toast/styles.js +61 -0
  98. package/lib/module/components/Upload/Upload.js +762 -0
  99. package/lib/module/components/Upload/index.js +3 -0
  100. package/lib/module/components/Upload/model.js +3 -0
  101. package/lib/module/components/Upload/picker.js +97 -0
  102. package/lib/module/components/Upload/styles.js +358 -0
  103. package/lib/module/components/index.js +32 -0
  104. package/lib/module/index.js +4 -0
  105. package/lib/module/package.json +1 -0
  106. package/lib/module/ui/tokens.js +174 -0
  107. package/lib/typescript/components/Avatar/Avatar.d.ts +20 -0
  108. package/lib/typescript/components/Avatar/Avatar.d.ts.map +1 -0
  109. package/lib/typescript/components/Avatar/index.d.ts +3 -0
  110. package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
  111. package/lib/typescript/components/Avatar/styles.d.ts +46 -0
  112. package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
  113. package/lib/typescript/components/BottomActionBar/BottomActionBar.d.ts +17 -0
  114. package/lib/typescript/components/BottomActionBar/BottomActionBar.d.ts.map +1 -0
  115. package/lib/typescript/components/BottomActionBar/index.d.ts +3 -0
  116. package/lib/typescript/components/BottomActionBar/index.d.ts.map +1 -0
  117. package/lib/typescript/components/BottomActionBar/styles.d.ts +19 -0
  118. package/lib/typescript/components/BottomActionBar/styles.d.ts.map +1 -0
  119. package/lib/typescript/components/BottomSheet/BottomSheet.d.ts +19 -0
  120. package/lib/typescript/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  121. package/lib/typescript/components/BottomSheet/index.d.ts +3 -0
  122. package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
  123. package/lib/typescript/components/BottomSheet/styles.d.ts +86 -0
  124. package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
  125. package/lib/typescript/components/Button/Button.d.ts +12 -0
  126. package/lib/typescript/components/Button/Button.d.ts.map +1 -0
  127. package/lib/typescript/components/Button/index.d.ts +3 -0
  128. package/lib/typescript/components/Button/index.d.ts.map +1 -0
  129. package/lib/typescript/components/Button/styles.d.ts +48 -0
  130. package/lib/typescript/components/Button/styles.d.ts.map +1 -0
  131. package/lib/typescript/components/Checkbox/Checkbox.d.ts +39 -0
  132. package/lib/typescript/components/Checkbox/Checkbox.d.ts.map +1 -0
  133. package/lib/typescript/components/Checkbox/index.d.ts +3 -0
  134. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
  135. package/lib/typescript/components/Checkbox/styles.d.ts +65 -0
  136. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
  137. package/lib/typescript/components/DatePicker/DatePicker.d.ts +40 -0
  138. package/lib/typescript/components/DatePicker/DatePicker.d.ts.map +1 -0
  139. package/lib/typescript/components/DatePicker/index.d.ts +4 -0
  140. package/lib/typescript/components/DatePicker/index.d.ts.map +1 -0
  141. package/lib/typescript/components/DatePicker/model.d.ts +49 -0
  142. package/lib/typescript/components/DatePicker/model.d.ts.map +1 -0
  143. package/lib/typescript/components/DatePicker/styles.d.ts +287 -0
  144. package/lib/typescript/components/DatePicker/styles.d.ts.map +1 -0
  145. package/lib/typescript/components/Dialog/Dialog.d.ts +35 -0
  146. package/lib/typescript/components/Dialog/Dialog.d.ts.map +1 -0
  147. package/lib/typescript/components/Dialog/index.d.ts +3 -0
  148. package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
  149. package/lib/typescript/components/Dialog/styles.d.ts +114 -0
  150. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
  151. package/lib/typescript/components/EmptyState/EmptyState.d.ts +13 -0
  152. package/lib/typescript/components/EmptyState/EmptyState.d.ts.map +1 -0
  153. package/lib/typescript/components/EmptyState/index.d.ts +3 -0
  154. package/lib/typescript/components/EmptyState/index.d.ts.map +1 -0
  155. package/lib/typescript/components/EmptyState/styles.d.ts +86 -0
  156. package/lib/typescript/components/EmptyState/styles.d.ts.map +1 -0
  157. package/lib/typescript/components/Field/Field.d.ts +14 -0
  158. package/lib/typescript/components/Field/Field.d.ts.map +1 -0
  159. package/lib/typescript/components/Field/FieldContext.d.ts +8 -0
  160. package/lib/typescript/components/Field/FieldContext.d.ts.map +1 -0
  161. package/lib/typescript/components/Field/index.d.ts +3 -0
  162. package/lib/typescript/components/Field/index.d.ts.map +1 -0
  163. package/lib/typescript/components/Field/styles.d.ts +58 -0
  164. package/lib/typescript/components/Field/styles.d.ts.map +1 -0
  165. package/lib/typescript/components/FilterChips/FilterChips.d.ts +23 -0
  166. package/lib/typescript/components/FilterChips/FilterChips.d.ts.map +1 -0
  167. package/lib/typescript/components/FilterChips/index.d.ts +3 -0
  168. package/lib/typescript/components/FilterChips/index.d.ts.map +1 -0
  169. package/lib/typescript/components/FilterChips/styles.d.ts +75 -0
  170. package/lib/typescript/components/FilterChips/styles.d.ts.map +1 -0
  171. package/lib/typescript/components/Form/Form.d.ts +17 -0
  172. package/lib/typescript/components/Form/Form.d.ts.map +1 -0
  173. package/lib/typescript/components/Form/FormItem.d.ts +29 -0
  174. package/lib/typescript/components/Form/FormItem.d.ts.map +1 -0
  175. package/lib/typescript/components/Form/context.d.ts +8 -0
  176. package/lib/typescript/components/Form/context.d.ts.map +1 -0
  177. package/lib/typescript/components/Form/index.d.ts +12 -0
  178. package/lib/typescript/components/Form/index.d.ts.map +1 -0
  179. package/lib/typescript/components/Form/model.d.ts +82 -0
  180. package/lib/typescript/components/Form/model.d.ts.map +1 -0
  181. package/lib/typescript/components/Form/styles.d.ts +7 -0
  182. package/lib/typescript/components/Form/styles.d.ts.map +1 -0
  183. package/lib/typescript/components/ImagePreview/ImagePreview.d.ts +17 -0
  184. package/lib/typescript/components/ImagePreview/ImagePreview.d.ts.map +1 -0
  185. package/lib/typescript/components/ImagePreview/index.d.ts +3 -0
  186. package/lib/typescript/components/ImagePreview/index.d.ts.map +1 -0
  187. package/lib/typescript/components/ImagePreview/styles.d.ts +87 -0
  188. package/lib/typescript/components/ImagePreview/styles.d.ts.map +1 -0
  189. package/lib/typescript/components/InlineFeedback/InlineFeedback.d.ts +13 -0
  190. package/lib/typescript/components/InlineFeedback/InlineFeedback.d.ts.map +1 -0
  191. package/lib/typescript/components/InlineFeedback/index.d.ts +3 -0
  192. package/lib/typescript/components/InlineFeedback/index.d.ts.map +1 -0
  193. package/lib/typescript/components/InlineFeedback/styles.d.ts +151 -0
  194. package/lib/typescript/components/InlineFeedback/styles.d.ts.map +1 -0
  195. package/lib/typescript/components/Input/Input.d.ts +14 -0
  196. package/lib/typescript/components/Input/Input.d.ts.map +1 -0
  197. package/lib/typescript/components/Input/index.d.ts +3 -0
  198. package/lib/typescript/components/Input/index.d.ts.map +1 -0
  199. package/lib/typescript/components/Input/styles.d.ts +40 -0
  200. package/lib/typescript/components/Input/styles.d.ts.map +1 -0
  201. package/lib/typescript/components/ListSkeleton/ListSkeleton.d.ts +10 -0
  202. package/lib/typescript/components/ListSkeleton/ListSkeleton.d.ts.map +1 -0
  203. package/lib/typescript/components/ListSkeleton/index.d.ts +3 -0
  204. package/lib/typescript/components/ListSkeleton/index.d.ts.map +1 -0
  205. package/lib/typescript/components/ListSkeleton/styles.d.ts +27 -0
  206. package/lib/typescript/components/ListSkeleton/styles.d.ts.map +1 -0
  207. package/lib/typescript/components/NavigationBar/NavigationBar.d.ts +34 -0
  208. package/lib/typescript/components/NavigationBar/NavigationBar.d.ts.map +1 -0
  209. package/lib/typescript/components/NavigationBar/index.d.ts +3 -0
  210. package/lib/typescript/components/NavigationBar/index.d.ts.map +1 -0
  211. package/lib/typescript/components/NavigationBar/styles.d.ts +97 -0
  212. package/lib/typescript/components/NavigationBar/styles.d.ts.map +1 -0
  213. package/lib/typescript/components/Picker/Picker.d.ts +32 -0
  214. package/lib/typescript/components/Picker/Picker.d.ts.map +1 -0
  215. package/lib/typescript/components/Picker/index.d.ts +3 -0
  216. package/lib/typescript/components/Picker/index.d.ts.map +1 -0
  217. package/lib/typescript/components/Picker/styles.d.ts +99 -0
  218. package/lib/typescript/components/Picker/styles.d.ts.map +1 -0
  219. package/lib/typescript/components/Radio/Radio.d.ts +38 -0
  220. package/lib/typescript/components/Radio/Radio.d.ts.map +1 -0
  221. package/lib/typescript/components/Radio/index.d.ts +3 -0
  222. package/lib/typescript/components/Radio/index.d.ts.map +1 -0
  223. package/lib/typescript/components/Radio/styles.d.ts +71 -0
  224. package/lib/typescript/components/Radio/styles.d.ts.map +1 -0
  225. package/lib/typescript/components/SearchInput/SearchInput.d.ts +20 -0
  226. package/lib/typescript/components/SearchInput/SearchInput.d.ts.map +1 -0
  227. package/lib/typescript/components/SearchInput/index.d.ts +3 -0
  228. package/lib/typescript/components/SearchInput/index.d.ts.map +1 -0
  229. package/lib/typescript/components/SearchInput/styles.d.ts +105 -0
  230. package/lib/typescript/components/SearchInput/styles.d.ts.map +1 -0
  231. package/lib/typescript/components/SideDrawer/SideDrawer.d.ts +19 -0
  232. package/lib/typescript/components/SideDrawer/SideDrawer.d.ts.map +1 -0
  233. package/lib/typescript/components/SideDrawer/index.d.ts +3 -0
  234. package/lib/typescript/components/SideDrawer/index.d.ts.map +1 -0
  235. package/lib/typescript/components/SideDrawer/styles.d.ts +88 -0
  236. package/lib/typescript/components/SideDrawer/styles.d.ts.map +1 -0
  237. package/lib/typescript/components/Skeleton/Skeleton.d.ts +11 -0
  238. package/lib/typescript/components/Skeleton/Skeleton.d.ts.map +1 -0
  239. package/lib/typescript/components/Skeleton/index.d.ts +3 -0
  240. package/lib/typescript/components/Skeleton/index.d.ts.map +1 -0
  241. package/lib/typescript/components/Skeleton/styles.d.ts +15 -0
  242. package/lib/typescript/components/Skeleton/styles.d.ts.map +1 -0
  243. package/lib/typescript/components/Switch/Switch.d.ts +9 -0
  244. package/lib/typescript/components/Switch/Switch.d.ts.map +1 -0
  245. package/lib/typescript/components/Switch/index.d.ts +3 -0
  246. package/lib/typescript/components/Switch/index.d.ts.map +1 -0
  247. package/lib/typescript/components/Switch/styles.d.ts +30 -0
  248. package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
  249. package/lib/typescript/components/TabBar/TabBar.d.ts +26 -0
  250. package/lib/typescript/components/TabBar/TabBar.d.ts.map +1 -0
  251. package/lib/typescript/components/TabBar/index.d.ts +3 -0
  252. package/lib/typescript/components/TabBar/index.d.ts.map +1 -0
  253. package/lib/typescript/components/TabBar/styles.d.ts +82 -0
  254. package/lib/typescript/components/TabBar/styles.d.ts.map +1 -0
  255. package/lib/typescript/components/Tabs/Tabs.d.ts +21 -0
  256. package/lib/typescript/components/Tabs/Tabs.d.ts.map +1 -0
  257. package/lib/typescript/components/Tabs/index.d.ts +3 -0
  258. package/lib/typescript/components/Tabs/index.d.ts.map +1 -0
  259. package/lib/typescript/components/Tabs/styles.d.ts +100 -0
  260. package/lib/typescript/components/Tabs/styles.d.ts.map +1 -0
  261. package/lib/typescript/components/Tag/Tag.d.ts +22 -0
  262. package/lib/typescript/components/Tag/Tag.d.ts.map +1 -0
  263. package/lib/typescript/components/Tag/index.d.ts +3 -0
  264. package/lib/typescript/components/Tag/index.d.ts.map +1 -0
  265. package/lib/typescript/components/Tag/styles.d.ts +164 -0
  266. package/lib/typescript/components/Tag/styles.d.ts.map +1 -0
  267. package/lib/typescript/components/TextArea/TextArea.d.ts +16 -0
  268. package/lib/typescript/components/TextArea/TextArea.d.ts.map +1 -0
  269. package/lib/typescript/components/TextArea/index.d.ts +3 -0
  270. package/lib/typescript/components/TextArea/index.d.ts.map +1 -0
  271. package/lib/typescript/components/TextArea/styles.d.ts +46 -0
  272. package/lib/typescript/components/TextArea/styles.d.ts.map +1 -0
  273. package/lib/typescript/components/TimePicker/TimePicker.d.ts +17 -0
  274. package/lib/typescript/components/TimePicker/TimePicker.d.ts.map +1 -0
  275. package/lib/typescript/components/TimePicker/index.d.ts +4 -0
  276. package/lib/typescript/components/TimePicker/index.d.ts.map +1 -0
  277. package/lib/typescript/components/TimePicker/model.d.ts +16 -0
  278. package/lib/typescript/components/TimePicker/model.d.ts.map +1 -0
  279. package/lib/typescript/components/TimePicker/styles.d.ts +150 -0
  280. package/lib/typescript/components/TimePicker/styles.d.ts.map +1 -0
  281. package/lib/typescript/components/Timeline/Timeline.d.ts +12 -0
  282. package/lib/typescript/components/Timeline/Timeline.d.ts.map +1 -0
  283. package/lib/typescript/components/Timeline/index.d.ts +4 -0
  284. package/lib/typescript/components/Timeline/index.d.ts.map +1 -0
  285. package/lib/typescript/components/Timeline/model.d.ts +45 -0
  286. package/lib/typescript/components/Timeline/model.d.ts.map +1 -0
  287. package/lib/typescript/components/Timeline/styles.d.ts +120 -0
  288. package/lib/typescript/components/Timeline/styles.d.ts.map +1 -0
  289. package/lib/typescript/components/Toast/Toast.d.ts +30 -0
  290. package/lib/typescript/components/Toast/Toast.d.ts.map +1 -0
  291. package/lib/typescript/components/Toast/index.d.ts +3 -0
  292. package/lib/typescript/components/Toast/index.d.ts.map +1 -0
  293. package/lib/typescript/components/Toast/styles.d.ts +59 -0
  294. package/lib/typescript/components/Toast/styles.d.ts.map +1 -0
  295. package/lib/typescript/components/Upload/Upload.d.ts +31 -0
  296. package/lib/typescript/components/Upload/Upload.d.ts.map +1 -0
  297. package/lib/typescript/components/Upload/index.d.ts +4 -0
  298. package/lib/typescript/components/Upload/index.d.ts.map +1 -0
  299. package/lib/typescript/components/Upload/model.d.ts +50 -0
  300. package/lib/typescript/components/Upload/model.d.ts.map +1 -0
  301. package/lib/typescript/components/Upload/picker.d.ts +13 -0
  302. package/lib/typescript/components/Upload/picker.d.ts.map +1 -0
  303. package/lib/typescript/components/Upload/styles.d.ts +376 -0
  304. package/lib/typescript/components/Upload/styles.d.ts.map +1 -0
  305. package/lib/typescript/components/index.d.ts +61 -0
  306. package/lib/typescript/components/index.d.ts.map +1 -0
  307. package/lib/typescript/index.d.ts +3 -0
  308. package/lib/typescript/index.d.ts.map +1 -0
  309. package/lib/typescript/package.json +1 -0
  310. package/lib/typescript/ui/tokens.d.ts +167 -0
  311. package/lib/typescript/ui/tokens.d.ts.map +1 -0
  312. package/package.json +216 -6
  313. package/src/components/Avatar/Avatar.tsx +192 -0
  314. package/src/components/Avatar/README.md +32 -0
  315. package/src/components/Avatar/index.ts +2 -0
  316. package/src/components/Avatar/styles.ts +49 -0
  317. package/src/components/BottomActionBar/BottomActionBar.tsx +53 -0
  318. package/src/components/BottomActionBar/README.md +50 -0
  319. package/src/components/BottomActionBar/index.ts +2 -0
  320. package/src/components/BottomActionBar/styles.ts +22 -0
  321. package/src/components/BottomSheet/BottomSheet.tsx +136 -0
  322. package/src/components/BottomSheet/README.md +51 -0
  323. package/src/components/BottomSheet/index.ts +2 -0
  324. package/src/components/BottomSheet/styles.ts +84 -0
  325. package/src/components/Button/Button.tsx +65 -0
  326. package/src/components/Button/README.md +59 -0
  327. package/src/components/Button/index.ts +2 -0
  328. package/src/components/Button/styles.ts +50 -0
  329. package/src/components/Checkbox/Checkbox.tsx +220 -0
  330. package/src/components/Checkbox/README.md +60 -0
  331. package/src/components/Checkbox/index.ts +2 -0
  332. package/src/components/Checkbox/styles.ts +64 -0
  333. package/src/components/DatePicker/DatePicker.tsx +728 -0
  334. package/src/components/DatePicker/README.md +88 -0
  335. package/src/components/DatePicker/index.ts +9 -0
  336. package/src/components/DatePicker/model.ts +316 -0
  337. package/src/components/DatePicker/styles.ts +267 -0
  338. package/src/components/Dialog/Dialog.tsx +254 -0
  339. package/src/components/Dialog/README.md +98 -0
  340. package/src/components/Dialog/index.ts +2 -0
  341. package/src/components/Dialog/styles.ts +109 -0
  342. package/src/components/EmptyState/EmptyState.tsx +58 -0
  343. package/src/components/EmptyState/README.md +44 -0
  344. package/src/components/EmptyState/index.ts +2 -0
  345. package/src/components/EmptyState/styles.ts +82 -0
  346. package/src/components/Field/Field.tsx +59 -0
  347. package/src/components/Field/FieldContext.ts +13 -0
  348. package/src/components/Field/README.md +68 -0
  349. package/src/components/Field/index.ts +2 -0
  350. package/src/components/Field/styles.ts +56 -0
  351. package/src/components/FilterChips/FilterChips.tsx +110 -0
  352. package/src/components/FilterChips/README.md +69 -0
  353. package/src/components/FilterChips/index.ts +2 -0
  354. package/src/components/FilterChips/styles.ts +72 -0
  355. package/src/components/Form/Form.tsx +77 -0
  356. package/src/components/Form/FormItem.tsx +204 -0
  357. package/src/components/Form/README.md +101 -0
  358. package/src/components/Form/context.ts +11 -0
  359. package/src/components/Form/index.ts +25 -0
  360. package/src/components/Form/model.ts +427 -0
  361. package/src/components/Form/styles.ts +10 -0
  362. package/src/components/ImagePreview/ImagePreview.tsx +207 -0
  363. package/src/components/ImagePreview/README.md +51 -0
  364. package/src/components/ImagePreview/index.ts +2 -0
  365. package/src/components/ImagePreview/styles.ts +87 -0
  366. package/src/components/InlineFeedback/InlineFeedback.tsx +88 -0
  367. package/src/components/InlineFeedback/README.md +47 -0
  368. package/src/components/InlineFeedback/index.ts +2 -0
  369. package/src/components/InlineFeedback/styles.ts +140 -0
  370. package/src/components/Input/Input.tsx +79 -0
  371. package/src/components/Input/README.md +62 -0
  372. package/src/components/Input/index.ts +2 -0
  373. package/src/components/Input/styles.ts +41 -0
  374. package/src/components/ListSkeleton/ListSkeleton.tsx +48 -0
  375. package/src/components/ListSkeleton/README.md +37 -0
  376. package/src/components/ListSkeleton/index.ts +2 -0
  377. package/src/components/ListSkeleton/styles.ts +30 -0
  378. package/src/components/NavigationBar/NavigationBar.tsx +218 -0
  379. package/src/components/NavigationBar/README.md +72 -0
  380. package/src/components/NavigationBar/index.ts +7 -0
  381. package/src/components/NavigationBar/styles.ts +98 -0
  382. package/src/components/Picker/Picker.tsx +238 -0
  383. package/src/components/Picker/README.md +76 -0
  384. package/src/components/Picker/index.ts +8 -0
  385. package/src/components/Picker/styles.ts +94 -0
  386. package/src/components/README.md +44 -0
  387. package/src/components/Radio/README.md +52 -0
  388. package/src/components/Radio/Radio.tsx +195 -0
  389. package/src/components/Radio/index.ts +2 -0
  390. package/src/components/Radio/styles.ts +70 -0
  391. package/src/components/SearchInput/README.md +48 -0
  392. package/src/components/SearchInput/SearchInput.tsx +131 -0
  393. package/src/components/SearchInput/index.ts +2 -0
  394. package/src/components/SearchInput/styles.ts +100 -0
  395. package/src/components/SideDrawer/README.md +48 -0
  396. package/src/components/SideDrawer/SideDrawer.tsx +198 -0
  397. package/src/components/SideDrawer/index.ts +2 -0
  398. package/src/components/SideDrawer/styles.ts +86 -0
  399. package/src/components/Skeleton/README.md +38 -0
  400. package/src/components/Skeleton/Skeleton.tsx +108 -0
  401. package/src/components/Skeleton/index.ts +2 -0
  402. package/src/components/Skeleton/styles.ts +18 -0
  403. package/src/components/Switch/README.md +27 -0
  404. package/src/components/Switch/Switch.tsx +77 -0
  405. package/src/components/Switch/index.ts +2 -0
  406. package/src/components/Switch/styles.ts +33 -0
  407. package/src/components/TabBar/README.md +66 -0
  408. package/src/components/TabBar/TabBar.tsx +93 -0
  409. package/src/components/TabBar/index.ts +2 -0
  410. package/src/components/TabBar/styles.ts +81 -0
  411. package/src/components/Tabs/README.md +64 -0
  412. package/src/components/Tabs/Tabs.tsx +114 -0
  413. package/src/components/Tabs/index.ts +2 -0
  414. package/src/components/Tabs/styles.ts +99 -0
  415. package/src/components/Tag/README.md +60 -0
  416. package/src/components/Tag/Tag.tsx +166 -0
  417. package/src/components/Tag/index.ts +2 -0
  418. package/src/components/Tag/styles.ts +159 -0
  419. package/src/components/TextArea/README.md +61 -0
  420. package/src/components/TextArea/TextArea.tsx +114 -0
  421. package/src/components/TextArea/index.ts +2 -0
  422. package/src/components/TextArea/styles.ts +45 -0
  423. package/src/components/TimePicker/README.md +62 -0
  424. package/src/components/TimePicker/TimePicker.tsx +343 -0
  425. package/src/components/TimePicker/index.ts +3 -0
  426. package/src/components/TimePicker/model.ts +88 -0
  427. package/src/components/TimePicker/styles.ts +141 -0
  428. package/src/components/Timeline/README.md +81 -0
  429. package/src/components/Timeline/Timeline.tsx +197 -0
  430. package/src/components/Timeline/index.ts +12 -0
  431. package/src/components/Timeline/model.ts +87 -0
  432. package/src/components/Timeline/styles.ts +115 -0
  433. package/src/components/Toast/README.md +68 -0
  434. package/src/components/Toast/Toast.tsx +310 -0
  435. package/src/components/Toast/index.ts +8 -0
  436. package/src/components/Toast/styles.ts +58 -0
  437. package/src/components/Upload/README.md +93 -0
  438. package/src/components/Upload/Upload.tsx +839 -0
  439. package/src/components/Upload/index.ts +14 -0
  440. package/src/components/Upload/model.ts +61 -0
  441. package/src/components/Upload/picker.ts +125 -0
  442. package/src/components/Upload/styles.ts +358 -0
  443. package/src/components/index.ts +119 -0
  444. package/src/index.ts +2 -0
  445. package/src/ui/tokens.ts +144 -0
@@ -0,0 +1,310 @@
1
+ import type { PropsWithChildren, ReactNode } from 'react';
2
+ import { useCallback, useEffect, useRef, useState } from 'react';
3
+ import {
4
+ ActivityIndicator,
5
+ Animated,
6
+ Easing,
7
+ Text,
8
+ View,
9
+ type StyleProp,
10
+ type ViewStyle,
11
+ } from 'react-native';
12
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
13
+ import Svg, { Path } from 'react-native-svg';
14
+
15
+ import { uiTokens as token } from '../../ui/tokens';
16
+
17
+ import { styles } from './styles';
18
+
19
+ export type ToastPosition = 'bottom' | 'center' | 'top';
20
+ export type ToastIcon = 'fail' | 'loading' | 'none' | 'success';
21
+
22
+ export type ToastShowOptions = {
23
+ afterClose?: () => void;
24
+ content: ReactNode;
25
+ duration?: number;
26
+ icon?: ReactNode | ToastIcon;
27
+ maskClickable?: boolean;
28
+ position?: ToastPosition;
29
+ };
30
+
31
+ export type ToastProviderProps = PropsWithChildren<{
32
+ defaultDuration?: number;
33
+ defaultPosition?: ToastPosition;
34
+ style?: StyleProp<ViewStyle>;
35
+ }>;
36
+
37
+ export type ToastShowResult = {
38
+ close: () => void;
39
+ id: number;
40
+ };
41
+
42
+ type ToastItem = Required<Pick<ToastShowOptions, 'duration' | 'maskClickable' | 'position'>> & {
43
+ afterClose?: () => void;
44
+ content: ReactNode;
45
+ icon?: ReactNode | ToastIcon;
46
+ id: number;
47
+ };
48
+
49
+ type ToastEvent = { item: ToastItem; type: 'show' } | { id?: number; type: 'clear' };
50
+
51
+ type ToastListener = (event: ToastEvent) => void;
52
+
53
+ let toastSeed = 0;
54
+ const listeners = new Set<ToastListener>();
55
+
56
+ export const Toast = {
57
+ clear(id?: number) {
58
+ emitToastEvent({ id, type: 'clear' });
59
+ },
60
+ fail(content: ReactNode, options?: Omit<ToastShowOptions, 'content' | 'icon'>) {
61
+ return Toast.show({ ...options, content, icon: 'fail' });
62
+ },
63
+ loading(content: ReactNode = '加载中', options?: Omit<ToastShowOptions, 'content' | 'icon'>) {
64
+ return Toast.show({ duration: 0, ...options, content, icon: 'loading', maskClickable: false });
65
+ },
66
+ show(contentOrOptions: ReactNode | ToastShowOptions): ToastShowResult {
67
+ const options = normalizeToastOptions(contentOrOptions);
68
+ const id = createToastId();
69
+ emitToastEvent({
70
+ item: {
71
+ content: options.content,
72
+ duration: options.duration ?? defaultToastDuration,
73
+ icon: options.icon,
74
+ id,
75
+ maskClickable: options.maskClickable ?? true,
76
+ position: options.position ?? 'center',
77
+ afterClose: options.afterClose,
78
+ },
79
+ type: 'show',
80
+ });
81
+ return {
82
+ close: () => Toast.clear(id),
83
+ id,
84
+ };
85
+ },
86
+ success(content: ReactNode, options?: Omit<ToastShowOptions, 'content' | 'icon'>) {
87
+ return Toast.show({ ...options, content, icon: 'success' });
88
+ },
89
+ };
90
+
91
+ const defaultToastDuration = 2000;
92
+ const animationDuration = 180;
93
+
94
+ export function ToastProvider({
95
+ children,
96
+ defaultDuration = defaultToastDuration,
97
+ defaultPosition = 'center',
98
+ style,
99
+ }: ToastProviderProps) {
100
+ const insets = useSafeAreaInsets();
101
+ const [toast, setToast] = useState<ToastItem | null>(null);
102
+ const [opacity] = useState(() => new Animated.Value(0));
103
+ const [scale] = useState(() => new Animated.Value(0.96));
104
+ const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
105
+ const closingRef = useRef(false);
106
+ const toastRef = useRef<ToastItem | null>(null);
107
+
108
+ const clearTimer = useCallback(() => {
109
+ if (!timerRef.current) return;
110
+ clearTimeout(timerRef.current);
111
+ timerRef.current = null;
112
+ }, []);
113
+
114
+ const closeToast = useCallback(
115
+ (id?: number) => {
116
+ const currentToast = toastRef.current;
117
+ if (!currentToast || closingRef.current) return;
118
+ if (id !== undefined && currentToast.id !== id) return;
119
+
120
+ closingRef.current = true;
121
+ clearTimer();
122
+ Animated.parallel([
123
+ Animated.timing(opacity, {
124
+ duration: animationDuration,
125
+ easing: Easing.in(Easing.cubic),
126
+ toValue: 0,
127
+ useNativeDriver: true,
128
+ }),
129
+ Animated.timing(scale, {
130
+ duration: animationDuration,
131
+ easing: Easing.in(Easing.cubic),
132
+ toValue: 0.96,
133
+ useNativeDriver: true,
134
+ }),
135
+ ]).start(({ finished }) => {
136
+ if (!finished) return;
137
+ const closedToast = toastRef.current;
138
+ toastRef.current = null;
139
+ setToast(null);
140
+ closingRef.current = false;
141
+ closedToast?.afterClose?.();
142
+ });
143
+ },
144
+ [clearTimer, opacity, scale],
145
+ );
146
+
147
+ const showToast = useCallback(
148
+ (item: ToastItem) => {
149
+ const nextToast: ToastItem = {
150
+ ...item,
151
+ duration: item.duration ?? defaultDuration,
152
+ position: item.position ?? defaultPosition,
153
+ };
154
+
155
+ closingRef.current = false;
156
+ toastRef.current = nextToast;
157
+ clearTimer();
158
+ opacity.stopAnimation();
159
+ scale.stopAnimation();
160
+ opacity.setValue(0);
161
+ scale.setValue(0.96);
162
+ setToast(nextToast);
163
+ Animated.parallel([
164
+ Animated.timing(opacity, {
165
+ duration: animationDuration,
166
+ easing: Easing.out(Easing.cubic),
167
+ toValue: 1,
168
+ useNativeDriver: true,
169
+ }),
170
+ Animated.timing(scale, {
171
+ duration: animationDuration,
172
+ easing: Easing.out(Easing.cubic),
173
+ toValue: 1,
174
+ useNativeDriver: true,
175
+ }),
176
+ ]).start();
177
+
178
+ if (nextToast.duration > 0) {
179
+ timerRef.current = setTimeout(() => closeToast(nextToast.id), nextToast.duration);
180
+ }
181
+ },
182
+ [clearTimer, closeToast, defaultDuration, defaultPosition, opacity, scale],
183
+ );
184
+
185
+ useEffect(() => {
186
+ const listener: ToastListener = (event) => {
187
+ if (event.type === 'show') {
188
+ showToast(event.item);
189
+ return;
190
+ }
191
+ closeToast(event.id);
192
+ };
193
+
194
+ listeners.add(listener);
195
+ return () => {
196
+ listeners.delete(listener);
197
+ clearTimer();
198
+ };
199
+ }, [clearTimer, closeToast, showToast]);
200
+
201
+ return (
202
+ <View style={[styles.provider, style]}>
203
+ {children}
204
+ {toast ? (
205
+ <View
206
+ pointerEvents={toast.maskClickable ? 'box-none' : 'auto'}
207
+ style={[
208
+ styles.overlay,
209
+ stylesByPosition[toast.position],
210
+ toast.position === 'top' && { paddingTop: Math.max(insets.top + token.space.s16, 60) },
211
+ toast.position === 'bottom' && {
212
+ paddingBottom: Math.max(insets.bottom + token.space.s24, 72),
213
+ },
214
+ ]}
215
+ >
216
+ <Animated.View
217
+ accessibilityLiveRegion="polite"
218
+ accessibilityRole="alert"
219
+ style={[
220
+ styles.toast,
221
+ hasToastIcon(toast.icon) ? styles.toastWithIcon : null,
222
+ { opacity, transform: [{ scale }] },
223
+ ]}
224
+ >
225
+ <ToastIconView icon={toast.icon} />
226
+ {typeof toast.content === 'string' || typeof toast.content === 'number' ? (
227
+ <Text style={styles.content}>{toast.content}</Text>
228
+ ) : (
229
+ toast.content
230
+ )}
231
+ </Animated.View>
232
+ </View>
233
+ ) : null}
234
+ </View>
235
+ );
236
+ }
237
+
238
+ const stylesByPosition: Record<ToastPosition, StyleProp<ViewStyle>> = {
239
+ bottom: styles.overlayBottom,
240
+ center: styles.overlayCenter,
241
+ top: styles.overlayTop,
242
+ };
243
+
244
+ function ToastIconView({ icon }: { icon?: ReactNode | ToastIcon }) {
245
+ if (!hasToastIcon(icon)) {
246
+ return null;
247
+ }
248
+
249
+ if (icon === 'loading') {
250
+ return <ActivityIndicator color={token.color.onTint} size="small" />;
251
+ }
252
+
253
+ if (icon === 'success') {
254
+ return (
255
+ <Svg fill="none" height={28} viewBox="0 0 28 28" width={28}>
256
+ <Path
257
+ d="m8 14.4 3.8 3.8L20.5 9"
258
+ stroke={token.color.onTint}
259
+ strokeLinecap="round"
260
+ strokeLinejoin="round"
261
+ strokeWidth={2.4}
262
+ />
263
+ </Svg>
264
+ );
265
+ }
266
+
267
+ if (icon === 'fail') {
268
+ return (
269
+ <Svg fill="none" height={28} viewBox="0 0 28 28" width={28}>
270
+ <Path
271
+ d="M9 9 19 19M19 9 9 19"
272
+ stroke={token.color.onTint}
273
+ strokeLinecap="round"
274
+ strokeLinejoin="round"
275
+ strokeWidth={2.4}
276
+ />
277
+ </Svg>
278
+ );
279
+ }
280
+
281
+ return <>{icon}</>;
282
+ }
283
+
284
+ function hasToastIcon(icon?: ReactNode | ToastIcon) {
285
+ return Boolean(icon && icon !== 'none');
286
+ }
287
+
288
+ function createToastId() {
289
+ toastSeed += 1;
290
+ return toastSeed;
291
+ }
292
+
293
+ function emitToastEvent(event: ToastEvent) {
294
+ listeners.forEach((listener) => listener(event));
295
+ }
296
+
297
+ function normalizeToastOptions(contentOrOptions: ReactNode | ToastShowOptions): ToastShowOptions {
298
+ if (
299
+ contentOrOptions &&
300
+ typeof contentOrOptions === 'object' &&
301
+ !Array.isArray(contentOrOptions) &&
302
+ 'content' in contentOrOptions
303
+ ) {
304
+ return contentOrOptions;
305
+ }
306
+
307
+ return {
308
+ content: contentOrOptions,
309
+ };
310
+ }
@@ -0,0 +1,8 @@
1
+ export { Toast, ToastProvider } from './Toast';
2
+ export type {
3
+ ToastIcon,
4
+ ToastPosition,
5
+ ToastProviderProps,
6
+ ToastShowOptions,
7
+ ToastShowResult,
8
+ } from './Toast';
@@ -0,0 +1,58 @@
1
+ import { StyleSheet } from 'react-native';
2
+
3
+ import { uiTokens as token } from '../../ui/tokens';
4
+
5
+ export const styles = StyleSheet.create({
6
+ content: {
7
+ color: token.color.onTint,
8
+ textAlign: 'center',
9
+ ...token.type.footnote,
10
+ fontWeight: '600',
11
+ },
12
+ overlay: {
13
+ bottom: 0,
14
+ left: 0,
15
+ paddingHorizontal: token.space.s24,
16
+ position: 'absolute',
17
+ right: 0,
18
+ top: 0,
19
+ zIndex: 999,
20
+ },
21
+ overlayBottom: {
22
+ alignItems: 'center',
23
+ justifyContent: 'flex-end',
24
+ },
25
+ overlayCenter: {
26
+ alignItems: 'center',
27
+ justifyContent: 'center',
28
+ },
29
+ overlayTop: {
30
+ alignItems: 'center',
31
+ justifyContent: 'flex-start',
32
+ },
33
+ provider: {
34
+ flex: 1,
35
+ },
36
+ toast: {
37
+ alignItems: 'center',
38
+ backgroundColor: 'rgba(25, 43, 50, 0.88)',
39
+ borderRadius: token.radius.large,
40
+ maxWidth: '88%',
41
+ minHeight: 44,
42
+ minWidth: 120,
43
+ paddingHorizontal: token.space.s16,
44
+ paddingVertical: token.space.s12,
45
+ shadowColor: token.color.tabBarShadow,
46
+ shadowOffset: { height: 8, width: 0 },
47
+ shadowOpacity: 0.14,
48
+ shadowRadius: 20,
49
+ elevation: token.shadow.floatingElevation,
50
+ },
51
+ toastWithIcon: {
52
+ gap: token.space.s8,
53
+ minHeight: 96,
54
+ minWidth: 112,
55
+ paddingHorizontal: token.space.s20,
56
+ paddingVertical: token.space.s16,
57
+ },
58
+ });
@@ -0,0 +1,93 @@
1
+ # Upload 上传
2
+
3
+ ## 作用
4
+
5
+ `Upload` 统一承载头像、图片宫格和文件列表的选择、单文件校验、上传任务状态、删除与重试。组件参考设计稿中的 `Upload · picture`,每个条目独立显示待上传、上传中、上传成功和上传失败状态。
6
+
7
+ ## 适用场景
8
+
9
+ - `listType="avatar"`:单张头像。
10
+ - `listType="picture"`:多图宫格、凭证和成长记录。
11
+ - `listType="file"`:PDF、Office 等普通文件列表。
12
+
13
+ 不适用于页面专属附件卡片、业务接口编排或服务端附件关系维护。字段标签、必填标识和表单错误由 `Field` / `Form.Item` 负责。
14
+
15
+ ## 基础用法
16
+
17
+ ```tsx
18
+ const [files, setFiles] = useState<UploadItem[]>([]);
19
+
20
+ <Upload
21
+ accept={['image/jpeg', 'image/png']}
22
+ maxCount={9}
23
+ maxSize={10 * 1024 * 1024}
24
+ multiple
25
+ onChange={setFiles}
26
+ upload={async (asset) => {
27
+ const response = await repository.upload(asset);
28
+ return { fileId: response.id, url: response.url };
29
+ }}
30
+ value={files}
31
+ />;
32
+ ```
33
+
34
+ 不传 `upload` 时,选择结果保持 `pending`,由表单最终提交时统一上传:
35
+
36
+ ```tsx
37
+ <Form.Item label="荣誉资料" name="attachments" trigger="onChange">
38
+ <Upload listType="file" maxCount={10} />
39
+ </Form.Item>
40
+ ```
41
+
42
+ ## 核心 Props
43
+
44
+ | 属性 | 说明 | 默认值 |
45
+ | ---------------------- | -------------------------------------- | -------------------------------------- |
46
+ | `value / defaultValue` | 受控值 / 非受控初始值 | `[]` |
47
+ | `onChange` | 任一条目状态或列表变化回调 | - |
48
+ | `listType` | `avatar / picture / file` | `picture` |
49
+ | `sources` | `camera / library / document` 来源 | 图片为相机、相册、文件;文件列表为文档 |
50
+ | `accept` | MIME 或扩展名白名单,支持 `image/*` | 图片为 `image/*`,文件为 `*/*` |
51
+ | `maxCount` | 最大条目数 | 图片 `9`,其他 `1` |
52
+ | `maxSize` | 单个文件的最大字节数 | - |
53
+ | `multiple` | 是否允许系统选择器多选 | 根据 `maxCount` 推断 |
54
+ | `upload` | 自动上传函数;未提供时保留 `pending` | - |
55
+ | `beforeAdd` | 上传前转换或返回 `false` 忽略文件 | - |
56
+ | `onReject` | 类型、数量、大小、权限或选择器失败回调 | - |
57
+ | `onRemove` | 删除前回调,返回 `false` 可阻止删除 | - |
58
+ | `previewable` | 成功图片点击后打开 `ImagePreview` | `true` |
59
+ | `deletable` | 是否显示删除操作 | `true` |
60
+ | `readOnly` | 禁止选择、删除和重试,但允许预览 | `false` |
61
+ | `disabled` | 整体禁用,包括预览 | `false` |
62
+
63
+ ## 值与状态
64
+
65
+ `UploadItem.status` 为:
66
+
67
+ - `pending`:已选择,等待调用方提交。
68
+ - `uploading`:正在执行 `upload`;只有上传函数调用 `onProgress` 时才显示真实百分比,不伪造进度。
69
+ - `uploaded`:上传成功,可点击图片进入独立预览层。
70
+ - `failed`:上传失败;保留“重试”和右上角删除。
71
+
72
+ `UploadItem` 只保存通用文件信息,不包含业务 `scene`、API DTO 或 repository 类型。系统选择器返回的原始对象保存在 `raw`,来源保存在 `source`;调用方可以使用 `extra` 保存不可见的业务映射。
73
+
74
+ ## 校验规则
75
+
76
+ - `maxSize` 只校验单个图片或文件,不累计总大小。
77
+ - 校验发生在上传函数执行前;超限文件不进入列表,也不调用 `upload`。
78
+ - 多选时仅拒绝不合规文件,其他文件继续添加。
79
+ - 无法从系统选择器获得 `size` 时不猜测大小,由后端继续执行最终限制。
80
+
81
+ ## 交互与无障碍
82
+
83
+ - 图片删除视觉为右上角小叉,外层点击区域固定为 `44 × 44pt`。
84
+ - 只有 `uploaded` 图片可以打开预览;失败图片同时保留重试和删除。
85
+ - 上传状态包含文字,不只依赖颜色。
86
+ - 多来源选择直接组合公共 `BottomSheet`,统一展示拍照、相册和文件入口;来源列表保留为 `Upload` 内部实现,不公开 `UploadSourceSheet`。
87
+ - 当前上传函数完成后才能确认成功;移除上传中条目不会取消已经发出的网络请求,调用方需要避免因此生成孤立附件。
88
+
89
+ ## 组件边界
90
+
91
+ - `Upload` 组合公共 `ImagePreview`,但不直接请求 API、不读取 repository、route 或业务 store。
92
+ - 服务端删除、附件解绑、鉴权图片请求头和上传 `scene` 均由调用方处理。
93
+ - 展示入口:`ComponentIndex` 的 `Upload + ImagePreview` 区域。