@zohodesk/components 1.2.48 → 1.2.50

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 (50) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +24 -1
  3. package/es/DateTime/CalendarView.js +8 -5
  4. package/es/DateTime/DateTime.js +18 -4
  5. package/es/DateTime/DateTime.module.css +5 -5
  6. package/es/DateTime/DateWidget.js +5 -1
  7. package/es/DateTime/DaysRow.js +3 -2
  8. package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  9. package/es/DateTime/props/defaultProps.js +9 -3
  10. package/es/DateTime/props/propTypes.js +11 -4
  11. package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  12. package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  13. package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  14. package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  15. package/es/Popup/Popup.js +107 -8
  16. package/es/Popup/intersectionObserver.js +39 -0
  17. package/es/Popup/props/propTypes.js +30 -0
  18. package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  19. package/es/TextBox/TextBox.js +1 -1
  20. package/es/v1/DateTime/CalendarView.js +9 -6
  21. package/es/v1/DateTime/DateTime.js +18 -4
  22. package/es/v1/DateTime/DateWidget.js +5 -1
  23. package/es/v1/DateTime/DaysRow.js +3 -2
  24. package/es/v1/DateTime/props/defaultProps.js +9 -3
  25. package/es/v1/DateTime/props/propTypes.js +11 -4
  26. package/lib/DateTime/CalendarView.js +8 -5
  27. package/lib/DateTime/DateTime.js +27 -4
  28. package/lib/DateTime/DateTime.module.css +5 -5
  29. package/lib/DateTime/DateWidget.js +5 -1
  30. package/lib/DateTime/DaysRow.js +3 -2
  31. package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
  32. package/lib/DateTime/props/defaultProps.js +9 -3
  33. package/lib/DateTime/props/propTypes.js +11 -4
  34. package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
  35. package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
  36. package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
  37. package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
  38. package/lib/Popup/Popup.js +118 -9
  39. package/lib/Popup/intersectionObserver.js +62 -0
  40. package/lib/Popup/props/propTypes.js +51 -0
  41. package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
  42. package/lib/TextBox/TextBox.js +1 -1
  43. package/lib/v1/DateTime/CalendarView.js +9 -6
  44. package/lib/v1/DateTime/DateTime.js +27 -4
  45. package/lib/v1/DateTime/DateWidget.js +5 -1
  46. package/lib/v1/DateTime/DaysRow.js +3 -2
  47. package/lib/v1/DateTime/props/defaultProps.js +9 -3
  48. package/lib/v1/DateTime/props/propTypes.js +11 -4
  49. package/package.json +4 -4
  50. package/result.json +1 -1
@@ -34,10 +34,12 @@ export default class CalendarView extends React.PureComponent {
34
34
  todayDate,
35
35
  todayYear,
36
36
  startDate,
37
- endDate
37
+ endDate,
38
+ weekStartDay,
39
+ holidays
38
40
  } = this.props;
39
41
  const userSeeDate = new Date(year, month, 1);
40
- const userSeeDay = userSeeDate.getDay() + 1;
42
+ const userSeeDay = (userSeeDate.getDay() - weekStartDay + dayNames.length) % dayNames.length + 1;
41
43
  const userSeeYear = userSeeDate.getFullYear();
42
44
  const userSeeMonth = userSeeDate.getMonth();
43
45
  const monthEnd = getMonthEnd(month, year);
@@ -65,10 +67,10 @@ export default class CalendarView extends React.PureComponent {
65
67
  let output = null;
66
68
 
67
69
  for (let i = 1; i <= 7; i++) {
68
- let tdclass = `${style.datesStr} ${style.grid}`;
70
+ let tdclass = `${style.datesStr} ${style.grid}`; // if (i === 1) {
69
71
 
70
- if (i === 1) {
71
- tdclass += ` ${style.sunday}`;
72
+ if (holidays.includes(i - 1)) {
73
+ tdclass += ` ${style.holiday}`;
72
74
  }
73
75
 
74
76
  if (incremleti >= userSeeDay && incremday <= monthEnd) {
@@ -177,7 +179,8 @@ export default class CalendarView extends React.PureComponent {
177
179
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DaysRow, {
178
180
  dayNames: dayNames,
179
181
  dayNamesShort: dayNamesShort,
180
- ariaLabel: dayNamesShort
182
+ ariaLabel: dayNamesShort,
183
+ holidays: holidays
181
184
  }), /*#__PURE__*/React.createElement("div", {
182
185
  "data-id": `${dataId}_dateContainer`,
183
186
  "data-test-id": `${dataId}_dateContainer`,
@@ -652,7 +652,9 @@ export default class DateTime extends React.PureComponent {
652
652
  dropBoxPortalId,
653
653
  startDate,
654
654
  endDate,
655
- customProps = {}
655
+ customProps = {},
656
+ holidays,
657
+ weekStartDay
656
658
  } = this.props;
657
659
  const {
658
660
  TimeProps = {}
@@ -671,6 +673,16 @@ export default class DateTime extends React.PureComponent {
671
673
  dayNamesShort = dayNamesShortDefault
672
674
  } = i18nKeys;
673
675
  const showmonthtxt = title(date, year, month, monthNames);
676
+ let customDayNames = dayNames,
677
+ customDayNamesShort = dayNamesShort,
678
+ customizedHolidays = holidays;
679
+
680
+ if (weekStartDay !== 0) {
681
+ customDayNames = [...dayNames.slice(weekStartDay), ...dayNames.slice(0, weekStartDay)];
682
+ customDayNamesShort = [...dayNamesShort.slice(weekStartDay), ...dayNamesShort.slice(0, weekStartDay)];
683
+ customizedHolidays = holidays.map(dayIndex => customDayNames.indexOf(dayNames[dayIndex]));
684
+ }
685
+
674
686
  const childEle = /*#__PURE__*/React.createElement("div", {
675
687
  className: `${style.container} ${innerClass}`,
676
688
  "data-id": `${dataId}_Calendar`,
@@ -692,13 +704,15 @@ export default class DateTime extends React.PureComponent {
692
704
  year: year,
693
705
  month: month,
694
706
  onSelect: this.dateSelect,
695
- dayNames: dayNames,
696
- dayNamesShort: dayNamesShort,
707
+ dayNames: customDayNames,
708
+ dayNamesShort: customDayNamesShort,
697
709
  todayDate: todayDate,
698
710
  todayMonth: todayMonth,
699
711
  todayYear: todayYear,
700
712
  startDate: startDate,
701
- endDate: endDate
713
+ endDate: endDate,
714
+ weekStartDay: weekStartDay,
715
+ holidays: customizedHolidays
702
716
  }), isDateTimeField ? /*#__PURE__*/React.createElement(Time, {
703
717
  timeText: timeText,
704
718
  dataId: dataId,
@@ -1006,6 +1006,8 @@ class DateWidgetComponent extends React.Component {
1006
1006
  onError,
1007
1007
  startDate,
1008
1008
  endDate,
1009
+ weekStartDay,
1010
+ holidays,
1009
1011
  customProps = {}
1010
1012
  } = this.props;
1011
1013
  const {
@@ -1105,7 +1107,9 @@ class DateWidgetComponent extends React.Component {
1105
1107
  onError: onError,
1106
1108
  startDate: startDate,
1107
1109
  endDate: endDate,
1108
- customProps: DateTimeProps
1110
+ customProps: DateTimeProps,
1111
+ weekStartDay: weekStartDay,
1112
+ holidays: holidays
1109
1113
  }));
1110
1114
  }
1111
1115
 
@@ -13,7 +13,8 @@ export default class DaysRow extends PureComponent {
13
13
  render() {
14
14
  const {
15
15
  dayNames,
16
- dayNamesShort
16
+ dayNamesShort,
17
+ holidays
17
18
  } = this.props;
18
19
  return /*#__PURE__*/React.createElement(Container, {
19
20
  alignBox: "row",
@@ -21,7 +22,7 @@ export default class DaysRow extends PureComponent {
21
22
  className: style.days
22
23
  }, dayNames.map((dayName, index) => /*#__PURE__*/React.createElement(Box, {
23
24
  key: dayName,
24
- className: `${style.daysStr} ${style.grid} ${index === 0 ? style.sunday : ''}`,
25
+ className: `${style.daysStr} ${style.grid} ${holidays.includes(index) ? style.holiday : ''}`,
25
26
  "data-title": dayName,
26
27
  "aria-label": dayName
27
28
  }, dayNamesShort[index])));
@@ -1,6 +1,8 @@
1
1
  export const CalendarView_defaultProps = {
2
2
  dataId: 'dateContainer',
3
- needBorder: true
3
+ needBorder: true,
4
+ weekStartDay: 0,
5
+ holidays: [0]
4
6
  };
5
7
  export const Span_defaultProps = {
6
8
  dataId: 'calendar-view'
@@ -20,7 +22,9 @@ export const DateTime_defaultProps = {
20
22
  i18nKeys: {},
21
23
  is24Hour: false,
22
24
  isDefaultPosition: false,
23
- customDateFormat: null
25
+ customDateFormat: null,
26
+ weekStartDay: 0,
27
+ holidays: [0]
24
28
  };
25
29
  export const DateWidget_defaultProps = {
26
30
  borderColor: 'default',
@@ -43,7 +47,9 @@ export const DateWidget_defaultProps = {
43
47
  needErrorOnBlur: false,
44
48
  isEditable: false,
45
49
  iconOnHover: false,
46
- is24Hour: false
50
+ is24Hour: false,
51
+ weekStartDay: 0,
52
+ holidays: [0]
47
53
  };
48
54
  export const YearView_defaultProps = {
49
55
  dataId: 'dateContainer',
@@ -13,7 +13,9 @@ export const CalendarView_propTypes = {
13
13
  todayDate: PropTypes.string,
14
14
  todayYear: PropTypes.string,
15
15
  startDate: PropTypes.string,
16
- endDate: PropTypes.string
16
+ endDate: PropTypes.string,
17
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
18
+ holidays: PropTypes.arrayOf(PropTypes.number)
17
19
  };
18
20
  export const Span_propTypes = {
19
21
  dataId: PropTypes.string,
@@ -79,7 +81,9 @@ export const DateTime_propTypes = {
79
81
  dropBoxPortalId: PropTypes.string,
80
82
  startDate: PropTypes.string,
81
83
  endDate: PropTypes.string,
82
- customProps: PropTypes.object
84
+ customProps: PropTypes.object,
85
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
86
+ holidays: PropTypes.arrayOf(PropTypes.number)
83
87
  };
84
88
  export const DateWidget_propTypes = {
85
89
  borderColor: PropTypes.oneOf(['transparent', 'default']),
@@ -150,7 +154,9 @@ export const DateWidget_propTypes = {
150
154
  startDate: PropTypes.string,
151
155
  endDate: PropTypes.string,
152
156
  getPopupProps: PropTypes.func,
153
- customProps: PropTypes.object
157
+ customProps: PropTypes.object,
158
+ weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
159
+ holidays: PropTypes.arrayOf(PropTypes.number)
154
160
  };
155
161
  export const YearView_propTypes = {
156
162
  onSelectMonth: PropTypes.func,
@@ -177,7 +183,8 @@ export const DateTimePopupHeader_propTypes = {
177
183
  };
178
184
  export const DaysRow_propTypes = {
179
185
  dayNames: PropTypes.array,
180
- dayNamesShort: PropTypes.object
186
+ dayNamesShort: PropTypes.object,
187
+ holidays: PropTypes.arrayOf(PropTypes.number)
181
188
  };
182
189
  export const Time_propTypes = {
183
190
  timeText: PropTypes.string,
@@ -80,9 +80,11 @@ var CalendarView = /*#__PURE__*/function (_React$PureComponent) {
80
80
  dayNamesShort = _this$props.dayNamesShort,
81
81
  todayMonth = _this$props.todayMonth,
82
82
  todayDate = _this$props.todayDate,
83
- todayYear = _this$props.todayYear;
83
+ todayYear = _this$props.todayYear,
84
+ weekStartDay = _this$props.weekStartDay,
85
+ holidays = _this$props.holidays;
84
86
  var userSeeDate = new Date(year, month, 1);
85
- var userSeeDay = userSeeDate.getDay() + 1;
87
+ var userSeeDay = (userSeeDate.getDay() - weekStartDay + dayNames.length) % dayNames.length + 1;
86
88
  var userSeeYear = userSeeDate.getFullYear();
87
89
  var userSeeMonth = userSeeDate.getMonth();
88
90
  var monthEnd = (0, _common.getMonthEnd)(month, year);
@@ -113,8 +115,8 @@ var CalendarView = /*#__PURE__*/function (_React$PureComponent) {
113
115
  isSelectedDay = false;
114
116
  var tdclass = "".concat(_DateTimeModule["default"].datesStr, " ").concat(_DateTimeModule["default"].grid);
115
117
 
116
- if (i === 1) {
117
- tdclass += " ".concat(_DateTimeModule["default"].sunday);
118
+ if (holidays.includes(i - 1)) {
119
+ tdclass += " ".concat(_DateTimeModule["default"].holiday);
118
120
  }
119
121
 
120
122
  if (incremleti >= userSeeDay && incremday <= monthEnd) {
@@ -218,7 +220,8 @@ var CalendarView = /*#__PURE__*/function (_React$PureComponent) {
218
220
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_DaysRow["default"], {
219
221
  dayNames: dayNames,
220
222
  dayNamesShort: dayNamesShort,
221
- ariaLabel: dayNamesShort
223
+ ariaLabel: dayNamesShort,
224
+ holidays: holidays
222
225
  }), /*#__PURE__*/_react["default"].createElement("div", {
223
226
  "data-id": "".concat(dataId, "_dateContainer"),
224
227
  "data-test-id": "".concat(dataId, "_dateContainer"),
@@ -43,6 +43,14 @@ var _dateFormat = require("./dateFormatUtils/dateFormat");
43
43
 
44
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
45
 
46
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
47
+
48
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
49
+
50
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
51
+
52
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
53
+
46
54
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
47
55
 
48
56
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -726,7 +734,9 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
726
734
  isRestrictScroll = _this$props7.isRestrictScroll,
727
735
  dropBoxPortalId = _this$props7.dropBoxPortalId,
728
736
  _this$props7$customPr = _this$props7.customProps,
729
- customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr;
737
+ customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr,
738
+ weekStartDay = _this$props7.weekStartDay,
739
+ holidays = _this$props7.holidays;
730
740
  var _customProps$TimeProp = customProps.TimeProps,
731
741
  TimeProps = _customProps$TimeProp === void 0 ? {} : _customProps$TimeProp;
732
742
  var _i18nKeys$timeText = i18nKeys.timeText,
@@ -752,6 +762,17 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
752
762
  _i18nKeys$dayNamesSho = i18nKeys.dayNamesShort,
753
763
  dayNamesShort = _i18nKeys$dayNamesSho === void 0 ? _constants.dayNamesShortDefault : _i18nKeys$dayNamesSho;
754
764
  var showmonthtxt = title(date, year, month, monthNames);
765
+ var customDayNames = dayNames,
766
+ customDayNamesShort = dayNamesShort,
767
+ customizedHolidays = holidays;
768
+
769
+ if (weekStartDay !== 0) {
770
+ customDayNames = [].concat(_toConsumableArray(dayNames.slice(weekStartDay)), _toConsumableArray(dayNames.slice(0, weekStartDay)));
771
+ customDayNamesShort = [].concat(_toConsumableArray(dayNamesShort.slice(weekStartDay)), _toConsumableArray(dayNamesShort.slice(0, weekStartDay)));
772
+ customizedHolidays = holidays.map(function (dayIndex) {
773
+ return customDayNames.indexOf(dayNames[dayIndex]);
774
+ });
775
+ }
755
776
 
756
777
  var childEle = /*#__PURE__*/_react["default"].createElement("div", {
757
778
  className: "".concat(_DateTimeModule["default"].container, " ").concat(innerClass),
@@ -774,11 +795,13 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
774
795
  year: year,
775
796
  month: month,
776
797
  onSelect: this.dateSelect,
777
- dayNames: dayNames,
778
- dayNamesShort: dayNamesShort,
798
+ dayNames: customDayNames,
799
+ dayNamesShort: customDayNamesShort,
779
800
  todayDate: todayDate,
780
801
  todayMonth: todayMonth,
781
- todayYear: todayYear
802
+ todayYear: todayYear,
803
+ weekStartDay: weekStartDay,
804
+ holidays: customizedHolidays
782
805
  }), isDateTimeField ? /*#__PURE__*/_react["default"].createElement(_Time["default"], {
783
806
  timeText: timeText,
784
807
  dataId: dataId,
@@ -112,9 +112,9 @@
112
112
  margin-bottom: 0 ;
113
113
  }
114
114
 
115
- .sunday,
116
- .sunday:hover,
117
- .invalidDate.sunday:hover {
115
+ .holiday,
116
+ .holiday:hover,
117
+ .invalidDate.holiday:hover {
118
118
  color: var(--zdt_datetime_invalid_hover_text);
119
119
  }
120
120
 
@@ -122,7 +122,7 @@
122
122
  color: var(--zdt_datetime_invalid_text);
123
123
  }
124
124
 
125
- .invalidDate.sunday,.inActiveDate.sunday:hover {
125
+ .invalidDate.holiday,.inActiveDate.holiday:hover {
126
126
  color: var(--zdt_datetime_invaliddate_text);
127
127
  }
128
128
 
@@ -155,7 +155,7 @@ cursor: no-drop;
155
155
  {
156
156
  color: var(--zdt_datetime_invalid_text);
157
157
  }
158
- .inActiveDate:hover, .inActiveDate.sunday:hover{
158
+ .inActiveDate:hover, .inActiveDate.holiday:hover{
159
159
  background-color: var(--zdt_datetime_inactivedate_hover_bg);
160
160
 
161
161
  }
@@ -1032,6 +1032,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
1032
1032
  a11y = _this$props12.a11y,
1033
1033
  boxSize = _this$props12.boxSize,
1034
1034
  onError = _this$props12.onError,
1035
+ weekStartDay = _this$props12.weekStartDay,
1036
+ holidays = _this$props12.holidays,
1035
1037
  _this$props12$customP = _this$props12.customProps,
1036
1038
  customProps = _this$props12$customP === void 0 ? {} : _this$props12$customP;
1037
1039
  var _customProps$DateTime = customProps.DateTimeProps,
@@ -1134,7 +1136,9 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
1134
1136
  dropBoxPortalId: dropBoxPortalId,
1135
1137
  boxSize: boxSize,
1136
1138
  onError: onError,
1137
- customProps: DateTimeProps
1139
+ customProps: DateTimeProps,
1140
+ weekStartDay: weekStartDay,
1141
+ holidays: holidays
1138
1142
  }));
1139
1143
  }
1140
1144
  }]);
@@ -57,7 +57,8 @@ var DaysRow = /*#__PURE__*/function (_PureComponent) {
57
57
  value: function render() {
58
58
  var _this$props = this.props,
59
59
  dayNames = _this$props.dayNames,
60
- dayNamesShort = _this$props.dayNamesShort;
60
+ dayNamesShort = _this$props.dayNamesShort,
61
+ holidays = _this$props.holidays;
61
62
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
62
63
  alignBox: "row",
63
64
  align: "center",
@@ -65,7 +66,7 @@ var DaysRow = /*#__PURE__*/function (_PureComponent) {
65
66
  }, dayNames.map(function (dayName, index) {
66
67
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
67
68
  key: dayName,
68
- className: "".concat(_DateTimeModule["default"].daysStr, " ").concat(_DateTimeModule["default"].grid, " ").concat(index === 0 ? _DateTimeModule["default"].sunday : ''),
69
+ className: "".concat(_DateTimeModule["default"].daysStr, " ").concat(_DateTimeModule["default"].grid, " ").concat(holidays.includes(index) ? _DateTimeModule["default"].holiday : ''),
69
70
  "data-title": dayName,
70
71
  "aria-label": dayName
71
72
  }, dayNamesShort[index]);
@@ -96,7 +96,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
96
96
  >
97
97
  <div
98
98
  aria-label="Sunday"
99
- class="daysStr grid sunday shrinkOff"
99
+ class="daysStr grid holiday shrinkOff"
100
100
  data-id="boxComponent"
101
101
  data-selector-id="box"
102
102
  data-test-id="boxComponent"
@@ -178,7 +178,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
178
178
  >
179
179
  <div
180
180
  aria-label="25"
181
- class="datesStr grid sunday invalidDate shrinkOff"
181
+ class="datesStr grid holiday invalidDate shrinkOff"
182
182
  data-id="dateTime_invalidDate"
183
183
  data-selector-id="box"
184
184
  data-test-id="dateTime_invalidDate"
@@ -248,7 +248,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
248
248
  >
249
249
  <div
250
250
  aria-label="2"
251
- class="datesStr grid sunday shrinkOff"
251
+ class="datesStr grid holiday shrinkOff"
252
252
  data-id="dateTime_date"
253
253
  data-selector-id="box"
254
254
  data-test-id="dateTime_date"
@@ -318,7 +318,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
318
318
  >
319
319
  <div
320
320
  aria-label="9"
321
- class="datesStr grid sunday shrinkOff"
321
+ class="datesStr grid holiday shrinkOff"
322
322
  data-id="dateTime_date"
323
323
  data-selector-id="box"
324
324
  data-test-id="dateTime_date"
@@ -388,7 +388,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
388
388
  >
389
389
  <div
390
390
  aria-label="16"
391
- class="datesStr grid sunday shrinkOff"
391
+ class="datesStr grid holiday shrinkOff"
392
392
  data-id="dateTime_date"
393
393
  data-selector-id="box"
394
394
  data-test-id="dateTime_date"
@@ -458,7 +458,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
458
458
  >
459
459
  <div
460
460
  aria-label="23"
461
- class="datesStr grid sunday shrinkOff"
461
+ class="datesStr grid holiday shrinkOff"
462
462
  data-id="dateTime_date"
463
463
  data-selector-id="box"
464
464
  data-test-id="dateTime_date"
@@ -528,7 +528,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
528
528
  >
529
529
  <div
530
530
  aria-label="30"
531
- class="datesStr grid sunday shrinkOff"
531
+ class="datesStr grid holiday shrinkOff"
532
532
  data-id="dateTime_date"
533
533
  data-selector-id="box"
534
534
  data-test-id="dateTime_date"
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.YearView_defaultProps = exports.Time_defaultProps = exports.Span_defaultProps = exports.DateWidget_defaultProps = exports.DateTime_defaultProps = exports.DateTimePopupFooter_defaultProps = exports.CalendarView_defaultProps = void 0;
7
7
  var CalendarView_defaultProps = {
8
8
  dataId: 'dateContainer',
9
- needBorder: true
9
+ needBorder: true,
10
+ weekStartDay: 0,
11
+ holidays: [0]
10
12
  };
11
13
  exports.CalendarView_defaultProps = CalendarView_defaultProps;
12
14
  var Span_defaultProps = {
@@ -29,7 +31,9 @@ var DateTime_defaultProps = {
29
31
  is24Hour: false,
30
32
  isDefaultPosition: false,
31
33
  customDateFormat: null,
32
- customProps: {}
34
+ customProps: {},
35
+ weekStartDay: 0,
36
+ holidays: [0]
33
37
  };
34
38
  exports.DateTime_defaultProps = DateTime_defaultProps;
35
39
  var DateWidget_defaultProps = {
@@ -53,7 +57,9 @@ var DateWidget_defaultProps = {
53
57
  needErrorOnBlur: false,
54
58
  isEditable: false,
55
59
  iconOnHover: false,
56
- is24Hour: false
60
+ is24Hour: false,
61
+ weekStartDay: 0,
62
+ holidays: [0]
57
63
  };
58
64
  exports.DateWidget_defaultProps = DateWidget_defaultProps;
59
65
  var YearView_defaultProps = {
@@ -34,7 +34,9 @@ var CalendarView_propTypes = {
34
34
  dayNamesShort: _propTypes["default"].array,
35
35
  todayMonth: _propTypes["default"].string,
36
36
  todayDate: _propTypes["default"].string,
37
- todayYear: _propTypes["default"].string
37
+ todayYear: _propTypes["default"].string,
38
+ weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
39
+ holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
38
40
  };
39
41
  exports.CalendarView_propTypes = CalendarView_propTypes;
40
42
  var Span_propTypes = {
@@ -98,7 +100,9 @@ var DateTime_propTypes = {
98
100
  targetOffset: _propTypes["default"].string,
99
101
  isRestrictScroll: _propTypes["default"].bool,
100
102
  dropBoxPortalId: _propTypes["default"].string,
101
- customProps: _propTypes["default"].object
103
+ customProps: _propTypes["default"].object,
104
+ weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
105
+ holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
102
106
  };
103
107
  exports.DateTime_propTypes = DateTime_propTypes;
104
108
  var DateWidget_propTypes = {
@@ -168,7 +172,9 @@ var DateWidget_propTypes = {
168
172
  dropBoxPortalId: _propTypes["default"].string,
169
173
  a11y: _propTypes["default"].object,
170
174
  getPopupProps: _propTypes["default"].func,
171
- customProps: _propTypes["default"].object
175
+ customProps: _propTypes["default"].object,
176
+ weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
177
+ holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
172
178
  };
173
179
  exports.DateWidget_propTypes = DateWidget_propTypes;
174
180
  var YearView_propTypes = {
@@ -199,7 +205,8 @@ var DateTimePopupHeader_propTypes = {
199
205
  exports.DateTimePopupHeader_propTypes = DateTimePopupHeader_propTypes;
200
206
  var DaysRow_propTypes = {
201
207
  dayNames: _propTypes["default"].array,
202
- dayNamesShort: _propTypes["default"].object
208
+ dayNamesShort: _propTypes["default"].object,
209
+ holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
203
210
  };
204
211
  exports.DaysRow_propTypes = DaysRow_propTypes;
205
212
  var Time_propTypes = {
@@ -23,6 +23,7 @@ var _DropBoxElementModule = _interopRequireDefault(require("./css/DropBoxElement
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
25
 
26
+ /* eslint-disable react/no-unknown-property */
26
27
  function DropBoxElement(props) {
27
28
  var children = props.children,
28
29
  isAnimate = props.isAnimate,
@@ -120,7 +121,8 @@ function DropBoxElement(props) {
120
121
  "aria-labelledby": ariaLabelledby,
121
122
  tabIndex: tabIndex,
122
123
  onAnimationEnd: isAnimate && FireOnAnimationEnd,
123
- "data-a11y-focus-main-area": true
124
+ "data-a11y-focus-main-area": true,
125
+ "dot-ui-element": "dropbox"
124
126
  }, /*#__PURE__*/_react["default"].createElement("div", {
125
127
  tabIndex: "-1",
126
128
  className: "".concat(subContainerClass, " ").concat(_DropBoxElementModule["default"]["".concat(palette, "Palette")]),
@@ -9,6 +9,7 @@ exports[`DropBoxElement rendering the defult props 1`] = `
9
9
  data-position="bottomStart"
10
10
  data-selector-id="dropBox"
11
11
  data-test-id="dropBox"
12
+ dot-ui-element="dropbox"
12
13
  >
13
14
  <div
14
15
  class="subContainer bottom_shadow radius defaultPalette"
@@ -9,6 +9,7 @@ exports[`DropBox rendering the defult props 1`] = `
9
9
  data-position="bottomStart"
10
10
  data-selector-id="dropBox"
11
11
  data-test-id="dropBox"
12
+ dot-ui-element="dropbox"
12
13
  >
13
14
  <div
14
15
  class="subContainer bottom_shadow radius defaultPalette"
@@ -19,6 +19,7 @@ exports[`DropDown rendering the defult props 1`] = `
19
19
  data-position="bottomMid"
20
20
  data-selector-id="dropBox"
21
21
  data-test-id="dropBox"
22
+ dot-ui-element="dropbox"
22
23
  >
23
24
  <div
24
25
  class="subContainer bottom_shadow radius defaultPalette"