@expcat/tigercat-react 1.2.47 → 1.2.52

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 (109) hide show
  1. package/dist/{chunk-D4FXVNRW.mjs → chunk-3CJFNG54.mjs} +2 -2
  2. package/dist/{chunk-USWK2S3Y.mjs → chunk-5TE7KLE5.mjs} +3 -1
  3. package/dist/{chunk-VJJ76I7U.js → chunk-6HDMUF23.js} +2 -1
  4. package/dist/{chunk-CGIBGSNE.js → chunk-6TR7JB6C.js} +49 -8
  5. package/dist/{chunk-ZDGBH4NA.js → chunk-7DZWTHYM.js} +20 -8
  6. package/dist/{chunk-EWSYARW4.js → chunk-7GAMKBSL.js} +92 -58
  7. package/dist/{chunk-JLQBG5XU.js → chunk-AKUAI5FG.js} +1 -0
  8. package/dist/{chunk-FZIF5LZW.js → chunk-AW5M3EL4.js} +5 -5
  9. package/dist/{chunk-ZL44XLSB.mjs → chunk-BBWCJSVR.mjs} +1 -1
  10. package/dist/{chunk-CHS54PVQ.mjs → chunk-BWDQZSAB.mjs} +2 -1
  11. package/dist/{chunk-IHH2O7YK.js → chunk-C5BPHZXK.js} +19 -1
  12. package/dist/{chunk-UPPHGL64.js → chunk-CY5GRTAX.js} +4 -3
  13. package/dist/{chunk-AGHGG73I.mjs → chunk-DLJZMMD7.mjs} +145 -56
  14. package/dist/{chunk-H2YHUFMK.js → chunk-EEWHWEYO.js} +5 -5
  15. package/dist/{chunk-Y5E4XH6H.mjs → chunk-F6IXIH6B.mjs} +4 -3
  16. package/dist/{chunk-I5YYA7FB.mjs → chunk-FB34UWF7.mjs} +3 -3
  17. package/dist/{chunk-OFCKGWTS.js → chunk-FJDTVJTX.js} +7 -2
  18. package/dist/{chunk-UIO6O4MI.js → chunk-FQO7BKXW.js} +4 -2
  19. package/dist/{chunk-6KQYWZ6J.mjs → chunk-GN3TSQWW.mjs} +49 -8
  20. package/dist/{chunk-7JFP3MIW.js → chunk-GQFVVAEF.js} +3 -3
  21. package/dist/{chunk-TYZNV54N.mjs → chunk-H3DEILMB.mjs} +1 -0
  22. package/dist/{chunk-TUA5PDRX.mjs → chunk-HDCC4FBL.mjs} +19 -1
  23. package/dist/{chunk-RL6HARKE.mjs → chunk-I2AUOICV.mjs} +1 -1
  24. package/dist/{chunk-UVWLYRAC.js → chunk-I373B74W.js} +7 -7
  25. package/dist/{chunk-NF3OF7S5.mjs → chunk-IGAMV6ML.mjs} +1 -1
  26. package/dist/{chunk-P6E3DILH.mjs → chunk-IXV5YBCZ.mjs} +5 -3
  27. package/dist/{chunk-AE2QE2C6.js → chunk-JJUJRILK.js} +2 -2
  28. package/dist/{chunk-7E24KEVK.mjs → chunk-KGSDDVRC.mjs} +1 -1
  29. package/dist/{chunk-PKWHSCFK.mjs → chunk-L5AMVEQL.mjs} +2 -2
  30. package/dist/{chunk-BCQQYERG.js → chunk-N4PP3ENO.js} +2 -2
  31. package/dist/{chunk-56DP32W7.mjs → chunk-NVEIVIAW.mjs} +2 -2
  32. package/dist/{chunk-KVZE7UGH.mjs → chunk-OEZ3CSEM.mjs} +87 -53
  33. package/dist/{chunk-IFVIPIAA.js → chunk-OREZJC6O.js} +144 -55
  34. package/dist/{chunk-DSXII6ZF.js → chunk-OZD75CLT.js} +3 -3
  35. package/dist/{chunk-JCINYGGM.js → chunk-PUZDW7NR.js} +12 -12
  36. package/dist/{chunk-ABTJVM3X.js → chunk-RF2BA2N6.js} +2 -2
  37. package/dist/{chunk-TLU3ROLT.js → chunk-UMZ3PMUJ.js} +2 -1
  38. package/dist/{chunk-TGKNEMD4.mjs → chunk-WMPCN7OF.mjs} +3 -1
  39. package/dist/{chunk-HUMGEP7S.mjs → chunk-WX5VUIGT.mjs} +3 -2
  40. package/dist/{chunk-OXDX6CH2.mjs → chunk-Y5RQN5BO.mjs} +1 -1
  41. package/dist/{chunk-OQTPXPAP.mjs → chunk-YN5ZIWCE.mjs} +8 -3
  42. package/dist/{chunk-JVTAKNRO.mjs → chunk-ZA5EFHET.mjs} +1 -1
  43. package/dist/{chunk-VCULFIZ5.js → chunk-ZJI2VLIL.js} +2 -0
  44. package/dist/{chunk-XJXEAXWY.mjs → chunk-ZJXKVQ4G.mjs} +20 -8
  45. package/dist/{chunk-56ZV3VVY.js → chunk-ZLNBE4IS.js} +2 -0
  46. package/dist/{chunk-PR3PQUKM.js → chunk-ZZAR4IDS.js} +1 -1
  47. package/dist/components/ActivityFeed.js +5 -5
  48. package/dist/components/ActivityFeed.mjs +4 -4
  49. package/dist/components/Button.js +2 -2
  50. package/dist/components/Button.mjs +1 -1
  51. package/dist/components/Card.js +2 -2
  52. package/dist/components/Card.mjs +1 -1
  53. package/dist/components/ChatWindow.js +3 -3
  54. package/dist/components/ChatWindow.mjs +2 -2
  55. package/dist/components/CommentThread.js +4 -4
  56. package/dist/components/CommentThread.mjs +3 -3
  57. package/dist/components/Content.js +2 -2
  58. package/dist/components/Content.mjs +1 -1
  59. package/dist/components/CropUpload.js +4 -4
  60. package/dist/components/CropUpload.mjs +3 -3
  61. package/dist/components/DataTableWithToolbar.d.mts +10 -3
  62. package/dist/components/DataTableWithToolbar.d.ts +10 -3
  63. package/dist/components/DataTableWithToolbar.js +4 -4
  64. package/dist/components/DataTableWithToolbar.mjs +3 -3
  65. package/dist/components/Drawer.js +2 -2
  66. package/dist/components/Drawer.mjs +1 -1
  67. package/dist/components/Dropdown.js +2 -2
  68. package/dist/components/Dropdown.mjs +1 -1
  69. package/dist/components/DropdownItem.js +3 -3
  70. package/dist/components/DropdownItem.mjs +2 -2
  71. package/dist/components/DropdownMenu.js +2 -2
  72. package/dist/components/DropdownMenu.mjs +1 -1
  73. package/dist/components/Form.js +2 -2
  74. package/dist/components/Form.mjs +1 -1
  75. package/dist/components/FormItem.js +3 -3
  76. package/dist/components/FormItem.mjs +2 -2
  77. package/dist/components/FormWizard.js +3 -3
  78. package/dist/components/FormWizard.mjs +2 -2
  79. package/dist/components/Header.js +2 -2
  80. package/dist/components/Header.mjs +1 -1
  81. package/dist/components/Icon.js +2 -2
  82. package/dist/components/Icon.mjs +1 -1
  83. package/dist/components/Image.js +3 -2
  84. package/dist/components/Image.mjs +2 -1
  85. package/dist/components/Menu.js +2 -2
  86. package/dist/components/Menu.mjs +1 -1
  87. package/dist/components/MenuItem.js +2 -2
  88. package/dist/components/MenuItem.mjs +1 -1
  89. package/dist/components/MenuItemGroup.js +2 -2
  90. package/dist/components/MenuItemGroup.mjs +1 -1
  91. package/dist/components/Modal.js +3 -3
  92. package/dist/components/Modal.mjs +2 -2
  93. package/dist/components/NotificationCenter.js +4 -4
  94. package/dist/components/NotificationCenter.mjs +3 -3
  95. package/dist/components/SubMenu.js +2 -2
  96. package/dist/components/SubMenu.mjs +1 -1
  97. package/dist/components/Table.d.mts +1 -1
  98. package/dist/components/Table.d.ts +1 -1
  99. package/dist/components/Table.js +2 -2
  100. package/dist/components/Table.mjs +1 -1
  101. package/dist/components/Tag.js +2 -2
  102. package/dist/components/Tag.mjs +1 -1
  103. package/dist/components/Timeline.js +2 -2
  104. package/dist/components/Timeline.mjs +1 -1
  105. package/dist/index.d.mts +1 -1
  106. package/dist/index.d.ts +1 -1
  107. package/dist/index.js +24 -24
  108. package/dist/index.mjs +23 -23
  109. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkPR3PQUKMjs = require('./chunk-PR3PQUKM.js');
3
+ var _chunkZZAR4IDSjs = require('./chunk-ZZAR4IDS.js');
4
4
 
5
5
 
6
6
  var _chunk3MRP3XYIjs = require('./chunk-3MRP3XYI.js');
@@ -9,13 +9,13 @@ var _chunk3MRP3XYIjs = require('./chunk-3MRP3XYI.js');
9
9
  var _chunkQYYAXM5Fjs = require('./chunk-QYYAXM5F.js');
10
10
 
11
11
 
12
- var _chunkVCULFIZ5js = require('./chunk-VCULFIZ5.js');
12
+ var _chunkZJI2VLILjs = require('./chunk-ZJI2VLIL.js');
13
13
 
14
14
 
15
15
  var _chunkUF3DXKCIjs = require('./chunk-UF3DXKCI.js');
16
16
 
17
17
 
18
- var _chunkUIO6O4MIjs = require('./chunk-UIO6O4MI.js');
18
+ var _chunkFQO7BKXWjs = require('./chunk-FQO7BKXW.js');
19
19
 
20
20
 
21
21
  var _chunk4MQCUKICjs = require('./chunk-4MQCUKIC.js');
@@ -105,7 +105,7 @@ var ActivityFeed = ({
105
105
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.activityItemTitleGroupClasses, children: [
106
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
107
  item.status ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
108
- _chunkVCULFIZ5js.Tag,
108
+ _chunkZJI2VLILjs.Tag,
109
109
  {
110
110
  variant: _nullishCoalesce(item.status.variant, () => ( "default")),
111
111
  size: "sm",
@@ -141,7 +141,7 @@ var ActivityFeed = ({
141
141
  ...props,
142
142
  "data-tiger-activity-feed": true,
143
143
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
144
- _chunkUIO6O4MIjs.Card,
144
+ _chunkFQO7BKXWjs.Card,
145
145
  {
146
146
  variant: "bordered",
147
147
  size: "sm",
@@ -162,7 +162,7 @@ var ActivityFeed = ({
162
162
  ...props,
163
163
  "data-tiger-activity-feed": true,
164
164
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
165
- _chunkUIO6O4MIjs.Card,
165
+ _chunkFQO7BKXWjs.Card,
166
166
  {
167
167
  variant: "bordered",
168
168
  size: "sm",
@@ -194,7 +194,7 @@ var ActivityFeed = ({
194
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
195
  ] }))) : null,
196
196
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
197
- _chunkPR3PQUKMjs.Timeline,
197
+ _chunkZZAR4IDSjs.Timeline,
198
198
  {
199
199
  items: timelineItems,
200
200
  style: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFormContext
3
- } from "./chunk-Y5E4XH6H.mjs";
3
+ } from "./chunk-F6IXIH6B.mjs";
4
4
 
5
5
  // src/components/FormItem.tsx
6
6
  import React, { useMemo, useEffect, useState, useCallback, useId, useRef } from "react";
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import {
4
4
  classNames,
5
5
  getCardClasses,
6
- cardSizeClasses,
6
+ resolveCardPadding,
7
7
  cardHeaderClasses,
8
8
  cardFooterClasses,
9
9
  cardCoverWrapperClasses,
@@ -21,6 +21,7 @@ var Card = React.memo(
21
21
  hoverable = false,
22
22
  cover,
23
23
  coverAlt = "Card cover image",
24
+ padding,
24
25
  header,
25
26
  footer,
26
27
  actions,
@@ -29,11 +30,12 @@ var Card = React.memo(
29
30
  ...props
30
31
  }) => {
31
32
  const isHorizontal = direction === "horizontal";
32
- const sectionSizeClass = cover ? cardSizeClasses[size] : void 0;
33
+ const paddingClass = resolveCardPadding(size, padding);
34
+ const sectionSizeClass = cover ? paddingClass : void 0;
33
35
  const cardClasses = classNames(
34
36
  getCardClasses(variant, hoverable),
35
37
  cardDirectionClasses[direction],
36
- !cover && cardSizeClasses[size],
38
+ !cover && paddingClass,
37
39
  className
38
40
  );
39
41
  const getSectionClasses = (baseClasses) => classNames(baseClasses, sectionSizeClass);
@@ -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 _chunkJLQBG5XUjs = require('./chunk-JLQBG5XU.js');
3
+ var _chunkAKUAI5FGjs = require('./chunk-AKUAI5FG.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, _chunkJLQBG5XUjs.DropdownContext);
20
+ const context = _react.useContext.call(void 0, _chunkAKUAI5FGjs.DropdownContext);
21
21
  const handleClick = (event) => {
22
22
  if (disabled) {
23
23
  event.preventDefault();
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-QAIBQHIO.mjs";
8
8
  import {
9
9
  Button
10
- } from "./chunk-USWK2S3Y.mjs";
10
+ } from "./chunk-5TE7KLE5.mjs";
11
11
 
12
12
  // src/components/FormWizard.tsx
13
13
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-A42OLED6.mjs";
8
8
  import {
9
9
  Button
10
- } from "./chunk-USWK2S3Y.mjs";
10
+ } from "./chunk-5TE7KLE5.mjs";
11
11
  import {
12
12
  Loading
13
13
  } from "./chunk-FNJDBFKM.mjs";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-HLS4CHWX.mjs";
17
17
  import {
18
18
  Card
19
- } from "./chunk-P6E3DILH.mjs";
19
+ } from "./chunk-IXV5YBCZ.mjs";
20
20
 
21
21
  // src/components/NotificationCenter.tsx
22
22
  import { useMemo, useEffect, useState, useCallback } from "react";
@@ -1,6 +1,6 @@
1
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
2
 
3
- var _chunkUPPHGL64js = require('./chunk-UPPHGL64.js');
3
+ var _chunkCY5GRTAXjs = require('./chunk-CY5GRTAX.js');
4
4
 
5
5
  // src/components/FormItem.tsx
6
6
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
@@ -43,7 +43,7 @@ var FormItem = ({
43
43
  className,
44
44
  condition
45
45
  }) => {
46
- const formContext = _chunkUPPHGL64js.useFormContext.call(void 0, );
46
+ const formContext = _chunkCY5GRTAXjs.useFormContext.call(void 0, );
47
47
  const [errorMessage, setErrorMessage] = _react.useState.call(void 0, "");
48
48
  const [shakeTrigger, setShakeTrigger] = _react.useState.call(void 0, 0);
49
49
  const prevFormErrorRef = _react.useRef.call(void 0, "");
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-7QZ4XT2P.mjs";
4
4
  import {
5
5
  Button
6
- } from "./chunk-USWK2S3Y.mjs";
6
+ } from "./chunk-5TE7KLE5.mjs";
7
7
  import {
8
8
  Tag
9
- } from "./chunk-TGKNEMD4.mjs";
9
+ } from "./chunk-WMPCN7OF.mjs";
10
10
  import {
11
11
  Text
12
12
  } from "./chunk-HLS4CHWX.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Table
3
- } from "./chunk-AGHGG73I.mjs";
3
+ } from "./chunk-DLJZMMD7.mjs";
4
4
  import {
5
5
  Select
6
6
  } from "./chunk-T4OVGM4X.mjs";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-MSHCPJIJ.mjs";
19
19
  import {
20
20
  Button
21
- } from "./chunk-USWK2S3Y.mjs";
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("div", { className: "flex items-center gap-2 w-full sm:w-auto sm:min-w-[220px] sm:max-w-[320px]", children: [
289
- /* @__PURE__ */ jsx(
290
- Input,
291
- {
292
- type: "search",
293
- size: "sm",
294
- value: searchValue,
295
- placeholder: toolbar?.searchPlaceholder ?? tableLabels.searchPlaceholder,
296
- prefix: /* @__PURE__ */ jsx(
297
- "svg",
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
- className: "w-3.5 h-3.5 text-[var(--tiger-text-secondary,#6b7280)] shrink-0",
300
- fill: "none",
301
- stroke: "currentColor",
302
- strokeWidth: "2",
303
- viewBox: "0 0 24 24",
304
- "aria-hidden": "true",
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
- strokeLinecap: "round",
309
- strokeLinejoin: "round",
310
- d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
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
- onChange: (event) => handleSearchChange(String(event.currentTarget.value)),
316
- onKeyDown: (event) => {
317
- if (event.key === "Enter") {
318
- handleSearchSubmit();
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
- toolbar?.showSearchButton ?? true ? /* @__PURE__ */ jsx(
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("div", { className: "w-full sm:w-auto", children: filter.render({
340
- filter,
341
- value: currentValue,
342
- filters: resolvedFilters,
343
- setValue: (value) => setFilterValue(filter.key, value, filter),
344
- setFilter: (key, value) => setFilterValue(key, value)
345
- }) }, filter.key);
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
  {
@@ -996,6 +996,9 @@ function Table({
996
996
  cardClassName,
997
997
  renderCard,
998
998
  cardLayout,
999
+ cardSelectionPosition = "controls-row",
1000
+ cardPadding,
1001
+ cardFieldGap = "gap-3",
999
1002
  // v0.6.0 props
1000
1003
  virtual = false,
1001
1004
  autoVirtual = true,
@@ -1291,7 +1294,7 @@ function Table({
1291
1294
  }
1292
1295
  }
1293
1296
  ) }) : null,
1294
- ctx.paginatedData.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardClasses, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZRHDNGWOjs.Empty, { showImage: false, description: tableLabels.emptyText }) }) : ctx.paginatedData.map((record, index) => {
1297
+ ctx.paginatedData.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.getTableResponsiveCardClasses.call(void 0, cardPadding), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZRHDNGWOjs.Empty, { showImage: false, description: tableLabels.emptyText }) }) : ctx.paginatedData.map((record, index) => {
1295
1298
  const key = ctx.pageRowKeys[index];
1296
1299
  const isExpanded = ctx.expandedRowKeySet.has(key);
1297
1300
  const isSelected = ctx.selectedRowKeySet.has(key);
@@ -1309,54 +1312,57 @@ function Table({
1309
1312
  };
1310
1313
  const customCard = _optionalChain([renderCard, 'optionalCall', _72 => _72(renderContext)]);
1311
1314
  const resolvedCardClassName = typeof cardClassName === "function" ? cardClassName(record, index) : cardClassName;
1315
+ const controlsNode = _optionalChain([internalRowSelection, 'optionalAccess', _73 => _73.showCheckbox]) !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1316
+ internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { onClick: (event) => event.stopPropagation(), children: internalRowSelection.type === "radio" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1317
+ _chunkTMON4MPOjs.Radio,
1318
+ {
1319
+ value: key,
1320
+ checked: isSelected,
1321
+ disabled: _optionalChain([internalRowSelection, 'access', _74 => _74.getCheckboxProps, 'optionalCall', _75 => _75(record), 'optionalAccess', _76 => _76.disabled]),
1322
+ "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1323
+ tableLabels.selectRowAriaLabel,
1324
+ index + 1,
1325
+ _optionalChain([tableLocale, 'optionalAccess', _77 => _77.locale])
1326
+ ),
1327
+ onChange: () => ctx.handleSelectRow(key, true)
1328
+ }
1329
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1330
+ _chunkF7H4ALKNjs.Checkbox,
1331
+ {
1332
+ size: "sm",
1333
+ checked: isSelected,
1334
+ disabled: _optionalChain([internalRowSelection, 'access', _78 => _78.getCheckboxProps, 'optionalCall', _79 => _79(record), 'optionalAccess', _80 => _80.disabled]),
1335
+ "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1336
+ tableLabels.selectRowAriaLabel,
1337
+ index + 1,
1338
+ _optionalChain([tableLocale, 'optionalAccess', _81 => _81.locale])
1339
+ ),
1340
+ onChange: (checked) => ctx.handleSelectRow(key, checked)
1341
+ }
1342
+ ) }),
1343
+ internalExpandable && isRowExpandable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1344
+ "button",
1345
+ {
1346
+ type: "button",
1347
+ className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1348
+ "aria-expanded": isExpanded,
1349
+ onClick: (event) => {
1350
+ event.stopPropagation();
1351
+ ctx.handleToggleExpand(key, record);
1352
+ },
1353
+ children: isExpanded ? tableLabels.collapseText : tableLabels.expandText
1354
+ }
1355
+ )
1356
+ ] }) : null;
1312
1357
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1313
1358
  "div",
1314
1359
  {
1315
- className: _tigercatcore.classNames.call(void 0, _tigercatcore.tableResponsiveCardClasses, resolvedCardClassName),
1360
+ className: _tigercatcore.classNames.call(void 0,
1361
+ _tigercatcore.getTableResponsiveCardClasses.call(void 0, cardPadding),
1362
+ resolvedCardClassName
1363
+ ),
1316
1364
  onClick: () => ctx.handleRowClick(record, index, key),
1317
1365
  children: customCard !== void 0 && customCard !== null ? customCard : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1318
- _optionalChain([internalRowSelection, 'optionalAccess', _73 => _73.showCheckbox]) !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-2 flex items-center gap-3", children: [
1319
- internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { onClick: (event) => event.stopPropagation(), children: internalRowSelection.type === "radio" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1320
- _chunkTMON4MPOjs.Radio,
1321
- {
1322
- value: key,
1323
- checked: isSelected,
1324
- disabled: _optionalChain([internalRowSelection, 'access', _74 => _74.getCheckboxProps, 'optionalCall', _75 => _75(record), 'optionalAccess', _76 => _76.disabled]),
1325
- "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1326
- tableLabels.selectRowAriaLabel,
1327
- index + 1,
1328
- _optionalChain([tableLocale, 'optionalAccess', _77 => _77.locale])
1329
- ),
1330
- onChange: () => ctx.handleSelectRow(key, true)
1331
- }
1332
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1333
- _chunkF7H4ALKNjs.Checkbox,
1334
- {
1335
- size: "sm",
1336
- checked: isSelected,
1337
- disabled: _optionalChain([internalRowSelection, 'access', _78 => _78.getCheckboxProps, 'optionalCall', _79 => _79(record), 'optionalAccess', _80 => _80.disabled]),
1338
- "aria-label": _tigercatcore.formatTableSelectRowAriaLabel.call(void 0,
1339
- tableLabels.selectRowAriaLabel,
1340
- index + 1,
1341
- _optionalChain([tableLocale, 'optionalAccess', _81 => _81.locale])
1342
- ),
1343
- onChange: (checked) => ctx.handleSelectRow(key, checked)
1344
- }
1345
- ) }),
1346
- internalExpandable && isRowExpandable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1347
- "button",
1348
- {
1349
- type: "button",
1350
- className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1351
- "aria-expanded": isExpanded,
1352
- onClick: (event) => {
1353
- event.stopPropagation();
1354
- ctx.handleToggleExpand(key, record);
1355
- },
1356
- children: isExpanded ? tableLabels.collapseText : tableLabels.expandText
1357
- }
1358
- )
1359
- ] }) : null,
1360
1366
  (() => {
1361
1367
  const { titleColumn, bodyColumns } = _tigercatcore.getCardColumns.call(void 0, ctx.displayColumns);
1362
1368
  const renderCellContent = (column) => {
@@ -1365,29 +1371,99 @@ function Table({
1365
1371
  };
1366
1372
  if (hasCustomCardLayout) {
1367
1373
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1368
- titleColumn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardTitleClasses, children: renderCellContent(titleColumn) }),
1369
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-12 gap-3 mt-2", children: bodyColumns.map((column) => {
1374
+ titleColumn && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1375
+ "div",
1376
+ {
1377
+ className: _tigercatcore.classNames.call(void 0,
1378
+ _tigercatcore.tableResponsiveCardTitleClasses,
1379
+ cardSelectionPosition === "title-inline" && controlsNode && "flex items-center gap-3"
1380
+ ),
1381
+ children: [
1382
+ cardSelectionPosition === "title-inline" && controlsNode,
1383
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1", children: renderCellContent(titleColumn) })
1384
+ ]
1385
+ }
1386
+ ),
1387
+ (!titleColumn || cardSelectionPosition !== "title-inline") && controlsNode && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-2 flex items-center gap-3", children: controlsNode }),
1388
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.classNames.call(void 0, "grid grid-cols-12 mt-2", cardFieldGap), children: bodyColumns.map((column) => {
1370
1389
  const layoutItem = cardLayoutMap.get(column.key);
1371
1390
  const gridInfo = _tigercatcore.getCardGridInfo.call(void 0, column, layoutItem);
1372
1391
  if (gridInfo.hideLabel) {
1373
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: gridInfo.className, children: renderCellContent(column) }, column.key);
1392
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1393
+ "div",
1394
+ {
1395
+ className: _tigercatcore.classNames.call(void 0,
1396
+ gridInfo.className,
1397
+ gridInfo.divider && "border-t border-[var(--tiger-border,#e5e7eb)] pt-3"
1398
+ ),
1399
+ children: renderCellContent(column)
1400
+ },
1401
+ column.key
1402
+ );
1374
1403
  }
1375
1404
  if (gridInfo.labelPosition === "top") {
1376
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: gridInfo.className, children: [
1377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium uppercase tracking-wider text-[var(--tiger-text-muted,#6b7280)] mb-1", children: column.title }),
1378
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 text-sm text-[var(--tiger-text,#111827)] break-words", children: renderCellContent(column) })
1379
- ] }, column.key);
1405
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1406
+ "div",
1407
+ {
1408
+ className: _tigercatcore.classNames.call(void 0,
1409
+ gridInfo.className,
1410
+ gridInfo.divider && "border-t border-[var(--tiger-border,#e5e7eb)] pt-3"
1411
+ ),
1412
+ children: [
1413
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1414
+ "div",
1415
+ {
1416
+ className: _tigercatcore.classNames.call(void 0,
1417
+ "text-xs font-medium uppercase tracking-wider text-[var(--tiger-text-muted,#6b7280)] mb-1",
1418
+ gridInfo.labelClassName
1419
+ ),
1420
+ children: column.title
1421
+ }
1422
+ ),
1423
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1424
+ "div",
1425
+ {
1426
+ className: _tigercatcore.classNames.call(void 0,
1427
+ "min-w-0 text-sm text-[var(--tiger-text,#111827)] break-words",
1428
+ gridInfo.valueClassName
1429
+ ),
1430
+ children: renderCellContent(column)
1431
+ }
1432
+ )
1433
+ ]
1434
+ },
1435
+ column.key
1436
+ );
1380
1437
  }
1381
1438
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1382
1439
  "div",
1383
1440
  {
1384
1441
  className: _tigercatcore.classNames.call(void 0,
1385
1442
  gridInfo.className,
1386
- "grid grid-cols-[auto_1fr] gap-2 items-baseline"
1443
+ "grid grid-cols-[auto_1fr] gap-2 items-baseline",
1444
+ gridInfo.divider && "border-t border-[var(--tiger-border,#e5e7eb)] pt-3"
1387
1445
  ),
1388
1446
  children: [
1389
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium uppercase tracking-wider text-[var(--tiger-text-muted,#6b7280)] shrink-0", children: column.title }),
1390
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 text-sm text-[var(--tiger-text,#111827)] break-words", children: renderCellContent(column) })
1447
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1448
+ "div",
1449
+ {
1450
+ className: _tigercatcore.classNames.call(void 0,
1451
+ "text-xs font-medium uppercase tracking-wider text-[var(--tiger-text-muted,#6b7280)] shrink-0",
1452
+ gridInfo.labelClassName
1453
+ ),
1454
+ children: column.title
1455
+ }
1456
+ ),
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1458
+ "div",
1459
+ {
1460
+ className: _tigercatcore.classNames.call(void 0,
1461
+ "min-w-0 text-sm text-[var(--tiger-text,#111827)] break-words",
1462
+ gridInfo.valueClassName
1463
+ ),
1464
+ children: renderCellContent(column)
1465
+ }
1466
+ )
1391
1467
  ]
1392
1468
  },
1393
1469
  column.key
@@ -1396,7 +1472,20 @@ function Table({
1396
1472
  ] });
1397
1473
  }
1398
1474
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1399
- titleColumn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardTitleClasses, children: renderCellContent(titleColumn) }),
1475
+ titleColumn && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1476
+ "div",
1477
+ {
1478
+ className: _tigercatcore.classNames.call(void 0,
1479
+ _tigercatcore.tableResponsiveCardTitleClasses,
1480
+ cardSelectionPosition === "title-inline" && controlsNode && "flex items-center gap-3"
1481
+ ),
1482
+ children: [
1483
+ cardSelectionPosition === "title-inline" && controlsNode,
1484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1", children: renderCellContent(titleColumn) })
1485
+ ]
1486
+ }
1487
+ ),
1488
+ (!titleColumn || cardSelectionPosition !== "title-inline") && controlsNode && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-2 flex items-center gap-3", children: controlsNode }),
1400
1489
  bodyColumns.map((column) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardRowClasses, children: [
1401
1490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardLabelClasses, children: column.title }),
1402
1491
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardValueClasses, children: renderCellContent(column) })