@expcat/tigercat-vue 2.0.0-rc.1 → 2.0.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.
Files changed (32) hide show
  1. package/dist/{chunk-EGIQPUEL.mjs → chunk-5C32WCQY.mjs} +8 -6
  2. package/dist/{chunk-QFG452MD.mjs → chunk-5RXYJWNA.mjs} +53 -28
  3. package/dist/{chunk-36TZA5BH.mjs → chunk-A5QYJSHK.mjs} +0 -3
  4. package/dist/{chunk-H26JXVJX.mjs → chunk-A7QIMKWQ.mjs} +1 -1
  5. package/dist/{chunk-7JT5ZIHC.mjs → chunk-BCU7GYF6.mjs} +16 -8
  6. package/dist/{chunk-7CPMXNLK.mjs → chunk-BNYA5IUB.mjs} +26 -2
  7. package/dist/{chunk-CFH5T3V2.mjs → chunk-DKMKJZ7A.mjs} +1 -1
  8. package/dist/{chunk-SUORTZUY.mjs → chunk-EZZD4OCV.mjs} +47 -19
  9. package/dist/{chunk-IMFHJEUX.mjs → chunk-JKPXJ3VB.mjs} +6 -1
  10. package/dist/{chunk-3NQUEQJT.mjs → chunk-NP6DZQ3O.mjs} +53 -37
  11. package/dist/{chunk-5KPO3EDM.mjs → chunk-OTHJIFDV.mjs} +28 -15
  12. package/dist/{chunk-BNNTDSLJ.mjs → chunk-SK2QJ66E.mjs} +0 -1
  13. package/dist/{chunk-JZCETBUV.mjs → chunk-WUQMFKQ6.mjs} +29 -16
  14. package/dist/{chunk-GWFVBG22.mjs → chunk-XGXZF27U.mjs} +28 -15
  15. package/dist/{chunk-JVQPU4M2.mjs → chunk-ZGA66PSG.mjs} +28 -15
  16. package/dist/components/ActivityFeed.mjs +1 -1
  17. package/dist/components/AreaChart.mjs +1 -1
  18. package/dist/components/BarChart.mjs +1 -1
  19. package/dist/components/CommentThread.mjs +1 -1
  20. package/dist/components/CropUpload.mjs +2 -2
  21. package/dist/components/DataExport.mjs +2 -2
  22. package/dist/components/Dropdown.mjs +1 -1
  23. package/dist/components/Image.mjs +1 -1
  24. package/dist/components/ImageCropper.mjs +1 -1
  25. package/dist/components/InfiniteScroll.mjs +1 -1
  26. package/dist/components/LineChart.mjs +1 -1
  27. package/dist/components/NotificationCenter.mjs +1 -1
  28. package/dist/components/ScatterChart.mjs +1 -1
  29. package/dist/components/Upload.mjs +1 -1
  30. package/dist/components/VirtualTable.mjs +1 -1
  31. package/dist/index.d.mts +1 -1
  32. package/package.json +5 -5
@@ -160,7 +160,7 @@ var VirtualTable = defineComponent({
160
160
  ),
161
161
  style: { ...widthStyle, ...stickyStyle }
162
162
  },
163
- col.title ?? ""
163
+ [col.renderHeader ? col.renderHeader() : col.title ?? ""]
164
164
  );
165
165
  });
166
166
  const headerRowChildren = [
@@ -195,8 +195,10 @@ var VirtualTable = defineComponent({
195
195
  emit("row-click", row, globalIdx);
196
196
  if (hasSelection.value) toggleRowSelection(key, row);
197
197
  };
198
- const cells = visibleColumns.map(
199
- (col, colIdx) => h(
198
+ const cells = visibleColumns.map((col, colIdx) => {
199
+ const dataKey = col.dataKey || col.key;
200
+ const value = row[dataKey];
201
+ return h(
200
202
  "td",
201
203
  {
202
204
  key: col.key,
@@ -218,9 +220,9 @@ var VirtualTable = defineComponent({
218
220
  ),
219
221
  style: getVirtualTableFixedCellStyle(col.key, fi)
220
222
  },
221
- String(row[col.key] ?? "")
222
- )
223
- );
223
+ [col.render ? col.render(row, globalIdx) : value]
224
+ );
225
+ });
224
226
  const rowChildren = [
225
227
  colRange && colRange.leftPad > 0 ? h("td", {
226
228
  key: "__left-pad",
@@ -24,6 +24,31 @@ import {
24
24
  clipCommentTreeDepth,
25
25
  formatCommentTime
26
26
  } from "@expcat/tigercat-core";
27
+
28
+ // ../core/src/internal/comment-thread-styles.ts
29
+ var buttonBaseClasses = "tiger-motion-aware px-2 py-0.5 h-auto min-h-0 text-xs rounded-[var(--tiger-radius-md,0.5rem)] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
30
+ var commentThreadActionButtonClasses = `${buttonBaseClasses} text-[var(--tiger-text-muted,#6b7280)] font-medium flex items-center gap-1.5`;
31
+ var commentThreadPrimaryButtonClasses = `${buttonBaseClasses} text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary-hover,#1d4ed8)] font-semibold hover:bg-[var(--tiger-outline-bg-hover,#eff6ff)]`;
32
+ var commentThreadLikeButtonClasses = "hover:text-[var(--tiger-primary,#2563eb)] hover:bg-[var(--tiger-outline-bg-hover,#eff6ff)]";
33
+ var commentThreadLikedButtonClasses = "text-[var(--tiger-primary,#2563eb)] bg-[var(--tiger-outline-bg-hover,#eff6ff)] font-semibold border-[var(--tiger-primary,#2563eb)]/40";
34
+ var commentThreadReplyButtonClasses = "hover:text-[var(--tiger-success,#16a34a)] hover:bg-[var(--tiger-surface-muted,#f9fafb)]";
35
+ var commentThreadNeutralButtonClasses = "hover:text-[var(--tiger-text,#111827)] hover:bg-[var(--tiger-surface-muted,#f3f4f6)]";
36
+ var commentThreadLikeIconClasses = "tiger-motion-aware w-3.5 h-3.5 transition-transform active:scale-125";
37
+ var commentThreadDividerClasses = "border-b border-[var(--tiger-border,#e5e7eb)]";
38
+ var commentThreadAvatarClasses = "tiger-motion-aware shrink-0 mt-0.5 ring-1 ring-[var(--tiger-border,#e5e7eb)] shadow-sm [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))] hover:scale-105";
39
+ var commentThreadAuthorClasses = "tiger-motion-aware text-[var(--tiger-text,#111827)] hover:text-[var(--tiger-primary,#2563eb)] transition-colors cursor-pointer";
40
+ var commentThreadUserTitleClasses = "bg-[var(--tiger-surface-muted,#f3f4f6)] px-1.5 py-0.5 rounded text-[var(--tiger-text-muted,#6b7280)] font-medium";
41
+ var commentThreadTimeClasses = "ml-auto text-[var(--tiger-text-muted,#6b7280)] font-normal";
42
+ var commentThreadContentClasses = "text-sm text-[var(--tiger-text-secondary,#4b5563)] leading-relaxed break-words mt-2 mb-3 pr-2";
43
+ var commentThreadReplyEditorClasses = "tiger-motion-aware mt-3 space-y-3 bg-[var(--tiger-surface-muted,#f9fafb)] border border-[var(--tiger-border,#e5e7eb)] p-4 rounded-[var(--tiger-radius-lg,0.75rem)] shadow-sm [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
44
+ var commentThreadReplyTextareaClasses = "tiger-motion-aware bg-[var(--tiger-surface,#ffffff)] border-[var(--tiger-border,#d1d5db)] focus:ring-2 focus:ring-[var(--tiger-primary,#2563eb)]/20 focus:border-[var(--tiger-primary,#2563eb)] rounded-[var(--tiger-radius-md,0.5rem)] shadow-inner [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
45
+ var commentThreadCancelButtonClasses = "tiger-motion-aware px-3 py-1.5 text-xs text-[var(--tiger-text-muted,#6b7280)] hover:text-[var(--tiger-text,#111827)] rounded-[var(--tiger-radius-md,0.5rem)] transition-colors";
46
+ var commentThreadSubmitButtonClasses = "tiger-motion-aware px-3 py-1.5 text-xs font-semibold shadow-sm hover:shadow rounded-[var(--tiger-radius-md,0.5rem)] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
47
+ var commentThreadRepliesClasses = "tiger-motion-aware mt-4 ml-1 pl-4 border-l-2 border-[var(--tiger-border,#e5e7eb)] hover:border-[var(--tiger-primary,#2563eb)]/40 space-y-4 transition-colors";
48
+ var commentThreadEmptyClasses = "tiger-motion-aware flex flex-col items-center justify-center border border-dashed border-[var(--tiger-border,#d1d5db)] rounded-[var(--tiger-radius-lg,0.75rem)] py-12 px-4 bg-[var(--tiger-surface-muted,#f9fafb)] transition-colors";
49
+ var commentThreadEmptyIconClasses = "w-10 h-10 text-[var(--tiger-text-muted,#9ca3af)] mb-3";
50
+
51
+ // src/components/CommentThread.ts
27
52
  var CommentThread = defineComponent({
28
53
  name: "TigerCommentThread",
29
54
  inheritAttrs: false,
@@ -163,9 +188,6 @@ var CommentThread = defineComponent({
163
188
  updateExpandedKeys(next);
164
189
  }
165
190
  };
166
- const BTN_BASE = "px-2 py-0.5 h-auto min-h-0 text-xs rounded-md transition-all duration-200 ease-out";
167
- const ACTION_BTN = `${BTN_BASE} text-gray-500 dark:text-gray-400 font-medium flex items-center gap-1.5`;
168
- const PRIMARY_BTN = `${BTN_BASE} text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary-hover,#1d4ed8)] dark:text-blue-400 dark:hover:text-blue-300 font-semibold hover:bg-[var(--tiger-primary,#2563eb)]/10 dark:hover:bg-blue-400/10`;
169
191
  const renderNode = (node, depth, isLast) => {
170
192
  const children = node.children ?? [];
171
193
  const hasChildren = children.length > 0;
@@ -187,9 +209,9 @@ var CommentThread = defineComponent({
187
209
  size: "sm",
188
210
  variant: "ghost",
189
211
  className: classNames(
190
- ACTION_BTN,
191
- "hover:text-blue-600 hover:bg-blue-50/50 dark:hover:text-blue-400 dark:hover:bg-blue-950/20",
192
- node.liked && "text-blue-600 dark:text-blue-400 bg-blue-50/30 dark:bg-blue-950/10 font-semibold border-blue-200/40 dark:border-blue-800/30"
212
+ commentThreadActionButtonClasses,
213
+ commentThreadLikeButtonClasses,
214
+ node.liked && commentThreadLikedButtonClasses
193
215
  ),
194
216
  onClick: () => emit("like", node, !node.liked)
195
217
  },
@@ -199,7 +221,7 @@ var CommentThread = defineComponent({
199
221
  "svg",
200
222
  {
201
223
  class: classNames(
202
- "w-3.5 h-3.5 transition-transform duration-200 active:scale-125",
224
+ commentThreadLikeIconClasses,
203
225
  node.liked ? "fill-current" : "stroke-current fill-none"
204
226
  ),
205
227
  viewBox: "0 0 24 24",
@@ -228,8 +250,8 @@ var CommentThread = defineComponent({
228
250
  size: "sm",
229
251
  variant: "ghost",
230
252
  className: classNames(
231
- ACTION_BTN,
232
- "hover:text-emerald-600 hover:bg-emerald-50/50 dark:hover:text-emerald-400 dark:hover:bg-emerald-950/20"
253
+ commentThreadActionButtonClasses,
254
+ commentThreadReplyButtonClasses
233
255
  ),
234
256
  onClick: () => {
235
257
  replyingTo.value = replyingTo.value === node.id ? null : node.id;
@@ -270,8 +292,8 @@ var CommentThread = defineComponent({
270
292
  size: "sm",
271
293
  variant: "ghost",
272
294
  className: classNames(
273
- ACTION_BTN,
274
- "hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800"
295
+ commentThreadActionButtonClasses,
296
+ commentThreadNeutralButtonClasses
275
297
  ),
276
298
  onClick: () => emit("more", node)
277
299
  },
@@ -310,7 +332,10 @@ var CommentThread = defineComponent({
310
332
  key: actionKey,
311
333
  size: "sm",
312
334
  variant: action.variant ?? "ghost",
313
- className: classNames(ACTION_BTN, "hover:bg-gray-100 dark:hover:bg-gray-800"),
335
+ className: classNames(
336
+ commentThreadActionButtonClasses,
337
+ commentThreadNeutralButtonClasses
338
+ ),
314
339
  disabled: action.disabled,
315
340
  onClick: () => {
316
341
  action.onClick?.(node, action);
@@ -328,7 +353,7 @@ var CommentThread = defineComponent({
328
353
  class: classNames(
329
354
  "tiger-comment-thread-item",
330
355
  depth === 1 && "py-5",
331
- depth === 1 && !isLast && props.showDivider && "border-b border-gray-100 dark:border-gray-800/80"
356
+ depth === 1 && !isLast && props.showDivider && commentThreadDividerClasses
332
357
  ),
333
358
  key: node.id
334
359
  },
@@ -338,7 +363,7 @@ var CommentThread = defineComponent({
338
363
  size: depth === 1 ? "md" : "sm",
339
364
  src: node.user.avatar,
340
365
  text: node.user.name,
341
- className: "shrink-0 mt-0.5 ring-1 ring-black/5 dark:ring-white/10 shadow-sm transition-transform hover:scale-105 duration-200"
366
+ className: commentThreadAvatarClasses
342
367
  }) : null,
343
368
  h("div", { class: "flex-1 min-w-0" }, [
344
369
  h("div", { class: "flex items-center gap-2 flex-wrap" }, [
@@ -348,7 +373,7 @@ var CommentThread = defineComponent({
348
373
  tag: "span",
349
374
  size: "sm",
350
375
  weight: "bold",
351
- class: "text-gray-900 dark:text-gray-100 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer"
376
+ class: commentThreadAuthorClasses
352
377
  },
353
378
  { default: () => node.user?.name }
354
379
  ) : null,
@@ -358,7 +383,7 @@ var CommentThread = defineComponent({
358
383
  tag: "span",
359
384
  size: "xs",
360
385
  color: "muted",
361
- class: "bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-gray-500 dark:text-gray-400 font-medium"
386
+ class: commentThreadUserTitleClasses
362
387
  },
363
388
  { default: () => node.user?.title }
364
389
  ) : null,
@@ -389,7 +414,7 @@ var CommentThread = defineComponent({
389
414
  tag: "span",
390
415
  size: "xs",
391
416
  color: "muted",
392
- class: "ml-auto text-gray-400 dark:text-gray-500 font-normal"
417
+ class: commentThreadTimeClasses
393
418
  },
394
419
  { default: () => formatCommentTime(node.time) }
395
420
  ) : null
@@ -397,7 +422,7 @@ var CommentThread = defineComponent({
397
422
  h(
398
423
  "div",
399
424
  {
400
- class: "text-sm text-gray-600 dark:text-gray-300 leading-relaxed break-words mt-2 mb-3 pr-2"
425
+ class: commentThreadContentClasses
401
426
  },
402
427
  String(node.content)
403
428
  ),
@@ -405,14 +430,14 @@ var CommentThread = defineComponent({
405
430
  replyingTo.value === node.id ? h(
406
431
  "div",
407
432
  {
408
- class: "mt-3 space-y-3 bg-gray-50/50 dark:bg-gray-900/30 border border-gray-100 dark:border-gray-800/80 p-4 rounded-xl shadow-sm backdrop-blur-sm transition-all duration-300"
433
+ class: commentThreadReplyEditorClasses
409
434
  },
410
435
  [
411
436
  h(Textarea, {
412
437
  rows: 3,
413
438
  modelValue: replyValue.value,
414
439
  placeholder: props.replyPlaceholder,
415
- className: "bg-white dark:bg-gray-950 border-gray-200 dark:border-gray-800 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 dark:focus:border-blue-400 rounded-lg shadow-inner transition-all duration-200",
440
+ className: commentThreadReplyTextareaClasses,
416
441
  "onUpdate:modelValue": (value) => {
417
442
  replyValue.value = value;
418
443
  }
@@ -423,7 +448,7 @@ var CommentThread = defineComponent({
423
448
  {
424
449
  size: "sm",
425
450
  variant: "ghost",
426
- className: "px-3 py-1.5 text-xs text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg transition-colors",
451
+ className: commentThreadCancelButtonClasses,
427
452
  onClick: () => {
428
453
  replyingTo.value = null;
429
454
  replyValue.value = "";
@@ -436,7 +461,7 @@ var CommentThread = defineComponent({
436
461
  {
437
462
  size: "sm",
438
463
  variant: "primary",
439
- className: "px-3 py-1.5 text-xs font-semibold shadow-sm hover:shadow transition-all duration-200 rounded-lg",
464
+ className: commentThreadSubmitButtonClasses,
440
465
  onClick: () => handleReplySubmit(node)
441
466
  },
442
467
  { default: () => props.replyButtonText }
@@ -450,8 +475,8 @@ var CommentThread = defineComponent({
450
475
  size: "sm",
451
476
  variant: "ghost",
452
477
  className: classNames(
453
- "mt-2 font-semibold hover:bg-[var(--tiger-primary,#2563eb)]/10 dark:hover:bg-blue-400/10 transition-colors",
454
- PRIMARY_BTN
478
+ "mt-2 font-semibold",
479
+ commentThreadPrimaryButtonClasses
455
480
  ),
456
481
  "aria-expanded": isExpanded,
457
482
  "aria-controls": repliesId,
@@ -465,7 +490,7 @@ var CommentThread = defineComponent({
465
490
  "div",
466
491
  {
467
492
  id: repliesId,
468
- class: "mt-4 ml-1 pl-4 border-l-2 border-gray-100 dark:border-gray-800 hover:border-blue-500/40 dark:hover:border-blue-400/40 space-y-4 transition-colors duration-300"
493
+ class: commentThreadRepliesClasses
469
494
  },
470
495
  [
471
496
  ...visibleChildren.map(
@@ -476,7 +501,7 @@ var CommentThread = defineComponent({
476
501
  {
477
502
  size: "sm",
478
503
  variant: "ghost",
479
- className: PRIMARY_BTN,
504
+ className: commentThreadPrimaryButtonClasses,
480
505
  onClick: () => handleLoadMore(node)
481
506
  },
482
507
  { default: () => props.loadMoreText }
@@ -494,13 +519,13 @@ var CommentThread = defineComponent({
494
519
  h(
495
520
  "div",
496
521
  {
497
- class: "flex flex-col items-center justify-center border border-dashed border-gray-200 dark:border-gray-800/80 rounded-xl py-12 px-4 bg-gray-50/20 dark:bg-gray-900/5 transition-colors"
522
+ class: commentThreadEmptyClasses
498
523
  },
499
524
  [
500
525
  h(
501
526
  "svg",
502
527
  {
503
- class: "w-10 h-10 text-gray-300 dark:text-gray-600 mb-3",
528
+ class: commentThreadEmptyIconClasses,
504
529
  fill: "none",
505
530
  viewBox: "0 0 24 24",
506
531
  stroke: "currentColor",
@@ -41,7 +41,6 @@ var InfiniteScroll = defineComponent({
41
41
  const containerRef = ref(null);
42
42
  const sentinelRef = ref(null);
43
43
  let cleanupObserver = null;
44
- let _usingFallback = false;
45
44
  const containerClasses = computed(
46
45
  () => classNames(
47
46
  getInfiniteScrollContainerClasses(props.direction, props.className),
@@ -63,7 +62,6 @@ var InfiniteScroll = defineComponent({
63
62
  function setupObserver() {
64
63
  cleanupObserver?.();
65
64
  cleanupObserver = null;
66
- _usingFallback = false;
67
65
  if (props.disabled || !props.hasMore) return;
68
66
  const sentinel = sentinelRef.value;
69
67
  if (!sentinel) return;
@@ -77,7 +75,6 @@ var InfiniteScroll = defineComponent({
77
75
  if (teardown) {
78
76
  cleanupObserver = teardown;
79
77
  } else {
80
- _usingFallback = true;
81
78
  containerRef.value?.addEventListener("scroll", checkScroll, { passive: true });
82
79
  cleanupObserver = () => {
83
80
  containerRef.value?.removeEventListener("scroll", checkScroll);
@@ -2,7 +2,7 @@ import {
2
2
  Dropdown,
3
3
  DropdownItem,
4
4
  DropdownMenu
5
- } from "./chunk-BNNTDSLJ.mjs";
5
+ } from "./chunk-SK2QJ66E.mjs";
6
6
  import {
7
7
  useTigerConfig
8
8
  } from "./chunk-UOJOJBEU.mjs";
@@ -31,6 +31,7 @@ import {
31
31
  getImageEditorLabels,
32
32
  mergeTigerLocale
33
33
  } from "@expcat/tigercat-core";
34
+ var isPositiveFinite = (value) => Number.isFinite(value) && value > 0;
34
35
  var ImageCropper = defineComponent({
35
36
  name: "TigerImageCropper",
36
37
  inheritAttrs: false,
@@ -73,20 +74,27 @@ var ImageCropper = defineComponent({
73
74
  const dragStartPos = ref({ x: 0, y: 0 });
74
75
  const dragStartRect = ref({ x: 0, y: 0, width: 0, height: 0 });
75
76
  const loadImage = () => {
77
+ imageRef.value = null;
76
78
  const img = new window.Image();
77
79
  img.crossOrigin = "anonymous";
78
80
  img.onload = () => {
79
- imageRef.value = img;
81
+ const naturalWidth = img.naturalWidth;
82
+ const naturalHeight = img.naturalHeight;
83
+ if (!isPositiveFinite(naturalWidth) || !isPositiveFinite(naturalHeight)) return;
80
84
  if (containerRef.value) {
81
- const containerW = containerRef.value.clientWidth;
82
- const containerH = containerRef.value.clientHeight || 400;
83
- const ratio = Math.min(containerW / img.naturalWidth, containerH / img.naturalHeight, 1);
84
- displayWidth.value = img.naturalWidth * ratio;
85
- displayHeight.value = img.naturalHeight * ratio;
85
+ const measuredWidth = containerRef.value.clientWidth;
86
+ const measuredHeight = containerRef.value.clientHeight;
87
+ const containerW = isPositiveFinite(measuredWidth) ? measuredWidth : naturalWidth;
88
+ const containerH = isPositiveFinite(measuredHeight) ? measuredHeight : 400;
89
+ const ratio = Math.min(containerW / naturalWidth, containerH / naturalHeight, 1);
90
+ displayWidth.value = naturalWidth * ratio;
91
+ displayHeight.value = naturalHeight * ratio;
86
92
  } else {
87
- displayWidth.value = img.naturalWidth;
88
- displayHeight.value = img.naturalHeight;
93
+ displayWidth.value = naturalWidth;
94
+ displayHeight.value = naturalHeight;
89
95
  }
96
+ if (!isPositiveFinite(displayWidth.value) || !isPositiveFinite(displayHeight.value)) return;
97
+ imageRef.value = img;
90
98
  cropRect.value = getInitialCropRect(
91
99
  displayWidth.value,
92
100
  displayHeight.value,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UOJOJBEU.mjs";
4
4
 
5
5
  // src/components/Upload.ts
6
- import { defineComponent, ref, computed, watch, h } from "vue";
6
+ import { defineComponent, ref, computed, watch, h, onBeforeUnmount } from "vue";
7
7
  import {
8
8
  classNames,
9
9
  coerceClassValue,
@@ -216,6 +216,23 @@ var Upload = defineComponent({
216
216
  }
217
217
  return internalFileList.value;
218
218
  });
219
+ const objectUrls = /* @__PURE__ */ new Map();
220
+ const revokeUnusedObjectUrls = (files) => {
221
+ const activeFiles = new Set(
222
+ files.flatMap((file) => file.file && !file.url ? [file.file] : [])
223
+ );
224
+ objectUrls.forEach((url, file) => {
225
+ if (!activeFiles.has(file)) {
226
+ URL.revokeObjectURL(url);
227
+ objectUrls.delete(file);
228
+ }
229
+ });
230
+ };
231
+ watch(fileListValue, revokeUnusedObjectUrls, { deep: true });
232
+ onBeforeUnmount(() => {
233
+ objectUrls.forEach((url) => URL.revokeObjectURL(url));
234
+ objectUrls.clear();
235
+ });
219
236
  const setFileList = (value) => {
220
237
  if (!isControlled.value) {
221
238
  internalFileList.value = value;
@@ -597,7 +614,14 @@ var Upload = defineComponent({
597
614
  );
598
615
  };
599
616
  const renderPictureCard = (file) => {
600
- const imageUrl = file.url || (file.file ? URL.createObjectURL(file.file) : "");
617
+ let imageUrl = file.url ?? "";
618
+ if (!imageUrl && file.file && typeof URL !== "undefined" && typeof URL.createObjectURL === "function") {
619
+ imageUrl = objectUrls.get(file.file) ?? "";
620
+ if (!imageUrl) {
621
+ imageUrl = URL.createObjectURL(file.file);
622
+ objectUrls.set(file.file, imageUrl);
623
+ }
624
+ }
601
625
  return h(
602
626
  "div",
603
627
  {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-D4APFWWS.mjs";
4
4
  import {
5
5
  ImageCropper
6
- } from "./chunk-7JT5ZIHC.mjs";
6
+ } from "./chunk-BCU7GYF6.mjs";
7
7
  import {
8
8
  Button
9
9
  } from "./chunk-YZBQ6IR7.mjs";
@@ -27,6 +27,34 @@ import {
27
27
  buildNotificationGroups,
28
28
  formatActivityTime
29
29
  } from "@expcat/tigercat-core";
30
+
31
+ // ../core/src/internal/notification-center-styles.ts
32
+ var notificationCenterItemClasses = "tiger-motion-aware group relative flex items-start gap-3.5 w-full p-3.5 rounded-[var(--tiger-radius-lg,0.75rem)] hover:bg-[var(--tiger-surface-muted,#f9fafb)] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
33
+ var notificationCenterUnreadItemClasses = "bg-[var(--tiger-outline-bg-hover,#eff6ff)] border-l-[3px] border-l-[var(--tiger-primary,#2563eb)] -ml-[3px] pl-[calc(0.875rem-3px)]";
34
+ var notificationCenterReadItemClasses = "border-l-[3px] border-l-transparent -ml-[3px] pl-[calc(0.875rem-3px)]";
35
+ var notificationCenterReadTitleClasses = "text-[var(--tiger-text-secondary,#4b5563)]";
36
+ var notificationCenterUnreadTitleClasses = "text-[var(--tiger-text,#111827)]";
37
+ var notificationCenterUnreadDotClasses = "tiger-motion-aware w-1.5 h-1.5 rounded-full bg-[var(--tiger-primary,#2563eb)] shrink-0 shadow-sm animate-pulse";
38
+ var notificationCenterTimeClasses = "text-[11px] text-[var(--tiger-text-muted,#6b7280)] font-medium whitespace-nowrap flex-shrink-0 self-center";
39
+ var notificationCenterReadDescriptionClasses = "text-[var(--tiger-text-muted,#6b7280)]";
40
+ var notificationCenterUnreadDescriptionClasses = "text-[var(--tiger-text-secondary,#4b5563)]";
41
+ var notificationCenterItemActionClasses = "tiger-motion-aware opacity-0 group-hover:opacity-100 focus:opacity-100 rounded-full px-2.5 py-1 text-[11px] font-semibold bg-[var(--tiger-surface-muted,#f3f4f6)] hover:bg-[var(--tiger-fill-hover,#e5e7eb)] text-[var(--tiger-text-secondary,#374151)] border-0 flex-shrink-0 self-center [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
42
+ var notificationCenterEmptyIconWrapperClasses = "p-3.5 bg-[var(--tiger-surface-muted,#f9fafb)] rounded-full mb-3 shadow-inner";
43
+ var notificationCenterEmptyIconClasses = "tiger-motion-aware w-8 h-8 text-[var(--tiger-text-muted,#9ca3af)] animate-pulse";
44
+ var notificationCenterEmptyTextClasses = "font-semibold text-[var(--tiger-text-muted,#6b7280)]";
45
+ var notificationCenterLoadingClasses = "text-[var(--tiger-primary,#2563eb)] font-medium";
46
+ var notificationCenterCardClasses = "tiger-motion-aware w-full rounded-[var(--tiger-radius-xl,1rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-[var(--tiger-shadow-glass,0_8px_30px_rgb(0_0_0_/_0.04))] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))] overflow-hidden";
47
+ var notificationCenterTitleClasses = "text-[var(--tiger-text,#111827)]";
48
+ var notificationCenterUnreadBadgeClasses = "tiger-motion-aware inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-[11px] font-bold rounded-full bg-[var(--tiger-primary,#2563eb)] text-white shadow-sm animate-pulse";
49
+ var notificationCenterMarkAllBaseClasses = "tiger-motion-aware text-xs font-semibold transition-colors";
50
+ var notificationCenterMarkAllEnabledClasses = "text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary-hover,#1d4ed8)]";
51
+ var notificationCenterMarkAllDisabledClasses = "text-[var(--tiger-text-muted,#9ca3af)]";
52
+ var notificationCenterFilterGroupClasses = "inline-flex items-center gap-0.5 p-0.5 rounded-[var(--tiger-radius-md,0.5rem)] bg-[var(--tiger-surface-muted,#f3f4f6)] self-start";
53
+ var notificationCenterFilterButtonClasses = "tiger-motion-aware px-3.5 py-1 text-xs font-semibold rounded-[var(--tiger-radius-sm,0.375rem)] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
54
+ var notificationCenterFilterActiveClasses = "bg-[var(--tiger-surface,#ffffff)] text-[var(--tiger-text,#111827)] shadow-sm";
55
+ var notificationCenterFilterIdleClasses = "text-[var(--tiger-text-muted,#6b7280)] hover:text-[var(--tiger-text,#111827)]";
56
+
57
+ // src/components/NotificationCenter.ts
30
58
  var getGroupKey = (group, index) => {
31
59
  return group.key ?? group.title ?? index;
32
60
  };
@@ -275,7 +303,7 @@ var NotificationCenter = defineComponent({
275
303
  return h(
276
304
  "div",
277
305
  {
278
- class: "inline-flex items-center gap-0.5 p-0.5 rounded-lg bg-gray-100/80 dark:bg-gray-800/60 self-start"
306
+ class: notificationCenterFilterGroupClasses
279
307
  },
280
308
  options.map(
281
309
  (option) => h(
@@ -283,8 +311,8 @@ var NotificationCenter = defineComponent({
283
311
  {
284
312
  key: option.key,
285
313
  class: classNames(
286
- "px-3.5 py-1 text-xs font-semibold rounded-md transition-all duration-200",
287
- currentReadFilter.value === 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"
314
+ notificationCenterFilterButtonClasses,
315
+ currentReadFilter.value === option.key ? notificationCenterFilterActiveClasses : notificationCenterFilterIdleClasses
288
316
  ),
289
317
  onClick: () => handleReadFilterChange(option.key)
290
318
  },
@@ -300,8 +328,8 @@ var NotificationCenter = defineComponent({
300
328
  "div",
301
329
  {
302
330
  class: classNames(
303
- "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",
304
- !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)]"
331
+ notificationCenterItemClasses,
332
+ isRead ? notificationCenterReadItemClasses : notificationCenterUnreadItemClasses
305
333
  )
306
334
  },
307
335
  [
@@ -314,18 +342,18 @@ var NotificationCenter = defineComponent({
314
342
  tag: "span",
315
343
  size: "sm",
316
344
  weight: isRead ? "normal" : "semibold",
317
- class: isRead ? "text-gray-600 dark:text-gray-400" : "text-gray-900 dark:text-gray-100"
345
+ class: isRead ? notificationCenterReadTitleClasses : notificationCenterUnreadTitleClasses
318
346
  },
319
347
  { default: () => item.title }
320
348
  ),
321
349
  !isRead ? h("span", {
322
- class: "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"
350
+ class: notificationCenterUnreadDotClasses
323
351
  }) : null
324
352
  ]),
325
353
  timeText ? h(
326
354
  "span",
327
355
  {
328
- class: "text-[11px] text-gray-400 dark:text-gray-500 font-medium whitespace-nowrap flex-shrink-0 self-center"
356
+ class: notificationCenterTimeClasses
329
357
  },
330
358
  timeText
331
359
  ) : null
@@ -335,7 +363,7 @@ var NotificationCenter = defineComponent({
335
363
  {
336
364
  class: classNames(
337
365
  "mt-1 text-xs leading-relaxed line-clamp-2",
338
- isRead ? "text-gray-500 dark:text-gray-400" : "text-gray-600 dark:text-gray-300"
366
+ isRead ? notificationCenterReadDescriptionClasses : notificationCenterUnreadDescriptionClasses
339
367
  )
340
368
  },
341
369
  item.description
@@ -346,7 +374,7 @@ var NotificationCenter = defineComponent({
346
374
  {
347
375
  size: "sm",
348
376
  variant: "ghost",
349
- class: "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",
377
+ class: notificationCenterItemActionClasses,
350
378
  onClick: (event) => {
351
379
  event.stopPropagation();
352
380
  handleItemReadChange(item, !isRead);
@@ -366,13 +394,13 @@ var NotificationCenter = defineComponent({
366
394
  h(
367
395
  "div",
368
396
  {
369
- class: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner"
397
+ class: notificationCenterEmptyIconWrapperClasses
370
398
  },
371
399
  [
372
400
  h(
373
401
  "svg",
374
402
  {
375
- class: "w-8 h-8 text-gray-400 dark:text-gray-600 animate-pulse",
403
+ class: notificationCenterEmptyIconClasses,
376
404
  fill: "none",
377
405
  viewBox: "0 0 24 24",
378
406
  stroke: "currentColor",
@@ -394,7 +422,7 @@ var NotificationCenter = defineComponent({
394
422
  tag: "div",
395
423
  size: "sm",
396
424
  color: "muted",
397
- class: "font-semibold text-gray-400 dark:text-gray-500"
425
+ class: notificationCenterEmptyTextClasses
398
426
  },
399
427
  { default: () => props.emptyText }
400
428
  )
@@ -454,14 +482,14 @@ var NotificationCenter = defineComponent({
454
482
  tag: "div",
455
483
  size: "base",
456
484
  weight: "bold",
457
- class: "text-gray-900 dark:text-gray-100"
485
+ class: notificationCenterTitleClasses
458
486
  },
459
487
  { default: () => props.title }
460
488
  ),
461
489
  totalUnread.value > 0 ? h(
462
490
  "span",
463
491
  {
464
- class: "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"
492
+ class: notificationCenterUnreadBadgeClasses
465
493
  },
466
494
  String(totalUnread.value)
467
495
  ) : null
@@ -473,8 +501,8 @@ var NotificationCenter = defineComponent({
473
501
  variant: "ghost",
474
502
  disabled: !hasUnread.value,
475
503
  class: classNames(
476
- "text-xs font-semibold transition-colors duration-200",
477
- hasUnread.value ? "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300" : "text-gray-400 dark:text-gray-600"
504
+ notificationCenterMarkAllBaseClasses,
505
+ hasUnread.value ? notificationCenterMarkAllEnabledClasses : notificationCenterMarkAllDisabledClasses
478
506
  ),
479
507
  onClick: handleMarkAllRead
480
508
  },
@@ -486,7 +514,7 @@ var NotificationCenter = defineComponent({
486
514
  const content = props.loading ? h("div", { class: "flex items-center justify-center py-16" }, [
487
515
  h(Loading, {
488
516
  text: props.loadingText,
489
- class: "text-blue-500 dark:text-blue-400 font-medium"
517
+ class: notificationCenterLoadingClasses
490
518
  })
491
519
  ]) : resolvedGroups.value.length > 0 ? h("div", { class: "-mx-4 -mb-4" }, [renderTabs()]) : h("div", { class: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto" }, [
492
520
  renderList(filteredFlatItems.value)
@@ -507,7 +535,7 @@ var NotificationCenter = defineComponent({
507
535
  Card,
508
536
  {
509
537
  variant: "bordered",
510
- 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"
538
+ className: notificationCenterCardClasses
511
539
  },
512
540
  {
513
541
  header: () => header,
@@ -87,7 +87,12 @@ var Image = defineComponent({
87
87
  floatingRef: hoverFloatingRef,
88
88
  floatingStyles: hoverFloatingStyles,
89
89
  triggerHandlers: hoverTriggerHandlers
90
- } = useFloatingPopup({ props: floatingPopupProps, emit });
90
+ } = useFloatingPopup({
91
+ props: floatingPopupProps,
92
+ // Hover visibility is internal; popup model events are not Image events.
93
+ emit: () => {
94
+ }
95
+ });
91
96
  const setContainerRef = (el) => {
92
97
  containerRef.value = el;
93
98
  hoverTriggerRef.value = el;
@@ -37,6 +37,43 @@ import {
37
37
  activityItemDescriptionClasses,
38
38
  activityItemActionsClasses
39
39
  } from "@expcat/tigercat-core";
40
+
41
+ // ../core/src/internal/activity-feed-styles.ts
42
+ var activityFeedActionClasses = "tiger-motion-aware inline-flex items-center px-2.5 py-1 rounded-[var(--tiger-radius-md,0.5rem)] text-xs font-semibold text-[var(--tiger-primary,#2563eb)] hover:bg-[var(--tiger-outline-bg-hover,#eff6ff)] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))]";
43
+ var activityFeedItemSurfaceClasses = "tiger-motion-aware p-4 rounded-[var(--tiger-radius-xl,1rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-[var(--tiger-shadow-sm,0_1px_2px_rgb(0_0_0_/_0.05))] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))] hover:shadow-[var(--tiger-shadow-glass-strong,0_4px_6px_-1px_rgb(0_0_0_/_0.1))] hover:-translate-y-0.5 w-full";
44
+ var activityFeedAvatarClasses = "tiger-motion-aware shrink-0 ring-2 ring-[var(--tiger-surface,#ffffff)] shadow-[var(--tiger-shadow-sm,0_1px_2px_rgb(0_0_0_/_0.05))] [transition:var(--tiger-transition-base,all_200ms_cubic-bezier(0.4,0,0.2,1))] hover:scale-105";
45
+ var activityFeedTitleClasses = "tiger-motion-aware text-[var(--tiger-text,#111827)] hover:text-[var(--tiger-primary,#2563eb)] transition-colors cursor-pointer truncate";
46
+ var activityFeedTimeClasses = "shrink-0 whitespace-nowrap font-medium text-[var(--tiger-text-muted,#6b7280)]";
47
+ var activityFeedDescriptionClasses = "text-[var(--tiger-text-secondary,#4b5563)] leading-relaxed pl-0.5 mt-1";
48
+ var activityFeedStateCardClasses = "bg-[var(--tiger-surface,#ffffff)] border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-xl,1rem)] shadow-[var(--tiger-shadow-sm,0_1px_2px_rgb(0_0_0_/_0.05))] overflow-hidden";
49
+ var activityFeedLoadingClasses = "text-[var(--tiger-primary,#2563eb)] font-medium";
50
+ var activityFeedEmptyIconClasses = "tiger-motion-aware w-12 h-12 text-[var(--tiger-text-muted,#9ca3af)] mb-3 animate-pulse";
51
+ var activityFeedGroupMarkerClasses = "w-1.5 h-3.5 bg-[var(--tiger-primary,#2563eb)] rounded-full shadow-sm";
52
+ var activityFeedGroupTitleClasses = "text-[var(--tiger-text,#111827)] uppercase tracking-wider";
53
+ var activityFeedDotBaseClasses = "w-3 h-3 rounded-full border-2 border-[var(--tiger-surface,#ffffff)] shadow-sm relative z-10";
54
+ var activityFeedDotPulseBaseClasses = "tiger-motion-aware absolute inline-flex h-full w-full rounded-full animate-ping opacity-75";
55
+ var dotVariantClasses = {
56
+ success: "bg-[var(--tiger-success,#16a34a)]",
57
+ warning: "bg-[var(--tiger-warning,#d97706)]",
58
+ error: "bg-[var(--tiger-error,#dc2626)]",
59
+ danger: "bg-[var(--tiger-error,#dc2626)]",
60
+ primary: "bg-[var(--tiger-primary,#2563eb)]",
61
+ info: "bg-[var(--tiger-primary,#2563eb)]"
62
+ };
63
+ var dotPulseVariantClasses = {
64
+ success: "bg-[var(--tiger-success,#16a34a)]/30",
65
+ warning: "bg-[var(--tiger-warning,#d97706)]/30",
66
+ error: "bg-[var(--tiger-error,#dc2626)]/30",
67
+ danger: "bg-[var(--tiger-error,#dc2626)]/30",
68
+ primary: "bg-[var(--tiger-primary,#2563eb)]/30",
69
+ info: "bg-[var(--tiger-primary,#2563eb)]/30"
70
+ };
71
+ var getActivityFeedDotClasses = (variant) => ({
72
+ dot: dotVariantClasses[variant ?? ""] ?? "bg-[var(--tiger-border,#d1d5db)]",
73
+ pulse: dotPulseVariantClasses[variant ?? ""] ?? ""
74
+ });
75
+
76
+ // src/components/ActivityFeed.ts
40
77
  var renderAction = (item, action, index) => {
41
78
  const key = action.key ?? `${item.id}-action-${index}`;
42
79
  return h(
@@ -49,7 +86,7 @@ var renderAction = (item, action, index) => {
49
86
  href: action.href,
50
87
  target: action.target,
51
88
  disabled: action.disabled,
52
- 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",
89
+ className: activityFeedActionClasses,
53
90
  onClick: () => action.onClick?.(item, action)
54
91
  },
55
92
  {
@@ -140,10 +177,7 @@ var ActivityFeed = defineComponent({
140
177
  return h(
141
178
  "div",
142
179
  {
143
- class: classNames(
144
- activityItemClasses,
145
- "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"
146
- )
180
+ class: classNames(activityItemClasses, activityFeedItemSurfaceClasses)
147
181
  },
148
182
  [
149
183
  h("div", { class: activityItemLayoutClasses }, [
@@ -151,7 +185,7 @@ var ActivityFeed = defineComponent({
151
185
  size: "sm",
152
186
  src: item.user.avatar,
153
187
  text: item.user.name,
154
- className: "shrink-0 ring-2 ring-white dark:ring-gray-900 shadow-sm transition-transform hover:scale-105 duration-200"
188
+ className: activityFeedAvatarClasses
155
189
  }) : null,
156
190
  h("div", { class: activityItemBodyClasses }, [
157
191
  h("div", { class: activityItemHeaderClasses }, [
@@ -162,7 +196,7 @@ var ActivityFeed = defineComponent({
162
196
  tag: "div",
163
197
  size: "sm",
164
198
  weight: "semibold",
165
- class: "text-gray-900 dark:text-gray-100 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer truncate"
199
+ class: activityFeedTitleClasses
166
200
  },
167
201
  { default: () => titleText }
168
202
  ) : null,
@@ -182,7 +216,7 @@ var ActivityFeed = defineComponent({
182
216
  tag: "div",
183
217
  size: "xs",
184
218
  color: "muted",
185
- class: "shrink-0 whitespace-nowrap font-medium text-gray-400 dark:text-gray-500"
219
+ class: activityFeedTimeClasses
186
220
  },
187
221
  { default: () => timeText }
188
222
  ) : null
@@ -195,7 +229,7 @@ var ActivityFeed = defineComponent({
195
229
  color: "muted",
196
230
  class: classNames(
197
231
  activityItemDescriptionClasses,
198
- "text-gray-600 dark:text-gray-300 leading-relaxed pl-0.5 mt-1"
232
+ activityFeedDescriptionClasses
199
233
  )
200
234
  },
201
235
  { default: () => descriptionText }
@@ -219,7 +253,7 @@ var ActivityFeed = defineComponent({
219
253
  if (props.loading) {
220
254
  const loadingNode = slots.loading ? slots.loading() : h(Loading, {
221
255
  text: props.loadingText,
222
- class: "text-blue-500 dark:text-blue-400 font-medium"
256
+ class: activityFeedLoadingClasses
223
257
  });
224
258
  return h(
225
259
  "div",
@@ -238,7 +272,7 @@ var ActivityFeed = defineComponent({
238
272
  {
239
273
  variant: "bordered",
240
274
  size: "sm",
241
- 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"
275
+ className: classNames("tiger-activity-feed-loading", activityFeedStateCardClasses)
242
276
  },
243
277
  {
244
278
  default: () => h("div", { class: "flex items-center justify-center py-8" }, loadingNode)
@@ -252,7 +286,7 @@ var ActivityFeed = defineComponent({
252
286
  h(
253
287
  "svg",
254
288
  {
255
- class: "w-12 h-12 text-gray-300 dark:text-gray-600 mb-3 animate-pulse",
289
+ class: activityFeedEmptyIconClasses,
256
290
  fill: "none",
257
291
  viewBox: "0 0 24 24",
258
292
  stroke: "currentColor",
@@ -288,7 +322,7 @@ var ActivityFeed = defineComponent({
288
322
  {
289
323
  variant: "bordered",
290
324
  size: "sm",
291
- 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"
325
+ className: classNames("tiger-activity-feed-empty", activityFeedStateCardClasses)
292
326
  },
293
327
  {
294
328
  default: () => emptyNode
@@ -314,7 +348,7 @@ var ActivityFeed = defineComponent({
314
348
  return h("div", { key: group.key ?? groupIndex, class: "space-y-3" }, [
315
349
  props.showGroupTitle && groupTitle ? headerNode ?? h("div", { class: "flex items-center gap-2 mb-2" }, [
316
350
  h("span", {
317
- class: "w-1.5 h-3.5 bg-blue-500 rounded-full dark:bg-blue-400 shadow-sm shadow-blue-500/20"
351
+ class: activityFeedGroupMarkerClasses
318
352
  }),
319
353
  h(
320
354
  Text,
@@ -322,7 +356,7 @@ var ActivityFeed = defineComponent({
322
356
  tag: "span",
323
357
  size: "sm",
324
358
  weight: "bold",
325
- class: "text-gray-900 dark:text-gray-100 uppercase tracking-wider"
359
+ class: activityFeedGroupTitleClasses
326
360
  },
327
361
  { default: () => groupTitle }
328
362
  )
@@ -331,33 +365,15 @@ var ActivityFeed = defineComponent({
331
365
  Timeline,
332
366
  {
333
367
  items: timelineItems,
334
- style: {
335
- "--tiger-border": "rgba(156, 163, 175, 0.18)"
336
- },
337
368
  renderDot: (timelineItem) => {
338
369
  const activity = timelineItem.activity;
339
370
  const statusVariant = activity?.status?.variant ?? "default";
340
- const baseDotClass = "w-3 h-3 rounded-full border-2 border-white dark:border-gray-950 shadow-sm";
341
- let colorClass = "bg-gray-300 dark:bg-gray-700";
342
- let pulseClass = "";
343
- if (statusVariant === "success") {
344
- colorClass = "bg-emerald-500";
345
- pulseClass = "bg-emerald-500/30";
346
- } else if (statusVariant === "warning") {
347
- colorClass = "bg-amber-500";
348
- pulseClass = "bg-amber-500/30";
349
- } else if (statusVariant === "error" || statusVariant === "danger") {
350
- colorClass = "bg-rose-500";
351
- pulseClass = "bg-rose-500/30";
352
- } else if (statusVariant === "primary" || statusVariant === "info") {
353
- colorClass = "bg-blue-500";
354
- pulseClass = "bg-blue-500/30";
355
- }
371
+ const dotClasses = getActivityFeedDotClasses(statusVariant);
356
372
  return h("div", { class: "relative flex items-center justify-center w-4 h-4" }, [
357
- pulseClass ? h("span", {
358
- class: `absolute inline-flex h-full w-full rounded-full animate-ping opacity-75 ${pulseClass}`
373
+ dotClasses.pulse ? h("span", {
374
+ class: `${activityFeedDotPulseBaseClasses} ${dotClasses.pulse}`
359
375
  }) : null,
360
- h("span", { class: `${baseDotClass} ${colorClass} relative z-10` })
376
+ h("span", { class: `${activityFeedDotBaseClasses} ${dotClasses.dot}` })
361
377
  ]);
362
378
  }
363
379
  },
@@ -459,22 +459,35 @@ var BarChart = defineComponent({
459
459
  y: tooltipPosition.value.y
460
460
  }) : null;
461
461
  if (!props.showLegend) {
462
- return h("div", { class: "inline-block relative" }, [chart, tooltip]);
462
+ return h(
463
+ "div",
464
+ {
465
+ class: classNames(
466
+ "relative",
467
+ props.responsive ? "block w-full min-w-0" : "inline-block"
468
+ )
469
+ },
470
+ [chart, tooltip]
471
+ );
463
472
  }
464
- return h("div", { class: wrapperClasses.value }, [
465
- chart,
466
- h(ChartLegend, {
467
- items: legendItems.value,
468
- position: props.legendPosition,
469
- markerSize: props.legendMarkerSize,
470
- gap: props.legendGap,
471
- interactive: props.hoverable || props.selectable,
472
- onItemClick: handleLegendClick,
473
- onItemHover: handleLegendHover,
474
- onItemLeave: handleLegendLeave
475
- }),
476
- tooltip
477
- ]);
473
+ return h(
474
+ "div",
475
+ { class: classNames(wrapperClasses.value, props.responsive && "w-full min-w-0") },
476
+ [
477
+ chart,
478
+ h(ChartLegend, {
479
+ items: legendItems.value,
480
+ position: props.legendPosition,
481
+ markerSize: props.legendMarkerSize,
482
+ gap: props.legendGap,
483
+ interactive: props.hoverable || props.selectable,
484
+ onItemClick: handleLegendClick,
485
+ onItemHover: handleLegendHover,
486
+ onItemLeave: handleLegendLeave
487
+ }),
488
+ tooltip
489
+ ]
490
+ );
478
491
  };
479
492
  }
480
493
  });
@@ -390,7 +390,6 @@ var Dropdown = defineComponent({
390
390
  }
391
391
  );
392
392
  provide(DropdownContextKey, dropdownContext);
393
- const _menuItemTabIndex = -1;
394
393
  return () => {
395
394
  const defaultSlot = slots.default?.();
396
395
  const triggerSlot = slots.trigger?.({ open: currentVisible.value });
@@ -349,23 +349,36 @@ var ScatterChart = defineComponent({
349
349
  y: tooltipPosition.value.y
350
350
  }) : null;
351
351
  if (!props.showLegend) {
352
- return h("div", { class: "inline-block relative" }, [chart, tooltip]);
352
+ return h(
353
+ "div",
354
+ {
355
+ class: classNames(
356
+ "relative",
357
+ props.responsive ? "block w-full min-w-0" : "inline-block"
358
+ )
359
+ },
360
+ [chart, tooltip]
361
+ );
353
362
  }
354
- return h("div", { class: wrapperClasses.value }, [
355
- chart,
356
- h(ChartLegend, {
357
- items: legendItems.value,
358
- position: props.legendPosition,
359
- markerSize: props.legendMarkerSize,
360
- gap: props.legendGap,
361
- ariaLabel: labels.value.legendAriaLabel,
362
- interactive: props.hoverable || props.selectable,
363
- onItemClick: handleLegendClick,
364
- onItemHover: handleLegendHover,
365
- onItemLeave: handleLegendLeave
366
- }),
367
- tooltip
368
- ]);
363
+ return h(
364
+ "div",
365
+ { class: classNames(wrapperClasses.value, props.responsive && "w-full min-w-0") },
366
+ [
367
+ chart,
368
+ h(ChartLegend, {
369
+ items: legendItems.value,
370
+ position: props.legendPosition,
371
+ markerSize: props.legendMarkerSize,
372
+ gap: props.legendGap,
373
+ ariaLabel: labels.value.legendAriaLabel,
374
+ interactive: props.hoverable || props.selectable,
375
+ onItemClick: handleLegendClick,
376
+ onItemHover: handleLegendHover,
377
+ onItemLeave: handleLegendLeave
378
+ }),
379
+ tooltip
380
+ ]
381
+ );
369
382
  };
370
383
  }
371
384
  });
@@ -673,22 +673,35 @@ var LineChart = defineComponent({
673
673
  y: tooltipPosition.value.y
674
674
  }) : null;
675
675
  if (!props.showLegend) {
676
- return h("div", { class: "inline-block relative" }, [chart, tooltip]);
676
+ return h(
677
+ "div",
678
+ {
679
+ class: classNames(
680
+ "relative",
681
+ props.responsive ? "block w-full min-w-0" : "inline-block"
682
+ )
683
+ },
684
+ [chart, tooltip]
685
+ );
677
686
  }
678
- return h("div", { class: wrapperClasses.value }, [
679
- chart,
680
- h(ChartLegend, {
681
- items: legendItems.value,
682
- position: props.legendPosition,
683
- markerSize: props.legendMarkerSize,
684
- gap: props.legendGap,
685
- interactive: props.hoverable || props.selectable,
686
- onItemClick: handleLegendClick,
687
- onItemHover: handleLegendHover,
688
- onItemLeave: handleLegendLeave
689
- }),
690
- tooltip
691
- ]);
687
+ return h(
688
+ "div",
689
+ { class: classNames(wrapperClasses.value, props.responsive && "w-full min-w-0") },
690
+ [
691
+ chart,
692
+ h(ChartLegend, {
693
+ items: legendItems.value,
694
+ position: props.legendPosition,
695
+ markerSize: props.legendMarkerSize,
696
+ gap: props.legendGap,
697
+ interactive: props.hoverable || props.selectable,
698
+ onItemClick: handleLegendClick,
699
+ onItemHover: handleLegendHover,
700
+ onItemLeave: handleLegendLeave
701
+ }),
702
+ tooltip
703
+ ]
704
+ );
692
705
  };
693
706
  }
694
707
  });
@@ -717,22 +717,35 @@ var AreaChart = defineComponent({
717
717
  y: tooltipPosition.value.y
718
718
  }) : null;
719
719
  if (!props.showLegend) {
720
- return h("div", { class: "inline-block relative" }, [chart, tooltip]);
720
+ return h(
721
+ "div",
722
+ {
723
+ class: classNames(
724
+ "relative",
725
+ props.responsive ? "block w-full min-w-0" : "inline-block"
726
+ )
727
+ },
728
+ [chart, tooltip]
729
+ );
721
730
  }
722
- return h("div", { class: wrapperClasses.value }, [
723
- chart,
724
- h(ChartLegend, {
725
- items: legendItems.value,
726
- position: props.legendPosition,
727
- markerSize: props.legendMarkerSize,
728
- gap: props.legendGap,
729
- interactive: props.hoverable || props.selectable,
730
- onItemClick: handleSeriesSelect,
731
- onItemHover: handleSeriesHoverEnter,
732
- onItemLeave: handleSeriesHoverLeave
733
- }),
734
- tooltip
735
- ]);
731
+ return h(
732
+ "div",
733
+ { class: classNames(wrapperClasses.value, props.responsive && "w-full min-w-0") },
734
+ [
735
+ chart,
736
+ h(ChartLegend, {
737
+ items: legendItems.value,
738
+ position: props.legendPosition,
739
+ markerSize: props.legendMarkerSize,
740
+ gap: props.legendGap,
741
+ interactive: props.hoverable || props.selectable,
742
+ onItemClick: handleSeriesSelect,
743
+ onItemHover: handleSeriesHoverEnter,
744
+ onItemLeave: handleSeriesHoverLeave
745
+ }),
746
+ tooltip
747
+ ]
748
+ );
736
749
  };
737
750
  }
738
751
  });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ActivityFeed,
3
3
  ActivityFeed_default
4
- } from "../chunk-3NQUEQJT.mjs";
4
+ } from "../chunk-NP6DZQ3O.mjs";
5
5
  import "../chunk-JQSIWPNM.mjs";
6
6
  import "../chunk-3MO7A4GU.mjs";
7
7
  import "../chunk-O6BN5R6J.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AreaChart,
3
3
  AreaChart_default
4
- } from "../chunk-JVQPU4M2.mjs";
4
+ } from "../chunk-ZGA66PSG.mjs";
5
5
  import "../chunk-PE5OA4YG.mjs";
6
6
  import "../chunk-SPFL55TF.mjs";
7
7
  import "../chunk-ZWVA7HT3.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BarChart,
3
3
  BarChart_default
4
- } from "../chunk-5KPO3EDM.mjs";
4
+ } from "../chunk-OTHJIFDV.mjs";
5
5
  import "../chunk-PE5OA4YG.mjs";
6
6
  import "../chunk-SPFL55TF.mjs";
7
7
  import "../chunk-ZWVA7HT3.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CommentThread,
3
3
  CommentThread_default
4
- } from "../chunk-QFG452MD.mjs";
4
+ } from "../chunk-5RXYJWNA.mjs";
5
5
  import "../chunk-2OI6GWOT.mjs";
6
6
  import "../chunk-VIIGYWUY.mjs";
7
7
  import "../chunk-YZBQ6IR7.mjs";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  CropUpload,
3
3
  CropUpload_default
4
- } from "../chunk-CFH5T3V2.mjs";
4
+ } from "../chunk-DKMKJZ7A.mjs";
5
5
  import "../chunk-D4APFWWS.mjs";
6
- import "../chunk-7JT5ZIHC.mjs";
6
+ import "../chunk-BCU7GYF6.mjs";
7
7
  import "../chunk-YZBQ6IR7.mjs";
8
8
  import "../chunk-Z2ZECCGD.mjs";
9
9
  import "../chunk-BDTPFPSB.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DataExport
3
- } from "../chunk-H26JXVJX.mjs";
4
- import "../chunk-BNNTDSLJ.mjs";
3
+ } from "../chunk-A7QIMKWQ.mjs";
4
+ import "../chunk-SK2QJ66E.mjs";
5
5
  import "../chunk-BDTPFPSB.mjs";
6
6
  import "../chunk-UOJOJBEU.mjs";
7
7
  import "../chunk-TGXBCKOU.mjs";
@@ -4,7 +4,7 @@ import {
4
4
  DropdownItem,
5
5
  DropdownMenu,
6
6
  Dropdown_default
7
- } from "../chunk-BNNTDSLJ.mjs";
7
+ } from "../chunk-SK2QJ66E.mjs";
8
8
  import "../chunk-BDTPFPSB.mjs";
9
9
  export {
10
10
  Dropdown,
@@ -2,7 +2,7 @@ import {
2
2
  IMAGE_GROUP_INJECTION_KEY,
3
3
  Image,
4
4
  Image_default
5
- } from "../chunk-IMFHJEUX.mjs";
5
+ } from "../chunk-JKPXJ3VB.mjs";
6
6
  import "../chunk-LPZBXTJ6.mjs";
7
7
  import "../chunk-KE6RGD4Y.mjs";
8
8
  import "../chunk-BDTPFPSB.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ImageCropper,
3
3
  ImageCropper_default
4
- } from "../chunk-7JT5ZIHC.mjs";
4
+ } from "../chunk-BCU7GYF6.mjs";
5
5
  import "../chunk-UOJOJBEU.mjs";
6
6
  import "../chunk-TGXBCKOU.mjs";
7
7
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  InfiniteScroll,
3
3
  InfiniteScroll_default
4
- } from "../chunk-36TZA5BH.mjs";
4
+ } from "../chunk-A5QYJSHK.mjs";
5
5
  import "../chunk-UOJOJBEU.mjs";
6
6
  import "../chunk-TGXBCKOU.mjs";
7
7
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  LineChart,
3
3
  LineChart_default
4
- } from "../chunk-GWFVBG22.mjs";
4
+ } from "../chunk-XGXZF27U.mjs";
5
5
  import "../chunk-PE5OA4YG.mjs";
6
6
  import "../chunk-SPFL55TF.mjs";
7
7
  import "../chunk-ZWVA7HT3.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NotificationCenter,
3
3
  NotificationCenter_default
4
- } from "../chunk-SUORTZUY.mjs";
4
+ } from "../chunk-EZZD4OCV.mjs";
5
5
  import "../chunk-U6OGGZBY.mjs";
6
6
  import "../chunk-KOG3HKOF.mjs";
7
7
  import "../chunk-2LIIMWBR.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ScatterChart,
3
3
  ScatterChart_default
4
- } from "../chunk-JZCETBUV.mjs";
4
+ } from "../chunk-WUQMFKQ6.mjs";
5
5
  import "../chunk-PE5OA4YG.mjs";
6
6
  import "../chunk-SPFL55TF.mjs";
7
7
  import "../chunk-ZWVA7HT3.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Upload,
3
3
  Upload_default
4
- } from "../chunk-7CPMXNLK.mjs";
4
+ } from "../chunk-BNYA5IUB.mjs";
5
5
  import "../chunk-UOJOJBEU.mjs";
6
6
  import "../chunk-TGXBCKOU.mjs";
7
7
  export {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  VirtualTable,
3
3
  VirtualTable_default
4
- } from "../chunk-EGIQPUEL.mjs";
4
+ } from "../chunk-5C32WCQY.mjs";
5
5
  import "../chunk-UOJOJBEU.mjs";
6
6
  import "../chunk-TGXBCKOU.mjs";
7
7
  export {
package/dist/index.d.mts CHANGED
@@ -149,6 +149,6 @@ import 'vue';
149
149
  * Vue 3 components for Tigercat UI library
150
150
  */
151
151
 
152
- declare const version = "2.0.0-rc.1";
152
+ declare const version = "2.0.0";
153
153
 
154
154
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expcat/tigercat-vue",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0",
4
4
  "description": "Vue 3 components for Tigercat UI library",
5
5
  "license": "MIT",
6
6
  "author": "Yizhe Wang",
@@ -783,15 +783,15 @@
783
783
  "access": "public"
784
784
  },
785
785
  "dependencies": {
786
- "@expcat/tigercat-core": "2.0.0-rc.1"
786
+ "@expcat/tigercat-core": "2.0.0"
787
787
  },
788
788
  "devDependencies": {
789
- "@types/node": "^22.20.0",
789
+ "@types/node": "^26.1.1",
790
790
  "@vitejs/plugin-vue": "^6.0.7",
791
791
  "tsup": "^8.5.1",
792
792
  "typescript": "^6.0.3",
793
- "vite": "^8.1.0",
794
- "vue": "^3.5.38"
793
+ "vite": "^8.1.3",
794
+ "vue": "^3.5.39"
795
795
  },
796
796
  "peerDependencies": {
797
797
  "vue": "^3.0.0"