@dmsi/wedgekit-react 0.0.1080 → 0.0.1081

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 (52) hide show
  1. package/dist/{chunk-FD2FKB5M.js → chunk-FDQBM3O4.js} +4 -4
  2. package/dist/{chunk-NEMOTB6U.js → chunk-KZPIH2K5.js} +20 -3
  3. package/dist/{chunk-IEKZBWVL.js → chunk-SISDU5GI.js} +1 -1
  4. package/dist/{chunk-72WLEGGU.js → chunk-TINCHPB4.js} +1 -1
  5. package/dist/{chunk-RMKITIDU.js → chunk-Y2N7A2PP.js} +1 -1
  6. package/dist/components/CalendarRange.cjs +20 -3
  7. package/dist/components/CalendarRange.js +5 -5
  8. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +20 -3
  9. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +5 -5
  10. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +20 -3
  11. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +5 -5
  12. package/dist/components/DataGrid/PinnedColumns.cjs +20 -3
  13. package/dist/components/DataGrid/PinnedColumns.js +5 -5
  14. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +20 -3
  15. package/dist/components/DataGrid/TableBody/LoadingCell.js +5 -5
  16. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +20 -3
  17. package/dist/components/DataGrid/TableBody/TableBodyRow.js +5 -5
  18. package/dist/components/DataGrid/TableBody/index.cjs +20 -3
  19. package/dist/components/DataGrid/TableBody/index.js +5 -5
  20. package/dist/components/DataGrid/index.cjs +20 -3
  21. package/dist/components/DataGrid/index.js +5 -5
  22. package/dist/components/DataGrid/utils.cjs +20 -3
  23. package/dist/components/DataGrid/utils.js +5 -5
  24. package/dist/components/DataGridCell.cjs +20 -3
  25. package/dist/components/DataGridCell.js +3 -3
  26. package/dist/components/DateInput.cjs +20 -3
  27. package/dist/components/DateInput.js +5 -5
  28. package/dist/components/DateRangeInput.cjs +20 -3
  29. package/dist/components/DateRangeInput.js +5 -5
  30. package/dist/components/FilterGroup.cjs +20 -3
  31. package/dist/components/FilterGroup.js +2 -2
  32. package/dist/components/Input.cjs +20 -3
  33. package/dist/components/Input.js +1 -1
  34. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +20 -3
  35. package/dist/components/MobileDataGrid/ColumnSelector/index.js +5 -5
  36. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +20 -3
  37. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +5 -5
  38. package/dist/components/MobileDataGrid/index.cjs +20 -3
  39. package/dist/components/MobileDataGrid/index.js +5 -5
  40. package/dist/components/Password.cjs +20 -3
  41. package/dist/components/Password.js +1 -1
  42. package/dist/components/Search.cjs +20 -3
  43. package/dist/components/Search.js +2 -2
  44. package/dist/components/Select.cjs +20 -3
  45. package/dist/components/Select.js +2 -2
  46. package/dist/components/Stepper.cjs +20 -3
  47. package/dist/components/Stepper.js +1 -1
  48. package/dist/components/Time.cjs +20 -3
  49. package/dist/components/Time.js +1 -1
  50. package/dist/components/index.cjs +20 -3
  51. package/dist/components/index.js +5 -5
  52. package/package.json +1 -1
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-EWGHVZL5.js";
17
17
  import {
18
18
  Select
19
- } from "./chunk-IEKZBWVL.js";
19
+ } from "./chunk-SISDU5GI.js";
20
20
  import {
21
21
  Tooltip
22
22
  } from "./chunk-HT57FLRW.js";
@@ -25,7 +25,7 @@ import {
25
25
  DataGridCell,
26
26
  DragAlongCell,
27
27
  DraggableCellHeader
28
- } from "./chunk-RMKITIDU.js";
28
+ } from "./chunk-Y2N7A2PP.js";
29
29
  import {
30
30
  MenuOption
31
31
  } from "./chunk-X3NDEFVA.js";
@@ -34,11 +34,11 @@ import {
34
34
  } from "./chunk-OM7QLLI2.js";
35
35
  import {
36
36
  Search
37
- } from "./chunk-72WLEGGU.js";
37
+ } from "./chunk-TINCHPB4.js";
38
38
  import {
39
39
  Input,
40
40
  InputBase
41
- } from "./chunk-NEMOTB6U.js";
41
+ } from "./chunk-KZPIH2K5.js";
42
42
  import {
43
43
  Label
44
44
  } from "./chunk-HXGJVYGQ.js";
@@ -229,6 +229,7 @@ var Input = (_a) => {
229
229
  decimals,
230
230
  uom,
231
231
  currencyFormat = false,
232
+ formatOnBlur = false,
232
233
  removeSearchIcon,
233
234
  value: propValue,
234
235
  onChange,
@@ -242,6 +243,7 @@ var Input = (_a) => {
242
243
  "decimals",
243
244
  "uom",
244
245
  "currencyFormat",
246
+ "formatOnBlur",
245
247
  "removeSearchIcon",
246
248
  "value",
247
249
  "onChange",
@@ -253,6 +255,7 @@ var Input = (_a) => {
253
255
  ]);
254
256
  const [internalValue, setInternalValue] = useState("");
255
257
  const [displayValue, setDisplayValue] = useState("");
258
+ const [isFocused, setIsFocused] = useState(false);
256
259
  useEffect(() => {
257
260
  var _a2;
258
261
  const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
@@ -268,9 +271,14 @@ var Input = (_a) => {
268
271
  return;
269
272
  }
270
273
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
274
+ if (formatOnBlur && isFocused) {
275
+ setInternalValue(stringValue);
276
+ setDisplayValue(stringValue);
277
+ return;
278
+ }
271
279
  setInternalValue(formatted);
272
280
  setDisplayValue(formatCurrencyDisplay(formatted));
273
- }, [propValue, variant, currencyFormat, decimals]);
281
+ }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
274
282
  const getInputProps = () => {
275
283
  var _a2;
276
284
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -385,7 +393,9 @@ var Input = (_a) => {
385
393
  currentDecimals
386
394
  );
387
395
  setInternalValue(formattedClamped);
388
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
396
+ setDisplayValue(
397
+ formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
398
+ );
389
399
  if (onChange) {
390
400
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
391
401
  target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
@@ -395,7 +405,7 @@ var Input = (_a) => {
395
405
  return;
396
406
  }
397
407
  setInternalValue(raw);
398
- setDisplayValue(formatCurrencyDisplay(raw));
408
+ setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
399
409
  if (!isNaN(asNumber) && onChange) {
400
410
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
401
411
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -481,6 +491,7 @@ var Input = (_a) => {
481
491
  }
482
492
  };
483
493
  const handleBlur = (e) => {
494
+ setIsFocused(false);
484
495
  if (!internalValue) {
485
496
  onBlur == null ? void 0 : onBlur(e);
486
497
  return;
@@ -515,12 +526,18 @@ var Input = (_a) => {
515
526
  }
516
527
  onBlur == null ? void 0 : onBlur(e);
517
528
  };
529
+ const handleFocus = (e) => {
530
+ var _a2;
531
+ setIsFocused(true);
532
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
533
+ };
518
534
  const inputProps = getInputProps();
519
535
  return /* @__PURE__ */ jsx(
520
536
  InputBase,
521
537
  __spreadProps(__spreadValues({}, inputProps), {
522
538
  before: getBeforeElement(),
523
539
  after: getAfterElement(),
540
+ onFocus: handleFocus,
524
541
  onChange: handleChange,
525
542
  onBlur: handleBlur,
526
543
  testid,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InputBase
3
- } from "./chunk-NEMOTB6U.js";
3
+ } from "./chunk-KZPIH2K5.js";
4
4
  import {
5
5
  Icon
6
6
  } from "./chunk-NKUETCDA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Input
3
- } from "./chunk-NEMOTB6U.js";
3
+ } from "./chunk-KZPIH2K5.js";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadValues
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-PE3EZP56.js";
10
10
  import {
11
11
  Search
12
- } from "./chunk-72WLEGGU.js";
12
+ } from "./chunk-TINCHPB4.js";
13
13
  import {
14
14
  CSS
15
15
  } from "./chunk-WVUIIBRR.js";
@@ -2112,6 +2112,7 @@ var Input = (_a) => {
2112
2112
  decimals,
2113
2113
  uom,
2114
2114
  currencyFormat = false,
2115
+ formatOnBlur = false,
2115
2116
  removeSearchIcon,
2116
2117
  value: propValue,
2117
2118
  onChange,
@@ -2125,6 +2126,7 @@ var Input = (_a) => {
2125
2126
  "decimals",
2126
2127
  "uom",
2127
2128
  "currencyFormat",
2129
+ "formatOnBlur",
2128
2130
  "removeSearchIcon",
2129
2131
  "value",
2130
2132
  "onChange",
@@ -2136,6 +2138,7 @@ var Input = (_a) => {
2136
2138
  ]);
2137
2139
  const [internalValue, setInternalValue] = (0, import_react10.useState)("");
2138
2140
  const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
2141
+ const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
2139
2142
  (0, import_react10.useEffect)(() => {
2140
2143
  var _a2;
2141
2144
  const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
@@ -2151,9 +2154,14 @@ var Input = (_a) => {
2151
2154
  return;
2152
2155
  }
2153
2156
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
2157
+ if (formatOnBlur && isFocused) {
2158
+ setInternalValue(stringValue);
2159
+ setDisplayValue(stringValue);
2160
+ return;
2161
+ }
2154
2162
  setInternalValue(formatted);
2155
2163
  setDisplayValue(formatCurrencyDisplay(formatted));
2156
- }, [propValue, variant, currencyFormat, decimals]);
2164
+ }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
2157
2165
  const getInputProps = () => {
2158
2166
  var _a2;
2159
2167
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -2268,7 +2276,9 @@ var Input = (_a) => {
2268
2276
  currentDecimals
2269
2277
  );
2270
2278
  setInternalValue(formattedClamped);
2271
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
2279
+ setDisplayValue(
2280
+ formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
2281
+ );
2272
2282
  if (onChange) {
2273
2283
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2274
2284
  target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
@@ -2278,7 +2288,7 @@ var Input = (_a) => {
2278
2288
  return;
2279
2289
  }
2280
2290
  setInternalValue(raw);
2281
- setDisplayValue(formatCurrencyDisplay(raw));
2291
+ setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
2282
2292
  if (!isNaN(asNumber) && onChange) {
2283
2293
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2284
2294
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -2364,6 +2374,7 @@ var Input = (_a) => {
2364
2374
  }
2365
2375
  };
2366
2376
  const handleBlur = (e) => {
2377
+ setIsFocused(false);
2367
2378
  if (!internalValue) {
2368
2379
  onBlur == null ? void 0 : onBlur(e);
2369
2380
  return;
@@ -2398,12 +2409,18 @@ var Input = (_a) => {
2398
2409
  }
2399
2410
  onBlur == null ? void 0 : onBlur(e);
2400
2411
  };
2412
+ const handleFocus = (e) => {
2413
+ var _a2;
2414
+ setIsFocused(true);
2415
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
2416
+ };
2401
2417
  const inputProps = getInputProps();
2402
2418
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2403
2419
  InputBase,
2404
2420
  __spreadProps(__spreadValues({}, inputProps), {
2405
2421
  before: getBeforeElement(),
2406
2422
  after: getAfterElement(),
2423
+ onFocus: handleFocus,
2407
2424
  onChange: handleChange,
2408
2425
  onBlur: handleBlur,
2409
2426
  testid,
@@ -2,7 +2,7 @@ import {
2
2
  CalendarRange,
3
3
  CalendarRange_default,
4
4
  isWeekend
5
- } from "../chunk-FD2FKB5M.js";
5
+ } from "../chunk-FDQBM3O4.js";
6
6
  import "../chunk-M7INAUAJ.js";
7
7
  import "../chunk-ICHD7DUS.js";
8
8
  import "../chunk-XPZY6KEI.js";
@@ -23,7 +23,7 @@ import "../chunk-AJ5M6MVX.js";
23
23
  import "../chunk-7IPESTQS.js";
24
24
  import "../chunk-EWGHVZL5.js";
25
25
  import "../chunk-AT4AWD6B.js";
26
- import "../chunk-IEKZBWVL.js";
26
+ import "../chunk-SISDU5GI.js";
27
27
  import "../chunk-KWMG6SN2.js";
28
28
  import "../chunk-KBIEWFQS.js";
29
29
  import "../chunk-NSZTJ5R4.js";
@@ -40,12 +40,12 @@ import "../chunk-O2IR67XN.js";
40
40
  import "../chunk-SJZNVG4N.js";
41
41
  import "../chunk-75USUR3I.js";
42
42
  import "../chunk-BWPNXY7T.js";
43
- import "../chunk-RMKITIDU.js";
43
+ import "../chunk-Y2N7A2PP.js";
44
44
  import "../chunk-X3NDEFVA.js";
45
45
  import "../chunk-OM7QLLI2.js";
46
46
  import "../chunk-PE3EZP56.js";
47
- import "../chunk-72WLEGGU.js";
48
- import "../chunk-NEMOTB6U.js";
47
+ import "../chunk-TINCHPB4.js";
48
+ import "../chunk-KZPIH2K5.js";
49
49
  import "../chunk-HXGJVYGQ.js";
50
50
  import "../chunk-WVUIIBRR.js";
51
51
  import "../chunk-M7WHWZ2J.js";
@@ -2106,6 +2106,7 @@ var Input = (_a) => {
2106
2106
  decimals,
2107
2107
  uom,
2108
2108
  currencyFormat = false,
2109
+ formatOnBlur = false,
2109
2110
  removeSearchIcon,
2110
2111
  value: propValue,
2111
2112
  onChange,
@@ -2119,6 +2120,7 @@ var Input = (_a) => {
2119
2120
  "decimals",
2120
2121
  "uom",
2121
2122
  "currencyFormat",
2123
+ "formatOnBlur",
2122
2124
  "removeSearchIcon",
2123
2125
  "value",
2124
2126
  "onChange",
@@ -2130,6 +2132,7 @@ var Input = (_a) => {
2130
2132
  ]);
2131
2133
  const [internalValue, setInternalValue] = (0, import_react10.useState)("");
2132
2134
  const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
2135
+ const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
2133
2136
  (0, import_react10.useEffect)(() => {
2134
2137
  var _a2;
2135
2138
  const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
@@ -2145,9 +2148,14 @@ var Input = (_a) => {
2145
2148
  return;
2146
2149
  }
2147
2150
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
2151
+ if (formatOnBlur && isFocused) {
2152
+ setInternalValue(stringValue);
2153
+ setDisplayValue(stringValue);
2154
+ return;
2155
+ }
2148
2156
  setInternalValue(formatted);
2149
2157
  setDisplayValue(formatCurrencyDisplay(formatted));
2150
- }, [propValue, variant, currencyFormat, decimals]);
2158
+ }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
2151
2159
  const getInputProps = () => {
2152
2160
  var _a2;
2153
2161
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -2262,7 +2270,9 @@ var Input = (_a) => {
2262
2270
  currentDecimals
2263
2271
  );
2264
2272
  setInternalValue(formattedClamped);
2265
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
2273
+ setDisplayValue(
2274
+ formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
2275
+ );
2266
2276
  if (onChange) {
2267
2277
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2268
2278
  target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
@@ -2272,7 +2282,7 @@ var Input = (_a) => {
2272
2282
  return;
2273
2283
  }
2274
2284
  setInternalValue(raw);
2275
- setDisplayValue(formatCurrencyDisplay(raw));
2285
+ setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
2276
2286
  if (!isNaN(asNumber) && onChange) {
2277
2287
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2278
2288
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -2358,6 +2368,7 @@ var Input = (_a) => {
2358
2368
  }
2359
2369
  };
2360
2370
  const handleBlur = (e) => {
2371
+ setIsFocused(false);
2361
2372
  if (!internalValue) {
2362
2373
  onBlur == null ? void 0 : onBlur(e);
2363
2374
  return;
@@ -2392,12 +2403,18 @@ var Input = (_a) => {
2392
2403
  }
2393
2404
  onBlur == null ? void 0 : onBlur(e);
2394
2405
  };
2406
+ const handleFocus = (e) => {
2407
+ var _a2;
2408
+ setIsFocused(true);
2409
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
2410
+ };
2395
2411
  const inputProps = getInputProps();
2396
2412
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2397
2413
  InputBase,
2398
2414
  __spreadProps(__spreadValues({}, inputProps), {
2399
2415
  before: getBeforeElement(),
2400
2416
  after: getAfterElement(),
2417
+ onFocus: handleFocus,
2401
2418
  onChange: handleChange,
2402
2419
  onBlur: handleBlur,
2403
2420
  testid,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ColumnSelectorMenuOption
3
- } from "../../../chunk-FD2FKB5M.js";
3
+ } from "../../../chunk-FDQBM3O4.js";
4
4
  import "../../../chunk-M7INAUAJ.js";
5
5
  import "../../../chunk-ICHD7DUS.js";
6
6
  import "../../../chunk-XPZY6KEI.js";
@@ -21,7 +21,7 @@ import "../../../chunk-AJ5M6MVX.js";
21
21
  import "../../../chunk-7IPESTQS.js";
22
22
  import "../../../chunk-EWGHVZL5.js";
23
23
  import "../../../chunk-AT4AWD6B.js";
24
- import "../../../chunk-IEKZBWVL.js";
24
+ import "../../../chunk-SISDU5GI.js";
25
25
  import "../../../chunk-KWMG6SN2.js";
26
26
  import "../../../chunk-KBIEWFQS.js";
27
27
  import "../../../chunk-NSZTJ5R4.js";
@@ -38,12 +38,12 @@ import "../../../chunk-O2IR67XN.js";
38
38
  import "../../../chunk-SJZNVG4N.js";
39
39
  import "../../../chunk-75USUR3I.js";
40
40
  import "../../../chunk-BWPNXY7T.js";
41
- import "../../../chunk-RMKITIDU.js";
41
+ import "../../../chunk-Y2N7A2PP.js";
42
42
  import "../../../chunk-X3NDEFVA.js";
43
43
  import "../../../chunk-OM7QLLI2.js";
44
44
  import "../../../chunk-PE3EZP56.js";
45
- import "../../../chunk-72WLEGGU.js";
46
- import "../../../chunk-NEMOTB6U.js";
45
+ import "../../../chunk-TINCHPB4.js";
46
+ import "../../../chunk-KZPIH2K5.js";
47
47
  import "../../../chunk-HXGJVYGQ.js";
48
48
  import "../../../chunk-WVUIIBRR.js";
49
49
  import "../../../chunk-M7WHWZ2J.js";
@@ -2106,6 +2106,7 @@ var Input = (_a) => {
2106
2106
  decimals,
2107
2107
  uom,
2108
2108
  currencyFormat = false,
2109
+ formatOnBlur = false,
2109
2110
  removeSearchIcon,
2110
2111
  value: propValue,
2111
2112
  onChange,
@@ -2119,6 +2120,7 @@ var Input = (_a) => {
2119
2120
  "decimals",
2120
2121
  "uom",
2121
2122
  "currencyFormat",
2123
+ "formatOnBlur",
2122
2124
  "removeSearchIcon",
2123
2125
  "value",
2124
2126
  "onChange",
@@ -2130,6 +2132,7 @@ var Input = (_a) => {
2130
2132
  ]);
2131
2133
  const [internalValue, setInternalValue] = (0, import_react10.useState)("");
2132
2134
  const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
2135
+ const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
2133
2136
  (0, import_react10.useEffect)(() => {
2134
2137
  var _a2;
2135
2138
  const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
@@ -2145,9 +2148,14 @@ var Input = (_a) => {
2145
2148
  return;
2146
2149
  }
2147
2150
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
2151
+ if (formatOnBlur && isFocused) {
2152
+ setInternalValue(stringValue);
2153
+ setDisplayValue(stringValue);
2154
+ return;
2155
+ }
2148
2156
  setInternalValue(formatted);
2149
2157
  setDisplayValue(formatCurrencyDisplay(formatted));
2150
- }, [propValue, variant, currencyFormat, decimals]);
2158
+ }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
2151
2159
  const getInputProps = () => {
2152
2160
  var _a2;
2153
2161
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -2262,7 +2270,9 @@ var Input = (_a) => {
2262
2270
  currentDecimals
2263
2271
  );
2264
2272
  setInternalValue(formattedClamped);
2265
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
2273
+ setDisplayValue(
2274
+ formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
2275
+ );
2266
2276
  if (onChange) {
2267
2277
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2268
2278
  target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
@@ -2272,7 +2282,7 @@ var Input = (_a) => {
2272
2282
  return;
2273
2283
  }
2274
2284
  setInternalValue(raw);
2275
- setDisplayValue(formatCurrencyDisplay(raw));
2285
+ setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
2276
2286
  if (!isNaN(asNumber) && onChange) {
2277
2287
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2278
2288
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -2358,6 +2368,7 @@ var Input = (_a) => {
2358
2368
  }
2359
2369
  };
2360
2370
  const handleBlur = (e) => {
2371
+ setIsFocused(false);
2361
2372
  if (!internalValue) {
2362
2373
  onBlur == null ? void 0 : onBlur(e);
2363
2374
  return;
@@ -2392,12 +2403,18 @@ var Input = (_a) => {
2392
2403
  }
2393
2404
  onBlur == null ? void 0 : onBlur(e);
2394
2405
  };
2406
+ const handleFocus = (e) => {
2407
+ var _a2;
2408
+ setIsFocused(true);
2409
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
2410
+ };
2395
2411
  const inputProps = getInputProps();
2396
2412
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2397
2413
  InputBase,
2398
2414
  __spreadProps(__spreadValues({}, inputProps), {
2399
2415
  before: getBeforeElement(),
2400
2416
  after: getAfterElement(),
2417
+ onFocus: handleFocus,
2401
2418
  onChange: handleChange,
2402
2419
  onBlur: handleBlur,
2403
2420
  testid,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ColumnSelectorHeaderCell
3
- } from "../../../chunk-FD2FKB5M.js";
3
+ } from "../../../chunk-FDQBM3O4.js";
4
4
  import "../../../chunk-M7INAUAJ.js";
5
5
  import "../../../chunk-ICHD7DUS.js";
6
6
  import "../../../chunk-XPZY6KEI.js";
@@ -21,7 +21,7 @@ import "../../../chunk-AJ5M6MVX.js";
21
21
  import "../../../chunk-7IPESTQS.js";
22
22
  import "../../../chunk-EWGHVZL5.js";
23
23
  import "../../../chunk-AT4AWD6B.js";
24
- import "../../../chunk-IEKZBWVL.js";
24
+ import "../../../chunk-SISDU5GI.js";
25
25
  import "../../../chunk-KWMG6SN2.js";
26
26
  import "../../../chunk-KBIEWFQS.js";
27
27
  import "../../../chunk-NSZTJ5R4.js";
@@ -38,12 +38,12 @@ import "../../../chunk-O2IR67XN.js";
38
38
  import "../../../chunk-SJZNVG4N.js";
39
39
  import "../../../chunk-75USUR3I.js";
40
40
  import "../../../chunk-BWPNXY7T.js";
41
- import "../../../chunk-RMKITIDU.js";
41
+ import "../../../chunk-Y2N7A2PP.js";
42
42
  import "../../../chunk-X3NDEFVA.js";
43
43
  import "../../../chunk-OM7QLLI2.js";
44
44
  import "../../../chunk-PE3EZP56.js";
45
- import "../../../chunk-72WLEGGU.js";
46
- import "../../../chunk-NEMOTB6U.js";
45
+ import "../../../chunk-TINCHPB4.js";
46
+ import "../../../chunk-KZPIH2K5.js";
47
47
  import "../../../chunk-HXGJVYGQ.js";
48
48
  import "../../../chunk-WVUIIBRR.js";
49
49
  import "../../../chunk-M7WHWZ2J.js";
@@ -2106,6 +2106,7 @@ var Input = (_a) => {
2106
2106
  decimals,
2107
2107
  uom,
2108
2108
  currencyFormat = false,
2109
+ formatOnBlur = false,
2109
2110
  removeSearchIcon,
2110
2111
  value: propValue,
2111
2112
  onChange,
@@ -2119,6 +2120,7 @@ var Input = (_a) => {
2119
2120
  "decimals",
2120
2121
  "uom",
2121
2122
  "currencyFormat",
2123
+ "formatOnBlur",
2122
2124
  "removeSearchIcon",
2123
2125
  "value",
2124
2126
  "onChange",
@@ -2130,6 +2132,7 @@ var Input = (_a) => {
2130
2132
  ]);
2131
2133
  const [internalValue, setInternalValue] = (0, import_react10.useState)("");
2132
2134
  const [displayValue, setDisplayValue] = (0, import_react10.useState)("");
2135
+ const [isFocused, setIsFocused] = (0, import_react10.useState)(false);
2133
2136
  (0, import_react10.useEffect)(() => {
2134
2137
  var _a2;
2135
2138
  const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
@@ -2145,9 +2148,14 @@ var Input = (_a) => {
2145
2148
  return;
2146
2149
  }
2147
2150
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
2151
+ if (formatOnBlur && isFocused) {
2152
+ setInternalValue(stringValue);
2153
+ setDisplayValue(stringValue);
2154
+ return;
2155
+ }
2148
2156
  setInternalValue(formatted);
2149
2157
  setDisplayValue(formatCurrencyDisplay(formatted));
2150
- }, [propValue, variant, currencyFormat, decimals]);
2158
+ }, [propValue, variant, currencyFormat, decimals, formatOnBlur, isFocused]);
2151
2159
  const getInputProps = () => {
2152
2160
  var _a2;
2153
2161
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -2262,7 +2270,9 @@ var Input = (_a) => {
2262
2270
  currentDecimals
2263
2271
  );
2264
2272
  setInternalValue(formattedClamped);
2265
- setDisplayValue(formatCurrencyDisplay(formattedClamped));
2273
+ setDisplayValue(
2274
+ formatOnBlur ? formattedClamped : formatCurrencyDisplay(formattedClamped)
2275
+ );
2266
2276
  if (onChange) {
2267
2277
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2268
2278
  target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
@@ -2272,7 +2282,7 @@ var Input = (_a) => {
2272
2282
  return;
2273
2283
  }
2274
2284
  setInternalValue(raw);
2275
- setDisplayValue(formatCurrencyDisplay(raw));
2285
+ setDisplayValue(formatOnBlur ? raw : formatCurrencyDisplay(raw));
2276
2286
  if (!isNaN(asNumber) && onChange) {
2277
2287
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2278
2288
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -2358,6 +2368,7 @@ var Input = (_a) => {
2358
2368
  }
2359
2369
  };
2360
2370
  const handleBlur = (e) => {
2371
+ setIsFocused(false);
2361
2372
  if (!internalValue) {
2362
2373
  onBlur == null ? void 0 : onBlur(e);
2363
2374
  return;
@@ -2392,12 +2403,18 @@ var Input = (_a) => {
2392
2403
  }
2393
2404
  onBlur == null ? void 0 : onBlur(e);
2394
2405
  };
2406
+ const handleFocus = (e) => {
2407
+ var _a2;
2408
+ setIsFocused(true);
2409
+ (_a2 = props.onFocus) == null ? void 0 : _a2.call(props, e);
2410
+ };
2395
2411
  const inputProps = getInputProps();
2396
2412
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2397
2413
  InputBase,
2398
2414
  __spreadProps(__spreadValues({}, inputProps), {
2399
2415
  before: getBeforeElement(),
2400
2416
  after: getAfterElement(),
2417
+ onFocus: handleFocus,
2401
2418
  onChange: handleChange,
2402
2419
  onBlur: handleBlur,
2403
2420
  testid,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PinnedColumns
3
- } from "../../chunk-FD2FKB5M.js";
3
+ } from "../../chunk-FDQBM3O4.js";
4
4
  import "../../chunk-M7INAUAJ.js";
5
5
  import "../../chunk-ICHD7DUS.js";
6
6
  import "../../chunk-XPZY6KEI.js";
@@ -21,7 +21,7 @@ import "../../chunk-AJ5M6MVX.js";
21
21
  import "../../chunk-7IPESTQS.js";
22
22
  import "../../chunk-EWGHVZL5.js";
23
23
  import "../../chunk-AT4AWD6B.js";
24
- import "../../chunk-IEKZBWVL.js";
24
+ import "../../chunk-SISDU5GI.js";
25
25
  import "../../chunk-KWMG6SN2.js";
26
26
  import "../../chunk-KBIEWFQS.js";
27
27
  import "../../chunk-NSZTJ5R4.js";
@@ -38,12 +38,12 @@ import "../../chunk-O2IR67XN.js";
38
38
  import "../../chunk-SJZNVG4N.js";
39
39
  import "../../chunk-75USUR3I.js";
40
40
  import "../../chunk-BWPNXY7T.js";
41
- import "../../chunk-RMKITIDU.js";
41
+ import "../../chunk-Y2N7A2PP.js";
42
42
  import "../../chunk-X3NDEFVA.js";
43
43
  import "../../chunk-OM7QLLI2.js";
44
44
  import "../../chunk-PE3EZP56.js";
45
- import "../../chunk-72WLEGGU.js";
46
- import "../../chunk-NEMOTB6U.js";
45
+ import "../../chunk-TINCHPB4.js";
46
+ import "../../chunk-KZPIH2K5.js";
47
47
  import "../../chunk-HXGJVYGQ.js";
48
48
  import "../../chunk-WVUIIBRR.js";
49
49
  import "../../chunk-M7WHWZ2J.js";