@krizaka/ui 2.2.0 → 2.4.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 (498) hide show
  1. package/README.md +33 -8
  2. package/dist/audio-player.d.ts +113 -0
  3. package/dist/audio-player.js +207 -0
  4. package/dist/audio-player.js.map +1 -0
  5. package/dist/{button-Cgfkg_3y.d.ts → button-BMAO7dKF.d.ts} +29 -2
  6. package/dist/button.d.ts +32 -5
  7. package/dist/button.js +62 -9
  8. package/dist/button.js.map +1 -1
  9. package/dist/chip-link.d.ts +53 -0
  10. package/dist/chip-link.js +32 -0
  11. package/dist/chip-link.js.map +1 -0
  12. package/dist/chunk-2USC2YT6.js +17 -0
  13. package/dist/chunk-2USC2YT6.js.map +1 -0
  14. package/dist/chunk-43PTCDTL.js +31 -0
  15. package/dist/chunk-43PTCDTL.js.map +1 -0
  16. package/dist/chunk-6ISW63JI.js +11 -0
  17. package/dist/chunk-6ISW63JI.js.map +1 -0
  18. package/dist/chunk-EUPTXKH7.js +95 -0
  19. package/dist/chunk-EUPTXKH7.js.map +1 -0
  20. package/dist/chunk-HAQWKORZ.js +117 -0
  21. package/dist/chunk-HAQWKORZ.js.map +1 -0
  22. package/dist/{chunk-FHYZSO2S.js → chunk-R6SDS7JM.js} +5 -3
  23. package/dist/chunk-R6SDS7JM.js.map +1 -0
  24. package/dist/chunk-RUPNPMP3.js +103 -0
  25. package/dist/chunk-RUPNPMP3.js.map +1 -0
  26. package/dist/chunk-RUPRYJ45.js +82 -0
  27. package/dist/chunk-RUPRYJ45.js.map +1 -0
  28. package/dist/chunk-VDR2EP6K.js +49 -0
  29. package/dist/chunk-VDR2EP6K.js.map +1 -0
  30. package/dist/chunk-WEVYKZIF.js +33 -0
  31. package/dist/chunk-WEVYKZIF.js.map +1 -0
  32. package/dist/chunk-XUMJA5ZI.js +283 -0
  33. package/dist/chunk-XUMJA5ZI.js.map +1 -0
  34. package/dist/chunk-YH4LMWRU.js +92 -0
  35. package/dist/chunk-YH4LMWRU.js.map +1 -0
  36. package/dist/chunk-YX6CNVJA.js +94 -0
  37. package/dist/chunk-YX6CNVJA.js.map +1 -0
  38. package/dist/chunk-ZIXB33X7.js +95 -0
  39. package/dist/chunk-ZIXB33X7.js.map +1 -0
  40. package/dist/combobox.d.ts +188 -0
  41. package/dist/combobox.js +16 -0
  42. package/dist/combobox.js.map +1 -0
  43. package/dist/command.d.ts +7 -7
  44. package/dist/command.js +3 -2
  45. package/dist/command.js.map +1 -1
  46. package/dist/confirm-button.d.ts +1 -1
  47. package/dist/confirm-button.js +2 -1
  48. package/dist/confirm-button.js.map +1 -1
  49. package/dist/data-table.d.ts +246 -0
  50. package/dist/data-table.js +290 -0
  51. package/dist/data-table.js.map +1 -0
  52. package/dist/date-picker.d.ts +288 -0
  53. package/dist/date-picker.js +364 -0
  54. package/dist/date-picker.js.map +1 -0
  55. package/dist/{dialog-GQ4Nvuyf.d.ts → dialog-D42QwYb_.d.ts} +11 -1
  56. package/dist/dialog.d.ts +1 -1
  57. package/dist/dialog.js +3 -2
  58. package/dist/dialog.js.map +1 -1
  59. package/dist/file-upload.d.ts +238 -0
  60. package/dist/file-upload.js +437 -0
  61. package/dist/file-upload.js.map +1 -0
  62. package/dist/filter-bar.d.ts +139 -0
  63. package/dist/filter-bar.js +155 -0
  64. package/dist/filter-bar.js.map +1 -0
  65. package/dist/glow-card.d.ts +20 -0
  66. package/dist/glow-card.js +30 -0
  67. package/dist/glow-card.js.map +1 -0
  68. package/dist/image-cropper.d.ts +115 -0
  69. package/dist/image-cropper.js +166 -0
  70. package/dist/image-cropper.js.map +1 -0
  71. package/dist/index.d.ts +2 -20
  72. package/dist/index.js +7 -64
  73. package/dist/index.js.map +1 -1
  74. package/dist/iso.d.ts +400 -0
  75. package/dist/iso.js +363 -0
  76. package/dist/iso.js.map +1 -0
  77. package/dist/loader.d.ts +206 -0
  78. package/dist/loader.js +138 -0
  79. package/dist/loader.js.map +1 -0
  80. package/dist/marquee.d.ts +33 -0
  81. package/dist/marquee.js +52 -0
  82. package/dist/marquee.js.map +1 -0
  83. package/dist/media-capture.d.ts +155 -0
  84. package/dist/media-capture.js +242 -0
  85. package/dist/media-capture.js.map +1 -0
  86. package/dist/meter.d.ts +146 -0
  87. package/dist/meter.js +107 -0
  88. package/dist/meter.js.map +1 -0
  89. package/dist/motion.css +394 -3
  90. package/dist/motion.d.ts +46 -0
  91. package/dist/motion.js +10 -0
  92. package/dist/motion.js.map +1 -0
  93. package/dist/native/media-capture.d.ts +49 -0
  94. package/dist/native/media-capture.js +113 -0
  95. package/dist/native/media-capture.js.map +1 -0
  96. package/dist/native/video-player.d.ts +50 -0
  97. package/dist/native/video-player.js +69 -0
  98. package/dist/native/video-player.js.map +1 -0
  99. package/dist/native.d.ts +66 -2
  100. package/dist/native.js +166 -68
  101. package/dist/native.js.map +1 -1
  102. package/dist/nav-bar.d.ts +178 -0
  103. package/dist/nav-bar.js +157 -0
  104. package/dist/nav-bar.js.map +1 -0
  105. package/dist/number-ticker.d.ts +32 -0
  106. package/dist/number-ticker.js +61 -0
  107. package/dist/number-ticker.js.map +1 -0
  108. package/dist/pagination.d.ts +141 -0
  109. package/dist/pagination.js +165 -0
  110. package/dist/pagination.js.map +1 -0
  111. package/dist/progress.d.ts +56 -1
  112. package/dist/progress.js +72 -25
  113. package/dist/progress.js.map +1 -1
  114. package/dist/search-field.d.ts +100 -0
  115. package/dist/search-field.js +167 -0
  116. package/dist/search-field.js.map +1 -0
  117. package/dist/skeleton.d.ts +18 -3
  118. package/dist/skeleton.js +9 -1
  119. package/dist/skeleton.js.map +1 -1
  120. package/dist/spinner.d.ts +21 -5
  121. package/dist/spinner.js +13 -12
  122. package/dist/spinner.js.map +1 -1
  123. package/dist/stepper.d.ts +112 -0
  124. package/dist/stepper.js +67 -0
  125. package/dist/stepper.js.map +1 -0
  126. package/dist/tabs.d.ts +1 -1
  127. package/dist/tabs.js +14 -8
  128. package/dist/tabs.js.map +1 -1
  129. package/dist/tag-input.d.ts +44 -0
  130. package/dist/tag-input.js +67 -0
  131. package/dist/tag-input.js.map +1 -0
  132. package/dist/theme.d.ts +1 -1
  133. package/dist/theme.js +2 -1
  134. package/dist/theme.js.map +1 -1
  135. package/dist/toast.d.ts +39 -4
  136. package/dist/toast.js +81 -7
  137. package/dist/toast.js.map +1 -1
  138. package/dist/video-player.d.ts +204 -0
  139. package/dist/video-player.js +371 -0
  140. package/dist/video-player.js.map +1 -0
  141. package/dist/video-trimmer.d.ts +142 -0
  142. package/dist/video-trimmer.js +193 -0
  143. package/dist/video-trimmer.js.map +1 -0
  144. package/package.json +375 -7
  145. package/registry/alert.json +1 -1
  146. package/registry/audio-player.json +282 -0
  147. package/registry/avatar.json +1 -1
  148. package/registry/badge.json +1 -1
  149. package/registry/button.json +232 -26
  150. package/registry/card.json +1 -1
  151. package/registry/checkbox.json +1 -1
  152. package/registry/chip-link.json +158 -0
  153. package/registry/chip.json +1 -1
  154. package/registry/combobox.json +475 -0
  155. package/registry/command.json +1 -1
  156. package/registry/confirm-button.json +91 -7
  157. package/registry/countdown.json +1 -1
  158. package/registry/data-table.json +500 -0
  159. package/registry/date-picker.json +978 -0
  160. package/registry/dialog.json +15 -7
  161. package/registry/dropdown-menu.json +1 -1
  162. package/registry/empty-state.json +1 -1
  163. package/registry/examples/audio-player/podcast.js +22 -0
  164. package/registry/examples/audio-player/podcast.tsx +19 -0
  165. package/registry/examples/audio-player/voice-note.d.ts +4 -0
  166. package/registry/examples/audio-player/voice-note.js +12 -0
  167. package/registry/examples/audio-player/voice-note.tsx +12 -0
  168. package/registry/examples/button/error.d.ts +4 -0
  169. package/registry/examples/button/error.js +11 -0
  170. package/registry/examples/button/error.tsx +10 -0
  171. package/registry/examples/button/loading.tsx +1 -1
  172. package/registry/examples/button/save-flow.d.ts +4 -0
  173. package/registry/examples/button/save-flow.js +28 -0
  174. package/registry/examples/button/save-flow.tsx +24 -0
  175. package/registry/examples/button/signature.d.ts +4 -0
  176. package/registry/examples/button/signature.js +17 -0
  177. package/registry/examples/button/signature.tsx +19 -0
  178. package/registry/examples/button/upload-progress.d.ts +4 -0
  179. package/registry/examples/button/upload-progress.js +23 -0
  180. package/registry/examples/button/upload-progress.tsx +26 -0
  181. package/registry/examples/chip-link/filters.d.ts +4 -0
  182. package/registry/examples/chip-link/filters.js +12 -0
  183. package/registry/examples/chip-link/filters.tsx +17 -0
  184. package/registry/examples/combobox/async.d.ts +4 -0
  185. package/registry/examples/combobox/async.js +23 -0
  186. package/registry/examples/combobox/async.tsx +22 -0
  187. package/registry/examples/combobox/creatable.d.ts +4 -0
  188. package/registry/examples/combobox/creatable.js +32 -0
  189. package/registry/examples/combobox/creatable.tsx +28 -0
  190. package/registry/examples/combobox/invalid.d.ts +4 -0
  191. package/registry/examples/combobox/invalid.js +23 -0
  192. package/registry/examples/combobox/invalid.tsx +17 -0
  193. package/registry/examples/combobox/multiple.d.ts +4 -0
  194. package/registry/examples/combobox/multiple.js +29 -0
  195. package/registry/examples/combobox/multiple.tsx +26 -0
  196. package/registry/examples/data-table/cards.d.ts +4 -0
  197. package/registry/examples/data-table/cards.js +21 -0
  198. package/registry/examples/data-table/cards.tsx +20 -0
  199. package/registry/examples/data-table/empty.d.ts +4 -0
  200. package/registry/examples/data-table/empty.js +26 -0
  201. package/registry/examples/data-table/empty.tsx +21 -0
  202. package/registry/examples/data-table/error.d.ts +4 -0
  203. package/registry/examples/data-table/error.js +28 -0
  204. package/registry/examples/data-table/error.tsx +29 -0
  205. package/registry/examples/data-table/jobs.d.ts +4 -0
  206. package/registry/examples/data-table/jobs.js +37 -0
  207. package/registry/examples/data-table/jobs.tsx +36 -0
  208. package/registry/examples/data-table/loading.d.ts +4 -0
  209. package/registry/examples/data-table/loading.js +16 -0
  210. package/registry/examples/data-table/loading.tsx +12 -0
  211. package/registry/examples/data-table/virtualized.d.ts +4 -0
  212. package/registry/examples/data-table/virtualized.js +21 -0
  213. package/registry/examples/data-table/virtualized.tsx +20 -0
  214. package/registry/examples/date-picker/calendar.d.ts +4 -0
  215. package/registry/examples/date-picker/calendar.js +14 -0
  216. package/registry/examples/date-picker/calendar.tsx +16 -0
  217. package/registry/examples/date-picker/french.d.ts +4 -0
  218. package/registry/examples/date-picker/french.js +20 -0
  219. package/registry/examples/date-picker/french.tsx +14 -0
  220. package/registry/examples/date-picker/open.d.ts +4 -0
  221. package/registry/examples/date-picker/open.js +11 -0
  222. package/registry/examples/date-picker/open.tsx +8 -0
  223. package/registry/examples/date-picker/range.d.ts +4 -0
  224. package/registry/examples/date-picker/range.js +29 -0
  225. package/registry/examples/date-picker/range.tsx +25 -0
  226. package/registry/examples/date-picker/schedule.d.ts +4 -0
  227. package/registry/examples/date-picker/schedule.js +26 -0
  228. package/registry/examples/date-picker/schedule.tsx +22 -0
  229. package/registry/examples/dialog/left.d.ts +4 -0
  230. package/registry/examples/dialog/left.js +22 -0
  231. package/registry/examples/dialog/left.tsx +32 -0
  232. package/registry/examples/file-upload/images.d.ts +4 -0
  233. package/registry/examples/file-upload/images.js +32 -0
  234. package/registry/examples/file-upload/images.tsx +25 -0
  235. package/registry/examples/file-upload/states.d.ts +4 -0
  236. package/registry/examples/file-upload/states.js +28 -0
  237. package/registry/examples/file-upload/states.tsx +23 -0
  238. package/registry/examples/file-upload/tus.d.ts +4 -0
  239. package/registry/examples/file-upload/tus.js +23 -0
  240. package/registry/examples/file-upload/tus.tsx +26 -0
  241. package/registry/examples/file-upload/video.d.ts +4 -0
  242. package/registry/examples/file-upload/video.js +39 -0
  243. package/registry/examples/file-upload/video.tsx +36 -0
  244. package/registry/examples/filter-bar/address.d.ts +4 -0
  245. package/registry/examples/filter-bar/address.js +29 -0
  246. package/registry/examples/filter-bar/address.tsx +27 -0
  247. package/registry/examples/filter-bar/jobs.d.ts +4 -0
  248. package/registry/examples/filter-bar/jobs.js +37 -0
  249. package/registry/examples/filter-bar/jobs.tsx +37 -0
  250. package/registry/examples/filter-bar/menu.d.ts +4 -0
  251. package/registry/examples/filter-bar/menu.js +27 -0
  252. package/registry/examples/filter-bar/menu.tsx +23 -0
  253. package/registry/examples/glow-card/link-card.d.ts +4 -0
  254. package/registry/examples/glow-card/link-card.js +14 -0
  255. package/registry/examples/glow-card/link-card.tsx +13 -0
  256. package/registry/examples/glow-card/plans.d.ts +4 -0
  257. package/registry/examples/glow-card/plans.js +25 -0
  258. package/registry/examples/glow-card/plans.tsx +26 -0
  259. package/registry/examples/glow-card/spotlight.d.ts +4 -0
  260. package/registry/examples/glow-card/spotlight.js +14 -0
  261. package/registry/examples/glow-card/spotlight.tsx +15 -0
  262. package/registry/examples/image-cropper/avatar.d.ts +4 -0
  263. package/registry/examples/image-cropper/avatar.js +13 -0
  264. package/registry/examples/image-cropper/avatar.tsx +14 -0
  265. package/registry/examples/image-cropper/banner.d.ts +4 -0
  266. package/registry/examples/image-cropper/banner.js +11 -0
  267. package/registry/examples/image-cropper/banner.tsx +10 -0
  268. package/registry/examples/image-cropper/vertical-video.d.ts +4 -0
  269. package/registry/examples/image-cropper/vertical-video.js +12 -0
  270. package/registry/examples/image-cropper/vertical-video.tsx +16 -0
  271. package/registry/examples/iso/compose.d.ts +4 -0
  272. package/registry/examples/iso/compose.js +22 -0
  273. package/registry/examples/iso/compose.tsx +19 -0
  274. package/registry/examples/iso/orazaka-hero.d.ts +4 -0
  275. package/registry/examples/iso/orazaka-hero.js +26 -0
  276. package/registry/examples/iso/orazaka-hero.tsx +21 -0
  277. package/registry/examples/iso/orochia-hero.d.ts +4 -0
  278. package/registry/examples/iso/orochia-hero.js +29 -0
  279. package/registry/examples/iso/orochia-hero.tsx +23 -0
  280. package/registry/examples/iso/still.d.ts +4 -0
  281. package/registry/examples/iso/still.js +21 -0
  282. package/registry/examples/iso/still.tsx +15 -0
  283. package/registry/examples/loader/endings.d.ts +4 -0
  284. package/registry/examples/loader/endings.js +14 -0
  285. package/registry/examples/loader/endings.tsx +11 -0
  286. package/registry/examples/loader/fetch-flow.d.ts +4 -0
  287. package/registry/examples/loader/fetch-flow.js +24 -0
  288. package/registry/examples/loader/fetch-flow.tsx +24 -0
  289. package/registry/examples/loader/minimal.d.ts +4 -0
  290. package/registry/examples/loader/minimal.js +11 -0
  291. package/registry/examples/loader/minimal.tsx +6 -0
  292. package/registry/examples/loader/overlay.d.ts +4 -0
  293. package/registry/examples/loader/overlay.js +16 -0
  294. package/registry/examples/loader/overlay.tsx +13 -0
  295. package/registry/examples/loader/region-handover.d.ts +4 -0
  296. package/registry/examples/loader/region-handover.js +42 -0
  297. package/registry/examples/loader/region-handover.tsx +29 -0
  298. package/registry/examples/loader/upload-eta.d.ts +4 -0
  299. package/registry/examples/loader/upload-eta.js +11 -0
  300. package/registry/examples/loader/upload-eta.tsx +10 -0
  301. package/registry/examples/marquee/cards.d.ts +4 -0
  302. package/registry/examples/marquee/cards.js +23 -0
  303. package/registry/examples/marquee/cards.tsx +21 -0
  304. package/registry/examples/marquee/logos.d.ts +4 -0
  305. package/registry/examples/marquee/logos.js +12 -0
  306. package/registry/examples/marquee/logos.tsx +17 -0
  307. package/registry/examples/media-capture/clip.d.ts +4 -0
  308. package/registry/examples/media-capture/clip.js +20 -0
  309. package/registry/examples/media-capture/clip.tsx +18 -0
  310. package/registry/examples/media-capture/native/photo.d.ts +4 -0
  311. package/registry/examples/media-capture/native/photo.dark.png +0 -0
  312. package/registry/examples/media-capture/native/photo.js +27 -0
  313. package/registry/examples/media-capture/native/photo.light.png +0 -0
  314. package/registry/examples/media-capture/native/photo.tsx +20 -0
  315. package/registry/examples/media-capture/profile-photo.d.ts +4 -0
  316. package/registry/examples/media-capture/profile-photo.js +24 -0
  317. package/registry/examples/media-capture/profile-photo.tsx +20 -0
  318. package/registry/examples/meter/balance.d.ts +4 -0
  319. package/registry/examples/meter/balance.js +14 -0
  320. package/registry/examples/meter/balance.tsx +15 -0
  321. package/registry/examples/meter/quota.d.ts +4 -0
  322. package/registry/examples/meter/quota.js +15 -0
  323. package/registry/examples/meter/quota.tsx +12 -0
  324. package/registry/examples/meter/split.d.ts +4 -0
  325. package/registry/examples/meter/split.js +18 -0
  326. package/registry/examples/meter/split.tsx +18 -0
  327. package/registry/examples/nav-bar/app-bar.d.ts +4 -0
  328. package/registry/examples/nav-bar/app-bar.js +22 -0
  329. package/registry/examples/nav-bar/app-bar.tsx +21 -0
  330. package/registry/examples/nav-bar/menu-open.d.ts +4 -0
  331. package/registry/examples/nav-bar/menu-open.js +26 -0
  332. package/registry/examples/nav-bar/menu-open.tsx +26 -0
  333. package/registry/examples/nav-bar/site.d.ts +4 -0
  334. package/registry/examples/nav-bar/site.js +31 -0
  335. package/registry/examples/nav-bar/site.tsx +36 -0
  336. package/registry/examples/number-ticker/gradient.d.ts +4 -0
  337. package/registry/examples/number-ticker/gradient.js +11 -0
  338. package/registry/examples/number-ticker/gradient.tsx +10 -0
  339. package/registry/examples/number-ticker/live-total.d.ts +4 -0
  340. package/registry/examples/number-ticker/live-total.js +17 -0
  341. package/registry/examples/number-ticker/live-total.tsx +21 -0
  342. package/registry/examples/number-ticker/stats.d.ts +4 -0
  343. package/registry/examples/number-ticker/stats.js +19 -0
  344. package/registry/examples/number-ticker/stats.tsx +23 -0
  345. package/registry/examples/pagination/cursor.d.ts +4 -0
  346. package/registry/examples/pagination/cursor.js +24 -0
  347. package/registry/examples/pagination/cursor.tsx +20 -0
  348. package/registry/examples/pagination/links.d.ts +4 -0
  349. package/registry/examples/pagination/links.js +11 -0
  350. package/registry/examples/pagination/links.tsx +6 -0
  351. package/registry/examples/pagination/native/cursor.d.ts +4 -0
  352. package/registry/examples/pagination/native/cursor.dark.png +0 -0
  353. package/registry/examples/pagination/native/cursor.js +19 -0
  354. package/registry/examples/pagination/native/cursor.light.png +0 -0
  355. package/registry/examples/pagination/native/cursor.tsx +13 -0
  356. package/registry/examples/pagination/native/pages.d.ts +4 -0
  357. package/registry/examples/pagination/native/pages.dark.png +0 -0
  358. package/registry/examples/pagination/native/pages.js +21 -0
  359. package/registry/examples/pagination/native/pages.light.png +0 -0
  360. package/registry/examples/pagination/native/pages.tsx +14 -0
  361. package/registry/examples/pagination/results.d.ts +4 -0
  362. package/registry/examples/pagination/results.js +23 -0
  363. package/registry/examples/pagination/results.tsx +19 -0
  364. package/registry/examples/pagination/table-footer.d.ts +4 -0
  365. package/registry/examples/pagination/table-footer.js +31 -0
  366. package/registry/examples/pagination/table-footer.tsx +27 -0
  367. package/registry/examples/progress/buffer.d.ts +4 -0
  368. package/registry/examples/progress/buffer.js +11 -0
  369. package/registry/examples/progress/buffer.tsx +10 -0
  370. package/registry/examples/progress/statuses.d.ts +4 -0
  371. package/registry/examples/progress/statuses.js +14 -0
  372. package/registry/examples/progress/statuses.tsx +11 -0
  373. package/registry/examples/progress/steps.d.ts +4 -0
  374. package/registry/examples/progress/steps.js +14 -0
  375. package/registry/examples/progress/steps.tsx +13 -0
  376. package/registry/examples/progress/upload.d.ts +4 -0
  377. package/registry/examples/progress/upload.js +11 -0
  378. package/registry/examples/progress/upload.tsx +10 -0
  379. package/registry/examples/search-field/global.d.ts +4 -0
  380. package/registry/examples/search-field/global.js +19 -0
  381. package/registry/examples/search-field/global.tsx +15 -0
  382. package/registry/examples/search-field/native/default.d.ts +4 -0
  383. package/registry/examples/search-field/native/default.dark.png +0 -0
  384. package/registry/examples/search-field/native/default.js +13 -0
  385. package/registry/examples/search-field/native/default.light.png +0 -0
  386. package/registry/examples/search-field/native/default.tsx +7 -0
  387. package/registry/examples/search-field/suggestions.d.ts +4 -0
  388. package/registry/examples/search-field/suggestions.js +30 -0
  389. package/registry/examples/search-field/suggestions.tsx +27 -0
  390. package/registry/examples/search-field/toolbar.d.ts +4 -0
  391. package/registry/examples/search-field/toolbar.js +17 -0
  392. package/registry/examples/search-field/toolbar.tsx +21 -0
  393. package/registry/examples/skeleton/paragraph.d.ts +4 -0
  394. package/registry/examples/skeleton/paragraph.js +14 -0
  395. package/registry/examples/skeleton/paragraph.tsx +12 -0
  396. package/registry/examples/skeleton/shape-of-content.d.ts +4 -0
  397. package/registry/examples/skeleton/shape-of-content.js +23 -0
  398. package/registry/examples/skeleton/shape-of-content.tsx +26 -0
  399. package/registry/examples/spinner/default.js +5 -2
  400. package/registry/examples/spinner/default.tsx +7 -1
  401. package/registry/examples/spinner/sizes.js +2 -1
  402. package/registry/examples/spinner/sizes.tsx +2 -0
  403. package/registry/examples/spinner/value.d.ts +4 -0
  404. package/registry/examples/spinner/value.js +11 -0
  405. package/registry/examples/spinner/value.tsx +12 -0
  406. package/registry/examples/stepper/checkout.d.ts +4 -0
  407. package/registry/examples/stepper/checkout.js +22 -0
  408. package/registry/examples/stepper/checkout.tsx +17 -0
  409. package/registry/examples/stepper/failed.d.ts +4 -0
  410. package/registry/examples/stepper/failed.js +26 -0
  411. package/registry/examples/stepper/failed.tsx +21 -0
  412. package/registry/examples/stepper/job.d.ts +4 -0
  413. package/registry/examples/stepper/job.js +32 -0
  414. package/registry/examples/stepper/job.tsx +28 -0
  415. package/registry/examples/tag-input/recipients.d.ts +4 -0
  416. package/registry/examples/tag-input/recipients.js +23 -0
  417. package/registry/examples/tag-input/recipients.tsx +20 -0
  418. package/registry/examples/tag-input/video-tags.d.ts +4 -0
  419. package/registry/examples/tag-input/video-tags.js +26 -0
  420. package/registry/examples/tag-input/video-tags.tsx +22 -0
  421. package/registry/examples/toast/grouped.d.ts +4 -0
  422. package/registry/examples/toast/grouped.js +21 -0
  423. package/registry/examples/toast/grouped.tsx +23 -0
  424. package/registry/examples/toast/undo.d.ts +4 -0
  425. package/registry/examples/toast/undo.js +29 -0
  426. package/registry/examples/toast/undo.tsx +30 -0
  427. package/registry/examples/toast/upload-progress.d.ts +4 -0
  428. package/registry/examples/toast/upload-progress.js +29 -0
  429. package/registry/examples/toast/upload-progress.tsx +31 -0
  430. package/registry/examples/video-player/default.d.ts +4 -0
  431. package/registry/examples/video-player/default.js +12 -0
  432. package/registry/examples/video-player/default.tsx +8 -0
  433. package/registry/examples/video-player/gated.d.ts +4 -0
  434. package/registry/examples/video-player/gated.js +26 -0
  435. package/registry/examples/video-player/gated.tsx +23 -0
  436. package/registry/examples/video-player/native/default.d.ts +4 -0
  437. package/registry/examples/video-player/native/default.dark.png +0 -0
  438. package/registry/examples/video-player/native/default.js +18 -0
  439. package/registry/examples/video-player/native/default.light.png +0 -0
  440. package/registry/examples/video-player/native/default.tsx +12 -0
  441. package/registry/examples/video-player/signed-source.d.ts +4 -0
  442. package/registry/examples/video-player/signed-source.js +16 -0
  443. package/registry/examples/video-player/signed-source.tsx +15 -0
  444. package/registry/examples/video-player/vertical.d.ts +4 -0
  445. package/registry/examples/video-player/vertical.js +12 -0
  446. package/registry/examples/video-player/vertical.tsx +12 -0
  447. package/registry/examples/video-trimmer/custom.d.ts +4 -0
  448. package/registry/examples/video-trimmer/custom.js +24 -0
  449. package/registry/examples/video-trimmer/custom.tsx +26 -0
  450. package/registry/examples/video-trimmer/filmstrip.d.ts +4 -0
  451. package/registry/examples/video-trimmer/filmstrip.js +15 -0
  452. package/registry/examples/video-trimmer/filmstrip.tsx +13 -0
  453. package/registry/examples/video-trimmer/playhead.d.ts +4 -0
  454. package/registry/examples/video-trimmer/playhead.js +15 -0
  455. package/registry/examples/video-trimmer/playhead.tsx +13 -0
  456. package/registry/field.json +1 -1
  457. package/registry/file-upload.json +471 -0
  458. package/registry/filter-bar.json +347 -0
  459. package/registry/glow-card.json +162 -0
  460. package/registry/image-cropper.json +313 -0
  461. package/registry/index.json +445 -20
  462. package/registry/iso.json +1355 -0
  463. package/registry/kbd.json +1 -1
  464. package/registry/loader.json +399 -0
  465. package/registry/marquee.json +225 -0
  466. package/registry/mascots.json +3 -3
  467. package/registry/media-capture.json +347 -0
  468. package/registry/meter.json +324 -0
  469. package/registry/nav-bar.json +480 -0
  470. package/registry/number-ticker.json +219 -0
  471. package/registry/page-header.json +1 -1
  472. package/registry/pagination.json +475 -0
  473. package/registry/popover.json +1 -1
  474. package/registry/progress.json +114 -9
  475. package/registry/radio-group.json +1 -1
  476. package/registry/search-field.json +436 -0
  477. package/registry/section-backdrop.json +1 -1
  478. package/registry/separator.json +1 -1
  479. package/registry/skeleton.json +69 -13
  480. package/registry/slider.json +1 -1
  481. package/registry/slot.json +1 -1
  482. package/registry/spinner.json +91 -27
  483. package/registry/stat.json +1 -1
  484. package/registry/stepper.json +174 -0
  485. package/registry/switch.json +1 -1
  486. package/registry/tabs.json +11 -7
  487. package/registry/tag-input.json +363 -0
  488. package/registry/theme.json +3 -3
  489. package/registry/toast.json +41 -13
  490. package/registry/tooltip.json +1 -1
  491. package/registry/video-player.json +598 -0
  492. package/registry/video-trimmer.json +385 -0
  493. package/dist/chunk-FHYZSO2S.js.map +0 -1
  494. package/dist/chunk-PESA2R4U.js +0 -51
  495. package/dist/chunk-PESA2R4U.js.map +0 -1
  496. package/registry/examples/spinner/muted.js +0 -11
  497. package/registry/examples/spinner/muted.tsx +0 -6
  498. /package/registry/examples/{spinner/muted.d.ts → audio-player/podcast.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/media-capture.tsx"],"sourcesContent":["// @krizaka/ui/native/media-capture — its own entry, because it imports expo-camera: an optional peer, installed only\n// by the apps that use the camera. The theme and the buttons come from @krizaka/ui/native.\nimport { Button, Txt, useReducedMotion, useTheme } from \"@krizaka/ui/native\";\nimport { CameraView, useCameraPermissions, useMicrophonePermissions } from \"expo-camera\";\nimport * as React from \"react\";\nimport { Linking, Pressable, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nexport type MediaCaptureLabels = {\n /** Why the camera is asked for, before the request (\"Use your camera to take a photo\"). */\n prompt: string;\n /** The button that asks (\"Turn on the camera\"). */\n start: string;\n /** Permission refused for good (\"Camera access is off. Turn it on in Settings.\"). */\n denied: string;\n /** Opens the app's settings (\"Open Settings\"). */\n settings: string;\n takePhoto: string;\n startRecording: string;\n stopRecording: string;\n switchCamera: string;\n};\n\nexport type NativeCaptureResult = {\n /** The file of the photo or the clip, on the device. */\n uri: string;\n /** `photo` or `video`. */\n kind: \"photo\" | \"video\";\n};\n\nexport type MediaCaptureProps = {\n /** What it captures: `photo` (default) or `video`. */\n mode?: \"photo\" | \"video\";\n /** The camera at first: `front` (default) or `back`. */\n facing?: \"front\" | \"back\";\n /** The longest clip, in seconds. */\n maxDuration?: number;\n /** Called with the photo taken or the clip recorded. */\n onCapture: (result: NativeCaptureResult) => void;\n /** Called when a capture fails. */\n onError?: (error: unknown) => void;\n /** The width / height ratio of the preview. Default 3 / 4. */\n aspectRatio?: number;\n /** The words, passed translated. */\n labels: MediaCaptureLabels;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\n/**\n * The camera in a screen, on expo-camera: asks for the permission only when the person presses the button, sends them\n * to Settings when it was refused for good, takes a photo or records a clip (and the microphone for a clip), switches\n * cameras. The web `MediaCapture` with the same words.\n */\nexport function MediaCapture({ mode = \"photo\", facing: initialFacing = \"front\", maxDuration, onCapture, onError, aspectRatio = 3 / 4, labels, style }: MediaCaptureProps) {\n const { theme, radius } = useTheme();\n const reduce = useReducedMotion();\n const camera = React.useRef<CameraView>(null);\n const [permission, requestPermission] = useCameraPermissions();\n const [microphone, requestMicrophone] = useMicrophonePermissions();\n const [facing, setFacing] = React.useState(initialFacing);\n const [ready, setReady] = React.useState(false);\n const [recording, setRecording] = React.useState(false);\n\n const ask = async () => {\n const result = await requestPermission();\n if (result.granted && mode === \"video\" && !microphone?.granted) await requestMicrophone();\n };\n\n const shoot = async () => {\n if (!camera.current || !ready) return;\n try {\n if (mode === \"photo\") {\n const photo = await camera.current.takePictureAsync({ quality: 0.9 });\n if (photo) onCapture({ uri: photo.uri, kind: \"photo\" });\n } else if (recording) {\n camera.current.stopRecording();\n } else {\n setRecording(true);\n const clip = await camera.current.recordAsync(maxDuration ? { maxDuration } : undefined);\n setRecording(false);\n if (clip) onCapture({ uri: clip.uri, kind: \"video\" });\n }\n } catch (error) {\n setRecording(false);\n onError?.(error);\n }\n };\n\n const frame = [styles.frame, { aspectRatio, borderRadius: radius.md, backgroundColor: theme.media }, style];\n\n if (!permission?.granted) {\n const blocked = permission ? !permission.canAskAgain : false;\n return (\n <View style={[frame, styles.panel]}>\n <Txt style={styles.center}>\n {blocked ? labels.denied : labels.prompt}\n </Txt>\n {blocked ? (\n <Button label={labels.settings} variant=\"secondary\" onPress={() => void Linking.openSettings()} />\n ) : (\n <Button label={labels.start} variant=\"primary\" onPress={() => void ask()} />\n )}\n </View>\n );\n }\n\n return (\n <View style={frame}>\n <CameraView\n ref={camera}\n style={StyleSheet.absoluteFill}\n facing={facing}\n mode={mode === \"video\" ? \"video\" : \"picture\"}\n mirror={facing === \"front\"}\n onCameraReady={() => setReady(true)}\n aria-hidden\n />\n <View style={styles.bar}>\n <View style={styles.side} />\n <Pressable\n role=\"button\"\n aria-label={mode === \"photo\" ? labels.takePhoto : recording ? labels.stopRecording : labels.startRecording}\n aria-disabled={!ready}\n disabled={!ready}\n onPress={() => void shoot()}\n style={({ pressed }) => [styles.shutter, { borderColor: theme.textOnMedia, opacity: pressed && !reduce ? 0.8 : 1 }]}\n >\n <View\n style={[\n mode === \"video\" && recording ? styles.stop : styles.dot,\n { backgroundColor: mode === \"video\" ? theme.danger : theme.textOnMedia },\n ]}\n />\n </Pressable>\n <Pressable\n role=\"button\"\n aria-label={labels.switchCamera}\n aria-disabled={recording}\n disabled={recording}\n hitSlop={8}\n onPress={() => setFacing((f) => (f === \"front\" ? \"back\" : \"front\"))}\n style={[styles.side, styles.flip, { backgroundColor: theme.scrimStrong, opacity: recording ? 0 : 1 }]}\n >\n <Svg width={22} height={22} viewBox=\"0 0 24 24\" fill=\"none\" stroke={theme.textOnMedia} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <Path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3M18 3v4h-4M6 21v-4h4\" />\n </Svg>\n </Pressable>\n </View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frame: { width: \"100%\", overflow: \"hidden\" },\n panel: { alignItems: \"center\", justifyContent: \"center\", gap: 16, padding: 24 },\n center: { textAlign: \"center\" },\n bar: { position: \"absolute\", left: 0, right: 0, bottom: 16, flexDirection: \"row\", alignItems: \"center\", justifyContent: \"space-evenly\" },\n side: { width: 48, height: 48 },\n flip: { borderRadius: 24, alignItems: \"center\", justifyContent: \"center\" },\n shutter: { width: 72, height: 72, borderRadius: 36, borderWidth: 4, alignItems: \"center\", justifyContent: \"center\" },\n dot: { width: 54, height: 54, borderRadius: 27 },\n stop: { width: 26, height: 26, borderRadius: 6 },\n});\n"],"mappings":";AAEA,SAAS,QAAQ,KAAK,kBAAkB,gBAAgB;AACxD,SAAS,YAAY,sBAAsB,gCAAgC;AAC3E,YAAY,WAAW;AACvB,SAAS,SAAS,WAA2B,YAAY,YAA4B;AACrF,OAAO,OAAO,YAAY;AAwFpB,SACE,KADF;AAxCC,SAAS,aAAa,EAAE,OAAO,SAAS,QAAQ,gBAAgB,SAAS,aAAa,WAAW,SAAS,cAAc,IAAI,GAAG,QAAQ,MAAM,GAAsB;AACxK,QAAM,EAAE,OAAO,OAAO,IAAI,SAAS;AACnC,QAAM,SAAS,iBAAiB;AAChC,QAAM,SAAe,aAAmB,IAAI;AAC5C,QAAM,CAAC,YAAY,iBAAiB,IAAI,qBAAqB;AAC7D,QAAM,CAAC,YAAY,iBAAiB,IAAI,yBAAyB;AACjE,QAAM,CAAC,QAAQ,SAAS,IAAU,eAAS,aAAa;AACxD,QAAM,CAAC,OAAO,QAAQ,IAAU,eAAS,KAAK;AAC9C,QAAM,CAAC,WAAW,YAAY,IAAU,eAAS,KAAK;AAEtD,QAAM,MAAM,YAAY;AACtB,UAAM,SAAS,MAAM,kBAAkB;AACvC,QAAI,OAAO,WAAW,SAAS,WAAW,CAAC,YAAY,QAAS,OAAM,kBAAkB;AAAA,EAC1F;AAEA,QAAM,QAAQ,YAAY;AACxB,QAAI,CAAC,OAAO,WAAW,CAAC,MAAO;AA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AQ,UAAU,SAAS;AAAA,EAC3C,OAAO,EAAE,YAAY,UAAU,gBAAgB,UAAU,KAAK,IAAI,SAAS,GAAG;AAAA,EAC9E,QAAQ,EAAE,WAAW,SAAS;AAAA,EAC9B,KAAK,EAAE,UAAU,YAAY,MAAM,GAAG,OAAO,GAAG,QAAQ,IAAI,eAAe,OAAO,YAAY,UAAU,gBAAgB,eAAe;AAAA,EACvI,MAAM,EAAE,OAAO,IAAI,QAAQ,GAAG;AAAA,EAC9B,MAAM,EAAE,cAAc,IAAI,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACzE,SAAS,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,IAAI,aAAa,GAAG,YAAY,UAAU,gBAAgB,SAAS;AAAA,EACnH,KAAK,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,GAAG;AAAA,EAC/C,MAAM,EAAE,OAAO,IAAI,QAAQ,IAAI,cAAc,EAAE;AACjD,CAAC;","names":[]}
@@ -0,0 +1,50 @@
1
+ import { ContentType, VideoContentFit } from 'expo-video';
2
+ import * as React from 'react';
3
+ import { ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
4
+
5
+ type VideoPlayerSource = {
6
+ /** The address (MP4 or an HLS `.m3u8`, signed by your server). */
7
+ uri: string;
8
+ /** `hls` when the address does not end in `.m3u8`; `auto` (default) otherwise. */
9
+ contentType?: ContentType;
10
+ /** Headers sent with the request (an authorization). */
11
+ headers?: Record<string, string>;
12
+ };
13
+ type VideoPlayerProps = {
14
+ /** The video. A new source replaces the current one. */
15
+ source: VideoPlayerSource;
16
+ /** The accessible name of the player ("Video: Sunset over Montréal"), passed translated. */
17
+ title: string;
18
+ /** The picture shown until the first frame. */
19
+ poster?: ImageSourcePropType;
20
+ /** Starts playing (muted unless `muted={false}`) — not when the system asks to reduce motion. */
21
+ autoPlay?: boolean;
22
+ /** Starts muted. Default: `autoPlay`. */
23
+ muted?: boolean;
24
+ /** Plays again from the start at the end. */
25
+ loop?: boolean;
26
+ /** Pauses while `true`: the app passes it when the video leaves the screen (a FlatList's viewability). */
27
+ paused?: boolean;
28
+ /** The platform's controls (default `true`: accessible, with full screen). `false` for a story or a background. */
29
+ nativeControls?: boolean;
30
+ /** Allows full screen from the controls. Default `true`. */
31
+ fullscreen?: boolean;
32
+ /** Allows picture in picture. Default `false`. */
33
+ pictureInPicture?: boolean;
34
+ /** How the picture fills the frame: `contain` (default), `cover`, `fill`. */
35
+ contentFit?: VideoContentFit;
36
+ /** The width / height ratio of the frame. Default 16 / 9. */
37
+ aspectRatio?: number;
38
+ /** Called when it starts or stops playing. */
39
+ onPlayingChange?: (playing: boolean) => void;
40
+ /** Styles merged last, on the frame. */
41
+ style?: StyleProp<ViewStyle>;
42
+ };
43
+ /**
44
+ * A video on expo-video: the platform's own player and controls (accessible, full screen, picture in picture), the
45
+ * poster until the first frame, autoplay that waits under reduced motion, and `paused` to stop it off screen. The
46
+ * web `VideoPlayer` draws its own controls; here the system's are the right ones.
47
+ */
48
+ declare function VideoPlayer({ source, title, poster, autoPlay, muted, loop, paused, nativeControls, fullscreen, pictureInPicture, contentFit, aspectRatio, onPlayingChange, style, }: VideoPlayerProps): React.JSX.Element;
49
+
50
+ export { VideoPlayer, type VideoPlayerProps, type VideoPlayerSource };
@@ -0,0 +1,69 @@
1
+ // src/native/video-player.tsx
2
+ import { useTheme } from "@krizaka/ui/native";
3
+ import { useVideoPlayer, VideoView } from "expo-video";
4
+ import * as React from "react";
5
+ import { AccessibilityInfo, Image, StyleSheet, View } from "react-native";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function configure(player, loop, muted) {
8
+ player.loop = loop;
9
+ player.muted = muted;
10
+ }
11
+ function VideoPlayer({
12
+ source,
13
+ title,
14
+ poster,
15
+ autoPlay = false,
16
+ muted = autoPlay,
17
+ loop = false,
18
+ paused = false,
19
+ nativeControls = true,
20
+ fullscreen = true,
21
+ pictureInPicture = false,
22
+ contentFit = "contain",
23
+ aspectRatio = 16 / 9,
24
+ onPlayingChange,
25
+ style
26
+ }) {
27
+ const { theme, radius } = useTheme();
28
+ const [firstFrame, setFirstFrame] = React.useState(false);
29
+ const player = useVideoPlayer({ uri: source.uri, contentType: source.contentType, headers: source.headers }, (p) => configure(p, loop, muted));
30
+ React.useEffect(() => configure(player, loop, muted), [player, loop, muted]);
31
+ React.useEffect(() => {
32
+ let alive = true;
33
+ if (paused) player.pause();
34
+ else if (autoPlay)
35
+ void AccessibilityInfo.isReduceMotionEnabled().then((reduce) => {
36
+ if (alive && !reduce) player.play();
37
+ });
38
+ return () => {
39
+ alive = false;
40
+ };
41
+ }, [player, paused, autoPlay]);
42
+ React.useEffect(() => {
43
+ if (!onPlayingChange) return;
44
+ const subscription = player.addListener("playingChange", ({ isPlaying }) => onPlayingChange(isPlaying));
45
+ return () => subscription.remove();
46
+ }, [player, onPlayingChange]);
47
+ return /* @__PURE__ */ jsxs(View, { role: "group", "aria-label": title, style: [styles.frame, { aspectRatio, borderRadius: radius.sm, backgroundColor: theme.media }, style], children: [
48
+ /* @__PURE__ */ jsx(
49
+ VideoView,
50
+ {
51
+ player,
52
+ style: StyleSheet.absoluteFill,
53
+ contentFit,
54
+ nativeControls,
55
+ fullscreenOptions: { enable: fullscreen },
56
+ allowsPictureInPicture: pictureInPicture,
57
+ onFirstFrameRender: () => setFirstFrame(true)
58
+ }
59
+ ),
60
+ poster && !firstFrame ? /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: StyleSheet.absoluteFill, children: /* @__PURE__ */ jsx(Image, { source: poster, "aria-hidden": true, resizeMode: "cover", style: StyleSheet.absoluteFill }) }) : null
61
+ ] });
62
+ }
63
+ var styles = StyleSheet.create({
64
+ frame: { width: "100%", overflow: "hidden" }
65
+ });
66
+ export {
67
+ VideoPlayer
68
+ };
69
+ //# sourceMappingURL=video-player.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/native/video-player.tsx"],"sourcesContent":["// @krizaka/ui/native/video-player — its own entry, because it imports expo-video: an optional peer, installed only by\n// the apps that play video. The theme comes from @krizaka/ui/native (the same context as the rest of the platform).\nimport { useTheme } from \"@krizaka/ui/native\";\nimport { type ContentType, useVideoPlayer, type VideoContentFit, VideoView } from \"expo-video\";\nimport * as React from \"react\";\nimport { AccessibilityInfo, Image, type ImageSourcePropType, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\n\nexport type VideoPlayerSource = {\n /** The address (MP4 or an HLS `.m3u8`, signed by your server). */\n uri: string;\n /** `hls` when the address does not end in `.m3u8`; `auto` (default) otherwise. */\n contentType?: ContentType;\n /** Headers sent with the request (an authorization). */\n headers?: Record<string, string>;\n};\n\nexport type VideoPlayerProps = {\n /** The video. A new source replaces the current one. */\n source: VideoPlayerSource;\n /** The accessible name of the player (\"Video: Sunset over Montréal\"), passed translated. */\n title: string;\n /** The picture shown until the first frame. */\n poster?: ImageSourcePropType;\n /** Starts playing (muted unless `muted={false}`) — not when the system asks to reduce motion. */\n autoPlay?: boolean;\n /** Starts muted. Default: `autoPlay`. */\n muted?: boolean;\n /** Plays again from the start at the end. */\n loop?: boolean;\n /** Pauses while `true`: the app passes it when the video leaves the screen (a FlatList's viewability). */\n paused?: boolean;\n /** The platform's controls (default `true`: accessible, with full screen). `false` for a story or a background. */\n nativeControls?: boolean;\n /** Allows full screen from the controls. Default `true`. */\n fullscreen?: boolean;\n /** Allows picture in picture. Default `false`. */\n pictureInPicture?: boolean;\n /** How the picture fills the frame: `contain` (default), `cover`, `fill`. */\n contentFit?: VideoContentFit;\n /** The width / height ratio of the frame. Default 16 / 9. */\n aspectRatio?: number;\n /** Called when it starts or stops playing. */\n onPlayingChange?: (playing: boolean) => void;\n /** Styles merged last, on the frame. */\n style?: StyleProp<ViewStyle>;\n};\n\n/** The event surface of expo-video's player (a SharedObject of `expo`), typed here so `expo` stays the app's. */\ntype Emitter = { addListener(event: \"playingChange\", listener: (payload: { isPlaying: boolean }) => void): { remove(): void } };\n\n/** Applies the options a player can change while it lives (outside the component: the player is the hook's). */\nfunction configure(player: { loop: boolean; muted: boolean }, loop: boolean, muted: boolean) {\n player.loop = loop;\n player.muted = muted;\n}\n\n/**\n * A video on expo-video: the platform's own player and controls (accessible, full screen, picture in picture), the\n * poster until the first frame, autoplay that waits under reduced motion, and `paused` to stop it off screen. The\n * web `VideoPlayer` draws its own controls; here the system's are the right ones.\n */\nexport function VideoPlayer({\n source,\n title,\n poster,\n autoPlay = false,\n muted = autoPlay,\n loop = false,\n paused = false,\n nativeControls = true,\n fullscreen = true,\n pictureInPicture = false,\n contentFit = \"contain\",\n aspectRatio = 16 / 9,\n onPlayingChange,\n style,\n}: VideoPlayerProps) {\n const { theme, radius } = useTheme();\n const [firstFrame, setFirstFrame] = React.useState(false);\n const player = useVideoPlayer({ uri: source.uri, contentType: source.contentType, headers: source.headers }, (p) => configure(p, loop, muted));\n\n React.useEffect(() => configure(player, loop, muted), [player, loop, muted]);\n\n React.useEffect(() => {\n let alive = true;\n if (paused) player.pause();\n else if (autoPlay)\n void AccessibilityInfo.isReduceMotionEnabled().then((reduce) => {\n if (alive && !reduce) player.play();\n });\n return () => {\n alive = false;\n };\n }, [player, paused, autoPlay]);\n\n React.useEffect(() => {\n if (!onPlayingChange) return;\n const subscription = (player as unknown as Emitter).addListener(\"playingChange\", ({ isPlaying }) => onPlayingChange(isPlaying));\n return () => subscription.remove();\n }, [player, onPlayingChange]);\n\n return (\n <View role=\"group\" aria-label={title} style={[styles.frame, { aspectRatio, borderRadius: radius.sm, backgroundColor: theme.media }, style]}>\n <VideoView\n player={player}\n style={StyleSheet.absoluteFill}\n contentFit={contentFit}\n nativeControls={nativeControls}\n fullscreenOptions={{ enable: fullscreen }}\n allowsPictureInPicture={pictureInPicture}\n onFirstFrameRender={() => setFirstFrame(true)}\n />\n {poster && !firstFrame ? (\n <View pointerEvents=\"none\" style={StyleSheet.absoluteFill}>\n <Image source={poster} aria-hidden resizeMode=\"cover\" style={StyleSheet.absoluteFill} />\n </View>\n ) : null}\n </View>\n );\n}\n\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AAC,EAAE,UAAU,MAAM,gBAAgB,SAAS,CAAC;AAC9H,WAAO,MAAM,aAAa,OAAO;AAAA,EACnC,GAAG,CAAC,QAAQ,eAAe,CAAC;AAE5B,SACE,qBAAC,QAAK,MAAK,SAAQ,cAAY,OAAO,OAAO,CAAC,OAAO,OAAO,EAAE,aAAa,cAAc,OAAO,IAAI,iBAAiB,MAAM,MAAM,GAAG,KAAK,GACvI;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO,WAAW;AAAA,QAClB;AAAA,QACA;AAAA,QACA,mBAAmB,EAAE,QAAQ,WAAW;AAAA,QACxC,wBAAwB;AAAA,QACxB,oBAAoB,MAAM,cAAc,IAAI;AAAA;AAAA,IAC9C;AAAA,IACC,UAAU,CAAC,aACV,oBAAC,QAAK,eAAc,QAAO,OAAO,WAAW,cAC3C,8BAAC,SAAM,QAAQ,QAAQ,eAAW,MAAC,YAAW,SAAQ,OAAO,WAAW,cAAc,GACxF,IACE;AAAA,KACN;AAEJ;AAEA,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,OAAO,EAAE,OAAO,QAAQ,UAAU,SAAS;AAC7C,CAAC;","names":[]}
package/dist/native.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import { ViewProps, PressableProps, StyleProp, ViewStyle, TextProps, ImageProps, DimensionValue, ActivityIndicatorProps } from 'react-native';
3
+ import { ViewProps, PressableProps, StyleProp, ViewStyle, TextProps, ImageProps, TextInputProps, DimensionValue, ActivityIndicatorProps } from 'react-native';
4
4
 
5
5
  /** Milliseconds left until `target` (never negative), ticking every second. `skewMs` = server clock − this clock. */
6
6
  declare function useCountdown(target: Date | string | number, skewMs?: number): number;
@@ -377,6 +377,44 @@ declare function OrazakaMark({ size, animated, title, neutral }: NativeMarkProps
377
377
  */
378
378
  declare function OrochiaMark({ size, animated, title, neutral: neutralProp }: NativeMarkProps): React__default.JSX.Element;
379
379
 
380
+ type PaginationLabels = {
381
+ /** The previous-page button ("Previous page"). */
382
+ previous: string;
383
+ /** The next-page button ("Next page"). */
384
+ next: string;
385
+ /** Where the list stands: `(page, count) => "Page 3 of 12"`. */
386
+ compact: (page: number, pageCount: number) => string;
387
+ };
388
+ type PaginationProps = {
389
+ /** Pages mode: the current page, from 1. */
390
+ page?: number;
391
+ /** Pages mode: how many pages. Without it, the pagination is in cursor mode. */
392
+ pageCount?: number;
393
+ /** Pages mode: called with the page asked for. */
394
+ onPageChange?: (page: number) => void;
395
+ /** Cursor mode: whether there is a previous page. */
396
+ hasPrevious?: boolean;
397
+ /** Cursor mode: whether there is a next page. */
398
+ hasNext?: boolean;
399
+ /** Cursor mode: called by the previous button. */
400
+ onPrevious?: () => void;
401
+ /** Cursor mode: called by the next button. */
402
+ onNext?: () => void;
403
+ /** A text between the buttons in cursor mode ("41–60"), or instead of "Page 3 of 12". */
404
+ status?: string;
405
+ /** Disables both buttons (a page is loading). */
406
+ disabled?: boolean;
407
+ /** The words, passed translated. */
408
+ labels: PaginationLabels;
409
+ /** Styles merged last. */
410
+ style?: StyleProp<ViewStyle>;
411
+ };
412
+ /**
413
+ * Previous / next with where the list stands ("Page 3 of 12"), or the two buttons of a cursor — the web
414
+ * `Pagination` folded, the form a phone's thumb reaches. On a feed, prefer loading more at the end of the list.
415
+ */
416
+ declare function Pagination({ page, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }: PaginationProps): React.JSX.Element;
417
+
380
418
  /** The mark of a Krizaka brand by id, for React Native — the counterpart of the web `ProductLogo`. */
381
419
  declare function ProductMark({ id, ...props }: NativeMarkProps & {
382
420
  id: BrandId;
@@ -406,6 +444,32 @@ type ProgressProps = {
406
444
  */
407
445
  declare function Progress({ variant, size, value, max, label, valueText, children, style }: ProgressProps): React.JSX.Element;
408
446
 
447
+ type SearchFieldProps = Omit<TextInputProps, "value" | "defaultValue" | "onChangeText" | "style" | "onSubmitEditing"> & {
448
+ /** The accessible name of the input ("Search videos"), passed translated. */
449
+ label: string;
450
+ /** The query (controlled). */
451
+ value?: string;
452
+ /** The query at first, uncontrolled. */
453
+ defaultValue?: string;
454
+ /** Called on every key with the query. */
455
+ onValueChange?: (query: string) => void;
456
+ /** Called with the query once typing pauses (`debounce` ms): fetch the results here. */
457
+ onSearch?: (query: string) => void;
458
+ /** The pause, in ms, before `onSearch`. Default 300. */
459
+ debounce?: number;
460
+ /** Called when the keyboard's search key is pressed. */
461
+ onSubmit?: (query: string) => void;
462
+ /** The clear button's name ("Clear search"), passed translated. */
463
+ clearLabel: string;
464
+ /** Styles merged last, on the field's frame. */
465
+ style?: StyleProp<ViewStyle>;
466
+ };
467
+ /**
468
+ * A search box: the glyph, the input with the keyboard's search key, a clear button, and a debounced `onSearch` —
469
+ * the web `SearchField` without the shortcut and the suggestions (a screen of results is the native idiom).
470
+ */
471
+ declare function SearchField({ label, value, defaultValue, onValueChange, onSearch, debounce, onSubmit, clearLabel, style, placeholder, ...props }: SearchFieldProps): React.JSX.Element;
472
+
409
473
  type SegmentedOption<T extends string> = {
410
474
  value: T;
411
475
  label: string;
@@ -599,4 +663,4 @@ type ToasterProps = {
599
663
  /** Mount once, at the root (inside `ThemeProvider`). Then call `toast()` from anywhere. */
600
664
  declare function Toaster({ closeLabel, position, offset, duration, max }: ToasterProps): React.JSX.Element | null;
601
665
 
602
- export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Countdown, type CountdownProps, type CountdownUnits, EmptyState, type EmptyStateProps, IconButton, type IconButtonProps, KrizakaMark, Mascot, type MascotProps, type Mode, type Motion, type NativeMarkProps, OrazakaMark, OrochiaMark, ProductMark, Progress, type ProgressProps, type Radius, Segmented, type SegmentedOption, type SegmentedProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, alpha, splitDuration, textStyles, toast, useCountdown, useReducedMotion, useTheme };
666
+ export { Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, AvatarRoot, type AvatarSize, Badge, type BadgeProps, type BadgeTone, type BrandId, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardTitle, Chip, type ChipGroupProps, type ChipProps, type ChipSize, Countdown, type CountdownProps, type CountdownUnits, EmptyState, type EmptyStateProps, IconButton, type IconButtonProps, KrizakaMark, Mascot, type MascotProps, type Mode, type Motion, type NativeMarkProps, OrazakaMark, OrochiaMark, Pagination, type PaginationLabels, type PaginationProps, ProductMark, Progress, type ProgressProps, type Radius, SearchField, type SearchFieldProps, Segmented, type SegmentedOption, type SegmentedProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type Theme, type ThemeContextValue, type ThemeFonts, type ThemeName, type ThemeOverrides, ThemeProvider, type ThemeProviderProps, type ToastItem, type ToastOptions, type ToastTone, Toaster, type ToasterProps, Txt, type TxtProps, type TxtTone, type TxtVariant, alpha, splitDuration, textStyles, toast, useCountdown, useReducedMotion, useTheme };