@cognite/aura 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/dist/components/index.d.ts +53 -0
- package/dist/components/ui/core/alert/alert.d.ts +19 -0
- package/dist/components/ui/core/alert/alert.js +180 -0
- package/dist/components/ui/core/alert/alert.metadata.d.ts +2 -0
- package/dist/components/ui/core/alert/alert.metadata.js +9 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -0
- package/dist/components/ui/core/avatar/avatar.js +94 -0
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +8 -0
- package/dist/components/ui/core/avatar/avatar.metadata.js +9 -0
- package/dist/components/ui/core/badge/badge.d.ts +14 -0
- package/dist/components/ui/core/badge/badge.js +116 -0
- package/dist/components/ui/core/badge/badge.metadata.d.ts +2 -0
- package/dist/components/ui/core/badge/badge.metadata.js +8 -0
- package/dist/components/ui/core/button/button.d.ts +9 -0
- package/dist/components/ui/core/button/button.js +50 -0
- package/dist/components/ui/core/button/button.metadata.d.ts +2 -0
- package/dist/components/ui/core/button/button.metadata.js +9 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +11 -0
- package/dist/components/ui/core/button-group/button-group.js +83 -0
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/button-group/button-group.metadata.js +8 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +21 -0
- package/dist/components/ui/core/code-block/code-block.js +146 -0
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +2 -0
- package/dist/components/ui/core/code-block/code-block.metadata.js +8 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +4 -0
- package/dist/components/ui/core/collapsible/collapsible.js +44 -0
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +2 -0
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +9 -0
- package/dist/components/ui/core/command/command.d.ts +86 -0
- package/dist/components/ui/core/command/command.js +150 -0
- package/dist/components/ui/core/command/command.metadata.d.ts +2 -0
- package/dist/components/ui/core/command/command.metadata.js +9 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +18 -0
- package/dist/components/ui/core/dialog/dialog.js +155 -0
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +2 -0
- package/dist/components/ui/core/dialog/dialog.metadata.js +9 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +53 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +250 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +2 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +9 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +12 -0
- package/dist/components/ui/core/helper-text/helper-text.js +65 -0
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +2 -0
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +9 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +12 -0
- package/dist/components/ui/core/hover-card/hover-card.js +76 -0
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +2 -0
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +8 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +33 -0
- package/dist/components/ui/core/inline-citation/inline-citation.js +170 -0
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +2 -0
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +8 -0
- package/dist/components/ui/core/input/input.d.ts +6 -0
- package/dist/components/ui/core/input/input.js +34 -0
- package/dist/components/ui/core/input/input.metadata.d.ts +2 -0
- package/dist/components/ui/core/input/input.metadata.js +9 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +15 -0
- package/dist/components/ui/core/input-group/input-group.js +144 -0
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/input-group/input-group.metadata.js +9 -0
- package/dist/components/ui/core/label/label.d.ts +2 -0
- package/dist/components/ui/core/label/label.js +20 -0
- package/dist/components/ui/core/label/label.metadata.d.ts +2 -0
- package/dist/components/ui/core/label/label.metadata.js +9 -0
- package/dist/components/ui/core/loader/loader.d.ts +7 -0
- package/dist/components/ui/core/loader/loader.js +119 -0
- package/dist/components/ui/core/loader/loader.metadata.d.ts +2 -0
- package/dist/components/ui/core/loader/loader.metadata.js +9 -0
- package/dist/components/ui/core/message/message.d.ts +55 -0
- package/dist/components/ui/core/message/message.js +169 -0
- package/dist/components/ui/core/message/message.metadata.d.ts +2 -0
- package/dist/components/ui/core/popover/popover.d.ts +8 -0
- package/dist/components/ui/core/popover/popover.metadata.d.ts +2 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +161 -0
- package/dist/components/ui/core/prompt-input/prompt-input.js +402 -0
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +2 -0
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +9 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +9 -0
- package/dist/components/ui/core/reasoning/reasoning.js +85 -0
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +2 -0
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +8 -0
- package/dist/components/ui/core/select/select.d.ts +44 -0
- package/dist/components/ui/core/select/select.js +279 -0
- package/dist/components/ui/core/select/select.metadata.d.ts +2 -0
- package/dist/components/ui/core/select/select.metadata.js +9 -0
- package/dist/components/ui/core/separator/separator.d.ts +6 -0
- package/dist/components/ui/core/separator/separator.js +25 -0
- package/dist/components/ui/core/separator/separator.metadata.d.ts +2 -0
- package/dist/components/ui/core/separator/separator.metadata.js +8 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +14 -0
- package/dist/components/ui/core/shimmer/shimmer.js +69 -0
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +2 -0
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +9 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.js +18 -0
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +9 -0
- package/dist/components/ui/core/sources/sources.d.ts +16 -0
- package/dist/components/ui/core/sources/sources.metadata.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +9 -0
- package/dist/components/ui/core/textarea/textarea.js +49 -0
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.metadata.js +9 -0
- package/dist/components/ui/core/tool/tool.d.ts +21 -0
- package/dist/components/ui/core/tool/tool.js +151 -0
- package/dist/components/ui/core/tool/tool.metadata.d.ts +2 -0
- package/dist/components/ui/core/tool/tool.metadata.js +8 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +10 -0
- package/dist/components/ui/core/tooltip/tooltip.js +82 -0
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +8 -0
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +9 -0
- package/dist/components/ui/lab/breadcrumb/breadcrumb.d.ts +134 -0
- package/dist/components/ui/lab/breadcrumb/breadcrumb.metadata.d.ts +2 -0
- package/dist/components/ui/lab/topbar/topbar.d.ts +10 -0
- package/dist/components/ui/lab/topbar/topbar.metadata.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +229 -0
- package/dist/lib/ai/types.d.ts +53 -0
- package/dist/lib/component-status-config.d.ts +12 -0
- package/dist/lib/style-scope.d.ts +5 -0
- package/dist/lib/style-scope.js +7 -0
- package/dist/lib/types.d.ts +50 -0
- package/dist/lib/use-controllable-state.d.ts +11 -0
- package/dist/lib/use-controllable-state.js +32 -0
- package/dist/lib/utils.d.ts +45 -0
- package/dist/lib/utils.js +92 -0
- package/package.json +51 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export { Button, buttonVariants } from './ui/core/button/button';
|
|
2
|
+
export { ButtonMetadata } from './ui/core/button/button.metadata';
|
|
3
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, } from './ui/core/button-group/button-group';
|
|
4
|
+
export { ButtonGroupMetadata } from './ui/core/button-group/button-group.metadata';
|
|
5
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarIcon, } from './ui/core/avatar/avatar';
|
|
6
|
+
export { AvatarMetadata } from './ui/core/avatar/avatar.metadata';
|
|
7
|
+
export { Label } from './ui/core/label/label';
|
|
8
|
+
export { LabelMetadata } from './ui/core/label/label.metadata';
|
|
9
|
+
export { HelperText } from './ui/core/helper-text/helper-text';
|
|
10
|
+
export { HelperTextMetadata } from './ui/core/helper-text/helper-text.metadata';
|
|
11
|
+
export { Loader } from './ui/core/loader/loader';
|
|
12
|
+
export { LoaderMetadata } from './ui/core/loader/loader.metadata';
|
|
13
|
+
export { Shimmer } from './ui/core/shimmer/shimmer';
|
|
14
|
+
export { ShimmerMetadata } from './ui/core/shimmer/shimmer.metadata';
|
|
15
|
+
export { CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, } from './ui/core/code-block/code-block';
|
|
16
|
+
export { CodeBlockMetadata } from './ui/core/code-block/code-block.metadata';
|
|
17
|
+
export { Separator } from './ui/core/separator/separator';
|
|
18
|
+
export { SeparatorMetadata } from './ui/core/separator/separator.metadata';
|
|
19
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './ui/core/tooltip/tooltip';
|
|
20
|
+
export { TooltipMetadata } from './ui/core/tooltip/tooltip.metadata';
|
|
21
|
+
export { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput, } from './ui/core/tool/tool';
|
|
22
|
+
export { ToolMetadata } from './ui/core/tool/tool.metadata';
|
|
23
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, DropdownMenuSectionLabel, } from './ui/core/dropdown-menu/dropdown-menu';
|
|
24
|
+
export { DropdownMenuMetadata } from './ui/core/dropdown-menu/dropdown-menu.metadata';
|
|
25
|
+
export { Badge, badgeVariants } from './ui/core/badge/badge';
|
|
26
|
+
export { BadgeMetadata } from './ui/core/badge/badge.metadata';
|
|
27
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './ui/core/collapsible/collapsible';
|
|
28
|
+
export { CollapsibleMetadata } from './ui/core/collapsible/collapsible.metadata';
|
|
29
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent, } from './ui/core/hover-card/hover-card';
|
|
30
|
+
export { HoverCardMetadata } from './ui/core/hover-card/hover-card.metadata';
|
|
31
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from './ui/core/select/select';
|
|
32
|
+
export { SelectMetadata } from './ui/core/select/select.metadata';
|
|
33
|
+
export { Skeleton } from './ui/core/skeleton/skeleton';
|
|
34
|
+
export { SkeletonMetadata } from './ui/core/skeleton/skeleton.metadata';
|
|
35
|
+
export { Input } from './ui/core/input/input';
|
|
36
|
+
export { InputMetadata } from './ui/core/input/input.metadata';
|
|
37
|
+
export { Textarea } from './ui/core/textarea/textarea';
|
|
38
|
+
export { TextareaMetadata } from './ui/core/textarea/textarea.metadata';
|
|
39
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, } from './ui/core/input-group/input-group';
|
|
40
|
+
export { InputGroupMetadata } from './ui/core/input-group/input-group.metadata';
|
|
41
|
+
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose, } from './ui/core/alert/alert';
|
|
42
|
+
export { AlertMetadata } from './ui/core/alert/alert.metadata';
|
|
43
|
+
export { Message, MessageContent, MessageActions, MessageAction, MessageResponse, } from './ui/core/message/message';
|
|
44
|
+
export { PromptInputMetadata } from './ui/core/prompt-input/prompt-input.metadata';
|
|
45
|
+
export { usePromptInputController, PromptInputProvider, PromptInput, PromptInputBody, PromptInputTextarea, PromptInputHeader, PromptInputFooter, PromptInputTools, PromptInputButton, PromptInputActionMenu, PromptInputActionMenuTrigger, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputSubmit, PromptInputModelSelect, PromptInputModelSelectTrigger, PromptInputModelSelectContent, PromptInputModelSelectItem, PromptInputModelSelectValue, PromptInputHoverCard, PromptInputHoverCardTrigger, PromptInputHoverCardContent, PromptInputTabsList, PromptInputTab, PromptInputTabLabel, PromptInputTabBody, PromptInputTabItem, PromptInputCommand, PromptInputCommandInput, PromptInputCommandList, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandItem, PromptInputCommandSeparator, } from './ui/core/prompt-input/prompt-input';
|
|
46
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './ui/core/dialog/dialog';
|
|
47
|
+
export { DialogMetadata } from './ui/core/dialog/dialog.metadata';
|
|
48
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './ui/core/command/command';
|
|
49
|
+
export { CommandMetadata } from './ui/core/command/command.metadata';
|
|
50
|
+
export { InlineCitationMetadata } from './ui/core/inline-citation/inline-citation.metadata';
|
|
51
|
+
export { InlineCitation, InlineCitationGroup, InlineCitationText, InlineCitationCard, InlineCitationCardTrigger, InlineCitationCardBody, InlineCitationSource, InlineCitationQuote, InlineCitationLink, } from './ui/core/inline-citation/inline-citation';
|
|
52
|
+
export { Reasoning, ReasoningContent, ReasoningHeader, ReasoningItem, } from './ui/core/reasoning/reasoning';
|
|
53
|
+
export { ReasoningMetadata } from './ui/core/reasoning/reasoning.metadata';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
type AlertVariant = 'default' | 'secondary' | 'warning' | 'error';
|
|
4
|
+
declare const alertVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "secondary" | "error" | "warning" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type AlertProps = ComponentProps<'div'> & Omit<VariantProps<typeof alertVariants>, 'variant'> & {
|
|
8
|
+
variant?: AlertVariant;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
defaultVisible?: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Alert: import('react').ForwardRefExoticComponent<Omit<AlertProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const AlertTitle: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const AlertDescription: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const AlertActions: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const AlertButton: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
declare const AlertClose: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose, };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as y, forwardRef as n, useMemo as A, useContext as d } from "react";
|
|
3
|
+
import { IconX as b } from "@tabler/icons-react";
|
|
4
|
+
import { cva as N } from "class-variance-authority";
|
|
5
|
+
import { useControllableState as C } from "../../../../lib/use-controllable-state.js";
|
|
6
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
7
|
+
import { Button as p } from "../button/button.js";
|
|
8
|
+
const i = y({
|
|
9
|
+
show: !0,
|
|
10
|
+
setShow: () => {
|
|
11
|
+
},
|
|
12
|
+
variant: "default"
|
|
13
|
+
}), V = N(
|
|
14
|
+
"relative w-full rounded-md pt-2.5 pr-3 has-[>button[data-slot=alert-close]]:pr-12 pb-2 pl-3 text-sm grid has-[>svg]:grid-cols-[auto_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 has-[>svg]:gap-y-1 items-start [&>svg]:size-4 [&>svg]:translate-y-0.65 [&>svg]:shrink-0",
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
variant: {
|
|
18
|
+
default: "bg-undefined-alternative text-card-foreground [&>svg]:text-undefined-foreground",
|
|
19
|
+
secondary: "bg-neutral-alternative text-foreground [&>svg]:text-neutral-foreground",
|
|
20
|
+
warning: "bg-warning-alternative [&>svg]:text-warning-foreground",
|
|
21
|
+
error: "bg-destructive-alternative text-foreground [&>svg]:text-destructive-foreground"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
), k = n(
|
|
29
|
+
({
|
|
30
|
+
className: t,
|
|
31
|
+
variant: e = "default",
|
|
32
|
+
visible: r,
|
|
33
|
+
defaultVisible: a = !0,
|
|
34
|
+
onClose: l,
|
|
35
|
+
children: c,
|
|
36
|
+
...u
|
|
37
|
+
}, x) => {
|
|
38
|
+
const [g, v] = C({
|
|
39
|
+
defaultProp: a,
|
|
40
|
+
prop: r,
|
|
41
|
+
onChange: l
|
|
42
|
+
}), f = e ?? "default", w = A(
|
|
43
|
+
() => ({ show: g, setShow: v, variant: f }),
|
|
44
|
+
[g, v, f]
|
|
45
|
+
);
|
|
46
|
+
return g ? /* @__PURE__ */ o(i.Provider, { value: w, children: /* @__PURE__ */ m(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref: x,
|
|
50
|
+
"data-slot": "alert",
|
|
51
|
+
role: "alert",
|
|
52
|
+
className: s(V({ variant: f }), t),
|
|
53
|
+
...u,
|
|
54
|
+
children: [
|
|
55
|
+
l && /* @__PURE__ */ o(h, {}),
|
|
56
|
+
c
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
) }) : null;
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
k.displayName = "Alert";
|
|
63
|
+
const z = {
|
|
64
|
+
default: "text-undefined-foreground",
|
|
65
|
+
secondary: "text-neutral-foreground",
|
|
66
|
+
warning: "text-warning-foreground",
|
|
67
|
+
error: "text-destructive-foreground"
|
|
68
|
+
}, S = n(
|
|
69
|
+
({ className: t, ...e }, r) => {
|
|
70
|
+
const { variant: a } = d(i);
|
|
71
|
+
return /* @__PURE__ */ o(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
ref: r,
|
|
75
|
+
"data-slot": "alert-title",
|
|
76
|
+
className: s(
|
|
77
|
+
"text-base font-medium leading-5 tracking-tightest",
|
|
78
|
+
z[a],
|
|
79
|
+
t
|
|
80
|
+
),
|
|
81
|
+
...e
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
S.displayName = "AlertTitle";
|
|
87
|
+
const j = {
|
|
88
|
+
default: "text-card-foreground",
|
|
89
|
+
secondary: "text-foreground",
|
|
90
|
+
warning: "text-card-foreground",
|
|
91
|
+
error: "text-foreground"
|
|
92
|
+
}, B = n(
|
|
93
|
+
({ className: t, ...e }, r) => {
|
|
94
|
+
const { variant: a } = d(i);
|
|
95
|
+
return /* @__PURE__ */ o(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref: r,
|
|
99
|
+
"data-slot": "alert-description",
|
|
100
|
+
className: s(
|
|
101
|
+
"col-start-2 grid justify-items-start gap-1 text-sm font-normal leading-4.5 tracking-tight items-center",
|
|
102
|
+
j[a],
|
|
103
|
+
t
|
|
104
|
+
),
|
|
105
|
+
...e
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
B.displayName = "AlertDescription";
|
|
111
|
+
const D = n(
|
|
112
|
+
({ className: t, ...e }, r) => /* @__PURE__ */ o(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
ref: r,
|
|
116
|
+
"data-slot": "alert-actions",
|
|
117
|
+
className: s(
|
|
118
|
+
"col-start-2 flex flex-wrap items-start gap-2 pt-1",
|
|
119
|
+
t
|
|
120
|
+
),
|
|
121
|
+
...e
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
D.displayName = "AlertActions";
|
|
126
|
+
const T = n(({ className: t, ...e }, r) => {
|
|
127
|
+
const { variant: a } = d(i);
|
|
128
|
+
return /* @__PURE__ */ o(
|
|
129
|
+
p,
|
|
130
|
+
{
|
|
131
|
+
ref: r,
|
|
132
|
+
"data-slot": "alert-button",
|
|
133
|
+
variant: "ghost",
|
|
134
|
+
size: "sm",
|
|
135
|
+
className: s("text-foreground", {
|
|
136
|
+
default: "hover:bg-undefined-hover",
|
|
137
|
+
secondary: "hover:bg-neutral-hover",
|
|
138
|
+
warning: "hover:bg-warning-hover",
|
|
139
|
+
error: "hover:bg-destructive-hover"
|
|
140
|
+
}[a], t),
|
|
141
|
+
...e
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
});
|
|
145
|
+
T.displayName = "AlertButton";
|
|
146
|
+
const h = n(
|
|
147
|
+
({ className: t, onClick: e, ...r }, a) => {
|
|
148
|
+
const { setShow: l } = d(i), c = (u) => {
|
|
149
|
+
l(!1), e?.(u);
|
|
150
|
+
};
|
|
151
|
+
return /* @__PURE__ */ m(
|
|
152
|
+
p,
|
|
153
|
+
{
|
|
154
|
+
ref: a,
|
|
155
|
+
"data-slot": "alert-close",
|
|
156
|
+
variant: "ghost",
|
|
157
|
+
size: "icon-sm",
|
|
158
|
+
className: s(
|
|
159
|
+
"absolute top-3 right-4 h-3.5 w-3.5 p-0 opacity-70 hover:opacity-100 text-foreground",
|
|
160
|
+
t
|
|
161
|
+
),
|
|
162
|
+
onClick: c,
|
|
163
|
+
...r,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ o(b, { size: 14 }),
|
|
166
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
h.displayName = "AlertClose";
|
|
173
|
+
export {
|
|
174
|
+
k as Alert,
|
|
175
|
+
D as AlertActions,
|
|
176
|
+
T as AlertButton,
|
|
177
|
+
h as AlertClose,
|
|
178
|
+
B as AlertDescription,
|
|
179
|
+
S as AlertTitle
|
|
180
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "Alert",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A dismissible alert component with multiple variants for displaying messages.",
|
|
5
|
+
llmUsage: "Use `<Alert>` with `<AlertTitle>` and `<AlertDescription>` for informational messages."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as AlertMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const Avatar: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AvatarRootProps, "ref"> & import('react').RefAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "overflow" | null | undefined;
|
|
5
|
+
sizes?: "default" | "xsm" | "xxsm" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
declare const AvatarImage: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AvatarImageProps, "ref"> & import('react').RefAttributes<HTMLImageElement>, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
|
|
8
|
+
declare const AvatarFallback: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').AvatarFallbackProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
declare const AvatarIcon: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarIcon };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as o, jsxs as c, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Avatar as n } from "@base-ui/react/avatar";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as d } from "../../../../lib/utils.js";
|
|
6
|
+
const u = g(
|
|
7
|
+
"group/avatar relative inline-flex text-base font-medium leading-5 shrink-0 overflow-hidden rounded-md flex-col justify-center items-center hover:cursor-pointer box-border",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-decorative-background-mountain text-decorative-foreground-mountain hover:bg-decorative-background-hover-mountain",
|
|
12
|
+
nordic: "bg-decorative-background-nordic text-decorative-foreground-nordic hover:bg-decorative-background-hover-nordic",
|
|
13
|
+
aurora: "bg-decorative-background-aurora text-decorative-foreground-aurora hover:bg-decorative-background-hover-aurora",
|
|
14
|
+
fjord: "bg-decorative-background-fjord text-decorative-foreground-fjord hover:bg-decorative-background-hover-fjord",
|
|
15
|
+
dusk: "bg-decorative-background-dusk text-decorative-foreground-dusk hover:bg-decorative-background-hover-dusk",
|
|
16
|
+
orange: "bg-decorative-background-orange text-decorative-foreground-orange hover:bg-decorative-background-hover-orange",
|
|
17
|
+
sky: "bg-decorative-background-sky text-decorative-foreground-sky hover:bg-decorative-background-hover-sky",
|
|
18
|
+
overflow: "bg-secondary text-secondary-foreground hover:bg-secondary-hover"
|
|
19
|
+
},
|
|
20
|
+
sizes: {
|
|
21
|
+
default: "size-9 text-sm [&_svg]:w-5 [&_svg]:h-5",
|
|
22
|
+
xsm: "size-7 text-xs [&_svg]:w-4 [&_svg]:h-4",
|
|
23
|
+
xxsm: "size-5 text-2xs [&_svg]:w-3 [&_svg]:h-3"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
sizes: "default"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
), l = t(({ className: a, variant: e, sizes: r, ...s }, i) => /* @__PURE__ */ o(
|
|
32
|
+
n.Root,
|
|
33
|
+
{
|
|
34
|
+
ref: i,
|
|
35
|
+
"data-slot": "avatar",
|
|
36
|
+
className: d(u({ variant: e, sizes: r }), a),
|
|
37
|
+
...s
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
l.displayName = "Avatar";
|
|
41
|
+
const b = t(({ className: a, ...e }, r) => /* @__PURE__ */ c(v, { children: [
|
|
42
|
+
/* @__PURE__ */ o(
|
|
43
|
+
n.Image,
|
|
44
|
+
{
|
|
45
|
+
ref: r,
|
|
46
|
+
"data-slot": "avatar-image",
|
|
47
|
+
className: d("aspect-square size-full", a),
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "avatar-image-backdrop",
|
|
55
|
+
className: "absolute inset-0 bg-backdrop opacity-0 transition-opacity group-hover/avatar:opacity-100 pointer-events-none",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }));
|
|
60
|
+
b.displayName = "AvatarImage";
|
|
61
|
+
const m = t(({ className: a, ...e }, r) => /* @__PURE__ */ o(
|
|
62
|
+
n.Fallback,
|
|
63
|
+
{
|
|
64
|
+
ref: r,
|
|
65
|
+
"data-slot": "avatar-fallback",
|
|
66
|
+
className: d(
|
|
67
|
+
" flex size-full items-center justify-center rounded-md",
|
|
68
|
+
a
|
|
69
|
+
),
|
|
70
|
+
...e
|
|
71
|
+
}
|
|
72
|
+
));
|
|
73
|
+
m.displayName = "AvatarFallback";
|
|
74
|
+
const f = t(
|
|
75
|
+
({ className: a, ...e }, r) => /* @__PURE__ */ o(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
ref: r,
|
|
79
|
+
"data-slot": "avatar-icon",
|
|
80
|
+
className: d(
|
|
81
|
+
"flex size-full items-center justify-center rounded-md",
|
|
82
|
+
a
|
|
83
|
+
),
|
|
84
|
+
...e
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
f.displayName = "AvatarIcon";
|
|
89
|
+
export {
|
|
90
|
+
l as Avatar,
|
|
91
|
+
m as AvatarFallback,
|
|
92
|
+
f as AvatarIcon,
|
|
93
|
+
b as AvatarImage
|
|
94
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentMeta } from '../../../../lib/types';
|
|
2
|
+
/**
|
|
3
|
+
* Avatar Component Metadata
|
|
4
|
+
*
|
|
5
|
+
* This metadata is used by the documentation system to generate
|
|
6
|
+
* component documentation pages and provide context for LLMs.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AvatarMetadata: ComponentMeta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
name: "Avatar",
|
|
3
|
+
status: "draft",
|
|
4
|
+
description: "An image element with a fallback for representing users. Supports multiple color variants, sizes, and composable sub-components.",
|
|
5
|
+
llmUsage: "When displaying user avatars, use `<Avatar>` with `<AvatarImage>` and `<AvatarFallback>` for graceful degradation. Use `<AvatarIcon>` for icon-only avatars."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
a as AvatarMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "gray" | "orange" | "nordic" | "aurora" | "fjord" | "dusk" | "sky" | "mountain" | "error" | "warning" | "success" | "inProgress" | "archived" | "closable" | null | undefined;
|
|
5
|
+
size?: "default" | "icon" | null | undefined;
|
|
6
|
+
outline?: boolean | null | undefined;
|
|
7
|
+
background?: boolean | null | undefined;
|
|
8
|
+
dot?: boolean | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
type BadgeProps = useRender.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
11
|
+
urgent?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const Badge: import('react').ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { forwardRef as l } from "react";
|
|
2
|
+
import { mergeProps as p } from "@base-ui/react/merge-props";
|
|
3
|
+
import { useRender as v } from "@base-ui/react/use-render";
|
|
4
|
+
import { cva as m } from "class-variance-authority";
|
|
5
|
+
import { cn as x } from "../../../../lib/utils.js";
|
|
6
|
+
const k = m(
|
|
7
|
+
"inline-flex items-center align-middle justify-center rounded-md border text-xs font-medium w-fit whitespace-nowrap shrink-0 gap-1 [&>svg]:pointer-events-none outline-none focus-visible:border-ring focus-visible:ring-ring-shadow focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden leading-4",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
12
|
+
fjord: "border-transparent bg-decorative-background-fjord text-decorative-foreground-fjord",
|
|
13
|
+
nordic: "border-transparent bg-decorative-background-nordic text-decorative-foreground-nordic",
|
|
14
|
+
aurora: "border-transparent bg-decorative-background-aurora text-decorative-foreground-aurora",
|
|
15
|
+
sky: "border-transparent bg-decorative-background-sky text-decorative-foreground-sky",
|
|
16
|
+
dusk: "border-transparent bg-decorative-background-dusk text-decorative-foreground-dusk",
|
|
17
|
+
orange: "border-transparent bg-decorative-background-orange text-decorative-foreground-orange",
|
|
18
|
+
gray: "border-transparent bg-decorative-background-gray text-decorative-foreground-gray",
|
|
19
|
+
mountain: "border-transparent bg-decorative-background-mountain text-decorative-foreground-mountain",
|
|
20
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground ",
|
|
21
|
+
error: "border-transparent bg-destructive text-destructive-foreground-alternate",
|
|
22
|
+
warning: "border-transparent bg-warning text-warning-foreground-alternate",
|
|
23
|
+
success: "border-transparent bg-success text-success-foreground-alternate",
|
|
24
|
+
inProgress: "border-transparent bg-neutral text-neutral-foreground-alternate",
|
|
25
|
+
archived: "border-transparent bg-undefined text-undefined-foreground-alternate",
|
|
26
|
+
closable: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary-hover cursor-pointer"
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
default: "px-1",
|
|
30
|
+
icon: "px-1.5 py-1 rounded-md"
|
|
31
|
+
},
|
|
32
|
+
outline: {
|
|
33
|
+
true: "border-border"
|
|
34
|
+
},
|
|
35
|
+
background: {
|
|
36
|
+
false: "bg-transparent"
|
|
37
|
+
},
|
|
38
|
+
dot: {
|
|
39
|
+
true: "rounded-full"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
compoundVariants: [
|
|
43
|
+
{
|
|
44
|
+
outline: !0,
|
|
45
|
+
size: "default",
|
|
46
|
+
className: "px-1.5"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
variant: "default",
|
|
51
|
+
size: "default",
|
|
52
|
+
outline: !1,
|
|
53
|
+
background: !0,
|
|
54
|
+
dot: !1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
), y = l(
|
|
58
|
+
({
|
|
59
|
+
className: d,
|
|
60
|
+
variant: r,
|
|
61
|
+
size: s,
|
|
62
|
+
outline: i,
|
|
63
|
+
dot: o,
|
|
64
|
+
background: u,
|
|
65
|
+
urgent: n = !1,
|
|
66
|
+
children: a,
|
|
67
|
+
render: g,
|
|
68
|
+
...c
|
|
69
|
+
}, b) => {
|
|
70
|
+
const t = !a, f = r && !(/* @__PURE__ */ new Set([
|
|
71
|
+
"mountain",
|
|
72
|
+
"fjord",
|
|
73
|
+
"nordic",
|
|
74
|
+
"aurora",
|
|
75
|
+
"dusk",
|
|
76
|
+
"orange"
|
|
77
|
+
])).has(r), e = i === !0 && f;
|
|
78
|
+
return v({
|
|
79
|
+
defaultTagName: "span",
|
|
80
|
+
ref: b,
|
|
81
|
+
props: p(
|
|
82
|
+
{
|
|
83
|
+
className: x(
|
|
84
|
+
k({
|
|
85
|
+
variant: r,
|
|
86
|
+
size: s,
|
|
87
|
+
outline: e,
|
|
88
|
+
background: e ? !1 : u,
|
|
89
|
+
dot: o
|
|
90
|
+
}),
|
|
91
|
+
e && r === "error" && "text-destructive-foreground",
|
|
92
|
+
e && r === "warning" && "text-warning-foreground",
|
|
93
|
+
e && r === "success" && "text-success-foreground",
|
|
94
|
+
e && r === "inProgress" && "text-neutral-foreground",
|
|
95
|
+
e && r === "archived" && "text-undefined-foreground",
|
|
96
|
+
o && t && "size-2 p-0 border-0",
|
|
97
|
+
o && t && n && "bg-destructive-foreground",
|
|
98
|
+
o && t && !n && "bg-neutral-foreground",
|
|
99
|
+
d
|
|
100
|
+
)
|
|
101
|
+
},
|
|
102
|
+
{ ...c, children: a }
|
|
103
|
+
),
|
|
104
|
+
render: g,
|
|
105
|
+
state: {
|
|
106
|
+
slot: "badge",
|
|
107
|
+
variant: r
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
y.displayName = "Badge";
|
|
113
|
+
export {
|
|
114
|
+
y as Badge,
|
|
115
|
+
k as badgeVariants
|
|
116
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
|
|
8
|
+
declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
9
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as v } from "react";
|
|
3
|
+
import { Button as c } from "@base-ui/react/button";
|
|
4
|
+
import { cva as u } from "class-variance-authority";
|
|
5
|
+
import { focusRing as g, focusRingDestructive as h, cn as b } from "../../../../lib/utils.js";
|
|
6
|
+
const p = u(
|
|
7
|
+
`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-transparent text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${g} aria-invalid:focus-visible:shadow-focus-ring-destructive`,
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary-hover dark:hover:bg-primary-hover",
|
|
12
|
+
destructive: `bg-destructive text-destructive-foreground hover:bg-destructive-hover dark:hover:bg-destructive-hover ${h} dark:bg-destructive/60`,
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-hover dark:hover:bg-secondary-hover",
|
|
14
|
+
outline: "border border-border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:border-border",
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
16
|
+
link: "text-foreground-link underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-9 px-3 py-2 has-[>svg]:px-3",
|
|
20
|
+
sm: "h-7 rounded-sm gap-1.5 px-2 has-[>svg]:px-2",
|
|
21
|
+
lg: "h-10 px-4 has-[>svg]:px-4",
|
|
22
|
+
icon: "size-9",
|
|
23
|
+
"icon-sm": "size-7",
|
|
24
|
+
"icon-lg": "size-10"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "default"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
), f = v(
|
|
33
|
+
({ className: r, variant: t, size: o, children: n, render: e, nativeButton: a, ...s }, i) => /* @__PURE__ */ d(
|
|
34
|
+
c,
|
|
35
|
+
{
|
|
36
|
+
ref: i,
|
|
37
|
+
"data-slot": "button",
|
|
38
|
+
render: e,
|
|
39
|
+
nativeButton: a ?? (e ? !1 : void 0),
|
|
40
|
+
className: b(p({ variant: t, size: o, className: r })),
|
|
41
|
+
...s,
|
|
42
|
+
children: n
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
f.displayName = "Button";
|
|
47
|
+
export {
|
|
48
|
+
f as Button,
|
|
49
|
+
p as buttonVariants
|
|
50
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
name: "Button",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A versatile button component with multiple variants and sizes, built with Base UI render props and class-variance-authority.",
|
|
5
|
+
llmUsage: "When asked for a button, use `<Button variant='default'>Click me</Button>` instead of `<button>`. For different styles, use variants like 'destructive', 'outline', 'secondary', 'ghost', or 'link'."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
t as ButtonMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { Separator } from '../separator/separator';
|
|
5
|
+
declare const buttonGroupVariants: (props?: ({
|
|
6
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
declare function ButtonGroup({ className, orientation, ...props }: ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ButtonGroupText({ className, render, children, ...props }: useRender.ComponentProps<'div'>): import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>;
|
|
10
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|