@atlaskit/datetime-picker 19.4.2 → 19.4.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/codemods/14.0.0-remove-duplicate-and-unused-props.tsx +2 -2
  3. package/codemods/utils/create-remove-func-for.tsx +5 -3
  4. package/codemods/utils/remove-jsx-attribute-by-name.tsx +2 -1
  5. package/codemods/utils/remove-jsx-attribute-object-property-by-name.tsx +2 -2
  6. package/dist/cjs/components/date-picker.js +29 -17
  7. package/dist/cjs/components/date-time-picker.js +2 -2
  8. package/dist/cjs/components/time-picker.js +3 -3
  9. package/dist/cjs/internal/date-time-picker-container.js +1 -1
  10. package/dist/cjs/internal/fixed-layer-menu.js +1 -1
  11. package/dist/cjs/internal/fixed-layer.js +1 -1
  12. package/dist/cjs/internal/indicators-container.js +1 -1
  13. package/dist/cjs/internal/menu-top-layer.js +1 -1
  14. package/dist/cjs/internal/menu.js +1 -1
  15. package/dist/cjs/internal/picker-button-container.js +1 -1
  16. package/dist/es2019/components/date-picker.js +27 -17
  17. package/dist/es2019/components/date-time-picker.js +2 -2
  18. package/dist/es2019/components/time-picker.js +3 -3
  19. package/dist/es2019/internal/date-time-picker-container.js +1 -1
  20. package/dist/es2019/internal/fixed-layer-menu.js +1 -1
  21. package/dist/es2019/internal/fixed-layer.js +1 -1
  22. package/dist/es2019/internal/indicators-container.js +1 -1
  23. package/dist/es2019/internal/menu-top-layer.js +1 -1
  24. package/dist/es2019/internal/menu.js +1 -1
  25. package/dist/es2019/internal/picker-button-container.js +1 -1
  26. package/dist/esm/components/date-picker.js +29 -17
  27. package/dist/esm/components/date-time-picker.js +2 -2
  28. package/dist/esm/components/time-picker.js +3 -3
  29. package/dist/esm/internal/date-time-picker-container.js +1 -1
  30. package/dist/esm/internal/fixed-layer-menu.js +1 -1
  31. package/dist/esm/internal/fixed-layer.js +1 -1
  32. package/dist/esm/internal/indicators-container.js +1 -1
  33. package/dist/esm/internal/menu-top-layer.js +1 -1
  34. package/dist/esm/internal/menu.js +1 -1
  35. package/dist/esm/internal/picker-button-container.js +1 -1
  36. package/package.json +11 -14
  37. package/codemods/utils/get-jsx-attribute-by-name.tsx +0 -15
  38. package/codemods/utils/get-jsx-attributes-by-name.tsx +0 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 19.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3a778eedbaf18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a778eedbaf18) -
8
+ Cleanup `feature_gate` `platform-dst-locale-aware-time-parsing`. Editable time picker input is now
9
+ always parsed using the locale-aware time format.
10
+
11
+ ## 19.4.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [`60b28ae0201d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/60b28ae0201d7) -
16
+ Behind `platform-dst-top-layer`, focus returns to the opener when the menu closes with focus
17
+ inside it.
18
+ - Updated dependencies
19
+
3
20
  ## 19.4.2
4
21
 
5
22
  ### Patch Changes
@@ -1,6 +1,8 @@
1
1
  import { type API, type FileInfo, type JSCodeshift, type Options } from 'jscodeshift';
2
2
  import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
+ import { getJSXAttributeByName, getJSXAttributesByName } from '@atlaskit/codemod-utils/support';
5
+
4
6
  import { addJSXAttributeToJSXElement } from './utils/add-jsx-attribute-to-jsx-element';
5
7
  import {
6
8
  dtpPropsToMoveIntoPickerProps,
@@ -9,8 +11,6 @@ import {
9
11
  import { getImportDeclarationCollection } from './utils/get-import-declaration-collection';
10
12
  import { getImportSpecifierCollection } from './utils/get-import-specifier-collection';
11
13
  import { getImportSpecifierName } from './utils/get-import-specifier-name';
12
- import { getJSXAttributeByName } from './utils/get-jsx-attribute-by-name';
13
- import { getJSXAttributesByName } from './utils/get-jsx-attributes-by-name';
14
14
  import { hasImportDeclaration } from './utils/has-import-declaration';
15
15
  import { removeJSXAttributeByName } from './utils/remove-jsx-attribute-by-name';
16
16
  import { removeJSXAttributeObjectPropertyByName } from './utils/remove-jsx-attribute-object-property-by-name';
@@ -1,9 +1,11 @@
1
1
  import { type JSCodeshift } from 'jscodeshift';
2
2
  import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
- import { addCommentToStartOfFile, getNamedSpecifier } from '@atlaskit/codemod-utils/support';
5
-
6
- import { getJSXAttributesByName } from './get-jsx-attributes-by-name';
4
+ import {
5
+ addCommentToStartOfFile,
6
+ getJSXAttributesByName,
7
+ getNamedSpecifier,
8
+ } from '@atlaskit/codemod-utils/support';
7
9
 
8
10
  export const createRemoveFuncFor: (
9
11
  component: string,
@@ -1,6 +1,7 @@
1
1
  import { type ASTPath, type JSCodeshift, type JSXElement } from 'jscodeshift';
2
2
 
3
- import { getJSXAttributeByName } from './get-jsx-attribute-by-name';
3
+ import { getJSXAttributeByName } from '@atlaskit/codemod-utils/support';
4
+
4
5
  import { getJSXAttributes } from './get-jsx-attributes';
5
6
 
6
7
  export const removeJSXAttributeByName: (
@@ -6,8 +6,8 @@ import {
6
6
  type StringLiteral,
7
7
  } from 'jscodeshift';
8
8
 
9
- import { getJSXAttributeByName } from './get-jsx-attribute-by-name';
10
- import { getJSXAttributesByName } from './get-jsx-attributes-by-name';
9
+ import { getJSXAttributeByName, getJSXAttributesByName } from '@atlaskit/codemod-utils/support';
10
+
11
11
  import { removeJSXAttributeByName } from './remove-jsx-attribute-by-name';
12
12
 
13
13
  export const removeJSXAttributeObjectPropertyByName: (
@@ -1,4 +1,4 @@
1
- /* date-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -47,7 +47,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
47
47
  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; }
48
48
  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; }
49
49
  var packageName = "@atlaskit/datetime-picker";
50
- var packageVersion = "19.4.1";
50
+ var packageVersion = "19.4.3";
51
51
  var styles = {
52
52
  pickerContainerStyle: "_kqswh2mm",
53
53
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -76,7 +76,8 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
76
76
  // Track whether focus was caused by an active pointer gesture. Pointer-driven focus must defer
77
77
  // opening a top-layer popover until click, while keyboard and programmatic focus can open it now.
78
78
  var isPointerInteractionRef = (0, _react.useRef)(false);
79
- var focusRestorationTargetRef = (0, _react.useRef)(null);
79
+ // Top layer: set when Escape is left to Select, so `onMenuClose` resets the picker state.
80
+ var isEscapeCloseRef = (0, _react.useRef)(false);
80
81
  var _props$appearance = props.appearance,
81
82
  appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
82
83
  _props$autoFocus = props.autoFocus,
@@ -233,6 +234,12 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
233
234
  var getIsOpen = function getIsOpen() {
234
235
  return isOpenProp !== null && isOpenProp !== void 0 ? isOpenProp : isOpen;
235
236
  };
237
+ // Top layer: the calendar is closed but still mounted while Select's menu closes. The platform
238
+ // then returns focus, and Firefox first moves focus to `<body>` as the popover hides. Neither is
239
+ // the user leaving or arriving at the field.
240
+ var isCalendarClosing = function isCalendarClosing() {
241
+ return (0, _fg.fg)('platform-dst-top-layer') && !getIsOpen() && calendarRef.current !== null;
242
+ };
236
243
  var onCalendarChange = function onCalendarChange(_ref2) {
237
244
  var iso = _ref2.iso;
238
245
  setCalendarValue((0, _getParsedIso.getParsedISO)({
@@ -248,8 +255,8 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
248
255
  setWasOpenedFromCalendarButton(false);
249
256
  onChangePropWithAnalytics(iso);
250
257
 
251
- // When using top-layer, PopupContent handles focus restoration automatically
252
- // on close based on the role. Only manually restore focus for the legacy path.
258
+ // Top layer: no focus move here. Select hides its menu's popover, and the platform returns
259
+ // focus.
253
260
  if (!(0, _fg.fg)('platform-dst-top-layer')) {
254
261
  if (wasOpenedFromCalendarButton) {
255
262
  var _calendarButtonRef$cu;
@@ -272,7 +279,10 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
272
279
  var _containerRef$current2;
273
280
  var newlyFocusedElement = event.relatedTarget;
274
281
  isPointerInteractionRef.current = false;
275
- if (!(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
282
+ // A blur to nowhere while the calendar closes is part of the close. A blur to a real element
283
+ // is the user leaving the field.
284
+ var isClosingBlur = isCalendarClosing() && newlyFocusedElement === null;
285
+ if (!isClosingBlur && !(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
276
286
  setIsOpen(false);
277
287
  setShouldSetFocusOnCurrentDay(false);
278
288
  setWasOpenedFromCalendarButton(false);
@@ -304,7 +314,11 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
304
314
  } else {
305
315
  // Opening an auto popover during pointer focus allows the matching pointerup
306
316
  // to immediately light-dismiss it. Let the subsequent click open it instead.
307
- if (!(0, _fg.fg)('platform-dst-top-layer') || !isPointerInteractionRef.current) {
317
+ var isPointerFocus = (0, _fg.fg)('platform-dst-top-layer') && isPointerInteractionRef.current;
318
+ // Focus that returns while the calendar closes must not change the open state.
319
+ // `getIsOpen()` includes an `isOpen={false}` prop, so the calendar shows again when the prop
320
+ // is removed.
321
+ if (!isPointerFocus && !isCalendarClosing()) {
308
322
  // Don't open when focused into via keyboard if the calendar button is present
309
323
  setIsOpen(!shouldShowCalendarButton);
310
324
  }
@@ -343,11 +357,10 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
343
357
  }
344
358
  var shouldDeferEscapeHandling = event.key === 'Escape' && isTopLayerEnabled && getIsOpen();
345
359
  if (shouldDeferEscapeHandling) {
346
- var _containerRef$current4, _containerRef$current5;
347
360
  // Select owns Escape cancellation and dismissal for its default top-layer popup.
348
- // Defer DatePicker's focus and state cleanup until the menu has closed.
349
- var focusRestorationTarget = wasOpenedFromCalendarButton ? calendarButtonRef.current : (_containerRef$current4 = (_containerRef$current5 = containerRef.current) === null || _containerRef$current5 === void 0 ? void 0 : _containerRef$current5.querySelector('[role="combobox"]')) !== null && _containerRef$current4 !== void 0 ? _containerRef$current4 : null;
350
- focusRestorationTargetRef.current = event.defaultPrevented ? null : focusRestorationTarget;
361
+ // Defer DatePicker's state cleanup until the menu has closed. No focus move here: Select
362
+ // hides its menu's popover, and the platform returns focus.
363
+ isEscapeCloseRef.current = !event.defaultPrevented;
351
364
  return;
352
365
  }
353
366
  switch (keyPressed) {
@@ -357,8 +370,8 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
357
370
  var _calendarButtonRef$cu2;
358
371
  (_calendarButtonRef$cu2 = calendarButtonRef.current) === null || _calendarButtonRef$cu2 === void 0 || _calendarButtonRef$cu2.focus();
359
372
  } else {
360
- var _containerRef$current6;
361
- var innerCombobox = containerRef === null || containerRef === void 0 || (_containerRef$current6 = containerRef.current) === null || _containerRef$current6 === void 0 ? void 0 : _containerRef$current6.querySelector('[role="combobox"]');
373
+ var _containerRef$current4;
374
+ var innerCombobox = containerRef === null || containerRef === void 0 || (_containerRef$current4 = containerRef.current) === null || _containerRef$current4 === void 0 ? void 0 : _containerRef$current4.querySelector('[role="combobox"]');
362
375
  innerCombobox === null || innerCombobox === void 0 || innerCombobox.focus();
363
376
  }
364
377
  setIsOpen(false);
@@ -414,10 +427,9 @@ var DatePicker = /*#__PURE__*/(0, _react.forwardRef)(function (props, _forwarded
414
427
  };
415
428
  var onMenuClose = function onMenuClose() {
416
429
  var _selectProps$onMenuCl;
417
- var focusTarget = focusRestorationTargetRef.current;
418
- focusRestorationTargetRef.current = null;
419
- if ((0, _fg.fg)('platform-dst-top-layer') && focusTarget) {
420
- focusTarget.focus();
430
+ var isEscapeClose = isEscapeCloseRef.current;
431
+ isEscapeCloseRef.current = false;
432
+ if ((0, _fg.fg)('platform-dst-top-layer') && isEscapeClose) {
421
433
  setIsOpen(false);
422
434
  setShouldSetFocusOnCurrentDay(false);
423
435
  setWasOpenedFromCalendarButton(false);
@@ -1,4 +1,4 @@
1
- /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -35,7 +35,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
35
35
  // for typing `process`
36
36
  // oxlint-disable-next-line @atlassian/no-restricted-imports
37
37
  var packageName = "@atlaskit/datetime-picker";
38
- var packageVersion = "19.4.1";
38
+ var packageVersion = "19.4.3";
39
39
  var analyticsAttributes = {
40
40
  componentName: 'dateTimePicker',
41
41
  packageName: packageName,
@@ -1,4 +1,4 @@
1
- /* time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -38,7 +38,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
38
38
  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; }
39
39
  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; } // oxlint-disable-next-line @atlassian/no-restricted-imports
40
40
  var packageName = "@atlaskit/datetime-picker";
41
- var packageVersion = "19.4.1";
41
+ var packageVersion = "19.4.3";
42
42
  var defaultTimeFormat = 'h:mma';
43
43
  var menuStyles = {
44
44
  /* Need to remove default absolute positioning as that causes issues with position fixed */
@@ -153,7 +153,7 @@ var TimePicker = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, _ref) {
153
153
  setValue = _useState10[1];
154
154
  var l10n = (0, _localizationProvider.createLocalizationProvider)(locale);
155
155
  var localeTimeFormat = (0, _react.useMemo)(function () {
156
- return (0, _fg.fg)('platform-dst-locale-aware-time-parsing') ? (0, _getTimeFormat.getTimeFormat)(locale) : undefined;
156
+ return (0, _getTimeFormat.getTimeFormat)(locale);
157
157
  }, [locale]);
158
158
 
159
159
  // Hack to force update: https://legacy.reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
@@ -1,4 +1,4 @@
1
- /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* date-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./date-picker.compiled.css";
4
4
  import * as React from 'react';
@@ -32,7 +32,7 @@ import { parseDate } from '../internal/parse-date';
32
32
  import { PickerButtonContainer } from '../internal/picker-button-container';
33
33
  import { makeSingleValue } from '../internal/single-value';
34
34
  const packageName = "@atlaskit/datetime-picker";
35
- const packageVersion = "19.4.1";
35
+ const packageVersion = "19.4.3";
36
36
  const styles = {
37
37
  pickerContainerStyle: "_kqswh2mm",
38
38
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -61,7 +61,8 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
61
61
  // Track whether focus was caused by an active pointer gesture. Pointer-driven focus must defer
62
62
  // opening a top-layer popover until click, while keyboard and programmatic focus can open it now.
63
63
  const isPointerInteractionRef = useRef(false);
64
- const focusRestorationTargetRef = useRef(null);
64
+ // Top layer: set when Escape is left to Select, so `onMenuClose` resets the picker state.
65
+ const isEscapeCloseRef = useRef(false);
65
66
  const {
66
67
  appearance = 'default',
67
68
  autoFocus = false,
@@ -157,6 +158,10 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
157
158
  }, [isKeyDown, calendarRef, isOpen, wasOpenedFromCalendarButton]);
158
159
  const getValue = () => propValue !== null && propValue !== void 0 ? propValue : value;
159
160
  const getIsOpen = () => isOpenProp !== null && isOpenProp !== void 0 ? isOpenProp : isOpen;
161
+ // Top layer: the calendar is closed but still mounted while Select's menu closes. The platform
162
+ // then returns focus, and Firefox first moves focus to `<body>` as the popover hides. Neither is
163
+ // the user leaving or arriving at the field.
164
+ const isCalendarClosing = () => fg('platform-dst-top-layer') && !getIsOpen() && calendarRef.current !== null;
160
165
  const onCalendarChange = ({
161
166
  iso
162
167
  }) => {
@@ -174,8 +179,8 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
174
179
  setWasOpenedFromCalendarButton(false);
175
180
  onChangePropWithAnalytics(iso);
176
181
 
177
- // When using top-layer, PopupContent handles focus restoration automatically
178
- // on close based on the role. Only manually restore focus for the legacy path.
182
+ // Top layer: no focus move here. Select hides its menu's popover, and the platform returns
183
+ // focus.
179
184
  if (!fg('platform-dst-top-layer')) {
180
185
  if (wasOpenedFromCalendarButton) {
181
186
  var _calendarButtonRef$cu;
@@ -198,7 +203,10 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
198
203
  var _containerRef$current2;
199
204
  const newlyFocusedElement = event.relatedTarget;
200
205
  isPointerInteractionRef.current = false;
201
- if (!(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
206
+ // A blur to nowhere while the calendar closes is part of the close. A blur to a real element
207
+ // is the user leaving the field.
208
+ const isClosingBlur = isCalendarClosing() && newlyFocusedElement === null;
209
+ if (!isClosingBlur && !(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
202
210
  setIsOpen(false);
203
211
  setShouldSetFocusOnCurrentDay(false);
204
212
  setWasOpenedFromCalendarButton(false);
@@ -230,7 +238,11 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
230
238
  } else {
231
239
  // Opening an auto popover during pointer focus allows the matching pointerup
232
240
  // to immediately light-dismiss it. Let the subsequent click open it instead.
233
- if (!fg('platform-dst-top-layer') || !isPointerInteractionRef.current) {
241
+ const isPointerFocus = fg('platform-dst-top-layer') && isPointerInteractionRef.current;
242
+ // Focus that returns while the calendar closes must not change the open state.
243
+ // `getIsOpen()` includes an `isOpen={false}` prop, so the calendar shows again when the prop
244
+ // is removed.
245
+ if (!isPointerFocus && !isCalendarClosing()) {
234
246
  // Don't open when focused into via keyboard if the calendar button is present
235
247
  setIsOpen(!shouldShowCalendarButton);
236
248
  }
@@ -269,11 +281,10 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
269
281
  }
270
282
  const shouldDeferEscapeHandling = event.key === 'Escape' && isTopLayerEnabled && getIsOpen();
271
283
  if (shouldDeferEscapeHandling) {
272
- var _containerRef$current4, _containerRef$current5;
273
284
  // Select owns Escape cancellation and dismissal for its default top-layer popup.
274
- // Defer DatePicker's focus and state cleanup until the menu has closed.
275
- const focusRestorationTarget = wasOpenedFromCalendarButton ? calendarButtonRef.current : (_containerRef$current4 = (_containerRef$current5 = containerRef.current) === null || _containerRef$current5 === void 0 ? void 0 : _containerRef$current5.querySelector('[role="combobox"]')) !== null && _containerRef$current4 !== void 0 ? _containerRef$current4 : null;
276
- focusRestorationTargetRef.current = event.defaultPrevented ? null : focusRestorationTarget;
285
+ // Defer DatePicker's state cleanup until the menu has closed. No focus move here: Select
286
+ // hides its menu's popover, and the platform returns focus.
287
+ isEscapeCloseRef.current = !event.defaultPrevented;
277
288
  return;
278
289
  }
279
290
  switch (keyPressed) {
@@ -283,8 +294,8 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
283
294
  var _calendarButtonRef$cu2;
284
295
  (_calendarButtonRef$cu2 = calendarButtonRef.current) === null || _calendarButtonRef$cu2 === void 0 ? void 0 : _calendarButtonRef$cu2.focus();
285
296
  } else {
286
- var _containerRef$current6;
287
- const innerCombobox = containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current6 = containerRef.current) === null || _containerRef$current6 === void 0 ? void 0 : _containerRef$current6.querySelector('[role="combobox"]');
297
+ var _containerRef$current4;
298
+ const innerCombobox = containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current4 = containerRef.current) === null || _containerRef$current4 === void 0 ? void 0 : _containerRef$current4.querySelector('[role="combobox"]');
288
299
  innerCombobox === null || innerCombobox === void 0 ? void 0 : innerCombobox.focus();
289
300
  }
290
301
  setIsOpen(false);
@@ -340,10 +351,9 @@ const DatePicker = /*#__PURE__*/forwardRef((props, _forwardedRef) => {
340
351
  };
341
352
  const onMenuClose = () => {
342
353
  var _selectProps$onMenuCl;
343
- const focusTarget = focusRestorationTargetRef.current;
344
- focusRestorationTargetRef.current = null;
345
- if (fg('platform-dst-top-layer') && focusTarget) {
346
- focusTarget.focus();
354
+ const isEscapeClose = isEscapeCloseRef.current;
355
+ isEscapeCloseRef.current = false;
356
+ if (fg('platform-dst-top-layer') && isEscapeClose) {
347
357
  setIsOpen(false);
348
358
  setShouldSetFocusOnCurrentDay(false);
349
359
  setWasOpenedFromCalendarButton(false);
@@ -1,4 +1,4 @@
1
- /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./date-time-picker.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -22,7 +22,7 @@ import { convertTokens } from '../internal/parse-tokens';
22
22
  import DatePicker from './date-picker';
23
23
  import TimePicker from './time-picker';
24
24
  const packageName = "@atlaskit/datetime-picker";
25
- const packageVersion = "19.4.1";
25
+ const packageVersion = "19.4.3";
26
26
  const analyticsAttributes = {
27
27
  componentName: 'dateTimePicker',
28
28
  packageName,
@@ -1,4 +1,4 @@
1
- /* time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./time-picker.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -25,7 +25,7 @@ import { PickerButtonContainer } from '../internal/picker-button-container';
25
25
  import { placeholderDatetime } from '../internal/placeholder-date-time';
26
26
  import { makeSingleValue } from '../internal/single-value';
27
27
  const packageName = "@atlaskit/datetime-picker";
28
- const packageVersion = "19.4.1";
28
+ const packageVersion = "19.4.3";
29
29
  const defaultTimeFormat = 'h:mma';
30
30
  const menuStyles = {
31
31
  /* Need to remove default absolute positioning as that causes issues with position fixed */
@@ -99,7 +99,7 @@ const TimePicker = /*#__PURE__*/forwardRef(({
99
99
  const [shouldFocusTimeInput, setShouldFocusTimeInput] = useState(false);
100
100
  const [value, setValue] = useState(defaultValue);
101
101
  const l10n = createLocalizationProvider(locale);
102
- const localeTimeFormat = useMemo(() => fg('platform-dst-locale-aware-time-parsing') ? getTimeFormat(locale) : undefined, [locale]);
102
+ const localeTimeFormat = useMemo(() => getTimeFormat(locale), [locale]);
103
103
 
104
104
  // Hack to force update: https://legacy.reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
105
105
  const [, forceUpdate] = useReducer(x => x + 1, 0);
@@ -1,4 +1,4 @@
1
- /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./date-time-picker-container.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import "./fixed-layer.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./indicators-container.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./menu-top-layer.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./menu.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./picker-button-container.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* date-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -40,7 +40,7 @@ import { parseDate } from '../internal/parse-date';
40
40
  import { PickerButtonContainer } from '../internal/picker-button-container';
41
41
  import { makeSingleValue } from '../internal/single-value';
42
42
  var packageName = "@atlaskit/datetime-picker";
43
- var packageVersion = "19.4.1";
43
+ var packageVersion = "19.4.3";
44
44
  var styles = {
45
45
  pickerContainerStyle: "_kqswh2mm",
46
46
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -69,7 +69,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
69
69
  // Track whether focus was caused by an active pointer gesture. Pointer-driven focus must defer
70
70
  // opening a top-layer popover until click, while keyboard and programmatic focus can open it now.
71
71
  var isPointerInteractionRef = useRef(false);
72
- var focusRestorationTargetRef = useRef(null);
72
+ // Top layer: set when Escape is left to Select, so `onMenuClose` resets the picker state.
73
+ var isEscapeCloseRef = useRef(false);
73
74
  var _props$appearance = props.appearance,
74
75
  appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
75
76
  _props$autoFocus = props.autoFocus,
@@ -226,6 +227,12 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
226
227
  var getIsOpen = function getIsOpen() {
227
228
  return isOpenProp !== null && isOpenProp !== void 0 ? isOpenProp : isOpen;
228
229
  };
230
+ // Top layer: the calendar is closed but still mounted while Select's menu closes. The platform
231
+ // then returns focus, and Firefox first moves focus to `<body>` as the popover hides. Neither is
232
+ // the user leaving or arriving at the field.
233
+ var isCalendarClosing = function isCalendarClosing() {
234
+ return fg('platform-dst-top-layer') && !getIsOpen() && calendarRef.current !== null;
235
+ };
229
236
  var onCalendarChange = function onCalendarChange(_ref2) {
230
237
  var iso = _ref2.iso;
231
238
  setCalendarValue(getParsedISO({
@@ -241,8 +248,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
241
248
  setWasOpenedFromCalendarButton(false);
242
249
  onChangePropWithAnalytics(iso);
243
250
 
244
- // When using top-layer, PopupContent handles focus restoration automatically
245
- // on close based on the role. Only manually restore focus for the legacy path.
251
+ // Top layer: no focus move here. Select hides its menu's popover, and the platform returns
252
+ // focus.
246
253
  if (!fg('platform-dst-top-layer')) {
247
254
  if (wasOpenedFromCalendarButton) {
248
255
  var _calendarButtonRef$cu;
@@ -265,7 +272,10 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
265
272
  var _containerRef$current2;
266
273
  var newlyFocusedElement = event.relatedTarget;
267
274
  isPointerInteractionRef.current = false;
268
- if (!(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
275
+ // A blur to nowhere while the calendar closes is part of the close. A blur to a real element
276
+ // is the user leaving the field.
277
+ var isClosingBlur = isCalendarClosing() && newlyFocusedElement === null;
278
+ if (!isClosingBlur && !(containerRef !== null && containerRef !== void 0 && (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(newlyFocusedElement))) {
269
279
  setIsOpen(false);
270
280
  setShouldSetFocusOnCurrentDay(false);
271
281
  setWasOpenedFromCalendarButton(false);
@@ -297,7 +307,11 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
297
307
  } else {
298
308
  // Opening an auto popover during pointer focus allows the matching pointerup
299
309
  // to immediately light-dismiss it. Let the subsequent click open it instead.
300
- if (!fg('platform-dst-top-layer') || !isPointerInteractionRef.current) {
310
+ var isPointerFocus = fg('platform-dst-top-layer') && isPointerInteractionRef.current;
311
+ // Focus that returns while the calendar closes must not change the open state.
312
+ // `getIsOpen()` includes an `isOpen={false}` prop, so the calendar shows again when the prop
313
+ // is removed.
314
+ if (!isPointerFocus && !isCalendarClosing()) {
301
315
  // Don't open when focused into via keyboard if the calendar button is present
302
316
  setIsOpen(!shouldShowCalendarButton);
303
317
  }
@@ -336,11 +350,10 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
336
350
  }
337
351
  var shouldDeferEscapeHandling = event.key === 'Escape' && isTopLayerEnabled && getIsOpen();
338
352
  if (shouldDeferEscapeHandling) {
339
- var _containerRef$current4, _containerRef$current5;
340
353
  // Select owns Escape cancellation and dismissal for its default top-layer popup.
341
- // Defer DatePicker's focus and state cleanup until the menu has closed.
342
- var focusRestorationTarget = wasOpenedFromCalendarButton ? calendarButtonRef.current : (_containerRef$current4 = (_containerRef$current5 = containerRef.current) === null || _containerRef$current5 === void 0 ? void 0 : _containerRef$current5.querySelector('[role="combobox"]')) !== null && _containerRef$current4 !== void 0 ? _containerRef$current4 : null;
343
- focusRestorationTargetRef.current = event.defaultPrevented ? null : focusRestorationTarget;
354
+ // Defer DatePicker's state cleanup until the menu has closed. No focus move here: Select
355
+ // hides its menu's popover, and the platform returns focus.
356
+ isEscapeCloseRef.current = !event.defaultPrevented;
344
357
  return;
345
358
  }
346
359
  switch (keyPressed) {
@@ -350,8 +363,8 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
350
363
  var _calendarButtonRef$cu2;
351
364
  (_calendarButtonRef$cu2 = calendarButtonRef.current) === null || _calendarButtonRef$cu2 === void 0 || _calendarButtonRef$cu2.focus();
352
365
  } else {
353
- var _containerRef$current6;
354
- var innerCombobox = containerRef === null || containerRef === void 0 || (_containerRef$current6 = containerRef.current) === null || _containerRef$current6 === void 0 ? void 0 : _containerRef$current6.querySelector('[role="combobox"]');
366
+ var _containerRef$current4;
367
+ var innerCombobox = containerRef === null || containerRef === void 0 || (_containerRef$current4 = containerRef.current) === null || _containerRef$current4 === void 0 ? void 0 : _containerRef$current4.querySelector('[role="combobox"]');
355
368
  innerCombobox === null || innerCombobox === void 0 || innerCombobox.focus();
356
369
  }
357
370
  setIsOpen(false);
@@ -407,10 +420,9 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, _forwardedRef) {
407
420
  };
408
421
  var onMenuClose = function onMenuClose() {
409
422
  var _selectProps$onMenuCl;
410
- var focusTarget = focusRestorationTargetRef.current;
411
- focusRestorationTargetRef.current = null;
412
- if (fg('platform-dst-top-layer') && focusTarget) {
413
- focusTarget.focus();
423
+ var isEscapeClose = isEscapeCloseRef.current;
424
+ isEscapeCloseRef.current = false;
425
+ if (fg('platform-dst-top-layer') && isEscapeClose) {
414
426
  setIsOpen(false);
415
427
  setShouldSetFocusOnCurrentDay(false);
416
428
  setWasOpenedFromCalendarButton(false);
@@ -1,4 +1,4 @@
1
- /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
@@ -29,7 +29,7 @@ import { convertTokens } from '../internal/parse-tokens';
29
29
  import DatePicker from './date-picker';
30
30
  import TimePicker from './time-picker';
31
31
  var packageName = "@atlaskit/datetime-picker";
32
- var packageVersion = "19.4.1";
32
+ var packageVersion = "19.4.3";
33
33
  var analyticsAttributes = {
34
34
  componentName: 'dateTimePicker',
35
35
  packageName: packageName,
@@ -1,4 +1,4 @@
1
- /* time-picker.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* time-picker.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
@@ -31,7 +31,7 @@ import { PickerButtonContainer } from '../internal/picker-button-container';
31
31
  import { placeholderDatetime } from '../internal/placeholder-date-time';
32
32
  import { makeSingleValue } from '../internal/single-value';
33
33
  var packageName = "@atlaskit/datetime-picker";
34
- var packageVersion = "19.4.1";
34
+ var packageVersion = "19.4.3";
35
35
  var defaultTimeFormat = 'h:mma';
36
36
  var menuStyles = {
37
37
  /* Need to remove default absolute positioning as that causes issues with position fixed */
@@ -146,7 +146,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_ref2, _ref) {
146
146
  setValue = _useState10[1];
147
147
  var l10n = createLocalizationProvider(locale);
148
148
  var localeTimeFormat = useMemo(function () {
149
- return fg('platform-dst-locale-aware-time-parsing') ? getTimeFormat(locale) : undefined;
149
+ return getTimeFormat(locale);
150
150
  }, [locale]);
151
151
 
152
152
  // Hack to force update: https://legacy.reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
@@ -1,4 +1,4 @@
1
- /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* date-time-picker-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./date-time-picker-container.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer-menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  var _excluded = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "innerProps", "innerRef", "isLoading", "isMulti", "isRtl", "maxMenuHeight", "menuPlacement", "menuPosition", "menuShouldScrollIntoView", "minMenuHeight", "options", "placement", "selectOption", "selectProps", "setValue", "children"];
@@ -1,4 +1,4 @@
1
- /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* fixed-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -1,4 +1,4 @@
1
- /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* indicators-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["showClearIndicator"];
4
4
  import "./indicators-container.compiled.css";
@@ -1,4 +1,4 @@
1
- /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu-top-layer.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./menu-top-layer.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* menu.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* menu.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./menu.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* picker-button-container.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./picker-button-container.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "19.4.2",
3
+ "version": "19.4.4",
4
4
  "description": "A date time picker allows the user to select an associated date and time.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,8 +35,8 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@atlaskit/analytics-next": "^12.6.0",
38
- "@atlaskit/button": "^25.6.0",
39
- "@atlaskit/calendar": "^19.5.0",
38
+ "@atlaskit/button": "^25.8.0",
39
+ "@atlaskit/calendar": "^19.6.0",
40
40
  "@atlaskit/css": "^1.1.0",
41
41
  "@atlaskit/ds-lib": "^8.0.0",
42
42
  "@atlaskit/icon": "^38.0.0",
@@ -44,12 +44,12 @@
44
44
  "@atlaskit/locale": "^5.5.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.2.0",
46
46
  "@atlaskit/popper": "^9.4.0",
47
- "@atlaskit/primitives": "^22.6.0",
47
+ "@atlaskit/primitives": "^22.7.0",
48
48
  "@atlaskit/react-compiler-gating": "^0.2.0",
49
49
  "@atlaskit/react-select": "^4.12.0",
50
- "@atlaskit/select": "^23.1.0",
51
- "@atlaskit/tokens": "^20.8.0",
52
- "@atlaskit/top-layer": "^7.0.0",
50
+ "@atlaskit/select": "^23.2.0",
51
+ "@atlaskit/tokens": "^20.11.0",
52
+ "@atlaskit/top-layer": "^7.2.0",
53
53
  "@babel/runtime": "^7.0.0",
54
54
  "@compiled/react": "^1.0.2",
55
55
  "date-fns": "^2.17.0"
@@ -62,16 +62,16 @@
62
62
  "@af/integration-testing": "workspace:^",
63
63
  "@af/visual-regression": "workspace:^",
64
64
  "@atlaskit/code": "^20.0.0",
65
- "@atlaskit/codemod-utils": "^5.1.0",
65
+ "@atlaskit/codemod-utils": "^5.2.0",
66
66
  "@atlaskit/docs": "^12.3.0",
67
67
  "@atlaskit/form": "^18.3.0",
68
68
  "@atlaskit/heading": "^8.0.0",
69
69
  "@atlaskit/link": "^5.1.0",
70
70
  "@atlaskit/menu": "^11.0.0",
71
- "@atlaskit/modal-dialog": "^17.1.0",
72
- "@atlaskit/popup": "^10.1.0",
71
+ "@atlaskit/modal-dialog": "^17.2.0",
72
+ "@atlaskit/popup": "^10.2.0",
73
73
  "@atlaskit/range": "^12.2.0",
74
- "@atlaskit/section-message": "^10.2.0",
74
+ "@atlaskit/section-message": "^10.3.0",
75
75
  "@atlaskit/textfield": "^10.3.0",
76
76
  "@atlaskit/toggle": "^17.3.0",
77
77
  "@atlassian/feature-flags-test-utils": "^1.3.0",
@@ -98,9 +98,6 @@
98
98
  "platform-dst-motion-uplift-input": {
99
99
  "type": "boolean",
100
100
  "referenceOnly": true
101
- },
102
- "platform-dst-locale-aware-time-parsing": {
103
- "type": "boolean"
104
101
  }
105
102
  },
106
103
  "homepage": "https://atlassian.design/components/datetime-picker/"
@@ -1,15 +0,0 @@
1
- import { type ASTPath, type JSCodeshift, type JSXAttribute, type JSXElement } from 'jscodeshift';
2
-
3
- export const getJSXAttributeByName: (
4
- j: JSCodeshift,
5
- jsxElementPath: ASTPath<JSXElement>,
6
- attributeName: string,
7
- ) => JSXAttribute | undefined = (
8
- j: JSCodeshift,
9
- jsxElementPath: ASTPath<JSXElement>,
10
- attributeName: string,
11
- ): JSXAttribute | undefined => {
12
- const attributes: JSXAttribute[] = j(jsxElementPath).find(j.JSXAttribute).nodes();
13
-
14
- return attributes?.find((attr) => attr.name && attr.name.name === attributeName);
15
- };
@@ -1,17 +0,0 @@
1
- import { type ASTPath, type JSCodeshift, type JSXAttribute, type JSXElement } from 'jscodeshift';
2
- import { type Collection } from 'jscodeshift/src/Collection';
3
-
4
- export function getJSXAttributesByName(
5
- j: JSCodeshift,
6
- jsxElementPath: ASTPath<JSXElement>,
7
- attributeName: string,
8
- ): Collection<JSXAttribute> {
9
- return j(jsxElementPath)
10
- .find(j.JSXOpeningElement)
11
- .find(j.JSXAttribute)
12
- .filter((jsxAttributePath) =>
13
- j(jsxAttributePath)
14
- .find(j.JSXIdentifier)
15
- .some((jsxIdentifierPath) => jsxIdentifierPath.node.name === attributeName),
16
- );
17
- }