@commercetools-uikit/text-input 15.15.0 → 16.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.
- package/dist/commercetools-uikit-text-input.cjs.d.ts +1 -0
- package/dist/commercetools-uikit-text-input.cjs.d.ts.map +1 -0
- package/dist/commercetools-uikit-text-input.cjs.dev.js +4 -6
- package/dist/commercetools-uikit-text-input.cjs.prod.js +4 -6
- package/dist/commercetools-uikit-text-input.esm.js +4 -6
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commercetools-uikit-text-input.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -35,11 +35,11 @@ var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
|
35
35
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
36
36
|
|
|
37
37
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
38
|
-
|
|
38
|
+
const defaultProps = {
|
|
39
39
|
horizontalConstraint: 'scale'
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
const TextInput = props => {
|
|
43
43
|
if (!props.isReadOnly) {
|
|
44
44
|
process.env.NODE_ENV !== "production" ? utils.warning(typeof props.onChange === 'function', 'TextInput: `onChange` is required when is not read only.') : void 0;
|
|
45
45
|
}
|
|
@@ -96,14 +96,12 @@ TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
96
96
|
TextInput.displayName = 'TextInput';
|
|
97
97
|
TextInput.defaultProps = defaultProps;
|
|
98
98
|
|
|
99
|
-
TextInput.isEmpty =
|
|
100
|
-
return !value || _trimInstanceProperty__default["default"](value).call(value).length === 0;
|
|
101
|
-
};
|
|
99
|
+
TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"](value).call(value).length === 0;
|
|
102
100
|
|
|
103
101
|
var TextInput$1 = TextInput;
|
|
104
102
|
|
|
105
103
|
// NOTE: This string will be replaced on build time with the package version.
|
|
106
|
-
var version = "
|
|
104
|
+
var version = "16.0.0";
|
|
107
105
|
|
|
108
106
|
exports["default"] = TextInput$1;
|
|
109
107
|
exports.version = version;
|
|
@@ -34,11 +34,11 @@ var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
|
34
34
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
35
|
|
|
36
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
37
|
-
|
|
37
|
+
const defaultProps = {
|
|
38
38
|
horizontalConstraint: 'scale'
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const TextInput = props => {
|
|
42
42
|
if (!props.isReadOnly) ;
|
|
43
43
|
|
|
44
44
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
@@ -75,14 +75,12 @@ TextInput.propTypes = {};
|
|
|
75
75
|
TextInput.displayName = 'TextInput';
|
|
76
76
|
TextInput.defaultProps = defaultProps;
|
|
77
77
|
|
|
78
|
-
TextInput.isEmpty =
|
|
79
|
-
return !value || _trimInstanceProperty__default["default"](value).call(value).length === 0;
|
|
80
|
-
};
|
|
78
|
+
TextInput.isEmpty = value => !value || _trimInstanceProperty__default["default"](value).call(value).length === 0;
|
|
81
79
|
|
|
82
80
|
var TextInput$1 = TextInput;
|
|
83
81
|
|
|
84
82
|
// NOTE: This string will be replaced on build time with the package version.
|
|
85
|
-
var version = "
|
|
83
|
+
var version = "16.0.0";
|
|
86
84
|
|
|
87
85
|
exports["default"] = TextInput$1;
|
|
88
86
|
exports.version = version;
|
|
@@ -17,11 +17,11 @@ import { jsx } from '@emotion/react/jsx-runtime';
|
|
|
17
17
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
18
|
|
|
19
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
20
|
-
|
|
20
|
+
const defaultProps = {
|
|
21
21
|
horizontalConstraint: 'scale'
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
const TextInput = props => {
|
|
25
25
|
if (!props.isReadOnly) {
|
|
26
26
|
process.env.NODE_ENV !== "production" ? warning(typeof props.onChange === 'function', 'TextInput: `onChange` is required when is not read only.') : void 0;
|
|
27
27
|
}
|
|
@@ -78,13 +78,11 @@ TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
78
78
|
TextInput.displayName = 'TextInput';
|
|
79
79
|
TextInput.defaultProps = defaultProps;
|
|
80
80
|
|
|
81
|
-
TextInput.isEmpty =
|
|
82
|
-
return !value || _trimInstanceProperty(value).call(value).length === 0;
|
|
83
|
-
};
|
|
81
|
+
TextInput.isEmpty = value => !value || _trimInstanceProperty(value).call(value).length === 0;
|
|
84
82
|
|
|
85
83
|
var TextInput$1 = TextInput;
|
|
86
84
|
|
|
87
85
|
// NOTE: This string will be replaced on build time with the package version.
|
|
88
|
-
var version = "
|
|
86
|
+
var version = "16.0.0";
|
|
89
87
|
|
|
90
88
|
export { TextInput$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/text-input",
|
|
3
3
|
"description": "A controlled text input component for single-line strings with validation states.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "16.0.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "
|
|
25
|
-
"@commercetools-uikit/design-system": "
|
|
26
|
-
"@commercetools-uikit/input-utils": "
|
|
27
|
-
"@commercetools-uikit/utils": "
|
|
24
|
+
"@commercetools-uikit/constraints": "16.0.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "16.0.0",
|
|
26
|
+
"@commercetools-uikit/input-utils": "16.0.0",
|
|
27
|
+
"@commercetools-uikit/utils": "16.0.0",
|
|
28
28
|
"@emotion/react": "^11.10.5",
|
|
29
29
|
"@emotion/styled": "^11.10.5",
|
|
30
30
|
"prop-types": "15.8.1"
|