@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
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkXPA2YCQOjs = require('./chunk-XPA2YCQO.js');
4
+ var _chunkM7HBWFQOjs = require('./chunk-M7HBWFQO.js');
5
5
 
6
6
 
7
7
  var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
@@ -21,6 +21,42 @@ var _react = require('react');
21
21
 
22
22
  var _tigercatcore = require('@expcat/tigercat-core');
23
23
  var _jsxruntime = require('react/jsx-runtime');
24
+ var ArrowLeftIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
25
+ "svg",
26
+ {
27
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:-translate-x-0.5",
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: "2",
31
+ viewBox: "0 0 24 24",
32
+ "aria-hidden": "true",
33
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" })
34
+ }
35
+ );
36
+ var ArrowRightIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
37
+ "svg",
38
+ {
39
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:translate-x-0.5",
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ strokeWidth: "2",
43
+ viewBox: "0 0 24 24",
44
+ "aria-hidden": "true",
45
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" })
46
+ }
47
+ );
48
+ var CheckIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
49
+ "svg",
50
+ {
51
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:scale-110",
52
+ fill: "none",
53
+ stroke: "currentColor",
54
+ strokeWidth: "2.5",
55
+ viewBox: "0 0 24 24",
56
+ "aria-hidden": "true",
57
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" })
58
+ }
59
+ );
24
60
  var FormWizard = ({
25
61
  steps = [],
26
62
  current,
@@ -29,6 +65,7 @@ var FormWizard = ({
29
65
  direction = "horizontal",
30
66
  size = "default",
31
67
  simple = false,
68
+ bordered = true,
32
69
  showSteps = true,
33
70
  showActions = true,
34
71
  prevText,
@@ -60,7 +97,8 @@ var FormWizard = ({
60
97
  const isFirst = currentIndex <= 0;
61
98
  const isLast = currentIndex >= totalCount - 1;
62
99
  const wrapperClasses = _tigercatcore.classNames.call(void 0,
63
- "tiger-form-wizard w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm overflow-hidden",
100
+ "tiger-form-wizard w-full overflow-hidden transition-all duration-300",
101
+ bordered ? "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm" : "bg-transparent",
64
102
  className
65
103
  );
66
104
  const setCurrent = _react.useCallback.call(void 0,
@@ -129,7 +167,7 @@ var FormWizard = ({
129
167
  }, [currentIndex, currentStep, renderStep]);
130
168
  const stepsNodes = _react.useMemo.call(void 0,
131
169
  () => steps.map((step, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
132
- _chunkXPA2YCQOjs.StepsItem,
170
+ _chunkM7HBWFQOjs.StepsItem,
133
171
  {
134
172
  title: step.title,
135
173
  description: step.description,
@@ -142,8 +180,11 @@ var FormWizard = ({
142
180
  [steps]
143
181
  );
144
182
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: wrapperClasses, style, "data-tiger-form-wizard": true, ...props, children: [
145
- showSteps && steps.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-6 py-5 bg-[var(--tiger-surface-muted,#f9fafb)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
146
- _chunkXPA2YCQOjs.Steps,
183
+ showSteps && steps.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0,
184
+ "px-6 py-5 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
185
+ bordered ? "border-b border-[var(--tiger-border,#e5e7eb)]" : ""
186
+ ), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
187
+ _chunkM7HBWFQOjs.Steps,
147
188
  {
148
189
  current: currentIndex,
149
190
  direction,
@@ -154,10 +195,36 @@ var FormWizard = ({
154
195
  children: stepsNodes
155
196
  }
156
197
  ) }),
157
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-6 py-4 flex flex-col items-center", children: contentNode }),
158
- showActions && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center gap-3 px-6 py-2 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface-muted,#f9fafb)]", children: [
159
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { htmlType: "button", variant: "secondary", disabled: isFirst, onClick: handlePrev, children: _tigercatcore.resolveLocaleText.call(void 0, labels.prevText, prevText) }),
160
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { htmlType: "button", variant: "primary", onClick: handleNext, children: isLast ? _tigercatcore.resolveLocaleText.call(void 0, labels.finishText, finishText) : _tigercatcore.resolveLocaleText.call(void 0, labels.nextText, nextText) })
198
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-8 py-6 flex flex-col items-center w-full min-h-[120px] transition-all duration-300", children: contentNode }),
199
+ showActions && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0,
200
+ "flex items-center justify-between gap-3 px-8 py-4 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
201
+ bordered ? "border-t border-[var(--tiger-border,#e5e7eb)]" : ""
202
+ ), children: [
203
+ !isFirst ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
204
+ _chunk56ZV3VVYjs.Button,
205
+ {
206
+ htmlType: "button",
207
+ variant: "secondary",
208
+ className: "group",
209
+ onClick: handlePrev,
210
+ size: size === "small" ? "sm" : "md",
211
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowLeftIcon, {}),
212
+ children: _tigercatcore.resolveLocaleText.call(void 0, labels.prevText, prevText)
213
+ }
214
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
215
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
216
+ _chunk56ZV3VVYjs.Button,
217
+ {
218
+ htmlType: "button",
219
+ variant: "primary",
220
+ className: "group",
221
+ onClick: handleNext,
222
+ size: size === "small" ? "sm" : "md",
223
+ icon: isLast ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowRightIcon, {}),
224
+ iconPosition: isLast ? "left" : "right",
225
+ children: isLast ? _tigercatcore.resolveLocaleText.call(void 0, labels.finishText, finishText) : _tigercatcore.resolveLocaleText.call(void 0, labels.nextText, nextText)
226
+ }
227
+ )
161
228
  ] })
162
229
  ] });
163
230
  };
@@ -201,22 +201,29 @@ var NotificationCenter = ({
201
201
  "div",
202
202
  {
203
203
  className: classNames(
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__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
209
209
  /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
210
- /* @__PURE__ */ jsx(Text, { tag: "span", size: "sm", weight: isRead ? "normal" : "semibold", children: item.title }),
211
- timeText ? /* @__PURE__ */ jsx("span", { className: "text-xs text-[var(--tiger-text-muted,#6b7280)] whitespace-nowrap flex-shrink-0", children: timeText }) : null
210
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
211
+ /* @__PURE__ */ jsx(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__ */ jsx("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__ */ jsx("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__ */ jsx("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__ */ jsx("div", { className: classNames(
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__ */ jsx(
216
222
  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__ */ jsx(
239
- List,
240
- {
241
- dataSource: listItems,
242
- split: true,
243
- bordered: "divided",
244
- hoverable: true,
245
- emptyText,
246
- onItemClick: (item, index) => onItemClick?.(item, index),
247
- renderItem
245
+ const renderList = (listItems) => {
246
+ if (listItems.length === 0) {
247
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-14 px-4 text-center", children: [
248
+ /* @__PURE__ */ jsx("div", { className: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner", children: /* @__PURE__ */ jsx("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__ */ jsx("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__ */ jsx(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__ */ jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsx(Loading, { text: loadingText }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ jsx(Tabs, { type: "line", size: "small", activeKey: currentGroupKey, onChange: handleGroupChange, children: groupTabData.map((tab) => /* @__PURE__ */ jsx(TabPane, { tabKey: tab.key, label: tab.label, children: /* @__PURE__ */ jsx("div", { className: "max-h-[380px] overflow-y-auto", children: renderList(tab.filteredItems) }) }, String(tab.key))) }) }) : /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto", children: renderList(filteredFlatItems) });
252
+ return /* @__PURE__ */ jsx(
253
+ List,
254
+ {
255
+ dataSource: listItems,
256
+ split: true,
257
+ bordered: "divided",
258
+ hoverable: true,
259
+ emptyText,
260
+ onItemClick: (item, index) => onItemClick?.(item, index),
261
+ renderItem
262
+ }
263
+ );
264
+ };
265
+ const content = loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx(Loading, { text: loadingText, className: "text-blue-500 dark:text-blue-400 font-medium" }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ jsx(Tabs, { type: "line", size: "small", activeKey: currentGroupKey, onChange: handleGroupChange, children: groupTabData.map((tab) => /* @__PURE__ */ jsx(TabPane, { tabKey: tab.key, label: tab.label, children: /* @__PURE__ */ jsx("div", { className: "max-h-[380px] overflow-y-auto", children: renderList(tab.filteredItems) }) }, String(tab.key))) }) }) : /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto", children: renderList(filteredFlatItems) });
251
266
  return /* @__PURE__ */ jsx(
252
267
  "div",
253
268
  {
@@ -260,22 +275,34 @@ var NotificationCenter = ({
260
275
  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__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
265
280
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
266
281
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
267
- /* @__PURE__ */ jsx(Text, { tag: "div", size: "base", weight: "bold", children: title }),
268
- totalUnread > 0 ? /* @__PURE__ */ jsx("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__ */ jsx(Text, { tag: "div", size: "base", weight: "bold", className: "text-gray-900 dark:text-gray-100", children: title }),
283
+ totalUnread > 0 ? /* @__PURE__ */ jsx("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__ */ jsx(Button, { size: "sm", variant: "ghost", disabled: !hasUnread, onClick: handleMarkAllRead, children: markAllReadText })
285
+ /* @__PURE__ */ jsx(
286
+ Button,
287
+ {
288
+ size: "sm",
289
+ variant: "ghost",
290
+ disabled: !hasUnread,
291
+ onClick: handleMarkAllRead,
292
+ className: classNames(
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__ */ jsx("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__ */ jsx(
300
+ /* @__PURE__ */ jsx("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__ */ jsx(
273
301
  "button",
274
302
  {
275
303
  className: classNames(
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,7 +1,7 @@
1
1
  import {
2
2
  Steps,
3
3
  StepsItem
4
- } from "./chunk-36WZNVQ5.mjs";
4
+ } from "./chunk-5XE5VBDS.mjs";
5
5
  import {
6
6
  useTigerConfig
7
7
  } from "./chunk-QAIBQHIO.mjs";
@@ -21,6 +21,42 @@ import {
21
21
  runStepValidation
22
22
  } from "@expcat/tigercat-core";
23
23
  import { jsx, jsxs } from "react/jsx-runtime";
24
+ var ArrowLeftIcon = () => /* @__PURE__ */ jsx(
25
+ "svg",
26
+ {
27
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:-translate-x-0.5",
28
+ fill: "none",
29
+ stroke: "currentColor",
30
+ strokeWidth: "2",
31
+ viewBox: "0 0 24 24",
32
+ "aria-hidden": "true",
33
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" })
34
+ }
35
+ );
36
+ var ArrowRightIcon = () => /* @__PURE__ */ jsx(
37
+ "svg",
38
+ {
39
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:translate-x-0.5",
40
+ fill: "none",
41
+ stroke: "currentColor",
42
+ strokeWidth: "2",
43
+ viewBox: "0 0 24 24",
44
+ "aria-hidden": "true",
45
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" })
46
+ }
47
+ );
48
+ var CheckIcon = () => /* @__PURE__ */ jsx(
49
+ "svg",
50
+ {
51
+ className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:scale-110",
52
+ fill: "none",
53
+ stroke: "currentColor",
54
+ strokeWidth: "2.5",
55
+ viewBox: "0 0 24 24",
56
+ "aria-hidden": "true",
57
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" })
58
+ }
59
+ );
24
60
  var FormWizard = ({
25
61
  steps = [],
26
62
  current,
@@ -29,6 +65,7 @@ var FormWizard = ({
29
65
  direction = "horizontal",
30
66
  size = "default",
31
67
  simple = false,
68
+ bordered = true,
32
69
  showSteps = true,
33
70
  showActions = true,
34
71
  prevText,
@@ -60,7 +97,8 @@ var FormWizard = ({
60
97
  const isFirst = currentIndex <= 0;
61
98
  const isLast = currentIndex >= totalCount - 1;
62
99
  const wrapperClasses = classNames(
63
- "tiger-form-wizard w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm overflow-hidden",
100
+ "tiger-form-wizard w-full overflow-hidden transition-all duration-300",
101
+ bordered ? "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm" : "bg-transparent",
64
102
  className
65
103
  );
66
104
  const setCurrent = useCallback(
@@ -142,7 +180,10 @@ var FormWizard = ({
142
180
  [steps]
143
181
  );
144
182
  return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, style, "data-tiger-form-wizard": true, ...props, children: [
145
- showSteps && steps.length > 0 && /* @__PURE__ */ jsx("div", { className: "px-6 py-5 bg-[var(--tiger-surface-muted,#f9fafb)]", children: /* @__PURE__ */ jsx(
183
+ showSteps && steps.length > 0 && /* @__PURE__ */ jsx("div", { className: classNames(
184
+ "px-6 py-5 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
185
+ bordered ? "border-b border-[var(--tiger-border,#e5e7eb)]" : ""
186
+ ), children: /* @__PURE__ */ jsx(
146
187
  Steps,
147
188
  {
148
189
  current: currentIndex,
@@ -154,10 +195,36 @@ var FormWizard = ({
154
195
  children: stepsNodes
155
196
  }
156
197
  ) }),
157
- /* @__PURE__ */ jsx("div", { className: "px-6 py-4 flex flex-col items-center", children: contentNode }),
158
- showActions && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3 px-6 py-2 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface-muted,#f9fafb)]", children: [
159
- /* @__PURE__ */ jsx(Button, { htmlType: "button", variant: "secondary", disabled: isFirst, onClick: handlePrev, children: resolveLocaleText(labels.prevText, prevText) }),
160
- /* @__PURE__ */ jsx(Button, { htmlType: "button", variant: "primary", onClick: handleNext, children: isLast ? resolveLocaleText(labels.finishText, finishText) : resolveLocaleText(labels.nextText, nextText) })
198
+ /* @__PURE__ */ jsx("div", { className: "px-8 py-6 flex flex-col items-center w-full min-h-[120px] transition-all duration-300", children: contentNode }),
199
+ showActions && /* @__PURE__ */ jsxs("div", { className: classNames(
200
+ "flex items-center justify-between gap-3 px-8 py-4 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
201
+ bordered ? "border-t border-[var(--tiger-border,#e5e7eb)]" : ""
202
+ ), children: [
203
+ !isFirst ? /* @__PURE__ */ jsx(
204
+ Button,
205
+ {
206
+ htmlType: "button",
207
+ variant: "secondary",
208
+ className: "group",
209
+ onClick: handlePrev,
210
+ size: size === "small" ? "sm" : "md",
211
+ icon: /* @__PURE__ */ jsx(ArrowLeftIcon, {}),
212
+ children: resolveLocaleText(labels.prevText, prevText)
213
+ }
214
+ ) : /* @__PURE__ */ jsx("div", {}),
215
+ /* @__PURE__ */ jsx(
216
+ Button,
217
+ {
218
+ htmlType: "button",
219
+ variant: "primary",
220
+ className: "group",
221
+ onClick: handleNext,
222
+ size: size === "small" ? "sm" : "md",
223
+ icon: isLast ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(ArrowRightIcon, {}),
224
+ iconPosition: isLast ? "left" : "right",
225
+ children: isLast ? resolveLocaleText(labels.finishText, finishText) : resolveLocaleText(labels.nextText, nextText)
226
+ }
227
+ )
161
228
  ] })
162
229
  ] });
163
230
  };
@@ -0,0 +1,244 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkPR3PQUKMjs = require('./chunk-PR3PQUKM.js');
4
+
5
+
6
+ var _chunk3MRP3XYIjs = require('./chunk-3MRP3XYI.js');
7
+
8
+
9
+ var _chunkQYYAXM5Fjs = require('./chunk-QYYAXM5F.js');
10
+
11
+
12
+ var _chunkVCULFIZ5js = require('./chunk-VCULFIZ5.js');
13
+
14
+
15
+ var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
16
+
17
+
18
+ var _chunkUIO6O4MIjs = require('./chunk-UIO6O4MI.js');
19
+
20
+
21
+ var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
22
+
23
+ // src/components/ActivityFeed.tsx
24
+ var _react = require('react');
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ var _tigercatcore = require('@expcat/tigercat-core');
38
+ var _jsxruntime = require('react/jsx-runtime');
39
+ var renderAction = (item, action, index) => {
40
+ const key = _nullishCoalesce(action.key, () => ( `${item.id}-action-${index}`));
41
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
42
+ _chunkQYYAXM5Fjs.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: () => _optionalChain([action, 'access', _ => _.onClick, 'optionalCall', _2 => _2(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 = _react.useMemo.call(void 0,
74
+ () => _tigercatcore.buildActivityGroups.call(void 0, items, groups, groupBy, groupOrder),
75
+ [items, groups, groupBy, groupOrder]
76
+ );
77
+ const wrapperClasses = _tigercatcore.classNames.call(void 0,
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 = _nullishCoalesce(item.title, () => ( (typeof item.content === "string" || typeof item.content === "number" ? String(item.content) : "")));
88
+ const descriptionText = item.description;
89
+ const timeText = showTime ? _tigercatcore.formatActivityTime.call(void 0, item.time) : "";
90
+ const actionNodes = _optionalChain([item, 'access', _3 => _3.actions, 'optionalAccess', _4 => _4.map, 'call', _5 => _5(
91
+ (action, actionIndex) => renderAction(item, action, actionIndex)
92
+ )]);
93
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0, _tigercatcore.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__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemLayoutClasses, children: [
94
+ showAvatar && item.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
95
+ _chunk4MQCUKICjs.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__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemBodyClasses, children: [
104
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemHeaderClasses, children: [
105
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemTitleGroupClasses, children: [
106
+ titleText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.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__ */ _jsxruntime.jsx.call(void 0,
108
+ _chunkVCULFIZ5js.Tag,
109
+ {
110
+ variant: _nullishCoalesce(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__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.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__ */ _jsxruntime.jsx.call(void 0,
120
+ _chunkUF3DXKCIjs.Text,
121
+ {
122
+ tag: "div",
123
+ size: "sm",
124
+ color: "muted",
125
+ className: _tigercatcore.classNames.call(void 0, _tigercatcore.activityItemDescriptionClasses, "text-gray-600 dark:text-gray-300 leading-relaxed pl-0.5 mt-1"),
126
+ children: descriptionText
127
+ }
128
+ ) : null,
129
+ _optionalChain([actionNodes, 'optionalAccess', _6 => _6.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0, _tigercatcore.activityItemActionsClasses, "mt-2.5"), children: actionNodes }) : null
130
+ ] })
131
+ ] }) });
132
+ };
133
+ if (loading) {
134
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0,
144
+ _chunkUIO6O4MIjs.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__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3MRP3XYIjs.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__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0,
165
+ _chunkUIO6O4MIjs.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__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 px-4", children: [
171
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "sm", color: "muted", className: "font-medium", children: emptyText })
173
+ ] })
174
+ }
175
+ )
176
+ }
177
+ );
178
+ }
179
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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 = _optionalChain([renderGroupHeader, 'optionalCall', _7 => _7(group)]);
189
+ const groupTitle = group.title;
190
+ const timelineItems = _tigercatcore.toActivityTimelineItems.call(void 0, group.items);
191
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
192
+ showGroupTitle && groupTitle ? _nullishCoalesce(headerNode, () => ( /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mb-2", children: [
193
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "sm", weight: "bold", className: "text-gray-900 dark:text-gray-100 uppercase tracking-wider", children: groupTitle })
195
+ ] }))) : null,
196
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
197
+ _chunkPR3PQUKMjs.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 = _nullishCoalesce(_optionalChain([activity, 'optionalAccess', _8 => _8.status, 'optionalAccess', _9 => _9.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__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex items-center justify-center w-4 h-4", children: [
223
+ pulseClass ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `absolute inline-flex h-full w-full rounded-full animate-ping opacity-75 ${pulseClass}` }) : null,
224
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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
+ ] }, _nullishCoalesce(group.key, () => ( groupIndex)));
235
+ })
236
+ }
237
+ );
238
+ };
239
+ var ActivityFeed_default = ActivityFeed;
240
+
241
+
242
+
243
+
244
+ exports.ActivityFeed = ActivityFeed; exports.ActivityFeed_default = ActivityFeed_default;