@krizaka/ui 3.55.0 → 3.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (576) hide show
  1. package/dist/{RotatingWord-D9s7FXFD.d.ts → RotatingWord-COSabR2c.d.ts} +2 -1
  2. package/dist/account-menu.d.ts +2 -1
  3. package/dist/account-settings.d.ts +153 -61
  4. package/dist/account-settings.js +240 -97
  5. package/dist/account-settings.js.map +1 -1
  6. package/dist/achievement.d.ts +2 -1
  7. package/dist/action-bar.d.ts +3 -2
  8. package/dist/activity-feed.d.ts +2 -1
  9. package/dist/agenda.d.ts +2 -1
  10. package/dist/alert.d.ts +2 -1
  11. package/dist/anatomy-plate.d.ts +2 -1
  12. package/dist/app-header/search.d.ts +8 -7
  13. package/dist/app-header.d.ts +2 -1
  14. package/dist/app-shell.d.ts +26 -25
  15. package/dist/argument-card.d.ts +3 -2
  16. package/dist/audio-player.d.ts +2 -1
  17. package/dist/auth-layout.d.ts +11 -10
  18. package/dist/avatar/defaults.d.ts +2 -1
  19. package/dist/avatar.d.ts +2 -1
  20. package/dist/badge.d.ts +2 -1
  21. package/dist/bird-plate.d.ts +4 -2
  22. package/dist/blocks.css +77 -4
  23. package/dist/button.d.ts +2 -1
  24. package/dist/captcha.d.ts +2 -1
  25. package/dist/captcha.js +1 -0
  26. package/dist/captcha.js.map +1 -1
  27. package/dist/card-grid.d.ts +2 -1
  28. package/dist/card.d.ts +2 -1
  29. package/dist/catalogue-page.d.ts +82 -2
  30. package/dist/catalogue-page.js +156 -13
  31. package/dist/catalogue-page.js.map +1 -1
  32. package/dist/changelog-page.d.ts +2 -1
  33. package/dist/chapter.d.ts +2 -1
  34. package/dist/chat.d.ts +14 -13
  35. package/dist/checkbox.d.ts +2 -1
  36. package/dist/chip-link.d.ts +2 -1
  37. package/dist/chip-row.d.ts +8 -7
  38. package/dist/chip.d.ts +55 -1
  39. package/dist/chip.js +10 -1
  40. package/dist/choice-grid.d.ts +3 -2
  41. package/dist/chunk-27AWSJTK.js +46 -0
  42. package/dist/chunk-27AWSJTK.js.map +1 -0
  43. package/dist/{chunk-AEP3K4YD.js → chunk-4GQH27IT.js} +2 -2
  44. package/dist/{chunk-QWKCNSPF.js → chunk-5LANVCK7.js} +125 -73
  45. package/dist/chunk-5LANVCK7.js.map +1 -0
  46. package/dist/{chunk-KDXRYUD3.js → chunk-5QEXOGO2.js} +3 -1
  47. package/dist/{chunk-KDXRYUD3.js.map → chunk-5QEXOGO2.js.map} +1 -1
  48. package/dist/chunk-7J2L4HOD.js +340 -0
  49. package/dist/chunk-7J2L4HOD.js.map +1 -0
  50. package/dist/{chunk-7U5TXA5Q.js → chunk-BQ4EOR2O.js} +74 -2
  51. package/dist/chunk-BQ4EOR2O.js.map +1 -0
  52. package/dist/chunk-F6JTHPHE.js +399 -0
  53. package/dist/chunk-F6JTHPHE.js.map +1 -0
  54. package/dist/chunk-OGWB76BR.js +90 -0
  55. package/dist/chunk-OGWB76BR.js.map +1 -0
  56. package/dist/{chunk-VIPSZXO4.js → chunk-UYGUSYIC.js} +72 -2
  57. package/dist/chunk-UYGUSYIC.js.map +1 -0
  58. package/dist/chunk-WOZP3JLW.js +51 -0
  59. package/dist/chunk-WOZP3JLW.js.map +1 -0
  60. package/dist/chunk-XVXFMVG3.js +27 -0
  61. package/dist/chunk-XVXFMVG3.js.map +1 -0
  62. package/dist/code-block.d.ts +2 -1
  63. package/dist/combobox.d.ts +20 -19
  64. package/dist/combobox.js +3 -2
  65. package/dist/command.d.ts +21 -20
  66. package/dist/comparison-table.d.ts +2 -1
  67. package/dist/component-page.d.ts +2 -1
  68. package/dist/confirm-button.d.ts +2 -1
  69. package/dist/contact-page.d.ts +2 -1
  70. package/dist/continue-prompt.d.ts +2 -1
  71. package/dist/countdown.d.ts +2 -1
  72. package/dist/cover-hero.d.ts +20 -19
  73. package/dist/cover-hero.js +25 -42
  74. package/dist/cover-hero.js.map +1 -1
  75. package/dist/cta-panel.d.ts +2 -1
  76. package/dist/dashboard-layout.d.ts +50 -2
  77. package/dist/dashboard-layout.js +66 -11
  78. package/dist/dashboard-layout.js.map +1 -1
  79. package/dist/data-table.d.ts +45 -2
  80. package/dist/data-table.js +7 -3
  81. package/dist/date-picker.d.ts +29 -28
  82. package/dist/decision-list.d.ts +2 -1
  83. package/dist/description-list.d.ts +2 -1
  84. package/dist/detail-layout.d.ts +153 -20
  85. package/dist/detail-layout.js +73 -4
  86. package/dist/detail-layout.js.map +1 -1
  87. package/dist/{dialog-D42QwYb_.d.ts → dialog-DpUwec2g.d.ts} +2 -1
  88. package/dist/dialog.d.ts +3 -2
  89. package/dist/docs-article-page.d.ts +2 -1
  90. package/dist/docs-hub-page.d.ts +2 -1
  91. package/dist/docs-layout.d.ts +2 -1
  92. package/dist/docs-nav.d.ts +3 -10
  93. package/dist/document-viewer.d.ts +5 -4
  94. package/dist/doodle.d.ts +17 -6
  95. package/dist/doodle.js +40 -9
  96. package/dist/doodle.js.map +1 -1
  97. package/dist/drop-overlay.d.ts +2 -1
  98. package/dist/dropdown-menu.d.ts +2 -1
  99. package/dist/dropdown-menu.js +13 -74
  100. package/dist/dropdown-menu.js.map +1 -1
  101. package/dist/elephant.d.ts +2 -1
  102. package/dist/empty-state.d.ts +2 -1
  103. package/dist/engine-flow.d.ts +2 -1
  104. package/dist/error-page.d.ts +2 -1
  105. package/dist/file-upload.d.ts +14 -13
  106. package/dist/filter-bar.d.ts +84 -11
  107. package/dist/filter-bar.js +6 -2
  108. package/dist/flock.d.ts +3 -2
  109. package/dist/footnote.d.ts +2 -1
  110. package/dist/force-update-screen.d.ts +8 -7
  111. package/dist/form/server.d.ts +2 -1
  112. package/dist/form.d.ts +2 -1
  113. package/dist/gallery-page.d.ts +2 -1
  114. package/dist/genui.d.ts +2 -1
  115. package/dist/genui.js +3 -3
  116. package/dist/{geometry-DX-W-Yyf.d.ts → geometry-DZ4Q3hDQ.d.ts} +2 -1
  117. package/dist/glossary-term.d.ts +2 -1
  118. package/dist/glossary.d.ts +2 -1
  119. package/dist/glow-card.d.ts +2 -1
  120. package/dist/goal-gauge.d.ts +2 -1
  121. package/dist/grade-stamp.d.ts +23 -0
  122. package/dist/grade-stamp.js +42 -0
  123. package/dist/grade-stamp.js.map +1 -0
  124. package/dist/how-it-works-page.d.ts +2 -1
  125. package/dist/image-cropper.d.ts +5 -4
  126. package/dist/index.d.ts +3 -2
  127. package/dist/index.js +4 -4
  128. package/dist/iso.d.ts +2 -1
  129. package/dist/kanban.d.ts +2 -1
  130. package/dist/kbd.d.ts +2 -1
  131. package/dist/kind-config-editor.d.ts +152 -0
  132. package/dist/kind-config-editor.js +574 -0
  133. package/dist/kind-config-editor.js.map +1 -0
  134. package/dist/kpi-explained.d.ts +2 -1
  135. package/dist/landing-page.d.ts +2 -1
  136. package/dist/landscape.d.ts +2 -1
  137. package/dist/language-switch/server.d.ts +2 -1
  138. package/dist/language-switch.d.ts +11 -10
  139. package/dist/legal-page.d.ts +2 -1
  140. package/dist/link-card.d.ts +2 -1
  141. package/dist/list.d.ts +2 -1
  142. package/dist/loader.d.ts +2 -1
  143. package/dist/longform-page.d.ts +2 -1
  144. package/dist/maintenance-screen.d.ts +5 -4
  145. package/dist/map.d.ts +8 -7
  146. package/dist/map.js +24 -0
  147. package/dist/map.js.map +1 -1
  148. package/dist/markdown.d.ts +2 -1
  149. package/dist/marketing-layout.d.ts +5 -4
  150. package/dist/marquee.d.ts +2 -1
  151. package/dist/mascot-quote.d.ts +2 -1
  152. package/dist/mascot-state.d.ts +3 -2
  153. package/dist/mascots.d.ts +4 -3
  154. package/dist/match-dialog.d.ts +2 -1
  155. package/dist/media-capture.d.ts +5 -4
  156. package/dist/media-gallery.d.ts +2 -1
  157. package/dist/media-grid.d.ts +3 -10
  158. package/dist/meta-row.d.ts +2 -1
  159. package/dist/meter.d.ts +2 -1
  160. package/dist/motion.d.ts +3 -2
  161. package/dist/native/form.d.ts +2 -1
  162. package/dist/native/list.d.ts +2 -1
  163. package/dist/native/map.d.ts +2 -1
  164. package/dist/native/map.js +24 -0
  165. package/dist/native/map.js.map +1 -1
  166. package/dist/native/markdown.d.ts +2 -1
  167. package/dist/native/media-capture.d.ts +2 -1
  168. package/dist/native/media-picker.d.ts +2 -1
  169. package/dist/native/vertical-video.d.ts +2 -1
  170. package/dist/native/video-player.d.ts +2 -1
  171. package/dist/native.d.ts +230 -1
  172. package/dist/native.js +1465 -965
  173. package/dist/native.js.map +1 -1
  174. package/dist/nav-bar/me.d.ts +2 -1
  175. package/dist/nav-bar.d.ts +2 -1
  176. package/dist/next-actions.d.ts +2 -1
  177. package/dist/notification-preferences.d.ts +23 -22
  178. package/dist/notification-preferences.js +4 -3
  179. package/dist/notification-preferences.js.map +1 -1
  180. package/dist/number-ticker.d.ts +2 -1
  181. package/dist/opening-hours.d.ts +2 -1
  182. package/dist/page-header.d.ts +2 -1
  183. package/dist/page-hero.d.ts +2 -1
  184. package/dist/page-index.d.ts +2 -1
  185. package/dist/page.d.ts +2 -1
  186. package/dist/pagination.d.ts +2 -1
  187. package/dist/photo-grid.d.ts +2 -1
  188. package/dist/pointer-light.d.ts +2 -1
  189. package/dist/popover.d.ts +2 -1
  190. package/dist/pricing-page.d.ts +2 -1
  191. package/dist/product-page.d.ts +2 -1
  192. package/dist/profile-card.d.ts +2 -1
  193. package/dist/progress.d.ts +2 -1
  194. package/dist/promise-card.d.ts +2 -1
  195. package/dist/quota-meter.d.ts +2 -1
  196. package/dist/radio-group.d.ts +2 -1
  197. package/dist/radio-group.js +3 -3
  198. package/dist/rail-nav.d.ts +17 -16
  199. package/dist/rail-nav.js +22 -56
  200. package/dist/rail-nav.js.map +1 -1
  201. package/dist/recipes.d.ts +2 -1
  202. package/dist/retro-tv.d.ts +2 -1
  203. package/dist/router.d.ts +2 -1
  204. package/dist/scroll-stage.d.ts +2 -1
  205. package/dist/search-field.d.ts +2 -1
  206. package/dist/section-backdrop.d.ts +2 -1
  207. package/dist/separator.d.ts +2 -1
  208. package/dist/service-card.d.ts +9 -8
  209. package/dist/settings-layout.d.ts +2 -1
  210. package/dist/settings-layout.js +10 -324
  211. package/dist/settings-layout.js.map +1 -1
  212. package/dist/showcase.d.ts +2 -1
  213. package/dist/signature.d.ts +2 -1
  214. package/dist/site-cahier.d.ts +187 -0
  215. package/dist/site-cahier.js +844 -0
  216. package/dist/site-cahier.js.map +1 -0
  217. package/dist/site-footer.d.ts +2 -1
  218. package/dist/sites.d.ts +2 -1
  219. package/dist/skeleton.d.ts +2 -1
  220. package/dist/skip-link.d.ts +2 -1
  221. package/dist/slider.d.ts +2 -1
  222. package/dist/slot-picker.d.ts +86 -13
  223. package/dist/slot-picker.js +98 -16
  224. package/dist/slot-picker.js.map +1 -1
  225. package/dist/specimen-tag.d.ts +2 -1
  226. package/dist/speed-lines.d.ts +19 -0
  227. package/dist/speed-lines.js +45 -0
  228. package/dist/speed-lines.js.map +1 -0
  229. package/dist/spinner.d.ts +2 -1
  230. package/dist/split-view.d.ts +2 -1
  231. package/dist/stage-banner.d.ts +2 -1
  232. package/dist/stat.d.ts +2 -1
  233. package/dist/status-chip.d.ts +44 -0
  234. package/dist/status-chip.js +137 -0
  235. package/dist/status-chip.js.map +1 -0
  236. package/dist/status-page.d.ts +2 -1
  237. package/dist/step-progress.d.ts +2 -1
  238. package/dist/step-showcase.d.ts +2 -1
  239. package/dist/stepper.d.ts +2 -1
  240. package/dist/sticky-action.d.ts +28 -5
  241. package/dist/sticky-action.js +10 -4
  242. package/dist/sticky-action.js.map +1 -1
  243. package/dist/stuck.d.ts +2 -1
  244. package/dist/swipe-deck.d.ts +2 -1
  245. package/dist/switch.d.ts +2 -1
  246. package/dist/tabs.d.ts +2 -1
  247. package/dist/tag-input.d.ts +2 -1
  248. package/dist/tag-input.js +3 -2
  249. package/dist/tag-input.js.map +1 -1
  250. package/dist/tag-selector.d.ts +30 -4
  251. package/dist/tag-selector.js +90 -8
  252. package/dist/tag-selector.js.map +1 -1
  253. package/dist/taped-photo.d.ts +2 -1
  254. package/dist/taped-photo.js +3 -20
  255. package/dist/taped-photo.js.map +1 -1
  256. package/dist/terminal-replay.d.ts +2 -1
  257. package/dist/terminal-replay.js +1 -1
  258. package/dist/text-style/server.d.ts +2 -1
  259. package/dist/text-style.d.ts +2 -1
  260. package/dist/theme.d.ts +21 -1
  261. package/dist/theme.js +37 -1
  262. package/dist/theme.js.map +1 -1
  263. package/dist/toast.d.ts +2 -1
  264. package/dist/toc.d.ts +2 -1
  265. package/dist/tooltip.d.ts +2 -1
  266. package/dist/tree-view.d.ts +2 -1
  267. package/dist/update-prompt.d.ts +11 -10
  268. package/dist/upload-queue.d.ts +2 -1
  269. package/dist/verified-badge.d.ts +2 -1
  270. package/dist/versus-card.d.ts +40 -0
  271. package/dist/versus-card.js +40 -0
  272. package/dist/versus-card.js.map +1 -0
  273. package/dist/vertical-video.d.ts +2 -1
  274. package/dist/video-player.d.ts +20 -19
  275. package/dist/video-trimmer.d.ts +2 -1
  276. package/dist/virtual.d.ts +8 -7
  277. package/dist/waveform.d.ts +2 -1
  278. package/package.json +124 -39
  279. package/registry/account-menu.json +1 -1
  280. package/registry/account-settings.json +257 -5
  281. package/registry/achievement.json +1 -1
  282. package/registry/action-bar.json +1 -1
  283. package/registry/activity-feed.json +1 -1
  284. package/registry/agenda.json +1 -1
  285. package/registry/alert.json +1 -1
  286. package/registry/anatomy-plate.json +1 -1
  287. package/registry/app-header.json +1 -1
  288. package/registry/app-shell.json +1 -1
  289. package/registry/argument-card.json +1 -1
  290. package/registry/audio-player.json +1 -1
  291. package/registry/auth-layout.json +1 -1
  292. package/registry/avatar.json +1 -1
  293. package/registry/badge.json +1 -1
  294. package/registry/bird-plate.json +1 -1
  295. package/registry/button.json +1 -1
  296. package/registry/captcha.json +1 -1
  297. package/registry/card-grid.json +1 -1
  298. package/registry/card.json +1 -1
  299. package/registry/catalogue-page.json +116 -6
  300. package/registry/changelog-page.json +1 -1
  301. package/registry/chapter.json +1 -1
  302. package/registry/chat.json +1 -1
  303. package/registry/checkbox.json +1 -1
  304. package/registry/chip-link.json +1 -1
  305. package/registry/chip-row.json +1 -1
  306. package/registry/chip.json +386 -11
  307. package/registry/choice-grid.json +1 -1
  308. package/registry/code-block.json +1 -1
  309. package/registry/combobox.json +1 -1
  310. package/registry/command.json +1 -1
  311. package/registry/comparison-table.json +1 -1
  312. package/registry/component-page.json +1 -1
  313. package/registry/confirm-button.json +1 -1
  314. package/registry/contact-page.json +1 -1
  315. package/registry/continue-prompt.json +1 -1
  316. package/registry/countdown.json +1 -1
  317. package/registry/cover-hero.json +1 -1
  318. package/registry/cta-panel.json +1 -1
  319. package/registry/dashboard-layout.json +91 -5
  320. package/registry/data-table.json +156 -5
  321. package/registry/date-picker.json +1 -1
  322. package/registry/decision-list.json +1 -1
  323. package/registry/description-list.json +1 -1
  324. package/registry/detail-layout.json +199 -5
  325. package/registry/dialog.json +1 -1
  326. package/registry/docs-article-page.json +1 -1
  327. package/registry/docs-hub-page.json +1 -1
  328. package/registry/docs-layout.json +1 -1
  329. package/registry/docs-nav.json +1 -1
  330. package/registry/document-viewer.json +1 -1
  331. package/registry/doodle.json +115 -22
  332. package/registry/drop-overlay.json +1 -1
  333. package/registry/dropdown-menu.json +1 -1
  334. package/registry/elephant.json +2 -2
  335. package/registry/empty-state.json +1 -1
  336. package/registry/engine-flow.json +1 -1
  337. package/registry/error-page.json +1 -1
  338. package/registry/examples/account-settings/appearance.d.ts +4 -0
  339. package/registry/examples/account-settings/appearance.js +40 -0
  340. package/registry/examples/account-settings/appearance.tsx +30 -0
  341. package/registry/examples/catalogue-page/clients.d.ts +4 -0
  342. package/registry/examples/catalogue-page/clients.js +49 -0
  343. package/registry/examples/catalogue-page/clients.tsx +61 -0
  344. package/registry/examples/chip/marker-picker.d.ts +4 -0
  345. package/registry/examples/chip/marker-picker.js +17 -0
  346. package/registry/examples/chip/marker-picker.tsx +17 -0
  347. package/registry/examples/chip/native/marker-picker.d.ts +4 -0
  348. package/registry/examples/chip/native/marker-picker.dark.png +0 -0
  349. package/registry/examples/chip/native/marker-picker.js +18 -0
  350. package/registry/examples/chip/native/marker-picker.light.png +0 -0
  351. package/registry/examples/chip/native/marker-picker.tsx +16 -0
  352. package/registry/examples/chip/native/tags.d.ts +4 -0
  353. package/registry/examples/chip/native/tags.dark.png +0 -0
  354. package/registry/examples/chip/native/tags.js +22 -0
  355. package/registry/examples/chip/native/tags.light.png +0 -0
  356. package/registry/examples/chip/native/tags.tsx +20 -0
  357. package/registry/examples/chip/tags.d.ts +4 -0
  358. package/registry/examples/chip/tags.js +26 -0
  359. package/registry/examples/chip/tags.tsx +23 -0
  360. package/registry/examples/dashboard-layout/today.d.ts +4 -0
  361. package/registry/examples/dashboard-layout/today.js +54 -0
  362. package/registry/examples/dashboard-layout/today.tsx +63 -0
  363. package/registry/examples/data-table/bulk.d.ts +4 -0
  364. package/registry/examples/data-table/bulk.js +45 -0
  365. package/registry/examples/data-table/bulk.tsx +34 -0
  366. package/registry/examples/detail-layout/client.d.ts +4 -0
  367. package/registry/examples/detail-layout/client.js +40 -0
  368. package/registry/examples/detail-layout/client.tsx +39 -0
  369. package/registry/examples/detail-layout/new-invoice.d.ts +4 -0
  370. package/registry/examples/detail-layout/new-invoice.js +44 -0
  371. package/registry/examples/detail-layout/new-invoice.tsx +34 -0
  372. package/registry/examples/doodle/bird-sketch.d.ts +4 -0
  373. package/registry/examples/doodle/bird-sketch.js +11 -0
  374. package/registry/examples/doodle/bird-sketch.tsx +12 -0
  375. package/registry/examples/doodle/margin-marks.d.ts +4 -0
  376. package/registry/examples/doodle/margin-marks.js +27 -0
  377. package/registry/examples/doodle/margin-marks.tsx +19 -0
  378. package/registry/examples/filter-bar/views.d.ts +4 -0
  379. package/registry/examples/filter-bar/views.js +39 -0
  380. package/registry/examples/filter-bar/views.tsx +30 -0
  381. package/registry/examples/grade-stamp/coverage.d.ts +4 -0
  382. package/registry/examples/grade-stamp/coverage.js +12 -0
  383. package/registry/examples/grade-stamp/coverage.tsx +8 -0
  384. package/registry/examples/grade-stamp/lighthouse.d.ts +4 -0
  385. package/registry/examples/grade-stamp/lighthouse.js +12 -0
  386. package/registry/examples/grade-stamp/lighthouse.tsx +14 -0
  387. package/registry/examples/kind-config-editor/derived.d.ts +4 -0
  388. package/registry/examples/kind-config-editor/derived.js +26 -0
  389. package/registry/examples/kind-config-editor/derived.tsx +16 -0
  390. package/registry/examples/kind-config-editor/native/status-set.d.ts +4 -0
  391. package/registry/examples/kind-config-editor/native/status-set.dark.png +0 -0
  392. package/registry/examples/kind-config-editor/native/status-set.js +22 -0
  393. package/registry/examples/kind-config-editor/native/status-set.light.png +0 -0
  394. package/registry/examples/kind-config-editor/native/status-set.tsx +19 -0
  395. package/registry/examples/kind-config-editor/native/tag-set.d.ts +4 -0
  396. package/registry/examples/kind-config-editor/native/tag-set.dark.png +0 -0
  397. package/registry/examples/kind-config-editor/native/tag-set.js +20 -0
  398. package/registry/examples/kind-config-editor/native/tag-set.light.png +0 -0
  399. package/registry/examples/kind-config-editor/native/tag-set.tsx +18 -0
  400. package/registry/examples/kind-config-editor/status-set.d.ts +4 -0
  401. package/registry/examples/kind-config-editor/status-set.js +29 -0
  402. package/registry/examples/kind-config-editor/status-set.tsx +25 -0
  403. package/registry/examples/kind-config-editor/tag-set.d.ts +4 -0
  404. package/registry/examples/kind-config-editor/tag-set.js +20 -0
  405. package/registry/examples/kind-config-editor/tag-set.tsx +18 -0
  406. package/registry/examples/site-cahier/java-releases.d.ts +4 -0
  407. package/registry/examples/site-cahier/java-releases.js +33 -0
  408. package/registry/examples/site-cahier/java-releases.tsx +32 -0
  409. package/registry/examples/site-cahier/motion-lab.d.ts +4 -0
  410. package/registry/examples/site-cahier/motion-lab.js +32 -0
  411. package/registry/examples/site-cahier/motion-lab.tsx +29 -0
  412. package/registry/examples/site-cahier/ts-changelog.d.ts +4 -0
  413. package/registry/examples/site-cahier/ts-changelog.js +24 -0
  414. package/registry/examples/site-cahier/ts-changelog.tsx +20 -0
  415. package/registry/examples/site-cahier/ts-doc.d.ts +4 -0
  416. package/registry/examples/site-cahier/ts-doc.js +38 -0
  417. package/registry/examples/site-cahier/ts-doc.tsx +27 -0
  418. package/registry/examples/site-cahier/ui-home.d.ts +4 -0
  419. package/registry/examples/site-cahier/ui-home.js +46 -0
  420. package/registry/examples/site-cahier/ui-home.tsx +40 -0
  421. package/registry/examples/slot-picker/weeks.d.ts +4 -0
  422. package/registry/examples/slot-picker/weeks.js +45 -0
  423. package/registry/examples/slot-picker/weeks.tsx +28 -0
  424. package/registry/examples/speed-lines/hero.d.ts +4 -0
  425. package/registry/examples/speed-lines/hero.js +11 -0
  426. package/registry/examples/speed-lines/hero.tsx +12 -0
  427. package/registry/examples/speed-lines/streaks.d.ts +4 -0
  428. package/registry/examples/speed-lines/streaks.js +11 -0
  429. package/registry/examples/speed-lines/streaks.tsx +12 -0
  430. package/registry/examples/status-chip/default.d.ts +4 -0
  431. package/registry/examples/status-chip/default.js +35 -0
  432. package/registry/examples/status-chip/default.tsx +32 -0
  433. package/registry/examples/status-chip/native/default.d.ts +4 -0
  434. package/registry/examples/status-chip/native/default.dark.png +0 -0
  435. package/registry/examples/status-chip/native/default.js +26 -0
  436. package/registry/examples/status-chip/native/default.light.png +0 -0
  437. package/registry/examples/status-chip/native/default.tsx +20 -0
  438. package/registry/examples/tag-selector/creatable.d.ts +4 -0
  439. package/registry/examples/tag-selector/creatable.js +41 -0
  440. package/registry/examples/tag-selector/creatable.tsx +29 -0
  441. package/registry/examples/tag-selector/native/tags.d.ts +4 -0
  442. package/registry/examples/tag-selector/native/tags.dark.png +0 -0
  443. package/registry/examples/tag-selector/native/tags.js +19 -0
  444. package/registry/examples/tag-selector/native/tags.light.png +0 -0
  445. package/registry/examples/tag-selector/native/tags.tsx +19 -0
  446. package/registry/examples/versus-card/alternatives.d.ts +4 -0
  447. package/registry/examples/versus-card/alternatives.js +20 -0
  448. package/registry/examples/versus-card/alternatives.tsx +14 -0
  449. package/registry/examples/versus-card/releases.d.ts +4 -0
  450. package/registry/examples/versus-card/releases.js +35 -0
  451. package/registry/examples/versus-card/releases.tsx +29 -0
  452. package/registry/field.json +1 -1
  453. package/registry/file-upload.json +1 -1
  454. package/registry/filter-bar.json +208 -8
  455. package/registry/flock.json +1 -1
  456. package/registry/footnote.json +1 -1
  457. package/registry/force-update-screen.json +1 -1
  458. package/registry/form.json +1 -1
  459. package/registry/gallery-page.json +1 -1
  460. package/registry/genui.json +1 -1
  461. package/registry/glossary-term.json +1 -1
  462. package/registry/glossary.json +1 -1
  463. package/registry/glow-card.json +1 -1
  464. package/registry/goal-gauge.json +1 -1
  465. package/registry/grade-stamp.json +227 -0
  466. package/registry/how-it-works-page.json +1 -1
  467. package/registry/image-cropper.json +1 -1
  468. package/registry/index.json +323 -30
  469. package/registry/iso.json +1 -1
  470. package/registry/kanban.json +1 -1
  471. package/registry/kbd.json +1 -1
  472. package/registry/kind-config-editor.json +565 -0
  473. package/registry/kpi-explained.json +1 -1
  474. package/registry/landing-page.json +1 -1
  475. package/registry/landscape.json +1 -1
  476. package/registry/language-switch.json +1 -1
  477. package/registry/legal-page.json +1 -1
  478. package/registry/link-card.json +1 -1
  479. package/registry/list.json +1 -1
  480. package/registry/loader.json +1 -1
  481. package/registry/longform-page.json +1 -1
  482. package/registry/maintenance-screen.json +1 -1
  483. package/registry/map.json +2 -2
  484. package/registry/markdown.json +1 -1
  485. package/registry/marketing-layout.json +1 -1
  486. package/registry/marquee.json +1 -1
  487. package/registry/mascot-quote.json +1 -1
  488. package/registry/mascot-state.json +1 -1
  489. package/registry/mascots.json +1 -1
  490. package/registry/match-dialog.json +1 -1
  491. package/registry/media-capture.json +1 -1
  492. package/registry/media-gallery.json +1 -1
  493. package/registry/media-grid.json +1 -1
  494. package/registry/meta-row.json +1 -1
  495. package/registry/meter.json +1 -1
  496. package/registry/nav-bar.json +2 -2
  497. package/registry/next-actions.json +1 -1
  498. package/registry/notification-preferences.json +1 -1
  499. package/registry/number-ticker.json +1 -1
  500. package/registry/opening-hours.json +1 -1
  501. package/registry/page-header.json +1 -1
  502. package/registry/page-hero.json +1 -1
  503. package/registry/page-index.json +1 -1
  504. package/registry/page.json +1 -1
  505. package/registry/pagination.json +1 -1
  506. package/registry/photo-grid.json +1 -1
  507. package/registry/pointer-light.json +1 -1
  508. package/registry/popover.json +1 -1
  509. package/registry/pricing-page.json +1 -1
  510. package/registry/product-page.json +1 -1
  511. package/registry/profile-card.json +1 -1
  512. package/registry/progress.json +1 -1
  513. package/registry/promise-card.json +1 -1
  514. package/registry/quota-meter.json +1 -1
  515. package/registry/radio-group.json +1 -1
  516. package/registry/rail-nav.json +2 -2
  517. package/registry/recipes.json +1 -1
  518. package/registry/retro-tv.json +1 -1
  519. package/registry/router.json +1 -1
  520. package/registry/scroll-stage.json +1 -1
  521. package/registry/search-field.json +1 -1
  522. package/registry/section-backdrop.json +1 -1
  523. package/registry/separator.json +1 -1
  524. package/registry/service-card.json +1 -1
  525. package/registry/settings-layout.json +1 -1
  526. package/registry/showcase.json +1 -1
  527. package/registry/signature.json +1 -1
  528. package/registry/site-cahier.json +548 -0
  529. package/registry/site-footer.json +2 -2
  530. package/registry/sites.json +1 -1
  531. package/registry/skeleton.json +1 -1
  532. package/registry/skip-link.json +1 -1
  533. package/registry/slider.json +1 -1
  534. package/registry/slot-picker.json +156 -10
  535. package/registry/slot.json +1 -1
  536. package/registry/specimen-tag.json +1 -1
  537. package/registry/speed-lines.json +174 -0
  538. package/registry/spinner.json +1 -1
  539. package/registry/split-view.json +1 -1
  540. package/registry/stage-banner.json +1 -1
  541. package/registry/stat.json +1 -1
  542. package/registry/status-chip.json +350 -0
  543. package/registry/status-page.json +1 -1
  544. package/registry/step-progress.json +1 -1
  545. package/registry/step-showcase.json +1 -1
  546. package/registry/stepper.json +1 -1
  547. package/registry/sticky-action.json +38 -8
  548. package/registry/stuck.json +1 -1
  549. package/registry/swipe-deck.json +1 -1
  550. package/registry/switch.json +1 -1
  551. package/registry/tabs.json +1 -1
  552. package/registry/tag-input.json +1 -1
  553. package/registry/tag-selector.json +189 -12
  554. package/registry/taped-photo.json +1 -1
  555. package/registry/terminal-replay.json +1 -1
  556. package/registry/text-style.json +1 -1
  557. package/registry/theme.json +3 -3
  558. package/registry/toast.json +1 -1
  559. package/registry/toc.json +1 -1
  560. package/registry/tooltip.json +1 -1
  561. package/registry/tree-view.json +1 -1
  562. package/registry/update-prompt.json +1 -1
  563. package/registry/upload-queue.json +1 -1
  564. package/registry/verified-badge.json +1 -1
  565. package/registry/versus-card.json +194 -0
  566. package/registry/vertical-video.json +1 -1
  567. package/registry/video-player.json +1 -1
  568. package/registry/video-trimmer.json +1 -1
  569. package/registry/virtual.json +2 -2
  570. package/registry/waveform.json +1 -1
  571. package/dist/chunk-7U5TXA5Q.js.map +0 -1
  572. package/dist/chunk-OIMXKRXF.js +0 -179
  573. package/dist/chunk-OIMXKRXF.js.map +0 -1
  574. package/dist/chunk-QWKCNSPF.js.map +0 -1
  575. package/dist/chunk-VIPSZXO4.js.map +0 -1
  576. /package/dist/{chunk-AEP3K4YD.js.map → chunk-4GQH27IT.js.map} +0 -0
package/dist/blocks.css CHANGED
@@ -1302,14 +1302,24 @@ a.kz-fact:focus-visible { outline: 2px solid var(--kz-ring, var(--kz-accent)); o
1302
1302
  background: linear-gradient(135deg, transparent 50%, var(--kz-stuck-fold) 50%); box-shadow: -2px -2px 0 var(--kz-stuck-metal); }
1303
1303
  @media (max-width: 640px) { .kz-stuck-body { transform: rotate(calc(var(--kz-stuck-tilt, 0deg) * 0.6)); } }
1304
1304
 
1305
- /* ─── Doodle (ADR-004): a margin doodle — in the margin ink, never over text. Beside the block only where the page's margin
1306
- is wide enough to hold it (1360 px and up); below that it is gone (`place="inline"` stays in the flow). ─── */
1307
- .kz-doodle { display: none; position: relative; width: 56px; color: var(--kz-paper-rule-margin); pointer-events: none; transform: rotate(var(--kz-doodle-tilt, 0deg)); }
1305
+ /* ─── Doodle (ADR-004): a doodle in the margin ink (`--kz-doodle-ink`: the red of the margin by default, a product re-inks
1306
+ it) — never over text. Beside the block (`place="margin"`) only where the page's margin is wide enough to hold it
1307
+ (1360 px and up); below that it is gone. `place="inline"` stays in the flow, and a `circle` or a `wave` around real
1308
+ text (`children`) stretches to the word: the word stays text, the ink is drawn around it. ─── */
1309
+ .kz-doodle { display: none; position: relative; width: 56px; color: var(--kz-doodle-ink, var(--kz-paper-rule-margin)); pointer-events: none; transform: rotate(var(--kz-doodle-tilt, 0deg)); }
1308
1310
  .kz-doodle[data-place="inline"] { display: inline-block; }
1309
1311
  .kz-doodle svg { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
1310
- .kz-doodle[data-side="right"] svg { transform: scaleX(-1); }
1312
+ .kz-doodle[data-side="right"] svg, .kz-doodle[data-flip] svg { transform: scaleX(-1); }
1311
1313
  .kz-doodle[data-kind="circle"] { width: 72px; }
1314
+ .kz-doodle[data-kind="bird"] { width: 64px; }
1312
1315
  .kz-doodle-word { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--kz-font-cahier, var(--kz-font-display)); font-size: 18px; line-height: 24px; color: var(--kz-text-secondary); }
1316
+ /* Around real text: the span is the words, in the flow and in the reading order; the ink is laid over them. */
1317
+ .kz-doodle[data-wrap] { width: auto; color: inherit; pointer-events: auto; transform: none; line-height: inherit; }
1318
+ .kz-doodle[data-wrap] > .kz-doodle-word { position: relative; inset: auto; display: inline; padding: 0 0.3em; font: inherit; color: inherit; }
1319
+ .kz-doodle-ink { position: absolute; pointer-events: none; color: var(--kz-doodle-ink, var(--kz-paper-rule-margin)); }
1320
+ .kz-doodle[data-kind="circle"] > .kz-doodle-ink { inset: -0.35em -0.2em; }
1321
+ .kz-doodle[data-kind="wave"] > .kz-doodle-ink { left: 0; right: 0; bottom: -0.3em; height: 0.35em; }
1322
+ .kz-doodle-ink svg { height: 100%; }
1313
1323
  @media (min-width: 1360px) {
1314
1324
  .kz-doodle[data-place="margin"] { display: block; position: absolute; top: var(--kz-doodle-top, 0px); right: calc(100% + 16px); }
1315
1325
  .kz-doodle[data-place="margin"][data-side="right"] { right: auto; left: calc(100% + 16px); }
@@ -1326,6 +1336,69 @@ a.kz-fact:focus-visible { outline: 2px solid var(--kz-ring, var(--kz-accent)); o
1326
1336
  .kz-signature-text { display: grid; gap: 2px; transform: rotate(-2deg); transform-origin: 0 100%; }
1327
1337
  .kz-signature-name { font-family: var(--kz-font-cahier, var(--kz-font-display)); font-size: 26px; line-height: 32px; white-space: nowrap; }
1328
1338
  .kz-signature-date { font-family: var(--kz-font-mono); font-size: 12px; line-height: 16px; color: var(--kz-text-secondary); }
1339
+ /* ─── The retro pieces of the Krizaka style (a school notebook, the arcade, the manga): refined, never kitsch — each one is
1340
+ decoration with a real text equivalent, and none of them moves under `prefers-reduced-motion`. ─── */
1341
+
1342
+ /* GradeStamp: the teacher's red ink — a double-ruled stamp, a score, a remark, slightly askew. */
1343
+ .kz-grade { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 14px 8px; color: var(--kz-paper-rule-margin);
1344
+ border: 2px solid currentColor; border-radius: 3px; outline: 1px solid currentColor; outline-offset: 2px; transform: rotate(var(--kz-grade-tilt, -4deg)); cursor: help; }
1345
+ .kz-grade:focus-visible { outline: 2px solid var(--kz-ring); outline-offset: 4px; }
1346
+ .kz-grade-score { font-family: var(--kz-font-display); font-size: 34px; line-height: 38px; font-weight: 400; font-variant-numeric: var(--kz-figures, lining-nums tabular-nums); }
1347
+ .kz-grade-out { font-size: 0.55em; margin-left: 1px; opacity: 0.9; }
1348
+ .kz-grade-remark { font-family: var(--kz-font-mono); font-size: 14px; line-height: 20px; }
1349
+
1350
+ /* SpeedLines: the burst sits behind its content; the lines are quiet (a fraction of the text's ink). */
1351
+ .kz-speed { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; }
1352
+ .kz-speed-lines { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; color: var(--kz-speed-ink, var(--kz-text-muted)); opacity: 0.4; pointer-events: none; }
1353
+ .kz-speed-content { position: relative; max-width: 100%; }
1354
+ .kz-speed[data-speed-animated] .kz-speed-lines { animation: kz-speed-pulse 2.4s ease-in-out infinite; }
1355
+ @keyframes kz-speed-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.5; } }
1356
+ @media (prefers-reduced-motion: reduce) { .kz-speed[data-speed-animated] .kz-speed-lines { animation: none; } }
1357
+
1358
+ /* VersusCard: two fighters, the stat bars, the VS between them. On a phone they stack and the mark sits between. */
1359
+ .kz-versus { --kz-versus-ink: var(--kz-hue, var(--kz-accent)); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 32px);
1360
+ padding: clamp(16px, 3vw, 28px); background: var(--kz-surface-1); border: 2px solid var(--kz-border-strong, var(--kz-border-default)); border-radius: 4px;
1361
+ box-shadow: 4px 4px 0 var(--kz-border-default); }
1362
+ .kz-versus-fighter { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
1363
+ .kz-versus-fighter[data-side="right"] .kz-versus-bird { transform: scaleX(-1); }
1364
+ .kz-versus-name { margin: 0; font-family: var(--kz-font-display); font-size: 20px; line-height: 26px; font-weight: 400; color: var(--kz-text-primary); overflow-wrap: anywhere; }
1365
+ .kz-versus-caption { margin: 0; font-size: 13px; line-height: 20px; color: var(--kz-text-secondary); }
1366
+ .kz-versus-stats { margin: 8px 0 0; padding: 0; width: 100%; display: grid; gap: 10px; text-align: start; }
1367
+ .kz-versus-stat dt { font-family: var(--kz-font-mono); font-size: 12px; line-height: 16px; color: var(--kz-text-secondary); }
1368
+ .kz-versus-stat dd { margin: 2px 0 0; display: grid; gap: 4px; }
1369
+ .kz-versus-value { font-family: var(--kz-font-mono); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--kz-text-primary); font-variant-numeric: var(--kz-figures, lining-nums tabular-nums); }
1370
+ .kz-versus-bar { display: block; height: 8px; background: var(--kz-surface-0); border: 1px solid var(--kz-border-default); }
1371
+ .kz-versus-bar::before { content: ""; display: block; height: 100%; width: var(--kz-versus-fill, 0%); background: var(--kz-versus-ink); }
1372
+ .kz-versus-fighter[data-side="right"] .kz-versus-bar::before { margin-inline-start: auto; }
1373
+ .kz-versus-mark { font-family: var(--kz-font-display); font-size: clamp(32px, 6vw, 56px); line-height: 1; font-weight: 400; font-style: italic; color: var(--kz-text-primary);
1374
+ transform: skewX(-8deg) rotate(-4deg); text-shadow: 3px 3px 0 var(--kz-versus-ink); }
1375
+ .kz-versus-source { grid-column: 1 / -1; margin: 0; font-family: var(--kz-font-mono); font-size: 12px; line-height: 18px; color: var(--kz-text-muted); text-align: center; }
1376
+ @media (max-width: 640px) {
1377
+ .kz-versus { grid-template-columns: minmax(0, 1fr); }
1378
+ .kz-versus-mark { justify-self: center; }
1379
+ }
1380
+
1381
+ /* SiteCahier: the frame of a tool site — a plain paper bar with the bird, the page, the family footer. */
1382
+ .kz-cahier { display: flex; flex-direction: column; min-height: 100%; background: var(--kz-surface-0); color: var(--kz-text-primary); }
1383
+ .kz-cahier-main { flex: 1; }
1384
+ .kz-cahier-bar { border-bottom: 1px solid var(--kz-border-subtle); background: var(--kz-surface-0); }
1385
+ .kz-cahier-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 56px; padding-block: 8px; }
1386
+ .kz-cahier-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--kz-font-display); font-size: 18px; font-weight: 400; color: var(--kz-text-primary); text-decoration: none; }
1387
+ .kz-cahier-brand:focus-visible, .kz-cahier-nav a:focus-visible { outline: 2px solid var(--kz-ring); outline-offset: 3px; border-radius: 2px; }
1388
+ .kz-cahier-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
1389
+ .kz-cahier-nav a { color: var(--kz-text-secondary); text-decoration: none; font-size: 15px; line-height: 24px; }
1390
+ .kz-cahier-nav a:hover { color: var(--kz-text-primary); }
1391
+ .kz-cahier-nav a[aria-current="page"] { color: var(--kz-text-primary); font-weight: 600; text-decoration: underline; text-decoration-color: var(--kz-hue, var(--kz-paper-rule-margin)); text-decoration-thickness: 2px; text-underline-offset: 6px; }
1392
+ .kz-cahier-hero { position: relative; }
1393
+ .kz-cahier-doodle { position: absolute; right: var(--kz-page-gutter, 16px); top: 12px; pointer-events: none; }
1394
+ .kz-cahier-print { display: grid; place-items: center; padding: 8px 20px; min-width: 9rem; background: var(--kz-surface-1); }
1395
+ .kz-cahier-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; padding-block: clamp(24px, 5vw, 56px); }
1396
+ .kz-cahier-article { min-width: 0; max-width: 46rem; }
1397
+ .kz-cahier-aside { min-width: 0; font-size: 14px; line-height: 22px; color: var(--kz-text-secondary); }
1398
+ @media (min-width: 960px) {
1399
+ .kz-cahier-doc[data-aside] { grid-template-columns: minmax(0, 1fr) 15rem; }
1400
+ .kz-cahier-aside { position: sticky; top: 24px; align-self: start; }
1401
+ }
1329
1402
 
1330
1403
  .kz-plate, .kz-anatomy {
1331
1404
  margin: 0;
package/dist/button.d.ts CHANGED
@@ -124,4 +124,5 @@ type IconButtonProps = Omit<ButtonProps, "size"> & {
124
124
  /** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */
125
125
  declare function IconButton({ label, size, children, ...props }: IconButtonProps): React.JSX.Element;
126
126
 
127
- export { Button, type ButtonProps, type ButtonVariants, IconButton, type IconButtonProps, buttonVariants };
127
+ export { Button, IconButton, buttonVariants };
128
+ export type { ButtonProps, ButtonVariants, IconButtonProps };
package/dist/captcha.d.ts CHANGED
@@ -78,4 +78,5 @@ type CaptchaDisclosureProps = {
78
78
  /** « Protected by Cloudflare Turnstile · Privacy · Terms »: the line Cloudflare's terms ask for under the submit button. */
79
79
  declare function CaptchaDisclosure({ locale, labels, privacyHref, termsHref, className }: CaptchaDisclosureProps): React.JSX.Element;
80
80
 
81
- export { Captcha, CaptchaDisclosure, type CaptchaDisclosureProps, type CaptchaLabels, type CaptchaLocale, type CaptchaProps, captchaMessages };
81
+ export { Captcha, CaptchaDisclosure, captchaMessages };
82
+ export type { CaptchaDisclosureProps, CaptchaLabels, CaptchaLocale, CaptchaProps };
package/dist/captcha.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import "./chunk-JXLDUDTD.js";
2
3
  import {
3
4
  Button
4
5
  } from "./chunk-SJS6RJIT.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/captcha/captcha.tsx","../src/captcha/messages.ts","../src/captcha/turnstile.ts"],"sourcesContent":["// Client: loads the Cloudflare script and draws the widget in an effect.\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Button } from \"../button\";\nimport { type CaptchaLabels, labelsFor } from \"./messages\";\nimport { loadTurnstile, pageTheme, TURNSTILE_PRIVACY, TURNSTILE_TERMS } from \"./turnstile\";\n\nconst captcha = tv({\n slots: {\n root: \"w-full\",\n frame: \"overflow-hidden rounded-lg border border-border-default bg-surface-2 p-2\",\n error: \"flex flex-wrap items-center gap-3 rounded-lg border border-border-default bg-surface-2 p-3 text-sm text-fg-danger\",\n disclosure: \"text-xs text-fg-muted\",\n link: \"underline underline-offset-2 hover:text-fg-secondary focus-visible:rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2\",\n },\n});\n\nexport type CaptchaProps = {\n /** The widget's public site key. Empty → nothing is rendered and no token is asked (local dev, tests). */\n siteKey: string;\n /** The token once the check passes; `null` when it expires, fails or the theme redraws the widget. */\n onToken: (token: string | null) => void;\n /**\n * The language of the widget and of the words: `\"en\"`, `\"fr\"`…\n * @default \"en\"\n */\n locale?: string;\n /**\n * `auto` follows the page (`html.light` / `data-theme`, redrawn when it flips).\n * @default \"auto\"\n */\n theme?: \"auto\" | \"light\" | \"dark\";\n /** Words to say otherwise; the rest comes from the locale. */\n labels?: Partial<CaptchaLabels>;\n /** Classes added to the root. */\n className?: string;\n};\n\n/**\n * The bot check of a public form, Cloudflare Turnstile that stays out of the way: managed mode with\n * `appearance: \"interaction-only\"`, so a normal visitor sees nothing — the check runs in the background and `onToken`\n * fires. Only when Cloudflare needs the visitor does a framed box appear, on the tokens (radius, border, theme).\n * If the check cannot run, an alert with a retry button replaces it. Pair it with `CaptchaDisclosure` under the submit.\n */\nexport function Captcha({ siteKey, onToken, locale = \"en\", theme = \"auto\", labels, className }: CaptchaProps) {\n const host = useRef<HTMLDivElement>(null);\n const widget = useRef<string | null>(null);\n const onTokenRef = useRef(onToken);\n useEffect(() => {\n onTokenRef.current = onToken;\n });\n const [interactive, setInteractive] = useState(false);\n const [failed, setFailed] = useState(false);\n const [attempt, setAttempt] = useState(0);\n const words = labelsFor(locale, labels);\n const { root, frame, error } = captcha();\n\n useEffect(() => {\n if (!siteKey || !host.current) return;\n const el = host.current;\n let cancelled = false;\n const fail = () => {\n onTokenRef.current(null);\n setInteractive(false);\n setFailed(true);\n };\n const mount = () => {\n loadTurnstile().then((api) => {\n if (cancelled) return;\n if (widget.current) api.remove(widget.current);\n widget.current = api.render(el, {\n sitekey: siteKey,\n appearance: \"interaction-only\",\n size: \"flexible\",\n theme: theme === \"auto\" ? pageTheme() : theme,\n language: locale,\n callback: (token: string) => {\n setFailed(false);\n onTokenRef.current(token);\n },\n \"expired-callback\": () => onTokenRef.current(null),\n \"before-interactive-callback\": () => setInteractive(true),\n \"after-interactive-callback\": () => setInteractive(false),\n \"error-callback\": fail,\n \"unsupported-callback\": fail,\n });\n }, fail);\n };\n setFailed(false);\n mount();\n const watcher = theme === \"auto\" ? new MutationObserver(() => { onTokenRef.current(null); mount(); }) : null;\n watcher?.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\", \"data-theme\"] });\n return () => {\n cancelled = true;\n watcher?.disconnect();\n if (widget.current && window.turnstile) window.turnstile.remove(widget.current);\n widget.current = null;\n };\n }, [siteKey, locale, theme, attempt]);\n\n const retry = useCallback(() => setAttempt((n) => n + 1), []);\n\n if (!siteKey) return null;\n return (\n <div className={root({ className })} role=\"group\" aria-label={words.group} data-captcha={failed ? \"error\" : interactive ? \"interactive\" : \"idle\"}>\n {failed ? (\n <div role=\"alert\" className={error()}>\n <span>{words.error}</span>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={retry}>\n {words.retry}\n </Button>\n </div>\n ) : null}\n {/* Always mounted (Cloudflare draws into it); framed and visible only when a challenge needs the visitor. */}\n <div className={interactive && !failed ? frame() : undefined} hidden={failed} style={interactive ? undefined : { height: 0, overflow: \"hidden\" }}>\n <div ref={host} />\n </div>\n </div>\n );\n}\n\nexport type CaptchaDisclosureProps = {\n /**\n * The language of the line: `\"en\"`, `\"fr\"`…\n * @default \"en\"\n */\n locale?: string;\n /** Words to say otherwise; the rest comes from the locale. */\n labels?: Partial<CaptchaLabels>;\n /** The privacy link; Cloudflare's privacy policy by default. */\n privacyHref?: string;\n /** The terms link; Cloudflare's website terms by default. */\n termsHref?: string;\n /** Classes added to the root. */\n className?: string;\n};\n\n/** « Protected by Cloudflare Turnstile · Privacy · Terms »: the line Cloudflare's terms ask for under the submit button. */\nexport function CaptchaDisclosure({ locale = \"en\", labels, privacyHref = TURNSTILE_PRIVACY, termsHref = TURNSTILE_TERMS, className }: CaptchaDisclosureProps) {\n const words = labelsFor(locale, labels);\n const { disclosure, link } = captcha();\n return (\n <p className={disclosure({ className })}>\n {words.protectedBy} · <a className={link()} href={privacyHref} target=\"_blank\" rel=\"noopener noreferrer\">{words.privacy}</a> ·{\" \"}\n <a className={link()} href={termsHref} target=\"_blank\" rel=\"noopener noreferrer\">{words.terms}</a>\n </p>\n );\n}\n","/** The words of `Captcha` and `CaptchaDisclosure`, English and French. Pass `labels` to say them otherwise. */\nexport interface CaptchaLabels {\n /** The accessible name of the check (the group around the widget). */\n readonly group: string;\n /** Said when Cloudflare could not run the check. */\n readonly error: string;\n /** The retry button. */\n readonly retry: string;\n /** « Protected by Cloudflare Turnstile ». */\n readonly protectedBy: string;\n readonly privacy: string;\n readonly terms: string;\n}\n\nexport const captchaMessages = {\n en: {\n group: \"Security check\",\n error: \"The security check could not run. Check your connection and try again.\",\n retry: \"Try again\",\n protectedBy: \"Protected by Cloudflare Turnstile\",\n privacy: \"Privacy\",\n terms: \"Terms\",\n },\n fr: {\n group: \"Vérification de sécurité\",\n error: \"La vérification de sécurité n'a pas pu s'exécuter. Vérifiez votre connexion et réessayez.\",\n retry: \"Réessayer\",\n protectedBy: \"Protégé par Cloudflare Turnstile\",\n privacy: \"Confidentialité\",\n terms: \"Conditions\",\n },\n} as const satisfies Record<string, CaptchaLabels>;\n\nexport type CaptchaLocale = keyof typeof captchaMessages;\n\nexport const labelsFor = (locale: string | undefined, labels?: Partial<CaptchaLabels>): CaptchaLabels => ({\n ...captchaMessages[locale?.toLowerCase().startsWith(\"fr\") ? \"fr\" : \"en\"],\n ...labels,\n});\n","/** The Cloudflare Turnstile browser API, loaded once, on demand. */\nexport interface TurnstileApi {\n render(el: HTMLElement, options: Record<string, unknown>): string;\n remove(id: string): void;\n reset(id: string): void;\n}\ndeclare global {\n interface Window {\n turnstile?: TurnstileApi;\n }\n}\n\nexport const TURNSTILE_SCRIPT = \"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit\";\nexport const TURNSTILE_PRIVACY = \"https://www.cloudflare.com/privacypolicy/\";\nexport const TURNSTILE_TERMS = \"https://www.cloudflare.com/website-terms/\";\n\nlet loading: Promise<TurnstileApi> | null = null;\n\nexport function loadTurnstile(): Promise<TurnstileApi> {\n if (window.turnstile) return Promise.resolve(window.turnstile);\n loading ??= new Promise<TurnstileApi>((resolve, reject) => {\n const s = document.createElement(\"script\");\n s.src = TURNSTILE_SCRIPT;\n s.async = true;\n s.onload = () => (window.turnstile ? resolve(window.turnstile) : reject(new Error(\"turnstile\")));\n s.onerror = () => {\n loading = null;\n reject(new Error(\"turnstile\"));\n };\n try {\n document.head.appendChild(s);\n } catch {\n loading = null;\n reject(new Error(\"turnstile\"));\n }\n });\n return loading;\n}\n\n/** The page's theme: `html.light` or `data-theme=\"light\"` is light, anything else dark. */\nexport function pageTheme(): \"light\" | \"dark\" {\n const root = document.documentElement;\n return root.classList.contains(\"light\") || root.dataset.theme === \"light\" ? \"light\" : \"dark\";\n}\n"],"mappings":";;;;;;;;;AACA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,SAAS,UAAU;;;ACYZ,IAAM,kBAAkB;AAAA,EAC7B,IAAI;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AACF;AAIO,IAAM,YAAY,CAAC,QAA4B,YAAoD;AAAA,EACxG,GAAG,gBAAgB,QAAQ,YAAY,EAAE,WAAW,IAAI,IAAI,OAAO,IAAI;AAAA,EACvE,GAAG;AACL;;;AC1BO,IAAM,mBAAmB;AACzB,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAE/B,IAAI,UAAwC;AAErC,SAAS,gBAAuC;AACrD,MAAI,OAAO,UAAW,QAAO,QAAQ,QAAQ,OAAO,SAAS;AAC7D,cAAY,IAAI,QAAsB,CAAC,SAAS,WAAW;AACzD,UAAM,IAAI,SAAS,cAAc,QAAQ;AACzC,MAAE,MAAM;AACR,MAAE,QAAQ;AACV,MAAE,SAAS,MAAO,OAAO,YAAY,QAAQ,OAAO,SAAS,IAAI,OAAO,IAAI,MAAM,WAAW,CAAC;AAC9F,MAAE,UAAU,MAAM;AAChB,gBAAU;AACV,aAAO,IAAI,MAAM,WAAW,CAAC;AAAA,IAC/B;AACA,QAAI;AACF,eAAS,KAAK,YAAY,CAAC;AAAA,IAC7B,QAAQ;AACN,gBAAU;AACV,aAAO,IAAI,MAAM,WAAW,CAAC;AAAA,IA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BAAC,SAAI,WAAW,eAAe,CAAC,SAAS,MAAM,IAAI,QAAW,QAAQ,QAAQ,OAAO,cAAc,SAAY,EAAE,QAAQ,GAAG,UAAU,SAAS,GAC7I,8BAAC,SAAI,KAAK,MAAM,GAClB;AAAA,KACF;AAEJ;AAmBO,SAAS,kBAAkB,EAAE,SAAS,MAAM,QAAQ,cAAc,mBAAmB,YAAY,iBAAiB,UAAU,GAA2B;AAC5J,QAAM,QAAQ,UAAU,QAAQ,MAAM;AACtC,QAAM,EAAE,YAAY,KAAK,IAAI,QAAQ;AACrC,SACE,qBAAC,OAAE,WAAW,WAAW,EAAE,UAAU,CAAC,GACnC;AAAA,UAAM;AAAA,IAAY;AAAA,IAAG,oBAAC,OAAE,WAAW,KAAK,GAAG,MAAM,aAAa,QAAO,UAAS,KAAI,uBAAuB,gBAAM,SAAQ;AAAA,IAAI;AAAA,IAAG;AAAA,IAC/H,oBAAC,OAAE,WAAW,KAAK,GAAG,MAAM,WAAW,QAAO,UAAS,KAAI,uBAAuB,gBAAM,OAAM;AAAA,KAChG;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/captcha/captcha.tsx","../src/captcha/messages.ts","../src/captcha/turnstile.ts"],"sourcesContent":["// Client: loads the Cloudflare script and draws the widget in an effect.\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Button } from \"../button\";\nimport { type CaptchaLabels, labelsFor } from \"./messages\";\nimport { loadTurnstile, pageTheme, TURNSTILE_PRIVACY, TURNSTILE_TERMS } from \"./turnstile\";\n\nconst captcha = tv({\n slots: {\n root: \"w-full\",\n frame: \"overflow-hidden rounded-lg border border-border-default bg-surface-2 p-2\",\n error: \"flex flex-wrap items-center gap-3 rounded-lg border border-border-default bg-surface-2 p-3 text-sm text-fg-danger\",\n disclosure: \"text-xs text-fg-muted\",\n link: \"underline underline-offset-2 hover:text-fg-secondary focus-visible:rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2\",\n },\n});\n\nexport type CaptchaProps = {\n /** The widget's public site key. Empty → nothing is rendered and no token is asked (local dev, tests). */\n siteKey: string;\n /** The token once the check passes; `null` when it expires, fails or the theme redraws the widget. */\n onToken: (token: string | null) => void;\n /**\n * The language of the widget and of the words: `\"en\"`, `\"fr\"`…\n * @default \"en\"\n */\n locale?: string;\n /**\n * `auto` follows the page (`html.light` / `data-theme`, redrawn when it flips).\n * @default \"auto\"\n */\n theme?: \"auto\" | \"light\" | \"dark\";\n /** Words to say otherwise; the rest comes from the locale. */\n labels?: Partial<CaptchaLabels>;\n /** Classes added to the root. */\n className?: string;\n};\n\n/**\n * The bot check of a public form, Cloudflare Turnstile that stays out of the way: managed mode with\n * `appearance: \"interaction-only\"`, so a normal visitor sees nothing — the check runs in the background and `onToken`\n * fires. Only when Cloudflare needs the visitor does a framed box appear, on the tokens (radius, border, theme).\n * If the check cannot run, an alert with a retry button replaces it. Pair it with `CaptchaDisclosure` under the submit.\n */\nexport function Captcha({ siteKey, onToken, locale = \"en\", theme = \"auto\", labels, className }: CaptchaProps) {\n const host = useRef<HTMLDivElement>(null);\n const widget = useRef<string | null>(null);\n const onTokenRef = useRef(onToken);\n useEffect(() => {\n onTokenRef.current = onToken;\n });\n const [interactive, setInteractive] = useState(false);\n const [failed, setFailed] = useState(false);\n const [attempt, setAttempt] = useState(0);\n const words = labelsFor(locale, labels);\n const { root, frame, error } = captcha();\n\n useEffect(() => {\n if (!siteKey || !host.current) return;\n const el = host.current;\n let cancelled = false;\n const fail = () => {\n onTokenRef.current(null);\n setInteractive(false);\n setFailed(true);\n };\n const mount = () => {\n loadTurnstile().then((api) => {\n if (cancelled) return;\n if (widget.current) api.remove(widget.current);\n widget.current = api.render(el, {\n sitekey: siteKey,\n appearance: \"interaction-only\",\n size: \"flexible\",\n theme: theme === \"auto\" ? pageTheme() : theme,\n language: locale,\n callback: (token: string) => {\n setFailed(false);\n onTokenRef.current(token);\n },\n \"expired-callback\": () => onTokenRef.current(null),\n \"before-interactive-callback\": () => setInteractive(true),\n \"after-interactive-callback\": () => setInteractive(false),\n \"error-callback\": fail,\n \"unsupported-callback\": fail,\n });\n }, fail);\n };\n setFailed(false);\n mount();\n const watcher = theme === \"auto\" ? new MutationObserver(() => { onTokenRef.current(null); mount(); }) : null;\n watcher?.observe(document.documentElement, { attributes: true, attributeFilter: [\"class\", \"data-theme\"] });\n return () => {\n cancelled = true;\n watcher?.disconnect();\n if (widget.current && window.turnstile) window.turnstile.remove(widget.current);\n widget.current = null;\n };\n }, [siteKey, locale, theme, attempt]);\n\n const retry = useCallback(() => setAttempt((n) => n + 1), []);\n\n if (!siteKey) return null;\n return (\n <div className={root({ className })} role=\"group\" aria-label={words.group} data-captcha={failed ? \"error\" : interactive ? \"interactive\" : \"idle\"}>\n {failed ? (\n <div role=\"alert\" className={error()}>\n <span>{words.error}</span>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={retry}>\n {words.retry}\n </Button>\n </div>\n ) : null}\n {/* Always mounted (Cloudflare draws into it); framed and visible only when a challenge needs the visitor. */}\n <div className={interactive && !failed ? frame() : undefined} hidden={failed} style={interactive ? undefined : { height: 0, overflow: \"hidden\" }}>\n <div ref={host} />\n </div>\n </div>\n );\n}\n\nexport type CaptchaDisclosureProps = {\n /**\n * The language of the line: `\"en\"`, `\"fr\"`…\n * @default \"en\"\n */\n locale?: string;\n /** Words to say otherwise; the rest comes from the locale. */\n labels?: Partial<CaptchaLabels>;\n /** The privacy link; Cloudflare's privacy policy by default. */\n privacyHref?: string;\n /** The terms link; Cloudflare's website terms by default. */\n termsHref?: string;\n /** Classes added to the root. */\n className?: string;\n};\n\n/** « Protected by Cloudflare Turnstile · Privacy · Terms »: the line Cloudflare's terms ask for under the submit button. */\nexport function CaptchaDisclosure({ locale = \"en\", labels, privacyHref = TURNSTILE_PRIVACY, termsHref = TURNSTILE_TERMS, className }: CaptchaDisclosureProps) {\n const words = labelsFor(locale, labels);\n const { disclosure, link } = captcha();\n return (\n <p className={disclosure({ className })}>\n {words.protectedBy} · <a className={link()} href={privacyHref} target=\"_blank\" rel=\"noopener noreferrer\">{words.privacy}</a> ·{\" \"}\n <a className={link()} href={termsHref} target=\"_blank\" rel=\"noopener noreferrer\">{words.terms}</a>\n </p>\n );\n}\n","/** The words of `Captcha` and `CaptchaDisclosure`, English and French. Pass `labels` to say them otherwise. */\nexport interface CaptchaLabels {\n /** The accessible name of the check (the group around the widget). */\n readonly group: string;\n /** Said when Cloudflare could not run the check. */\n readonly error: string;\n /** The retry button. */\n readonly retry: string;\n /** « Protected by Cloudflare Turnstile ». */\n readonly protectedBy: string;\n readonly privacy: string;\n readonly terms: string;\n}\n\nexport const captchaMessages = {\n en: {\n group: \"Security check\",\n error: \"The security check could not run. Check your connection and try again.\",\n retry: \"Try again\",\n protectedBy: \"Protected by Cloudflare Turnstile\",\n privacy: \"Privacy\",\n terms: \"Terms\",\n },\n fr: {\n group: \"Vérification de sécurité\",\n error: \"La vérification de sécurité n'a pas pu s'exécuter. Vérifiez votre connexion et réessayez.\",\n retry: \"Réessayer\",\n protectedBy: \"Protégé par Cloudflare Turnstile\",\n privacy: \"Confidentialité\",\n terms: \"Conditions\",\n },\n} as const satisfies Record<string, CaptchaLabels>;\n\nexport type CaptchaLocale = keyof typeof captchaMessages;\n\nexport const labelsFor = (locale: string | undefined, labels?: Partial<CaptchaLabels>): CaptchaLabels => ({\n ...captchaMessages[locale?.toLowerCase().startsWith(\"fr\") ? \"fr\" : \"en\"],\n ...labels,\n});\n","/** The Cloudflare Turnstile browser API, loaded once, on demand. */\nexport interface TurnstileApi {\n render(el: HTMLElement, options: Record<string, unknown>): string;\n remove(id: string): void;\n reset(id: string): void;\n}\ndeclare global {\n interface Window {\n turnstile?: TurnstileApi;\n }\n}\n\nexport const TURNSTILE_SCRIPT = \"https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit\";\nexport const TURNSTILE_PRIVACY = \"https://www.cloudflare.com/privacypolicy/\";\nexport const TURNSTILE_TERMS = \"https://www.cloudflare.com/website-terms/\";\n\nlet loading: Promise<TurnstileApi> | null = null;\n\nexport function loadTurnstile(): Promise<TurnstileApi> {\n if (window.turnstile) return Promise.resolve(window.turnstile);\n loading ??= new Promise<TurnstileApi>((resolve, reject) => {\n const s = document.createElement(\"script\");\n s.src = TURNSTILE_SCRIPT;\n s.async = true;\n s.onload = () => (window.turnstile ? resolve(window.turnstile) : reject(new Error(\"turnstile\")));\n s.onerror = () => {\n loading = null;\n reject(new Error(\"turnstile\"));\n };\n try {\n document.head.appendChild(s);\n } catch {\n loading = null;\n reject(new Error(\"turnstile\"));\n }\n });\n return loading;\n}\n\n/** The page's theme: `html.light` or `data-theme=\"light\"` is light, anything else dark. */\nexport function pageTheme(): \"light\" | \"dark\" {\n const root = document.documentElement;\n return root.classList.contains(\"light\") || root.dataset.theme === \"light\" ? \"light\" : \"dark\";\n}\n"],"mappings":";;;;;;;;;;AACA,SAAS,aAAa,WAAW,QAAQ,gBAAgB;AACzD,SAAS,UAAU;;;ACYZ,IAAM,kBAAkB;AAAA,EAC7B,IAAI;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,OAAO;AAAA,EACT;AACF;AAIO,IAAM,YAAY,CAAC,QAA4B,YAAoD;AAAA,EACxG,GAAG,gBAAgB,QAAQ,YAAY,EAAE,WAAW,IAAI,IAAI,OAAO,IAAI;AAAA,EACvE,GAAG;AACL;;;AC1BO,IAAM,mBAAmB;AACzB,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAE/B,IAAI,UAAwC;AAErC,SAAS,gBAAuC;AACrD,MAAI,OAAO,UAAW,QAAO,QAAQ,QAAQ,OAAO,SAAS;AAC7D,cAAY,IAAI,QAAsB,C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G,CAAC,CAAC;AAE5D,MAAI,CAAC,QAAS,QAAO;AACrB,SACE,qBAAC,SAAI,WAAW,KAAK,EAAE,UAAU,CAAC,GAAG,MAAK,SAAQ,cAAY,MAAM,OAAO,gBAAc,SAAS,UAAU,cAAc,gBAAgB,QACvI;AAAA,aACC,qBAAC,SAAI,MAAK,SAAQ,WAAW,MAAM,GACjC;AAAA,0BAAC,UAAM,gBAAM,OAAM;AAAA,MACnB,oBAAC,UAAO,MAAK,UAAS,MAAK,MAAK,SAAQ,aAAY,SAAS,OAC1D,gBAAM,OACT;AAAA,OACF,IACE;AAAA,IAEJ,oBAAC,SAAI,WAAW,eAAe,CAAC,SAAS,MAAM,IAAI,QAAW,QAAQ,QAAQ,OAAO,cAAc,SAAY,EAAE,QAAQ,GAAG,UAAU,SAAS,GAC7I,8BAAC,SAAI,KAAK,MAAM,GAClB;AAAA,KACF;AAEJ;AAmBO,SAAS,kBAAkB,EAAE,SAAS,MAAM,QAAQ,cAAc,mBAAmB,YAAY,iBAAiB,UAAU,GAA2B;AAC5J,QAAM,QAAQ,UAAU,QAAQ,MAAM;AACtC,QAAM,EAAE,YAAY,KAAK,IAAI,QAAQ;AACrC,SACE,qBAAC,OAAE,WAAW,WAAW,EAAE,UAAU,CAAC,GACnC;AAAA,UAAM;AAAA,IAAY;AAAA,IAAG,oBAAC,OAAE,WAAW,KAAK,GAAG,MAAM,aAAa,QAAO,UAAS,KAAI,uBAAuB,gBAAM,SAAQ;AAAA,IAAI;AAAA,IAAG;AAAA,IAC/H,oBAAC,OAAE,WAAW,KAAK,GAAG,MAAM,WAAW,QAAO,UAAS,KAAI,uBAAuB,gBAAM,OAAM;AAAA,KAChG;AAEJ;","names":[]}
@@ -54,4 +54,5 @@ type CardGridProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
54
54
  /** A responsive grid of cards: equal rows, a staggered reveal. */
55
55
  declare function CardGrid({ children, min, fit, align, reveal, columns, light: _light, as: Tag, foundation, foundationPosition, foundationLabel, hover: _hover, className, style, ...props }: CardGridProps): React.JSX.Element;
56
56
 
57
- export { CardGrid, type CardGridProps };
57
+ export { CardGrid };
58
+ export type { CardGridProps };
package/dist/card.d.ts CHANGED
@@ -253,4 +253,5 @@ declare const Card: {
253
253
  Footer: typeof CardFooter;
254
254
  };
255
255
 
256
- export { Card, CardBody, type CardBodyProps, CardDescription, CardFooter, CardImage, type CardImageProps, CardMedia, type CardMediaProps, CardOverlay, type CardOverlayProps, CardRoot, type CardRootProps, CardStat, type CardStatProps, CardTitle, type CardTitleProps, card };
256
+ export { Card, CardBody, CardDescription, CardFooter, CardImage, CardMedia, CardOverlay, CardRoot, CardStat, CardTitle, card };
257
+ export type { CardBodyProps, CardImageProps, CardMediaProps, CardOverlayProps, CardRootProps, CardStatProps, CardTitleProps };
@@ -1,6 +1,79 @@
1
1
  import { LinkComponent } from '@krizaka/ui/page-hero';
2
2
  import * as React from 'react';
3
3
 
4
+ interface MeterPart {
5
+ /** Its name (“To the creator”) — passed translated. */
6
+ label: string;
7
+ /** Its value, in the meter's unit. */
8
+ value: number;
9
+ /** Its value in words (“€9.00”), in the legend and for assistive technology; default: its percentage. */
10
+ valueText?: string;
11
+ }
12
+ interface MeterThresholds {
13
+ readonly low: number;
14
+ readonly high: number;
15
+ }
16
+
17
+ type MeterProps = Omit<React.ComponentProps<"div">, "children"> & {
18
+ /** The accessible name (“Storage”, “Split of a tip”) — passed translated; shown with `showLabel`. */
19
+ label: string;
20
+ /** The value, between `min` and `max` (ignored with `parts`). */
21
+ value?: number;
22
+ /**
23
+ * The bottom of the range.
24
+ * @default 0
25
+ */
26
+ min?: number;
27
+ /**
28
+ * The top of the range.
29
+ * @default 100
30
+ */
31
+ max?: number;
32
+ /** The value in words (“42 GB of 50 GB”) — passed translated; default: the percentage. */
33
+ valueText?: string;
34
+ /**
35
+ * Ratios (0–1) where the tone changes: past `high` it is in danger, past `low` in warning — or the reverse with
36
+ * `optimum="high"` (a balance: the lower, the worse). Without thresholds the fill is the brand accent.
37
+ */
38
+ thresholds?: MeterThresholds;
39
+ /**
40
+ * Which end is good.
41
+ * @default "low"
42
+ */
43
+ optimum?: "low" | "high";
44
+ /** Split into parts that add up to `max`: a stacked bar or ring, with its legend. */
45
+ parts?: readonly MeterPart[];
46
+ /**
47
+ * bar · ring.
48
+ * @default "bar"
49
+ */
50
+ variant?: "bar" | "ring";
51
+ /**
52
+ * sm · md · lg: the bar's thickness, the ring's diameter.
53
+ * @default "md"
54
+ */
55
+ size?: "sm" | "md" | "lg";
56
+ /** Shows the label and the value above the bar. */
57
+ showLabel?: boolean;
58
+ /** A ring's centre: the value, a word. */
59
+ children?: React.ReactNode;
60
+ };
61
+
62
+ type PlanFigure = {
63
+ id: string;
64
+ label: string;
65
+ value: React.ReactNode;
66
+ };
67
+ type PlanStripProps = Omit<React.ComponentProps<"section">, "children"> & {
68
+ /** Names the strip (`Your plan`). */
69
+ label: string;
70
+ /** Two or three figures (`12 clients`, `3 invoices to send`). */
71
+ figures: readonly PlanFigure[];
72
+ /** The measure of the plan beside them (`Meter`): clients used of the plan, storage. */
73
+ meter?: MeterProps;
74
+ };
75
+ /** The plan strip of a catalogue: two or three figures and a `Meter` — where the account stands, at a glance. */
76
+ declare function PlanStrip({ label, figures, meter, className, ...props }: PlanStripProps): React.JSX.Element;
4
77
  type CataloguePageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
5
78
  /** The way back. */
6
79
  back?: {
@@ -19,6 +92,12 @@ type CataloguePageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
19
92
  filters: React.ReactNode;
20
93
  /** On a phone, the words that open the filters (`Filters`). */
21
94
  filtersLabel: string;
95
+ /** Above the results: the plan strip (`PlanStrip`) — where the account stands. */
96
+ plan?: React.ReactNode;
97
+ /** Above the count: the binder dividers (tabs of the shelves: all · active · archived). */
98
+ dividers?: React.ReactNode;
99
+ /** After the results (the bar docks itself at the bottom edge): the selection bar (`SelectionBar`, `DataTable bulkActions`). */
100
+ selection?: React.ReactNode;
22
101
  /** What matches, in words (`24 components`). */
23
102
  count?: React.ReactNode;
24
103
  /** On the right of the count: the sort, a view switch. */
@@ -34,6 +113,7 @@ type CataloguePageProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
34
113
  railFrom?: "default" | "wide";
35
114
  };
36
115
  /** A catalogue: hero, sticky filters beside the results (folded on a phone), the count, the results. */
37
- declare function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, count, toolbar, linkAs, railFrom, children, ...props }: CataloguePageProps): React.JSX.Element;
116
+ declare function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, plan, dividers, selection, count, toolbar, linkAs, railFrom, children, ...props }: CataloguePageProps): React.JSX.Element;
38
117
 
39
- export { CataloguePage, type CataloguePageProps };
118
+ export { CataloguePage, PlanStrip };
119
+ export type { CataloguePageProps, PlanFigure, PlanStripProps };
@@ -1,26 +1,169 @@
1
1
  // src/catalogue-page/catalogue-page.tsx
2
2
  import { Page } from "@krizaka/ui/page";
3
3
  import { PageHero } from "@krizaka/ui/page-hero";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, count, toolbar, linkAs, railFrom = "default", children, ...props }) {
6
- return /* @__PURE__ */ jsxs("div", { ...props, children: [
7
- /* @__PURE__ */ jsx(PageHero, { back, linkAs, eyebrow, title, lead, backdrop: "plain", children: search }),
8
- /* @__PURE__ */ jsx(Page, { className: "kz-tpl-catalogue-frame", children: /* @__PURE__ */ jsxs("div", { className: "kz-tpl-catalogue", "data-rail": railFrom, children: [
9
- /* @__PURE__ */ jsxs("details", { className: "kz-tpl-catalogue-filters", open: true, children: [
10
- /* @__PURE__ */ jsx("summary", { children: filtersLabel }),
11
- /* @__PURE__ */ jsx("div", { children: filters })
4
+ import { tv as tv2 } from "tailwind-variants";
5
+
6
+ // src/meter/meter.tsx
7
+ import { tv } from "tailwind-variants";
8
+
9
+ // src/meter/model.ts
10
+ var MeterOptimum = { Low: "low", High: "high" };
11
+ var MeterLevel = { Ok: "ok", Success: "success", Warning: "warning", Danger: "danger" };
12
+ var clamp01 = (n) => Math.min(1, Math.max(0, n));
13
+ var percent = (ratio) => `${Math.round(ratio * 100)} %`;
14
+ function levelOf(ratio, thresholds, optimum) {
15
+ if (!thresholds) return MeterLevel.Ok;
16
+ const good = optimum === MeterOptimum.Low ? MeterLevel.Success : MeterLevel.Danger;
17
+ const bad = optimum === MeterOptimum.Low ? MeterLevel.Danger : MeterLevel.Success;
18
+ if (ratio >= thresholds.high) return bad;
19
+ return ratio >= thresholds.low ? MeterLevel.Warning : good;
20
+ }
21
+ function meterModel({ value = 0, min = 0, max = 100, valueText, thresholds, optimum = MeterOptimum.Low, parts }) {
22
+ const span = max - min || 1;
23
+ const ratio = clamp01((value - min) / span);
24
+ const shares = (parts ?? []).map((p, i) => ({ ...p, i, ratio: clamp01(p.value / span), words: p.valueText ?? percent(p.value / span) }));
25
+ let start = 0;
26
+ const arcs = parts ? shares.map((p) => {
27
+ const arc = { part: p.i, len: p.ratio, start };
28
+ start += p.ratio;
29
+ return arc;
30
+ }) : [{ part: void 0, len: ratio, start: 0 }];
31
+ return { ratio, level: levelOf(ratio, thresholds, optimum), words: valueText ?? percent(ratio), shares, arcs };
32
+ }
33
+
34
+ // src/meter/meter.tsx
35
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
36
+ var meter = tv({
37
+ slots: {
38
+ root: "flex w-full flex-col gap-1.5",
39
+ header: "flex items-baseline gap-2 text-xs",
40
+ caption: "min-w-0 flex-1 truncate font-medium text-fg",
41
+ figure: "shrink-0 tabular-nums text-fg-secondary",
42
+ track: "relative flex h-2 w-full gap-0.5 overflow-hidden rounded-sm bg-surface-3",
43
+ fill: "h-full rounded-sm transition-[width] duration-700 motion-reduce:transition-none",
44
+ legend: "mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary",
45
+ swatch: "inline-block h-2 w-2 shrink-0 rounded-full",
46
+ ring: "relative inline-flex shrink-0 items-center justify-center",
47
+ center: "absolute inset-0 flex flex-col items-center justify-center text-center"
48
+ },
49
+ variants: {
50
+ size: { sm: { track: "h-1.5", ring: "h-14 w-14" }, md: { ring: "h-24 w-24" }, lg: { track: "h-3", ring: "h-36 w-36" } }
51
+ },
52
+ defaultVariants: { size: "md" }
53
+ });
54
+ var BG = { ok: "bg-accent", success: "bg-success", warning: "bg-warning", danger: "bg-danger" };
55
+ var STROKE = { ok: "stroke-accent", success: "stroke-success", warning: "stroke-warning", danger: "stroke-danger" };
56
+ var PART_BG = ["bg-accent", "bg-fg-secondary", "bg-accent-2", "bg-border-strong"];
57
+ var PART_STROKE = ["stroke-accent", "stroke-fg-secondary", "stroke-accent-2", "stroke-border-strong"];
58
+ function Meter({
59
+ label,
60
+ value = 0,
61
+ min = 0,
62
+ max = 100,
63
+ valueText,
64
+ thresholds,
65
+ optimum = "low",
66
+ parts,
67
+ variant = "bar",
68
+ size = "md",
69
+ showLabel,
70
+ className,
71
+ children,
72
+ ...props
73
+ }) {
74
+ const s = meter({ size });
75
+ const { ratio, level, words, shares, arcs } = meterModel({ value, min, max, valueText, thresholds, optimum, parts });
76
+ const a11y = parts ? { role: "group", "aria-label": label } : { role: "meter", "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": Math.min(max, Math.max(min, value)), "aria-valuetext": words };
77
+ const legend = parts && /* @__PURE__ */ jsx("ul", { className: s.legend(), children: shares.map((p) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
78
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: [s.swatch(), PART_BG[p.i % PART_BG.length]].join(" ") }),
79
+ /* @__PURE__ */ jsx("span", { className: "text-fg", children: p.label }),
80
+ /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: p.words })
81
+ ] }, p.i)) });
82
+ if (variant === "ring") {
83
+ const r = 44;
84
+ return /* @__PURE__ */ jsxs("div", { ...a11y, "data-level": parts ? void 0 : level, className: ["inline-flex flex-col items-center gap-2", className].filter(Boolean).join(" "), ...props, children: [
85
+ /* @__PURE__ */ jsxs("div", { className: s.ring(), children: [
86
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", "aria-hidden": true, children: [
87
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r, fill: "none", strokeWidth: "9", className: "stroke-border-default" }),
88
+ arcs.map((arc, i) => {
89
+ const length = Math.max(0, arc.len * 100 - (parts ? 1 : 0));
90
+ return /* @__PURE__ */ jsx(
91
+ "circle",
92
+ {
93
+ cx: "50",
94
+ cy: "50",
95
+ r,
96
+ fill: "none",
97
+ strokeWidth: "9",
98
+ pathLength: 100,
99
+ strokeDasharray: `${length} ${100 - length}`,
100
+ strokeDashoffset: -arc.start * 100,
101
+ className: [arc.part === void 0 ? STROKE[level] : PART_STROKE[arc.part % PART_STROKE.length], "transition-[stroke-dasharray] duration-700 motion-reduce:transition-none"].join(" ")
102
+ },
103
+ i
104
+ );
105
+ })
106
+ ] }),
107
+ children !== void 0 && /* @__PURE__ */ jsx("div", { className: s.center(), children })
108
+ ] }),
109
+ legend
110
+ ] });
111
+ }
112
+ return /* @__PURE__ */ jsxs("div", { ...a11y, "data-level": parts ? void 0 : level, className: s.root({ className }), ...props, children: [
113
+ showLabel && /* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: s.header(), children: [
114
+ /* @__PURE__ */ jsx("span", { className: s.caption(), children: label }),
115
+ !parts && /* @__PURE__ */ jsx("span", { className: s.figure(), children: words })
116
+ ] }),
117
+ /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: s.track(), children: parts ? shares.map((p) => /* @__PURE__ */ jsx("span", { className: [s.fill(), PART_BG[p.i % PART_BG.length]].join(" "), style: { width: `${p.ratio * 100}%` } }, p.i)) : /* @__PURE__ */ jsx("span", { className: [s.fill(), BG[level]].join(" "), style: { width: `${ratio * 100}%` } }) }),
118
+ legend
119
+ ] });
120
+ }
121
+
122
+ // src/catalogue-page/catalogue-page.tsx
123
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
124
+ var plan = tv2({
125
+ slots: {
126
+ root: "mb-4 flex flex-wrap items-center gap-x-8 gap-y-3 rounded-xl border border-border-default bg-surface-1 p-4",
127
+ figures: "m-0 flex min-w-0 flex-wrap gap-x-8 gap-y-2",
128
+ figure: "flex min-w-0 flex-col",
129
+ value: "font-display text-2xl font-extrabold tabular-nums text-fg",
130
+ label: "text-xs text-fg-secondary",
131
+ meter: "min-w-40 flex-1"
132
+ }
133
+ });
134
+ function PlanStrip({ label, figures, meter: meter2, className, ...props }) {
135
+ const p = plan();
136
+ return /* @__PURE__ */ jsxs2("section", { "aria-label": label, className: p.root({ className }), ...props, children: [
137
+ /* @__PURE__ */ jsx2("dl", { className: p.figures(), children: figures.slice(0, 3).map((f) => /* @__PURE__ */ jsxs2("div", { className: p.figure(), children: [
138
+ /* @__PURE__ */ jsx2("dd", { className: p.value(), children: f.value }),
139
+ /* @__PURE__ */ jsx2("dt", { className: p.label(), children: f.label })
140
+ ] }, f.id)) }),
141
+ meter2 && /* @__PURE__ */ jsx2(Meter, { ...meter2, className: p.meter({ className: meter2.className }) })
142
+ ] });
143
+ }
144
+ function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, plan: plan2, dividers, selection, count, toolbar, linkAs, railFrom = "default", children, ...props }) {
145
+ return /* @__PURE__ */ jsxs2("div", { ...props, children: [
146
+ /* @__PURE__ */ jsx2(PageHero, { back, linkAs, eyebrow, title, lead, backdrop: "plain", children: search }),
147
+ /* @__PURE__ */ jsx2(Page, { className: "kz-tpl-catalogue-frame", children: /* @__PURE__ */ jsxs2("div", { className: "kz-tpl-catalogue", "data-rail": railFrom, children: [
148
+ /* @__PURE__ */ jsxs2("details", { className: "kz-tpl-catalogue-filters", open: true, children: [
149
+ /* @__PURE__ */ jsx2("summary", { children: filtersLabel }),
150
+ /* @__PURE__ */ jsx2("div", { children: filters })
12
151
  ] }),
13
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
14
- (count || toolbar) && /* @__PURE__ */ jsxs("div", { className: "kz-tpl-catalogue-head", children: [
15
- count && /* @__PURE__ */ jsx("p", { className: "kz-tpl-count", "aria-live": "polite", children: count }),
152
+ /* @__PURE__ */ jsxs2("div", { className: "min-w-0", children: [
153
+ plan2,
154
+ dividers,
155
+ (count || toolbar) && /* @__PURE__ */ jsxs2("div", { className: "kz-tpl-catalogue-head", children: [
156
+ count && /* @__PURE__ */ jsx2("p", { className: "kz-tpl-count", "aria-live": "polite", children: count }),
16
157
  toolbar
17
158
  ] }),
18
- children
159
+ children,
160
+ selection && /* @__PURE__ */ jsx2("div", { className: "mt-3", children: selection })
19
161
  ] })
20
162
  ] }) })
21
163
  ] });
22
164
  }
23
165
  export {
24
- CataloguePage
166
+ CataloguePage,
167
+ PlanStrip
25
168
  };
26
169
  //# sourceMappingURL=catalogue-page.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/catalogue-page/catalogue-page.tsx"],"sourcesContent":["// Server-safe. A catalogue or an index (blocks.css `.kz-tpl-catalogue`): the hero, then the filters in a sticky column\n// beside the results — folded into a disclosure above them on a phone — the count of what matches and the sort, and\n// the results (a CardGrid of LinkCards, a list). The filters live in the address: a link per choice, no client state.\nimport { Page } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nexport type CataloguePageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** In the hero: a search field. */\n search?: React.ReactNode;\n /** The filters (groups of ChipLinks, a FilterBar): sticky on a desktop. */\n filters: React.ReactNode;\n /** On a phone, the words that open the filters (`Filters`). */\n filtersLabel: string;\n /** What matches, in words (`24 components`). */\n count?: React.ReactNode;\n /** On the right of the count: the sort, a view switch. */\n toolbar?: React.ReactNode;\n /** The results: a CardGrid, a list, an empty state. */\n children: React.ReactNode;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n /**\n * From which window width the filters stay in their column beside the results. `default`: 900 px and above. `wide`:\n * 1280 px and above — a wide table (DataTable) needs the room; under it the filters are a bar above the results.\n */\n railFrom?: \"default\" | \"wide\";\n};\n\n/** A catalogue: hero, sticky filters beside the results (folded on a phone), the count, the results. */\nexport function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, count, toolbar, linkAs, railFrom = \"default\", children, ...props }: CataloguePageProps) {\n return (\n <div {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} backdrop=\"plain\">\n {search}\n </PageHero>\n <Page className=\"kz-tpl-catalogue-frame\">\n <div className=\"kz-tpl-catalogue\" data-rail={railFrom}>\n <details className=\"kz-tpl-catalogue-filters\" open>\n <summary>{filtersLabel}</summary>\n <div>{filters}</div>\n </details>\n <div className=\"min-w-0\">\n {(count || toolbar) && (\n <div className=\"kz-tpl-catalogue-head\">\n {count && (\n <p className=\"kz-tpl-count\" aria-live=\"polite\">\n {count}\n </p>\n )}\n {toolbar}\n </div>\n )}\n {children}\n </div>\n </div>\n </Page>\n </div>\n );\n}\n"],"mappings":";AAGA,SAAS,YAAY;AAErB,SAAS,gBAAgB;AAqCnB,cAKI,YALJ;AAHC,SAAS,cAAc,EAAE,MAAM,SAAS,OAAO,MAAM,QAAQ,SAAS,cAAc,OAAO,SAAS,QAAQ,WAAW,WAAW,UAAU,GAAG,MAAM,GAAuB;AACjL,SACE,qBAAC,SAAK,GAAG,OACP;AAAA,wBAAC,YAAS,MAAY,QAAgB,SAAkB,OAAc,MAAY,UAAS,SACxF,kBACH;AAAA,IACA,oBAAC,QAAK,WAAU,0BACd,+BAAC,SAAI,WAAU,oBAAmB,aAAW,UAC3C;AAAA,2BAAC,aAAQ,WAAU,4BAA2B,MAAI,MAChD;AAAA,4BAAC,aAAS,wBAAa;AAAA,QACvB,oBAAC,SAAK,mBAAQ;AAAA,SAChB;AAAA,MACA,qBAAC,SAAI,WAAU,WACX;AAAA,kBAAS,YACT,qBAAC,SAAI,WAAU,yBACZ;AAAA,mBACC,oBAAC,OAAE,WAAU,gBAAe,aAAU,UACnC,iBACH;AAAA,UAED;AAAA,WACH;AAAA,QAED;AAAA,SACH;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/catalogue-page/catalogue-page.tsx","../src/meter/meter.tsx","../src/meter/model.ts"],"sourcesContent":["// Server-safe. A catalogue or an index (blocks.css `.kz-tpl-catalogue`): the hero, then the filters in a sticky column\n// beside the results — folded into a disclosure above them on a phone — the count of what matches and the sort, and\n// the results (a CardGrid of LinkCards, a list). The filters live in the address: a link per choice, no client state.\nimport { Page } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Meter, type MeterProps } from \"../meter\";\n\nconst plan = tv({\n slots: {\n root: \"mb-4 flex flex-wrap items-center gap-x-8 gap-y-3 rounded-xl border border-border-default bg-surface-1 p-4\",\n figures: \"m-0 flex min-w-0 flex-wrap gap-x-8 gap-y-2\",\n figure: \"flex min-w-0 flex-col\",\n value: \"font-display text-2xl font-extrabold tabular-nums text-fg\",\n label: \"text-xs text-fg-secondary\",\n meter: \"min-w-40 flex-1\",\n },\n});\n\nexport type PlanFigure = { id: string; label: string; value: React.ReactNode };\n\nexport type PlanStripProps = Omit<React.ComponentProps<\"section\">, \"children\"> & {\n /** Names the strip (`Your plan`). */\n label: string;\n /** Two or three figures (`12 clients`, `3 invoices to send`). */\n figures: readonly PlanFigure[];\n /** The measure of the plan beside them (`Meter`): clients used of the plan, storage. */\n meter?: MeterProps;\n};\n\n/** The plan strip of a catalogue: two or three figures and a `Meter` — where the account stands, at a glance. */\nexport function PlanStrip({ label, figures, meter, className, ...props }: PlanStripProps) {\n const p = plan();\n return (\n <section aria-label={label} className={p.root({ className })} {...props}>\n <dl className={p.figures()}>\n {figures.slice(0, 3).map((f) => (\n <div key={f.id} className={p.figure()}>\n <dd className={p.value()}>{f.value}</dd>\n <dt className={p.label()}>{f.label}</dt>\n </div>\n ))}\n </dl>\n {meter && <Meter {...meter} className={p.meter({ className: meter.className })} />}\n </section>\n );\n}\n\nexport type CataloguePageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One sentence under it. */\n lead?: React.ReactNode;\n /** In the hero: a search field. */\n search?: React.ReactNode;\n /** The filters (groups of ChipLinks, a FilterBar): sticky on a desktop. */\n filters: React.ReactNode;\n /** On a phone, the words that open the filters (`Filters`). */\n filtersLabel: string;\n /** Above the results: the plan strip (`PlanStrip`) — where the account stands. */\n plan?: React.ReactNode;\n /** Above the count: the binder dividers (tabs of the shelves: all · active · archived). */\n dividers?: React.ReactNode;\n /** After the results (the bar docks itself at the bottom edge): the selection bar (`SelectionBar`, `DataTable bulkActions`). */\n selection?: React.ReactNode;\n /** What matches, in words (`24 components`). */\n count?: React.ReactNode;\n /** On the right of the count: the sort, a view switch. */\n toolbar?: React.ReactNode;\n /** The results: a CardGrid, a list, an empty state. */\n children: React.ReactNode;\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n /**\n * From which window width the filters stay in their column beside the results. `default`: 900 px and above. `wide`:\n * 1280 px and above — a wide table (DataTable) needs the room; under it the filters are a bar above the results.\n */\n railFrom?: \"default\" | \"wide\";\n};\n\n/** A catalogue: hero, sticky filters beside the results (folded on a phone), the count, the results. */\nexport function CataloguePage({ back, eyebrow, title, lead, search, filters, filtersLabel, plan, dividers, selection, count, toolbar, linkAs, railFrom = \"default\", children, ...props }: CataloguePageProps) {\n return (\n <div {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} backdrop=\"plain\">\n {search}\n </PageHero>\n <Page className=\"kz-tpl-catalogue-frame\">\n <div className=\"kz-tpl-catalogue\" data-rail={railFrom}>\n <details className=\"kz-tpl-catalogue-filters\" open>\n <summary>{filtersLabel}</summary>\n <div>{filters}</div>\n </details>\n <div className=\"min-w-0\">\n {plan}\n {dividers}\n {(count || toolbar) && (\n <div className=\"kz-tpl-catalogue-head\">\n {count && (\n <p className=\"kz-tpl-count\" aria-live=\"polite\">\n {count}\n </p>\n )}\n {toolbar}\n </div>\n )}\n {children}\n {selection && <div className=\"mt-3\">{selection}</div>}\n </div>\n </div>\n </Page>\n </div>\n );\n}\n","// Server-safe. A measure within a known range — a quota, a balance, a share — as opposed to the progress of a task.\n// `role=\"meter\"`, its value in words; thresholds turn it to warning then danger (or the reverse when high is good);\n// split into parts (90 % to the creator, 10 % to the platform) it becomes a stacked bar or ring with its legend: the\n// text version of what it draws.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type MeterLevel, meterModel, type MeterPart, type MeterThresholds } from \"./model\";\n\nexport type { MeterPart };\n\nexport const meter = tv({\n slots: {\n root: \"flex w-full flex-col gap-1.5\",\n header: \"flex items-baseline gap-2 text-xs\",\n caption: \"min-w-0 flex-1 truncate font-medium text-fg\",\n figure: \"shrink-0 tabular-nums text-fg-secondary\",\n track: \"relative flex h-2 w-full gap-0.5 overflow-hidden rounded-sm bg-surface-3\",\n fill: \"h-full rounded-sm transition-[width] duration-700 motion-reduce:transition-none\",\n legend: \"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary\",\n swatch: \"inline-block h-2 w-2 shrink-0 rounded-full\",\n ring: \"relative inline-flex shrink-0 items-center justify-center\",\n center: \"absolute inset-0 flex flex-col items-center justify-center text-center\",\n },\n variants: {\n size: { sm: { track: \"h-1.5\", ring: \"h-14 w-14\" }, md: { ring: \"h-24 w-24\" }, lg: { track: \"h-3\", ring: \"h-36 w-36\" } },\n },\n defaultVariants: { size: \"md\" },\n});\n\n/** The colour of a fill: by tone (thresholds) or by part (the accent, a neutral, accent-2, a lighter neutral). */\nconst BG: Record<MeterLevel, string> = { ok: \"bg-accent\", success: \"bg-success\", warning: \"bg-warning\", danger: \"bg-danger\" };\nconst STROKE: Record<MeterLevel, string> = { ok: \"stroke-accent\", success: \"stroke-success\", warning: \"stroke-warning\", danger: \"stroke-danger\" };\nconst PART_BG = [\"bg-accent\", \"bg-fg-secondary\", \"bg-accent-2\", \"bg-border-strong\"];\nconst PART_STROKE = [\"stroke-accent\", \"stroke-fg-secondary\", \"stroke-accent-2\", \"stroke-border-strong\"];\n\nexport type MeterProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The accessible name (“Storage”, “Split of a tip”) — passed translated; shown with `showLabel`. */\n label: string;\n /** The value, between `min` and `max` (ignored with `parts`). */\n value?: number;\n /**\n * The bottom of the range.\n * @default 0\n */\n min?: number;\n /**\n * The top of the range.\n * @default 100\n */\n max?: number;\n /** The value in words (“42 GB of 50 GB”) — passed translated; default: the percentage. */\n valueText?: string;\n /**\n * Ratios (0–1) where the tone changes: past `high` it is in danger, past `low` in warning — or the reverse with\n * `optimum=\"high\"` (a balance: the lower, the worse). Without thresholds the fill is the brand accent.\n */\n thresholds?: MeterThresholds;\n /**\n * Which end is good.\n * @default \"low\"\n */\n optimum?: \"low\" | \"high\";\n /** Split into parts that add up to `max`: a stacked bar or ring, with its legend. */\n parts?: readonly MeterPart[];\n /**\n * bar · ring.\n * @default \"bar\"\n */\n variant?: \"bar\" | \"ring\";\n /**\n * sm · md · lg: the bar's thickness, the ring's diameter.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Shows the label and the value above the bar. */\n showLabel?: boolean;\n /** A ring's centre: the value, a word. */\n children?: React.ReactNode;\n};\n\n/** A measure within a range — a quota, a balance, a share — toned by thresholds or split into parts. */\nexport function Meter({\n label,\n value = 0,\n min = 0,\n max = 100,\n valueText,\n thresholds,\n optimum = \"low\",\n parts,\n variant = \"bar\",\n size = \"md\",\n showLabel,\n className,\n children,\n ...props\n}: MeterProps) {\n const s = meter({ size });\n const { ratio, level, words, shares, arcs } = meterModel({ value, min, max, valueText, thresholds, optimum, parts });\n const a11y = parts\n ? { role: \"group\" as const, \"aria-label\": label }\n : { role: \"meter\" as const, \"aria-label\": label, \"aria-valuemin\": min, \"aria-valuemax\": max, \"aria-valuenow\": Math.min(max, Math.max(min, value)), \"aria-valuetext\": words };\n const legend = parts && (\n <ul className={s.legend()}>\n {shares.map((p) => (\n <li key={p.i} className=\"flex items-center gap-1.5\">\n <span aria-hidden className={[s.swatch(), PART_BG[p.i % PART_BG.length]].join(\" \")} />\n <span className=\"text-fg\">{p.label}</span>\n <span className=\"tabular-nums\">{p.words}</span>\n </li>\n ))}\n </ul>\n );\n\n if (variant === \"ring\") {\n const r = 44;\n return (\n <div {...a11y} data-level={parts ? undefined : level} className={[\"inline-flex flex-col items-center gap-2\", className].filter(Boolean).join(\" \")} {...props}>\n <div className={s.ring()}>\n <svg viewBox=\"0 0 100 100\" className=\"h-full w-full -rotate-90\" aria-hidden>\n <circle cx=\"50\" cy=\"50\" r={r} fill=\"none\" strokeWidth=\"9\" className=\"stroke-border-default\" />\n {arcs.map((arc, i) => {\n const length = Math.max(0, arc.len * 100 - (parts ? 1 : 0));\n return (\n <circle\n key={i}\n cx=\"50\"\n cy=\"50\"\n r={r}\n fill=\"none\"\n strokeWidth=\"9\"\n pathLength={100}\n strokeDasharray={`${length} ${100 - length}`}\n strokeDashoffset={-arc.start * 100}\n className={[arc.part === undefined ? STROKE[level] : PART_STROKE[arc.part % PART_STROKE.length], \"transition-[stroke-dasharray] duration-700 motion-reduce:transition-none\"].join(\" \")}\n />\n );\n })}\n </svg>\n {children !== undefined && <div className={s.center()}>{children}</div>}\n </div>\n {legend}\n </div>\n );\n }\n\n return (\n <div {...a11y} data-level={parts ? undefined : level} className={s.root({ className })} {...props}>\n {showLabel && (\n <div aria-hidden className={s.header()}>\n <span className={s.caption()}>{label}</span>\n {!parts && <span className={s.figure()}>{words}</span>}\n </div>\n )}\n <div aria-hidden className={s.track()}>\n {parts ? (\n shares.map((p) => <span key={p.i} className={[s.fill(), PART_BG[p.i % PART_BG.length]].join(\" \")} style={{ width: `${p.ratio * 100}%` }} />)\n ) : (\n <span className={[s.fill(), BG[level]].join(\" \")} style={{ width: `${ratio * 100}%` }} />\n )}\n </div>\n {legend}\n </div>\n );\n}\n\nexport interface MeterValueProps {\n /** The figure. */\n value: React.ReactNode;\n /** A word under it. */\n caption?: React.ReactNode;\n}\n\n/** For the ring's centre when it shows a figure and a word. */\nexport function MeterValue({ value, caption }: MeterValueProps) {\n return (\n <>\n <span className=\"font-display text-lg font-semibold text-fg tabular-nums\">{value}</span>\n {caption && <span className=\"text-[10px] text-fg-secondary\">{caption}</span>}\n </>\n );\n}\n","// Headless: the arithmetic of a Meter, read by the web (`meter.tsx`) and the native (`native/meter.tsx`) alike.\n\nexport interface MeterPart {\n /** Its name (“To the creator”) — passed translated. */\n label: string;\n /** Its value, in the meter's unit. */\n value: number;\n /** Its value in words (“€9.00”), in the legend and for assistive technology; default: its percentage. */\n valueText?: string;\n}\n\n/** Which end of the range is good: `low` (a quota) or `high` (a score, a balance). */\nexport const MeterOptimum = { Low: \"low\", High: \"high\" } as const;\nexport type MeterOptimum = (typeof MeterOptimum)[keyof typeof MeterOptimum];\n\n/** The tone of a fill: the accent without thresholds, otherwise good, warning or bad. */\nexport const MeterLevel = { Ok: \"ok\", Success: \"success\", Warning: \"warning\", Danger: \"danger\" } as const;\nexport type MeterLevel = (typeof MeterLevel)[keyof typeof MeterLevel];\n\nexport interface MeterThresholds {\n readonly low: number;\n readonly high: number;\n}\n\nexport interface MeterInput {\n value?: number;\n min?: number;\n max?: number;\n valueText?: string;\n thresholds?: MeterThresholds;\n optimum?: MeterOptimum;\n parts?: readonly MeterPart[];\n}\n\nexport interface MeterShare extends MeterPart {\n i: number;\n /** Its share of the range, 0–1. */\n ratio: number;\n /** Its value in words. */\n words: string;\n}\n\n/** One arc of a ring, as fractions of the circle: the part it draws (none for the whole value), its length, where it starts. */\nexport interface MeterArc {\n part: number | undefined;\n len: number;\n start: number;\n}\n\nexport interface MeterModel {\n ratio: number;\n level: MeterLevel;\n words: string;\n shares: MeterShare[];\n arcs: MeterArc[];\n}\n\nconst clamp01 = (n: number) => Math.min(1, Math.max(0, n));\nconst percent = (ratio: number) => `${Math.round(ratio * 100)} %`;\n\nfunction levelOf(ratio: number, thresholds: MeterThresholds | undefined, optimum: MeterOptimum): MeterLevel {\n if (!thresholds) return MeterLevel.Ok;\n const good = optimum === MeterOptimum.Low ? MeterLevel.Success : MeterLevel.Danger;\n const bad = optimum === MeterOptimum.Low ? MeterLevel.Danger : MeterLevel.Success;\n if (ratio >= thresholds.high) return bad;\n return ratio >= thresholds.low ? MeterLevel.Warning : good;\n}\n\n/** The ratio, tone, words, parts and ring arcs of a meter. */\nexport function meterModel({ value = 0, min = 0, max = 100, valueText, thresholds, optimum = MeterOptimum.Low, parts }: MeterInput): MeterModel {\n const span = max - min || 1;\n const ratio = clamp01((value - min) / span);\n const shares = (parts ?? []).map((p, i) => ({ ...p, i, ratio: clamp01(p.value / span), words: p.valueText ?? percent(p.value / span) }));\n let start = 0;\n const arcs = parts\n ? shares.map((p) => {\n const arc = { part: p.i, len: p.ratio, start };\n start += p.ratio;\n return arc;\n })\n : [{ part: undefined, len: ratio, start: 0 }];\n return { ratio, level: levelOf(ratio, thresholds, optimum), words: valueText ?? percent(ratio), shares, arcs };\n}\n"],"mappings":";AAGA,SAAS,YAAY;AAErB,SAAS,gBAAgB;AAEzB,SAAS,MAAAA,WAAU;;;ACFnB,SAAS,UAAU;;;ACOZ,IAAM,eAAe,EAAE,KAAK,OAAO,MAAM,OAAO;AAIhD,IAAM,a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C,gBAAAD,KAAC,OAAE,WAAU,gBAAe,aAAU,UACnC,iBACH;AAAA,UAED;AAAA,WACH;AAAA,QAED;AAAA,QACA,aAAa,gBAAAA,KAAC,SAAI,WAAU,QAAQ,qBAAU;AAAA,SACjD;AAAA,OACF,GACF;AAAA,KACF;AAEJ;","names":["tv","jsx","jsxs","tv","meter","plan"]}
@@ -113,4 +113,5 @@ interface MergedPull {
113
113
  */
114
114
  declare function releasesFromPulls(pulls: readonly MergedPull[], source: string, url?: string): Release[];
115
115
 
116
- export { CHANGE_TAGS, type ChangeItem, type ChangeKind, type ChangeTag, type ChangelogEntry, ChangelogPage, type ChangelogPageProps, type MergedPull, type Release, anchorOf, changeFromTitle, changelogRss, draftFromTitles, kindOfTag, newestFirst, parseChangesets, parseReleaseBody, plain, prOf, releasesFromPulls, tagOf };
116
+ export { CHANGE_TAGS, ChangelogPage, anchorOf, changeFromTitle, changelogRss, draftFromTitles, kindOfTag, newestFirst, parseChangesets, parseReleaseBody, plain, prOf, releasesFromPulls, tagOf };
117
+ export type { ChangeItem, ChangeKind, ChangeTag, ChangelogEntry, ChangelogPageProps, MergedPull, Release };
package/dist/chapter.d.ts CHANGED
@@ -103,4 +103,5 @@ type ChapterFootProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
103
103
  /** The foot of a chapter: the previous and the next on the ruled lines, then one line back to the story. */
104
104
  declare function ChapterFoot({ previous, next, back, labels, label, paper, linkAs, className, ...props }: ChapterFootProps): React.JSX.Element;
105
105
 
106
- export { type ChapterCover, type ChapterEntry, ChapterFoot, type ChapterFootProps, ChapterHead, type ChapterHeadProps, ChapterIndex, type ChapterIndexProps, type ChapterLink, LinkComponent };
106
+ export { ChapterFoot, ChapterHead, ChapterIndex, LinkComponent };
107
+ export type { ChapterCover, ChapterEntry, ChapterFootProps, ChapterHeadProps, ChapterIndexProps, ChapterLink };