@camox/ui 0.43.0 → 0.45.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/accordion.d.ts +10 -0
- package/dist/components/accordion.js +40 -0
- package/dist/components/alert-dialog.d.ts +13 -51
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.d.ts +6 -22
- package/dist/components/alert.js +3 -2
- package/dist/components/avatar.d.ts +7 -28
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.d.ts +3 -12
- package/dist/components/bubble.d.ts +18 -0
- package/dist/components/bubble.js +75 -0
- package/dist/components/button-group.d.ts +4 -20
- package/dist/components/button-group.js +1 -1
- package/dist/components/button.d.ts +4 -12
- package/dist/components/button.js +3 -3
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.js +21 -0
- package/dist/components/command.d.ts +14 -50
- package/dist/components/command.js +3 -3
- package/dist/components/dialog.d.ts +12 -45
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu.d.ts +20 -79
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/favicon-drop-zone.d.ts +17 -0
- package/dist/components/favicon-drop-zone.js +97 -0
- package/dist/components/floating-toolbar.d.ts +1 -6
- package/dist/components/input-group.d.ts +9 -34
- package/dist/components/input-group.js +1 -3
- package/dist/components/input.d.ts +1 -7
- package/dist/components/input.js +1 -1
- package/dist/components/kbd.d.ts +2 -10
- package/dist/components/label.d.ts +1 -6
- package/dist/components/label.js +1 -1
- package/dist/components/message-scroller.d.ts +12 -0
- package/dist/components/message-scroller.js +62 -0
- package/dist/components/message.d.ts +12 -0
- package/dist/components/message.js +51 -0
- package/dist/components/panel.d.ts +9 -32
- package/dist/components/panel.js +1 -1
- package/dist/components/popover.d.ts +6 -29
- package/dist/components/popover.js +1 -1
- package/dist/components/select.d.ts +10 -48
- package/dist/components/select.js +1 -1
- package/dist/components/separator.d.ts +1 -7
- package/dist/components/sheet.d.ts +9 -37
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton.d.ts +1 -6
- package/dist/components/spinner.d.ts +1 -6
- package/dist/components/switch.d.ts +2 -8
- package/dist/components/tabs.d.ts +5 -22
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.d.ts +1 -6
- package/dist/components/textarea.js +1 -1
- package/dist/components/toaster.d.ts +1 -7
- package/dist/components/toggle.d.ts +2 -10
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +4 -21
- package/dist/lib/utils.d.ts +4 -6
- package/package.json +34 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
2
|
+
//#region src/components/accordion.d.ts
|
|
3
|
+
declare function Accordion({ ...props }: Accordion$1.Root.Props): import("react").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ ...props }: Accordion$1.Item.Props): import("react").JSX.Element;
|
|
5
|
+
declare function AccordionHeader({ ...props }: Accordion$1.Header.Props): import("react").JSX.Element;
|
|
6
|
+
declare function AccordionTrigger({ ...props }: Accordion$1.Trigger.Props): import("react").JSX.Element;
|
|
7
|
+
/** Animates its height open and closed, from the height Base UI measures. */
|
|
8
|
+
declare function AccordionPanel({ className, ...props }: Accordion$1.Panel.Props): import("react").JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/accordion.tsx
|
|
6
|
+
function Accordion({ ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
8
|
+
"data-slot": "accordion",
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function AccordionItem({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Accordion$1.Item, {
|
|
14
|
+
"data-slot": "accordion-item",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function AccordionHeader({ ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
20
|
+
"data-slot": "accordion-header",
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function AccordionTrigger({ ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Accordion$1.Trigger, {
|
|
26
|
+
"data-slot": "accordion-trigger",
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Animates its height open and closed, from the height Base UI measures. */
|
|
31
|
+
function AccordionPanel({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(Accordion$1.Panel, {
|
|
33
|
+
"data-slot": "accordion-panel",
|
|
34
|
+
className: cn("h-(--accordion-panel-height) overflow-hidden transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0 motion-reduce:transition-none", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger };
|
|
@@ -1,58 +1,20 @@
|
|
|
1
1
|
import { Button } from "./button.js";
|
|
2
2
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
4
|
//#region src/components/alert-dialog.d.ts
|
|
7
|
-
declare function AlertDialog({
|
|
8
|
-
|
|
9
|
-
}: AlertDialog$1.
|
|
10
|
-
declare function
|
|
11
|
-
|
|
12
|
-
}: AlertDialog$1.Trigger.Props): _$react_jsx_runtime0.JSX.Element;
|
|
13
|
-
declare function AlertDialogPortal({
|
|
14
|
-
...props
|
|
15
|
-
}: AlertDialog$1.Portal.Props): _$react_jsx_runtime0.JSX.Element;
|
|
16
|
-
declare function AlertDialogOverlay({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: AlertDialog$1.Backdrop.Props): _$react_jsx_runtime0.JSX.Element;
|
|
20
|
-
declare function AlertDialogContent({
|
|
21
|
-
className,
|
|
22
|
-
size,
|
|
23
|
-
...props
|
|
24
|
-
}: AlertDialog$1.Popup.Props & {
|
|
5
|
+
declare function AlertDialog({ ...props }: AlertDialog$1.Root.Props): React.JSX.Element;
|
|
6
|
+
declare function AlertDialogTrigger({ ...props }: AlertDialog$1.Trigger.Props): React.JSX.Element;
|
|
7
|
+
declare function AlertDialogPortal({ ...props }: AlertDialog$1.Portal.Props): React.JSX.Element;
|
|
8
|
+
declare function AlertDialogOverlay({ className, ...props }: AlertDialog$1.Backdrop.Props): React.JSX.Element;
|
|
9
|
+
declare function AlertDialogContent({ className, size, ...props }: AlertDialog$1.Popup.Props & {
|
|
25
10
|
size?: "default" | "sm";
|
|
26
|
-
}):
|
|
27
|
-
declare function AlertDialogHeader({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}: React.ComponentProps<
|
|
31
|
-
declare function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
35
|
-
declare function AlertDialogMedia({
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
-
declare function AlertDialogTitle({
|
|
40
|
-
className,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof AlertDialog$1.Title>): _$react_jsx_runtime0.JSX.Element;
|
|
43
|
-
declare function AlertDialogDescription({
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<typeof AlertDialog$1.Description>): _$react_jsx_runtime0.JSX.Element;
|
|
47
|
-
declare function AlertDialogAction({
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: React.ComponentProps<typeof Button>): _$react_jsx_runtime0.JSX.Element;
|
|
51
|
-
declare function AlertDialogCancel({
|
|
52
|
-
className,
|
|
53
|
-
variant,
|
|
54
|
-
size,
|
|
55
|
-
...props
|
|
56
|
-
}: AlertDialog$1.Close.Props & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
14
|
+
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
15
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Title>): React.JSX.Element;
|
|
16
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialog$1.Description>): React.JSX.Element;
|
|
17
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
18
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: AlertDialog$1.Close.Props & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): React.JSX.Element;
|
|
57
19
|
//#endregion
|
|
58
20
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
4
5
|
import "react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/alert-dialog.tsx
|
|
8
8
|
function AlertDialog({ ...props }) {
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
-
|
|
6
3
|
//#region src/components/alert.d.ts
|
|
7
4
|
declare const alertVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
9
|
-
} &
|
|
10
|
-
declare function Alert({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
15
|
-
declare function AlertTitle({
|
|
16
|
-
className,
|
|
17
|
-
...props
|
|
18
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
19
|
-
declare function AlertDescription({
|
|
20
|
-
className,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
23
|
-
declare function AlertAction({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
variant?: "default" | "destructive" | "warning" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
8
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
27
11
|
//#endregion
|
|
28
12
|
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
package/dist/components/alert.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import "react";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/alert.tsx
|
|
7
7
|
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
8
8
|
variants: { variant: {
|
|
9
9
|
default: "bg-card text-card-foreground",
|
|
10
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
10
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
11
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-900 *:data-[slot=alert-description]:text-amber-900/90 dark:text-amber-200 dark:*:data-[slot=alert-description]:text-amber-200/90"
|
|
11
12
|
} },
|
|
12
13
|
defaultVariants: { variant: "default" }
|
|
13
14
|
});
|
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
4
|
-
|
|
5
3
|
//#region src/components/avatar.d.ts
|
|
6
|
-
declare function Avatar({
|
|
7
|
-
className,
|
|
8
|
-
size,
|
|
9
|
-
...props
|
|
10
|
-
}: Avatar$1.Root.Props & {
|
|
4
|
+
declare function Avatar({ className, size, ...props }: Avatar$1.Root.Props & {
|
|
11
5
|
size?: "default" | "sm" | "lg";
|
|
12
|
-
}):
|
|
13
|
-
declare function AvatarImage({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}:
|
|
17
|
-
declare function
|
|
18
|
-
className,
|
|
19
|
-
...props
|
|
20
|
-
}: Avatar$1.Fallback.Props): _$react_jsx_runtime0.JSX.Element;
|
|
21
|
-
declare function AvatarBadge({
|
|
22
|
-
className,
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<"span">): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
-
declare function AvatarGroup({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
29
|
-
declare function AvatarGroupCount({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function AvatarImage({ className, ...props }: Avatar$1.Image.Props): React.JSX.Element;
|
|
8
|
+
declare function AvatarFallback({ className, ...props }: Avatar$1.Fallback.Props): React.JSX.Element;
|
|
9
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
10
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
33
12
|
//#endregion
|
|
34
13
|
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import * as _$react from "react";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
-
|
|
6
3
|
//#region src/components/badge.d.ts
|
|
7
4
|
declare const badgeVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "
|
|
5
|
+
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
9
6
|
size?: "default" | "sm" | null | undefined;
|
|
10
|
-
} &
|
|
11
|
-
declare function Badge({
|
|
12
|
-
className,
|
|
13
|
-
variant,
|
|
14
|
-
size,
|
|
15
|
-
render,
|
|
16
|
-
...props
|
|
17
|
-
}: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Badge({ className, variant, size, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
18
9
|
//#endregion
|
|
19
10
|
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
//#region src/components/bubble.d.ts
|
|
5
|
+
declare function BubbleGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare const bubbleVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "outline" | "destructive" | "secondary" | "muted" | "tinted" | "ghost" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
declare function Bubble({ variant, align, className, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
|
|
10
|
+
align?: "start" | "end";
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function BubbleContent({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
declare function BubbleReactions({ side, align, className, ...props }: React.ComponentProps<"div"> & {
|
|
14
|
+
align?: "start" | "end";
|
|
15
|
+
side?: "top" | "bottom";
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
|
|
8
|
+
//#region src/components/bubble.tsx
|
|
9
|
+
function BubbleGroup({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
"data-slot": "bubble-group",
|
|
12
|
+
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
19
|
+
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
20
|
+
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
21
|
+
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
22
|
+
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
23
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
24
|
+
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { variant: "default" }
|
|
27
|
+
});
|
|
28
|
+
function Bubble({ variant = "default", align = "start", className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
"data-slot": "bubble",
|
|
31
|
+
"data-variant": variant,
|
|
32
|
+
"data-align": align,
|
|
33
|
+
className: cn(bubbleVariants({ variant }), className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function BubbleContent({ className, render, ...props }) {
|
|
38
|
+
return useRender({
|
|
39
|
+
defaultTagName: "div",
|
|
40
|
+
props: mergeProps({ className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className) }, props),
|
|
41
|
+
render,
|
|
42
|
+
state: { slot: "bubble-content" }
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
|
|
46
|
+
variants: {
|
|
47
|
+
side: {
|
|
48
|
+
top: "top-0 -translate-y-3/4",
|
|
49
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
50
|
+
},
|
|
51
|
+
align: {
|
|
52
|
+
start: "left-3",
|
|
53
|
+
end: "right-3"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
side: "bottom",
|
|
58
|
+
align: "end"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
function BubbleReactions({ side = "bottom", align = "end", className, ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
"data-slot": "bubble-reactions",
|
|
64
|
+
"data-align": align,
|
|
65
|
+
"data-side": side,
|
|
66
|
+
className: cn(bubbleReactionsVariants({
|
|
67
|
+
side,
|
|
68
|
+
align
|
|
69
|
+
}), className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//#endregion
|
|
75
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
import { Separator } from "./separator.js";
|
|
2
|
-
import * as _$react from "react";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
|
-
|
|
8
4
|
//#region src/components/button-group.d.ts
|
|
9
5
|
declare const buttonGroupVariants: (props?: ({
|
|
10
6
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
-
} &
|
|
12
|
-
declare function ButtonGroup({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
17
|
-
declare function ButtonGroupText({
|
|
18
|
-
className,
|
|
19
|
-
render,
|
|
20
|
-
...props
|
|
21
|
-
}: useRender.ComponentProps<"div">): _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
22
|
-
declare function ButtonGroupSeparator({
|
|
23
|
-
className,
|
|
24
|
-
orientation,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<typeof Separator>): _$react_jsx_runtime0.JSX.Element;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
|
|
9
|
+
declare function ButtonGroupText({ className, render, ...props }: useRender.ComponentProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
27
11
|
//#endregion
|
|
28
12
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { Separator } from "./separator.js";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
7
|
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
-
|
|
6
3
|
//#region src/components/button.d.ts
|
|
7
4
|
declare const buttonVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "
|
|
9
|
-
size?: "default" | "sm" | "
|
|
10
|
-
} &
|
|
11
|
-
declare function Button({
|
|
12
|
-
className,
|
|
13
|
-
variant,
|
|
14
|
-
size,
|
|
15
|
-
...props
|
|
16
|
-
}: Button$1.Props & VariantProps<typeof buttonVariants>): _$react_jsx_runtime0.JSX.Element;
|
|
5
|
+
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
17
9
|
//#endregion
|
|
18
10
|
export { Button, buttonVariants };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/button.tsx
|
|
7
7
|
const buttonVariants = cva("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", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11
|
-
outline: "border-border bg-background shadow-xs hover:bg-
|
|
11
|
+
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 dark:aria-expanded:bg-input/50",
|
|
12
12
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
|
-
ghost: "hover:bg-
|
|
13
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50 dark:aria-expanded:bg-muted/50",
|
|
14
14
|
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",
|
|
15
15
|
link: "text-primary underline-offset-4 hover:underline"
|
|
16
16
|
},
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/checkbox.tsx
|
|
7
|
+
function Checkbox({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
9
|
+
"data-slot": "checkbox",
|
|
10
|
+
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none 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 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 dark:data-checked:bg-primary data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
11
|
+
...props,
|
|
12
|
+
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
13
|
+
"data-slot": "checkbox-indicator",
|
|
14
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
15
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Checkbox };
|
|
@@ -1,61 +1,25 @@
|
|
|
1
1
|
import { Dialog } from "./dialog.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
4
|
-
import { Command as Command$1 } from "cmdk";
|
|
5
|
-
|
|
3
|
+
import { Command as Command$1, defaultFilter as commandFilter } from "cmdk";
|
|
6
4
|
//#region src/components/command.d.ts
|
|
7
|
-
declare function Command({
|
|
8
|
-
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof Command$1>): _$react_jsx_runtime0.JSX.Element;
|
|
11
|
-
declare function CommandDialog({
|
|
12
|
-
title,
|
|
13
|
-
description,
|
|
14
|
-
children,
|
|
15
|
-
className,
|
|
16
|
-
showCloseButton,
|
|
17
|
-
...props
|
|
18
|
-
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
5
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof Command$1>): React.JSX.Element;
|
|
6
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
|
|
19
7
|
title?: string;
|
|
20
8
|
description?: string;
|
|
21
9
|
className?: string;
|
|
22
10
|
showCloseButton?: boolean;
|
|
23
11
|
children: React.ReactNode;
|
|
24
|
-
}):
|
|
25
|
-
declare function CommandInput({
|
|
26
|
-
className,
|
|
27
|
-
inputGroupClassName,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof Command$1.Input> & {
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare function CommandInput({ className, inputGroupClassName, ...props }: React.ComponentProps<typeof Command$1.Input> & {
|
|
30
14
|
inputGroupClassName?: string;
|
|
31
|
-
}):
|
|
32
|
-
declare function CommandList({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}: React.ComponentProps<typeof Command$1.
|
|
36
|
-
declare function
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<typeof Command$1.Empty>): _$react_jsx_runtime0.JSX.Element;
|
|
40
|
-
declare function CommandGroup({
|
|
41
|
-
className,
|
|
42
|
-
...props
|
|
43
|
-
}: React.ComponentProps<typeof Command$1.Group>): _$react_jsx_runtime0.JSX.Element;
|
|
44
|
-
declare function CommandSeparator({
|
|
45
|
-
className,
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<typeof Command$1.Separator>): _$react_jsx_runtime0.JSX.Element;
|
|
48
|
-
declare function CommandItem({
|
|
49
|
-
className,
|
|
50
|
-
children,
|
|
51
|
-
hideCheck,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<typeof Command$1.Item> & {
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof Command$1.List>): React.JSX.Element;
|
|
17
|
+
declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof Command$1.Empty>): React.JSX.Element;
|
|
18
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): React.JSX.Element;
|
|
19
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof Command$1.Separator>): React.JSX.Element;
|
|
20
|
+
declare function CommandItem({ className, children, hideCheck, ...props }: React.ComponentProps<typeof Command$1.Item> & {
|
|
54
21
|
hideCheck?: boolean;
|
|
55
|
-
}):
|
|
56
|
-
declare function CommandShortcut({
|
|
57
|
-
className,
|
|
58
|
-
...props
|
|
59
|
-
}: React.ComponentProps<"span">): _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
60
24
|
//#endregion
|
|
61
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
25
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, commandFilter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./dialog.js";
|
|
3
3
|
import { InputGroup, InputGroupAddon } from "./input-group.js";
|
|
4
|
-
import "react";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
5
|
+
import "react";
|
|
7
6
|
import { CheckIcon, SearchIcon } from "lucide-react";
|
|
7
|
+
import { Command as Command$1, defaultFilter as commandFilter } from "cmdk";
|
|
8
8
|
|
|
9
9
|
//#region src/components/command.tsx
|
|
10
10
|
function Command({ className, ...props }) {
|
|
@@ -86,4 +86,4 @@ function CommandShortcut({ className, ...props }) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
89
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, commandFilter };
|