@ai-matrx/design-system 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,645 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import React__default, { ReactNode, ComponentType } from 'react';
5
+ import { ClassValue } from 'clsx';
6
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
7
+ import { DialogProps } from '@radix-ui/react-dialog';
8
+ import * as LabelPrimitive from '@radix-ui/react-label';
9
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
10
+ import * as SelectPrimitive from '@radix-ui/react-select';
11
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
12
+
13
+ declare const badgeVariants: (props?: ({
14
+ variant?: "default" | "secondary" | "destructive" | "outline" | "success" | "warning" | "info" | "error" | "neutral" | null | undefined;
15
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
16
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
17
+ }
18
+ declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
19
+
20
+ interface BottomSheetProps {
21
+ open: boolean;
22
+ onOpenChange: (open: boolean) => void;
23
+ title?: string;
24
+ /**
25
+ * `adaptive` (default) — the sheet sizes to its content between 60dvh and
26
+ * 90dvh. Correct for a single short list.
27
+ *
28
+ * `full` — ONE fixed height (92dvh) that never changes as content changes.
29
+ * Use it for any sheet whose body varies (multi-level navigation, tabs,
30
+ * search results): an adaptive sheet there resizes under the user's thumb
31
+ * on every keystroke and every drill-in, which reads as the panel jumping.
32
+ */
33
+ size?: "adaptive" | "full";
34
+ /** Visual treatment for the panel. Solid is intended for dense, long-lived surfaces. */
35
+ surface?: "glass" | "solid";
36
+ /** Merged onto the sheet panel. */
37
+ contentClassName?: string;
38
+ children: React.ReactNode;
39
+ }
40
+ declare function BottomSheet({ open, onOpenChange, title, size, surface, contentClassName, children, }: BottomSheetProps): React.JSX.Element;
41
+ interface BottomSheetHeaderProps {
42
+ title: string;
43
+ showBack?: boolean;
44
+ onBack?: () => void;
45
+ trailing?: React.ReactNode;
46
+ }
47
+ declare function BottomSheetHeader({ title, showBack, onBack, trailing, }: BottomSheetHeaderProps): React.JSX.Element;
48
+ interface BottomSheetBodyProps {
49
+ children: React.ReactNode;
50
+ className?: string;
51
+ }
52
+ declare function BottomSheetBody({ children, className }: BottomSheetBodyProps): React.JSX.Element;
53
+ interface BottomSheetFooterProps {
54
+ children: React.ReactNode;
55
+ className?: string;
56
+ }
57
+ declare function BottomSheetFooter({ children, className, }: BottomSheetFooterProps): React.JSX.Element;
58
+
59
+ declare const buttonVariants: (props?: ({
60
+ variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | "subtle" | null | undefined;
61
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | null | undefined;
62
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
63
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
64
+ asChild?: boolean;
65
+ }
66
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
67
+
68
+ declare function cn(...inputs: ClassValue[]): string;
69
+
70
+ /**
71
+ * Command — ported verbatim from matrx-frontend `components/ui/command.tsx`.
72
+ *
73
+ * `cmdk` is a SANCTIONED REAL DEPENDENCY (the vaul ↔ BottomSheet precedent):
74
+ * the filtering/scoring/keyboard engine IS the component's product — there is
75
+ * no Command palette without it, and reimplementing type-ahead ranking plus
76
+ * roving keyboard selection would twin a maintained library rather than our
77
+ * own code. See FEATURE.md.
78
+ *
79
+ * Seam inversions:
80
+ * - `MagnifyingGlassIcon` comes from the package's inlined SVGs (C19), not
81
+ * @radix-ui/react-icons.
82
+ * - `CommandDialog` composed the host dialog module (`Dialog`, `DialogContent`,
83
+ * `DialogTitle`). Those pieces are inlined privately below with identical
84
+ * behavior — modal context, overlay, desktop card / mobile bottom-sheet
85
+ * geometry, close control, portal — except the host's popout-aware
86
+ * `DialogPortal` becomes the package's `PortalContainerProvider` seam
87
+ * (plus an explicit `container` prop, which keeps top priority).
88
+ * - The host's `useIsMobile` (a plain matchMedia breakpoint hook, not
89
+ * host-shaped) is inlined privately with the same 768px breakpoint.
90
+ */
91
+
92
+ declare const Command: React.ForwardRefExoticComponent<Omit<{
93
+ children?: React.ReactNode;
94
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
95
+ ref?: React.Ref<HTMLDivElement>;
96
+ } & {
97
+ asChild?: boolean;
98
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
99
+ label?: string;
100
+ shouldFilter?: boolean;
101
+ filter?: (value: string, search: string, keywords?: string[]) => number;
102
+ defaultValue?: string;
103
+ value?: string;
104
+ onValueChange?: (value: string) => void;
105
+ loop?: boolean;
106
+ disablePointerSelection?: boolean;
107
+ vimBindings?: boolean;
108
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
109
+ interface CommandDialogProps extends DialogProps {
110
+ /** Explicit portal target for the dialog; beats the injected seam. */
111
+ container?: HTMLElement | null;
112
+ }
113
+ declare const CommandDialog: ({ children, container, ...props }: CommandDialogProps) => React.JSX.Element;
114
+ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
115
+ ref?: React.Ref<HTMLInputElement>;
116
+ } & {
117
+ asChild?: boolean;
118
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
119
+ value?: string;
120
+ onValueChange?: (search: string) => void;
121
+ } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
122
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
123
+ children?: React.ReactNode;
124
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
125
+ ref?: React.Ref<HTMLDivElement>;
126
+ } & {
127
+ asChild?: boolean;
128
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
129
+ label?: string;
130
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
131
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
132
+ children?: React.ReactNode;
133
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
134
+ ref?: React.Ref<HTMLDivElement>;
135
+ } & {
136
+ asChild?: boolean;
137
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
138
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
139
+ children?: React.ReactNode;
140
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
141
+ ref?: React.Ref<HTMLDivElement>;
142
+ } & {
143
+ asChild?: boolean;
144
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
145
+ heading?: React.ReactNode;
146
+ value?: string;
147
+ forceMount?: boolean;
148
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
149
+ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
150
+ ref?: React.Ref<HTMLDivElement>;
151
+ } & {
152
+ asChild?: boolean;
153
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
154
+ alwaysRender?: boolean;
155
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
156
+ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
157
+ children?: React.ReactNode;
158
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
159
+ ref?: React.Ref<HTMLDivElement>;
160
+ } & {
161
+ asChild?: boolean;
162
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
163
+ disabled?: boolean;
164
+ onSelect?: (value: string) => void;
165
+ value?: string;
166
+ keywords?: string[];
167
+ forceMount?: boolean;
168
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
169
+ declare const CommandShortcut: {
170
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
171
+ displayName: string;
172
+ };
173
+
174
+ /** Structural stand-in for the host's `LucideIcon` in `footerActions`. */
175
+ type PickerIcon = ComponentType<{
176
+ className?: string;
177
+ }>;
178
+ interface CreatableOption {
179
+ value: string;
180
+ label: string;
181
+ /** Right-aligned detail — a count, a description, "yours". */
182
+ hint?: string;
183
+ /** Rendered instead of the plain label (a band chip, a coloured pill). */
184
+ render?: ReactNode;
185
+ /** Extra words the type-ahead should match on. */
186
+ keywords?: string;
187
+ /**
188
+ * The heading this option files under. Options keep the caller's order; a
189
+ * group is opened the first time an option names it. Omit on every option
190
+ * for a single ungrouped list.
191
+ *
192
+ * THE CATALOG IS NOT A WALL (Arman, 2026-08-24, on being shown offerings
193
+ * that were not his): a set that legitimately holds more than this tenant's
194
+ * own rows says so with a heading instead of hiding the rest.
195
+ */
196
+ group?: string;
197
+ }
198
+ interface CreatablePickerProps {
199
+ value: string | null;
200
+ options: CreatableOption[];
201
+ onSelect: (value: string) => void;
202
+ placeholder: string;
203
+ searchPlaceholder?: string;
204
+ /** The noun in "Add a level…" / "Create «x»". Always a person's word. */
205
+ noun: string;
206
+ /**
207
+ * Turns typed text into a real row and returns the option value to select.
208
+ * Return null when the caller handled it another way (opened a dialog that
209
+ * needs more than a name — a level needs a threshold).
210
+ */
211
+ onCreate?: (typed: string) => Promise<string | null>;
212
+ /**
213
+ * Creating this noun needs more than a name, so the picker hands the typed
214
+ * text to the caller's dialog instead of writing anything itself.
215
+ */
216
+ onCreateRequiresMore?: (typed: string) => void;
217
+ disabled?: boolean;
218
+ loading?: boolean;
219
+ className?: string;
220
+ triggerClassName?: string;
221
+ emptyLabel?: string;
222
+ ariaLabel?: string;
223
+ /** P11: a sentence saying this vocabulary is platform-governed. */
224
+ lockedNote?: string;
225
+ /** P11: the door out of that refusal — never leave them with only "no". */
226
+ lockedAction?: {
227
+ label: string;
228
+ onSelect: () => void;
229
+ };
230
+ /**
231
+ * Rendered inside the create footer, above the create button — for the one
232
+ * extra choice a vocabulary needs at creation time (a category's parent,
233
+ * say). It is a SLOT, not a second write path: whatever it collects is read
234
+ * by the caller's own `onCreate`. A function receives what the person typed,
235
+ * so a slot can offer matching suggestions (e.g. a shared catalog) instead
236
+ * of a fixed block.
237
+ */
238
+ createExtra?: ReactNode | ((typed: string) => ReactNode);
239
+ /**
240
+ * THE MANAGE DOOR. Arman, 2026-08-24: "where we have 'add' we should also
241
+ * have a 'manage' button that opens that thing in a new tab." A control that
242
+ * names a vocabulary must also be able to reach the place that vocabulary is
243
+ * governed — otherwise the person who wants to rename, re-parent, or retire
244
+ * an option has to go hunting for a screen they may not know exists.
245
+ *
246
+ * It opens in a NEW TAB on purpose: nobody loses the row they were editing
247
+ * in order to go look at the catalog.
248
+ */
249
+ manageAction?: {
250
+ label: string;
251
+ href: string;
252
+ };
253
+ /**
254
+ * Doors to a DIFFERENT answer than this vocabulary can give. The offering
255
+ * picker's "this isn't something we offer" lives here, because that ruling
256
+ * is a traffic class, not an offering — and sending someone to look for
257
+ * another column on their own is the dead end this slot exists to close.
258
+ */
259
+ footerActions?: Array<{
260
+ label: string;
261
+ icon?: PickerIcon;
262
+ onSelect: () => void;
263
+ /** A sentence under the door saying what it does, when it needs one. */
264
+ note?: string;
265
+ }>;
266
+ /**
267
+ * What the TRIGGER shows for the current selection, when the caller wants
268
+ * something other than the option row's own `render`. A dense table cell
269
+ * needs one compact line ("Data Destruction Services · ITAD"); the list row
270
+ * it came from is indented and annotated. Same selection, two jobs.
271
+ */
272
+ renderSelected?: ReactNode;
273
+ size?: "sm" | "md";
274
+ }
275
+ declare function CreatablePicker({ value, options, onSelect, placeholder, searchPlaceholder, noun, onCreate, onCreateRequiresMore, disabled, loading, className, triggerClassName, emptyLabel, ariaLabel, lockedNote, lockedAction, createExtra, manageAction, footerActions, renderSelected, size, }: CreatablePickerProps): React.JSX.Element;
276
+
277
+ type EditableLabelCommitMode = "optimistic" | "await";
278
+ type EditableLabelActivation = "click" | "doubleClick" | "controlled";
279
+ interface EditableLabelProps {
280
+ value: string;
281
+ /**
282
+ * Commit handler. optimistic (default): edit mode exits immediately, the
283
+ * promise is fire-and-forget (owners do optimistic update + revert + toast).
284
+ * await: input disables with a spinner until the promise resolves; a
285
+ * rejection keeps edit mode open to retry.
286
+ */
287
+ onCommit: (next: string) => void | Promise<void>;
288
+ commitMode?: EditableLabelCommitMode;
289
+ /** Return an error message to block the commit (shown under the input). */
290
+ validate?: (next: string) => string | null;
291
+ /** Used when the trimmed draft is empty. Undefined → empty cancels. */
292
+ emptyFallback?: string;
293
+ maxLength?: number;
294
+ /**
295
+ * "click"/"doubleClick" — internal edit state (headers). "controlled" — host
296
+ * owns `editing`; EditableLabel renders ONLY the input when editing.
297
+ */
298
+ activation?: EditableLabelActivation;
299
+ editing?: boolean;
300
+ /** Edit-state notifications. Controlled mode: the ONLY state channel.
301
+ * Uncontrolled modes: fired as a notification (layout hooks etc.). */
302
+ onEditingChange?: (editing: boolean) => void;
303
+ selectOnEdit?: boolean;
304
+ placeholder?: string;
305
+ /** Accessible name, e.g. "Session title". Default "Name". */
306
+ ariaLabel?: string;
307
+ truncate?: boolean;
308
+ className?: string;
309
+ displayClassName?: string;
310
+ inputClassName?: string;
311
+ }
312
+ declare function EditableLabel({ value, onCommit, commitMode, validate, emptyFallback, maxLength, activation, editing: editingProp, onEditingChange, selectOnEdit, placeholder, ariaLabel, truncate, className, displayClassName, inputClassName, }: EditableLabelProps): React.JSX.Element | null;
313
+
314
+ /**
315
+ * Input family — ported verbatim from matrx-frontend `components/ui/input.tsx`.
316
+ *
317
+ * Seam inversions:
318
+ * - `MatrxVariant` (host `components/ui/types`) becomes the structural
319
+ * `InputVariant` union with the identical members, so host call sites are
320
+ * drop-in compatible.
321
+ * - The host file's `CopyInput` / `FancyInput` / `DeleteInput` are
322
+ * deliberately NOT absorbed (C8 split-out law): they carry a `motion/react`
323
+ * dependency (and clipboard behavior) that plain-Input consumers must not
324
+ * pay for. They stay host-owned until sanctioned separately.
325
+ */
326
+
327
+ type InputVariant = "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "link" | "primary";
328
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
329
+ variant?: InputVariant;
330
+ }
331
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
332
+ interface EnterInputProps extends InputProps {
333
+ onEnter?: () => void;
334
+ }
335
+ declare const EnterInput: React.ForwardRefExoticComponent<EnterInputProps & React.RefAttributes<HTMLInputElement>>;
336
+ declare const BasicInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
337
+ interface InputWithPrefixProps extends Omit<InputProps, "prefix"> {
338
+ prefix?: React.ReactNode;
339
+ wrapperClassName?: string;
340
+ }
341
+ declare const InputWithPrefix: React.ForwardRefExoticComponent<InputWithPrefixProps & React.RefAttributes<HTMLInputElement>>;
342
+
343
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
344
+
345
+ /**
346
+ * OverflowToolbar — a horizontal row of consistent, compact action buttons
347
+ * that collapses the buttons that don't fit into a single "more" (…) menu.
348
+ * Ported verbatim from matrx-frontend
349
+ * `components/official/toolbar/OverflowToolbar.tsx` (S20).
350
+ *
351
+ * ┌───────────────────────────────────────────────┐
352
+ * │ [leading] [Btn] [Btn] [Btn] [ … ] │
353
+ * └───────────────────────────────────────────────┘
354
+ *
355
+ * Design rules (the primitive enforces them so callers can't drift):
356
+ * - Every button is the same height (h-7), padding, text size, icon size.
357
+ * - `hideLabel` renders an icon-only button with a tooltip — use it for
358
+ * "obvious" actions (Find, Source, …).
359
+ * - `tone: "primary"` colors a button without changing its size, so the
360
+ * primary action is NOT visually larger than the rest.
361
+ * - When the row is too narrow, the LAST actions collapse into the overflow
362
+ * menu first. Order your actions most-important-first.
363
+ *
364
+ * Measurement is done with a hidden "ghost" row (always renders every action
365
+ * + the kebab) read via a ResizeObserver, so the visible row never reflows
366
+ * mid-frame.
367
+ *
368
+ * Seam inversions (host-shaped chrome becomes injected):
369
+ * - `icon: LucideIcon` → the structural `ToolbarIcon`
370
+ * (`ComponentType<{ className?: string }>`) — any SVG component fits.
371
+ * - The host Tooltip wrapper → `renderTooltip` prop. Without it, icon-only
372
+ * buttons render bare (they always carry `aria-label`); hosts inject their
373
+ * tooltip system for the original hover behavior.
374
+ * - The host ItemMenu overflow menu → `renderOverflowMenu` prop (required):
375
+ * the host receives the collapsed actions plus the ready-made kebab trigger
376
+ * and renders them with its own menu system.
377
+ */
378
+
379
+ type ToolbarActionTone = "default" | "primary" | "destructive";
380
+ /** Structural icon contract (a lucide icon satisfies it, so does any SVG component). */
381
+ type ToolbarIcon = React__default.ComponentType<{
382
+ className?: string;
383
+ }>;
384
+ interface ToolbarAction {
385
+ id: string;
386
+ label: string;
387
+ icon: ToolbarIcon;
388
+ /** Click handler. Ignored when `href` is set. */
389
+ onSelect?: () => void;
390
+ /** Renders an anchor instead of a button. */
391
+ href?: string;
392
+ target?: "_blank";
393
+ disabled?: boolean;
394
+ /** Swaps the icon for a spinner and (optionally) shows `runningLabel`. */
395
+ running?: boolean;
396
+ runningLabel?: string;
397
+ tone?: ToolbarActionTone;
398
+ /** Icon-only button (tooltip carries the label). For obvious actions. */
399
+ hideLabel?: boolean;
400
+ /** Drop the action entirely. */
401
+ hidden?: boolean;
402
+ }
403
+ interface OverflowToolbarProps {
404
+ actions: ToolbarAction[];
405
+ /**
406
+ * Optional element pinned at the start of the row — never collapsed, never
407
+ * measured into the action budget except as a fixed prefix (e.g. a surface
408
+ * switcher / context chip cluster).
409
+ */
410
+ leading?: React__default.ReactNode;
411
+ /** Accessible label for the overflow trigger. */
412
+ overflowAriaLabel?: string;
413
+ className?: string;
414
+ /**
415
+ * Injected overflow-menu seam: render the collapsed actions with the host's
416
+ * menu system, using `trigger` (the ready-made kebab button) as the menu
417
+ * trigger element.
418
+ */
419
+ renderOverflowMenu: (args: {
420
+ actions: ToolbarAction[];
421
+ trigger: React__default.ReactNode;
422
+ }) => React__default.ReactNode;
423
+ /**
424
+ * Injected tooltip seam for icon-only buttons (their label lives nowhere
425
+ * else on screen). Omitted → the bare control renders (aria-label intact).
426
+ */
427
+ renderTooltip?: (control: React__default.ReactElement, label: string) => React__default.ReactNode;
428
+ }
429
+ declare function OverflowToolbar({ actions, leading, overflowAriaLabel, className, renderOverflowMenu, renderTooltip, }: OverflowToolbarProps): React__default.JSX.Element;
430
+
431
+ /**
432
+ * Popover — ported verbatim from matrx-frontend `components/ui/popover.tsx`.
433
+ *
434
+ * Seam inversion: the host's `useNestedPortalContainer` (dialog/popout aware)
435
+ * becomes the injected `PortalContainerProvider` seam (`portal-container.tsx`);
436
+ * the explicit `container` prop keeps top priority, exactly as before.
437
+ *
438
+ * THE ROOT RENDERS UNCONDITIONALLY — no mount gate. This wrapper used to defer
439
+ * rendering until after hydration ("Radix generates dynamic aria-controls ids
440
+ * that differ between SSR and client"), and that justification was false:
441
+ * Radix ids come from React's SSR-stable `useId` (verified against
442
+ * @radix-ui/react-popover 1.1.17 / react-id 1.1.2). The gate was actively
443
+ * harmful — the Trigger wraps ALWAYS-VISIBLE content, so `return null`
444
+ * deleted it from SSR and the first client paint.
445
+ */
446
+
447
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
448
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
449
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
450
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
451
+ container?: HTMLElement | null;
452
+ } & React.RefAttributes<HTMLDivElement>>;
453
+
454
+ /**
455
+ * Injected portal-container seam.
456
+ *
457
+ * The matrx-frontend original resolved nested portal targets through
458
+ * `useNestedPortalContainer` (explicit prop > dialog content > popout body >
459
+ * document.body) — a host-shaped hook wired to that app's dialog and
460
+ * window-panel systems. The package inverts the seam: hosts provide the
461
+ * resolved container through `PortalContainerProvider`; an explicit
462
+ * `container` prop on a component still wins, and with neither the portal
463
+ * falls through to `document.body` (Radix default). Priority semantics are
464
+ * unchanged from the original.
465
+ */
466
+
467
+ interface PortalContainerProviderProps {
468
+ /** Where nested Radix portals (Popover, etc.) should mount. `null`/`undefined` → document.body. */
469
+ container: HTMLElement | null | undefined;
470
+ children: React.ReactNode;
471
+ }
472
+ declare function PortalContainerProvider({ container, children, }: PortalContainerProviderProps): React.JSX.Element;
473
+ /**
474
+ * Resolve a portal target: explicit prop (including an explicit `null`,
475
+ * meaning "the default body") beats the injected container.
476
+ */
477
+ declare function usePortalContainer(explicit?: HTMLElement | null): HTMLElement | undefined;
478
+
479
+ /**
480
+ * Ported verbatim from matrx-frontend `components/ui/radix-dialog-modal-context.tsx`.
481
+ * Shared by the Sheet and BottomSheet families (and available to hosts that
482
+ * compose their own Radix Dialog-derived wrappers around these primitives).
483
+ */
484
+
485
+ interface RadixDialogModalProviderProps {
486
+ children: React.ReactNode;
487
+ modal: boolean;
488
+ }
489
+ /**
490
+ * Keeps our Radix-based content wrappers aligned with the owning Root's
491
+ * modality so ARIA semantics cannot drift from focus/pointer behavior.
492
+ */
493
+ declare function RadixDialogModalProvider({ children, modal, }: RadixDialogModalProviderProps): React.JSX.Element;
494
+ /** Returns whether the nearest Radix Dialog-derived root is modal. */
495
+ declare function useRadixDialogModal(): boolean;
496
+
497
+ interface ScoreThresholds {
498
+ /** Scores at or above this value are green. */
499
+ good: number;
500
+ /** Scores at or above this value (but below good) are orange. */
501
+ warning: number;
502
+ }
503
+ declare const DEFAULT_SCORE_THRESHOLDS: ScoreThresholds;
504
+ /** Semantic score color shared by ring and accent consumers. */
505
+ declare function scoreRingColorClasses(pct: number | null, thresholds?: ScoreThresholds): string;
506
+ /** Solid-background twin of `scoreRingColorClasses`. */
507
+ declare function scoreAccentBgClasses(pct: number | null, thresholds?: ScoreThresholds): string;
508
+ interface ScoreRingProps {
509
+ pct: number | null;
510
+ size?: number;
511
+ strokeWidth?: number;
512
+ label?: string;
513
+ valueClassName?: string;
514
+ className?: string;
515
+ thresholds?: ScoreThresholds;
516
+ /** Visible suffix; study keeps `%`, while Lighthouse convention omits it. */
517
+ suffix?: string;
518
+ }
519
+ /**
520
+ * Shared SVG score ring. `pct` is 0–100; threshold semantics are supplied by
521
+ * the domain (for example Lighthouse uses 90/50 while study uses 75/50).
522
+ */
523
+ declare function ScoreRing({ pct, size, strokeWidth, label, valueClassName, className, thresholds, suffix, }: ScoreRingProps): React.JSX.Element;
524
+
525
+ /**
526
+ * SegmentedControl — sized accessible segmented toggle.
527
+ * Ported verbatim from matrx-frontend `components/ui/segmented-control.tsx`
528
+ * (S17). No seams: pure markup over host semantic tokens. The option/prop
529
+ * interfaces are exported here (the original kept them file-local).
530
+ */
531
+
532
+ interface SegmentOption {
533
+ value: string;
534
+ label: React.ReactNode;
535
+ disabled?: boolean;
536
+ }
537
+ interface SegmentedControlProps {
538
+ value: string;
539
+ onValueChange: (value: string) => void;
540
+ data: SegmentOption[];
541
+ name?: string;
542
+ className?: string;
543
+ fullWidth?: boolean;
544
+ size?: "sm" | "md" | "lg";
545
+ }
546
+ declare function SegmentedControl({ value, onValueChange, data, name: _name, className, fullWidth, size, }: SegmentedControlProps): React.JSX.Element;
547
+
548
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
549
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
550
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
551
+ declare const selectTriggerVariants: (props?: ({
552
+ size?: "default" | "sm" | "lg" | null | undefined;
553
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
554
+ interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
555
+ hideArrow?: boolean;
556
+ }
557
+ declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
558
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
559
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
560
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
561
+ container?: HTMLElement | null;
562
+ } & React.RefAttributes<HTMLDivElement>>;
563
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
564
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
565
+ /**
566
+ * Secondary line shown under the label IN THE LIST ONLY. Rendered outside
567
+ * Radix `ItemText` on purpose: everything inside `ItemText` is what the
568
+ * closed trigger displays, so a description passed as `children` gets
569
+ * squeezed into the fixed-height trigger and clipped. This prop keeps the
570
+ * trigger to the one-line label while the open list shows both lines.
571
+ */
572
+ description?: React.ReactNode;
573
+ } & React.RefAttributes<HTMLDivElement>>;
574
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
575
+
576
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
577
+
578
+ declare const Sheet: React.ForwardRefExoticComponent<SheetPrimitive.DialogProps & React.RefAttributes<never>>;
579
+ declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
580
+ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
581
+ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
582
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
583
+ declare const sheetVariants: (props?: ({
584
+ side?: "center" | "bottom" | "left" | "right" | "top" | null | undefined;
585
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
586
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
587
+ hideCloseButton?: boolean;
588
+ /** Skip the dimming overlay — for non-modal side panels (e.g. chat canvas). */
589
+ hideOverlay?: boolean;
590
+ /** Optional className for the overlay when shown. */
591
+ overlayClassName?: string;
592
+ }
593
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
594
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
595
+ declare const SheetHeader: {
596
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
597
+ displayName: string;
598
+ };
599
+ declare const SheetFooter: {
600
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
601
+ displayName: string;
602
+ };
603
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
604
+
605
+ /**
606
+ * Skeleton — ported verbatim from matrx-frontend `components/ui/skeleton.tsx`.
607
+ * No seams: pure markup over host semantic tokens.
608
+ */
609
+
610
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
611
+
612
+ interface TabbedBottomSheetTab {
613
+ id: string;
614
+ label: string;
615
+ icon?: ComponentType<{
616
+ className?: string;
617
+ }>;
618
+ /** Optional trailing badge / dot shown on the index row. */
619
+ trailing?: ReactNode;
620
+ content: ReactNode;
621
+ }
622
+ interface TabbedBottomSheetProps {
623
+ open: boolean;
624
+ onOpenChange: (open: boolean) => void;
625
+ title: string;
626
+ tabs: TabbedBottomSheetTab[];
627
+ }
628
+ declare function TabbedBottomSheet({ open, onOpenChange, title, tabs, }: TabbedBottomSheetProps): React.JSX.Element;
629
+
630
+ interface ScrollFadeState {
631
+ top: boolean;
632
+ bottom: boolean;
633
+ }
634
+ interface UseScrollFadeResult {
635
+ ref: (node: HTMLElement | null) => void;
636
+ fadeProps: {
637
+ "data-fade-top": "" | undefined;
638
+ "data-fade-bottom": "" | undefined;
639
+ className: string;
640
+ };
641
+ state: ScrollFadeState;
642
+ }
643
+ declare function useScrollFade(): UseScrollFadeResult;
644
+
645
+ export { Badge, type BadgeProps, BasicInput, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_SCORE_THRESHOLDS, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, OverflowToolbar, type OverflowToolbarProps, type PickerIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, RadixDialogModalProvider, type RadixDialogModalProviderProps, ScoreRing, type ScoreRingProps, type ScoreThresholds, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, type UseScrollFadeResult, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, usePortalContainer, useRadixDialogModal, useScrollFade };