@expcat/tigercat-react 1.2.33 → 1.2.37

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 (41) hide show
  1. package/dist/{chunk-VXOLIMK2.mjs → chunk-2CJKAO2I.mjs} +1 -1
  2. package/dist/{chunk-UQOMRXTD.mjs → chunk-7E24KEVK.mjs} +60 -44
  3. package/dist/{chunk-P4INKEQ3.js → chunk-7JFP3MIW.js} +60 -44
  4. package/dist/{chunk-FXVKJWUP.js → chunk-ANN5P7TJ.js} +5 -1
  5. package/dist/{chunk-D62GWQBX.mjs → chunk-CHS54PVQ.mjs} +14 -3
  6. package/dist/{chunk-IUOTJ73N.mjs → chunk-D4FXVNRW.mjs} +1 -1
  7. package/dist/{chunk-SXHP4Q7O.js → chunk-DSXII6ZF.js} +23 -10
  8. package/dist/{chunk-UHRZKZVU.mjs → chunk-FWIYDMJA.mjs} +19 -5
  9. package/dist/{chunk-KTV3ZDSQ.js → chunk-H2YHUFMK.js} +2 -2
  10. package/dist/{chunk-WWDCH2XX.mjs → chunk-JOB47R6Q.mjs} +5 -1
  11. package/dist/{chunk-VHHYTCZQ.js → chunk-L2CAJUXH.js} +2 -2
  12. package/dist/{chunk-K5B4XXAI.js → chunk-LROHXQWX.js} +2 -2
  13. package/dist/{chunk-VAZYY35F.js → chunk-MIINT2WV.js} +68 -53
  14. package/dist/{chunk-AKDBQOKX.mjs → chunk-RL6HARKE.mjs} +20 -7
  15. package/dist/{chunk-CPNDCACQ.mjs → chunk-RVO6R37N.mjs} +1 -1
  16. package/dist/{chunk-OHSJ4KTU.js → chunk-TLU3ROLT.js} +17 -6
  17. package/dist/{chunk-KEF2PEP4.js → chunk-WYKUC5MM.js} +19 -5
  18. package/dist/{chunk-AIXYHS2L.mjs → chunk-ZGPOMSGD.mjs} +70 -55
  19. package/dist/components/CropUpload.js +4 -3
  20. package/dist/components/CropUpload.mjs +3 -2
  21. package/dist/components/DataTableWithToolbar.js +3 -3
  22. package/dist/components/DataTableWithToolbar.mjs +2 -2
  23. package/dist/components/Drawer.js +3 -2
  24. package/dist/components/Drawer.mjs +2 -1
  25. package/dist/components/FormWizard.js +2 -2
  26. package/dist/components/FormWizard.mjs +1 -1
  27. package/dist/components/Kanban.js +3 -3
  28. package/dist/components/Kanban.mjs +2 -2
  29. package/dist/components/Modal.js +3 -2
  30. package/dist/components/Modal.mjs +2 -1
  31. package/dist/components/Pagination.js +3 -2
  32. package/dist/components/Pagination.mjs +2 -1
  33. package/dist/components/Table.d.mts +1 -1
  34. package/dist/components/Table.d.ts +1 -1
  35. package/dist/components/Table.js +2 -2
  36. package/dist/components/Table.mjs +1 -1
  37. package/dist/components/TaskBoard.js +2 -2
  38. package/dist/components/TaskBoard.mjs +1 -1
  39. package/dist/index.js +10 -10
  40. package/dist/index.mjs +9 -9
  41. package/package.json +2 -2
@@ -21,6 +21,8 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
21
21
 
22
22
 
23
23
 
24
+
25
+
24
26
  var _tigercatcore = require('@expcat/tigercat-core');
25
27
 
26
28
 
@@ -944,6 +946,7 @@ function Table({
944
946
  maxHeight,
945
947
  tableLayout = "auto",
946
948
  responsiveMode = "scroll",
949
+ cardBreakpoint = "sm",
947
950
  // v0.6.0 props
948
951
  virtual = false,
949
952
  autoVirtual = true,
@@ -1103,7 +1106,7 @@ function Table({
1103
1106
  ref: tableRef,
1104
1107
  className: _tigercatcore.classNames.call(void 0,
1105
1108
  _tigercatcore.tableBaseClasses,
1106
- _tigercatcore.getTableResponsiveTableClasses.call(void 0, responsiveMode),
1109
+ _tigercatcore.getTableResponsiveTableClasses.call(void 0, responsiveMode, cardBreakpoint),
1107
1110
  tableLayout === "fixed" ? "table-fixed" : "table-auto",
1108
1111
  className
1109
1112
  ),
@@ -1141,58 +1144,70 @@ function Table({
1141
1144
  ]
1142
1145
  }
1143
1146
  ),
1144
- responsiveMode === "card" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardListClasses, "data-tiger-table-mobile": "card", children: ctx.paginatedData.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardClasses, children: emptyText }) : ctx.paginatedData.map((record, index) => {
1145
- const key = ctx.pageRowKeys[index];
1146
- const isExpanded = ctx.expandedRowKeySet.has(key);
1147
- const isRowExpandable = internalExpandable ? internalExpandable.rowExpandable ? internalExpandable.rowExpandable(record) : true : false;
1148
- const expandedContent = internalExpandable && isExpanded && isRowExpandable ? _optionalChain([internalExpandable, 'access', _67 => _67.expandedRowRender, 'optionalCall', _68 => _68(record, index)]) : null;
1149
- const expandedNode = expandedContent;
1150
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1151
- "div",
1152
- {
1153
- className: _tigercatcore.tableResponsiveCardClasses,
1154
- onClick: () => ctx.handleRowClick(record, index, key),
1155
- children: [
1156
- _optionalChain([internalRowSelection, 'optionalAccess', _69 => _69.showCheckbox]) !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-2 flex items-center gap-3", children: [
1157
- internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1158
- "input",
1159
- {
1160
- type: internalRowSelection.type === "radio" ? "radio" : "checkbox",
1161
- checked: ctx.selectedRowKeySet.has(key),
1162
- disabled: _optionalChain([internalRowSelection, 'access', _70 => _70.getCheckboxProps, 'optionalCall', _71 => _71(record), 'optionalAccess', _72 => _72.disabled]),
1163
- onClick: (event) => event.stopPropagation(),
1164
- onChange: (event) => ctx.handleSelectRow(key, event.target.checked)
1165
- }
1166
- ),
1167
- internalExpandable && isRowExpandable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1168
- "button",
1169
- {
1170
- type: "button",
1171
- className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1172
- "aria-expanded": isExpanded,
1173
- onClick: (event) => {
1174
- event.stopPropagation();
1175
- ctx.handleToggleExpand(key, record);
1176
- },
1177
- children: isExpanded ? "Collapse" : "Expand"
1178
- }
1179
- )
1180
- ] }) : null,
1181
- ctx.displayColumns.map((column) => {
1182
- const dataKey = column.dataKey || column.key;
1183
- const cellValue = record[dataKey];
1184
- const cellContent = column.render ? column.render(record, index) : cellValue;
1185
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardRowClasses, children: [
1186
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardLabelClasses, children: column.title }),
1187
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardValueClasses, children: cellContent })
1188
- ] }, column.key);
1189
- }),
1190
- expandedNode && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3", children: expandedNode })
1191
- ]
1192
- },
1193
- key
1194
- );
1195
- }) }),
1147
+ responsiveMode === "card" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1148
+ "div",
1149
+ {
1150
+ className: _tigercatcore.getTableResponsiveCardListClasses.call(void 0, cardBreakpoint),
1151
+ "data-tiger-table-mobile": "card",
1152
+ children: ctx.paginatedData.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardClasses, children: emptyText }) : ctx.paginatedData.map((record, index) => {
1153
+ const key = ctx.pageRowKeys[index];
1154
+ const isExpanded = ctx.expandedRowKeySet.has(key);
1155
+ const isRowExpandable = internalExpandable ? internalExpandable.rowExpandable ? internalExpandable.rowExpandable(record) : true : false;
1156
+ const expandedContent = internalExpandable && isExpanded && isRowExpandable ? _optionalChain([internalExpandable, 'access', _67 => _67.expandedRowRender, 'optionalCall', _68 => _68(record, index)]) : null;
1157
+ const expandedNode = expandedContent;
1158
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1159
+ "div",
1160
+ {
1161
+ className: _tigercatcore.tableResponsiveCardClasses,
1162
+ onClick: () => ctx.handleRowClick(record, index, key),
1163
+ children: [
1164
+ _optionalChain([internalRowSelection, 'optionalAccess', _69 => _69.showCheckbox]) !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-2 flex items-center gap-3", children: [
1165
+ internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1166
+ "input",
1167
+ {
1168
+ type: internalRowSelection.type === "radio" ? "radio" : "checkbox",
1169
+ checked: ctx.selectedRowKeySet.has(key),
1170
+ disabled: _optionalChain([internalRowSelection, 'access', _70 => _70.getCheckboxProps, 'optionalCall', _71 => _71(record), 'optionalAccess', _72 => _72.disabled]),
1171
+ onClick: (event) => event.stopPropagation(),
1172
+ onChange: (event) => ctx.handleSelectRow(key, event.target.checked)
1173
+ }
1174
+ ),
1175
+ internalExpandable && isRowExpandable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1176
+ "button",
1177
+ {
1178
+ type: "button",
1179
+ className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1180
+ "aria-expanded": isExpanded,
1181
+ onClick: (event) => {
1182
+ event.stopPropagation();
1183
+ ctx.handleToggleExpand(key, record);
1184
+ },
1185
+ children: isExpanded ? "Collapse" : "Expand"
1186
+ }
1187
+ )
1188
+ ] }) : null,
1189
+ (() => {
1190
+ const { titleColumn, bodyColumns } = _tigercatcore.getCardColumns.call(void 0, ctx.displayColumns);
1191
+ const renderCellContent = (column) => {
1192
+ const dataKey = column.dataKey || column.key;
1193
+ return column.render ? column.render(record, index) : record[dataKey];
1194
+ };
1195
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1196
+ titleColumn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardTitleClasses, children: renderCellContent(titleColumn) }),
1197
+ bodyColumns.map((column) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardRowClasses, children: [
1198
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardLabelClasses, children: column.title }),
1199
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.tableResponsiveCardValueClasses, children: renderCellContent(column) })
1200
+ ] }, column.key))
1201
+ ] });
1202
+ })(),
1203
+ expandedNode && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3", children: expandedNode })
1204
+ ]
1205
+ },
1206
+ key
1207
+ );
1208
+ })
1209
+ }
1210
+ ),
1196
1211
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1197
1212
  "div",
1198
1213
  {
@@ -1,3 +1,6 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-QAIBQHIO.mjs";
1
4
  import {
2
5
  Button
3
6
  } from "./chunk-USWK2S3Y.mjs";
@@ -33,7 +36,8 @@ import {
33
36
  modalFooterClasses,
34
37
  restoreFocus,
35
38
  shouldCloseOnMaskClick,
36
- resolveSwipeGesture
39
+ resolveSwipeGesture,
40
+ mergeTigerLocale
37
41
  } from "@expcat/tigercat-core";
38
42
  import { jsx, jsxs } from "react/jsx-runtime";
39
43
  var Modal = ({
@@ -61,10 +65,16 @@ var Modal = ({
61
65
  okText,
62
66
  cancelText,
63
67
  locale,
68
+ labels,
64
69
  style,
65
70
  draggable: isDraggable = false,
66
71
  ...rest
67
72
  }) => {
73
+ const config = useTigerConfig();
74
+ const mergedLocale = useMemo(
75
+ () => mergeTigerLocale(config.locale, locale),
76
+ [config.locale, locale]
77
+ );
68
78
  const [hasBeenOpened, setHasBeenOpened] = React.useState(open);
69
79
  const [dragOffset, setDragOffset] = React.useState({ x: 0, y: 0 });
70
80
  useEffect(() => {
@@ -126,20 +136,23 @@ var Modal = ({
126
136
  const resolvedCloseAriaLabel = resolveLocaleText(
127
137
  "Close",
128
138
  closeAriaLabel,
129
- locale?.modal?.closeAriaLabel,
130
- locale?.common?.closeText
139
+ labels?.closeAriaLabel,
140
+ mergedLocale?.modal?.closeAriaLabel,
141
+ mergedLocale?.common?.closeText
131
142
  );
132
143
  const resolvedCancelText = resolveLocaleText(
133
144
  "\u53D6\u6D88",
134
145
  cancelText,
135
- locale?.modal?.cancelText,
136
- locale?.common?.cancelText
146
+ labels?.cancelText,
147
+ mergedLocale?.modal?.cancelText,
148
+ mergedLocale?.common?.cancelText
137
149
  );
138
150
  const resolvedOkText = resolveLocaleText(
139
151
  "\u786E\u5B9A",
140
152
  okText,
141
- locale?.modal?.okText,
142
- locale?.common?.okText
153
+ labels?.okText,
154
+ mergedLocale?.modal?.okText,
155
+ mergedLocale?.common?.okText
143
156
  );
144
157
  const reactId = useId();
145
158
  const modalId = useMemo(() => `tiger-modal-${reactId}`, [reactId]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TaskBoard
3
- } from "./chunk-WWDCH2XX.mjs";
3
+ } from "./chunk-JOB47R6Q.mjs";
4
4
 
5
5
  // src/components/Kanban.tsx
6
6
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,8 @@
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 _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
4
+
5
+
3
6
 
4
7
 
5
8
 
@@ -29,6 +32,7 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
29
32
 
30
33
 
31
34
 
35
+
32
36
 
33
37
 
34
38
  var _tigercatcore = require('@expcat/tigercat-core');
@@ -76,11 +80,17 @@ var Drawer = ({
76
80
  onAfterLeave,
77
81
  closeAriaLabel,
78
82
  locale,
83
+ labels,
79
84
  children,
80
85
  footer,
81
86
  style,
82
87
  ...rest
83
88
  }) => {
89
+ const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
90
+ const mergedLocale = _react.useMemo.call(void 0,
91
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
92
+ [config.locale, locale]
93
+ );
84
94
  const [hasBeenOpened, setHasBeenOpened] = _react2.default.useState(open);
85
95
  const [deferredRendered, setDeferredRendered] = _react2.default.useState(open);
86
96
  _react.useEffect.call(void 0, () => {
@@ -142,8 +152,9 @@ var Drawer = ({
142
152
  const resolvedCloseAriaLabel = _tigercatcore.resolveLocaleText.call(void 0,
143
153
  "Close drawer",
144
154
  closeAriaLabel,
145
- _optionalChain([locale, 'optionalAccess', _5 => _5.drawer, 'optionalAccess', _6 => _6.closeAriaLabel]),
146
- _optionalChain([locale, 'optionalAccess', _7 => _7.common, 'optionalAccess', _8 => _8.closeText])
155
+ _optionalChain([labels, 'optionalAccess', _5 => _5.closeAriaLabel]),
156
+ _optionalChain([mergedLocale, 'optionalAccess', _6 => _6.drawer, 'optionalAccess', _7 => _7.closeAriaLabel]),
157
+ _optionalChain([mergedLocale, 'optionalAccess', _8 => _8.common, 'optionalAccess', _9 => _9.closeText])
147
158
  );
148
159
  _react.useEffect.call(void 0, () => {
149
160
  if (open) {
@@ -162,7 +173,7 @@ var Drawer = ({
162
173
  }, []);
163
174
  const handleTouchStart = _react.useCallback.call(void 0,
164
175
  (event) => {
165
- _optionalChain([dialogDivProps, 'access', _9 => _9.onTouchStart, 'optionalCall', _10 => _10(event)]);
176
+ _optionalChain([dialogDivProps, 'access', _10 => _10.onTouchStart, 'optionalCall', _11 => _11(event)]);
166
177
  if (!open) return;
167
178
  const point = _tigercatcore.getGestureTouchPoint.call(void 0, event.touches);
168
179
  touchStartRef.current = point;
@@ -172,7 +183,7 @@ var Drawer = ({
172
183
  );
173
184
  const handleTouchMove = _react.useCallback.call(void 0,
174
185
  (event) => {
175
- _optionalChain([dialogDivProps, 'access', _11 => _11.onTouchMove, 'optionalCall', _12 => _12(event)]);
186
+ _optionalChain([dialogDivProps, 'access', _12 => _12.onTouchMove, 'optionalCall', _13 => _13(event)]);
176
187
  if (!touchStartRef.current) return;
177
188
  const point = _tigercatcore.getGestureTouchPoint.call(void 0, event.touches);
178
189
  if (point) {
@@ -183,7 +194,7 @@ var Drawer = ({
183
194
  );
184
195
  const handleTouchEnd = _react.useCallback.call(void 0,
185
196
  (event) => {
186
- _optionalChain([dialogDivProps, 'access', _13 => _13.onTouchEnd, 'optionalCall', _14 => _14(event)]);
197
+ _optionalChain([dialogDivProps, 'access', _14 => _14.onTouchEnd, 'optionalCall', _15 => _15(event)]);
187
198
  const gesture = _tigercatcore.resolveSwipeGesture.call(void 0,
188
199
  touchStartRef.current,
189
200
  _nullishCoalesce(_tigercatcore.getGestureTouchPoint.call(void 0, event.changedTouches), () => ( touchCurrentRef.current)),
@@ -198,7 +209,7 @@ var Drawer = ({
198
209
  );
199
210
  const handleTouchCancel = _react.useCallback.call(void 0,
200
211
  (event) => {
201
- _optionalChain([dialogDivProps, 'access', _15 => _15.onTouchCancel, 'optionalCall', _16 => _16(event)]);
212
+ _optionalChain([dialogDivProps, 'access', _16 => _16.onTouchCancel, 'optionalCall', _17 => _17(event)]);
202
213
  resetTouchGesture();
203
214
  },
204
215
  [dialogDivProps, resetTouchGesture]
@@ -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/Pagination.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 _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
4
+
5
+ // src/components/Pagination.tsx
2
6
  var _react = require('react');
3
7
 
4
8
 
@@ -23,6 +27,7 @@ var _react = require('react');
23
27
 
24
28
 
25
29
 
30
+
26
31
 
27
32
 
28
33
  var _tigercatcore = require('@expcat/tigercat-core');
@@ -50,9 +55,11 @@ var Pagination = ({
50
55
  onChange,
51
56
  onPageSizeChange,
52
57
  locale,
58
+ labels: labelsOverride,
53
59
  ...props
54
60
  }) => {
55
61
  const { "aria-label": ariaLabelProp, ...navProps } = props;
62
+ const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
56
63
  const immediateLocale = _react.useMemo.call(void 0, () => _tigercatcore.getImmediateTigerLocale.call(void 0, locale), [locale]);
57
64
  const [loadedLocale, setLoadedLocale] = _react.useState.call(void 0,
58
65
  immediateLocale
@@ -72,9 +79,16 @@ var Pagination = ({
72
79
  };
73
80
  }, [locale, immediateLocale]);
74
81
  const resolvedLocale = _tigercatcore.isLazyTigerLocale.call(void 0, locale) ? loadedLocale : immediateLocale;
75
- const labels = _react.useMemo.call(void 0, () => _tigercatcore.getPaginationLabels.call(void 0, resolvedLocale), [resolvedLocale]);
76
- const localeCode = _optionalChain([resolvedLocale, 'optionalAccess', _ => _.locale]);
77
- const isRtl = _tigercatcore.getLocaleDirection.call(void 0, resolvedLocale) === "rtl";
82
+ const mergedLocale = _react.useMemo.call(void 0,
83
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, resolvedLocale),
84
+ [config.locale, resolvedLocale]
85
+ );
86
+ const labels = _react.useMemo.call(void 0,
87
+ () => _tigercatcore.getPaginationLabels.call(void 0, mergedLocale, labelsOverride),
88
+ [mergedLocale, labelsOverride]
89
+ );
90
+ const localeCode = _optionalChain([mergedLocale, 'optionalAccess', _ => _.locale]);
91
+ const isRtl = _tigercatcore.getLocaleDirection.call(void 0, mergedLocale) === "rtl";
78
92
  const [internalCurrent, setInternalCurrent] = _react.useState.call(void 0, defaultCurrent);
79
93
  const [internalPageSize, setInternalPageSize] = _react.useState.call(void 0, defaultPageSize);
80
94
  const [quickJumperValue, setQuickJumperValue] = _react.useState.call(void 0, "");
@@ -176,7 +190,7 @@ var Pagination = ({
176
190
  const nextDisabled = validatedCurrentPage >= totalPages || disabled;
177
191
  const elements = [];
178
192
  if (showTotal) {
179
- const totalTextFn = totalText || (_optionalChain([resolvedLocale, 'optionalAccess', _14 => _14.pagination, 'optionalAccess', _15 => _15.totalText]) ? (value, range) => _tigercatcore.formatPaginationTotal.call(void 0, labels.totalText, value, range, localeCode) : _tigercatcore.defaultTotalText);
193
+ const totalTextFn = totalText || (_optionalChain([labelsOverride, 'optionalAccess', _14 => _14.totalText]) || _optionalChain([mergedLocale, 'optionalAccess', _15 => _15.pagination, 'optionalAccess', _16 => _16.totalText]) ? (value, range) => _tigercatcore.formatPaginationTotal.call(void 0, labels.totalText, value, range, localeCode) : _tigercatcore.defaultTotalText);
180
194
  elements.push(
181
195
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _tigercatcore.getTotalTextClasses.call(void 0, size), children: totalTextFn(total, pageRange) }, "total")
182
196
  );
@@ -8,13 +8,15 @@ import {
8
8
  classNames as classNames3,
9
9
  createTableResizeObserverController,
10
10
  getTableWrapperClasses,
11
+ getCardColumns,
12
+ getTableResponsiveCardListClasses,
11
13
  getTableResponsiveTableClasses,
12
14
  getTableVirtualRecommendation,
13
15
  tableBaseClasses,
14
16
  tableResponsiveCardClasses,
15
17
  tableResponsiveCardLabelClasses,
16
- tableResponsiveCardListClasses,
17
18
  tableResponsiveCardRowClasses,
19
+ tableResponsiveCardTitleClasses,
18
20
  tableResponsiveCardValueClasses,
19
21
  tableLoadingOverlayClasses,
20
22
  getImmediateTigerLocale,
@@ -913,7 +915,7 @@ function renderPagination(ctx, view) {
913
915
  }
914
916
 
915
917
  // src/components/Table.tsx
916
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
918
+ import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
917
919
  function Table({
918
920
  columns,
919
921
  columnLockable = false,
@@ -944,6 +946,7 @@ function Table({
944
946
  maxHeight,
945
947
  tableLayout = "auto",
946
948
  responsiveMode = "scroll",
949
+ cardBreakpoint = "sm",
947
950
  // v0.6.0 props
948
951
  virtual = false,
949
952
  autoVirtual = true,
@@ -1103,7 +1106,7 @@ function Table({
1103
1106
  ref: tableRef,
1104
1107
  className: classNames3(
1105
1108
  tableBaseClasses,
1106
- getTableResponsiveTableClasses(responsiveMode),
1109
+ getTableResponsiveTableClasses(responsiveMode, cardBreakpoint),
1107
1110
  tableLayout === "fixed" ? "table-fixed" : "table-auto",
1108
1111
  className
1109
1112
  ),
@@ -1141,58 +1144,70 @@ function Table({
1141
1144
  ]
1142
1145
  }
1143
1146
  ),
1144
- responsiveMode === "card" && /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardListClasses, "data-tiger-table-mobile": "card", children: ctx.paginatedData.length === 0 ? /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardClasses, children: emptyText }) : ctx.paginatedData.map((record, index) => {
1145
- const key = ctx.pageRowKeys[index];
1146
- const isExpanded = ctx.expandedRowKeySet.has(key);
1147
- const isRowExpandable = internalExpandable ? internalExpandable.rowExpandable ? internalExpandable.rowExpandable(record) : true : false;
1148
- const expandedContent = internalExpandable && isExpanded && isRowExpandable ? internalExpandable.expandedRowRender?.(record, index) : null;
1149
- const expandedNode = expandedContent;
1150
- return /* @__PURE__ */ jsxs5(
1151
- "div",
1152
- {
1153
- className: tableResponsiveCardClasses,
1154
- onClick: () => ctx.handleRowClick(record, index, key),
1155
- children: [
1156
- internalRowSelection?.showCheckbox !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center gap-3", children: [
1157
- internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ jsx6(
1158
- "input",
1159
- {
1160
- type: internalRowSelection.type === "radio" ? "radio" : "checkbox",
1161
- checked: ctx.selectedRowKeySet.has(key),
1162
- disabled: internalRowSelection.getCheckboxProps?.(record)?.disabled,
1163
- onClick: (event) => event.stopPropagation(),
1164
- onChange: (event) => ctx.handleSelectRow(key, event.target.checked)
1165
- }
1166
- ),
1167
- internalExpandable && isRowExpandable && /* @__PURE__ */ jsx6(
1168
- "button",
1169
- {
1170
- type: "button",
1171
- className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1172
- "aria-expanded": isExpanded,
1173
- onClick: (event) => {
1174
- event.stopPropagation();
1175
- ctx.handleToggleExpand(key, record);
1176
- },
1177
- children: isExpanded ? "Collapse" : "Expand"
1178
- }
1179
- )
1180
- ] }) : null,
1181
- ctx.displayColumns.map((column) => {
1182
- const dataKey = column.dataKey || column.key;
1183
- const cellValue = record[dataKey];
1184
- const cellContent = column.render ? column.render(record, index) : cellValue;
1185
- return /* @__PURE__ */ jsxs5("div", { className: tableResponsiveCardRowClasses, children: [
1186
- /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardLabelClasses, children: column.title }),
1187
- /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardValueClasses, children: cellContent })
1188
- ] }, column.key);
1189
- }),
1190
- expandedNode && /* @__PURE__ */ jsx6("div", { className: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3", children: expandedNode })
1191
- ]
1192
- },
1193
- key
1194
- );
1195
- }) }),
1147
+ responsiveMode === "card" && /* @__PURE__ */ jsx6(
1148
+ "div",
1149
+ {
1150
+ className: getTableResponsiveCardListClasses(cardBreakpoint),
1151
+ "data-tiger-table-mobile": "card",
1152
+ children: ctx.paginatedData.length === 0 ? /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardClasses, children: emptyText }) : ctx.paginatedData.map((record, index) => {
1153
+ const key = ctx.pageRowKeys[index];
1154
+ const isExpanded = ctx.expandedRowKeySet.has(key);
1155
+ const isRowExpandable = internalExpandable ? internalExpandable.rowExpandable ? internalExpandable.rowExpandable(record) : true : false;
1156
+ const expandedContent = internalExpandable && isExpanded && isRowExpandable ? internalExpandable.expandedRowRender?.(record, index) : null;
1157
+ const expandedNode = expandedContent;
1158
+ return /* @__PURE__ */ jsxs5(
1159
+ "div",
1160
+ {
1161
+ className: tableResponsiveCardClasses,
1162
+ onClick: () => ctx.handleRowClick(record, index, key),
1163
+ children: [
1164
+ internalRowSelection?.showCheckbox !== false && internalRowSelection || internalExpandable && isRowExpandable ? /* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center gap-3", children: [
1165
+ internalRowSelection && internalRowSelection.showCheckbox !== false && /* @__PURE__ */ jsx6(
1166
+ "input",
1167
+ {
1168
+ type: internalRowSelection.type === "radio" ? "radio" : "checkbox",
1169
+ checked: ctx.selectedRowKeySet.has(key),
1170
+ disabled: internalRowSelection.getCheckboxProps?.(record)?.disabled,
1171
+ onClick: (event) => event.stopPropagation(),
1172
+ onChange: (event) => ctx.handleSelectRow(key, event.target.checked)
1173
+ }
1174
+ ),
1175
+ internalExpandable && isRowExpandable && /* @__PURE__ */ jsx6(
1176
+ "button",
1177
+ {
1178
+ type: "button",
1179
+ className: "text-sm text-[var(--tiger-primary,#2563eb)]",
1180
+ "aria-expanded": isExpanded,
1181
+ onClick: (event) => {
1182
+ event.stopPropagation();
1183
+ ctx.handleToggleExpand(key, record);
1184
+ },
1185
+ children: isExpanded ? "Collapse" : "Expand"
1186
+ }
1187
+ )
1188
+ ] }) : null,
1189
+ (() => {
1190
+ const { titleColumn, bodyColumns } = getCardColumns(ctx.displayColumns);
1191
+ const renderCellContent = (column) => {
1192
+ const dataKey = column.dataKey || column.key;
1193
+ return column.render ? column.render(record, index) : record[dataKey];
1194
+ };
1195
+ return /* @__PURE__ */ jsxs5(Fragment, { children: [
1196
+ titleColumn && /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardTitleClasses, children: renderCellContent(titleColumn) }),
1197
+ bodyColumns.map((column) => /* @__PURE__ */ jsxs5("div", { className: tableResponsiveCardRowClasses, children: [
1198
+ /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardLabelClasses, children: column.title }),
1199
+ /* @__PURE__ */ jsx6("div", { className: tableResponsiveCardValueClasses, children: renderCellContent(column) })
1200
+ ] }, column.key))
1201
+ ] });
1202
+ })(),
1203
+ expandedNode && /* @__PURE__ */ jsx6("div", { className: "mt-3 border-t border-[var(--tiger-border,#e5e7eb)] pt-3", children: expandedNode })
1204
+ ]
1205
+ },
1206
+ key
1207
+ );
1208
+ })
1209
+ }
1210
+ ),
1196
1211
  loading && /* @__PURE__ */ jsxs5(
1197
1212
  "div",
1198
1213
  {
@@ -1,11 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkKTV3ZDSQjs = require('../chunk-KTV3ZDSQ.js');
4
- require('../chunk-SXHP4Q7O.js');
3
+ var _chunkH2YHUFMKjs = require('../chunk-H2YHUFMK.js');
4
+ require('../chunk-DSXII6ZF.js');
5
5
  require('../chunk-FI53LYZ6.js');
6
+ require('../chunk-TDODFBBO.js');
6
7
  require('../chunk-56ZV3VVY.js');
7
8
  require('../chunk-YMKA4L3Z.js');
8
9
  require('../chunk-STTQ5LXX.js');
9
10
 
10
11
 
11
- exports.CropUpload = _chunkKTV3ZDSQjs.CropUpload;
12
+ exports.CropUpload = _chunkH2YHUFMKjs.CropUpload;
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  CropUpload
3
- } from "../chunk-IUOTJ73N.mjs";
4
- import "../chunk-AKDBQOKX.mjs";
3
+ } from "../chunk-D4FXVNRW.mjs";
4
+ import "../chunk-RL6HARKE.mjs";
5
5
  import "../chunk-SY23FAXK.mjs";
6
+ import "../chunk-QAIBQHIO.mjs";
6
7
  import "../chunk-USWK2S3Y.mjs";
7
8
  import "../chunk-ZJWUBR2X.mjs";
8
9
  import "../chunk-SEWNVIHH.mjs";
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkVHHYTCZQjs = require('../chunk-VHHYTCZQ.js');
5
- require('../chunk-VAZYY35F.js');
4
+ var _chunkL2CAJUXHjs = require('../chunk-L2CAJUXH.js');
5
+ require('../chunk-MIINT2WV.js');
6
6
  require('../chunk-6Z4LLPZA.js');
7
7
  require('../chunk-TDODFBBO.js');
8
8
  require('../chunk-ZYJTHGQW.js');
@@ -11,4 +11,4 @@ require('../chunk-YMKA4L3Z.js');
11
11
 
12
12
 
13
13
 
14
- exports.DataTableWithToolbar = _chunkVHHYTCZQjs.DataTableWithToolbar; exports.default = _chunkVHHYTCZQjs.DataTableWithToolbar_default;
14
+ exports.DataTableWithToolbar = _chunkL2CAJUXHjs.DataTableWithToolbar; exports.default = _chunkL2CAJUXHjs.DataTableWithToolbar_default;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  DataTableWithToolbar,
3
3
  DataTableWithToolbar_default
4
- } from "../chunk-VXOLIMK2.mjs";
5
- import "../chunk-AIXYHS2L.mjs";
4
+ } from "../chunk-2CJKAO2I.mjs";
5
+ import "../chunk-ZGPOMSGD.mjs";
6
6
  import "../chunk-T4OVGM4X.mjs";
7
7
  import "../chunk-QAIBQHIO.mjs";
8
8
  import "../chunk-WNLUUD5N.mjs";
@@ -1,7 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkOHSJ4KTUjs = require('../chunk-OHSJ4KTU.js');
3
+ var _chunkTLU3ROLTjs = require('../chunk-TLU3ROLT.js');
4
+ require('../chunk-TDODFBBO.js');
4
5
  require('../chunk-STTQ5LXX.js');
5
6
 
6
7
 
7
- exports.Drawer = _chunkOHSJ4KTUjs.Drawer;
8
+ exports.Drawer = _chunkTLU3ROLTjs.Drawer;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  Drawer
3
- } from "../chunk-D62GWQBX.mjs";
3
+ } from "../chunk-CHS54PVQ.mjs";
4
+ import "../chunk-QAIBQHIO.mjs";
4
5
  import "../chunk-SEWNVIHH.mjs";
5
6
  export {
6
7
  Drawer
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkP4INKEQ3js = require('../chunk-P4INKEQ3.js');
4
+ var _chunk7JFP3MIWjs = require('../chunk-7JFP3MIW.js');
5
5
  require('../chunk-M7HBWFQO.js');
6
6
  require('../chunk-TDODFBBO.js');
7
7
  require('../chunk-56ZV3VVY.js');
@@ -9,4 +9,4 @@ require('../chunk-YMKA4L3Z.js');
9
9
 
10
10
 
11
11
 
12
- exports.FormWizard = _chunkP4INKEQ3js.FormWizard; exports.default = _chunkP4INKEQ3js.FormWizard_default;
12
+ exports.FormWizard = _chunk7JFP3MIWjs.FormWizard; exports.default = _chunk7JFP3MIWjs.FormWizard_default;