@expcat/tigercat-react 1.2.23 → 1.2.30

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.
Files changed (51) hide show
  1. package/dist/{chunk-7YUD6VIC.js → chunk-4LBTPCGE.js} +47 -16
  2. package/dist/{chunk-MMGZEG7G.mjs → chunk-56DP32W7.mjs} +93 -45
  3. package/dist/{chunk-36WZNVQ5.mjs → chunk-5XE5VBDS.mjs} +2 -3
  4. package/dist/{chunk-2DH6MGC6.js → chunk-7KPALCG3.js} +11 -7
  5. package/dist/{chunk-LKKZLYCA.mjs → chunk-CPNDCACQ.mjs} +1 -1
  6. package/dist/{chunk-T7ACOL7K.mjs → chunk-E43YLPOJ.mjs} +64 -15
  7. package/dist/{chunk-XHT2VIDR.js → chunk-FXVKJWUP.js} +19 -9
  8. package/dist/{chunk-RUZQN7X3.js → chunk-FZIF5LZW.js} +52 -25
  9. package/dist/{chunk-X37Q7VME.mjs → chunk-GYFR2O27.mjs} +11 -7
  10. package/dist/chunk-I5YYA7FB.mjs +244 -0
  11. package/dist/{chunk-3FEFHD3E.mjs → chunk-IUOTJ73N.mjs} +1 -0
  12. package/dist/{chunk-EX63M5ID.js → chunk-JCINYGGM.js} +93 -45
  13. package/dist/{chunk-CSH2QOOH.js → chunk-K5B4XXAI.js} +2 -2
  14. package/dist/{chunk-UE52NMPO.js → chunk-KTV3ZDSQ.js} +1 -0
  15. package/dist/{chunk-5EZWYEGJ.js → chunk-KYOO6JCF.js} +67 -18
  16. package/dist/{chunk-XPA2YCQO.js → chunk-M7HBWFQO.js} +1 -2
  17. package/dist/{chunk-6CAKUMWV.mjs → chunk-OXPKFDG6.mjs} +46 -15
  18. package/dist/{chunk-DTYDPMNR.js → chunk-P4INKEQ3.js} +76 -9
  19. package/dist/{chunk-5XS6PXBX.mjs → chunk-PKWHSCFK.mjs} +52 -25
  20. package/dist/{chunk-J5R4Q2QM.mjs → chunk-UQOMRXTD.mjs} +74 -7
  21. package/dist/chunk-UVWLYRAC.js +244 -0
  22. package/dist/{chunk-ZB55SAGI.mjs → chunk-WWDCH2XX.mjs} +19 -9
  23. package/dist/components/ActivityFeed.js +2 -2
  24. package/dist/components/ActivityFeed.mjs +1 -1
  25. package/dist/components/ChatWindow.js +3 -2
  26. package/dist/components/ChatWindow.mjs +2 -1
  27. package/dist/components/CommentThread.js +2 -2
  28. package/dist/components/CommentThread.mjs +1 -1
  29. package/dist/components/CropUpload.js +2 -2
  30. package/dist/components/CropUpload.mjs +1 -1
  31. package/dist/components/DataTableWithToolbar.js +4 -3
  32. package/dist/components/DataTableWithToolbar.mjs +3 -2
  33. package/dist/components/FormWizard.js +3 -3
  34. package/dist/components/FormWizard.mjs +2 -2
  35. package/dist/components/Kanban.js +3 -3
  36. package/dist/components/Kanban.mjs +2 -2
  37. package/dist/components/NotificationCenter.js +2 -2
  38. package/dist/components/NotificationCenter.mjs +1 -1
  39. package/dist/components/Steps.js +2 -2
  40. package/dist/components/Steps.mjs +1 -1
  41. package/dist/components/StepsItem.js +2 -2
  42. package/dist/components/StepsItem.mjs +1 -1
  43. package/dist/components/Table.js +3 -2
  44. package/dist/components/Table.mjs +2 -1
  45. package/dist/components/TaskBoard.js +2 -2
  46. package/dist/components/TaskBoard.mjs +1 -1
  47. package/dist/index.js +15 -15
  48. package/dist/index.mjs +14 -14
  49. package/package.json +2 -2
  50. package/dist/chunk-DXMSDLVJ.js +0 -168
  51. package/dist/chunk-GBJILZTY.mjs +0 -168
@@ -201,22 +201,29 @@ var NotificationCenter = ({
201
201
  "div",
202
202
  {
203
203
  className: _tigercatcore.classNames.call(void 0,
204
- "flex items-start gap-3 w-full py-0.5 transition-colors",
205
- !isRead && "border-l-2 border-l-[var(--tiger-primary,#2563eb)] -ml-[2px] pl-[calc(0.75rem-2px)]"
204
+ "group relative flex items-start gap-3.5 w-full p-3.5 rounded-xl transition-all duration-300 hover:bg-gray-50/60 dark:hover:bg-gray-800/30",
205
+ !isRead ? "bg-blue-50/20 dark:bg-blue-950/5 hover:bg-blue-50/40 dark:hover:bg-blue-950/10 border-l-[3px] border-l-blue-500/80 -ml-[3px] pl-[calc(0.875rem-3px)]" : "border-l-[3px] border-l-transparent -ml-[3px] pl-[calc(0.875rem-3px)]"
206
206
  ),
207
207
  children: [
208
208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
209
209
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-baseline justify-between gap-2", children: [
210
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "sm", weight: isRead ? "normal" : "semibold", children: item.title }),
211
- timeText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs text-[var(--tiger-text-muted,#6b7280)] whitespace-nowrap flex-shrink-0", children: timeText }) : null
210
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1.5", children: [
211
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "sm", weight: isRead ? "normal" : "semibold", className: isRead ? "text-gray-600 dark:text-gray-400" : "text-gray-900 dark:text-gray-100", children: item.title }),
212
+ !isRead && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500 dark:bg-blue-400 shrink-0 shadow-sm shadow-blue-500/40 animate-pulse" })
213
+ ] }),
214
+ timeText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[11px] text-gray-400 dark:text-gray-500 font-medium whitespace-nowrap flex-shrink-0 self-center", children: timeText }) : null
212
215
  ] }),
213
- item.description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-0.5 text-xs text-[var(--tiger-text-muted,#6b7280)] line-clamp-2 leading-relaxed", children: item.description }) : null
216
+ item.description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0,
217
+ "mt-1 text-xs leading-relaxed line-clamp-2",
218
+ isRead ? "text-gray-500 dark:text-gray-400" : "text-gray-600 dark:text-gray-300"
219
+ ), children: item.description }) : null
214
220
  ] }),
215
221
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
216
222
  _chunk56ZV3VVYjs.Button,
217
223
  {
218
224
  size: "sm",
219
225
  variant: "ghost",
226
+ className: "opacity-0 group-hover:opacity-100 focus:opacity-100 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-all duration-200 bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 border-0 flex-shrink-0 self-center",
220
227
  onClick: (event) => {
221
228
  event.stopPropagation();
222
229
  if (manageReadState) {
@@ -235,19 +242,27 @@ var NotificationCenter = ({
235
242
  }
236
243
  );
237
244
  };
238
- const renderList = (listItems) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
239
- _chunkWG3YS2QVjs.List,
240
- {
241
- dataSource: listItems,
242
- split: true,
243
- bordered: "divided",
244
- hoverable: true,
245
- emptyText,
246
- onItemClick: (item, index) => _optionalChain([onItemClick, 'optionalCall', _7 => _7(item, index)]),
247
- renderItem
245
+ const renderList = (listItems) => {
246
+ if (listItems.length === 0) {
247
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-14 px-4 text-center", children: [
248
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-gray-400 dark:text-gray-600 animate-pulse", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" }) }) }),
249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "sm", color: "muted", className: "font-semibold text-gray-400 dark:text-gray-500", children: emptyText })
250
+ ] });
248
251
  }
249
- );
250
- const content = loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3MRP3XYIjs.Loading, { text: loadingText }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.Tabs, { type: "line", size: "small", activeKey: currentGroupKey, onChange: handleGroupChange, children: groupTabData.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.TabPane, { tabKey: tab.key, label: tab.label, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-[380px] overflow-y-auto", children: renderList(tab.filteredItems) }) }, String(tab.key))) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto", children: renderList(filteredFlatItems) });
252
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
253
+ _chunkWG3YS2QVjs.List,
254
+ {
255
+ dataSource: listItems,
256
+ split: true,
257
+ bordered: "divided",
258
+ hoverable: true,
259
+ emptyText,
260
+ onItemClick: (item, index) => _optionalChain([onItemClick, 'optionalCall', _7 => _7(item, index)]),
261
+ renderItem
262
+ }
263
+ );
264
+ };
265
+ const content = loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3MRP3XYIjs.Loading, { text: loadingText, className: "text-blue-500 dark:text-blue-400 font-medium" }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.Tabs, { type: "line", size: "small", activeKey: currentGroupKey, onChange: handleGroupChange, children: groupTabData.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.TabPane, { tabKey: tab.key, label: tab.label, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-[380px] overflow-y-auto", children: renderList(tab.filteredItems) }) }, String(tab.key))) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto", children: renderList(filteredFlatItems) });
251
266
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
252
267
  "div",
253
268
  {
@@ -260,22 +275,34 @@ var NotificationCenter = ({
260
275
  _chunkUIO6O4MIjs.Card,
261
276
  {
262
277
  variant: "bordered",
263
- className: "w-full",
278
+ className: "w-full rounded-2xl border border-gray-100/80 dark:border-gray-800/80 bg-white/95 dark:bg-gray-950/90 backdrop-blur-md shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.2)] transition-all duration-300 overflow-hidden",
264
279
  header: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
265
280
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
266
281
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2.5", children: [
267
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "base", weight: "bold", children: title }),
268
- totalUnread > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold rounded-full bg-[var(--tiger-primary,#2563eb)] text-white", children: totalUnread }) : null
282
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "base", weight: "bold", className: "text-gray-900 dark:text-gray-100", children: title }),
283
+ totalUnread > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-[11px] font-bold rounded-full bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-sm shadow-blue-500/20 animate-pulse", children: totalUnread }) : null
269
284
  ] }),
270
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { size: "sm", variant: "ghost", disabled: !hasUnread, onClick: handleMarkAllRead, children: markAllReadText })
285
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
286
+ _chunk56ZV3VVYjs.Button,
287
+ {
288
+ size: "sm",
289
+ variant: "ghost",
290
+ disabled: !hasUnread,
291
+ onClick: handleMarkAllRead,
292
+ className: _tigercatcore.classNames.call(void 0,
293
+ "text-xs font-semibold transition-colors duration-200",
294
+ hasUnread ? "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300" : "text-gray-400 dark:text-gray-600"
295
+ ),
296
+ children: markAllReadText
297
+ }
298
+ )
271
299
  ] }),
272
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "inline-flex rounded-[var(--tiger-radius-sm,0.375rem)] border border-[var(--tiger-border,#e5e7eb)] overflow-hidden self-start", children: filterButtons.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
300
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "inline-flex items-center gap-0.5 p-0.5 rounded-lg bg-gray-100/80 dark:bg-gray-800/60 self-start", children: filterButtons.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
273
301
  "button",
274
302
  {
275
303
  className: _tigercatcore.classNames.call(void 0,
276
- "px-3 py-1 text-xs font-medium transition-colors",
277
- "border-r border-[var(--tiger-border,#e5e7eb)] last:border-r-0",
278
- currentReadFilter === option.key ? "bg-[var(--tiger-primary,#2563eb)] text-white" : "bg-[var(--tiger-surface,#ffffff)] text-[var(--tiger-text-muted,#6b7280)] hover:bg-[var(--tiger-surface-muted,#f9fafb)]"
304
+ "px-3.5 py-1 text-xs font-semibold rounded-md transition-all duration-200",
305
+ currentReadFilter === option.key ? "bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm scale-102" : "text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white"
279
306
  ),
280
307
  onClick: () => handleReadFilterChange(option.key),
281
308
  children: option.label
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  VirtualList
3
3
  } from "./chunk-7DUHHRAU.mjs";
4
+ import {
5
+ Empty
6
+ } from "./chunk-WIWTY74F.mjs";
4
7
  import {
5
8
  Input
6
9
  } from "./chunk-WNLUUD5N.mjs";
@@ -64,7 +67,7 @@ var ChatWindow = ({
64
67
  const inputValue = value !== void 0 ? value : innerValue;
65
68
  const wrapperClasses = useMemo(
66
69
  () => classNames(
67
- "tiger-chat-window flex flex-col w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)]",
70
+ "tiger-chat-window flex flex-col w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm overflow-hidden transition-all duration-300",
68
71
  className
69
72
  ),
70
73
  [className]
@@ -144,8 +147,8 @@ var ChatWindow = ({
144
147
  "div",
145
148
  {
146
149
  className: classNames(
147
- "rounded-[var(--tiger-radius-md,0.5rem)] px-3 py-2 text-sm break-words",
148
- isSelf ? "bg-[var(--tiger-primary,#2563eb)] text-white rounded-tr-none" : "bg-[var(--tiger-surface-muted,#f3f4f6)] text-[var(--tiger-text,#111827)] rounded-tl-none"
150
+ "rounded-[var(--tiger-radius-lg,0.75rem)] px-4 py-2.5 text-sm break-words shadow-sm transition-all",
151
+ isSelf ? "bg-[var(--tiger-primary,#2563eb)] text-white rounded-tr-[var(--tiger-radius-sm,0.375rem)]" : "bg-[var(--tiger-surface,#ffffff)] border border-[var(--tiger-border,#e5e7eb)] text-[var(--tiger-text,#111827)] rounded-tl-[var(--tiger-radius-sm,0.375rem)]"
149
152
  ),
150
153
  "data-tiger-chat-bubble": true,
151
154
  children: renderMessage?.(message, index) ?? message.content
@@ -177,6 +180,7 @@ var ChatWindow = ({
177
180
  "div",
178
181
  {
179
182
  ref: messageListRef,
183
+ className: "flex-1 overflow-auto bg-[var(--tiger-surface-muted,#f9fafb)]",
180
184
  role: "log",
181
185
  "aria-live": "polite",
182
186
  "aria-relevant": "additions text",
@@ -195,16 +199,16 @@ var ChatWindow = ({
195
199
  "div",
196
200
  {
197
201
  ref: messageListRef,
198
- className: "flex-1 overflow-auto p-4 space-y-3",
202
+ className: "flex-1 overflow-auto p-5 space-y-4 bg-[var(--tiger-surface-muted,#f9fafb)]",
199
203
  role: "log",
200
204
  "aria-live": "polite",
201
205
  "aria-relevant": "additions text",
202
206
  "aria-label": messageListAriaLabel ?? "\u6D88\u606F\u5217\u8868",
203
- children: messages.length === 0 ? /* @__PURE__ */ jsx("div", { className: "h-full flex items-center justify-center text-[var(--tiger-text-muted,#6b7280)]", children: emptyText }) : messages.map(renderMessageItem)
207
+ children: messages.length === 0 ? /* @__PURE__ */ jsx("div", { className: "h-full flex items-center justify-center py-8", children: /* @__PURE__ */ jsx(Empty, { description: emptyText }) }) : messages.map(renderMessageItem)
204
208
  }
205
209
  ),
206
- statusText && /* @__PURE__ */ jsx("div", { className: "px-4 py-1.5 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic text-[var(--tiger-text-muted,#6b7280)]", children: statusText }),
207
- /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-3 px-4 py-3 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] rounded-b-lg", children: [
210
+ statusText && /* @__PURE__ */ jsx("div", { className: "px-5 py-2 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic text-[var(--tiger-text-muted,#6b7280)] bg-[var(--tiger-surface-muted,#f9fafb)]", children: statusText }),
211
+ /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-3 px-5 py-4 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] rounded-b-lg", children: [
208
212
  /* @__PURE__ */ jsx("div", { className: "flex-1", children: inputType === "input" ? /* @__PURE__ */ jsx(
209
213
  Input,
210
214
  {
@@ -0,0 +1,244 @@
1
+ import {
2
+ Timeline
3
+ } from "./chunk-JVTAKNRO.mjs";
4
+ import {
5
+ Loading
6
+ } from "./chunk-FNJDBFKM.mjs";
7
+ import {
8
+ Link
9
+ } from "./chunk-XZVQ3PJS.mjs";
10
+ import {
11
+ Tag
12
+ } from "./chunk-TGKNEMD4.mjs";
13
+ import {
14
+ Text
15
+ } from "./chunk-HLS4CHWX.mjs";
16
+ import {
17
+ Card
18
+ } from "./chunk-P6E3DILH.mjs";
19
+ import {
20
+ Avatar
21
+ } from "./chunk-4ZZ7YRTB.mjs";
22
+
23
+ // src/components/ActivityFeed.tsx
24
+ import { useMemo } from "react";
25
+ import {
26
+ classNames,
27
+ buildActivityGroups,
28
+ formatActivityTime,
29
+ toActivityTimelineItems,
30
+ activityItemClasses,
31
+ activityItemLayoutClasses,
32
+ activityItemBodyClasses,
33
+ activityItemHeaderClasses,
34
+ activityItemTitleGroupClasses,
35
+ activityItemDescriptionClasses,
36
+ activityItemActionsClasses
37
+ } from "@expcat/tigercat-core";
38
+ import { jsx, jsxs } from "react/jsx-runtime";
39
+ var renderAction = (item, action, index) => {
40
+ const key = action.key ?? `${item.id}-action-${index}`;
41
+ return /* @__PURE__ */ jsx(
42
+ Link,
43
+ {
44
+ size: "sm",
45
+ variant: "primary",
46
+ underline: false,
47
+ href: action.href,
48
+ target: action.target,
49
+ disabled: action.disabled,
50
+ className: "inline-flex items-center px-2.5 py-1 rounded-lg hover:bg-blue-50/50 dark:hover:bg-blue-950/20 text-xs font-semibold transition-all duration-200",
51
+ onClick: () => action.onClick?.(item, action),
52
+ children: action.label
53
+ },
54
+ key
55
+ );
56
+ };
57
+ var ActivityFeed = ({
58
+ items = [],
59
+ groups,
60
+ groupBy,
61
+ groupOrder,
62
+ loading = false,
63
+ loadingText = "\u52A0\u8F7D\u4E2D...",
64
+ emptyText = "\u6682\u65E0\u52A8\u6001",
65
+ showAvatar = true,
66
+ showTime = true,
67
+ showGroupTitle = true,
68
+ renderItem,
69
+ renderGroupHeader,
70
+ className,
71
+ ...props
72
+ }) => {
73
+ const resolvedGroups = useMemo(
74
+ () => buildActivityGroups(items, groups, groupBy, groupOrder),
75
+ [items, groups, groupBy, groupOrder]
76
+ );
77
+ const wrapperClasses = classNames(
78
+ "tiger-activity-feed",
79
+ "flex",
80
+ "flex-col",
81
+ "gap-6",
82
+ "w-full",
83
+ className
84
+ );
85
+ const renderDefaultItem = (item, index, group) => {
86
+ if (renderItem) return renderItem(item, index, group);
87
+ const titleText = item.title ?? (typeof item.content === "string" || typeof item.content === "number" ? String(item.content) : "");
88
+ const descriptionText = item.description;
89
+ const timeText = showTime ? formatActivityTime(item.time) : "";
90
+ const actionNodes = item.actions?.map(
91
+ (action, actionIndex) => renderAction(item, action, actionIndex)
92
+ );
93
+ return /* @__PURE__ */ jsx("div", { className: classNames(activityItemClasses, "p-4 rounded-2xl border border-gray-100/70 dark:border-gray-800/40 bg-white/40 dark:bg-gray-900/15 backdrop-blur-sm shadow-sm transition-all duration-300 hover:shadow-md hover:shadow-gray-100/30 dark:hover:shadow-none hover:bg-white dark:hover:bg-gray-900/30 hover:-translate-y-0.5 w-full"), children: /* @__PURE__ */ jsxs("div", { className: activityItemLayoutClasses, children: [
94
+ showAvatar && item.user ? /* @__PURE__ */ jsx(
95
+ Avatar,
96
+ {
97
+ size: "sm",
98
+ src: item.user.avatar,
99
+ text: item.user.name,
100
+ className: "shrink-0 ring-2 ring-white dark:ring-gray-900 shadow-sm transition-transform hover:scale-105 duration-200"
101
+ }
102
+ ) : null,
103
+ /* @__PURE__ */ jsxs("div", { className: activityItemBodyClasses, children: [
104
+ /* @__PURE__ */ jsxs("div", { className: activityItemHeaderClasses, children: [
105
+ /* @__PURE__ */ jsxs("div", { className: activityItemTitleGroupClasses, children: [
106
+ titleText ? /* @__PURE__ */ jsx(Text, { tag: "div", size: "sm", weight: "semibold", className: "text-gray-900 dark:text-gray-100 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer truncate", children: titleText }) : null,
107
+ item.status ? /* @__PURE__ */ jsx(
108
+ Tag,
109
+ {
110
+ variant: item.status.variant ?? "default",
111
+ size: "sm",
112
+ className: "shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase border border-current bg-opacity-10 shadow-sm",
113
+ children: item.status.label
114
+ }
115
+ ) : null
116
+ ] }),
117
+ timeText ? /* @__PURE__ */ jsx(Text, { tag: "div", size: "xs", color: "muted", className: "shrink-0 whitespace-nowrap font-medium text-gray-400 dark:text-gray-500", children: timeText }) : null
118
+ ] }),
119
+ descriptionText ? /* @__PURE__ */ jsx(
120
+ Text,
121
+ {
122
+ tag: "div",
123
+ size: "sm",
124
+ color: "muted",
125
+ className: classNames(activityItemDescriptionClasses, "text-gray-600 dark:text-gray-300 leading-relaxed pl-0.5 mt-1"),
126
+ children: descriptionText
127
+ }
128
+ ) : null,
129
+ actionNodes?.length ? /* @__PURE__ */ jsx("div", { className: classNames(activityItemActionsClasses, "mt-2.5"), children: actionNodes }) : null
130
+ ] })
131
+ ] }) });
132
+ };
133
+ if (loading) {
134
+ return /* @__PURE__ */ jsx(
135
+ "div",
136
+ {
137
+ className: wrapperClasses,
138
+ role: "feed",
139
+ "aria-label": "\u52A8\u6001",
140
+ "aria-busy": true,
141
+ ...props,
142
+ "data-tiger-activity-feed": true,
143
+ children: /* @__PURE__ */ jsx(
144
+ Card,
145
+ {
146
+ variant: "bordered",
147
+ size: "sm",
148
+ className: "tiger-activity-feed-loading bg-white/40 dark:bg-gray-900/20 border-gray-100 dark:border-gray-800/80 backdrop-blur-sm rounded-2xl shadow-sm overflow-hidden",
149
+ children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx(Loading, { text: loadingText, className: "text-blue-500 dark:text-blue-400 font-medium" }) })
150
+ }
151
+ )
152
+ }
153
+ );
154
+ }
155
+ if (resolvedGroups.length === 0) {
156
+ return /* @__PURE__ */ jsx(
157
+ "div",
158
+ {
159
+ className: wrapperClasses,
160
+ role: "feed",
161
+ "aria-label": "\u52A8\u6001",
162
+ ...props,
163
+ "data-tiger-activity-feed": true,
164
+ children: /* @__PURE__ */ jsx(
165
+ Card,
166
+ {
167
+ variant: "bordered",
168
+ size: "sm",
169
+ className: "tiger-activity-feed-empty bg-white/40 dark:bg-gray-900/20 border-gray-100 dark:border-gray-800/80 backdrop-blur-sm rounded-2xl shadow-sm overflow-hidden",
170
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-12 px-4", children: [
171
+ /* @__PURE__ */ jsx("svg", { className: "w-12 h-12 text-gray-300 dark:text-gray-600 mb-3 animate-pulse", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7.5h1.5m-1.5 3h1.5m-7.5 3h10.5m-10.5 3h10.5m-13.5-9h16.5M3 5.25h18M3 18.75h18" }) }),
172
+ /* @__PURE__ */ jsx(Text, { tag: "div", size: "sm", color: "muted", className: "font-medium", children: emptyText })
173
+ ] })
174
+ }
175
+ )
176
+ }
177
+ );
178
+ }
179
+ return /* @__PURE__ */ jsx(
180
+ "div",
181
+ {
182
+ className: wrapperClasses,
183
+ role: "feed",
184
+ "aria-label": "\u52A8\u6001",
185
+ ...props,
186
+ "data-tiger-activity-feed": true,
187
+ children: resolvedGroups.map((group, groupIndex) => {
188
+ const headerNode = renderGroupHeader?.(group);
189
+ const groupTitle = group.title;
190
+ const timelineItems = toActivityTimelineItems(group.items);
191
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
192
+ showGroupTitle && groupTitle ? headerNode ?? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
193
+ /* @__PURE__ */ jsx("span", { className: "w-1.5 h-3.5 bg-blue-500 rounded-full dark:bg-blue-400 shadow-sm shadow-blue-500/20" }),
194
+ /* @__PURE__ */ jsx(Text, { tag: "span", size: "sm", weight: "bold", className: "text-gray-900 dark:text-gray-100 uppercase tracking-wider", children: groupTitle })
195
+ ] }) : null,
196
+ /* @__PURE__ */ jsx(
197
+ Timeline,
198
+ {
199
+ items: timelineItems,
200
+ style: {
201
+ "--tiger-border": "rgba(156, 163, 175, 0.18)"
202
+ },
203
+ renderDot: (timelineItem) => {
204
+ const activity = timelineItem.activity;
205
+ const statusVariant = activity?.status?.variant ?? "default";
206
+ const baseDotClass = "w-3 h-3 rounded-full border-2 border-white dark:border-gray-950 shadow-sm";
207
+ let colorClass = "bg-gray-300 dark:bg-gray-700";
208
+ let pulseClass = "";
209
+ if (statusVariant === "success") {
210
+ colorClass = "bg-emerald-500";
211
+ pulseClass = "bg-emerald-500/30";
212
+ } else if (statusVariant === "warning") {
213
+ colorClass = "bg-amber-500";
214
+ pulseClass = "bg-amber-500/30";
215
+ } else if (statusVariant === "error" || statusVariant === "danger") {
216
+ colorClass = "bg-rose-500";
217
+ pulseClass = "bg-rose-500/30";
218
+ } else if (statusVariant === "primary" || statusVariant === "info") {
219
+ colorClass = "bg-blue-500";
220
+ pulseClass = "bg-blue-500/30";
221
+ }
222
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex items-center justify-center w-4 h-4", children: [
223
+ pulseClass ? /* @__PURE__ */ jsx("span", { className: `absolute inline-flex h-full w-full rounded-full animate-ping opacity-75 ${pulseClass}` }) : null,
224
+ /* @__PURE__ */ jsx("span", { className: `${baseDotClass} ${colorClass} relative z-10` })
225
+ ] });
226
+ },
227
+ renderItem: (timelineItem, index) => {
228
+ const activity = timelineItem.activity;
229
+ if (!activity) return null;
230
+ return renderDefaultItem(activity, index, group);
231
+ }
232
+ }
233
+ )
234
+ ] }, group.key ?? groupIndex);
235
+ })
236
+ }
237
+ );
238
+ };
239
+ var ActivityFeed_default = ActivityFeed;
240
+
241
+ export {
242
+ ActivityFeed,
243
+ ActivityFeed_default
244
+ };
@@ -145,6 +145,7 @@ var CropUpload = ({
145
145
  open: modalVisible,
146
146
  size: "lg",
147
147
  title: modalTitle,
148
+ className: "tiger-crop-upload-modal",
148
149
  closable: true,
149
150
  maskClosable: false,
150
151
  onClose: handleCancel,