@unicef/material-ui 1.0.7 → 1.0.8

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/dev.js CHANGED
@@ -33675,7 +33675,7 @@ UContent.propTypes = {
33675
33675
  headerHeight: PropTypes.number
33676
33676
  };
33677
33677
 
33678
- var _excluded$13 = ["spinButton", "loading", "variant", "color"];
33678
+ var _excluded$13 = ["spinButton", "loading", "variant", "color", "children"];
33679
33679
  var PREFIX$r = 'UButton';
33680
33680
  var classes$r = {
33681
33681
  root: "".concat(PREFIX$r, "-root"),
@@ -33711,6 +33711,7 @@ function UButton(_ref3) {
33711
33711
  variant = _ref3$variant === void 0 ? 'contained' : _ref3$variant,
33712
33712
  _ref3$color = _ref3.color,
33713
33713
  color = _ref3$color === void 0 ? 'primary' : _ref3$color,
33714
+ children = _ref3.children,
33714
33715
  others = _objectWithoutProperties$2(_ref3, _excluded$13);
33715
33716
  function getVariant(variant) {
33716
33717
  switch (variant) {
@@ -33732,7 +33733,7 @@ function UButton(_ref3) {
33732
33733
  variant: getVariant(variant),
33733
33734
  color: color,
33734
33735
  disableRipple: true
33735
- }, others), props.children);
33736
+ }, others), children);
33736
33737
  return !spinButton ? CustomButton : /*#__PURE__*/React$1.createElement(StyledBox$j, {
33737
33738
  className: classes$r.root
33738
33739
  }, /*#__PURE__*/React$1.createElement(Box$1, {
@@ -56758,14 +56759,19 @@ var _excluded$C = ["inputFormat", "label", "onChange", "value", "showLabelHelp",
56758
56759
  * Please have look at [Material UI Date Picker](https://mui.com/x/react-date-pickers/date-picker/#main-content) for more details
56759
56760
  */
56760
56761
  function UDatePicker(_ref) {
56761
- var inputFormat = _ref.inputFormat,
56762
+ var _ref$inputFormat = _ref.inputFormat,
56763
+ inputFormat = _ref$inputFormat === void 0 ? 'dd/MM/yyyy' : _ref$inputFormat,
56762
56764
  label = _ref.label,
56763
56765
  onChange = _ref.onChange,
56764
56766
  value = _ref.value,
56765
56767
  showLabelHelp = _ref.showLabelHelp,
56766
- InputLabelProps = _ref.InputLabelProps,
56768
+ _ref$InputLabelProps = _ref.InputLabelProps,
56769
+ InputLabelProps = _ref$InputLabelProps === void 0 ? {
56770
+ shrink: true
56771
+ } : _ref$InputLabelProps,
56767
56772
  InputLabelHelpProps = _ref.InputLabelHelpProps,
56768
- inputVariant = _ref.inputVariant,
56773
+ _ref$inputVariant = _ref.inputVariant,
56774
+ inputVariant = _ref$inputVariant === void 0 ? 'outlined' : _ref$inputVariant,
56769
56775
  others = _objectWithoutProperties$2(_ref, _excluded$C);
56770
56776
  return /*#__PURE__*/React$1.createElement(LocalizationProvider, {
56771
56777
  dateAdapter: AdapterDateFns
@@ -56803,13 +56809,6 @@ UDatePicker.propTypes = {
56803
56809
  /** Props applied to the InputLabel element.*/
56804
56810
  InputLabelProps: PropTypes.object
56805
56811
  };
56806
- UDatePicker.defaultProps = {
56807
- inputVariant: 'outlined',
56808
- InputLabelProps: {
56809
- shrink: true
56810
- },
56811
- inputFormat: 'dd/MM/yyyy'
56812
- };
56813
56812
 
56814
56813
  var _excluded$B = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant"];
56815
56814
 
@@ -60869,10 +60868,13 @@ var StyledBox$g = styled$1(Box$1, {
60869
60868
  function ActiveFormTextField(props) {
60870
60869
  var typographyVariant = props.typographyVariant,
60871
60870
  className = props.className,
60872
- variant = props.variant,
60871
+ _props$variant = props.variant,
60872
+ variant = _props$variant === void 0 ? 'outlined' : _props$variant,
60873
60873
  readOnly = props.readOnly,
60874
- placeholder = props.placeholder,
60875
- interactiveMode = props.interactiveMode,
60874
+ _props$placeholder = props.placeholder,
60875
+ placeholder = _props$placeholder === void 0 ? 'Type something' : _props$placeholder,
60876
+ _props$interactiveMod = props.interactiveMode,
60877
+ interactiveMode = _props$interactiveMod === void 0 ? false : _props$interactiveMod,
60876
60878
  InputLabelProps = props.InputLabelProps,
60877
60879
  InputProps = props.InputProps,
60878
60880
  inputProps = props.inputProps,
@@ -60937,11 +60939,6 @@ ActiveFormTextField.propTypes = {
60937
60939
  /** Allow to use required validator in any validation trigger, not only form submit. */
60938
60940
  withRequiredValidator: PropTypes.bool
60939
60941
  };
60940
- ActiveFormTextField.defaultProps = {
60941
- placeholder: 'Type something',
60942
- interactiveMode: false,
60943
- variant: 'outlined'
60944
- };
60945
60942
 
60946
60943
  var _excluded$h = ["select", "typographyVariant", "className", "interactiveMode", "placeholder", "readOnly", "InputLabelProps", "InputProps", "inputProps", "SelectProps"];
60947
60944
  var PREFIX$i = 'ActiveFormSelect';
@@ -60995,8 +60992,10 @@ function ActiveFormSelect(props) {
60995
60992
  props.select;
60996
60993
  var typographyVariant = props.typographyVariant,
60997
60994
  className = props.className,
60998
- interactiveMode = props.interactiveMode,
60999
- placeholder = props.placeholder,
60995
+ _props$interactiveMod = props.interactiveMode,
60996
+ interactiveMode = _props$interactiveMod === void 0 ? false : _props$interactiveMod,
60997
+ _props$placeholder = props.placeholder,
60998
+ placeholder = _props$placeholder === void 0 ? 'Select' : _props$placeholder,
61000
60999
  readOnly = props.readOnly,
61001
61000
  InputLabelProps = props.InputLabelProps,
61002
61001
  InputProps = props.InputProps,
@@ -61084,10 +61083,6 @@ ActiveFormSelect.propTypes = {
61084
61083
  /** Allow to use required validator in any validation trigger, not only form submit. */
61085
61084
  withRequiredValidator: PropTypes.bool
61086
61085
  };
61087
- ActiveFormSelect.defaultProps = {
61088
- placeholder: 'Select',
61089
- interactiveMode: false
61090
- };
61091
61086
 
61092
61087
  var _excluded$g = ["readOnly", "InputProps"];
61093
61088
  /**
@@ -61138,10 +61133,14 @@ var _excluded$f = ["inputPrefix", "decimalScale", "fixedDecimalScale", "textAlig
61138
61133
  * The UCurrencyField is for creating currency input fields. It accepts several props for customization, including "inputPrefix," "decimalScale," "fixedDecimalScale," "textAlign," and etc
61139
61134
  */
61140
61135
  function UCurrencyField(_ref) {
61141
- var inputPrefix = _ref.inputPrefix,
61142
- decimalScale = _ref.decimalScale,
61143
- fixedDecimalScale = _ref.fixedDecimalScale,
61144
- textAlign = _ref.textAlign,
61136
+ var _ref$inputPrefix = _ref.inputPrefix,
61137
+ inputPrefix = _ref$inputPrefix === void 0 ? '$ ' : _ref$inputPrefix,
61138
+ _ref$decimalScale = _ref.decimalScale,
61139
+ decimalScale = _ref$decimalScale === void 0 ? 2 : _ref$decimalScale,
61140
+ _ref$fixedDecimalScal = _ref.fixedDecimalScale,
61141
+ fixedDecimalScale = _ref$fixedDecimalScal === void 0 ? true : _ref$fixedDecimalScal,
61142
+ _ref$textAlign = _ref.textAlign,
61143
+ textAlign = _ref$textAlign === void 0 ? 'right' : _ref$textAlign,
61145
61144
  inputProps = _ref.inputProps,
61146
61145
  props = _objectWithoutProperties$2(_ref, _excluded$f);
61147
61146
  return /*#__PURE__*/React$1.createElement(UPositiveInteger, _extends$1({
@@ -61190,12 +61189,6 @@ UCurrencyField.propTypes = {
61190
61189
  // If true it add 0s to match given decimalScale.
61191
61190
  fixedDecimalScale: PropTypes.bool
61192
61191
  };
61193
- UCurrencyField.defaultProps = {
61194
- inputPrefix: '$ ',
61195
- decimalScale: 2,
61196
- fixedDecimalScale: true,
61197
- textAlign: 'right'
61198
- };
61199
61192
 
61200
61193
  var _excluded$e = ["InputProps"];
61201
61194
 
@@ -61510,7 +61503,8 @@ function URadioButtons(_ref3) {
61510
61503
  var value = _ref3.value,
61511
61504
  onChange = _ref3.onChange,
61512
61505
  isReadOnly = _ref3.isReadOnly,
61513
- variant = _ref3.variant,
61506
+ _ref3$variant = _ref3.variant,
61507
+ variant = _ref3$variant === void 0 ? 'row' : _ref3$variant,
61514
61508
  optionLabels = _ref3.optionLabels,
61515
61509
  optionValues = _ref3.optionValues;
61516
61510
  var handleOnChange = function handleOnChange(event) {
@@ -61552,9 +61546,6 @@ URadioButtons.propTypes = {
61552
61546
  /**array of radio button values */
61553
61547
  optionValues: PropTypes.array
61554
61548
  };
61555
- URadioButtons.defaultProps = {
61556
- variant: 'row'
61557
- };
61558
61549
 
61559
61550
  var HighlightOff = {};
61560
61551
 
@@ -61712,7 +61703,8 @@ UPageLoadingProgress.propTypes = {
61712
61703
  */
61713
61704
  function UErrorAlert(_ref) {
61714
61705
  var error = _ref.error,
61715
- preformatted = _ref.preformatted,
61706
+ _ref$preformatted = _ref.preformatted,
61707
+ preformatted = _ref$preformatted === void 0 ? false : _ref$preformatted,
61716
61708
  _onClose = _ref.onClose;
61717
61709
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, error && /*#__PURE__*/React$1.createElement(Box$1, {
61718
61710
  marginTop: 2,
@@ -61732,9 +61724,6 @@ UErrorAlert.propTypes = {
61732
61724
  /** Triggers close action of error alert */
61733
61725
  onClose: PropTypes.func
61734
61726
  };
61735
- UErrorAlert.defaultProps = {
61736
- preformatted: false
61737
- };
61738
61727
 
61739
61728
  var PREFIX$d = 'UAutoComplete';
61740
61729
  var classes$d = {
@@ -61767,9 +61756,12 @@ function UAutoComplete(_ref3) {
61767
61756
  readOnly = _ref3.readOnly,
61768
61757
  minLength = _ref3.minLength,
61769
61758
  maxLength = _ref3.maxLength,
61770
- usedItemIds = _ref3.usedItemIds,
61771
- allowContextSpecific = _ref3.allowContextSpecific,
61772
- counter = _ref3.counter,
61759
+ _ref3$usedItemIds = _ref3.usedItemIds,
61760
+ usedItemIds = _ref3$usedItemIds === void 0 ? [] : _ref3$usedItemIds,
61761
+ _ref3$allowContextSpe = _ref3.allowContextSpecific,
61762
+ allowContextSpecific = _ref3$allowContextSpe === void 0 ? false : _ref3$allowContextSpe,
61763
+ _ref3$counter = _ref3.counter,
61764
+ counter = _ref3$counter === void 0 ? false : _ref3$counter,
61773
61765
  placeholder = _ref3.placeholder,
61774
61766
  InputLabelProps = _ref3.InputLabelProps;
61775
61767
  _ref3.props;
@@ -61917,11 +61909,6 @@ UAutoComplete.propTypes = {
61917
61909
  /** Label props applied to input field*/
61918
61910
  InputLabelProps: PropTypes.object
61919
61911
  };
61920
- UAutoComplete.defaultProps = {
61921
- allowContextSpecific: false,
61922
- counter: false,
61923
- usedItemIds: []
61924
- };
61925
61912
 
61926
61913
  var PREFIX$c = 'UBreadcrumbs';
61927
61914
  var classes$c = {
@@ -62145,8 +62132,10 @@ function UGraphPeoplePicker(_ref) {
62145
62132
  label = _ref.label,
62146
62133
  options = _ref.options,
62147
62134
  onBlur = _ref.onBlur,
62148
- helpText = _ref.helpText,
62149
- isMultiple = _ref.isMultiple,
62135
+ _ref$helpText = _ref.helpText,
62136
+ helpText = _ref$helpText === void 0 ? '' : _ref$helpText,
62137
+ _ref$isMultiple = _ref.isMultiple,
62138
+ isMultiple = _ref$isMultiple === void 0 ? true : _ref$isMultiple,
62150
62139
  searchUsers = _ref.searchUsers,
62151
62140
  components = _ref.components,
62152
62141
  props = _objectWithoutProperties$2(_ref, _excluded$c);
@@ -62252,10 +62241,6 @@ UGraphPeoplePicker.propTypes = {
62252
62241
  /** Props applied to the input label help element. E.g. InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
62253
62242
  InputLabelHelpProps: PropTypes.object
62254
62243
  };
62255
- UGraphPeoplePicker.defaultProps = {
62256
- helpText: '',
62257
- isMultiple: true
62258
- };
62259
62244
 
62260
62245
  var _excluded$b = ["InputProps", "decimalScale", "inputProps", "coordinateType", "validators"];
62261
62246
 
@@ -62275,7 +62260,8 @@ var _excluded$b = ["InputProps", "decimalScale", "inputProps", "coordinateType",
62275
62260
 
62276
62261
  function ActiveFormCoordinateField(_ref) {
62277
62262
  var InputProps = _ref.InputProps,
62278
- decimalScale = _ref.decimalScale,
62263
+ _ref$decimalScale = _ref.decimalScale,
62264
+ decimalScale = _ref$decimalScale === void 0 ? 9 : _ref$decimalScale,
62279
62265
  inputProps = _ref.inputProps,
62280
62266
  coordinateType = _ref.coordinateType,
62281
62267
  validators = _ref.validators,
@@ -62346,9 +62332,6 @@ ActiveFormCoordinateField.propTypes = {
62346
62332
  /** Change to write mode by hiding textfield border and displays border on Hover */
62347
62333
  interactiveMode: PropTypes.bool
62348
62334
  };
62349
- ActiveFormCoordinateField.defaultProps = {
62350
- decimalScale: 9
62351
- };
62352
62335
 
62353
62336
  var _excluded$a = ["readOnly", "InputProps", "decimalScale", "inputProps", "coordinateType", "validators"];
62354
62337
 
@@ -62365,7 +62348,8 @@ var _excluded$a = ["readOnly", "InputProps", "decimalScale", "inputProps", "coor
62365
62348
  function UCoordinateField(_ref) {
62366
62349
  var readOnly = _ref.readOnly,
62367
62350
  InputProps = _ref.InputProps,
62368
- decimalScale = _ref.decimalScale,
62351
+ _ref$decimalScale = _ref.decimalScale,
62352
+ decimalScale = _ref$decimalScale === void 0 ? 9 : _ref$decimalScale,
62369
62353
  inputProps = _ref.inputProps,
62370
62354
  coordinateType = _ref.coordinateType,
62371
62355
  validators = _ref.validators,
@@ -62426,9 +62410,6 @@ UCoordinateField.propTypes = {
62426
62410
  /** Coordinate type */
62427
62411
  coordinateType: PropTypes.oneOf(['latitude', 'longitude']).isRequired
62428
62412
  };
62429
- UCoordinateField.defaultProps = {
62430
- decimalScale: 9
62431
- };
62432
62413
 
62433
62414
  var Search = {};
62434
62415
 
@@ -62488,10 +62469,12 @@ var StyledInputAdornment = styled$1(InputAdornment$1)(function (_ref) {
62488
62469
  function USearchBox(_ref3) {
62489
62470
  var value = _ref3.value,
62490
62471
  onSearch = _ref3.onSearch,
62491
- placeholder = _ref3.placeholder;
62472
+ _ref3$placeholder = _ref3.placeholder,
62473
+ placeholder = _ref3$placeholder === void 0 ? 'Search' : _ref3$placeholder;
62492
62474
  _ref3.inputProps;
62493
62475
  var className = _ref3.className,
62494
- showSeparator = _ref3.showSeparator,
62476
+ _ref3$showSeparator = _ref3.showSeparator,
62477
+ showSeparator = _ref3$showSeparator === void 0 ? true : _ref3$showSeparator,
62495
62478
  iconLabel = _ref3.iconLabel,
62496
62479
  rest = _objectWithoutProperties$2(_ref3, _excluded$9);
62497
62480
  var _useState = React$1.useState(value),
@@ -62570,10 +62553,6 @@ USearchBox.propTypes = {
62570
62553
  /** Label next to the search icon */
62571
62554
  iconLabel: PropTypes.string
62572
62555
  };
62573
- USearchBox.defaultProps = {
62574
- placeholder: 'Search',
62575
- showSeparator: true
62576
- };
62577
62556
 
62578
62557
  var _excluded$8 = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant", "interactiveMode", "readOnly"];
62579
62558
  var PREFIX$9 = 'ActiveDatePicker';
@@ -62696,14 +62675,19 @@ var StyledBox$9 = styled$1(Box$1, {
62696
62675
  * Please have look at [Material UI Time Picker](https://mui.com/x/api/date-pickers/time-picker/) for more details
62697
62676
  */
62698
62677
  function ActiveTimePicker(_ref5) {
62699
- var inputFormat = _ref5.inputFormat,
62678
+ var _ref5$inputFormat = _ref5.inputFormat,
62679
+ inputFormat = _ref5$inputFormat === void 0 ? 'hh:mm a' : _ref5$inputFormat,
62700
62680
  label = _ref5.label,
62701
62681
  onChange = _ref5.onChange,
62702
62682
  value = _ref5.value,
62703
62683
  showLabelHelp = _ref5.showLabelHelp,
62704
- InputLabelProps = _ref5.InputLabelProps,
62684
+ _ref5$InputLabelProps = _ref5.InputLabelProps,
62685
+ InputLabelProps = _ref5$InputLabelProps === void 0 ? {
62686
+ shrink: true
62687
+ } : _ref5$InputLabelProps,
62705
62688
  InputLabelHelpProps = _ref5.InputLabelHelpProps,
62706
- inputVariant = _ref5.inputVariant,
62689
+ _ref5$inputVariant = _ref5.inputVariant,
62690
+ inputVariant = _ref5$inputVariant === void 0 ? 'outlined' : _ref5$inputVariant,
62707
62691
  interactiveMode = _ref5.interactiveMode,
62708
62692
  readOnly = _ref5.readOnly,
62709
62693
  others = _objectWithoutProperties$2(_ref5, _excluded$7);
@@ -62753,13 +62737,6 @@ ActiveTimePicker.propTypes = {
62753
62737
  /** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
62754
62738
  InputLabelHelpProps: PropTypes.object
62755
62739
  };
62756
- ActiveTimePicker.defaultProps = {
62757
- inputVariant: 'outlined',
62758
- InputLabelProps: {
62759
- shrink: true
62760
- },
62761
- inputFormat: 'hh:mm a'
62762
- };
62763
62740
 
62764
62741
  var _excluded$6 = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant", "interactiveMode", "readOnly"];
62765
62742
  var PREFIX$7 = 'ActiveDateTimePicker';