@krizaka/ui 3.63.0 → 3.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) hide show
  1. package/dist/account-settings.js +1 -1
  2. package/dist/action-bar.js +4 -4
  3. package/dist/analysis-report.d.ts +274 -0
  4. package/dist/analysis-report.js +207 -0
  5. package/dist/analysis-report.js.map +1 -0
  6. package/dist/argument-card.d.ts +1 -1
  7. package/dist/argument-card.js +5 -5
  8. package/dist/badge.js +4 -34
  9. package/dist/badge.js.map +1 -1
  10. package/dist/blocks.css +99 -8
  11. package/dist/button.js +1 -1
  12. package/dist/captcha.js +1 -1
  13. package/dist/chunk-5PFCELGW.js +41 -0
  14. package/dist/chunk-5PFCELGW.js.map +1 -0
  15. package/dist/chunk-5RWHDX5J.js +37 -0
  16. package/dist/chunk-5RWHDX5J.js.map +1 -0
  17. package/dist/{chunk-5LANVCK7.js → chunk-BG5APGX6.js} +2 -2
  18. package/dist/{chunk-WOZP3JLW.js → chunk-DJ5ZPPWL.js} +1 -1
  19. package/dist/chunk-DJ5ZPPWL.js.map +1 -0
  20. package/dist/{chunk-UV4HBVH7.js → chunk-EB45EVPJ.js} +2 -2
  21. package/dist/{chunk-SJS6RJIT.js.map → chunk-EB45EVPJ.js.map} +1 -1
  22. package/dist/{chunk-6EAHUURY.js → chunk-GHAN7OOE.js} +2 -2
  23. package/dist/chunk-JT7ZKZT5.js +1 -0
  24. package/dist/chunk-JT7ZKZT5.js.map +1 -0
  25. package/dist/{chunk-3DHNN5V7.js → chunk-M3GEYLMR.js} +2 -2
  26. package/dist/{chunk-3DHNN5V7.js.map → chunk-M3GEYLMR.js.map} +1 -1
  27. package/dist/{chunk-7J2L4HOD.js → chunk-MTVX4RRF.js} +2 -2
  28. package/dist/{chunk-7J2L4HOD.js.map → chunk-MTVX4RRF.js.map} +1 -1
  29. package/dist/{chunk-YKEIOYJ5.js → chunk-NPMGYLJV.js} +1 -1
  30. package/dist/chunk-NPMGYLJV.js.map +1 -0
  31. package/dist/{chunk-HEKDKM5Y.js → chunk-QVHSV6RA.js} +1 -1
  32. package/dist/{chunk-7JG3VR4C.js → chunk-RCKXJEDQ.js} +5 -5
  33. package/dist/chunk-U4XTZMB7.js +103 -0
  34. package/dist/chunk-U4XTZMB7.js.map +1 -0
  35. package/dist/{chunk-SJS6RJIT.js → chunk-V7W4RLRW.js} +2 -2
  36. package/dist/{chunk-UV4HBVH7.js.map → chunk-V7W4RLRW.js.map} +1 -1
  37. package/dist/command.js +2 -2
  38. package/dist/confirm-button.js +1 -1
  39. package/dist/continue-prompt.js +1 -1
  40. package/dist/continue-prompt.js.map +1 -1
  41. package/dist/cover-hero.js +1 -1
  42. package/dist/data-table.js +2 -2
  43. package/dist/date-picker.d.ts +15 -15
  44. package/dist/dialog.js +2 -2
  45. package/dist/embed-facade.d.ts +37 -0
  46. package/dist/embed-facade.js +96 -0
  47. package/dist/embed-facade.js.map +1 -0
  48. package/dist/filter-bar.d.ts +3 -3
  49. package/dist/force-update-screen.js +1 -1
  50. package/dist/genui.js +2 -2
  51. package/dist/kind-config-editor.js +1 -1
  52. package/dist/language-switch.d.ts +9 -9
  53. package/dist/link-card.js +2 -2
  54. package/dist/maintenance-screen.js +1 -1
  55. package/dist/map.js +6 -0
  56. package/dist/map.js.map +1 -1
  57. package/dist/margin-layout.d.ts +71 -0
  58. package/dist/margin-layout.js +29 -0
  59. package/dist/margin-layout.js.map +1 -0
  60. package/dist/match-dialog.js +1 -1
  61. package/dist/media-grid.js +1 -1
  62. package/dist/meter.js +2 -1
  63. package/dist/native/map.js +6 -0
  64. package/dist/native/map.js.map +1 -1
  65. package/dist/native.d.ts +88 -2
  66. package/dist/native.js +1667 -1529
  67. package/dist/native.js.map +1 -1
  68. package/dist/nav-bar.js +1 -1
  69. package/dist/page-DPHDmDAQ.d.ts +131 -0
  70. package/dist/page-hero.js +4 -4
  71. package/dist/page.d.ts +7 -125
  72. package/dist/page.js +13 -1
  73. package/dist/page.js.map +1 -1
  74. package/dist/quota-meter.js +2 -1
  75. package/dist/quota-meter.js.map +1 -1
  76. package/dist/retro-tv.d.ts +6 -3
  77. package/dist/retro-tv.js +6 -5
  78. package/dist/retro-tv.js.map +1 -1
  79. package/dist/reviews.d.ts +49 -0
  80. package/dist/reviews.js +66 -0
  81. package/dist/reviews.js.map +1 -0
  82. package/dist/separator.d.ts +26 -3
  83. package/dist/separator.js +19 -1
  84. package/dist/separator.js.map +1 -1
  85. package/dist/service-card.d.ts +56 -63
  86. package/dist/service-card.js +49 -10
  87. package/dist/service-card.js.map +1 -1
  88. package/dist/settings-layout.js +1 -1
  89. package/dist/site-cahier.js +1 -1
  90. package/dist/specimen-tag.d.ts +15 -3
  91. package/dist/specimen-tag.js +4 -27
  92. package/dist/specimen-tag.js.map +1 -1
  93. package/dist/stat.d.ts +87 -5
  94. package/dist/stat.js +9 -53
  95. package/dist/stat.js.map +1 -1
  96. package/dist/sticky-action.d.ts +7 -2
  97. package/dist/sticky-action.js +24 -3
  98. package/dist/sticky-action.js.map +1 -1
  99. package/dist/theme.js +1 -1
  100. package/dist/update-prompt.js +1 -1
  101. package/dist/usage.d.ts +229 -0
  102. package/dist/usage.js +189 -0
  103. package/dist/usage.js.map +1 -0
  104. package/dist/vertical-video.js +1 -1
  105. package/dist/wall.d.ts +24 -12
  106. package/dist/wall.js +106 -43
  107. package/dist/wall.js.map +1 -1
  108. package/package.json +87 -8
  109. package/registry/account-menu.json +1 -1
  110. package/registry/account-settings.json +1 -1
  111. package/registry/achievement.json +1 -1
  112. package/registry/action-bar.json +1 -1
  113. package/registry/activity-feed.json +1 -1
  114. package/registry/agenda.json +1 -1
  115. package/registry/alert.json +1 -1
  116. package/registry/analysis-report.json +445 -0
  117. package/registry/anatomy-plate.json +1 -1
  118. package/registry/app-header.json +1 -1
  119. package/registry/app-shell.json +1 -1
  120. package/registry/argument-card.json +3 -3
  121. package/registry/audio-player.json +1 -1
  122. package/registry/auth-layout.json +1 -1
  123. package/registry/avatar.json +1 -1
  124. package/registry/badge.json +1 -1
  125. package/registry/bird-plate.json +1 -1
  126. package/registry/button.json +2 -2
  127. package/registry/captcha.json +1 -1
  128. package/registry/card-grid.json +1 -1
  129. package/registry/card.json +1 -1
  130. package/registry/catalogue-page.json +1 -1
  131. package/registry/changelog-page.json +1 -1
  132. package/registry/chapter.json +1 -1
  133. package/registry/chat.json +1 -1
  134. package/registry/checkbox.json +1 -1
  135. package/registry/chip-link.json +1 -1
  136. package/registry/chip-row.json +1 -1
  137. package/registry/chip.json +1 -1
  138. package/registry/choice-grid.json +1 -1
  139. package/registry/code-block.json +1 -1
  140. package/registry/combobox.json +1 -1
  141. package/registry/command.json +1 -1
  142. package/registry/comparison-table.json +1 -1
  143. package/registry/component-page.json +1 -1
  144. package/registry/confirm-button.json +1 -1
  145. package/registry/contact-page.json +1 -1
  146. package/registry/continue-prompt.json +1 -1
  147. package/registry/countdown.json +1 -1
  148. package/registry/cover-hero.json +1 -1
  149. package/registry/cta-panel.json +1 -1
  150. package/registry/dashboard-layout.json +1 -1
  151. package/registry/data-table.json +1 -1
  152. package/registry/date-picker.json +1 -1
  153. package/registry/decision-list.json +1 -1
  154. package/registry/description-list.json +1 -1
  155. package/registry/detail-layout.json +1 -1
  156. package/registry/dialog.json +1 -1
  157. package/registry/docs-article-page.json +1 -1
  158. package/registry/docs-hub-page.json +1 -1
  159. package/registry/docs-layout.json +1 -1
  160. package/registry/docs-nav.json +1 -1
  161. package/registry/document-viewer.json +1 -1
  162. package/registry/doodle.json +1 -1
  163. package/registry/drop-overlay.json +1 -1
  164. package/registry/dropdown-menu.json +1 -1
  165. package/registry/elephant.json +2 -2
  166. package/registry/embed-facade.json +243 -0
  167. package/registry/empty-state.json +1 -1
  168. package/registry/engine-flow.json +1 -1
  169. package/registry/environment-notice.json +1 -1
  170. package/registry/error-page.json +1 -1
  171. package/registry/examples/analysis-report/document-validation.d.ts +4 -0
  172. package/registry/examples/analysis-report/document-validation.js +47 -0
  173. package/registry/examples/analysis-report/document-validation.tsx +29 -0
  174. package/registry/examples/analysis-report/native/document-validation.d.ts +4 -0
  175. package/registry/examples/analysis-report/native/document-validation.dark.png +0 -0
  176. package/registry/examples/analysis-report/native/document-validation.js +48 -0
  177. package/registry/examples/analysis-report/native/document-validation.light.png +0 -0
  178. package/registry/examples/analysis-report/native/document-validation.tsx +32 -0
  179. package/registry/examples/analysis-report/streaming.d.ts +4 -0
  180. package/registry/examples/analysis-report/streaming.js +42 -0
  181. package/registry/examples/analysis-report/streaming.tsx +23 -0
  182. package/registry/examples/embed-facade/tiktok.d.ts +4 -0
  183. package/registry/examples/embed-facade/tiktok.js +20 -0
  184. package/registry/examples/embed-facade/tiktok.tsx +16 -0
  185. package/registry/examples/embed-facade/youtube.d.ts +4 -0
  186. package/registry/examples/embed-facade/youtube.js +22 -0
  187. package/registry/examples/embed-facade/youtube.tsx +20 -0
  188. package/registry/examples/margin-layout/findings.d.ts +4 -0
  189. package/registry/examples/margin-layout/findings.js +15 -0
  190. package/registry/examples/margin-layout/findings.tsx +18 -0
  191. package/registry/examples/margin-layout/steps.d.ts +4 -0
  192. package/registry/examples/margin-layout/steps.js +15 -0
  193. package/registry/examples/margin-layout/steps.tsx +16 -0
  194. package/registry/examples/page/kraft.d.ts +4 -0
  195. package/registry/examples/page/kraft.js +14 -0
  196. package/registry/examples/page/kraft.tsx +12 -0
  197. package/registry/examples/page/papers.d.ts +4 -0
  198. package/registry/examples/page/papers.js +14 -0
  199. package/registry/examples/page/papers.tsx +13 -0
  200. package/registry/examples/retro-tv/facade.d.ts +4 -0
  201. package/registry/examples/retro-tv/facade.js +12 -0
  202. package/registry/examples/retro-tv/facade.tsx +13 -0
  203. package/registry/examples/reviews/card.d.ts +4 -0
  204. package/registry/examples/reviews/card.js +23 -0
  205. package/registry/examples/reviews/card.tsx +19 -0
  206. package/registry/examples/reviews/summary.d.ts +4 -0
  207. package/registry/examples/reviews/summary.js +23 -0
  208. package/registry/examples/reviews/summary.tsx +17 -0
  209. package/registry/examples/separator/hand.d.ts +4 -0
  210. package/registry/examples/separator/hand.js +19 -0
  211. package/registry/examples/separator/hand.tsx +16 -0
  212. package/registry/examples/service-card/index-card.d.ts +4 -0
  213. package/registry/examples/service-card/index-card.js +15 -0
  214. package/registry/examples/service-card/index-card.tsx +12 -0
  215. package/registry/examples/service-card/index-list.d.ts +4 -0
  216. package/registry/examples/service-card/index-list.js +14 -0
  217. package/registry/examples/service-card/index-list.tsx +11 -0
  218. package/registry/examples/specimen-tag/facts.d.ts +4 -0
  219. package/registry/examples/specimen-tag/facts.js +23 -0
  220. package/registry/examples/specimen-tag/facts.tsx +18 -0
  221. package/registry/examples/stat/strip.d.ts +4 -0
  222. package/registry/examples/stat/strip.js +25 -0
  223. package/registry/examples/stat/strip.tsx +25 -0
  224. package/registry/examples/sticky-action/hide-while-visible.d.ts +4 -0
  225. package/registry/examples/sticky-action/hide-while-visible.js +16 -0
  226. package/registry/examples/sticky-action/hide-while-visible.tsx +17 -0
  227. package/registry/examples/usage/credits-page.d.ts +4 -0
  228. package/registry/examples/usage/credits-page.js +45 -0
  229. package/registry/examples/usage/credits-page.tsx +40 -0
  230. package/registry/examples/usage/empty.d.ts +4 -0
  231. package/registry/examples/usage/empty.js +15 -0
  232. package/registry/examples/usage/empty.tsx +12 -0
  233. package/registry/examples/wall/brick.js +1 -1
  234. package/registry/examples/wall/brick.tsx +1 -1
  235. package/registry/examples/wall/composition-fr.js +1 -1
  236. package/registry/examples/wall/composition-fr.tsx +1 -1
  237. package/registry/examples/wall/composition.js +1 -1
  238. package/registry/examples/wall/composition.tsx +1 -1
  239. package/registry/examples/wall/pinned-note.js +2 -2
  240. package/registry/examples/wall/pinned-note.tsx +3 -2
  241. package/registry/examples/wall/plaster.js +1 -1
  242. package/registry/examples/wall/plaster.tsx +1 -1
  243. package/registry/examples/wall/ridge.js +1 -1
  244. package/registry/examples/wall/ridge.tsx +1 -1
  245. package/registry/examples/wall/shop-sign.js +5 -4
  246. package/registry/examples/wall/shop-sign.tsx +7 -4
  247. package/registry/examples/wall/zellige.js +1 -1
  248. package/registry/examples/wall/zellige.tsx +1 -1
  249. package/registry/field.json +1 -1
  250. package/registry/file-upload.json +1 -1
  251. package/registry/filter-bar.json +1 -1
  252. package/registry/flock.json +1 -1
  253. package/registry/footnote.json +1 -1
  254. package/registry/force-update-screen.json +1 -1
  255. package/registry/form.json +1 -1
  256. package/registry/gallery-page.json +1 -1
  257. package/registry/genui.json +1 -1
  258. package/registry/glossary-term.json +1 -1
  259. package/registry/glossary.json +1 -1
  260. package/registry/glow-card.json +1 -1
  261. package/registry/goal-gauge.json +1 -1
  262. package/registry/grade-stamp.json +1 -1
  263. package/registry/how-it-works-page.json +1 -1
  264. package/registry/image-cropper.json +1 -1
  265. package/registry/index.json +184 -17
  266. package/registry/iso.json +1 -1
  267. package/registry/kanban.json +1 -1
  268. package/registry/kbd.json +1 -1
  269. package/registry/kind-config-editor.json +1 -1
  270. package/registry/kpi-explained.json +1 -1
  271. package/registry/landing-page.json +1 -1
  272. package/registry/landscape.json +1 -1
  273. package/registry/language-switch.json +1 -1
  274. package/registry/legal-page.json +1 -1
  275. package/registry/link-card.json +1 -1
  276. package/registry/list.json +1 -1
  277. package/registry/loader.json +1 -1
  278. package/registry/longform-page.json +1 -1
  279. package/registry/maintenance-screen.json +1 -1
  280. package/registry/map.json +2 -2
  281. package/registry/margin-layout.json +200 -0
  282. package/registry/markdown.json +1 -1
  283. package/registry/marketing-layout.json +1 -1
  284. package/registry/marquee.json +1 -1
  285. package/registry/mascot-quote.json +1 -1
  286. package/registry/mascot-state.json +1 -1
  287. package/registry/mascots.json +1 -1
  288. package/registry/match-dialog.json +1 -1
  289. package/registry/media-capture.json +1 -1
  290. package/registry/media-gallery.json +1 -1
  291. package/registry/media-grid.json +1 -1
  292. package/registry/meta-row.json +1 -1
  293. package/registry/meter.json +1 -1
  294. package/registry/nav-bar.json +2 -2
  295. package/registry/next-actions.json +1 -1
  296. package/registry/notification-preferences.json +1 -1
  297. package/registry/number-ticker.json +1 -1
  298. package/registry/opening-hours.json +1 -1
  299. package/registry/page-header.json +1 -1
  300. package/registry/page-hero.json +1 -1
  301. package/registry/page-index.json +1 -1
  302. package/registry/page.json +53 -11
  303. package/registry/pagination.json +1 -1
  304. package/registry/photo-grid.json +1 -1
  305. package/registry/pointer-light.json +1 -1
  306. package/registry/popover.json +1 -1
  307. package/registry/pricing-page.json +1 -1
  308. package/registry/product-page.json +1 -1
  309. package/registry/profile-card.json +1 -1
  310. package/registry/progress.json +1 -1
  311. package/registry/promise-card.json +1 -1
  312. package/registry/quota-meter.json +1 -1
  313. package/registry/radio-group.json +1 -1
  314. package/registry/rail-nav.json +2 -2
  315. package/registry/recipes.json +1 -1
  316. package/registry/retro-tv.json +45 -29
  317. package/registry/reviews.json +361 -0
  318. package/registry/router.json +1 -1
  319. package/registry/scroll-stage.json +1 -1
  320. package/registry/search-field.json +1 -1
  321. package/registry/section-backdrop.json +1 -1
  322. package/registry/separator.json +71 -6
  323. package/registry/service-card.json +55 -6
  324. package/registry/settings-layout.json +1 -1
  325. package/registry/showcase.json +1 -1
  326. package/registry/signature.json +1 -1
  327. package/registry/site-cahier.json +1 -1
  328. package/registry/site-footer.json +2 -2
  329. package/registry/sites.json +1 -1
  330. package/registry/skeleton.json +1 -1
  331. package/registry/skip-link.json +1 -1
  332. package/registry/slider.json +1 -1
  333. package/registry/slot-picker.json +1 -1
  334. package/registry/slot.json +1 -1
  335. package/registry/specimen-tag.json +57 -5
  336. package/registry/speed-lines.json +1 -1
  337. package/registry/spinner.json +1 -1
  338. package/registry/split-view.json +1 -1
  339. package/registry/stage-banner.json +1 -1
  340. package/registry/stat.json +61 -9
  341. package/registry/status-chip.json +1 -1
  342. package/registry/status-page.json +1 -1
  343. package/registry/step-progress.json +1 -1
  344. package/registry/step-showcase.json +1 -1
  345. package/registry/stepper.json +1 -1
  346. package/registry/sticky-action.json +27 -4
  347. package/registry/stuck.json +1 -1
  348. package/registry/swipe-deck.json +1 -1
  349. package/registry/switch.json +1 -1
  350. package/registry/tabs.json +1 -1
  351. package/registry/tag-input.json +1 -1
  352. package/registry/tag-selector.json +1 -1
  353. package/registry/taped-photo.json +1 -1
  354. package/registry/terminal-replay.json +1 -1
  355. package/registry/text-style.json +1 -1
  356. package/registry/theme.json +1 -1
  357. package/registry/toast.json +1 -1
  358. package/registry/toc.json +1 -1
  359. package/registry/tooltip.json +1 -1
  360. package/registry/tree-view.json +1 -1
  361. package/registry/update-prompt.json +1 -1
  362. package/registry/upload-queue.json +1 -1
  363. package/registry/usage.json +542 -0
  364. package/registry/verified-badge.json +1 -1
  365. package/registry/versus-card.json +1 -1
  366. package/registry/vertical-video.json +1 -1
  367. package/registry/video-player.json +1 -1
  368. package/registry/video-trimmer.json +3 -3
  369. package/registry/virtual.json +1 -1
  370. package/registry/wall.json +128 -40
  371. package/registry/waveform.json +1 -1
  372. package/dist/chunk-WOZP3JLW.js.map +0 -1
  373. package/dist/chunk-YKEIOYJ5.js.map +0 -1
  374. /package/dist/{chunk-5LANVCK7.js.map → chunk-BG5APGX6.js.map} +0 -0
  375. /package/dist/{chunk-6EAHUURY.js.map → chunk-GHAN7OOE.js.map} +0 -0
  376. /package/dist/{chunk-HEKDKM5Y.js.map → chunk-QVHSV6RA.js.map} +0 -0
  377. /package/dist/{chunk-7JG3VR4C.js.map → chunk-RCKXJEDQ.js.map} +0 -0
package/dist/blocks.css CHANGED
@@ -66,21 +66,30 @@
66
66
  .kz-polaroid-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--kz-surface-2); }
67
67
  .kz-polaroid-photo > :is(img, svg) { display: block; width: 100%; height: 100%; object-fit: cover; }
68
68
  .kz-polaroid .kz-taped-caption { text-align: center; font: 1.25rem/1.35 var(--kz-font-cahier); }
69
- .kz-polaroid[data-develop="waiting"] .kz-polaroid-photo { filter: contrast(.65) blur(.6px); opacity: .8; }
69
+ .kz-polaroid[data-develop="waiting"] .kz-polaroid-photo { filter: saturate(.35); opacity: .8; }
70
70
  .kz-polaroid[data-develop="ready"] .kz-polaroid-photo { animation: kz-wall-develop 1.6s ease-out both; }
71
- @keyframes kz-wall-develop { from { filter: contrast(.65) blur(.6px); opacity: .8; } to { filter: none; opacity: 1; } }
71
+ @keyframes kz-wall-develop { from { filter: saturate(.35); opacity: .8; } to { filter: none; opacity: 1; } }
72
72
  .kz-pinned-note { filter: drop-shadow(2px 3px 0 var(--kz-border-default)); }
73
73
  .kz-pinned-note-paper {
74
74
  padding: 1.75rem 1.25rem 1.25rem; background: var(--kz-surface-0); color: var(--kz-text-primary);
75
75
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 1rem, 100% 100%, 0 100%);
76
76
  border: 1px solid var(--kz-border-default);
77
77
  }
78
- .kz-pinned-note-text { margin: 0; font: 1rem/1.6 var(--kz-font-sans); white-space: pre-wrap; }
79
- .kz-pinned-note-signature { margin: 1rem 0 0; text-align: end; font: 1.2rem/1.3 var(--kz-font-cahier); }
78
+ /* The note's word is written in the pen (20 px at least) in a box of N lines, fixed: a late font moves nothing. The ink is one of three. */
79
+ .kz-pinned-note { --kz-note-ink: var(--kz-accent-text); color: var(--kz-note-ink); }
80
+ .kz-pinned-note[data-ink="margin"] { --kz-note-ink: var(--kz-paper-rule-margin); }
81
+ .kz-pinned-note[data-ink="hue"] { --kz-note-ink: var(--kz-hue-text, var(--kz-accent-text)); }
82
+ .kz-pinned-note-text { margin: 0; overflow: hidden; block-size: calc(var(--kz-note-lines) * 1.4em); font: 1.25rem/1.4 var(--kz-font-cahier); white-space: pre-wrap; color: var(--kz-note-ink); }
83
+ .kz-pinned-note-signature { margin: 1rem 0 0; text-align: end; font: 1.25rem/1.3 var(--kz-font-cahier); color: var(--kz-note-ink); }
80
84
  /* The sign is its own size container: its text scales to its width (cqi of the content box), so a long name fits whole — a word is never cut or hyphenated. */
81
85
  .kz-shop-sign { container-type: inline-size; padding: 1.75rem; text-align: center; overflow-wrap: normal; hyphens: manual; word-break: normal; }
82
86
  .kz-shop-sign-logo { font: min(1.75rem, 12cqi)/1.25 var(--kz-font-display); overflow-wrap: normal; }
83
87
  .kz-shop-sign-logo > :is(img, svg) { max-width: 100%; height: auto; }
88
+ .kz-shop-sign-name { margin: 0; font: min(1.75rem, 12cqi)/1.25 var(--kz-font-display); font-weight: 400; overflow-wrap: normal; }
89
+ .kz-shop-sign-logo + .kz-shop-sign-name { margin-block-start: .5rem; }
90
+ /* The name alone on paper (the page's head); on a wall, where text is never laid on a texture, it gets its own sheet. */
91
+ .kz-shop-sign[data-variant="none"] { color: var(--kz-text-primary); padding: 0; text-align: start; }
92
+ .kz-wall .kz-shop-sign[data-variant="none"] { background: var(--kz-surface-0); border: 1px solid var(--kz-border-default); padding: 1.25rem; text-align: center; }
84
93
  .kz-shop-sign[data-variant="enamel"] {
85
94
  background: var(--kz-surface-0); border: 3px double var(--kz-accent-text); border-radius: .35rem;
86
95
  color: var(--kz-accent-text); box-shadow: var(--kz-shadow-md);
@@ -98,11 +107,13 @@
98
107
  text-shadow: 0 0 .6rem var(--kz-accent-soft), 0 0 1.5rem var(--kz-accent-soft);
99
108
  }
100
109
  .kz-shop-sign[data-variant="neon"] .kz-shop-sign-logo > svg { filter: drop-shadow(0 0 .3rem var(--kz-accent)); }
101
- .kz-shop-sign[data-variant="neon"][data-animated] .kz-shop-sign-logo { animation: kz-wall-neon 2.4s ease-in-out 1; }
110
+ /* One soft flicker, the first time the sign is seen (data-lit="ready"): never a loop, never a flash. */
111
+ .kz-shop-sign[data-variant="neon"][data-animated][data-lit="ready"] :is(.kz-shop-sign-logo, .kz-shop-sign-name) { animation: kz-wall-neon 2.4s ease-in-out 1; }
102
112
  @keyframes kz-wall-neon { 0%, 45%, 100% { opacity: 1; } 25%, 65% { opacity: .88; } }
103
- .kz-shop-sign[data-variant="painted"] { color: var(--kz-text-secondary); border-block: 2px solid var(--kz-border-default); text-shadow: 1px 1px var(--kz-surface-0); }
113
+ .kz-shop-sign[data-variant="painted"] { background: var(--kz-surface-0); color: var(--kz-text-secondary); border-block: 2px solid var(--kz-border-default); text-shadow: 1px 1px var(--kz-surface-0); }
104
114
  @media (min-width: 48rem) {
105
- .kz-wall { display: block; height: var(--kz-wall-height); padding: 2rem; }
115
+ .kz-wall { display: block; aspect-ratio: 16 / 9; padding: 2rem; }
116
+ .kz-wall[data-fixed-height] { aspect-ratio: auto; height: var(--kz-wall-height); }
106
117
  .kz-wall-item {
107
118
  position: absolute; left: var(--kz-wall-x); top: var(--kz-wall-y);
108
119
  width: min(var(--kz-wall-item-width), 42%); max-height: 100%; margin: 0;
@@ -111,7 +122,7 @@
111
122
  }
112
123
  @media (prefers-reduced-motion: reduce) {
113
124
  .kz-polaroid .kz-polaroid-photo { animation: none; filter: none; opacity: 1; }
114
- .kz-shop-sign[data-variant="neon"][data-animated] .kz-shop-sign-logo { animation: none; }
125
+ .kz-shop-sign[data-variant="neon"][data-animated][data-lit] :is(.kz-shop-sign-logo, .kz-shop-sign-name) { animation: none; }
115
126
  }
116
127
 
117
128
  /* ─── Page: one frame for every page — the width, the gutters, the vertical rhythm ─── */
@@ -147,6 +158,30 @@
147
158
  linear-gradient(to bottom, var(--kz-paper-rule-minor) 1px, transparent 1px);
148
159
  background-size: 100% var(--kz-paper-module, 32px), 100% var(--kz-paper-line, 8px);
149
160
  }
161
+ /* Two more papers (krizaka-ui#600): a dot every 24 px, and kraft — brown paper whose ink holds ≥ 7:1 at the darkest grain
162
+ point (the grain is the host's one `PaperGrain` filter, capped by --kz-paper-grain-opacity, under the text). */
163
+ [data-paper="dot-grid"] {
164
+ background-image: radial-gradient(circle at 1px 1px, var(--kz-paper-dot) 1px, transparent 1.5px);
165
+ background-size: 24px 24px;
166
+ }
167
+ [data-paper="kraft"] {
168
+ position: relative;
169
+ isolation: isolate;
170
+ background-color: var(--kz-paper-kraft);
171
+ color: var(--kz-paper-kraft-ink);
172
+ --kz-text-primary: var(--kz-paper-kraft-ink);
173
+ --kz-text-secondary: var(--kz-paper-kraft-ink);
174
+ }
175
+ [data-paper="kraft"]::after {
176
+ content: "";
177
+ position: absolute;
178
+ inset: 0;
179
+ z-index: -1;
180
+ pointer-events: none;
181
+ background: var(--kz-paper-kraft-ink);
182
+ opacity: var(--kz-paper-grain-opacity, 0.08);
183
+ filter: url(#kz-paper-grain);
184
+ }
150
185
  [data-margin] { position: relative; --kz-margin-x: max(8px, calc(var(--kz-gutter, 16px) - 12px)); }
151
186
  [data-margin]::before {
152
187
  content: "";
@@ -1353,6 +1388,25 @@ a.kz-fact:focus-visible { outline: 2px solid var(--kz-ring, var(--kz-accent)); o
1353
1388
  outline-offset: 2px;
1354
1389
  transform: rotate(-3deg);
1355
1390
  }
1391
+ .kz-stamp[data-size="sm"] { padding: 2px 6px 1px; font-size: 11.5px; line-height: 14px; gap: 4px; }
1392
+ .kz-stamp[data-tone="ink"] { --kz-stamp-ink: var(--kz-text-primary); }
1393
+ .kz-stamp[data-tone="hue"] { --kz-stamp-ink: var(--kz-hue-text, var(--kz-accent-text)); }
1394
+ .kz-stamp[data-figure] { font-size: 15px; line-height: 20px; font-variant-numeric: var(--kz-figures, tabular-nums); }
1395
+ .kz-stamp-icon { display: inline-flex; margin-inline-end: 4px; }
1396
+ .kz-stamp-icon > svg { width: 1em; height: 1em; }
1397
+ /* A straight text in an askew frame: the frame is a pseudo-element, the text is not rotated. */
1398
+ .kz-stamp[data-straight] { position: relative; transform: none; border-color: transparent; outline: 0; }
1399
+ .kz-stamp[data-straight]::before {
1400
+ content: "";
1401
+ position: absolute;
1402
+ inset: -2px;
1403
+ border: 2px solid currentColor;
1404
+ border-radius: 2px;
1405
+ outline: 1px solid currentColor;
1406
+ outline-offset: 2px;
1407
+ transform: rotate(-3deg);
1408
+ pointer-events: none;
1409
+ }
1356
1410
  .kz-stamp[data-tone="ok"] { --kz-stamp-ink: var(--kz-success-text); }
1357
1411
  .kz-stamp[data-tone="wip"] { --kz-stamp-ink: var(--kz-text-secondary); }
1358
1412
  .kz-stamp[data-tone="construction"] { --kz-stamp-ink: var(--kz-paper-rule-margin); }
@@ -1787,3 +1841,40 @@ svg[data-bird="magpie"]{--kzb-pivot:58px 50px;--kzb-head-a:kzb-magpie-head 6s ea
1787
1841
  @keyframes kzb-beaver-flutter{0%,75%,85%,100%{transform:rotate(0)}77.5%{transform:rotate(calc(var(--kzb-s)*8deg))}80%{transform:rotate(calc(var(--kzb-s)*1.6deg))}82.5%{transform:rotate(calc(var(--kzb-s)*7.2deg))}}
1788
1842
  svg[data-bird="beaver"]{--kzb-pivot:60px 56px;--kzb-head-a:kzb-beaver-head 10s ease-in-out infinite;--kzb-head-d:-10s;--kzb-lid-a:kzb-beaver-lid 5.2s ease-in-out infinite;--kzb-lid-d:-5.2s;--kzb-wing-a:kzb-beaver-flutter 13s ease-out infinite;--kzb-wing-d:-13s}
1789
1843
  /* mascot-life:end */
1844
+
1845
+ /* ─── Embed facade (krizaka-ui#605): a platform's short video behind a button — nothing is requested before the click ─── */
1846
+ .kz-embed { position: relative; isolation: isolate; width: 100%; aspect-ratio: var(--kz-embed-ratio, 9 / 16); overflow: hidden; background: var(--kz-surface-2); color: var(--kz-text-primary); }
1847
+ .kz-embed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
1848
+ .kz-embed-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
1849
+ .kz-embed-gate { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 1rem; text-align: center; }
1850
+ .kz-embed-play {
1851
+ display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-block-size: 2.75rem; min-inline-size: 2.75rem; max-inline-size: 100%;
1852
+ padding: .5rem 1rem; border: 2px solid var(--kz-border-strong); border-radius: 2px; background: var(--kz-surface-0); color: var(--kz-text-primary);
1853
+ font: 600 .875rem/1.25 var(--kz-font-sans); box-shadow: 4px 5px 0 -2px var(--kz-border-default); cursor: pointer; text-align: start;
1854
+ }
1855
+ .kz-embed-play:hover { border-color: var(--kz-accent); }
1856
+ .kz-embed-play:focus-visible { outline: 2px solid var(--kz-ring); outline-offset: 3px; }
1857
+ .kz-embed-notice { margin: 0; max-inline-size: 28ch; padding: .25rem .5rem; background: var(--kz-surface-0); color: var(--kz-text-secondary); font: .75rem/1.4 var(--kz-font-sans); }
1858
+
1859
+ /* ─── Reviews (krizaka-ui#606): the score as a stamp, five meters, the clients' cards. Paper and ink; never a school grade ─── */
1860
+ .kz-reviews { display: grid; gap: .75rem; max-inline-size: 28rem; }
1861
+ .kz-reviews-visual { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin: 0; }
1862
+ .kz-reviews-count { font: .9375rem/1.4 var(--kz-font-sans); color: var(--kz-text-primary); }
1863
+ .kz-reviews-bars { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
1864
+ .kz-reviews-bars > li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2rem; align-items: center; gap: .5rem; }
1865
+ .kz-reviews-rank, .kz-reviews-n { font: .8125rem/1 var(--kz-font-mono); font-variant-numeric: var(--kz-figures, tabular-nums); color: var(--kz-text-secondary); }
1866
+ .kz-reviews-n { text-align: end; }
1867
+ .kz-review { display: grid; gap: .5rem; box-sizing: border-box; padding: 1rem 1.25rem; background: var(--kz-surface-0); color: var(--kz-text-primary); border: 1px solid var(--kz-border-default); box-shadow: 4px 5px 0 -2px var(--kz-border-default); min-inline-size: 0; overflow-wrap: anywhere; }
1868
+ .kz-review-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .125rem .75rem; align-items: baseline; }
1869
+ .kz-review-author { margin: 0; font: 600 1rem/1.4 var(--kz-font-sans); }
1870
+ .kz-review-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: .125rem .5rem; margin: 0; font: .8125rem/1.4 var(--kz-font-mono); color: var(--kz-text-secondary); }
1871
+ .kz-review-meta > :not(:first-child)::before { content: "· "; }
1872
+ .kz-review-rating { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: start; color: var(--kz-accent-text); }
1873
+ .kz-review-stars { display: inline-flex; gap: 1px; }
1874
+ .kz-review-stars svg { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: miter; }
1875
+ .kz-review-stars svg[data-filled] { fill: currentColor; }
1876
+ .kz-review-text { margin: 0; font: 1rem/1.6 var(--kz-font-sans); white-space: pre-wrap; }
1877
+ /* The owner's reply: indented under the review, in the pen's ink but in the text face (a reply is content, not decoration). */
1878
+ .kz-review-reply { margin-inline-start: 1rem; padding-inline-start: .75rem; border-inline-start: 2px solid var(--kz-paper-rule-margin); display: grid; gap: .25rem; }
1879
+ .kz-review-reply-label { margin: 0; font: .8125rem/1.4 var(--kz-font-mono); color: var(--kz-text-secondary); }
1880
+ .kz-review-reply-text { margin: 0; font: .9375rem/1.55 var(--kz-font-sans); color: var(--kz-accent-text); white-space: pre-wrap; }
package/dist/button.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Button,
4
4
  IconButton,
5
5
  buttonVariants
6
- } from "./chunk-UV4HBVH7.js";
6
+ } from "./chunk-EB45EVPJ.js";
7
7
  import "./chunk-43PTCDTL.js";
8
8
  import "./chunk-2VNYHG4E.js";
9
9
  import "./chunk-W675RFOA.js";
package/dist/captcha.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import "./chunk-JXLDUDTD.js";
3
3
  import {
4
4
  Button
5
- } from "./chunk-SJS6RJIT.js";
5
+ } from "./chunk-V7W4RLRW.js";
6
6
  import "./chunk-D3T54RSL.js";
7
7
  import "./chunk-WEVYKZIF.js";
8
8
  import "./chunk-NSLXEDIS.js";
@@ -0,0 +1,41 @@
1
+ import {
2
+ defineRecipe
3
+ } from "./chunk-2VNYHG4E.js";
4
+
5
+ // src/badge/badge.tsx
6
+ import { tv } from "tailwind-variants";
7
+
8
+ // src/badge/recipe.ts
9
+ var badgeRecipe = defineRecipe({
10
+ base: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm font-semibold ",
11
+ variants: {
12
+ tone: {
13
+ neutral: "bg-surface-3 text-fg-secondary",
14
+ accent: "bg-accent-soft text-fg ring-1 ring-inset ring-accent/40 [&>[data-dot]]:bg-accent",
15
+ success: "bg-success/15 text-fg ring-1 ring-inset ring-success/40 [&>[data-dot]]:bg-success",
16
+ warning: "bg-warning/15 text-fg ring-1 ring-inset ring-warning/40 [&>[data-dot]]:bg-warning",
17
+ danger: "bg-danger/15 text-fg ring-1 ring-inset ring-danger/40 [&>[data-dot]]:bg-danger",
18
+ /** On a media: veil and text invariant, identical in both themes. */
19
+ scrim: "bg-scrim text-fg-on-media backdrop-blur-md"
20
+ },
21
+ size: { sm: "px-2 py-0.5 text-[10px]", md: "px-2.5 py-1 text-[11px]" },
22
+ pulse: { true: "[&>[data-dot]]:motion-safe:animate-pulse" }
23
+ },
24
+ defaultVariants: { tone: "neutral", size: "sm" }
25
+ });
26
+
27
+ // src/badge/badge.tsx
28
+ import { jsx, jsxs } from "react/jsx-runtime";
29
+ var badgeVariants = tv(badgeRecipe);
30
+ function Badge({ tone, size, pulse, dot, className, children, ...props }) {
31
+ return /* @__PURE__ */ jsxs("span", { "data-tone": tone ?? "neutral", className: badgeVariants({ tone, size, pulse, className }), ...props, children: [
32
+ dot && /* @__PURE__ */ jsx("span", { "data-dot": "", "aria-hidden": true, className: "h-1.5 w-1.5 rounded-full bg-current" }),
33
+ children
34
+ ] });
35
+ }
36
+
37
+ export {
38
+ badgeVariants,
39
+ Badge
40
+ };
41
+ //# sourceMappingURL=chunk-5PFCELGW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/badge/badge.tsx","../src/badge/recipe.ts"],"sourcesContent":["// Server-safe: no hook, no context.\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { badgeRecipe } from \"./recipe\";\n\n// Status tones are soft (a tint, a coloured dot, a text role): the invariant status tokens are too light to carry\n// small text on a light surface, or to sit under white text (WCAG AA).\nexport const badgeVariants = tv(badgeRecipe);\n\nexport type BadgeVariants = VariantProps<typeof badgeVariants>;\n\nexport type BadgeProps = React.ComponentProps<\"span\"> &\n BadgeVariants & {\n /**\n * neutral · accent · success · warning · danger (soft tints, the text stays a text role) · scrim (on a media).\n * @default \"neutral\"\n */\n tone?: BadgeVariants[\"tone\"];\n /**\n * sm · md.\n * @default \"sm\"\n */\n size?: BadgeVariants[\"size\"];\n /** Makes the `dot` pulse (stopped under reduced motion). */\n pulse?: BadgeVariants[\"pulse\"];\n /** A small dot before the text, in the tone's colour (pulsing with `pulse`). */\n dot?: boolean;\n };\n\nexport function Badge({ tone, size, pulse, dot, className, children, ...props }: BadgeProps) {\n return (\n <span data-tone={tone ?? \"neutral\"} className={badgeVariants({ tone, size, pulse, className })} {...props}>\n {dot && <span data-dot=\"\" aria-hidden className=\"h-1.5 w-1.5 rounded-full bg-current\" />}\n {children}\n </span>\n );\n}\n","// The badge's tones and sizes, written once as classes of the Krizaka tokens: the web wears them with `tv(badgeRecipe)`,\n// React Native reads the same classes into styles (native/badge.tsx). Status tones are soft (a tint, a coloured dot, a\n// text role): the invariant status tokens are too light to carry small text on a light surface, or to sit under white\n// text (WCAG AA).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const badgeRecipe = defineRecipe({\n base: \"inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm font-semibold \",\n variants: {\n tone: {\n neutral: \"bg-surface-3 text-fg-secondary\",\n accent: \"bg-accent-soft text-fg ring-1 ring-inset ring-accent/40 [&>[data-dot]]:bg-accent\",\n success: \"bg-success/15 text-fg ring-1 ring-inset ring-success/40 [&>[data-dot]]:bg-success\",\n warning: \"bg-warning/15 text-fg ring-1 ring-inset ring-warning/40 [&>[data-dot]]:bg-warning\",\n danger: \"bg-danger/15 text-fg ring-1 ring-inset ring-danger/40 [&>[data-dot]]:bg-danger\",\n /** On a media: veil and text invariant, identical in both themes. */\n scrim: \"bg-scrim text-fg-on-media backdrop-blur-md\",\n },\n size: { sm: \"px-2 py-0.5 text-[10px]\", md: \"px-2.5 py-1 text-[11px]\" },\n pulse: { true: \"[&>[data-dot]]:motion-safe:animate-pulse\" },\n },\n defaultVariants: { tone: \"neutral\", size: \"sm\" },\n});\n"],"mappings":";;;;;AAEA,SAAS,UAA6B;;;ACI/B,IAAM,cAAc,aAAa;AAAA,EACtC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA;AAAA,MAER,OAAO;AAAA,IACT;AAAA,IACA,MAAM,EAAE,IAAI,2BAA2B,IAAI,0BAA0B;AAAA,IACrE,OAAO,EAAE,MAAM,2CAA2C;AAAA,EAC5D;AAAA,EACA,iBAAiB,EAAE,MAAM,WAAW,MAAM,KAAK;AACjD,CAAC;;;ADUG,SACU,KADV;AAxBG,IAAM,gBAAgB,GAAG,WAAW;AAsBpC,SAAS,MAAM,EAAE,MAAM,MAAM,OAAO,KAAK,WAAW,UAAU,GAAG,MAAM,GAAe;AAC3F,SACE,qBAAC,UAAK,aAAW,QAAQ,WAAW,WAAW,cAAc,EAAE,MAAM,MAAM,OAAO,UAAU,CAAC,GAAI,GAAG,OACjG;AAAA,WAAO,oBAAC,UAAK,YAAS,IAAG,eAAW,MAAC,WAAU,uCAAsC;AAAA,IACrF;AAAA,KACH;AAEJ;","names":[]}
@@ -0,0 +1,37 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-W675RFOA.js";
4
+
5
+ // src/specimen-tag/specimen-tag.tsx
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function Stamp({ tone = "neutral", icon, size = "md", straightText = size === "sm", className, children, ...props }) {
8
+ return /* @__PURE__ */ jsxs("span", { className: cn("kz-stamp", className), "data-tone": tone, "data-size": size, "data-straight": straightText ? "" : void 0, ...props, children: [
9
+ icon && /* @__PURE__ */ jsx("span", { className: "kz-stamp-icon", "aria-hidden": "true", children: icon }),
10
+ children
11
+ ] });
12
+ }
13
+ function SpecimenTag({ code, title, titleAs: Title = "h3", mark, status, fields, children, footer, mount = "pin", className, ...props }) {
14
+ return /* @__PURE__ */ jsxs("article", { className: cn("kz-tag", className), "data-mount": mount, ...props, children: [
15
+ /* @__PURE__ */ jsx("span", { className: "kz-tag-eyelet", "aria-hidden": true }),
16
+ (code || status) && /* @__PURE__ */ jsxs("div", { className: "kz-tag-head", children: [
17
+ code && /* @__PURE__ */ jsx("span", { className: "kz-tag-code", children: code }),
18
+ status && /* @__PURE__ */ jsx(Stamp, { tone: status.tone, children: status.label })
19
+ ] }),
20
+ title && /* @__PURE__ */ jsxs(Title, { className: "kz-tag-title", children: [
21
+ /* @__PURE__ */ jsx("span", { children: title }),
22
+ mark && /* @__PURE__ */ jsx("span", { className: "kz-tag-mark", "aria-hidden": true, children: mark })
23
+ ] }),
24
+ children && /* @__PURE__ */ jsx("div", { className: "kz-tag-body", children }),
25
+ fields && fields.length > 0 && /* @__PURE__ */ jsx("dl", { className: "kz-tag-fields", children: fields.map((f, i) => /* @__PURE__ */ jsxs("div", { children: [
26
+ /* @__PURE__ */ jsx("dt", { children: f.label }),
27
+ /* @__PURE__ */ jsx("dd", { children: f.value })
28
+ ] }, i)) }),
29
+ footer && /* @__PURE__ */ jsx("div", { className: "kz-tag-foot", children: footer })
30
+ ] });
31
+ }
32
+
33
+ export {
34
+ Stamp,
35
+ SpecimenTag
36
+ };
37
+ //# sourceMappingURL=chunk-5RWHDX5J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/specimen-tag/specimen-tag.tsx"],"sourcesContent":["// Server-safe. The specimen tag of the Cahier (ADR-004, blocks.css): a manila tag with an eyelet, a typed catalogue\n// number, a name, a stamp for the status and the fields of a record — the way a naturalist labels what was observed.\n// It carries a product's or a component's status and meta; the stamp says the truth (`ok`, `wip`, `construction`).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type StampTone = \"ok\" | \"wip\" | \"construction\" | \"neutral\" | \"ink\" | \"hue\";\n\nexport type StampProps = React.HTMLAttributes<HTMLSpanElement> & {\n /**\n * `ok` — released or usable today (green ink); `wip` — in development (pencil); `construction` — not open yet (the\n * margin's red); `neutral` — a fact; `ink` — the page's ink (a price, a duration); `hue` — the page's hue text\n * (`--kz-hue-text`: a vibe, an area).\n * @default \"neutral\"\n */\n tone?: StampTone;\n /** A glyph before the text (a `@krizaka/icons` icon): decorative, hidden from assistive technology. */\n icon?: React.ReactNode;\n /**\n * `sm` — a stamp among facts; `md` — a status on its own.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The border keeps its tilt and the text is straight: a price or a time is read, not admired. Defaults to `true` for `size=\"sm\"`.\n */\n straightText?: boolean;\n};\n\n/** A rubber stamp: a short status pressed on a tag or a page, double-ruled, slightly askew. */\nexport function Stamp({ tone = \"neutral\", icon, size = \"md\", straightText = size === \"sm\", className, children, ...props }: StampProps) {\n return (\n <span className={cn(\"kz-stamp\", className)} data-tone={tone} data-size={size} data-straight={straightText ? \"\" : undefined} {...props}>\n {icon && <span className=\"kz-stamp-icon\" aria-hidden=\"true\">{icon}</span>}\n {children}\n </span>\n );\n}\n\nexport interface SpecimenField {\n /** The field's name, typed in lower case: `seen on`, `since`. */\n label: React.ReactNode;\n /** Its value: `web · iOS · Android`, `3.34.0`. */\n value: React.ReactNode;\n}\n\nexport type SpecimenTagProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The catalogue number, typed at the top: `KZ-02`, `No. 042`. */\n code?: React.ReactNode;\n /** What the tag labels: a product's name, a component's. Set in the display face. */\n title?: React.ReactNode;\n /** The element of the title (`h3` in a grid of tags under a section's `h2`). @default \"h3\" */\n titleAs?: \"h2\" | \"h3\" | \"h4\" | \"p\" | \"span\";\n /** Beside the title: a product's mark, a bird (decorative). */\n mark?: React.ReactNode;\n /** The status, stamped: `{ label: \"In development\", tone: \"wip\" }`. */\n status?: { label: React.ReactNode; tone?: StampTone };\n /** The record: a label and a value per line, typed. */\n fields?: readonly SpecimenField[];\n /** What the tag says beyond its fields: one or two sentences. */\n children?: React.ReactNode;\n /** The foot of the tag: links (the site, the source), a note. */\n footer?: React.ReactNode;\n /**\n * `hang` — the tag hangs from a string (a row of tags on one wire); `pin` — pinned flat, no string.\n * @default \"pin\"\n */\n mount?: \"hang\" | \"pin\";\n};\n\n/**\n * A specimen tag: the eyelet, a typed number, a name, a stamp, the record's fields, a sentence and a foot — the status\n * and meta of a product or a component, labelled the way a field guide labels what it saw.\n */\nexport function SpecimenTag({ code, title, titleAs: Title = \"h3\", mark, status, fields, children, footer, mount = \"pin\", className, ...props }: SpecimenTagProps) {\n return (\n <article className={cn(\"kz-tag\", className)} data-mount={mount} {...props}>\n <span className=\"kz-tag-eyelet\" aria-hidden />\n {(code || status) && (\n <div className=\"kz-tag-head\">\n {code && <span className=\"kz-tag-code\">{code}</span>}\n {status && <Stamp tone={status.tone}>{status.label}</Stamp>}\n </div>\n )}\n {title && (\n <Title className=\"kz-tag-title\">\n <span>{title}</span>\n {mark && <span className=\"kz-tag-mark\" aria-hidden>{mark}</span>}\n </Title>\n )}\n {children && <div className=\"kz-tag-body\">{children}</div>}\n {fields && fields.length > 0 && (\n <dl className=\"kz-tag-fields\">\n {fields.map((f, i) => (\n <div key={i}>\n <dt>{f.label}</dt>\n <dd>{f.value}</dd>\n </div>\n ))}\n </dl>\n )}\n {footer && <div className=\"kz-tag-foot\">{footer}</div>}\n </article>\n );\n}\n"],"mappings":";;;;;AAiCI,SACW,KADX;AAFG,SAAS,MAAM,EAAE,OAAO,WAAW,MAAM,OAAO,MAAM,eAAe,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAAe;AACtI,SACE,qBAAC,UAAK,WAAW,GAAG,YAAY,SAAS,GAAG,aAAW,MAAM,aAAW,MAAM,iBAAe,eAAe,KAAK,QAAY,GAAG,OAC7H;AAAA,YAAQ,oBAAC,UAAK,WAAU,iBAAgB,eAAY,QAAQ,gBAAK;AAAA,IACjE;AAAA,KACH;AAEJ;AAqCO,SAAS,YAAY,EAAE,MAAM,OAAO,SAAS,QAAQ,MAAM,MAAM,QAAQ,QAAQ,UAAU,QAAQ,QAAQ,OAAO,WAAW,GAAG,MAAM,GAAqB;AAChK,SACE,qBAAC,aAAQ,WAAW,GAAG,UAAU,SAAS,GAAG,cAAY,OAAQ,GAAG,OAClE;AAAA,wBAAC,UAAK,WAAU,iBAAgB,eAAW,MAAC;AAAA,KAC1C,QAAQ,WACR,qBAAC,SAAI,WAAU,eACZ;AAAA,cAAQ,oBAAC,UAAK,WAAU,eAAe,gBAAK;AAAA,MAC5C,UAAU,oBAAC,SAAM,MAAM,OAAO,MAAO,iBAAO,OAAM;AAAA,OACrD;AAAA,IAED,SACC,qBAAC,SAAM,WAAU,gBACf;AAAA,0BAAC,UAAM,iBAAM;AAAA,MACZ,QAAQ,oBAAC,UAAK,WAAU,eAAc,eAAW,MAAE,gBAAK;AAAA,OAC3D;AAAA,IAED,YAAY,oBAAC,SAAI,WAAU,eAAe,UAAS;AAAA,IACnD,UAAU,OAAO,SAAS,KACzB,oBAAC,QAAG,WAAU,iBACX,iBAAO,IAAI,CAAC,GAAG,MACd,qBAAC,SACC;AAAA,0BAAC,QAAI,YAAE,OAAM;AAAA,MACb,oBAAC,QAAI,YAAE,OAAM;AAAA,SAFL,CAGV,CACD,GACH;AAAA,IAED,UAAU,oBAAC,SAAI,WAAU,eAAe,kBAAO;AAAA,KAClD;AAEJ;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3X3OF4TI.js";
5
5
  import {
6
6
  Button
7
- } from "./chunk-3DHNN5V7.js";
7
+ } from "./chunk-M3GEYLMR.js";
8
8
  import {
9
9
  useLayoutFallbacks,
10
10
  useVirtualizer
@@ -1353,4 +1353,4 @@ export {
1353
1353
  DataTableColumnsMenu,
1354
1354
  DataTableExport
1355
1355
  };
1356
- //# sourceMappingURL=chunk-5LANVCK7.js.map
1356
+ //# sourceMappingURL=chunk-BG5APGX6.js.map
@@ -48,4 +48,4 @@ export {
48
48
  SectionBackdrop,
49
49
  Page
50
50
  };
51
- //# sourceMappingURL=chunk-WOZP3JLW.js.map
51
+ //# sourceMappingURL=chunk-DJ5ZPPWL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/page/page.tsx","../src/section-backdrop/section-backdrop.tsx"],"sourcesContent":["// Server-safe. The frame of every page (blocks.css): one width, one pair of gutters, one vertical rhythm — so the\n// navigation, the hero and every section line up on the same edges, at any width.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { SectionBackdrop, type SectionBackdropProps } from \"../section-backdrop/section-backdrop\";\n\nexport type PageSize = \"narrow\" | \"default\" | \"wide\" | \"full\";\n\n/**\n * The paper under a page or a section (Cahier, ADR-004): `ruled` (Seyès squares), `lines` (lines only), `dot-grid` (a dot\n * every 24 px), `kraft` (brown paper with a grain: mount `PaperGrain` once), or plain.\n */\nexport type PagePaper = \"ruled\" | \"lines\" | \"dot-grid\" | \"kraft\";\n\ntype PaperProps = {\n /** The notebook's paper under the content: `ruled` (Seyès: 32 px squares, three fine lines), `lines` (lines only, a page to read), `dot-grid` (dots), `kraft` (brown, grained). */\n paper?: PagePaper;\n /** The red margin line on the left, where section numbers and notes hang (`§ 2`, `fig. 1`). */\n margin?: boolean;\n};\n\nexport type PageProps = React.HTMLAttributes<HTMLElement> & {\n /**\n * The width of the content: `default` (72rem, `--kz-page-max`), `narrow` (48rem, a reading column), `wide`\n * (88rem, documentation with a sidebar), `full` (the gutters only).\n * @default \"default\"\n */\n size?: PageSize;\n /** The element: `div` (default), `main`, `header`, `footer`, `section` or `article`. */\n as?: \"div\" | \"main\" | \"header\" | \"footer\" | \"section\" | \"article\";\n} & PaperProps;\n\n/** The page frame: centred, at most `--kz-page-max` wide, with the gutters of `--kz-page-gutter` (16 → 32 px). */\nexport function Page({ size = \"default\", as: Tag = \"div\", paper, margin, className, ...props }: PageProps) {\n return (\n <Tag\n data-size={size === \"default\" ? undefined : size}\n data-paper={paper}\n data-margin={margin ? \"\" : undefined}\n className={cn(\"kz-frame\", className)}\n {...props}\n />\n );\n}\n\nexport type SectionHeadingProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The id of the title: the section's anchor and its accessible name. */\n id?: string;\n /** A short note above the title (the section's subject), in the note face, lower case — never an uppercase overline. */\n eyebrow?: React.ReactNode;\n /** The section's number, hung in the margin as a notebook numbers its pages (`§ 2`). */\n number?: React.ReactNode;\n /** The title. */\n title: React.ReactNode;\n /** One or two sentences under the title. */\n lead?: React.ReactNode;\n /** Actions on the right of the heading (a link to everything, a filter). */\n actions?: React.ReactNode;\n /**\n * The level of the title.\n * @default 2\n */\n level?: 2 | 3;\n /**\n * `md` for a section that argues, `sm` for a section of a reading page.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * `center` for a heading that stands alone above a grid.\n * @default \"start\"\n */\n align?: \"start\" | \"center\";\n /** Rises into place once, as it enters the viewport (`[data-reveal]`, MotionObserver). Never on the first screen. */\n reveal?: boolean;\n};\n\n/** The head of a section: eyebrow (mono, the accent), title, lead — and its actions on the right. */\nexport function SectionHeading({ id, eyebrow, number, title, lead, actions, level = 2, size = \"md\", align = \"start\", reveal, className, ...props }: SectionHeadingProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n return (\n <div\n className={cn(\"kz-heading\", className)}\n data-size={size === \"md\" ? undefined : size}\n data-align={align === \"start\" ? undefined : align}\n data-actions={actions ? \"\" : undefined}\n data-reveal={reveal ? \"\" : undefined}\n {...props}\n >\n {number && <span className=\"kz-heading-number\">{number}</span>}\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <H id={id} className=\"kz-heading-title\">\n {title}\n </H>\n {lead && <p className=\"kz-heading-lead\">{lead}</p>}\n {actions && <div className=\"kz-heading-actions\">{actions}</div>}\n </div>\n );\n}\n\nexport type SectionProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The id of the title (and the anchor of the section). Required with a `title`. */\n id?: string;\n /** The heading's eyebrow. */\n eyebrow?: React.ReactNode;\n /** The section's number in the margin (`§ 2`). */\n number?: React.ReactNode;\n /** The section's title: an `h2` (a `SectionHeading`), which names the section for assistive technology. */\n title?: React.ReactNode;\n /** The heading's lead. */\n lead?: React.ReactNode;\n /** The heading's actions. */\n actions?: React.ReactNode;\n /**\n * The heading's size: `md` for a page that argues, `sm` for a reading page.\n * @default \"md\"\n */\n headingSize?: \"sm\" | \"md\";\n /**\n * The heading's alignment.\n * @default \"start\"\n */\n headingAlign?: \"start\" | \"center\";\n /** The heading rises into place once (never on the first screen). */\n reveal?: boolean;\n /** A hairline above the section, inside the gutters: the transition between two sections of the same surface. */\n divider?: boolean;\n /**\n * The vertical space above and below: `sm` (a reading page), `md`, `lg` (a page's main moments).\n * @default \"md\"\n */\n spacing?: \"sm\" | \"md\" | \"lg\";\n /**\n * The width of the content.\n * @default \"default\"\n */\n size?: PageSize;\n /** The brand's colour transition behind the section (SectionBackdrop): `true`, or its props (`direction`, `grid`…). */\n backdrop?: boolean | Omit<SectionBackdropProps, \"as\" | \"children\">;\n} & PaperProps;\n\n/**\n * A section of a page: full-bleed (its backdrop reaches the edges), its content in the page frame, its heading on top.\n * Sections follow each other on one rhythm; a `divider` or a `backdrop` marks the transition.\n */\nexport function Section({\n id,\n eyebrow,\n number,\n title,\n lead,\n actions,\n headingSize,\n headingAlign,\n reveal,\n divider,\n spacing = \"md\",\n size,\n backdrop,\n paper,\n margin,\n className,\n children,\n ...props\n}: SectionProps) {\n const body = (\n <Page size={size} data-margin={margin ? \"\" : undefined}>\n {title && <SectionHeading id={id} eyebrow={eyebrow} number={number} title={title} lead={lead} actions={actions} size={headingSize} align={headingAlign} reveal={reveal} />}\n {children}\n </Page>\n );\n const shared = {\n \"aria-labelledby\": title && id ? id : undefined,\n \"data-divider\": divider ? \"\" : undefined,\n \"data-spacing\": spacing === \"md\" ? undefined : spacing,\n \"data-paper\": paper,\n ...props,\n };\n if (backdrop) {\n const backdropProps = backdrop === true ? {} : backdrop;\n return (\n <SectionBackdrop {...backdropProps} {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </SectionBackdrop>\n );\n }\n return (\n <section {...shared} className={cn(\"kz-section\", className)}>\n {body}\n </section>\n );\n}\n\nexport type TicksProps = {\n /** A sentence where words between backticks are code: \"Every request carries a `requestId`.\" */\n children: string;\n};\n\n/** A sentence of a message catalogue where words between backticks read as code — no markup in the translations. */\nexport function Ticks({ children }: TicksProps) {\n const parts = children.split(\"`\");\n return (\n <>\n {parts.map((part, i) =>\n i % 2 ? (\n <code key={i} className=\"kz-ic\">\n {part}\n </code>\n ) : (\n <React.Fragment key={i}>{part}</React.Fragment>\n ),\n )}\n </>\n );\n}\n\nexport interface Fact {\n /** A few words: `npm 2.5.0`, `Maven Central`, `in progress`. */\n label: string;\n /**\n * `ok` — published, usable today; `wip` — in progress, said honestly; `neutral` — a fact.\n * @default \"neutral\"\n */\n tone?: \"ok\" | \"wip\" | \"neutral\";\n /** Where the fact is proven (a registry page): the fact becomes a link. */\n href?: string;\n}\n\nexport type FactsProps = React.HTMLAttributes<HTMLUListElement> & {\n /** The facts, in reading order. */\n items: readonly Fact[];\n};\n\n/** Compact facts on one line — a dot that says the state, a few mono words. Links open in a new tab. */\nexport function Facts({ items, className, ...props }: FactsProps) {\n return (\n <ul className={cn(\"kz-facts\", className)} {...props}>\n {items.map((fact) => {\n const body = (\n <>\n <span className=\"kz-fact-dot\" aria-hidden /> {fact.label}\n </>\n );\n const tone = fact.tone && fact.tone !== \"neutral\" ? fact.tone : undefined;\n return (\n <li key={fact.label}>\n {fact.href ? (\n <a href={fact.href} target=\"_blank\" rel=\"noopener noreferrer\" className=\"kz-fact\" data-tone={tone}>\n {body}\n </a>\n ) : (\n <span className=\"kz-fact\" data-tone={tone}>\n {body}\n </span>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","// Server-safe. The backdrop of a page section in the brand's visual language (packages/tokens/BRAND.md).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const sectionBackdropVariants = tv({\n slots: {\n root: \"kz-backdrop\",\n drift: \"kz-backdrop-drift\",\n dome: \"kz-backdrop-dome\",\n grid: \"kz-backdrop-grid\",\n media: \"kz-backdrop-media\",\n },\n});\n\nexport interface SectionBackdropProps extends React.HTMLAttributes<HTMLElement> {\n /** The element: `section` (default), `header`, `footer` or `div`. */\n as?: \"section\" | \"header\" | \"footer\" | \"div\";\n /** Where the brand tint sits: `down` (default) starts tinted and ends on the page surface; `up` ends tinted (a closing call to action). */\n direction?: \"down\" | \"up\";\n /** The light dome above the content (the halo of a hero). Default true. */\n dome?: boolean;\n /** A floor of perspective lines under the content. Default false. */\n grid?: boolean;\n /** A foreground illustration or image, blurred for depth of field, behind the content (decorative: hidden from assistive technology). */\n media?: React.ReactNode;\n /** The very slow drift of the light (40 s); always still under prefers-reduced-motion. Default true. */\n animated?: boolean;\n}\n\n/**\n * A section of a page in the Krizaka visual language: the brand's section gradient (`--kz-brand-gradient-*`, so it\n * follows the brand theme and dark/light), a light dome, an optional perspective grid and a blurred foreground. Every\n * section ends on the page surface, so consecutive sections glide from one tint to the next. Text on it reads at AA\n * (tested in @krizaka/tokens).\n */\nexport function SectionBackdrop({ as: Tag = \"section\", direction = \"down\", dome = true, grid = false, media, animated = true, className, children, ...props }: SectionBackdropProps) {\n const s = sectionBackdropVariants();\n return (\n <Tag className={s.root({ className })} data-direction={direction} {...props}>\n {animated ? <div data-backdrop-layer aria-hidden className={s.drift()} /> : null}\n {dome ? <div data-backdrop-layer aria-hidden className={s.dome()} /> : null}\n {grid ? <div data-backdrop-layer aria-hidden className={s.grid()} /> : null}\n {media ? (\n <div data-backdrop-layer aria-hidden className={s.media()}>\n {media}\n </div>\n ) : null}\n {children}\n </Tag>\n );\n}\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;;;ACAvB,SAAS,UAAU;AAoCf,SACc,KADd;AAlCG,IAAM,0BAA0B,GAAG;AAAA,EACxC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAuBM,SAAS,gBAAgB,EAAE,IAAI,MAAM,WAAW,YAAY,QAAQ,OAAO,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,WAAW,UAAU,GAAG,MAAM,GAAyB;AACnL,QAAM,IAAI,wBAAwB;AAClC,SACE,qBAAC,OAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,kBAAgB,WAAY,GAAG,OACnE;AAAA,eAAW,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,MAAM,GAAG,IAAK;AAAA,IAC3E,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,IACtE,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,IACtE,QACC,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,MAAM,GACrD,iBACH,IACE;AAAA,IACH;AAAA,KACH;AAEJ;;;ADdI,SAuKA,YAAAA,WAvKA,OAAAC,MA8CA,QAAAC,aA9CA;AAFG,SAAS,KAAK,EAAE,OAAO,WAAW,IAAI,MAAM,OAAO,OAAO,QAAQ,WAAW,GAAG,MAAM,GAAc;AACzG,SACE,gBAAAD;AAAA,IAAC;AAAA;AAAA,MACC,aAAW,SAAS,YAAY,SAAY;AAAA,MAC5C,cAAY;AAAA,MACZ,eAAa,SAAS,KAAK;AAAA,MAC3B,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["Fragment","jsx","jsxs"]}
@@ -14,7 +14,7 @@ import { tv } from "tailwind-variants";
14
14
 
15
15
  // src/button/recipe.ts
16
16
  var buttonRecipe = defineRecipe({
17
- base: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
17
+ base: "inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
18
18
  variants: {
19
19
  variant: {
20
20
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
@@ -116,4 +116,4 @@ export {
116
116
  Button,
117
117
  IconButton
118
118
  };
119
- //# sourceMappingURL=chunk-UV4HBVH7.js.map
119
+ //# sourceMappingURL=chunk-EB45EVPJ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/button.tsx","../src/button/recipe.ts"],"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\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `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` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\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 /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\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. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition duration-150 \" +\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 // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\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 border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\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 // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n def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oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OACtD,iBAAO,OAAO,UACjB;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/button/button.tsx","../src/button/recipe.ts"],"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\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `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` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\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 /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\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. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 \" +\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 // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\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 border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\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 // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n"],"mappings":";;;;;;;;;;;AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;;;ACC/B,IAAM,eAAe,aAAa;AAAA,EACvC,MACE;AAAA,EAKF,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA;AAAA,MAET,UAAU;AAAA,MACV,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;AAAA;AAAA,IAGpG,OAAO,EAAE,SAAS,cAAc,MAAM,gBAAgB,KAAK,aAAa;AAAA,EAC1E;AAAA,EACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,MAAM,O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G;AAAA,iBACC,oBAAC,UAAK,eAAW,MAAC,WAAU,yFAAwF,OAAO,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG;AAAA,QAE1J,SACC;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,YACX,aAAU;AAAA,YACV,WAAU;AAAA,YAEV,8BAAC,UAAK,WAAU,mBACd,8BAAC,eAAY,OAAO,OAAO,OAAO,QAAQ,QAAQ,MAAM,WAAW,GAAG,WAAW,UAAU,aAAa,CAAC,UAAU,YAAY,KAAK,CAAC,GAAG,GAC1I;AAAA;AAAA,QACF;AAAA,QAED;AAAA,SACH;AAAA;AAAA,EAEJ;AAEF,MAAI,aAAa,UAAa,QAAS,QAAO;AAC9C,SACE,iCACG;AAAA;AAAA,IACD,oBAAC,UAAK,MAAK,UAAS,WAAU,WAC3B,oBACH;AAAA,KACF;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,GAAoB;AACxF,QAAM,OAAO,MAAM,cAAc,SAAS,CAAC,MAAM,YAAY,MAAM,WAAW,MAAM;AACpF,SACE,oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OACtD,iBAAO,OAAO,UACjB;AAEJ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  IconButton
4
- } from "./chunk-SJS6RJIT.js";
4
+ } from "./chunk-V7W4RLRW.js";
5
5
 
6
6
  // src/dialog/dialog.tsx
7
7
  import { Dialog as DialogPrimitive } from "radix-ui";
@@ -143,4 +143,4 @@ export {
143
143
  Dialog,
144
144
  Sheet
145
145
  };
146
- //# sourceMappingURL=chunk-6EAHUURY.js.map
146
+ //# sourceMappingURL=chunk-GHAN7OOE.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-JT7ZKZT5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -39,7 +39,7 @@ function LoaderGlyph({ state = "loading", value, ...props }) {
39
39
 
40
40
  // src/button/recipe.ts
41
41
  var buttonRecipe = defineRecipe({
42
- base: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
42
+ base: "inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
43
43
  variants: {
44
44
  variant: {
45
45
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
@@ -141,4 +141,4 @@ export {
141
141
  Button,
142
142
  IconButton
143
143
  };
144
- //# sourceMappingURL=chunk-3DHNN5V7.js.map
144
+ //# sourceMappingURL=chunk-M3GEYLMR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/button.tsx","../src/spinner/glyph.tsx","../src/button/recipe.ts"],"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\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `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` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\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 /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\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. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition duration-150 \" +\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 // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\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 border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\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 // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n"],"mappings":";;;;;;;;;AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;;;ACoBlC,SACE,KADF;AAjBJ,IAAM,MAAM;AAaL,SAAS,YAAY,EAAE,QAAQ,WAAW,OAAO,GAAG,MAAM,GAAqB;AACpF,QAAM,QAAQ,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK;AAChE,QAAM,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,CAAC,IAAI,GAAG,IAAI;AACrG,SACE,qBAAC,SAAI,SAAQ,aAAY,MAAK,QAAO,eAAW,MAAC,cAAY,OAAO,iBAAe,SAAS,OAAO,SAAY,MAAO,GAAG,OACvH;AAAA,wBAAC,UAAK,GAAG,KAAK,QAAO,gBAAe,eAAc,QAAO,aAAY,OAAM,gBAAe,SAAQ;AAAA,IAClG;AAAA,MAAC;AAAA;AAAA,QACC,GAAG;AAAA,QACH,YAAY;AAAA,QACZ,QAAO;AAAA,QACP,aAAY;AAAA,QACZ,gBAAe;AAAA,QACf,eAAc;AAAA,QACd,WAAU;AAAA,QACV,iBAAiB,SAAS,OAAO,SAAY,GAAG,IAAI,IAAI,MAAM,IAAI;AAAA;AAAA,IACpE;AAAA,IACC,UAAU,aAAa,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM,MAAK,gBAAe,WAAU,kBAAiB;AAAA,IACtG,UAAU,aA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A;AAAA,IACD,gBAAAD,KAAC,UAAK,MAAK,UAAS,WAAU,WAC3B,oBACH;AAAA,KACF;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,GAAoB;AACxF,QAAM,OAAO,MAAM,cAAc,SAAS,CAAC,MAAM,YAAY,MAAM,WAAW,MAAM;AACpF,SACE,gBAAAA,KAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OACtD,iBAAO,OAAO,UACjB;AAEJ;","names":["jsx","jsxs"]}
1
+ {"version":3,"sources":["../src/button/button.tsx","../src/spinner/glyph.tsx","../src/button/recipe.ts"],"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\nimport { cn } from \"../cn\";\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `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` (an 8 px radius, the radius of a field) · `pill`. `cut` is deprecated (krizaka-ui#393: the chamfer is\n * retired) — it draws `rounded` and warns in development; it will be removed in 4.0.\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 /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — the hover is quiet. Removed in 4.0. */\n shimmer?: boolean;\n /** @deprecated Since 3.31 (krizaka-ui#393): does nothing — a button never moves under the pointer. Removed in 4.0. */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nlet warnedCut = false;\n/** `shape=\"cut\"` (the chamfer) is retired: one warning per page in development, never in production. */\nfunction warnCut() {\n if (warnedCut || typeof process === \"undefined\" || process.env.NODE_ENV === \"production\") return;\n warnedCut = true;\n console.warn('@krizaka/ui/button: shape=\"cut\" is deprecated (krizaka-ui#393) and now draws the default rounded shape. Remove the prop.');\n}\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer: _shimmer,\n magnetic: _magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n if (shape === \"cut\") warnCut();\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: cn(known && \"relative isolate overflow-hidden\", className),\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={cn(\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph])} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\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. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 \" +\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 // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\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 border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\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 // One clean shape (krizaka-ui#393): an 8 px radius (`--kz-radius-sm`, the radius of a field — a button beside an\n // input lines up with it), the pill on demand. `cut` (the retired chamfer) is a deprecated alias of `rounded`.\n shape: { rounded: \"rounded-sm\", pill: \"rounded-full\", cut: \"rounded-sm\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n"],"mappings":";;;;;;;;;AACA,SAAS,YAAY;AAErB,SAA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
84
  // src/button/recipe.ts
85
85
  var buttonRecipe = defineRecipe({
86
- base: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
86
+ base: "inline-flex max-w-full shrink-0 select-none items-center justify-center gap-2 whitespace-normal text-center font-semibold transition duration-150 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
87
87
  variants: {
88
88
  variant: {
89
89
  primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
@@ -337,4 +337,4 @@ export {
337
337
  SettingsSection,
338
338
  SettingsRow
339
339
  };
340
- //# sourceMappingURL=chunk-7J2L4HOD.js.map
340
+ //# sourceMappingURL=chunk-MTVX4RRF.js.map