@uncinc/uncinc-react-kitchen-sink 2.20.11 → 2.20.12

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.
@@ -9,6 +9,7 @@ import { RemoveScroll } from 'react-remove-scroll';
9
9
  import { useTranslation } from 'react-i18next';
10
10
  import PropTypes from 'prop-types';
11
11
  import classnames from 'classnames';
12
+ import { v4 as uuidv4 } from 'uuid';
12
13
  import useDialogHelpers from '../../hooks/useDialogHelpers';
13
14
  import './style.scss';
14
15
  var Dialog = function Dialog(props) {
@@ -37,14 +38,15 @@ var Dialog = function Dialog(props) {
37
38
  var TitleComponent = titleComponent;
38
39
  var WrapperComponent = wrapperComponent;
39
40
  var BackdropComponent = backdropComponent;
41
+ var uuid = uuidv4();
40
42
  var _useDialogHelpers = useDialogHelpers({
41
43
  id: id,
42
44
  wrapperElement: wrapper,
43
45
  closeFunction: closeFunction,
44
46
  isOpen: isOpen,
45
- disableClosers: disableClosers
47
+ disableClosers: disableClosers,
48
+ ariaLabelledBy: uuid
46
49
  }),
47
- labelId = _useDialogHelpers.labelId,
48
50
  dialogHelpersProps = _useDialogHelpers.dialogHelpersProps,
49
51
  dialogId = _useDialogHelpers.id;
50
52
  if (!isOpen) return null;
@@ -56,7 +58,7 @@ var Dialog = function Dialog(props) {
56
58
  }, dialogHelpersProps, {
57
59
  forwardRef: wrapper
58
60
  }), /*#__PURE__*/React.createElement("div", {
59
- id: labelId,
61
+ id: uuid,
60
62
  className: "Dialog__sr-only"
61
63
  }, dialogLabel), TitleComponent && /*#__PURE__*/React.createElement("div", {
62
64
  className: "Dialog__title"
@@ -99,7 +99,7 @@ export var TextField = function TextField(props) {
99
99
  onKeyUp: handleChange,
100
100
  "aria-describedby": "".concat(error && isTouched ? errorId : '', " ").concat(description ? descriptionId : '').trim() || undefined,
101
101
  "aria-invalid": Boolean(error && isTouched),
102
- autoComplete: autoCompleteField ? fieldName : undefined,
102
+ autoComplete: autoCompleteField || undefined,
103
103
  type: revealPassword ? 'text' : inputType,
104
104
  value: value,
105
105
  disabled: disabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.20.11",
3
+ "version": "2.20.12",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",