@unicef/material-ui 2.0.5 → 2.0.7

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.
package/lib/prod.cjs CHANGED
@@ -5740,8 +5740,8 @@ var StyledAppBar = styled$1(material.AppBar, {
5740
5740
  }), "& .".concat(classes$l.margin), {
5741
5741
  margin: theme.spacing(2)
5742
5742
  }), "& .".concat(classes$l.navbarCenter), {
5743
- marginLeft: 16,
5744
- marginRight: 16
5743
+ marginLeft: theme.spacing(2),
5744
+ marginRight: theme.spacing(2)
5745
5745
  });
5746
5746
  });
5747
5747
 
@@ -5983,7 +5983,8 @@ function UContent(_ref) {
5983
5983
  return /*#__PURE__*/React__namespace.default.createElement(material.Box, {
5984
5984
  sx: {
5985
5985
  flexGrow: 1,
5986
- padding: 1
5986
+ padding: 1,
5987
+ minWidth: 0
5987
5988
  }
5988
5989
  }, /*#__PURE__*/React__namespace.default.createElement(material.Box, {
5989
5990
  sx: {
@@ -6049,8 +6050,8 @@ function UButton(_ref) {
6049
6050
  position: 'absolute',
6050
6051
  top: '50%',
6051
6052
  left: '50%',
6052
- marginTop: -12,
6053
- marginLeft: -12
6053
+ marginTop: -1.5,
6054
+ marginLeft: -1.5
6054
6055
  }
6055
6056
  })));
6056
6057
  }
@@ -45611,12 +45612,12 @@ var defaultErrorMessages = {
45611
45612
  isAlphanumeric: 'Only letters and numbers are allowed'
45612
45613
  };
45613
45614
 
45614
- var _excluded$K = ["variant", "error", "customErrorMessages", "validators", "requiredError", "helperText", "validatorListener", "withRequiredValidator", "onBlur", "maxLength", "counter", "counterClassName", "readOnly", "label", "slotProps", "showLabelHelp", "InputLabelHelpProps", "select", "id", "options", "children"];
45615
+ var _excluded$K = ["variant", "error", "customErrorMessages", "validators", "requiredError", "helperText", "validatorListener", "withRequiredValidator", "onBlur", "maxLength", "counter", "counterClassName", "counterCharsLocaleText", "readOnly", "label", "slotProps", "showLabelHelp", "InputLabelHelpProps", "select", "id", "options", "children"];
45615
45616
 
45616
45617
  // TODO - research how to use theme
45617
45618
  var styles$1 = {
45618
45619
  counter: {
45619
- marginLeft: 16
45620
+ marginLeft: 2
45620
45621
  },
45621
45622
  counterError: {
45622
45623
  color: '#f44336'
@@ -45705,7 +45706,9 @@ var UTextField = /*#__PURE__*/function (_ValidatorComponent) {
45705
45706
  var maxLength = _this$props.maxLength,
45706
45707
  counter = _this$props.counter;
45707
45708
  _this$props.counterClassName;
45708
- var _this$props$readOnly = _this$props.readOnly,
45709
+ var _this$props$counterCh = _this$props.counterCharsLocaleText,
45710
+ counterCharsLocaleText = _this$props$counterCh === void 0 ? 'characters' : _this$props$counterCh,
45711
+ _this$props$readOnly = _this$props.readOnly,
45709
45712
  readOnly = _this$props$readOnly === void 0 ? false : _this$props$readOnly,
45710
45713
  label = _this$props.label,
45711
45714
  _this$props$slotProps = _this$props.slotProps,
@@ -45778,7 +45781,7 @@ var UTextField = /*#__PURE__*/function (_ValidatorComponent) {
45778
45781
  sx: _objectSpread2$1(_objectSpread2$1({}, styles$1.counter), counterError && styles$1.counterError),
45779
45782
  variant: "caption",
45780
45783
  color: "textSecondary"
45781
- }, maxLength ? "".concat(length, "/").concat(maxLength) : length, " characters")));
45784
+ }, maxLength ? "".concat(length, "/").concat(maxLength) : length, ' ', counterCharsLocaleText)));
45782
45785
  }
45783
45786
  }]);
45784
45787
  }(ValidatorComponentNew);
@@ -45821,7 +45824,9 @@ UTextField.propTypes = {
45821
45824
  /** Id of the field */
45822
45825
  id: PropTypes__default.default.string,
45823
45826
  /** If the field is select box and no options are passed, then this children will be used. */
45824
- children: PropTypes__default.default.node
45827
+ children: PropTypes__default.default.node,
45828
+ /** Locale text for counter characters */
45829
+ counterCharsLocaleText: PropTypes__default.default.string
45825
45830
  };
45826
45831
 
45827
45832
  var _excluded$J = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "slotProps", "InputLabelHelpProps", "inputVariant"];
@@ -53440,8 +53445,9 @@ function UErrorAlert(_ref) {
53440
53445
  preformatted = _ref$preformatted === void 0 ? false : _ref$preformatted,
53441
53446
  _onClose = _ref.onClose;
53442
53447
  return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, error && /*#__PURE__*/React__namespace.default.createElement(material.Box, {
53443
- marginTop: 2,
53444
- marginBottom: 2
53448
+ sx: {
53449
+ marginY: 2
53450
+ }
53445
53451
  }, /*#__PURE__*/React__namespace.default.createElement(material.Alert, {
53446
53452
  severity: "error",
53447
53453
  onClose: function onClose() {
@@ -56006,11 +56012,11 @@ var classes$7 = {
56006
56012
  text: "".concat(PREFIX$6, "-text")
56007
56013
  };
56008
56014
  var Root$1 = styled$1('div')(function (_ref) {
56009
- _ref.theme;
56015
+ var theme = _ref.theme;
56010
56016
  return _defineProperty$1(_defineProperty$1(_defineProperty$1({}, "&.".concat(classes$7.root), {
56011
56017
  display: 'flex',
56012
56018
  flexDirection: 'column',
56013
- marginLeft: 8
56019
+ marginLeft: theme.spacing(1)
56014
56020
  }), "& .".concat(classes$7.link), {
56015
56021
  color: '#3344DD',
56016
56022
  textDecorationLine: 'underline'
@@ -56123,7 +56129,7 @@ var StyledBox$3 = styled$1('div')(function (_ref) {
56123
56129
  }), "& .".concat(classes$6.mini), {
56124
56130
  width: theme.spacing(3),
56125
56131
  height: theme.spacing(3),
56126
- marginRight: 5
56132
+ marginRight: theme.spacing(0.5)
56127
56133
  }), "& .".concat(classes$6.view), {
56128
56134
  border: '2px solid red',
56129
56135
  marginLeft: '-8px'
@@ -57633,9 +57639,9 @@ function UAriaLive(_ref) {
57633
57639
  role: role,
57634
57640
  sx: {
57635
57641
  position: 'absolute',
57636
- width: 1,
57637
- height: 1,
57638
- margin: -1,
57642
+ width: '1px',
57643
+ height: '1px',
57644
+ margin: '-1px',
57639
57645
  padding: 0,
57640
57646
  overflow: 'hidden',
57641
57647
  clip: 'rect(0, 0, 0, 0)',