@unicef/material-ui 0.12.1 → 0.12.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.
package/lib/dev.js CHANGED
@@ -35424,7 +35424,12 @@ function InputComponent(_ref) {
35424
35424
  var inputRef = _ref.inputRef,
35425
35425
  props = objectWithoutProperties(_ref, ['inputRef']);
35426
35426
 
35427
- return React__default.createElement('div', _extends$1({ ref: inputRef }, props));
35427
+ return React__default.createElement('div', _extends$1({
35428
+ ref: inputRef
35429
+ }, props, {
35430
+ required: undefined // Remove required from div element
35431
+ , 'aria-invalid': undefined // Remove aria-invalid from div element
35432
+ }));
35428
35433
  }
35429
35434
 
35430
35435
  InputComponent.propTypes = {
@@ -37249,7 +37254,10 @@ function Input$3(props) {
37249
37254
  describedBy = describedBy || customDescribedBy ? '' + (describedBy ? describedBy : '') + (customDescribedBy ? ' ' + customDescribedBy : '') : undefined;
37250
37255
  }
37251
37256
 
37252
- return React__default.createElement(components.Input, _extends$1({}, props, { 'aria-describedby': describedBy }));
37257
+ return React__default.createElement(components.Input, _extends$1({}, props, {
37258
+ 'aria-describedby': describedBy,
37259
+ required: props && props.selectProps && props.selectProps.required || undefined
37260
+ }));
37253
37261
  }
37254
37262
 
37255
37263
  Input$3.propTypes = {
@@ -53258,7 +53266,8 @@ function ActiveKeyboardDatePicker(props) {
53258
53266
  showLabelHelp = props.showLabelHelp,
53259
53267
  InputLabelHelpProps = props.InputLabelHelpProps,
53260
53268
  label = props.label,
53261
- others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label']);
53269
+ KeyboardButtonProps = props.KeyboardButtonProps,
53270
+ others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
53262
53271
 
53263
53272
  var _React$useState = React__default.useState(classes.icon),
53264
53273
  _React$useState2 = slicedToArray(_React$useState, 2),
@@ -53299,11 +53308,11 @@ function ActiveKeyboardDatePicker(props) {
53299
53308
  disabled: Boolean(readOnly)
53300
53309
  }, inputProps),
53301
53310
  readOnly: readOnly,
53302
- KeyboardButtonProps: {
53311
+ KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
53303
53312
  classes: {
53304
53313
  root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
53305
53314
  }
53306
- },
53315
+ }),
53307
53316
  InputProps: _extends$1({
53308
53317
  classes: {
53309
53318
  root: classes.input + ' ' + (readOnly && classes.inputHover),
@@ -53345,14 +53354,17 @@ ActiveKeyboardDatePicker.propTypes = {
53345
53354
  /** Show label help */
53346
53355
  showLabelHelp: PropTypes__default.bool,
53347
53356
  /** 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}} */
53348
- InputLabelHelpProps: PropTypes__default.object
53357
+ InputLabelHelpProps: PropTypes__default.object,
53358
+ /** Keyboard button props */
53359
+ KeyboardButtonProps: PropTypes__default.object
53349
53360
  };
53350
53361
 
53351
53362
  ActiveKeyboardDatePicker.defaultProps = {
53352
53363
  inputVariant: 'outlined',
53353
53364
  autoOk: true,
53354
53365
  variant: 'inline',
53355
- format: 'dd/MM/yyyy'
53366
+ format: 'dd/MM/yyyy',
53367
+ KeyboardButtonProps: {}
53356
53368
  };
53357
53369
 
53358
53370
  var styles$17 = {
@@ -53675,7 +53687,8 @@ function ActiveKeyboardTimePicker(props) {
53675
53687
  showLabelHelp = props.showLabelHelp,
53676
53688
  InputLabelHelpProps = props.InputLabelHelpProps,
53677
53689
  label = props.label,
53678
- others = objectWithoutProperties(props, ['inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label']);
53690
+ KeyboardButtonProps = props.KeyboardButtonProps,
53691
+ others = objectWithoutProperties(props, ['inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
53679
53692
 
53680
53693
  var _React$useState = React__default.useState(classes.icon),
53681
53694
  _React$useState2 = slicedToArray(_React$useState, 2),
@@ -53714,11 +53727,11 @@ function ActiveKeyboardTimePicker(props) {
53714
53727
  disabled: Boolean(readOnly)
53715
53728
  }, inputProps),
53716
53729
  readOnly: readOnly,
53717
- KeyboardButtonProps: {
53730
+ KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
53718
53731
  classes: {
53719
53732
  root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
53720
53733
  }
53721
- },
53734
+ }),
53722
53735
  InputProps: _extends$1({
53723
53736
  classes: {
53724
53737
  root: classes.input + ' ' + (readOnly && classes.inputHover),
@@ -53756,13 +53769,16 @@ ActiveKeyboardTimePicker.propTypes = {
53756
53769
  /** Show label help */
53757
53770
  showLabelHelp: PropTypes__default.bool,
53758
53771
  /** 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}} */
53759
- InputLabelHelpProps: PropTypes__default.object
53772
+ InputLabelHelpProps: PropTypes__default.object,
53773
+ /** Keyboard button props */
53774
+ KeyboardButtonProps: PropTypes__default.object
53760
53775
  };
53761
53776
 
53762
53777
  ActiveKeyboardTimePicker.defaultProps = {
53763
53778
  inputVariant: 'outlined',
53764
53779
  autoOk: true,
53765
- variant: 'inline'
53780
+ variant: 'inline',
53781
+ KeyboardButtonProps: {}
53766
53782
  };
53767
53783
 
53768
53784
  var filter$1 = createFilterOptions();
@@ -54048,7 +54064,8 @@ function ActiveKeyboardDateTimePicker(props) {
54048
54064
  showLabelHelp = props.showLabelHelp,
54049
54065
  InputLabelHelpProps = props.InputLabelHelpProps,
54050
54066
  label = props.label,
54051
- others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label']);
54067
+ KeyboardButtonProps = props.KeyboardButtonProps,
54068
+ others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
54052
54069
 
54053
54070
  var _React$useState = React__default.useState(classes.icon),
54054
54071
  _React$useState2 = slicedToArray(_React$useState, 2),
@@ -54089,11 +54106,11 @@ function ActiveKeyboardDateTimePicker(props) {
54089
54106
  disabled: Boolean(readOnly)
54090
54107
  }, inputProps),
54091
54108
  readOnly: readOnly,
54092
- KeyboardButtonProps: {
54109
+ KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
54093
54110
  classes: {
54094
54111
  root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
54095
54112
  }
54096
- },
54113
+ }),
54097
54114
  InputProps: _extends$1({
54098
54115
  classes: {
54099
54116
  root: classes.input + ' ' + (readOnly && classes.inputHover),
@@ -54135,14 +54152,17 @@ ActiveKeyboardDateTimePicker.propTypes = {
54135
54152
  /** Show label help */
54136
54153
  showLabelHelp: PropTypes__default.bool,
54137
54154
  /** 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}} */
54138
- InputLabelHelpProps: PropTypes__default.object
54155
+ InputLabelHelpProps: PropTypes__default.object,
54156
+ /** Keyboard button props */
54157
+ KeyboardButtonProps: PropTypes__default.object
54139
54158
  };
54140
54159
 
54141
54160
  ActiveKeyboardDateTimePicker.defaultProps = {
54142
54161
  inputVariant: 'outlined',
54143
54162
  autoOk: true,
54144
54163
  variant: 'inline',
54145
- format: 'dd/MM/yyyy hh:mm a'
54164
+ format: 'dd/MM/yyyy hh:mm a',
54165
+ KeyboardButtonProps: {}
54146
54166
  };
54147
54167
 
54148
54168
  exports.ActiveAutoComplete = ActiveAutoComplete;