@atlaskit/calendar 13.3.0 → 13.3.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.
@@ -10,15 +10,15 @@ import { Grid } from '@atlaskit/primitives';
10
10
  */
11
11
  var WeekDayGrid = function WeekDayGrid(_ref) {
12
12
  var testId = _ref.testId,
13
- children = _ref.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
- );
13
+ children = _ref.children,
14
+ isHidden = _ref.isHidden;
15
+ var row = jsx(Grid, {
16
+ testId: testId,
17
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
18
+ role: "row"
19
+ }, children);
20
+ return isHidden ? jsx("div", {
21
+ "aria-hidden": "true"
22
+ }, row) : row;
23
23
  };
24
24
  export default WeekDayGrid;
@@ -12,39 +12,34 @@ var WeekDays = /*#__PURE__*/memo(function WeekDays(_ref) {
12
12
  shouldSetFocus = _ref.shouldSetFocus,
13
13
  tabIndex = _ref.tabIndex,
14
14
  testId = _ref.testId;
15
- return (
16
- // TODO: Determine if there is a better way to render the button (should be
17
- // fixed with introduction of keyboard accessibility of Calendar in
18
- // DSP-9939) (DSP-11588)
19
- jsx(Box, {
20
- role: "rowgroup",
21
- testId: testId && "".concat(testId, "--month")
22
- }, weeks.map(function (week, i) {
23
- return jsx(WeekdayGrid, {
24
- key: i,
25
- testId: testId && "".concat(testId, "--week")
26
- }, week.values.map(function (weekDay) {
27
- return jsx(DateComponent, {
28
- key: "".concat(week.id, "-").concat(weekDay.id),
29
- isDisabled: weekDay.isDisabled,
30
- isFocused: weekDay.isFocused,
31
- isToday: weekDay.isToday,
32
- dayLong: weekDay.weekDayName,
33
- month: weekDay.month,
34
- monthLong: monthsLong[weekDay.month - 1],
35
- onClick: handleClickDay,
36
- isPreviouslySelected: weekDay.isPreviouslySelected,
37
- isSelected: weekDay.isSelected,
38
- isSibling: weekDay.isSiblingMonth,
39
- year: weekDay.year,
40
- mode: mode,
41
- shouldSetFocus: shouldSetFocus,
42
- tabIndex: tabIndex,
43
- testId: testId
44
- }, weekDay.day);
45
- }));
46
- }))
47
- );
15
+ return jsx(Box, {
16
+ role: "rowgroup",
17
+ testId: testId && "".concat(testId, "--month")
18
+ }, weeks.map(function (week, i) {
19
+ return jsx(WeekdayGrid, {
20
+ key: i,
21
+ testId: testId && "".concat(testId, "--week")
22
+ }, week.values.map(function (weekDay) {
23
+ return jsx(DateComponent, {
24
+ key: "".concat(week.id, "-").concat(weekDay.id),
25
+ isDisabled: weekDay.isDisabled,
26
+ isFocused: weekDay.isFocused,
27
+ isToday: weekDay.isToday,
28
+ dayLong: weekDay.weekDayName,
29
+ month: weekDay.month,
30
+ monthLong: monthsLong[weekDay.month - 1],
31
+ onClick: handleClickDay,
32
+ isPreviouslySelected: weekDay.isPreviouslySelected,
33
+ isSelected: weekDay.isSelected,
34
+ isSibling: weekDay.isSiblingMonth,
35
+ year: weekDay.year,
36
+ mode: mode,
37
+ shouldSetFocus: shouldSetFocus,
38
+ tabIndex: tabIndex,
39
+ testId: testId
40
+ }, weekDay.day);
41
+ }));
42
+ }));
48
43
  });
49
44
  WeekDays.displayName = 'WeekDays';
50
45
 
@@ -18,10 +18,10 @@ var WeekHeader = /*#__PURE__*/memo(function WeekHeader(_ref) {
18
18
  var daysShort = _ref.daysShort,
19
19
  testId = _ref.testId;
20
20
  return jsx(WeekDayGrid, {
21
+ isHidden: true,
21
22
  testId: testId && "".concat(testId, "--column-headers")
22
23
  }, daysShort.map(function (shortDay) {
23
24
  return jsx(Box, {
24
- "aria-hidden": "true",
25
25
  padding: "space.100",
26
26
  xcss: columnHeaderStyles,
27
27
  key: shortDay,
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
4
4
  interface WeekDayGridProps extends React.HTMLAttributes<HTMLElement> {
5
5
  testId?: string;
6
6
  children: ReactNode;
7
+ isHidden?: boolean;
7
8
  }
8
9
  /**
9
10
  * __Week day grid__
@@ -11,5 +12,5 @@ interface WeekDayGridProps extends React.HTMLAttributes<HTMLElement> {
11
12
  * A week day grid aligns elements in a 7 wide grid layout.
12
13
  *
13
14
  */
14
- declare const WeekDayGrid: ({ testId, children }: WeekDayGridProps) => jsx.JSX.Element;
15
+ declare const WeekDayGrid: ({ testId, children, isHidden }: WeekDayGridProps) => jsx.JSX.Element;
15
16
  export default WeekDayGrid;
@@ -4,6 +4,7 @@ import { jsx } from '@emotion/react';
4
4
  interface WeekDayGridProps extends React.HTMLAttributes<HTMLElement> {
5
5
  testId?: string;
6
6
  children: ReactNode;
7
+ isHidden?: boolean;
7
8
  }
8
9
  /**
9
10
  * __Week day grid__
@@ -11,5 +12,5 @@ interface WeekDayGridProps extends React.HTMLAttributes<HTMLElement> {
11
12
  * A week day grid aligns elements in a 7 wide grid layout.
12
13
  *
13
14
  */
14
- declare const WeekDayGrid: ({ testId, children }: WeekDayGridProps) => jsx.JSX.Element;
15
+ declare const WeekDayGrid: ({ testId, children, isHidden }: WeekDayGridProps) => jsx.JSX.Element;
15
16
  export default WeekDayGrid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.3.0",
3
+ "version": "13.3.2",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,15 +24,15 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@atlaskit/analytics-next": "^9.1.0",
27
- "@atlaskit/button": "^16.9.0",
28
- "@atlaskit/ds-explorations": "^2.2.0",
27
+ "@atlaskit/button": "^16.10.0",
28
+ "@atlaskit/ds-explorations": "^3.0.0",
29
29
  "@atlaskit/ds-lib": "^2.2.0",
30
- "@atlaskit/heading": "^1.3.0",
30
+ "@atlaskit/heading": "^1.4.0",
31
31
  "@atlaskit/icon": "^21.12.0",
32
32
  "@atlaskit/locale": "^2.5.0",
33
- "@atlaskit/primitives": "^1.2.0",
34
- "@atlaskit/theme": "^12.5.0",
35
- "@atlaskit/tokens": "^1.18.0",
33
+ "@atlaskit/primitives": "^1.6.0",
34
+ "@atlaskit/theme": "^12.6.0",
35
+ "@atlaskit/tokens": "^1.25.0",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "@emotion/react": "^11.7.1",
38
38
  "date-fns": "^2.17.0",