@atlaskit/calendar 17.1.22 → 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 +12 -0
- package/dist/cjs/calendar.js +53 -57
- package/dist/cjs/internal/hooks/use-get-weeks.js +1 -0
- package/dist/es2019/calendar.js +53 -57
- package/dist/es2019/internal/hooks/use-get-weeks.js +1 -0
- package/dist/esm/calendar.js +53 -57
- package/dist/esm/internal/hooks/use-get-weeks.js +1 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
package/dist/cjs/calendar.js
CHANGED
|
@@ -37,7 +37,7 @@ var styles = {
|
|
|
37
37
|
var analyticsAttributes = {
|
|
38
38
|
componentName: 'calendar',
|
|
39
39
|
packageName: "@atlaskit/calendar",
|
|
40
|
-
packageVersion: "17.1.
|
|
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
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
/**
|
package/dist/es2019/calendar.js
CHANGED
|
@@ -24,7 +24,7 @@ const styles = {
|
|
|
24
24
|
const analyticsAttributes = {
|
|
25
25
|
componentName: 'calendar',
|
|
26
26
|
packageName: "@atlaskit/calendar",
|
|
27
|
-
packageVersion: "17.1.
|
|
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
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
/**
|
package/dist/esm/calendar.js
CHANGED
|
@@ -28,7 +28,7 @@ var styles = {
|
|
|
28
28
|
var analyticsAttributes = {
|
|
29
29
|
componentName: 'calendar',
|
|
30
30
|
packageName: "@atlaskit/calendar",
|
|
31
|
-
packageVersion: "17.1.
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/calendar",
|
|
3
|
-
"version": "17.1.
|
|
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.
|
|
28
|
+
"@atlaskit/button": "^23.6.0",
|
|
29
29
|
"@atlaskit/css": "^0.15.0",
|
|
30
|
-
"@atlaskit/ds-lib": "^5.
|
|
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": "^
|
|
34
|
+
"@atlaskit/primitives": "^16.1.0",
|
|
35
35
|
"@atlaskit/theme": "^21.0.0",
|
|
36
|
-
"@atlaskit/tokens": "^
|
|
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.
|
|
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.
|
|
55
|
-
"@atlassian/ssr-tests": "
|
|
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",
|