@atlaskit/calendar 13.0.4 → 13.0.6

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.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`842bb999a85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/842bb999a85) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
8
+
9
+ ## 13.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`1fc7949b336`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1fc7949b336) - [ux] Fixes a bug where the background for the calendar element was incorrectly set to 'elevation.surface'
14
+
3
15
  ## 13.0.4
4
16
 
5
17
  ### Patch Changes
@@ -12,8 +12,8 @@ var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
13
  var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
14
14
  var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
15
- var _stack = _interopRequireDefault(require("@atlaskit/ds-explorations/stack"));
16
15
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
16
+ var _stack = _interopRequireDefault(require("@atlaskit/primitives/stack"));
17
17
  var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
18
18
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
19
19
  var _header = _interopRequireDefault(require("./internal/components/header"));
@@ -33,7 +33,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
33
33
  var analyticsAttributes = {
34
34
  componentName: 'calendar',
35
35
  packageName: "@atlaskit/calendar",
36
- packageVersion: "13.0.4"
36
+ packageVersion: "13.0.6"
37
37
  };
38
38
  var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
39
39
  var day = _ref.day,
@@ -174,7 +174,6 @@ var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_re
174
174
  return (0, _react2.jsx)(_box.default, {
175
175
  className: className,
176
176
  UNSAFE_style: style,
177
- backgroundColor: "elevation.surface",
178
177
  onBlur: handleContainerBlur,
179
178
  onFocus: handleContainerFocus,
180
179
  onKeyDown: handleContainerKeyDown,
@@ -196,7 +195,7 @@ var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_re
196
195
  role: "grid",
197
196
  tabIndex: tabIndex
198
197
  }, (0, _react2.jsx)(_stack.default, {
199
- gap: "space.150"
198
+ space: "150"
200
199
  }, (0, _react2.jsx)(_header.default
201
200
  // The month number needs to be translated to index in the month
202
201
  // name array e.g. 1 (January) -> 0
@@ -62,26 +62,23 @@ 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 (
66
- // eslint-disable-next-line @repo/internal/react/use-primitives
67
- (0, _react2.jsx)("button", {
68
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
69
- css: dateCellStyles,
70
- "aria-selected": isSelected ? 'true' : 'false',
71
- tabIndex: isSelected ? 0 : -1,
72
- type: "button",
73
- role: "gridcell",
74
- onClick: handleClick,
75
- ref: ref,
76
- "data-disabled": isDisabled || undefined,
77
- "data-focused": isFocused || undefined,
78
- "data-prev-selected": isPreviouslySelected || undefined,
79
- "data-selected": isSelected || undefined,
80
- "data-sibling": isSibling || undefined,
81
- "data-today": isToday || undefined,
82
- "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
83
- }, day)
84
- );
65
+ return (0, _react2.jsx)("button", {
66
+ // eslint-disable-next-line @repo/internal/react/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);
85
82
  }));
86
83
  Date.displayName = 'Date';
87
84
 
@@ -9,10 +9,10 @@ var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
10
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
11
11
  var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
12
- var _inline = _interopRequireDefault(require("@atlaskit/ds-explorations/inline"));
13
12
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
14
13
  var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-left-large"));
15
14
  var _chevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right-large"));
15
+ var _inline = _interopRequireDefault(require("@atlaskit/primitives/inline"));
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
  /** @jsx jsx */
18
18
 
@@ -31,9 +31,9 @@ var Header = /*#__PURE__*/(0, _react.memo)(function Header(_ref) {
31
31
  paddingInline: "space.100",
32
32
  "aria-hidden": "true"
33
33
  }, (0, _react2.jsx)(_inline.default, {
34
- gap: "space.0",
35
- alignItems: "center",
36
- justifyContent: "space-between"
34
+ space: "0",
35
+ alignBlock: "center",
36
+ spread: "space-between"
37
37
  }, (0, _react2.jsx)(_standardButton.default, {
38
38
  appearance: "subtle",
39
39
  spacing: "none",
@@ -20,13 +20,10 @@ var gridStyles = (0, _react.css)({
20
20
  var WeekDayGrid = function WeekDayGrid(_ref) {
21
21
  var testId = _ref.testId,
22
22
  children = _ref.children;
23
- return (
24
- // eslint-disable-next-line @repo/internal/react/use-primitives
25
- (0, _react.jsx)("div", {
26
- "data-testid": testId,
27
- css: gridStyles
28
- }, children)
29
- );
23
+ return (0, _react.jsx)("div", {
24
+ "data-testid": testId,
25
+ css: gridStyles
26
+ }, children);
30
27
  };
31
28
  var _default = WeekDayGrid;
32
29
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -4,8 +4,8 @@ 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 Box from '@atlaskit/ds-explorations/box';
7
- import Stack from '@atlaskit/ds-explorations/stack';
8
7
  import noop from '@atlaskit/ds-lib/noop';
8
+ import Stack from '@atlaskit/primitives/stack';
9
9
  import GlobalTheme from '@atlaskit/theme/components';
10
10
  import VisuallyHidden from '@atlaskit/visually-hidden';
11
11
  import Header from './internal/components/header';
@@ -23,7 +23,7 @@ import useUniqueId from './internal/hooks/use-unique-id';
23
23
  const analyticsAttributes = {
24
24
  componentName: 'calendar',
25
25
  packageName: "@atlaskit/calendar",
26
- packageVersion: "13.0.4"
26
+ packageVersion: "13.0.6"
27
27
  };
28
28
  const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
29
29
  day,
@@ -146,7 +146,6 @@ const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
146
146
  return jsx(Box, {
147
147
  className: className,
148
148
  UNSAFE_style: style,
149
- backgroundColor: "elevation.surface",
150
149
  onBlur: handleContainerBlur,
151
150
  onFocus: handleContainerFocus,
152
151
  onKeyDown: handleContainerKeyDown,
@@ -168,7 +167,7 @@ const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
168
167
  role: "grid",
169
168
  tabIndex: tabIndex
170
169
  }, jsx(Stack, {
171
- gap: "space.150"
170
+ space: "150"
172
171
  }, jsx(Header
173
172
  // The month number needs to be translated to index in the month
174
173
  // name array e.g. 1 (January) -> 0
@@ -47,26 +47,23 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
47
47
  }
48
48
  }, [onClick]);
49
49
  const dateCellStyles = useMemo(() => css(getDateCellStyles(mode)), [mode]);
50
- return (
51
- // eslint-disable-next-line @repo/internal/react/use-primitives
52
- jsx("button", {
53
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
54
- css: dateCellStyles,
55
- "aria-selected": isSelected ? 'true' : 'false',
56
- tabIndex: isSelected ? 0 : -1,
57
- type: "button",
58
- role: "gridcell",
59
- onClick: handleClick,
60
- ref: ref,
61
- "data-disabled": isDisabled || undefined,
62
- "data-focused": isFocused || undefined,
63
- "data-prev-selected": isPreviouslySelected || undefined,
64
- "data-selected": isSelected || undefined,
65
- "data-sibling": isSibling || undefined,
66
- "data-today": isToday || undefined,
67
- "data-testid": testId && isSelected ? `${testId}--selected-day` : undefined
68
- }, day)
69
- );
50
+ return jsx("button", {
51
+ // eslint-disable-next-line @repo/internal/react/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);
70
67
  }));
71
68
  Date.displayName = 'Date';
72
69
 
@@ -3,10 +3,10 @@ import { memo } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import Button from '@atlaskit/button/standard-button';
5
5
  import Box from '@atlaskit/ds-explorations/box';
6
- import Inline from '@atlaskit/ds-explorations/inline';
7
6
  import Heading from '@atlaskit/heading';
8
7
  import ArrowleftIcon from '@atlaskit/icon/glyph/chevron-left-large';
9
8
  import ArrowrightIcon from '@atlaskit/icon/glyph/chevron-right-large';
9
+ import Inline from '@atlaskit/primitives/inline';
10
10
  import { N70 } from '@atlaskit/theme/colors';
11
11
  const Header = /*#__PURE__*/memo(function Header({
12
12
  monthLongTitle,
@@ -22,9 +22,9 @@ const Header = /*#__PURE__*/memo(function Header({
22
22
  paddingInline: "space.100",
23
23
  "aria-hidden": "true"
24
24
  }, jsx(Inline, {
25
- gap: "space.0",
26
- alignItems: "center",
27
- justifyContent: "space-between"
25
+ space: "0",
26
+ alignBlock: "center",
27
+ spread: "space-between"
28
28
  }, jsx(Button, {
29
29
  appearance: "subtle",
30
30
  spacing: "none",
@@ -14,9 +14,7 @@ const gridStyles = css({
14
14
  const WeekDayGrid = ({
15
15
  testId,
16
16
  children
17
- }) =>
18
- // eslint-disable-next-line @repo/internal/react/use-primitives
19
- jsx("div", {
17
+ }) => jsx("div", {
20
18
  "data-testid": testId,
21
19
  css: gridStyles
22
20
  }, children);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -8,8 +8,8 @@ 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 Box from '@atlaskit/ds-explorations/box';
11
- import Stack from '@atlaskit/ds-explorations/stack';
12
11
  import noop from '@atlaskit/ds-lib/noop';
12
+ import Stack from '@atlaskit/primitives/stack';
13
13
  import GlobalTheme from '@atlaskit/theme/components';
14
14
  import VisuallyHidden from '@atlaskit/visually-hidden';
15
15
  import Header from './internal/components/header';
@@ -27,7 +27,7 @@ import useUniqueId from './internal/hooks/use-unique-id';
27
27
  var analyticsAttributes = {
28
28
  componentName: 'calendar',
29
29
  packageName: "@atlaskit/calendar",
30
- packageVersion: "13.0.4"
30
+ packageVersion: "13.0.6"
31
31
  };
32
32
  var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
33
33
  var day = _ref.day,
@@ -168,7 +168,6 @@ var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
168
168
  return jsx(Box, {
169
169
  className: className,
170
170
  UNSAFE_style: style,
171
- backgroundColor: "elevation.surface",
172
171
  onBlur: handleContainerBlur,
173
172
  onFocus: handleContainerFocus,
174
173
  onKeyDown: handleContainerKeyDown,
@@ -190,7 +189,7 @@ var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
190
189
  role: "grid",
191
190
  tabIndex: tabIndex
192
191
  }, jsx(Stack, {
193
- gap: "space.150"
192
+ space: "150"
194
193
  }, jsx(Header
195
194
  // The month number needs to be translated to index in the month
196
195
  // name array e.g. 1 (January) -> 0
@@ -54,26 +54,23 @@ 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 (
58
- // eslint-disable-next-line @repo/internal/react/use-primitives
59
- jsx("button", {
60
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
61
- css: dateCellStyles,
62
- "aria-selected": isSelected ? 'true' : 'false',
63
- tabIndex: isSelected ? 0 : -1,
64
- type: "button",
65
- role: "gridcell",
66
- onClick: handleClick,
67
- ref: ref,
68
- "data-disabled": isDisabled || undefined,
69
- "data-focused": isFocused || undefined,
70
- "data-prev-selected": isPreviouslySelected || undefined,
71
- "data-selected": isSelected || undefined,
72
- "data-sibling": isSibling || undefined,
73
- "data-today": isToday || undefined,
74
- "data-testid": testId && isSelected ? "".concat(testId, "--selected-day") : undefined
75
- }, day)
76
- );
57
+ return jsx("button", {
58
+ // eslint-disable-next-line @repo/internal/react/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);
77
74
  }));
78
75
  Date.displayName = 'Date';
79
76
 
@@ -3,10 +3,10 @@ import { memo } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import Button from '@atlaskit/button/standard-button';
5
5
  import Box from '@atlaskit/ds-explorations/box';
6
- import Inline from '@atlaskit/ds-explorations/inline';
7
6
  import Heading from '@atlaskit/heading';
8
7
  import ArrowleftIcon from '@atlaskit/icon/glyph/chevron-left-large';
9
8
  import ArrowrightIcon from '@atlaskit/icon/glyph/chevron-right-large';
9
+ import Inline from '@atlaskit/primitives/inline';
10
10
  import { N70 } from '@atlaskit/theme/colors';
11
11
  var Header = /*#__PURE__*/memo(function Header(_ref) {
12
12
  var monthLongTitle = _ref.monthLongTitle,
@@ -23,9 +23,9 @@ var Header = /*#__PURE__*/memo(function Header(_ref) {
23
23
  paddingInline: "space.100",
24
24
  "aria-hidden": "true"
25
25
  }, jsx(Inline, {
26
- gap: "space.0",
27
- alignItems: "center",
28
- justifyContent: "space-between"
26
+ space: "0",
27
+ alignBlock: "center",
28
+ spread: "space-between"
29
29
  }, jsx(Button, {
30
30
  appearance: "subtle",
31
31
  spacing: "none",
@@ -14,12 +14,9 @@ var gridStyles = css({
14
14
  var WeekDayGrid = function WeekDayGrid(_ref) {
15
15
  var testId = _ref.testId,
16
16
  children = _ref.children;
17
- return (
18
- // eslint-disable-next-line @repo/internal/react/use-primitives
19
- jsx("div", {
20
- "data-testid": testId,
21
- css: gridStyles
22
- }, children)
23
- );
17
+ return jsx("div", {
18
+ "data-testid": testId,
19
+ css: gridStyles
20
+ }, children);
24
21
  };
25
22
  export default WeekDayGrid;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,6 @@
15
15
  "sideEffects": false,
16
16
  "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
- "disableProductCI": true,
19
18
  "team": "Design System Team",
20
19
  "releaseModel": "scheduled",
21
20
  "website": {
@@ -31,6 +30,7 @@
31
30
  "@atlaskit/heading": "^1.0.2",
32
31
  "@atlaskit/icon": "^21.11.0",
33
32
  "@atlaskit/locale": "^2.3.0",
33
+ "@atlaskit/primitives": "^0.3.0",
34
34
  "@atlaskit/theme": "^12.2.0",
35
35
  "@atlaskit/tokens": "^1.2.0",
36
36
  "@atlaskit/visually-hidden": "^1.1.0",