@cloudgrid-io/ui 0.27.1 → 0.27.2
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.
- package/dist/blocks/icons.d.ts +1 -1
- package/dist/blocks/icons.d.ts.map +1 -1
- package/dist/blocks/icons.js +13 -1
- package/dist/blocks/icons.js.map +1 -1
- package/dist/blocks/side-nav.d.ts +49 -0
- package/dist/blocks/side-nav.d.ts.map +1 -0
- package/dist/blocks/side-nav.js +217 -0
- package/dist/blocks/side-nav.js.map +1 -0
- package/dist/blocks/stat-tile.d.ts +69 -0
- package/dist/blocks/stat-tile.d.ts.map +1 -0
- package/dist/blocks/stat-tile.js +54 -0
- package/dist/blocks/stat-tile.js.map +1 -0
- package/dist/blocks/tool-setup.d.ts +105 -4
- package/dist/blocks/tool-setup.d.ts.map +1 -1
- package/dist/blocks/tool-setup.js +238 -13
- package/dist/blocks/tool-setup.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/popover.d.ts +83 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +102 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/radio-group.d.ts +21 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +101 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/package.json +1 -1
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"tool-setup.d.ts","sourceRoot":"","sources":["../../src/blocks/tool-setup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,C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,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;IAC9D;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,MAAM,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
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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,yEAA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Q,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/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export * from "./ui/input-group.js";
|
|
|
12
12
|
export * from "./ui/input.js";
|
|
13
13
|
export * from "./ui/number-field.js";
|
|
14
14
|
export * from "./ui/panel.js";
|
|
15
|
+
export * from "./ui/popover.js";
|
|
16
|
+
export * from "./ui/radio-group.js";
|
|
15
17
|
export * from "./ui/select.js";
|
|
16
18
|
export * from "./ui/separator.js";
|
|
17
19
|
export * from "./ui/skeleton.js";
|
|
@@ -47,8 +49,10 @@ export * from "./blocks/pricing-tier-cards.js";
|
|
|
47
49
|
export * from "./blocks/pricing-tiers.js";
|
|
48
50
|
export * from "./blocks/quote.js";
|
|
49
51
|
export * from "./blocks/rich-text.js";
|
|
52
|
+
export * from "./blocks/side-nav.js";
|
|
50
53
|
export * from "./blocks/sign-in-options.js";
|
|
51
54
|
export * from "./blocks/stage-panel.js";
|
|
55
|
+
export * from "./blocks/stat-tile.js";
|
|
52
56
|
export * from "./blocks/step-item.js";
|
|
53
57
|
export * from "./blocks/token-specimen.js";
|
|
54
58
|
export * from "./blocks/tool-logo.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,u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Ac,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;AAGtC,cAAc,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,8 @@ export * from "./ui/input-group.js";
|
|
|
28
28
|
export * from "./ui/input.js";
|
|
29
29
|
export * from "./ui/number-field.js";
|
|
30
30
|
export * from "./ui/panel.js";
|
|
31
|
+
export * from "./ui/popover.js";
|
|
32
|
+
export * from "./ui/radio-group.js";
|
|
31
33
|
export * from "./ui/select.js";
|
|
32
34
|
export * from "./ui/separator.js";
|
|
33
35
|
export * from "./ui/skeleton.js";
|
|
@@ -64,8 +66,10 @@ export * from "./blocks/pricing-tier-cards.js";
|
|
|
64
66
|
export * from "./blocks/pricing-tiers.js";
|
|
65
67
|
export * from "./blocks/quote.js";
|
|
66
68
|
export * from "./blocks/rich-text.js";
|
|
69
|
+
export * from "./blocks/side-nav.js";
|
|
67
70
|
export * from "./blocks/sign-in-options.js";
|
|
68
71
|
export * from "./blocks/stage-panel.js";
|
|
72
|
+
export * from "./blocks/stat-tile.js";
|
|
69
73
|
export * from "./blocks/step-item.js";
|
|
70
74
|
export * from "./blocks/token-specimen.js";
|
|
71
75
|
export * from "./blocks/tool-logo.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|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AAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AAEtC,0EAA0E;AAC1E,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
|
+
/**
|
|
4
|
+
* An anchored panel: a button, and a container that opens against it (#228).
|
|
5
|
+
*
|
|
6
|
+
* The third overlay in this library and the first one that is neither centred
|
|
7
|
+
* nor a menu. `Dialog` is modal and sits in the middle of the viewport, which is
|
|
8
|
+
* wrong for an editor attached to the control that opened it. `DropdownMenu` is
|
|
9
|
+
* a menu: its children are `role="menuitem"`, arrow keys move between them, and
|
|
10
|
+
* typing jumps to a label. A panel holding two radio groups, a checkbox list and
|
|
11
|
+
* two buttons is not a menu, and announcing it as one tells a screen reader user
|
|
12
|
+
* that Escape and the arrow keys mean something they do not.
|
|
13
|
+
*
|
|
14
|
+
* The console hand-rolls exactly this in `HeaderVisibilityPopover.tsx` — its own
|
|
15
|
+
* portal, its own outside-click listener, its own Escape handler, its own focus
|
|
16
|
+
* return. All four are Base UI defaults here, which is the whole reason this is a
|
|
17
|
+
* library primitive rather than a copy of that file.
|
|
18
|
+
*
|
|
19
|
+
* ## What comes from Base UI, and is therefore asserted rather than written
|
|
20
|
+
*
|
|
21
|
+
* `role="dialog"` on the popup, `aria-labelledby` pointing at `PopoverTitle`
|
|
22
|
+
* whenever one is rendered and absent when one is not, Escape and outside-press
|
|
23
|
+
* dismiss, focus moving to the first tabbable element on open, and focus
|
|
24
|
+
* returning to the trigger on close. None of it is reimplemented here. All of it
|
|
25
|
+
* is covered in `registry/e2e/radio-group-popover.spec.ts`, because "the library
|
|
26
|
+
* gives us this" is a claim and this repo measures claims.
|
|
27
|
+
*
|
|
28
|
+
* It is NOT modal by default. Page scroll stays live and the rest of the document
|
|
29
|
+
* stays interactive, which is right for an editor anchored to a header button.
|
|
30
|
+
* Pass `modal` through to `Popover` for the other behaviour.
|
|
31
|
+
*
|
|
32
|
+
* ## `container`, and the surface it exists for
|
|
33
|
+
*
|
|
34
|
+
* Base UI portals the popup to `<body>`. Every `--cg-*` value in this system is
|
|
35
|
+
* inherited, and `data-cg-surface` is a container attribute, so a popup portaled
|
|
36
|
+
* to the body escapes its surface scope entirely: a popover opened from a button
|
|
37
|
+
* inside an ink header renders with the page's tokens, and looks completely
|
|
38
|
+
* correct in the only place anyone checks.
|
|
39
|
+
*
|
|
40
|
+
* `container` forwards to `Popover.Portal`'s own prop, so a consumer can anchor
|
|
41
|
+
* the portal inside the surface. The gallery uses it to render this component on
|
|
42
|
+
* the panel and on ink for real; without it the three frames would be three
|
|
43
|
+
* copies of the page one wearing different borders.
|
|
44
|
+
*
|
|
45
|
+
* ## Tokens, and the one thing an overlay cannot inherit
|
|
46
|
+
*
|
|
47
|
+
* Card ground, control border, raised shadow, per #228. `bg-popover` resolves to
|
|
48
|
+
* `--cg-surface-card` and `--popover` is declared once per surface scope, so the
|
|
49
|
+
* ground flips with the surface (rule 2).
|
|
50
|
+
*
|
|
51
|
+
* On the two dark surfaces that card ground is `transparent` (panel) and a 4%
|
|
52
|
+
* white wash (ink), because a CARD on a purple panel is meant to let the purple
|
|
53
|
+
* through — `shadcn.css` says so in as many words. An OVERLAY is the one thing
|
|
54
|
+
* that cannot: it is drawn over arbitrary content, and a transparent panel over a
|
|
55
|
+
* list renders both sets of words on top of each other. Measured, not assumed:
|
|
56
|
+
* the first version of this component was completely illegible on both dark
|
|
57
|
+
* frames in the gallery and completely correct on white, which is the only place
|
|
58
|
+
* anyone would have looked.
|
|
59
|
+
*
|
|
60
|
+
* So the ground is opaque in every scope, out of values this system already has:
|
|
61
|
+
* the card ground on the page, and each dark surface's OWN ground on the dark
|
|
62
|
+
* surfaces. No new token and no new colour — `bg-panel` is `--cg-surface-panel`
|
|
63
|
+
* and `bg-code` is `--cg-surface-code`. The panel is then told apart from what is
|
|
64
|
+
* behind it by the border and the shadow rather than by a tint, which is what
|
|
65
|
+
* both of those are for.
|
|
66
|
+
*
|
|
67
|
+
* KNOWN, and not fixed here: `Dialog`, `DropdownMenu`, `Select` and `Combobox`
|
|
68
|
+
* are all authored with `bg-popover` and have the same hole on the same two
|
|
69
|
+
* surfaces. The one-line fix is `--popover` per scope in `shadcn.css`, beside the
|
|
70
|
+
* four backgrounds that already get that treatment, and it changes what four
|
|
71
|
+
* shipped components render on dark grounds — which is a design-system decision
|
|
72
|
+
* rather than a line in a PR about two primitives.
|
|
73
|
+
*/
|
|
74
|
+
declare function Popover({ ...props }: PopoverPrimitive.Root.Props): React.JSX.Element;
|
|
75
|
+
declare function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props): React.JSX.Element;
|
|
76
|
+
declare function PopoverPortal({ ...props }: PopoverPrimitive.Portal.Props): React.JSX.Element;
|
|
77
|
+
declare function PopoverClose({ ...props }: PopoverPrimitive.Close.Props): React.JSX.Element;
|
|
78
|
+
declare function PopoverContent({ align, alignOffset, side, sideOffset, container, className, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & Pick<PopoverPrimitive.Portal.Props, "container">): React.JSX.Element;
|
|
79
|
+
declare function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): React.JSX.Element;
|
|
80
|
+
declare function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): React.JSX.Element;
|
|
81
|
+
declare function PopoverFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
82
|
+
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverFooter, PopoverPortal, PopoverTitle, PopoverTrigger, };
|
|
83
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,E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c,EACd,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,GACf,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
5
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
6
|
+
/**
|
|
7
|
+
* An anchored panel: a button, and a container that opens against it (#228).
|
|
8
|
+
*
|
|
9
|
+
* The third overlay in this library and the first one that is neither centred
|
|
10
|
+
* nor a menu. `Dialog` is modal and sits in the middle of the viewport, which is
|
|
11
|
+
* wrong for an editor attached to the control that opened it. `DropdownMenu` is
|
|
12
|
+
* a menu: its children are `role="menuitem"`, arrow keys move between them, and
|
|
13
|
+
* typing jumps to a label. A panel holding two radio groups, a checkbox list and
|
|
14
|
+
* two buttons is not a menu, and announcing it as one tells a screen reader user
|
|
15
|
+
* that Escape and the arrow keys mean something they do not.
|
|
16
|
+
*
|
|
17
|
+
* The console hand-rolls exactly this in `HeaderVisibilityPopover.tsx` — its own
|
|
18
|
+
* portal, its own outside-click listener, its own Escape handler, its own focus
|
|
19
|
+
* return. All four are Base UI defaults here, which is the whole reason this is a
|
|
20
|
+
* library primitive rather than a copy of that file.
|
|
21
|
+
*
|
|
22
|
+
* ## What comes from Base UI, and is therefore asserted rather than written
|
|
23
|
+
*
|
|
24
|
+
* `role="dialog"` on the popup, `aria-labelledby` pointing at `PopoverTitle`
|
|
25
|
+
* whenever one is rendered and absent when one is not, Escape and outside-press
|
|
26
|
+
* dismiss, focus moving to the first tabbable element on open, and focus
|
|
27
|
+
* returning to the trigger on close. None of it is reimplemented here. All of it
|
|
28
|
+
* is covered in `registry/e2e/radio-group-popover.spec.ts`, because "the library
|
|
29
|
+
* gives us this" is a claim and this repo measures claims.
|
|
30
|
+
*
|
|
31
|
+
* It is NOT modal by default. Page scroll stays live and the rest of the document
|
|
32
|
+
* stays interactive, which is right for an editor anchored to a header button.
|
|
33
|
+
* Pass `modal` through to `Popover` for the other behaviour.
|
|
34
|
+
*
|
|
35
|
+
* ## `container`, and the surface it exists for
|
|
36
|
+
*
|
|
37
|
+
* Base UI portals the popup to `<body>`. Every `--cg-*` value in this system is
|
|
38
|
+
* inherited, and `data-cg-surface` is a container attribute, so a popup portaled
|
|
39
|
+
* to the body escapes its surface scope entirely: a popover opened from a button
|
|
40
|
+
* inside an ink header renders with the page's tokens, and looks completely
|
|
41
|
+
* correct in the only place anyone checks.
|
|
42
|
+
*
|
|
43
|
+
* `container` forwards to `Popover.Portal`'s own prop, so a consumer can anchor
|
|
44
|
+
* the portal inside the surface. The gallery uses it to render this component on
|
|
45
|
+
* the panel and on ink for real; without it the three frames would be three
|
|
46
|
+
* copies of the page one wearing different borders.
|
|
47
|
+
*
|
|
48
|
+
* ## Tokens, and the one thing an overlay cannot inherit
|
|
49
|
+
*
|
|
50
|
+
* Card ground, control border, raised shadow, per #228. `bg-popover` resolves to
|
|
51
|
+
* `--cg-surface-card` and `--popover` is declared once per surface scope, so the
|
|
52
|
+
* ground flips with the surface (rule 2).
|
|
53
|
+
*
|
|
54
|
+
* On the two dark surfaces that card ground is `transparent` (panel) and a 4%
|
|
55
|
+
* white wash (ink), because a CARD on a purple panel is meant to let the purple
|
|
56
|
+
* through — `shadcn.css` says so in as many words. An OVERLAY is the one thing
|
|
57
|
+
* that cannot: it is drawn over arbitrary content, and a transparent panel over a
|
|
58
|
+
* list renders both sets of words on top of each other. Measured, not assumed:
|
|
59
|
+
* the first version of this component was completely illegible on both dark
|
|
60
|
+
* frames in the gallery and completely correct on white, which is the only place
|
|
61
|
+
* anyone would have looked.
|
|
62
|
+
*
|
|
63
|
+
* So the ground is opaque in every scope, out of values this system already has:
|
|
64
|
+
* the card ground on the page, and each dark surface's OWN ground on the dark
|
|
65
|
+
* surfaces. No new token and no new colour — `bg-panel` is `--cg-surface-panel`
|
|
66
|
+
* and `bg-code` is `--cg-surface-code`. The panel is then told apart from what is
|
|
67
|
+
* behind it by the border and the shadow rather than by a tint, which is what
|
|
68
|
+
* both of those are for.
|
|
69
|
+
*
|
|
70
|
+
* KNOWN, and not fixed here: `Dialog`, `DropdownMenu`, `Select` and `Combobox`
|
|
71
|
+
* are all authored with `bg-popover` and have the same hole on the same two
|
|
72
|
+
* surfaces. The one-line fix is `--popover` per scope in `shadcn.css`, beside the
|
|
73
|
+
* four backgrounds that already get that treatment, and it changes what four
|
|
74
|
+
* shipped components render on dark grounds — which is a design-system decision
|
|
75
|
+
* rather than a line in a PR about two primitives.
|
|
76
|
+
*/
|
|
77
|
+
function Popover({ ...props }) {
|
|
78
|
+
return _jsx(PopoverPrimitive.Root, { ...props });
|
|
79
|
+
}
|
|
80
|
+
function PopoverTrigger({ ...props }) {
|
|
81
|
+
return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
82
|
+
}
|
|
83
|
+
function PopoverPortal({ ...props }) {
|
|
84
|
+
return _jsx(PopoverPrimitive.Portal, { "data-slot": "popover-portal", ...props });
|
|
85
|
+
}
|
|
86
|
+
function PopoverClose({ ...props }) {
|
|
87
|
+
return _jsx(PopoverPrimitive.Close, { "data-slot": "popover-close", ...props });
|
|
88
|
+
}
|
|
89
|
+
function PopoverContent({ align = "start", alignOffset = 0, side = "bottom", sideOffset = 8, container, className, ...props }) {
|
|
90
|
+
return (_jsx(PopoverPrimitive.Portal, { container: container, children: _jsx(PopoverPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", className: cn("grid max-h-(--available-height) w-80 max-w-[calc(100vw-2rem)] origin-(--transform-origin) gap-3 overflow-y-auto rounded-xl border border-line bg-popover p-4 text-body-sm text-popover-foreground shadow-raised duration-100 outline-none in-data-[cg-surface=ink]:bg-code in-data-[cg-surface=panel]:bg-panel data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
|
|
91
|
+
}
|
|
92
|
+
function PopoverTitle({ className, ...props }) {
|
|
93
|
+
return (_jsx(PopoverPrimitive.Title, { "data-slot": "popover-title", className: cn("font-heading text-body-md leading-none font-medium", className), ...props }));
|
|
94
|
+
}
|
|
95
|
+
function PopoverDescription({ className, ...props }) {
|
|
96
|
+
return (_jsx(PopoverPrimitive.Description, { "data-slot": "popover-description", className: cn("text-caption text-body", className), ...props }));
|
|
97
|
+
}
|
|
98
|
+
function PopoverFooter({ className, ...props }) {
|
|
99
|
+
return (_jsx("div", { "data-slot": "popover-footer", className: cn("flex flex-wrap justify-end gap-2 pt-1", className), ...props }));
|
|
100
|
+
}
|
|
101
|
+
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverFooter, PopoverPortal, PopoverTitle, PopoverTrigger, };
|
|
102
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/ui/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAEpE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH,SAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAA+B;IACxD,OAAO,KAAC,gBAAgB,CAAC,IAAI,OAAK,KAAK,GAAI,CAAA;AAC7C,CAAC;AAED,SAAS,c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L,KAAC,gBAAgB,CAAC,WAAW,iBACjB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC9C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACzE,OAAO,CACL,2BACY,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,OAAO,EACP,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,cAAc,GACf,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
3
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
4
|
+
declare function RadioGroup({ className, value, defaultValue, onValueChange, ...props }: RadioGroupPrimitive.Props): React.JSX.Element;
|
|
5
|
+
declare function Radio({ className, ...props }: RadioPrimitive.Root.Props): React.JSX.Element;
|
|
6
|
+
declare function RadioOption({ value, label, description, disabled, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "children"> & {
|
|
7
|
+
/** What the group reports when this row is picked. */
|
|
8
|
+
value: unknown;
|
|
9
|
+
/** The row's accessible name. One line. */
|
|
10
|
+
label: React.ReactNode;
|
|
11
|
+
/** A line under the label, wired as a description rather than part of the name. */
|
|
12
|
+
description?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The indented slot, rendered ONLY while this option is selected. The
|
|
16
|
+
* visibility editor puts its space checkboxes here.
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
export { Radio, RadioGroup, RadioOption };
|
|
21
|
+
//# sourceMappingURL=radio-group.d.ts.map
|