@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Steps,
|
|
3
3
|
StepsItem
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5XE5VBDS.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useTigerConfig
|
|
7
7
|
} from "./chunk-QAIBQHIO.mjs";
|
|
@@ -21,6 +21,42 @@ import {
|
|
|
21
21
|
runStepValidation
|
|
22
22
|
} from "@expcat/tigercat-core";
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
var ArrowLeftIcon = () => /* @__PURE__ */ jsx(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:-translate-x-0.5",
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: "2",
|
|
31
|
+
viewBox: "0 0 24 24",
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" })
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
var ArrowRightIcon = () => /* @__PURE__ */ jsx(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:translate-x-0.5",
|
|
40
|
+
fill: "none",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeWidth: "2",
|
|
43
|
+
viewBox: "0 0 24 24",
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" })
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
var CheckIcon = () => /* @__PURE__ */ jsx(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
className: "w-3.5 h-3.5 transition-transform duration-300 group-hover:scale-110",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: "currentColor",
|
|
54
|
+
strokeWidth: "2.5",
|
|
55
|
+
viewBox: "0 0 24 24",
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
24
60
|
var FormWizard = ({
|
|
25
61
|
steps = [],
|
|
26
62
|
current,
|
|
@@ -29,6 +65,7 @@ var FormWizard = ({
|
|
|
29
65
|
direction = "horizontal",
|
|
30
66
|
size = "default",
|
|
31
67
|
simple = false,
|
|
68
|
+
bordered = true,
|
|
32
69
|
showSteps = true,
|
|
33
70
|
showActions = true,
|
|
34
71
|
prevText,
|
|
@@ -60,7 +97,8 @@ var FormWizard = ({
|
|
|
60
97
|
const isFirst = currentIndex <= 0;
|
|
61
98
|
const isLast = currentIndex >= totalCount - 1;
|
|
62
99
|
const wrapperClasses = classNames(
|
|
63
|
-
"tiger-form-wizard w-full
|
|
100
|
+
"tiger-form-wizard w-full overflow-hidden transition-all duration-300",
|
|
101
|
+
bordered ? "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] shadow-sm" : "bg-transparent",
|
|
64
102
|
className
|
|
65
103
|
);
|
|
66
104
|
const setCurrent = useCallback(
|
|
@@ -142,7 +180,10 @@ var FormWizard = ({
|
|
|
142
180
|
[steps]
|
|
143
181
|
);
|
|
144
182
|
return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, style, "data-tiger-form-wizard": true, ...props, children: [
|
|
145
|
-
showSteps && steps.length > 0 && /* @__PURE__ */ jsx("div", { className:
|
|
183
|
+
showSteps && steps.length > 0 && /* @__PURE__ */ jsx("div", { className: classNames(
|
|
184
|
+
"px-6 py-5 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
|
|
185
|
+
bordered ? "border-b border-[var(--tiger-border,#e5e7eb)]" : ""
|
|
186
|
+
), children: /* @__PURE__ */ jsx(
|
|
146
187
|
Steps,
|
|
147
188
|
{
|
|
148
189
|
current: currentIndex,
|
|
@@ -154,10 +195,36 @@ var FormWizard = ({
|
|
|
154
195
|
children: stepsNodes
|
|
155
196
|
}
|
|
156
197
|
) }),
|
|
157
|
-
/* @__PURE__ */ jsx("div", { className: "px-
|
|
158
|
-
showActions && /* @__PURE__ */ jsxs("div", { className:
|
|
159
|
-
|
|
160
|
-
|
|
198
|
+
/* @__PURE__ */ jsx("div", { className: "px-8 py-6 flex flex-col items-center w-full min-h-[120px] transition-all duration-300", children: contentNode }),
|
|
199
|
+
showActions && /* @__PURE__ */ jsxs("div", { className: classNames(
|
|
200
|
+
"flex items-center justify-between gap-3 px-8 py-4 bg-[var(--tiger-surface-muted,#f9fafb)]/95 backdrop-blur-sm transition-all duration-300",
|
|
201
|
+
bordered ? "border-t border-[var(--tiger-border,#e5e7eb)]" : ""
|
|
202
|
+
), children: [
|
|
203
|
+
!isFirst ? /* @__PURE__ */ jsx(
|
|
204
|
+
Button,
|
|
205
|
+
{
|
|
206
|
+
htmlType: "button",
|
|
207
|
+
variant: "secondary",
|
|
208
|
+
className: "group",
|
|
209
|
+
onClick: handlePrev,
|
|
210
|
+
size: size === "small" ? "sm" : "md",
|
|
211
|
+
icon: /* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
212
|
+
children: resolveLocaleText(labels.prevText, prevText)
|
|
213
|
+
}
|
|
214
|
+
) : /* @__PURE__ */ jsx("div", {}),
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
Button,
|
|
217
|
+
{
|
|
218
|
+
htmlType: "button",
|
|
219
|
+
variant: "primary",
|
|
220
|
+
className: "group",
|
|
221
|
+
onClick: handleNext,
|
|
222
|
+
size: size === "small" ? "sm" : "md",
|
|
223
|
+
icon: isLast ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
224
|
+
iconPosition: isLast ? "left" : "right",
|
|
225
|
+
children: isLast ? resolveLocaleText(labels.finishText, finishText) : resolveLocaleText(labels.nextText, nextText)
|
|
226
|
+
}
|
|
227
|
+
)
|
|
161
228
|
] })
|
|
162
229
|
] });
|
|
163
230
|
};
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkPR3PQUKMjs = require('./chunk-PR3PQUKM.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk3MRP3XYIjs = require('./chunk-3MRP3XYI.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkQYYAXM5Fjs = require('./chunk-QYYAXM5F.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunkVCULFIZ5js = require('./chunk-VCULFIZ5.js');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkUIO6O4MIjs = require('./chunk-UIO6O4MI.js');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
|
|
22
|
+
|
|
23
|
+
// src/components/ActivityFeed.tsx
|
|
24
|
+
var _react = require('react');
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var _tigercatcore = require('@expcat/tigercat-core');
|
|
38
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
39
|
+
var renderAction = (item, action, index) => {
|
|
40
|
+
const key = _nullishCoalesce(action.key, () => ( `${item.id}-action-${index}`));
|
|
41
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
|
+
_chunkQYYAXM5Fjs.Link,
|
|
43
|
+
{
|
|
44
|
+
size: "sm",
|
|
45
|
+
variant: "primary",
|
|
46
|
+
underline: false,
|
|
47
|
+
href: action.href,
|
|
48
|
+
target: action.target,
|
|
49
|
+
disabled: action.disabled,
|
|
50
|
+
className: "inline-flex items-center px-2.5 py-1 rounded-lg hover:bg-blue-50/50 dark:hover:bg-blue-950/20 text-xs font-semibold transition-all duration-200",
|
|
51
|
+
onClick: () => _optionalChain([action, 'access', _ => _.onClick, 'optionalCall', _2 => _2(item, action)]),
|
|
52
|
+
children: action.label
|
|
53
|
+
},
|
|
54
|
+
key
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
var ActivityFeed = ({
|
|
58
|
+
items = [],
|
|
59
|
+
groups,
|
|
60
|
+
groupBy,
|
|
61
|
+
groupOrder,
|
|
62
|
+
loading = false,
|
|
63
|
+
loadingText = "\u52A0\u8F7D\u4E2D...",
|
|
64
|
+
emptyText = "\u6682\u65E0\u52A8\u6001",
|
|
65
|
+
showAvatar = true,
|
|
66
|
+
showTime = true,
|
|
67
|
+
showGroupTitle = true,
|
|
68
|
+
renderItem,
|
|
69
|
+
renderGroupHeader,
|
|
70
|
+
className,
|
|
71
|
+
...props
|
|
72
|
+
}) => {
|
|
73
|
+
const resolvedGroups = _react.useMemo.call(void 0,
|
|
74
|
+
() => _tigercatcore.buildActivityGroups.call(void 0, items, groups, groupBy, groupOrder),
|
|
75
|
+
[items, groups, groupBy, groupOrder]
|
|
76
|
+
);
|
|
77
|
+
const wrapperClasses = _tigercatcore.classNames.call(void 0,
|
|
78
|
+
"tiger-activity-feed",
|
|
79
|
+
"flex",
|
|
80
|
+
"flex-col",
|
|
81
|
+
"gap-6",
|
|
82
|
+
"w-full",
|
|
83
|
+
className
|
|
84
|
+
);
|
|
85
|
+
const renderDefaultItem = (item, index, group) => {
|
|
86
|
+
if (renderItem) return renderItem(item, index, group);
|
|
87
|
+
const titleText = _nullishCoalesce(item.title, () => ( (typeof item.content === "string" || typeof item.content === "number" ? String(item.content) : "")));
|
|
88
|
+
const descriptionText = item.description;
|
|
89
|
+
const timeText = showTime ? _tigercatcore.formatActivityTime.call(void 0, item.time) : "";
|
|
90
|
+
const actionNodes = _optionalChain([item, 'access', _3 => _3.actions, 'optionalAccess', _4 => _4.map, 'call', _5 => _5(
|
|
91
|
+
(action, actionIndex) => renderAction(item, action, actionIndex)
|
|
92
|
+
)]);
|
|
93
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0, _tigercatcore.activityItemClasses, "p-4 rounded-2xl border border-gray-100/70 dark:border-gray-800/40 bg-white/40 dark:bg-gray-900/15 backdrop-blur-sm shadow-sm transition-all duration-300 hover:shadow-md hover:shadow-gray-100/30 dark:hover:shadow-none hover:bg-white dark:hover:bg-gray-900/30 hover:-translate-y-0.5 w-full"), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemLayoutClasses, children: [
|
|
94
|
+
showAvatar && item.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
+
_chunk4MQCUKICjs.Avatar,
|
|
96
|
+
{
|
|
97
|
+
size: "sm",
|
|
98
|
+
src: item.user.avatar,
|
|
99
|
+
text: item.user.name,
|
|
100
|
+
className: "shrink-0 ring-2 ring-white dark:ring-gray-900 shadow-sm transition-transform hover:scale-105 duration-200"
|
|
101
|
+
}
|
|
102
|
+
) : null,
|
|
103
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemBodyClasses, children: [
|
|
104
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemHeaderClasses, children: [
|
|
105
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemTitleGroupClasses, children: [
|
|
106
|
+
titleText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "sm", weight: "semibold", className: "text-gray-900 dark:text-gray-100 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer truncate", children: titleText }) : null,
|
|
107
|
+
item.status ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
108
|
+
_chunkVCULFIZ5js.Tag,
|
|
109
|
+
{
|
|
110
|
+
variant: _nullishCoalesce(item.status.variant, () => ( "default")),
|
|
111
|
+
size: "sm",
|
|
112
|
+
className: "shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase border border-current bg-opacity-10 shadow-sm",
|
|
113
|
+
children: item.status.label
|
|
114
|
+
}
|
|
115
|
+
) : null
|
|
116
|
+
] }),
|
|
117
|
+
timeText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "xs", color: "muted", className: "shrink-0 whitespace-nowrap font-medium text-gray-400 dark:text-gray-500", children: timeText }) : null
|
|
118
|
+
] }),
|
|
119
|
+
descriptionText ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
120
|
+
_chunkUF3DXKCIjs.Text,
|
|
121
|
+
{
|
|
122
|
+
tag: "div",
|
|
123
|
+
size: "sm",
|
|
124
|
+
color: "muted",
|
|
125
|
+
className: _tigercatcore.classNames.call(void 0, _tigercatcore.activityItemDescriptionClasses, "text-gray-600 dark:text-gray-300 leading-relaxed pl-0.5 mt-1"),
|
|
126
|
+
children: descriptionText
|
|
127
|
+
}
|
|
128
|
+
) : null,
|
|
129
|
+
_optionalChain([actionNodes, 'optionalAccess', _6 => _6.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0, _tigercatcore.activityItemActionsClasses, "mt-2.5"), children: actionNodes }) : null
|
|
130
|
+
] })
|
|
131
|
+
] }) });
|
|
132
|
+
};
|
|
133
|
+
if (loading) {
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: wrapperClasses,
|
|
138
|
+
role: "feed",
|
|
139
|
+
"aria-label": "\u52A8\u6001",
|
|
140
|
+
"aria-busy": true,
|
|
141
|
+
...props,
|
|
142
|
+
"data-tiger-activity-feed": true,
|
|
143
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
144
|
+
_chunkUIO6O4MIjs.Card,
|
|
145
|
+
{
|
|
146
|
+
variant: "bordered",
|
|
147
|
+
size: "sm",
|
|
148
|
+
className: "tiger-activity-feed-loading bg-white/40 dark:bg-gray-900/20 border-gray-100 dark:border-gray-800/80 backdrop-blur-sm rounded-2xl shadow-sm overflow-hidden",
|
|
149
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3MRP3XYIjs.Loading, { text: loadingText, className: "text-blue-500 dark:text-blue-400 font-medium" }) })
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
if (resolvedGroups.length === 0) {
|
|
156
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
className: wrapperClasses,
|
|
160
|
+
role: "feed",
|
|
161
|
+
"aria-label": "\u52A8\u6001",
|
|
162
|
+
...props,
|
|
163
|
+
"data-tiger-activity-feed": true,
|
|
164
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
165
|
+
_chunkUIO6O4MIjs.Card,
|
|
166
|
+
{
|
|
167
|
+
variant: "bordered",
|
|
168
|
+
size: "sm",
|
|
169
|
+
className: "tiger-activity-feed-empty bg-white/40 dark:bg-gray-900/20 border-gray-100 dark:border-gray-800/80 backdrop-blur-sm rounded-2xl shadow-sm overflow-hidden",
|
|
170
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 px-4", children: [
|
|
171
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-12 h-12 text-gray-300 dark:text-gray-600 mb-3 animate-pulse", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7.5h1.5m-1.5 3h1.5m-7.5 3h10.5m-10.5 3h10.5m-13.5-9h16.5M3 5.25h18M3 18.75h18" }) }),
|
|
172
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "div", size: "sm", color: "muted", className: "font-medium", children: emptyText })
|
|
173
|
+
] })
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
180
|
+
"div",
|
|
181
|
+
{
|
|
182
|
+
className: wrapperClasses,
|
|
183
|
+
role: "feed",
|
|
184
|
+
"aria-label": "\u52A8\u6001",
|
|
185
|
+
...props,
|
|
186
|
+
"data-tiger-activity-feed": true,
|
|
187
|
+
children: resolvedGroups.map((group, groupIndex) => {
|
|
188
|
+
const headerNode = _optionalChain([renderGroupHeader, 'optionalCall', _7 => _7(group)]);
|
|
189
|
+
const groupTitle = group.title;
|
|
190
|
+
const timelineItems = _tigercatcore.toActivityTimelineItems.call(void 0, group.items);
|
|
191
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
|
|
192
|
+
showGroupTitle && groupTitle ? _nullishCoalesce(headerNode, () => ( /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mb-2", children: [
|
|
193
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-1.5 h-3.5 bg-blue-500 rounded-full dark:bg-blue-400 shadow-sm shadow-blue-500/20" }),
|
|
194
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "sm", weight: "bold", className: "text-gray-900 dark:text-gray-100 uppercase tracking-wider", children: groupTitle })
|
|
195
|
+
] }))) : null,
|
|
196
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
197
|
+
_chunkPR3PQUKMjs.Timeline,
|
|
198
|
+
{
|
|
199
|
+
items: timelineItems,
|
|
200
|
+
style: {
|
|
201
|
+
"--tiger-border": "rgba(156, 163, 175, 0.18)"
|
|
202
|
+
},
|
|
203
|
+
renderDot: (timelineItem) => {
|
|
204
|
+
const activity = timelineItem.activity;
|
|
205
|
+
const statusVariant = _nullishCoalesce(_optionalChain([activity, 'optionalAccess', _8 => _8.status, 'optionalAccess', _9 => _9.variant]), () => ( "default"));
|
|
206
|
+
const baseDotClass = "w-3 h-3 rounded-full border-2 border-white dark:border-gray-950 shadow-sm";
|
|
207
|
+
let colorClass = "bg-gray-300 dark:bg-gray-700";
|
|
208
|
+
let pulseClass = "";
|
|
209
|
+
if (statusVariant === "success") {
|
|
210
|
+
colorClass = "bg-emerald-500";
|
|
211
|
+
pulseClass = "bg-emerald-500/30";
|
|
212
|
+
} else if (statusVariant === "warning") {
|
|
213
|
+
colorClass = "bg-amber-500";
|
|
214
|
+
pulseClass = "bg-amber-500/30";
|
|
215
|
+
} else if (statusVariant === "error" || statusVariant === "danger") {
|
|
216
|
+
colorClass = "bg-rose-500";
|
|
217
|
+
pulseClass = "bg-rose-500/30";
|
|
218
|
+
} else if (statusVariant === "primary" || statusVariant === "info") {
|
|
219
|
+
colorClass = "bg-blue-500";
|
|
220
|
+
pulseClass = "bg-blue-500/30";
|
|
221
|
+
}
|
|
222
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex items-center justify-center w-4 h-4", children: [
|
|
223
|
+
pulseClass ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `absolute inline-flex h-full w-full rounded-full animate-ping opacity-75 ${pulseClass}` }) : null,
|
|
224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${baseDotClass} ${colorClass} relative z-10` })
|
|
225
|
+
] });
|
|
226
|
+
},
|
|
227
|
+
renderItem: (timelineItem, index) => {
|
|
228
|
+
const activity = timelineItem.activity;
|
|
229
|
+
if (!activity) return null;
|
|
230
|
+
return renderDefaultItem(activity, index, group);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
] }, _nullishCoalesce(group.key, () => ( groupIndex)));
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
var ActivityFeed_default = ActivityFeed;
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
exports.ActivityFeed = ActivityFeed; exports.ActivityFeed_default = ActivityFeed_default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Table
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IWLUYAZV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Select
|
|
6
6
|
} from "./chunk-T4OVGM4X.mjs";
|
|
@@ -81,12 +81,17 @@ var DataTableWithToolbar = ({
|
|
|
81
81
|
);
|
|
82
82
|
const hasFilters = Boolean(toolbar?.filters && toolbar.filters.length > 0);
|
|
83
83
|
const hasBulkActions = Boolean(toolbar?.bulkActions && toolbar.bulkActions.length > 0);
|
|
84
|
+
const { bordered = false, ...remainingTableProps } = tableProps;
|
|
84
85
|
const selectedKeys = toolbar?.selectedKeys ?? tableProps.rowSelection?.selectedRowKeys ?? [];
|
|
85
86
|
const selectedCount = toolbar?.selectedCount ?? selectedKeys.length;
|
|
86
87
|
const bulkLabel = toolbar?.bulkActionsLabel ?? "\u5DF2\u9009\u62E9";
|
|
87
88
|
const wrapperClasses = useMemo(
|
|
88
|
-
() => classNames(
|
|
89
|
-
|
|
89
|
+
() => classNames(
|
|
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 (toolbar?.searchValue === void 0) {
|
|
@@ -131,12 +136,15 @@ var DataTableWithToolbar = ({
|
|
|
131
136
|
return /* @__PURE__ */ jsxs(
|
|
132
137
|
"div",
|
|
133
138
|
{
|
|
134
|
-
className:
|
|
139
|
+
className: classNames(
|
|
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__ */ jsxs("div", { className: "flex items-center gap-
|
|
139
|
-
hasSearch ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full sm:w-auto sm:min-w-[
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap flex-1 min-w-0", children: [
|
|
147
|
+
hasSearch ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full sm:w-auto sm:min-w-[220px] sm:max-w-[320px]", children: [
|
|
140
148
|
/* @__PURE__ */ jsx(
|
|
141
149
|
Input,
|
|
142
150
|
{
|
|
@@ -144,6 +152,25 @@ var DataTableWithToolbar = ({
|
|
|
144
152
|
size: "sm",
|
|
145
153
|
value: searchValue,
|
|
146
154
|
placeholder: toolbar?.searchPlaceholder ?? "\u641C\u7D22",
|
|
155
|
+
prefix: /* @__PURE__ */ jsx(
|
|
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__ */ jsx(
|
|
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 && !toolbar?.onSearch,
|
|
163
190
|
children: toolbar?.searchButtonText ?? "\u641C\u7D22"
|
|
@@ -192,12 +219,15 @@ var DataTableWithToolbar = ({
|
|
|
192
219
|
);
|
|
193
220
|
}) : null
|
|
194
221
|
] }),
|
|
195
|
-
hasBulkActions ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap ml-auto shrink-0", children: [
|
|
196
|
-
selectedCount > 0 ? /* @__PURE__ */ jsxs("
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
222
|
+
hasBulkActions ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 flex-wrap ml-auto shrink-0", children: [
|
|
223
|
+
selectedCount > 0 ? /* @__PURE__ */ jsxs("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__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--tiger-primary,#2563eb)] animate-pulse" }),
|
|
225
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
226
|
+
bulkLabel,
|
|
227
|
+
" ",
|
|
228
|
+
selectedCount,
|
|
229
|
+
" \u9879"
|
|
230
|
+
] })
|
|
201
231
|
] }) : null,
|
|
202
232
|
toolbar?.bulkActions?.map((action) => /* @__PURE__ */ jsx(
|
|
203
233
|
Button,
|
|
@@ -220,9 +250,10 @@ var DataTableWithToolbar = ({
|
|
|
220
250
|
/* @__PURE__ */ jsx(
|
|
221
251
|
Table,
|
|
222
252
|
{
|
|
223
|
-
...
|
|
253
|
+
...remainingTableProps,
|
|
254
|
+
bordered,
|
|
224
255
|
pagination,
|
|
225
|
-
className: tableClassName,
|
|
256
|
+
className: classNames(tableClassName, bordered && "border-none rounded-none shadow-none"),
|
|
226
257
|
onPageChange: handleTablePageChange
|
|
227
258
|
}
|
|
228
259
|
)
|
|
@@ -37,7 +37,7 @@ var CardItem = React.memo(
|
|
|
37
37
|
const cardClasses = classNames(
|
|
38
38
|
taskBoardCardClasses,
|
|
39
39
|
isDragging && 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__ */ jsx(
|
|
43
43
|
"div",
|
|
@@ -169,20 +169,30 @@ var ColumnItem = React.memo(
|
|
|
169
169
|
children: renderColumnHeader ? renderColumnHeader(column) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
170
170
|
/* @__PURE__ */ jsxs("span", { className: wipOver ? taskBoardWipExceededClasses : void 0, children: [
|
|
171
171
|
column.title,
|
|
172
|
-
showCardCount && cardCount ? null : column.wipLimit != null ? /* @__PURE__ */ jsxs(
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
showCardCount && cardCount ? null : column.wipLimit != null ? /* @__PURE__ */ jsxs(
|
|
173
|
+
"span",
|
|
174
|
+
{
|
|
175
|
+
className: classNames(
|
|
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__ */ jsx("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__ */ jsx(
|
|
181
191
|
"span",
|
|
182
192
|
{
|
|
183
193
|
className: classNames(
|
|
184
194
|
kanbanCardCountClasses,
|
|
185
|
-
wipOver && taskBoardWipExceededClasses
|
|
195
|
+
wipOver && `${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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkUVWLYRACjs = require('../chunk-UVWLYRAC.js');
|
|
5
5
|
require('../chunk-PR3PQUKM.js');
|
|
6
6
|
require('../chunk-3MRP3XYI.js');
|
|
7
7
|
require('../chunk-QYYAXM5F.js');
|
|
@@ -14,4 +14,4 @@ require('../chunk-TQOWIDQT.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.ActivityFeed =
|
|
17
|
+
exports.ActivityFeed = _chunkUVWLYRACjs.ActivityFeed; exports.default = _chunkUVWLYRACjs.ActivityFeed_default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk7KPALCG3js = require('../chunk-7KPALCG3.js');
|
|
5
5
|
require('../chunk-P36GX65N.js');
|
|
6
|
+
require('../chunk-ZRHDNGWO.js');
|
|
6
7
|
require('../chunk-ZYJTHGQW.js');
|
|
7
8
|
require('../chunk-WVVXZKNI.js');
|
|
8
9
|
require('../chunk-UKGQ7256.js');
|
|
@@ -13,4 +14,4 @@ require('../chunk-TQOWIDQT.js');
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
exports.ChatWindow =
|
|
17
|
+
exports.ChatWindow = _chunk7KPALCG3js.ChatWindow; exports.default = _chunk7KPALCG3js.ChatWindow_default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatWindow,
|
|
3
3
|
ChatWindow_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-GYFR2O27.mjs";
|
|
5
5
|
import "../chunk-7DUHHRAU.mjs";
|
|
6
|
+
import "../chunk-WIWTY74F.mjs";
|
|
6
7
|
import "../chunk-WNLUUD5N.mjs";
|
|
7
8
|
import "../chunk-7QZ4XT2P.mjs";
|
|
8
9
|
import "../chunk-UQMPEMY7.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJCINYGGMjs = require('../chunk-JCINYGGM.js');
|
|
5
5
|
require('../chunk-WVVXZKNI.js');
|
|
6
6
|
require('../chunk-UKGQ7256.js');
|
|
7
7
|
require('../chunk-56ZV3VVY.js');
|
|
@@ -13,4 +13,4 @@ require('../chunk-TQOWIDQT.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.CommentThread =
|
|
16
|
+
exports.CommentThread = _chunkJCINYGGMjs.CommentThread; exports.default = _chunkJCINYGGMjs.CommentThread_default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKTV3ZDSQjs = require('../chunk-KTV3ZDSQ.js');
|
|
4
4
|
require('../chunk-SXHP4Q7O.js');
|
|
5
5
|
require('../chunk-FI53LYZ6.js');
|
|
6
6
|
require('../chunk-56ZV3VVY.js');
|
|
@@ -8,4 +8,4 @@ require('../chunk-YMKA4L3Z.js');
|
|
|
8
8
|
require('../chunk-STTQ5LXX.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.CropUpload =
|
|
11
|
+
exports.CropUpload = _chunkKTV3ZDSQjs.CropUpload;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkAPODZAVOjs = require('../chunk-APODZAVO.js');
|
|
5
|
+
require('../chunk-IXHXSD2E.js');
|
|
6
6
|
require('../chunk-6Z4LLPZA.js');
|
|
7
|
+
require('../chunk-TDODFBBO.js');
|
|
7
8
|
require('../chunk-ZYJTHGQW.js');
|
|
8
9
|
require('../chunk-56ZV3VVY.js');
|
|
9
10
|
require('../chunk-YMKA4L3Z.js');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
exports.DataTableWithToolbar =
|
|
14
|
+
exports.DataTableWithToolbar = _chunkAPODZAVOjs.DataTableWithToolbar; exports.default = _chunkAPODZAVOjs.DataTableWithToolbar_default;
|