@atlaskit/calendar 14.2.2 → 14.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 +20 -1
- package/README.md +2 -1
- package/__perf__/examples.tsx +53 -70
- package/codemods/11.0.0-lite-mode.tsx +2 -2
- package/codemods/__tests__/11.0.0-lite-mode.tsx +21 -21
- package/codemods/__tests__/flatten-certain-inner-props-as-prop.tsx +29 -31
- package/codemods/__tests__/remove-inner-props.tsx +28 -28
- package/codemods/migrations/flatten-certain-inner-props-as-prop.tsx +3 -3
- package/codemods/utils.tsx +148 -173
- package/dist/cjs/calendar.js +4 -2
- package/dist/cjs/internal/components/date.js +7 -0
- package/dist/cjs/internal/components/header.js +5 -0
- package/dist/cjs/internal/components/week-day-grid.js +5 -0
- package/dist/cjs/internal/components/week-days.js +5 -0
- package/dist/cjs/internal/components/week-header.js +5 -0
- package/dist/cjs/internal/styles/date.js +2 -0
- package/dist/es2019/calendar.js +6 -1
- package/dist/es2019/internal/components/date.js +7 -0
- package/dist/es2019/internal/components/header.js +5 -0
- package/dist/es2019/internal/components/week-day-grid.js +4 -0
- package/dist/es2019/internal/components/week-days.js +5 -0
- package/dist/es2019/internal/components/week-header.js +5 -0
- package/dist/es2019/internal/styles/date.js +2 -0
- package/dist/esm/calendar.js +6 -1
- package/dist/esm/internal/components/date.js +7 -0
- package/dist/esm/internal/components/header.js +5 -0
- package/dist/esm/internal/components/week-day-grid.js +4 -0
- package/dist/esm/internal/components/week-days.js +5 -0
- package/dist/esm/internal/components/week-header.js +5 -0
- package/dist/esm/internal/styles/date.js +2 -0
- package/dist/types/internal/components/week-day-grid.d.ts +3 -0
- package/dist/types-ts4.5/internal/components/week-day-grid.d.ts +3 -0
- package/package.json +98 -98
- package/report.api.md +77 -76
package/codemods/utils.tsx
CHANGED
|
@@ -1,217 +1,192 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
API,
|
|
3
|
+
ASTPath,
|
|
4
|
+
default as core,
|
|
5
|
+
FileInfo,
|
|
6
|
+
ImportDeclaration,
|
|
7
|
+
ImportSpecifier,
|
|
8
|
+
JSXAttribute,
|
|
9
|
+
ObjectExpression,
|
|
10
|
+
Options,
|
|
11
|
+
Program,
|
|
12
12
|
} from 'jscodeshift';
|
|
13
13
|
import { type Collection } from 'jscodeshift/src/Collection';
|
|
14
14
|
|
|
15
15
|
export type Nullable<T> = T | null;
|
|
16
16
|
|
|
17
|
-
export function getDefaultSpecifier(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
.find(j.ImportDefaultSpecifier);
|
|
29
|
-
|
|
30
|
-
if (!specifiers.length) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return specifiers.nodes()[0]!.local!.name;
|
|
17
|
+
export function getDefaultSpecifier(j: core.JSCodeshift, source: any, specifier: string) {
|
|
18
|
+
const specifiers = source
|
|
19
|
+
.find(j.ImportDeclaration)
|
|
20
|
+
.filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === specifier)
|
|
21
|
+
.find(j.ImportDefaultSpecifier);
|
|
22
|
+
|
|
23
|
+
if (!specifiers.length) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return specifiers.nodes()[0]!.local!.name;
|
|
34
27
|
}
|
|
35
28
|
export function getNamedSpecifier(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
j: core.JSCodeshift,
|
|
30
|
+
source: any,
|
|
31
|
+
specifier: string,
|
|
32
|
+
importName: string,
|
|
40
33
|
) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
if (!specifiers.length) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
return specifiers.nodes()[0]!.local!.name;
|
|
34
|
+
const specifiers = source
|
|
35
|
+
.find(j.ImportDeclaration)
|
|
36
|
+
.filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === specifier)
|
|
37
|
+
.find(j.ImportSpecifier)
|
|
38
|
+
.filter((path: ASTPath<ImportSpecifier>) => path.node.imported.name === importName);
|
|
39
|
+
|
|
40
|
+
if (!specifiers.length) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return specifiers.nodes()[0]!.local!.name;
|
|
57
44
|
}
|
|
58
45
|
|
|
59
46
|
export function getJSXAttributesByName(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
j: core.JSCodeshift,
|
|
48
|
+
element: ASTPath<any>,
|
|
49
|
+
attributeName: string,
|
|
63
50
|
): Collection<JSXAttribute> {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
51
|
+
return j(element)
|
|
52
|
+
.find(j.JSXOpeningElement)
|
|
53
|
+
.find(j.JSXAttribute)
|
|
54
|
+
.filter((attribute) => {
|
|
55
|
+
const matches = j(attribute)
|
|
56
|
+
.find(j.JSXIdentifier)
|
|
57
|
+
.filter((identifier) => identifier.value.name === attributeName);
|
|
58
|
+
return Boolean(matches.length);
|
|
59
|
+
});
|
|
73
60
|
}
|
|
74
61
|
|
|
75
|
-
export function hasImportDeclaration(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
typeof path.node.source.value === 'string' &&
|
|
85
|
-
path.node.source.value.startsWith(importPath),
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
return Boolean(imports.length);
|
|
62
|
+
export function hasImportDeclaration(j: core.JSCodeshift, source: any, importPath: string) {
|
|
63
|
+
const imports = source
|
|
64
|
+
.find(j.ImportDeclaration)
|
|
65
|
+
.filter(
|
|
66
|
+
(path: ASTPath<ImportDeclaration>) =>
|
|
67
|
+
typeof path.node.source.value === 'string' && path.node.source.value.startsWith(importPath),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return Boolean(imports.length);
|
|
89
71
|
}
|
|
90
72
|
// not replacing newlines (which \s does)
|
|
91
73
|
const spacesAndTabs: RegExp = /[ \t]{2,}/g;
|
|
92
74
|
const lineStartWithSpaces: RegExp = /^[ \t]*/gm;
|
|
93
75
|
|
|
94
76
|
function clean(value: string): string {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
77
|
+
return (
|
|
78
|
+
value
|
|
79
|
+
.replace(spacesAndTabs, ' ')
|
|
80
|
+
.replace(lineStartWithSpaces, '')
|
|
81
|
+
// using .trim() to clear the any newlines before the first text and after last text
|
|
82
|
+
.trim()
|
|
83
|
+
);
|
|
102
84
|
}
|
|
103
85
|
|
|
104
86
|
export function addCommentToStartOfFile({
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
87
|
+
j,
|
|
88
|
+
base,
|
|
89
|
+
message,
|
|
108
90
|
}: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
91
|
+
j: core.JSCodeshift;
|
|
92
|
+
base: Collection<Node>;
|
|
93
|
+
message: string;
|
|
112
94
|
}) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
95
|
+
addCommentBefore({
|
|
96
|
+
j,
|
|
97
|
+
target: base.find(j.Program),
|
|
98
|
+
message,
|
|
99
|
+
});
|
|
118
100
|
}
|
|
119
101
|
|
|
120
102
|
export function addCommentBefore({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
j,
|
|
104
|
+
target,
|
|
105
|
+
message,
|
|
124
106
|
}: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
j: core.JSCodeshift;
|
|
108
|
+
target: Collection<Program> | Collection<ImportDeclaration>;
|
|
109
|
+
message: string;
|
|
128
110
|
}) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
const content: string = ` TODO: (from codemod) ${clean(message)} `;
|
|
112
|
+
target.forEach((path: ASTPath<Program | ImportDeclaration>) => {
|
|
113
|
+
path.value.comments = path.value.comments || [];
|
|
132
114
|
|
|
133
|
-
|
|
134
|
-
(comment) => comment.value === content,
|
|
135
|
-
);
|
|
115
|
+
const exists = path.value.comments.find((comment) => comment.value === content);
|
|
136
116
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
117
|
+
// avoiding duplicates of the same comment
|
|
118
|
+
if (exists) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
141
121
|
|
|
142
|
-
|
|
143
|
-
|
|
122
|
+
path.value.comments.push(j.commentBlock(content));
|
|
123
|
+
});
|
|
144
124
|
}
|
|
145
125
|
|
|
146
126
|
export const createRemoveFuncFor =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
127
|
+
(component: string, prop: string, comment?: string) =>
|
|
128
|
+
(j: core.JSCodeshift, source: Collection<Node>) => {
|
|
129
|
+
const defaultSpecifier = getDefaultSpecifier(j, source, component);
|
|
130
|
+
|
|
131
|
+
if (!defaultSpecifier) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
source.findJSXElements(defaultSpecifier).forEach((element) => {
|
|
136
|
+
getJSXAttributesByName(j, element, prop).forEach((attribute) => {
|
|
137
|
+
j(attribute).remove();
|
|
138
|
+
if (comment) {
|
|
139
|
+
addCommentToStartOfFile({ j, base: source, message: comment });
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
164
144
|
|
|
165
145
|
export const flattenCertainChildPropsAsProp =
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
});
|
|
200
|
-
};
|
|
146
|
+
(component: string, propName: string, childProps: string[]) =>
|
|
147
|
+
(j: core.JSCodeshift, source: Collection<Node>) => {
|
|
148
|
+
const defaultSpecifier = getDefaultSpecifier(j, source, component);
|
|
149
|
+
if (!defaultSpecifier) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
source.findJSXElements(defaultSpecifier).forEach((element) => {
|
|
153
|
+
getJSXAttributesByName(j, element, propName).forEach((attribute) => {
|
|
154
|
+
j(attribute)
|
|
155
|
+
.find(j.JSXExpressionContainer)
|
|
156
|
+
.find(j.ObjectExpression)
|
|
157
|
+
.forEach((objectExpression) => {
|
|
158
|
+
objectExpression.node.properties.forEach((property) => {
|
|
159
|
+
childProps.forEach((childProp) => {
|
|
160
|
+
if (
|
|
161
|
+
property.type === 'ObjectProperty' &&
|
|
162
|
+
property.key.type === 'Identifier' &&
|
|
163
|
+
property.key.name === childProp &&
|
|
164
|
+
element.node.openingElement.attributes
|
|
165
|
+
) {
|
|
166
|
+
element.node.openingElement.attributes.push(
|
|
167
|
+
j.jsxAttribute(
|
|
168
|
+
j.jsxIdentifier(childProp),
|
|
169
|
+
j.jsxExpressionContainer(property.value as ObjectExpression),
|
|
170
|
+
),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
};
|
|
201
179
|
|
|
202
180
|
export const createTransformer =
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
) =>
|
|
207
|
-
(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
|
|
208
|
-
const source: Collection<Node> = j(fileInfo.source);
|
|
181
|
+
(component: string, migrates: { (j: core.JSCodeshift, source: Collection<Node>): void }[]) =>
|
|
182
|
+
(fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => {
|
|
183
|
+
const source: Collection<Node> = j(fileInfo.source);
|
|
209
184
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
185
|
+
if (!hasImportDeclaration(j, source, component)) {
|
|
186
|
+
return fileInfo.source;
|
|
187
|
+
}
|
|
213
188
|
|
|
214
|
-
|
|
189
|
+
migrates.forEach((tf) => tf(j, source));
|
|
215
190
|
|
|
216
|
-
|
|
217
|
-
|
|
191
|
+
return source.toSource(options.printOptions || { quote: 'single' });
|
|
192
|
+
};
|
package/dist/cjs/calendar.js
CHANGED
|
@@ -26,7 +26,9 @@ var _useHandleDateSelect2 = _interopRequireDefault(require("./internal/hooks/use
|
|
|
26
26
|
var _useLocale2 = _interopRequireDefault(require("./internal/hooks/use-locale"));
|
|
27
27
|
var _useUniqueId = _interopRequireDefault(require("./internal/hooks/use-unique-id"));
|
|
28
28
|
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; }
|
|
29
|
-
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) { (0, _defineProperty2.default)(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; } /**
|
|
29
|
+
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) { (0, _defineProperty2.default)(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; } /**
|
|
30
|
+
* @jsxRuntime classic
|
|
31
|
+
*/ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
32
|
var boxStyles = (0, _primitives.xcss)({
|
|
31
33
|
display: 'inline-block',
|
|
32
34
|
userSelect: 'none'
|
|
@@ -34,7 +36,7 @@ var boxStyles = (0, _primitives.xcss)({
|
|
|
34
36
|
var analyticsAttributes = {
|
|
35
37
|
componentName: 'calendar',
|
|
36
38
|
packageName: "@atlaskit/calendar",
|
|
37
|
-
packageVersion: "14.
|
|
39
|
+
packageVersion: "14.3.1"
|
|
38
40
|
};
|
|
39
41
|
var InnerCalendar = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
|
|
40
42
|
var day = _ref.day,
|
|
@@ -10,8 +10,13 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
11
11
|
var _primitives = require("@atlaskit/primitives");
|
|
12
12
|
var _date = require("../styles/date");
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
*/
|
|
13
16
|
/** @jsx jsx */
|
|
14
17
|
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
|
+
|
|
15
20
|
var Date = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function Date(_ref2, _ref) {
|
|
16
21
|
var day = _ref2.children,
|
|
17
22
|
_ref2$isDisabled = _ref2.isDisabled,
|
|
@@ -69,6 +74,8 @@ var Date = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
69
74
|
});
|
|
70
75
|
}
|
|
71
76
|
}, [onClick]);
|
|
77
|
+
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
79
|
var dateCellStyles = (0, _react2.css)((0, _date.dateCellStyles)());
|
|
73
80
|
return (0, _react2.jsx)(_primitives.Grid, {
|
|
74
81
|
role: "gridcell",
|
|
@@ -14,8 +14,13 @@ var _chevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/che
|
|
|
14
14
|
var _chevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right-large"));
|
|
15
15
|
var _primitives = require("@atlaskit/primitives");
|
|
16
16
|
var _useUniqueId = _interopRequireDefault(require("../../internal/hooks/use-unique-id"));
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
*/
|
|
17
20
|
/** @jsx jsx */
|
|
18
21
|
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
+
|
|
19
24
|
var Header = /*#__PURE__*/(0, _react.memo)(function Header(_ref) {
|
|
20
25
|
var monthLongTitle = _ref.monthLongTitle,
|
|
21
26
|
year = _ref.year,
|
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _primitives = require("@atlaskit/primitives");
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
*/
|
|
9
12
|
/** @jsx jsx */
|
|
10
13
|
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* __Week day grid__
|
|
13
18
|
*
|
|
@@ -10,8 +10,13 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _box = _interopRequireDefault(require("@atlaskit/primitives/box"));
|
|
11
11
|
var _date = _interopRequireDefault(require("./date"));
|
|
12
12
|
var _weekDayGrid = _interopRequireDefault(require("./week-day-grid"));
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
*/
|
|
13
16
|
/** @jsx jsx */
|
|
14
17
|
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
|
+
|
|
15
20
|
var WeekDays = /*#__PURE__*/(0, _react.memo)(function WeekDays(_ref) {
|
|
16
21
|
var weeks = _ref.weeks,
|
|
17
22
|
handleClickDay = _ref.handleClickDay,
|
|
@@ -9,8 +9,13 @@ var _react = require("react");
|
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _primitives = require("@atlaskit/primitives");
|
|
11
11
|
var _weekDayGrid = _interopRequireDefault(require("./week-day-grid"));
|
|
12
|
+
/**
|
|
13
|
+
* @jsxRuntime classic
|
|
14
|
+
*/
|
|
12
15
|
/** @jsx jsx */
|
|
13
16
|
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
|
+
|
|
14
19
|
var columnHeaderStyles = (0, _primitives.xcss)({
|
|
15
20
|
minWidth: 'size.400',
|
|
16
21
|
// Account for languages with short week day names
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dateCellStyles = void 0;
|
|
7
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
|
|
8
10
|
var dateCellStyles = exports.dateCellStyles = function dateCellStyles() {
|
|
9
11
|
return {
|
|
10
12
|
all: 'unset',
|
package/dist/es2019/calendar.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { forwardRef, memo, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
|
|
6
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -24,7 +29,7 @@ const boxStyles = xcss({
|
|
|
24
29
|
const analyticsAttributes = {
|
|
25
30
|
componentName: 'calendar',
|
|
26
31
|
packageName: "@atlaskit/calendar",
|
|
27
|
-
packageVersion: "14.
|
|
32
|
+
packageVersion: "14.3.1"
|
|
28
33
|
};
|
|
29
34
|
const InnerCalendar = /*#__PURE__*/forwardRef(function Calendar({
|
|
30
35
|
day,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
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
|
|
3
8
|
import { css, jsx } from '@emotion/react';
|
|
4
9
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
10
|
import { Grid } from '@atlaskit/primitives';
|
|
@@ -56,6 +61,8 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
|
|
|
56
61
|
});
|
|
57
62
|
}
|
|
58
63
|
}, [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
|
|
59
66
|
const dateCellStyles = css(getDateCellStyles());
|
|
60
67
|
return jsx(Grid, {
|
|
61
68
|
role: "gridcell",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { memo, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
10
|
import Heading from '@atlaskit/heading';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { memo } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import Box from '@atlaskit/primitives/box';
|
|
5
10
|
import DateComponent from './date';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { memo } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
5
10
|
import WeekDayGrid from './week-day-grid';
|
package/dist/esm/calendar.js
CHANGED
|
@@ -3,8 +3,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
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
5
|
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
|
+
*/
|
|
6
9
|
/** @jsx jsx */
|
|
7
10
|
import { forwardRef, memo, useState } from 'react';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
13
|
import { jsx } from '@emotion/react';
|
|
9
14
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
|
|
10
15
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -28,7 +33,7 @@ var boxStyles = xcss({
|
|
|
28
33
|
var analyticsAttributes = {
|
|
29
34
|
componentName: 'calendar',
|
|
30
35
|
packageName: "@atlaskit/calendar",
|
|
31
|
-
packageVersion: "14.
|
|
36
|
+
packageVersion: "14.3.1"
|
|
32
37
|
};
|
|
33
38
|
var InnerCalendar = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
|
|
34
39
|
var day = _ref.day,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
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
|
|
3
8
|
import { css, jsx } from '@emotion/react';
|
|
4
9
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
10
|
import { Grid } from '@atlaskit/primitives';
|
|
@@ -61,6 +66,8 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref2, _ref)
|
|
|
61
66
|
});
|
|
62
67
|
}
|
|
63
68
|
}, [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
|
|
64
71
|
var dateCellStyles = css(getDateCellStyles());
|
|
65
72
|
return jsx(Grid, {
|
|
66
73
|
role: "gridcell",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
6
11
|
import Heading from '@atlaskit/heading';
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { memo } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { jsx } from '@emotion/react';
|
|
4
9
|
import Box from '@atlaskit/primitives/box';
|
|
5
10
|
import DateComponent from './date';
|