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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (667) hide show
  1. package/README.md +40 -23
  2. package/dist/{button-8La7l0V4.d.ts → button-D5aSsmxX.d.ts} +3 -3
  3. package/dist/button.d.ts +3 -3
  4. package/dist/button.js +1 -1
  5. package/dist/button.js.map +1 -1
  6. package/dist/card.js +1 -1
  7. package/dist/card.js.map +1 -1
  8. package/dist/{chunk-ZUD4U22H.js → chunk-6DJ6SQY3.js} +2 -2
  9. package/dist/chunk-6DJ6SQY3.js.map +1 -0
  10. package/dist/{chunk-3X5MVH54.js → chunk-IUGBKMJC.js} +2 -2
  11. package/dist/command.js +2 -2
  12. package/dist/confirm-button.d.ts +1 -1
  13. package/dist/confirm-button.js +1 -1
  14. package/dist/dialog.js +2 -2
  15. package/dist/dropdown-menu.js +1 -1
  16. package/dist/dropdown-menu.js.map +1 -1
  17. package/dist/index.d.ts +9 -2
  18. package/dist/index.js +90 -65
  19. package/dist/index.js.map +1 -1
  20. package/dist/motion.css +52 -2
  21. package/dist/native.d.ts +67 -4
  22. package/dist/native.js +359 -92
  23. package/dist/native.js.map +1 -1
  24. package/dist/section-backdrop.d.ts +75 -0
  25. package/dist/section-backdrop.js +27 -0
  26. package/dist/section-backdrop.js.map +1 -0
  27. package/dist/theme.d.ts +1 -1
  28. package/dist/theme.js +1 -1
  29. package/package.json +26 -12
  30. package/registry/alert.json +141 -3
  31. package/registry/avatar.json +299 -3
  32. package/registry/badge.json +233 -3
  33. package/registry/button.json +497 -4
  34. package/registry/card.json +412 -4
  35. package/registry/checkbox.json +127 -3
  36. package/registry/chip.json +394 -3
  37. package/registry/cn.json +51 -3
  38. package/registry/command.json +222 -3
  39. package/registry/confirm-button.json +170 -3
  40. package/registry/countdown.json +273 -3
  41. package/registry/dialog.json +310 -3
  42. package/registry/dropdown-menu.json +117 -4
  43. package/registry/empty-state.json +170 -3
  44. package/registry/examples/alert/danger.d.ts +4 -0
  45. package/registry/examples/alert/danger.js +22 -0
  46. package/registry/examples/alert/danger.tsx +25 -0
  47. package/registry/examples/alert/info.d.ts +4 -0
  48. package/registry/{demos/alert.js → examples/alert/info.js} +3 -3
  49. package/registry/{demos/alert.tsx → examples/alert/info.tsx} +1 -1
  50. package/registry/examples/alert/success.d.ts +4 -0
  51. package/registry/examples/alert/success.js +12 -0
  52. package/registry/examples/alert/success.tsx +15 -0
  53. package/registry/examples/alert/title-only.d.ts +4 -0
  54. package/registry/examples/alert/title-only.js +11 -0
  55. package/registry/examples/alert/title-only.tsx +5 -0
  56. package/registry/examples/alert/warning.d.ts +4 -0
  57. package/registry/examples/alert/warning.js +13 -0
  58. package/registry/examples/alert/warning.tsx +17 -0
  59. package/registry/examples/avatar/fallback.d.ts +4 -0
  60. package/registry/examples/avatar/fallback.js +11 -0
  61. package/registry/examples/avatar/fallback.tsx +6 -0
  62. package/registry/examples/avatar/group.d.ts +4 -0
  63. package/registry/examples/avatar/group.js +20 -0
  64. package/registry/examples/avatar/group.tsx +21 -0
  65. package/registry/examples/avatar/native/group.d.ts +4 -0
  66. package/registry/examples/avatar/native/group.dark.png +0 -0
  67. package/registry/examples/avatar/native/group.js +17 -0
  68. package/registry/examples/avatar/native/group.light.png +0 -0
  69. package/registry/examples/avatar/native/group.tsx +13 -0
  70. package/registry/examples/avatar/native/sizes.d.ts +4 -0
  71. package/registry/examples/avatar/native/sizes.dark.png +0 -0
  72. package/registry/examples/avatar/native/sizes.js +18 -0
  73. package/registry/examples/avatar/native/sizes.light.png +0 -0
  74. package/registry/examples/avatar/native/sizes.tsx +15 -0
  75. package/registry/examples/avatar/sizes.d.ts +4 -0
  76. package/registry/examples/avatar/sizes.js +17 -0
  77. package/registry/examples/avatar/sizes.tsx +13 -0
  78. package/registry/examples/avatar/with-image.d.ts +4 -0
  79. package/registry/{demos/avatar.js → examples/avatar/with-image.js} +3 -3
  80. package/registry/{demos/avatar.tsx → examples/avatar/with-image.tsx} +1 -1
  81. package/registry/examples/badge/accent.d.ts +4 -0
  82. package/registry/examples/badge/accent.js +11 -0
  83. package/registry/examples/badge/accent.tsx +9 -0
  84. package/registry/examples/badge/danger.d.ts +4 -0
  85. package/registry/examples/badge/danger.js +11 -0
  86. package/registry/examples/badge/danger.tsx +9 -0
  87. package/registry/examples/badge/medium.d.ts +4 -0
  88. package/registry/examples/badge/medium.js +11 -0
  89. package/registry/examples/badge/medium.tsx +9 -0
  90. package/registry/examples/badge/native/dot.d.ts +4 -0
  91. package/registry/examples/badge/native/dot.dark.png +0 -0
  92. package/registry/examples/badge/native/dot.js +15 -0
  93. package/registry/examples/badge/native/dot.light.png +0 -0
  94. package/registry/examples/badge/native/dot.tsx +16 -0
  95. package/registry/examples/badge/native/scrim.d.ts +4 -0
  96. package/registry/examples/badge/native/scrim.dark.png +0 -0
  97. package/registry/examples/badge/native/scrim.js +13 -0
  98. package/registry/examples/badge/native/scrim.light.png +0 -0
  99. package/registry/examples/badge/native/scrim.tsx +14 -0
  100. package/registry/examples/badge/native/tones.d.ts +4 -0
  101. package/registry/examples/badge/native/tones.dark.png +0 -0
  102. package/registry/examples/badge/native/tones.js +18 -0
  103. package/registry/examples/badge/native/tones.light.png +0 -0
  104. package/registry/examples/badge/native/tones.tsx +14 -0
  105. package/registry/examples/badge/neutral.d.ts +4 -0
  106. package/registry/{demos/badge.js → examples/badge/neutral.js} +3 -3
  107. package/registry/{demos/badge.tsx → examples/badge/neutral.tsx} +1 -1
  108. package/registry/examples/badge/scrim.d.ts +4 -0
  109. package/registry/examples/badge/scrim.js +11 -0
  110. package/registry/examples/badge/scrim.tsx +10 -0
  111. package/registry/examples/badge/success.d.ts +4 -0
  112. package/registry/examples/badge/success.js +11 -0
  113. package/registry/examples/badge/success.tsx +9 -0
  114. package/registry/examples/badge/warning.d.ts +4 -0
  115. package/registry/examples/badge/warning.js +11 -0
  116. package/registry/examples/badge/warning.tsx +9 -0
  117. package/registry/examples/button/as-child-link.d.ts +4 -0
  118. package/registry/examples/button/as-child-link.js +11 -0
  119. package/registry/examples/button/as-child-link.tsx +10 -0
  120. package/registry/examples/button/danger.d.ts +4 -0
  121. package/registry/examples/button/danger.js +11 -0
  122. package/registry/examples/button/danger.tsx +5 -0
  123. package/registry/examples/button/disabled.d.ts +4 -0
  124. package/registry/examples/button/disabled.js +11 -0
  125. package/registry/examples/button/disabled.tsx +9 -0
  126. package/registry/examples/button/ghost.d.ts +4 -0
  127. package/registry/examples/button/ghost.js +11 -0
  128. package/registry/examples/button/ghost.tsx +5 -0
  129. package/registry/examples/button/icon.d.ts +4 -0
  130. package/registry/examples/button/icon.js +14 -0
  131. package/registry/examples/button/icon.tsx +18 -0
  132. package/registry/examples/button/loading.d.ts +4 -0
  133. package/registry/examples/button/loading.js +11 -0
  134. package/registry/examples/button/loading.tsx +10 -0
  135. package/registry/examples/button/native/danger.d.ts +4 -0
  136. package/registry/examples/button/native/danger.dark.png +0 -0
  137. package/registry/examples/button/native/danger.js +12 -0
  138. package/registry/examples/button/native/danger.light.png +0 -0
  139. package/registry/examples/button/native/danger.tsx +5 -0
  140. package/registry/examples/button/native/disabled.d.ts +4 -0
  141. package/registry/examples/button/native/disabled.dark.png +0 -0
  142. package/registry/examples/button/native/disabled.js +11 -0
  143. package/registry/examples/button/native/disabled.light.png +0 -0
  144. package/registry/examples/button/native/disabled.tsx +5 -0
  145. package/registry/examples/button/native/ghost.d.ts +4 -0
  146. package/registry/examples/button/native/ghost.dark.png +0 -0
  147. package/registry/examples/button/native/ghost.js +12 -0
  148. package/registry/examples/button/native/ghost.light.png +0 -0
  149. package/registry/examples/button/native/ghost.tsx +5 -0
  150. package/registry/examples/button/native/icon-only.d.ts +4 -0
  151. package/registry/examples/button/native/icon-only.dark.png +0 -0
  152. package/registry/examples/button/native/icon-only.js +19 -0
  153. package/registry/examples/button/native/icon-only.light.png +0 -0
  154. package/registry/examples/button/native/icon-only.tsx +21 -0
  155. package/registry/examples/button/native/icon.d.ts +4 -0
  156. package/registry/examples/button/native/icon.dark.png +0 -0
  157. package/registry/examples/button/native/icon.js +16 -0
  158. package/registry/examples/button/native/icon.light.png +0 -0
  159. package/registry/examples/button/native/icon.tsx +15 -0
  160. package/registry/examples/button/native/loading.d.ts +4 -0
  161. package/registry/examples/button/native/loading.dark.png +0 -0
  162. package/registry/examples/button/native/loading.js +11 -0
  163. package/registry/examples/button/native/loading.light.png +0 -0
  164. package/registry/examples/button/native/loading.tsx +6 -0
  165. package/registry/examples/button/native/outline.d.ts +4 -0
  166. package/registry/examples/button/native/outline.dark.png +0 -0
  167. package/registry/examples/button/native/outline.js +12 -0
  168. package/registry/examples/button/native/outline.light.png +0 -0
  169. package/registry/examples/button/native/outline.tsx +5 -0
  170. package/registry/examples/button/native/primary.d.ts +4 -0
  171. package/registry/examples/button/native/primary.dark.png +0 -0
  172. package/registry/examples/button/native/primary.js +12 -0
  173. package/registry/examples/button/native/primary.light.png +0 -0
  174. package/registry/examples/button/native/primary.tsx +5 -0
  175. package/registry/examples/button/native/secondary.d.ts +4 -0
  176. package/registry/examples/button/native/secondary.dark.png +0 -0
  177. package/registry/examples/button/native/secondary.js +12 -0
  178. package/registry/examples/button/native/secondary.light.png +0 -0
  179. package/registry/examples/button/native/secondary.tsx +6 -0
  180. package/registry/examples/button/native/sizes.d.ts +4 -0
  181. package/registry/examples/button/native/sizes.dark.png +0 -0
  182. package/registry/examples/button/native/sizes.js +15 -0
  183. package/registry/examples/button/native/sizes.light.png +0 -0
  184. package/registry/examples/button/native/sizes.tsx +11 -0
  185. package/registry/examples/button/outline.d.ts +4 -0
  186. package/registry/examples/button/outline.js +11 -0
  187. package/registry/examples/button/outline.tsx +5 -0
  188. package/registry/examples/button/pill.d.ts +4 -0
  189. package/registry/examples/button/pill.js +11 -0
  190. package/registry/examples/button/pill.tsx +9 -0
  191. package/registry/examples/button/primary.d.ts +4 -0
  192. package/registry/{demos/button.js → examples/button/primary.js} +3 -3
  193. package/registry/{demos/button.tsx → examples/button/primary.tsx} +1 -1
  194. package/registry/examples/button/secondary.d.ts +4 -0
  195. package/registry/examples/button/secondary.js +11 -0
  196. package/registry/examples/button/secondary.tsx +6 -0
  197. package/registry/examples/button/sizes.d.ts +4 -0
  198. package/registry/examples/button/sizes.js +15 -0
  199. package/registry/examples/button/sizes.tsx +17 -0
  200. package/registry/examples/card/interactive-link.d.ts +4 -0
  201. package/registry/examples/card/interactive-link.js +15 -0
  202. package/registry/examples/card/interactive-link.tsx +16 -0
  203. package/registry/examples/card/media-card.d.ts +4 -0
  204. package/registry/{demos/card.js → examples/card/media-card.js} +3 -3
  205. package/registry/{demos/card.tsx → examples/card/media-card.tsx} +1 -1
  206. package/registry/examples/card/media-fallback.d.ts +4 -0
  207. package/registry/examples/card/media-fallback.js +18 -0
  208. package/registry/examples/card/media-fallback.tsx +22 -0
  209. package/registry/examples/card/native/body.d.ts +4 -0
  210. package/registry/examples/card/native/body.dark.png +0 -0
  211. package/registry/examples/card/native/body.js +15 -0
  212. package/registry/examples/card/native/body.light.png +0 -0
  213. package/registry/examples/card/native/body.tsx +13 -0
  214. package/registry/examples/card/native/default.d.ts +4 -0
  215. package/registry/examples/card/native/default.dark.png +0 -0
  216. package/registry/examples/card/native/default.js +24 -0
  217. package/registry/examples/card/native/default.light.png +0 -0
  218. package/registry/examples/card/native/default.tsx +28 -0
  219. package/registry/examples/card/native/elevated.d.ts +4 -0
  220. package/registry/examples/card/native/elevated.dark.png +0 -0
  221. package/registry/examples/card/native/elevated.js +24 -0
  222. package/registry/examples/card/native/elevated.light.png +0 -0
  223. package/registry/examples/card/native/elevated.tsx +28 -0
  224. package/registry/examples/card/native/pressable.d.ts +4 -0
  225. package/registry/examples/card/native/pressable.dark.png +0 -0
  226. package/registry/examples/card/native/pressable.js +15 -0
  227. package/registry/examples/card/native/pressable.light.png +0 -0
  228. package/registry/examples/card/native/pressable.tsx +13 -0
  229. package/registry/examples/card/reveal-grid.d.ts +4 -0
  230. package/registry/examples/card/reveal-grid.js +28 -0
  231. package/registry/examples/card/reveal-grid.tsx +31 -0
  232. package/registry/examples/card/stat-card.d.ts +4 -0
  233. package/registry/examples/card/stat-card.js +18 -0
  234. package/registry/examples/card/stat-card.tsx +17 -0
  235. package/registry/examples/checkbox/checked.d.ts +4 -0
  236. package/registry/examples/checkbox/checked.js +11 -0
  237. package/registry/examples/checkbox/checked.tsx +5 -0
  238. package/registry/examples/checkbox/disabled.d.ts +4 -0
  239. package/registry/examples/checkbox/disabled.js +14 -0
  240. package/registry/examples/checkbox/disabled.tsx +12 -0
  241. package/registry/examples/checkbox/indeterminate.d.ts +4 -0
  242. package/registry/examples/checkbox/indeterminate.js +11 -0
  243. package/registry/examples/checkbox/indeterminate.tsx +6 -0
  244. package/registry/examples/checkbox/invalid.d.ts +4 -0
  245. package/registry/examples/checkbox/invalid.js +15 -0
  246. package/registry/examples/checkbox/invalid.tsx +14 -0
  247. package/registry/examples/checkbox/unchecked.d.ts +4 -0
  248. package/registry/{demos/checkbox.js → examples/checkbox/unchecked.js} +3 -3
  249. package/registry/{demos/checkbox.tsx → examples/checkbox/unchecked.tsx} +2 -1
  250. package/registry/examples/chip/multiple.d.ts +4 -0
  251. package/registry/examples/chip/multiple.js +16 -0
  252. package/registry/examples/chip/multiple.tsx +12 -0
  253. package/registry/examples/chip/native/multiple.d.ts +4 -0
  254. package/registry/examples/chip/native/multiple.dark.png +0 -0
  255. package/registry/examples/chip/native/multiple.js +18 -0
  256. package/registry/examples/chip/native/multiple.light.png +0 -0
  257. package/registry/examples/chip/native/multiple.tsx +17 -0
  258. package/registry/examples/chip/native/removable.d.ts +4 -0
  259. package/registry/examples/chip/native/removable.dark.png +0 -0
  260. package/registry/examples/chip/native/removable.js +17 -0
  261. package/registry/examples/chip/native/removable.light.png +0 -0
  262. package/registry/examples/chip/native/removable.tsx +15 -0
  263. package/registry/examples/chip/native/single.d.ts +4 -0
  264. package/registry/examples/chip/native/single.dark.png +0 -0
  265. package/registry/examples/chip/native/single.js +15 -0
  266. package/registry/examples/chip/native/single.light.png +0 -0
  267. package/registry/examples/chip/native/single.tsx +11 -0
  268. package/registry/examples/chip/native/toggle.d.ts +4 -0
  269. package/registry/examples/chip/native/toggle.dark.png +0 -0
  270. package/registry/examples/chip/native/toggle.js +17 -0
  271. package/registry/examples/chip/native/toggle.light.png +0 -0
  272. package/registry/examples/chip/native/toggle.tsx +16 -0
  273. package/registry/examples/chip/removable.d.ts +4 -0
  274. package/registry/examples/chip/removable.js +16 -0
  275. package/registry/examples/chip/removable.tsx +15 -0
  276. package/registry/examples/chip/single.d.ts +4 -0
  277. package/registry/examples/chip/single.js +16 -0
  278. package/registry/examples/chip/single.tsx +13 -0
  279. package/registry/examples/chip/small.d.ts +4 -0
  280. package/registry/examples/chip/small.js +16 -0
  281. package/registry/examples/chip/small.tsx +12 -0
  282. package/registry/examples/chip/toggle.d.ts +4 -0
  283. package/registry/{demos/chip.js → examples/chip/toggle.js} +3 -3
  284. package/registry/{demos/chip.tsx → examples/chip/toggle.tsx} +2 -1
  285. package/registry/examples/cn/merge.d.ts +4 -0
  286. package/registry/{demos/cn.js → examples/cn/merge.js} +3 -3
  287. package/registry/{demos/cn.tsx → examples/cn/merge.tsx} +1 -1
  288. package/registry/examples/command/dialog.d.ts +4 -0
  289. package/registry/examples/command/dialog.js +40 -0
  290. package/registry/examples/command/dialog.tsx +36 -0
  291. package/registry/examples/command/inline.d.ts +4 -0
  292. package/registry/{demos/command.js → examples/command/inline.js} +3 -3
  293. package/registry/{demos/command.tsx → examples/command/inline.tsx} +1 -1
  294. package/registry/examples/confirm-button/armed.d.ts +4 -0
  295. package/registry/examples/confirm-button/armed.js +12 -0
  296. package/registry/examples/confirm-button/armed.tsx +14 -0
  297. package/registry/examples/confirm-button/idle.d.ts +4 -0
  298. package/registry/{demos/confirm-button.js → examples/confirm-button/idle.js} +3 -3
  299. package/registry/{demos/confirm-button.tsx → examples/confirm-button/idle.tsx} +1 -1
  300. package/registry/examples/confirm-button/with-text.d.ts +4 -0
  301. package/registry/examples/confirm-button/with-text.js +12 -0
  302. package/registry/examples/confirm-button/with-text.tsx +12 -0
  303. package/registry/examples/countdown/days.d.ts +4 -0
  304. package/registry/examples/countdown/days.js +13 -0
  305. package/registry/examples/countdown/days.tsx +10 -0
  306. package/registry/examples/countdown/ended.d.ts +4 -0
  307. package/registry/examples/countdown/ended.js +13 -0
  308. package/registry/examples/countdown/ended.tsx +10 -0
  309. package/registry/examples/countdown/hours.d.ts +4 -0
  310. package/registry/{demos/countdown.js → examples/countdown/hours.js} +3 -3
  311. package/registry/{demos/countdown.tsx → examples/countdown/hours.tsx} +1 -1
  312. package/registry/examples/countdown/native/days.d.ts +4 -0
  313. package/registry/examples/countdown/native/days.dark.png +0 -0
  314. package/registry/examples/countdown/native/days.js +13 -0
  315. package/registry/examples/countdown/native/days.light.png +0 -0
  316. package/registry/examples/countdown/native/days.tsx +7 -0
  317. package/registry/examples/countdown/native/hours.d.ts +4 -0
  318. package/registry/examples/countdown/native/hours.dark.png +0 -0
  319. package/registry/examples/countdown/native/hours.js +13 -0
  320. package/registry/examples/countdown/native/hours.light.png +0 -0
  321. package/registry/examples/countdown/native/hours.tsx +7 -0
  322. package/registry/examples/countdown/native/sizes.d.ts +4 -0
  323. package/registry/examples/countdown/native/sizes.dark.png +0 -0
  324. package/registry/examples/countdown/native/sizes.js +18 -0
  325. package/registry/examples/countdown/native/sizes.light.png +0 -0
  326. package/registry/examples/countdown/native/sizes.tsx +15 -0
  327. package/registry/examples/countdown/native/urgent.d.ts +4 -0
  328. package/registry/examples/countdown/native/urgent.dark.png +0 -0
  329. package/registry/examples/countdown/native/urgent.js +13 -0
  330. package/registry/examples/countdown/native/urgent.light.png +0 -0
  331. package/registry/examples/countdown/native/urgent.tsx +7 -0
  332. package/registry/examples/countdown/sizes.d.ts +4 -0
  333. package/registry/examples/countdown/sizes.js +18 -0
  334. package/registry/examples/countdown/sizes.tsx +17 -0
  335. package/registry/examples/countdown/urgent.d.ts +4 -0
  336. package/registry/examples/countdown/urgent.js +13 -0
  337. package/registry/examples/countdown/urgent.tsx +10 -0
  338. package/registry/examples/dialog/alert-destructive.d.ts +4 -0
  339. package/registry/examples/dialog/alert-destructive.js +24 -0
  340. package/registry/examples/dialog/alert-destructive.tsx +20 -0
  341. package/registry/examples/dialog/bottom.d.ts +4 -0
  342. package/registry/examples/dialog/bottom.js +29 -0
  343. package/registry/examples/dialog/bottom.tsx +32 -0
  344. package/registry/examples/dialog/center.d.ts +4 -0
  345. package/registry/{demos/dialog.js → examples/dialog/center.js} +3 -3
  346. package/registry/{demos/dialog.tsx → examples/dialog/center.tsx} +1 -1
  347. package/registry/examples/dialog/gate.d.ts +4 -0
  348. package/registry/examples/dialog/gate.js +24 -0
  349. package/registry/examples/dialog/gate.tsx +27 -0
  350. package/registry/examples/dialog/right.d.ts +4 -0
  351. package/registry/examples/dialog/right.js +29 -0
  352. package/registry/examples/dialog/right.tsx +32 -0
  353. package/registry/examples/dialog/sheet-form.d.ts +4 -0
  354. package/registry/examples/dialog/sheet-form.js +35 -0
  355. package/registry/examples/dialog/sheet-form.tsx +36 -0
  356. package/registry/examples/dropdown-menu/actions.d.ts +4 -0
  357. package/registry/{demos/dropdown-menu.js → examples/dropdown-menu/actions.js} +3 -3
  358. package/registry/{demos/dropdown-menu.tsx → examples/dropdown-menu/actions.tsx} +1 -1
  359. package/registry/examples/empty-state/default.d.ts +4 -0
  360. package/registry/{demos/empty-state.js → examples/empty-state/default.js} +3 -3
  361. package/registry/{demos/empty-state.tsx → examples/empty-state/default.tsx} +1 -1
  362. package/registry/examples/empty-state/native/default.d.ts +4 -0
  363. package/registry/examples/empty-state/native/default.dark.png +0 -0
  364. package/registry/examples/empty-state/native/default.js +25 -0
  365. package/registry/examples/empty-state/native/default.light.png +0 -0
  366. package/registry/examples/empty-state/native/default.tsx +25 -0
  367. package/registry/examples/empty-state/title-only.d.ts +4 -0
  368. package/registry/examples/empty-state/title-only.js +11 -0
  369. package/registry/examples/empty-state/title-only.tsx +5 -0
  370. package/registry/examples/empty-state/with-action.d.ts +4 -0
  371. package/registry/examples/empty-state/with-action.js +24 -0
  372. package/registry/examples/empty-state/with-action.tsx +25 -0
  373. package/registry/examples/field/default.d.ts +4 -0
  374. package/registry/{demos/field.js → examples/field/default.js} +3 -3
  375. package/registry/{demos/field.tsx → examples/field/default.tsx} +1 -1
  376. package/registry/examples/field/disabled.d.ts +4 -0
  377. package/registry/examples/field/disabled.js +14 -0
  378. package/registry/examples/field/disabled.tsx +10 -0
  379. package/registry/examples/field/invalid.d.ts +4 -0
  380. package/registry/examples/field/invalid.js +15 -0
  381. package/registry/examples/field/invalid.tsx +12 -0
  382. package/registry/examples/field/select.d.ts +4 -0
  383. package/registry/examples/field/select.js +18 -0
  384. package/registry/examples/field/select.tsx +15 -0
  385. package/registry/examples/field/textarea.d.ts +4 -0
  386. package/registry/examples/field/textarea.js +14 -0
  387. package/registry/examples/field/textarea.tsx +10 -0
  388. package/registry/examples/kbd/key.d.ts +4 -0
  389. package/registry/{demos/kbd.js → examples/kbd/key.js} +3 -3
  390. package/registry/{demos/kbd.tsx → examples/kbd/key.tsx} +1 -1
  391. package/registry/examples/kbd/shortcut.d.ts +4 -0
  392. package/registry/examples/kbd/shortcut.js +15 -0
  393. package/registry/examples/kbd/shortcut.tsx +11 -0
  394. package/registry/examples/kbd/small.d.ts +4 -0
  395. package/registry/examples/kbd/small.js +11 -0
  396. package/registry/examples/kbd/small.tsx +5 -0
  397. package/registry/examples/page-header/default.d.ts +4 -0
  398. package/registry/{demos/page-header.js → examples/page-header/default.js} +3 -3
  399. package/registry/{demos/page-header.tsx → examples/page-header/default.tsx} +1 -1
  400. package/registry/examples/page-header/with-actions.d.ts +4 -0
  401. package/registry/examples/page-header/with-actions.js +22 -0
  402. package/registry/examples/page-header/with-actions.tsx +17 -0
  403. package/registry/examples/page-header/with-breadcrumb.d.ts +4 -0
  404. package/registry/examples/page-header/with-breadcrumb.js +24 -0
  405. package/registry/examples/page-header/with-breadcrumb.tsx +26 -0
  406. package/registry/examples/popover/form.d.ts +4 -0
  407. package/registry/{demos/popover.js → examples/popover/form.js} +3 -3
  408. package/registry/{demos/popover.tsx → examples/popover/form.tsx} +1 -1
  409. package/registry/examples/progress/bar-indeterminate.d.ts +4 -0
  410. package/registry/examples/progress/bar-indeterminate.js +11 -0
  411. package/registry/examples/progress/bar-indeterminate.tsx +6 -0
  412. package/registry/examples/progress/bar-sizes.d.ts +4 -0
  413. package/registry/examples/progress/bar-sizes.js +15 -0
  414. package/registry/examples/progress/bar-sizes.tsx +11 -0
  415. package/registry/examples/progress/bar.d.ts +4 -0
  416. package/registry/{demos/progress.js → examples/progress/bar.js} +3 -3
  417. package/registry/{demos/progress.tsx → examples/progress/bar.tsx} +1 -1
  418. package/registry/examples/progress/native/bar.d.ts +4 -0
  419. package/registry/examples/progress/native/bar.dark.png +0 -0
  420. package/registry/examples/progress/native/bar.js +16 -0
  421. package/registry/examples/progress/native/bar.light.png +0 -0
  422. package/registry/examples/progress/native/bar.tsx +12 -0
  423. package/registry/examples/progress/native/indeterminate.d.ts +4 -0
  424. package/registry/examples/progress/native/indeterminate.dark.png +0 -0
  425. package/registry/examples/progress/native/indeterminate.js +15 -0
  426. package/registry/examples/progress/native/indeterminate.light.png +0 -0
  427. package/registry/examples/progress/native/indeterminate.tsx +12 -0
  428. package/registry/examples/progress/native/ring.d.ts +4 -0
  429. package/registry/examples/progress/native/ring.dark.png +0 -0
  430. package/registry/examples/progress/native/ring.js +19 -0
  431. package/registry/examples/progress/native/ring.light.png +0 -0
  432. package/registry/examples/progress/native/ring.tsx +19 -0
  433. package/registry/examples/progress/ring-indeterminate.d.ts +4 -0
  434. package/registry/examples/progress/ring-indeterminate.js +11 -0
  435. package/registry/examples/progress/ring-indeterminate.tsx +5 -0
  436. package/registry/examples/progress/ring.d.ts +4 -0
  437. package/registry/examples/progress/ring.js +18 -0
  438. package/registry/examples/progress/ring.tsx +17 -0
  439. package/registry/examples/radio-group/cards.d.ts +4 -0
  440. package/registry/examples/radio-group/cards.js +19 -0
  441. package/registry/examples/radio-group/cards.tsx +21 -0
  442. package/registry/examples/radio-group/horizontal.d.ts +4 -0
  443. package/registry/examples/radio-group/horizontal.js +15 -0
  444. package/registry/examples/radio-group/horizontal.tsx +12 -0
  445. package/registry/examples/radio-group/items.d.ts +4 -0
  446. package/registry/{demos/radio-group.js → examples/radio-group/items.js} +3 -3
  447. package/registry/{demos/radio-group.tsx → examples/radio-group/items.tsx} +1 -1
  448. package/registry/examples/section-backdrop/depth-of-field.d.ts +4 -0
  449. package/registry/examples/section-backdrop/depth-of-field.js +18 -0
  450. package/registry/examples/section-backdrop/depth-of-field.tsx +13 -0
  451. package/registry/examples/section-backdrop/hero.d.ts +4 -0
  452. package/registry/examples/section-backdrop/hero.js +14 -0
  453. package/registry/examples/section-backdrop/hero.tsx +10 -0
  454. package/registry/examples/section-backdrop/plain.d.ts +4 -0
  455. package/registry/examples/section-backdrop/plain.js +11 -0
  456. package/registry/examples/section-backdrop/plain.tsx +10 -0
  457. package/registry/examples/section-backdrop/sequence.d.ts +4 -0
  458. package/registry/examples/section-backdrop/sequence.js +14 -0
  459. package/registry/examples/section-backdrop/sequence.tsx +15 -0
  460. package/registry/examples/section-backdrop/up.d.ts +4 -0
  461. package/registry/examples/section-backdrop/up.js +11 -0
  462. package/registry/examples/section-backdrop/up.tsx +10 -0
  463. package/registry/examples/segmented/native/default.d.ts +4 -0
  464. package/registry/examples/segmented/native/default.dark.png +0 -0
  465. package/registry/examples/segmented/native/default.js +19 -0
  466. package/registry/examples/segmented/native/default.light.png +0 -0
  467. package/registry/examples/segmented/native/default.tsx +19 -0
  468. package/registry/examples/segmented/native/small.d.ts +4 -0
  469. package/registry/examples/segmented/native/small.dark.png +0 -0
  470. package/registry/examples/segmented/native/small.js +19 -0
  471. package/registry/examples/segmented/native/small.light.png +0 -0
  472. package/registry/examples/segmented/native/small.tsx +19 -0
  473. package/registry/examples/separator/horizontal.d.ts +4 -0
  474. package/registry/{demos/separator.js → examples/separator/horizontal.js} +3 -3
  475. package/registry/{demos/separator.tsx → examples/separator/horizontal.tsx} +1 -1
  476. package/registry/examples/separator/vertical.d.ts +4 -0
  477. package/registry/examples/separator/vertical.js +17 -0
  478. package/registry/examples/separator/vertical.tsx +14 -0
  479. package/registry/examples/skeleton/circle.d.ts +4 -0
  480. package/registry/examples/skeleton/circle.js +11 -0
  481. package/registry/examples/skeleton/circle.tsx +5 -0
  482. package/registry/examples/skeleton/composition.d.ts +4 -0
  483. package/registry/{demos/skeleton.js → examples/skeleton/composition.js} +3 -3
  484. package/registry/{demos/skeleton.tsx → examples/skeleton/composition.tsx} +1 -1
  485. package/registry/examples/skeleton/native/shapes.d.ts +4 -0
  486. package/registry/examples/skeleton/native/shapes.dark.png +0 -0
  487. package/registry/examples/skeleton/native/shapes.js +21 -0
  488. package/registry/examples/skeleton/native/shapes.light.png +0 -0
  489. package/registry/examples/skeleton/native/shapes.tsx +18 -0
  490. package/registry/examples/skeleton/rect.d.ts +4 -0
  491. package/registry/examples/skeleton/rect.js +11 -0
  492. package/registry/examples/skeleton/rect.tsx +5 -0
  493. package/registry/examples/skeleton/text.d.ts +4 -0
  494. package/registry/examples/skeleton/text.js +11 -0
  495. package/registry/examples/skeleton/text.tsx +5 -0
  496. package/registry/examples/slider/centred.d.ts +4 -0
  497. package/registry/examples/slider/centred.js +11 -0
  498. package/registry/examples/slider/centred.tsx +8 -0
  499. package/registry/examples/slider/default.d.ts +4 -0
  500. package/registry/{demos/slider.js → examples/slider/default.js} +3 -3
  501. package/registry/{demos/slider.tsx → examples/slider/default.tsx} +1 -1
  502. package/registry/examples/slider/disabled.d.ts +4 -0
  503. package/registry/examples/slider/disabled.js +11 -0
  504. package/registry/examples/slider/disabled.tsx +5 -0
  505. package/registry/examples/slider/range.d.ts +4 -0
  506. package/registry/examples/slider/range.js +22 -0
  507. package/registry/examples/slider/range.tsx +18 -0
  508. package/registry/examples/slider/with-label.d.ts +4 -0
  509. package/registry/examples/slider/with-label.js +11 -0
  510. package/registry/examples/slider/with-label.tsx +8 -0
  511. package/registry/examples/slot/as-child.d.ts +4 -0
  512. package/registry/{demos/slot.js → examples/slot/as-child.js} +3 -3
  513. package/registry/{demos/slot.tsx → examples/slot/as-child.tsx} +1 -1
  514. package/registry/examples/slot/visually-hidden.d.ts +4 -0
  515. package/registry/examples/slot/visually-hidden.js +14 -0
  516. package/registry/examples/slot/visually-hidden.tsx +13 -0
  517. package/registry/examples/spinner/default.d.ts +4 -0
  518. package/registry/{demos/spinner.js → examples/spinner/default.js} +3 -3
  519. package/registry/{demos/spinner.tsx → examples/spinner/default.tsx} +1 -1
  520. package/registry/examples/spinner/muted.d.ts +4 -0
  521. package/registry/examples/spinner/muted.js +11 -0
  522. package/registry/examples/spinner/muted.tsx +6 -0
  523. package/registry/examples/spinner/native/sizes.d.ts +4 -0
  524. package/registry/examples/spinner/native/sizes.dark.png +0 -0
  525. package/registry/examples/spinner/native/sizes.js +16 -0
  526. package/registry/examples/spinner/native/sizes.light.png +0 -0
  527. package/registry/examples/spinner/native/sizes.tsx +13 -0
  528. package/registry/examples/spinner/sizes.d.ts +4 -0
  529. package/registry/examples/spinner/sizes.js +15 -0
  530. package/registry/examples/spinner/sizes.tsx +11 -0
  531. package/registry/examples/stat/down.d.ts +4 -0
  532. package/registry/examples/stat/down.js +11 -0
  533. package/registry/examples/stat/down.tsx +5 -0
  534. package/registry/examples/stat/flat.d.ts +4 -0
  535. package/registry/examples/stat/flat.js +11 -0
  536. package/registry/examples/stat/flat.tsx +5 -0
  537. package/registry/examples/stat/plain.d.ts +4 -0
  538. package/registry/examples/stat/plain.js +11 -0
  539. package/registry/examples/stat/plain.tsx +5 -0
  540. package/registry/examples/stat/row.d.ts +4 -0
  541. package/registry/examples/stat/row.js +15 -0
  542. package/registry/examples/stat/row.tsx +12 -0
  543. package/registry/examples/stat/up.d.ts +4 -0
  544. package/registry/{demos/stat.js → examples/stat/up.js} +3 -3
  545. package/registry/{demos/stat.tsx → examples/stat/up.tsx} +1 -1
  546. package/registry/examples/switch/disabled.d.ts +4 -0
  547. package/registry/examples/switch/disabled.js +14 -0
  548. package/registry/examples/switch/disabled.tsx +10 -0
  549. package/registry/examples/switch/off.d.ts +4 -0
  550. package/registry/{demos/switch.js → examples/switch/off.js} +3 -3
  551. package/registry/{demos/switch.tsx → examples/switch/off.tsx} +1 -1
  552. package/registry/examples/switch/on.d.ts +4 -0
  553. package/registry/examples/switch/on.js +11 -0
  554. package/registry/examples/switch/on.tsx +5 -0
  555. package/registry/examples/switch/small.d.ts +4 -0
  556. package/registry/examples/switch/small.js +11 -0
  557. package/registry/examples/switch/small.tsx +5 -0
  558. package/registry/examples/switch/with-label.d.ts +4 -0
  559. package/registry/examples/switch/with-label.js +18 -0
  560. package/registry/examples/switch/with-label.tsx +17 -0
  561. package/registry/examples/tabs/pills.d.ts +4 -0
  562. package/registry/examples/tabs/pills.js +20 -0
  563. package/registry/examples/tabs/pills.tsx +23 -0
  564. package/registry/examples/tabs/segmented.d.ts +4 -0
  565. package/registry/examples/tabs/segmented.js +20 -0
  566. package/registry/examples/tabs/segmented.tsx +23 -0
  567. package/registry/examples/tabs/underline.d.ts +4 -0
  568. package/registry/{demos/tabs.js → examples/tabs/underline.js} +3 -3
  569. package/registry/{demos/tabs.tsx → examples/tabs/underline.tsx} +1 -1
  570. package/registry/examples/tabs/vertical.d.ts +4 -0
  571. package/registry/examples/tabs/vertical.js +20 -0
  572. package/registry/examples/tabs/vertical.tsx +23 -0
  573. package/registry/examples/theme/native/provider.d.ts +4 -0
  574. package/registry/examples/theme/native/provider.js +23 -0
  575. package/registry/examples/theme/native/provider.tsx +21 -0
  576. package/registry/examples/theme/secondary.d.ts +4 -0
  577. package/registry/examples/theme/secondary.js +11 -0
  578. package/registry/examples/theme/secondary.tsx +10 -0
  579. package/registry/examples/theme/toggle.d.ts +4 -0
  580. package/registry/{demos/theme.js → examples/theme/toggle.js} +3 -3
  581. package/registry/{demos/theme.tsx → examples/theme/toggle.tsx} +1 -1
  582. package/registry/examples/toast/custom.d.ts +4 -0
  583. package/registry/examples/toast/custom.js +30 -0
  584. package/registry/examples/toast/custom.tsx +35 -0
  585. package/registry/examples/toast/native/notification.d.ts +4 -0
  586. package/registry/examples/toast/native/notification.dark.png +0 -0
  587. package/registry/examples/toast/native/notification.js +29 -0
  588. package/registry/examples/toast/native/notification.light.png +0 -0
  589. package/registry/examples/toast/native/notification.tsx +30 -0
  590. package/registry/examples/toast/native/tones.d.ts +4 -0
  591. package/registry/examples/toast/native/tones.dark.png +0 -0
  592. package/registry/examples/toast/native/tones.js +28 -0
  593. package/registry/examples/toast/native/tones.light.png +0 -0
  594. package/registry/examples/toast/native/tones.tsx +25 -0
  595. package/registry/examples/toast/tones.d.ts +4 -0
  596. package/registry/{demos/toast.js → examples/toast/tones.js} +3 -3
  597. package/registry/{demos/toast.tsx → examples/toast/tones.tsx} +1 -1
  598. package/registry/examples/tooltip/right.d.ts +4 -0
  599. package/registry/examples/tooltip/right.js +15 -0
  600. package/registry/examples/tooltip/right.tsx +15 -0
  601. package/registry/examples/tooltip/top.d.ts +4 -0
  602. package/registry/{demos/tooltip.js → examples/tooltip/top.js} +3 -3
  603. package/registry/{demos/tooltip.tsx → examples/tooltip/top.tsx} +1 -1
  604. package/registry/examples/txt/native/tones.d.ts +4 -0
  605. package/registry/examples/txt/native/tones.dark.png +0 -0
  606. package/registry/examples/txt/native/tones.js +16 -0
  607. package/registry/examples/txt/native/tones.light.png +0 -0
  608. package/registry/examples/txt/native/tones.tsx +17 -0
  609. package/registry/examples/txt/native/variants.d.ts +4 -0
  610. package/registry/examples/txt/native/variants.dark.png +0 -0
  611. package/registry/examples/txt/native/variants.js +18 -0
  612. package/registry/examples/txt/native/variants.light.png +0 -0
  613. package/registry/examples/txt/native/variants.tsx +15 -0
  614. package/registry/field.json +141 -3
  615. package/registry/index.json +361 -32
  616. package/registry/kbd.json +90 -3
  617. package/registry/page-header.json +121 -3
  618. package/registry/popover.json +90 -3
  619. package/registry/progress.json +265 -3
  620. package/registry/radio-group.json +136 -3
  621. package/registry/section-backdrop.json +214 -0
  622. package/registry/segmented.json +125 -0
  623. package/registry/separator.json +67 -3
  624. package/registry/skeleton.json +166 -3
  625. package/registry/slider.json +177 -3
  626. package/registry/slot.json +79 -3
  627. package/registry/spinner.json +144 -3
  628. package/registry/stat.json +140 -3
  629. package/registry/switch.json +130 -3
  630. package/registry/tabs.json +117 -3
  631. package/registry/theme.json +189 -3
  632. package/registry/toast.json +190 -3
  633. package/registry/tooltip.json +143 -3
  634. package/registry/txt.json +97 -0
  635. package/dist/chunk-ZUD4U22H.js.map +0 -1
  636. package/registry/demos/alert.d.ts +0 -5
  637. package/registry/demos/avatar.d.ts +0 -5
  638. package/registry/demos/badge.d.ts +0 -5
  639. package/registry/demos/button.d.ts +0 -5
  640. package/registry/demos/card.d.ts +0 -5
  641. package/registry/demos/checkbox.d.ts +0 -5
  642. package/registry/demos/chip.d.ts +0 -5
  643. package/registry/demos/cn.d.ts +0 -7
  644. package/registry/demos/command.d.ts +0 -5
  645. package/registry/demos/confirm-button.d.ts +0 -5
  646. package/registry/demos/countdown.d.ts +0 -5
  647. package/registry/demos/dialog.d.ts +0 -7
  648. package/registry/demos/dropdown-menu.d.ts +0 -7
  649. package/registry/demos/empty-state.d.ts +0 -5
  650. package/registry/demos/field.d.ts +0 -5
  651. package/registry/demos/kbd.d.ts +0 -5
  652. package/registry/demos/page-header.d.ts +0 -5
  653. package/registry/demos/popover.d.ts +0 -7
  654. package/registry/demos/progress.d.ts +0 -5
  655. package/registry/demos/radio-group.d.ts +0 -5
  656. package/registry/demos/separator.d.ts +0 -5
  657. package/registry/demos/skeleton.d.ts +0 -5
  658. package/registry/demos/slider.d.ts +0 -5
  659. package/registry/demos/slot.d.ts +0 -5
  660. package/registry/demos/spinner.d.ts +0 -5
  661. package/registry/demos/stat.d.ts +0 -5
  662. package/registry/demos/switch.d.ts +0 -5
  663. package/registry/demos/tabs.d.ts +0 -5
  664. package/registry/demos/theme.d.ts +0 -5
  665. package/registry/demos/toast.d.ts +0 -8
  666. package/registry/demos/tooltip.d.ts +0 -7
  667. /package/dist/{chunk-3X5MVH54.js.map → chunk-IUGBKMJC.js.map} +0 -0
package/README.md CHANGED
@@ -149,10 +149,11 @@ Colours are roles of the preset (`bg-surface-2`, `text-fg-secondary`, `border-bo
149
149
  | `@krizaka/ui/command` | `Command.Root` (`label`, `shouldFilter`…) `/Input` (`placeholder`, `trailing`) `/List` (`label`) `/Empty` (`emptyLabel`) `/Loading/Group/Item/Separator/Shortcut` on cmdk; `CommandDialog` (`label`, `open`/`onOpenChange`, `footer`, `contentProps`) | client |
150
150
  | `@krizaka/ui/confirm-button` | `ConfirmButton` (two presses: `confirmLabel`, `onConfirm`, `timeoutMs` 4000, `label` for an icon, `armedContent`; the `Button` variants), `confirmArmed` | client |
151
151
  | `@krizaka/ui/progress` | `Progress` (`variant` bar·ring, `size` sm·md·lg, `value`/`max`, indeterminate without a value, `label`, `valueText`, a ring's centre as children) | server |
152
+ | `@krizaka/ui/section-backdrop` | `SectionBackdrop` (`as`, `direction` down·up, `dome`, `grid`, `media` blurred for depth of field, `animated`): a page section on the brand's section gradient — see `@krizaka/tokens` BRAND.md, "Visual language" | server |
152
153
  | `@krizaka/ui` | the marks, `MotionObserver`, `RotatingWord`, `cx` (unchanged) | client |
153
154
  | `@krizaka/ui/native` | React Native: `ThemeProvider`/`useTheme`, `Txt`, `Button`, `IconButton`, `Card.*`, `Badge`, `Chip` (+ `Group`), `Avatar` (+ `Group`), `Skeleton`, `EmptyState`, `Spinner`, `Countdown`, `Segmented`, `Progress`, `Toaster`/`toast`, the marks — see [React Native](#react-native) | native |
154
155
  | `@krizaka/ui/motion.css`, `@krizaka/ui/tailwind.css` | the motion signature; the `@source` of the primitives' classes | CSS |
155
- | `@krizaka/ui/registry/<name>`, `@krizaka/ui/registry/demos/<name>` | the registry (JSON) and the demos — see [Registry](#registry) | data · client |
156
+ | `@krizaka/ui/registry/<name>`, `@krizaka/ui/registry/examples/<name>/<example>` | the registry (JSON) and the examples — see [Registry](#registry--the-code-drives-the-documentation) | data · client |
156
157
 
157
158
  The theme is one mechanism for every product: dark by default, `html.light` for light, `html.theme-<name>` for a named
158
159
  theme, persisted as `kz-theme` (and `kz-theme-name`).
@@ -167,34 +168,48 @@ theme, persisted as `kz-theme` (and `kz-theme-name`).
167
168
  <ThemeToggle label={(mode) => t(`theme.${mode}`)} />
168
169
  ```
169
170
 
170
- ## Registry
171
-
172
- Every primitive is also published as data, for documentation sites (krizaka.com's `/docs/ui`: live preview, copyable
173
- code, props table) and, later, a `npx @krizaka/cli add <name>` that copies a primitive into a product which forks it
174
- knowingly. Built by `scripts/build-registry.mjs` after tsup, from `src/<name>/` (all primitives; not the marks, the
175
- motion or `native`):
171
+ ## Registry — the code drives the documentation
172
+
173
+ Every component is also published as data: **[krizaka.com/docs/ui](https://www.krizaka.com/docs/ui)** is generated
174
+ from it at every build of the site (one page per component: when to use it, live examples with their code for the web
175
+ and React Native, props, accessibility), and, later, a `npx @krizaka/cli add <name>` may copy a primitive into a
176
+ product that forks it knowingly. Built by `scripts/build-registry.mjs` after tsup, from three sources in the code:
177
+
178
+ - **`meta.ts`** beside each component (`src/<name>/meta.ts`, `src/cn.meta.ts`; a React-Native-only component:
179
+ `src/native/meta/<name>.ts`), typed by `src/meta.ts`: title, summary, status (`stable` · `beta`), category,
180
+ platforms (`web` · `native` · `both`), when to use it, when not (and what to use instead), best practices,
181
+ accessibility (keyboard, roles), related components, and per platform the names to import, the named examples and,
182
+ for React Native, what differs from the web API. A typed module rather than JSDoc tags: the fields are lists and
183
+ links between components, which the compiler checks; the file is plain data that Node reads without a build.
184
+ - **Named examples**: `registry/examples/<name>/<example>.tsx` (web) and `registry/examples/<name>/native/<example>.tsx`
185
+ (React Native) — one per significant variant, ≤ 40 lines, importing what a product imports (`@krizaka/ui/<entry>`,
186
+ `@krizaka/ui/native`, `react-native`). The stories render them, so Storybook's visual tests and the docs show the
187
+ same code. An example that opens over the page takes `defaultOpen` (the story opens it; the docs leave it closed).
188
+ - **Props** of the web and native components, read by `react-docgen-typescript` from the JSDoc of their props types:
189
+ own props only (inherited DOM, Radix and `Pressable` props are left out).
190
+
191
+ `scripts/registry.test.mjs` fails when a component has no `meta.ts`, an empty section, an unknown related component, a
192
+ platform that does not match its exports, an example missing or longer than 40 lines, or a prop without a
193
+ description; `src/registry.test.tsx` (Vitest, axe) and `src/native/examples.test.tsx` (Jest) render every example.
176
194
 
177
195
  | Path | What |
178
196
  | :-- | :-- |
179
- | `@krizaka/ui/registry/index` | `{ name, version, items: [{ name, type, description, dependencies, registryDependencies }] }` |
180
- | `@krizaka/ui/registry/<name>` | `{ name, type: "primitive", description, files: [{ path, content }], dependencies, registryDependencies, demo: { path, content }, props }` |
181
- | `@krizaka/ui/registry/demos/<name>` | the demo, compiled (ESM, `"use client"`, `default` export) — its source ships beside it as `registry/demos/<name>.tsx` |
197
+ | `@krizaka/ui/registry/index` | `{ name, version, items: [{ name, type, title, summary, status, category, platforms, examples: { web, native }, dependencies, registryDependencies }] }` |
198
+ | `@krizaka/ui/registry/<name>` | the `meta.ts` fields, `web` and `native` (`{ entry, import, props, examples: [{ name, title, description, path, module, code }] }`, `native` adds `differences` and, per example, `screenshots: { dark, light }`), and for a web primitive `files: [{ path, content }]`, `dependencies`, `registryDependencies`, `demo` (its first example) and `props` |
199
+ | `@krizaka/ui/registry/examples/<name>/<example>` | an example, compiled (ESM, `"use client"`, `default` export); its source ships beside it (`.tsx`), and a React Native example its screenshots (`<example>.dark.png`, `<example>.light.png`: the Linux baselines of its story — React Native has no live preview on the web) |
182
200
 
183
201
  - `files` are the sources (paths from `src/`); `dependencies` are npm `name@range` (React aside); `registryDependencies`
184
- are the other primitives it imports (`cn`, `button`…).
202
+ are the other primitives it imports (`cn`, `button`…). `type` is `primitive` (a web entry) or `native` (React Native
203
+ only: `segmented`, `txt`).
185
204
  - `props` is one entry per exported component — `{ component, description, props: [{ name, type, default, description,
186
- required }] }` — read by `react-docgen-typescript` from the JSDoc of the props types: the component's own props,
187
- its variants included; inherited DOM and Radix props are left out. A test fails on a prop without a description.
188
- - A demo is ≤ 40 lines, imports the primitives as a product does (`@krizaka/ui/<name>`) and is the default story of
189
- the primitive: Storybook and the docs show the same code. A demo that opens over the page takes `defaultOpen` (the
190
- story opens it for the screenshot; the docs leave it closed).
205
+ required }] }`.
191
206
 
192
207
  ```ts
193
- import card from "@krizaka/ui/registry/card" with { type: "json" };
194
- import CardDemo from "@krizaka/ui/registry/demos/card";
208
+ import button from "@krizaka/ui/registry/button" with { type: "json" };
209
+ import Primary from "@krizaka/ui/registry/examples/button/primary";
195
210
  ```
196
211
 
197
- A site that renders the demos adds them to Tailwind's sources: `@source "../node_modules/@krizaka/ui/registry/demos";`.
212
+ A site that renders the examples adds them to Tailwind's sources: `@source "../node_modules/@krizaka/ui/registry/examples";`.
198
213
 
199
214
  ## React Native
200
215
 
@@ -245,7 +260,7 @@ const { theme, scheme, mode, setMode, radius } = useTheme(); // theme.surface1,
245
260
  | `Segmented` | `options` (`value`, `label`, `disabled`), `value`, `onValueChange`, `size` | The web `Tabs variant="segmented"` (a tab list). To filter, `Chip.Group`. |
246
261
  | `Progress` | `variant` bar·ring, `size`, `value`/`max`, `label`, `valueText`, a ring's centre as children | The fill is the `accent` → `accent2` gradient (react-native-svg); it animates to each new value. |
247
262
  | `Toaster`, `toast` | `toast(title, { description, tone, icon, action, onPress, id, duration, onDismiss })`, `toast.success/warning/error/info`, `toast.dismiss(id?)`; `Toaster closeLabel position offset duration max` | No sonner: a light queue of its own. `offset` takes the safe-area inset (no safe-area dependency). |
248
- | `OrochiaMark` | `size`, `animated`, `title`, `neutral` | The mark, drawn with react-native-svg. |
263
+ | `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
249
264
 
250
265
  Every animation (skeleton, badge dot, urgent countdown, progress, toast entrance, the marks) stops when the system
251
266
  asks to reduce motion (`useReducedMotion()`). Accessibility goes through `role` and `aria-*` (RN ≥ 0.71): headings,
@@ -266,7 +281,8 @@ import { Button, Card, Countdown, OrochiaMark } from "@krizaka/ui/native";
266
281
  <OrochiaMark size={72} title="Orochia" neutral={theme.borderDefault} />
267
282
  ```
268
283
 
269
- The native stories (`Native/*` in the catalogue) render through react-native-web in the web Storybook: audited by axe
284
+ The native stories (`Native/*`, rendering the `registry/examples/<name>/native` examples) render through
285
+ react-native-web in the internal Storybook: audited by axe
270
286
  and screenshot-compared in dark and light like the web ones. Tests run on Jest with React Native's preset and
271
287
  Testing Library (`src/native/*.test.tsx`); `scripts/native-dist.mjs` checks that `dist/native.js` carries no
272
288
  `"use client"`, no DOM and no import beyond React, `react-native` and `react-native-svg`.
@@ -311,6 +327,7 @@ import { MotionObserver, RotatingWord } from "@krizaka/ui";
311
327
  | `kz-gradient-text`, `kz-marquee` | Drifting gradient text, endless bands |
312
328
  | `kz-overlay`, `kz-dialog`, `kz-pop`, `kz-fade` | Backdrops, dialogs (from the bottom on phones), menus, views swapped in place |
313
329
  | `kz-progress` | The indeterminate progress bar's travelling segment |
330
+ | `kz-backdrop`, `kz-backdrop-drift`, `-dome`, `-grid`, `-media` | The layers of `SectionBackdrop`: the brand's section gradient, the slow light drift (40 s), the dome, the perspective grid, the blurred foreground |
314
331
 
315
332
  With Tailwind CSS v4, give every transition the same easing:
316
333
 
@@ -332,8 +349,8 @@ classes the components use are generated in your stylesheet.
332
349
  @import "@krizaka/ui/tailwind.css";
333
350
  ```
334
351
 
335
- Every component, in dark and light and under each product identity:
336
- [krizaka.github.io/krizaka-ui/latest](https://krizaka.github.io/krizaka-ui/latest/).
352
+ Every component, with when to use it, live examples and their code (web and React Native) and its props:
353
+ [krizaka.com/docs/ui](https://www.krizaka.com/docs/ui).
337
354
 
338
355
  ## Develop
339
356
 
@@ -6,7 +6,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
6
6
  variant: {
7
7
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
8
8
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
9
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
9
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
10
10
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
11
11
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
12
12
  };
@@ -24,7 +24,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
24
24
  variant: {
25
25
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
26
26
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
27
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
27
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
28
28
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
29
29
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
30
30
  };
@@ -42,7 +42,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
42
42
  variant: {
43
43
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
44
44
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
45
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
45
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
46
46
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
47
47
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
48
48
  };
package/dist/button.d.ts CHANGED
@@ -6,7 +6,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
6
6
  variant: {
7
7
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
8
8
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
9
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
9
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
10
10
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
11
11
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
12
12
  };
@@ -24,7 +24,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
24
24
  variant: {
25
25
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
26
26
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
27
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
27
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
28
28
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
29
29
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
30
30
  };
@@ -42,7 +42,7 @@ declare const buttonVariants: tailwind_variants.TVReturnType<{
42
42
  variant: {
43
43
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover";
44
44
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3";
45
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent";
45
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent";
46
46
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg";
47
47
  danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20";
48
48
  };
package/dist/button.js CHANGED
@@ -8,7 +8,7 @@ var buttonVariants = tv({
8
8
  variant: {
9
9
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
10
10
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3",
11
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent",
11
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent",
12
12
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg",
13
13
  // The danger token is invariant and too light for small text on a light surface (3.6:1): the label stays a
14
14
  // text role, the border and the tint carry the danger.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/button.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const buttonVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\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:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98]\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The danger token is invariant and too light for small text on a light surface (3.6:1): the label stays a\n // text role, the border and the tint carry the danger.\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `secondary` (a raised surface), `outline`, `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Disables and signals the wait (aria-busy, data-loading) — the product adds a spinner if it wants one. */\n loading?: boolean;\n };\n\nexport function Button({ asChild, loading, variant, size, shape, className, disabled, ...props }: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n return (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({ variant, size, shape, className })}\n {...props}\n />\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. */\nexport function IconButton({ label, size = \"icon\", ...props }: IconButtonProps) {\n return <Button aria-label={label} title={label} size={size} {...props} />;\n}\n"],"mappings":";AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;AAmDlC;AAjDG,IAAM,iBAAiB,GAAG;AAAA,EAC/B,MACE;AAAA,EAGF,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,IACV;AAAA,IACA,MAAM,EAAE,IAAI,oBAAoB,IAAI,qBAAqB,IAAI,qBAAqB,MAAM,YAAY;AAAA,IACpG,OAAO,EAAE,SAAS,cAAc,MAAM,eAAe;AAAA,EACvD;AAAA,EACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,MAAM,OAAO,UAAU;AACxE,CAAC;AA2BM,SAAS,OAAO,EAAE,SAAS,SAAS,SAAS,MAAM,OAAO,WAAW,UAAU,GAAG,MAAM,GAAgB;AAC7G,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,UAAU,SAAY;AAAA,MAC5B,aAAW,WAAW;AAAA,MACtB,gBAAc,UAAU,KAAK;AAAA,MAC7B,gBAAc,WAAW;AAAA,MACzB,UAAU,UAAU,SAAY,YAAY;AAAA,MAC5C,iBAAe,YAAY,YAAY,WAAW,OAAO;AAAA,MACzD,WAAW,eAAe,EAAE,SAAS,MAAM,OAAO,UAAU,CAAC;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,GAAG,MAAM,GAAoB;AAC9E,SAAO,oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OAAO;AACzE;","names":[]}
1
+ {"version":3,"sources":["../src/button/button.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const buttonVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\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:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98]\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The danger token is invariant and too light for small text on a light surface (3.6:1): the label stays a\n // text role, the border and the tint carry the danger.\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `secondary` (a raised surface), `outline`, `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Disables and signals the wait (aria-busy, data-loading) — the product adds a spinner if it wants one. */\n loading?: boolean;\n };\n\nexport function Button({ asChild, loading, variant, size, shape, className, disabled, ...props }: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n return (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({ variant, size, shape, className })}\n {...props}\n />\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. */\nexport function IconButton({ label, size = \"icon\", ...props }: IconButtonProps) {\n return <Button aria-label={label} title={label} size={size} {...props} />;\n}\n"],"mappings":";AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;AAmDlC;AAjDG,IAAM,iBAAiB,GAAG;AAAA,EAC/B,MACE;AAAA,EAGF,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,IACV;AAAA,IACA,MAAM,EAAE,IAAI,oBAAoB,IAAI,qBAAqB,IAAI,qBAAqB,MAAM,YAAY;AAAA,IACpG,OAAO,EAAE,SAAS,cAAc,MAAM,eAAe;AAAA,EACvD;AAAA,EACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,MAAM,OAAO,UAAU;AACxE,CAAC;AA2BM,SAAS,OAAO,EAAE,SAAS,SAAS,SAAS,MAAM,OAAO,WAAW,UAAU,GAAG,MAAM,GAAgB;AAC7G,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,UAAU,SAAY;AAAA,MAC5B,aAAW,WAAW;AAAA,MACtB,gBAAc,UAAU,KAAK;AAAA,MAC7B,gBAAc,WAAW;AAAA,MACzB,UAAU,UAAU,SAAY,YAAY;AAAA,MAC5C,iBAAe,YAAY,YAAY,WAAW,OAAO;AAAA,MACzD,WAAW,eAAe,EAAE,SAAS,MAAM,OAAO,UAAU,CAAC;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,GAAG,MAAM,GAAoB;AAC9E,SAAO,oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OAAO;AACzE;","names":[]}
package/dist/card.js CHANGED
@@ -14,7 +14,7 @@ var card = tv({
14
14
  fallback: "flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60",
15
15
  overlay: "absolute z-10 flex items-center gap-1.5",
16
16
  body: "relative flex flex-1 flex-col gap-3",
17
- title: "line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-accent",
17
+ title: "line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-fg-accent",
18
18
  description: "line-clamp-2 text-xs text-fg-secondary",
19
19
  stat: "min-w-0",
20
20
  statLabel: "text-[10px] font-semibold uppercase tracking-wider text-fg-secondary",
package/dist/card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/card/card.tsx"],"sourcesContent":["// Server-safe: no hook, no context. One `tv` definition with slots: each part takes its slot, and a product overrides\n// any part through `className` (merged last by tailwind-merge).\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\n\nexport const card = tv({\n slots: {\n root:\n \"group relative flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n media: \"relative overflow-hidden bg-media\",\n image: \"h-full w-full object-cover transition-transform duration-500 motion-safe:group-hover:scale-105\",\n fallback: \"flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60\",\n overlay: \"absolute z-10 flex items-center gap-1.5\",\n body: \"relative flex flex-1 flex-col gap-3\",\n title: \"line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-accent\",\n description: \"line-clamp-2 text-xs text-fg-secondary\",\n stat: \"min-w-0\",\n statLabel: \"text-[10px] font-semibold uppercase tracking-wider text-fg-secondary\",\n statValue: \"font-display text-xl font-black tabular-nums text-fg\",\n footer: \"relative mt-auto flex items-center gap-2 border-t border-border-subtle pt-3 text-xs text-fg-secondary\",\n },\n variants: {\n radius: { md: { root: \"rounded-md\" }, lg: { root: \"rounded-lg\" }, xl: { root: \"rounded-xl\" } },\n tone: { default: {}, elevated: { root: \"bg-surface-2 shadow-md\" }, glass: { root: \"bg-surface-1/70 backdrop-blur-md\" } },\n interactive: { true: { root: \"kz-spotlight kz-lift hover:border-accent/50\" } },\n padding: { none: { body: \"p-0\" }, sm: { body: \"p-3\" }, md: { body: \"p-4\" }, lg: { body: \"p-6\" } },\n },\n defaultVariants: { radius: \"xl\", tone: \"default\", padding: \"md\" },\n});\n\ntype CardVariants = VariantProps<typeof card>;\n/** The parts without a variant read the default slots: no context, so server-safe. */\nconst slots = card();\n\nexport type CardRootProps = React.ComponentProps<\"div\"> &\n Pick<CardVariants, \"radius\" | \"tone\" | \"interactive\"> & {\n /**\n * md · lg · xl.\n * @default \"xl\"\n */\n radius?: CardVariants[\"radius\"];\n /**\n * default (the base surface) · elevated (raised, a shadow) · glass (translucent, blurred).\n * @default \"default\"\n */\n tone?: CardVariants[\"tone\"];\n /** The spotlight that follows the pointer and the lift on hover: for a card that is a link. */\n interactive?: CardVariants[\"interactive\"];\n /** Renders the child (a link, an article) instead of the <div>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Enters on scroll (MotionObserver): the index in the grid becomes the delay (50 ms a step, 8 steps at most). */\n reveal?: number;\n };\n\nexport function CardRoot({ asChild, reveal, radius, tone, interactive, className, style, ...props }: CardRootProps) {\n const Comp = asChild ? Slot.Root : \"div\";\n const revealStyle =\n reveal === undefined ? style : ({ ...style, \"--kz-delay\": `${Math.min(Math.max(reveal, 0), 8) * 50}ms` } as React.CSSProperties);\n return (\n <Comp\n data-reveal={reveal === undefined ? undefined : \"\"}\n data-interactive={interactive ? \"\" : undefined}\n style={revealStyle}\n className={card({ radius, tone, interactive }).root({ className })}\n {...props}\n />\n );\n}\n\nconst ASPECT = { video: \"aspect-video\", square: \"aspect-square\", portrait: \"aspect-[3/4]\", auto: \"\" } as const;\nexport type CardMediaProps = React.ComponentProps<\"div\"> & {\n /** The ratio of the media: video (16:9) · square · portrait (3:4) · auto (the content's). */\n aspect?: keyof typeof ASPECT;\n};\n\nexport function CardMedia({ aspect = \"video\", className, ...props }: CardMediaProps) {\n return <div data-aspect={aspect} className={slots.media({ className: cn(ASPECT[aspect], className) })} {...props} />;\n}\n\nexport type CardImageProps = Omit<React.ComponentProps<\"img\">, \"src\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** Shown when there is no image: an icon, an illustration (decorative). */\n fallback?: React.ReactNode;\n};\n\n/** The image of a media, or its `fallback` when there is none. `alt` is empty by default: the title names the card. */\nexport function CardImage({ src, alt = \"\", fallback, className, ...props }: CardImageProps) {\n if (!src) {\n return (\n <div data-fallback=\"\" aria-hidden className={slots.fallback({ className })}>\n {fallback}\n </div>\n );\n }\n return <img src={src} alt={alt} loading=\"lazy\" decoding=\"async\" className={slots.image({ className })} {...props} />;\n}\n\nconst CORNER = {\n \"top-left\": \"left-2.5 top-2.5\",\n \"top-right\": \"right-2.5 top-2.5\",\n \"bottom-left\": \"bottom-2.5 left-2.5\",\n \"bottom-right\": \"bottom-2.5 right-2.5\",\n} as const;\nexport type CardOverlayProps = React.ComponentProps<\"div\"> & {\n /** The corner of the media it sits in. */\n corner?: keyof typeof CORNER;\n};\n\n/** What sits on the media (badges, a caption). `scrim` and `fg-on-media` are invariant: nothing to do for light. */\nexport function CardOverlay({ corner = \"top-left\", className, ...props }: CardOverlayProps) {\n return <div data-corner={corner} className={slots.overlay({ className: cn(CORNER[corner], className) })} {...props} />;\n}\n\nexport type CardBodyProps = React.ComponentProps<\"div\"> & {\n /**\n * none · sm · md · lg.\n * @default \"md\"\n */\n padding?: CardVariants[\"padding\"];\n};\n\nexport function CardBody({ padding, className, ...props }: CardBodyProps) {\n return <div className={card({ padding }).body({ className })} {...props} />;\n}\n\nexport type CardTitleProps = React.ComponentProps<\"h3\"> & {\n /** The heading level, to fit the page's outline. */\n as?: \"h2\" | \"h3\" | \"h4\";\n};\n\nexport function CardTitle({ as: Tag = \"h3\", className, ...props }: CardTitleProps) {\n return <Tag className={slots.title({ className })} {...props} />;\n}\n\nexport function CardDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return <p className={slots.description({ className })} {...props} />;\n}\n\nexport type CardStatProps = React.ComponentProps<\"div\"> & {\n /** What the figure is, in small capitals above it (the figure is the children). */\n label: React.ReactNode;\n};\n\n/** A figure put forward: the label in capitals, the value in tabular digits. */\nexport function CardStat({ label, className, children, ...props }: CardStatProps) {\n return (\n <div className={slots.stat({ className })} {...props}>\n <p className={slots.statLabel()}>{label}</p>\n <p className={slots.statValue()}>{children}</p>\n </div>\n );\n}\n\nexport function CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={slots.footer({ className })} {...props} />;\n}\n\n/** `Card.Root/Media/Image/Overlay/Body/Title/Description/Stat/Footer`. */\nexport const Card = {\n Root: CardRoot,\n Media: CardMedia,\n Image: CardImage,\n Overlay: CardOverlay,\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Stat: CardStat,\n Footer: CardFooter,\n};\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../src/card/card.tsx"],"sourcesContent":["// Server-safe: no hook, no context. One `tv` definition with slots: each part takes its slot, and a product overrides\n// any part through `className` (merged last by tailwind-merge).\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\n\nexport const card = tv({\n slots: {\n root:\n \"group relative flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n media: \"relative overflow-hidden bg-media\",\n image: \"h-full w-full object-cover transition-transform duration-500 motion-safe:group-hover:scale-105\",\n fallback: \"flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60\",\n overlay: \"absolute z-10 flex items-center gap-1.5\",\n body: \"relative flex flex-1 flex-col gap-3\",\n title: \"line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-fg-accent\",\n description: \"line-clamp-2 text-xs text-fg-secondary\",\n stat: \"min-w-0\",\n statLabel: \"text-[10px] font-semibold uppercase tracking-wider text-fg-secondary\",\n statValue: \"font-display text-xl font-black tabular-nums text-fg\",\n footer: \"relative mt-auto flex items-center gap-2 border-t border-border-subtle pt-3 text-xs text-fg-secondary\",\n },\n variants: {\n radius: { md: { root: \"rounded-md\" }, lg: { root: \"rounded-lg\" }, xl: { root: \"rounded-xl\" } },\n tone: { default: {}, elevated: { root: \"bg-surface-2 shadow-md\" }, glass: { root: \"bg-surface-1/70 backdrop-blur-md\" } },\n interactive: { true: { root: \"kz-spotlight kz-lift hover:border-accent/50\" } },\n padding: { none: { body: \"p-0\" }, sm: { body: \"p-3\" }, md: { body: \"p-4\" }, lg: { body: \"p-6\" } },\n },\n defaultVariants: { radius: \"xl\", tone: \"default\", padding: \"md\" },\n});\n\ntype CardVariants = VariantProps<typeof card>;\n/** The parts without a variant read the default slots: no context, so server-safe. */\nconst slots = card();\n\nexport type CardRootProps = React.ComponentProps<\"div\"> &\n Pick<CardVariants, \"radius\" | \"tone\" | \"interactive\"> & {\n /**\n * md · lg · xl.\n * @default \"xl\"\n */\n radius?: CardVariants[\"radius\"];\n /**\n * default (the base surface) · elevated (raised, a shadow) · glass (translucent, blurred).\n * @default \"default\"\n */\n tone?: CardVariants[\"tone\"];\n /** The spotlight that follows the pointer and the lift on hover: for a card that is a link. */\n interactive?: CardVariants[\"interactive\"];\n /** Renders the child (a link, an article) instead of the <div>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Enters on scroll (MotionObserver): the index in the grid becomes the delay (50 ms a step, 8 steps at most). */\n reveal?: number;\n };\n\nexport function CardRoot({ asChild, reveal, radius, tone, interactive, className, style, ...props }: CardRootProps) {\n const Comp = asChild ? Slot.Root : \"div\";\n const revealStyle =\n reveal === undefined ? style : ({ ...style, \"--kz-delay\": `${Math.min(Math.max(reveal, 0), 8) * 50}ms` } as React.CSSProperties);\n return (\n <Comp\n data-reveal={reveal === undefined ? undefined : \"\"}\n data-interactive={interactive ? \"\" : undefined}\n style={revealStyle}\n className={card({ radius, tone, interactive }).root({ className })}\n {...props}\n />\n );\n}\n\nconst ASPECT = { video: \"aspect-video\", square: \"aspect-square\", portrait: \"aspect-[3/4]\", auto: \"\" } as const;\nexport type CardMediaProps = React.ComponentProps<\"div\"> & {\n /** The ratio of the media: video (16:9) · square · portrait (3:4) · auto (the content's). */\n aspect?: keyof typeof ASPECT;\n};\n\nexport function CardMedia({ aspect = \"video\", className, ...props }: CardMediaProps) {\n return <div data-aspect={aspect} className={slots.media({ className: cn(ASPECT[aspect], className) })} {...props} />;\n}\n\nexport type CardImageProps = Omit<React.ComponentProps<\"img\">, \"src\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** Shown when there is no image: an icon, an illustration (decorative). */\n fallback?: React.ReactNode;\n};\n\n/** The image of a media, or its `fallback` when there is none. `alt` is empty by default: the title names the card. */\nexport function CardImage({ src, alt = \"\", fallback, className, ...props }: CardImageProps) {\n if (!src) {\n return (\n <div data-fallback=\"\" aria-hidden className={slots.fallback({ className })}>\n {fallback}\n </div>\n );\n }\n return <img src={src} alt={alt} loading=\"lazy\" decoding=\"async\" className={slots.image({ className })} {...props} />;\n}\n\nconst CORNER = {\n \"top-left\": \"left-2.5 top-2.5\",\n \"top-right\": \"right-2.5 top-2.5\",\n \"bottom-left\": \"bottom-2.5 left-2.5\",\n \"bottom-right\": \"bottom-2.5 right-2.5\",\n} as const;\nexport type CardOverlayProps = React.ComponentProps<\"div\"> & {\n /** The corner of the media it sits in. */\n corner?: keyof typeof CORNER;\n};\n\n/** What sits on the media (badges, a caption). `scrim` and `fg-on-media` are invariant: nothing to do for light. */\nexport function CardOverlay({ corner = \"top-left\", className, ...props }: CardOverlayProps) {\n return <div data-corner={corner} className={slots.overlay({ className: cn(CORNER[corner], className) })} {...props} />;\n}\n\nexport type CardBodyProps = React.ComponentProps<\"div\"> & {\n /**\n * none · sm · md · lg.\n * @default \"md\"\n */\n padding?: CardVariants[\"padding\"];\n};\n\nexport function CardBody({ padding, className, ...props }: CardBodyProps) {\n return <div className={card({ padding }).body({ className })} {...props} />;\n}\n\nexport type CardTitleProps = React.ComponentProps<\"h3\"> & {\n /** The heading level, to fit the page's outline. */\n as?: \"h2\" | \"h3\" | \"h4\";\n};\n\nexport function CardTitle({ as: Tag = \"h3\", className, ...props }: CardTitleProps) {\n return <Tag className={slots.title({ className })} {...props} />;\n}\n\nexport function CardDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return <p className={slots.description({ className })} {...props} />;\n}\n\nexport type CardStatProps = React.ComponentProps<\"div\"> & {\n /** What the figure is, in small capitals above it (the figure is the children). */\n label: React.ReactNode;\n};\n\n/** A figure put forward: the label in capitals, the value in tabular digits. */\nexport function CardStat({ label, className, children, ...props }: CardStatProps) {\n return (\n <div className={slots.stat({ className })} {...props}>\n <p className={slots.statLabel()}>{label}</p>\n <p className={slots.statValue()}>{children}</p>\n </div>\n );\n}\n\nexport function CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={slots.footer({ className })} {...props} />;\n}\n\n/** `Card.Root/Media/Image/Overlay/Body/Title/Description/Stat/Footer`. */\nexport const Card = {\n Root: CardRoot,\n Media: CardMedia,\n Image: CardImage,\n Overlay: CardOverlay,\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Stat: CardStat,\n Footer: CardFooter,\n};\n"],"mappings":"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","names":[]}
@@ -10,7 +10,7 @@ var buttonVariants = tv({
10
10
  variant: {
11
11
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
12
12
  secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3",
13
- outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-accent",
13
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent",
14
14
  ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg",
15
15
  // The danger token is invariant and too light for small text on a light surface (3.6:1): the label stays a
16
16
  // text role, the border and the tint carry the danger.
@@ -46,4 +46,4 @@ export {
46
46
  Button,
47
47
  IconButton
48
48
  };
49
- //# sourceMappingURL=chunk-ZUD4U22H.js.map
49
+ //# sourceMappingURL=chunk-6DJ6SQY3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button/button.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const buttonVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\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:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98]\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The danger token is invariant and too light for small text on a light surface (3.6:1): the label stays a\n // text role, the border and the tint carry the danger.\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `secondary` (a raised surface), `outline`, `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Disables and signals the wait (aria-busy, data-loading) — the product adds a spinner if it wants one. */\n loading?: boolean;\n };\n\nexport function Button({ asChild, loading, variant, size, shape, className, disabled, ...props }: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n return (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({ variant, size, shape, className })}\n {...props}\n />\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. */\nexport function IconButton({ label, size = \"icon\", ...props }: IconButtonProps) {\n return <Button aria-label={label} title={label} size={size} {...props} />;\n}\n"],"mappings":";;;AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;AAmDlC;AAjDG,IAAM,iBAAiB,GAAG;AAAA,EAC/B,MACE;AAAA,EAGF,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,IACV;AAAA,IACA,MAAM,EAAE,IAAI,oBAAoB,IAAI,qBAAqB,IAAI,qBAAqB,MAAM,YAAY;AAAA,IACpG,OAAO,EAAE,SAAS,cAAc,MAAM,eAAe;AAAA,EACvD;AAAA,EACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,MAAM,OAAO,UAAU;AACxE,CAAC;AA2BM,SAAS,OAAO,EAAE,SAAS,SAAS,SAAS,MAAM,OAAO,WAAW,UAAU,GAAG,MAAM,GAAgB;AAC7G,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,UAAU,SAAY;AAAA,MAC5B,aAAW,WAAW;AAAA,MACtB,gBAAc,UAAU,KAAK;AAAA,MAC7B,gBAAc,WAAW;AAAA,MACzB,UAAU,UAAU,SAAY,YAAY;AAAA,MAC5C,iBAAe,YAAY,YAAY,WAAW,OAAO;AAAA,MACzD,WAAW,eAAe,EAAE,SAAS,MAAM,OAAO,UAAU,CAAC;AAAA,MAC5D,GAAG;AAAA;AAAA,EACN;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,GAAG,MAAM,GAAoB;AAC9E,SAAO,oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OAAO;AACzE;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  IconButton
4
- } from "./chunk-ZUD4U22H.js";
4
+ } from "./chunk-6DJ6SQY3.js";
5
5
 
6
6
  // src/dialog/dialog.tsx
7
7
  import { Dialog as DialogPrimitive } from "radix-ui";
@@ -118,4 +118,4 @@ export {
118
118
  Dialog,
119
119
  Sheet
120
120
  };
121
- //# sourceMappingURL=chunk-3X5MVH54.js.map
121
+ //# sourceMappingURL=chunk-IUGBKMJC.js.map
package/dist/command.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  DialogContent
4
- } from "./chunk-3X5MVH54.js";
5
- import "./chunk-ZUD4U22H.js";
4
+ } from "./chunk-IUGBKMJC.js";
5
+ import "./chunk-6DJ6SQY3.js";
6
6
  import {
7
7
  cn
8
8
  } from "./chunk-5AXLA4LK.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { B as ButtonProps } from './button-8La7l0V4.js';
2
+ import { B as ButtonProps } from './button-D5aSsmxX.js';
3
3
  import 'tailwind-variants';
4
4
 
5
5
  declare const confirmArmed = "border border-danger bg-danger/20 text-fg hover:border-danger hover:bg-danger/30";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Button
4
- } from "./chunk-ZUD4U22H.js";
4
+ } from "./chunk-6DJ6SQY3.js";
5
5
  import {
6
6
  cn
7
7
  } from "./chunk-5AXLA4LK.js";
package/dist/dialog.js CHANGED
@@ -9,10 +9,10 @@ import {
9
9
  DialogTitle,
10
10
  Sheet,
11
11
  dialog
12
- } from "./chunk-3X5MVH54.js";
12
+ } from "./chunk-IUGBKMJC.js";
13
13
  import {
14
14
  Button
15
- } from "./chunk-ZUD4U22H.js";
15
+ } from "./chunk-6DJ6SQY3.js";
16
16
 
17
17
  // src/dialog/alert-dialog.tsx
18
18
  import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
@@ -14,7 +14,7 @@ var menu = tv({
14
14
  slots: {
15
15
  content: cn(floating, "min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto p-1 origin-(--radix-dropdown-menu-content-transform-origin)"),
16
16
  item: "relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 [&>svg]:text-fg-secondary",
17
- indicator: "ml-auto flex h-4 w-4 items-center justify-center text-accent",
17
+ indicator: "ml-auto flex h-4 w-4 items-center justify-center text-fg-accent",
18
18
  label: "px-2.5 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wider text-fg-secondary",
19
19
  separator: "-mx-1 my-1 h-px bg-border-subtle"
20
20
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Client (a portal). Radix does the roving focus, the arrows, Home/End, typeahead, Escape and the focus return.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { floating } from \"../floating\";\n\nexport const menu = tv({\n slots: {\n content: cn(floating, \"min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto p-1 origin-(--radix-dropdown-menu-content-transform-origin)\"),\n item:\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors \" +\n \"data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 \" +\n \"[&>svg]:text-fg-secondary\",\n indicator: \"ml-auto flex h-4 w-4 items-center justify-center text-accent\",\n label: \"px-2.5 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wider text-fg-secondary\",\n separator: \"-mx-1 my-1 h-px bg-border-subtle\",\n },\n variants: {\n // The danger token is too light for small text on a light surface: the label stays a text role, the icon and the\n // highlight carry the danger.\n tone: { default: {}, danger: { item: \"data-highlighted:bg-danger/15 [&>svg]:text-danger\" } },\n },\n defaultVariants: { tone: \"default\" },\n});\nconst s = menu();\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Content> & {\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n};\n\nexport function DropdownMenuContent({ sideOffset = 6, align = \"end\", collisionPadding = 8, container, className, ...props }: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container}>\n <MenuPrimitive.Content sideOffset={sideOffset} align={align} collisionPadding={collisionPadding} className={s.content({ className })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n /** `danger` for a destructive action: the icon and the highlight carry the danger, the label stays legible. */\n tone?: \"default\" | \"danger\";\n};\n\n/** An action. `tone=\"danger\"` for a destructive one; `onSelect` runs it (the menu closes). */\nexport function DropdownMenuItem({ tone, className, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item data-tone={tone ?? \"default\"} className={menu({ tone }).item({ className })} {...props} />;\n}\n\n/** A toggled option: `checked` + `onCheckedChange`. */\nexport function DropdownMenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n return (\n <MenuPrimitive.CheckboxItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Label>) {\n return <MenuPrimitive.Label className={s.label({ className })} {...props} />;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n return <MenuPrimitive.Separator className={s.separator({ className })} {...props} />;\n}\n\n/** `DropdownMenu.Root/Trigger/Content/Item/CheckboxItem/Label/Separator/Group`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const DropdownMenu = {\n Root: MenuPrimitive.Root,\n Trigger: MenuPrimitive.Trigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: MenuPrimitive.Group,\n};\n"],"mappings":";;;;;;;;;AACA,SAAS,gBAAgB,qBAAqB;AAE9C,SAAS,UAAU;AAiCb,cAkBF,YAlBE;AA5BC,IAAM,OAAO,GAAG;AAAA,EACrB,OAAO;AAAA,IACL,SAAS,GAAG,UAAU,6IAA6I;AAAA,IACnK,MACE;AAAA,IAGF,WAAW;AAAA,IACX,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA;AAAA,IAGR,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAAE,MAAM,oDAAoD,EAAE;AAAA,EAC7F;AAAA,EACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;AACD,IAAM,IAAI,KAAK;AAOR,SAAS,oBAAoB,EAAE,aAAa,GAAG,QAAQ,OAAO,mBAAmB,GAAG,WAAW,WAAW,GAAG,MAAM,GAA6B;AACrJ,SACE,oBAAC,cAAc,QAAd,EAAqB,WACpB,8BAAC,cAAc,SAAd,EAAsB,YAAwB,OAAc,kBAAoC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO,GACnJ;AAEJ;AAQO,SAAS,iBAAiB,EAAE,MAAM,WAAW,GAAG,MAAM,GAA0B;AACrF,SAAO,oBAAC,cAAc,MAAd,EAAmB,aAAW,QAAQ,WAAW,WAAW,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACrH;AAGO,SAAS,yBAAyB,EAAE,WAAW,UAAU,GAAG,MAAM,GAA4D;AACnI,SACE,qBAAC,cAAc,cAAd,EAA2B,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC/D;AAAA;AAAA,IACD,oBAAC,cAAc,eAAd,EAA4B,WAAW,EAAE,UAAU,GAClD,8BAAC,SAAI,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,OAAM,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACnI,8BAAC,UAAK,GAAE,mBAAkB,GAC5B,GACF;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAqD;AAC3G,SAAO,oBAAC,cAAc,OAAd,EAAoB,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC5E;AAEO,SAAS,sBAAsB,EAAE,WAAW,GAAG,MAAM,GAAyD;AACnH,SAAO,oBAAC,cAAc,WAAd,EAAwB,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACpF;AAGO,IAAM,eAAe;AAAA,EAC1B,MAAM,cAAc;AAAA,EACpB,SAAS,cAAc;AAAA,EACvB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO,cAAc;AACvB;","names":[]}
1
+ {"version":3,"sources":["../src/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Client (a portal). Radix does the roving focus, the arrows, Home/End, typeahead, Escape and the focus return.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { floating } from \"../floating\";\n\nexport const menu = tv({\n slots: {\n content: cn(floating, \"min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto p-1 origin-(--radix-dropdown-menu-content-transform-origin)\"),\n item:\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors \" +\n \"data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 \" +\n \"[&>svg]:text-fg-secondary\",\n indicator: \"ml-auto flex h-4 w-4 items-center justify-center text-fg-accent\",\n label: \"px-2.5 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wider text-fg-secondary\",\n separator: \"-mx-1 my-1 h-px bg-border-subtle\",\n },\n variants: {\n // The danger token is too light for small text on a light surface: the label stays a text role, the icon and the\n // highlight carry the danger.\n tone: { default: {}, danger: { item: \"data-highlighted:bg-danger/15 [&>svg]:text-danger\" } },\n },\n defaultVariants: { tone: \"default\" },\n});\nconst s = menu();\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Content> & {\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n};\n\nexport function DropdownMenuContent({ sideOffset = 6, align = \"end\", collisionPadding = 8, container, className, ...props }: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container}>\n <MenuPrimitive.Content sideOffset={sideOffset} align={align} collisionPadding={collisionPadding} className={s.content({ className })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n /** `danger` for a destructive action: the icon and the highlight carry the danger, the label stays legible. */\n tone?: \"default\" | \"danger\";\n};\n\n/** An action. `tone=\"danger\"` for a destructive one; `onSelect` runs it (the menu closes). */\nexport function DropdownMenuItem({ tone, className, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item data-tone={tone ?? \"default\"} className={menu({ tone }).item({ className })} {...props} />;\n}\n\n/** A toggled option: `checked` + `onCheckedChange`. */\nexport function DropdownMenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n return (\n <MenuPrimitive.CheckboxItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Label>) {\n return <MenuPrimitive.Label className={s.label({ className })} {...props} />;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n return <MenuPrimitive.Separator className={s.separator({ className })} {...props} />;\n}\n\n/** `DropdownMenu.Root/Trigger/Content/Item/CheckboxItem/Label/Separator/Group`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const DropdownMenu = {\n Root: MenuPrimitive.Root,\n Trigger: MenuPrimitive.Trigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: MenuPrimitive.Group,\n};\n"],"mappings":";;;;;;;;;AACA,SAAS,gBAAgB,qBAAqB;AAE9C,SAAS,UAAU;AAiCb,cAkBF,YAlBE;AA5BC,IAAM,OAAO,GAAG;AAAA,EACrB,OAAO;AAAA,IACL,SAAS,GAAG,UAAU,6IAA6I;AAAA,IACnK,MACE;AAAA,IAGF,WAAW;AAAA,IACX,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA;AAAA,IAGR,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAAE,MAAM,oDAAoD,EAAE;AAAA,EAC7F;AAAA,EACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;AACD,IAAM,IAAI,KAAK;AAOR,SAAS,oBAAoB,EAAE,aAAa,GAAG,QAAQ,OAAO,mBAAmB,GAAG,WAAW,WAAW,GAAG,MAAM,GAA6B;AACrJ,SACE,oBAAC,cAAc,QAAd,EAAqB,WACpB,8BAAC,cAAc,SAAd,EAAsB,YAAwB,OAAc,kBAAoC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO,GACnJ;AAEJ;AAQO,SAAS,iBAAiB,EAAE,MAAM,WAAW,GAAG,MAAM,GAA0B;AACrF,SAAO,oBAAC,cAAc,MAAd,EAAmB,aAAW,QAAQ,WAAW,WAAW,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACrH;AAGO,SAAS,yBAAyB,EAAE,WAAW,UAAU,GAAG,MAAM,GAA4D;AACnI,SACE,qBAAC,cAAc,cAAd,EAA2B,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC/D;AAAA;AAAA,IACD,oBAAC,cAAc,eAAd,EAA4B,WAAW,EAAE,UAAU,GAClD,8BAAC,SAAI,SAAQ,aAAY,MAAK,QAAO,QAAO,gBAAe,aAAY,OAAM,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACnI,8BAAC,UAAK,GAAE,mBAAkB,GAC5B,GACF;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAqD;AAC3G,SAAO,oBAAC,cAAc,OAAd,EAAoB,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC5E;AAEO,SAAS,sBAAsB,EAAE,WAAW,GAAG,MAAM,GAAyD;AACnH,SAAO,oBAAC,cAAc,WAAd,EAAwB,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACpF;AAGO,IAAM,eAAe;AAAA,EAC1B,MAAM,cAAc;AAAA,EACpB,SAAS,cAAc;AAAA,EACvB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO,cAAc;AACvB;","names":[]}
package/dist/index.d.ts CHANGED
@@ -13,10 +13,17 @@ interface MarkProps {
13
13
  className?: string;
14
14
  }
15
15
 
16
- /** The Krizaka mark: a hexagonal shield with a neural core, inside slow orbits. Blue accent: `--kz-accent`. */
16
+ /**
17
+ * The Krizaka mark: an ink hexagonal shield, open at one vertex where a blue node breaks out, around a blue core —
18
+ * the parent of the family (Orochia's coiled serpent, Orazaka's shards). The orbit turns, the node and the core
19
+ * breathe. The shield reads the host's text roles, so it is ink in both themes. Below 48 px it crops to the emblem.
20
+ */
17
21
  declare function KrizakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
18
22
 
19
- /** The Orazaka mark: three shards orbiting slowly around an amber core that breathes. */
23
+ /**
24
+ * The Orazaka mark: three solid hexagonal shards in the Orazaka orange orbiting slowly around a core that breathes —
25
+ * the family's grammar (dashed orbit, ring, bold emblem, bright core). Below 48 px it crops to the emblem.
26
+ */
20
27
  declare function OrazakaLogo({ size, animated, title, className }: MarkProps): React.JSX.Element;
21
28
 
22
29
  /**