@cueplusplus/ui 0.1.0 → 0.3.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 (246) hide show
  1. package/CHANGELOG.md +705 -0
  2. package/dist/brand/_chassis.d.ts +54 -0
  3. package/dist/brand/_chassis.js +81 -0
  4. package/dist/brand/_geometry.js +41 -0
  5. package/dist/brand/cue-logotype.d.ts +29 -0
  6. package/dist/brand/cue-logotype.js +60 -0
  7. package/dist/brand/cue-mark.d.ts +30 -0
  8. package/dist/brand/cue-mark.js +61 -0
  9. package/dist/brand/index.d.ts +5 -0
  10. package/dist/brand/plussie.d.ts +67 -0
  11. package/dist/brand/plussie.js +125 -0
  12. package/dist/chat/agent-pile.js +1 -1
  13. package/dist/chat/ask-box.js +2 -2
  14. package/dist/chat/delegation-card.js +1 -1
  15. package/dist/chat/message.js +2 -2
  16. package/dist/chrome/_edge-scroller.d.ts +45 -0
  17. package/dist/chrome/_edge-scroller.js +149 -0
  18. package/dist/chrome/_glyphs.js +19 -1
  19. package/dist/chrome/_tabs-scroll.d.ts +13 -8
  20. package/dist/chrome/_tabs-scroll.js +13 -8
  21. package/dist/chrome/app-bar.d.ts +103 -0
  22. package/dist/chrome/app-bar.js +175 -0
  23. package/dist/chrome/app-shell.d.ts +125 -0
  24. package/dist/chrome/app-shell.js +167 -0
  25. package/dist/chrome/footer.d.ts +75 -0
  26. package/dist/chrome/footer.js +68 -0
  27. package/dist/chrome/index.d.ts +5 -1
  28. package/dist/chrome/index.js +4 -1
  29. package/dist/chrome/navigation-menu.js +1 -1
  30. package/dist/chrome/page-shell.d.ts +1 -1
  31. package/dist/chrome/page-shell.js +15 -5
  32. package/dist/chrome/segmented-control.d.ts +19 -0
  33. package/dist/chrome/segmented-control.js +40 -21
  34. package/dist/chrome/tabs.js +21 -65
  35. package/dist/chrome/toolbar.d.ts +22 -0
  36. package/dist/chrome/toolbar.js +26 -5
  37. package/dist/configurator/_overrides.js +22 -8
  38. package/dist/configurator/configurator.js +1 -1
  39. package/dist/configurator/panel-sections.js +10 -4
  40. package/dist/dmx/channel-matrix.js +1 -1
  41. package/dist/forms/otp-field.js +1 -1
  42. package/dist/index.d.ts +18 -9
  43. package/dist/index.js +16 -10
  44. package/dist/instruments/data-table.js +1 -1
  45. package/dist/instruments/index.d.ts +2 -2
  46. package/dist/instruments/index.js +2 -2
  47. package/dist/instruments/table.d.ts +14 -1
  48. package/dist/instruments/table.js +20 -1
  49. package/dist/layout/carousel.js +1 -1
  50. package/dist/layout/container.d.ts +1 -1
  51. package/dist/layout/container.js +6 -3
  52. package/dist/layout/index.d.ts +3 -3
  53. package/dist/layout/index.js +3 -3
  54. package/dist/layout/pagination.js +1 -1
  55. package/dist/layout/sidebar.d.ts +23 -3
  56. package/dist/layout/sidebar.js +18 -7
  57. package/dist/midi/spectrum-visualizer.js +1 -1
  58. package/dist/midi/timeline-ruler.js +1 -1
  59. package/dist/overlays/command-palette.js +1 -1
  60. package/dist/overlays/dialog.js +1 -1
  61. package/dist/overlays/dropdown-menu.js +2 -2
  62. package/dist/overlays/hover-card.js +1 -1
  63. package/dist/overlays/index.js +1 -1
  64. package/dist/overlays/popover.js +1 -1
  65. package/dist/overlays/sheet.js +1 -1
  66. package/dist/overlays/toast.js +1 -1
  67. package/dist/primitives/chip.d.ts +1 -1
  68. package/dist/primitives/index.d.ts +1 -1
  69. package/dist/primitives/index.js +1 -1
  70. package/dist/primitives/status-dot.d.ts +7 -0
  71. package/dist/primitives/status-dot.js +8 -1
  72. package/dist/styles.css +58 -2
  73. package/dist/system/density.d.ts +4 -1
  74. package/dist/system/density.js +12 -4
  75. package/dist/system/index.d.ts +4 -4
  76. package/dist/system/portal.d.ts +5 -5
  77. package/dist/system/portal.js +30 -11
  78. package/dist/system/prepaint.d.ts +34 -9
  79. package/dist/system/prepaint.js +48 -25
  80. package/dist/system/theme-provider.d.ts +48 -11
  81. package/dist/system/theme-provider.js +109 -35
  82. package/dist/system/use-density.d.ts +3 -3
  83. package/dist/system/use-density.js +16 -6
  84. package/dist/system/use-theme.d.ts +4 -2
  85. package/dist/system/use-theme.js +4 -2
  86. package/dist/theming/_presets.js +133 -5
  87. package/dist/theming/create-theme.d.ts +2 -2
  88. package/dist/theming/create-theme.js +37 -19
  89. package/dist/theming/serialize.d.ts +1 -1
  90. package/dist/theming/serialize.js +25 -1
  91. package/manifest/components/accordion.json +154 -0
  92. package/manifest/components/agent-pile.json +116 -0
  93. package/manifest/components/alert-dialog.json +190 -0
  94. package/manifest/components/app-bar.json +244 -0
  95. package/manifest/components/app-shell.json +291 -0
  96. package/manifest/components/app-window-frame.json +102 -0
  97. package/manifest/components/ask-box.json +209 -0
  98. package/manifest/components/autocomplete.json +197 -0
  99. package/manifest/components/avatar-group.json +72 -0
  100. package/manifest/components/avatar.json +95 -0
  101. package/manifest/components/breadcrumb.json +74 -0
  102. package/manifest/components/button-group.json +74 -0
  103. package/manifest/components/button.json +125 -0
  104. package/manifest/components/calendar.json +65 -0
  105. package/manifest/components/card.json +140 -0
  106. package/manifest/components/carousel.json +200 -0
  107. package/manifest/components/channel-matrix.json +173 -0
  108. package/manifest/components/chart-container.json +111 -0
  109. package/manifest/components/chart-ramp.json +72 -0
  110. package/manifest/components/chart-swatch.json +65 -0
  111. package/manifest/components/chart-tooltip-content.json +114 -0
  112. package/manifest/components/checkbox-group.json +68 -0
  113. package/manifest/components/checkbox.json +93 -0
  114. package/manifest/components/chip.json +132 -0
  115. package/manifest/components/collapsible.json +120 -0
  116. package/manifest/components/color-area.json +59 -0
  117. package/manifest/components/color-field.json +79 -0
  118. package/manifest/components/color-picker.json +175 -0
  119. package/manifest/components/color-slider.json +75 -0
  120. package/manifest/components/color-swatch.json +68 -0
  121. package/manifest/components/colors-section.json +66 -0
  122. package/manifest/components/combobox.json +198 -0
  123. package/manifest/components/command-palette.json +177 -0
  124. package/manifest/components/composer.json +176 -0
  125. package/manifest/components/container.json +60 -0
  126. package/manifest/components/context-menu.json +121 -0
  127. package/manifest/components/copy-button.json +93 -0
  128. package/manifest/components/cue-logotype.json +96 -0
  129. package/manifest/components/cue-mark.json +97 -0
  130. package/manifest/components/cue-portal-frame.json +55 -0
  131. package/manifest/components/data-table-pagination.json +83 -0
  132. package/manifest/components/data-table-toolbar.json +104 -0
  133. package/manifest/components/date-field.json +80 -0
  134. package/manifest/components/date-picker.json +191 -0
  135. package/manifest/components/date-range-picker.json +191 -0
  136. package/manifest/components/delegation-card.json +144 -0
  137. package/manifest/components/density.json +58 -0
  138. package/manifest/components/description-list.json +84 -0
  139. package/manifest/components/dialog.json +198 -0
  140. package/manifest/components/disclosure.json +109 -0
  141. package/manifest/components/dmx-bar.json +94 -0
  142. package/manifest/components/dmx-strip.json +101 -0
  143. package/manifest/components/drawer.json +179 -0
  144. package/manifest/components/dropdown-menu.json +229 -0
  145. package/manifest/components/empty-state.json +90 -0
  146. package/manifest/components/env-var-input.json +150 -0
  147. package/manifest/components/export-dialog.json +84 -0
  148. package/manifest/components/eyebrow.json +56 -0
  149. package/manifest/components/field-description.json +63 -0
  150. package/manifest/components/field-error.json +77 -0
  151. package/manifest/components/field-label.json +63 -0
  152. package/manifest/components/field.json +79 -0
  153. package/manifest/components/file-upload.json +159 -0
  154. package/manifest/components/flow-background.json +50 -0
  155. package/manifest/components/flow-controls.json +50 -0
  156. package/manifest/components/footer.json +112 -0
  157. package/manifest/components/grid.json +81 -0
  158. package/manifest/components/group-bar.json +102 -0
  159. package/manifest/components/hover-card.json +151 -0
  160. package/manifest/components/icon-button.json +88 -0
  161. package/manifest/components/info-tip.json +98 -0
  162. package/manifest/components/input-group.json +91 -0
  163. package/manifest/components/input.json +89 -0
  164. package/manifest/components/item.json +129 -0
  165. package/manifest/components/kbd.json +52 -0
  166. package/manifest/components/link.json +81 -0
  167. package/manifest/components/log-viewer.json +139 -0
  168. package/manifest/components/menubar.json +157 -0
  169. package/manifest/components/message-list.json +100 -0
  170. package/manifest/components/message.json +116 -0
  171. package/manifest/components/meter.json +114 -0
  172. package/manifest/components/multi-select.json +190 -0
  173. package/manifest/components/musical-time-input.json +113 -0
  174. package/manifest/components/navigation-menu.json +226 -0
  175. package/manifest/components/node-card.json +109 -0
  176. package/manifest/components/node-handle.json +69 -0
  177. package/manifest/components/number-field.json +107 -0
  178. package/manifest/components/otp-field.json +128 -0
  179. package/manifest/components/page-shell.json +96 -0
  180. package/manifest/components/pagination.json +92 -0
  181. package/manifest/components/panel-header.json +77 -0
  182. package/manifest/components/panel.json +71 -0
  183. package/manifest/components/password-input.json +119 -0
  184. package/manifest/components/piano-keyboard.json +120 -0
  185. package/manifest/components/plussie.json +111 -0
  186. package/manifest/components/popover.json +193 -0
  187. package/manifest/components/preset-section.json +73 -0
  188. package/manifest/components/progress.json +95 -0
  189. package/manifest/components/radio-group.json +73 -0
  190. package/manifest/components/radio.json +80 -0
  191. package/manifest/components/rating.json +141 -0
  192. package/manifest/components/resizable.json +88 -0
  193. package/manifest/components/row.json +109 -0
  194. package/manifest/components/scroll-area.json +91 -0
  195. package/manifest/components/scrollable-tabs-list.json +83 -0
  196. package/manifest/components/scrub-input.json +200 -0
  197. package/manifest/components/seam-cell.json +75 -0
  198. package/manifest/components/seam-grid.json +75 -0
  199. package/manifest/components/seam-list.json +56 -0
  200. package/manifest/components/search-input.json +134 -0
  201. package/manifest/components/section-header.json +112 -0
  202. package/manifest/components/segmented-control.json +138 -0
  203. package/manifest/components/select.json +194 -0
  204. package/manifest/components/separator.json +53 -0
  205. package/manifest/components/shape-section.json +66 -0
  206. package/manifest/components/sheet.json +186 -0
  207. package/manifest/components/sidebar.json +198 -0
  208. package/manifest/components/signal-edge.json +56 -0
  209. package/manifest/components/skeleton.json +46 -0
  210. package/manifest/components/slider.json +89 -0
  211. package/manifest/components/sparkline.json +76 -0
  212. package/manifest/components/spectrum-visualizer.json +115 -0
  213. package/manifest/components/spinner.json +61 -0
  214. package/manifest/components/stack.json +96 -0
  215. package/manifest/components/stat.json +87 -0
  216. package/manifest/components/status-bar.json +58 -0
  217. package/manifest/components/status-dot.json +78 -0
  218. package/manifest/components/stepper.json +89 -0
  219. package/manifest/components/switch.json +87 -0
  220. package/manifest/components/table-scroll-region.json +69 -0
  221. package/manifest/components/table.json +155 -0
  222. package/manifest/components/tabs.json +145 -0
  223. package/manifest/components/tags-input.json +190 -0
  224. package/manifest/components/terminal-frame.json +119 -0
  225. package/manifest/components/textarea.json +76 -0
  226. package/manifest/components/theme-configurator.json +124 -0
  227. package/manifest/components/theme-provider.json +134 -0
  228. package/manifest/components/threshold-rail.json +160 -0
  229. package/manifest/components/time-field.json +80 -0
  230. package/manifest/components/timeline-ruler.json +139 -0
  231. package/manifest/components/timeline.json +115 -0
  232. package/manifest/components/title-bar.json +82 -0
  233. package/manifest/components/toast.json +130 -0
  234. package/manifest/components/toggle-group.json +106 -0
  235. package/manifest/components/toggle.json +109 -0
  236. package/manifest/components/token-editor.json +90 -0
  237. package/manifest/components/toolbar.json +163 -0
  238. package/manifest/components/tooltip.json +164 -0
  239. package/manifest/components/tree-visibility-toggle.json +84 -0
  240. package/manifest/components/tree.json +140 -0
  241. package/manifest/components/two-step-button.json +113 -0
  242. package/manifest/components/universe-grid.json +127 -0
  243. package/manifest/components/usage-chart.json +124 -0
  244. package/manifest/manifest.json +2142 -0
  245. package/manifest/tokens.json +138 -0
  246. package/package.json +13 -5
@@ -0,0 +1,190 @@
1
+ {
2
+ "name": "AlertDialog",
3
+ "slug": "alert-dialog",
4
+ "group": "overlays",
5
+ "importPath": "@cueplusplus/ui",
6
+ "peerDependencies": [],
7
+ "clientOnly": true,
8
+ "description": "A modal that asks one question with two answers, for anything irreversible.\n\nWraps Base UI's `AlertDialog`: the popup takes `role=\"alertdialog\"`, focus is\ntrapped and restored, and — unlike {@link Dialog } — an outside press does not\ndismiss it. Everything else (scrim, surface, portal theme stamping) is shared\nwith the rest of the overlay family.",
9
+ "props": [],
10
+ "typeReferences": [],
11
+ "subcomponents": [
12
+ "Root",
13
+ "Trigger",
14
+ "Content",
15
+ "Title",
16
+ "Description",
17
+ "Footer",
18
+ "Cancel",
19
+ "Action"
20
+ ],
21
+ "parts": [
22
+ {
23
+ "name": "Root",
24
+ "usage": "AlertDialog.Root",
25
+ "description": "Groups the parts of an alert dialog and owns its open state. Renders no\nelement.",
26
+ "props": [],
27
+ "typeReferences": [
28
+ "BaseAlertDialog.Root.Props"
29
+ ]
30
+ },
31
+ {
32
+ "name": "Trigger",
33
+ "usage": "AlertDialog.Trigger",
34
+ "description": "The control that raises the alert. Unstyled — pass\n`render={<Button variant=\"danger-outline\" />}`.",
35
+ "props": [],
36
+ "typeReferences": [
37
+ "BaseAlertDialog.Trigger.Props"
38
+ ]
39
+ },
40
+ {
41
+ "name": "Content",
42
+ "usage": "AlertDialog.Content",
43
+ "description": "The alert's portal, scrim and popup.\n\nThere is no corner close affordance, and Base UI does not dismiss an alert on\nan outside press: the whole point of the component is that the user answers\nthe question. Provide exactly one {@link AlertDialogCancel} and one\n{@link AlertDialogAction}.",
44
+ "props": [
45
+ {
46
+ "name": "className",
47
+ "type": "string",
48
+ "required": false,
49
+ "defaultValue": null,
50
+ "description": "Extra classes for the popup surface."
51
+ },
52
+ {
53
+ "name": "width",
54
+ "type": "\"sm\" | \"md\" | \"lg\"",
55
+ "required": false,
56
+ "defaultValue": "sm",
57
+ "description": ""
58
+ },
59
+ {
60
+ "name": "keepMounted",
61
+ "type": "boolean",
62
+ "required": false,
63
+ "defaultValue": null,
64
+ "description": "Keep the popup mounted while closed."
65
+ },
66
+ {
67
+ "name": "backdropClassName",
68
+ "type": "string",
69
+ "required": false,
70
+ "defaultValue": null,
71
+ "description": "Extra classes for the scrim behind it."
72
+ }
73
+ ],
74
+ "typeReferences": [
75
+ "Omit<BaseAlertDialog.Popup.Props, \"className\">",
76
+ "VariantProps<typeof alertDialogPopupVariants>"
77
+ ]
78
+ },
79
+ {
80
+ "name": "Title",
81
+ "usage": "AlertDialog.Title",
82
+ "description": "The question being asked. Wired to the popup's `aria-labelledby`.",
83
+ "props": [],
84
+ "typeReferences": [
85
+ "BaseAlertDialog.Title.Props"
86
+ ]
87
+ },
88
+ {
89
+ "name": "Description",
90
+ "usage": "AlertDialog.Description",
91
+ "description": "What the consequences are. Wired to the popup's `aria-describedby`.",
92
+ "props": [],
93
+ "typeReferences": [
94
+ "BaseAlertDialog.Description.Props"
95
+ ]
96
+ },
97
+ {
98
+ "name": "Footer",
99
+ "usage": "AlertDialog.Footer",
100
+ "description": "The two-answer action strip.",
101
+ "props": [],
102
+ "typeReferences": [
103
+ "React.ComponentPropsWithoutRef<\"div\">"
104
+ ]
105
+ },
106
+ {
107
+ "name": "Cancel",
108
+ "usage": "AlertDialog.Cancel",
109
+ "description": "The safe answer. Styled as a secondary button, because backing out must never\nbe the loudest thing on the surface.",
110
+ "props": [],
111
+ "typeReferences": [
112
+ "BaseAlertDialog.Close.Props"
113
+ ]
114
+ },
115
+ {
116
+ "name": "Action",
117
+ "usage": "AlertDialog.Action",
118
+ "description": "The answer that does the thing. Closes the alert on press, so hang the work\noff `onClick`.",
119
+ "props": [
120
+ {
121
+ "name": "tone",
122
+ "type": "\"accent\" | \"danger\"",
123
+ "required": false,
124
+ "defaultValue": "accent",
125
+ "description": "Which answer this is. `\"danger\"` for anything destructive, `\"accent\"` for a\nconfirmation that merely proceeds. Defaults to `\"accent\"`."
126
+ }
127
+ ],
128
+ "typeReferences": [
129
+ "BaseAlertDialog.Close.Props"
130
+ ]
131
+ }
132
+ ],
133
+ "variants": {
134
+ "width": [
135
+ "sm",
136
+ "md",
137
+ "lg"
138
+ ]
139
+ },
140
+ "defaultVariants": {
141
+ "width": "sm"
142
+ },
143
+ "tokensUsed": [
144
+ "--cue-accent-soft",
145
+ "--cue-border",
146
+ "--cue-border-overlay",
147
+ "--cue-control-sm",
148
+ "--cue-fg",
149
+ "--cue-fg-muted",
150
+ "--cue-fg-subtle",
151
+ "--cue-font-mono",
152
+ "--cue-radius-control",
153
+ "--cue-radius-overlay",
154
+ "--cue-scrim",
155
+ "--cue-space-1",
156
+ "--cue-space-2",
157
+ "--cue-space-3",
158
+ "--cue-space-4",
159
+ "--cue-space-6",
160
+ "--cue-surface-2",
161
+ "--cue-text-emphasis",
162
+ "--cue-text-label",
163
+ "--cue-text-ui"
164
+ ],
165
+ "summary": "A modal that asks one question with two answers, for anything irreversible.",
166
+ "examples": [
167
+ {
168
+ "title": "Usage",
169
+ "code": "<AlertDialog.Root>\n <AlertDialog.Trigger render={<Button variant=\"danger-outline\">Delete</Button>} />\n <AlertDialog.Content>\n <AlertDialog.Title>Delete universe 3?</AlertDialog.Title>\n <AlertDialog.Description>Every patched fixture goes with it.</AlertDialog.Description>\n <AlertDialog.Footer>\n <AlertDialog.Cancel>Keep</AlertDialog.Cancel>\n <AlertDialog.Action tone=\"danger\" onClick={remove}>Delete</AlertDialog.Action>\n </AlertDialog.Footer>\n </AlertDialog.Content>\n</AlertDialog.Root>",
170
+ "language": "tsx"
171
+ }
172
+ ],
173
+ "status": "todo-docs",
174
+ "url": "/docs/components/alert-dialog",
175
+ "mdUrl": "/docs/components/alert-dialog.md",
176
+ "jsonUrl": "/r/components/alert-dialog.json",
177
+ "specimens": [
178
+ {
179
+ "title": "AlertDialog",
180
+ "group": "overlays",
181
+ "components": [
182
+ "AlertDialog"
183
+ ],
184
+ "code": "<Specimens>\n <Specimen label=\"danger\">\n <AlertDialog.Root>\n <AlertDialog.Trigger render={<Button variant=\"danger\">{COPY.destructive.action}</Button>} />\n <AlertDialog.Content>\n <AlertDialog.Title>{COPY.destructive.title}</AlertDialog.Title>\n <AlertDialog.Description>{COPY.destructive.hint}</AlertDialog.Description>\n <AlertDialog.Footer>\n <AlertDialog.Cancel render={<Button>Keep it</Button>} />\n <AlertDialog.Action tone=\"danger\">{COPY.destructive.action}</AlertDialog.Action>\n </AlertDialog.Footer>\n </AlertDialog.Content>\n </AlertDialog.Root>\n </Specimen>\n <Specimen label=\"accent\">\n <AlertDialog.Root>\n <AlertDialog.Trigger render={<Button>Reload show</Button>} />\n <AlertDialog.Content width=\"sm\">\n <AlertDialog.Title>Reload the show file</AlertDialog.Title>\n <AlertDialog.Description>\n Unsaved edits to 3 cues are discarded.\n </AlertDialog.Description>\n <AlertDialog.Footer>\n <AlertDialog.Cancel render={<Button>Cancel</Button>} />\n <AlertDialog.Action>Reload</AlertDialog.Action>\n </AlertDialog.Footer>\n </AlertDialog.Content>\n </AlertDialog.Root>\n </Specimen>\n</Specimens>",
185
+ "note": "The destructive twin: no scrim dismissal, no close button, and an explicit pair of Cancel and Action.",
186
+ "interaction": "Escape is deliberately not enough on its own; the action has to be chosen."
187
+ }
188
+ ],
189
+ "todo": true
190
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "name": "AppBar",
3
+ "slug": "app-bar",
4
+ "group": "chrome",
5
+ "importPath": "@cueplusplus/ui",
6
+ "peerDependencies": [],
7
+ "clientOnly": false,
8
+ "description": "The horizontal bar a site or an application wears across the top: brand slot,\nnavigation slot, actions slot, one chrome rung tall.\n\n`AppShell` is the frame for a screen that owns the viewport; this is the bar\nfor a document that scrolls — a marketing page, a documentation site, a\nconsole's public half. `NavigationMenu` is neither: it is the *menu* that\ngoes inside `AppBar.Nav` when a section has children.\n\nSix parts. `Root` is the `<header>`, `Brand` the leading link, `Nav` the\n`<nav>` landmark that takes the remaining width and scrolls when the links\noutgrow it, `Link` one destination in one of two registers, `Separator` the\nseam between clusters, and `Actions` the trailing controls.",
9
+ "props": [],
10
+ "typeReferences": [],
11
+ "subcomponents": [
12
+ "Root",
13
+ "Brand",
14
+ "Nav",
15
+ "Link",
16
+ "Separator",
17
+ "Actions"
18
+ ],
19
+ "parts": [
20
+ {
21
+ "name": "Root",
22
+ "usage": "AppBar.Root",
23
+ "description": "The bar across the top of a document: brand, navigation, actions.\n\nOne rung of the chrome ladder tall, from `--cue-chrome-toolbar` — the same\ntoken `Toolbar` and the docs site's hand-rolled header use, so a page that\nstacks a bar on a toolbar gets two equal strips rather than two guesses.\n\nSticky by default, and translucent because of it: a bar pinned over scrolling\ncontent needs a ground, and `bg-surface-1/95` plus `backdrop-blur` says\n\"there is content under this\" where an opaque fill would claim the content\nends here. `z-40` is above the page and below the `z-50` this library's\noverlays float at, so a menu opened from the bar is never behind it.\n\n**This is a bar, not a menu.** `NavigationMenu` is the mega-menu — triggers\nthat open panels — and it goes *inside* an `AppBar.Nav` when a section has\nchildren. This component is the strip it sits in.\n\nStatic markup — no `\"use client\"` on this module, deliberately: a site header\nis where a framework reads its data, so the bar has to be renderable from a\nserver component. The one part with state is the navigation's scroller, and\nthe client boundary is drawn around that alone (`_edge-scroller.tsx`).\n\nIt adds **no viewport breakpoint**. `AppShell` holds the library's only one,\nfor navigation shape, and a horizontal bar does not need it: the brand and\nthe actions are `shrink-0`, the navigation between them takes the remaining\nwidth and scrolls inside it, so a 390px viewport gets the same bar with a\nshorter window onto the same links rather than a second layout to maintain.",
24
+ "props": [
25
+ {
26
+ "name": "sticky",
27
+ "type": "boolean",
28
+ "required": false,
29
+ "defaultValue": "true",
30
+ "description": "Keep the bar at the top of the viewport as the page scrolls. Defaults to\n`true`.\n\nSet it `false` inside `AppShell`, where nothing scrolls the document and a\nsticky bar would be solving a problem the shell has already solved."
31
+ }
32
+ ],
33
+ "typeReferences": [
34
+ "React.ComponentPropsWithoutRef<\"header\">"
35
+ ]
36
+ },
37
+ {
38
+ "name": "Brand",
39
+ "usage": "AppBar.Brand",
40
+ "description": "The leading slot, and the way home.\n\nA link rather than a box, because that is what a brand in a bar is: pass\n`href`, or `render={<NextLink href=\"/\" />}` to go through a router. It sets\nthe bar's own type register (mono, UI size, full-contrast ink) so a wordmark\nand a version chip sit on one baseline without a class of their own.\n\n`shrink-0`: the brand is the one thing in the bar that must never be\ncompressed, because a half-drawn wordmark reads as a broken page.",
41
+ "props": [
42
+ {
43
+ "name": "render",
44
+ "type": "RenderProp<Record<string, unknown>>",
45
+ "required": false,
46
+ "defaultValue": null,
47
+ "description": "Replace the rendered element (Base UI render prop). Accepts an element —\n`render={<NextLink href=\"/x\" />}` — or a function returning one. This is\nhow the design system composes with a router without depending on one."
48
+ }
49
+ ],
50
+ "typeReferences": [
51
+ "Omit<LinkProps, \"variant\" | \"external\">"
52
+ ]
53
+ },
54
+ {
55
+ "name": "Nav",
56
+ "usage": "AppBar.Nav",
57
+ "description": "The `<nav>` landmark between the brand and the actions, and the one part of\nthe bar that gives up width.\n\nName it: `aria-label=\"Sections\"`, or whatever this bar's links are. A\ndocument with more than one navigation and no names on them is a screen\nreader listing \"navigation, navigation\".\n\nThe alignment sits on the frame rather than on the scrolling `<nav>` itself,\nand that is load-bearing: `justify-content: flex-end` on a scroll container\npushes the overflow off the *start* edge, where several browsers cannot\nscroll to reach it. Aligning the frame and letting the nav grow from its\nstart keeps every link reachable at every width.",
58
+ "props": [
59
+ {
60
+ "name": "align",
61
+ "type": "\"center\" | \"end\" | \"start\"",
62
+ "required": false,
63
+ "defaultValue": "end",
64
+ "description": "Where the links sit when they are narrower than the space. Defaults to `\"end\"`."
65
+ },
66
+ {
67
+ "name": "overflow",
68
+ "type": "\"clip\" | \"scroll\"",
69
+ "required": false,
70
+ "defaultValue": "scroll",
71
+ "description": "What the navigation does when the links do not fit. Defaults to `\"scroll\"`.\n\nThe same behaviour `Toolbar` and `SegmentedControl` have, from the same\nmodule: the links scroll inside the bar, the overflowing edge is faded and\na pager chevron appears there. This is what lets the bar survive a phone\nwithout a viewport breakpoint."
72
+ },
73
+ {
74
+ "name": "previousLabel",
75
+ "type": "string",
76
+ "required": false,
77
+ "defaultValue": "Show earlier links",
78
+ "description": "Accessible name for the chevron that reveals links off the leading edge."
79
+ },
80
+ {
81
+ "name": "nextLabel",
82
+ "type": "string",
83
+ "required": false,
84
+ "defaultValue": "Show later links",
85
+ "description": "Accessible name for the chevron that reveals links off the trailing edge."
86
+ },
87
+ {
88
+ "name": "frameClassName",
89
+ "type": "string",
90
+ "required": false,
91
+ "defaultValue": null,
92
+ "description": "Extra classes for the frame around the `<nav>`, which is what takes the remaining width."
93
+ },
94
+ {
95
+ "name": "children",
96
+ "type": "ReactNode",
97
+ "required": false,
98
+ "defaultValue": null,
99
+ "description": "The links, and any separators between clusters of them."
100
+ }
101
+ ],
102
+ "typeReferences": [
103
+ "Omit<React.ComponentPropsWithoutRef<\"nav\">, \"children\">"
104
+ ]
105
+ },
106
+ {
107
+ "name": "Link",
108
+ "usage": "AppBar.Link",
109
+ "description": "One destination in the bar.\n\nA `Link`, so `render={<NextLink href=\"/x\" />}` composes it with a router and\n`external` gives an outbound link its `↗`, plus the bar's type register and\nthe `shrink-0` that keeps a label from being squeezed into an ellipsis while\nthe navigation around it scrolls.",
110
+ "props": [
111
+ {
112
+ "name": "register",
113
+ "type": "\"strong\" | \"muted\"",
114
+ "required": false,
115
+ "defaultValue": "muted",
116
+ "description": "Which register the link is set in. Defaults to `\"muted\"`."
117
+ },
118
+ {
119
+ "name": "active",
120
+ "type": "boolean",
121
+ "required": false,
122
+ "defaultValue": "false",
123
+ "description": "This is the page the reader is on.\n\nInks the link with the accent and sets `aria-current=\"page\"` — the same\nbargain `Sidebar.Item` makes, so the current destination is announced and\nnot merely coloured. Overrides `register`: a current page is never\nfurniture."
124
+ },
125
+ {
126
+ "name": "external",
127
+ "type": "boolean",
128
+ "required": false,
129
+ "defaultValue": "false",
130
+ "description": "Open in a new tab, mark the anchor `rel=\"noreferrer noopener\"` and append a\n`↗`. The glyph is not decoration: a link that replaces the user's context\nwithout warning is a WCAG 3.2.5 failure, and the arrow is the warning."
131
+ },
132
+ {
133
+ "name": "render",
134
+ "type": "RenderProp<Record<string, unknown>>",
135
+ "required": false,
136
+ "defaultValue": null,
137
+ "description": "Replace the rendered element (Base UI render prop). Accepts an element —\n`render={<NextLink href=\"/x\" />}` — or a function returning one. This is\nhow the design system composes with a router without depending on one."
138
+ }
139
+ ],
140
+ "typeReferences": [
141
+ "LinkProps"
142
+ ]
143
+ },
144
+ {
145
+ "name": "Separator",
146
+ "usage": "AppBar.Separator",
147
+ "description": "The hairline that splits one cluster of links from the next.\n\nSized from the space ladder rather than stretched to the bar's full height: a\nrule from rim to rim would cut the bar in two, and this is a seam inside one\nlist.",
148
+ "props": [
149
+ {
150
+ "name": "className",
151
+ "type": "string",
152
+ "required": false,
153
+ "defaultValue": null,
154
+ "description": "Extra classes, merged over the hairline defaults."
155
+ }
156
+ ],
157
+ "typeReferences": [
158
+ "Omit<SeparatorProps, \"orientation\">"
159
+ ]
160
+ },
161
+ {
162
+ "name": "Actions",
163
+ "usage": "AppBar.Actions",
164
+ "description": "The trailing slot: the controls that belong to the whole product rather than\nto a page — a theme picker, an account menu, a status chip.\n\n`shrink-0`, and spaced on the bar's own rhythm rather than a tighter one, so\na cluster of actions reads as part of the bar instead of as a widget bolted\nto the end of it.",
165
+ "props": [],
166
+ "typeReferences": [
167
+ "React.ComponentPropsWithoutRef<\"div\">"
168
+ ]
169
+ }
170
+ ],
171
+ "variants": {},
172
+ "defaultVariants": {},
173
+ "tokensUsed": [
174
+ "--cue-accent",
175
+ "--cue-border",
176
+ "--cue-chrome-toolbar",
177
+ "--cue-edge-fade",
178
+ "--cue-fg",
179
+ "--cue-fg-muted",
180
+ "--cue-font-mono",
181
+ "--cue-icon-sm",
182
+ "--cue-space-3",
183
+ "--cue-space-4",
184
+ "--cue-space-5",
185
+ "--cue-surface-1",
186
+ "--cue-text-ui"
187
+ ],
188
+ "summary": "The horizontal bar across the top of a document: brand slot, navigation slot, actions slot, one chrome rung tall.",
189
+ "examples": [
190
+ {
191
+ "title": "The three slots",
192
+ "code": "<AppBar.Root>\n <AppBar.Brand render={<NextLink href=\"/\" />}>\n <Eyebrow>@cueplusplus/ui</Eyebrow>\n <Chip tone=\"accent\" variant=\"outline\">{version}</Chip>\n </AppBar.Brand>\n\n <AppBar.Nav aria-label=\"Sections\">\n <AppBar.Link render={<NextLink href=\"/docs\" />}>Getting started</AppBar.Link>\n <AppBar.Link render={<NextLink href=\"/docs/theming\" />}>Theming</AppBar.Link>\n\n <AppBar.Separator />\n\n <AppBar.Link render={<NextLink href=\"/kitchen-sink\" />} register=\"strong\">Kitchen sink</AppBar.Link>\n <AppBar.Link external render={<a href=\"https://skills.cueplusplus.com\" />}>Skills</AppBar.Link>\n </AppBar.Nav>\n\n <AppBar.Actions>\n <AppBar.Separator />\n <ThemePicker />\n </AppBar.Actions>\n</AppBar.Root>",
193
+ "language": "tsx"
194
+ },
195
+ {
196
+ "title": "It renders on the server",
197
+ "code": "// A server component. `manifest()` reads the build's own JSON.\nexport function SiteHeader() {\n const { version } = manifest();\n return <AppBar.Root>…</AppBar.Root>;\n}",
198
+ "language": "tsx"
199
+ },
200
+ {
201
+ "title": "Inside a shell",
202
+ "code": "<AppShell.Root>\n <AppBar.Root sticky={false}>…</AppBar.Root>\n <AppShell.Body>…</AppShell.Body>\n</AppShell.Root>",
203
+ "language": "tsx"
204
+ },
205
+ {
206
+ "title": "Usage",
207
+ "code": "<AppBar.Root>\n <AppBar.Brand render={<NextLink href=\"/\" />}>\n <Eyebrow>@cueplusplus/ui</Eyebrow>\n </AppBar.Brand>\n <AppBar.Nav aria-label=\"Sections\">\n <AppBar.Link render={<NextLink href=\"/docs\" />}>Docs</AppBar.Link>\n <AppBar.Link render={<NextLink href=\"/theming\" />}>Theming</AppBar.Link>\n <AppBar.Separator />\n <AppBar.Link render={<NextLink href=\"/gallery\" />} register=\"strong\">Gallery</AppBar.Link>\n <AppBar.Link external render={<a href=\"https://skills.cueplusplus.com\" />}>Skills</AppBar.Link>\n </AppBar.Nav>\n <AppBar.Separator />\n <AppBar.Actions><ThemePicker /></AppBar.Actions>\n</AppBar.Root>",
208
+ "language": "tsx"
209
+ }
210
+ ],
211
+ "status": "stable",
212
+ "url": "/docs/components/app-bar",
213
+ "mdUrl": "/docs/components/app-bar.md",
214
+ "jsonUrl": "/r/components/app-bar.json",
215
+ "whenToUse": [
216
+ "Any document that scrolls and needs a persistent identity and a way around: a marketing site, a documentation site, a console's signed-out half.",
217
+ "Whenever a header is currently a hand-rolled `<header>` with a sticky rule, a chrome height and three flex clusters. That is this component, and it is where it came from.",
218
+ "Above an `AppShell`, with `sticky={false}`, when a product wants one product-wide bar over a console frame that already owns the viewport."
219
+ ],
220
+ "whenNotToUse": [
221
+ "As the title bar of an application window. That is `TitleBar` — window furniture with a centred document name and a drag region, not a navigation bar.",
222
+ "As the mega-menu itself. `NavigationMenu` is the menu; it goes *inside* `AppBar.Nav` when a section has children.",
223
+ "As a strip of tools for the view below it. That is `Toolbar`, which is a roving-focus ARIA toolbar rather than a `<nav>`."
224
+ ],
225
+ "commonMistakes": [
226
+ "Leaving `AppBar.Nav` unnamed. A page with a bar and a sidebar then has two navigations a screen reader can only call \"navigation\"; give each an `aria-label`.",
227
+ "Setting every link `register=\"strong\"`. Two registers only work as a contrast — a bar in which everything is loud is a bar in which nothing is.",
228
+ "Using `register=\"strong\"` for the current page. `active` is that: it inks the link with the accent *and* sets `aria-current=\"page\"`, so the current destination is announced rather than merely coloured.",
229
+ "Reaching for a viewport breakpoint to make the bar fit a phone. It already does — the navigation scrolls. `AppShell` holds the library's only breakpoint, and it is for navigation shape.",
230
+ "Putting the actions inside `AppBar.Nav`. A theme picker is not a destination, and it lands in the navigation landmark's list if you do."
231
+ ],
232
+ "specimens": [
233
+ {
234
+ "title": "AppBar",
235
+ "group": "chrome",
236
+ "components": [
237
+ "AppBar"
238
+ ],
239
+ "code": "<div className=\"flex w-full flex-col gap-(--cue-space-4)\">\n <div className=\"overflow-hidden rounded-(--radius-surface) border border-border\">\n <BarSample />\n </div>\n {/* The same component, given a phone's worth of room. `sticky` is\n * off in both because a bench is not a page. */}\n <div className=\"w-full max-w-[26rem] overflow-hidden rounded-(--radius-surface) border border-border\">\n <BarSample />\n </div>\n</div>",
240
+ "note": "The horizontal bar a document wears across the top: brand, a navigation that gives up the width the other two do not, and an actions cluster. Drawn twice — the same markup at full width and boxed to 26rem, because the bar has no viewport breakpoint and does not need one.",
241
+ "interaction": "the narrow copy scrolls: drag it, or press the chevron that appears at whichever edge still hides a link. Every link lifts to the accent on hover; the current page is already inked with it."
242
+ }
243
+ ]
244
+ }