@alwith/module-chat 0.1.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 +94 -0
- package/README.md +54 -0
- package/THIRD_PARTY_NOTICES.md +43 -0
- package/dist/activity-host.d.ts +32 -0
- package/dist/activity-host.js +1 -0
- package/dist/approval/choice-elicitation-form.d.ts +15 -0
- package/dist/approval/choice-elicitation-form.js +1 -0
- package/dist/approval/choice-schema.d.ts +18 -0
- package/dist/approval/choice-schema.js +1 -0
- package/dist/approval/permission-options.d.ts +7 -0
- package/dist/approval/permission-options.js +1 -0
- package/dist/approval/permission-view.d.ts +19 -0
- package/dist/approval/permission-view.js +1 -0
- package/dist/approval/schema-elicitation-form.d.ts +29 -0
- package/dist/approval/schema-elicitation-form.js +1 -0
- package/dist/approval/url-elicitation-card.d.ts +8 -0
- package/dist/approval/url-elicitation-card.js +1 -0
- package/dist/codex/activity-group.d.ts +15 -0
- package/dist/codex/activity-group.js +6 -0
- package/dist/codex/assistant-message.d.ts +43 -0
- package/dist/codex/assistant-message.js +2 -0
- package/dist/codex/disclosure-state.d.ts +2 -0
- package/dist/codex/disclosure-state.js +1 -0
- package/dist/codex/edited-files-card.d.ts +15 -0
- package/dist/codex/edited-files-card.js +2 -0
- package/dist/codex/markdown-renderer.d.ts +11 -0
- package/dist/codex/markdown-renderer.js +6 -0
- package/dist/codex/markdown.css +760 -0
- package/dist/codex/navigation-audio.d.ts +18 -0
- package/dist/codex/navigation-audio.js +1 -0
- package/dist/codex/navigation-instruments.d.ts +54 -0
- package/dist/codex/navigation-instruments.js +1 -0
- package/dist/codex/navigation-preview.d.ts +8 -0
- package/dist/codex/navigation-preview.js +1 -0
- package/dist/codex/navigation-rail.css +216 -0
- package/dist/codex/navigation-rail.d.ts +25 -0
- package/dist/codex/navigation-rail.js +1 -0
- package/dist/codex/patch-view.d.ts +8 -0
- package/dist/codex/patch-view.js +2 -0
- package/dist/codex/plan.d.ts +4 -0
- package/dist/codex/plan.js +1 -0
- package/dist/codex/styles.css +1238 -0
- package/dist/codex/terminal-output.d.ts +3 -0
- package/dist/codex/terminal-output.js +1 -0
- package/dist/codex/thread-virtualizer.d.ts +52 -0
- package/dist/codex/thread-virtualizer.js +1 -0
- package/dist/codex/user-message.d.ts +30 -0
- package/dist/codex/user-message.js +1 -0
- package/dist/codex/virtualized-turn-list.d.ts +16 -0
- package/dist/codex/virtualized-turn-list.js +1 -0
- package/dist/composer/completion-filter.d.ts +12 -0
- package/dist/composer/completion-filter.js +1 -0
- package/dist/composer/completion-menu.d.ts +21 -0
- package/dist/composer/completion-menu.js +3 -0
- package/dist/composer/completion-trigger.d.ts +8 -0
- package/dist/composer/completion-trigger.js +3 -0
- package/dist/composer/effort-slider.d.ts +10 -0
- package/dist/composer/effort-slider.js +1 -0
- package/dist/composer/menu-radio.d.ts +15 -0
- package/dist/composer/menu-radio.js +1 -0
- package/dist/composer/model-select.d.ts +56 -0
- package/dist/composer/model-select.js +1 -0
- package/dist/composer/permission-mode-select.d.ts +13 -0
- package/dist/composer/permission-mode-select.js +1 -0
- package/dist/composer/prompt-input-attachments.d.ts +16 -0
- package/dist/composer/prompt-input-attachments.js +1 -0
- package/dist/composer/prompt-input-clipboard.d.ts +10 -0
- package/dist/composer/prompt-input-clipboard.js +1 -0
- package/dist/composer/prompt-input-context.d.ts +59 -0
- package/dist/composer/prompt-input-context.js +1 -0
- package/dist/composer/prompt-input-textarea.d.ts +13 -0
- package/dist/composer/prompt-input-textarea.js +3 -0
- package/dist/composer/prompt-input.d.ts +44 -0
- package/dist/composer/prompt-input.js +1 -0
- package/dist/image-lightbox.d.ts +5 -0
- package/dist/image-lightbox.js +1 -0
- package/dist/image-preview-dialog.d.ts +14 -0
- package/dist/image-preview-dialog.js +1 -0
- package/dist/lib/code-highlighter.d.ts +27 -0
- package/dist/lib/code-highlighter.js +1 -0
- package/dist/lib/code-highlighter.worker.d.ts +1 -0
- package/dist/lib/code-highlighter.worker.js +1 -0
- package/dist/lib/fuzzy.d.ts +11 -0
- package/dist/lib/fuzzy.js +1 -0
- package/dist/lib/group-blocks.d.ts +5 -0
- package/dist/lib/group-blocks.js +1 -0
- package/dist/lib/image-encode.d.ts +1 -0
- package/dist/lib/image-encode.js +1 -0
- package/dist/lib/limits.d.ts +5 -0
- package/dist/lib/limits.js +1 -0
- package/dist/lib/markdown-parser.d.ts +34 -0
- package/dist/lib/markdown-parser.js +1 -0
- package/dist/lib/markdown-parser.worker.d.ts +1 -0
- package/dist/lib/markdown-parser.worker.js +1 -0
- package/dist/lib/markdown-rules.d.ts +9 -0
- package/dist/lib/markdown-rules.js +1 -0
- package/dist/lib/pointer-centered-zoom.d.ts +13 -0
- package/dist/lib/pointer-centered-zoom.js +1 -0
- package/dist/lib/prepare-prompt-files.d.ts +7 -0
- package/dist/lib/prepare-prompt-files.js +1 -0
- package/dist/lib/stream-entry.d.ts +28 -0
- package/dist/lib/stream-entry.js +0 -0
- package/dist/lib/stream-style.d.ts +15 -0
- package/dist/lib/stream-style.js +2 -0
- package/dist/lib/streaming-markdown.d.ts +4 -0
- package/dist/lib/streaming-markdown.js +2 -0
- package/dist/locales.d.ts +489 -0
- package/dist/locales.js +1 -0
- package/dist/search/chat-search.d.ts +19 -0
- package/dist/search/chat-search.js +1 -0
- package/dist/search/dom-matches.d.ts +1 -0
- package/dist/search/dom-matches.js +1 -0
- package/dist/search/find-bar.d.ts +14 -0
- package/dist/search/find-bar.js +1 -0
- package/dist/search/literal-matches.d.ts +12 -0
- package/dist/search/literal-matches.js +1 -0
- package/dist/types.d.ts +139 -0
- package/dist/types.js +0 -0
- package/dist/ui/badge.d.ts +7 -0
- package/dist/ui/badge.js +1 -0
- package/dist/ui/button.d.ts +8 -0
- package/dist/ui/button.js +1 -0
- package/dist/ui/card.d.ts +11 -0
- package/dist/ui/card.js +1 -0
- package/dist/ui/checkbox.d.ts +3 -0
- package/dist/ui/checkbox.js +1 -0
- package/dist/ui/dialog.d.ts +17 -0
- package/dist/ui/dialog.js +1 -0
- package/dist/ui/dropdown-menu.d.ts +29 -0
- package/dist/ui/dropdown-menu.js +1 -0
- package/dist/ui/field.d.ts +24 -0
- package/dist/ui/field.js +1 -0
- package/dist/ui/hover-card.d.ts +5 -0
- package/dist/ui/hover-card.js +1 -0
- package/dist/ui/input-group-textarea.d.ts +2 -0
- package/dist/ui/input-group-textarea.js +1 -0
- package/dist/ui/input-group.d.ts +17 -0
- package/dist/ui/input-group.js +1 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +1 -0
- package/dist/ui/label.d.ts +3 -0
- package/dist/ui/label.js +1 -0
- package/dist/ui/radio-group.d.ts +5 -0
- package/dist/ui/radio-group.js +1 -0
- package/dist/ui/separator.d.ts +3 -0
- package/dist/ui/separator.js +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.js +1 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +1 -0
- package/dist/ui/tooltip.d.ts +6 -0
- package/dist/ui/tooltip.js +1 -0
- package/licenses/Apache-2.0.txt +191 -0
- package/licenses/_agentclientprotocol_sdk-LICENSE +191 -0
- package/licenses/_base-ui_react-LICENSE +21 -0
- package/licenses/_floating-ui_dom-LICENSE +20 -0
- package/licenses/ai-elements-notice.txt +13 -0
- package/licenses/ansi_up-LICENSE +22 -0
- package/licenses/class-variance-authority-LICENSE +190 -0
- package/licenses/cn-LICENSE +21 -0
- package/licenses/diff2html-LICENSE.md +14 -0
- package/licenses/entities-LICENSE +11 -0
- package/licenses/highlight.js-LICENSE +29 -0
- package/licenses/katex-LICENSE +21 -0
- package/licenses/lucide-react-LICENSE +43 -0
- package/licenses/marked-LICENSE +44 -0
- package/licenses/marked-linkify-it-LICENSE +21 -0
- package/licenses/react-LICENSE +21 -0
- package/licenses/react-dom-LICENSE +21 -0
- package/licenses/shadcn-ui-MIT.txt +21 -0
- package/package.json +314 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { Cost, ElicitationSchema, PlanEntry, ToolCallContent, ToolCallLocation, ToolCallStatus } from "@agentclientprotocol/sdk/experimental/v2";
|
|
2
|
+
export type { Cost, PlanEntry, ToolCallContent, ToolCallLocation, ToolCallStatus } from "@agentclientprotocol/sdk/experimental/v2";
|
|
3
|
+
export type MentionUri = {
|
|
4
|
+
kind: "file";
|
|
5
|
+
absPath: string;
|
|
6
|
+
};
|
|
7
|
+
export interface ArtifactMeta {
|
|
8
|
+
filePath: string;
|
|
9
|
+
basename: string;
|
|
10
|
+
hash?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
expiresAt?: string;
|
|
13
|
+
isError: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TerminalDisplayMeta {
|
|
16
|
+
userFacingName: string;
|
|
17
|
+
toolUseMessage?: string;
|
|
18
|
+
toolUseTag?: string;
|
|
19
|
+
searchOrRead?: {
|
|
20
|
+
isSearch: boolean;
|
|
21
|
+
isRead: boolean;
|
|
22
|
+
isList: boolean;
|
|
23
|
+
readFilePath?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type ContentBlock = {
|
|
27
|
+
type: "text";
|
|
28
|
+
text: string;
|
|
29
|
+
isApiError?: true;
|
|
30
|
+
} | {
|
|
31
|
+
type: "thinking";
|
|
32
|
+
id?: string;
|
|
33
|
+
thinking: string;
|
|
34
|
+
startedAt?: number;
|
|
35
|
+
durationMs?: number;
|
|
36
|
+
isComplete?: boolean;
|
|
37
|
+
} | {
|
|
38
|
+
type: "tool_use";
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
title: string;
|
|
42
|
+
kind: string;
|
|
43
|
+
status: ToolCallStatus;
|
|
44
|
+
content: ToolCallContent[];
|
|
45
|
+
locations?: ToolCallLocation[];
|
|
46
|
+
rawInput: Record<string, unknown>;
|
|
47
|
+
rawOutput?: unknown;
|
|
48
|
+
parentToolUseId?: string | null;
|
|
49
|
+
isBackground?: boolean;
|
|
50
|
+
exitCode?: number;
|
|
51
|
+
terminalDisplay?: TerminalDisplayMeta;
|
|
52
|
+
artifact?: ArtifactMeta;
|
|
53
|
+
} | {
|
|
54
|
+
type: "subagent";
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
blocks: ContentBlock[];
|
|
58
|
+
status: ToolCallStatus;
|
|
59
|
+
isBackground?: boolean;
|
|
60
|
+
startedAt?: number;
|
|
61
|
+
durationMs?: number;
|
|
62
|
+
} | {
|
|
63
|
+
type: "plan";
|
|
64
|
+
entries: PlanEntry[];
|
|
65
|
+
} | {
|
|
66
|
+
type: "image";
|
|
67
|
+
source: {
|
|
68
|
+
type: string;
|
|
69
|
+
media_type: string;
|
|
70
|
+
data: string;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
type: "mention";
|
|
74
|
+
mentions: MentionUri[];
|
|
75
|
+
};
|
|
76
|
+
export interface PromptUsage {
|
|
77
|
+
used?: number;
|
|
78
|
+
size?: number;
|
|
79
|
+
cost?: Cost;
|
|
80
|
+
inputTokens?: number;
|
|
81
|
+
outputTokens?: number;
|
|
82
|
+
cachedReadTokens?: number;
|
|
83
|
+
cachedWriteTokens?: number;
|
|
84
|
+
totalTokens?: number;
|
|
85
|
+
}
|
|
86
|
+
export interface ChatMessage {
|
|
87
|
+
id: string;
|
|
88
|
+
role: "user" | "assistant" | "system";
|
|
89
|
+
content: ContentBlock[];
|
|
90
|
+
timestamp: number;
|
|
91
|
+
uuid?: string;
|
|
92
|
+
revision?: number;
|
|
93
|
+
streaming?: boolean;
|
|
94
|
+
model?: string;
|
|
95
|
+
providerId?: string;
|
|
96
|
+
usage?: PromptUsage;
|
|
97
|
+
startedAt?: number;
|
|
98
|
+
completedAt?: number;
|
|
99
|
+
durationMs?: number;
|
|
100
|
+
systemEvent?: SystemEvent;
|
|
101
|
+
echo?: "pending" | "adopted";
|
|
102
|
+
}
|
|
103
|
+
export type SystemEvent = {
|
|
104
|
+
kind: "compact_boundary";
|
|
105
|
+
preTokens?: number;
|
|
106
|
+
} | {
|
|
107
|
+
kind: "error";
|
|
108
|
+
message: string;
|
|
109
|
+
};
|
|
110
|
+
export interface PermissionOption {
|
|
111
|
+
optionId: string;
|
|
112
|
+
name: string;
|
|
113
|
+
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
114
|
+
}
|
|
115
|
+
export interface PermissionRequest {
|
|
116
|
+
toolCallId: string;
|
|
117
|
+
toolName: string;
|
|
118
|
+
title: string;
|
|
119
|
+
kind: string;
|
|
120
|
+
rawInput: Record<string, unknown>;
|
|
121
|
+
options: PermissionOption[];
|
|
122
|
+
}
|
|
123
|
+
export interface ElicitationFormRequest {
|
|
124
|
+
elicitationId: string;
|
|
125
|
+
message: string;
|
|
126
|
+
requestedSchema: ElicitationSchema;
|
|
127
|
+
}
|
|
128
|
+
export interface AttachedFile {
|
|
129
|
+
name: string;
|
|
130
|
+
type: string;
|
|
131
|
+
size: number;
|
|
132
|
+
contentBase64?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface DiffModalState {
|
|
135
|
+
isOpen: boolean;
|
|
136
|
+
filePath: string;
|
|
137
|
+
original: string;
|
|
138
|
+
modified: string;
|
|
139
|
+
}
|
package/dist/types.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
export { Badge, badgeVariants };
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeProps as a}from"@base-ui/react/merge-props";import{useRender as o}from"@base-ui/react/use-render";import{cva as n}from"class-variance-authority";import{cn as d}from"cn";var s=n("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function l({className:r,variant:e="default",render:t,...i}){return o({defaultTagName:"span",props:a({className:d(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{l as Badge,s as badgeVariants};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
8
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{Button as n}from"@base-ui/react/button";import{cva as d}from"class-variance-authority";import{cn as o}from"cn";var s=d("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function g({className:e,variant:r="default",size:i="default",...t}){return a(n,{"data-slot":"button",className:o(s({variant:r,size:i,className:e})),...t})}export{g as Button,s as buttonVariants};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
3
|
+
size?: "default" | "sm";
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{cn as d}from"cn";function c({className:a,size:r="default",...e}){return t("div",{"data-slot":"card","data-size":r,className:d("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})}function n({className:a,...r}){return t("div",{"data-slot":"card-header",className:d("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...r})}function i({className:a,...r}){return t("div",{"data-slot":"card-title",className:d("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",a),...r})}function l({className:a,...r}){return t("div",{"data-slot":"card-description",className:d("text-sm text-muted-foreground",a),...r})}function u({className:a,...r}){return t("div",{"data-slot":"card-action",className:d("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...r})}function g({className:a,...r}){return t("div",{"data-slot":"card-content",className:d("flex flex-col gap-3 px-(--card-spacing)",a),...r})}function p({className:a,...r}){return t("div",{"data-slot":"card-footer",className:d("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",a),...r})}export{c as Card,u as CardAction,g as CardContent,l as CardDescription,p as CardFooter,n as CardHeader,i as CardTitle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Checkbox as r}from"@base-ui/react/checkbox";import{cn as t}from"cn";import{CheckIcon as d}from"lucide-react";function l({className:i,...a}){return e(r.Root,{"data-slot":"checkbox",className:t("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",i),...a,children:e(r.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e(d,{})})})}export{l as Checkbox};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
3
|
+
declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
|
|
16
|
+
declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
|
|
17
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{Dialog as e}from"@base-ui/react/dialog";import{cn as r}from"cn";import{Button as d}from"./button.js";import{XIcon as s}from"lucide-react";function D({...o}){return a(e.Root,{"data-slot":"dialog",...o})}function h({...o}){return a(e.Trigger,{"data-slot":"dialog-trigger",...o})}function c({...o}){return a(e.Portal,{"data-slot":"dialog-portal",...o})}function v({...o}){return a(e.Close,{"data-slot":"dialog-close",...o})}function u({className:o,...t}){return a(e.Backdrop,{"data-slot":"dialog-overlay",className:r("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",o),...t})}function N({className:o,children:t,showCloseButton:n=!0,...i}){return l(c,{children:[a(u,{}),l(e.Popup,{"data-slot":"dialog-content",className:r("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),...i,children:[t,n&&l(e.Close,{"data-slot":"dialog-close",render:a(d,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[a(s,{}),a("span",{className:"sr-only",children:"Close"})]})]})]})}function b({className:o,...t}){return a("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2",o),...t})}function C({className:o,showCloseButton:t=!1,children:n,...i}){return l("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",o),...i,children:[n,t&&a(e.Close,{render:a(d,{variant:"outline"}),children:"Close"})]})}function j({className:o,...t}){return a(e.Title,{"data-slot":"dialog-title",className:r("font-heading leading-none font-medium",o),...t})}function y({className:o,...t}){return a(e.Description,{"data-slot":"dialog-description",className:r("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",o),...t})}export{D as Dialog,v as DialogClose,N as DialogContent,y as DialogDescription,C as DialogFooter,b as DialogHeader,u as DialogOverlay,c as DialogPortal,j as DialogTitle,h as DialogTrigger};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
3
|
+
declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
variant?: "default" | "destructive";
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
|
|
16
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
|
|
20
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
|
|
25
|
+
inset?: boolean;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): React.JSX.Element;
|
|
28
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
29
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Menu as n}from"@base-ui/react/menu";import{cn as r}from"cn";import{ChevronRightIcon as l,CheckIcon as c}from"lucide-react";function x({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function h({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function w({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function p({align:e="start",alignOffset:o=0,side:a="bottom",sideOffset:d=4,className:i,...s}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:a,sideOffset:d,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:r("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...s})})})}function b({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}function M({className:e,inset:o,...a}){return t(n.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:r("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8",e),...a})}function D({className:e,inset:o,variant:a="default",...d}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:r("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...d})}function z({...e}){return t(n.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function _({className:e,inset:o,children:a,...d}){return u(n.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d,children:[a,t(l,{className:"ml-auto"})]})}function k({align:e="start",alignOffset:o=-3,side:a="right",sideOffset:d=0,className:i,...s}){return t(p,{"data-slot":"dropdown-menu-sub-content",className:r("w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),align:e,alignOffset:o,side:a,sideOffset:d,...s})}function N({className:e,children:o,checked:a,inset:d,...i}){return u(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":d,className:r("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...i,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t(n.CheckboxItemIndicator,{children:t(c,{})})}),o]})}function y({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function I({className:e,children:o,inset:a,...d}){return u(n.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:r("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t(n.RadioItemIndicator,{children:t(c,{})})}),o]})}function R({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:r("-mx-1 my-1 h-px bg-border",e),...o})}function S({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:r("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...o})}export{x as DropdownMenu,N as DropdownMenuCheckboxItem,p as DropdownMenuContent,b as DropdownMenuGroup,D as DropdownMenuItem,M as DropdownMenuLabel,h as DropdownMenuPortal,y as DropdownMenuRadioGroup,I as DropdownMenuRadioItem,R as DropdownMenuSeparator,S as DropdownMenuShortcut,z as DropdownMenuSub,k as DropdownMenuSubContent,_ as DropdownMenuSubTrigger,w as DropdownMenuTrigger};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Label } from "./label.js";
|
|
3
|
+
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react").JSX.Element;
|
|
4
|
+
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
5
|
+
variant?: "legend" | "label";
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
8
|
+
declare const fieldVariants: (props?: ({
|
|
9
|
+
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react").JSX.Element;
|
|
12
|
+
declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
13
|
+
declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react").JSX.Element;
|
|
14
|
+
declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
15
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react").JSX.Element;
|
|
16
|
+
declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
errors?: Array<{
|
|
21
|
+
message?: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
}): import("react").JSX.Element | null;
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
|
package/dist/ui/field.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t,jsxs as f}from"react/jsx-runtime";import{useMemo as u}from"react";import{cva as c}from"class-variance-authority";import{cn as l}from"cn";import{Label as m}from"./label.js";import{Separator as p}from"./separator.js";function k({className:a,...e}){return t("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",a),...e})}function y({className:a,variant:e="legend",...o}){return t("legend",{"data-slot":"field-legend","data-variant":e,className:l("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",a),...o})}function F({className:a,...e}){return t("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",a),...e})}var g=c("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function j({className:a,orientation:e="vertical",...o}){return t("div",{role:"group","data-slot":"field","data-orientation":e,className:l(g({orientation:e}),a),...o})}function L({className:a,...e}){return t("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1 leading-snug",a),...e})}function S({className:a,...e}){return t(m,{"data-slot":"field-label",className:l("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}function z({className:a,...e}){return t("div",{"data-slot":"field-label",className:l("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",a),...e})}function E({className:a,...e}){return t("p",{"data-slot":"field-description",className:l("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",a),...e})}function M({children:a,className:e,...o}){return f("div",{"data-slot":"field-separator","data-content":!!a,className:l("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",e),...o,children:[t(p,{className:"absolute inset-0 top-1/2"}),a&&t("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:a})]})}function V({className:a,children:e,errors:o,...s}){let r=u(()=>{if(e)return e;if(!o?.length)return null;let i=[...new Map(o.map((d)=>[d?.message,d])).values()];if(i?.length==1)return i[0]?.message;return t("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:i.map((d,n)=>d?.message&&t("li",{children:d.message},n))})},[e,o]);if(!r)return null;return t("div",{role:"alert","data-slot":"field-error",className:l("text-sm font-normal text-destructive",a),...s,children:r})}export{j as Field,L as FieldContent,E as FieldDescription,V as FieldError,F as FieldGroup,S as FieldLabel,y as FieldLegend,M as FieldSeparator,k as FieldSet,z as FieldTitle};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PreviewCard as PreviewCardPrimitive } from "@base-ui/react/preview-card";
|
|
2
|
+
declare function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function HoverCardTrigger({ ...props }: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
4
|
+
declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react").JSX.Element;
|
|
5
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{PreviewCard as e}from"@base-ui/react/preview-card";import{cn as s}from"cn";function g({...o}){return t(e.Root,{"data-slot":"hover-card",...o})}function c({...o}){return t(e.Trigger,{"data-slot":"hover-card-trigger",...o})}function p({className:o,side:r="bottom",sideOffset:i=4,align:a="center",alignOffset:d=4,...n}){return t(e.Portal,{"data-slot":"hover-card-portal",children:t(e.Positioner,{align:a,alignOffset:d,side:r,sideOffset:i,className:"isolate z-50",children:t(e.Popup,{"data-slot":"hover-card-content",className:s("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),...n})})})}export{g as HoverCard,p as HoverCardContent,c as HoverCardTrigger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{cn as a}from"cn";import{Textarea as e}from"./textarea.js";function p({className:r,...n}){return o(e,{"data-slot":"input-group-control",className:a("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",r),...n})}export{p as InputGroupTextarea};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { InputGroupTextarea } from "./input-group-textarea.js";
|
|
5
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
7
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
|
|
10
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
11
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
14
|
+
type?: "button" | "submit" | "reset";
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupTextarea, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{cn as o}from"cn";import{Button as u}from"./button.js";import{InputGroupTextarea as h}from"./input-group-textarea.js";function f({className:a,...t}){return n("div",{"data-slot":"input-group",role:"group",className:o("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...t})}var l=i("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function x({className:a,align:t="inline-start",...s}){return n("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:o(l({align:t}),a),onClick:(r)=>{if(r.target.closest("button"))return;r.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}var p=i("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function v({className:a,type:t="button",variant:s="ghost",size:r="xs",...e}){return n(u,{type:t,"data-size":r,variant:s,className:o(p({size:r}),a),...e})}function k({className:a,...t}){return n("span",{className:o("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}export{f as InputGroup,x as InputGroupAddon,v as InputGroupButton,k as InputGroupText,h as InputGroupTextarea};
|
package/dist/ui/input.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Input as n}from"@base-ui/react/input";import{cn as o}from"cn";function l({className:i,type:e,...r}){return t(n,{type:e,"data-slot":"input",className:o("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),...r})}export{l as Input};
|
package/dist/ui/label.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{cn as o}from"cn";function r({className:e,...t}){return a("label",{"data-slot":"label",className:o("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}export{r as Label};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
3
|
+
declare function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props): import("react").JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props): import("react").JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as d}from"@base-ui/react/radio-group";import{cn as o}from"cn";function u({className:i,...a}){return r(d,{"data-slot":"radio-group",className:o("grid w-full gap-3",i),...a})}function c({className:i,...a}){return r(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",i),...a,children:r(e.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:r("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}export{u as RadioGroup,c as RadioGroupItem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Separator as e}from"@base-ui/react/separator";import{cn as i}from"cn";function p({className:a,orientation:r="horizontal",...t}){return o(e,{"data-slot":"separator",orientation:r,className:i("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...t})}export{p as Separator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";import{Switch as e}from"@base-ui/react/switch";import{cn as d}from"cn";function o({className:t,size:i="default",...r}){return a(e.Root,{"data-slot":"switch","data-size":i,className:d("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",t),...r,children:a(e.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}export{o as Switch};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{cn as a}from"cn";function n({className:r,...i}){return e("textarea",{"data-slot":"textarea",className:a("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r),...i})}export{n as Textarea};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
2
|
+
declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
|
|
3
|
+
declare function Tooltip({ ...props }: TooltipPrimitive.Root.Props): import("react").JSX.Element;
|
|
4
|
+
declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react").JSX.Element;
|
|
6
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{Tooltip as a}from"@base-ui/react/tooltip";import{cn as p}from"cn";function c({delay:t=0,...i}){return e(a.Provider,{"data-slot":"tooltip-provider",delay:t,...i})}function u({...t}){return e(a.Root,{"data-slot":"tooltip",...t})}function x({...t}){return e(a.Trigger,{"data-slot":"tooltip-trigger",...t})}function b({className:t,side:i="top",sideOffset:o=4,align:d="center",alignOffset:n=0,children:s,...r}){return e(a.Portal,{children:e(a.Positioner,{align:d,alignOffset:n,side:i,sideOffset:o,className:"isolate z-50",children:l(a.Popup,{"data-slot":"tooltip-content",className:p("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...r,children:[s,e(a.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}export{u as Tooltip,b as TooltipContent,c as TooltipProvider,x as TooltipTrigger};
|