@locusgraph/components 0.2.0 → 0.2.1
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 +148 -17
- package/dist/action/button.js +91 -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 +74 -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 +222 -13
- package/dist/display/chat/attachment/attachment.js +210 -28
- package/dist/display/chat/bubble.js +225 -37
- package/dist/display/chat/marker.js +143 -15
- package/dist/display/chat/message-scroller.js +276 -14
- package/dist/display/chat/message.js +238 -13
- package/dist/display/content/item.js +448 -47
- package/dist/display/content/kbd.js +78 -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 +309 -29
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +79 -6
- package/dist/display/skeletons/layouts/skeleton-table.js +163 -5
- package/dist/display/skeletons/shapes/skeleton-avatar.js +95 -13
- package/dist/display/skeletons/shapes/skeleton-button.js +95 -13
- package/dist/display/skeletons/shapes/skeleton-text.js +78 -7
- package/dist/display/skeletons/skeleton-parts.js +63 -6
- package/dist/display/status/alert.js +136 -18
- package/dist/display/status/empty.js +250 -22
- package/dist/display/status/progress.js +116 -16
- package/dist/display/status/skeleton.js +40 -3
- package/dist/display/status/spinner.js +41 -3
- package/dist/display/table.js +310 -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 +117 -14
- package/dist/form/field/field-separator.js +70 -3
- package/dist/form/field/field-set.js +85 -5
- package/dist/form/field/field-text.js +116 -7
- package/dist/form/field/field.js +137 -25
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +47 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +147 -7
- package/dist/form/textarea.js +41 -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 +23 -10
- package/dist/navigation/breadcrumb.js +301 -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 +366 -18
- package/dist/navigation/pagination.js +328 -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 +81 -5
- package/dist/shell/app-shell.js +58 -3
- package/dist/shell/breadcrumbs.js +102 -12
- package/dist/shell/docs/docs-header.js +210 -10
- package/dist/shell/docs/docs-shell.js +100 -3
- package/dist/shell/docs/docs-sidebar.js +88 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +88 -42
- package/dist/shell/navigation/app-sidebar.js +188 -6
- package/dist/shell/navigation/nav-group.js +161 -10
- package/dist/shell/theme-toggle.js +51 -4
- package/package.json +2 -2
|
@@ -1,40 +1,222 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
6
|
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
|
-
},
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
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",
|
|
10
|
+
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",
|
|
11
|
+
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
12
|
},
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: "min-w-40 items-center",
|
|
15
|
+
vertical: "w-28 flex-col has-data-[slot=attachment-content]:w-36"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
16
18
|
});
|
|
17
|
-
function Attachment(
|
|
18
|
-
|
|
19
|
+
function Attachment(t0) {
|
|
20
|
+
const $ = _c(16);
|
|
21
|
+
let className;
|
|
22
|
+
let props;
|
|
23
|
+
let t1;
|
|
24
|
+
let t2;
|
|
25
|
+
let t3;
|
|
26
|
+
if ($[0] !== t0) {
|
|
27
|
+
({
|
|
28
|
+
className,
|
|
29
|
+
state: t1,
|
|
30
|
+
size: t2,
|
|
31
|
+
orientation: t3,
|
|
32
|
+
...props
|
|
33
|
+
} = t0);
|
|
34
|
+
$[0] = t0;
|
|
35
|
+
$[1] = className;
|
|
36
|
+
$[2] = props;
|
|
37
|
+
$[3] = t1;
|
|
38
|
+
$[4] = t2;
|
|
39
|
+
$[5] = t3;
|
|
40
|
+
} else {
|
|
41
|
+
className = $[1];
|
|
42
|
+
props = $[2];
|
|
43
|
+
t1 = $[3];
|
|
44
|
+
t2 = $[4];
|
|
45
|
+
t3 = $[5];
|
|
46
|
+
}
|
|
47
|
+
const state = t1 === undefined ? "done" : t1;
|
|
48
|
+
const size = t2 === undefined ? "default" : t2;
|
|
49
|
+
const orientation = t3 === undefined ? "horizontal" : t3;
|
|
50
|
+
let t4;
|
|
51
|
+
if ($[6] !== className || $[7] !== orientation || $[8] !== size) {
|
|
52
|
+
t4 = cn(attachmentVariants({
|
|
53
|
+
size,
|
|
54
|
+
orientation
|
|
55
|
+
}), className);
|
|
56
|
+
$[6] = className;
|
|
57
|
+
$[7] = orientation;
|
|
58
|
+
$[8] = size;
|
|
59
|
+
$[9] = t4;
|
|
60
|
+
} else {
|
|
61
|
+
t4 = $[9];
|
|
62
|
+
}
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[10] !== orientation || $[11] !== props || $[12] !== size || $[13] !== state || $[14] !== t4) {
|
|
65
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
66
|
+
"data-slot": "attachment",
|
|
67
|
+
"data-state": state,
|
|
68
|
+
"data-size": size,
|
|
69
|
+
"data-orientation": orientation,
|
|
70
|
+
className: t4,
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
$[10] = orientation;
|
|
74
|
+
$[11] = props;
|
|
75
|
+
$[12] = size;
|
|
76
|
+
$[13] = state;
|
|
77
|
+
$[14] = t4;
|
|
78
|
+
$[15] = t5;
|
|
79
|
+
} else {
|
|
80
|
+
t5 = $[15];
|
|
81
|
+
}
|
|
82
|
+
return t5;
|
|
19
83
|
}
|
|
20
|
-
function AttachmentGroup(
|
|
21
|
-
|
|
84
|
+
function AttachmentGroup(t0) {
|
|
85
|
+
const $ = _c(8);
|
|
86
|
+
let className;
|
|
87
|
+
let props;
|
|
88
|
+
if ($[0] !== t0) {
|
|
89
|
+
({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
} = t0);
|
|
93
|
+
$[0] = t0;
|
|
94
|
+
$[1] = className;
|
|
95
|
+
$[2] = props;
|
|
96
|
+
} else {
|
|
97
|
+
className = $[1];
|
|
98
|
+
props = $[2];
|
|
99
|
+
}
|
|
100
|
+
let t1;
|
|
101
|
+
if ($[3] !== className) {
|
|
102
|
+
t1 = 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);
|
|
103
|
+
$[3] = className;
|
|
104
|
+
$[4] = t1;
|
|
105
|
+
} else {
|
|
106
|
+
t1 = $[4];
|
|
107
|
+
}
|
|
108
|
+
let t2;
|
|
109
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
110
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
111
|
+
"data-slot": "attachment-group",
|
|
112
|
+
className: t1,
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
$[5] = props;
|
|
116
|
+
$[6] = t1;
|
|
117
|
+
$[7] = t2;
|
|
118
|
+
} else {
|
|
119
|
+
t2 = $[7];
|
|
120
|
+
}
|
|
121
|
+
return t2;
|
|
22
122
|
}
|
|
23
123
|
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
|
-
|
|
124
|
+
variants: {
|
|
125
|
+
variant: {
|
|
126
|
+
icon: "",
|
|
127
|
+
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"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
defaultVariants: {
|
|
131
|
+
variant: "icon"
|
|
132
|
+
}
|
|
33
133
|
});
|
|
34
|
-
function AttachmentMedia(
|
|
35
|
-
|
|
134
|
+
function AttachmentMedia(t0) {
|
|
135
|
+
const $ = _c(11);
|
|
136
|
+
let className;
|
|
137
|
+
let props;
|
|
138
|
+
let t1;
|
|
139
|
+
if ($[0] !== t0) {
|
|
140
|
+
({
|
|
141
|
+
className,
|
|
142
|
+
variant: t1,
|
|
143
|
+
...props
|
|
144
|
+
} = t0);
|
|
145
|
+
$[0] = t0;
|
|
146
|
+
$[1] = className;
|
|
147
|
+
$[2] = props;
|
|
148
|
+
$[3] = t1;
|
|
149
|
+
} else {
|
|
150
|
+
className = $[1];
|
|
151
|
+
props = $[2];
|
|
152
|
+
t1 = $[3];
|
|
153
|
+
}
|
|
154
|
+
const variant = t1 === undefined ? "icon" : t1;
|
|
155
|
+
let t2;
|
|
156
|
+
if ($[4] !== className || $[5] !== variant) {
|
|
157
|
+
t2 = cn(attachmentMediaVariants({
|
|
158
|
+
variant
|
|
159
|
+
}), className);
|
|
160
|
+
$[4] = className;
|
|
161
|
+
$[5] = variant;
|
|
162
|
+
$[6] = t2;
|
|
163
|
+
} else {
|
|
164
|
+
t2 = $[6];
|
|
165
|
+
}
|
|
166
|
+
let t3;
|
|
167
|
+
if ($[7] !== props || $[8] !== t2 || $[9] !== variant) {
|
|
168
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
169
|
+
"data-slot": "attachment-media",
|
|
170
|
+
"data-variant": variant,
|
|
171
|
+
className: t2,
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
$[7] = props;
|
|
175
|
+
$[8] = t2;
|
|
176
|
+
$[9] = variant;
|
|
177
|
+
$[10] = t3;
|
|
178
|
+
} else {
|
|
179
|
+
t3 = $[10];
|
|
180
|
+
}
|
|
181
|
+
return t3;
|
|
36
182
|
}
|
|
37
|
-
function AttachmentContent(
|
|
38
|
-
|
|
183
|
+
function AttachmentContent(t0) {
|
|
184
|
+
const $ = _c(8);
|
|
185
|
+
let className;
|
|
186
|
+
let props;
|
|
187
|
+
if ($[0] !== t0) {
|
|
188
|
+
({
|
|
189
|
+
className,
|
|
190
|
+
...props
|
|
191
|
+
} = t0);
|
|
192
|
+
$[0] = t0;
|
|
193
|
+
$[1] = className;
|
|
194
|
+
$[2] = props;
|
|
195
|
+
} else {
|
|
196
|
+
className = $[1];
|
|
197
|
+
props = $[2];
|
|
198
|
+
}
|
|
199
|
+
let t1;
|
|
200
|
+
if ($[3] !== className) {
|
|
201
|
+
t1 = cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className);
|
|
202
|
+
$[3] = className;
|
|
203
|
+
$[4] = t1;
|
|
204
|
+
} else {
|
|
205
|
+
t1 = $[4];
|
|
206
|
+
}
|
|
207
|
+
let t2;
|
|
208
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
209
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
210
|
+
"data-slot": "attachment-content",
|
|
211
|
+
className: t1,
|
|
212
|
+
...props
|
|
213
|
+
});
|
|
214
|
+
$[5] = props;
|
|
215
|
+
$[6] = t1;
|
|
216
|
+
$[7] = t2;
|
|
217
|
+
} else {
|
|
218
|
+
t2 = $[7];
|
|
219
|
+
}
|
|
220
|
+
return t2;
|
|
39
221
|
}
|
|
40
222
|
export { Attachment, AttachmentContent, AttachmentGroup, AttachmentMedia };
|
|
@@ -1,50 +1,238 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import * as Slot from "radix-ui/slot";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
function BubbleGroup(t0) {
|
|
8
|
+
const $ = _c(8);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
} = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[3] !== className) {
|
|
25
|
+
t1 = cn("flex min-w-0 flex-col gap-2", className);
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
} else {
|
|
29
|
+
t1 = $[4];
|
|
30
|
+
}
|
|
31
|
+
let t2;
|
|
32
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
33
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
34
|
+
"data-slot": "bubble-group",
|
|
35
|
+
className: t1,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
$[5] = props;
|
|
39
|
+
$[6] = t1;
|
|
40
|
+
$[7] = t2;
|
|
41
|
+
} else {
|
|
42
|
+
t2 = $[7];
|
|
43
|
+
}
|
|
44
|
+
return t2;
|
|
7
45
|
}
|
|
8
46
|
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
|
-
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
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",
|
|
50
|
+
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%)]",
|
|
51
|
+
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%)]",
|
|
52
|
+
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%)]",
|
|
53
|
+
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",
|
|
54
|
+
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",
|
|
55
|
+
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"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "default"
|
|
60
|
+
}
|
|
23
61
|
});
|
|
24
|
-
function Bubble(
|
|
25
|
-
|
|
62
|
+
function Bubble(t0) {
|
|
63
|
+
const $ = _c(13);
|
|
64
|
+
let className;
|
|
65
|
+
let props;
|
|
66
|
+
let t1;
|
|
67
|
+
let t2;
|
|
68
|
+
if ($[0] !== t0) {
|
|
69
|
+
({
|
|
70
|
+
variant: t1,
|
|
71
|
+
align: t2,
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = className;
|
|
77
|
+
$[2] = props;
|
|
78
|
+
$[3] = t1;
|
|
79
|
+
$[4] = t2;
|
|
80
|
+
} else {
|
|
81
|
+
className = $[1];
|
|
82
|
+
props = $[2];
|
|
83
|
+
t1 = $[3];
|
|
84
|
+
t2 = $[4];
|
|
85
|
+
}
|
|
86
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
87
|
+
const align = t2 === undefined ? "start" : t2;
|
|
88
|
+
let t3;
|
|
89
|
+
if ($[5] !== className || $[6] !== variant) {
|
|
90
|
+
t3 = cn(bubbleVariants({
|
|
91
|
+
variant
|
|
92
|
+
}), className);
|
|
93
|
+
$[5] = className;
|
|
94
|
+
$[6] = variant;
|
|
95
|
+
$[7] = t3;
|
|
96
|
+
} else {
|
|
97
|
+
t3 = $[7];
|
|
98
|
+
}
|
|
99
|
+
let t4;
|
|
100
|
+
if ($[8] !== align || $[9] !== props || $[10] !== t3 || $[11] !== variant) {
|
|
101
|
+
t4 = /*#__PURE__*/_jsx("div", {
|
|
102
|
+
"data-slot": "bubble",
|
|
103
|
+
"data-variant": variant,
|
|
104
|
+
"data-align": align,
|
|
105
|
+
className: t3,
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
$[8] = align;
|
|
109
|
+
$[9] = props;
|
|
110
|
+
$[10] = t3;
|
|
111
|
+
$[11] = variant;
|
|
112
|
+
$[12] = t4;
|
|
113
|
+
} else {
|
|
114
|
+
t4 = $[12];
|
|
115
|
+
}
|
|
116
|
+
return t4;
|
|
26
117
|
}
|
|
27
|
-
function BubbleContent(
|
|
28
|
-
|
|
29
|
-
|
|
118
|
+
function BubbleContent(t0) {
|
|
119
|
+
const $ = _c(10);
|
|
120
|
+
let className;
|
|
121
|
+
let props;
|
|
122
|
+
let t1;
|
|
123
|
+
if ($[0] !== t0) {
|
|
124
|
+
({
|
|
125
|
+
asChild: t1,
|
|
126
|
+
className,
|
|
127
|
+
...props
|
|
128
|
+
} = t0);
|
|
129
|
+
$[0] = t0;
|
|
130
|
+
$[1] = className;
|
|
131
|
+
$[2] = props;
|
|
132
|
+
$[3] = t1;
|
|
133
|
+
} else {
|
|
134
|
+
className = $[1];
|
|
135
|
+
props = $[2];
|
|
136
|
+
t1 = $[3];
|
|
137
|
+
}
|
|
138
|
+
const asChild = t1 === undefined ? false : t1;
|
|
139
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
140
|
+
let t2;
|
|
141
|
+
if ($[4] !== className) {
|
|
142
|
+
t2 = 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);
|
|
143
|
+
$[4] = className;
|
|
144
|
+
$[5] = t2;
|
|
145
|
+
} else {
|
|
146
|
+
t2 = $[5];
|
|
147
|
+
}
|
|
148
|
+
let t3;
|
|
149
|
+
if ($[6] !== Comp || $[7] !== props || $[8] !== t2) {
|
|
150
|
+
t3 = /*#__PURE__*/_jsx(Comp, {
|
|
151
|
+
"data-slot": "bubble-content",
|
|
152
|
+
className: t2,
|
|
153
|
+
...props
|
|
154
|
+
});
|
|
155
|
+
$[6] = Comp;
|
|
156
|
+
$[7] = props;
|
|
157
|
+
$[8] = t2;
|
|
158
|
+
$[9] = t3;
|
|
159
|
+
} else {
|
|
160
|
+
t3 = $[9];
|
|
161
|
+
}
|
|
162
|
+
return t3;
|
|
30
163
|
}
|
|
31
164
|
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",
|
|
165
|
+
variants: {
|
|
166
|
+
side: {
|
|
167
|
+
top: "top-0 -translate-y-3/4",
|
|
168
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
45
169
|
},
|
|
170
|
+
align: {
|
|
171
|
+
start: "left-3",
|
|
172
|
+
end: "right-3"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
defaultVariants: {
|
|
176
|
+
side: "bottom",
|
|
177
|
+
align: "end"
|
|
178
|
+
}
|
|
46
179
|
});
|
|
47
|
-
function BubbleReactions(
|
|
48
|
-
|
|
180
|
+
function BubbleReactions(t0) {
|
|
181
|
+
const $ = _c(14);
|
|
182
|
+
let className;
|
|
183
|
+
let props;
|
|
184
|
+
let t1;
|
|
185
|
+
let t2;
|
|
186
|
+
if ($[0] !== t0) {
|
|
187
|
+
({
|
|
188
|
+
side: t1,
|
|
189
|
+
align: t2,
|
|
190
|
+
className,
|
|
191
|
+
...props
|
|
192
|
+
} = t0);
|
|
193
|
+
$[0] = t0;
|
|
194
|
+
$[1] = className;
|
|
195
|
+
$[2] = props;
|
|
196
|
+
$[3] = t1;
|
|
197
|
+
$[4] = t2;
|
|
198
|
+
} else {
|
|
199
|
+
className = $[1];
|
|
200
|
+
props = $[2];
|
|
201
|
+
t1 = $[3];
|
|
202
|
+
t2 = $[4];
|
|
203
|
+
}
|
|
204
|
+
const side = t1 === undefined ? "bottom" : t1;
|
|
205
|
+
const align = t2 === undefined ? "end" : t2;
|
|
206
|
+
let t3;
|
|
207
|
+
if ($[5] !== align || $[6] !== className || $[7] !== side) {
|
|
208
|
+
t3 = cn(bubbleReactionsVariants({
|
|
209
|
+
side,
|
|
210
|
+
align
|
|
211
|
+
}), className);
|
|
212
|
+
$[5] = align;
|
|
213
|
+
$[6] = className;
|
|
214
|
+
$[7] = side;
|
|
215
|
+
$[8] = t3;
|
|
216
|
+
} else {
|
|
217
|
+
t3 = $[8];
|
|
218
|
+
}
|
|
219
|
+
let t4;
|
|
220
|
+
if ($[9] !== align || $[10] !== props || $[11] !== side || $[12] !== t3) {
|
|
221
|
+
t4 = /*#__PURE__*/_jsx("div", {
|
|
222
|
+
"data-slot": "bubble-reactions",
|
|
223
|
+
"data-align": align,
|
|
224
|
+
"data-side": side,
|
|
225
|
+
className: t3,
|
|
226
|
+
...props
|
|
227
|
+
});
|
|
228
|
+
$[9] = align;
|
|
229
|
+
$[10] = props;
|
|
230
|
+
$[11] = side;
|
|
231
|
+
$[12] = t3;
|
|
232
|
+
$[13] = t4;
|
|
233
|
+
} else {
|
|
234
|
+
t4 = $[13];
|
|
235
|
+
}
|
|
236
|
+
return t4;
|
|
49
237
|
}
|
|
50
238
|
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
@@ -1,24 +1,152 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import * as Slot from "radix-ui/slot";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
7
|
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
|
-
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "",
|
|
11
|
+
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",
|
|
12
|
+
border: "border-b border-border pb-2"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
13
15
|
});
|
|
14
|
-
function Marker(
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
function Marker(t0) {
|
|
17
|
+
const $ = _c(13);
|
|
18
|
+
let className;
|
|
19
|
+
let props;
|
|
20
|
+
let t1;
|
|
21
|
+
let t2;
|
|
22
|
+
if ($[0] !== t0) {
|
|
23
|
+
({
|
|
24
|
+
className,
|
|
25
|
+
variant: t1,
|
|
26
|
+
asChild: t2,
|
|
27
|
+
...props
|
|
28
|
+
} = t0);
|
|
29
|
+
$[0] = t0;
|
|
30
|
+
$[1] = className;
|
|
31
|
+
$[2] = props;
|
|
32
|
+
$[3] = t1;
|
|
33
|
+
$[4] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
className = $[1];
|
|
36
|
+
props = $[2];
|
|
37
|
+
t1 = $[3];
|
|
38
|
+
t2 = $[4];
|
|
39
|
+
}
|
|
40
|
+
const variant = t1 === undefined ? "default" : t1;
|
|
41
|
+
const asChild = t2 === undefined ? false : t2;
|
|
42
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[5] !== className || $[6] !== variant) {
|
|
45
|
+
t3 = cn(markerVariants({
|
|
46
|
+
variant,
|
|
47
|
+
className
|
|
48
|
+
}));
|
|
49
|
+
$[5] = className;
|
|
50
|
+
$[6] = variant;
|
|
51
|
+
$[7] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[7];
|
|
54
|
+
}
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[8] !== Comp || $[9] !== props || $[10] !== t3 || $[11] !== variant) {
|
|
57
|
+
t4 = /*#__PURE__*/_jsx(Comp, {
|
|
58
|
+
"data-slot": "marker",
|
|
59
|
+
"data-variant": variant,
|
|
60
|
+
className: t3,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
$[8] = Comp;
|
|
64
|
+
$[9] = props;
|
|
65
|
+
$[10] = t3;
|
|
66
|
+
$[11] = variant;
|
|
67
|
+
$[12] = t4;
|
|
68
|
+
} else {
|
|
69
|
+
t4 = $[12];
|
|
70
|
+
}
|
|
71
|
+
return t4;
|
|
17
72
|
}
|
|
18
|
-
function MarkerIcon(
|
|
19
|
-
|
|
73
|
+
function MarkerIcon(t0) {
|
|
74
|
+
const $ = _c(8);
|
|
75
|
+
let className;
|
|
76
|
+
let props;
|
|
77
|
+
if ($[0] !== t0) {
|
|
78
|
+
({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
} = t0);
|
|
82
|
+
$[0] = t0;
|
|
83
|
+
$[1] = className;
|
|
84
|
+
$[2] = props;
|
|
85
|
+
} else {
|
|
86
|
+
className = $[1];
|
|
87
|
+
props = $[2];
|
|
88
|
+
}
|
|
89
|
+
let t1;
|
|
90
|
+
if ($[3] !== className) {
|
|
91
|
+
t1 = cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
|
|
92
|
+
$[3] = className;
|
|
93
|
+
$[4] = t1;
|
|
94
|
+
} else {
|
|
95
|
+
t1 = $[4];
|
|
96
|
+
}
|
|
97
|
+
let t2;
|
|
98
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
99
|
+
t2 = /*#__PURE__*/_jsx("span", {
|
|
100
|
+
"data-slot": "marker-icon",
|
|
101
|
+
"aria-hidden": "true",
|
|
102
|
+
className: t1,
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
$[5] = props;
|
|
106
|
+
$[6] = t1;
|
|
107
|
+
$[7] = t2;
|
|
108
|
+
} else {
|
|
109
|
+
t2 = $[7];
|
|
110
|
+
}
|
|
111
|
+
return t2;
|
|
20
112
|
}
|
|
21
|
-
function MarkerContent(
|
|
22
|
-
|
|
113
|
+
function MarkerContent(t0) {
|
|
114
|
+
const $ = _c(8);
|
|
115
|
+
let className;
|
|
116
|
+
let props;
|
|
117
|
+
if ($[0] !== t0) {
|
|
118
|
+
({
|
|
119
|
+
className,
|
|
120
|
+
...props
|
|
121
|
+
} = t0);
|
|
122
|
+
$[0] = t0;
|
|
123
|
+
$[1] = className;
|
|
124
|
+
$[2] = props;
|
|
125
|
+
} else {
|
|
126
|
+
className = $[1];
|
|
127
|
+
props = $[2];
|
|
128
|
+
}
|
|
129
|
+
let t1;
|
|
130
|
+
if ($[3] !== className) {
|
|
131
|
+
t1 = 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);
|
|
132
|
+
$[3] = className;
|
|
133
|
+
$[4] = t1;
|
|
134
|
+
} else {
|
|
135
|
+
t1 = $[4];
|
|
136
|
+
}
|
|
137
|
+
let t2;
|
|
138
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
139
|
+
t2 = /*#__PURE__*/_jsx("span", {
|
|
140
|
+
"data-slot": "marker-content",
|
|
141
|
+
className: t1,
|
|
142
|
+
...props
|
|
143
|
+
});
|
|
144
|
+
$[5] = props;
|
|
145
|
+
$[6] = t1;
|
|
146
|
+
$[7] = t2;
|
|
147
|
+
} else {
|
|
148
|
+
t2 = $[7];
|
|
149
|
+
}
|
|
150
|
+
return t2;
|
|
23
151
|
}
|
|
24
152
|
export { Marker, MarkerContent, MarkerIcon, markerVariants };
|