@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/prod.js CHANGED
@@ -24657,7 +24657,7 @@ UContent.propTypes = {
24657
24657
  headerHeight: PropTypes.number
24658
24658
  };
24659
24659
 
24660
- var _excluded$13 = ["spinButton", "loading", "variant", "color"];
24660
+ var _excluded$13 = ["spinButton", "loading", "variant", "color", "children"];
24661
24661
  var PREFIX$r = 'UButton';
24662
24662
  var classes$r = {
24663
24663
  root: "".concat(PREFIX$r, "-root"),
@@ -24693,6 +24693,7 @@ function UButton(_ref3) {
24693
24693
  variant = _ref3$variant === void 0 ? 'contained' : _ref3$variant,
24694
24694
  _ref3$color = _ref3.color,
24695
24695
  color = _ref3$color === void 0 ? 'primary' : _ref3$color,
24696
+ children = _ref3.children,
24696
24697
  others = _objectWithoutProperties$2(_ref3, _excluded$13);
24697
24698
  function getVariant(variant) {
24698
24699
  switch (variant) {
@@ -24714,7 +24715,7 @@ function UButton(_ref3) {
24714
24715
  variant: getVariant(variant),
24715
24716
  color: color,
24716
24717
  disableRipple: true
24717
- }, others), props.children);
24718
+ }, others), children);
24718
24719
  return !spinButton ? CustomButton : /*#__PURE__*/React$1.createElement(StyledBox$j, {
24719
24720
  className: classes$r.root
24720
24721
  }, /*#__PURE__*/React$1.createElement(Box$1, {
@@ -45845,14 +45846,19 @@ var _excluded$C = ["inputFormat", "label", "onChange", "value", "showLabelHelp",
45845
45846
  * Please have look at [Material UI Date Picker](https://mui.com/x/react-date-pickers/date-picker/#main-content) for more details
45846
45847
  */
45847
45848
  function UDatePicker(_ref) {
45848
- var inputFormat = _ref.inputFormat,
45849
+ var _ref$inputFormat = _ref.inputFormat,
45850
+ inputFormat = _ref$inputFormat === void 0 ? 'dd/MM/yyyy' : _ref$inputFormat,
45849
45851
  label = _ref.label,
45850
45852
  onChange = _ref.onChange,
45851
45853
  value = _ref.value,
45852
45854
  showLabelHelp = _ref.showLabelHelp,
45853
- InputLabelProps = _ref.InputLabelProps,
45855
+ _ref$InputLabelProps = _ref.InputLabelProps,
45856
+ InputLabelProps = _ref$InputLabelProps === void 0 ? {
45857
+ shrink: true
45858
+ } : _ref$InputLabelProps,
45854
45859
  InputLabelHelpProps = _ref.InputLabelHelpProps,
45855
- inputVariant = _ref.inputVariant,
45860
+ _ref$inputVariant = _ref.inputVariant,
45861
+ inputVariant = _ref$inputVariant === void 0 ? 'outlined' : _ref$inputVariant,
45856
45862
  others = _objectWithoutProperties$2(_ref, _excluded$C);
45857
45863
  return /*#__PURE__*/React$1.createElement(LocalizationProvider, {
45858
45864
  dateAdapter: AdapterDateFns
@@ -45890,13 +45896,6 @@ UDatePicker.propTypes = {
45890
45896
  /** Props applied to the InputLabel element.*/
45891
45897
  InputLabelProps: PropTypes.object
45892
45898
  };
45893
- UDatePicker.defaultProps = {
45894
- inputVariant: 'outlined',
45895
- InputLabelProps: {
45896
- shrink: true
45897
- },
45898
- inputFormat: 'dd/MM/yyyy'
45899
- };
45900
45899
 
45901
45900
  var _excluded$B = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant"];
45902
45901
 
@@ -47649,10 +47648,13 @@ var StyledBox$g = styled$1(Box$1, {
47649
47648
  function ActiveFormTextField(props) {
47650
47649
  var typographyVariant = props.typographyVariant,
47651
47650
  className = props.className,
47652
- variant = props.variant,
47651
+ _props$variant = props.variant,
47652
+ variant = _props$variant === void 0 ? 'outlined' : _props$variant,
47653
47653
  readOnly = props.readOnly,
47654
- placeholder = props.placeholder,
47655
- interactiveMode = props.interactiveMode,
47654
+ _props$placeholder = props.placeholder,
47655
+ placeholder = _props$placeholder === void 0 ? 'Type something' : _props$placeholder,
47656
+ _props$interactiveMod = props.interactiveMode,
47657
+ interactiveMode = _props$interactiveMod === void 0 ? false : _props$interactiveMod,
47656
47658
  InputLabelProps = props.InputLabelProps,
47657
47659
  InputProps = props.InputProps,
47658
47660
  inputProps = props.inputProps,
@@ -47717,11 +47719,6 @@ ActiveFormTextField.propTypes = {
47717
47719
  /** Allow to use required validator in any validation trigger, not only form submit. */
47718
47720
  withRequiredValidator: PropTypes.bool
47719
47721
  };
47720
- ActiveFormTextField.defaultProps = {
47721
- placeholder: 'Type something',
47722
- interactiveMode: false,
47723
- variant: 'outlined'
47724
- };
47725
47722
 
47726
47723
  var _excluded$h = ["select", "typographyVariant", "className", "interactiveMode", "placeholder", "readOnly", "InputLabelProps", "InputProps", "inputProps", "SelectProps"];
47727
47724
  var PREFIX$i = 'ActiveFormSelect';
@@ -47775,8 +47772,10 @@ function ActiveFormSelect(props) {
47775
47772
  props.select;
47776
47773
  var typographyVariant = props.typographyVariant,
47777
47774
  className = props.className,
47778
- interactiveMode = props.interactiveMode,
47779
- placeholder = props.placeholder,
47775
+ _props$interactiveMod = props.interactiveMode,
47776
+ interactiveMode = _props$interactiveMod === void 0 ? false : _props$interactiveMod,
47777
+ _props$placeholder = props.placeholder,
47778
+ placeholder = _props$placeholder === void 0 ? 'Select' : _props$placeholder,
47780
47779
  readOnly = props.readOnly,
47781
47780
  InputLabelProps = props.InputLabelProps,
47782
47781
  InputProps = props.InputProps,
@@ -47864,10 +47863,6 @@ ActiveFormSelect.propTypes = {
47864
47863
  /** Allow to use required validator in any validation trigger, not only form submit. */
47865
47864
  withRequiredValidator: PropTypes.bool
47866
47865
  };
47867
- ActiveFormSelect.defaultProps = {
47868
- placeholder: 'Select',
47869
- interactiveMode: false
47870
- };
47871
47866
 
47872
47867
  var _excluded$g = ["readOnly", "InputProps"];
47873
47868
  /**
@@ -47918,10 +47913,14 @@ var _excluded$f = ["inputPrefix", "decimalScale", "fixedDecimalScale", "textAlig
47918
47913
  * The UCurrencyField is for creating currency input fields. It accepts several props for customization, including "inputPrefix," "decimalScale," "fixedDecimalScale," "textAlign," and etc
47919
47914
  */
47920
47915
  function UCurrencyField(_ref) {
47921
- var inputPrefix = _ref.inputPrefix,
47922
- decimalScale = _ref.decimalScale,
47923
- fixedDecimalScale = _ref.fixedDecimalScale,
47924
- textAlign = _ref.textAlign,
47916
+ var _ref$inputPrefix = _ref.inputPrefix,
47917
+ inputPrefix = _ref$inputPrefix === void 0 ? '$ ' : _ref$inputPrefix,
47918
+ _ref$decimalScale = _ref.decimalScale,
47919
+ decimalScale = _ref$decimalScale === void 0 ? 2 : _ref$decimalScale,
47920
+ _ref$fixedDecimalScal = _ref.fixedDecimalScale,
47921
+ fixedDecimalScale = _ref$fixedDecimalScal === void 0 ? true : _ref$fixedDecimalScal,
47922
+ _ref$textAlign = _ref.textAlign,
47923
+ textAlign = _ref$textAlign === void 0 ? 'right' : _ref$textAlign,
47925
47924
  inputProps = _ref.inputProps,
47926
47925
  props = _objectWithoutProperties$2(_ref, _excluded$f);
47927
47926
  return /*#__PURE__*/React$1.createElement(UPositiveInteger, _extends$1({
@@ -47970,12 +47969,6 @@ UCurrencyField.propTypes = {
47970
47969
  // If true it add 0s to match given decimalScale.
47971
47970
  fixedDecimalScale: PropTypes.bool
47972
47971
  };
47973
- UCurrencyField.defaultProps = {
47974
- inputPrefix: '$ ',
47975
- decimalScale: 2,
47976
- fixedDecimalScale: true,
47977
- textAlign: 'right'
47978
- };
47979
47972
 
47980
47973
  var _excluded$e = ["InputProps"];
47981
47974
 
@@ -48290,7 +48283,8 @@ function URadioButtons(_ref3) {
48290
48283
  var value = _ref3.value,
48291
48284
  onChange = _ref3.onChange,
48292
48285
  isReadOnly = _ref3.isReadOnly,
48293
- variant = _ref3.variant,
48286
+ _ref3$variant = _ref3.variant,
48287
+ variant = _ref3$variant === void 0 ? 'row' : _ref3$variant,
48294
48288
  optionLabels = _ref3.optionLabels,
48295
48289
  optionValues = _ref3.optionValues;
48296
48290
  var handleOnChange = function handleOnChange(event) {
@@ -48332,9 +48326,6 @@ URadioButtons.propTypes = {
48332
48326
  /**array of radio button values */
48333
48327
  optionValues: PropTypes.array
48334
48328
  };
48335
- URadioButtons.defaultProps = {
48336
- variant: 'row'
48337
- };
48338
48329
 
48339
48330
  var HighlightOff = {};
48340
48331
 
@@ -48492,7 +48483,8 @@ UPageLoadingProgress.propTypes = {
48492
48483
  */
48493
48484
  function UErrorAlert(_ref) {
48494
48485
  var error = _ref.error,
48495
- preformatted = _ref.preformatted,
48486
+ _ref$preformatted = _ref.preformatted,
48487
+ preformatted = _ref$preformatted === void 0 ? false : _ref$preformatted,
48496
48488
  _onClose = _ref.onClose;
48497
48489
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, error && /*#__PURE__*/React$1.createElement(Box$1, {
48498
48490
  marginTop: 2,
@@ -48512,9 +48504,6 @@ UErrorAlert.propTypes = {
48512
48504
  /** Triggers close action of error alert */
48513
48505
  onClose: PropTypes.func
48514
48506
  };
48515
- UErrorAlert.defaultProps = {
48516
- preformatted: false
48517
- };
48518
48507
 
48519
48508
  var PREFIX$d = 'UAutoComplete';
48520
48509
  var classes$d = {
@@ -48547,9 +48536,12 @@ function UAutoComplete(_ref3) {
48547
48536
  readOnly = _ref3.readOnly,
48548
48537
  minLength = _ref3.minLength,
48549
48538
  maxLength = _ref3.maxLength,
48550
- usedItemIds = _ref3.usedItemIds,
48551
- allowContextSpecific = _ref3.allowContextSpecific,
48552
- counter = _ref3.counter,
48539
+ _ref3$usedItemIds = _ref3.usedItemIds,
48540
+ usedItemIds = _ref3$usedItemIds === void 0 ? [] : _ref3$usedItemIds,
48541
+ _ref3$allowContextSpe = _ref3.allowContextSpecific,
48542
+ allowContextSpecific = _ref3$allowContextSpe === void 0 ? false : _ref3$allowContextSpe,
48543
+ _ref3$counter = _ref3.counter,
48544
+ counter = _ref3$counter === void 0 ? false : _ref3$counter,
48553
48545
  placeholder = _ref3.placeholder,
48554
48546
  InputLabelProps = _ref3.InputLabelProps;
48555
48547
  _ref3.props;
@@ -48697,11 +48689,6 @@ UAutoComplete.propTypes = {
48697
48689
  /** Label props applied to input field*/
48698
48690
  InputLabelProps: PropTypes.object
48699
48691
  };
48700
- UAutoComplete.defaultProps = {
48701
- allowContextSpecific: false,
48702
- counter: false,
48703
- usedItemIds: []
48704
- };
48705
48692
 
48706
48693
  var PREFIX$c = 'UBreadcrumbs';
48707
48694
  var classes$c = {
@@ -48925,8 +48912,10 @@ function UGraphPeoplePicker(_ref) {
48925
48912
  label = _ref.label,
48926
48913
  options = _ref.options,
48927
48914
  onBlur = _ref.onBlur,
48928
- helpText = _ref.helpText,
48929
- isMultiple = _ref.isMultiple,
48915
+ _ref$helpText = _ref.helpText,
48916
+ helpText = _ref$helpText === void 0 ? '' : _ref$helpText,
48917
+ _ref$isMultiple = _ref.isMultiple,
48918
+ isMultiple = _ref$isMultiple === void 0 ? true : _ref$isMultiple,
48930
48919
  searchUsers = _ref.searchUsers,
48931
48920
  components = _ref.components,
48932
48921
  props = _objectWithoutProperties$2(_ref, _excluded$c);
@@ -49032,10 +49021,6 @@ UGraphPeoplePicker.propTypes = {
49032
49021
  /** 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}} */
49033
49022
  InputLabelHelpProps: PropTypes.object
49034
49023
  };
49035
- UGraphPeoplePicker.defaultProps = {
49036
- helpText: '',
49037
- isMultiple: true
49038
- };
49039
49024
 
49040
49025
  var _excluded$b = ["InputProps", "decimalScale", "inputProps", "coordinateType", "validators"];
49041
49026
 
@@ -49055,7 +49040,8 @@ var _excluded$b = ["InputProps", "decimalScale", "inputProps", "coordinateType",
49055
49040
 
49056
49041
  function ActiveFormCoordinateField(_ref) {
49057
49042
  var InputProps = _ref.InputProps,
49058
- decimalScale = _ref.decimalScale,
49043
+ _ref$decimalScale = _ref.decimalScale,
49044
+ decimalScale = _ref$decimalScale === void 0 ? 9 : _ref$decimalScale,
49059
49045
  inputProps = _ref.inputProps,
49060
49046
  coordinateType = _ref.coordinateType,
49061
49047
  validators = _ref.validators,
@@ -49126,9 +49112,6 @@ ActiveFormCoordinateField.propTypes = {
49126
49112
  /** Change to write mode by hiding textfield border and displays border on Hover */
49127
49113
  interactiveMode: PropTypes.bool
49128
49114
  };
49129
- ActiveFormCoordinateField.defaultProps = {
49130
- decimalScale: 9
49131
- };
49132
49115
 
49133
49116
  var _excluded$a = ["readOnly", "InputProps", "decimalScale", "inputProps", "coordinateType", "validators"];
49134
49117
 
@@ -49145,7 +49128,8 @@ var _excluded$a = ["readOnly", "InputProps", "decimalScale", "inputProps", "coor
49145
49128
  function UCoordinateField(_ref) {
49146
49129
  var readOnly = _ref.readOnly,
49147
49130
  InputProps = _ref.InputProps,
49148
- decimalScale = _ref.decimalScale,
49131
+ _ref$decimalScale = _ref.decimalScale,
49132
+ decimalScale = _ref$decimalScale === void 0 ? 9 : _ref$decimalScale,
49149
49133
  inputProps = _ref.inputProps,
49150
49134
  coordinateType = _ref.coordinateType,
49151
49135
  validators = _ref.validators,
@@ -49206,9 +49190,6 @@ UCoordinateField.propTypes = {
49206
49190
  /** Coordinate type */
49207
49191
  coordinateType: PropTypes.oneOf(['latitude', 'longitude']).isRequired
49208
49192
  };
49209
- UCoordinateField.defaultProps = {
49210
- decimalScale: 9
49211
- };
49212
49193
 
49213
49194
  var Search = {};
49214
49195
 
@@ -49268,10 +49249,12 @@ var StyledInputAdornment = styled$1(InputAdornment$1)(function (_ref) {
49268
49249
  function USearchBox(_ref3) {
49269
49250
  var value = _ref3.value,
49270
49251
  onSearch = _ref3.onSearch,
49271
- placeholder = _ref3.placeholder;
49252
+ _ref3$placeholder = _ref3.placeholder,
49253
+ placeholder = _ref3$placeholder === void 0 ? 'Search' : _ref3$placeholder;
49272
49254
  _ref3.inputProps;
49273
49255
  var className = _ref3.className,
49274
- showSeparator = _ref3.showSeparator,
49256
+ _ref3$showSeparator = _ref3.showSeparator,
49257
+ showSeparator = _ref3$showSeparator === void 0 ? true : _ref3$showSeparator,
49275
49258
  iconLabel = _ref3.iconLabel,
49276
49259
  rest = _objectWithoutProperties$2(_ref3, _excluded$9);
49277
49260
  var _useState = React$1.useState(value),
@@ -49350,10 +49333,6 @@ USearchBox.propTypes = {
49350
49333
  /** Label next to the search icon */
49351
49334
  iconLabel: PropTypes.string
49352
49335
  };
49353
- USearchBox.defaultProps = {
49354
- placeholder: 'Search',
49355
- showSeparator: true
49356
- };
49357
49336
 
49358
49337
  var _excluded$8 = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant", "interactiveMode", "readOnly"];
49359
49338
  var PREFIX$9 = 'ActiveDatePicker';
@@ -49476,14 +49455,19 @@ var StyledBox$9 = styled$1(Box$1, {
49476
49455
  * Please have look at [Material UI Time Picker](https://mui.com/x/api/date-pickers/time-picker/) for more details
49477
49456
  */
49478
49457
  function ActiveTimePicker(_ref5) {
49479
- var inputFormat = _ref5.inputFormat,
49458
+ var _ref5$inputFormat = _ref5.inputFormat,
49459
+ inputFormat = _ref5$inputFormat === void 0 ? 'hh:mm a' : _ref5$inputFormat,
49480
49460
  label = _ref5.label,
49481
49461
  onChange = _ref5.onChange,
49482
49462
  value = _ref5.value,
49483
49463
  showLabelHelp = _ref5.showLabelHelp,
49484
- InputLabelProps = _ref5.InputLabelProps,
49464
+ _ref5$InputLabelProps = _ref5.InputLabelProps,
49465
+ InputLabelProps = _ref5$InputLabelProps === void 0 ? {
49466
+ shrink: true
49467
+ } : _ref5$InputLabelProps,
49485
49468
  InputLabelHelpProps = _ref5.InputLabelHelpProps,
49486
- inputVariant = _ref5.inputVariant,
49469
+ _ref5$inputVariant = _ref5.inputVariant,
49470
+ inputVariant = _ref5$inputVariant === void 0 ? 'outlined' : _ref5$inputVariant,
49487
49471
  interactiveMode = _ref5.interactiveMode,
49488
49472
  readOnly = _ref5.readOnly,
49489
49473
  others = _objectWithoutProperties$2(_ref5, _excluded$7);
@@ -49533,13 +49517,6 @@ ActiveTimePicker.propTypes = {
49533
49517
  /** 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}} */
49534
49518
  InputLabelHelpProps: PropTypes.object
49535
49519
  };
49536
- ActiveTimePicker.defaultProps = {
49537
- inputVariant: 'outlined',
49538
- InputLabelProps: {
49539
- shrink: true
49540
- },
49541
- inputFormat: 'hh:mm a'
49542
- };
49543
49520
 
49544
49521
  var _excluded$6 = ["inputFormat", "label", "onChange", "value", "showLabelHelp", "InputLabelProps", "InputLabelHelpProps", "inputVariant", "interactiveMode", "readOnly"];
49545
49522
  var PREFIX$7 = 'ActiveDateTimePicker';