@getloopscale/ui 0.0.0-stage → 0.38.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.
- package/LICENSE +201 -0
- package/README.md +91 -2
- package/dist/base.css +110 -0
- package/dist/components/composites/account-menu/account-menu.d.ts +43 -0
- package/dist/components/composites/account-menu/index.d.ts +1 -0
- package/dist/components/composites/annotation-input/annotation-input.d.ts +38 -0
- package/dist/components/composites/annotation-input/index.d.ts +4 -0
- package/dist/components/composites/annotation-input/types.d.ts +31 -0
- package/dist/components/composites/annotation-summary-group/annotation-summary-group.d.ts +28 -0
- package/dist/components/composites/annotation-summary-group/index.d.ts +1 -0
- package/dist/components/composites/attributes-table/attributes-table.d.ts +20 -0
- package/dist/components/composites/attributes-table/index.d.ts +1 -0
- package/dist/components/composites/chat-message-card/chat-message-card.d.ts +14 -0
- package/dist/components/composites/chat-message-card/index.d.ts +1 -0
- package/dist/components/composites/code-block/code-block.d.ts +29 -0
- package/dist/components/composites/code-block/index.d.ts +1 -0
- package/dist/components/composites/command-palette/command-palette.d.ts +41 -0
- package/dist/components/composites/command-palette/index.d.ts +1 -0
- package/dist/components/composites/comment-thread/comment-thread.d.ts +24 -0
- package/dist/components/composites/comment-thread/index.d.ts +2 -0
- package/dist/components/composites/confirm-dialog/confirm-dialog.d.ts +41 -0
- package/dist/components/composites/confirm-dialog/index.d.ts +1 -0
- package/dist/components/composites/data-table/compare-values.d.ts +2 -0
- package/dist/components/composites/data-table/data-table-loading.d.ts +10 -0
- package/dist/components/composites/data-table/data-table-parts.d.ts +16 -0
- package/dist/components/composites/data-table/data-table-virtualized.d.ts +32 -0
- package/dist/components/composites/data-table/data-table.d.ts +82 -0
- package/dist/components/composites/data-table/index.d.ts +2 -0
- package/dist/components/composites/data-table/use-data-table-sort.d.ts +19 -0
- package/dist/components/composites/dataset-item-diff/dataset-item-diff.d.ts +19 -0
- package/dist/components/composites/dataset-item-diff/index.d.ts +4 -0
- package/dist/components/composites/dataset-item-diff/to-diff-text.d.ts +22 -0
- package/dist/components/composites/deployment-row/deployment-row.d.ts +28 -0
- package/dist/components/composites/deployment-row/index.d.ts +1 -0
- package/dist/components/composites/diff-view/diff-section.d.ts +19 -0
- package/dist/components/composites/diff-view/diff-view.d.ts +39 -0
- package/dist/components/composites/diff-view/index.d.ts +2 -0
- package/dist/components/composites/domain-config/domain-config.d.ts +34 -0
- package/dist/components/composites/domain-config/index.d.ts +1 -0
- package/dist/components/composites/env-var-editor/env-var-editor.d.ts +35 -0
- package/dist/components/composites/env-var-editor/index.d.ts +1 -0
- package/dist/components/composites/evaluator-form/evaluator-form.d.ts +25 -0
- package/dist/components/composites/evaluator-form/index.d.ts +3 -0
- package/dist/components/composites/evaluator-form/types.d.ts +41 -0
- package/dist/components/composites/histogram/histogram.d.ts +19 -0
- package/dist/components/composites/histogram/index.d.ts +2 -0
- package/dist/components/composites/io-cards/index.d.ts +2 -0
- package/dist/components/composites/io-cards/io-cards.d.ts +17 -0
- package/dist/components/composites/io-cards/message-card.d.ts +21 -0
- package/dist/components/composites/message-branch-selector/index.d.ts +1 -0
- package/dist/components/composites/message-branch-selector/message-branch-selector.d.ts +27 -0
- package/dist/components/composites/metric-card/index.d.ts +2 -0
- package/dist/components/composites/metric-card/metric-card.d.ts +46 -0
- package/dist/components/composites/page-shell/index.d.ts +1 -0
- package/dist/components/composites/page-shell/page-shell.d.ts +68 -0
- package/dist/components/composites/percentile-chart/index.d.ts +2 -0
- package/dist/components/composites/percentile-chart/percentile-chart.d.ts +37 -0
- package/dist/components/composites/preview-env-card/index.d.ts +1 -0
- package/dist/components/composites/preview-env-card/preview-env-card.d.ts +36 -0
- package/dist/components/composites/price-breakdown/index.d.ts +2 -0
- package/dist/components/composites/price-breakdown/price-breakdown.d.ts +21 -0
- package/dist/components/composites/project-card/index.d.ts +1 -0
- package/dist/components/composites/project-card/project-card.d.ts +32 -0
- package/dist/components/composites/prompt-template-editor/extract-vars.d.ts +1 -0
- package/dist/components/composites/prompt-template-editor/index.d.ts +2 -0
- package/dist/components/composites/prompt-template-editor/prompt-template-editor.d.ts +24 -0
- package/dist/components/composites/prompt-version-diff/index.d.ts +4 -0
- package/dist/components/composites/prompt-version-diff/prompt-version-diff.d.ts +20 -0
- package/dist/components/composites/prompt-version-diff/to-diff-text.d.ts +26 -0
- package/dist/components/composites/rollback-ui/index.d.ts +1 -0
- package/dist/components/composites/rollback-ui/rollback-ui.d.ts +32 -0
- package/dist/components/composites/session-summary/index.d.ts +1 -0
- package/dist/components/composites/session-summary/session-summary.d.ts +18 -0
- package/dist/components/composites/session-timeline/index.d.ts +1 -0
- package/dist/components/composites/session-timeline/session-timeline.d.ts +22 -0
- package/dist/components/composites/severity-badge/index.d.ts +2 -0
- package/dist/components/composites/severity-badge/severity-badge.d.ts +33 -0
- package/dist/components/composites/span-graph/index.d.ts +1 -0
- package/dist/components/composites/span-graph/span-graph.d.ts +19 -0
- package/dist/components/composites/span-tree/index.d.ts +2 -0
- package/dist/components/composites/span-tree/span-tree-row.d.ts +22 -0
- package/dist/components/composites/span-tree/span-tree-virtual.d.ts +7 -0
- package/dist/components/composites/span-tree/span-tree.d.ts +34 -0
- package/dist/components/composites/span-waterfall/index.d.ts +1 -0
- package/dist/components/composites/span-waterfall/span-waterfall.d.ts +28 -0
- package/dist/components/composites/status-indicator/index.d.ts +2 -0
- package/dist/components/composites/status-indicator/status-indicator.d.ts +31 -0
- package/dist/components/composites/stepper/index.d.ts +1 -0
- package/dist/components/composites/stepper/stepper.d.ts +53 -0
- package/dist/components/composites/tag-input/index.d.ts +2 -0
- package/dist/components/composites/tag-input/tag-input.d.ts +32 -0
- package/dist/components/composites/task-header/index.d.ts +1 -0
- package/dist/components/composites/task-header/task-header.d.ts +20 -0
- package/dist/components/composites/token-cost-breakdown/index.d.ts +2 -0
- package/dist/components/composites/token-cost-breakdown/token-cost-breakdown.d.ts +26 -0
- package/dist/components/composites/trace-compare/index.d.ts +1 -0
- package/dist/components/composites/trace-compare/trace-compare.d.ts +27 -0
- package/dist/components/composites/trace-transcript/index.d.ts +1 -0
- package/dist/components/composites/trace-transcript/trace-transcript.d.ts +26 -0
- package/dist/components/composites/trend-chart/index.d.ts +1 -0
- package/dist/components/composites/trend-chart/trend-chart.d.ts +117 -0
- package/dist/components/primitives/action-bar/action-bar.d.ts +36 -0
- package/dist/components/primitives/action-bar/index.d.ts +1 -0
- package/dist/components/primitives/alert/alert.d.ts +31 -0
- package/dist/components/primitives/alert/index.d.ts +1 -0
- package/dist/components/primitives/avatar/avatar.d.ts +26 -0
- package/dist/components/primitives/avatar/index.d.ts +1 -0
- package/dist/components/primitives/badge/badge.d.ts +33 -0
- package/dist/components/primitives/badge/index.d.ts +1 -0
- package/dist/components/primitives/breadcrumb/breadcrumb.d.ts +15 -0
- package/dist/components/primitives/breadcrumb/index.d.ts +1 -0
- package/dist/components/primitives/button/button.d.ts +26 -0
- package/dist/components/primitives/button/index.d.ts +1 -0
- package/dist/components/primitives/card/card.d.ts +59 -0
- package/dist/components/primitives/card/index.d.ts +1 -0
- package/dist/components/primitives/checkbox/checkbox.d.ts +20 -0
- package/dist/components/primitives/checkbox/index.d.ts +1 -0
- package/dist/components/primitives/combobox/combobox.d.ts +53 -0
- package/dist/components/primitives/combobox/index.d.ts +1 -0
- package/dist/components/primitives/copy-button/copy-button.d.ts +17 -0
- package/dist/components/primitives/copy-button/index.d.ts +1 -0
- package/dist/components/primitives/danger-zone/danger-zone.d.ts +40 -0
- package/dist/components/primitives/danger-zone/index.d.ts +1 -0
- package/dist/components/primitives/description-list/description-list.d.ts +33 -0
- package/dist/components/primitives/description-list/index.d.ts +1 -0
- package/dist/components/primitives/dialog/dialog.d.ts +31 -0
- package/dist/components/primitives/dialog/index.d.ts +1 -0
- package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +68 -0
- package/dist/components/primitives/dropdown-menu/index.d.ts +1 -0
- package/dist/components/primitives/empty-state/empty-state.d.ts +22 -0
- package/dist/components/primitives/empty-state/index.d.ts +1 -0
- package/dist/components/primitives/file-dropzone/file-dropzone.d.ts +26 -0
- package/dist/components/primitives/file-dropzone/index.d.ts +1 -0
- package/dist/components/primitives/file-dropzone/validate.d.ts +40 -0
- package/dist/components/primitives/form-field/form-field.d.ts +44 -0
- package/dist/components/primitives/form-field/index.d.ts +1 -0
- package/dist/components/primitives/input/index.d.ts +1 -0
- package/dist/components/primitives/input/input.d.ts +24 -0
- package/dist/components/primitives/json-viewer/index.d.ts +1 -0
- package/dist/components/primitives/json-viewer/json-viewer.d.ts +32 -0
- package/dist/components/primitives/label/index.d.ts +1 -0
- package/dist/components/primitives/label/label.d.ts +15 -0
- package/dist/components/primitives/login-split/index.d.ts +1 -0
- package/dist/components/primitives/login-split/login-split.d.ts +24 -0
- package/dist/components/primitives/metrics-panel/index.d.ts +1 -0
- package/dist/components/primitives/metrics-panel/metrics-panel.d.ts +62 -0
- package/dist/components/primitives/pagination/index.d.ts +1 -0
- package/dist/components/primitives/pagination/pagination.d.ts +44 -0
- package/dist/components/primitives/pin-input/index.d.ts +1 -0
- package/dist/components/primitives/pin-input/pin-input.d.ts +41 -0
- package/dist/components/primitives/plan-badge/index.d.ts +1 -0
- package/dist/components/primitives/plan-badge/plan-badge.d.ts +35 -0
- package/dist/components/primitives/progress/index.d.ts +1 -0
- package/dist/components/primitives/progress/progress.d.ts +44 -0
- package/dist/components/primitives/radio-group/index.d.ts +1 -0
- package/dist/components/primitives/radio-group/radio-group.d.ts +5 -0
- package/dist/components/primitives/scroll-area/index.d.ts +2 -0
- package/dist/components/primitives/scroll-area/scroll-area.d.ts +40 -0
- package/dist/components/primitives/scroll-area/use-stick-to-bottom.d.ts +20 -0
- package/dist/components/primitives/select/index.d.ts +1 -0
- package/dist/components/primitives/select/select.d.ts +50 -0
- package/dist/components/primitives/sheet/index.d.ts +1 -0
- package/dist/components/primitives/sheet/sheet.d.ts +33 -0
- package/dist/components/primitives/sidebar/index.d.ts +1 -0
- package/dist/components/primitives/sidebar/sidebar.d.ts +76 -0
- package/dist/components/primitives/skeleton/index.d.ts +1 -0
- package/dist/components/primitives/skeleton/skeleton.d.ts +21 -0
- package/dist/components/primitives/slider/index.d.ts +1 -0
- package/dist/components/primitives/slider/slider.d.ts +24 -0
- package/dist/components/primitives/social-auth-row/index.d.ts +1 -0
- package/dist/components/primitives/social-auth-row/social-auth-row.d.ts +24 -0
- package/dist/components/primitives/stat-tile/index.d.ts +1 -0
- package/dist/components/primitives/stat-tile/stat-tile.d.ts +28 -0
- package/dist/components/primitives/status-dot/index.d.ts +1 -0
- package/dist/components/primitives/status-dot/status-dot.d.ts +31 -0
- package/dist/components/primitives/switch/index.d.ts +1 -0
- package/dist/components/primitives/switch/switch.d.ts +20 -0
- package/dist/components/primitives/table/index.d.ts +1 -0
- package/dist/components/primitives/table/table.d.ts +61 -0
- package/dist/components/primitives/tabs/index.d.ts +1 -0
- package/dist/components/primitives/tabs/tabs.d.ts +7 -0
- package/dist/components/primitives/textarea/index.d.ts +1 -0
- package/dist/components/primitives/textarea/textarea.d.ts +20 -0
- package/dist/components/primitives/timestamp/index.d.ts +1 -0
- package/dist/components/primitives/timestamp/timestamp.d.ts +34 -0
- package/dist/components/primitives/toast/index.d.ts +2 -0
- package/dist/components/primitives/toast/toast.d.ts +34 -0
- package/dist/components/primitives/toast/toaster.d.ts +38 -0
- package/dist/components/primitives/tooltip/index.d.ts +1 -0
- package/dist/components/primitives/tooltip/tooltip.d.ts +33 -0
- package/dist/components/primitives/topnav/index.d.ts +1 -0
- package/dist/components/primitives/topnav/topnav.d.ts +29 -0
- package/dist/components/primitives/update-banner/index.d.ts +1 -0
- package/dist/components/primitives/update-banner/update-banner.d.ts +16 -0
- package/dist/components.css +2 -0
- package/dist/fonts/LICENSE-hanken-grotesk.txt +93 -0
- package/dist/fonts/LICENSE-jetbrains-mono.txt +93 -0
- package/dist/fonts/hanken-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/fonts-cdn.css +16 -0
- package/dist/fonts.css +59 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +9271 -0
- package/dist/lib/chart/histogram.d.ts +21 -0
- package/dist/lib/chart/index.d.ts +1 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/diff/diff-lines.d.ts +23 -0
- package/dist/lib/diff/index.d.ts +1 -0
- package/dist/lib/env.d.ts +55 -0
- package/dist/lib/live-region-context.d.ts +2 -0
- package/dist/lib/safe-href.d.ts +27 -0
- package/dist/lib/session/aggregate.d.ts +18 -0
- package/dist/lib/session/index.d.ts +2 -0
- package/dist/lib/session/types.d.ts +30 -0
- package/dist/lib/trace/align.d.ts +41 -0
- package/dist/lib/trace/attributes.d.ts +11 -0
- package/dist/lib/trace/bar-layout.d.ts +52 -0
- package/dist/lib/trace/chat.d.ts +14 -0
- package/dist/lib/trace/cost.d.ts +24 -0
- package/dist/lib/trace/duration.d.ts +18 -0
- package/dist/lib/trace/flatten.d.ts +28 -0
- package/dist/lib/trace/graph-layout.d.ts +52 -0
- package/dist/lib/trace/index.d.ts +9 -0
- package/dist/lib/trace/types.d.ts +85 -0
- package/dist/lib/types.d.ts +10 -0
- package/dist/preset.css +13 -0
- package/dist/styles/tailwind-preset.d.ts +29 -0
- package/dist/styles-v3-legacy.css +85 -0
- package/dist/styles.css +23 -0
- package/dist/tailwind-preset.js +166 -0
- package/dist/test/a11y.d.ts +13 -0
- package/dist/test/fixtures/trace.d.ts +19 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/tokens-v4.css +222 -0
- package/dist/tokens.css +288 -0
- package/dist/types/task.d.ts +9 -0
- package/package.json +127 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Card — surface container for grouping related content.
|
|
4
|
+
*
|
|
5
|
+
* Composition pattern (shadcn-style):
|
|
6
|
+
* <Card>
|
|
7
|
+
* <Card.Header>
|
|
8
|
+
* <Card.Title>…</Card.Title>
|
|
9
|
+
* <Card.Description>…</Card.Description>
|
|
10
|
+
* </Card.Header>
|
|
11
|
+
* <Card.Body>…</Card.Body>
|
|
12
|
+
* <Card.Footer>…</Card.Footer>
|
|
13
|
+
* </Card>
|
|
14
|
+
*
|
|
15
|
+
* The `size` prop on the root propagates to subparts via Context, so a
|
|
16
|
+
* single declaration controls padding + heading scale across the compound.
|
|
17
|
+
* Subparts used in isolation default to `md`. Subparts do NOT accept a `size`
|
|
18
|
+
* prop of their own — use `className` for granular per-subpart tweaks.
|
|
19
|
+
* (EC-8, edge-case review 2026-05-20.)
|
|
20
|
+
*/
|
|
21
|
+
type CardSize = "sm" | "md" | "lg";
|
|
22
|
+
interface CardRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
size?: CardSize;
|
|
24
|
+
/**
|
|
25
|
+
* Renders the child element with the Card styles applied instead of the default `<div>`
|
|
26
|
+
* (Radix Slot pattern) — the same hatch `Card.Title` already offers for its `<h3>` (issue #32).
|
|
27
|
+
*
|
|
28
|
+
* The case it exists for is the whole-card control: a choice grid, a plan picker, an agent
|
|
29
|
+
* selector. Without it the two ways to build one are both bad. A `<button>` wrapped AROUND a
|
|
30
|
+
* `<Card>` is invalid — `<button>` takes phrasing content and the card renders a `<div>`, so the
|
|
31
|
+
* browser reparents the markup. Copying the card's classes onto a `<button>` is valid but forks
|
|
32
|
+
* the design system at a place that then stops tracking it.
|
|
33
|
+
*
|
|
34
|
+
* <Card asChild size="sm">
|
|
35
|
+
* <button type="button" aria-pressed={selected} onClick={onSelect}>…</button>
|
|
36
|
+
* </Card>
|
|
37
|
+
*
|
|
38
|
+
* This does NOT lift the phrasing-content restriction: choose `<button>` and everything inside
|
|
39
|
+
* still has to be phrasing content. What it gives is the choice — and `<a>`, where the
|
|
40
|
+
* restriction does not apply, becomes the better answer for anything navigable.
|
|
41
|
+
*/
|
|
42
|
+
asChild?: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface TitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
45
|
+
/**
|
|
46
|
+
* When true, renders the child element with the Card.Title styles applied
|
|
47
|
+
* (Radix Slot pattern). Use to swap the default `<h3>` for `<h1>` / `<h2>`
|
|
48
|
+
* when the heading hierarchy requires it.
|
|
49
|
+
*/
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const Card: import("react").ForwardRefExoticComponent<CardRootProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
53
|
+
Header: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
|
+
Title: import("react").ForwardRefExoticComponent<TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
55
|
+
Description: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
56
|
+
Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
57
|
+
Footer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
|
+
};
|
|
59
|
+
export { Card };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from "./card.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Checkbox — built on Radix Checkbox.
|
|
6
|
+
*
|
|
7
|
+
* Supports tri-state via `checked="indeterminate"`. Brand-colored fill when on,
|
|
8
|
+
* border-only when off. Themed via tokens (--primary, --background).
|
|
9
|
+
*
|
|
10
|
+
* The `size` prop accepts `"sm" | "md" | "lg"`. Default `md` preserves the
|
|
11
|
+
* 16px box from before this prop existed. The `sm` size keeps a >=24px
|
|
12
|
+
* effective tap target via an invisible expanded hit area (WCAG 2.5.5).
|
|
13
|
+
*/
|
|
14
|
+
declare const checkboxVariants: (props?: ({
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
interface CheckboxProps extends ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
|
|
18
|
+
}
|
|
19
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
export { Checkbox, checkboxVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Checkbox } from "./checkbox.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
2
|
+
import type { ComponentPropsWithoutRef, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
4
|
+
/** Selected value (controlled). */
|
|
5
|
+
value?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
/** Listbox visibility (controlled). */
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
/** Set false to disable cmdk's internal filter (async mode — consumer filters). */
|
|
12
|
+
shouldFilter?: boolean;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
type ComboboxInputProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;
|
|
16
|
+
interface ComboboxContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
/** Async fetch in flight: shows the loading slot and hides items/empty. */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type ComboboxItemProps = ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;
|
|
21
|
+
declare const Combobox: import("react").ForwardRefExoticComponent<ComboboxProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
22
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Pick<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & {
|
|
23
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
24
|
+
} & {
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
}, "key" | "asChild" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
27
|
+
value?: string;
|
|
28
|
+
onValueChange?: (search: string) => void;
|
|
29
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
|
+
Content: import("react").ForwardRefExoticComponent<ComboboxContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
Item: import("react").ForwardRefExoticComponent<Omit<{
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
} & Omit<Pick<Pick<import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
34
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
35
|
+
} & {
|
|
36
|
+
asChild?: boolean;
|
|
37
|
+
}, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
onSelect?: (value: string) => void;
|
|
40
|
+
value?: string;
|
|
41
|
+
keywords?: string[];
|
|
42
|
+
forceMount?: boolean;
|
|
43
|
+
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
Empty: import("react").ForwardRefExoticComponent<Omit<{
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
} & Pick<Pick<import("react").DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<HTMLDivElement>> & {
|
|
47
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
48
|
+
} & {
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
}, "key" | "asChild" | keyof HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
};
|
|
52
|
+
export { Combobox };
|
|
53
|
+
export type { ComboboxProps, ComboboxContentProps, ComboboxInputProps, ComboboxItemProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Combobox, type ComboboxContentProps, type ComboboxInputProps, type ComboboxItemProps, type ComboboxProps, } from "./combobox.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface CopyButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick" | "children"> {
|
|
3
|
+
/** String to copy when clicked. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Optional button label. Default: just the icon. */
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
/** Visual style. */
|
|
8
|
+
variant?: "ghost" | "outline";
|
|
9
|
+
/** Size. */
|
|
10
|
+
size?: "sm" | "md";
|
|
11
|
+
/** Callback after successful copy (e.g. analytics). */
|
|
12
|
+
onCopied?: (value: string) => void;
|
|
13
|
+
/** Duration of the feedback state in ms. Default 1500. */
|
|
14
|
+
feedbackDuration?: number;
|
|
15
|
+
}
|
|
16
|
+
declare const CopyButton: import("react").ForwardRefExoticComponent<CopyButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export { CopyButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CopyButton, type CopyButtonProps } from "./copy-button.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* DangerZone — destructive-actions section primitive.
|
|
4
|
+
*
|
|
5
|
+
* Red-bordered container with a title bar and `DangerZone.Action` rows.
|
|
6
|
+
* Each Action is laid out as title + description on the left, with a
|
|
7
|
+
* consumer-provided action slot (typically a destructive Button) on
|
|
8
|
+
* the right. Rows are separated by hairline dividers; the last row
|
|
9
|
+
* has no bottom border via `last:border-b-0`.
|
|
10
|
+
*
|
|
11
|
+
* The consumer supplies the destructive button — this primitive never
|
|
12
|
+
* imports `<Button>`, keeping it free of internal `@getloopscale/ui` deps
|
|
13
|
+
* (true primitive).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <DangerZone>
|
|
17
|
+
* <DangerZone.Action
|
|
18
|
+
* title="Delete project"
|
|
19
|
+
* description="Permanently delete this project."
|
|
20
|
+
* action={<Button variant="destructive">Delete</Button>}
|
|
21
|
+
* />
|
|
22
|
+
* </DangerZone>
|
|
23
|
+
*/
|
|
24
|
+
export interface DangerZoneProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
25
|
+
/** Section title. Default "Danger Zone". */
|
|
26
|
+
title?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
declare const Root: import("react").ForwardRefExoticComponent<DangerZoneProps & import("react").RefAttributes<HTMLElement>>;
|
|
29
|
+
export interface DangerZoneActionProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
30
|
+
title: ReactNode;
|
|
31
|
+
description: ReactNode;
|
|
32
|
+
/** Consumer-provided destructive button (or any ReactNode). */
|
|
33
|
+
action: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const Action: import("react").ForwardRefExoticComponent<DangerZoneActionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
type DangerZoneRoot = typeof Root & {
|
|
37
|
+
Action: typeof Action;
|
|
38
|
+
};
|
|
39
|
+
declare const DangerZone: DangerZoneRoot;
|
|
40
|
+
export { DangerZone };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DangerZone, type DangerZoneProps, type DangerZoneActionProps, } from "./danger-zone.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* DescriptionList — semantic key/value pairs on native `dl/dt/dd`.
|
|
4
|
+
*
|
|
5
|
+
* Layouts: `vertical` (default — stacked groups) and `horizontal` (two-column
|
|
6
|
+
* grid: terms in a fixed max-content column, details beside them; the Item
|
|
7
|
+
* wrapper uses `display: contents` so dt/dd participate in the root grid).
|
|
8
|
+
* `dense` tightens the gaps for crowded detail panels.
|
|
9
|
+
*
|
|
10
|
+
* <DescriptionList layout="horizontal">
|
|
11
|
+
* <DescriptionList.Item>
|
|
12
|
+
* <DescriptionList.Term>Status</DescriptionList.Term>
|
|
13
|
+
* <DescriptionList.Detail><Badge>live</Badge></DescriptionList.Detail>
|
|
14
|
+
* </DescriptionList.Item>
|
|
15
|
+
* </DescriptionList>
|
|
16
|
+
*
|
|
17
|
+
* One Term per Item; multiple Details per Term are valid HTML and supported.
|
|
18
|
+
* Composing dd without a preceding dt is the consumer's responsibility
|
|
19
|
+
* (invalid HTML — same contract as Breadcrumb.Page placement).
|
|
20
|
+
*/
|
|
21
|
+
interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
22
|
+
/** vertical (default): stacked groups. horizontal: term column + detail column. */
|
|
23
|
+
layout?: "vertical" | "horizontal";
|
|
24
|
+
/** Compact spacing for dense detail panels. */
|
|
25
|
+
dense?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare const DescriptionList: import("react").ForwardRefExoticComponent<DescriptionListProps & import("react").RefAttributes<HTMLDListElement>> & {
|
|
28
|
+
Item: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
Term: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
30
|
+
Detail: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
31
|
+
};
|
|
32
|
+
export { DescriptionList };
|
|
33
|
+
export type { DescriptionListProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DescriptionList, type DescriptionListProps } from "./description-list.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
import type { ComponentPropsWithoutRef, HTMLAttributes } from "react";
|
|
3
|
+
interface ContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
4
|
+
hideCloseButton?: boolean;
|
|
5
|
+
/** The name a screen reader gives the corner close button, for an app that is not in English. @default "Close" */
|
|
6
|
+
closeLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Dialog: {
|
|
9
|
+
(props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
} & {
|
|
12
|
+
Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
Content: import("react").ForwardRefExoticComponent<ContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Overlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Header: {
|
|
17
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Body: {
|
|
21
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
Footer: {
|
|
25
|
+
({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
Title: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
29
|
+
Description: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
30
|
+
};
|
|
31
|
+
export { Dialog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dialog } from "./dialog.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
import type { ComponentPropsWithoutRef, HTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* DropdownMenu — accessible menu primitive built on Radix.
|
|
5
|
+
*
|
|
6
|
+
* Composition (single import surface):
|
|
7
|
+
* <DropdownMenu>
|
|
8
|
+
* <DropdownMenu.Trigger>…</DropdownMenu.Trigger>
|
|
9
|
+
* <DropdownMenu.Content>
|
|
10
|
+
* <DropdownMenu.Label>Section</DropdownMenu.Label>
|
|
11
|
+
* <DropdownMenu.Item onSelect={…}>Edit</DropdownMenu.Item>
|
|
12
|
+
* <DropdownMenu.Separator />
|
|
13
|
+
* <DropdownMenu.Item disabled>Delete</DropdownMenu.Item>
|
|
14
|
+
* </DropdownMenu.Content>
|
|
15
|
+
* </DropdownMenu>
|
|
16
|
+
*
|
|
17
|
+
* The primitive consolidates 5 prior direct-Radix usages
|
|
18
|
+
* (`model-selector`, `intent-selector`, `agent-profile`,
|
|
19
|
+
* `theme-switcher`, `code-shell`) under a single styled
|
|
20
|
+
* wrapper so consumers get consistent visuals + the design tokens.
|
|
21
|
+
*
|
|
22
|
+
* a11y note for tests: Radix's focus-guard spans intentionally
|
|
23
|
+
* violate `aria-hidden-focus`. Tests should pass
|
|
24
|
+
* `{ rules: { "aria-hidden-focus": { enabled: false } } }` to axe.
|
|
25
|
+
*/
|
|
26
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
declare const Portal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
28
|
+
declare const Group: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const Sub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
30
|
+
declare const RadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const Content: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
interface ItemProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
|
|
33
|
+
inset?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const Item: import("react").ForwardRefExoticComponent<ItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
declare const CheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
|
+
declare const RadioItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
interface LabelProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
39
|
+
inset?: boolean;
|
|
40
|
+
}
|
|
41
|
+
declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
declare const Separator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare const Shortcut: {
|
|
44
|
+
({ className, ...props }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
declare const SubTrigger: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
48
|
+
inset?: boolean;
|
|
49
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
declare const SubContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
type DropdownMenuRoot = typeof DropdownMenuPrimitive.Root & {
|
|
52
|
+
Trigger: typeof Trigger;
|
|
53
|
+
Portal: typeof Portal;
|
|
54
|
+
Content: typeof Content;
|
|
55
|
+
Item: typeof Item;
|
|
56
|
+
CheckboxItem: typeof CheckboxItem;
|
|
57
|
+
RadioItem: typeof RadioItem;
|
|
58
|
+
Label: typeof Label;
|
|
59
|
+
Separator: typeof Separator;
|
|
60
|
+
Shortcut: typeof Shortcut;
|
|
61
|
+
Group: typeof Group;
|
|
62
|
+
Sub: typeof Sub;
|
|
63
|
+
SubTrigger: typeof SubTrigger;
|
|
64
|
+
SubContent: typeof SubContent;
|
|
65
|
+
RadioGroup: typeof RadioGroup;
|
|
66
|
+
};
|
|
67
|
+
declare const DropdownMenu: DropdownMenuRoot;
|
|
68
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenu } from "./dropdown-menu.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { IconComponent } from "../../../lib/types.js";
|
|
3
|
+
interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
4
|
+
/** Icon shown above the title. */
|
|
5
|
+
icon?: IconComponent;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Optional action slot (typically <Button>). */
|
|
9
|
+
action?: ReactNode;
|
|
10
|
+
/** Hint shown above the title (e.g. uppercase eyebrow). */
|
|
11
|
+
eyebrow?: ReactNode;
|
|
12
|
+
/** Bordered dashed surface (placeholder vibe). Default true. */
|
|
13
|
+
dashed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* EmptyState — visual placeholder for empty lists / first-run screens.
|
|
17
|
+
*
|
|
18
|
+
* Composition: icon + eyebrow + title + description + action. All slots are
|
|
19
|
+
* optional except title.
|
|
20
|
+
*/
|
|
21
|
+
declare const EmptyState: import("react").ForwardRefExoticComponent<EmptyStateProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export { EmptyState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmptyState } from "./empty-state.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileDropzone — drag-drop + file-picker primitive, dependency-free (HTML5
|
|
3
|
+
* DnD). The drag mechanics, the typed-rejection shape and the browser quirks
|
|
4
|
+
* are ported from the react-dropzone reference study (blueprint M5): nested
|
|
5
|
+
* dragenter/dragleave target counting, empty MIME type during drag (Chrome),
|
|
6
|
+
* and the all-or-nothing maxFiles rule.
|
|
7
|
+
*
|
|
8
|
+
* Boundary: this component SELECTS and VALIDATES files. Uploading (network,
|
|
9
|
+
* progress) belongs to the consumer — compose with `Progress` for that.
|
|
10
|
+
* Directory drops are out of scope (entries without a real File are skipped).
|
|
11
|
+
*/
|
|
12
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
13
|
+
import type { FileRejection, ValidateFilesOptions } from "./validate.js";
|
|
14
|
+
export { matchesAccept, validateFiles, type FileDropzoneError, type FileDropzoneErrorCode, type FileRejection, type ValidateFilesOptions, } from "./validate.js";
|
|
15
|
+
export type FileDropzoneState = "idle" | "drag-over" | "drag-reject" | "disabled";
|
|
16
|
+
export interface FileDropzoneProps extends Omit<HTMLAttributes<HTMLDivElement>, "onDrop" | "children">, ValidateFilesOptions {
|
|
17
|
+
/** Accessible name for the dropzone (aria-label). */
|
|
18
|
+
label: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onFilesAccepted?: (files: File[]) => void;
|
|
21
|
+
onFilesRejected?: (rejections: FileRejection[]) => void;
|
|
22
|
+
/** Custom instructions content; defaults to a drag-or-click hint. */
|
|
23
|
+
instructions?: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
declare const FileDropzone: import("react").ForwardRefExoticComponent<FileDropzoneProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { FileDropzone };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FileDropzone, matchesAccept, validateFiles, type FileDropzoneError, type FileDropzoneErrorCode, type FileDropzoneProps, type FileDropzoneState, type FileRejection, type ValidateFilesOptions, } from "./file-dropzone.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure validation core of FileDropzone — typed rejections, accept matching
|
|
3
|
+
* (MIME exact / wildcard / extension), size and collective count rules.
|
|
4
|
+
* Ported behaviors from the react-dropzone reference study (blueprint M5).
|
|
5
|
+
*/
|
|
6
|
+
export type FileDropzoneErrorCode = "file-invalid-type" | "file-too-large" | "file-too-small" | "too-many-files";
|
|
7
|
+
export interface FileDropzoneError {
|
|
8
|
+
/** One of the four built-in codes, or a custom code from `validator`. */
|
|
9
|
+
code: FileDropzoneErrorCode | string;
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
export interface FileRejection {
|
|
13
|
+
file: File;
|
|
14
|
+
errors: FileDropzoneError[];
|
|
15
|
+
}
|
|
16
|
+
export interface ValidateFilesOptions {
|
|
17
|
+
accept?: Record<string, string[]>;
|
|
18
|
+
maxSize?: number;
|
|
19
|
+
minSize?: number;
|
|
20
|
+
maxFiles?: number;
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
validator?: (file: File) => FileDropzoneError | FileDropzoneError[] | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Matches a file against an `accept` map ({mime: [ext...]}): exact MIME,
|
|
26
|
+
* `type/*` wildcard, or extension (case-insensitive). No accept → accepts
|
|
27
|
+
* everything. An empty `file.type` is accepted (Chrome reports "" for some
|
|
28
|
+
* types during drag) — real validation happens again on drop.
|
|
29
|
+
*/
|
|
30
|
+
export declare function matchesAccept(file: File, accept?: Record<string, string[]>): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Validates files against accept/size/count rules plus an optional custom
|
|
33
|
+
* validator. Per-file errors accumulate; the maxFiles/multiple rule is
|
|
34
|
+
* COLLECTIVE and all-or-nothing: exceeding it rejects EVERY file with
|
|
35
|
+
* `too-many-files` (ported from the reference behavior).
|
|
36
|
+
*/
|
|
37
|
+
export declare function validateFiles(files: File[], options?: ValidateFilesOptions): {
|
|
38
|
+
accepted: File[];
|
|
39
|
+
rejections: FileRejection[];
|
|
40
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import type { ComponentPropsWithoutRef, HTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* FormField — composition wrapper for accessible form rows.
|
|
5
|
+
*
|
|
6
|
+
* Provides context with a generated `id`, so children (Label, Input, Hint,
|
|
7
|
+
* Error) wire themselves via `htmlFor` / `id` / `aria-describedby` without
|
|
8
|
+
* the consumer having to thread IDs manually.
|
|
9
|
+
*
|
|
10
|
+
* Composition:
|
|
11
|
+
* <FormField>
|
|
12
|
+
* <FormField.Label required>Email</FormField.Label>
|
|
13
|
+
* <FormField.Control>
|
|
14
|
+
* <Input type="email" placeholder="…" />
|
|
15
|
+
* </FormField.Control>
|
|
16
|
+
* <FormField.Hint>We never share your email.</FormField.Hint>
|
|
17
|
+
* <FormField.Error>{error}</FormField.Error>
|
|
18
|
+
* </FormField>
|
|
19
|
+
*
|
|
20
|
+
* Errors take precedence over hints (only one of them shows at once).
|
|
21
|
+
*/
|
|
22
|
+
type FormFieldSize = "sm" | "md" | "lg";
|
|
23
|
+
interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
/** Optional explicit id override. */
|
|
25
|
+
id?: string;
|
|
26
|
+
/** Marks the field as invalid; switches Hint → Error and toggles aria. */
|
|
27
|
+
invalid?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Size scale propagated to Label / Hint / Error subparts via Context.
|
|
30
|
+
* Default `md` preserves prior behavior. Subparts do NOT accept a `size`
|
|
31
|
+
* prop of their own — use `className` for granular tweaks (EC-8).
|
|
32
|
+
*/
|
|
33
|
+
size?: FormFieldSize;
|
|
34
|
+
}
|
|
35
|
+
interface FormFieldLabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
36
|
+
required?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
39
|
+
Label: import("react").ForwardRefExoticComponent<FormFieldLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
40
|
+
Control: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
Hint: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
42
|
+
Error: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
43
|
+
};
|
|
44
|
+
export { FormField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FormField } from "./form-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Input, type InputProps } from "./input.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { InputHTMLAttributes } from "react";
|
|
3
|
+
declare const inputVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Input — text input primitive.
|
|
8
|
+
*
|
|
9
|
+
* Specifics:
|
|
10
|
+
* - height 40px (h-10) matching default Button md.
|
|
11
|
+
* - rounded-lg (8px) — matches buttons (compact Builder identity, 2026-07-16).
|
|
12
|
+
* - focus uses the brand-colored ring (--ring).
|
|
13
|
+
* - placeholder uses --muted-foreground.
|
|
14
|
+
*
|
|
15
|
+
* The `size` prop accepts `"sm" | "md" | "lg"`. Default `md` preserves the
|
|
16
|
+
* 40px tall input from before this prop existed. EC-1 (edge-case review):
|
|
17
|
+
* this overrides the native HTML `size` attribute (text-input columns) —
|
|
18
|
+
* use `{...{ size: 20 } as any}` if you genuinely need the HTML attribute,
|
|
19
|
+
* which is exceedingly rare.
|
|
20
|
+
*/
|
|
21
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
22
|
+
}
|
|
23
|
+
declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export { Input, inputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { JsonViewer, type JsonViewerProps } from "./json-viewer.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* JsonViewer — read-only collapsible JSON tree, dependency-free.
|
|
4
|
+
*
|
|
5
|
+
* Collapse: `collapsed` mirrors the SOTA contract — `true` collapses every
|
|
6
|
+
* node, a number collapses everything at depth >= N (root is depth 0).
|
|
7
|
+
* Collapsed subtrees are NOT rendered (lazy): that is the performance guard —
|
|
8
|
+
* a huge payload fully expanded is the consumer's responsibility (ADR D1);
|
|
9
|
+
* prefer `collapsed={1}` for large payloads.
|
|
10
|
+
*
|
|
11
|
+
* Safety: circular references render a "[Circular]" marker (and serialize as
|
|
12
|
+
* such on copy) instead of overflowing the stack. Copy limitation: the
|
|
13
|
+
* serializer conservatively marks REPEATED (shared, non-circular) references
|
|
14
|
+
* as "[Circular]" too — output is always JSON.parse-able — the studied SOTA reference
|
|
15
|
+
* does not handle this. BigInt renders with the `n` suffix; NaN/Infinity
|
|
16
|
+
* follow JSON semantics on copy (null).
|
|
17
|
+
*
|
|
18
|
+
* <JsonViewer value={eventPayload} collapsed={1} enableCopy />
|
|
19
|
+
*/
|
|
20
|
+
interface JsonViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
21
|
+
/** Data to render. Any value — objects, arrays, primitives, BigInt, Date. */
|
|
22
|
+
value: unknown;
|
|
23
|
+
/** true = all collapsed; number = collapse at depth >= N. Default: all expanded. */
|
|
24
|
+
collapsed?: boolean | number;
|
|
25
|
+
/** Truncate strings longer than this (click to reveal). Default 60. */
|
|
26
|
+
shortenTextAfterLength?: number;
|
|
27
|
+
/** Show a copy button on the root and on object/array nodes. */
|
|
28
|
+
enableCopy?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare const JsonViewer: import("react").ForwardRefExoticComponent<JsonViewerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { JsonViewer };
|
|
32
|
+
export type { JsonViewerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Label } from "./label.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Label — form field label built on Radix Label.
|
|
5
|
+
*
|
|
6
|
+
* Behaviors:
|
|
7
|
+
* - Clicking the label focuses the associated `htmlFor` input.
|
|
8
|
+
* - Adds a small red asterisk when `required` is set.
|
|
9
|
+
* - Inherits disabled visuals from the wrapper (`peer-disabled`).
|
|
10
|
+
*/
|
|
11
|
+
interface LabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
15
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoginSplit } from "./login-split.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
interface LoginSplitProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Left pane content — form, brand, etc. */
|
|
4
|
+
left: ReactNode;
|
|
5
|
+
/** Right pane content — illustration, marketing, social proof. */
|
|
6
|
+
right: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional footer rendered below both panes.
|
|
9
|
+
*/
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Reverse the split (form on the right). Default = form left.
|
|
13
|
+
*/
|
|
14
|
+
reverse?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* LoginSplit — 50/50 split layout shell.
|
|
18
|
+
*
|
|
19
|
+
* Used for the auth flow. Two slots (`left`, `right`); the right pane has a
|
|
20
|
+
* subtle wash of the brand color so the illustration sits inside the LoopScale identity. Mobile
|
|
21
|
+
* collapses to single column.
|
|
22
|
+
*/
|
|
23
|
+
declare const LoginSplit: import("react").ForwardRefExoticComponent<LoginSplitProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export { LoginSplit };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MetricsPanel, type Metric } from "./metrics-panel.js";
|