@krizaka/ui 2.0.0-beta.5 → 2.0.0-beta.6

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 (641) hide show
  1. package/README.md +37 -22
  2. package/dist/native.d.ts +38 -0
  3. package/dist/native.js.map +1 -1
  4. package/package.json +11 -11
  5. package/registry/alert.json +141 -3
  6. package/registry/avatar.json +299 -3
  7. package/registry/badge.json +233 -3
  8. package/registry/button.json +496 -3
  9. package/registry/card.json +411 -3
  10. package/registry/checkbox.json +127 -3
  11. package/registry/chip.json +394 -3
  12. package/registry/cn.json +51 -3
  13. package/registry/command.json +222 -3
  14. package/registry/confirm-button.json +170 -3
  15. package/registry/countdown.json +273 -3
  16. package/registry/dialog.json +310 -3
  17. package/registry/dropdown-menu.json +116 -3
  18. package/registry/empty-state.json +170 -3
  19. package/registry/examples/alert/danger.d.ts +4 -0
  20. package/registry/examples/alert/danger.js +22 -0
  21. package/registry/examples/alert/danger.tsx +25 -0
  22. package/registry/examples/alert/info.d.ts +4 -0
  23. package/registry/{demos/alert.js → examples/alert/info.js} +3 -3
  24. package/registry/{demos/alert.tsx → examples/alert/info.tsx} +1 -1
  25. package/registry/examples/alert/success.d.ts +4 -0
  26. package/registry/examples/alert/success.js +12 -0
  27. package/registry/examples/alert/success.tsx +15 -0
  28. package/registry/examples/alert/title-only.d.ts +4 -0
  29. package/registry/examples/alert/title-only.js +11 -0
  30. package/registry/examples/alert/title-only.tsx +5 -0
  31. package/registry/examples/alert/warning.d.ts +4 -0
  32. package/registry/examples/alert/warning.js +13 -0
  33. package/registry/examples/alert/warning.tsx +17 -0
  34. package/registry/examples/avatar/fallback.d.ts +4 -0
  35. package/registry/examples/avatar/fallback.js +11 -0
  36. package/registry/examples/avatar/fallback.tsx +6 -0
  37. package/registry/examples/avatar/group.d.ts +4 -0
  38. package/registry/examples/avatar/group.js +20 -0
  39. package/registry/examples/avatar/group.tsx +21 -0
  40. package/registry/examples/avatar/native/group.d.ts +4 -0
  41. package/registry/examples/avatar/native/group.dark.png +0 -0
  42. package/registry/examples/avatar/native/group.js +17 -0
  43. package/registry/examples/avatar/native/group.light.png +0 -0
  44. package/registry/examples/avatar/native/group.tsx +13 -0
  45. package/registry/examples/avatar/native/sizes.d.ts +4 -0
  46. package/registry/examples/avatar/native/sizes.dark.png +0 -0
  47. package/registry/examples/avatar/native/sizes.js +18 -0
  48. package/registry/examples/avatar/native/sizes.light.png +0 -0
  49. package/registry/examples/avatar/native/sizes.tsx +15 -0
  50. package/registry/examples/avatar/sizes.d.ts +4 -0
  51. package/registry/examples/avatar/sizes.js +17 -0
  52. package/registry/examples/avatar/sizes.tsx +13 -0
  53. package/registry/examples/avatar/with-image.d.ts +4 -0
  54. package/registry/{demos/avatar.js → examples/avatar/with-image.js} +3 -3
  55. package/registry/{demos/avatar.tsx → examples/avatar/with-image.tsx} +1 -1
  56. package/registry/examples/badge/accent.d.ts +4 -0
  57. package/registry/examples/badge/accent.js +11 -0
  58. package/registry/examples/badge/accent.tsx +9 -0
  59. package/registry/examples/badge/danger.d.ts +4 -0
  60. package/registry/examples/badge/danger.js +11 -0
  61. package/registry/examples/badge/danger.tsx +9 -0
  62. package/registry/examples/badge/medium.d.ts +4 -0
  63. package/registry/examples/badge/medium.js +11 -0
  64. package/registry/examples/badge/medium.tsx +9 -0
  65. package/registry/examples/badge/native/dot.d.ts +4 -0
  66. package/registry/examples/badge/native/dot.dark.png +0 -0
  67. package/registry/examples/badge/native/dot.js +15 -0
  68. package/registry/examples/badge/native/dot.light.png +0 -0
  69. package/registry/examples/badge/native/dot.tsx +16 -0
  70. package/registry/examples/badge/native/scrim.d.ts +4 -0
  71. package/registry/examples/badge/native/scrim.dark.png +0 -0
  72. package/registry/examples/badge/native/scrim.js +13 -0
  73. package/registry/examples/badge/native/scrim.light.png +0 -0
  74. package/registry/examples/badge/native/scrim.tsx +14 -0
  75. package/registry/examples/badge/native/tones.d.ts +4 -0
  76. package/registry/examples/badge/native/tones.dark.png +0 -0
  77. package/registry/examples/badge/native/tones.js +18 -0
  78. package/registry/examples/badge/native/tones.light.png +0 -0
  79. package/registry/examples/badge/native/tones.tsx +14 -0
  80. package/registry/examples/badge/neutral.d.ts +4 -0
  81. package/registry/{demos/badge.js → examples/badge/neutral.js} +3 -3
  82. package/registry/{demos/badge.tsx → examples/badge/neutral.tsx} +1 -1
  83. package/registry/examples/badge/scrim.d.ts +4 -0
  84. package/registry/examples/badge/scrim.js +11 -0
  85. package/registry/examples/badge/scrim.tsx +10 -0
  86. package/registry/examples/badge/success.d.ts +4 -0
  87. package/registry/examples/badge/success.js +11 -0
  88. package/registry/examples/badge/success.tsx +9 -0
  89. package/registry/examples/badge/warning.d.ts +4 -0
  90. package/registry/examples/badge/warning.js +11 -0
  91. package/registry/examples/badge/warning.tsx +9 -0
  92. package/registry/examples/button/as-child-link.d.ts +4 -0
  93. package/registry/examples/button/as-child-link.js +11 -0
  94. package/registry/examples/button/as-child-link.tsx +10 -0
  95. package/registry/examples/button/danger.d.ts +4 -0
  96. package/registry/examples/button/danger.js +11 -0
  97. package/registry/examples/button/danger.tsx +5 -0
  98. package/registry/examples/button/disabled.d.ts +4 -0
  99. package/registry/examples/button/disabled.js +11 -0
  100. package/registry/examples/button/disabled.tsx +9 -0
  101. package/registry/examples/button/ghost.d.ts +4 -0
  102. package/registry/examples/button/ghost.js +11 -0
  103. package/registry/examples/button/ghost.tsx +5 -0
  104. package/registry/examples/button/icon.d.ts +4 -0
  105. package/registry/examples/button/icon.js +14 -0
  106. package/registry/examples/button/icon.tsx +18 -0
  107. package/registry/examples/button/loading.d.ts +4 -0
  108. package/registry/examples/button/loading.js +11 -0
  109. package/registry/examples/button/loading.tsx +10 -0
  110. package/registry/examples/button/native/danger.d.ts +4 -0
  111. package/registry/examples/button/native/danger.dark.png +0 -0
  112. package/registry/examples/button/native/danger.js +12 -0
  113. package/registry/examples/button/native/danger.light.png +0 -0
  114. package/registry/examples/button/native/danger.tsx +5 -0
  115. package/registry/examples/button/native/disabled.d.ts +4 -0
  116. package/registry/examples/button/native/disabled.dark.png +0 -0
  117. package/registry/examples/button/native/disabled.js +11 -0
  118. package/registry/examples/button/native/disabled.light.png +0 -0
  119. package/registry/examples/button/native/disabled.tsx +5 -0
  120. package/registry/examples/button/native/ghost.d.ts +4 -0
  121. package/registry/examples/button/native/ghost.dark.png +0 -0
  122. package/registry/examples/button/native/ghost.js +12 -0
  123. package/registry/examples/button/native/ghost.light.png +0 -0
  124. package/registry/examples/button/native/ghost.tsx +5 -0
  125. package/registry/examples/button/native/icon-only.d.ts +4 -0
  126. package/registry/examples/button/native/icon-only.dark.png +0 -0
  127. package/registry/examples/button/native/icon-only.js +19 -0
  128. package/registry/examples/button/native/icon-only.light.png +0 -0
  129. package/registry/examples/button/native/icon-only.tsx +21 -0
  130. package/registry/examples/button/native/icon.d.ts +4 -0
  131. package/registry/examples/button/native/icon.dark.png +0 -0
  132. package/registry/examples/button/native/icon.js +16 -0
  133. package/registry/examples/button/native/icon.light.png +0 -0
  134. package/registry/examples/button/native/icon.tsx +15 -0
  135. package/registry/examples/button/native/loading.d.ts +4 -0
  136. package/registry/examples/button/native/loading.dark.png +0 -0
  137. package/registry/examples/button/native/loading.js +11 -0
  138. package/registry/examples/button/native/loading.light.png +0 -0
  139. package/registry/examples/button/native/loading.tsx +6 -0
  140. package/registry/examples/button/native/outline.d.ts +4 -0
  141. package/registry/examples/button/native/outline.dark.png +0 -0
  142. package/registry/examples/button/native/outline.js +12 -0
  143. package/registry/examples/button/native/outline.light.png +0 -0
  144. package/registry/examples/button/native/outline.tsx +5 -0
  145. package/registry/examples/button/native/primary.d.ts +4 -0
  146. package/registry/examples/button/native/primary.dark.png +0 -0
  147. package/registry/examples/button/native/primary.js +12 -0
  148. package/registry/examples/button/native/primary.light.png +0 -0
  149. package/registry/examples/button/native/primary.tsx +5 -0
  150. package/registry/examples/button/native/secondary.d.ts +4 -0
  151. package/registry/examples/button/native/secondary.dark.png +0 -0
  152. package/registry/examples/button/native/secondary.js +12 -0
  153. package/registry/examples/button/native/secondary.light.png +0 -0
  154. package/registry/examples/button/native/secondary.tsx +6 -0
  155. package/registry/examples/button/native/sizes.d.ts +4 -0
  156. package/registry/examples/button/native/sizes.dark.png +0 -0
  157. package/registry/examples/button/native/sizes.js +15 -0
  158. package/registry/examples/button/native/sizes.light.png +0 -0
  159. package/registry/examples/button/native/sizes.tsx +11 -0
  160. package/registry/examples/button/outline.d.ts +4 -0
  161. package/registry/examples/button/outline.js +11 -0
  162. package/registry/examples/button/outline.tsx +5 -0
  163. package/registry/examples/button/pill.d.ts +4 -0
  164. package/registry/examples/button/pill.js +11 -0
  165. package/registry/examples/button/pill.tsx +9 -0
  166. package/registry/examples/button/primary.d.ts +4 -0
  167. package/registry/{demos/button.js → examples/button/primary.js} +3 -3
  168. package/registry/{demos/button.tsx → examples/button/primary.tsx} +1 -1
  169. package/registry/examples/button/secondary.d.ts +4 -0
  170. package/registry/examples/button/secondary.js +11 -0
  171. package/registry/examples/button/secondary.tsx +6 -0
  172. package/registry/examples/button/sizes.d.ts +4 -0
  173. package/registry/examples/button/sizes.js +15 -0
  174. package/registry/examples/button/sizes.tsx +17 -0
  175. package/registry/examples/card/interactive-link.d.ts +4 -0
  176. package/registry/examples/card/interactive-link.js +15 -0
  177. package/registry/examples/card/interactive-link.tsx +16 -0
  178. package/registry/examples/card/media-card.d.ts +4 -0
  179. package/registry/{demos/card.js → examples/card/media-card.js} +3 -3
  180. package/registry/{demos/card.tsx → examples/card/media-card.tsx} +1 -1
  181. package/registry/examples/card/media-fallback.d.ts +4 -0
  182. package/registry/examples/card/media-fallback.js +18 -0
  183. package/registry/examples/card/media-fallback.tsx +22 -0
  184. package/registry/examples/card/native/body.d.ts +4 -0
  185. package/registry/examples/card/native/body.dark.png +0 -0
  186. package/registry/examples/card/native/body.js +15 -0
  187. package/registry/examples/card/native/body.light.png +0 -0
  188. package/registry/examples/card/native/body.tsx +13 -0
  189. package/registry/examples/card/native/default.d.ts +4 -0
  190. package/registry/examples/card/native/default.dark.png +0 -0
  191. package/registry/examples/card/native/default.js +24 -0
  192. package/registry/examples/card/native/default.light.png +0 -0
  193. package/registry/examples/card/native/default.tsx +28 -0
  194. package/registry/examples/card/native/elevated.d.ts +4 -0
  195. package/registry/examples/card/native/elevated.dark.png +0 -0
  196. package/registry/examples/card/native/elevated.js +24 -0
  197. package/registry/examples/card/native/elevated.light.png +0 -0
  198. package/registry/examples/card/native/elevated.tsx +28 -0
  199. package/registry/examples/card/native/pressable.d.ts +4 -0
  200. package/registry/examples/card/native/pressable.dark.png +0 -0
  201. package/registry/examples/card/native/pressable.js +15 -0
  202. package/registry/examples/card/native/pressable.light.png +0 -0
  203. package/registry/examples/card/native/pressable.tsx +13 -0
  204. package/registry/examples/card/reveal-grid.d.ts +4 -0
  205. package/registry/examples/card/reveal-grid.js +28 -0
  206. package/registry/examples/card/reveal-grid.tsx +31 -0
  207. package/registry/examples/card/stat-card.d.ts +4 -0
  208. package/registry/examples/card/stat-card.js +18 -0
  209. package/registry/examples/card/stat-card.tsx +17 -0
  210. package/registry/examples/checkbox/checked.d.ts +4 -0
  211. package/registry/examples/checkbox/checked.js +11 -0
  212. package/registry/examples/checkbox/checked.tsx +5 -0
  213. package/registry/examples/checkbox/disabled.d.ts +4 -0
  214. package/registry/examples/checkbox/disabled.js +14 -0
  215. package/registry/examples/checkbox/disabled.tsx +12 -0
  216. package/registry/examples/checkbox/indeterminate.d.ts +4 -0
  217. package/registry/examples/checkbox/indeterminate.js +11 -0
  218. package/registry/examples/checkbox/indeterminate.tsx +6 -0
  219. package/registry/examples/checkbox/invalid.d.ts +4 -0
  220. package/registry/examples/checkbox/invalid.js +15 -0
  221. package/registry/examples/checkbox/invalid.tsx +14 -0
  222. package/registry/examples/checkbox/unchecked.d.ts +4 -0
  223. package/registry/{demos/checkbox.js → examples/checkbox/unchecked.js} +3 -3
  224. package/registry/{demos/checkbox.tsx → examples/checkbox/unchecked.tsx} +2 -1
  225. package/registry/examples/chip/multiple.d.ts +4 -0
  226. package/registry/examples/chip/multiple.js +16 -0
  227. package/registry/examples/chip/multiple.tsx +12 -0
  228. package/registry/examples/chip/native/multiple.d.ts +4 -0
  229. package/registry/examples/chip/native/multiple.dark.png +0 -0
  230. package/registry/examples/chip/native/multiple.js +18 -0
  231. package/registry/examples/chip/native/multiple.light.png +0 -0
  232. package/registry/examples/chip/native/multiple.tsx +17 -0
  233. package/registry/examples/chip/native/removable.d.ts +4 -0
  234. package/registry/examples/chip/native/removable.dark.png +0 -0
  235. package/registry/examples/chip/native/removable.js +17 -0
  236. package/registry/examples/chip/native/removable.light.png +0 -0
  237. package/registry/examples/chip/native/removable.tsx +15 -0
  238. package/registry/examples/chip/native/single.d.ts +4 -0
  239. package/registry/examples/chip/native/single.dark.png +0 -0
  240. package/registry/examples/chip/native/single.js +15 -0
  241. package/registry/examples/chip/native/single.light.png +0 -0
  242. package/registry/examples/chip/native/single.tsx +11 -0
  243. package/registry/examples/chip/native/toggle.d.ts +4 -0
  244. package/registry/examples/chip/native/toggle.dark.png +0 -0
  245. package/registry/examples/chip/native/toggle.js +17 -0
  246. package/registry/examples/chip/native/toggle.light.png +0 -0
  247. package/registry/examples/chip/native/toggle.tsx +16 -0
  248. package/registry/examples/chip/removable.d.ts +4 -0
  249. package/registry/examples/chip/removable.js +16 -0
  250. package/registry/examples/chip/removable.tsx +15 -0
  251. package/registry/examples/chip/single.d.ts +4 -0
  252. package/registry/examples/chip/single.js +16 -0
  253. package/registry/examples/chip/single.tsx +13 -0
  254. package/registry/examples/chip/small.d.ts +4 -0
  255. package/registry/examples/chip/small.js +16 -0
  256. package/registry/examples/chip/small.tsx +12 -0
  257. package/registry/examples/chip/toggle.d.ts +4 -0
  258. package/registry/{demos/chip.js → examples/chip/toggle.js} +3 -3
  259. package/registry/{demos/chip.tsx → examples/chip/toggle.tsx} +2 -1
  260. package/registry/examples/cn/merge.d.ts +4 -0
  261. package/registry/{demos/cn.js → examples/cn/merge.js} +3 -3
  262. package/registry/{demos/cn.tsx → examples/cn/merge.tsx} +1 -1
  263. package/registry/examples/command/dialog.d.ts +4 -0
  264. package/registry/examples/command/dialog.js +40 -0
  265. package/registry/examples/command/dialog.tsx +36 -0
  266. package/registry/examples/command/inline.d.ts +4 -0
  267. package/registry/{demos/command.js → examples/command/inline.js} +3 -3
  268. package/registry/{demos/command.tsx → examples/command/inline.tsx} +1 -1
  269. package/registry/examples/confirm-button/armed.d.ts +4 -0
  270. package/registry/examples/confirm-button/armed.js +12 -0
  271. package/registry/examples/confirm-button/armed.tsx +14 -0
  272. package/registry/examples/confirm-button/idle.d.ts +4 -0
  273. package/registry/{demos/confirm-button.js → examples/confirm-button/idle.js} +3 -3
  274. package/registry/{demos/confirm-button.tsx → examples/confirm-button/idle.tsx} +1 -1
  275. package/registry/examples/confirm-button/with-text.d.ts +4 -0
  276. package/registry/examples/confirm-button/with-text.js +12 -0
  277. package/registry/examples/confirm-button/with-text.tsx +12 -0
  278. package/registry/examples/countdown/days.d.ts +4 -0
  279. package/registry/examples/countdown/days.js +13 -0
  280. package/registry/examples/countdown/days.tsx +10 -0
  281. package/registry/examples/countdown/ended.d.ts +4 -0
  282. package/registry/examples/countdown/ended.js +13 -0
  283. package/registry/examples/countdown/ended.tsx +10 -0
  284. package/registry/examples/countdown/hours.d.ts +4 -0
  285. package/registry/{demos/countdown.js → examples/countdown/hours.js} +3 -3
  286. package/registry/{demos/countdown.tsx → examples/countdown/hours.tsx} +1 -1
  287. package/registry/examples/countdown/native/days.d.ts +4 -0
  288. package/registry/examples/countdown/native/days.dark.png +0 -0
  289. package/registry/examples/countdown/native/days.js +13 -0
  290. package/registry/examples/countdown/native/days.light.png +0 -0
  291. package/registry/examples/countdown/native/days.tsx +7 -0
  292. package/registry/examples/countdown/native/hours.d.ts +4 -0
  293. package/registry/examples/countdown/native/hours.dark.png +0 -0
  294. package/registry/examples/countdown/native/hours.js +13 -0
  295. package/registry/examples/countdown/native/hours.light.png +0 -0
  296. package/registry/examples/countdown/native/hours.tsx +7 -0
  297. package/registry/examples/countdown/native/sizes.d.ts +4 -0
  298. package/registry/examples/countdown/native/sizes.dark.png +0 -0
  299. package/registry/examples/countdown/native/sizes.js +18 -0
  300. package/registry/examples/countdown/native/sizes.light.png +0 -0
  301. package/registry/examples/countdown/native/sizes.tsx +15 -0
  302. package/registry/examples/countdown/native/urgent.d.ts +4 -0
  303. package/registry/examples/countdown/native/urgent.dark.png +0 -0
  304. package/registry/examples/countdown/native/urgent.js +13 -0
  305. package/registry/examples/countdown/native/urgent.light.png +0 -0
  306. package/registry/examples/countdown/native/urgent.tsx +7 -0
  307. package/registry/examples/countdown/sizes.d.ts +4 -0
  308. package/registry/examples/countdown/sizes.js +18 -0
  309. package/registry/examples/countdown/sizes.tsx +17 -0
  310. package/registry/examples/countdown/urgent.d.ts +4 -0
  311. package/registry/examples/countdown/urgent.js +13 -0
  312. package/registry/examples/countdown/urgent.tsx +10 -0
  313. package/registry/examples/dialog/alert-destructive.d.ts +4 -0
  314. package/registry/examples/dialog/alert-destructive.js +24 -0
  315. package/registry/examples/dialog/alert-destructive.tsx +20 -0
  316. package/registry/examples/dialog/bottom.d.ts +4 -0
  317. package/registry/examples/dialog/bottom.js +29 -0
  318. package/registry/examples/dialog/bottom.tsx +32 -0
  319. package/registry/examples/dialog/center.d.ts +4 -0
  320. package/registry/{demos/dialog.js → examples/dialog/center.js} +3 -3
  321. package/registry/{demos/dialog.tsx → examples/dialog/center.tsx} +1 -1
  322. package/registry/examples/dialog/gate.d.ts +4 -0
  323. package/registry/examples/dialog/gate.js +24 -0
  324. package/registry/examples/dialog/gate.tsx +27 -0
  325. package/registry/examples/dialog/right.d.ts +4 -0
  326. package/registry/examples/dialog/right.js +29 -0
  327. package/registry/examples/dialog/right.tsx +32 -0
  328. package/registry/examples/dialog/sheet-form.d.ts +4 -0
  329. package/registry/examples/dialog/sheet-form.js +35 -0
  330. package/registry/examples/dialog/sheet-form.tsx +36 -0
  331. package/registry/examples/dropdown-menu/actions.d.ts +4 -0
  332. package/registry/{demos/dropdown-menu.js → examples/dropdown-menu/actions.js} +3 -3
  333. package/registry/{demos/dropdown-menu.tsx → examples/dropdown-menu/actions.tsx} +1 -1
  334. package/registry/examples/empty-state/default.d.ts +4 -0
  335. package/registry/{demos/empty-state.js → examples/empty-state/default.js} +3 -3
  336. package/registry/{demos/empty-state.tsx → examples/empty-state/default.tsx} +1 -1
  337. package/registry/examples/empty-state/native/default.d.ts +4 -0
  338. package/registry/examples/empty-state/native/default.dark.png +0 -0
  339. package/registry/examples/empty-state/native/default.js +25 -0
  340. package/registry/examples/empty-state/native/default.light.png +0 -0
  341. package/registry/examples/empty-state/native/default.tsx +25 -0
  342. package/registry/examples/empty-state/title-only.d.ts +4 -0
  343. package/registry/examples/empty-state/title-only.js +11 -0
  344. package/registry/examples/empty-state/title-only.tsx +5 -0
  345. package/registry/examples/empty-state/with-action.d.ts +4 -0
  346. package/registry/examples/empty-state/with-action.js +24 -0
  347. package/registry/examples/empty-state/with-action.tsx +25 -0
  348. package/registry/examples/field/default.d.ts +4 -0
  349. package/registry/{demos/field.js → examples/field/default.js} +3 -3
  350. package/registry/{demos/field.tsx → examples/field/default.tsx} +1 -1
  351. package/registry/examples/field/disabled.d.ts +4 -0
  352. package/registry/examples/field/disabled.js +14 -0
  353. package/registry/examples/field/disabled.tsx +10 -0
  354. package/registry/examples/field/invalid.d.ts +4 -0
  355. package/registry/examples/field/invalid.js +15 -0
  356. package/registry/examples/field/invalid.tsx +12 -0
  357. package/registry/examples/field/select.d.ts +4 -0
  358. package/registry/examples/field/select.js +18 -0
  359. package/registry/examples/field/select.tsx +15 -0
  360. package/registry/examples/field/textarea.d.ts +4 -0
  361. package/registry/examples/field/textarea.js +14 -0
  362. package/registry/examples/field/textarea.tsx +10 -0
  363. package/registry/examples/kbd/key.d.ts +4 -0
  364. package/registry/{demos/kbd.js → examples/kbd/key.js} +3 -3
  365. package/registry/{demos/kbd.tsx → examples/kbd/key.tsx} +1 -1
  366. package/registry/examples/kbd/shortcut.d.ts +4 -0
  367. package/registry/examples/kbd/shortcut.js +15 -0
  368. package/registry/examples/kbd/shortcut.tsx +11 -0
  369. package/registry/examples/kbd/small.d.ts +4 -0
  370. package/registry/examples/kbd/small.js +11 -0
  371. package/registry/examples/kbd/small.tsx +5 -0
  372. package/registry/examples/page-header/default.d.ts +4 -0
  373. package/registry/{demos/page-header.js → examples/page-header/default.js} +3 -3
  374. package/registry/{demos/page-header.tsx → examples/page-header/default.tsx} +1 -1
  375. package/registry/examples/page-header/with-actions.d.ts +4 -0
  376. package/registry/examples/page-header/with-actions.js +22 -0
  377. package/registry/examples/page-header/with-actions.tsx +17 -0
  378. package/registry/examples/page-header/with-breadcrumb.d.ts +4 -0
  379. package/registry/examples/page-header/with-breadcrumb.js +24 -0
  380. package/registry/examples/page-header/with-breadcrumb.tsx +26 -0
  381. package/registry/examples/popover/form.d.ts +4 -0
  382. package/registry/{demos/popover.js → examples/popover/form.js} +3 -3
  383. package/registry/{demos/popover.tsx → examples/popover/form.tsx} +1 -1
  384. package/registry/examples/progress/bar-indeterminate.d.ts +4 -0
  385. package/registry/examples/progress/bar-indeterminate.js +11 -0
  386. package/registry/examples/progress/bar-indeterminate.tsx +6 -0
  387. package/registry/examples/progress/bar-sizes.d.ts +4 -0
  388. package/registry/examples/progress/bar-sizes.js +15 -0
  389. package/registry/examples/progress/bar-sizes.tsx +11 -0
  390. package/registry/examples/progress/bar.d.ts +4 -0
  391. package/registry/{demos/progress.js → examples/progress/bar.js} +3 -3
  392. package/registry/{demos/progress.tsx → examples/progress/bar.tsx} +1 -1
  393. package/registry/examples/progress/native/bar.d.ts +4 -0
  394. package/registry/examples/progress/native/bar.dark.png +0 -0
  395. package/registry/examples/progress/native/bar.js +16 -0
  396. package/registry/examples/progress/native/bar.light.png +0 -0
  397. package/registry/examples/progress/native/bar.tsx +12 -0
  398. package/registry/examples/progress/native/indeterminate.d.ts +4 -0
  399. package/registry/examples/progress/native/indeterminate.dark.png +0 -0
  400. package/registry/examples/progress/native/indeterminate.js +15 -0
  401. package/registry/examples/progress/native/indeterminate.light.png +0 -0
  402. package/registry/examples/progress/native/indeterminate.tsx +12 -0
  403. package/registry/examples/progress/native/ring.d.ts +4 -0
  404. package/registry/examples/progress/native/ring.dark.png +0 -0
  405. package/registry/examples/progress/native/ring.js +19 -0
  406. package/registry/examples/progress/native/ring.light.png +0 -0
  407. package/registry/examples/progress/native/ring.tsx +19 -0
  408. package/registry/examples/progress/ring-indeterminate.d.ts +4 -0
  409. package/registry/examples/progress/ring-indeterminate.js +11 -0
  410. package/registry/examples/progress/ring-indeterminate.tsx +5 -0
  411. package/registry/examples/progress/ring.d.ts +4 -0
  412. package/registry/examples/progress/ring.js +18 -0
  413. package/registry/examples/progress/ring.tsx +17 -0
  414. package/registry/examples/radio-group/cards.d.ts +4 -0
  415. package/registry/examples/radio-group/cards.js +19 -0
  416. package/registry/examples/radio-group/cards.tsx +21 -0
  417. package/registry/examples/radio-group/horizontal.d.ts +4 -0
  418. package/registry/examples/radio-group/horizontal.js +15 -0
  419. package/registry/examples/radio-group/horizontal.tsx +12 -0
  420. package/registry/examples/radio-group/items.d.ts +4 -0
  421. package/registry/{demos/radio-group.js → examples/radio-group/items.js} +3 -3
  422. package/registry/{demos/radio-group.tsx → examples/radio-group/items.tsx} +1 -1
  423. package/registry/examples/section-backdrop/depth-of-field.d.ts +4 -0
  424. package/registry/examples/section-backdrop/depth-of-field.js +18 -0
  425. package/registry/examples/section-backdrop/depth-of-field.tsx +13 -0
  426. package/registry/examples/section-backdrop/hero.d.ts +4 -0
  427. package/registry/{demos/section-backdrop.js → examples/section-backdrop/hero.js} +3 -3
  428. package/registry/{demos/section-backdrop.tsx → examples/section-backdrop/hero.tsx} +1 -1
  429. package/registry/examples/section-backdrop/plain.d.ts +4 -0
  430. package/registry/examples/section-backdrop/plain.js +11 -0
  431. package/registry/examples/section-backdrop/plain.tsx +10 -0
  432. package/registry/examples/section-backdrop/sequence.d.ts +4 -0
  433. package/registry/examples/section-backdrop/sequence.js +14 -0
  434. package/registry/examples/section-backdrop/sequence.tsx +15 -0
  435. package/registry/examples/section-backdrop/up.d.ts +4 -0
  436. package/registry/examples/section-backdrop/up.js +11 -0
  437. package/registry/examples/section-backdrop/up.tsx +10 -0
  438. package/registry/examples/segmented/native/default.d.ts +4 -0
  439. package/registry/examples/segmented/native/default.dark.png +0 -0
  440. package/registry/examples/segmented/native/default.js +19 -0
  441. package/registry/examples/segmented/native/default.light.png +0 -0
  442. package/registry/examples/segmented/native/default.tsx +19 -0
  443. package/registry/examples/segmented/native/small.d.ts +4 -0
  444. package/registry/examples/segmented/native/small.dark.png +0 -0
  445. package/registry/examples/segmented/native/small.js +19 -0
  446. package/registry/examples/segmented/native/small.light.png +0 -0
  447. package/registry/examples/segmented/native/small.tsx +19 -0
  448. package/registry/examples/separator/horizontal.d.ts +4 -0
  449. package/registry/{demos/separator.js → examples/separator/horizontal.js} +3 -3
  450. package/registry/{demos/separator.tsx → examples/separator/horizontal.tsx} +1 -1
  451. package/registry/examples/separator/vertical.d.ts +4 -0
  452. package/registry/examples/separator/vertical.js +17 -0
  453. package/registry/examples/separator/vertical.tsx +14 -0
  454. package/registry/examples/skeleton/circle.d.ts +4 -0
  455. package/registry/examples/skeleton/circle.js +11 -0
  456. package/registry/examples/skeleton/circle.tsx +5 -0
  457. package/registry/examples/skeleton/composition.d.ts +4 -0
  458. package/registry/{demos/skeleton.js → examples/skeleton/composition.js} +3 -3
  459. package/registry/{demos/skeleton.tsx → examples/skeleton/composition.tsx} +1 -1
  460. package/registry/examples/skeleton/native/shapes.d.ts +4 -0
  461. package/registry/examples/skeleton/native/shapes.dark.png +0 -0
  462. package/registry/examples/skeleton/native/shapes.js +21 -0
  463. package/registry/examples/skeleton/native/shapes.light.png +0 -0
  464. package/registry/examples/skeleton/native/shapes.tsx +18 -0
  465. package/registry/examples/skeleton/rect.d.ts +4 -0
  466. package/registry/examples/skeleton/rect.js +11 -0
  467. package/registry/examples/skeleton/rect.tsx +5 -0
  468. package/registry/examples/skeleton/text.d.ts +4 -0
  469. package/registry/examples/skeleton/text.js +11 -0
  470. package/registry/examples/skeleton/text.tsx +5 -0
  471. package/registry/examples/slider/centred.d.ts +4 -0
  472. package/registry/examples/slider/centred.js +11 -0
  473. package/registry/examples/slider/centred.tsx +8 -0
  474. package/registry/examples/slider/default.d.ts +4 -0
  475. package/registry/{demos/slider.js → examples/slider/default.js} +3 -3
  476. package/registry/{demos/slider.tsx → examples/slider/default.tsx} +1 -1
  477. package/registry/examples/slider/disabled.d.ts +4 -0
  478. package/registry/examples/slider/disabled.js +11 -0
  479. package/registry/examples/slider/disabled.tsx +5 -0
  480. package/registry/examples/slider/range.d.ts +4 -0
  481. package/registry/examples/slider/range.js +22 -0
  482. package/registry/examples/slider/range.tsx +18 -0
  483. package/registry/examples/slider/with-label.d.ts +4 -0
  484. package/registry/examples/slider/with-label.js +11 -0
  485. package/registry/examples/slider/with-label.tsx +8 -0
  486. package/registry/examples/slot/as-child.d.ts +4 -0
  487. package/registry/{demos/slot.js → examples/slot/as-child.js} +3 -3
  488. package/registry/{demos/slot.tsx → examples/slot/as-child.tsx} +1 -1
  489. package/registry/examples/slot/visually-hidden.d.ts +4 -0
  490. package/registry/examples/slot/visually-hidden.js +14 -0
  491. package/registry/examples/slot/visually-hidden.tsx +13 -0
  492. package/registry/examples/spinner/default.d.ts +4 -0
  493. package/registry/{demos/spinner.js → examples/spinner/default.js} +3 -3
  494. package/registry/{demos/spinner.tsx → examples/spinner/default.tsx} +1 -1
  495. package/registry/examples/spinner/muted.d.ts +4 -0
  496. package/registry/examples/spinner/muted.js +11 -0
  497. package/registry/examples/spinner/muted.tsx +6 -0
  498. package/registry/examples/spinner/native/sizes.d.ts +4 -0
  499. package/registry/examples/spinner/native/sizes.dark.png +0 -0
  500. package/registry/examples/spinner/native/sizes.js +16 -0
  501. package/registry/examples/spinner/native/sizes.light.png +0 -0
  502. package/registry/examples/spinner/native/sizes.tsx +13 -0
  503. package/registry/examples/spinner/sizes.d.ts +4 -0
  504. package/registry/examples/spinner/sizes.js +15 -0
  505. package/registry/examples/spinner/sizes.tsx +11 -0
  506. package/registry/examples/stat/down.d.ts +4 -0
  507. package/registry/examples/stat/down.js +11 -0
  508. package/registry/examples/stat/down.tsx +5 -0
  509. package/registry/examples/stat/flat.d.ts +4 -0
  510. package/registry/examples/stat/flat.js +11 -0
  511. package/registry/examples/stat/flat.tsx +5 -0
  512. package/registry/examples/stat/plain.d.ts +4 -0
  513. package/registry/examples/stat/plain.js +11 -0
  514. package/registry/examples/stat/plain.tsx +5 -0
  515. package/registry/examples/stat/row.d.ts +4 -0
  516. package/registry/examples/stat/row.js +15 -0
  517. package/registry/examples/stat/row.tsx +12 -0
  518. package/registry/examples/stat/up.d.ts +4 -0
  519. package/registry/{demos/stat.js → examples/stat/up.js} +3 -3
  520. package/registry/{demos/stat.tsx → examples/stat/up.tsx} +1 -1
  521. package/registry/examples/switch/disabled.d.ts +4 -0
  522. package/registry/examples/switch/disabled.js +14 -0
  523. package/registry/examples/switch/disabled.tsx +10 -0
  524. package/registry/examples/switch/off.d.ts +4 -0
  525. package/registry/{demos/switch.js → examples/switch/off.js} +3 -3
  526. package/registry/{demos/switch.tsx → examples/switch/off.tsx} +1 -1
  527. package/registry/examples/switch/on.d.ts +4 -0
  528. package/registry/examples/switch/on.js +11 -0
  529. package/registry/examples/switch/on.tsx +5 -0
  530. package/registry/examples/switch/small.d.ts +4 -0
  531. package/registry/examples/switch/small.js +11 -0
  532. package/registry/examples/switch/small.tsx +5 -0
  533. package/registry/examples/switch/with-label.d.ts +4 -0
  534. package/registry/examples/switch/with-label.js +18 -0
  535. package/registry/examples/switch/with-label.tsx +17 -0
  536. package/registry/examples/tabs/pills.d.ts +4 -0
  537. package/registry/examples/tabs/pills.js +20 -0
  538. package/registry/examples/tabs/pills.tsx +23 -0
  539. package/registry/examples/tabs/segmented.d.ts +4 -0
  540. package/registry/examples/tabs/segmented.js +20 -0
  541. package/registry/examples/tabs/segmented.tsx +23 -0
  542. package/registry/examples/tabs/underline.d.ts +4 -0
  543. package/registry/{demos/tabs.js → examples/tabs/underline.js} +3 -3
  544. package/registry/{demos/tabs.tsx → examples/tabs/underline.tsx} +1 -1
  545. package/registry/examples/tabs/vertical.d.ts +4 -0
  546. package/registry/examples/tabs/vertical.js +20 -0
  547. package/registry/examples/tabs/vertical.tsx +23 -0
  548. package/registry/examples/theme/native/provider.d.ts +4 -0
  549. package/registry/examples/theme/native/provider.js +23 -0
  550. package/registry/examples/theme/native/provider.tsx +21 -0
  551. package/registry/examples/theme/secondary.d.ts +4 -0
  552. package/registry/examples/theme/secondary.js +11 -0
  553. package/registry/examples/theme/secondary.tsx +10 -0
  554. package/registry/examples/theme/toggle.d.ts +4 -0
  555. package/registry/{demos/theme.js → examples/theme/toggle.js} +3 -3
  556. package/registry/{demos/theme.tsx → examples/theme/toggle.tsx} +1 -1
  557. package/registry/examples/toast/custom.d.ts +4 -0
  558. package/registry/examples/toast/custom.js +30 -0
  559. package/registry/examples/toast/custom.tsx +35 -0
  560. package/registry/examples/toast/native/notification.d.ts +4 -0
  561. package/registry/examples/toast/native/notification.dark.png +0 -0
  562. package/registry/examples/toast/native/notification.js +29 -0
  563. package/registry/examples/toast/native/notification.light.png +0 -0
  564. package/registry/examples/toast/native/notification.tsx +30 -0
  565. package/registry/examples/toast/native/tones.d.ts +4 -0
  566. package/registry/examples/toast/native/tones.dark.png +0 -0
  567. package/registry/examples/toast/native/tones.js +28 -0
  568. package/registry/examples/toast/native/tones.light.png +0 -0
  569. package/registry/examples/toast/native/tones.tsx +25 -0
  570. package/registry/examples/toast/tones.d.ts +4 -0
  571. package/registry/{demos/toast.js → examples/toast/tones.js} +3 -3
  572. package/registry/{demos/toast.tsx → examples/toast/tones.tsx} +1 -1
  573. package/registry/examples/tooltip/right.d.ts +4 -0
  574. package/registry/examples/tooltip/right.js +15 -0
  575. package/registry/examples/tooltip/right.tsx +15 -0
  576. package/registry/examples/tooltip/top.d.ts +4 -0
  577. package/registry/{demos/tooltip.js → examples/tooltip/top.js} +3 -3
  578. package/registry/{demos/tooltip.tsx → examples/tooltip/top.tsx} +1 -1
  579. package/registry/examples/txt/native/tones.d.ts +4 -0
  580. package/registry/examples/txt/native/tones.dark.png +0 -0
  581. package/registry/examples/txt/native/tones.js +16 -0
  582. package/registry/examples/txt/native/tones.light.png +0 -0
  583. package/registry/examples/txt/native/tones.tsx +17 -0
  584. package/registry/examples/txt/native/variants.d.ts +4 -0
  585. package/registry/examples/txt/native/variants.dark.png +0 -0
  586. package/registry/examples/txt/native/variants.js +18 -0
  587. package/registry/examples/txt/native/variants.light.png +0 -0
  588. package/registry/examples/txt/native/variants.tsx +15 -0
  589. package/registry/field.json +141 -3
  590. package/registry/index.json +353 -33
  591. package/registry/kbd.json +90 -3
  592. package/registry/page-header.json +121 -3
  593. package/registry/popover.json +90 -3
  594. package/registry/progress.json +265 -3
  595. package/registry/radio-group.json +136 -3
  596. package/registry/section-backdrop.json +144 -3
  597. package/registry/segmented.json +125 -0
  598. package/registry/separator.json +67 -3
  599. package/registry/skeleton.json +166 -3
  600. package/registry/slider.json +177 -3
  601. package/registry/slot.json +79 -3
  602. package/registry/spinner.json +144 -3
  603. package/registry/stat.json +140 -3
  604. package/registry/switch.json +130 -3
  605. package/registry/tabs.json +117 -3
  606. package/registry/theme.json +189 -3
  607. package/registry/toast.json +190 -3
  608. package/registry/tooltip.json +143 -3
  609. package/registry/txt.json +97 -0
  610. package/registry/demos/alert.d.ts +0 -5
  611. package/registry/demos/avatar.d.ts +0 -5
  612. package/registry/demos/badge.d.ts +0 -5
  613. package/registry/demos/button.d.ts +0 -5
  614. package/registry/demos/card.d.ts +0 -5
  615. package/registry/demos/checkbox.d.ts +0 -5
  616. package/registry/demos/chip.d.ts +0 -5
  617. package/registry/demos/cn.d.ts +0 -7
  618. package/registry/demos/command.d.ts +0 -5
  619. package/registry/demos/confirm-button.d.ts +0 -5
  620. package/registry/demos/countdown.d.ts +0 -5
  621. package/registry/demos/dialog.d.ts +0 -7
  622. package/registry/demos/dropdown-menu.d.ts +0 -7
  623. package/registry/demos/empty-state.d.ts +0 -5
  624. package/registry/demos/field.d.ts +0 -5
  625. package/registry/demos/kbd.d.ts +0 -5
  626. package/registry/demos/page-header.d.ts +0 -5
  627. package/registry/demos/popover.d.ts +0 -7
  628. package/registry/demos/progress.d.ts +0 -5
  629. package/registry/demos/radio-group.d.ts +0 -5
  630. package/registry/demos/section-backdrop.d.ts +0 -5
  631. package/registry/demos/separator.d.ts +0 -5
  632. package/registry/demos/skeleton.d.ts +0 -5
  633. package/registry/demos/slider.d.ts +0 -5
  634. package/registry/demos/slot.d.ts +0 -5
  635. package/registry/demos/spinner.d.ts +0 -5
  636. package/registry/demos/stat.d.ts +0 -5
  637. package/registry/demos/switch.d.ts +0 -5
  638. package/registry/demos/tabs.d.ts +0 -5
  639. package/registry/demos/theme.d.ts +0 -5
  640. package/registry/demos/toast.d.ts +0 -8
  641. package/registry/demos/tooltip.d.ts +0 -7
package/README.md CHANGED
@@ -153,7 +153,7 @@ Colours are roles of the preset (`bg-surface-2`, `text-fg-secondary`, `border-bo
153
153
  | `@krizaka/ui` | the marks, `MotionObserver`, `RotatingWord`, `cx` (unchanged) | client |
154
154
  | `@krizaka/ui/native` | React Native: `ThemeProvider`/`useTheme`, `Txt`, `Button`, `IconButton`, `Card.*`, `Badge`, `Chip` (+ `Group`), `Avatar` (+ `Group`), `Skeleton`, `EmptyState`, `Spinner`, `Countdown`, `Segmented`, `Progress`, `Toaster`/`toast`, the marks — see [React Native](#react-native) | native |
155
155
  | `@krizaka/ui/motion.css`, `@krizaka/ui/tailwind.css` | the motion signature; the `@source` of the primitives' classes | CSS |
156
- | `@krizaka/ui/registry/<name>`, `@krizaka/ui/registry/demos/<name>` | the registry (JSON) and the demos — see [Registry](#registry) | data · client |
156
+ | `@krizaka/ui/registry/<name>`, `@krizaka/ui/registry/examples/<name>/<example>` | the registry (JSON) and the examples — see [Registry](#registry--the-code-drives-the-documentation) | data · client |
157
157
 
158
158
  The theme is one mechanism for every product: dark by default, `html.light` for light, `html.theme-<name>` for a named
159
159
  theme, persisted as `kz-theme` (and `kz-theme-name`).
@@ -168,34 +168,48 @@ theme, persisted as `kz-theme` (and `kz-theme-name`).
168
168
  <ThemeToggle label={(mode) => t(`theme.${mode}`)} />
169
169
  ```
170
170
 
171
- ## Registry
172
-
173
- Every primitive is also published as data, for documentation sites (krizaka.com's `/docs/ui`: live preview, copyable
174
- code, props table) and, later, a `npx @krizaka/cli add <name>` that copies a primitive into a product which forks it
175
- knowingly. Built by `scripts/build-registry.mjs` after tsup, from `src/<name>/` (all primitives; not the marks, the
176
- motion or `native`):
171
+ ## Registry — the code drives the documentation
172
+
173
+ Every component is also published as data: **[krizaka.com/docs/ui](https://www.krizaka.com/docs/ui)** is generated
174
+ from it at every build of the site (one page per component: when to use it, live examples with their code for the web
175
+ and React Native, props, accessibility), and, later, a `npx @krizaka/cli add <name>` may copy a primitive into a
176
+ product that forks it knowingly. Built by `scripts/build-registry.mjs` after tsup, from three sources in the code:
177
+
178
+ - **`meta.ts`** beside each component (`src/<name>/meta.ts`, `src/cn.meta.ts`; a React-Native-only component:
179
+ `src/native/meta/<name>.ts`), typed by `src/meta.ts`: title, summary, status (`stable` · `beta`), category,
180
+ platforms (`web` · `native` · `both`), when to use it, when not (and what to use instead), best practices,
181
+ accessibility (keyboard, roles), related components, and per platform the names to import, the named examples and,
182
+ for React Native, what differs from the web API. A typed module rather than JSDoc tags: the fields are lists and
183
+ links between components, which the compiler checks; the file is plain data that Node reads without a build.
184
+ - **Named examples**: `registry/examples/<name>/<example>.tsx` (web) and `registry/examples/<name>/native/<example>.tsx`
185
+ (React Native) — one per significant variant, ≤ 40 lines, importing what a product imports (`@krizaka/ui/<entry>`,
186
+ `@krizaka/ui/native`, `react-native`). The stories render them, so Storybook's visual tests and the docs show the
187
+ same code. An example that opens over the page takes `defaultOpen` (the story opens it; the docs leave it closed).
188
+ - **Props** of the web and native components, read by `react-docgen-typescript` from the JSDoc of their props types:
189
+ own props only (inherited DOM, Radix and `Pressable` props are left out).
190
+
191
+ `scripts/registry.test.mjs` fails when a component has no `meta.ts`, an empty section, an unknown related component, a
192
+ platform that does not match its exports, an example missing or longer than 40 lines, or a prop without a
193
+ description; `src/registry.test.tsx` (Vitest, axe) and `src/native/examples.test.tsx` (Jest) render every example.
177
194
 
178
195
  | Path | What |
179
196
  | :-- | :-- |
180
- | `@krizaka/ui/registry/index` | `{ name, version, items: [{ name, type, description, dependencies, registryDependencies }] }` |
181
- | `@krizaka/ui/registry/<name>` | `{ name, type: "primitive", description, files: [{ path, content }], dependencies, registryDependencies, demo: { path, content }, props }` |
182
- | `@krizaka/ui/registry/demos/<name>` | the demo, compiled (ESM, `"use client"`, `default` export) — its source ships beside it as `registry/demos/<name>.tsx` |
197
+ | `@krizaka/ui/registry/index` | `{ name, version, items: [{ name, type, title, summary, status, category, platforms, examples: { web, native }, dependencies, registryDependencies }] }` |
198
+ | `@krizaka/ui/registry/<name>` | the `meta.ts` fields, `web` and `native` (`{ entry, import, props, examples: [{ name, title, description, path, module, code }] }`, `native` adds `differences` and, per example, `screenshots: { dark, light }`), and for a web primitive `files: [{ path, content }]`, `dependencies`, `registryDependencies`, `demo` (its first example) and `props` |
199
+ | `@krizaka/ui/registry/examples/<name>/<example>` | an example, compiled (ESM, `"use client"`, `default` export); its source ships beside it (`.tsx`), and a React Native example its screenshots (`<example>.dark.png`, `<example>.light.png`: the Linux baselines of its story — React Native has no live preview on the web) |
183
200
 
184
201
  - `files` are the sources (paths from `src/`); `dependencies` are npm `name@range` (React aside); `registryDependencies`
185
- are the other primitives it imports (`cn`, `button`…).
202
+ are the other primitives it imports (`cn`, `button`…). `type` is `primitive` (a web entry) or `native` (React Native
203
+ only: `segmented`, `txt`).
186
204
  - `props` is one entry per exported component — `{ component, description, props: [{ name, type, default, description,
187
- required }] }` — read by `react-docgen-typescript` from the JSDoc of the props types: the component's own props,
188
- its variants included; inherited DOM and Radix props are left out. A test fails on a prop without a description.
189
- - A demo is ≤ 40 lines, imports the primitives as a product does (`@krizaka/ui/<name>`) and is the default story of
190
- the primitive: Storybook and the docs show the same code. A demo that opens over the page takes `defaultOpen` (the
191
- story opens it for the screenshot; the docs leave it closed).
205
+ required }] }`.
192
206
 
193
207
  ```ts
194
- import card from "@krizaka/ui/registry/card" with { type: "json" };
195
- import CardDemo from "@krizaka/ui/registry/demos/card";
208
+ import button from "@krizaka/ui/registry/button" with { type: "json" };
209
+ import Primary from "@krizaka/ui/registry/examples/button/primary";
196
210
  ```
197
211
 
198
- A site that renders the demos adds them to Tailwind's sources: `@source "../node_modules/@krizaka/ui/registry/demos";`.
212
+ A site that renders the examples adds them to Tailwind's sources: `@source "../node_modules/@krizaka/ui/registry/examples";`.
199
213
 
200
214
  ## React Native
201
215
 
@@ -267,7 +281,8 @@ import { Button, Card, Countdown, OrochiaMark } from "@krizaka/ui/native";
267
281
  <OrochiaMark size={72} title="Orochia" neutral={theme.borderDefault} />
268
282
  ```
269
283
 
270
- The native stories (`Native/*` in the catalogue) render through react-native-web in the web Storybook: audited by axe
284
+ The native stories (`Native/*`, rendering the `registry/examples/<name>/native` examples) render through
285
+ react-native-web in the internal Storybook: audited by axe
271
286
  and screenshot-compared in dark and light like the web ones. Tests run on Jest with React Native's preset and
272
287
  Testing Library (`src/native/*.test.tsx`); `scripts/native-dist.mjs` checks that `dist/native.js` carries no
273
288
  `"use client"`, no DOM and no import beyond React, `react-native` and `react-native-svg`.
@@ -334,8 +349,8 @@ classes the components use are generated in your stylesheet.
334
349
  @import "@krizaka/ui/tailwind.css";
335
350
  ```
336
351
 
337
- Every component, in dark and light and under each product identity:
338
- [krizaka.github.io/krizaka-ui/latest](https://krizaka.github.io/krizaka-ui/latest/).
352
+ Every component, with when to use it, live examples and their code (web and React Native) and its props:
353
+ [krizaka.com/docs/ui](https://www.krizaka.com/docs/ui).
339
354
 
340
355
  ## Develop
341
356
 
package/dist/native.d.ts CHANGED
@@ -23,6 +23,7 @@ type BrandId = "krizaka" | "orazaka" | "orochia";
23
23
 
24
24
  type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
25
25
  type AvatarProps = Omit<ViewProps, "children"> & {
26
+ /** The image URI; absent, `null` or failing: the fallback. */
26
27
  src?: string | null;
27
28
  /** The person's name: the image's accessible name and the source of the default initial. */
28
29
  alt?: string;
@@ -48,7 +49,9 @@ declare const Avatar: typeof AvatarRoot & {
48
49
 
49
50
  type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger" | "scrim";
50
51
  type BadgeProps = ViewProps & {
52
+ /** neutral (default) · accent · success · warning · danger · scrim (on a media). */
51
53
  tone?: BadgeTone;
54
+ /** sm (default) · md. */
52
55
  size?: "sm" | "md";
53
56
  /** A small dot before the text, in the tone's colour. */
54
57
  dot?: boolean;
@@ -62,12 +65,15 @@ declare function Badge({ tone, size, dot, pulse, style, children, ...props }: Ba
62
65
  type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "danger";
63
66
  type ButtonSize = "sm" | "md" | "lg";
64
67
  type BaseProps = Omit<PressableProps, "children" | "style"> & {
68
+ /** The look: `primary`, `secondary` (default), `outline`, `ghost`, `danger` — as on the web. */
65
69
  variant?: ButtonVariant;
70
+ /** sm · md (default) · lg: 32, 40 or 48 points high. */
66
71
  size?: ButtonSize;
67
72
  /** `rounded` (default) or `pill`. */
68
73
  shape?: "rounded" | "pill";
69
74
  /** Disables, shows a spinner in place of the icon and says busy. */
70
75
  loading?: boolean;
76
+ /** Styles merged last, over the button's frame. */
71
77
  style?: StyleProp<ViewStyle>;
72
78
  };
73
79
  type ButtonProps = BaseProps & {
@@ -81,6 +87,7 @@ declare function Button({ label, icon, variant, size, shape, loading, disabled,
81
87
  type IconButtonProps = BaseProps & {
82
88
  /** The accessible name — required, passed translated. */
83
89
  label: string;
90
+ /** The icon (from the app's icon set); the button shows nothing else. */
84
91
  icon: React.ReactNode;
85
92
  };
86
93
  /** A square button holding only an icon: `label` is required, it is its accessible name. */
@@ -132,6 +139,7 @@ declare const textStyles: {
132
139
  type CardRootProps = ViewProps & {
133
140
  /** `default` (the raised surface) or `elevated` (one step higher, with a shadow). */
134
141
  tone?: "default" | "elevated";
142
+ /** The corner radius, from the theme: md · lg · xl (default). */
135
143
  radius?: "md" | "lg" | "xl";
136
144
  /**
137
145
  * Makes the whole card pressable: a button for screen readers, named by its content (an `aria-label`, if any, must
@@ -147,11 +155,13 @@ declare const ASPECT: {
147
155
  readonly portrait: number;
148
156
  };
149
157
  type CardMediaProps = ViewProps & {
158
+ /** video (default, 16:9) · square · portrait, or `auto` (the image's own). */
150
159
  aspect?: keyof typeof ASPECT | "auto";
151
160
  };
152
161
  /** The media area at the top of a card: a fixed ratio, the `media` role behind (what shows while an image loads). */
153
162
  declare function CardMedia({ aspect, style, ...props }: CardMediaProps): React.JSX.Element;
154
163
  type CardImageProps = Omit<ImageProps, "source" | "src"> & {
164
+ /** The image URI; absent or `null`: the `fallback` on the media colour. */
155
165
  src?: string | null;
156
166
  /** Shown when there is no image: an icon, an illustration (decorative). */
157
167
  fallback?: React.ReactNode;
@@ -160,6 +170,7 @@ type CardImageProps = Omit<ImageProps, "source" | "src"> & {
160
170
  declare function CardImage({ src, fallback, alt, style, ...props }: CardImageProps): React.JSX.Element;
161
171
  declare const CORNER: Record<"top-left" | "top-right" | "bottom-left" | "bottom-right", ViewStyle>;
162
172
  type CardOverlayProps = ViewProps & {
173
+ /** The corner of the media it sits in: top-left (default) · top-right · bottom-left · bottom-right. */
163
174
  corner?: keyof typeof CORNER;
164
175
  };
165
176
  /** What sits on the media (badges, a caption), in a corner. */
@@ -171,6 +182,7 @@ declare const PADDING: {
171
182
  readonly lg: 24;
172
183
  };
173
184
  type CardBodyProps = ViewProps & {
185
+ /** none · sm · md (default) · lg. */
174
186
  padding?: keyof typeof PADDING;
175
187
  };
176
188
  declare function CardBody({ padding, style, ...props }: CardBodyProps): React.JSX.Element;
@@ -192,7 +204,9 @@ declare const Card: {
192
204
 
193
205
  type ChipSize = "sm" | "md";
194
206
  type CommonProps = Omit<PressableProps, "children" | "style" | "onPress"> & {
207
+ /** sm · md (default); in a group, the group's size. */
195
208
  size?: ChipSize;
209
+ /** Styles merged last. */
196
210
  style?: StyleProp<ViewStyle>;
197
211
  /** The text (passed translated) or a node (an icon and a text). */
198
212
  children: React.ReactNode;
@@ -202,7 +216,9 @@ type ToggleChipProps = CommonProps & {
202
216
  value?: string;
203
217
  /** Alone: pressed or not (`defaultSelected` uncontrolled), `onSelectedChange` on every press. */
204
218
  selected?: boolean;
219
+ /** Uncontrolled: selected at first (alone, outside a group). */
205
220
  defaultSelected?: boolean;
221
+ /** Alone: called with the new state when it is pressed. */
206
222
  onSelectedChange?: (selected: boolean) => void;
207
223
  removable?: false;
208
224
  };
@@ -211,18 +227,21 @@ type RemovableChipProps = CommonProps & {
211
227
  removable: true;
212
228
  /** The accessible name of the remove button — passed translated, e.g. "Remove #night". */
213
229
  removeLabel: string;
230
+ /** Called when its remove button is pressed. */
214
231
  onRemove: () => void;
215
232
  };
216
233
  type ChipProps = ToggleChipProps | RemovableChipProps;
217
234
  /** A selectable pill (`selected` / `onSelectedChange`), an item of `Chip.Group` (`value`), or `removable`. */
218
235
  declare function ChipBase(props: ChipProps): React.JSX.Element;
219
236
  type GroupBase = {
237
+ /** sm · md (default); in a group, the group's size. */
220
238
  size?: ChipSize;
221
239
  disabled?: boolean;
222
240
  /** One horizontal scrolling row (a filter bar) instead of wrapping lines. */
223
241
  scrollable?: boolean;
224
242
  /** The accessible name of the group — passed translated. */
225
243
  "aria-label"?: string;
244
+ /** Styles merged last. */
226
245
  style?: StyleProp<ViewStyle>;
227
246
  children: React.ReactNode;
228
247
  };
@@ -245,6 +264,7 @@ declare const Chip: typeof ChipBase & {
245
264
  };
246
265
 
247
266
  type CountdownProps = {
267
+ /** The moment it counts down to: a Date, an ISO string or epoch milliseconds. */
248
268
  target: Date | string | number;
249
269
  /** Server clock − this clock, in milliseconds. */
250
270
  skewMs?: number;
@@ -252,9 +272,11 @@ type CountdownProps = {
252
272
  units: CountdownUnits;
253
273
  /** Below this many milliseconds it turns urgent (the danger role, the last segment breathes). Default 60 s. */
254
274
  urgentBelowMs?: number;
275
+ /** sm · md (default) · lg. */
255
276
  size?: "sm" | "md" | "lg";
256
277
  /** Accessible name, e.g. "Ends in". */
257
278
  label: string;
279
+ /** Styles merged last. */
258
280
  style?: StyleProp<ViewStyle>;
259
281
  };
260
282
  /**
@@ -267,7 +289,9 @@ declare function Countdown({ target, skewMs, units, urgentBelowMs, size, label,
267
289
  type EmptyStateProps = Omit<ViewProps, "children"> & {
268
290
  /** A decorative icon (hidden from screen readers). */
269
291
  icon?: React.ReactNode;
292
+ /** What is empty, in a few words ("No notifications yet"). */
270
293
  title: string;
294
+ /** Why, or what will fill it. */
271
295
  description?: string;
272
296
  /** What to do next: a Button. */
273
297
  action?: React.ReactNode;
@@ -314,9 +338,11 @@ declare function ProductMark({ id, ...props }: NativeMarkProps & {
314
338
  type ProgressProps = {
315
339
  /** `bar` (default) or `ring`. */
316
340
  variant?: "bar" | "ring";
341
+ /** sm · md (default) · lg: the bar's thickness or the ring's diameter. */
317
342
  size?: "sm" | "md" | "lg";
318
343
  /** How far, between 0 and `max`. `null` or absent: indeterminate (a wait of unknown length). */
319
344
  value?: number | null;
345
+ /** The value of a full bar. Default 100. */
320
346
  max?: number;
321
347
  /** The accessible name — passed translated ("Upload", "Raised towards the goal"). */
322
348
  label: string;
@@ -324,6 +350,7 @@ type ProgressProps = {
324
350
  valueText?: string;
325
351
  /** A ring's centre: an amount, a percentage, an icon. */
326
352
  children?: React.ReactNode;
353
+ /** Styles merged last. */
327
354
  style?: StyleProp<ViewStyle>;
328
355
  };
329
356
  /**
@@ -340,11 +367,15 @@ type SegmentedOption<T extends string> = {
340
367
  type SegmentedProps<T extends string> = {
341
368
  /** The views, in order; `label` passed translated. */
342
369
  options: readonly SegmentedOption<T>[];
370
+ /** The selected view (controlled). */
343
371
  value: T;
372
+ /** Called with the view pressed. */
344
373
  onValueChange: (value: T) => void;
374
+ /** sm · md (default). */
345
375
  size?: "sm" | "md";
346
376
  /** The accessible name of the tab list — passed translated. */
347
377
  "aria-label"?: string;
378
+ /** Styles merged last. */
348
379
  style?: StyleProp<ViewStyle>;
349
380
  };
350
381
  /**
@@ -356,9 +387,13 @@ declare function Segmented<T extends string>({ options, value, onValueChange, si
356
387
  type SkeletonProps = {
357
388
  /** `text` (a line), `circle` (an avatar), `rect` (a media, a card). */
358
389
  shape?: "text" | "circle" | "rect";
390
+ /** Points or a percentage; default: the shape's. */
359
391
  width?: DimensionValue;
392
+ /** Points or a percentage; default: the shape's. */
360
393
  height?: DimensionValue;
394
+ /** Styles merged last. */
361
395
  style?: StyleProp<ViewStyle>;
396
+ /** The id the tests find it by. */
362
397
  testID?: string;
363
398
  };
364
399
  /** A pulsing placeholder the size of what is loading — hidden from screen readers; still when the system reduces motion. */
@@ -367,6 +402,7 @@ declare function Skeleton({ shape, width, height, style, testID }: SkeletonProps
367
402
  type SpinnerProps = Omit<ActivityIndicatorProps, "size" | "color"> & {
368
403
  /** The accessible name of the wait, e.g. "Loading" — passed translated. */
369
404
  label: string;
405
+ /** sm · md (default) · lg. */
370
406
  size?: "sm" | "md" | "lg";
371
407
  };
372
408
  /** An indeterminate wait: the platform's activity indicator in the accent, named by `label`. */
@@ -451,6 +487,7 @@ type ThemeProviderProps = {
451
487
  onModeChange?: (mode: Mode) => void;
452
488
  /** The product's roles over the platform's, per theme. */
453
489
  overrides?: ThemeOverrides;
490
+ /** Font families the app has loaded (`expo-font`…); absent: the system font. */
454
491
  fonts?: ThemeFonts;
455
492
  };
456
493
  /** Once, at the root of the app. Without it, `useTheme()` follows the system with the platform's roles. */
@@ -499,6 +536,7 @@ declare const toast: typeof show & {
499
536
  type ToasterProps = {
500
537
  /** The accessible name of each toast's close button — passed translated. */
501
538
  closeLabel: string;
539
+ /** Where the toasts stack: `top` (default) or `bottom`. */
502
540
  position?: "top" | "bottom";
503
541
  /** Distance from the edge, e.g. the safe-area inset + a margin (no safe-area dependency here). */
504
542
  offset?: number;