@carbon/ibm-products 2.43.2-canary.165 → 2.43.2-canary.170
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +2 -2
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +2 -2
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +2 -2
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +2 -2
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Toolbar/ToolbarButton.d.ts +12 -1
- package/es/components/Toolbar/ToolbarButton.js +16 -8
- package/lib/components/Toolbar/ToolbarButton.d.ts +12 -1
- package/lib/components/Toolbar/ToolbarButton.js +15 -6
- package/package.json +2 -2
- package/scss/components/EditInPlace/_edit-in-place.scss +2 -2
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
8
|
+
import { objectSpread2 as _objectSpread2, objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { forwardRef, useContext } from 'react';
|
10
10
|
import { ToolbarContext, blockClass as blockClass$1 } from './Toolbar.js';
|
11
11
|
import { p as propTypesExports } from '../../node_modules/prop-types/index.js';
|
@@ -13,7 +13,7 @@ import { IconButton } from '@carbon/react';
|
|
13
13
|
import cx from 'classnames';
|
14
14
|
import { pkg } from '../../settings.js';
|
15
15
|
|
16
|
-
var _excluded = ["caret", "children", "className", "renderIcon", "iconDescription"];
|
16
|
+
var _excluded = ["caret", "children", "className", "renderIcon", "iconDescription", "label"];
|
17
17
|
var blockClass = "".concat(blockClass$1, "__button");
|
18
18
|
/** Toolbar buttons are common functions performed as part of a products interface or an open window. */
|
19
19
|
var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
@@ -24,13 +24,14 @@ var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
24
24
|
className = _ref.className,
|
25
25
|
renderIcon = _ref.renderIcon,
|
26
26
|
_ref$iconDescription = _ref.iconDescription,
|
27
|
-
|
27
|
+
deprecated_iconDescription = _ref$iconDescription === void 0 ? '' : _ref$iconDescription,
|
28
|
+
label = _ref.label,
|
28
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
29
30
|
var Icon = renderIcon;
|
30
31
|
return /*#__PURE__*/React__default.createElement(IconButton, _extends({
|
31
32
|
align: (_useContext = useContext(ToolbarContext)) !== null && _useContext !== void 0 && _useContext.vertical ? 'right' : 'top'
|
32
33
|
}, rest, {
|
33
|
-
label:
|
34
|
+
label: label !== null && label !== void 0 ? label : deprecated_iconDescription,
|
34
35
|
ref: ref,
|
35
36
|
className: cx(className, _defineProperty({}, "".concat(blockClass, "--caret"), caret)),
|
36
37
|
kind: "ghost",
|
@@ -41,7 +42,14 @@ var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
41
42
|
});
|
42
43
|
var componentName = 'ToolbarButton';
|
43
44
|
ToolbarButton.displayName = componentName;
|
44
|
-
|
45
|
+
var deprecatedProps = {
|
46
|
+
/**
|
47
|
+
* **Deprecated**
|
48
|
+
* Specifies the label for the icon button
|
49
|
+
* */
|
50
|
+
iconDescription: propTypesExports.string
|
51
|
+
};
|
52
|
+
ToolbarButton.propTypes = _objectSpread2({
|
45
53
|
/** Determines whether the caret is rendered */
|
46
54
|
caret: propTypesExports.bool,
|
47
55
|
/** Provide the content of the `ToolbarButton` */
|
@@ -49,10 +57,10 @@ ToolbarButton.propTypes = {
|
|
49
57
|
/** Provide an optional class to be applied to the containing node */
|
50
58
|
className: propTypesExports.string,
|
51
59
|
/** Specifies the label for the icon button */
|
52
|
-
|
60
|
+
label: propTypesExports.string.isRequired,
|
53
61
|
/** Specifies the icon to be used by the ToolbarButton component */
|
54
62
|
renderIcon: propTypesExports.func.isRequired
|
55
|
-
};
|
63
|
+
}, deprecatedProps);
|
56
64
|
ToolbarButton = pkg.checkComponentEnabled(ToolbarButton, componentName);
|
57
65
|
|
58
|
-
export { ToolbarButton, blockClass };
|
66
|
+
export { ToolbarButton, blockClass, deprecatedProps };
|
@@ -13,8 +13,12 @@ export interface ToolbarButtonProps extends React.ComponentProps<typeof IconButt
|
|
13
13
|
caret?: boolean;
|
14
14
|
/** Provide an optional class to be applied to the containing node */
|
15
15
|
className?: string;
|
16
|
+
/**
|
17
|
+
* @deprecated use `label` instead
|
18
|
+
* Specifies the label for the icon button */
|
19
|
+
iconDescription?: string;
|
16
20
|
/** Specifies the label for the icon button */
|
17
|
-
|
21
|
+
label: string;
|
18
22
|
/** Specifies the icon to be used by the ToolbarButton component */
|
19
23
|
renderIcon: React.ElementType;
|
20
24
|
}
|
@@ -22,3 +26,10 @@ export interface ToolbarButtonProps extends React.ComponentProps<typeof IconButt
|
|
22
26
|
export declare let ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & {
|
23
27
|
children?: React.ReactNode;
|
24
28
|
} & React.RefAttributes<unknown>>;
|
29
|
+
export declare const deprecatedProps: {
|
30
|
+
/**
|
31
|
+
* **Deprecated**
|
32
|
+
* Specifies the label for the icon button
|
33
|
+
* */
|
34
|
+
iconDescription: import("prop-types").Requireable<string>;
|
35
|
+
};
|
@@ -22,7 +22,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
23
23
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
24
24
|
|
25
|
-
var _excluded = ["caret", "children", "className", "renderIcon", "iconDescription"];
|
25
|
+
var _excluded = ["caret", "children", "className", "renderIcon", "iconDescription", "label"];
|
26
26
|
var blockClass = "".concat(Toolbar.blockClass, "__button");
|
27
27
|
/** Toolbar buttons are common functions performed as part of a products interface or an open window. */
|
28
28
|
exports.ToolbarButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
@@ -33,13 +33,14 @@ exports.ToolbarButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33
33
|
className = _ref.className,
|
34
34
|
renderIcon = _ref.renderIcon,
|
35
35
|
_ref$iconDescription = _ref.iconDescription,
|
36
|
-
|
36
|
+
deprecated_iconDescription = _ref$iconDescription === void 0 ? '' : _ref$iconDescription,
|
37
|
+
label = _ref.label,
|
37
38
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
38
39
|
var Icon = renderIcon;
|
39
40
|
return /*#__PURE__*/React__default["default"].createElement(react.IconButton, _rollupPluginBabelHelpers["extends"]({
|
40
41
|
align: (_useContext = React.useContext(Toolbar.ToolbarContext)) !== null && _useContext !== void 0 && _useContext.vertical ? 'right' : 'top'
|
41
42
|
}, rest, {
|
42
|
-
label:
|
43
|
+
label: label !== null && label !== void 0 ? label : deprecated_iconDescription,
|
43
44
|
ref: ref,
|
44
45
|
className: cx__default["default"](className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--caret"), caret)),
|
45
46
|
kind: "ghost",
|
@@ -50,7 +51,14 @@ exports.ToolbarButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
50
51
|
});
|
51
52
|
var componentName = 'ToolbarButton';
|
52
53
|
exports.ToolbarButton.displayName = componentName;
|
53
|
-
|
54
|
+
var deprecatedProps = {
|
55
|
+
/**
|
56
|
+
* **Deprecated**
|
57
|
+
* Specifies the label for the icon button
|
58
|
+
* */
|
59
|
+
iconDescription: index.propTypesExports.string
|
60
|
+
};
|
61
|
+
exports.ToolbarButton.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
54
62
|
/** Determines whether the caret is rendered */
|
55
63
|
caret: index.propTypesExports.bool,
|
56
64
|
/** Provide the content of the `ToolbarButton` */
|
@@ -58,10 +66,11 @@ exports.ToolbarButton.propTypes = {
|
|
58
66
|
/** Provide an optional class to be applied to the containing node */
|
59
67
|
className: index.propTypesExports.string,
|
60
68
|
/** Specifies the label for the icon button */
|
61
|
-
|
69
|
+
label: index.propTypesExports.string.isRequired,
|
62
70
|
/** Specifies the icon to be used by the ToolbarButton component */
|
63
71
|
renderIcon: index.propTypesExports.func.isRequired
|
64
|
-
};
|
72
|
+
}, deprecatedProps);
|
65
73
|
exports.ToolbarButton = settings.pkg.checkComponentEnabled(exports.ToolbarButton, componentName);
|
66
74
|
|
67
75
|
exports.blockClass = blockClass;
|
76
|
+
exports.deprecatedProps = deprecatedProps;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.43.2-canary.
|
4
|
+
"version": "2.43.2-canary.170+0d8601017",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
121
121
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "0d860101791e8587f8d1688348aae8438c4d0fc9"
|
124
124
|
}
|
@@ -55,12 +55,12 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
55
55
|
}
|
56
56
|
|
57
57
|
.#{$block-class}--invalid {
|
58
|
-
|
58
|
+
border: 2px solid $support-error;
|
59
59
|
}
|
60
60
|
|
61
61
|
.#{$block-class}--focused {
|
62
|
+
border: 2px solid $focus;
|
62
63
|
background: $field-01;
|
63
|
-
outline: 2px solid $focus;
|
64
64
|
}
|
65
65
|
|
66
66
|
.#{$block-class}__text-input {
|