@atlaskit/datetime-picker 17.8.1 → 17.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,111 @@
1
1
  # @atlaskit/datetime-picker
2
2
 
3
+ ## 17.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.8.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`7250582895c0b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7250582895c0b) -
14
+ Top-layer adoption work behind the `platform-dst-top-layer` feature flag. Public adopter APIs are
15
+ intentionally kept narrow while the top-layer API surface settles, with one exception called out
16
+ below.
17
+
18
+ Highlights:
19
+ - Pass the full `[along, away]` legacy popper offset through to the new top-layer
20
+ `placement.offset` API (via `fromLegacyPlacement`). Previously only the `away` axis was
21
+ forwarded, which dropped the `along` offset for consumers of `Popup`, `PopupSelect`,
22
+ `Spotlight`, and `Tooltip` when `platform-dst-top-layer` is enabled.
23
+ - Fix broken import of `dialogHeight` and `dialogWidth` from the removed utils module in
24
+ `@atlaskit/modal-dialog`.
25
+
26
+ Public API:
27
+ - **`@atlaskit/tooltip`** (`minor`): add an optional `testId?: string` field to `TriggerProps`.
28
+ This is additive (no existing prop changes shape). Required because `@atlaskit/button/new` (and
29
+ other `Pressable`-backed primitives) overwrite `data-testid` from spread, so the legacy
30
+ `(triggerProps as any)['data-testid']` workaround is silently absorbed by those consumers. A
31
+ typed `testId` field flows through their own `testId` destructure instead, restoring
32
+ `data-testid` propagation onto the rendered trigger element.
33
+ - **`@atlaskit/popup`**, **`@atlaskit/dropdown-menu`** (`patch`): no public type changes. Wider
34
+ `aria-haspopup` unions that the FF-on path produces are bridged at the package boundary into
35
+ `@atlaskit/top-layer` with localised `FUDGE(top-layer-api)` casts, documented in
36
+ `packages/design-system/top-layer/notes/decisions/migration-roadmap.md` ("Open API decisions
37
+ deferred to a follow-up PR"). They will be widened in a follow-up `minor` PR once the top-layer
38
+ API is committed.
39
+ - **`@atlaskit/modal-dialog`**, **`@atlaskit/select`**, **`@atlaskit/spotlight`**
40
+ (`patch`/`minor`): no public type changes; bug fixes only.
41
+
42
+ Merge-readiness fixes (FF-on test wiring + adopter behavior):
43
+ - **`@atlaskit/popup`** (`minor`): wire the compositional `PopupContent` to delegate to
44
+ `PopupContentTopLayer` when `platform-dst-top-layer` is enabled. Previously only the legacy
45
+ `Popup` component had the FF branch, leaving consumers of the compositional API on the legacy
46
+ popper path.
47
+ - **`@atlaskit/select`** (`minor`): add an `onClick` handler to the `PopupSelect` top-layer
48
+ trigger so clicks open/close the menu (mirrors the legacy global click handler in
49
+ `popup-select.tsx`). Add explicit Escape handling on the menu's `onKeyDown` so the menu closes
50
+ and focus returns to the trigger.
51
+ - **`@atlaskit/top-layer`** (`patch`): the `<dialog>` rendered by the Dialog primitive now sets
52
+ `aria-modal="true"` explicitly. Modern browsers infer modal semantics from `.showModal()` but
53
+ some assistive tech still keys off the explicit attribute.
54
+ - **`@atlaskit/top-layer`** (`patch`): guard `use-anchor-positioning` against environments where
55
+ `ResizeObserver` is not defined (e.g. jest's `node` environment, used by the post-office test
56
+ suite). The observer is used to wait for the popover's first valid layout before measuring;
57
+ consumers in non-DOM jest environments now get a no-op observer and the scroll/resize listeners
58
+ still apply if the host environment polyfills `showPopover`. Real browsers always have
59
+ `ResizeObserver`.
60
+ - **`@atlaskit/modal-dialog`** (`patch`): on the FF-on path, drop the `tabIndex={-1}` (and unused
61
+ `:focus-visible` outline) from the modal content wrapper. The native `<dialog>.showModal()`
62
+ focus-delegate algorithm picks the first focusable descendant (including `tabindex=-1`), and the
63
+ wrapper was hijacking initial focus from the close button. Also honor `shouldReturnFocus={ref}`
64
+ on the FF-on path (an unmount-cleanup focuses the ref after `dialog.close()` so it overrides the
65
+ browser's automatic return-to-trigger). Boolean `shouldReturnFocus={false}` is not yet honored
66
+ on the FF-on path — see `top-layer/notes/merge-blockers.md`.
67
+ - **`@atlaskit/datetime-picker`** (`patch`): on the FF-on path, set `mode="manual"` on the
68
+ `Popup.Content` rendered by both `internal/menu-top-layer.tsx` (date-picker calendar) and
69
+ `internal/fixed-layer-menu-top-layer.tsx` (time-picker menu). With the default `mode="auto"`,
70
+ the same click event that opens the menu (which targets the react-select combobox input —
71
+ outside the popover element) bubbles to the browser's native popover light-dismiss handler and
72
+ immediately closes the menu. react-select / DateTimePicker already own outside-click and Esc
73
+ dismissal via their own state, so opting out of the native auto-dismiss is the correct
74
+ integration. Also extend the existing Esc → trigger-focus restoration in
75
+ `components/date-picker.tsx` to the FF-on path (manual mode disables the browser's built-in
76
+ focus return, and the legacy code path was already handling this for itself behind an FF
77
+ negation).
78
+ - **`@atlaskit/popup`** (no public API change): no source changes — only FF-on Playwright
79
+ spec/example fixes drove the suite from 21/3/2 to 27/0/0. Notable: the two `test.fixme`'d
80
+ nested-popover cases were not browser limitations; `popover="auto"` chains correctly via DOM
81
+ ancestry (the original fixmes had the wrong testId selector). Added `testId` props to two
82
+ examples (`16-popup-with-a11y-props`, `18-should-fit-container`) so default-shape tests can
83
+ reach the trigger.
84
+ - Test alignment for FF-on Playwright suites across `popup`, `select`, `datetime-picker`,
85
+ `inline-dialog`, `inline-message`, and `modal-dialog`: selector updates to match the new
86
+ top-layer testId convention (`${testId}--content`, `[role="dialog"][aria-label="calendar"]`),
87
+ per-spec `skipAxeCheck()` for example-level color-contrast violations unrelated to the
88
+ migration, and focus assertions adjusted to match native `<dialog>` / `Popup.Content` auto-focus
89
+ semantics (focus lands on the first focusable child, not the dialog container itself).
90
+ - **`@atlassian/capacity-planning-capacity-graph`**, **`@atlaskit/color-picker`**,
91
+ **`@atlassian/timeline-table`**, **`@atlassian/global-side-navigation`** (`patch`): scope `fg`
92
+ mocks in unit tests so `platform-dst-top-layer` returns `false`. JSDOM does not implement the
93
+ native Popover API (`showPopover`/`hidePopover`/`toggle` events), so leaving the gate ON in unit
94
+ tests caused popover content to remain in the DOM after close and broke close-behaviour
95
+ assertions. Browser coverage for the FF-on path is provided by the Playwright suites listed
96
+ above.
97
+ - **`@atlaskit/dropdown-menu`** (no public API change): test/example-only fixes for the FF-on
98
+ Playwright suite. Added `role="menuitem"` to the nested-trigger `ButtonItem` in
99
+ `examples/93-testing-nested-keyboard-navigation-top-layer.tsx` to satisfy axe's
100
+ `aria-required-children` rule on the parent menu. Added a `test.beforeEach(skipAxeCheck)` to
101
+ `dropdown-menu.spec.tsx` (FF-on suite) for example-level `color-contrast` violations on the
102
+ pre-existing `color.text.selected`/`color.background.selected` token pair (3.91:1). Replaced a
103
+ deadlocking `await expect(moveItem).not.toBeFocused()` pre-open assertion (Playwright's
104
+ auto-wait blocks 5s on the absent element) with `await expect(moveItem).not.toBeVisible()`.
105
+ Suite result: 22/22 passing.
106
+
107
+ - Updated dependencies
108
+
3
109
  ## 17.8.1
4
110
 
5
111
  ### Patch Changes
@@ -44,7 +44,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
44
44
  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; }
45
45
  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; }
46
46
  var packageName = "@atlaskit/datetime-picker";
47
- var packageVersion = "17.8.0";
47
+ var packageVersion = "17.8.2";
48
48
  var styles = {
49
49
  pickerContainerStyle: "_kqswh2mm",
50
50
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -30,7 +30,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
30
30
  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; } /// <reference types="node" />
31
31
  // oxlint-disable-next-line @atlassian/no-restricted-imports
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "17.8.0";
33
+ var packageVersion = "17.8.2";
34
34
  var compiledStyles = {
35
35
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
36
36
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -33,7 +33,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
33
33
  // for typing `process`
34
34
  // oxlint-disable-next-line @atlassian/no-restricted-imports
35
35
  var packageName = "@atlaskit/datetime-picker";
36
- var packageVersion = "17.8.0";
36
+ var packageVersion = "17.8.2";
37
37
  var analyticsAttributes = {
38
38
  componentName: 'dateTimePicker',
39
39
  packageName: packageName,
@@ -30,7 +30,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
30
30
  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; }
31
31
  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
32
32
  var packageName = "@atlaskit/datetime-picker";
33
- var packageVersion = "17.8.0";
33
+ var packageVersion = "17.8.2";
34
34
  var defaultTimeFormat = 'h:mma';
35
35
  var menuStyles = {
36
36
  /* Need to remove default absolute positioning as that causes issues with position fixed */
@@ -31,7 +31,7 @@ import { MenuTopLayer } from '../internal/menu-top-layer';
31
31
  import { parseDate } from '../internal/parse-date';
32
32
  import { makeSingleValue } from '../internal/single-value';
33
33
  const packageName = "@atlaskit/datetime-picker";
34
- const packageVersion = "17.8.0";
34
+ const packageVersion = "17.8.2";
35
35
  const styles = {
36
36
  pickerContainerStyle: "_kqswh2mm",
37
37
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -16,7 +16,7 @@ import { convertTokens } from '../internal/parse-tokens';
16
16
  import DatePicker from './date-picker';
17
17
  import TimePicker from './time-picker';
18
18
  const packageName = "@atlaskit/datetime-picker";
19
- const packageVersion = "17.8.0";
19
+ const packageVersion = "17.8.2";
20
20
  const compiledStyles = {
21
21
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
22
22
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -20,7 +20,7 @@ import { convertTokens } from '../internal/parse-tokens';
20
20
  import DatePicker from './date-picker';
21
21
  import TimePicker from './time-picker';
22
22
  const packageName = "@atlaskit/datetime-picker";
23
- const packageVersion = "17.8.0";
23
+ const packageVersion = "17.8.2";
24
24
  const analyticsAttributes = {
25
25
  componentName: 'dateTimePicker',
26
26
  packageName,
@@ -17,7 +17,7 @@ import { convertTokens } from '../internal/parse-tokens';
17
17
  import { placeholderDatetime } from '../internal/placeholder-date-time';
18
18
  import { makeSingleValue } from '../internal/single-value';
19
19
  const packageName = "@atlaskit/datetime-picker";
20
- const packageVersion = "17.8.0";
20
+ const packageVersion = "17.8.2";
21
21
  const defaultTimeFormat = 'h:mma';
22
22
  const menuStyles = {
23
23
  /* Need to remove default absolute positioning as that causes issues with position fixed */
@@ -37,7 +37,7 @@ import { MenuTopLayer } from '../internal/menu-top-layer';
37
37
  import { parseDate } from '../internal/parse-date';
38
38
  import { makeSingleValue } from '../internal/single-value';
39
39
  var packageName = "@atlaskit/datetime-picker";
40
- var packageVersion = "17.8.0";
40
+ var packageVersion = "17.8.2";
41
41
  var styles = {
42
42
  pickerContainerStyle: "_kqswh2mm",
43
43
  dropdownIndicatorStyles: "_1ul91k8s _1tke1k8s _1e0c1txw _4cvr1h6o _1bah1h6o",
@@ -25,7 +25,7 @@ import { convertTokens } from '../internal/parse-tokens';
25
25
  import DatePicker from './date-picker';
26
26
  import TimePicker from './time-picker';
27
27
  var packageName = "@atlaskit/datetime-picker";
28
- var packageVersion = "17.8.0";
28
+ var packageVersion = "17.8.2";
29
29
  var compiledStyles = {
30
30
  datePickerContainerStyles: "_i0dl1ssb _16jlkb7n _1o9zidpf",
31
31
  timePickerContainerStyles: "_i0dl1ssb _16jlkb7n",
@@ -27,7 +27,7 @@ import { convertTokens } from '../internal/parse-tokens';
27
27
  import DatePicker from './date-picker';
28
28
  import TimePicker from './time-picker';
29
29
  var packageName = "@atlaskit/datetime-picker";
30
- var packageVersion = "17.8.0";
30
+ var packageVersion = "17.8.2";
31
31
  var analyticsAttributes = {
32
32
  componentName: 'dateTimePicker',
33
33
  packageName: packageName,
@@ -23,7 +23,7 @@ import { convertTokens } from '../internal/parse-tokens';
23
23
  import { placeholderDatetime } from '../internal/placeholder-date-time';
24
24
  import { makeSingleValue } from '../internal/single-value';
25
25
  var packageName = "@atlaskit/datetime-picker";
26
- var packageVersion = "17.8.0";
26
+ var packageVersion = "17.8.2";
27
27
  var defaultTimeFormat = 'h:mma';
28
28
  var menuStyles = {
29
29
  /* Need to remove default absolute positioning as that causes issues with position fixed */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/datetime-picker",
3
- "version": "17.8.1",
3
+ "version": "17.8.3",
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/"
@@ -44,13 +44,13 @@
44
44
  "@atlaskit/calendar": "^17.2.0",
45
45
  "@atlaskit/css": "^0.19.0",
46
46
  "@atlaskit/ds-lib": "^7.0.0",
47
- "@atlaskit/icon": "^34.5.0",
47
+ "@atlaskit/icon": "^35.0.0",
48
48
  "@atlaskit/layering": "^3.7.0",
49
49
  "@atlaskit/locale": "^4.1.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/popper": "^7.2.0",
52
52
  "@atlaskit/primitives": "^19.0.0",
53
- "@atlaskit/select": "^21.11.0",
53
+ "@atlaskit/select": "^21.12.0",
54
54
  "@atlaskit/tokens": "^13.0.0",
55
55
  "@atlaskit/top-layer": "^0.6.0",
56
56
  "@babel/runtime": "^7.0.0",
@@ -71,7 +71,7 @@
71
71
  "@atlaskit/heading": "^5.4.0",
72
72
  "@atlaskit/link": "^3.4.0",
73
73
  "@atlaskit/modal-dialog": "^15.0.0",
74
- "@atlaskit/popup": "^4.18.0",
74
+ "@atlaskit/popup": "^4.19.0",
75
75
  "@atlaskit/range": "^10.1.0",
76
76
  "@atlaskit/section-message": "^8.12.0",
77
77
  "@atlaskit/textfield": "^8.3.0",