@krizaka/ui 2.0.0-beta.5 → 2.0.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 (688) hide show
  1. package/README.md +44 -28
  2. package/dist/{button-D5aSsmxX.d.ts → button-Cgfkg_3y.d.ts} +5 -1
  3. package/dist/button.d.ts +5 -1
  4. package/dist/button.js +4 -2
  5. package/dist/button.js.map +1 -1
  6. package/dist/card.d.ts +7 -1
  7. package/dist/card.js +2 -2
  8. package/dist/card.js.map +1 -1
  9. package/dist/{chunk-IUGBKMJC.js → chunk-FHYZSO2S.js} +2 -2
  10. package/dist/{chunk-6DJ6SQY3.js → chunk-PESA2R4U.js} +5 -3
  11. package/dist/chunk-PESA2R4U.js.map +1 -0
  12. package/dist/command.d.ts +11 -2
  13. package/dist/command.js +17 -6
  14. package/dist/command.js.map +1 -1
  15. package/dist/confirm-button.d.ts +1 -1
  16. package/dist/confirm-button.js +1 -1
  17. package/dist/countdown.d.ts +7 -6
  18. package/dist/countdown.js +12 -8
  19. package/dist/countdown.js.map +1 -1
  20. package/dist/dialog.js +2 -2
  21. package/dist/dropdown-menu.js +3 -3
  22. package/dist/dropdown-menu.js.map +1 -1
  23. package/dist/field.js +2 -2
  24. package/dist/field.js.map +1 -1
  25. package/dist/native.d.ts +56 -6
  26. package/dist/native.js +129 -85
  27. package/dist/native.js.map +1 -1
  28. package/dist/theme.d.ts +1 -1
  29. package/dist/theme.js +1 -1
  30. package/package.json +11 -11
  31. package/registry/alert.json +141 -3
  32. package/registry/avatar.json +314 -3
  33. package/registry/badge.json +233 -3
  34. package/registry/button.json +522 -8
  35. package/registry/card.json +427 -4
  36. package/registry/checkbox.json +127 -3
  37. package/registry/chip.json +394 -3
  38. package/registry/cn.json +51 -3
  39. package/registry/command.json +246 -5
  40. package/registry/confirm-button.json +172 -5
  41. package/registry/countdown.json +318 -7
  42. package/registry/dialog.json +310 -3
  43. package/registry/dropdown-menu.json +117 -4
  44. package/registry/empty-state.json +170 -3
  45. package/registry/examples/alert/danger.d.ts +4 -0
  46. package/registry/examples/alert/danger.js +22 -0
  47. package/registry/examples/alert/danger.tsx +25 -0
  48. package/registry/examples/alert/info.d.ts +4 -0
  49. package/registry/{demos/alert.js → examples/alert/info.js} +3 -3
  50. package/registry/{demos/alert.tsx → examples/alert/info.tsx} +1 -1
  51. package/registry/examples/alert/success.d.ts +4 -0
  52. package/registry/examples/alert/success.js +12 -0
  53. package/registry/examples/alert/success.tsx +15 -0
  54. package/registry/examples/alert/title-only.d.ts +4 -0
  55. package/registry/examples/alert/title-only.js +11 -0
  56. package/registry/examples/alert/title-only.tsx +5 -0
  57. package/registry/examples/alert/warning.d.ts +4 -0
  58. package/registry/examples/alert/warning.js +13 -0
  59. package/registry/examples/alert/warning.tsx +17 -0
  60. package/registry/examples/avatar/fallback.d.ts +4 -0
  61. package/registry/examples/avatar/fallback.js +11 -0
  62. package/registry/examples/avatar/fallback.tsx +6 -0
  63. package/registry/examples/avatar/group.d.ts +4 -0
  64. package/registry/examples/avatar/group.js +20 -0
  65. package/registry/examples/avatar/group.tsx +21 -0
  66. package/registry/examples/avatar/native/group.d.ts +4 -0
  67. package/registry/examples/avatar/native/group.dark.png +0 -0
  68. package/registry/examples/avatar/native/group.js +17 -0
  69. package/registry/examples/avatar/native/group.light.png +0 -0
  70. package/registry/examples/avatar/native/group.tsx +13 -0
  71. package/registry/examples/avatar/native/sizes.d.ts +4 -0
  72. package/registry/examples/avatar/native/sizes.dark.png +0 -0
  73. package/registry/examples/avatar/native/sizes.js +18 -0
  74. package/registry/examples/avatar/native/sizes.light.png +0 -0
  75. package/registry/examples/avatar/native/sizes.tsx +15 -0
  76. package/registry/examples/avatar/sizes.d.ts +4 -0
  77. package/registry/examples/avatar/sizes.js +17 -0
  78. package/registry/examples/avatar/sizes.tsx +13 -0
  79. package/registry/examples/avatar/with-image.d.ts +4 -0
  80. package/registry/{demos/avatar.js → examples/avatar/with-image.js} +3 -3
  81. package/registry/{demos/avatar.tsx → examples/avatar/with-image.tsx} +1 -1
  82. package/registry/examples/badge/accent.d.ts +4 -0
  83. package/registry/examples/badge/accent.js +11 -0
  84. package/registry/examples/badge/accent.tsx +9 -0
  85. package/registry/examples/badge/danger.d.ts +4 -0
  86. package/registry/examples/badge/danger.js +11 -0
  87. package/registry/examples/badge/danger.tsx +9 -0
  88. package/registry/examples/badge/medium.d.ts +4 -0
  89. package/registry/examples/badge/medium.js +11 -0
  90. package/registry/examples/badge/medium.tsx +9 -0
  91. package/registry/examples/badge/native/dot.d.ts +4 -0
  92. package/registry/examples/badge/native/dot.dark.png +0 -0
  93. package/registry/examples/badge/native/dot.js +15 -0
  94. package/registry/examples/badge/native/dot.light.png +0 -0
  95. package/registry/examples/badge/native/dot.tsx +16 -0
  96. package/registry/examples/badge/native/scrim.d.ts +4 -0
  97. package/registry/examples/badge/native/scrim.dark.png +0 -0
  98. package/registry/examples/badge/native/scrim.js +13 -0
  99. package/registry/examples/badge/native/scrim.light.png +0 -0
  100. package/registry/examples/badge/native/scrim.tsx +14 -0
  101. package/registry/examples/badge/native/tones.d.ts +4 -0
  102. package/registry/examples/badge/native/tones.dark.png +0 -0
  103. package/registry/examples/badge/native/tones.js +18 -0
  104. package/registry/examples/badge/native/tones.light.png +0 -0
  105. package/registry/examples/badge/native/tones.tsx +14 -0
  106. package/registry/examples/badge/neutral.d.ts +4 -0
  107. package/registry/{demos/badge.js → examples/badge/neutral.js} +3 -3
  108. package/registry/{demos/badge.tsx → examples/badge/neutral.tsx} +1 -1
  109. package/registry/examples/badge/scrim.d.ts +4 -0
  110. package/registry/examples/badge/scrim.js +11 -0
  111. package/registry/examples/badge/scrim.tsx +10 -0
  112. package/registry/examples/badge/success.d.ts +4 -0
  113. package/registry/examples/badge/success.js +11 -0
  114. package/registry/examples/badge/success.tsx +9 -0
  115. package/registry/examples/badge/warning.d.ts +4 -0
  116. package/registry/examples/badge/warning.js +11 -0
  117. package/registry/examples/badge/warning.tsx +9 -0
  118. package/registry/examples/button/as-child-link.d.ts +4 -0
  119. package/registry/examples/button/as-child-link.js +11 -0
  120. package/registry/examples/button/as-child-link.tsx +10 -0
  121. package/registry/examples/button/danger.d.ts +4 -0
  122. package/registry/examples/button/danger.js +11 -0
  123. package/registry/examples/button/danger.tsx +5 -0
  124. package/registry/examples/button/disabled.d.ts +4 -0
  125. package/registry/examples/button/disabled.js +11 -0
  126. package/registry/examples/button/disabled.tsx +9 -0
  127. package/registry/examples/button/ghost.d.ts +4 -0
  128. package/registry/examples/button/ghost.js +11 -0
  129. package/registry/examples/button/ghost.tsx +5 -0
  130. package/registry/examples/button/gradient.d.ts +4 -0
  131. package/registry/examples/button/gradient.js +11 -0
  132. package/registry/examples/button/gradient.tsx +5 -0
  133. package/registry/examples/button/icon.d.ts +4 -0
  134. package/registry/examples/button/icon.js +14 -0
  135. package/registry/examples/button/icon.tsx +18 -0
  136. package/registry/examples/button/loading.d.ts +4 -0
  137. package/registry/examples/button/loading.js +11 -0
  138. package/registry/examples/button/loading.tsx +10 -0
  139. package/registry/examples/button/native/danger.d.ts +4 -0
  140. package/registry/examples/button/native/danger.dark.png +0 -0
  141. package/registry/examples/button/native/danger.js +12 -0
  142. package/registry/examples/button/native/danger.light.png +0 -0
  143. package/registry/examples/button/native/danger.tsx +5 -0
  144. package/registry/examples/button/native/disabled.d.ts +4 -0
  145. package/registry/examples/button/native/disabled.dark.png +0 -0
  146. package/registry/examples/button/native/disabled.js +11 -0
  147. package/registry/examples/button/native/disabled.light.png +0 -0
  148. package/registry/examples/button/native/disabled.tsx +5 -0
  149. package/registry/examples/button/native/ghost.d.ts +4 -0
  150. package/registry/examples/button/native/ghost.dark.png +0 -0
  151. package/registry/examples/button/native/ghost.js +12 -0
  152. package/registry/examples/button/native/ghost.light.png +0 -0
  153. package/registry/examples/button/native/ghost.tsx +5 -0
  154. package/registry/examples/button/native/gradient.d.ts +4 -0
  155. package/registry/examples/button/native/gradient.dark.png +0 -0
  156. package/registry/examples/button/native/gradient.js +12 -0
  157. package/registry/examples/button/native/gradient.light.png +0 -0
  158. package/registry/examples/button/native/gradient.tsx +5 -0
  159. package/registry/examples/button/native/icon-only.d.ts +4 -0
  160. package/registry/examples/button/native/icon-only.dark.png +0 -0
  161. package/registry/examples/button/native/icon-only.js +19 -0
  162. package/registry/examples/button/native/icon-only.light.png +0 -0
  163. package/registry/examples/button/native/icon-only.tsx +21 -0
  164. package/registry/examples/button/native/icon.d.ts +4 -0
  165. package/registry/examples/button/native/icon.dark.png +0 -0
  166. package/registry/examples/button/native/icon.js +16 -0
  167. package/registry/examples/button/native/icon.light.png +0 -0
  168. package/registry/examples/button/native/icon.tsx +15 -0
  169. package/registry/examples/button/native/loading.d.ts +4 -0
  170. package/registry/examples/button/native/loading.dark.png +0 -0
  171. package/registry/examples/button/native/loading.js +11 -0
  172. package/registry/examples/button/native/loading.light.png +0 -0
  173. package/registry/examples/button/native/loading.tsx +6 -0
  174. package/registry/examples/button/native/outline.d.ts +4 -0
  175. package/registry/examples/button/native/outline.dark.png +0 -0
  176. package/registry/examples/button/native/outline.js +12 -0
  177. package/registry/examples/button/native/outline.light.png +0 -0
  178. package/registry/examples/button/native/outline.tsx +5 -0
  179. package/registry/examples/button/native/primary.d.ts +4 -0
  180. package/registry/examples/button/native/primary.dark.png +0 -0
  181. package/registry/examples/button/native/primary.js +12 -0
  182. package/registry/examples/button/native/primary.light.png +0 -0
  183. package/registry/examples/button/native/primary.tsx +5 -0
  184. package/registry/examples/button/native/secondary.d.ts +4 -0
  185. package/registry/examples/button/native/secondary.dark.png +0 -0
  186. package/registry/examples/button/native/secondary.js +12 -0
  187. package/registry/examples/button/native/secondary.light.png +0 -0
  188. package/registry/examples/button/native/secondary.tsx +6 -0
  189. package/registry/examples/button/native/sizes.d.ts +4 -0
  190. package/registry/examples/button/native/sizes.dark.png +0 -0
  191. package/registry/examples/button/native/sizes.js +15 -0
  192. package/registry/examples/button/native/sizes.light.png +0 -0
  193. package/registry/examples/button/native/sizes.tsx +11 -0
  194. package/registry/examples/button/outline.d.ts +4 -0
  195. package/registry/examples/button/outline.js +11 -0
  196. package/registry/examples/button/outline.tsx +5 -0
  197. package/registry/examples/button/pill.d.ts +4 -0
  198. package/registry/examples/button/pill.js +11 -0
  199. package/registry/examples/button/pill.tsx +9 -0
  200. package/registry/examples/button/primary.d.ts +4 -0
  201. package/registry/{demos/button.js → examples/button/primary.js} +3 -3
  202. package/registry/{demos/button.tsx → examples/button/primary.tsx} +1 -1
  203. package/registry/examples/button/secondary.d.ts +4 -0
  204. package/registry/examples/button/secondary.js +11 -0
  205. package/registry/examples/button/secondary.tsx +6 -0
  206. package/registry/examples/button/sizes.d.ts +4 -0
  207. package/registry/examples/button/sizes.js +15 -0
  208. package/registry/examples/button/sizes.tsx +17 -0
  209. package/registry/examples/card/interactive-link.d.ts +4 -0
  210. package/registry/examples/card/interactive-link.js +15 -0
  211. package/registry/examples/card/interactive-link.tsx +16 -0
  212. package/registry/examples/card/media-card.d.ts +4 -0
  213. package/registry/{demos/card.js → examples/card/media-card.js} +3 -3
  214. package/registry/{demos/card.tsx → examples/card/media-card.tsx} +1 -1
  215. package/registry/examples/card/media-fallback.d.ts +4 -0
  216. package/registry/examples/card/media-fallback.js +18 -0
  217. package/registry/examples/card/media-fallback.tsx +22 -0
  218. package/registry/examples/card/native/body.d.ts +4 -0
  219. package/registry/examples/card/native/body.dark.png +0 -0
  220. package/registry/examples/card/native/body.js +15 -0
  221. package/registry/examples/card/native/body.light.png +0 -0
  222. package/registry/examples/card/native/body.tsx +13 -0
  223. package/registry/examples/card/native/default.d.ts +4 -0
  224. package/registry/examples/card/native/default.dark.png +0 -0
  225. package/registry/examples/card/native/default.js +24 -0
  226. package/registry/examples/card/native/default.light.png +0 -0
  227. package/registry/examples/card/native/default.tsx +28 -0
  228. package/registry/examples/card/native/elevated.d.ts +4 -0
  229. package/registry/examples/card/native/elevated.dark.png +0 -0
  230. package/registry/examples/card/native/elevated.js +24 -0
  231. package/registry/examples/card/native/elevated.light.png +0 -0
  232. package/registry/examples/card/native/elevated.tsx +28 -0
  233. package/registry/examples/card/native/pressable.d.ts +4 -0
  234. package/registry/examples/card/native/pressable.dark.png +0 -0
  235. package/registry/examples/card/native/pressable.js +15 -0
  236. package/registry/examples/card/native/pressable.light.png +0 -0
  237. package/registry/examples/card/native/pressable.tsx +13 -0
  238. package/registry/examples/card/reveal-grid.d.ts +4 -0
  239. package/registry/examples/card/reveal-grid.js +28 -0
  240. package/registry/examples/card/reveal-grid.tsx +31 -0
  241. package/registry/examples/card/stat-card.d.ts +4 -0
  242. package/registry/examples/card/stat-card.js +18 -0
  243. package/registry/examples/card/stat-card.tsx +17 -0
  244. package/registry/examples/checkbox/checked.d.ts +4 -0
  245. package/registry/examples/checkbox/checked.js +11 -0
  246. package/registry/examples/checkbox/checked.tsx +5 -0
  247. package/registry/examples/checkbox/disabled.d.ts +4 -0
  248. package/registry/examples/checkbox/disabled.js +14 -0
  249. package/registry/examples/checkbox/disabled.tsx +12 -0
  250. package/registry/examples/checkbox/indeterminate.d.ts +4 -0
  251. package/registry/examples/checkbox/indeterminate.js +11 -0
  252. package/registry/examples/checkbox/indeterminate.tsx +6 -0
  253. package/registry/examples/checkbox/invalid.d.ts +4 -0
  254. package/registry/examples/checkbox/invalid.js +15 -0
  255. package/registry/examples/checkbox/invalid.tsx +14 -0
  256. package/registry/examples/checkbox/unchecked.d.ts +4 -0
  257. package/registry/{demos/checkbox.js → examples/checkbox/unchecked.js} +3 -3
  258. package/registry/{demos/checkbox.tsx → examples/checkbox/unchecked.tsx} +2 -1
  259. package/registry/examples/chip/multiple.d.ts +4 -0
  260. package/registry/examples/chip/multiple.js +16 -0
  261. package/registry/examples/chip/multiple.tsx +12 -0
  262. package/registry/examples/chip/native/multiple.d.ts +4 -0
  263. package/registry/examples/chip/native/multiple.dark.png +0 -0
  264. package/registry/examples/chip/native/multiple.js +18 -0
  265. package/registry/examples/chip/native/multiple.light.png +0 -0
  266. package/registry/examples/chip/native/multiple.tsx +17 -0
  267. package/registry/examples/chip/native/removable.d.ts +4 -0
  268. package/registry/examples/chip/native/removable.dark.png +0 -0
  269. package/registry/examples/chip/native/removable.js +17 -0
  270. package/registry/examples/chip/native/removable.light.png +0 -0
  271. package/registry/examples/chip/native/removable.tsx +15 -0
  272. package/registry/examples/chip/native/single.d.ts +4 -0
  273. package/registry/examples/chip/native/single.dark.png +0 -0
  274. package/registry/examples/chip/native/single.js +15 -0
  275. package/registry/examples/chip/native/single.light.png +0 -0
  276. package/registry/examples/chip/native/single.tsx +11 -0
  277. package/registry/examples/chip/native/toggle.d.ts +4 -0
  278. package/registry/examples/chip/native/toggle.dark.png +0 -0
  279. package/registry/examples/chip/native/toggle.js +17 -0
  280. package/registry/examples/chip/native/toggle.light.png +0 -0
  281. package/registry/examples/chip/native/toggle.tsx +16 -0
  282. package/registry/examples/chip/removable.d.ts +4 -0
  283. package/registry/examples/chip/removable.js +16 -0
  284. package/registry/examples/chip/removable.tsx +15 -0
  285. package/registry/examples/chip/single.d.ts +4 -0
  286. package/registry/examples/chip/single.js +16 -0
  287. package/registry/examples/chip/single.tsx +13 -0
  288. package/registry/examples/chip/small.d.ts +4 -0
  289. package/registry/examples/chip/small.js +16 -0
  290. package/registry/examples/chip/small.tsx +12 -0
  291. package/registry/examples/chip/toggle.d.ts +4 -0
  292. package/registry/{demos/chip.js → examples/chip/toggle.js} +3 -3
  293. package/registry/{demos/chip.tsx → examples/chip/toggle.tsx} +2 -1
  294. package/registry/examples/cn/merge.d.ts +4 -0
  295. package/registry/{demos/cn.js → examples/cn/merge.js} +3 -3
  296. package/registry/{demos/cn.tsx → examples/cn/merge.tsx} +1 -1
  297. package/registry/examples/command/dialog.d.ts +4 -0
  298. package/registry/examples/command/dialog.js +39 -0
  299. package/registry/examples/command/dialog.tsx +35 -0
  300. package/registry/examples/command/inline.d.ts +4 -0
  301. package/registry/{demos/command.js → examples/command/inline.js} +4 -5
  302. package/registry/{demos/command.tsx → examples/command/inline.tsx} +2 -3
  303. package/registry/examples/command/no-results.d.ts +4 -0
  304. package/registry/examples/command/no-results.js +19 -0
  305. package/registry/examples/command/no-results.tsx +20 -0
  306. package/registry/examples/confirm-button/armed.d.ts +4 -0
  307. package/registry/examples/confirm-button/armed.js +12 -0
  308. package/registry/examples/confirm-button/armed.tsx +14 -0
  309. package/registry/examples/confirm-button/idle.d.ts +4 -0
  310. package/registry/{demos/confirm-button.js → examples/confirm-button/idle.js} +3 -3
  311. package/registry/{demos/confirm-button.tsx → examples/confirm-button/idle.tsx} +1 -1
  312. package/registry/examples/confirm-button/with-text.d.ts +4 -0
  313. package/registry/examples/confirm-button/with-text.js +12 -0
  314. package/registry/examples/confirm-button/with-text.tsx +12 -0
  315. package/registry/examples/countdown/days.d.ts +4 -0
  316. package/registry/examples/countdown/days.js +13 -0
  317. package/registry/examples/countdown/days.tsx +10 -0
  318. package/registry/examples/countdown/ended.d.ts +4 -0
  319. package/registry/examples/countdown/ended.js +13 -0
  320. package/registry/examples/countdown/ended.tsx +10 -0
  321. package/registry/examples/countdown/hours.d.ts +4 -0
  322. package/registry/{demos/countdown.js → examples/countdown/hours.js} +3 -3
  323. package/registry/{demos/countdown.tsx → examples/countdown/hours.tsx} +1 -1
  324. package/registry/examples/countdown/native/days.d.ts +4 -0
  325. package/registry/examples/countdown/native/days.dark.png +0 -0
  326. package/registry/examples/countdown/native/days.js +13 -0
  327. package/registry/examples/countdown/native/days.light.png +0 -0
  328. package/registry/examples/countdown/native/days.tsx +7 -0
  329. package/registry/examples/countdown/native/hours.d.ts +4 -0
  330. package/registry/examples/countdown/native/hours.dark.png +0 -0
  331. package/registry/examples/countdown/native/hours.js +13 -0
  332. package/registry/examples/countdown/native/hours.light.png +0 -0
  333. package/registry/examples/countdown/native/hours.tsx +7 -0
  334. package/registry/examples/countdown/native/sizes.d.ts +4 -0
  335. package/registry/examples/countdown/native/sizes.dark.png +0 -0
  336. package/registry/examples/countdown/native/sizes.js +18 -0
  337. package/registry/examples/countdown/native/sizes.light.png +0 -0
  338. package/registry/examples/countdown/native/sizes.tsx +15 -0
  339. package/registry/examples/countdown/native/urgent.d.ts +4 -0
  340. package/registry/examples/countdown/native/urgent.dark.png +0 -0
  341. package/registry/examples/countdown/native/urgent.js +13 -0
  342. package/registry/examples/countdown/native/urgent.light.png +0 -0
  343. package/registry/examples/countdown/native/urgent.tsx +7 -0
  344. package/registry/examples/countdown/native/with-label.d.ts +4 -0
  345. package/registry/examples/countdown/native/with-label.dark.png +0 -0
  346. package/registry/examples/countdown/native/with-label.js +13 -0
  347. package/registry/examples/countdown/native/with-label.light.png +0 -0
  348. package/registry/examples/countdown/native/with-label.tsx +7 -0
  349. package/registry/examples/countdown/sizes.d.ts +4 -0
  350. package/registry/examples/countdown/sizes.js +18 -0
  351. package/registry/examples/countdown/sizes.tsx +17 -0
  352. package/registry/examples/countdown/urgent.d.ts +4 -0
  353. package/registry/examples/countdown/urgent.js +13 -0
  354. package/registry/examples/countdown/urgent.tsx +10 -0
  355. package/registry/examples/countdown/with-label.d.ts +4 -0
  356. package/registry/examples/countdown/with-label.js +13 -0
  357. package/registry/examples/countdown/with-label.tsx +10 -0
  358. package/registry/examples/dialog/alert-destructive.d.ts +4 -0
  359. package/registry/examples/dialog/alert-destructive.js +24 -0
  360. package/registry/examples/dialog/alert-destructive.tsx +20 -0
  361. package/registry/examples/dialog/bottom.d.ts +4 -0
  362. package/registry/examples/dialog/bottom.js +29 -0
  363. package/registry/examples/dialog/bottom.tsx +32 -0
  364. package/registry/examples/dialog/center.d.ts +4 -0
  365. package/registry/{demos/dialog.js → examples/dialog/center.js} +3 -3
  366. package/registry/{demos/dialog.tsx → examples/dialog/center.tsx} +1 -1
  367. package/registry/examples/dialog/gate.d.ts +4 -0
  368. package/registry/examples/dialog/gate.js +24 -0
  369. package/registry/examples/dialog/gate.tsx +27 -0
  370. package/registry/examples/dialog/right.d.ts +4 -0
  371. package/registry/examples/dialog/right.js +29 -0
  372. package/registry/examples/dialog/right.tsx +32 -0
  373. package/registry/examples/dialog/sheet-form.d.ts +4 -0
  374. package/registry/examples/dialog/sheet-form.js +35 -0
  375. package/registry/examples/dialog/sheet-form.tsx +36 -0
  376. package/registry/examples/dropdown-menu/actions.d.ts +4 -0
  377. package/registry/{demos/dropdown-menu.js → examples/dropdown-menu/actions.js} +3 -3
  378. package/registry/{demos/dropdown-menu.tsx → examples/dropdown-menu/actions.tsx} +1 -1
  379. package/registry/examples/empty-state/default.d.ts +4 -0
  380. package/registry/{demos/empty-state.js → examples/empty-state/default.js} +3 -3
  381. package/registry/{demos/empty-state.tsx → examples/empty-state/default.tsx} +1 -1
  382. package/registry/examples/empty-state/native/default.d.ts +4 -0
  383. package/registry/examples/empty-state/native/default.dark.png +0 -0
  384. package/registry/examples/empty-state/native/default.js +25 -0
  385. package/registry/examples/empty-state/native/default.light.png +0 -0
  386. package/registry/examples/empty-state/native/default.tsx +25 -0
  387. package/registry/examples/empty-state/title-only.d.ts +4 -0
  388. package/registry/examples/empty-state/title-only.js +11 -0
  389. package/registry/examples/empty-state/title-only.tsx +5 -0
  390. package/registry/examples/empty-state/with-action.d.ts +4 -0
  391. package/registry/examples/empty-state/with-action.js +24 -0
  392. package/registry/examples/empty-state/with-action.tsx +25 -0
  393. package/registry/examples/field/default.d.ts +4 -0
  394. package/registry/{demos/field.js → examples/field/default.js} +3 -3
  395. package/registry/{demos/field.tsx → examples/field/default.tsx} +1 -1
  396. package/registry/examples/field/disabled.d.ts +4 -0
  397. package/registry/examples/field/disabled.js +14 -0
  398. package/registry/examples/field/disabled.tsx +10 -0
  399. package/registry/examples/field/invalid.d.ts +4 -0
  400. package/registry/examples/field/invalid.js +15 -0
  401. package/registry/examples/field/invalid.tsx +12 -0
  402. package/registry/examples/field/select.d.ts +4 -0
  403. package/registry/examples/field/select.js +18 -0
  404. package/registry/examples/field/select.tsx +15 -0
  405. package/registry/examples/field/textarea.d.ts +4 -0
  406. package/registry/examples/field/textarea.js +14 -0
  407. package/registry/examples/field/textarea.tsx +10 -0
  408. package/registry/examples/kbd/key.d.ts +4 -0
  409. package/registry/{demos/kbd.js → examples/kbd/key.js} +3 -3
  410. package/registry/{demos/kbd.tsx → examples/kbd/key.tsx} +1 -1
  411. package/registry/examples/kbd/shortcut.d.ts +4 -0
  412. package/registry/examples/kbd/shortcut.js +15 -0
  413. package/registry/examples/kbd/shortcut.tsx +11 -0
  414. package/registry/examples/kbd/small.d.ts +4 -0
  415. package/registry/examples/kbd/small.js +11 -0
  416. package/registry/examples/kbd/small.tsx +5 -0
  417. package/registry/examples/page-header/default.d.ts +4 -0
  418. package/registry/{demos/page-header.js → examples/page-header/default.js} +3 -3
  419. package/registry/{demos/page-header.tsx → examples/page-header/default.tsx} +1 -1
  420. package/registry/examples/page-header/with-actions.d.ts +4 -0
  421. package/registry/examples/page-header/with-actions.js +22 -0
  422. package/registry/examples/page-header/with-actions.tsx +17 -0
  423. package/registry/examples/page-header/with-breadcrumb.d.ts +4 -0
  424. package/registry/examples/page-header/with-breadcrumb.js +24 -0
  425. package/registry/examples/page-header/with-breadcrumb.tsx +26 -0
  426. package/registry/examples/popover/form.d.ts +4 -0
  427. package/registry/{demos/popover.js → examples/popover/form.js} +3 -3
  428. package/registry/{demos/popover.tsx → examples/popover/form.tsx} +1 -1
  429. package/registry/examples/progress/bar-indeterminate.d.ts +4 -0
  430. package/registry/examples/progress/bar-indeterminate.js +11 -0
  431. package/registry/examples/progress/bar-indeterminate.tsx +6 -0
  432. package/registry/examples/progress/bar-sizes.d.ts +4 -0
  433. package/registry/examples/progress/bar-sizes.js +15 -0
  434. package/registry/examples/progress/bar-sizes.tsx +11 -0
  435. package/registry/examples/progress/bar.d.ts +4 -0
  436. package/registry/{demos/progress.js → examples/progress/bar.js} +3 -3
  437. package/registry/{demos/progress.tsx → examples/progress/bar.tsx} +1 -1
  438. package/registry/examples/progress/native/bar.d.ts +4 -0
  439. package/registry/examples/progress/native/bar.dark.png +0 -0
  440. package/registry/examples/progress/native/bar.js +16 -0
  441. package/registry/examples/progress/native/bar.light.png +0 -0
  442. package/registry/examples/progress/native/bar.tsx +12 -0
  443. package/registry/examples/progress/native/indeterminate.d.ts +4 -0
  444. package/registry/examples/progress/native/indeterminate.dark.png +0 -0
  445. package/registry/examples/progress/native/indeterminate.js +15 -0
  446. package/registry/examples/progress/native/indeterminate.light.png +0 -0
  447. package/registry/examples/progress/native/indeterminate.tsx +12 -0
  448. package/registry/examples/progress/native/ring.d.ts +4 -0
  449. package/registry/examples/progress/native/ring.dark.png +0 -0
  450. package/registry/examples/progress/native/ring.js +19 -0
  451. package/registry/examples/progress/native/ring.light.png +0 -0
  452. package/registry/examples/progress/native/ring.tsx +19 -0
  453. package/registry/examples/progress/ring-indeterminate.d.ts +4 -0
  454. package/registry/examples/progress/ring-indeterminate.js +11 -0
  455. package/registry/examples/progress/ring-indeterminate.tsx +5 -0
  456. package/registry/examples/progress/ring.d.ts +4 -0
  457. package/registry/examples/progress/ring.js +18 -0
  458. package/registry/examples/progress/ring.tsx +17 -0
  459. package/registry/examples/radio-group/cards.d.ts +4 -0
  460. package/registry/examples/radio-group/cards.js +19 -0
  461. package/registry/examples/radio-group/cards.tsx +21 -0
  462. package/registry/examples/radio-group/horizontal.d.ts +4 -0
  463. package/registry/examples/radio-group/horizontal.js +15 -0
  464. package/registry/examples/radio-group/horizontal.tsx +12 -0
  465. package/registry/examples/radio-group/items.d.ts +4 -0
  466. package/registry/{demos/radio-group.js → examples/radio-group/items.js} +3 -3
  467. package/registry/{demos/radio-group.tsx → examples/radio-group/items.tsx} +1 -1
  468. package/registry/examples/section-backdrop/depth-of-field.d.ts +4 -0
  469. package/registry/examples/section-backdrop/depth-of-field.js +18 -0
  470. package/registry/examples/section-backdrop/depth-of-field.tsx +13 -0
  471. package/registry/examples/section-backdrop/hero.d.ts +4 -0
  472. package/registry/{demos/section-backdrop.js → examples/section-backdrop/hero.js} +3 -3
  473. package/registry/{demos/section-backdrop.tsx → examples/section-backdrop/hero.tsx} +1 -1
  474. package/registry/examples/section-backdrop/plain.d.ts +4 -0
  475. package/registry/examples/section-backdrop/plain.js +11 -0
  476. package/registry/examples/section-backdrop/plain.tsx +10 -0
  477. package/registry/examples/section-backdrop/sequence.d.ts +4 -0
  478. package/registry/examples/section-backdrop/sequence.js +14 -0
  479. package/registry/examples/section-backdrop/sequence.tsx +15 -0
  480. package/registry/examples/section-backdrop/up.d.ts +4 -0
  481. package/registry/examples/section-backdrop/up.js +11 -0
  482. package/registry/examples/section-backdrop/up.tsx +10 -0
  483. package/registry/examples/segmented/native/default.d.ts +4 -0
  484. package/registry/examples/segmented/native/default.dark.png +0 -0
  485. package/registry/examples/segmented/native/default.js +19 -0
  486. package/registry/examples/segmented/native/default.light.png +0 -0
  487. package/registry/examples/segmented/native/default.tsx +19 -0
  488. package/registry/examples/segmented/native/small.d.ts +4 -0
  489. package/registry/examples/segmented/native/small.dark.png +0 -0
  490. package/registry/examples/segmented/native/small.js +19 -0
  491. package/registry/examples/segmented/native/small.light.png +0 -0
  492. package/registry/examples/segmented/native/small.tsx +19 -0
  493. package/registry/examples/separator/horizontal.d.ts +4 -0
  494. package/registry/{demos/separator.js → examples/separator/horizontal.js} +3 -3
  495. package/registry/{demos/separator.tsx → examples/separator/horizontal.tsx} +1 -1
  496. package/registry/examples/separator/vertical.d.ts +4 -0
  497. package/registry/examples/separator/vertical.js +17 -0
  498. package/registry/examples/separator/vertical.tsx +14 -0
  499. package/registry/examples/skeleton/circle.d.ts +4 -0
  500. package/registry/examples/skeleton/circle.js +11 -0
  501. package/registry/examples/skeleton/circle.tsx +5 -0
  502. package/registry/examples/skeleton/composition.d.ts +4 -0
  503. package/registry/{demos/skeleton.js → examples/skeleton/composition.js} +3 -3
  504. package/registry/{demos/skeleton.tsx → examples/skeleton/composition.tsx} +1 -1
  505. package/registry/examples/skeleton/native/shapes.d.ts +4 -0
  506. package/registry/examples/skeleton/native/shapes.dark.png +0 -0
  507. package/registry/examples/skeleton/native/shapes.js +21 -0
  508. package/registry/examples/skeleton/native/shapes.light.png +0 -0
  509. package/registry/examples/skeleton/native/shapes.tsx +18 -0
  510. package/registry/examples/skeleton/rect.d.ts +4 -0
  511. package/registry/examples/skeleton/rect.js +11 -0
  512. package/registry/examples/skeleton/rect.tsx +5 -0
  513. package/registry/examples/skeleton/text.d.ts +4 -0
  514. package/registry/examples/skeleton/text.js +11 -0
  515. package/registry/examples/skeleton/text.tsx +5 -0
  516. package/registry/examples/slider/centred.d.ts +4 -0
  517. package/registry/examples/slider/centred.js +11 -0
  518. package/registry/examples/slider/centred.tsx +8 -0
  519. package/registry/examples/slider/default.d.ts +4 -0
  520. package/registry/{demos/slider.js → examples/slider/default.js} +3 -3
  521. package/registry/{demos/slider.tsx → examples/slider/default.tsx} +1 -1
  522. package/registry/examples/slider/disabled.d.ts +4 -0
  523. package/registry/examples/slider/disabled.js +11 -0
  524. package/registry/examples/slider/disabled.tsx +5 -0
  525. package/registry/examples/slider/range.d.ts +4 -0
  526. package/registry/examples/slider/range.js +22 -0
  527. package/registry/examples/slider/range.tsx +18 -0
  528. package/registry/examples/slider/with-label.d.ts +4 -0
  529. package/registry/examples/slider/with-label.js +11 -0
  530. package/registry/examples/slider/with-label.tsx +8 -0
  531. package/registry/examples/slot/as-child.d.ts +4 -0
  532. package/registry/{demos/slot.js → examples/slot/as-child.js} +3 -3
  533. package/registry/{demos/slot.tsx → examples/slot/as-child.tsx} +1 -1
  534. package/registry/examples/slot/visually-hidden.d.ts +4 -0
  535. package/registry/examples/slot/visually-hidden.js +14 -0
  536. package/registry/examples/slot/visually-hidden.tsx +13 -0
  537. package/registry/examples/spinner/default.d.ts +4 -0
  538. package/registry/{demos/spinner.js → examples/spinner/default.js} +3 -3
  539. package/registry/{demos/spinner.tsx → examples/spinner/default.tsx} +1 -1
  540. package/registry/examples/spinner/muted.d.ts +4 -0
  541. package/registry/examples/spinner/muted.js +11 -0
  542. package/registry/examples/spinner/muted.tsx +6 -0
  543. package/registry/examples/spinner/native/sizes.d.ts +4 -0
  544. package/registry/examples/spinner/native/sizes.dark.png +0 -0
  545. package/registry/examples/spinner/native/sizes.js +16 -0
  546. package/registry/examples/spinner/native/sizes.light.png +0 -0
  547. package/registry/examples/spinner/native/sizes.tsx +13 -0
  548. package/registry/examples/spinner/sizes.d.ts +4 -0
  549. package/registry/examples/spinner/sizes.js +15 -0
  550. package/registry/examples/spinner/sizes.tsx +11 -0
  551. package/registry/examples/stat/down.d.ts +4 -0
  552. package/registry/examples/stat/down.js +11 -0
  553. package/registry/examples/stat/down.tsx +5 -0
  554. package/registry/examples/stat/flat.d.ts +4 -0
  555. package/registry/examples/stat/flat.js +11 -0
  556. package/registry/examples/stat/flat.tsx +5 -0
  557. package/registry/examples/stat/plain.d.ts +4 -0
  558. package/registry/examples/stat/plain.js +11 -0
  559. package/registry/examples/stat/plain.tsx +5 -0
  560. package/registry/examples/stat/row.d.ts +4 -0
  561. package/registry/examples/stat/row.js +15 -0
  562. package/registry/examples/stat/row.tsx +12 -0
  563. package/registry/examples/stat/up.d.ts +4 -0
  564. package/registry/{demos/stat.js → examples/stat/up.js} +3 -3
  565. package/registry/{demos/stat.tsx → examples/stat/up.tsx} +1 -1
  566. package/registry/examples/switch/disabled.d.ts +4 -0
  567. package/registry/examples/switch/disabled.js +14 -0
  568. package/registry/examples/switch/disabled.tsx +10 -0
  569. package/registry/examples/switch/off.d.ts +4 -0
  570. package/registry/{demos/switch.js → examples/switch/off.js} +3 -3
  571. package/registry/{demos/switch.tsx → examples/switch/off.tsx} +1 -1
  572. package/registry/examples/switch/on.d.ts +4 -0
  573. package/registry/examples/switch/on.js +11 -0
  574. package/registry/examples/switch/on.tsx +5 -0
  575. package/registry/examples/switch/small.d.ts +4 -0
  576. package/registry/examples/switch/small.js +11 -0
  577. package/registry/examples/switch/small.tsx +5 -0
  578. package/registry/examples/switch/with-label.d.ts +4 -0
  579. package/registry/examples/switch/with-label.js +18 -0
  580. package/registry/examples/switch/with-label.tsx +17 -0
  581. package/registry/examples/tabs/pills.d.ts +4 -0
  582. package/registry/examples/tabs/pills.js +20 -0
  583. package/registry/examples/tabs/pills.tsx +23 -0
  584. package/registry/examples/tabs/segmented.d.ts +4 -0
  585. package/registry/examples/tabs/segmented.js +20 -0
  586. package/registry/examples/tabs/segmented.tsx +23 -0
  587. package/registry/examples/tabs/underline.d.ts +4 -0
  588. package/registry/{demos/tabs.js → examples/tabs/underline.js} +3 -3
  589. package/registry/{demos/tabs.tsx → examples/tabs/underline.tsx} +1 -1
  590. package/registry/examples/tabs/vertical.d.ts +4 -0
  591. package/registry/examples/tabs/vertical.js +20 -0
  592. package/registry/examples/tabs/vertical.tsx +23 -0
  593. package/registry/examples/theme/native/provider.d.ts +4 -0
  594. package/registry/examples/theme/native/provider.js +23 -0
  595. package/registry/examples/theme/native/provider.tsx +21 -0
  596. package/registry/examples/theme/secondary.d.ts +4 -0
  597. package/registry/examples/theme/secondary.js +11 -0
  598. package/registry/examples/theme/secondary.tsx +10 -0
  599. package/registry/examples/theme/toggle.d.ts +4 -0
  600. package/registry/{demos/theme.js → examples/theme/toggle.js} +3 -3
  601. package/registry/{demos/theme.tsx → examples/theme/toggle.tsx} +1 -1
  602. package/registry/examples/toast/custom.d.ts +4 -0
  603. package/registry/examples/toast/custom.js +30 -0
  604. package/registry/examples/toast/custom.tsx +35 -0
  605. package/registry/examples/toast/native/notification.d.ts +4 -0
  606. package/registry/examples/toast/native/notification.dark.png +0 -0
  607. package/registry/examples/toast/native/notification.js +29 -0
  608. package/registry/examples/toast/native/notification.light.png +0 -0
  609. package/registry/examples/toast/native/notification.tsx +30 -0
  610. package/registry/examples/toast/native/tones.d.ts +4 -0
  611. package/registry/examples/toast/native/tones.dark.png +0 -0
  612. package/registry/examples/toast/native/tones.js +28 -0
  613. package/registry/examples/toast/native/tones.light.png +0 -0
  614. package/registry/examples/toast/native/tones.tsx +25 -0
  615. package/registry/examples/toast/tones.d.ts +4 -0
  616. package/registry/{demos/toast.js → examples/toast/tones.js} +3 -3
  617. package/registry/{demos/toast.tsx → examples/toast/tones.tsx} +1 -1
  618. package/registry/examples/tooltip/right.d.ts +4 -0
  619. package/registry/examples/tooltip/right.js +15 -0
  620. package/registry/examples/tooltip/right.tsx +15 -0
  621. package/registry/examples/tooltip/top.d.ts +4 -0
  622. package/registry/{demos/tooltip.js → examples/tooltip/top.js} +3 -3
  623. package/registry/{demos/tooltip.tsx → examples/tooltip/top.tsx} +1 -1
  624. package/registry/examples/txt/native/tones.d.ts +4 -0
  625. package/registry/examples/txt/native/tones.dark.png +0 -0
  626. package/registry/examples/txt/native/tones.js +16 -0
  627. package/registry/examples/txt/native/tones.light.png +0 -0
  628. package/registry/examples/txt/native/tones.tsx +17 -0
  629. package/registry/examples/txt/native/variants.d.ts +4 -0
  630. package/registry/examples/txt/native/variants.dark.png +0 -0
  631. package/registry/examples/txt/native/variants.js +18 -0
  632. package/registry/examples/txt/native/variants.light.png +0 -0
  633. package/registry/examples/txt/native/variants.tsx +15 -0
  634. package/registry/field.json +142 -4
  635. package/registry/index.json +353 -33
  636. package/registry/kbd.json +90 -3
  637. package/registry/page-header.json +121 -3
  638. package/registry/popover.json +90 -3
  639. package/registry/progress.json +265 -3
  640. package/registry/radio-group.json +136 -3
  641. package/registry/section-backdrop.json +144 -3
  642. package/registry/segmented.json +125 -0
  643. package/registry/separator.json +67 -3
  644. package/registry/skeleton.json +166 -3
  645. package/registry/slider.json +177 -3
  646. package/registry/slot.json +79 -3
  647. package/registry/spinner.json +144 -3
  648. package/registry/stat.json +140 -3
  649. package/registry/switch.json +130 -3
  650. package/registry/tabs.json +117 -3
  651. package/registry/theme.json +190 -4
  652. package/registry/toast.json +190 -3
  653. package/registry/tooltip.json +143 -3
  654. package/registry/txt.json +97 -0
  655. package/dist/chunk-6DJ6SQY3.js.map +0 -1
  656. package/registry/demos/alert.d.ts +0 -5
  657. package/registry/demos/avatar.d.ts +0 -5
  658. package/registry/demos/badge.d.ts +0 -5
  659. package/registry/demos/button.d.ts +0 -5
  660. package/registry/demos/card.d.ts +0 -5
  661. package/registry/demos/checkbox.d.ts +0 -5
  662. package/registry/demos/chip.d.ts +0 -5
  663. package/registry/demos/cn.d.ts +0 -7
  664. package/registry/demos/command.d.ts +0 -5
  665. package/registry/demos/confirm-button.d.ts +0 -5
  666. package/registry/demos/countdown.d.ts +0 -5
  667. package/registry/demos/dialog.d.ts +0 -7
  668. package/registry/demos/dropdown-menu.d.ts +0 -7
  669. package/registry/demos/empty-state.d.ts +0 -5
  670. package/registry/demos/field.d.ts +0 -5
  671. package/registry/demos/kbd.d.ts +0 -5
  672. package/registry/demos/page-header.d.ts +0 -5
  673. package/registry/demos/popover.d.ts +0 -7
  674. package/registry/demos/progress.d.ts +0 -5
  675. package/registry/demos/radio-group.d.ts +0 -5
  676. package/registry/demos/section-backdrop.d.ts +0 -5
  677. package/registry/demos/separator.d.ts +0 -5
  678. package/registry/demos/skeleton.d.ts +0 -5
  679. package/registry/demos/slider.d.ts +0 -5
  680. package/registry/demos/slot.d.ts +0 -5
  681. package/registry/demos/spinner.d.ts +0 -5
  682. package/registry/demos/stat.d.ts +0 -5
  683. package/registry/demos/switch.d.ts +0 -5
  684. package/registry/demos/tabs.d.ts +0 -5
  685. package/registry/demos/theme.d.ts +0 -5
  686. package/registry/demos/toast.d.ts +0 -8
  687. package/registry/demos/tooltip.d.ts +0 -7
  688. /package/dist/{chunk-IUGBKMJC.js.map → chunk-FHYZSO2S.js.map} +0 -0
@@ -1,12 +1,149 @@
1
1
  {
2
2
  "name": "stat",
3
3
  "type": "primitive",
4
- "description": "`Stat`, `stat` (the slots). Server-safe.",
4
+ "title": "Stat",
5
+ "summary": "A key figure: a label, a value in tabular digits, a hint and a trend said in words.",
6
+ "description": "A key figure: a label, a value in tabular digits, a hint and a trend said in words.",
7
+ "status": "stable",
8
+ "category": "data-display",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "On a dashboard: revenue, views, supporters.",
12
+ "In a row of a few figures that compare over the same period."
13
+ ],
14
+ "whenNotToUse": [
15
+ {
16
+ "when": "For figures inside an item's card.",
17
+ "use": "card"
18
+ },
19
+ {
20
+ "when": "For progress towards a goal.",
21
+ "use": "progress"
22
+ },
23
+ {
24
+ "when": "For a status.",
25
+ "use": "badge"
26
+ }
27
+ ],
28
+ "bestPractices": [
29
+ "Format the value in the app (currency, compact numbers) with `@krizaka/intl`.",
30
+ "Say the change in `trendLabel` (“+12 %”) and the period in `hint`: the arrow alone says nothing."
31
+ ],
32
+ "accessibility": {
33
+ "keyboard": [],
34
+ "notes": [
35
+ "The arrow is decorative; `trendLabel` is read and shown.",
36
+ "Colour is never the only signal of the trend."
37
+ ]
38
+ },
39
+ "related": [
40
+ "card",
41
+ "badge",
42
+ "progress"
43
+ ],
44
+ "web": {
45
+ "entry": "@krizaka/ui/stat",
46
+ "import": "import { Stat } from \"@krizaka/ui/stat\";",
47
+ "props": [
48
+ {
49
+ "component": "Stat",
50
+ "description": "",
51
+ "props": [
52
+ {
53
+ "name": "label",
54
+ "type": "ReactNode",
55
+ "default": null,
56
+ "description": "What the figure is (\"Revenue\"), above it.",
57
+ "required": true
58
+ },
59
+ {
60
+ "name": "value",
61
+ "type": "ReactNode",
62
+ "default": null,
63
+ "description": "The figure, formatted by the app, in tabular digits.",
64
+ "required": true
65
+ },
66
+ {
67
+ "name": "hint",
68
+ "type": "ReactNode",
69
+ "default": null,
70
+ "description": "A line under the value: the period, the comparison.",
71
+ "required": false
72
+ },
73
+ {
74
+ "name": "trend",
75
+ "type": "StatTrend",
76
+ "default": null,
77
+ "description": "The direction of the change; its arrow is decorative.",
78
+ "required": false
79
+ },
80
+ {
81
+ "name": "trendLabel",
82
+ "type": "ReactNode",
83
+ "default": null,
84
+ "description": "The change, in words, as read and shown (e.g. \"+12 % vs last week\") — the arrow alone says nothing.",
85
+ "required": false
86
+ }
87
+ ]
88
+ }
89
+ ],
90
+ "examples": [
91
+ {
92
+ "name": "up",
93
+ "title": "Up",
94
+ "description": "A rise, with its period.",
95
+ "path": "examples/stat/up.tsx",
96
+ "module": "@krizaka/ui/registry/examples/stat/up",
97
+ "code": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatUp() {\n return <Stat label=\"Revenue\" value=\"€4,812\" hint=\"vs last month\" trend=\"up\" trendLabel=\"+12 %\" />;\n}\n"
98
+ },
99
+ {
100
+ "name": "down",
101
+ "title": "Down",
102
+ "description": "A fall, said in words next to the arrow.",
103
+ "path": "examples/stat/down.tsx",
104
+ "module": "@krizaka/ui/registry/examples/stat/down",
105
+ "code": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatDown() {\n return <Stat label=\"Revenue\" value=\"€4,812\" hint=\"vs last month\" trend=\"down\" trendLabel=\"−4 %\" />;\n}\n"
106
+ },
107
+ {
108
+ "name": "flat",
109
+ "title": "Flat",
110
+ "description": "No change.",
111
+ "path": "examples/stat/flat.tsx",
112
+ "module": "@krizaka/ui/registry/examples/stat/flat",
113
+ "code": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatFlat() {\n return <Stat label=\"Revenue\" value=\"€4,812\" hint=\"vs last month\" trend=\"flat\" trendLabel=\"0 %\" />;\n}\n"
114
+ },
115
+ {
116
+ "name": "plain",
117
+ "title": "Plain",
118
+ "description": "Label and value only.",
119
+ "path": "examples/stat/plain.tsx",
120
+ "module": "@krizaka/ui/registry/examples/stat/plain",
121
+ "code": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatPlain() {\n return <Stat label=\"Revenue\" value=\"€4,812\" />;\n}\n"
122
+ },
123
+ {
124
+ "name": "row",
125
+ "title": "Row",
126
+ "description": "A row of stats, as a dashboard shows them.",
127
+ "path": "examples/stat/row.tsx",
128
+ "module": "@krizaka/ui/registry/examples/stat/row",
129
+ "code": "import { Stat } from \"@krizaka/ui/stat\";\n\n// A row of stats, as a dashboard shows them.\nexport default function StatRow() {\n return (\n <div className=\"grid grid-cols-3 gap-8 rounded-xl border border-border-default bg-surface-1 p-6\">\n <Stat label=\"Views\" value=\"12.4k\" trend=\"up\" trendLabel=\"+8 %\" hint=\"7 days\" />\n <Stat label=\"Supporters\" value=\"318\" trend=\"up\" trendLabel=\"+21\" hint=\"7 days\" />\n <Stat label=\"Payouts\" value=\"€902\" trend=\"down\" trendLabel=\"−3 %\" hint=\"7 days\" />\n </div>\n );\n}\n"
130
+ }
131
+ ]
132
+ },
133
+ "native": null,
5
134
  "files": [
135
+ {
136
+ "path": "meta.ts",
137
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"alert\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"cn\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"kbd\"\n | \"page-header\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"switch\"\n | \"tabs\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/** The group of the catalogue. */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
138
+ },
6
139
  {
7
140
  "path": "stat/index.ts",
8
141
  "content": "/** @krizaka/ui/stat — `Stat`, `stat` (the slots). Server-safe. */\nexport { Stat, stat, type StatProps, type StatTrend } from \"./stat\";\n"
9
142
  },
143
+ {
144
+ "path": "stat/meta.ts",
145
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Stat\",\n summary: \"A key figure: a label, a value in tabular digits, a hint and a trend said in words.\",\n status: \"stable\",\n category: \"data-display\",\n platforms: \"web\",\n whenToUse: [\"On a dashboard: revenue, views, supporters.\", \"In a row of a few figures that compare over the same period.\"],\n whenNotToUse: [\n { when: \"For figures inside an item's card.\", use: \"card\" },\n { when: \"For progress towards a goal.\", use: \"progress\" },\n { when: \"For a status.\", use: \"badge\" },\n ],\n bestPractices: [\n \"Format the value in the app (currency, compact numbers) with `@krizaka/intl`.\",\n \"Say the change in `trendLabel` (“+12 %”) and the period in `hint`: the arrow alone says nothing.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\"The arrow is decorative; `trendLabel` is read and shown.\", \"Colour is never the only signal of the trend.\"],\n },\n related: [\"card\", \"badge\", \"progress\"],\n web: {\n imports: [\"Stat\"],\n examples: [\n { name: \"up\", title: \"Up\", description: \"A rise, with its period.\" },\n { name: \"down\", title: \"Down\", description: \"A fall, said in words next to the arrow.\" },\n { name: \"flat\", title: \"Flat\", description: \"No change.\" },\n { name: \"plain\", title: \"Plain\", description: \"Label and value only.\" },\n { name: \"row\", title: \"Row\", description: \"A row of stats, as a dashboard shows them.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
146
+ },
10
147
  {
11
148
  "path": "stat/stat.tsx",
12
149
  "content": "// Server-safe. A key figure: a label, the value in tabular digits, a hint, a trend. Every word is a prop.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const stat = tv({\n slots: {\n root: \"flex min-w-0 flex-col gap-1\",\n label: \"text-xs font-semibold uppercase tracking-wider text-fg-secondary\",\n value: \"font-display text-2xl font-black tabular-nums text-fg\",\n meta: \"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs\",\n // The status tokens are too light for small text on a light surface: the words stay a text role, the arrow carries\n // the direction's colour.\n trend: \"inline-flex items-center gap-1 font-semibold text-fg [&>svg]:h-3.5 [&>svg]:w-3.5 [&>svg]:shrink-0\",\n hint: \"text-fg-secondary\",\n },\n variants: {\n trend: {\n up: { trend: \"[&>svg]:text-success\" },\n down: { trend: \"[&>svg]:text-danger\" },\n flat: { trend: \"[&>svg]:text-fg-secondary\" },\n },\n },\n});\n\nexport type StatTrend = \"up\" | \"down\" | \"flat\";\n\nconst ARROW: Record<StatTrend, string> = { up: \"M7 17 17 7M8 7h9v9\", down: \"M7 7l10 10M17 8v9H8\", flat: \"M5 12h14M13 6l6 6-6 6\" };\n\nexport type StatProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** What the figure is (\"Revenue\"), above it. */\n label: React.ReactNode;\n /** The figure, formatted by the app, in tabular digits. */\n value: React.ReactNode;\n /** A line under the value: the period, the comparison. */\n hint?: React.ReactNode;\n /** The direction of the change; its arrow is decorative. */\n trend?: StatTrend;\n /** The change, in words, as read and shown (e.g. \"+12 % vs last week\") — the arrow alone says nothing. */\n trendLabel?: React.ReactNode;\n};\n\nexport function Stat({ label, value, hint, trend, trendLabel, className, ...props }: StatProps) {\n const s = stat({ trend });\n return (\n <div data-trend={trend} className={s.root({ className })} {...props}>\n <p className={s.label()}>{label}</p>\n <p className={s.value()}>{value}</p>\n {(trendLabel || hint) && (\n <p className={s.meta()}>\n {trend && trendLabel && (\n <span className={s.trend()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d={ARROW[trend]} />\n </svg>\n {trendLabel}\n </span>\n )}\n {hint && <span className={s.hint()}>{hint}</span>}\n </p>\n )}\n </div>\n );\n}\n"
@@ -17,8 +154,8 @@
17
154
  ],
18
155
  "registryDependencies": [],
19
156
  "demo": {
20
- "path": "demos/stat.tsx",
21
- "content": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatDemo() {\n return <Stat label=\"Revenue\" value=\"€4,812\" hint=\"vs last month\" trend=\"up\" trendLabel=\"+12 %\" />;\n}\n"
157
+ "path": "examples/stat/up.tsx",
158
+ "content": "import { Stat } from \"@krizaka/ui/stat\";\n\nexport default function StatUp() {\n return <Stat label=\"Revenue\" value=\"€4,812\" hint=\"vs last month\" trend=\"up\" trendLabel=\"+12 %\" />;\n}\n"
22
159
  },
23
160
  "props": [
24
161
  {
@@ -1,12 +1,139 @@
1
1
  {
2
2
  "name": "switch",
3
3
  "type": "primitive",
4
- "description": "`Switch`, `switchVariants`. Client (\"use client\").",
4
+ "title": "Switch",
5
+ "summary": "An on/off setting that applies at once.",
6
+ "description": "An on/off setting that applies at once.",
7
+ "status": "beta",
8
+ "category": "forms",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "For a setting that takes effect immediately: autoplay, notifications, a weekly digest."
12
+ ],
13
+ "whenNotToUse": [
14
+ {
15
+ "when": "For a choice submitted with a form, or an agreement.",
16
+ "use": "checkbox"
17
+ },
18
+ {
19
+ "when": "For more than two states.",
20
+ "use": "radio-group"
21
+ },
22
+ {
23
+ "when": "To run an action.",
24
+ "use": "button"
25
+ }
26
+ ],
27
+ "bestPractices": [
28
+ "Name the setting, not the state: “Autoplay”, not “Turn autoplay on”.",
29
+ "Put the label first and the switch at the end of the line (`Field.Label htmlFor`), with a hint when it helps."
30
+ ],
31
+ "accessibility": {
32
+ "keyboard": [
33
+ {
34
+ "keys": "Space",
35
+ "action": "Toggles the switch."
36
+ }
37
+ ],
38
+ "notes": [
39
+ "Radix Switch: `role=\"switch\"` with `aria-checked`.",
40
+ "`label` names it when no visible label does; otherwise use `Field.Label htmlFor` and `aria-describedby` for the hint."
41
+ ]
42
+ },
43
+ "related": [
44
+ "checkbox",
45
+ "field",
46
+ "radio-group"
47
+ ],
48
+ "web": {
49
+ "entry": "@krizaka/ui/switch",
50
+ "import": "import { Switch } from \"@krizaka/ui/switch\";",
51
+ "props": [
52
+ {
53
+ "component": "Switch",
54
+ "description": "An on/off switch: `checked`/`defaultChecked` + `onCheckedChange`.",
55
+ "props": [
56
+ {
57
+ "name": "invalid",
58
+ "type": "boolean",
59
+ "default": null,
60
+ "description": "Marks it invalid: aria-invalid and data-invalid.",
61
+ "required": false
62
+ },
63
+ {
64
+ "name": "label",
65
+ "type": "string",
66
+ "default": null,
67
+ "description": "The accessible name — required when no visible label names it, passed translated.",
68
+ "required": false
69
+ },
70
+ {
71
+ "name": "size",
72
+ "type": "\"sm\" | \"md\"",
73
+ "default": "md",
74
+ "description": "sm · md.",
75
+ "required": false
76
+ }
77
+ ]
78
+ }
79
+ ],
80
+ "examples": [
81
+ {
82
+ "name": "off",
83
+ "title": "Off",
84
+ "description": "Named by `label`.",
85
+ "path": "examples/switch/off.tsx",
86
+ "module": "@krizaka/ui/registry/examples/switch/off",
87
+ "code": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchOff() {\n return <Switch label=\"Autoplay\" />;\n}\n"
88
+ },
89
+ {
90
+ "name": "on",
91
+ "title": "On",
92
+ "description": "`defaultChecked` (or `checked` + `onCheckedChange`).",
93
+ "path": "examples/switch/on.tsx",
94
+ "module": "@krizaka/ui/registry/examples/switch/on",
95
+ "code": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchOn() {\n return <Switch label=\"Autoplay\" defaultChecked />;\n}\n"
96
+ },
97
+ {
98
+ "name": "disabled",
99
+ "title": "Disabled",
100
+ "description": "Off and on.",
101
+ "path": "examples/switch/disabled.tsx",
102
+ "module": "@krizaka/ui/registry/examples/switch/disabled",
103
+ "code": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchDisabled() {\n return (\n <div className=\"flex gap-4\">\n <Switch label=\"Autoplay\" disabled />\n <Switch label=\"Loop\" disabled defaultChecked />\n </div>\n );\n}\n"
104
+ },
105
+ {
106
+ "name": "small",
107
+ "title": "Small",
108
+ "description": "`size=\"sm\"`.",
109
+ "path": "examples/switch/small.tsx",
110
+ "module": "@krizaka/ui/registry/examples/switch/small",
111
+ "code": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchSmall() {\n return <Switch label=\"Autoplay\" size=\"sm\" defaultChecked />;\n}\n"
112
+ },
113
+ {
114
+ "name": "with-label",
115
+ "title": "With a visible label",
116
+ "description": "A label and a hint on the same line.",
117
+ "path": "examples/switch/with-label.tsx",
118
+ "module": "@krizaka/ui/registry/examples/switch/with-label",
119
+ "code": "import { Field } from \"@krizaka/ui/field\";\nimport { Switch } from \"@krizaka/ui/switch\";\n\n// Named by a visible label (`Field.Label htmlFor`), with a hint.\nexport default function SwitchWithLabel() {\n return (\n <Field.Root className=\"w-80\">\n <div className=\"flex items-center justify-between gap-4\">\n <Field.Label htmlFor=\"digest\" className=\"text-sm text-fg\">\n Weekly digest\n </Field.Label>\n <Switch id=\"digest\" defaultChecked aria-describedby=\"digest-hint\" />\n </div>\n <Field.Hint id=\"digest-hint\">One email on Monday with what you missed.</Field.Hint>\n </Field.Root>\n );\n}\n"
120
+ }
121
+ ]
122
+ },
123
+ "native": null,
5
124
  "files": [
125
+ {
126
+ "path": "meta.ts",
127
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"alert\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"cn\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"kbd\"\n | \"page-header\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"switch\"\n | \"tabs\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/** The group of the catalogue. */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
128
+ },
6
129
  {
7
130
  "path": "switch/index.ts",
8
131
  "content": "/** @krizaka/ui/switch — `Switch`, `switchVariants`. Client (\"use client\"). */\nexport { Switch, type SwitchProps, type SwitchVariants,switchVariants } from \"./switch\";\n"
9
132
  },
133
+ {
134
+ "path": "switch/meta.ts",
135
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Switch\",\n summary: \"An on/off setting that applies at once.\",\n status: \"beta\",\n category: \"forms\",\n platforms: \"web\",\n whenToUse: [\"For a setting that takes effect immediately: autoplay, notifications, a weekly digest.\"],\n whenNotToUse: [\n { when: \"For a choice submitted with a form, or an agreement.\", use: \"checkbox\" },\n { when: \"For more than two states.\", use: \"radio-group\" },\n { when: \"To run an action.\", use: \"button\" },\n ],\n bestPractices: [\n \"Name the setting, not the state: “Autoplay”, not “Turn autoplay on”.\",\n \"Put the label first and the switch at the end of the line (`Field.Label htmlFor`), with a hint when it helps.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Space\", action: \"Toggles the switch.\" }],\n notes: [\n \"Radix Switch: `role=\\\"switch\\\"` with `aria-checked`.\",\n \"`label` names it when no visible label does; otherwise use `Field.Label htmlFor` and `aria-describedby` for the hint.\",\n ],\n },\n related: [\"checkbox\", \"field\", \"radio-group\"],\n web: {\n imports: [\"Switch\"],\n examples: [\n { name: \"off\", title: \"Off\", description: \"Named by `label`.\" },\n { name: \"on\", title: \"On\", description: \"`defaultChecked` (or `checked` + `onCheckedChange`).\" },\n { name: \"disabled\", title: \"Disabled\", description: \"Off and on.\" },\n { name: \"small\", title: \"Small\", description: \"`size=\\\"sm\\\"`.\" },\n { name: \"with-label\", title: \"With a visible label\", description: \"A label and a hint on the same line.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
136
+ },
10
137
  {
11
138
  "path": "switch/switch.tsx",
12
139
  "content": "// Client. Radix Switch: role=\"switch\", aria-checked, Space and Enter toggle, a hidden input inside a form.\nimport { Switch as SwitchPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const switchVariants = tv({\n slots: {\n root:\n \"peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-fg-muted transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:cursor-not-allowed disabled:opacity-40 data-[state=checked]:bg-accent aria-invalid:border-danger\",\n thumb:\n \"pointer-events-none block rounded-full bg-fg-on-media shadow-sm transition-transform data-[state=unchecked]:translate-x-0.5 motion-reduce:transition-none\",\n },\n variants: {\n size: {\n sm: { root: \"h-5 w-9\", thumb: \"h-4 w-4 data-[state=checked]:translate-x-[1.125rem]\" },\n md: { root: \"h-6 w-11\", thumb: \"h-5 w-5 data-[state=checked]:translate-x-[1.375rem]\" },\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport type SwitchVariants = VariantProps<typeof switchVariants>;\n\ntype Named =\n | {\n /** The accessible name — required when no visible label names it, passed translated. */\n label: string;\n }\n /** Named by a visible `<label htmlFor={id}>` (e.g. `Field.Label`). */\n | { label?: undefined; id: string }\n /** Named by another element. */\n | { label?: undefined; \"aria-labelledby\": string };\n\nexport type SwitchProps = Omit<React.ComponentProps<typeof SwitchPrimitive.Root>, \"children\"> &\n SwitchVariants &\n Named & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: SwitchVariants[\"size\"];\n /** Marks it invalid: aria-invalid and data-invalid. */\n invalid?: boolean;\n };\n\n/** An on/off switch: `checked`/`defaultChecked` + `onCheckedChange`. */\nexport function Switch({ label, size, invalid, className, ...props }: SwitchProps) {\n const s = switchVariants({ size });\n return (\n <SwitchPrimitive.Root\n aria-label={label}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? \"\" : undefined}\n className={s.root({ className })}\n {...props}\n >\n <SwitchPrimitive.Thumb className={s.thumb()} />\n </SwitchPrimitive.Root>\n );\n}\n"
@@ -18,8 +145,8 @@
18
145
  ],
19
146
  "registryDependencies": [],
20
147
  "demo": {
21
- "path": "demos/switch.tsx",
22
- "content": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchDemo() {\n return <Switch label=\"Autoplay\" />;\n}\n"
148
+ "path": "examples/switch/off.tsx",
149
+ "content": "import { Switch } from \"@krizaka/ui/switch\";\n\nexport default function SwitchOff() {\n return <Switch label=\"Autoplay\" />;\n}\n"
23
150
  },
24
151
  "props": [
25
152
  {
@@ -1,12 +1,126 @@
1
1
  {
2
2
  "name": "tabs",
3
3
  "type": "primitive",
4
- "description": "`Tabs.Root/List/Trigger/Content` (variant underline · segmented · pills), `tabs` (the slots). Client (\"use client\").",
4
+ "title": "Tabs",
5
+ "summary": "Views of the same page, one at a time: underlined sections, a segmented switch or pills.",
6
+ "description": "Views of the same page, one at a time: underlined sections, a segmented switch or pills.",
7
+ "status": "beta",
8
+ "category": "navigation",
9
+ "platforms": "web",
10
+ "whenToUse": [
11
+ "To split a page into sections the user switches between without leaving it: videos, stories, about.",
12
+ "`variant=\"segmented\"` for a view switch (grid, list); `pills` for a feed's sections."
13
+ ],
14
+ "whenNotToUse": [
15
+ {
16
+ "when": "For a filter that narrows a list.",
17
+ "use": "chip"
18
+ },
19
+ {
20
+ "when": "To go to other pages: use links in the navigation."
21
+ },
22
+ {
23
+ "when": "For a choice in a form.",
24
+ "use": "radio-group"
25
+ }
26
+ ],
27
+ "bestPractices": [
28
+ "Short labels of one or two words; the active one should be clear without colour.",
29
+ "Keep the URL in sync with the active tab when a tab is worth sharing."
30
+ ],
31
+ "accessibility": {
32
+ "keyboard": [
33
+ {
34
+ "keys": "Tab",
35
+ "action": "Moves to the active tab, then into its panel."
36
+ },
37
+ {
38
+ "keys": "Arrow keys / Home / End",
39
+ "action": "Move between tabs and activate them."
40
+ }
41
+ ],
42
+ "notes": [
43
+ "Radix Tabs: `tablist`, `tab` with `aria-selected` and `aria-controls`, `tabpanel`; name the list with `aria-label`.",
44
+ "A disabled tab is skipped."
45
+ ]
46
+ },
47
+ "related": [
48
+ "chip",
49
+ "segmented",
50
+ "radio-group"
51
+ ],
52
+ "web": {
53
+ "entry": "@krizaka/ui/tabs",
54
+ "import": "import { Tabs } from \"@krizaka/ui/tabs\";",
55
+ "props": [
56
+ {
57
+ "component": "TabsRoot",
58
+ "description": "`value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list.",
59
+ "props": [
60
+ {
61
+ "name": "variant",
62
+ "type": "\"underline\" | \"segmented\" | \"pills\"",
63
+ "default": "underline",
64
+ "description": "underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections).",
65
+ "required": false
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "component": "TabsList",
71
+ "description": "The tabs. Name it (`aria-label`) when no heading says what it switches.",
72
+ "props": []
73
+ }
74
+ ],
75
+ "examples": [
76
+ {
77
+ "name": "underline",
78
+ "title": "Underline",
79
+ "description": "The sections of a page; a disabled tab is skipped.",
80
+ "path": "examples/tabs/underline.tsx",
81
+ "module": "@krizaka/ui/registry/examples/tabs/underline",
82
+ "code": "import { Tabs } from \"@krizaka/ui/tabs\";\n\nexport default function TabsUnderline() {\n return (\n <Tabs.Root defaultValue=\"videos\">\n <Tabs.List aria-label=\"Profile\">\n <Tabs.Trigger value=\"videos\">Videos</Tabs.Trigger>\n <Tabs.Trigger value=\"stories\">Stories</Tabs.Trigger>\n <Tabs.Trigger value=\"collections\">Collections</Tabs.Trigger>\n <Tabs.Trigger value=\"about\" disabled>\n About\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"videos\" className=\"text-sm text-fg-secondary\">\n Twelve videos, newest first.\n </Tabs.Content>\n <Tabs.Content value=\"stories\" className=\"text-sm text-fg-secondary\">\n Stories of the last 24 hours.\n </Tabs.Content>\n <Tabs.Content value=\"collections\" className=\"text-sm text-fg-secondary\">\n Three public collections.\n </Tabs.Content>\n <Tabs.Content value=\"about\" className=\"text-sm text-fg-secondary\">\n About this channel.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
83
+ },
84
+ {
85
+ "name": "segmented",
86
+ "title": "Segmented",
87
+ "description": "A view switch: equal segments in a track.",
88
+ "path": "examples/tabs/segmented.tsx",
89
+ "module": "@krizaka/ui/registry/examples/tabs/segmented",
90
+ "code": "import { Tabs } from \"@krizaka/ui/tabs\";\n\n// A view switch: equal segments in a track, the active one filled.\nexport default function TabsSegmented() {\n return (\n <Tabs.Root variant=\"segmented\" defaultValue=\"grid\">\n <Tabs.List aria-label=\"View\">\n <Tabs.Trigger value=\"grid\">Grid</Tabs.Trigger>\n <Tabs.Trigger value=\"list\">List</Tabs.Trigger>\n <Tabs.Trigger value=\"cinema\">Cinema</Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"grid\" className=\"text-sm text-fg-secondary\">\n Four columns of cards.\n </Tabs.Content>\n <Tabs.Content value=\"list\" className=\"text-sm text-fg-secondary\">\n One line per video.\n </Tabs.Content>\n <Tabs.Content value=\"cinema\" className=\"text-sm text-fg-secondary\">\n One large player per video.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
91
+ },
92
+ {
93
+ "name": "pills",
94
+ "title": "Pills",
95
+ "description": "A feed's sections, scrolling sideways on a phone.",
96
+ "path": "examples/tabs/pills.tsx",
97
+ "module": "@krizaka/ui/registry/examples/tabs/pills",
98
+ "code": "import { Tabs } from \"@krizaka/ui/tabs\";\n\n// A feed's sections: pills that scroll sideways on a phone.\nexport default function TabsPills() {\n return (\n <Tabs.Root variant=\"pills\" defaultValue=\"videos\">\n <Tabs.List aria-label=\"Profile\">\n <Tabs.Trigger value=\"videos\">Videos</Tabs.Trigger>\n <Tabs.Trigger value=\"stories\">Stories</Tabs.Trigger>\n <Tabs.Trigger value=\"collections\">Collections</Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"videos\" className=\"text-sm text-fg-secondary\">\n Twelve videos, newest first.\n </Tabs.Content>\n <Tabs.Content value=\"stories\" className=\"text-sm text-fg-secondary\">\n Stories of the last 24 hours.\n </Tabs.Content>\n <Tabs.Content value=\"collections\" className=\"text-sm text-fg-secondary\">\n Three public collections.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
99
+ },
100
+ {
101
+ "name": "vertical",
102
+ "title": "Vertical",
103
+ "description": "`orientation=\"vertical\"`: the list on the side.",
104
+ "path": "examples/tabs/vertical.tsx",
105
+ "module": "@krizaka/ui/registry/examples/tabs/vertical",
106
+ "code": "import { Tabs } from \"@krizaka/ui/tabs\";\n\n// `orientation=\"vertical\"`: up and down arrows, the list on the side.\nexport default function TabsVertical() {\n return (\n <Tabs.Root orientation=\"vertical\" defaultValue=\"videos\">\n <Tabs.List aria-label=\"Profile\">\n <Tabs.Trigger value=\"videos\">Videos</Tabs.Trigger>\n <Tabs.Trigger value=\"stories\">Stories</Tabs.Trigger>\n <Tabs.Trigger value=\"collections\">Collections</Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"videos\" className=\"text-sm text-fg-secondary\">\n Twelve videos, newest first.\n </Tabs.Content>\n <Tabs.Content value=\"stories\" className=\"text-sm text-fg-secondary\">\n Stories of the last 24 hours.\n </Tabs.Content>\n <Tabs.Content value=\"collections\" className=\"text-sm text-fg-secondary\">\n Three public collections.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
107
+ }
108
+ ]
109
+ },
110
+ "native": null,
5
111
  "files": [
112
+ {
113
+ "path": "meta.ts",
114
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"alert\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"cn\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"kbd\"\n | \"page-header\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"switch\"\n | \"tabs\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/** The group of the catalogue. */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
115
+ },
6
116
  {
7
117
  "path": "tabs/index.ts",
8
118
  "content": "/** @krizaka/ui/tabs — `Tabs.Root/List/Trigger/Content` (variant underline · segmented · pills), `tabs` (the slots). Client (\"use client\"). */\nexport { Tabs, tabs, TabsContent, TabsList, TabsRoot, type TabsRootProps, TabsTrigger, type TabsVariants } from \"./tabs\";\n"
9
119
  },
120
+ {
121
+ "path": "tabs/meta.ts",
122
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Tabs\",\n summary: \"Views of the same page, one at a time: underlined sections, a segmented switch or pills.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"web\",\n whenToUse: [\n \"To split a page into sections the user switches between without leaving it: videos, stories, about.\",\n \"`variant=\\\"segmented\\\"` for a view switch (grid, list); `pills` for a feed's sections.\",\n ],\n whenNotToUse: [\n { when: \"For a filter that narrows a list.\", use: \"chip\" },\n { when: \"To go to other pages: use links in the navigation.\" },\n { when: \"For a choice in a form.\", use: \"radio-group\" },\n ],\n bestPractices: [\n \"Short labels of one or two words; the active one should be clear without colour.\",\n \"Keep the URL in sync with the active tab when a tab is worth sharing.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Moves to the active tab, then into its panel.\" },\n { keys: \"Arrow keys / Home / End\", action: \"Move between tabs and activate them.\" },\n ],\n notes: [\n \"Radix Tabs: `tablist`, `tab` with `aria-selected` and `aria-controls`, `tabpanel`; name the list with `aria-label`.\",\n \"A disabled tab is skipped.\",\n ],\n },\n related: [\"chip\", \"segmented\", \"radio-group\"],\n web: {\n imports: [\"Tabs\"],\n examples: [\n { name: \"underline\", title: \"Underline\", description: \"The sections of a page; a disabled tab is skipped.\" },\n { name: \"segmented\", title: \"Segmented\", description: \"A view switch: equal segments in a track.\" },\n { name: \"pills\", title: \"Pills\", description: \"A feed's sections, scrolling sideways on a phone.\" },\n { name: \"vertical\", title: \"Vertical\", description: \"`orientation=\\\"vertical\\\"`: the list on the side.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
123
+ },
10
124
  {
11
125
  "path": "tabs/tabs.tsx",
12
126
  "content": "// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n list: \"flex shrink-0 data-[orientation=vertical]:flex-col\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-fade min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list: \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-full after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list: \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list: \"gap-1.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] data-[orientation=horizontal]:pb-1\",\n trigger:\n \"h-9 rounded-full border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections). */\n variant?: TabsVariants[\"variant\"];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, ...props }: TabsRootProps) {\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. */\nexport function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n const variant = React.useContext(VariantContext);\n return <TabsPrimitive.List data-variant={variant} className={tabs({ variant }).list({ className })} {...props} />;\n}\n\nexport function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const variant = React.useContext(VariantContext);\n return <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} {...props} />;\n}\n\nexport function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills on the root. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent };\n"
@@ -18,8 +132,8 @@
18
132
  ],
19
133
  "registryDependencies": [],
20
134
  "demo": {
21
- "path": "demos/tabs.tsx",
22
- "content": "import { Tabs } from \"@krizaka/ui/tabs\";\n\nexport default function TabsDemo() {\n return (\n <Tabs.Root defaultValue=\"videos\">\n <Tabs.List aria-label=\"Profile\">\n <Tabs.Trigger value=\"videos\">Videos</Tabs.Trigger>\n <Tabs.Trigger value=\"stories\">Stories</Tabs.Trigger>\n <Tabs.Trigger value=\"collections\">Collections</Tabs.Trigger>\n <Tabs.Trigger value=\"about\" disabled>\n About\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"videos\" className=\"text-sm text-fg-secondary\">\n Twelve videos, newest first.\n </Tabs.Content>\n <Tabs.Content value=\"stories\" className=\"text-sm text-fg-secondary\">\n Stories of the last 24 hours.\n </Tabs.Content>\n <Tabs.Content value=\"collections\" className=\"text-sm text-fg-secondary\">\n Three public collections.\n </Tabs.Content>\n <Tabs.Content value=\"about\" className=\"text-sm text-fg-secondary\">\n About this channel.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
135
+ "path": "examples/tabs/underline.tsx",
136
+ "content": "import { Tabs } from \"@krizaka/ui/tabs\";\n\nexport default function TabsUnderline() {\n return (\n <Tabs.Root defaultValue=\"videos\">\n <Tabs.List aria-label=\"Profile\">\n <Tabs.Trigger value=\"videos\">Videos</Tabs.Trigger>\n <Tabs.Trigger value=\"stories\">Stories</Tabs.Trigger>\n <Tabs.Trigger value=\"collections\">Collections</Tabs.Trigger>\n <Tabs.Trigger value=\"about\" disabled>\n About\n </Tabs.Trigger>\n </Tabs.List>\n <Tabs.Content value=\"videos\" className=\"text-sm text-fg-secondary\">\n Twelve videos, newest first.\n </Tabs.Content>\n <Tabs.Content value=\"stories\" className=\"text-sm text-fg-secondary\">\n Stories of the last 24 hours.\n </Tabs.Content>\n <Tabs.Content value=\"collections\" className=\"text-sm text-fg-secondary\">\n Three public collections.\n </Tabs.Content>\n <Tabs.Content value=\"about\" className=\"text-sm text-fg-secondary\">\n About this channel.\n </Tabs.Content>\n </Tabs.Root>\n );\n}\n"
23
137
  },
24
138
  "props": [
25
139
  {