@locusgraph/components 0.2.0 → 0.2.2
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/action/button-group.js +45 -17
- package/dist/action/button.js +44 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +70 -17
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.js +33 -20
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +56 -13
- package/dist/display/chat/attachment/attachment.js +70 -28
- package/dist/display/chat/bubble.js +80 -37
- package/dist/display/chat/marker.js +44 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +58 -13
- package/dist/display/content/item.js +134 -47
- package/dist/display/content/kbd.js +19 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +162 -11
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.js +86 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +30 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +44 -6
- package/dist/display/skeletons/shapes/skeleton-avatar.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +31 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +25 -7
- package/dist/display/skeletons/skeleton-parts.js +22 -6
- package/dist/display/status/alert.js +44 -18
- package/dist/display/status/empty.js +69 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +10 -3
- package/dist/display/status/spinner.js +11 -3
- package/dist/display/table.js +77 -17
- package/dist/feedback/toaster.js +98 -21
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +151 -8
- package/dist/form/advanced/combobox/combobox-items.js +239 -14
- package/dist/form/advanced/combobox/combobox.js +386 -13
- package/dist/form/advanced/input-otp.js +201 -11
- package/dist/form/choice/checkbox.js +58 -3
- package/dist/form/choice/radio-group.js +94 -5
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +34 -14
- package/dist/form/field/field-separator.js +19 -3
- package/dist/form/field/field-set.js +21 -5
- package/dist/form/field/field-text.js +28 -7
- package/dist/form/field/field.js +43 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +13 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +39 -7
- package/dist/form/textarea.js +11 -3
- package/dist/layout/accordion.js +165 -8
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +122 -7
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +384 -28
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +11 -11
- package/dist/navigation/breadcrumb.js +82 -17
- package/dist/navigation/menubar/menubar-items.js +322 -16
- package/dist/navigation/menubar/menubar-sub.js +125 -7
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +90 -18
- package/dist/navigation/pagination.js +91 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +322 -16
- package/dist/overlay/context-menu/context-menu-sub.js +125 -7
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +405 -24
- package/dist/overlay/floating/command.js +423 -20
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +149 -7
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +124 -7
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +379 -26
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +29 -5
- package/dist/shell/app-shell.js +19 -3
- package/dist/shell/breadcrumbs.js +46 -14
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +36 -3
- package/dist/shell/docs/docs-sidebar.js +41 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +44 -42
- package/dist/shell/navigation/app-sidebar.js +66 -6
- package/dist/shell/navigation/nav-group.js +53 -11
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
|
@@ -1,21 +1,64 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cn } from "cn";
|
|
3
2
|
import * as Slot from "radix-ui/slot";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import { Button } from "../../../action/button.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
function AttachmentTitle({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsx("span", {
|
|
11
|
+
"data-slot": "attachment-title",
|
|
12
|
+
className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
7
15
|
}
|
|
8
|
-
function AttachmentDescription({
|
|
9
|
-
|
|
16
|
+
function AttachmentDescription({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/_jsx("span", {
|
|
21
|
+
"data-slot": "attachment-description",
|
|
22
|
+
className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80", "max-w-full", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
10
25
|
}
|
|
11
|
-
function AttachmentActions({
|
|
12
|
-
|
|
26
|
+
function AttachmentActions({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /*#__PURE__*/_jsx("div", {
|
|
31
|
+
"data-slot": "attachment-actions",
|
|
32
|
+
className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
13
35
|
}
|
|
14
|
-
function AttachmentAction({
|
|
15
|
-
|
|
36
|
+
function AttachmentAction({
|
|
37
|
+
className,
|
|
38
|
+
variant,
|
|
39
|
+
size = "icon-xs",
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
43
|
+
"data-slot": "attachment-action",
|
|
44
|
+
variant: variant ?? "ghost",
|
|
45
|
+
size: size,
|
|
46
|
+
className: cn(className),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
16
49
|
}
|
|
17
|
-
function AttachmentTrigger({
|
|
18
|
-
|
|
19
|
-
|
|
50
|
+
function AttachmentTrigger({
|
|
51
|
+
className,
|
|
52
|
+
asChild = false,
|
|
53
|
+
type,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
57
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
58
|
+
"data-slot": "attachment-trigger",
|
|
59
|
+
type: asChild ? undefined : type ?? "button",
|
|
60
|
+
className: cn("absolute inset-0 z-10 outline-none", className),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
20
63
|
}
|
|
21
|
-
export { AttachmentAction, AttachmentActions, AttachmentDescription, AttachmentTitle, AttachmentTrigger
|
|
64
|
+
export { AttachmentAction, AttachmentActions, AttachmentDescription, AttachmentTitle, AttachmentTrigger };
|
|
@@ -1,40 +1,82 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
const attachmentVariants = cva("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
orientation: {
|
|
12
|
-
horizontal: "min-w-40 items-center",
|
|
13
|
-
vertical: "w-28 flex-col has-data-[slot=attachment-content]:w-36",
|
|
14
|
-
},
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
|
|
9
|
+
sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
|
|
10
|
+
xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
|
|
15
11
|
},
|
|
12
|
+
orientation: {
|
|
13
|
+
horizontal: "min-w-40 items-center",
|
|
14
|
+
vertical: "w-28 flex-col has-data-[slot=attachment-content]:w-36"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
16
17
|
});
|
|
17
|
-
function Attachment({
|
|
18
|
-
|
|
18
|
+
function Attachment({
|
|
19
|
+
className,
|
|
20
|
+
state = "done",
|
|
21
|
+
size = "default",
|
|
22
|
+
orientation = "horizontal",
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /*#__PURE__*/_jsx("div", {
|
|
26
|
+
"data-slot": "attachment",
|
|
27
|
+
"data-state": state,
|
|
28
|
+
"data-size": size,
|
|
29
|
+
"data-orientation": orientation,
|
|
30
|
+
className: cn(attachmentVariants({
|
|
31
|
+
size,
|
|
32
|
+
orientation
|
|
33
|
+
}), className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
19
36
|
}
|
|
20
|
-
function AttachmentGroup({
|
|
21
|
-
|
|
37
|
+
function AttachmentGroup({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return /*#__PURE__*/_jsx("div", {
|
|
42
|
+
"data-slot": "attachment-group",
|
|
43
|
+
className: cn("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
22
46
|
}
|
|
23
47
|
const attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
variants: {
|
|
49
|
+
variant: {
|
|
50
|
+
icon: "",
|
|
51
|
+
image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
variant: "icon"
|
|
56
|
+
}
|
|
33
57
|
});
|
|
34
|
-
function AttachmentMedia({
|
|
35
|
-
|
|
58
|
+
function AttachmentMedia({
|
|
59
|
+
className,
|
|
60
|
+
variant = "icon",
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
return /*#__PURE__*/_jsx("div", {
|
|
64
|
+
"data-slot": "attachment-media",
|
|
65
|
+
"data-variant": variant,
|
|
66
|
+
className: cn(attachmentMediaVariants({
|
|
67
|
+
variant
|
|
68
|
+
}), className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
36
71
|
}
|
|
37
|
-
function AttachmentContent({
|
|
38
|
-
|
|
72
|
+
function AttachmentContent({
|
|
73
|
+
className,
|
|
74
|
+
...props
|
|
75
|
+
}) {
|
|
76
|
+
return /*#__PURE__*/_jsx("div", {
|
|
77
|
+
"data-slot": "attachment-content",
|
|
78
|
+
className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
39
81
|
}
|
|
40
82
|
export { Attachment, AttachmentContent, AttachmentGroup, AttachmentMedia };
|
|
@@ -1,50 +1,93 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
function BubbleGroup({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
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
|
+
});
|
|
7
15
|
}
|
|
8
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", {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
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",
|
|
20
|
+
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%)]",
|
|
21
|
+
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%)]",
|
|
22
|
+
tinted: "*:data-[slot=bubble-content]:bg-muted *:data-[slot=bubble-content]:text-foreground *:data-[slot=bubble-content]:ring-1 *:data-[slot=bubble-content]:ring-border [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
23
|
+
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",
|
|
24
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:py-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",
|
|
25
|
+
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"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default"
|
|
30
|
+
}
|
|
23
31
|
});
|
|
24
|
-
function Bubble({
|
|
25
|
-
|
|
32
|
+
function Bubble({
|
|
33
|
+
variant = "default",
|
|
34
|
+
align = "start",
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
return /*#__PURE__*/_jsx("div", {
|
|
39
|
+
"data-slot": "bubble",
|
|
40
|
+
"data-variant": variant,
|
|
41
|
+
"data-align": align,
|
|
42
|
+
className: cn(bubbleVariants({
|
|
43
|
+
variant
|
|
44
|
+
}), className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
26
47
|
}
|
|
27
|
-
function BubbleContent({
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
function BubbleContent({
|
|
49
|
+
asChild = false,
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
54
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
55
|
+
"data-slot": "bubble-content",
|
|
56
|
+
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),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
30
59
|
}
|
|
31
60
|
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", {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
align: {
|
|
38
|
-
start: "left-3",
|
|
39
|
-
end: "right-3",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
side: "bottom",
|
|
44
|
-
align: "end",
|
|
61
|
+
variants: {
|
|
62
|
+
side: {
|
|
63
|
+
top: "top-0 -translate-y-3/4",
|
|
64
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
45
65
|
},
|
|
66
|
+
align: {
|
|
67
|
+
start: "left-3",
|
|
68
|
+
end: "right-3"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
side: "bottom",
|
|
73
|
+
align: "end"
|
|
74
|
+
}
|
|
46
75
|
});
|
|
47
|
-
function BubbleReactions({
|
|
48
|
-
|
|
76
|
+
function BubbleReactions({
|
|
77
|
+
side = "bottom",
|
|
78
|
+
align = "end",
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}) {
|
|
82
|
+
return /*#__PURE__*/_jsx("div", {
|
|
83
|
+
"data-slot": "bubble-reactions",
|
|
84
|
+
"data-align": align,
|
|
85
|
+
"data-side": side,
|
|
86
|
+
className: cn(bubbleReactionsVariants({
|
|
87
|
+
side,
|
|
88
|
+
align
|
|
89
|
+
}), className),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
49
92
|
}
|
|
50
93
|
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -1,24 +1,53 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { cva } from "class-variance-authority";
|
|
3
2
|
import { cn } from "cn";
|
|
4
3
|
import * as Slot from "radix-ui/slot";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "",
|
|
10
|
+
separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
|
|
11
|
+
border: "border-b border-border pb-2"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
13
14
|
});
|
|
14
|
-
function Marker({
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
function Marker({
|
|
16
|
+
className,
|
|
17
|
+
variant = "default",
|
|
18
|
+
asChild = false,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
22
|
+
return /*#__PURE__*/_jsx(Comp, {
|
|
23
|
+
"data-slot": "marker",
|
|
24
|
+
"data-variant": variant,
|
|
25
|
+
className: cn(markerVariants({
|
|
26
|
+
variant,
|
|
27
|
+
className
|
|
28
|
+
})),
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
17
31
|
}
|
|
18
|
-
function MarkerIcon({
|
|
19
|
-
|
|
32
|
+
function MarkerIcon({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
return /*#__PURE__*/_jsx("span", {
|
|
37
|
+
"data-slot": "marker-icon",
|
|
38
|
+
"aria-hidden": "true",
|
|
39
|
+
className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
20
42
|
}
|
|
21
|
-
function MarkerContent({
|
|
22
|
-
|
|
43
|
+
function MarkerContent({
|
|
44
|
+
className,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /*#__PURE__*/_jsx("span", {
|
|
48
|
+
"data-slot": "marker-content",
|
|
49
|
+
className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
23
52
|
}
|
|
24
53
|
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|