@xhsreds/reds-rn-next 0.1.2 → 0.1.4

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 (335) hide show
  1. package/benchmarks/out.json +900 -820
  2. package/coverage/.tmp/coverage-0.json +1 -1
  3. package/coverage/.tmp/coverage-1.json +1 -1
  4. package/coverage/.tmp/coverage-10.json +1 -1
  5. package/coverage/.tmp/coverage-12.json +1 -1
  6. package/coverage/.tmp/coverage-13.json +1 -1
  7. package/coverage/.tmp/coverage-14.json +1 -1
  8. package/coverage/.tmp/coverage-15.json +1 -1
  9. package/coverage/.tmp/coverage-16.json +1 -1
  10. package/coverage/.tmp/coverage-17.json +1 -1
  11. package/coverage/.tmp/coverage-18.json +1 -1
  12. package/coverage/.tmp/coverage-19.json +1 -1
  13. package/coverage/.tmp/coverage-2.json +1 -1
  14. package/coverage/.tmp/coverage-20.json +1 -1
  15. package/coverage/.tmp/coverage-21.json +1 -1
  16. package/coverage/.tmp/coverage-22.json +1 -1
  17. package/coverage/.tmp/coverage-23.json +1 -1
  18. package/coverage/.tmp/coverage-24.json +1 -1
  19. package/coverage/.tmp/coverage-25.json +1 -1
  20. package/coverage/.tmp/coverage-26.json +1 -1
  21. package/coverage/.tmp/coverage-27.json +1 -1
  22. package/coverage/.tmp/coverage-28.json +1 -1
  23. package/coverage/.tmp/coverage-29.json +1 -0
  24. package/coverage/.tmp/coverage-3.json +1 -1
  25. package/coverage/.tmp/coverage-30.json +1 -0
  26. package/coverage/.tmp/coverage-31.json +1 -0
  27. package/coverage/.tmp/coverage-32.json +1 -0
  28. package/coverage/.tmp/coverage-4.json +1 -1
  29. package/coverage/.tmp/coverage-5.json +1 -1
  30. package/coverage/.tmp/coverage-6.json +1 -1
  31. package/coverage/.tmp/coverage-7.json +1 -1
  32. package/coverage/.tmp/coverage-8.json +1 -1
  33. package/coverage/.tmp/coverage-9.json +1 -1
  34. package/lib/cjs/_chunks/CkkZzOy_.js +23 -0
  35. package/lib/cjs/_chunks/CkkZzOy_.js.map +1 -0
  36. package/lib/cjs/_chunks/GhFTd1qc.js +22 -0
  37. package/lib/cjs/_chunks/GhFTd1qc.js.map +1 -0
  38. package/lib/cjs/_chunks/RPaDcSae.js +20 -0
  39. package/lib/cjs/_chunks/RPaDcSae.js.map +1 -0
  40. package/lib/cjs/_chunks/bwo-gq0b.js +66 -0
  41. package/lib/cjs/_chunks/bwo-gq0b.js.map +1 -0
  42. package/lib/cjs/components/ActionSheets/ActionSheets.js +99 -0
  43. package/lib/cjs/components/ActionSheets/ActionSheets.js.map +1 -0
  44. package/lib/cjs/components/ActionSheets/index.js +37 -0
  45. package/lib/cjs/components/ActionSheets/index.js.map +1 -0
  46. package/lib/cjs/components/ActionSheets/interface/index.js +9 -0
  47. package/lib/cjs/components/ActionSheets/interface/index.js.map +1 -0
  48. package/lib/cjs/components/ActionSheets/styles.js +59 -0
  49. package/lib/cjs/components/ActionSheets/styles.js.map +1 -0
  50. package/lib/cjs/components/Alert/Alert.js +143 -0
  51. package/lib/cjs/components/Alert/Alert.js.map +1 -0
  52. package/lib/cjs/components/Alert/index.js +145 -0
  53. package/lib/cjs/components/Alert/index.js.map +1 -0
  54. package/lib/cjs/components/Alert/interface/index.js +8 -0
  55. package/lib/cjs/components/Alert/interface/index.js.map +1 -0
  56. package/lib/cjs/components/Alert/styles.js +124 -0
  57. package/lib/cjs/components/Alert/styles.js.map +1 -0
  58. package/lib/cjs/components/Avatar/Avatar.js +1 -1
  59. package/lib/cjs/components/Avatar/Avatar.js.map +1 -1
  60. package/lib/cjs/components/AvatarGroup/AvatarGroup.js +97 -98
  61. package/lib/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  62. package/lib/cjs/components/AvatarGroup/index.js +61 -21
  63. package/lib/cjs/components/AvatarGroup/index.js.map +1 -1
  64. package/lib/cjs/components/Button/Button.js +1 -1
  65. package/lib/cjs/components/Button/Button.js.map +1 -1
  66. package/lib/cjs/components/FAB/FAB.js +1 -1
  67. package/lib/cjs/components/FAB/FAB.js.map +1 -1
  68. package/lib/cjs/components/Image/hook/index.js +2 -2
  69. package/lib/cjs/components/Image/hook/index.js.map +1 -1
  70. package/lib/cjs/components/ImagePreview/ImagePreview.js +96 -68
  71. package/lib/cjs/components/ImagePreview/ImagePreview.js.map +1 -1
  72. package/lib/cjs/components/ImagePreview/ImageViewer3.js +3 -3
  73. package/lib/cjs/components/ImagePreview/ImageViewer3.js.map +1 -1
  74. package/lib/cjs/components/ImagePreview/index.js +65 -20
  75. package/lib/cjs/components/ImagePreview/index.js.map +1 -1
  76. package/lib/cjs/components/List/ListItem/ListItem.js +94 -113
  77. package/lib/cjs/components/List/ListItem/ListItem.js.map +1 -1
  78. package/lib/cjs/components/List/index.js +59 -18
  79. package/lib/cjs/components/List/index.js.map +1 -1
  80. package/lib/cjs/components/Picker/Picker.js +6 -1
  81. package/lib/cjs/components/Picker/Picker.js.map +1 -1
  82. package/lib/cjs/components/Picker/index.js +6 -1
  83. package/lib/cjs/components/Picker/index.js.map +1 -1
  84. package/lib/cjs/components/Sheets/Sheets.js +168 -16
  85. package/lib/cjs/components/Sheets/Sheets.js.map +1 -1
  86. package/lib/cjs/components/Sheets/index.js +9 -3
  87. package/lib/cjs/components/Sheets/index.js.map +1 -1
  88. package/lib/cjs/components/Sheets/interface/index.js +6 -1
  89. package/lib/cjs/components/Sheets/interface/index.js.map +1 -1
  90. package/lib/cjs/components/Sheets/styles.js +39 -11
  91. package/lib/cjs/components/Sheets/styles.js.map +1 -1
  92. package/lib/cjs/components/Silder/Silder.js +71 -0
  93. package/lib/cjs/components/Silder/Silder.js.map +1 -0
  94. package/lib/cjs/components/Silder/index.js +18 -0
  95. package/lib/cjs/components/Silder/index.js.map +1 -0
  96. package/lib/cjs/components/Silder/interface/index.js +9 -0
  97. package/lib/cjs/components/Silder/interface/index.js.map +1 -0
  98. package/lib/cjs/components/Silder/styles.js +29 -0
  99. package/lib/cjs/components/Silder/styles.js.map +1 -0
  100. package/lib/cjs/components/TabBar/TabBar.js +10 -10
  101. package/lib/cjs/components/TabBar/TabBar.js.map +1 -1
  102. package/lib/cjs/components/Tag/Tag.js +1 -1
  103. package/lib/cjs/components/Tag/Tag.js.map +1 -1
  104. package/lib/cjs/components/Text/hooks/loadFontFromFile.js +1 -1
  105. package/lib/cjs/components/Text/hooks/loadFontFromFile.js.map +1 -1
  106. package/lib/cjs/index.js +254 -30
  107. package/lib/cjs/index.js.map +1 -1
  108. package/lib/esm/_chunks/BJ2Kj1Vd.js +58 -0
  109. package/lib/esm/_chunks/BJ2Kj1Vd.js.map +1 -0
  110. package/lib/esm/_chunks/BKEXyO9m.js +19 -0
  111. package/lib/esm/_chunks/BKEXyO9m.js.map +1 -0
  112. package/lib/esm/_chunks/{D-HreRcG.js → CwHnr-H1.js} +2 -2
  113. package/lib/esm/_chunks/{D-HreRcG.js.map → CwHnr-H1.js.map} +1 -1
  114. package/lib/esm/_chunks/DHJk9lIr.js +19 -0
  115. package/lib/esm/_chunks/DHJk9lIr.js.map +1 -0
  116. package/lib/esm/_chunks/RRfNwNcs.js +17 -0
  117. package/lib/esm/_chunks/RRfNwNcs.js.map +1 -0
  118. package/lib/esm/components/ActionSheets/ActionSheets.js +95 -0
  119. package/lib/esm/components/ActionSheets/ActionSheets.js.map +1 -0
  120. package/lib/esm/components/ActionSheets/index.js +31 -0
  121. package/lib/esm/components/ActionSheets/index.js.map +1 -0
  122. package/lib/esm/components/ActionSheets/interface/index.js +2 -0
  123. package/lib/esm/components/ActionSheets/interface/index.js.map +1 -0
  124. package/lib/esm/components/ActionSheets/styles.js +55 -0
  125. package/lib/esm/components/ActionSheets/styles.js.map +1 -0
  126. package/lib/esm/components/Alert/Alert.js +135 -0
  127. package/lib/esm/components/Alert/Alert.js.map +1 -0
  128. package/lib/esm/components/Alert/index.js +139 -0
  129. package/lib/esm/components/Alert/index.js.map +1 -0
  130. package/lib/esm/components/Alert/interface/index.js +2 -0
  131. package/lib/esm/components/Alert/interface/index.js.map +1 -0
  132. package/lib/esm/components/Alert/styles.js +122 -0
  133. package/lib/esm/components/Alert/styles.js.map +1 -0
  134. package/lib/esm/components/Avatar/Avatar.js +2 -2
  135. package/lib/esm/components/Avatar/Avatar.js.map +1 -1
  136. package/lib/esm/components/Avatar/index.js +1 -1
  137. package/lib/esm/components/Avatar/styles.js +1 -1
  138. package/lib/esm/components/AvatarGroup/AvatarGroup.js +95 -100
  139. package/lib/esm/components/AvatarGroup/AvatarGroup.js.map +1 -1
  140. package/lib/esm/components/AvatarGroup/index.js +59 -19
  141. package/lib/esm/components/AvatarGroup/index.js.map +1 -1
  142. package/lib/esm/components/Badge/Badge.js +1 -1
  143. package/lib/esm/components/Badge/index.js +1 -1
  144. package/lib/esm/components/BottomBar/BottomBar.js +1 -1
  145. package/lib/esm/components/BottomBar/index.js +1 -1
  146. package/lib/esm/components/Button/Button.js +2 -2
  147. package/lib/esm/components/Button/Button.js.map +1 -1
  148. package/lib/esm/components/Button/index.js +1 -1
  149. package/lib/esm/components/Button/styleMap.js +1 -1
  150. package/lib/esm/components/Collapse/Collapse.js +1 -1
  151. package/lib/esm/components/Collapse/Item/Item.js +1 -1
  152. package/lib/esm/components/Collapse/Item/styles.js +1 -1
  153. package/lib/esm/components/Collapse/index.js +1 -1
  154. package/lib/esm/components/ConfigProvider/ConfigProvider.js +1 -1
  155. package/lib/esm/components/ConfigProvider/hooks/ConfigCache/ConfigCache.js +1 -1
  156. package/lib/esm/components/ConfigProvider/hooks/ConfigCache/index.js +1 -1
  157. package/lib/esm/components/ConfigProvider/hooks/themeToken/useThemeToken.js +1 -1
  158. package/lib/esm/components/ConfigProvider/index.js +1 -1
  159. package/lib/esm/components/Divider/Divider.js +1 -1
  160. package/lib/esm/components/Divider/index.js +1 -1
  161. package/lib/esm/components/Divider/styles.js +1 -1
  162. package/lib/esm/components/DropDown/DropDown.js +1 -1
  163. package/lib/esm/components/DropDown/DropDownItem.js +1 -1
  164. package/lib/esm/components/DropDown/index.js +1 -1
  165. package/lib/esm/components/DropDown/styles.js +1 -1
  166. package/lib/esm/components/Empty/Empty.js +1 -1
  167. package/lib/esm/components/Empty/index.js +1 -1
  168. package/lib/esm/components/Empty/styles.js +1 -1
  169. package/lib/esm/components/FAB/FAB.js +2 -2
  170. package/lib/esm/components/FAB/FAB.js.map +1 -1
  171. package/lib/esm/components/FAB/index.js +1 -1
  172. package/lib/esm/components/Image/Image.js +1 -1
  173. package/lib/esm/components/Image/hook/index.js +3 -3
  174. package/lib/esm/components/Image/hook/index.js.map +1 -1
  175. package/lib/esm/components/Image/index.js +1 -1
  176. package/lib/esm/components/ImagePreview/Gesture/useGesture.js +1 -1
  177. package/lib/esm/components/ImagePreview/ImagePreview.js +95 -71
  178. package/lib/esm/components/ImagePreview/ImagePreview.js.map +1 -1
  179. package/lib/esm/components/ImagePreview/ImageViewer.js +1 -1
  180. package/lib/esm/components/ImagePreview/ImageViewer3.js +4 -4
  181. package/lib/esm/components/ImagePreview/ImageViewer3.js.map +1 -1
  182. package/lib/esm/components/ImagePreview/index.js +63 -18
  183. package/lib/esm/components/ImagePreview/index.js.map +1 -1
  184. package/lib/esm/components/List/ListItem/ListItem.js +92 -115
  185. package/lib/esm/components/List/ListItem/ListItem.js.map +1 -1
  186. package/lib/esm/components/List/index.js +59 -18
  187. package/lib/esm/components/List/index.js.map +1 -1
  188. package/lib/esm/components/Picker/Picker.js +7 -2
  189. package/lib/esm/components/Picker/Picker.js.map +1 -1
  190. package/lib/esm/components/Picker/index.js +7 -2
  191. package/lib/esm/components/Picker/index.js.map +1 -1
  192. package/lib/esm/components/PickerView/PickerView.js +1 -1
  193. package/lib/esm/components/PickerView/Wheel.js +1 -1
  194. package/lib/esm/components/PickerView/index.js +1 -1
  195. package/lib/esm/components/Popover/Popover.js +1 -1
  196. package/lib/esm/components/Popover/component.js +1 -1
  197. package/lib/esm/components/Popover/hook.js +1 -1
  198. package/lib/esm/components/Popover/index.js +1 -1
  199. package/lib/esm/components/Portal/core/PortalProvider.js +1 -1
  200. package/lib/esm/components/Portal/index.js +1 -1
  201. package/lib/esm/components/Progress/Progress.js +1 -1
  202. package/lib/esm/components/Progress/index.js +1 -1
  203. package/lib/esm/components/ProgressIndicator/ProgressIndicator.js +1 -1
  204. package/lib/esm/components/ProgressIndicator/index.js +1 -1
  205. package/lib/esm/components/ProgressIndicator/styles.js +1 -1
  206. package/lib/esm/components/PullRefresh/PullRefresh.js +1 -1
  207. package/lib/esm/components/PullRefresh/component.js +1 -1
  208. package/lib/esm/components/PullRefresh/index.js +1 -1
  209. package/lib/esm/components/Result/Result.js +1 -1
  210. package/lib/esm/components/Result/index.js +1 -1
  211. package/lib/esm/components/Result/styles.js +1 -1
  212. package/lib/esm/components/Sheets/Sheets.js +170 -18
  213. package/lib/esm/components/Sheets/Sheets.js.map +1 -1
  214. package/lib/esm/components/Sheets/index.js +9 -3
  215. package/lib/esm/components/Sheets/index.js.map +1 -1
  216. package/lib/esm/components/Sheets/interface/index.js +1 -1
  217. package/lib/esm/components/Sheets/styles.js +39 -11
  218. package/lib/esm/components/Sheets/styles.js.map +1 -1
  219. package/lib/esm/components/Silder/Silder.js +67 -0
  220. package/lib/esm/components/Silder/Silder.js.map +1 -0
  221. package/lib/esm/components/Silder/index.js +12 -0
  222. package/lib/esm/components/Silder/index.js.map +1 -0
  223. package/lib/esm/components/Silder/interface/index.js +3 -0
  224. package/lib/esm/components/Silder/interface/index.js.map +1 -0
  225. package/lib/esm/components/Silder/styles.js +25 -0
  226. package/lib/esm/components/Silder/styles.js.map +1 -0
  227. package/lib/esm/components/Skeleton/Item/SkeletonItem.js +1 -1
  228. package/lib/esm/components/Skeleton/Skeleton.js +1 -1
  229. package/lib/esm/components/Skeleton/index.js +1 -1
  230. package/lib/esm/components/Switch/Switch.js +1 -1
  231. package/lib/esm/components/Switch/index.js +1 -1
  232. package/lib/esm/components/Tab/Tab.js +1 -1
  233. package/lib/esm/components/Tab/index.js +1 -1
  234. package/lib/esm/components/Tab/styles.js +1 -1
  235. package/lib/esm/components/TabBar/TabBar.js +11 -11
  236. package/lib/esm/components/TabBar/TabBar.js.map +1 -1
  237. package/lib/esm/components/TabBar/index.js +1 -1
  238. package/lib/esm/components/Tag/Tag.js +2 -2
  239. package/lib/esm/components/Tag/Tag.js.map +1 -1
  240. package/lib/esm/components/Tag/index.js +1 -1
  241. package/lib/esm/components/Text/Text.js +1 -1
  242. package/lib/esm/components/Text/hooks/cloneContainer.js +1 -1
  243. package/lib/esm/components/Text/hooks/index.js +1 -1
  244. package/lib/esm/components/Text/hooks/loadFontFromFile.js +2 -2
  245. package/lib/esm/components/Text/hooks/loadFontFromFile.js.map +1 -1
  246. package/lib/esm/components/Text/index.js +1 -1
  247. package/lib/esm/components/Text/styles.js +1 -1
  248. package/lib/esm/components/Toast/Toast.js +1 -1
  249. package/lib/esm/components/Toast/api.js +1 -1
  250. package/lib/esm/components/Toast/index.js +1 -1
  251. package/lib/esm/components/Toast/styles.js +1 -1
  252. package/lib/esm/index.js +253 -28
  253. package/lib/esm/index.js.map +1 -1
  254. package/lib/types/components/ActionSheets/ActionSheets.d.ts +10 -0
  255. package/lib/types/components/ActionSheets/demo/index.d.ts +2 -0
  256. package/lib/types/components/ActionSheets/index.d.ts +4 -0
  257. package/lib/types/components/ActionSheets/interface/index.d.ts +23 -0
  258. package/lib/types/components/ActionSheets/styles.d.ts +51 -0
  259. package/lib/types/components/ActionSheets/test/index.bench.d.ts +1 -0
  260. package/lib/types/components/ActionSheets/test/index.test.d.ts +1 -0
  261. package/lib/types/components/ActionSheets/test/paper.bench.d.ts +1 -0
  262. package/lib/types/components/Alert/Alert.d.ts +4 -0
  263. package/lib/types/components/Alert/demo/index.d.ts +2 -0
  264. package/lib/types/components/Alert/index.d.ts +4 -0
  265. package/lib/types/components/Alert/interface/index.d.ts +35 -0
  266. package/lib/types/components/Alert/styles.d.ts +108 -0
  267. package/lib/types/components/Alert/test/index.bench.d.ts +1 -0
  268. package/lib/types/components/Alert/test/index.test.d.ts +1 -0
  269. package/lib/types/components/Alert/test/paper.bench.d.ts +1 -0
  270. package/lib/types/components/FAB/test/paper.bench.d.ts +1 -0
  271. package/lib/types/components/Sheets/Sheets.d.ts +17 -1
  272. package/lib/types/components/Sheets/interface/index.d.ts +45 -0
  273. package/lib/types/components/Sheets/styles.d.ts +38 -9
  274. package/lib/types/components/Sheets/test/index.test.d.ts +1 -1
  275. package/lib/types/components/Silder/Silder.d.ts +13 -0
  276. package/lib/types/components/Silder/demo/index.d.ts +2 -0
  277. package/lib/types/components/Silder/index.d.ts +4 -0
  278. package/lib/types/components/Silder/interface/index.d.ts +19 -0
  279. package/lib/types/components/Silder/styles.d.ts +20 -0
  280. package/lib/types/components/Silder/test/index.bench.d.ts +1 -0
  281. package/lib/types/components/Silder/test/index.test.d.ts +1 -0
  282. package/lib/types/index.d.ts +6 -0
  283. package/package.json +2 -3
  284. package/src/components/ActionSheets/ActionSheets.tsx +66 -0
  285. package/src/components/ActionSheets/demo/index.tsx +65 -0
  286. package/src/components/ActionSheets/doc/index.mdx +24 -0
  287. package/src/components/ActionSheets/index.ts +5 -0
  288. package/src/components/ActionSheets/interface/index.ts +27 -0
  289. package/src/components/ActionSheets/styles.ts +54 -0
  290. package/src/components/ActionSheets/test/index.bench.tsx +13 -0
  291. package/src/components/ActionSheets/test/index.test.tsx +81 -0
  292. package/src/components/ActionSheets/test/paper.bench.tsx +17 -0
  293. package/src/components/Alert/Alert.tsx +170 -0
  294. package/src/components/Alert/demo/index.tsx +234 -0
  295. package/src/components/Alert/doc/index.mdx +37 -0
  296. package/src/components/Alert/index.ts +5 -0
  297. package/src/components/Alert/interface/index.ts +35 -0
  298. package/src/components/Alert/styles.ts +116 -0
  299. package/src/components/Alert/test/__snapshots__/index.test.tsx.snap +519 -0
  300. package/src/components/Alert/test/index.bench.tsx +13 -0
  301. package/src/components/Alert/test/index.test.tsx +62 -0
  302. package/src/components/Alert/test/paper.bench.tsx +26 -0
  303. package/src/components/Avatar/test/__snapshots__/index.test.tsx.snap +32 -0
  304. package/src/components/Avatar/test/paper.bench.tsx +1 -1
  305. package/src/components/Button/test/__snapshots__/index.test.tsx.snap +0 -10
  306. package/src/components/Divider/test/__snapshots__/index.test.tsx.snap +420 -6
  307. package/src/components/Divider/test/index.test.tsx +43 -35
  308. package/src/components/FAB/test/__snapshots__/index.test.tsx.snap +0 -2
  309. package/src/components/FAB/test/paper.bench.tsx +12 -0
  310. package/src/components/Picker/test/index.test.tsx +17 -25
  311. package/src/components/Progress/test/__snapshots__/index.test.tsx.snap +332 -3
  312. package/src/components/Progress/test/index.test.tsx +29 -19
  313. package/src/components/PullRefresh/test/index.bench.tsx +1 -1
  314. package/src/components/Sheets/Sheets.tsx +293 -20
  315. package/src/components/Sheets/demo/index.tsx +191 -14
  316. package/src/components/Sheets/doc/index.mdx +16 -5
  317. package/src/components/Sheets/interface/index.ts +50 -0
  318. package/src/components/Sheets/styles.ts +38 -10
  319. package/src/components/Sheets/test/index.test.tsx +71 -48
  320. package/src/components/Sheets/test/paper.bench.tsx +1 -1
  321. package/src/components/Silder/Silder.tsx +49 -0
  322. package/src/components/Silder/demo/index.tsx +53 -0
  323. package/src/components/Silder/doc/index.mdx +26 -0
  324. package/src/components/Silder/index.ts +5 -0
  325. package/src/components/Silder/interface/index.ts +20 -0
  326. package/src/components/Silder/styles.ts +24 -0
  327. package/src/components/Silder/test/index.bench.tsx +13 -0
  328. package/src/components/Silder/test/index.test.tsx +18 -0
  329. package/src/components/TabBar/TabBar.tsx +17 -17
  330. package/src/components/Toast/test/paper.bench.tsx +9 -5
  331. package/src/index.ts +17 -0
  332. package/lib/cjs/_chunks/DIhBCUjt.js +0 -17
  333. package/lib/cjs/_chunks/DIhBCUjt.js.map +0 -1
  334. package/lib/esm/_chunks/B3_9dzWY.js +0 -14
  335. package/lib/esm/_chunks/B3_9dzWY.js.map +0 -1
@@ -46,7 +46,6 @@ exports[`Button Component > applies the correct styles for shape circle 1`] = `
46
46
  "backgroundColor": "rgba(255, 255, 255, 1)",
47
47
  "borderColor": "rgba(0, 0, 0, 0.2)",
48
48
  },
49
- {},
50
49
  ]
51
50
  }
52
51
  >
@@ -115,7 +114,6 @@ exports[`Button Component > applies the correct styles for shape circle left ico
115
114
  "backgroundColor": "rgba(255, 255, 255, 1)",
116
115
  "borderColor": "rgba(0, 0, 0, 0.2)",
117
116
  },
118
- {},
119
117
  ]
120
118
  }
121
119
  >
@@ -260,7 +258,6 @@ exports[`Button Component > applies the correct styles for shape circle right ic
260
258
  "backgroundColor": "rgba(255, 255, 255, 1)",
261
259
  "borderColor": "rgba(0, 0, 0, 0.2)",
262
260
  },
263
- {},
264
261
  ]
265
262
  }
266
263
  >
@@ -407,7 +404,6 @@ exports[`Button Component > applies the correct styles for shape ghost 1`] = `
407
404
  "backgroundColor": "rgba(255, 255, 255, 0.08)",
408
405
  "borderColor": "rgba(0, 0, 0, 0.62)",
409
406
  },
410
- {},
411
407
  ]
412
408
  }
413
409
  >
@@ -478,7 +474,6 @@ exports[`Button Component > applies the correct styles for shape outline 1`] = `
478
474
  "backgroundColor": "transparent",
479
475
  "borderColor": "rgba(0, 0, 0, 0.62)",
480
476
  },
481
- {},
482
477
  ]
483
478
  }
484
479
  >
@@ -549,7 +544,6 @@ exports[`Button Component > applies the correct styles for shape text 1`] = `
549
544
  "backgroundColor": "transparent",
550
545
  "borderColor": "transparent",
551
546
  },
552
- {},
553
547
  ]
554
548
  }
555
549
  >
@@ -620,7 +614,6 @@ exports[`Button Component > applies the correct styles for size 1`] = `
620
614
  "backgroundColor": "rgba(255, 255, 255, 1)",
621
615
  "borderColor": "rgba(0, 0, 0, 0.2)",
622
616
  },
623
- {},
624
617
  ]
625
618
  }
626
619
  >
@@ -691,7 +684,6 @@ exports[`Button Component > applies the correct styles for variant fill 1`] = `
691
684
  "backgroundColor": "rgba(255, 36, 66, 1)",
692
685
  "borderColor": "rgba(255, 36, 66, 1)",
693
686
  },
694
- {},
695
687
  ]
696
688
  }
697
689
  >
@@ -761,7 +753,6 @@ exports[`Button Component > applies the correct styles when block is true 1`] =
761
753
  "backgroundColor": "rgba(255, 255, 255, 1)",
762
754
  "borderColor": "rgba(0, 0, 0, 0.2)",
763
755
  },
764
- {},
765
756
  {
766
757
  "width": "100%",
767
758
  },
@@ -834,7 +825,6 @@ exports[`Button Component > applies the correct styles when disabled is true 1`]
834
825
  "backgroundColor": "rgba(255, 255, 255, 1)",
835
826
  "borderColor": "rgba(0, 0, 0, 0.2)",
836
827
  },
837
- {},
838
828
  {
839
829
  "opacity": 0.3,
840
830
  },
@@ -1,6 +1,101 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`Divider Component > applies custom styles based on size prop 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "position": "relative",
9
+ },
10
+ {
11
+ "color": "rgba(0, 0, 0, 0.45)",
12
+ "fontSize": 12,
13
+ "fontWeight": "400",
14
+ },
15
+ ]
16
+ }
17
+ >
18
+ <View
19
+ style={
20
+ {
21
+ "alignItems": "center",
22
+ "alignSelf": "center",
23
+ "backgroundColor": "#fff",
24
+ "flexDirection": "row",
25
+ "left": undefined,
26
+ "lineHeight": 18,
27
+ "paddingHorizontal": 16,
28
+ "paddingVertical": 0,
29
+ "position": "absolute",
30
+ "right": undefined,
31
+ "top": 0,
32
+ }
33
+ }
34
+ >
35
+ <View
36
+ style={
37
+ {
38
+ "borderColor": "rgba(0, 0, 0, 0.2)",
39
+ "borderStyle": "solid",
40
+ "borderTopWidth": 0.5,
41
+ "marginRight": 8,
42
+ "width": 12,
43
+ }
44
+ }
45
+ />
46
+ <Text
47
+ style={
48
+ {
49
+ "color": "rgba(0, 0, 0, 0.45)",
50
+ "fontSize": 12,
51
+ "fontWeight": "400",
52
+ }
53
+ }
54
+ >
55
+ Divider
56
+ </Text>
57
+ <View
58
+ style={
59
+ {
60
+ "borderColor": "rgba(0, 0, 0, 0.2)",
61
+ "borderStyle": "solid",
62
+ "borderTopWidth": 0.5,
63
+ "marginLeft": 8,
64
+ "width": 12,
65
+ }
66
+ }
67
+ />
68
+ </View>
69
+ </View>
70
+ `;
71
+
72
+ exports[`Divider Component > applies the correct styles based on custom border number 1`] = `
73
+ <View
74
+ style={
75
+ [
76
+ {
77
+ "position": "relative",
78
+ },
79
+ undefined,
80
+ ]
81
+ }
82
+ />
83
+ `;
84
+
85
+ exports[`Divider Component > applies the correct styles based on custom margin 1`] = `
86
+ <View
87
+ style={
88
+ [
89
+ {
90
+ "position": "relative",
91
+ },
92
+ undefined,
93
+ ]
94
+ }
95
+ />
96
+ `;
97
+
98
+ exports[`Divider Component > applies the correct styles based on custom size 1`] = `
4
99
  <View
5
100
  style={
6
101
  [
@@ -33,7 +128,37 @@ exports[`Divider Component > applies the correct styles for direction 1`] = `
33
128
  },
34
129
  ]
35
130
  }
36
- />
131
+ >
132
+ <View
133
+ style={
134
+ {
135
+ "alignItems": "center",
136
+ "alignSelf": "center",
137
+ "backgroundColor": "#fff",
138
+ "flexDirection": "row",
139
+ "left": undefined,
140
+ "lineHeight": 18,
141
+ "paddingHorizontal": 16,
142
+ "paddingVertical": 0,
143
+ "position": "absolute",
144
+ "right": undefined,
145
+ "top": -9,
146
+ }
147
+ }
148
+ >
149
+ <Text
150
+ style={
151
+ {
152
+ "color": "rgba(0, 0, 0, 0.45)",
153
+ "fontSize": 12,
154
+ "fontWeight": "400",
155
+ }
156
+ }
157
+ >
158
+ Divider
159
+ </Text>
160
+ </View>
161
+ </View>
37
162
  `;
38
163
 
39
164
  exports[`Divider Component > applies the correct styles for direction 2`] = `
@@ -74,7 +199,59 @@ exports[`Divider Component > applies the correct styles for direction 3`] = `
74
199
  },
75
200
  ]
76
201
  }
77
- />
202
+ >
203
+ <View
204
+ style={
205
+ {
206
+ "alignItems": "center",
207
+ "alignSelf": "center",
208
+ "backgroundColor": "#fff",
209
+ "flexDirection": "row",
210
+ "left": undefined,
211
+ "lineHeight": 18,
212
+ "paddingHorizontal": 16,
213
+ "paddingVertical": 0,
214
+ "position": "absolute",
215
+ "right": undefined,
216
+ "top": 0,
217
+ }
218
+ }
219
+ >
220
+ <View
221
+ style={
222
+ {
223
+ "borderColor": "rgba(0, 0, 0, 0.2)",
224
+ "borderStyle": "solid",
225
+ "borderTopWidth": 0.5,
226
+ "marginRight": 8,
227
+ "width": 12,
228
+ }
229
+ }
230
+ />
231
+ <Text
232
+ style={
233
+ {
234
+ "color": "rgba(0, 0, 0, 0.45)",
235
+ "fontSize": 12,
236
+ "fontWeight": "400",
237
+ }
238
+ }
239
+ >
240
+ Divider
241
+ </Text>
242
+ <View
243
+ style={
244
+ {
245
+ "borderColor": "rgba(0, 0, 0, 0.2)",
246
+ "borderStyle": "solid",
247
+ "borderTopWidth": 0.5,
248
+ "marginLeft": 8,
249
+ "width": 12,
250
+ }
251
+ }
252
+ />
253
+ </View>
254
+ </View>
78
255
  `;
79
256
 
80
257
  exports[`Divider Component > applies the correct styles for direction 4`] = `
@@ -91,7 +268,59 @@ exports[`Divider Component > applies the correct styles for direction 4`] = `
91
268
  },
92
269
  ]
93
270
  }
94
- />
271
+ >
272
+ <View
273
+ style={
274
+ {
275
+ "alignItems": "center",
276
+ "alignSelf": "center",
277
+ "backgroundColor": "#fff",
278
+ "flexDirection": "row",
279
+ "left": undefined,
280
+ "lineHeight": 18,
281
+ "paddingHorizontal": 16,
282
+ "paddingVertical": 0,
283
+ "position": "absolute",
284
+ "right": undefined,
285
+ "top": 0,
286
+ }
287
+ }
288
+ >
289
+ <View
290
+ style={
291
+ {
292
+ "borderColor": "rgba(51, 51, 51, .3)",
293
+ "borderStyle": "solid",
294
+ "borderTopWidth": 0.5,
295
+ "marginRight": 8,
296
+ "width": 12,
297
+ }
298
+ }
299
+ />
300
+ <Text
301
+ style={
302
+ {
303
+ "color": "rgba(51, 51, 51, .3)",
304
+ "fontSize": 12,
305
+ "fontWeight": "400",
306
+ }
307
+ }
308
+ >
309
+ Divider
310
+ </Text>
311
+ <View
312
+ style={
313
+ {
314
+ "borderColor": "rgba(51, 51, 51, .3)",
315
+ "borderStyle": "solid",
316
+ "borderTopWidth": 0.5,
317
+ "marginLeft": 8,
318
+ "width": 12,
319
+ }
320
+ }
321
+ />
322
+ </View>
323
+ </View>
95
324
  `;
96
325
 
97
326
  exports[`Divider Component > applies the correct styles for orientation 1`] = `
@@ -101,7 +330,11 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
101
330
  {
102
331
  "position": "relative",
103
332
  },
104
- undefined,
333
+ {
334
+ "color": "rgba(0, 0, 0, 0.45)",
335
+ "fontSize": 12,
336
+ "fontWeight": "400",
337
+ },
105
338
  ]
106
339
  }
107
340
  >
@@ -122,6 +355,17 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
122
355
  }
123
356
  }
124
357
  >
358
+ <View
359
+ style={
360
+ {
361
+ "borderColor": "rgba(0, 0, 0, 0.2)",
362
+ "borderStyle": "solid",
363
+ "borderTopWidth": 0.5,
364
+ "marginRight": 8,
365
+ "width": 12,
366
+ }
367
+ }
368
+ />
125
369
  <Text
126
370
  style={
127
371
  {
@@ -133,6 +377,17 @@ exports[`Divider Component > applies the correct styles for orientation 1`] = `
133
377
  >
134
378
  Divider
135
379
  </Text>
380
+ <View
381
+ style={
382
+ {
383
+ "borderColor": "rgba(0, 0, 0, 0.2)",
384
+ "borderStyle": "solid",
385
+ "borderTopWidth": 0.5,
386
+ "marginLeft": 8,
387
+ "width": 12,
388
+ }
389
+ }
390
+ />
136
391
  </View>
137
392
  </View>
138
393
  `;
@@ -144,7 +399,11 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
144
399
  {
145
400
  "position": "relative",
146
401
  },
147
- undefined,
402
+ {
403
+ "color": "rgba(0, 0, 0, 0.45)",
404
+ "fontSize": 12,
405
+ "fontWeight": "400",
406
+ },
148
407
  ]
149
408
  }
150
409
  >
@@ -165,6 +424,17 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
165
424
  }
166
425
  }
167
426
  >
427
+ <View
428
+ style={
429
+ {
430
+ "borderColor": "rgba(0, 0, 0, 0.2)",
431
+ "borderStyle": "solid",
432
+ "borderTopWidth": 0.5,
433
+ "marginRight": 8,
434
+ "width": 12,
435
+ }
436
+ }
437
+ />
168
438
  <Text
169
439
  style={
170
440
  {
@@ -176,6 +446,17 @@ exports[`Divider Component > applies the correct styles for orientation 2`] = `
176
446
  >
177
447
  Divider
178
448
  </Text>
449
+ <View
450
+ style={
451
+ {
452
+ "borderColor": "rgba(0, 0, 0, 0.2)",
453
+ "borderStyle": "solid",
454
+ "borderTopWidth": 0.5,
455
+ "marginLeft": 8,
456
+ "width": 12,
457
+ }
458
+ }
459
+ />
179
460
  </View>
180
461
  </View>
181
462
  `;
@@ -187,7 +468,11 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
187
468
  {
188
469
  "position": "relative",
189
470
  },
190
- undefined,
471
+ {
472
+ "color": "rgba(0, 0, 0, 0.45)",
473
+ "fontSize": 12,
474
+ "fontWeight": "400",
475
+ },
191
476
  ]
192
477
  }
193
478
  >
@@ -208,6 +493,17 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
208
493
  }
209
494
  }
210
495
  >
496
+ <View
497
+ style={
498
+ {
499
+ "borderColor": "rgba(0, 0, 0, 0.2)",
500
+ "borderStyle": "solid",
501
+ "borderTopWidth": 0.5,
502
+ "marginRight": 8,
503
+ "width": 12,
504
+ }
505
+ }
506
+ />
211
507
  <Text
212
508
  style={
213
509
  {
@@ -219,6 +515,124 @@ exports[`Divider Component > applies the correct styles for orientation 3`] = `
219
515
  >
220
516
  Divider
221
517
  </Text>
518
+ <View
519
+ style={
520
+ {
521
+ "borderColor": "rgba(0, 0, 0, 0.2)",
522
+ "borderStyle": "solid",
523
+ "borderTopWidth": 0.5,
524
+ "marginLeft": 8,
525
+ "width": 12,
526
+ }
527
+ }
528
+ />
222
529
  </View>
223
530
  </View>
224
531
  `;
532
+
533
+ exports[`Divider Component > renders correctly with custom color 1`] = `
534
+ <View
535
+ style={
536
+ [
537
+ {
538
+ "position": "relative",
539
+ },
540
+ undefined,
541
+ ]
542
+ }
543
+ />
544
+ `;
545
+
546
+ exports[`Divider Component > renders correctly with default props 1`] = `
547
+ <View
548
+ style={
549
+ [
550
+ {
551
+ "position": "relative",
552
+ },
553
+ undefined,
554
+ ]
555
+ }
556
+ />
557
+ `;
558
+
559
+ exports[`Divider Component > renders correctly with horizontal direction 1`] = `
560
+ <View
561
+ style={
562
+ [
563
+ {
564
+ "position": "relative",
565
+ },
566
+ {
567
+ "borderBottomColor": "rgba(0, 0, 0, 0.2)",
568
+ "borderBottomWidth": 0.5,
569
+ "borderLeftColor": undefined,
570
+ "borderLeftWidth": 0,
571
+ "borderStyle": "solid",
572
+ "marginHorizontal": 0,
573
+ "marginVertical": 20,
574
+ "position": "relative",
575
+ "width": undefined,
576
+ },
577
+ ]
578
+ }
579
+ />
580
+ `;
581
+
582
+ exports[`Divider Component > renders correctly with primary direction 1`] = `
583
+ <View
584
+ style={
585
+ [
586
+ {
587
+ "position": "relative",
588
+ },
589
+ {
590
+ "color": "rgba(0, 0, 0, 0.45)",
591
+ "fontSize": 12,
592
+ "fontWeight": "400",
593
+ },
594
+ ]
595
+ }
596
+ />
597
+ `;
598
+
599
+ exports[`Divider Component > renders correctly with secondary direction 1`] = `
600
+ <View
601
+ style={
602
+ [
603
+ {
604
+ "position": "relative",
605
+ },
606
+ {
607
+ "color": "rgba(51, 51, 51, .3)",
608
+ "fontSize": 12,
609
+ "fontWeight": "400",
610
+ },
611
+ ]
612
+ }
613
+ />
614
+ `;
615
+
616
+ exports[`Divider Component > renders correctly with vertical direction 1`] = `
617
+ <View
618
+ style={
619
+ [
620
+ {
621
+ "position": "relative",
622
+ },
623
+ {
624
+ "borderBottomColor": undefined,
625
+ "borderBottomWidth": 0,
626
+ "borderLeftColor": "rgba(0, 0, 0, 0.2)",
627
+ "borderLeftWidth": 0.5,
628
+ "borderStyle": "solid",
629
+ "height": 18,
630
+ "marginHorizontal": 12,
631
+ "marginVertical": 0,
632
+ "position": "relative",
633
+ "width": "auto",
634
+ },
635
+ ]
636
+ }
637
+ />
638
+ `;
@@ -1,58 +1,66 @@
1
1
  import React from "react";
2
2
  import { render } from "@testing-library/react-native";
3
3
  import { describe, it, expect } from "vitest";
4
- import Divider from "../index";
5
- import { lightColor } from "@xhs/reds-token-next";
4
+ import Divider from "../Divider";
6
5
 
7
6
  describe("Divider Component", () => {
8
7
  it("renders correctly with default props", () => {
9
- const { getByText } = render(<Divider>Default Divider</Divider>);
10
- expect(getByText("Default Divider")).toBeTruthy();
8
+ const { toJSON } = render(<Divider />);
9
+ expect(toJSON()).toMatchSnapshot();
10
+ });
11
+
12
+ it("renders correctly with horizontal direction", () => {
13
+ const { toJSON } = render(<Divider direction="horizontal" />);
14
+ expect(toJSON()).toMatchSnapshot();
11
15
  });
12
16
 
13
- it("applies the correct styles for direction", () => {
14
- const directions = ["horizontal", "vertical", "primary", "secondary"];
15
- directions.forEach((direction) => {
16
- const { toJSON } = render(<Divider direction={direction as any}>Divider</Divider>);
17
- expect(toJSON()).toMatchSnapshot();
18
- });
17
+ it("renders correctly with vertical direction", () => {
18
+ const { toJSON } = render(<Divider direction="vertical" />);
19
+ expect(toJSON()).toMatchSnapshot();
20
+ });
21
+
22
+ it("renders correctly with primary direction", () => {
23
+ const { toJSON } = render(<Divider direction="primary" />);
24
+ expect(toJSON()).toMatchSnapshot();
19
25
  });
20
26
 
21
- it("applies the correct styles for orientation", () => {
22
- const orientations = ["left", "center", "right"];
23
- orientations.forEach((orientation) => {
24
- const { toJSON } = render(<Divider orientation={orientation as any}>Divider</Divider>);
25
- expect(toJSON()).toMatchSnapshot();
26
- });
27
+ it("renders correctly with secondary direction", () => {
28
+ const { toJSON } = render(<Divider direction="secondary" />);
29
+ expect(toJSON()).toMatchSnapshot();
27
30
  });
28
31
 
29
- it("applies custom styles based on size prop", () => {
30
- const size = 5;
31
- const { toJSON } = render(<Divider size={size}>Divider</Divider>);
32
+ it("renders correctly with custom color", () => {
33
+ const { toJSON } = render(<Divider color="red" />);
32
34
  expect(toJSON()).toMatchSnapshot();
33
35
  });
34
36
 
35
- it("does not show text slot when direction is vertical", () => {
36
- const { queryByText } = render(<Divider direction="vertical">Vertical Divider</Divider>);
37
- const text = queryByText("Vertical Divider");
38
- expect(text).toBeNull();
37
+ it("renders correctly with left orientation", () => {
38
+ const { getByText } = render(<Divider orientation="left">Left Oriented Text</Divider>);
39
+ expect(getByText("Left Oriented Text")).toBeTruthy();
40
+ });
41
+
42
+ it("renders correctly with center orientation", () => {
43
+ const { getByText } = render(<Divider orientation="center">Center Oriented Text</Divider>);
44
+ expect(getByText("Center Oriented Text")).toBeTruthy();
45
+ });
46
+
47
+ it("renders correctly with right orientation", () => {
48
+ const { getByText } = render(<Divider orientation="right">Right Oriented Text</Divider>);
49
+ expect(getByText("Right Oriented Text")).toBeTruthy();
39
50
  });
40
51
 
41
- it("renders text slot when direction is horizontal", () => {
42
- const { getByText } = render(<Divider direction="horizontal">Horizontal Divider</Divider>);
43
- const text = getByText("Horizontal Divider");
44
- expect(text).toBeTruthy();
52
+ it("applies the correct styles based on custom margin", () => {
53
+ const { toJSON } = render(<Divider margin={[10, 20]} />);
54
+ expect(toJSON()).toMatchSnapshot();
45
55
  });
46
56
 
47
- it("renders correctly with both text and primary direction", () => {
48
- const { getByText } = render(<Divider direction="primary">Primary Divider</Divider>);
49
- const text = getByText("Primary Divider");
50
- expect(text).toBeTruthy();
57
+ it("applies the correct styles based on custom size", () => {
58
+ const { toJSON } = render(<Divider size={50} />);
59
+ expect(toJSON()).toMatchSnapshot();
51
60
  });
52
61
 
53
- it("renders correctly with both text and secondary direction", () => {
54
- const { getByText } = render(<Divider direction="secondary">Secondary Divider</Divider>);
55
- const text = getByText("Secondary Divider");
56
- expect(text).toBeTruthy();
62
+ it("applies the correct styles based on custom border number", () => {
63
+ const { toJSON } = render(<Divider stroke={2} />);
64
+ expect(toJSON()).toMatchSnapshot();
57
65
  });
58
66
  });
@@ -70,7 +70,6 @@ exports[`FAB Component > should apply position styles correctly 1`] = `
70
70
  "backgroundColor": "rgba(255, 36, 66, 1)",
71
71
  "borderColor": "rgba(255, 36, 66, 1)",
72
72
  },
73
- {},
74
73
  ]
75
74
  }
76
75
  >
@@ -168,7 +167,6 @@ exports[`FAB Component > should update boxWidth on layout change 1`] = `
168
167
  "backgroundColor": "rgba(255, 36, 66, 1)",
169
168
  "borderColor": "rgba(255, 36, 66, 1)",
170
169
  },
171
- {},
172
170
  ]
173
171
  }
174
172
  >