@krizaka/ui 3.54.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 (814) hide show
  1. package/README.md +1 -0
  2. package/dist/{RotatingWord-D9s7FXFD.d.ts → RotatingWord-COSabR2c.d.ts} +2 -1
  3. package/dist/account-menu.d.ts +8 -3
  4. package/dist/account-menu.js +8 -1
  5. package/dist/account-menu.js.map +1 -1
  6. package/dist/account-settings.d.ts +153 -61
  7. package/dist/account-settings.js +243 -160
  8. package/dist/account-settings.js.map +1 -1
  9. package/dist/achievement.d.ts +2 -1
  10. package/dist/action-bar.d.ts +3 -2
  11. package/dist/activity-feed.d.ts +2 -1
  12. package/dist/agenda.d.ts +2 -1
  13. package/dist/alert.d.ts +2 -1
  14. package/dist/anatomy-plate.d.ts +6 -2
  15. package/dist/anatomy-plate.js +4 -0
  16. package/dist/anatomy-plate.js.map +1 -1
  17. package/dist/app-header/search.d.ts +64 -0
  18. package/dist/app-header/search.js +70 -0
  19. package/dist/app-header/search.js.map +1 -0
  20. package/dist/app-header.d.ts +89 -4
  21. package/dist/app-header.js +63 -5
  22. package/dist/app-header.js.map +1 -1
  23. package/dist/app-shell.d.ts +26 -25
  24. package/dist/app-shell.js +31 -40
  25. package/dist/app-shell.js.map +1 -1
  26. package/dist/argument-card.d.ts +3 -2
  27. package/dist/argument-card.js +3 -3
  28. package/dist/audio-player.d.ts +2 -1
  29. package/dist/auth-layout.d.ts +11 -10
  30. package/dist/avatar/defaults.d.ts +2 -1
  31. package/dist/avatar.d.ts +2 -1
  32. package/dist/badge.d.ts +2 -1
  33. package/dist/bird-plate.d.ts +7 -3
  34. package/dist/bird-plate.js +2 -2
  35. package/dist/bird-plate.js.map +1 -1
  36. package/dist/blocks.css +235 -27
  37. package/dist/button.d.ts +2 -1
  38. package/dist/captcha.d.ts +2 -1
  39. package/dist/captcha.js +1 -0
  40. package/dist/captcha.js.map +1 -1
  41. package/dist/card-grid.d.ts +2 -1
  42. package/dist/card.d.ts +2 -1
  43. package/dist/catalogue-page.d.ts +82 -2
  44. package/dist/catalogue-page.js +156 -13
  45. package/dist/catalogue-page.js.map +1 -1
  46. package/dist/changelog-page.d.ts +2 -1
  47. package/dist/chapter.d.ts +2 -1
  48. package/dist/chat.d.ts +14 -13
  49. package/dist/chat.js +2 -2
  50. package/dist/chat.js.map +1 -1
  51. package/dist/checkbox.d.ts +2 -1
  52. package/dist/checkbox.js +1 -1
  53. package/dist/checkbox.js.map +1 -1
  54. package/dist/chip-link.d.ts +2 -1
  55. package/dist/chip-row.d.ts +8 -7
  56. package/dist/chip.d.ts +55 -1
  57. package/dist/chip.js +14 -98
  58. package/dist/chip.js.map +1 -1
  59. package/dist/choice-grid.d.ts +3 -2
  60. package/dist/choice-grid.js +28 -88
  61. package/dist/choice-grid.js.map +1 -1
  62. package/dist/chunk-27AWSJTK.js +46 -0
  63. package/dist/chunk-27AWSJTK.js.map +1 -0
  64. package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
  65. package/dist/chunk-3X3OF4TI.js.map +1 -0
  66. package/dist/{chunk-KBQD6HE3.js → chunk-4GQH27IT.js} +3 -3
  67. package/dist/{chunk-KBQD6HE3.js.map → chunk-4GQH27IT.js.map} +1 -1
  68. package/dist/{chunk-YHKTYFOQ.js → chunk-5LANVCK7.js} +383 -107
  69. package/dist/chunk-5LANVCK7.js.map +1 -0
  70. package/dist/{chunk-KDXRYUD3.js → chunk-5QEXOGO2.js} +3 -1
  71. package/dist/{chunk-KDXRYUD3.js.map → chunk-5QEXOGO2.js.map} +1 -1
  72. package/dist/chunk-5VEVYDVC.js +11 -0
  73. package/dist/chunk-5VEVYDVC.js.map +1 -0
  74. package/dist/chunk-7J2L4HOD.js +340 -0
  75. package/dist/chunk-7J2L4HOD.js.map +1 -0
  76. package/dist/chunk-BDIU5LZB.js +18 -0
  77. package/dist/chunk-BDIU5LZB.js.map +1 -0
  78. package/dist/chunk-BQ4EOR2O.js +177 -0
  79. package/dist/chunk-BQ4EOR2O.js.map +1 -0
  80. package/dist/chunk-CSRKYZ53.js +39 -0
  81. package/dist/chunk-CSRKYZ53.js.map +1 -0
  82. package/dist/chunk-F6JTHPHE.js +399 -0
  83. package/dist/chunk-F6JTHPHE.js.map +1 -0
  84. package/dist/chunk-HEKDKM5Y.js +128 -0
  85. package/dist/chunk-HEKDKM5Y.js.map +1 -0
  86. package/dist/chunk-KGLRZMCY.js +16 -0
  87. package/dist/chunk-KGLRZMCY.js.map +1 -0
  88. package/dist/chunk-KID32IRJ.js +18 -0
  89. package/dist/chunk-KID32IRJ.js.map +1 -0
  90. package/dist/chunk-OGWB76BR.js +90 -0
  91. package/dist/chunk-OGWB76BR.js.map +1 -0
  92. package/dist/{chunk-4LYKBSOG.js → chunk-USPOIQV5.js} +2 -2
  93. package/dist/chunk-USPOIQV5.js.map +1 -0
  94. package/dist/chunk-UYGUSYIC.js +173 -0
  95. package/dist/chunk-UYGUSYIC.js.map +1 -0
  96. package/dist/{chunk-7NRSPHAF.js → chunk-VB7MWE2N.js} +2 -2
  97. package/dist/{chunk-7NRSPHAF.js.map → chunk-VB7MWE2N.js.map} +1 -1
  98. package/dist/chunk-WOZP3JLW.js +51 -0
  99. package/dist/chunk-WOZP3JLW.js.map +1 -0
  100. package/dist/chunk-XVXFMVG3.js +27 -0
  101. package/dist/chunk-XVXFMVG3.js.map +1 -0
  102. package/dist/chunk-YCZ7N6Q6.js +385 -0
  103. package/dist/chunk-YCZ7N6Q6.js.map +1 -0
  104. package/dist/code-block.d.ts +2 -1
  105. package/dist/code-block.js +81 -98
  106. package/dist/code-block.js.map +1 -1
  107. package/dist/combobox.d.ts +20 -19
  108. package/dist/combobox.js +3 -2
  109. package/dist/command.d.ts +21 -20
  110. package/dist/comparison-table.d.ts +2 -1
  111. package/dist/component-page.d.ts +6 -2
  112. package/dist/component-page.js +5 -0
  113. package/dist/component-page.js.map +1 -1
  114. package/dist/confirm-button.d.ts +2 -1
  115. package/dist/contact-page.d.ts +2 -1
  116. package/dist/continue-prompt.d.ts +6 -2
  117. package/dist/continue-prompt.js +4 -0
  118. package/dist/continue-prompt.js.map +1 -1
  119. package/dist/countdown.d.ts +2 -1
  120. package/dist/cover-hero.d.ts +20 -19
  121. package/dist/cover-hero.js +25 -42
  122. package/dist/cover-hero.js.map +1 -1
  123. package/dist/cta-panel.d.ts +2 -1
  124. package/dist/dashboard-layout.d.ts +50 -2
  125. package/dist/dashboard-layout.js +66 -11
  126. package/dist/dashboard-layout.js.map +1 -1
  127. package/dist/data-table.d.ts +103 -4
  128. package/dist/data-table.js +23 -7
  129. package/dist/date-picker.d.ts +29 -28
  130. package/dist/date-picker.js +2 -2
  131. package/dist/date-picker.js.map +1 -1
  132. package/dist/decision-list.d.ts +2 -1
  133. package/dist/description-list.d.ts +2 -1
  134. package/dist/detail-layout.d.ts +147 -3
  135. package/dist/detail-layout.js +143 -17
  136. package/dist/detail-layout.js.map +1 -1
  137. package/dist/{dialog-D42QwYb_.d.ts → dialog-DpUwec2g.d.ts} +2 -1
  138. package/dist/dialog.d.ts +3 -2
  139. package/dist/docs-article-page.d.ts +2 -1
  140. package/dist/docs-hub-page.d.ts +2 -1
  141. package/dist/docs-layout.d.ts +2 -1
  142. package/dist/docs-nav.d.ts +3 -10
  143. package/dist/document-viewer.d.ts +5 -4
  144. package/dist/doodle.d.ts +32 -0
  145. package/dist/doodle.js +70 -0
  146. package/dist/doodle.js.map +1 -0
  147. package/dist/drop-overlay.d.ts +14 -5
  148. package/dist/drop-overlay.js +16 -6
  149. package/dist/drop-overlay.js.map +1 -1
  150. package/dist/dropdown-menu.d.ts +2 -1
  151. package/dist/dropdown-menu.js +13 -74
  152. package/dist/dropdown-menu.js.map +1 -1
  153. package/dist/elephant.d.ts +4 -1
  154. package/dist/elephant.js +4 -0
  155. package/dist/elephant.js.map +1 -1
  156. package/dist/empty-state.d.ts +2 -1
  157. package/dist/engine-flow.d.ts +2 -1
  158. package/dist/error-page.d.ts +2 -1
  159. package/dist/field.js +1 -1
  160. package/dist/field.js.map +1 -1
  161. package/dist/file-upload.d.ts +14 -13
  162. package/dist/filter-bar.d.ts +84 -11
  163. package/dist/filter-bar.js +6 -2
  164. package/dist/flock.d.ts +3 -2
  165. package/dist/footnote.d.ts +2 -1
  166. package/dist/force-update-screen.d.ts +13 -8
  167. package/dist/force-update-screen.js +4 -0
  168. package/dist/force-update-screen.js.map +1 -1
  169. package/dist/form/server.d.ts +2 -1
  170. package/dist/form.d.ts +2 -1
  171. package/dist/gallery-page.d.ts +6 -2
  172. package/dist/gallery-page.js +4 -0
  173. package/dist/gallery-page.js.map +1 -1
  174. package/dist/genui.d.ts +2 -1
  175. package/dist/genui.js +5 -5
  176. package/dist/{geometry-DX-W-Yyf.d.ts → geometry-DZ4Q3hDQ.d.ts} +2 -1
  177. package/dist/glossary-term.d.ts +2 -1
  178. package/dist/glossary.d.ts +2 -1
  179. package/dist/glow-card.d.ts +2 -1
  180. package/dist/goal-gauge.d.ts +2 -1
  181. package/dist/grade-stamp.d.ts +23 -0
  182. package/dist/grade-stamp.js +42 -0
  183. package/dist/grade-stamp.js.map +1 -0
  184. package/dist/how-it-works-page.d.ts +2 -1
  185. package/dist/image-cropper.d.ts +15 -6
  186. package/dist/image-cropper.js +4 -0
  187. package/dist/image-cropper.js.map +1 -1
  188. package/dist/index.d.ts +3 -2
  189. package/dist/index.js +4 -4
  190. package/dist/iso.d.ts +2 -1
  191. package/dist/kanban.d.ts +5 -1
  192. package/dist/kanban.js +4 -0
  193. package/dist/kanban.js.map +1 -1
  194. package/dist/kbd.d.ts +2 -1
  195. package/dist/kind-config-editor.d.ts +152 -0
  196. package/dist/kind-config-editor.js +574 -0
  197. package/dist/kind-config-editor.js.map +1 -0
  198. package/dist/kpi-explained.d.ts +2 -1
  199. package/dist/landing-page.d.ts +2 -1
  200. package/dist/landscape.d.ts +6 -2
  201. package/dist/landscape.js +4 -0
  202. package/dist/landscape.js.map +1 -1
  203. package/dist/language-switch/server.d.ts +2 -1
  204. package/dist/language-switch.d.ts +11 -10
  205. package/dist/legal-page.d.ts +2 -1
  206. package/dist/link-card.d.ts +2 -1
  207. package/dist/list.d.ts +2 -1
  208. package/dist/list.js +1 -1
  209. package/dist/loader.d.ts +2 -1
  210. package/dist/longform-page.d.ts +2 -1
  211. package/dist/maintenance-screen.d.ts +10 -5
  212. package/dist/maintenance-screen.js +4 -0
  213. package/dist/maintenance-screen.js.map +1 -1
  214. package/dist/map.d.ts +8 -7
  215. package/dist/map.js +30 -0
  216. package/dist/map.js.map +1 -1
  217. package/dist/markdown.d.ts +7 -2
  218. package/dist/markdown.js +12 -5
  219. package/dist/markdown.js.map +1 -1
  220. package/dist/marketing-layout.d.ts +5 -4
  221. package/dist/marquee.d.ts +2 -1
  222. package/dist/mascot-quote.d.ts +2 -1
  223. package/dist/mascot-state.d.ts +3 -2
  224. package/dist/mascots.d.ts +4 -3
  225. package/dist/match-dialog.d.ts +6 -2
  226. package/dist/match-dialog.js +4 -0
  227. package/dist/match-dialog.js.map +1 -1
  228. package/dist/media-capture.d.ts +11 -5
  229. package/dist/media-capture.js +4 -0
  230. package/dist/media-capture.js.map +1 -1
  231. package/dist/media-gallery.d.ts +2 -1
  232. package/dist/media-grid.d.ts +3 -10
  233. package/dist/meta-row.d.ts +2 -1
  234. package/dist/meter.d.ts +2 -1
  235. package/dist/meter.js +5 -121
  236. package/dist/meter.js.map +1 -1
  237. package/dist/motion.d.ts +3 -2
  238. package/dist/native/form.d.ts +2 -1
  239. package/dist/native/list.d.ts +2 -1
  240. package/dist/native/map.d.ts +2 -1
  241. package/dist/native/map.js +30 -0
  242. package/dist/native/map.js.map +1 -1
  243. package/dist/native/markdown.d.ts +11 -3
  244. package/dist/native/markdown.js +46 -7
  245. package/dist/native/markdown.js.map +1 -1
  246. package/dist/native/media-capture.d.ts +3 -1
  247. package/dist/native/media-capture.js +5 -0
  248. package/dist/native/media-capture.js.map +1 -1
  249. package/dist/native/media-picker.d.ts +2 -1
  250. package/dist/native/vertical-video.d.ts +10 -3
  251. package/dist/native/vertical-video.js +6 -0
  252. package/dist/native/vertical-video.js.map +1 -1
  253. package/dist/native/video-player.d.ts +2 -1
  254. package/dist/native.d.ts +323 -4
  255. package/dist/native.js +1974 -1348
  256. package/dist/native.js.map +1 -1
  257. package/dist/nav-bar/me.d.ts +33 -0
  258. package/dist/nav-bar/me.js +23 -0
  259. package/dist/nav-bar/me.js.map +1 -0
  260. package/dist/nav-bar.d.ts +61 -2
  261. package/dist/nav-bar.js +92 -48
  262. package/dist/nav-bar.js.map +1 -1
  263. package/dist/next-actions.d.ts +2 -1
  264. package/dist/notification-preferences.d.ts +152 -0
  265. package/dist/notification-preferences.js +78 -0
  266. package/dist/notification-preferences.js.map +1 -0
  267. package/dist/number-ticker.d.ts +2 -1
  268. package/dist/opening-hours.d.ts +2 -1
  269. package/dist/page-header.d.ts +2 -1
  270. package/dist/page-header.js +1 -1
  271. package/dist/page-header.js.map +1 -1
  272. package/dist/page-hero.d.ts +2 -1
  273. package/dist/page-index.d.ts +2 -1
  274. package/dist/page.d.ts +2 -1
  275. package/dist/pagination.d.ts +2 -1
  276. package/dist/photo-grid.d.ts +2 -1
  277. package/dist/pointer-light.d.ts +2 -1
  278. package/dist/pointer-light.js +5 -0
  279. package/dist/pointer-light.js.map +1 -1
  280. package/dist/popover.d.ts +2 -1
  281. package/dist/pricing-page.d.ts +2 -1
  282. package/dist/product-page.d.ts +6 -2
  283. package/dist/product-page.js +4 -0
  284. package/dist/product-page.js.map +1 -1
  285. package/dist/profile-card.d.ts +120 -1
  286. package/dist/profile-card.js +68 -21
  287. package/dist/profile-card.js.map +1 -1
  288. package/dist/progress.d.ts +2 -1
  289. package/dist/promise-card.d.ts +6 -2
  290. package/dist/promise-card.js +4 -0
  291. package/dist/promise-card.js.map +1 -1
  292. package/dist/quota-meter.d.ts +114 -0
  293. package/dist/quota-meter.js +58 -0
  294. package/dist/quota-meter.js.map +1 -0
  295. package/dist/radio-group.d.ts +2 -1
  296. package/dist/radio-group.js +7 -9
  297. package/dist/radio-group.js.map +1 -1
  298. package/dist/rail-nav.d.ts +35 -18
  299. package/dist/rail-nav.js +45 -56
  300. package/dist/rail-nav.js.map +1 -1
  301. package/dist/recipes.d.ts +2 -1
  302. package/dist/retro-tv.d.ts +31 -0
  303. package/dist/retro-tv.js +124 -0
  304. package/dist/retro-tv.js.map +1 -0
  305. package/dist/router.d.ts +13 -1
  306. package/dist/router.js +85 -8
  307. package/dist/router.js.map +1 -1
  308. package/dist/scroll-stage.d.ts +7 -2
  309. package/dist/scroll-stage.js +5 -0
  310. package/dist/scroll-stage.js.map +1 -1
  311. package/dist/search-field.d.ts +2 -1
  312. package/dist/search-field.js +1 -1
  313. package/dist/section-backdrop.d.ts +2 -1
  314. package/dist/separator.d.ts +2 -1
  315. package/dist/service-card.d.ts +9 -8
  316. package/dist/settings-layout.d.ts +2 -1
  317. package/dist/settings-layout.js +10 -324
  318. package/dist/settings-layout.js.map +1 -1
  319. package/dist/showcase.d.ts +11 -3
  320. package/dist/showcase.js +5 -0
  321. package/dist/showcase.js.map +1 -1
  322. package/dist/signature.d.ts +20 -0
  323. package/dist/signature.js +39 -0
  324. package/dist/signature.js.map +1 -0
  325. package/dist/site-cahier.d.ts +187 -0
  326. package/dist/site-cahier.js +844 -0
  327. package/dist/site-cahier.js.map +1 -0
  328. package/dist/site-footer.d.ts +2 -1
  329. package/dist/site-footer.js +1 -1
  330. package/dist/sites.d.ts +2 -1
  331. package/dist/sites.js +1 -1
  332. package/dist/sites.js.map +1 -1
  333. package/dist/skeleton.d.ts +2 -1
  334. package/dist/skip-link.d.ts +2 -1
  335. package/dist/slider.d.ts +2 -1
  336. package/dist/slot-picker.d.ts +86 -13
  337. package/dist/slot-picker.js +98 -16
  338. package/dist/slot-picker.js.map +1 -1
  339. package/dist/slot.d.ts +1 -1
  340. package/dist/specimen-tag.d.ts +2 -1
  341. package/dist/speed-lines.d.ts +19 -0
  342. package/dist/speed-lines.js +45 -0
  343. package/dist/speed-lines.js.map +1 -0
  344. package/dist/spinner.d.ts +2 -1
  345. package/dist/split-view.d.ts +2 -1
  346. package/dist/stage-banner.d.ts +2 -1
  347. package/dist/stat.d.ts +2 -1
  348. package/dist/stat.js +1 -1
  349. package/dist/stat.js.map +1 -1
  350. package/dist/status-chip.d.ts +44 -0
  351. package/dist/status-chip.js +137 -0
  352. package/dist/status-chip.js.map +1 -0
  353. package/dist/status-page.d.ts +6 -2
  354. package/dist/status-page.js +5 -0
  355. package/dist/status-page.js.map +1 -1
  356. package/dist/step-progress.d.ts +2 -1
  357. package/dist/step-showcase.d.ts +2 -1
  358. package/dist/stepper.d.ts +2 -1
  359. package/dist/sticky-action.d.ts +28 -5
  360. package/dist/sticky-action.js +10 -4
  361. package/dist/sticky-action.js.map +1 -1
  362. package/dist/stuck.d.ts +28 -0
  363. package/dist/stuck.js +26 -0
  364. package/dist/stuck.js.map +1 -0
  365. package/dist/swipe-deck.d.ts +11 -3
  366. package/dist/swipe-deck.js +5 -0
  367. package/dist/swipe-deck.js.map +1 -1
  368. package/dist/switch.d.ts +2 -1
  369. package/dist/switch.js +4 -32
  370. package/dist/switch.js.map +1 -1
  371. package/dist/tabs.d.ts +48 -8
  372. package/dist/tabs.js +62 -12
  373. package/dist/tabs.js.map +1 -1
  374. package/dist/tag-input.d.ts +2 -1
  375. package/dist/tag-input.js +3 -2
  376. package/dist/tag-input.js.map +1 -1
  377. package/dist/tag-selector.d.ts +30 -4
  378. package/dist/tag-selector.js +90 -8
  379. package/dist/tag-selector.js.map +1 -1
  380. package/dist/taped-photo.d.ts +2 -1
  381. package/dist/taped-photo.js +3 -20
  382. package/dist/taped-photo.js.map +1 -1
  383. package/dist/terminal-replay.d.ts +6 -2
  384. package/dist/terminal-replay.js +5 -1
  385. package/dist/terminal-replay.js.map +1 -1
  386. package/dist/text-style/server.d.ts +2 -1
  387. package/dist/text-style.d.ts +2 -1
  388. package/dist/theme.d.ts +21 -1
  389. package/dist/theme.js +37 -1
  390. package/dist/theme.js.map +1 -1
  391. package/dist/toast.d.ts +2 -1
  392. package/dist/toc.d.ts +2 -1
  393. package/dist/tooltip.d.ts +2 -1
  394. package/dist/tree-view.d.ts +2 -1
  395. package/dist/tree-view.js +4 -0
  396. package/dist/tree-view.js.map +1 -1
  397. package/dist/update-prompt.d.ts +16 -11
  398. package/dist/update-prompt.js +4 -0
  399. package/dist/update-prompt.js.map +1 -1
  400. package/dist/upload-queue.d.ts +2 -1
  401. package/dist/verified-badge.d.ts +2 -1
  402. package/dist/versus-card.d.ts +40 -0
  403. package/dist/versus-card.js +40 -0
  404. package/dist/versus-card.js.map +1 -0
  405. package/dist/vertical-video.d.ts +2 -1
  406. package/dist/video-player.d.ts +20 -19
  407. package/dist/video-player.js +7 -376
  408. package/dist/video-player.js.map +1 -1
  409. package/dist/video-trimmer.d.ts +8 -2
  410. package/dist/video-trimmer.js +4 -0
  411. package/dist/video-trimmer.js.map +1 -1
  412. package/dist/virtual.d.ts +8 -7
  413. package/dist/waveform.d.ts +2 -1
  414. package/package.json +249 -52
  415. package/registry/account-menu.json +9 -8
  416. package/registry/account-settings.json +258 -6
  417. package/registry/achievement.json +3 -4
  418. package/registry/action-bar.json +3 -3
  419. package/registry/action-sheet.json +1 -0
  420. package/registry/activity-feed.json +2 -1
  421. package/registry/agenda.json +1 -1
  422. package/registry/alert.json +1 -1
  423. package/registry/anatomy-plate.json +13 -5
  424. package/registry/app-header.json +470 -23
  425. package/registry/app-shell.json +2 -2
  426. package/registry/argument-card.json +1 -1
  427. package/registry/audio-player.json +1 -1
  428. package/registry/auth-layout.json +1 -1
  429. package/registry/avatar.json +3 -2
  430. package/registry/badge.json +2 -1
  431. package/registry/bird-plate.json +16 -2
  432. package/registry/button.json +7 -6
  433. package/registry/captcha.json +1 -1
  434. package/registry/card-grid.json +1 -1
  435. package/registry/card.json +7 -6
  436. package/registry/catalogue-page.json +117 -8
  437. package/registry/changelog-page.json +3 -5
  438. package/registry/chapter.json +1 -1
  439. package/registry/chat.json +3 -2
  440. package/registry/checkbox.json +4 -3
  441. package/registry/chip-link.json +2 -2
  442. package/registry/chip-row.json +2 -2
  443. package/registry/chip.json +388 -12
  444. package/registry/choice-grid.json +3 -4
  445. package/registry/code-block.json +1 -1
  446. package/registry/combobox.json +3 -2
  447. package/registry/command.json +2 -2
  448. package/registry/comparison-table.json +1 -1
  449. package/registry/component-page.json +14 -5
  450. package/registry/confirm-button.json +4 -4
  451. package/registry/contact-page.json +1 -1
  452. package/registry/continue-prompt.json +13 -5
  453. package/registry/countdown.json +4 -3
  454. package/registry/cover-hero.json +3 -4
  455. package/registry/cta-panel.json +1 -1
  456. package/registry/dashboard-layout.json +91 -5
  457. package/registry/data-table.json +215 -8
  458. package/registry/date-picker.json +5 -4
  459. package/registry/decision-list.json +1 -1
  460. package/registry/description-list.json +2 -1
  461. package/registry/detail-layout.json +226 -8
  462. package/registry/dialog.json +7 -6
  463. package/registry/docs-article-page.json +3 -4
  464. package/registry/docs-hub-page.json +1 -1
  465. package/registry/docs-layout.json +1 -1
  466. package/registry/docs-nav.json +1 -1
  467. package/registry/document-viewer.json +3 -5
  468. package/registry/doodle.json +302 -0
  469. package/registry/drop-overlay.json +30 -16
  470. package/registry/dropdown-menu.json +2 -2
  471. package/registry/elephant.json +15 -7
  472. package/registry/empty-state.json +2 -1
  473. package/registry/engine-flow.json +1 -1
  474. package/registry/error-page.json +3 -5
  475. package/registry/examples/account-settings/appearance.d.ts +4 -0
  476. package/registry/examples/account-settings/appearance.js +40 -0
  477. package/registry/examples/account-settings/appearance.tsx +30 -0
  478. package/registry/examples/app-header/family.d.ts +4 -0
  479. package/registry/examples/app-header/family.js +41 -0
  480. package/registry/examples/app-header/family.tsx +37 -0
  481. package/registry/examples/app-header/native/family.d.ts +4 -0
  482. package/registry/examples/app-header/native/family.dark.png +0 -0
  483. package/registry/examples/app-header/native/family.js +25 -0
  484. package/registry/examples/app-header/native/family.light.png +0 -0
  485. package/registry/examples/app-header/native/family.tsx +33 -0
  486. package/registry/examples/catalogue-page/clients.d.ts +4 -0
  487. package/registry/examples/catalogue-page/clients.js +49 -0
  488. package/registry/examples/catalogue-page/clients.tsx +61 -0
  489. package/registry/examples/chip/marker-picker.d.ts +4 -0
  490. package/registry/examples/chip/marker-picker.js +17 -0
  491. package/registry/examples/chip/marker-picker.tsx +17 -0
  492. package/registry/examples/chip/native/marker-picker.d.ts +4 -0
  493. package/registry/examples/chip/native/marker-picker.dark.png +0 -0
  494. package/registry/examples/chip/native/marker-picker.js +18 -0
  495. package/registry/examples/chip/native/marker-picker.light.png +0 -0
  496. package/registry/examples/chip/native/marker-picker.tsx +16 -0
  497. package/registry/examples/chip/native/tags.d.ts +4 -0
  498. package/registry/examples/chip/native/tags.dark.png +0 -0
  499. package/registry/examples/chip/native/tags.js +22 -0
  500. package/registry/examples/chip/native/tags.light.png +0 -0
  501. package/registry/examples/chip/native/tags.tsx +20 -0
  502. package/registry/examples/chip/tags.d.ts +4 -0
  503. package/registry/examples/chip/tags.js +26 -0
  504. package/registry/examples/chip/tags.tsx +23 -0
  505. package/registry/examples/dashboard-layout/today.d.ts +4 -0
  506. package/registry/examples/dashboard-layout/today.js +54 -0
  507. package/registry/examples/dashboard-layout/today.tsx +63 -0
  508. package/registry/examples/data-table/applicant-files.d.ts +4 -0
  509. package/registry/examples/data-table/applicant-files.js +24 -0
  510. package/registry/examples/data-table/applicant-files.tsx +23 -0
  511. package/registry/examples/data-table/bulk.d.ts +4 -0
  512. package/registry/examples/data-table/bulk.js +45 -0
  513. package/registry/examples/data-table/bulk.tsx +34 -0
  514. package/registry/examples/data-table/checks.d.ts +4 -0
  515. package/registry/examples/data-table/checks.js +25 -0
  516. package/registry/examples/data-table/checks.tsx +24 -0
  517. package/registry/examples/detail-layout/client.d.ts +4 -0
  518. package/registry/examples/detail-layout/client.js +40 -0
  519. package/registry/examples/detail-layout/client.tsx +39 -0
  520. package/registry/examples/detail-layout/new-invoice.d.ts +4 -0
  521. package/registry/examples/detail-layout/new-invoice.js +44 -0
  522. package/registry/examples/detail-layout/new-invoice.tsx +34 -0
  523. package/registry/examples/detail-layout/profile.d.ts +4 -0
  524. package/registry/examples/detail-layout/profile.js +26 -0
  525. package/registry/examples/detail-layout/profile.tsx +21 -0
  526. package/registry/examples/doodle/bird-sketch.d.ts +4 -0
  527. package/registry/examples/doodle/bird-sketch.js +11 -0
  528. package/registry/examples/doodle/bird-sketch.tsx +12 -0
  529. package/registry/examples/doodle/kinds.d.ts +4 -0
  530. package/registry/examples/doodle/kinds.js +17 -0
  531. package/registry/examples/doodle/kinds.tsx +14 -0
  532. package/registry/examples/doodle/margin-marks.d.ts +4 -0
  533. package/registry/examples/doodle/margin-marks.js +27 -0
  534. package/registry/examples/doodle/margin-marks.tsx +19 -0
  535. package/registry/examples/doodle/margin.d.ts +4 -0
  536. package/registry/examples/doodle/margin.js +17 -0
  537. package/registry/examples/doodle/margin.tsx +17 -0
  538. package/registry/examples/filter-bar/views.d.ts +4 -0
  539. package/registry/examples/filter-bar/views.js +39 -0
  540. package/registry/examples/filter-bar/views.tsx +30 -0
  541. package/registry/examples/grade-stamp/coverage.d.ts +4 -0
  542. package/registry/examples/grade-stamp/coverage.js +12 -0
  543. package/registry/examples/grade-stamp/coverage.tsx +8 -0
  544. package/registry/examples/grade-stamp/lighthouse.d.ts +4 -0
  545. package/registry/examples/grade-stamp/lighthouse.js +12 -0
  546. package/registry/examples/grade-stamp/lighthouse.tsx +14 -0
  547. package/registry/examples/kind-config-editor/derived.d.ts +4 -0
  548. package/registry/examples/kind-config-editor/derived.js +26 -0
  549. package/registry/examples/kind-config-editor/derived.tsx +16 -0
  550. package/registry/examples/kind-config-editor/native/status-set.d.ts +4 -0
  551. package/registry/examples/kind-config-editor/native/status-set.dark.png +0 -0
  552. package/registry/examples/kind-config-editor/native/status-set.js +22 -0
  553. package/registry/examples/kind-config-editor/native/status-set.light.png +0 -0
  554. package/registry/examples/kind-config-editor/native/status-set.tsx +19 -0
  555. package/registry/examples/kind-config-editor/native/tag-set.d.ts +4 -0
  556. package/registry/examples/kind-config-editor/native/tag-set.dark.png +0 -0
  557. package/registry/examples/kind-config-editor/native/tag-set.js +20 -0
  558. package/registry/examples/kind-config-editor/native/tag-set.light.png +0 -0
  559. package/registry/examples/kind-config-editor/native/tag-set.tsx +18 -0
  560. package/registry/examples/kind-config-editor/status-set.d.ts +4 -0
  561. package/registry/examples/kind-config-editor/status-set.js +29 -0
  562. package/registry/examples/kind-config-editor/status-set.tsx +25 -0
  563. package/registry/examples/kind-config-editor/tag-set.d.ts +4 -0
  564. package/registry/examples/kind-config-editor/tag-set.js +20 -0
  565. package/registry/examples/kind-config-editor/tag-set.tsx +18 -0
  566. package/registry/examples/markdown/native/basic.dark.png +0 -0
  567. package/registry/examples/markdown/native/basic.light.png +0 -0
  568. package/registry/examples/markdown/native/wide-table.d.ts +4 -0
  569. package/registry/examples/markdown/native/wide-table.dark.png +0 -0
  570. package/registry/examples/markdown/native/wide-table.js +23 -0
  571. package/registry/examples/markdown/native/wide-table.light.png +0 -0
  572. package/registry/examples/markdown/native/wide-table.tsx +22 -0
  573. package/registry/examples/markdown/wide-table.d.ts +4 -0
  574. package/registry/examples/markdown/wide-table.js +28 -0
  575. package/registry/examples/markdown/wide-table.tsx +23 -0
  576. package/registry/examples/nav-bar/family-product.js +2 -4
  577. package/registry/examples/nav-bar/family-product.tsx +3 -5
  578. package/registry/examples/notification-preferences/default.d.ts +4 -0
  579. package/registry/examples/notification-preferences/default.js +29 -0
  580. package/registry/examples/notification-preferences/default.tsx +28 -0
  581. package/registry/examples/profile-card/banner.d.ts +4 -0
  582. package/registry/examples/profile-card/banner.js +28 -0
  583. package/registry/examples/profile-card/banner.tsx +24 -0
  584. package/registry/examples/profile-card/native/banner.d.ts +4 -0
  585. package/registry/examples/profile-card/native/banner.dark.png +0 -0
  586. package/registry/examples/profile-card/native/banner.js +22 -0
  587. package/registry/examples/profile-card/native/banner.light.png +0 -0
  588. package/registry/examples/profile-card/native/banner.tsx +18 -0
  589. package/registry/examples/quota-meter/default.d.ts +4 -0
  590. package/registry/examples/quota-meter/default.js +26 -0
  591. package/registry/examples/quota-meter/default.tsx +20 -0
  592. package/registry/examples/quota-meter/full.d.ts +4 -0
  593. package/registry/examples/quota-meter/full.js +25 -0
  594. package/registry/examples/quota-meter/full.tsx +18 -0
  595. package/registry/examples/rail-nav/shortcuts.d.ts +4 -0
  596. package/registry/examples/rail-nav/shortcuts.js +49 -0
  597. package/registry/examples/rail-nav/shortcuts.tsx +40 -0
  598. package/registry/examples/retro-tv/cabinet.d.ts +4 -0
  599. package/registry/examples/retro-tv/cabinet.js +12 -0
  600. package/registry/examples/retro-tv/cabinet.tsx +7 -0
  601. package/registry/examples/retro-tv/portable.d.ts +4 -0
  602. package/registry/examples/retro-tv/portable.js +12 -0
  603. package/registry/examples/retro-tv/portable.tsx +7 -0
  604. package/registry/examples/signature/both.d.ts +4 -0
  605. package/registry/examples/signature/both.js +11 -0
  606. package/registry/examples/signature/both.tsx +6 -0
  607. package/registry/examples/signature/variants.d.ts +4 -0
  608. package/registry/examples/signature/variants.js +14 -0
  609. package/registry/examples/signature/variants.tsx +11 -0
  610. package/registry/examples/site-cahier/java-releases.d.ts +4 -0
  611. package/registry/examples/site-cahier/java-releases.js +33 -0
  612. package/registry/examples/site-cahier/java-releases.tsx +32 -0
  613. package/registry/examples/site-cahier/motion-lab.d.ts +4 -0
  614. package/registry/examples/site-cahier/motion-lab.js +32 -0
  615. package/registry/examples/site-cahier/motion-lab.tsx +29 -0
  616. package/registry/examples/site-cahier/ts-changelog.d.ts +4 -0
  617. package/registry/examples/site-cahier/ts-changelog.js +24 -0
  618. package/registry/examples/site-cahier/ts-changelog.tsx +20 -0
  619. package/registry/examples/site-cahier/ts-doc.d.ts +4 -0
  620. package/registry/examples/site-cahier/ts-doc.js +38 -0
  621. package/registry/examples/site-cahier/ts-doc.tsx +27 -0
  622. package/registry/examples/site-cahier/ui-home.d.ts +4 -0
  623. package/registry/examples/site-cahier/ui-home.js +46 -0
  624. package/registry/examples/site-cahier/ui-home.tsx +40 -0
  625. package/registry/examples/slot-picker/weeks.d.ts +4 -0
  626. package/registry/examples/slot-picker/weeks.js +45 -0
  627. package/registry/examples/slot-picker/weeks.tsx +28 -0
  628. package/registry/examples/speed-lines/hero.d.ts +4 -0
  629. package/registry/examples/speed-lines/hero.js +11 -0
  630. package/registry/examples/speed-lines/hero.tsx +12 -0
  631. package/registry/examples/speed-lines/streaks.d.ts +4 -0
  632. package/registry/examples/speed-lines/streaks.js +11 -0
  633. package/registry/examples/speed-lines/streaks.tsx +12 -0
  634. package/registry/examples/status-chip/default.d.ts +4 -0
  635. package/registry/examples/status-chip/default.js +35 -0
  636. package/registry/examples/status-chip/default.tsx +32 -0
  637. package/registry/examples/status-chip/native/default.d.ts +4 -0
  638. package/registry/examples/status-chip/native/default.dark.png +0 -0
  639. package/registry/examples/status-chip/native/default.js +26 -0
  640. package/registry/examples/status-chip/native/default.light.png +0 -0
  641. package/registry/examples/status-chip/native/default.tsx +20 -0
  642. package/registry/examples/stuck/card.d.ts +4 -0
  643. package/registry/examples/stuck/card.js +13 -0
  644. package/registry/examples/stuck/card.tsx +14 -0
  645. package/registry/examples/stuck/holds.d.ts +4 -0
  646. package/registry/examples/stuck/holds.js +12 -0
  647. package/registry/examples/stuck/holds.tsx +16 -0
  648. package/registry/examples/stuck/tag.d.ts +4 -0
  649. package/registry/examples/stuck/tag.js +12 -0
  650. package/registry/examples/stuck/tag.tsx +13 -0
  651. package/registry/examples/tabs/binder.d.ts +4 -0
  652. package/registry/examples/tabs/binder.js +22 -0
  653. package/registry/examples/tabs/binder.tsx +20 -0
  654. package/registry/examples/tabs/native/binder.d.ts +4 -0
  655. package/registry/examples/tabs/native/binder.dark.png +0 -0
  656. package/registry/examples/tabs/native/binder.js +26 -0
  657. package/registry/examples/tabs/native/binder.light.png +0 -0
  658. package/registry/examples/tabs/native/binder.tsx +22 -0
  659. package/registry/examples/tag-selector/creatable.d.ts +4 -0
  660. package/registry/examples/tag-selector/creatable.js +41 -0
  661. package/registry/examples/tag-selector/creatable.tsx +29 -0
  662. package/registry/examples/tag-selector/native/tags.d.ts +4 -0
  663. package/registry/examples/tag-selector/native/tags.dark.png +0 -0
  664. package/registry/examples/tag-selector/native/tags.js +19 -0
  665. package/registry/examples/tag-selector/native/tags.light.png +0 -0
  666. package/registry/examples/tag-selector/native/tags.tsx +19 -0
  667. package/registry/examples/versus-card/alternatives.d.ts +4 -0
  668. package/registry/examples/versus-card/alternatives.js +20 -0
  669. package/registry/examples/versus-card/alternatives.tsx +14 -0
  670. package/registry/examples/versus-card/releases.d.ts +4 -0
  671. package/registry/examples/versus-card/releases.js +35 -0
  672. package/registry/examples/versus-card/releases.tsx +29 -0
  673. package/registry/fab.json +1 -0
  674. package/registry/field.json +3 -2
  675. package/registry/file-upload.json +6 -11
  676. package/registry/filter-bar.json +209 -9
  677. package/registry/flock.json +3 -4
  678. package/registry/footnote.json +2 -3
  679. package/registry/force-update-screen.json +14 -5
  680. package/registry/form.json +5 -4
  681. package/registry/gallery-page.json +14 -5
  682. package/registry/genui.json +2 -2
  683. package/registry/glossary-term.json +1 -1
  684. package/registry/glossary.json +1 -1
  685. package/registry/glow-card.json +2 -2
  686. package/registry/goal-gauge.json +2 -1
  687. package/registry/grade-stamp.json +227 -0
  688. package/registry/header.json +1 -0
  689. package/registry/how-it-works-page.json +3 -5
  690. package/registry/image-cropper.json +13 -5
  691. package/registry/image-viewer.json +3 -4
  692. package/registry/index.json +612 -105
  693. package/registry/iso.json +1 -1
  694. package/registry/kanban.json +13 -5
  695. package/registry/kbd.json +1 -1
  696. package/registry/kind-config-editor.json +565 -0
  697. package/registry/kpi-explained.json +2 -2
  698. package/registry/landing-page.json +3 -5
  699. package/registry/landscape.json +13 -5
  700. package/registry/language-switch.json +1 -1
  701. package/registry/legal-page.json +1 -1
  702. package/registry/link-card.json +1 -1
  703. package/registry/list.json +2 -1
  704. package/registry/loader.json +2 -1
  705. package/registry/longform-page.json +1 -1
  706. package/registry/maintenance-screen.json +14 -5
  707. package/registry/map.json +3 -2
  708. package/registry/markdown.json +86 -9
  709. package/registry/marketing-layout.json +1 -1
  710. package/registry/marquee.json +1 -1
  711. package/registry/mascot-quote.json +1 -1
  712. package/registry/mascot-state.json +12 -11
  713. package/registry/mascots.json +2 -1
  714. package/registry/match-dialog.json +14 -5
  715. package/registry/media-capture.json +14 -5
  716. package/registry/media-gallery.json +3 -5
  717. package/registry/media-grid.json +1 -1
  718. package/registry/media-picker.json +2 -3
  719. package/registry/meta-row.json +2 -1
  720. package/registry/meter.json +4 -3
  721. package/registry/nav-bar.json +100 -9
  722. package/registry/next-actions.json +1 -1
  723. package/registry/notification-preferences.json +250 -0
  724. package/registry/number-ticker.json +2 -1
  725. package/registry/onboarding.json +1 -0
  726. package/registry/opening-hours.json +1 -1
  727. package/registry/otp-input.json +1 -0
  728. package/registry/page-header.json +2 -2
  729. package/registry/page-hero.json +1 -1
  730. package/registry/page-index.json +1 -1
  731. package/registry/page.json +3 -3
  732. package/registry/pagination.json +2 -1
  733. package/registry/permission-prompt.json +2 -2
  734. package/registry/photo-grid.json +4 -4
  735. package/registry/pointer-light.json +6 -2
  736. package/registry/popover.json +2 -2
  737. package/registry/pricing-page.json +4 -6
  738. package/registry/product-page.json +14 -5
  739. package/registry/profile-card.json +232 -8
  740. package/registry/progress.json +4 -3
  741. package/registry/promise-card.json +13 -5
  742. package/registry/pull-to-refresh.json +1 -0
  743. package/registry/quota-meter.json +308 -0
  744. package/registry/radio-group.json +4 -3
  745. package/registry/rail-nav.json +48 -10
  746. package/registry/recipes.json +1 -1
  747. package/registry/retro-tv.json +478 -0
  748. package/registry/router.json +3 -3
  749. package/registry/screen.json +1 -0
  750. package/registry/scroll-stage.json +14 -5
  751. package/registry/search-field.json +3 -2
  752. package/registry/section-backdrop.json +1 -1
  753. package/registry/segmented.json +1 -0
  754. package/registry/separator.json +2 -2
  755. package/registry/service-card.json +1 -1
  756. package/registry/settings-layout.json +2 -1
  757. package/registry/showcase.json +14 -5
  758. package/registry/signature.json +185 -0
  759. package/registry/site-cahier.json +548 -0
  760. package/registry/site-footer.json +3 -3
  761. package/registry/sites.json +2 -2
  762. package/registry/skeleton.json +2 -1
  763. package/registry/skip-link.json +1 -1
  764. package/registry/slider.json +5 -4
  765. package/registry/slot-picker.json +156 -10
  766. package/registry/slot.json +2 -2
  767. package/registry/specimen-tag.json +1 -1
  768. package/registry/speed-lines.json +174 -0
  769. package/registry/spinner.json +4 -3
  770. package/registry/splash-handoff.json +1 -0
  771. package/registry/split-view.json +1 -1
  772. package/registry/stage-banner.json +2 -3
  773. package/registry/stat.json +2 -2
  774. package/registry/status-chip.json +350 -0
  775. package/registry/status-page.json +13 -5
  776. package/registry/step-progress.json +2 -1
  777. package/registry/step-showcase.json +3 -5
  778. package/registry/stepper.json +2 -1
  779. package/registry/sticky-action.json +38 -8
  780. package/registry/stuck.json +219 -0
  781. package/registry/swipe-deck.json +14 -5
  782. package/registry/swipeable-row.json +1 -0
  783. package/registry/switch.json +3 -2
  784. package/registry/tab-bar.json +1 -0
  785. package/registry/tabs.json +154 -22
  786. package/registry/tag-input.json +1 -1
  787. package/registry/tag-selector.json +190 -12
  788. package/registry/taped-photo.json +1 -1
  789. package/registry/terminal-replay.json +14 -5
  790. package/registry/text-style.json +5 -5
  791. package/registry/theme.json +4 -3
  792. package/registry/toast.json +2 -1
  793. package/registry/toc.json +1 -1
  794. package/registry/tooltip.json +2 -2
  795. package/registry/tree-view.json +6 -2
  796. package/registry/txt.json +1 -0
  797. package/registry/update-prompt.json +14 -5
  798. package/registry/upload-queue.json +1 -1
  799. package/registry/verified-badge.json +6 -6
  800. package/registry/versus-card.json +194 -0
  801. package/registry/vertical-video.json +8 -3
  802. package/registry/video-player.json +5 -6
  803. package/registry/video-trimmer.json +13 -5
  804. package/registry/virtual.json +2 -2
  805. package/registry/waveform.json +4 -3
  806. package/dist/chunk-4LYKBSOG.js.map +0 -1
  807. package/dist/chunk-HHFWK2HH.js +0 -163
  808. package/dist/chunk-HHFWK2HH.js.map +0 -1
  809. package/dist/chunk-R3LTSMS5.js +0 -75
  810. package/dist/chunk-R3LTSMS5.js.map +0 -1
  811. package/dist/chunk-YGIN2YIY.js.map +0 -1
  812. package/dist/chunk-YHKTYFOQ.js.map +0 -1
  813. package/dist/chunk-ZQW7LF4Y.js +0 -179
  814. package/dist/chunk-ZQW7LF4Y.js.map +0 -1
@@ -0,0 +1,128 @@
1
+ // src/meter/meter.tsx
2
+ import { tv } from "tailwind-variants";
3
+
4
+ // src/meter/model.ts
5
+ var MeterOptimum = { Low: "low", High: "high" };
6
+ var MeterLevel = { Ok: "ok", Success: "success", Warning: "warning", Danger: "danger" };
7
+ var clamp01 = (n) => Math.min(1, Math.max(0, n));
8
+ var percent = (ratio) => `${Math.round(ratio * 100)} %`;
9
+ function levelOf(ratio, thresholds, optimum) {
10
+ if (!thresholds) return MeterLevel.Ok;
11
+ const good = optimum === MeterOptimum.Low ? MeterLevel.Success : MeterLevel.Danger;
12
+ const bad = optimum === MeterOptimum.Low ? MeterLevel.Danger : MeterLevel.Success;
13
+ if (ratio >= thresholds.high) return bad;
14
+ return ratio >= thresholds.low ? MeterLevel.Warning : good;
15
+ }
16
+ function meterModel({ value = 0, min = 0, max = 100, valueText, thresholds, optimum = MeterOptimum.Low, parts }) {
17
+ const span = max - min || 1;
18
+ const ratio = clamp01((value - min) / span);
19
+ const shares = (parts ?? []).map((p, i) => ({ ...p, i, ratio: clamp01(p.value / span), words: p.valueText ?? percent(p.value / span) }));
20
+ let start = 0;
21
+ const arcs = parts ? shares.map((p) => {
22
+ const arc = { part: p.i, len: p.ratio, start };
23
+ start += p.ratio;
24
+ return arc;
25
+ }) : [{ part: void 0, len: ratio, start: 0 }];
26
+ return { ratio, level: levelOf(ratio, thresholds, optimum), words: valueText ?? percent(ratio), shares, arcs };
27
+ }
28
+
29
+ // src/meter/meter.tsx
30
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
31
+ var meter = tv({
32
+ slots: {
33
+ root: "flex w-full flex-col gap-1.5",
34
+ header: "flex items-baseline gap-2 text-xs",
35
+ caption: "min-w-0 flex-1 truncate font-medium text-fg",
36
+ figure: "shrink-0 tabular-nums text-fg-secondary",
37
+ track: "relative flex h-2 w-full gap-0.5 overflow-hidden rounded-sm bg-surface-3",
38
+ fill: "h-full rounded-sm transition-[width] duration-700 motion-reduce:transition-none",
39
+ legend: "mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary",
40
+ swatch: "inline-block h-2 w-2 shrink-0 rounded-full",
41
+ ring: "relative inline-flex shrink-0 items-center justify-center",
42
+ center: "absolute inset-0 flex flex-col items-center justify-center text-center"
43
+ },
44
+ variants: {
45
+ size: { sm: { track: "h-1.5", ring: "h-14 w-14" }, md: { ring: "h-24 w-24" }, lg: { track: "h-3", ring: "h-36 w-36" } }
46
+ },
47
+ defaultVariants: { size: "md" }
48
+ });
49
+ var BG = { ok: "bg-accent", success: "bg-success", warning: "bg-warning", danger: "bg-danger" };
50
+ var STROKE = { ok: "stroke-accent", success: "stroke-success", warning: "stroke-warning", danger: "stroke-danger" };
51
+ var PART_BG = ["bg-accent", "bg-fg-secondary", "bg-accent-2", "bg-border-strong"];
52
+ var PART_STROKE = ["stroke-accent", "stroke-fg-secondary", "stroke-accent-2", "stroke-border-strong"];
53
+ function Meter({
54
+ label,
55
+ value = 0,
56
+ min = 0,
57
+ max = 100,
58
+ valueText,
59
+ thresholds,
60
+ optimum = "low",
61
+ parts,
62
+ variant = "bar",
63
+ size = "md",
64
+ showLabel,
65
+ className,
66
+ children,
67
+ ...props
68
+ }) {
69
+ const s = meter({ size });
70
+ const { ratio, level, words, shares, arcs } = meterModel({ value, min, max, valueText, thresholds, optimum, parts });
71
+ const a11y = parts ? { role: "group", "aria-label": label } : { role: "meter", "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": Math.min(max, Math.max(min, value)), "aria-valuetext": words };
72
+ const legend = parts && /* @__PURE__ */ jsx("ul", { className: s.legend(), children: shares.map((p) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
73
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: [s.swatch(), PART_BG[p.i % PART_BG.length]].join(" ") }),
74
+ /* @__PURE__ */ jsx("span", { className: "text-fg", children: p.label }),
75
+ /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: p.words })
76
+ ] }, p.i)) });
77
+ if (variant === "ring") {
78
+ const r = 44;
79
+ return /* @__PURE__ */ jsxs("div", { ...a11y, "data-level": parts ? void 0 : level, className: ["inline-flex flex-col items-center gap-2", className].filter(Boolean).join(" "), ...props, children: [
80
+ /* @__PURE__ */ jsxs("div", { className: s.ring(), children: [
81
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", "aria-hidden": true, children: [
82
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r, fill: "none", strokeWidth: "9", className: "stroke-border-default" }),
83
+ arcs.map((arc, i) => {
84
+ const length = Math.max(0, arc.len * 100 - (parts ? 1 : 0));
85
+ return /* @__PURE__ */ jsx(
86
+ "circle",
87
+ {
88
+ cx: "50",
89
+ cy: "50",
90
+ r,
91
+ fill: "none",
92
+ strokeWidth: "9",
93
+ pathLength: 100,
94
+ strokeDasharray: `${length} ${100 - length}`,
95
+ strokeDashoffset: -arc.start * 100,
96
+ className: [arc.part === void 0 ? STROKE[level] : PART_STROKE[arc.part % PART_STROKE.length], "transition-[stroke-dasharray] duration-700 motion-reduce:transition-none"].join(" ")
97
+ },
98
+ i
99
+ );
100
+ })
101
+ ] }),
102
+ children !== void 0 && /* @__PURE__ */ jsx("div", { className: s.center(), children })
103
+ ] }),
104
+ legend
105
+ ] });
106
+ }
107
+ return /* @__PURE__ */ jsxs("div", { ...a11y, "data-level": parts ? void 0 : level, className: s.root({ className }), ...props, children: [
108
+ showLabel && /* @__PURE__ */ jsxs("div", { "aria-hidden": true, className: s.header(), children: [
109
+ /* @__PURE__ */ jsx("span", { className: s.caption(), children: label }),
110
+ !parts && /* @__PURE__ */ jsx("span", { className: s.figure(), children: words })
111
+ ] }),
112
+ /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: s.track(), children: parts ? shares.map((p) => /* @__PURE__ */ jsx("span", { className: [s.fill(), PART_BG[p.i % PART_BG.length]].join(" "), style: { width: `${p.ratio * 100}%` } }, p.i)) : /* @__PURE__ */ jsx("span", { className: [s.fill(), BG[level]].join(" "), style: { width: `${ratio * 100}%` } }) }),
113
+ legend
114
+ ] });
115
+ }
116
+ function MeterValue({ value, caption }) {
117
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
118
+ /* @__PURE__ */ jsx("span", { className: "font-display text-lg font-semibold text-fg tabular-nums", children: value }),
119
+ caption && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-fg-secondary", children: caption })
120
+ ] });
121
+ }
122
+
123
+ export {
124
+ meter,
125
+ Meter,
126
+ MeterValue
127
+ };
128
+ //# sourceMappingURL=chunk-HEKDKM5Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/meter/meter.tsx","../src/meter/model.ts"],"sourcesContent":["// Server-safe. A measure within a known range — a quota, a balance, a share — as opposed to the progress of a task.\n// `role=\"meter\"`, its value in words; thresholds turn it to warning then danger (or the reverse when high is good);\n// split into parts (90 % to the creator, 10 % to the platform) it becomes a stacked bar or ring with its legend: the\n// text version of what it draws.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type MeterLevel, meterModel, type MeterPart, type MeterThresholds } from \"./model\";\n\nexport type { MeterPart };\n\nexport const meter = tv({\n slots: {\n root: \"flex w-full flex-col gap-1.5\",\n header: \"flex items-baseline gap-2 text-xs\",\n caption: \"min-w-0 flex-1 truncate font-medium text-fg\",\n figure: \"shrink-0 tabular-nums text-fg-secondary\",\n track: \"relative flex h-2 w-full gap-0.5 overflow-hidden rounded-sm bg-surface-3\",\n fill: \"h-full rounded-sm transition-[width] duration-700 motion-reduce:transition-none\",\n legend: \"mt-1 flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary\",\n swatch: \"inline-block h-2 w-2 shrink-0 rounded-full\",\n ring: \"relative inline-flex shrink-0 items-center justify-center\",\n center: \"absolute inset-0 flex flex-col items-center justify-center text-center\",\n },\n variants: {\n size: { sm: { track: \"h-1.5\", ring: \"h-14 w-14\" }, md: { ring: \"h-24 w-24\" }, lg: { track: \"h-3\", ring: \"h-36 w-36\" } },\n },\n defaultVariants: { size: \"md\" },\n});\n\n/** The colour of a fill: by tone (thresholds) or by part (the accent, a neutral, accent-2, a lighter neutral). */\nconst BG: Record<MeterLevel, string> = { ok: \"bg-accent\", success: \"bg-success\", warning: \"bg-warning\", danger: \"bg-danger\" };\nconst STROKE: Record<MeterLevel, string> = { ok: \"stroke-accent\", success: \"stroke-success\", warning: \"stroke-warning\", danger: \"stroke-danger\" };\nconst PART_BG = [\"bg-accent\", \"bg-fg-secondary\", \"bg-accent-2\", \"bg-border-strong\"];\nconst PART_STROKE = [\"stroke-accent\", \"stroke-fg-secondary\", \"stroke-accent-2\", \"stroke-border-strong\"];\n\nexport type MeterProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The accessible name (“Storage”, “Split of a tip”) — passed translated; shown with `showLabel`. */\n label: string;\n /** The value, between `min` and `max` (ignored with `parts`). */\n value?: number;\n /**\n * The bottom of the range.\n * @default 0\n */\n min?: number;\n /**\n * The top of the range.\n * @default 100\n */\n max?: number;\n /** The value in words (“42 GB of 50 GB”) — passed translated; default: the percentage. */\n valueText?: string;\n /**\n * Ratios (0–1) where the tone changes: past `high` it is in danger, past `low` in warning — or the reverse with\n * `optimum=\"high\"` (a balance: the lower, the worse). Without thresholds the fill is the brand accent.\n */\n thresholds?: MeterThresholds;\n /**\n * Which end is good.\n * @default \"low\"\n */\n optimum?: \"low\" | \"high\";\n /** Split into parts that add up to `max`: a stacked bar or ring, with its legend. */\n parts?: readonly MeterPart[];\n /**\n * bar · ring.\n * @default \"bar\"\n */\n variant?: \"bar\" | \"ring\";\n /**\n * sm · md · lg: the bar's thickness, the ring's diameter.\n * @default \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n /** Shows the label and the value above the bar. */\n showLabel?: boolean;\n /** A ring's centre: the value, a word. */\n children?: React.ReactNode;\n};\n\n/** A measure within a range — a quota, a balance, a share — toned by thresholds or split into parts. */\nexport function Meter({\n label,\n value = 0,\n min = 0,\n max = 100,\n valueText,\n thresholds,\n optimum = \"low\",\n parts,\n variant = \"bar\",\n size = \"md\",\n showLabel,\n className,\n children,\n ...props\n}: MeterProps) {\n const s = meter({ size });\n const { ratio, level, words, shares, arcs } = meterModel({ value, min, max, valueText, thresholds, optimum, parts });\n const a11y = parts\n ? { role: \"group\" as const, \"aria-label\": label }\n : { role: \"meter\" as const, \"aria-label\": label, \"aria-valuemin\": min, \"aria-valuemax\": max, \"aria-valuenow\": Math.min(max, Math.max(min, value)), \"aria-valuetext\": words };\n const legend = parts && (\n <ul className={s.legend()}>\n {shares.map((p) => (\n <li key={p.i} className=\"flex items-center gap-1.5\">\n <span aria-hidden className={[s.swatch(), PART_BG[p.i % PART_BG.length]].join(\" \")} />\n <span className=\"text-fg\">{p.label}</span>\n <span className=\"tabular-nums\">{p.words}</span>\n </li>\n ))}\n </ul>\n );\n\n if (variant === \"ring\") {\n const r = 44;\n return (\n <div {...a11y} data-level={parts ? undefined : level} className={[\"inline-flex flex-col items-center gap-2\", className].filter(Boolean).join(\" \")} {...props}>\n <div className={s.ring()}>\n <svg viewBox=\"0 0 100 100\" className=\"h-full w-full -rotate-90\" aria-hidden>\n <circle cx=\"50\" cy=\"50\" r={r} fill=\"none\" strokeWidth=\"9\" className=\"stroke-border-default\" />\n {arcs.map((arc, i) => {\n const length = Math.max(0, arc.len * 100 - (parts ? 1 : 0));\n return (\n <circle\n key={i}\n cx=\"50\"\n cy=\"50\"\n r={r}\n fill=\"none\"\n strokeWidth=\"9\"\n pathLength={100}\n strokeDasharray={`${length} ${100 - length}`}\n strokeDashoffset={-arc.start * 100}\n className={[arc.part === undefined ? STROKE[level] : PART_STROKE[arc.part % PART_STROKE.length], \"transition-[stroke-dasharray] duration-700 motion-reduce:transition-none\"].join(\" \")}\n />\n );\n })}\n </svg>\n {children !== undefined && <div className={s.center()}>{children}</div>}\n </div>\n {legend}\n </div>\n );\n }\n\n return (\n <div {...a11y} data-level={parts ? undefined : level} className={s.root({ className })} {...props}>\n {showLabel && (\n <div aria-hidden className={s.header()}>\n <span className={s.caption()}>{label}</span>\n {!parts && <span className={s.figure()}>{words}</span>}\n </div>\n )}\n <div aria-hidden className={s.track()}>\n {parts ? (\n shares.map((p) => <span key={p.i} className={[s.fill(), PART_BG[p.i % PART_BG.length]].join(\" \")} style={{ width: `${p.ratio * 100}%` }} />)\n ) : (\n <span className={[s.fill(), BG[level]].join(\" \")} style={{ width: `${ratio * 100}%` }} />\n )}\n </div>\n {legend}\n </div>\n );\n}\n\nexport interface MeterValueProps {\n /** The figure. */\n value: React.ReactNode;\n /** A word under it. */\n caption?: React.ReactNode;\n}\n\n/** For the ring's centre when it shows a figure and a word. */\nexport function MeterValue({ value, caption }: MeterValueProps) {\n return (\n <>\n <span className=\"font-display text-lg font-semibold text-fg tabular-nums\">{value}</span>\n {caption && <span className=\"text-[10px] text-fg-secondary\">{caption}</span>}\n </>\n );\n}\n","// Headless: the arithmetic of a Meter, read by the web (`meter.tsx`) and the native (`native/meter.tsx`) alike.\n\nexport interface MeterPart {\n /** Its name (“To the creator”) — passed translated. */\n label: string;\n /** Its value, in the meter's unit. */\n value: number;\n /** Its value in words (“€9.00”), in the legend and for assistive technology; default: its percentage. */\n valueText?: string;\n}\n\n/** Which end of the range is good: `low` (a quota) or `high` (a score, a balance). */\nexport const MeterOptimum = { Low: \"low\", High: \"high\" } as const;\nexport type MeterOptimum = (typeof MeterOptimum)[keyof typeof MeterOptimum];\n\n/** The tone of a fill: the accent without thresholds, otherwise good, warning or bad. */\nexport const MeterLevel = { Ok: \"ok\", Success: \"success\", Warning: \"warning\", Danger: \"danger\" } as const;\nexport type MeterLevel = (typeof MeterLevel)[keyof typeof MeterLevel];\n\nexport interface MeterThresholds {\n readonly low: number;\n readonly high: number;\n}\n\nexport interface MeterInput {\n value?: number;\n min?: number;\n max?: number;\n valueText?: string;\n thresholds?: MeterThresholds;\n optimum?: MeterOptimum;\n parts?: readonly MeterPart[];\n}\n\nexport interface MeterShare extends MeterPart {\n i: number;\n /** Its share of the range, 0–1. */\n ratio: number;\n /** Its value in words. */\n words: string;\n}\n\n/** One arc of a ring, as fractions of the circle: the part it draws (none for the whole value), its length, where it starts. */\nexport interface MeterArc {\n part: number | undefined;\n len: number;\n start: number;\n}\n\nexport interface MeterModel {\n ratio: number;\n level: MeterLevel;\n words: string;\n shares: MeterShare[];\n arcs: MeterArc[];\n}\n\nconst clamp01 = (n: number) => Math.min(1, Math.max(0, n));\nconst percent = (ratio: number) => `${Math.round(ratio * 100)} %`;\n\nfunction levelOf(ratio: number, thresholds: MeterThresholds | undefined, optimum: MeterOptimum): MeterLevel {\n if (!thresholds) return MeterLevel.Ok;\n const good = optimum === MeterOptimum.Low ? MeterLevel.Success : MeterLevel.Danger;\n const bad = optimum === MeterOptimum.Low ? MeterLevel.Danger : MeterLevel.Success;\n if (ratio >= thresholds.high) return bad;\n return ratio >= thresholds.low ? MeterLevel.Warning : good;\n}\n\n/** The ratio, tone, words, parts and ring arcs of a meter. */\nexport function meterModel({ value = 0, min = 0, max = 100, valueText, thresholds, optimum = MeterOptimum.Low, parts }: MeterInput): MeterModel {\n const span = max - min || 1;\n const ratio = clamp01((value - min) / span);\n const shares = (parts ?? []).map((p, i) => ({ ...p, i, ratio: clamp01(p.value / span), words: p.valueText ?? percent(p.value / span) }));\n let start = 0;\n const arcs = parts\n ? shares.map((p) => {\n const arc = { part: p.i, len: p.ratio, start };\n start += p.ratio;\n return arc;\n })\n : [{ part: undefined, len: ratio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AAK,WAAU,2DAA2D,iBAAM;AAAA,IAChF,WAAW,oBAAC,UAAK,WAAU,iCAAiC,mBAAQ;AAAA,KACvE;AAEJ;","names":[]}
@@ -0,0 +1,16 @@
1
+ // src/deprecated.ts
2
+ var DEPRECATED_SINCE = "3.55.0";
3
+ var REMOVED_IN = "4.0.0";
4
+ var warned = /* @__PURE__ */ new Set();
5
+ function warnDeprecated(entry, since = DEPRECATED_SINCE) {
6
+ if (typeof process === "undefined" || process.env.NODE_ENV === "production" || warned.has(entry)) return;
7
+ warned.add(entry);
8
+ console.warn(
9
+ `@krizaka/ui/${entry} is deprecated since ${since} and is removed in ${REMOVED_IN} (ADR-006): no product uses it. Keep it? Comment on krizaka-ui#674 with the issue that needs it. https://ui.krizaka.com/components/${entry.replace(/^native\//, "")}`
10
+ );
11
+ }
12
+
13
+ export {
14
+ warnDeprecated
15
+ };
16
+ //# sourceMappingURL=chunk-KGLRZMCY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deprecated.ts"],"sourcesContent":["// The development warning of a deprecated entry (ADR-006 §7, krizaka-ui#674). An entry is deprecated in a minor and\n// removed in the next major; until then it works exactly as before and says so once per page, in development only —\n// never in production, never twice. The same facts live in the entry's `meta.ts` (`status: \"deprecated\"`), which\n// ui.krizaka.com reads for its badge.\n\n/** The release that deprecated the batch. */\nexport const DEPRECATED_SINCE = \"3.55.0\";\n/** The major that removes it. */\nexport const REMOVED_IN = \"4.0.0\";\n\nconst warned = new Set<string>();\n\n/**\n * Warns once per page, in development, that `@krizaka/ui/<entry>` is deprecated. Call it at the top of the entry's\n * components; it costs a `Set` lookup and nothing in production.\n * @param entry the entry's name as imported: `tree-view` for `@krizaka/ui/tree-view`.\n * @param since the release that deprecated it, when it is not this batch's.\n */\nexport function warnDeprecated(entry: string, since: string = DEPRECATED_SINCE): void {\n if (typeof process === \"undefined\" || process.env.NODE_ENV === \"production\" || warned.has(entry)) return;\n warned.add(entry);\n console.warn(\n `@krizaka/ui/${entry} is deprecated since ${since} and is removed in ${REMOVED_IN} (ADR-006): no product uses it. ` +\n `Keep it? Comment on krizaka-ui#674 with the issue that needs it. https://ui.krizaka.com/components/${entry.replace(/^native\\//, \"\")}`,\n );\n}\n\n/** Forgets what was warned (tests only). */\nexport function resetDeprecationWarnings(): void {\n warned.clear();\n}\n"],"mappings":";AAMO,IAAM,mBAAmB;AAEzB,IAAM,aAAa;AAE1B,IAAM,SAAS,oBAAI,IAAY;AAQxB,SAAS,eAAe,OAAe,QAAgB,kBAAwB;AACpF,MAAI,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa,gBAAgB,OAAO,IAAI,KAAK,EAAG;AAClG,SAAO,IAAI,KAAK;AAChB,UAAQ;AAAA,IACN,eAAe,KAAK,wBAAwB,KAAK,sBAAsB,UAAU,sIACuB,MAAM,QAAQ,aAAa,EAAE,CAAC;AAAA,EACxI;AACF;","names":[]}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+
3
+ // src/kbd/kbd.tsx
4
+ import { tv } from "tailwind-variants";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var kbdVariants = tv({
7
+ base: "inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 font-mono font-semibold text-fg-secondary",
8
+ variants: { size: { sm: "h-5 min-w-5 px-1 text-[10px]", md: "h-6 min-w-6 px-1.5 text-xs" } },
9
+ defaultVariants: { size: "md" }
10
+ });
11
+ function Kbd({ size, className, ...props }) {
12
+ return /* @__PURE__ */ jsx("kbd", { className: kbdVariants({ size, className }), ...props });
13
+ }
14
+
15
+ export {
16
+ Kbd
17
+ };
18
+ //# sourceMappingURL=chunk-KID32IRJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/kbd/kbd.tsx"],"sourcesContent":["// Server-safe. A key, or a shortcut of several (`<Kbd>⌘</Kbd><Kbd>K</Kbd>`).\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const kbdVariants = tv({\n base:\n \"inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 \" +\n \"font-mono font-semibold text-fg-secondary\",\n variants: { size: { sm: \"h-5 min-w-5 px-1 text-[10px]\", md: \"h-6 min-w-6 px-1.5 text-xs\" } },\n defaultVariants: { size: \"md\" },\n});\n\nexport type KbdProps = React.ComponentProps<\"kbd\"> & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: VariantProps<typeof kbdVariants>[\"size\"];\n};\n\nexport function Kbd({ size, className, ...props }: KbdProps) {\n return <kbd className={kbdVariants({ size, className })} {...props} />;\n}\n"],"mappings":";;;AAEA,SAAS,UAA6B;AAmB7B;AAjBF,IAAM,cAAc,GAAG;AAAA,EAC5B,MACE;AAAA,EAEF,UAAU,EAAE,MAAM,EAAE,IAAI,gCAAgC,IAAI,6BAA6B,EAAE;AAAA,EAC3F,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;AAUM,SAAS,IAAI,EAAE,MAAM,WAAW,GAAG,MAAM,GAAa;AAC3D,SAAO,oBAAC,SAAI,WAAW,YAAY,EAAE,MAAM,UAAU,CAAC,GAAI,GAAG,OAAO;AACtE;","names":[]}
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ import {
3
+ floating
4
+ } from "./chunk-J3NC6ER4.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-NSLXEDIS.js";
8
+
9
+ // src/dropdown-menu/dropdown-menu.tsx
10
+ import { DropdownMenu as MenuPrimitive } from "radix-ui";
11
+ import { tv } from "tailwind-variants";
12
+ import { jsx, jsxs } from "react/jsx-runtime";
13
+ var menu = tv({
14
+ slots: {
15
+ content: cn(floating, "min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto overflow-x-hidden overscroll-contain p-1 origin-(--radix-dropdown-menu-content-transform-origin)"),
16
+ item: "relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 [&>svg]:text-fg-secondary",
17
+ indicator: "ml-auto flex h-4 w-4 items-center justify-center text-fg-accent",
18
+ label: "px-2.5 pb-1 pt-2 text-[11px] font-semibold text-fg-secondary",
19
+ separator: "-mx-1 my-1 h-px bg-border-subtle"
20
+ },
21
+ variants: {
22
+ // The label reads in the danger text role (≥ 4.5:1 on the menu surface, both themes); the icon and the highlight
23
+ // carry the danger fill.
24
+ tone: { default: {}, danger: { item: "text-fg-danger data-highlighted:bg-danger/15 [&>svg]:text-danger" } }
25
+ },
26
+ defaultVariants: { tone: "default" }
27
+ });
28
+ var s = menu();
29
+ function DropdownMenuContent({ sideOffset = 6, align = "end", collisionPadding = 8, container, className, ...props }) {
30
+ return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { container, children: /* @__PURE__ */ jsx(MenuPrimitive.Content, { sideOffset, align, collisionPadding, className: s.content({ className }), ...props }) });
31
+ }
32
+ function DropdownMenuItem({ tone, className, ...props }) {
33
+ return /* @__PURE__ */ jsx(MenuPrimitive.Item, { "data-tone": tone ?? "default", className: menu({ tone }).item({ className }), ...props });
34
+ }
35
+ function DropdownMenuCheckboxItem({ className, children, ...props }) {
36
+ return /* @__PURE__ */ jsxs(MenuPrimitive.CheckboxItem, { className: s.item({ className }), ...props, children: [
37
+ children,
38
+ /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { className: s.indicator(), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }) })
39
+ ] });
40
+ }
41
+ function DropdownMenuSubTrigger({ className, children, ...props }) {
42
+ return /* @__PURE__ */ jsxs(MenuPrimitive.SubTrigger, { className: s.item({ className: cn("data-[state=open]:bg-surface-3", className) }), ...props, children: [
43
+ children,
44
+ /* @__PURE__ */ jsx("svg", { className: "ml-auto !h-4 !w-4 text-fg-secondary", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }) })
45
+ ] });
46
+ }
47
+ function DropdownMenuSubContent({ sideOffset = 4, collisionPadding = 8, className, ...props }) {
48
+ return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(MenuPrimitive.SubContent, { sideOffset, collisionPadding, className: s.content({ className: cn("max-h-(--radix-dropdown-menu-content-available-height)", className) }), ...props }) });
49
+ }
50
+ function DropdownMenuRadioItem({ className, children, ...props }) {
51
+ return /* @__PURE__ */ jsxs(MenuPrimitive.RadioItem, { className: s.item({ className }), ...props, children: [
52
+ children,
53
+ /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { className: s.indicator(), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }) })
54
+ ] });
55
+ }
56
+ function DropdownMenuLabel({ className, ...props }) {
57
+ return /* @__PURE__ */ jsx(MenuPrimitive.Label, { className: s.label({ className }), ...props });
58
+ }
59
+ function DropdownMenuSeparator({ className, ...props }) {
60
+ return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { className: s.separator({ className }), ...props });
61
+ }
62
+ var DropdownMenu = {
63
+ Root: MenuPrimitive.Root,
64
+ Trigger: MenuPrimitive.Trigger,
65
+ Content: DropdownMenuContent,
66
+ Item: DropdownMenuItem,
67
+ CheckboxItem: DropdownMenuCheckboxItem,
68
+ Label: DropdownMenuLabel,
69
+ Separator: DropdownMenuSeparator,
70
+ Group: MenuPrimitive.Group,
71
+ Sub: MenuPrimitive.Sub,
72
+ SubTrigger: DropdownMenuSubTrigger,
73
+ SubContent: DropdownMenuSubContent,
74
+ RadioGroup: MenuPrimitive.RadioGroup,
75
+ RadioItem: DropdownMenuRadioItem
76
+ };
77
+
78
+ export {
79
+ menu,
80
+ DropdownMenuContent,
81
+ DropdownMenuItem,
82
+ DropdownMenuCheckboxItem,
83
+ DropdownMenuSubTrigger,
84
+ DropdownMenuSubContent,
85
+ DropdownMenuRadioItem,
86
+ DropdownMenuLabel,
87
+ DropdownMenuSeparator,
88
+ DropdownMenu
89
+ };
90
+ //# sourceMappingURL=chunk-OGWB76BR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["// Client (a portal). Radix does the roving focus, the arrows, Home/End, typeahead, Escape and the focus return.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { floating } from \"../floating\";\n\nexport const menu = tv({\n slots: {\n content: cn(floating, \"min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto overflow-x-hidden overscroll-contain p-1 origin-(--radix-dropdown-menu-content-transform-origin)\"),\n item:\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors \" +\n \"data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 \" +\n \"[&>svg]:text-fg-secondary\",\n indicator: \"ml-auto flex h-4 w-4 items-center justify-center text-fg-accent\",\n label: \"px-2.5 pb-1 pt-2 text-[11px] font-semibold text-fg-secondary\",\n separator: \"-mx-1 my-1 h-px bg-border-subtle\",\n },\n variants: {\n // The label reads in the danger text role (≥ 4.5:1 on the menu surface, both themes); the icon and the highlight\n // carry the danger fill.\n tone: { default: {}, danger: { item: \"text-fg-danger data-highlighted:bg-danger/15 [&>svg]:text-danger\" } },\n },\n defaultVariants: { tone: \"default\" },\n});\nconst s = menu();\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Content> & {\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n};\n\nexport function DropdownMenuContent({ sideOffset = 6, align = \"end\", collisionPadding = 8, container, className, ...props }: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container}>\n <MenuPrimitive.Content sideOffset={sideOffset} align={align} collisionPadding={collisionPadding} className={s.content({ className })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n /** `danger` for a destructive action: the icon and the highlight carry the danger, the label stays legible. */\n tone?: \"default\" | \"danger\";\n};\n\n/** An action. `tone=\"danger\"` for a destructive one; `onSelect` runs it (the menu closes). */\nexport function DropdownMenuItem({ tone, className, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item data-tone={tone ?? \"default\"} className={menu({ tone }).item({ className })} {...props} />;\n}\n\n/** A toggled option: `checked` + `onCheckedChange`. */\nexport function DropdownMenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n return (\n <MenuPrimitive.CheckboxItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\n/** A submenu's trigger: an item that opens `DropdownMenu.SubContent`, with a chevron. */\nexport function DropdownMenuSubTrigger({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.SubTrigger>) {\n return (\n <MenuPrimitive.SubTrigger className={s.item({ className: cn(\"data-[state=open]:bg-surface-3\", className) })} {...props}>\n {children}\n <svg className=\"ml-auto !h-4 !w-4 text-fg-secondary\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </MenuPrimitive.SubTrigger>\n );\n}\n\n/** The submenu's panel (same material as the menu). */\nexport function DropdownMenuSubContent({ sideOffset = 4, collisionPadding = 8, className, ...props }: React.ComponentProps<typeof MenuPrimitive.SubContent>) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.SubContent sideOffset={sideOffset} collisionPadding={collisionPadding} className={s.content({ className: cn(\"max-h-(--radix-dropdown-menu-content-available-height)\", className) })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\n/** One choice among several (`DropdownMenu.RadioGroup` holds the value): a language, a sort order. */\nexport function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.RadioItem>) {\n return (\n <MenuPrimitive.RadioItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Label>) {\n return <MenuPrimitive.Label className={s.label({ className })} {...props} />;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n return <MenuPrimitive.Separator className={s.separator({ className })} {...props} />;\n}\n\n/** `DropdownMenu.Root/Trigger/Content/Item/CheckboxItem/Label/Separator/Group`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const DropdownMenu = {\n Root: MenuPrimitive.Root,\n Trigger: MenuPrimitive.Trigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: MenuPrimitive.Group,\n Sub: MenuPrimitive.Sub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n RadioGroup: MenuPrimitive.RadioGroup,\n RadioItem: DropdownMenuRadioItem,\n};\n"],"mappings":";;;;;;;;;AACA,SAAS,gBAAgB,qBAAqB;AAE9C,SAAS,UAAU;AAiCb,cAkBF,YAlBE;AA5BC,IAAM,OAAO,GAAG;AAAA,EACrB,OAAO;AAAA,IACL,SAAS,GAAG,UAAU,kLAAkL;AAAA,IACxM,MACE;AAAA,IAGF,WAAW;AAAA,IACX,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA;AAAA,IAGR,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAAE,MAAM,mEAAmE,EAAE;AAAA,EAC5G;AAAA,EACA,iBAAiB,EAAE,MAAM,UAAU;AACrC,CAAC;AACD,IAAM,IAAI,KAAK;AAOR,SAAS,oBAAoB,EAAE,aAAa,GAAG,QAAQ,OAAO,mBAAmB,GAAG,WAAW,WAAW,GAAG,MAAM,GAA6B;AACrJ,SACE,oBAAC,cAAc,QAAd,EAAqB,WACpB,8BAAC,cAAc,SAAd,EAAsB,YAAwB,OAAc,kBAAoC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO,GACnJ;AAEJ;AAQO,SAAS,iBAAiB,EAAE,MAAM,WAAW,GAAG,MAAM,GAA0B;AACrF,SAAO,oBAAC,cAAc,MAAd,EAAmB,aAAW,QAAQ,WAAW,WAAW,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACrH;AAGO,SAAS,yBAAyB,EAAE,WAAW,UAAU,GAAG,MAAM,GAA4D;AACnI,SACE,qBAAC,c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AW,MACnI,8BAAC,UAAK,GAAE,mBAAkB,GAC5B,GACF;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,EAAE,WAAW,GAAG,MAAM,GAAqD;AAC3G,SAAO,oBAAC,cAAc,OAAd,EAAoB,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC5E;AAEO,SAAS,sBAAsB,EAAE,WAAW,GAAG,MAAM,GAAyD;AACnH,SAAO,oBAAC,cAAc,WAAd,EAAwB,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACpF;AAGO,IAAM,eAAe;AAAA,EAC1B,MAAM,cAAc;AAAA,EACpB,SAAS,cAAc;AAAA,EACvB,SAAS;AAAA,EACT,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO,cAAc;AAAA,EACrB,KAAK,cAAc;AAAA,EACnB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY,cAAc;AAAA,EAC1B,WAAW;AACb;","names":[]}
@@ -26,7 +26,7 @@ var sites = [
26
26
  site({ id: "akinaza", name: "Akinaza", url: "https://www.akinaza.com", kind: "product", group: "products", status: "development", mark: "akinaza", repo: "https://github.com/krizaka/akinaza" }),
27
27
  site({ id: "ui", name: "Krizaka UI", url: "https://ui.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-ui" }),
28
28
  site({ id: "java", name: "Krizaka Java", url: "https://java.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-build" }),
29
- site({ id: "ts", name: "Krizaka TS", url: "https://ts.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-ts" }),
29
+ site({ id: "ts", name: "Krizaka TypeScript", url: "https://ts.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-ts" }),
30
30
  // The motion lab: built in the open on GitHub Pages; what proves itself there moves into Krizaka UI.
31
31
  site({ id: "motion", name: "Krizaka Motion", url: "https://krizaka.github.io/krizaka-motion", kind: "open-source", group: "open-source", status: "development", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-motion" }),
32
32
  site({ id: "github", name: "GitHub", url: "https://github.com/krizaka", kind: "open-source", group: "github", status: "released", mark: "github", repo: "https://github.com/krizaka" })
@@ -108,4 +108,4 @@ export {
108
108
  companyLinks,
109
109
  familyLabels
110
110
  };
111
- //# sourceMappingURL=chunk-4LYKBSOG.js.map
111
+ //# sourceMappingURL=chunk-USPOIQV5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/family-mark.tsx","../src/sites/sites.ts"],"sourcesContent":["// The mark of a site of the family (`@krizaka/ui/sites`): its brand's `ProductLogo`, still (a list of marks never\n// moves), or GitHub's, in the text colour. Shared by `NavBar.Family` and `SiteFooter` — not an entry of its own.\nimport type * as React from \"react\";\n\nimport { ProductLogo } from \"./marks/ProductLogo\";\nimport type { SiteMark } from \"./sites/sites\";\n\n/** GitHub's mark, in the text colour (both themes). */\nexport function GitHubGlyph({ size = 16, className }: { size?: number; className?: string }) {\n return (\n <svg viewBox=\"0 0 16 16\" width={size} height={size} fill=\"currentColor\" aria-hidden className={className}>\n <path d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z\" />\n </svg>\n );\n}\n\n/** A site's mark, decorative (its name is always written beside it). */\nexport function FamilyMark({ mark, size }: { mark: SiteMark; size: number }): React.ReactElement {\n if (mark === \"github\") return <GitHubGlyph size={Math.round(size * 0.8)} />;\n return <ProductLogo id={mark} size={size} animated={false} />;\n}\n","// Server-safe: plain data. The Krizaka family — every site Krizaka runs, once. The family switcher of the bar\n// (`NavBar.Family`) and the common footer (`SiteFooter`) both read it, so adding a site is one release of this package:\n// every bar and every footer of the family follow.\n//\n// The words of the family (a site's one line, the groups, the statuses, the footer's signature) are brand data, written\n// here in English and French (`familyLabels`) — a site passes the set of its locale, or its own translation.\n\n/** A site of the family. */\nexport type SiteId = \"krizaka\" | \"orazaka\" | \"orochia\" | \"yasakia\" | \"yororis\" | \"yomizaka\" | \"kachizaka\" | \"akinaza\" | \"ui\" | \"java\" | \"ts\" | \"motion\" | \"github\";\n\n/** What a site is: the company, a product, or an open-source project. It chooses the footer's signature line. */\nexport type SiteKind = \"company\" | \"product\" | \"open-source\";\n\n/**\n * `released`: open to visit. `upcoming`: announced, not released yet (said \"Coming soon\"). `construction`: under\n * construction — nothing offered (a QA-only app may run; the public page says so). `development`: being built in the\n * open, with a dev site (said \"In development\"). A site with none yet would use its repository as its address.\n */\nexport type SiteStatus = \"released\" | \"upcoming\" | \"construction\" | \"development\";\n\n/** The groups of the family, in reading order: Krizaka · Products · Open source · GitHub. */\nexport type SiteGroup = \"krizaka\" | \"products\" | \"open-source\" | \"github\";\n\n/** The mark a site wears: a brand of `ProductLogo` (Krizaka UI and Krizaka Java wear Krizaka's), or GitHub's. */\nexport type SiteMark = \"krizaka\" | \"orazaka\" | \"orochia\" | \"yasakia\" | \"yororis\" | \"yomizaka\" | \"kachizaka\" | \"akinaza\" | \"github\";\n\nexport interface Site {\n readonly id: SiteId;\n /** The name, never translated. */\n readonly name: string;\n /** The address of the site (its home). */\n readonly url: string;\n /** The address without the scheme, as people say it (`ui.krizaka.com`). */\n readonly host: string;\n readonly kind: SiteKind;\n readonly group: SiteGroup;\n readonly status: SiteStatus;\n readonly mark: SiteMark;\n /** The repository the site is built from. */\n readonly repo: string;\n}\n\nconst site = (s: Omit<Site, \"host\">): Site => ({ ...s, host: s.url.replace(/^https?:\\/\\//, \"\").replace(/\\/$/, \"\") });\n\n/** Every site of the family, in reading order (the group order, then the order inside each group). */\nexport const sites: readonly Site[] = [\n site({ id: \"krizaka\", name: \"Krizaka\", url: \"https://www.krizaka.com\", kind: \"company\", group: \"krizaka\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-com\" }),\n site({ id: \"orazaka\", name: \"Orazaka\", url: \"https://www.orazaka.com\", kind: \"product\", group: \"products\", status: \"released\", mark: \"orazaka\", repo: \"https://github.com/krizaka/orazaka\" }),\n site({ id: \"orochia\", name: \"Orochia\", url: \"https://www.orochia.com\", kind: \"product\", group: \"products\", status: \"released\", mark: \"orochia\", repo: \"https://github.com/krizaka/orochia\" }),\n site({ id: \"yasakia\", name: \"Yasakia\", url: \"https://www.yasakia.com\", kind: \"product\", group: \"products\", status: \"development\", mark: \"yasakia\", repo: \"https://github.com/krizaka/yasakia\" }),\n site({ id: \"yororis\", name: \"Yororis\", url: \"https://www.yororis.com\", kind: \"product\", group: \"products\", status: \"development\", mark: \"yororis\", repo: \"https://github.com/krizaka/yororis\" }),\n site({ id: \"yomizaka\", name: \"Yomizaka\", url: \"https://www.yomizaka.com\", kind: \"product\", group: \"products\", status: \"development\", mark: \"yomizaka\", repo: \"https://github.com/krizaka/yomizaka\" }),\n site({ id: \"kachizaka\", name: \"Kachizaka\", url: \"https://www.kachizaka.com\", kind: \"product\", group: \"products\", status: \"development\", mark: \"kachizaka\", repo: \"https://github.com/krizaka/kachizaka\" }),\n site({ id: \"akinaza\", name: \"Akinaza\", url: \"https://www.akinaza.com\", kind: \"product\", group: \"products\", status: \"development\", mark: \"akinaza\", repo: \"https://github.com/krizaka/akinaza\" }),\n site({ id: \"ui\", name: \"Krizaka UI\", url: \"https://ui.krizaka.com\", kind: \"open-source\", group: \"open-source\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-ui\" }),\n site({ id: \"java\", name: \"Krizaka Java\", url: \"https://java.krizaka.com\", kind: \"open-source\", group: \"open-source\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-build\" }),\n site({ id: \"ts\", name: \"Krizaka TypeScript\", url: \"https://ts.krizaka.com\", kind: \"open-source\", group: \"open-source\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-ts\" }),\n // The motion lab: built in the open on GitHub Pages; what proves itself there moves into Krizaka UI.\n site({ id: \"motion\", name: \"Krizaka Motion\", url: \"https://krizaka.github.io/krizaka-motion\", kind: \"open-source\", group: \"open-source\", status: \"development\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-motion\" }),\n site({ id: \"github\", name: \"GitHub\", url: \"https://github.com/krizaka\", kind: \"open-source\", group: \"github\", status: \"released\", mark: \"github\", repo: \"https://github.com/krizaka\" }),\n];\n\n/** The groups, in reading order. */\nexport const siteGroups: readonly SiteGroup[] = [\"krizaka\", \"products\", \"open-source\", \"github\"];\n\n/** A site by id. */\nexport function siteById(id: SiteId): Site {\n const found = sites.find((s) => s.id === id);\n if (!found) throw new Error(`Unknown Krizaka site \"${id}\".`);\n return found;\n}\n\n/** The family grouped, in reading order: `[{ group, sites }]`, empty groups left out. */\nexport function sitesByGroup(): { group: SiteGroup; sites: Site[] }[] {\n return siteGroups.map((group) => ({ group, sites: sites.filter((s) => s.group === group) })).filter((g) => g.sites.length > 0);\n}\n\n/** The languages the family's words are written in. */\nexport type SiteLocale = \"en\" | \"fr\";\n\n/** The company's own pages, the footer's « Krizaka » column (the brand's home is the signature line's link). */\nexport type CompanyLinkId = \"story\" | \"blog\" | \"contact\";\nexport const companyLinks: readonly { id: CompanyLinkId; url: Record<SiteLocale, string> }[] = [\n { id: \"story\", url: { en: \"https://www.krizaka.com/story\", fr: \"https://www.krizaka.com/fr/story\" } },\n { id: \"blog\", url: { en: \"https://blog.krizaka.com\", fr: \"https://blog.krizaka.com\" } },\n { id: \"contact\", url: { en: \"https://www.krizaka.com/contact\", fr: \"https://www.krizaka.com/fr/contact\" } },\n];\n\n/** The words of the family: the switcher, the footer, each site's one line. */\nexport interface FamilyLabels {\n /** The family's name: the switcher's navigation and its button, the footer's navigation (“Krizaka family”). */\n family: string;\n /** The heading of each group. */\n groups: Record<SiteGroup, string>;\n /** The badge of a site that is not released. */\n status: Record<Exclude<SiteStatus, \"released\">, string>;\n /** Says which site is the current one (“You are here”). */\n current: string;\n /** One line per site: what it is. */\n descriptions: Record<SiteId, string>;\n /** The footer's signature, by the kind of the current site (“A Krizaka product”). */\n signature: Record<SiteKind, string>;\n /** The footer's place line (“Made in Montréal”). */\n place: string;\n /** The accessible name of the version (“Version”). */\n version: string;\n /** The language of these words: the company links open in it. @default \"en\" */\n lang?: SiteLocale;\n /** The company's pages in the footer's « Krizaka » column. @default the English words */\n company?: Record<CompanyLinkId, string>;\n}\n\n/** The family's words in English and French. Pass `familyLabels[locale]`, or your own translation of the same shape. */\nexport const familyLabels: Record<SiteLocale, FamilyLabels> = {\n en: {\n family: \"Krizaka family\",\n groups: { krizaka: \"Krizaka\", products: \"Products\", \"open-source\": \"Open source\", github: \"GitHub\" },\n status: { upcoming: \"Coming soon\", construction: \"Under construction\", development: \"In development\" },\n current: \"You are here\",\n descriptions: {\n krizaka: \"The company: our products, our open source, our story.\",\n orazaka: \"Sovereign AI on your own servers: chat, documents, images and video — and the engine under the other products.\",\n orochia: \"A video platform for creators.\",\n yasakia: \"Meet real people: introductions, and photos checked before you see them.\",\n yororis: \"A listening space with a face and a voice.\",\n yomizaka: \"Yomizaka reads your leases, contracts and invoices.\",\n kachizaka: \"Predictions among friends — live data, in real time.\",\n akinaza: \"Running a shop in Québec, for less — Loi 25 by design.\",\n ui: \"Components, tokens, icons and charts — web and React Native.\",\n java: \"Spring Boot building blocks on Maven Central.\",\n ts: \"TypeScript backend building blocks on npm.\",\n motion: \"The motion lab: the kit's motion, played live with its knobs.\",\n github: \"Every repository, in the open.\",\n },\n signature: { company: \"A Krizaka company\", product: \"A Krizaka product\", \"open-source\": \"A Krizaka open-source project\" },\n place: \"Made in Montréal\",\n version: \"Version\",\n lang: \"en\",\n company: { story: \"Our story\", blog: \"Blog\", contact: \"Contact us\" },\n },\n fr: {\n family: \"Famille Krizaka\",\n groups: { krizaka: \"Krizaka\", products: \"Produits\", \"open-source\": \"Open source\", github: \"GitHub\" },\n status: { upcoming: \"Bientôt\", construction: \"En construction\", development: \"En développement\" },\n current: \"Vous êtes ici\",\n descriptions: {\n krizaka: \"La compagnie : nos produits, notre open source, notre histoire.\",\n orazaka: \"L’IA souveraine sur vos propres serveurs : conversation, documents, images et vidéo — et le moteur des autres produits.\",\n orochia: \"Une plateforme vidéo pour les créateurs.\",\n yasakia: \"Rencontrez de vraies personnes : des présentations, et des photos vérifiées avant que vous les voyiez.\",\n yororis: \"Un espace d’écoute avec un visage et une voix.\",\n yomizaka: \"Yomizaka lit vos baux, contrats et factures.\",\n kachizaka: \"Les pronostics entre amis — des données en direct.\",\n akinaza: \"Tenir une boutique au Québec, pour moins cher — Loi 25 dès la conception.\",\n ui: \"Composants, jetons, icônes et graphiques — web et React Native.\",\n java: \"Des briques Spring Boot sur Maven Central.\",\n ts: \"Des briques backend TypeScript sur npm.\",\n motion: \"Le labo du mouvement : le mouvement du kit, joué en direct, avec ses réglages.\",\n github: \"Tous les dépôts, au grand jour.\",\n },\n signature: { company: \"Une compagnie Krizaka\", product: \"Un produit Krizaka\", \"open-source\": \"Un projet open source de Krizaka\" },\n place: \"Fait à Montréal\",\n version: \"Version\",\n lang: \"fr\",\n company: { story: \"Notre histoire\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ACR,QAAQ,EAAE,SAAS,WAAW,UAAU,YAAY,eAAe,eAAe,QAAQ,SAAS;AAAA,IACnG,QAAQ,EAAE,UAAU,cAAW,cAAc,mBAAmB,aAAa,sBAAmB;AAAA,IAChG,SAAS;AAAA,IACT,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,MACV,WAAW;AAAA,MACX,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,IACA,WAAW,EAAE,SAAS,yBAAyB,SAAS,sBAAsB,eAAe,mCAAmC;AAAA,IAChI,OAAO;AAAA,IACP,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS,EAAE,OAAO,kBAAkB,MAAM,UAAU,SAAS,iBAAc;AAAA,EAC7E;AACF;","names":[]}
@@ -0,0 +1,173 @@
1
+ "use client";
2
+ import {
3
+ defineRecipe
4
+ } from "./chunk-D3T54RSL.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-NSLXEDIS.js";
8
+
9
+ // src/chip/chip.tsx
10
+ import { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
11
+ import * as React from "react";
12
+ import { tv } from "tailwind-variants";
13
+ import { useRouteBinding } from "@krizaka/ui/router";
14
+
15
+ // src/chip/recipe.ts
16
+ var chipRecipe = defineRecipe({
17
+ slots: {
18
+ group: "flex flex-wrap items-center gap-2 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch",
19
+ base: "inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border font-semibold transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40 border-border-default bg-surface-1 text-fg-secondary hover:border-border-strong hover:text-fg data-[state=on]:border-accent data-[state=on]:bg-accent-soft data-[state=on]:text-fg",
20
+ remove: "-mr-1.5 inline-flex h-6 w-6 items-center justify-center rounded-full text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
21
+ },
22
+ variants: {
23
+ size: { sm: { base: "h-7 px-3 text-xs" }, md: { base: "h-9 px-3.5 text-xs" } }
24
+ },
25
+ defaultVariants: { size: "md" }
26
+ });
27
+
28
+ // src/chip/chip.tsx
29
+ import { jsx, jsxs } from "react/jsx-runtime";
30
+ var chip = tv(chipRecipe);
31
+ var ChipGroupContext = React.createContext(null);
32
+ function RemoveIcon() {
33
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) });
34
+ }
35
+ function ChipBase(props) {
36
+ const group = React.useContext(ChipGroupContext);
37
+ if (props.removable) {
38
+ const { removable: _removable2, removeLabel, onRemove, disabled, size: size2, className: className2, children, ...rest2 } = props;
39
+ const s2 = chip({ size: size2 ?? group?.size });
40
+ return /* @__PURE__ */ jsxs("span", { "data-removable": "", className: s2.base({ className: className2 }), ...rest2, children: [
41
+ children,
42
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": removeLabel, title: removeLabel, disabled, onClick: onRemove, className: s2.remove(), children: /* @__PURE__ */ jsx(RemoveIcon, {}) })
43
+ ] });
44
+ }
45
+ const { removable: _removable, value, selected, defaultSelected, onSelectedChange, size, className, ...rest } = props;
46
+ const s = chip({ size: size ?? group?.size });
47
+ if (group) {
48
+ if (value === void 0) throw new Error("Chip: a chip inside Chip.Group needs a `value`.");
49
+ return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, { value, className: s.base({ className }), ...rest });
50
+ }
51
+ return /* @__PURE__ */ jsx(
52
+ TogglePrimitive.Root,
53
+ {
54
+ pressed: selected,
55
+ defaultPressed: defaultSelected,
56
+ onPressedChange: onSelectedChange,
57
+ className: s.base({ className }),
58
+ ...rest
59
+ }
60
+ );
61
+ }
62
+ function ChipGroup({ label, size, className, children, ...props }) {
63
+ const single = props.type === "single" ? props : void 0;
64
+ const routed = useRouteBinding(single?.routeKey, single?.routeValues, { value: single?.value, defaultValue: single?.defaultValue, onValueChange: single?.onValueChange });
65
+ const s = chip({ size });
66
+ const context = React.useMemo(() => ({ size }), [size]);
67
+ const common = { "aria-label": label, className: s.group({ className }) };
68
+ let group;
69
+ if (props.type === "single") {
70
+ const { type: _type, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, required, routeKey: _routeKey, routeValues: _routeValues, ...rest } = props;
71
+ group = /* @__PURE__ */ jsx(SingleGroup, { ...rest, ...common, value: routed.value, defaultValue: routed.defaultValue, onValueChange: routed.onValueChange, required, children });
72
+ } else {
73
+ const { type: _type, required: _required, ...rest } = props;
74
+ group = /* @__PURE__ */ jsx(ToggleGroupPrimitive.Root, { type: "multiple", ...rest, ...common, children });
75
+ }
76
+ return /* @__PURE__ */ jsx(ChipGroupContext.Provider, { value: context, children: group });
77
+ }
78
+ function SingleGroup({
79
+ value,
80
+ defaultValue,
81
+ onValueChange,
82
+ required,
83
+ ...props
84
+ }) {
85
+ const [inner, setInner] = React.useState(defaultValue ?? "");
86
+ const current = value ?? inner;
87
+ return /* @__PURE__ */ jsx(
88
+ ToggleGroupPrimitive.Root,
89
+ {
90
+ type: "single",
91
+ value: current,
92
+ onValueChange: (next) => {
93
+ if (required && !next) return;
94
+ if (value === void 0) setInner(next);
95
+ onValueChange?.(next);
96
+ },
97
+ ...props
98
+ }
99
+ );
100
+ }
101
+ var Chip = Object.assign(ChipBase, { Group: ChipGroup });
102
+
103
+ // src/chip/tag-chip.tsx
104
+ import { RadioGroup as RadioPrimitive } from "radix-ui";
105
+
106
+ // src/chip/markers.ts
107
+ var TAG_MARKERS = ["blue", "green", "amber", "red", "violet", "gray"];
108
+
109
+ // src/chip/tag-chip.tsx
110
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
111
+ var MARKERS = TAG_MARKERS;
112
+ var markerVar = (marker) => `var(--kz-tag-${marker})`;
113
+ function TagMarker({ marker, shape = "dot", className, style, ...props }) {
114
+ return /* @__PURE__ */ jsx2(
115
+ "span",
116
+ {
117
+ "aria-hidden": true,
118
+ "data-marker": marker,
119
+ "data-shape": shape,
120
+ className: cn(
121
+ "inline-block shrink-0 bg-(--kz-marker) data-[shape=dot]:h-2.5 data-[shape=dot]:w-2.5 data-[shape=dot]:rounded-full",
122
+ "data-[shape=ribbon]:h-3.5 data-[shape=ribbon]:w-2.5 data-[shape=ribbon]:[clip-path:polygon(0_0,100%_0,100%_100%,50%_72%,0_100%)]",
123
+ className
124
+ ),
125
+ style: { ...style, ["--kz-marker"]: markerVar(marker) },
126
+ ...props
127
+ }
128
+ );
129
+ }
130
+ function TagChip({ marker, shape, children, ...props }) {
131
+ const content = /* @__PURE__ */ jsxs2(Fragment, { children: [
132
+ /* @__PURE__ */ jsx2(TagMarker, { marker, shape }),
133
+ children
134
+ ] });
135
+ return /* @__PURE__ */ jsx2(Chip, { ...props, children: content });
136
+ }
137
+ function MarkerPicker({ label, names, value, defaultValue, onValueChange, markers = MARKERS, disabled, className }) {
138
+ return /* @__PURE__ */ jsx2(
139
+ RadioPrimitive.Root,
140
+ {
141
+ "aria-label": label,
142
+ value,
143
+ defaultValue,
144
+ onValueChange: (next) => onValueChange?.(next),
145
+ disabled,
146
+ orientation: "horizontal",
147
+ className: cn("flex flex-wrap items-center gap-1.5", className),
148
+ children: markers.map((marker) => /* @__PURE__ */ jsx2(
149
+ RadioPrimitive.Item,
150
+ {
151
+ value: marker,
152
+ "aria-label": names[marker],
153
+ title: names[marker],
154
+ className: cn(
155
+ "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border-default bg-surface-1 transition-colors",
156
+ "hover:border-border-strong focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40",
157
+ "data-[state=checked]:border-(--kz-marker) data-[state=checked]:bg-surface-2"
158
+ ),
159
+ style: { ["--kz-marker"]: markerVar(marker) },
160
+ children: /* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: "relative inline-flex h-4 w-4 items-center justify-center rounded-full bg-(--kz-marker)", children: /* @__PURE__ */ jsx2(RadioPrimitive.Indicator, { forceMount: true, className: "hidden h-full w-full items-center justify-center data-[state=checked]:flex", children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", className: "h-3 w-3 text-surface-0", fill: "none", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx2("path", { d: "M20 6 9 17l-5-5" }) }) }) })
161
+ },
162
+ marker
163
+ ))
164
+ }
165
+ );
166
+ }
167
+
168
+ export {
169
+ Chip,
170
+ TagChip,
171
+ MarkerPicker
172
+ };
173
+ //# sourceMappingURL=chunk-UYGUSYIC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/chip/chip.tsx","../src/chip/recipe.ts","../src/chip/tag-chip.tsx","../src/chip/markers.ts"],"sourcesContent":["// Client (a context). A chip is a pressable pill: alone it is a Radix Toggle (aria-pressed), inside `Chip.Group` an\n// item of a Radix Toggle Group (roving focus with the arrows; `single` = radio semantics, `multiple` = pressed\n// buttons). A `removable` chip is a static label with its own remove button (two buttons cannot nest).\nimport { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { useRouteBinding } from \"../router\";\nimport { chipRecipe } from \"./recipe\";\n\nexport const chip = tv(chipRecipe);\n\nexport type ChipVariants = VariantProps<typeof chip>;\n\ntype GroupContext = { size: ChipVariants[\"size\"] };\nconst ChipGroupContext = React.createContext<GroupContext | null>(null);\n\nfunction RemoveIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" className=\"h-3.5 w-3.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\ntype ToggleChipProps = Omit<React.ComponentProps<\"button\">, \"value\" | \"defaultValue\"> &\n ChipVariants & {\n /**\n * sm · md (inside `Chip.Group`, the group's size by default).\n * @default \"md\"\n */\n size?: ChipVariants[\"size\"];\n /** Inside `Chip.Group`: the value this chip stands for (required there, ignored alone). */\n value?: string;\n /** Alone: pressed or not (`defaultSelected` uncontrolled), `onSelectedChange` on every press. */\n selected?: boolean;\n /** Alone: pressed at first, uncontrolled. */\n defaultSelected?: boolean;\n /** Alone: called with the new state on every press. */\n onSelectedChange?: (selected: boolean) => void;\n /** A pressable chip (the default); `true` makes it a static chip with a remove button. */\n removable?: false;\n };\n\ntype RemovableChipProps = Omit<React.ComponentProps<\"span\">, \"onSelect\"> &\n ChipVariants & {\n /** A static chip (a chosen tag, an applied filter) with a remove button. */\n removable: true;\n /** The accessible name of the remove button — passed translated, e.g. \"Remove #night\". */\n removeLabel: string;\n /** Runs when the remove button is pressed. */\n onRemove: () => void;\n /** Disables the remove button. */\n disabled?: boolean;\n };\n\nexport type ChipProps = ToggleChipProps | RemovableChipProps;\n\n/** A selectable pill (`selected` / `onSelectedChange`), an item of `Chip.Group` (`value`), or `removable`. */\nfunction ChipBase(props: ChipProps) {\n const group = React.useContext(ChipGroupContext);\n if (props.removable) {\n const { removable: _removable, removeLabel, onRemove, disabled, size, className, children, ...rest } = props;\n const s = chip({ size: size ?? group?.size });\n return (\n <span data-removable=\"\" className={s.base({ className })} {...rest}>\n {children}\n <button type=\"button\" aria-label={removeLabel} title={removeLabel} disabled={disabled} onClick={onRemove} className={s.remove()}>\n <RemoveIcon />\n </button>\n </span>\n );\n }\n const { removable: _removable, value, selected, defaultSelected, onSelectedChange, size, className, ...rest } = props;\n const s = chip({ size: size ?? group?.size });\n if (group) {\n if (value === undefined) throw new Error(\"Chip: a chip inside Chip.Group needs a `value`.\");\n return <ToggleGroupPrimitive.Item value={value} className={s.base({ className })} {...rest} />;\n }\n return (\n <TogglePrimitive.Root\n pressed={selected}\n defaultPressed={defaultSelected}\n onPressedChange={onSelectedChange}\n className={s.base({ className })}\n {...rest}\n />\n );\n}\n\ntype GroupBase = Omit<React.ComponentProps<\"div\">, \"defaultValue\" | \"dir\"> &\n ChipVariants & {\n /**\n * sm · md: the size of every chip of the group.\n * @default \"md\"\n */\n size?: ChipVariants[\"size\"];\n /** The group's accessible name — passed translated (\"Filter by format\"). */\n label?: string;\n /** The arrow keys that move: left / right (horizontal, a row) or up / down (vertical, a column). */\n orientation?: \"horizontal\" | \"vertical\";\n /** Arrow keys wrap from the last chip to the first (default `true`). */\n loop?: boolean;\n /** Disables every chip of the group. */\n disabled?: boolean;\n };\n\nexport type ChipGroupProps =\n | (GroupBase & {\n /** One choice: the chips behave as radios. */\n type: \"single\";\n /** The chosen value (controlled), `\"\"` when none. */\n value?: string;\n /** The value chosen at first, uncontrolled. */\n defaultValue?: string;\n /** Called with the new value on every choice. */\n onValueChange?: (value: string) => void;\n /** Keeps one chip selected: pressing the selected chip does not clear it (default `false`). */\n required?: boolean;\n /** Binds the choice to this search parameter of the URL (`?type=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the chips' `value`s). */\n routeValues?: readonly string[];\n })\n | (GroupBase & {\n /** Any number of choices: the chips are pressed buttons. */\n type: \"multiple\";\n /** The chosen values (controlled). */\n value?: string[];\n /** The values chosen at first, uncontrolled. */\n defaultValue?: string[];\n /** Called with the new values on every press. */\n onValueChange?: (value: string[]) => void;\n required?: never;\n routeKey?: never;\n routeValues?: never;\n });\n\n/** Chips that choose together: `type` single · multiple, `value`/`defaultValue` + `onValueChange`. */\nexport function ChipGroup({ label, size, className, children, ...props }: ChipGroupProps) {\n const single = props.type === \"single\" ? props : undefined;\n const routed = useRouteBinding(single?.routeKey, single?.routeValues, { value: single?.value, defaultValue: single?.defaultValue, onValueChange: single?.onValueChange });\n const s = chip({ size });\n const context = React.useMemo(() => ({ size }), [size]);\n const common = { \"aria-label\": label, className: s.group({ className }) };\n let group: React.ReactNode;\n if (props.type === \"single\") {\n const { type: _type, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, required, routeKey: _routeKey, routeValues: _routeValues, ...rest } = props;\n group = <SingleGroup {...rest} {...common} value={routed.value} defaultValue={routed.defaultValue} onValueChange={routed.onValueChange} required={required}>{children}</SingleGroup>;\n } else {\n const { type: _type, required: _required, ...rest } = props;\n group = (\n <ToggleGroupPrimitive.Root type=\"multiple\" {...rest} {...common}>\n {children}\n </ToggleGroupPrimitive.Root>\n );\n }\n return <ChipGroupContext.Provider value={context}>{group}</ChipGroupContext.Provider>;\n}\n\n/** Radix's single group, plus `required`: the value is held here so that an empty change can be refused. */\nfunction SingleGroup({\n value,\n defaultValue,\n onValueChange,\n required,\n ...props\n}: Omit<GroupBase, \"size\" | \"label\"> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n required?: boolean;\n}) {\n const [inner, setInner] = React.useState(defaultValue ?? \"\");\n const current = value ?? inner;\n return (\n <ToggleGroupPrimitive.Root\n type=\"single\"\n value={current}\n onValueChange={(next) => {\n if (required && !next) return;\n if (value === undefined) setInner(next);\n onValueChange?.(next);\n }}\n {...props}\n />\n );\n}\n\n/** `Chip` (selectable, removable) and `Chip.Group` (single · multiple). */\nexport const Chip = Object.assign(ChipBase, { Group: ChipGroup });\n","// The chip's parts and sizes, written once as classes of the Krizaka tokens: the web wears them with `tv(chipRecipe)`,\n// React Native reads the same classes into styles (native/chip.tsx). `data-[state=on]:` is the chosen chip.\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const chipRecipe = defineRecipe({\n slots: {\n group: \"flex flex-wrap items-center gap-2 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch\",\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40 \" +\n \"border-border-default bg-surface-1 text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=on]:border-accent data-[state=on]:bg-accent-soft data-[state=on]:text-fg\",\n remove:\n \"-mr-1.5 inline-flex h-6 w-6 items-center justify-center rounded-full text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n },\n variants: {\n size: { sm: { base: \"h-7 px-3 text-xs\" }, md: { base: \"h-9 px-3.5 text-xs\" } },\n },\n defaultVariants: { size: \"md\" },\n});\n","// Client (a Radix radio group, and `Chip`'s context). The tags of a workspace (krizaka-ts#89, `@krizaka/organize`): a name\n// with a colour marker beside it. The marker is a NAME of the closed palette (`MARKERS`: blue · green · amber · red ·\n// violet · gray), mapped to `--kz-tag-<name>` — a dot (≥ 3:1) or Yomizaka's bookmark ribbon. It sits beside the name and\n// never fills the chip, and the name is always written: the colour is never the only signal.\nimport type { Marker } from \"@krizaka/organize/contract\";\nimport { RadioGroup as RadioPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Chip, type ChipProps } from \"./chip\";\nimport { TAG_MARKERS } from \"./markers\";\n\n/** The six names of the closed palette (`@krizaka/organize` `MARKERS`; a test keeps them equal). */\nexport const MARKERS: readonly Marker[] = TAG_MARKERS;\nexport type { Marker };\n\n/** The marker's shape: a `dot`, or the `ribbon` (a bookmark: a rectangle with a notch at the bottom). */\nexport type MarkerShape = \"dot\" | \"ribbon\";\n\n/** The CSS custom property the marker reads its colour from: `--kz-tag-<name>`. */\nconst markerVar = (marker: Marker) => `var(--kz-tag-${marker})`;\n\nexport type TagMarkerProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** A name of the closed palette. */\n marker: Marker;\n /**\n * dot · ribbon.\n * @default \"dot\"\n */\n shape?: MarkerShape;\n};\n\n/** The marker alone, decorative (`aria-hidden`): put the tag's name beside it. */\nexport function TagMarker({ marker, shape = \"dot\", className, style, ...props }: TagMarkerProps) {\n return (\n <span\n aria-hidden\n data-marker={marker}\n data-shape={shape}\n className={cn(\n \"inline-block shrink-0 bg-(--kz-marker) data-[shape=dot]:h-2.5 data-[shape=dot]:w-2.5 data-[shape=dot]:rounded-full\",\n \"data-[shape=ribbon]:h-3.5 data-[shape=ribbon]:w-2.5 data-[shape=ribbon]:[clip-path:polygon(0_0,100%_0,100%_100%,50%_72%,0_100%)]\",\n className,\n )}\n style={{ ...style, [\"--kz-marker\" as string]: markerVar(marker) }}\n {...props}\n />\n );\n}\n\nexport type TagChipProps = ChipProps & {\n /** The tag's marker: a name of the closed palette (`blue · green · amber · red · violet · gray`). */\n marker: Marker;\n /**\n * dot · ribbon.\n * @default \"dot\"\n */\n shape?: MarkerShape;\n};\n\n/**\n * A tag: its marker and its name. Alone a toggle (a filter), inside `Chip.Group` an item, or `removable` (a tag worn by a\n * file) — the behaviour of `Chip`, with the marker before the name.\n */\nexport function TagChip({ marker, shape, children, ...props }: TagChipProps) {\n const content = (\n <>\n <TagMarker marker={marker} shape={shape} />\n {children}\n </>\n );\n return <Chip {...(props as ChipProps)}>{content}</Chip>;\n}\n\nexport type MarkerPickerProps = {\n /** The group's accessible name (\"Colour of the tag\"), passed translated. */\n label: string;\n /** The name of each colour, passed translated: `{ blue: \"Blue\", … }`. The swatches are named, never colour alone. */\n names: Readonly<Record<Marker, string>>;\n /** The colour chosen (controlled). */\n value?: Marker;\n /** The colour chosen at first, uncontrolled. */\n defaultValue?: Marker;\n /** Called with the colour chosen. */\n onValueChange?: (value: Marker) => void;\n /** The colours offered (default: the six). */\n markers?: readonly Marker[];\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Recolours a tag from the closed palette: a radio group of swatches (arrow keys), the chosen one ticked and named. */\nexport function MarkerPicker({ label, names, value, defaultValue, onValueChange, markers = MARKERS, disabled, className }: MarkerPickerProps) {\n return (\n <RadioPrimitive.Root\n aria-label={label}\n value={value}\n defaultValue={defaultValue}\n onValueChange={(next) => onValueChange?.(next as Marker)}\n disabled={disabled}\n orientation=\"horizontal\"\n className={cn(\"flex flex-wrap items-center gap-1.5\", className)}\n >\n {markers.map((marker) => (\n <RadioPrimitive.Item\n key={marker}\n value={marker}\n aria-label={names[marker]}\n title={names[marker]}\n className={cn(\n \"inline-flex h-8 w-8 items-center justify-center rounded-full border border-border-default bg-surface-1 transition-colors\",\n \"hover:border-border-strong focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\",\n \"data-[state=checked]:border-(--kz-marker) data-[state=checked]:bg-surface-2\",\n )}\n style={{ [\"--kz-marker\" as string]: markerVar(marker) }}\n >\n <span aria-hidden className=\"relative inline-flex h-4 w-4 items-center justify-center rounded-full bg-(--kz-marker)\">\n <RadioPrimitive.Indicator forceMount className=\"hidden h-full w-full items-center justify-center data-[state=checked]:flex\">\n {/* The tick is the second signal: a shape, not a colour (it reads in the page's text colour on the swatch's ring). */}\n <svg viewBox=\"0 0 24 24\" className=\"h-3 w-3 text-surface-0\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </RadioPrimitive.Indicator>\n </span>\n </RadioPrimitive.Item>\n ))}\n </RadioPrimitive.Root>\n );\n}\n","// The six names of the closed palette of tag markers, written once for the platforms that cannot import\n// `@krizaka/organize/contract` (/native adds no dependency). A test keeps them equal to the contract's `MARKERS`.\nexport const TAG_MARKERS = [\"blue\", \"green\", \"amber\", \"red\", \"violet\", \"gray\"] as const;\n"],"mappings":";;;;;;;;;AAGA,SAAS,UAAU,iBAAiB,eAAe,4BAA4B;AAC/E,YAAY,WAAW;AACvB,SAAS,UAA6B;AAEtC,SAAS,uB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