@atlaskit/top-layer 6.2.1 → 6.2.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 +7 -0
- package/dist/cjs/dialog/dialog-content.compiled.css +27 -15
- package/dist/cjs/dialog/dialog-content.js +6 -14
- package/dist/cjs/popover/popover.compiled.css +39 -22
- package/dist/cjs/popover/popover.js +16 -22
- package/dist/es2019/dialog/dialog-content.compiled.css +27 -15
- package/dist/es2019/dialog/dialog-content.js +6 -14
- package/dist/es2019/popover/popover.compiled.css +39 -22
- package/dist/es2019/popover/popover.js +16 -22
- package/dist/esm/dialog/dialog-content.compiled.css +27 -15
- package/dist/esm/dialog/dialog-content.js +6 -14
- package/dist/esm/popover/popover.compiled.css +39 -22
- package/dist/esm/popover/popover.js +16 -22
- package/dist/types/dialog/dialog-content.d.ts +3 -2
- package/dist/types/dialog/types.d.ts +3 -2
- package/dist/types/internal/surface-reset.d.ts +16 -12
- package/dist/types/popover/popover.d.ts +3 -2
- package/dist/types/popover/types.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/top-layer
|
|
2
2
|
|
|
3
|
+
## 6.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`481f10d4007ce`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/481f10d4007ce) -
|
|
8
|
+
Popover and Dialog surfaces are now protected from most consumer styles that target them.
|
|
9
|
+
|
|
3
10
|
## 6.2.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
._19itglyw{border:none}
|
|
2
1
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
3
2
|
._1m5e1op4::backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
4
3
|
._1m5exbuz::-ms-backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
4
|
._1m5exbuz::backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
6
6
|
._y44v7kvq{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
7
|
-
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}.
|
|
7
|
+
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}._1715kb7n:defined:defined:defined{opacity:1}
|
|
8
|
+
._18u01wug{margin-left:auto}
|
|
8
9
|
._19pk1wug{margin-top:auto}
|
|
9
|
-
.
|
|
10
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
11
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
10
17
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
11
18
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
12
19
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
13
20
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
14
|
-
._1nmz4jg8{word-break:normal}
|
|
15
21
|
._1o511hrf{animation-fill-mode:both}
|
|
16
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
19
25
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
26
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
20
27
|
._2hwx1wug{margin-right:auto}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
28
|
+
._6hkqidpf:defined:defined:defined{inset-block-end:0}
|
|
29
|
+
._722r1ule[open][open][open]{display:block}
|
|
30
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
31
|
+
._dbnbze3t:defined:defined:defined{padding-block-end:var(--ds-space-0,0)}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
26
34
|
._k8m011k7{transition-property:overlay,display}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
35
|
+
._lizuze3t:defined:defined:defined{padding-inline-end:var(--ds-space-0,0)}
|
|
36
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
37
|
+
._mkdmze3t:defined:defined:defined{padding-block-start:var(--ds-space-0,0)}
|
|
29
38
|
._otyr1wug{margin-bottom:auto}
|
|
30
39
|
._p12fglyw{max-width:none}
|
|
31
|
-
.
|
|
32
|
-
.
|
|
40
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
41
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
42
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
43
|
+
._v12pze3t:defined:defined:defined{padding-inline-start:var(--ds-space-0,0)}
|
|
44
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
33
45
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156y147i{transition-duration:var(--ds-duration-instant,0ms)}}
|
|
@@ -19,22 +19,13 @@ var _useAnimatedVisibility = require("../internal/use-animated-visibility");
|
|
|
19
19
|
var _useFocusWrap = require("../internal/use-focus-wrap");
|
|
20
20
|
var _useSafariEscapeFix2 = require("../internal/use-safari-escape-fix");
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
|
-
// Surface reset
|
|
23
|
-
// Neutralises inherited interaction and text-layout properties (e.g.
|
|
24
|
-
// `pointer-events: none` and `white-space: nowrap`) that leak into the top-layer
|
|
25
|
-
// surface. Excludes `color`/`font` (theming) and `direction`/`unicode-bidi` (RTL
|
|
26
|
-
// must inherit). The reset has no box side-effects, so it does not reintroduce
|
|
27
|
-
// the `margin: auto` centering problem that kept `height: auto` off `Dialog`.
|
|
28
|
-
//
|
|
29
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
30
|
-
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
31
|
-
// The `satisfies` check below fails the build if either copy drifts.
|
|
22
|
+
// Surface reset. KEEP IN SYNC with `surfaceResetStyles` in `popover/popover.tsx`.
|
|
32
23
|
var surfaceResetStyles = {
|
|
33
|
-
root: "
|
|
24
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
34
25
|
};
|
|
35
26
|
true;
|
|
36
27
|
var dialogStyles = {
|
|
37
|
-
root: "
|
|
28
|
+
root: "_19pk1wug _2hwx1wug _otyr1wug _18u01wug _p12fglyw _lzhqglyw _mkdmze3t _lizuze3t _dbnbze3t _v12pze3t _1yd01wug _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1dqv1n9t _6hkqidpf _1rec1j28 _722r1ule",
|
|
38
29
|
motion: "_k8m011k7 _1oeci9qs _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
39
30
|
enter: "_y44v7kvq",
|
|
40
31
|
exit: "_y44vgeqi"
|
|
@@ -51,8 +42,9 @@ var backdropStyles = {
|
|
|
51
42
|
* background, border-radius, or layout. Consumers provide their own styling.
|
|
52
43
|
*
|
|
53
44
|
* Visibility is controlled declaratively via `isOpen`:
|
|
54
|
-
* - `isOpen={true}` calls `.showModal()` (entry
|
|
55
|
-
* - `isOpen={false}` calls `.close()` (exit animation
|
|
45
|
+
* - `isOpen={true}` calls `.showModal()` (entry via a keyframe animation)
|
|
46
|
+
* - `isOpen={false}` calls `.close()` (exit via a keyframe animation, kept visible
|
|
47
|
+
* by an `allow-discrete` transition)
|
|
56
48
|
*
|
|
57
49
|
* Handles native `cancel` event (Escape) and backdrop click detection.
|
|
58
50
|
*
|
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._1vdi1wug:defined:defined:defined{inset:auto}
|
|
2
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
3
3
|
._y44v179n{animation:var(--ds-popover-motion-enter)}
|
|
4
|
-
._y44vof1f{animation:var(--ds-popover-motion-exit)}.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
9
|
-
.
|
|
4
|
+
._y44vof1f{animation:var(--ds-popover-motion-exit)}._13shidpf:defined:defined:defined{padding-right:0}
|
|
5
|
+
._1715kb7n:defined:defined:defined{opacity:1}
|
|
6
|
+
._17ke4jg8:defined:defined:defined{align-items:normal}
|
|
7
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
8
|
+
._1ap0idpf:defined:defined:defined{margin-left:0}
|
|
9
|
+
._1aqridpf:defined:defined:defined{margin-bottom:0}
|
|
10
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
11
|
+
._1blzewfl:defined:defined:defined{overflow-y:visible}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
17
|
+
._1maw1q9c:defined:defined:defined{flex-wrap:nowrap}
|
|
18
|
+
._1mjeidpf:defined:defined:defined{padding-bottom:0}
|
|
10
19
|
._1o511hrf{animation-fill-mode:both}
|
|
11
20
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
12
|
-
.
|
|
13
|
-
.
|
|
21
|
+
._1ogd4jg8:defined:defined:defined{justify-content:normal}
|
|
22
|
+
._1p7w1txw:popover-open:popover-open:popover-open{display:flex}
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1rmr1wug:defined:defined:defined{height:auto}
|
|
25
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
14
26
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
.
|
|
27
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
28
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
29
|
+
._az2pidpf:defined:defined:defined{padding-top:0}
|
|
30
|
+
._b2a9idpf:defined:defined:defined{margin-top:0}
|
|
31
|
+
._byz4idpf:defined:defined:defined{padding-left:0}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
20
34
|
._k8m011k7{transition-property:overlay,display}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
35
|
+
._kqwmvrvc:defined:defined:defined{flex-direction:row}
|
|
36
|
+
._li0iglyw:defined:defined:defined{max-width:none}
|
|
37
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
38
|
+
._qctn1ns9:defined:defined:defined{width:-moz-fit-content;width:fit-content}
|
|
39
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
40
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
41
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
42
|
+
._wmifewfl:defined:defined:defined{overflow-x:visible}
|
|
43
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
44
|
+
._z3e7idpf:defined:defined:defined{margin-right:0}
|
|
28
45
|
:where(._1yp3idpf)>*{min-inline-size:0}
|
|
29
46
|
:where(._51hckb7n)>*{flex-grow:1}
|
|
30
47
|
:where(._f5r5idpf)>*{min-block-size:0}
|
|
@@ -57,30 +57,23 @@ var supportsPopoverHint = (0, _once.default)(function () {
|
|
|
57
57
|
return element.popover === 'hint';
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// `display: none` when closed).
|
|
72
|
-
//
|
|
73
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
74
|
-
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
75
|
-
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
76
|
-
// co-located and duplicated deliberately. The `satisfies` check below fails the
|
|
77
|
-
// build if either copy drifts.
|
|
60
|
+
/**
|
|
61
|
+
* **Surface reset**
|
|
62
|
+
*
|
|
63
|
+
* The host is still a DOM child of its trigger for inheritance, so it inherits
|
|
64
|
+
* values like `pointer-events: none` or `white-space: nowrap`. Resets them to
|
|
65
|
+
* what `<body>` gave the portal path. `color`, `font` and direction still inherit.
|
|
66
|
+
* Not `all: initial`: that would also override the UA `[popover]` rules.
|
|
67
|
+
*
|
|
68
|
+
* KEEP IN SYNC with `dialog/dialog-content.tsx` (ADS forbids shared styles).
|
|
69
|
+
* The `satisfies` check below catches drift.
|
|
70
|
+
*/
|
|
78
71
|
var surfaceResetStyles = {
|
|
79
|
-
root: "
|
|
72
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
80
73
|
};
|
|
81
74
|
true;
|
|
82
75
|
var styles = {
|
|
83
|
-
root: "
|
|
76
|
+
root: "_lzhqglyw _az2pidpf _13shidpf _1mjeidpf _byz4idpf _b2a9idpf _z3e7idpf _1aqridpf _1ap0idpf _1vdi1wug _wmifewfl _1blzewfl _1rec1j28 _kqwmvrvc _1maw1q9c _17ke4jg8 _1ogd4jg8 _1dqv1n9t _qctn1ns9 _1rmr1wug _1yd01wug _li0iglyw _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1p7w1txw _51hckb7n _1yp3idpf _f5r5idpf",
|
|
84
77
|
motion: "_k8m011k7 _1oecdn4k _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
85
78
|
enter: "_y44v179n",
|
|
86
79
|
exit: "_y44vof1f"
|
|
@@ -122,8 +115,9 @@ var POPUP_ROLES = new Set(['menu', 'listbox', 'dialog', 'alertdialog', 'tree', '
|
|
|
122
115
|
*
|
|
123
116
|
* ### 🔌 Visibility
|
|
124
117
|
*
|
|
125
|
-
* - `isOpen={true}` calls `showPopover()` (entry via
|
|
126
|
-
* - `isOpen={false}` calls `hidePopover()` (exit via
|
|
118
|
+
* - `isOpen={true}` calls `showPopover()` (entry via a keyframe animation).
|
|
119
|
+
* - `isOpen={false}` calls `hidePopover()` (exit via a keyframe animation, kept
|
|
120
|
+
* visible by an `allow-discrete` transition).
|
|
127
121
|
*
|
|
128
122
|
* ### 📜 Browser dismiss is non-cancellable
|
|
129
123
|
*
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
._19itglyw{border:none}
|
|
2
1
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
3
2
|
._1m5e1op4::backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
4
3
|
._1m5exbuz::-ms-backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
4
|
._1m5exbuz::backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
6
6
|
._y44v7kvq{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
7
|
-
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}.
|
|
7
|
+
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}._1715kb7n:defined:defined:defined{opacity:1}
|
|
8
|
+
._18u01wug{margin-left:auto}
|
|
8
9
|
._19pk1wug{margin-top:auto}
|
|
9
|
-
.
|
|
10
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
11
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
10
17
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
11
18
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
12
19
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
13
20
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
14
|
-
._1nmz4jg8{word-break:normal}
|
|
15
21
|
._1o511hrf{animation-fill-mode:both}
|
|
16
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
19
25
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
26
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
20
27
|
._2hwx1wug{margin-right:auto}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
28
|
+
._6hkqidpf:defined:defined:defined{inset-block-end:0}
|
|
29
|
+
._722r1ule[open][open][open]{display:block}
|
|
30
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
31
|
+
._dbnbze3t:defined:defined:defined{padding-block-end:var(--ds-space-0,0)}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
26
34
|
._k8m011k7{transition-property:overlay,display}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
35
|
+
._lizuze3t:defined:defined:defined{padding-inline-end:var(--ds-space-0,0)}
|
|
36
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
37
|
+
._mkdmze3t:defined:defined:defined{padding-block-start:var(--ds-space-0,0)}
|
|
29
38
|
._otyr1wug{margin-bottom:auto}
|
|
30
39
|
._p12fglyw{max-width:none}
|
|
31
|
-
.
|
|
32
|
-
.
|
|
40
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
41
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
42
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
43
|
+
._v12pze3t:defined:defined:defined{padding-inline-start:var(--ds-space-0,0)}
|
|
44
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
33
45
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156y147i{transition-duration:var(--ds-duration-instant,0ms)}}
|
|
@@ -10,22 +10,13 @@ import { useNotifyOpenLayerObserver } from '@atlaskit/layering/use-notify-open-l
|
|
|
10
10
|
import { useAnimatedVisibility } from '../internal/use-animated-visibility';
|
|
11
11
|
import { useFocusWrap } from '../internal/use-focus-wrap';
|
|
12
12
|
import { useSafariEscapeFix } from '../internal/use-safari-escape-fix';
|
|
13
|
-
// Surface reset
|
|
14
|
-
// Neutralises inherited interaction and text-layout properties (e.g.
|
|
15
|
-
// `pointer-events: none` and `white-space: nowrap`) that leak into the top-layer
|
|
16
|
-
// surface. Excludes `color`/`font` (theming) and `direction`/`unicode-bidi` (RTL
|
|
17
|
-
// must inherit). The reset has no box side-effects, so it does not reintroduce
|
|
18
|
-
// the `margin: auto` centering problem that kept `height: auto` off `Dialog`.
|
|
19
|
-
//
|
|
20
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
21
|
-
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
22
|
-
// The `satisfies` check below fails the build if either copy drifts.
|
|
13
|
+
// Surface reset. KEEP IN SYNC with `surfaceResetStyles` in `popover/popover.tsx`.
|
|
23
14
|
const surfaceResetStyles = {
|
|
24
|
-
root: "
|
|
15
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
25
16
|
};
|
|
26
17
|
true;
|
|
27
18
|
const dialogStyles = {
|
|
28
|
-
root: "
|
|
19
|
+
root: "_19pk1wug _2hwx1wug _otyr1wug _18u01wug _p12fglyw _lzhqglyw _mkdmze3t _lizuze3t _dbnbze3t _v12pze3t _1yd01wug _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1dqv1n9t _6hkqidpf _1rec1j28 _722r1ule",
|
|
29
20
|
motion: "_k8m011k7 _1oeci9qs _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
30
21
|
enter: "_y44v7kvq",
|
|
31
22
|
exit: "_y44vgeqi"
|
|
@@ -42,8 +33,9 @@ const backdropStyles = {
|
|
|
42
33
|
* background, border-radius, or layout. Consumers provide their own styling.
|
|
43
34
|
*
|
|
44
35
|
* Visibility is controlled declaratively via `isOpen`:
|
|
45
|
-
* - `isOpen={true}` calls `.showModal()` (entry
|
|
46
|
-
* - `isOpen={false}` calls `.close()` (exit animation
|
|
36
|
+
* - `isOpen={true}` calls `.showModal()` (entry via a keyframe animation)
|
|
37
|
+
* - `isOpen={false}` calls `.close()` (exit via a keyframe animation, kept visible
|
|
38
|
+
* by an `allow-discrete` transition)
|
|
47
39
|
*
|
|
48
40
|
* Handles native `cancel` event (Escape) and backdrop click detection.
|
|
49
41
|
*
|
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._1vdi1wug:defined:defined:defined{inset:auto}
|
|
2
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
3
3
|
._y44v179n{animation:var(--ds-popover-motion-enter)}
|
|
4
|
-
._y44vof1f{animation:var(--ds-popover-motion-exit)}.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
9
|
-
.
|
|
4
|
+
._y44vof1f{animation:var(--ds-popover-motion-exit)}._13shidpf:defined:defined:defined{padding-right:0}
|
|
5
|
+
._1715kb7n:defined:defined:defined{opacity:1}
|
|
6
|
+
._17ke4jg8:defined:defined:defined{align-items:normal}
|
|
7
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
8
|
+
._1ap0idpf:defined:defined:defined{margin-left:0}
|
|
9
|
+
._1aqridpf:defined:defined:defined{margin-bottom:0}
|
|
10
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
11
|
+
._1blzewfl:defined:defined:defined{overflow-y:visible}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
17
|
+
._1maw1q9c:defined:defined:defined{flex-wrap:nowrap}
|
|
18
|
+
._1mjeidpf:defined:defined:defined{padding-bottom:0}
|
|
10
19
|
._1o511hrf{animation-fill-mode:both}
|
|
11
20
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
12
|
-
.
|
|
13
|
-
.
|
|
21
|
+
._1ogd4jg8:defined:defined:defined{justify-content:normal}
|
|
22
|
+
._1p7w1txw:popover-open:popover-open:popover-open{display:flex}
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1rmr1wug:defined:defined:defined{height:auto}
|
|
25
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
14
26
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
.
|
|
27
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
28
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
29
|
+
._az2pidpf:defined:defined:defined{padding-top:0}
|
|
30
|
+
._b2a9idpf:defined:defined:defined{margin-top:0}
|
|
31
|
+
._byz4idpf:defined:defined:defined{padding-left:0}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
20
34
|
._k8m011k7{transition-property:overlay,display}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
35
|
+
._kqwmvrvc:defined:defined:defined{flex-direction:row}
|
|
36
|
+
._li0iglyw:defined:defined:defined{max-width:none}
|
|
37
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
38
|
+
._qctn1ns9:defined:defined:defined{width:-moz-fit-content;width:fit-content}
|
|
39
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
40
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
41
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
42
|
+
._wmifewfl:defined:defined:defined{overflow-x:visible}
|
|
43
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
44
|
+
._z3e7idpf:defined:defined:defined{margin-right:0}
|
|
28
45
|
:where(._1yp3idpf)>*{min-inline-size:0}
|
|
29
46
|
:where(._51hckb7n)>*{flex-grow:1}
|
|
30
47
|
:where(._f5r5idpf)>*{min-block-size:0}
|
|
@@ -51,30 +51,23 @@ const supportsPopoverHint = once(() => {
|
|
|
51
51
|
return element.popover === 'hint';
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// `display: none` when closed).
|
|
66
|
-
//
|
|
67
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
68
|
-
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
69
|
-
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
70
|
-
// co-located and duplicated deliberately. The `satisfies` check below fails the
|
|
71
|
-
// build if either copy drifts.
|
|
54
|
+
/**
|
|
55
|
+
* **Surface reset**
|
|
56
|
+
*
|
|
57
|
+
* The host is still a DOM child of its trigger for inheritance, so it inherits
|
|
58
|
+
* values like `pointer-events: none` or `white-space: nowrap`. Resets them to
|
|
59
|
+
* what `<body>` gave the portal path. `color`, `font` and direction still inherit.
|
|
60
|
+
* Not `all: initial`: that would also override the UA `[popover]` rules.
|
|
61
|
+
*
|
|
62
|
+
* KEEP IN SYNC with `dialog/dialog-content.tsx` (ADS forbids shared styles).
|
|
63
|
+
* The `satisfies` check below catches drift.
|
|
64
|
+
*/
|
|
72
65
|
const surfaceResetStyles = {
|
|
73
|
-
root: "
|
|
66
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
74
67
|
};
|
|
75
68
|
true;
|
|
76
69
|
const styles = {
|
|
77
|
-
root: "
|
|
70
|
+
root: "_lzhqglyw _az2pidpf _13shidpf _1mjeidpf _byz4idpf _b2a9idpf _z3e7idpf _1aqridpf _1ap0idpf _1vdi1wug _wmifewfl _1blzewfl _1rec1j28 _kqwmvrvc _1maw1q9c _17ke4jg8 _1ogd4jg8 _1dqv1n9t _qctn1ns9 _1rmr1wug _1yd01wug _li0iglyw _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1p7w1txw _51hckb7n _1yp3idpf _f5r5idpf",
|
|
78
71
|
motion: "_k8m011k7 _1oecdn4k _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
79
72
|
enter: "_y44v179n",
|
|
80
73
|
exit: "_y44vof1f"
|
|
@@ -116,8 +109,9 @@ const POPUP_ROLES = new Set(['menu', 'listbox', 'dialog', 'alertdialog', 'tree',
|
|
|
116
109
|
*
|
|
117
110
|
* ### 🔌 Visibility
|
|
118
111
|
*
|
|
119
|
-
* - `isOpen={true}` calls `showPopover()` (entry via
|
|
120
|
-
* - `isOpen={false}` calls `hidePopover()` (exit via
|
|
112
|
+
* - `isOpen={true}` calls `showPopover()` (entry via a keyframe animation).
|
|
113
|
+
* - `isOpen={false}` calls `hidePopover()` (exit via a keyframe animation, kept
|
|
114
|
+
* visible by an `allow-discrete` transition).
|
|
121
115
|
*
|
|
122
116
|
* ### 📜 Browser dismiss is non-cancellable
|
|
123
117
|
*
|
|
@@ -1,33 +1,45 @@
|
|
|
1
|
-
._19itglyw{border:none}
|
|
2
1
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
3
2
|
._1m5e1op4::backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
4
3
|
._1m5exbuz::-ms-backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
4
|
._1m5exbuz::backdrop{animation:var(--ds-blanket-enter,.25s cubic-bezier(.4,0,0,1) FadeIn0to100)}
|
|
5
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
6
6
|
._y44v7kvq{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
7
|
-
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}.
|
|
7
|
+
._y44vgeqi{animation:var(--ds-modal-exit,.2s cubic-bezier(.6,0,.8,.6) ScaleOut100to95)}._1715kb7n:defined:defined:defined{opacity:1}
|
|
8
|
+
._18u01wug{margin-left:auto}
|
|
8
9
|
._19pk1wug{margin-top:auto}
|
|
9
|
-
.
|
|
10
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
11
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
10
17
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
11
18
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
12
19
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
13
20
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
14
|
-
._1nmz4jg8{word-break:normal}
|
|
15
21
|
._1o511hrf{animation-fill-mode:both}
|
|
16
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
19
25
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
26
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
20
27
|
._2hwx1wug{margin-right:auto}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
28
|
+
._6hkqidpf:defined:defined:defined{inset-block-end:0}
|
|
29
|
+
._722r1ule[open][open][open]{display:block}
|
|
30
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
31
|
+
._dbnbze3t:defined:defined:defined{padding-block-end:var(--ds-space-0,0)}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
26
34
|
._k8m011k7{transition-property:overlay,display}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
35
|
+
._lizuze3t:defined:defined:defined{padding-inline-end:var(--ds-space-0,0)}
|
|
36
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
37
|
+
._mkdmze3t:defined:defined:defined{padding-block-start:var(--ds-space-0,0)}
|
|
29
38
|
._otyr1wug{margin-bottom:auto}
|
|
30
39
|
._p12fglyw{max-width:none}
|
|
31
|
-
.
|
|
32
|
-
.
|
|
40
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
41
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
42
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
43
|
+
._v12pze3t:defined:defined:defined{padding-inline-start:var(--ds-space-0,0)}
|
|
44
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
33
45
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156y147i{transition-duration:var(--ds-duration-instant,0ms)}}
|
|
@@ -10,22 +10,13 @@ import { useNotifyOpenLayerObserver } from '@atlaskit/layering/use-notify-open-l
|
|
|
10
10
|
import { useAnimatedVisibility } from '../internal/use-animated-visibility';
|
|
11
11
|
import { useFocusWrap } from '../internal/use-focus-wrap';
|
|
12
12
|
import { useSafariEscapeFix } from '../internal/use-safari-escape-fix';
|
|
13
|
-
// Surface reset
|
|
14
|
-
// Neutralises inherited interaction and text-layout properties (e.g.
|
|
15
|
-
// `pointer-events: none` and `white-space: nowrap`) that leak into the top-layer
|
|
16
|
-
// surface. Excludes `color`/`font` (theming) and `direction`/`unicode-bidi` (RTL
|
|
17
|
-
// must inherit). The reset has no box side-effects, so it does not reintroduce
|
|
18
|
-
// the `margin: auto` centering problem that kept `height: auto` off `Dialog`.
|
|
19
|
-
//
|
|
20
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
21
|
-
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
22
|
-
// The `satisfies` check below fails the build if either copy drifts.
|
|
13
|
+
// Surface reset. KEEP IN SYNC with `surfaceResetStyles` in `popover/popover.tsx`.
|
|
23
14
|
var surfaceResetStyles = {
|
|
24
|
-
root: "
|
|
15
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
25
16
|
};
|
|
26
17
|
true;
|
|
27
18
|
var dialogStyles = {
|
|
28
|
-
root: "
|
|
19
|
+
root: "_19pk1wug _2hwx1wug _otyr1wug _18u01wug _p12fglyw _lzhqglyw _mkdmze3t _lizuze3t _dbnbze3t _v12pze3t _1yd01wug _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1dqv1n9t _6hkqidpf _1rec1j28 _722r1ule",
|
|
29
20
|
motion: "_k8m011k7 _1oeci9qs _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
30
21
|
enter: "_y44v7kvq",
|
|
31
22
|
exit: "_y44vgeqi"
|
|
@@ -42,8 +33,9 @@ var backdropStyles = {
|
|
|
42
33
|
* background, border-radius, or layout. Consumers provide their own styling.
|
|
43
34
|
*
|
|
44
35
|
* Visibility is controlled declaratively via `isOpen`:
|
|
45
|
-
* - `isOpen={true}` calls `.showModal()` (entry
|
|
46
|
-
* - `isOpen={false}` calls `.close()` (exit animation
|
|
36
|
+
* - `isOpen={true}` calls `.showModal()` (entry via a keyframe animation)
|
|
37
|
+
* - `isOpen={false}` calls `.close()` (exit via a keyframe animation, kept visible
|
|
38
|
+
* by an `allow-discrete` transition)
|
|
47
39
|
*
|
|
48
40
|
* Handles native `cancel` event (Escape) and backdrop click detection.
|
|
49
41
|
*
|
|
@@ -1,30 +1,47 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
1
|
+
._1vdi1wug:defined:defined:defined{inset:auto}
|
|
2
|
+
._lzhqglyw:defined:defined:defined{border:none}
|
|
3
3
|
._y44v179n{animation:var(--ds-popover-motion-enter)}
|
|
4
|
-
._y44vof1f{animation:var(--ds-popover-motion-exit)}.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
9
|
-
.
|
|
4
|
+
._y44vof1f{animation:var(--ds-popover-motion-exit)}._13shidpf:defined:defined:defined{padding-right:0}
|
|
5
|
+
._1715kb7n:defined:defined:defined{opacity:1}
|
|
6
|
+
._17ke4jg8:defined:defined:defined{align-items:normal}
|
|
7
|
+
._19w84jg8:defined:defined:defined{word-break:normal}
|
|
8
|
+
._1ap0idpf:defined:defined:defined{margin-left:0}
|
|
9
|
+
._1aqridpf:defined:defined:defined{margin-bottom:0}
|
|
10
|
+
._1b80glyw:defined:defined:defined{text-transform:none}
|
|
11
|
+
._1blzewfl:defined:defined:defined{overflow-y:visible}
|
|
12
|
+
._1dqv1n9t:defined:defined:defined{position:fixed}
|
|
13
|
+
._1f2zglyw:defined:defined:defined{transform:none}
|
|
14
|
+
._1f6b4jg8:defined:defined:defined{overflow-wrap:normal}
|
|
15
|
+
._1gd81wug:defined:defined:defined{min-height:auto}
|
|
16
|
+
._1ljj4jg8:defined:defined:defined{align-self:normal}
|
|
17
|
+
._1maw1q9c:defined:defined:defined{flex-wrap:nowrap}
|
|
18
|
+
._1mjeidpf:defined:defined:defined{padding-bottom:0}
|
|
10
19
|
._1o511hrf{animation-fill-mode:both}
|
|
11
20
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
12
|
-
.
|
|
13
|
-
.
|
|
21
|
+
._1ogd4jg8:defined:defined:defined{justify-content:normal}
|
|
22
|
+
._1p7w1txw:popover-open:popover-open:popover-open{display:flex}
|
|
23
|
+
._1rec1j28:defined:defined:defined{background-color:transparent}
|
|
24
|
+
._1rmr1wug:defined:defined:defined{height:auto}
|
|
25
|
+
._1s8uglyw:defined:defined:defined{rotate:none}
|
|
14
26
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
.
|
|
27
|
+
._1yd01wug:defined:defined:defined{min-width:auto}
|
|
28
|
+
._ao8dglyw:defined:defined:defined{max-height:none}
|
|
29
|
+
._az2pidpf:defined:defined:defined{padding-top:0}
|
|
30
|
+
._b2a9idpf:defined:defined:defined{margin-top:0}
|
|
31
|
+
._byz4idpf:defined:defined:defined{padding-left:0}
|
|
32
|
+
._goh41wug:defined:defined:defined{pointer-events:auto}
|
|
33
|
+
._jg1o4jg8:defined:defined:defined{justify-self:normal}
|
|
20
34
|
._k8m011k7{transition-property:overlay,display}
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
35
|
+
._kqwmvrvc:defined:defined:defined{flex-direction:row}
|
|
36
|
+
._li0iglyw:defined:defined:defined{max-width:none}
|
|
37
|
+
._m466idpf:defined:defined:defined{text-indent:0}
|
|
38
|
+
._qctn1ns9:defined:defined:defined{width:-moz-fit-content;width:fit-content}
|
|
39
|
+
._tcxkv2br:defined:defined:defined{text-align:start}
|
|
40
|
+
._tdqwglyw:defined:defined:defined{scale:none}
|
|
41
|
+
._ux9u4jg8:defined:defined:defined{white-space:normal}
|
|
42
|
+
._wmifewfl:defined:defined:defined{overflow-x:visible}
|
|
43
|
+
._x2wjglyw:defined:defined:defined{translate:none}
|
|
44
|
+
._z3e7idpf:defined:defined:defined{margin-right:0}
|
|
28
45
|
:where(._1yp3idpf)>*{min-inline-size:0}
|
|
29
46
|
:where(._51hckb7n)>*{flex-grow:1}
|
|
30
47
|
:where(._f5r5idpf)>*{min-block-size:0}
|
|
@@ -48,30 +48,23 @@ var supportsPopoverHint = once(function () {
|
|
|
48
48
|
return element.popover === 'hint';
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// `display: none` when closed).
|
|
63
|
-
//
|
|
64
|
-
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
65
|
-
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
66
|
-
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
67
|
-
// co-located and duplicated deliberately. The `satisfies` check below fails the
|
|
68
|
-
// build if either copy drifts.
|
|
51
|
+
/**
|
|
52
|
+
* **Surface reset**
|
|
53
|
+
*
|
|
54
|
+
* The host is still a DOM child of its trigger for inheritance, so it inherits
|
|
55
|
+
* values like `pointer-events: none` or `white-space: nowrap`. Resets them to
|
|
56
|
+
* what `<body>` gave the portal path. `color`, `font` and direction still inherit.
|
|
57
|
+
* Not `all: initial`: that would also override the UA `[popover]` rules.
|
|
58
|
+
*
|
|
59
|
+
* KEEP IN SYNC with `dialog/dialog-content.tsx` (ADS forbids shared styles).
|
|
60
|
+
* The `satisfies` check below catches drift.
|
|
61
|
+
*/
|
|
69
62
|
var surfaceResetStyles = {
|
|
70
|
-
root: "
|
|
63
|
+
root: "_goh41wug _ux9u4jg8 _19w84jg8 _1f6b4jg8 _tcxkv2br _m466idpf _1b80glyw"
|
|
71
64
|
};
|
|
72
65
|
true;
|
|
73
66
|
var styles = {
|
|
74
|
-
root: "
|
|
67
|
+
root: "_lzhqglyw _az2pidpf _13shidpf _1mjeidpf _byz4idpf _b2a9idpf _z3e7idpf _1aqridpf _1ap0idpf _1vdi1wug _wmifewfl _1blzewfl _1rec1j28 _kqwmvrvc _1maw1q9c _17ke4jg8 _1ogd4jg8 _1dqv1n9t _qctn1ns9 _1rmr1wug _1yd01wug _li0iglyw _1gd81wug _ao8dglyw _1ljj4jg8 _jg1o4jg8 _1f2zglyw _x2wjglyw _tdqwglyw _1s8uglyw _1715kb7n _1p7w1txw _51hckb7n _1yp3idpf _f5r5idpf",
|
|
75
68
|
motion: "_k8m011k7 _1oecdn4k _1s9z1a5r _1o511hrf _bl8aglyw _156y147i",
|
|
76
69
|
enter: "_y44v179n",
|
|
77
70
|
exit: "_y44vof1f"
|
|
@@ -113,8 +106,9 @@ var POPUP_ROLES = new Set(['menu', 'listbox', 'dialog', 'alertdialog', 'tree', '
|
|
|
113
106
|
*
|
|
114
107
|
* ### 🔌 Visibility
|
|
115
108
|
*
|
|
116
|
-
* - `isOpen={true}` calls `showPopover()` (entry via
|
|
117
|
-
* - `isOpen={false}` calls `hidePopover()` (exit via
|
|
109
|
+
* - `isOpen={true}` calls `showPopover()` (entry via a keyframe animation).
|
|
110
|
+
* - `isOpen={false}` calls `hidePopover()` (exit via a keyframe animation, kept
|
|
111
|
+
* visible by an `allow-discrete` transition).
|
|
118
112
|
*
|
|
119
113
|
* ### 📜 Browser dismiss is non-cancellable
|
|
120
114
|
*
|
|
@@ -9,8 +9,9 @@ import { type TDialogProps } from './types';
|
|
|
9
9
|
* background, border-radius, or layout. Consumers provide their own styling.
|
|
10
10
|
*
|
|
11
11
|
* Visibility is controlled declaratively via `isOpen`:
|
|
12
|
-
* - `isOpen={true}` calls `.showModal()` (entry
|
|
13
|
-
* - `isOpen={false}` calls `.close()` (exit animation
|
|
12
|
+
* - `isOpen={true}` calls `.showModal()` (entry via a keyframe animation)
|
|
13
|
+
* - `isOpen={false}` calls `.close()` (exit via a keyframe animation, kept visible
|
|
14
|
+
* by an `allow-discrete` transition)
|
|
14
15
|
*
|
|
15
16
|
* Handles native `cancel` event (Escape) and backdrop click detection.
|
|
16
17
|
*
|
|
@@ -29,9 +29,10 @@ type TDialogBaseProps = {
|
|
|
29
29
|
* phase can temporarily differ from this value while a close settles.
|
|
30
30
|
*
|
|
31
31
|
* - `true`: calls `showModal()`. When `shouldAnimate` is `true`, the entry
|
|
32
|
-
* animation plays
|
|
32
|
+
* animation plays as a keyframe animation.
|
|
33
33
|
* - `false`: calls `close()`. When `shouldAnimate` is `true`, the exit
|
|
34
|
-
* animation plays
|
|
34
|
+
* animation plays as a keyframe animation while the lifecycle phase is `exiting`,
|
|
35
|
+
* kept visible by an `allow-discrete` transition.
|
|
35
36
|
*
|
|
36
37
|
* **Lifecycle observable to consumers:**
|
|
37
38
|
*
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { CompiledStyles } from '@compiled/react';
|
|
2
|
-
|
|
3
|
-
* The host surface reset is declared twice, in `popover/popover.tsx` and
|
|
4
|
-
* `dialog/dialog-content.tsx`, because ADS forbids sharing styles across files
|
|
5
|
-
* (`no-exported-styles` / `no-imported-style-values` — Compiled styles are null
|
|
6
|
-
* at runtime). Each copy asserts itself against this type with
|
|
7
|
-
* `TSurfaceResetCheck`, so the compiler fails if either drifts. Change this
|
|
8
|
-
* first, then both copies.
|
|
9
|
-
*/
|
|
10
|
-
export type TSurfaceReset = CompiledStyles<{
|
|
2
|
+
type TSurfaceResetDeclarations = {
|
|
11
3
|
pointerEvents: 'auto';
|
|
12
4
|
whiteSpace: 'normal';
|
|
13
5
|
wordBreak: 'normal';
|
|
@@ -15,11 +7,23 @@ export type TSurfaceReset = CompiledStyles<{
|
|
|
15
7
|
textAlign: 'start';
|
|
16
8
|
textIndent: '0';
|
|
17
9
|
textTransform: 'none';
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The surface reset is duplicated in `popover/popover.tsx` and
|
|
13
|
+
* `dialog/dialog-content.tsx` (ADS forbids shared styles). Each copy checks
|
|
14
|
+
* itself against this type. Change `TSurfaceResetDeclarations` first.
|
|
15
|
+
*
|
|
16
|
+
* Checks property names and the selector only: `cssMap` widens nested values to
|
|
17
|
+
* `string`. The host specificity VR tests check the values.
|
|
18
|
+
*/
|
|
19
|
+
export type TBoostedSurfaceReset<TSelector extends string> = CompiledStyles<{
|
|
20
|
+
[TKey in TSelector]: {
|
|
21
|
+
[TProperty in keyof TSurfaceResetDeclarations]: string;
|
|
22
|
+
};
|
|
18
23
|
}>;
|
|
19
24
|
type TIsIdentical<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => (T extends B ? 1 : 2) ? true : false;
|
|
20
25
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Identity rather than assignability, so extra or widened properties also fail.
|
|
26
|
+
* Identity, not assignability, so extra properties or a wrong selector fail.
|
|
23
27
|
*/
|
|
24
|
-
export type
|
|
28
|
+
export type TBoostedSurfaceResetCheck<TActual, TSelector extends string> = TIsIdentical<TActual, TBoostedSurfaceReset<TSelector>> extends true ? true : 'surfaceResetStyles.root does not match TBoostedSurfaceReset in internal/surface-reset.tsx';
|
|
25
29
|
export {};
|
|
@@ -10,8 +10,9 @@ import { type TPopoverForwardedProps } from './types';
|
|
|
10
10
|
*
|
|
11
11
|
* ### 🔌 Visibility
|
|
12
12
|
*
|
|
13
|
-
* - `isOpen={true}` calls `showPopover()` (entry via
|
|
14
|
-
* - `isOpen={false}` calls `hidePopover()` (exit via
|
|
13
|
+
* - `isOpen={true}` calls `showPopover()` (entry via a keyframe animation).
|
|
14
|
+
* - `isOpen={false}` calls `hidePopover()` (exit via a keyframe animation, kept
|
|
15
|
+
* visible by an `allow-discrete` transition).
|
|
15
16
|
*
|
|
16
17
|
* ### 📜 Browser dismiss is non-cancellable
|
|
17
18
|
*
|
|
@@ -84,9 +84,10 @@ type TPopoverBaseProps = {
|
|
|
84
84
|
* phase can temporarily differ from this value while a close settles.
|
|
85
85
|
*
|
|
86
86
|
* - **`true`:** show the popover (calls `showPopover()`). When `shouldAnimate`
|
|
87
|
-
* is `true`, the entry animation plays
|
|
87
|
+
* is `true`, the entry animation plays as a keyframe animation.
|
|
88
88
|
* - **`false`:** hide the popover. When `shouldAnimate` is `true`, the exit
|
|
89
|
-
* animation plays
|
|
89
|
+
* animation plays as a keyframe animation while the lifecycle phase is `exiting`,
|
|
90
|
+
* kept visible by an `allow-discrete` transition.
|
|
90
91
|
* Otherwise it hides visually without animation, while lifecycle settlement still
|
|
91
92
|
* waits for the native closed `toggle`.
|
|
92
93
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/top-layer",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.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",
|