@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.
- package/CHANGELOG.md +77 -65
- package/codemods/utils.tsx +2 -1
- package/dist/cjs/calendar.js +51 -55
- package/dist/cjs/internal/components/date.js +1 -2
- package/dist/cjs/internal/components/header.js +1 -2
- package/dist/cjs/internal/components/week-day-grid.js +11 -12
- package/dist/cjs/internal/components/week-days.js +29 -35
- package/dist/cjs/internal/components/week-header.js +2 -3
- package/dist/cjs/internal/constants.js +4 -8
- package/dist/cjs/internal/styles/date.js +2 -3
- package/dist/es2019/calendar.js +50 -53
- package/dist/es2019/internal/components/week-day-grid.js +12 -9
- package/dist/es2019/internal/components/week-days.js +24 -29
- package/dist/es2019/internal/components/week-header.js +1 -1
- package/dist/esm/calendar.js +50 -53
- package/dist/esm/internal/components/week-day-grid.js +10 -10
- package/dist/esm/internal/components/week-days.js +28 -33
- package/dist/esm/internal/components/week-header.js +1 -1
- package/dist/types/internal/components/week-day-grid.d.ts +2 -1
- package/dist/types-ts4.5/internal/components/week-day-grid.d.ts +2 -1
- package/package.json +7 -7
|
@@ -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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
jsx(
|
|
20
|
-
|
|
21
|
-
testId: testId && "".concat(testId, "--
|
|
22
|
-
},
|
|
23
|
-
return jsx(
|
|
24
|
-
key:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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.
|
|
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.
|
|
28
|
-
"@atlaskit/ds-explorations": "^
|
|
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.
|
|
30
|
+
"@atlaskit/heading": "^1.4.0",
|
|
31
31
|
"@atlaskit/icon": "^21.12.0",
|
|
32
32
|
"@atlaskit/locale": "^2.5.0",
|
|
33
|
-
"@atlaskit/primitives": "^1.
|
|
34
|
-
"@atlaskit/theme": "^12.
|
|
35
|
-
"@atlaskit/tokens": "^1.
|
|
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",
|