@dmsi/wedgekit-react 0.0.536 → 0.0.538

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 (53) hide show
  1. package/dist/{chunk-UV53RKAQ.js → chunk-BKBJOF4J.js} +1 -1
  2. package/dist/{chunk-U6W5E3XW.js → chunk-I5BV7UPG.js} +1 -1
  3. package/dist/{chunk-PMNNRB6S.js → chunk-NWTVBVBC.js} +44 -2
  4. package/dist/{chunk-UFGH5V7K.js → chunk-RB7F6QWD.js} +4 -4
  5. package/dist/{chunk-YHFOOBE2.js → chunk-Y3EFHKAG.js} +1 -1
  6. package/dist/components/CalendarRange.cjs +44 -2
  7. package/dist/components/CalendarRange.js +5 -5
  8. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +44 -2
  9. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +5 -5
  10. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +44 -2
  11. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +5 -5
  12. package/dist/components/DataGrid/PinnedColumns.cjs +44 -2
  13. package/dist/components/DataGrid/PinnedColumns.js +5 -5
  14. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +44 -2
  15. package/dist/components/DataGrid/TableBody/LoadingCell.js +5 -5
  16. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +44 -2
  17. package/dist/components/DataGrid/TableBody/TableBodyRow.js +5 -5
  18. package/dist/components/DataGrid/TableBody/index.cjs +44 -2
  19. package/dist/components/DataGrid/TableBody/index.js +5 -5
  20. package/dist/components/DataGrid/index.cjs +44 -2
  21. package/dist/components/DataGrid/index.js +5 -5
  22. package/dist/components/DataGrid/utils.cjs +44 -2
  23. package/dist/components/DataGrid/utils.js +5 -5
  24. package/dist/components/DataGridCell.cjs +44 -2
  25. package/dist/components/DataGridCell.js +3 -3
  26. package/dist/components/DateInput.cjs +44 -2
  27. package/dist/components/DateInput.js +5 -5
  28. package/dist/components/DateRangeInput.cjs +44 -2
  29. package/dist/components/DateRangeInput.js +5 -5
  30. package/dist/components/FilterGroup.cjs +44 -2
  31. package/dist/components/FilterGroup.js +2 -2
  32. package/dist/components/Input.cjs +44 -2
  33. package/dist/components/Input.js +1 -1
  34. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +44 -2
  35. package/dist/components/MobileDataGrid/ColumnSelector/index.js +5 -5
  36. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +44 -2
  37. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +5 -5
  38. package/dist/components/MobileDataGrid/index.cjs +44 -2
  39. package/dist/components/MobileDataGrid/index.js +5 -5
  40. package/dist/components/Password.cjs +44 -2
  41. package/dist/components/Password.js +1 -1
  42. package/dist/components/Search.cjs +44 -2
  43. package/dist/components/Search.js +2 -2
  44. package/dist/components/Select.cjs +44 -2
  45. package/dist/components/Select.js +2 -2
  46. package/dist/components/Stepper.cjs +44 -2
  47. package/dist/components/Stepper.js +1 -1
  48. package/dist/components/Time.cjs +44 -2
  49. package/dist/components/Time.js +1 -1
  50. package/dist/components/index.cjs +44 -2
  51. package/dist/components/index.js +5 -5
  52. package/package.json +1 -1
  53. package/src/components/Input.tsx +62 -4
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Input
3
- } from "./chunk-PMNNRB6S.js";
3
+ } from "./chunk-NWTVBVBC.js";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadValues
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InputBase
3
- } from "./chunk-PMNNRB6S.js";
3
+ } from "./chunk-NWTVBVBC.js";
4
4
  import {
5
5
  Icon
6
6
  } from "./chunk-NKUETCDA.js";
@@ -269,7 +269,7 @@ var Input = (_a) => {
269
269
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
270
270
  setInternalValue(formatted);
271
271
  setDisplayValue(formatCurrencyDisplay(formatted));
272
- }, [variant, propValue, decimals]);
272
+ }, []);
273
273
  const getInputProps = () => {
274
274
  var _a2;
275
275
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -354,6 +354,7 @@ var Input = (_a) => {
354
354
  };
355
355
  const handleChange = (e) => {
356
356
  const rawValue = e.target.value;
357
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
357
358
  if (variant === "currency") {
358
359
  const raw = rawValue.replace(/,/g, "");
359
360
  if (raw === "") {
@@ -372,9 +373,25 @@ var Input = (_a) => {
372
373
  const parts = raw.split(".");
373
374
  const currentDecimals = decimals != null ? decimals : 2;
374
375
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
376
+ const asNumber = Number(raw);
377
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
378
+ const clamped = maxNumber;
379
+ const formattedClamped = formatDecimalValue(
380
+ clamped.toString(),
381
+ currentDecimals
382
+ );
383
+ setInternalValue(formattedClamped);
384
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
385
+ if (onChange) {
386
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
387
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
388
+ });
389
+ onChange(syntheticEvent);
390
+ }
391
+ return;
392
+ }
375
393
  setInternalValue(raw);
376
394
  setDisplayValue(formatCurrencyDisplay(raw));
377
- const asNumber = Number(raw);
378
395
  if (!isNaN(asNumber) && onChange) {
379
396
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
380
397
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -383,6 +400,31 @@ var Input = (_a) => {
383
400
  }
384
401
  return;
385
402
  }
403
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
404
+ const numeric = Number(rawValue);
405
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
406
+ const clamped = maxNumber;
407
+ const formattedClamped = formatDecimalValue(
408
+ clamped.toString(),
409
+ decimals != null ? decimals : 0
410
+ );
411
+ setInternalValue(formattedClamped);
412
+ setDisplayValue(formattedClamped);
413
+ if (typeof onChange === "function") {
414
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
415
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
416
+ });
417
+ onChange(syntheticEvent);
418
+ }
419
+ return;
420
+ }
421
+ setInternalValue(rawValue);
422
+ setDisplayValue(rawValue);
423
+ if (typeof onChange === "function") {
424
+ onChange(e);
425
+ }
426
+ return;
427
+ }
386
428
  setInternalValue(rawValue);
387
429
  setDisplayValue(rawValue);
388
430
  if (typeof onChange === "function") {
@@ -18,13 +18,13 @@ import {
18
18
  } from "./chunk-MDB26F6T.js";
19
19
  import {
20
20
  Select
21
- } from "./chunk-U6W5E3XW.js";
21
+ } from "./chunk-I5BV7UPG.js";
22
22
  import {
23
23
  DataCellHeader,
24
24
  DataGridCell,
25
25
  DragAlongCell,
26
26
  DraggableCellHeader
27
- } from "./chunk-YHFOOBE2.js";
27
+ } from "./chunk-Y3EFHKAG.js";
28
28
  import {
29
29
  Menu
30
30
  } from "./chunk-HGLOO52X.js";
@@ -33,11 +33,11 @@ import {
33
33
  } from "./chunk-EZ4KZYKG.js";
34
34
  import {
35
35
  Search
36
- } from "./chunk-UV53RKAQ.js";
36
+ } from "./chunk-BKBJOF4J.js";
37
37
  import {
38
38
  Input,
39
39
  InputBase
40
- } from "./chunk-PMNNRB6S.js";
40
+ } from "./chunk-NWTVBVBC.js";
41
41
  import {
42
42
  Label
43
43
  } from "./chunk-HXGJVYGQ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-EZ4KZYKG.js";
10
10
  import {
11
11
  Search
12
- } from "./chunk-UV53RKAQ.js";
12
+ } from "./chunk-BKBJOF4J.js";
13
13
  import {
14
14
  CSS
15
15
  } from "./chunk-WVUIIBRR.js";
@@ -1872,7 +1872,7 @@ var Input = (_a) => {
1872
1872
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1873
1873
  setInternalValue(formatted);
1874
1874
  setDisplayValue(formatCurrencyDisplay(formatted));
1875
- }, [variant, propValue, decimals]);
1875
+ }, []);
1876
1876
  const getInputProps = () => {
1877
1877
  var _a2;
1878
1878
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -1957,6 +1957,7 @@ var Input = (_a) => {
1957
1957
  };
1958
1958
  const handleChange = (e) => {
1959
1959
  const rawValue = e.target.value;
1960
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
1960
1961
  if (variant === "currency") {
1961
1962
  const raw = rawValue.replace(/,/g, "");
1962
1963
  if (raw === "") {
@@ -1975,9 +1976,25 @@ var Input = (_a) => {
1975
1976
  const parts = raw.split(".");
1976
1977
  const currentDecimals = decimals != null ? decimals : 2;
1977
1978
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
1979
+ const asNumber = Number(raw);
1980
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
1981
+ const clamped = maxNumber;
1982
+ const formattedClamped = formatDecimalValue(
1983
+ clamped.toString(),
1984
+ currentDecimals
1985
+ );
1986
+ setInternalValue(formattedClamped);
1987
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
1988
+ if (onChange) {
1989
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1990
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1991
+ });
1992
+ onChange(syntheticEvent);
1993
+ }
1994
+ return;
1995
+ }
1978
1996
  setInternalValue(raw);
1979
1997
  setDisplayValue(formatCurrencyDisplay(raw));
1980
- const asNumber = Number(raw);
1981
1998
  if (!isNaN(asNumber) && onChange) {
1982
1999
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1983
2000
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -1986,6 +2003,31 @@ var Input = (_a) => {
1986
2003
  }
1987
2004
  return;
1988
2005
  }
2006
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
2007
+ const numeric = Number(rawValue);
2008
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
2009
+ const clamped = maxNumber;
2010
+ const formattedClamped = formatDecimalValue(
2011
+ clamped.toString(),
2012
+ decimals != null ? decimals : 0
2013
+ );
2014
+ setInternalValue(formattedClamped);
2015
+ setDisplayValue(formattedClamped);
2016
+ if (typeof onChange === "function") {
2017
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2018
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
2019
+ });
2020
+ onChange(syntheticEvent);
2021
+ }
2022
+ return;
2023
+ }
2024
+ setInternalValue(rawValue);
2025
+ setDisplayValue(rawValue);
2026
+ if (typeof onChange === "function") {
2027
+ onChange(e);
2028
+ }
2029
+ return;
2030
+ }
1989
2031
  setInternalValue(rawValue);
1990
2032
  setDisplayValue(rawValue);
1991
2033
  if (typeof onChange === "function") {
@@ -2,7 +2,7 @@ import {
2
2
  CalendarRange,
3
3
  CalendarRange_default,
4
4
  isWeekend
5
- } from "../chunk-UFGH5V7K.js";
5
+ } from "../chunk-RB7F6QWD.js";
6
6
  import "../chunk-M7INAUAJ.js";
7
7
  import "../chunk-ZIPJMN2E.js";
8
8
  import "../chunk-FJFZBIRG.js";
@@ -25,7 +25,7 @@ import "../chunk-L3BXRDLP.js";
25
25
  import "../chunk-34VEVX5H.js";
26
26
  import "../chunk-LB7UT6F3.js";
27
27
  import "../chunk-MDB26F6T.js";
28
- import "../chunk-U6W5E3XW.js";
28
+ import "../chunk-I5BV7UPG.js";
29
29
  import "../chunk-JADOJNBI.js";
30
30
  import "../chunk-4RJKB7LC.js";
31
31
  import "../chunk-WVVEOCEH.js";
@@ -35,12 +35,12 @@ import "../chunk-AKJUBFJK.js";
35
35
  import "../chunk-Z2QAJY5I.js";
36
36
  import "../chunk-BWPNXY7T.js";
37
37
  import "../chunk-QVWYTQKL.js";
38
- import "../chunk-YHFOOBE2.js";
38
+ import "../chunk-Y3EFHKAG.js";
39
39
  import "../chunk-HGLOO52X.js";
40
40
  import "../chunk-MPYAHORM.js";
41
41
  import "../chunk-EZ4KZYKG.js";
42
- import "../chunk-UV53RKAQ.js";
43
- import "../chunk-PMNNRB6S.js";
42
+ import "../chunk-BKBJOF4J.js";
43
+ import "../chunk-NWTVBVBC.js";
44
44
  import "../chunk-HXGJVYGQ.js";
45
45
  import "../chunk-WVUIIBRR.js";
46
46
  import "../chunk-75USUR3I.js";
@@ -1866,7 +1866,7 @@ var Input = (_a) => {
1866
1866
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1867
1867
  setInternalValue(formatted);
1868
1868
  setDisplayValue(formatCurrencyDisplay(formatted));
1869
- }, [variant, propValue, decimals]);
1869
+ }, []);
1870
1870
  const getInputProps = () => {
1871
1871
  var _a2;
1872
1872
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -1951,6 +1951,7 @@ var Input = (_a) => {
1951
1951
  };
1952
1952
  const handleChange = (e) => {
1953
1953
  const rawValue = e.target.value;
1954
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
1954
1955
  if (variant === "currency") {
1955
1956
  const raw = rawValue.replace(/,/g, "");
1956
1957
  if (raw === "") {
@@ -1969,9 +1970,25 @@ var Input = (_a) => {
1969
1970
  const parts = raw.split(".");
1970
1971
  const currentDecimals = decimals != null ? decimals : 2;
1971
1972
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
1973
+ const asNumber = Number(raw);
1974
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
1975
+ const clamped = maxNumber;
1976
+ const formattedClamped = formatDecimalValue(
1977
+ clamped.toString(),
1978
+ currentDecimals
1979
+ );
1980
+ setInternalValue(formattedClamped);
1981
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
1982
+ if (onChange) {
1983
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1984
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1985
+ });
1986
+ onChange(syntheticEvent);
1987
+ }
1988
+ return;
1989
+ }
1972
1990
  setInternalValue(raw);
1973
1991
  setDisplayValue(formatCurrencyDisplay(raw));
1974
- const asNumber = Number(raw);
1975
1992
  if (!isNaN(asNumber) && onChange) {
1976
1993
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1977
1994
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -1980,6 +1997,31 @@ var Input = (_a) => {
1980
1997
  }
1981
1998
  return;
1982
1999
  }
2000
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
2001
+ const numeric = Number(rawValue);
2002
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
2003
+ const clamped = maxNumber;
2004
+ const formattedClamped = formatDecimalValue(
2005
+ clamped.toString(),
2006
+ decimals != null ? decimals : 0
2007
+ );
2008
+ setInternalValue(formattedClamped);
2009
+ setDisplayValue(formattedClamped);
2010
+ if (typeof onChange === "function") {
2011
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2012
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
2013
+ });
2014
+ onChange(syntheticEvent);
2015
+ }
2016
+ return;
2017
+ }
2018
+ setInternalValue(rawValue);
2019
+ setDisplayValue(rawValue);
2020
+ if (typeof onChange === "function") {
2021
+ onChange(e);
2022
+ }
2023
+ return;
2024
+ }
1983
2025
  setInternalValue(rawValue);
1984
2026
  setDisplayValue(rawValue);
1985
2027
  if (typeof onChange === "function") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ColumnSelectorMenuOption
3
- } from "../../../chunk-UFGH5V7K.js";
3
+ } from "../../../chunk-RB7F6QWD.js";
4
4
  import "../../../chunk-M7INAUAJ.js";
5
5
  import "../../../chunk-ZIPJMN2E.js";
6
6
  import "../../../chunk-FJFZBIRG.js";
@@ -23,7 +23,7 @@ import "../../../chunk-L3BXRDLP.js";
23
23
  import "../../../chunk-34VEVX5H.js";
24
24
  import "../../../chunk-LB7UT6F3.js";
25
25
  import "../../../chunk-MDB26F6T.js";
26
- import "../../../chunk-U6W5E3XW.js";
26
+ import "../../../chunk-I5BV7UPG.js";
27
27
  import "../../../chunk-JADOJNBI.js";
28
28
  import "../../../chunk-4RJKB7LC.js";
29
29
  import "../../../chunk-WVVEOCEH.js";
@@ -33,12 +33,12 @@ import "../../../chunk-AKJUBFJK.js";
33
33
  import "../../../chunk-Z2QAJY5I.js";
34
34
  import "../../../chunk-BWPNXY7T.js";
35
35
  import "../../../chunk-QVWYTQKL.js";
36
- import "../../../chunk-YHFOOBE2.js";
36
+ import "../../../chunk-Y3EFHKAG.js";
37
37
  import "../../../chunk-HGLOO52X.js";
38
38
  import "../../../chunk-MPYAHORM.js";
39
39
  import "../../../chunk-EZ4KZYKG.js";
40
- import "../../../chunk-UV53RKAQ.js";
41
- import "../../../chunk-PMNNRB6S.js";
40
+ import "../../../chunk-BKBJOF4J.js";
41
+ import "../../../chunk-NWTVBVBC.js";
42
42
  import "../../../chunk-HXGJVYGQ.js";
43
43
  import "../../../chunk-WVUIIBRR.js";
44
44
  import "../../../chunk-75USUR3I.js";
@@ -1866,7 +1866,7 @@ var Input = (_a) => {
1866
1866
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1867
1867
  setInternalValue(formatted);
1868
1868
  setDisplayValue(formatCurrencyDisplay(formatted));
1869
- }, [variant, propValue, decimals]);
1869
+ }, []);
1870
1870
  const getInputProps = () => {
1871
1871
  var _a2;
1872
1872
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -1951,6 +1951,7 @@ var Input = (_a) => {
1951
1951
  };
1952
1952
  const handleChange = (e) => {
1953
1953
  const rawValue = e.target.value;
1954
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
1954
1955
  if (variant === "currency") {
1955
1956
  const raw = rawValue.replace(/,/g, "");
1956
1957
  if (raw === "") {
@@ -1969,9 +1970,25 @@ var Input = (_a) => {
1969
1970
  const parts = raw.split(".");
1970
1971
  const currentDecimals = decimals != null ? decimals : 2;
1971
1972
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
1973
+ const asNumber = Number(raw);
1974
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
1975
+ const clamped = maxNumber;
1976
+ const formattedClamped = formatDecimalValue(
1977
+ clamped.toString(),
1978
+ currentDecimals
1979
+ );
1980
+ setInternalValue(formattedClamped);
1981
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
1982
+ if (onChange) {
1983
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1984
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1985
+ });
1986
+ onChange(syntheticEvent);
1987
+ }
1988
+ return;
1989
+ }
1972
1990
  setInternalValue(raw);
1973
1991
  setDisplayValue(formatCurrencyDisplay(raw));
1974
- const asNumber = Number(raw);
1975
1992
  if (!isNaN(asNumber) && onChange) {
1976
1993
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1977
1994
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -1980,6 +1997,31 @@ var Input = (_a) => {
1980
1997
  }
1981
1998
  return;
1982
1999
  }
2000
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
2001
+ const numeric = Number(rawValue);
2002
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
2003
+ const clamped = maxNumber;
2004
+ const formattedClamped = formatDecimalValue(
2005
+ clamped.toString(),
2006
+ decimals != null ? decimals : 0
2007
+ );
2008
+ setInternalValue(formattedClamped);
2009
+ setDisplayValue(formattedClamped);
2010
+ if (typeof onChange === "function") {
2011
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2012
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
2013
+ });
2014
+ onChange(syntheticEvent);
2015
+ }
2016
+ return;
2017
+ }
2018
+ setInternalValue(rawValue);
2019
+ setDisplayValue(rawValue);
2020
+ if (typeof onChange === "function") {
2021
+ onChange(e);
2022
+ }
2023
+ return;
2024
+ }
1983
2025
  setInternalValue(rawValue);
1984
2026
  setDisplayValue(rawValue);
1985
2027
  if (typeof onChange === "function") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ColumnSelectorHeaderCell
3
- } from "../../../chunk-UFGH5V7K.js";
3
+ } from "../../../chunk-RB7F6QWD.js";
4
4
  import "../../../chunk-M7INAUAJ.js";
5
5
  import "../../../chunk-ZIPJMN2E.js";
6
6
  import "../../../chunk-FJFZBIRG.js";
@@ -23,7 +23,7 @@ import "../../../chunk-L3BXRDLP.js";
23
23
  import "../../../chunk-34VEVX5H.js";
24
24
  import "../../../chunk-LB7UT6F3.js";
25
25
  import "../../../chunk-MDB26F6T.js";
26
- import "../../../chunk-U6W5E3XW.js";
26
+ import "../../../chunk-I5BV7UPG.js";
27
27
  import "../../../chunk-JADOJNBI.js";
28
28
  import "../../../chunk-4RJKB7LC.js";
29
29
  import "../../../chunk-WVVEOCEH.js";
@@ -33,12 +33,12 @@ import "../../../chunk-AKJUBFJK.js";
33
33
  import "../../../chunk-Z2QAJY5I.js";
34
34
  import "../../../chunk-BWPNXY7T.js";
35
35
  import "../../../chunk-QVWYTQKL.js";
36
- import "../../../chunk-YHFOOBE2.js";
36
+ import "../../../chunk-Y3EFHKAG.js";
37
37
  import "../../../chunk-HGLOO52X.js";
38
38
  import "../../../chunk-MPYAHORM.js";
39
39
  import "../../../chunk-EZ4KZYKG.js";
40
- import "../../../chunk-UV53RKAQ.js";
41
- import "../../../chunk-PMNNRB6S.js";
40
+ import "../../../chunk-BKBJOF4J.js";
41
+ import "../../../chunk-NWTVBVBC.js";
42
42
  import "../../../chunk-HXGJVYGQ.js";
43
43
  import "../../../chunk-WVUIIBRR.js";
44
44
  import "../../../chunk-75USUR3I.js";
@@ -1866,7 +1866,7 @@ var Input = (_a) => {
1866
1866
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1867
1867
  setInternalValue(formatted);
1868
1868
  setDisplayValue(formatCurrencyDisplay(formatted));
1869
- }, [variant, propValue, decimals]);
1869
+ }, []);
1870
1870
  const getInputProps = () => {
1871
1871
  var _a2;
1872
1872
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -1951,6 +1951,7 @@ var Input = (_a) => {
1951
1951
  };
1952
1952
  const handleChange = (e) => {
1953
1953
  const rawValue = e.target.value;
1954
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
1954
1955
  if (variant === "currency") {
1955
1956
  const raw = rawValue.replace(/,/g, "");
1956
1957
  if (raw === "") {
@@ -1969,9 +1970,25 @@ var Input = (_a) => {
1969
1970
  const parts = raw.split(".");
1970
1971
  const currentDecimals = decimals != null ? decimals : 2;
1971
1972
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
1973
+ const asNumber = Number(raw);
1974
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
1975
+ const clamped = maxNumber;
1976
+ const formattedClamped = formatDecimalValue(
1977
+ clamped.toString(),
1978
+ currentDecimals
1979
+ );
1980
+ setInternalValue(formattedClamped);
1981
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
1982
+ if (onChange) {
1983
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1984
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1985
+ });
1986
+ onChange(syntheticEvent);
1987
+ }
1988
+ return;
1989
+ }
1972
1990
  setInternalValue(raw);
1973
1991
  setDisplayValue(formatCurrencyDisplay(raw));
1974
- const asNumber = Number(raw);
1975
1992
  if (!isNaN(asNumber) && onChange) {
1976
1993
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1977
1994
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -1980,6 +1997,31 @@ var Input = (_a) => {
1980
1997
  }
1981
1998
  return;
1982
1999
  }
2000
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
2001
+ const numeric = Number(rawValue);
2002
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
2003
+ const clamped = maxNumber;
2004
+ const formattedClamped = formatDecimalValue(
2005
+ clamped.toString(),
2006
+ decimals != null ? decimals : 0
2007
+ );
2008
+ setInternalValue(formattedClamped);
2009
+ setDisplayValue(formattedClamped);
2010
+ if (typeof onChange === "function") {
2011
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2012
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
2013
+ });
2014
+ onChange(syntheticEvent);
2015
+ }
2016
+ return;
2017
+ }
2018
+ setInternalValue(rawValue);
2019
+ setDisplayValue(rawValue);
2020
+ if (typeof onChange === "function") {
2021
+ onChange(e);
2022
+ }
2023
+ return;
2024
+ }
1983
2025
  setInternalValue(rawValue);
1984
2026
  setDisplayValue(rawValue);
1985
2027
  if (typeof onChange === "function") {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PinnedColumns
3
- } from "../../chunk-UFGH5V7K.js";
3
+ } from "../../chunk-RB7F6QWD.js";
4
4
  import "../../chunk-M7INAUAJ.js";
5
5
  import "../../chunk-ZIPJMN2E.js";
6
6
  import "../../chunk-FJFZBIRG.js";
@@ -23,7 +23,7 @@ import "../../chunk-L3BXRDLP.js";
23
23
  import "../../chunk-34VEVX5H.js";
24
24
  import "../../chunk-LB7UT6F3.js";
25
25
  import "../../chunk-MDB26F6T.js";
26
- import "../../chunk-U6W5E3XW.js";
26
+ import "../../chunk-I5BV7UPG.js";
27
27
  import "../../chunk-JADOJNBI.js";
28
28
  import "../../chunk-4RJKB7LC.js";
29
29
  import "../../chunk-WVVEOCEH.js";
@@ -33,12 +33,12 @@ import "../../chunk-AKJUBFJK.js";
33
33
  import "../../chunk-Z2QAJY5I.js";
34
34
  import "../../chunk-BWPNXY7T.js";
35
35
  import "../../chunk-QVWYTQKL.js";
36
- import "../../chunk-YHFOOBE2.js";
36
+ import "../../chunk-Y3EFHKAG.js";
37
37
  import "../../chunk-HGLOO52X.js";
38
38
  import "../../chunk-MPYAHORM.js";
39
39
  import "../../chunk-EZ4KZYKG.js";
40
- import "../../chunk-UV53RKAQ.js";
41
- import "../../chunk-PMNNRB6S.js";
40
+ import "../../chunk-BKBJOF4J.js";
41
+ import "../../chunk-NWTVBVBC.js";
42
42
  import "../../chunk-HXGJVYGQ.js";
43
43
  import "../../chunk-WVUIIBRR.js";
44
44
  import "../../chunk-75USUR3I.js";
@@ -1865,7 +1865,7 @@ var Input = (_a) => {
1865
1865
  const formatted = formatDecimalValue(stringValue, decimals != null ? decimals : 2);
1866
1866
  setInternalValue(formatted);
1867
1867
  setDisplayValue(formatCurrencyDisplay(formatted));
1868
- }, [variant, propValue, decimals]);
1868
+ }, []);
1869
1869
  const getInputProps = () => {
1870
1870
  var _a2;
1871
1871
  const baseProps = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props), {
@@ -1950,6 +1950,7 @@ var Input = (_a) => {
1950
1950
  };
1951
1951
  const handleChange = (e) => {
1952
1952
  const rawValue = e.target.value;
1953
+ const maxNumber = props.max != null ? Number(String(props.max).replace(/,/g, "")) : void 0;
1953
1954
  if (variant === "currency") {
1954
1955
  const raw = rawValue.replace(/,/g, "");
1955
1956
  if (raw === "") {
@@ -1968,9 +1969,25 @@ var Input = (_a) => {
1968
1969
  const parts = raw.split(".");
1969
1970
  const currentDecimals = decimals != null ? decimals : 2;
1970
1971
  if (parts.length === 2 && parts[1].length > currentDecimals) return;
1972
+ const asNumber = Number(raw);
1973
+ if (!isNaN(asNumber) && maxNumber != null && asNumber > maxNumber) {
1974
+ const clamped = maxNumber;
1975
+ const formattedClamped = formatDecimalValue(
1976
+ clamped.toString(),
1977
+ currentDecimals
1978
+ );
1979
+ setInternalValue(formattedClamped);
1980
+ setDisplayValue(formatCurrencyDisplay(formattedClamped));
1981
+ if (onChange) {
1982
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1983
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
1984
+ });
1985
+ onChange(syntheticEvent);
1986
+ }
1987
+ return;
1988
+ }
1971
1989
  setInternalValue(raw);
1972
1990
  setDisplayValue(formatCurrencyDisplay(raw));
1973
- const asNumber = Number(raw);
1974
1991
  if (!isNaN(asNumber) && onChange) {
1975
1992
  const syntheticEvent = __spreadProps(__spreadValues({}, e), {
1976
1993
  target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
@@ -1979,6 +1996,31 @@ var Input = (_a) => {
1979
1996
  }
1980
1997
  return;
1981
1998
  }
1999
+ if ((variant === "percentage" || variant === "uom") && e.target.type === "number") {
2000
+ const numeric = Number(rawValue);
2001
+ if (!isNaN(numeric) && maxNumber != null && numeric > maxNumber) {
2002
+ const clamped = maxNumber;
2003
+ const formattedClamped = formatDecimalValue(
2004
+ clamped.toString(),
2005
+ decimals != null ? decimals : 0
2006
+ );
2007
+ setInternalValue(formattedClamped);
2008
+ setDisplayValue(formattedClamped);
2009
+ if (typeof onChange === "function") {
2010
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
2011
+ target: __spreadProps(__spreadValues({}, e.target), { value: clamped.toString() })
2012
+ });
2013
+ onChange(syntheticEvent);
2014
+ }
2015
+ return;
2016
+ }
2017
+ setInternalValue(rawValue);
2018
+ setDisplayValue(rawValue);
2019
+ if (typeof onChange === "function") {
2020
+ onChange(e);
2021
+ }
2022
+ return;
2023
+ }
1982
2024
  setInternalValue(rawValue);
1983
2025
  setDisplayValue(rawValue);
1984
2026
  if (typeof onChange === "function") {