@expokit/cli 0.0.0-stage → 0.3.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 (312) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +46 -2
  3. package/bin/expo-kit.js +1266 -0
  4. package/bin/lib.mjs +343 -0
  5. package/bin/mcp.mjs +345 -0
  6. package/package.json +49 -4
  7. package/registry/_docs/accordion.json +115 -0
  8. package/registry/_docs/action-sheet.json +138 -0
  9. package/registry/_docs/alert.json +155 -0
  10. package/registry/_docs/avatar.json +227 -0
  11. package/registry/_docs/badge.json +148 -0
  12. package/registry/_docs/bottom-nav.json +143 -0
  13. package/registry/_docs/bottom-sheet.json +186 -0
  14. package/registry/_docs/bullet.json +27 -0
  15. package/registry/_docs/button-3d.json +138 -0
  16. package/registry/_docs/button.json +131 -0
  17. package/registry/_docs/calendar.json +198 -0
  18. package/registry/_docs/card-stack.json +124 -0
  19. package/registry/_docs/card.json +131 -0
  20. package/registry/_docs/carousel.json +122 -0
  21. package/registry/_docs/chat.json +184 -0
  22. package/registry/_docs/checkbox.json +109 -0
  23. package/registry/_docs/checkout.json +105 -0
  24. package/registry/_docs/chip-group.json +132 -0
  25. package/registry/_docs/color-swatch.json +82 -0
  26. package/registry/_docs/confetti.json +102 -0
  27. package/registry/_docs/coupon.json +192 -0
  28. package/registry/_docs/cube-pager.json +100 -0
  29. package/registry/_docs/dashboard.json +123 -0
  30. package/registry/_docs/date-picker.json +269 -0
  31. package/registry/_docs/dialog.json +186 -0
  32. package/registry/_docs/drawer.json +199 -0
  33. package/registry/_docs/fab.json +144 -0
  34. package/registry/_docs/flip-card.json +127 -0
  35. package/registry/_docs/floating-input.json +211 -0
  36. package/registry/_docs/gift-card.json +124 -0
  37. package/registry/_docs/glass-button.json +142 -0
  38. package/registry/_docs/glass-nav-bar.json +102 -0
  39. package/registry/_docs/glass-search-bar.json +114 -0
  40. package/registry/_docs/glass-segmented.json +94 -0
  41. package/registry/_docs/glass-sheet.json +136 -0
  42. package/registry/_docs/glass-tab-bar.json +100 -0
  43. package/registry/_docs/glass.json +94 -0
  44. package/registry/_docs/inbox.json +75 -0
  45. package/registry/_docs/isometric-bar.json +75 -0
  46. package/registry/_docs/kit.json +14 -0
  47. package/registry/_docs/kpi-card.json +14 -0
  48. package/registry/_docs/like-button.json +92 -0
  49. package/registry/_docs/liquidglass-tab.json +30 -0
  50. package/registry/_docs/list-item.json +216 -0
  51. package/registry/_docs/loyalty-card.json +124 -0
  52. package/registry/_docs/morph-button.json +128 -0
  53. package/registry/_docs/number-ticker.json +112 -0
  54. package/registry/_docs/offers.json +81 -0
  55. package/registry/_docs/onboarding.json +69 -0
  56. package/registry/_docs/otp-input.json +158 -0
  57. package/registry/_docs/pagination-dots.json +108 -0
  58. package/registry/_docs/parallax-layers.json +104 -0
  59. package/registry/_docs/parallax-scroll.json +210 -0
  60. package/registry/_docs/password-input.json +112 -0
  61. package/registry/_docs/payment-card.json +169 -0
  62. package/registry/_docs/pixel-bar.json +69 -0
  63. package/registry/_docs/polar-area.json +81 -0
  64. package/registry/_docs/profile.json +87 -0
  65. package/registry/_docs/progress-steps.json +116 -0
  66. package/registry/_docs/progress.json +152 -0
  67. package/registry/_docs/radio-group.json +112 -0
  68. package/registry/_docs/rating.json +114 -0
  69. package/registry/_docs/ring-carousel.json +122 -0
  70. package/registry/_docs/scratch-card.json +110 -0
  71. package/registry/_docs/search-bar.json +160 -0
  72. package/registry/_docs/search-results.json +123 -0
  73. package/registry/_docs/segmented-control.json +123 -0
  74. package/registry/_docs/select.json +277 -0
  75. package/registry/_docs/settings.json +75 -0
  76. package/registry/_docs/shimmer-button.json +98 -0
  77. package/registry/_docs/sign-in.json +201 -0
  78. package/registry/_docs/skeleton.json +162 -0
  79. package/registry/_docs/slide-to-confirm.json +108 -0
  80. package/registry/_docs/slider.json +177 -0
  81. package/registry/_docs/spin-wheel.json +138 -0
  82. package/registry/_docs/spinner.json +121 -0
  83. package/registry/_docs/stateful-button.json +184 -0
  84. package/registry/_docs/stepper.json +184 -0
  85. package/registry/_docs/swipe-deck.json +118 -0
  86. package/registry/_docs/swipeable-row.json +95 -0
  87. package/registry/_docs/switch.json +124 -0
  88. package/registry/_docs/tabs.json +129 -0
  89. package/registry/_docs/tag-input.json +148 -0
  90. package/registry/_docs/text-animation.json +141 -0
  91. package/registry/_docs/textarea.json +191 -0
  92. package/registry/_docs/ticket-card.json +194 -0
  93. package/registry/_docs/ticket-shape.json +14 -0
  94. package/registry/_docs/tilt-card.json +157 -0
  95. package/registry/_docs/time-picker.json +269 -0
  96. package/registry/_docs/timeline-chart.json +33 -0
  97. package/registry/_docs/timeline.json +172 -0
  98. package/registry/_docs/toast.json +185 -0
  99. package/registry/_docs/treemap.json +33 -0
  100. package/registry/_docs/waterfall.json +39 -0
  101. package/registry/_docs/wheel-list.json +122 -0
  102. package/registry/accordion/files/src/components/ui/accordion.tsx +233 -0
  103. package/registry/accordion/files/src/lib/kit.tsx +219 -0
  104. package/registry/accordion.json +17 -0
  105. package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +580 -0
  106. package/registry/action-sheet/files/src/lib/kit.tsx +219 -0
  107. package/registry/action-sheet.json +18 -0
  108. package/registry/alert/files/src/components/ui/alert.tsx +654 -0
  109. package/registry/alert/files/src/components/ui/button.tsx +274 -0
  110. package/registry/alert/files/src/lib/kit.tsx +219 -0
  111. package/registry/alert.json +20 -0
  112. package/registry/avatar/files/src/components/ui/avatar.tsx +790 -0
  113. package/registry/avatar/files/src/lib/kit.tsx +219 -0
  114. package/registry/avatar.json +18 -0
  115. package/registry/badge/files/src/components/ui/badge.tsx +626 -0
  116. package/registry/badge/files/src/lib/kit.tsx +219 -0
  117. package/registry/badge.json +17 -0
  118. package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +1050 -0
  119. package/registry/bottom-nav/files/src/lib/kit.tsx +219 -0
  120. package/registry/bottom-nav.json +18 -0
  121. package/registry/bottom-sheet/files/src/components/ui/bottom-sheet.tsx +585 -0
  122. package/registry/bottom-sheet/files/src/lib/kit.tsx +219 -0
  123. package/registry/bottom-sheet.json +17 -0
  124. package/registry/bullet.json +14 -0
  125. package/registry/button/files/src/components/ui/button.tsx +274 -0
  126. package/registry/button/files/src/lib/kit.tsx +219 -0
  127. package/registry/button-3d/files/src/components/ui/button-3d.tsx +212 -0
  128. package/registry/button-3d/files/src/lib/kit.tsx +219 -0
  129. package/registry/button-3d.json +18 -0
  130. package/registry/button.json +18 -0
  131. package/registry/calendar/files/src/components/ui/calendar.tsx +822 -0
  132. package/registry/calendar/files/src/lib/kit.tsx +219 -0
  133. package/registry/calendar.json +17 -0
  134. package/registry/card/files/src/components/ui/card.tsx +300 -0
  135. package/registry/card/files/src/lib/kit.tsx +219 -0
  136. package/registry/card-stack.json +15 -0
  137. package/registry/card.json +17 -0
  138. package/registry/carousel.json +15 -0
  139. package/registry/chat.json +18 -0
  140. package/registry/checkbox/files/src/components/ui/checkbox.tsx +150 -0
  141. package/registry/checkbox/files/src/lib/kit.tsx +219 -0
  142. package/registry/checkbox.json +17 -0
  143. package/registry/checkout.json +26 -0
  144. package/registry/chip-group/files/src/components/ui/chip-group.tsx +269 -0
  145. package/registry/chip-group/files/src/lib/kit.tsx +219 -0
  146. package/registry/chip-group.json +17 -0
  147. package/registry/color-swatch.json +17 -0
  148. package/registry/confetti/files/src/components/ui/confetti.tsx +222 -0
  149. package/registry/confetti/files/src/lib/kit.tsx +219 -0
  150. package/registry/confetti.json +15 -0
  151. package/registry/coupon/files/src/components/ui/coupon.tsx +698 -0
  152. package/registry/coupon/files/src/components/ui/flip-card.tsx +205 -0
  153. package/registry/coupon/files/src/components/ui/tilt-card.tsx +635 -0
  154. package/registry/coupon/files/src/lib/kit.tsx +219 -0
  155. package/registry/coupon/files/src/lib/ticket-shape.tsx +543 -0
  156. package/registry/coupon.json +23 -0
  157. package/registry/cube-pager.json +15 -0
  158. package/registry/dashboard.json +32 -0
  159. package/registry/date-picker/files/src/components/ui/calendar.tsx +822 -0
  160. package/registry/date-picker/files/src/components/ui/date-picker.tsx +796 -0
  161. package/registry/date-picker/files/src/lib/kit.tsx +219 -0
  162. package/registry/date-picker.json +19 -0
  163. package/registry/dialog/files/src/components/ui/dialog.tsx +759 -0
  164. package/registry/dialog/files/src/lib/kit.tsx +219 -0
  165. package/registry/dialog.json +18 -0
  166. package/registry/drawer/files/src/components/ui/drawer.tsx +1135 -0
  167. package/registry/drawer/files/src/lib/kit.tsx +219 -0
  168. package/registry/drawer.json +18 -0
  169. package/registry/fab.json +18 -0
  170. package/registry/flip-card/files/src/components/ui/flip-card.tsx +205 -0
  171. package/registry/flip-card/files/src/lib/kit.tsx +219 -0
  172. package/registry/flip-card.json +15 -0
  173. package/registry/floating-input/files/src/components/ui/floating-input.tsx +528 -0
  174. package/registry/floating-input/files/src/lib/kit.tsx +219 -0
  175. package/registry/floating-input.json +17 -0
  176. package/registry/gift-card.json +21 -0
  177. package/registry/glass-button.json +22 -0
  178. package/registry/glass-nav-bar.json +21 -0
  179. package/registry/glass-search-bar.json +21 -0
  180. package/registry/glass-segmented.json +22 -0
  181. package/registry/glass-sheet.json +22 -0
  182. package/registry/glass-tab-bar.json +22 -0
  183. package/registry/glass.json +19 -0
  184. package/registry/inbox.json +30 -0
  185. package/registry/isometric-bar.json +14 -0
  186. package/registry/kit/files/src/lib/kit.tsx +219 -0
  187. package/registry/kit.json +11 -0
  188. package/registry/kpi-card/files/src/components/charts/kpi-card.tsx +45 -0
  189. package/registry/kpi-card.json +14 -0
  190. package/registry/like-button.json +18 -0
  191. package/registry/liquidglass-tab/files/src/app/(tabs)/_layout.tsx +97 -0
  192. package/registry/liquidglass-tab/files/src/app/(tabs)/alerts.tsx +5 -0
  193. package/registry/liquidglass-tab/files/src/app/(tabs)/explore.tsx +5 -0
  194. package/registry/liquidglass-tab/files/src/app/(tabs)/index.tsx +5 -0
  195. package/registry/liquidglass-tab/files/src/app/(tabs)/profile.tsx +5 -0
  196. package/registry/liquidglass-tab/files/src/app/_layout.tsx +33 -0
  197. package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +259 -0
  198. package/registry/liquidglass-tab/files/src/components/TabScreen.tsx +122 -0
  199. package/registry/liquidglass-tab/files/src/lib/tab-bar.ts +61 -0
  200. package/registry/liquidglass-tab/files/src/lib/tab-icons.ts +130 -0
  201. package/registry/liquidglass-tab/files/src/lib/tabs.ts +108 -0
  202. package/registry/liquidglass-tab.json +23 -0
  203. package/registry/list-item/files/src/components/ui/list-item.tsx +508 -0
  204. package/registry/list-item/files/src/lib/kit.tsx +219 -0
  205. package/registry/list-item.json +17 -0
  206. package/registry/loyalty-card.json +23 -0
  207. package/registry/morph-button.json +18 -0
  208. package/registry/number-ticker.json +15 -0
  209. package/registry/offers.json +24 -0
  210. package/registry/onboarding.json +17 -0
  211. package/registry/otp-input/files/src/components/ui/otp-input.tsx +380 -0
  212. package/registry/otp-input/files/src/lib/kit.tsx +219 -0
  213. package/registry/otp-input.json +17 -0
  214. package/registry/pagination-dots/files/src/components/ui/pagination-dots.tsx +262 -0
  215. package/registry/pagination-dots/files/src/lib/kit.tsx +219 -0
  216. package/registry/pagination-dots.json +15 -0
  217. package/registry/parallax-layers.json +15 -0
  218. package/registry/parallax-scroll.json +17 -0
  219. package/registry/password-input/files/src/components/ui/floating-input.tsx +528 -0
  220. package/registry/password-input/files/src/components/ui/password-input.tsx +271 -0
  221. package/registry/password-input/files/src/lib/kit.tsx +219 -0
  222. package/registry/password-input.json +19 -0
  223. package/registry/payment-card/files/src/components/ui/flip-card.tsx +205 -0
  224. package/registry/payment-card/files/src/components/ui/payment-card.tsx +385 -0
  225. package/registry/payment-card/files/src/components/ui/tilt-card.tsx +635 -0
  226. package/registry/payment-card/files/src/lib/kit.tsx +219 -0
  227. package/registry/payment-card.json +21 -0
  228. package/registry/pixel-bar.json +14 -0
  229. package/registry/polar-area.json +14 -0
  230. package/registry/profile.json +17 -0
  231. package/registry/progress/files/src/components/ui/progress.tsx +883 -0
  232. package/registry/progress/files/src/lib/kit.tsx +219 -0
  233. package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +559 -0
  234. package/registry/progress-steps/files/src/lib/kit.tsx +219 -0
  235. package/registry/progress-steps.json +18 -0
  236. package/registry/progress.json +17 -0
  237. package/registry/radio-group/files/src/components/ui/radio-group.tsx +327 -0
  238. package/registry/radio-group/files/src/lib/kit.tsx +219 -0
  239. package/registry/radio-group.json +18 -0
  240. package/registry/rating.json +18 -0
  241. package/registry/ring-carousel.json +15 -0
  242. package/registry/scratch-card.json +18 -0
  243. package/registry/search-bar/files/src/components/ui/search-bar.tsx +530 -0
  244. package/registry/search-bar/files/src/lib/kit.tsx +219 -0
  245. package/registry/search-bar.json +17 -0
  246. package/registry/search-results.json +30 -0
  247. package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +341 -0
  248. package/registry/segmented-control/files/src/lib/kit.tsx +219 -0
  249. package/registry/segmented-control.json +18 -0
  250. package/registry/select/files/src/components/ui/select.tsx +1398 -0
  251. package/registry/select/files/src/lib/kit.tsx +219 -0
  252. package/registry/select.json +17 -0
  253. package/registry/settings.json +26 -0
  254. package/registry/shimmer-button.json +17 -0
  255. package/registry/sign-in.json +26 -0
  256. package/registry/skeleton/files/src/components/ui/skeleton.tsx +799 -0
  257. package/registry/skeleton/files/src/lib/kit.tsx +219 -0
  258. package/registry/skeleton.json +17 -0
  259. package/registry/slide-to-confirm.json +18 -0
  260. package/registry/slider/files/src/components/ui/slider.tsx +716 -0
  261. package/registry/slider/files/src/lib/kit.tsx +219 -0
  262. package/registry/slider.json +17 -0
  263. package/registry/spin-wheel.json +18 -0
  264. package/registry/spinner/files/src/components/ui/spinner.tsx +748 -0
  265. package/registry/spinner/files/src/lib/kit.tsx +219 -0
  266. package/registry/spinner.json +17 -0
  267. package/registry/stateful-button/files/src/components/ui/stateful-button.tsx +532 -0
  268. package/registry/stateful-button/files/src/lib/kit.tsx +219 -0
  269. package/registry/stateful-button.json +18 -0
  270. package/registry/stepper/files/src/components/ui/stepper.tsx +646 -0
  271. package/registry/stepper/files/src/lib/kit.tsx +219 -0
  272. package/registry/stepper.json +17 -0
  273. package/registry/swipe-deck.json +15 -0
  274. package/registry/swipeable-row.json +15 -0
  275. package/registry/switch/files/src/components/ui/switch.tsx +344 -0
  276. package/registry/switch/files/src/lib/kit.tsx +219 -0
  277. package/registry/switch.json +18 -0
  278. package/registry/tabs/files/src/components/ui/tabs.tsx +539 -0
  279. package/registry/tabs/files/src/lib/kit.tsx +219 -0
  280. package/registry/tabs.json +17 -0
  281. package/registry/tag-input/files/src/components/ui/tag-input.tsx +720 -0
  282. package/registry/tag-input/files/src/lib/kit.tsx +219 -0
  283. package/registry/tag-input.json +17 -0
  284. package/registry/text-animation/files/src/components/ui/text-animation.tsx +650 -0
  285. package/registry/text-animation/files/src/lib/kit.tsx +219 -0
  286. package/registry/text-animation.json +15 -0
  287. package/registry/textarea/files/src/components/ui/textarea.tsx +553 -0
  288. package/registry/textarea/files/src/lib/kit.tsx +219 -0
  289. package/registry/textarea.json +17 -0
  290. package/registry/ticket-card.json +24 -0
  291. package/registry/ticket-shape/files/src/lib/kit.tsx +219 -0
  292. package/registry/ticket-shape/files/src/lib/ticket-shape.tsx +543 -0
  293. package/registry/ticket-shape.json +17 -0
  294. package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +635 -0
  295. package/registry/tilt-card/files/src/lib/kit.tsx +219 -0
  296. package/registry/tilt-card.json +17 -0
  297. package/registry/time-picker/files/src/components/ui/time-picker.tsx +1159 -0
  298. package/registry/time-picker/files/src/lib/kit.tsx +219 -0
  299. package/registry/time-picker.json +17 -0
  300. package/registry/timeline/files/src/components/ui/avatar.tsx +790 -0
  301. package/registry/timeline/files/src/components/ui/timeline.tsx +1059 -0
  302. package/registry/timeline/files/src/lib/kit.tsx +219 -0
  303. package/registry/timeline-chart.json +14 -0
  304. package/registry/timeline.json +20 -0
  305. package/registry/toast/files/src/components/ui/button.tsx +274 -0
  306. package/registry/toast/files/src/components/ui/toast.tsx +1284 -0
  307. package/registry/toast/files/src/lib/kit.tsx +219 -0
  308. package/registry/toast.json +20 -0
  309. package/registry/treemap.json +14 -0
  310. package/registry/waterfall.json +14 -0
  311. package/registry/wheel-list.json +17 -0
  312. package/schema/components.schema.json +13 -0
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@expokit/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.0",
4
+ "description": "shadcn-style CLI for Expo — add native UI blocks and components to your app",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "expo-kit": "bin/expo-kit.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "registry",
13
+ "schema",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "keywords": [
18
+ "expo",
19
+ "react-native",
20
+ "cli",
21
+ "ui",
22
+ "shadcn",
23
+ "liquid-glass",
24
+ "native-tabs",
25
+ "expo-router"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "homepage": "https://expokit.karandev.in",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/Anshkaran7/expokit.git",
34
+ "directory": "packages/cli"
35
+ },
36
+ "bugs": {
37
+ "url": "https://github.com/Anshkaran7/expokit/issues"
38
+ },
39
+ "funding": {
40
+ "type": "github",
41
+ "url": "https://github.com/sponsors/Anshkaran7"
42
+ },
43
+ "author": "Karan (anshkaran7) <work@karandev.in>",
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "scripts": {
48
+ "test": "node --test test/*.test.mjs",
49
+ "prepublishOnly": "node ../../scripts/build-registry.mjs"
50
+ }
51
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "name": "accordion",
3
+ "category": "Display",
4
+ "aliases": [],
5
+ "exportName": "Accordion",
6
+ "files": [
7
+ "src/components/ui/accordion.tsx"
8
+ ],
9
+ "summary": "Sections spring open to their measured height while the chevron turns.",
10
+ "props": [
11
+ [
12
+ "type",
13
+ "\"single\" | \"multiple\"",
14
+ "\"single\"",
15
+ "One open item at a time, or any number."
16
+ ],
17
+ [
18
+ "value / defaultValue",
19
+ "string[]",
20
+ "[]",
21
+ "Open item values (controlled / uncontrolled)."
22
+ ],
23
+ [
24
+ "onValueChange",
25
+ "(value: string[]) => void",
26
+ "—",
27
+ "Called when items open or close."
28
+ ],
29
+ [
30
+ "collapsible",
31
+ "boolean",
32
+ "true",
33
+ "Single mode: allow closing the open item."
34
+ ],
35
+ [
36
+ "variant",
37
+ "\"default\" | \"bordered\" | \"separated\"",
38
+ "\"default\"",
39
+ "Divided list, one bordered box, or separate cards."
40
+ ],
41
+ [
42
+ "accent",
43
+ "string",
44
+ "theme accent",
45
+ "Chevron colour of open items."
46
+ ],
47
+ [
48
+ "AccordionItem.value",
49
+ "string",
50
+ "—",
51
+ "Identifies the item in the Accordion's value array."
52
+ ],
53
+ [
54
+ "AccordionItem.title / subtitle",
55
+ "ReactNode / string",
56
+ "—",
57
+ "Header text."
58
+ ],
59
+ [
60
+ "AccordionItem.icon",
61
+ "ReactNode",
62
+ "—",
63
+ "Leading icon; content indents to line up with the title."
64
+ ],
65
+ [
66
+ "AccordionItem.disabled",
67
+ "boolean",
68
+ "false",
69
+ "Can't be toggled."
70
+ ],
71
+ [
72
+ "style",
73
+ "StyleProp<ViewStyle>",
74
+ "—",
75
+ "Style for the Accordion's root view (the card in the bordered variant); AccordionItem takes its own."
76
+ ]
77
+ ],
78
+ "behavior": [
79
+ [
80
+ "Touch",
81
+ "Tap a header to open or close its section. In single mode, opening one closes the other; disabled items don't respond."
82
+ ],
83
+ [
84
+ "Motion",
85
+ "Content height springs to its measured size, so any content animates smoothly. The chevron turns 180° on the native driver."
86
+ ],
87
+ [
88
+ "Screen readers",
89
+ "Each header is a button with expanded and disabled state. Content of closed sections is hidden from assistive tech."
90
+ ]
91
+ ],
92
+ "usage": "import { Accordion, AccordionItem } from '@/components/ui/accordion';\n\n<Accordion defaultValue={['shipping']}>\n <AccordionItem value=\"shipping\" title=\"How long does shipping take?\">\n Orders leave our warehouse within 24 hours.\n </AccordionItem>\n <AccordionItem value=\"returns\" title=\"Can I return an item?\">\n You have 30 days to send anything back for a full refund.\n </AccordionItem>\n</Accordion>",
93
+ "examples": [
94
+ {
95
+ "name": "Default",
96
+ "title": "Default",
97
+ "code": "import { Accordion, AccordionItem } from '@/components/ui/accordion';\n\nexport default function Default() {\n return (\n <Accordion defaultValue={['shipping']}>\n <AccordionItem value=\"shipping\" title=\"How long does shipping take?\">\n Orders leave our warehouse within 24 hours. Standard delivery takes 3–5 business days; express arrives the next day in most cities.\n </AccordionItem>\n <AccordionItem value=\"returns\" title=\"Can I return an item?\">\n Yes — you have 30 days to send anything back for a full refund. Return labels are free and printable from your order page.\n </AccordionItem>\n <AccordionItem value=\"warranty\" title=\"Is there a warranty?\">\n Every product comes with a two-year warranty covering manufacturing defects.\n </AccordionItem>\n </Accordion>\n );\n}\n"
98
+ },
99
+ {
100
+ "name": "Bordered",
101
+ "title": "Bordered",
102
+ "code": "import { Accordion, AccordionItem } from '@/components/ui/accordion';\n\nexport default function Bordered() {\n return (\n <Accordion variant=\"bordered\" type=\"multiple\" defaultValue={['account']}>\n <AccordionItem value=\"account\" title=\"Account\" subtitle=\"Email, password, two-factor\">\n Change your sign-in email, rotate your password and manage the devices that can approve logins.\n </AccordionItem>\n <AccordionItem value=\"billing\" title=\"Billing\" subtitle=\"Plan, invoices, payment method\">\n You are on the Pro plan, renewing on 14 November. Invoices are emailed to finance@northwind.io.\n </AccordionItem>\n <AccordionItem value=\"danger\" title=\"Delete workspace\" subtitle=\"Owners only\" disabled>\n This can't be undone.\n </AccordionItem>\n </Accordion>\n );\n}\n"
103
+ },
104
+ {
105
+ "name": "SeparatedCards",
106
+ "title": "Separated Cards",
107
+ "code": "import { Text, View } from 'react-native';\nimport { Accordion, AccordionItem } from '@/components/ui/accordion';\n\nexport default function SeparatedCards() {\n return (\n <Accordion variant=\"separated\">\n {[\n ['🔒', 'Is my data encrypted?', 'Everything is encrypted in transit with TLS 1.3 and at rest with AES-256. Keys rotate every 90 days.'],\n ['💳', 'Do you offer refunds?', 'If ExpoKit is not for you, email us within 14 days of purchase and we will refund you in full.'],\n ['🌍', 'Which regions do you host in?', 'Frankfurt, Virginia and Singapore. Pick a region when you create a project.'],\n ].map(([icon, q, a]) => (\n <AccordionItem key={q} value={q} title={q} icon={<Text style={{ fontSize: 18 }}>{icon}</Text>}>\n {a}\n </AccordionItem>\n ))}\n </Accordion>\n );\n}\n"
108
+ },
109
+ {
110
+ "name": "Controlled",
111
+ "title": "Controlled",
112
+ "code": "import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { Accordion, AccordionItem } from '@/components/ui/accordion';\nimport { useKit } from '@/lib/kit';\n\nexport default function Controlled() {\n const { colors } = useKit();\n const [open, setOpen] = useState<string[]>([]);\n return (\n <View style={{ gap: 10 }}>\n <Text style={{ fontSize: 13, color: colors.mutedForeground }}>Open: {open.length ? open.join(', ') : 'none'}</Text>\n <Accordion variant=\"bordered\" type=\"multiple\" value={open} onValueChange={setOpen}>\n <AccordionItem value=\"Ingredients\" title=\"Ingredients\">\n <View style={{ gap: 6 }}>\n {['200 g spaghetti', '2 egg yolks + 1 whole egg', '60 g pecorino romano', '120 g guanciale', 'Black pepper'].map((x) => (\n <Text key={x} style={{ fontSize: 14.5, color: colors.mutedForeground }}>• {x}</Text>\n ))}\n </View>\n </AccordionItem>\n <AccordionItem value=\"Method\" title=\"Method\">\n Crisp the guanciale, toss with hot pasta off the heat, then stir in the egg and cheese with a splash of pasta water until glossy.\n </AccordionItem>\n </Accordion>\n </View>\n );\n}\n"
113
+ }
114
+ ]
115
+ }
@@ -0,0 +1,138 @@
1
+ {
2
+ "name": "action-sheet",
3
+ "category": "Overlays",
4
+ "aliases": [],
5
+ "exportName": "ActionSheet",
6
+ "files": [
7
+ "src/components/ui/action-sheet.tsx"
8
+ ],
9
+ "summary": "An iOS-style action sheet that follows your finger and flings away to dismiss.",
10
+ "props": [
11
+ [
12
+ "open / defaultOpen",
13
+ "boolean",
14
+ "false",
15
+ "Controlled / uncontrolled visibility."
16
+ ],
17
+ [
18
+ "onOpenChange",
19
+ "(open: boolean) => void",
20
+ "—",
21
+ "Called on actions, Cancel, backdrop tap, drag-down, back and Escape."
22
+ ],
23
+ [
24
+ "actions",
25
+ "{ label, icon?, destructive?, disabled?, color?, onPress? }[]",
26
+ "—",
27
+ "The options. `icon` is a built-in name (camera, image, trash, reply, forward, copy, pin, edit, share, link, mail, …) or a node; destructive rows use the danger colour; return false from onPress to stay open; `color` tints grid tiles."
28
+ ],
29
+ [
30
+ "title / message",
31
+ "string",
32
+ "—",
33
+ "Header text above the actions."
34
+ ],
35
+ [
36
+ "cancelLabel",
37
+ "string | null",
38
+ "\"Cancel\"",
39
+ "Separate cancel button; null hides it."
40
+ ],
41
+ [
42
+ "onCancel",
43
+ "() => void",
44
+ "—",
45
+ "Called on Cancel, backdrop tap and drag-to-dismiss."
46
+ ],
47
+ [
48
+ "variant",
49
+ "\"inset\" | \"list\" | \"grid\"",
50
+ "\"inset\"",
51
+ "iOS grouped cards (text-only rows centred in the accent; rows with icons read like a menu), Material edge-to-edge list with a drag handle, or share-sheet tiles."
52
+ ],
53
+ [
54
+ "bottomInset",
55
+ "number",
56
+ "platform safe inset",
57
+ "Padding above the home indicator; pass useSafeAreaInsets().bottom for the device."
58
+ ],
59
+ [
60
+ "accent",
61
+ "string",
62
+ "theme accent",
63
+ "Colour of text-only actions and Cancel in the inset variant."
64
+ ],
65
+ [
66
+ "dismissible",
67
+ "boolean",
68
+ "true",
69
+ "Close on scrim tap, drag, back and Escape. When false the sheet only rubber-bands."
70
+ ],
71
+ [
72
+ "haptics",
73
+ "boolean",
74
+ "true",
75
+ "Light impact on open, selection tick when an action is picked."
76
+ ],
77
+ [
78
+ "style",
79
+ "StyleProp<ViewStyle>",
80
+ "—",
81
+ "Sheet container style."
82
+ ]
83
+ ],
84
+ "behavior": [
85
+ [
86
+ "Touch",
87
+ "Drag anywhere on the sheet. Pull past a third of its height or flick down to dismiss; pulling up rubber-bands."
88
+ ],
89
+ [
90
+ "Motion",
91
+ "Springs up over a fading scrim. The exit is quicker than the entry and keeps a fling's momentum."
92
+ ],
93
+ [
94
+ "Reduced motion",
95
+ "The sheet fades in and out in place instead of sliding up from the bottom."
96
+ ],
97
+ [
98
+ "Haptics",
99
+ "A light impact when it opens and a selection tick when you pick an action. Turn off with haptics={false}."
100
+ ],
101
+ [
102
+ "Screen readers",
103
+ "The sheet is a modal view, the title is a header and each row is a button with its label and disabled state."
104
+ ],
105
+ [
106
+ "Keyboard",
107
+ "Escape closes it on web; the Android back button closes it too."
108
+ ]
109
+ ],
110
+ "usage": "import { useState } from 'react';\nimport { ActionSheet } from '@/components/ui/action-sheet';\n\nconst [open, setOpen] = useState(false);\n<ActionSheet\n open={open}\n onOpenChange={setOpen}\n title=\"Profile photo\"\n actions={[{ label: 'Take photo' }, { label: 'Remove photo', destructive: true }]}\n/>",
111
+ "examples": [
112
+ {
113
+ "name": "Photo",
114
+ "title": "Photo",
115
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { ActionSheet } from '@/components/ui/action-sheet';\nimport { Avatar } from '@/components/ui/avatar';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction useMuted() {\n const { colors } = useKit();\n return { fontSize: 13, color: colors.mutedForeground, textAlign: 'center' as const };\n}\n\nexport default function Photo() {\n const muted = useMuted();\n const [open, setOpen] = useState(false);\n const [status, setStatus] = useState('Tap the photo to change it');\n return (\n <View style={{ alignItems: 'center', gap: 12 }}>\n <Avatar name=\"Maya Patel\" size=\"xl\" ring=\"accent\" onPress={() => setOpen(true)} />\n <Text style={muted}>{status}</Text>\n <ActionSheet\n open={open}\n onOpenChange={setOpen}\n title=\"Profile photo\"\n message=\"Your photo is visible to everyone in Northwind.\"\n actions={[\n { label: 'Take photo', onPress: () => setStatus('Opening camera…') },\n { label: 'Choose from library', onPress: () => setStatus('Opening library…') },\n { label: 'Remove photo', destructive: true, onPress: () => setStatus('Photo removed') },\n ]}\n />\n </View>\n );\n}\n"
116
+ },
117
+ {
118
+ "name": "MessageActions",
119
+ "title": "Message Actions",
120
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { ActionSheet } from '@/components/ui/action-sheet';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction useMuted() {\n const { colors } = useKit();\n return { fontSize: 13, color: colors.mutedForeground, textAlign: 'center' as const };\n}\n\nexport default function MessageActions() {\n const { colors, radius } = useKit();\n const muted = useMuted();\n const [open, setOpen] = useState(false);\n const [pinned, setPinned] = useState(false);\n const [status, setStatus] = useState('Long-press the message');\n return (\n <View style={{ alignSelf: 'stretch', gap: 12, paddingHorizontal: 16 }}>\n <Pressable\n onLongPress={() => setOpen(true)}\n delayLongPress={300}\n accessibilityRole=\"button\"\n accessibilityHint=\"Long-press for message actions\"\n style={({ pressed }) => ({\n alignSelf: 'flex-end',\n maxWidth: '82%',\n paddingHorizontal: 14,\n paddingVertical: 10,\n borderRadius: radius.scale(20),\n borderBottomRightRadius: radius.scale(6),\n backgroundColor: colors.accent,\n transform: [{ scale: pressed ? 0.97 : 1 }],\n })}\n >\n <Text style={{ color: readableOn(colors.accent), fontSize: 15, lineHeight: 20 }}>\n Running 10 min late — grab us a table by the window?\n </Text>\n </Pressable>\n <Text style={muted}>{status}</Text>\n <ActionSheet\n open={open}\n onOpenChange={setOpen}\n actions={[\n { label: 'Reply', icon: 'reply', onPress: () => setStatus('Replying to Maya') },\n { label: 'Forward', icon: 'forward', onPress: () => setStatus('Choose a chat') },\n { label: 'Copy text', icon: 'copy', onPress: () => setStatus('Copied to clipboard') },\n {\n label: pinned ? 'Unpin' : 'Pin',\n icon: 'pin',\n onPress: () => {\n setPinned((p) => !p);\n setStatus(pinned ? 'Unpinned' : 'Pinned to the top of the chat');\n },\n },\n { label: 'Edit', icon: 'edit', disabled: true },\n { label: 'Delete for everyone', icon: 'trash', destructive: true, onPress: () => setStatus('Message deleted') },\n ]}\n />\n </View>\n );\n}\n"
121
+ },
122
+ {
123
+ "name": "Share",
124
+ "title": "Share",
125
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { ActionSheet } from '@/components/ui/action-sheet';\nimport { Button } from '@/components/ui/button';\nimport { readableOn, useKit } from '@/lib/kit';\n\nexport default function Share() {\n const { colors } = useKit();\n const [open, setOpen] = useState(false);\n return (\n <View style={{ alignItems: 'center' }}>\n <Button variant=\"accent\" onPress={() => setOpen(true)}>\n Share trip\n </Button>\n <ActionSheet\n open={open}\n onOpenChange={setOpen}\n variant=\"grid\"\n title=\"Share “Lisbon, May 12–16”\"\n actions={[\n { label: 'Messages', icon: 'message', color: colors.success },\n { label: 'Mail', icon: 'mail', color: colors.accent },\n { label: 'Send to…', icon: 'send', color: colors.primary },\n { label: 'Copy link', icon: 'link' },\n { label: 'Save PDF', icon: 'download' },\n { label: 'Print', icon: 'printer' },\n { label: 'Invite', icon: 'user' },\n { label: 'More', icon: 'more' },\n ]}\n />\n </View>\n );\n}\n"
126
+ },
127
+ {
128
+ "name": "PostOptions",
129
+ "title": "Post Options",
130
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { ActionSheet } from '@/components/ui/action-sheet';\nimport { Button } from '@/components/ui/button';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction useMuted() {\n const { colors } = useKit();\n return { fontSize: 13, color: colors.mutedForeground, textAlign: 'center' as const };\n}\n\nexport default function PostOptions() {\n const muted = useMuted();\n const [open, setOpen] = useState(false);\n const [saved, setSaved] = useState(false);\n return (\n <View style={{ alignItems: 'center', gap: 10 }}>\n <Button variant=\"outline\" onPress={() => setOpen(true)}>\n Post options\n </Button>\n <Text style={muted}>{saved ? 'Saved to your collection' : 'Material list with icons'}</Text>\n <ActionSheet\n open={open}\n onOpenChange={setOpen}\n variant=\"list\"\n title=\"Jonas’s post\"\n cancelLabel={null}\n actions={[\n { label: 'Edit post', icon: 'edit' },\n { label: saved ? 'Remove from saved' : 'Save post', icon: 'bookmark', onPress: () => setSaved((s) => !s) },\n { label: 'Copy link', icon: 'copy' },\n { label: 'Hide from feed', icon: 'eye-off' },\n { label: 'Report post', icon: 'flag', destructive: true },\n ]}\n />\n </View>\n );\n}\n"
131
+ },
132
+ {
133
+ "name": "DiscardDraft",
134
+ "title": "Discard Draft",
135
+ "code": "import React, { useState } from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport { ActionSheet } from '@/components/ui/action-sheet';\nimport { Button } from '@/components/ui/button';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction useMuted() {\n const { colors } = useKit();\n return { fontSize: 13, color: colors.mutedForeground, textAlign: 'center' as const };\n}\n\nexport default function DiscardDraft() {\n const muted = useMuted();\n const [open, setOpen] = useState(false);\n const [result, setResult] = useState('');\n return (\n <View style={{ alignItems: 'center', gap: 10 }}>\n <Button variant=\"secondary\" onPress={() => setOpen(true)}>\n Close editor\n </Button>\n {result ? <Text style={muted}>{result}</Text> : null}\n <ActionSheet\n open={open}\n onOpenChange={setOpen}\n message=\"You have unsaved changes to “Weekly update”. Save them as a draft?\"\n onCancel={() => setResult('Kept editing')}\n cancelLabel=\"Keep editing\"\n actions={[\n { label: 'Discard changes', destructive: true, onPress: () => setResult('Changes discarded') },\n { label: 'Save draft', onPress: () => setResult('Draft saved') },\n { label: 'Schedule post', disabled: true },\n ]}\n />\n </View>\n );\n}\n"
136
+ }
137
+ ]
138
+ }
@@ -0,0 +1,155 @@
1
+ {
2
+ "name": "alert",
3
+ "category": "Feedback",
4
+ "aliases": [],
5
+ "exportName": "Alert",
6
+ "files": [
7
+ "src/components/ui/alert.tsx"
8
+ ],
9
+ "summary": "An inline banner whose icon draws itself inside a halo, with an optional draining timer.",
10
+ "props": [
11
+ [
12
+ "variant",
13
+ "\"info\" | \"success\" | \"warning\" | \"danger\"",
14
+ "\"info\"",
15
+ "Tone and living icon."
16
+ ],
17
+ [
18
+ "appearance",
19
+ "\"soft\" | \"outline\" | \"solid\" | \"accent-bar\"",
20
+ "\"soft\"",
21
+ "Card with a tone glow behind the icon, transparent with a hairline tone border, or filled with the solid tone. \"accent-bar\" is deprecated and renders as \"soft\"."
22
+ ],
23
+ [
24
+ "title",
25
+ "string",
26
+ "—",
27
+ "First line. Without a title (and without actions) the alert uses the compact single-line layout."
28
+ ],
29
+ [
30
+ "description",
31
+ "ReactNode",
32
+ "—",
33
+ "Supporting text."
34
+ ],
35
+ [
36
+ "action",
37
+ "{ label, onPress } | ReactNode",
38
+ "—",
39
+ "One action: a tone pill under the text, or an inline pill on the right in the compact layout."
40
+ ],
41
+ [
42
+ "actions",
43
+ "{ primary: { label, onPress }, secondary?: { label, onPress } }",
44
+ "—",
45
+ "Pill pair on the bottom row; primary is filled with the tone."
46
+ ],
47
+ [
48
+ "icon",
49
+ "ReactNode | false",
50
+ "living tone icon",
51
+ "Custom icon (shown in the halo) or none."
52
+ ],
53
+ [
54
+ "dismissible",
55
+ "boolean",
56
+ "false",
57
+ "Show a 28pt close button (44pt hit area) that collapses the alert."
58
+ ],
59
+ [
60
+ "duration",
61
+ "number (ms)",
62
+ "—",
63
+ "Auto-dismiss. A hairline drains along the bottom edge; pauses while pressed or hovered."
64
+ ],
65
+ [
66
+ "visible",
67
+ "boolean",
68
+ "—",
69
+ "Controlled visibility (animated)."
70
+ ],
71
+ [
72
+ "onDismiss",
73
+ "() => void",
74
+ "—",
75
+ "Called when closed by the button or when `duration` runs out."
76
+ ],
77
+ [
78
+ "haptics",
79
+ "boolean",
80
+ "false",
81
+ "Notification haptic (success / warning / error) when the alert appears."
82
+ ],
83
+ [
84
+ "color",
85
+ "string",
86
+ "tone colour",
87
+ "Override the tone colour."
88
+ ],
89
+ [
90
+ "style",
91
+ "StyleProp<ViewStyle>",
92
+ "—",
93
+ "Style for the outer animated wrapper (its height collapses on dismiss)."
94
+ ]
95
+ ],
96
+ "behavior": [
97
+ [
98
+ "Motion",
99
+ "On appear the icon outline draws, the glyph springs in and the halo ripples once. Dismissing collapses the height so content below glides up."
100
+ ],
101
+ [
102
+ "Touch",
103
+ "With duration set, a hairline drains along the bottom to show the time left. Pressing the alert pauses it."
104
+ ],
105
+ [
106
+ "Reduced motion",
107
+ "The icon draw, glyph pop and halo ripple jump straight to their finished state."
108
+ ],
109
+ [
110
+ "Haptics",
111
+ "Success, warning and danger alerts play the matching notification haptic when they appear; info stays silent."
112
+ ],
113
+ [
114
+ "Screen readers",
115
+ "The card has the alert role in a polite live region. The close button is labelled Dismiss and actions are buttons named by their label."
116
+ ],
117
+ [
118
+ "Web",
119
+ "Hovering also pauses the auto-dismiss timer."
120
+ ]
121
+ ],
122
+ "usage": "import { Alert } from '@/components/ui/alert';\n\n<Alert\n variant=\"warning\"\n title=\"Storage almost full\"\n description=\"You've used 9.4 GB of your 10 GB plan.\"\n dismissible\n/>",
123
+ "examples": [
124
+ {
125
+ "name": "Soft",
126
+ "title": "Soft",
127
+ "code": "import { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\n\nexport default function Soft() {\n return (\n <View style={{ gap: 10 }}>\n <Alert variant=\"info\" title=\"New sign-in method\" description=\"You can now use a passkey instead of your password.\" />\n <Alert variant=\"success\" title=\"Payment received\" description=\"₹1,24,000 from Northwind Traders.\" />\n <Alert variant=\"warning\" title=\"Storage almost full\" description=\"You've used 9.4 GB of your 10 GB plan.\" />\n <Alert variant=\"danger\" title=\"Sync failed\" description=\"We couldn't reach the server. Your edits are saved on this device.\" />\n </View>\n );\n}\n"
128
+ },
129
+ {
130
+ "name": "Appearances",
131
+ "title": "Appearances",
132
+ "code": "import { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\n\nexport default function Appearances() {\n return (\n <View style={{ gap: 10 }}>\n <Alert variant=\"info\" appearance=\"outline\" title=\"Scheduled maintenance\" description=\"Sunday 02:00–03:00 UTC.\" />\n <Alert variant=\"danger\" appearance=\"outline\" title=\"2 failed sign-in attempts\" description=\"Chrome on Windows · Berlin, DE\" />\n <Alert variant=\"success\" appearance=\"solid\" title=\"Profile published\" description=\"Anyone with the link can view it.\" />\n <Alert variant=\"warning\" appearance=\"solid\" title=\"Trial ends in 3 days\" />\n </View>\n );\n}\n"
133
+ },
134
+ {
135
+ "name": "WithActions",
136
+ "title": "With Actions",
137
+ "code": "import { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\n\nexport default function WithActions() {\n return (\n <View style={{ gap: 10 }}>\n <Alert\n variant=\"info\"\n title=\"Update available\"\n description=\"Version 3.2 is ready. Restart to finish installing.\"\n actions={{ primary: { label: 'Restart', onPress: () => {} }, secondary: { label: 'Later', onPress: () => {} } }}\n />\n <Alert\n variant=\"danger\"\n title=\"Payment declined\"\n description=\"Your Visa ending 4242 was declined. Pro features pause on May 12.\"\n actions={{ primary: { label: 'Update card', onPress: () => {} }, secondary: { label: 'Contact bank', onPress: () => {} } }}\n dismissible\n />\n </View>\n );\n}\n"
138
+ },
139
+ {
140
+ "name": "AutoDismiss",
141
+ "title": "Auto Dismiss",
142
+ "code": "import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\nimport { Button } from '@/components/ui/button';\nimport { useKit } from '@/lib/kit';\n\nexport default function AutoDismiss() {\n const { colors } = useKit();\n const [visible, setVisible] = useState(true);\n return (\n <View style={{ gap: 12 }}>\n <Alert\n variant=\"success\"\n title=\"Changes saved\"\n description=\"Your team can see the new pricing page.\"\n duration={6000}\n dismissible\n visible={visible}\n onDismiss={() => setVisible(false)}\n />\n <Text style={{ fontSize: 14, color: colors.mutedForeground }}>Closes in 6 s. Touch and hold to pause the timer.</Text>\n <Button size=\"sm\" variant=\"outline\" style={{ alignSelf: 'flex-start' }} disabled={visible} onPress={() => setVisible(true)}>\n Show again\n </Button>\n </View>\n );\n}\n"
143
+ },
144
+ {
145
+ "name": "Dismissible",
146
+ "title": "Dismissible",
147
+ "code": "import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\nimport { Button } from '@/components/ui/button';\nimport { useKit } from '@/lib/kit';\n\nexport default function Dismissible() {\n const { colors } = useKit();\n const [visible, setVisible] = useState(true);\n return (\n <View style={{ gap: 12 }}>\n <Alert\n variant=\"success\"\n title=\"Backup complete\"\n description=\"2,184 photos were saved to iCloud.\"\n dismissible\n visible={visible}\n onDismiss={() => setVisible(false)}\n />\n <Text style={{ fontSize: 14, color: colors.mutedForeground }}>Content below glides up when the alert collapses.</Text>\n <Button size=\"sm\" variant=\"outline\" style={{ alignSelf: 'flex-start' }} disabled={visible} onPress={() => setVisible(true)}>\n Show again\n </Button>\n </View>\n );\n}\n"
148
+ },
149
+ {
150
+ "name": "Compact",
151
+ "title": "Compact",
152
+ "code": "import { Text, View } from 'react-native';\nimport { Alert } from '@/components/ui/alert';\n\nexport default function Compact() {\n return (\n <View style={{ gap: 10 }}>\n <Alert variant=\"info\" description=\"Prices include VAT where applicable.\" />\n <Alert variant=\"warning\" description=\"You're offline.\" action={{ label: 'Retry', onPress: () => {} }} />\n <Alert variant=\"success\" description=\"Link copied to clipboard.\" dismissible />\n <Alert variant=\"danger\" appearance=\"outline\" description=\"This action can't be undone.\" icon={false} />\n </View>\n );\n}\n"
153
+ }
154
+ ]
155
+ }