@carbon/react 1.15.0 → 1.16.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 (71) hide show
  1. package/es/components/CodeSnippet/CodeSnippet.js +2 -2
  2. package/es/components/ComboBox/ComboBox.js +45 -24
  3. package/es/components/DataTable/TableHeader.js +1 -1
  4. package/es/components/DatePicker/DatePicker.js +10 -8
  5. package/es/components/Dropdown/Dropdown.js +2 -2
  6. package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +41 -0
  7. package/es/components/FluidComboBox/FluidComboBox.js +140 -0
  8. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +41 -0
  9. package/es/components/FluidMultiSelect/FluidMultiSelect.js +151 -0
  10. package/es/components/FluidSelect/FluidSelect.Skeleton.js +41 -0
  11. package/es/components/FluidSelect/FluidSelect.js +93 -0
  12. package/es/components/FluidTextArea/FluidTextArea.js +2 -1
  13. package/es/components/InlineLoading/InlineLoading.js +2 -4
  14. package/es/components/ListBox/ListBox.js +2 -1
  15. package/es/components/MultiSelect/FilterableMultiSelect.js +41 -21
  16. package/es/components/MultiSelect/MultiSelect.js +28 -12
  17. package/es/components/NumberInput/NumberInput.js +45 -1
  18. package/es/components/OverflowMenu/OverflowMenu.js +2 -2
  19. package/es/components/Pagination/Pagination.js +271 -270
  20. package/es/components/Pagination/index.js +1 -6
  21. package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -4
  22. package/es/components/Select/Select.js +23 -5
  23. package/es/components/TextArea/TextArea.js +2 -2
  24. package/es/components/TextInput/ControlledPasswordInput.js +2 -3
  25. package/es/components/TextInput/PasswordInput.js +3 -3
  26. package/es/components/TextInput/TextInput.js +7 -8
  27. package/es/components/Tile/next/Tile.js +18 -22
  28. package/es/components/Tooltip/next/DefinitionTooltip.js +11 -2
  29. package/es/components/UIShell/HeaderMenu.js +15 -4
  30. package/es/components/UIShell/SideNavMenu.js +2 -1
  31. package/es/index.js +14 -8
  32. package/es/internal/useNormalizedInputProps.js +15 -18
  33. package/lib/components/CodeSnippet/CodeSnippet.js +2 -2
  34. package/lib/components/ComboBox/ComboBox.js +44 -23
  35. package/lib/components/DataTable/TableHeader.js +1 -1
  36. package/lib/components/DatePicker/DatePicker.js +10 -8
  37. package/lib/components/Dropdown/Dropdown.js +2 -2
  38. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +51 -0
  39. package/lib/components/FluidComboBox/FluidComboBox.js +150 -0
  40. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +51 -0
  41. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +161 -0
  42. package/lib/components/FluidSelect/FluidSelect.Skeleton.js +51 -0
  43. package/lib/components/FluidSelect/FluidSelect.js +103 -0
  44. package/lib/components/FluidTextArea/FluidTextArea.js +2 -1
  45. package/lib/components/InlineLoading/InlineLoading.js +2 -4
  46. package/lib/components/ListBox/ListBox.js +2 -1
  47. package/lib/components/MultiSelect/FilterableMultiSelect.js +40 -20
  48. package/lib/components/MultiSelect/MultiSelect.js +27 -11
  49. package/lib/components/NumberInput/NumberInput.js +45 -1
  50. package/lib/components/OverflowMenu/OverflowMenu.js +2 -2
  51. package/lib/components/Pagination/Pagination.js +269 -268
  52. package/lib/components/Pagination/index.js +2 -24
  53. package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +9 -3
  54. package/lib/components/Select/Select.js +21 -3
  55. package/lib/components/TextArea/TextArea.js +2 -2
  56. package/lib/components/TextInput/ControlledPasswordInput.js +2 -3
  57. package/lib/components/TextInput/PasswordInput.js +3 -3
  58. package/lib/components/TextInput/TextInput.js +7 -8
  59. package/lib/components/Tile/next/Tile.js +18 -22
  60. package/lib/components/Tooltip/next/DefinitionTooltip.js +11 -2
  61. package/lib/components/UIShell/HeaderMenu.js +15 -4
  62. package/lib/components/UIShell/SideNavMenu.js +2 -1
  63. package/lib/index.js +98 -86
  64. package/lib/internal/useNormalizedInputProps.js +14 -17
  65. package/package.json +4 -4
  66. package/scss/components/fluid-select/_fluid-select.scss +9 -0
  67. package/scss/components/fluid-select/_index.scss +9 -0
  68. package/es/components/FileUploader/index.js +0 -15
  69. package/es/components/Pagination/next/Pagination.js +0 -421
  70. package/lib/components/FileUploader/index.js +0 -39
  71. package/lib/components/Pagination/next/Pagination.js +0 -431
@@ -22,7 +22,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
22
22
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
23
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
24
 
25
- var _excluded = ["className"];
25
+ var _excluded = ["className", "vertical"];
26
26
 
27
27
  var _CircleDash, _Step, _Step2, _Step3, _Step4;
28
28
 
@@ -41,11 +41,12 @@ function Step() {
41
41
 
42
42
  function ProgressIndicatorSkeleton(_ref) {
43
43
  var className = _ref.className,
44
+ vertical = _ref.vertical,
44
45
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
45
46
 
46
47
  var prefix = usePrefix.usePrefix();
47
48
  return /*#__PURE__*/React__default["default"].createElement("ul", _rollupPluginBabelHelpers["extends"]({
48
- className: cx__default["default"]("".concat(prefix, "--progress"), "".concat(prefix, "--skeleton"), className)
49
+ className: cx__default["default"]("".concat(prefix, "--progress"), "".concat(prefix, "--skeleton"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--progress--vertical"), vertical), className)
49
50
  }, rest), _Step || (_Step = /*#__PURE__*/React__default["default"].createElement(Step, null)), _Step2 || (_Step2 = /*#__PURE__*/React__default["default"].createElement(Step, null)), _Step3 || (_Step3 = /*#__PURE__*/React__default["default"].createElement(Step, null)), _Step4 || (_Step4 = /*#__PURE__*/React__default["default"].createElement(Step, null)));
50
51
  }
51
52
 
@@ -53,7 +54,12 @@ ProgressIndicatorSkeleton.propTypes = {
53
54
  /**
54
55
  * Specify an optional className to add.
55
56
  */
56
- className: PropTypes__default["default"].string
57
+ className: PropTypes__default["default"].string,
58
+
59
+ /**
60
+ * Determines whether or not the ProgressIndicator should be rendered vertically.
61
+ */
62
+ vertical: PropTypes__default["default"].bool
57
63
  };
58
64
 
59
65
  exports["default"] = ProgressIndicatorSkeleton;
@@ -17,6 +17,7 @@ var iconsReact = require('@carbon/icons-react');
17
17
  var deprecate = require('../../prop-types/deprecate.js');
18
18
  var index = require('../FeatureFlags/index.js');
19
19
  var usePrefix = require('../../internal/usePrefix.js');
20
+ var FormContext = require('../FluidForm/FormContext.js');
20
21
 
21
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
23
 
@@ -54,7 +55,16 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function Select(_
54
55
 
55
56
  var prefix = usePrefix.usePrefix();
56
57
  var enabled = index.useFeatureFlag('enable-v11-release');
57
- var selectClasses = cx__default["default"]((_classNames = {}, _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select"), true), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--inline"), inline), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--invalid"), invalid), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--disabled"), disabled), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--warning"), warn), _classNames), [enabled ? null : className]);
58
+
59
+ var _useContext = React.useContext(FormContext.FormContext),
60
+ isFluid = _useContext.isFluid;
61
+
62
+ var _useState = React.useState(false),
63
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
64
+ isFocused = _useState2[0],
65
+ setIsFocused = _useState2[1];
66
+
67
+ var selectClasses = cx__default["default"]((_classNames = {}, _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select"), true), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--inline"), inline), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--invalid"), invalid), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--disabled"), disabled), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--warning"), warn), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--fluid--invalid"), isFluid && invalid), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--select--fluid--focus"), isFluid && isFocused), _classNames), [enabled ? null : className]);
58
68
  var labelClasses = cx__default["default"]("".concat(prefix, "--label"), (_classNames2 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--visually-hidden"), hideLabel), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--label--disabled"), disabled), _classNames2));
59
69
  var inputClasses = cx__default["default"]((_classNames3 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--select-input"), true), _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--select-input--").concat(size), size), _classNames3));
60
70
  var errorId = "".concat(id, "-error-msg");
@@ -83,6 +93,10 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function Select(_
83
93
  ariaProps['aria-describedby'] = errorId;
84
94
  }
85
95
 
96
+ var handleFocus = function handleFocus(evt) {
97
+ setIsFocused(evt.type === 'focus' ? true : false);
98
+ };
99
+
86
100
  var input = function () {
87
101
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("select", _rollupPluginBabelHelpers["extends"]({}, other, ariaProps, {
88
102
  id: id,
@@ -113,8 +127,12 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function Select(_
113
127
  "data-invalid": invalid || null
114
128
  }, input), error), !inline && /*#__PURE__*/React__default["default"].createElement("div", {
115
129
  className: "".concat(prefix, "--select-input__wrapper"),
116
- "data-invalid": invalid || null
117
- }, input), !inline && error ? error : helper));
130
+ "data-invalid": invalid || null,
131
+ onFocus: handleFocus,
132
+ onBlur: handleFocus
133
+ }, input), isFluid && /*#__PURE__*/React__default["default"].createElement("hr", {
134
+ className: "".concat(prefix, "--select__divider")
135
+ }), !inline && error ? error : helper));
118
136
  });
119
137
  Select.displayName = 'Select';
120
138
  Select.propTypes = {
@@ -13,6 +13,7 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
13
13
  var PropTypes = require('prop-types');
14
14
  var React = require('react');
15
15
  var cx = require('classnames');
16
+ var deprecate = require('../../prop-types/deprecate.js');
16
17
  var iconsReact = require('@carbon/icons-react');
17
18
  var index = require('../FeatureFlags/index.js');
18
19
  var usePrefix = require('../../internal/usePrefix.js');
@@ -186,7 +187,7 @@ TextArea.propTypes = {
186
187
  * `true` to use the light version. For use on $ui-01 backgrounds only.
187
188
  * Don't use this to make tile background color same as container background color.
188
189
  */
189
- light: PropTypes__default["default"].bool,
190
+ light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `TextArea` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
190
191
 
191
192
  /**
192
193
  * Max character count allowed for the textarea. This is needed in order for enableCounter to display
@@ -230,7 +231,6 @@ TextArea.defaultProps = {
230
231
  invalid: false,
231
232
  invalidText: '',
232
233
  helperText: '',
233
- light: false,
234
234
  enableCounter: false,
235
235
  maxCount: undefined
236
236
  };
@@ -16,6 +16,7 @@ var PropTypes = require('prop-types');
16
16
  var iconsReact = require('@carbon/icons-react');
17
17
  var util = require('./util.js');
18
18
  var warning = require('../../internal/warning.js');
19
+ var deprecate = require('../../prop-types/deprecate.js');
19
20
  var usePrefix = require('../../internal/usePrefix.js');
20
21
 
21
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -182,7 +183,7 @@ ControlledPasswordInput.propTypes = {
182
183
  * `true` to use the light version. For use on $ui-01 backgrounds only.
183
184
  * Don't use this to make tile background color same as container background color.
184
185
  */
185
- light: PropTypes__default["default"].bool,
186
+ light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `ControlledPasswordInput` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
186
187
 
187
188
  /**
188
189
  * Optionally provide an `onChange` handler that is called whenever `<input>`
@@ -229,14 +230,12 @@ ControlledPasswordInput.propTypes = {
229
230
  value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
230
231
  };
231
232
  ControlledPasswordInput.defaultProps = {
232
- className: '${prefix}--text__input',
233
233
  disabled: false,
234
234
  onChange: function onChange() {},
235
235
  onClick: function onClick() {},
236
236
  invalid: false,
237
237
  invalidText: '',
238
238
  helperText: '',
239
- light: false,
240
239
  size: ''
241
240
  };
242
241
  var ControlledPasswordInput$1 = ControlledPasswordInput;
@@ -17,6 +17,7 @@ var iconsReact = require('@carbon/icons-react');
17
17
  var useNormalizedInputProps = require('../../internal/useNormalizedInputProps.js');
18
18
  var util = require('./util.js');
19
19
  var FeatureFlags = require('@carbon/feature-flags');
20
+ var deprecate = require('../../prop-types/deprecate.js');
20
21
  var usePrefix = require('../../internal/usePrefix.js');
21
22
  var FormContext = require('../FluidForm/FormContext.js');
22
23
 
@@ -62,8 +63,7 @@ var PasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function P
62
63
  invalid = _ref$invalid === void 0 ? false : _ref$invalid,
63
64
  invalidText = _ref.invalidText,
64
65
  labelText = _ref.labelText,
65
- _ref$light = _ref.light,
66
- light = _ref$light === void 0 ? false : _ref$light,
66
+ light = _ref.light,
67
67
  _ref$onChange = _ref.onChange,
68
68
  _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
69
69
  _ref$onClick = _ref.onClick,
@@ -244,7 +244,7 @@ PasswordInput.propTypes = {
244
244
  * `true` to use the light version. For use on $ui-01 backgrounds only.
245
245
  * Don't use this to make tile background color same as container background color.
246
246
  */
247
- light: PropTypes__default["default"].bool,
247
+ light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `PasswordInput` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
248
248
 
249
249
  /**
250
250
  * Optionally provide an `onChange` handler that is called whenever `<input>`
@@ -16,6 +16,7 @@ var cx = require('classnames');
16
16
  var useNormalizedInputProps = require('../../internal/useNormalizedInputProps.js');
17
17
  var PasswordInput = require('./PasswordInput.js');
18
18
  var ControlledPasswordInput = require('./ControlledPasswordInput.js');
19
+ var deprecate = require('../../prop-types/deprecate.js');
19
20
  var util = require('./util.js');
20
21
  var index = require('../FeatureFlags/index.js');
21
22
  var FeatureFlags = require('@carbon/feature-flags');
@@ -63,8 +64,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function TextI
63
64
  invalid = _ref$invalid === void 0 ? false : _ref$invalid,
64
65
  invalidText = _ref.invalidText,
65
66
  labelText = _ref.labelText,
66
- _ref$light = _ref.light,
67
- light = _ref$light === void 0 ? false : _ref$light,
67
+ light = _ref.light,
68
68
  _ref$onChange = _ref.onChange,
69
69
  _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
70
70
  _ref$onClick = _ref.onClick,
@@ -102,8 +102,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function TextI
102
102
  warn: warn,
103
103
  warnText: warnText
104
104
  });
105
- var customClassName = className !== null && className !== void 0 ? className : "".concat(prefix, "--text__input");
106
- var textInputClasses = cx__default["default"]("".concat(prefix, "--text-input"), [enabled ? null : className], (_classNames = {}, _rollupPluginBabelHelpers.defineProperty(_classNames, customClassName, enabled), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--invalid"), normalizedProps.invalid), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--warning"), normalizedProps.warn), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--").concat(size), size), _classNames));
105
+ var textInputClasses = cx__default["default"]("".concat(prefix, "--text-input"), [enabled ? null : className], (_classNames = {}, _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--invalid"), normalizedProps.invalid), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--warning"), normalizedProps.warn), _rollupPluginBabelHelpers.defineProperty(_classNames, "".concat(prefix, "--text-input--").concat(size), size), _classNames));
107
106
 
108
107
  var sharedTextInputProps = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.defineProperty({
109
108
  id: id,
@@ -134,12 +133,12 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function TextI
134
133
  sharedTextInputProps.maxLength = maxCount;
135
134
  }
136
135
 
137
- var inputWrapperClasses = cx__default["default"]([enabled ? cx__default["default"]("".concat(prefix, "--form-item"), className) : "".concat(prefix, "--form-item")], "".concat(prefix, "--text-input-wrapper"), (_classNames2 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--readonly"), readOnly), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--inline"), inline), _classNames2));
136
+ var inputWrapperClasses = cx__default["default"]([enabled ? cx__default["default"]("".concat(prefix, "--form-item"), className) : "".concat(prefix, "--form-item")], "".concat(prefix, "--text-input-wrapper"), (_classNames2 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--readonly"), readOnly), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--light"), light), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--inline"), inline), _rollupPluginBabelHelpers.defineProperty(_classNames2, "".concat(prefix, "--text-input-wrapper--inline--invalid"), inline && normalizedProps.invalid), _classNames2));
138
137
  var labelClasses = cx__default["default"]("".concat(prefix, "--label"), (_classNames3 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--visually-hidden"), hideLabel), _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--label--disabled"), normalizedProps.disabled), _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--label--inline"), inline), _rollupPluginBabelHelpers.defineProperty(_classNames3, "".concat(prefix, "--label--inline--").concat(size), inline && !!size), _classNames3));
139
138
  var helperTextClasses = cx__default["default"]("".concat(prefix, "--form__helper-text"), (_classNames4 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames4, "".concat(prefix, "--form__helper-text--disabled"), normalizedProps.disabled), _rollupPluginBabelHelpers.defineProperty(_classNames4, "".concat(prefix, "--form__helper-text--inline"), inline), _classNames4));
140
139
  var fieldOuterWrapperClasses = cx__default["default"]("".concat(prefix, "--text-input__field-outer-wrapper"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--text-input__field-outer-wrapper--inline"), inline));
141
140
  var fieldWrapperClasses = cx__default["default"]("".concat(prefix, "--text-input__field-wrapper"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--text-input__field-wrapper--warning"), normalizedProps.warn));
142
- var iconClasses = cx__default["default"]((_classNames7 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames7, "".concat(prefix, "--text-input__invalid-icon"), normalizedProps.invalid || normalizedProps.warn), _rollupPluginBabelHelpers.defineProperty(_classNames7, "".concat(prefix, "--text-input__invalid-icon--warning"), normalizedProps.warn), _rollupPluginBabelHelpers.defineProperty(_classNames7, "".concat(prefix, "--text-input__readonly-icon"), readOnly), _classNames7));
141
+ var iconClasses = cx__default["default"]((_classNames7 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames7, "".concat(prefix, "--text-input__invalid-icon"), normalizedProps.invalid || normalizedProps.warn), _rollupPluginBabelHelpers.defineProperty(_classNames7, "".concat(prefix, "--text-input__invalid-icon--warning"), normalizedProps.warn), _classNames7));
143
142
  var counterClasses = cx__default["default"]("".concat(prefix, "--label"), (_classNames8 = {}, _rollupPluginBabelHelpers.defineProperty(_classNames8, "".concat(prefix, "--label--disabled"), disabled), _rollupPluginBabelHelpers.defineProperty(_classNames8, "".concat(prefix, "--text-input__label-counter"), true), _classNames8));
144
143
  var counter = enableCounter && maxCount ? /*#__PURE__*/React__default["default"].createElement("div", {
145
144
  className: counterClasses
@@ -170,7 +169,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function TextI
170
169
  className: inputWrapperClasses
171
170
  }, !inline ? labelWrapper : /*#__PURE__*/React__default["default"].createElement("div", {
172
171
  className: "".concat(prefix, "--text-input__label-helper-wrapper")
173
- }, labelWrapper, !isFluid && helper), /*#__PURE__*/React__default["default"].createElement("div", {
172
+ }, labelWrapper, !isFluid && (normalizedProps.validation || helper)), /*#__PURE__*/React__default["default"].createElement("div", {
174
173
  className: fieldOuterWrapperClasses
175
174
  }, /*#__PURE__*/React__default["default"].createElement("div", {
176
175
  className: fieldWrapperClasses,
@@ -245,7 +244,7 @@ TextInput.propTypes = {
245
244
  * `true` to use the light version. For use on $ui-01 backgrounds only.
246
245
  * Don't use this to make tile background color same as container background color.
247
246
  */
248
- light: PropTypes__default["default"].bool,
247
+ light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `TextInput` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
249
248
 
250
249
  /**
251
250
  * Max character count allowed for the input. This is needed in order for enableCounter to display
@@ -198,8 +198,7 @@ var SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(function
198
198
  prevSelected = _useState6[0],
199
199
  setPrevSelected = _useState6[1];
200
200
 
201
- var classes = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--selectable"), (_cx3 = {}, _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--is-selected"), isSelected), _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--light"), light), _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--disabled"), disabled), _cx3), className);
202
- var inputClasses = cx__default["default"]("".concat(prefix, "--tile-input"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--tile-input--checked"), isSelected)); // TODO: rename to handleClick when handleClick prop is deprecated
201
+ var classes = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--selectable"), (_cx3 = {}, _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--is-selected"), isSelected), _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--light"), light), _rollupPluginBabelHelpers.defineProperty(_cx3, "".concat(prefix, "--tile--disabled"), disabled), _cx3), className); // TODO: rename to handleClick when handleClick prop is deprecated
203
202
 
204
203
  function handleOnClick(evt) {
205
204
  evt.preventDefault();
@@ -232,30 +231,27 @@ var SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(function
232
231
  setPrevSelected(selected);
233
232
  }
234
233
 
235
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("input", {
236
- checked: isSelected,
237
- className: inputClasses,
238
- disabled: disabled,
239
- id: id,
240
- name: name,
241
- onChange: !disabled ? handleChange : null,
242
- ref: ref,
243
- tabIndex: -1,
244
- title: title,
245
- type: "checkbox",
246
- value: value
247
- }), /*#__PURE__*/React__default["default"].createElement("label", _rollupPluginBabelHelpers["extends"]({
234
+ return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
248
235
  className: classes,
249
- htmlFor: id,
250
236
  onClick: !disabled ? handleOnClick : null,
237
+ role: "checkbox",
238
+ "aria-checked": isSelected,
239
+ disabled: disabled,
251
240
  onKeyDown: !disabled ? handleOnKeyDown : null // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
252
241
  ,
253
- tabIndex: !disabled ? tabIndex : null
242
+ tabIndex: !disabled ? tabIndex : null,
243
+ value: value,
244
+ name: name,
245
+ ref: ref,
246
+ id: id,
247
+ onChange: !disabled ? handleChange : null,
248
+ title: title
254
249
  }, rest), /*#__PURE__*/React__default["default"].createElement("span", {
255
250
  className: "".concat(prefix, "--tile__checkmark ").concat(prefix, "--tile__checkmark--persistent")
256
- }, isSelected ? _CheckboxCheckedFille || (_CheckboxCheckedFille = /*#__PURE__*/React__default["default"].createElement(iconsReact.CheckboxCheckedFilled, null)) : _Checkbox || (_Checkbox = /*#__PURE__*/React__default["default"].createElement(iconsReact.Checkbox, null))), /*#__PURE__*/React__default["default"].createElement("span", {
251
+ }, isSelected ? _CheckboxCheckedFille || (_CheckboxCheckedFille = /*#__PURE__*/React__default["default"].createElement(iconsReact.CheckboxCheckedFilled, null)) : _Checkbox || (_Checkbox = /*#__PURE__*/React__default["default"].createElement(iconsReact.Checkbox, null))), /*#__PURE__*/React__default["default"].createElement("label", {
252
+ htmlFor: id,
257
253
  className: "".concat(prefix, "--tile-content")
258
- }, children)));
254
+ }, children));
259
255
  });
260
256
  SelectableTile.displayName = 'SelectableTile';
261
257
  SelectableTile.propTypes = {
@@ -326,7 +322,7 @@ SelectableTile.propTypes = {
326
322
  value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number]).isRequired
327
323
  };
328
324
  function ExpandableTile(_ref4) {
329
- var _cx5, _cx6;
325
+ var _cx4, _cx5;
330
326
 
331
327
  var tabIndex = _ref4.tabIndex,
332
328
  className = _ref4.className,
@@ -430,8 +426,8 @@ function ExpandableTile(_ref4) {
430
426
  return React__default["default"].Children.toArray(children);
431
427
  }
432
428
 
433
- var classNames = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--expandable"), (_cx5 = {}, _rollupPluginBabelHelpers.defineProperty(_cx5, "".concat(prefix, "--tile--is-expanded"), isExpanded), _rollupPluginBabelHelpers.defineProperty(_cx5, "".concat(prefix, "--tile--light"), light), _cx5), className);
434
- var interactiveClassNames = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--expandable"), "".concat(prefix, "--tile--expandable--interactive"), (_cx6 = {}, _rollupPluginBabelHelpers.defineProperty(_cx6, "".concat(prefix, "--tile--is-expanded"), isExpanded), _rollupPluginBabelHelpers.defineProperty(_cx6, "".concat(prefix, "--tile--light"), light), _cx6), className);
429
+ var classNames = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--expandable"), (_cx4 = {}, _rollupPluginBabelHelpers.defineProperty(_cx4, "".concat(prefix, "--tile--is-expanded"), isExpanded), _rollupPluginBabelHelpers.defineProperty(_cx4, "".concat(prefix, "--tile--light"), light), _cx4), className);
430
+ var interactiveClassNames = cx__default["default"]("".concat(prefix, "--tile"), "".concat(prefix, "--tile--expandable"), "".concat(prefix, "--tile--expandable--interactive"), (_cx5 = {}, _rollupPluginBabelHelpers.defineProperty(_cx5, "".concat(prefix, "--tile--is-expanded"), isExpanded), _rollupPluginBabelHelpers.defineProperty(_cx5, "".concat(prefix, "--tile--light"), light), _cx5), className);
435
431
  var chevronInteractiveClassNames = cx__default["default"]("".concat(prefix, "--tile__chevron"), "".concat(prefix, "--tile__chevron--interactive"));
436
432
  var tileStyle = {
437
433
  maxHeight: isExpanded ? null : isTileMaxHeight + isTilePadding
@@ -26,7 +26,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
26
26
  var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
27
27
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
28
28
 
29
- var _excluded = ["align", "className", "children", "definition", "defaultOpen", "id", "tooltipText", "triggerClassName"];
29
+ var _excluded = ["align", "className", "children", "definition", "defaultOpen", "id", "openOnHover", "tooltipText", "triggerClassName"];
30
30
 
31
31
  function DefinitionTooltip(_ref) {
32
32
  var _ref$align = _ref.align,
@@ -37,6 +37,7 @@ function DefinitionTooltip(_ref) {
37
37
  _ref$defaultOpen = _ref.defaultOpen,
38
38
  defaultOpen = _ref$defaultOpen === void 0 ? false : _ref$defaultOpen,
39
39
  id = _ref.id,
40
+ openOnHover = _ref.openOnHover,
40
41
  tooltipText = _ref.tooltipText,
41
42
  triggerClassName = _ref.triggerClassName,
42
43
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
@@ -64,6 +65,9 @@ function DefinitionTooltip(_ref) {
64
65
  onMouseLeave: function onMouseLeave() {
65
66
  setOpen(false);
66
67
  },
68
+ onMouseEnter: function onMouseEnter() {
69
+ openOnHover ? setOpen(true) : null;
70
+ },
67
71
  open: isOpen
68
72
  }, /*#__PURE__*/React__default["default"].createElement("button", _rollupPluginBabelHelpers["extends"]({}, rest, {
69
73
  className: cx__default["default"]("".concat(prefix, "--definition-term"), triggerClassName),
@@ -87,7 +91,7 @@ DefinitionTooltip.propTypes = {
87
91
  /**
88
92
  * Specify how the trigger should align with the tooltip
89
93
  */
90
- align: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right']),
94
+ align: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top']),
91
95
 
92
96
  /**
93
97
  * The `children` prop will be used as the value that is being defined
@@ -116,6 +120,11 @@ DefinitionTooltip.propTypes = {
116
120
  */
117
121
  id: PropTypes__default["default"].string,
118
122
 
123
+ /**
124
+ * Specifies whether or not the `DefinitionTooltip` should open on hover or not
125
+ */
126
+ openOnHover: PropTypes__default["default"].bool,
127
+
119
128
  /**
120
129
  * [Deprecated in v11] Please use the `definition` prop instead.
121
130
  *
@@ -154,7 +154,7 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
154
154
  _rollupPluginBabelHelpers.createClass(HeaderMenu, [{
155
155
  key: "render",
156
156
  value: function render() {
157
- var _cx;
157
+ var _cx, _cx2;
158
158
 
159
159
  var prefix = this.context;
160
160
 
@@ -173,7 +173,8 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
173
173
  'aria-label': ariaLabel,
174
174
  'aria-labelledby': ariaLabelledBy
175
175
  };
176
- var className = cx__default["default"]((_cx = {}, _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--header__submenu"), true), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--header__submenu--current"), isCurrentPage), _rollupPluginBabelHelpers.defineProperty(_cx, customClassName, !!customClassName), _cx)); // Notes on eslint comments and based on the examples in:
176
+ var itemClassName = cx__default["default"]((_cx = {}, _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--header__submenu"), true), _rollupPluginBabelHelpers.defineProperty(_cx, customClassName, !!customClassName), _cx));
177
+ var linkClassName = cx__default["default"]((_cx2 = {}, _rollupPluginBabelHelpers.defineProperty(_cx2, "".concat(prefix, "--header__menu-item"), true), _rollupPluginBabelHelpers.defineProperty(_cx2, "".concat(prefix, "--header__menu-title"), true), _rollupPluginBabelHelpers.defineProperty(_cx2, "".concat(prefix, "--header__menu-item--current"), isCurrentPage), _cx2)); // Notes on eslint comments and based on the examples in:
177
178
  // https://www.w3.org/TR/wai-aria-practices/examples/menubar/menubar-1/menubar-1.html#
178
179
  // - The focus is handled by the <a> menuitem, onMouseOver is for mouse
179
180
  // users
@@ -182,7 +183,7 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
182
183
  // - href can be set to javascript:void(0), ideally this will be a button
183
184
 
184
185
  return /*#__PURE__*/React__default["default"].createElement("li", _rollupPluginBabelHelpers["extends"]({}, rest, {
185
- className: className,
186
+ className: itemClassName,
186
187
  onKeyDown: this.handleMenuClose,
187
188
  onClick: this.handleOnClick,
188
189
  onBlur: this.handleOnBlur
@@ -191,7 +192,7 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
191
192
  "aria-haspopup": "menu" // eslint-disable-line jsx-a11y/aria-proptypes
192
193
  ,
193
194
  "aria-expanded": this.state.expanded,
194
- className: "".concat(prefix, "--header__menu-item ").concat(prefix, "--header__menu-title"),
195
+ className: linkClassName,
195
196
  href: "#",
196
197
  onKeyDown: this.handleOnKeyDown,
197
198
  ref: this.handleMenuButtonRef,
@@ -216,11 +217,21 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
216
217
  }(React__default["default"].Component);
217
218
 
218
219
  _rollupPluginBabelHelpers.defineProperty(HeaderMenu, "propTypes", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, AriaPropTypes.AriaLabelPropType), {}, {
220
+ /**
221
+ * Optionally provide a custom class to apply to the underlying `<li>` node
222
+ */
223
+ className: PropTypes__default["default"].string,
224
+
219
225
  /**
220
226
  * Provide a custom ref handler for the menu button
221
227
  */
222
228
  focusRef: PropTypes__default["default"].func,
223
229
 
230
+ /**
231
+ * Applies selected styles to the item if a user sets this to true and aria-current !== 'page'.
232
+ */
233
+ isCurrentPage: PropTypes__default["default"].bool,
234
+
224
235
  /**
225
236
  * Provide a label for the link text
226
237
  */
@@ -81,7 +81,8 @@ var SideNavMenu = /*#__PURE__*/React__default["default"].forwardRef(function Sid
81
81
  ref: ref,
82
82
  type: "button"
83
83
  }, IconElement && /*#__PURE__*/React__default["default"].createElement(SideNavIcon["default"], null, /*#__PURE__*/React__default["default"].createElement(IconElement, null)), /*#__PURE__*/React__default["default"].createElement("span", {
84
- className: "".concat(prefix, "--side-nav__submenu-title")
84
+ className: "".concat(prefix, "--side-nav__submenu-title"),
85
+ title: title
85
86
  }, title), /*#__PURE__*/React__default["default"].createElement(SideNavIcon["default"], {
86
87
  className: "".concat(prefix, "--side-nav__submenu-chevron"),
87
88
  small: true