@krizaka/ui 2.5.0 → 2.8.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 (267) hide show
  1. package/README.md +49 -5
  2. package/dist/action-bar.d.ts +38 -0
  3. package/dist/action-bar.js +52 -0
  4. package/dist/action-bar.js.map +1 -0
  5. package/dist/argument-card.d.ts +67 -0
  6. package/dist/argument-card.js +69 -0
  7. package/dist/argument-card.js.map +1 -0
  8. package/dist/audio-player.js +1 -1
  9. package/dist/block-link-BAg4eoZk.d.ts +12 -0
  10. package/dist/blocks.css +529 -0
  11. package/dist/button.js +5 -94
  12. package/dist/button.js.map +1 -1
  13. package/dist/card-grid.d.ts +42 -0
  14. package/dist/card-grid.js +47 -0
  15. package/dist/card-grid.js.map +1 -0
  16. package/dist/chunk-2AGSO3WH.js +20 -0
  17. package/dist/chunk-2AGSO3WH.js.map +1 -0
  18. package/dist/chunk-AB5D3KBG.js +37 -0
  19. package/dist/chunk-AB5D3KBG.js.map +1 -0
  20. package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
  21. package/dist/chunk-CPA5CF35.js.map +1 -0
  22. package/dist/chunk-K3SWZXYT.js +92 -0
  23. package/dist/chunk-K3SWZXYT.js.map +1 -0
  24. package/dist/chunk-NOVUREEC.js +274 -0
  25. package/dist/chunk-NOVUREEC.js.map +1 -0
  26. package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
  27. package/dist/chunk-XCBVFMNV.js +41 -0
  28. package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
  29. package/dist/chunk-XVLWVTQA.js +28 -0
  30. package/dist/chunk-XVLWVTQA.js.map +1 -0
  31. package/dist/chunk-Z6FUPB3Q.js +102 -0
  32. package/dist/chunk-Z6FUPB3Q.js.map +1 -0
  33. package/dist/code-block.d.ts +42 -0
  34. package/dist/code-block.js +202 -0
  35. package/dist/code-block.js.map +1 -0
  36. package/dist/combobox.js +2 -2
  37. package/dist/cta-panel.d.ts +23 -0
  38. package/dist/cta-panel.js +20 -0
  39. package/dist/cta-panel.js.map +1 -0
  40. package/dist/data-table.js +1 -1
  41. package/dist/date-picker.js +1 -1
  42. package/dist/decision-list.d.ts +34 -0
  43. package/dist/decision-list.js +67 -0
  44. package/dist/decision-list.js.map +1 -0
  45. package/dist/file-upload.js +1 -1
  46. package/dist/filter-bar.js +1 -1
  47. package/dist/geometry-CXrAW34x.d.ts +19 -0
  48. package/dist/index.d.ts +10 -2
  49. package/dist/index.js +86 -4
  50. package/dist/index.js.map +1 -1
  51. package/dist/link-card.d.ts +35 -0
  52. package/dist/link-card.js +46 -0
  53. package/dist/link-card.js.map +1 -0
  54. package/dist/mascot-quote.d.ts +43 -0
  55. package/dist/mascot-quote.js +287 -0
  56. package/dist/mascot-quote.js.map +1 -0
  57. package/dist/mascot-state.d.ts +128 -0
  58. package/dist/mascot-state.js +95 -0
  59. package/dist/mascot-state.js.map +1 -0
  60. package/dist/mascots.d.ts +5 -20
  61. package/dist/mascots.js +5 -246
  62. package/dist/mascots.js.map +1 -1
  63. package/dist/media-capture.js +1 -1
  64. package/dist/motion.css +25 -1
  65. package/dist/native.d.ts +54 -7
  66. package/dist/native.js +334 -166
  67. package/dist/native.js.map +1 -1
  68. package/dist/page-hero.d.ts +44 -0
  69. package/dist/page-hero.js +41 -0
  70. package/dist/page-hero.js.map +1 -0
  71. package/dist/page.d.ts +116 -0
  72. package/dist/page.js +17 -0
  73. package/dist/page.js.map +1 -0
  74. package/dist/pagination.js +25 -44
  75. package/dist/pagination.js.map +1 -1
  76. package/dist/pointer-light.d.ts +20 -0
  77. package/dist/pointer-light.js +12 -0
  78. package/dist/pointer-light.js.map +1 -0
  79. package/dist/search-field.js +1 -1
  80. package/dist/section-backdrop.js +4 -22
  81. package/dist/section-backdrop.js.map +1 -1
  82. package/dist/tag-input.js +2 -2
  83. package/dist/terminal-replay.d.ts +68 -0
  84. package/dist/terminal-replay.js +231 -0
  85. package/dist/terminal-replay.js.map +1 -0
  86. package/dist/toc.d.ts +23 -0
  87. package/dist/toc.js +39 -0
  88. package/dist/toc.js.map +1 -0
  89. package/dist/video-player.js +1 -1
  90. package/package.json +208 -8
  91. package/registry/action-bar.json +205 -0
  92. package/registry/alert.json +1 -1
  93. package/registry/argument-card.json +327 -0
  94. package/registry/audio-player.json +2 -2
  95. package/registry/avatar.json +1 -1
  96. package/registry/badge.json +1 -1
  97. package/registry/button.json +5 -5
  98. package/registry/card-grid.json +221 -0
  99. package/registry/card.json +3 -3
  100. package/registry/checkbox.json +1 -1
  101. package/registry/chip-link.json +1 -1
  102. package/registry/chip.json +1 -1
  103. package/registry/code-block.json +262 -0
  104. package/registry/combobox.json +2 -2
  105. package/registry/command.json +1 -1
  106. package/registry/confirm-button.json +3 -3
  107. package/registry/countdown.json +1 -1
  108. package/registry/cta-panel.json +154 -0
  109. package/registry/data-table.json +2 -2
  110. package/registry/date-picker.json +2 -2
  111. package/registry/decision-list.json +144 -0
  112. package/registry/dialog.json +1 -1
  113. package/registry/dropdown-menu.json +1 -1
  114. package/registry/empty-state.json +1 -1
  115. package/registry/examples/action-bar/buttons.d.ts +4 -0
  116. package/registry/examples/action-bar/buttons.js +22 -0
  117. package/registry/examples/action-bar/buttons.tsx +17 -0
  118. package/registry/examples/action-bar/icons.d.ts +4 -0
  119. package/registry/examples/action-bar/icons.js +24 -0
  120. package/registry/examples/action-bar/icons.tsx +23 -0
  121. package/registry/examples/argument-card/building-block.d.ts +4 -0
  122. package/registry/examples/argument-card/building-block.js +29 -0
  123. package/registry/examples/argument-card/building-block.tsx +29 -0
  124. package/registry/examples/argument-card/grid.d.ts +4 -0
  125. package/registry/examples/argument-card/grid.js +17 -0
  126. package/registry/examples/argument-card/grid.tsx +19 -0
  127. package/registry/examples/argument-card/unfold.d.ts +4 -0
  128. package/registry/examples/argument-card/unfold.js +26 -0
  129. package/registry/examples/argument-card/unfold.tsx +21 -0
  130. package/registry/examples/card-grid/products.d.ts +4 -0
  131. package/registry/examples/card-grid/products.js +16 -0
  132. package/registry/examples/card-grid/products.tsx +13 -0
  133. package/registry/examples/card-grid/reveal.d.ts +4 -0
  134. package/registry/examples/card-grid/reveal.js +13 -0
  135. package/registry/examples/card-grid/reveal.tsx +16 -0
  136. package/registry/examples/code-block/build-tools.d.ts +4 -0
  137. package/registry/examples/code-block/build-tools.js +30 -0
  138. package/registry/examples/code-block/build-tools.tsx +25 -0
  139. package/registry/examples/code-block/file.d.ts +4 -0
  140. package/registry/examples/code-block/file.js +17 -0
  141. package/registry/examples/code-block/file.tsx +13 -0
  142. package/registry/examples/cta-panel/discuss.d.ts +4 -0
  143. package/registry/examples/cta-panel/discuss.js +31 -0
  144. package/registry/examples/cta-panel/discuss.tsx +23 -0
  145. package/registry/examples/decision-list/product.d.ts +4 -0
  146. package/registry/examples/decision-list/product.js +35 -0
  147. package/registry/examples/decision-list/product.tsx +30 -0
  148. package/registry/examples/link-card/docs-hub.d.ts +4 -0
  149. package/registry/examples/link-card/docs-hub.js +18 -0
  150. package/registry/examples/link-card/docs-hub.tsx +20 -0
  151. package/registry/examples/link-card/external.d.ts +4 -0
  152. package/registry/examples/link-card/external.js +22 -0
  153. package/registry/examples/link-card/external.tsx +16 -0
  154. package/registry/examples/link-card/stack.d.ts +4 -0
  155. package/registry/examples/link-card/stack.js +26 -0
  156. package/registry/examples/link-card/stack.tsx +21 -0
  157. package/registry/examples/mascot-quote/callout.d.ts +4 -0
  158. package/registry/examples/mascot-quote/callout.js +11 -0
  159. package/registry/examples/mascot-quote/callout.tsx +10 -0
  160. package/registry/examples/mascot-quote/inline.d.ts +4 -0
  161. package/registry/examples/mascot-quote/inline.js +11 -0
  162. package/registry/examples/mascot-quote/inline.tsx +10 -0
  163. package/registry/examples/mascot-state/empty.d.ts +4 -0
  164. package/registry/examples/mascot-state/empty.js +22 -0
  165. package/registry/examples/mascot-state/empty.tsx +20 -0
  166. package/registry/examples/mascot-state/error.d.ts +4 -0
  167. package/registry/examples/mascot-state/error.js +23 -0
  168. package/registry/examples/mascot-state/error.tsx +21 -0
  169. package/registry/examples/mascot-state/loading.d.ts +4 -0
  170. package/registry/examples/mascot-state/loading.js +22 -0
  171. package/registry/examples/mascot-state/loading.tsx +16 -0
  172. package/registry/examples/mascot-state/native/default.d.ts +4 -0
  173. package/registry/examples/mascot-state/native/default.dark.png +0 -0
  174. package/registry/examples/mascot-state/native/default.js +25 -0
  175. package/registry/examples/mascot-state/native/default.light.png +0 -0
  176. package/registry/examples/mascot-state/native/default.tsx +19 -0
  177. package/registry/examples/mascot-state/success.d.ts +4 -0
  178. package/registry/examples/mascot-state/success.js +21 -0
  179. package/registry/examples/mascot-state/success.tsx +19 -0
  180. package/registry/examples/mascot-state/welcome.d.ts +4 -0
  181. package/registry/examples/mascot-state/welcome.js +21 -0
  182. package/registry/examples/mascot-state/welcome.tsx +19 -0
  183. package/registry/examples/mascots/flock.tsx +1 -1
  184. package/registry/examples/mascots/lovebird.d.ts +4 -0
  185. package/registry/examples/mascots/lovebird.js +19 -0
  186. package/registry/examples/mascots/lovebird.tsx +18 -0
  187. package/registry/examples/mascots/native/lovebird.d.ts +4 -0
  188. package/registry/examples/mascots/native/lovebird.dark.png +0 -0
  189. package/registry/examples/mascots/native/lovebird.js +21 -0
  190. package/registry/examples/mascots/native/lovebird.light.png +0 -0
  191. package/registry/examples/mascots/native/lovebird.tsx +18 -0
  192. package/registry/examples/page/backdrop.d.ts +4 -0
  193. package/registry/examples/page/backdrop.js +23 -0
  194. package/registry/examples/page/backdrop.tsx +18 -0
  195. package/registry/examples/page/facts.d.ts +4 -0
  196. package/registry/examples/page/facts.js +24 -0
  197. package/registry/examples/page/facts.tsx +21 -0
  198. package/registry/examples/page/frame.d.ts +4 -0
  199. package/registry/examples/page/frame.js +15 -0
  200. package/registry/examples/page/frame.tsx +17 -0
  201. package/registry/examples/page/sections.d.ts +4 -0
  202. package/registry/examples/page/sections.js +14 -0
  203. package/registry/examples/page/sections.tsx +15 -0
  204. package/registry/examples/page-hero/building-block.d.ts +4 -0
  205. package/registry/examples/page-hero/building-block.js +24 -0
  206. package/registry/examples/page-hero/building-block.tsx +20 -0
  207. package/registry/examples/page-hero/hub.d.ts +4 -0
  208. package/registry/examples/page-hero/hub.js +21 -0
  209. package/registry/examples/page-hero/hub.tsx +15 -0
  210. package/registry/examples/pointer-light/list.d.ts +4 -0
  211. package/registry/examples/pointer-light/list.js +16 -0
  212. package/registry/examples/pointer-light/list.tsx +14 -0
  213. package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
  214. package/registry/examples/terminal-replay/at-rest.js +32 -0
  215. package/registry/examples/terminal-replay/at-rest.tsx +26 -0
  216. package/registry/examples/terminal-replay/session.d.ts +4 -0
  217. package/registry/examples/terminal-replay/session.js +34 -0
  218. package/registry/examples/terminal-replay/session.tsx +28 -0
  219. package/registry/examples/toc/reading-page.d.ts +4 -0
  220. package/registry/examples/toc/reading-page.js +21 -0
  221. package/registry/examples/toc/reading-page.tsx +21 -0
  222. package/registry/field.json +1 -1
  223. package/registry/file-upload.json +2 -2
  224. package/registry/filter-bar.json +2 -2
  225. package/registry/glow-card.json +1 -1
  226. package/registry/image-cropper.json +1 -1
  227. package/registry/index.json +265 -5
  228. package/registry/iso.json +1 -1
  229. package/registry/kbd.json +1 -1
  230. package/registry/link-card.json +279 -0
  231. package/registry/loader.json +1 -1
  232. package/registry/marquee.json +1 -1
  233. package/registry/mascot-quote.json +191 -0
  234. package/registry/mascot-state.json +1249 -0
  235. package/registry/mascots.json +41 -21
  236. package/registry/media-capture.json +4 -4
  237. package/registry/meter.json +1 -1
  238. package/registry/nav-bar.json +1 -1
  239. package/registry/number-ticker.json +1 -1
  240. package/registry/page-header.json +1 -1
  241. package/registry/page-hero.json +254 -0
  242. package/registry/page.json +497 -0
  243. package/registry/pagination.json +2 -2
  244. package/registry/pointer-light.json +119 -0
  245. package/registry/popover.json +1 -1
  246. package/registry/progress.json +1 -1
  247. package/registry/radio-group.json +1 -1
  248. package/registry/search-field.json +2 -2
  249. package/registry/section-backdrop.json +1 -1
  250. package/registry/separator.json +1 -1
  251. package/registry/skeleton.json +3 -3
  252. package/registry/slider.json +1 -1
  253. package/registry/slot.json +1 -1
  254. package/registry/spinner.json +1 -1
  255. package/registry/stat.json +1 -1
  256. package/registry/stepper.json +1 -1
  257. package/registry/switch.json +1 -1
  258. package/registry/tabs.json +1 -1
  259. package/registry/tag-input.json +1 -1
  260. package/registry/terminal-replay.json +317 -0
  261. package/registry/theme.json +1 -1
  262. package/registry/toast.json +1 -1
  263. package/registry/toc.json +157 -0
  264. package/registry/tooltip.json +1 -1
  265. package/registry/video-player.json +4 -4
  266. package/registry/video-trimmer.json +3 -3
  267. /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/mascots/geometry.ts","../src/mascots/mascot.tsx"],"sourcesContent":["/**\n * The Krizaka flock — the geometry of the mascots, drawn by the web `Mascot` (`./mascot.tsx`) and the native one\n * (`../native/mascots.tsx`). Five birds that have carried the Krizaka story since the first site (the sentry falcon,\n * the owl that reads, the developer duck, the flamingo that answers, the carrier pigeon) and the lovebird that\n * introduces (2026-10, with Yazakia: \"l'inséparable présente\"), redrawn on one 120 × 120 grid so that any bird can\n * wear any mood.\n *\n * Colours are roles, never fixed: `brand` (the default) paints a bird in the host's accent (`--kz-accent`,\n * `--kz-accent-2`), so the same falcon is blue on krizaka.com, orange in Orazaka and violet in Orochia; `own` gives\n * each bird the signature palette it has in the Krizaka story (the brand layer's exception, like the marks). Shades\n * and highlights are black and white at a low opacity over the role, so they hold in both themes.\n */\n\nexport const MASCOT_BIRDS = [\"falcon\", \"owl\", \"duck\", \"flamingo\", \"pigeon\", \"lovebird\"] as const;\nexport type MascotBird = (typeof MASCOT_BIRDS)[number];\n\nexport const MASCOT_MOODS = [\"welcome\", \"thinking\", \"success\", \"empty\", \"error\"] as const;\nexport type MascotMood = (typeof MASCOT_MOODS)[number];\n\nexport type MascotTone = \"brand\" | \"own\";\n\ntype Point = readonly [number, number];\n\nexport interface BirdGeometry {\n /** The ground shadow: centre x, y and radii. */\n readonly shadow: readonly [number, number, number, number];\n /** Legs and feet, stroked in the beak colour. */\n readonly legs: readonly string[];\n /** Drawn behind the body (tail, parcel strings). */\n readonly back?: readonly string[];\n readonly body: string;\n readonly belly: string;\n /** Left then right wing, and the point each one turns around. */\n readonly wings: readonly [{ readonly d: string; readonly pivot: Point }, { readonly d: string; readonly pivot: Point }];\n /** A neck, stroked in the body colour with this width (the flamingo). */\n readonly neck?: { readonly d: string; readonly width: number };\n /** The head: a circle. */\n readonly head: { readonly cx: number; readonly cy: number; readonly r: number };\n /** Ear tufts, a crest, a visor's frame: filled with the detail colour. */\n readonly details: readonly string[];\n /** A band behind the eyes (the falcon's visor), in the page's surface. */\n readonly visor?: { readonly x: number; readonly y: number; readonly w: number; readonly h: number };\n /** Glasses (the duck): stroked rings around the eyes. */\n readonly glasses?: boolean;\n readonly beak: string;\n /** The eyes: centres, the radius of the white, the radius of the pupil (no white when `white` is 0). */\n readonly eyes: { readonly at: readonly Point[]; readonly white: number; readonly pupil: number };\n /** The parcel the pigeon carries: its three faces. */\n readonly parcel?: readonly [string, string, string];\n}\n\nconst mirror = (d: string) => d.replace(/(-?\\d+(?:\\.\\d+)?) (-?\\d+(?:\\.\\d+)?)/g, (_, x: string, y: string) => `${120 - Number(x)} ${y}`);\n\nconst falconWing = \"M29 58 C17 68 19 88 37 86 C31 76 31 66 29 58 Z\";\nconst pigeonWing = \"M36 58 C20 50 16 80 38 84 C34 74 34 66 36 58 Z\";\n\nexport const BIRDS: Readonly<Record<MascotBird, BirdGeometry>> = {\n falcon: {\n shadow: [60, 110, 26, 3.5],\n legs: [\"M51 94 L48 108 M44 108 L52 108\", \"M69 94 L72 108 M68 108 L76 108\"],\n body: \"M30 62 C30 42 90 42 90 62 C90 88 78 98 60 98 C42 98 30 88 30 62 Z\",\n belly: \"M41 66 C41 55 79 55 79 66 C79 82 71 90 60 90 C49 90 41 82 41 66 Z\",\n wings: [\n { d: falconWing, pivot: [29, 58] },\n { d: mirror(falconWing), pivot: [91, 58] },\n ],\n head: { cx: 60, cy: 38, r: 22 },\n details: [\"M46 20 L52 10 L56 19 Z\", \"M74 20 L68 10 L64 19 Z\"],\n visor: { x: 41, y: 29, w: 38, h: 13 },\n beak: \"M54 45 L66 45 L60 57 Z\",\n eyes: { at: [[50, 35.5], [70, 35.5]], white: 0, pupil: 3.2 },\n },\n owl: {\n shadow: [60, 110, 24, 3.5],\n legs: [\"M53 100 L51 107 M47 107 L55 107\", \"M67 100 L69 107 M65 107 L73 107\"],\n body: \"M28 52 C28 20 92 20 92 52 C92 86 82 102 60 102 C38 102 28 86 28 52 Z\",\n belly: \"M42 66 C42 52 78 52 78 66 C78 86 72 94 60 94 C48 94 42 86 42 66 Z\",\n wings: [\n { d: \"M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z\", pivot: [29, 58] },\n { d: mirror(\"M29 58 C18 68 20 88 36 90 C32 78 32 68 29 58 Z\"), pivot: [91, 58] },\n ],\n head: { cx: 60, cy: 42, r: 0 },\n details: [\"M31 20 L47 31 L31 41 Z\", \"M89 20 L73 31 L89 41 Z\"],\n beak: \"M55 50 L65 50 L60 59 Z\",\n eyes: { at: [[47, 41], [73, 41]], white: 10, pupil: 4 },\n },\n duck: {\n shadow: [60, 110, 30, 3.5],\n legs: [],\n back: [\"M88 80 C100 76 104 66 96 62 C98 70 94 74 88 74 Z\"],\n body: \"M26 80 C26 62 94 62 94 80 C94 100 82 106 60 106 C38 106 26 100 26 80 Z\",\n belly: \"M38 84 C38 72 82 72 82 84 C82 96 74 101 60 101 C46 101 38 96 38 84 Z\",\n wings: [\n { d: \"M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z\", pivot: [27, 74] },\n { d: mirror(\"M27 74 C14 80 18 98 35 96 C31 88 29 80 27 74 Z\"), pivot: [93, 74] },\n ],\n head: { cx: 60, cy: 42, r: 23 },\n details: [\"M57 20 C54 11 63 8 66 14 C62 13 60 16 61 20 Z\"],\n glasses: true,\n beak: \"M43 51 C43 46 55 45 60 45 C65 45 77 46 77 51 C77 56 66 60 60 60 C54 60 43 56 43 51 Z\",\n eyes: { at: [[51, 37], [69, 37]], white: 0, pupil: 2.6 },\n },\n flamingo: {\n shadow: [60, 110, 20, 3],\n legs: [\"M56 86 L55 97 L58 108 M53 108 L62 108\", \"M65 86 L66 108 M62 108 L71 108\"],\n body: \"M38 70 C38 54 88 54 88 70 C88 86 76 90 62 90 C48 90 38 86 38 70 Z\",\n belly: \"M46 72 C46 63 80 63 80 72 C80 82 72 85 63 85 C54 85 46 82 46 72 Z\",\n wings: [\n { d: \"M42 64 C30 68 32 84 47 84 C43 76 43 70 42 64 Z\", pivot: [42, 64] },\n { d: \"M84 64 C96 68 94 84 79 84 C83 76 83 70 84 64 Z\", pivot: [84, 64] },\n ],\n neck: { d: \"M58 60 C58 42 40 34 46 22\", width: 7 },\n head: { cx: 48, cy: 18, r: 11 },\n details: [],\n beak: \"M38 16 C28 18 29 28 24 33 C33 28 38 23 40 20 Z\",\n eyes: { at: [[46, 15]], white: 3.2, pupil: 1.8 },\n },\n pigeon: {\n shadow: [60, 112, 22, 3],\n legs: [\"M52 94 L51 99 M48 99 L54 99\", \"M68 94 L69 99 M66 99 L72 99\"],\n back: [\"M53 98 L52 103\", \"M67 98 L68 103\", \"M30 68 C16 72 14 62 28 56 C17 57 15 49 32 48 Z\"],\n body: \"M34 64 C34 44 86 44 86 64 C86 86 74 96 60 96 C46 96 34 86 34 64 Z\",\n belly: \"M43 68 C43 57 77 57 77 68 C77 82 70 88 60 88 C50 88 43 82 43 68 Z\",\n wings: [\n { d: pigeonWing, pivot: [36, 58] },\n { d: mirror(pigeonWing), pivot: [84, 58] },\n ],\n head: { cx: 60, cy: 36, r: 19 },\n details: [\"M54 18 C56 12 64 12 66 18 C63 16 57 16 54 18 Z\"],\n beak: \"M55 41 L65 41 L60 50 Z\",\n eyes: { at: [[52, 33], [68, 33]], white: 5, pupil: 2.4 },\n parcel: [\"M60 100 L71 105 L60 110 L49 105 Z\", \"M49 105 L60 110 L60 118 L49 113 Z\", \"M71 105 L60 110 L60 118 L71 113 Z\"],\n },\n /**\n * The lovebird — the inseparable that introduces two people. A plump little parrot: a short tail, a round head\n * with its coloured face (the detail colour), the white eye-rings of the species and a short hooked beak.\n */\n lovebird: {\n shadow: [60, 110, 23, 3.5],\n legs: [\"M53 96 L52 106 M48 106 L56 106\", \"M67 96 L68 106 M64 106 L72 106\"],\n back: [\"M74 90 C82 98 88 104 95 103 C91 98 86 91 82 84 Z\"],\n body: \"M32 66 C32 46 88 46 88 66 C88 90 76 100 60 100 C44 100 32 90 32 66 Z\",\n belly: \"M42 70 C42 59 78 59 78 70 C78 85 70 92 60 92 C50 92 42 85 42 70 Z\",\n wings: [\n { d: \"M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z\", pivot: [33, 60] },\n { d: mirror(\"M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z\"), pivot: [87, 60] },\n ],\n head: { cx: 60, cy: 38, r: 21 },\n details: [\"M43 40 C42 28 51 22 60 22 C69 22 78 28 77 40 C76 50 68 55 60 55 C52 55 44 50 43 40 Z\"],\n beak: \"M55 44 C55 40 65 40 65 44 C65 50 62 54 60 55 C58 54 55 50 55 44 Z\",\n eyes: { at: [[51, 36], [69, 36]], white: 4.6, pupil: 2.4 },\n },\n};\n\n/** What a mood adds around the bird: a badge, a thought, an empty tray. */\nexport const MOOD_PARTS = {\n /** The badge of `success` and `error`, top right. */\n badge: { cx: 98, cy: 22, r: 11 },\n check: \"M92.5 22.5 L96.8 26.6 L103.6 18.4\",\n bang: { line: \"M98 15.5 L98 23.5\", dot: [98, 28] as Point },\n /** `thinking`: three dots rising to the right of the head. */\n dots: [\n [88, 26, 2.6],\n [96, 19, 3.2],\n [105, 11, 3.8],\n ] as const,\n /** `empty`: an open tray beside the bird. */\n tray: \"M90 96 L110 96 L107 108 L93 108 Z\",\n /** `success`: two sparkles. */\n sparkles: [\"M16 26 L18 31 L23 33 L18 35 L16 40 L14 35 L9 33 L14 31 Z\", \"M104 52 L105.2 55 L108 56 L105.2 57 L104 60 L102.8 57 L100 56 L102.8 55 Z\"],\n} as const;\n\n/** The happy eye of `success`: an arch. */\nexport const archEye = ([x, y]: Point, r: number) => `M${x - r} ${y + r * 0.45} Q${x} ${y - r * 1.15} ${x + r} ${y + r * 0.45}`;\n/** The lowered lid of `empty`: a line across the eye. */\nexport const lidEye = ([x, y]: Point, r: number) => `M${x - r} ${y + 0.4} L${x + r} ${y + 0.4}`;\n/** The heavy lid of `empty` over an eye with a white: its upper half. */\nexport const upperLid = ([x, y]: Point, r: number) => `M${x - r} ${y} A${r} ${r} 0 0 1 ${x + r} ${y} Z`;\n/** The worried brow of `error`, above one eye (`side` -1 left, 1 right). */\nexport const brow = ([x, y]: Point, r: number, side: number) =>\n `M${x - r * 1.1} ${y - r * 1.25 - (side < 0 ? 0 : r * 0.7)} L${x + r * 1.1} ${y - r * 1.5 - (side < 0 ? r * 0.7 : 0)}`;\n\nexport interface MascotPalette {\n /** Top and bottom of the body gradient. */\n readonly from: string;\n readonly to: string;\n /** Wings and details (tufts, crest). */\n readonly wing: string;\n readonly detail: string;\n /** Beak and feet. */\n readonly beak: string;\n /** The pupils (and the falcon's visor lights). */\n readonly eye: string;\n}\n\n/** The signature palettes of the Krizaka story (`tone=\"own\"`), from the first drawings of each bird. */\nexport const OWN_PALETTES: Readonly<Record<MascotBird, MascotPalette>> = {\n falcon: { from: \"#ff9f00\", to: \"#ff2a00\", wing: \"#d84315\", detail: \"#b4320d\", beak: \"#ffb300\", eye: \"#00c8d4\" },\n owl: { from: \"#a78bfa\", to: \"#6d28d9\", wing: \"#7c3aed\", detail: \"#5b21b6\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n duck: { from: \"#f43f5e\", to: \"#be123c\", wing: \"#db2777\", detail: \"#9f1239\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n flamingo: { from: \"#f9a8d4\", to: \"#db2777\", wing: \"#ec4899\", detail: \"#be185d\", beak: \"#fbbf24\", eye: \"#1f2937\" },\n pigeon: { from: \"#22d3ee\", to: \"#6366f1\", wing: \"#a855f7\", detail: \"#4338ca\", beak: \"#f59e0b\", eye: \"#1f2937\" },\n lovebird: { from: \"#6ee7b7\", to: \"#059669\", wing: \"#047857\", detail: \"#fb7185\", beak: \"#f97316\", eye: \"#1f2937\" },\n};\n\n/** Fixed light and shade, laid at a low opacity over a role (they read on both themes). */\nexport const LIGHT = \"#ffffff\";\nexport const SHADE = \"#000000\";\n/** The parcel's faces (pigeon). */\nexport const PARCEL = [\"#f59e0b\", \"#d97706\", \"#b45309\"] as const;\n","// The Krizaka flock on the web: one bird, one mood, drawn from ./geometry in the host's brand colours.\nimport type * as React from \"react\";\nimport { useId } from \"react\";\n\nimport { archEye, BIRDS, brow, lidEye, LIGHT, type MascotBird, type MascotMood, type MascotPalette, type MascotTone, MOOD_PARTS, OWN_PALETTES, PARCEL, SHADE, upperLid } from \"./geometry\";\n\nconst CSS = `\n.kzb-bird { transform-box: view-box; transform-origin: 60px 108px; }\n.kzb-eye { transform-box: fill-box; transform-origin: center; }\n.kzb-wing { transform-box: view-box; }\n[data-animated] .kzb-bird { animation: kzb-bob 3.6s ease-in-out infinite; }\n[data-animated] .kzb-blink { animation: kzb-blink 5.2s ease-in-out infinite; }\n[data-animated][data-mood=\"welcome\"] .kzb-wing-r { animation: kzb-wave 1.1s ease-in-out infinite alternate; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot { animation: kzb-dot 1.5s ease-in-out infinite; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot:nth-child(2) { animation-delay: .2s; }\n[data-animated][data-mood=\"thinking\"] .kzb-dot:nth-child(3) { animation-delay: .4s; }\n[data-animated][data-mood=\"success\"] .kzb-bird { animation: kzb-hop 1.6s cubic-bezier(.3,1.6,.5,1) 1, kzb-bob 3.6s ease-in-out 1.6s infinite; }\n[data-animated][data-mood=\"success\"] .kzb-badge { animation: kzb-pop .5s cubic-bezier(.3,1.6,.5,1) .3s both; }\n[data-animated][data-mood=\"success\"] .kzb-sparkle { animation: kzb-twinkle 2.4s ease-in-out infinite; }\n[data-animated][data-mood=\"error\"] .kzb-bird { animation: kzb-shake .5s ease-in-out .2s 2, kzb-bob 3.6s ease-in-out 1.2s infinite; }\n[data-animated][data-mood=\"empty\"] .kzb-bird { animation: kzb-sway 5s ease-in-out infinite; }\n.kzb-badge, .kzb-sparkle, .kzb-dot { transform-box: fill-box; transform-origin: center; }\n@keyframes kzb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }\n@keyframes kzb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }\n@keyframes kzb-wave { from { transform: rotate(-8deg); } to { transform: rotate(-38deg); } }\n@keyframes kzb-dot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }\n@keyframes kzb-hop { 0% { transform: translateY(0); } 30% { transform: translateY(-9px); } 60% { transform: translateY(0); } 100% { transform: translateY(0); } }\n@keyframes kzb-pop { from { transform: scale(0); } to { transform: scale(1); } }\n@keyframes kzb-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }\n@keyframes kzb-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }\n@keyframes kzb-sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg); } }\n@media (prefers-reduced-motion: reduce) {\n .kzb-bird, .kzb-blink, .kzb-wing-r, .kzb-dot, .kzb-badge, .kzb-sparkle { animation: none !important; }\n}\n`;\n\n/** The host's roles (`tone=\"brand\"`): the accent paints the bird, so it wears the product it is shown in. */\nconst BRAND: MascotPalette = {\n from: \"var(--kz-accent-2, var(--kz-accent))\",\n to: \"var(--kz-accent)\",\n wing: \"var(--kz-accent)\",\n detail: \"var(--kz-accent-2, var(--kz-accent))\",\n beak: \"var(--kz-warning)\",\n eye: \"var(--kz-text-primary)\",\n};\nconst OUTLINE = \"var(--kz-border-strong, color-mix(in srgb, currentColor 35%, transparent))\";\nconst SURFACE = \"var(--kz-surface-0)\";\n\nexport type MascotProps = Omit<React.ComponentProps<\"svg\">, \"children\"> & {\n /** Which bird of the flock: `falcon` (watch, security), `owl` (reading, documents), `duck` (building, code), `flamingo` (answers, support), `pigeon` (delivery, notifications), `lovebird` (introductions, two people who meet). */\n bird?: MascotBird;\n /** What the moment is: `welcome` (onboarding), `thinking` (a long task running), `success` (it is done), `empty` (nothing here yet), `error` (it failed). */\n mood?: MascotMood;\n /** `brand` (default): the host's accent, so the bird wears the product it is in. `own`: the bird's signature colours of the Krizaka story. */\n tone?: MascotTone;\n /** Width and height in pixels. */\n size?: number;\n /** A light idle motion and the mood's gesture. Off with `false`; always off under `prefers-reduced-motion`. */\n animated?: boolean;\n /** An accessible name (the bird becomes an image); without it the mascot is decorative. */\n title?: string;\n};\n\n/**\n * One of the six Krizaka birds in one mood — for the moments a product speaks to a person: a welcome, a long wait,\n * a success, an empty list, an error. Drawn in the host's brand colours by default (`tone=\"own\"` for the story's).\n */\nexport function Mascot({ bird = \"owl\", mood = \"welcome\", tone = \"brand\", size = 96, animated = true, title, className, ...props }: MascotProps) {\n const uid = useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const g = BIRDS[bird];\n const p = tone === \"own\" ? OWN_PALETTES[bird] : BRAND;\n const body = `url(#kzb-${uid})`;\n const line = { stroke: OUTLINE, strokeWidth: 1.4, strokeLinejoin: \"round\" as const };\n const eyeR = g.eyes.white || g.eyes.pupil * 1.2;\n const eyes = g.eyes.at.map((at, i) => {\n const look = mood === \"thinking\" ? 1.4 : 0;\n if (mood === \"success\") return <path key={i} d={archEye(at, eyeR * 0.85)} stroke={g.visor ? p.eye : OUTLINE} strokeWidth={2.2} strokeLinecap=\"round\" fill=\"none\" />;\n if (mood === \"empty\" && g.eyes.white > 0)\n return (\n <g key={i}>\n <circle cx={at[0]} cy={at[1]} r={g.eyes.white} fill={LIGHT} {...line} />\n <circle cx={at[0]} cy={at[1] + g.eyes.pupil * 0.7} r={g.eyes.pupil} fill={SHADE} />\n <path d={upperLid(at, g.eyes.white)} fill={p.detail} {...line} />\n </g>\n );\n if (mood === \"empty\") return <path key={i} d={lidEye(at, eyeR * 0.8)} stroke={g.visor ? p.eye : OUTLINE} strokeWidth={2.2} strokeLinecap=\"round\" fill=\"none\" />;\n return (\n <g key={i} className=\"kzb-eye kzb-blink\">\n {g.eyes.white > 0 && <circle cx={at[0]} cy={at[1]} r={g.eyes.white} fill={LIGHT} {...line} />}\n <circle cx={at[0] + look} cy={at[1] - look} r={g.eyes.pupil} fill={g.visor ? p.eye : SHADE} />\n {g.eyes.white > 0 && <circle cx={at[0] + look - g.eyes.pupil * 0.35} cy={at[1] - look - g.eyes.pupil * 0.35} r={g.eyes.pupil * 0.35} fill={LIGHT} />}\n </g>\n );\n });\n const [wl, wr] = g.wings;\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-bird={bird}\n data-mood={mood}\n data-animated={animated ? \"\" : undefined}\n className={className}\n {...(title ? { role: \"img\", \"aria-label\": title } : { \"aria-hidden\": true })}\n {...props}\n >\n <style>{CSS}</style>\n <defs>\n <linearGradient id={`kzb-${uid}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" style={{ stopColor: p.from }} />\n <stop offset=\"100%\" style={{ stopColor: p.to }} />\n </linearGradient>\n </defs>\n <ellipse cx={g.shadow[0]} cy={g.shadow[1]} rx={g.shadow[2]} ry={g.shadow[3]} fill={SHADE} opacity={0.14} />\n {mood === \"empty\" && <path d={MOOD_PARTS.tray} stroke={OUTLINE} strokeWidth={1.6} strokeDasharray=\"3 3\" strokeLinejoin=\"round\" />}\n <g className=\"kzb-bird\">\n {g.legs.map((d) => (\n <path key={d} d={d} stroke={p.beak} strokeWidth={2.6} strokeLinecap=\"round\" />\n ))}\n {g.back?.map((d) => (d.endsWith(\"Z\") ? <path key={d} d={d} fill={p.detail} {...line} /> : <path key={d} d={d} stroke={OUTLINE} strokeWidth={1.4} />))}\n {g.parcel && (\n <g {...line}>\n {g.parcel.map((d, i) => (\n <path key={d} d={d} fill={PARCEL[i]} />\n ))}\n </g>\n )}\n <path d={g.body} fill={body} {...line} />\n <path d={g.belly} fill={LIGHT} opacity={0.28} />\n {[wl, wr].map((w, i) => {\n const turn = mood === \"success\" ? (i === 0 ? 28 : -28) : mood === \"welcome\" && i === 1 ? -20 : 0;\n return (\n <g key={i} className={i === 1 ? \"kzb-wing kzb-wing-r\" : \"kzb-wing\"} style={{ transformOrigin: `${w.pivot[0]}px ${w.pivot[1]}px`, transform: turn ? `rotate(${turn}deg)` : undefined }}>\n <path d={w.d} fill={p.wing} {...line} />\n <path d={w.d} fill={SHADE} opacity={0.16} />\n </g>\n );\n })}\n {g.neck && <path d={g.neck.d} stroke={body} strokeWidth={g.neck.width} strokeLinecap=\"round\" />}\n {g.head.r > 0 && <circle cx={g.head.cx} cy={g.head.cy} r={g.head.r} fill={body} {...line} />}\n {g.details.map((d) => (\n <path key={d} d={d} fill={p.detail} {...line} />\n ))}\n {g.visor && <rect x={g.visor.x} y={g.visor.y} width={g.visor.w} height={g.visor.h} rx={4} fill={SURFACE} {...line} />}\n {eyes}\n {g.glasses && (\n <g stroke={OUTLINE} strokeWidth={1.3}>\n {g.eyes.at.map(([x, y]) => (\n <circle key={x} cx={x} cy={y} r={6.5} fill={LIGHT} fillOpacity={0.12} />\n ))}\n <path d={`M${g.eyes.at[0][0] + 6.5} ${g.eyes.at[0][1]} L${g.eyes.at[1][0] - 6.5} ${g.eyes.at[1][1]}`} />\n </g>\n )}\n {mood === \"error\" &&\n g.eyes.at.map((at, i) => <path key={i} d={brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1)} stroke={OUTLINE} strokeWidth={2} strokeLinecap=\"round\" />)}\n <path d={g.beak} fill={p.beak} {...line} />\n </g>\n {mood === \"thinking\" && (\n <g>\n {MOOD_PARTS.dots.map(([cx, cy, r]) => (\n <circle key={cx} className=\"kzb-dot\" cx={cx} cy={cy} r={r} fill=\"var(--kz-text-secondary)\" />\n ))}\n </g>\n )}\n {mood === \"success\" && (\n <>\n {MOOD_PARTS.sparkles.map((d) => (\n <path key={d} className=\"kzb-sparkle\" d={d} fill={p.from} />\n ))}\n <g className=\"kzb-badge\">\n <circle cx={MOOD_PARTS.badge.cx} cy={MOOD_PARTS.badge.cy} r={MOOD_PARTS.badge.r} fill=\"var(--kz-success)\" />\n <path d={MOOD_PARTS.check} stroke={SURFACE} strokeWidth={2.6} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </g>\n </>\n )}\n {mood === \"error\" && (\n <g className=\"kzb-badge\">\n <circle cx={MOOD_PARTS.badge.cx} cy={MOOD_PARTS.badge.cy} r={MOOD_PARTS.badge.r} fill=\"var(--kz-danger)\" />\n <path d={MOOD_PARTS.bang.line} stroke={SURFACE} strokeWidth={2.8} strokeLinecap=\"round\" />\n <circle cx={MOOD_PARTS.bang.dot[0]} cy={MOOD_PARTS.bang.dot[1]} r={1.6} fill={SURFACE} />\n </g>\n )}\n </svg>\n );\n}\n"],"mappings":";;;AAaO,IAAM,eAAe,CAAC,UAAU,OAAO,QAAQ,YAAY,UAAU,UAAU;AAG/E,IAAM,eAAe,CAAC,WAAW,YAAY,WAAW,SAAS,OAAO;AAmC/E,IAAM,SAAS,CAAC,MAAc,EAAE,QAAQ,wCAAwC,CAAC,GAAG,GAAW,MAAc,GAAG,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE;AAEtI,IAAM,aAAa;AACnB,IAAM,aAAa;AAEZ,IAAM,QAAoD;AAAA,EAC/D,QAAQ;AAAA,IAC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AAW,SAAS,IAAI,CAAC,MACxB,oBAAC,UAAa,WAAU,eAAc,GAAM,MAAM,EAAE,QAAzC,CAA+C,CAC3D;AAAA,UACD,qBAAC,OAAE,WAAU,aACX;AAAA,gCAAC,YAAO,IAAI,WAAW,MAAM,IAAI,IAAI,WAAW,MAAM,IAAI,GAAG,WAAW,MAAM,GAAG,MAAK,qBAAoB;AAAA,YAC1G,oBAAC,UAAK,GAAG,WAAW,OAAO,QAAQ,SAAS,aAAa,KAAK,eAAc,SAAQ,gBAAe,SAAQ;AAAA,aAC7G;AAAA,WACF;AAAA,QAED,SAAS,WACR,qBAAC,OAAE,WAAU,aACX;AAAA,8BAAC,YAAO,IAAI,WAAW,MAAM,IAAI,IAAI,WAAW,MAAM,IAAI,GAAG,WAAW,MAAM,GAAG,MAAK,oBAAmB;AAAA,UACzG,oBAAC,UAAK,GAAG,WAAW,KAAK,MAAM,QAAQ,SAAS,aAAa,KAAK,eAAc,SAAQ;AAAA,UACxF,oBAAC,YAAO,IAAI,WAAW,KAAK,IAAI,CAAC,GAAG,IAAI,WAAW,KAAK,IAAI,CAAC,GAAG,GAAG,KAAK,MAAM,SAAS;AAAA,WACzF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -14,7 +14,7 @@ import {
14
14
  ChevronGlyph,
15
15
  CloseGlyph,
16
16
  PlusGlyph
17
- } from "./chunk-YX6CNVJA.js";
17
+ } from "./chunk-CPA5CF35.js";
18
18
 
19
19
  // src/combobox/combobox.tsx
20
20
  import * as React from "react";
@@ -280,4 +280,4 @@ export {
280
280
  comboboxLabels,
281
281
  Combobox
282
282
  };
283
- //# sourceMappingURL=chunk-XUMJA5ZI.js.map
283
+ //# sourceMappingURL=chunk-X6TW3X6Y.js.map
@@ -0,0 +1,41 @@
1
+ // src/glyphs.tsx
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ function Glyph({ className = "h-4 w-4", fill, children }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "svg",
6
+ {
7
+ viewBox: "0 0 24 24",
8
+ className,
9
+ fill: fill ? "currentColor" : "none",
10
+ stroke: fill ? "none" : "currentColor",
11
+ strokeWidth: "2",
12
+ strokeLinecap: "round",
13
+ strokeLinejoin: "round",
14
+ "aria-hidden": true,
15
+ focusable: "false",
16
+ children
17
+ }
18
+ );
19
+ }
20
+ var CloseGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) });
21
+ var ChevronGlyph = ({ direction = "down", ...p }) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: { left: "m15 6-6 6 6 6", right: "m9 6 6 6-6 6", up: "m6 15 6-6 6 6", down: "m6 9 6 6 6-6" }[direction] }) });
22
+ var CheckGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
23
+ var ArrowGlyph = ({ direction = "right", ...p }) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: direction === "left" ? "M19 12H5m0 0 6-6m-6 6 6 6" : "M5 12h14m0 0-6-6m6 6-6 6" }) });
24
+ var ExternalGlyph = (p) => /* @__PURE__ */ jsxs(Glyph, { ...p, children: [
25
+ /* @__PURE__ */ jsx("path", { d: "M14 4h6v6M20 4l-9 9" }),
26
+ /* @__PURE__ */ jsx("path", { d: "M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4" })
27
+ ] });
28
+ var WarningGlyph = (p) => /* @__PURE__ */ jsxs(Glyph, { ...p, children: [
29
+ /* @__PURE__ */ jsx("path", { d: "M12 4 2.5 20h19L12 4Z" }),
30
+ /* @__PURE__ */ jsx("path", { d: "M12 10v4M12 17.2v.1" })
31
+ ] });
32
+
33
+ export {
34
+ CloseGlyph,
35
+ ChevronGlyph,
36
+ CheckGlyph,
37
+ ArrowGlyph,
38
+ ExternalGlyph,
39
+ WarningGlyph
40
+ };
41
+ //# sourceMappingURL=chunk-XCBVFMNV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\n"],"mappings":";;;AASI,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAA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,CAAC,MACxB,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,iDAAgD;AAAA,EACxD,oBAAC,UAAK,GAAE,wBAAuB;AAAA,GACjC;AAEK,IAAM,aAAa,CAAC,MACzB,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,iCAAgC;AAAA,EACxC,oBAAC,UAAK,GAAE,gBAAe;AAAA,GACzB;AAEK,IAAM,YAAY,CAAC,EAAE,WAAW,GAAG,EAAE,MAC1C,oBAAC,SAAO,GAAG,GACR,wBAAc,cAAc,oBAAC,UAAK,GAAE,iBAAgB,IAAK,cAAc,eAAe,oBAAC,UAAK,GAAE,iBAAgB,IAAK,oBAAC,UAAK,GAAE,6BAA4B,GAC1J;","names":[]}
1
+ {"version":3,"sources":["../src/glyphs.tsx"],"sourcesContent":["// The small line glyphs the data and media primitives draw (play, volume, search, chevrons…): decorative, 24-unit\n// box, `currentColor`, sized by the caller's class. Shared by the entries that need them; never exported on its own —\n// a product draws its own icons with @krizaka/icons.\nimport type * as React from \"react\";\n\ntype GlyphProps = { className?: string };\n\nfunction Glyph({ className = \"h-4 w-4\", fill, children }: GlyphProps & { fill?: boolean; children: React.ReactNode }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n className={className}\n fill={fill ? \"currentColor\" : \"none\"}\n stroke={fill ? \"none\" : \"currentColor\"}\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n >\n {children}\n </svg>\n );\n}\n\nexport const PlayGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <path d=\"M8 5.5v13a1 1 0 0 0 1.5.86l10.4-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z\" />\n </Glyph>\n);\nexport const PauseGlyph = (p: GlyphProps) => (\n <Glyph {...p} fill>\n <rect x=\"6\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n <rect x=\"14\" y=\"5\" width=\"4\" height=\"14\" rx=\"1\" />\n </Glyph>\n);\nexport const VolumeGlyph = ({ muted, ...p }: GlyphProps & { muted?: boolean }) => (\n <Glyph {...p}>\n <path d=\"M11 5 6 9H3v6h3l5 4V5Z\" />\n {muted ? <path d=\"m22 9-6 6m0-6 6 6\" /> : <path d=\"M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13\" />}\n </Glyph>\n);\nexport const FullscreenGlyph = ({ exit, ...p }: GlyphProps & { exit?: boolean }) => (\n <Glyph {...p}>\n {exit ? <path d=\"M9 4v5H4m11-5v5h5M9 20v-5H4m11 5v-5h5\" /> : <path d=\"M4 9V4h5m6 0h5v5M4 15v5h5m11-5v5h-5\" />}\n </Glyph>\n);\nexport const CaptionsGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"M10 10.5a2 2 0 1 0 0 3M17 10.5a2 2 0 1 0 0 3\" />\n </Glyph>\n);\nexport const PipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <rect x=\"12\" y=\"12\" width=\"6\" height=\"4\" rx=\"1\" />\n </Glyph>\n);\nexport const SearchGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </Glyph>\n);\nexport const CloseGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </Glyph>\n);\nexport const ChevronGlyph = ({ direction = \"down\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" | \"up\" | \"down\" }) => (\n <Glyph {...p}>\n <path d={{ left: \"m15 6-6 6 6 6\", right: \"m9 6 6 6-6 6\", up: \"m6 15 6-6 6 6\", down: \"m6 9 6 6 6-6\" }[direction]} />\n </Glyph>\n);\nexport const CheckGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M20 6 9 17l-5-5\" />\n </Glyph>\n);\nexport const PlusGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 5v14M5 12h14\" />\n </Glyph>\n);\nexport const CalendarGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M8 3v4M16 3v4\" />\n </Glyph>\n);\nexport const UploadGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 16V4m0 0L7 9m5-5 5 5\" />\n <path d=\"M4 16v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\" />\n </Glyph>\n);\nexport const FileGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z\" />\n <path d=\"M14 3v5h5\" />\n </Glyph>\n);\nexport const CameraGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 8h3l2-3h6l2 3h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1Z\" />\n <circle cx=\"12\" cy=\"13.5\" r=\"3.5\" />\n </Glyph>\n);\nexport const FlipGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 0 1 14-5.3M20 12a8 8 0 0 1-14 5.3\" />\n <path d=\"M18 3v4h-4M6 21v-4h4\" />\n </Glyph>\n);\nexport const RetryGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M4 12a8 8 0 1 0 2.3-5.7L4 8.5\" />\n <path d=\"M4 4v4.5h4.5\" />\n </Glyph>\n);\nexport const SortGlyph = ({ direction, ...p }: GlyphProps & { direction?: \"ascending\" | \"descending\" }) => (\n <Glyph {...p}>\n {direction === \"ascending\" ? <path d=\"m7 14 5-5 5 5\" /> : direction === \"descending\" ? <path d=\"m7 10 5 5 5-5\" /> : <path d=\"m8 9 4-4 4 4M8 15l4 4 4-4\" />}\n </Glyph>\n);\nexport const ArrowGlyph = ({ direction = \"right\", ...p }: GlyphProps & { direction?: \"left\" | \"right\" }) => (\n <Glyph {...p}>\n <path d={direction === \"left\" ? \"M19 12H5m0 0 6-6m-6 6 6 6\" : \"M5 12h14m0 0-6-6m6 6-6 6\"} />\n </Glyph>\n);\nexport const ExternalGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M14 4h6v6M20 4l-9 9\" />\n <path d=\"M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />\n </Glyph>\n);\nexport const WarningGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <path d=\"M12 4 2.5 20h19L12 4Z\" />\n <path d=\"M12 10v4M12 17.2v.1\" />\n </Glyph>\n);\nexport const CopyGlyph = (p: GlyphProps) => (\n <Glyph {...p}>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </Glyph>\n);\n"],"mappings":";AASI,cAsBF,YAtBE;AAFJ,SAAS,MAAM,EAAE,YAAY,WAAW,MAAM,SAAS,GAA+D;AACpH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR;AAAA,MACA,MAAM,OAAO,iBAAiB;AAAA,MAC9B,QAAQ,OAAO,SAAS;AAAA,MACxB,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MAET;AAAA;AAAA,EACH;AAEJ;AA0CO,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,wBAAuB,GACjC;AAEK,IAAM,eAAe,CAAC,EAAE,YAAY,QAAQ,GAAG,EAAE,MACtD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,EAAE,MAAM,iBAAiB,OAAO,gBAAgB,IAAI,iBAAiB,MAAM,eAAe,EAAE,SAAS,GAAG,GACnH;AAEK,IAAM,aAAa,CAAC,MACzB,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAE,mBAAkB,GAC5B;AAgDK,IAAM,aAAa,CAAC,EAAE,YAAY,SAAS,GAAG,EAAE,MACrD,oBAAC,SAAO,GAAG,GACT,8BAAC,UAAK,GAAG,cAAc,SAAS,8BAA8B,4BAA4B,GAC5F;AAEK,IAAM,gBAAgB,CAAC,MAC5B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,uBAAsB;AAAA,EAC9B,oBAAC,UAAK,GAAE,4DAA2D;AAAA,GACrE;AAEK,IAAM,eAAe,CAAC,MAC3B,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,yBAAwB;AAAA,EAChC,oBAAC,UAAK,GAAE,uBAAsB;AAAA,GAChC;","names":[]}
@@ -0,0 +1,28 @@
1
+ // src/section-backdrop/section-backdrop.tsx
2
+ import { tv } from "tailwind-variants";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ var sectionBackdropVariants = tv({
5
+ slots: {
6
+ root: "kz-backdrop",
7
+ drift: "kz-backdrop-drift",
8
+ dome: "kz-backdrop-dome",
9
+ grid: "kz-backdrop-grid",
10
+ media: "kz-backdrop-media"
11
+ }
12
+ });
13
+ function SectionBackdrop({ as: Tag = "section", direction = "down", dome = true, grid = false, media, animated = true, className, children, ...props }) {
14
+ const s = sectionBackdropVariants();
15
+ return /* @__PURE__ */ jsxs(Tag, { className: s.root({ className }), "data-direction": direction, ...props, children: [
16
+ animated ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s.drift() }) : null,
17
+ dome ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s.dome() }) : null,
18
+ grid ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s.grid() }) : null,
19
+ media ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s.media(), children: media }) : null,
20
+ children
21
+ ] });
22
+ }
23
+
24
+ export {
25
+ sectionBackdropVariants,
26
+ SectionBackdrop
27
+ };
28
+ //# sourceMappingURL=chunk-XVLWVTQA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/section-backdrop/section-backdrop.tsx"],"sourcesContent":["// Server-safe. The backdrop of a page section in the brand's visual language (packages/tokens/BRAND.md).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const sectionBackdropVariants = tv({\n slots: {\n root: \"kz-backdrop\",\n drift: \"kz-backdrop-drift\",\n dome: \"kz-backdrop-dome\",\n grid: \"kz-backdrop-grid\",\n media: \"kz-backdrop-media\",\n },\n});\n\nexport interface SectionBackdropProps extends React.HTMLAttributes<HTMLElement> {\n /** The element: `section` (default), `header`, `footer` or `div`. */\n as?: \"section\" | \"header\" | \"footer\" | \"div\";\n /** Where the brand tint sits: `down` (default) starts tinted and ends on the page surface; `up` ends tinted (a closing call to action). */\n direction?: \"down\" | \"up\";\n /** The light dome above the content (the halo of a hero). Default true. */\n dome?: boolean;\n /** A floor of perspective lines under the content. Default false. */\n grid?: boolean;\n /** A foreground illustration or image, blurred for depth of field, behind the content (decorative: hidden from assistive technology). */\n media?: React.ReactNode;\n /** The very slow drift of the light (40 s); always still under prefers-reduced-motion. Default true. */\n animated?: boolean;\n}\n\n/**\n * A section of a page in the Krizaka visual language: the brand's section gradient (`--kz-brand-gradient-*`, so it\n * follows the brand theme and dark/light), a light dome, an optional perspective grid and a blurred foreground. Every\n * section ends on the page surface, so consecutive sections glide from one tint to the next. Text on it reads at AA\n * (tested in @krizaka/tokens).\n */\nexport function SectionBackdrop({ as: Tag = \"section\", direction = \"down\", dome = true, grid = false, media, animated = true, className, children, ...props }: SectionBackdropProps) {\n const s = sectionBackdropVariants();\n return (\n <Tag className={s.root({ className })} data-direction={direction} {...props}>\n {animated ? <div data-backdrop-layer aria-hidden className={s.drift()} /> : null}\n {dome ? <div data-backdrop-layer aria-hidden className={s.dome()} /> : null}\n {grid ? <div data-backdrop-layer aria-hidden className={s.grid()} /> : null}\n {media ? (\n <div data-backdrop-layer aria-hidden className={s.media()}>\n {media}\n </div>\n ) : null}\n {children}\n </Tag>\n );\n}\n"],"mappings":";AAEA,SAAS,UAAU;AAoCf,SACc,KADd;AAlCG,IAAM,0BAA0B,GAAG;AAAA,EACxC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAuBM,SAAS,gBAAgB,EAAE,IAAI,MAAM,WAAW,YAAY,QAAQ,OAAO,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,WAAW,UAAU,GAAG,MAAM,GAAyB;AACnL,QAAM,IAAI,wBAAwB;AAClC,SACE,qBAAC,OAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,kBAAgB,WAAY,GAAG,OACnE;AAAA,eAAW,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,MAAM,GAAG,IAAK;AAAA,IAC3E,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,IACtE,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,IACtE,QACC,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAW,EAAE,MAAM,GACrD,iBACH,IACE;AAAA,IACH;AAAA,KACH;AAEJ;","names":[]}
@@ -0,0 +1,102 @@
1
+ import {
2
+ LoaderGlyph
3
+ } from "./chunk-43PTCDTL.js";
4
+
5
+ // src/button/button.tsx
6
+ import { Slot } from "radix-ui";
7
+ import { tv } from "tailwind-variants";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ var buttonVariants = tv({
10
+ 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",
11
+ variants: {
12
+ variant: {
13
+ primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
14
+ // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).
15
+ gradient: "bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110",
16
+ secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3",
17
+ outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent",
18
+ ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg",
19
+ // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest
20
+ // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).
21
+ danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20"
22
+ },
23
+ 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" },
24
+ // `cut`: the Krizaka chamfer — 45° corners (CSS corner-shape, where supported; rounded elsewhere). The border, the
25
+ // focus ring and the hover follow the cut, unlike a clip-path.
26
+ shape: { rounded: "rounded-lg", pill: "rounded-full", cut: "rounded-[10px] [corner-shape:bevel]" }
27
+ },
28
+ defaultVariants: { variant: "secondary", size: "md", shape: "rounded" }
29
+ });
30
+ var STATUS_TEXT = { success: "text-fg-success", error: "text-fg-danger" };
31
+ function Button({
32
+ asChild,
33
+ loading,
34
+ progress,
35
+ status,
36
+ announce,
37
+ indicator = true,
38
+ shimmer,
39
+ magnetic,
40
+ variant,
41
+ size,
42
+ shape,
43
+ className,
44
+ disabled,
45
+ children,
46
+ ...props
47
+ }) {
48
+ const Comp = asChild ? Slot.Root : "button";
49
+ const known = loading && typeof progress === "number" && Number.isFinite(progress);
50
+ const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;
51
+ const glyph = indicator && !asChild && (loading || status) ? status ?? "loading" : null;
52
+ const filled = variant === "primary" || variant === "gradient";
53
+ const button = /* @__PURE__ */ jsx(
54
+ Comp,
55
+ {
56
+ type: asChild ? void 0 : "button",
57
+ "aria-busy": loading || void 0,
58
+ "data-loading": loading ? "" : void 0,
59
+ "data-variant": variant ?? "secondary",
60
+ "data-kz-status": status ?? void 0,
61
+ "data-kz-magnetic": magnetic ? "" : void 0,
62
+ disabled: asChild ? void 0 : disabled || loading,
63
+ "aria-disabled": asChild && (disabled || loading) ? true : void 0,
64
+ className: buttonVariants({
65
+ variant,
66
+ size,
67
+ shape,
68
+ className: [known && "relative isolate overflow-hidden", shimmer && "kz-sheen", className].filter(Boolean).join(" ") || void 0
69
+ }),
70
+ ...props,
71
+ children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ known && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500", style: { width: `${ratio * 100}%` } }),
73
+ glyph && /* @__PURE__ */ jsx(
74
+ "span",
75
+ {
76
+ "aria-hidden": true,
77
+ "data-slot": "indicator",
78
+ 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",
79
+ children: /* @__PURE__ */ jsx("span", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(LoaderGlyph, { state: glyph, value: known ? ratio : null, className: ["h-4 w-4", glyph !== "loading" && !filled && STATUS_TEXT[glyph]].filter(Boolean).join(" ") }) })
80
+ }
81
+ ),
82
+ children
83
+ ] })
84
+ }
85
+ );
86
+ if (announce === void 0 || asChild) return button;
87
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
88
+ button,
89
+ /* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: announce })
90
+ ] });
91
+ }
92
+ function IconButton({ label, size = "icon", children, ...props }) {
93
+ const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);
94
+ return /* @__PURE__ */ jsx(Button, { "aria-label": label, title: label, size, ...props, children: swap ? null : children });
95
+ }
96
+
97
+ export {
98
+ buttonVariants,
99
+ Button,
100
+ IconButton
101
+ };
102
+ //# sourceMappingURL=chunk-Z6FUPB3Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/button/button.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"],"mappings":";;;;;AACA,SAAS,YAAY;AAErB,SAAS,UAA6B;AA+H9B,mBAEI,KAFJ;AA3HD,IAAM,iBAAiB,GAAG;AAAA,EAC/B,MACE;AAAA,EAKF,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA;AAAA,MAET,UAAU;AAAA,MACV,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,IACV;AAAA,IACA,MAAM,EAAE,IAAI,oBAAoB,IAAI,qBAAqB,IAAI,qBAAqB,MAAM,YAAY;AAAA;AAAA;AAAA,IAGpG,OAAO,EAAE,SAAS,cAAc,MAAM,gBAAgB,KAAK,sCAAsC;AAAA,EACnG;AAAA,EACA,iBAAiB,EAAE,SAAS,aAAa,MAAM,MAAM,OAAO,UAAU;AACxE,CAAC;AAoDD,IAAM,cAAc,EAAE,SAAS,mBAAmB,OAAO,iBAAiB;AAEnE,SAAS,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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AAY,KAAK,CAAC,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAG,GAClK;AAAA;AAAA,QACF;AAAA,QAED;AAAA,SACH;AAAA;AAAA,EAEJ;AAEF,MAAI,aAAa,UAAa,QAAS,QAAO;AAC9C,SACE,iCACG;AAAA;AAAA,IACD,oBAAC,UAAK,MAAK,UAAS,WAAU,WAC3B,oBACH;AAAA,KACF;AAEJ;AAaO,SAAS,WAAW,EAAE,OAAO,OAAO,QAAQ,UAAU,GAAG,MAAM,GAAoB;AACxF,QAAM,OAAO,MAAM,cAAc,SAAS,CAAC,MAAM,YAAY,MAAM,WAAW,MAAM;AACpF,SACE,oBAAC,UAAO,cAAY,OAAO,OAAO,OAAO,MAAa,GAAG,OACtD,iBAAO,OAAO,UACjB;AAEJ;","names":[]}
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+
3
+ type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
4
+ /** The code, as it is copied. */
5
+ code: string;
6
+ /** Its language, shown as a tag and used by the highlighter: `xml`, `kotlin`, `ts`, `bash`, `yaml`… */
7
+ language?: string;
8
+ /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */
9
+ file?: React.ReactNode;
10
+ /** The copy button's words. */
11
+ copyLabel: string;
12
+ /** What the button says once the code is copied (announced politely). */
13
+ copiedLabel: string;
14
+ /**
15
+ * Colours comments, strings, annotations, tags and keywords (the tokens' roles).
16
+ * @default true
17
+ */
18
+ highlight?: boolean;
19
+ /** Called after the code is copied. */
20
+ onCopy?: () => void;
21
+ };
22
+ /** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */
23
+ declare function CodeBlock({ code, language, file, copyLabel, copiedLabel, highlight: colour, onCopy, className, ...props }: CodeBlockProps): React.JSX.Element;
24
+ type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, "dir" | "defaultValue"> & {
25
+ /** What the tabs choose between (`Build tool`): the tab list's accessible name. */
26
+ label: string;
27
+ /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */
28
+ tabs: readonly {
29
+ id: string;
30
+ label: React.ReactNode;
31
+ content: React.ReactNode;
32
+ }[];
33
+ /** The tab open at first. Defaults to the first one. */
34
+ defaultValue?: string;
35
+ };
36
+ /** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */
37
+ declare function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps): React.JSX.Element;
38
+
39
+ /** Splits `code` into text and coloured spans. A `#` after a space starts a comment (shell, YAML, properties), not in CSS or code. */
40
+ declare function highlight(code: string, language: string): React.ReactNode[];
41
+
42
+ export { CodeBlock, type CodeBlockProps, CodeTabs, type CodeTabsProps, highlight };
@@ -0,0 +1,202 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-5AXLA4LK.js";
5
+
6
+ // src/code-block/code-block.tsx
7
+ import * as React3 from "react";
8
+
9
+ // src/glyphs.tsx
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ function Glyph({ className = "h-4 w-4", fill, children }) {
12
+ return /* @__PURE__ */ jsx(
13
+ "svg",
14
+ {
15
+ viewBox: "0 0 24 24",
16
+ className,
17
+ fill: fill ? "currentColor" : "none",
18
+ stroke: fill ? "none" : "currentColor",
19
+ strokeWidth: "2",
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round",
22
+ "aria-hidden": true,
23
+ focusable: "false",
24
+ children
25
+ }
26
+ );
27
+ }
28
+ var CheckGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
29
+ var CopyGlyph = (p) => /* @__PURE__ */ jsxs(Glyph, { ...p, children: [
30
+ /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
31
+ /* @__PURE__ */ jsx("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
32
+ ] });
33
+
34
+ // src/tabs/tabs.tsx
35
+ import { Tabs as TabsPrimitive } from "radix-ui";
36
+ import * as React2 from "react";
37
+ import { tv } from "tailwind-variants";
38
+
39
+ // src/sliding-indicator.ts
40
+ import * as React from "react";
41
+ var useIsoLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
42
+ function useSlidingIndicator({ item, active, follow = false }) {
43
+ const ref = React.useRef(null);
44
+ const place = React.useCallback((target) => {
45
+ const list = ref.current;
46
+ if (!list) return;
47
+ if (!(target instanceof HTMLElement) || !list.contains(target)) {
48
+ list.removeAttribute("data-indicator");
49
+ return;
50
+ }
51
+ const a = target.getBoundingClientRect();
52
+ const b = list.getBoundingClientRect();
53
+ list.style.setProperty("--kz-ind-x", `${a.left - b.left + list.scrollLeft}px`);
54
+ list.style.setProperty("--kz-ind-y", `${a.top - b.top + list.scrollTop}px`);
55
+ list.style.setProperty("--kz-ind-w", `${a.width}px`);
56
+ list.style.setProperty("--kz-ind-h", `${a.height}px`);
57
+ list.setAttribute("data-indicator", "on");
58
+ }, []);
59
+ const rest = React.useCallback(() => place(ref.current?.querySelector(active) ?? null), [place, active]);
60
+ useIsoLayoutEffect(() => {
61
+ const list = ref.current;
62
+ if (!list) return;
63
+ rest();
64
+ const resize = new ResizeObserver(rest);
65
+ resize.observe(list);
66
+ const changes = new MutationObserver(rest);
67
+ changes.observe(list, { subtree: true, attributes: true, attributeFilter: ["data-state", "aria-current", "data-active"] });
68
+ return () => {
69
+ resize.disconnect();
70
+ changes.disconnect();
71
+ };
72
+ }, [rest]);
73
+ const handlers = follow ? {
74
+ onPointerOver: (e) => place(e.target.closest(item)),
75
+ onPointerLeave: rest,
76
+ onFocus: (e) => place(e.target.closest(item)),
77
+ onBlur: rest
78
+ } : {};
79
+ return { ref, handlers };
80
+ }
81
+
82
+ // src/tabs/tabs.tsx
83
+ import { jsx as jsx2 } from "react/jsx-runtime";
84
+ var tabs = tv({
85
+ slots: {
86
+ root: "flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row",
87
+ // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed
88
+ // (server render), each trigger carries its own active style.
89
+ list: "group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100",
90
+ trigger: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40",
91
+ content: "kz-fade min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
92
+ },
93
+ variants: {
94
+ variant: {
95
+ /* The section of a page: a line under the list, the active tab underlined in the accent. */
96
+ underline: {
97
+ list: "gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-full before:bg-accent data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)",
98
+ trigger: "relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg after:absolute after:rounded-full after:bg-transparent data-[state=active]:after:bg-accent data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent"
99
+ },
100
+ /* A view switch: equal segments in a track, the active one filled. */
101
+ segmented: {
102
+ list: "inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm",
103
+ trigger: "min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none"
104
+ },
105
+ /* Pills that scroll sideways on a phone: a feed's sections. */
106
+ pills: {
107
+ list: "gap-1.5 overflow-x-auto overscroll-x-contain [scrollbar-width:none] data-[orientation=horizontal]:pb-1 before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-full before:border before:border-accent before:bg-accent-soft",
108
+ trigger: "h-9 rounded-full border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent"
109
+ }
110
+ }
111
+ },
112
+ defaultVariants: { variant: "underline" }
113
+ });
114
+ var VariantContext = React2.createContext("underline");
115
+ function TabsRoot({ variant = "underline", className, ...props }) {
116
+ return /* @__PURE__ */ jsx2(VariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx2(TabsPrimitive.Root, { "data-variant": variant, className: tabs({ variant }).root({ className }), ...props }) });
117
+ }
118
+ function TabsList({ className, ...props }) {
119
+ const variant = React2.useContext(VariantContext);
120
+ const { ref } = useSlidingIndicator({ item: "[role=tab]", active: "[role=tab][data-state=active]" });
121
+ return /* @__PURE__ */ jsx2(TabsPrimitive.List, { ref, "data-variant": variant, className: tabs({ variant }).list({ className }), ...props });
122
+ }
123
+ function TabsTrigger({ className, ...props }) {
124
+ const variant = React2.useContext(VariantContext);
125
+ return /* @__PURE__ */ jsx2(TabsPrimitive.Trigger, { className: tabs({ variant }).trigger({ className }), ...props });
126
+ }
127
+ function TabsContent({ className, ...props }) {
128
+ return /* @__PURE__ */ jsx2(TabsPrimitive.Content, { className: tabs().content({ className }), ...props });
129
+ }
130
+
131
+ // src/code-block/highlight.tsx
132
+ import { jsx as jsx3 } from "react/jsx-runtime";
133
+ var CLASS = { comment: "kz-tk-comment", string: "kz-tk-string", annotation: "kz-tk-annotation", tag: "kz-tk-tag", keyword: "kz-tk-keyword" };
134
+ var KEYWORDS = "public|private|protected|final|static|class|interface|record|extends|implements|return|new|try|catch|throw|throws|if|else|void|import|from|export|function|const|let|var|val|fun|true|false|null|this|default|async|await|type";
135
+ var TOKEN = new RegExp(
136
+ [
137
+ String.raw`(?<comment>\/\/[^\n]*|\/\*[\s\S]*?\*\/|<!--[\s\S]*?-->|(?:^|(?<=[\s]))#[^\n]*)`,
138
+ String.raw`(?<string>"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|\x60(?:[^\x60\\]|\\.)*\x60)`,
139
+ String.raw`(?<annotation>@[A-Za-z][\w.]*)`,
140
+ String.raw`(?<tag><\/?[A-Za-z][\w.:-]*|\/?>)`,
141
+ String.raw`(?<keyword>\b(?:${KEYWORDS})\b)`
142
+ ].join("|"),
143
+ "g"
144
+ );
145
+ function highlight(code, language) {
146
+ const out = [];
147
+ let last = 0;
148
+ for (const m of code.matchAll(TOKEN)) {
149
+ const kind = Object.entries(m.groups ?? {}).find(([, v]) => v !== void 0)?.[0];
150
+ if (!kind) continue;
151
+ if (kind === "tag" && !/^(xml|html|svg|jsx|tsx)$/.test(language)) continue;
152
+ if (kind === "comment" && m[0].startsWith("#") && /^(css|scss|tsx?|jsx?|java|kotlin|kt)$/.test(language)) continue;
153
+ if (kind === "string" && m[0].startsWith("'") && /^(xml|html|kotlin|kt|java)$/.test(language)) continue;
154
+ if (m.index > last) out.push(code.slice(last, m.index));
155
+ out.push(
156
+ /* @__PURE__ */ jsx3("span", { className: CLASS[kind], children: m[0] }, m.index)
157
+ );
158
+ last = m.index + m[0].length;
159
+ }
160
+ if (last < code.length) out.push(code.slice(last));
161
+ return out;
162
+ }
163
+
164
+ // src/code-block/code-block.tsx
165
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
166
+ function CodeBlock({ code, language = "text", file, copyLabel, copiedLabel, highlight: colour = true, onCopy, className, ...props }) {
167
+ const [copied, setCopied] = React3.useState(false);
168
+ React3.useEffect(() => {
169
+ if (!copied) return;
170
+ const t = setTimeout(() => setCopied(false), 1800);
171
+ return () => clearTimeout(t);
172
+ }, [copied]);
173
+ const copy = () => navigator.clipboard?.writeText(code).then(() => {
174
+ setCopied(true);
175
+ onCopy?.();
176
+ });
177
+ return /* @__PURE__ */ jsxs2("figure", { className: cn("kz-code", className), ...props, children: [
178
+ /* @__PURE__ */ jsxs2("figcaption", { className: "kz-code-bar", children: [
179
+ /* @__PURE__ */ jsxs2("span", { className: "kz-code-file", children: [
180
+ language !== "text" && /* @__PURE__ */ jsx4("span", { className: "kz-code-lang", children: language }),
181
+ file
182
+ ] }),
183
+ /* @__PURE__ */ jsxs2("button", { type: "button", className: "kz-code-copy", onClick: copy, "data-copied": copied ? "" : void 0, children: [
184
+ copied ? /* @__PURE__ */ jsx4(CheckGlyph, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx4(CopyGlyph, { className: "h-3.5 w-3.5" }),
185
+ /* @__PURE__ */ jsx4("span", { "aria-live": "polite", children: copied ? copiedLabel : copyLabel })
186
+ ] })
187
+ ] }),
188
+ /* @__PURE__ */ jsx4("pre", { tabIndex: 0, children: /* @__PURE__ */ jsx4("code", { "data-language": language, children: colour ? highlight(code, language) : code }) })
189
+ ] });
190
+ }
191
+ function CodeTabs({ label, tabs: tabs2, defaultValue, className, ...props }) {
192
+ return /* @__PURE__ */ jsxs2(TabsRoot, { defaultValue: defaultValue ?? tabs2[0]?.id, variant: "segmented", className: cn("kz-code-tabs", className), ...props, children: [
193
+ /* @__PURE__ */ jsx4(TabsList, { "aria-label": label, children: tabs2.map((t) => /* @__PURE__ */ jsx4(TabsTrigger, { value: t.id, children: t.label }, t.id)) }),
194
+ tabs2.map((t) => /* @__PURE__ */ jsx4(TabsContent, { value: t.id, children: t.content }, t.id))
195
+ ] });
196
+ }
197
+ export {
198
+ CodeBlock,
199
+ CodeTabs,
200
+ highlight
201
+ };
202
+ //# sourceMappingURL=code-block.js.map