@carbon/react 1.0.0-rc.0 → 1.0.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.
- package/es/components/Accordion/Accordion.Skeleton.js +1 -7
- package/es/components/Accordion/AccordionItem.js +0 -5
- package/es/components/Button/Button.Skeleton.js +1 -3
- package/es/components/Button/Button.js +51 -113
- package/es/components/Checkbox/Checkbox.js +8 -21
- package/es/components/CodeSnippet/CodeSnippet.js +3 -11
- package/es/components/ComboBox/ComboBox.js +2 -4
- package/es/components/ContentSwitcher/index.js +13 -0
- package/es/components/DataTable/DataTable.js +5 -14
- package/es/components/DataTable/Table.js +3 -11
- package/es/components/DataTable/TableBatchAction.js +2 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DataTable/TableToolbar.js +1 -2
- package/es/components/DataTable/TableToolbarSearch.js +4 -13
- package/es/components/DatePickerInput/next/DatePickerInput.js +6 -31
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -13
- package/es/components/Dropdown/Dropdown.js +4 -9
- package/es/components/ExpandableSearch/ExpandableSearch.js +16 -22
- package/es/components/FormGroup/FormGroup.js +4 -14
- package/es/components/IconButton/index.js +0 -1
- package/es/components/InlineLoading/InlineLoading.js +2 -9
- package/es/components/ListBox/ListBox.js +10 -0
- package/es/components/Modal/next/Modal.js +5 -8
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -2
- package/es/components/MultiSelect/MultiSelect.js +2 -3
- package/es/components/MultiSelect/next/FilterableMultiSelect.js +1 -2
- package/es/components/Notification/next/Notification.js +18 -39
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +1 -9
- package/es/components/RadioTile/RadioTile.js +6 -13
- package/es/components/Search/index.js +3 -3
- package/es/components/Search/next/Search.js +25 -20
- package/es/components/Select/Select.js +6 -14
- package/es/components/Slider/Slider.js +4 -14
- package/es/components/StructuredList/next/StructuredList.js +7 -11
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/Tile/next/Tile.js +12 -51
- package/es/components/TileGroup/index.js +13 -0
- package/es/components/TimePickerSelect/next/TimePickerSelect.js +0 -6
- package/es/components/Tooltip/next/DefinitionTooltip.js +1 -1
- package/es/index.js +4 -6
- package/es/internal/ComponentToggle.js +1 -0
- package/lib/components/Accordion/Accordion.Skeleton.js +1 -7
- package/lib/components/Accordion/AccordionItem.js +0 -5
- package/lib/components/Button/Button.Skeleton.js +1 -3
- package/lib/components/Button/Button.js +49 -130
- package/lib/components/Checkbox/Checkbox.js +8 -21
- package/lib/components/CodeSnippet/CodeSnippet.js +3 -11
- package/lib/components/ComboBox/ComboBox.js +2 -4
- package/lib/components/ContentSwitcher/index.js +17 -0
- package/lib/components/DataTable/DataTable.js +5 -33
- package/lib/components/DataTable/Table.js +3 -30
- package/lib/components/DataTable/TableBatchAction.js +2 -1
- package/lib/components/DataTable/TableExpandHeader.js +1 -1
- package/lib/components/DataTable/TableToolbar.js +1 -21
- package/lib/components/DataTable/TableToolbarSearch.js +4 -13
- package/lib/components/DatePickerInput/next/DatePickerInput.js +5 -30
- package/lib/components/Dropdown/Dropdown.Skeleton.js +4 -13
- package/lib/components/Dropdown/Dropdown.js +4 -9
- package/lib/components/ExpandableSearch/ExpandableSearch.js +15 -21
- package/lib/components/FormGroup/FormGroup.js +3 -13
- package/lib/components/IconButton/index.js +0 -1
- package/lib/components/InlineLoading/InlineLoading.js +2 -9
- package/lib/components/ListBox/ListBox.js +10 -0
- package/lib/components/Modal/next/Modal.js +5 -8
- package/lib/components/MultiSelect/FilterableMultiSelect.js +1 -2
- package/lib/components/MultiSelect/MultiSelect.js +2 -3
- package/lib/components/MultiSelect/next/FilterableMultiSelect.js +1 -2
- package/lib/components/Notification/next/Notification.js +18 -39
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +1 -9
- package/lib/components/RadioTile/RadioTile.js +6 -13
- package/lib/components/Search/next/Search.js +25 -20
- package/lib/components/Select/Select.js +6 -33
- package/lib/components/Slider/Slider.js +4 -14
- package/lib/components/StructuredList/next/StructuredList.js +7 -11
- package/lib/components/TextInput/ControlledPasswordInput.js +2 -2
- package/lib/components/Tile/next/Tile.js +12 -51
- package/lib/components/TileGroup/index.js +17 -0
- package/lib/components/TimePickerSelect/next/TimePickerSelect.js +0 -6
- package/lib/components/Tooltip/next/DefinitionTooltip.js +1 -1
- package/lib/index.js +94 -98
- package/lib/internal/ComponentToggle.js +1 -0
- package/package.json +9 -9
- package/es/components/TooltipDefinition/TooltipDefinition.js +0 -167
- package/es/components/TooltipIcon/TooltipIcon.js +0 -235
- package/es/tools/createPropAdapter.js +0 -63
- package/lib/components/TooltipDefinition/TooltipDefinition.js +0 -178
- package/lib/components/TooltipIcon/TooltipIcon.js +0 -245
- package/lib/tools/createPropAdapter.js +0 -67
|
@@ -17,34 +17,14 @@ 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 FeatureFlags = require('@carbon/feature-flags');
|
|
21
20
|
|
|
22
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
22
|
|
|
24
|
-
function _interopNamespace(e) {
|
|
25
|
-
if (e && e.__esModule) return e;
|
|
26
|
-
var n = Object.create(null);
|
|
27
|
-
if (e) {
|
|
28
|
-
Object.keys(e).forEach(function (k) {
|
|
29
|
-
if (k !== 'default') {
|
|
30
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
31
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () { return e[k]; }
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
n["default"] = e;
|
|
39
|
-
return Object.freeze(n);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
23
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
43
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
25
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
45
|
-
var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
|
|
46
26
|
|
|
47
|
-
var _excluded = ["className", "id", "inline", "labelText", "disabled", "children", "noLabel", "
|
|
27
|
+
var _excluded = ["className", "id", "inline", "labelText", "disabled", "children", "noLabel", "hideLabel", "invalid", "invalidText", "helperText", "light", "size", "warn", "warnText"];
|
|
48
28
|
var Select = /*#__PURE__*/React__default["default"].forwardRef(function Select(_ref, ref) {
|
|
49
29
|
var _classNames, _classNames2, _classNames3;
|
|
50
30
|
|
|
@@ -54,9 +34,8 @@ var Select = /*#__PURE__*/React__default["default"].forwardRef(function Select(_
|
|
|
54
34
|
labelText = _ref.labelText,
|
|
55
35
|
disabled = _ref.disabled,
|
|
56
36
|
children = _ref.children,
|
|
57
|
-
noLabel = _ref.noLabel
|
|
58
|
-
_ref.
|
|
59
|
-
var hideLabel = _ref.hideLabel,
|
|
37
|
+
noLabel = _ref.noLabel,
|
|
38
|
+
hideLabel = _ref.hideLabel,
|
|
60
39
|
invalid = _ref.invalid,
|
|
61
40
|
invalidText = _ref.invalidText,
|
|
62
41
|
helperText = _ref.helperText,
|
|
@@ -162,11 +141,6 @@ Select.propTypes = {
|
|
|
162
141
|
*/
|
|
163
142
|
hideLabel: PropTypes__default["default"].bool,
|
|
164
143
|
|
|
165
|
-
/**
|
|
166
|
-
* Provide a description for the twistie icon that can be read by screen readers
|
|
167
|
-
*/
|
|
168
|
-
iconDescription: deprecate["default"](PropTypes__default["default"].string, 'The `iconDescription` prop for `Select` is no longer needed and has ' + 'been deprecated. It will be moved in the next major release.'),
|
|
169
|
-
|
|
170
144
|
/**
|
|
171
145
|
* Specify a custom `id` for the `<select>`
|
|
172
146
|
*/
|
|
@@ -197,7 +171,7 @@ Select.propTypes = {
|
|
|
197
171
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
198
172
|
* Don't use this to make tile background color same as container background color.
|
|
199
173
|
*/
|
|
200
|
-
light: PropTypes__default["default"].bool,
|
|
174
|
+
light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `Select` is no longer needed and has ' + 'been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release.'),
|
|
201
175
|
|
|
202
176
|
/**
|
|
203
177
|
* Reserved for use with <Pagination> component. Will not render a label for the
|
|
@@ -214,7 +188,7 @@ Select.propTypes = {
|
|
|
214
188
|
/**
|
|
215
189
|
* Specify the size of the Select Input.
|
|
216
190
|
*/
|
|
217
|
-
size:
|
|
191
|
+
size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg']),
|
|
218
192
|
|
|
219
193
|
/**
|
|
220
194
|
* Specify whether the control is currently in warning state
|
|
@@ -232,8 +206,7 @@ Select.defaultProps = {
|
|
|
232
206
|
inline: false,
|
|
233
207
|
invalid: false,
|
|
234
208
|
invalidText: '',
|
|
235
|
-
helperText: ''
|
|
236
|
-
light: false
|
|
209
|
+
helperText: ''
|
|
237
210
|
};
|
|
238
211
|
var Select$1 = Select;
|
|
239
212
|
|
|
@@ -47,7 +47,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
47
47
|
var throttle__default = /*#__PURE__*/_interopDefaultLegacy(throttle);
|
|
48
48
|
var FeatureFlags__namespace = /*#__PURE__*/_interopNamespace(FeatureFlags);
|
|
49
49
|
|
|
50
|
-
var _excluded = ["ariaLabelInput", "className", "hideTextInput", "id", "min", "minLabel", "max", "maxLabel", "formatLabel", "labelText", "step", "
|
|
50
|
+
var _excluded = ["ariaLabelInput", "className", "hideTextInput", "id", "min", "minLabel", "max", "maxLabel", "formatLabel", "labelText", "step", "stepMultiplier", "inputType", "required", "disabled", "name", "light"];
|
|
51
51
|
|
|
52
52
|
var defaultFormatLabel = function defaultFormatLabel(value, label) {
|
|
53
53
|
return typeof label === 'function' ? label(value) : "".concat(value).concat(label);
|
|
@@ -188,7 +188,7 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
188
188
|
|
|
189
189
|
|
|
190
190
|
if (evt.shiftKey) {
|
|
191
|
-
var stepMultiplier = _this.props.stepMultiplier
|
|
191
|
+
var stepMultiplier = _this.props.stepMultiplier;
|
|
192
192
|
delta *= stepMultiplier;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -347,7 +347,6 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
347
347
|
// Fire onChange event handler if present, if there's a usable value, and
|
|
348
348
|
// if the value is different from the last one
|
|
349
349
|
if (this.state.value !== '' && prevState.value !== this.state.value && typeof this.props.onChange === 'function') {
|
|
350
|
-
// TODO: pass event object as first param (breaking change/feat for v11)
|
|
351
350
|
this.props.onChange({
|
|
352
351
|
value: this.state.value
|
|
353
352
|
});
|
|
@@ -355,7 +354,6 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
355
354
|
|
|
356
355
|
|
|
357
356
|
if (this.state.needsOnRelease && typeof this.props.onRelease === 'function') {
|
|
358
|
-
// TODO: pass event object as first param (breaking change/feat for v11)
|
|
359
357
|
this.props.onRelease({
|
|
360
358
|
value: this.state.value
|
|
361
359
|
}); // Reset the flag
|
|
@@ -418,7 +416,6 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
418
416
|
formatLabel = _this$props$formatLab === void 0 ? defaultFormatLabel : _this$props$formatLab,
|
|
419
417
|
labelText = _this$props.labelText,
|
|
420
418
|
step = _this$props.step;
|
|
421
|
-
_this$props.stepMuliplier;
|
|
422
419
|
_this$props.stepMultiplier;
|
|
423
420
|
var inputType = _this$props.inputType,
|
|
424
421
|
required = _this$props.required,
|
|
@@ -597,7 +594,7 @@ _rollupPluginBabelHelpers.defineProperty(Slider, "propTypes", {
|
|
|
597
594
|
/**
|
|
598
595
|
* `true` to use the light version.
|
|
599
596
|
*/
|
|
600
|
-
light: PropTypes__default["default"].bool,
|
|
597
|
+
light: deprecate["default"](PropTypes__default["default"].bool, 'The `light` prop for `Slider` is no longer needed and has ' + 'been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release.'),
|
|
601
598
|
|
|
602
599
|
/**
|
|
603
600
|
* The maximum value.
|
|
@@ -644,12 +641,6 @@ _rollupPluginBabelHelpers.defineProperty(Slider, "propTypes", {
|
|
|
644
641
|
*/
|
|
645
642
|
step: PropTypes__default["default"].number,
|
|
646
643
|
|
|
647
|
-
/**
|
|
648
|
-
* A value determining how much the value should increase/decrease by Shift+arrow keys,
|
|
649
|
-
* which will be `(max - min) / stepMuliplier`.
|
|
650
|
-
*/
|
|
651
|
-
stepMuliplier: deprecate["default"](PropTypes__default["default"].number, ' The `stepMuliplier` prop has been deprecated in favor of `stepMultiplier`. It will be removed in the next major release.'),
|
|
652
|
-
|
|
653
644
|
/**
|
|
654
645
|
* A value determining how much the value should increase/decrease by Shift+arrow keys,
|
|
655
646
|
* which will be `(max - min) / stepMultiplier`.
|
|
@@ -670,8 +661,7 @@ _rollupPluginBabelHelpers.defineProperty(Slider, "defaultProps", {
|
|
|
670
661
|
minLabel: '',
|
|
671
662
|
maxLabel: '',
|
|
672
663
|
inputType: 'number',
|
|
673
|
-
ariaLabelInput: FeatureFlags__namespace.enabled('enable-v11-release') ? undefined : 'Slider number input'
|
|
674
|
-
light: false
|
|
664
|
+
ariaLabelInput: FeatureFlags__namespace.enabled('enable-v11-release') ? undefined : 'Slider number input'
|
|
675
665
|
});
|
|
676
666
|
|
|
677
667
|
_rollupPluginBabelHelpers.defineProperty(Slider, "contextType", index.FeatureFlagContext);
|
|
@@ -23,7 +23,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
23
23
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
24
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
25
25
|
|
|
26
|
-
var _excluded = ["children", "selection", "className", "ariaLabel"
|
|
26
|
+
var _excluded = ["children", "selection", "className", "ariaLabel"],
|
|
27
27
|
_excluded2 = ["children", "className"],
|
|
28
28
|
_excluded3 = ["children", "className"],
|
|
29
29
|
_excluded4 = ["onKeyDown", "children", "className", "head"],
|
|
@@ -35,9 +35,8 @@ function StructuredListWrapper(props) {
|
|
|
35
35
|
var children = props.children,
|
|
36
36
|
selection = props.selection,
|
|
37
37
|
className = props.className,
|
|
38
|
-
ariaLabel = props.ariaLabel
|
|
39
|
-
props
|
|
40
|
-
var other = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
|
38
|
+
ariaLabel = props.ariaLabel,
|
|
39
|
+
other = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
|
41
40
|
|
|
42
41
|
var prefix = usePrefix.usePrefix();
|
|
43
42
|
var classes = cx__default["default"]("".concat(prefix, "--structured-list"), className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--structured-list--selection"), selection));
|
|
@@ -64,11 +63,6 @@ StructuredListWrapper.propTypes = {
|
|
|
64
63
|
*/
|
|
65
64
|
ariaLabel: PropTypes__default["default"].string,
|
|
66
65
|
|
|
67
|
-
/**
|
|
68
|
-
* Specify whether a border should be added to your StructuredListWrapper
|
|
69
|
-
*/
|
|
70
|
-
border: deprecate["default"](PropTypes__default["default"].bool, "\nThe prop `border` will be removed in the next major version of Carbon."),
|
|
71
|
-
|
|
72
66
|
/**
|
|
73
67
|
* Provide the contents of your StructuredListWrapper
|
|
74
68
|
*/
|
|
@@ -220,6 +214,8 @@ StructuredListRow.defaultProps = {
|
|
|
220
214
|
onKeyDown: function onKeyDown() {}
|
|
221
215
|
};
|
|
222
216
|
function StructuredListInput(props) {
|
|
217
|
+
var _row$id;
|
|
218
|
+
|
|
223
219
|
var defaultId = useId.useId('structureListInput');
|
|
224
220
|
|
|
225
221
|
var className = props.className,
|
|
@@ -238,11 +234,11 @@ function StructuredListInput(props) {
|
|
|
238
234
|
type: "radio",
|
|
239
235
|
tabIndex: 0,
|
|
240
236
|
checked: row && row.id === selectedRow,
|
|
241
|
-
value: row ? row.id : '',
|
|
237
|
+
value: (_row$id = row === null || row === void 0 ? void 0 : row.id) !== null && _row$id !== void 0 ? _row$id : '',
|
|
242
238
|
onChange: function onChange(event) {
|
|
243
239
|
setSelectedRow(event.target.value);
|
|
244
240
|
},
|
|
245
|
-
id:
|
|
241
|
+
id: id !== null && id !== void 0 ? id : defaultId,
|
|
246
242
|
className: classes,
|
|
247
243
|
name: name,
|
|
248
244
|
title: title
|
|
@@ -207,9 +207,9 @@ ControlledPasswordInput.propTypes = {
|
|
|
207
207
|
showPasswordLabel: PropTypes__default["default"].string,
|
|
208
208
|
|
|
209
209
|
/**
|
|
210
|
-
* Specify the size of the Text Input.
|
|
210
|
+
* Specify the size of the Text Input.
|
|
211
211
|
*/
|
|
212
|
-
size: PropTypes__default["default"].
|
|
212
|
+
size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg']),
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
* Specify the alignment of the tooltip to the icon-only button.
|
|
@@ -32,8 +32,8 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
32
32
|
var _CheckboxCheckedFille, _Checkbox, _ChevronDown, _ChevronDown2;
|
|
33
33
|
|
|
34
34
|
var _excluded = ["children", "className", "light"],
|
|
35
|
-
_excluded2 = ["children", "className", "clicked", "
|
|
36
|
-
_excluded3 = ["children", "className", "disabled", "
|
|
35
|
+
_excluded2 = ["children", "className", "clicked", "href", "light", "onClick", "onKeyDown"],
|
|
36
|
+
_excluded3 = ["children", "className", "disabled", "id", "light", "name", "onClick", "onChange", "onKeyDown", "selected", "tabIndex", "title", "value"],
|
|
37
37
|
_excluded4 = ["tabIndex", "className", "children", "expanded", "tileMaxHeight", "tilePadding", "onClick", "onKeyUp", "tileCollapsedIconText", "tileExpandedIconText", "tileCollapsedLabel", "tileExpandedLabel", "light"];
|
|
38
38
|
var Tile = /*#__PURE__*/React__default["default"].forwardRef(function Tile(_ref, ref) {
|
|
39
39
|
var children = _ref.children,
|
|
@@ -74,11 +74,8 @@ var ClickableTile = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
74
74
|
className = _ref2.className,
|
|
75
75
|
_ref2$clicked = _ref2.clicked,
|
|
76
76
|
clicked = _ref2$clicked === void 0 ? false : _ref2$clicked,
|
|
77
|
-
handleClick = _ref2.handleClick,
|
|
78
|
-
handleKeyDown = _ref2.handleKeyDown,
|
|
79
77
|
href = _ref2.href,
|
|
80
|
-
|
|
81
|
-
light = _ref2$light === void 0 ? false : _ref2$light,
|
|
78
|
+
light = _ref2.light,
|
|
82
79
|
_ref2$onClick = _ref2.onClick,
|
|
83
80
|
onClick = _ref2$onClick === void 0 ? function () {} : _ref2$onClick,
|
|
84
81
|
_ref2$onKeyDown = _ref2.onKeyDown,
|
|
@@ -91,17 +88,12 @@ var ClickableTile = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
91
88
|
var _useState = React.useState(clicked),
|
|
92
89
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
93
90
|
isSelected = _useState2[0],
|
|
94
|
-
setIsSelected = _useState2[1];
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var clickHandler = handleClick || onClick; // TODO: replace with onClick when handleClick prop is deprecated
|
|
98
|
-
|
|
99
|
-
var keyDownHandler = handleKeyDown || onKeyDown;
|
|
91
|
+
setIsSelected = _useState2[1];
|
|
100
92
|
|
|
101
93
|
function handleOnClick(evt) {
|
|
102
94
|
evt.persist();
|
|
103
95
|
setIsSelected(!isSelected);
|
|
104
|
-
|
|
96
|
+
onClick(evt);
|
|
105
97
|
}
|
|
106
98
|
|
|
107
99
|
function handleOnKeyDown(evt) {
|
|
@@ -110,10 +102,10 @@ var ClickableTile = /*#__PURE__*/React__default["default"].forwardRef(function C
|
|
|
110
102
|
if (match.matches(evt, [keys.Enter, keys.Space])) {
|
|
111
103
|
evt.preventDefault();
|
|
112
104
|
setIsSelected(!isSelected);
|
|
113
|
-
|
|
105
|
+
onKeyDown(evt);
|
|
114
106
|
}
|
|
115
107
|
|
|
116
|
-
|
|
108
|
+
onKeyDown(evt);
|
|
117
109
|
}
|
|
118
110
|
|
|
119
111
|
return /*#__PURE__*/React__default["default"].createElement(Link["default"], _rollupPluginBabelHelpers["extends"]({
|
|
@@ -141,16 +133,6 @@ ClickableTile.propTypes = {
|
|
|
141
133
|
*/
|
|
142
134
|
clicked: PropTypes__default["default"].bool,
|
|
143
135
|
|
|
144
|
-
/**
|
|
145
|
-
* Deprecated in v11. Use 'onClick' instead.
|
|
146
|
-
*/
|
|
147
|
-
handleClick: deprecate["default"](PropTypes__default["default"].func, 'The handleClick prop for ClickableTile has been deprecated in favor of onClick. It will be removed in the next major release.'),
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Specify the function to run when the ClickableTile is interacted with via a keyboard
|
|
151
|
-
*/
|
|
152
|
-
handleKeyDown: deprecate["default"](PropTypes__default["default"].func, 'The handleKeyDown prop for ClickableTile has been deprecated in favor of onKeyDown. It will be removed in the next major release.'),
|
|
153
|
-
|
|
154
136
|
/**
|
|
155
137
|
* The href for the link.
|
|
156
138
|
*/
|
|
@@ -183,12 +165,8 @@ var SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
183
165
|
var children = _ref3.children,
|
|
184
166
|
className = _ref3.className,
|
|
185
167
|
disabled = _ref3.disabled,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
_ref3.iconDescription;
|
|
189
|
-
var id = _ref3.id,
|
|
190
|
-
_ref3$light = _ref3.light,
|
|
191
|
-
light = _ref3$light === void 0 ? false : _ref3$light,
|
|
168
|
+
id = _ref3.id,
|
|
169
|
+
light = _ref3.light,
|
|
192
170
|
name = _ref3.name,
|
|
193
171
|
_ref3$onClick = _ref3.onClick,
|
|
194
172
|
onClick = _ref3$onClick === void 0 ? function () {} : _ref3$onClick,
|
|
@@ -206,11 +184,9 @@ var SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
206
184
|
value = _ref3$value === void 0 ? 'value' : _ref3$value,
|
|
207
185
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref3, _excluded3);
|
|
208
186
|
|
|
209
|
-
var prefix = usePrefix.usePrefix();
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
var keyDownHandler = handleKeyDown || onKeyDown;
|
|
187
|
+
var prefix = usePrefix.usePrefix();
|
|
188
|
+
var clickHandler = onClick;
|
|
189
|
+
var keyDownHandler = onKeyDown;
|
|
214
190
|
|
|
215
191
|
var _useState3 = React.useState(selected),
|
|
216
192
|
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
|
@@ -298,21 +274,6 @@ SelectableTile.propTypes = {
|
|
|
298
274
|
*/
|
|
299
275
|
disabled: PropTypes__default["default"].bool,
|
|
300
276
|
|
|
301
|
-
/**
|
|
302
|
-
* Specify the function to run when the SelectableTile is clicked
|
|
303
|
-
*/
|
|
304
|
-
handleClick: deprecate["default"](PropTypes__default["default"].func, 'The `handleClick` prop for `SelectableTile` has been deprecated in favor of `onClick`. It will be removed in the next major release.'),
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Specify the function to run when the SelectableTile is interacted with via a keyboard
|
|
308
|
-
*/
|
|
309
|
-
handleKeyDown: deprecate["default"](PropTypes__default["default"].func, 'The `handleKeyDown` prop for `SelectableTile` has been deprecated in favor of `onKeyDown`. It will be removed in the next major release.'),
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* The description of the checkmark icon.
|
|
313
|
-
*/
|
|
314
|
-
iconDescription: deprecate["default"](PropTypes__default["default"].string, 'The `iconDescription` prop for `SelectableTile` is no longer needed and has ' + 'been deprecated. It will be removed in the next major release.'),
|
|
315
|
-
|
|
316
277
|
/**
|
|
317
278
|
* The ID of the `<input>`.
|
|
318
279
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2021
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var createClassWrapper = require('../../internal/createClassWrapper.js');
|
|
13
|
+
var TileGroup = require('./TileGroup.js');
|
|
14
|
+
|
|
15
|
+
var index = createClassWrapper.createClassWrapper(TileGroup["default"]);
|
|
16
|
+
|
|
17
|
+
exports["default"] = index;
|
|
@@ -15,7 +15,6 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var iconsReact = require('@carbon/icons-react');
|
|
17
17
|
var usePrefix = require('../../../internal/usePrefix.js');
|
|
18
|
-
var deprecate = require('../../../prop-types/deprecate.js');
|
|
19
18
|
|
|
20
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
20
|
|
|
@@ -72,11 +71,6 @@ TimePickerSelect.propTypes = {
|
|
|
72
71
|
*/
|
|
73
72
|
disabled: PropTypes__default["default"].bool,
|
|
74
73
|
|
|
75
|
-
/**
|
|
76
|
-
* Provide a description for the twistie icon that can be read by screen readers
|
|
77
|
-
*/
|
|
78
|
-
iconDescription: deprecate["default"](PropTypes__default["default"].string, 'The `iconDescription` prop for `TimePickerSelect` is no longer needed and has ' + 'been deprecated. It will be moved in the next major release. Use "aria-label" instead'),
|
|
79
|
-
|
|
80
74
|
/**
|
|
81
75
|
* Specify a custom `id` for the `<select>`
|
|
82
76
|
*/
|
|
@@ -117,7 +117,7 @@ DefinitionTooltip.propTypes = {
|
|
|
117
117
|
id: PropTypes__default["default"].string,
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* [Deprecated] Please use the `definition` prop instead.
|
|
120
|
+
* [Deprecated in v11] Please use the `definition` prop instead.
|
|
121
121
|
*
|
|
122
122
|
* Provide the text that will be displayed in the tooltip when it is rendered.
|
|
123
123
|
*/
|