@lt-three/love3 0.0.0 → 0.1.1

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 (377) hide show
  1. package/README.md +85 -1
  2. package/dist/native/analytics/animation.d.ts +4 -0
  3. package/dist/native/analytics/animation.js +6 -0
  4. package/dist/native/analytics/chart.types.d.ts +25 -0
  5. package/dist/native/analytics/chart.types.js +0 -0
  6. package/dist/native/analytics/line-chart.d.ts +4 -0
  7. package/dist/native/analytics/line-chart.ios.d.ts +4 -0
  8. package/dist/native/analytics/line-chart.ios.js +24 -0
  9. package/dist/native/analytics/line-chart.js +33 -0
  10. package/dist/native/analytics/metric-card.d.ts +10 -0
  11. package/dist/native/analytics/metric-card.js +29 -0
  12. package/dist/native/analytics/multi-line-chart.d.ts +18 -0
  13. package/dist/native/analytics/multi-line-chart.js +216 -0
  14. package/dist/native/analytics/pie-chart.d.ts +15 -0
  15. package/dist/native/analytics/pie-chart.ios.d.ts +4 -0
  16. package/dist/native/analytics/pie-chart.ios.js +24 -0
  17. package/dist/native/analytics/pie-chart.js +92 -0
  18. package/dist/native/analytics/single-number.d.ts +19 -0
  19. package/dist/native/analytics/single-number.js +101 -0
  20. package/dist/native/atom/avatar.d.ts +21 -0
  21. package/dist/native/atom/avatar.js +46 -0
  22. package/dist/native/atom/badge.d.ts +28 -0
  23. package/dist/native/atom/badge.js +51 -0
  24. package/dist/native/atom/button.d.ts +46 -0
  25. package/dist/native/atom/button.js +109 -0
  26. package/dist/native/atom/checkbox.d.ts +21 -0
  27. package/dist/native/atom/checkbox.js +47 -0
  28. package/dist/native/atom/colored-value.d.ts +12 -0
  29. package/dist/native/atom/colored-value.js +24 -0
  30. package/dist/native/atom/image.d.ts +21 -0
  31. package/dist/native/atom/image.js +72 -0
  32. package/dist/native/atom/label.d.ts +18 -0
  33. package/dist/native/atom/label.js +33 -0
  34. package/dist/native/atom/link.d.ts +18 -0
  35. package/dist/native/atom/link.js +25 -0
  36. package/dist/native/atom/readout.d.ts +22 -0
  37. package/dist/native/atom/readout.js +39 -0
  38. package/dist/native/atom/search-input.d.ts +12 -0
  39. package/dist/native/atom/search-input.js +36 -0
  40. package/dist/native/atom/select.d.ts +54 -0
  41. package/dist/native/atom/select.js +200 -0
  42. package/dist/native/atom/separator.d.ts +12 -0
  43. package/dist/native/atom/separator.js +16 -0
  44. package/dist/native/atom/skeleton.d.ts +12 -0
  45. package/dist/native/atom/skeleton.js +39 -0
  46. package/dist/native/atom/slider.d.ts +32 -0
  47. package/dist/native/atom/slider.js +75 -0
  48. package/dist/native/atom/spinner.d.ts +15 -0
  49. package/dist/native/atom/spinner.js +25 -0
  50. package/dist/native/atom/switch.d.ts +18 -0
  51. package/dist/native/atom/switch.js +52 -0
  52. package/dist/native/atom/symbol.d.ts +16 -0
  53. package/dist/native/atom/symbol.js +38 -0
  54. package/dist/native/atom/symbol.types.d.ts +25 -0
  55. package/dist/native/atom/symbol.types.js +49 -0
  56. package/dist/native/atom/text-field.d.ts +49 -0
  57. package/dist/native/atom/text-field.js +56 -0
  58. package/dist/native/atom/text.d.ts +2 -0
  59. package/dist/native/atom/text.js +3 -0
  60. package/dist/native/atom/theme-toggle.d.ts +21 -0
  61. package/dist/native/atom/theme-toggle.js +36 -0
  62. package/dist/native/atom/timezone-select.d.ts +16 -0
  63. package/dist/native/atom/timezone-select.js +28 -0
  64. package/dist/native/atom/typography.d.ts +13 -0
  65. package/dist/native/atom/typography.js +28 -0
  66. package/dist/native/base/button.d.ts +61 -0
  67. package/dist/native/base/button.js +92 -0
  68. package/dist/native/base/form.d.ts +72 -0
  69. package/dist/native/base/form.js +113 -0
  70. package/dist/native/base/glass-card.d.ts +15 -0
  71. package/dist/native/base/glass-card.js +38 -0
  72. package/dist/native/base/input.d.ts +29 -0
  73. package/dist/native/base/input.js +27 -0
  74. package/dist/native/base/sheet.d.ts +71 -0
  75. package/dist/native/base/sheet.js +187 -0
  76. package/dist/native/base/text.d.ts +14 -0
  77. package/dist/native/base/text.js +53 -0
  78. package/dist/native/form/checkbox.d.ts +13 -0
  79. package/dist/native/form/checkbox.js +55 -0
  80. package/dist/native/form/date-picker.d.ts +23 -0
  81. package/dist/native/form/date-picker.js +119 -0
  82. package/dist/native/form/form.d.ts +22 -0
  83. package/dist/native/form/form.js +44 -0
  84. package/dist/native/form/radio-group.d.ts +23 -0
  85. package/dist/native/form/radio-group.js +88 -0
  86. package/dist/native/form/select.d.ts +13 -0
  87. package/dist/native/form/select.js +45 -0
  88. package/dist/native/form/slider.d.ts +14 -0
  89. package/dist/native/form/slider.js +42 -0
  90. package/dist/native/form/switch.d.ts +9 -0
  91. package/dist/native/form/switch.js +59 -0
  92. package/dist/native/form/text-area.d.ts +11 -0
  93. package/dist/native/form/text-area.js +50 -0
  94. package/dist/native/form/text-input.d.ts +18 -0
  95. package/dist/native/form/text-input.js +90 -0
  96. package/dist/native/index.d.ts +1 -0
  97. package/dist/native/index.js +0 -0
  98. package/dist/native/layout/accordion.d.ts +25 -0
  99. package/dist/native/layout/accordion.js +54 -0
  100. package/dist/native/layout/card.d.ts +47 -0
  101. package/dist/native/layout/card.js +57 -0
  102. package/dist/native/layout/description.d.ts +16 -0
  103. package/dist/native/layout/description.js +32 -0
  104. package/dist/native/layout/error.d.ts +21 -0
  105. package/dist/native/layout/error.js +44 -0
  106. package/dist/native/layout/information.d.ts +25 -0
  107. package/dist/native/layout/information.js +35 -0
  108. package/dist/native/layout/locked.d.ts +38 -0
  109. package/dist/native/layout/locked.js +94 -0
  110. package/dist/native/layout/modal.d.ts +25 -0
  111. package/dist/native/layout/modal.js +93 -0
  112. package/dist/native/layout/not-found.d.ts +17 -0
  113. package/dist/native/layout/not-found.js +30 -0
  114. package/dist/native/layout/page-frame.d.ts +23 -0
  115. package/dist/native/layout/page-frame.js +46 -0
  116. package/dist/native/layout/panel.d.ts +18 -0
  117. package/dist/native/layout/panel.js +23 -0
  118. package/dist/native/layout/reorderable-list.d.ts +42 -0
  119. package/dist/native/layout/reorderable-list.js +52 -0
  120. package/dist/native/layout/sheet.d.ts +30 -0
  121. package/dist/native/layout/sheet.js +46 -0
  122. package/dist/native/layout/simple-dialog.d.ts +16 -0
  123. package/dist/native/layout/simple-dialog.js +20 -0
  124. package/dist/native/layout/simple-table.d.ts +50 -0
  125. package/dist/native/layout/simple-table.js +75 -0
  126. package/dist/native/layout/tab-bar.d.ts +33 -0
  127. package/dist/native/layout/tab-bar.js +48 -0
  128. package/dist/native/layout/tabs.d.ts +28 -0
  129. package/dist/native/layout/tabs.js +54 -0
  130. package/dist/native/layout/tuning-panel.d.ts +24 -0
  131. package/dist/native/layout/tuning-panel.js +246 -0
  132. package/dist/native/lib/autocomplete.d.ts +7 -0
  133. package/dist/native/lib/autocomplete.js +34 -0
  134. package/dist/native/lib/breakpoints.d.ts +14 -0
  135. package/dist/native/lib/breakpoints.js +17 -0
  136. package/dist/native/lib/chart-palette.d.ts +8 -0
  137. package/dist/native/lib/chart-palette.js +20 -0
  138. package/dist/native/lib/confirm.d.ts +48 -0
  139. package/dist/native/lib/confirm.js +69 -0
  140. package/dist/native/lib/control.d.ts +24 -0
  141. package/dist/native/lib/control.js +0 -0
  142. package/dist/native/lib/external-store.d.ts +16 -0
  143. package/dist/native/lib/external-store.js +30 -0
  144. package/dist/native/lib/keyboard.d.ts +15 -0
  145. package/dist/native/lib/keyboard.js +24 -0
  146. package/dist/native/lib/labels.d.ts +15 -0
  147. package/dist/native/lib/labels.js +17 -0
  148. package/dist/native/lib/loading.d.ts +10 -0
  149. package/dist/native/lib/loading.js +15 -0
  150. package/dist/native/lib/network.d.ts +11 -0
  151. package/dist/native/lib/network.js +20 -0
  152. package/dist/native/lib/scheme.d.ts +18 -0
  153. package/dist/native/lib/scheme.js +22 -0
  154. package/dist/native/lib/snackbar.d.ts +45 -0
  155. package/dist/native/lib/snackbar.js +59 -0
  156. package/dist/native/lib/theme.d.ts +34 -0
  157. package/dist/native/lib/theme.js +53 -0
  158. package/dist/native/lib/timezone.d.ts +26 -0
  159. package/dist/native/lib/timezone.js +95 -0
  160. package/dist/native/lib/token-color.d.ts +5 -0
  161. package/dist/native/lib/token-color.js +13 -0
  162. package/dist/native/lib/token-color.web.d.ts +4 -0
  163. package/dist/native/lib/token-color.web.js +7 -0
  164. package/dist/native/lib/tuning-context.d.ts +9 -0
  165. package/dist/native/lib/tuning-context.js +7 -0
  166. package/dist/native/lib/tuning.d.ts +24 -0
  167. package/dist/native/lib/tuning.js +42 -0
  168. package/dist/native/lib/typography.d.ts +10 -0
  169. package/dist/native/lib/typography.js +11 -0
  170. package/dist/native/lib/utils.d.ts +11 -0
  171. package/dist/native/lib/utils.js +21 -0
  172. package/dist/native/once/confirm.d.ts +7 -0
  173. package/dist/native/once/confirm.js +60 -0
  174. package/dist/native/once/error-boundary.d.ts +28 -0
  175. package/dist/native/once/error-boundary.js +55 -0
  176. package/dist/native/once/loading-lock.d.ts +8 -0
  177. package/dist/native/once/loading-lock.js +28 -0
  178. package/dist/native/once/offline-banner.d.ts +15 -0
  179. package/dist/native/once/offline-banner.js +35 -0
  180. package/dist/native/once/snackbar.d.ts +17 -0
  181. package/dist/native/once/snackbar.js +106 -0
  182. package/dist/native/styles.css +46 -0
  183. package/dist/shared/analytics.d.ts +71 -0
  184. package/dist/shared/analytics.js +0 -0
  185. package/dist/shared/button.d.ts +7 -0
  186. package/dist/shared/button.js +23 -0
  187. package/dist/shared/form.d.ts +45 -0
  188. package/dist/shared/form.js +46 -0
  189. package/dist/shared/index.d.ts +3 -0
  190. package/dist/shared/index.js +3 -0
  191. package/dist/tokens/contrast-pairs.d.ts +30 -0
  192. package/dist/tokens/contrast-pairs.js +404 -0
  193. package/dist/tokens/index.d.ts +6 -0
  194. package/dist/tokens/index.js +10 -0
  195. package/dist/tokens/styles.gen.css +250 -0
  196. package/dist/tokens/tokens.gen.d.ts +141 -0
  197. package/dist/tokens/tokens.gen.js +206 -0
  198. package/dist/tuning/catalog.d.ts +27 -0
  199. package/dist/tuning/catalog.gen.d.ts +4 -0
  200. package/dist/tuning/catalog.gen.js +397 -0
  201. package/dist/tuning/catalog.js +128 -0
  202. package/dist/tuning/color.d.ts +20 -0
  203. package/dist/tuning/color.js +80 -0
  204. package/dist/tuning/css.d.ts +35 -0
  205. package/dist/tuning/css.js +147 -0
  206. package/dist/tuning/index.d.ts +8 -0
  207. package/dist/tuning/index.js +9 -0
  208. package/dist/tuning/model.d.ts +33 -0
  209. package/dist/tuning/model.js +154 -0
  210. package/dist/tuning/native.d.ts +35 -0
  211. package/dist/tuning/native.js +80 -0
  212. package/dist/tuning/schema.d.ts +69 -0
  213. package/dist/tuning/schema.js +247 -0
  214. package/dist/tuning/types.d.ts +75 -0
  215. package/dist/tuning/types.js +39 -0
  216. package/dist/web/analytics/line-chart.d.ts +20 -0
  217. package/dist/web/analytics/line-chart.js +28 -0
  218. package/dist/web/analytics/metric-card.d.ts +18 -0
  219. package/dist/web/analytics/metric-card.js +40 -0
  220. package/dist/web/analytics/multi-line-chart.d.ts +39 -0
  221. package/dist/web/analytics/multi-line-chart.js +345 -0
  222. package/dist/web/atom/avatar.d.ts +11 -0
  223. package/dist/web/atom/avatar.js +24 -0
  224. package/dist/web/atom/badge.d.ts +2 -0
  225. package/dist/web/atom/badge.js +3 -0
  226. package/dist/web/atom/button.d.ts +23 -0
  227. package/dist/web/atom/button.js +35 -0
  228. package/dist/web/atom/checkbox.d.ts +19 -0
  229. package/dist/web/atom/checkbox.js +33 -0
  230. package/dist/web/atom/colored-value.d.ts +13 -0
  231. package/dist/web/atom/colored-value.js +24 -0
  232. package/dist/web/atom/help.d.ts +10 -0
  233. package/dist/web/atom/help.js +18 -0
  234. package/dist/web/atom/label.d.ts +2 -0
  235. package/dist/web/atom/label.js +3 -0
  236. package/dist/web/atom/segmented-control.d.ts +39 -0
  237. package/dist/web/atom/segmented-control.js +42 -0
  238. package/dist/web/atom/select.d.ts +43 -0
  239. package/dist/web/atom/select.js +93 -0
  240. package/dist/web/atom/separator.d.ts +2 -0
  241. package/dist/web/atom/separator.js +3 -0
  242. package/dist/web/atom/skeleton.d.ts +2 -0
  243. package/dist/web/atom/skeleton.js +3 -0
  244. package/dist/web/atom/slider.d.ts +33 -0
  245. package/dist/web/atom/slider.js +70 -0
  246. package/dist/web/atom/spinner.d.ts +8 -0
  247. package/dist/web/atom/spinner.js +14 -0
  248. package/dist/web/atom/switch.d.ts +11 -0
  249. package/dist/web/atom/switch.js +10 -0
  250. package/dist/web/atom/text-area.d.ts +23 -0
  251. package/dist/web/atom/text-area.js +27 -0
  252. package/dist/web/atom/text-field.d.ts +18 -0
  253. package/dist/web/atom/text-field.js +22 -0
  254. package/dist/web/atom/toggle-chip.d.ts +22 -0
  255. package/dist/web/atom/toggle-chip.js +28 -0
  256. package/dist/web/atom/tooltip.d.ts +23 -0
  257. package/dist/web/atom/tooltip.js +26 -0
  258. package/dist/web/atom/typography.d.ts +6 -0
  259. package/dist/web/atom/typography.js +23 -0
  260. package/dist/web/base/accordion.d.ts +9 -0
  261. package/dist/web/base/accordion.js +44 -0
  262. package/dist/web/base/alert.d.ts +11 -0
  263. package/dist/web/base/alert.js +37 -0
  264. package/dist/web/base/avatar.d.ts +8 -0
  265. package/dist/web/base/avatar.js +29 -0
  266. package/dist/web/base/badge.d.ts +12 -0
  267. package/dist/web/base/badge.js +26 -0
  268. package/dist/web/base/breadcrumb.d.ts +16 -0
  269. package/dist/web/base/breadcrumb.js +72 -0
  270. package/dist/web/base/button.d.ts +12 -0
  271. package/dist/web/base/button.js +47 -0
  272. package/dist/web/base/card.d.ts +19 -0
  273. package/dist/web/base/card.js +74 -0
  274. package/dist/web/base/checkbox.d.ts +6 -0
  275. package/dist/web/base/checkbox.js +21 -0
  276. package/dist/web/base/dialog.d.ts +20 -0
  277. package/dist/web/base/dialog.js +92 -0
  278. package/dist/web/base/dropdown-menu.d.ts +29 -0
  279. package/dist/web/base/dropdown-menu.js +125 -0
  280. package/dist/web/base/field.d.ts +27 -0
  281. package/dist/web/base/field.js +118 -0
  282. package/dist/web/base/form.d.ts +38 -0
  283. package/dist/web/base/form.js +110 -0
  284. package/dist/web/base/input.d.ts +9 -0
  285. package/dist/web/base/input.js +23 -0
  286. package/dist/web/base/label.d.ts +6 -0
  287. package/dist/web/base/label.js +15 -0
  288. package/dist/web/base/pagination.d.ts +34 -0
  289. package/dist/web/base/pagination.js +90 -0
  290. package/dist/web/base/popover.d.ts +11 -0
  291. package/dist/web/base/popover.js +37 -0
  292. package/dist/web/base/radio-group.d.ts +7 -0
  293. package/dist/web/base/radio-group.js +27 -0
  294. package/dist/web/base/scroll-area.d.ts +10 -0
  295. package/dist/web/base/scroll-area.js +41 -0
  296. package/dist/web/base/select.d.ts +17 -0
  297. package/dist/web/base/select.js +96 -0
  298. package/dist/web/base/separator.d.ts +6 -0
  299. package/dist/web/base/separator.js +17 -0
  300. package/dist/web/base/sheet.d.ts +19 -0
  301. package/dist/web/base/sheet.js +88 -0
  302. package/dist/web/base/skeleton.d.ts +5 -0
  303. package/dist/web/base/skeleton.js +14 -0
  304. package/dist/web/base/slider.d.ts +9 -0
  305. package/dist/web/base/slider.js +39 -0
  306. package/dist/web/base/sonner.d.ts +9 -0
  307. package/dist/web/base/sonner.js +25 -0
  308. package/dist/web/base/spinner.d.ts +5 -0
  309. package/dist/web/base/spinner.js +17 -0
  310. package/dist/web/base/switch.d.ts +6 -0
  311. package/dist/web/base/switch.js +19 -0
  312. package/dist/web/base/table.d.ts +14 -0
  313. package/dist/web/base/table.js +68 -0
  314. package/dist/web/base/tabs.d.ts +9 -0
  315. package/dist/web/base/tabs.js +36 -0
  316. package/dist/web/base/textarea.d.ts +9 -0
  317. package/dist/web/base/textarea.js +23 -0
  318. package/dist/web/base/tooltip.d.ts +9 -0
  319. package/dist/web/base/tooltip.js +36 -0
  320. package/dist/web/form/checkbox.d.ts +35 -0
  321. package/dist/web/form/checkbox.js +91 -0
  322. package/dist/web/form/radio-group.d.ts +24 -0
  323. package/dist/web/form/radio-group.js +75 -0
  324. package/dist/web/form/select.d.ts +16 -0
  325. package/dist/web/form/select.js +44 -0
  326. package/dist/web/form/slider.d.ts +19 -0
  327. package/dist/web/form/slider.js +51 -0
  328. package/dist/web/form/switch.d.ts +11 -0
  329. package/dist/web/form/switch.js +50 -0
  330. package/dist/web/form/text-area.d.ts +10 -0
  331. package/dist/web/form/text-area.js +31 -0
  332. package/dist/web/form/text-input.d.ts +10 -0
  333. package/dist/web/form/text-input.js +42 -0
  334. package/dist/web/index.d.ts +1 -0
  335. package/dist/web/index.js +0 -0
  336. package/dist/web/layout/accordion.d.ts +26 -0
  337. package/dist/web/layout/accordion.js +29 -0
  338. package/dist/web/layout/alert-modal.d.ts +41 -0
  339. package/dist/web/layout/alert-modal.js +71 -0
  340. package/dist/web/layout/card.d.ts +17 -0
  341. package/dist/web/layout/card.js +35 -0
  342. package/dist/web/layout/description.d.ts +12 -0
  343. package/dist/web/layout/description.js +20 -0
  344. package/dist/web/layout/information.d.ts +36 -0
  345. package/dist/web/layout/information.js +53 -0
  346. package/dist/web/layout/modal.d.ts +16 -0
  347. package/dist/web/layout/modal.js +37 -0
  348. package/dist/web/layout/page-frame.d.ts +37 -0
  349. package/dist/web/layout/page-frame.js +79 -0
  350. package/dist/web/layout/scroll-area.d.ts +10 -0
  351. package/dist/web/layout/scroll-area.js +13 -0
  352. package/dist/web/layout/sheet.d.ts +32 -0
  353. package/dist/web/layout/sheet.js +68 -0
  354. package/dist/web/layout/simple-dialog.d.ts +11 -0
  355. package/dist/web/layout/simple-dialog.js +24 -0
  356. package/dist/web/layout/simple-table.d.ts +49 -0
  357. package/dist/web/layout/simple-table.js +58 -0
  358. package/dist/web/layout/tabs.d.ts +26 -0
  359. package/dist/web/layout/tabs.js +42 -0
  360. package/dist/web/layout/titled-modal.d.ts +32 -0
  361. package/dist/web/layout/titled-modal.js +58 -0
  362. package/dist/web/lib/css-vars.d.ts +14 -0
  363. package/dist/web/lib/css-vars.js +18 -0
  364. package/dist/web/lib/dialog.d.ts +13 -0
  365. package/dist/web/lib/dialog.js +0 -0
  366. package/dist/web/lib/form.d.ts +2 -0
  367. package/dist/web/lib/form.js +3 -0
  368. package/dist/web/lib/labels.d.ts +27 -0
  369. package/dist/web/lib/labels.js +29 -0
  370. package/dist/web/lib/modal-open-focus.d.ts +17 -0
  371. package/dist/web/lib/modal-open-focus.js +44 -0
  372. package/dist/web/lib/restore-focus.d.ts +12 -0
  373. package/dist/web/lib/restore-focus.js +32 -0
  374. package/dist/web/lib/utils.d.ts +4 -0
  375. package/dist/web/lib/utils.js +10 -0
  376. package/dist/web/styles.css +162 -0
  377. package/package.json +203 -4
@@ -0,0 +1,93 @@
1
+ import { useTokenColor } from "../lib/token-color.js";
2
+ import { Text as Text$1 } from "../base/text.js";
3
+ import { CLOSE_LABEL } from "../lib/labels.js";
4
+ import { useId } from "react";
5
+ import { Modal as Modal$1, Pressable, ScrollView, StyleSheet, View } from "react-native";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import Feather from "@expo/vector-icons/Feather";
8
+
9
+ //#region src/native/layout/modal.tsx
10
+ /**
11
+ * A confirmation/editing dialog shown at the center of the screen. Corresponds to the web `layout/modal`.
12
+ * The shell is an overlay surface (surface radius, shadow-lg; no border), and only the body scrolls.
13
+ *
14
+ * The heading is the dialog's name (`aria-labelledby`), and the supplementary text is its description (`aria-describedby`).
15
+ * The role (`role="dialog"`, `aria-modal`), focus trapping, and Esc are handled by `Modal`.
16
+ * The web `layout/modal` takes open/close through `dialog` (`DialogController`), whereas native uses `open` / `onOpenChange`.
17
+ */
18
+ function Modal({ open, onOpenChange, title, description, content, footer, dismissOnBackdropPress = false, closeLabel = CLOSE_LABEL }) {
19
+ const ink = useTokenColor("--ink-500");
20
+ const id = useId();
21
+ const titleId = `${id}-title`;
22
+ const descriptionId = `${id}-description`;
23
+ return /* @__PURE__ */ jsx(Modal$1, {
24
+ visible: open,
25
+ transparent: true,
26
+ animationType: "fade",
27
+ onRequestClose: () => onOpenChange(false),
28
+ "aria-labelledby": titleId,
29
+ "aria-describedby": description ? descriptionId : void 0,
30
+ children: /* @__PURE__ */ jsxs(View, {
31
+ style: { flex: 1 },
32
+ children: [/* @__PURE__ */ jsx(Pressable, {
33
+ accessible: false,
34
+ style: StyleSheet.absoluteFill,
35
+ className: "bg-scrim",
36
+ onPress: dismissOnBackdropPress ? () => onOpenChange(false) : void 0
37
+ }), /* @__PURE__ */ jsx(View, {
38
+ pointerEvents: "box-none",
39
+ className: "flex-1 items-center justify-center p-6",
40
+ children: /* @__PURE__ */ jsx(View, {
41
+ className: "max-h-[80%] w-full rounded-surface bg-popover shadow-lg",
42
+ children: /* @__PURE__ */ jsxs(View, {
43
+ className: "shrink overflow-hidden rounded-surface",
44
+ children: [
45
+ /* @__PURE__ */ jsxs(View, {
46
+ className: "flex-row items-start justify-between gap-2 border-b border-line px-4 py-3",
47
+ children: [/* @__PURE__ */ jsxs(View, {
48
+ className: "shrink gap-1",
49
+ children: [/* @__PURE__ */ jsx(Text$1, {
50
+ id: titleId,
51
+ role: "heading",
52
+ "aria-level": "2",
53
+ className: "text-base leading-6 font-semibold",
54
+ children: title
55
+ }), description ? /* @__PURE__ */ jsx(Text$1, {
56
+ id: descriptionId,
57
+ className: "text-muted-foreground text-[13px] leading-5",
58
+ children: description
59
+ }) : null]
60
+ }), /* @__PURE__ */ jsx(Pressable, {
61
+ accessibilityRole: "button",
62
+ accessibilityLabel: closeLabel,
63
+ hitSlop: 12,
64
+ onPress: () => onOpenChange(false),
65
+ children: /* @__PURE__ */ jsx(Feather, {
66
+ name: "x",
67
+ size: 16,
68
+ color: ink
69
+ })
70
+ })]
71
+ }),
72
+ /* @__PURE__ */ jsx(ScrollView, {
73
+ style: { flexShrink: 1 },
74
+ contentContainerStyle: {
75
+ gap: 16,
76
+ padding: 16
77
+ },
78
+ children: content
79
+ }),
80
+ footer ? /* @__PURE__ */ jsx(View, {
81
+ className: "flex-row justify-end gap-2 border-t border-line px-4 py-3",
82
+ children: footer
83
+ }) : null
84
+ ]
85
+ })
86
+ })
87
+ })]
88
+ })
89
+ });
90
+ }
91
+
92
+ //#endregion
93
+ export { Modal };
@@ -0,0 +1,17 @@
1
+ //#region src/native/layout/not-found.d.ts
2
+ export type NotFoundProps = {
3
+ /** Display text. This is a shared package, so the caller owns it. */
4
+ labels: {
5
+ title: string;
6
+ back: string;
7
+ };
8
+ onBack: () => void;
9
+ };
10
+ /**
11
+ * The screen shown when something is not found.
12
+ *
13
+ * Web calls `history.back()` with `action="previous-page"`, but native's back destination
14
+ * depends on the navigation stack, so it receives `onBack` (`router.back()`, etc.) from the caller.
15
+ */
16
+ export declare function NotFound({ labels, onBack }: NotFoundProps): import("react").JSX.Element;
17
+ //#endregion
@@ -0,0 +1,30 @@
1
+ import { Text as Text$1 } from "../base/text.js";
2
+ import { Button } from "../atom/button.js";
3
+ import { View } from "react-native";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/native/layout/not-found.tsx
7
+ /**
8
+ * The screen shown when something is not found.
9
+ *
10
+ * Web calls `history.back()` with `action="previous-page"`, but native's back destination
11
+ * depends on the navigation stack, so it receives `onBack` (`router.back()`, etc.) from the caller.
12
+ */
13
+ function NotFound({ labels, onBack }) {
14
+ return /* @__PURE__ */ jsxs(View, {
15
+ className: "h-full w-full items-center justify-center gap-4 p-6",
16
+ children: [/* @__PURE__ */ jsx(Text$1, {
17
+ className: "text-base font-semibold",
18
+ children: labels.title
19
+ }), /* @__PURE__ */ jsx(Button, {
20
+ className: "self-center",
21
+ variant: "outline",
22
+ size: "sm",
23
+ onPress: onBack,
24
+ children: labels.back
25
+ })]
26
+ });
27
+ }
28
+
29
+ //#endregion
30
+ export { NotFound };
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/native/layout/page-frame.d.ts
3
+ export type PageFrameProps = {
4
+ /** Header heading (the screen title; `role="heading"` `aria-level=1`). */
5
+ title: string;
6
+ /** Right end of the header (buttons such as back, settings, user). */
7
+ trailing?: ReactNode;
8
+ children: ReactNode;
9
+ /** Footer below the body (copyright, links, etc.). */
10
+ footer?: ReactNode;
11
+ /** Navigation pinned at the bottom (`layout/tab-bar`). The body scrolls above it. */
12
+ nav?: ReactNode;
13
+ /** Extra classes for the body (the scrolling area). */
14
+ contentClassName?: string;
15
+ className?: string;
16
+ };
17
+ /**
18
+ * The screen skeleton. Corresponds to `@lt-three/love3/web/layout/page-frame.tsx` (header, main, footer, nav).
19
+ * A header (banner) at the top, a scrolling body (main) in the middle, a footer (contentinfo) below it, and navigation (`TabBar`) at the very bottom.
20
+ * The top and bottom safe areas are the app's responsibility (an outer `SafeAreaView`, or `pt-*` in `className`).
21
+ */
22
+ export declare function PageFrame({ title, trailing, children, footer, nav, contentClassName, className }: PageFrameProps): import("react").JSX.Element;
23
+ //#endregion
@@ -0,0 +1,46 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Text as Text$1 } from "../base/text.js";
3
+ import { ScrollView, View } from "react-native";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/native/layout/page-frame.tsx
7
+ /**
8
+ * The screen skeleton. Corresponds to `@lt-three/love3/web/layout/page-frame.tsx` (header, main, footer, nav).
9
+ * A header (banner) at the top, a scrolling body (main) in the middle, a footer (contentinfo) below it, and navigation (`TabBar`) at the very bottom.
10
+ * The top and bottom safe areas are the app's responsibility (an outer `SafeAreaView`, or `pt-*` in `className`).
11
+ */
12
+ function PageFrame({ title, trailing, children, footer, nav, contentClassName, className }) {
13
+ return /* @__PURE__ */ jsxs(View, {
14
+ className: cn("bg-background flex-1", className),
15
+ children: [
16
+ /* @__PURE__ */ jsxs(View, {
17
+ role: "banner",
18
+ className: "border-line flex-row items-center justify-between gap-2 border-b px-4 py-3",
19
+ children: [/* @__PURE__ */ jsx(Text$1, {
20
+ role: "heading",
21
+ "aria-level": "1",
22
+ numberOfLines: 2,
23
+ className: "shrink text-lg font-semibold",
24
+ children: title
25
+ }), trailing]
26
+ }),
27
+ /* @__PURE__ */ jsxs(ScrollView, {
28
+ className: "flex-1",
29
+ contentContainerClassName: "gap-4 p-4",
30
+ children: [/* @__PURE__ */ jsx(View, {
31
+ role: "main",
32
+ className: cn("gap-4", contentClassName),
33
+ children
34
+ }), footer ? /* @__PURE__ */ jsx(View, {
35
+ role: "contentinfo",
36
+ className: "border-line border-t pt-4",
37
+ children: footer
38
+ }) : null]
39
+ }),
40
+ nav
41
+ ]
42
+ });
43
+ }
44
+
45
+ //#endregion
46
+ export { PageFrame };
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from "react";
2
+ import { ViewStyle } from "react-native";
3
+ //#region src/native/layout/panel.d.ts
4
+ export type PanelProps = {
5
+ children: ReactNode;
6
+ className?: string;
7
+ style?: ViewStyle;
8
+ };
9
+ /**
10
+ * A content surface. Same shell as the web Card (surface radius, a very faint 1px rule, raised surface; no shadow).
11
+ * The inner padding is up to the caller.
12
+ *
13
+ * The rule uses `border-line` rather than `border-border`. `--border` is declared only once
14
+ * in the stylesheet, so react-native-css folds it into a single value at build time
15
+ * and it no longer switches under `.dark`.
16
+ */
17
+ export declare function Panel({ children, className, style }: PanelProps): import("react").JSX.Element;
18
+ //#endregion
@@ -0,0 +1,23 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { View } from "react-native";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/native/layout/panel.tsx
6
+ /**
7
+ * A content surface. Same shell as the web Card (surface radius, a very faint 1px rule, raised surface; no shadow).
8
+ * The inner padding is up to the caller.
9
+ *
10
+ * The rule uses `border-line` rather than `border-border`. `--border` is declared only once
11
+ * in the stylesheet, so react-native-css folds it into a single value at build time
12
+ * and it no longer switches under `.dark`.
13
+ */
14
+ function Panel({ children, className, style }) {
15
+ return /* @__PURE__ */ jsx(View, {
16
+ className: cn("overflow-hidden rounded-surface border border-line bg-card", className),
17
+ style,
18
+ children
19
+ });
20
+ }
21
+
22
+ //#endregion
23
+ export { Panel };
@@ -0,0 +1,42 @@
1
+ import { ReactElement, ReactNode } from "react";
2
+ //#region src/native/layout/reorderable-list.d.ts
3
+ export type ReorderableRenderInfo<T> = {
4
+ item: T;
5
+ index: number;
6
+ /**
7
+ * Grabs the row and starts dragging. **Pass it to the row's own `Pressable` `onLongPress`.**
8
+ * If attached to a wrapper `Pressable`, a `Pressable` inside the row (one that opens details on tap, etc.)
9
+ * takes the responder and the long press never reaches the outer one, so dragging does not start.
10
+ */
11
+ drag: () => void;
12
+ /** Whether the row is currently grabbed. Make the grabbed row look clearly different. */
13
+ active: boolean;
14
+ };
15
+ export type ReorderableListProps<T> = {
16
+ data: T[];
17
+ keyExtractor: (item: T) => string;
18
+ renderItem: (info: ReorderableRenderInfo<T>) => ReactNode;
19
+ /** Receives the reordered array. Persistence is up to the caller. */
20
+ onReorder: (next: T[]) => void;
21
+ /** While false, dragging is not accepted (for example while filtering). */
22
+ dragEnabled?: boolean;
23
+ ListHeaderComponent?: ReactElement | null;
24
+ ListFooterComponent?: ReactElement | null;
25
+ ListEmptyComponent?: ReactElement | null;
26
+ contentContainerClassName?: string;
27
+ };
28
+ /**
29
+ * A list reordered by long-press and drag. **Runs on the same implementation for iOS and Android.**
30
+ *
31
+ * SwiftUI's `List.ForEach onMove` works only on iOS, which would leave
32
+ * "reordering works everywhere except Android". This builds on Reanimated + Gesture Handler's
33
+ * `react-native-reorderable-list` so the implementation does not split by platform.
34
+ *
35
+ * **A `GestureHandlerRootView` is required at the app's root** (Android). Without it no exception is thrown,
36
+ * and dragging and swiping silently stop working.
37
+ *
38
+ * The reorder is committed by a single `onReorder` call. During a drag only the display moves internally,
39
+ * so do not hit an API with intermediate states.
40
+ */
41
+ export declare function ReorderableList<T>({ data, keyExtractor, renderItem, onReorder, dragEnabled, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, contentContainerClassName }: ReorderableListProps<T>): import("react").JSX.Element;
42
+ //#endregion
@@ -0,0 +1,52 @@
1
+ import { Fragment, jsx } from "react/jsx-runtime";
2
+ import Reorderable, { reorderItems, useIsActive, useReorderableDrag } from "react-native-reorderable-list";
3
+
4
+ //#region src/native/layout/reorderable-list.tsx
5
+ /**
6
+ * A list reordered by long-press and drag. **Runs on the same implementation for iOS and Android.**
7
+ *
8
+ * SwiftUI's `List.ForEach onMove` works only on iOS, which would leave
9
+ * "reordering works everywhere except Android". This builds on Reanimated + Gesture Handler's
10
+ * `react-native-reorderable-list` so the implementation does not split by platform.
11
+ *
12
+ * **A `GestureHandlerRootView` is required at the app's root** (Android). Without it no exception is thrown,
13
+ * and dragging and swiping silently stop working.
14
+ *
15
+ * The reorder is committed by a single `onReorder` call. During a drag only the display moves internally,
16
+ * so do not hit an API with intermediate states.
17
+ */
18
+ function ReorderableList({ data, keyExtractor, renderItem, onReorder, dragEnabled = true, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, contentContainerClassName }) {
19
+ return /* @__PURE__ */ jsx(Reorderable, {
20
+ data,
21
+ keyExtractor: (item) => keyExtractor(item),
22
+ renderItem: ({ item, index }) => /* @__PURE__ */ jsx(Cell, {
23
+ item,
24
+ index,
25
+ render: renderItem
26
+ }),
27
+ onReorder: ({ from, to }) => onReorder(reorderItems(data, from, to)),
28
+ dragEnabled,
29
+ shouldUpdateActiveItem: true,
30
+ ListHeaderComponent: ListHeaderComponent ?? void 0,
31
+ ListFooterComponent: ListFooterComponent ?? void 0,
32
+ ListEmptyComponent: ListEmptyComponent ?? void 0,
33
+ contentContainerClassName
34
+ });
35
+ }
36
+ /**
37
+ * Renders a row. `useReorderableDrag` / `useIsActive` **can only be called inside a list item**,
38
+ * so they are called here and handed to the caller.
39
+ */
40
+ function Cell({ item, index, render }) {
41
+ const drag = useReorderableDrag();
42
+ const active = useIsActive();
43
+ return /* @__PURE__ */ jsx(Fragment, { children: render({
44
+ item,
45
+ index,
46
+ drag,
47
+ active
48
+ }) });
49
+ }
50
+
51
+ //#endregion
52
+ export { ReorderableList };
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/native/layout/sheet.d.ts
3
+ export type SheetProps = {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ /** Heading. Becomes the dialog's name (required so the dialog is never nameless; same as the web `layout/sheet`). */
7
+ title: ReactNode;
8
+ description?: ReactNode;
9
+ content: ReactNode;
10
+ footer?: ReactNode;
11
+ /** Whether tapping the backdrop closes it (default true). */
12
+ dismissOnBackdropPress?: boolean;
13
+ /** Spoken name of the close button (default "閉じる", i.e. "Close"). */
14
+ closeLabel?: string;
15
+ /** Whether to pad the content (default true). Use false for row lists that run edge to edge. */
16
+ padded?: boolean;
17
+ /** Maximum height as a ratio of the screen height (default 0.85). */
18
+ maxHeightRatio?: number;
19
+ /** Called after it has fully closed. **Open the next sheet here** (see `base/sheet`). */
20
+ onClosed?: () => void;
21
+ };
22
+ /**
23
+ * A sheet that slides up from the bottom. Corresponds to the web `layout/sheet` (a panel that slides in from a screen edge).
24
+ * On native the standard convention is to slide up from the bottom rather than from an edge, so only the position is reinterpreted (there is no web `side`).
25
+ *
26
+ * How the surface appears, the scrim, safe-area, and keyboard avoidance belong to `base/sheet`.
27
+ * The heading is the dialog's name (`aria-labelledby`), and the supplementary text is its description (`aria-describedby`).
28
+ */
29
+ export declare function Sheet({ open, onOpenChange, title, description, content, footer, dismissOnBackdropPress, closeLabel, padded, maxHeightRatio, onClosed }: SheetProps): import("react").JSX.Element;
30
+ //#endregion
@@ -0,0 +1,46 @@
1
+ import { isBlankNode } from "../lib/utils.js";
2
+ import { SheetFooter, SheetHeader, SheetScroll, SheetShell } from "../base/sheet.js";
3
+ import { useId } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/native/layout/sheet.tsx
7
+ /**
8
+ * A sheet that slides up from the bottom. Corresponds to the web `layout/sheet` (a panel that slides in from a screen edge).
9
+ * On native the standard convention is to slide up from the bottom rather than from an edge, so only the position is reinterpreted (there is no web `side`).
10
+ *
11
+ * How the surface appears, the scrim, safe-area, and keyboard avoidance belong to `base/sheet`.
12
+ * The heading is the dialog's name (`aria-labelledby`), and the supplementary text is its description (`aria-describedby`).
13
+ */
14
+ function Sheet({ open, onOpenChange, title, description, content, footer, dismissOnBackdropPress = true, closeLabel, padded = true, maxHeightRatio = .85, onClosed }) {
15
+ const id = useId();
16
+ const titleId = `${id}-title`;
17
+ const descriptionId = `${id}-description`;
18
+ return /* @__PURE__ */ jsxs(SheetShell, {
19
+ open,
20
+ onOpenChange,
21
+ dismissOnBackdropPress,
22
+ maxHeightRatio,
23
+ onClosed,
24
+ "aria-labelledby": isBlankNode(title) ? void 0 : titleId,
25
+ "aria-describedby": isBlankNode(description) ? void 0 : descriptionId,
26
+ children: [
27
+ /* @__PURE__ */ jsx(SheetHeader, {
28
+ title,
29
+ description,
30
+ closeLabel,
31
+ onClose: () => onOpenChange(false),
32
+ titleId,
33
+ descriptionId
34
+ }),
35
+ /* @__PURE__ */ jsx(SheetScroll, {
36
+ padded,
37
+ hasFooter: !!footer,
38
+ children: content
39
+ }),
40
+ footer ? /* @__PURE__ */ jsx(SheetFooter, { children: footer }) : null
41
+ ]
42
+ });
43
+ }
44
+
45
+ //#endregion
46
+ export { Sheet };
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/native/layout/simple-dialog.d.ts
3
+ export type SimpleDialogProps = {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ title: ReactNode;
7
+ children: ReactNode;
8
+ /** Spoken name of the close button (default "閉じる", i.e. "Close"). */
9
+ closeLabel?: string;
10
+ };
11
+ /**
12
+ * A lightweight dialog with only a title and a body. Corresponds to the web `layout/simple-dialog`.
13
+ * Use `Modal` directly if you need a footer or a description.
14
+ */
15
+ export declare function SimpleDialog({ open, onOpenChange, title, children, closeLabel }: SimpleDialogProps): import("react").JSX.Element;
16
+ //#endregion
@@ -0,0 +1,20 @@
1
+ import { Modal } from "./modal.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/native/layout/simple-dialog.tsx
5
+ /**
6
+ * A lightweight dialog with only a title and a body. Corresponds to the web `layout/simple-dialog`.
7
+ * Use `Modal` directly if you need a footer or a description.
8
+ */
9
+ function SimpleDialog({ open, onOpenChange, title, children, closeLabel }) {
10
+ return /* @__PURE__ */ jsx(Modal, {
11
+ open,
12
+ onOpenChange,
13
+ title,
14
+ content: children,
15
+ closeLabel
16
+ });
17
+ }
18
+
19
+ //#endregion
20
+ export { SimpleDialog };
@@ -0,0 +1,50 @@
1
+ import { Breakpoint } from "../lib/breakpoints.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/native/layout/simple-table.d.ts
4
+ /**
5
+ * A declarative data table with thin rules. Just pass columns / data.
6
+ * It takes the same column definitions and the same prop names (`onRowClick`, `hideBelow`) as the web `layout/simple-table`.
7
+ *
8
+ * The header is a pale frame surface, and row rules are very faint 1px lines.
9
+ * Numeric columns use mono + tabular + right alignment.
10
+ */
11
+ export type SimpleColumn<T> = {
12
+ /** Column key (unique within a row). */
13
+ key: string;
14
+ header: ReactNode;
15
+ /** Alignment of cells / header (default left). */
16
+ align?: "left" | "right" | "center";
17
+ /** Monospace + tabular (for numbers and IDs). */
18
+ mono?: boolean;
19
+ /** Emphasis (font-medium). */
20
+ strong?: boolean;
21
+ /**
22
+ * Hides the whole column when narrower than this width (same breakpoints as Tailwind: sm 640, md 768, lg 1024 px; judged by the **screen width**).
23
+ * Collapses unimportant columns (ID, notes, etc.) on narrow screens (same as web's `hideBelow`). Always shown when unspecified.
24
+ */
25
+ hideBelow?: Breakpoint;
26
+ /** Column width (px). Divided equally when omitted. */
27
+ width?: number;
28
+ /** Extra classes for the cell (View). */
29
+ cellClassName?: string;
30
+ /** Extra classes for the header cell (View). */
31
+ headClassName?: string;
32
+ /** Renders the cell. Shows row[key] when unspecified. */
33
+ render?: (row: T) => ReactNode;
34
+ };
35
+ export type SimpleTableProps<T> = {
36
+ columns: SimpleColumn<T>[];
37
+ data: T[];
38
+ /** Derives the row key. Uses the index when unspecified. */
39
+ getRowKey?: (row: T, index: number) => string;
40
+ /**
41
+ * Pressing a row (same name as web's `onRowClick`). When passed, each row becomes a button (focusable, and pressable with Enter and Space),
42
+ * and focus is shown with an opaque outline.
43
+ */
44
+ onRowClick?: (row: T) => void;
45
+ className?: string;
46
+ /** Scrolls horizontally when the columns do not fit the screen width. */
47
+ horizontalScroll?: boolean;
48
+ };
49
+ export declare function SimpleTable<T extends object>({ columns: allColumns, data, getRowKey, onRowClick, className, horizontalScroll }: SimpleTableProps<T>): import("react").JSX.Element;
50
+ //#endregion
@@ -0,0 +1,75 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { Text as Text$1 } from "../base/text.js";
3
+ import { tabularNums } from "../lib/typography.js";
4
+ import { isShownAtWidth } from "../lib/breakpoints.js";
5
+ import { isValidElement } from "react";
6
+ import { Pressable, ScrollView, View, useWindowDimensions } from "react-native";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+
9
+ //#region src/native/layout/simple-table.tsx
10
+ const alignClass = {
11
+ left: "text-left",
12
+ right: "text-right",
13
+ center: "text-center"
14
+ };
15
+ const justifyClass = {
16
+ left: "justify-start",
17
+ right: "justify-end",
18
+ center: "justify-center"
19
+ };
20
+ /** Default rendering for a column without `render`. Shows the row's `key` value only when it is text, a number, or an element. */
21
+ function cellValue(row, key) {
22
+ const value = Reflect.get(row, key);
23
+ if (typeof value === "string" || typeof value === "number" || isValidElement(value)) return value;
24
+ return null;
25
+ }
26
+ function SimpleTable({ columns: allColumns, data, getRowKey, onRowClick, className, horizontalScroll }) {
27
+ const { width: screenWidth } = useWindowDimensions();
28
+ const columns = allColumns.filter((col) => isShownAtWidth(col.hideBelow, screenWidth));
29
+ const table = /* @__PURE__ */ jsxs(View, {
30
+ className: cn(!horizontalScroll && "w-full", className),
31
+ children: [/* @__PURE__ */ jsx(View, {
32
+ className: "flex-row border-b border-line bg-frame",
33
+ children: columns.map((col) => /* @__PURE__ */ jsx(View, {
34
+ style: col.width ? { width: col.width } : void 0,
35
+ className: cn("px-2 py-2", !col.width && "flex-1", justifyClass[col.align ?? "left"], col.headClassName),
36
+ children: typeof col.header === "string" || typeof col.header === "number" ? /* @__PURE__ */ jsx(Text$1, {
37
+ className: cn("text-muted-foreground text-xs font-medium", alignClass[col.align ?? "left"]),
38
+ children: col.header
39
+ }) : col.header
40
+ }, col.key))
41
+ }), data.map((row, index) => {
42
+ const content = /* @__PURE__ */ jsx(View, {
43
+ className: "flex-row border-b border-line",
44
+ children: columns.map((col) => {
45
+ const cell = col.render ? col.render(row) : cellValue(row, col.key);
46
+ return /* @__PURE__ */ jsx(View, {
47
+ style: col.width ? { width: col.width } : void 0,
48
+ className: cn("px-2 py-2.5", !col.width && "flex-1", justifyClass[col.align ?? "left"], col.cellClassName),
49
+ children: typeof cell === "string" || typeof cell === "number" ? /* @__PURE__ */ jsx(Text$1, {
50
+ style: col.mono ? tabularNums : void 0,
51
+ className: cn("text-sm", alignClass[col.align ?? "left"], col.mono && "font-mono", col.strong && "text-foreground font-medium"),
52
+ children: cell
53
+ }) : cell
54
+ }, col.key);
55
+ })
56
+ });
57
+ const key = getRowKey ? getRowKey(row, index) : String(index);
58
+ return onRowClick ? /* @__PURE__ */ jsx(Pressable, {
59
+ accessibilityRole: "button",
60
+ onPress: () => onRowClick(row),
61
+ className: "focus:outline-ring focus:outline-2 focus:-outline-offset-2",
62
+ children: content
63
+ }, key) : /* @__PURE__ */ jsx(View, { children: content }, key);
64
+ })]
65
+ });
66
+ if (!horizontalScroll) return table;
67
+ return /* @__PURE__ */ jsx(ScrollView, {
68
+ horizontal: true,
69
+ showsHorizontalScrollIndicator: false,
70
+ children: table
71
+ });
72
+ }
73
+
74
+ //#endregion
75
+ export { SimpleTable };
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/native/layout/tab-bar.d.ts
3
+ export type TabBarItem = {
4
+ /** Selection value (unique). */
5
+ value: string;
6
+ /** Text label. Never use an icon alone (for the spoken name and clarity). */
7
+ label: string;
8
+ /**
9
+ * Icon. It receives the color (`color`) matching the selection state, for use as `Symbol`'s `tintColor` and the like.
10
+ * Omit it if text alone is enough.
11
+ */
12
+ icon?: (state: {
13
+ active: boolean;
14
+ color: string;
15
+ }) => ReactNode;
16
+ };
17
+ export type TabBarProps = {
18
+ items: readonly TabBarItem[];
19
+ /** The selected value. */
20
+ value: string;
21
+ onValueChange: (value: string) => void;
22
+ /** Spoken name (distinguishes landmarks when there are several). Defaults to "メイン" ("Main"). */
23
+ accessibilityLabel?: string;
24
+ className?: string;
25
+ };
26
+ /**
27
+ * Switcher for top-level destinations placed at the bottom of the screen (3 to 5 items). Distinct from `layout/tabs` (underlined tabs that switch the body).
28
+ * The selected item uses `text-action-ink` (AA even on dark surfaces), and the selected state is shown by weight (`font-semibold`) as well as color.
29
+ * Each item's press target is at least 56px tall (above the 44pt real-device guideline). **The bottom safe area (home indicator) is the app's responsibility**
30
+ * (pass `pb-*` in `className`, or place it inside an outer `SafeAreaView`).
31
+ */
32
+ export declare function TabBar({ items, value, onValueChange, accessibilityLabel, className }: TabBarProps): import("react").JSX.Element;
33
+ //#endregion