@atlaskit/calendar 15.1.3 → 16.1.0
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 +26 -0
- package/dist/cjs/calendar.compiled.css +2 -0
- package/dist/cjs/calendar.js +24 -21
- package/dist/cjs/internal/components/date.compiled.css +44 -0
- package/dist/cjs/internal/components/date.js +36 -19
- package/dist/cjs/internal/components/header.js +11 -16
- package/dist/cjs/internal/components/week-day-grid.compiled.css +1 -0
- package/dist/cjs/internal/components/week-day-grid.js +12 -11
- package/dist/cjs/internal/components/week-days.js +7 -12
- package/dist/cjs/internal/components/week-header.compiled.css +4 -0
- package/dist/cjs/internal/components/week-header.js +16 -22
- package/dist/es2019/calendar.compiled.css +2 -0
- package/dist/es2019/calendar.js +19 -22
- package/dist/es2019/internal/components/date.compiled.css +44 -0
- package/dist/es2019/internal/components/date.js +16 -17
- package/dist/es2019/internal/components/header.js +8 -15
- package/dist/es2019/internal/components/week-day-grid.compiled.css +1 -0
- package/dist/es2019/internal/components/week-day-grid.js +11 -10
- package/dist/es2019/internal/components/week-days.js +4 -11
- package/dist/es2019/internal/components/week-header.compiled.css +4 -0
- package/dist/es2019/internal/components/week-header.js +12 -20
- package/dist/esm/calendar.compiled.css +2 -0
- package/dist/esm/calendar.js +19 -22
- package/dist/esm/internal/components/date.compiled.css +44 -0
- package/dist/esm/internal/components/date.js +32 -17
- package/dist/esm/internal/components/header.js +8 -15
- package/dist/esm/internal/components/week-day-grid.compiled.css +1 -0
- package/dist/esm/internal/components/week-day-grid.js +11 -10
- package/dist/esm/internal/components/week-days.js +4 -11
- package/dist/esm/internal/components/week-header.compiled.css +4 -0
- package/dist/esm/internal/components/week-header.js +12 -20
- package/dist/types/internal/components/header.d.ts +2 -2
- package/dist/types/internal/components/week-day-grid.d.ts +2 -7
- package/dist/types/internal/components/week-days.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/header.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/week-day-grid.d.ts +2 -7
- package/dist/types-ts4.5/internal/components/week-days.d.ts +2 -2
- package/package.json +6 -5
- package/dist/cjs/internal/styles/date.js +0 -79
- package/dist/es2019/internal/styles/date.js +0 -71
- package/dist/esm/internal/styles/date.js +0 -73
- package/dist/types/internal/styles/date.d.ts +0 -2
- package/dist/types-ts4.5/internal/styles/date.d.ts +0 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
._kkk2n7od{all:unset}
|
|
3
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
4
|
+
._1yt41qfp{padding:var(--ds-space-050,4px) 9px}
|
|
5
|
+
._2rko1l7b{border-radius:3px}
|
|
6
|
+
._189eyh40{border-width:2px}
|
|
7
|
+
._1dqonqa1{border-style:solid}
|
|
8
|
+
._1h6d1j28{border-color:transparent}
|
|
9
|
+
._16jlkb7n{flex-grow:1}
|
|
10
|
+
._18postnw:after{position:absolute}
|
|
11
|
+
._1czdv77o:after{inset-inline-end:var(--ds-space-025,2px)}
|
|
12
|
+
._1e0c1ule{display:block}
|
|
13
|
+
._1gufv77o:after{inset-block-end:var(--ds-space-025,2px)}
|
|
14
|
+
._1hfk1r31:after{background-color:currentColor}
|
|
15
|
+
._1qdgyh40:after{height:2px}
|
|
16
|
+
._1ywu1ule:after{display:block}
|
|
17
|
+
._80om13gf{cursor:not-allowed}
|
|
18
|
+
._80omtlke{cursor:pointer}
|
|
19
|
+
._aetrb3bt:after{content:""}
|
|
20
|
+
._bfhk18uv{background-color:initial}
|
|
21
|
+
._bfhk1p4p{background-color:var(--ds-background-selected,#42526e)}
|
|
22
|
+
._bfhk29zg{background-color:var(--ds-background-selected,#deebff)}
|
|
23
|
+
._g0nfv77o:after{inset-inline-start:var(--ds-space-025,2px)}
|
|
24
|
+
._k48p1igg{font-weight:var(--ds-font-weight-bold,bold)}
|
|
25
|
+
._kqswh2mm{position:relative}
|
|
26
|
+
._syaz1ldt{color:var(--ds-text-selected,#0052cc)}
|
|
27
|
+
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
28
|
+
._syaz7dlb{color:var(--ds-text-disabled,#dfe1e6)}
|
|
29
|
+
._syazc8hx{color:var(--ds-text-subtle,#344563)}
|
|
30
|
+
._syazj3m3{color:var(--ds-text,#091e42)}
|
|
31
|
+
._syazqueg{color:var(--ds-text-selected,#fff)}
|
|
32
|
+
._y3gn1h6o{text-align:center}._10knnqa1:focus-visible{border-style:solid}
|
|
33
|
+
._1wysyh40:focus-visible{border-width:2px}
|
|
34
|
+
._pojj194a:focus-visible{border-color:var(--ds-border-focused,#2684ff)}
|
|
35
|
+
._30l31uqy:hover{color:var(--ds-text-selected,#344563)}
|
|
36
|
+
._30l31wmz:hover{color:var(--ds-text-subtlest,#6b778c)}
|
|
37
|
+
._30l37dlb:hover{color:var(--ds-text-disabled,#dfe1e6)}
|
|
38
|
+
._30l3c8hx:hover{color:var(--ds-text-subtle,#344563)}
|
|
39
|
+
._30l3j3m3:hover{color:var(--ds-text,#091e42)}
|
|
40
|
+
._irr314ae:hover{background-color:var(--ds-background-neutral-subtle-hovered,#ebecf0)}
|
|
41
|
+
._irr318uv:hover{background-color:initial}
|
|
42
|
+
._irr3quvt:hover{background-color:var(--ds-background-selected-hovered,#deebff)}
|
|
43
|
+
._1di61l7b:active{background-color:var(--ds-background-neutral-subtle-pressed,#deebff)}
|
|
44
|
+
._9h8hj3m3:active{color:var(--ds-text,#091e42)}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* date.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
+
import "./date.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo, useCallback, useEffect, useRef } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
10
|
-
import { Grid } from '@atlaskit/primitives';
|
|
11
|
-
import {
|
|
7
|
+
import { Grid } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { B200, B400, B50, N0, N200, N30, N40, N500, N600, N900 } from '@atlaskit/theme/colors';
|
|
9
|
+
const dateCellSiblingStyle = null;
|
|
10
|
+
const dateCellTodayStyle = null;
|
|
11
|
+
const dateCellPrevSelectedStyle = null;
|
|
12
|
+
const dateCellSelectedStyle = null;
|
|
13
|
+
const dateCellDisabledStyle = null;
|
|
14
|
+
const dateCellStyles = null;
|
|
12
15
|
const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
|
|
13
16
|
children: day,
|
|
14
17
|
isDisabled = false,
|
|
@@ -61,15 +64,10 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
|
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
}, [onClick]);
|
|
64
|
-
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
-
const dateCellStyles = css(getDateCellStyles());
|
|
67
|
-
return jsx(Grid, {
|
|
67
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
68
68
|
role: "gridcell",
|
|
69
69
|
alignItems: "center"
|
|
70
|
-
},
|
|
71
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
72
|
-
css: dateCellStyles,
|
|
70
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
73
71
|
"aria-current": isToday ? 'date' : undefined,
|
|
74
72
|
"aria-disabled": isDisabled || undefined,
|
|
75
73
|
"aria-label": `${day}, ${dayLong} ${monthLong} ${year}`,
|
|
@@ -84,7 +82,8 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
|
|
|
84
82
|
"data-selected": isSelected || undefined,
|
|
85
83
|
"data-sibling": isSibling || undefined,
|
|
86
84
|
"data-today": isToday || undefined,
|
|
87
|
-
"data-testid": testId && (isSelected ? `${testId}--selected-day` : `${testId}--day`)
|
|
85
|
+
"data-testid": testId && (isSelected ? `${testId}--selected-day` : `${testId}--day`),
|
|
86
|
+
className: ax(["_1e0c1ule _1yt41qfp _kqswh2mm _16jlkb7n _kkk2n7od _bfhk18uv _1h6d1j28 _2rko1l7b _1dqonqa1 _189eyh40 _syazj3m3 _80omtlke _11c81oud _y3gn1h6o _pojj194a _10knnqa1 _1wysyh40 _irr314ae _30l3j3m3 _1di61l7b _9h8hj3m3", isSibling && "_syaz1wmz _30l31wmz", isToday && "_syaz1ldt _k48p1igg _1ywu1ule _1qdgyh40 _18postnw _1hfk1r31 _aetrb3bt _1gufv77o _1czdv77o _g0nfv77o", isPreviouslySelected && "_bfhk29zg _syazc8hx _30l3c8hx", isSelected && "_bfhk1p4p _syazqueg _irr3quvt _30l31uqy", isDisabled && "_syaz7dlb _80om13gf _irr318uv _30l37dlb"])
|
|
88
87
|
}, day));
|
|
89
88
|
}));
|
|
90
89
|
Date.displayName = 'Date';
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { memo, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { memo, useState } from 'react';
|
|
9
2
|
import { IconButton } from '@atlaskit/button/new';
|
|
10
3
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
4
|
import Heading from '@atlaskit/heading';
|
|
12
5
|
import ChevronLeftIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
13
6
|
import ChevronRightIcon from '@atlaskit/icon/utility/migration/chevron-right--chevron-right-large';
|
|
14
|
-
import { Box, Inline } from '@atlaskit/primitives';
|
|
7
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
15
8
|
const Header = /*#__PURE__*/memo(function Header({
|
|
16
9
|
monthLongTitle,
|
|
17
10
|
year,
|
|
@@ -47,13 +40,13 @@ const Header = /*#__PURE__*/memo(function Header({
|
|
|
47
40
|
}
|
|
48
41
|
handleClickNext(e);
|
|
49
42
|
};
|
|
50
|
-
return
|
|
43
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
51
44
|
paddingInline: "space.100"
|
|
52
|
-
},
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
53
46
|
space: "space.0",
|
|
54
47
|
alignBlock: "center",
|
|
55
48
|
spread: "space-between"
|
|
56
|
-
},
|
|
49
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
57
50
|
appearance: "subtle",
|
|
58
51
|
spacing: "compact",
|
|
59
52
|
tabIndex: tabIndex,
|
|
@@ -61,16 +54,16 @@ const Header = /*#__PURE__*/memo(function Header({
|
|
|
61
54
|
testId: testId && `${testId}--previous-month`,
|
|
62
55
|
icon: ChevronLeftIcon,
|
|
63
56
|
label: `${previousMonthLabel}, ${previousHeading}`
|
|
64
|
-
}),
|
|
57
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
65
58
|
"aria-live": hasInteractedWithMonth ? 'polite' : undefined,
|
|
66
59
|
id: announceId,
|
|
67
60
|
testId: testId && `${testId}--current-month-year--container`
|
|
68
|
-
},
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
69
62
|
size: "xsmall",
|
|
70
63
|
as: "h2",
|
|
71
64
|
id: headerId,
|
|
72
65
|
testId: testId && `${testId}--current-month-year`
|
|
73
|
-
}, `${monthLongTitle} ${year}`)),
|
|
66
|
+
}, `${monthLongTitle} ${year}`)), /*#__PURE__*/React.createElement(IconButton, {
|
|
74
67
|
appearance: "subtle",
|
|
75
68
|
spacing: "compact",
|
|
76
69
|
tabIndex: tabIndex,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._yv0eloeq{grid-template-columns:repeat(7,minmax(max-content,1fr))}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* week-day-grid.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
+
import "./week-day-grid.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Grid } from '@atlaskit/primitives/compiled';
|
|
6
|
+
const styles = {
|
|
7
|
+
templateColumns: "_yv0eloeq"
|
|
8
|
+
};
|
|
5
9
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { Grid } from '@atlaskit/primitives';
|
|
9
10
|
/**
|
|
10
11
|
* __Week day grid__
|
|
11
12
|
*
|
|
@@ -17,12 +18,12 @@ const WeekDayGrid = ({
|
|
|
17
18
|
children,
|
|
18
19
|
isHidden
|
|
19
20
|
}) => {
|
|
20
|
-
const row =
|
|
21
|
+
const row = /*#__PURE__*/React.createElement(Grid, {
|
|
21
22
|
testId: testId,
|
|
22
|
-
|
|
23
|
+
xcss: styles.templateColumns,
|
|
23
24
|
role: "row"
|
|
24
25
|
}, children);
|
|
25
|
-
return isHidden ?
|
|
26
|
+
return isHidden ? /*#__PURE__*/React.createElement("div", {
|
|
26
27
|
"aria-hidden": "true"
|
|
27
28
|
}, row) : row;
|
|
28
29
|
};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { memo } from 'react';
|
|
9
2
|
import Box from '@atlaskit/primitives/box';
|
|
10
3
|
import DateComponent from './date';
|
|
11
4
|
import WeekdayGrid from './week-day-grid';
|
|
@@ -17,13 +10,13 @@ const WeekDays = /*#__PURE__*/memo(function WeekDays({
|
|
|
17
10
|
tabIndex,
|
|
18
11
|
testId
|
|
19
12
|
}) {
|
|
20
|
-
return
|
|
13
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
21
14
|
role: "rowgroup",
|
|
22
15
|
testId: testId && `${testId}--month`
|
|
23
|
-
}, weeks.map((week, i) =>
|
|
16
|
+
}, weeks.map((week, i) => /*#__PURE__*/React.createElement(WeekdayGrid, {
|
|
24
17
|
key: i,
|
|
25
18
|
testId: testId && `${testId}--week`
|
|
26
|
-
}, week.values.map(weekDay =>
|
|
19
|
+
}, week.values.map(weekDay => /*#__PURE__*/React.createElement(DateComponent, {
|
|
27
20
|
key: `${week.id}-${weekDay.id}`,
|
|
28
21
|
isDisabled: weekDay.isDisabled,
|
|
29
22
|
isFocused: weekDay.isFocused,
|
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* week-header.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
+
import "./week-header.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
9
|
-
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
6
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
10
7
|
import WeekDayGrid from './week-day-grid';
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
whiteSpace: 'nowrap',
|
|
15
|
-
// Account for languages with long week day names
|
|
16
|
-
display: 'flex',
|
|
17
|
-
justifyContent: 'center'
|
|
18
|
-
});
|
|
8
|
+
const styles = {
|
|
9
|
+
columnHeader: "_1ul98pqr _o5721q9c _1e0c1txw _1bah1h6o"
|
|
10
|
+
};
|
|
19
11
|
const WeekHeader = /*#__PURE__*/memo(function WeekHeader({
|
|
20
12
|
daysShort,
|
|
21
13
|
testId
|
|
22
14
|
}) {
|
|
23
|
-
return
|
|
15
|
+
return /*#__PURE__*/React.createElement(WeekDayGrid, {
|
|
24
16
|
isHidden: true,
|
|
25
17
|
testId: testId && `${testId}--column-headers`
|
|
26
|
-
}, daysShort.map(shortDay =>
|
|
18
|
+
}, daysShort.map(shortDay => /*#__PURE__*/React.createElement(Box, {
|
|
27
19
|
padding: "space.100",
|
|
28
|
-
xcss:
|
|
20
|
+
xcss: styles.columnHeader,
|
|
29
21
|
key: shortDay,
|
|
30
22
|
role: "columnheader",
|
|
31
23
|
testId: testId && `${testId}--column-header`
|
|
32
|
-
},
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
33
25
|
weight: "bold",
|
|
34
26
|
size: "UNSAFE_small",
|
|
35
27
|
align: "center",
|
package/dist/esm/calendar.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
+
/* calendar.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
import "./calendar.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
-
/**
|
|
7
|
-
* @jsxRuntime classic
|
|
8
|
-
* @jsx jsx
|
|
9
|
-
*/
|
|
10
10
|
import { forwardRef, memo, useState } from 'react';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
import { jsx } from '@emotion/react';
|
|
14
11
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
|
|
15
12
|
import noop from '@atlaskit/ds-lib/noop';
|
|
16
13
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
17
|
-
import { Box, Stack
|
|
14
|
+
import { Box, Stack } from '@atlaskit/primitives/compiled';
|
|
18
15
|
import Header from './internal/components/header';
|
|
19
16
|
import WeekDaysComponent from './internal/components/week-days';
|
|
20
17
|
import WeekHeaderComponent from './internal/components/week-header';
|
|
@@ -25,14 +22,13 @@ import useGetWeeks from './internal/hooks/use-get-weeks';
|
|
|
25
22
|
import useHandleDateChange from './internal/hooks/use-handle-date-change';
|
|
26
23
|
import useHandleDateSelect from './internal/hooks/use-handle-date-select';
|
|
27
24
|
import useLocale from './internal/hooks/use-locale';
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
25
|
+
var styles = {
|
|
26
|
+
box: "_1e0c1o8l _uiztglyw"
|
|
27
|
+
};
|
|
32
28
|
var analyticsAttributes = {
|
|
33
29
|
componentName: 'calendar',
|
|
34
30
|
packageName: "@atlaskit/calendar",
|
|
35
|
-
packageVersion: "
|
|
31
|
+
packageVersion: "16.1.0"
|
|
36
32
|
};
|
|
37
33
|
var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
38
34
|
var day = _ref.day,
|
|
@@ -185,8 +181,9 @@ var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
|
185
181
|
};
|
|
186
182
|
var headerId = useId();
|
|
187
183
|
return (
|
|
184
|
+
/*#__PURE__*/
|
|
188
185
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
189
|
-
|
|
186
|
+
React.createElement("div", {
|
|
190
187
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
191
188
|
className: className
|
|
192
189
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
@@ -196,14 +193,14 @@ var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
|
196
193
|
onFocus: handleContainerFocus,
|
|
197
194
|
"data-testid": testId && "".concat(testId, "--container"),
|
|
198
195
|
ref: ref
|
|
199
|
-
},
|
|
200
|
-
xcss:
|
|
196
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
197
|
+
xcss: styles.box,
|
|
201
198
|
padding: "space.200",
|
|
202
199
|
"aria-label": "calendar",
|
|
203
200
|
testId: testId && "".concat(testId, "--calendar")
|
|
204
|
-
},
|
|
201
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
205
202
|
space: "space.150"
|
|
206
|
-
},
|
|
203
|
+
}, /*#__PURE__*/React.createElement(Header
|
|
207
204
|
// The month number needs to be translated to index in the month
|
|
208
205
|
// name array e.g. 1 (January) -> 0
|
|
209
206
|
, {
|
|
@@ -218,15 +215,15 @@ var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
|
218
215
|
headerId: headerId,
|
|
219
216
|
tabIndex: tabIndex,
|
|
220
217
|
testId: testId
|
|
221
|
-
}),
|
|
218
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
222
219
|
role: "grid",
|
|
223
220
|
onKeyDown: handleContainerKeyDown,
|
|
224
221
|
"aria-labelledby": headerId,
|
|
225
222
|
testId: testId && "".concat(testId, "--calendar-dates")
|
|
226
|
-
},
|
|
223
|
+
}, /*#__PURE__*/React.createElement(WeekHeaderComponent, {
|
|
227
224
|
daysShort: daysShort,
|
|
228
225
|
testId: testId
|
|
229
|
-
}),
|
|
226
|
+
}), /*#__PURE__*/React.createElement(WeekDaysComponent, {
|
|
230
227
|
weeks: weeks,
|
|
231
228
|
handleClickDay: handleClickDay,
|
|
232
229
|
monthsLong: monthsLong,
|
|
@@ -247,7 +244,7 @@ var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
|
247
244
|
* - [Usage](https://atlassian.design/components/calendar/usage)
|
|
248
245
|
*/
|
|
249
246
|
var Calendar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Calendar(props, ref) {
|
|
250
|
-
return
|
|
247
|
+
return /*#__PURE__*/React.createElement(InnerCalendar, _extends({}, props, {
|
|
251
248
|
ref: ref
|
|
252
249
|
}));
|
|
253
250
|
}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
._kkk2n7od{all:unset}
|
|
3
|
+
._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
4
|
+
._1yt432tv{padding:var(--_1arop38)}
|
|
5
|
+
._2rko1l7b{border-radius:3px}
|
|
6
|
+
._189eyh40{border-width:2px}
|
|
7
|
+
._1dqonqa1{border-style:solid}
|
|
8
|
+
._1h6d1j28{border-color:transparent}
|
|
9
|
+
._16jlkb7n{flex-grow:1}
|
|
10
|
+
._18postnw:after{position:absolute}
|
|
11
|
+
._1czdv77o:after{inset-inline-end:var(--ds-space-025,2px)}
|
|
12
|
+
._1e0c1ule{display:block}
|
|
13
|
+
._1gufv77o:after{inset-block-end:var(--ds-space-025,2px)}
|
|
14
|
+
._1hfk1r31:after{background-color:currentColor}
|
|
15
|
+
._1qdgyh40:after{height:2px}
|
|
16
|
+
._1ywu1ule:after{display:block}
|
|
17
|
+
._80om13gf{cursor:not-allowed}
|
|
18
|
+
._80omtlke{cursor:pointer}
|
|
19
|
+
._aetrb3bt:after{content:""}
|
|
20
|
+
._bfhk18uv{background-color:initial}
|
|
21
|
+
._bfhk1kxl{background-color:var(--_rryx0a)}
|
|
22
|
+
._bfhky9dz{background-color:var(--_7nwbia)}
|
|
23
|
+
._g0nfv77o:after{inset-inline-start:var(--ds-space-025,2px)}
|
|
24
|
+
._k48p1igg{font-weight:var(--ds-font-weight-bold,bold)}
|
|
25
|
+
._kqswh2mm{position:relative}
|
|
26
|
+
._syaz11g7{color:var(--_y28k9g)}
|
|
27
|
+
._syaz1a5u{color:var(--_1oh641w)}
|
|
28
|
+
._syazf50w{color:var(--_118fb4h)}
|
|
29
|
+
._syazln51{color:var(--_1hfkvbo)}
|
|
30
|
+
._syazovqm{color:var(--_5xk3r4)}
|
|
31
|
+
._syazpsu8{color:var(--_vrm7dk)}
|
|
32
|
+
._y3gn1h6o{text-align:center}._10knnqa1:focus-visible{border-style:solid}
|
|
33
|
+
._1wysyh40:focus-visible{border-width:2px}
|
|
34
|
+
._pojj3zdg:focus-visible{border-color:var(--_xjqa3d)}
|
|
35
|
+
._30l31a5u:hover{color:var(--_1oh641w)}
|
|
36
|
+
._30l3dgff:hover{color:var(--_f9evi3)}
|
|
37
|
+
._30l3f50w:hover{color:var(--_118fb4h)}
|
|
38
|
+
._30l3ovqm:hover{color:var(--_5xk3r4)}
|
|
39
|
+
._30l3psu8:hover{color:var(--_vrm7dk)}
|
|
40
|
+
._irr318uv:hover{background-color:initial}
|
|
41
|
+
._irr32tgk:hover{background-color:var(--_1y60f1n)}
|
|
42
|
+
._irr3j4m7:hover{background-color:var(--_1wu4xsl)}
|
|
43
|
+
._1di618xb:active{background-color:var(--_18th9fi)}
|
|
44
|
+
._9h8hovqm:active{color:var(--_5xk3r4)}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/* date.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
+
import "./date.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo, useCallback, useEffect, useRef } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
10
|
-
import { Grid } from '@atlaskit/primitives';
|
|
11
|
-
import {
|
|
7
|
+
import { Grid } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { B200, B400, B50, N0, N200, N30, N40, N500, N600, N900 } from '@atlaskit/theme/colors';
|
|
9
|
+
var dateCellSiblingStyle = null;
|
|
10
|
+
var dateCellTodayStyle = null;
|
|
11
|
+
var dateCellPrevSelectedStyle = null;
|
|
12
|
+
var dateCellSelectedStyle = null;
|
|
13
|
+
var dateCellDisabledStyle = null;
|
|
14
|
+
var dateCellStyles = null;
|
|
12
15
|
var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref2, _ref) {
|
|
13
16
|
var day = _ref2.children,
|
|
14
17
|
_ref2$isDisabled = _ref2.isDisabled,
|
|
@@ -66,15 +69,10 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref2, _ref)
|
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
}, [onClick]);
|
|
69
|
-
|
|
70
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
|
-
var dateCellStyles = css(getDateCellStyles());
|
|
72
|
-
return jsx(Grid, {
|
|
72
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
73
73
|
role: "gridcell",
|
|
74
74
|
alignItems: "center"
|
|
75
|
-
},
|
|
76
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
77
|
-
css: dateCellStyles,
|
|
75
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
78
76
|
"aria-current": isToday ? 'date' : undefined,
|
|
79
77
|
"aria-disabled": isDisabled || undefined,
|
|
80
78
|
"aria-label": "".concat(day, ", ").concat(dayLong, " ").concat(monthLong, " ").concat(year),
|
|
@@ -89,7 +87,24 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref2, _ref)
|
|
|
89
87
|
"data-selected": isSelected || undefined,
|
|
90
88
|
"data-sibling": isSibling || undefined,
|
|
91
89
|
"data-today": isToday || undefined,
|
|
92
|
-
"data-testid": testId && (isSelected ? "".concat(testId, "--selected-day") : "".concat(testId, "--day"))
|
|
90
|
+
"data-testid": testId && (isSelected ? "".concat(testId, "--selected-day") : "".concat(testId, "--day")),
|
|
91
|
+
className: ax(["_1e0c1ule _1yt432tv _kqswh2mm _16jlkb7n _kkk2n7od _bfhk18uv _1h6d1j28 _2rko1l7b _1dqonqa1 _189eyh40 _syazovqm _80omtlke _11c81oud _y3gn1h6o _pojj3zdg _10knnqa1 _1wysyh40 _irr32tgk _30l3ovqm _1di618xb _9h8hovqm", isSibling && "_syazpsu8 _30l3psu8", isToday && "_syazln51 _k48p1igg _1ywu1ule _1qdgyh40 _18postnw _1hfk1r31 _aetrb3bt _1gufv77o _1czdv77o _g0nfv77o", isPreviouslySelected && "_bfhk1kxl _syaz1a5u _30l31a5u", isSelected && "_bfhky9dz _syaz11g7 _irr3j4m7 _30l3dgff", isDisabled && "_syazf50w _80om13gf _irr318uv _30l3f50w"]),
|
|
92
|
+
style: {
|
|
93
|
+
"--_1arop38": ix("var(--ds-space-050, 4px)".concat(" 9px")),
|
|
94
|
+
"--_5xk3r4": ix("var(--ds-text, ".concat(N900, ")")),
|
|
95
|
+
"--_xjqa3d": ix("var(--ds-border-focused, ".concat(B200, ")")),
|
|
96
|
+
"--_1y60f1n": ix("var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")")),
|
|
97
|
+
"--_18th9fi": ix("var(--ds-background-neutral-subtle-pressed, ".concat(B50, ")")),
|
|
98
|
+
"--_vrm7dk": ix("var(--ds-text-subtlest, ".concat(N200, ")")),
|
|
99
|
+
"--_1hfkvbo": ix("var(--ds-text-selected, ".concat(B400, ")")),
|
|
100
|
+
"--_rryx0a": ix("var(--ds-background-selected, ".concat(B50, ")")),
|
|
101
|
+
"--_1oh641w": ix("var(--ds-text-subtle, ".concat(N600, ")")),
|
|
102
|
+
"--_7nwbia": ix("var(--ds-background-selected, ".concat(N500, ")")),
|
|
103
|
+
"--_y28k9g": ix("var(--ds-text-selected, ".concat(N0, ")")),
|
|
104
|
+
"--_1wu4xsl": ix("var(--ds-background-selected-hovered, ".concat(B50, ")")),
|
|
105
|
+
"--_f9evi3": ix("var(--ds-text-selected, ".concat(N600, ")")),
|
|
106
|
+
"--_118fb4h": ix("var(--ds-text-disabled, ".concat(N40, ")"))
|
|
107
|
+
}
|
|
93
108
|
}, day));
|
|
94
109
|
}));
|
|
95
110
|
Date.displayName = 'Date';
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import { memo, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
2
|
+
import React, { memo, useState } from 'react';
|
|
10
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
11
4
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
12
5
|
import Heading from '@atlaskit/heading';
|
|
13
6
|
import ChevronLeftIcon from '@atlaskit/icon/utility/migration/chevron-left--chevron-left-large';
|
|
14
7
|
import ChevronRightIcon from '@atlaskit/icon/utility/migration/chevron-right--chevron-right-large';
|
|
15
|
-
import { Box, Inline } from '@atlaskit/primitives';
|
|
8
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
16
9
|
var Header = /*#__PURE__*/memo(function Header(_ref) {
|
|
17
10
|
var monthLongTitle = _ref.monthLongTitle,
|
|
18
11
|
year = _ref.year,
|
|
@@ -52,13 +45,13 @@ var Header = /*#__PURE__*/memo(function Header(_ref) {
|
|
|
52
45
|
}
|
|
53
46
|
handleClickNext(e);
|
|
54
47
|
};
|
|
55
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
56
49
|
paddingInline: "space.100"
|
|
57
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
58
51
|
space: "space.0",
|
|
59
52
|
alignBlock: "center",
|
|
60
53
|
spread: "space-between"
|
|
61
|
-
},
|
|
54
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
62
55
|
appearance: "subtle",
|
|
63
56
|
spacing: "compact",
|
|
64
57
|
tabIndex: tabIndex,
|
|
@@ -66,16 +59,16 @@ var Header = /*#__PURE__*/memo(function Header(_ref) {
|
|
|
66
59
|
testId: testId && "".concat(testId, "--previous-month"),
|
|
67
60
|
icon: ChevronLeftIcon,
|
|
68
61
|
label: "".concat(previousMonthLabel, ", ").concat(previousHeading)
|
|
69
|
-
}),
|
|
62
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
70
63
|
"aria-live": hasInteractedWithMonth ? 'polite' : undefined,
|
|
71
64
|
id: announceId,
|
|
72
65
|
testId: testId && "".concat(testId, "--current-month-year--container")
|
|
73
|
-
},
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
74
67
|
size: "xsmall",
|
|
75
68
|
as: "h2",
|
|
76
69
|
id: headerId,
|
|
77
70
|
testId: testId && "".concat(testId, "--current-month-year")
|
|
78
|
-
}, "".concat(monthLongTitle, " ").concat(year))),
|
|
71
|
+
}, "".concat(monthLongTitle, " ").concat(year))), /*#__PURE__*/React.createElement(IconButton, {
|
|
79
72
|
appearance: "subtle",
|
|
80
73
|
spacing: "compact",
|
|
81
74
|
tabIndex: tabIndex,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._yv0eloeq{grid-template-columns:repeat(7,minmax(max-content,1fr))}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/* week-day-grid.tsx generated by @compiled/babel-plugin v0.32.2 */
|
|
2
|
+
import "./week-day-grid.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Grid } from '@atlaskit/primitives/compiled';
|
|
6
|
+
var styles = {
|
|
7
|
+
templateColumns: "_yv0eloeq"
|
|
8
|
+
};
|
|
5
9
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import { Grid } from '@atlaskit/primitives';
|
|
9
10
|
/**
|
|
10
11
|
* __Week day grid__
|
|
11
12
|
*
|
|
@@ -16,12 +17,12 @@ var WeekDayGrid = function WeekDayGrid(_ref) {
|
|
|
16
17
|
var testId = _ref.testId,
|
|
17
18
|
children = _ref.children,
|
|
18
19
|
isHidden = _ref.isHidden;
|
|
19
|
-
var row =
|
|
20
|
+
var row = /*#__PURE__*/React.createElement(Grid, {
|
|
20
21
|
testId: testId,
|
|
21
|
-
|
|
22
|
+
xcss: styles.templateColumns,
|
|
22
23
|
role: "row"
|
|
23
24
|
}, children);
|
|
24
|
-
return isHidden ?
|
|
25
|
+
return isHidden ? /*#__PURE__*/React.createElement("div", {
|
|
25
26
|
"aria-hidden": "true"
|
|
26
27
|
}, row) : row;
|
|
27
28
|
};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { memo } from 'react';
|
|
9
2
|
import Box from '@atlaskit/primitives/box';
|
|
10
3
|
import DateComponent from './date';
|
|
11
4
|
import WeekdayGrid from './week-day-grid';
|
|
@@ -16,15 +9,15 @@ var WeekDays = /*#__PURE__*/memo(function WeekDays(_ref) {
|
|
|
16
9
|
shouldSetFocus = _ref.shouldSetFocus,
|
|
17
10
|
tabIndex = _ref.tabIndex,
|
|
18
11
|
testId = _ref.testId;
|
|
19
|
-
return
|
|
12
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
20
13
|
role: "rowgroup",
|
|
21
14
|
testId: testId && "".concat(testId, "--month")
|
|
22
15
|
}, weeks.map(function (week, i) {
|
|
23
|
-
return
|
|
16
|
+
return /*#__PURE__*/React.createElement(WeekdayGrid, {
|
|
24
17
|
key: i,
|
|
25
18
|
testId: testId && "".concat(testId, "--week")
|
|
26
19
|
}, week.values.map(function (weekDay) {
|
|
27
|
-
return
|
|
20
|
+
return /*#__PURE__*/React.createElement(DateComponent, {
|
|
28
21
|
key: "".concat(week.id, "-").concat(weekDay.id),
|
|
29
22
|
isDisabled: weekDay.isDisabled,
|
|
30
23
|
isFocused: weekDay.isFocused,
|