@unif/react-native-ui 0.1.0 → 0.2.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 (367) hide show
  1. package/lib/commonjs/README.md +99 -0
  2. package/lib/commonjs/action-sheet/index.js +71 -0
  3. package/lib/commonjs/action-sheet/index.js.map +1 -0
  4. package/lib/commonjs/action-sheet/index.md +69 -0
  5. package/lib/commonjs/action-sheet/style/index.js +42 -0
  6. package/lib/commonjs/action-sheet/style/index.js.map +1 -0
  7. package/lib/commonjs/avatar/index.js +50 -0
  8. package/lib/commonjs/avatar/index.js.map +1 -0
  9. package/lib/commonjs/avatar/index.md +51 -0
  10. package/lib/commonjs/avatar/style/index.js +21 -0
  11. package/lib/commonjs/avatar/style/index.js.map +1 -0
  12. package/lib/commonjs/button/index.js +60 -0
  13. package/lib/commonjs/button/index.js.map +1 -0
  14. package/lib/commonjs/button/index.md +90 -0
  15. package/lib/commonjs/button/style/index.js +98 -0
  16. package/lib/commonjs/button/style/index.js.map +1 -0
  17. package/lib/commonjs/center/index.js +26 -0
  18. package/lib/commonjs/center/index.js.map +1 -0
  19. package/lib/commonjs/center/index.md +28 -0
  20. package/lib/commonjs/center/style/index.js +14 -0
  21. package/lib/commonjs/center/style/index.js.map +1 -0
  22. package/lib/commonjs/chip/index.js +69 -0
  23. package/lib/commonjs/chip/index.js.map +1 -0
  24. package/lib/commonjs/chip/index.md +60 -0
  25. package/lib/commonjs/chip/style/index.js +46 -0
  26. package/lib/commonjs/chip/style/index.js.map +1 -0
  27. package/lib/commonjs/column/index.js +35 -0
  28. package/lib/commonjs/column/index.js.map +1 -0
  29. package/lib/commonjs/column/index.md +34 -0
  30. package/lib/commonjs/column/style/index.js +13 -0
  31. package/lib/commonjs/column/style/index.js.map +1 -0
  32. package/lib/commonjs/divider/index.js +32 -0
  33. package/lib/commonjs/divider/index.js.map +1 -0
  34. package/lib/commonjs/divider/index.md +44 -0
  35. package/lib/commonjs/divider/style/index.js +22 -0
  36. package/lib/commonjs/divider/style/index.js.map +1 -0
  37. package/lib/commonjs/hooks/index.js +13 -0
  38. package/lib/commonjs/hooks/index.js.map +1 -0
  39. package/lib/commonjs/hooks/index.md +71 -0
  40. package/lib/commonjs/hooks/useMergeStyles.js +31 -0
  41. package/lib/commonjs/hooks/useMergeStyles.js.map +1 -0
  42. package/lib/commonjs/index.js +146 -0
  43. package/lib/commonjs/index.js.map +1 -0
  44. package/lib/commonjs/input/index.js +76 -0
  45. package/lib/commonjs/input/index.js.map +1 -0
  46. package/lib/commonjs/input/index.md +73 -0
  47. package/lib/commonjs/input/style/index.js +31 -0
  48. package/lib/commonjs/input/style/index.js.map +1 -0
  49. package/lib/commonjs/list-item/index.js +76 -0
  50. package/lib/commonjs/list-item/index.js.map +1 -0
  51. package/lib/commonjs/list-item/index.md +101 -0
  52. package/lib/commonjs/list-item/style/index.js +43 -0
  53. package/lib/commonjs/list-item/style/index.js.map +1 -0
  54. package/lib/commonjs/menu/index.js +68 -0
  55. package/lib/commonjs/menu/index.js.map +1 -0
  56. package/lib/commonjs/menu/style/index.js +32 -0
  57. package/lib/commonjs/menu/style/index.js.map +1 -0
  58. package/lib/commonjs/package.json +1 -0
  59. package/lib/commonjs/popover/index.js +68 -0
  60. package/lib/commonjs/popover/index.js.map +1 -0
  61. package/lib/commonjs/popover/index.md +57 -0
  62. package/lib/commonjs/popover/style/index.js +26 -0
  63. package/lib/commonjs/popover/style/index.js.map +1 -0
  64. package/lib/commonjs/row/index.js +36 -0
  65. package/lib/commonjs/row/index.js.map +1 -0
  66. package/lib/commonjs/row/index.md +46 -0
  67. package/lib/commonjs/row/style/index.js +19 -0
  68. package/lib/commonjs/row/style/index.js.map +1 -0
  69. package/lib/commonjs/space/index.js +25 -0
  70. package/lib/commonjs/space/index.js.map +1 -0
  71. package/lib/commonjs/space/index.md +31 -0
  72. package/lib/commonjs/space/style/index.js +15 -0
  73. package/lib/commonjs/space/style/index.js.map +1 -0
  74. package/lib/commonjs/text/index.js +40 -0
  75. package/lib/commonjs/text/index.js.map +1 -0
  76. package/lib/commonjs/text/index.md +63 -0
  77. package/lib/commonjs/text/style/index.js +56 -0
  78. package/lib/commonjs/text/style/index.js.map +1 -0
  79. package/lib/commonjs/theme/context.js +40 -0
  80. package/lib/commonjs/theme/context.js.map +1 -0
  81. package/lib/commonjs/theme/tokens.js +68 -0
  82. package/lib/commonjs/theme/tokens.js.map +1 -0
  83. package/lib/commonjs/touchable/index.js +40 -0
  84. package/lib/commonjs/touchable/index.js.map +1 -0
  85. package/lib/commonjs/touchable/index.md +42 -0
  86. package/lib/commonjs/touchable/style/index.js +13 -0
  87. package/lib/commonjs/touchable/style/index.js.map +1 -0
  88. package/lib/commonjs/wave-animation/index.js +72 -0
  89. package/lib/commonjs/wave-animation/index.js.map +1 -0
  90. package/lib/commonjs/wave-animation/index.md +50 -0
  91. package/lib/module/action-sheet/index.js +5 -2
  92. package/lib/module/action-sheet/index.js.map +1 -1
  93. package/lib/module/action-sheet/style/index.js +7 -8
  94. package/lib/module/action-sheet/style/index.js.map +1 -1
  95. package/lib/module/avatar/index.js +5 -2
  96. package/lib/module/avatar/index.js.map +1 -1
  97. package/lib/module/avatar/style/index.js +4 -5
  98. package/lib/module/avatar/style/index.js.map +1 -1
  99. package/lib/module/button/index.js +5 -2
  100. package/lib/module/button/index.js.map +1 -1
  101. package/lib/module/button/style/index.js +8 -9
  102. package/lib/module/button/style/index.js.map +1 -1
  103. package/lib/module/chip/index.js +7 -2
  104. package/lib/module/chip/index.js.map +1 -1
  105. package/lib/module/chip/style/index.js +12 -13
  106. package/lib/module/chip/style/index.js.map +1 -1
  107. package/lib/module/divider/index.js +13 -7
  108. package/lib/module/divider/index.js.map +1 -1
  109. package/lib/module/divider/style/index.js +4 -5
  110. package/lib/module/divider/style/index.js.map +1 -1
  111. package/lib/module/index.js +4 -4
  112. package/lib/module/index.js.map +1 -1
  113. package/lib/module/input/index.js +5 -3
  114. package/lib/module/input/index.js.map +1 -1
  115. package/lib/module/input/style/index.js +8 -9
  116. package/lib/module/input/style/index.js.map +1 -1
  117. package/lib/module/list-item/index.js +9 -7
  118. package/lib/module/list-item/index.js.map +1 -1
  119. package/lib/module/list-item/style/index.js +5 -6
  120. package/lib/module/list-item/style/index.js.map +1 -1
  121. package/lib/module/menu/index.js +62 -0
  122. package/lib/module/menu/index.js.map +1 -0
  123. package/lib/module/menu/style/index.js +27 -0
  124. package/lib/module/menu/style/index.js.map +1 -0
  125. package/lib/module/popover/index.js +5 -2
  126. package/lib/module/popover/index.js.map +1 -1
  127. package/lib/module/popover/style/index.js +3 -4
  128. package/lib/module/popover/style/index.js.map +1 -1
  129. package/lib/module/text/index.js +8 -3
  130. package/lib/module/text/index.js.map +1 -1
  131. package/lib/module/text/style/index.js +12 -14
  132. package/lib/module/text/style/index.js.map +1 -1
  133. package/lib/module/theme/context.js +33 -0
  134. package/lib/module/theme/context.js.map +1 -0
  135. package/lib/module/theme/tokens.js +3 -6
  136. package/lib/module/theme/tokens.js.map +1 -1
  137. package/lib/typescript/{jest.setup.d.ts.map → commonjs/jest.setup.d.ts.map} +1 -1
  138. package/lib/typescript/commonjs/package.json +1 -0
  139. package/lib/typescript/commonjs/src/action-sheet/index.d.ts.map +1 -0
  140. package/lib/typescript/{src → commonjs/src}/action-sheet/style/index.d.ts +2 -1
  141. package/lib/typescript/commonjs/src/action-sheet/style/index.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/src/avatar/index.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/src/avatar/style/index.d.ts +8 -0
  144. package/lib/typescript/commonjs/src/avatar/style/index.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/src/button/index.d.ts.map +1 -0
  146. package/lib/typescript/{src → commonjs/src}/button/style/index.d.ts +2 -1
  147. package/lib/typescript/commonjs/src/button/style/index.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/src/center/index.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/src/center/style/index.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/src/chip/index.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/src/chip/style/index.d.ts +11 -0
  152. package/lib/typescript/commonjs/src/chip/style/index.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/src/column/index.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/src/column/style/index.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/src/divider/index.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/src/divider/style/index.d.ts +10 -0
  157. package/lib/typescript/commonjs/src/divider/style/index.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/src/hooks/useMergeStyles.d.ts.map +1 -0
  160. package/lib/typescript/{src → commonjs/src}/index.d.ts +6 -3
  161. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/src/input/index.d.ts.map +1 -0
  163. package/lib/typescript/{src → commonjs/src}/input/style/index.d.ts +2 -1
  164. package/lib/typescript/commonjs/src/input/style/index.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/src/list-item/index.d.ts.map +1 -0
  166. package/lib/typescript/{src → commonjs/src}/list-item/style/index.d.ts +2 -1
  167. package/lib/typescript/commonjs/src/list-item/style/index.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/src/menu/index.d.ts +36 -0
  169. package/lib/typescript/commonjs/src/menu/index.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/menu/style/index.d.ts +32 -0
  171. package/lib/typescript/commonjs/src/menu/style/index.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/popover/index.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/src/popover/style/index.d.ts +8 -0
  174. package/lib/typescript/commonjs/src/popover/style/index.d.ts.map +1 -0
  175. package/lib/typescript/{src/column → commonjs/src/row}/index.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/src/row/style/index.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/space/index.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/space/style/index.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/src/text/index.d.ts.map +1 -0
  180. package/lib/typescript/{src → commonjs/src}/text/style/index.d.ts +5 -4
  181. package/lib/typescript/commonjs/src/text/style/index.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/theme/context.d.ts +17 -0
  183. package/lib/typescript/commonjs/src/theme/context.d.ts.map +1 -0
  184. package/lib/typescript/{src → commonjs/src}/theme/tokens.d.ts +4 -3
  185. package/lib/typescript/commonjs/src/theme/tokens.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/touchable/index.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/src/touchable/style/index.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/wave-animation/index.d.ts.map +1 -0
  189. package/lib/typescript/module/jest.setup.d.ts +1 -0
  190. package/lib/typescript/module/jest.setup.d.ts.map +1 -0
  191. package/lib/typescript/module/src/action-sheet/index.d.ts +22 -0
  192. package/lib/typescript/module/src/action-sheet/index.d.ts.map +1 -0
  193. package/lib/typescript/module/src/action-sheet/style/index.d.ts +17 -0
  194. package/lib/typescript/module/src/action-sheet/style/index.d.ts.map +1 -0
  195. package/lib/typescript/module/src/avatar/index.d.ts +19 -0
  196. package/lib/typescript/module/src/avatar/index.d.ts.map +1 -0
  197. package/lib/typescript/module/src/avatar/style/index.d.ts +8 -0
  198. package/lib/typescript/module/src/avatar/style/index.d.ts.map +1 -0
  199. package/lib/typescript/module/src/button/index.d.ts +24 -0
  200. package/lib/typescript/module/src/button/index.d.ts.map +1 -0
  201. package/lib/typescript/module/src/button/style/index.d.ts +17 -0
  202. package/lib/typescript/module/src/button/style/index.d.ts.map +1 -0
  203. package/lib/typescript/module/src/center/index.d.ts +11 -0
  204. package/lib/typescript/module/src/center/index.d.ts.map +1 -0
  205. package/lib/typescript/module/src/center/style/index.d.ts +5 -0
  206. package/lib/typescript/module/src/center/style/index.d.ts.map +1 -0
  207. package/lib/typescript/module/src/chip/index.d.ts +22 -0
  208. package/lib/typescript/module/src/chip/index.d.ts.map +1 -0
  209. package/lib/typescript/module/src/chip/style/index.d.ts +11 -0
  210. package/lib/typescript/module/src/chip/style/index.d.ts.map +1 -0
  211. package/lib/typescript/module/src/column/index.d.ts +20 -0
  212. package/lib/typescript/module/src/column/index.d.ts.map +1 -0
  213. package/lib/typescript/module/src/column/style/index.d.ts +4 -0
  214. package/lib/typescript/module/src/column/style/index.d.ts.map +1 -0
  215. package/lib/typescript/module/src/divider/index.d.ts +13 -0
  216. package/lib/typescript/module/src/divider/index.d.ts.map +1 -0
  217. package/lib/typescript/module/src/divider/style/index.d.ts +10 -0
  218. package/lib/typescript/module/src/divider/style/index.d.ts.map +1 -0
  219. package/lib/typescript/module/src/hooks/index.d.ts +2 -0
  220. package/lib/typescript/module/src/hooks/index.d.ts.map +1 -0
  221. package/lib/typescript/module/src/hooks/useMergeStyles.d.ts +13 -0
  222. package/lib/typescript/module/src/hooks/useMergeStyles.d.ts.map +1 -0
  223. package/lib/typescript/module/src/index.d.ts +42 -0
  224. package/lib/typescript/module/src/index.d.ts.map +1 -0
  225. package/lib/typescript/module/src/input/index.d.ts +29 -0
  226. package/lib/typescript/module/src/input/index.d.ts.map +1 -0
  227. package/lib/typescript/module/src/input/style/index.d.ts +9 -0
  228. package/lib/typescript/module/src/input/style/index.d.ts.map +1 -0
  229. package/lib/typescript/module/src/list-item/index.d.ts +25 -0
  230. package/lib/typescript/module/src/list-item/index.d.ts.map +1 -0
  231. package/lib/typescript/module/src/list-item/style/index.d.ts +18 -0
  232. package/lib/typescript/module/src/list-item/style/index.d.ts.map +1 -0
  233. package/lib/typescript/module/src/menu/index.d.ts +36 -0
  234. package/lib/typescript/module/src/menu/index.d.ts.map +1 -0
  235. package/lib/typescript/module/src/menu/style/index.d.ts +32 -0
  236. package/lib/typescript/module/src/menu/style/index.d.ts.map +1 -0
  237. package/lib/typescript/module/src/popover/index.d.ts +27 -0
  238. package/lib/typescript/module/src/popover/index.d.ts.map +1 -0
  239. package/lib/typescript/module/src/popover/style/index.d.ts +8 -0
  240. package/lib/typescript/module/src/popover/style/index.d.ts.map +1 -0
  241. package/lib/typescript/module/src/row/index.d.ts +22 -0
  242. package/lib/typescript/module/src/row/index.d.ts.map +1 -0
  243. package/lib/typescript/module/src/row/style/index.d.ts +8 -0
  244. package/lib/typescript/module/src/row/style/index.d.ts.map +1 -0
  245. package/lib/typescript/module/src/space/index.d.ts +15 -0
  246. package/lib/typescript/module/src/space/index.d.ts.map +1 -0
  247. package/lib/typescript/module/src/space/style/index.d.ts +7 -0
  248. package/lib/typescript/module/src/space/style/index.d.ts.map +1 -0
  249. package/lib/typescript/module/src/text/index.d.ts +18 -0
  250. package/lib/typescript/module/src/text/index.d.ts.map +1 -0
  251. package/lib/typescript/module/src/text/style/index.d.ts +36 -0
  252. package/lib/typescript/module/src/text/style/index.d.ts.map +1 -0
  253. package/lib/typescript/module/src/theme/context.d.ts +17 -0
  254. package/lib/typescript/module/src/theme/context.d.ts.map +1 -0
  255. package/lib/typescript/module/src/theme/tokens.d.ts +62 -0
  256. package/lib/typescript/module/src/theme/tokens.d.ts.map +1 -0
  257. package/lib/typescript/module/src/touchable/index.d.ts +19 -0
  258. package/lib/typescript/module/src/touchable/index.d.ts.map +1 -0
  259. package/lib/typescript/module/src/touchable/style/index.d.ts +4 -0
  260. package/lib/typescript/module/src/touchable/style/index.d.ts.map +1 -0
  261. package/lib/typescript/module/src/wave-animation/index.d.ts +20 -0
  262. package/lib/typescript/module/src/wave-animation/index.d.ts.map +1 -0
  263. package/package.json +16 -5
  264. package/src/action-sheet/index.tsx +7 -3
  265. package/src/action-sheet/style/index.tsx +10 -8
  266. package/src/avatar/index.tsx +7 -3
  267. package/src/avatar/style/index.tsx +5 -5
  268. package/src/button/index.tsx +7 -3
  269. package/src/button/style/index.tsx +11 -9
  270. package/src/chip/index.tsx +16 -5
  271. package/src/chip/style/index.tsx +15 -13
  272. package/src/divider/index.tsx +18 -11
  273. package/src/divider/style/index.tsx +12 -10
  274. package/src/index.tsx +7 -4
  275. package/src/input/index.tsx +6 -4
  276. package/src/input/style/index.tsx +9 -9
  277. package/src/list-item/index.tsx +11 -6
  278. package/src/list-item/style/index.tsx +6 -6
  279. package/src/menu/index.tsx +99 -0
  280. package/src/menu/style/index.tsx +34 -0
  281. package/src/popover/index.tsx +7 -3
  282. package/src/popover/style/index.tsx +4 -4
  283. package/src/text/index.tsx +9 -3
  284. package/src/text/style/index.tsx +16 -12
  285. package/src/theme/context.tsx +38 -0
  286. package/src/theme/tokens.ts +5 -7
  287. package/lib/module/theme/config.js +0 -27
  288. package/lib/module/theme/config.js.map +0 -1
  289. package/lib/typescript/src/action-sheet/index.d.ts.map +0 -1
  290. package/lib/typescript/src/action-sheet/style/index.d.ts.map +0 -1
  291. package/lib/typescript/src/avatar/index.d.ts.map +0 -1
  292. package/lib/typescript/src/avatar/style/index.d.ts +0 -7
  293. package/lib/typescript/src/avatar/style/index.d.ts.map +0 -1
  294. package/lib/typescript/src/button/index.d.ts.map +0 -1
  295. package/lib/typescript/src/button/style/index.d.ts.map +0 -1
  296. package/lib/typescript/src/center/index.d.ts.map +0 -1
  297. package/lib/typescript/src/center/style/index.d.ts.map +0 -1
  298. package/lib/typescript/src/chip/index.d.ts.map +0 -1
  299. package/lib/typescript/src/chip/style/index.d.ts +0 -10
  300. package/lib/typescript/src/chip/style/index.d.ts.map +0 -1
  301. package/lib/typescript/src/column/style/index.d.ts.map +0 -1
  302. package/lib/typescript/src/divider/index.d.ts.map +0 -1
  303. package/lib/typescript/src/divider/style/index.d.ts +0 -9
  304. package/lib/typescript/src/divider/style/index.d.ts.map +0 -1
  305. package/lib/typescript/src/hooks/index.d.ts.map +0 -1
  306. package/lib/typescript/src/hooks/useMergeStyles.d.ts.map +0 -1
  307. package/lib/typescript/src/index.d.ts.map +0 -1
  308. package/lib/typescript/src/input/index.d.ts.map +0 -1
  309. package/lib/typescript/src/input/style/index.d.ts.map +0 -1
  310. package/lib/typescript/src/list-item/index.d.ts.map +0 -1
  311. package/lib/typescript/src/list-item/style/index.d.ts.map +0 -1
  312. package/lib/typescript/src/popover/index.d.ts.map +0 -1
  313. package/lib/typescript/src/popover/style/index.d.ts +0 -7
  314. package/lib/typescript/src/popover/style/index.d.ts.map +0 -1
  315. package/lib/typescript/src/row/index.d.ts.map +0 -1
  316. package/lib/typescript/src/row/style/index.d.ts.map +0 -1
  317. package/lib/typescript/src/space/index.d.ts.map +0 -1
  318. package/lib/typescript/src/space/style/index.d.ts.map +0 -1
  319. package/lib/typescript/src/text/index.d.ts.map +0 -1
  320. package/lib/typescript/src/text/style/index.d.ts.map +0 -1
  321. package/lib/typescript/src/theme/config.d.ts +0 -18
  322. package/lib/typescript/src/theme/config.d.ts.map +0 -1
  323. package/lib/typescript/src/theme/tokens.d.ts.map +0 -1
  324. package/lib/typescript/src/touchable/index.d.ts.map +0 -1
  325. package/lib/typescript/src/touchable/style/index.d.ts.map +0 -1
  326. package/lib/typescript/src/wave-animation/index.d.ts.map +0 -1
  327. package/lib/typescript/tests/component/component.coverage.test.d.ts +0 -2
  328. package/lib/typescript/tests/component/component.coverage.test.d.ts.map +0 -1
  329. package/lib/typescript/tests/component/component.interaction.test.d.ts +0 -2
  330. package/lib/typescript/tests/component/component.interaction.test.d.ts.map +0 -1
  331. package/lib/typescript/tests/component/component.snapshot.test.d.ts +0 -2
  332. package/lib/typescript/tests/component/component.snapshot.test.d.ts.map +0 -1
  333. package/lib/typescript/tests/e2e/app.e2e.test.d.ts +0 -2
  334. package/lib/typescript/tests/e2e/app.e2e.test.d.ts.map +0 -1
  335. package/lib/typescript/tests/integration/ui.integration.test.d.ts +0 -2
  336. package/lib/typescript/tests/integration/ui.integration.test.d.ts.map +0 -1
  337. package/lib/typescript/tests/unit/mergeStyles.unit.test.d.ts +0 -2
  338. package/lib/typescript/tests/unit/mergeStyles.unit.test.d.ts.map +0 -1
  339. package/lib/typescript/tests/unit/public-api.unit.test.d.ts +0 -2
  340. package/lib/typescript/tests/unit/public-api.unit.test.d.ts.map +0 -1
  341. package/lib/typescript/tests/unit/theme-config.unit.test.d.ts +0 -2
  342. package/lib/typescript/tests/unit/theme-config.unit.test.d.ts.map +0 -1
  343. package/src/theme/config.ts +0 -26
  344. /package/lib/typescript/{jest.setup.d.ts → commonjs/jest.setup.d.ts} +0 -0
  345. /package/lib/typescript/{src → commonjs/src}/action-sheet/index.d.ts +0 -0
  346. /package/lib/typescript/{src → commonjs/src}/avatar/index.d.ts +0 -0
  347. /package/lib/typescript/{src → commonjs/src}/button/index.d.ts +0 -0
  348. /package/lib/typescript/{src → commonjs/src}/center/index.d.ts +0 -0
  349. /package/lib/typescript/{src → commonjs/src}/center/style/index.d.ts +0 -0
  350. /package/lib/typescript/{src → commonjs/src}/chip/index.d.ts +0 -0
  351. /package/lib/typescript/{src → commonjs/src}/column/index.d.ts +0 -0
  352. /package/lib/typescript/{src → commonjs/src}/column/style/index.d.ts +0 -0
  353. /package/lib/typescript/{src → commonjs/src}/divider/index.d.ts +0 -0
  354. /package/lib/typescript/{src → commonjs/src}/hooks/index.d.ts +0 -0
  355. /package/lib/typescript/{src → commonjs/src}/hooks/useMergeStyles.d.ts +0 -0
  356. /package/lib/typescript/{src → commonjs/src}/input/index.d.ts +0 -0
  357. /package/lib/typescript/{src → commonjs/src}/list-item/index.d.ts +0 -0
  358. /package/lib/typescript/{src → commonjs/src}/popover/index.d.ts +0 -0
  359. /package/lib/typescript/{src → commonjs/src}/row/index.d.ts +0 -0
  360. /package/lib/typescript/{src → commonjs/src}/row/style/index.d.ts +0 -0
  361. /package/lib/typescript/{src → commonjs/src}/space/index.d.ts +0 -0
  362. /package/lib/typescript/{src → commonjs/src}/space/style/index.d.ts +0 -0
  363. /package/lib/typescript/{src → commonjs/src}/text/index.d.ts +0 -0
  364. /package/lib/typescript/{src → commonjs/src}/touchable/index.d.ts +0 -0
  365. /package/lib/typescript/{src → commonjs/src}/touchable/style/index.d.ts +0 -0
  366. /package/lib/typescript/{src → commonjs/src}/wave-animation/index.d.ts +0 -0
  367. /package/lib/typescript/{package.json → module/package.json} +0 -0
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.lineStyle = exports.createDefaultStyles = exports.contentWrapStyle = void 0;
7
+ var _reactNative = require("react-native");
8
+ const createDefaultStyles = t => ({
9
+ root: {
10
+ flexDirection: 'row',
11
+ alignItems: 'center',
12
+ paddingHorizontal: 16,
13
+ paddingVertical: 14
14
+ },
15
+ content: {
16
+ fontSize: 15,
17
+ color: t.colorText,
18
+ flex: 1
19
+ },
20
+ description: {
21
+ fontSize: 12,
22
+ color: t.colorTextSecondary,
23
+ marginTop: 2
24
+ },
25
+ extra: {
26
+ color: t.colorTextSecondary,
27
+ fontSize: 14
28
+ }
29
+ });
30
+ exports.createDefaultStyles = createDefaultStyles;
31
+ const lineStyle = exports.lineStyle = _reactNative.StyleSheet.create({
32
+ s: {
33
+ flex: 1,
34
+ flexDirection: 'row',
35
+ alignItems: 'center'
36
+ }
37
+ }).s;
38
+ const contentWrapStyle = exports.contentWrapStyle = _reactNative.StyleSheet.create({
39
+ s: {
40
+ flex: 1
41
+ }
42
+ }).s;
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","createDefaultStyles","t","root","flexDirection","alignItems","paddingHorizontal","paddingVertical","content","fontSize","color","colorText","flex","description","colorTextSecondary","marginTop","extra","exports","lineStyle","StyleSheet","create","s","contentWrapStyle"],"sourceRoot":"../../../../src","sources":["list-item/style/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAWO,MAAMC,mBAAmB,GAAIC,CAAS,KAA8B;EACzEC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACS,SAAS;IAClBC,IAAI,EAAE;EACR,CAAC;EACDC,WAAW,EAAE;IACXJ,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACY,kBAAkB;IAC3BC,SAAS,EAAE;EACb,CAAC;EACDC,KAAK,EAAE;IACLN,KAAK,EAAER,CAAC,CAACY,kBAAkB;IAC3BL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAACQ,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA;AAEI,MAAMiB,SAAS,GAAAD,OAAA,CAAAC,SAAA,GAAGC,uBAAU,CAACC,MAAM,CAAC;EACzCC,CAAC,EAAE;IAAET,IAAI,EAAE,CAAC;IAAER,aAAa,EAAE,KAAK;IAAEC,UAAU,EAAE;EAAS;AAC3D,CAAC,CAAC,CAACgB,CAAC;AAEG,MAAMC,gBAAgB,GAAAL,OAAA,CAAAK,gBAAA,GAAGH,uBAAU,CAACC,MAAM,CAAC;EAChDC,CAAC,EAAE;IAAET,IAAI,EAAE;EAAE;AACf,CAAC,CAAC,CAACS,CAAC","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _popover = _interopRequireDefault(require("../popover"));
10
+ var _context = require("../theme/context");
11
+ var _style = require("./style");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ /**
16
+ * Menu 独立组件
17
+ *
18
+ * 基于 Popover 实现的菜单列表,支持 danger、icon、disabled。
19
+ */
20
+
21
+ const Menu = ({
22
+ visible,
23
+ onClose,
24
+ anchorLayout,
25
+ actions,
26
+ onAction,
27
+ placement = 'bottom',
28
+ width = 160,
29
+ style,
30
+ styles: semanticStyles,
31
+ testID
32
+ }) => {
33
+ const tokens = (0, _context.useTokens)();
34
+ const ds = (0, _react.useMemo)(() => (0, _style.createDefaultStyles)(tokens), [tokens]);
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.default, {
36
+ visible: visible,
37
+ onClose: onClose,
38
+ anchorLayout: anchorLayout,
39
+ placement: placement,
40
+ width: width,
41
+ style: style,
42
+ testID: testID,
43
+ children: actions.map((action, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
44
+ children: [index > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
45
+ style: [ds.divider, semanticStyles?.divider]
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
47
+ style: [ds.item, semanticStyles?.item],
48
+ onPress: () => {
49
+ if (!action.disabled) {
50
+ onAction?.(action);
51
+ onClose();
52
+ }
53
+ },
54
+ disabled: action.disabled,
55
+ testID: testID ? `${testID}-${action.key}` : undefined,
56
+ children: [action.icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
57
+ style: [ds.itemIcon, semanticStyles?.itemIcon],
58
+ children: action.icon
59
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
60
+ style: [action.danger ? ds.itemLabelDanger : ds.itemLabel, semanticStyles?.itemLabel],
61
+ children: action.text
62
+ })]
63
+ })]
64
+ }, action.key))
65
+ });
66
+ };
67
+ var _default = exports.default = Menu;
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_popover","_interopRequireDefault","_context","_style","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Menu","visible","onClose","anchorLayout","actions","onAction","placement","width","style","styles","semanticStyles","testID","tokens","useTokens","ds","useMemo","createDefaultStyles","jsx","children","map","action","index","jsxs","Fragment","View","divider","Pressable","item","onPress","disabled","key","undefined","icon","itemIcon","Text","danger","itemLabelDanger","itemLabel","text","_default","exports"],"sourceRoot":"../../../src","sources":["menu/index.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAA8C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,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MAAA,CACE,CAAC;IAAA,GA5BOlB,MAAM,CAACU,GA6BZ,CACjB;EAAC,CACK,CAAC;AAEd,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAzD,OAAA,GAEaiB,IAAI","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createDefaultStyles = void 0;
7
+ var _reactNative = require("react-native");
8
+ const createDefaultStyles = t => ({
9
+ item: {
10
+ flexDirection: 'row',
11
+ alignItems: 'center',
12
+ paddingVertical: 12,
13
+ paddingHorizontal: 16
14
+ },
15
+ itemLabel: {
16
+ fontSize: 14,
17
+ color: t.colorText
18
+ },
19
+ itemLabelDanger: {
20
+ fontSize: 14,
21
+ color: t.colorError
22
+ },
23
+ itemIcon: {
24
+ marginRight: 8
25
+ },
26
+ divider: {
27
+ height: _reactNative.StyleSheet.hairlineWidth,
28
+ backgroundColor: t.colorBorder
29
+ }
30
+ });
31
+ exports.createDefaultStyles = createDefaultStyles;
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","createDefaultStyles","t","item","flexDirection","alignItems","paddingVertical","paddingHorizontal","itemLabel","fontSize","color","colorText","itemLabelDanger","colorError","itemIcon","marginRight","divider","height","StyleSheet","hairlineWidth","backgroundColor","colorBorder","exports"],"sourceRoot":"../../../../src","sources":["menu/style/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAWO,MAAMC,mBAAmB,GAAIC,CAAS,KAAM;EACjDC,IAAI,EAAE;IACJC,aAAa,EAAE,KAAc;IAC7BC,UAAU,EAAE,QAAiB;IAC7BC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,SAAS,EAAE;IACTC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACS;EACX,CAAC;EACDC,eAAe,EAAE;IACfH,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAER,CAAC,CAACW;EACX,CAAC;EACDC,QAAQ,EAAE;IACRC,WAAW,EAAE;EACf,CAAC;EACDC,OAAO,EAAE;IACPC,MAAM,EAAEC,uBAAU,CAACC,aAAa;IAChCC,eAAe,EAAElB,CAAC,CAACmB;EACrB;AACF,CAAC,CAAC;AAACC,OAAA,CAAArB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _hooks = require("../hooks");
10
+ var _context = require("../theme/context");
11
+ var _style = require("./style");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ /**
15
+ * Popover 基础组件
16
+ *
17
+ * 锚定定位下拉容器,仅做定位,内容由 children 传入。
18
+ */
19
+
20
+ const GAP = 4;
21
+ const Popover = ({
22
+ visible,
23
+ onClose,
24
+ anchorLayout,
25
+ width = 180,
26
+ placement = 'bottom',
27
+ children,
28
+ style,
29
+ styles: semanticStyles,
30
+ testID
31
+ }) => {
32
+ const tokens = (0, _context.useTokens)();
33
+ const defaultStyles = (0, _react.useMemo)(() => (0, _style.createDefaultStyles)(tokens), [tokens]);
34
+ const s = (0, _react.useMemo)(() => (0, _hooks.mergeStyles)(defaultStyles, semanticStyles), [defaultStyles, semanticStyles]);
35
+ if (!visible) {
36
+ return null;
37
+ }
38
+ const positionStyle = placement === 'bottom' ? {
39
+ top: anchorLayout.y + anchorLayout.height + GAP,
40
+ left: anchorLayout.x
41
+ } : {
42
+ bottom: anchorLayout.y - GAP,
43
+ left: anchorLayout.x
44
+ };
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
46
+ visible: visible,
47
+ transparent: true,
48
+ animationType: "fade",
49
+ onRequestClose: onClose,
50
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback, {
51
+ onPress: onClose,
52
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
53
+ style: s.overlay,
54
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback, {
55
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
56
+ style: [s.content, positionStyle, {
57
+ width
58
+ }, style],
59
+ testID: testID,
60
+ children: children
61
+ })
62
+ })
63
+ })
64
+ })
65
+ });
66
+ };
67
+ var _default = exports.default = Popover;
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_hooks","_context","_style","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GAP","Popover","visible","onClose","anchorLayout","width","placement","children","style","styles","semanticStyles","testID","tokens","useTokens","defaultStyles","useMemo","createDefaultStyles","s","mergeStyles","positionStyle","top","y","height","left","x","bottom","jsx","Modal","transparent","animationType","onRequestClose","TouchableWithoutFeedback","onPress","View","overlay","content","_default","exports"],"sourceRoot":"../../../src","sources":["popover/index.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,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8C,GAAA,EAAClD,YAAA,CAAAuD,wBAAwB;UAAAxB,QAAA,eACvB,IAAA3B,WAAA,CAAA8C,GAAA,EAAClD,YAAA,CAAAyD,IAAI;YACHzB,KAAK,EAAE,CAACS,CAAC,CAACkB,OAAO,EAAEhB,aAAa,EAAE;cAAEd;YAAM,CAAC,EAAEG,KAAK,CAAE;YACpDG,MAAM,EAAEA,MAAO;YAAAJ,QAAA,EAEdA;UAAQ,CACL;QAAC,CACiB;MAAC,CACvB;IAAC,CACiB;EAAC,CACtB,CAAC;AAEZ,CAAC;AAAC,IAAA6B,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEaU,OAAO","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: Popover
3
+ nav:
4
+ title: 组件
5
+ order: 1
6
+ group:
7
+ title: 基础
8
+ order: 2
9
+ ---
10
+
11
+ # Popover 弹出定位容器
12
+
13
+ 锚定在指定元素下方的弹出容器,用于下拉菜单等场景。
14
+
15
+ ## 何时使用
16
+
17
+ - 下拉选择菜单
18
+ - 模型选择器
19
+ - 任何需要锚定定位的浮层
20
+
21
+ ## 代码演示
22
+
23
+ ```tsx
24
+ import { Popover } from '@unif/react-native-ui';
25
+
26
+ <Popover
27
+ visible={visible}
28
+ onClose={() => setVisible(false)}
29
+ anchorLayout={{ x: 100, y: 50, width: 120, height: 40 }}
30
+ width={180}
31
+ >
32
+ <View>
33
+ <Text>下拉内容</Text>
34
+ </View>
35
+ </Popover>
36
+ ```
37
+
38
+ ## API
39
+
40
+ | 属性 | 说明 | 类型 | 默认值 |
41
+ | ------------ | -------------- | --------------------------------------------- | ---------- |
42
+ | visible | 是否可见 | `boolean` | - |
43
+ | onClose | 关闭回调 | `() => void` | - |
44
+ | anchorLayout | 锚点布局 | `{ x, y, width, height }` | - |
45
+ | width | 内容宽度 | `number` | `180` |
46
+ | placement | 弹出方向 | `'bottom'` \| `'top'` | `'bottom'` |
47
+ | children | 弹出内容 | `ReactNode` | - |
48
+ | style | 内容容器样式 | `ViewStyle` | - |
49
+ | styles | 语义样式 | `PopoverSemanticStyles` | - |
50
+ | testID | 测试标识 | `string` | - |
51
+
52
+ ## Semantic Styles
53
+
54
+ | Slot | 说明 |
55
+ | ------- | ------------ |
56
+ | overlay | 遮罩层 |
57
+ | content | 内容容器 |
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createDefaultStyles = void 0;
7
+ const createDefaultStyles = t => ({
8
+ overlay: {
9
+ flex: 1
10
+ },
11
+ content: {
12
+ position: 'absolute',
13
+ backgroundColor: t.colorBgElevated,
14
+ borderRadius: 12,
15
+ shadowColor: '#000',
16
+ shadowOffset: {
17
+ width: 0,
18
+ height: 4
19
+ },
20
+ shadowOpacity: 0.12,
21
+ shadowRadius: 12,
22
+ elevation: 8
23
+ }
24
+ });
25
+ exports.createDefaultStyles = createDefaultStyles;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createDefaultStyles","t","overlay","flex","content","position","backgroundColor","colorBgElevated","borderRadius","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","exports"],"sourceRoot":"../../../../src","sources":["popover/style/index.tsx"],"mappings":";;;;;;AAQO,MAAMA,mBAAmB,GAAIC,CAAS,KAA6B;EACxEC,OAAO,EAAE;IACPC,IAAI,EAAE;EACR,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE,UAAU;IACpBC,eAAe,EAAEL,CAAC,CAACM,eAAe;IAClCC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAACC,OAAA,CAAAhB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _style = require("./style");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * 水平布局容器
14
+ *
15
+ * 默认 flexDirection: 'row' + alignItems: 'center'。
16
+ */
17
+
18
+ const Row = ({
19
+ align,
20
+ justify,
21
+ gap,
22
+ wrap,
23
+ style,
24
+ ...rest
25
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
26
+ style: [_style.baseStyle, align != null && {
27
+ alignItems: align
28
+ }, justify != null && {
29
+ justifyContent: justify
30
+ }, gap != null && {
31
+ gap
32
+ }, wrap && _style.wrapStyle, style],
33
+ ...rest
34
+ });
35
+ var _default = exports.default = Row;
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_style","_jsxRuntime","e","__esModule","default","Row","align","justify","gap","wrap","style","rest","jsx","View","baseStyle","alignItems","justifyContent","wrapStyle","_default","exports"],"sourceRoot":"../../../src","sources":["row/index.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA+C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAT/C;AACA;AACA;AACA;AACA;;AAqBA,MAAMG,GAAuB,GAAGA,CAAC;EAC/BC,KAAK;EACLC,OAAO;EACPC,GAAG;EACHC,IAAI;EACJC,KAAK;EACL,GAAGC;AACK,CAAC,kBACT,IAAAV,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAc,IAAI;EACHH,KAAK,EAAE,CACLI,gBAAS,EACTR,KAAK,IAAI,IAAI,IAAI;IAAES,UAAU,EAAET;EAAM,CAAC,EACtCC,OAAO,IAAI,IAAI,IAAI;IAAES,cAAc,EAAET;EAAQ,CAAC,EAC9CC,GAAG,IAAI,IAAI,IAAI;IAAEA;EAAI,CAAC,EACtBC,IAAI,IAAIQ,gBAAS,EACjBP,KAAK,CACL;EAAA,GACEC;AAAI,CACT,CACF;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEaC,GAAG","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ # Row 水平布局
2
+
3
+ 水平排列子元素,默认垂直居中。替代 `flexDirection: 'row' + alignItems: 'center'` 的手写样式。
4
+
5
+ ## 何时使用
6
+
7
+ - 需要水平排列元素时
8
+ - 替代 `<View style={{flexDirection: 'row', alignItems: 'center'}}>` 的场景
9
+
10
+ ## 代码演示
11
+
12
+ ```tsx
13
+ // 基础用法 — 默认 alignItems: 'center'
14
+ <Row>
15
+ <Icon name="star" />
16
+ <Text>标题</Text>
17
+ </Row>
18
+
19
+ // 两端对齐
20
+ <Row justify="space-between">
21
+ <Text>左侧</Text>
22
+ <Text>右侧</Text>
23
+ </Row>
24
+
25
+ // 间距
26
+ <Row gap={10}>
27
+ <Button block onPress={...}>修改</Button>
28
+ <Button block onPress={...}>确认</Button>
29
+ </Row>
30
+
31
+ // 换行
32
+ <Row wrap gap={8}>
33
+ {tags.map(tag => <Tag key={tag}>{tag}</Tag>)}
34
+ </Row>
35
+ ```
36
+
37
+ ## API
38
+
39
+ | 属性 | 说明 | 类型 | 默认值 |
40
+ |------|------|------|--------|
41
+ | align | alignItems | `ViewStyle['alignItems']` | `'center'` |
42
+ | justify | justifyContent | `ViewStyle['justifyContent']` | - |
43
+ | gap | 子元素间距 | `number` | - |
44
+ | wrap | 是否换行 | `boolean` | `false` |
45
+
46
+ > 继承所有 RN `ViewProps`(`style`、`testID` 等)
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.wrapStyle = exports.baseStyle = void 0;
7
+ var _reactNative = require("react-native");
8
+ const baseStyle = exports.baseStyle = _reactNative.StyleSheet.create({
9
+ row: {
10
+ flexDirection: 'row',
11
+ alignItems: 'center'
12
+ }
13
+ }).row;
14
+ const wrapStyle = exports.wrapStyle = _reactNative.StyleSheet.create({
15
+ wrap: {
16
+ flexWrap: 'wrap'
17
+ }
18
+ }).wrap;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","baseStyle","exports","StyleSheet","create","row","flexDirection","alignItems","wrapStyle","wrap","flexWrap"],"sourceRoot":"../../../../src","sources":["row/style/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,uBAAU,CAACC,MAAM,CAAC;EACzCC,GAAG,EAAE;IACHC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC,CAACF,GAAG;AAEC,MAAMG,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAGL,uBAAU,CAACC,MAAM,CAAC;EACzCK,IAAI,EAAE;IACJC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC,CAACD,IAAI","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _style = require("./style");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * 间距占位组件
14
+ *
15
+ * 在两个元素之间插入固定间距。
16
+ */
17
+
18
+ const Space = ({
19
+ size = 12,
20
+ direction = 'vertical'
21
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
22
+ style: direction === 'vertical' ? (0, _style.verticalStyle)(size) : (0, _style.horizontalStyle)(size)
23
+ });
24
+ var _default = exports.default = Space;
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_style","_jsxRuntime","e","__esModule","default","Space","size","direction","jsx","View","style","verticalStyle","horizontalStyle","_default","exports"],"sourceRoot":"../../../src","sources":["space/index.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAyD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AARzD;AACA;AACA;AACA;AACA;;AAaA,MAAMG,KAA2B,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC,SAAS,GAAG;AAAW,CAAC,kBACxE,IAAAN,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAU,IAAI;EACHC,KAAK,EACHH,SAAS,KAAK,UAAU,GACpB,IAAAI,oBAAa,EAACL,IAAI,CAAC,GACnB,IAAAM,sBAAe,EAACN,IAAI;AACzB,CACF,CACF;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEaC,KAAK","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ # Space 间距占位
2
+
3
+ 在两个元素之间插入固定间距。替代 `<View style={{height: 12}} />` 或 `marginTop` 手写。
4
+
5
+ ## 何时使用
6
+
7
+ - 两个块级元素之间需要固定间距
8
+ - 不想在元素上写 margin 时
9
+
10
+ ## 代码演示
11
+
12
+ ```tsx
13
+ // 垂直间距(默认)
14
+ <Text variant="title">标题</Text>
15
+ <Space size={16} />
16
+ <Text variant="body">正文内容</Text>
17
+
18
+ // 水平间距
19
+ <Row>
20
+ <Icon name="star" />
21
+ <Space size={8} direction="horizontal" />
22
+ <Text>收藏</Text>
23
+ </Row>
24
+ ```
25
+
26
+ ## API
27
+
28
+ | 属性 | 说明 | 类型 | 默认值 |
29
+ |------|------|------|--------|
30
+ | size | 间距大小(px) | `number` | `12` |
31
+ | direction | 方向 | `'vertical'` \| `'horizontal'` | `'vertical'` |
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.verticalStyle = exports.horizontalStyle = void 0;
7
+ const verticalStyle = size => ({
8
+ height: size
9
+ });
10
+ exports.verticalStyle = verticalStyle;
11
+ const horizontalStyle = size => ({
12
+ width: size
13
+ });
14
+ exports.horizontalStyle = horizontalStyle;
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verticalStyle","size","height","exports","horizontalStyle","width"],"sourceRoot":"../../../../src","sources":["space/style/index.tsx"],"mappings":";;;;;;AAAO,MAAMA,aAAa,GAAIC,IAAY,KAAM;EAAEC,MAAM,EAAED;AAAK,CAAC,CAAC;AAACE,OAAA,CAAAH,aAAA,GAAAA,aAAA;AAE3D,MAAMI,eAAe,GAAIH,IAAY,KAAM;EAAEI,KAAK,EAAEJ;AAAK,CAAC,CAAC;AAACE,OAAA,CAAAC,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _context = require("../theme/context");
10
+ var _style = require("./style");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * 语义化文字组件
15
+ *
16
+ * variant 驱动样式,支持嵌套 Text。
17
+ */
18
+
19
+ const Text = ({
20
+ variant = 'body',
21
+ secondary,
22
+ primary,
23
+ color,
24
+ weight,
25
+ style,
26
+ ...rest
27
+ }) => {
28
+ const tokens = (0, _context.useTokens)();
29
+ const variantMap = (0, _react.useMemo)(() => (0, _style.createVariantMap)(tokens), [tokens]);
30
+ const secondaryStyle = (0, _react.useMemo)(() => (0, _style.createSecondaryStyle)(tokens), [tokens]);
31
+ const primaryStyle = (0, _react.useMemo)(() => (0, _style.createPrimaryStyle)(tokens), [tokens]);
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
33
+ style: [variantMap[variant], secondary && secondaryStyle, primary && primaryStyle, color != null && {
34
+ color
35
+ }, weight != null && _style.WEIGHT_MAP[weight], style],
36
+ ...rest
37
+ });
38
+ };
39
+ var _default = exports.default = Text;
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_context","_style","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Text","variant","secondary","primary","color","weight","style","rest","tokens","useTokens","variantMap","useMemo","createVariantMap","secondaryStyle","createSecondaryStyle","primaryStyle","createPrimaryStyle","jsx","WEIGHT_MAP","_default","exports"],"sourceRoot":"../../../src","sources":["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G,MAAM;EAChBC,SAAS;EACTC,OAAO;EACPC,KAAK;EACLC,MAAM;EACNC,KAAK;EACL,GAAGC;AACM,CAAC,KAAK;EACf,MAAMC,MAAM,GAAG,IAAAC,kBAAS,EAAC,CAAC;EAC1B,MAAMC,UAAU,GAAG,IAAAC,cAAO,EAAC,MAAM,IAAAC,uBAAgB,EAACJ,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EACpE,MAAMK,cAAc,GAAG,IAAAF,cAAO,EAAC,MAAM,IAAAG,2BAAoB,EAACN,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAC5E,MAAMO,YAAY,GAAG,IAAAJ,cAAO,EAAC,MAAM,IAAAK,yBAAkB,EAACR,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAExE,oBACE,IAAA5B,WAAA,CAAAqC,GAAA,EAACxC,YAAA,CAAAuB,IAAM;IACLM,KAAK,EAAE,CACLI,UAAU,CAACT,OAAO,CAAC,EACnBC,SAAS,IAAIW,cAAc,EAC3BV,OAAO,IAAIY,YAAY,EACvBX,KAAK,IAAI,IAAI,IAAI;MAAEA;IAAM,CAAC,EAC1BC,MAAM,IAAI,IAAI,IAAIa,iBAAU,CAACb,MAAM,CAAC,EACpCC,KAAK,CACL;IAAA,GACEC;EAAI,CACT,CAAC;AAEN,CAAC;AAAC,IAAAY,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEaS,IAAI","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ # Text 语义化文字
2
+
3
+ 通过 `variant` 驱动排版样式。继承 RN `Text`,支持嵌套。
4
+
5
+ ## 何时使用
6
+
7
+ - 替代直接写 `fontSize` + `fontWeight` + `color` 的 `<Text>` 组合
8
+ - 需要统一排版规范时
9
+
10
+ ## 代码演示
11
+
12
+ ```tsx
13
+ // 基础用法
14
+ <Text variant="title">标题文字</Text>
15
+ <Text variant="caption" secondary>辅助说明</Text>
16
+
17
+ // 颜色与字重
18
+ <Text variant="caption" primary weight="bold">¥88.00</Text>
19
+
20
+ // 嵌套 Text
21
+ <Text variant="body" numberOfLines={1}>
22
+ <Text primary weight="semibold">新 </Text>
23
+ {productName}
24
+ </Text>
25
+ ```
26
+
27
+ ## API
28
+
29
+ | 属性 | 说明 | 类型 | 默认值 |
30
+ |------|------|------|--------|
31
+ | variant | 排版变体 | `'title'` \| `'heading'` \| `'body'` \| `'caption'` \| `'micro'` | `'body'` |
32
+ | secondary | 次要色(colorTextSecondary) | `boolean` | `false` |
33
+ | primary | 主题色(colorPrimary) | `boolean` | `false` |
34
+ | color | 自定义颜色 | `string` | - |
35
+ | weight | 字重 | `'medium'` \| `'semibold'` \| `'bold'` | - |
36
+
37
+ > 继承所有 RN `TextProps`(`numberOfLines`、`ellipsizeMode`、`onPress`、`style` 等)
38
+
39
+ ## Variant 规格
40
+
41
+ | variant | fontSize | lineHeight | fontWeight | 场景 |
42
+ |---------|----------|------------|------------|------|
43
+ | title | 20 | 26 | 600 | 页面标题、问候语 |
44
+ | heading | 16 | 22 | 600 | 弹窗标题、区块标题 |
45
+ | body | 15 | 22 | 正常 | 默认正文 |
46
+ | caption | 13 | 18 | 正常 | 信息行、标签 |
47
+ | micro | 12 | 18 | 正常 | 地址、规格、描述 |
48
+
49
+ ## Weight 映射
50
+
51
+ | weight | fontWeight | 场景 |
52
+ |--------|----------|------|
53
+ | medium | 500 | 产品名、模型名 |
54
+ | semibold | 600 | 标题、按钮文字、客户名 |
55
+ | bold | 700 | 价格金额 |
56
+
57
+ ## 样式优先级
58
+
59
+ ```
60
+ VARIANT_MAP → secondary/primary → color → weight → style
61
+ ```
62
+
63
+ 后传入的属性覆盖先传入的,`style` prop 拥有最高优先级。