@telefonica/mistica 10.1.0 → 10.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +2 -2
  3. package/dist/card.d.ts +1 -1
  4. package/dist/card.js +1 -1
  5. package/dist/card.js.flow +1 -1
  6. package/dist/icon-button.js +4 -6
  7. package/dist/list.js +9 -14
  8. package/dist/navigation-bar.d.ts +1 -0
  9. package/dist/navigation-bar.js +89 -95
  10. package/dist/navigation-bar.js.flow +1 -0
  11. package/dist/password-field.js +16 -8
  12. package/dist/select.js +67 -63
  13. package/dist/skins/movistar.js +1 -1
  14. package/dist/skins/o2-classic.js +1 -1
  15. package/dist/skins/o2.js +1 -1
  16. package/dist/skins/telefonica.js +1 -1
  17. package/dist/skins/vivo.js +1 -1
  18. package/dist/tabs.js +10 -8
  19. package/dist/text-field-base.js +60 -46
  20. package/dist/text-field-components.d.ts +1 -0
  21. package/dist/text-field-components.js +18 -9
  22. package/dist/text-field-components.js.flow +1 -0
  23. package/dist/text-link.js +20 -23
  24. package/dist/theme-context-provider.js +2 -2
  25. package/dist/theme.d.ts +1 -0
  26. package/dist/theme.js.flow +1 -0
  27. package/dist/utils/media-queries.d.ts +1 -0
  28. package/dist/utils/media-queries.js +6 -1
  29. package/dist/utils/media-queries.js.flow +1 -0
  30. package/dist-es/card.js +1 -1
  31. package/dist-es/icon-button.js +4 -5
  32. package/dist-es/list.js +9 -14
  33. package/dist-es/navigation-bar.js +89 -95
  34. package/dist-es/password-field.js +16 -8
  35. package/dist-es/select.js +67 -63
  36. package/dist-es/skins/movistar.js +1 -1
  37. package/dist-es/skins/o2-classic.js +1 -1
  38. package/dist-es/skins/o2.js +1 -1
  39. package/dist-es/skins/telefonica.js +1 -1
  40. package/dist-es/skins/vivo.js +1 -1
  41. package/dist-es/tabs.js +10 -8
  42. package/dist-es/text-field-base.js +60 -46
  43. package/dist-es/text-field-components.js +18 -9
  44. package/dist-es/text-link.js +7 -10
  45. package/dist-es/theme-context-provider.js +2 -2
  46. package/dist-es/utils/media-queries.js +6 -1
  47. package/package.json +1 -1
package/dist/select.js CHANGED
@@ -132,7 +132,7 @@ function _defineProperty(obj, key, value) {
132
132
  }
133
133
 
134
134
  var useStyles = (0, _jss.createUseStyles)(function (theme) {
135
- var _selectContainer;
135
+ var _selectContainer, _menuItem;
136
136
 
137
137
  return {
138
138
  selectContainer: (_selectContainer = {
@@ -152,7 +152,8 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
152
152
  }), _selectContainer),
153
153
  select: {
154
154
  fontFamily: 'inherit',
155
- backgroundColor: theme.colors.backgroundContainer,
155
+ backgroundColor: 'transparent',
156
+ // FieldContainer gives the correct background color
156
157
  paddingTop: function paddingTop(_ref3) {
157
158
  var label = _ref3.label;
158
159
  return label ? 24 : 16;
@@ -171,19 +172,23 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
171
172
  height: '100%',
172
173
  textOverflow: 'ellipsis',
173
174
  '&:disabled': {
174
- color: theme.colors.border
175
+ color: theme.colors.textDisabled
175
176
  },
176
177
  appearance: 'none',
177
178
  cursor: function cursor(_ref5) {
178
179
  var disabled = _ref5.disabled;
179
- return disabled ? 'initial' : 'pointer';
180
+ return disabled ? 'inherit' : 'pointer';
180
181
  }
181
182
  },
182
183
  arrowDown: {
183
184
  position: 'absolute',
184
185
  right: 16,
185
186
  top: 'calc(50% - 12px)',
186
- pointerEvents: 'none'
187
+ pointerEvents: 'none',
188
+ opacity: function opacity(_ref6) {
189
+ var disabled = _ref6.disabled;
190
+ return disabled ? 0.3 : 1;
191
+ }
187
192
  },
188
193
  selectText: {
189
194
  position: 'absolute',
@@ -193,13 +198,13 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
193
198
  right: 48 + 1,
194
199
  // 48 for icon and +1 for border
195
200
  overflow: 'hidden',
196
- top: function top(_ref6) {
197
- var label = _ref6.label;
201
+ top: function top(_ref7) {
202
+ var label = _ref7.label;
198
203
  return label ? 27 : 17;
199
204
  },
200
205
  fontSize: 16,
201
- color: function color(_ref7) {
202
- var disabled = _ref7.disabled;
206
+ color: function color(_ref8) {
207
+ var disabled = _ref8.disabled;
203
208
  return disabled ? theme.colors.textDisabled : theme.colors.textPrimary;
204
209
  },
205
210
  maxWidth: '100%',
@@ -211,16 +216,16 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
211
216
  padding: 0,
212
217
  listStyleType: 'none',
213
218
  position: 'absolute',
214
- top: function top(_ref8) {
215
- var optionsComputedProps = _ref8.optionsComputedProps;
219
+ top: function top(_ref9) {
220
+ var optionsComputedProps = _ref9.optionsComputedProps;
216
221
  return optionsComputedProps.top;
217
222
  },
218
- left: function left(_ref9) {
219
- var optionsComputedProps = _ref9.optionsComputedProps;
223
+ left: function left(_ref10) {
224
+ var optionsComputedProps = _ref10.optionsComputedProps;
220
225
  return optionsComputedProps.left;
221
226
  },
222
- minWidth: function minWidth(_ref10) {
223
- var optionsComputedProps = _ref10.optionsComputedProps;
227
+ minWidth: function minWidth(_ref11) {
228
+ var optionsComputedProps = _ref11.optionsComputedProps;
224
229
  return optionsComputedProps.width;
225
230
  },
226
231
  borderRadius: 4,
@@ -228,23 +233,23 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
228
233
  backgroundColor: theme.colors.backgroundContainer,
229
234
  paddingTop: 8,
230
235
  paddingBottom: 8,
231
- transformOrigin: function transformOrigin(_ref11) {
232
- var optionsComputedProps = _ref11.optionsComputedProps;
236
+ transformOrigin: function transformOrigin(_ref12) {
237
+ var optionsComputedProps = _ref12.optionsComputedProps;
233
238
  return optionsComputedProps.transformOrigin;
234
239
  },
235
240
  transition: 'opacity .03s linear,transform .12s cubic-bezier(0,0,.2,1) .15s',
236
- opacity: function opacity(_ref12) {
237
- var animateShowOptions = _ref12.animateShowOptions;
241
+ opacity: function opacity(_ref13) {
242
+ var animateShowOptions = _ref13.animateShowOptions;
238
243
  return animateShowOptions ? 1 : 0;
239
244
  },
240
- transform: function transform(_ref13) {
241
- var animateShowOptions = _ref13.animateShowOptions;
245
+ transform: function transform(_ref14) {
246
+ var animateShowOptions = _ref14.animateShowOptions;
242
247
  return animateShowOptions ? 'scale(1)' : 'scale(0)';
243
248
  },
244
- maxHeight: function maxHeight(_ref14) {
249
+ maxHeight: function maxHeight(_ref15) {
245
250
  var _optionsComputedProps;
246
251
 
247
- var optionsComputedProps = _ref14.optionsComputedProps;
252
+ var optionsComputedProps = _ref15.optionsComputedProps;
248
253
  return (_optionsComputedProps = optionsComputedProps.maxHeight) !== null && _optionsComputedProps !== void 0 ? _optionsComputedProps : '416px';
249
254
  },
250
255
  overflowY: 'auto'
@@ -252,40 +257,38 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
252
257
  menuItemSelected: {
253
258
  backgroundColor: 'rgba(0, 0, 0, 0.14)'
254
259
  },
255
- menuItem: {
260
+ menuItem: (_menuItem = {
256
261
  color: theme.colors.textPrimary,
257
262
  lineHeight: 1.5,
258
263
  padding: '6px 16px',
259
264
  height: 48,
260
- transition: 'background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
265
+ transition: 'background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms'
266
+ }, _defineProperty(_menuItem, theme.mq.supportsHover, {
261
267
  '&:hover': {
262
268
  backgroundColor: 'rgba(0, 0, 0, 0.08)'
263
- },
264
- display: 'flex',
265
- alignItems: 'center',
266
- cursor: 'pointer'
267
- }
269
+ }
270
+ }), _defineProperty(_menuItem, "display", 'flex'), _defineProperty(_menuItem, "alignItems", 'center'), _defineProperty(_menuItem, "cursor", 'pointer'), _menuItem)
268
271
  };
269
272
  });
270
273
 
271
- var Select = function Select(_ref15) {
272
- var _ref19, _inputRef$current;
273
-
274
- var id = _ref15.id,
275
- label = _ref15.label,
276
- helperTextProp = _ref15.helperText,
277
- valueProp = _ref15.value,
278
- onChangeValueProp = _ref15.onChangeValue,
279
- name = _ref15.name,
280
- fullWidth = _ref15.fullWidth,
281
- options = _ref15.options,
282
- optional = _ref15.optional,
283
- disabledProp = _ref15.disabled,
284
- errorProp = _ref15.error,
285
- _onBlur = _ref15.onBlur,
286
- _ref15$autoFocus = _ref15.autoFocus,
287
- autoFocus = _ref15$autoFocus === void 0 ? false : _ref15$autoFocus,
288
- native = _ref15.native;
274
+ var Select = function Select(_ref16) {
275
+ var _ref20, _inputRef$current;
276
+
277
+ var id = _ref16.id,
278
+ label = _ref16.label,
279
+ helperTextProp = _ref16.helperText,
280
+ valueProp = _ref16.value,
281
+ onChangeValueProp = _ref16.onChangeValue,
282
+ name = _ref16.name,
283
+ fullWidth = _ref16.fullWidth,
284
+ options = _ref16.options,
285
+ optional = _ref16.optional,
286
+ disabledProp = _ref16.disabled,
287
+ errorProp = _ref16.error,
288
+ _onBlur = _ref16.onBlur,
289
+ _ref16$autoFocus = _ref16.autoFocus,
290
+ autoFocus = _ref16$autoFocus === void 0 ? false : _ref16$autoFocus,
291
+ native = _ref16.native;
289
292
  var inputRef = React.useRef(null);
290
293
  var focusableRef = React.useRef(null);
291
294
  var fieldRef = React.useRef(null);
@@ -488,8 +491,8 @@ var Select = function Select(_ref15) {
488
491
  var _options$value, _options;
489
492
 
490
493
  (0, _dom.cancelEvent)(e);
491
- var newTentativeValueState = (_options$value = (_options = options[options.findIndex(function (_ref16) {
492
- var value = _ref16.value;
494
+ var newTentativeValueState = (_options$value = (_options = options[options.findIndex(function (_ref17) {
495
+ var value = _ref17.value;
493
496
  return value === tentativeValueState;
494
497
  }) + operand]) === null || _options === void 0 ? void 0 : _options.value) !== null && _options$value !== void 0 ? _options$value : tentativeValueState;
495
498
  setTentativeValueState(newTentativeValueState);
@@ -510,8 +513,8 @@ var Select = function Select(_ref15) {
510
513
  if (e.keyCode === _keyCodes.ENTER || e.keyCode === _keyCodes.SPACE) {
511
514
  (0, _dom.cancelEvent)(e);
512
515
 
513
- if (options.findIndex(function (_ref17) {
514
- var value = _ref17.value;
516
+ if (options.findIndex(function (_ref18) {
517
+ var value = _ref18.value;
515
518
  return value === tentativeValueState;
516
519
  }) !== -1 && tentativeValueState !== valueState) {
517
520
  setValue(tentativeValueState);
@@ -549,8 +552,8 @@ var Select = function Select(_ref15) {
549
552
  var getOptionText = function getOptionText(val) {
550
553
  var _options$find;
551
554
 
552
- return val ? (_options$find = options.find(function (_ref18) {
553
- var value = _ref18.value;
555
+ return val ? (_options$find = options.find(function (_ref19) {
556
+ var value = _ref19.value;
554
557
  return value === val;
555
558
  })) === null || _options$find === void 0 ? void 0 : _options$find.text : '';
556
559
  };
@@ -575,6 +578,7 @@ var Select = function Select(_ref15) {
575
578
  }
576
579
  };
577
580
  return shouldUseNative ? /*#__PURE__*/React.createElement(_textFieldComponents.FieldContainer, {
581
+ disabled: disabled,
578
582
  helperText: /*#__PURE__*/React.createElement(_textFieldComponents.HelperText, {
579
583
  error: error,
580
584
  leftText: helperText
@@ -584,7 +588,7 @@ var Select = function Select(_ref15) {
584
588
  }, label && /*#__PURE__*/React.createElement(_textFieldComponents.Label, {
585
589
  error: error,
586
590
  forId: inputId,
587
- inputState: isFocused ? 'focused' : ((_ref19 = value !== null && value !== void 0 ? value : valueState) !== null && _ref19 !== void 0 ? _ref19 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) ? 'filled' : 'default',
591
+ inputState: isFocused ? 'focused' : ((_ref20 = value !== null && value !== void 0 ? value : valueState) !== null && _ref20 !== void 0 ? _ref20 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value) ? 'filled' : 'default',
588
592
  disabled: disabled,
589
593
  optional: optional
590
594
  }, label), /*#__PURE__*/React.createElement("select", {
@@ -617,8 +621,8 @@ var Select = function Select(_ref15) {
617
621
  // Without this fix, the label is invisible when disabled
618
622
  opacity: 1
619
623
  }
620
- }, options.every(function (_ref20) {
621
- var value = _ref20.value;
624
+ }, options.every(function (_ref21) {
625
+ var value = _ref21.value;
622
626
  return !!value;
623
627
  }) &&
624
628
  /*#__PURE__*/
@@ -629,9 +633,9 @@ var Select = function Select(_ref15) {
629
633
  style: {
630
634
  display: 'none'
631
635
  }
632
- }), options.map(function (_ref21) {
633
- var val = _ref21.value,
634
- text = _ref21.text;
636
+ }), options.map(function (_ref22) {
637
+ var val = _ref22.value,
638
+ text = _ref22.text;
635
639
  return /*#__PURE__*/React.createElement("option", {
636
640
  key: val,
637
641
  value: val
@@ -675,9 +679,9 @@ var Select = function Select(_ref15) {
675
679
  className: classes.optionsContainer,
676
680
  role: "listbox",
677
681
  ref: optionsMenuRef
678
- }, options.map(function (_ref22) {
679
- var val = _ref22.value,
680
- text = _ref22.text;
682
+ }, options.map(function (_ref23) {
683
+ var val = _ref23.value,
684
+ text = _ref23.text;
681
685
  return /*#__PURE__*/React.createElement("li", {
682
686
  role: "option",
683
687
  "aria-selected": val === (valueState !== null && valueState !== void 0 ? valueState : value),
@@ -138,7 +138,7 @@ var getMovistarSkin = function getMovistarSkin(variant) {
138
138
  textPrimaryInverse: palette.white,
139
139
  textSecondary: palette.grey5,
140
140
  textSecondaryInverse: palette.white,
141
- textDisabled: palette.grey3,
141
+ textDisabled: palette.grey4,
142
142
  textAmount: palette.movistarBlue,
143
143
  // STATES
144
144
  error: palette.pepper,
@@ -144,7 +144,7 @@ var getO2ClassicSkin = function getO2ClassicSkin() {
144
144
  textPrimaryInverse: palette.white,
145
145
  textSecondary: palette.grey5,
146
146
  textSecondaryInverse: palette.white,
147
- textDisabled: palette.grey3,
147
+ textDisabled: palette.grey4,
148
148
  textAmount: palette.o2SkyBlue,
149
149
  // STATES
150
150
  error: palette.pepper,
package/dist/skins/o2.js CHANGED
@@ -144,7 +144,7 @@ var getO2Skin = function getO2Skin() {
144
144
  textPrimaryInverse: palette.white,
145
145
  textSecondary: palette.grey5,
146
146
  textSecondaryInverse: palette.white,
147
- textDisabled: palette.grey3,
147
+ textDisabled: palette.grey4,
148
148
  textAmount: palette.o2BluePrimary,
149
149
  // STATES
150
150
  error: palette.pepper,
@@ -138,7 +138,7 @@ var getTelefonicaSkin = function getTelefonicaSkin() {
138
138
  textPrimaryInverse: palette.white,
139
139
  textSecondary: palette.grey5,
140
140
  textSecondaryInverse: palette.white,
141
- textDisabled: palette.grey3,
141
+ textDisabled: palette.grey4,
142
142
  textAmount: palette.telefonicaBlue,
143
143
  // STATES
144
144
  error: palette.coral,
@@ -132,7 +132,7 @@ var getVivoSkin = function getVivoSkin() {
132
132
  textPrimaryInverse: palette.white,
133
133
  textSecondary: palette.grey5,
134
134
  textSecondaryInverse: palette.white,
135
- textDisabled: palette.grey3,
135
+ textDisabled: palette.grey4,
136
136
  textAmount: palette.vivoPurple,
137
137
  // STATES
138
138
  error: palette.pepper,
package/dist/tabs.js CHANGED
@@ -111,6 +111,8 @@ var TAB_MAX_WIDTH = 284;
111
111
  var TAB_HEIGHT = 56;
112
112
  var LINE_ANIMATION_DURATION_MS = (0, _platform.isRunningAcceptanceTest)() ? 0 : 300;
113
113
  var useStyles = (0, _jss.createUseStyles)(function (_ref) {
114
+ var _tab;
115
+
114
116
  var colors = _ref.colors,
115
117
  mq = _ref.mq;
116
118
  return {
@@ -138,7 +140,7 @@ var useStyles = (0, _jss.createUseStyles)(function (_ref) {
138
140
  height: TAB_HEIGHT,
139
141
  display: 'flex'
140
142
  },
141
- tab: _defineProperty({
143
+ tab: (_tab = {
142
144
  flex: '1 0 80px',
143
145
  display: 'inline-flex',
144
146
  alignItems: 'center',
@@ -160,19 +162,19 @@ var useStyles = (0, _jss.createUseStyles)(function (_ref) {
160
162
  }
161
163
 
162
164
  return TAB_MAX_WIDTH;
163
- },
165
+ }
166
+ }, _defineProperty(_tab, mq.supportsHover, {
164
167
  '&:hover': {
165
168
  color: colors.textPrimary
166
- },
167
- fallbacks: {
168
- maxWidth: TAB_MAX_WIDTH // max() is not supported by all browsers
169
-
170
169
  }
171
- }, mq.desktopOrBigger, {
170
+ }), _defineProperty(_tab, "fallbacks", {
171
+ maxWidth: TAB_MAX_WIDTH // max() is not supported by all browsers
172
+
173
+ }), _defineProperty(_tab, mq.desktopOrBigger, {
172
174
  flex: '0 1 208px',
173
175
  padding: "16px 32px",
174
176
  maxWidth: TAB_MAX_WIDTH
175
- }),
177
+ }), _tab),
176
178
  tabWithIcon: _defineProperty({
177
179
  flexBasis: 112
178
180
  }, mq.desktopOrBigger, {
@@ -244,7 +244,8 @@ var commonInputStyles = function commonInputStyles(theme) {
244
244
  }
245
245
  },
246
246
  '&:disabled': {
247
- color: theme.colors.border
247
+ color: theme.colors.textDisabled,
248
+ cursor: 'not-allowed'
248
249
  },
249
250
  boxShadow: 'none' // reset FF red shadow styles for required inputs
250
251
 
@@ -342,7 +343,11 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
342
343
  paddingLeft: 8,
343
344
  paddingRight: 16,
344
345
  display: 'flex',
345
- alignItems: 'center'
346
+ alignItems: 'center',
347
+ opacity: function opacity(_ref8) {
348
+ var disabled = _ref8.disabled;
349
+ return disabled ? 0.3 : 1;
350
+ }
346
351
  },
347
352
  startIcon: {
348
353
  pointerEvents: 'none',
@@ -352,24 +357,31 @@ var useStyles = (0, _jss.createUseStyles)(function (theme) {
352
357
  display: 'flex',
353
358
  alignItems: 'center',
354
359
  height: '100%',
355
- position: 'absolute'
360
+ position: 'absolute',
361
+ opacity: function opacity(_ref9) {
362
+ var disabled = _ref9.disabled;
363
+ return disabled ? 0.3 : 1;
364
+ }
356
365
  },
357
366
  prefix: {
358
- paddingTop: function paddingTop(_ref8) {
359
- var hasLabel = _ref8.hasLabel;
367
+ paddingTop: function paddingTop(_ref10) {
368
+ var hasLabel = _ref10.hasLabel;
360
369
  return hasLabel ? 25 : 16;
361
370
  },
362
- paddingBottom: function paddingBottom(_ref9) {
363
- var hasLabel = _ref9.hasLabel;
371
+ paddingBottom: function paddingBottom(_ref11) {
372
+ var hasLabel = _ref11.hasLabel;
364
373
  return hasLabel ? 8 : 16;
365
374
  },
366
375
  paddingLeft: 12,
367
376
  paddingRight: 16,
368
377
  display: 'flex',
369
378
  alignItems: 'center',
370
- color: theme.colors.textSecondary,
371
- opacity: function opacity(_ref10) {
372
- var inputState = _ref10.inputState;
379
+ color: function color(_ref12) {
380
+ var disabled = _ref12.disabled;
381
+ return disabled ? theme.colors.textDisabled : theme.colors.textSecondary;
382
+ },
383
+ opacity: function opacity(_ref13) {
384
+ var inputState = _ref13.inputState;
373
385
  return inputState === 'default' ? 0 : 1;
374
386
  },
375
387
  transition: 'opacity 150ms cubic-bezier(0.0, 0, 0.2, 1) 0ms'
@@ -381,33 +393,33 @@ var fixAutoComplete = function fixAutoComplete(platformOverrides, autoComplete)
381
393
  return autoComplete === 'off' && (0, _platform.isChrome)(platformOverrides) ? 'nope' : autoComplete;
382
394
  };
383
395
 
384
- var TextFieldBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
396
+ var TextFieldBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
385
397
  var _defaultValue$length;
386
398
 
387
- var error = _ref11.error,
388
- helperText = _ref11.helperText,
389
- label = _ref11.label,
390
- inputProps = _ref11.inputProps,
391
- inputRef = _ref11.inputRef,
392
- defaultValue = _ref11.defaultValue,
393
- value = _ref11.value,
394
- _onFocus = _ref11.onFocus,
395
- _onBlur = _ref11.onBlur,
396
- inputComponent = _ref11.inputComponent,
397
- prefix = _ref11.prefix,
398
- startIcon = _ref11.startIcon,
399
- endIcon = _ref11.endIcon,
400
- endIconOverlay = _ref11.endIconOverlay,
401
- shrinkLabelProp = _ref11.shrinkLabel,
402
- _ref11$multiline = _ref11.multiline,
403
- multiline = _ref11$multiline === void 0 ? false : _ref11$multiline,
404
- focus = _ref11.focus,
405
- fieldRef = _ref11.fieldRef,
406
- maxLength = _ref11.maxLength,
407
- idProp = _ref11.id,
408
- autoCompleteProp = _ref11.autoComplete,
409
- fullWidth = _ref11.fullWidth,
410
- rest = _objectWithoutProperties(_ref11, _excluded);
399
+ var error = _ref14.error,
400
+ helperText = _ref14.helperText,
401
+ label = _ref14.label,
402
+ inputProps = _ref14.inputProps,
403
+ inputRef = _ref14.inputRef,
404
+ defaultValue = _ref14.defaultValue,
405
+ value = _ref14.value,
406
+ _onFocus = _ref14.onFocus,
407
+ _onBlur = _ref14.onBlur,
408
+ inputComponent = _ref14.inputComponent,
409
+ prefix = _ref14.prefix,
410
+ startIcon = _ref14.startIcon,
411
+ endIcon = _ref14.endIcon,
412
+ endIconOverlay = _ref14.endIconOverlay,
413
+ shrinkLabelProp = _ref14.shrinkLabel,
414
+ _ref14$multiline = _ref14.multiline,
415
+ multiline = _ref14$multiline === void 0 ? false : _ref14$multiline,
416
+ focus = _ref14.focus,
417
+ fieldRef = _ref14.fieldRef,
418
+ maxLength = _ref14.maxLength,
419
+ idProp = _ref14.id,
420
+ autoCompleteProp = _ref14.autoComplete,
421
+ fullWidth = _ref14.fullWidth,
422
+ rest = _objectWithoutProperties(_ref14, _excluded);
411
423
 
412
424
  var id = (0, _hooks.useAriaId)(idProp);
413
425
 
@@ -437,7 +449,8 @@ var TextFieldBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref11, ref
437
449
  hasLabel: hasLabel,
438
450
  prefix: prefix,
439
451
  multiline: multiline,
440
- type: rest.type
452
+ type: rest.type,
453
+ disabled: rest.disabled
441
454
  });
442
455
  React.useEffect(function () {
443
456
  if (inputState !== 'focused' && value !== null && value !== void 0 && value.length) {
@@ -496,6 +509,7 @@ var TextFieldBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref11, ref
496
509
  }
497
510
 
498
511
  return /*#__PURE__*/React.createElement(_textFieldComponents.FieldContainer, {
512
+ disabled: rest.disabled,
499
513
  helperText: /*#__PURE__*/React.createElement(_textFieldComponents.HelperText, {
500
514
  error: error,
501
515
  leftText: helperText,
@@ -588,10 +602,10 @@ var Autosuggest = /*#__PURE__*/React.lazy(function () {
588
602
  /* webpackChunkName: "react-autosuggest" */
589
603
  'react-autosuggest');
590
604
  });
591
- var TextFieldBase = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
592
- var getSuggestions = _ref12.getSuggestions,
593
- idProp = _ref12.id,
594
- props = _objectWithoutProperties(_ref12, _excluded2);
605
+ var TextFieldBase = /*#__PURE__*/React.forwardRef(function (_ref15, ref) {
606
+ var getSuggestions = _ref15.getSuggestions,
607
+ idProp = _ref15.id,
608
+ props = _objectWithoutProperties(_ref15, _excluded2);
595
609
 
596
610
  var _React$useState5 = React.useState([]),
597
611
  _React$useState6 = _slicedToArray(_React$useState5, 2),
@@ -628,10 +642,10 @@ var TextFieldBase = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
628
642
  id: id,
629
643
  autoComplete: fixAutoComplete(platformOverrides, 'off'),
630
644
  // @ts-expect-error Autosuggest expects slightly different types
631
- onChange: function onChange(e, _ref13) {
645
+ onChange: function onChange(e, _ref16) {
632
646
  var _props$onChange2;
633
647
 
634
- var newValue = _ref13.newValue; // hack to mutate event value
648
+ var newValue = _ref16.newValue; // hack to mutate event value
635
649
 
636
650
  e.target = _objectSpread(_objectSpread({}, e.target), {}, {
637
651
  value: newValue
@@ -648,8 +662,8 @@ var TextFieldBase = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
648
662
  }));
649
663
  },
650
664
  suggestions: suggestions,
651
- onSuggestionsFetchRequested: function onSuggestionsFetchRequested(_ref14) {
652
- var value = _ref14.value;
665
+ onSuggestionsFetchRequested: function onSuggestionsFetchRequested(_ref17) {
666
+ var value = _ref17.value;
653
667
  return setSuggestions(getSuggestions(value));
654
668
  },
655
669
  onSuggestionsClearRequested: function onSuggestionsClearRequested() {
@@ -658,8 +672,8 @@ var TextFieldBase = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
658
672
  getSuggestionValue: function getSuggestionValue(suggestion) {
659
673
  return suggestion;
660
674
  },
661
- renderSuggestion: function renderSuggestion(suggestion, _ref15) {
662
- var isHighlighted = _ref15.isHighlighted;
675
+ renderSuggestion: function renderSuggestion(suggestion, _ref18) {
676
+ var isHighlighted = _ref18.isHighlighted;
663
677
  return /*#__PURE__*/React.createElement("div", {
664
678
  role: "menuitem",
665
679
  className: (0, _classnames.default)(classes.menuItem, _defineProperty({}, classes.menuItemSelected, isHighlighted))
@@ -21,6 +21,7 @@ declare type HelperTextProps = {
21
21
  export declare const HelperText: React.FC<HelperTextProps>;
22
22
  declare type FieldContainerProps = {
23
23
  multiline?: boolean;
24
+ disabled?: boolean;
24
25
  children: React.ReactNode;
25
26
  helperText?: React.ReactNode;
26
27
  className?: string;
@@ -336,21 +336,30 @@ var useFieldContainerStyles = (0, _jss.createUseStyles)(function (theme) {
336
336
  display: 'flex',
337
337
  position: 'relative',
338
338
  lineHeight: '16px',
339
- backgroundColor: theme.colors.backgroundContainer
339
+ backgroundColor: function backgroundColor(_ref10) {
340
+ var disabled = _ref10.disabled;
341
+ return disabled ? theme.colors.backgroundAlternative : theme.colors.backgroundContainer;
342
+ },
343
+ cursor: function cursor(_ref11) {
344
+ var disabled = _ref11.disabled;
345
+ return disabled ? 'not-allowed' : 'initial';
346
+ }
340
347
  }
341
348
  };
342
349
  });
343
350
 
344
- var FieldContainer = function FieldContainer(_ref10) {
345
- var multiline = _ref10.multiline,
346
- children = _ref10.children,
347
- helperText = _ref10.helperText,
348
- className = _ref10.className,
349
- fieldRef = _ref10.fieldRef,
350
- fullWidth = _ref10.fullWidth;
351
+ var FieldContainer = function FieldContainer(_ref12) {
352
+ var multiline = _ref12.multiline,
353
+ disabled = _ref12.disabled,
354
+ children = _ref12.children,
355
+ helperText = _ref12.helperText,
356
+ className = _ref12.className,
357
+ fieldRef = _ref12.fieldRef,
358
+ fullWidth = _ref12.fullWidth;
351
359
  var classes = useFieldContainerStyles({
352
360
  multiline: multiline,
353
- fullWidth: fullWidth
361
+ fullWidth: fullWidth,
362
+ disabled: disabled
354
363
  });
355
364
  return /*#__PURE__*/React.createElement("div", {
356
365
  className: classes.fieldContainer
@@ -22,6 +22,7 @@ declare type HelperTextProps = {
22
22
  declare export var HelperText: React.ComponentType<HelperTextProps>;
23
23
  declare type FieldContainerProps = {
24
24
  multiline?: boolean,
25
+ disabled?: boolean,
25
26
  children: React.Node,
26
27
  helperText?: React.Node,
27
28
  className?: string,