@atlaskit/calendar 17.1.23 → 17.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 17.1.24
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 17.1.23
4
10
 
5
11
  ### Patch Changes
@@ -37,7 +37,7 @@ var styles = {
37
37
  var analyticsAttributes = {
38
38
  componentName: 'calendar',
39
39
  packageName: "@atlaskit/calendar",
40
- packageVersion: "17.1.22"
40
+ packageVersion: "17.1.23"
41
41
  };
42
42
  var InnerCalendar = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
43
43
  var day = _ref.day,
@@ -203,62 +203,58 @@ var InnerCalendar = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref,
203
203
  return "".concat(monthsLong[thisMonth], " ").concat(previousYear);
204
204
  };
205
205
  var headerId = (0, _useId.useId)();
206
- return (
207
- /*#__PURE__*/
208
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
209
- React.createElement("div", {
210
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
211
- className: className
212
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
213
- ,
214
- style: style,
215
- onBlur: handleContainerBlur,
216
- onFocus: handleContainerFocus,
217
- "data-testid": testId && "".concat(testId, "--container"),
218
- ref: ref
219
- }, /*#__PURE__*/React.createElement(_compiled.Box, {
220
- xcss: styles.box,
221
- padding: "space.200",
222
- "aria-label": "calendar",
223
- testId: testId && "".concat(testId, "--calendar")
224
- }, /*#__PURE__*/React.createElement(_compiled.Stack, {
225
- space: "space.150"
226
- }, /*#__PURE__*/React.createElement(_header.default
227
- // The month number needs to be translated to index in the month
228
- // name array e.g. 1 (January) -> 0
229
- , {
230
- monthLongTitle: monthsLong[monthValue - 1],
231
- year: yearValue,
232
- nextMonthLabel: nextMonthLabel,
233
- previousMonthLabel: previousMonthLabel,
234
- nextMonthHeading: getNextMonthHeading(),
235
- nextYearHeading: getNextYearHeading(),
236
- previousMonthHeading: getPreviousMonthHeading(),
237
- previousYearHeading: getPreviousYearHeading(),
238
- handleClickNextMonth: handleClickNextMonth,
239
- handleClickNextYear: handleClickNextYear,
240
- handleClickPrevMonth: handleClickPrevMonth,
241
- handleClickPrevYear: handleClickPrevYear,
242
- headerId: headerId,
243
- tabIndex: tabIndex,
244
- testId: testId
245
- }), /*#__PURE__*/React.createElement(_compiled.Box, {
246
- role: "grid",
247
- onKeyDown: handleContainerKeyDown,
248
- "aria-labelledby": headerId,
249
- testId: testId && "".concat(testId, "--calendar-dates")
250
- }, /*#__PURE__*/React.createElement(_weekHeader.default, {
251
- daysShort: daysShort,
252
- testId: testId
253
- }), /*#__PURE__*/React.createElement(_weekDays.default, {
254
- weeks: weeks,
255
- handleClickDay: handleClickDay,
256
- monthsLong: monthsLong,
257
- shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
258
- tabIndex: tabIndex,
259
- testId: testId
260
- })))))
261
- );
206
+ return /*#__PURE__*/React.createElement("div", {
207
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
208
+ className: className
209
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
210
+ ,
211
+ style: style,
212
+ onBlur: handleContainerBlur,
213
+ onFocus: handleContainerFocus,
214
+ "data-testid": testId && "".concat(testId, "--container"),
215
+ ref: ref
216
+ }, /*#__PURE__*/React.createElement(_compiled.Box, {
217
+ xcss: styles.box,
218
+ padding: "space.200",
219
+ "aria-label": "calendar",
220
+ testId: testId && "".concat(testId, "--calendar")
221
+ }, /*#__PURE__*/React.createElement(_compiled.Stack, {
222
+ space: "space.150"
223
+ }, /*#__PURE__*/React.createElement(_header.default
224
+ // The month number needs to be translated to index in the month
225
+ // name array e.g. 1 (January) -> 0
226
+ , {
227
+ monthLongTitle: monthsLong[monthValue - 1],
228
+ year: yearValue,
229
+ nextMonthLabel: nextMonthLabel,
230
+ previousMonthLabel: previousMonthLabel,
231
+ nextMonthHeading: getNextMonthHeading(),
232
+ nextYearHeading: getNextYearHeading(),
233
+ previousMonthHeading: getPreviousMonthHeading(),
234
+ previousYearHeading: getPreviousYearHeading(),
235
+ handleClickNextMonth: handleClickNextMonth,
236
+ handleClickNextYear: handleClickNextYear,
237
+ handleClickPrevMonth: handleClickPrevMonth,
238
+ handleClickPrevYear: handleClickPrevYear,
239
+ headerId: headerId,
240
+ tabIndex: tabIndex,
241
+ testId: testId
242
+ }), /*#__PURE__*/React.createElement(_compiled.Box, {
243
+ role: "grid",
244
+ onKeyDown: handleContainerKeyDown,
245
+ "aria-labelledby": headerId,
246
+ testId: testId && "".concat(testId, "--calendar-dates")
247
+ }, /*#__PURE__*/React.createElement(_weekHeader.default, {
248
+ daysShort: daysShort,
249
+ testId: testId
250
+ }), /*#__PURE__*/React.createElement(_weekDays.default, {
251
+ weeks: weeks,
252
+ handleClickDay: handleClickDay,
253
+ monthsLong: monthsLong,
254
+ shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
255
+ tabIndex: tabIndex,
256
+ testId: testId
257
+ })))));
262
258
  });
263
259
 
264
260
  /**
@@ -35,6 +35,7 @@ function useGetCalendarWithSixthWeek(calendar, _ref) {
35
35
  });
36
36
  });
37
37
  }
38
+ return [];
38
39
  }, [calendarLastValue, month, shouldDisplaySixthWeek, weekStartDay, year]);
39
40
  }
40
41
 
@@ -24,7 +24,7 @@ const styles = {
24
24
  const analyticsAttributes = {
25
25
  componentName: 'calendar',
26
26
  packageName: "@atlaskit/calendar",
27
- packageVersion: "17.1.22"
27
+ packageVersion: "17.1.23"
28
28
  };
29
29
  const InnerCalendar = /*#__PURE__*/forwardRef(function Calendar({
30
30
  day,
@@ -171,62 +171,58 @@ const InnerCalendar = /*#__PURE__*/forwardRef(function Calendar({
171
171
  return `${monthsLong[thisMonth]} ${previousYear}`;
172
172
  };
173
173
  const headerId = useId();
174
- return (
175
- /*#__PURE__*/
176
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
177
- React.createElement("div", {
178
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
179
- className: className
180
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
181
- ,
182
- style: style,
183
- onBlur: handleContainerBlur,
184
- onFocus: handleContainerFocus,
185
- "data-testid": testId && `${testId}--container`,
186
- ref: ref
187
- }, /*#__PURE__*/React.createElement(Box, {
188
- xcss: styles.box,
189
- padding: "space.200",
190
- "aria-label": "calendar",
191
- testId: testId && `${testId}--calendar`
192
- }, /*#__PURE__*/React.createElement(Stack, {
193
- space: "space.150"
194
- }, /*#__PURE__*/React.createElement(Header
195
- // The month number needs to be translated to index in the month
196
- // name array e.g. 1 (January) -> 0
197
- , {
198
- monthLongTitle: monthsLong[monthValue - 1],
199
- year: yearValue,
200
- nextMonthLabel: nextMonthLabel,
201
- previousMonthLabel: previousMonthLabel,
202
- nextMonthHeading: getNextMonthHeading(),
203
- nextYearHeading: getNextYearHeading(),
204
- previousMonthHeading: getPreviousMonthHeading(),
205
- previousYearHeading: getPreviousYearHeading(),
206
- handleClickNextMonth: handleClickNextMonth,
207
- handleClickNextYear: handleClickNextYear,
208
- handleClickPrevMonth: handleClickPrevMonth,
209
- handleClickPrevYear: handleClickPrevYear,
210
- headerId: headerId,
211
- tabIndex: tabIndex,
212
- testId: testId
213
- }), /*#__PURE__*/React.createElement(Box, {
214
- role: "grid",
215
- onKeyDown: handleContainerKeyDown,
216
- "aria-labelledby": headerId,
217
- testId: testId && `${testId}--calendar-dates`
218
- }, /*#__PURE__*/React.createElement(WeekHeaderComponent, {
219
- daysShort: daysShort,
220
- testId: testId
221
- }), /*#__PURE__*/React.createElement(WeekDaysComponent, {
222
- weeks: weeks,
223
- handleClickDay: handleClickDay,
224
- monthsLong: monthsLong,
225
- shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
226
- tabIndex: tabIndex,
227
- testId: testId
228
- })))))
229
- );
174
+ return /*#__PURE__*/React.createElement("div", {
175
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
176
+ className: className
177
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
178
+ ,
179
+ style: style,
180
+ onBlur: handleContainerBlur,
181
+ onFocus: handleContainerFocus,
182
+ "data-testid": testId && `${testId}--container`,
183
+ ref: ref
184
+ }, /*#__PURE__*/React.createElement(Box, {
185
+ xcss: styles.box,
186
+ padding: "space.200",
187
+ "aria-label": "calendar",
188
+ testId: testId && `${testId}--calendar`
189
+ }, /*#__PURE__*/React.createElement(Stack, {
190
+ space: "space.150"
191
+ }, /*#__PURE__*/React.createElement(Header
192
+ // The month number needs to be translated to index in the month
193
+ // name array e.g. 1 (January) -> 0
194
+ , {
195
+ monthLongTitle: monthsLong[monthValue - 1],
196
+ year: yearValue,
197
+ nextMonthLabel: nextMonthLabel,
198
+ previousMonthLabel: previousMonthLabel,
199
+ nextMonthHeading: getNextMonthHeading(),
200
+ nextYearHeading: getNextYearHeading(),
201
+ previousMonthHeading: getPreviousMonthHeading(),
202
+ previousYearHeading: getPreviousYearHeading(),
203
+ handleClickNextMonth: handleClickNextMonth,
204
+ handleClickNextYear: handleClickNextYear,
205
+ handleClickPrevMonth: handleClickPrevMonth,
206
+ handleClickPrevYear: handleClickPrevYear,
207
+ headerId: headerId,
208
+ tabIndex: tabIndex,
209
+ testId: testId
210
+ }), /*#__PURE__*/React.createElement(Box, {
211
+ role: "grid",
212
+ onKeyDown: handleContainerKeyDown,
213
+ "aria-labelledby": headerId,
214
+ testId: testId && `${testId}--calendar-dates`
215
+ }, /*#__PURE__*/React.createElement(WeekHeaderComponent, {
216
+ daysShort: daysShort,
217
+ testId: testId
218
+ }), /*#__PURE__*/React.createElement(WeekDaysComponent, {
219
+ weeks: weeks,
220
+ handleClickDay: handleClickDay,
221
+ monthsLong: monthsLong,
222
+ shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
223
+ tabIndex: tabIndex,
224
+ testId: testId
225
+ })))));
230
226
  });
231
227
 
232
228
  /**
@@ -24,6 +24,7 @@ function useGetCalendarWithSixthWeek(calendar, {
24
24
  siblingMonth: true
25
25
  }));
26
26
  }
27
+ return [];
27
28
  }, [calendarLastValue, month, shouldDisplaySixthWeek, weekStartDay, year]);
28
29
  }
29
30
 
@@ -28,7 +28,7 @@ var styles = {
28
28
  var analyticsAttributes = {
29
29
  componentName: 'calendar',
30
30
  packageName: "@atlaskit/calendar",
31
- packageVersion: "17.1.22"
31
+ packageVersion: "17.1.23"
32
32
  };
33
33
  var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
34
34
  var day = _ref.day,
@@ -194,62 +194,58 @@ var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
194
194
  return "".concat(monthsLong[thisMonth], " ").concat(previousYear);
195
195
  };
196
196
  var headerId = useId();
197
- return (
198
- /*#__PURE__*/
199
- // eslint-disable-next-line @atlassian/a11y/no-static-element-interactions
200
- React.createElement("div", {
201
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
202
- className: className
203
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
204
- ,
205
- style: style,
206
- onBlur: handleContainerBlur,
207
- onFocus: handleContainerFocus,
208
- "data-testid": testId && "".concat(testId, "--container"),
209
- ref: ref
210
- }, /*#__PURE__*/React.createElement(Box, {
211
- xcss: styles.box,
212
- padding: "space.200",
213
- "aria-label": "calendar",
214
- testId: testId && "".concat(testId, "--calendar")
215
- }, /*#__PURE__*/React.createElement(Stack, {
216
- space: "space.150"
217
- }, /*#__PURE__*/React.createElement(Header
218
- // The month number needs to be translated to index in the month
219
- // name array e.g. 1 (January) -> 0
220
- , {
221
- monthLongTitle: monthsLong[monthValue - 1],
222
- year: yearValue,
223
- nextMonthLabel: nextMonthLabel,
224
- previousMonthLabel: previousMonthLabel,
225
- nextMonthHeading: getNextMonthHeading(),
226
- nextYearHeading: getNextYearHeading(),
227
- previousMonthHeading: getPreviousMonthHeading(),
228
- previousYearHeading: getPreviousYearHeading(),
229
- handleClickNextMonth: handleClickNextMonth,
230
- handleClickNextYear: handleClickNextYear,
231
- handleClickPrevMonth: handleClickPrevMonth,
232
- handleClickPrevYear: handleClickPrevYear,
233
- headerId: headerId,
234
- tabIndex: tabIndex,
235
- testId: testId
236
- }), /*#__PURE__*/React.createElement(Box, {
237
- role: "grid",
238
- onKeyDown: handleContainerKeyDown,
239
- "aria-labelledby": headerId,
240
- testId: testId && "".concat(testId, "--calendar-dates")
241
- }, /*#__PURE__*/React.createElement(WeekHeaderComponent, {
242
- daysShort: daysShort,
243
- testId: testId
244
- }), /*#__PURE__*/React.createElement(WeekDaysComponent, {
245
- weeks: weeks,
246
- handleClickDay: handleClickDay,
247
- monthsLong: monthsLong,
248
- shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
249
- tabIndex: tabIndex,
250
- testId: testId
251
- })))))
252
- );
197
+ return /*#__PURE__*/React.createElement("div", {
198
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
199
+ className: className
200
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
201
+ ,
202
+ style: style,
203
+ onBlur: handleContainerBlur,
204
+ onFocus: handleContainerFocus,
205
+ "data-testid": testId && "".concat(testId, "--container"),
206
+ ref: ref
207
+ }, /*#__PURE__*/React.createElement(Box, {
208
+ xcss: styles.box,
209
+ padding: "space.200",
210
+ "aria-label": "calendar",
211
+ testId: testId && "".concat(testId, "--calendar")
212
+ }, /*#__PURE__*/React.createElement(Stack, {
213
+ space: "space.150"
214
+ }, /*#__PURE__*/React.createElement(Header
215
+ // The month number needs to be translated to index in the month
216
+ // name array e.g. 1 (January) -> 0
217
+ , {
218
+ monthLongTitle: monthsLong[monthValue - 1],
219
+ year: yearValue,
220
+ nextMonthLabel: nextMonthLabel,
221
+ previousMonthLabel: previousMonthLabel,
222
+ nextMonthHeading: getNextMonthHeading(),
223
+ nextYearHeading: getNextYearHeading(),
224
+ previousMonthHeading: getPreviousMonthHeading(),
225
+ previousYearHeading: getPreviousYearHeading(),
226
+ handleClickNextMonth: handleClickNextMonth,
227
+ handleClickNextYear: handleClickNextYear,
228
+ handleClickPrevMonth: handleClickPrevMonth,
229
+ handleClickPrevYear: handleClickPrevYear,
230
+ headerId: headerId,
231
+ tabIndex: tabIndex,
232
+ testId: testId
233
+ }), /*#__PURE__*/React.createElement(Box, {
234
+ role: "grid",
235
+ onKeyDown: handleContainerKeyDown,
236
+ "aria-labelledby": headerId,
237
+ testId: testId && "".concat(testId, "--calendar-dates")
238
+ }, /*#__PURE__*/React.createElement(WeekHeaderComponent, {
239
+ daysShort: daysShort,
240
+ testId: testId
241
+ }), /*#__PURE__*/React.createElement(WeekDaysComponent, {
242
+ weeks: weeks,
243
+ handleClickDay: handleClickDay,
244
+ monthsLong: monthsLong,
245
+ shouldSetFocus: shouldSetFocus || shouldSetFocusOnCurrentDay,
246
+ tabIndex: tabIndex,
247
+ testId: testId
248
+ })))));
253
249
  });
254
250
 
255
251
  /**
@@ -28,6 +28,7 @@ function useGetCalendarWithSixthWeek(calendar, _ref) {
28
28
  });
29
29
  });
30
30
  }
31
+ return [];
31
32
  }, [calendarLastValue, month, shouldDisplaySixthWeek, weekStartDay, year]);
32
33
  }
33
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "17.1.23",
3
+ "version": "17.1.24",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,15 +25,15 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@atlaskit/analytics-next": "^11.1.0",
28
- "@atlaskit/button": "^23.5.0",
28
+ "@atlaskit/button": "^23.6.0",
29
29
  "@atlaskit/css": "^0.15.0",
30
- "@atlaskit/ds-lib": "^5.1.0",
30
+ "@atlaskit/ds-lib": "^5.2.0",
31
31
  "@atlaskit/heading": "^5.2.0",
32
32
  "@atlaskit/icon": "^28.5.0",
33
33
  "@atlaskit/locale": "^3.0.0",
34
- "@atlaskit/primitives": "^16.0.0",
34
+ "@atlaskit/primitives": "^16.1.0",
35
35
  "@atlaskit/theme": "^21.0.0",
36
- "@atlaskit/tokens": "^7.0.0",
36
+ "@atlaskit/tokens": "^8.0.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "@compiled/react": "^0.18.6",
39
39
  "date-fns": "^2.17.0"
@@ -48,11 +48,11 @@
48
48
  "@atlaskit/docs": "^11.2.0",
49
49
  "@atlaskit/form": "^14.2.0",
50
50
  "@atlaskit/link": "^3.2.0",
51
- "@atlaskit/section-message": "^8.7.0",
51
+ "@atlaskit/section-message": "^8.9.0",
52
52
  "@atlaskit/select": "^21.3.0",
53
53
  "@atlaskit/ssr": "workspace:^",
54
- "@atlassian/feature-flags-test-utils": "^0.3.0",
55
- "@atlassian/ssr-tests": "^0.3.0",
54
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
55
+ "@atlassian/ssr-tests": "workspace:^",
56
56
  "@testing-library/react": "^13.4.0",
57
57
  "@testing-library/user-event": "^14.4.3",
58
58
  "jest-in-case": "^1.0.2",