@expcat/tigercat-react 1.2.23 → 1.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-MMGZEG7G.mjs → chunk-56DP32W7.mjs} +93 -45
- package/dist/{chunk-36WZNVQ5.mjs → chunk-5XE5VBDS.mjs} +2 -3
- package/dist/{chunk-2DH6MGC6.js → chunk-7KPALCG3.js} +11 -7
- package/dist/{chunk-7YUD6VIC.js → chunk-APODZAVO.js} +47 -16
- package/dist/{chunk-LKKZLYCA.mjs → chunk-CPNDCACQ.mjs} +1 -1
- package/dist/{chunk-XHT2VIDR.js → chunk-FXVKJWUP.js} +19 -9
- package/dist/{chunk-RUZQN7X3.js → chunk-FZIF5LZW.js} +52 -25
- package/dist/{chunk-X37Q7VME.mjs → chunk-GYFR2O27.mjs} +11 -7
- package/dist/chunk-I5YYA7FB.mjs +244 -0
- package/dist/{chunk-3FEFHD3E.mjs → chunk-IUOTJ73N.mjs} +1 -0
- package/dist/{chunk-T7ACOL7K.mjs → chunk-IWLUYAZV.mjs} +62 -15
- package/dist/{chunk-5EZWYEGJ.js → chunk-IXHXSD2E.js} +65 -18
- package/dist/{chunk-EX63M5ID.js → chunk-JCINYGGM.js} +93 -45
- package/dist/{chunk-CSH2QOOH.js → chunk-K5B4XXAI.js} +2 -2
- package/dist/{chunk-UE52NMPO.js → chunk-KTV3ZDSQ.js} +1 -0
- package/dist/{chunk-XPA2YCQO.js → chunk-M7HBWFQO.js} +1 -2
- package/dist/{chunk-DTYDPMNR.js → chunk-P4INKEQ3.js} +76 -9
- package/dist/{chunk-5XS6PXBX.mjs → chunk-PKWHSCFK.mjs} +52 -25
- package/dist/{chunk-J5R4Q2QM.mjs → chunk-UQOMRXTD.mjs} +74 -7
- package/dist/chunk-UVWLYRAC.js +244 -0
- package/dist/{chunk-6CAKUMWV.mjs → chunk-VUODYCCC.mjs} +46 -15
- package/dist/{chunk-ZB55SAGI.mjs → chunk-WWDCH2XX.mjs} +19 -9
- package/dist/components/ActivityFeed.js +2 -2
- package/dist/components/ActivityFeed.mjs +1 -1
- package/dist/components/ChatWindow.js +3 -2
- package/dist/components/ChatWindow.mjs +2 -1
- package/dist/components/CommentThread.js +2 -2
- package/dist/components/CommentThread.mjs +1 -1
- package/dist/components/CropUpload.js +2 -2
- package/dist/components/CropUpload.mjs +1 -1
- package/dist/components/DataTableWithToolbar.js +4 -3
- package/dist/components/DataTableWithToolbar.mjs +3 -2
- package/dist/components/FormWizard.js +3 -3
- package/dist/components/FormWizard.mjs +2 -2
- package/dist/components/Kanban.js +3 -3
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/NotificationCenter.js +2 -2
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/Steps.js +2 -2
- package/dist/components/Steps.mjs +1 -1
- package/dist/components/StepsItem.js +2 -2
- package/dist/components/StepsItem.mjs +1 -1
- package/dist/components/Table.js +3 -2
- package/dist/components/Table.mjs +2 -1
- package/dist/components/TaskBoard.js +2 -2
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +14 -14
- package/package.json +2 -2
- package/dist/chunk-DXMSDLVJ.js +0 -168
- package/dist/chunk-GBJILZTY.mjs +0 -168
|
@@ -95,23 +95,9 @@ var CommentThread = ({
|
|
|
95
95
|
updateExpandedKeys(next);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
const BTN_BASE = "px-
|
|
99
|
-
const ACTION_BTN = `${BTN_BASE} text-gray-
|
|
100
|
-
const PRIMARY_BTN = `${BTN_BASE} text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary-hover,#1d4ed8)] font-
|
|
101
|
-
const renderActionButton = (label, key, onClick, active) => /* @__PURE__ */ jsx(
|
|
102
|
-
Button,
|
|
103
|
-
{
|
|
104
|
-
size: "sm",
|
|
105
|
-
variant: "ghost",
|
|
106
|
-
className: classNames(
|
|
107
|
-
ACTION_BTN,
|
|
108
|
-
active && "text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary,#2563eb)] font-medium"
|
|
109
|
-
),
|
|
110
|
-
onClick,
|
|
111
|
-
children: label
|
|
112
|
-
},
|
|
113
|
-
key
|
|
114
|
-
);
|
|
98
|
+
const BTN_BASE = "px-2 py-0.5 h-auto min-h-0 text-xs rounded-md transition-all duration-200 ease-out";
|
|
99
|
+
const ACTION_BTN = `${BTN_BASE} text-gray-500 dark:text-gray-400 font-medium flex items-center gap-1.5`;
|
|
100
|
+
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`;
|
|
115
101
|
const renderNode = (node, depth, isLast) => {
|
|
116
102
|
const hasChildren = !!node.children && node.children.length > 0;
|
|
117
103
|
const isExpanded = expandedSet.has(node.id);
|
|
@@ -125,24 +111,70 @@ var CommentThread = ({
|
|
|
125
111
|
const likeLabel = node.liked ? likedText : likeText;
|
|
126
112
|
const likeCount = node.likes ? ` ${node.likes}` : "";
|
|
127
113
|
actions.push(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
114
|
+
/* @__PURE__ */ jsxs(
|
|
115
|
+
Button,
|
|
116
|
+
{
|
|
117
|
+
size: "sm",
|
|
118
|
+
variant: "ghost",
|
|
119
|
+
className: classNames(
|
|
120
|
+
ACTION_BTN,
|
|
121
|
+
"hover:text-blue-600 hover:bg-blue-50/50 dark:hover:text-blue-400 dark:hover:bg-blue-950/20",
|
|
122
|
+
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"
|
|
123
|
+
),
|
|
124
|
+
onClick: () => onLike?.(node, !node.liked),
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx("svg", { className: classNames("w-3.5 h-3.5 transition-transform duration-200 active:scale-125", node.liked ? "fill-current" : "stroke-current fill-none"), viewBox: "0 0 24 24", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.421.068.848.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 010-7.764c.26-.85.1083-1.368 1.972-1.368h.908c.445 0 .72.498.523.898a8.963 8.963 0 00-.27.602" }) }),
|
|
127
|
+
/* @__PURE__ */ jsx("span", { children: `${likeLabel}${likeCount}` })
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"like"
|
|
133
131
|
)
|
|
134
132
|
);
|
|
135
133
|
}
|
|
136
134
|
if (showReply) {
|
|
137
135
|
actions.push(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
/* @__PURE__ */ jsxs(
|
|
137
|
+
Button,
|
|
138
|
+
{
|
|
139
|
+
size: "sm",
|
|
140
|
+
variant: "ghost",
|
|
141
|
+
className: classNames(
|
|
142
|
+
ACTION_BTN,
|
|
143
|
+
"hover:text-emerald-600 hover:bg-emerald-50/50 dark:hover:text-emerald-400 dark:hover:bg-emerald-950/20"
|
|
144
|
+
),
|
|
145
|
+
onClick: () => {
|
|
146
|
+
setReplyingTo((prev) => prev === node.id ? null : node.id);
|
|
147
|
+
setReplyValue("");
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.625 12a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
151
|
+
/* @__PURE__ */ jsx("span", { children: replyText })
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"reply"
|
|
155
|
+
)
|
|
142
156
|
);
|
|
143
157
|
}
|
|
144
158
|
if (showMore) {
|
|
145
|
-
actions.push(
|
|
159
|
+
actions.push(
|
|
160
|
+
/* @__PURE__ */ jsxs(
|
|
161
|
+
Button,
|
|
162
|
+
{
|
|
163
|
+
size: "sm",
|
|
164
|
+
variant: "ghost",
|
|
165
|
+
className: classNames(
|
|
166
|
+
ACTION_BTN,
|
|
167
|
+
"hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
168
|
+
),
|
|
169
|
+
onClick: () => onMore?.(node),
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ jsx("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM12.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM18.75 12a.75.75 0 11-1.5 0 .75.75 0 011.5 0z" }) }),
|
|
172
|
+
/* @__PURE__ */ jsx("span", { children: moreText })
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"more"
|
|
176
|
+
)
|
|
177
|
+
);
|
|
146
178
|
}
|
|
147
179
|
if (node.actions && node.actions.length > 0) {
|
|
148
180
|
node.actions.forEach((action, index) => {
|
|
@@ -153,7 +185,10 @@ var CommentThread = ({
|
|
|
153
185
|
{
|
|
154
186
|
size: "sm",
|
|
155
187
|
variant: action.variant ?? "ghost",
|
|
156
|
-
className:
|
|
188
|
+
className: classNames(
|
|
189
|
+
ACTION_BTN,
|
|
190
|
+
"hover:bg-gray-100 dark:hover:bg-gray-800"
|
|
191
|
+
),
|
|
157
192
|
disabled: action.disabled,
|
|
158
193
|
onClick: () => {
|
|
159
194
|
action.onClick?.(node, action);
|
|
@@ -171,8 +206,8 @@ var CommentThread = ({
|
|
|
171
206
|
{
|
|
172
207
|
className: classNames(
|
|
173
208
|
"tiger-comment-thread-item",
|
|
174
|
-
depth === 1 && "py-
|
|
175
|
-
depth === 1 && !isLast && showDivider && "border-b border-
|
|
209
|
+
depth === 1 && "py-5",
|
|
210
|
+
depth === 1 && !isLast && showDivider && "border-b border-gray-100 dark:border-gray-800/80"
|
|
176
211
|
),
|
|
177
212
|
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
178
213
|
showAvatar && node.user ? /* @__PURE__ */ jsx(
|
|
@@ -181,27 +216,27 @@ var CommentThread = ({
|
|
|
181
216
|
size: depth === 1 ? "md" : "sm",
|
|
182
217
|
src: node.user.avatar,
|
|
183
218
|
text: node.user.name,
|
|
184
|
-
className: "shrink-0 mt-0.5"
|
|
219
|
+
className: "shrink-0 mt-0.5 ring-1 ring-black/5 dark:ring-white/10 shadow-sm transition-transform hover:scale-105 duration-200"
|
|
185
220
|
}
|
|
186
221
|
) : null,
|
|
187
222
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
188
223
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
189
|
-
node.user?.name ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "sm", weight: "bold", children: node.user.name }) : null,
|
|
190
|
-
node.user?.title ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "xs", color: "muted", children: node.user.title }) : null,
|
|
191
|
-
node.tag ? /* @__PURE__ */ jsx(Tag, { size: "sm", variant: node.tag.variant ?? "default", children: node.tag.label }) : null,
|
|
192
|
-
node.tags?.map((tag, index) => /* @__PURE__ */ jsx(Tag, { size: "sm", variant: tag.variant ?? "default", children: tag.label }, `${node.id}-tag-${index}`)),
|
|
193
|
-
node.time ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "xs", color: "muted", className: "ml-auto", children: formatCommentTime(node.time) }) : null
|
|
224
|
+
node.user?.name ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "sm", weight: "bold", className: "text-gray-900 dark:text-gray-100 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer", children: node.user.name }) : null,
|
|
225
|
+
node.user?.title ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "xs", color: "muted", className: "bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-gray-500 dark:text-gray-400 font-medium", children: node.user.title }) : null,
|
|
226
|
+
node.tag ? /* @__PURE__ */ jsx(Tag, { size: "sm", variant: node.tag.variant ?? "default", className: "rounded-full px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase border border-current bg-opacity-10", children: node.tag.label }) : null,
|
|
227
|
+
node.tags?.map((tag, index) => /* @__PURE__ */ jsx(Tag, { size: "sm", variant: tag.variant ?? "default", className: "rounded-full px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase border border-current bg-opacity-10", children: tag.label }, `${node.id}-tag-${index}`)),
|
|
228
|
+
node.time ? /* @__PURE__ */ jsx(Text, { tag: "span", size: "xs", color: "muted", className: "ml-auto text-gray-400 dark:text-gray-500 font-normal", children: formatCommentTime(node.time) }) : null
|
|
194
229
|
] }),
|
|
195
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-
|
|
196
|
-
actions.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1", children: actions }) : null,
|
|
197
|
-
replyingTo === node.id ? /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-
|
|
230
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm text-gray-600 dark:text-gray-300 leading-relaxed break-words mt-2 mb-3 pr-2", children: node.content }),
|
|
231
|
+
actions.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-1.5", children: actions }) : null,
|
|
232
|
+
replyingTo === node.id ? /* @__PURE__ */ jsxs("div", { className: "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", children: [
|
|
198
233
|
/* @__PURE__ */ jsx(
|
|
199
234
|
Textarea,
|
|
200
235
|
{
|
|
201
|
-
rows:
|
|
236
|
+
rows: 3,
|
|
202
237
|
value: replyValue,
|
|
203
238
|
placeholder: replyPlaceholder,
|
|
204
|
-
className: "bg-
|
|
239
|
+
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",
|
|
205
240
|
onChange: (event) => setReplyValue(event.target.value)
|
|
206
241
|
}
|
|
207
242
|
),
|
|
@@ -211,6 +246,7 @@ var CommentThread = ({
|
|
|
211
246
|
{
|
|
212
247
|
size: "sm",
|
|
213
248
|
variant: "ghost",
|
|
249
|
+
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",
|
|
214
250
|
onClick: () => {
|
|
215
251
|
setReplyingTo(null);
|
|
216
252
|
setReplyValue("");
|
|
@@ -218,7 +254,16 @@ var CommentThread = ({
|
|
|
218
254
|
children: cancelReplyText
|
|
219
255
|
}
|
|
220
256
|
),
|
|
221
|
-
/* @__PURE__ */ jsx(
|
|
257
|
+
/* @__PURE__ */ jsx(
|
|
258
|
+
Button,
|
|
259
|
+
{
|
|
260
|
+
size: "sm",
|
|
261
|
+
variant: "primary",
|
|
262
|
+
className: "px-3 py-1.5 text-xs font-semibold shadow-sm hover:shadow transition-all duration-200 rounded-lg",
|
|
263
|
+
onClick: () => handleReplySubmit(node),
|
|
264
|
+
children: replyButtonText
|
|
265
|
+
}
|
|
266
|
+
)
|
|
222
267
|
] })
|
|
223
268
|
] }) : null,
|
|
224
269
|
hasChildren ? /* @__PURE__ */ jsx(
|
|
@@ -226,7 +271,7 @@ var CommentThread = ({
|
|
|
226
271
|
{
|
|
227
272
|
size: "sm",
|
|
228
273
|
variant: "ghost",
|
|
229
|
-
className: classNames("mt-2", PRIMARY_BTN),
|
|
274
|
+
className: classNames("mt-2 font-semibold hover:bg-[var(--tiger-primary,#2563eb)]/10 dark:hover:bg-blue-400/10 transition-colors", PRIMARY_BTN),
|
|
230
275
|
"aria-expanded": isExpanded,
|
|
231
276
|
"aria-controls": repliesId,
|
|
232
277
|
onClick: () => toggleExpanded(node.id),
|
|
@@ -237,7 +282,7 @@ var CommentThread = ({
|
|
|
237
282
|
"div",
|
|
238
283
|
{
|
|
239
284
|
id: repliesId,
|
|
240
|
-
className: "mt-
|
|
285
|
+
className: "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",
|
|
241
286
|
children: [
|
|
242
287
|
visibleChildren.map(
|
|
243
288
|
(child, index) => renderNode(child, depth + 1, index === visibleChildren.length - 1)
|
|
@@ -269,7 +314,10 @@ var CommentThread = ({
|
|
|
269
314
|
"data-tiger-comment-thread": true,
|
|
270
315
|
"aria-label": divProps["aria-label"] ?? (divProps["aria-labelledby"] ? void 0 : "\u8BC4\u8BBA\u7EBF\u7A0B"),
|
|
271
316
|
...divProps,
|
|
272
|
-
children: resolvedNodes.length === 0 ? /* @__PURE__ */
|
|
317
|
+
children: resolvedNodes.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "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", children: [
|
|
318
|
+
/* @__PURE__ */ jsx("svg", { className: "w-10 h-10 text-gray-300 dark:text-gray-600 mb-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.625 12a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
319
|
+
/* @__PURE__ */ jsx(Text, { tag: "div", size: "sm", color: "muted", className: "font-medium", children: emptyText })
|
|
320
|
+
] }) : resolvedNodes.map((node, index) => renderNode(node, 1, index === resolvedNodes.length - 1))
|
|
273
321
|
}
|
|
274
322
|
);
|
|
275
323
|
};
|
|
@@ -9,8 +9,7 @@ import {
|
|
|
9
9
|
getStepTailClasses,
|
|
10
10
|
getStepTitleClasses,
|
|
11
11
|
getStepsContainerClasses,
|
|
12
|
-
calculateStepStatus
|
|
13
|
-
stepFinishChar
|
|
12
|
+
calculateStepStatus
|
|
14
13
|
} from "@expcat/tigercat-core";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
15
|
var StepsContext = createContext(null);
|
|
@@ -65,7 +64,7 @@ var StepsItem = ({
|
|
|
65
64
|
return /* @__PURE__ */ jsx("div", { className: iconClasses, children: icon });
|
|
66
65
|
}
|
|
67
66
|
if (stepStatus === "finish") {
|
|
68
|
-
return /* @__PURE__ */ jsx("div", { className: iconClasses, "aria-hidden": "true", children:
|
|
67
|
+
return /* @__PURE__ */ jsx("div", { className: iconClasses, "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 shrink-0 transition-transform duration-300 animate-fade-in", fill: "none", stroke: "currentColor", strokeWidth: "3", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" }) }) });
|
|
69
68
|
}
|
|
70
69
|
return /* @__PURE__ */ jsx("div", { className: iconClasses, children: stepIndex + 1 });
|
|
71
70
|
};
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
var _chunkP36GX65Njs = require('./chunk-P36GX65N.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkZRHDNGWOjs = require('./chunk-ZRHDNGWO.js');
|
|
7
|
+
|
|
8
|
+
|
|
6
9
|
var _chunkZYJTHGQWjs = require('./chunk-ZYJTHGQW.js');
|
|
7
10
|
|
|
8
11
|
|
|
@@ -64,7 +67,7 @@ var ChatWindow = ({
|
|
|
64
67
|
const inputValue = value !== void 0 ? value : innerValue;
|
|
65
68
|
const wrapperClasses = _react.useMemo.call(void 0,
|
|
66
69
|
() => _tigercatcore.classNames.call(void 0,
|
|
67
|
-
"tiger-chat-window flex flex-col w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)]",
|
|
70
|
+
"tiger-chat-window flex flex-col w-full rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm overflow-hidden transition-all duration-300",
|
|
68
71
|
className
|
|
69
72
|
),
|
|
70
73
|
[className]
|
|
@@ -144,8 +147,8 @@ var ChatWindow = ({
|
|
|
144
147
|
"div",
|
|
145
148
|
{
|
|
146
149
|
className: _tigercatcore.classNames.call(void 0,
|
|
147
|
-
"rounded-[var(--tiger-radius-
|
|
148
|
-
isSelf ? "bg-[var(--tiger-primary,#2563eb)] text-white rounded-tr-
|
|
150
|
+
"rounded-[var(--tiger-radius-lg,0.75rem)] px-4 py-2.5 text-sm break-words shadow-sm transition-all",
|
|
151
|
+
isSelf ? "bg-[var(--tiger-primary,#2563eb)] text-white rounded-tr-[var(--tiger-radius-sm,0.375rem)]" : "bg-[var(--tiger-surface,#ffffff)] border border-[var(--tiger-border,#e5e7eb)] text-[var(--tiger-text,#111827)] rounded-tl-[var(--tiger-radius-sm,0.375rem)]"
|
|
149
152
|
),
|
|
150
153
|
"data-tiger-chat-bubble": true,
|
|
151
154
|
children: _nullishCoalesce(_optionalChain([renderMessage, 'optionalCall', _6 => _6(message, index)]), () => ( message.content))
|
|
@@ -177,6 +180,7 @@ var ChatWindow = ({
|
|
|
177
180
|
"div",
|
|
178
181
|
{
|
|
179
182
|
ref: messageListRef,
|
|
183
|
+
className: "flex-1 overflow-auto bg-[var(--tiger-surface-muted,#f9fafb)]",
|
|
180
184
|
role: "log",
|
|
181
185
|
"aria-live": "polite",
|
|
182
186
|
"aria-relevant": "additions text",
|
|
@@ -195,16 +199,16 @@ var ChatWindow = ({
|
|
|
195
199
|
"div",
|
|
196
200
|
{
|
|
197
201
|
ref: messageListRef,
|
|
198
|
-
className: "flex-1 overflow-auto p-
|
|
202
|
+
className: "flex-1 overflow-auto p-5 space-y-4 bg-[var(--tiger-surface-muted,#f9fafb)]",
|
|
199
203
|
role: "log",
|
|
200
204
|
"aria-live": "polite",
|
|
201
205
|
"aria-relevant": "additions text",
|
|
202
206
|
"aria-label": _nullishCoalesce(messageListAriaLabel, () => ( "\u6D88\u606F\u5217\u8868")),
|
|
203
|
-
children: messages.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full flex items-center justify-center
|
|
207
|
+
children: messages.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZRHDNGWOjs.Empty, { description: emptyText }) }) : messages.map(renderMessageItem)
|
|
204
208
|
}
|
|
205
209
|
),
|
|
206
|
-
statusText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-
|
|
207
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-end gap-3 px-
|
|
210
|
+
statusText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-5 py-2 border-t border-[var(--tiger-border,#e5e7eb)] text-xs italic text-[var(--tiger-text-muted,#6b7280)] bg-[var(--tiger-surface-muted,#f9fafb)]", children: statusText }),
|
|
211
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-end gap-3 px-5 py-4 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] rounded-b-lg", children: [
|
|
208
212
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children: inputType === "input" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
209
213
|
_chunkZYJTHGQWjs.Input,
|
|
210
214
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunkIXHXSD2Ejs = require('./chunk-IXHXSD2E.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk6Z4LLPZAjs = require('./chunk-6Z4LLPZA.js');
|
|
@@ -81,12 +81,17 @@ var DataTableWithToolbar = ({
|
|
|
81
81
|
);
|
|
82
82
|
const hasFilters = Boolean(_optionalChain([toolbar, 'optionalAccess', _14 => _14.filters]) && toolbar.filters.length > 0);
|
|
83
83
|
const hasBulkActions = Boolean(_optionalChain([toolbar, 'optionalAccess', _15 => _15.bulkActions]) && toolbar.bulkActions.length > 0);
|
|
84
|
+
const { bordered = false, ...remainingTableProps } = tableProps;
|
|
84
85
|
const selectedKeys = _nullishCoalesce(_nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _16 => _16.selectedKeys]), () => ( _optionalChain([tableProps, 'access', _17 => _17.rowSelection, 'optionalAccess', _18 => _18.selectedRowKeys]))), () => ( []));
|
|
85
86
|
const selectedCount = _nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _19 => _19.selectedCount]), () => ( selectedKeys.length));
|
|
86
87
|
const bulkLabel = _nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _20 => _20.bulkActionsLabel]), () => ( "\u5DF2\u9009\u62E9"));
|
|
87
88
|
const wrapperClasses = _react.useMemo.call(void 0,
|
|
88
|
-
() => _tigercatcore.classNames.call(void 0,
|
|
89
|
-
|
|
89
|
+
() => _tigercatcore.classNames.call(void 0,
|
|
90
|
+
"tiger-data-table-with-toolbar flex flex-col",
|
|
91
|
+
bordered ? "border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] overflow-hidden bg-[var(--tiger-surface,#ffffff)] shadow-sm" : "gap-3.5",
|
|
92
|
+
className
|
|
93
|
+
),
|
|
94
|
+
[className, bordered]
|
|
90
95
|
);
|
|
91
96
|
const handleSearchChange = (value) => {
|
|
92
97
|
if (_optionalChain([toolbar, 'optionalAccess', _21 => _21.searchValue]) === void 0) {
|
|
@@ -131,12 +136,15 @@ var DataTableWithToolbar = ({
|
|
|
131
136
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
132
137
|
"div",
|
|
133
138
|
{
|
|
134
|
-
className:
|
|
139
|
+
className: _tigercatcore.classNames.call(void 0,
|
|
140
|
+
"tiger-data-table-toolbar flex flex-wrap items-center gap-3",
|
|
141
|
+
bordered ? "bg-[var(--tiger-surface-muted,#f9fafb)] dark:bg-gray-800/10 px-4 py-3.5 border-b border-[var(--tiger-border,#e5e7eb)]" : "bg-[var(--tiger-surface-muted,#f9fafb)]/80 dark:bg-gray-800/30 px-4 py-3.5 border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] shadow-sm"
|
|
142
|
+
),
|
|
135
143
|
role: "toolbar",
|
|
136
144
|
"aria-label": "\u6570\u636E\u8868\u683C\u5DE5\u5177\u680F",
|
|
137
145
|
children: [
|
|
138
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-
|
|
139
|
-
hasSearch ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full sm:w-auto sm:min-w-[
|
|
146
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 flex-wrap flex-1 min-w-0", children: [
|
|
147
|
+
hasSearch ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full sm:w-auto sm:min-w-[220px] sm:max-w-[320px]", children: [
|
|
140
148
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
141
149
|
_chunkZYJTHGQWjs.Input,
|
|
142
150
|
{
|
|
@@ -144,6 +152,25 @@ var DataTableWithToolbar = ({
|
|
|
144
152
|
size: "sm",
|
|
145
153
|
value: searchValue,
|
|
146
154
|
placeholder: _nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _38 => _38.searchPlaceholder]), () => ( "\u641C\u7D22")),
|
|
155
|
+
prefix: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
156
|
+
"svg",
|
|
157
|
+
{
|
|
158
|
+
className: "w-3.5 h-3.5 text-[var(--tiger-text-secondary,#6b7280)] shrink-0",
|
|
159
|
+
fill: "none",
|
|
160
|
+
stroke: "currentColor",
|
|
161
|
+
strokeWidth: "2",
|
|
162
|
+
viewBox: "0 0 24 24",
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
165
|
+
"path",
|
|
166
|
+
{
|
|
167
|
+
strokeLinecap: "round",
|
|
168
|
+
strokeLinejoin: "round",
|
|
169
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
),
|
|
147
174
|
onChange: (event) => handleSearchChange(String(event.currentTarget.value)),
|
|
148
175
|
onKeyDown: (event) => {
|
|
149
176
|
if (event.key === "Enter") {
|
|
@@ -157,7 +184,7 @@ var DataTableWithToolbar = ({
|
|
|
157
184
|
{
|
|
158
185
|
size: "sm",
|
|
159
186
|
variant: "primary",
|
|
160
|
-
className: "whitespace-nowrap shrink-0",
|
|
187
|
+
className: "whitespace-nowrap shrink-0 rounded-[var(--tiger-radius-md,0.5rem)] px-3",
|
|
161
188
|
onClick: handleSearchSubmit,
|
|
162
189
|
disabled: !onSearch && !_optionalChain([toolbar, 'optionalAccess', _40 => _40.onSearch]),
|
|
163
190
|
children: _nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _41 => _41.searchButtonText]), () => ( "\u641C\u7D22"))
|
|
@@ -192,12 +219,15 @@ var DataTableWithToolbar = ({
|
|
|
192
219
|
);
|
|
193
220
|
})]) : null
|
|
194
221
|
] }),
|
|
195
|
-
hasBulkActions ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 flex-wrap ml-auto shrink-0", children: [
|
|
196
|
-
selectedCount > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
222
|
+
hasBulkActions ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2.5 flex-wrap ml-auto shrink-0", children: [
|
|
223
|
+
selectedCount > 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-[var(--tiger-primary,#2563eb)]/10 text-[var(--tiger-primary,#2563eb)] text-xs font-medium border border-[var(--tiger-primary,#2563eb)]/15 shrink-0 transition-all duration-300", children: [
|
|
224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--tiger-primary,#2563eb)] animate-pulse" }),
|
|
225
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
226
|
+
bulkLabel,
|
|
227
|
+
" ",
|
|
228
|
+
selectedCount,
|
|
229
|
+
" \u9879"
|
|
230
|
+
] })
|
|
201
231
|
] }) : null,
|
|
202
232
|
_optionalChain([toolbar, 'optionalAccess', _45 => _45.bulkActions, 'optionalAccess', _46 => _46.map, 'call', _47 => _47((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
203
233
|
_chunk56ZV3VVYjs.Button,
|
|
@@ -218,11 +248,12 @@ var DataTableWithToolbar = ({
|
|
|
218
248
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: wrapperClasses, "data-tiger-data-table-with-toolbar": true, children: [
|
|
219
249
|
renderToolbar(),
|
|
220
250
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
221
|
-
|
|
251
|
+
_chunkIXHXSD2Ejs.Table,
|
|
222
252
|
{
|
|
223
|
-
...
|
|
253
|
+
...remainingTableProps,
|
|
254
|
+
bordered,
|
|
224
255
|
pagination,
|
|
225
|
-
className: tableClassName,
|
|
256
|
+
className: _tigercatcore.classNames.call(void 0, tableClassName, bordered && "border-none rounded-none shadow-none"),
|
|
226
257
|
onPageChange: handleTablePageChange
|
|
227
258
|
}
|
|
228
259
|
)
|
|
@@ -37,7 +37,7 @@ var CardItem = _react2.default.memo(
|
|
|
37
37
|
const cardClasses = _tigercatcore.classNames.call(void 0,
|
|
38
38
|
_tigercatcore.taskBoardCardClasses,
|
|
39
39
|
isDragging && _tigercatcore.taskBoardCardDraggingClasses,
|
|
40
|
-
isKbGrabbed && "ring-2 ring-[var(--tiger-primary,#2563eb)]"
|
|
40
|
+
isKbGrabbed && "ring-2 ring-[var(--tiger-primary,#2563eb)] ring-offset-2 shadow-[0_0_12px_rgba(37,99,235,0.25)]"
|
|
41
41
|
);
|
|
42
42
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
43
43
|
"div",
|
|
@@ -169,20 +169,30 @@ var ColumnItem = _react2.default.memo(
|
|
|
169
169
|
children: renderColumnHeader ? renderColumnHeader(column) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
170
170
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: wipOver ? _tigercatcore.taskBoardWipExceededClasses : void 0, children: [
|
|
171
171
|
column.title,
|
|
172
|
-
showCardCount && cardCount ? null : column.wipLimit != null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
showCardCount && cardCount ? null : column.wipLimit != null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
173
|
+
"span",
|
|
174
|
+
{
|
|
175
|
+
className: _tigercatcore.classNames.call(void 0,
|
|
176
|
+
"ml-2 text-xs font-normal transition-all duration-200 px-1.5 py-0.5 rounded",
|
|
177
|
+
wipOver ? "bg-red-50 dark:bg-red-950/30 text-[var(--tiger-error,#ef4444)] font-semibold border border-red-200/30 dark:border-red-900/30 shadow-xs" : "opacity-70 bg-[var(--tiger-border,#e5e7eb)]/20 text-[var(--tiger-text-secondary,#6b7280)]"
|
|
178
|
+
),
|
|
179
|
+
title: wipTitle,
|
|
180
|
+
children: [
|
|
181
|
+
"(",
|
|
182
|
+
column.cards.length,
|
|
183
|
+
"/",
|
|
184
|
+
column.wipLimit,
|
|
185
|
+
")"
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-2 text-xs font-normal px-1.5 py-0.5 rounded bg-[var(--tiger-border,#e5e7eb)]/20 text-[var(--tiger-text-secondary,#6b7280)] opacity-70", children: column.cards.length })
|
|
179
189
|
] }),
|
|
180
190
|
showCardCount && cardCount && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
181
191
|
"span",
|
|
182
192
|
{
|
|
183
193
|
className: _tigercatcore.classNames.call(void 0,
|
|
184
194
|
_tigercatcore.kanbanCardCountClasses,
|
|
185
|
-
wipOver && _tigercatcore.taskBoardWipExceededClasses
|
|
195
|
+
wipOver && `${_tigercatcore.taskBoardWipExceededClasses} bg-red-50 dark:bg-red-950/30 border border-red-200/50 dark:border-red-900/30 font-semibold shadow-xs`
|
|
186
196
|
),
|
|
187
197
|
children: cardCount.limit ? `${cardCount.count}/${cardCount.limit}` : `${cardCount.count}`
|
|
188
198
|
}
|
|
@@ -201,22 +201,29 @@ var NotificationCenter = ({
|
|
|
201
201
|
"div",
|
|
202
202
|
{
|
|
203
203
|
className: _tigercatcore.classNames.call(void 0,
|
|
204
|
-
"flex items-start gap-3 w-full
|
|
205
|
-
!isRead
|
|
204
|
+
"group relative flex items-start gap-3.5 w-full p-3.5 rounded-xl transition-all duration-300 hover:bg-gray-50/60 dark:hover:bg-gray-800/30",
|
|
205
|
+
!isRead ? "bg-blue-50/20 dark:bg-blue-950/5 hover:bg-blue-50/40 dark:hover:bg-blue-950/10 border-l-[3px] border-l-blue-500/80 -ml-[3px] pl-[calc(0.875rem-3px)]" : "border-l-[3px] border-l-transparent -ml-[3px] pl-[calc(0.875rem-3px)]"
|
|
206
206
|
),
|
|
207
207
|
children: [
|
|
208
208
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
209
209
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
210
|
-
/* @__PURE__ */ _jsxruntime.
|
|
211
|
-
|
|
210
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1.5", children: [
|
|
211
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "sm", weight: isRead ? "normal" : "semibold", className: isRead ? "text-gray-600 dark:text-gray-400" : "text-gray-900 dark:text-gray-100", children: item.title }),
|
|
212
|
+
!isRead && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500 dark:bg-blue-400 shrink-0 shadow-sm shadow-blue-500/40 animate-pulse" })
|
|
213
|
+
] }),
|
|
214
|
+
timeText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[11px] text-gray-400 dark:text-gray-500 font-medium whitespace-nowrap flex-shrink-0 self-center", children: timeText }) : null
|
|
212
215
|
] }),
|
|
213
|
-
item.description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
216
|
+
item.description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0,
|
|
217
|
+
"mt-1 text-xs leading-relaxed line-clamp-2",
|
|
218
|
+
isRead ? "text-gray-500 dark:text-gray-400" : "text-gray-600 dark:text-gray-300"
|
|
219
|
+
), children: item.description }) : null
|
|
214
220
|
] }),
|
|
215
221
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
216
222
|
_chunk56ZV3VVYjs.Button,
|
|
217
223
|
{
|
|
218
224
|
size: "sm",
|
|
219
225
|
variant: "ghost",
|
|
226
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-all duration-200 bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 border-0 flex-shrink-0 self-center",
|
|
220
227
|
onClick: (event) => {
|
|
221
228
|
event.stopPropagation();
|
|
222
229
|
if (manageReadState) {
|
|
@@ -235,19 +242,27 @@ var NotificationCenter = ({
|
|
|
235
242
|
}
|
|
236
243
|
);
|
|
237
244
|
};
|
|
238
|
-
const renderList = (listItems) =>
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
hoverable: true,
|
|
245
|
-
emptyText,
|
|
246
|
-
onItemClick: (item, index) => _optionalChain([onItemClick, 'optionalCall', _7 => _7(item, index)]),
|
|
247
|
-
renderItem
|
|
245
|
+
const renderList = (listItems) => {
|
|
246
|
+
if (listItems.length === 0) {
|
|
247
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-14 px-4 text-center", children: [
|
|
248
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-gray-400 dark:text-gray-600 animate-pulse", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" }) }) }),
|
|
249
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "sm", color: "muted", className: "font-semibold text-gray-400 dark:text-gray-500", children: emptyText })
|
|
250
|
+
] });
|
|
248
251
|
}
|
|
249
|
-
|
|
250
|
-
|
|
252
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
253
|
+
_chunkWG3YS2QVjs.List,
|
|
254
|
+
{
|
|
255
|
+
dataSource: listItems,
|
|
256
|
+
split: true,
|
|
257
|
+
bordered: "divided",
|
|
258
|
+
hoverable: true,
|
|
259
|
+
emptyText,
|
|
260
|
+
onItemClick: (item, index) => _optionalChain([onItemClick, 'optionalCall', _7 => _7(item, index)]),
|
|
261
|
+
renderItem
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
};
|
|
265
|
+
const content = loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3MRP3XYIjs.Loading, { text: loadingText, className: "text-blue-500 dark:text-blue-400 font-medium" }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.Tabs, { type: "line", size: "small", activeKey: currentGroupKey, onChange: handleGroupChange, children: groupTabData.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRFHPG4KNjs.TabPane, { tabKey: tab.key, label: tab.label, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-[380px] overflow-y-auto", children: renderList(tab.filteredItems) }) }, String(tab.key))) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "-mx-4 -mb-4 max-h-[380px] overflow-y-auto", children: renderList(filteredFlatItems) });
|
|
251
266
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
252
267
|
"div",
|
|
253
268
|
{
|
|
@@ -260,22 +275,34 @@ var NotificationCenter = ({
|
|
|
260
275
|
_chunkUIO6O4MIjs.Card,
|
|
261
276
|
{
|
|
262
277
|
variant: "bordered",
|
|
263
|
-
className: "w-full",
|
|
278
|
+
className: "w-full rounded-2xl border border-gray-100/80 dark:border-gray-800/80 bg-white/95 dark:bg-gray-950/90 backdrop-blur-md shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.2)] transition-all duration-300 overflow-hidden",
|
|
264
279
|
header: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
265
280
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
|
|
266
281
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2.5", children: [
|
|
267
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "base", weight: "bold", children: title }),
|
|
268
|
-
totalUnread > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-
|
|
282
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "base", weight: "bold", className: "text-gray-900 dark:text-gray-100", children: title }),
|
|
283
|
+
totalUnread > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-[11px] font-bold rounded-full bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-sm shadow-blue-500/20 animate-pulse", children: totalUnread }) : null
|
|
269
284
|
] }),
|
|
270
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
285
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
286
|
+
_chunk56ZV3VVYjs.Button,
|
|
287
|
+
{
|
|
288
|
+
size: "sm",
|
|
289
|
+
variant: "ghost",
|
|
290
|
+
disabled: !hasUnread,
|
|
291
|
+
onClick: handleMarkAllRead,
|
|
292
|
+
className: _tigercatcore.classNames.call(void 0,
|
|
293
|
+
"text-xs font-semibold transition-colors duration-200",
|
|
294
|
+
hasUnread ? "text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300" : "text-gray-400 dark:text-gray-600"
|
|
295
|
+
),
|
|
296
|
+
children: markAllReadText
|
|
297
|
+
}
|
|
298
|
+
)
|
|
271
299
|
] }),
|
|
272
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "inline-flex
|
|
300
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "inline-flex items-center gap-0.5 p-0.5 rounded-lg bg-gray-100/80 dark:bg-gray-800/60 self-start", children: filterButtons.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
273
301
|
"button",
|
|
274
302
|
{
|
|
275
303
|
className: _tigercatcore.classNames.call(void 0,
|
|
276
|
-
"px-3 py-1 text-xs font-
|
|
277
|
-
"
|
|
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
|