@commercetools-uikit/password-field 19.12.1 → 19.14.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.
@@ -68,8 +68,6 @@ var messages = reactIntl.defineMessages({
68
68
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
69
69
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
70
70
  const sequentialId = utils.createSequentialId('password-field-');
71
- const sequentialErrorsId = utils.createSequentialId('password-field-error-')();
72
- const sequentialWarningsId = utils.createSequentialId('password-field-warning-')();
73
71
 
74
72
  // Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
75
73
 
@@ -92,6 +90,8 @@ const PasswordField = props => {
92
90
  isPasswordVisible = _useToggleState2[0],
93
91
  togglePasswordVisibility = _useToggleState2[1];
94
92
  const id = hooks.useFieldId(props.id, sequentialId);
93
+ const errorsContainerId = `${id}-errors`;
94
+ const warningsContainerId = `${id}-warnings`;
95
95
  const hasError = props.touched && hasErrors(props.errors);
96
96
  const hasWarning = props.touched && hasWarnings(props.warnings);
97
97
  const canInteract = !props.isDisabled && !props.isReadOnly && props.renderShowHideButton;
@@ -142,14 +142,14 @@ const PasswordField = props => {
142
142
  }, utils.filterDataAttributes(props)), {}, {
143
143
  /* ARIA */
144
144
  "aria-invalid": hasError,
145
- "aria-errormessage": sequentialErrorsId
145
+ "aria-errormessage": errorsContainerId
146
146
  })), jsxRuntime.jsx(FieldErrors__default["default"], {
147
- id: sequentialErrorsId,
147
+ id: errorsContainerId,
148
148
  errors: props.errors,
149
149
  isVisible: hasError,
150
150
  renderError: props.renderError
151
151
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
152
- id: sequentialWarningsId,
152
+ id: warningsContainerId,
153
153
  warnings: props.warnings,
154
154
  isVisible: hasWarning,
155
155
  renderWarning: props.renderWarning
@@ -197,7 +197,7 @@ PasswordField.toFieldErrors = function toFieldErrors(errors) {
197
197
  var PasswordField$1 = PasswordField;
198
198
 
199
199
  // NOTE: This string will be replaced on build time with the package version.
200
- var version = "19.12.1";
200
+ var version = "19.14.0";
201
201
 
202
202
  exports["default"] = PasswordField$1;
203
203
  exports.version = version;
@@ -67,8 +67,6 @@ var messages = reactIntl.defineMessages({
67
67
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
68
68
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
69
69
  const sequentialId = utils.createSequentialId('password-field-');
70
- const sequentialErrorsId = utils.createSequentialId('password-field-error-')();
71
- const sequentialWarningsId = utils.createSequentialId('password-field-warning-')();
72
70
 
73
71
  // Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
74
72
 
@@ -91,6 +89,8 @@ const PasswordField = props => {
91
89
  isPasswordVisible = _useToggleState2[0],
92
90
  togglePasswordVisibility = _useToggleState2[1];
93
91
  const id = hooks.useFieldId(props.id, sequentialId);
92
+ const errorsContainerId = `${id}-errors`;
93
+ const warningsContainerId = `${id}-warnings`;
94
94
  const hasError = props.touched && hasErrors(props.errors);
95
95
  const hasWarning = props.touched && hasWarnings(props.warnings);
96
96
  const canInteract = !props.isDisabled && !props.isReadOnly && props.renderShowHideButton;
@@ -137,14 +137,14 @@ const PasswordField = props => {
137
137
  }, utils.filterDataAttributes(props)), {}, {
138
138
  /* ARIA */
139
139
  "aria-invalid": hasError,
140
- "aria-errormessage": sequentialErrorsId
140
+ "aria-errormessage": errorsContainerId
141
141
  })), jsxRuntime.jsx(FieldErrors__default["default"], {
142
- id: sequentialErrorsId,
142
+ id: errorsContainerId,
143
143
  errors: props.errors,
144
144
  isVisible: hasError,
145
145
  renderError: props.renderError
146
146
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
147
- id: sequentialWarningsId,
147
+ id: warningsContainerId,
148
148
  warnings: props.warnings,
149
149
  isVisible: hasWarning,
150
150
  renderWarning: props.renderWarning
@@ -166,7 +166,7 @@ PasswordField.toFieldErrors = function toFieldErrors(errors) {
166
166
  var PasswordField$1 = PasswordField;
167
167
 
168
168
  // NOTE: This string will be replaced on build time with the package version.
169
- var version = "19.12.1";
169
+ var version = "19.14.0";
170
170
 
171
171
  exports["default"] = PasswordField$1;
172
172
  exports.version = version;
@@ -42,8 +42,6 @@ var messages = defineMessages({
42
42
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
43
43
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
44
44
  const sequentialId = createSequentialId('password-field-');
45
- const sequentialErrorsId = createSequentialId('password-field-error-')();
46
- const sequentialWarningsId = createSequentialId('password-field-warning-')();
47
45
 
48
46
  // Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
49
47
 
@@ -66,6 +64,8 @@ const PasswordField = props => {
66
64
  isPasswordVisible = _useToggleState2[0],
67
65
  togglePasswordVisibility = _useToggleState2[1];
68
66
  const id = useFieldId(props.id, sequentialId);
67
+ const errorsContainerId = `${id}-errors`;
68
+ const warningsContainerId = `${id}-warnings`;
69
69
  const hasError = props.touched && hasErrors(props.errors);
70
70
  const hasWarning = props.touched && hasWarnings(props.warnings);
71
71
  const canInteract = !props.isDisabled && !props.isReadOnly && props.renderShowHideButton;
@@ -116,14 +116,14 @@ const PasswordField = props => {
116
116
  }, filterDataAttributes(props)), {}, {
117
117
  /* ARIA */
118
118
  "aria-invalid": hasError,
119
- "aria-errormessage": sequentialErrorsId
119
+ "aria-errormessage": errorsContainerId
120
120
  })), jsx(FieldErrors, {
121
- id: sequentialErrorsId,
121
+ id: errorsContainerId,
122
122
  errors: props.errors,
123
123
  isVisible: hasError,
124
124
  renderError: props.renderError
125
125
  }), jsx(FieldWarnings, {
126
- id: sequentialWarningsId,
126
+ id: warningsContainerId,
127
127
  warnings: props.warnings,
128
128
  isVisible: hasWarning,
129
129
  renderWarning: props.renderWarning
@@ -171,6 +171,6 @@ PasswordField.toFieldErrors = function toFieldErrors(errors) {
171
171
  var PasswordField$1 = PasswordField;
172
172
 
173
173
  // NOTE: This string will be replaced on build time with the package version.
174
- var version = "19.12.1";
174
+ var version = "19.14.0";
175
175
 
176
176
  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": "19.12.1",
4
+ "version": "19.14.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,18 +21,18 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "19.12.1",
25
- "@commercetools-uikit/design-system": "19.12.1",
26
- "@commercetools-uikit/field-errors": "19.12.1",
27
- "@commercetools-uikit/field-label": "19.12.1",
28
- "@commercetools-uikit/field-warnings": "19.12.1",
29
- "@commercetools-uikit/flat-button": "19.12.1",
30
- "@commercetools-uikit/hooks": "19.12.1",
31
- "@commercetools-uikit/icons": "19.12.1",
32
- "@commercetools-uikit/password-input": "19.12.1",
33
- "@commercetools-uikit/spacings-inline": "19.12.1",
34
- "@commercetools-uikit/spacings-stack": "19.12.1",
35
- "@commercetools-uikit/utils": "19.12.1",
24
+ "@commercetools-uikit/constraints": "19.14.0",
25
+ "@commercetools-uikit/design-system": "19.14.0",
26
+ "@commercetools-uikit/field-errors": "19.14.0",
27
+ "@commercetools-uikit/field-label": "19.14.0",
28
+ "@commercetools-uikit/field-warnings": "19.14.0",
29
+ "@commercetools-uikit/flat-button": "19.14.0",
30
+ "@commercetools-uikit/hooks": "19.14.0",
31
+ "@commercetools-uikit/icons": "19.14.0",
32
+ "@commercetools-uikit/password-input": "19.14.0",
33
+ "@commercetools-uikit/spacings-inline": "19.14.0",
34
+ "@commercetools-uikit/spacings-stack": "19.14.0",
35
+ "@commercetools-uikit/utils": "19.14.0",
36
36
  "@emotion/react": "^11.10.5",
37
37
  "@emotion/styled": "^11.10.5",
38
38
  "prop-types": "15.8.1"