@expcat/tigercat-react 1.2.0 → 1.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/{chunk-ILYL3KSJ.js → chunk-2DH6MGC6.js} +4 -5
  2. package/dist/{chunk-BBAYDH2M.mjs → chunk-3FEFHD3E.mjs} +2 -2
  3. package/dist/{chunk-EPN7QWP6.mjs → chunk-3G5EJRD4.mjs} +6 -1
  4. package/dist/{chunk-CI2WHAT2.js → chunk-4MQCUKIC.js} +12 -5
  5. package/dist/{chunk-FE7PEZTI.mjs → chunk-4ZZ7YRTB.mjs} +11 -4
  6. package/dist/{chunk-GRXBGL6Q.js → chunk-56ZV3VVY.js} +10 -4
  7. package/dist/{chunk-RPKF4S2Q.mjs → chunk-5XS6PXBX.mjs} +1 -1
  8. package/dist/{chunk-DLLLDGXD.mjs → chunk-6CAKUMWV.mjs} +1 -1
  9. package/dist/{chunk-P3XVLJYD.js → chunk-6CWZXS5B.js} +6 -1
  10. package/dist/{chunk-2JUPXEWX.js → chunk-7YUD6VIC.js} +3 -3
  11. package/dist/{chunk-HWG4HNQH.mjs → chunk-AKDBQOKX.mjs} +1 -1
  12. package/dist/{chunk-2WBFUUVP.mjs → chunk-BONUUJU3.mjs} +4 -1
  13. package/dist/{chunk-IUTPGKU5.js → chunk-DTYDPMNR.js} +3 -3
  14. package/dist/{chunk-PLUE64IS.js → chunk-DXMSDLVJ.js} +2 -2
  15. package/dist/{chunk-7P4MIU6I.js → chunk-EX63M5ID.js} +9 -9
  16. package/dist/{chunk-X7XFQCDD.mjs → chunk-GBJILZTY.mjs} +1 -1
  17. package/dist/{chunk-2PCALG7V.js → chunk-H4AR4GXH.js} +4 -1
  18. package/dist/{chunk-QIXQYLH5.js → chunk-IZXU7DF6.js} +6 -2
  19. package/dist/{chunk-S7RUTD3X.mjs → chunk-J5R4Q2QM.mjs} +1 -1
  20. package/dist/{chunk-6OOGL43U.mjs → chunk-MMGZEG7G.mjs} +2 -2
  21. package/dist/{chunk-LA3CJOWA.js → chunk-NMEVQPOD.js} +2 -1
  22. package/dist/{chunk-OFTLPYYC.mjs → chunk-OQ6Z6U7R.mjs} +43 -3
  23. package/dist/{chunk-EV6KRX6F.mjs → chunk-OXGAZPPS.mjs} +1 -1
  24. package/dist/{chunk-IUT6A4FC.js → chunk-RUZQN7X3.js} +3 -3
  25. package/dist/{chunk-U5244LHL.mjs → chunk-SDZOVRVR.mjs} +0 -1
  26. package/dist/{chunk-A54CDNCF.js → chunk-SIY6FDKJ.js} +0 -1
  27. package/dist/{chunk-HU7AMIOC.js → chunk-SXHP4Q7O.js} +3 -3
  28. package/dist/{chunk-K6F6P66I.js → chunk-UE52NMPO.js} +5 -5
  29. package/dist/{chunk-GKJNQUTW.mjs → chunk-USWK2S3Y.mjs} +9 -3
  30. package/dist/{chunk-L6CL63GI.js → chunk-VDF2BD2A.js} +41 -1
  31. package/dist/{chunk-F2OF6XZ6.js → chunk-VNMWPJDN.js} +1 -1
  32. package/dist/{chunk-AOZLBASY.mjs → chunk-VSFDT2RS.mjs} +6 -2
  33. package/dist/{chunk-AZDNGGV7.mjs → chunk-WQ4FOHOU.mjs} +2 -1
  34. package/dist/{chunk-KY5MMT7Q.mjs → chunk-X37Q7VME.mjs} +2 -3
  35. package/dist/components/ActivityFeed.js +4 -3
  36. package/dist/components/ActivityFeed.mjs +3 -2
  37. package/dist/components/Alert.d.mts +3 -2
  38. package/dist/components/Alert.d.ts +3 -2
  39. package/dist/components/Alert.js +2 -2
  40. package/dist/components/Alert.mjs +1 -1
  41. package/dist/components/Avatar.js +3 -2
  42. package/dist/components/Avatar.mjs +2 -1
  43. package/dist/components/Breadcrumb.js +2 -2
  44. package/dist/components/Breadcrumb.mjs +1 -1
  45. package/dist/components/BreadcrumbItem.js +2 -2
  46. package/dist/components/BreadcrumbItem.mjs +1 -1
  47. package/dist/components/Button.js +3 -2
  48. package/dist/components/Button.mjs +2 -1
  49. package/dist/components/ChatWindow.js +6 -4
  50. package/dist/components/ChatWindow.mjs +5 -3
  51. package/dist/components/CommentThread.js +6 -4
  52. package/dist/components/CommentThread.mjs +5 -3
  53. package/dist/components/CropUpload.js +5 -4
  54. package/dist/components/CropUpload.mjs +4 -3
  55. package/dist/components/DataTableWithToolbar.js +4 -3
  56. package/dist/components/DataTableWithToolbar.mjs +3 -2
  57. package/dist/components/Descriptions.js +2 -2
  58. package/dist/components/Descriptions.mjs +1 -1
  59. package/dist/components/Divider.d.mts +1 -1
  60. package/dist/components/Divider.d.ts +1 -1
  61. package/dist/components/Divider.js +2 -2
  62. package/dist/components/Divider.mjs +1 -1
  63. package/dist/components/FormWizard.js +4 -3
  64. package/dist/components/FormWizard.mjs +3 -2
  65. package/dist/components/Modal.js +4 -3
  66. package/dist/components/Modal.mjs +3 -2
  67. package/dist/components/Notification.js +2 -2
  68. package/dist/components/Notification.mjs +1 -1
  69. package/dist/components/NotificationCenter.js +4 -3
  70. package/dist/components/NotificationCenter.mjs +3 -2
  71. package/dist/components/Splitter.js +2 -2
  72. package/dist/components/Splitter.mjs +1 -1
  73. package/dist/components/Tree.js +2 -2
  74. package/dist/components/Tree.mjs +1 -1
  75. package/dist/index.js +24 -24
  76. package/dist/index.mjs +23 -23
  77. package/package.json +2 -2
@@ -9,10 +9,10 @@ var _chunkZYJTHGQWjs = require('./chunk-ZYJTHGQW.js');
9
9
  var _chunkWVVXZKNIjs = require('./chunk-WVVXZKNI.js');
10
10
 
11
11
 
12
- var _chunkGRXBGL6Qjs = require('./chunk-GRXBGL6Q.js');
12
+ var _chunk56ZV3VVYjs = require('./chunk-56ZV3VVY.js');
13
13
 
14
14
 
15
- var _chunkCI2WHAT2js = require('./chunk-CI2WHAT2.js');
15
+ var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
16
16
 
17
17
  // src/components/ChatWindow.tsx
18
18
  var _react = require('react');
@@ -45,7 +45,6 @@ var ChatWindow = ({
45
45
  allowShiftEnter = true,
46
46
  allowEmpty = false,
47
47
  clearOnSend = true,
48
- statusVariant: _sv,
49
48
  virtual = false,
50
49
  virtualItemHeight = 88,
51
50
  virtualHeight = 400,
@@ -122,7 +121,7 @@ var ChatWindow = ({
122
121
  role: "listitem",
123
122
  children: [
124
123
  showAvatar && message.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
125
- _chunkCI2WHAT2js.Avatar,
124
+ _chunk4MQCUKICjs.Avatar,
126
125
  {
127
126
  size: "sm",
128
127
  src: message.user.avatar,
@@ -230,7 +229,7 @@ var ChatWindow = ({
230
229
  onKeyDown: handleKeyDown
231
230
  }
232
231
  ) }),
233
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRXBGL6Qjs.Button, { disabled: !canSend, onClick: handleSend, "aria-label": _nullishCoalesce(sendAriaLabel, () => ( sendText)), children: sendText })
232
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { disabled: !canSend, onClick: handleSend, "aria-label": _nullishCoalesce(sendAriaLabel, () => ( sendText)), children: sendText })
234
233
  ] })
235
234
  ] });
236
235
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Modal
3
- } from "./chunk-HWG4HNQH.mjs";
3
+ } from "./chunk-AKDBQOKX.mjs";
4
4
  import {
5
5
  ImageCropper
6
6
  } from "./chunk-SY23FAXK.mjs";
7
7
  import {
8
8
  Button
9
- } from "./chunk-GKJNQUTW.mjs";
9
+ } from "./chunk-USWK2S3Y.mjs";
10
10
 
11
11
  // src/components/CropUpload.tsx
12
12
  import { useState, useRef, useCallback, useMemo } from "react";
@@ -31,12 +31,17 @@ var Descriptions = ({
31
31
  children,
32
32
  ...props
33
33
  }) => {
34
+ const isResponsive = typeof columnProp === "object" && columnProp !== null;
34
35
  const subscribe = useMemo(() => {
36
+ if (!isResponsive) {
37
+ return () => () => {
38
+ };
39
+ }
35
40
  return (cb) => {
36
41
  window.addEventListener("resize", cb);
37
42
  return () => window.removeEventListener("resize", cb);
38
43
  };
39
- }, []);
44
+ }, [isResponsive]);
40
45
  const getSnapshot = () => window.innerWidth;
41
46
  const getServerSnapshot = () => 1024;
42
47
  const windowWidth = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
@@ -1,4 +1,8 @@
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; }// src/components/Avatar.tsx
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 _chunkTQOWIDQTjs = require('./chunk-TQOWIDQT.js');
4
+
5
+ // src/components/Avatar.tsx
2
6
  var _react = require('react');
3
7
 
4
8
 
@@ -12,7 +16,7 @@ var _react = require('react');
12
16
  var _tigercatcore = require('@expcat/tigercat-core');
13
17
  var _jsxruntime = require('react/jsx-runtime');
14
18
  var Avatar = ({
15
- size = "md",
19
+ size,
16
20
  shape = "circle",
17
21
  src,
18
22
  alt = "",
@@ -24,23 +28,26 @@ var Avatar = ({
24
28
  ...props
25
29
  }) => {
26
30
  const [imageError, setImageError] = _react.useState.call(void 0, false);
31
+ const group = _react.useContext.call(void 0, _chunkTQOWIDQTjs.AvatarGroupContext);
27
32
  const hasImage = Boolean(src) && !imageError;
28
33
  const displayText = text ? _tigercatcore.getInitials.call(void 0, text) : "";
34
+ const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => ( _optionalChain([group, 'optionalAccess', _ => _.size]))), () => ( "md"));
29
35
  const ariaLabelProp = props["aria-label"];
30
36
  const ariaLabelledbyProp = props["aria-labelledby"];
31
37
  const ariaHiddenProp = props["aria-hidden"];
32
- const computedLabel = _nullishCoalesce(_nullishCoalesce(ariaLabelProp, () => ( (alt.trim() ? alt : void 0))), () => ( (_optionalChain([text, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) || void 0)));
38
+ const computedLabel = _nullishCoalesce(_nullishCoalesce(ariaLabelProp, () => ( (alt.trim() ? alt : void 0))), () => ( (_optionalChain([text, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]) || void 0)));
33
39
  const isDecorative = ariaHiddenProp === true || !computedLabel && !ariaLabelledbyProp;
34
40
  const avatarClasses = _react.useMemo.call(void 0,
35
41
  () => _tigercatcore.classNames.call(void 0,
36
42
  _tigercatcore.avatarBaseClasses,
37
- _tigercatcore.avatarSizeClasses[size],
43
+ _tigercatcore.avatarSizeClasses[resolvedSize],
38
44
  _tigercatcore.avatarShapeClasses[shape],
45
+ _optionalChain([group, 'optionalAccess', _4 => _4.itemClass]),
39
46
  !hasImage && bgColor,
40
47
  !hasImage && textColor,
41
48
  className
42
49
  ),
43
- [size, shape, hasImage, bgColor, textColor, className]
50
+ [resolvedSize, shape, _optionalChain([group, 'optionalAccess', _5 => _5.itemClass]), hasImage, bgColor, textColor, className]
44
51
  );
45
52
  if (hasImage) {
46
53
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { ...props, className: avatarClasses, "aria-hidden": isDecorative ? true : ariaHiddenProp, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1,5 +1,9 @@
1
+ import {
2
+ AvatarGroupContext
3
+ } from "./chunk-4R5YXNU4.mjs";
4
+
1
5
  // src/components/Avatar.tsx
2
- import { useState, useMemo } from "react";
6
+ import { useState, useMemo, useContext } from "react";
3
7
  import {
4
8
  classNames,
5
9
  avatarBaseClasses,
@@ -12,7 +16,7 @@ import {
12
16
  } from "@expcat/tigercat-core";
13
17
  import { jsx } from "react/jsx-runtime";
14
18
  var Avatar = ({
15
- size = "md",
19
+ size,
16
20
  shape = "circle",
17
21
  src,
18
22
  alt = "",
@@ -24,8 +28,10 @@ var Avatar = ({
24
28
  ...props
25
29
  }) => {
26
30
  const [imageError, setImageError] = useState(false);
31
+ const group = useContext(AvatarGroupContext);
27
32
  const hasImage = Boolean(src) && !imageError;
28
33
  const displayText = text ? getInitials(text) : "";
34
+ const resolvedSize = size ?? group?.size ?? "md";
29
35
  const ariaLabelProp = props["aria-label"];
30
36
  const ariaLabelledbyProp = props["aria-labelledby"];
31
37
  const ariaHiddenProp = props["aria-hidden"];
@@ -34,13 +40,14 @@ var Avatar = ({
34
40
  const avatarClasses = useMemo(
35
41
  () => classNames(
36
42
  avatarBaseClasses,
37
- avatarSizeClasses[size],
43
+ avatarSizeClasses[resolvedSize],
38
44
  avatarShapeClasses[shape],
45
+ group?.itemClass,
39
46
  !hasImage && bgColor,
40
47
  !hasImage && textColor,
41
48
  className
42
49
  ),
43
- [size, shape, hasImage, bgColor, textColor, className]
50
+ [resolvedSize, shape, group?.itemClass, hasImage, bgColor, textColor, className]
44
51
  );
45
52
  if (hasImage) {
46
53
  return /* @__PURE__ */ jsx("span", { ...props, className: avatarClasses, "aria-hidden": isDecorative ? true : ariaHiddenProp, children: /* @__PURE__ */ jsx(
@@ -1,4 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/components/Button.tsx
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkYMKA4L3Zjs = require('./chunk-YMKA4L3Z.js');
4
+
5
+ // src/components/Button.tsx
2
6
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
3
7
 
4
8
 
@@ -29,7 +33,7 @@ var createDefaultSpinner = () => {
29
33
  };
30
34
  var Button = ({
31
35
  variant = "primary",
32
- size = "md",
36
+ size,
33
37
  disabled = false,
34
38
  loading = false,
35
39
  loadingIcon,
@@ -45,6 +49,8 @@ var Button = ({
45
49
  "aria-disabled": ariaDisabledProp,
46
50
  ...rest
47
51
  }) => {
52
+ const group = _chunkYMKA4L3Zjs.useButtonGroupContext.call(void 0, );
53
+ const resolvedSize = _nullishCoalesce(_nullishCoalesce(size, () => ( _optionalChain([group, 'optionalAccess', _ => _.size]))), () => ( "md"));
48
54
  const isDisabled = disabled || loading;
49
55
  const ariaBusy = _nullishCoalesce(ariaBusyProp, () => ( (loading ? true : void 0)));
50
56
  const ariaDisabled = _nullishCoalesce(ariaDisabledProp, () => ( (isDisabled ? true : void 0)));
@@ -53,12 +59,12 @@ var Button = ({
53
59
  return _tigercatcore.classNames.call(void 0,
54
60
  _tigercatcore.buttonBaseClasses,
55
61
  variantClasses,
56
- _tigercatcore.buttonSizeClasses[size],
62
+ _tigercatcore.buttonSizeClasses[resolvedSize],
57
63
  isDisabled && _tigercatcore.buttonDisabledClasses,
58
64
  block && "w-full",
59
65
  className
60
66
  );
61
- }, [variant, size, isDisabled, block, danger, className]);
67
+ }, [variant, resolvedSize, isDisabled, block, danger, className]);
62
68
  const iconIsRight = iconPosition === "right";
63
69
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
64
70
  "button",
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-A42OLED6.mjs";
8
8
  import {
9
9
  Button
10
- } from "./chunk-GKJNQUTW.mjs";
10
+ } from "./chunk-USWK2S3Y.mjs";
11
11
  import {
12
12
  Loading
13
13
  } from "./chunk-FNJDBFKM.mjs";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-WNLUUD5N.mjs";
10
10
  import {
11
11
  Button
12
- } from "./chunk-GKJNQUTW.mjs";
12
+ } from "./chunk-USWK2S3Y.mjs";
13
13
 
14
14
  // src/components/DataTableWithToolbar.tsx
15
15
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -31,12 +31,17 @@ var Descriptions = ({
31
31
  children,
32
32
  ...props
33
33
  }) => {
34
+ const isResponsive = typeof columnProp === "object" && columnProp !== null;
34
35
  const subscribe = _react.useMemo.call(void 0, () => {
36
+ if (!isResponsive) {
37
+ return () => () => {
38
+ };
39
+ }
35
40
  return (cb) => {
36
41
  window.addEventListener("resize", cb);
37
42
  return () => window.removeEventListener("resize", cb);
38
43
  };
39
- }, []);
44
+ }, [isResponsive]);
40
45
  const getSnapshot = () => window.innerWidth;
41
46
  const getServerSnapshot = () => 1024;
42
47
  const windowWidth = _react.useSyncExternalStore.call(void 0, subscribe, getSnapshot, getServerSnapshot);
@@ -9,7 +9,7 @@ var _chunk6Z4LLPZAjs = require('./chunk-6Z4LLPZA.js');
9
9
  var _chunkZYJTHGQWjs = require('./chunk-ZYJTHGQW.js');
10
10
 
11
11
 
12
- var _chunkGRXBGL6Qjs = require('./chunk-GRXBGL6Q.js');
12
+ var _chunk56ZV3VVYjs = require('./chunk-56ZV3VVY.js');
13
13
 
14
14
  // src/components/DataTableWithToolbar.tsx
15
15
  var _react = require('react');
@@ -153,7 +153,7 @@ var DataTableWithToolbar = ({
153
153
  }
154
154
  ),
155
155
  _nullishCoalesce(_optionalChain([toolbar, 'optionalAccess', _39 => _39.showSearchButton]), () => ( true)) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
156
- _chunkGRXBGL6Qjs.Button,
156
+ _chunk56ZV3VVYjs.Button,
157
157
  {
158
158
  size: "sm",
159
159
  variant: "primary",
@@ -200,7 +200,7 @@ var DataTableWithToolbar = ({
200
200
  " \u9879"
201
201
  ] }) : null,
202
202
  _optionalChain([toolbar, 'optionalAccess', _45 => _45.bulkActions, 'optionalAccess', _46 => _46.map, 'call', _47 => _47((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
203
- _chunkGRXBGL6Qjs.Button,
203
+ _chunk56ZV3VVYjs.Button,
204
204
  {
205
205
  size: "sm",
206
206
  variant: _nullishCoalesce(action.variant, () => ( "outline")),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Button
3
- } from "./chunk-GKJNQUTW.mjs";
3
+ } from "./chunk-USWK2S3Y.mjs";
4
4
  import {
5
5
  renderBodyPortal,
6
6
  useBodyScrollLock,
@@ -28,6 +28,7 @@ var Splitter = ({
28
28
  const containerRef = useRef(null);
29
29
  const dragSessionRef = useRef(null);
30
30
  const [paneSizes, setPaneSizes] = useState([]);
31
+ const [draggingIndex, setDraggingIndex] = useState(-1);
31
32
  const draggingRef = useRef(null);
32
33
  const cleanupDragSession = useCallback(() => {
33
34
  dragSessionRef.current?.dispose();
@@ -70,6 +71,7 @@ var Splitter = ({
70
71
  startPos: direction === "horizontal" ? e.clientX : e.clientY,
71
72
  startSizes: [...paneSizes]
72
73
  };
74
+ setDraggingIndex(index);
73
75
  onResizeStart?.({ index, sizes: [...paneSizes] });
74
76
  dragSessionRef.current = createDocumentDragSession({
75
77
  startX: e.clientX,
@@ -97,6 +99,7 @@ var Splitter = ({
97
99
  }
98
100
  draggingRef.current = null;
99
101
  dragSessionRef.current = null;
102
+ setDraggingIndex(-1);
100
103
  }
101
104
  });
102
105
  },
@@ -143,7 +146,7 @@ var Splitter = ({
143
146
  return /* @__PURE__ */ jsx("div", { ref: containerRef, className: containerClasses, style, "data-direction": direction, children: childArray.map((child, i) => {
144
147
  const size = paneSizes[i];
145
148
  const paneStyle = size != null ? getPaneStyle(size, direction) : void 0;
146
- const isDragging = draggingRef.current?.index === i;
149
+ const isDragging = draggingIndex === i;
147
150
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
148
151
  /* @__PURE__ */ jsx(
149
152
  "div",
@@ -7,7 +7,7 @@ var _chunkXPA2YCQOjs = require('./chunk-XPA2YCQO.js');
7
7
  var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
8
8
 
9
9
 
10
- var _chunkGRXBGL6Qjs = require('./chunk-GRXBGL6Q.js');
10
+ var _chunk56ZV3VVYjs = require('./chunk-56ZV3VVY.js');
11
11
 
12
12
  // src/components/FormWizard.tsx
13
13
  var _react = require('react');
@@ -156,8 +156,8 @@ var FormWizard = ({
156
156
  ) }),
157
157
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-6 py-4 flex flex-col items-center", children: contentNode }),
158
158
  showActions && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center gap-3 px-6 py-2 border-t border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface-muted,#f9fafb)]", children: [
159
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRXBGL6Qjs.Button, { htmlType: "button", variant: "secondary", disabled: isFirst, onClick: handlePrev, children: _tigercatcore.resolveLocaleText.call(void 0, labels.prevText, prevText) }),
160
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRXBGL6Qjs.Button, { htmlType: "button", variant: "primary", onClick: handleNext, children: isLast ? _tigercatcore.resolveLocaleText.call(void 0, labels.finishText, finishText) : _tigercatcore.resolveLocaleText.call(void 0, labels.nextText, nextText) })
159
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { htmlType: "button", variant: "secondary", disabled: isFirst, onClick: handlePrev, children: _tigercatcore.resolveLocaleText.call(void 0, labels.prevText, prevText) }),
160
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { htmlType: "button", variant: "primary", onClick: handleNext, children: isLast ? _tigercatcore.resolveLocaleText.call(void 0, labels.finishText, finishText) : _tigercatcore.resolveLocaleText.call(void 0, labels.nextText, nextText) })
161
161
  ] })
162
162
  ] });
163
163
  };
@@ -18,7 +18,7 @@ var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
18
18
  var _chunkUIO6O4MIjs = require('./chunk-UIO6O4MI.js');
19
19
 
20
20
 
21
- var _chunkCI2WHAT2js = require('./chunk-CI2WHAT2.js');
21
+ var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
22
22
 
23
23
  // src/components/ActivityFeed.tsx
24
24
  var _react = require('react');
@@ -89,7 +89,7 @@ var ActivityFeed = ({
89
89
  (action, actionIndex) => renderAction(item, action, actionIndex)
90
90
  )]);
91
91
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.activityItemClasses, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemLayoutClasses, children: [
92
- showAvatar && item.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCI2WHAT2js.Avatar, { size: "sm", src: item.user.avatar, text: item.user.name, className: "shrink-0" }) : null,
92
+ showAvatar && item.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4MQCUKICjs.Avatar, { size: "sm", src: item.user.avatar, text: item.user.name, className: "shrink-0" }) : null,
93
93
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemBodyClasses, children: [
94
94
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemHeaderClasses, children: [
95
95
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemTitleGroupClasses, children: [
@@ -3,7 +3,7 @@
3
3
  var _chunkWVVXZKNIjs = require('./chunk-WVVXZKNI.js');
4
4
 
5
5
 
6
- var _chunkGRXBGL6Qjs = require('./chunk-GRXBGL6Q.js');
6
+ var _chunk56ZV3VVYjs = require('./chunk-56ZV3VVY.js');
7
7
 
8
8
 
9
9
  var _chunkVCULFIZ5js = require('./chunk-VCULFIZ5.js');
@@ -12,7 +12,7 @@ var _chunkVCULFIZ5js = require('./chunk-VCULFIZ5.js');
12
12
  var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
13
13
 
14
14
 
15
- var _chunkCI2WHAT2js = require('./chunk-CI2WHAT2.js');
15
+ var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
16
16
 
17
17
  // src/components/CommentThread.tsx
18
18
  var _react = require('react');
@@ -99,7 +99,7 @@ var CommentThread = ({
99
99
  const ACTION_BTN = `${BTN_BASE} text-gray-400 hover:text-gray-600 font-normal hover:bg-gray-50`;
100
100
  const PRIMARY_BTN = `${BTN_BASE} text-[var(--tiger-primary,#2563eb)] hover:text-[var(--tiger-primary-hover,#1d4ed8)] font-medium hover:bg-[var(--tiger-primary,#2563eb)]/5`;
101
101
  const renderActionButton = (label, key, onClick, active) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
102
- _chunkGRXBGL6Qjs.Button,
102
+ _chunk56ZV3VVYjs.Button,
103
103
  {
104
104
  size: "sm",
105
105
  variant: "ghost",
@@ -149,7 +149,7 @@ var CommentThread = ({
149
149
  const actionKey = _nullishCoalesce(action.key, () => ( `${node.id}-action-${index}`));
150
150
  actions.push(
151
151
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
152
- _chunkGRXBGL6Qjs.Button,
152
+ _chunk56ZV3VVYjs.Button,
153
153
  {
154
154
  size: "sm",
155
155
  variant: _nullishCoalesce(action.variant, () => ( "ghost")),
@@ -176,7 +176,7 @@ var CommentThread = ({
176
176
  ),
177
177
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-3", children: [
178
178
  showAvatar && node.user ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
179
- _chunkCI2WHAT2js.Avatar,
179
+ _chunk4MQCUKICjs.Avatar,
180
180
  {
181
181
  size: depth === 1 ? "md" : "sm",
182
182
  src: node.user.avatar,
@@ -207,7 +207,7 @@ var CommentThread = ({
207
207
  ),
208
208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 justify-end", children: [
209
209
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
210
- _chunkGRXBGL6Qjs.Button,
210
+ _chunk56ZV3VVYjs.Button,
211
211
  {
212
212
  size: "sm",
213
213
  variant: "ghost",
@@ -218,11 +218,11 @@ var CommentThread = ({
218
218
  children: cancelReplyText
219
219
  }
220
220
  ),
221
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRXBGL6Qjs.Button, { size: "sm", variant: "primary", onClick: () => handleReplySubmit(node), children: replyButtonText })
221
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk56ZV3VVYjs.Button, { size: "sm", variant: "primary", onClick: () => handleReplySubmit(node), children: replyButtonText })
222
222
  ] })
223
223
  ] }) : null,
224
224
  hasChildren ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
225
- _chunkGRXBGL6Qjs.Button,
225
+ _chunk56ZV3VVYjs.Button,
226
226
  {
227
227
  size: "sm",
228
228
  variant: "ghost",
@@ -243,7 +243,7 @@ var CommentThread = ({
243
243
  (child, index) => renderNode(child, depth + 1, index === visibleChildren.length - 1)
244
244
  ),
245
245
  showLoadMoreBtn ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
246
- _chunkGRXBGL6Qjs.Button,
246
+ _chunk56ZV3VVYjs.Button,
247
247
  {
248
248
  size: "sm",
249
249
  variant: "ghost",
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-P6E3DILH.mjs";
19
19
  import {
20
20
  Avatar
21
- } from "./chunk-FE7PEZTI.mjs";
21
+ } from "./chunk-4ZZ7YRTB.mjs";
22
22
 
23
23
  // src/components/ActivityFeed.tsx
24
24
  import { useMemo } from "react";
@@ -28,6 +28,7 @@ var Splitter = ({
28
28
  const containerRef = _react.useRef.call(void 0, null);
29
29
  const dragSessionRef = _react.useRef.call(void 0, null);
30
30
  const [paneSizes, setPaneSizes] = _react.useState.call(void 0, []);
31
+ const [draggingIndex, setDraggingIndex] = _react.useState.call(void 0, -1);
31
32
  const draggingRef = _react.useRef.call(void 0, null);
32
33
  const cleanupDragSession = _react.useCallback.call(void 0, () => {
33
34
  _optionalChain([dragSessionRef, 'access', _ => _.current, 'optionalAccess', _2 => _2.dispose, 'call', _3 => _3()]);
@@ -70,6 +71,7 @@ var Splitter = ({
70
71
  startPos: direction === "horizontal" ? e.clientX : e.clientY,
71
72
  startSizes: [...paneSizes]
72
73
  };
74
+ setDraggingIndex(index);
73
75
  _optionalChain([onResizeStart, 'optionalCall', _4 => _4({ index, sizes: [...paneSizes] })]);
74
76
  dragSessionRef.current = _tigercatcore.createDocumentDragSession.call(void 0, {
75
77
  startX: e.clientX,
@@ -97,6 +99,7 @@ var Splitter = ({
97
99
  }
98
100
  draggingRef.current = null;
99
101
  dragSessionRef.current = null;
102
+ setDraggingIndex(-1);
100
103
  }
101
104
  });
102
105
  },
@@ -143,7 +146,7 @@ var Splitter = ({
143
146
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: containerRef, className: containerClasses, style, "data-direction": direction, children: childArray.map((child, i) => {
144
147
  const size = paneSizes[i];
145
148
  const paneStyle = size != null ? _tigercatcore.getPaneStyle.call(void 0, size, direction) : void 0;
146
- const isDragging = _optionalChain([draggingRef, 'access', _10 => _10.current, 'optionalAccess', _11 => _11.index]) === i;
149
+ const isDragging = draggingIndex === i;
147
150
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react2.default.Fragment, { children: [
148
151
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
149
152
  "div",
@@ -13,6 +13,7 @@ var Divider = _react2.default.memo(
13
13
  color,
14
14
  thickness,
15
15
  className,
16
+ style: styleProp,
16
17
  ...props
17
18
  }) => {
18
19
  const classes = _react.useMemo.call(void 0, () => {
@@ -20,8 +21,11 @@ var Divider = _react2.default.memo(
20
21
  return className ? `${base} ${className}` : base;
21
22
  }, [orientation, lineStyle, spacing, className]);
22
23
  const style = _react.useMemo.call(void 0,
23
- () => _tigercatcore.getDividerStyle.call(void 0, orientation, color, thickness),
24
- [color, thickness, orientation]
24
+ () => ({
25
+ ..._tigercatcore.getDividerStyle.call(void 0, orientation, color, thickness),
26
+ ...styleProp
27
+ }),
28
+ [color, thickness, orientation, styleProp]
25
29
  );
26
30
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27
31
  "div",
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-QAIBQHIO.mjs";
8
8
  import {
9
9
  Button
10
- } from "./chunk-GKJNQUTW.mjs";
10
+ } from "./chunk-USWK2S3Y.mjs";
11
11
 
12
12
  // src/components/FormWizard.tsx
13
13
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7QZ4XT2P.mjs";
4
4
  import {
5
5
  Button
6
- } from "./chunk-GKJNQUTW.mjs";
6
+ } from "./chunk-USWK2S3Y.mjs";
7
7
  import {
8
8
  Tag
9
9
  } from "./chunk-TGKNEMD4.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-HLS4CHWX.mjs";
13
13
  import {
14
14
  Avatar
15
- } from "./chunk-FE7PEZTI.mjs";
15
+ } from "./chunk-4ZZ7YRTB.mjs";
16
16
 
17
17
  // src/components/CommentThread.tsx
18
18
  import { useMemo, useState } from "react";
@@ -57,7 +57,8 @@ function getNextInstanceId() {
57
57
  var NotificationItem = ({ notification: notification2, onClose }) => {
58
58
  const [isVisible, setIsVisible] = _react.useState.call(void 0, false);
59
59
  _react.useEffect.call(void 0, () => {
60
- setTimeout(() => setIsVisible(true), 10);
60
+ const timer = setTimeout(() => setIsVisible(true), 10);
61
+ return () => clearTimeout(timer);
61
62
  }, []);
62
63
  const colorScheme = _tigercatcore.getNotificationTypeClasses.call(void 0, notification2.type);
63
64
  const notificationClasses = _tigercatcore.classNames.call(void 0,
@@ -1,12 +1,14 @@
1
1
  // src/components/Breadcrumb.tsx
2
- import React, { createContext, useCallback, useContext, useMemo } from "react";
2
+ import React, { createContext, useCallback, useContext, useMemo, useState } from "react";
3
3
  import {
4
4
  classNames,
5
5
  breadcrumbContainerClasses,
6
+ breadcrumbEllipsisClasses,
6
7
  getBreadcrumbItemClasses,
7
8
  getBreadcrumbLinkClasses,
8
9
  getBreadcrumbSeparatorClasses,
9
- getSeparatorContent
10
+ getSeparatorContent,
11
+ getBreadcrumbCollapsedItems
10
12
  } from "@expcat/tigercat-core";
11
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
14
  var BreadcrumbContext = createContext(null);
@@ -70,6 +72,7 @@ var BreadcrumbItem = ({
70
72
  };
71
73
  var Breadcrumb = ({
72
74
  separator = "/",
75
+ maxItems,
73
76
  className,
74
77
  style,
75
78
  extra,
@@ -77,13 +80,50 @@ var Breadcrumb = ({
77
80
  ...props
78
81
  }) => {
79
82
  const hasExtra = Boolean(extra);
83
+ const [expanded, setExpanded] = useState(false);
80
84
  const containerClasses = React.useMemo(
81
85
  () => classNames(breadcrumbContainerClasses, hasExtra && "w-full", className),
82
86
  [className, hasExtra]
83
87
  );
84
88
  const contextValue = React.useMemo(() => ({ separator }), [separator]);
89
+ const renderedItems = useMemo(() => {
90
+ const items = React.Children.toArray(children);
91
+ if (expanded || maxItems === void 0 || maxItems <= 0 || maxItems >= items.length) {
92
+ return items;
93
+ }
94
+ const { collapsed } = getBreadcrumbCollapsedItems(items.length, maxItems);
95
+ if (collapsed.length === 0) return items;
96
+ const collapsedSet = new Set(collapsed);
97
+ const result = [];
98
+ let ellipsisInserted = false;
99
+ items.forEach((item, index) => {
100
+ if (collapsedSet.has(index)) {
101
+ if (!ellipsisInserted) {
102
+ ellipsisInserted = true;
103
+ result.push(
104
+ /* @__PURE__ */ jsxs("li", { className: getBreadcrumbItemClasses(), children: [
105
+ /* @__PURE__ */ jsx(
106
+ "button",
107
+ {
108
+ type: "button",
109
+ className: breadcrumbEllipsisClasses,
110
+ "aria-label": "Show collapsed breadcrumb items",
111
+ onClick: () => setExpanded(true),
112
+ children: "..."
113
+ }
114
+ ),
115
+ /* @__PURE__ */ jsx("span", { className: getBreadcrumbSeparatorClasses(), "aria-hidden": "true", children: getSeparatorContent(separator) })
116
+ ] }, "__tiger-breadcrumb-ellipsis")
117
+ );
118
+ }
119
+ return;
120
+ }
121
+ result.push(item);
122
+ });
123
+ return result;
124
+ }, [children, expanded, maxItems, separator]);
85
125
  return /* @__PURE__ */ jsx(BreadcrumbContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("nav", { className: containerClasses, "aria-label": "Breadcrumb", style, ...props, children: [
86
- /* @__PURE__ */ jsx("ol", { className: "flex items-center flex-wrap gap-2", children }),
126
+ /* @__PURE__ */ jsx("ol", { className: "flex items-center flex-wrap gap-2", children: renderedItems }),
87
127
  hasExtra && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: extra })
88
128
  ] }) });
89
129
  };
@@ -91,7 +91,7 @@ var Alert = ({
91
91
  setCountdownProgress(100);
92
92
  const timer = setTimeout(() => {
93
93
  setVisible(false);
94
- onClose?.(new MouseEvent("click"));
94
+ onClose?.();
95
95
  }, duration);
96
96
  let countdownTimer;
97
97
  if (showCountdown) {