@commercetools-uikit/password-field 12.2.3 → 12.2.7

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.
@@ -64,15 +64,15 @@ var messages = reactIntl.defineMessages({
64
64
  }
65
65
  });
66
66
 
67
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (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; }
67
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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; }
68
68
 
69
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; _forEachInstanceProperty__default['default'](_context2 = ownKeys(Object(source), true)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default['default']) { _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)); } else { var _context3; _forEachInstanceProperty__default['default'](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } } return target; }
69
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source), true)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
70
70
  var sequentialId = utils.createSequentialId('password-field-');
71
71
 
72
72
  var hasErrors = function hasErrors(errors) {
73
73
  var _context;
74
74
 
75
- return errors && _someInstanceProperty__default['default'](_context = _Object$values__default['default'](errors)).call(_context, Boolean);
75
+ return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
76
76
  };
77
77
 
78
78
  var PasswordField = function PasswordField(props) {
@@ -85,14 +85,14 @@ var PasswordField = function PasswordField(props) {
85
85
 
86
86
  var id = hooks.useFieldId(props.id, sequentialId);
87
87
  var hasError = props.touched && hasErrors(props.errors);
88
- return jsxRuntime.jsx(Constraints__default['default'].Horizontal, {
88
+ return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
89
89
  max: props.horizontalConstraint,
90
- children: jsxRuntime.jsxs(Stack__default['default'], {
90
+ children: jsxRuntime.jsxs(Stack__default["default"], {
91
91
  scale: "xs",
92
- children: [jsxRuntime.jsxs(Inline__default['default'], {
92
+ children: [jsxRuntime.jsxs(Inline__default["default"], {
93
93
  alignItems: "flex-end",
94
94
  justifyContent: "space-between",
95
- children: [jsxRuntime.jsx(FieldLabel__default['default'], {
95
+ children: [jsxRuntime.jsx(FieldLabel__default["default"], {
96
96
  hint: props.hint,
97
97
  title: props.title,
98
98
  badge: props.badge,
@@ -101,13 +101,13 @@ var PasswordField = function PasswordField(props) {
101
101
  description: props.description,
102
102
  onInfoButtonClick: props.onInfoButtonClick,
103
103
  hasRequiredIndicator: props.isRequired
104
- }), !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(FlatButton__default['default'], {
104
+ }), !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(FlatButton__default["default"], {
105
105
  icon: isPasswordVisible ? jsxRuntime.jsx(icons.EyeCrossedIcon, {}) : jsxRuntime.jsx(icons.EyeIcon, {}),
106
106
  label: isPasswordVisible ? intl.formatMessage(messages.hide) : intl.formatMessage(messages.show),
107
107
  onClick: togglePasswordVisibility,
108
108
  isDisabled: !props.value
109
109
  })]
110
- }), jsxRuntime.jsx(PasswordInput__default['default'], _objectSpread({
110
+ }), jsxRuntime.jsx(PasswordInput__default["default"], _objectSpread({
111
111
  id: id,
112
112
  name: props.name,
113
113
  value: props.value,
@@ -122,7 +122,7 @@ var PasswordField = function PasswordField(props) {
122
122
  placeholder: props.placeholder,
123
123
  autoComplete: props.autoComplete,
124
124
  horizontalConstraint: "scale"
125
- }, utils.filterDataAttributes(props))), jsxRuntime.jsx(FieldErrors__default['default'], {
125
+ }, utils.filterDataAttributes(props))), jsxRuntime.jsx(FieldErrors__default["default"], {
126
126
  errors: props.errors,
127
127
  isVisible: hasError,
128
128
  renderError: props.renderError
@@ -138,20 +138,20 @@ PasswordField.propTypes = process.env.NODE_ENV !== "production" ? {
138
138
  /**
139
139
  * Used as HTML id property. An id is auto-generated when it is not specified.
140
140
  */
141
- id: PropTypes__default['default'].string,
141
+ id: PropTypes__default["default"].string,
142
142
 
143
143
  /**
144
144
  * Horizontal size limit of the input fields.
145
145
  */
146
- horizontalConstraint: PropTypes__default['default'].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
146
+ horizontalConstraint: PropTypes__default["default"].oneOf([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto']),
147
147
 
148
148
  /**
149
149
  * A map of errors. Error messages for known errors are rendered automatically.
150
150
  * <br />
151
151
  * Unknown errors will be forwarded to `renderError`
152
152
  */
153
- errors: PropTypes__default['default'].shape({
154
- missing: PropTypes__default['default'].bool
153
+ errors: PropTypes__default["default"].shape({
154
+ missing: PropTypes__default["default"].bool
155
155
  }),
156
156
 
157
157
  /**
@@ -159,35 +159,35 @@ PasswordField.propTypes = process.env.NODE_ENV !== "production" ? {
159
159
  * <br />
160
160
  * Signature: `(key, error) => React.node`
161
161
  */
162
- renderError: PropTypes__default['default'].func,
162
+ renderError: PropTypes__default["default"].func,
163
163
 
164
164
  /**
165
165
  * Indicates if the value is required. Shows an the "required asterisk" if so.
166
166
  */
167
- isRequired: PropTypes__default['default'].bool,
167
+ isRequired: PropTypes__default["default"].bool,
168
168
 
169
169
  /**
170
170
  * Indicates whether the field was touched. Errors will only be shown when the field was touched.
171
171
  */
172
- touched: PropTypes__default['default'].bool,
172
+ touched: PropTypes__default["default"].bool,
173
173
  // PasswordInput
174
174
 
175
175
  /**
176
176
  * Used as HTML name of the input component. property
177
177
  */
178
- name: PropTypes__default['default'].string,
178
+ name: PropTypes__default["default"].string,
179
179
 
180
180
  /**
181
181
  * Value of the input component.
182
182
  */
183
- value: PropTypes__default['default'].string.isRequired,
183
+ value: PropTypes__default["default"].string.isRequired,
184
184
 
185
185
  /**
186
186
  * Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value.
187
187
  * <br />
188
188
  * Signature: `(event) => void`
189
189
  */
190
- onChange: requiredIf__default['default'](PropTypes__default['default'].func, function (props) {
190
+ onChange: requiredIf__default["default"](PropTypes__default["default"].func, function (props) {
191
191
  return !props.isReadOnly;
192
192
  }),
193
193
 
@@ -196,57 +196,57 @@ PasswordField.propTypes = process.env.NODE_ENV !== "production" ? {
196
196
  * <br />
197
197
  * Signature: `(event) => void`
198
198
  */
199
- onBlur: PropTypes__default['default'].func,
199
+ onBlur: PropTypes__default["default"].func,
200
200
 
201
201
  /**
202
202
  * Called when input is focused
203
203
  * <br />
204
204
  * Signature: `(event) => void`
205
205
  */
206
- onFocus: PropTypes__default['default'].func,
206
+ onFocus: PropTypes__default["default"].func,
207
207
 
208
208
  /**
209
209
  * Focus the input on initial render
210
210
  */
211
- isAutofocussed: PropTypes__default['default'].bool,
211
+ isAutofocussed: PropTypes__default["default"].bool,
212
212
 
213
213
  /**
214
214
  * Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
215
215
  */
216
- isDisabled: PropTypes__default['default'].bool,
216
+ isDisabled: PropTypes__default["default"].bool,
217
217
 
218
218
  /**
219
219
  * Indicates that the field is displaying read-only content
220
220
  */
221
- isReadOnly: PropTypes__default['default'].bool,
221
+ isReadOnly: PropTypes__default["default"].bool,
222
222
 
223
223
  /**
224
224
  * Placeholder text for the input
225
225
  */
226
- placeholder: PropTypes__default['default'].string,
226
+ placeholder: PropTypes__default["default"].string,
227
227
 
228
228
  /**
229
229
  * Password autocomplete mode
230
230
  */
231
- autoComplete: PropTypes__default['default'].string,
231
+ autoComplete: PropTypes__default["default"].string,
232
232
  // LabelField
233
233
 
234
234
  /**
235
235
  * Title of the label
236
236
  */
237
- title: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].node]).isRequired,
237
+ title: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]).isRequired,
238
238
 
239
239
  /**
240
240
  * Hint for the label. Provides a supplementary but important information regarding the behaviour of the input (e.g warn about uniqueness of a field, when it can only be set once), whereas `description` can describe it in more depth. Can also receive a `hintIcon`.
241
241
  */
242
- hint: requiredIf__default['default'](PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].node]), function (props) {
242
+ hint: requiredIf__default["default"](PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]), function (props) {
243
243
  return props.hintIcon;
244
244
  }),
245
245
 
246
246
  /**
247
247
  * Provides a description for the title.
248
248
  */
249
- description: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].node]),
249
+ description: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].node]),
250
250
 
251
251
  /**
252
252
  * Function called when info button is pressed.
@@ -255,29 +255,29 @@ PasswordField.propTypes = process.env.NODE_ENV !== "production" ? {
255
255
  * <br />
256
256
  * Signature: `(event) => void`
257
257
  */
258
- onInfoButtonClick: PropTypes__default['default'].func,
258
+ onInfoButtonClick: PropTypes__default["default"].func,
259
259
 
260
260
  /**
261
261
  * Icon to be displayed beside the hint text.
262
262
  * <br />
263
263
  * Will only get rendered when `hint` is passed as well.
264
264
  */
265
- hintIcon: PropTypes__default['default'].node,
265
+ hintIcon: PropTypes__default["default"].node,
266
266
 
267
267
  /**
268
268
  * Badge to be displayed beside the label.
269
269
  * <br />
270
270
  * Might be used to display additional information about the content of the field (E.g verified email)
271
271
  */
272
- badge: PropTypes__default['default'].node
272
+ badge: PropTypes__default["default"].node
273
273
  } : {};
274
274
  PasswordField.defaultProps = {
275
275
  horizontalConstraint: 'scale'
276
276
  };
277
277
  var PasswordField$1 = PasswordField;
278
278
 
279
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
280
- var version = '12.2.3';
279
+ // NOTE: This string will be replaced on build time with the package version.
280
+ var version = "12.2.7";
281
281
 
282
- exports['default'] = PasswordField$1;
282
+ exports["default"] = PasswordField$1;
283
283
  exports.version = version;
@@ -62,15 +62,15 @@ var messages = reactIntl.defineMessages({
62
62
  }
63
63
  });
64
64
 
65
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (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; }
65
+ function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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; }
66
66
 
67
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; _forEachInstanceProperty__default['default'](_context2 = ownKeys(Object(source), true)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default['default']) { _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)); } else { var _context3; _forEachInstanceProperty__default['default'](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } } return target; }
67
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context2; _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source), true)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
68
68
  var sequentialId = utils.createSequentialId('password-field-');
69
69
 
70
70
  var hasErrors = function hasErrors(errors) {
71
71
  var _context;
72
72
 
73
- return errors && _someInstanceProperty__default['default'](_context = _Object$values__default['default'](errors)).call(_context, Boolean);
73
+ return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
74
74
  };
75
75
 
76
76
  var PasswordField = function PasswordField(props) {
@@ -83,14 +83,14 @@ var PasswordField = function PasswordField(props) {
83
83
 
84
84
  var id = hooks.useFieldId(props.id, sequentialId);
85
85
  var hasError = props.touched && hasErrors(props.errors);
86
- return jsxRuntime.jsx(Constraints__default['default'].Horizontal, {
86
+ return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
87
87
  max: props.horizontalConstraint,
88
- children: jsxRuntime.jsxs(Stack__default['default'], {
88
+ children: jsxRuntime.jsxs(Stack__default["default"], {
89
89
  scale: "xs",
90
- children: [jsxRuntime.jsxs(Inline__default['default'], {
90
+ children: [jsxRuntime.jsxs(Inline__default["default"], {
91
91
  alignItems: "flex-end",
92
92
  justifyContent: "space-between",
93
- children: [jsxRuntime.jsx(FieldLabel__default['default'], {
93
+ children: [jsxRuntime.jsx(FieldLabel__default["default"], {
94
94
  hint: props.hint,
95
95
  title: props.title,
96
96
  badge: props.badge,
@@ -99,13 +99,13 @@ var PasswordField = function PasswordField(props) {
99
99
  description: props.description,
100
100
  onInfoButtonClick: props.onInfoButtonClick,
101
101
  hasRequiredIndicator: props.isRequired
102
- }), !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(FlatButton__default['default'], {
102
+ }), !props.isDisabled && !props.isReadOnly && jsxRuntime.jsx(FlatButton__default["default"], {
103
103
  icon: isPasswordVisible ? jsxRuntime.jsx(icons.EyeCrossedIcon, {}) : jsxRuntime.jsx(icons.EyeIcon, {}),
104
104
  label: isPasswordVisible ? intl.formatMessage(messages.hide) : intl.formatMessage(messages.show),
105
105
  onClick: togglePasswordVisibility,
106
106
  isDisabled: !props.value
107
107
  })]
108
- }), jsxRuntime.jsx(PasswordInput__default['default'], _objectSpread({
108
+ }), jsxRuntime.jsx(PasswordInput__default["default"], _objectSpread({
109
109
  id: id,
110
110
  name: props.name,
111
111
  value: props.value,
@@ -120,7 +120,7 @@ var PasswordField = function PasswordField(props) {
120
120
  placeholder: props.placeholder,
121
121
  autoComplete: props.autoComplete,
122
122
  horizontalConstraint: "scale"
123
- }, utils.filterDataAttributes(props))), jsxRuntime.jsx(FieldErrors__default['default'], {
123
+ }, utils.filterDataAttributes(props))), jsxRuntime.jsx(FieldErrors__default["default"], {
124
124
  errors: props.errors,
125
125
  isVisible: hasError,
126
126
  renderError: props.renderError
@@ -136,8 +136,8 @@ PasswordField.defaultProps = {
136
136
  };
137
137
  var PasswordField$1 = PasswordField;
138
138
 
139
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
140
- var version = '12.2.3';
139
+ // NOTE: This string will be replaced on build time with the package version.
140
+ var version = "12.2.7";
141
141
 
142
- exports['default'] = PasswordField$1;
142
+ exports["default"] = PasswordField$1;
143
143
  exports.version = version;
@@ -250,7 +250,7 @@ PasswordField.defaultProps = {
250
250
  };
251
251
  var PasswordField$1 = PasswordField;
252
252
 
253
- // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
254
- var version = '12.2.3';
253
+ // NOTE: This string will be replaced on build time with the package version.
254
+ var version = "12.2.7";
255
255
 
256
256
  export { PasswordField$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/password-field",
3
3
  "description": "A controlled text input component for passwords with validation states.",
4
- "version": "12.2.3",
4
+ "version": "12.2.7",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -11,7 +11,6 @@
11
11
  "homepage": "https://uikit.commercetools.com",
12
12
  "keywords": ["javascript", "design system", "react", "uikit"],
13
13
  "license": "MIT",
14
- "private": false,
15
14
  "publishConfig": {
16
15
  "access": "public"
17
16
  },
@@ -19,23 +18,20 @@
19
18
  "main": "dist/commercetools-uikit-password-field.cjs.js",
20
19
  "module": "dist/commercetools-uikit-password-field.esm.js",
21
20
  "files": ["dist"],
22
- "scripts": {
23
- "prepare": "../../../../scripts/version.js replace"
24
- },
25
21
  "dependencies": {
26
- "@babel/runtime": "7.14.8",
27
- "@babel/runtime-corejs3": "7.14.9",
28
- "@commercetools-uikit/constraints": "12.2.3",
29
- "@commercetools-uikit/design-system": "12.2.3",
30
- "@commercetools-uikit/field-errors": "12.2.3",
31
- "@commercetools-uikit/field-label": "12.2.3",
32
- "@commercetools-uikit/flat-button": "12.2.3",
33
- "@commercetools-uikit/hooks": "12.2.3",
34
- "@commercetools-uikit/icons": "12.2.3",
35
- "@commercetools-uikit/password-input": "12.2.3",
36
- "@commercetools-uikit/spacings-inline": "12.2.3",
37
- "@commercetools-uikit/spacings-stack": "12.2.3",
38
- "@commercetools-uikit/utils": "12.2.0",
22
+ "@babel/runtime": "7.16.3",
23
+ "@babel/runtime-corejs3": "7.16.3",
24
+ "@commercetools-uikit/constraints": "12.2.5",
25
+ "@commercetools-uikit/design-system": "12.2.5",
26
+ "@commercetools-uikit/field-errors": "12.2.5",
27
+ "@commercetools-uikit/field-label": "12.2.7",
28
+ "@commercetools-uikit/flat-button": "12.2.5",
29
+ "@commercetools-uikit/hooks": "12.2.5",
30
+ "@commercetools-uikit/icons": "12.2.7",
31
+ "@commercetools-uikit/password-input": "12.2.7",
32
+ "@commercetools-uikit/spacings-inline": "12.2.5",
33
+ "@commercetools-uikit/spacings-stack": "12.2.5",
34
+ "@commercetools-uikit/utils": "12.2.5",
39
35
  "@emotion/react": "^11.4.0",
40
36
  "@emotion/styled": "^11.3.0",
41
37
  "prop-types": "15.7.2",
@@ -43,7 +39,7 @@
43
39
  },
44
40
  "devDependencies": {
45
41
  "react": "17.0.2",
46
- "react-intl": "5.20.7"
42
+ "react-intl": "5.21.2"
47
43
  },
48
44
  "peerDependencies": {
49
45
  "react": "17.x",