@cloudgrid-io/ui 0.27.1 → 0.28.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 (56) hide show
  1. package/dist/blocks/avatar.d.ts +10 -4
  2. package/dist/blocks/avatar.d.ts.map +1 -1
  3. package/dist/blocks/avatar.js +8 -2
  4. package/dist/blocks/avatar.js.map +1 -1
  5. package/dist/blocks/icons.d.ts +1 -1
  6. package/dist/blocks/icons.d.ts.map +1 -1
  7. package/dist/blocks/icons.js +13 -1
  8. package/dist/blocks/icons.js.map +1 -1
  9. package/dist/blocks/side-nav.d.ts +49 -0
  10. package/dist/blocks/side-nav.d.ts.map +1 -0
  11. package/dist/blocks/side-nav.js +217 -0
  12. package/dist/blocks/side-nav.js.map +1 -0
  13. package/dist/blocks/stat-tile.d.ts +69 -0
  14. package/dist/blocks/stat-tile.d.ts.map +1 -0
  15. package/dist/blocks/stat-tile.js +54 -0
  16. package/dist/blocks/stat-tile.js.map +1 -0
  17. package/dist/blocks/tool-setup.d.ts +105 -4
  18. package/dist/blocks/tool-setup.d.ts.map +1 -1
  19. package/dist/blocks/tool-setup.js +238 -13
  20. package/dist/blocks/tool-setup.js.map +1 -1
  21. package/dist/fonts.css +38 -9
  22. package/dist/index.d.ts +5 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +5 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/lib/cloudgrid-cn.d.ts +1 -1
  27. package/dist/lib/cloudgrid-cn.d.ts.map +1 -1
  28. package/dist/lib/cloudgrid-cn.js +7 -0
  29. package/dist/lib/cloudgrid-cn.js.map +1 -1
  30. package/dist/theme.css +95 -0
  31. package/dist/tokens/base.json +389 -3
  32. package/dist/tokens/surface-ink.json +10 -0
  33. package/dist/tokens/surface-panel.json +10 -0
  34. package/dist/tokens.css +520 -10
  35. package/dist/tokens.json +43 -2
  36. package/dist/ui/button.d.ts +1 -1
  37. package/dist/ui/button.d.ts.map +1 -1
  38. package/dist/ui/button.js +28 -0
  39. package/dist/ui/button.js.map +1 -1
  40. package/dist/ui/dialog.d.ts +17 -1
  41. package/dist/ui/dialog.d.ts.map +1 -1
  42. package/dist/ui/dialog.js +18 -2
  43. package/dist/ui/dialog.js.map +1 -1
  44. package/dist/ui/drawer.d.ts +208 -0
  45. package/dist/ui/drawer.d.ts.map +1 -0
  46. package/dist/ui/drawer.js +265 -0
  47. package/dist/ui/drawer.js.map +1 -0
  48. package/dist/ui/popover.d.ts +83 -0
  49. package/dist/ui/popover.d.ts.map +1 -0
  50. package/dist/ui/popover.js +102 -0
  51. package/dist/ui/popover.js.map +1 -0
  52. package/dist/ui/radio-group.d.ts +21 -0
  53. package/dist/ui/radio-group.d.ts.map +1 -0
  54. package/dist/ui/radio-group.js +101 -0
  55. package/dist/ui/radio-group.js.map +1 -0
  56. package/package.json +2 -1
@@ -44,7 +44,64 @@ import { PageHeading } from "./page-heading.js";
44
44
  * that an answer had been given when the user was reading. Tabs say "same
45
45
  * screen, different content", which is what this is.
46
46
  */
47
- export interface ToolSetupTool {
47
+ /**
48
+ * An install METHOD: MCP, CLI, Skills. Optional, and everything about the method
49
+ * axis is keyed on whether any are passed.
50
+ *
51
+ * A tool supports a method when it has steps for it. Nothing declares support
52
+ * separately, because two places to say the same thing is one place to get it
53
+ * wrong: the CLI tab drops ChatGPT because ChatGPT has no CLI steps, not because
54
+ * a flag says so.
55
+ */
56
+ export interface ToolSetupMethod {
57
+ value: string;
58
+ label: string;
59
+ disabled?: boolean;
60
+ }
61
+ /**
62
+ * A heading for a run of tools in the strip. Coding agents, chat apps.
63
+ *
64
+ * A group whose tools are all filtered out by the current method disappears,
65
+ * along with the divider that would have sat beside it. That is the same rule
66
+ * `HubIndex` encodes for its own groups, and for the same reason: a group may
67
+ * legitimately name nothing right now.
68
+ */
69
+ export interface ToolSetupGroup {
70
+ value: string;
71
+ label: string;
72
+ }
73
+ /**
74
+ * One step of a pane.
75
+ *
76
+ * `label` is an alternative marker ("Easiest", "Or") rather than a sequence
77
+ * position. A pane whose first step carries one is a set of CHOICES and renders
78
+ * as columns; a pane without is a SEQUENCE and renders as a numbered `StepList`,
79
+ * whose `<ol>` does the numbering for a screen reader.
80
+ *
81
+ * `body` is a node, not a string. Body copy carries emphasis, and a text grammar
82
+ * in the design system is a second content system arriving through the side
83
+ * door. The caller renders its own Markdown, or HTML, or nothing, and hands over
84
+ * what it wants painted. Same line #117, #121 and #126 drew.
85
+ */
86
+ export interface ToolSetupStep {
87
+ /** "Easiest", "Or". Present on the first step makes the pane a set of choices. */
88
+ label?: string;
89
+ title: string;
90
+ body?: React.ReactNode;
91
+ /** A multi line prompt to hand an agent. */
92
+ prompt?: string;
93
+ /** A single command to run. */
94
+ code?: string;
95
+ link?: {
96
+ label: string;
97
+ href: string;
98
+ /** The caller's glyph. The library does not pick it, per HubIndex and #47. */
99
+ icon?: React.ReactNode;
100
+ /** Draw it as the primary action rather than a secondary one. */
101
+ primary?: boolean;
102
+ };
103
+ }
104
+ interface ToolSetupToolBase {
48
105
  /** What `onValueChange` reports. Stable, and never shown. */
49
106
  value: string;
50
107
  /** The words on the tab. Two short words wrap; they are not truncated. */
@@ -55,8 +112,14 @@ export interface ToolSetupTool {
55
112
  * boilerplate at the exact moment the user needs to know where the text goes.
56
113
  */
57
114
  instruction?: string;
58
- /** The text to paste. Multi-line is normal here; `CodeBlock` preserves it. */
59
- prompt: string;
115
+ /** Which `ToolSetupGroup` this sits under. Ignored when no groups are passed. */
116
+ group?: string;
117
+ /**
118
+ * The vendor mark, supplied by the caller. A node rather than a name: which
119
+ * marks exist is content, and the trademark question in #47 is not this
120
+ * component's to answer.
121
+ */
122
+ mark?: React.ReactNode;
60
123
  /** Shown beside the instruction. For a tool with a manual path as well. */
61
124
  alternative?: {
62
125
  label: string;
@@ -64,8 +127,38 @@ export interface ToolSetupTool {
64
127
  };
65
128
  disabled?: boolean;
66
129
  }
67
- declare function ToolSetup({ tools, value, defaultValue, onValueChange, title, sub, eyebrow, level, headingSize, continueLabel, onContinue, canContinue, footer, className, ...props }: Omit<React.ComponentProps<"section">, "ref" | "title" | "defaultValue" | "onChange"> & {
130
+ /**
131
+ * A tool has to have something to show, and the type says so.
132
+ *
133
+ * Making `prompt` merely optional was wrong: it took the guarantee away from
134
+ * every existing caller, so a typo in `prompt` stopped being a compile error and
135
+ * became a tab with an empty bordered panel under it. The union keeps the old
136
+ * contract for callers that pass no steps and adds the new one, without a
137
+ * runtime check standing in for a type.
138
+ *
139
+ * `prompt` stays readable on the union because both arms declare it, so the
140
+ * panel can fall back to it without narrowing.
141
+ *
142
+ * `steps` is keyed by method value. Passing it is what puts a tool on the method
143
+ * axis; a tool with no entry for the selected method is filtered out of the
144
+ * strip, which is also why a `prompt` only tool never appears in method mode.
145
+ */
146
+ export type ToolSetupTool = ToolSetupToolBase & ({
147
+ prompt: string;
148
+ steps?: Record<string, ToolSetupStep[]>;
149
+ } | {
150
+ prompt?: string;
151
+ steps: Record<string, ToolSetupStep[]>;
152
+ });
153
+ declare function ToolSetup({ tools, methods, groups, method, defaultMethod, onMethodChange, value, defaultValue, onValueChange, title, sub, eyebrow, level, headingSize, continueLabel, emptyLabel, onContinue, canContinue, footer, className, ...props }: Omit<React.ComponentProps<"section">, "ref" | "title" | "defaultValue" | "onChange"> & {
68
154
  tools: ToolSetupTool[];
155
+ /** Pass these and the method strip appears above the tool strip. */
156
+ methods?: ToolSetupMethod[];
157
+ /** Pass these and the tool strip is grouped, with empty groups dropped. */
158
+ groups?: ToolSetupGroup[];
159
+ method?: string;
160
+ defaultMethod?: string;
161
+ onMethodChange?: (method: string) => void;
69
162
  value?: string;
70
163
  defaultValue?: string;
71
164
  onValueChange?: (value: string) => void;
@@ -89,6 +182,14 @@ declare function ToolSetup({ tools, value, defaultValue, onValueChange, title, s
89
182
  * declarative opt-out works from both.
90
183
  */
91
184
  continueLabel?: string | null;
185
+ /**
186
+ * Shown when the selected method leaves no tools to pick from. A default
187
+ * rather than a required prop, on the same reasoning as `continueLabel`: the
188
+ * state is reachable by passing a method nothing supports, and a heading over
189
+ * blank space is the "reads as broken" outcome the note on `first` exists to
190
+ * prevent.
191
+ */
192
+ emptyLabel?: string;
92
193
  onContinue?: () => void;
93
194
  /**
94
195
  * Defaults to `true`, unlike `OnboardingQuestion`'s. Nothing here is an answer
@@ -1 +1 @@
1
- {"version":3,"file":"tool-setup.d.ts","sourceRoot":"","sources":["../../src/blocks/tool-setup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAIxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,WAAW,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AA8BD,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,KAAK,EACL,GAAG,EACH,OAAO,EACP,KAAS,EACT,WAAkB,EAClB,aAA0B,EAC1B,UAAU,EACV,WAAkB,EAClB,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC,GAAG;IACxF,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC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AM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,qBA4YA;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -1,9 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Button } from "../ui/button.js";
5
5
  import { CodeBlock } from "../ui/code-block.js";
6
6
  import { PageHeading } from "./page-heading.js";
7
+ import { Separator } from "../ui/separator.js";
8
+ import { StepItem, StepList } from "./step-item.js";
7
9
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs.js";
8
10
  import { cn } from "../lib/cloudgrid-cn.js";
9
11
  /**
@@ -31,13 +33,233 @@ const TRIGGER_CLASS = cn(
31
33
  // `--color-ink` is a TEXT colour and the other two do not exist, so Tailwind
32
34
  // emitted nothing and the selected tab rendered identically to the rest.
33
35
  "data-active:bg-code data-active:text-on-code");
34
- function ToolSetup({ tools, value, defaultValue, onValueChange, title, sub, eyebrow, level = 1, headingSize = "md", continueLabel = "Continue", onContinue, canContinue = true, footer, className, ...props }) {
36
+ /** The body of one step: prompt, command and link, in that order. */
37
+ function StepBody({ step }) {
38
+ return (_jsxs(_Fragment, { children: [step.body ? _jsx("div", { className: "text-body-sm text-faint", children: step.body }) : null, step.prompt ? _jsx(CodeBlock, { code: step.prompt }) : null, step.code ? _jsx(CodeBlock, { code: step.code }) : null, step.link ? (_jsxs(Button, { render: _jsx("a", { href: step.link.href, target: "_blank", rel: "noopener noreferrer" }),
39
+ // The rendered element is an anchor, so Base UI must not assume native
40
+ // button semantics.
41
+ nativeButton: false, variant: step.link.primary ? "default" : "secondary", size: "sm", className: "w-fit gap-2", children: [step.link.icon, step.link.label] })) : null] }));
42
+ }
43
+ /**
44
+ * One pane: the steps for a tool under the selected method.
45
+ *
46
+ * Two shapes, decided by whether the first step carries a `label`. Alternatives
47
+ * ("Easiest" / "Or") are peers and read as columns; a sequence is numbered, and
48
+ * gets `StepList` so the `<ol>` carries the numbering for assistive tech rather
49
+ * than the aria-hidden numeral.
50
+ */
51
+ function StepPane({ steps }) {
52
+ const alternatives = Boolean(steps[0]?.label);
53
+ const cols = steps.length >= 3 ? "md:grid-cols-3" : steps.length === 2 ? "md:grid-cols-2" : "";
54
+ if (alternatives) {
55
+ return (_jsx("div", { className: cn("grid grid-cols-1 gap-6", cols), children: steps.map((step, i) => (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("span", { className: "text-caption font-medium text-faint", children: step.label }), _jsx("span", { className: "text-heading-sm font-medium", children: step.title }), _jsx(StepBody, { step: step })] }, i))) }));
56
+ }
57
+ return (_jsx(StepList, { className: cn("grid grid-cols-1 gap-6", cols), children: steps.map((step, i) => (_jsx(StepItem, { index: i + 1, title: step.title, className: "flex-col md:flex-row", children: _jsx(StepBody, { step: step }) }, i))) }));
58
+ }
59
+ function ToolSetup({ tools, methods, groups, method, defaultMethod, onMethodChange, value, defaultValue, onValueChange, title, sub, eyebrow, level = 1, headingSize = "md", continueLabel = "Continue", emptyLabel = "Nothing to set up for this one yet.", onContinue, canContinue = true, footer, className, ...props }) {
60
+ const headingId = React.useId();
61
+ const hasMethods = Boolean(methods?.length);
62
+ // ---- the method axis -------------------------------------------------
63
+ const firstMethod = methods?.find((m) => !m.disabled)?.value ?? methods?.[0]?.value;
64
+ const [ownMethod, setOwnMethod] = React.useState(defaultMethod ?? firstMethod);
65
+ /**
66
+ * A method the strip does not offer selects nothing, which empties the tool
67
+ * strip and paints a heading over blank space. `defaultMethod` is easy to typo
68
+ * and a controlled `method` can legitimately arrive before the list it belongs
69
+ * to, so an unknown value falls back to the first rather than rendering the
70
+ * broken state.
71
+ */
72
+ const requested = method ?? ownMethod;
73
+ const activeMethod = hasMethods && methods.some((m) => m.value === requested) ? requested : firstMethod;
74
+ /**
75
+ * Which tools can say something under a given method.
76
+ *
77
+ * Takes the method as an argument rather than closing over the active one,
78
+ * because the method handler has to ask about the method being switched TO,
79
+ * before any state has moved.
80
+ */
81
+ const visibleFor = React.useCallback((forMethod) => {
82
+ // With no method axis there is no `steps` key to read, so a tool is only
83
+ // showable if it carries a `prompt`. The type permits a `steps` only tool,
84
+ // and passing one of those without `methods` used to put a tab on the strip
85
+ // over an empty bordered panel. Filtering matches what the panel can
86
+ // actually render, and the empty label covers the case where that leaves
87
+ // nothing.
88
+ if (!hasMethods)
89
+ return tools.filter((t) => Boolean(t.prompt));
90
+ return tools.filter((t) => {
91
+ const pane = forMethod ? t.steps?.[forMethod] : undefined;
92
+ return Array.isArray(pane) && pane.length > 0;
93
+ });
94
+ }, [tools, hasMethods]);
95
+ const visible = React.useMemo(() => visibleFor(activeMethod), [visibleFor, activeMethod]);
35
96
  // Uncontrolled falls back to the first tool rather than nothing: a tab strip
36
97
  // with no panel under it reads as broken, and there is no "unselected" state
37
98
  // this screen means.
38
- const first = tools[0]?.value;
39
- const headingId = React.useId();
40
- return (_jsxs("section", { "data-slot": "tool-setup", className: cn("flex flex-col gap-8", className), ...props, children: [title ? (_jsx(PageHeading, { id: headingId, eyebrow: eyebrow, title: title, sub: sub, size: headingSize, level: level })) : null, _jsxs(Tabs, { value: value, defaultValue: defaultValue ?? first, onValueChange: (next) => onValueChange?.(String(next)), className: "flex flex-col gap-4", children: [_jsx(TabsList
99
+ //
100
+ // The first VISIBLE tool, not `tools[0]`. Under a method the first tool does
101
+ // not support, seeding from the raw array starts the component holding a
102
+ // selection that was never on screen, and every later method switch then
103
+ // reasons from that phantom instead of from the tab the user can see.
104
+ /**
105
+ * The fallback skips disabled tools, and only settles for one when every tool
106
+ * is disabled.
107
+ *
108
+ * Before this PR the fallback was merely painted, so landing on a disabled tab
109
+ * was cosmetic. It is reported now, by the effect below and by `changeMethod`,
110
+ * which makes it a parent being told a tool is selected that the user cannot
111
+ * select themselves and Continue would proceed with.
112
+ */
113
+ const firstShowable = (list) => (list.find((t) => !t.disabled) ?? list[0])?.value;
114
+ const first = firstShowable(visible);
115
+ const [ownTool, setOwnTool] = React.useState(defaultValue ?? first);
116
+ const selectedTool = value ?? ownTool;
117
+ /**
118
+ * The render time fallback, for when the selection is not on the strip: a
119
+ * controlled `value` restored from a URL or a session, a new `tools` array, a
120
+ * `steps` edit.
121
+ *
122
+ * Undefined only when the strip is empty, which is what lets the two places
123
+ * below tell "nothing is showable" apart from "something else is showing".
124
+ */
125
+ const activeTool = visible.find((t) => t.value === selectedTool)?.value ?? first;
126
+ /**
127
+ * Report a fallback the render body performed, once, after paint.
128
+ *
129
+ * Falling back in render alone leaves a controlled parent holding a tool the
130
+ * strip is not showing, with no way back: clicking the tab it CAN see fires
131
+ * nothing, because `Tabs` already counts that one as selected. The console
132
+ * restoring `method="cli"` with `value="chatgpt"` reaches that state without
133
+ * anyone touching a method tab, and Continue then proceeds with the wrong
134
+ * tool.
135
+ *
136
+ * An effect rather than a call from the render body. Reporting during render
137
+ * is the thing this component is careful not to do; reporting after it is
138
+ * committed says the same thing without writing state mid-render.
139
+ *
140
+ * The empty strip is deliberately excluded. `activeTool` is undefined there
141
+ * and nothing is showing, so there is nothing to correct TO, and clearing
142
+ * would lose the tool across a round trip through a method nothing supports.
143
+ */
144
+ const reportedTool = React.useRef(undefined);
145
+ const reportedMethod = React.useRef(undefined);
146
+ React.useEffect(() => {
147
+ // The parent caught up, or there is nothing to correct to. Forget what was
148
+ // reported, so a later genuine fallback to the same tool is announced again
149
+ // rather than swallowed.
150
+ if (activeTool === selectedTool)
151
+ reportedTool.current = undefined;
152
+ if (activeTool === undefined || activeTool === selectedTool)
153
+ return;
154
+ // Report each fallback once. `onValueChange` is usually an inline arrow, so
155
+ // its identity changes every render and this effect re-runs; a parent that
156
+ // applies the value ASYNCHRONOUSLY has not caught up yet, so the condition
157
+ // is still true and it would be told again on every render in between. With
158
+ // the console's `router.replace` that is duplicate navigations and duplicate
159
+ // analytics, not just a duplicate call.
160
+ if (reportedTool.current === activeTool)
161
+ return;
162
+ reportedTool.current = activeTool;
163
+ if (value === undefined)
164
+ setOwnTool(activeTool);
165
+ onValueChange?.(activeTool);
166
+ }, [activeTool, selectedTool, value, onValueChange]);
167
+ /**
168
+ * The same reconciliation for the METHOD axis.
169
+ *
170
+ * An unknown `method` or `defaultMethod` falls back to the first in the render
171
+ * body, and used to tell nobody: the strip showed MCP while the parent still
172
+ * held a method that is not on the list, with nothing able to correct it. A
173
+ * saved preference naming a method later removed from `methods` reaches that
174
+ * state, which is the same restore case that motivated the tool effect.
175
+ *
176
+ * Shipping the reconcile-after-paint pattern on one axis and not the other is
177
+ * also the kind of asymmetry that reads as deliberate and is not.
178
+ */
179
+ React.useEffect(() => {
180
+ if (!hasMethods || activeMethod === undefined)
181
+ return;
182
+ if (activeMethod === requested) {
183
+ reportedMethod.current = undefined;
184
+ return;
185
+ }
186
+ if (reportedMethod.current === activeMethod)
187
+ return;
188
+ reportedMethod.current = activeMethod;
189
+ if (method === undefined)
190
+ setOwnMethod(activeMethod);
191
+ onMethodChange?.(activeMethod);
192
+ }, [hasMethods, activeMethod, requested, method, onMethodChange]);
193
+ /** Switch method, and report the tool switch it forces. */
194
+ const changeMethod = (next) => {
195
+ if (method === undefined)
196
+ setOwnMethod(next);
197
+ onMethodChange?.(next);
198
+ // Reason from `activeTool`, the tool ON SCREEN, never from `selectedTool`.
199
+ // The two diverge whenever the render time fallback above is doing work, and
200
+ // asking whether the stale one survives the switch answers the wrong
201
+ // question: it returns early, reports nothing, and the strip lands on a tool
202
+ // the user never picked, so the selection appears to move on its own.
203
+ //
204
+ // Carrying the visible tool across is also the better outcome. Changing
205
+ // method changes the steps, not the tool, whenever the tool has steps for
206
+ // both.
207
+ //
208
+ // `activeTool` is undefined on an empty strip, where nothing is on screen to
209
+ // reason from. Fall back to the stored tool there, or a round trip through a
210
+ // method nothing supports loses the selection: `undefined` matches no tool
211
+ // in `nextVisible`, so the way back would report `nextVisible[0]` over a
212
+ // perfectly good tool the user picked before leaving.
213
+ const current = activeTool ?? selectedTool;
214
+ const nextVisible = visibleFor(next);
215
+ const target = nextVisible.some((t) => t.value === current)
216
+ ? current
217
+ : firstShowable(nextVisible);
218
+ // Undefined is the strip staying empty. Keep the selection rather than
219
+ // dropping it, so a later method that supports it restores the tool.
220
+ if (target === undefined || target === selectedTool)
221
+ return;
222
+ // Claim the report here too. A controlled parent that applies on a later
223
+ // tick would otherwise be told the same thing a second time by the effect
224
+ // above, on the render in between.
225
+ reportedTool.current = target;
226
+ if (value === undefined)
227
+ setOwnTool(target);
228
+ onValueChange?.(target);
229
+ };
230
+ // Groups with nothing in them do not render, and neither does the divider
231
+ // that would have sat beside one.
232
+ const grouped = React.useMemo(() => {
233
+ if (!groups?.length)
234
+ return [{ group: null, items: visible }];
235
+ const out = groups
236
+ .map((group) => ({ group, items: visible.filter((t) => t.group === group.value) }))
237
+ .filter((g) => g.items.length > 0);
238
+ const ungrouped = visible.filter((t) => !groups.some((g) => g.value === t.group));
239
+ if (ungrouped.length)
240
+ out.push({ group: null, items: ungrouped });
241
+ return out;
242
+ }, [groups, visible]);
243
+ return (_jsxs("section", { "data-slot": "tool-setup", className: cn("flex flex-col gap-8", className), ...props, children: [title ? (_jsx(PageHeading, { id: headingId, eyebrow: eyebrow, title: title, sub: sub, size: headingSize, level: level })) : null, hasMethods ? (_jsx(Tabs, { value: activeMethod, onValueChange: (next) => changeMethod(String(next)), "data-slot": "tool-setup-methods", children: _jsx(TabsList
244
+ // Same `h-auto!` reasoning as the tool strip below: the strip must
245
+ // be free to grow, and the prefixed `h-8` wins the cascade without
246
+ // the important.
247
+ , {
248
+ // Same `h-auto!` reasoning as the tool strip below: the strip must
249
+ // be free to grow, and the prefixed `h-8` wins the cascade without
250
+ // the important.
251
+ className: "h-auto! w-fit flex-wrap gap-2", children: methods.map((m) => (_jsx(TabsTrigger, { value: m.value, disabled: m.disabled, children: m.label }, m.value))) }) })) : null, visible.length === 0 ? (_jsx("p", { "data-slot": "tool-setup-empty", className: "m-0 rounded-lg border border-hairline bg-card p-5 text-body-sm text-faint", children: emptyLabel })) : (_jsxs(Tabs
252
+ // Never undefined: Base UI warns when a value goes from uncontrolled to
253
+ // controlled, which is what an empty strip filling in later would do.
254
+ , {
255
+ // Never undefined: Base UI warns when a value goes from uncontrolled to
256
+ // controlled, which is what an empty strip filling in later would do.
257
+ value: activeTool ?? "", onValueChange: (next) => {
258
+ const id = String(next);
259
+ if (value === undefined)
260
+ setOwnTool(id);
261
+ onValueChange?.(id);
262
+ }, className: "flex flex-col gap-4", children: [_jsx(TabsList
41
263
  // Labelled by the lockup when there is one, so the strip is announced
42
264
  // as the setup's tool list rather than an unnamed set of tabs.
43
265
  , { ...(title ? { "aria-labelledby": headingId } : {}), "data-slot": "tool-setup-tabs",
@@ -57,14 +279,17 @@ function ToolSetup({ tools, value, defaultValue, onValueChange, title, sub, eyeb
57
279
  //
58
280
  // Important settles it without depending on which utility `cn()` keeps
59
281
  // or what order Tailwind emits them in.
60
- className: "h-auto! w-full flex-wrap justify-start gap-2 bg-transparent p-0", children: tools.map((tool) => (_jsx(TabsTrigger, { value: tool.value, disabled: tool.disabled, "data-slot": "tool-setup-tab", className: TRIGGER_CLASS, children: tool.label }, tool.value))) }), tools.map((tool) => (_jsx(TabsContent, { value: tool.value, "data-slot": "tool-setup-panel", className: "rounded-lg border border-hairline bg-card p-5", children: _jsxs("div", { className: "flex flex-col gap-4", children: [tool.instruction || tool.alternative ? (_jsxs("div", { className: "flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1", children: [tool.instruction ? (_jsx("p", { className: "m-0 text-body-sm text-body", children: tool.instruction })) : (_jsx("span", {})), tool.alternative ? (_jsx("a", { href: tool.alternative.href, "data-slot": "tool-setup-alternative",
61
- // `--cg-link` is a token but NOT a generated utility —
62
- // there is no `--color-link`, so `text-link` emits
63
- // nothing and the link paints as body text. The arbitrary
64
- // form is how the library reaches an ungenerated token,
65
- // the same way onboarding-question writes
66
- // `ring-(--cg-border-strong)`.
67
- className: "text-body-sm text-(--cg-link) underline-offset-4 hover:text-(--cg-link-hover) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", children: tool.alternative.label })) : null] })) : null, _jsx(CodeBlock, { code: tool.prompt })] }) }, tool.value)))] }), continueLabel !== null || footer ? (_jsxs("div", { "data-slot": "tool-setup-actions", className: "flex flex-col items-start gap-4", children: [continueLabel !== null ? (_jsx(Button, { type: "button", size: "lg", "data-slot": "tool-setup-continue", onClick: onContinue, disabled: !canContinue, children: continueLabel })) : null, footer] })) : null] }));
282
+ className: "h-auto! w-full flex-wrap justify-start gap-2 bg-transparent p-0", children: grouped.map(({ group, items }, gi) => (_jsxs(React.Fragment, { children: [gi > 0 ? (_jsx(Separator, { orientation: "vertical", "aria-hidden": "true", className: "mx-1 h-8 self-center" })) : null, group ? (_jsx("span", { "aria-hidden": "true", "data-slot": "tool-setup-group", className: "self-center px-1 text-caption text-faint", children: group.label })) : null, items.map((tool) => (_jsxs(TabsTrigger, { value: tool.value, disabled: tool.disabled, "data-slot": "tool-setup-tab", ...(group ? { "aria-label": `${tool.label}, ${group.label}` } : {}), className: TRIGGER_CLASS, children: [tool.mark, tool.label] }, tool.value)))] }, group?.value ?? `ungrouped-${gi}`))) }), visible.map((tool) => {
283
+ const pane = hasMethods && activeMethod ? tool.steps?.[activeMethod] : undefined;
284
+ return (_jsx(TabsContent, { value: tool.value, "data-slot": "tool-setup-panel", className: "rounded-lg border border-hairline bg-card p-5", children: _jsxs("div", { className: "flex flex-col gap-4", children: [tool.instruction || tool.alternative ? (_jsxs("div", { className: "flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1", children: [tool.instruction ? (_jsx("p", { className: "m-0 text-body-sm text-body", children: tool.instruction })) : (_jsx("span", {})), tool.alternative ? (_jsx("a", { href: tool.alternative.href, "data-slot": "tool-setup-alternative",
285
+ // `--cg-link` is a token but NOT a generated utility —
286
+ // there is no `--color-link`, so `text-link` emits
287
+ // nothing and the link paints as body text. The arbitrary
288
+ // form is how the library reaches an ungenerated token,
289
+ // the same way onboarding-question writes
290
+ // `ring-(--cg-border-strong)`.
291
+ className: "text-body-sm text-(--cg-link) underline-offset-4 hover:text-(--cg-link-hover) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", children: tool.alternative.label })) : null] })) : null, pane?.length ? (_jsx(StepPane, { steps: pane })) : tool.prompt ? (_jsx(CodeBlock, { code: tool.prompt })) : null] }) }, tool.value));
292
+ })] })), continueLabel !== null || footer ? (_jsxs("div", { "data-slot": "tool-setup-actions", className: "flex flex-col items-start gap-4", children: [continueLabel !== null ? (_jsx(Button, { type: "button", size: "lg", "data-slot": "tool-setup-continue", onClick: onContinue, disabled: !canContinue, children: continueLabel })) : null, footer] })) : null] }));
68
293
  }
69
294
  export { ToolSetup };
70
295
  //# sourceMappingURL=tool-setup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-setup.js","sourceRoot":"","sources":["../../src/blocks/tool-setup.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAiEvC;;;;;;;;GAQG;AACH,MAAM,aAAa,GAAG,EAAE;AACtB,wEAAwE;AACxE,6EAA6E;AAC7E,2EAA2E;AAC3E,kEAAkE;AAClE,EAAE;AACF,+EAA+E;AAC/E,8EAA8E;AAC9E,+BAA+B;AAC/B,gFAAgF,EAChF,6DAA6D;AAC7D,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,6EAA6E;AAC7E,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,EAAE,CAAC,WAAW,YAErB,aAAa,GACP,CACV,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,IACH,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAA;AACH,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
package/dist/fonts.css CHANGED
@@ -2,27 +2,56 @@
2
2
  Self-hosted webfonts, not a font CDN: a third-party request in the critical
3
3
  path is both a latency cost and a privacy one.
4
4
 
5
- Two faces. Manrope carries everything a reader sees — body, headings and the
6
- display rung alike, since the 2026-09-10 re-skin (#197) set the whole system in
7
- it — and JetBrains Mono is used only inside prompt and terminal surfaces. Both
8
- are VARIABLE faces, so the brand's four weights (400 regular, 500 medium, 600
9
- semibold, 700 display) are one file each rather than four.
5
+ Three faces ship here, and a fourth is named but deliberately absent.
6
+
7
+ Space Grotesk carries everything a reader reads. Every body string on all six
8
+ canonical Figma frames is set in it, at 20/1.46 for a lede and 15/1.46 for card
9
+ copy and nav, and it arrives as @fontsource-variable/space-grotesk under
10
+ OFL-1.1, which permits redistribution — the same mechanism Manrope already uses,
11
+ one more line. cloudgrid-landing#145 has the frame-by-frame evidence.
12
+
13
+ Manrope stays, and not as a fallback. The frames keep it for exactly two jobs,
14
+ the eyebrow above a heading and the label inside a button, and that pair is now
15
+ --cg-font-ui rather than --cg-font-body. Nothing about how those two render
16
+ changed; only which token spells them.
17
+
18
+ JetBrains Mono is used only inside prompt and terminal surfaces. Worth knowing:
19
+ NO monospace face appears anywhere in the six frames. What reads as a terminal
20
+ there is Space Grotesk at 22px (thegrid 8364:4510) or Manrope at 15px (builders
21
+ 6916:8104), so the mono rung is this package's own idea and the design does not
22
+ contradict it or confirm it.
23
+
24
+ All three are VARIABLE faces, so the brand's four weights (400 regular, 500
25
+ medium, 600 semibold, 700 display) are one file each rather than four.
26
+
27
+ TANKER IS THE DISPLAY FACE AND IT CANNOT SHIP HERE. The frames set every
28
+ headline in it; the ITF Free Font Licence section 02 forbids redistributing the
29
+ Font Software through "a repository, download service, application or platform",
30
+ and this package is public on registry.npmjs.org. So tokens.css names the stack
31
+ and each consumer fetches its own copy from Fontshare, bound by section 03 in
32
+ its own right. --cg-font-display's note carries the full reasoning; ui#240 is
33
+ the issue, and its open question — whether naming a display face at all
34
+ reverses the 2026-09-10 re-skin (#197) — is the founder's, not this file's.
10
35
 
11
36
  Saira Semi Condensed 800 was here as the self-hosted stand-in for the licensed
12
37
  Futura Condensed Extra Bold, and both are gone with the condensed display rung.
13
- A consumer that wants a display face back puts it in front of --cg-font-display
14
- in its own :root; nothing here has to change.
38
+ The escape hatch that note described — a consumer putting its own display face
39
+ in front of --cg-font-display in its own :root — is what cloudgrid-landing PR
40
+ #132 used, and it is what naming Tanker in the stack retires. A consumer still
41
+ has to @font-face its own Tanker files; it no longer has to copy this package's
42
+ fallback chain verbatim to do it, and that copy is what went stale.
15
43
 
16
44
  The family stacks live in tokens.css.
17
45
 
18
46
  These are bare package specifiers: Vite (Astro) and Next's css-loader both
19
- resolve them. A pipeline that cannot should import the two fontsource packages
47
+ resolve them. A pipeline that cannot should import the three fontsource packages
20
48
  directly.
21
49
 
22
- Both packages are real dependencies of @cloudgrid-io/ui, so installing this
50
+ All three are real dependencies of @cloudgrid-io/ui, so installing this
23
51
  package is enough. v0 also shipped a '@cloudgrid/ui/fonts' JS entry for
24
52
  pipelines that cannot resolve bare CSS specifiers; it was not ported. Add it
25
53
  if a consumer turns out to need it rather than on speculation.
26
54
  */
55
+ @import '@fontsource-variable/space-grotesk';
27
56
  @import '@fontsource-variable/manrope';
28
57
  @import '@fontsource-variable/jetbrains-mono';
package/dist/index.d.ts CHANGED
@@ -7,11 +7,14 @@ export * from "./ui/checkbox.js";
7
7
  export * from "./ui/code-block.js";
8
8
  export * from "./ui/combobox.js";
9
9
  export * from "./ui/dialog.js";
10
+ export * from "./ui/drawer.js";
10
11
  export * from "./ui/dropdown-menu.js";
11
12
  export * from "./ui/input-group.js";
12
13
  export * from "./ui/input.js";
13
14
  export * from "./ui/number-field.js";
14
15
  export * from "./ui/panel.js";
16
+ export * from "./ui/popover.js";
17
+ export * from "./ui/radio-group.js";
15
18
  export * from "./ui/select.js";
16
19
  export * from "./ui/separator.js";
17
20
  export * from "./ui/skeleton.js";
@@ -47,8 +50,10 @@ export * from "./blocks/pricing-tier-cards.js";
47
50
  export * from "./blocks/pricing-tiers.js";
48
51
  export * from "./blocks/quote.js";
49
52
  export * from "./blocks/rich-text.js";
53
+ export * from "./blocks/side-nav.js";
50
54
  export * from "./blocks/sign-in-options.js";
51
55
  export * from "./blocks/stage-panel.js";
56
+ export * from "./blocks/stat-tile.js";
52
57
  export * from "./blocks/step-item.js";
53
58
  export * from "./blocks/token-specimen.js";
54
59
  export * from "./blocks/tool-logo.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAG/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;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AAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AAGtC,cAAc,uBAAuB,CAAA"}
package/dist/index.js CHANGED
@@ -23,11 +23,14 @@ export * from "./ui/checkbox.js";
23
23
  export * from "./ui/code-block.js";
24
24
  export * from "./ui/combobox.js";
25
25
  export * from "./ui/dialog.js";
26
+ export * from "./ui/drawer.js";
26
27
  export * from "./ui/dropdown-menu.js";
27
28
  export * from "./ui/input-group.js";
28
29
  export * from "./ui/input.js";
29
30
  export * from "./ui/number-field.js";
30
31
  export * from "./ui/panel.js";
32
+ export * from "./ui/popover.js";
33
+ export * from "./ui/radio-group.js";
31
34
  export * from "./ui/select.js";
32
35
  export * from "./ui/separator.js";
33
36
  export * from "./ui/skeleton.js";
@@ -64,8 +67,10 @@ export * from "./blocks/pricing-tier-cards.js";
64
67
  export * from "./blocks/pricing-tiers.js";
65
68
  export * from "./blocks/quote.js";
66
69
  export * from "./blocks/rich-text.js";
70
+ export * from "./blocks/side-nav.js";
67
71
  export * from "./blocks/sign-in-options.js";
68
72
  export * from "./blocks/stage-panel.js";
73
+ export * from "./blocks/stat-tile.js";
69
74
  export * from "./blocks/step-item.js";
70
75
  export * from "./blocks/token-specimen.js";
71
76
  export * from "./blocks/tool-logo.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,oEAAoE;AACpE,EAAE;AACF,gFAAgF;AAChF,+EAA+E;AAC/E,yEAAyE;AACzE,gFAAgF;AAChF,4EAA4E;AAC5E,EAAE;AACF,kEAAkE;AAClE,8EAA8E;AAC9E,uEAAuE;AAEvE,cAAc;AACd,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB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AAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AAEtC,0EAA0E;AAC1E,cAAc,uBAAuB,CAAA"}
@@ -60,6 +60,6 @@ import { type ClassValue } from "clsx";
60
60
  * to write `font-regular` rediscovers this.
61
61
  */
62
62
  export declare const BRAND_FONT_WEIGHTS: readonly ["heavy", "regular"];
63
- export declare const BRAND_FONT_SIZES: readonly ["display-xl", "display-lg", "display-md", "display-sm", "heading-lg", "heading-md", "heading-sm", "body-lg", "body-md", "body-sm", "caption", "mono", "label"];
63
+ export declare const BRAND_FONT_SIZES: readonly ["display-3xl", "display-2xl", "display-xl", "display-lg", "display-md", "display-sm", "title-lg", "title-md", "title-sm", "heading-lg", "heading-md", "heading-sm", "body-xl", "body-lg", "body-md", "body-sm", "caption", "mono", "label", "eyebrow"];
64
64
  export declare function cn(...inputs: ClassValue[]): string;
65
65
  //# sourceMappingURL=cloudgrid-cn.d.ts.map