@helpdice/ui 2.6.0-beta.0 → 2.6.0-beta.2

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.
@@ -970,88 +970,6 @@ var withScale = function withScale(Render) {
970
970
  return ScaleFC;
971
971
  };
972
972
 
973
- var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
974
- var children = _ref.children,
975
- _ref$required = _ref.required,
976
- required = _ref$required === void 0 ? false : _ref$required;
977
- var theme$1 = theme.useTheme();
978
- var _useScale = useScale(),
979
- SCALES = _useScale.SCALES;
980
- return /*#__PURE__*/jsxRuntime.jsxs("label", {
981
- className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
982
- children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
983
- className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
984
- children: "*"
985
- }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
986
- id: "588038827",
987
- dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
988
- children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
989
- })]
990
- });
991
- };
992
- InputBlockLabelComponent.displayName = 'InputBlockLabel';
993
- var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
994
-
995
- var InputIconComponent = function InputIconComponent(_ref) {
996
- var icon = _ref.icon,
997
- _ref$clickable = _ref.clickable,
998
- clickable = _ref$clickable === void 0 ? false : _ref$clickable,
999
- onClick = _ref.onClick;
1000
- return /*#__PURE__*/jsxRuntime.jsxs("span", {
1001
- onClick: onClick,
1002
- className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
1003
- children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1004
- id: "4247656379",
1005
- dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
1006
- children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
1007
- })]
1008
- });
1009
- };
1010
- InputIconComponent.displayName = 'InputIcon';
1011
- var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
1012
-
1013
- var InputIconClear = function InputIconClear(_ref) {
1014
- var onClick = _ref.onClick,
1015
- disabled = _ref.disabled,
1016
- visible = _ref.visible;
1017
- var theme$1 = theme.useTheme();
1018
- var classes = theme.useClasses('clear-icon', {
1019
- visible: visible
1020
- });
1021
- var clickHandler = function clickHandler(event) {
1022
- event.preventDefault();
1023
- event.stopPropagation();
1024
- event.nativeEvent.stopImmediatePropagation();
1025
- onClick && onClick(event);
1026
- };
1027
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
1028
- onClick: clickHandler,
1029
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
1030
- children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
1031
- viewBox: "0 0 24 24",
1032
- stroke: "currentColor",
1033
- strokeWidth: "1.5",
1034
- strokeLinecap: "round",
1035
- strokeLinejoin: "round",
1036
- fill: "none",
1037
- shapeRendering: "geometricPrecision",
1038
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
1039
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1040
- d: "M18 6L6 18",
1041
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
1042
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
1043
- d: "M6 6l12 12",
1044
- className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
1045
- })]
1046
- }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1047
- id: "1567030211",
1048
- dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
1049
- children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
1050
- })]
1051
- });
1052
- };
1053
- var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
1054
-
1055
973
  var _excluded$i = ["children", "tag", "className", "color"];
1056
974
  var getTypeColor = function getTypeColor(type, palette) {
1057
975
  var colors = {
@@ -1899,6 +1817,104 @@ var TextComponent = function TextComponent(_ref) {
1899
1817
  TextComponent.displayName = 'Text';
1900
1818
  var Text = withScale(TextComponent);
1901
1819
 
1820
+ var InputError = function InputError(_ref) {
1821
+ var text = _ref.text,
1822
+ error = _ref.error;
1823
+ return /*#__PURE__*/jsxRuntime.jsxs(Text, {
1824
+ font: 0.8,
1825
+ style: {
1826
+ marginTop: 0.4,
1827
+ marginRight: 0,
1828
+ marginLeft: 0,
1829
+ marginBottom: '0.4rem',
1830
+ textAlign: 'left'
1831
+ },
1832
+ color: error ? "error" : 'default',
1833
+ children: ["\xA0", text]
1834
+ });
1835
+ };
1836
+ var InputBlockLabelComponent = function InputBlockLabelComponent(_ref2) {
1837
+ var children = _ref2.children,
1838
+ _ref2$required = _ref2.required,
1839
+ required = _ref2$required === void 0 ? false : _ref2$required;
1840
+ var theme$1 = theme.useTheme();
1841
+ var _useScale = useScale(),
1842
+ SCALES = _useScale.SCALES;
1843
+ return /*#__PURE__*/jsxRuntime.jsxs("label", {
1844
+ className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]),
1845
+ children: [children, required && /*#__PURE__*/jsxRuntime.jsx("span", {
1846
+ className: _JSXStyle.dynamic([["588038827", [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)]]]) + " " + "mark-error",
1847
+ children: "*"
1848
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1849
+ id: "588038827",
1850
+ dynamic: [typeof children === "string" ? 'block' : 'flex', theme$1.palette.accents_6, theme$1.palette.errorDark, SCALES.font(1.2)],
1851
+ children: "label.__jsx-style-dynamic-selector{display:".concat(typeof children === "string" ? 'block' : 'flex', ";font-weight:normal;color:").concat(theme$1.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector .mark-error.__jsx-style-dynamic-selector{color:").concat(theme$1.palette.errorDark, ";margin:0px 3px;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;font-size:").concat(SCALES.font(1.2), ";}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")
1852
+ })]
1853
+ });
1854
+ };
1855
+ InputBlockLabelComponent.displayName = 'InputBlockLabel';
1856
+ var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
1857
+
1858
+ var InputIconComponent = function InputIconComponent(_ref) {
1859
+ var icon = _ref.icon,
1860
+ _ref$clickable = _ref.clickable,
1861
+ clickable = _ref$clickable === void 0 ? false : _ref$clickable,
1862
+ onClick = _ref.onClick;
1863
+ return /*#__PURE__*/jsxRuntime.jsxs("span", {
1864
+ onClick: onClick,
1865
+ className: _JSXStyle.dynamic([["4247656379", [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none']]]) + " " + "input-icon",
1866
+ children: [icon, /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1867
+ id: "4247656379",
1868
+ dynamic: [clickable ? 'pointer' : 'default', clickable ? 'auto' : 'none'],
1869
+ children: ".input-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;line-height:1;position:relative;cursor:".concat(clickable ? 'pointer' : 'default', ";pointer-events:").concat(clickable ? 'auto' : 'none', ";}.input-icon.__jsx-style-dynamic-selector svg{width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
1870
+ })]
1871
+ });
1872
+ };
1873
+ InputIconComponent.displayName = 'InputIcon';
1874
+ var InputIcon = /*#__PURE__*/React.memo(InputIconComponent);
1875
+
1876
+ var InputIconClear = function InputIconClear(_ref) {
1877
+ var onClick = _ref.onClick,
1878
+ disabled = _ref.disabled,
1879
+ visible = _ref.visible;
1880
+ var theme$1 = theme.useTheme();
1881
+ var classes = theme.useClasses('clear-icon', {
1882
+ visible: visible
1883
+ });
1884
+ var clickHandler = function clickHandler(event) {
1885
+ event.preventDefault();
1886
+ event.stopPropagation();
1887
+ event.nativeEvent.stopImmediatePropagation();
1888
+ onClick && onClick(event);
1889
+ };
1890
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
1891
+ onClick: clickHandler,
1892
+ className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]) + " " + (classes || ""),
1893
+ children: [/*#__PURE__*/jsxRuntime.jsxs("svg", {
1894
+ viewBox: "0 0 24 24",
1895
+ stroke: "currentColor",
1896
+ strokeWidth: "1.5",
1897
+ strokeLinecap: "round",
1898
+ strokeLinejoin: "round",
1899
+ fill: "none",
1900
+ shapeRendering: "geometricPrecision",
1901
+ className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]]),
1902
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1903
+ d: "M18 6L6 18",
1904
+ className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
1905
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
1906
+ d: "M6 6l12 12",
1907
+ className: _JSXStyle.dynamic([["1567030211", [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground]]])
1908
+ })]
1909
+ }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
1910
+ id: "1567030211",
1911
+ dynamic: [disabled ? 'not-allowed' : 'pointer', theme$1.palette.accents_3, disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground],
1912
+ children: ".clear-icon.__jsx-style-dynamic-selector{box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:calc(var(--input-height) - 2px);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s;margin:0;padding:0;color:").concat(theme$1.palette.accents_3, ";visibility:hidden;opacity:0;}.visible.__jsx-style-dynamic-selector{visibility:visible;opacity:1;}.clear-icon.__jsx-style-dynamic-selector:hover{color:").concat(disabled ? theme$1.palette.accents_3 : theme$1.palette.foreground, ";}svg.__jsx-style-dynamic-selector{color:currentColor;width:calc(var(--input-height) - 2px);height:calc(var(--input-height) - 2px);-webkit-transform:scale(0.44);-ms-transform:scale(0.44);transform:scale(0.44);}")
1913
+ })]
1914
+ });
1915
+ };
1916
+ var MemoInputIconClear = /*#__PURE__*/React.memo(InputIconClear);
1917
+
1902
1918
  var getColors$2 = function getColors(palette, status) {
1903
1919
  var colors = {
1904
1920
  "default": {
@@ -2006,7 +2022,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2006
2022
  }, [icon, iconRight]);
2007
2023
  var _useMemo = React.useMemo(function () {
2008
2024
  return getColors$2(theme$1.palette, _color);
2009
- }, [theme$1.palette, type]),
2025
+ }, [theme$1.palette, _color]),
2010
2026
  color = _useMemo.color,
2011
2027
  borderColor = _useMemo.borderColor,
2012
2028
  hoverBorder = _useMemo.hoverBorder;
@@ -2061,16 +2077,16 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2061
2077
  var inputProps = _objectSpread2(_objectSpread2({}, props), controlledValue);
2062
2078
  var defaultWidth = fullWidth ? '100%' : 'initial';
2063
2079
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
2064
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + "with-label",
2080
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + "with-label",
2065
2081
  children: [children && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
2066
2082
  required: required,
2067
2083
  children: children
2068
2084
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2069
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-container', className) || ""),
2085
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-container', className) || ""),
2070
2086
  children: [label && /*#__PURE__*/jsxRuntime.jsx(MemoInputLabel, {
2071
2087
  children: label
2072
2088
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2073
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-wrapper', {
2089
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (theme.useClasses('input-wrapper', {
2074
2090
  hover: hover,
2075
2091
  disabled: disabled
2076
2092
  }, labelClasses) || ""),
@@ -2088,7 +2104,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2088
2104
  autoComplete: autoComplete,
2089
2105
  onKeyDown: handleKeyDown
2090
2106
  }, inputProps), {}, {
2091
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
2107
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || theme.useClasses({
2092
2108
  disabled: disabled
2093
2109
  }, iconClasses) || "")
2094
2110
  })), clearable && /*#__PURE__*/jsxRuntime.jsx(MemoInputIconClear, {
@@ -2102,23 +2118,15 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2102
2118
  isRight: true,
2103
2119
  children: labelRight
2104
2120
  }), /*#__PURE__*/jsxRuntime.jsx("br", {
2105
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color]]])
2121
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color]]])
2106
2122
  })]
2107
- }), helperText && /*#__PURE__*/jsxRuntime.jsxs(Text, {
2108
- font: 0.8,
2109
- style: {
2110
- marginTop: 0.4,
2111
- marginRight: 0,
2112
- marginLeft: 0,
2113
- marginBottom: '0.4rem',
2114
- textAlign: 'left'
2115
- },
2116
- color: error ? "error" : 'default',
2117
- children: ["\xA0", helperText]
2123
+ }), helperText && /*#__PURE__*/jsxRuntime.jsx(InputError, {
2124
+ text: helperText,
2125
+ error: error
2118
2126
  }), /*#__PURE__*/jsxRuntime.jsx(_JSXStyle, {
2119
- id: "1343268165",
2120
- dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme$1.palette.accents_3, theme$1.palette.background, color],
2121
- children: ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme$1.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme$1.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")
2127
+ id: "2371903369",
2128
+ dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme$1.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme$1.palette.accents_1, theme$1.palette.accents_2, hoverBorder, SCALES.font(0.875), theme$1.palette.foreground, theme$1.palette.accents_3, theme$1.palette.background, color],
2129
+ children: ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme$1.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme$1.palette.accents_1, ";border-color:").concat(theme$1.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(theme$1.palette.foreground, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme$1.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme$1.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")
2122
2130
  })]
2123
2131
  });
2124
2132
  });
@@ -2140,7 +2148,7 @@ tuple('hover', 'click');
2140
2148
  tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
2141
2149
  tuple('start', 'center', 'end', 'left', 'right');
2142
2150
 
2143
- var _excluded$c = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "resize"];
2151
+ var _excluded$c = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "required", "resize"];
2144
2152
  tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
2145
2153
  var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2146
2154
  var _ref$type = _ref.type,
@@ -2161,6 +2169,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2161
2169
  helperText = _ref.helperText,
2162
2170
  error = _ref.error,
2163
2171
  label = _ref.label,
2172
+ required = _ref.required,
2164
2173
  _ref$resize = _ref.resize,
2165
2174
  resize = _ref$resize === void 0 ? 'none' : _ref$resize,
2166
2175
  props = _objectWithoutProperties(_ref, _excluded$c);
@@ -2219,6 +2228,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2219
2228
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
2220
2229
  className: "with-label",
2221
2230
  children: [label && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
2231
+ required: required,
2222
2232
  children: label
2223
2233
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
2224
2234
  className: _JSXStyle.dynamic([["12276481", [theme$1.layout.radius, borderColor, color, SCALES.font(0.875), SCALES.height(1, 'auto'), SCALES.width(1, 'initial'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, theme$1.palette.accents_1, theme$1.palette.accents_2, theme$1.font.sans, SCALES.pt(0.5), SCALES.pr(0.5), SCALES.pb(0.5), SCALES.pl(0.5), resize, theme$1.palette.background]]]) + " " + (classes || ""),
@@ -21795,7 +21805,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function (_ref, inputRef) {
21795
21805
  });
21796
21806
  SelectInput.displayName = 'SelectInput';
21797
21807
 
21798
- var _excluded$6 = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "helperText", "error", "getPopupContainer", "onDropdownVisibleChange"];
21808
+ var _excluded$6 = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "helperText", "error", "required", "getPopupContainer", "onDropdownVisibleChange"];
21799
21809
  var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
21800
21810
  var children = _ref.children,
21801
21811
  label = _ref.label,
@@ -21825,6 +21835,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
21825
21835
  disableMatchWidth = _ref$disableMatchWidt === void 0 ? false : _ref$disableMatchWidt,
21826
21836
  helperText = _ref.helperText,
21827
21837
  error = _ref.error,
21838
+ required = _ref.required,
21828
21839
  getPopupContainer = _ref.getPopupContainer,
21829
21840
  _ref$onDropdownVisibl = _ref.onDropdownVisibleChange,
21830
21841
  onDropdownVisibleChange = _ref$onDropdownVisibl === void 0 ? function () {} : _ref$onDropdownVisibl,
@@ -21952,14 +21963,8 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
21952
21963
  }, className);
21953
21964
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
21954
21965
  className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]),
21955
- children: [label && /*#__PURE__*/jsxRuntime.jsx("label", {
21956
- style: {
21957
- display: 'block',
21958
- marginBottom: '0.4rem',
21959
- fontSize: '14px',
21960
- fontWeight: 'light'
21961
- },
21962
- className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme$1.layout.radius, disabled ? theme$1.palette.accents_1 : theme$1.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme$1.palette.border : borderActive, disabled ? theme$1.palette.accents_5 : borderActive, disabled ? theme$1.palette.accents_4 : theme$1.palette.foreground, placeholderColor, theme$1.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]),
21966
+ children: [label && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
21967
+ required: required,
21963
21968
  children: label
21964
21969
  }), /*#__PURE__*/jsxRuntime.jsx(SelectContext.Provider, {
21965
21970
  value: initialValue,
@@ -1787,10 +1787,10 @@ var TextComponent = function TextComponent(_ref) {
1787
1787
  TextComponent.displayName = 'Text';
1788
1788
  var Text = withScale(TextComponent);
1789
1789
 
1790
- var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
1791
- var children = _ref.children,
1792
- _ref$required = _ref.required,
1793
- required = _ref$required === void 0 ? false : _ref$required;
1790
+ var InputBlockLabelComponent = function InputBlockLabelComponent(_ref2) {
1791
+ var children = _ref2.children,
1792
+ _ref2$required = _ref2.required,
1793
+ required = _ref2$required === void 0 ? false : _ref2$required;
1794
1794
  var theme$1 = theme.useTheme();
1795
1795
  var _useScale = useScale(),
1796
1796
  SCALES = _useScale.SCALES;
@@ -1809,7 +1809,7 @@ var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
1809
1809
  InputBlockLabelComponent.displayName = 'InputBlockLabel';
1810
1810
  var InputBlockLabel = /*#__PURE__*/React.memo(InputBlockLabelComponent);
1811
1811
 
1812
- var _excluded = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "resize"];
1812
+ var _excluded = ["type", "disabled", "readOnly", "onFocus", "onBlur", "className", "initialValue", "onChange", "value", "placeholder", "helperText", "error", "label", "required", "resize"];
1813
1813
  tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
1814
1814
  var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1815
1815
  var _ref$type = _ref.type,
@@ -1830,6 +1830,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1830
1830
  helperText = _ref.helperText,
1831
1831
  error = _ref.error,
1832
1832
  label = _ref.label,
1833
+ required = _ref.required,
1833
1834
  _ref$resize = _ref.resize,
1834
1835
  resize = _ref$resize === void 0 ? 'none' : _ref$resize,
1835
1836
  props = _objectWithoutProperties(_ref, _excluded);
@@ -1888,6 +1889,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1888
1889
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
1889
1890
  className: "with-label",
1890
1891
  children: [label && /*#__PURE__*/jsxRuntime.jsx(InputBlockLabel, {
1892
+ required: required,
1891
1893
  children: label
1892
1894
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1893
1895
  className: _JSXStyle.dynamic([["12276481", [theme$1.layout.radius, borderColor, color, SCALES.font(0.875), SCALES.height(1, 'auto'), SCALES.width(1, 'initial'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverBorder, theme$1.palette.accents_1, theme$1.palette.accents_2, theme$1.font.sans, SCALES.pt(0.5), SCALES.pr(0.5), SCALES.pb(0.5), SCALES.pl(0.5), resize, theme$1.palette.background]]]) + " " + (classes || ""),
@@ -15,6 +15,7 @@ interface Props {
15
15
  onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
16
16
  className?: string;
17
17
  error?: boolean;
18
+ required?: boolean;
18
19
  helperText?: string;
19
20
  label?: string;
20
21
  resize?: TextareaResizes;
package/esm/index.d.ts CHANGED
@@ -42,7 +42,7 @@ export { default as Container } from './container';
42
42
  export { default as HtmlRenderer } from './html-renderer';
43
43
  export { default as Image } from './image';
44
44
  export type { ImageProps, ImageBrowserProps } from './image';
45
- export { default as Input, getColors } from './input';
45
+ export { default as Input, getColors, InputLabel, InputError } from './input';
46
46
  export type { InputProps, InputPasswordProps } from './input';
47
47
  export { default as Keyboard } from './keyboard';
48
48
  export type { KeyboardProps } from './keyboard';
package/esm/index.js CHANGED
@@ -28,7 +28,7 @@ export { default as Grid } from './grid';
28
28
  export { default as Container } from './container';
29
29
  export { default as HtmlRenderer } from './html-renderer';
30
30
  export { default as Image } from './image';
31
- export { default as Input, getColors } from './input';
31
+ export { default as Input, getColors, InputLabel, InputError } from './input';
32
32
  export { default as Keyboard } from './keyboard';
33
33
  export { default as Link } from './link';
34
34
  export { default as Loading } from './loading';
@@ -14,5 +14,6 @@ export type { InputProps } from './input-field';
14
14
  export type { InputTypes } from './input-props';
15
15
  export type { InputPasswordProps } from './password';
16
16
  export type { TextareaProps } from '../textarea';
17
+ export { default as InputLabel, InputError } from "./input-block-label";
17
18
  declare const _default: InputComponentType;
18
19
  export default _default;
@@ -9,4 +9,5 @@ Input.Password = InputPassword;
9
9
  Input.Phone = PhoneInput;
10
10
  Input.Currency = CurrencyInput;
11
11
  export { getColors } from './styles';
12
+ export { default as InputLabel, InputError } from "./input-block-label";
12
13
  export default Input;
@@ -2,5 +2,9 @@ import React from 'react';
2
2
  export interface InputBlockLabelLabel {
3
3
  required?: boolean;
4
4
  }
5
+ export declare const InputError: React.FC<{
6
+ text: string;
7
+ error?: string;
8
+ }>;
5
9
  declare const InputBlockLabel: React.NamedExoticComponent<React.PropsWithChildren<InputBlockLabelLabel>>;
6
10
  export default InputBlockLabel;
@@ -2,10 +2,26 @@ import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
3
  import { useTheme } from '@helpdice/theme';
4
4
  import useScale from '../use-scale';
5
- var InputBlockLabelComponent = function InputBlockLabelComponent(_ref) {
6
- var children = _ref.children,
7
- _ref$required = _ref.required,
8
- required = _ref$required === void 0 ? false : _ref$required;
5
+ import Text from '../text';
6
+ export var InputError = function InputError(_ref) {
7
+ var text = _ref.text,
8
+ error = _ref.error;
9
+ return /*#__PURE__*/React.createElement(Text, {
10
+ font: 0.8,
11
+ style: {
12
+ marginTop: 0.4,
13
+ marginRight: 0,
14
+ marginLeft: 0,
15
+ marginBottom: '0.4rem',
16
+ textAlign: 'left'
17
+ },
18
+ color: error ? "error" : 'default'
19
+ }, "\xA0", text);
20
+ };
21
+ var InputBlockLabelComponent = function InputBlockLabelComponent(_ref2) {
22
+ var children = _ref2.children,
23
+ _ref2$required = _ref2.required,
24
+ required = _ref2$required === void 0 ? false : _ref2$required;
9
25
  var theme = useTheme();
10
26
  var _useScale = useScale(),
11
27
  SCALES = _useScale.SCALES;
@@ -10,10 +10,9 @@ import _JSXStyle from "../styled-jsx.es.js";
10
10
  import React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
11
11
  import { useTheme, useClasses } from '@helpdice/theme';
12
12
  import InputLabel from './input-label';
13
- import InputBlockLabel from './input-block-label';
13
+ import InputBlockLabel, { InputError } from './input-block-label';
14
14
  import InputIcon from './input-icon';
15
15
  import InputClearIcon from './input-icon-clear';
16
- import Text from '../text';
17
16
  import { getColors } from './styles';
18
17
  import useScale, { withScale } from '../use-scale';
19
18
  var simulateChangeEvent = function simulateChangeEvent(el, event) {
@@ -90,7 +89,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
90
89
  }, [icon, iconRight]);
91
90
  var _useMemo = useMemo(function () {
92
91
  return getColors(theme.palette, _color);
93
- }, [theme.palette, type]),
92
+ }, [theme.palette, _color]),
94
93
  color = _useMemo.color,
95
94
  borderColor = _useMemo.borderColor,
96
95
  hoverBorder = _useMemo.hoverBorder;
@@ -145,13 +144,13 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
145
144
  var inputProps = _extends({}, props, controlledValue);
146
145
  var defaultWidth = fullWidth ? '100%' : 'initial';
147
146
  return /*#__PURE__*/React.createElement("div", {
148
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + "with-label"
147
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]]]) + " " + "with-label"
149
148
  }, children && /*#__PURE__*/React.createElement(InputBlockLabel, {
150
149
  required: required
151
150
  }, children), /*#__PURE__*/React.createElement("div", {
152
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-container', className) || "")
151
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-container', className) || "")
153
152
  }, label && /*#__PURE__*/React.createElement(InputLabel, null, label), /*#__PURE__*/React.createElement("div", {
154
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-wrapper', {
153
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-wrapper', {
155
154
  hover: hover,
156
155
  disabled: disabled
157
156
  }, labelClasses) || "")
@@ -169,7 +168,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
169
168
  autoComplete: autoComplete,
170
169
  onKeyDown: handleKeyDown
171
170
  }, inputProps, {
172
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || useClasses({
171
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || useClasses({
173
172
  disabled: disabled
174
173
  }, iconClasses) || "")
175
174
  })), clearable && /*#__PURE__*/React.createElement(InputClearIcon, {
@@ -181,21 +180,14 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
181
180
  }, iconProps))), labelRight && /*#__PURE__*/React.createElement(InputLabel, {
182
181
  isRight: true
183
182
  }, labelRight), /*#__PURE__*/React.createElement("br", {
184
- className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]])
185
- })), helperText && /*#__PURE__*/React.createElement(Text, {
186
- font: 0.8,
187
- style: {
188
- marginTop: 0.4,
189
- marginRight: 0,
190
- marginLeft: 0,
191
- marginBottom: '0.4rem',
192
- textAlign: 'left'
193
- },
194
- color: error ? "error" : 'default'
195
- }, "\xA0", helperText), /*#__PURE__*/React.createElement(_JSXStyle, {
196
- id: "1343268165",
197
- dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]
198
- }, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.accents_1, ";border-color:").concat(theme.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")));
183
+ className: _JSXStyle.dynamic([["2371903369", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]]])
184
+ })), helperText && /*#__PURE__*/React.createElement(InputError, {
185
+ text: helperText,
186
+ error: error
187
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
188
+ id: "2371903369",
189
+ dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), theme.palette.foreground, theme.palette.accents_3, theme.palette.background, color]
190
+ }, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.accents_1, ";border-color:").concat(theme.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(theme.palette.foreground, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")));
199
191
  });
200
192
  InputComponent.displayName = 'Input';
201
193
  var Input = withScale(InputComponent);
@@ -24,6 +24,7 @@ interface Props {
24
24
  dropdownStyle?: CSSProperties;
25
25
  disableMatchWidth?: boolean;
26
26
  error?: boolean;
27
+ required?: boolean;
27
28
  helperText?: string;
28
29
  onDropdownVisibleChange?: (visible: boolean) => void;
29
30
  getPopupContainer?: () => HTMLElement | null;