@commercetools-uikit/input-utils 19.26.0 → 20.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.
|
@@ -5,14 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var react = require('@emotion/react');
|
|
6
6
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
8
|
-
var _pt = require('prop-types');
|
|
9
|
-
var react$1 = require('react');
|
|
10
8
|
var reactIntl = require('react-intl');
|
|
11
9
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
12
10
|
var icons = require('@commercetools-uikit/icons');
|
|
13
11
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
14
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
|
-
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
16
12
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
17
13
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
18
14
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -21,14 +17,15 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
21
17
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
22
18
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
23
19
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
20
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
21
|
+
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
22
|
+
var react$1 = require('react');
|
|
24
23
|
var TextareaAutosize = require('react-textarea-autosize');
|
|
25
24
|
var utils = require('@commercetools-uikit/utils');
|
|
26
25
|
|
|
27
26
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
28
27
|
|
|
29
|
-
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
30
28
|
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
31
|
-
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
32
29
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
33
30
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
34
31
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -37,6 +34,7 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
37
34
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
38
35
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
39
36
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
37
|
+
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
40
38
|
var TextareaAutosize__default = /*#__PURE__*/_interopDefault(TextareaAutosize);
|
|
41
39
|
|
|
42
40
|
var messages$1 = reactIntl.defineMessages({
|
|
@@ -64,7 +62,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
64
62
|
styles: "align-self:flex-start"
|
|
65
63
|
} : {
|
|
66
64
|
name: "10vpa6o-LocalizedInputToggle",
|
|
67
|
-
styles: "align-self:flex-start;label:LocalizedInputToggle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
65
|
+
styles: "align-self:flex-start;label:LocalizedInputToggle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb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WRJbnB1dFRvZ2dsZS5kaXNwbGF5TmFtZSA9ICdMb2NhbGl6ZWRJbnB1dFRvZ2dsZSc7XG5leHBvcnQgZGVmYXVsdCBMb2NhbGl6ZWRJbnB1dFRvZ2dsZTtcbiJdfQ== */",
|
|
68
66
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
69
67
|
};
|
|
70
68
|
const LocalizedInputToggle = _ref2 => {
|
|
@@ -88,15 +86,6 @@ const LocalizedInputToggle = _ref2 => {
|
|
|
88
86
|
})
|
|
89
87
|
});
|
|
90
88
|
};
|
|
91
|
-
LocalizedInputToggle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
92
|
-
icon: _pt__default["default"].element,
|
|
93
|
-
isOpen: _pt__default["default"].bool,
|
|
94
|
-
onClick: _pt__default["default"].func.isRequired,
|
|
95
|
-
isDisabled: _pt__default["default"].bool,
|
|
96
|
-
showMessage: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].any]),
|
|
97
|
-
hideMessage: _pt__default["default"].oneOfType([_pt__default["default"].string, _pt__default["default"].any]),
|
|
98
|
-
remainingLocalizations: _pt__default["default"].number
|
|
99
|
-
} : {};
|
|
100
89
|
LocalizedInputToggle.displayName = 'LocalizedInputToggle';
|
|
101
90
|
var LocalizedInputToggle$1 = LocalizedInputToggle;
|
|
102
91
|
|
|
@@ -234,29 +223,6 @@ const MultilineInput = _ref => {
|
|
|
234
223
|
cacheMeasurements
|
|
235
224
|
}, props))));
|
|
236
225
|
};
|
|
237
|
-
MultilineInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
238
|
-
autoComplete: _pt__default["default"].string,
|
|
239
|
-
className: _pt__default["default"].string,
|
|
240
|
-
hasError: _pt__default["default"].bool,
|
|
241
|
-
hasWarning: _pt__default["default"].bool,
|
|
242
|
-
id: _pt__default["default"].string,
|
|
243
|
-
isAutofocussed: _pt__default["default"].bool,
|
|
244
|
-
isCondensed: _pt__default["default"].bool,
|
|
245
|
-
isDisabled: _pt__default["default"].bool,
|
|
246
|
-
isReadOnly: _pt__default["default"].bool,
|
|
247
|
-
name: _pt__default["default"].string,
|
|
248
|
-
onBlur: _pt__default["default"].func,
|
|
249
|
-
onChange: _pt__default["default"].func,
|
|
250
|
-
onFocus: _pt__default["default"].func,
|
|
251
|
-
placeholder: _pt__default["default"].string,
|
|
252
|
-
value: _pt__default["default"].string.isRequired,
|
|
253
|
-
isOpen: _pt__default["default"].bool.isRequired,
|
|
254
|
-
cacheMeasurements: _pt__default["default"].bool,
|
|
255
|
-
onHeightChange: _pt__default["default"].func,
|
|
256
|
-
maxRows: _pt__default["default"].number,
|
|
257
|
-
'aria-invalid': _pt__default["default"].bool,
|
|
258
|
-
'aria-errormessage': _pt__default["default"].string
|
|
259
|
-
} : {};
|
|
260
226
|
MultilineInput.displayName = 'MultilineInput';
|
|
261
227
|
var MultilineInput$1 = MultilineInput;
|
|
262
228
|
|
|
@@ -285,7 +251,7 @@ const accessibleHiddenInputStyles = process.env.NODE_ENV === "production" ? {
|
|
|
285
251
|
var accessibleHiddenInputStyles$1 = accessibleHiddenInputStyles;
|
|
286
252
|
|
|
287
253
|
// NOTE: This string will be replaced on build time with the package version.
|
|
288
|
-
var version = "
|
|
254
|
+
var version = "20.0.0";
|
|
289
255
|
|
|
290
256
|
exports.LocalizedInputToggle = LocalizedInputToggle$1;
|
|
291
257
|
exports.MultilineInput = MultilineInput$1;
|
|
@@ -5,14 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var react = require('@emotion/react');
|
|
6
6
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
8
|
-
require('prop-types');
|
|
9
|
-
var react$1 = require('react');
|
|
10
8
|
var reactIntl = require('react-intl');
|
|
11
9
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
12
10
|
var icons = require('@commercetools-uikit/icons');
|
|
13
11
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
14
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
|
-
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
16
12
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
17
13
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
18
14
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -21,13 +17,15 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
21
17
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
22
18
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
23
19
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
20
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
21
|
+
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
22
|
+
var react$1 = require('react');
|
|
24
23
|
var TextareaAutosize = require('react-textarea-autosize');
|
|
25
24
|
var utils = require('@commercetools-uikit/utils');
|
|
26
25
|
|
|
27
26
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
28
27
|
|
|
29
28
|
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
30
|
-
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
31
29
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
32
30
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
33
31
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -36,6 +34,7 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
36
34
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
37
35
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
38
36
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
37
|
+
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
39
38
|
var TextareaAutosize__default = /*#__PURE__*/_interopDefault(TextareaAutosize);
|
|
40
39
|
|
|
41
40
|
var messages$1 = reactIntl.defineMessages({
|
|
@@ -82,7 +81,6 @@ const LocalizedInputToggle = _ref2 => {
|
|
|
82
81
|
})
|
|
83
82
|
});
|
|
84
83
|
};
|
|
85
|
-
LocalizedInputToggle.propTypes = {};
|
|
86
84
|
LocalizedInputToggle.displayName = 'LocalizedInputToggle';
|
|
87
85
|
var LocalizedInputToggle$1 = LocalizedInputToggle;
|
|
88
86
|
|
|
@@ -218,7 +216,6 @@ const MultilineInput = _ref => {
|
|
|
218
216
|
cacheMeasurements
|
|
219
217
|
}, props))));
|
|
220
218
|
};
|
|
221
|
-
MultilineInput.propTypes = {};
|
|
222
219
|
MultilineInput.displayName = 'MultilineInput';
|
|
223
220
|
var MultilineInput$1 = MultilineInput;
|
|
224
221
|
|
|
@@ -242,7 +239,7 @@ const accessibleHiddenInputStyles = {
|
|
|
242
239
|
var accessibleHiddenInputStyles$1 = accessibleHiddenInputStyles;
|
|
243
240
|
|
|
244
241
|
// NOTE: This string will be replaced on build time with the package version.
|
|
245
|
-
var version = "
|
|
242
|
+
var version = "20.0.0";
|
|
246
243
|
|
|
247
244
|
exports.LocalizedInputToggle = LocalizedInputToggle$1;
|
|
248
245
|
exports.MultilineInput = MultilineInput$1;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { designTokens } from '@commercetools-uikit/design-system';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
4
|
-
import _pt from 'prop-types';
|
|
5
|
-
import { useRef, useCallback } from 'react';
|
|
6
4
|
import { defineMessages, useIntl } from 'react-intl';
|
|
7
5
|
import FlatButton from '@commercetools-uikit/flat-button';
|
|
8
6
|
import { WorldIcon } from '@commercetools-uikit/icons';
|
|
9
7
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
10
|
-
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
11
|
-
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
12
8
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
13
9
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
14
10
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
@@ -17,6 +13,9 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
|
|
|
17
13
|
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
18
14
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
19
15
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
16
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
17
|
+
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
18
|
+
import { useRef, useCallback } from 'react';
|
|
20
19
|
import TextareaAutosize from 'react-textarea-autosize';
|
|
21
20
|
import { warning, filterDataAttributes } from '@commercetools-uikit/utils';
|
|
22
21
|
|
|
@@ -45,7 +44,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
45
44
|
styles: "align-self:flex-start"
|
|
46
45
|
} : {
|
|
47
46
|
name: "10vpa6o-LocalizedInputToggle",
|
|
48
|
-
styles: "align-self:flex-start;label:LocalizedInputToggle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
47
|
+
styles: "align-self:flex-start;label:LocalizedInputToggle;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxvY2FsaXplZC1pbnB1dC10b2dnbGUudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNDYyIsImZpbGUiOiJsb2NhbGl6ZWQtaW5wdXQtdG9nZ2xlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB0eXBlIHsgUHJvcHMgYXMgSW50bE1lc3NhZ2UgfSBmcm9tICdyZWFjdC1pbnRsL3NyYy9jb21wb25lbnRzL21lc3NhZ2UnO1xuaW1wb3J0IHsgTW91c2VFdmVudCwgS2V5Ym9hcmRFdmVudCwgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgdXNlSW50bCB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IEZsYXRCdXR0b24gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZmxhdC1idXR0b24nO1xuaW1wb3J0IHsgV29ybGRJY29uIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvaWNvbnMnO1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4uL21lc3NhZ2VzL2xvY2FsaXplZC1pbnB1dCc7XG5cbmV4cG9ydCB0eXBlIFRMb2NhbGl6ZWRJbnB1dFRvZ2dsZVByb3BzID0ge1xuICBpY29uPzogUmVhY3RFbGVtZW50O1xuICBpc09wZW4/OiBib29sZWFuO1xuICBvbkNsaWNrOiAoXG4gICAgZXZlbnQ6XG4gICAgICB8IE1vdXNlRXZlbnQ8SFRNTEJ1dHRvbkVsZW1lbnQ+XG4gICAgICB8IEtleWJvYXJkRXZlbnQ8SFR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gICAgICAgb25DbGljaz17cHJvcHMub25DbGlja31cbiAgICAgICAgaXNEaXNhYmxlZD17cHJvcHMuaXNEaXNhYmxlZH1cbiAgICAgIC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5Mb2NhbGl6ZWRJbnB1dFRvZ2dsZS5kaXNwbGF5TmFtZSA9ICdMb2NhbGl6ZWRJbnB1dFRvZ2dsZSc7XG5leHBvcnQgZGVmYXVsdCBMb2NhbGl6ZWRJbnB1dFRvZ2dsZTtcbiJdfQ== */",
|
|
49
48
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
50
49
|
};
|
|
51
50
|
const LocalizedInputToggle = _ref2 => {
|
|
@@ -69,15 +68,6 @@ const LocalizedInputToggle = _ref2 => {
|
|
|
69
68
|
})
|
|
70
69
|
});
|
|
71
70
|
};
|
|
72
|
-
LocalizedInputToggle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
73
|
-
icon: _pt.element,
|
|
74
|
-
isOpen: _pt.bool,
|
|
75
|
-
onClick: _pt.func.isRequired,
|
|
76
|
-
isDisabled: _pt.bool,
|
|
77
|
-
showMessage: _pt.oneOfType([_pt.string, _pt.any]),
|
|
78
|
-
hideMessage: _pt.oneOfType([_pt.string, _pt.any]),
|
|
79
|
-
remainingLocalizations: _pt.number
|
|
80
|
-
} : {};
|
|
81
71
|
LocalizedInputToggle.displayName = 'LocalizedInputToggle';
|
|
82
72
|
var LocalizedInputToggle$1 = LocalizedInputToggle;
|
|
83
73
|
|
|
@@ -215,29 +205,6 @@ const MultilineInput = _ref => {
|
|
|
215
205
|
cacheMeasurements
|
|
216
206
|
}, props))));
|
|
217
207
|
};
|
|
218
|
-
MultilineInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
219
|
-
autoComplete: _pt.string,
|
|
220
|
-
className: _pt.string,
|
|
221
|
-
hasError: _pt.bool,
|
|
222
|
-
hasWarning: _pt.bool,
|
|
223
|
-
id: _pt.string,
|
|
224
|
-
isAutofocussed: _pt.bool,
|
|
225
|
-
isCondensed: _pt.bool,
|
|
226
|
-
isDisabled: _pt.bool,
|
|
227
|
-
isReadOnly: _pt.bool,
|
|
228
|
-
name: _pt.string,
|
|
229
|
-
onBlur: _pt.func,
|
|
230
|
-
onChange: _pt.func,
|
|
231
|
-
onFocus: _pt.func,
|
|
232
|
-
placeholder: _pt.string,
|
|
233
|
-
value: _pt.string.isRequired,
|
|
234
|
-
isOpen: _pt.bool.isRequired,
|
|
235
|
-
cacheMeasurements: _pt.bool,
|
|
236
|
-
onHeightChange: _pt.func,
|
|
237
|
-
maxRows: _pt.number,
|
|
238
|
-
'aria-invalid': _pt.bool,
|
|
239
|
-
'aria-errormessage': _pt.string
|
|
240
|
-
} : {};
|
|
241
208
|
MultilineInput.displayName = 'MultilineInput';
|
|
242
209
|
var MultilineInput$1 = MultilineInput;
|
|
243
210
|
|
|
@@ -266,6 +233,6 @@ const accessibleHiddenInputStyles = process.env.NODE_ENV === "production" ? {
|
|
|
266
233
|
var accessibleHiddenInputStyles$1 = accessibleHiddenInputStyles;
|
|
267
234
|
|
|
268
235
|
// NOTE: This string will be replaced on build time with the package version.
|
|
269
|
-
var version = "
|
|
236
|
+
var version = "20.0.0";
|
|
270
237
|
|
|
271
238
|
export { LocalizedInputToggle$1 as LocalizedInputToggle, MultilineInput$1 as MultilineInput, accessibleHiddenInputStyles$1 as accessibleHiddenInputStyles, getInputStyles, messages$1 as messagesLocalizedInput, messages as messagesMultilineInput, version };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Props as IntlMessage } from 'react-intl/src/components/message';
|
|
2
2
|
import { MouseEvent, KeyboardEvent, ReactElement } from 'react';
|
|
3
3
|
export type TLocalizedInputToggleProps = {
|
|
4
4
|
icon?: ReactElement;
|
|
5
5
|
isOpen?: boolean;
|
|
6
6
|
onClick: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement> | boolean) => void;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
-
showMessage?: string |
|
|
9
|
-
hideMessage?: string |
|
|
8
|
+
showMessage?: string | IntlMessage;
|
|
9
|
+
hideMessage?: string | IntlMessage;
|
|
10
10
|
remainingLocalizations?: number;
|
|
11
11
|
};
|
|
12
12
|
declare const LocalizedInputToggle: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/input-utils",
|
|
3
3
|
"description": "Utilities for working with input components.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "20.0.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,20 +21,19 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/design-system": "
|
|
25
|
-
"@commercetools-uikit/flat-button": "
|
|
26
|
-
"@commercetools-uikit/icons": "
|
|
27
|
-
"@commercetools-uikit/utils": "
|
|
24
|
+
"@commercetools-uikit/design-system": "20.0.0",
|
|
25
|
+
"@commercetools-uikit/flat-button": "20.0.0",
|
|
26
|
+
"@commercetools-uikit/icons": "20.0.0",
|
|
27
|
+
"@commercetools-uikit/utils": "20.0.0",
|
|
28
28
|
"@emotion/react": "^11.10.5",
|
|
29
|
-
"prop-types": "15.8.1",
|
|
30
29
|
"react-textarea-autosize": "8.4.0"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
|
-
"react": "
|
|
34
|
-
"react-intl": "^
|
|
32
|
+
"react": "19.0.0",
|
|
33
|
+
"react-intl": "^7.1.4"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {
|
|
37
|
-
"react": "
|
|
38
|
-
"react-intl": "
|
|
36
|
+
"react": "19.x",
|
|
37
|
+
"react-intl": "7.x"
|
|
39
38
|
}
|
|
40
39
|
}
|