@expcat/tigercat-react 1.2.47 → 1.3.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.
- package/dist/{chunk-JLQBG5XU.js → chunk-2WDCWFOM.js} +5 -3
- package/dist/{chunk-D4FXVNRW.mjs → chunk-3CJFNG54.mjs} +2 -2
- package/dist/{chunk-ZDGBH4NA.js → chunk-4LX5UGPQ.js} +21 -8
- package/dist/{chunk-EWSYARW4.js → chunk-4ZTFIXZR.js} +96 -62
- package/dist/{chunk-USWK2S3Y.mjs → chunk-5TE7KLE5.mjs} +3 -1
- package/dist/{chunk-VJJ76I7U.js → chunk-6HDMUF23.js} +2 -1
- package/dist/{chunk-36I5APFX.js → chunk-6OMCHC6W.js} +8 -6
- package/dist/{chunk-CGIBGSNE.js → chunk-6TR7JB6C.js} +49 -8
- package/dist/{chunk-FZIF5LZW.js → chunk-AW5M3EL4.js} +5 -5
- package/dist/{chunk-ZL44XLSB.mjs → chunk-B3CRHKTZ.mjs} +1 -1
- package/dist/{chunk-6Z4LLPZA.js → chunk-BBLVRLXT.js} +1 -0
- package/dist/{chunk-CHS54PVQ.mjs → chunk-BWDQZSAB.mjs} +2 -1
- package/dist/{chunk-IFVIPIAA.js → chunk-BXOZZXVG.js} +146 -57
- package/dist/{chunk-IHH2O7YK.js → chunk-C5BPHZXK.js} +19 -1
- package/dist/{chunk-UPPHGL64.js → chunk-CY5GRTAX.js} +4 -3
- package/dist/{chunk-H2YHUFMK.js → chunk-EEWHWEYO.js} +5 -5
- package/dist/{chunk-Y5E4XH6H.mjs → chunk-F6IXIH6B.mjs} +4 -3
- package/dist/{chunk-I5YYA7FB.mjs → chunk-FB34UWF7.mjs} +3 -3
- package/dist/{chunk-OFCKGWTS.js → chunk-FJDTVJTX.js} +7 -2
- package/dist/{chunk-UIO6O4MI.js → chunk-FQO7BKXW.js} +4 -2
- package/dist/{chunk-6KQYWZ6J.mjs → chunk-GN3TSQWW.mjs} +49 -8
- package/dist/{chunk-7JFP3MIW.js → chunk-GQFVVAEF.js} +3 -3
- package/dist/{chunk-TUA5PDRX.mjs → chunk-HDCC4FBL.mjs} +19 -1
- package/dist/{chunk-RL6HARKE.mjs → chunk-I2AUOICV.mjs} +1 -1
- package/dist/{chunk-UVWLYRAC.js → chunk-I373B74W.js} +7 -7
- package/dist/{chunk-NF3OF7S5.mjs → chunk-IGAMV6ML.mjs} +1 -1
- package/dist/{chunk-AGHGG73I.mjs → chunk-INHQJXHD.mjs} +146 -57
- package/dist/{chunk-P6E3DILH.mjs → chunk-IXV5YBCZ.mjs} +5 -3
- package/dist/{chunk-7E24KEVK.mjs → chunk-KGSDDVRC.mjs} +1 -1
- package/dist/{chunk-T4OVGM4X.mjs → chunk-KXNWY2Q7.mjs} +1 -0
- package/dist/{chunk-PKWHSCFK.mjs → chunk-L5AMVEQL.mjs} +2 -2
- package/dist/{chunk-BCQQYERG.js → chunk-N4PP3ENO.js} +2 -2
- package/dist/{chunk-TYZNV54N.mjs → chunk-NITD53UU.mjs} +5 -3
- package/dist/{chunk-56DP32W7.mjs → chunk-NVEIVIAW.mjs} +2 -2
- package/dist/{chunk-DSXII6ZF.js → chunk-OZD75CLT.js} +3 -3
- package/dist/{chunk-ZDS5WL22.mjs → chunk-PTMVWEIC.mjs} +8 -6
- package/dist/{chunk-JCINYGGM.js → chunk-PUZDW7NR.js} +12 -12
- package/dist/{chunk-AE2QE2C6.js → chunk-PZNVU37I.js} +2 -2
- package/dist/{chunk-ABTJVM3X.js → chunk-RF2BA2N6.js} +2 -2
- package/dist/{chunk-XJXEAXWY.mjs → chunk-RQXY2MGX.mjs} +21 -8
- package/dist/{chunk-TANTMMR7.mjs → chunk-RYHM75MP.mjs} +2 -1
- package/dist/{chunk-TLU3ROLT.js → chunk-UMZ3PMUJ.js} +2 -1
- package/dist/{chunk-TGKNEMD4.mjs → chunk-WMPCN7OF.mjs} +3 -1
- package/dist/{chunk-LYYL2JMP.js → chunk-WOSKRZOO.js} +2 -1
- package/dist/{chunk-HUMGEP7S.mjs → chunk-WX5VUIGT.mjs} +3 -2
- package/dist/{chunk-OXDX6CH2.mjs → chunk-Y5RQN5BO.mjs} +1 -1
- package/dist/{chunk-OQTPXPAP.mjs → chunk-YN5ZIWCE.mjs} +8 -3
- package/dist/{chunk-KVZE7UGH.mjs → chunk-Z4PDV7HB.mjs} +89 -55
- package/dist/{chunk-JVTAKNRO.mjs → chunk-ZA5EFHET.mjs} +1 -1
- package/dist/{chunk-VCULFIZ5.js → chunk-ZJI2VLIL.js} +2 -0
- package/dist/{chunk-56ZV3VVY.js → chunk-ZLNBE4IS.js} +2 -0
- package/dist/{chunk-PR3PQUKM.js → chunk-ZZAR4IDS.js} +1 -1
- package/dist/components/ActivityFeed.js +5 -5
- package/dist/components/ActivityFeed.mjs +4 -4
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.mjs +1 -1
- package/dist/components/Card.js +2 -2
- package/dist/components/Card.mjs +1 -1
- package/dist/components/ChatWindow.js +3 -3
- package/dist/components/ChatWindow.mjs +2 -2
- package/dist/components/CommentThread.js +4 -4
- package/dist/components/CommentThread.mjs +3 -3
- package/dist/components/Content.js +2 -2
- package/dist/components/Content.mjs +1 -1
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.d.mts +10 -3
- package/dist/components/DataTableWithToolbar.d.ts +10 -3
- package/dist/components/DataTableWithToolbar.js +6 -6
- package/dist/components/DataTableWithToolbar.mjs +5 -5
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Drawer.mjs +1 -1
- package/dist/components/Dropdown.d.mts +9 -0
- package/dist/components/Dropdown.d.ts +9 -0
- package/dist/components/Dropdown.js +2 -2
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/DropdownItem.js +3 -3
- package/dist/components/DropdownItem.mjs +2 -2
- package/dist/components/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu.mjs +1 -1
- package/dist/components/Form.js +2 -2
- package/dist/components/Form.mjs +1 -1
- package/dist/components/FormItem.js +3 -3
- package/dist/components/FormItem.mjs +2 -2
- package/dist/components/FormWizard.js +3 -3
- package/dist/components/FormWizard.mjs +2 -2
- package/dist/components/Header.js +2 -2
- package/dist/components/Header.mjs +1 -1
- package/dist/components/Icon.js +2 -2
- package/dist/components/Icon.mjs +1 -1
- package/dist/components/Image.js +3 -2
- package/dist/components/Image.mjs +2 -1
- package/dist/components/Menu.js +2 -2
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItemGroup.js +2 -2
- package/dist/components/MenuItemGroup.mjs +1 -1
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/NotificationCenter.js +4 -4
- package/dist/components/NotificationCenter.mjs +3 -3
- package/dist/components/Popconfirm.d.mts +7 -1
- package/dist/components/Popconfirm.d.ts +7 -1
- package/dist/components/Popconfirm.js +2 -2
- package/dist/components/Popconfirm.mjs +1 -1
- package/dist/components/Popover.d.mts +7 -1
- package/dist/components/Popover.d.ts +7 -1
- package/dist/components/Popover.js +2 -2
- package/dist/components/Popover.mjs +1 -1
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.mjs +1 -1
- package/dist/components/SubMenu.js +2 -2
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/Table.d.mts +1 -1
- package/dist/components/Table.d.ts +1 -1
- package/dist/components/Table.js +3 -3
- package/dist/components/Table.mjs +2 -2
- package/dist/components/Tag.js +2 -2
- package/dist/components/Tag.mjs +1 -1
- package/dist/components/Timeline.js +2 -2
- package/dist/components/Timeline.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -27
- package/dist/index.mjs +26 -26
- package/package.json +2 -2
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var _chunkWVVXZKNIjs = require('./chunk-WVVXZKNI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZLNBE4ISjs = require('./chunk-ZLNBE4IS.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZJI2VLILjs = require('./chunk-ZJI2VLIL.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
|
|
@@ -112,7 +112,7 @@ var CommentThread = ({
|
|
|
112
112
|
const likeCount = node.likes ? ` ${node.likes}` : "";
|
|
113
113
|
actions.push(
|
|
114
114
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
115
|
-
|
|
115
|
+
_chunkZLNBE4ISjs.Button,
|
|
116
116
|
{
|
|
117
117
|
size: "sm",
|
|
118
118
|
variant: "ghost",
|
|
@@ -134,7 +134,7 @@ var CommentThread = ({
|
|
|
134
134
|
if (showReply) {
|
|
135
135
|
actions.push(
|
|
136
136
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
137
|
-
|
|
137
|
+
_chunkZLNBE4ISjs.Button,
|
|
138
138
|
{
|
|
139
139
|
size: "sm",
|
|
140
140
|
variant: "ghost",
|
|
@@ -158,7 +158,7 @@ var CommentThread = ({
|
|
|
158
158
|
if (showMore) {
|
|
159
159
|
actions.push(
|
|
160
160
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
161
|
-
|
|
161
|
+
_chunkZLNBE4ISjs.Button,
|
|
162
162
|
{
|
|
163
163
|
size: "sm",
|
|
164
164
|
variant: "ghost",
|
|
@@ -181,7 +181,7 @@ var CommentThread = ({
|
|
|
181
181
|
const actionKey = _nullishCoalesce(action.key, () => ( `${node.id}-action-${index}`));
|
|
182
182
|
actions.push(
|
|
183
183
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
184
|
-
|
|
184
|
+
_chunkZLNBE4ISjs.Button,
|
|
185
185
|
{
|
|
186
186
|
size: "sm",
|
|
187
187
|
variant: _nullishCoalesce(action.variant, () => ( "ghost")),
|
|
@@ -223,8 +223,8 @@ var CommentThread = ({
|
|
|
223
223
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
224
224
|
_optionalChain([node, 'access', _9 => _9.user, 'optionalAccess', _10 => _10.name]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.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
225
|
_optionalChain([node, 'access', _11 => _11.user, 'optionalAccess', _12 => _12.title]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.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__ */ _jsxruntime.jsx.call(void 0,
|
|
227
|
-
_optionalChain([node, 'access', _13 => _13.tags, 'optionalAccess', _14 => _14.map, 'call', _15 => _15((tag, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
226
|
+
node.tag ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZJI2VLILjs.Tag, { size: "sm", variant: _nullishCoalesce(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
|
+
_optionalChain([node, 'access', _13 => _13.tags, 'optionalAccess', _14 => _14.map, 'call', _15 => _15((tag, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZJI2VLILjs.Tag, { size: "sm", variant: _nullishCoalesce(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
228
|
node.time ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUF3DXKCIjs.Text, { tag: "span", size: "xs", color: "muted", className: "ml-auto text-gray-400 dark:text-gray-500 font-normal", children: _tigercatcore.formatCommentTime.call(void 0, node.time) }) : null
|
|
229
229
|
] }),
|
|
230
230
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-gray-600 dark:text-gray-300 leading-relaxed break-words mt-2 mb-3 pr-2", children: node.content }),
|
|
@@ -242,7 +242,7 @@ var CommentThread = ({
|
|
|
242
242
|
),
|
|
243
243
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 justify-end", children: [
|
|
244
244
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
245
|
-
|
|
245
|
+
_chunkZLNBE4ISjs.Button,
|
|
246
246
|
{
|
|
247
247
|
size: "sm",
|
|
248
248
|
variant: "ghost",
|
|
@@ -255,7 +255,7 @@ var CommentThread = ({
|
|
|
255
255
|
}
|
|
256
256
|
),
|
|
257
257
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
258
|
-
|
|
258
|
+
_chunkZLNBE4ISjs.Button,
|
|
259
259
|
{
|
|
260
260
|
size: "sm",
|
|
261
261
|
variant: "primary",
|
|
@@ -267,7 +267,7 @@ var CommentThread = ({
|
|
|
267
267
|
] })
|
|
268
268
|
] }) : null,
|
|
269
269
|
hasChildren ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
270
|
-
|
|
270
|
+
_chunkZLNBE4ISjs.Button,
|
|
271
271
|
{
|
|
272
272
|
size: "sm",
|
|
273
273
|
variant: "ghost",
|
|
@@ -288,7 +288,7 @@ var CommentThread = ({
|
|
|
288
288
|
(child, index) => renderNode(child, depth + 1, index === visibleChildren.length - 1)
|
|
289
289
|
),
|
|
290
290
|
showLoadMoreBtn ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
291
|
-
|
|
291
|
+
_chunkZLNBE4ISjs.Button,
|
|
292
292
|
{
|
|
293
293
|
size: "sm",
|
|
294
294
|
variant: "ghost",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk2WDCWFOMjs = require('./chunk-2WDCWFOM.js');
|
|
4
4
|
|
|
5
5
|
// src/components/DropdownItem.tsx
|
|
6
6
|
var _react = require('react');
|
|
@@ -17,7 +17,7 @@ var DropdownItem = ({
|
|
|
17
17
|
children,
|
|
18
18
|
...buttonProps
|
|
19
19
|
}) => {
|
|
20
|
-
const context = _react.useContext.call(void 0,
|
|
20
|
+
const context = _react.useContext.call(void 0, _chunk2WDCWFOMjs.DropdownContext);
|
|
21
21
|
const handleClick = (event) => {
|
|
22
22
|
if (disabled) {
|
|
23
23
|
event.preventDefault();
|
|
@@ -12,7 +12,7 @@ var _chunkZRHDNGWOjs = require('./chunk-ZRHDNGWO.js');
|
|
|
12
12
|
var _chunkWVVXZKNIjs = require('./chunk-WVVXZKNI.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkZLNBE4ISjs = require('./chunk-ZLNBE4IS.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
|
|
@@ -233,7 +233,7 @@ var ChatWindow = ({
|
|
|
233
233
|
onKeyDown: handleKeyDown
|
|
234
234
|
}
|
|
235
235
|
) }),
|
|
236
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
236
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZLNBE4ISjs.Button, { disabled: !canSend, onClick: handleSend, "aria-label": _nullishCoalesce(sendAriaLabel, () => ( sendText)), children: sendText })
|
|
237
237
|
] })
|
|
238
238
|
] });
|
|
239
239
|
};
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
isKeySelected,
|
|
28
28
|
isKeyOpen,
|
|
29
29
|
menuItemIconClasses,
|
|
30
|
+
menuCollapsedIconClasses,
|
|
30
31
|
menuItemGroupTitleClasses,
|
|
31
32
|
menuSearchFieldClasses,
|
|
32
33
|
menuSearchEmptyClasses,
|
|
@@ -259,18 +260,22 @@ var MenuItem = ({
|
|
|
259
260
|
);
|
|
260
261
|
const renderIcon = () => {
|
|
261
262
|
if (!icon) return null;
|
|
263
|
+
const iconClasses = effectiveCollapsed ? menuCollapsedIconClasses : menuItemIconClasses;
|
|
262
264
|
if (typeof icon === "string") {
|
|
263
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
265
|
+
return /* @__PURE__ */ jsx("span", { className: iconClasses, dangerouslySetInnerHTML: { __html: icon } });
|
|
264
266
|
}
|
|
265
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
267
|
+
return /* @__PURE__ */ jsx("span", { className: iconClasses, children: icon });
|
|
266
268
|
};
|
|
267
269
|
const renderLabel = () => {
|
|
268
270
|
if (!effectiveCollapsed) return /* @__PURE__ */ jsx("span", { className: "flex-1", children });
|
|
269
271
|
if (!icon) {
|
|
270
272
|
const text = String(children || "");
|
|
271
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
274
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-center", "aria-hidden": "true", children: text.charAt(0).toUpperCase() }),
|
|
275
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children })
|
|
276
|
+
] });
|
|
272
277
|
}
|
|
273
|
-
return
|
|
278
|
+
return /* @__PURE__ */ jsx("span", { className: "sr-only", children });
|
|
274
279
|
};
|
|
275
280
|
return /* @__PURE__ */ jsx("li", { role: "none", children: /* @__PURE__ */ jsxs(
|
|
276
281
|
"button",
|
|
@@ -529,10 +534,11 @@ var SubMenu = ({
|
|
|
529
534
|
if (!menuContext) return null;
|
|
530
535
|
const renderIcon = () => {
|
|
531
536
|
if (!icon) return null;
|
|
537
|
+
const iconClasses = effectiveCollapsed ? menuCollapsedIconClasses : menuItemIconClasses;
|
|
532
538
|
if (typeof icon === "string") {
|
|
533
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
539
|
+
return /* @__PURE__ */ jsx("span", { className: iconClasses, dangerouslySetInnerHTML: { __html: icon } });
|
|
534
540
|
}
|
|
535
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
541
|
+
return /* @__PURE__ */ jsx("span", { className: iconClasses, children: icon });
|
|
536
542
|
};
|
|
537
543
|
const renderTitle = () => {
|
|
538
544
|
if (!effectiveCollapsed) {
|
|
@@ -542,9 +548,15 @@ var SubMenu = ({
|
|
|
542
548
|
menuContext.mode !== "horizontal" && !isPopup && /* @__PURE__ */ jsx(ExpandIcon, { expanded: isExpanded })
|
|
543
549
|
] });
|
|
544
550
|
} else if (!icon) {
|
|
545
|
-
return /* @__PURE__ */
|
|
551
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
552
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-center", "aria-hidden": "true", children: title.charAt(0).toUpperCase() }),
|
|
553
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: title })
|
|
554
|
+
] });
|
|
546
555
|
} else {
|
|
547
|
-
return
|
|
556
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
557
|
+
renderIcon(),
|
|
558
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: title })
|
|
559
|
+
] });
|
|
548
560
|
}
|
|
549
561
|
};
|
|
550
562
|
const renderContent = () => {
|
|
@@ -638,6 +650,7 @@ var SubMenu = ({
|
|
|
638
650
|
"aria-expanded": isExpanded ? "true" : "false",
|
|
639
651
|
"aria-haspopup": "true",
|
|
640
652
|
"aria-disabled": disabled ? "true" : void 0,
|
|
653
|
+
"data-state": isExpanded ? "open" : "closed",
|
|
641
654
|
disabled,
|
|
642
655
|
tabIndex: -1,
|
|
643
656
|
children: renderTitle()
|
|
@@ -59,8 +59,9 @@ var Popover = ({
|
|
|
59
59
|
className: triggerClasses,
|
|
60
60
|
"aria-haspopup": "dialog",
|
|
61
61
|
"aria-disabled": disabled ? "true" : void 0,
|
|
62
|
+
"data-state": currentVisible ? "open" : "closed",
|
|
62
63
|
...triggerHandlers,
|
|
63
|
-
children
|
|
64
|
+
children: typeof children === "function" ? children({ open: Boolean(currentVisible) }) : children
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
currentVisible && renderBodyPortal(
|
|
@@ -69,6 +69,7 @@ var Drawer = ({
|
|
|
69
69
|
zIndex = 1e3,
|
|
70
70
|
className,
|
|
71
71
|
bodyClassName,
|
|
72
|
+
bodyPadding,
|
|
72
73
|
destroyOnClose = false,
|
|
73
74
|
destroyOnCloseAfterLeave = false,
|
|
74
75
|
fullscreenOnMobile = true,
|
|
@@ -223,7 +224,7 @@ var Drawer = ({
|
|
|
223
224
|
panelClassName
|
|
224
225
|
);
|
|
225
226
|
const headerClasses = _tigercatcore.getDrawerHeaderClasses.call(void 0, );
|
|
226
|
-
const bodyClasses = _tigercatcore.getDrawerBodyClasses.call(void 0, bodyClassName);
|
|
227
|
+
const bodyClasses = _tigercatcore.getDrawerBodyClasses.call(void 0, bodyClassName, bodyPadding);
|
|
227
228
|
const footerClasses = _tigercatcore.getDrawerFooterClasses.call(void 0, );
|
|
228
229
|
const closeButtonClasses = _tigercatcore.getDrawerCloseButtonClasses.call(void 0, );
|
|
229
230
|
const titleClasses = _tigercatcore.getDrawerTitleClasses.call(void 0, );
|
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
tagBaseClasses,
|
|
12
12
|
tagSizeClasses,
|
|
13
13
|
tagCloseButtonBaseClasses,
|
|
14
|
-
tagCloseIconPath
|
|
14
|
+
tagCloseIconPath,
|
|
15
|
+
warnUnsupportedColorProp
|
|
15
16
|
} from "@expcat/tigercat-core";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
18
|
var CloseIcon = () => /* @__PURE__ */ jsx(
|
|
@@ -45,6 +46,7 @@ var Tag = ({
|
|
|
45
46
|
className,
|
|
46
47
|
...props
|
|
47
48
|
}) => {
|
|
49
|
+
warnUnsupportedColorProp("Tag", props);
|
|
48
50
|
const [isVisible, setIsVisible] = useState(true);
|
|
49
51
|
const tagClasses = useMemo(
|
|
50
52
|
() => classNames(tagBaseClasses, getTagVariantClasses(variant), tagSizeClasses[size], className),
|
|
@@ -59,8 +59,9 @@ var Popover = ({
|
|
|
59
59
|
className: triggerClasses,
|
|
60
60
|
"aria-haspopup": "dialog",
|
|
61
61
|
"aria-disabled": disabled ? "true" : void 0,
|
|
62
|
+
"data-state": currentVisible ? "open" : "closed",
|
|
62
63
|
...triggerHandlers,
|
|
63
|
-
children
|
|
64
|
+
children: typeof children === "function" ? children({ open: Boolean(currentVisible) }) : children
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
currentVisible && _chunkSTTQ5LXXjs.renderBodyPortal.call(void 0,
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
// src/components/Header.tsx
|
|
2
2
|
import {
|
|
3
3
|
classNames,
|
|
4
|
-
|
|
4
|
+
getLayoutHeaderClasses
|
|
5
5
|
} from "@expcat/tigercat-core";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
var Header = ({
|
|
8
8
|
className,
|
|
9
|
+
variant = "default",
|
|
9
10
|
height = "64px",
|
|
10
11
|
style,
|
|
11
12
|
children,
|
|
12
13
|
...props
|
|
13
14
|
}) => {
|
|
14
|
-
const headerClasses = classNames(
|
|
15
|
+
const headerClasses = classNames(getLayoutHeaderClasses(variant), className);
|
|
15
16
|
const headerStyle = { ...style, height };
|
|
16
17
|
return /* @__PURE__ */ jsx("header", { className: headerClasses, style: headerStyle, ...props, children });
|
|
17
18
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
// src/components/Content.tsx
|
|
2
2
|
import {
|
|
3
3
|
classNames,
|
|
4
|
-
|
|
4
|
+
getLayoutContentClasses
|
|
5
5
|
} from "@expcat/tigercat-core";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
var Content = ({
|
|
8
|
-
|
|
7
|
+
var Content = ({
|
|
8
|
+
className,
|
|
9
|
+
padding = true,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
const contentClasses = classNames(getLayoutContentClasses(padding), className);
|
|
9
14
|
return /* @__PURE__ */ jsx("main", { className: contentClasses, ...props, children });
|
|
10
15
|
};
|
|
11
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Table
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-INHQJXHD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Select
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KXNWY2Q7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Popover
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RYHM75MP.mjs";
|
|
10
10
|
import {
|
|
11
11
|
useTigerConfig
|
|
12
12
|
} from "./chunk-QAIBQHIO.mjs";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-MSHCPJIJ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
Button
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5TE7KLE5.mjs";
|
|
22
22
|
|
|
23
23
|
// src/components/DataTableWithToolbar.tsx
|
|
24
24
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
mergeTigerLocale,
|
|
31
31
|
resolveTigerLocale
|
|
32
32
|
} from "@expcat/tigercat-core";
|
|
33
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
34
34
|
var DataTableWithToolbar = ({
|
|
35
35
|
toolbar,
|
|
36
36
|
locale,
|
|
@@ -266,6 +266,20 @@ var DataTableWithToolbar = ({
|
|
|
266
266
|
);
|
|
267
267
|
};
|
|
268
268
|
const renderToolbar = () => {
|
|
269
|
+
if (toolbar?.render !== void 0) {
|
|
270
|
+
const toolbarContext = {
|
|
271
|
+
searchValue: searchValue ?? "",
|
|
272
|
+
setSearch: handleSearchChange,
|
|
273
|
+
submitSearch: handleSearchSubmit,
|
|
274
|
+
filters: resolvedFilters,
|
|
275
|
+
setFilter: (key, value) => setFilterValue(key, value),
|
|
276
|
+
selectedKeys,
|
|
277
|
+
selectedCount,
|
|
278
|
+
hiddenColumnKeys: resolvedHiddenKeys,
|
|
279
|
+
setHiddenColumnKeys: handleHiddenColumnsChange
|
|
280
|
+
};
|
|
281
|
+
return /* @__PURE__ */ jsx(Fragment, { children: typeof toolbar.render === "function" ? toolbar.render(toolbarContext) : toolbar.render });
|
|
282
|
+
}
|
|
269
283
|
if (!hasSearch && !hasFilters && !hasFiltersExtra && !hasBulkActions && !hasColumnSettings) {
|
|
270
284
|
return null;
|
|
271
285
|
}
|
|
@@ -279,75 +293,95 @@ var DataTableWithToolbar = ({
|
|
|
279
293
|
{
|
|
280
294
|
className: classNames(
|
|
281
295
|
"tiger-data-table-toolbar flex flex-wrap items-center gap-3",
|
|
282
|
-
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"
|
|
296
|
+
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",
|
|
297
|
+
toolbar?.className
|
|
283
298
|
),
|
|
299
|
+
style: toolbar?.style,
|
|
284
300
|
role: "toolbar",
|
|
285
301
|
"aria-label": tableLabels.toolbarAriaLabel,
|
|
286
302
|
children: [
|
|
287
303
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 flex-wrap flex-1 min-w-0", children: [
|
|
288
|
-
hasSearch ? /* @__PURE__ */ jsxs(
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
304
|
+
hasSearch ? /* @__PURE__ */ jsxs(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
className: classNames(
|
|
308
|
+
"flex items-center gap-2",
|
|
309
|
+
toolbar?.searchClassName ?? "w-full sm:w-auto sm:min-w-[220px] sm:max-w-[320px]"
|
|
310
|
+
),
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ jsx(
|
|
313
|
+
Input,
|
|
298
314
|
{
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
children: /* @__PURE__ */ jsx(
|
|
306
|
-
"path",
|
|
315
|
+
type: "search",
|
|
316
|
+
size: "sm",
|
|
317
|
+
value: searchValue,
|
|
318
|
+
placeholder: toolbar?.searchPlaceholder ?? tableLabels.searchPlaceholder,
|
|
319
|
+
prefix: /* @__PURE__ */ jsx(
|
|
320
|
+
"svg",
|
|
307
321
|
{
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
322
|
+
className: "w-3.5 h-3.5 text-[var(--tiger-text-secondary,#6b7280)] shrink-0",
|
|
323
|
+
fill: "none",
|
|
324
|
+
stroke: "currentColor",
|
|
325
|
+
strokeWidth: "2",
|
|
326
|
+
viewBox: "0 0 24 24",
|
|
327
|
+
"aria-hidden": "true",
|
|
328
|
+
children: /* @__PURE__ */ jsx(
|
|
329
|
+
"path",
|
|
330
|
+
{
|
|
331
|
+
strokeLinecap: "round",
|
|
332
|
+
strokeLinejoin: "round",
|
|
333
|
+
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
334
|
+
}
|
|
335
|
+
)
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
onChange: (event) => handleSearchChange(String(event.currentTarget.value)),
|
|
339
|
+
onKeyDown: (event) => {
|
|
340
|
+
if (event.key === "Enter") {
|
|
341
|
+
handleSearchSubmit();
|
|
311
342
|
}
|
|
312
|
-
|
|
343
|
+
}
|
|
313
344
|
}
|
|
314
345
|
),
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
346
|
+
toolbar?.showSearchButton ?? true ? /* @__PURE__ */ jsx(
|
|
347
|
+
Button,
|
|
348
|
+
{
|
|
349
|
+
size: "sm",
|
|
350
|
+
variant: "primary",
|
|
351
|
+
className: "whitespace-nowrap shrink-0 rounded-[var(--tiger-radius-md,0.5rem)] px-3",
|
|
352
|
+
onClick: handleSearchSubmit,
|
|
353
|
+
disabled: !onSearch && !toolbar?.onSearch,
|
|
354
|
+
children: toolbar?.searchButtonText ?? tableLabels.searchButtonText
|
|
319
355
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
Button,
|
|
325
|
-
{
|
|
326
|
-
size: "sm",
|
|
327
|
-
variant: "primary",
|
|
328
|
-
className: "whitespace-nowrap shrink-0 rounded-[var(--tiger-radius-md,0.5rem)] px-3",
|
|
329
|
-
onClick: handleSearchSubmit,
|
|
330
|
-
disabled: !onSearch && !toolbar?.onSearch,
|
|
331
|
-
children: toolbar?.searchButtonText ?? tableLabels.searchButtonText
|
|
332
|
-
}
|
|
333
|
-
) : null
|
|
334
|
-
] }) : null,
|
|
356
|
+
) : null
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
) : null,
|
|
335
360
|
hasFilters ? toolbar?.filters?.map((filter) => {
|
|
336
361
|
const currentValue = resolvedFilters[filter.key];
|
|
337
362
|
const clearable = filter.clearable !== false;
|
|
338
363
|
if (filter.render) {
|
|
339
|
-
return /* @__PURE__ */ jsx(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
364
|
+
return /* @__PURE__ */ jsx(
|
|
365
|
+
"div",
|
|
366
|
+
{
|
|
367
|
+
className: filter.itemClass ?? "w-full sm:w-auto",
|
|
368
|
+
style: filter.itemStyle,
|
|
369
|
+
children: filter.render({
|
|
370
|
+
filter,
|
|
371
|
+
value: currentValue,
|
|
372
|
+
filters: resolvedFilters,
|
|
373
|
+
setValue: (value) => setFilterValue(filter.key, value, filter),
|
|
374
|
+
setFilter: (key, value) => setFilterValue(key, value)
|
|
375
|
+
})
|
|
376
|
+
},
|
|
377
|
+
filter.key
|
|
378
|
+
);
|
|
346
379
|
}
|
|
347
380
|
return /* @__PURE__ */ jsx(
|
|
348
381
|
"div",
|
|
349
382
|
{
|
|
350
|
-
className: "w-full sm:w-auto sm:min-w-[120px] sm:max-w-[180px]",
|
|
383
|
+
className: filter.itemClass ?? "w-full sm:w-auto sm:min-w-[120px] sm:max-w-[180px]",
|
|
384
|
+
style: filter.itemStyle,
|
|
351
385
|
children: /* @__PURE__ */ jsx(
|
|
352
386
|
Select,
|
|
353
387
|
{
|
|
@@ -75,7 +75,7 @@ var Timeline = ({
|
|
|
75
75
|
/* @__PURE__ */ jsx("div", { className: headClasses, children: renderDotElement(item) }),
|
|
76
76
|
/* @__PURE__ */ jsxs("div", { className: contentClasses, children: [
|
|
77
77
|
item.label && /* @__PURE__ */ jsx("div", { className: timelineLabelClasses, children: item.label }),
|
|
78
|
-
item.content
|
|
78
|
+
item.content ? /* @__PURE__ */ jsx("div", { className: timelineDescriptionClasses, children: item.content }) : null
|
|
79
79
|
] })
|
|
80
80
|
] }, key);
|
|
81
81
|
};
|
|
@@ -12,6 +12,7 @@ var _react = require('react');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
var _tigercatcore = require('@expcat/tigercat-core');
|
|
16
17
|
var _jsxruntime = require('react/jsx-runtime');
|
|
17
18
|
var CloseIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -45,6 +46,7 @@ var Tag = ({
|
|
|
45
46
|
className,
|
|
46
47
|
...props
|
|
47
48
|
}) => {
|
|
49
|
+
_tigercatcore.warnUnsupportedColorProp.call(void 0, "Tag", props);
|
|
48
50
|
const [isVisible, setIsVisible] = _react.useState.call(void 0, true);
|
|
49
51
|
const tagClasses = _react.useMemo.call(void 0,
|
|
50
52
|
() => _tigercatcore.classNames.call(void 0, _tigercatcore.tagBaseClasses, _tigercatcore.getTagVariantClasses.call(void 0, variant), _tigercatcore.tagSizeClasses[size], className),
|
|
@@ -12,6 +12,7 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
var _tigercatcore = require('@expcat/tigercat-core');
|
|
16
17
|
var _jsxruntime = require('react/jsx-runtime');
|
|
17
18
|
var createDefaultSpinner = () => {
|
|
@@ -49,6 +50,7 @@ var Button = ({
|
|
|
49
50
|
"aria-disabled": ariaDisabledProp,
|
|
50
51
|
...rest
|
|
51
52
|
}) => {
|
|
53
|
+
_tigercatcore.warnUnsupportedColorProp.call(void 0, "Button", rest);
|
|
52
54
|
const group = _chunkYMKA4L3Zjs.useButtonGroupContext.call(void 0, );
|
|
53
55
|
const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => ( _optionalChain([group, 'optionalAccess', _ => _.size]))), () => ( "md"));
|
|
54
56
|
const isDisabled = disabled || loading;
|
|
@@ -75,7 +75,7 @@ var Timeline = ({
|
|
|
75
75
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: headClasses, children: renderDotElement(item) }),
|
|
76
76
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: contentClasses, children: [
|
|
77
77
|
item.label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.timelineLabelClasses, children: item.label }),
|
|
78
|
-
item.content
|
|
78
|
+
item.content ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.timelineDescriptionClasses, children: item.content }) : null
|
|
79
79
|
] })
|
|
80
80
|
] }, key);
|
|
81
81
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkI373B74Wjs = require('../chunk-I373B74W.js');
|
|
5
|
+
require('../chunk-ZZAR4IDS.js');
|
|
6
6
|
require('../chunk-3MRP3XYI.js');
|
|
7
7
|
require('../chunk-QYYAXM5F.js');
|
|
8
8
|
require('../chunk-STTQ5LXX.js');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-ZJI2VLIL.js');
|
|
10
10
|
require('../chunk-UF3DXKCI.js');
|
|
11
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-FQO7BKXW.js');
|
|
12
12
|
require('../chunk-4MQCUKIC.js');
|
|
13
13
|
require('../chunk-TQOWIDQT.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.ActivityFeed =
|
|
17
|
+
exports.ActivityFeed = _chunkI373B74Wjs.ActivityFeed; exports.default = _chunkI373B74Wjs.ActivityFeed_default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ActivityFeed,
|
|
3
3
|
ActivityFeed_default
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-FB34UWF7.mjs";
|
|
5
|
+
import "../chunk-ZA5EFHET.mjs";
|
|
6
6
|
import "../chunk-FNJDBFKM.mjs";
|
|
7
7
|
import "../chunk-XZVQ3PJS.mjs";
|
|
8
8
|
import "../chunk-SEWNVIHH.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-WMPCN7OF.mjs";
|
|
10
10
|
import "../chunk-HLS4CHWX.mjs";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-IXV5YBCZ.mjs";
|
|
12
12
|
import "../chunk-4ZZ7YRTB.mjs";
|
|
13
13
|
import "../chunk-4R5YXNU4.mjs";
|
|
14
14
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZLNBE4ISjs = require('../chunk-ZLNBE4IS.js');
|
|
4
4
|
require('../chunk-YMKA4L3Z.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.Button =
|
|
7
|
+
exports.Button = _chunkZLNBE4ISjs.Button;
|