@krizaka/ui 2.8.0 → 2.9.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 (293) hide show
  1. package/README.md +33 -1
  2. package/dist/achievement.d.ts +54 -0
  3. package/dist/achievement.js +73 -0
  4. package/dist/achievement.js.map +1 -0
  5. package/dist/app-shell.d.ts +203 -0
  6. package/dist/app-shell.js +137 -0
  7. package/dist/app-shell.js.map +1 -0
  8. package/dist/auth-layout.d.ts +136 -0
  9. package/dist/auth-layout.js +75 -0
  10. package/dist/auth-layout.js.map +1 -0
  11. package/dist/choice-grid.d.ts +84 -0
  12. package/dist/choice-grid.js +141 -0
  13. package/dist/choice-grid.js.map +1 -0
  14. package/dist/chunk-555LWYIN.js +11 -0
  15. package/dist/chunk-555LWYIN.js.map +1 -0
  16. package/dist/chunk-AZPKXP3O.js +36 -0
  17. package/dist/chunk-AZPKXP3O.js.map +1 -0
  18. package/dist/chunk-VCAAHCHL.js +17 -0
  19. package/dist/chunk-VCAAHCHL.js.map +1 -0
  20. package/dist/code-block.js +23 -44
  21. package/dist/code-block.js.map +1 -1
  22. package/dist/continue-prompt.d.ts +48 -0
  23. package/dist/continue-prompt.js +200 -0
  24. package/dist/continue-prompt.js.map +1 -0
  25. package/dist/dashboard-layout.d.ts +139 -0
  26. package/dist/dashboard-layout.js +68 -0
  27. package/dist/dashboard-layout.js.map +1 -0
  28. package/dist/detail-layout.d.ts +126 -0
  29. package/dist/detail-layout.js +48 -0
  30. package/dist/detail-layout.js.map +1 -0
  31. package/dist/docs-layout.d.ts +78 -0
  32. package/dist/docs-layout.js +60 -0
  33. package/dist/docs-layout.js.map +1 -0
  34. package/dist/goal-gauge.d.ts +38 -0
  35. package/dist/goal-gauge.js +53 -0
  36. package/dist/goal-gauge.js.map +1 -0
  37. package/dist/index.d.ts +5 -4
  38. package/dist/index.js +22 -19
  39. package/dist/index.js.map +1 -1
  40. package/dist/landscape.d.ts +41 -0
  41. package/dist/landscape.js +836 -0
  42. package/dist/landscape.js.map +1 -0
  43. package/dist/marketing-layout.d.ts +60 -0
  44. package/dist/marketing-layout.js +25 -0
  45. package/dist/marketing-layout.js.map +1 -0
  46. package/dist/mascots.d.ts +14 -1
  47. package/dist/mascots.js +86 -1
  48. package/dist/mascots.js.map +1 -1
  49. package/dist/native.d.ts +73 -3
  50. package/dist/native.js +530 -296
  51. package/dist/native.js.map +1 -1
  52. package/dist/profile-card.d.ts +85 -0
  53. package/dist/profile-card.js +87 -0
  54. package/dist/profile-card.js.map +1 -0
  55. package/dist/promise-card.d.ts +28 -0
  56. package/dist/promise-card.js +29 -0
  57. package/dist/promise-card.js.map +1 -0
  58. package/dist/scroll-stage.d.ts +603 -0
  59. package/dist/scroll-stage.js +59 -0
  60. package/dist/scroll-stage.js.map +1 -0
  61. package/dist/settings-layout.d.ts +154 -0
  62. package/dist/settings-layout.js +57 -0
  63. package/dist/settings-layout.js.map +1 -0
  64. package/dist/split-view.d.ts +106 -0
  65. package/dist/split-view.js +41 -0
  66. package/dist/split-view.js.map +1 -0
  67. package/dist/stage-banner.d.ts +34 -0
  68. package/dist/stage-banner.js +26 -0
  69. package/dist/stage-banner.js.map +1 -0
  70. package/dist/story-variant-CLn4H5Nt.d.ts +4 -0
  71. package/dist/story.css +432 -0
  72. package/package.json +250 -8
  73. package/registry/achievement.json +322 -0
  74. package/registry/action-bar.json +1 -1
  75. package/registry/alert.json +1 -1
  76. package/registry/app-shell.json +451 -0
  77. package/registry/argument-card.json +1 -1
  78. package/registry/audio-player.json +1 -1
  79. package/registry/auth-layout.json +230 -0
  80. package/registry/avatar.json +1 -1
  81. package/registry/badge.json +1 -1
  82. package/registry/button.json +5 -5
  83. package/registry/card-grid.json +5 -5
  84. package/registry/card.json +3 -3
  85. package/registry/checkbox.json +1 -1
  86. package/registry/chip-link.json +1 -1
  87. package/registry/chip.json +1 -1
  88. package/registry/choice-grid.json +318 -0
  89. package/registry/code-block.json +1 -1
  90. package/registry/combobox.json +1 -1
  91. package/registry/command.json +1 -1
  92. package/registry/confirm-button.json +3 -3
  93. package/registry/continue-prompt.json +312 -0
  94. package/registry/countdown.json +1 -1
  95. package/registry/cta-panel.json +1 -1
  96. package/registry/dashboard-layout.json +273 -0
  97. package/registry/data-table.json +1 -1
  98. package/registry/date-picker.json +1 -1
  99. package/registry/decision-list.json +1 -1
  100. package/registry/detail-layout.json +233 -0
  101. package/registry/dialog.json +1 -1
  102. package/registry/docs-layout.json +148 -0
  103. package/registry/dropdown-menu.json +3 -3
  104. package/registry/empty-state.json +1 -1
  105. package/registry/examples/achievement/arcade.d.ts +4 -0
  106. package/registry/examples/achievement/arcade.js +15 -0
  107. package/registry/examples/achievement/arcade.tsx +12 -0
  108. package/registry/examples/achievement/milestones.d.ts +4 -0
  109. package/registry/examples/achievement/milestones.js +15 -0
  110. package/registry/examples/achievement/milestones.tsx +12 -0
  111. package/registry/examples/app-shell/admin-console.d.ts +4 -0
  112. package/registry/examples/app-shell/admin-console.js +52 -0
  113. package/registry/examples/app-shell/admin-console.tsx +64 -0
  114. package/registry/examples/app-shell/basic.d.ts +4 -0
  115. package/registry/examples/app-shell/basic.js +37 -0
  116. package/registry/examples/app-shell/basic.tsx +31 -0
  117. package/registry/examples/app-shell/orochia-studio.d.ts +4 -0
  118. package/registry/examples/app-shell/orochia-studio.js +89 -0
  119. package/registry/examples/app-shell/orochia-studio.tsx +101 -0
  120. package/registry/examples/auth-layout/onboarding.d.ts +4 -0
  121. package/registry/examples/auth-layout/onboarding.js +56 -0
  122. package/registry/examples/auth-layout/onboarding.tsx +47 -0
  123. package/registry/examples/auth-layout/sign-in.d.ts +4 -0
  124. package/registry/examples/auth-layout/sign-in.js +55 -0
  125. package/registry/examples/auth-layout/sign-in.tsx +47 -0
  126. package/registry/examples/auth-layout/verify.d.ts +4 -0
  127. package/registry/examples/auth-layout/verify.js +23 -0
  128. package/registry/examples/auth-layout/verify.tsx +19 -0
  129. package/registry/examples/choice-grid/line-up.d.ts +4 -0
  130. package/registry/examples/choice-grid/line-up.js +37 -0
  131. package/registry/examples/choice-grid/line-up.tsx +32 -0
  132. package/registry/examples/choice-grid/plans.d.ts +4 -0
  133. package/registry/examples/choice-grid/plans.js +28 -0
  134. package/registry/examples/choice-grid/plans.tsx +24 -0
  135. package/registry/examples/continue-prompt/arcade.d.ts +4 -0
  136. package/registry/examples/continue-prompt/arcade.js +28 -0
  137. package/registry/examples/continue-prompt/arcade.tsx +25 -0
  138. package/registry/examples/continue-prompt/offer.d.ts +4 -0
  139. package/registry/examples/continue-prompt/offer.js +24 -0
  140. package/registry/examples/continue-prompt/offer.tsx +19 -0
  141. package/registry/examples/dashboard-layout/orazaka-eric.d.ts +4 -0
  142. package/registry/examples/dashboard-layout/orazaka-eric.js +58 -0
  143. package/registry/examples/dashboard-layout/orazaka-eric.tsx +80 -0
  144. package/registry/examples/dashboard-layout/widgets.d.ts +4 -0
  145. package/registry/examples/dashboard-layout/widgets.js +17 -0
  146. package/registry/examples/dashboard-layout/widgets.tsx +22 -0
  147. package/registry/examples/detail-layout/job.d.ts +4 -0
  148. package/registry/examples/detail-layout/job.js +25 -0
  149. package/registry/examples/detail-layout/job.tsx +20 -0
  150. package/registry/examples/detail-layout/video.d.ts +4 -0
  151. package/registry/examples/detail-layout/video.js +44 -0
  152. package/registry/examples/detail-layout/video.tsx +53 -0
  153. package/registry/examples/docs-layout/page.d.ts +4 -0
  154. package/registry/examples/docs-layout/page.js +26 -0
  155. package/registry/examples/docs-layout/page.tsx +30 -0
  156. package/registry/examples/goal-gauge/arcade.d.ts +4 -0
  157. package/registry/examples/goal-gauge/arcade.js +11 -0
  158. package/registry/examples/goal-gauge/arcade.tsx +10 -0
  159. package/registry/examples/goal-gauge/challenge.d.ts +4 -0
  160. package/registry/examples/goal-gauge/challenge.js +11 -0
  161. package/registry/examples/goal-gauge/challenge.tsx +10 -0
  162. package/registry/examples/goal-gauge/drain.d.ts +4 -0
  163. package/registry/examples/goal-gauge/drain.js +11 -0
  164. package/registry/examples/goal-gauge/drain.tsx +10 -0
  165. package/registry/examples/goal-gauge/native/default.d.ts +4 -0
  166. package/registry/examples/goal-gauge/native/default.dark.png +0 -0
  167. package/registry/examples/goal-gauge/native/default.js +15 -0
  168. package/registry/examples/goal-gauge/native/default.light.png +0 -0
  169. package/registry/examples/goal-gauge/native/default.tsx +12 -0
  170. package/registry/examples/landscape/backdrop.d.ts +4 -0
  171. package/registry/examples/landscape/backdrop.js +14 -0
  172. package/registry/examples/landscape/backdrop.tsx +11 -0
  173. package/registry/examples/landscape/brand.d.ts +4 -0
  174. package/registry/examples/landscape/brand.js +11 -0
  175. package/registry/examples/landscape/brand.tsx +10 -0
  176. package/registry/examples/marketing-layout/basic.d.ts +4 -0
  177. package/registry/examples/marketing-layout/basic.js +31 -0
  178. package/registry/examples/marketing-layout/basic.tsx +28 -0
  179. package/registry/examples/marketing-layout/docs-hub.d.ts +4 -0
  180. package/registry/examples/marketing-layout/docs-hub.js +37 -0
  181. package/registry/examples/marketing-layout/docs-hub.tsx +44 -0
  182. package/registry/examples/marketing-layout/pricing.d.ts +4 -0
  183. package/registry/examples/marketing-layout/pricing.js +45 -0
  184. package/registry/examples/marketing-layout/pricing.tsx +55 -0
  185. package/registry/examples/marketing-layout/product-page.d.ts +4 -0
  186. package/registry/examples/marketing-layout/product-page.js +79 -0
  187. package/registry/examples/marketing-layout/product-page.tsx +83 -0
  188. package/registry/examples/mascots/native/phoenix.d.ts +4 -0
  189. package/registry/examples/mascots/native/phoenix.dark.png +0 -0
  190. package/registry/examples/mascots/native/phoenix.js +21 -0
  191. package/registry/examples/mascots/native/phoenix.light.png +0 -0
  192. package/registry/examples/mascots/native/phoenix.tsx +18 -0
  193. package/registry/examples/mascots/phoenix.d.ts +4 -0
  194. package/registry/examples/mascots/phoenix.js +14 -0
  195. package/registry/examples/mascots/phoenix.tsx +11 -0
  196. package/registry/examples/profile-card/arcade.d.ts +4 -0
  197. package/registry/examples/profile-card/arcade.js +25 -0
  198. package/registry/examples/profile-card/arcade.tsx +19 -0
  199. package/registry/examples/profile-card/creator.d.ts +4 -0
  200. package/registry/examples/profile-card/creator.js +31 -0
  201. package/registry/examples/profile-card/creator.tsx +26 -0
  202. package/registry/examples/profile-card/match.d.ts +4 -0
  203. package/registry/examples/profile-card/match.js +25 -0
  204. package/registry/examples/profile-card/match.tsx +19 -0
  205. package/registry/examples/profile-card/native/default.d.ts +4 -0
  206. package/registry/examples/profile-card/native/default.dark.png +0 -0
  207. package/registry/examples/profile-card/native/default.js +27 -0
  208. package/registry/examples/profile-card/native/default.light.png +0 -0
  209. package/registry/examples/profile-card/native/default.tsx +22 -0
  210. package/registry/examples/promise-card/arcade.d.ts +4 -0
  211. package/registry/examples/promise-card/arcade.js +25 -0
  212. package/registry/examples/promise-card/arcade.tsx +19 -0
  213. package/registry/examples/promise-card/guarantee.d.ts +4 -0
  214. package/registry/examples/promise-card/guarantee.js +23 -0
  215. package/registry/examples/promise-card/guarantee.tsx +17 -0
  216. package/registry/examples/scroll-stage/arcade.d.ts +4 -0
  217. package/registry/examples/scroll-stage/arcade.js +16 -0
  218. package/registry/examples/scroll-stage/arcade.tsx +15 -0
  219. package/registry/examples/scroll-stage/chapters.d.ts +4 -0
  220. package/registry/examples/scroll-stage/chapters.js +25 -0
  221. package/registry/examples/scroll-stage/chapters.tsx +22 -0
  222. package/registry/examples/settings-layout/account.d.ts +4 -0
  223. package/registry/examples/settings-layout/account.js +51 -0
  224. package/registry/examples/settings-layout/account.tsx +50 -0
  225. package/registry/examples/settings-layout/sections.d.ts +4 -0
  226. package/registry/examples/settings-layout/sections.js +27 -0
  227. package/registry/examples/settings-layout/sections.tsx +24 -0
  228. package/registry/examples/split-view/empty.d.ts +4 -0
  229. package/registry/examples/split-view/empty.js +19 -0
  230. package/registry/examples/split-view/empty.tsx +13 -0
  231. package/registry/examples/split-view/messages.d.ts +4 -0
  232. package/registry/examples/split-view/messages.js +49 -0
  233. package/registry/examples/split-view/messages.tsx +52 -0
  234. package/registry/examples/stage-banner/round.d.ts +4 -0
  235. package/registry/examples/stage-banner/round.js +14 -0
  236. package/registry/examples/stage-banner/round.tsx +11 -0
  237. package/registry/examples/stage-banner/steps.d.ts +4 -0
  238. package/registry/examples/stage-banner/steps.js +14 -0
  239. package/registry/examples/stage-banner/steps.tsx +11 -0
  240. package/registry/field.json +1 -1
  241. package/registry/file-upload.json +1 -1
  242. package/registry/filter-bar.json +1 -1
  243. package/registry/glow-card.json +1 -1
  244. package/registry/goal-gauge.json +322 -0
  245. package/registry/image-cropper.json +1 -1
  246. package/registry/index.json +317 -5
  247. package/registry/iso.json +1 -1
  248. package/registry/kbd.json +1 -1
  249. package/registry/landscape.json +189 -0
  250. package/registry/link-card.json +1 -1
  251. package/registry/loader.json +1 -1
  252. package/registry/marketing-layout.json +172 -0
  253. package/registry/marquee.json +1 -1
  254. package/registry/mascot-quote.json +1 -1
  255. package/registry/mascot-state.json +1 -1
  256. package/registry/mascots.json +104 -7
  257. package/registry/media-capture.json +1 -1
  258. package/registry/meter.json +1 -1
  259. package/registry/nav-bar.json +1 -1
  260. package/registry/number-ticker.json +1 -1
  261. package/registry/page-header.json +1 -1
  262. package/registry/page-hero.json +3 -3
  263. package/registry/page.json +5 -5
  264. package/registry/pagination.json +1 -1
  265. package/registry/pointer-light.json +1 -1
  266. package/registry/popover.json +1 -1
  267. package/registry/profile-card.json +501 -0
  268. package/registry/progress.json +1 -1
  269. package/registry/promise-card.json +228 -0
  270. package/registry/radio-group.json +1 -1
  271. package/registry/scroll-stage.json +197 -0
  272. package/registry/search-field.json +1 -1
  273. package/registry/section-backdrop.json +1 -1
  274. package/registry/separator.json +1 -1
  275. package/registry/settings-layout.json +231 -0
  276. package/registry/skeleton.json +1 -1
  277. package/registry/slider.json +1 -1
  278. package/registry/slot.json +1 -1
  279. package/registry/spinner.json +1 -1
  280. package/registry/split-view.json +233 -0
  281. package/registry/stage-banner.json +221 -0
  282. package/registry/stat.json +1 -1
  283. package/registry/stepper.json +1 -1
  284. package/registry/switch.json +1 -1
  285. package/registry/tabs.json +1 -1
  286. package/registry/tag-input.json +1 -1
  287. package/registry/terminal-replay.json +1 -1
  288. package/registry/theme.json +1 -1
  289. package/registry/toast.json +1 -1
  290. package/registry/toc.json +1 -1
  291. package/registry/tooltip.json +1 -1
  292. package/registry/video-player.json +1 -1
  293. package/registry/video-trimmer.json +1 -1
@@ -0,0 +1,136 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import * as React from 'react';
3
+
4
+ declare const authLayout: tailwind_variants.TVReturnType<{
5
+ [key: string]: {
6
+ [key: string]: tailwind_variants.ClassValue | {
7
+ root?: tailwind_variants.ClassValue;
8
+ footer?: tailwind_variants.ClassValue;
9
+ title?: tailwind_variants.ClassValue;
10
+ main?: tailwind_variants.ClassValue;
11
+ aside?: tailwind_variants.ClassValue;
12
+ asideBrand?: tailwind_variants.ClassValue;
13
+ asideBody?: tailwind_variants.ClassValue;
14
+ asideTitle?: tailwind_variants.ClassValue;
15
+ asideText?: tailwind_variants.ClassValue;
16
+ asideFoot?: tailwind_variants.ClassValue;
17
+ column?: tailwind_variants.ClassValue;
18
+ mobileBrand?: tailwind_variants.ClassValue;
19
+ head?: tailwind_variants.ClassValue;
20
+ description?: tailwind_variants.ClassValue;
21
+ legal?: tailwind_variants.ClassValue;
22
+ };
23
+ };
24
+ } | {
25
+ [x: string]: {
26
+ [x: string]: tailwind_variants.ClassValue | {
27
+ root?: tailwind_variants.ClassValue;
28
+ footer?: tailwind_variants.ClassValue;
29
+ title?: tailwind_variants.ClassValue;
30
+ main?: tailwind_variants.ClassValue;
31
+ aside?: tailwind_variants.ClassValue;
32
+ asideBrand?: tailwind_variants.ClassValue;
33
+ asideBody?: tailwind_variants.ClassValue;
34
+ asideTitle?: tailwind_variants.ClassValue;
35
+ asideText?: tailwind_variants.ClassValue;
36
+ asideFoot?: tailwind_variants.ClassValue;
37
+ column?: tailwind_variants.ClassValue;
38
+ mobileBrand?: tailwind_variants.ClassValue;
39
+ head?: tailwind_variants.ClassValue;
40
+ description?: tailwind_variants.ClassValue;
41
+ legal?: tailwind_variants.ClassValue;
42
+ };
43
+ };
44
+ } | {}, {
45
+ root: string;
46
+ aside: string;
47
+ asideBrand: string;
48
+ asideBody: string;
49
+ asideTitle: string;
50
+ asideText: string;
51
+ asideFoot: string;
52
+ main: string;
53
+ column: string;
54
+ mobileBrand: string;
55
+ head: string;
56
+ title: string;
57
+ description: string;
58
+ footer: string;
59
+ legal: string;
60
+ }, undefined, {
61
+ [key: string]: {
62
+ [key: string]: tailwind_variants.ClassValue | {
63
+ root?: tailwind_variants.ClassValue;
64
+ footer?: tailwind_variants.ClassValue;
65
+ title?: tailwind_variants.ClassValue;
66
+ main?: tailwind_variants.ClassValue;
67
+ aside?: tailwind_variants.ClassValue;
68
+ asideBrand?: tailwind_variants.ClassValue;
69
+ asideBody?: tailwind_variants.ClassValue;
70
+ asideTitle?: tailwind_variants.ClassValue;
71
+ asideText?: tailwind_variants.ClassValue;
72
+ asideFoot?: tailwind_variants.ClassValue;
73
+ column?: tailwind_variants.ClassValue;
74
+ mobileBrand?: tailwind_variants.ClassValue;
75
+ head?: tailwind_variants.ClassValue;
76
+ description?: tailwind_variants.ClassValue;
77
+ legal?: tailwind_variants.ClassValue;
78
+ };
79
+ };
80
+ } | {}, {
81
+ root: string;
82
+ aside: string;
83
+ asideBrand: string;
84
+ asideBody: string;
85
+ asideTitle: string;
86
+ asideText: string;
87
+ asideFoot: string;
88
+ main: string;
89
+ column: string;
90
+ mobileBrand: string;
91
+ head: string;
92
+ title: string;
93
+ description: string;
94
+ footer: string;
95
+ legal: string;
96
+ }, tailwind_variants.TVReturnTypeLike<unknown, {
97
+ root: string;
98
+ aside: string;
99
+ asideBrand: string;
100
+ asideBody: string;
101
+ asideTitle: string;
102
+ asideText: string;
103
+ asideFoot: string;
104
+ main: string;
105
+ column: string;
106
+ mobileBrand: string;
107
+ head: string;
108
+ title: string;
109
+ description: string;
110
+ footer: string;
111
+ legal: string;
112
+ }>>;
113
+ type AuthLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
114
+ /** The product's mark and name (`<ProductLogo id="orochia" /> Orochia`): in the brand panel, and above the form on a phone. */
115
+ brand: React.ReactNode;
116
+ /** The form's title (`Welcome back`): the `h1`. */
117
+ title: React.ReactNode;
118
+ /** One sentence under the title. */
119
+ description?: React.ReactNode;
120
+ /** The form: fields, the primary Button, the alternatives (a passkey, a magic link). */
121
+ children: React.ReactNode;
122
+ /** Under the form: the other way (`No account yet? Create one`). */
123
+ footer?: React.ReactNode;
124
+ /** The fine print at the very bottom (terms, privacy). */
125
+ legal?: React.ReactNode;
126
+ /** The brand panel's promise, large (desktop). */
127
+ promise?: React.ReactNode;
128
+ /** The brand panel's sentence or quote under the promise (a MascotQuote, a creator's words). */
129
+ aside?: React.ReactNode;
130
+ /** The brand panel's foot (`© Krizaka · Montréal`). */
131
+ asideFooter?: React.ReactNode;
132
+ };
133
+ /** An entry screen: the product's brand panel beside the form (one column on a phone). */
134
+ declare function AuthLayout({ brand, title, description, children, footer, legal, promise, aside, asideFooter, className, ...props }: AuthLayoutProps): React.JSX.Element;
135
+
136
+ export { AuthLayout, type AuthLayoutProps, authLayout };
@@ -0,0 +1,75 @@
1
+ // src/auth-layout/auth-layout.tsx
2
+ import { tv as tv2 } from "tailwind-variants";
3
+
4
+ // src/section-backdrop/section-backdrop.tsx
5
+ import { tv } from "tailwind-variants";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var sectionBackdropVariants = tv({
8
+ slots: {
9
+ root: "kz-backdrop",
10
+ drift: "kz-backdrop-drift",
11
+ dome: "kz-backdrop-dome",
12
+ grid: "kz-backdrop-grid",
13
+ media: "kz-backdrop-media"
14
+ }
15
+ });
16
+ function SectionBackdrop({ as: Tag = "section", direction = "down", dome = true, grid = false, media, animated = true, className, children, ...props }) {
17
+ const s2 = sectionBackdropVariants();
18
+ return /* @__PURE__ */ jsxs(Tag, { className: s2.root({ className }), "data-direction": direction, ...props, children: [
19
+ animated ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s2.drift() }) : null,
20
+ dome ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s2.dome() }) : null,
21
+ grid ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s2.grid() }) : null,
22
+ media ? /* @__PURE__ */ jsx("div", { "data-backdrop-layer": true, "aria-hidden": true, className: s2.media(), children: media }) : null,
23
+ children
24
+ ] });
25
+ }
26
+
27
+ // src/auth-layout/auth-layout.tsx
28
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
29
+ var authLayout = tv2({
30
+ slots: {
31
+ root: "grid min-h-dvh w-full bg-surface-0 text-fg lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]",
32
+ aside: "relative hidden flex-col justify-between overflow-hidden border-r border-border-subtle p-10 lg:flex",
33
+ asideBrand: "relative flex items-center gap-2.5 font-display text-base font-bold tracking-tight",
34
+ asideBody: "relative flex max-w-md flex-col gap-4",
35
+ asideTitle: "font-display text-3xl font-extrabold leading-tight tracking-tight text-fg",
36
+ asideText: "text-[15px] leading-relaxed text-fg-secondary",
37
+ asideFoot: "relative text-xs text-fg-secondary",
38
+ main: "flex flex-col items-center justify-center px-4 py-10 sm:px-8",
39
+ column: "flex w-full max-w-sm flex-col gap-6",
40
+ mobileBrand: "flex items-center gap-2.5 font-display text-base font-bold tracking-tight lg:hidden",
41
+ head: "flex flex-col gap-1.5",
42
+ title: "font-display text-2xl font-extrabold tracking-tight text-fg",
43
+ description: "text-sm text-fg-secondary",
44
+ footer: "text-center text-sm text-fg-secondary",
45
+ legal: "text-center text-xs leading-relaxed text-fg-secondary"
46
+ }
47
+ });
48
+ var s = authLayout();
49
+ function AuthLayout({ brand, title, description, children, footer, legal, promise, aside, asideFooter, className, ...props }) {
50
+ return /* @__PURE__ */ jsxs2("div", { className: s.root({ className }), ...props, children: [
51
+ /* @__PURE__ */ jsxs2(SectionBackdrop, { as: "div", grid: true, className: s.aside(), "aria-hidden": !promise && !aside ? true : void 0, children: [
52
+ /* @__PURE__ */ jsx2("div", { className: s.asideBrand(), children: brand }),
53
+ /* @__PURE__ */ jsxs2("div", { className: s.asideBody(), children: [
54
+ promise && /* @__PURE__ */ jsx2("p", { className: s.asideTitle(), children: promise }),
55
+ aside && /* @__PURE__ */ jsx2("div", { className: s.asideText(), children: aside })
56
+ ] }),
57
+ /* @__PURE__ */ jsx2("div", { className: s.asideFoot(), children: asideFooter })
58
+ ] }),
59
+ /* @__PURE__ */ jsx2("main", { className: s.main(), children: /* @__PURE__ */ jsxs2("div", { className: s.column(), children: [
60
+ /* @__PURE__ */ jsx2("div", { className: s.mobileBrand(), children: brand }),
61
+ /* @__PURE__ */ jsxs2("div", { className: s.head(), children: [
62
+ /* @__PURE__ */ jsx2("h1", { className: s.title(), children: title }),
63
+ description && /* @__PURE__ */ jsx2("p", { className: s.description(), children: description })
64
+ ] }),
65
+ children,
66
+ footer && /* @__PURE__ */ jsx2("p", { className: s.footer(), children: footer }),
67
+ legal && /* @__PURE__ */ jsx2("p", { className: s.legal(), children: legal })
68
+ ] }) })
69
+ ] });
70
+ }
71
+ export {
72
+ AuthLayout,
73
+ authLayout
74
+ };
75
+ //# sourceMappingURL=auth-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/auth-layout/auth-layout.tsx","../src/section-backdrop/section-backdrop.tsx"],"sourcesContent":["// Server-safe. Sign in, sign up, verify, reset — read from the products' entry screens: on a desktop the product's\n// brand panel (its gradient, a sentence, a quote or an illustration) beside a calm column with the form; on a phone\n// one column, the brand reduced to its mark above the form. Words and the product's mark arrive as props.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { SectionBackdrop } from \"../section-backdrop/section-backdrop\";\n\nexport const authLayout = tv({\n slots: {\n root: \"grid min-h-dvh w-full bg-surface-0 text-fg lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]\",\n aside: \"relative hidden flex-col justify-between overflow-hidden border-r border-border-subtle p-10 lg:flex\",\n asideBrand: \"relative flex items-center gap-2.5 font-display text-base font-bold tracking-tight\",\n asideBody: \"relative flex max-w-md flex-col gap-4\",\n asideTitle: \"font-display text-3xl font-extrabold leading-tight tracking-tight text-fg\",\n asideText: \"text-[15px] leading-relaxed text-fg-secondary\",\n asideFoot: \"relative text-xs text-fg-secondary\",\n main: \"flex flex-col items-center justify-center px-4 py-10 sm:px-8\",\n column: \"flex w-full max-w-sm flex-col gap-6\",\n mobileBrand: \"flex items-center gap-2.5 font-display text-base font-bold tracking-tight lg:hidden\",\n head: \"flex flex-col gap-1.5\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"text-sm text-fg-secondary\",\n footer: \"text-center text-sm text-fg-secondary\",\n legal: \"text-center text-xs leading-relaxed text-fg-secondary\",\n },\n});\nconst s = authLayout();\n\nexport type AuthLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The product's mark and name (`<ProductLogo id=\"orochia\" /> Orochia`): in the brand panel, and above the form on a phone. */\n brand: React.ReactNode;\n /** The form's title (`Welcome back`): the `h1`. */\n title: React.ReactNode;\n /** One sentence under the title. */\n description?: React.ReactNode;\n /** The form: fields, the primary Button, the alternatives (a passkey, a magic link). */\n children: React.ReactNode;\n /** Under the form: the other way (`No account yet? Create one`). */\n footer?: React.ReactNode;\n /** The fine print at the very bottom (terms, privacy). */\n legal?: React.ReactNode;\n /** The brand panel's promise, large (desktop). */\n promise?: React.ReactNode;\n /** The brand panel's sentence or quote under the promise (a MascotQuote, a creator's words). */\n aside?: React.ReactNode;\n /** The brand panel's foot (`© Krizaka · Montréal`). */\n asideFooter?: React.ReactNode;\n};\n\n/** An entry screen: the product's brand panel beside the form (one column on a phone). */\nexport function AuthLayout({ brand, title, description, children, footer, legal, promise, aside, asideFooter, className, ...props }: AuthLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <SectionBackdrop as=\"div\" grid className={s.aside()} aria-hidden={!promise && !aside ? true : undefined}>\n <div className={s.asideBrand()}>{brand}</div>\n <div className={s.asideBody()}>\n {promise && <p className={s.asideTitle()}>{promise}</p>}\n {aside && <div className={s.asideText()}>{aside}</div>}\n </div>\n <div className={s.asideFoot()}>{asideFooter}</div>\n </SectionBackdrop>\n <main className={s.main()}>\n <div className={s.column()}>\n <div className={s.mobileBrand()}>{brand}</div>\n <div className={s.head()}>\n <h1 className={s.title()}>{title}</h1>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {children}\n {footer && <p className={s.footer()}>{footer}</p>}\n {legal && <p className={s.legal()}>{legal}</p>}\n </div>\n </main>\n </div>\n );\n}\n","// 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":";AAIA,SAAS,MAAAA,WAAU;;;ACFnB,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,QAAMC,KAAI,wBAAwB;AAClC,SACE,qBAAC,OAAI,WAAWA,GAAE,KAAK,EAAE,UAAU,CAAC,GAAG,kBAAgB,WAAY,GAAG,OACnE;AAAA,eAAW,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,MAAM,GAAG,IAAK;AAAA,IAC3E,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,KAAK,GAAG,IAAK;AAAA,IACtE,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,KAAK,GAAG,IAAK;AAAA,IACtE,QACC,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,MAAM,GACrD,iBAC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A,MACxC,gBAAAC,MAAC,SAAI,WAAW,EAAE,KAAK,GACrB;AAAA,wBAAAD,KAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QAChC,eAAe,gBAAAA,KAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,SAC9D;AAAA,MACC;AAAA,MACA,UAAU,gBAAAA,KAAC,OAAE,WAAW,EAAE,OAAO,GAAI,kBAAO;AAAA,MAC5C,SAAS,gBAAAA,KAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,OAC5C,GACF;AAAA,KACF;AAEJ;","names":["tv","s","jsx","jsxs","tv"]}
@@ -0,0 +1,84 @@
1
+ import * as React from 'react';
2
+ import { S as StoryVariant } from './story-variant-CLn4H5Nt.js';
3
+
4
+ /** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */
5
+ type LinkComponent = React.ElementType<{
6
+ href: string;
7
+ className?: string;
8
+ children?: React.ReactNode;
9
+ "aria-label"?: string;
10
+ "aria-describedby"?: string;
11
+ }>;
12
+
13
+ interface ChoiceItem {
14
+ /** The value of the choice (and its React key). */
15
+ id: string;
16
+ /** What represents it: a mark, an avatar, an illustration. Decorative — the name carries the meaning. */
17
+ visual: React.ReactNode;
18
+ /** Its name, short. */
19
+ name: React.ReactNode;
20
+ /** One line under the name: what it is, its role. */
21
+ title?: React.ReactNode;
22
+ /** A small line above the visual (a family, a tier), after its `icon`. */
23
+ eyebrow?: React.ReactNode;
24
+ /** A small glyph before the eyebrow (decorative). */
25
+ icon?: React.ReactNode;
26
+ /** A short tag in the top corner (“P1”, “New”, “Popular”). */
27
+ badge?: React.ReactNode;
28
+ /** Under the line: a gauge (`StatGauge`), facts, a price. */
29
+ extra?: React.ReactNode;
30
+ /** At the bottom: where the tile leads (“Chapter 2 ↓”, “See the plan”). */
31
+ meta?: React.ReactNode;
32
+ /** Makes the tile a link (ignored when the grid is selectable). */
33
+ href?: string;
34
+ /** A brand scope for this tile (`orazaka` → `.brand-orazaka`): its accent becomes that brand's. */
35
+ brand?: string;
36
+ /** Not selectable. */
37
+ disabled?: boolean;
38
+ }
39
+ type ChoiceGridProps = Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
40
+ /** The accessible name of the group (“Choose your plan”) — passed translated. */
41
+ label: string;
42
+ /** The choices, in reading order. */
43
+ items: readonly ChoiceItem[];
44
+ /** A short mono line above the grid (a step, a tag). */
45
+ tag?: React.ReactNode;
46
+ /** A line beside the tag: what the choice means. */
47
+ caption?: React.ReactNode;
48
+ /** A call above the tiles, larger (“Choose your plan”). */
49
+ prompt?: React.ReactNode;
50
+ /** The chosen id (controlled). */
51
+ value?: string;
52
+ /** The chosen id at first (uncontrolled). */
53
+ defaultValue?: string;
54
+ /** Makes the grid a radio group: called with the id chosen by click, Enter, Space or the arrow keys. */
55
+ onValueChange?: (id: string) => void;
56
+ /** The app's link component for the tiles' internal `href`s (Next's `Link`); an `<a>` otherwise. */
57
+ linkAs?: LinkComponent;
58
+ /**
59
+ * The number of columns (one on a phone).
60
+ * @default min(items, 4)
61
+ */
62
+ columns?: number;
63
+ /**
64
+ * `default`: sober tiles. `arcade`: the select screen — the brand's light on each card, corners that lock, a flash.
65
+ * @default "default"
66
+ */
67
+ variant?: StoryVariant;
68
+ /** A brand scope for the whole grid (`orochia` → `.brand-orochia`). */
69
+ brand?: string;
70
+ /**
71
+ * The tiles' arrival on mount (arcade: the corners locking one by one, the gauges filling). Always off under
72
+ * `prefers-reduced-motion`.
73
+ * @default true
74
+ */
75
+ animated?: boolean;
76
+ };
77
+ /**
78
+ * A line-up of choices as tiles. With `onValueChange` (or `value`), a radio group: one tab stop, the arrow keys move
79
+ * and choose, Home/End jump, the chosen tile is marked. With `href` on the items, a list of links. Otherwise a list
80
+ * named by `label` that presents the line-up.
81
+ */
82
+ declare function ChoiceGrid({ label, items, tag, caption, prompt, value, defaultValue, onValueChange, linkAs, columns, variant, brand, animated, className, style, ...props }: ChoiceGridProps): React.JSX.Element;
83
+
84
+ export { ChoiceGrid, type ChoiceGridProps, type ChoiceItem };
@@ -0,0 +1,141 @@
1
+ "use client";
2
+ import {
3
+ brandClass,
4
+ storyVariantClass
5
+ } from "./chunk-555LWYIN.js";
6
+ import {
7
+ cn
8
+ } from "./chunk-5AXLA4LK.js";
9
+
10
+ // src/choice-grid/choice-grid.tsx
11
+ import * as React from "react";
12
+
13
+ // src/block-link.tsx
14
+ import { jsx } from "react/jsx-runtime";
15
+ var isExternal = (href) => /^[a-z][a-z0-9+.-]*:/i.test(href);
16
+ function BlockLink({
17
+ href,
18
+ linkAs: Link = "a",
19
+ external = isExternal(href),
20
+ rel,
21
+ ...props
22
+ }) {
23
+ if (external) return /* @__PURE__ */ jsx("a", { href, target: "_blank", rel: rel ?? "noopener noreferrer", ...props });
24
+ const Comp = Link;
25
+ return /* @__PURE__ */ jsx(Comp, { href, ...props });
26
+ }
27
+
28
+ // src/choice-grid/choice-grid.tsx
29
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
30
+ var CORNERS = ["tl", "tr", "bl", "br"];
31
+ function ChoiceGrid({
32
+ label,
33
+ items,
34
+ tag,
35
+ caption,
36
+ prompt,
37
+ value,
38
+ defaultValue,
39
+ onValueChange,
40
+ linkAs,
41
+ columns,
42
+ variant,
43
+ brand,
44
+ animated = true,
45
+ className,
46
+ style,
47
+ ...props
48
+ }) {
49
+ const selectable = onValueChange !== void 0 || value !== void 0;
50
+ const [inner, setInner] = React.useState(defaultValue);
51
+ const current = value ?? inner;
52
+ const refs = React.useRef([]);
53
+ const enabled = items.map((item, i) => item.disabled ? -1 : i).filter((i) => i >= 0);
54
+ const chosenIndex = items.findIndex((item) => item.id === current && !item.disabled);
55
+ const focusIndex = chosenIndex >= 0 ? chosenIndex : enabled[0] ?? 0;
56
+ const choose = (i) => {
57
+ const item = items[i];
58
+ if (!item || item.disabled) return;
59
+ if (value === void 0) setInner(item.id);
60
+ onValueChange?.(item.id);
61
+ };
62
+ const onKeyDown = (e, i) => {
63
+ const at = enabled.indexOf(i);
64
+ let next;
65
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") next = enabled[(at + 1) % enabled.length];
66
+ else if (e.key === "ArrowLeft" || e.key === "ArrowUp") next = enabled[(at - 1 + enabled.length) % enabled.length];
67
+ else if (e.key === "Home") next = enabled[0];
68
+ else if (e.key === "End") next = enabled[enabled.length - 1];
69
+ if (next === void 0) return;
70
+ e.preventDefault();
71
+ refs.current[next]?.focus();
72
+ choose(next);
73
+ };
74
+ const Grid = selectable ? "div" : "ul";
75
+ const Item = selectable ? "div" : "li";
76
+ const vars = { "--kzs-cols": columns ?? Math.min(items.length, 4), ...style };
77
+ return /* @__PURE__ */ jsxs("div", { "data-kzs-scene": "", "data-animated": animated ? "" : void 0, className: cn("kzs-choice", storyVariantClass(variant), brandClass(brand), className), style: vars, ...props, children: [
78
+ /* @__PURE__ */ jsx2("span", { className: "kzs-texture", "aria-hidden": true }),
79
+ /* @__PURE__ */ jsx2("span", { className: "kzs-scan kzs-loop", "aria-hidden": true }),
80
+ (tag || caption) && /* @__PURE__ */ jsxs("p", { className: "kzs-choice-head", children: [
81
+ tag && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-tag", children: tag }),
82
+ tag && caption && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-sep", "aria-hidden": true }),
83
+ caption && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-caption", children: caption })
84
+ ] }),
85
+ prompt && /* @__PURE__ */ jsx2("p", { className: "kzs-choice-prompt", children: prompt }),
86
+ /* @__PURE__ */ jsx2(Grid, { className: "kzs-choice-grid", role: selectable ? "radiogroup" : void 0, "aria-label": label, children: items.map((item, i) => {
87
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
88
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-aura", "aria-hidden": true }),
89
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-flash", "aria-hidden": true }),
90
+ CORNERS.map((at) => /* @__PURE__ */ jsx2("span", { className: "kzs-corner", "data-at": at, "aria-hidden": true }, at)),
91
+ (item.badge || item.eyebrow || item.icon) && /* @__PURE__ */ jsxs("span", { className: "kzs-choice-top", children: [
92
+ item.badge ? /* @__PURE__ */ jsx2("span", { className: "kzs-choice-badge", children: item.badge }) : /* @__PURE__ */ jsx2("span", {}),
93
+ (item.eyebrow || item.icon) && /* @__PURE__ */ jsxs("span", { className: "kzs-choice-eyebrow", children: [
94
+ item.icon && /* @__PURE__ */ jsx2("span", { "aria-hidden": true, children: item.icon }),
95
+ item.eyebrow
96
+ ] })
97
+ ] }),
98
+ /* @__PURE__ */ jsxs("span", { className: "kzs-choice-frame", "aria-hidden": true, children: [
99
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-floor" }),
100
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-visual", children: item.visual })
101
+ ] }),
102
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-name", children: item.name }),
103
+ item.title && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-title", children: item.title }),
104
+ item.extra && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-extra", children: item.extra }),
105
+ item.meta && /* @__PURE__ */ jsx2("span", { className: "kzs-choice-meta", children: item.meta }),
106
+ /* @__PURE__ */ jsx2("span", { className: "kzs-choice-check", "aria-hidden": true, children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 24 24", width: "12", height: "12", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx2("path", { d: "m5 12 5 5 9-10" }) }) })
107
+ ] });
108
+ const itemStyle = { "--i": i };
109
+ let tile;
110
+ if (selectable)
111
+ tile = /* @__PURE__ */ jsx2(
112
+ "button",
113
+ {
114
+ ref: (el) => {
115
+ refs.current[i] = el;
116
+ },
117
+ type: "button",
118
+ role: "radio",
119
+ "aria-checked": current === item.id,
120
+ tabIndex: i === focusIndex ? 0 : -1,
121
+ disabled: item.disabled,
122
+ "data-selectable": "",
123
+ className: "kzs-choice-item",
124
+ style: itemStyle,
125
+ onClick: () => choose(i),
126
+ onKeyDown: (e) => onKeyDown(e, i),
127
+ children: body
128
+ }
129
+ );
130
+ else if (item.href)
131
+ tile = /* @__PURE__ */ jsx2(BlockLink, { href: item.href, linkAs, className: "kzs-choice-item", "data-link": "", style: itemStyle, children: body });
132
+ else
133
+ tile = /* @__PURE__ */ jsx2("div", { className: "kzs-choice-item", style: itemStyle, children: body });
134
+ return /* @__PURE__ */ jsx2(Item, { className: cn("kzs-choice-slot", brandClass(item.brand)), style: itemStyle, children: tile }, item.id);
135
+ }) })
136
+ ] });
137
+ }
138
+ export {
139
+ ChoiceGrid
140
+ };
141
+ //# sourceMappingURL=choice-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/choice-grid/choice-grid.tsx","../src/block-link.tsx"],"sourcesContent":["// Client. A row of choices shown as tiles — a visual, a name, a line (story.css): pick a plan, a persona, a team, a side.\n// Selectable (`onValueChange`), it is a radio group with roving focus; with `href` on its items, a set of links (a\n// line-up that leads somewhere); otherwise a showcase of the line-up.\nimport * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport interface ChoiceItem {\n /** The value of the choice (and its React key). */\n id: string;\n /** What represents it: a mark, an avatar, an illustration. Decorative — the name carries the meaning. */\n visual: React.ReactNode;\n /** Its name, short. */\n name: React.ReactNode;\n /** One line under the name: what it is, its role. */\n title?: React.ReactNode;\n /** A small line above the visual (a family, a tier), after its `icon`. */\n eyebrow?: React.ReactNode;\n /** A small glyph before the eyebrow (decorative). */\n icon?: React.ReactNode;\n /** A short tag in the top corner (“P1”, “New”, “Popular”). */\n badge?: React.ReactNode;\n /** Under the line: a gauge (`StatGauge`), facts, a price. */\n extra?: React.ReactNode;\n /** At the bottom: where the tile leads (“Chapter 2 ↓”, “See the plan”). */\n meta?: React.ReactNode;\n /** Makes the tile a link (ignored when the grid is selectable). */\n href?: string;\n /** A brand scope for this tile (`orazaka` → `.brand-orazaka`): its accent becomes that brand's. */\n brand?: string;\n /** Not selectable. */\n disabled?: boolean;\n}\n\nexport type ChoiceGridProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"defaultValue\" | \"onChange\"> & {\n /** The accessible name of the group (“Choose your plan”) — passed translated. */\n label: string;\n /** The choices, in reading order. */\n items: readonly ChoiceItem[];\n /** A short mono line above the grid (a step, a tag). */\n tag?: React.ReactNode;\n /** A line beside the tag: what the choice means. */\n caption?: React.ReactNode;\n /** A call above the tiles, larger (“Choose your plan”). */\n prompt?: React.ReactNode;\n /** The chosen id (controlled). */\n value?: string;\n /** The chosen id at first (uncontrolled). */\n defaultValue?: string;\n /** Makes the grid a radio group: called with the id chosen by click, Enter, Space or the arrow keys. */\n onValueChange?: (id: string) => void;\n /** The app's link component for the tiles' internal `href`s (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n /**\n * The number of columns (one on a phone).\n * @default min(items, 4)\n */\n columns?: number;\n /**\n * `default`: sober tiles. `arcade`: the select screen — the brand's light on each card, corners that lock, a flash.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope for the whole grid (`orochia` → `.brand-orochia`). */\n brand?: string;\n /**\n * The tiles' arrival on mount (arcade: the corners locking one by one, the gauges filling). Always off under\n * `prefers-reduced-motion`.\n * @default true\n */\n animated?: boolean;\n};\n\nconst CORNERS = [\"tl\", \"tr\", \"bl\", \"br\"] as const;\n\n/**\n * A line-up of choices as tiles. With `onValueChange` (or `value`), a radio group: one tab stop, the arrow keys move\n * and choose, Home/End jump, the chosen tile is marked. With `href` on the items, a list of links. Otherwise a list\n * named by `label` that presents the line-up.\n */\nexport function ChoiceGrid({\n label,\n items,\n tag,\n caption,\n prompt,\n value,\n defaultValue,\n onValueChange,\n linkAs,\n columns,\n variant,\n brand,\n animated = true,\n className,\n style,\n ...props\n}: ChoiceGridProps) {\n const selectable = onValueChange !== undefined || value !== undefined;\n const [inner, setInner] = React.useState(defaultValue);\n const current = value ?? inner;\n const refs = React.useRef<(HTMLButtonElement | null)[]>([]);\n const enabled = items.map((item, i) => (item.disabled ? -1 : i)).filter((i) => i >= 0);\n const chosenIndex = items.findIndex((item) => item.id === current && !item.disabled);\n const focusIndex = chosenIndex >= 0 ? chosenIndex : (enabled[0] ?? 0);\n\n const choose = (i: number) => {\n const item = items[i];\n if (!item || item.disabled) return;\n if (value === undefined) setInner(item.id);\n onValueChange?.(item.id);\n };\n const onKeyDown = (e: React.KeyboardEvent, i: number) => {\n const at = enabled.indexOf(i);\n let next: number | undefined;\n if (e.key === \"ArrowRight\" || e.key === \"ArrowDown\") next = enabled[(at + 1) % enabled.length];\n else if (e.key === \"ArrowLeft\" || e.key === \"ArrowUp\") next = enabled[(at - 1 + enabled.length) % enabled.length];\n else if (e.key === \"Home\") next = enabled[0];\n else if (e.key === \"End\") next = enabled[enabled.length - 1];\n if (next === undefined) return;\n e.preventDefault();\n refs.current[next]?.focus();\n choose(next);\n };\n\n // A radio group holds radios, not list items; a showcase or a set of links is a list named by `label`.\n const Grid = selectable ? \"div\" : \"ul\";\n const Item = selectable ? \"div\" : \"li\";\n const vars = { \"--kzs-cols\": columns ?? Math.min(items.length, 4), ...style } as React.CSSProperties;\n return (\n <div data-kzs-scene=\"\" data-animated={animated ? \"\" : undefined} className={cn(\"kzs-choice\", storyVariantClass(variant), brandClass(brand), className)} style={vars} {...props}>\n <span className=\"kzs-texture\" aria-hidden />\n <span className=\"kzs-scan kzs-loop\" aria-hidden />\n {(tag || caption) && (\n <p className=\"kzs-choice-head\">\n {tag && <span className=\"kzs-choice-tag\">{tag}</span>}\n {tag && caption && <span className=\"kzs-choice-sep\" aria-hidden />}\n {caption && <span className=\"kzs-choice-caption\">{caption}</span>}\n </p>\n )}\n {prompt && <p className=\"kzs-choice-prompt\">{prompt}</p>}\n <Grid className=\"kzs-choice-grid\" role={selectable ? \"radiogroup\" : undefined} aria-label={label}>\n {items.map((item, i) => {\n const body = (\n <>\n <span className=\"kzs-choice-aura\" aria-hidden />\n <span className=\"kzs-choice-flash\" aria-hidden />\n {CORNERS.map((at) => (\n <span key={at} className=\"kzs-corner\" data-at={at} aria-hidden />\n ))}\n {(item.badge || item.eyebrow || item.icon) && (\n <span className=\"kzs-choice-top\">\n {item.badge ? <span className=\"kzs-choice-badge\">{item.badge}</span> : <span />}\n {(item.eyebrow || item.icon) && (\n <span className=\"kzs-choice-eyebrow\">\n {item.icon && <span aria-hidden>{item.icon}</span>}\n {item.eyebrow}\n </span>\n )}\n </span>\n )}\n <span className=\"kzs-choice-frame\" aria-hidden>\n <span className=\"kzs-choice-floor\" />\n <span className=\"kzs-choice-visual\">{item.visual}</span>\n </span>\n <span className=\"kzs-choice-name\">{item.name}</span>\n {item.title && <span className=\"kzs-choice-title\">{item.title}</span>}\n {item.extra && <span className=\"kzs-choice-extra\">{item.extra}</span>}\n {item.meta && <span className=\"kzs-choice-meta\">{item.meta}</span>}\n <span className=\"kzs-choice-check\" aria-hidden>\n <svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"m5 12 5 5 9-10\" />\n </svg>\n </span>\n </>\n );\n const itemStyle = { \"--i\": i } as React.CSSProperties;\n let tile: React.ReactNode;\n if (selectable)\n tile = (\n <button\n ref={(el) => {\n refs.current[i] = el;\n }}\n type=\"button\"\n role=\"radio\"\n aria-checked={current === item.id}\n tabIndex={i === focusIndex ? 0 : -1}\n disabled={item.disabled}\n data-selectable=\"\"\n className=\"kzs-choice-item\"\n style={itemStyle}\n onClick={() => choose(i)}\n onKeyDown={(e) => onKeyDown(e, i)}\n >\n {body}\n </button>\n );\n else if (item.href)\n tile = (\n <BlockLink href={item.href} linkAs={linkAs} className=\"kzs-choice-item\" data-link=\"\" style={itemStyle}>\n {body}\n </BlockLink>\n );\n else\n tile = (\n <div className=\"kzs-choice-item\" style={itemStyle}>\n {body}\n </div>\n );\n return (\n <Item key={item.id} className={cn(\"kzs-choice-slot\", brandClass(item.brand))} style={itemStyle}>\n {tile}\n </Item>\n );\n })}\n </Grid>\n </div>\n );\n}\n","// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} {...props} />;\n}\n"],"mappings":";;;;;;;;;;AAGA,YAAY,WAAW;;;ACeA;AAThB,IAAM,aAAa,CAAC,SAAiB,uBAAuB,KAAK,IAAI;AAErE,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,QAAQ,OAAO;AAAA,EACf,WAAW,WAAW,IAAI;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA2G;AACzG,MAAI,SAAU,QAAO,oBAAC,OAAE,MAAY,QAAO,UAAS,KAAK,OAAO,uBAAwB,GAAG,OAAO;AAClG,QAAM,OAAO;AACb,SAAO,oBAAC,QAAK,MAAa,GAAG,OAAO;AACtC;;;ADgHM,SAaM,UAbN,OAAAA,MAGE,YAHF;AA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AAU,MAAM,aAAa,IAAI;AAAA,YACjC,UAAU,KAAK;AAAA,YACf,mBAAgB;AAAA,YAChB,WAAU;AAAA,YACV,OAAO;AAAA,YACP,SAAS,MAAM,OAAO,CAAC;AAAA,YACvB,WAAW,CAAC,MAAM,UAAU,GAAG,CAAC;AAAA,YAE/B;AAAA;AAAA,QACH;AAAA,eAEK,KAAK;AACZ,eACE,gBAAAA,KAAC,aAAU,MAAM,KAAK,MAAM,QAAgB,WAAU,mBAAkB,aAAU,IAAG,OAAO,WACzF,gBACH;AAAA;AAGF,eACE,gBAAAA,KAAC,SAAI,WAAU,mBAAkB,OAAO,WACrC,gBACH;AAEJ,aACE,gBAAAA,KAAC,QAAmB,WAAW,GAAG,mBAAmB,WAAW,KAAK,KAAK,CAAC,GAAG,OAAO,WAClF,kBADQ,KAAK,EAEhB;AAAA,IAEJ,CAAC,GACH;AAAA,KACF;AAEJ;","names":["jsx"]}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ // src/story-variant.ts
4
+ var storyVariantClass = (variant) => variant === "arcade" ? "kzs-arcade" : void 0;
5
+ var brandClass = (brand) => brand ? `brand-${brand}` : void 0;
6
+
7
+ export {
8
+ storyVariantClass,
9
+ brandClass
10
+ };
11
+ //# sourceMappingURL=chunk-555LWYIN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/story-variant.ts"],"sourcesContent":["// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-orochia`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;AAMO,IAAM,oBAAoB,CAAC,YAAuC,YAAY,WAAW,eAAe;AAGxG,IAAM,aAAa,CAAC,UAA+B,QAAQ,SAAS,KAAK,KAAK;","names":[]}
@@ -0,0 +1,36 @@
1
+ "use client";
2
+
3
+ // src/glyphs.tsx
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function Glyph({ className = "h-4 w-4", fill, children }) {
6
+ return /* @__PURE__ */ jsx(
7
+ "svg",
8
+ {
9
+ viewBox: "0 0 24 24",
10
+ className,
11
+ fill: fill ? "currentColor" : "none",
12
+ stroke: fill ? "none" : "currentColor",
13
+ strokeWidth: "2",
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ "aria-hidden": true,
17
+ focusable: "false",
18
+ children
19
+ }
20
+ );
21
+ }
22
+ var CloseGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" }) });
23
+ 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] }) });
24
+ var CheckGlyph = (p) => /* @__PURE__ */ jsx(Glyph, { ...p, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
25
+ var CopyGlyph = (p) => /* @__PURE__ */ jsxs(Glyph, { ...p, children: [
26
+ /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
27
+ /* @__PURE__ */ jsx("path", { d: "M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3" })
28
+ ] });
29
+
30
+ export {
31
+ CloseGlyph,
32
+ ChevronGlyph,
33
+ CheckGlyph,
34
+ CopyGlyph
35
+ };
36
+ //# sourceMappingURL=chunk-AZPKXP3O.js.map
@@ -0,0 +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);\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;AAiEK,IAAM,YAAY,CAAC,MACxB,qBAAC,SAAO,GAAG,GACT;AAAA,sBAAC,UAAK,GAAE,KAAI,GAAE,KAAI,OAAM,MAAK,QAAO,MAAK,IAAG,KAAI;AAAA,EAChD,oBAAC,UAAK,GAAE,2DAA0D;AAAA,GACpE;","names":[]}
@@ -0,0 +1,17 @@
1
+ // src/cn.ts
2
+ import { clsx } from "clsx";
3
+ import { cn as merge } from "tailwind-variants";
4
+ function cn(...inputs) {
5
+ return merge(clsx(inputs)) ?? "";
6
+ }
7
+
8
+ // src/story-variant.ts
9
+ var storyVariantClass = (variant) => variant === "arcade" ? "kzs-arcade" : void 0;
10
+ var brandClass = (brand) => brand ? `brand-${brand}` : void 0;
11
+
12
+ export {
13
+ cn,
14
+ storyVariantClass,
15
+ brandClass
16
+ };
17
+ //# sourceMappingURL=chunk-VCAAHCHL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cn.ts","../src/story-variant.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { cn as merge } from \"tailwind-variants\";\n\nexport type { ClassValue };\n\n/**\n * Merges Tailwind classes: the last one wins — a product's `className` overrides the primitive's. The merge engine is\n * tailwind-merge as tailwind-variants ships it (the one `tv` uses), so the platform carries a single copy of it.\n * tailwind-variants bundles that engine since 3.3 (it never imports the `tailwind-merge` package, an optional peer):\n * hence `tailwind-variants ^3.3.1` and no `tailwind-merge` dependency — `scripts/consumer.mjs` checks it on a clean\n * install of the packed package.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return merge(clsx(inputs)) ?? \"\";\n}\n","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-orochia`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,MAAM,aAAa;AAWrB,SAAS,MAAM,QAA8B;AAClD,SAAO,MAAM,KAAK,MAAM,CAAC,KAAK;AAChC;;;ACRO,IAAM,oBAAoB,CAAC,YAAuC,YAAY,WAAW,eAAe;AAGxG,IAAM,aAAa,CAAC,UAA+B,QAAQ,SAAS,KAAK,KAAK;","names":[]}