nwui-cli 0.4.1 → 0.4.3

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 (312) hide show
  1. package/.turbo/turbo-build.log +2 -1
  2. package/build/index.js +33 -17
  3. package/build/install-component.js +105 -48
  4. package/build/login.js +14 -11
  5. package/build/utils/env.js +1 -1
  6. package/package.json +2 -1
  7. package/build/cli/src/index.js +0 -41
  8. package/build/cli/src/install-component.js +0 -42
  9. package/build/cli/src/login.js +0 -77
  10. package/build/cli/src/net.js +0 -12
  11. package/build/cli/src/project-setup.js +0 -1
  12. package/build/cli/src/prompts.js +0 -119
  13. package/build/cli/src/utils/local-storage.js +0 -19
  14. package/build/docs/app/data.js +0 -1380
  15. package/build/log/index.js +0 -81
  16. package/build/prompts.js +0 -119
  17. package/my-expo-app-2/app/+html.tsx +0 -46
  18. package/my-expo-app-2/app/+not-found.tsx +0 -33
  19. package/my-expo-app-2/app/_layout.tsx +0 -22
  20. package/my-expo-app-2/app/details.tsx +0 -17
  21. package/my-expo-app-2/app/index.tsx +0 -23
  22. package/my-expo-app-2/app-env.d.ts +0 -2
  23. package/my-expo-app-2/app.json +0 -48
  24. package/my-expo-app-2/assets/adaptive-icon.png +0 -0
  25. package/my-expo-app-2/assets/favicon.png +0 -0
  26. package/my-expo-app-2/assets/icon.png +0 -0
  27. package/my-expo-app-2/assets/splash.png +0 -0
  28. package/my-expo-app-2/babel.config.js +0 -18
  29. package/my-expo-app-2/cesconfig.json +0 -35
  30. package/my-expo-app-2/components/Button.tsx +0 -19
  31. package/my-expo-app-2/components/Container.tsx +0 -9
  32. package/my-expo-app-2/components/EditScreenInfo.tsx +0 -34
  33. package/my-expo-app-2/components/ScreenContent.tsx +0 -25
  34. package/my-expo-app-2/components/nativewindui/ActivityIndicator.tsx +0 -13
  35. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
  36. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
  37. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
  38. package/my-expo-app-2/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
  39. package/my-expo-app-2/components/nativewindui/Alert/Alert.ios.tsx +0 -65
  40. package/my-expo-app-2/components/nativewindui/Alert/Alert.tsx +0 -291
  41. package/my-expo-app-2/components/nativewindui/Alert/index.ts +0 -1
  42. package/my-expo-app-2/components/nativewindui/Alert/types.ts +0 -27
  43. package/my-expo-app-2/components/nativewindui/Badge.tsx +0 -84
  44. package/my-expo-app-2/components/nativewindui/Button.tsx +0 -156
  45. package/my-expo-app-2/components/nativewindui/Checkbox.tsx +0 -61
  46. package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
  47. package/my-expo-app-2/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
  48. package/my-expo-app-2/components/nativewindui/ContextMenu/index.ts +0 -1
  49. package/my-expo-app-2/components/nativewindui/ContextMenu/types.ts +0 -91
  50. package/my-expo-app-2/components/nativewindui/ContextMenu/utils.ts +0 -14
  51. package/my-expo-app-2/components/nativewindui/DrawerContent.tsx +0 -145
  52. package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
  53. package/my-expo-app-2/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
  54. package/my-expo-app-2/components/nativewindui/DropdownMenu/index.ts +0 -1
  55. package/my-expo-app-2/components/nativewindui/DropdownMenu/types.ts +0 -93
  56. package/my-expo-app-2/components/nativewindui/DropdownMenu/utils.ts +0 -14
  57. package/my-expo-app-2/components/nativewindui/Form.tsx +0 -125
  58. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
  59. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
  60. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/index.ts +0 -1
  61. package/my-expo-app-2/components/nativewindui/LargeTitleHeader/types.ts +0 -89
  62. package/my-expo-app-2/components/nativewindui/List.tsx +0 -433
  63. package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
  64. package/my-expo-app-2/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
  65. package/my-expo-app-2/components/nativewindui/SearchInput/index.tsx +0 -1
  66. package/my-expo-app-2/components/nativewindui/SearchInput/types.ts +0 -12
  67. package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
  68. package/my-expo-app-2/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
  69. package/my-expo-app-2/components/nativewindui/SegmentedControl/index.ts +0 -1
  70. package/my-expo-app-2/components/nativewindui/SegmentedControl/types.ts +0 -15
  71. package/my-expo-app-2/components/nativewindui/Stepper.tsx +0 -62
  72. package/my-expo-app-2/components/nativewindui/Text.tsx +0 -55
  73. package/my-expo-app-2/components/nativewindui/TextField/TextField.ios.tsx +0 -85
  74. package/my-expo-app-2/components/nativewindui/TextField/TextField.tsx +0 -326
  75. package/my-expo-app-2/components/nativewindui/TextField/index.tsx +0 -1
  76. package/my-expo-app-2/components/nativewindui/TextField/types.ts +0 -26
  77. package/my-expo-app-2/components/nativewindui/Toolbar.tsx +0 -116
  78. package/my-expo-app-2/global.css +0 -3
  79. package/my-expo-app-2/metro.config.js +0 -12
  80. package/my-expo-app-2/package-lock.json +0 -19162
  81. package/my-expo-app-2/package.json +0 -74
  82. package/my-expo-app-2/prettier.config.js +0 -11
  83. package/my-expo-app-2/tailwind.config.js +0 -11
  84. package/my-expo-app-3/app/+html.tsx +0 -46
  85. package/my-expo-app-3/app/+not-found.tsx +0 -33
  86. package/my-expo-app-3/app/_layout.tsx +0 -22
  87. package/my-expo-app-3/app/details.tsx +0 -17
  88. package/my-expo-app-3/app/index.tsx +0 -23
  89. package/my-expo-app-3/app-env.d.ts +0 -2
  90. package/my-expo-app-3/app.json +0 -48
  91. package/my-expo-app-3/assets/adaptive-icon.png +0 -0
  92. package/my-expo-app-3/assets/favicon.png +0 -0
  93. package/my-expo-app-3/assets/icon.png +0 -0
  94. package/my-expo-app-3/assets/splash.png +0 -0
  95. package/my-expo-app-3/babel.config.js +0 -18
  96. package/my-expo-app-3/cesconfig.json +0 -35
  97. package/my-expo-app-3/components/Button.tsx +0 -19
  98. package/my-expo-app-3/components/Container.tsx +0 -9
  99. package/my-expo-app-3/components/EditScreenInfo.tsx +0 -34
  100. package/my-expo-app-3/components/ScreenContent.tsx +0 -25
  101. package/my-expo-app-3/components/nativewindui/ActivityIndicator.tsx +0 -13
  102. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
  103. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
  104. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
  105. package/my-expo-app-3/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
  106. package/my-expo-app-3/components/nativewindui/Alert/Alert.ios.tsx +0 -65
  107. package/my-expo-app-3/components/nativewindui/Alert/Alert.tsx +0 -291
  108. package/my-expo-app-3/components/nativewindui/Alert/index.ts +0 -1
  109. package/my-expo-app-3/components/nativewindui/Alert/types.ts +0 -27
  110. package/my-expo-app-3/components/nativewindui/Badge.tsx +0 -84
  111. package/my-expo-app-3/components/nativewindui/Button.tsx +0 -156
  112. package/my-expo-app-3/components/nativewindui/Checkbox.tsx +0 -61
  113. package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
  114. package/my-expo-app-3/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
  115. package/my-expo-app-3/components/nativewindui/ContextMenu/index.ts +0 -1
  116. package/my-expo-app-3/components/nativewindui/ContextMenu/types.ts +0 -91
  117. package/my-expo-app-3/components/nativewindui/ContextMenu/utils.ts +0 -14
  118. package/my-expo-app-3/components/nativewindui/DrawerContent.tsx +0 -145
  119. package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
  120. package/my-expo-app-3/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
  121. package/my-expo-app-3/components/nativewindui/DropdownMenu/index.ts +0 -1
  122. package/my-expo-app-3/components/nativewindui/DropdownMenu/types.ts +0 -93
  123. package/my-expo-app-3/components/nativewindui/DropdownMenu/utils.ts +0 -14
  124. package/my-expo-app-3/components/nativewindui/Form.tsx +0 -125
  125. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
  126. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
  127. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/index.ts +0 -1
  128. package/my-expo-app-3/components/nativewindui/LargeTitleHeader/types.ts +0 -89
  129. package/my-expo-app-3/components/nativewindui/List.tsx +0 -433
  130. package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
  131. package/my-expo-app-3/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
  132. package/my-expo-app-3/components/nativewindui/SearchInput/index.tsx +0 -1
  133. package/my-expo-app-3/components/nativewindui/SearchInput/types.ts +0 -12
  134. package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
  135. package/my-expo-app-3/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
  136. package/my-expo-app-3/components/nativewindui/SegmentedControl/index.ts +0 -1
  137. package/my-expo-app-3/components/nativewindui/SegmentedControl/types.ts +0 -15
  138. package/my-expo-app-3/components/nativewindui/Stepper.tsx +0 -62
  139. package/my-expo-app-3/components/nativewindui/Text.tsx +0 -55
  140. package/my-expo-app-3/components/nativewindui/TextField/TextField.ios.tsx +0 -85
  141. package/my-expo-app-3/components/nativewindui/TextField/TextField.tsx +0 -326
  142. package/my-expo-app-3/components/nativewindui/TextField/index.tsx +0 -1
  143. package/my-expo-app-3/components/nativewindui/TextField/types.ts +0 -26
  144. package/my-expo-app-3/components/nativewindui/Toolbar.tsx +0 -116
  145. package/my-expo-app-3/components/nativewindui/examples/selectable-text.tsx +0 -43
  146. package/my-expo-app-3/components/nativewindui/examples/text.tsx +0 -43
  147. package/my-expo-app-3/global.css +0 -3
  148. package/my-expo-app-3/metro.config.js +0 -12
  149. package/my-expo-app-3/package-lock.json +0 -19141
  150. package/my-expo-app-3/package.json +0 -73
  151. package/my-expo-app-3/prettier.config.js +0 -11
  152. package/my-expo-app-3/tailwind.config.js +0 -11
  153. package/my-expo-app-test-case/app/+html.tsx +0 -46
  154. package/my-expo-app-test-case/app/+not-found.tsx +0 -33
  155. package/my-expo-app-test-case/app/_layout.tsx +0 -22
  156. package/my-expo-app-test-case/app/details.tsx +0 -17
  157. package/my-expo-app-test-case/app/index.tsx +0 -23
  158. package/my-expo-app-test-case/app-env.d.ts +0 -2
  159. package/my-expo-app-test-case/app.json +0 -48
  160. package/my-expo-app-test-case/assets/adaptive-icon.png +0 -0
  161. package/my-expo-app-test-case/assets/favicon.png +0 -0
  162. package/my-expo-app-test-case/assets/icon.png +0 -0
  163. package/my-expo-app-test-case/assets/splash.png +0 -0
  164. package/my-expo-app-test-case/babel.config.js +0 -18
  165. package/my-expo-app-test-case/cesconfig.json +0 -35
  166. package/my-expo-app-test-case/components/Button.tsx +0 -19
  167. package/my-expo-app-test-case/components/Container.tsx +0 -9
  168. package/my-expo-app-test-case/components/EditScreenInfo.tsx +0 -34
  169. package/my-expo-app-test-case/components/ScreenContent.tsx +0 -25
  170. package/my-expo-app-test-case/components/nativewindui/ActivityIndicator.tsx +0 -13
  171. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.ios.tsx +0 -97
  172. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/AdaptiveSearchHeader.tsx +0 -264
  173. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/index.ts +0 -1
  174. package/my-expo-app-test-case/components/nativewindui/AdaptiveSearchHeader/types.ts +0 -95
  175. package/my-expo-app-test-case/components/nativewindui/Alert/Alert.ios.tsx +0 -65
  176. package/my-expo-app-test-case/components/nativewindui/Alert/Alert.tsx +0 -291
  177. package/my-expo-app-test-case/components/nativewindui/Alert/index.ts +0 -1
  178. package/my-expo-app-test-case/components/nativewindui/Alert/types.ts +0 -27
  179. package/my-expo-app-test-case/components/nativewindui/Badge.tsx +0 -84
  180. package/my-expo-app-test-case/components/nativewindui/Button.tsx +0 -156
  181. package/my-expo-app-test-case/components/nativewindui/Checkbox.tsx +0 -61
  182. package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.ios.tsx +0 -221
  183. package/my-expo-app-test-case/components/nativewindui/ContextMenu/ContextMenu.tsx +0 -420
  184. package/my-expo-app-test-case/components/nativewindui/ContextMenu/index.ts +0 -1
  185. package/my-expo-app-test-case/components/nativewindui/ContextMenu/types.ts +0 -91
  186. package/my-expo-app-test-case/components/nativewindui/ContextMenu/utils.ts +0 -14
  187. package/my-expo-app-test-case/components/nativewindui/DrawerContent.tsx +0 -145
  188. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.ios.tsx +0 -168
  189. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/DropdownMenu.tsx +0 -330
  190. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/index.ts +0 -1
  191. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/types.ts +0 -93
  192. package/my-expo-app-test-case/components/nativewindui/DropdownMenu/utils.ts +0 -14
  193. package/my-expo-app-test-case/components/nativewindui/Form.tsx +0 -125
  194. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.ios.tsx +0 -99
  195. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/LargeTitleHeader.tsx +0 -288
  196. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/index.ts +0 -1
  197. package/my-expo-app-test-case/components/nativewindui/LargeTitleHeader/types.ts +0 -89
  198. package/my-expo-app-test-case/components/nativewindui/List.tsx +0 -433
  199. package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.ios.tsx +0 -177
  200. package/my-expo-app-test-case/components/nativewindui/SearchInput/SearchInput.tsx +0 -86
  201. package/my-expo-app-test-case/components/nativewindui/SearchInput/index.tsx +0 -1
  202. package/my-expo-app-test-case/components/nativewindui/SearchInput/types.ts +0 -12
  203. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.ios.tsx +0 -31
  204. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/SegmentedControl.tsx +0 -55
  205. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/index.ts +0 -1
  206. package/my-expo-app-test-case/components/nativewindui/SegmentedControl/types.ts +0 -15
  207. package/my-expo-app-test-case/components/nativewindui/Stepper.tsx +0 -62
  208. package/my-expo-app-test-case/components/nativewindui/Text.tsx +0 -55
  209. package/my-expo-app-test-case/components/nativewindui/TextField/TextField.ios.tsx +0 -85
  210. package/my-expo-app-test-case/components/nativewindui/TextField/TextField.tsx +0 -326
  211. package/my-expo-app-test-case/components/nativewindui/TextField/index.tsx +0 -1
  212. package/my-expo-app-test-case/components/nativewindui/TextField/types.ts +0 -26
  213. package/my-expo-app-test-case/components/nativewindui/Toolbar.tsx +0 -116
  214. package/my-expo-app-test-case/components/nativewindui/examples/a-user-created-file.tsx +0 -0
  215. package/my-expo-app-test-case/components/nativewindui/examples/selectable-text.tsx +0 -43
  216. package/my-expo-app-test-case/components/nativewindui/examples/text.tsx +0 -43
  217. package/my-expo-app-test-case/global.css +0 -3
  218. package/my-expo-app-test-case/metro.config.js +0 -12
  219. package/my-expo-app-test-case/package-lock.json +0 -19141
  220. package/my-expo-app-test-case/package.json +0 -73
  221. package/my-expo-app-test-case/prettier.config.js +0 -11
  222. package/my-expo-app-test-case/tailwind.config.js +0 -11
  223. package/no-install/app/+html.tsx +0 -46
  224. package/no-install/app/+not-found.tsx +0 -25
  225. package/no-install/app/_layout.tsx +0 -7
  226. package/no-install/app/details.tsx +0 -20
  227. package/no-install/app/index.tsx +0 -19
  228. package/no-install/app-env.d.ts +0 -2
  229. package/no-install/app.json +0 -41
  230. package/no-install/assets/adaptive-icon.png +0 -0
  231. package/no-install/assets/favicon.png +0 -0
  232. package/no-install/assets/icon.png +0 -0
  233. package/no-install/assets/splash.png +0 -0
  234. package/no-install/babel.config.js +0 -13
  235. package/no-install/cesconfig.json +0 -35
  236. package/no-install/components/Button.tsx +0 -25
  237. package/no-install/components/Container.tsx +0 -9
  238. package/no-install/components/EditScreenInfo.tsx +0 -31
  239. package/no-install/components/ScreenContent.tsx +0 -29
  240. package/no-install/components/nativewindui/Slider.tsx +0 -26
  241. package/no-install/global.css +0 -3
  242. package/no-install/metro.config.js +0 -10
  243. package/no-install/package-lock.json +0 -17505
  244. package/no-install/package.json +0 -59
  245. package/no-install/prettier.config.js +0 -10
  246. package/no-install/tailwind.config.js +0 -14
  247. package/test-app/app/+html.tsx +0 -46
  248. package/test-app/app/+not-found.tsx +0 -25
  249. package/test-app/app/_layout.tsx +0 -7
  250. package/test-app/app/details.tsx +0 -20
  251. package/test-app/app/index.tsx +0 -19
  252. package/test-app/app-env.d.ts +0 -2
  253. package/test-app/app.json +0 -41
  254. package/test-app/assets/adaptive-icon.png +0 -0
  255. package/test-app/assets/favicon.png +0 -0
  256. package/test-app/assets/icon.png +0 -0
  257. package/test-app/assets/splash.png +0 -0
  258. package/test-app/babel.config.js +0 -13
  259. package/test-app/cesconfig.json +0 -35
  260. package/test-app/components/Button.tsx +0 -25
  261. package/test-app/components/Container.tsx +0 -9
  262. package/test-app/components/EditScreenInfo.tsx +0 -31
  263. package/test-app/components/ScreenContent.tsx +0 -29
  264. package/test-app/components/nativewindui/ActivityIndicator.tsx +0 -13
  265. package/test-app/components/nativewindui/Avatar.tsx +0 -133
  266. package/test-app/components/nativewindui/DatePicker/DatePicker.android.tsx +0 -72
  267. package/test-app/components/nativewindui/DatePicker/DatePicker.tsx +0 -23
  268. package/test-app/components/nativewindui/DatePicker/index.ts +0 -1
  269. package/test-app/components/nativewindui/Picker.tsx +0 -42
  270. package/test-app/components/nativewindui/ProgressIndicator.tsx +0 -78
  271. package/test-app/components/nativewindui/Sheet.tsx +0 -52
  272. package/test-app/components/nativewindui/Slider.tsx +0 -26
  273. package/test-app/components/nativewindui/Text.tsx +0 -55
  274. package/test-app/components/nativewindui/Toggle.tsx +0 -20
  275. package/test-app/global.css +0 -3
  276. package/test-app/metro.config.js +0 -10
  277. package/test-app/package.json +0 -64
  278. package/test-app/prettier.config.js +0 -10
  279. package/test-app/tailwind.config.js +0 -14
  280. package/test-no-install/app/+html.tsx +0 -46
  281. package/test-no-install/app/+not-found.tsx +0 -25
  282. package/test-no-install/app/_layout.tsx +0 -7
  283. package/test-no-install/app/details.tsx +0 -20
  284. package/test-no-install/app/index.tsx +0 -19
  285. package/test-no-install/app-env.d.ts +0 -2
  286. package/test-no-install/app.json +0 -41
  287. package/test-no-install/assets/adaptive-icon.png +0 -0
  288. package/test-no-install/assets/favicon.png +0 -0
  289. package/test-no-install/assets/icon.png +0 -0
  290. package/test-no-install/assets/splash.png +0 -0
  291. package/test-no-install/babel.config.js +0 -13
  292. package/test-no-install/cesconfig.json +0 -35
  293. package/test-no-install/components/Button.tsx +0 -25
  294. package/test-no-install/components/Container.tsx +0 -9
  295. package/test-no-install/components/EditScreenInfo.tsx +0 -31
  296. package/test-no-install/components/ScreenContent.tsx +0 -29
  297. package/test-no-install/components/nativewindui/ActivityIndicator.tsx +0 -13
  298. package/test-no-install/components/nativewindui/Avatar.tsx +0 -133
  299. package/test-no-install/components/nativewindui/DatePicker/DatePicker.android.tsx +0 -72
  300. package/test-no-install/components/nativewindui/DatePicker/DatePicker.tsx +0 -23
  301. package/test-no-install/components/nativewindui/DatePicker/index.ts +0 -1
  302. package/test-no-install/components/nativewindui/Picker.tsx +0 -42
  303. package/test-no-install/components/nativewindui/ProgressIndicator.tsx +0 -78
  304. package/test-no-install/components/nativewindui/Sheet.tsx +0 -52
  305. package/test-no-install/components/nativewindui/Slider.tsx +0 -26
  306. package/test-no-install/components/nativewindui/Text.tsx +0 -55
  307. package/test-no-install/components/nativewindui/Toggle.tsx +0 -20
  308. package/test-no-install/global.css +0 -3
  309. package/test-no-install/metro.config.js +0 -10
  310. package/test-no-install/package.json +0 -64
  311. package/test-no-install/prettier.config.js +0 -10
  312. package/test-no-install/tailwind.config.js +0 -14
@@ -1,433 +0,0 @@
1
- import {
2
- FlashList,
3
- type FlashListProps,
4
- type ListRenderItem as FlashListRenderItem,
5
- type ListRenderItemInfo,
6
- } from '@shopify/flash-list';
7
- import { cva } from 'class-variance-authority';
8
- import { cssInterop } from 'nativewind';
9
- import * as React from 'react';
10
- import {
11
- Platform,
12
- PressableProps,
13
- StyleProp,
14
- StyleSheet,
15
- TextStyle,
16
- View,
17
- ViewProps,
18
- ViewStyle,
19
- } from 'react-native';
20
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
21
-
22
- import { Button } from '~/components/nativewindui/Button';
23
- import { Text, TextClassContext } from '~/components/nativewindui/Text';
24
- import { cn } from '~/lib/cn';
25
-
26
- cssInterop(FlashList, {
27
- className: 'style',
28
- contentContainerClassName: 'contentContainerStyle',
29
- });
30
-
31
- type ListDataItem = string | { title: string; subTitle?: string };
32
- type ListVariant = 'insets' | 'full-width';
33
-
34
- type ListRef<T extends ListDataItem> = React.Ref<FlashList<T>>;
35
-
36
- type ListRenderItemProps<T extends ListDataItem> = ListRenderItemInfo<T> & {
37
- variant?: ListVariant;
38
- isFirstInSection?: boolean;
39
- isLastInSection?: boolean;
40
- sectionHeaderAsGap?: boolean;
41
- };
42
-
43
- type ListProps<T extends ListDataItem> = Omit<FlashListProps<T>, 'renderItem'> & {
44
- renderItem?: ListRenderItem<T>;
45
- variant?: ListVariant;
46
- sectionHeaderAsGap?: boolean;
47
- rootClassName?: string;
48
- rootStyle?: StyleProp<ViewStyle>;
49
- };
50
- type ListRenderItem<T extends ListDataItem> = (
51
- props: ListRenderItemProps<T>
52
- ) => ReturnType<FlashListRenderItem<T>>;
53
-
54
- const rootVariants = cva('min-h-2 flex-1', {
55
- variants: {
56
- variant: {
57
- insets: 'ios:px-4',
58
- 'full-width': 'ios:bg-card ios:dark:bg-background',
59
- },
60
- sectionHeaderAsGap: {
61
- true: '',
62
- false: '',
63
- },
64
- },
65
- compoundVariants: [
66
- {
67
- variant: 'full-width',
68
- sectionHeaderAsGap: true,
69
- className: 'bg-card dark:bg-background',
70
- },
71
- ],
72
- defaultVariants: {
73
- variant: 'full-width',
74
- sectionHeaderAsGap: false,
75
- },
76
- });
77
-
78
- function ListComponent<T extends ListDataItem>(
79
- {
80
- variant = 'full-width',
81
- rootClassName,
82
- rootStyle,
83
- contentContainerClassName,
84
- renderItem,
85
- data,
86
- sectionHeaderAsGap = false,
87
- contentInsetAdjustmentBehavior = 'automatic',
88
- ...props
89
- }: ListProps<T>,
90
- ref: ListRef<T>
91
- ) {
92
- const insets = useSafeAreaInsets();
93
- return (
94
- <View
95
- className={cn(
96
- rootVariants({
97
- variant,
98
- sectionHeaderAsGap,
99
- }),
100
- rootClassName
101
- )}
102
- style={rootStyle}>
103
- <FlashList
104
- data={data}
105
- contentInsetAdjustmentBehavior={contentInsetAdjustmentBehavior}
106
- renderItem={renderItemWithVariant(renderItem, variant, data, sectionHeaderAsGap)}
107
- contentContainerClassName={cn(
108
- variant === 'insets' && (!data || (typeof data?.[0] !== 'string' && 'pt-4')),
109
- contentContainerClassName
110
- )}
111
- contentContainerStyle={{
112
- paddingBottom: Platform.select({
113
- ios:
114
- !contentInsetAdjustmentBehavior || contentInsetAdjustmentBehavior === 'never'
115
- ? insets.bottom + 16
116
- : 0,
117
- default: insets.bottom,
118
- }),
119
- }}
120
- getItemType={getItemType}
121
- showsVerticalScrollIndicator={false}
122
- {...props}
123
- ref={ref}
124
- />
125
- </View>
126
- );
127
- }
128
-
129
- function getItemType<T>(item: T) {
130
- return typeof item === 'string' ? 'sectioHeader' : 'row';
131
- }
132
-
133
- function renderItemWithVariant<T extends ListDataItem>(
134
- renderItem: ListRenderItem<T> | null | undefined,
135
- variant: ListVariant,
136
- data: readonly T[] | null | undefined,
137
- sectionHeaderAsGap?: boolean
138
- ) {
139
- return (args: ListRenderItemProps<T>) => {
140
- const previousItem = data?.[args.index - 1];
141
- const nextItem = data?.[args.index + 1];
142
- return renderItem
143
- ? renderItem({
144
- ...args,
145
- variant,
146
- isFirstInSection: !previousItem || typeof previousItem === 'string',
147
- isLastInSection: !nextItem || typeof nextItem === 'string',
148
- sectionHeaderAsGap,
149
- })
150
- : null;
151
- };
152
- }
153
-
154
- const List = React.forwardRef(ListComponent) as <T extends ListDataItem>(
155
- props: ListProps<T> & { ref?: ListRef<T> }
156
- ) => React.ReactElement;
157
-
158
- function isPressable(props: PressableProps) {
159
- return (
160
- ('onPress' in props && props.onPress) ||
161
- ('onLongPress' in props && props.onLongPress) ||
162
- ('onPressIn' in props && props.onPressIn) ||
163
- ('onPressOut' in props && props.onPressOut) ||
164
- ('onLongPress' in props && props.onLongPress)
165
- );
166
- }
167
-
168
- type ListItemProps<T extends ListDataItem> = PressableProps &
169
- ListRenderItemProps<T> & {
170
- androidRootClassName?: string;
171
- titleClassName?: string;
172
- titleStyle?: StyleProp<TextStyle>;
173
- textNumberOfLines?: number;
174
- subTitleClassName?: string;
175
- subTitleStyle?: StyleProp<TextStyle>;
176
- subTitleNumberOfLines?: number;
177
- textContentClassName?: string;
178
- leftView?: React.ReactNode;
179
- rightView?: React.ReactNode;
180
- removeSeparator?: boolean;
181
- };
182
- type ListItemRef = React.Ref<View>;
183
-
184
- const itemVariants = cva('ios:gap-0 flex-row gap-0 bg-card', {
185
- variants: {
186
- variant: {
187
- insets: 'ios:bg-card bg-card/70',
188
- 'full-width': 'bg-card dark:bg-background',
189
- },
190
- sectionHeaderAsGap: {
191
- true: '',
192
- false: '',
193
- },
194
- isFirstItem: {
195
- true: '',
196
- false: '',
197
- },
198
- isFirstInSection: {
199
- true: '',
200
- false: '',
201
- },
202
- removeSeparator: {
203
- true: '',
204
- false: '',
205
- },
206
- isLastInSection: {
207
- true: '',
208
- false: '',
209
- },
210
- disabled: {
211
- true: 'opacity-70',
212
- false: 'opacity-100',
213
- },
214
- },
215
- compoundVariants: [
216
- {
217
- variant: 'insets',
218
- sectionHeaderAsGap: true,
219
- className: 'ios:dark:bg-card dark:bg-card/70',
220
- },
221
- {
222
- variant: 'insets',
223
- isFirstInSection: true,
224
- className: 'ios:rounded-t-[10px]',
225
- },
226
- {
227
- variant: 'insets',
228
- isLastInSection: true,
229
- className: 'ios:rounded-b-[10px]',
230
- },
231
- {
232
- removeSeparator: false,
233
- isLastInSection: true,
234
- className: 'ios:border-b-0 border-b border-border/25 dark:border-border/80',
235
- },
236
- {
237
- variant: 'insets',
238
- isFirstItem: true,
239
- className: 'border-border/40 border-t',
240
- },
241
- ],
242
- defaultVariants: {
243
- variant: 'insets',
244
- sectionHeaderAsGap: false,
245
- isFirstInSection: false,
246
- isLastInSection: false,
247
- disabled: false,
248
- },
249
- });
250
-
251
- function ListItemComponent<T extends ListDataItem>(
252
- {
253
- item,
254
- isFirstInSection,
255
- isLastInSection,
256
- index,
257
- variant,
258
- className,
259
- androidRootClassName,
260
- titleClassName,
261
- titleStyle,
262
- textNumberOfLines,
263
- subTitleStyle,
264
- subTitleClassName,
265
- subTitleNumberOfLines,
266
- textContentClassName,
267
- sectionHeaderAsGap,
268
- removeSeparator = false,
269
- leftView,
270
- rightView,
271
- disabled,
272
- ...props
273
- }: ListItemProps<T>,
274
- ref: ListItemRef
275
- ) {
276
- if (typeof item === 'string') {
277
- console.log(
278
- 'List.tsx',
279
- 'ListItemComponent',
280
- "Invalid item of type 'string' was provided. Use ListSectionHeader instead."
281
- );
282
- return null;
283
- }
284
- return (
285
- <>
286
- <Button
287
- disabled={disabled || !isPressable(props)}
288
- variant="plain"
289
- size="none"
290
- unstable_pressDelay={100}
291
- androidRootClassName={androidRootClassName}
292
- className={itemVariants({
293
- variant,
294
- sectionHeaderAsGap,
295
- isFirstInSection,
296
- isLastInSection,
297
- disabled,
298
- className,
299
- removeSeparator,
300
- })}
301
- {...props}
302
- ref={ref}>
303
- <TextClassContext.Provider value="font-normal leading-5">
304
- {!!leftView && <View>{leftView}</View>}
305
- <View
306
- className={cn(
307
- 'h-full flex-1 flex-row',
308
- !item.subTitle ? 'ios:py-3 py-[18px]' : 'ios:py-2 py-2',
309
- !leftView && 'ml-4',
310
- !rightView && 'pr-4',
311
- !removeSeparator &&
312
- (!isLastInSection || variant === 'full-width') &&
313
- 'ios:border-b ios:border-border/80',
314
- !removeSeparator &&
315
- isFirstInSection &&
316
- variant === 'full-width' &&
317
- 'ios:border-t ios:border-border/80'
318
- )}>
319
- <View className={cn('flex-1', textContentClassName)}>
320
- <Text numberOfLines={textNumberOfLines} style={titleStyle} className={titleClassName}>
321
- {item.title}
322
- </Text>
323
- {!!item.subTitle && (
324
- <Text
325
- numberOfLines={subTitleNumberOfLines}
326
- variant="subhead"
327
- style={subTitleStyle}
328
- className={cn('text-muted-foreground', subTitleClassName)}>
329
- {item.subTitle}
330
- </Text>
331
- )}
332
- </View>
333
- {!!rightView && <View>{rightView}</View>}
334
- </View>
335
- </TextClassContext.Provider>
336
- </Button>
337
- {!removeSeparator && Platform.OS !== 'ios' && !isLastInSection && (
338
- <View className={cn(variant === 'insets' && 'px-4')}>
339
- <View className="bg-border/25 dark:bg-border/80 h-px" />
340
- </View>
341
- )}
342
- </>
343
- );
344
- }
345
-
346
- const ListItem = React.forwardRef(ListItemComponent) as <T extends ListDataItem>(
347
- props: ListItemProps<T> & { ref?: ListItemRef }
348
- ) => React.ReactElement;
349
-
350
- type ListSectionHeaderProps<T extends ListDataItem> = ViewProps &
351
- ListRenderItemProps<T> & {
352
- textClassName?: string;
353
- };
354
- type ListSectionHeaderRef = React.Ref<View>;
355
-
356
- function ListSectionHeaderComponent<T extends ListDataItem>(
357
- {
358
- item,
359
- isFirstInSection,
360
- isLastInSection,
361
- index,
362
- variant,
363
- className,
364
- textClassName,
365
- sectionHeaderAsGap,
366
- ...props
367
- }: ListSectionHeaderProps<T>,
368
- ref: ListSectionHeaderRef
369
- ) {
370
- if (typeof item !== 'string') {
371
- console.log(
372
- 'List.tsx',
373
- 'ListSectionHeaderComponent',
374
- "Invalid item provided. Expected type 'string'. Use ListItem instead."
375
- );
376
- return null;
377
- }
378
-
379
- if (sectionHeaderAsGap) {
380
- return (
381
- <View
382
- className={cn(
383
- 'bg-background',
384
- Platform.OS !== 'ios' && 'border-border/25 dark:border-border/80 border-b',
385
- className
386
- )}
387
- {...props}
388
- ref={ref}>
389
- <View className="h-8" />
390
- </View>
391
- );
392
- }
393
- return (
394
- <View
395
- className={cn(
396
- 'ios:pb-1 pb-4 pl-4 pt-4',
397
- Platform.OS !== 'ios' && 'border-border/25 dark:border-border/80 border-b',
398
- variant === 'full-width' ? 'bg-card dark:bg-background' : 'bg-background',
399
- className
400
- )}
401
- {...props}
402
- ref={ref}>
403
- <Text
404
- variant={Platform.select({ ios: 'footnote', default: 'body' })}
405
- className={cn('ios:uppercase ios:text-muted-foreground', textClassName)}>
406
- {item}
407
- </Text>
408
- </View>
409
- );
410
- }
411
-
412
- const ListSectionHeader = React.forwardRef(ListSectionHeaderComponent) as <T extends ListDataItem>(
413
- props: ListSectionHeaderProps<T> & { ref?: ListSectionHeaderRef }
414
- ) => React.ReactElement;
415
-
416
- const ESTIMATED_ITEM_HEIGHT = {
417
- titleOnly: Platform.select({ ios: 45, default: 57 }),
418
- withSubTitle: 56,
419
- };
420
-
421
- function getStickyHeaderIndices<T extends ListDataItem>(data: T[]) {
422
- if (!data) return [];
423
- const indices: number[] = [];
424
- for (let i = 0; i < data.length; i++) {
425
- if (typeof data[i] === 'string') {
426
- indices.push(i);
427
- }
428
- }
429
- return indices;
430
- }
431
-
432
- export { ESTIMATED_ITEM_HEIGHT, List, ListItem, ListSectionHeader, getStickyHeaderIndices };
433
- export type { ListDataItem, ListItemProps, ListProps, ListRenderItemInfo, ListSectionHeaderProps };
@@ -1,177 +0,0 @@
1
- import { useAugmentedRef, useControllableState } from '@rn-primitives/hooks';
2
- import { Icon } from '@roninoss/icons';
3
- import * as React from 'react';
4
- import {
5
- Pressable,
6
- TextInput,
7
- View,
8
- ViewStyle,
9
- type NativeSyntheticEvent,
10
- type TextInputFocusEventData,
11
- } from 'react-native';
12
- import Animated, {
13
- measure,
14
- useAnimatedRef,
15
- useAnimatedStyle,
16
- useDerivedValue,
17
- withTiming,
18
- } from 'react-native-reanimated';
19
-
20
- import type { SearchInputProps } from './types';
21
-
22
- import { Text } from '~/components/nativewindui/Text';
23
-
24
- import { cn } from '~/lib/cn';
25
- import { useColorScheme } from '~/lib/useColorScheme';
26
-
27
- // Add as class when possible: https://github.com/marklawlor/nativewind/issues/522
28
- const BORDER_CURVE: ViewStyle = {
29
- borderCurve: 'continuous',
30
- };
31
-
32
- const SearchInput = React.forwardRef<React.ElementRef<typeof TextInput>, SearchInputProps>(
33
- (
34
- {
35
- value: valueProp,
36
- onChangeText: onChangeTextProp,
37
- onFocus: onFocusProp,
38
- placeholder = 'Search...',
39
- cancelText = 'Cancel',
40
- containerClassName,
41
- iconContainerClassName,
42
- className,
43
- iconColor,
44
- ...props
45
- },
46
- ref
47
- ) => {
48
- const { colors } = useColorScheme();
49
- const inputRef = useAugmentedRef({ ref, methods: { focus, blur, clear } });
50
- const [showCancel, setShowCancel] = React.useState(false);
51
- const showCancelDerivedValue = useDerivedValue(() => showCancel, [showCancel]);
52
- const animatedRef = useAnimatedRef();
53
-
54
- const [value = '', onChangeText] = useControllableState({
55
- prop: valueProp,
56
- defaultProp: valueProp ?? '',
57
- onChange: onChangeTextProp,
58
- });
59
-
60
- const rootStyle = useAnimatedStyle(() => {
61
- if (_WORKLET) {
62
- // safely use measure
63
- const measurement = measure(animatedRef);
64
- return {
65
- paddingRight: showCancelDerivedValue.value
66
- ? withTiming(measurement?.width ?? cancelText.length * 11.2)
67
- : withTiming(0),
68
- };
69
- }
70
- return {
71
- paddingRight: showCancelDerivedValue.value
72
- ? withTiming(cancelText.length * 11.2)
73
- : withTiming(0),
74
- };
75
- });
76
- const buttonStyle3 = useAnimatedStyle(() => {
77
- if (_WORKLET) {
78
- // safely use measure
79
- const measurement = measure(animatedRef);
80
- return {
81
- position: 'absolute',
82
- right: 0,
83
- opacity: showCancelDerivedValue.value ? withTiming(1) : withTiming(0),
84
- transform: [
85
- {
86
- translateX: showCancelDerivedValue.value
87
- ? withTiming(0)
88
- : measurement?.width
89
- ? withTiming(measurement.width)
90
- : cancelText.length * 11.2,
91
- },
92
- ],
93
- };
94
- }
95
- return {
96
- position: 'absolute',
97
- right: 0,
98
- opacity: showCancelDerivedValue.value ? withTiming(1) : withTiming(0),
99
- transform: [
100
- {
101
- translateX: showCancelDerivedValue.value
102
- ? withTiming(0)
103
- : withTiming(cancelText.length * 11.2),
104
- },
105
- ],
106
- };
107
- });
108
-
109
- function focus() {
110
- inputRef.current?.focus();
111
- }
112
-
113
- function blur() {
114
- inputRef.current?.blur();
115
- }
116
-
117
- function clear() {
118
- onChangeText('');
119
- }
120
-
121
- function onFocus(e: NativeSyntheticEvent<TextInputFocusEventData>) {
122
- setShowCancel(true);
123
- onFocusProp?.(e);
124
- }
125
-
126
- return (
127
- <Animated.View className="flex-row items-center" style={rootStyle}>
128
- <Animated.View
129
- style={BORDER_CURVE}
130
- className={cn('flex-1 flex-row rounded-lg bg-card', containerClassName)}>
131
- <View
132
- className={cn(
133
- 'absolute bottom-0 left-0 top-0 z-50 justify-center pl-1.5',
134
- iconContainerClassName
135
- )}>
136
- <Icon color={iconColor ?? colors.grey3} name="magnify" size={22} />
137
- </View>
138
- <TextInput
139
- ref={inputRef}
140
- placeholder={placeholder}
141
- className={cn(
142
- !showCancel && 'active:bg-muted/5 dark:active:bg-muted/20',
143
- 'flex-1 rounded-lg py-2 pl-8 pr-1 text-[17px] text-foreground',
144
- className
145
- )}
146
- value={value}
147
- onChangeText={onChangeText}
148
- onFocus={onFocus}
149
- clearButtonMode="while-editing"
150
- role="searchbox"
151
- {...props}
152
- />
153
- </Animated.View>
154
- <Animated.View
155
- ref={animatedRef}
156
- style={buttonStyle3}
157
- pointerEvents={!showCancel ? 'none' : 'auto'}>
158
- <Pressable
159
- onPress={() => {
160
- onChangeText('');
161
- inputRef.current?.blur();
162
- setShowCancel(false);
163
- }}
164
- disabled={!showCancel}
165
- pointerEvents={!showCancel ? 'none' : 'auto'}
166
- className="flex-1 justify-center active:opacity-50">
167
- <Text className="px-2 text-primary">{cancelText}</Text>
168
- </Pressable>
169
- </Animated.View>
170
- </Animated.View>
171
- );
172
- }
173
- );
174
-
175
- SearchInput.displayName = 'SearchInput';
176
-
177
- export { SearchInput };
@@ -1,86 +0,0 @@
1
- import { useAugmentedRef, useControllableState } from '@rn-primitives/hooks';
2
- import { Icon } from '@roninoss/icons';
3
- import * as React from 'react';
4
- import { Pressable, TextInput, View } from 'react-native';
5
- import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
6
-
7
- import type { SearchInputProps } from './types';
8
-
9
- import { Button } from '~/components/nativewindui/Button';
10
- import { cn } from '~/lib/cn';
11
- import { useColorScheme } from '~/lib/useColorScheme';
12
-
13
- const SearchInput = React.forwardRef<React.ElementRef<typeof TextInput>, SearchInputProps>(
14
- (
15
- {
16
- value: valueProp,
17
- onChangeText: onChangeTextProp,
18
- placeholder = 'Search...',
19
- cancelText = 'Cancel',
20
- containerClassName,
21
- iconContainerClassName,
22
- className,
23
- iconColor,
24
- ...props
25
- },
26
- ref
27
- ) => {
28
- const { colors } = useColorScheme();
29
- const inputRef = useAugmentedRef({ ref, methods: { focus, blur, clear } });
30
- const [value = '', onChangeText] = useControllableState({
31
- prop: valueProp,
32
- defaultProp: valueProp ?? '',
33
- onChange: onChangeTextProp,
34
- });
35
-
36
- function focus() {
37
- inputRef.current?.focus();
38
- }
39
-
40
- function blur() {
41
- inputRef.current?.blur();
42
- }
43
-
44
- function clear() {
45
- onChangeText('');
46
- }
47
-
48
- return (
49
- <Button
50
- variant="plain"
51
- className={cn(
52
- 'android:gap-0 android:h-14 flex-row items-center rounded-full bg-card px-2',
53
- containerClassName
54
- )}
55
- onPress={focus}>
56
- <View className={cn('p-2', iconContainerClassName)} pointerEvents="none">
57
- <Icon color={iconColor ?? colors.grey2} name="magnify" size={24} />
58
- </View>
59
-
60
- <View className="flex-1" pointerEvents="none">
61
- <TextInput
62
- ref={inputRef}
63
- placeholder={placeholder}
64
- className={cn('flex-1 rounded-r-full p-2 text-[17px] text-foreground', className)}
65
- placeholderTextColor={colors.grey2}
66
- value={value}
67
- onChangeText={onChangeText}
68
- role="searchbox"
69
- {...props}
70
- />
71
- </View>
72
- {!!value && (
73
- <Animated.View entering={FadeIn} exiting={FadeOut.duration(150)}>
74
- <Pressable className="p-2" onPress={clear}>
75
- <Icon color={colors.grey2} name="close" size={24} />
76
- </Pressable>
77
- </Animated.View>
78
- )}
79
- </Button>
80
- );
81
- }
82
- );
83
-
84
- SearchInput.displayName = 'SearchInput';
85
-
86
- export { SearchInput };
@@ -1 +0,0 @@
1
- export * from './SearchInput';
@@ -1,12 +0,0 @@
1
- import type { TextInput, TextInputProps } from 'react-native';
2
-
3
- type SearchInputProps = TextInputProps & {
4
- containerClassName?: string;
5
- iconContainerClassName?: string;
6
- cancelText?: string;
7
- iconColor?: string;
8
- };
9
-
10
- type SearchInputRef = TextInput;
11
-
12
- export type { SearchInputProps, SearchInputRef };