@atlaskit/calendar 16.2.1 → 16.3.0

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,25 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 16.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
8
+ [`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
9
+ Update `React` from v16 to v18
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 16.2.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [#105146](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105146)
20
+ [`c5f6c2695a300`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c5f6c2695a300) -
21
+ Update dev dependencies and clean up unused internal exports.
22
+
3
23
  ## 16.2.1
4
24
 
5
25
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* calendar.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* calendar.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -38,7 +38,7 @@ var styles = {
38
38
  var analyticsAttributes = {
39
39
  componentName: 'calendar',
40
40
  packageName: "@atlaskit/calendar",
41
- packageVersion: "16.2.1"
41
+ packageVersion: "16.3.0"
42
42
  };
43
43
  var InnerCalendar = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
44
44
  var day = _ref.day,
@@ -1,4 +1,4 @@
1
- /* date.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* date.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* week-day-grid.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-day-grid.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* week-header.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-header.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* calendar.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* calendar.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./calendar.compiled.css";
4
4
  import * as React from 'react';
@@ -24,7 +24,7 @@ const styles = {
24
24
  const analyticsAttributes = {
25
25
  componentName: 'calendar',
26
26
  packageName: "@atlaskit/calendar",
27
- packageVersion: "16.2.1"
27
+ packageVersion: "16.3.0"
28
28
  };
29
29
  const InnerCalendar = /*#__PURE__*/forwardRef(function Calendar({
30
30
  day,
@@ -1,4 +1,4 @@
1
- /* date.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* date.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./date.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* week-day-grid.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-day-grid.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./week-day-grid.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* week-header.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-header.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./week-header.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* calendar.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* calendar.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -28,7 +28,7 @@ var styles = {
28
28
  var analyticsAttributes = {
29
29
  componentName: 'calendar',
30
30
  packageName: "@atlaskit/calendar",
31
- packageVersion: "16.2.1"
31
+ packageVersion: "16.3.0"
32
32
  };
33
33
  var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
34
34
  var day = _ref.day,
@@ -1,4 +1,4 @@
1
- /* date.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* date.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./date.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* week-day-grid.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-day-grid.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./week-day-grid.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* week-header.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* week-header.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./week-header.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -9,5 +9,5 @@ import type { CalendarProps } from './types';
9
9
  * - [Code](https://atlassian.design/components/calendar/code)
10
10
  * - [Usage](https://atlassian.design/components/calendar/usage)
11
11
  */
12
- declare const Calendar: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<CalendarProps, "day" | "defaultDay" | "defaultMonth" | "defaultPreviouslySelected" | "defaultSelected" | "defaultYear" | "disabled" | "disabledDateFilter" | "maxDate" | "minDate" | "month" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "onSelect" | "previouslySelected" | "previousMonthLabel" | "selected" | "today" | "year" | "locale" | "analyticsContext" | "weekStartDay" | "testId" | "className" | "style" | "tabIndex" | "shouldSetFocusOnCurrentDay" | "createAnalyticsEvent"> & import("react").RefAttributes<HTMLDivElement>>>;
12
+ declare const Calendar: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
13
13
  export default Calendar;
@@ -5,7 +5,7 @@ export type DateObj = {
5
5
  month: number;
6
6
  year: number;
7
7
  };
8
- export interface WeekDayState {
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 {};
@@ -9,5 +9,5 @@ import type { CalendarProps } from './types';
9
9
  * - [Code](https://atlassian.design/components/calendar/code)
10
10
  * - [Usage](https://atlassian.design/components/calendar/usage)
11
11
  */
12
- declare const Calendar: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<CalendarProps, "day" | "defaultDay" | "defaultMonth" | "defaultPreviouslySelected" | "defaultSelected" | "defaultYear" | "disabled" | "disabledDateFilter" | "maxDate" | "minDate" | "month" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "onSelect" | "previouslySelected" | "previousMonthLabel" | "selected" | "today" | "year" | "locale" | "analyticsContext" | "weekStartDay" | "testId" | "className" | "style" | "tabIndex" | "shouldSetFocusOnCurrentDay" | "createAnalyticsEvent"> & import("react").RefAttributes<HTMLDivElement>>>;
12
+ declare const Calendar: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
13
13
  export default Calendar;
@@ -5,7 +5,7 @@ export type DateObj = {
5
5
  month: number;
6
6
  year: number;
7
7
  };
8
- export interface WeekDayState {
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.1",
3
+ "version": "16.3.0",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,17 +25,17 @@
25
25
  "runReact18": true
26
26
  },
27
27
  "dependencies": {
28
- "@atlaskit/analytics-next": "^10.2.0",
29
- "@atlaskit/button": "^20.3.0",
30
- "@atlaskit/css": "^0.7.0",
31
- "@atlaskit/ds-lib": "^3.3.0",
32
- "@atlaskit/heading": "^4.0.0",
33
- "@atlaskit/icon": "^23.4.0",
28
+ "@atlaskit/analytics-next": "^10.3.0",
29
+ "@atlaskit/button": "^20.4.0",
30
+ "@atlaskit/css": "^0.8.0",
31
+ "@atlaskit/ds-lib": "^3.5.0",
32
+ "@atlaskit/heading": "^4.1.0",
33
+ "@atlaskit/icon": "^23.5.0",
34
34
  "@atlaskit/locale": "^2.8.0",
35
35
  "@atlaskit/platform-feature-flags": "*",
36
- "@atlaskit/primitives": "^13.3.0",
37
- "@atlaskit/theme": "^14.0.0",
38
- "@atlaskit/tokens": "^3.1.0",
36
+ "@atlaskit/primitives": "^13.4.0",
37
+ "@atlaskit/theme": "^14.1.0",
38
+ "@atlaskit/tokens": "^3.3.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@compiled/react": "^0.18.1",
41
41
  "date-fns": "^2.17.0"
@@ -47,15 +47,20 @@
47
47
  "@af/accessibility-testing": "*",
48
48
  "@af/integration-testing": "*",
49
49
  "@af/visual-regression": "*",
50
+ "@atlaskit/docs": "*",
51
+ "@atlaskit/form": "^11.1.0",
52
+ "@atlaskit/link": "*",
53
+ "@atlaskit/section-message": "*",
54
+ "@atlaskit/select": "^18.10.0",
50
55
  "@atlaskit/ssr": "*",
51
56
  "@atlaskit/visual-regression": "*",
52
57
  "@atlassian/feature-flags-test-utils": "*",
53
58
  "@testing-library/dom": "^10.1.0",
54
- "@testing-library/react": "^12.1.5",
59
+ "@testing-library/react": "^13.4.0",
55
60
  "@testing-library/user-event": "^14.4.3",
56
61
  "jest-in-case": "^1.0.2",
57
62
  "jscodeshift": "^0.13.0",
58
- "react-dom": "^16.8.0",
63
+ "react-dom": "^18.2.0",
59
64
  "storybook-addon-performance": "^0.17.3",
60
65
  "typescript": "~5.4.2"
61
66
  },
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- import Calendar from '../src';
4
-
5
- export default () => <Calendar />;
@@ -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;