@zohodesk/components 1.2.26 → 1.2.28

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/README.md CHANGED
@@ -32,12 +32,20 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
- # 1.2.26
35
+ # 1.2.28
36
+
37
+ - **CheckBox** - getContainerRef prop supported
38
+ - **Radio** - children, customProps, getRef props supported. tabIndex option supported inside a11y prop
39
+
40
+ # 1.2.27
36
41
 
37
- - ** MultiSelect, MultiSelectWithAvatar ** - Mobile Header Render Issue in Mobile Responsive Fixed.
38
- - ** isMobilePopover ** - Function added in Dropbox.
39
- - ** Tag ** - closeTitle not working issue fixed ( because value sends in wrong prop key data-title)
42
+ - **DateWidget** - The issue with the YearView Open State Reset on Blur Event in DidMount has been resolved
43
+
44
+ # 1.2.26
40
45
 
46
+ - **MultiSelect, MultiSelectWithAvatar** - Mobile Header Render Issue in Mobile Responsive Fixed.
47
+ - **isMobilePopover** - Function added in Dropbox.
48
+ - **Tag** - closeTitle not working issue fixed ( because value sends in wrong prop key data-title)
41
49
 
42
50
  # 1.2.25
43
51
 
@@ -11,6 +11,7 @@ export default class CheckBox extends React.Component {
11
11
  constructor(props) {
12
12
  super(props);
13
13
  this.onChange = this.onChange.bind(this);
14
+ this.handleGetContainerRef = this.handleGetContainerRef.bind(this);
14
15
  }
15
16
 
16
17
  onChange(e) {
@@ -21,6 +22,14 @@ export default class CheckBox extends React.Component {
21
22
  onChange && onChange(!checked, e);
22
23
  }
23
24
 
25
+ handleGetContainerRef(ele) {
26
+ let {
27
+ getContainerRef,
28
+ id
29
+ } = this.props;
30
+ getContainerRef && getContainerRef(ele, id);
31
+ }
32
+
24
33
  render() {
25
34
  let {
26
35
  id,
@@ -78,6 +87,7 @@ export default class CheckBox extends React.Component {
78
87
  onClick: isReadOnly || disabled ? null : this.onChange,
79
88
  tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
80
89
  "aria-checked": ariaChecked,
90
+ eleRef: this.handleGetContainerRef,
81
91
  role: role,
82
92
  "aria-label": ariaLabel,
83
93
  "aria-labelledby": ariaLabelledby,
@@ -8,6 +8,7 @@ export const propTypes = {
8
8
  disabled: PropTypes.bool,
9
9
  disabledTitle: PropTypes.string,
10
10
  getRef: PropTypes.func,
11
+ getContainerRef: PropTypes.func,
11
12
  id: PropTypes.string,
12
13
  isFilled: PropTypes.bool,
13
14
  isClipped: PropTypes.bool,
@@ -909,7 +909,8 @@ class DateWidgetComponent extends React.Component {
909
909
  if (isAllowedDateType) {
910
910
  // if (focusOrder !== oldFocusOrder) {
911
911
  const {
912
- dateFormatSelection = {}
912
+ dateFormatSelection = {},
913
+ isFocused
913
914
  } = this.state;
914
915
  const {
915
916
  order = []
@@ -931,9 +932,17 @@ class DateWidgetComponent extends React.Component {
931
932
 
932
933
  if (isPopupOpen) {
933
934
  if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
934
- this.DateTimeYearViewToggle(true, isMonthOpen);
935
- } else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
936
- this.DateTimeYearViewToggle(false, false);
935
+ if (!isFocused && isYearView) {
936
+ this.DateTimeYearViewToggle(true, oldIsMonthOpen);
937
+ } else {
938
+ this.DateTimeYearViewToggle(true, isMonthOpen);
939
+ }
940
+ } else if (yearViewTypes.indexOf(focusedType) === -1) {
941
+ if (!isFocused && isYearView) {
942
+ this.DateTimeYearViewToggle(isYearView, oldIsMonthOpen);
943
+ } else {
944
+ this.DateTimeYearViewToggle(false, false);
945
+ }
937
946
  }
938
947
  } // }
939
948
 
package/es/Radio/Radio.js CHANGED
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  /* eslint css-modules/no-unused-class: [2, { markAsUsed: ['small', 'medium'] }] */
2
4
  import React from 'react';
3
5
  import { defaultProps } from './props/defaultProps';
@@ -9,6 +11,7 @@ export default class Radio extends React.Component {
9
11
  constructor(props) {
10
12
  super(props);
11
13
  this.onChange = this.onChange.bind(this);
14
+ this.handleGetRef = this.handleGetRef.bind(this);
12
15
  }
13
16
 
14
17
  onChange(e) {
@@ -19,6 +22,14 @@ export default class Radio extends React.Component {
19
22
  onChange && onChange(value, e);
20
23
  }
21
24
 
25
+ handleGetRef(ele) {
26
+ let {
27
+ getRef,
28
+ value
29
+ } = this.props;
30
+ getRef && getRef(ele, value);
31
+ }
32
+
22
33
  render() {
23
34
  let {
24
35
  id,
@@ -38,6 +49,8 @@ export default class Radio extends React.Component {
38
49
  active,
39
50
  isFilled,
40
51
  customClass,
52
+ customProps,
53
+ children,
41
54
  a11y
42
55
  } = this.props;
43
56
  let {
@@ -50,12 +63,17 @@ export default class Radio extends React.Component {
50
63
  let {
51
64
  ariaHidden,
52
65
  role = 'radio',
66
+ tabIndex,
53
67
  ariaChecked = checked,
54
68
  ariaLabel,
55
69
  ariaLabelledby,
56
70
  ariaReadonly = isReadOnly || disabled ? true : false
57
71
  } = a11y;
58
- return /*#__PURE__*/React.createElement(Container, {
72
+ let {
73
+ ContainerProps = {},
74
+ LabelProps = {}
75
+ } = customProps;
76
+ return /*#__PURE__*/React.createElement(Container, _extends({
59
77
  dataId: value ? value.toLowerCase() : 'RadioComp',
60
78
  isCover: false,
61
79
  isInline: text ? false : true,
@@ -65,13 +83,14 @@ export default class Radio extends React.Component {
65
83
  "data-title": toolTip,
66
84
  onClick: !isReadOnly && !disabled ? this.onChange : '',
67
85
  "aria-checked": ariaChecked,
68
- tabindex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
86
+ tabindex: isReadOnly || disabled || ariaHidden ? '-1' : tabIndex || '0',
87
+ eleRef: this.handleGetRef,
69
88
  role: role,
70
89
  "aria-Hidden": ariaHidden,
71
90
  "aria-label": ariaLabel,
72
91
  "aria-labelledby": ariaLabelledby,
73
92
  "aria-readonly": ariaReadonly
74
- }, /*#__PURE__*/React.createElement(Box, {
93
+ }, ContainerProps), /*#__PURE__*/React.createElement(Box, {
75
94
  className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
76
95
  ${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
77
96
  }, /*#__PURE__*/React.createElement("input", {
@@ -97,18 +116,18 @@ export default class Radio extends React.Component {
97
116
  }) : null))), text && /*#__PURE__*/React.createElement(Box, {
98
117
  flexible: true,
99
118
  className: style.text
100
- }, /*#__PURE__*/React.createElement(Label, {
119
+ }, /*#__PURE__*/React.createElement(Label, _extends({
101
120
  text: text,
102
- palette: disabled ? 'disable' : labelPalette,
121
+ palette: labelPalette,
103
122
  size: labelSize,
104
123
  type: "title",
105
124
  clipped: true,
106
125
  dataId: `${text}_label`,
107
126
  variant: variant,
108
127
  title: toolTip ? toolTip : text,
109
- customClass: `${checked && active && !disabled ? `${style[`${palette}checkedActive`]}` : ''}
128
+ customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
110
129
  ${style[`${palette}Label`]} ${accessMode} ${customLabel}`
111
- })));
130
+ }, LabelProps))), children);
112
131
  }
113
132
 
114
133
  }
@@ -21,6 +21,9 @@
21
21
  .readonly, .disabled {
22
22
  cursor: not-allowed;
23
23
  }
24
+ .disabled {
25
+ opacity: 0.7
26
+ }
24
27
  .radio {
25
28
  composes: offSelection from '../common/common.module.css';
26
29
  width: var(--radio_width);
@@ -1145,7 +1145,7 @@ exports[`Radio rendering the accessMode when disabled 1`] = `
1145
1145
  data-test-id="boxComponent"
1146
1146
  >
1147
1147
  <label
1148
- class="label title medium disable font_default
1148
+ class="label title medium default font_default
1149
1149
  dotted cursor
1150
1150
  primaryLabel disabled "
1151
1151
  data-id="RadioText_label"
@@ -1505,7 +1505,7 @@ exports[`Radio rendering the disabled is true 1`] = `
1505
1505
  data-test-id="boxComponent"
1506
1506
  >
1507
1507
  <label
1508
- class="label title medium disable font_default
1508
+ class="label title medium default font_default
1509
1509
  dotted cursor
1510
1510
  undefined disabled "
1511
1511
  data-id="RadioText_label"
@@ -1567,7 +1567,7 @@ exports[`Radio rendering the disabledTitle 1`] = `
1567
1567
  data-test-id="boxComponent"
1568
1568
  >
1569
1569
  <label
1570
- class="label title medium disable font_default
1570
+ class="label title medium default font_default
1571
1571
  dotted cursor
1572
1572
  primaryLabel disabled "
1573
1573
  data-id="RadioText_label"
@@ -10,5 +10,6 @@ export const defaultProps = {
10
10
  variant: 'default',
11
11
  isFilled: true,
12
12
  customClass: {},
13
+ customProps: {},
13
14
  a11y: {}
14
15
  };
@@ -4,6 +4,7 @@ export const propTypes = {
4
4
  checked: PropTypes.bool,
5
5
  disabled: PropTypes.bool,
6
6
  disabledTitle: PropTypes.string,
7
+ getRef: PropTypes.func,
7
8
  id: PropTypes.string,
8
9
  isFilled: PropTypes.bool,
9
10
  isReadOnly: PropTypes.bool,
@@ -20,14 +21,20 @@ export const propTypes = {
20
21
  customRadio: PropTypes.string,
21
22
  customLabel: PropTypes.string
22
23
  }),
24
+ customProps: PropTypes.exact({
25
+ ContainerProps: PropTypes.object,
26
+ LabelProps: PropTypes.object
27
+ }),
23
28
  a11y: PropTypes.shape({
24
29
  ariaChecked: PropTypes.bool,
25
30
  ariaHidden: PropTypes.bool,
26
31
  role: PropTypes.string,
32
+ tabIndex: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
27
33
  ariaLabelledby: PropTypes.string,
28
34
  ariaLabel: PropTypes.string,
29
35
  ariaReadonly: PropTypes.bool
30
36
  }),
37
+ children: PropTypes.node,
31
38
  onChange: PropTypes.func,
32
39
  text: PropTypes.string
33
40
  };
@@ -24,6 +24,7 @@ const CheckBox = props => {
24
24
  isFilled,
25
25
  isClipped,
26
26
  getRef,
27
+ getContainerRef,
27
28
  variant,
28
29
  active,
29
30
  dataId,
@@ -42,6 +43,10 @@ const CheckBox = props => {
42
43
  onChange && onChange(!checked, e);
43
44
  }
44
45
 
46
+ function handleGetContainerRef(ele) {
47
+ getContainerRef && getContainerRef(ele, id);
48
+ }
49
+
45
50
  let {
46
51
  CheckBoxProps = {},
47
52
  LabelProps = {}
@@ -73,6 +78,7 @@ const CheckBox = props => {
73
78
  onClick: isReadOnly || disabled ? null : onChange,
74
79
  tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
75
80
  "aria-checked": ariaChecked,
81
+ eleRef: handleGetContainerRef,
76
82
  role: role,
77
83
  "aria-label": ariaLabel,
78
84
  "aria-labelledby": ariaLabelledby,
@@ -8,6 +8,7 @@ export const propTypes = {
8
8
  disabled: PropTypes.bool,
9
9
  disabledTitle: PropTypes.string,
10
10
  getRef: PropTypes.func,
11
+ getContainerRef: PropTypes.func,
11
12
  id: PropTypes.string,
12
13
  isFilled: PropTypes.bool,
13
14
  isClipped: PropTypes.bool,
@@ -909,7 +909,8 @@ class DateWidgetComponent extends React.Component {
909
909
  if (isAllowedDateType) {
910
910
  // if (focusOrder !== oldFocusOrder) {
911
911
  const {
912
- dateFormatSelection = {}
912
+ dateFormatSelection = {},
913
+ isFocused
913
914
  } = this.state;
914
915
  const {
915
916
  order = []
@@ -931,9 +932,17 @@ class DateWidgetComponent extends React.Component {
931
932
 
932
933
  if (isPopupOpen) {
933
934
  if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
934
- this.DateTimeYearViewToggle(true, isMonthOpen);
935
- } else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
936
- this.DateTimeYearViewToggle(false, false);
935
+ if (!isFocused && isYearView) {
936
+ this.DateTimeYearViewToggle(true, oldIsMonthOpen);
937
+ } else {
938
+ this.DateTimeYearViewToggle(true, isMonthOpen);
939
+ }
940
+ } else if (yearViewTypes.indexOf(focusedType) === -1) {
941
+ if (!isFocused && isYearView) {
942
+ this.DateTimeYearViewToggle(isYearView, oldIsMonthOpen);
943
+ } else {
944
+ this.DateTimeYearViewToggle(false, false);
945
+ }
937
946
  }
938
947
  } // }
939
948
 
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import React from 'react';
2
4
  import { defaultProps } from './props/defaultProps';
3
5
  import { propTypes } from './props/propTypes';
@@ -24,6 +26,9 @@ const Radio = props => {
24
26
  active,
25
27
  isFilled,
26
28
  customClass,
29
+ customProps,
30
+ getRef,
31
+ children,
27
32
  a11y
28
33
  } = props;
29
34
  let {
@@ -36,11 +41,16 @@ const Radio = props => {
36
41
  let {
37
42
  ariaHidden,
38
43
  role = 'radio',
44
+ tabIndex,
39
45
  ariaChecked = checked,
40
46
  ariaLabel,
41
47
  ariaLabelledby,
42
48
  ariaReadonly = isReadOnly || disabled ? true : false
43
49
  } = a11y;
50
+ let {
51
+ ContainerProps = {},
52
+ LabelProps = {}
53
+ } = customProps;
44
54
 
45
55
  function onChange(e) {
46
56
  const {
@@ -49,7 +59,11 @@ const Radio = props => {
49
59
  onChange && onChange(value, e);
50
60
  }
51
61
 
52
- return /*#__PURE__*/React.createElement(Container, {
62
+ function handleGetRef(ele) {
63
+ getRef && getRef(ele, value);
64
+ }
65
+
66
+ return /*#__PURE__*/React.createElement(Container, _extends({
53
67
  dataId: value ? value.toLowerCase() : 'RadioComp',
54
68
  isCover: false,
55
69
  isInline: text ? false : true,
@@ -59,13 +73,14 @@ const Radio = props => {
59
73
  "data-title": toolTip,
60
74
  onClick: !isReadOnly && !disabled ? onChange : '',
61
75
  "aria-checked": ariaChecked,
62
- tabindex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
76
+ tabindex: isReadOnly || disabled || ariaHidden ? '-1' : tabIndex || '0',
77
+ eleRef: handleGetRef,
63
78
  role: role,
64
79
  "aria-Hidden": ariaHidden,
65
80
  "aria-label": ariaLabel,
66
81
  "aria-labelledby": ariaLabelledby,
67
82
  "aria-readonly": ariaReadonly
68
- }, /*#__PURE__*/React.createElement(Box, {
83
+ }, ContainerProps), /*#__PURE__*/React.createElement(Box, {
69
84
  className: `${style.radio} ${checked ? `${style[`rdBox${palette}`]}` : ''}
70
85
  ${isReadOnly || disabled ? '' : `${style[`hover${palette}`]}`} ${style[size]} ${isFilled ? style.filled : ''} ${style[`centerPath${palette}`]} ${customRadio}`
71
86
  }, /*#__PURE__*/React.createElement("input", {
@@ -91,18 +106,18 @@ const Radio = props => {
91
106
  }) : null))), text && /*#__PURE__*/React.createElement(Box, {
92
107
  flexible: true,
93
108
  className: style.text
94
- }, /*#__PURE__*/React.createElement(Label, {
109
+ }, /*#__PURE__*/React.createElement(Label, _extends({
95
110
  text: text,
96
- palette: disabled ? 'disable' : labelPalette,
111
+ palette: labelPalette,
97
112
  size: labelSize,
98
113
  type: "title",
99
114
  clipped: true,
100
115
  dataId: `${text}_label`,
101
116
  variant: variant,
102
117
  title: toolTip ? toolTip : text,
103
- customClass: `${checked && active && !disabled ? `${style[`${palette}checkedActive`]}` : ''}
118
+ customClass: `${checked && active ? `${style[`${palette}checkedActive`]}` : ''}
104
119
  ${style[`${palette}Label`]} ${accessMode} ${customLabel}`
105
- })));
120
+ }, LabelProps))), children);
106
121
  };
107
122
 
108
123
  export default Radio;
@@ -10,5 +10,6 @@ export const defaultProps = {
10
10
  variant: 'default',
11
11
  isFilled: true,
12
12
  customClass: {},
13
+ customProps: {},
13
14
  a11y: {}
14
15
  };
@@ -4,6 +4,7 @@ export const propTypes = {
4
4
  checked: PropTypes.bool,
5
5
  disabled: PropTypes.bool,
6
6
  disabledTitle: PropTypes.string,
7
+ getRef: PropTypes.func,
7
8
  id: PropTypes.string,
8
9
  isFilled: PropTypes.bool,
9
10
  isReadOnly: PropTypes.bool,
@@ -20,14 +21,20 @@ export const propTypes = {
20
21
  customRadio: PropTypes.string,
21
22
  customLabel: PropTypes.string
22
23
  }),
24
+ customProps: PropTypes.exact({
25
+ ContainerProps: PropTypes.object,
26
+ LabelProps: PropTypes.object
27
+ }),
23
28
  a11y: PropTypes.shape({
24
29
  ariaChecked: PropTypes.bool,
25
30
  ariaHidden: PropTypes.bool,
26
31
  role: PropTypes.string,
32
+ tabIndex: PropTypes.oneOfType(PropTypes.string, PropTypes.number),
27
33
  ariaLabelledby: PropTypes.string,
28
34
  ariaLabel: PropTypes.string,
29
35
  ariaReadonly: PropTypes.bool
30
36
  }),
37
+ children: PropTypes.node,
31
38
  onChange: PropTypes.func,
32
39
  text: PropTypes.string
33
40
  };
@@ -57,6 +57,7 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
57
57
 
58
58
  _this = _super.call(this, props);
59
59
  _this.onChange = _this.onChange.bind(_assertThisInitialized(_this));
60
+ _this.handleGetContainerRef = _this.handleGetContainerRef.bind(_assertThisInitialized(_this));
60
61
  return _this;
61
62
  }
62
63
 
@@ -68,33 +69,41 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
68
69
  checked = _this$props.checked;
69
70
  onChange && onChange(!checked, e);
70
71
  }
72
+ }, {
73
+ key: "handleGetContainerRef",
74
+ value: function handleGetContainerRef(ele) {
75
+ var _this$props2 = this.props,
76
+ getContainerRef = _this$props2.getContainerRef,
77
+ id = _this$props2.id;
78
+ getContainerRef && getContainerRef(ele, id);
79
+ }
71
80
  }, {
72
81
  key: "render",
73
82
  value: function render() {
74
- var _this$props2 = this.props,
75
- id = _this$props2.id,
76
- checked = _this$props2.checked,
77
- disabled = _this$props2.disabled,
78
- isReadOnly = _this$props2.isReadOnly,
79
- disabledTitle = _this$props2.disabledTitle,
80
- title = _this$props2.title,
81
- palette = _this$props2.palette,
82
- text = _this$props2.text,
83
- size = _this$props2.size,
84
- labelPalette = _this$props2.labelPalette,
85
- labelSize = _this$props2.labelSize,
86
- isFilled = _this$props2.isFilled,
87
- isClipped = _this$props2.isClipped,
88
- getRef = _this$props2.getRef,
89
- variant = _this$props2.variant,
90
- active = _this$props2.active,
91
- dataId = _this$props2.dataId,
92
- name = _this$props2.name,
93
- activeStyle = _this$props2.activeStyle,
94
- a11y = _this$props2.a11y,
95
- customClass = _this$props2.customClass,
96
- customProps = _this$props2.customProps,
97
- dataSelectorId = _this$props2.dataSelectorId;
83
+ var _this$props3 = this.props,
84
+ id = _this$props3.id,
85
+ checked = _this$props3.checked,
86
+ disabled = _this$props3.disabled,
87
+ isReadOnly = _this$props3.isReadOnly,
88
+ disabledTitle = _this$props3.disabledTitle,
89
+ title = _this$props3.title,
90
+ palette = _this$props3.palette,
91
+ text = _this$props3.text,
92
+ size = _this$props3.size,
93
+ labelPalette = _this$props3.labelPalette,
94
+ labelSize = _this$props3.labelSize,
95
+ isFilled = _this$props3.isFilled,
96
+ isClipped = _this$props3.isClipped,
97
+ getRef = _this$props3.getRef,
98
+ variant = _this$props3.variant,
99
+ active = _this$props3.active,
100
+ dataId = _this$props3.dataId,
101
+ name = _this$props3.name,
102
+ activeStyle = _this$props3.activeStyle,
103
+ a11y = _this$props3.a11y,
104
+ customClass = _this$props3.customClass,
105
+ customProps = _this$props3.customProps,
106
+ dataSelectorId = _this$props3.dataSelectorId;
98
107
  var _customProps$CheckBox = customProps.CheckBoxProps,
99
108
  CheckBoxProps = _customProps$CheckBox === void 0 ? {} : _customProps$CheckBox,
100
109
  _customProps$LabelPro = customProps.LabelProps,
@@ -127,6 +136,7 @@ var CheckBox = /*#__PURE__*/function (_React$Component) {
127
136
  onClick: isReadOnly || disabled ? null : this.onChange,
128
137
  tabIndex: isReadOnly || disabled || ariaHidden ? '-1' : '0',
129
138
  "aria-checked": ariaChecked,
139
+ eleRef: this.handleGetContainerRef,
130
140
  role: role,
131
141
  "aria-label": ariaLabel,
132
142
  "aria-labelledby": ariaLabelledby,
@@ -18,6 +18,7 @@ var propTypes = {
18
18
  disabled: _propTypes["default"].bool,
19
19
  disabledTitle: _propTypes["default"].string,
20
20
  getRef: _propTypes["default"].func,
21
+ getContainerRef: _propTypes["default"].func,
21
22
  id: _propTypes["default"].string,
22
23
  isFilled: _propTypes["default"].bool,
23
24
  isClipped: _propTypes["default"].bool,
@@ -934,8 +934,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
934
934
 
935
935
  if (isAllowedDateType) {
936
936
  // if (focusOrder !== oldFocusOrder) {
937
- var _this$state$dateForma = this.state.dateFormatSelection,
938
- dateFormatSelection = _this$state$dateForma === void 0 ? {} : _this$state$dateForma;
937
+ var _this$state5 = this.state,
938
+ _this$state5$dateForm = _this$state5.dateFormatSelection,
939
+ dateFormatSelection = _this$state5$dateForm === void 0 ? {} : _this$state5$dateForm,
940
+ isFocused = _this$state5.isFocused;
939
941
  var _dateFormatSelection$2 = dateFormatSelection.order,
940
942
  order = _dateFormatSelection$2 === void 0 ? [] : _dateFormatSelection$2;
941
943
  var isPopupOpen = this.props.isPopupOpen; // const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
@@ -953,9 +955,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
953
955
 
954
956
  if (isPopupOpen) {
955
957
  if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
956
- this.DateTimeYearViewToggle(true, isMonthOpen);
957
- } else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
958
- this.DateTimeYearViewToggle(false, false);
958
+ if (!isFocused && isYearView) {
959
+ this.DateTimeYearViewToggle(true, oldIsMonthOpen);
960
+ } else {
961
+ this.DateTimeYearViewToggle(true, isMonthOpen);
962
+ }
963
+ } else if (yearViewTypes.indexOf(focusedType) === -1) {
964
+ if (!isFocused && isYearView) {
965
+ this.DateTimeYearViewToggle(isYearView, oldIsMonthOpen);
966
+ } else {
967
+ this.DateTimeYearViewToggle(false, false);
968
+ }
959
969
  }
960
970
  } // }
961
971
 
@@ -1004,12 +1014,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
1004
1014
  a11y = _this$props11.a11y,
1005
1015
  boxSize = _this$props11.boxSize,
1006
1016
  onError = _this$props11.onError;
1007
- var _this$state5 = this.state,
1008
- _this$state5$selected = _this$state5.selected,
1009
- value = _this$state5$selected === void 0 ? '' : _this$state5$selected,
1010
- isError = _this$state5.isError,
1011
- isDateEdited = _this$state5.isDateEdited,
1012
- isFocused = _this$state5.isFocused;
1017
+ var _this$state6 = this.state,
1018
+ _this$state6$selected = _this$state6.selected,
1019
+ value = _this$state6$selected === void 0 ? '' : _this$state6$selected,
1020
+ isError = _this$state6.isError,
1021
+ isDateEdited = _this$state6.isDateEdited,
1022
+ isFocused = _this$state6.isFocused;
1013
1023
  var showValue = this.handleGetShowValue();
1014
1024
  var isAllowedDateType = this.handleGetAllowedType();
1015
1025
  var showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;