@krizaka/ui 3.67.1 → 3.68.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 (254) hide show
  1. package/dist/chunk-PZ4FJOD5.js +44 -0
  2. package/dist/chunk-PZ4FJOD5.js.map +1 -0
  3. package/dist/{chunk-6BMKLAZ7.js → chunk-Z47KIPCT.js} +7 -2
  4. package/dist/{chunk-6BMKLAZ7.js.map → chunk-Z47KIPCT.js.map} +1 -1
  5. package/dist/copy-button.d.ts +29 -0
  6. package/dist/copy-button.js +56 -0
  7. package/dist/copy-button.js.map +1 -0
  8. package/dist/date-picker.d.ts +15 -15
  9. package/dist/filter-bar.d.ts +3 -3
  10. package/dist/index.js +3 -3
  11. package/dist/kind-config-editor.js +106 -129
  12. package/dist/kind-config-editor.js.map +1 -1
  13. package/dist/money-input.d.ts +29 -0
  14. package/dist/money-input.js +78 -0
  15. package/dist/money-input.js.map +1 -0
  16. package/dist/nav-bar.d.ts +28 -4
  17. package/dist/nav-bar.js +20 -10
  18. package/dist/nav-bar.js.map +1 -1
  19. package/dist/promo-code-field.d.ts +38 -0
  20. package/dist/promo-code-field.js +94 -0
  21. package/dist/promo-code-field.js.map +1 -0
  22. package/dist/radio-group.js +1 -1
  23. package/dist/retro-tv.d.ts +39 -4
  24. package/dist/retro-tv.js +217 -40
  25. package/dist/retro-tv.js.map +1 -1
  26. package/dist/status-chip.js +1 -1
  27. package/dist/terminal-replay.js +1 -1
  28. package/dist/virtual.d.ts +3 -3
  29. package/package.json +47 -4
  30. package/registry/account-menu.json +1 -1
  31. package/registry/account-settings.json +1 -1
  32. package/registry/achievement.json +1 -1
  33. package/registry/action-bar.json +1 -1
  34. package/registry/activity-feed.json +1 -1
  35. package/registry/agenda.json +1 -1
  36. package/registry/alert.json +1 -1
  37. package/registry/analysis-report.json +1 -1
  38. package/registry/anatomy-plate.json +1 -1
  39. package/registry/app-frame.json +2 -2
  40. package/registry/app-header.json +1 -1
  41. package/registry/app-shell.json +1 -1
  42. package/registry/argument-card.json +1 -1
  43. package/registry/audio-player.json +1 -1
  44. package/registry/auth-layout.json +1 -1
  45. package/registry/avatar.json +1 -1
  46. package/registry/badge.json +1 -1
  47. package/registry/bird-plate.json +1 -1
  48. package/registry/button.json +1 -1
  49. package/registry/captcha.json +1 -1
  50. package/registry/card-grid.json +1 -1
  51. package/registry/card.json +1 -1
  52. package/registry/catalogue-page.json +1 -1
  53. package/registry/changelog-page.json +1 -1
  54. package/registry/chapter.json +1 -1
  55. package/registry/chat.json +1 -1
  56. package/registry/checkbox.json +1 -1
  57. package/registry/chip-link.json +1 -1
  58. package/registry/chip-row.json +1 -1
  59. package/registry/chip.json +1 -1
  60. package/registry/choice-grid.json +1 -1
  61. package/registry/code-block.json +1 -1
  62. package/registry/collection-switcher.json +1 -1
  63. package/registry/combobox.json +1 -1
  64. package/registry/command.json +1 -1
  65. package/registry/comparison-table.json +1 -1
  66. package/registry/component-page.json +1 -1
  67. package/registry/confirm-button.json +1 -1
  68. package/registry/contact-page.json +1 -1
  69. package/registry/continue-prompt.json +1 -1
  70. package/registry/copy-button.json +382 -0
  71. package/registry/countdown.json +1 -1
  72. package/registry/cover-hero.json +1 -1
  73. package/registry/cta-panel.json +1 -1
  74. package/registry/dashboard-layout.json +1 -1
  75. package/registry/data-table.json +1 -1
  76. package/registry/date-picker.json +1 -1
  77. package/registry/decision-list.json +1 -1
  78. package/registry/description-list.json +1 -1
  79. package/registry/desktop-window.json +1 -1
  80. package/registry/detail-layout.json +1 -1
  81. package/registry/dialog.json +1 -1
  82. package/registry/docs-article-page.json +1 -1
  83. package/registry/docs-hub-page.json +1 -1
  84. package/registry/docs-layout.json +1 -1
  85. package/registry/docs-nav.json +1 -1
  86. package/registry/document-viewer.json +1 -1
  87. package/registry/doodle.json +1 -1
  88. package/registry/drop-overlay.json +1 -1
  89. package/registry/dropdown-menu.json +1 -1
  90. package/registry/elephant.json +2 -2
  91. package/registry/embed-facade.json +1 -1
  92. package/registry/empty-state.json +1 -1
  93. package/registry/engine-flow.json +1 -1
  94. package/registry/entity-header.json +1 -1
  95. package/registry/environment-notice.json +1 -1
  96. package/registry/error-page.json +1 -1
  97. package/registry/examples/copy-button/default.d.ts +4 -0
  98. package/registry/examples/copy-button/default.js +11 -0
  99. package/registry/examples/copy-button/default.tsx +7 -0
  100. package/registry/examples/copy-button/icon-only.d.ts +4 -0
  101. package/registry/examples/copy-button/icon-only.js +11 -0
  102. package/registry/examples/copy-button/icon-only.tsx +7 -0
  103. package/registry/examples/money-input/currencies.d.ts +4 -0
  104. package/registry/examples/money-input/currencies.js +18 -0
  105. package/registry/examples/money-input/currencies.tsx +16 -0
  106. package/registry/examples/money-input/default.d.ts +4 -0
  107. package/registry/examples/money-input/default.js +18 -0
  108. package/registry/examples/money-input/default.tsx +16 -0
  109. package/registry/examples/promo-code-field/applied.d.ts +4 -0
  110. package/registry/examples/promo-code-field/applied.js +11 -0
  111. package/registry/examples/promo-code-field/applied.tsx +7 -0
  112. package/registry/examples/promo-code-field/default.d.ts +4 -0
  113. package/registry/examples/promo-code-field/default.js +19 -0
  114. package/registry/examples/promo-code-field/default.tsx +14 -0
  115. package/registry/examples/promo-code-field/expired.d.ts +4 -0
  116. package/registry/examples/promo-code-field/expired.js +11 -0
  117. package/registry/examples/promo-code-field/expired.tsx +7 -0
  118. package/registry/examples/retro-tv/playlist-channel.d.ts +4 -0
  119. package/registry/examples/retro-tv/playlist-channel.js +15 -0
  120. package/registry/examples/retro-tv/playlist-channel.tsx +10 -0
  121. package/registry/examples/retro-tv/playlist-crossfade.d.ts +4 -0
  122. package/registry/examples/retro-tv/playlist-crossfade.js +15 -0
  123. package/registry/examples/retro-tv/playlist-crossfade.tsx +10 -0
  124. package/registry/examples/retro-tv/playlist-slide.d.ts +4 -0
  125. package/registry/examples/retro-tv/playlist-slide.js +15 -0
  126. package/registry/examples/retro-tv/playlist-slide.tsx +10 -0
  127. package/registry/field.json +1 -1
  128. package/registry/file-upload.json +1 -1
  129. package/registry/filter-bar.json +1 -1
  130. package/registry/flock.json +1 -1
  131. package/registry/footnote.json +1 -1
  132. package/registry/force-update-screen.json +1 -1
  133. package/registry/form.json +1 -1
  134. package/registry/gallery-page.json +1 -1
  135. package/registry/genui.json +1 -1
  136. package/registry/glossary-term.json +1 -1
  137. package/registry/glossary.json +1 -1
  138. package/registry/glow-card.json +1 -1
  139. package/registry/goal-gauge.json +1 -1
  140. package/registry/grade-stamp.json +1 -1
  141. package/registry/how-it-works-page.json +1 -1
  142. package/registry/image-cropper.json +1 -1
  143. package/registry/index.json +108 -9
  144. package/registry/iso.json +1 -1
  145. package/registry/kanban.json +1 -1
  146. package/registry/kbd.json +1 -1
  147. package/registry/kind-config-editor.json +1 -1
  148. package/registry/kpi-explained.json +1 -1
  149. package/registry/landing-page.json +1 -1
  150. package/registry/landscape.json +1 -1
  151. package/registry/language-switch.json +1 -1
  152. package/registry/legal-page.json +1 -1
  153. package/registry/link-card.json +1 -1
  154. package/registry/list.json +1 -1
  155. package/registry/loader.json +1 -1
  156. package/registry/longform-page.json +1 -1
  157. package/registry/maintenance-screen.json +1 -1
  158. package/registry/map.json +2 -2
  159. package/registry/margin-layout.json +1 -1
  160. package/registry/markdown.json +1 -1
  161. package/registry/marketing-layout.json +1 -1
  162. package/registry/marquee.json +1 -1
  163. package/registry/mascot-quote.json +1 -1
  164. package/registry/mascot-state.json +1 -1
  165. package/registry/mascots.json +1 -1
  166. package/registry/match-dialog.json +1 -1
  167. package/registry/media-capture.json +1 -1
  168. package/registry/media-gallery.json +1 -1
  169. package/registry/media-grid.json +1 -1
  170. package/registry/meta-row.json +1 -1
  171. package/registry/meter.json +1 -1
  172. package/registry/money-input.json +236 -0
  173. package/registry/nav-bar.json +22 -8
  174. package/registry/next-actions.json +1 -1
  175. package/registry/notification-preferences.json +1 -1
  176. package/registry/number-ticker.json +1 -1
  177. package/registry/opening-hours.json +1 -1
  178. package/registry/page-header.json +1 -1
  179. package/registry/page-hero.json +1 -1
  180. package/registry/page-index.json +1 -1
  181. package/registry/page.json +1 -1
  182. package/registry/pagination.json +1 -1
  183. package/registry/photo-grid.json +1 -1
  184. package/registry/pointer-light.json +1 -1
  185. package/registry/popover.json +1 -1
  186. package/registry/pricing-page.json +1 -1
  187. package/registry/product-page.json +1 -1
  188. package/registry/profile-card.json +1 -1
  189. package/registry/progress.json +1 -1
  190. package/registry/promise-card.json +1 -1
  191. package/registry/promo-code-field.json +258 -0
  192. package/registry/qr-code.json +1 -1
  193. package/registry/quota-meter.json +1 -1
  194. package/registry/radio-group.json +1 -1
  195. package/registry/rail-nav.json +2 -2
  196. package/registry/recipes.json +1 -1
  197. package/registry/retro-tv.json +120 -8
  198. package/registry/reviews.json +1 -1
  199. package/registry/router.json +1 -1
  200. package/registry/scroll-stage.json +1 -1
  201. package/registry/search-field.json +1 -1
  202. package/registry/section-backdrop.json +1 -1
  203. package/registry/separator.json +1 -1
  204. package/registry/service-card.json +1 -1
  205. package/registry/settings-layout.json +1 -1
  206. package/registry/shop-composer.json +1 -1
  207. package/registry/shop.json +2 -2
  208. package/registry/showcase.json +1 -1
  209. package/registry/signature.json +1 -1
  210. package/registry/site-cahier.json +1 -1
  211. package/registry/site-footer.json +2 -2
  212. package/registry/sites.json +1 -1
  213. package/registry/skeleton.json +1 -1
  214. package/registry/skip-link.json +1 -1
  215. package/registry/slider.json +1 -1
  216. package/registry/slot-picker.json +1 -1
  217. package/registry/slot.json +1 -1
  218. package/registry/specimen-tag.json +1 -1
  219. package/registry/speed-lines.json +1 -1
  220. package/registry/spinner.json +1 -1
  221. package/registry/split-view.json +1 -1
  222. package/registry/stage-banner.json +1 -1
  223. package/registry/stat.json +1 -1
  224. package/registry/status-chip.json +1 -1
  225. package/registry/status-page.json +1 -1
  226. package/registry/step-progress.json +1 -1
  227. package/registry/step-showcase.json +1 -1
  228. package/registry/stepper.json +1 -1
  229. package/registry/sticky-action.json +1 -1
  230. package/registry/stuck.json +1 -1
  231. package/registry/swipe-deck.json +1 -1
  232. package/registry/switch.json +1 -1
  233. package/registry/tabs.json +1 -1
  234. package/registry/tag-input.json +1 -1
  235. package/registry/tag-selector.json +1 -1
  236. package/registry/taped-photo.json +1 -1
  237. package/registry/terminal-replay.json +1 -1
  238. package/registry/text-style.json +1 -1
  239. package/registry/theme.json +1 -1
  240. package/registry/toast.json +1 -1
  241. package/registry/toc.json +1 -1
  242. package/registry/tooltip.json +1 -1
  243. package/registry/tree-view.json +1 -1
  244. package/registry/update-prompt.json +1 -1
  245. package/registry/upload-queue.json +1 -1
  246. package/registry/usage.json +1 -1
  247. package/registry/verified-badge.json +1 -1
  248. package/registry/versus-card.json +1 -1
  249. package/registry/vertical-video.json +1 -1
  250. package/registry/video-player.json +1 -1
  251. package/registry/video-trimmer.json +1 -1
  252. package/registry/virtual.json +1 -1
  253. package/registry/wall.json +1 -1
  254. package/registry/waveform.json +1 -1
@@ -331,7 +331,7 @@
331
331
  "files": [
332
332
  {
333
333
  "path": "meta.ts",
334
- "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
334
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
335
335
  },
336
336
  {
337
337
  "path": "meter/index.ts",
@@ -0,0 +1,236 @@
1
+ {
2
+ "name": "money-input",
3
+ "type": "primitive",
4
+ "title": "Money input",
5
+ "summary": "An amount in integer minor units (cents) and a currency, typed the way the locale writes it, never as a float.",
6
+ "description": "An amount in integer minor units (cents) and a currency, typed the way the locale writes it, never as a float.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "forms",
10
+ "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "The native twins of PromoCodeField, MoneyInput and CopyButton are a follow-up of the coupons surfaces.",
18
+ "issue": "krizaka/krizaka-ui#782"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
24
+ "whenToUse": [
25
+ "For a price, a discount or a budget the app stores as cents.",
26
+ "When the person may pick the currency among a short list."
27
+ ],
28
+ "whenNotToUse": [
29
+ {
30
+ "when": "For a plain number (a quantity).",
31
+ "use": "field"
32
+ }
33
+ ],
34
+ "bestPractices": [
35
+ "Hold the integer in your state; the field formats it by `locale` (`fr-CA` writes “12,50”).",
36
+ "Pair it with `Field.Label` and `Field.Error`.",
37
+ "A currency without decimals (JPY) accepts none; one with three (BHD) accepts three."
38
+ ],
39
+ "accessibility": {
40
+ "keyboard": [
41
+ {
42
+ "keys": "Type",
43
+ "action": "Digits and the locale's decimal mark; more decimals than the currency has are refused."
44
+ }
45
+ ],
46
+ "notes": [
47
+ "A text input with a decimal keypad on phones.",
48
+ "The currency select needs `currencyLabel` as its accessible name.",
49
+ "On blur the amount is rewritten grouped and padded (“1 299,00”)."
50
+ ]
51
+ },
52
+ "related": [
53
+ "field",
54
+ "combobox"
55
+ ],
56
+ "web": {
57
+ "entry": "@krizaka/ui/money-input",
58
+ "import": "import { MoneyInput, parseMinorUnits, formatMinorUnits } from \"@krizaka/ui/money-input\";",
59
+ "props": [
60
+ {
61
+ "component": "MoneyInput",
62
+ "description": "An amount field in minor units. The caller holds an integer; the person sees their locale's decimal.",
63
+ "props": [
64
+ {
65
+ "name": "currency",
66
+ "type": "string",
67
+ "default": null,
68
+ "description": "ISO 4217 code: `\"CAD\"`.",
69
+ "required": true
70
+ },
71
+ {
72
+ "name": "locale",
73
+ "type": "string",
74
+ "default": null,
75
+ "description": "BCP 47 locale for the separators: `\"fr-CA\"`, `\"en-CA\"`.",
76
+ "required": true
77
+ },
78
+ {
79
+ "name": "onValueChange",
80
+ "type": "(minorUnits: number | null) => void",
81
+ "default": null,
82
+ "description": "Called with the new amount in minor units, or `null` when the field is emptied.",
83
+ "required": true
84
+ },
85
+ {
86
+ "name": "value",
87
+ "type": "number | null",
88
+ "default": null,
89
+ "description": "The amount in minor units (cents), an integer, or `null` when empty.",
90
+ "required": true
91
+ },
92
+ {
93
+ "name": "currencies",
94
+ "type": "readonly string[]",
95
+ "default": null,
96
+ "description": "The currencies to choose among (ISO codes). Omitted: the currency is fixed.",
97
+ "required": false
98
+ },
99
+ {
100
+ "name": "currencyLabel",
101
+ "type": "string",
102
+ "default": null,
103
+ "description": "The currency select's accessible name, passed translated: \"Currency\".",
104
+ "required": false
105
+ },
106
+ {
107
+ "name": "invalid",
108
+ "type": "boolean",
109
+ "default": null,
110
+ "description": "Marks the amount invalid (pair it with a `Field.Error`).",
111
+ "required": false
112
+ },
113
+ {
114
+ "name": "onCurrencyChange",
115
+ "type": "((currency: string) => void)",
116
+ "default": null,
117
+ "description": "Called with the chosen currency (required with `currencies`).",
118
+ "required": false
119
+ }
120
+ ]
121
+ }
122
+ ],
123
+ "examples": [
124
+ {
125
+ "name": "default",
126
+ "title": "Fixed currency",
127
+ "description": "3900 cents in en-CA.",
128
+ "path": "examples/money-input/default.tsx",
129
+ "module": "@krizaka/ui/registry/examples/money-input/default",
130
+ "code": "\"use client\";\n\nimport { Field } from \"@krizaka/ui/field\";\nimport { MoneyInput } from \"@krizaka/ui/money-input\";\nimport { useState } from \"react\";\n\nexport default function MoneyInputDefault() {\n const [cents, setCents] = useState<number | null>(3900);\n return (\n <Field.Root>\n <Field.Label htmlFor=\"price\">Price</Field.Label>\n <MoneyInput id=\"price\" value={cents} onValueChange={setCents} currency=\"CAD\" locale=\"en-CA\" />\n <Field.Hint>{cents === null ? \"Empty\" : `${cents} cents`}</Field.Hint>\n </Field.Root>\n );\n}\n"
131
+ },
132
+ {
133
+ "name": "currencies",
134
+ "title": "Chosen currency",
135
+ "description": "fr-CA, four currencies; JPY drops the decimals.",
136
+ "path": "examples/money-input/currencies.tsx",
137
+ "module": "@krizaka/ui/registry/examples/money-input/currencies",
138
+ "code": "\"use client\";\n\nimport { Field } from \"@krizaka/ui/field\";\nimport { MoneyInput } from \"@krizaka/ui/money-input\";\nimport { useState } from \"react\";\n\nexport default function MoneyInputCurrencies() {\n const [cents, setCents] = useState<number | null>(129900);\n const [currency, setCurrency] = useState(\"CAD\");\n return (\n <Field.Root>\n <Field.Label htmlFor=\"amount\">Montant</Field.Label>\n <MoneyInput id=\"amount\" value={cents} onValueChange={setCents} currency={currency} onCurrencyChange={setCurrency} currencies={[\"CAD\", \"USD\", \"EUR\", \"JPY\"]} currencyLabel=\"Devise\" locale=\"fr-CA\" />\n </Field.Root>\n );\n}\n"
139
+ }
140
+ ]
141
+ },
142
+ "native": null,
143
+ "files": [
144
+ {
145
+ "path": "meta.ts",
146
+ "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
147
+ },
148
+ {
149
+ "path": "money-input/index.ts",
150
+ "content": "/** @krizaka/ui/money-input — `MoneyInput` (an amount in integer minor units and a currency), with its pure parse/format. Client (\"use client\"). */\nexport { formatMinorUnits, MoneyInput, type MoneyInputProps, parseMinorUnits } from \"./money-input\";\n"
151
+ },
152
+ {
153
+ "path": "money-input/meta.ts",
154
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Money input\",\n summary: \"An amount in integer minor units (cents) and a currency, typed the way the locale writes it, never as a float.\",\n status: \"beta\",\n category: \"forms\",\n platforms: \"web\",\n parity: { native: { status: \"gap\", issue: \"krizaka/krizaka-ui#782\", reason: \"The native twins of PromoCodeField, MoneyInput and CopyButton are a follow-up of the coupons surfaces.\" }, desktop: \"web\" },\n whenToUse: [\"For a price, a discount or a budget the app stores as cents.\", \"When the person may pick the currency among a short list.\"],\n whenNotToUse: [{ when: \"For a plain number (a quantity).\", use: \"field\" }],\n bestPractices: [\"Hold the integer in your state; the field formats it by `locale` (`fr-CA` writes “12,50”).\", \"Pair it with `Field.Label` and `Field.Error`.\", \"A currency without decimals (JPY) accepts none; one with three (BHD) accepts three.\"],\n accessibility: {\n keyboard: [{ keys: \"Type\", action: \"Digits and the locale's decimal mark; more decimals than the currency has are refused.\" }],\n notes: [\"A text input with a decimal keypad on phones.\", \"The currency select needs `currencyLabel` as its accessible name.\", \"On blur the amount is rewritten grouped and padded (“1 299,00”).\"],\n },\n related: [\"field\", \"combobox\"],\n web: {\n imports: [\"MoneyInput\", \"parseMinorUnits\", \"formatMinorUnits\"],\n examples: [\n { name: \"default\", title: \"Fixed currency\", description: \"3900 cents in en-CA.\" },\n { name: \"currencies\", title: \"Chosen currency\", description: \"fr-CA, four currencies; JPY drops the decimals.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
155
+ },
156
+ {
157
+ "path": "money-input/money-input.tsx",
158
+ "content": "// Client (the text being typed). An amount in INTEGER minor units (cents) plus a currency. The person types a\n// decimal in their locale's way; it is read as a string (never a float) into cents, refused beyond the currency's own\n// decimals, and written back grouped and padded on blur. The currency can be chosen among `currencies` (a native\n// select). Words arrive as props.\nimport { currencyDigits } from \"@krizaka/intl\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Input, Select } from \"../field/field\";\n\nexport type MoneyInputProps = Omit<React.ComponentProps<\"input\">, \"value\" | \"defaultValue\" | \"onChange\" | \"type\" | \"inputMode\"> & {\n /** The amount in minor units (cents), an integer, or `null` when empty. */\n value: number | null;\n /** Called with the new amount in minor units, or `null` when the field is emptied. */\n onValueChange: (minorUnits: number | null) => void;\n /** ISO 4217 code: `\"CAD\"`. */\n currency: string;\n /** BCP 47 locale for the separators: `\"fr-CA\"`, `\"en-CA\"`. */\n locale: string;\n /** The currencies to choose among (ISO codes). Omitted: the currency is fixed. */\n currencies?: readonly string[];\n /** Called with the chosen currency (required with `currencies`). */\n onCurrencyChange?: (currency: string) => void;\n /** The currency select's accessible name, passed translated: \"Currency\". */\n currencyLabel?: string;\n /** Marks the amount invalid (pair it with a `Field.Error`). */\n invalid?: boolean;\n};\n\nconst separators = (locale: string) => {\n const parts = new Intl.NumberFormat(locale, { useGrouping: true, minimumFractionDigits: 1 }).formatToParts(1234567.1);\n return { decimal: parts.find((p) => p.type === \"decimal\")?.value ?? \".\", group: parts.find((p) => p.type === \"group\")?.value ?? \",\" };\n};\n\n/** \"12,50\" → 1250 without a float; `undefined` when the text is not an amount or has too many decimals. */\nexport function parseMinorUnits(text: string, locale: string, digits: number): number | null | undefined {\n const { decimal } = separators(locale);\n const cleaned = text.replace(/\\s/g, \"\");\n if (cleaned === \"\") return null;\n // The locale's decimal mark, and \".\" or \",\" as a typed alternative; any other mark is a thousands separator.\n const marks = [...cleaned].filter((c) => c === \".\" || c === \",\" || c === decimal);\n if (!/^[\\d.,]+$/.test(cleaned.replaceAll(decimal, \"\"))) return undefined;\n const last = marks.length ? Math.max(cleaned.lastIndexOf(\".\"), cleaned.lastIndexOf(\",\"), cleaned.lastIndexOf(decimal)) : -1;\n const whole = (last >= 0 ? cleaned.slice(0, last) : cleaned).replace(/\\D/g, \"\");\n const fraction = last >= 0 ? cleaned.slice(last + 1) : \"\";\n if (!/^\\d*$/.test(fraction) || fraction.length > digits || (digits === 0 && last >= 0)) return undefined;\n const minor = Number(`${whole || \"0\"}${fraction.padEnd(digits, \"0\")}`);\n return Number.isSafeInteger(minor) ? minor : undefined;\n}\n\n/** Minor units → \"1 234,50\" in the locale, exact (BigInt), padded to the currency's decimals. */\nexport function formatMinorUnits(minor: number, locale: string, digits: number): string {\n const { decimal } = separators(locale);\n const abs = BigInt(Math.abs(minor)).toString().padStart(digits + 1, \"0\");\n const whole = new Intl.NumberFormat(locale).format(BigInt(digits ? abs.slice(0, -digits) : abs));\n return `${minor < 0 ? \"-\" : \"\"}${whole}${digits ? decimal + abs.slice(-digits) : \"\"}`;\n}\n\n/** An amount field in minor units. The caller holds an integer; the person sees their locale's decimal. */\nexport function MoneyInput({ value, onValueChange, currency, locale, currencies, onCurrencyChange, currencyLabel, invalid, className, onBlur, disabled, ...props }: MoneyInputProps) {\n const digits = currencyDigits(currency);\n const [text, setText] = React.useState(() => (value === null ? \"\" : formatMinorUnits(value, locale, digits)));\n const typed = React.useRef<number | null>(value);\n // Follow the caller when the value changes from outside (a reset, another currency's digits).\n React.useEffect(() => {\n if (typed.current !== value) setText(value === null ? \"\" : formatMinorUnits(value, locale, digits));\n typed.current = value;\n }, [value, locale, digits]);\n return (\n <span className={cn(\"flex w-full items-stretch gap-2\", className)}>\n <Input\n {...props}\n type=\"text\"\n inputMode={digits ? \"decimal\" : \"numeric\"}\n autoComplete=\"off\"\n disabled={disabled}\n invalid={invalid}\n data-currency={currency}\n value={text}\n onChange={(event) => {\n const parsed = parseMinorUnits(event.target.value, locale, digits);\n if (parsed === undefined) return; // refused: not an amount, or more decimals than the currency has\n setText(event.target.value);\n typed.current = parsed;\n onValueChange(parsed);\n }}\n onBlur={(event) => {\n onBlur?.(event);\n if (value !== null) setText(formatMinorUnits(value, locale, digits));\n }}\n />\n {currencies ? (\n <Select aria-label={currencyLabel} disabled={disabled} value={currency} onChange={(event) => onCurrencyChange?.(event.target.value)} className=\"w-28\">\n {currencies.map((code) => (\n <option key={code} value={code}>\n {code}\n </option>\n ))}\n </Select>\n ) : (\n <span className=\"flex items-center text-sm font-medium text-fg-secondary\">{currency}</span>\n )}\n </span>\n );\n}\n"
159
+ }
160
+ ],
161
+ "dependencies": [
162
+ "@krizaka/intl@^0.4.1"
163
+ ],
164
+ "registryDependencies": [
165
+ "cn",
166
+ "field"
167
+ ],
168
+ "demo": {
169
+ "path": "examples/money-input/default.tsx",
170
+ "content": "\"use client\";\n\nimport { Field } from \"@krizaka/ui/field\";\nimport { MoneyInput } from \"@krizaka/ui/money-input\";\nimport { useState } from \"react\";\n\nexport default function MoneyInputDefault() {\n const [cents, setCents] = useState<number | null>(3900);\n return (\n <Field.Root>\n <Field.Label htmlFor=\"price\">Price</Field.Label>\n <MoneyInput id=\"price\" value={cents} onValueChange={setCents} currency=\"CAD\" locale=\"en-CA\" />\n <Field.Hint>{cents === null ? \"Empty\" : `${cents} cents`}</Field.Hint>\n </Field.Root>\n );\n}\n"
171
+ },
172
+ "props": [
173
+ {
174
+ "component": "MoneyInput",
175
+ "description": "An amount field in minor units. The caller holds an integer; the person sees their locale's decimal.",
176
+ "props": [
177
+ {
178
+ "name": "currency",
179
+ "type": "string",
180
+ "default": null,
181
+ "description": "ISO 4217 code: `\"CAD\"`.",
182
+ "required": true
183
+ },
184
+ {
185
+ "name": "locale",
186
+ "type": "string",
187
+ "default": null,
188
+ "description": "BCP 47 locale for the separators: `\"fr-CA\"`, `\"en-CA\"`.",
189
+ "required": true
190
+ },
191
+ {
192
+ "name": "onValueChange",
193
+ "type": "(minorUnits: number | null) => void",
194
+ "default": null,
195
+ "description": "Called with the new amount in minor units, or `null` when the field is emptied.",
196
+ "required": true
197
+ },
198
+ {
199
+ "name": "value",
200
+ "type": "number | null",
201
+ "default": null,
202
+ "description": "The amount in minor units (cents), an integer, or `null` when empty.",
203
+ "required": true
204
+ },
205
+ {
206
+ "name": "currencies",
207
+ "type": "readonly string[]",
208
+ "default": null,
209
+ "description": "The currencies to choose among (ISO codes). Omitted: the currency is fixed.",
210
+ "required": false
211
+ },
212
+ {
213
+ "name": "currencyLabel",
214
+ "type": "string",
215
+ "default": null,
216
+ "description": "The currency select's accessible name, passed translated: \"Currency\".",
217
+ "required": false
218
+ },
219
+ {
220
+ "name": "invalid",
221
+ "type": "boolean",
222
+ "default": null,
223
+ "description": "Marks the amount invalid (pair it with a `Field.Error`).",
224
+ "required": false
225
+ },
226
+ {
227
+ "name": "onCurrencyChange",
228
+ "type": "((currency: string) => void)",
229
+ "default": null,
230
+ "description": "Called with the chosen currency (required with `currencies`).",
231
+ "required": false
232
+ }
233
+ ]
234
+ }
235
+ ]
236
+ }