@atlaskit/calendar 16.2.0 → 16.2.2
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 +16 -0
- package/dist/cjs/calendar.js +1 -1
- package/dist/es2019/calendar.js +1 -1
- package/dist/esm/calendar.js +1 -1
- package/dist/types/internal/types.d.ts +2 -1
- package/dist/types-ts4.5/internal/types.d.ts +2 -1
- package/package.json +9 -5
- package/__perf__/default.tsx +0 -5
- package/__perf__/examples.tsx +0 -76
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/calendar
|
|
2
2
|
|
|
3
|
+
## 16.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#105146](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105146)
|
|
8
|
+
[`c5f6c2695a300`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c5f6c2695a300) -
|
|
9
|
+
Update dev dependencies and clean up unused internal exports.
|
|
10
|
+
|
|
11
|
+
## 16.2.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#103999](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103999)
|
|
16
|
+
[`9f62ecec4d422`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f62ecec4d422) -
|
|
17
|
+
Update dependencies.
|
|
18
|
+
|
|
3
19
|
## 16.2.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/calendar.js
CHANGED
|
@@ -38,7 +38,7 @@ var styles = {
|
|
|
38
38
|
var analyticsAttributes = {
|
|
39
39
|
componentName: 'calendar',
|
|
40
40
|
packageName: "@atlaskit/calendar",
|
|
41
|
-
packageVersion: "16.2.
|
|
41
|
+
packageVersion: "16.2.2"
|
|
42
42
|
};
|
|
43
43
|
var InnerCalendar = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
|
|
44
44
|
var day = _ref.day,
|
package/dist/es2019/calendar.js
CHANGED
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: "16.2.
|
|
31
|
+
packageVersion: "16.2.2"
|
|
32
32
|
};
|
|
33
33
|
var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
34
34
|
var day = _ref.day,
|
|
@@ -5,7 +5,7 @@ export type DateObj = {
|
|
|
5
5
|
month: number;
|
|
6
6
|
year: number;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
interface WeekDayState {
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
isFocused: boolean;
|
|
11
11
|
isToday: boolean;
|
|
@@ -25,3 +25,4 @@ export interface CalendarDate extends DateObj {
|
|
|
25
25
|
siblingMonth?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export type ISODate = string;
|
|
28
|
+
export {};
|
|
@@ -5,7 +5,7 @@ export type DateObj = {
|
|
|
5
5
|
month: number;
|
|
6
6
|
year: number;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
interface WeekDayState {
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
isFocused: boolean;
|
|
11
11
|
isToday: boolean;
|
|
@@ -25,3 +25,4 @@ export interface CalendarDate extends DateObj {
|
|
|
25
25
|
siblingMonth?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export type ISODate = string;
|
|
28
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/calendar",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.2",
|
|
4
4
|
"description": "An interactive calendar for date selection experiences.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@atlaskit/css": "^0.7.0",
|
|
31
31
|
"@atlaskit/ds-lib": "^3.3.0",
|
|
32
32
|
"@atlaskit/heading": "^4.0.0",
|
|
33
|
-
"@atlaskit/icon": "^23.
|
|
33
|
+
"@atlaskit/icon": "^23.4.0",
|
|
34
34
|
"@atlaskit/locale": "^2.8.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "*",
|
|
36
36
|
"@atlaskit/primitives": "^13.3.0",
|
|
37
37
|
"@atlaskit/theme": "^14.0.0",
|
|
38
|
-
"@atlaskit/tokens": "^3.
|
|
38
|
+
"@atlaskit/tokens": "^3.2.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@compiled/react": "^0.18.1",
|
|
41
41
|
"date-fns": "^2.17.0"
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"@af/accessibility-testing": "*",
|
|
48
48
|
"@af/integration-testing": "*",
|
|
49
49
|
"@af/visual-regression": "*",
|
|
50
|
+
"@atlaskit/docs": "*",
|
|
51
|
+
"@atlaskit/form": "^11.0.2",
|
|
52
|
+
"@atlaskit/link": "*",
|
|
53
|
+
"@atlaskit/section-message": "*",
|
|
54
|
+
"@atlaskit/select": "^18.9.3",
|
|
50
55
|
"@atlaskit/ssr": "*",
|
|
51
56
|
"@atlaskit/visual-regression": "*",
|
|
52
57
|
"@atlassian/feature-flags-test-utils": "*",
|
|
@@ -57,8 +62,7 @@
|
|
|
57
62
|
"jscodeshift": "^0.13.0",
|
|
58
63
|
"react-dom": "^16.8.0",
|
|
59
64
|
"storybook-addon-performance": "^0.17.3",
|
|
60
|
-
"typescript": "~5.4.2"
|
|
61
|
-
"wait-for-expect": "^1.2.0"
|
|
65
|
+
"typescript": "~5.4.2"
|
|
62
66
|
},
|
|
63
67
|
"techstack": {
|
|
64
68
|
"@atlassian/frontend": {
|
package/__perf__/default.tsx
DELETED
package/__perf__/examples.tsx
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { fireEvent } from '@testing-library/dom';
|
|
4
|
-
import { userEvent } from '@testing-library/user-event';
|
|
5
|
-
import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance';
|
|
6
|
-
|
|
7
|
-
import Calendar from '../src';
|
|
8
|
-
|
|
9
|
-
const testId = 'calendar-test-id';
|
|
10
|
-
|
|
11
|
-
const getLastElement = (container: HTMLElement, testIdAttributeValue: string) => {
|
|
12
|
-
const elements = container.querySelectorAll(`[data-testId="${testIdAttributeValue}"]`);
|
|
13
|
-
return elements[elements.length - 1];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const CalendarPerformance = () => {
|
|
17
|
-
return (
|
|
18
|
-
<Calendar
|
|
19
|
-
disabled={['2020-12-04']}
|
|
20
|
-
defaultPreviouslySelected={['2020-12-06']}
|
|
21
|
-
defaultSelected={['2020-12-18']}
|
|
22
|
-
defaultMonth={12}
|
|
23
|
-
defaultYear={2020}
|
|
24
|
-
testId={testId}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const interactionTasks: PublicInteractionTask[] = [
|
|
30
|
-
{
|
|
31
|
-
name: 'onFocus',
|
|
32
|
-
description: 'Render calendar and focus on it',
|
|
33
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
34
|
-
const calendarContainer = getLastElement(container, `${testId}--container`);
|
|
35
|
-
fireEvent.focus(calendarContainer);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'onBlur',
|
|
40
|
-
description: 'Render calendar and remove focus',
|
|
41
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
42
|
-
const calendarContainer = getLastElement(container, `${testId}--container`);
|
|
43
|
-
fireEvent.focus(calendarContainer);
|
|
44
|
-
fireEvent.blur(calendarContainer);
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'onChange',
|
|
49
|
-
description: 'Render calendar and change month',
|
|
50
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
51
|
-
const user = userEvent.setup();
|
|
52
|
-
const nextMonthButton = getLastElement(container, `${testId}--next-month`);
|
|
53
|
-
await user.click(nextMonthButton);
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'onSelect',
|
|
58
|
-
description: 'Render calendar and click on day(date) cell',
|
|
59
|
-
run: async ({ container }: InteractionTaskArgs): Promise<void> => {
|
|
60
|
-
const user = userEvent.setup();
|
|
61
|
-
const dateCell = getLastElement(container, `${testId}--selected-day`);
|
|
62
|
-
await user.click(dateCell);
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
CalendarPerformance.story = {
|
|
68
|
-
name: 'calendar',
|
|
69
|
-
parameters: {
|
|
70
|
-
performance: {
|
|
71
|
-
interactions: interactionTasks,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default CalendarPerformance;
|