@epicbagel/saas-kit 1.25.1 → 1.27.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.
@@ -15,32 +15,36 @@ import {
15
15
  Suggestion,
16
16
  Suggestions
17
17
  } from "../chunk-IJG2B3Y2.js";
18
+ import {
19
+ Spinner
20
+ } from "../chunk-QZBPZLAB.js";
21
+ import {
22
+ PersonAvatar
23
+ } from "../chunk-NXFZULS3.js";
18
24
  import {
19
25
  Marker,
20
26
  MarkerContent
21
27
  } from "../chunk-IW4ZIXXG.js";
22
- import {
23
- MessageScroller,
24
- MessageScrollerButton,
25
- MessageScrollerContent,
26
- MessageScrollerItem,
27
- MessageScrollerProvider,
28
- MessageScrollerViewport
29
- } from "../chunk-OUZSIA5G.js";
30
- import "../chunk-36LNA4WM.js";
31
28
  import {
32
29
  Message,
33
30
  MessageAction,
34
31
  MessageActions,
35
32
  MessageContent
36
33
  } from "../chunk-H4XH2PPU.js";
37
- import "../chunk-GA5SX7FE.js";
38
34
  import {
39
35
  InputGroup,
40
36
  InputGroupAddon,
41
37
  InputGroupTextarea
42
38
  } from "../chunk-QTPPNK6F.js";
43
39
  import "../chunk-6FC65AZQ.js";
40
+ import {
41
+ Item,
42
+ ItemContent,
43
+ ItemDescription,
44
+ ItemMedia,
45
+ ItemTitle
46
+ } from "../chunk-SG4ZE2EN.js";
47
+ import "../chunk-HYTILYE5.js";
44
48
  import {
45
49
  FileDropArea,
46
50
  FileDropzone
@@ -63,6 +67,19 @@ import {
63
67
  DropdownMenuItem,
64
68
  DropdownMenuTrigger
65
69
  } from "../chunk-V4LE2HWP.js";
70
+ import {
71
+ ChatTurnNavigator
72
+ } from "../chunk-HO6DRDGD.js";
73
+ import {
74
+ MessageScroller,
75
+ MessageScrollerButton,
76
+ MessageScrollerContent,
77
+ MessageScrollerItem,
78
+ MessageScrollerProvider,
79
+ MessageScrollerViewport
80
+ } from "../chunk-OUZSIA5G.js";
81
+ import "../chunk-36LNA4WM.js";
82
+ import "../chunk-GA5SX7FE.js";
66
83
  import "../chunk-ZRLUUZHK.js";
67
84
  import {
68
85
  Bubble,
@@ -108,6 +125,7 @@ import {
108
125
  // src/primitives/chat.tsx
109
126
  import {
110
127
  forwardRef,
128
+ isValidElement,
111
129
  useCallback,
112
130
  useEffect,
113
131
  useId,
@@ -162,6 +180,24 @@ function timelineMarkers(messages, now) {
162
180
  function TimelineMarker({ label }) {
163
181
  return /* @__PURE__ */ jsx(Marker, { variant: "separator", role: "separator", "aria-label": label, children: /* @__PURE__ */ jsx(MarkerContent, { children: label }) });
164
182
  }
183
+ function authorLines(messages, markers) {
184
+ let previous = null;
185
+ return messages.map((message, index) => {
186
+ if (message.status === "running") return false;
187
+ const shown = Boolean(message.author) && (!previous || Boolean(markers[index]) || previous.role !== message.role || previous.author?.id !== message.author.id);
188
+ previous = message;
189
+ return shown;
190
+ });
191
+ }
192
+ function ChatAuthorLine({ author, align }) {
193
+ const avatar = /* @__PURE__ */ jsx(PersonAvatar, { name: author.name, photoUrl: author.avatarUrl, size: 20, fallbackClassName: "text-[9px]" });
194
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "chat-author", className: cn("flex items-center gap-2 text-xs", align === "end" ? "self-end" : "self-start"), children: [
195
+ align === "start" ? avatar : null,
196
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: author.name }),
197
+ author.detail ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: author.detail }) : null,
198
+ align === "end" ? avatar : null
199
+ ] });
200
+ }
165
201
  function ChatRunningLine({
166
202
  label,
167
203
  align = "start",
@@ -183,9 +219,13 @@ var ChatThread = forwardRef(
183
219
  onOpenAttachment,
184
220
  attachmentAction = "open",
185
221
  messageActions,
222
+ navigator,
223
+ navigatorLabel,
224
+ navigatorSide,
186
225
  className
187
226
  }, ref) {
188
227
  const markers = timelineMarkers(messages, /* @__PURE__ */ new Date());
228
+ const authorShown = authorLines(messages, markers);
189
229
  const anchorId = useArrivingUserTurnId(messages);
190
230
  const workspace = appearance === "workspace";
191
231
  return /* @__PURE__ */ jsx(MessageScrollerProvider, { autoScroll: true, children: /* @__PURE__ */ jsxs(
@@ -226,6 +266,7 @@ var ChatThread = forwardRef(
226
266
  children: [
227
267
  marker ? /* @__PURE__ */ jsx(TimelineMarker, { label: marker }) : null,
228
268
  /* @__PURE__ */ jsx(Message, { align: isUser ? "end" : "start", children: /* @__PURE__ */ jsxs(MessageContent, { children: [
269
+ m.author && authorShown[index] ? /* @__PURE__ */ jsx(ChatAuthorLine, { author: m.author, align: isUser ? "end" : "start" }) : null,
229
270
  (m.content || m.text) && /* @__PURE__ */ jsx(
230
271
  Bubble,
231
272
  {
@@ -285,7 +326,17 @@ var ChatThread = forwardRef(
285
326
  /* @__PURE__ */ jsxs(MessageScrollerButton, { variant: "outline", className: "rounded-full shadow-sm", children: [
286
327
  /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" }),
287
328
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: scrollButtonLabel })
288
- ] })
329
+ ] }),
330
+ navigator && navigator.length > 0 ? /* @__PURE__ */ jsx(
331
+ ChatTurnNavigator,
332
+ {
333
+ items: navigator,
334
+ order: messages.map((m) => m.id),
335
+ label: navigatorLabel,
336
+ side: navigatorSide,
337
+ columnWidth: workspace ? 768 : void 0
338
+ }
339
+ ) : null
289
340
  ]
290
341
  }
291
342
  ) });
@@ -719,6 +770,92 @@ function ChatSuggestions({
719
770
  )
720
771
  ] });
721
772
  }
773
+ var DEFAULT_EMPTY_ACTIONS_LABEL = "Pick up where you left off";
774
+ function ChatEmptyActionIcon({ icon }) {
775
+ if (!icon) return null;
776
+ if (isValidElement(icon)) return icon;
777
+ if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
778
+ const IconComp = icon;
779
+ return /* @__PURE__ */ jsx(IconComp, { "aria-hidden": true });
780
+ }
781
+ return /* @__PURE__ */ jsx(Fragment, { children: icon });
782
+ }
783
+ function ChatEmptyActions({
784
+ items,
785
+ label,
786
+ onError,
787
+ className
788
+ }) {
789
+ const labelId = useId();
790
+ const [running, setRunning] = useState(null);
791
+ if (items.length === 0) return null;
792
+ const showLabel = label.length > 0;
793
+ const pick = async (item) => {
794
+ if (running !== null) return;
795
+ let result;
796
+ try {
797
+ result = item.onSelect();
798
+ } catch (cause) {
799
+ onError(cause);
800
+ return;
801
+ }
802
+ if (!result || typeof result.then !== "function") return;
803
+ setRunning(item.id);
804
+ try {
805
+ await result;
806
+ } catch (cause) {
807
+ onError(cause);
808
+ } finally {
809
+ setRunning(null);
810
+ }
811
+ };
812
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "chat-empty-actions", className: cn("w-full text-left", className), children: [
813
+ showLabel && /* @__PURE__ */ jsx("p", { id: labelId, "data-slot": "chat-empty-actions-label", className: "mb-1.5 px-3 text-xs text-muted-foreground", children: label }),
814
+ /* @__PURE__ */ jsx(
815
+ "div",
816
+ {
817
+ role: "group",
818
+ "aria-labelledby": showLabel ? labelId : void 0,
819
+ "aria-label": showLabel ? void 0 : DEFAULT_EMPTY_ACTIONS_LABEL,
820
+ className: "flex flex-col gap-0.5",
821
+ children: items.map((item) => {
822
+ const busy = running === item.id;
823
+ return /* @__PURE__ */ jsx(Item, { asChild: true, size: "sm", children: /* @__PURE__ */ jsxs(
824
+ "button",
825
+ {
826
+ type: "button",
827
+ "data-slot": "chat-empty-action",
828
+ "data-state": busy ? "loading" : void 0,
829
+ "aria-busy": busy || void 0,
830
+ disabled: item.disabled || running !== null,
831
+ onClick: () => void pick(item),
832
+ className: cn(
833
+ "min-h-11 cursor-pointer flex-nowrap text-left",
834
+ "hover:bg-muted focus-visible:bg-muted",
835
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent",
836
+ busy && "disabled:opacity-100"
837
+ ),
838
+ children: [
839
+ /* @__PURE__ */ jsx(
840
+ ItemMedia,
841
+ {
842
+ variant: "icon",
843
+ className: "size-8 self-center rounded-md bg-muted text-muted-foreground group-has-data-[slot=item-description]/item:translate-y-0 group-has-data-[slot=item-description]/item:self-center",
844
+ children: busy ? /* @__PURE__ */ jsx(Spinner, { "aria-hidden": true }) : /* @__PURE__ */ jsx(ChatEmptyActionIcon, { icon: item.icon })
845
+ }
846
+ ),
847
+ /* @__PURE__ */ jsxs(ItemContent, { className: "min-w-0 flex-row flex-wrap items-baseline gap-x-2 gap-y-0.5 md:flex-nowrap", children: [
848
+ /* @__PURE__ */ jsx(ItemTitle, { className: "w-auto min-w-0 shrink-0 font-normal text-foreground md:max-w-[60%] md:truncate", children: item.label }),
849
+ item.detail && /* @__PURE__ */ jsx(ItemDescription, { className: "line-clamp-1 min-w-0 flex-1 truncate text-xs md:text-sm", children: item.detail })
850
+ ] })
851
+ ]
852
+ }
853
+ ) }, item.id);
854
+ })
855
+ }
856
+ )
857
+ ] });
858
+ }
722
859
  function MobileReplySuggestions({
723
860
  items,
724
861
  onSelect,
@@ -874,6 +1011,8 @@ var Chat = forwardRef(function Chat2({
874
1011
  emptySubtitle,
875
1012
  examplePrompts = [],
876
1013
  examplePromptsLabel = "Try",
1014
+ emptyActions = [],
1015
+ emptyActionsLabel = DEFAULT_EMPTY_ACTIONS_LABEL,
877
1016
  examplePromptsVariant = "chips",
878
1017
  examplePromptsLoading = false,
879
1018
  examplePromptsLoadingLabel = "Loading suggestions\u2026",
@@ -921,6 +1060,9 @@ var Chat = forwardRef(function Chat2({
921
1060
  onOpenAttachment,
922
1061
  attachmentAction,
923
1062
  messageActions,
1063
+ navigator,
1064
+ navigatorLabel,
1065
+ navigatorSide,
924
1066
  className
925
1067
  }, ref) {
926
1068
  const isMobile = useIsMobile();
@@ -1110,6 +1252,15 @@ var Chat = forwardRef(function Chat2({
1110
1252
  }
1111
1253
  ),
1112
1254
  error && /* @__PURE__ */ jsx(ChatError, { children: error }),
1255
+ !pending && emptyActions.length > 0 && /* @__PURE__ */ jsx(
1256
+ ChatEmptyActions,
1257
+ {
1258
+ items: emptyActions,
1259
+ label: emptyActionsLabel,
1260
+ onError: reportSendError,
1261
+ className: "mt-3"
1262
+ }
1263
+ ),
1113
1264
  !pending && examplePromptsLoading && /* @__PURE__ */ jsx(ExamplePromptsLoading, { label: examplePromptsLoadingLabel }),
1114
1265
  !pending && !examplePromptsLoading && examplePrompts.length > 0 && /* @__PURE__ */ jsx(
1115
1266
  ChatSuggestions,
@@ -1144,6 +1295,9 @@ var Chat = forwardRef(function Chat2({
1144
1295
  onOpenAttachment,
1145
1296
  attachmentAction,
1146
1297
  messageActions,
1298
+ navigator,
1299
+ navigatorLabel,
1300
+ navigatorSide,
1147
1301
  className: cn(
1148
1302
  "mb-3",
1149
1303
  application && "min-h-0 flex-1 px-4 py-4 md:px-0 md:py-0",
@@ -1225,5 +1379,6 @@ export {
1225
1379
  Chat,
1226
1380
  ChatCopyAction,
1227
1381
  ChatInput,
1228
- ChatThread
1382
+ ChatThread,
1383
+ authorLines
1229
1384
  };
@@ -1,197 +1,27 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunkNQK5ZWC7cjs = require('../chunk-NQK5ZWC7.cjs');
5
-
6
-
7
- var _chunkKWLSBTB2cjs = require('../chunk-KWLSBTB2.cjs');
8
-
9
- // src/primitives/item.tsx
10
- var _classvarianceauthority = require('class-variance-authority');
11
- var _radixui = require('radix-ui');
12
- var _jsxruntime = require('react/jsx-runtime');
13
- function ItemGroup({ className, ...props }) {
14
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15
- "div",
16
- {
17
- role: "list",
18
- "data-slot": "item-group",
19
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
20
- "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
21
- className
22
- ),
23
- ...props
24
- }
25
- );
26
- }
27
- function ItemSeparator({
28
- className,
29
- ...props
30
- }) {
31
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
32
- _chunkNQK5ZWC7cjs.Separator,
33
- {
34
- "data-slot": "item-separator",
35
- orientation: "horizontal",
36
- className: _chunkKWLSBTB2cjs.cn.call(void 0, "my-2", className),
37
- ...props
38
- }
39
- );
40
- }
41
- var itemVariants = _classvarianceauthority.cva.call(void 0,
42
- "group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
43
- {
44
- variants: {
45
- variant: {
46
- default: "border-transparent",
47
- outline: "border-border",
48
- muted: "border-transparent bg-muted/50"
49
- },
50
- size: {
51
- default: "gap-3.5 px-4 py-3.5",
52
- sm: "gap-2.5 px-3 py-2.5",
53
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
54
- }
55
- },
56
- defaultVariants: {
57
- variant: "default",
58
- size: "default"
59
- }
60
- }
61
- );
62
- function Item({
63
- className,
64
- variant = "default",
65
- size = "default",
66
- asChild = false,
67
- ...props
68
- }) {
69
- const Comp = asChild ? _radixui.Slot.Root : "div";
70
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
71
- Comp,
72
- {
73
- "data-slot": "item",
74
- "data-variant": variant,
75
- "data-size": size,
76
- className: _chunkKWLSBTB2cjs.cn.call(void 0, itemVariants({ variant, size, className })),
77
- ...props
78
- }
79
- );
80
- }
81
- var itemMediaVariants = _classvarianceauthority.cva.call(void 0,
82
- "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
83
- {
84
- variants: {
85
- variant: {
86
- default: "bg-transparent",
87
- icon: "[&_svg:not([class*='size-'])]:size-4",
88
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
89
- }
90
- },
91
- defaultVariants: {
92
- variant: "default"
93
- }
94
- }
95
- );
96
- function ItemMedia({
97
- className,
98
- variant = "default",
99
- ...props
100
- }) {
101
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
102
- "div",
103
- {
104
- "data-slot": "item-media",
105
- "data-variant": variant,
106
- className: _chunkKWLSBTB2cjs.cn.call(void 0, itemMediaVariants({ variant, className })),
107
- ...props
108
- }
109
- );
110
- }
111
- function ItemContent({ className, ...props }) {
112
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
113
- "div",
114
- {
115
- "data-slot": "item-content",
116
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
117
- "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
118
- className
119
- ),
120
- ...props
121
- }
122
- );
123
- }
124
- function ItemTitle({ className, ...props }) {
125
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
126
- "div",
127
- {
128
- "data-slot": "item-title",
129
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
130
- "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
131
- className
132
- ),
133
- ...props
134
- }
135
- );
136
- }
137
- function ItemDescription({ className, ...props }) {
138
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
139
- "p",
140
- {
141
- "data-slot": "item-description",
142
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
143
- "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
144
- className
145
- ),
146
- ...props
147
- }
148
- );
149
- }
150
- function ItemActions({ className, ...props }) {
151
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
152
- "div",
153
- {
154
- "data-slot": "item-actions",
155
- className: _chunkKWLSBTB2cjs.cn.call(void 0, "flex items-center gap-2", className),
156
- ...props
157
- }
158
- );
159
- }
160
- function ItemHeader({ className, ...props }) {
161
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
162
- "div",
163
- {
164
- "data-slot": "item-header",
165
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
166
- "flex basis-full items-center justify-between gap-2",
167
- className
168
- ),
169
- ...props
170
- }
171
- );
172
- }
173
- function ItemFooter({ className, ...props }) {
174
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
175
- "div",
176
- {
177
- "data-slot": "item-footer",
178
- className: _chunkKWLSBTB2cjs.cn.call(void 0,
179
- "flex basis-full items-center justify-between gap-2",
180
- className
181
- ),
182
- ...props
183
- }
184
- );
185
- }
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
- exports.Item = Item; exports.ItemActions = ItemActions; exports.ItemContent = ItemContent; exports.ItemDescription = ItemDescription; exports.ItemFooter = ItemFooter; exports.ItemGroup = ItemGroup; exports.ItemHeader = ItemHeader; exports.ItemMedia = ItemMedia; exports.ItemSeparator = ItemSeparator; exports.ItemTitle = ItemTitle;
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ var _chunkDHXKCMKYcjs = require('../chunk-DHXKCMKY.cjs');
14
+ require('../chunk-NQK5ZWC7.cjs');
15
+ require('../chunk-KWLSBTB2.cjs');
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+ exports.Item = _chunkDHXKCMKYcjs.Item; exports.ItemActions = _chunkDHXKCMKYcjs.ItemActions; exports.ItemContent = _chunkDHXKCMKYcjs.ItemContent; exports.ItemDescription = _chunkDHXKCMKYcjs.ItemDescription; exports.ItemFooter = _chunkDHXKCMKYcjs.ItemFooter; exports.ItemGroup = _chunkDHXKCMKYcjs.ItemGroup; exports.ItemHeader = _chunkDHXKCMKYcjs.ItemHeader; exports.ItemMedia = _chunkDHXKCMKYcjs.ItemMedia; exports.ItemSeparator = _chunkDHXKCMKYcjs.ItemSeparator; exports.ItemTitle = _chunkDHXKCMKYcjs.ItemTitle;
@@ -1,188 +1,18 @@
1
1
  "use client";
2
2
  import {
3
- Separator
4
- } from "../chunk-HYTILYE5.js";
5
- import {
6
- cn
7
- } from "../chunk-G6SRSWXB.js";
8
-
9
- // src/primitives/item.tsx
10
- import { cva } from "class-variance-authority";
11
- import { Slot } from "radix-ui";
12
- import { jsx } from "react/jsx-runtime";
13
- function ItemGroup({ className, ...props }) {
14
- return /* @__PURE__ */ jsx(
15
- "div",
16
- {
17
- role: "list",
18
- "data-slot": "item-group",
19
- className: cn(
20
- "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
21
- className
22
- ),
23
- ...props
24
- }
25
- );
26
- }
27
- function ItemSeparator({
28
- className,
29
- ...props
30
- }) {
31
- return /* @__PURE__ */ jsx(
32
- Separator,
33
- {
34
- "data-slot": "item-separator",
35
- orientation: "horizontal",
36
- className: cn("my-2", className),
37
- ...props
38
- }
39
- );
40
- }
41
- var itemVariants = cva(
42
- "group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
43
- {
44
- variants: {
45
- variant: {
46
- default: "border-transparent",
47
- outline: "border-border",
48
- muted: "border-transparent bg-muted/50"
49
- },
50
- size: {
51
- default: "gap-3.5 px-4 py-3.5",
52
- sm: "gap-2.5 px-3 py-2.5",
53
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
54
- }
55
- },
56
- defaultVariants: {
57
- variant: "default",
58
- size: "default"
59
- }
60
- }
61
- );
62
- function Item({
63
- className,
64
- variant = "default",
65
- size = "default",
66
- asChild = false,
67
- ...props
68
- }) {
69
- const Comp = asChild ? Slot.Root : "div";
70
- return /* @__PURE__ */ jsx(
71
- Comp,
72
- {
73
- "data-slot": "item",
74
- "data-variant": variant,
75
- "data-size": size,
76
- className: cn(itemVariants({ variant, size, className })),
77
- ...props
78
- }
79
- );
80
- }
81
- var itemMediaVariants = cva(
82
- "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
83
- {
84
- variants: {
85
- variant: {
86
- default: "bg-transparent",
87
- icon: "[&_svg:not([class*='size-'])]:size-4",
88
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
89
- }
90
- },
91
- defaultVariants: {
92
- variant: "default"
93
- }
94
- }
95
- );
96
- function ItemMedia({
97
- className,
98
- variant = "default",
99
- ...props
100
- }) {
101
- return /* @__PURE__ */ jsx(
102
- "div",
103
- {
104
- "data-slot": "item-media",
105
- "data-variant": variant,
106
- className: cn(itemMediaVariants({ variant, className })),
107
- ...props
108
- }
109
- );
110
- }
111
- function ItemContent({ className, ...props }) {
112
- return /* @__PURE__ */ jsx(
113
- "div",
114
- {
115
- "data-slot": "item-content",
116
- className: cn(
117
- "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
118
- className
119
- ),
120
- ...props
121
- }
122
- );
123
- }
124
- function ItemTitle({ className, ...props }) {
125
- return /* @__PURE__ */ jsx(
126
- "div",
127
- {
128
- "data-slot": "item-title",
129
- className: cn(
130
- "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
131
- className
132
- ),
133
- ...props
134
- }
135
- );
136
- }
137
- function ItemDescription({ className, ...props }) {
138
- return /* @__PURE__ */ jsx(
139
- "p",
140
- {
141
- "data-slot": "item-description",
142
- className: cn(
143
- "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
144
- className
145
- ),
146
- ...props
147
- }
148
- );
149
- }
150
- function ItemActions({ className, ...props }) {
151
- return /* @__PURE__ */ jsx(
152
- "div",
153
- {
154
- "data-slot": "item-actions",
155
- className: cn("flex items-center gap-2", className),
156
- ...props
157
- }
158
- );
159
- }
160
- function ItemHeader({ className, ...props }) {
161
- return /* @__PURE__ */ jsx(
162
- "div",
163
- {
164
- "data-slot": "item-header",
165
- className: cn(
166
- "flex basis-full items-center justify-between gap-2",
167
- className
168
- ),
169
- ...props
170
- }
171
- );
172
- }
173
- function ItemFooter({ className, ...props }) {
174
- return /* @__PURE__ */ jsx(
175
- "div",
176
- {
177
- "data-slot": "item-footer",
178
- className: cn(
179
- "flex basis-full items-center justify-between gap-2",
180
- className
181
- ),
182
- ...props
183
- }
184
- );
185
- }
3
+ Item,
4
+ ItemActions,
5
+ ItemContent,
6
+ ItemDescription,
7
+ ItemFooter,
8
+ ItemGroup,
9
+ ItemHeader,
10
+ ItemMedia,
11
+ ItemSeparator,
12
+ ItemTitle
13
+ } from "../chunk-SG4ZE2EN.js";
14
+ import "../chunk-HYTILYE5.js";
15
+ import "../chunk-G6SRSWXB.js";
186
16
  export {
187
17
  Item,
188
18
  ItemActions,