@atlaskit/calendar 13.3.0 → 13.3.1

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,11 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 13.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`75b9f4664c6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/75b9f4664c6) - [ux] Hide weekday header row from assistive technologies.
8
+
3
9
  ## 13.3.0
4
10
 
5
11
  ### Minor Changes
@@ -35,7 +35,7 @@ var boxStyles = (0, _primitives.xcss)({
35
35
  var analyticsAttributes = {
36
36
  componentName: 'calendar',
37
37
  packageName: "@atlaskit/calendar",
38
- packageVersion: "13.3.0"
38
+ packageVersion: "13.3.1"
39
39
  };
40
40
  var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
41
41
  var day = _ref.day,
@@ -16,16 +16,16 @@ var _primitives = require("@atlaskit/primitives");
16
16
  */
17
17
  var WeekDayGrid = function WeekDayGrid(_ref) {
18
18
  var testId = _ref.testId,
19
- children = _ref.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
- );
19
+ children = _ref.children,
20
+ isHidden = _ref.isHidden;
21
+ var row = (0, _react.jsx)(_primitives.Grid, {
22
+ testId: testId,
23
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
24
+ role: "row"
25
+ }, children);
26
+ return isHidden ? (0, _react.jsx)("div", {
27
+ "aria-hidden": "true"
28
+ }, row) : row;
29
29
  };
30
30
  var _default = WeekDayGrid;
31
31
  exports.default = _default;
@@ -26,10 +26,10 @@ var WeekHeader = /*#__PURE__*/(0, _react.memo)(function WeekHeader(_ref) {
26
26
  var daysShort = _ref.daysShort,
27
27
  testId = _ref.testId;
28
28
  return (0, _react2.jsx)(_weekDayGrid.default, {
29
+ isHidden: true,
29
30
  testId: testId && "".concat(testId, "--column-headers")
30
31
  }, daysShort.map(function (shortDay) {
31
32
  return (0, _react2.jsx)(_primitives.Box, {
32
- "aria-hidden": "true",
33
33
  padding: "space.100",
34
34
  xcss: columnHeaderStyles,
35
35
  key: shortDay,
@@ -25,7 +25,7 @@ const boxStyles = xcss({
25
25
  const analyticsAttributes = {
26
26
  componentName: 'calendar',
27
27
  packageName: "@atlaskit/calendar",
28
- packageVersion: "13.3.0"
28
+ packageVersion: "13.3.1"
29
29
  };
30
30
  const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
31
31
  day,
@@ -10,13 +10,16 @@ import { Grid } from '@atlaskit/primitives';
10
10
  */
11
11
  const WeekDayGrid = ({
12
12
  testId,
13
- children
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, {
18
- testId: testId,
19
- templateColumns: "repeat(7, minmax(max-content, 1fr))",
20
- role: "row"
21
- }, children);
13
+ children,
14
+ isHidden
15
+ }) => {
16
+ const row = jsx(Grid, {
17
+ testId: testId,
18
+ templateColumns: "repeat(7, minmax(max-content, 1fr))",
19
+ role: "row"
20
+ }, children);
21
+ return isHidden ? jsx("div", {
22
+ "aria-hidden": "true"
23
+ }, row) : row;
24
+ };
22
25
  export default WeekDayGrid;
@@ -19,9 +19,9 @@ const WeekHeader = /*#__PURE__*/memo(function WeekHeader({
19
19
  testId
20
20
  }) {
21
21
  return jsx(WeekDayGrid, {
22
+ isHidden: true,
22
23
  testId: testId && `${testId}--column-headers`
23
24
  }, daysShort.map(shortDay => jsx(Box, {
24
- "aria-hidden": "true",
25
25
  padding: "space.100",
26
26
  xcss: columnHeaderStyles,
27
27
  key: shortDay,
@@ -29,7 +29,7 @@ var boxStyles = xcss({
29
29
  var analyticsAttributes = {
30
30
  componentName: 'calendar',
31
31
  packageName: "@atlaskit/calendar",
32
- packageVersion: "13.3.0"
32
+ packageVersion: "13.3.1"
33
33
  };
34
34
  var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
35
35
  var day = _ref.day,
@@ -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;
@@ -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.1",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,8 +30,8 @@
30
30
  "@atlaskit/heading": "^1.3.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",
33
+ "@atlaskit/primitives": "^1.3.0",
34
+ "@atlaskit/theme": "^12.6.0",
35
35
  "@atlaskit/tokens": "^1.18.0",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "@emotion/react": "^11.7.1",