@krizaka/ui 3.24.0 → 3.25.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 (214) hide show
  1. package/README.md +7 -0
  2. package/dist/account-menu.d.ts +163 -0
  3. package/dist/account-menu.js +211 -0
  4. package/dist/account-menu.js.map +1 -0
  5. package/dist/app-shell.js +4 -4
  6. package/dist/changelog-page.d.ts +13 -1
  7. package/dist/changelog-page.js +20 -0
  8. package/dist/changelog-page.js.map +1 -1
  9. package/dist/{chunk-CEJDH6SA.js → chunk-2PNLHZLT.js} +23 -3
  10. package/dist/chunk-2PNLHZLT.js.map +1 -0
  11. package/dist/chunk-C7LTF5CC.js +21 -0
  12. package/dist/chunk-C7LTF5CC.js.map +1 -0
  13. package/dist/{chunk-F7FVPPBB.js → chunk-LYOPPBMC.js} +2 -2
  14. package/dist/{chunk-AFY35UCB.js → chunk-P7GZR5CU.js} +3 -1
  15. package/dist/{chunk-AFY35UCB.js.map → chunk-P7GZR5CU.js.map} +1 -1
  16. package/dist/code-block.js +1 -1
  17. package/dist/cover-hero.d.ts +125 -0
  18. package/dist/cover-hero.js +82 -0
  19. package/dist/cover-hero.js.map +1 -0
  20. package/dist/data-table.js +2 -2
  21. package/dist/docs-nav.js +3 -16
  22. package/dist/docs-nav.js.map +1 -1
  23. package/dist/dropdown-menu.d.ts +12 -1
  24. package/dist/dropdown-menu.js +25 -2
  25. package/dist/dropdown-menu.js.map +1 -1
  26. package/dist/filter-bar.js +1 -1
  27. package/dist/genui.js +2 -2
  28. package/dist/media-gallery.d.ts +73 -0
  29. package/dist/media-gallery.js +42 -0
  30. package/dist/media-gallery.js.map +1 -0
  31. package/dist/opening-hours.d.ts +124 -0
  32. package/dist/opening-hours.js +48 -0
  33. package/dist/opening-hours.js.map +1 -0
  34. package/dist/rail-nav.js +1 -1
  35. package/dist/service-card.d.ts +168 -0
  36. package/dist/service-card.js +112 -0
  37. package/dist/service-card.js.map +1 -0
  38. package/dist/slot-picker.d.ts +119 -0
  39. package/dist/slot-picker.js +46 -0
  40. package/dist/slot-picker.js.map +1 -0
  41. package/dist/sticky-action.d.ts +12 -0
  42. package/dist/sticky-action.js +14 -0
  43. package/dist/sticky-action.js.map +1 -0
  44. package/package.json +106 -6
  45. package/registry/account-menu.json +280 -0
  46. package/registry/achievement.json +1 -1
  47. package/registry/action-bar.json +1 -1
  48. package/registry/activity-feed.json +3 -3
  49. package/registry/alert.json +1 -1
  50. package/registry/app-header.json +1 -1
  51. package/registry/app-shell.json +1 -1
  52. package/registry/argument-card.json +1 -1
  53. package/registry/audio-player.json +1 -1
  54. package/registry/auth-layout.json +1 -1
  55. package/registry/avatar.json +1 -1
  56. package/registry/badge.json +1 -1
  57. package/registry/button.json +1 -1
  58. package/registry/captcha.json +1 -1
  59. package/registry/card-grid.json +1 -1
  60. package/registry/card.json +3 -3
  61. package/registry/catalogue-page.json +1 -1
  62. package/registry/changelog-page.json +3 -3
  63. package/registry/chat.json +1 -1
  64. package/registry/checkbox.json +1 -1
  65. package/registry/chip-link.json +1 -1
  66. package/registry/chip.json +1 -1
  67. package/registry/choice-grid.json +1 -1
  68. package/registry/code-block.json +1 -1
  69. package/registry/combobox.json +1 -1
  70. package/registry/command.json +1 -1
  71. package/registry/comparison-table.json +1 -1
  72. package/registry/component-page.json +1 -1
  73. package/registry/confirm-button.json +1 -1
  74. package/registry/contact-page.json +1 -1
  75. package/registry/continue-prompt.json +1 -1
  76. package/registry/countdown.json +1 -1
  77. package/registry/cover-hero.json +246 -0
  78. package/registry/cta-panel.json +1 -1
  79. package/registry/dashboard-layout.json +1 -1
  80. package/registry/data-table.json +1 -1
  81. package/registry/date-picker.json +1 -1
  82. package/registry/decision-list.json +1 -1
  83. package/registry/description-list.json +1 -1
  84. package/registry/detail-layout.json +1 -1
  85. package/registry/dialog.json +1 -1
  86. package/registry/docs-article-page.json +1 -1
  87. package/registry/docs-hub-page.json +1 -1
  88. package/registry/docs-layout.json +1 -1
  89. package/registry/docs-nav.json +1 -1
  90. package/registry/document-viewer.json +1 -1
  91. package/registry/dropdown-menu.json +33 -3
  92. package/registry/empty-state.json +1 -1
  93. package/registry/error-page.json +1 -1
  94. package/registry/examples/account-menu/default.d.ts +4 -0
  95. package/registry/examples/account-menu/default.js +28 -0
  96. package/registry/examples/account-menu/default.tsx +22 -0
  97. package/registry/examples/cover-hero/plain.d.ts +4 -0
  98. package/registry/examples/cover-hero/plain.js +12 -0
  99. package/registry/examples/cover-hero/plain.tsx +7 -0
  100. package/registry/examples/cover-hero/shop.d.ts +4 -0
  101. package/registry/examples/cover-hero/shop.js +27 -0
  102. package/registry/examples/cover-hero/shop.tsx +20 -0
  103. package/registry/examples/media-gallery/shop.d.ts +4 -0
  104. package/registry/examples/media-gallery/shop.js +22 -0
  105. package/registry/examples/media-gallery/shop.tsx +18 -0
  106. package/registry/examples/opening-hours/week.d.ts +4 -0
  107. package/registry/examples/opening-hours/week.js +28 -0
  108. package/registry/examples/opening-hours/week.tsx +22 -0
  109. package/registry/examples/service-card/services.d.ts +4 -0
  110. package/registry/examples/service-card/services.js +15 -0
  111. package/registry/examples/service-card/services.tsx +12 -0
  112. package/registry/examples/slot-picker/times.d.ts +4 -0
  113. package/registry/examples/slot-picker/times.js +27 -0
  114. package/registry/examples/slot-picker/times.tsx +23 -0
  115. package/registry/examples/sticky-action/phone.d.ts +4 -0
  116. package/registry/examples/sticky-action/phone.js +15 -0
  117. package/registry/examples/sticky-action/phone.tsx +14 -0
  118. package/registry/field.json +1 -1
  119. package/registry/file-upload.json +1 -1
  120. package/registry/filter-bar.json +1 -1
  121. package/registry/force-update-screen.json +1 -1
  122. package/registry/form.json +3 -3
  123. package/registry/gallery-page.json +1 -1
  124. package/registry/genui.json +1 -1
  125. package/registry/glow-card.json +1 -1
  126. package/registry/goal-gauge.json +1 -1
  127. package/registry/how-it-works-page.json +1 -1
  128. package/registry/image-cropper.json +1 -1
  129. package/registry/index.json +226 -5
  130. package/registry/iso.json +1 -1
  131. package/registry/kanban.json +1 -1
  132. package/registry/kbd.json +1 -1
  133. package/registry/landing-page.json +1 -1
  134. package/registry/landscape.json +1 -1
  135. package/registry/legal-page.json +1 -1
  136. package/registry/link-card.json +3 -3
  137. package/registry/list.json +1 -1
  138. package/registry/loader.json +1 -1
  139. package/registry/longform-page.json +1 -1
  140. package/registry/maintenance-screen.json +1 -1
  141. package/registry/map.json +2 -2
  142. package/registry/markdown.json +1 -1
  143. package/registry/marketing-layout.json +1 -1
  144. package/registry/marquee.json +1 -1
  145. package/registry/mascot-quote.json +1 -1
  146. package/registry/mascot-state.json +1 -1
  147. package/registry/mascots.json +1 -1
  148. package/registry/match-dialog.json +1 -1
  149. package/registry/media-capture.json +3 -3
  150. package/registry/media-gallery.json +144 -0
  151. package/registry/media-grid.json +3 -3
  152. package/registry/meta-row.json +1 -1
  153. package/registry/meter.json +1 -1
  154. package/registry/nav-bar.json +2 -2
  155. package/registry/number-ticker.json +1 -1
  156. package/registry/opening-hours.json +178 -0
  157. package/registry/page-header.json +1 -1
  158. package/registry/page-hero.json +3 -3
  159. package/registry/page.json +7 -7
  160. package/registry/pagination.json +1 -1
  161. package/registry/photo-grid.json +1 -1
  162. package/registry/pointer-light.json +1 -1
  163. package/registry/popover.json +1 -1
  164. package/registry/pricing-page.json +1 -1
  165. package/registry/product-page.json +1 -1
  166. package/registry/profile-card.json +1 -1
  167. package/registry/progress.json +1 -1
  168. package/registry/promise-card.json +1 -1
  169. package/registry/radio-group.json +1 -1
  170. package/registry/rail-nav.json +2 -2
  171. package/registry/recipes.json +1 -1
  172. package/registry/scroll-stage.json +1 -1
  173. package/registry/search-field.json +1 -1
  174. package/registry/section-backdrop.json +1 -1
  175. package/registry/separator.json +1 -1
  176. package/registry/service-card.json +358 -0
  177. package/registry/settings-layout.json +1 -1
  178. package/registry/showcase.json +1 -1
  179. package/registry/site-footer.json +2 -2
  180. package/registry/sites.json +1 -1
  181. package/registry/skeleton.json +3 -3
  182. package/registry/skip-link.json +1 -1
  183. package/registry/slider.json +1 -1
  184. package/registry/slot-picker.json +222 -0
  185. package/registry/slot.json +1 -1
  186. package/registry/spinner.json +1 -1
  187. package/registry/split-view.json +1 -1
  188. package/registry/stage-banner.json +1 -1
  189. package/registry/stat.json +1 -1
  190. package/registry/status-page.json +1 -1
  191. package/registry/step-progress.json +1 -1
  192. package/registry/step-showcase.json +1 -1
  193. package/registry/stepper.json +1 -1
  194. package/registry/sticky-action.json +108 -0
  195. package/registry/swipe-deck.json +1 -1
  196. package/registry/switch.json +1 -1
  197. package/registry/tabs.json +1 -1
  198. package/registry/tag-input.json +1 -1
  199. package/registry/tag-selector.json +1 -1
  200. package/registry/terminal-replay.json +1 -1
  201. package/registry/theme.json +1 -1
  202. package/registry/toast.json +1 -1
  203. package/registry/toc.json +1 -1
  204. package/registry/tooltip.json +1 -1
  205. package/registry/tree-view.json +1 -1
  206. package/registry/update-prompt.json +1 -1
  207. package/registry/verified-badge.json +1 -1
  208. package/registry/vertical-video.json +5 -5
  209. package/registry/video-player.json +3 -3
  210. package/registry/video-trimmer.json +1 -1
  211. package/registry/virtual.json +1 -1
  212. package/registry/waveform.json +1 -1
  213. package/dist/chunk-CEJDH6SA.js.map +0 -1
  214. /package/dist/{chunk-F7FVPPBB.js.map → chunk-LYOPPBMC.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/ui",
3
- "version": "3.24.0",
3
+ "version": "3.25.0",
4
4
  "description": "The Krizaka front-end platform's components: the primitives (button, card, dialog, toast, menu, field, tabs, chip, switch, slider, command palette, theme, countdown…) on the semantic --kz-* tokens, the animated marks (Krizaka, Orazaka, Orochia, Yasakia, Yororis) and the motion signature — web and /native.",
5
5
  "keywords": [
6
6
  "krizaka",
@@ -373,6 +373,30 @@
373
373
  "types": "./dist/app-header.d.ts",
374
374
  "import": "./dist/app-header.js"
375
375
  },
376
+ "./opening-hours": {
377
+ "types": "./dist/opening-hours.d.ts",
378
+ "import": "./dist/opening-hours.js"
379
+ },
380
+ "./service-card": {
381
+ "types": "./dist/service-card.d.ts",
382
+ "import": "./dist/service-card.js"
383
+ },
384
+ "./slot-picker": {
385
+ "types": "./dist/slot-picker.d.ts",
386
+ "import": "./dist/slot-picker.js"
387
+ },
388
+ "./cover-hero": {
389
+ "types": "./dist/cover-hero.d.ts",
390
+ "import": "./dist/cover-hero.js"
391
+ },
392
+ "./media-gallery": {
393
+ "types": "./dist/media-gallery.d.ts",
394
+ "import": "./dist/media-gallery.js"
395
+ },
396
+ "./sticky-action": {
397
+ "types": "./dist/sticky-action.d.ts",
398
+ "import": "./dist/sticky-action.js"
399
+ },
376
400
  "./rail-nav": {
377
401
  "types": "./dist/rail-nav.d.ts",
378
402
  "import": "./dist/rail-nav.js"
@@ -445,6 +469,10 @@
445
469
  "types": "./dist/dashboard-layout.d.ts",
446
470
  "import": "./dist/dashboard-layout.js"
447
471
  },
472
+ "./account-menu": {
473
+ "types": "./dist/account-menu.d.ts",
474
+ "import": "./dist/account-menu.js"
475
+ },
448
476
  "./settings-layout": {
449
477
  "types": "./dist/settings-layout.d.ts",
450
478
  "import": "./dist/settings-layout.js"
@@ -677,7 +705,7 @@
677
705
  ],
678
706
  "peerDependencies": {
679
707
  "@krizaka/query": ">=0.2.1",
680
- "@krizaka/tailwind": ">=3.24.0",
708
+ "@krizaka/tailwind": ">=3.25.0",
681
709
  "@maplibre/maplibre-react-native": ">=11",
682
710
  "@shopify/flash-list": ">=2",
683
711
  "expo-camera": ">=16",
@@ -1346,7 +1374,7 @@
1346
1374
  "name": "./data-table: the toolbar (FilterBar on Radix DropdownMenu, SearchField, the columns menu, the export)",
1347
1375
  "path": "dist/data-table.js",
1348
1376
  "import": "{ DataTableFilters, DataTableColumnsMenu, DataTableExport }",
1349
- "limit": "41 kB",
1377
+ "limit": "42 kB",
1350
1378
  "gzip": true,
1351
1379
  "ignore": [
1352
1380
  "tailwind-variants",
@@ -1553,6 +1581,66 @@
1553
1581
  "clsx"
1554
1582
  ]
1555
1583
  },
1584
+ {
1585
+ "name": "./opening-hours",
1586
+ "path": "dist/opening-hours.js",
1587
+ "limit": "2 kB",
1588
+ "gzip": true,
1589
+ "ignore": [
1590
+ "tailwind-variants",
1591
+ "clsx"
1592
+ ]
1593
+ },
1594
+ {
1595
+ "name": "./service-card",
1596
+ "path": "dist/service-card.js",
1597
+ "limit": "2 kB",
1598
+ "gzip": true,
1599
+ "ignore": [
1600
+ "tailwind-variants",
1601
+ "clsx"
1602
+ ]
1603
+ },
1604
+ {
1605
+ "name": "./slot-picker",
1606
+ "path": "dist/slot-picker.js",
1607
+ "limit": "2 kB",
1608
+ "gzip": true,
1609
+ "ignore": [
1610
+ "tailwind-variants",
1611
+ "clsx"
1612
+ ]
1613
+ },
1614
+ {
1615
+ "name": "./cover-hero",
1616
+ "path": "dist/cover-hero.js",
1617
+ "limit": "2 kB",
1618
+ "gzip": true,
1619
+ "ignore": [
1620
+ "tailwind-variants",
1621
+ "clsx"
1622
+ ]
1623
+ },
1624
+ {
1625
+ "name": "./media-gallery",
1626
+ "path": "dist/media-gallery.js",
1627
+ "limit": "2 kB",
1628
+ "gzip": true,
1629
+ "ignore": [
1630
+ "tailwind-variants",
1631
+ "clsx"
1632
+ ]
1633
+ },
1634
+ {
1635
+ "name": "./sticky-action",
1636
+ "path": "dist/sticky-action.js",
1637
+ "limit": "1 kB",
1638
+ "gzip": true,
1639
+ "ignore": [
1640
+ "tailwind-variants",
1641
+ "clsx"
1642
+ ]
1643
+ },
1556
1644
  {
1557
1645
  "name": "./rail-nav",
1558
1646
  "path": "dist/rail-nav.js",
@@ -1809,6 +1897,18 @@
1809
1897
  "clsx"
1810
1898
  ]
1811
1899
  },
1900
+ {
1901
+ "name": "./account-menu",
1902
+ "path": "dist/account-menu.js",
1903
+ "limit": "3 kB",
1904
+ "gzip": true,
1905
+ "ignore": [
1906
+ "tailwind-variants",
1907
+ "clsx",
1908
+ "radix-ui",
1909
+ "react"
1910
+ ]
1911
+ },
1812
1912
  {
1813
1913
  "name": "./settings-layout",
1814
1914
  "path": "dist/settings-layout.js",
@@ -2071,7 +2171,7 @@
2071
2171
  {
2072
2172
  "name": "./changelog-page",
2073
2173
  "path": "dist/changelog-page.js",
2074
- "limit": "2.4 kB",
2174
+ "limit": "2.7 kB",
2075
2175
  "gzip": true,
2076
2176
  "ignore": [
2077
2177
  "tailwind-variants",
@@ -2313,8 +2413,8 @@
2313
2413
  "sonner": "^2.0.8",
2314
2414
  "tailwind-variants": "^3.3.1",
2315
2415
  "@krizaka/intl": "^0.2.1",
2316
- "@krizaka/pacer": "^0.1.0",
2317
- "@krizaka/tokens": "^3.24.0"
2416
+ "@krizaka/tokens": "^3.25.0",
2417
+ "@krizaka/pacer": "^0.1.0"
2318
2418
  },
2319
2419
  "scripts": {
2320
2420
  "build": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});for(const f of fs.readdirSync('registry/examples',{recursive:true}))if(/\\.(js|d\\.ts)$/.test(f))fs.rmSync('registry/examples/'+f)\" && tsup && node -e \"require('node:fs').copyFileSync('src/motion.css','dist/motion.css');require('node:fs').copyFileSync('src/blocks.css','dist/blocks.css');require('node:fs').copyFileSync('src/story.css','dist/story.css')\" && node scripts/build-registry.mjs",
@@ -0,0 +1,280 @@
1
+ {
2
+ "name": "account-menu",
3
+ "type": "primitive",
4
+ "title": "Account menu",
5
+ "summary": "The menu under a signed-in person's avatar: who they are, their profile and settings, the language as a compact submenu, Sign out.",
6
+ "description": "The menu under a signed-in person's avatar: who they are, their profile and settings, the language as a compact submenu, Sign out.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "navigation",
10
+ "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "n/a",
17
+ "reason": "On a phone the account is a screen of the tab bar, not a menu.",
18
+ "use": "settings-layout"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
24
+ "whenToUse": [
25
+ "The top bar of a signed-in web app, at the right.",
26
+ "Any app that offers profile, settings, language and Sign out in one place."
27
+ ],
28
+ "whenNotToUse": [
29
+ {
30
+ "when": "For the actions of an item (edit, share, delete).",
31
+ "use": "dropdown-menu"
32
+ },
33
+ {
34
+ "when": "For the navigation between the app's sections.",
35
+ "use": "nav-bar"
36
+ }
37
+ ],
38
+ "bestPractices": [
39
+ "Identity first (picture, name, e-mail), then places, then preferences, then Sign out last.",
40
+ "Use the product's `defaultAvatar` (`{ brand, seed }`) when there is no photo; never a grey silhouette or an initials tile.",
41
+ "Sign out is a quiet item: it is not a destructive action, so it is not red."
42
+ ],
43
+ "accessibility": {
44
+ "keyboard": [
45
+ {
46
+ "keys": "Enter / Space / Arrow down",
47
+ "action": "Opens the menu from the avatar."
48
+ },
49
+ {
50
+ "keys": "Arrow right / Enter on Language",
51
+ "action": "Opens the language choices; Arrow left or Esc goes back."
52
+ },
53
+ {
54
+ "keys": "Esc",
55
+ "action": "Closes the menu and returns the focus to the avatar."
56
+ }
57
+ ],
58
+ "notes": [
59
+ "The trigger is named by `label`; the menu is a Radix menu (roving focus, typeahead)."
60
+ ]
61
+ },
62
+ "related": [
63
+ "dropdown-menu",
64
+ "avatar",
65
+ "nav-bar"
66
+ ],
67
+ "web": {
68
+ "entry": "@krizaka/ui/account-menu",
69
+ "import": "import { AccountMenu } from \"@krizaka/ui/account-menu\";",
70
+ "props": [
71
+ {
72
+ "component": "AccountMenu",
73
+ "description": "The account menu: avatar trigger → identity header, links, language submenu, Sign out.",
74
+ "props": [
75
+ {
76
+ "name": "label",
77
+ "type": "string",
78
+ "default": null,
79
+ "description": "The trigger's accessible name (`Account`).",
80
+ "required": true
81
+ },
82
+ {
83
+ "name": "signOut",
84
+ "type": "{ label: string; onSelect: () => void; icon?: ReactNode; }",
85
+ "default": null,
86
+ "description": "The last row: its words, what it does, an optional icon.",
87
+ "required": true
88
+ },
89
+ {
90
+ "name": "avatar",
91
+ "type": "Omit<AvatarProps, \"size\">",
92
+ "default": null,
93
+ "description": "The picture: `src`, or `defaultAvatar` (`{ brand, seed }`) for the product's default person.",
94
+ "required": false
95
+ },
96
+ {
97
+ "name": "children",
98
+ "type": "ReactNode",
99
+ "default": null,
100
+ "description": "Extra rows between the language and Sign out (a theme switch…).",
101
+ "required": false
102
+ },
103
+ {
104
+ "name": "className",
105
+ "type": "string",
106
+ "default": null,
107
+ "description": "Classes for the trigger.",
108
+ "required": false
109
+ },
110
+ {
111
+ "name": "email",
112
+ "type": "string",
113
+ "default": null,
114
+ "description": "Their e-mail, shown under the name.",
115
+ "required": false
116
+ },
117
+ {
118
+ "name": "language",
119
+ "type": "AccountMenuLanguage",
120
+ "default": null,
121
+ "description": "The language, as a submenu that shows the current one.",
122
+ "required": false
123
+ },
124
+ {
125
+ "name": "linkAs",
126
+ "type": "ElementType<any, keyof IntrinsicElements>",
127
+ "default": "a",
128
+ "description": "The app's link component (Next's `Link`); an `<a>` otherwise.",
129
+ "required": false
130
+ },
131
+ {
132
+ "name": "links",
133
+ "type": "readonly AccountMenuLink[]",
134
+ "default": "[]",
135
+ "description": "Where to go: profile, settings…",
136
+ "required": false
137
+ },
138
+ {
139
+ "name": "name",
140
+ "type": "string",
141
+ "default": null,
142
+ "description": "Their name; falls back to the e-mail.",
143
+ "required": false
144
+ },
145
+ {
146
+ "name": "showName",
147
+ "type": "boolean",
148
+ "default": "true",
149
+ "description": "Show the name beside the avatar in the trigger from the `sm` breakpoint.",
150
+ "required": false
151
+ }
152
+ ]
153
+ }
154
+ ],
155
+ "examples": [
156
+ {
157
+ "name": "default",
158
+ "title": "Account menu",
159
+ "description": "Identity, profile and settings links, a language submenu and Sign out.",
160
+ "path": "examples/account-menu/default.tsx",
161
+ "module": "@krizaka/ui/registry/examples/account-menu/default",
162
+ "code": "\"use client\";\n\nimport { AccountMenu } from \"@krizaka/ui/account-menu\";\nimport { useState } from \"react\";\n\nexport default function AccountMenuDefault() {\n const [language, setLanguage] = useState(\"en\");\n return (\n <AccountMenu\n label=\"Account\"\n name=\"Eric Tremblay\"\n email=\"eric@orazaka.io\"\n avatar={{ defaultAvatar: { brand: \"orazaka\", seed: \"eric\" } }}\n links={[\n { id: \"profile\", label: \"Profile\", href: \"#profile\" },\n { id: \"settings\", label: \"Settings\", href: \"#settings\" },\n ]}\n language={{ label: \"Language\", value: language, options: [{ value: \"en\", label: \"English\" }, { value: \"fr\", label: \"Français\" }], onChange: setLanguage }}\n signOut={{ label: \"Sign out\", onSelect: () => {} }}\n />\n );\n}\n"
163
+ }
164
+ ]
165
+ },
166
+ "native": null,
167
+ "files": [
168
+ {
169
+ "path": "account-menu/account-menu.tsx",
170
+ "content": "// Client (a portal). The signed-in person's menu under their avatar — who you are first (picture, name, e-mail), then\n// the places (profile, settings), the language as a compact submenu, the extras, and Sign out (a quiet item, not a\n// red alert). Built on DropdownMenu, so the keyboard, the focus return and the collisions are Radix's.\nimport * as React from \"react\";\n\nimport { Avatar, type AvatarProps } from \"../avatar/avatar\";\nimport { cn } from \"../cn\";\nimport { DropdownMenu } from \"../dropdown-menu/dropdown-menu\";\n\nexport interface AccountMenuLink {\n id: string;\n label: string;\n href: string;\n /** A signature icon. */\n icon?: React.ReactNode;\n}\n\nexport interface AccountMenuLanguage {\n /** The row's words (`Language`). */\n label: string;\n /** The current value (`en`). */\n value: string;\n options: readonly { value: string; label: string }[];\n onChange: (value: string) => void;\n}\n\nexport interface AccountMenuProps {\n /** The trigger's accessible name (`Account`). */\n label: string;\n /** Their name; falls back to the e-mail. */\n name?: string;\n /** Their e-mail, shown under the name. */\n email?: string;\n /** The picture: `src`, or `defaultAvatar` (`{ brand, seed }`) for the product's default person. */\n avatar?: Omit<AvatarProps, \"size\">;\n /** Show the name beside the avatar in the trigger from the `sm` breakpoint. */\n showName?: boolean;\n /** Where to go: profile, settings… */\n links?: readonly AccountMenuLink[];\n /** The app's link component (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The language, as a submenu that shows the current one. */\n language?: AccountMenuLanguage;\n /** Extra rows between the language and Sign out (a theme switch…). */\n children?: React.ReactNode;\n /** The last row: its words, what it does, an optional icon. */\n signOut: { label: string; onSelect: () => void; icon?: React.ReactNode };\n /** Classes for the trigger. */\n className?: string;\n}\n\n/** The account menu: avatar trigger → identity header, links, language submenu, Sign out. */\nexport function AccountMenu({ label, name, email, avatar, showName = true, links = [], linkAs: Link = \"a\", language, children, signOut, className }: AccountMenuProps) {\n const title = name || email || \"\";\n const current = language?.options.find((o) => o.value === language.value)?.label;\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger\n aria-label={label}\n className={cn(\"flex items-center gap-2.5 rounded-lg p-1 transition-colors duration-150 hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\", className)}\n >\n <Avatar size=\"sm\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n {/* Drawn by CSS: the name is not text of the button, so its accessible name stays `label` with no label-content-name-mismatch. */}\n {showName && title && <span aria-hidden data-name={title} className=\"hidden max-w-40 truncate text-sm font-medium text-fg-secondary after:content-[attr(data-name)] sm:inline-block\" />}\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\" className=\"w-64\">\n <DropdownMenu.Label className=\"flex items-center gap-3 py-2 normal-case tracking-normal\">\n <Avatar size=\"md\" fallback={title.charAt(0).toUpperCase() || \"?\"} {...avatar} />\n <span className=\"min-w-0\">\n <span className=\"block truncate text-sm font-semibold text-fg\">{title}</span>\n {name && email && <span className=\"block truncate text-xs font-normal text-fg-secondary\">{email}</span>}\n </span>\n </DropdownMenu.Label>\n {links.length > 0 && <DropdownMenu.Separator />}\n {links.map((link) => (\n <DropdownMenu.Item key={link.id} asChild>\n <Link href={link.href}>\n {link.icon}\n {link.label}\n </Link>\n </DropdownMenu.Item>\n ))}\n {(language || children) && <DropdownMenu.Separator />}\n {language && (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger>\n {language.label}\n {current && <span className=\"ml-auto mr-1 text-xs text-fg-secondary\">{current}</span>}\n </DropdownMenu.SubTrigger>\n <DropdownMenu.SubContent>\n <DropdownMenu.RadioGroup value={language.value} onValueChange={language.onChange}>\n {language.options.map((o) => (\n <DropdownMenu.RadioItem key={o.value} value={o.value}>\n {o.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n )}\n {children}\n <DropdownMenu.Separator />\n <DropdownMenu.Item onSelect={() => signOut.onSelect()}>\n {signOut.icon}\n {signOut.label}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n"
171
+ },
172
+ {
173
+ "path": "account-menu/index.ts",
174
+ "content": "/** @krizaka/ui/account-menu — `AccountMenu`: the avatar menu of a signed-in app (identity, links, language submenu, Sign out). Client (\"use client\"). */\nexport { AccountMenu, type AccountMenuLanguage, type AccountMenuLink, type AccountMenuProps } from \"./account-menu\";\n"
175
+ },
176
+ {
177
+ "path": "account-menu/meta.ts",
178
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Account menu\",\n summary: \"The menu under a signed-in person's avatar: who they are, their profile and settings, the language as a compact submenu, Sign out.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"On a phone the account is a screen of the tab bar, not a menu.\", use: \"settings-layout\" }, desktop: \"web\" },\n whenToUse: [\"The top bar of a signed-in web app, at the right.\", \"Any app that offers profile, settings, language and Sign out in one place.\"],\n whenNotToUse: [\n { when: \"For the actions of an item (edit, share, delete).\", use: \"dropdown-menu\" },\n { when: \"For the navigation between the app's sections.\", use: \"nav-bar\" },\n ],\n bestPractices: [\n \"Identity first (picture, name, e-mail), then places, then preferences, then Sign out last.\",\n \"Use the product's `defaultAvatar` (`{ brand, seed }`) when there is no photo; never a grey silhouette or an initials tile.\",\n \"Sign out is a quiet item: it is not a destructive action, so it is not red.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Enter / Space / Arrow down\", action: \"Opens the menu from the avatar.\" },\n { keys: \"Arrow right / Enter on Language\", action: \"Opens the language choices; Arrow left or Esc goes back.\" },\n { keys: \"Esc\", action: \"Closes the menu and returns the focus to the avatar.\" },\n ],\n notes: [\"The trigger is named by `label`; the menu is a Radix menu (roving focus, typeahead).\"],\n },\n related: [\"dropdown-menu\", \"avatar\", \"nav-bar\"],\n web: {\n imports: [\"AccountMenu\"],\n examples: [{ name: \"default\", title: \"Account menu\", description: \"Identity, profile and settings links, a language submenu and Sign out.\" }],\n },\n} satisfies ComponentMeta;\n"
179
+ },
180
+ {
181
+ "path": "meta.ts",
182
+ "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\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 | \"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 | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\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 | \"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 | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\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 | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\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 | \"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\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}\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"
183
+ }
184
+ ],
185
+ "dependencies": [],
186
+ "registryDependencies": [
187
+ "avatar",
188
+ "cn",
189
+ "dropdown-menu"
190
+ ],
191
+ "demo": {
192
+ "path": "examples/account-menu/default.tsx",
193
+ "content": "\"use client\";\n\nimport { AccountMenu } from \"@krizaka/ui/account-menu\";\nimport { useState } from \"react\";\n\nexport default function AccountMenuDefault() {\n const [language, setLanguage] = useState(\"en\");\n return (\n <AccountMenu\n label=\"Account\"\n name=\"Eric Tremblay\"\n email=\"eric@orazaka.io\"\n avatar={{ defaultAvatar: { brand: \"orazaka\", seed: \"eric\" } }}\n links={[\n { id: \"profile\", label: \"Profile\", href: \"#profile\" },\n { id: \"settings\", label: \"Settings\", href: \"#settings\" },\n ]}\n language={{ label: \"Language\", value: language, options: [{ value: \"en\", label: \"English\" }, { value: \"fr\", label: \"Français\" }], onChange: setLanguage }}\n signOut={{ label: \"Sign out\", onSelect: () => {} }}\n />\n );\n}\n"
194
+ },
195
+ "props": [
196
+ {
197
+ "component": "AccountMenu",
198
+ "description": "The account menu: avatar trigger → identity header, links, language submenu, Sign out.",
199
+ "props": [
200
+ {
201
+ "name": "label",
202
+ "type": "string",
203
+ "default": null,
204
+ "description": "The trigger's accessible name (`Account`).",
205
+ "required": true
206
+ },
207
+ {
208
+ "name": "signOut",
209
+ "type": "{ label: string; onSelect: () => void; icon?: ReactNode; }",
210
+ "default": null,
211
+ "description": "The last row: its words, what it does, an optional icon.",
212
+ "required": true
213
+ },
214
+ {
215
+ "name": "avatar",
216
+ "type": "Omit<AvatarProps, \"size\">",
217
+ "default": null,
218
+ "description": "The picture: `src`, or `defaultAvatar` (`{ brand, seed }`) for the product's default person.",
219
+ "required": false
220
+ },
221
+ {
222
+ "name": "children",
223
+ "type": "ReactNode",
224
+ "default": null,
225
+ "description": "Extra rows between the language and Sign out (a theme switch…).",
226
+ "required": false
227
+ },
228
+ {
229
+ "name": "className",
230
+ "type": "string",
231
+ "default": null,
232
+ "description": "Classes for the trigger.",
233
+ "required": false
234
+ },
235
+ {
236
+ "name": "email",
237
+ "type": "string",
238
+ "default": null,
239
+ "description": "Their e-mail, shown under the name.",
240
+ "required": false
241
+ },
242
+ {
243
+ "name": "language",
244
+ "type": "AccountMenuLanguage",
245
+ "default": null,
246
+ "description": "The language, as a submenu that shows the current one.",
247
+ "required": false
248
+ },
249
+ {
250
+ "name": "linkAs",
251
+ "type": "ElementType<any, keyof IntrinsicElements>",
252
+ "default": "a",
253
+ "description": "The app's link component (Next's `Link`); an `<a>` otherwise.",
254
+ "required": false
255
+ },
256
+ {
257
+ "name": "links",
258
+ "type": "readonly AccountMenuLink[]",
259
+ "default": "[]",
260
+ "description": "Where to go: profile, settings…",
261
+ "required": false
262
+ },
263
+ {
264
+ "name": "name",
265
+ "type": "string",
266
+ "default": null,
267
+ "description": "Their name; falls back to the e-mail.",
268
+ "required": false
269
+ },
270
+ {
271
+ "name": "showName",
272
+ "type": "boolean",
273
+ "default": "true",
274
+ "description": "Show the name beside the avatar in the trigger from the `sm` breakpoint.",
275
+ "required": false
276
+ }
277
+ ]
278
+ }
279
+ ]
280
+ }
@@ -208,7 +208,7 @@
208
208
  },
209
209
  {
210
210
  "path": "meta.ts",
211
- "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\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 | \"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 | \"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 | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\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 | \"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 | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\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\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}\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"
211
+ "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\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 | \"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 | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\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 | \"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 | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\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 | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\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 | \"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\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}\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"
212
212
  },
213
213
  {
214
214
  "path": "story-variant.ts",