@groupeactual/ui-kit 0.3.8 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,8 @@ interface Props {
9
9
  name: string;
10
10
  placeholder?: string;
11
11
  disabled?: boolean;
12
+ isValid?: boolean;
12
13
  endAdornment?: ReactNode;
13
14
  }
14
- declare const TextField: ({ name, value, error, onBlur, onChange, label, disabled, endAdornment, placeholder, ...props }: Omit<TextFieldProps, 'error'> & Props) => JSX.Element;
15
+ declare const TextField: ({ name, value, error, onBlur, onChange, label, disabled, endAdornment, isValid, placeholder, ...props }: Omit<TextFieldProps, 'error'> & Props) => JSX.Element;
15
16
  export default TextField;
package/dist/esm/index.js CHANGED
@@ -50271,16 +50271,14 @@ var ActButton = styled$1(Button$1)(function (_a) {
50271
50271
  });
50272
50272
 
50273
50273
  var TextField = function (_a) {
50274
- var name = _a.name, value = _a.value, error = _a.error, onBlur = _a.onBlur, onChange = _a.onChange, label = _a.label, disabled = _a.disabled, endAdornment = _a.endAdornment, _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, props = __rest(_a, ["name", "value", "error", "onBlur", "onChange", "label", "disabled", "endAdornment", "placeholder"]);
50274
+ var name = _a.name, value = _a.value, error = _a.error, onBlur = _a.onBlur, onChange = _a.onChange, label = _a.label, disabled = _a.disabled, endAdornment = _a.endAdornment; _a.isValid; var _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, props = __rest(_a, ["name", "value", "error", "onBlur", "onChange", "label", "disabled", "endAdornment", "isValid", "placeholder"]);
50275
50275
  var _c = useState(value), internalValue = _c[0], setInternalValue = _c[1];
50276
50276
  useEffect(function () {
50277
50277
  if (value !== internalValue) {
50278
50278
  setInternalValue(value);
50279
50279
  }
50280
50280
  }, [value]);
50281
- return (jsx(MuiTextField, __assign$1({ variant: "outlined", name: name, label: label, value: internalValue, placeholder: placeholder, onClick: function (e) { return e.stopPropagation(); }, InputLabelProps: {
50282
- shrink: true
50283
- }, InputProps: {
50281
+ return (jsx(MuiTextField, __assign$1({ variant: "outlined", name: name, label: label, value: internalValue, placeholder: placeholder, InputLabelProps: { shrink: true }, onClick: function (e) { return e.stopPropagation(); }, InputProps: {
50284
50282
  endAdornment: endAdornment
50285
50283
  }, onChange: function (e) {
50286
50284
  setInternalValue(e.currentTarget.value);
@@ -50403,9 +50401,35 @@ var IconProvider = function (_a) {
50403
50401
  return (jsx(Box$1, __assign$1({ component: "span", sx: getStyles() }, { children: jsx(FontAwesomeSvgIcon, { icon: icon, fontSize: getFontSize() }) })));
50404
50402
  };
50405
50403
 
50404
+ /******************************************************************************
50405
+ Copyright (c) Microsoft Corporation.
50406
+
50407
+ Permission to use, copy, modify, and/or distribute this software for any
50408
+ purpose with or without fee is hereby granted.
50409
+
50410
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50411
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50412
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
50413
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
50414
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
50415
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50416
+ PERFORMANCE OF THIS SOFTWARE.
50417
+ ***************************************************************************** */
50418
+
50419
+ var __assign = function() {
50420
+ __assign = Object.assign || function __assign(t) {
50421
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
50422
+ s = arguments[i];
50423
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
50424
+ }
50425
+ return t;
50426
+ };
50427
+ return __assign.apply(this, arguments);
50428
+ };
50429
+
50406
50430
  /**
50407
50431
  * Do not edit directly
50408
- * Generated on Sun, 27 Nov 2022 01:38:10 GMT
50432
+ * Generated on Tue, 29 Nov 2022 10:20:00 GMT
50409
50433
  */
50410
50434
  var DefaultWebShadowAllContent = { "color": "#2727271f", "type": "dropShadow", "x": "0", "y": "2", "blur": "10", "spread": "0" };
50411
50435
  var DefaultSpacingXxs = "4";
@@ -50704,7 +50728,18 @@ var getMuiPalette = function (themeName) {
50704
50728
  palette[colorKey] = tokens[colorName];
50705
50729
  }
50706
50730
  });
50707
- return palette;
50731
+ var defaultPalette = {
50732
+ success: {
50733
+ main: tokens[themeName + 'ColorsGreenSuccess']
50734
+ },
50735
+ error: {
50736
+ main: tokens[themeName + 'ColorsRedError']
50737
+ },
50738
+ warning: {
50739
+ main: tokens[themeName + 'ColorsOrangeWarning']
50740
+ }
50741
+ };
50742
+ return __assign(__assign({}, palette), defaultPalette);
50708
50743
  };
50709
50744
  var getFontFamilies = function (themeName) {
50710
50745
  var designTokens = tokens;
@@ -50717,32 +50752,6 @@ var getFontFamilies = function (themeName) {
50717
50752
  return fontFamilies;
50718
50753
  };
50719
50754
 
50720
- /******************************************************************************
50721
- Copyright (c) Microsoft Corporation.
50722
-
50723
- Permission to use, copy, modify, and/or distribute this software for any
50724
- purpose with or without fee is hereby granted.
50725
-
50726
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50727
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50728
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
50729
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
50730
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
50731
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50732
- PERFORMANCE OF THIS SOFTWARE.
50733
- ***************************************************************************** */
50734
-
50735
- var __assign = function() {
50736
- __assign = Object.assign || function __assign(t) {
50737
- for (var s, i = 1, n = arguments.length; i < n; i++) {
50738
- s = arguments[i];
50739
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
50740
- }
50741
- return t;
50742
- };
50743
- return __assign.apply(this, arguments);
50744
- };
50745
-
50746
50755
  var useMaterialThemeCss = function (muiTokens) {
50747
50756
  var muiCss = useMemo(function () {
50748
50757
  return {
@@ -50751,7 +50760,7 @@ var useMaterialThemeCss = function (muiTokens) {
50751
50760
  styleOverrides: {
50752
50761
  root: {
50753
50762
  fontWeight: 400,
50754
- fontSize: '10px',
50763
+ fontSize: '11px',
50755
50764
  lineHeight: '12px',
50756
50765
  color: muiTokens.palette.greyDark,
50757
50766
  '&.Mui-error': {
@@ -50766,11 +50775,11 @@ var useMaterialThemeCss = function (muiTokens) {
50766
50775
  fontSize: '14px',
50767
50776
  lineHeight: '18px',
50768
50777
  fontWeight: 400,
50769
- paddingTop: '6px',
50770
50778
  color: muiTokens.palette.greyXDark,
50771
50779
  '&::placeholder': {
50772
50780
  color: muiTokens.palette.greyDark,
50773
50781
  fontWeight: 400,
50782
+ lineHeight: '18px',
50774
50783
  fontSize: '14px'
50775
50784
  },
50776
50785
  '&.Mui-disabled': {
@@ -50792,11 +50801,18 @@ var useMaterialThemeCss = function (muiTokens) {
50792
50801
  }
50793
50802
  }
50794
50803
  },
50804
+ MuiSvgIcon: {
50805
+ styleOverrides: {
50806
+ colorSuccess: {
50807
+ color: muiTokens.palette.success.main
50808
+ }
50809
+ }
50810
+ },
50795
50811
  MuiInputLabel: {
50796
50812
  styleOverrides: {
50797
50813
  root: {
50798
50814
  fontSize: '16px',
50799
- lineHeight: '18px',
50815
+ lineHeight: '16px',
50800
50816
  fontWeight: 500,
50801
50817
  color: muiTokens.palette.greyXDark,
50802
50818
  '&.Mui-disabled': {