@zohodesk/components 1.0.0-temp-109 → 1.0.0-temp-111

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.
Files changed (129) hide show
  1. package/README.md +18 -1
  2. package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +3 -0
  3. package/assets/Appearance/dark/themes/green/greenDarkComponentTheme.module.css +3 -0
  4. package/assets/Appearance/dark/themes/orange/orangeDarkComponentTheme.module.css +3 -0
  5. package/assets/Appearance/dark/themes/red/redDarkComponentTheme.module.css +3 -0
  6. package/assets/Appearance/dark/themes/yellow/yellowDarkComponentTheme.module.css +3 -0
  7. package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +3 -0
  8. package/assets/Appearance/default/themes/green/greenDefaultComponentTheme.module.css +3 -0
  9. package/assets/Appearance/default/themes/orange/orangeDefaultComponentTheme.module.css +3 -0
  10. package/assets/Appearance/default/themes/red/redDefaultComponentTheme.module.css +3 -0
  11. package/assets/Appearance/default/themes/yellow/yellowDefaultComponentTheme.module.css +3 -0
  12. package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +3 -0
  13. package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +3 -0
  14. package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +3 -0
  15. package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +3 -0
  16. package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +3 -0
  17. package/es/AppContainer/AppContainer.js +1 -0
  18. package/es/Button/Button.js +5 -3
  19. package/es/DateTime/CalendarView.js +25 -14
  20. package/es/DateTime/DateTime.js +6 -4
  21. package/es/DateTime/DateTime.module.css +10 -8
  22. package/es/DateTime/DateWidget.js +18 -2
  23. package/es/DateTime/props/defaultProps.js +2 -1
  24. package/es/DropBox/DropBox.js +24 -4
  25. package/es/DropBox/props/defaultProps.js +2 -1
  26. package/es/DropBox/props/propTypes.js +1 -0
  27. package/es/ListItem/ListContainer.js +1 -0
  28. package/es/MultiSelect/MultiSelect.js +15 -7
  29. package/es/MultiSelect/MultiSelect.module.css +4 -0
  30. package/es/MultiSelect/props/defaultProps.js +2 -1
  31. package/es/MultiSelect/props/propTypes.js +2 -1
  32. package/es/Select/Select.js +13 -5
  33. package/es/Switch/Switch.js +7 -5
  34. package/es/Tab/Tab.js +1 -1
  35. package/es/Tab/TabContent.js +1 -1
  36. package/es/Tab/Tabs.js +4 -4
  37. package/es/common/a11y.module.css +4 -0
  38. package/es/semantic/Button/Button.js +1 -0
  39. package/lib/Accordion/Accordion.js +3 -1
  40. package/lib/Accordion/AccordionItem.js +3 -1
  41. package/lib/Animation/Animation.js +3 -1
  42. package/lib/AppContainer/AppContainer.js +4 -1
  43. package/lib/Avatar/Avatar.js +3 -1
  44. package/lib/AvatarTeam/AvatarTeam.js +3 -1
  45. package/lib/Button/Button.js +8 -4
  46. package/lib/Buttongroup/Buttongroup.js +5 -2
  47. package/lib/Card/Card.js +3 -1
  48. package/lib/CheckBox/CheckBox.js +3 -1
  49. package/lib/DateTime/CalendarView.js +30 -16
  50. package/lib/DateTime/DateTime.js +10 -6
  51. package/lib/DateTime/DateTime.module.css +10 -8
  52. package/lib/DateTime/DateTimePopupFooter.js +3 -1
  53. package/lib/DateTime/DateTimePopupHeader.js +3 -1
  54. package/lib/DateTime/DateWidget.js +108 -89
  55. package/lib/DateTime/DaysRow.js +3 -1
  56. package/lib/DateTime/Time.js +3 -1
  57. package/lib/DateTime/YearView.js +3 -1
  58. package/lib/DateTime/dateFormatUtils/timeChange.js +1 -1
  59. package/lib/DateTime/props/defaultProps.js +2 -1
  60. package/lib/DropBox/DropBox.js +27 -5
  61. package/lib/DropBox/props/defaultProps.js +2 -1
  62. package/lib/DropBox/props/propTypes.js +1 -0
  63. package/lib/DropDown/DropDown.js +5 -2
  64. package/lib/DropDown/DropDownHeading.js +3 -1
  65. package/lib/DropDown/DropDownItem.js +3 -1
  66. package/lib/DropDown/DropDownSearch.js +5 -2
  67. package/lib/DropDown/DropDownSeparator.js +3 -1
  68. package/lib/DropDown/props/propTypes.js +4 -1
  69. package/lib/Heading/Heading.js +4 -2
  70. package/lib/Label/Label.js +3 -1
  71. package/lib/ListItem/ListContainer.js +1 -0
  72. package/lib/ListItem/ListItem.js +3 -1
  73. package/lib/ListItem/ListItemWithAvatar.js +3 -1
  74. package/lib/ListItem/ListItemWithCheckBox.js +3 -1
  75. package/lib/ListItem/ListItemWithIcon.js +3 -1
  76. package/lib/ListItem/ListItemWithRadio.js +3 -1
  77. package/lib/ListItem/props/propTypes.js +4 -1
  78. package/lib/Modal/Modal.js +3 -1
  79. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +5 -3
  80. package/lib/MultiSelect/AdvancedMultiSelect.js +3 -1
  81. package/lib/MultiSelect/EmptyState.js +3 -1
  82. package/lib/MultiSelect/MultiSelect.js +17 -9
  83. package/lib/MultiSelect/MultiSelect.module.css +4 -0
  84. package/lib/MultiSelect/MultiSelectHeader.js +3 -1
  85. package/lib/MultiSelect/MultiSelectWithAvatar.js +3 -1
  86. package/lib/MultiSelect/SelectedOptions.js +5 -2
  87. package/lib/MultiSelect/Suggestions.js +4 -2
  88. package/lib/MultiSelect/props/defaultProps.js +2 -1
  89. package/lib/MultiSelect/props/propTypes.js +2 -1
  90. package/lib/PopOver/PopOver.js +3 -1
  91. package/lib/Popup/Popup.js +3 -1
  92. package/lib/Popup/__tests__/Popup.spec.js +3 -1
  93. package/lib/Provider/LibraryContext.js +4 -2
  94. package/lib/Radio/Radio.js +3 -1
  95. package/lib/Responsive/CustomResponsive.js +5 -3
  96. package/lib/Responsive/RefWrapper.js +4 -2
  97. package/lib/Responsive/ResizeComponent.js +3 -1
  98. package/lib/Responsive/ResizeObserver.js +4 -1
  99. package/lib/Responsive/Responsive.js +5 -3
  100. package/lib/Responsive/sizeObservers.js +4 -2
  101. package/lib/ResponsiveDropBox/ResponsiveDropBox.js +3 -1
  102. package/lib/Ribbon/Ribbon.js +3 -1
  103. package/lib/Select/GroupSelect.js +4 -2
  104. package/lib/Select/Select.js +14 -6
  105. package/lib/Select/SelectWithAvatar.js +3 -1
  106. package/lib/Select/SelectWithIcon.js +3 -1
  107. package/lib/Select/__tests__/Select.spec.js +1 -1
  108. package/lib/Select/props/defaultProps.js +4 -1
  109. package/lib/Stencils/Stencils.js +3 -1
  110. package/lib/Switch/Switch.js +10 -6
  111. package/lib/Tab/Tab.js +1 -1
  112. package/lib/Tab/TabContent.js +1 -1
  113. package/lib/Tab/TabWrapper.js +1 -1
  114. package/lib/Tab/Tabs.js +8 -6
  115. package/lib/Tag/Tag.js +3 -1
  116. package/lib/TextBox/TextBox.js +3 -1
  117. package/lib/TextBox/props/propTypes.js +4 -1
  118. package/lib/TextBoxIcon/TextBoxIcon.js +5 -2
  119. package/lib/Textarea/Textarea.js +3 -1
  120. package/lib/Tooltip/Tooltip.js +3 -1
  121. package/lib/Tooltip/__tests__/Tooltip.spec.js +3 -1
  122. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -1
  123. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -2
  124. package/lib/common/a11y.module.css +4 -0
  125. package/lib/deprecated/PortalLayer/PortalLayer.js +3 -1
  126. package/lib/semantic/Button/Button.js +4 -1
  127. package/lib/utils/constructFullName.js +1 -1
  128. package/lib/utils/dropDownUtils.js +4 -2
  129. package/package.json +5 -3
package/README.md CHANGED
@@ -31,10 +31,27 @@ In this Package, we Provide Some Basic Components to Build Web App
31
31
  - TextBox
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
+ # 1.0.0-temp-111
35
+ Form Fields highlight Active State implementation
36
+ # 1.0.0-alpha-255
37
+
38
+ - **CalenderView, DateTime** - Today and selected date issue fix.
39
+
40
+ - `Accesssility`- Screen Reader fix.
41
+
42
+ # 1.0.0-alpha-254
43
+
44
+ - **AppContainer** - accessibility theme css has been added.
45
+
46
+ - **Button** - `customProps` support.
47
+
48
+ - **DropBox** - Focus scope navigation support.
34
49
 
35
50
  # 1.0.0-alpha-253
36
51
 
37
- - Tabs, Tooltip => if condition check added to reduce murphy error logs
52
+ - **Tabs, Tooltip** - If condition check added to reduce murphy error logs.
53
+
54
+ - `Accesssility`- Screen Reader support for some components.
38
55
 
39
56
  # 1.0.0-alpha-252
40
57
 
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_cadetblue);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: var(--dot_butterflyblue);
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_cadetblue);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #45a159;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_cadetblue);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #ff801f;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_cadetblue);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #e94f4f;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_cadetblue);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #d79835;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_white);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: var(--dot_primary);
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_white);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #26a942;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_white);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #e57717;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_white);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: var(--dot_brightRed);
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: var(--dot_white);
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #e8b923;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: #999;
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: var(--dot_butterflyblue);
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: #999;
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #45a159;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: #999;
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #ff801f;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: #999;
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #e94f4f;
42
45
  }
@@ -39,4 +39,7 @@
39
39
 
40
40
  /* dropdown */
41
41
  --zdt_dropdown_darkheading_text: #999;
42
+
43
+ /* focusscope */
44
+ --zdt_a11y_focusScope_focus_border: #d79835;
42
45
  }
@@ -12,6 +12,7 @@ import '@zohodesk/variables/assets/fontsizeVariables.module.css';
12
12
  import '@zohodesk/variables/lib/fontFamilyVariables.module.css';
13
13
  import '@zohodesk/variables/assets/transitionVariables.module.css';
14
14
  import '@zohodesk/variables/assets/no_transitionVariables.module.css';
15
+ import '../common/a11y.module.css';
15
16
  import style from './AppContainer.module.css';
16
17
  import { getLibraryConfig, setLibraryConfig } from '../Provider/Config';
17
18
  export default class AppContainer extends React.Component {
@@ -1,3 +1,4 @@
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); }
1
2
  import React from 'react';
2
3
  import { defaultProps } from './props/defaultProps';
3
4
  import { propTypes } from './props/propTypes';
@@ -24,7 +25,8 @@ export default class Button extends React.Component {
24
25
  needAppearance,
25
26
  getRef,
26
27
  title,
27
- customClass
28
+ customClass,
29
+ customProps
28
30
  } = this.props;
29
31
  let {
30
32
  customButton = '',
@@ -35,7 +37,7 @@ export default class Button extends React.Component {
35
37
  let statusLower = status.toLowerCase();
36
38
  let classList = needAppearance ? `${style[paletteLower]} ${rounded ? style.rounded : ''} ${!children ? style[size.toLowerCase()] : `${style[`${size}Btn`]}
37
39
  ${rounded ? style[`${size}Btn${paletteLower}`] : ''}`} ${statusLower !== 'none' ? style.loader : ''}` : `${style.default}`;
38
- return /*#__PURE__*/React.createElement("button", {
40
+ return /*#__PURE__*/React.createElement("button", _extends({
39
41
  className: `${customButton} ${classList} ${isBold ? style.bold : ''} `,
40
42
  "data-id": disabled ? `${dataId}_disabled` : dataId,
41
43
  disabled: disabled || statusLower === 'loading',
@@ -43,7 +45,7 @@ export default class Button extends React.Component {
43
45
  "data-title": title,
44
46
  type: "button",
45
47
  ref: getRef
46
- }, children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
48
+ }, customProps), children ? children : text, statusLower !== 'none' && needAppearance && /*#__PURE__*/React.createElement("div", {
47
49
  className: style.overlay
48
50
  }, /*#__PURE__*/React.createElement("div", {
49
51
  className: `${customStatusSize} ${statusLower === 'loading' ? `${style.loading} ${style[`${size}loading`] ? style[`${size}loading`] : ''}` : style.success}`
@@ -64,10 +64,11 @@ export default class CalendarView extends React.PureComponent {
64
64
  tdclass += ` ${style.sunday}`;
65
65
  }
66
66
  if (incremleti >= userSeeDay && incremday <= monthEnd) {
67
- if (incremday === parseInt(date) && parseInt(month) === userSeeMonth && parseInt(year) === userSeeYear) {
67
+ if (parseInt(date) === incremday && parseInt(month) === userSeeMonth && parseInt(year) === userSeeYear) {
68
68
  isSelectedDay = true;
69
69
  } else if (todayDate === incremday && todayMonth === userSeeMonth && todayYear === userSeeYear) {
70
70
  isToday = true;
71
+ isSelectedDay = false;
71
72
  } else {
72
73
  isSelectedDay = false;
73
74
  isToday = false;
@@ -93,18 +94,22 @@ export default class CalendarView extends React.PureComponent {
93
94
  }
94
95
  const prevMonthEnd = getMonthEnd(prevMonth, prevYear);
95
96
  const prevDate = prevMonthEnd - (userSeeDay - 1) + incremleti;
96
- isSelectedDay = prevDate === parseInt(date) && parseInt(month) === prevMonth && parseInt(year) === prevYear ? true : false;
97
- isToday = prevDate === incremday && todayMonth === userSeeMonth && todayYear === userSeeYear ? true : false;
97
+
98
+ // isSelectedDay =
99
+ prevDate === parseInt(date) && parseInt(month) === prevMonth && parseInt(year) === prevYear ? true : false;
100
+ // isToday = prevDate === incremday && todayMonth === userSeeMonth && todayYear === userSeeYear ? true : false;
101
+
98
102
  output = /*#__PURE__*/React.createElement(Span, {
99
- i: i,
100
- isActive: isSelectedDay,
103
+ i: i
104
+ //isActive={isSelectedDay}
105
+ ,
101
106
  tdclass: `${tdclass} ${style.invalidDate}`,
102
107
  handleSelect: this.handleSelect,
103
108
  incremday: prevDate,
104
109
  userSeeMonth: prevMonth,
105
110
  userSeeYear: prevYear,
106
- dataId: isSelectedDay ? `${dataId}_dateSelected` : `${dataId}_invalidDate`,
107
- isToday: isToday
111
+ dataId: isSelectedDay ? `${dataId}_dateSelected` : `${dataId}_invalidDate`
112
+ // isToday={isToday}
108
113
  });
109
114
  } else if (incremleti > monthEnd) {
110
115
  let nextMonth = userSeeMonth + 1;
@@ -114,18 +119,23 @@ export default class CalendarView extends React.PureComponent {
114
119
  nextYear = userSeeYear + 1;
115
120
  }
116
121
  const nextDate = incremleti - (userSeeDay - 1) - monthEnd;
117
- isSelectedDay = nextDate === parseInt(date) && parseInt(month) === nextMonth && parseInt(year) === nextYear ? true : false;
118
- isToday = nextDate === incremday && todayMonth === userSeeMonth && todayYear === userSeeYear ? true : false;
122
+
123
+ // isSelectedDay =
124
+ nextDate === parseInt(date) && parseInt(month) === nextMonth && parseInt(year) === nextYear ? true : false;
125
+
126
+ // isToday = nextDate === incremday && todayMonth === userSeeMonth && todayYear === userSeeYear ? true : false;
127
+
119
128
  output = /*#__PURE__*/React.createElement(Span, {
120
- i: i,
121
- isActive: isSelectedDay,
129
+ i: i
130
+ // isActive={isSelectedDay}
131
+ ,
122
132
  tdclass: `${tdclass} ${style.invalidDate}`,
123
133
  handleSelect: this.handleSelect,
124
134
  incremday: nextDate,
125
135
  userSeeMonth: nextMonth,
126
136
  userSeeYear: nextYear,
127
- dataId: isSelectedDay ? `${dataId}_dateSelected` : `${dataId}_invalidDate`,
128
- isToday: isToday
137
+ dataId: isSelectedDay ? `${dataId}_dateSelected` : `${dataId}_invalidDate`
138
+ //isToday={isToday}
129
139
  });
130
140
  } else {
131
141
  output = /*#__PURE__*/React.createElement(Box, {
@@ -149,7 +159,8 @@ export default class CalendarView extends React.PureComponent {
149
159
  })();
150
160
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DaysRow, {
151
161
  dayNames: dayNames,
152
- dayNamesShort: dayNamesShort
162
+ dayNamesShort: dayNamesShort,
163
+ ariaLabel: dayNamesShort
153
164
  }), /*#__PURE__*/React.createElement("div", {
154
165
  "data-id": `${dataId}_dateContainer`,
155
166
  className: `${style.dateContainer} ${needBorder ? style.separator : ''}`
@@ -1,3 +1,4 @@
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); }
1
2
  /* eslint css-modules/no-unused-class: [0, { markAsUsed: ['datesStr', 'dateContainer', 'dateRow', 'today', 'emptySpan', 'dropDown'] }] */
2
3
  /* eslint-disable react/forbid-component-props */
3
4
 
@@ -134,7 +135,7 @@ export default class DateTime extends React.PureComponent {
134
135
  defaultHour = parseInt(defaultHour);
135
136
  defaultMin = parseInt(defaultMin);
136
137
  }
137
- const dateObj = isDateTimeField ? datetime.toDate(datetime.tz.utcToTz(value, timeZone)) : value ? datetime.toDate(value) : new Date();
138
+ const dateObj = isDateTimeField ? datetime.toDate(datetime.tz.utcToTz(value, timeZone)) : value ? datetime.toDate(value) : todayObj;
138
139
  date = dateObj.getDate();
139
140
  month = dateObj.getMonth();
140
141
  year = dateObj.getFullYear();
@@ -609,7 +610,8 @@ export default class DateTime extends React.PureComponent {
609
610
  positionsOffset,
610
611
  targetOffset,
611
612
  isRestrictScroll,
612
- dropBoxPortalId
613
+ dropBoxPortalId,
614
+ dropBoxProps
613
615
  } = this.props;
614
616
  const {
615
617
  timeText = 'Time',
@@ -693,7 +695,7 @@ export default class DateTime extends React.PureComponent {
693
695
  let {
694
696
  tabletMode
695
697
  } = _ref2;
696
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
698
+ return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
697
699
  size: boxSize,
698
700
  boxPosition: position,
699
701
  isActive: isActive,
@@ -713,7 +715,7 @@ export default class DateTime extends React.PureComponent {
713
715
  targetOffset: targetOffset,
714
716
  isRestrictScroll: isRestrictScroll,
715
717
  portalId: dropBoxPortalId
716
- }, /*#__PURE__*/React.createElement(Box, null, childEle));
718
+ }, dropBoxProps), /*#__PURE__*/React.createElement(Box, null, childEle));
717
719
  }) : null;
718
720
  }
719
721
  }
@@ -124,6 +124,16 @@
124
124
  color: var(--zdt_datetime_invaliddate_text);
125
125
  }
126
126
 
127
+ .today {
128
+ border: 1px solid var(--zdt_datetime_today_border);
129
+ border-radius: 50%;
130
+ }
131
+
132
+ .today:hover {
133
+ border: 1px solid var(--zdt_datetime_today_border);
134
+ background-color: var(--zdt_datetime_datestr_hover_bg);
135
+ }
136
+
127
137
  .active,
128
138
  .active:hover,
129
139
  .active.today,
@@ -136,15 +146,7 @@
136
146
  border-radius: 50%;
137
147
  }
138
148
 
139
- .today {
140
- border: 1px solid var(--zdt_datetime_today_border);
141
- border-radius: 50%;
142
- }
143
149
 
144
- .today:hover {
145
- border: 1px solid var(--zdt_datetime_today_border);
146
- background-color: var(--zdt_datetime_datestr_hover_bg);
147
- }
148
150
 
149
151
  .timesection {
150
152
  padding-top: var(--zd_size5);
@@ -53,6 +53,7 @@ class DateWidgetComponent extends React.Component {
53
53
  this.handleDateIconClick = this.handleDateIconClick.bind(this);
54
54
  this.handleSelectionRangeDetails = this.handleSelectionRangeDetails.bind(this);
55
55
  this.handleBlurSelectionRange = this.handleBlurSelectionRange.bind(this);
56
+ this.handleExposePopupHandlers = this.handleExposePopupHandlers.bind(this);
56
57
  this.state = {
57
58
  selected: '',
58
59
  displayText: '',
@@ -94,6 +95,7 @@ class DateWidgetComponent extends React.Component {
94
95
  selected: newSelected
95
96
  });
96
97
  this.handleSelectionRangeDetails(this.props);
98
+ this.handleExposePopupHandlers();
97
99
  }
98
100
  componentDidUpdate(prevProps, prevState) {
99
101
  const {
@@ -211,6 +213,18 @@ class DateWidgetComponent extends React.Component {
211
213
  onPassValidation && onPassValidation(value, targetTag);
212
214
  }
213
215
  }
216
+ handleExposePopupHandlers() {
217
+ let {
218
+ removeClose,
219
+ togglePopup,
220
+ getPopupHandlers
221
+ } = this.props;
222
+ let methods = {
223
+ removeClose,
224
+ togglePopup: this.handleTogglePopup
225
+ };
226
+ getPopupHandlers && getPopupHandlers(methods);
227
+ }
214
228
  handleTogglePopup(e, isOpenOnly) {
215
229
  const {
216
230
  togglePopup,
@@ -920,6 +934,7 @@ class DateWidgetComponent extends React.Component {
920
934
  targetOffset,
921
935
  isRestrictScroll,
922
936
  dropBoxPortalId,
937
+ highlightPosition,
923
938
  a11y
924
939
  } = this.props;
925
940
  const {
@@ -933,7 +948,7 @@ class DateWidgetComponent extends React.Component {
933
948
  const showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;
934
949
  const showError = needErrorOnBlur ? isError && !isFocused && !isPopupOpen : isError;
935
950
  return /*#__PURE__*/React.createElement("div", {
936
- className: `${style.container}`
951
+ className: `${!highlightPosition ? style.container : ''}`
937
952
  }, children ? /*#__PURE__*/React.createElement("div", {
938
953
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : `${dataId}_widget`}`,
939
954
  onClick: isDisabled || isReadOnly ? null : this.handleTogglePopup,
@@ -1006,7 +1021,8 @@ class DateWidgetComponent extends React.Component {
1006
1021
  positionsOffset: positionsOffset,
1007
1022
  targetOffset: targetOffset,
1008
1023
  isRestrictScroll: isRestrictScroll,
1009
- dropBoxPortalId: dropBoxPortalId
1024
+ dropBoxPortalId: dropBoxPortalId,
1025
+ isPadding: highlightPosition ? true : false
1010
1026
  }));
1011
1027
  }
1012
1028
  }
@@ -42,7 +42,8 @@ export const DateWidget_defaultProps = {
42
42
  needErrorOnBlur: false,
43
43
  isEditable: false,
44
44
  iconOnHover: false,
45
- is24Hour: false
45
+ is24Hour: false,
46
+ highlightPosition: false
46
47
  };
47
48
  export const YearView_defaultProps = {
48
49
  dataId: 'dateContainer',
@@ -9,6 +9,7 @@ import { positionMapping } from './DropBoxPositionMapping.json';
9
9
  import { getZIndex } from '../Provider/ZindexProvider';
10
10
  import { getLibraryConfig } from '../Provider/Config';
11
11
  import LibraryContext from '../Provider/LibraryContextInit';
12
+ import FocusScope from '@zohodesk/a11y/es/FocusScope/FocusScope';
12
13
  export class DropBoxElement extends React.Component {
13
14
  constructor(props) {
14
15
  super(props);
@@ -59,7 +60,8 @@ export class DropBoxElement extends React.Component {
59
60
  positionsOffset,
60
61
  targetOffset,
61
62
  zIndexStyle,
62
- customStyle
63
+ customStyle,
64
+ subContainerRef
63
65
  } = this.props;
64
66
  let {
65
67
  isReducedMotion
@@ -146,9 +148,11 @@ export class DropBoxElement extends React.Component {
146
148
  "aria-labelledby": ariaLabelledby,
147
149
  tabIndex: tabIndex
148
150
  }, /*#__PURE__*/React.createElement("div", {
151
+ tabIndex: "-1",
149
152
  className: `${subContainerClass} ${style[`${palette}Palette`]}`,
150
153
  onClick: onClick,
151
- "data-id": `${dataId}_subcontainer`
154
+ "data-id": `${dataId}_subcontainer`,
155
+ ref: subContainerRef
152
156
  }, isModel ? /*#__PURE__*/React.createElement("div", {
153
157
  className: style.closeBar
154
158
  }) : null, isArrow && !isModel && /*#__PURE__*/React.createElement("div", {
@@ -165,6 +169,7 @@ export default class DropBox extends React.Component {
165
169
  super(props);
166
170
  this.getNextIndex = getZIndex(this);
167
171
  this.onFreezeClick = this.onFreezeClick.bind(this);
172
+ this.createRef = /*#__PURE__*/React.createRef();
168
173
  }
169
174
  onFreezeClick(e) {
170
175
  e && e.stopPropagation();
@@ -176,7 +181,9 @@ export default class DropBox extends React.Component {
176
181
  isActive,
177
182
  isAbsolutePositioningNeeded,
178
183
  needAutoZindex,
179
- isRestrictScroll
184
+ isRestrictScroll,
185
+ needFocusScope,
186
+ onClose
180
187
  } = this.props;
181
188
  let windowWidth,
182
189
  mobileWidth = getLibraryConfig('mobileWidth'),
@@ -193,7 +200,20 @@ export default class DropBox extends React.Component {
193
200
  const {
194
201
  direction
195
202
  } = this.context || {};
196
- const dropBoxEle = /*#__PURE__*/React.createElement(DropBoxElement, _extends({
203
+ const dropBoxEle = needFocusScope ? /*#__PURE__*/React.createElement(FocusScope, {
204
+ focusClose: onClose,
205
+ elementRef: this.createRef,
206
+ autoFocus: true,
207
+ restoreFocus: true,
208
+ focusArrowLoop: true,
209
+ enableEnterAction: true
210
+ }, /*#__PURE__*/React.createElement(DropBoxElement, _extends({
211
+ isModel: isModel,
212
+ direction: direction
213
+ }, this.props, {
214
+ zIndexStyle: zIndexStyle,
215
+ subContainerRef: this.createRef
216
+ }))) : /*#__PURE__*/React.createElement(DropBoxElement, _extends({
197
217
  isModel: isModel,
198
218
  direction: direction
199
219
  }, this.props, {
@@ -16,5 +16,6 @@ export const defaultProps = {
16
16
  palette: 'default',
17
17
  needAutoZindex: true,
18
18
  portalId: 'portal1',
19
- isRestrictScroll: false
19
+ isRestrictScroll: false,
20
+ needFocusScope: false
20
21
  };
@@ -22,6 +22,7 @@ export const propTypes = {
22
22
  left: PropTypes.number,
23
23
  needResponsive: PropTypes.bool,
24
24
  onClick: PropTypes.func,
25
+ needFocusScope: PropTypes.bool,
25
26
  right: PropTypes.number,
26
27
  size: PropTypes.oneOf(['mini', 'xmini', 'xsmall', 'small', 'medium', 'large', 'mlarge', 'xlarge', 'xxlarge', 'default']),
27
28
  top: PropTypes.number,
@@ -66,6 +66,7 @@ const ListContainer = props => {
66
66
  }
67
67
  return /*#__PURE__*/React.createElement(Container, _extends({
68
68
  role: role,
69
+ "data-a11y-inside-focus": true,
69
70
  "aria-selected": ariaSelected,
70
71
  "aria-label": ariaLabel,
71
72
  isCover: false,
@@ -746,6 +746,10 @@ export class MultiSelectComponent extends React.Component {
746
746
  isActive: false
747
747
  });
748
748
  }
749
+ let {
750
+ onBlur
751
+ } = this.props;
752
+ onBlur && onBlur();
749
753
  }
750
754
  handleInputFocus() {
751
755
  const {
@@ -759,11 +763,14 @@ export class MultiSelectComponent extends React.Component {
759
763
  handleExposedPublicMethods() {
760
764
  const {
761
765
  getPublicMethods,
762
- openPopupOnly
766
+ openPopupOnly,
767
+ togglePopup
763
768
  } = this.props;
764
- getPublicMethods && getPublicMethods({
765
- openPopupOnly
766
- });
769
+ let methods = {
770
+ openPopupOnly,
771
+ togglePopup: this.togglePopup
772
+ };
773
+ getPublicMethods && getPublicMethods(methods);
767
774
  }
768
775
  responsiveFunc(_ref) {
769
776
  let {
@@ -818,7 +825,8 @@ export class MultiSelectComponent extends React.Component {
818
825
  disabledOptions,
819
826
  boxSize,
820
827
  autoComplete,
821
- isLoading
828
+ isLoading,
829
+ isPadding
822
830
  } = this.props;
823
831
  const {
824
832
  clearText = 'Clear all',
@@ -853,7 +861,7 @@ export class MultiSelectComponent extends React.Component {
853
861
  });
854
862
  const isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && isShowClear;
855
863
  return /*#__PURE__*/React.createElement("div", {
856
- className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
864
+ className: `${isPadding ? style.staticPosition : style.wrapper} ${isDisabled ? style.disabled : ''} ${isReadOnly ? style.readOnly : ''} ${disableAction ? CssProvider('isBlock') : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
857
865
  "data-id": `${isDisabled ? `${dataId}_disabled` : isReadOnly ? `${dataId}_readOnly` : dataId}`,
858
866
  "data-title": isDisabled ? title : null,
859
867
  onClick: this.handleInputFocus
@@ -943,7 +951,7 @@ export class MultiSelectComponent extends React.Component {
943
951
  isArrow: false,
944
952
  onClick: removeClose,
945
953
  needResponsive: needResponsive,
946
- isPadding: false,
954
+ isPadding: isPadding,
947
955
  isBoxPaddingNeed: isBoxPaddingNeed,
948
956
  palette: palette,
949
957
  htmlId: setAriaId,
@@ -1,6 +1,10 @@
1
1
  .wrapper {
2
2
  position: relative;
3
3
  }
4
+ .staticPosition
5
+ {
6
+ position: static;
7
+ }
4
8
  .disabled, .readOnly {
5
9
  cursor: not-allowed;
6
10
  }
@@ -103,7 +103,8 @@ export const MultiSelect_defaultProps = {
103
103
  isSearchClearOnSelect: true,
104
104
  needEffect: true,
105
105
  boxSize: 'default',
106
- isLoading: false
106
+ isLoading: false,
107
+ isPadding: false
107
108
  };
108
109
  export const MultiSelectHeader_defaultProps = {
109
110
  dataId: 'MultiSelectHeader'
@@ -236,7 +236,8 @@ export const MultiSelect_propTypes = {
236
236
  getFooter: PropTypes.func,
237
237
  needEffect: PropTypes.bool,
238
238
  boxSize: PropTypes.string,
239
- isLoading: PropTypes.bool
239
+ isLoading: PropTypes.bool,
240
+ isPadding: PropTypes.bool
240
241
  };
241
242
  export const MultiSelectHeader_propTypes = {
242
243
  dataId: PropTypes.string,