nwui-cli 0.4.1 → 0.4.2

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,221 +0,0 @@
1
- import { ICON_MAPPING, type MaterialIconName } from '@roninoss/icons';
2
- import { cssInterop } from 'nativewind';
3
- import * as React from 'react';
4
- import { View } from 'react-native';
5
- import {
6
- ContextMenuView,
7
- MenuAttributes,
8
- MenuConfig,
9
- MenuElementConfig,
10
- OnPressMenuItemEvent,
11
- } from 'react-native-ios-context-menu';
12
-
13
- import type {
14
- ContextItem,
15
- ContextMenuConfig,
16
- ContextMenuProps,
17
- ContextMenuRef,
18
- ContextSubMenu,
19
- } from './types';
20
-
21
- cssInterop(ContextMenuView, {
22
- className: 'style',
23
- });
24
-
25
- const PREVIEW_CONFIG = {
26
- previewSize: 'INHERIT',
27
- preferredCommitStyle: 'dismiss',
28
- isResizeAnimated: true,
29
- previewType: 'CUSTOM',
30
- } as const;
31
-
32
- function getAuxiliaryPreviewPosition(position: 'start' | 'center' | 'end') {
33
- switch (position) {
34
- case 'start':
35
- return 'targetLeading';
36
- case 'center':
37
- return 'targetCenter';
38
- case 'end':
39
- return 'targetTrailing';
40
- }
41
- }
42
-
43
- function getAuxiliaryPreviewConfig(position: 'start' | 'center' | 'end') {
44
- return {
45
- verticalAnchorPosition: 'automatic',
46
- horizontalAlignment: getAuxiliaryPreviewPosition(position),
47
- transitionConfigEntrance: {
48
- mode: 'syncedToMenuEntranceTransition',
49
- shouldAnimateSize: false,
50
- },
51
- transitionExitPreset: {
52
- mode: 'zoomAndSlide',
53
- },
54
- } as const;
55
- }
56
-
57
- const ContextMenu = React.forwardRef<ContextMenuRef, ContextMenuProps>(
58
- (
59
- {
60
- items,
61
- title,
62
- iOSItemSize = 'large',
63
- onItemPress,
64
- enabled = true,
65
- iosRenderPreview,
66
- iosOnPressMenuPreview,
67
- renderAuxiliaryPreview,
68
- auxiliaryPreviewPosition = 'start',
69
- materialPortalHost: _materialPortalHost,
70
- materialSideOffset: _materialSideOffset,
71
- materialAlignOffset: _materialAlignOffset,
72
- materialAlign: _materialAlign,
73
- materialWidth: _materialWidth,
74
- materialMinWidth: _materialMinWidth,
75
- materialLoadingText: _materialLoadingText,
76
- materialSubMenuTitlePlaceholder: _materialSubMenuTitlePlaceholder,
77
- materialOverlayClassName: _materialOverlayClassName,
78
- ...props
79
- },
80
- ref
81
- ) => {
82
- return (
83
- <View>
84
- <ContextMenuView
85
- ref={ref as React.LegacyRef<ContextMenuView>}
86
- isContextMenuEnabled={enabled}
87
- menuConfig={toConfigMenu(items, iOSItemSize, title)}
88
- onPressMenuItem={toOnPressMenuItem(onItemPress)}
89
- onPressMenuPreview={iosOnPressMenuPreview}
90
- shouldCleanupOnComponentWillUnmountForAuxPreview
91
- previewConfig={!iosRenderPreview ? undefined : PREVIEW_CONFIG}
92
- renderPreview={iosRenderPreview}
93
- shouldPreventLongPressGestureFromPropagating
94
- lazyPreview={!!iosRenderPreview}
95
- auxiliaryPreviewConfig={
96
- !renderAuxiliaryPreview
97
- ? undefined
98
- : getAuxiliaryPreviewConfig(auxiliaryPreviewPosition)
99
- }
100
- isAuxiliaryPreviewEnabled={!!renderAuxiliaryPreview}
101
- renderAuxiliaryPreview={renderAuxiliaryPreview}
102
- {...props}
103
- />
104
- </View>
105
- );
106
- }
107
- );
108
-
109
- ContextMenu.displayName = 'ContextMenu';
110
-
111
- export { ContextMenu };
112
-
113
- function toOnPressMenuItem(onItemPress: ContextMenuProps['onItemPress']): OnPressMenuItemEvent {
114
- return ({ nativeEvent, isUsingActionSheetFallback }) => {
115
- onItemPress?.(
116
- {
117
- actionKey: nativeEvent.actionKey,
118
- title: nativeEvent.actionTitle,
119
- subTitle: nativeEvent.actionSubtitle,
120
- state: nativeEvent.menuState ? { checked: nativeEvent.menuState === 'on' } : undefined,
121
- destructive: nativeEvent.menuAttributes?.includes('destructive'),
122
- disabled: nativeEvent.menuAttributes?.includes('disabled'),
123
- hidden: nativeEvent.menuAttributes?.includes('hidden'),
124
- keepOpenOnPress: nativeEvent.menuAttributes?.includes('keepsMenuPresented'),
125
- loading: false,
126
- },
127
- isUsingActionSheetFallback
128
- );
129
- };
130
- }
131
-
132
- function toConfigMenu(
133
- items: ContextMenuConfig['items'],
134
- iOSItemSize: ContextMenuConfig['iOSItemSize'],
135
- title: ContextMenuConfig['title']
136
- ): MenuConfig {
137
- return {
138
- menuTitle: title ?? '',
139
- menuPreferredElementSize: iOSItemSize,
140
- menuItems: items.map((item) => {
141
- if ('items' in item) {
142
- return toConfigSubMenu(item);
143
- }
144
- return toConfigItem(item);
145
- }),
146
- };
147
- }
148
-
149
- function toConfigSubMenu(subMenu: ContextSubMenu): MenuElementConfig {
150
- if (subMenu.loading) {
151
- return {
152
- type: 'deferred',
153
- deferredID: `${subMenu.title ?? ''}-${Date.now()}`,
154
- };
155
- }
156
- return {
157
- menuOptions: subMenu.iOSType === 'inline' ? ['displayInline'] : undefined,
158
- menuTitle: subMenu.title ?? '',
159
- menuSubtitle: subMenu.subTitle,
160
- menuPreferredElementSize: subMenu.iOSItemSize,
161
- menuItems: subMenu.items.map((item) => {
162
- if ('items' in item) {
163
- return toConfigSubMenu(item);
164
- }
165
- return toConfigItem(item);
166
- }),
167
- };
168
- }
169
-
170
- function toConfigItem(item: ContextItem): MenuElementConfig {
171
- if (item.loading) {
172
- return {
173
- type: 'deferred',
174
- deferredID: `${item.actionKey}-deferred}`,
175
- };
176
- }
177
- const menuAttributes: MenuAttributes[] = [];
178
- if (item.destructive) {
179
- menuAttributes.push('destructive');
180
- }
181
- if (item.disabled) {
182
- menuAttributes.push('disabled');
183
- }
184
- if (item.hidden) {
185
- menuAttributes.push('hidden');
186
- }
187
- if (item.keepOpenOnPress) {
188
- menuAttributes.push('keepsMenuPresented');
189
- }
190
- return {
191
- actionKey: item.actionKey,
192
- actionTitle: item.title ?? '',
193
- actionSubtitle: item.subTitle,
194
- menuState: item.state?.checked ? 'on' : 'off',
195
- menuAttributes,
196
- discoverabilityTitle: item.subTitle,
197
- icon: item?.image?.url
198
- ? {
199
- type: 'IMAGE_REMOTE_URL',
200
- imageValue: {
201
- url: item.image.url,
202
- },
203
- imageOptions: {
204
- cornerRadius: item.image.cornerRadius,
205
- tint: item.image.tint,
206
- },
207
- }
208
- : item.icon
209
- ? {
210
- iconType: 'SYSTEM',
211
- iconValue:
212
- item.icon?.namingScheme === 'sfSymbol'
213
- ? item.icon.name ?? 'questionmark'
214
- : item.icon.name && item.icon.name in ICON_MAPPING
215
- ? ICON_MAPPING[item.icon.name as MaterialIconName].sfSymbol
216
- : 'questionmark',
217
- iconTint: item.icon?.color,
218
- }
219
- : undefined,
220
- };
221
- }
@@ -1,420 +0,0 @@
1
- import * as ContextMenuPrimitive from '@rn-primitives/context-menu';
2
- import { useAugmentedRef, useRelativePosition } from '@rn-primitives/hooks';
3
- import * as Haptics from 'expo-haptics';
4
- import { Icon } from '@roninoss/icons';
5
- import * as React from 'react';
6
- import {
7
- Image,
8
- LayoutChangeEvent,
9
- LayoutRectangle,
10
- Pressable,
11
- StyleSheet,
12
- View,
13
- ViewProps,
14
- } from 'react-native';
15
- import Animated, {
16
- FadeIn,
17
- FadeInLeft,
18
- FadeOut,
19
- FadeOutLeft,
20
- LayoutAnimationConfig,
21
- LinearTransition,
22
- } from 'react-native-reanimated';
23
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
24
-
25
- import { ContextItem, ContextMenuProps, ContextMenuRef, ContextSubMenu } from './types';
26
-
27
- import { ActivityIndicator } from '~/components/nativewindui/ActivityIndicator';
28
- import { Button } from '~/components/nativewindui/Button';
29
- import { DropdownMenu } from '~/components/nativewindui/DropdownMenu';
30
- import { Text } from '~/components/nativewindui/Text';
31
- import { cn } from '~/lib/cn';
32
- import { useColorScheme } from '~/lib/useColorScheme';
33
-
34
- const ContextMenuContext = React.createContext<{
35
- onItemPress: ContextMenuProps['onItemPress'];
36
- dismissMenu?: () => void;
37
- materialLoadingText: string;
38
- materialSubMenuTitlePlaceholder: string;
39
- subMenuRefs: React.MutableRefObject<ContextMenuRef[]>;
40
- closeSubMenus: () => void;
41
- } | null>(null);
42
-
43
- const ROOT_DEFAULT_LAYOUT = {
44
- height: 0,
45
- width: 0,
46
- pageX: 0,
47
- pageY: 0,
48
- };
49
-
50
- const ContextMenu = React.forwardRef<ContextMenuRef, ContextMenuProps>(
51
- (
52
- {
53
- items,
54
- title,
55
- iOSItemSize: _iOSItemSize,
56
- onItemPress: onItemPressProp,
57
- enabled = true,
58
- children,
59
- materialPortalHost,
60
- materialSideOffset = 2,
61
- materialAlignOffset,
62
- materialAlign = 'center',
63
- materialWidth,
64
- materialMinWidth = 200,
65
- materialLoadingText = 'Loading...',
66
- materialSubMenuTitlePlaceholder = 'More ...',
67
- iosRenderPreview: _iosRenderPreview,
68
- iosOnPressMenuPreview: _iosOnPressMenuPreview,
69
- renderAuxiliaryPreview,
70
- auxiliaryPreviewPosition = 'start',
71
- materialOverlayClassName,
72
- ...props
73
- },
74
- ref
75
- ) => {
76
- const [rootLayout, setRootLayout] = React.useState(ROOT_DEFAULT_LAYOUT);
77
- const [auxiliaryContentLayout, setAuxiliaryContentLayout] =
78
- React.useState<LayoutRectangle | null>(null);
79
- const [contentLayout, setContentLayout] = React.useState<LayoutRectangle | null>(null);
80
- const subMenuRefs = React.useRef<ContextMenuRef[]>([]);
81
- const insets = useSafeAreaInsets();
82
- const triggerRef = React.useRef<ContextMenuPrimitive.ContextMenuTriggerRef>(null);
83
- const rootRef = useAugmentedRef({
84
- ref,
85
- methods: {
86
- presentMenu: () => {
87
- triggerRef.current?.open();
88
- },
89
- dismissMenu,
90
- },
91
- deps: [triggerRef.current],
92
- });
93
-
94
- const positionStyle = useRelativePosition({
95
- align: auxiliaryPreviewPosition,
96
- avoidCollisions: true,
97
- triggerPosition: rootLayout,
98
- contentLayout: auxiliaryContentLayout,
99
- alignOffset: 0,
100
- insets: {
101
- top: insets.top,
102
- right: 8,
103
- bottom: insets.bottom + (contentLayout?.height ?? 0),
104
- left: 8,
105
- },
106
- sideOffset: 4,
107
- side: 'top',
108
- disablePositioningStyle: false,
109
- });
110
-
111
- function onLayout(event: LayoutChangeEvent) {
112
- setAuxiliaryContentLayout(event.nativeEvent.layout);
113
- }
114
-
115
- function onTriggerLongPress() {
116
- rootRef.current?.measure((_x, _y, width, height, pageX, pageY) => {
117
- setRootLayout({ height, width, pageX, pageY });
118
- });
119
- }
120
-
121
- function closeSubMenus() {
122
- for (const subMenuRef of subMenuRefs.current) {
123
- subMenuRef.dismissMenu?.();
124
- }
125
- }
126
-
127
- function onItemPress(item: Omit<ContextItem, 'icon'>) {
128
- closeSubMenus();
129
- onItemPressProp?.(item);
130
- }
131
-
132
- function dismissMenu() {
133
- triggerRef.current?.close();
134
- }
135
-
136
- function onOpenChange(open: boolean) {
137
- if (!open) {
138
- setAuxiliaryContentLayout(null);
139
- setContentLayout(null);
140
- return;
141
- }
142
- Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
143
- }
144
-
145
- function onContentLayout(ev: LayoutChangeEvent) {
146
- setContentLayout(ev.nativeEvent.layout);
147
- }
148
-
149
- return (
150
- <View>
151
- <ContextMenuPrimitive.Root
152
- ref={rootRef}
153
- relativeTo="trigger"
154
- onOpenChange={onOpenChange}
155
- {...props}
156
- collapsable={false}>
157
- <ContextMenuPrimitive.Trigger ref={triggerRef} onLongPress={onTriggerLongPress} asChild>
158
- {children}
159
- </ContextMenuPrimitive.Trigger>
160
- <ContextMenuPrimitive.Portal hostName={materialPortalHost}>
161
- <ContextMenuContext.Provider
162
- value={{
163
- onItemPress,
164
- dismissMenu,
165
- materialLoadingText,
166
- materialSubMenuTitlePlaceholder,
167
- subMenuRefs,
168
- closeSubMenus,
169
- }}>
170
- <ContextMenuPrimitive.Overlay style={StyleSheet.absoluteFill}>
171
- <Animated.View
172
- style={StyleSheet.absoluteFill}
173
- entering={FadeIn}
174
- exiting={FadeOut}
175
- className={cn('bg-black/20', materialOverlayClassName)}>
176
- {renderAuxiliaryPreview && contentLayout && (
177
- <ContextMenuAuxiliaryPreview
178
- onLayout={onLayout}
179
- style={positionStyle}
180
- children={renderAuxiliaryPreview()}
181
- />
182
- )}
183
- <ContextMenuPrimitive.Content
184
- insets={{
185
- top: insets.top,
186
- right: 8,
187
- bottom: insets.bottom,
188
- left: 8,
189
- }}
190
- sideOffset={materialSideOffset}
191
- alignOffset={materialAlignOffset}
192
- align={materialAlign}
193
- className={cn(!title && items.length === 0 && 'opacity-0')}
194
- pointerEvents={!title && items.length === 0 ? 'none' : undefined}
195
- onLayout={onContentLayout}>
196
- <Animated.View
197
- entering={FadeIn}
198
- exiting={FadeOut}
199
- style={{
200
- minWidth: materialMinWidth,
201
- width: materialWidth,
202
- }}
203
- className="border-border/20 bg-card z-50 rounded-md border py-2 shadow-xl">
204
- {!!title && <ContextMenuLabel>{title}</ContextMenuLabel>}
205
- <ContextMenuInnerContent items={items} />
206
- </Animated.View>
207
- </ContextMenuPrimitive.Content>
208
- </Animated.View>
209
- </ContextMenuPrimitive.Overlay>
210
- </ContextMenuContext.Provider>
211
- </ContextMenuPrimitive.Portal>
212
- </ContextMenuPrimitive.Root>
213
- </View>
214
- );
215
- }
216
- );
217
-
218
- ContextMenu.displayName = 'ContextMenu';
219
-
220
- export { ContextMenu };
221
-
222
- function useContextMenuContext() {
223
- const context = React.useContext(ContextMenuContext);
224
- if (!context) {
225
- throw new Error(
226
- 'ContextMenu compound components cannot be rendered outside the ContextMenu component'
227
- );
228
- }
229
- return context;
230
- }
231
-
232
- function ContextMenuAuxiliaryPreview({
233
- style,
234
- onLayout,
235
- children,
236
- }: Required<Pick<ViewProps, 'style' | 'onLayout' | 'children'>>) {
237
- return (
238
- <Pressable style={style} onLayout={onLayout}>
239
- {children}
240
- </Pressable>
241
- );
242
- }
243
-
244
- function ContextMenuInnerContent({ items }: { items: (ContextItem | ContextSubMenu)[] }) {
245
- const { materialLoadingText } = useContextMenuContext();
246
- const id = React.useId();
247
-
248
- return (
249
- <View>
250
- {items.map((item, index) => {
251
- if (item.loading) {
252
- return (
253
- <ContextMenuPrimitive.Item key={`loading:${id}-${item.title}-${index}`} asChild>
254
- <Button
255
- disabled
256
- variant="plain"
257
- className="h-12 justify-between gap-10 rounded-none px-3"
258
- androidRootClassName="rounded-none ">
259
- <Text className="font-normal opacity-60">{materialLoadingText}</Text>
260
- <ActivityIndicator />
261
- </Button>
262
- </ContextMenuPrimitive.Item>
263
- );
264
- }
265
- if ((item as Partial<ContextSubMenu>)?.items) {
266
- const subMenu = item as ContextSubMenu;
267
- if (subMenu.items.length === 0) return null;
268
- return (
269
- <ContextMenuSubMenu
270
- title={subMenu.title}
271
- subTitle={subMenu.subTitle}
272
- items={subMenu.items}
273
- key={`${id}-${subMenu.title}-${index}`}
274
- />
275
- );
276
- }
277
- const contextMenuItem = item as ContextItem;
278
- return <ContextMenuItem key={contextMenuItem.actionKey} {...contextMenuItem} />;
279
- })}
280
- </View>
281
- );
282
- }
283
-
284
- function ContextMenuLabel(props: { children: React.ReactNode }) {
285
- return (
286
- <ContextMenuPrimitive.Label className="text-muted-foreground/80 border-border/25 dark:border-border/80 dark:text-muted-foreground border-b px-3 pb-2 text-sm">
287
- {props.children}
288
- </ContextMenuPrimitive.Label>
289
- );
290
- }
291
-
292
- function ContextMenuItem(props: Omit<ContextItem, 'loading'>) {
293
- const { colors } = useColorScheme();
294
- const { onItemPress } = useContextMenuContext();
295
-
296
- function onPress() {
297
- onItemPress?.(props);
298
- }
299
-
300
- if (props.hidden) return null;
301
-
302
- return (
303
- <LayoutAnimationConfig skipEntering skipExiting>
304
- <ContextMenuPrimitive.Item
305
- asChild
306
- closeOnPress={!props.keepOpenOnPress}
307
- role="checkbox"
308
- accessibilityState={{
309
- disabled: !!props.disabled,
310
- checked: props.state?.checked,
311
- }}>
312
- <Button
313
- variant={props.state?.checked ? 'tonal' : 'plain'}
314
- className={cn(
315
- 'h-12 justify-between gap-10 rounded-none px-3',
316
- !props.state && !props.title && 'justify-center px-4'
317
- )}
318
- androidRootClassName="rounded-none"
319
- accessibilityHint={props.subTitle}
320
- onPress={onPress}>
321
- {!props.state && !props.title ? null : (
322
- <View className="flex-row items-center gap-3 py-0.5">
323
- {props.state?.checked && (
324
- <Animated.View entering={FadeInLeft} exiting={FadeOutLeft}>
325
- <Icon name="check" size={21} color={colors.foreground} />
326
- </Animated.View>
327
- )}
328
- <Animated.View layout={LinearTransition}>
329
- <Text
330
- numberOfLines={1}
331
- className={cn(
332
- 'font-normal',
333
- props.destructive && 'text-destructive font-medium',
334
- props.disabled && 'opacity-60'
335
- )}>
336
- {props.title}
337
- </Text>
338
- </Animated.View>
339
- {props.state && !props.state?.checked && (
340
- <Icon name="check" size={21} color="#00000000" />
341
- )}
342
- </View>
343
- )}
344
- {props.image ? (
345
- <Image
346
- source={{ uri: props.image.url }}
347
- style={{
348
- width: 22,
349
- height: 22,
350
- borderRadius:
351
- typeof props.image.cornerRadius === 'number' && props.image.cornerRadius > 0
352
- ? props.image.cornerRadius / 4
353
- : 0,
354
- }}
355
- />
356
- ) : props.icon ? (
357
- <Icon color={colors.foreground} {...props.icon} size={22} />
358
- ) : null}
359
- </Button>
360
- </ContextMenuPrimitive.Item>
361
- </LayoutAnimationConfig>
362
- );
363
- }
364
-
365
- const DEFAULT_LAYOUT = {
366
- width: 0,
367
- height: 0,
368
- };
369
-
370
- function ContextMenuSubMenu({ title, subTitle, items }: Omit<ContextSubMenu, 'loading'>) {
371
- const { colors } = useColorScheme();
372
- const {
373
- onItemPress: onContextMenuItemPress,
374
- dismissMenu,
375
- materialSubMenuTitlePlaceholder,
376
- subMenuRefs,
377
- closeSubMenus,
378
- } = useContextMenuContext();
379
- const [triggerLayout, setTriggerLayout] = React.useState<typeof DEFAULT_LAYOUT>(DEFAULT_LAYOUT);
380
-
381
- function onItemPress(item: Omit<ContextItem, 'icon'>) {
382
- dismissMenu?.();
383
- onContextMenuItemPress?.(item);
384
- }
385
-
386
- function onLayout(ev: LayoutChangeEvent) {
387
- setTriggerLayout(ev.nativeEvent.layout);
388
- }
389
-
390
- function addSubMenuRef(ref: ContextMenuRef | null) {
391
- if (!ref) return;
392
- subMenuRefs.current.push(ref);
393
- }
394
-
395
- return (
396
- <DropdownMenu
397
- items={items}
398
- materialAlign="start"
399
- materialSideOffset={-triggerLayout.height}
400
- materialAlignOffset={triggerLayout.width}
401
- onItemPress={onItemPress}
402
- materialMinWidth={48}
403
- // @ts-expect-error internal prop
404
- materialIsSubMenu
405
- ref={addSubMenuRef}>
406
- <Button
407
- variant="plain"
408
- className="justify-between gap-10 rounded-none px-3"
409
- androidRootClassName="rounded-none"
410
- onLayout={onLayout}
411
- accessibilityHint={subTitle}
412
- onPress={closeSubMenus}>
413
- <Text numberOfLines={1} className="py-0.5 font-normal">
414
- {title || materialSubMenuTitlePlaceholder}
415
- </Text>
416
- <Icon name="chevron-right" size={21} color={colors.grey} />
417
- </Button>
418
- </DropdownMenu>
419
- );
420
- }
@@ -1 +0,0 @@
1
- export * from './ContextMenu';