@krizaka/ui 3.8.0 → 3.10.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 (342) hide show
  1. package/README.md +13 -9
  2. package/dist/action-bar.js +2 -1
  3. package/dist/action-bar.js.map +1 -1
  4. package/dist/app-shell.d.ts +81 -3
  5. package/dist/app-shell.js +163 -35
  6. package/dist/app-shell.js.map +1 -1
  7. package/dist/audio-player.js +1 -1
  8. package/dist/badge.d.ts +36 -39
  9. package/dist/badge.js +11 -2
  10. package/dist/badge.js.map +1 -1
  11. package/dist/blocks.css +56 -4
  12. package/dist/button-BmCrLCq7.d.ts +114 -0
  13. package/dist/button.d.ts +48 -48
  14. package/dist/button.js +2 -1
  15. package/dist/card.d.ts +111 -111
  16. package/dist/card.js +10 -2
  17. package/dist/card.js.map +1 -1
  18. package/dist/chip.d.ts +24 -24
  19. package/dist/chip.js +10 -2
  20. package/dist/chip.js.map +1 -1
  21. package/dist/{chunk-UOMP6VOZ.js → chunk-276PTQMQ.js} +10 -4
  22. package/dist/chunk-276PTQMQ.js.map +1 -0
  23. package/dist/{chunk-Z6FUPB3Q.js → chunk-2NB27LM7.js} +11 -3
  24. package/dist/chunk-2NB27LM7.js.map +1 -0
  25. package/dist/chunk-2VNYHG4E.js +9 -0
  26. package/dist/chunk-2VNYHG4E.js.map +1 -0
  27. package/dist/{chunk-ND3L5VHT.js → chunk-5Z7FWCV2.js} +2 -2
  28. package/dist/{chunk-YH4LMWRU.js → chunk-7UCPGXKN.js} +11 -3
  29. package/dist/chunk-7UCPGXKN.js.map +1 -0
  30. package/dist/{chunk-AZPKXP3O.js → chunk-AFY35UCB.js} +6 -1
  31. package/dist/{chunk-AZPKXP3O.js.map → chunk-AFY35UCB.js.map} +1 -1
  32. package/dist/{chunk-LCZXS6AK.js → chunk-CKSHLSDH.js} +5 -5
  33. package/dist/chunk-CKSHLSDH.js.map +1 -0
  34. package/dist/chunk-D3T54RSL.js +11 -0
  35. package/dist/chunk-D3T54RSL.js.map +1 -0
  36. package/dist/{chunk-ZKVQGXLD.js → chunk-FKBHWS4N.js} +2 -2
  37. package/dist/{chunk-BRKMQ6JV.js → chunk-FZBWEDQI.js} +1 -23
  38. package/dist/chunk-FZBWEDQI.js.map +1 -0
  39. package/dist/chunk-HG65YAV4.js +379 -0
  40. package/dist/chunk-HG65YAV4.js.map +1 -0
  41. package/dist/{chunk-HCNOOPZE.js → chunk-KVDB4GXV.js} +2 -2
  42. package/dist/chunk-OT6HX3PN.js +85 -0
  43. package/dist/chunk-OT6HX3PN.js.map +1 -0
  44. package/dist/{chunk-RUPNPMP3.js → chunk-OWC2LZD2.js} +11 -3
  45. package/dist/chunk-OWC2LZD2.js.map +1 -0
  46. package/dist/{chunk-FDCMBWUU.js → chunk-REPTKUJ6.js} +4 -4
  47. package/dist/chunk-REPTKUJ6.js.map +1 -0
  48. package/dist/code-block.d.ts +32 -10
  49. package/dist/code-block.js +51 -43
  50. package/dist/code-block.js.map +1 -1
  51. package/dist/combobox.d.ts +3 -3
  52. package/dist/combobox.js +4 -3
  53. package/dist/command.js +3 -2
  54. package/dist/command.js.map +1 -1
  55. package/dist/component-page.js.map +1 -1
  56. package/dist/confirm-button.d.ts +1 -1
  57. package/dist/confirm-button.js +2 -1
  58. package/dist/confirm-button.js.map +1 -1
  59. package/dist/continue-prompt.js +11 -3
  60. package/dist/continue-prompt.js.map +1 -1
  61. package/dist/data-table.js +7 -6
  62. package/dist/data-table.js.map +1 -1
  63. package/dist/date-picker.js +1 -1
  64. package/dist/dialog.js +3 -2
  65. package/dist/dialog.js.map +1 -1
  66. package/dist/file-upload.d.ts +12 -1
  67. package/dist/file-upload.js +73 -89
  68. package/dist/file-upload.js.map +1 -1
  69. package/dist/filter-bar.js +3 -2
  70. package/dist/image-cropper.js +1 -1
  71. package/dist/index.js +9 -367
  72. package/dist/index.js.map +1 -1
  73. package/dist/list.js +1 -1
  74. package/dist/map.js.map +1 -1
  75. package/dist/markdown.d.ts +38 -0
  76. package/dist/markdown.js +150 -0
  77. package/dist/markdown.js.map +1 -0
  78. package/dist/match-dialog.js +2 -1
  79. package/dist/match-dialog.js.map +1 -1
  80. package/dist/media-capture.js +1 -1
  81. package/dist/native/markdown.d.ts +24 -0
  82. package/dist/native/markdown.js +200 -0
  83. package/dist/native/markdown.js.map +1 -0
  84. package/dist/native.d.ts +49 -8
  85. package/dist/native.js +728 -349
  86. package/dist/native.js.map +1 -1
  87. package/dist/nav-bar.d.ts +86 -3
  88. package/dist/nav-bar.js +88 -2
  89. package/dist/nav-bar.js.map +1 -1
  90. package/dist/recipes.d.ts +143 -0
  91. package/dist/recipes.js +180 -0
  92. package/dist/recipes.js.map +1 -0
  93. package/dist/search-field.js +2 -2
  94. package/dist/showcase.d.ts +69 -0
  95. package/dist/showcase.js +218 -0
  96. package/dist/showcase.js.map +1 -0
  97. package/dist/site-footer.d.ts +172 -0
  98. package/dist/site-footer.js +105 -0
  99. package/dist/site-footer.js.map +1 -0
  100. package/dist/sites-CgJrxejx.d.ts +32 -0
  101. package/dist/sites.d.ts +64 -0
  102. package/dist/sites.js +69 -0
  103. package/dist/sites.js.map +1 -0
  104. package/dist/swipe-deck.js +1 -1
  105. package/dist/tag-input.js +4 -3
  106. package/dist/tag-input.js.map +1 -1
  107. package/dist/tag-selector.js +2 -1
  108. package/dist/tag-selector.js.map +1 -1
  109. package/dist/theme.d.ts +1 -1
  110. package/dist/theme.js +2 -1
  111. package/dist/theme.js.map +1 -1
  112. package/dist/tree-view.js +1 -1
  113. package/dist/vertical-video.js +2 -1
  114. package/dist/vertical-video.js.map +1 -1
  115. package/dist/video-player.js +1 -1
  116. package/dist/video-trimmer.js +1 -1
  117. package/dist/virtual.js +2 -2
  118. package/package.json +87 -18
  119. package/registry/achievement.json +1 -1
  120. package/registry/action-bar.json +1 -1
  121. package/registry/activity-feed.json +1 -1
  122. package/registry/alert.json +1 -1
  123. package/registry/app-shell.json +135 -12
  124. package/registry/argument-card.json +1 -1
  125. package/registry/audio-player.json +2 -2
  126. package/registry/auth-layout.json +1 -1
  127. package/registry/avatar.json +1 -1
  128. package/registry/badge.json +9 -3
  129. package/registry/button.json +7 -2
  130. package/registry/card-grid.json +1 -1
  131. package/registry/card.json +8 -3
  132. package/registry/catalogue-page.json +1 -1
  133. package/registry/changelog-page.json +1 -1
  134. package/registry/chat.json +1 -1
  135. package/registry/checkbox.json +1 -1
  136. package/registry/chip-link.json +1 -1
  137. package/registry/chip.json +9 -3
  138. package/registry/choice-grid.json +1 -1
  139. package/registry/code-block.json +65 -21
  140. package/registry/combobox.json +4 -3
  141. package/registry/command.json +1 -1
  142. package/registry/component-page.json +4 -4
  143. package/registry/confirm-button.json +1 -1
  144. package/registry/contact-page.json +1 -1
  145. package/registry/continue-prompt.json +1 -1
  146. package/registry/countdown.json +1 -1
  147. package/registry/cta-panel.json +1 -1
  148. package/registry/dashboard-layout.json +1 -1
  149. package/registry/data-table.json +2 -2
  150. package/registry/date-picker.json +3 -3
  151. package/registry/decision-list.json +1 -1
  152. package/registry/description-list.json +1 -1
  153. package/registry/detail-layout.json +1 -1
  154. package/registry/dialog.json +1 -1
  155. package/registry/docs-article-page.json +1 -1
  156. package/registry/docs-hub-page.json +1 -1
  157. package/registry/docs-layout.json +1 -1
  158. package/registry/dropdown-menu.json +1 -1
  159. package/registry/empty-state.json +1 -1
  160. package/registry/error-page.json +1 -1
  161. package/registry/examples/app-shell/console.d.ts +4 -0
  162. package/registry/examples/app-shell/console.js +93 -0
  163. package/registry/examples/app-shell/console.tsx +103 -0
  164. package/registry/examples/badge/native/dot.dark.png +0 -0
  165. package/registry/examples/badge/native/dot.light.png +0 -0
  166. package/registry/examples/badge/native/scrim.dark.png +0 -0
  167. package/registry/examples/badge/native/scrim.light.png +0 -0
  168. package/registry/examples/badge/native/tones.dark.png +0 -0
  169. package/registry/examples/badge/native/tones.light.png +0 -0
  170. package/registry/examples/card/native/default.dark.png +0 -0
  171. package/registry/examples/card/native/default.light.png +0 -0
  172. package/registry/examples/card/native/elevated.light.png +0 -0
  173. package/registry/examples/chip/native/multiple.dark.png +0 -0
  174. package/registry/examples/chip/native/multiple.light.png +0 -0
  175. package/registry/examples/chip/native/removable.dark.png +0 -0
  176. package/registry/examples/chip/native/removable.light.png +0 -0
  177. package/registry/examples/chip/native/single.dark.png +0 -0
  178. package/registry/examples/chip/native/single.light.png +0 -0
  179. package/registry/examples/chip/native/toggle.dark.png +0 -0
  180. package/registry/examples/chip/native/toggle.light.png +0 -0
  181. package/registry/examples/code-block/annotated.d.ts +4 -0
  182. package/registry/examples/code-block/annotated.js +31 -0
  183. package/registry/examples/code-block/annotated.tsx +26 -0
  184. package/registry/examples/component-page/button.tsx +1 -1
  185. package/registry/examples/form/native/amount.dark.png +0 -0
  186. package/registry/examples/form/native/amount.light.png +0 -0
  187. package/registry/examples/markdown/ai-stream.d.ts +4 -0
  188. package/registry/examples/markdown/ai-stream.js +31 -0
  189. package/registry/examples/markdown/ai-stream.tsx +32 -0
  190. package/registry/examples/markdown/basic.d.ts +4 -0
  191. package/registry/examples/markdown/basic.js +26 -0
  192. package/registry/examples/markdown/basic.tsx +22 -0
  193. package/registry/examples/markdown/native/ai-stream.d.ts +4 -0
  194. package/registry/examples/markdown/native/ai-stream.dark.png +0 -0
  195. package/registry/examples/markdown/native/ai-stream.js +17 -0
  196. package/registry/examples/markdown/native/ai-stream.light.png +0 -0
  197. package/registry/examples/markdown/native/ai-stream.tsx +17 -0
  198. package/registry/examples/markdown/native/basic.d.ts +4 -0
  199. package/registry/examples/markdown/native/basic.dark.png +0 -0
  200. package/registry/examples/markdown/native/basic.js +28 -0
  201. package/registry/examples/markdown/native/basic.light.png +0 -0
  202. package/registry/examples/markdown/native/basic.tsx +27 -0
  203. package/registry/examples/nav-bar/family-admin.d.ts +4 -0
  204. package/registry/examples/nav-bar/family-admin.js +21 -0
  205. package/registry/examples/nav-bar/family-admin.tsx +20 -0
  206. package/registry/examples/nav-bar/family-java.d.ts +4 -0
  207. package/registry/examples/nav-bar/family-java.js +33 -0
  208. package/registry/examples/nav-bar/family-java.tsx +34 -0
  209. package/registry/examples/nav-bar/family-product.d.ts +4 -0
  210. package/registry/examples/nav-bar/family-product.js +35 -0
  211. package/registry/examples/nav-bar/family-product.tsx +39 -0
  212. package/registry/examples/nav-bar/family-ui.d.ts +4 -0
  213. package/registry/examples/nav-bar/family-ui.js +34 -0
  214. package/registry/examples/nav-bar/family-ui.tsx +35 -0
  215. package/registry/examples/nav-bar/family-www.d.ts +4 -0
  216. package/registry/examples/nav-bar/family-www.js +34 -0
  217. package/registry/examples/nav-bar/family-www.tsx +36 -0
  218. package/registry/examples/recipes/tone-chip.d.ts +4 -0
  219. package/registry/examples/recipes/tone-chip.js +46 -0
  220. package/registry/examples/recipes/tone-chip.tsx +32 -0
  221. package/registry/examples/screen/native/profile.dark.png +0 -0
  222. package/registry/examples/screen/native/profile.light.png +0 -0
  223. package/registry/examples/showcase/native/slides.d.ts +4 -0
  224. package/registry/examples/showcase/native/slides.dark.png +0 -0
  225. package/registry/examples/showcase/native/slides.js +27 -0
  226. package/registry/examples/showcase/native/slides.light.png +0 -0
  227. package/registry/examples/showcase/native/slides.tsx +28 -0
  228. package/registry/examples/showcase/prompt-image.d.ts +4 -0
  229. package/registry/examples/showcase/prompt-image.js +29 -0
  230. package/registry/examples/showcase/prompt-image.tsx +28 -0
  231. package/registry/examples/showcase/slides.d.ts +4 -0
  232. package/registry/examples/showcase/slides.js +29 -0
  233. package/registry/examples/showcase/slides.tsx +24 -0
  234. package/registry/examples/site-footer/company.d.ts +4 -0
  235. package/registry/examples/site-footer/company.js +26 -0
  236. package/registry/examples/site-footer/company.tsx +23 -0
  237. package/registry/examples/site-footer/open-source-fr.d.ts +4 -0
  238. package/registry/examples/site-footer/open-source-fr.js +17 -0
  239. package/registry/examples/site-footer/open-source-fr.tsx +17 -0
  240. package/registry/examples/site-footer/product.d.ts +4 -0
  241. package/registry/examples/site-footer/product.js +22 -0
  242. package/registry/examples/site-footer/product.tsx +19 -0
  243. package/registry/examples/sites/family.d.ts +4 -0
  244. package/registry/examples/sites/family.js +20 -0
  245. package/registry/examples/sites/family.tsx +30 -0
  246. package/registry/examples/sites/french.d.ts +4 -0
  247. package/registry/examples/sites/french.js +25 -0
  248. package/registry/examples/sites/french.tsx +25 -0
  249. package/registry/examples/tag-selector/native/interests.dark.png +0 -0
  250. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  251. package/registry/field.json +1 -1
  252. package/registry/file-upload.json +8 -3
  253. package/registry/filter-bar.json +1 -1
  254. package/registry/form.json +2 -2
  255. package/registry/gallery-page.json +1 -1
  256. package/registry/glow-card.json +1 -1
  257. package/registry/goal-gauge.json +1 -1
  258. package/registry/how-it-works-page.json +1 -1
  259. package/registry/image-cropper.json +2 -2
  260. package/registry/index.json +138 -20
  261. package/registry/iso.json +1 -1
  262. package/registry/kanban.json +1 -1
  263. package/registry/kbd.json +1 -1
  264. package/registry/landing-page.json +1 -1
  265. package/registry/landscape.json +1 -1
  266. package/registry/legal-page.json +1 -1
  267. package/registry/link-card.json +1 -1
  268. package/registry/list.json +2 -2
  269. package/registry/loader.json +1 -1
  270. package/registry/longform-page.json +1 -1
  271. package/registry/map.json +3 -3
  272. package/registry/markdown.json +266 -0
  273. package/registry/marketing-layout.json +1 -1
  274. package/registry/marquee.json +1 -1
  275. package/registry/mascot-quote.json +1 -1
  276. package/registry/mascot-state.json +1 -1
  277. package/registry/mascots.json +1 -1
  278. package/registry/match-dialog.json +1 -1
  279. package/registry/media-capture.json +2 -2
  280. package/registry/meter.json +1 -1
  281. package/registry/nav-bar.json +257 -13
  282. package/registry/number-ticker.json +1 -1
  283. package/registry/page-header.json +1 -1
  284. package/registry/page-hero.json +1 -1
  285. package/registry/page.json +1 -1
  286. package/registry/pagination.json +1 -1
  287. package/registry/photo-grid.json +1 -1
  288. package/registry/pointer-light.json +1 -1
  289. package/registry/popover.json +1 -1
  290. package/registry/pricing-page.json +1 -1
  291. package/registry/product-page.json +1 -1
  292. package/registry/profile-card.json +1 -1
  293. package/registry/progress.json +1 -1
  294. package/registry/promise-card.json +1 -1
  295. package/registry/radio-group.json +1 -1
  296. package/registry/recipes.json +99 -0
  297. package/registry/scroll-stage.json +1 -1
  298. package/registry/search-field.json +4 -3
  299. package/registry/section-backdrop.json +1 -1
  300. package/registry/separator.json +1 -1
  301. package/registry/settings-layout.json +1 -1
  302. package/registry/showcase.json +421 -0
  303. package/registry/site-footer.json +389 -0
  304. package/registry/sites.json +93 -0
  305. package/registry/skeleton.json +1 -1
  306. package/registry/skip-link.json +1 -1
  307. package/registry/slider.json +1 -1
  308. package/registry/slot.json +1 -1
  309. package/registry/spinner.json +1 -1
  310. package/registry/split-view.json +1 -1
  311. package/registry/stage-banner.json +1 -1
  312. package/registry/stat.json +1 -1
  313. package/registry/status-page.json +1 -1
  314. package/registry/step-progress.json +1 -1
  315. package/registry/stepper.json +1 -1
  316. package/registry/swipe-deck.json +2 -2
  317. package/registry/switch.json +1 -1
  318. package/registry/tabs.json +1 -1
  319. package/registry/tag-input.json +2 -2
  320. package/registry/tag-selector.json +1 -1
  321. package/registry/terminal-replay.json +1 -1
  322. package/registry/theme.json +1 -1
  323. package/registry/toast.json +1 -1
  324. package/registry/toc.json +1 -1
  325. package/registry/tooltip.json +1 -1
  326. package/registry/tree-view.json +2 -2
  327. package/registry/verified-badge.json +1 -1
  328. package/registry/vertical-video.json +2 -2
  329. package/registry/video-player.json +2 -2
  330. package/registry/video-trimmer.json +2 -2
  331. package/registry/virtual.json +2 -2
  332. package/dist/button-BMAO7dKF.d.ts +0 -114
  333. package/dist/chunk-BRKMQ6JV.js.map +0 -1
  334. package/dist/chunk-FDCMBWUU.js.map +0 -1
  335. package/dist/chunk-LCZXS6AK.js.map +0 -1
  336. package/dist/chunk-RUPNPMP3.js.map +0 -1
  337. package/dist/chunk-UOMP6VOZ.js.map +0 -1
  338. package/dist/chunk-YH4LMWRU.js.map +0 -1
  339. package/dist/chunk-Z6FUPB3Q.js.map +0 -1
  340. /package/dist/{chunk-ND3L5VHT.js.map → chunk-5Z7FWCV2.js.map} +0 -0
  341. /package/dist/{chunk-ZKVQGXLD.js.map → chunk-FKBHWS4N.js.map} +0 -0
  342. /package/dist/{chunk-HCNOOPZE.js.map → chunk-KVDB4GXV.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/command/command.tsx"],"sourcesContent":["// Client. A command palette on cmdk: the combobox / listbox roles, the active option (aria-activedescendant), the\n// arrows, Home / End, Enter, and the filtering (turn it off with `shouldFilter={false}` when the server searches).\n// `CommandDialog` puts it in the platform's Dialog. Words arrive as props.\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { DialogContent, type DialogContentProps } from \"../dialog/dialog\";\n\nexport const command = tv({\n slots: {\n root: \"flex h-full w-full flex-col overflow-hidden bg-surface-1 text-fg\",\n inputWrap: \"flex items-center gap-3 border-b border-border-default px-4\",\n icon: \"h-5 w-5 shrink-0 text-fg-secondary\",\n input:\n \"h-13 w-full min-w-0 flex-1 bg-transparent text-sm text-fg outline-hidden placeholder:text-fg-muted disabled:cursor-not-allowed disabled:opacity-50 sm:text-base\",\n list: \"max-h-[min(60dvh,26rem)] scroll-py-2 overflow-y-auto overscroll-contain p-2 [&:not(:has([cmdk-item]))]:p-0\",\n empty: \"px-3 py-8 text-center text-sm text-fg-secondary\",\n loading: \"px-3 py-6 text-center text-sm text-fg-secondary\",\n group:\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:text-xs \" +\n \"[&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-fg-secondary\",\n item:\n \"relative flex cursor-pointer select-none items-center gap-3 rounded-lg px-3 py-2.5 text-sm text-fg outline-hidden transition-colors \" +\n \"before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-transparent \" +\n \"data-[selected=true]:bg-surface-2 data-[selected=true]:before:bg-accent data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40\",\n separator: \"-mx-2 my-1 h-px bg-border-subtle\",\n shortcut: \"ml-auto text-xs tracking-widest text-fg-secondary\",\n },\n});\nconst s = command();\n\nfunction SearchIcon({ className }: { className?: string }) {\n return (\n <svg viewBox=\"0 0 24 24\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n );\n}\n\nexport type CommandRootProps = React.ComponentProps<typeof CommandPrimitive> & {\n /** The accessible name of the palette — passed translated (\"Search\", \"Commands\"). */\n label: string;\n};\n\n/** The palette: `value` / `onValueChange` (the active item), `shouldFilter`, `filter`, `loop`. */\nexport function CommandRoot({ className, ...props }: CommandRootProps) {\n return <CommandPrimitive className={s.root({ className })} {...props} />;\n}\n\nexport type CommandInputProps = Omit<React.ComponentProps<typeof CommandPrimitive.Input>, \"placeholder\"> & {\n /** What to type — passed translated. The input is named by the palette's `label`. */\n placeholder: string;\n /** After the input, inside the bar: a spinner, a clear button. */\n trailing?: React.ReactNode;\n};\n\n/** The search field (`value` / `onValueChange` for the query), with a magnifier. */\nexport function CommandInput({ className, placeholder, trailing, ...props }: CommandInputProps) {\n return (\n <div className={s.inputWrap()} cmdk-input-wrapper=\"\">\n <SearchIcon className={s.icon()} />\n <CommandPrimitive.Input placeholder={placeholder} className={s.input({ className })} {...props} />\n {trailing}\n </div>\n );\n}\n\n// Set inside `Command.List`: a listbox may only hold options and groups (axe `aria-required-children`), so the empty\n// message must live beside it, not in it.\nconst InsideList = React.createContext(false);\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List> & {\n /** The accessible name of the list of results — passed translated (\"Suggestions\", \"Results\"). */\n label: string;\n /**\n * Shown when nothing matches — passed translated. Rendered after the listbox, never inside it: an empty listbox is\n * valid, a listbox holding text is not.\n */\n emptyLabel?: React.ReactNode;\n};\n\nexport function CommandList({ className, emptyLabel, children, ...props }: CommandListProps) {\n return (\n <>\n <CommandPrimitive.List className={s.list({ className })} {...props}>\n <InsideList.Provider value>{children}</InsideList.Provider>\n </CommandPrimitive.List>\n {emptyLabel === undefined ? null : <CommandEmpty emptyLabel={emptyLabel} />}\n </>\n );\n}\n\nexport type CommandEmptyProps = Omit<React.ComponentProps<typeof CommandPrimitive.Empty>, \"children\"> & {\n /** Shown when nothing matches — passed translated. */\n emptyLabel: React.ReactNode;\n};\n\n/**\n * Shown by cmdk only when no item matches. Place it beside `Command.List` (or pass `emptyLabel` to the list), never\n * inside it: inside, it is rendered as before but warns in development — the listbox then holds text, which axe\n * refuses (`aria-required-children`).\n */\nexport function CommandEmpty({ className, emptyLabel, ...props }: CommandEmptyProps) {\n const inside = React.useContext(InsideList);\n React.useEffect(() => {\n if (inside && typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n console.warn(\"@krizaka/ui/command: <Command.Empty> inside <Command.List> breaks the listbox (axe aria-required-children). Pass `emptyLabel` to <Command.List> instead.\");\n }\n }, [inside]);\n return (\n <CommandPrimitive.Empty className={s.empty({ className })} {...props}>\n {emptyLabel}\n </CommandPrimitive.Empty>\n );\n}\n\n/** While results load (`label` is announced). */\nexport function CommandLoading({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Loading>) {\n return <CommandPrimitive.Loading className={s.loading({ className })} {...props} />;\n}\n\n/** A group of items under a `heading`. */\nexport function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return <CommandPrimitive.Group className={s.group({ className })} {...props} />;\n}\n\n/** An option: `onSelect` on Enter or click, `value` and `keywords` for the filter, `disabled`. */\nexport function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return <CommandPrimitive.Item className={s.item({ className })} {...props} />;\n}\n\n/** A line between groups. Decorative (`role=\"none\"`): cmdk's own separator is a role a listbox may not hold (axe). */\nexport function CommandSeparator({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div role=\"none\" className={s.separator({ className })} {...props} />;\n}\n\n/** A keyboard hint at the end of an item. */\nexport function CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span className={s.shortcut({ className })} {...props} />;\n}\n\n/** `Command.Root/Input/List/Empty/Loading/Group/Item/Separator/Shortcut`. */\nexport const Command = {\n Root: CommandRoot,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Loading: CommandLoading,\n Group: CommandGroup,\n Item: CommandItem,\n Separator: CommandSeparator,\n Shortcut: CommandShortcut,\n};\n\nexport type CommandDialogProps = Omit<CommandRootProps, \"title\"> & {\n /** Open or closed (controlled), with `onOpenChange`. */\n open?: boolean;\n /** Open at first, uncontrolled. */\n defaultOpen?: boolean;\n /** Called when it opens or closes (Escape, a click outside, a shortcut of the product). */\n onOpenChange?: (open: boolean) => void;\n /** Under the palette, inside the dialog: shortcuts, a \"see all results\" link. */\n footer?: React.ReactNode;\n /** Passed to `Dialog.Content`: `size`, `container`, `className` of the dialog. */\n contentProps?: Omit<Extract<DialogContentProps, { hideClose: true }>, \"hideClose\" | \"children\" | \"placement\">;\n};\n\n/**\n * The palette in a dialog (Radix: focus trap, Escape, focus return). The dialog is named by `label`; it has no close\n * button — Escape and a click outside close it — and the input takes the focus when it opens.\n */\nexport function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: CommandDialogProps) {\n const { className: contentClassName, ...content } = contentProps ?? {};\n return (\n <DialogPrimitive.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <DialogContent\n hideClose\n size=\"lg\"\n aria-describedby={undefined}\n className={cn(\"top-[12dvh] translate-y-0 sm:top-[14dvh]\", contentClassName)}\n {...content}\n >\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <CommandRoot label={label} className={className} {...props}>\n {children}\n </CommandRoot>\n {footer}\n </DialogContent>\n </DialogPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;AAGA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAAU;AA8Bf,SAmDA,UAlDE,KADF;AAzBG,IAAM,UAAU,GAAG;AAAA,EACxB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OACE;AAAA,IAEF,MACE;AAAA,IAGF,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AACF,CAAC;AACD,IAAM,IAAI,QAAQ;AAElB,SAAS,WAAW,EAAE,UAAU,GAA2B;AACzD,SACE,qBAAC,SAAI,SAAQ,aAAY,WAAsB,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACvJ;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,kBAAiB;AAAA,KAC3B;AAEJ;AAQO,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAqB;AACrE,SAAO,oBAAC,oBAAiB,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACxE;AAUO,SAAS,aAAa,EAAE,WAAW,aAAa,UAAU,GAAG,MAAM,GAAsB;AAC9F,SACE,qBAAC,SAAI,WAAW,EAAE,UAAU,GAAG,sBAAmB,IAChD;AAAA,wBAAC,cAAW,WAAW,EAAE,KAAK,GAAG;AAAA,IACjC,oBAAC,iBAAiB,OAAjB,EAAuB,aAA0B,WAAW,EAAE,MAAM,E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AE,WAAW,GAAG,MAAM,GAAgC;AACrF,SAAO,oBAAC,SAAI,MAAK,QAAO,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC5E;AAGO,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAiC;AACrF,SAAO,oBAAC,UAAK,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAChE;AAGO,IAAM,UAAU;AAAA,EACrB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AACZ;AAmBO,SAAS,cAAc,EAAE,MAAM,aAAa,cAAc,QAAQ,cAAc,OAAO,WAAW,UAAU,GAAG,MAAM,GAAuB;AACjJ,QAAM,EAAE,WAAW,kBAAkB,GAAG,QAAQ,IAAI,gBAAgB,CAAC;AACrE,SACE,oBAAC,gBAAgB,MAAhB,EAAqB,MAAY,aAA0B,cAC1D;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACT,MAAK;AAAA,MACL,oBAAkB;AAAA,MAClB,WAAW,GAAG,4CAA4C,gBAAgB;AAAA,MACzE,GAAG;AAAA,MAEJ;AAAA,4BAAC,gBAAgB,OAAhB,EAAsB,WAAU,WAAW,iBAAM;AAAA,QAClD,oBAAC,eAAY,OAAc,WAAuB,GAAG,OAClD,UACH;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/command/command.tsx"],"sourcesContent":["// Client. A command palette on cmdk: the combobox / listbox roles, the active option (aria-activedescendant), the\n// arrows, Home / End, Enter, and the filtering (turn it off with `shouldFilter={false}` when the server searches).\n// `CommandDialog` puts it in the platform's Dialog. Words arrive as props.\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { DialogContent, type DialogContentProps } from \"../dialog/dialog\";\n\nexport const command = tv({\n slots: {\n root: \"flex h-full w-full flex-col overflow-hidden bg-surface-1 text-fg\",\n inputWrap: \"flex items-center gap-3 border-b border-border-default px-4\",\n icon: \"h-5 w-5 shrink-0 text-fg-secondary\",\n input:\n \"h-13 w-full min-w-0 flex-1 bg-transparent text-sm text-fg outline-hidden placeholder:text-fg-muted disabled:cursor-not-allowed disabled:opacity-50 sm:text-base\",\n list: \"max-h-[min(60dvh,26rem)] scroll-py-2 overflow-y-auto overscroll-contain p-2 [&:not(:has([cmdk-item]))]:p-0\",\n empty: \"px-3 py-8 text-center text-sm text-fg-secondary\",\n loading: \"px-3 py-6 text-center text-sm text-fg-secondary\",\n group:\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:text-xs \" +\n \"[&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider [&_[cmdk-group-heading]]:text-fg-secondary\",\n item:\n \"relative flex cursor-pointer select-none items-center gap-3 rounded-lg px-3 py-2.5 text-sm text-fg outline-hidden transition-colors \" +\n \"before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-transparent \" +\n \"data-[selected=true]:bg-surface-2 data-[selected=true]:before:bg-accent data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40\",\n separator: \"-mx-2 my-1 h-px bg-border-subtle\",\n shortcut: \"ml-auto text-xs tracking-widest text-fg-secondary\",\n },\n});\nconst s = command();\n\nfunction SearchIcon({ className }: { className?: string }) {\n return (\n <svg viewBox=\"0 0 24 24\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n );\n}\n\nexport type CommandRootProps = React.ComponentProps<typeof CommandPrimitive> & {\n /** The accessible name of the palette — passed translated (\"Search\", \"Commands\"). */\n label: string;\n};\n\n/** The palette: `value` / `onValueChange` (the active item), `shouldFilter`, `filter`, `loop`. */\nexport function CommandRoot({ className, ...props }: CommandRootProps) {\n return <CommandPrimitive className={s.root({ className })} {...props} />;\n}\n\nexport type CommandInputProps = Omit<React.ComponentProps<typeof CommandPrimitive.Input>, \"placeholder\"> & {\n /** What to type — passed translated. The input is named by the palette's `label`. */\n placeholder: string;\n /** After the input, inside the bar: a spinner, a clear button. */\n trailing?: React.ReactNode;\n};\n\n/** The search field (`value` / `onValueChange` for the query), with a magnifier. */\nexport function CommandInput({ className, placeholder, trailing, ...props }: CommandInputProps) {\n return (\n <div className={s.inputWrap()} cmdk-input-wrapper=\"\">\n <SearchIcon className={s.icon()} />\n <CommandPrimitive.Input placeholder={placeholder} className={s.input({ className })} {...props} />\n {trailing}\n </div>\n );\n}\n\n// Set inside `Command.List`: a listbox may only hold options and groups (axe `aria-required-children`), so the empty\n// message must live beside it, not in it.\nconst InsideList = React.createContext(false);\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List> & {\n /** The accessible name of the list of results — passed translated (\"Suggestions\", \"Results\"). */\n label: string;\n /**\n * Shown when nothing matches — passed translated. Rendered after the listbox, never inside it: an empty listbox is\n * valid, a listbox holding text is not.\n */\n emptyLabel?: React.ReactNode;\n};\n\nexport function CommandList({ className, emptyLabel, children, ...props }: CommandListProps) {\n return (\n <>\n <CommandPrimitive.List className={s.list({ className })} {...props}>\n <InsideList.Provider value>{children}</InsideList.Provider>\n </CommandPrimitive.List>\n {emptyLabel === undefined ? null : <CommandEmpty emptyLabel={emptyLabel} />}\n </>\n );\n}\n\nexport type CommandEmptyProps = Omit<React.ComponentProps<typeof CommandPrimitive.Empty>, \"children\"> & {\n /** Shown when nothing matches — passed translated. */\n emptyLabel: React.ReactNode;\n};\n\n/**\n * Shown by cmdk only when no item matches. Place it beside `Command.List` (or pass `emptyLabel` to the list), never\n * inside it: inside, it is rendered as before but warns in development — the listbox then holds text, which axe\n * refuses (`aria-required-children`).\n */\nexport function CommandEmpty({ className, emptyLabel, ...props }: CommandEmptyProps) {\n const inside = React.useContext(InsideList);\n React.useEffect(() => {\n if (inside && typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n console.warn(\"@krizaka/ui/command: <Command.Empty> inside <Command.List> breaks the listbox (axe aria-required-children). Pass `emptyLabel` to <Command.List> instead.\");\n }\n }, [inside]);\n return (\n <CommandPrimitive.Empty className={s.empty({ className })} {...props}>\n {emptyLabel}\n </CommandPrimitive.Empty>\n );\n}\n\n/** While results load (`label` is announced). */\nexport function CommandLoading({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Loading>) {\n return <CommandPrimitive.Loading className={s.loading({ className })} {...props} />;\n}\n\n/** A group of items under a `heading`. */\nexport function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return <CommandPrimitive.Group className={s.group({ className })} {...props} />;\n}\n\n/** An option: `onSelect` on Enter or click, `value` and `keywords` for the filter, `disabled`. */\nexport function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return <CommandPrimitive.Item className={s.item({ className })} {...props} />;\n}\n\n/** A line between groups. Decorative (`role=\"none\"`): cmdk's own separator is a role a listbox may not hold (axe). */\nexport function CommandSeparator({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div role=\"none\" className={s.separator({ className })} {...props} />;\n}\n\n/** A keyboard hint at the end of an item. */\nexport function CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span className={s.shortcut({ className })} {...props} />;\n}\n\n/** `Command.Root/Input/List/Empty/Loading/Group/Item/Separator/Shortcut`. */\nexport const Command = {\n Root: CommandRoot,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Loading: CommandLoading,\n Group: CommandGroup,\n Item: CommandItem,\n Separator: CommandSeparator,\n Shortcut: CommandShortcut,\n};\n\nexport type CommandDialogProps = Omit<CommandRootProps, \"title\"> & {\n /** Open or closed (controlled), with `onOpenChange`. */\n open?: boolean;\n /** Open at first, uncontrolled. */\n defaultOpen?: boolean;\n /** Called when it opens or closes (Escape, a click outside, a shortcut of the product). */\n onOpenChange?: (open: boolean) => void;\n /** Under the palette, inside the dialog: shortcuts, a \"see all results\" link. */\n footer?: React.ReactNode;\n /** Passed to `Dialog.Content`: `size`, `container`, `className` of the dialog. */\n contentProps?: Omit<Extract<DialogContentProps, { hideClose: true }>, \"hideClose\" | \"children\" | \"placement\">;\n};\n\n/**\n * The palette in a dialog (Radix: focus trap, Escape, focus return). The dialog is named by `label`; it has no close\n * button — Escape and a click outside close it — and the input takes the focus when it opens.\n */\nexport function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: CommandDialogProps) {\n const { className: contentClassName, ...content } = contentProps ?? {};\n return (\n <DialogPrimitive.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <DialogContent\n hideClose\n size=\"lg\"\n aria-describedby={undefined}\n className={cn(\"top-[12dvh] translate-y-0 sm:top-[14dvh]\", contentClassName)}\n {...content}\n >\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <CommandRoot label={label} className={className} {...props}>\n {children}\n </CommandRoot>\n {footer}\n </DialogContent>\n </DialogPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAAU;AA8Bf,SAmDA,UAlDE,KADF;AAzBG,IAAM,UAAU,GAAG;AAAA,EACxB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;A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AAM,aAAa,cAAc,QAAQ,cAAc,OAAO,WAAW,UAAU,GAAG,MAAM,GAAuB;AACjJ,QAAM,EAAE,WAAW,kBAAkB,GAAG,QAAQ,IAAI,gBAAgB,CAAC;AACrE,SACE,oBAAC,gBAAgB,MAAhB,EAAqB,MAAY,aAA0B,cAC1D;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACT,MAAK;AAAA,MACL,oBAAkB;AAAA,MAClB,WAAW,GAAG,4CAA4C,gBAAgB;AAAA,MACzE,GAAG;AAAA,MAEJ;AAAA,4BAAC,gBAAgB,OAAhB,EAAsB,WAAU,WAAW,iBAAM;AAAA,QAClD,oBAAC,eAAY,OAAc,WAAuB,GAAG,OAClD,UACH;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component-page/component-page.tsx"],"sourcesContent":["// Server-safe. The page of one component of a design system (what krizaka.com/docs/ui draws from the registry): its\n// name, summary, status and platforms; the live preview with its code; installation; when to use it and when not; its\n// examples; its props; its accessibility — the facts in a side column that goes under the content on a phone.\nimport { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { DetailLayout } from \"@krizaka/ui/detail-layout\";\nimport { type Fact, Facts, Section } from \"@krizaka/ui/page\";\nimport type * as React from \"react\";\n\nexport interface ComponentPageSection {\n /** The section's anchor. */\n id: string;\n /** Its title (`When to use`, `Props`). */\n title: React.ReactNode;\n /** Its content (lists, a props table, examples). */\n children: React.ReactNode;\n}\n\nexport type ComponentPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back to the catalogue (your router's link). */\n back?: React.ReactNode;\n /** The category (`Blocks`, `Forms`). */\n eyebrow?: React.ReactNode;\n /** The component's name: the `h1`. */\n title: React.ReactNode;\n /** Its summary, in one sentence. */\n summary: React.ReactNode;\n /** Its status and platforms. */\n facts?: readonly Fact[];\n /** The live preview of its first example (a framed stage with its code). */\n preview: React.ReactNode;\n /** The line to install or import it, and the copy words. */\n install?: { code: string; language?: string; copyLabel: string; copiedLabel: string; file?: React.ReactNode };\n /** The sections, in reading order: when to use / not, examples, props, accessibility. */\n sections: readonly ComponentPageSection[];\n /** The side column: related components, source, the version. */\n aside?: React.ReactNode;\n};\n\n/** A component's page: name, summary, facts, live preview, install, then its sections; facts and related aside. */\nexport function ComponentPage({ back, eyebrow, title, summary, facts, preview, install, sections, aside, ...props }: ComponentPageProps) {\n return (\n <DetailLayout back={back} eyebrow={eyebrow} title={title} meta={<span>{summary}</span>} aside={aside} {...props}>\n {facts && facts.length > 0 && <Facts items={facts} />}\n <div className=\"kz-tpl-stage\">{preview}</div>\n {install && <CodeBlock code={install.code} language={install.language ?? \"bash\"} file={install.file} copyLabel={install.copyLabel} copiedLabel={install.copiedLabel} />}\n <div className=\"kz-tpl-flush\">\n {sections.map((s) => (\n <Section key={s.id} id={s.id} title={s.title} headingSize=\"sm\" spacing=\"sm\" size=\"full\" divider>\n {s.children}\n </Section>\n ))}\n </div>\n </DetailLayout>\n );\n}\n"],"mappings":";AAGA,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAoB,OAAO,eAAe;AAoCtC,SAAgE,KAAhE;AAFG,SAAS,cAAc,EAAE,MAAM,SAAS,OAAO,SAAS,OAAO,SAAS,SAAS,UAAU,OAAO,GAAG,MAAM,GAAuB;AACvI,SACE,qBAAC,gBAAa,MAAY,SAAkB,OAAc,MAAM,oBAAC,UAAM,mBAAQ,GAAS,OAAe,GAAG,OACvG;AAAA,aAAS,MAAM,SAAS,KAAK,oBAAC,SAAM,OAAO,OAAO;AAAA,IACnD,oBAAC,SAAI,WAAU,gBAAgB,mBAAQ;AAAA,IACtC,WAAW,oBAAC,aAAU,MAAM,QAAQ,MAAM,UAAU,QAAQ,YAAY,QAAQ,MAAM,QAAQ,MAAM,WAAW,QAAQ,WAAW,aAAa,QAAQ,aAAa;AAAA,IACrK,oBAAC,SAAI,WAAU,gBACZ,mBAAS,IAAI,CAAC,MACb,oBAAC,WAAmB,IAAI,EAAE,IAAI,OAAO,EAAE,OAAO,aAAY,MAAK,SAAQ,MAAK,MAAK,QAAO,SAAO,MAC5F,YAAE,YADS,EAAE,EAEhB,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/component-page/component-page.tsx"],"sourcesContent":["// Server-safe. The page of one component of a design system (what ui.krizaka.com draws from the registry): its\n// name, summary, status and platforms; the live preview with its code; installation; when to use it and when not; its\n// examples; its props; its accessibility — the facts in a side column that goes under the content on a phone.\nimport { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { DetailLayout } from \"@krizaka/ui/detail-layout\";\nimport { type Fact, Facts, Section } from \"@krizaka/ui/page\";\nimport type * as React from \"react\";\n\nexport interface ComponentPageSection {\n /** The section's anchor. */\n id: string;\n /** Its title (`When to use`, `Props`). */\n title: React.ReactNode;\n /** Its content (lists, a props table, examples). */\n children: React.ReactNode;\n}\n\nexport type ComponentPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The way back to the catalogue (your router's link). */\n back?: React.ReactNode;\n /** The category (`Blocks`, `Forms`). */\n eyebrow?: React.ReactNode;\n /** The component's name: the `h1`. */\n title: React.ReactNode;\n /** Its summary, in one sentence. */\n summary: React.ReactNode;\n /** Its status and platforms. */\n facts?: readonly Fact[];\n /** The live preview of its first example (a framed stage with its code). */\n preview: React.ReactNode;\n /** The line to install or import it, and the copy words. */\n install?: { code: string; language?: string; copyLabel: string; copiedLabel: string; file?: React.ReactNode };\n /** The sections, in reading order: when to use / not, examples, props, accessibility. */\n sections: readonly ComponentPageSection[];\n /** The side column: related components, source, the version. */\n aside?: React.ReactNode;\n};\n\n/** A component's page: name, summary, facts, live preview, install, then its sections; facts and related aside. */\nexport function ComponentPage({ back, eyebrow, title, summary, facts, preview, install, sections, aside, ...props }: ComponentPageProps) {\n return (\n <DetailLayout back={back} eyebrow={eyebrow} title={title} meta={<span>{summary}</span>} aside={aside} {...props}>\n {facts && facts.length > 0 && <Facts items={facts} />}\n <div className=\"kz-tpl-stage\">{preview}</div>\n {install && <CodeBlock code={install.code} language={install.language ?? \"bash\"} file={install.file} copyLabel={install.copyLabel} copiedLabel={install.copiedLabel} />}\n <div className=\"kz-tpl-flush\">\n {sections.map((s) => (\n <Section key={s.id} id={s.id} title={s.title} headingSize=\"sm\" spacing=\"sm\" size=\"full\" divider>\n {s.children}\n </Section>\n ))}\n </div>\n </DetailLayout>\n );\n}\n"],"mappings":";AAGA,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAoB,OAAO,eAAe;AAoCtC,SAAgE,KAAhE;AAFG,SAAS,cAAc,EAAE,MAAM,SAAS,OAAO,SAAS,OAAO,SAAS,SAAS,UAAU,OAAO,GAAG,MAAM,GAAuB;AACvI,SACE,qBAAC,gBAAa,MAAY,SAAkB,OAAc,MAAM,oBAAC,UAAM,mBAAQ,GAAS,OAAe,GAAG,OACvG;AAAA,aAAS,MAAM,SAAS,KAAK,oBAAC,SAAM,OAAO,OAAO;AAAA,IACnD,oBAAC,SAAI,WAAU,gBAAgB,mBAAQ;AAAA,IACtC,WAAW,oBAAC,aAAU,MAAM,QAAQ,MAAM,UAAU,QAAQ,YAAY,QAAQ,MAAM,QAAQ,MAAM,WAAW,QAAQ,WAAW,aAAa,QAAQ,aAAa;AAAA,IACrK,oBAAC,SAAI,WAAU,gBACZ,mBAAS,IAAI,CAAC,MACb,oBAAC,WAAmB,IAAI,EAAE,IAAI,OAAO,EAAE,OAAO,aAAY,MAAK,SAAQ,MAAK,MAAK,QAAO,SAAO,MAC5F,YAAE,YADS,EAAE,EAEhB,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { B as ButtonProps } from './button-BMAO7dKF.js';
2
+ import { B as ButtonProps } from './button-BmCrLCq7.js';
3
3
  import 'tailwind-variants';
4
4
 
5
5
  declare const confirmArmed = "border border-danger bg-danger/20 text-fg hover:border-danger hover:bg-danger/30";
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  Button
4
- } from "./chunk-RUPNPMP3.js";
4
+ } from "./chunk-OWC2LZD2.js";
5
+ import "./chunk-D3T54RSL.js";
5
6
  import "./chunk-WEVYKZIF.js";
6
7
  import {
7
8
  cn
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/confirm-button/confirm-button.tsx"],"sourcesContent":["// Client (a state). A destructive action confirmed by a second press, never `window.confirm`: the first press arms it\n// and says what will happen (`confirmLabel`, announced politely), the second runs `onConfirm`. It disarms by itself\n// after `timeoutMs`, on Escape, and when the focus leaves. The danger is the border and the tint; the words stay a\n// text role (contrast AA in both themes).\nimport { VisuallyHidden } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { Button, type ButtonProps } from \"../button/button\";\nimport { cn } from \"../cn\";\n\nexport const confirmArmed = \"border border-danger bg-danger/20 text-fg hover:border-danger hover:bg-danger/30\";\n\nexport type ConfirmButtonProps = Omit<ButtonProps, \"onClick\" | \"asChild\"> & {\n /** What the second press does, in words — shown and announced once armed (\"Delete for good?\"). Passed translated. */\n confirmLabel: string;\n /** The accessible name while idle, for an icon-only button (the confirm label names it once armed). */\n label?: string;\n /** Runs on the second press. */\n onConfirm: () => void;\n /** Disarms after this many milliseconds (4000 by default). */\n timeoutMs?: number;\n /** What it shows once armed (default: its children, then `confirmLabel`). */\n armedContent?: React.ReactNode;\n /** Notified when it arms and disarms. */\n onArmedChange?: (armed: boolean) => void;\n};\n\n/** A two-step button: press to arm, press again within `timeoutMs` to confirm. State: `data-armed`. */\nexport function ConfirmButton({\n confirmLabel,\n label,\n onConfirm,\n timeoutMs = 4000,\n onArmedChange,\n armedContent,\n variant = \"ghost\",\n className,\n children,\n onBlur,\n onKeyDown,\n ...props\n}: ConfirmButtonProps) {\n const [armed, setArmedState] = React.useState(false);\n const armedRef = React.useRef(false);\n const onArmedChangeRef = React.useRef(onArmedChange);\n React.useEffect(() => {\n onArmedChangeRef.current = onArmedChange;\n }, [onArmedChange]);\n const setArmed = React.useCallback((next: boolean) => {\n if (armedRef.current === next) return;\n armedRef.current = next;\n setArmedState(next);\n onArmedChangeRef.current?.(next);\n }, []);\n React.useEffect(() => {\n if (!armed) return;\n const timer = window.setTimeout(() => setArmed(false), timeoutMs);\n return () => window.clearTimeout(timer);\n }, [armed, timeoutMs, setArmed]);\n const name = armed ? confirmLabel : label;\n return (\n <>\n <Button\n variant={variant}\n aria-label={name}\n title={name}\n data-armed={armed ? \"\" : undefined}\n className={cn(armed && confirmArmed, className)}\n onClick={() => {\n if (!armed) return setArmed(true);\n setArmed(false);\n onConfirm();\n }}\n onBlur={(event) => {\n onBlur?.(event);\n setArmed(false);\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (armed && event.key === \"Escape\") {\n event.stopPropagation();\n setArmed(false);\n }\n }}\n {...props}\n >\n {armed\n ? (armedContent ?? (\n <>\n {children}\n <span>{confirmLabel}</span>\n </>\n ))\n : children}\n </Button>\n <VisuallyHidden.Root aria-live=\"polite\">{armed ? confirmLabel : \"\"}</VisuallyHidden.Root>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;AAIA,SAAS,sBAAsB;AAC/B,YAAY,WAAW;AAmFT,mBAEE,KAFF;AA9EP,IAAM,eAAe;AAkBrB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuB;AACrB,QAAM,CAAC,OAAO,aAAa,IAAU,eAAS,KAAK;AACnD,QAAM,WAAiB,aAAO,KAAK;AACnC,QAAM,mBAAyB,aAAO,aAAa;AACnD,EAAM,gBAAU,MAAM;AACpB,qBAAiB,UAAU;AAAA,EAC7B,GAAG,CAAC,aAAa,CAAC;AAClB,QAAM,WAAiB,kBAAY,CAAC,SAAkB;AACpD,QAAI,SAAS,YAAY,KAAM;AAC/B,aAAS,UAAU;AACnB,kBAAc,IAAI;AAClB,qBAAiB,UAAU,IAAI;AAAA,EACjC,GAAG,CAAC,CAAC;AACL,EAAM,gBAAU,MAAM;AACpB,QAAI,CAAC,MAAO;AACZ,UAAM,QAAQ,OAAO,WAAW,MAAM,SAAS,KAAK,GAAG,SAAS;AAChE,WAAO,MAAM,OAAO,aAAa,KAAK;AAAA,EACxC,GAAG,CAAC,OAAO,WAAW,QAAQ,CAAC;AAC/B,QAAM,OAAO,QAAQ,eAAe;AACpC,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAY;AAAA,QACZ,OAAO;AAAA,QACP,cAAY,QAAQ,KAAK;AAAA,QACzB,WAAW,GAAG,SAAS,cAAc,SAAS;AAAA,QAC9C,SAAS,MAAM;AACb,cAAI,CAAC,MAAO,QAAO,SAAS,IAAI;AAChC,mBAAS,KAAK;AACd,oBAAU;AAAA,QACZ;AAAA,QACA,QAAQ,CAAC,UAAU;AACjB,mBAAS,KAAK;AACd,mBAAS,KAAK;AAAA,QAChB;AAAA,QACA,WAAW,CAAC,UAAU;AACpB,sBAAY,KAAK;AACjB,cAAI,SAAS,MAAM,QAAQ,UAAU;AACnC,kBAAM,gBAAgB;AACtB,qBAAS,KAAK;AAAA,UAChB;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH,kBACI,gBACC,iCACG;AAAA;AAAA,UACD,oBAAC,UAAM,wBAAa;AAAA,WACtB,IAEF;AAAA;AAAA,IACN;AAAA,IACA,oBAAC,eAAe,MAAf,EAAoB,aAAU,UAAU,kBAAQ,eAAe,IAAG;AAAA,KACrE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/confirm-button/confirm-button.tsx"],"sourcesContent":["// Client (a state). A destructive action confirmed by a second press, never `window.confirm`: the first press arms it\n// and says what will happen (`confirmLabel`, announced politely), the second runs `onConfirm`. It disarms by itself\n// after `timeoutMs`, on Escape, and when the focus leaves. The danger is the border and the tint; the words stay a\n// text role (contrast AA in both themes).\nimport { VisuallyHidden } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { Button, type ButtonProps } from \"../button/button\";\nimport { cn } from \"../cn\";\n\nexport const confirmArmed = \"border border-danger bg-danger/20 text-fg hover:border-danger hover:bg-danger/30\";\n\nexport type ConfirmButtonProps = Omit<ButtonProps, \"onClick\" | \"asChild\"> & {\n /** What the second press does, in words — shown and announced once armed (\"Delete for good?\"). Passed translated. */\n confirmLabel: string;\n /** The accessible name while idle, for an icon-only button (the confirm label names it once armed). */\n label?: string;\n /** Runs on the second press. */\n onConfirm: () => void;\n /** Disarms after this many milliseconds (4000 by default). */\n timeoutMs?: number;\n /** What it shows once armed (default: its children, then `confirmLabel`). */\n armedContent?: React.ReactNode;\n /** Notified when it arms and disarms. */\n onArmedChange?: (armed: boolean) => void;\n};\n\n/** A two-step button: press to arm, press again within `timeoutMs` to confirm. State: `data-armed`. */\nexport function ConfirmButton({\n confirmLabel,\n label,\n onConfirm,\n timeoutMs = 4000,\n onArmedChange,\n armedContent,\n variant = \"ghost\",\n className,\n children,\n onBlur,\n onKeyDown,\n ...props\n}: ConfirmButtonProps) {\n const [armed, setArmedState] = React.useState(false);\n const armedRef = React.useRef(false);\n const onArmedChangeRef = React.useRef(onArmedChange);\n React.useEffect(() => {\n onArmedChangeRef.current = onArmedChange;\n }, [onArmedChange]);\n const setArmed = React.useCallback((next: boolean) => {\n if (armedRef.current === next) return;\n armedRef.current = next;\n setArmedState(next);\n onArmedChangeRef.current?.(next);\n }, []);\n React.useEffect(() => {\n if (!armed) return;\n const timer = window.setTimeout(() => setArmed(false), timeoutMs);\n return () => window.clearTimeout(timer);\n }, [armed, timeoutMs, setArmed]);\n const name = armed ? confirmLabel : label;\n return (\n <>\n <Button\n variant={variant}\n aria-label={name}\n title={name}\n data-armed={armed ? \"\" : undefined}\n className={cn(armed && confirmArmed, className)}\n onClick={() => {\n if (!armed) return setArmed(true);\n setArmed(false);\n onConfirm();\n }}\n onBlur={(event) => {\n onBlur?.(event);\n setArmed(false);\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (armed && event.key === \"Escape\") {\n event.stopPropagation();\n setArmed(false);\n }\n }}\n {...props}\n >\n {armed\n ? (armedContent ?? (\n <>\n {children}\n <span>{confirmLabel}</span>\n </>\n ))\n : children}\n </Button>\n <VisuallyHidden.Root aria-live=\"polite\">{armed ? confirmLabel : \"\"}</VisuallyHidden.Root>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAIA,SAAS,sBAAsB;AAC/B,YAAY,WAAW;AAmFT,mBAEE,KAFF;AA9EP,IAAM,eAAe;AAkBrB,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuB;AACrB,QAAM,CAAC,OAAO,aAAa,IAAU,eAAS,KAAK;AACnD,QAAM,WAAiB,aAAO,KAAK;AACnC,QAAM,mBAAyB,aAAO,aAAa;AACnD,EAAM,gBAAU,MAAM;AACpB,qBAAiB,UAAU;AAAA,EAC7B,GAAG,CAAC,aAAa,CAAC;AAClB,QAAM,WAAiB,kBAAY,CAAC,SAAkB;AACpD,QAAI,SAAS,YAAY,KAAM;AAC/B,aAAS,UAAU;AACnB,kBAAc,IAAI;AAClB,qBAAiB,UAAU,IAAI;AAAA,EACjC,GAAG,CAAC,CAAC;AACL,EAAM,gBAAU,MAAM;AACpB,QAAI,CAAC,MAAO;AACZ,UAAM,QAAQ,OAAO,WAAW,MAAM,SAAS,KAAK,GAAG,SAAS;AAChE,WAAO,MAAM,OAAO,aAAa,KAAK;AAAA,EACxC,GAAG,CAAC,OAAO,WAAW,QAAQ,CAAC;AAC/B,QAAM,OAAO,QAAQ,eAAe;AACpC,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAY;AAAA,QACZ,OAAO;AAAA,QACP,cAAY,QAAQ,KAAK;AAAA,QACzB,WAAW,GAAG,SAAS,cAAc,SAAS;AAAA,QAC9C,SAAS,MAAM;AACb,cAAI,CAAC,MAAO,QAAO,SAAS,IAAI;AAChC,mBAAS,KAAK;AACd,oBAAU;AAAA,QACZ;AAAA,QACA,QAAQ,CAAC,UAAU;AACjB,mBAAS,KAAK;AACd,mBAAS,KAAK;AAAA,QAChB;AAAA,QACA,WAAW,CAAC,UAAU;AACpB,sBAAY,KAAK;AACjB,cAAI,SAAS,MAAM,QAAQ,UAAU;AACnC,kBAAM,gBAAgB;AACtB,qBAAS,KAAK;AAAA,UAChB;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH,kBACI,gBACC,iCACG;AAAA;AAAA,UACD,oBAAC,UAAM,wBAAa;AAAA,WACtB,IAEF;AAAA;AAAA,IACN;AAAA,IACA,oBAAC,eAAe,MAAf,EAAoB,aAAU,UAAU,kBAAQ,eAAe,IAAG;AAAA,KACrE;AAEJ;","names":[]}
@@ -35,9 +35,13 @@ function LoaderGlyph({ state = "loading", value, ...props }) {
35
35
  ] });
36
36
  }
37
37
 
38
- // src/button/button.tsx
39
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
40
- var buttonVariants = tv({
38
+ // src/recipes/define.ts
39
+ function defineRecipe(config) {
40
+ return config;
41
+ }
42
+
43
+ // src/button/recipe.ts
44
+ var buttonRecipe = defineRecipe({
41
45
  base: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
42
46
  variants: {
43
47
  variant: {
@@ -58,6 +62,10 @@ var buttonVariants = tv({
58
62
  },
59
63
  defaultVariants: { variant: "secondary", size: "md", shape: "rounded" }
60
64
  });
65
+
66
+ // src/button/button.tsx
67
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
68
+ var buttonVariants = tv(buttonRecipe);
61
69
  var STATUS_TEXT = { success: "text-fg-success", error: "text-fg-danger" };
62
70
  function Button({
63
71
  asChild,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/button/button.tsx","../src/spinner/glyph.tsx","../src/continue-prompt/continue-prompt.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { LoaderGlyph } from \"../spinner/glyph\";\n\nexport const buttonVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] \" +\n // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n // `cut`: the Krizaka chamfer — 45° corners (CSS corner-shape, where supported; rounded elsewhere). The border, the\n // focus ring and the hover follow the cut, unlike a clip-path.\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\", cut: \"rounded-[10px] [corner-shape:bevel]\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill · cut (45° corners, the Krizaka chamfer).\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** A sheen of light crosses the button on hover — for the one action a page is about. */\n shimmer?: boolean;\n /** The button leans a few pixels toward a fine pointer (driven by `MotionObserver`; never under reduced motion or on touch). */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer,\n magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n data-kz-magnetic={magnetic ? \"\" : undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: [known && \"relative isolate overflow-hidden\", shimmer && \"kz-sheen\", className].filter(Boolean).join(\" \") || undefined,\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={[\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph]].filter(Boolean).join(\" \")} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","// Server-safe. The last call of a page or a flow (story.css): a short question, a figure that counts (days, seats,\n// seconds), what to say before leaving, and the one action that continues — “Keep your studio? · 3 days left”.\nimport type * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type ContinuePromptProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The question (“Keep your studio?”, arcade “Continue?”). */\n title: React.ReactNode;\n /** What counts, beside the question: a figure, or a live `Countdown` for a real deadline. Decorative: say it in words too. */\n count?: React.ReactNode;\n /**\n * A count that ticks down once when its scene plays (`{ from: 9, to: 7 }`), then waits; still under reduced motion.\n * Use `count` for anything else.\n */\n countdown?: { readonly from: number; readonly to: number };\n /** Inside the screen, under the question: a heading, a line, links — the closing call itself. */\n children?: React.ReactNode;\n /** The action's words. */\n actionLabel: React.ReactNode;\n /** Runs the action (a client handler). Without `href`, the action is a `button`. */\n onAction?: React.MouseEventHandler<HTMLButtonElement>;\n /** Makes the action a link. */\n href?: string;\n /** A key-cap before the action's words (“Enter”, arcade “1P Start”). Decorative. */\n actionKey?: React.ReactNode;\n /** The action's glyph after its words; default an arrow. Decorative. */\n actionIcon?: React.ReactNode;\n /** A small line at the top of the card (where it comes from). */\n caption?: React.ReactNode;\n /** In the deck, in the accent: the call (“Last places”, arcade “Insert coin”). */\n highlight?: React.ReactNode;\n /** Beside the highlight: how (“One click, no card”). */\n hint?: React.ReactNode;\n /** A status with a green dot (“All features on”, “Credit 01”). */\n status?: React.ReactNode;\n /**\n * `default`: a calm card. `arcade`: the cabinet — screws, a dark CRT that switches on, a coin deck.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`krizaka` → `.brand-krizaka`). */\n brand?: string;\n};\n\nconst Arrow = () => (\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M5 12h14M13 6l6 6-6 6\" />\n </svg>\n);\n\n/** One countdown's keyframes, named by its range: the digit steps from `from` to `to`, once. */\nfunction countdownCss(from: number, to: number) {\n const steps = Math.max(1, Math.abs(from - to));\n const frames = Array.from({ length: steps + 1 }, (_, i) => {\n const n = from > to ? from - i : from + i;\n return `${Math.round((i / steps) * 100)}% { content: \"${n}\"; }`;\n }).join(\" \");\n return `@keyframes kzs-count-${from}-${to} { ${frames} }\n@media (prefers-reduced-motion: no-preference) {\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"] { color: transparent; }\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"]::after { content: \"${to}\"; animation: kzs-count-${from}-${to} ${steps}s steps(1) 1s both; }\n}`;\n}\n\n/** A last call: a question, what counts, the closing words, the one action that continues — a `button`, or a link. */\nexport function ContinuePrompt({\n title,\n count,\n countdown,\n children,\n actionLabel,\n onAction,\n href,\n actionKey,\n actionIcon,\n caption,\n highlight,\n hint,\n status,\n variant,\n brand,\n className,\n ...props\n}: ContinuePromptProps) {\n const arcade = variant === \"arcade\";\n const inner = (\n <>\n {actionKey && (\n <span className=\"kzs-prompt-key\" aria-hidden>\n {actionKey}\n </span>\n )}\n {actionLabel}\n <span className=\"kzs-prompt-icon\" aria-hidden>\n {actionIcon ?? <Arrow />}\n </span>\n </>\n );\n const button = { variant: arcade ? (\"secondary\" as const) : (\"primary\" as const), size: \"md\" as const, shape: arcade ? (\"cut\" as const) : undefined, className: \"kzs-prompt-action\" };\n return (\n <div data-kzs-scene=\"\" className={cn(\"kzs-prompt\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {countdown && <style>{countdownCss(countdown.from, countdown.to)}</style>}\n {(caption || arcade) && (\n <div className=\"kzs-prompt-top\">\n <span className=\"kzs-prompt-screw\" aria-hidden />\n {caption && <span>{caption}</span>}\n <span className=\"kzs-prompt-screw\" aria-hidden />\n </div>\n )}\n <div className={cn(\"kzs-prompt-screen\", arcade && \"theme-dark\", brandClass(brand))}>\n <span className=\"kzs-texture\" aria-hidden />\n <span className=\"kzs-scan kzs-loop\" aria-hidden />\n <span className=\"kzs-prompt-glass\" aria-hidden />\n <div className=\"kzs-prompt-content\">\n <div className=\"kzs-prompt-head\">\n <span className=\"kzs-prompt-title\">{title}</span>\n {countdown ? (\n <span className=\"kzs-prompt-count\" data-from={countdown.from} data-to={countdown.to} aria-hidden>\n {countdown.from}\n </span>\n ) : (\n count !== undefined && (\n <span className=\"kzs-prompt-count\" aria-hidden>\n {count}\n </span>\n )\n )}\n </div>\n {children}\n </div>\n </div>\n <div className=\"kzs-prompt-deck\">\n {(highlight || hint || status) && (\n <div className=\"kzs-prompt-coin\">\n {highlight && <span className=\"kzs-prompt-highlight\">{highlight}</span>}\n {hint && <span className=\"kzs-prompt-hint\">{hint}</span>}\n {status && (\n <span className=\"kzs-prompt-status\">\n <span className=\"kzs-prompt-led\" aria-hidden />\n {status}\n </span>\n )}\n </div>\n )}\n {href ? (\n <Button asChild {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C;AAAA,UAC5C;AAAA,WACH;AAAA,SAEJ;AAAA,MAED,OACC,gBAAAA,KAAC,UAAO,SAAO,MAAE,GAAG,QAClB,0BAAAA,KAAC,OAAE,MAAa,iBAAM,GACxB,IAEA,gBAAAA,KAAC,UAAO,MAAK,UAAS,SAAS,UAAW,GAAG,QAC1C,iBACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["jsx","jsxs","Fragment","jsx","jsxs"]}
1
+ {"version":3,"sources":["../src/button/button.tsx","../src/spinner/glyph.tsx","../src/recipes/define.ts","../src/button/recipe.ts","../src/continue-prompt/continue-prompt.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { LoaderGlyph } from \"../spinner/glyph\";\nimport { buttonRecipe } from \"./recipe\";\n\nexport const buttonVariants = tv(buttonRecipe);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill · cut (45° corners, the Krizaka chamfer).\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** A sheen of light crosses the button on hover — for the one action a page is about. */\n shimmer?: boolean;\n /** The button leans a few pixels toward a fine pointer (driven by `MotionObserver`; never under reduced motion or on touch). */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer,\n magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n data-kz-magnetic={magnetic ? \"\" : undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: [known && \"relative isolate overflow-hidden\", shimmer && \"kz-sheen\", className].filter(Boolean).join(\" \") || undefined,\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={[\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph]].filter(Boolean).join(\" \")} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","import type { TV } from \"tailwind-variants\";\n\n/** What a recipe is made of: the `tv()` options — `base`, `slots`, `variants`, `defaultVariants`, `compoundVariants`. */\nexport type RecipeConfig = Parameters<TV>[0];\n\n/**\n * A recipe is data: the variants of a component (a `variant`, a `size`, a `tone`…) as classes of the Krizaka tokens.\n * `defineRecipe` only keeps the literal types, so `tv(recipe)` is typed exactly as `tv({ … })` would be (the web side) and\n * `nativeRecipe(recipe)` reads the same classes into styles on the theme's roles (the native side, `./native`).\n *\n * Sizes are a variant dimension (`size: { sm: \"h-8 px-3 text-xs\" }`); states are the prefixes (`hover:`, `disabled:`,\n * `data-[state=on]:`). Write colours as roles (`bg-accent`, `text-fg-secondary`, `border-border-default`, `ring-accent/40`),\n * spacing as Tailwind units (`h-10`, `px-4`), type as `text-sm` / `text-[11px]` / `font-semibold`.\n */\nexport function defineRecipe<const C extends RecipeConfig>(config: C): C {\n return config;\n}\n","// The button's variants, written once as classes of the Krizaka tokens: the web wears them with `tv(buttonRecipe)`\n// (button.tsx), React Native reads the same classes into styles (native/button.tsx, `nativeRecipe`).\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const buttonRecipe = defineRecipe({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] \" +\n // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n // `cut`: the Krizaka chamfer — 45° corners (CSS corner-shape, where supported; rounded elsewhere). The border, the\n // focus ring and the hover follow the cut, unlike a clip-path.\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\", cut: \"rounded-[10px] [corner-shape:bevel]\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n","// Server-safe. The last call of a page or a flow (story.css): a short question, a figure that counts (days, seats,\n// seconds), what to say before leaving, and the one action that continues — “Keep your studio? · 3 days left”.\nimport type * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type ContinuePromptProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The question (“Keep your studio?”, arcade “Continue?”). */\n title: React.ReactNode;\n /** What counts, beside the question: a figure, or a live `Countdown` for a real deadline. Decorative: say it in words too. */\n count?: React.ReactNode;\n /**\n * A count that ticks down once when its scene plays (`{ from: 9, to: 7 }`), then waits; still under reduced motion.\n * Use `count` for anything else.\n */\n countdown?: { readonly from: number; readonly to: number };\n /** Inside the screen, under the question: a heading, a line, links — the closing call itself. */\n children?: React.ReactNode;\n /** The action's words. */\n actionLabel: React.ReactNode;\n /** Runs the action (a client handler). Without `href`, the action is a `button`. */\n onAction?: React.MouseEventHandler<HTMLButtonElement>;\n /** Makes the action a link. */\n href?: string;\n /** A key-cap before the action's words (“Enter”, arcade “1P Start”). Decorative. */\n actionKey?: React.ReactNode;\n /** The action's glyph after its words; default an arrow. Decorative. */\n actionIcon?: React.ReactNode;\n /** A small line at the top of the card (where it comes from). */\n caption?: React.ReactNode;\n /** In the deck, in the accent: the call (“Last places”, arcade “Insert coin”). */\n highlight?: React.ReactNode;\n /** Beside the highlight: how (“One click, no card”). */\n hint?: React.ReactNode;\n /** A status with a green dot (“All features on”, “Credit 01”). */\n status?: React.ReactNode;\n /**\n * `default`: a calm card. `arcade`: the cabinet — screws, a dark CRT that switches on, a coin deck.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`krizaka` → `.brand-krizaka`). */\n brand?: string;\n};\n\nconst Arrow = () => (\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M5 12h14M13 6l6 6-6 6\" />\n </svg>\n);\n\n/** One countdown's keyframes, named by its range: the digit steps from `from` to `to`, once. */\nfunction countdownCss(from: number, to: number) {\n const steps = Math.max(1, Math.abs(from - to));\n const frames = Array.from({ length: steps + 1 }, (_, i) => {\n const n = from > to ? from - i : from + i;\n return `${Math.round((i / steps) * 100)}% { content: \"${n}\"; }`;\n }).join(\" \");\n return `@keyframes kzs-count-${from}-${to} { ${frames} }\n@media (prefers-reduced-motion: no-preference) {\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"] { color: transparent; }\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"]::after { content: \"${to}\"; animation: kzs-count-${from}-${to} ${steps}s steps(1) 1s both; }\n}`;\n}\n\n/** A last call: a question, what counts, the closing words, the one action that continues — a `button`, or a link. */\nexport function ContinuePrompt({\n title,\n count,\n countdown,\n children,\n actionLabel,\n onAction,\n href,\n actionKey,\n actionIcon,\n caption,\n highlight,\n hint,\n status,\n variant,\n brand,\n className,\n ...props\n}: ContinuePromptProps) {\n const arcade = variant === \"arcade\";\n const inner = (\n <>\n {actionKey && (\n <span className=\"kzs-prompt-key\" aria-hidden>\n {actionKey}\n </span>\n )}\n {actionLabel}\n <span className=\"kzs-prompt-icon\" aria-hidden>\n {actionIcon ?? <Arrow />}\n </span>\n </>\n );\n const button = { variant: arcade ? (\"secondary\" as const) : (\"primary\" as const), size: \"md\" as const, shape: arcade ? (\"cut\" as const) : undefined, className: \"kzs-prompt-action\" };\n return (\n <div data-kzs-scene=\"\" className={cn(\"kzs-prompt\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {countdown && <style>{countdownCss(countdown.from, countdown.to)}</style>}\n {(caption || arcade) && (\n <div className=\"kzs-prompt-top\">\n <span className=\"kzs-prompt-screw\" aria-hidden />\n {caption && <span>{caption}</span>}\n <span className=\"kzs-prompt-screw\" aria-hidden />\n </div>\n )}\n <div className={cn(\"kzs-prompt-screen\", arcade && \"theme-dark\", brandClass(brand))}>\n <span className=\"kzs-texture\" aria-hidden />\n <span className=\"kzs-scan kzs-loop\" aria-hidden />\n <span className=\"kzs-prompt-glass\" aria-hidden />\n <div className=\"kzs-prompt-content\">\n <div className=\"kzs-prompt-head\">\n <span className=\"kzs-prompt-title\">{title}</span>\n {countdown ? (\n <span className=\"kzs-prompt-count\" data-from={countdown.from} data-to={countdown.to} aria-hidden>\n {countdown.from}\n </span>\n ) : (\n count !== undefined && (\n <span className=\"kzs-prompt-count\" aria-hidden>\n {count}\n </span>\n )\n )}\n </div>\n {children}\n </div>\n </div>\n <div className=\"kzs-prompt-deck\">\n {(highlight || hint || status) && (\n <div className=\"kzs-prompt-coin\">\n {highlight && <span className=\"kzs-prompt-highlight\">{highlight}</span>}\n {hint && <span className=\"kzs-prompt-hint\">{hint}</span>}\n {status && (\n <span className=\"kzs-prompt-status\">\n <span className=\"kzs-prompt-led\" aria-hidden />\n {status}\n </span>\n )}\n </div>\n )}\n {href ? (\n <Button asChild {...button}>\n <a href={href}>{inner}</a>\n </Button>\n ) : (\n <Button type=\"button\" onClick={onAction} {...button}>\n {inner}\n </Button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;;;ACoBlC,SACE,KADF;AAjBJ,IAAM,MAAM;AAaL,SAAS,YAAY,EAAE,QAAQ,WAAW,OAAO,GAAG,MAAM,GAAqB;AACpF,QAAM,QAAQ,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK;AAChE,QAAM,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,MAAM,KAAK,IAAI,GAAG,KAAK,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3
3
  import {
4
4
  Button
5
- } from "./chunk-UOMP6VOZ.js";
5
+ } from "./chunk-276PTQMQ.js";
6
6
  import {
7
7
  Checkbox
8
8
  } from "./chunk-7Z4KHPFC.js";
9
9
  import {
10
10
  useLayoutFallbacks,
11
11
  useVirtualizer
12
- } from "./chunk-HCNOOPZE.js";
12
+ } from "./chunk-KVDB4GXV.js";
13
13
  import {
14
14
  DropdownMenu,
15
15
  FilterBar,
16
16
  FilterMenu
17
- } from "./chunk-ZKVQGXLD.js";
18
- import "./chunk-YH4LMWRU.js";
17
+ } from "./chunk-FKBHWS4N.js";
18
+ import "./chunk-7UCPGXKN.js";
19
+ import "./chunk-D3T54RSL.js";
19
20
  import "./chunk-J3NC6ER4.js";
20
21
  import {
21
22
  SearchField
22
- } from "./chunk-FDCMBWUU.js";
23
+ } from "./chunk-REPTKUJ6.js";
23
24
  import "./chunk-ZIXB33X7.js";
24
25
  import "./chunk-2FRWNSRO.js";
25
26
  import {
26
27
  useControllable
27
- } from "./chunk-BRKMQ6JV.js";
28
+ } from "./chunk-FZBWEDQI.js";
28
29
  import {
29
30
  ChevronGlyph,
30
31
  SortGlyph