@expcat/tigercat-react 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/{chunk-3SV6J7I5.mjs → chunk-2L7QEOFD.mjs} +34 -25
  2. package/dist/{chunk-FNJDBFKM.mjs → chunk-2LYV6NBJ.mjs} +6 -1
  3. package/dist/{chunk-EEWHWEYO.js → chunk-2RBHQBSG.js} +2 -2
  4. package/dist/{chunk-Y5RQN5BO.mjs → chunk-376X7SDZ.mjs} +2 -2
  5. package/dist/{chunk-UXUYCWQC.js → chunk-3EDASNTG.js} +5 -5
  6. package/dist/{chunk-NPTXXUXF.mjs → chunk-3RBRWBUG.mjs} +9 -7
  7. package/dist/{chunk-PUZDW7NR.js → chunk-4AMSYFYC.js} +134 -20
  8. package/dist/{chunk-IG75YSX3.mjs → chunk-4MONGWU5.mjs} +4 -6
  9. package/dist/{chunk-3CJFNG54.mjs → chunk-56CTXEJS.mjs} +1 -1
  10. package/dist/{chunk-TMON4MPO.js → chunk-5ALMTE35.js} +9 -7
  11. package/dist/{chunk-MSHCPJIJ.mjs → chunk-6BOSSZM3.mjs} +8 -9
  12. package/dist/{chunk-SIY6FDKJ.js → chunk-7CHTTM6D.js} +339 -314
  13. package/dist/{chunk-RF2BA2N6.js → chunk-7PXALKLM.js} +4 -4
  14. package/dist/{chunk-DLKUDB2R.js → chunk-AF2AEZKM.js} +15 -3
  15. package/dist/{chunk-FB34UWF7.mjs → chunk-AVLIUHOS.mjs} +101 -40
  16. package/dist/{chunk-TSJYAEFZ.js → chunk-B63GEB2Y.js} +358 -305
  17. package/dist/{chunk-6I6X255M.js → chunk-BA6TJQZL.js} +12 -12
  18. package/dist/{chunk-LMTUM3J3.js → chunk-BEM7XG2L.js} +2 -4
  19. package/dist/{chunk-MB6U72CI.js → chunk-BEZO5IE4.js} +2 -2
  20. package/dist/{chunk-5OHVTGHS.mjs → chunk-BN4ZKCAI.mjs} +368 -315
  21. package/dist/{chunk-UHFHOTNI.js → chunk-BRA3PO53.js} +6 -7
  22. package/dist/{chunk-M7HBWFQO.js → chunk-BROIZ266.js} +11 -1
  23. package/dist/{chunk-SDZOVRVR.mjs → chunk-CAQPYJFA.mjs} +350 -325
  24. package/dist/{chunk-BFAZZUD6.js → chunk-CC5GFX6F.js} +5 -22
  25. package/dist/{chunk-LQT6ZGME.mjs → chunk-CME2IFUT.mjs} +15 -3
  26. package/dist/{chunk-KQ5I7PRM.js → chunk-CNNEUJR2.js} +28 -14
  27. package/dist/{chunk-EF5ZTNHX.js → chunk-D5MQBUP2.js} +16 -4
  28. package/dist/{chunk-RQXY2MGX.mjs → chunk-D7UR526A.mjs} +231 -184
  29. package/dist/{chunk-CBYJXDW4.js → chunk-DBMC6FPU.js} +16 -4
  30. package/dist/{chunk-WQ4FOHOU.mjs → chunk-DEIVWO2D.mjs} +3 -5
  31. package/dist/{chunk-7QZ4XT2P.mjs → chunk-DVEK5SO6.mjs} +3 -8
  32. package/dist/{chunk-TC6JLEGZ.js → chunk-EJKOUI26.js} +24 -7
  33. package/dist/{chunk-4GITZKAH.mjs → chunk-EPJ6W4VI.mjs} +14 -2
  34. package/dist/{chunk-KYP7U6FK.js → chunk-FZHBVHQ6.js} +34 -25
  35. package/dist/{chunk-WVVXZKNI.js → chunk-GDPU5MYA.js} +3 -8
  36. package/dist/{chunk-2GQCFTD7.mjs → chunk-H4MPPCTB.mjs} +23 -4
  37. package/dist/{chunk-YOAYDEWW.mjs → chunk-HHMYERHY.mjs} +3 -20
  38. package/dist/{chunk-LRPPXU74.mjs → chunk-I7FEGKX2.mjs} +19 -5
  39. package/dist/{chunk-F6IXIH6B.mjs → chunk-IZGXDHPB.mjs} +24 -5
  40. package/dist/{chunk-GQFVVAEF.js → chunk-J6OZWT3P.js} +5 -5
  41. package/dist/{chunk-IGAMV6ML.mjs → chunk-KDXKF6B2.mjs} +1 -1
  42. package/dist/{chunk-A42OLED6.mjs → chunk-KED5S2WG.mjs} +13 -2
  43. package/dist/{chunk-BJQIYELW.mjs → chunk-KGMVRIYC.mjs} +5 -5
  44. package/dist/{chunk-6GYT3EZD.mjs → chunk-KXT2TP6A.mjs} +3 -4
  45. package/dist/{chunk-BBLVRLXT.js → chunk-KYNWNTGO.js} +230 -146
  46. package/dist/{chunk-M73NMNZX.js → chunk-L24PPXLV.js} +17 -5
  47. package/dist/chunk-L3WPA2RP.js +25 -0
  48. package/dist/{chunk-V4JIZN3E.mjs → chunk-L6KSO66F.mjs} +4 -12
  49. package/dist/{chunk-4LX5UGPQ.js → chunk-LJRCEB7F.js} +168 -121
  50. package/dist/{chunk-F7H4ALKN.js → chunk-LZG24TDB.js} +8 -9
  51. package/dist/{chunk-ZYJTHGQW.js → chunk-M3FVPPMM.js} +9 -13
  52. package/dist/{chunk-GN3TSQWW.mjs → chunk-M6YXUNOU.mjs} +2 -2
  53. package/dist/{chunk-I373B74W.js → chunk-MC26ORSN.js} +102 -41
  54. package/dist/{chunk-5HFHHFQS.mjs → chunk-MTIGGMHG.mjs} +17 -5
  55. package/dist/{chunk-DKT2EYVM.mjs → chunk-MV2JQ6XQ.mjs} +3 -6
  56. package/dist/{chunk-HR5GBE3P.js → chunk-NDGA3N6H.js} +19 -7
  57. package/dist/{chunk-PU7KEYLP.mjs → chunk-NEZ445D4.mjs} +9 -9
  58. package/dist/{chunk-4U5HSR2H.js → chunk-NVI2P7VH.js} +3 -4
  59. package/dist/{chunk-NVEIVIAW.mjs → chunk-OFRKYQOZ.mjs} +133 -19
  60. package/dist/{chunk-AW5M3EL4.js → chunk-OS6M3IZF.js} +62 -12
  61. package/dist/{chunk-3ZNZLGQO.mjs → chunk-OXQOKKTP.mjs} +6 -7
  62. package/dist/{chunk-NMEVQPOD.js → chunk-PHAJXRGE.js} +2 -4
  63. package/dist/{chunk-WG3YS2QV.js → chunk-PT5T5F4H.js} +13 -2
  64. package/dist/{chunk-WNLUUD5N.mjs → chunk-QIL24WZD.mjs} +8 -12
  65. package/dist/{chunk-ZFMMAYSX.js → chunk-QLATA4UB.js} +4 -6
  66. package/dist/{chunk-2TZ3SBMU.mjs → chunk-RVLV63SI.mjs} +16 -11
  67. package/dist/{chunk-3QPCQH62.mjs → chunk-RYNLPRUM.mjs} +1 -1
  68. package/dist/{chunk-6GIJ7NFV.mjs → chunk-SDZKL3IB.mjs} +3 -5
  69. package/dist/{chunk-G5USITWF.js → chunk-SH4BZYXO.js} +27 -8
  70. package/dist/{chunk-L5AMVEQL.mjs → chunk-SLEXEH7R.mjs} +60 -10
  71. package/dist/{chunk-JLRRXRZO.js → chunk-SQONS5PH.js} +4 -7
  72. package/dist/chunk-SQTOVSDU.mjs +692 -0
  73. package/dist/{chunk-ITRYKHQJ.js → chunk-TEYL5X56.js} +19 -14
  74. package/dist/{chunk-KGSDDVRC.mjs → chunk-TNTOSFGN.mjs} +4 -4
  75. package/dist/{chunk-CY5GRTAX.js → chunk-UAM3RQY4.js} +24 -5
  76. package/dist/{chunk-XRNKHQTL.js → chunk-UEAXYZSE.js} +3 -2
  77. package/dist/{chunk-7ISEWLA3.js → chunk-UKQMF3JV.js} +21 -6
  78. package/dist/{chunk-ITVLIR7T.mjs → chunk-ULWT6W6M.mjs} +13 -20
  79. package/dist/{chunk-M5GSLKUX.mjs → chunk-VAIWWELW.mjs} +15 -3
  80. package/dist/{chunk-4SO4LANY.js → chunk-VC26SAXB.js} +340 -274
  81. package/dist/{chunk-SKMZTW3K.js → chunk-WCTNQYXO.js} +16 -23
  82. package/dist/{chunk-KXNWY2Q7.mjs → chunk-WFWEMXO7.mjs} +241 -157
  83. package/dist/chunk-WHYHLUXG.mjs +25 -0
  84. package/dist/{chunk-ONTRGV5T.js → chunk-WZUADPYB.js} +6 -14
  85. package/dist/{chunk-N4PP3ENO.js → chunk-XTQUPDRI.js} +2 -2
  86. package/dist/{chunk-XATXFVKR.mjs → chunk-Y7K27DVV.mjs} +4 -3
  87. package/dist/{chunk-WI4N5DD3.mjs → chunk-YH57D4AV.mjs} +16 -4
  88. package/dist/{chunk-3MRP3XYI.js → chunk-YRVAF2ID.js} +7 -2
  89. package/dist/{chunk-5XE5VBDS.mjs → chunk-YSGM22AH.mjs} +11 -1
  90. package/dist/{chunk-6TR7JB6C.js → chunk-ZDNQGS4O.js} +4 -4
  91. package/dist/{chunk-CHBUNQIJ.mjs → chunk-ZQSMJS2Q.mjs} +23 -6
  92. package/dist/{chunk-QQFLRNI3.mjs → chunk-ZRZB3C5J.mjs} +18 -3
  93. package/dist/components/ActivityFeed.js +4 -3
  94. package/dist/components/ActivityFeed.mjs +3 -2
  95. package/dist/components/Cascader.d.mts +3 -1
  96. package/dist/components/Cascader.d.ts +3 -1
  97. package/dist/components/Cascader.js +3 -2
  98. package/dist/components/Cascader.mjs +2 -1
  99. package/dist/components/ChatWindow.js +5 -5
  100. package/dist/components/ChatWindow.mjs +4 -4
  101. package/dist/components/Checkbox.js +4 -4
  102. package/dist/components/Checkbox.mjs +3 -3
  103. package/dist/components/CheckboxGroup.js +3 -3
  104. package/dist/components/CheckboxGroup.mjs +2 -2
  105. package/dist/components/CommentThread.js +4 -4
  106. package/dist/components/CommentThread.mjs +3 -3
  107. package/dist/components/CropUpload.js +4 -4
  108. package/dist/components/CropUpload.mjs +3 -3
  109. package/dist/components/DataTableWithToolbar.d.mts +2 -2
  110. package/dist/components/DataTableWithToolbar.d.ts +2 -2
  111. package/dist/components/DataTableWithToolbar.js +11 -11
  112. package/dist/components/DataTableWithToolbar.mjs +10 -10
  113. package/dist/components/DatePicker.d.mts +1 -0
  114. package/dist/components/DatePicker.d.ts +1 -0
  115. package/dist/components/DatePicker.js +3 -2
  116. package/dist/components/DatePicker.mjs +2 -1
  117. package/dist/components/Drawer.js +3 -3
  118. package/dist/components/Drawer.mjs +2 -2
  119. package/dist/components/FileManager.d.mts +2 -1
  120. package/dist/components/FileManager.d.ts +2 -1
  121. package/dist/components/FileManager.js +3 -2
  122. package/dist/components/FileManager.mjs +2 -1
  123. package/dist/components/Form.js +3 -2
  124. package/dist/components/Form.mjs +2 -1
  125. package/dist/components/FormItem.js +4 -3
  126. package/dist/components/FormItem.mjs +3 -2
  127. package/dist/components/FormWizard.js +4 -4
  128. package/dist/components/FormWizard.mjs +3 -3
  129. package/dist/components/Image.js +4 -4
  130. package/dist/components/Image.mjs +3 -3
  131. package/dist/components/ImageGroup.js +3 -3
  132. package/dist/components/ImageGroup.mjs +2 -2
  133. package/dist/components/ImagePreview.js +2 -2
  134. package/dist/components/ImagePreview.mjs +1 -1
  135. package/dist/components/ImageViewer.d.mts +1 -1
  136. package/dist/components/ImageViewer.d.ts +1 -1
  137. package/dist/components/ImageViewer.js +2 -2
  138. package/dist/components/ImageViewer.mjs +1 -1
  139. package/dist/components/InfiniteScroll.d.mts +2 -0
  140. package/dist/components/InfiniteScroll.d.ts +2 -0
  141. package/dist/components/InfiniteScroll.js +3 -2
  142. package/dist/components/InfiniteScroll.mjs +2 -1
  143. package/dist/components/Input.js +3 -2
  144. package/dist/components/Input.mjs +2 -1
  145. package/dist/components/InputNumber.js +3 -2
  146. package/dist/components/InputNumber.mjs +2 -1
  147. package/dist/components/List.d.mts +6 -2
  148. package/dist/components/List.d.ts +6 -2
  149. package/dist/components/List.js +3 -2
  150. package/dist/components/List.mjs +2 -1
  151. package/dist/components/Loading.js +3 -2
  152. package/dist/components/Loading.mjs +2 -1
  153. package/dist/components/MarkdownEditor.js +3 -3
  154. package/dist/components/MarkdownEditor.mjs +2 -2
  155. package/dist/components/Mentions.js +2 -2
  156. package/dist/components/Mentions.mjs +1 -1
  157. package/dist/components/Menu.d.mts +8 -80
  158. package/dist/components/Menu.d.ts +8 -80
  159. package/dist/components/Menu.js +2 -2
  160. package/dist/components/Menu.mjs +1 -1
  161. package/dist/components/MenuItem.d.mts +6 -2
  162. package/dist/components/MenuItem.d.ts +6 -2
  163. package/dist/components/MenuItem.js +2 -2
  164. package/dist/components/MenuItem.mjs +1 -1
  165. package/dist/components/MenuItemGroup.d.mts +6 -2
  166. package/dist/components/MenuItemGroup.d.ts +6 -2
  167. package/dist/components/MenuItemGroup.js +2 -2
  168. package/dist/components/MenuItemGroup.mjs +1 -1
  169. package/dist/components/Message.js +2 -2
  170. package/dist/components/Message.mjs +1 -1
  171. package/dist/components/Modal.js +3 -3
  172. package/dist/components/Modal.mjs +2 -2
  173. package/dist/components/Notification.js +2 -2
  174. package/dist/components/Notification.mjs +1 -1
  175. package/dist/components/NotificationCenter.js +5 -4
  176. package/dist/components/NotificationCenter.mjs +4 -3
  177. package/dist/components/NumberKeyboard.js +3 -2
  178. package/dist/components/NumberKeyboard.mjs +2 -1
  179. package/dist/components/Radio.js +4 -4
  180. package/dist/components/Radio.mjs +3 -3
  181. package/dist/components/RadioGroup.js +3 -3
  182. package/dist/components/RadioGroup.mjs +2 -2
  183. package/dist/components/RichTextEditor.js +3 -3
  184. package/dist/components/RichTextEditor.mjs +2 -2
  185. package/dist/components/Select.d.mts +3 -1
  186. package/dist/components/Select.d.ts +3 -1
  187. package/dist/components/Select.js +3 -2
  188. package/dist/components/Select.mjs +2 -1
  189. package/dist/components/Signature.d.mts +1 -0
  190. package/dist/components/Signature.d.ts +1 -0
  191. package/dist/components/Signature.js +3 -2
  192. package/dist/components/Signature.mjs +2 -1
  193. package/dist/components/Spotlight.js +4 -2
  194. package/dist/components/Spotlight.mjs +3 -1
  195. package/dist/components/Steps.js +2 -2
  196. package/dist/components/Steps.mjs +1 -1
  197. package/dist/components/StepsItem.js +2 -2
  198. package/dist/components/StepsItem.mjs +1 -1
  199. package/dist/components/SubMenu.d.mts +6 -2
  200. package/dist/components/SubMenu.d.ts +6 -2
  201. package/dist/components/SubMenu.js +2 -2
  202. package/dist/components/SubMenu.mjs +1 -1
  203. package/dist/components/Table.d.mts +2 -2
  204. package/dist/components/Table.d.ts +2 -2
  205. package/dist/components/Table.js +9 -9
  206. package/dist/components/Table.mjs +8 -8
  207. package/dist/components/Textarea.js +3 -3
  208. package/dist/components/Textarea.mjs +2 -2
  209. package/dist/components/TimePicker.d.mts +1 -0
  210. package/dist/components/TimePicker.d.ts +1 -0
  211. package/dist/components/TimePicker.js +4 -2
  212. package/dist/components/TimePicker.mjs +3 -1
  213. package/dist/components/Tour.js +3 -2
  214. package/dist/components/Tour.mjs +2 -1
  215. package/dist/components/Transfer.d.mts +3 -1
  216. package/dist/components/Transfer.d.ts +3 -1
  217. package/dist/components/Transfer.js +3 -2
  218. package/dist/components/Transfer.mjs +2 -1
  219. package/dist/components/Tree.d.mts +3 -1
  220. package/dist/components/Tree.d.ts +3 -1
  221. package/dist/components/Tree.js +3 -2
  222. package/dist/components/Tree.mjs +2 -1
  223. package/dist/components/TreeSelect.d.mts +3 -1
  224. package/dist/components/TreeSelect.d.ts +3 -1
  225. package/dist/components/TreeSelect.js +3 -2
  226. package/dist/components/TreeSelect.mjs +2 -1
  227. package/dist/components/Upload.js +3 -2
  228. package/dist/components/Upload.mjs +2 -1
  229. package/dist/components/VirtualTable.d.mts +3 -2
  230. package/dist/components/VirtualTable.d.ts +3 -2
  231. package/dist/components/VirtualTable.js +3 -2
  232. package/dist/components/VirtualTable.mjs +2 -1
  233. package/dist/index.d.mts +33 -7
  234. package/dist/index.d.ts +33 -7
  235. package/dist/index.js +54 -54
  236. package/dist/index.mjs +53 -53
  237. package/dist/{types-CHmCMNEM.d.mts → types-0oVwMXtR.d.mts} +1 -1
  238. package/dist/{types-CHmCMNEM.d.ts → types-0oVwMXtR.d.ts} +1 -1
  239. package/dist/types-DaC4a0Ny.d.mts +80 -0
  240. package/dist/types-DaC4a0Ny.d.ts +80 -0
  241. package/package.json +2 -2
  242. package/dist/chunk-UKGQ7256.js +0 -12
  243. package/dist/chunk-UQMPEMY7.mjs +0 -12
  244. package/dist/chunk-VNVGSPBI.mjs +0 -626
  245. package/dist/{chunk-OZD75CLT.js → chunk-ANBNSUSR.js} +3 -3
  246. package/dist/{chunk-I2AUOICV.mjs → chunk-M3MOSUZO.mjs} +3 -3
  247. package/dist/{chunk-UMZ3PMUJ.js → chunk-SXHCMZ6U.js} +2 -2
  248. package/dist/{chunk-BWDQZSAB.mjs → chunk-WTSG7QXK.mjs} +3 -3
@@ -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/TreeSelect.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/TreeSelect.tsx
2
6
  var _react = require('react');
3
7
 
4
8
 
@@ -18,6 +22,8 @@ var _react = require('react');
18
22
 
19
23
 
20
24
 
25
+
26
+
21
27
 
22
28
 
23
29
  var _tigercatcore = require('@expcat/tigercat-core');
@@ -45,12 +51,18 @@ var TreeSelect = (props) => {
45
51
  clearable = false,
46
52
  multiple = false,
47
53
  showSearch = false,
48
- notFoundText = "No data",
54
+ notFoundText,
49
55
  defaultExpandAll = false,
50
56
  className,
51
57
  onChange,
58
+ locale,
52
59
  ...rest
53
60
  } = props;
61
+ const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
62
+ const mergedLocale = _react.useMemo.call(void 0,
63
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
64
+ [config.locale, locale]
65
+ );
54
66
  const divProps = {};
55
67
  for (const key of Object.keys(rest)) {
56
68
  if (!TREESELECT_KEYS.has(key)) {
@@ -204,7 +216,7 @@ var TreeSelect = (props) => {
204
216
  {
205
217
  type: "text",
206
218
  className: _tigercatcore.treeSelectSearchClasses,
207
- placeholder: "Search...",
219
+ placeholder: _tigercatcore.resolveLocaleText.call(void 0, "Search...", _optionalChain([mergedLocale, 'optionalAccess', _4 => _4.common, 'optionalAccess', _5 => _5.searchPlaceholder])),
208
220
  value: searchQuery,
209
221
  "aria-label": "Search tree",
210
222
  onChange: (e) => setSearchQuery(e.target.value)
@@ -248,7 +260,7 @@ var TreeSelect = (props) => {
248
260
  },
249
261
  String(node.key)
250
262
  );
251
- }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.treeSelectEmptyClasses, children: notFoundText })
263
+ }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.treeSelectEmptyClasses, children: _tigercatcore.resolveLocaleText.call(void 0, "No data", notFoundText, _optionalChain([mergedLocale, 'optionalAccess', _6 => _6.common, 'optionalAccess', _7 => _7.emptyText])) })
252
264
  ] })
253
265
  ] });
254
266
  };
@@ -22,7 +22,8 @@ import {
22
22
  createNotificationStackUpdateScheduler,
23
23
  isBrowser,
24
24
  ANIMATION_DURATION_MS,
25
- normalizeStringOption
25
+ normalizeStringOption,
26
+ createInstanceCounter
26
27
  } from "@expcat/tigercat-core";
27
28
  import { jsx, jsxs } from "react/jsx-runtime";
28
29
  var NOTIFICATION_CONTAINER_ID_PREFIX = "tiger-notification-container";
@@ -32,7 +33,6 @@ var notificationInstancesByPosition = {
32
33
  "bottom-left": [],
33
34
  "bottom-right": []
34
35
  };
35
- var instanceIdCounter = 0;
36
36
  var containerRoots = {
37
37
  "top-left": null,
38
38
  "top-right": null,
@@ -51,9 +51,7 @@ function scheduleNotificationStackUpdate(position) {
51
51
  if (!callback) return;
52
52
  stackUpdateScheduler.schedule(position, callback);
53
53
  }
54
- function getNextInstanceId() {
55
- return ++instanceIdCounter;
56
- }
54
+ var getNextInstanceId = createInstanceCounter();
57
55
  var NotificationItem = ({ notification: notification2, onClose }) => {
58
56
  const [isVisible, setIsVisible] = useState(false);
59
57
  useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useControlledState
3
- } from "./chunk-UQMPEMY7.mjs";
3
+ } from "./chunk-WHYHLUXG.mjs";
4
4
 
5
5
  // src/components/Textarea.tsx
6
6
  import { forwardRef, useLayoutEffect, useMemo, useRef } from "react";
@@ -34,10 +34,7 @@ var Textarea = forwardRef(
34
34
  ...props
35
35
  }, ref) => {
36
36
  const textareaRef = useRef(null);
37
- const [currentValue, setInternalValue, isControlled] = useControlledState(
38
- value,
39
- defaultValue || ""
40
- );
37
+ const [currentValue, setValue] = useControlledState(value, defaultValue || "");
41
38
  const setRefs = (node) => {
42
39
  textareaRef.current = node;
43
40
  if (typeof ref === "function") ref(node);
@@ -57,9 +54,7 @@ var Textarea = forwardRef(
57
54
  [size, autoResize, className]
58
55
  );
59
56
  const handleInput = (event) => {
60
- if (!isControlled) {
61
- setInternalValue(event.currentTarget.value);
62
- }
57
+ setValue(event.currentTarget.value);
63
58
  onInput?.(event);
64
59
  };
65
60
  const handleChange = (event) => {
@@ -1,4 +1,8 @@
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; }// src/components/Cascader.tsx
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
+
3
+ var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
4
+
5
+ // src/components/Cascader.tsx
2
6
  var _react = require('react');
3
7
 
4
8
 
@@ -19,6 +23,8 @@ var _react = require('react');
19
23
 
20
24
 
21
25
 
26
+
27
+
22
28
 
23
29
 
24
30
 
@@ -37,7 +43,8 @@ var CASCADER_KEYS = /* @__PURE__ */ new Set([
37
43
  "changeOnSelect",
38
44
  "separator",
39
45
  "notFoundText",
40
- "className"
46
+ "className",
47
+ "locale"
41
48
  ]);
42
49
  var EMPTY_CASCADER_VALUE = [];
43
50
  var Cascader = (props) => {
@@ -53,9 +60,15 @@ var Cascader = (props) => {
53
60
  expandTrigger = "click",
54
61
  changeOnSelect = false,
55
62
  separator = " / ",
56
- notFoundText = "No results found",
57
- className
63
+ notFoundText,
64
+ className,
65
+ locale
58
66
  } = props;
67
+ const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
68
+ const mergedLocale = _react.useMemo.call(void 0,
69
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
70
+ [config.locale, locale]
71
+ );
59
72
  const divProps = {};
60
73
  for (const [k, v] of Object.entries(props)) {
61
74
  if (!CASCADER_KEYS.has(k)) divProps[k] = v;
@@ -233,7 +246,7 @@ var Cascader = (props) => {
233
246
  {
234
247
  type: "text",
235
248
  className: _tigercatcore.cascaderSearchInputClasses,
236
- placeholder: "Search...",
249
+ placeholder: _tigercatcore.resolveLocaleText.call(void 0, "Search...", _optionalChain([mergedLocale, 'optionalAccess', _5 => _5.common, 'optionalAccess', _6 => _6.searchPlaceholder])),
237
250
  value: searchQuery,
238
251
  onChange: (e) => setSearchQuery(e.target.value),
239
252
  "aria-label": "Search options"
@@ -241,7 +254,11 @@ var Cascader = (props) => {
241
254
  ),
242
255
  isSearchMode ? (
243
256
  // Search results
244
- searchResults.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.cascaderEmptyStateClasses, children: notFoundText }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-64 overflow-auto", ..._tigercatcore.getPickerListboxAria.call(void 0, { id: listboxId }), children: searchResults.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
257
+ searchResults.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.cascaderEmptyStateClasses, children: _tigercatcore.resolveLocaleText.call(void 0,
258
+ "No results found",
259
+ notFoundText,
260
+ _optionalChain([mergedLocale, 'optionalAccess', _7 => _7.common, 'optionalAccess', _8 => _8.emptyText])
261
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-h-64 overflow-auto", ..._tigercatcore.getPickerListboxAria.call(void 0, { id: listboxId }), children: searchResults.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
245
262
  "div",
246
263
  {
247
264
  className: _tigercatcore.classNames.call(void 0,
@@ -249,7 +266,7 @@ var Cascader = (props) => {
249
266
  item.disabled && "opacity-50 cursor-not-allowed"
250
267
  ),
251
268
  ..._tigercatcore.getPickerOptionAria.call(void 0, {
252
- selected: _optionalChain([value, 'optionalAccess', _5 => _5.join, 'call', _6 => _6(",")]) === item.valuePath.join(","),
269
+ selected: _optionalChain([value, 'optionalAccess', _9 => _9.join, 'call', _10 => _10(",")]) === item.valuePath.join(","),
253
270
  disabled: item.disabled
254
271
  }),
255
272
  onClick: () => handleSearchResultClick(item.valuePath, item.disabled),
@@ -1,7 +1,13 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-QAIBQHIO.mjs";
4
+
1
5
  // src/components/VirtualTable.tsx
2
6
  import { useCallback, useMemo, useRef, useState } from "react";
3
7
  import {
4
8
  classNames,
9
+ resolveLocaleText,
10
+ mergeTigerLocale,
5
11
  calculateVirtualRange,
6
12
  getVirtualTableContainerClasses,
7
13
  getVirtualTableRowClasses,
@@ -27,7 +33,8 @@ var VirtualTable = ({
27
33
  stickyHeader = true,
28
34
  rowKey,
29
35
  loading = false,
30
- emptyText = "No data",
36
+ emptyText,
37
+ locale,
31
38
  selectable = false,
32
39
  selectedKeys = [],
33
40
  striped = false,
@@ -38,6 +45,11 @@ var VirtualTable = ({
38
45
  renderCell,
39
46
  ...rest
40
47
  }) => {
48
+ const config = useTigerConfig();
49
+ const mergedLocale = useMemo(
50
+ () => mergeTigerLocale(config.locale, locale),
51
+ [config.locale, locale]
52
+ );
41
53
  const containerRef = useRef(null);
42
54
  const [scrollTop, setScrollTop] = useState(0);
43
55
  const range = useMemo(
@@ -139,7 +151,7 @@ var VirtualTable = ({
139
151
  bottomHeight > 0 && /* @__PURE__ */ jsx("tr", { style: { height: `${bottomHeight}px` }, "aria-hidden": true })
140
152
  ] })
141
153
  ] }),
142
- data.length === 0 && !loading && /* @__PURE__ */ jsx("div", { className: virtualTableEmptyClasses, children: emptyText }),
154
+ data.length === 0 && !loading && /* @__PURE__ */ jsx("div", { className: virtualTableEmptyClasses, children: resolveLocaleText("No data", emptyText, mergedLocale?.common?.emptyText) }),
143
155
  loading && /* @__PURE__ */ jsx("div", { className: virtualTableLoadingClasses, children: "Loading..." })
144
156
  ]
145
157
  }
@@ -1,10 +1,16 @@
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 _chunkL3WPA2RPjs = require('./chunk-L3WPA2RP.js');
4
+
5
+
3
6
 
4
7
 
5
8
 
6
9
  var _chunkSTTQ5LXXjs = require('./chunk-STTQ5LXX.js');
7
10
 
11
+
12
+ var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
13
+
8
14
  // src/components/Spotlight.tsx
9
15
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
10
16
 
@@ -29,6 +35,8 @@ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
29
35
 
30
36
 
31
37
 
38
+
39
+
32
40
 
33
41
 
34
42
 
@@ -49,8 +57,9 @@ var Spotlight = ({
49
57
  defaultQuery = "",
50
58
  items = EMPTY_ITEMS,
51
59
  title = "Spotlight",
52
- placeholder = "Search",
53
- emptyText = "No results found",
60
+ placeholder,
61
+ emptyText,
62
+ locale,
54
63
  inputAriaLabel,
55
64
  listboxLabel,
56
65
  closeOnSelect = true,
@@ -67,13 +76,27 @@ var Spotlight = ({
67
76
  style,
68
77
  ...rest
69
78
  }) => {
70
- const [uncontrolledOpen, setUncontrolledOpen] = _react.useState.call(void 0, defaultOpen);
71
- const [uncontrolledQuery, setUncontrolledQuery] = _react.useState.call(void 0, defaultQuery);
79
+ const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
80
+ const mergedLocale = _react.useMemo.call(void 0,
81
+ () => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
82
+ [config.locale, locale]
83
+ );
84
+ const placeholderText = _tigercatcore.resolveLocaleText.call(void 0,
85
+ "Search",
86
+ placeholder,
87
+ _optionalChain([mergedLocale, 'optionalAccess', _ => _.common, 'optionalAccess', _2 => _2.searchPlaceholder])
88
+ );
89
+ const [resolvedOpen, setOpenValue] = _chunkL3WPA2RPjs.useControlledState.call(void 0,
90
+ open,
91
+ _nullishCoalesce(defaultOpen, () => ( false)),
92
+ onOpenChange
93
+ );
94
+ const [resolvedQuery, setQueryValue] = _chunkL3WPA2RPjs.useControlledState.call(void 0,
95
+ query,
96
+ _nullishCoalesce(defaultQuery, () => ( "")),
97
+ onQueryChange
98
+ );
72
99
  const [activeIndex, setActiveIndex] = _react.useState.call(void 0, -1);
73
- const isOpenControlled = open !== void 0;
74
- const isQueryControlled = query !== void 0;
75
- const resolvedOpen = isOpenControlled ? Boolean(open) : uncontrolledOpen;
76
- const resolvedQuery = isQueryControlled ? String(query) : uncontrolledQuery;
77
100
  const reactId = _react.useId.call(void 0, );
78
101
  const dialogId = `tiger-spotlight-${reactId}`;
79
102
  const titleId = `${dialogId}-title`;
@@ -85,20 +108,6 @@ var Spotlight = ({
85
108
  () => _tigercatcore.getSpotlightSearchState.call(void 0, items, resolvedQuery, { filterItem, limit }),
86
109
  [items, resolvedQuery, filterItem, limit]
87
110
  );
88
- const setOpenValue = _react.useCallback.call(void 0,
89
- (nextOpen) => {
90
- if (!isOpenControlled) setUncontrolledOpen(nextOpen);
91
- _optionalChain([onOpenChange, 'optionalCall', _ => _(nextOpen)]);
92
- },
93
- [isOpenControlled, onOpenChange]
94
- );
95
- const setQueryValue = _react.useCallback.call(void 0,
96
- (nextQuery) => {
97
- if (!isQueryControlled) setUncontrolledQuery(nextQuery);
98
- _optionalChain([onQueryChange, 'optionalCall', _2 => _2(nextQuery)]);
99
- },
100
- [isQueryControlled, onQueryChange]
101
- );
102
111
  const closeSpotlight = _react.useCallback.call(void 0, () => {
103
112
  setOpenValue(false);
104
113
  }, [setOpenValue]);
@@ -200,8 +209,8 @@ var Spotlight = ({
200
209
  value: resolvedQuery,
201
210
  type: "search",
202
211
  className: _tigercatcore.spotlightInputClasses,
203
- placeholder,
204
- "aria-label": _nullishCoalesce(inputAriaLabel, () => ( placeholder)),
212
+ placeholder: placeholderText,
213
+ "aria-label": _nullishCoalesce(inputAriaLabel, () => ( placeholderText)),
205
214
  autoComplete: "off",
206
215
  ..._tigercatcore.getPickerComboboxAria.call(void 0, {
207
216
  expanded: true,
@@ -256,7 +265,7 @@ var Spotlight = ({
256
265
  _nullishCoalesce(group.label, () => ( `group-${groupIndex}`))
257
266
  ))
258
267
  }
259
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.spotlightEmptyClasses, children: emptyText })
268
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _tigercatcore.spotlightEmptyClasses, children: _tigercatcore.resolveLocaleText.call(void 0, "No results found", emptyText, _optionalChain([mergedLocale, 'optionalAccess', _4 => _4.common, 'optionalAccess', _5 => _5.emptyText])) })
260
269
  ]
261
270
  }
262
271
  )
@@ -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 _chunkUKGQ7256js = require('./chunk-UKGQ7256.js');
3
+ var _chunkL3WPA2RPjs = require('./chunk-L3WPA2RP.js');
4
4
 
5
5
  // src/components/Textarea.tsx
6
6
  var _react = require('react');
@@ -34,10 +34,7 @@ var Textarea = _react.forwardRef.call(void 0,
34
34
  ...props
35
35
  }, ref) => {
36
36
  const textareaRef = _react.useRef.call(void 0, null);
37
- const [currentValue, setInternalValue, isControlled] = _chunkUKGQ7256js.useControlledState.call(void 0,
38
- value,
39
- defaultValue || ""
40
- );
37
+ const [currentValue, setValue] = _chunkL3WPA2RPjs.useControlledState.call(void 0, value, defaultValue || "");
41
38
  const setRefs = (node) => {
42
39
  textareaRef.current = node;
43
40
  if (typeof ref === "function") ref(node);
@@ -57,9 +54,7 @@ var Textarea = _react.forwardRef.call(void 0,
57
54
  [size, autoResize, className]
58
55
  );
59
56
  const handleInput = (event) => {
60
- if (!isControlled) {
61
- setInternalValue(event.currentTarget.value);
62
- }
57
+ setValue(event.currentTarget.value);
63
58
  _optionalChain([onInput, 'optionalCall', _ => _(event)]);
64
59
  };
65
60
  const handleChange = (event) => {
@@ -1,3 +1,7 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-QAIBQHIO.mjs";
4
+
1
5
  // src/components/NumberKeyboard.tsx
2
6
  import { useMemo, useState } from "react";
3
7
  import {
@@ -7,9 +11,11 @@ import {
7
11
  getNumberKeyboardAction,
8
12
  getNumberKeyboardKeyClasses,
9
13
  getNumberKeyboardKeys,
14
+ mergeTigerLocale,
10
15
  normalizeNumberKeyboardValue,
11
16
  numberKeyboardGridClasses,
12
- numberKeyboardRootClasses
17
+ numberKeyboardRootClasses,
18
+ resolveLocaleText
13
19
  } from "@expcat/tigercat-core";
14
20
  import { jsx } from "react/jsx-runtime";
15
21
  var NumberKeyboard = ({
@@ -21,10 +27,11 @@ var NumberKeyboard = ({
21
27
  decimalSeparator = ".",
22
28
  disabled = false,
23
29
  readonly = false,
24
- confirmText = "Done",
30
+ confirmText,
25
31
  deleteText = "Delete",
26
32
  ariaLabel = "Number keyboard",
27
33
  showConfirm = true,
34
+ locale,
28
35
  className,
29
36
  style,
30
37
  onChange,
@@ -33,13 +40,25 @@ var NumberKeyboard = ({
33
40
  onConfirm,
34
41
  ...rest
35
42
  }) => {
43
+ const config = useTigerConfig();
44
+ const mergedLocale = useMemo(
45
+ () => mergeTigerLocale(config.locale, locale),
46
+ [config.locale, locale]
47
+ );
48
+ const confirmLabel = resolveLocaleText("Done", confirmText, mergedLocale?.common?.okText);
36
49
  const isControlled = value !== void 0;
37
50
  const [innerValue, setInnerValue] = useState(() => normalizeNumberKeyboardValue(defaultValue));
38
51
  const currentValue = isControlled ? normalizeNumberKeyboardValue(value) : innerValue;
39
52
  const isDisabled = disabled || readonly;
40
53
  const keys = useMemo(
41
- () => getNumberKeyboardKeys({ mode, decimalSeparator, deleteText, confirmText, showConfirm }),
42
- [confirmText, decimalSeparator, deleteText, mode, showConfirm]
54
+ () => getNumberKeyboardKeys({
55
+ mode,
56
+ decimalSeparator,
57
+ deleteText,
58
+ confirmText: confirmLabel,
59
+ showConfirm
60
+ }),
61
+ [confirmLabel, decimalSeparator, deleteText, mode, showConfirm]
43
62
  );
44
63
  function emitChange(nextValue, payload) {
45
64
  if (!isControlled) setInnerValue(nextValue);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useControlledState
3
- } from "./chunk-UQMPEMY7.mjs";
3
+ } from "./chunk-WHYHLUXG.mjs";
4
4
 
5
5
  // src/components/MarkdownEditor.tsx
6
6
  import { useCallback, useMemo, useRef } from "react";
@@ -53,11 +53,8 @@ var MarkdownEditor = ({
53
53
  ...restProps
54
54
  }) => {
55
55
  const textareaRef = useRef(null);
56
- const [currentValue, setInternalValue, isValueControlled] = useControlledState(
57
- value,
58
- defaultValue
59
- );
60
- const [currentMode, setInternalMode, isModeControlled] = useControlledState(mode, defaultMode);
56
+ const [currentValue, commitValue] = useControlledState(value, defaultValue, onChange);
57
+ const [currentMode, commitMode] = useControlledState(mode, defaultMode, onModeChange);
61
58
  const toolbarItems = useMemo(
62
59
  () => toolbar === false ? [] : toolbar ?? defaultMarkdownToolbar,
63
60
  [toolbar]
@@ -70,20 +67,6 @@ var MarkdownEditor = ({
70
67
  const parsedHeight = parseMarkdownHeight(height);
71
68
  return { ...parsedHeight ? { height: parsedHeight } : {}, ...style };
72
69
  }, [height, style]);
73
- const commitValue = useCallback(
74
- (nextValue) => {
75
- if (!isValueControlled) setInternalValue(nextValue);
76
- onChange?.(nextValue);
77
- },
78
- [isValueControlled, onChange, setInternalValue]
79
- );
80
- const commitMode = useCallback(
81
- (nextMode) => {
82
- if (!isModeControlled) setInternalMode(nextMode);
83
- onModeChange?.(nextMode);
84
- },
85
- [isModeControlled, onModeChange, setInternalMode]
86
- );
87
70
  const applyToolbarButton = useCallback(
88
71
  (button) => {
89
72
  if (readOnly || disabled) return;
@@ -1,3 +1,6 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-QAIBQHIO.mjs";
1
4
  import {
2
5
  StatusIcon
3
6
  } from "./chunk-FLYJVZED.mjs";
@@ -8,6 +11,8 @@ import ReactDOM from "react-dom";
8
11
  import {
9
12
  classNames,
10
13
  isBrowser,
14
+ resolveLocaleText,
15
+ mergeTigerLocale,
11
16
  tourPopoverClasses,
12
17
  tourTitleClasses,
13
18
  tourDescriptionClasses,
@@ -28,17 +33,26 @@ var Tour = ({
28
33
  loadSteps,
29
34
  open = false,
30
35
  current: controlledCurrent,
31
- nextText = "Next",
32
- prevText = "Previous",
33
- finishText = "Finish",
36
+ nextText,
37
+ prevText,
38
+ finishText,
34
39
  closable = true,
35
40
  showIndicators = true,
41
+ locale,
36
42
  className,
37
43
  onOpenChange,
38
44
  onClose,
39
45
  onFinish,
40
46
  onChange
41
47
  }) => {
48
+ const config = useTigerConfig();
49
+ const mergedLocale = useMemo(
50
+ () => mergeTigerLocale(config.locale, locale),
51
+ [config.locale, locale]
52
+ );
53
+ const nextLabel = resolveLocaleText("Next", nextText, mergedLocale?.formWizard?.nextText);
54
+ const prevLabel = resolveLocaleText("Previous", prevText, mergedLocale?.formWizard?.prevText);
55
+ const finishLabel = resolveLocaleText("Finish", finishText, mergedLocale?.formWizard?.finishText);
42
56
  const [internalStep, setInternalStep] = useState(0);
43
57
  const [resolvedSteps, setResolvedSteps] = useState(steps);
44
58
  const currentStep = controlledCurrent ?? internalStep;
@@ -167,7 +181,7 @@ var Tour = ({
167
181
  type: "button",
168
182
  className: "px-3 py-1.5 text-sm rounded-md border border-[var(--tiger-border,#e5e7eb)] text-[var(--tiger-text,#111827)] hover:bg-[var(--tiger-surface-muted,#f9fafb)] transition-colors mr-2",
169
183
  onClick: prev,
170
- children: prevText
184
+ children: prevLabel
171
185
  }
172
186
  ),
173
187
  /* @__PURE__ */ jsx(
@@ -176,7 +190,7 @@ var Tour = ({
176
190
  type: "button",
177
191
  className: "px-3 py-1.5 text-sm rounded-md bg-[var(--tiger-primary,#2563eb)] text-white hover:bg-[var(--tiger-primary-hover,#1d4ed8)] transition-colors",
178
192
  onClick: next,
179
- children: isLast ? finishText : nextText
193
+ children: isLast ? finishLabel : nextLabel
180
194
  }
181
195
  )
182
196
  ] })
@@ -1,3 +1,7 @@
1
+ import {
2
+ useTigerConfig
3
+ } from "./chunk-QAIBQHIO.mjs";
4
+
1
5
  // src/components/Form.tsx
2
6
  import React, {
3
7
  createContext,
@@ -24,7 +28,9 @@ import {
24
28
  undoFormHistory,
25
29
  redoFormHistory,
26
30
  canUndo,
27
- canRedo
31
+ canRedo,
32
+ mergeTigerLocale,
33
+ getFormValidationLabels
28
34
  } from "@expcat/tigercat-core";
29
35
  import { jsx } from "react/jsx-runtime";
30
36
  var FormContext = createContext(null);
@@ -54,9 +60,15 @@ var Form = forwardRef(
54
60
  validateDebounce = 0,
55
61
  undoable = false,
56
62
  maxHistorySize = 50,
63
+ locale,
57
64
  ...props
58
65
  }, ref) => {
59
66
  const resolvedLabelAlign = labelAlign ?? (labelPosition === "top" ? "left" : "right");
67
+ const config = useTigerConfig();
68
+ const validationMessages = useMemo(
69
+ () => getFormValidationLabels(mergeTigerLocale(config.locale, locale)),
70
+ [config.locale, locale]
71
+ );
60
72
  const [errors, setErrors] = useState([]);
61
73
  const [formValues, setFormValues] = useState(model);
62
74
  const fieldRulesRef = React.useRef({});
@@ -161,9 +173,16 @@ var Form = forwardRef(
161
173
  }
162
174
  const currentValues = formValuesRef.current;
163
175
  const value = getValueByPath(currentValues, fieldName);
164
- return validateFieldUtil(fieldName, value, fieldRules, currentValues, trigger);
176
+ return validateFieldUtil(
177
+ fieldName,
178
+ value,
179
+ fieldRules,
180
+ currentValues,
181
+ trigger,
182
+ validationMessages
183
+ );
165
184
  },
166
- [resolveFieldRules]
185
+ [resolveFieldRules, validationMessages]
167
186
  );
168
187
  const validateFieldNow = useCallback(
169
188
  async (fieldName, rulesOverride, trigger) => {
@@ -219,10 +238,10 @@ var Form = forwardRef(
219
238
  setErrors([]);
220
239
  return { valid: true, errors: [] };
221
240
  }
222
- const result = await validateForm(formValuesRef.current, effectiveRules);
241
+ const result = await validateForm(formValuesRef.current, effectiveRules, validationMessages);
223
242
  setErrors(result.errors);
224
243
  return result;
225
- }, [getEffectiveRules]);
244
+ }, [getEffectiveRules, validationMessages]);
226
245
  const validate = useCallback(async () => {
227
246
  const result = await runValidation();
228
247
  return result.valid;
@@ -1,13 +1,13 @@
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
3
 
4
- var _chunkM7HBWFQOjs = require('./chunk-M7HBWFQO.js');
4
+ var _chunkBROIZ266js = require('./chunk-BROIZ266.js');
5
5
 
6
6
 
7
- var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
7
+ var _chunkZLNBE4ISjs = require('./chunk-ZLNBE4IS.js');
8
8
 
9
9
 
10
- var _chunkZLNBE4ISjs = require('./chunk-ZLNBE4IS.js');
10
+ var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
11
11
 
12
12
  // src/components/FormWizard.tsx
13
13
  var _react = require('react');
@@ -171,7 +171,7 @@ var FormWizard = ({
171
171
  }, [currentIndex, currentStep, renderStep]);
172
172
  const stepsNodes = _react.useMemo.call(void 0,
173
173
  () => steps.map((step, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
174
- _chunkM7HBWFQOjs.StepsItem,
174
+ _chunkBROIZ266js.StepsItem,
175
175
  {
176
176
  title: step.title,
177
177
  description: step.description,
@@ -192,7 +192,7 @@ var FormWizard = ({
192
192
  bordered ? "border-b border-[var(--tiger-border,#e5e7eb)]" : ""
193
193
  ),
194
194
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
195
- _chunkM7HBWFQOjs.Steps,
195
+ _chunkBROIZ266js.Steps,
196
196
  {
197
197
  current: currentIndex,
198
198
  direction,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFormContext
3
- } from "./chunk-F6IXIH6B.mjs";
3
+ } from "./chunk-IZGXDHPB.mjs";
4
4
 
5
5
  // src/components/FormItem.tsx
6
6
  import React, { useMemo, useEffect, useState, useCallback, useId, useRef } from "react";