@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
@@ -1,11 +1,17 @@
1
1
  // src/sticky-action/sticky-action.tsx
2
2
  import { tv } from "tailwind-variants";
3
- import { jsx } from "react/jsx-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  var stickyAction = tv({
5
- base: "sticky bottom-0 z-30 border-t border-border-subtle bg-surface-1 px-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 md:hidden"
5
+ base: "sticky bottom-0 z-30 border-t border-border-subtle bg-surface-1 px-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3",
6
+ variants: { mode: { phone: "md:hidden", task: "" } },
7
+ defaultVariants: { mode: "phone" }
6
8
  });
7
- function StickyAction({ className, children, ...props }) {
8
- return /* @__PURE__ */ jsx("div", { className: stickyAction({ className }), ...props, children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex max-w-md flex-col [&>*]:w-full", children }) });
9
+ function StickyAction({ mode = "phone", summary, className, children, ...props }) {
10
+ const task = mode === "task";
11
+ return /* @__PURE__ */ jsx("div", { className: stickyAction({ mode, className }), ...props, children: task ? /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-5xl flex-col gap-2 md:flex-row md:items-center md:justify-between md:gap-6 [&>*:last-child]:w-full md:[&>*:last-child]:w-auto", children: [
12
+ summary && /* @__PURE__ */ jsx("p", { className: "m-0 text-sm font-semibold tabular-nums text-fg", children: summary }),
13
+ children
14
+ ] }) : /* @__PURE__ */ jsx("div", { className: "mx-auto flex max-w-md flex-col [&>*]:w-full", children }) });
9
15
  }
10
16
  export {
11
17
  StickyAction,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sticky-action/sticky-action.tsx"],"sourcesContent":["// Server-safe: pure CSS. The main action of a page, stuck to the bottom of a phone's screen while the page scrolls: put it\n// as the last child of the page's `main` (a sticky element holds the viewport's edge inside its container). From `md` up it\n// is not drawn — the page's own buttons are within reach.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const stickyAction = tv({\n base: \"sticky bottom-0 z-30 border-t border-border-subtle bg-surface-1 px-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 md:hidden\",\n});\n\nexport type StickyActionProps = React.ComponentProps<\"div\"> & {\n /** The action: one `ButtonLink` (full width is added). */\n children: React.ReactNode;\n};\n\n/** The one action of a page, held at the bottom edge of a phone. */\nexport function StickyAction({ className, children, ...props }: StickyActionProps) {\n return (\n <div className={stickyAction({ className })} {...props}>\n <div className=\"mx-auto flex max-w-md flex-col [&>*]:w-full\">{children}</div>\n </div>\n );\n}\n"],"mappings":";AAIA,SAAS,UAAU;AAeb;AAbC,IAAM,eAAe,GAAG;AAAA,EAC7B,MAAM;AACR,CAAC;AAQM,SAAS,aAAa,EAAE,WAAW,UAAU,GAAG,MAAM,GAAsB;AACjF,SACE,oBAAC,SAAI,WAAW,aAAa,EAAE,UAAU,CAAC,GAAI,GAAG,OAC/C,8BAAC,SAAI,WAAU,+CAA+C,UAAS,GACzE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/sticky-action/sticky-action.tsx"],"sourcesContent":["// Server-safe: pure CSS. The main action of a page, stuck to the bottom of a phone's screen while the page scrolls: put it\n// as the last child of the page's `main` (a sticky element holds the viewport's edge inside its container). From `md` up it\n// is not drawn — the page's own buttons are within reach. In `task` mode (a form to finish: a new invoice) it stays on every\n// width, with the `summary` (the total) at its left, so the action and what it commits are always in view.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const stickyAction = tv({\n base: \"sticky bottom-0 z-30 border-t border-border-subtle bg-surface-1 px-4 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3\",\n variants: { mode: { phone: \"md:hidden\", task: \"\" } },\n defaultVariants: { mode: \"phone\" },\n});\n\nexport type StickyActionProps = React.ComponentProps<\"div\"> & {\n /**\n * `phone`: the bar of a phone only. `task`: on every width, for a form the person is finishing.\n * @default \"phone\"\n */\n mode?: \"phone\" | \"task\";\n /** `task` only: what the action commits (`Total 1 250,00 $`), at the left of the action; stacked above it on a phone. */\n summary?: React.ReactNode;\n /** The action: one `ButtonLink` (full width is added on a phone). */\n children: React.ReactNode;\n};\n\n/** The one action of a page, held at the bottom edge of a phone — or, in `task` mode, of the form on every width. */\nexport function StickyAction({ mode = \"phone\", summary, className, children, ...props }: StickyActionProps) {\n const task = mode === \"task\";\n return (\n <div className={stickyAction({ mode, className })} {...props}>\n {task ? (\n <div className=\"mx-auto flex max-w-5xl flex-col gap-2 md:flex-row md:items-center md:justify-between md:gap-6 [&>*:last-child]:w-full md:[&>*:last-child]:w-auto\">\n {summary && <p className=\"m-0 text-sm font-semibold tabular-nums text-fg\">{summary}</p>}\n {children}\n </div>\n ) : (\n <div className=\"mx-auto flex max-w-md flex-col [&>*]:w-full\">{children}</div>\n )}\n </div>\n );\n}\n"],"mappings":";AAKA,SAAS,UAAU;AA0BX,SACc,KADd;AAxBD,IAAM,eAAe,GAAG;AAAA,EAC7B,MAAM;AAAA,EACN,UAAU,EAAE,MAAM,EAAE,OAAO,aAAa,MAAM,GAAG,EAAE;AAAA,EACnD,iBAAiB,EAAE,MAAM,QAAQ;AACnC,CAAC;AAeM,SAAS,aAAa,EAAE,OAAO,SAAS,SAAS,WAAW,UAAU,GAAG,MAAM,GAAsB;AAC1G,QAAM,OAAO,SAAS;AACtB,SACE,oBAAC,SAAI,WAAW,aAAa,EAAE,MAAM,UAAU,CAAC,GAAI,GAAG,OACpD,iBACC,qBAAC,SAAI,WAAU,oJACZ;AAAA,eAAW,oBAAC,OAAE,WAAU,kDAAkD,mBAAQ;AAAA,IAClF;AAAA,KACH,IAEA,oBAAC,SAAI,WAAU,+CAA+C,UAAS,GAE3E;AAEJ;","names":[]}
package/dist/stuck.d.ts CHANGED
@@ -24,4 +24,5 @@ declare function stuckTilt(seed: string, tilt?: number): number;
24
24
  /** A block stuck into the notebook: held by tape, a pin, photo corners or glue; tilted from data; a hard paper shadow. */
25
25
  declare function Stuck({ children, hold, tilt, seed, doodle, as: Tag, className, style, ...props }: StuckProps): React.JSX.Element;
26
26
 
27
- export { Stuck, type StuckHold, type StuckProps, stuckTilt };
27
+ export { Stuck, stuckTilt };
28
+ export type { StuckHold, StuckProps };
@@ -187,4 +187,5 @@ type SwipeDeckProps<T> = {
187
187
  */
188
188
  declare function SwipeDeck<T>({ items, getId, getName, renderCard, onSwipe, empty, labels, className }: SwipeDeckProps<T>): React.JSX.Element;
189
189
 
190
- export { PersonCard, type PersonCardProps, SwipeDeck, type SwipeDeckLabels, type SwipeDeckProps, type SwipeDirection, swipeDeck };
190
+ export { PersonCard, SwipeDeck, swipeDeck };
191
+ export type { PersonCardProps, SwipeDeckLabels, SwipeDeckProps, SwipeDirection };
package/dist/switch.d.ts CHANGED
@@ -73,4 +73,5 @@ type SwitchProps = Omit<React.ComponentProps<typeof Switch$1.Root>, "children">
73
73
  /** An on/off switch: `checked`/`defaultChecked` + `onCheckedChange`. */
74
74
  declare function Switch({ label, size, invalid, className, ...props }: SwitchProps): React.JSX.Element;
75
75
 
76
- export { Switch, type SwitchProps, type SwitchVariants, switchVariants };
76
+ export { Switch, switchVariants };
77
+ export type { SwitchProps, SwitchVariants };
package/dist/tabs.d.ts CHANGED
@@ -161,4 +161,5 @@ declare const Tabs: {
161
161
  NavLink: typeof TabsNavLink;
162
162
  };
163
163
 
164
- export { Tabs, type TabsAdd, TabsContent, type TabsHue, TabsList, type TabsListProps, TabsNav, TabsNavLink, type TabsNavLinkProps, type TabsNavProps, TabsRoot, type TabsRootProps, TabsTrigger, type TabsTriggerProps, type TabsVariants, isTabActive, tabs };
164
+ export { Tabs, TabsContent, TabsList, TabsNav, TabsNavLink, TabsRoot, TabsTrigger, isTabActive, tabs };
165
+ export type { TabsAdd, TabsHue, TabsListProps, TabsNavLinkProps, TabsNavProps, TabsRootProps, TabsTriggerProps, TabsVariants };
@@ -41,4 +41,5 @@ type TagInputProps = {
41
41
  /** Words as removable chips — tags, keywords, e-mail recipients — with suggestions, cleaning and validation. */
42
42
  declare function TagInput({ value, defaultValue, onValueChange, suggestions, normalize, validate, max, separators, error, labels, ...props }: TagInputProps): React.JSX.Element;
43
43
 
44
- export { TagInput, type TagInputProps };
44
+ export { TagInput };
45
+ export type { TagInputProps };
package/dist/tag-input.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Combobox
4
- } from "./chunk-AEP3K4YD.js";
5
- import "./chunk-VIPSZXO4.js";
4
+ } from "./chunk-4GQH27IT.js";
5
+ import "./chunk-UYGUSYIC.js";
6
6
  import "./chunk-D3T54RSL.js";
7
+ import "./chunk-NSLXEDIS.js";
7
8
  import "./chunk-ZIXB33X7.js";
8
9
  import {
9
10
  useControllable
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tag-input/tag-input.tsx"],"sourcesContent":["// Client. Free words as chips — the multiple, creatable `Combobox` on strings: Enter or a separator adds the word,\n// a paste of \"a, b, c\" adds three, Backspace on an empty input removes the last, suggestions complete as you type.\n// `normalize` cleans a word (lower case, no `#`), `validate` refuses one with a reason read aloud.\nimport * as React from \"react\";\n\nimport { Combobox, type ComboboxLabels, type ComboboxOption } from \"../combobox\";\nimport { useControllable } from \"../media\";\n\nexport type TagInputProps = {\n /** The visible label, passed translated (also the accessible name). */\n label: string;\n /** Hides the label visually, keeping it as the accessible name. */\n hideLabel?: boolean;\n /** The tags (controlled). */\n value?: readonly string[];\n /** The tags at first, uncontrolled. */\n defaultValue?: readonly string[];\n /** Called with every tag after a change. */\n onValueChange?: (tags: string[]) => void;\n /** Words offered as the person types (their own history, a curated list). */\n suggestions?: readonly string[];\n /** Cleans a word before it is added (`(t) => t.toLowerCase().replace(/^#/, \"\")`). An empty result is ignored. */\n normalize?: (tag: string) => string;\n /** Refuses a word: return the reason (passed translated), shown and read as the field's error; `null` accepts it. */\n validate?: (tag: string, tags: readonly string[]) => string | null;\n /** Most tags; the field stops offering more past it. */\n max?: number;\n /** Keys that add the word, besides Enter. Default `[\",\"]`. */\n separators?: readonly string[];\n /** The input's placeholder, passed translated. */\n placeholder?: string;\n /** A help text under the field (\"Up to 10 tags, separated by commas\"). */\n hint?: string;\n /** An error from the app (a server refusal); `validate`'s own errors show here too. */\n error?: string;\n /** Not available. */\n disabled?: boolean;\n /** The name of the hidden inputs, for a plain `<form>` post (one per tag). */\n name?: string;\n /** The words of the field, passed translated; English by default. */\n labels?: Partial<Pick<ComboboxLabels, \"create\" | \"remove\" | \"empty\" | \"results\" | \"toggle\">>;\n /** Classes merged on the root. */\n className?: string;\n};\n\nconst toOption = (tag: string): ComboboxOption => ({ value: tag, label: tag });\n\n/** Words as removable chips — tags, keywords, e-mail recipients — with suggestions, cleaning and validation. */\nexport function TagInput({\n value,\n defaultValue = [],\n onValueChange,\n suggestions = [],\n normalize = (tag) => tag.trim(),\n validate,\n max,\n separators = [\",\"],\n error,\n labels,\n ...props\n}: TagInputProps) {\n const [tags, setTags] = useControllable<readonly string[]>(value, defaultValue, onValueChange as (next: readonly string[]) => void);\n const [refusal, setRefusal] = React.useState<string | null>(null);\n\n const change = (options: ComboboxOption[]) => {\n const next: string[] = [];\n for (const option of options) {\n const tag = normalize(option.value);\n if (!tag || next.includes(tag)) continue;\n if (!tags.includes(tag)) {\n const reason = validate?.(tag, next) ?? null;\n if (reason) {\n setRefusal(reason);\n continue;\n }\n }\n next.push(tag);\n }\n if (next.length >= options.length || options.length < tags.length) setRefusal(null);\n setTags(next);\n };\n\n return (\n <Combobox\n {...props}\n multiple\n creatable\n separators={separators}\n maxSelected={max}\n value={tags.map(toOption)}\n onValueChange={change}\n options={suggestions.map(toOption)}\n error={refusal ?? error}\n labels={{ empty: \"\", results: () => \"\", ...labels }}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,YAAY,WAAW;AAgFnB;AAtCJ,IAAM,WAAW,CAAC,SAAiC,EAAE,OAAO,KAAK,OAAO,IAAI;AAGrE,SAAS,SAAS;AAAA,EACvB;AAAA,EACA,eAAe,CAAC;AAAA,EAChB;AAAA,EACA,cAAc,CAAC;AAAA,EACf,YAAY,CAAC,QAAQ,IAAI,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,aAAa,CAAC,GAAG;AAAA,EACjB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,CAAC,MAAM,OAAO,IAAI,gBAAmC,OAAO,cAAc,aAAkD;AAClI,QAAM,CAAC,SAAS,UAAU,IAAU,eAAwB,IAAI;AAEhE,QAAM,SAAS,CAAC,YAA8B;AAC5C,UAAM,OAAiB,CAAC;AACxB,eAAW,UAAU,SAAS;AAC5B,YAAM,MAAM,UAAU,OAAO,KAAK;AAClC,UAAI,CAAC,OAAO,KAAK,SAAS,GAAG,EAAG;AAChC,UAAI,CAAC,KAAK,SAAS,GAAG,GAAG;AACvB,cAAM,SAAS,WAAW,KAAK,IAAI,KAAK;AACxC,YAAI,QAAQ;AACV,qBAAW,MAAM;AACjB;AAAA,QACF;AAAA,MACF;AACA,WAAK,KAAK,GAAG;AAAA,IACf;AACA,QAAI,KAAK,UAAU,QAAQ,UAAU,QAAQ,SAAS,KAAK,OAAQ,YAAW,IAAI;AAClF,YAAQ,IAAI;AAAA,EACd;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAQ;AAAA,MACR,WAAS;AAAA,MACT;AAAA,MACA,aAAa;AAAA,MACb,OAAO,KAAK,IAAI,QAAQ;AAAA,MACxB,eAAe;AAAA,MACf,SAAS,YAAY,IAAI,QAAQ;AAAA,MACjC,OAAO,WAAW;AAAA,MAClB,QAAQ,EAAE,OAAO,IAAI,SAAS,MAAM,IAAI,GAAG,OAAO;AAAA;AAAA,EACpD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/tag-input/tag-input.tsx"],"sourcesContent":["// Client. Free words as chips — the multiple, creatable `Combobox` on strings: Enter or a separator adds the word,\n// a paste of \"a, b, c\" adds three, Backspace on an empty input removes the last, suggestions complete as you type.\n// `normalize` cleans a word (lower case, no `#`), `validate` refuses one with a reason read aloud.\nimport * as React from \"react\";\n\nimport { Combobox, type ComboboxLabels, type ComboboxOption } from \"../combobox\";\nimport { useControllable } from \"../media\";\n\nexport type TagInputProps = {\n /** The visible label, passed translated (also the accessible name). */\n label: string;\n /** Hides the label visually, keeping it as the accessible name. */\n hideLabel?: boolean;\n /** The tags (controlled). */\n value?: readonly string[];\n /** The tags at first, uncontrolled. */\n defaultValue?: readonly string[];\n /** Called with every tag after a change. */\n onValueChange?: (tags: string[]) => void;\n /** Words offered as the person types (their own history, a curated list). */\n suggestions?: readonly string[];\n /** Cleans a word before it is added (`(t) => t.toLowerCase().replace(/^#/, \"\")`). An empty result is ignored. */\n normalize?: (tag: string) => string;\n /** Refuses a word: return the reason (passed translated), shown and read as the field's error; `null` accepts it. */\n validate?: (tag: string, tags: readonly string[]) => string | null;\n /** Most tags; the field stops offering more past it. */\n max?: number;\n /** Keys that add the word, besides Enter. Default `[\",\"]`. */\n separators?: readonly string[];\n /** The input's placeholder, passed translated. */\n placeholder?: string;\n /** A help text under the field (\"Up to 10 tags, separated by commas\"). */\n hint?: string;\n /** An error from the app (a server refusal); `validate`'s own errors show here too. */\n error?: string;\n /** Not available. */\n disabled?: boolean;\n /** The name of the hidden inputs, for a plain `<form>` post (one per tag). */\n name?: string;\n /** The words of the field, passed translated; English by default. */\n labels?: Partial<Pick<ComboboxLabels, \"create\" | \"remove\" | \"empty\" | \"results\" | \"toggle\">>;\n /** Classes merged on the root. */\n className?: string;\n};\n\nconst toOption = (tag: string): ComboboxOption => ({ value: tag, label: tag });\n\n/** Words as removable chips — tags, keywords, e-mail recipients — with suggestions, cleaning and validation. */\nexport function TagInput({\n value,\n defaultValue = [],\n onValueChange,\n suggestions = [],\n normalize = (tag) => tag.trim(),\n validate,\n max,\n separators = [\",\"],\n error,\n labels,\n ...props\n}: TagInputProps) {\n const [tags, setTags] = useControllable<readonly string[]>(value, defaultValue, onValueChange as (next: readonly string[]) => void);\n const [refusal, setRefusal] = React.useState<string | null>(null);\n\n const change = (options: ComboboxOption[]) => {\n const next: string[] = [];\n for (const option of options) {\n const tag = normalize(option.value);\n if (!tag || next.includes(tag)) continue;\n if (!tags.includes(tag)) {\n const reason = validate?.(tag, next) ?? null;\n if (reason) {\n setRefusal(reason);\n continue;\n }\n }\n next.push(tag);\n }\n if (next.length >= options.length || options.length < tags.length) setRefusal(null);\n setTags(next);\n };\n\n return (\n <Combobox\n {...props}\n multiple\n creatable\n separators={separators}\n maxSelected={max}\n value={tags.map(toOption)}\n onValueChange={change}\n options={suggestions.map(toOption)}\n error={refusal ?? error}\n labels={{ empty: \"\", results: () => \"\", ...labels }}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAGA,YAAY,WAAW;AAgFnB;AAtCJ,IAAM,WAAW,CAAC,SAAiC,EAAE,OAAO,KAAK,OAAO,IAAI;AAGrE,SAAS,SAAS;AAAA,EACvB;AAAA,EACA,eAAe,CAAC;AAAA,EAChB;AAAA,EACA,cAAc,CAAC;AAAA,EACf,YAAY,CAAC,QAAQ,IAAI,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,aAAa,CAAC,GAAG;AAAA,EACjB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,CAAC,MAAM,OAAO,IAAI,gBAAmC,OAAO,cAAc,aAAkD;AAClI,QAAM,CAAC,SAAS,UAAU,IAAU,eAAwB,IAAI;AAEhE,QAAM,SAAS,CAAC,YAA8B;AAC5C,UAAM,OAAiB,CAAC;AACxB,eAAW,UAAU,SAAS;AAC5B,YAAM,MAAM,UAAU,OAAO,KAAK;AAClC,UAAI,CAAC,OAAO,KAAK,SAAS,GAAG,EAAG;AAChC,UAAI,CAAC,KAAK,SAAS,GAAG,GAAG;AACvB,cAAM,SAAS,WAAW,KAAK,IAAI,KAAK;AACxC,YAAI,QAAQ;AACV,qBAAW,MAAM;AACjB;AAAA,QACF;AAAA,MACF;AACA,WAAK,KAAK,GAAG;AAAA,IACf;AACA,QAAI,KAAK,UAAU,QAAQ,UAAU,QAAQ,SAAS,KAAK,OAAQ,YAAW,IAAI;AAClF,YAAQ,IAAI;AAAA,EACd;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAQ;AAAA,MACR,WAAS;AAAA,MACT;AAAA,MACA,aAAa;AAAA,MACb,OAAO,KAAK,IAAI,QAAQ;AAAA,MACxB,eAAe;AAAA,MACf,SAAS,YAAY,IAAI,QAAQ;AAAA,MACjC,OAAO,WAAW;AAAA,MAClB,QAAQ,EAAE,OAAO,IAAI,SAAS,MAAM,IAAI,GAAG,OAAO;AAAA;AAAA,EACpD;AAEJ;","names":[]}
@@ -1,10 +1,35 @@
1
1
  import * as React from 'react';
2
+ import { Marker } from '@krizaka/organize/contract';
2
3
 
3
4
  type TagOption = {
4
5
  value: string;
5
6
  label: string;
7
+ /** A tag's colour: a name of the closed palette (`@krizaka/organize` `MARKERS`). Without it, a plain chip. */
8
+ marker?: Marker;
6
9
  };
7
- type TagSelectorProps = {
10
+ type CreatableProps = {
11
+ /** Adds a field: Enter chooses the tag typed, or asks the host to create it. */
12
+ creatable?: boolean;
13
+ /** Called with the new name (trimmed, as typed) and the marker chosen; the host creates the tag (it may refuse), adds the option and chooses it. */
14
+ onCreate?: (name: string, marker: Marker) => void;
15
+ /** The field's accessible name ("Add a tag"), passed translated. */
16
+ inputLabel?: string;
17
+ /** The field's placeholder, passed translated. */
18
+ placeholder?: string;
19
+ /** The create button: `(name) => "Create “" + name + "”"`, passed translated. */
20
+ createLabel?: (name: string) => string;
21
+ /** The name of each colour, passed translated: shows the colour choice beside the field. */
22
+ markerNames?: Readonly<Record<Marker, string>>;
23
+ /** The colour choice's accessible name ("Colour of the new tag"). */
24
+ markerLabel?: string;
25
+ /** The colour a new tag starts with (default `blue`). */
26
+ defaultMarker?: Marker;
27
+ /** The most characters of a name (default 80, the contract's `NAME_MAX`). */
28
+ maxLength?: number;
29
+ /** What is said when nothing matches and creating is not offered (“No tag of that name”), passed translated. */
30
+ emptyLabel?: string;
31
+ };
32
+ type TagSelectorProps = CreatableProps & {
8
33
  /** The group's name (“Interests”) — passed translated. */
9
34
  label: string;
10
35
  /** The tags offered. */
@@ -20,7 +45,8 @@ type TagSelectorProps = {
20
45
  /** Classes merged on the root. */
21
46
  className?: string;
22
47
  };
23
- /** Toggle chips with a limit and a count — the others rest once the limit is reached. */
24
- declare function TagSelector({ label, options, value, onValueChange, max, countLabel, className }: TagSelectorProps): React.JSX.Element;
48
+ /** Toggle chips with a limit and a count — the others rest once the limit is reached; `creatable` types a new one. */
49
+ declare function TagSelector({ label, options, value, onValueChange, max, countLabel, className, creatable, onCreate, inputLabel, placeholder, createLabel, markerNames, markerLabel, defaultMarker, maxLength, emptyLabel, }: TagSelectorProps): React.JSX.Element;
25
50
 
26
- export { type TagOption, TagSelector, type TagSelectorProps };
51
+ export { TagSelector };
52
+ export type { TagOption, TagSelectorProps };
@@ -1,18 +1,100 @@
1
1
  "use client";
2
2
  import {
3
- Chip
4
- } from "./chunk-VIPSZXO4.js";
3
+ Chip,
4
+ MarkerPicker,
5
+ TagChip
6
+ } from "./chunk-UYGUSYIC.js";
5
7
  import "./chunk-D3T54RSL.js";
8
+ import "./chunk-NSLXEDIS.js";
6
9
 
7
10
  // src/tag-selector/tag-selector.tsx
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- function TagSelector({ label, options, value, onValueChange, max, countLabel, className }) {
11
+ import * as React from "react";
12
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
+ function TagSelector({
14
+ label,
15
+ options,
16
+ value,
17
+ onValueChange,
18
+ max,
19
+ countLabel,
20
+ className,
21
+ creatable,
22
+ onCreate,
23
+ inputLabel,
24
+ placeholder,
25
+ createLabel = (name) => `Create \u201C${name}\u201D`,
26
+ markerNames,
27
+ markerLabel,
28
+ defaultMarker = "blue",
29
+ maxLength = 80,
30
+ emptyLabel
31
+ }) {
10
32
  const full = max !== void 0 && value.length >= max;
33
+ const [draft, setDraft] = React.useState("");
34
+ const [marker, setMarker] = React.useState(defaultMarker);
35
+ const typed = draft.replace(/\s+/g, " ").trim();
36
+ const needle = typed.toLocaleLowerCase();
37
+ const exact = options.find((o) => o.label.toLocaleLowerCase() === needle);
38
+ const shown = creatable && needle ? options.filter((o) => o.label.toLocaleLowerCase().includes(needle) || value.includes(o.value)) : options;
39
+ const canCreate = Boolean(creatable && onCreate && typed && !exact && !full);
40
+ const toggle = (option, on) => onValueChange(on ? [...value, option.value] : value.filter((v) => v !== option.value));
41
+ const commit = () => {
42
+ if (!typed) return;
43
+ if (exact) {
44
+ if (!value.includes(exact.value) && !full) onValueChange([...value, exact.value]);
45
+ } else if (canCreate) {
46
+ onCreate?.(typed, marker);
47
+ } else return;
48
+ setDraft("");
49
+ };
50
+ const listId = React.useId();
11
51
  return /* @__PURE__ */ jsxs("div", { className: ["flex flex-col gap-2", className].filter(Boolean).join(" "), children: [
12
- /* @__PURE__ */ jsx("div", { role: "group", "aria-label": label, className: "flex flex-wrap gap-2", children: options.map((option) => {
13
- const on = value.includes(option.value);
14
- return /* @__PURE__ */ jsx(Chip, { selected: on, disabled: !on && full, onSelectedChange: (next) => onValueChange(next ? [...value, option.value] : value.filter((v) => v !== option.value)), children: option.label }, option.value);
15
- }) }),
52
+ /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": label, id: listId, className: "flex flex-wrap gap-2", children: [
53
+ shown.map((option) => {
54
+ const on = value.includes(option.value);
55
+ const props = { selected: on, disabled: !on && full, onSelectedChange: (next) => toggle(option, next) };
56
+ return option.marker ? /* @__PURE__ */ jsx(TagChip, { marker: option.marker, ...props, children: option.label }, option.value) : /* @__PURE__ */ jsx(Chip, { ...props, children: option.label }, option.value);
57
+ }),
58
+ creatable && needle && shown.length === 0 && !canCreate && emptyLabel ? /* @__PURE__ */ jsx("p", { className: "m-0 text-xs text-fg-secondary", children: emptyLabel }) : null
59
+ ] }),
60
+ creatable ? /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
61
+ /* @__PURE__ */ jsx(
62
+ "input",
63
+ {
64
+ type: "text",
65
+ value: draft,
66
+ maxLength,
67
+ "aria-label": inputLabel ?? label,
68
+ "aria-controls": listId,
69
+ placeholder,
70
+ onChange: (event) => setDraft(event.target.value),
71
+ onKeyDown: (event) => {
72
+ if (event.key === "Enter") {
73
+ event.preventDefault();
74
+ commit();
75
+ } else if (event.key === "Backspace" && !draft && value.length > 0) {
76
+ onValueChange(value.slice(0, -1));
77
+ } else if (event.key === "Escape" && draft) {
78
+ event.stopPropagation();
79
+ setDraft("");
80
+ }
81
+ },
82
+ className: "h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
83
+ }
84
+ ),
85
+ canCreate ? /* @__PURE__ */ jsxs(Fragment, { children: [
86
+ markerNames ? /* @__PURE__ */ jsx(MarkerPicker, { label: markerLabel ?? label, names: markerNames, value: marker, onValueChange: setMarker }) : null,
87
+ /* @__PURE__ */ jsx(
88
+ "button",
89
+ {
90
+ type: "button",
91
+ onClick: commit,
92
+ className: "inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
93
+ children: createLabel(typed)
94
+ }
95
+ )
96
+ ] }) : null
97
+ ] }) : null,
16
98
  max !== void 0 && countLabel ? /* @__PURE__ */ jsx("p", { className: ["m-0 text-xs", full ? "font-semibold text-fg-accent" : "text-fg-secondary"].join(" "), "aria-live": "polite", children: countLabel(value.length, max) }) : null
17
99
  ] });
18
100
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, what one is looking for: toggle chips with a limit and a count; once it is reached the\n// others rest (disabled) and the count says so.\nimport { Chip } from \"../chip\";\n\nexport type TagOption = { value: string; label: string };\n\nexport type TagSelectorProps = {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached. */\nexport function TagSelector({ label, options, value, onValueChange, max, countLabel, className }: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} className=\"flex flex-wrap gap-2\">\n {options.map((option) => {\n const on = value.includes(option.value);\n return (\n <Chip key={option.value} selected={on} disabled={!on && full} onSelectedChange={(next) => onValueChange(next ? [...value, option.value] : value.filter((v) => v !== option.value))}>\n {option.label}\n </Chip>\n );\n })}\n </div>\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA2BI,SAKQ,KALR;AAHG,SAAS,YAAY,EAAE,OAAO,SAAS,OAAO,eAAe,KAAK,YAAY,UAAU,GAAqB;AAClH,QAAM,OAAO,QAAQ,UAAa,MAAM,UAAU;AAClD,SACE,qBAAC,SAAI,WAAW,CAAC,uBAAuB,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GACzE;AAAA,wBAAC,SAAI,MAAK,SAAQ,cAAY,OAAO,WAAU,wBAC5C,kBAAQ,IAAI,CAAC,WAAW;AACvB,YAAM,KAAK,MAAM,SAAS,OAAO,KAAK;AACtC,aACE,oBAAC,QAAwB,UAAU,IAAI,UAAU,CAAC,MAAM,MAAM,kBAAkB,CAAC,SAAS,cAAc,OAAO,CAAC,GAAG,OAAO,OAAO,KAAK,IAAI,MAAM,OAAO,CAAC,MAAM,MAAM,OAAO,KAAK,CAAC,GAC9K,iBAAO,SADC,OAAO,KAElB;AAAA,IAEJ,CAAC,GACH;AAAA,IACC,QAAQ,UAAa,aACpB,oBAAC,OAAE,WAAW,CAAC,eAAe,OAAO,iCAAiC,mBAAmB,EAAE,KAAK,GAAG,GAAG,aAAU,UAC7G,qBAAW,MAAM,QAAQ,GAAG,GAC/B,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, a workspace's tags: toggle chips with a limit and a count; once it is reached the others\n// rest (disabled) and the count says so. An option with a `marker` is a tag with a colour beside its name (`TagChip`).\n// `creatable` adds a field: Enter takes the typed word — the tag of that name if it exists, else a new one the host creates\n// (`onCreate`, with the marker chosen from the closed palette) — and the typed word narrows the tags offered.\nimport * as React from \"react\";\n\nimport { Chip, type Marker, MarkerPicker, TagChip } from \"../chip\";\n\nexport type TagOption = {\n value: string;\n label: string;\n /** A tag's colour: a name of the closed palette (`@krizaka/organize` `MARKERS`). Without it, a plain chip. */\n marker?: Marker;\n};\n\ntype CreatableProps = {\n /** Adds a field: Enter chooses the tag typed, or asks the host to create it. */\n creatable?: boolean;\n /** Called with the new name (trimmed, as typed) and the marker chosen; the host creates the tag (it may refuse), adds the option and chooses it. */\n onCreate?: (name: string, marker: Marker) => void;\n /** The field's accessible name (\"Add a tag\"), passed translated. */\n inputLabel?: string;\n /** The field's placeholder, passed translated. */\n placeholder?: string;\n /** The create button: `(name) => \"Create “\" + name + \"”\"`, passed translated. */\n createLabel?: (name: string) => string;\n /** The name of each colour, passed translated: shows the colour choice beside the field. */\n markerNames?: Readonly<Record<Marker, string>>;\n /** The colour choice's accessible name (\"Colour of the new tag\"). */\n markerLabel?: string;\n /** The colour a new tag starts with (default `blue`). */\n defaultMarker?: Marker;\n /** The most characters of a name (default 80, the contract's `NAME_MAX`). */\n maxLength?: number;\n /** What is said when nothing matches and creating is not offered (“No tag of that name”), passed translated. */\n emptyLabel?: string;\n};\n\nexport type TagSelectorProps = CreatableProps & {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached; `creatable` types a new one. */\nexport function TagSelector({\n label,\n options,\n value,\n onValueChange,\n max,\n countLabel,\n className,\n creatable,\n onCreate,\n inputLabel,\n placeholder,\n createLabel = (name) => `Create “${name}”`,\n markerNames,\n markerLabel,\n defaultMarker = \"blue\",\n maxLength = 80,\n emptyLabel,\n}: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n const [draft, setDraft] = React.useState(\"\");\n const [marker, setMarker] = React.useState<Marker>(defaultMarker);\n const typed = draft.replace(/\\s+/g, \" \").trim();\n const needle = typed.toLocaleLowerCase();\n const exact = options.find((o) => o.label.toLocaleLowerCase() === needle);\n const shown = creatable && needle ? options.filter((o) => o.label.toLocaleLowerCase().includes(needle) || value.includes(o.value)) : options;\n const canCreate = Boolean(creatable && onCreate && typed && !exact && !full);\n const toggle = (option: TagOption, on: boolean) => onValueChange(on ? [...value, option.value] : value.filter((v) => v !== option.value));\n\n const commit = () => {\n if (!typed) return;\n if (exact) {\n if (!value.includes(exact.value) && !full) onValueChange([...value, exact.value]);\n } else if (canCreate) {\n onCreate?.(typed, marker);\n } else return;\n setDraft(\"\");\n };\n const listId = React.useId();\n\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} id={listId} className=\"flex flex-wrap gap-2\">\n {shown.map((option) => {\n const on = value.includes(option.value);\n const props = { selected: on, disabled: !on && full, onSelectedChange: (next: boolean) => toggle(option, next) };\n return option.marker ? (\n <TagChip key={option.value} marker={option.marker} {...props}>\n {option.label}\n </TagChip>\n ) : (\n <Chip key={option.value} {...props}>\n {option.label}\n </Chip>\n );\n })}\n {creatable && needle && shown.length === 0 && !canCreate && emptyLabel ? <p className=\"m-0 text-xs text-fg-secondary\">{emptyLabel}</p> : null}\n </div>\n {creatable ? (\n <div className=\"flex flex-wrap items-center gap-2\">\n <input\n type=\"text\"\n value={draft}\n maxLength={maxLength}\n aria-label={inputLabel ?? label}\n aria-controls={listId}\n placeholder={placeholder}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n commit();\n } else if (event.key === \"Backspace\" && !draft && value.length > 0) {\n // As in a tag field: Backspace on an empty field takes the last tag back.\n onValueChange(value.slice(0, -1));\n } else if (event.key === \"Escape\" && draft) {\n event.stopPropagation();\n setDraft(\"\");\n }\n }}\n className=\"h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg placeholder:text-fg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n />\n {canCreate ? (\n <>\n {markerNames ? <MarkerPicker label={markerLabel ?? label} names={markerNames} value={marker} onValueChange={setMarker} /> : null}\n <button\n type=\"button\"\n onClick={commit}\n className=\"inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n {createLabel(typed)}\n </button>\n </>\n ) : null}\n </div>\n ) : null}\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAIA,YAAY,WAAW;AA8FjB,SAyCM,UApCA,KALN;AA1CC,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc,CAAC,SAAS,gBAAW,IAAI;AAAA,EACvC;AAAA,EACA;AAAA,EACA,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ;AACF,GAAqB;AACnB,QAAM,OAAO,QAAQ,UAAa,MAAM,UAAU;AAClD,QAAM,CAAC,OAAO,QAAQ,IAAU,eAAS,EAAE;AAC3C,QAAM,CAAC,QAAQ,SAAS,IAAU,eAAiB,aAAa;AAChE,QAAM,QAAQ,MAAM,QAAQ,QAAQ,GAAG,EAAE,KAAK;AAC9C,QAAM,SAAS,MAAM,kBAAkB;AACvC,QAAM,QAAQ,QAAQ,KAAK,CAAC,MAAM,EAAE,MAAM,kBAAkB,MAAM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AAiC,sBAAW,IAAO;AAAA,OAC3I;AAAA,IACC,YACC,qBAAC,SAAI,WAAU,qCACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAO;AAAA,UACP;AAAA,UACA,cAAY,cAAc;AAAA,UAC1B,iBAAe;AAAA,UACf;AAAA,UACA,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA,UAChD,WAAW,CAAC,UAAU;AACpB,gBAAI,MAAM,QAAQ,SAAS;AACzB,oBAAM,eAAe;AACrB,qBAAO;AAAA,YACT,WAAW,MAAM,QAAQ,eAAe,CAAC,SAAS,MAAM,SAAS,GAAG;AAElE,4BAAc,MAAM,MAAM,GAAG,EAAE,CAAC;AAAA,YAClC,WAAW,MAAM,QAAQ,YAAY,OAAO;AAC1C,oBAAM,gBAAgB;AACtB,uBAAS,EAAE;AAAA,YACb;AAAA,UACF;AAAA,UACA,WAAU;AAAA;AAAA,MACZ;AAAA,MACC,YACC,iCACG;AAAA,sBAAc,oBAAC,gBAAa,OAAO,eAAe,OAAO,OAAO,aAAa,OAAO,QAAQ,eAAe,WAAW,IAAK;AAAA,QAC5H;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS;AAAA,YACT,WAAU;AAAA,YAET,sBAAY,KAAK;AAAA;AAAA,QACpB;AAAA,SACF,IACE;AAAA,OACN,IACE;AAAA,IACH,QAAQ,UAAa,aACpB,oBAAC,OAAE,WAAW,CAAC,eAAe,OAAO,iCAAiC,mBAAmB,EAAE,KAAK,GAAG,GAAG,aAAU,UAC7G,qBAAW,MAAM,QAAQ,GAAG,GAC/B,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -13,4 +13,5 @@ type TapedPhotoProps = React.HTMLAttributes<HTMLElement> & {
13
13
  /** A print taped in the notebook: tilted, a white border, a paper shadow, tape at two corners or at the top. */
14
14
  declare function TapedPhoto({ children, caption, tilt, tape, className, style, ...props }: TapedPhotoProps): React.JSX.Element;
15
15
 
16
- export { TapedPhoto, type TapedPhotoProps };
16
+ export { TapedPhoto };
17
+ export type { TapedPhotoProps };
@@ -1,25 +1,8 @@
1
1
  "use client";
2
2
  import {
3
- cn
4
- } from "./chunk-WU4VLSEA.js";
5
-
6
- // src/taped-photo/taped-photo.tsx
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- function TapedPhoto({ children, caption, tilt = -1.6, tape = "corners", className, style, ...props }) {
9
- return /* @__PURE__ */ jsxs(
10
- "figure",
11
- {
12
- className: cn("kz-taped", className),
13
- "data-tape": tape === "corners" ? void 0 : tape,
14
- style: { ...style, ["--kz-taped-tilt"]: `${tilt}deg` },
15
- ...props,
16
- children: [
17
- /* @__PURE__ */ jsx("div", { className: "kz-taped-picture", children }),
18
- caption ? /* @__PURE__ */ jsx("figcaption", { className: "kz-taped-caption", children: caption }) : null
19
- ]
20
- }
21
- );
22
- }
3
+ TapedPhoto
4
+ } from "./chunk-XVXFMVG3.js";
5
+ import "./chunk-WU4VLSEA.js";
23
6
  export {
24
7
  TapedPhoto
25
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/taped-photo/taped-photo.tsx"],"sourcesContent":["// The taped photo of the Cahier (ADR-004, blocks.css): a print stuck in the notebook — slightly tilted, a thin white print\n// border, a soft paper shadow (layered, never a glow), strips of tape. Whatever it holds (an image, a video, a live scene)\n// is its picture; the tilt is a transform, so nothing shifts and the picture keeps its own box. Server-safe: no state.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type TapedPhotoProps = React.HTMLAttributes<HTMLElement> & {\n /** The picture: an `img`, a `video`, a scene. It fills the print. */\n children: React.ReactNode;\n /** A line written under the picture, on the print. */\n caption?: React.ReactNode;\n /** The tilt in degrees (negative leans left); eased on a phone. @default -1.6 */\n tilt?: number;\n /** Where the tape holds it: two opposite `corners`, one strip at the `top`, or `none`. @default \"corners\" */\n tape?: \"corners\" | \"top\" | \"none\";\n};\n\n/** A print taped in the notebook: tilted, a white border, a paper shadow, tape at two corners or at the top. */\nexport function TapedPhoto({ children, caption, tilt = -1.6, tape = \"corners\", className, style, ...props }: TapedPhotoProps) {\n return (\n <figure\n className={cn(\"kz-taped\", className)}\n data-tape={tape === \"corners\" ? undefined : tape}\n style={{ ...style, [\"--kz-taped-tilt\" as string]: `${tilt}deg` }}\n {...props}\n >\n <div className=\"kz-taped-picture\">{children}</div>\n {caption ? <figcaption className=\"kz-taped-caption\">{caption}</figcaption> : null}\n </figure>\n );\n}\n"],"mappings":";;;;;;AAqBI,SAME,KANF;AAFG,SAAS,WAAW,EAAE,UAAU,SAAS,OAAO,MAAM,OAAO,WAAW,WAAW,OAAO,GAAG,MAAM,GAAoB;AAC5H,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC,aAAW,SAAS,YAAY,SAAY;AAAA,MAC5C,OAAO,EAAE,GAAG,OAAO,CAAC,iBAA2B,GAAG,GAAG,IAAI,MAAM;AAAA,MAC9D,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,WAAU,oBAAoB,UAAS;AAAA,QAC3C,UAAU,oBAAC,gBAAW,WAAU,oBAAoB,mBAAQ,IAAgB;AAAA;AAAA;AAAA,EAC/E;AAEJ;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -73,4 +73,5 @@ type TerminalReplayProps = Omit<React.ComponentProps<"figure">, "children" | "ti
73
73
  */
74
74
  declare function TerminalReplay({ steps, label, title, prompt, playLabel, pauseLabel, replayLabel, copyLabel, copiedLabel, typingSpeed, lineDelay, stepDelay, speed, rows, autoPlay, className, style, ...props }: TerminalReplayProps): React.JSX.Element;
75
75
 
76
- export { type TerminalLine, TerminalReplay, type TerminalReplayProps, type TerminalStep, type TerminalTone };
76
+ export { TerminalReplay };
77
+ export type { TerminalLine, TerminalReplayProps, TerminalStep, TerminalTone };
@@ -7,7 +7,7 @@ import {
7
7
  PauseGlyph,
8
8
  PlayGlyph,
9
9
  RetryGlyph
10
- } from "./chunk-KDXRYUD3.js";
10
+ } from "./chunk-5QEXOGO2.js";
11
11
  import {
12
12
  cn
13
13
  } from "./chunk-NSLXEDIS.js";
@@ -60,4 +60,5 @@ declare function textStyleProps(style: unknown): {
60
60
  style: CSSProperties;
61
61
  };
62
62
 
63
- export { type Align, type Case, type FontId, type Leading, type SizeStep, StyledText, type StyledTextProps, type TextStyle, type TextWeight, type ToneId, type Tracking, aligns, cases, defaultTextStyle, fontIds, fontWeights, leadings, parseTextStyle, sizeSteps, textStyleProps, textWeights, toneIds, trackings };
63
+ export { StyledText, aligns, cases, defaultTextStyle, fontIds, fontWeights, leadings, parseTextStyle, sizeSteps, textStyleProps, textWeights, toneIds, trackings };
64
+ export type { Align, Case, FontId, Leading, SizeStep, StyledTextProps, TextStyle, TextWeight, ToneId, Tracking };
@@ -146,4 +146,5 @@ type TextStylePickerProps = {
146
146
  /** The control of a text style: font, size, weight, spacing, alignment, case, italic and tone, with a live preview. */
147
147
  declare function TextStylePicker({ value, onChange, previewText, presets, fields, compact, labels: given, surface, role, minBodySize, className, }: TextStylePickerProps): React.JSX.Element;
148
148
 
149
- export { type Align, type Case, type FontId, type Leading, type SizeStep, StyledText, type StyledTextProps, type TextStyle, type TextStyleField, type TextStyleLabels, TextStylePicker, type TextStylePickerProps, type TextStylePreset, type TextWeight, type ToneId, type Tracking, aligns, bodyTextRatio, cases, contrastRatio, defaultTextStyle, fontIds, fontWeights, isLargeText, largeTextRatio, leadings, parseColor, parseTextStyle, requiredContrast, sizeSteps, textStyleFields, textStyleLabels, textStyleLabelsFr, textStyleProps, textWeights, toneIds, trackings };
149
+ export { StyledText, TextStylePicker, aligns, bodyTextRatio, cases, contrastRatio, defaultTextStyle, fontIds, fontWeights, isLargeText, largeTextRatio, leadings, parseColor, parseTextStyle, requiredContrast, sizeSteps, textStyleFields, textStyleLabels, textStyleLabelsFr, textStyleProps, textWeights, toneIds, trackings };
150
+ export type { Align, Case, FontId, Leading, SizeStep, StyledTextProps, TextStyle, TextStyleField, TextStyleLabels, TextStylePickerProps, TextStylePreset, TextWeight, ToneId, Tracking };
package/dist/theme.d.ts CHANGED
@@ -52,5 +52,25 @@ type ThemeToggleProps = Omit<React.ComponentProps<"button">, "onClick" | "childr
52
52
  * <ThemeProvider> above it. State: `data-mode`.
53
53
  */
54
54
  declare function ThemeToggle({ label, variant, shape, className, ...props }: ThemeToggleProps): React.JSX.Element;
55
+ /** The choices of the Appearance block (ADR-006 §4): the theme (`system · light · dark`, then a surface set), the accent, the density. */
56
+ type AppearanceState = {
57
+ /** `system`, `light`, `dark`, or the surface set (`blueprint`, `carbone`) — which is dark. */
58
+ themeId: string;
59
+ setThemeId: (id: string) => void;
60
+ /** A brand's accent (`data-accent` on `<html>`), or null: the product's own. */
61
+ accent: string | null;
62
+ setAccent: (accent: string | null) => void;
63
+ /** `standard` or `compact` (`data-density` on `<html>`, the token layer: rows and gaps one step down). */
64
+ density: string;
65
+ setDensity: (density: string) => void;
66
+ };
67
+ /**
68
+ * The state of the Appearance block, applied at once and kept in the browser (`kz-theme`, `kz-theme-name`, `kz-accent`,
69
+ * `kz-density`; `ThemeScript` restores them before paint). A product with an account also saves what `onChange` of the block
70
+ * reports, so the choice follows the person. Needs a `ThemeProvider`.
71
+ * @param surfaceSets the themes that are a dark surface set (default `blueprint`, `carbone`)
72
+ */
73
+ declare function useAppearance(surfaceSets?: readonly string[]): AppearanceState;
55
74
 
56
- export { type Mode, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, ThemeScript, type ThemeScriptProps, ThemeToggle, type ThemeToggleProps, useTheme };
75
+ export { ThemeProvider, ThemeScript, ThemeToggle, useAppearance, useTheme };
76
+ export type { AppearanceState, Mode, ThemeContextValue, ThemeProviderProps, ThemeScriptProps, ThemeToggleProps };
package/dist/theme.js CHANGED
@@ -11,6 +11,8 @@ import * as React from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  var MODE_KEY = "kz-theme";
13
13
  var NAME_KEY = "kz-theme-name";
14
+ var ACCENT_KEY = "kz-accent";
15
+ var DENSITY_KEY = "kz-density";
14
16
  var MODES = ["dark", "light", "system"];
15
17
  var DARK_QUERY = "(prefers-color-scheme: dark)";
16
18
  var isMode = (value) => MODES.includes(value);
@@ -52,7 +54,7 @@ function applyName(previous, next) {
52
54
  }
53
55
  function ThemeScript({ nonce, defaultMode = "system" }) {
54
56
  const fallback = isMode(defaultMode) ? defaultMode : "system";
55
- const js = `(function(){try{var m=localStorage.getItem("${MODE_KEY}");if(m!=="dark"&&m!=="light"&&m!=="system")m="${fallback}";var n=localStorage.getItem("${NAME_KEY}");var d=matchMedia("${DARK_QUERY}").matches;var c=document.documentElement.classList;c.toggle("light",m==="light"||(m==="system"&&!d));if(n)c.add("theme-"+n)}catch(e){}})()`;
57
+ const js = `(function(){try{var m=localStorage.getItem("${MODE_KEY}");if(m!=="dark"&&m!=="light"&&m!=="system")m="${fallback}";var n=localStorage.getItem("${NAME_KEY}");var d=matchMedia("${DARK_QUERY}").matches;var c=document.documentElement.classList;c.toggle("light",m==="light"||(m==="system"&&!d));if(n)c.add("theme-"+n);var a=localStorage.getItem("${ACCENT_KEY}");if(a)document.documentElement.setAttribute("data-accent",a);var y=localStorage.getItem("${DENSITY_KEY}");if(y)document.documentElement.setAttribute("data-density",y)}catch(e){}})()`;
56
58
  return /* @__PURE__ */ jsx("script", { nonce, dangerouslySetInnerHTML: { __html: js } });
57
59
  }
58
60
  var ThemeContext = React.createContext(null);
@@ -118,10 +120,44 @@ function ThemeToggle({ label, variant = "ghost", shape, className, ...props }) {
118
120
  }
119
121
  );
120
122
  }
123
+ function applyAttribute(name, value) {
124
+ if (value === null) document.documentElement.removeAttribute(name);
125
+ else document.documentElement.setAttribute(name, value);
126
+ }
127
+ function useAppearance(surfaceSets = ["blueprint", "carbone"]) {
128
+ const { mode, setMode, theme, setTheme } = useTheme();
129
+ const accent = React.useSyncExternalStore(subscribe, () => read(ACCENT_KEY), () => null);
130
+ const density = React.useSyncExternalStore(subscribe, () => read(DENSITY_KEY), () => null) ?? "standard";
131
+ const themeId = theme && surfaceSets.includes(theme) && mode === "dark" ? theme : mode;
132
+ const setThemeId = React.useCallback(
133
+ (id) => {
134
+ if (surfaceSets.includes(id)) {
135
+ setMode("dark");
136
+ setTheme(id);
137
+ } else {
138
+ setTheme(null);
139
+ setMode(id);
140
+ }
141
+ },
142
+ [setMode, setTheme, surfaceSets]
143
+ );
144
+ const setAccent = React.useCallback((next) => {
145
+ applyAttribute("data-accent", next);
146
+ write(ACCENT_KEY, next);
147
+ notify();
148
+ }, []);
149
+ const setDensity = React.useCallback((next) => {
150
+ applyAttribute("data-density", next === "standard" ? null : next);
151
+ write(DENSITY_KEY, next === "standard" ? null : next);
152
+ notify();
153
+ }, []);
154
+ return { themeId, setThemeId, accent, setAccent, density, setDensity };
155
+ }
121
156
  export {
122
157
  ThemeProvider,
123
158
  ThemeScript,
124
159
  ThemeToggle,
160
+ useAppearance,
125
161
  useTheme
126
162
  };
127
163
  //# sourceMappingURL=theme.js.map
package/dist/theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/theme/theme.tsx"],"sourcesContent":["// Client. ONE mechanism for the whole organisation: dark by default, `html.light` for light, `html.theme-<name>` for a\n// named theme, persisted in localStorage (`kz-theme` for the mode, `kz-theme-name` for the named theme).\nimport * as React from \"react\";\n\nimport { type ButtonVariants, buttonVariants } from \"../button/button\";\n\nexport type Mode = \"dark\" | \"light\" | \"system\";\n\nconst MODE_KEY = \"kz-theme\";\nconst NAME_KEY = \"kz-theme-name\";\nconst MODES: readonly Mode[] = [\"dark\", \"light\", \"system\"];\nconst DARK_QUERY = \"(prefers-color-scheme: dark)\";\n\nconst isMode = (value: unknown): value is Mode => MODES.includes(value as Mode);\n\n// Storage blocked (private mode, sandbox): the choice lives in memory for the page.\nconst memory = new Map<string, string>();\n\nfunction read(key: string): string | null {\n try {\n return localStorage.getItem(key);\n } catch {\n return memory.get(key) ?? null;\n }\n}\n\nfunction write(key: string, value: string | null) {\n if (value === null) memory.delete(key);\n else memory.set(key, value);\n try {\n if (value === null) localStorage.removeItem(key);\n else localStorage.setItem(key, value);\n } catch {\n // storage blocked: memory holds it\n }\n}\n\n// The persisted choice is an external store: every provider and tab reads the same value, the server reads none.\nconst listeners = new Set<() => void>();\nconst notify = () => listeners.forEach((listener) => listener());\nfunction subscribe(listener: () => void) {\n listeners.add(listener);\n window.addEventListener(\"storage\", listener);\n return () => {\n listeners.delete(listener);\n window.removeEventListener(\"storage\", listener);\n };\n}\n\nfunction applyMode(mode: Mode) {\n const dark = window.matchMedia(DARK_QUERY).matches;\n document.documentElement.classList.toggle(\"light\", mode === \"light\" || (mode === \"system\" && !dark));\n}\n\nfunction applyName(previous: string | null, next: string | null) {\n const classes = document.documentElement.classList;\n if (previous) classes.remove(`theme-${previous}`);\n if (next) classes.add(`theme-${next}`);\n}\n\nexport type ThemeScriptProps = {\n /** The nonce of a strict Content-Security-Policy (`script-src 'nonce-…'`). */\n nonce?: string;\n /**\n * The mode before the visitor chooses one — pass the same value as `ThemeProvider`'s `defaultMode`. A persisted\n * choice (`kz-theme`) always wins.\n * @default \"system\"\n */\n defaultMode?: Mode;\n};\n\n/**\n * In <head>, before anything renders: applies the persisted mode (else `defaultMode`) and named theme, so the page\n * never flashes. `nonce` for a strict Content-Security-Policy.\n */\nexport function ThemeScript({ nonce, defaultMode = \"system\" }: ThemeScriptProps) {\n const fallback = isMode(defaultMode) ? defaultMode : \"system\";\n const js =\n `(function(){try{var m=localStorage.getItem(\"${MODE_KEY}\");if(m!==\"dark\"&&m!==\"light\"&&m!==\"system\")m=\"${fallback}\";` +\n `var n=localStorage.getItem(\"${NAME_KEY}\");var d=matchMedia(\"${DARK_QUERY}\").matches;var c=document.documentElement.classList;` +\n `c.toggle(\"light\",m===\"light\"||(m===\"system\"&&!d));if(n)c.add(\"theme-\"+n)}catch(e){}})()`;\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: js }} />;\n}\n\nexport type ThemeContextValue = {\n /** The chosen mode: dark, light or follow the system. */\n mode: Mode;\n setMode: (mode: Mode) => void;\n /** The named theme (`html.theme-<name>`), or null. */\n theme: string | null;\n setTheme: (theme: string | null) => void;\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | null>(null);\n\nexport type ThemeProviderProps = {\n children: React.ReactNode;\n /**\n * The mode before the visitor chooses one (nothing persisted as `kz-theme`) — pass the same value to `ThemeScript`.\n * @default \"system\"\n */\n defaultMode?: Mode;\n};\n\nexport function ThemeProvider({ children, defaultMode = \"system\" }: ThemeProviderProps) {\n // Before hydration the server knows nothing persisted (ThemeScript has already applied it to <html>).\n const stored = React.useSyncExternalStore(subscribe, () => read(MODE_KEY), () => null);\n const mode: Mode = isMode(stored) ? stored : defaultMode;\n const theme = React.useSyncExternalStore(subscribe, () => read(NAME_KEY), () => null);\n\n // The same resolution as ThemeScript (a no-op after it), for an app that renders the provider without the script.\n React.useEffect(() => {\n const persisted = read(MODE_KEY);\n applyMode(isMode(persisted) ? persisted : defaultMode);\n }, [defaultMode]);\n\n // \"system\" follows the operating system while the page is open.\n React.useEffect(() => {\n if (mode !== \"system\") return;\n const query = window.matchMedia(DARK_QUERY);\n const onChange = () => applyMode(\"system\");\n query.addEventListener?.(\"change\", onChange);\n return () => query.removeEventListener?.(\"change\", onChange);\n }, [mode]);\n\n const setMode = React.useCallback((next: Mode) => {\n write(MODE_KEY, next);\n applyMode(next);\n notify();\n }, []);\n\n const setTheme = React.useCallback((next: string | null) => {\n applyName(read(NAME_KEY), next);\n write(NAME_KEY, next);\n notify();\n }, []);\n\n const value = React.useMemo(() => ({ mode, setMode, theme, setTheme }), [mode, setMode, theme, setTheme]);\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const context = React.useContext(ThemeContext);\n if (!context) throw new Error(\"useTheme: wrap the app in <ThemeProvider>\");\n return context;\n}\n\nconst ICONS: Record<Mode, React.ReactNode> = {\n dark: <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z\" />,\n light: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </>\n ),\n system: (\n <>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"12\" rx=\"2\" />\n <path d=\"M8 20h8M12 16v4\" />\n </>\n ),\n};\n\nexport type ThemeToggleProps = Omit<React.ComponentProps<\"button\">, \"onClick\" | \"children\"> &\n Pick<ButtonVariants, \"variant\" | \"shape\"> & {\n /** Any `Button` variant. */\n variant?: ButtonVariants[\"variant\"];\n /**\n * rounded · pill.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** The accessible name — a string, or one per current mode (e.g. `(mode) => t(\"theme.\" + mode)`). */\n label: string | ((mode: Mode) => string);\n };\n\n/**\n * An icon button (styled as `IconButton`, without its Slot) that cycles dark → light → system. Needs a\n * <ThemeProvider> above it. State: `data-mode`.\n */\nexport function ThemeToggle({ label, variant = \"ghost\", shape, className, ...props }: ThemeToggleProps) {\n const { mode, setMode } = useTheme();\n const next = MODES[(MODES.indexOf(mode) + 1) % MODES.length] as Mode;\n const name = typeof label === \"function\" ? label(mode) : label;\n return (\n <button\n type=\"button\"\n aria-label={name}\n title={name}\n data-mode={mode}\n onClick={() => setMode(next)}\n className={buttonVariants({ variant, shape, size: \"icon\", className })}\n {...props}\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-5 w-5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n {ICONS[mode]}\n </svg>\n </button>\n );\n}\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AA+Ed,SAqEL,UArEK,KAqEL,YArEK;AAzET,IAAM,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AEO,SAAS,WAA8B;AAC5C,QAAM,UAAgB,iBAAW,YAAY;AAC7C,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,2CAA2C;AACzE,SAAO;AACT;AAEA,IAAM,QAAuC;AAAA,EAC3C,MAAM,oBAAC,UAAK,GAAE,iDAAgD;AAAA,EAC9D,OACE,iCACE;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,sGAAqG;AAAA,KAC/G;AAAA,EAEF,QACE,iCACE;AAAA,wBAAC,UAAK,GAAE,KAAI,GAAE,KAAI,OAAM,MAAK,QAAO,MAAK,IAAG,KAAI;AAAA,IAChD,oBAAC,UAAK,GAAE,mBAAkB;AAAA,KAC5B;AAEJ;AAmBO,SAAS,YAAY,EAAE,OAAO,UAAU,SAAS,OAAO,WAAW,GAAG,MAAM,GAAqB;AACtG,QAAM,EAAE,MAAM,QAAQ,IAAI,SAAS;AACnC,QAAM,OAAO,OAAO,MAAM,QAAQ,IAAI,IAAI,KAAK,MAAM,MAAM;AAC3D,QAAM,OAAO,OAAO,UAAU,aAAa,MAAM,IAAI,IAAI;AACzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,OAAO;AAAA,MACP,aAAW;AAAA,MACX,SAAS,MAAM,QAAQ,IAAI;AAAA,MAC3B,WAAW,eAAe,EAAE,SAAS,OAAO,MAAM,QAAQ,UAAU,CAAC;AAAA,MACpE,GAAG;AAAA,MAEJ,8BAAC,SAAI,SAAQ,aAAY,WAAU,WAAU,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACpJ,gBAAM,IAAI,GACb;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/theme/theme.tsx"],"sourcesContent":["// Client. ONE mechanism for the whole organisation: dark by default, `html.light` for light, `html.theme-<name>` for a\n// named theme, persisted in localStorage (`kz-theme` for the mode, `kz-theme-name` for the named theme).\nimport * as React from \"react\";\n\nimport { type ButtonVariants, buttonVariants } from \"../button/button\";\n\nexport type Mode = \"dark\" | \"light\" | \"system\";\n\nconst MODE_KEY = \"kz-theme\";\nconst NAME_KEY = \"kz-theme-name\";\nconst ACCENT_KEY = \"kz-accent\";\nconst DENSITY_KEY = \"kz-density\";\nconst MODES: readonly Mode[] = [\"dark\", \"light\", \"system\"];\nconst DARK_QUERY = \"(prefers-color-scheme: dark)\";\n\nconst isMode = (value: unknown): value is Mode => MODES.includes(value as Mode);\n\n// Storage blocked (private mode, sandbox): the choice lives in memory for the page.\nconst memory = new Map<string, string>();\n\nfunction read(key: string): string | null {\n try {\n return localStorage.getItem(key);\n } catch {\n return memory.get(key) ?? null;\n }\n}\n\nfunction write(key: string, value: string | null) {\n if (value === null) memory.delete(key);\n else memory.set(key, value);\n try {\n if (value === null) localStorage.removeItem(key);\n else localStorage.setItem(key, value);\n } catch {\n // storage blocked: memory holds it\n }\n}\n\n// The persisted choice is an external store: every provider and tab reads the same value, the server reads none.\nconst listeners = new Set<() => void>();\nconst notify = () => listeners.forEach((listener) => listener());\nfunction subscribe(listener: () => void) {\n listeners.add(listener);\n window.addEventListener(\"storage\", listener);\n return () => {\n listeners.delete(listener);\n window.removeEventListener(\"storage\", listener);\n };\n}\n\nfunction applyMode(mode: Mode) {\n const dark = window.matchMedia(DARK_QUERY).matches;\n document.documentElement.classList.toggle(\"light\", mode === \"light\" || (mode === \"system\" && !dark));\n}\n\nfunction applyName(previous: string | null, next: string | null) {\n const classes = document.documentElement.classList;\n if (previous) classes.remove(`theme-${previous}`);\n if (next) classes.add(`theme-${next}`);\n}\n\nexport type ThemeScriptProps = {\n /** The nonce of a strict Content-Security-Policy (`script-src 'nonce-…'`). */\n nonce?: string;\n /**\n * The mode before the visitor chooses one — pass the same value as `ThemeProvider`'s `defaultMode`. A persisted\n * choice (`kz-theme`) always wins.\n * @default \"system\"\n */\n defaultMode?: Mode;\n};\n\n/**\n * In <head>, before anything renders: applies the persisted mode (else `defaultMode`) and named theme, so the page\n * never flashes. `nonce` for a strict Content-Security-Policy.\n */\nexport function ThemeScript({ nonce, defaultMode = \"system\" }: ThemeScriptProps) {\n const fallback = isMode(defaultMode) ? defaultMode : \"system\";\n const js =\n `(function(){try{var m=localStorage.getItem(\"${MODE_KEY}\");if(m!==\"dark\"&&m!==\"light\"&&m!==\"system\")m=\"${fallback}\";` +\n `var n=localStorage.getItem(\"${NAME_KEY}\");var d=matchMedia(\"${DARK_QUERY}\").matches;var c=document.documentElement.classList;` +\n `c.toggle(\"light\",m===\"light\"||(m===\"system\"&&!d));if(n)c.add(\"theme-\"+n);var a=localStorage.getItem(\"${ACCENT_KEY}\");if(a)document.documentElement.setAttribute(\"data-accent\",a);var y=localStorage.getItem(\"${DENSITY_KEY}\");if(y)document.documentElement.setAttribute(\"data-density\",y)}catch(e){}})()`;\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: js }} />;\n}\n\nexport type ThemeContextValue = {\n /** The chosen mode: dark, light or follow the system. */\n mode: Mode;\n setMode: (mode: Mode) => void;\n /** The named theme (`html.theme-<name>`), or null. */\n theme: string | null;\n setTheme: (theme: string | null) => void;\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | null>(null);\n\nexport type ThemeProviderProps = {\n children: React.ReactNode;\n /**\n * The mode before the visitor chooses one (nothing persisted as `kz-theme`) — pass the same value to `ThemeScript`.\n * @default \"system\"\n */\n defaultMode?: Mode;\n};\n\nexport function ThemeProvider({ children, defaultMode = \"system\" }: ThemeProviderProps) {\n // Before hydration the server knows nothing persisted (ThemeScript has already applied it to <html>).\n const stored = React.useSyncExternalStore(subscribe, () => read(MODE_KEY), () => null);\n const mode: Mode = isMode(stored) ? stored : defaultMode;\n const theme = React.useSyncExternalStore(subscribe, () => read(NAME_KEY), () => null);\n\n // The same resolution as ThemeScript (a no-op after it), for an app that renders the provider without the script.\n React.useEffect(() => {\n const persisted = read(MODE_KEY);\n applyMode(isMode(persisted) ? persisted : defaultMode);\n }, [defaultMode]);\n\n // \"system\" follows the operating system while the page is open.\n React.useEffect(() => {\n if (mode !== \"system\") return;\n const query = window.matchMedia(DARK_QUERY);\n const onChange = () => applyMode(\"system\");\n query.addEventListener?.(\"change\", onChange);\n return () => query.removeEventListener?.(\"change\", onChange);\n }, [mode]);\n\n const setMode = React.useCallback((next: Mode) => {\n write(MODE_KEY, next);\n applyMode(next);\n notify();\n }, []);\n\n const setTheme = React.useCallback((next: string | null) => {\n applyName(read(NAME_KEY), next);\n write(NAME_KEY, next);\n notify();\n }, []);\n\n const value = React.useMemo(() => ({ mode, setMode, theme, setTheme }), [mode, setMode, theme, setTheme]);\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const context = React.useContext(ThemeContext);\n if (!context) throw new Error(\"useTheme: wrap the app in <ThemeProvider>\");\n return context;\n}\n\nconst ICONS: Record<Mode, React.ReactNode> = {\n dark: <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5Z\" />,\n light: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </>\n ),\n system: (\n <>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"12\" rx=\"2\" />\n <path d=\"M8 20h8M12 16v4\" />\n </>\n ),\n};\n\nexport type ThemeToggleProps = Omit<React.ComponentProps<\"button\">, \"onClick\" | \"children\"> &\n Pick<ButtonVariants, \"variant\" | \"shape\"> & {\n /** Any `Button` variant. */\n variant?: ButtonVariants[\"variant\"];\n /**\n * rounded · pill.\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** The accessible name — a string, or one per current mode (e.g. `(mode) => t(\"theme.\" + mode)`). */\n label: string | ((mode: Mode) => string);\n };\n\n/**\n * An icon button (styled as `IconButton`, without its Slot) that cycles dark → light → system. Needs a\n * <ThemeProvider> above it. State: `data-mode`.\n */\nexport function ThemeToggle({ label, variant = \"ghost\", shape, className, ...props }: ThemeToggleProps) {\n const { mode, setMode } = useTheme();\n const next = MODES[(MODES.indexOf(mode) + 1) % MODES.length] as Mode;\n const name = typeof label === \"function\" ? label(mode) : label;\n return (\n <button\n type=\"button\"\n aria-label={name}\n title={name}\n data-mode={mode}\n onClick={() => setMode(next)}\n className={buttonVariants({ variant, shape, size: \"icon\", className })}\n {...props}\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-5 w-5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n {ICONS[mode]}\n </svg>\n </button>\n );\n}\n\n/** The choices of the Appearance block (ADR-006 §4): the theme (`system · light · dark`, then a surface set), the accent, the density. */\nexport type AppearanceState = {\n /** `system`, `light`, `dark`, or the surface set (`blueprint`, `carbone`) — which is dark. */\n themeId: string;\n setThemeId: (id: string) => void;\n /** A brand's accent (`data-accent` on `<html>`), or null: the product's own. */\n accent: string | null;\n setAccent: (accent: string | null) => void;\n /** `standard` or `compact` (`data-density` on `<html>`, the token layer: rows and gaps one step down). */\n density: string;\n setDensity: (density: string) => void;\n};\n\nfunction applyAttribute(name: string, value: string | null) {\n if (value === null) document.documentElement.removeAttribute(name);\n else document.documentElement.setAttribute(name, value);\n}\n\n/**\n * The state of the Appearance block, applied at once and kept in the browser (`kz-theme`, `kz-theme-name`, `kz-accent`,\n * `kz-density`; `ThemeScript` restores them before paint). A product with an account also saves what `onChange` of the block\n * reports, so the choice follows the person. Needs a `ThemeProvider`.\n * @param surfaceSets the themes that are a dark surface set (default `blueprint`, `carbone`)\n */\nexport function useAppearance(surfaceSets: readonly string[] = [\"blueprint\", \"carbone\"]): AppearanceState {\n const { mode, setMode, theme, setTheme } = useTheme();\n const accent = React.useSyncExternalStore(subscribe, () => read(ACCENT_KEY), () => null);\n const density = React.useSyncExternalStore(subscribe, () => read(DENSITY_KEY), () => null) ?? \"standard\";\n const themeId = theme && surfaceSets.includes(theme) && mode === \"dark\" ? theme : mode;\n const setThemeId = React.useCallback(\n (id: string) => {\n if (surfaceSets.includes(id)) {\n setMode(\"dark\");\n setTheme(id);\n } else {\n setTheme(null);\n setMode(id as Mode);\n }\n },\n [setMode, setTheme, surfaceSets],\n );\n const setAccent = React.useCallback((next: string | null) => {\n applyAttribute(\"data-accent\", next);\n write(ACCENT_KEY, next);\n notify();\n }, []);\n const setDensity = React.useCallback((next: string) => {\n applyAttribute(\"data-density\", next === \"standard\" ? null : next);\n write(DENSITY_KEY, next === \"standard\" ? null : next);\n notify();\n }, []);\n return { themeId, setThemeId, accent, setAccent, density, setDensity };\n}\n"],"mappings":";;;;;;;;;AAEA,YAAY,WAAW;AAiFd,SAqEL,UArEK,KAqEL,YArEK;AA3ET,IAAM,WAAW;AACjB,IAAM,WAAW;AACjB,IAAM,aAAa;AACnB,IAAM,cAAc;AACpB,IAAM,QAAyB,CAAC,QAAQ,SAAS,QAAQ;AACzD,IAAM,aAAa;AAEnB,IAAM,SAAS,CAAC,UAAkC,MAAM,SAAS,KAAa;AAG9E,IAAM,SAAS,oBAAI,IAAoB;AAEvC,SAAS,KAAK,KAA4B;AACxC,MAAI;AACF,WAAO,aAAa,QAAQ,GAAG;AAAA,EACjC,QAAQ;AACN,WAAO,OAAO,IAAI,GAAG,KAAK;AAAA,EAC5B;AACF;AAEA,SAAS,MAAM,KAAa,OAAsB;AAChD,MAAI,UAAU,KAAM,QAAO,OAAO,GAAG;AAAA,MAChC,QAAO,IAAI,KAAK,KAAK;AAC1B,MAAI;AACF,QAAI,UAAU,KAAM,cAAa,WAAW,GAAG;AAAA,QAC1C,cAAa,QAAQ,KAAK,KAAK;AAAA,EACtC,QAAQ;AAAA,EAER;AACF;AAGA,IAAM,YAAY,oBAAI,IAAgB;AACtC,IAA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AAW;AAAA,EACjC;AACA,QAAM,YAAkB,kBAAY,CAAC,SAAwB;AAC3D,mBAAe,eAAe,IAAI;AAClC,UAAM,YAAY,IAAI;AACtB,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,aAAmB,kBAAY,CAAC,SAAiB;AACrD,mBAAe,gBAAgB,SAAS,aAAa,OAAO,IAAI;AAChE,UAAM,aAAa,SAAS,aAAa,OAAO,IAAI;AACpD,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,SAAO,EAAE,SAAS,YAAY,QAAQ,WAAW,SAAS,WAAW;AACvE;","names":[]}
package/dist/toast.d.ts CHANGED
@@ -64,4 +64,5 @@ interface GroupedToastOptions extends Omit<ExternalToast, "id"> {
64
64
  */
65
65
  declare function groupedToast(key: string, message: React.ReactNode, { countLabel, onAutoClose, onDismiss, ...options }?: GroupedToastOptions): string | number;
66
66
 
67
- export { type GroupedToastOptions, type ProgressToastOptions, Toaster, type ToasterProps, type UndoToastOptions, groupedToast, progressToast, toastClassNames, undoToast };
67
+ export { Toaster, groupedToast, progressToast, toastClassNames, undoToast };
68
+ export type { GroupedToastOptions, ProgressToastOptions, ToasterProps, UndoToastOptions };
package/dist/toc.d.ts CHANGED
@@ -20,4 +20,5 @@ type TocLayoutProps = React.HTMLAttributes<HTMLDivElement> & {
20
20
  /** A reading page: the table of contents in a sticky column on the left, the sections beside it (one column on a phone). */
21
21
  declare function TocLayout({ toc, children, className, ...props }: TocLayoutProps): React.JSX.Element;
22
22
 
23
- export { Toc, TocLayout, type TocLayoutProps, type TocProps };
23
+ export { Toc, TocLayout };
24
+ export type { TocLayoutProps, TocProps };
package/dist/tooltip.d.ts CHANGED
@@ -21,4 +21,5 @@ type TooltipProps = Omit<React.ComponentProps<typeof Tooltip$1.Content>, "conten
21
21
  };
22
22
  declare function Tooltip({ content, children, open, defaultOpen, onOpenChange, delayDuration, container, sideOffset, collisionPadding, className, ...props }: TooltipProps): React.JSX.Element;
23
23
 
24
- export { Tooltip, type TooltipProps, TooltipProvider };
24
+ export { Tooltip, TooltipProvider };
25
+ export type { TooltipProps };
@@ -110,4 +110,5 @@ type TreeViewProps = {
110
110
  */
111
111
  declare function TreeView({ nodes, "aria-label": label, expanded: expandedProp, defaultExpanded, onExpandedChange, selected: selectedProp, defaultSelected, onSelect, onLoadChildren, loadingLabel, className, }: TreeViewProps): React.JSX.Element;
112
112
 
113
- export { type TreeNode, TreeView, type TreeViewProps, treeView };
113
+ export { TreeView, treeView };
114
+ export type { TreeNode, TreeViewProps };