panelui-web 0.9.1 → 0.10.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.
@@ -0,0 +1,167 @@
1
+ /**
2
+ * ChoiceCards — one option chosen from a few, each shown as a picture of
3
+ * what it does.
4
+ *
5
+ * ```tsx
6
+ * <ChoiceCards defaultValue="rounded" aria-label="Pointer">
7
+ * <ChoiceCards.Item value="classic">
8
+ * <ChoiceCards.Media><ClassicPointer /></ChoiceCards.Media>
9
+ * <ChoiceCards.Label>Classic</ChoiceCards.Label>
10
+ * </ChoiceCards.Item>
11
+ * …
12
+ * </ChoiceCards>
13
+ * ```
14
+ *
15
+ * ## Show the option, not its name
16
+ *
17
+ * A pointer style, an aspect ratio, a background: options that are seen
18
+ * before they are understood. Each card leads with a picture of the option,
19
+ * so the choice is made by looking, and the name under it confirms it.
20
+ *
21
+ * ## The chosen one comes forward
22
+ *
23
+ * The chosen card is ringed in the theme colour, a check settles into its
24
+ * corner, and its picture grows a little, as if lifted towards the reader.
25
+ * The others stay flat, so a row of cards still reads as one choice and one
26
+ * set of alternatives.
27
+ */
28
+ import { Radio } from '@base-ui/react/radio';
29
+ import { RadioGroup } from '@base-ui/react/radio-group';
30
+ import { type ComponentProps, type CSSProperties, type ReactNode } from 'react';
31
+ export type ChoiceCardsColor = 'primary' | 'info' | 'success' | 'warning' | 'destructive';
32
+ declare const choiceCardsVariants: import("tailwind-variants").TVReturnType<{
33
+ color: {
34
+ primary: {
35
+ root: string;
36
+ };
37
+ info: {
38
+ root: string;
39
+ };
40
+ success: {
41
+ root: string;
42
+ };
43
+ warning: {
44
+ root: string;
45
+ };
46
+ destructive: {
47
+ root: string;
48
+ };
49
+ };
50
+ }, {
51
+ root: string;
52
+ item: string[];
53
+ media: string[];
54
+ check: string[];
55
+ text: string;
56
+ label: string;
57
+ description: string;
58
+ }, undefined, {
59
+ color: {
60
+ primary: {
61
+ root: string;
62
+ };
63
+ info: {
64
+ root: string;
65
+ };
66
+ success: {
67
+ root: string;
68
+ };
69
+ warning: {
70
+ root: string;
71
+ };
72
+ destructive: {
73
+ root: string;
74
+ };
75
+ };
76
+ }, {
77
+ root: string;
78
+ item: string[];
79
+ media: string[];
80
+ check: string[];
81
+ text: string;
82
+ label: string;
83
+ description: string;
84
+ }, import("tailwind-variants").TVReturnType<{
85
+ color: {
86
+ primary: {
87
+ root: string;
88
+ };
89
+ info: {
90
+ root: string;
91
+ };
92
+ success: {
93
+ root: string;
94
+ };
95
+ warning: {
96
+ root: string;
97
+ };
98
+ destructive: {
99
+ root: string;
100
+ };
101
+ };
102
+ }, {
103
+ root: string;
104
+ item: string[];
105
+ media: string[];
106
+ check: string[];
107
+ text: string;
108
+ label: string;
109
+ description: string;
110
+ }, undefined, unknown, unknown, undefined>>;
111
+ export interface ChoiceCardsProps extends Omit<RadioGroup.Props<string>, 'className' | 'style' | 'children'> {
112
+ /** How many cards stand in a row. Default: one per item, up to four. */
113
+ columns?: number;
114
+ /** The shape of every card's picture, as a CSS aspect ratio. Default `4 / 3`. */
115
+ aspect?: string;
116
+ /** The colour of the ring and the check on the chosen card. Default `primary`. */
117
+ color?: ChoiceCardsColor;
118
+ children?: ReactNode;
119
+ className?: string;
120
+ style?: CSSProperties;
121
+ }
122
+ /**
123
+ * The cards, of which one is chosen. `value` and `onValueChange`, or
124
+ * `defaultValue`, hold which; `name` submits it with a form.
125
+ */
126
+ declare function ChoiceCardsRoot({ columns, aspect, color, className, style, children, ...props }: ChoiceCardsProps): import("react").JSX.Element;
127
+ declare namespace ChoiceCardsRoot {
128
+ var displayName: string;
129
+ }
130
+ export interface ChoiceCardsItemProps extends Omit<Radio.Root.Props, 'className' | 'value'> {
131
+ /** What choosing this card sets the group's value to. */
132
+ value: string;
133
+ className?: string;
134
+ }
135
+ /** One option: a `ChoiceCards.Media` picture, a `Label`, and maybe a `Description`. */
136
+ declare function ChoiceCardsItem({ className, children, ...props }: ChoiceCardsItemProps): import("react").JSX.Element;
137
+ declare namespace ChoiceCardsItem {
138
+ var displayName: string;
139
+ }
140
+ export interface ChoiceCardsMediaProps extends ComponentProps<'span'> {
141
+ }
142
+ /** The picture of the option: a drawing, an icon or an image, centred in a rounded frame. */
143
+ declare function ChoiceCardsMedia({ className, ...props }: ChoiceCardsMediaProps): import("react").JSX.Element;
144
+ declare namespace ChoiceCardsMedia {
145
+ var displayName: string;
146
+ }
147
+ export interface ChoiceCardsLabelProps extends ComponentProps<'span'> {
148
+ }
149
+ /** The option's name, under its picture. It is what a screen reader calls the card. */
150
+ declare function ChoiceCardsLabel({ className, ...props }: ChoiceCardsLabelProps): import("react").JSX.Element;
151
+ declare namespace ChoiceCardsLabel {
152
+ var displayName: string;
153
+ }
154
+ export interface ChoiceCardsDescriptionProps extends ComponentProps<'span'> {
155
+ }
156
+ /** A line under the label: what the option costs or does. */
157
+ declare function ChoiceCardsDescription({ className, ...props }: ChoiceCardsDescriptionProps): import("react").JSX.Element;
158
+ declare namespace ChoiceCardsDescription {
159
+ var displayName: string;
160
+ }
161
+ export declare const ChoiceCards: typeof ChoiceCardsRoot & {
162
+ Item: typeof ChoiceCardsItem;
163
+ Media: typeof ChoiceCardsMedia;
164
+ Label: typeof ChoiceCardsLabel;
165
+ Description: typeof ChoiceCardsDescription;
166
+ };
167
+ export { ChoiceCardsItem, ChoiceCardsMedia, ChoiceCardsLabel, ChoiceCardsDescription, choiceCardsVariants };
@@ -0,0 +1,132 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * ChoiceCards — one option chosen from a few, each shown as a picture of
5
+ * what it does.
6
+ *
7
+ * ```tsx
8
+ * <ChoiceCards defaultValue="rounded" aria-label="Pointer">
9
+ * <ChoiceCards.Item value="classic">
10
+ * <ChoiceCards.Media><ClassicPointer /></ChoiceCards.Media>
11
+ * <ChoiceCards.Label>Classic</ChoiceCards.Label>
12
+ * </ChoiceCards.Item>
13
+ * …
14
+ * </ChoiceCards>
15
+ * ```
16
+ *
17
+ * ## Show the option, not its name
18
+ *
19
+ * A pointer style, an aspect ratio, a background: options that are seen
20
+ * before they are understood. Each card leads with a picture of the option,
21
+ * so the choice is made by looking, and the name under it confirms it.
22
+ *
23
+ * ## The chosen one comes forward
24
+ *
25
+ * The chosen card is ringed in the theme colour, a check settles into its
26
+ * corner, and its picture grows a little, as if lifted towards the reader.
27
+ * The others stay flat, so a row of cards still reads as one choice and one
28
+ * set of alternatives.
29
+ */
30
+ import { Radio } from '@base-ui/react/radio';
31
+ import { RadioGroup } from '@base-ui/react/radio-group';
32
+ import { createContext, useContext, useId } from 'react';
33
+ import { tv } from 'tailwind-variants';
34
+ const SPRING = 'ease-[cubic-bezier(0.3,1.35,0.45,1)]';
35
+ const choiceCardsVariants = tv({
36
+ slots: {
37
+ root: 'grid w-full grid-cols-(--choice-columns) gap-2 data-disabled:opacity-50',
38
+ item: [
39
+ 'group/choice relative flex min-w-0 cursor-pointer flex-col gap-1.5 rounded-[18px] p-1.5 text-start outline-none select-none',
40
+ 'bg-muted/60 transition-[background-color,box-shadow] duration-200 hover:bg-muted',
41
+ // The ring stands clear of the card, so it never sits on the picture. It
42
+ // is an outline, whose gap is see-through on whatever surface holds it.
43
+ 'outline-offset-2 data-checked:bg-muted data-checked:outline-2 data-checked:outline-solid data-checked:outline-(--choice)',
44
+ 'focus-visible:ring-2 focus-visible:ring-ring',
45
+ 'data-disabled:cursor-not-allowed data-disabled:opacity-50',
46
+ ],
47
+ media: [
48
+ 'relative flex aspect-(--choice-aspect) w-full items-center justify-center overflow-hidden rounded-xl',
49
+ // A frame a step lighter than the card in either theme, with a hairline edge.
50
+ 'bg-background/80 ring-1 ring-inset ring-foreground/[0.05] dark:bg-foreground/[0.06]',
51
+ 'text-foreground/80 [&>*]:transition-transform [&>*]:duration-[420ms] [&>*]:ease-[cubic-bezier(0.3,1.35,0.45,1)]',
52
+ 'group-data-checked/choice:text-foreground group-data-checked/choice:[&>*]:scale-[1.06] motion-reduce:[&>*]:transition-none',
53
+ '[&>img]:size-full [&>img]:object-cover',
54
+ ],
55
+ check: [
56
+ 'pointer-events-none absolute end-1.5 top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-(--choice) text-(--choice-foreground)',
57
+ `scale-0 opacity-0 shadow-sm transition-[scale,opacity] duration-300 ${SPRING}`,
58
+ 'group-data-checked/choice:scale-100 group-data-checked/choice:opacity-100 motion-reduce:transition-none',
59
+ ],
60
+ text: 'flex flex-col gap-0.5 px-1.5 pb-1',
61
+ label: 'truncate text-[13px] font-medium text-foreground/80 group-data-checked/choice:text-foreground',
62
+ description: 'text-xs leading-4 text-muted-foreground',
63
+ },
64
+ variants: {
65
+ color: {
66
+ primary: { root: '[--choice:var(--primary)] [--choice-foreground:var(--primary-foreground)]' },
67
+ info: { root: '[--choice:var(--info)] [--choice-foreground:white]' },
68
+ success: { root: '[--choice:var(--success)] [--choice-foreground:white]' },
69
+ warning: { root: '[--choice:var(--warning)] [--choice-foreground:black]' },
70
+ destructive: { root: '[--choice:var(--destructive)] [--choice-foreground:white]' },
71
+ },
72
+ },
73
+ defaultVariants: { color: 'primary' },
74
+ });
75
+ const ItemContext = createContext(null);
76
+ /**
77
+ * The cards, of which one is chosen. `value` and `onValueChange`, or
78
+ * `defaultValue`, hold which; `name` submits it with a form.
79
+ */
80
+ function ChoiceCardsRoot({ columns, aspect = '4 / 3', color, className, style, children, ...props }) {
81
+ const slots = choiceCardsVariants({ color });
82
+ const count = Array.isArray(children) ? children.filter(Boolean).length : 1;
83
+ const across = columns ?? Math.min(Math.max(count, 1), 4);
84
+ return (_jsx(RadioGroup, { "data-slot": "choice-cards", className: slots.root({ className }), style: {
85
+ ...style,
86
+ '--choice-columns': `repeat(${across}, minmax(0, 1fr))`,
87
+ '--choice-aspect': aspect,
88
+ }, ...props, children: children }));
89
+ }
90
+ ChoiceCardsRoot.displayName = 'ChoiceCards';
91
+ /** One option: a `ChoiceCards.Media` picture, a `Label`, and maybe a `Description`. */
92
+ function ChoiceCardsItem({ className, children, ...props }) {
93
+ const slots = choiceCardsVariants();
94
+ const id = useId();
95
+ const ids = { labelId: `${id}-label`, descriptionId: `${id}-description` };
96
+ return (_jsx(ItemContext.Provider, { value: ids, children: _jsxs(Radio.Root, { "data-slot": "choice-cards-item", "aria-labelledby": ids.labelId, "aria-describedby": ids.descriptionId, className: slots.item({ className }), ...props, children: [_jsx("span", { "aria-hidden": true, "data-slot": "choice-cards-check", className: slots.check(), children: _jsx("svg", { viewBox: "0 0 12 12", className: "size-3", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M2.75 6.25 5 8.5l4.25-5" }) }) }), children] }) }));
97
+ }
98
+ ChoiceCardsItem.displayName = 'ChoiceCards.Item';
99
+ /** The picture of the option: a drawing, an icon or an image, centred in a rounded frame. */
100
+ function ChoiceCardsMedia({ className, ...props }) {
101
+ const slots = choiceCardsVariants();
102
+ return _jsx("span", { "aria-hidden": true, "data-slot": "choice-cards-media", className: slots.media({ className }), ...props });
103
+ }
104
+ ChoiceCardsMedia.displayName = 'ChoiceCards.Media';
105
+ /** Gathers the label and description under the picture, with the card's padding. */
106
+ function useItem(part) {
107
+ const item = useContext(ItemContext);
108
+ if (!item)
109
+ throw new Error(`${part} must be used inside a <ChoiceCards.Item>.`);
110
+ return item;
111
+ }
112
+ /** The option's name, under its picture. It is what a screen reader calls the card. */
113
+ function ChoiceCardsLabel({ className, ...props }) {
114
+ const { labelId } = useItem('ChoiceCards.Label');
115
+ const slots = choiceCardsVariants();
116
+ return (_jsx("span", { "data-slot": "choice-cards-text", className: slots.text(), children: _jsx("span", { id: labelId, "data-slot": "choice-cards-label", className: slots.label({ className }), ...props }) }));
117
+ }
118
+ ChoiceCardsLabel.displayName = 'ChoiceCards.Label';
119
+ /** A line under the label: what the option costs or does. */
120
+ function ChoiceCardsDescription({ className, ...props }) {
121
+ const { descriptionId } = useItem('ChoiceCards.Description');
122
+ const slots = choiceCardsVariants();
123
+ return (_jsx("span", { id: descriptionId, "data-slot": "choice-cards-description", className: slots.description({ className: ['-mt-1.5 px-1.5 pb-1', className] }), ...props }));
124
+ }
125
+ ChoiceCardsDescription.displayName = 'ChoiceCards.Description';
126
+ export const ChoiceCards = Object.assign(ChoiceCardsRoot, {
127
+ Item: ChoiceCardsItem,
128
+ Media: ChoiceCardsMedia,
129
+ Label: ChoiceCardsLabel,
130
+ Description: ChoiceCardsDescription,
131
+ });
132
+ export { ChoiceCardsItem, ChoiceCardsMedia, ChoiceCardsLabel, ChoiceCardsDescription, choiceCardsVariants };
@@ -0,0 +1,242 @@
1
+ import { Tabs } from '@base-ui/react/tabs';
2
+ import { type ComponentProps, type ReactNode } from 'react';
3
+ declare const inspectorVariants: import("tailwind-variants").TVReturnType<{
4
+ [key: string]: {
5
+ [key: string]: import("tailwind-merge").ClassNameValue | {
6
+ root?: import("tailwind-merge").ClassNameValue;
7
+ section?: import("tailwind-merge").ClassNameValue;
8
+ marker?: import("tailwind-merge").ClassNameValue;
9
+ content?: import("tailwind-merge").ClassNameValue;
10
+ scrollbar?: import("tailwind-merge").ClassNameValue;
11
+ separator?: import("tailwind-merge").ClassNameValue;
12
+ tab?: import("tailwind-merge").ClassNameValue;
13
+ tooltip?: import("tailwind-merge").ClassNameValue;
14
+ page?: import("tailwind-merge").ClassNameValue;
15
+ viewport?: import("tailwind-merge").ClassNameValue;
16
+ panel?: import("tailwind-merge").ClassNameValue;
17
+ thumb?: import("tailwind-merge").ClassNameValue;
18
+ chevron?: import("tailwind-merge").ClassNameValue;
19
+ sectionTitle?: import("tailwind-merge").ClassNameValue;
20
+ railSeparator?: import("tailwind-merge").ClassNameValue;
21
+ sectionAction?: import("tailwind-merge").ClassNameValue;
22
+ rail?: import("tailwind-merge").ClassNameValue;
23
+ sectionContent?: import("tailwind-merge").ClassNameValue;
24
+ };
25
+ };
26
+ } | {
27
+ [x: string]: {
28
+ [x: string]: import("tailwind-merge").ClassNameValue | {
29
+ root?: import("tailwind-merge").ClassNameValue;
30
+ section?: import("tailwind-merge").ClassNameValue;
31
+ marker?: import("tailwind-merge").ClassNameValue;
32
+ content?: import("tailwind-merge").ClassNameValue;
33
+ scrollbar?: import("tailwind-merge").ClassNameValue;
34
+ separator?: import("tailwind-merge").ClassNameValue;
35
+ tab?: import("tailwind-merge").ClassNameValue;
36
+ tooltip?: import("tailwind-merge").ClassNameValue;
37
+ page?: import("tailwind-merge").ClassNameValue;
38
+ viewport?: import("tailwind-merge").ClassNameValue;
39
+ panel?: import("tailwind-merge").ClassNameValue;
40
+ thumb?: import("tailwind-merge").ClassNameValue;
41
+ chevron?: import("tailwind-merge").ClassNameValue;
42
+ sectionTitle?: import("tailwind-merge").ClassNameValue;
43
+ railSeparator?: import("tailwind-merge").ClassNameValue;
44
+ sectionAction?: import("tailwind-merge").ClassNameValue;
45
+ rail?: import("tailwind-merge").ClassNameValue;
46
+ sectionContent?: import("tailwind-merge").ClassNameValue;
47
+ };
48
+ };
49
+ } | {}, {
50
+ root: string;
51
+ rail: string[];
52
+ marker: string[];
53
+ tab: string[];
54
+ railSeparator: string;
55
+ tooltip: string[];
56
+ panel: string[];
57
+ page: string[];
58
+ viewport: string;
59
+ content: string;
60
+ scrollbar: string;
61
+ thumb: string;
62
+ section: string;
63
+ sectionTitle: string[];
64
+ chevron: string[];
65
+ sectionAction: string;
66
+ sectionContent: string[];
67
+ separator: string;
68
+ }, undefined, {
69
+ [key: string]: {
70
+ [key: string]: import("tailwind-merge").ClassNameValue | {
71
+ root?: import("tailwind-merge").ClassNameValue;
72
+ section?: import("tailwind-merge").ClassNameValue;
73
+ marker?: import("tailwind-merge").ClassNameValue;
74
+ content?: import("tailwind-merge").ClassNameValue;
75
+ scrollbar?: import("tailwind-merge").ClassNameValue;
76
+ separator?: import("tailwind-merge").ClassNameValue;
77
+ tab?: import("tailwind-merge").ClassNameValue;
78
+ tooltip?: import("tailwind-merge").ClassNameValue;
79
+ page?: import("tailwind-merge").ClassNameValue;
80
+ viewport?: import("tailwind-merge").ClassNameValue;
81
+ panel?: import("tailwind-merge").ClassNameValue;
82
+ thumb?: import("tailwind-merge").ClassNameValue;
83
+ chevron?: import("tailwind-merge").ClassNameValue;
84
+ sectionTitle?: import("tailwind-merge").ClassNameValue;
85
+ railSeparator?: import("tailwind-merge").ClassNameValue;
86
+ sectionAction?: import("tailwind-merge").ClassNameValue;
87
+ rail?: import("tailwind-merge").ClassNameValue;
88
+ sectionContent?: import("tailwind-merge").ClassNameValue;
89
+ };
90
+ };
91
+ } | {}, {
92
+ root: string;
93
+ rail: string[];
94
+ marker: string[];
95
+ tab: string[];
96
+ railSeparator: string;
97
+ tooltip: string[];
98
+ panel: string[];
99
+ page: string[];
100
+ viewport: string;
101
+ content: string;
102
+ scrollbar: string;
103
+ thumb: string;
104
+ section: string;
105
+ sectionTitle: string[];
106
+ chevron: string[];
107
+ sectionAction: string;
108
+ sectionContent: string[];
109
+ separator: string;
110
+ }, import("tailwind-variants").TVReturnType<unknown, {
111
+ root: string;
112
+ rail: string[];
113
+ marker: string[];
114
+ tab: string[];
115
+ railSeparator: string;
116
+ tooltip: string[];
117
+ panel: string[];
118
+ page: string[];
119
+ viewport: string;
120
+ content: string;
121
+ scrollbar: string;
122
+ thumb: string;
123
+ section: string;
124
+ sectionTitle: string[];
125
+ chevron: string[];
126
+ sectionAction: string;
127
+ sectionContent: string[];
128
+ separator: string;
129
+ }, undefined, unknown, unknown, undefined>>;
130
+ export interface InspectorProps extends Omit<Tabs.Root.Props, 'className' | 'orientation'> {
131
+ className?: string;
132
+ }
133
+ /**
134
+ * The rail and the panel side by side. `defaultValue`, or `value` with
135
+ * `onValueChange`, names the page that is open.
136
+ */
137
+ declare function InspectorRoot({ className, ...props }: InspectorProps): import("react").JSX.Element;
138
+ declare namespace InspectorRoot {
139
+ var displayName: string;
140
+ }
141
+ export interface InspectorRailProps extends Omit<Tabs.List.Props, 'className'> {
142
+ className?: string;
143
+ }
144
+ /** The column of page icons, in a pill of its own beside the panel. */
145
+ declare function InspectorRail({ className, children, ...props }: InspectorRailProps): import("react").JSX.Element;
146
+ declare namespace InspectorRail {
147
+ var displayName: string;
148
+ }
149
+ export interface InspectorTabProps extends Omit<Tabs.Tab.Props, 'className' | 'children'> {
150
+ /** What the page is called: the tab's tooltip and its name for a screen reader. */
151
+ label: string;
152
+ /** The icon. */
153
+ children?: ReactNode;
154
+ className?: string;
155
+ }
156
+ /** One page's icon on the rail. */
157
+ declare function InspectorTab({ label, className, children, ...props }: InspectorTabProps): import("react").JSX.Element;
158
+ declare namespace InspectorTab {
159
+ var displayName: string;
160
+ }
161
+ export interface InspectorRailSeparatorProps extends ComponentProps<'span'> {
162
+ }
163
+ /** A short line between groups of pages on the rail. */
164
+ declare function InspectorRailSeparator({ className, ...props }: InspectorRailSeparatorProps): import("react").JSX.Element;
165
+ declare namespace InspectorRailSeparator {
166
+ var displayName: string;
167
+ }
168
+ export interface InspectorPanelProps extends ComponentProps<'div'> {
169
+ }
170
+ /**
171
+ * The card the pages open in. Give it a height, such as `h-[32rem]`, and a
172
+ * page longer than that scrolls inside it. Without pages, its children are
173
+ * one page of sections.
174
+ */
175
+ declare function InspectorPanel({ className, children, ...props }: InspectorPanelProps): import("react").JSX.Element;
176
+ declare namespace InspectorPanel {
177
+ var displayName: string;
178
+ }
179
+ export interface InspectorPageProps extends Omit<Tabs.Panel.Props, 'className'> {
180
+ className?: string;
181
+ }
182
+ /** What one tab opens: a column of sections that scrolls inside the panel. */
183
+ declare function InspectorPage({ className, children, ...props }: InspectorPageProps): import("react").JSX.Element;
184
+ declare namespace InspectorPage {
185
+ var displayName: string;
186
+ }
187
+ export interface InspectorSectionProps extends Omit<ComponentProps<'div'>, 'onChange'> {
188
+ /** Fold the section away by its title. Its content then shows only while it is open. */
189
+ collapsible?: boolean;
190
+ /** Whether a collapsible section starts open. Default true. */
191
+ defaultOpen?: boolean;
192
+ /** Whether a collapsible section is open, when the caller holds it. */
193
+ open?: boolean;
194
+ /** Called when a collapsible section opens or closes. */
195
+ onOpenChange?: (open: boolean) => void;
196
+ }
197
+ /** A titled group of settings: a title, an action on its line, and the controls under them. */
198
+ declare function InspectorSection({ collapsible, defaultOpen, open, onOpenChange, className, children, ...props }: InspectorSectionProps): import("react").JSX.Element;
199
+ declare namespace InspectorSection {
200
+ var displayName: string;
201
+ }
202
+ export interface InspectorSectionTitleProps extends ComponentProps<'h3'> {
203
+ }
204
+ /** The section's name. In a collapsible section it is the button that folds it, with a chevron. */
205
+ declare function InspectorSectionTitle({ className, children, ...props }: InspectorSectionTitleProps): import("react").JSX.Element;
206
+ declare namespace InspectorSectionTitle {
207
+ var displayName: string;
208
+ }
209
+ export interface InspectorSectionActionProps extends ComponentProps<'div'> {
210
+ }
211
+ /** What sits at the end of the title's line: the switch for the whole section, or a Reset. */
212
+ declare function InspectorSectionAction({ className, ...props }: InspectorSectionActionProps): import("react").JSX.Element;
213
+ declare namespace InspectorSectionAction {
214
+ var displayName: string;
215
+ }
216
+ export interface InspectorSectionContentProps extends ComponentProps<'div'> {
217
+ }
218
+ /** The controls under the title, stacked with an even gap. */
219
+ declare function InspectorSectionContent({ className, children, ...props }: InspectorSectionContentProps): import("react").JSX.Element;
220
+ declare namespace InspectorSectionContent {
221
+ var displayName: string;
222
+ }
223
+ export interface InspectorSeparatorProps extends ComponentProps<'div'> {
224
+ }
225
+ /** A hairline between sections that belong to different things. */
226
+ declare function InspectorSeparator({ className, ...props }: InspectorSeparatorProps): import("react").JSX.Element;
227
+ declare namespace InspectorSeparator {
228
+ var displayName: string;
229
+ }
230
+ export declare const Inspector: typeof InspectorRoot & {
231
+ Rail: typeof InspectorRail;
232
+ Tab: typeof InspectorTab;
233
+ RailSeparator: typeof InspectorRailSeparator;
234
+ Panel: typeof InspectorPanel;
235
+ Page: typeof InspectorPage;
236
+ Section: typeof InspectorSection;
237
+ SectionTitle: typeof InspectorSectionTitle;
238
+ SectionAction: typeof InspectorSectionAction;
239
+ SectionContent: typeof InspectorSectionContent;
240
+ Separator: typeof InspectorSeparator;
241
+ };
242
+ export { InspectorRail, InspectorTab, InspectorRailSeparator, InspectorPanel, InspectorPage, InspectorSection, InspectorSectionTitle, InspectorSectionAction, InspectorSectionContent, InspectorSeparator, inspectorVariants, };