@atlaskit/top-layer 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/top-layer
2
2
 
3
+ ## 5.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e8dcde6cc4e85`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e8dcde6cc4e85) -
8
+ Anchored Popovers now always stay visible, even if the element they are anchored to is invisible
9
+
3
10
  ## 5.0.1
4
11
 
5
12
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -57,6 +57,38 @@ function applyAnchorPositioning(_ref) {
57
57
  placement: placement
58
58
  })
59
59
  },
60
+ /**
61
+ * **`position-visibility: always`**
62
+ *
63
+ * `position-visibility` is used to control the visibility of an anchored
64
+ * popover based on the visibility of the element being anchored to (the target).
65
+ *
66
+ * Default `position-visibility` value: `anchors-visible` → hide the anchored
67
+ * popover when the target is fully clipped by an ancestor (eg a scroll container)
68
+ * or is `visibility:hidden`.
69
+ * Sadly this "automatic hiding" does not actually "close" the popover,
70
+ * so things like `:popover-open` are still active, even though the popover
71
+ * is no longer painted and no longer receives pointer input. Chrome keeps it
72
+ * focusable and in the accessibility tree, so keyboard and screen reader users
73
+ * can still land inside a surface that is not painted.
74
+ * Per-engine behaviour: `notes/decisions/position-visibility-always.md`.
75
+ *
76
+ * Generally we have not run into issues with the default (`anchors-visible`)
77
+ *
78
+ * Exceptions:
79
+ * - Target is intentionally not visible (eg `position:absolute` moving it outside of
80
+ * its parent's "clipped boundary", or a `visibility:hidden` trigger)
81
+ * - A trigger is scrolled out of its scroll container while the popover is open.
82
+ *
83
+ * We are switching from `anchors-visible` → `always` _for now_ to force no
84
+ * automatic hiding of the popover. There seems to be no compelling reason to use
85
+ * the default value. If one arises in the future, we could look towards making
86
+ * this behaviour configurable.
87
+ */
88
+ {
89
+ property: 'position-visibility',
90
+ value: 'always'
91
+ },
60
92
  // Reset browser default popover positioning that conflicts
61
93
  // with anchor positioning (UA: `inset: 0; margin: auto;`)
62
94
  {
@@ -1,4 +1,4 @@
1
- /* popover.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -1,4 +1,4 @@
1
- /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./dialog-content.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useId, useLayoutEffect, useRef } from 'react';
@@ -51,6 +51,38 @@ export function applyAnchorPositioning({
51
51
  placement
52
52
  })
53
53
  },
54
+ /**
55
+ * **`position-visibility: always`**
56
+ *
57
+ * `position-visibility` is used to control the visibility of an anchored
58
+ * popover based on the visibility of the element being anchored to (the target).
59
+ *
60
+ * Default `position-visibility` value: `anchors-visible` → hide the anchored
61
+ * popover when the target is fully clipped by an ancestor (eg a scroll container)
62
+ * or is `visibility:hidden`.
63
+ * Sadly this "automatic hiding" does not actually "close" the popover,
64
+ * so things like `:popover-open` are still active, even though the popover
65
+ * is no longer painted and no longer receives pointer input. Chrome keeps it
66
+ * focusable and in the accessibility tree, so keyboard and screen reader users
67
+ * can still land inside a surface that is not painted.
68
+ * Per-engine behaviour: `notes/decisions/position-visibility-always.md`.
69
+ *
70
+ * Generally we have not run into issues with the default (`anchors-visible`)
71
+ *
72
+ * Exceptions:
73
+ * - Target is intentionally not visible (eg `position:absolute` moving it outside of
74
+ * its parent's "clipped boundary", or a `visibility:hidden` trigger)
75
+ * - A trigger is scrolled out of its scroll container while the popover is open.
76
+ *
77
+ * We are switching from `anchors-visible` → `always` _for now_ to force no
78
+ * automatic hiding of the popover. There seems to be no compelling reason to use
79
+ * the default value. If one arises in the future, we could look towards making
80
+ * this behaviour configurable.
81
+ */
82
+ {
83
+ property: 'position-visibility',
84
+ value: 'always'
85
+ },
54
86
  // Reset browser default popover positioning that conflicts
55
87
  // with anchor positioning (UA: `inset: 0; margin: auto;`)
56
88
  {
@@ -1,4 +1,4 @@
1
- /* popover.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./popover.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useId, useLayoutEffect, useMemo, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./popover-surface.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* dialog-content.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./dialog-content.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useId, useLayoutEffect, useRef } from 'react';
@@ -51,6 +51,38 @@ export function applyAnchorPositioning(_ref) {
51
51
  placement: placement
52
52
  })
53
53
  },
54
+ /**
55
+ * **`position-visibility: always`**
56
+ *
57
+ * `position-visibility` is used to control the visibility of an anchored
58
+ * popover based on the visibility of the element being anchored to (the target).
59
+ *
60
+ * Default `position-visibility` value: `anchors-visible` → hide the anchored
61
+ * popover when the target is fully clipped by an ancestor (eg a scroll container)
62
+ * or is `visibility:hidden`.
63
+ * Sadly this "automatic hiding" does not actually "close" the popover,
64
+ * so things like `:popover-open` are still active, even though the popover
65
+ * is no longer painted and no longer receives pointer input. Chrome keeps it
66
+ * focusable and in the accessibility tree, so keyboard and screen reader users
67
+ * can still land inside a surface that is not painted.
68
+ * Per-engine behaviour: `notes/decisions/position-visibility-always.md`.
69
+ *
70
+ * Generally we have not run into issues with the default (`anchors-visible`)
71
+ *
72
+ * Exceptions:
73
+ * - Target is intentionally not visible (eg `position:absolute` moving it outside of
74
+ * its parent's "clipped boundary", or a `visibility:hidden` trigger)
75
+ * - A trigger is scrolled out of its scroll container while the popover is open.
76
+ *
77
+ * We are switching from `anchors-visible` → `always` _for now_ to force no
78
+ * automatic hiding of the popover. There seems to be no compelling reason to use
79
+ * the default value. If one arises in the future, we could look towards making
80
+ * this behaviour configurable.
81
+ */
82
+ {
83
+ property: 'position-visibility',
84
+ value: 'always'
85
+ },
54
86
  // Reset browser default popover positioning that conflicts
55
87
  // with anchor positioning (UA: `inset: 0; margin: auto;`)
56
88
  {
@@ -1,4 +1,4 @@
1
- /* popover.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./popover.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useId, useLayoutEffect, useMemo, useRef } from 'react';
@@ -1,4 +1,4 @@
1
- /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* popover-surface.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./popover-surface.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/top-layer",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Low-level layering primitives based on popover and dialog",
5
5
  "homepage": "https://atlassian.design/components/top-layer",
6
6
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",