@atlaskit/calendar 13.1.14 → 13.1.16

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,17 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 13.1.16
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1ed303de3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ed303de3e8) - Updated dependencies
8
+
9
+ ## 13.1.15
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3fadbb8bf73`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fadbb8bf73) - Internal changes.
14
+
3
15
  ## 13.1.14
4
16
 
5
17
  ### Patch Changes
@@ -13,8 +13,6 @@ var _react2 = require("@emotion/react");
13
13
  var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
14
14
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
15
15
  var _primitives = require("@atlaskit/primitives");
16
- var _box = _interopRequireDefault(require("@atlaskit/primitives/box"));
17
- var _stack = _interopRequireDefault(require("@atlaskit/primitives/stack"));
18
16
  var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
19
17
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
20
18
  var _header = _interopRequireDefault(require("./internal/components/header"));
@@ -38,7 +36,7 @@ var boxStyles = (0, _primitives.xcss)({
38
36
  var analyticsAttributes = {
39
37
  componentName: 'calendar',
40
38
  packageName: "@atlaskit/calendar",
41
- packageVersion: "13.1.14"
39
+ packageVersion: "13.1.16"
42
40
  };
43
41
  var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
44
42
  var day = _ref.day,
@@ -190,14 +188,14 @@ var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_re
190
188
  id: announceId,
191
189
  "aria-live": "assertive",
192
190
  "aria-relevant": "text"
193
- }, announcerDate)), (0, _react2.jsx)(_box.default, {
191
+ }, announcerDate)), (0, _react2.jsx)(_primitives.Box, {
194
192
  xcss: boxStyles,
195
193
  padding: "space.200",
196
194
  "aria-describedby": announceId,
197
195
  "aria-label": "calendar",
198
196
  tabIndex: tabIndex,
199
197
  testId: testId && "".concat(testId, "--calendar")
200
- }, (0, _react2.jsx)(_stack.default, {
198
+ }, (0, _react2.jsx)(_primitives.Stack, {
201
199
  space: "space.150"
202
200
  }, (0, _react2.jsx)(_header.default
203
201
  // The month number needs to be translated to index in the month
@@ -211,7 +209,7 @@ var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_re
211
209
  handleClickPrev: handleClickPrev,
212
210
  mode: mode,
213
211
  testId: testId
214
- }), (0, _react2.jsx)(_box.default, {
212
+ }), (0, _react2.jsx)(_primitives.Box, {
215
213
  role: "grid"
216
214
  }, (0, _react2.jsx)(_weekHeader.default, {
217
215
  daysShort: daysShort,
@@ -62,23 +62,28 @@ var Date = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
62
62
  var dateCellStyles = (0, _react.useMemo)(function () {
63
63
  return (0, _react2.css)((0, _date.dateCellStyles)(mode));
64
64
  }, [mode]);
65
- return (0, _react2.jsx)("button", {
66
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
67
- css: dateCellStyles,
68
- "aria-selected": isSelected ? 'true' : 'false',
69
- tabIndex: isSelected ? 0 : -1,
70
- type: "button",
71
- role: "gridcell",
72
- onClick: handleClick,
73
- ref: ref,
74
- "data-disabled": isDisabled || undefined,
75
- "data-focused": isFocused || undefined,
76
- "data-prev-selected": isPreviouslySelected || undefined,
77
- "data-selected": isSelected || undefined,
78
- "data-sibling": isSibling || undefined,
79
- "data-today": isToday || undefined,
80
- "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
81
- }, day);
65
+ return (
66
+ // TODO: Determine if there is a better way to render the button (should
67
+ // be fixed with introduction of keyboard accessibility of Calendar in
68
+ // DSP-9939) (DSP-11588)
69
+ (0, _react2.jsx)("button", {
70
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
71
+ css: dateCellStyles,
72
+ "aria-selected": isSelected ? 'true' : 'false',
73
+ tabIndex: isSelected ? 0 : -1,
74
+ type: "button",
75
+ role: "gridcell",
76
+ onClick: handleClick,
77
+ ref: ref,
78
+ "data-disabled": isDisabled || undefined,
79
+ "data-focused": isFocused || undefined,
80
+ "data-prev-selected": isPreviouslySelected || undefined,
81
+ "data-selected": isSelected || undefined,
82
+ "data-sibling": isSibling || undefined,
83
+ "data-today": isToday || undefined,
84
+ "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
85
+ }, day)
86
+ );
82
87
  }));
83
88
  Date.displayName = 'Date';
84
89
 
@@ -8,10 +8,6 @@ var _react = require("@emotion/react");
8
8
  var _primitives = require("@atlaskit/primitives");
9
9
  /** @jsx jsx */
10
10
 
11
- var gridStyles = (0, _primitives.xcss)({
12
- display: 'grid',
13
- gridTemplateColumns: 'repeat(7, minmax(max-content, 1fr))'
14
- });
15
11
  /**
16
12
  * __Week day grid__
17
13
  *
@@ -21,11 +17,15 @@ var gridStyles = (0, _primitives.xcss)({
21
17
  var WeekDayGrid = function WeekDayGrid(_ref) {
22
18
  var testId = _ref.testId,
23
19
  children = _ref.children;
24
- return (0, _react.jsx)(_primitives.Box, {
25
- testId: testId,
26
- xcss: gridStyles,
27
- role: "row"
28
- }, children);
20
+ return (
21
+ // TODO: Determine if there is a better way to render the row (should be
22
+ // fixed with introduction of keyboard accessibility of Calendar in DSP-9939) (DSP-11588)
23
+ (0, _react.jsx)(_primitives.Grid, {
24
+ testId: testId,
25
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
26
+ role: "row"
27
+ }, children)
28
+ );
29
29
  };
30
30
  var _default = WeekDayGrid;
31
31
  exports.default = _default;
@@ -17,30 +17,35 @@ var WeekDays = /*#__PURE__*/(0, _react.memo)(function WeekDays(_ref) {
17
17
  handleClickDay = _ref.handleClickDay,
18
18
  mode = _ref.mode,
19
19
  testId = _ref.testId;
20
- return (0, _react2.jsx)(_box.default, {
21
- role: "rowgroup",
22
- testId: testId && "".concat(testId, "--month")
23
- }, weeks.map(function (week, i) {
24
- return (0, _react2.jsx)(_weekDayGrid.default, {
25
- key: i,
26
- testId: testId && "".concat(testId, "--week")
27
- }, week.values.map(function (weekDay) {
28
- return (0, _react2.jsx)(_date.default, {
29
- key: "".concat(week.id, "-").concat(weekDay.id),
30
- isDisabled: weekDay.isDisabled,
31
- isFocused: weekDay.isFocused,
32
- isToday: weekDay.isToday,
33
- month: weekDay.month,
34
- onClick: handleClickDay,
35
- isPreviouslySelected: weekDay.isPreviouslySelected,
36
- isSelected: weekDay.isSelected,
37
- isSibling: weekDay.isSiblingMonth,
38
- year: weekDay.year,
39
- mode: mode,
40
- testId: testId
41
- }, weekDay.day);
42
- }));
43
- }));
20
+ return (
21
+ // TODO: Determine if there is a better way to render the button (should be
22
+ // fixed with introduction of keyboard accessibility of Calendar in
23
+ // DSP-9939) (DSP-11588)
24
+ (0, _react2.jsx)(_box.default, {
25
+ role: "rowgroup",
26
+ testId: testId && "".concat(testId, "--month")
27
+ }, weeks.map(function (week, i) {
28
+ return (0, _react2.jsx)(_weekDayGrid.default, {
29
+ key: i,
30
+ testId: testId && "".concat(testId, "--week")
31
+ }, week.values.map(function (weekDay) {
32
+ return (0, _react2.jsx)(_date.default, {
33
+ key: "".concat(week.id, "-").concat(weekDay.id),
34
+ isDisabled: weekDay.isDisabled,
35
+ isFocused: weekDay.isFocused,
36
+ isToday: weekDay.isToday,
37
+ month: weekDay.month,
38
+ onClick: handleClickDay,
39
+ isPreviouslySelected: weekDay.isPreviouslySelected,
40
+ isSelected: weekDay.isSelected,
41
+ isSibling: weekDay.isSiblingMonth,
42
+ year: weekDay.year,
43
+ mode: mode,
44
+ testId: testId
45
+ }, weekDay.day);
46
+ }));
47
+ }))
48
+ );
44
49
  });
45
50
  WeekDays.displayName = 'WeekDays';
46
51
 
@@ -28,17 +28,22 @@ var WeekHeader = /*#__PURE__*/(0, _react.memo)(function WeekHeader(_ref) {
28
28
  return (0, _react2.jsx)(_weekDayGrid.default, {
29
29
  testId: testId && "".concat(testId, "--column-headers")
30
30
  }, daysShort.map(function (shortDay) {
31
- return (0, _react2.jsx)(_primitives.Box, {
32
- padding: "space.100",
33
- xcss: columnHeaderStyles,
34
- key: shortDay,
35
- role: "columnheader"
36
- }, (0, _react2.jsx)(_text.default, {
37
- fontWeight: "bold",
38
- fontSize: "size.050",
39
- verticalAlign: "middle",
40
- textTransform: "uppercase"
41
- }, shortDay));
31
+ return (
32
+ // TODO: Determine if there is a better way to render the button
33
+ // (should be fixed with introduction of keyboard accessibility of
34
+ // Calendar in DSP-9939) (DSP-11588)
35
+ (0, _react2.jsx)(_primitives.Box, {
36
+ padding: "space.100",
37
+ xcss: columnHeaderStyles,
38
+ key: shortDay,
39
+ role: "columnheader"
40
+ }, (0, _react2.jsx)(_text.default, {
41
+ fontWeight: "bold",
42
+ fontSize: "size.050",
43
+ verticalAlign: "middle",
44
+ textTransform: "uppercase"
45
+ }, shortDay))
46
+ );
42
47
  }));
43
48
  });
44
49
  WeekHeader.displayName = 'WeekHeader';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.14",
3
+ "version": "13.1.16",
4
4
  "sideEffects": false
5
5
  }
@@ -4,9 +4,7 @@ import { forwardRef, memo, useMemo } from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
6
6
  import noop from '@atlaskit/ds-lib/noop';
7
- import { xcss } from '@atlaskit/primitives';
8
- import Box from '@atlaskit/primitives/box';
9
- import Stack from '@atlaskit/primitives/stack';
7
+ import { Box, Stack, xcss } from '@atlaskit/primitives';
10
8
  import GlobalTheme from '@atlaskit/theme/components';
11
9
  import VisuallyHidden from '@atlaskit/visually-hidden';
12
10
  import Header from './internal/components/header';
@@ -28,7 +26,7 @@ const boxStyles = xcss({
28
26
  const analyticsAttributes = {
29
27
  componentName: 'calendar',
30
28
  packageName: "@atlaskit/calendar",
31
- packageVersion: "13.1.14"
29
+ packageVersion: "13.1.16"
32
30
  };
33
31
  const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
34
32
  day,
@@ -47,23 +47,28 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
47
47
  }
48
48
  }, [onClick]);
49
49
  const dateCellStyles = useMemo(() => css(getDateCellStyles(mode)), [mode]);
50
- return jsx("button", {
51
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
52
- css: dateCellStyles,
53
- "aria-selected": isSelected ? 'true' : 'false',
54
- tabIndex: isSelected ? 0 : -1,
55
- type: "button",
56
- role: "gridcell",
57
- onClick: handleClick,
58
- ref: ref,
59
- "data-disabled": isDisabled || undefined,
60
- "data-focused": isFocused || undefined,
61
- "data-prev-selected": isPreviouslySelected || undefined,
62
- "data-selected": isSelected || undefined,
63
- "data-sibling": isSibling || undefined,
64
- "data-today": isToday || undefined,
65
- "data-testid": testId && isSelected ? `${testId}--selected-day` : undefined
66
- }, day);
50
+ return (
51
+ // TODO: Determine if there is a better way to render the button (should
52
+ // be fixed with introduction of keyboard accessibility of Calendar in
53
+ // DSP-9939) (DSP-11588)
54
+ jsx("button", {
55
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
56
+ css: dateCellStyles,
57
+ "aria-selected": isSelected ? 'true' : 'false',
58
+ tabIndex: isSelected ? 0 : -1,
59
+ type: "button",
60
+ role: "gridcell",
61
+ onClick: handleClick,
62
+ ref: ref,
63
+ "data-disabled": isDisabled || undefined,
64
+ "data-focused": isFocused || undefined,
65
+ "data-prev-selected": isPreviouslySelected || undefined,
66
+ "data-selected": isSelected || undefined,
67
+ "data-sibling": isSibling || undefined,
68
+ "data-today": isToday || undefined,
69
+ "data-testid": testId && isSelected ? `${testId}--selected-day` : undefined
70
+ }, day)
71
+ );
67
72
  }));
68
73
  Date.displayName = 'Date';
69
74
 
@@ -1,11 +1,7 @@
1
1
  /** @jsx jsx */
2
2
 
3
3
  import { jsx } from '@emotion/react';
4
- import { Box, xcss } from '@atlaskit/primitives';
5
- const gridStyles = xcss({
6
- display: 'grid',
7
- gridTemplateColumns: 'repeat(7, minmax(max-content, 1fr))'
8
- });
4
+ import { Grid } from '@atlaskit/primitives';
9
5
  /**
10
6
  * __Week day grid__
11
7
  *
@@ -15,9 +11,12 @@ const gridStyles = xcss({
15
11
  const WeekDayGrid = ({
16
12
  testId,
17
13
  children
18
- }) => jsx(Box, {
14
+ }) =>
15
+ // TODO: Determine if there is a better way to render the row (should be
16
+ // fixed with introduction of keyboard accessibility of Calendar in DSP-9939) (DSP-11588)
17
+ jsx(Grid, {
19
18
  testId: testId,
20
- xcss: gridStyles,
19
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
21
20
  role: "row"
22
21
  }, children);
23
22
  export default WeekDayGrid;
@@ -10,26 +10,31 @@ const WeekDays = /*#__PURE__*/memo(function WeekDays({
10
10
  mode,
11
11
  testId
12
12
  }) {
13
- return jsx(Box, {
14
- role: "rowgroup",
15
- testId: testId && `${testId}--month`
16
- }, weeks.map((week, i) => jsx(WeekdayGrid, {
17
- key: i,
18
- testId: testId && `${testId}--week`
19
- }, week.values.map(weekDay => jsx(DateComponent, {
20
- key: `${week.id}-${weekDay.id}`,
21
- isDisabled: weekDay.isDisabled,
22
- isFocused: weekDay.isFocused,
23
- isToday: weekDay.isToday,
24
- month: weekDay.month,
25
- onClick: handleClickDay,
26
- isPreviouslySelected: weekDay.isPreviouslySelected,
27
- isSelected: weekDay.isSelected,
28
- isSibling: weekDay.isSiblingMonth,
29
- year: weekDay.year,
30
- mode: mode,
31
- testId: testId
32
- }, weekDay.day)))));
13
+ return (
14
+ // TODO: Determine if there is a better way to render the button (should be
15
+ // fixed with introduction of keyboard accessibility of Calendar in
16
+ // DSP-9939) (DSP-11588)
17
+ jsx(Box, {
18
+ role: "rowgroup",
19
+ testId: testId && `${testId}--month`
20
+ }, weeks.map((week, i) => jsx(WeekdayGrid, {
21
+ key: i,
22
+ testId: testId && `${testId}--week`
23
+ }, week.values.map(weekDay => jsx(DateComponent, {
24
+ key: `${week.id}-${weekDay.id}`,
25
+ isDisabled: weekDay.isDisabled,
26
+ isFocused: weekDay.isFocused,
27
+ isToday: weekDay.isToday,
28
+ month: weekDay.month,
29
+ onClick: handleClickDay,
30
+ isPreviouslySelected: weekDay.isPreviouslySelected,
31
+ isSelected: weekDay.isSelected,
32
+ isSibling: weekDay.isSiblingMonth,
33
+ year: weekDay.year,
34
+ mode: mode,
35
+ testId: testId
36
+ }, weekDay.day)))))
37
+ );
33
38
  });
34
39
  WeekDays.displayName = 'WeekDays';
35
40
 
@@ -20,7 +20,11 @@ const WeekHeader = /*#__PURE__*/memo(function WeekHeader({
20
20
  }) {
21
21
  return jsx(WeekDayGrid, {
22
22
  testId: testId && `${testId}--column-headers`
23
- }, daysShort.map(shortDay => jsx(Box, {
23
+ }, daysShort.map(shortDay =>
24
+ // TODO: Determine if there is a better way to render the button
25
+ // (should be fixed with introduction of keyboard accessibility of
26
+ // Calendar in DSP-9939) (DSP-11588)
27
+ jsx(Box, {
24
28
  padding: "space.100",
25
29
  xcss: columnHeaderStyles,
26
30
  key: shortDay,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.14",
3
+ "version": "13.1.16",
4
4
  "sideEffects": false
5
5
  }
@@ -8,9 +8,7 @@ import { forwardRef, memo, useMemo } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
10
10
  import noop from '@atlaskit/ds-lib/noop';
11
- import { xcss } from '@atlaskit/primitives';
12
- import Box from '@atlaskit/primitives/box';
13
- import Stack from '@atlaskit/primitives/stack';
11
+ import { Box, Stack, xcss } from '@atlaskit/primitives';
14
12
  import GlobalTheme from '@atlaskit/theme/components';
15
13
  import VisuallyHidden from '@atlaskit/visually-hidden';
16
14
  import Header from './internal/components/header';
@@ -32,7 +30,7 @@ var boxStyles = xcss({
32
30
  var analyticsAttributes = {
33
31
  componentName: 'calendar',
34
32
  packageName: "@atlaskit/calendar",
35
- packageVersion: "13.1.14"
33
+ packageVersion: "13.1.16"
36
34
  };
37
35
  var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
38
36
  var day = _ref.day,
@@ -54,23 +54,28 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref, ref) {
54
54
  var dateCellStyles = useMemo(function () {
55
55
  return css(getDateCellStyles(mode));
56
56
  }, [mode]);
57
- return jsx("button", {
58
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
59
- css: dateCellStyles,
60
- "aria-selected": isSelected ? 'true' : 'false',
61
- tabIndex: isSelected ? 0 : -1,
62
- type: "button",
63
- role: "gridcell",
64
- onClick: handleClick,
65
- ref: ref,
66
- "data-disabled": isDisabled || undefined,
67
- "data-focused": isFocused || undefined,
68
- "data-prev-selected": isPreviouslySelected || undefined,
69
- "data-selected": isSelected || undefined,
70
- "data-sibling": isSibling || undefined,
71
- "data-today": isToday || undefined,
72
- "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
73
- }, day);
57
+ return (
58
+ // TODO: Determine if there is a better way to render the button (should
59
+ // be fixed with introduction of keyboard accessibility of Calendar in
60
+ // DSP-9939) (DSP-11588)
61
+ jsx("button", {
62
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
63
+ css: dateCellStyles,
64
+ "aria-selected": isSelected ? 'true' : 'false',
65
+ tabIndex: isSelected ? 0 : -1,
66
+ type: "button",
67
+ role: "gridcell",
68
+ onClick: handleClick,
69
+ ref: ref,
70
+ "data-disabled": isDisabled || undefined,
71
+ "data-focused": isFocused || undefined,
72
+ "data-prev-selected": isPreviouslySelected || undefined,
73
+ "data-selected": isSelected || undefined,
74
+ "data-sibling": isSibling || undefined,
75
+ "data-today": isToday || undefined,
76
+ "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
77
+ }, day)
78
+ );
74
79
  }));
75
80
  Date.displayName = 'Date';
76
81
 
@@ -1,11 +1,7 @@
1
1
  /** @jsx jsx */
2
2
 
3
3
  import { jsx } from '@emotion/react';
4
- import { Box, xcss } from '@atlaskit/primitives';
5
- var gridStyles = xcss({
6
- display: 'grid',
7
- gridTemplateColumns: 'repeat(7, minmax(max-content, 1fr))'
8
- });
4
+ import { Grid } from '@atlaskit/primitives';
9
5
  /**
10
6
  * __Week day grid__
11
7
  *
@@ -15,10 +11,14 @@ var gridStyles = xcss({
15
11
  var WeekDayGrid = function WeekDayGrid(_ref) {
16
12
  var testId = _ref.testId,
17
13
  children = _ref.children;
18
- return jsx(Box, {
19
- testId: testId,
20
- xcss: gridStyles,
21
- role: "row"
22
- }, children);
14
+ return (
15
+ // TODO: Determine if there is a better way to render the row (should be
16
+ // fixed with introduction of keyboard accessibility of Calendar in DSP-9939) (DSP-11588)
17
+ jsx(Grid, {
18
+ testId: testId,
19
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
20
+ role: "row"
21
+ }, children)
22
+ );
23
23
  };
24
24
  export default WeekDayGrid;
@@ -9,30 +9,35 @@ var WeekDays = /*#__PURE__*/memo(function WeekDays(_ref) {
9
9
  handleClickDay = _ref.handleClickDay,
10
10
  mode = _ref.mode,
11
11
  testId = _ref.testId;
12
- return jsx(Box, {
13
- role: "rowgroup",
14
- testId: testId && "".concat(testId, "--month")
15
- }, weeks.map(function (week, i) {
16
- return jsx(WeekdayGrid, {
17
- key: i,
18
- testId: testId && "".concat(testId, "--week")
19
- }, week.values.map(function (weekDay) {
20
- return jsx(DateComponent, {
21
- key: "".concat(week.id, "-").concat(weekDay.id),
22
- isDisabled: weekDay.isDisabled,
23
- isFocused: weekDay.isFocused,
24
- isToday: weekDay.isToday,
25
- month: weekDay.month,
26
- onClick: handleClickDay,
27
- isPreviouslySelected: weekDay.isPreviouslySelected,
28
- isSelected: weekDay.isSelected,
29
- isSibling: weekDay.isSiblingMonth,
30
- year: weekDay.year,
31
- mode: mode,
32
- testId: testId
33
- }, weekDay.day);
34
- }));
35
- }));
12
+ return (
13
+ // TODO: Determine if there is a better way to render the button (should be
14
+ // fixed with introduction of keyboard accessibility of Calendar in
15
+ // DSP-9939) (DSP-11588)
16
+ jsx(Box, {
17
+ role: "rowgroup",
18
+ testId: testId && "".concat(testId, "--month")
19
+ }, weeks.map(function (week, i) {
20
+ return jsx(WeekdayGrid, {
21
+ key: i,
22
+ testId: testId && "".concat(testId, "--week")
23
+ }, week.values.map(function (weekDay) {
24
+ return jsx(DateComponent, {
25
+ key: "".concat(week.id, "-").concat(weekDay.id),
26
+ isDisabled: weekDay.isDisabled,
27
+ isFocused: weekDay.isFocused,
28
+ isToday: weekDay.isToday,
29
+ month: weekDay.month,
30
+ onClick: handleClickDay,
31
+ isPreviouslySelected: weekDay.isPreviouslySelected,
32
+ isSelected: weekDay.isSelected,
33
+ isSibling: weekDay.isSiblingMonth,
34
+ year: weekDay.year,
35
+ mode: mode,
36
+ testId: testId
37
+ }, weekDay.day);
38
+ }));
39
+ }))
40
+ );
36
41
  });
37
42
  WeekDays.displayName = 'WeekDays';
38
43
 
@@ -20,17 +20,22 @@ var WeekHeader = /*#__PURE__*/memo(function WeekHeader(_ref) {
20
20
  return jsx(WeekDayGrid, {
21
21
  testId: testId && "".concat(testId, "--column-headers")
22
22
  }, daysShort.map(function (shortDay) {
23
- return jsx(Box, {
24
- padding: "space.100",
25
- xcss: columnHeaderStyles,
26
- key: shortDay,
27
- role: "columnheader"
28
- }, jsx(Text, {
29
- fontWeight: "bold",
30
- fontSize: "size.050",
31
- verticalAlign: "middle",
32
- textTransform: "uppercase"
33
- }, shortDay));
23
+ return (
24
+ // TODO: Determine if there is a better way to render the button
25
+ // (should be fixed with introduction of keyboard accessibility of
26
+ // Calendar in DSP-9939) (DSP-11588)
27
+ jsx(Box, {
28
+ padding: "space.100",
29
+ xcss: columnHeaderStyles,
30
+ key: shortDay,
31
+ role: "columnheader"
32
+ }, jsx(Text, {
33
+ fontWeight: "bold",
34
+ fontSize: "size.050",
35
+ verticalAlign: "middle",
36
+ textTransform: "uppercase"
37
+ }, shortDay))
38
+ );
34
39
  }));
35
40
  });
36
41
  WeekHeader.displayName = 'WeekHeader';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.14",
3
+ "version": "13.1.16",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.14",
3
+ "version": "13.1.16",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
- "team": "Design System Team",
26
+ "team": "Design System Fundamentals",
27
27
  "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Calendar",
@@ -38,9 +38,9 @@
38
38
  "@atlaskit/heading": "^1.3.0",
39
39
  "@atlaskit/icon": "^21.12.0",
40
40
  "@atlaskit/locale": "^2.5.0",
41
- "@atlaskit/primitives": "^1.0.0",
41
+ "@atlaskit/primitives": "^1.0.6",
42
42
  "@atlaskit/theme": "^12.5.0",
43
- "@atlaskit/tokens": "^1.11.0",
43
+ "@atlaskit/tokens": "^1.13.0",
44
44
  "@atlaskit/visually-hidden": "^1.2.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@emotion/react": "^11.7.1",
@@ -94,4 +94,4 @@
94
94
  },
95
95
  "homepage": "https://atlassian.design/components/calendar/",
96
96
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
97
- }
97
+ }