@expokit/cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -2
  3. package/bin/expo-kit.js +1204 -0
  4. package/bin/lib.mjs +343 -0
  5. package/bin/mcp.mjs +338 -0
  6. package/package.json +44 -4
  7. package/registry/_docs/accordion.json +99 -0
  8. package/registry/_docs/action-sheet.json +110 -0
  9. package/registry/_docs/alert.json +127 -0
  10. package/registry/_docs/avatar.json +203 -0
  11. package/registry/_docs/badge.json +117 -0
  12. package/registry/_docs/bottom-nav.json +119 -0
  13. package/registry/_docs/bottom-sheet.json +158 -0
  14. package/registry/_docs/bullet.json +24 -0
  15. package/registry/_docs/button-3d.json +122 -0
  16. package/registry/_docs/button.json +115 -0
  17. package/registry/_docs/calendar.json +182 -0
  18. package/registry/_docs/card-stack.json +108 -0
  19. package/registry/_docs/card.json +111 -0
  20. package/registry/_docs/carousel.json +102 -0
  21. package/registry/_docs/checkbox.json +93 -0
  22. package/registry/_docs/checkout.json +102 -0
  23. package/registry/_docs/chip-group.json +116 -0
  24. package/registry/_docs/color-swatch.json +66 -0
  25. package/registry/_docs/confetti.json +82 -0
  26. package/registry/_docs/coupon.json +176 -0
  27. package/registry/_docs/cube-pager.json +84 -0
  28. package/registry/_docs/dashboard.json +120 -0
  29. package/registry/_docs/date-picker.json +249 -0
  30. package/registry/_docs/dialog.json +162 -0
  31. package/registry/_docs/drawer.json +171 -0
  32. package/registry/_docs/fab.json +120 -0
  33. package/registry/_docs/flip-card.json +111 -0
  34. package/registry/_docs/floating-input.json +191 -0
  35. package/registry/_docs/gift-card.json +108 -0
  36. package/registry/_docs/glass-button.json +118 -0
  37. package/registry/_docs/glass-nav-bar.json +78 -0
  38. package/registry/_docs/glass-search-bar.json +90 -0
  39. package/registry/_docs/glass-segmented.json +66 -0
  40. package/registry/_docs/glass-sheet.json +108 -0
  41. package/registry/_docs/glass-tab-bar.json +76 -0
  42. package/registry/_docs/glass.json +78 -0
  43. package/registry/_docs/inbox.json +72 -0
  44. package/registry/_docs/isometric-bar.json +72 -0
  45. package/registry/_docs/kit.json +11 -0
  46. package/registry/_docs/kpi-card.json +11 -0
  47. package/registry/_docs/like-button.json +72 -0
  48. package/registry/_docs/liquidglass-tab.json +27 -0
  49. package/registry/_docs/list-item.json +200 -0
  50. package/registry/_docs/loyalty-card.json +108 -0
  51. package/registry/_docs/morph-button.json +108 -0
  52. package/registry/_docs/number-ticker.json +96 -0
  53. package/registry/_docs/offers.json +78 -0
  54. package/registry/_docs/onboarding.json +66 -0
  55. package/registry/_docs/otp-input.json +134 -0
  56. package/registry/_docs/pagination-dots.json +88 -0
  57. package/registry/_docs/parallax-layers.json +84 -0
  58. package/registry/_docs/parallax-scroll.json +186 -0
  59. package/registry/_docs/password-input.json +92 -0
  60. package/registry/_docs/payment-card.json +153 -0
  61. package/registry/_docs/pixel-bar.json +66 -0
  62. package/registry/_docs/polar-area.json +78 -0
  63. package/registry/_docs/profile.json +84 -0
  64. package/registry/_docs/progress-steps.json +92 -0
  65. package/registry/_docs/progress.json +132 -0
  66. package/registry/_docs/radio-group.json +92 -0
  67. package/registry/_docs/rating.json +90 -0
  68. package/registry/_docs/ring-carousel.json +102 -0
  69. package/registry/_docs/scratch-card.json +90 -0
  70. package/registry/_docs/search-bar.json +140 -0
  71. package/registry/_docs/search-results.json +120 -0
  72. package/registry/_docs/segmented-control.json +103 -0
  73. package/registry/_docs/select.json +252 -0
  74. package/registry/_docs/settings.json +72 -0
  75. package/registry/_docs/shimmer-button.json +78 -0
  76. package/registry/_docs/sign-in.json +198 -0
  77. package/registry/_docs/skeleton.json +142 -0
  78. package/registry/_docs/slide-to-confirm.json +84 -0
  79. package/registry/_docs/slider.json +157 -0
  80. package/registry/_docs/spin-wheel.json +114 -0
  81. package/registry/_docs/spinner.json +91 -0
  82. package/registry/_docs/stepper.json +168 -0
  83. package/registry/_docs/swipe-deck.json +102 -0
  84. package/registry/_docs/swipeable-row.json +72 -0
  85. package/registry/_docs/switch.json +104 -0
  86. package/registry/_docs/tabs.json +105 -0
  87. package/registry/_docs/tag-input.json +128 -0
  88. package/registry/_docs/textarea.json +175 -0
  89. package/registry/_docs/ticket-card.json +174 -0
  90. package/registry/_docs/ticket-shape.json +11 -0
  91. package/registry/_docs/tilt-card.json +141 -0
  92. package/registry/_docs/time-picker.json +253 -0
  93. package/registry/_docs/timeline-chart.json +30 -0
  94. package/registry/_docs/timeline.json +156 -0
  95. package/registry/_docs/toast.json +161 -0
  96. package/registry/_docs/treemap.json +30 -0
  97. package/registry/_docs/waterfall.json +36 -0
  98. package/registry/_docs/wheel-list.json +102 -0
  99. package/registry/accordion/files/src/components/ui/accordion.tsx +233 -0
  100. package/registry/accordion/files/src/lib/kit.tsx +219 -0
  101. package/registry/accordion.json +17 -0
  102. package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +580 -0
  103. package/registry/action-sheet/files/src/lib/kit.tsx +219 -0
  104. package/registry/action-sheet.json +18 -0
  105. package/registry/alert/files/src/components/ui/alert.tsx +654 -0
  106. package/registry/alert/files/src/components/ui/button.tsx +274 -0
  107. package/registry/alert/files/src/lib/kit.tsx +219 -0
  108. package/registry/alert.json +20 -0
  109. package/registry/avatar/files/src/components/ui/avatar.tsx +790 -0
  110. package/registry/avatar/files/src/lib/kit.tsx +219 -0
  111. package/registry/avatar.json +18 -0
  112. package/registry/badge/files/src/components/ui/badge.tsx +316 -0
  113. package/registry/badge/files/src/lib/kit.tsx +219 -0
  114. package/registry/badge.json +17 -0
  115. package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +1050 -0
  116. package/registry/bottom-nav/files/src/lib/kit.tsx +219 -0
  117. package/registry/bottom-nav.json +18 -0
  118. package/registry/bottom-sheet/files/src/components/ui/bottom-sheet.tsx +585 -0
  119. package/registry/bottom-sheet/files/src/lib/kit.tsx +219 -0
  120. package/registry/bottom-sheet.json +17 -0
  121. package/registry/bullet.json +14 -0
  122. package/registry/button/files/src/components/ui/button.tsx +274 -0
  123. package/registry/button/files/src/lib/kit.tsx +219 -0
  124. package/registry/button-3d/files/src/components/ui/button-3d.tsx +212 -0
  125. package/registry/button-3d/files/src/lib/kit.tsx +219 -0
  126. package/registry/button-3d.json +18 -0
  127. package/registry/button.json +18 -0
  128. package/registry/calendar/files/src/components/ui/calendar.tsx +822 -0
  129. package/registry/calendar/files/src/lib/kit.tsx +219 -0
  130. package/registry/calendar.json +17 -0
  131. package/registry/card/files/src/components/ui/card.tsx +300 -0
  132. package/registry/card/files/src/lib/kit.tsx +219 -0
  133. package/registry/card-stack.json +15 -0
  134. package/registry/card.json +17 -0
  135. package/registry/carousel.json +15 -0
  136. package/registry/checkbox/files/src/components/ui/checkbox.tsx +150 -0
  137. package/registry/checkbox/files/src/lib/kit.tsx +219 -0
  138. package/registry/checkbox.json +17 -0
  139. package/registry/checkout.json +26 -0
  140. package/registry/chip-group/files/src/components/ui/chip-group.tsx +269 -0
  141. package/registry/chip-group/files/src/lib/kit.tsx +219 -0
  142. package/registry/chip-group.json +17 -0
  143. package/registry/color-swatch.json +17 -0
  144. package/registry/confetti/files/src/components/ui/confetti.tsx +222 -0
  145. package/registry/confetti/files/src/lib/kit.tsx +219 -0
  146. package/registry/confetti.json +15 -0
  147. package/registry/coupon/files/src/components/ui/coupon.tsx +698 -0
  148. package/registry/coupon/files/src/components/ui/flip-card.tsx +205 -0
  149. package/registry/coupon/files/src/components/ui/tilt-card.tsx +635 -0
  150. package/registry/coupon/files/src/lib/kit.tsx +219 -0
  151. package/registry/coupon/files/src/lib/ticket-shape.tsx +543 -0
  152. package/registry/coupon.json +23 -0
  153. package/registry/cube-pager.json +15 -0
  154. package/registry/dashboard.json +32 -0
  155. package/registry/date-picker/files/src/components/ui/calendar.tsx +822 -0
  156. package/registry/date-picker/files/src/components/ui/date-picker.tsx +796 -0
  157. package/registry/date-picker/files/src/lib/kit.tsx +219 -0
  158. package/registry/date-picker.json +19 -0
  159. package/registry/dialog/files/src/components/ui/dialog.tsx +759 -0
  160. package/registry/dialog/files/src/lib/kit.tsx +219 -0
  161. package/registry/dialog.json +18 -0
  162. package/registry/drawer/files/src/components/ui/drawer.tsx +1135 -0
  163. package/registry/drawer/files/src/lib/kit.tsx +219 -0
  164. package/registry/drawer.json +18 -0
  165. package/registry/fab.json +18 -0
  166. package/registry/flip-card/files/src/components/ui/flip-card.tsx +205 -0
  167. package/registry/flip-card/files/src/lib/kit.tsx +219 -0
  168. package/registry/flip-card.json +15 -0
  169. package/registry/floating-input/files/src/components/ui/floating-input.tsx +528 -0
  170. package/registry/floating-input/files/src/lib/kit.tsx +219 -0
  171. package/registry/floating-input.json +17 -0
  172. package/registry/gift-card.json +21 -0
  173. package/registry/glass-button.json +22 -0
  174. package/registry/glass-nav-bar.json +21 -0
  175. package/registry/glass-search-bar.json +21 -0
  176. package/registry/glass-segmented.json +22 -0
  177. package/registry/glass-sheet.json +22 -0
  178. package/registry/glass-tab-bar.json +22 -0
  179. package/registry/glass.json +19 -0
  180. package/registry/inbox.json +30 -0
  181. package/registry/isometric-bar.json +14 -0
  182. package/registry/kit/files/src/lib/kit.tsx +219 -0
  183. package/registry/kit.json +11 -0
  184. package/registry/kpi-card/files/src/components/charts/kpi-card.tsx +45 -0
  185. package/registry/kpi-card.json +14 -0
  186. package/registry/like-button.json +18 -0
  187. package/registry/liquidglass-tab/files/src/app/(tabs)/_layout.tsx +97 -0
  188. package/registry/liquidglass-tab/files/src/app/(tabs)/alerts.tsx +5 -0
  189. package/registry/liquidglass-tab/files/src/app/(tabs)/explore.tsx +5 -0
  190. package/registry/liquidglass-tab/files/src/app/(tabs)/index.tsx +5 -0
  191. package/registry/liquidglass-tab/files/src/app/(tabs)/profile.tsx +5 -0
  192. package/registry/liquidglass-tab/files/src/app/_layout.tsx +33 -0
  193. package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +259 -0
  194. package/registry/liquidglass-tab/files/src/components/TabScreen.tsx +122 -0
  195. package/registry/liquidglass-tab/files/src/lib/tab-bar.ts +61 -0
  196. package/registry/liquidglass-tab/files/src/lib/tab-icons.ts +130 -0
  197. package/registry/liquidglass-tab/files/src/lib/tabs.ts +108 -0
  198. package/registry/liquidglass-tab.json +23 -0
  199. package/registry/list-item/files/src/components/ui/list-item.tsx +508 -0
  200. package/registry/list-item/files/src/lib/kit.tsx +219 -0
  201. package/registry/list-item.json +17 -0
  202. package/registry/loyalty-card.json +23 -0
  203. package/registry/morph-button.json +18 -0
  204. package/registry/number-ticker.json +15 -0
  205. package/registry/offers.json +24 -0
  206. package/registry/onboarding.json +17 -0
  207. package/registry/otp-input/files/src/components/ui/otp-input.tsx +380 -0
  208. package/registry/otp-input/files/src/lib/kit.tsx +219 -0
  209. package/registry/otp-input.json +17 -0
  210. package/registry/pagination-dots/files/src/components/ui/pagination-dots.tsx +262 -0
  211. package/registry/pagination-dots/files/src/lib/kit.tsx +219 -0
  212. package/registry/pagination-dots.json +15 -0
  213. package/registry/parallax-layers.json +15 -0
  214. package/registry/parallax-scroll.json +17 -0
  215. package/registry/password-input/files/src/components/ui/floating-input.tsx +528 -0
  216. package/registry/password-input/files/src/components/ui/password-input.tsx +271 -0
  217. package/registry/password-input/files/src/lib/kit.tsx +219 -0
  218. package/registry/password-input.json +19 -0
  219. package/registry/payment-card/files/src/components/ui/flip-card.tsx +205 -0
  220. package/registry/payment-card/files/src/components/ui/payment-card.tsx +385 -0
  221. package/registry/payment-card/files/src/components/ui/tilt-card.tsx +635 -0
  222. package/registry/payment-card/files/src/lib/kit.tsx +219 -0
  223. package/registry/payment-card.json +21 -0
  224. package/registry/pixel-bar.json +14 -0
  225. package/registry/polar-area.json +14 -0
  226. package/registry/profile.json +17 -0
  227. package/registry/progress/files/src/components/ui/progress.tsx +883 -0
  228. package/registry/progress/files/src/lib/kit.tsx +219 -0
  229. package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +559 -0
  230. package/registry/progress-steps/files/src/lib/kit.tsx +219 -0
  231. package/registry/progress-steps.json +18 -0
  232. package/registry/progress.json +17 -0
  233. package/registry/radio-group/files/src/components/ui/radio-group.tsx +327 -0
  234. package/registry/radio-group/files/src/lib/kit.tsx +219 -0
  235. package/registry/radio-group.json +18 -0
  236. package/registry/rating.json +18 -0
  237. package/registry/ring-carousel.json +15 -0
  238. package/registry/scratch-card.json +18 -0
  239. package/registry/search-bar/files/src/components/ui/search-bar.tsx +530 -0
  240. package/registry/search-bar/files/src/lib/kit.tsx +219 -0
  241. package/registry/search-bar.json +17 -0
  242. package/registry/search-results.json +30 -0
  243. package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +341 -0
  244. package/registry/segmented-control/files/src/lib/kit.tsx +219 -0
  245. package/registry/segmented-control.json +18 -0
  246. package/registry/select/files/src/components/ui/select.tsx +1398 -0
  247. package/registry/select/files/src/lib/kit.tsx +219 -0
  248. package/registry/select.json +17 -0
  249. package/registry/settings.json +26 -0
  250. package/registry/shimmer-button.json +17 -0
  251. package/registry/sign-in.json +26 -0
  252. package/registry/skeleton/files/src/components/ui/skeleton.tsx +799 -0
  253. package/registry/skeleton/files/src/lib/kit.tsx +219 -0
  254. package/registry/skeleton.json +17 -0
  255. package/registry/slide-to-confirm.json +18 -0
  256. package/registry/slider/files/src/components/ui/slider.tsx +716 -0
  257. package/registry/slider/files/src/lib/kit.tsx +219 -0
  258. package/registry/slider.json +17 -0
  259. package/registry/spin-wheel.json +18 -0
  260. package/registry/spinner/files/src/components/ui/spinner.tsx +335 -0
  261. package/registry/spinner/files/src/lib/kit.tsx +219 -0
  262. package/registry/spinner.json +17 -0
  263. package/registry/stepper/files/src/components/ui/stepper.tsx +646 -0
  264. package/registry/stepper/files/src/lib/kit.tsx +219 -0
  265. package/registry/stepper.json +17 -0
  266. package/registry/swipe-deck.json +15 -0
  267. package/registry/swipeable-row.json +15 -0
  268. package/registry/switch/files/src/components/ui/switch.tsx +344 -0
  269. package/registry/switch/files/src/lib/kit.tsx +219 -0
  270. package/registry/switch.json +18 -0
  271. package/registry/tabs/files/src/components/ui/tabs.tsx +539 -0
  272. package/registry/tabs/files/src/lib/kit.tsx +219 -0
  273. package/registry/tabs.json +17 -0
  274. package/registry/tag-input/files/src/components/ui/tag-input.tsx +720 -0
  275. package/registry/tag-input/files/src/lib/kit.tsx +219 -0
  276. package/registry/tag-input.json +17 -0
  277. package/registry/textarea/files/src/components/ui/textarea.tsx +553 -0
  278. package/registry/textarea/files/src/lib/kit.tsx +219 -0
  279. package/registry/textarea.json +17 -0
  280. package/registry/ticket-card.json +24 -0
  281. package/registry/ticket-shape/files/src/lib/kit.tsx +219 -0
  282. package/registry/ticket-shape/files/src/lib/ticket-shape.tsx +543 -0
  283. package/registry/ticket-shape.json +17 -0
  284. package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +635 -0
  285. package/registry/tilt-card/files/src/lib/kit.tsx +219 -0
  286. package/registry/tilt-card.json +17 -0
  287. package/registry/time-picker/files/src/components/ui/time-picker.tsx +1159 -0
  288. package/registry/time-picker/files/src/lib/kit.tsx +219 -0
  289. package/registry/time-picker.json +17 -0
  290. package/registry/timeline/files/src/components/ui/avatar.tsx +790 -0
  291. package/registry/timeline/files/src/components/ui/timeline.tsx +1059 -0
  292. package/registry/timeline/files/src/lib/kit.tsx +219 -0
  293. package/registry/timeline-chart.json +14 -0
  294. package/registry/timeline.json +20 -0
  295. package/registry/toast/files/src/components/ui/button.tsx +274 -0
  296. package/registry/toast/files/src/components/ui/toast.tsx +1284 -0
  297. package/registry/toast/files/src/lib/kit.tsx +219 -0
  298. package/registry/toast.json +20 -0
  299. package/registry/treemap.json +14 -0
  300. package/registry/waterfall.json +14 -0
  301. package/registry/wheel-list.json +17 -0
  302. package/schema/components.schema.json +13 -0
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "spin-wheel",
3
+ "category": "Coupons",
4
+ "aliases": [],
5
+ "exportName": "SpinWheel",
6
+ "files": [
7
+ "src/components/ui/spin-wheel.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "segments",
12
+ "{ label, sublabel?, color?, textColor?, weight? }[]",
13
+ "—",
14
+ "2–16 prizes, clockwise from the pointer. Long labels shrink or wrap to fit; weight sets the odds of a random pick (0 never wins at random)."
15
+ ],
16
+ [
17
+ "palette",
18
+ "string[]",
19
+ "vivid 8-colour set",
20
+ "Fills for segments without a color; the text picks black or white to read on each."
21
+ ],
22
+ [
23
+ "size",
24
+ "number",
25
+ "width, up to 340",
26
+ "Diameter in points."
27
+ ],
28
+ [
29
+ "turns",
30
+ "number",
31
+ "6",
32
+ "Full turns before it lands (a harder flick adds a few)."
33
+ ],
34
+ [
35
+ "duration",
36
+ "number",
37
+ "4200",
38
+ "Length of a spin in ms: a fast launch, a long slow crawl and a tiny settle."
39
+ ],
40
+ [
41
+ "getResult",
42
+ "() => number | Promise<number>",
43
+ "—",
44
+ "Decide the prize (e.g. on your server). The wheel keeps spinning while the promise is pending, then lands on it. Without it, weight picks at random."
45
+ ],
46
+ [
47
+ "onSpinStart",
48
+ "() => void",
49
+ "—",
50
+ "A spin began (tap, flick or ref)."
51
+ ],
52
+ [
53
+ "onSpinEnd",
54
+ "(index, segment) => void",
55
+ "—",
56
+ "The wheel landed; the winning wedge glows until the next spin."
57
+ ],
58
+ [
59
+ "onSpinError",
60
+ "(error) => void",
61
+ "—",
62
+ "getResult threw, rejected or gave an invalid index; the wheel coasts to a stop with no winner."
63
+ ],
64
+ [
65
+ "rimColor",
66
+ "string",
67
+ "\"#d9a62e\" (gold)",
68
+ "Metal of the rim, pins and dividers."
69
+ ],
70
+ [
71
+ "accent",
72
+ "string",
73
+ "theme accent",
74
+ "Hub button and pointer colour."
75
+ ],
76
+ [
77
+ "spinLabel",
78
+ "string",
79
+ "\"SPIN\"",
80
+ "Hub button label."
81
+ ],
82
+ [
83
+ "disabled",
84
+ "boolean",
85
+ "false",
86
+ "Ignore taps, flicks and ref.spin(); dims the hub and the lights."
87
+ ],
88
+ [
89
+ "haptics",
90
+ "boolean",
91
+ "true",
92
+ "A tick per divider, a tap on the hub and a success buzz on landing."
93
+ ],
94
+ [
95
+ "accessibilityLabel",
96
+ "string",
97
+ "\"Prize wheel\"",
98
+ "Screen-reader name; the prizes and the result are read after it, and the result is announced."
99
+ ],
100
+ [
101
+ "style",
102
+ "StyleProp<ViewStyle>",
103
+ "—",
104
+ "Style for the root view (margins)."
105
+ ],
106
+ [
107
+ "ref",
108
+ "{ spin(index?): void; reset(): void }",
109
+ "—",
110
+ "Spin from your own button (optionally onto a fixed index), or cancel and turn back to the start."
111
+ ]
112
+ ],
113
+ "examples": []
114
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "spinner",
3
+ "category": "Feedback",
4
+ "aliases": [],
5
+ "exportName": "Spinner",
6
+ "files": [
7
+ "src/components/ui/spinner.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "variant",
12
+ "\"ring\" | \"dots\"",
13
+ "\"ring\"",
14
+ "Indicator style."
15
+ ],
16
+ [
17
+ "size",
18
+ "\"sm\" | \"md\" | \"lg\" | \"xl\" | number",
19
+ "\"md\"",
20
+ "16 / 24 / 36 / 52pt, or any number."
21
+ ],
22
+ [
23
+ "color",
24
+ "string",
25
+ "theme accent",
26
+ "Indicator colour."
27
+ ],
28
+ [
29
+ "speed",
30
+ "number",
31
+ "1",
32
+ "Speed multiplier."
33
+ ],
34
+ [
35
+ "label",
36
+ "string",
37
+ "\"Loading\"",
38
+ "Accessibility label; shown on screen when labelPosition is set."
39
+ ],
40
+ [
41
+ "labelPosition",
42
+ "\"none\" | \"right\" | \"bottom\"",
43
+ "\"none\"",
44
+ "Show the label beside or under the spinner, with an animated ellipsis."
45
+ ],
46
+ [
47
+ "track",
48
+ "boolean",
49
+ "false",
50
+ "Faint full circle behind the ring."
51
+ ],
52
+ [
53
+ "style",
54
+ "StyleProp<ViewStyle>",
55
+ "—",
56
+ "Style for the root view (the square, or the spinner + label row/column)."
57
+ ]
58
+ ],
59
+ "examples": [
60
+ {
61
+ "name": "Variants",
62
+ "title": "Variants",
63
+ "code": "import { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\n\nexport default function Variants() {\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 40 }}>\n <Spinner variant=\"ring\" size=\"lg\" track />\n <Spinner variant=\"ring\" size=\"lg\" />\n <Spinner variant=\"dots\" size=\"lg\" />\n </View>\n );\n}\n"
64
+ },
65
+ {
66
+ "name": "InButton",
67
+ "title": "In Button",
68
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\nimport { readableOn, useKit } from '@/lib/kit';\n\nexport default function InButton() {\n const { colors, radius } = useKit();\n const [busy, setBusy] = useState(false);\n const fg = readableOn(colors.accent);\n return (\n <Pressable\n accessibilityRole=\"button\"\n accessibilityState={{ busy }}\n onPress={() => {\n setBusy(true);\n setTimeout(() => setBusy(false), 2200);\n }}\n style={{\n height: 48,\n borderRadius: radius.capsule(48),\n backgroundColor: colors.accent,\n alignItems: 'center',\n justifyContent: 'center',\n alignSelf: 'stretch',\n }}\n >\n {busy ? (\n <Spinner size=\"sm\" color={fg} label=\"Placing order\" labelPosition=\"right\" />\n ) : (\n <Text style={{ color: fg, fontSize: 16, fontWeight: '400' }}>Place order · ₹749</Text>\n )}\n </Pressable>\n );\n}\n"
69
+ },
70
+ {
71
+ "name": "LoadingCard",
72
+ "title": "Loading Card",
73
+ "code": "import { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\nimport { readableOn, useKit } from '@/lib/kit';\n\nexport default function LoadingCard() {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n alignSelf: 'stretch',\n alignItems: 'center',\n gap: 6,\n paddingVertical: 32,\n paddingHorizontal: 20,\n borderRadius: radius.lg,\n backgroundColor: colors.card,\n borderWidth: 1,\n borderColor: colors.border,\n }}\n >\n <Spinner size=\"xl\" track label=\"Preparing your itinerary\" labelPosition=\"bottom\" />\n <Text style={{ fontSize: 13, color: colors.mutedForeground, textAlign: 'center' }}>\n Checking 3 flights and 2 hotels\n </Text>\n </View>\n );\n}\n"
74
+ },
75
+ {
76
+ "name": "InlineStatus",
77
+ "title": "Inline Status",
78
+ "code": "import { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\n\nexport default function InlineStatus() {\n return (\n <View style={{ gap: 16 }}>\n <Spinner size=\"sm\" label=\"Syncing 128 photos\" labelPosition=\"right\" />\n <Spinner variant=\"dots\" size=\"md\" label=\"Maya is typing\" labelPosition=\"right\" />\n </View>\n );\n}\n"
79
+ },
80
+ {
81
+ "name": "Colors",
82
+ "title": "Colors",
83
+ "code": "import { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\nimport { readableOn, useKit } from '@/lib/kit';\n\nexport default function Colors() {\n const { colors } = useKit();\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-around', gap: 20 }}>\n <Spinner size=\"lg\" color={colors.success} track />\n <Spinner variant=\"dots\" size=\"lg\" color={colors.warning} />\n <Spinner size=\"lg\" color={colors.danger} />\n </View>\n );\n}\n"
84
+ },
85
+ {
86
+ "name": "Sizes",
87
+ "title": "Sizes",
88
+ "code": "import { Pressable, Text, View } from 'react-native';\nimport { Spinner } from '@/components/ui/spinner';\n\nexport default function Sizes() {\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 24 }}>\n <Spinner size=\"sm\" />\n <Spinner size=\"md\" />\n <Spinner size=\"lg\" />\n <Spinner size=\"xl\" />\n </View>\n );\n}\n"
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "name": "stepper",
3
+ "category": "Inputs",
4
+ "aliases": [],
5
+ "exportName": "Stepper",
6
+ "files": [
7
+ "src/components/ui/stepper.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "value / defaultValue",
12
+ "number",
13
+ "min or 0",
14
+ "Controlled or uncontrolled value."
15
+ ],
16
+ [
17
+ "onValueChange",
18
+ "(value) => void",
19
+ "—",
20
+ "Called on every step."
21
+ ],
22
+ [
23
+ "min / max",
24
+ "number",
25
+ "0 / ∞",
26
+ "Limits; the matching button dims and a press past it bumps the number."
27
+ ],
28
+ [
29
+ "step",
30
+ "number",
31
+ "1",
32
+ "Increment (decimals are respected, e.g. 0.5)."
33
+ ],
34
+ [
35
+ "variant",
36
+ "\"outline\" | \"filled\" | \"cart\" | \"compact\"",
37
+ "\"outline\"",
38
+ "Round outlined buttons, one tinted capsule, an accent cart button that collapses to + at 0, or small tinted buttons. Old names still work: default → outline, pill / segmented → filled, vertical → filled + vertical."
39
+ ],
40
+ [
41
+ "size",
42
+ "\"sm\" | \"md\" | \"lg\"",
43
+ "\"md\"",
44
+ "32 / 36 / 44pt buttons (touch area always ≥ 44pt); the number and icons scale too. compact is always 28pt."
45
+ ],
46
+ [
47
+ "orientation",
48
+ "\"horizontal\" | \"vertical\"",
49
+ "\"horizontal\"",
50
+ "Stack + / number / − (outline, filled, compact)."
51
+ ],
52
+ [
53
+ "format",
54
+ "(value) => string",
55
+ "—",
56
+ "Display format, e.g. currency; every changed character rolls."
57
+ ],
58
+ [
59
+ "suffix",
60
+ "string | (value) => string",
61
+ "—",
62
+ "Muted unit after the number: \"kg\", or (n) => n === 1 ? \"night\" : \"nights\"."
63
+ ],
64
+ [
65
+ "addLabel",
66
+ "string",
67
+ "—",
68
+ "cart: text beside the + while collapsed, e.g. \"Add\"."
69
+ ],
70
+ [
71
+ "repeat",
72
+ "boolean",
73
+ "true",
74
+ "Hold to keep stepping, speeding up."
75
+ ],
76
+ [
77
+ "label",
78
+ "string",
79
+ "—",
80
+ "Title on the left; the control moves to the right edge."
81
+ ],
82
+ [
83
+ "description",
84
+ "string",
85
+ "—",
86
+ "Muted line under the label."
87
+ ],
88
+ [
89
+ "disabled",
90
+ "boolean",
91
+ "false",
92
+ "Dims and blocks the control."
93
+ ],
94
+ [
95
+ "accent",
96
+ "string",
97
+ "theme accent",
98
+ "Icons (filled, compact), press tint (outline), fill (cart)."
99
+ ],
100
+ [
101
+ "iconColor",
102
+ "string",
103
+ "—",
104
+ "Overrides the − / + icon colour."
105
+ ],
106
+ [
107
+ "accessibilityLabel",
108
+ "string",
109
+ "label",
110
+ "Read by screen readers; the control is adjustable (swipe up / down)."
111
+ ],
112
+ [
113
+ "style",
114
+ "StyleProp<ViewStyle>",
115
+ "—",
116
+ "The control, or the whole row when label / description is set."
117
+ ],
118
+ [
119
+ "buttonStyle",
120
+ "StyleProp<ViewStyle>",
121
+ "—",
122
+ "Applied to each − / + button."
123
+ ],
124
+ [
125
+ "valueStyle",
126
+ "StyleProp<TextStyle>",
127
+ "—",
128
+ "Applied to the number (fontSize, colour, weight)."
129
+ ]
130
+ ],
131
+ "examples": [
132
+ {
133
+ "name": "Cart",
134
+ "title": "Cart",
135
+ "code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst eyebrow = { fontSize: 12, fontWeight: '400', letterSpacing: 0.6, textTransform: 'uppercase' } as const;\n\nconst money = (n: number) => {\n const [int, frac] = n.toFixed(2).split('.');\n return `₹${int.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1,')}${frac === '00' ? '' : `.${frac}`}`;\n};\n\nconst MENU = [\n { key: 'bowl', emoji: '🥗', name: 'Harvest bowl', note: 'Kale, squash, tahini', price: 349 },\n { key: 'ramen', emoji: '🍜', name: 'Miso ramen', note: 'Spicy · extra egg', price: 420 },\n { key: 'mochi', emoji: '🍡', name: 'Mochi trio', note: 'Matcha, yuzu, sesame', price: 180 },\n];\n\nexport default function Cart() {\n const { colors, radius } = useKit();\n const [qty, setQty] = useState<Record<string, number>>({ bowl: 1, ramen: 2, mochi: 0 });\n const total = MENU.reduce((sum, it) => sum + it.price * (qty[it.key] ?? 0), 0);\n return (\n <Card>\n <Text style={[eyebrow, { color: colors.mutedForeground }]}>Your order</Text>\n {MENU.map((it) => (\n <View key={it.key} style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>\n <View style={{ width: 44, height: 44, borderRadius: radius.scale(12), backgroundColor: colors.muted, alignItems: 'center', justifyContent: 'center' }}>\n <Text style={{ fontSize: 22 }}>{it.emoji}</Text>\n </View>\n <View style={{ flex: 1 }}>\n <Text style={{ fontSize: 15, fontWeight: '400', color: colors.foreground }}>{it.name}</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{money(it.price)} · {it.note}</Text>\n </View>\n <Stepper\n variant=\"cart\"\n size=\"sm\"\n value={qty[it.key]}\n onValueChange={(n) => setQty((q) => ({ ...q, [it.key]: n }))}\n max={9}\n accessibilityLabel={`${it.name} quantity`}\n />\n </View>\n ))}\n <View style={{ height: StyleSheet.hairlineWidth, backgroundColor: colors.border }} />\n <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'baseline' }}>\n <Text style={{ fontSize: 15, fontWeight: '400', color: colors.foreground }}>Subtotal</Text>\n <Text style={{ fontSize: 18, fontWeight: '400', color: colors.foreground, fontVariant: ['tabular-nums'] }}>{money(total)}</Text>\n </View>\n </Card>\n );\n}\n"
136
+ },
137
+ {
138
+ "name": "Guests",
139
+ "title": "Guests",
140
+ "code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nexport default function Guests() {\n const { colors } = useKit();\n const [adults, setAdults] = useState(2);\n const [children, setChildren] = useState(0);\n const [infants, setInfants] = useState(0);\n const cap = 6;\n const rule = <View style={{ height: StyleSheet.hairlineWidth, backgroundColor: colors.border }} />;\n return (\n <Card style={{ gap: 14 }}>\n <Stepper label=\"Adults\" description=\"Ages 13 or above\" value={adults} onValueChange={setAdults} min={1} max={cap - children} />\n {rule}\n <Stepper label=\"Children\" description=\"Ages 2–12\" value={children} onValueChange={setChildren} max={cap - adults} />\n {rule}\n <Stepper label=\"Infants\" description=\"Under 2\" value={infants} onValueChange={setInfants} max={5} />\n <Text style={{ fontSize: 13, color: colors.mutedForeground }}>\n This place has a maximum of {cap} guests, not including infants.\n </Text>\n </Card>\n );\n}\n"
141
+ },
142
+ {
143
+ "name": "AddToBag",
144
+ "title": "Add To Bag",
145
+ "code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst money = (n: number) => {\n const [int, frac] = n.toFixed(2).split('.');\n return `₹${int.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1,')}${frac === '00' ? '' : `.${frac}`}`;\n};\n\nexport default function AddToBag() {\n const { colors, radius } = useKit();\n const [qty, setQty] = useState(1);\n const price = 1899;\n return (\n <Card>\n <View style={{ gap: 2 }}>\n <Text style={{ fontSize: 17, fontWeight: '400', color: colors.foreground }}>Linen overshirt</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground }}>Sand · Size M · Free returns</Text>\n </View>\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>\n <Stepper variant=\"filled\" size=\"lg\" value={qty} onValueChange={setQty} min={1} max={10} accessibilityLabel=\"Quantity\" />\n <Pressable\n accessibilityRole=\"button\"\n style={({ pressed }) => ({\n flex: 1,\n height: 44,\n borderRadius: radius.capsule(44),\n backgroundColor: colors.primary,\n alignItems: 'center',\n justifyContent: 'center',\n opacity: pressed ? 0.85 : 1,\n })}\n >\n <Text style={{ fontSize: 15, fontWeight: '400', color: colors.primaryForeground, fontVariant: ['tabular-nums'] }}>\n Add to bag · {money(price * qty)}\n </Text>\n </Pressable>\n </View>\n <Text style={{ fontSize: 12, color: colors.mutedForeground }}>Only 10 left — hold + to add faster.</Text>\n </Card>\n );\n}\n"
146
+ },
147
+ {
148
+ "name": "Menu",
149
+ "title": "Menu",
150
+ "code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst eyebrow = { fontSize: 12, fontWeight: '400', letterSpacing: 0.6, textTransform: 'uppercase' } as const;\n\nexport default function Menu() {\n const { colors } = useKit();\n return (\n <Card>\n <Text style={[eyebrow, { color: colors.mutedForeground }]}>Popular</Text>\n <Stepper variant=\"cart\" addLabel=\"Add\" label=\"Pistachio croissant\" description=\"₹220 · Baked this morning\" accessibilityLabel=\"Pistachio croissant\" />\n <Stepper variant=\"cart\" addLabel=\"Add\" label=\"Iced oat latte\" description=\"₹280 · 16 oz\" defaultValue={1} accessibilityLabel=\"Iced oat latte\" />\n </Card>\n );\n}\n"
151
+ },
152
+ {
153
+ "name": "Formatted",
154
+ "title": "Formatted",
155
+ "code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst money = (n: number) => {\n const [int, frac] = n.toFixed(2).split('.');\n return `₹${int.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1,')}${frac === '00' ? '' : `.${frac}`}`;\n};\n\nexport default function Formatted() {\n return (\n <Card style={{ gap: 16 }}>\n <Stepper variant=\"filled\" size=\"sm\" label=\"Nights\" description=\"Check-in Fri, Oct 24\" defaultValue={3} min={1} max={28} suffix={(n) => (n === 1 ? 'night' : 'nights')} />\n <Stepper variant=\"filled\" size=\"sm\" label=\"Driver tip\" description=\"100% goes to your driver\" defaultValue={50} step={10} min={0} max={500} format={money} />\n <Stepper variant=\"filled\" size=\"sm\" label=\"Search radius\" defaultValue={2.5} step={0.5} min={0.5} max={10} suffix=\"km\" />\n <Stepper variant=\"compact\" label=\"Seats\" description=\"₹499 per seat / month\" defaultValue={5} min={1} max={50} />\n </Card>\n );\n}\n"
156
+ },
157
+ {
158
+ "name": "Sizes",
159
+ "title": "Sizes",
160
+ "code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nexport default function Sizes() {\n const { colors } = useKit();\n const row = (name: string, el: React.ReactNode) => (\n <View key={name} style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', minHeight: 48 }}>\n <Text style={{ fontSize: 13, fontWeight: '400', color: colors.mutedForeground }}>{name}</Text>\n {el}\n </View>\n );\n return (\n <Card style={{ gap: 4 }}>\n {row('Small', <Stepper size=\"sm\" defaultValue={2} max={20} accessibilityLabel=\"Small stepper\" />)}\n {row('Medium', <Stepper size=\"md\" defaultValue={2} max={20} accessibilityLabel=\"Medium stepper\" />)}\n {row('Large', <Stepper size=\"lg\" defaultValue={2} max={20} accessibilityLabel=\"Large stepper\" />)}\n {row('Compact', <Stepper variant=\"compact\" defaultValue={2} max={20} accessibilityLabel=\"Compact stepper\" />)}\n </Card>\n );\n}\n"
161
+ },
162
+ {
163
+ "name": "Colors",
164
+ "title": "Colors",
165
+ "code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { Stepper } from '@/components/ui/stepper';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { backgroundColor: colors.card, borderColor: colors.border, borderWidth: StyleSheet.hairlineWidth, borderRadius: radius.xl, padding: 16, gap: 12 },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nexport default function Colors() {\n const { colors } = useKit();\n return (\n <Card style={{ gap: 16 }}>\n <Stepper variant=\"filled\" accent={colors.success} label=\"Water\" description=\"Glasses today\" defaultValue={6} max={12} />\n <Stepper variant=\"compact\" accent={colors.warning} label=\"Espresso shots\" defaultValue={2} max={4} />\n <Stepper variant=\"cart\" accent={colors.danger} addLabel=\"Add\" label=\"Hot sauce\" description=\"₹30 each\" />\n </Card>\n );\n}\n"
166
+ }
167
+ ]
168
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "swipe-deck",
3
+ "category": "3D",
4
+ "aliases": [],
5
+ "exportName": "SwipeDeck",
6
+ "files": [
7
+ "src/components/ui/swipe-deck.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "data",
12
+ "T[]",
13
+ "—",
14
+ "Items, one card each (top first)."
15
+ ],
16
+ [
17
+ "renderItem",
18
+ "(item: T, index: number) => ReactNode",
19
+ "—",
20
+ "Render a card."
21
+ ],
22
+ [
23
+ "keyExtractor",
24
+ "(item: T, index: number) => string",
25
+ "index",
26
+ "React key for each card."
27
+ ],
28
+ [
29
+ "height",
30
+ "number",
31
+ "380",
32
+ "Card height."
33
+ ],
34
+ [
35
+ "onSwipe",
36
+ "(direction, item, index) => void",
37
+ "—",
38
+ "Fires when a card leaves, with \"left\" or \"right\"."
39
+ ],
40
+ [
41
+ "index / onIndexChange",
42
+ "number / (index) => void",
43
+ "— / —",
44
+ "Controlled top card; a fresh batch (first key changed) starts from the top on its own."
45
+ ],
46
+ [
47
+ "disabled",
48
+ "boolean",
49
+ "false",
50
+ "Swiping off (e.g. out of likes)."
51
+ ],
52
+ [
53
+ "onEmpty",
54
+ "() => void",
55
+ "—",
56
+ "Fires once every card is gone."
57
+ ],
58
+ [
59
+ "renderEmpty",
60
+ "() => ReactNode",
61
+ "—",
62
+ "Shown when the deck is empty."
63
+ ],
64
+ [
65
+ "rightLabel / leftLabel",
66
+ "string | null",
67
+ "\"LIKE\" / \"NOPE\"",
68
+ "Stamp shown while dragging; null hides it."
69
+ ],
70
+ [
71
+ "rightColor / leftColor",
72
+ "string",
73
+ "theme success / danger",
74
+ "Stamp colours."
75
+ ],
76
+ [
77
+ "stack",
78
+ "number",
79
+ "2",
80
+ "Cards visible behind the top one."
81
+ ],
82
+ [
83
+ "radius",
84
+ "number",
85
+ "24",
86
+ "Corner radius of each card."
87
+ ],
88
+ [
89
+ "ref",
90
+ "{ swipe(direction), undo() }",
91
+ "—",
92
+ "Throw the top card from a button, or bring the last one back; reset() starts again from the first card."
93
+ ],
94
+ [
95
+ "style",
96
+ "StyleProp<ViewStyle>",
97
+ "—",
98
+ "Style for the root view."
99
+ ]
100
+ ],
101
+ "examples": []
102
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "swipeable-row",
3
+ "category": "Display",
4
+ "aliases": [],
5
+ "exportName": "SwipeableRow",
6
+ "files": [
7
+ "src/components/ui/swipeable-row.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "leftActions",
12
+ "SwipeAction[]",
13
+ "[]",
14
+ "Revealed by swiping right; the first is the edge (full-swipe) action."
15
+ ],
16
+ [
17
+ "rightActions",
18
+ "SwipeAction[]",
19
+ "[]",
20
+ "Revealed by swiping left; the last is the edge (full-swipe) action."
21
+ ],
22
+ [
23
+ "SwipeAction",
24
+ "{ label, color, icon?, onPress?, destructive? }",
25
+ "—",
26
+ "destructive collapses the row before calling onPress."
27
+ ],
28
+ [
29
+ "actionWidth",
30
+ "number",
31
+ "76",
32
+ "Width of each action when resting open."
33
+ ],
34
+ [
35
+ "fullSwipe",
36
+ "boolean",
37
+ "true",
38
+ "Swiping past half the row fires the edge action."
39
+ ],
40
+ [
41
+ "closeOnActionPress",
42
+ "boolean",
43
+ "true",
44
+ "Spring closed after an action is tapped."
45
+ ],
46
+ [
47
+ "onOpen / onClose",
48
+ "(side) => void / () => void",
49
+ "—",
50
+ "Open state callbacks."
51
+ ],
52
+ [
53
+ "disabled",
54
+ "boolean",
55
+ "false",
56
+ "Turns swiping off."
57
+ ],
58
+ [
59
+ "contentStyle",
60
+ "StyleProp<ViewStyle>",
61
+ "theme background",
62
+ "Style of the sliding foreground — keep its background opaque."
63
+ ],
64
+ [
65
+ "style",
66
+ "StyleProp<ViewStyle>",
67
+ "—",
68
+ "Style for the outer row that holds the actions behind the sliding content."
69
+ ]
70
+ ],
71
+ "examples": []
72
+ }
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "switch",
3
+ "category": "Selection",
4
+ "aliases": [],
5
+ "exportName": "Switch",
6
+ "files": [
7
+ "src/components/ui/switch.tsx"
8
+ ],
9
+ "props": [
10
+ [
11
+ "value / onValueChange",
12
+ "boolean",
13
+ "—",
14
+ "Controlled state (or use defaultValue)."
15
+ ],
16
+ [
17
+ "defaultValue",
18
+ "boolean",
19
+ "false",
20
+ "Initial state when uncontrolled."
21
+ ],
22
+ [
23
+ "variant",
24
+ "\"ios\" | \"material\" | \"icon\"",
25
+ "\"ios\"",
26
+ "Look of the track and thumb."
27
+ ],
28
+ [
29
+ "size",
30
+ "\"sm\" | \"md\" | \"lg\"",
31
+ "\"md\"",
32
+ "24 / 31 / 38pt tall."
33
+ ],
34
+ [
35
+ "icon",
36
+ "\"theme\" | \"check\"",
37
+ "\"theme\"",
38
+ "Sun / moon or ✕ / check inside the thumb (variant=\"icon\")."
39
+ ],
40
+ [
41
+ "label",
42
+ "string",
43
+ "—",
44
+ "Turns it into a settings row with the switch on the right."
45
+ ],
46
+ [
47
+ "description",
48
+ "string",
49
+ "—",
50
+ "Secondary line under the label."
51
+ ],
52
+ [
53
+ "accent",
54
+ "string",
55
+ "theme accent",
56
+ "Track colour when on."
57
+ ],
58
+ [
59
+ "haptics",
60
+ "boolean",
61
+ "true",
62
+ "Light tap when it flips."
63
+ ],
64
+ [
65
+ "disabled",
66
+ "boolean",
67
+ "false",
68
+ "Dims and blocks presses."
69
+ ],
70
+ [
71
+ "style",
72
+ "StyleProp<ViewStyle>",
73
+ "—",
74
+ "Style for the pressable — the switch itself, or the whole settings row when label is set."
75
+ ]
76
+ ],
77
+ "examples": [
78
+ {
79
+ "name": "IOS",
80
+ "title": "IOS",
81
+ "code": "import { View } from 'react-native';\nimport { Switch } from '@/components/ui/switch';\n\nexport default function IOS() {\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 20 }}>\n <Switch defaultValue />\n <Switch />\n <Switch defaultValue accent=\"#22c55e\" />\n <Switch defaultValue disabled />\n </View>\n );\n}\n"
82
+ },
83
+ {
84
+ "name": "Material",
85
+ "title": "Material",
86
+ "code": "import { View } from 'react-native';\nimport { Switch } from '@/components/ui/switch';\n\nexport default function Material() {\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 20 }}>\n <Switch variant=\"material\" defaultValue />\n <Switch variant=\"material\" />\n <Switch variant=\"material\" defaultValue />\n </View>\n );\n}\n"
87
+ },
88
+ {
89
+ "name": "Icons",
90
+ "title": "Icons",
91
+ "code": "import React, { useState } from 'react';\nimport { View } from 'react-native';\nimport { Switch } from '@/components/ui/switch';\n\nexport default function Icons() {\n const [dark, setDark] = useState(false);\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 16 }}>\n <Switch variant=\"icon\" size=\"lg\" value={dark} onValueChange={setDark} accessibilityLabel=\"Dark mode\" />\n <Switch variant=\"icon\" icon=\"check\" defaultValue accessibilityLabel=\"Auto-save\" />\n </View>\n );\n}\n"
92
+ },
93
+ {
94
+ "name": "SettingsRows",
95
+ "title": "Settings Rows",
96
+ "code": "import { View } from 'react-native';\nimport { Switch } from '@/components/ui/switch';\nimport { useKit } from '@/lib/kit';\n\nexport default function SettingsRows() {\n const { colors, radius } = useKit();\n const rows = [\n { label: 'Push notifications', description: 'Replies, mentions and direct messages.', on: true },\n { label: 'Weekly digest', description: \"A summary of your team's activity every Monday.\" },\n { label: 'Share usage data', description: 'Managed by your organisation.', disabled: true },\n ];\n return (\n <View style={{ borderRadius: radius.lg, borderWidth: 1, borderColor: colors.border, backgroundColor: colors.card, overflow: 'hidden' }}>\n {rows.map((r, i) => (\n <Switch\n key={r.label}\n label={r.label}\n description={r.description}\n defaultValue={r.on}\n disabled={r.disabled}\n style={{ paddingHorizontal: 16, paddingVertical: 12, borderTopWidth: i ? 1 : 0, borderColor: colors.border }}\n />\n ))}\n </View>\n );\n}\n"
97
+ },
98
+ {
99
+ "name": "Sizes",
100
+ "title": "Sizes",
101
+ "code": "import { View } from 'react-native';\nimport { Switch } from '@/components/ui/switch';\n\nexport default function Sizes() {\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 20 }}>\n <Switch size=\"sm\" defaultValue />\n <Switch size=\"md\" defaultValue />\n <Switch size=\"lg\" defaultValue />\n </View>\n );\n}\n"
102
+ }
103
+ ]
104
+ }