@carbon/react 1.22.0-rc.0 → 1.23.0-rc.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/{es/components → components}/Checkbox/Checkbox.Skeleton.d.ts +0 -0
- package/es/{es/components → components}/Checkbox/Checkbox.d.ts +0 -0
- package/es/{es/components → components}/Checkbox/index.d.ts +0 -0
- package/es/components/CodeSnippet/CodeSnippet.js +2 -2
- package/es/components/ComboBox/ComboBox.d.ts +151 -0
- package/es/components/ComboBox/ComboBox.js +28 -21
- package/es/components/ComposedModal/ComposedModal.js +2 -2
- package/es/{es/components → components}/DataTable/TableSelectAll.d.ts +0 -0
- package/es/components/DataTable/TableSelectRow.d.ts +88 -0
- package/es/components/DataTable/TableSelectRow.js +3 -5
- package/es/components/DatePicker/DatePicker.js +1 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +10 -1
- package/es/components/DatePicker/plugins/rangePlugin.js +1 -1
- package/es/{es/components → components}/Dropdown/Dropdown.d.ts +0 -0
- package/es/{es/components → components}/Dropdown/index.d.ts +0 -0
- package/es/components/FileUploader/FileUploaderButton.js +14 -16
- package/es/{es/components → components}/FluidForm/FluidForm.d.ts +0 -0
- package/es/{es/components → components}/FluidForm/FormContext.d.ts +0 -0
- package/es/{es/components → components}/FluidForm/index.d.ts +0 -0
- package/es/components/FluidSelect/FluidSelect.js +1 -0
- package/es/components/IconButton/index.js +1 -0
- package/es/{es/components → components}/ListBox/ListBox.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxField.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxMenu.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxMenuIcon.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxMenuItem.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxPropTypes.d.ts +0 -0
- package/es/{es/components → components}/ListBox/ListBoxSelection.d.ts +0 -0
- package/es/{es/components → components}/ListBox/index.d.ts +0 -0
- package/es/{es/components → components}/NumberInput/NumberInput.Skeleton.d.ts +0 -0
- package/es/components/NumberInput/NumberInput.d.ts +132 -0
- package/es/components/NumberInput/NumberInput.js +9 -7
- package/es/components/OverflowMenu/OverflowMenu.js +28 -34
- package/es/components/Pagination/Pagination.js +1 -0
- package/es/components/Pagination/experimental/PageSelector.js +1 -0
- package/es/components/Pagination/experimental/Pagination.js +1 -0
- package/es/components/Select/Select.Skeleton.d.ts +33 -0
- package/es/components/Select/index.js +1 -0
- package/es/{es/components → components}/Slider/Slider.Skeleton.d.ts +0 -0
- package/es/{es/components → components}/Text/Text.d.ts +0 -0
- package/es/{es/components → components}/Text/TextDirection.d.ts +0 -0
- package/es/{es/components → components}/Text/createTextComponent.d.ts +0 -0
- package/es/{es/components → components}/Text/index.d.ts +0 -0
- package/es/components/TextArea/TextArea.js +1 -0
- package/es/components/Toggle/Toggle.js +54 -33
- package/es/components/Toggletip/index.js +26 -1
- package/es/components/Tooltip/Tooltip.js +33 -4
- package/es/{es/index.d.ts → index.d.ts} +0 -0
- package/es/internal/FloatingMenu.js +1 -4
- package/es/internal/useNormalizedInputProps.js +3 -3
- package/es/{es/internal → internal}/usePrefix.d.ts +0 -0
- package/lib/{lib/components → components}/Checkbox/Checkbox.Skeleton.d.ts +0 -0
- package/lib/{lib/components → components}/Checkbox/Checkbox.d.ts +0 -0
- package/lib/{lib/components → components}/Checkbox/index.d.ts +0 -0
- package/lib/components/CodeSnippet/CodeSnippet.js +4 -3
- package/lib/components/ComboBox/ComboBox.d.ts +151 -0
- package/lib/components/ComboBox/ComboBox.js +28 -21
- package/lib/components/ComposedModal/ComposedModal.js +2 -2
- package/lib/{lib/components → components}/DataTable/TableSelectAll.d.ts +0 -0
- package/lib/components/DataTable/TableSelectRow.d.ts +88 -0
- package/lib/components/DataTable/TableSelectRow.js +2 -4
- package/lib/components/DatePicker/DatePicker.js +9 -8
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +10 -1
- package/lib/components/DatePicker/plugins/rangePlugin.js +6 -2
- package/lib/{lib/components → components}/Dropdown/Dropdown.d.ts +0 -0
- package/lib/{lib/components → components}/Dropdown/index.d.ts +0 -0
- package/lib/components/FileUploader/FileUploaderButton.js +14 -16
- package/lib/{lib/components → components}/FluidForm/FluidForm.d.ts +0 -0
- package/lib/{lib/components → components}/FluidForm/FormContext.d.ts +0 -0
- package/lib/{lib/components → components}/FluidForm/index.d.ts +0 -0
- package/lib/components/FluidSelect/FluidSelect.js +1 -0
- package/lib/components/IconButton/index.js +1 -0
- package/lib/{lib/components → components}/ListBox/ListBox.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxField.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxMenu.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxMenuIcon.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxMenuItem.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxPropTypes.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/ListBoxSelection.d.ts +0 -0
- package/lib/{lib/components → components}/ListBox/index.d.ts +0 -0
- package/lib/{lib/components → components}/NumberInput/NumberInput.Skeleton.d.ts +0 -0
- package/lib/components/NumberInput/NumberInput.d.ts +132 -0
- package/lib/components/NumberInput/NumberInput.js +9 -7
- package/lib/components/OverflowMenu/OverflowMenu.js +27 -52
- package/lib/components/Pagination/Pagination.js +1 -0
- package/lib/components/Pagination/experimental/PageSelector.js +1 -0
- package/lib/components/Pagination/experimental/Pagination.js +1 -0
- package/lib/components/Select/Select.Skeleton.d.ts +33 -0
- package/lib/components/Select/index.js +2 -0
- package/lib/{lib/components → components}/Slider/Slider.Skeleton.d.ts +0 -0
- package/lib/{lib/components → components}/Text/Text.d.ts +0 -0
- package/lib/{lib/components → components}/Text/TextDirection.d.ts +0 -0
- package/lib/{lib/components → components}/Text/createTextComponent.d.ts +0 -0
- package/lib/{lib/components → components}/Text/index.d.ts +0 -0
- package/lib/components/TextArea/TextArea.js +1 -0
- package/lib/components/Toggle/Toggle.js +53 -32
- package/lib/components/Toggletip/index.js +26 -1
- package/lib/components/Tooltip/Tooltip.js +31 -2
- package/lib/{lib/index.d.ts → index.d.ts} +0 -0
- package/lib/internal/FloatingMenu.js +1 -4
- package/lib/internal/useNormalizedInputProps.js +3 -3
- package/lib/{lib/internal → internal}/usePrefix.d.ts +0 -0
- package/package.json +4 -6
- package/es/_virtual/ResizeObserver.es.js +0 -13
- package/es/_virtual/_commonjsHelpers.js +0 -42
- package/es/_virtual/index.js +0 -14
- package/es/_virtual/rangePlugin.js +0 -14
- package/es/node_modules/flatpickr/dist/l10n/index.js +0 -1423
- package/es/node_modules/flatpickr/dist/plugins/rangePlugin.js +0 -196
- package/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -1112
- package/es/node_modules/use-resize-observer/polyfilled.js +0 -111
- package/lib/_virtual/ResizeObserver.es.js +0 -17
- package/lib/_virtual/_commonjsHelpers.js +0 -48
- package/lib/_virtual/index.js +0 -18
- package/lib/_virtual/rangePlugin.js +0 -18
- package/lib/node_modules/flatpickr/dist/l10n/index.js +0 -1427
- package/lib/node_modules/flatpickr/dist/plugins/rangePlugin.js +0 -200
- package/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -1116
- package/lib/node_modules/use-resize-observer/polyfilled.js +0 -119
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2018
|
|
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
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { HTMLAttributes } from 'react';
|
|
9
|
+
export interface SelectSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Specify an optional className to add to the form item wrapper.
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify whether the label should be hidden, or not
|
|
16
|
+
*/
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const SelectSkeleton: {
|
|
20
|
+
({ hideLabel, className, ...rest }: SelectSkeletonProps): JSX.Element;
|
|
21
|
+
propTypes: {
|
|
22
|
+
/**
|
|
23
|
+
* Specify an optional className to add to the form item wrapper.
|
|
24
|
+
*/
|
|
25
|
+
className: PropTypes.Requireable<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether the label should be hidden, or not
|
|
28
|
+
*/
|
|
29
|
+
hideLabel: PropTypes.Requireable<boolean>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default SelectSkeleton;
|
|
33
|
+
export { SelectSkeleton };
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
12
|
var Select = require('./Select.js');
|
|
13
|
+
var Select_Skeleton = require('./Select.Skeleton.js');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
exports.Select = Select["default"];
|
|
17
18
|
exports["default"] = Select["default"];
|
|
19
|
+
exports.SelectSkeleton = Select_Skeleton["default"];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -114,6 +114,7 @@ var TextArea = /*#__PURE__*/React__default["default"].forwardRef(function TextAr
|
|
|
114
114
|
useIsomorphicEffect["default"](function () {
|
|
115
115
|
if (other.cols) {
|
|
116
116
|
textareaRef.current.style.width = null;
|
|
117
|
+
textareaRef.current.style.resize = 'none';
|
|
117
118
|
} else {
|
|
118
119
|
textareaRef.current.style.width = "100%";
|
|
119
120
|
}
|
|
@@ -51,6 +51,7 @@ function Toggle(_ref) {
|
|
|
51
51
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
52
52
|
|
|
53
53
|
var prefix = usePrefix.usePrefix();
|
|
54
|
+
var buttonElement = React.useRef(null);
|
|
54
55
|
|
|
55
56
|
var _useControllableState = useControllableState.useControllableState({
|
|
56
57
|
value: toggled,
|
|
@@ -79,37 +80,53 @@ function Toggle(_ref) {
|
|
|
79
80
|
var labelTextClasses = cx__default["default"]("".concat(prefix, "--toggle__label-text"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--visually-hidden"), hideLabel));
|
|
80
81
|
var appearanceClasses = cx__default["default"]("".concat(prefix, "--toggle__appearance"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--toggle__appearance--sm"), isSm));
|
|
81
82
|
var switchClasses = cx__default["default"]("".concat(prefix, "--toggle__switch"), _rollupPluginBabelHelpers.defineProperty({}, "".concat(prefix, "--toggle__switch--checked"), checked));
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
83
|
+
return (
|
|
84
|
+
/*#__PURE__*/
|
|
85
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
86
|
+
React__default["default"].createElement("div", {
|
|
87
|
+
className: wrapperClasses,
|
|
88
|
+
onClick: ariaLabelledby ? function (e) {
|
|
89
|
+
// the underlying <button> can only be activated by keyboard as it is visually hidden;
|
|
90
|
+
// therefore, if this event's target is the <button>, it had to be triggered by
|
|
91
|
+
// the keyboard event which already calls handleClick. if we wouldn't catch this, the
|
|
92
|
+
// onClick and onToggle functions would be called twice whenever the user activates the
|
|
93
|
+
// toggle by keyboard and props['aria-labelledby'] is passed.
|
|
94
|
+
if (buttonElement.current && e.target !== buttonElement.current) {
|
|
95
|
+
handleClick(e);
|
|
96
|
+
buttonElement.current.focus();
|
|
97
|
+
}
|
|
98
|
+
} : null
|
|
99
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", _rollupPluginBabelHelpers["extends"]({}, other, {
|
|
100
|
+
ref: buttonElement,
|
|
101
|
+
id: id,
|
|
102
|
+
className: "".concat(prefix, "--toggle__button"),
|
|
103
|
+
role: "switch",
|
|
104
|
+
type: "button",
|
|
105
|
+
"aria-checked": checked,
|
|
106
|
+
"aria-labelledby": ariaLabelledby,
|
|
107
|
+
disabled: disabled,
|
|
108
|
+
onClick: handleClick
|
|
109
|
+
})), /*#__PURE__*/React__default["default"].createElement(LabelComponent, {
|
|
110
|
+
htmlFor: ariaLabelledby ? null : id,
|
|
111
|
+
className: "".concat(prefix, "--toggle__label")
|
|
112
|
+
}, labelText && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
113
|
+
className: labelTextClasses
|
|
114
|
+
}, labelText), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
115
|
+
className: appearanceClasses
|
|
116
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
117
|
+
className: switchClasses
|
|
118
|
+
}, isSm && /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
119
|
+
className: "".concat(prefix, "--toggle__check"),
|
|
120
|
+
width: "6px",
|
|
121
|
+
height: "5px",
|
|
122
|
+
viewBox: "0 0 6 5"
|
|
123
|
+
}, _path || (_path = /*#__PURE__*/React__default["default"].createElement("path", {
|
|
124
|
+
d: "M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z"
|
|
125
|
+
})))), renderSideLabel && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
126
|
+
className: "".concat(prefix, "--toggle__text"),
|
|
127
|
+
"aria-hidden": "true"
|
|
128
|
+
}, sideLabel))))
|
|
129
|
+
);
|
|
113
130
|
}
|
|
114
131
|
Toggle.propTypes = {
|
|
115
132
|
/**
|
|
@@ -133,7 +150,11 @@ Toggle.propTypes = {
|
|
|
133
150
|
disabled: PropTypes__default["default"].bool,
|
|
134
151
|
|
|
135
152
|
/**
|
|
136
|
-
*
|
|
153
|
+
* If true, the side labels (props.labelA and props.labelB) will be replaced by
|
|
154
|
+
* props.labelText, so that the toggle doesn't render a top label. In order to fully
|
|
155
|
+
* hide any labels, you can use props['aria-labelledby'] to refer to another element
|
|
156
|
+
* that labels the toggle. props.labelText would no longer be required in that case
|
|
157
|
+
* and can therefore be omitted.
|
|
137
158
|
*/
|
|
138
159
|
hideLabel: PropTypes__default["default"].bool,
|
|
139
160
|
|
|
@@ -112,10 +112,34 @@ function Toggletip(_ref2) {
|
|
|
112
112
|
|
|
113
113
|
function onKeyDown(event) {
|
|
114
114
|
if (open && match.match(event, keys.Escape)) {
|
|
115
|
-
actions.close();
|
|
115
|
+
actions.close(); // If the menu is closed while focus is still inside the menu, it should return to the trigger button (#12922)
|
|
116
|
+
|
|
117
|
+
var button = ref.current.children[0];
|
|
118
|
+
|
|
119
|
+
if (button && button.type === 'button') {
|
|
120
|
+
button.focus();
|
|
121
|
+
}
|
|
116
122
|
}
|
|
117
123
|
}
|
|
118
124
|
|
|
125
|
+
function handleBlur(event) {
|
|
126
|
+
// Do not close if the menu itself is clicked, should only close on focus out
|
|
127
|
+
if (open && event.relatedTarget === null) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (!event.currentTarget.contains(event.relatedTarget)) {
|
|
132
|
+
// The menu should be closed when focus leaves the `Toggletip` (#12922)
|
|
133
|
+
actions.close();
|
|
134
|
+
}
|
|
135
|
+
} // If the `Toggletip` is the last focusable item in the tab order, it shoudl also close when the browser window loses focus (#12922)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
useEvent.useWindowEvent('blur', function () {
|
|
139
|
+
if (open) {
|
|
140
|
+
actions.close();
|
|
141
|
+
}
|
|
142
|
+
});
|
|
119
143
|
useEvent.useWindowEvent('click', function (event) {
|
|
120
144
|
if (open && !ref.current.contains(event.target)) {
|
|
121
145
|
actions.close();
|
|
@@ -132,6 +156,7 @@ function Toggletip(_ref2) {
|
|
|
132
156
|
highContrast: true,
|
|
133
157
|
open: open,
|
|
134
158
|
onKeyDown: onKeyDown,
|
|
159
|
+
onBlur: handleBlur,
|
|
135
160
|
ref: ref
|
|
136
161
|
}, children));
|
|
137
162
|
}
|
|
@@ -27,7 +27,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
27
27
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
28
28
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
29
29
|
|
|
30
|
-
var _excluded = ["align", "className", "children", "label", "description", "enterDelayMs", "leaveDelayMs", "defaultOpen"];
|
|
30
|
+
var _excluded = ["align", "className", "children", "label", "description", "enterDelayMs", "leaveDelayMs", "defaultOpen", "closeOnActivation"];
|
|
31
31
|
|
|
32
32
|
function Tooltip(_ref) {
|
|
33
33
|
var _ref$align = _ref.align,
|
|
@@ -42,6 +42,8 @@ function Tooltip(_ref) {
|
|
|
42
42
|
leaveDelayMs = _ref$leaveDelayMs === void 0 ? 300 : _ref$leaveDelayMs,
|
|
43
43
|
_ref$defaultOpen = _ref.defaultOpen,
|
|
44
44
|
defaultOpen = _ref$defaultOpen === void 0 ? false : _ref$defaultOpen,
|
|
45
|
+
_ref$closeOnActivatio = _ref.closeOnActivation,
|
|
46
|
+
closeOnActivation = _ref$closeOnActivatio === void 0 ? false : _ref$closeOnActivatio,
|
|
45
47
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
46
48
|
|
|
47
49
|
var containerRef = React.useRef(null);
|
|
@@ -62,10 +64,28 @@ function Tooltip(_ref) {
|
|
|
62
64
|
onBlur: function onBlur() {
|
|
63
65
|
return setOpen(false);
|
|
64
66
|
},
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return closeOnActivation && setOpen(false);
|
|
69
|
+
},
|
|
65
70
|
// This should be placed on the trigger in case the element is disabled
|
|
66
71
|
onMouseEnter: onMouseEnter
|
|
67
72
|
};
|
|
68
73
|
|
|
74
|
+
function getChildEventHandlers(childProps) {
|
|
75
|
+
var eventHandlerFunctions = ['onFocus', 'onBlur', 'onClick', 'onMouseEnter'];
|
|
76
|
+
var eventHandlers = {};
|
|
77
|
+
eventHandlerFunctions.forEach(function (functionName) {
|
|
78
|
+
eventHandlers[functionName] = function (evt) {
|
|
79
|
+
triggerProps[functionName]();
|
|
80
|
+
|
|
81
|
+
if (childProps !== null && childProps !== void 0 && childProps[functionName]) {
|
|
82
|
+
childProps === null || childProps === void 0 ? void 0 : childProps[functionName](evt);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
return eventHandlers;
|
|
87
|
+
}
|
|
88
|
+
|
|
69
89
|
if (label) {
|
|
70
90
|
triggerProps['aria-labelledby'] = id;
|
|
71
91
|
} else {
|
|
@@ -77,6 +97,10 @@ function Tooltip(_ref) {
|
|
|
77
97
|
event.stopPropagation();
|
|
78
98
|
setOpen(false);
|
|
79
99
|
}
|
|
100
|
+
|
|
101
|
+
if (open && closeOnActivation && (match.match(event, keys.Enter) || match.match(event, keys.Space))) {
|
|
102
|
+
setOpen(false);
|
|
103
|
+
}
|
|
80
104
|
}
|
|
81
105
|
|
|
82
106
|
function onMouseEnter() {
|
|
@@ -104,7 +128,7 @@ function Tooltip(_ref) {
|
|
|
104
128
|
onMouseLeave: onMouseLeave,
|
|
105
129
|
open: open,
|
|
106
130
|
ref: containerRef
|
|
107
|
-
}), /*#__PURE__*/React__default["default"].cloneElement(child, triggerProps), /*#__PURE__*/React__default["default"].createElement(index.PopoverContent, {
|
|
131
|
+
}), /*#__PURE__*/React__default["default"].cloneElement(child, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, triggerProps), getChildEventHandlers(child.props))), /*#__PURE__*/React__default["default"].createElement(index.PopoverContent, {
|
|
108
132
|
"aria-hidden": "true",
|
|
109
133
|
className: "".concat(prefix, "--tooltip-content"),
|
|
110
134
|
id: id,
|
|
@@ -129,6 +153,11 @@ Tooltip.propTypes = {
|
|
|
129
153
|
*/
|
|
130
154
|
className: PropTypes__default["default"].string,
|
|
131
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Determines wether the tooltip should close when inner content is activated (click, Enter or Space)
|
|
158
|
+
*/
|
|
159
|
+
closeOnActivation: PropTypes__default["default"].bool,
|
|
160
|
+
|
|
132
161
|
/**
|
|
133
162
|
* Specify whether the tooltip should be open when it first renders
|
|
134
163
|
*/
|
|
File without changes
|
|
@@ -277,10 +277,7 @@ var FloatingMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
277
277
|
tabbableNode || // First sequentially focusable node
|
|
278
278
|
focusableNode || // First programmatic focusable node
|
|
279
279
|
menuBody;
|
|
280
|
-
|
|
281
|
-
if (_this.props.focusTrap) {
|
|
282
|
-
focusTarget.focus();
|
|
283
|
-
}
|
|
280
|
+
focusTarget.focus();
|
|
284
281
|
|
|
285
282
|
if (focusTarget === menuBody && process.env.NODE_ENV !== "production") {
|
|
286
283
|
process.env.NODE_ENV !== "production" ? warning.warning(focusableNode === null, 'Floating Menus must have at least a programmatically focusable child. ' + 'This can be accomplished by adding tabIndex="-1" to the content element.') : void 0;
|
|
@@ -20,12 +20,12 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
20
20
|
/**
|
|
21
21
|
* @typedef {object} InputProps
|
|
22
22
|
* @property {string} id - The input's id
|
|
23
|
-
* @property {boolean} readOnly - Whether the input should be readonly
|
|
23
|
+
* @property {boolean | undefined} readOnly - Whether the input should be readonly
|
|
24
24
|
* @property {boolean} disabled - Whether the input should be disabled
|
|
25
25
|
* @property {boolean} invalid - Whether the input should be marked as invalid
|
|
26
|
-
* @property {
|
|
26
|
+
* @property {React.ReactNode | undefined} invalidText - The validation message displayed in case the input is considered invalid
|
|
27
27
|
* @property {boolean} warn - Whether the input should be in warning state
|
|
28
|
-
* @property {
|
|
28
|
+
* @property {React.ReactNode | undefined} warnText - The validation message displayed in case the input is in warning state
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
/**
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
46
|
"@carbon/feature-flags": "^0.12.0",
|
|
47
|
-
"@carbon/icons-react": "^11.16.0
|
|
47
|
+
"@carbon/icons-react": "^11.16.0",
|
|
48
48
|
"@carbon/layout": "^11.11.0",
|
|
49
|
-
"@carbon/styles": "^1.
|
|
49
|
+
"@carbon/styles": "^1.23.0-rc.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.2",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -89,8 +89,6 @@
|
|
|
89
89
|
"@storybook/manager-webpack5": "^6.5.6",
|
|
90
90
|
"@storybook/react": "^6.5.6",
|
|
91
91
|
"@storybook/theming": "^6.5.6",
|
|
92
|
-
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
93
|
-
"@typescript-eslint/parser": "^5.38.1",
|
|
94
92
|
"autoprefixer": "^10.4.0",
|
|
95
93
|
"babel-loader": "^9.0.0",
|
|
96
94
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
@@ -135,5 +133,5 @@
|
|
|
135
133
|
"**/*.scss",
|
|
136
134
|
"**/*.css"
|
|
137
135
|
],
|
|
138
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "61937768ed4c69f8ec98c7c193d3c30b12c03b46"
|
|
139
137
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2022
|
|
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
|
-
import { getAugmentedNamespace } from './_commonjsHelpers.js';
|
|
9
|
-
import * as ResizeObserver_es from '../node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js';
|
|
10
|
-
|
|
11
|
-
var require$$0 = /*@__PURE__*/getAugmentedNamespace(ResizeObserver_es);
|
|
12
|
-
|
|
13
|
-
export { require$$0 as default };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2022
|
|
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
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
|
-
|
|
10
|
-
function getDefaultExportFromCjs (x) {
|
|
11
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function getAugmentedNamespace(n) {
|
|
15
|
-
if (n.__esModule) return n;
|
|
16
|
-
var f = n.default;
|
|
17
|
-
if (typeof f == "function") {
|
|
18
|
-
var a = function a () {
|
|
19
|
-
if (this instanceof a) {
|
|
20
|
-
var args = [null];
|
|
21
|
-
args.push.apply(args, arguments);
|
|
22
|
-
var Ctor = Function.bind.apply(f, args);
|
|
23
|
-
return new Ctor();
|
|
24
|
-
}
|
|
25
|
-
return f.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
a.prototype = f.prototype;
|
|
28
|
-
} else a = {};
|
|
29
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
30
|
-
Object.keys(n).forEach(function (k) {
|
|
31
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
32
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return n[k];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
return a;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export { commonjsGlobal, getAugmentedNamespace, getDefaultExportFromCjs };
|
package/es/_virtual/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2022
|
|
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
|
-
var l10nExports = {};
|
|
9
|
-
var l10n = {
|
|
10
|
-
get exports(){ return l10nExports; },
|
|
11
|
-
set exports(v){ l10nExports = v; },
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { l10n as __module, l10nExports as exports };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2022
|
|
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
|
-
var rangePluginExports = {};
|
|
9
|
-
var rangePlugin = {
|
|
10
|
-
get exports(){ return rangePluginExports; },
|
|
11
|
-
set exports(v){ rangePluginExports = v; },
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { rangePlugin as __module, rangePluginExports as exports };
|