@nutui/nutui-react 2.0.0-beta.1 → 2.0.0-beta.3

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 (114) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/esm/ActionSheet.js +2 -2
  3. package/dist/esm/Avatar.js +2 -0
  4. package/dist/esm/Calendar/style/style.css +1 -1
  5. package/dist/esm/Calendar.js +8 -6
  6. package/dist/esm/CalendarItem.js +288 -291
  7. package/dist/esm/Cell/style/index.js +1 -1
  8. package/dist/esm/Cell/style/style.css +1 -1
  9. package/dist/esm/Cell.js +2 -0
  10. package/dist/esm/CellGroup.js +47 -4
  11. package/dist/esm/ConfigProvider.js +6 -483
  12. package/dist/esm/Dialog/style/style.css +1 -1
  13. package/dist/esm/Elevator.js +4 -4
  14. package/dist/esm/Form.js +1 -2
  15. package/dist/esm/Menu.js +6 -1
  16. package/dist/esm/MenuItem.js +8 -153
  17. package/dist/esm/NavBar.js +2 -2
  18. package/dist/esm/NoticeBar.js +2 -2
  19. package/dist/esm/NumberKeyboard.js +2 -2
  20. package/dist/esm/Popover.js +6 -7
  21. package/dist/esm/SearchBar.js +2 -2
  22. package/dist/esm/ShortPassword.js +4 -4
  23. package/dist/esm/Swiper.js +4 -1
  24. package/dist/esm/TrendArrow.js +11 -11
  25. package/dist/esm/Uploader.js +4 -4
  26. package/dist/esm/VirtualList.js +3 -8
  27. package/dist/esm/cascader2.js +2 -2
  28. package/dist/esm/configprovider2.js +486 -0
  29. package/dist/esm/date.js +103 -2
  30. package/dist/esm/menuitem2.js +156 -0
  31. package/dist/esm/nutui-react.es.js +30 -30
  32. package/dist/esm/popup2.js +5 -5
  33. package/dist/esm/types/src/packages/avatar/avatar.d.ts +4 -1
  34. package/dist/esm/types/src/packages/avatar/avatar.taro.d.ts +4 -1
  35. package/dist/esm/types/src/packages/calendar/calendar.d.ts +4 -6
  36. package/dist/esm/types/src/packages/calendar/calendar.taro.d.ts +4 -6
  37. package/dist/esm/types/src/packages/calendar/type.d.ts +13 -0
  38. package/dist/esm/types/src/packages/calendar/utils.d.ts +8 -0
  39. package/dist/esm/types/src/packages/calendaritem/calendaritem.d.ts +25 -27
  40. package/dist/esm/types/src/packages/calendaritem/calendaritem.taro.d.ts +26 -28
  41. package/dist/esm/types/src/packages/cell/cell.d.ts +4 -1
  42. package/dist/esm/types/src/packages/cell/cell.taro.d.ts +4 -1
  43. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  44. package/dist/esm/types/src/packages/elevator/elevator.d.ts +2 -2
  45. package/dist/esm/types/src/packages/elevator/elevator.taro.d.ts +2 -2
  46. package/dist/esm/types/src/packages/menu/menu.d.ts +4 -1
  47. package/dist/esm/types/src/packages/menu/menu.taro.d.ts +4 -1
  48. package/dist/esm/types/src/packages/navbar/demo.d.ts +1 -0
  49. package/dist/esm/types/src/packages/navbar/demo.taro.d.ts +1 -0
  50. package/dist/esm/types/src/packages/navbar/navbar.d.ts +1 -1
  51. package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +1 -1
  52. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +1 -1
  53. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +1 -1
  54. package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -3
  55. package/dist/esm/types/src/packages/nutui.react.d.ts +5 -5
  56. package/dist/esm/types/src/packages/nutui.react.scss.d.ts +2 -2
  57. package/dist/esm/types/src/packages/nutui.react.taro.d.ts +5 -5
  58. package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +2 -2
  59. package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +3 -3
  60. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -2
  61. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -2
  62. package/dist/esm/types/src/packages/popup/popup.d.ts +2 -2
  63. package/dist/esm/types/src/packages/popup/popup.taro.d.ts +2 -2
  64. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +1 -1
  65. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +1 -1
  66. package/dist/esm/types/src/packages/swiper/index.d.ts +8 -2
  67. package/dist/esm/types/src/packages/swiper/index.taro.d.ts +8 -2
  68. package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +3 -3
  69. package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +3 -3
  70. package/dist/esm/types/src/packages/uploader/uploader.d.ts +1 -1
  71. package/dist/esm/types/src/packages/uploader/uploader.taro.d.ts +1 -1
  72. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
  73. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +2 -2
  74. package/dist/esm/types/src/utils/date.d.ts +19 -3
  75. package/dist/locales/base.js +1 -1
  76. package/dist/locales/en-US.js +1 -1
  77. package/dist/locales/id-ID.js +1 -1
  78. package/dist/locales/tr-TR.js +1 -1
  79. package/dist/locales/zh-CN.js +1 -1
  80. package/dist/locales/zh-TW.js +1 -1
  81. package/dist/locales/zh-UG.js +1 -1
  82. package/dist/nutui.react.es.js +1104 -1011
  83. package/dist/nutui.react.umd.js +1104 -1011
  84. package/dist/packages/calendar/calendar.scss +4 -0
  85. package/dist/packages/cell/cell.scss +2 -0
  86. package/dist/packages/dialog/dialog.scss +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/style.mjs +1 -1
  89. package/dist/styles/themes/default.scss +2 -2
  90. package/dist/styles/variables-jmapp.scss +2 -2
  91. package/dist/styles/variables.scss +2 -2
  92. package/dist/types/index.d.ts +3 -3
  93. package/dist/types/packages/avatar/avatar.d.ts +4 -1
  94. package/dist/types/packages/calendar/calendar.d.ts +8 -6
  95. package/dist/types/packages/calendar/type.d.ts +13 -0
  96. package/dist/types/packages/calendar/utils.d.ts +8 -0
  97. package/dist/types/packages/calendaritem/calendaritem.d.ts +25 -27
  98. package/dist/types/packages/cell/cell.d.ts +4 -1
  99. package/dist/types/packages/configprovider/types.d.ts +1 -1
  100. package/dist/types/packages/elevator/elevator.d.ts +2 -2
  101. package/dist/types/packages/menu/menu.d.ts +4 -1
  102. package/dist/types/packages/navbar/navbar.d.ts +1 -1
  103. package/dist/types/packages/noticebar/noticebar.d.ts +1 -1
  104. package/dist/types/packages/popover/popover.d.ts +2 -2
  105. package/dist/types/packages/popup/popup.d.ts +2 -2
  106. package/dist/types/packages/searchbar/searchbar.d.ts +1 -1
  107. package/dist/types/packages/swiper/index.d.ts +8 -2
  108. package/dist/types/packages/trendarrow/trendarrow.d.ts +3 -3
  109. package/dist/types/packages/uploader/uploader.d.ts +1 -1
  110. package/dist/types/packages/virtuallist/utils.d.ts +1 -1
  111. package/dist/types/packages/virtuallist/virtuallist.d.ts +2 -2
  112. package/dist/types/utils/date.d.ts +19 -3
  113. package/package.json +1 -1
  114. package/dist/esm/cellgroup2.js +0 -50
@@ -1,5 +1,5 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  function ownKeys(object, enumerableOnly) {
5
5
  var keys = Object.keys(object);
@@ -24,11 +24,40 @@ function _objectSpread(target) {
24
24
  }
25
25
  import React__default, { useState, useRef, useEffect } from "react";
26
26
  import classNames from "classnames";
27
- import { U as Utils } from "./date.js";
27
+ import { C as ComponentDefaults } from "./typings.js";
28
+ import { U as Utils, g as getPreMonthDates, a as getDaysStatus, b as getCurrMonthData } from "./date.js";
28
29
  import { r as requestAniFrame } from "./raf.js";
29
- import { useConfig } from "./ConfigProvider.js";
30
+ import { u as useConfig } from "./configprovider2.js";
30
31
  import { u as usePropsValue } from "./use-props-value.js";
31
- var defaultProps = {
32
+ var splitDate = function splitDate2(date) {
33
+ var split = date.indexOf("-") !== -1 ? "-" : "/";
34
+ return date.split(split);
35
+ };
36
+ var isMultiple = function isMultiple2(day, days) {
37
+ if (days.length > 0) {
38
+ return days.some(function(item) {
39
+ return Utils.isEqual(item, day);
40
+ });
41
+ }
42
+ return false;
43
+ };
44
+ var isCurrDay = function isCurrDay2(month, day) {
45
+ var date = "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(day);
46
+ return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date(), "/"));
47
+ };
48
+ var getCurrDate = function getCurrDate2(day, month) {
49
+ return "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(Utils.getNumTwoBit(+day.day));
50
+ };
51
+ var isStart = function isStart2(day, days) {
52
+ return Utils.isEqual(days[0], day);
53
+ };
54
+ var isEnd = function isEnd2(day, days) {
55
+ return Utils.isEqual(days[1], day);
56
+ };
57
+ var isStartAndEnd = function isStartAndEnd2(days) {
58
+ return days.length >= 2 && Utils.isEqual(days[0], days[1]);
59
+ };
60
+ var defaultProps = _objectSpread(_objectSpread({}, ComponentDefaults), {}, {
32
61
  type: "single",
33
62
  autoBackfill: false,
34
63
  popup: true,
@@ -42,6 +71,7 @@ var defaultProps = {
42
71
  showTitle: true,
43
72
  showSubTitle: true,
44
73
  scrollAnimation: true,
74
+ firstDayOfWeek: 0,
45
75
  renderHeaderButtons: void 0,
46
76
  renderDay: void 0,
47
77
  renderDayTop: void 0,
@@ -50,28 +80,25 @@ var defaultProps = {
50
80
  },
51
81
  onUpdate: function onUpdate() {
52
82
  },
53
- onClickDay: function onClickDay(data) {
83
+ onDayClick: function onDayClick(data) {
54
84
  },
55
85
  onPageChange: function onPageChange(data) {
56
86
  }
57
- };
87
+ });
58
88
  var CalendarItem = React__default.forwardRef(function(props, ref) {
59
89
  var _classNames, _classNames2;
60
90
  var _useConfig = useConfig(), locale = _useConfig.locale;
61
- var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), type = _defaultProps$props.type, autoBackfill = _defaultProps$props.autoBackfill, popup = _defaultProps$props.popup, title = _defaultProps$props.title, defaultValue = _defaultProps$props.defaultValue, showToday = _defaultProps$props.showToday, startText = _defaultProps$props.startText, endText = _defaultProps$props.endText, confirmText = _defaultProps$props.confirmText, showTitle = _defaultProps$props.showTitle, showSubTitle = _defaultProps$props.showSubTitle, scrollAnimation = _defaultProps$props.scrollAnimation, renderHeaderButtons = _defaultProps$props.renderHeaderButtons, renderDay = _defaultProps$props.renderDay, renderDayTop = _defaultProps$props.renderDayTop, renderDayBottom = _defaultProps$props.renderDayBottom, onConfirm2 = _defaultProps$props.onConfirm, onUpdate2 = _defaultProps$props.onUpdate, onClickDay2 = _defaultProps$props.onClickDay, onPageChange2 = _defaultProps$props.onPageChange;
62
- var weeks = locale.calendaritem.weekdays;
91
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), popup = _defaultProps$props.popup, type = _defaultProps$props.type, autoBackfill = _defaultProps$props.autoBackfill, title = _defaultProps$props.title, defaultValue = _defaultProps$props.defaultValue, startDate = _defaultProps$props.startDate, endDate = _defaultProps$props.endDate, showToday = _defaultProps$props.showToday, startText = _defaultProps$props.startText, endText = _defaultProps$props.endText, confirmText = _defaultProps$props.confirmText, showTitle = _defaultProps$props.showTitle, showSubTitle = _defaultProps$props.showSubTitle, scrollAnimation = _defaultProps$props.scrollAnimation, firstDayOfWeek = _defaultProps$props.firstDayOfWeek, renderHeaderButtons = _defaultProps$props.renderHeaderButtons, renderDay = _defaultProps$props.renderDay, renderDayTop = _defaultProps$props.renderDayTop, renderDayBottom = _defaultProps$props.renderDayBottom, onConfirm2 = _defaultProps$props.onConfirm, onUpdate2 = _defaultProps$props.onUpdate, onDayClick2 = _defaultProps$props.onDayClick, onPageChange2 = _defaultProps$props.onPageChange;
92
+ var weekdays = locale.calendaritem.weekdays;
93
+ var weeks = [].concat(_toConsumableArray(weekdays.slice(firstDayOfWeek, 7)), _toConsumableArray(weekdays.slice(0, firstDayOfWeek)));
63
94
  var monthTitle = locale.calendaritem.monthTitle;
64
95
  var _useState = useState(""), _useState2 = _slicedToArray(_useState, 2), yearMonthTitle = _useState2[0], setYearMonthTitle = _useState2[1];
65
96
  var _useState3 = useState([]), _useState4 = _slicedToArray(_useState3, 2), monthsData = _useState4[0], setMonthsData = _useState4[1];
66
97
  var _useState5 = useState(0), _useState6 = _slicedToArray(_useState5, 2), monthsNum = _useState6[0], setMonthsNum = _useState6[1];
67
98
  var _useState7 = useState(0), _useState8 = _slicedToArray(_useState7, 2), translateY = _useState8[0], setTranslateY = _useState8[1];
68
99
  var _useState9 = useState([]), _useState10 = _slicedToArray(_useState9, 2), monthDefaultRange = _useState10[0], setMonthDefaultRange = _useState10[1];
69
- var propStartDate = props.startDate || Utils.getDay(0);
70
- var propEndDate = props.endDate || Utils.getDay(365);
71
- var splitDate = function splitDate2(date) {
72
- var split = date.indexOf("-") !== -1 ? "-" : "/";
73
- return date.split(split);
74
- };
100
+ var propStartDate = startDate || Utils.getDay(0);
101
+ var propEndDate = endDate || Utils.getDay(365);
75
102
  var startDates = splitDate(propStartDate);
76
103
  var endDates = splitDate(propEndDate);
77
104
  var _useState11 = useState({
@@ -98,133 +125,37 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
98
125
  var viewHeight = 0;
99
126
  var classPrefix = "nut-calendar";
100
127
  var dayPrefix = "nut-calendar-day";
101
- var classes = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(classPrefix, "-title"), !popup), _defineProperty(_classNames, "".concat(classPrefix, "-nofooter"), !!autoBackfill), _classNames), classPrefix);
102
- var headerClasses = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(classPrefix, "-header"), true), _defineProperty(_classNames2, "".concat(classPrefix, "-header-title"), !popup), _classNames2));
103
- var isMultiple = function isMultiple2(d) {
104
- if (currentDate.length > 0) {
105
- return currentDate.some(function(item) {
106
- return Utils.isEqual(item, d);
107
- });
108
- }
109
- return false;
110
- };
111
- var getCurrDate = function getCurrDate2(day, month) {
112
- return "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(Utils.getNumTwoBit(+day.day));
113
- };
114
- var getClasses = function getClasses2(day, month) {
115
- var dateStr = getCurrDate(day, month);
116
- if (day.type === "active") {
117
- if (propStartDate && Utils.compareDate(dateStr, propStartDate) || propEndDate && Utils.compareDate(propEndDate, dateStr)) {
118
- return "".concat(dayPrefix, "-disabled");
119
- }
120
- if (type === "range") {
121
- if (isStart(dateStr) || isEnd(dateStr)) {
122
- return "".concat(dayPrefix, "-active ").concat(isStart(dateStr) ? "active-start" : "", " ").concat(isEnd(dateStr) ? "active-end" : "");
123
- }
124
- if (Array.isArray(currentDate) && Object.values(currentDate).length === 2 && Utils.compareDate(currentDate[0], dateStr) && Utils.compareDate(dateStr, currentDate[1])) {
125
- return "".concat(dayPrefix, "-choose");
126
- }
127
- return null;
128
- }
129
- if (type === "multiple" && isMultiple(dateStr) || !Array.isArray(currentDate) && Utils.isEqual(currentDate, dateStr)) {
130
- return "".concat(dayPrefix, "-active");
128
+ var getMonthData = function getMonthData2(curData, monthNum, type2) {
129
+ var i = 0;
130
+ var date = curData;
131
+ var monthData = monthsData;
132
+ do {
133
+ var y = parseInt(date[0], 10);
134
+ var m = parseInt(date[1], 10);
135
+ var days = [].concat(_toConsumableArray(getPreMonthDates("prev", y, m, firstDayOfWeek)), _toConsumableArray(getDaysStatus("active", y, m)));
136
+ var cssHeight = 39 + (days.length > 35 ? 384 : 320);
137
+ var scrollTop = 0;
138
+ if (monthData.length > 0) {
139
+ var monthEle = monthData[monthData.length - 1];
140
+ scrollTop = monthEle.scrollTop + monthEle.cssHeight;
131
141
  }
132
- return null;
133
- }
134
- return "".concat(dayPrefix, "-disabled");
135
- };
136
- var isCurrDay = function isCurrDay2(month, day) {
137
- var date = "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(day);
138
- return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date(), "/"));
139
- };
140
- var isStart = function isStart2(d) {
141
- return Utils.isEqual(currentDate[0], d);
142
- };
143
- var isEnd = function isEnd2(d) {
144
- return Utils.isEqual(currentDate[1], d);
145
- };
146
- var isStartTip = function isStartTip2(day, month) {
147
- return type === "range" && day.type === "active" && isStart(getCurrDate(day, month));
148
- };
149
- var isEndTip = function isEndTip2(day, month) {
150
- return currentDate.length >= 2 && type === "range" && day.type === "active" && isEnd(getCurrDate(day, month));
151
- };
152
- var isStartAndEnd = function isStartAndEnd2() {
153
- return currentDate.length >= 2 && Utils.isEqual(currentDate[0], currentDate[1]);
154
- };
155
- var getCurrMonthData = function getCurrMonthData2(type2) {
156
- var monthData = type2 === "prev" ? monthsData[0] : monthsData[monthsData.length - 1];
157
- var year = parseInt(monthData.curData[0]);
158
- var month = parseInt(monthData.curData[1].toString().replace(/^0/, ""));
159
- switch (type2) {
160
- case "prev":
161
- month === 1 && (year -= 1);
162
- month = month === 1 ? 12 : --month;
163
- break;
164
- case "next":
165
- month === 12 && (year += 1);
166
- month = month === 12 ? 1 : ++month;
167
- break;
168
- }
169
- return [year, Utils.getNumTwoBit(month), Utils.getMonthDays(String(year), String(month))];
170
- };
171
- var getDaysStatus = function getDaysStatus2(days, type2, year, month) {
172
- if (type2 === "prev" && days >= 7) {
173
- days -= 7;
174
- }
175
- return Array.from(Array(days), function(v, k) {
176
- return {
177
- day: k + 1,
178
- type: type2,
179
- year,
180
- month
181
- };
182
- });
183
- };
184
- var getPreDaysStatus = function getPreDaysStatus2(days, type2, year, month, preCurrMonthDays) {
185
- if (type2 === "prev" && days >= 7) {
186
- days -= 7;
187
- }
188
- var months = Array.from(Array(preCurrMonthDays), function(v, k) {
189
- return {
190
- day: k + 1,
191
- type: type2,
192
- year,
193
- month
142
+ var monthInfo = {
143
+ curData: date,
144
+ title: monthTitle(y, m),
145
+ monthData: days,
146
+ cssHeight,
147
+ scrollTop
194
148
  };
195
- });
196
- return months.slice(preCurrMonthDays - days);
197
- };
198
- var getMonthData = function getMonthData2(curData, type2) {
199
- var preMonth = +curData[1] - 1;
200
- var preYear = curData[0];
201
- if (preMonth <= 0) {
202
- preMonth = 12;
203
- preYear += 1;
204
- }
205
- var preMonthDays = Utils.getMonthPreDay(+curData[0], +curData[1]);
206
- var currMonthDays = Utils.getMonthDays(curData[0], curData[1]);
207
- var preCurrMonthDays = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
208
- var monthInfo = {
209
- curData,
210
- title: monthTitle(curData[0], curData[1]),
211
- monthData: [].concat(_toConsumableArray(getPreDaysStatus(preMonthDays, "prev", "".concat(preMonth), preYear, preCurrMonthDays)), _toConsumableArray(getDaysStatus(currMonthDays, "active", curData[0], curData[1])))
212
- };
213
- monthInfo.cssHeight = 39 + (monthInfo.monthData.length > 35 ? 384 : 320);
214
- var scrollTop = 0;
215
- if (monthsData.length > 0) {
216
- var monthEle = monthsData[monthsData.length - 1];
217
- scrollTop = monthEle.scrollTop + monthEle.cssHeight;
218
- }
219
- monthInfo.scrollTop = scrollTop;
220
- if (type2 === "next") {
221
- if (!endDates || !Utils.compareDate("".concat(endDates[0], "/").concat(endDates[1], "/").concat(Utils.getMonthDays(endDates[0], endDates[1])), "".concat(curData[0], "/").concat(curData[1], "/").concat(curData[2]))) {
222
- monthsData.push(monthInfo);
149
+ if (type2 === "next") {
150
+ if (!endDates || !Utils.compareDate("".concat(endDates[0], "/").concat(endDates[1], "/").concat(Utils.getMonthDays(endDates[0], endDates[1])), "".concat(curData[0], "/").concat(curData[1], "/").concat(curData[2]))) {
151
+ monthData.push(monthInfo);
152
+ }
153
+ } else if (!startDates || !Utils.compareDate("".concat(curData[0], "/").concat(curData[1], "/").concat(curData[2]), "".concat(startDates[0], "/").concat(startDates[1], "/01"))) {
154
+ monthData.unshift(monthInfo);
223
155
  }
224
- } else if (!startDates || !Utils.compareDate("".concat(curData[0], "/").concat(curData[1], "/").concat(curData[2]), "".concat(startDates[0], "/").concat(startDates[1], "/01"))) {
225
- monthsData.unshift(monthInfo);
226
- }
227
- setMonthsData(monthsData);
156
+ date = getCurrMonthData("next", y, m);
157
+ } while (i++ < monthNum);
158
+ setMonthsData(monthData);
228
159
  };
229
160
  var setReachedYearMonthInfo = function setReachedYearMonthInfo2(current) {
230
161
  var currentMonthsData = monthsData[current];
@@ -256,48 +187,11 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
256
187
  setTranslateY(monthsData[start].scrollTop);
257
188
  setReachedYearMonthInfo(current);
258
189
  };
259
- var monthsViewScroll = function monthsViewScroll2(e) {
260
- if (monthsData.length <= 1) {
261
- return;
262
- }
263
- var scrollTop = e.target.scrollTop;
264
- var current = Math.floor(scrollTop / avgHeight);
265
- var nextTop = monthsData[current + 1].scrollTop;
266
- var nextHeight = monthsData[current + 1].cssHeight;
267
- if (current === 0) {
268
- if (scrollTop >= nextTop) {
269
- current += 1;
270
- }
271
- } else if (current > 0 && current < monthsNum - 1) {
272
- if (scrollTop >= nextTop) {
273
- current += 1;
274
- }
275
- if (scrollTop < monthsData[current].scrollTop) {
276
- current -= 1;
277
- }
278
- } else {
279
- var viewPosition = Math.round(scrollTop + viewHeight);
280
- if (current + 1 <= monthsNum && viewPosition >= nextTop + nextHeight) {
281
- current += 1;
282
- }
283
- if (current >= 1 && scrollTop < monthsData[current - 1].scrollTop) {
284
- current -= 1;
285
- }
286
- }
287
- setDefaultRange(monthsNum, current);
288
- };
289
190
  var getMonthNum = function getMonthNum2() {
290
- var startDate = {
291
- year: Number(startDates[0]),
292
- month: Number(startDates[1])
293
- };
294
- var endDate = {
295
- year: Number(endDates[0]),
296
- month: Number(endDates[1])
297
- };
298
- var monthNum = endDate.month - startDate.month;
299
- if (endDate.year - startDate.year > 0) {
300
- monthNum += 12 * (endDate.year - startDate.year);
191
+ var monthNum = Number(endDates[1]) - Number(startDates[1]);
192
+ var yearNum = Number(endDates[0]) - Number(startDates[0]);
193
+ if (yearNum > 0) {
194
+ monthNum += 12 * yearNum;
301
195
  }
302
196
  if (monthNum <= 0) {
303
197
  monthNum = 1;
@@ -305,26 +199,7 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
305
199
  setMonthsNum(monthNum);
306
200
  return monthNum;
307
201
  };
308
- var getMonthsData = function getMonthsData2(monthNum) {
309
- getMonthData(startDates, "next");
310
- var i = 1;
311
- do {
312
- getMonthData(getCurrMonthData("next"), "next");
313
- } while (i++ < monthNum);
314
- };
315
- var requestAniFrameFunc = function requestAniFrameFunc2(current, monthNum) {
316
- var lastItem = monthsData[monthsData.length - 1];
317
- var containerHeight = lastItem.cssHeight + lastItem.scrollTop;
318
- requestAniFrame(function() {
319
- if (monthsRef && monthsPanel && viewAreaRef) {
320
- viewHeight = monthsRef.current.clientHeight;
321
- monthsPanel.current.style.height = "".concat(containerHeight, "px");
322
- monthsRef.current.scrollTop = monthsData[current].scrollTop;
323
- }
324
- });
325
- setAvgHeight(Math.floor(containerHeight / (monthNum + 1)));
326
- };
327
- var renderCurrentDate = function renderCurrentDate2() {
202
+ var setDefaultDate = function setDefaultDate2() {
328
203
  var defaultData = [];
329
204
  if (type === "range" && Array.isArray(currentDate)) {
330
205
  if (currentDate.length > 0) {
@@ -336,7 +211,7 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
336
211
  }
337
212
  defaultData = [].concat(_toConsumableArray(splitDate(currentDate[0])), _toConsumableArray(splitDate(currentDate[1])));
338
213
  }
339
- } else if (props.type === "multiple" && Array.isArray(currentDate)) {
214
+ } else if (type === "multiple" && Array.isArray(currentDate)) {
340
215
  if (currentDate.length > 0) {
341
216
  var defaultArr = [];
342
217
  var obj = {};
@@ -351,6 +226,19 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
351
226
  currentDate.splice(0) && currentDate.push.apply(currentDate, defaultArr);
352
227
  defaultData = _toConsumableArray(splitDate(defaultArr[0]));
353
228
  }
229
+ } else if (type === "week" && Array.isArray(currentDate)) {
230
+ if (currentDate.length > 0) {
231
+ var _splitDate = splitDate(currentDate[0]), _splitDate2 = _slicedToArray(_splitDate, 3), y = _splitDate2[0], m = _splitDate2[1], d = _splitDate2[2];
232
+ var weekArr = Utils.getWeekDate(y, m, d, firstDayOfWeek);
233
+ currentDate.splice(0) && currentDate.push.apply(currentDate, _toConsumableArray(weekArr));
234
+ if (propStartDate && Utils.compareDate(currentDate[0], propStartDate)) {
235
+ currentDate.splice(0, 1, propStartDate);
236
+ }
237
+ if (propEndDate && Utils.compareDate(propEndDate, currentDate[1])) {
238
+ currentDate.splice(1, 1, propEndDate);
239
+ }
240
+ defaultData = [].concat(_toConsumableArray(splitDate(currentDate[0])), _toConsumableArray(splitDate(currentDate[1])));
241
+ }
354
242
  } else if (currentDate) {
355
243
  if (currentDate.length > 0) {
356
244
  if (propStartDate && Utils.compareDate(currentDate, propStartDate)) {
@@ -364,43 +252,60 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
364
252
  defaultData = [];
365
253
  }
366
254
  }
255
+ return defaultData;
256
+ };
257
+ var getCurrentIndex = function getCurrentIndex2(defaultData) {
367
258
  var current = 0;
368
259
  var lastCurrent = 0;
369
260
  if (defaultData.length > 0) {
370
- monthsData.forEach(function(item, index) {
261
+ monthsData.forEach(function(item, index2) {
371
262
  if (item.title === monthTitle(defaultData[0], defaultData[1])) {
372
- current = index;
263
+ current = index2;
373
264
  }
374
- if (props.type === "range") {
265
+ if (type === "range" || type === "week") {
375
266
  if (item.title === monthTitle(defaultData[3], defaultData[4])) {
376
- lastCurrent = index;
267
+ lastCurrent = index2;
377
268
  }
378
269
  }
379
270
  });
380
271
  } else {
381
- var currentYear = /* @__PURE__ */ (/* @__PURE__ */ new Date()).getFullYear();
382
- var currentMonth = /* @__PURE__ */ (/* @__PURE__ */ new Date()).getMonth() + 1;
383
- var currentYearMonthIndex = monthsData.findIndex(function(item) {
384
- return +item.curData[0] === currentYear && +item.curData[1] === currentMonth;
272
+ var date = /* @__PURE__ */ new Date();
273
+ var year = date.getFullYear();
274
+ var month = date.getMonth() + 1;
275
+ var index = monthsData.findIndex(function(item) {
276
+ return +item.curData[0] === year && +item.curData[1] === month;
385
277
  });
386
- if (currentYearMonthIndex > -1) {
387
- current = currentYearMonthIndex;
278
+ if (index > -1) {
279
+ current = index;
388
280
  }
389
281
  }
282
+ return {
283
+ current,
284
+ lastCurrent
285
+ };
286
+ };
287
+ var renderCurrentDate = function renderCurrentDate2() {
288
+ var defaultData = setDefaultDate();
289
+ var current = getCurrentIndex(defaultData);
390
290
  if (defaultData.length > 0) {
391
291
  if (type === "range") {
392
292
  chooseDay({
393
293
  day: defaultData[2],
394
294
  type: "active"
395
- }, monthsData[current], true);
295
+ }, monthsData[current.current], true);
396
296
  chooseDay({
397
297
  day: defaultData[5],
398
298
  type: "active"
399
- }, monthsData[lastCurrent], true);
299
+ }, monthsData[current.lastCurrent], true);
300
+ } else if (props.type === "week") {
301
+ chooseDay({
302
+ day: defaultData[2],
303
+ type: "curr"
304
+ }, monthsData[current.current], true);
400
305
  } else if (type === "multiple") {
401
306
  _toConsumableArray(currentDate).forEach(function(item) {
402
307
  var dateArr = splitDate(item);
403
- var currentIndex = current;
308
+ var currentIndex = current.current;
404
309
  monthsData.forEach(function(item2, index) {
405
310
  if (item2.title === monthTitle(dateArr[0], dateArr[1])) {
406
311
  currentIndex = index;
@@ -415,23 +320,42 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
415
320
  chooseDay({
416
321
  day: defaultData[2],
417
322
  type: "active"
418
- }, monthsData[current], true);
323
+ }, monthsData[current.current], true);
419
324
  }
420
325
  }
421
- return current;
326
+ return current.current;
327
+ };
328
+ var requestAniFrameFunc = function requestAniFrameFunc2(current, monthNum) {
329
+ var lastItem = monthsData[monthsData.length - 1];
330
+ var containerHeight = lastItem.cssHeight + lastItem.scrollTop;
331
+ requestAniFrame(function() {
332
+ if (monthsRef && monthsPanel && viewAreaRef) {
333
+ viewHeight = monthsRef.current.clientHeight;
334
+ monthsPanel.current.style.height = "".concat(containerHeight, "px");
335
+ monthsRef.current.scrollTop = monthsData[current].scrollTop;
336
+ }
337
+ });
338
+ setAvgHeight(Math.floor(containerHeight / (monthNum + 1)));
422
339
  };
423
340
  var initData = function initData2() {
424
341
  var monthNum = getMonthNum();
425
- getMonthsData(monthNum);
342
+ getMonthData(startDates, monthNum, "next");
426
343
  var current = renderCurrentDate();
427
344
  setDefaultRange(monthNum, current);
428
345
  requestAniFrameFunc(current, monthNum);
429
346
  };
347
+ useEffect(function() {
348
+ initData();
349
+ }, []);
430
350
  var resetRender = function resetRender2() {
431
351
  state.currDateArray.splice(0);
432
352
  monthsData.splice(0);
433
353
  initData();
434
354
  };
355
+ useEffect(function() {
356
+ setCurrentDate(resetDefaultValue() || []);
357
+ popup && resetRender();
358
+ }, [defaultValue]);
435
359
  var scrollToDate = function scrollToDate2(date) {
436
360
  if (Utils.compareDate(date, propStartDate)) {
437
361
  date = propStartDate;
@@ -466,32 +390,69 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
466
390
  }
467
391
  });
468
392
  };
469
- useEffect(function() {
470
- initData();
471
- }, []);
472
- useEffect(function() {
473
- setCurrentDate(resetDefaultValue() || []);
474
- popup && resetRender();
475
- }, [defaultValue]);
393
+ var monthsViewScroll = function monthsViewScroll2(e) {
394
+ if (monthsData.length <= 1) {
395
+ return;
396
+ }
397
+ var scrollTop = e.target.scrollTop;
398
+ var current = Math.floor(scrollTop / avgHeight);
399
+ var nextTop = monthsData[current + 1].scrollTop;
400
+ var nextHeight = monthsData[current + 1].cssHeight;
401
+ if (current === 0) {
402
+ if (scrollTop >= nextTop) {
403
+ current += 1;
404
+ }
405
+ } else if (current > 0 && current < monthsNum - 1) {
406
+ if (scrollTop >= nextTop) {
407
+ current += 1;
408
+ }
409
+ if (scrollTop < monthsData[current].scrollTop) {
410
+ current -= 1;
411
+ }
412
+ } else {
413
+ var viewPosition = Math.round(scrollTop + viewHeight);
414
+ if (current + 1 <= monthsNum && viewPosition >= nextTop + nextHeight) {
415
+ current += 1;
416
+ }
417
+ if (current >= 1 && scrollTop < monthsData[current - 1].scrollTop) {
418
+ current -= 1;
419
+ }
420
+ }
421
+ setDefaultRange(monthsNum, current);
422
+ };
476
423
  React__default.useImperativeHandle(ref, function() {
477
424
  return {
478
425
  scrollToDate
479
426
  };
480
427
  });
481
- var confirm = function confirm2() {
482
- if (type === "range" && state.currDateArray.length === 2 || type !== "range") {
483
- var chooseData = state.currDateArray.slice(0);
484
- onConfirm2 && onConfirm2(chooseData);
485
- if (popup) {
486
- onUpdate2 && onUpdate2();
428
+ var getClasses = function getClasses2(day, month) {
429
+ var dateStr = getCurrDate(day, month);
430
+ if (day.type === "active") {
431
+ if (propStartDate && Utils.compareDate(dateStr, propStartDate) || propEndDate && Utils.compareDate(propEndDate, dateStr)) {
432
+ return "".concat(dayPrefix, "-disabled");
433
+ }
434
+ if (type === "range" || type === "week") {
435
+ if (isStart(dateStr, currentDate) || isEnd(dateStr, currentDate)) {
436
+ return "".concat(dayPrefix, "-active ").concat(isStart(dateStr, currentDate) ? "active-start" : "", " ").concat(isEnd(dateStr, currentDate) ? "active-end" : "");
437
+ }
438
+ if (Array.isArray(currentDate) && Object.values(currentDate).length === 2 && Utils.compareDate(currentDate[0], dateStr) && Utils.compareDate(dateStr, currentDate[1])) {
439
+ return "".concat(dayPrefix, "-choose");
440
+ }
441
+ return null;
487
442
  }
443
+ if (type === "multiple" && isMultiple(dateStr, currentDate) || !Array.isArray(currentDate) && Utils.isEqual(currentDate, dateStr)) {
444
+ return "".concat(dayPrefix, "-active");
445
+ }
446
+ return null;
488
447
  }
448
+ return "".concat(dayPrefix, "-disabled");
489
449
  };
490
450
  var chooseDay = function chooseDay2(day, month, isFirst) {
491
451
  if (getClasses(day, month) === "".concat(dayPrefix, "-disabled")) {
492
452
  return;
493
453
  }
494
454
  var days = _toConsumableArray(month.curData);
455
+ var _month$curData = _slicedToArray(month.curData, 2), y = _month$curData[0], m = _month$curData[1];
495
456
  days[2] = typeof day.day === "number" ? Utils.getNumTwoBit(day.day) : day.day;
496
457
  days[3] = "".concat(days[0], "/").concat(days[1], "/").concat(days[2]);
497
458
  days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
@@ -528,84 +489,120 @@ var CalendarItem = React__default.forwardRef(function(props, ref) {
528
489
  Array.isArray(currentDate) && currentDate.unshift(days[3]);
529
490
  state.currDateArray = [_toConsumableArray(days)].concat(_toConsumableArray(state.currDateArray));
530
491
  }
492
+ } else if (type === "week") {
493
+ var weekArr = Utils.getWeekDate(y, m, "".concat(day.day), firstDayOfWeek);
494
+ if (propStartDate && Utils.compareDate(weekArr[0], propStartDate)) {
495
+ weekArr.splice(0, 1, propStartDate);
496
+ }
497
+ if (propEndDate && Utils.compareDate(propEndDate, weekArr[1])) {
498
+ weekArr.splice(1, 1, propEndDate);
499
+ }
500
+ Array.isArray(currentDate) && currentDate.splice(0) && currentDate.push.apply(currentDate, _toConsumableArray(weekArr));
501
+ state.currDateArray = [Utils.formatResultDate(weekArr[0]), Utils.formatResultDate(weekArr[1])];
531
502
  } else {
532
503
  setCurrentDate(days[3]);
533
504
  state.currDateArray = _toConsumableArray(days);
534
505
  }
535
506
  if (!isFirst) {
536
- onClickDay2 && onClickDay2(state.currDateArray);
507
+ onDayClick2 && onDayClick2(state.currDateArray);
537
508
  if (autoBackfill || !popup) {
538
509
  confirm();
539
510
  }
540
511
  }
541
512
  setMonthsData(monthsData.slice());
542
513
  };
543
- return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
544
- className: classes
545
- }, React__default.createElement("div", {
546
- className: headerClasses
547
- }, showTitle && React__default.createElement("div", {
548
- className: "".concat(classPrefix, "-title")
549
- }, title || locale.calendaritem.title), renderHeaderButtons && React__default.createElement("div", {
550
- className: "".concat(classPrefix, "-header-buttons")
551
- }, renderHeaderButtons()), showSubTitle && React__default.createElement("div", {
552
- className: "".concat(classPrefix, "-sub-title")
553
- }, yearMonthTitle), React__default.createElement("div", {
554
- className: "".concat(classPrefix, "-weeks"),
555
- ref: weeksPanel
556
- }, weeks.map(function(item) {
557
- return React__default.createElement("div", {
558
- className: "".concat(classPrefix, "-week-item"),
559
- key: item
560
- }, item);
561
- }))), React__default.createElement("div", {
562
- className: "".concat(classPrefix, "-content"),
563
- onScroll: monthsViewScroll,
564
- ref: monthsRef
565
- }, React__default.createElement("div", {
566
- className: "".concat(classPrefix, "-pannel"),
567
- ref: monthsPanel
568
- }, React__default.createElement("div", {
569
- className: "viewArea",
570
- ref: viewAreaRef,
571
- style: {
572
- transform: "translateY(".concat(translateY, "px)")
514
+ var confirm = function confirm2() {
515
+ if (type === "range" && state.currDateArray.length === 2 || type !== "range") {
516
+ var chooseData = state.currDateArray.slice(0);
517
+ onConfirm2 && onConfirm2(chooseData);
518
+ if (popup) {
519
+ onUpdate2 && onUpdate2();
520
+ }
573
521
  }
574
- }, monthsData.slice(monthDefaultRange[0], monthDefaultRange[1]).map(function(month, key) {
522
+ };
523
+ var classes = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(classPrefix, "-title"), !popup), _defineProperty(_classNames, "".concat(classPrefix, "-nofooter"), !!autoBackfill), _classNames), classPrefix);
524
+ var headerClasses = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(classPrefix, "-header"), true), _defineProperty(_classNames2, "".concat(classPrefix, "-header-title"), !popup), _classNames2));
525
+ var isStartTip = function isStartTip2(day, month) {
526
+ return (type === "range" || type === "week") && day.type === "active" && isStart(getCurrDate(day, month), currentDate);
527
+ };
528
+ var isEndTip = function isEndTip2(day, month) {
529
+ return currentDate.length >= 2 && (type === "range" || type === "week") && day.type === "active" && isEnd(getCurrDate(day, month), currentDate);
530
+ };
531
+ var renderHeader = function renderHeader2() {
575
532
  return React__default.createElement("div", {
576
- className: "".concat(classPrefix, "-month"),
577
- key
533
+ className: headerClasses
534
+ }, showTitle && React__default.createElement("div", {
535
+ className: "".concat(classPrefix, "-title")
536
+ }, title || locale.calendaritem.title), renderHeaderButtons && React__default.createElement("div", {
537
+ className: "".concat(classPrefix, "-header-buttons")
538
+ }, renderHeaderButtons()), showSubTitle && React__default.createElement("div", {
539
+ className: "".concat(classPrefix, "-sub-title")
540
+ }, yearMonthTitle), React__default.createElement("div", {
541
+ className: "".concat(classPrefix, "-weeks"),
542
+ ref: weeksPanel
543
+ }, weeks.map(function(item) {
544
+ return React__default.createElement("div", {
545
+ className: "".concat(classPrefix, "-week-item"),
546
+ key: item
547
+ }, item);
548
+ })));
549
+ };
550
+ var renderContent = function renderContent2() {
551
+ return React__default.createElement("div", {
552
+ className: "".concat(classPrefix, "-content"),
553
+ onScroll: monthsViewScroll,
554
+ ref: monthsRef
555
+ }, React__default.createElement("div", {
556
+ className: "".concat(classPrefix, "-pannel"),
557
+ ref: monthsPanel
578
558
  }, React__default.createElement("div", {
579
- className: "".concat(classPrefix, "-month-title")
580
- }, month.title), React__default.createElement("div", {
581
- className: "".concat(classPrefix, "-days")
582
- }, month.monthData.map(function(day, i) {
559
+ className: "viewArea",
560
+ ref: viewAreaRef,
561
+ style: {
562
+ transform: "translateY(".concat(translateY, "px)")
563
+ }
564
+ }, monthsData.slice(monthDefaultRange[0], monthDefaultRange[1]).map(function(month, key) {
583
565
  return React__default.createElement("div", {
584
- className: ["".concat(classPrefix, "-day"), getClasses(day, month)].join(" "),
585
- onClick: function onClick() {
586
- chooseDay(day, month);
587
- },
588
- key: i
566
+ className: "".concat(classPrefix, "-month"),
567
+ key
589
568
  }, React__default.createElement("div", {
590
- className: "".concat(classPrefix, "-day-day")
591
- }, renderDay ? renderDay(day) : day.day), !isStartTip(day, month) && renderDayTop && React__default.createElement("div", {
592
- className: "".concat(classPrefix, "-day-info-top")
593
- }, renderDayTop(day)), !isStartTip(day, month) && !isEndTip(day, month) && renderDayBottom && React__default.createElement("div", {
594
- className: "".concat(classPrefix, "-day-info-bottom")
595
- }, renderDayBottom(day)), !isStartTip(day, month) && !isEndTip(day, month) && !renderDayBottom && showToday && isCurrDay(month, day.day) && React__default.createElement("div", {
596
- className: "".concat(classPrefix, "-day-info-curr")
597
- }, locale.calendaritem.today), isStartTip(day, month) && React__default.createElement("div", {
598
- className: "".concat(classPrefix, "-day-info ").concat(isStartAndEnd() ? "".concat(classPrefix, "-day-info-top") : "")
599
- }, startText || locale.calendaritem.start), isEndTip(day, month) && React__default.createElement("div", {
600
- className: "".concat(classPrefix, "-day-info")
601
- }, endText || locale.calendaritem.end));
602
- })));
603
- })))), popup && !autoBackfill ? React__default.createElement("div", {
604
- className: "nut-calendar-footer"
605
- }, React__default.createElement("div", {
606
- className: "calendar-confirm-btn",
607
- onClick: confirm
608
- }, confirmText || locale.confirm)) : ""));
569
+ className: "".concat(classPrefix, "-month-title")
570
+ }, month.title), React__default.createElement("div", {
571
+ className: "".concat(classPrefix, "-days")
572
+ }, month.monthData.map(function(day, i) {
573
+ return React__default.createElement("div", {
574
+ className: ["".concat(classPrefix, "-day"), getClasses(day, month)].join(" "),
575
+ onClick: function onClick() {
576
+ chooseDay(day, month);
577
+ },
578
+ key: i
579
+ }, React__default.createElement("div", {
580
+ className: "".concat(classPrefix, "-day-day")
581
+ }, renderDay ? renderDay(day) : day.day), !isStartTip(day, month) && renderDayTop && React__default.createElement("div", {
582
+ className: "".concat(classPrefix, "-day-info-top")
583
+ }, renderDayTop(day)), !isStartTip(day, month) && !isEndTip(day, month) && renderDayBottom && React__default.createElement("div", {
584
+ className: "".concat(classPrefix, "-day-info-bottom")
585
+ }, renderDayBottom(day)), !isStartTip(day, month) && !isEndTip(day, month) && !renderDayBottom && showToday && isCurrDay(month, day.day) && React__default.createElement("div", {
586
+ className: "".concat(classPrefix, "-day-info-curr")
587
+ }, locale.calendaritem.today), isStartTip(day, month) && React__default.createElement("div", {
588
+ className: "".concat(classPrefix, "-day-info ").concat(isStartAndEnd(currentDate) ? "".concat(classPrefix, "-day-info-top") : "")
589
+ }, startText || locale.calendaritem.start), isEndTip(day, month) && React__default.createElement("div", {
590
+ className: "".concat(classPrefix, "-day-info")
591
+ }, endText || locale.calendaritem.end));
592
+ })));
593
+ }))));
594
+ };
595
+ var renderFooter = function renderFooter2() {
596
+ return React__default.createElement("div", {
597
+ className: "nut-calendar-footer"
598
+ }, React__default.createElement("div", {
599
+ className: "calendar-confirm-btn",
600
+ onClick: confirm
601
+ }, confirmText || locale.confirm));
602
+ };
603
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
604
+ className: classes
605
+ }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
609
606
  });
610
607
  CalendarItem.defaultProps = defaultProps;
611
608
  CalendarItem.displayName = "NutCalendarItem";