@carbon/ibm-products 2.43.2-canary.138 → 2.43.2-canary.139
Sign up to get free protection for your applications and to get access to all the features.
@@ -90,6 +90,10 @@ export interface EditInplaceProps extends PropsWithChildren {
|
|
90
90
|
* current value of the input
|
91
91
|
*/
|
92
92
|
value: string;
|
93
|
+
/**
|
94
|
+
* placeholder for the input
|
95
|
+
*/
|
96
|
+
placeholder?: string;
|
93
97
|
}
|
94
98
|
export declare let EditInPlace: React.ForwardRefExoticComponent<EditInplaceProps & React.RefAttributes<HTMLDivElement>>;
|
95
99
|
export declare const deprecatedProps: {
|
@@ -15,7 +15,7 @@ import cx from 'classnames';
|
|
15
15
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
16
16
|
|
17
17
|
var _Close, _Checkmark, _Edit;
|
18
|
-
var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "onBlur", "saveLabel", "size", "tooltipAlignment", "value"];
|
18
|
+
var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "onBlur", "saveLabel", "size", "tooltipAlignment", "value", "placeholder"];
|
19
19
|
var componentName = 'EditInPlace';
|
20
20
|
var blockClass = "".concat(pkg.prefix, "--edit-in-place");
|
21
21
|
var defaults = {
|
@@ -42,6 +42,7 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
42
42
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
43
43
|
tooltipAlignment = _ref.tooltipAlignment,
|
44
44
|
value = _ref.value,
|
45
|
+
placeholder = _ref.placeholder,
|
45
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
47
|
var _useState = useState(false),
|
47
48
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -156,6 +157,7 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
156
157
|
id: id,
|
157
158
|
className: cx("".concat(blockClass, "__text-input"), "".concat(carbon.prefix, "--text-input"), "".concat(carbon.prefix, "--text-input--").concat(size)),
|
158
159
|
type: "text",
|
160
|
+
placeholder: placeholder,
|
159
161
|
value: value,
|
160
162
|
onChange: onChangeHandler,
|
161
163
|
ref: inputRef
|
@@ -274,6 +276,10 @@ EditInPlace.propTypes = _objectSpread2({
|
|
274
276
|
* handler that is called when the save button is pressed or when the user removes focus from the input if it has a new value
|
275
277
|
*/
|
276
278
|
onSave: PropTypes.func.isRequired,
|
279
|
+
/**
|
280
|
+
* Placeholder for text input
|
281
|
+
*/
|
282
|
+
placeholder: PropTypes.string,
|
277
283
|
/**
|
278
284
|
* determines if the input is in readOnly mode
|
279
285
|
*/
|
@@ -90,6 +90,10 @@ export interface EditInplaceProps extends PropsWithChildren {
|
|
90
90
|
* current value of the input
|
91
91
|
*/
|
92
92
|
value: string;
|
93
|
+
/**
|
94
|
+
* placeholder for the input
|
95
|
+
*/
|
96
|
+
placeholder?: string;
|
93
97
|
}
|
94
98
|
export declare let EditInPlace: React.ForwardRefExoticComponent<EditInplaceProps & React.RefAttributes<HTMLDivElement>>;
|
95
99
|
export declare const deprecatedProps: {
|
@@ -24,7 +24,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
24
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
25
25
|
|
26
26
|
var _Close, _Checkmark, _Edit;
|
27
|
-
var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "onBlur", "saveLabel", "size", "tooltipAlignment", "value"];
|
27
|
+
var _excluded = ["cancelLabel", "editAlwaysVisible", "editLabel", "id", "inheritTypography", "invalid", "invalidLabel", "invalidText", "labelText", "onCancel", "onChange", "onSave", "onBlur", "saveLabel", "size", "tooltipAlignment", "value", "placeholder"];
|
28
28
|
var componentName = 'EditInPlace';
|
29
29
|
var blockClass = "".concat(settings.pkg.prefix, "--edit-in-place");
|
30
30
|
var defaults = {
|
@@ -51,6 +51,7 @@ exports.EditInPlace = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
51
51
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
52
52
|
tooltipAlignment = _ref.tooltipAlignment,
|
53
53
|
value = _ref.value,
|
54
|
+
placeholder = _ref.placeholder,
|
54
55
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
55
56
|
var _useState = React.useState(false),
|
56
57
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
@@ -165,6 +166,7 @@ exports.EditInPlace = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
165
166
|
id: id,
|
166
167
|
className: cx__default["default"]("".concat(blockClass, "__text-input"), "".concat(settings.carbon.prefix, "--text-input"), "".concat(settings.carbon.prefix, "--text-input--").concat(size)),
|
167
168
|
type: "text",
|
169
|
+
placeholder: placeholder,
|
168
170
|
value: value,
|
169
171
|
onChange: onChangeHandler,
|
170
172
|
ref: inputRef
|
@@ -283,6 +285,10 @@ exports.EditInPlace.propTypes = _rollupPluginBabelHelpers.objectSpread2({
|
|
283
285
|
* handler that is called when the save button is pressed or when the user removes focus from the input if it has a new value
|
284
286
|
*/
|
285
287
|
onSave: index["default"].func.isRequired,
|
288
|
+
/**
|
289
|
+
* Placeholder for text input
|
290
|
+
*/
|
291
|
+
placeholder: index["default"].string,
|
286
292
|
/**
|
287
293
|
* determines if the input is in readOnly mode
|
288
294
|
*/
|
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.139+85430cbb6",
|
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": "85430cbb6ca99c21bc699f216f759d06cad7a8f8"
|
124
124
|
}
|