@carbon/react 1.8.0 → 1.10.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/components/ComposedModal/ComposedModal.js +172 -577
- package/es/components/ComposedModal/{next/ModalFooter.js → ModalFooter.js} +4 -4
- package/es/components/ComposedModal/{next/ModalHeader.js → ModalHeader.js} +2 -2
- package/es/components/DataTable/tools/sorting.js +8 -0
- package/es/components/Icon/Icon.Skeleton.js +4 -12
- package/es/components/InlineCheckbox/InlineCheckbox.js +0 -1
- package/es/components/Menu/Menu.js +1 -1
- package/es/components/NumberInput/NumberInput.Skeleton.js +3 -4
- package/es/components/NumberInput/NumberInput.js +311 -362
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/index.js +5 -4
- package/es/internal/useControllableState.js +1 -1
- package/lib/components/ComposedModal/ComposedModal.js +174 -581
- package/lib/components/ComposedModal/{next/ModalFooter.js → ModalFooter.js} +4 -4
- package/lib/components/ComposedModal/{next/ModalHeader.js → ModalHeader.js} +2 -2
- package/lib/components/DataTable/tools/sorting.js +8 -0
- package/lib/components/Icon/Icon.Skeleton.js +4 -12
- package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -1
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/NumberInput/NumberInput.Skeleton.js +3 -4
- package/lib/components/NumberInput/NumberInput.js +308 -379
- package/lib/components/TileGroup/TileGroup.js +1 -1
- package/lib/index.js +57 -56
- package/lib/internal/useControllableState.js +1 -1
- package/package.json +6 -6
- package/scss/utilities/_hide-at-breakpoint.scss +9 -0
- package/es/components/ComposedModal/index.js +0 -19
- package/es/components/ComposedModal/next/ComposedModal.js +0 -225
- package/es/internal/FeatureFlags.js +0 -52
- package/es/prop-types/requiredIfValueExists.js +0 -32
- package/lib/components/ComposedModal/index.js +0 -45
- package/lib/components/ComposedModal/next/ComposedModal.js +0 -236
- package/lib/internal/FeatureFlags.js +0 -56
- package/lib/prop-types/requiredIfValueExists.js +0 -36
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import Button from '
|
|
12
|
-
import ButtonSet from '
|
|
11
|
+
import Button from '../Button/Button.js';
|
|
12
|
+
import ButtonSet from '../ButtonSet/ButtonSet.js';
|
|
13
13
|
import cx from 'classnames';
|
|
14
|
-
import { usePrefix } from '
|
|
14
|
+
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
16
|
var _excluded = ["children", "className", "closeModal", "danger", "inputref", "onRequestClose", "onRequestSubmit", "primaryButtonDisabled", "primaryButtonText", "primaryClassName", "secondaryButtonText", "secondaryButtons", "secondaryClassName"];
|
|
17
17
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { Close } from '@carbon/icons-react';
|
|
13
|
-
import { usePrefix } from '
|
|
13
|
+
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
15
15
|
var _excluded = ["buttonOnClick", "children", "className", "closeClassName", "closeIconClassName", "closeModal", "iconDescription", "label", "labelClassName", "title", "titleClassName"];
|
|
16
16
|
var ModalHeader = /*#__PURE__*/React__default.forwardRef(function ModalHeader(_ref, ref) {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { typeof as _typeof } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
8
9
|
import { getCellId } from './cells.js';
|
|
9
10
|
import { sortStates } from '../state/sortStates.js';
|
|
10
11
|
|
|
@@ -29,6 +30,13 @@ var compare = function compare(a, b) {
|
|
|
29
30
|
|
|
30
31
|
if (typeof a === 'string' && typeof b === 'string') {
|
|
31
32
|
return compareStrings(a, b, locale);
|
|
33
|
+
} // if column has React elements, this should sort by the child string if there is one
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
if (_typeof(a) === 'object' && _typeof(b) === 'object') {
|
|
37
|
+
if (typeof a.props.children === 'string' && typeof b.props.children === 'string') {
|
|
38
|
+
return compareStrings(a.props.children, b.props.children, locale);
|
|
39
|
+
}
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
return compareStrings('' + a, '' + b, locale);
|
|
@@ -11,18 +11,15 @@ import React__default from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
var _excluded = ["
|
|
14
|
+
var _excluded = ["className"];
|
|
15
15
|
|
|
16
16
|
var IconSkeleton = function IconSkeleton(_ref) {
|
|
17
|
-
var
|
|
18
|
-
className = _ref.className,
|
|
17
|
+
var className = _ref.className,
|
|
19
18
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
19
|
|
|
21
20
|
var prefix = usePrefix();
|
|
22
21
|
|
|
23
|
-
var props = _objectSpread2({
|
|
24
|
-
style: style
|
|
25
|
-
}, rest);
|
|
22
|
+
var props = _objectSpread2({}, rest);
|
|
26
23
|
|
|
27
24
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
28
25
|
className: cx("".concat(prefix, "--icon--skeleton"), className)
|
|
@@ -33,12 +30,7 @@ IconSkeleton.propTypes = {
|
|
|
33
30
|
/**
|
|
34
31
|
* Specify an optional className to add.
|
|
35
32
|
*/
|
|
36
|
-
className: PropTypes.string
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The CSS styles.
|
|
40
|
-
*/
|
|
41
|
-
style: PropTypes.object
|
|
33
|
+
className: PropTypes.string
|
|
42
34
|
};
|
|
43
35
|
var IconSkeleton$1 = IconSkeleton;
|
|
44
36
|
|
|
@@ -311,7 +311,7 @@ Menu.propTypes = {
|
|
|
311
311
|
/**
|
|
312
312
|
* Optionally pass an element the Menu should be appended to as a child. Defaults to document.body.
|
|
313
313
|
*/
|
|
314
|
-
target: PropTypes.
|
|
314
|
+
target: PropTypes.object,
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
317
|
* Specify the x position where this menu is rendered
|
|
@@ -13,7 +13,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
13
13
|
|
|
14
14
|
var _excluded = ["hideLabel", "className"];
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function NumberInputSkeleton(_ref) {
|
|
17
17
|
var hideLabel = _ref.hideLabel,
|
|
18
18
|
className = _ref.className,
|
|
19
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -26,7 +26,7 @@ var NumberInputSkeleton = function NumberInputSkeleton(_ref) {
|
|
|
26
26
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
27
27
|
className: "".concat(prefix, "--number ").concat(prefix, "--skeleton")
|
|
28
28
|
}));
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
NumberInputSkeleton.propTypes = {
|
|
32
32
|
/**
|
|
@@ -39,6 +39,5 @@ NumberInputSkeleton.propTypes = {
|
|
|
39
39
|
*/
|
|
40
40
|
hideLabel: PropTypes.bool
|
|
41
41
|
};
|
|
42
|
-
var NumberInputSkeleton$1 = NumberInputSkeleton;
|
|
43
42
|
|
|
44
|
-
export { NumberInputSkeleton
|
|
43
|
+
export { NumberInputSkeleton as default };
|