@atlaskit/calendar 12.1.0 → 12.1.4

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,30 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 12.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 12.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`192d35cfdbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/192d35cfdbd) - Defaults native button usage to type="button" to prevent unintended submittig of forms.
14
+ - [`f7d71a9ba09`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f7d71a9ba09) - Replaces visually hidden styles in component to instead use '@atlaskit/visually-hidden'.
15
+
16
+ ## 12.1.2
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
22
+ ## 12.1.1
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies
27
+
3
28
  ## 12.1.0
4
29
 
5
30
  ### Minor Changes
@@ -27,6 +27,8 @@ var _components = _interopRequireDefault(require("@atlaskit/theme/components"));
27
27
 
28
28
  var _tokens = require("@atlaskit/tokens");
29
29
 
30
+ var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
31
+
30
32
  var _heading = _interopRequireDefault(require("./internal/components/heading"));
31
33
 
32
34
  var _weekDays = _interopRequireDefault(require("./internal/components/week-days"));
@@ -80,20 +82,10 @@ var gridsContainerStyles = (0, _core.css)({
80
82
  marginBottom: 5,
81
83
  textAlign: 'center'
82
84
  });
83
- var announcerStyles = (0, _core.css)({
84
- width: 1,
85
- height: 1,
86
- margin: -1,
87
- padding: 0,
88
- position: 'absolute',
89
- border: 0,
90
- clip: 'rect(0 0 0 0)',
91
- overflow: 'hidden'
92
- });
93
85
  var analyticsAttributes = {
94
86
  componentName: 'calendar',
95
87
  packageName: "@atlaskit/calendar",
96
- packageVersion: "12.1.0"
88
+ packageVersion: "12.1.4"
97
89
  };
98
90
  var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
99
91
  var day = _ref.day,
@@ -244,12 +236,11 @@ var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_re
244
236
  role: "presentation",
245
237
  "data-testid": testId && "".concat(testId, "--container"),
246
238
  ref: ref
247
- }, (0, _core.jsx)("div", {
248
- css: announcerStyles,
239
+ }, (0, _core.jsx)(_visuallyHidden.default, null, (0, _core.jsx)("span", {
249
240
  id: announceId,
250
241
  "aria-live": "assertive",
251
242
  "aria-relevant": "text"
252
- }, announcerDate), (0, _core.jsx)("div", {
243
+ }, announcerDate)), (0, _core.jsx)("div", {
253
244
  css: !mode || mode === 'light' ? lightWrapperStyles : darkWrapperStyles,
254
245
  "aria-describedby": announceId,
255
246
  "aria-label": "calendar",
@@ -73,6 +73,7 @@ var Date = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
73
73
  css: dateCellStyles,
74
74
  "aria-selected": isSelected ? 'true' : 'false',
75
75
  tabIndex: isSelected ? 0 : -1,
76
+ type: "button",
76
77
  role: "gridcell",
77
78
  onClick: handleClick,
78
79
  ref: ref,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "12.1.0",
3
+ "version": "12.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -8,6 +8,7 @@ import noop from '@atlaskit/ds-lib/noop';
8
8
  import { DN600, N0, N700, N900 } from '@atlaskit/theme/colors';
9
9
  import GlobalTheme from '@atlaskit/theme/components';
10
10
  import { token } from '@atlaskit/tokens';
11
+ import VisuallyHidden from '@atlaskit/visually-hidden';
11
12
  import HeadingComponent from './internal/components/heading';
12
13
  import WeekDaysComponent from './internal/components/week-days';
13
14
  import WeekHeaderComponent from './internal/components/week-header';
@@ -45,20 +46,10 @@ const gridsContainerStyles = css({
45
46
  marginBottom: 5,
46
47
  textAlign: 'center'
47
48
  });
48
- const announcerStyles = css({
49
- width: 1,
50
- height: 1,
51
- margin: -1,
52
- padding: 0,
53
- position: 'absolute',
54
- border: 0,
55
- clip: 'rect(0 0 0 0)',
56
- overflow: 'hidden'
57
- });
58
49
  const analyticsAttributes = {
59
50
  componentName: 'calendar',
60
51
  packageName: "@atlaskit/calendar",
61
- packageVersion: "12.1.0"
52
+ packageVersion: "12.1.4"
62
53
  };
63
54
  const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
64
55
  day,
@@ -184,12 +175,11 @@ const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
184
175
  role: "presentation",
185
176
  "data-testid": testId && `${testId}--container`,
186
177
  ref: ref
187
- }, jsx("div", {
188
- css: announcerStyles,
178
+ }, jsx(VisuallyHidden, null, jsx("span", {
189
179
  id: announceId,
190
180
  "aria-live": "assertive",
191
181
  "aria-relevant": "text"
192
- }, announcerDate), jsx("div", {
182
+ }, announcerDate)), jsx("div", {
193
183
  css: !mode || mode === 'light' ? lightWrapperStyles : darkWrapperStyles,
194
184
  "aria-describedby": announceId,
195
185
  "aria-label": "calendar",
@@ -53,6 +53,7 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
53
53
  css: dateCellStyles,
54
54
  "aria-selected": isSelected ? 'true' : 'false',
55
55
  tabIndex: isSelected ? 0 : -1,
56
+ type: "button",
56
57
  role: "gridcell",
57
58
  onClick: handleClick,
58
59
  ref: ref,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "12.1.0",
3
+ "version": "12.1.4",
4
4
  "sideEffects": false
5
5
  }
@@ -14,6 +14,7 @@ import noop from '@atlaskit/ds-lib/noop';
14
14
  import { DN600, N0, N700, N900 } from '@atlaskit/theme/colors';
15
15
  import GlobalTheme from '@atlaskit/theme/components';
16
16
  import { token } from '@atlaskit/tokens';
17
+ import VisuallyHidden from '@atlaskit/visually-hidden';
17
18
  import HeadingComponent from './internal/components/heading';
18
19
  import WeekDaysComponent from './internal/components/week-days';
19
20
  import WeekHeaderComponent from './internal/components/week-header';
@@ -51,20 +52,10 @@ var gridsContainerStyles = css({
51
52
  marginBottom: 5,
52
53
  textAlign: 'center'
53
54
  });
54
- var announcerStyles = css({
55
- width: 1,
56
- height: 1,
57
- margin: -1,
58
- padding: 0,
59
- position: 'absolute',
60
- border: 0,
61
- clip: 'rect(0 0 0 0)',
62
- overflow: 'hidden'
63
- });
64
55
  var analyticsAttributes = {
65
56
  componentName: 'calendar',
66
57
  packageName: "@atlaskit/calendar",
67
- packageVersion: "12.1.0"
58
+ packageVersion: "12.1.4"
68
59
  };
69
60
  var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
70
61
  var day = _ref.day,
@@ -215,12 +206,11 @@ var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
215
206
  role: "presentation",
216
207
  "data-testid": testId && "".concat(testId, "--container"),
217
208
  ref: ref
218
- }, jsx("div", {
219
- css: announcerStyles,
209
+ }, jsx(VisuallyHidden, null, jsx("span", {
220
210
  id: announceId,
221
211
  "aria-live": "assertive",
222
212
  "aria-relevant": "text"
223
- }, announcerDate), jsx("div", {
213
+ }, announcerDate)), jsx("div", {
224
214
  css: !mode || mode === 'light' ? lightWrapperStyles : darkWrapperStyles,
225
215
  "aria-describedby": announceId,
226
216
  "aria-label": "calendar",
@@ -60,6 +60,7 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref, ref) {
60
60
  css: dateCellStyles,
61
61
  "aria-selected": isSelected ? 'true' : 'false',
62
62
  tabIndex: isSelected ? 0 : -1,
63
+ type: "button",
63
64
  role: "gridcell",
64
65
  onClick: handleClick,
65
66
  ref: ref,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "12.1.0",
3
+ "version": "12.1.4",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "12.1.0",
3
+ "version": "12.1.4",
4
4
  "description": "A React component for displaying a calendar.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,10 +26,11 @@
26
26
  "@atlaskit/analytics-next": "^8.2.0",
27
27
  "@atlaskit/button": "^16.1.0",
28
28
  "@atlaskit/ds-lib": "^1.3.0",
29
- "@atlaskit/icon": "^21.7.0",
29
+ "@atlaskit/icon": "^21.9.0",
30
30
  "@atlaskit/locale": "^2.3.0",
31
- "@atlaskit/theme": "^11.4.0",
32
- "@atlaskit/tokens": "^0.1.0",
31
+ "@atlaskit/theme": "^12.0.0",
32
+ "@atlaskit/tokens": "^0.3.0",
33
+ "@atlaskit/visually-hidden": "^0.1.1",
33
34
  "@babel/runtime": "^7.0.0",
34
35
  "@emotion/core": "^10.0.9",
35
36
  "date-fns": "^2.17.0",