@pdg/react-form 1.2.14 → 1.2.15

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { PFormRowProps as Props } from './PFormRow.types';
3
- declare const PFormRow: ({ ref, variant: initVariant, size: initSize, color: initColor, spacing: initSpacing, focused: initFocused, labelShrink: initLabelShrink, fullWidth: initFullWidth, icon, label, line, lineVerticalMargin, fullHeight, hidden, error, warning, helperText, children, className, style: initStyle, sx, }: Props) => React.JSX.Element;
3
+ declare const PFormRow: ({ ref, variant: initVariant, size: initSize, color: initColor, spacing: initSpacing, focused: initFocused, labelShrink: initLabelShrink, fullWidth: initFullWidth, icon, label, line, lineVerticalMargin, fullHeight, endAdornment, hidden, error, warning, helperText, children, className, style: initStyle, sx, }: Props) => React.JSX.Element;
4
4
  export default PFormRow;
@@ -7,6 +7,7 @@ export interface PFormRowProps extends PCommonSxProps, PartialPick<PFormContextV
7
7
  ref?: React.Ref<HTMLDivElement>;
8
8
  fullHeight?: boolean;
9
9
  helperText?: ReactNode;
10
+ endAdornment?: ReactNode;
10
11
  }
11
12
  export interface PFormColsInRowMap {
12
13
  [key: string]: number | undefined;
package/dist/index.esm.js CHANGED
@@ -1648,7 +1648,7 @@ var PFormBlock = function PFormBlock(t0) {
1648
1648
  };var _templateObject$g;
1649
1649
  var StyledWrapGrid = styled(Grid)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: 100%;\n"])));var _excluded$A = ["variant", "size", "color", "spacing", "focused", "labelShrink", "fullWidth"];
1650
1650
  var PFormRow = function PFormRow(t0) {
1651
- var $ = c(73);
1651
+ var $ = c(74);
1652
1652
  var ref = t0.ref,
1653
1653
  initVariant = t0.variant,
1654
1654
  initSize = t0.size,
@@ -1662,6 +1662,7 @@ var PFormRow = function PFormRow(t0) {
1662
1662
  line = t0.line,
1663
1663
  lineVerticalMargin = t0.lineVerticalMargin,
1664
1664
  fullHeight = t0.fullHeight,
1665
+ endAdornment = t0.endAdornment,
1665
1666
  hidden = t0.hidden,
1666
1667
  error = t0.error,
1667
1668
  warning = t0.warning,
@@ -1843,7 +1844,7 @@ var PFormRow = function PFormRow(t0) {
1843
1844
  t9 = $[31];
1844
1845
  }
1845
1846
  var t10;
1846
- if ($[32] !== className || $[33] !== color || $[34] !== error || $[35] !== hidden || $[36] !== icon || $[37] !== label || $[38] !== line || $[39] !== lineVerticalMargin || $[40] !== size || $[41] !== warning) {
1847
+ if ($[32] !== className || $[33] !== color || $[34] !== endAdornment || $[35] !== error || $[36] !== hidden || $[37] !== icon || $[38] !== label || $[39] !== line || $[40] !== lineVerticalMargin || $[41] !== size || $[42] !== warning) {
1847
1848
  t10 = (icon || label || line) && /*#__PURE__*/React.createElement(PFormDivider, {
1848
1849
  className: classNames(className, "PFormRow-header"),
1849
1850
  size: size,
@@ -1854,55 +1855,57 @@ var PFormRow = function PFormRow(t0) {
1854
1855
  error: error,
1855
1856
  warning: warning,
1856
1857
  lineVerticalMargin: lineVerticalMargin,
1857
- hidden: hidden
1858
+ hidden: hidden,
1859
+ endAdornment: endAdornment
1858
1860
  });
1859
1861
  $[32] = className;
1860
1862
  $[33] = color;
1861
- $[34] = error;
1862
- $[35] = hidden;
1863
- $[36] = icon;
1864
- $[37] = label;
1865
- $[38] = line;
1866
- $[39] = lineVerticalMargin;
1867
- $[40] = size;
1868
- $[41] = warning;
1869
- $[42] = t10;
1863
+ $[34] = endAdornment;
1864
+ $[35] = error;
1865
+ $[36] = hidden;
1866
+ $[37] = icon;
1867
+ $[38] = label;
1868
+ $[39] = line;
1869
+ $[40] = lineVerticalMargin;
1870
+ $[41] = size;
1871
+ $[42] = warning;
1872
+ $[43] = t10;
1870
1873
  } else {
1871
- t10 = $[42];
1874
+ t10 = $[43];
1872
1875
  }
1873
1876
  var t11;
1874
- if ($[43] === Symbol["for"]("react.memo_cache_sentinel")) {
1877
+ if ($[44] === Symbol["for"]("react.memo_cache_sentinel")) {
1875
1878
  t11 = {
1876
1879
  xs: 12
1877
1880
  };
1878
- $[43] = t11;
1881
+ $[44] = t11;
1879
1882
  } else {
1880
- t11 = $[43];
1883
+ t11 = $[44];
1881
1884
  }
1882
1885
  var t12;
1883
- if ($[44] !== fullHeight) {
1886
+ if ($[45] !== fullHeight) {
1884
1887
  t12 = fullHeight ? {
1885
1888
  height: "100%"
1886
1889
  } : undefined;
1887
- $[44] = fullHeight;
1888
- $[45] = t12;
1890
+ $[45] = fullHeight;
1891
+ $[46] = t12;
1889
1892
  } else {
1890
- t12 = $[45];
1893
+ t12 = $[46];
1891
1894
  }
1892
1895
  var t13 = fullHeight ? "100%" : undefined;
1893
1896
  var t14;
1894
- if ($[46] !== t13) {
1897
+ if ($[47] !== t13) {
1895
1898
  t14 = {
1896
1899
  flexWrap: "nowrap",
1897
1900
  height: t13
1898
1901
  };
1899
- $[46] = t13;
1900
- $[47] = t14;
1902
+ $[47] = t13;
1903
+ $[48] = t14;
1901
1904
  } else {
1902
- t14 = $[47];
1905
+ t14 = $[48];
1903
1906
  }
1904
1907
  var t15;
1905
- if ($[48] !== children || $[49] !== spacing || $[50] !== t14) {
1908
+ if ($[49] !== children || $[50] !== spacing || $[51] !== t14) {
1906
1909
  t15 = /*#__PURE__*/React.createElement(Grid, {
1907
1910
  className: "PFormRow-content",
1908
1911
  container: true,
@@ -1910,57 +1913,57 @@ var PFormRow = function PFormRow(t0) {
1910
1913
  direction: "row",
1911
1914
  style: t14
1912
1915
  }, children);
1913
- $[48] = children;
1914
- $[49] = spacing;
1915
- $[50] = t14;
1916
- $[51] = t15;
1916
+ $[49] = children;
1917
+ $[50] = spacing;
1918
+ $[51] = t14;
1919
+ $[52] = t15;
1917
1920
  } else {
1918
- t15 = $[51];
1921
+ t15 = $[52];
1919
1922
  }
1920
1923
  var t16;
1921
- if ($[52] !== error || $[53] !== helperText) {
1924
+ if ($[53] !== error || $[54] !== helperText) {
1922
1925
  t16 = helperText && /*#__PURE__*/React.createElement(FormHelperText, {
1923
1926
  className: "PFormRow-helper-text",
1924
1927
  component: "div",
1925
1928
  error: error
1926
1929
  }, helperText);
1927
- $[52] = error;
1928
- $[53] = helperText;
1929
- $[54] = t16;
1930
+ $[53] = error;
1931
+ $[54] = helperText;
1932
+ $[55] = t16;
1930
1933
  } else {
1931
- t16 = $[54];
1934
+ t16 = $[55];
1932
1935
  }
1933
1936
  var t17;
1934
- if ($[55] !== t12 || $[56] !== t15 || $[57] !== t16) {
1937
+ if ($[56] !== t12 || $[57] !== t15 || $[58] !== t16) {
1935
1938
  t17 = /*#__PURE__*/React.createElement(StyledWrapGrid, {
1936
1939
  size: t11,
1937
1940
  className: "PFormRow-body",
1938
1941
  style: t12
1939
1942
  }, t15, t16);
1940
- $[55] = t12;
1941
- $[56] = t15;
1942
- $[57] = t16;
1943
- $[58] = t17;
1943
+ $[56] = t12;
1944
+ $[57] = t15;
1945
+ $[58] = t16;
1946
+ $[59] = t17;
1944
1947
  } else {
1945
- t17 = $[58];
1948
+ t17 = $[59];
1946
1949
  }
1947
1950
  var t18;
1948
- if ($[59] !== spacing || $[60] !== t10 || $[61] !== t17 || $[62] !== t9) {
1951
+ if ($[60] !== spacing || $[61] !== t10 || $[62] !== t17 || $[63] !== t9) {
1949
1952
  t18 = /*#__PURE__*/React.createElement(Grid, {
1950
1953
  container: true,
1951
1954
  spacing: spacing,
1952
1955
  style: t9
1953
1956
  }, t10, t17);
1954
- $[59] = spacing;
1955
- $[60] = t10;
1956
- $[61] = t17;
1957
- $[62] = t9;
1958
- $[63] = t18;
1957
+ $[60] = spacing;
1958
+ $[61] = t10;
1959
+ $[62] = t17;
1960
+ $[63] = t9;
1961
+ $[64] = t18;
1959
1962
  } else {
1960
- t18 = $[63];
1963
+ t18 = $[64];
1961
1964
  }
1962
1965
  var t19;
1963
- if ($[64] !== ref || $[65] !== style_0 || $[66] !== sx || $[67] !== t18 || $[68] !== t8) {
1966
+ if ($[65] !== ref || $[66] !== style_0 || $[67] !== sx || $[68] !== t18 || $[69] !== t8) {
1964
1967
  t19 = /*#__PURE__*/React.createElement(Grid, {
1965
1968
  ref: ref,
1966
1969
  size: t7,
@@ -1968,25 +1971,25 @@ var PFormRow = function PFormRow(t0) {
1968
1971
  style: style_0,
1969
1972
  sx: sx
1970
1973
  }, t18);
1971
- $[64] = ref;
1972
- $[65] = style_0;
1973
- $[66] = sx;
1974
- $[67] = t18;
1975
- $[68] = t8;
1976
- $[69] = t19;
1974
+ $[65] = ref;
1975
+ $[66] = style_0;
1976
+ $[67] = sx;
1977
+ $[68] = t18;
1978
+ $[69] = t8;
1979
+ $[70] = t19;
1977
1980
  } else {
1978
- t19 = $[69];
1981
+ t19 = $[70];
1979
1982
  }
1980
1983
  var t20;
1981
- if ($[70] !== t19 || $[71] !== t6) {
1984
+ if ($[71] !== t19 || $[72] !== t6) {
1982
1985
  t20 = /*#__PURE__*/React.createElement(PFormContextProvider, {
1983
1986
  value: t6
1984
1987
  }, t19);
1985
- $[70] = t19;
1986
- $[71] = t6;
1987
- $[72] = t20;
1988
+ $[71] = t19;
1989
+ $[72] = t6;
1990
+ $[73] = t20;
1988
1991
  } else {
1989
- t20 = $[72];
1992
+ t20 = $[73];
1990
1993
  }
1991
1994
  return t20;
1992
1995
  };var _templateObject$f, _templateObject2$8, _templateObject3$4;
package/dist/index.js CHANGED
@@ -1648,7 +1648,7 @@ var PFormBlock = function PFormBlock(t0) {
1648
1648
  };var _templateObject$g;
1649
1649
  var StyledWrapGrid = material.styled(material.Grid)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: 100%;\n"])));var _excluded$A = ["variant", "size", "color", "spacing", "focused", "labelShrink", "fullWidth"];
1650
1650
  var PFormRow = function PFormRow(t0) {
1651
- var $ = compilerRuntime.c(73);
1651
+ var $ = compilerRuntime.c(74);
1652
1652
  var ref = t0.ref,
1653
1653
  initVariant = t0.variant,
1654
1654
  initSize = t0.size,
@@ -1662,6 +1662,7 @@ var PFormRow = function PFormRow(t0) {
1662
1662
  line = t0.line,
1663
1663
  lineVerticalMargin = t0.lineVerticalMargin,
1664
1664
  fullHeight = t0.fullHeight,
1665
+ endAdornment = t0.endAdornment,
1665
1666
  hidden = t0.hidden,
1666
1667
  error = t0.error,
1667
1668
  warning = t0.warning,
@@ -1843,7 +1844,7 @@ var PFormRow = function PFormRow(t0) {
1843
1844
  t9 = $[31];
1844
1845
  }
1845
1846
  var t10;
1846
- if ($[32] !== className || $[33] !== color || $[34] !== error || $[35] !== hidden || $[36] !== icon || $[37] !== label || $[38] !== line || $[39] !== lineVerticalMargin || $[40] !== size || $[41] !== warning) {
1847
+ if ($[32] !== className || $[33] !== color || $[34] !== endAdornment || $[35] !== error || $[36] !== hidden || $[37] !== icon || $[38] !== label || $[39] !== line || $[40] !== lineVerticalMargin || $[41] !== size || $[42] !== warning) {
1847
1848
  t10 = (icon || label || line) && /*#__PURE__*/React.createElement(PFormDivider, {
1848
1849
  className: classNames(className, "PFormRow-header"),
1849
1850
  size: size,
@@ -1854,55 +1855,57 @@ var PFormRow = function PFormRow(t0) {
1854
1855
  error: error,
1855
1856
  warning: warning,
1856
1857
  lineVerticalMargin: lineVerticalMargin,
1857
- hidden: hidden
1858
+ hidden: hidden,
1859
+ endAdornment: endAdornment
1858
1860
  });
1859
1861
  $[32] = className;
1860
1862
  $[33] = color;
1861
- $[34] = error;
1862
- $[35] = hidden;
1863
- $[36] = icon;
1864
- $[37] = label;
1865
- $[38] = line;
1866
- $[39] = lineVerticalMargin;
1867
- $[40] = size;
1868
- $[41] = warning;
1869
- $[42] = t10;
1863
+ $[34] = endAdornment;
1864
+ $[35] = error;
1865
+ $[36] = hidden;
1866
+ $[37] = icon;
1867
+ $[38] = label;
1868
+ $[39] = line;
1869
+ $[40] = lineVerticalMargin;
1870
+ $[41] = size;
1871
+ $[42] = warning;
1872
+ $[43] = t10;
1870
1873
  } else {
1871
- t10 = $[42];
1874
+ t10 = $[43];
1872
1875
  }
1873
1876
  var t11;
1874
- if ($[43] === Symbol["for"]("react.memo_cache_sentinel")) {
1877
+ if ($[44] === Symbol["for"]("react.memo_cache_sentinel")) {
1875
1878
  t11 = {
1876
1879
  xs: 12
1877
1880
  };
1878
- $[43] = t11;
1881
+ $[44] = t11;
1879
1882
  } else {
1880
- t11 = $[43];
1883
+ t11 = $[44];
1881
1884
  }
1882
1885
  var t12;
1883
- if ($[44] !== fullHeight) {
1886
+ if ($[45] !== fullHeight) {
1884
1887
  t12 = fullHeight ? {
1885
1888
  height: "100%"
1886
1889
  } : undefined;
1887
- $[44] = fullHeight;
1888
- $[45] = t12;
1890
+ $[45] = fullHeight;
1891
+ $[46] = t12;
1889
1892
  } else {
1890
- t12 = $[45];
1893
+ t12 = $[46];
1891
1894
  }
1892
1895
  var t13 = fullHeight ? "100%" : undefined;
1893
1896
  var t14;
1894
- if ($[46] !== t13) {
1897
+ if ($[47] !== t13) {
1895
1898
  t14 = {
1896
1899
  flexWrap: "nowrap",
1897
1900
  height: t13
1898
1901
  };
1899
- $[46] = t13;
1900
- $[47] = t14;
1902
+ $[47] = t13;
1903
+ $[48] = t14;
1901
1904
  } else {
1902
- t14 = $[47];
1905
+ t14 = $[48];
1903
1906
  }
1904
1907
  var t15;
1905
- if ($[48] !== children || $[49] !== spacing || $[50] !== t14) {
1908
+ if ($[49] !== children || $[50] !== spacing || $[51] !== t14) {
1906
1909
  t15 = /*#__PURE__*/React.createElement(material.Grid, {
1907
1910
  className: "PFormRow-content",
1908
1911
  container: true,
@@ -1910,57 +1913,57 @@ var PFormRow = function PFormRow(t0) {
1910
1913
  direction: "row",
1911
1914
  style: t14
1912
1915
  }, children);
1913
- $[48] = children;
1914
- $[49] = spacing;
1915
- $[50] = t14;
1916
- $[51] = t15;
1916
+ $[49] = children;
1917
+ $[50] = spacing;
1918
+ $[51] = t14;
1919
+ $[52] = t15;
1917
1920
  } else {
1918
- t15 = $[51];
1921
+ t15 = $[52];
1919
1922
  }
1920
1923
  var t16;
1921
- if ($[52] !== error || $[53] !== helperText) {
1924
+ if ($[53] !== error || $[54] !== helperText) {
1922
1925
  t16 = helperText && /*#__PURE__*/React.createElement(material.FormHelperText, {
1923
1926
  className: "PFormRow-helper-text",
1924
1927
  component: "div",
1925
1928
  error: error
1926
1929
  }, helperText);
1927
- $[52] = error;
1928
- $[53] = helperText;
1929
- $[54] = t16;
1930
+ $[53] = error;
1931
+ $[54] = helperText;
1932
+ $[55] = t16;
1930
1933
  } else {
1931
- t16 = $[54];
1934
+ t16 = $[55];
1932
1935
  }
1933
1936
  var t17;
1934
- if ($[55] !== t12 || $[56] !== t15 || $[57] !== t16) {
1937
+ if ($[56] !== t12 || $[57] !== t15 || $[58] !== t16) {
1935
1938
  t17 = /*#__PURE__*/React.createElement(StyledWrapGrid, {
1936
1939
  size: t11,
1937
1940
  className: "PFormRow-body",
1938
1941
  style: t12
1939
1942
  }, t15, t16);
1940
- $[55] = t12;
1941
- $[56] = t15;
1942
- $[57] = t16;
1943
- $[58] = t17;
1943
+ $[56] = t12;
1944
+ $[57] = t15;
1945
+ $[58] = t16;
1946
+ $[59] = t17;
1944
1947
  } else {
1945
- t17 = $[58];
1948
+ t17 = $[59];
1946
1949
  }
1947
1950
  var t18;
1948
- if ($[59] !== spacing || $[60] !== t10 || $[61] !== t17 || $[62] !== t9) {
1951
+ if ($[60] !== spacing || $[61] !== t10 || $[62] !== t17 || $[63] !== t9) {
1949
1952
  t18 = /*#__PURE__*/React.createElement(material.Grid, {
1950
1953
  container: true,
1951
1954
  spacing: spacing,
1952
1955
  style: t9
1953
1956
  }, t10, t17);
1954
- $[59] = spacing;
1955
- $[60] = t10;
1956
- $[61] = t17;
1957
- $[62] = t9;
1958
- $[63] = t18;
1957
+ $[60] = spacing;
1958
+ $[61] = t10;
1959
+ $[62] = t17;
1960
+ $[63] = t9;
1961
+ $[64] = t18;
1959
1962
  } else {
1960
- t18 = $[63];
1963
+ t18 = $[64];
1961
1964
  }
1962
1965
  var t19;
1963
- if ($[64] !== ref || $[65] !== style_0 || $[66] !== sx || $[67] !== t18 || $[68] !== t8) {
1966
+ if ($[65] !== ref || $[66] !== style_0 || $[67] !== sx || $[68] !== t18 || $[69] !== t8) {
1964
1967
  t19 = /*#__PURE__*/React.createElement(material.Grid, {
1965
1968
  ref: ref,
1966
1969
  size: t7,
@@ -1968,25 +1971,25 @@ var PFormRow = function PFormRow(t0) {
1968
1971
  style: style_0,
1969
1972
  sx: sx
1970
1973
  }, t18);
1971
- $[64] = ref;
1972
- $[65] = style_0;
1973
- $[66] = sx;
1974
- $[67] = t18;
1975
- $[68] = t8;
1976
- $[69] = t19;
1974
+ $[65] = ref;
1975
+ $[66] = style_0;
1976
+ $[67] = sx;
1977
+ $[68] = t18;
1978
+ $[69] = t8;
1979
+ $[70] = t19;
1977
1980
  } else {
1978
- t19 = $[69];
1981
+ t19 = $[70];
1979
1982
  }
1980
1983
  var t20;
1981
- if ($[70] !== t19 || $[71] !== t6) {
1984
+ if ($[71] !== t19 || $[72] !== t6) {
1982
1985
  t20 = /*#__PURE__*/React.createElement(PFormContextProvider, {
1983
1986
  value: t6
1984
1987
  }, t19);
1985
- $[70] = t19;
1986
- $[71] = t6;
1987
- $[72] = t20;
1988
+ $[71] = t19;
1989
+ $[72] = t6;
1990
+ $[73] = t20;
1988
1991
  } else {
1989
- t20 = $[72];
1992
+ t20 = $[73];
1990
1993
  }
1991
1994
  return t20;
1992
1995
  };var _templateObject$f, _templateObject2$8, _templateObject3$4;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pdg/react-form",
3
3
  "title": "Typescript React Form Module",
4
4
  "description": "Typescript React Form Module",
5
- "version": "1.2.14",
5
+ "version": "1.2.15",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/index.esm.js",