@atlaskit/top-layer 1.8.1 → 1.9.0
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 +6 -1
- package/dist/cjs/dialog/dialog-content.js +15 -2
- package/dist/cjs/popover/popover.compiled.css +6 -1
- package/dist/cjs/popover/popover.js +17 -2
- package/dist/cjs/popover-surface/popover-surface.compiled.css +0 -1
- package/dist/cjs/popover-surface/popover-surface.js +1 -1
- package/dist/es2019/dialog/dialog-content.compiled.css +6 -1
- package/dist/es2019/dialog/dialog-content.js +15 -2
- package/dist/es2019/popover/popover.compiled.css +6 -1
- package/dist/es2019/popover/popover.js +17 -2
- package/dist/es2019/popover-surface/popover-surface.compiled.css +0 -1
- package/dist/es2019/popover-surface/popover-surface.js +1 -1
- package/dist/esm/dialog/dialog-content.compiled.css +6 -1
- package/dist/esm/dialog/dialog-content.js +15 -2
- package/dist/esm/popover/popover.compiled.css +6 -1
- package/dist/esm/popover/popover.js +17 -2
- package/dist/esm/popover-surface/popover-surface.compiled.css +0 -1
- package/dist/esm/popover-surface/popover-surface.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/top-layer
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`690a0ff95cbac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/690a0ff95cbac) -
|
|
8
|
+
Reset inherited text-layout styles (e.g. `white-space`) on the `Popover` and `Dialog` surfaces.
|
|
9
|
+
|
|
3
10
|
## 1.8.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._19itglyw{border:none}
|
|
3
2
|
._1iu47kvq[open]{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
4
3
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
@@ -11,29 +10,35 @@
|
|
|
11
10
|
._1fyf1a5r::-ms-backdrop{transition-behavior:allow-discrete}
|
|
12
11
|
._1fyf1a5r::backdrop{transition-behavior:allow-discrete}
|
|
13
12
|
._1i0neoah[open]{animation-fill-mode:backwards}
|
|
13
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
14
14
|
._1jhdq7pw::-ms-backdrop{animation-fill-mode:forwards}
|
|
15
15
|
._1jhdq7pw::backdrop{animation-fill-mode:forwards}
|
|
16
16
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
17
17
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
18
18
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
19
19
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
20
|
+
._1nmz4jg8{word-break:normal}
|
|
20
21
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
21
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
22
23
|
._1oil1d08[open]{transition-timing-function:var(--ds-easing-inout-bold,cubic-bezier(.4,0,0,1))}
|
|
24
|
+
._1p1dglyw{text-transform:none}
|
|
23
25
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
24
26
|
._1rsueoah[open]::-ms-backdrop{animation-fill-mode:backwards}
|
|
25
27
|
._1rsueoah[open]::backdrop{animation-fill-mode:backwards}
|
|
26
28
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
27
29
|
._2hwx1wug{margin-right:auto}
|
|
28
30
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
31
|
+
._azhwidpf{text-indent:0}
|
|
29
32
|
._bfhk1j28{background-color:transparent}
|
|
30
33
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
31
34
|
._c71lglyw{max-height:none}
|
|
32
35
|
._k8m011k7{transition-property:overlay,display}
|
|
33
36
|
._njwk11k7::-ms-backdrop{-ms-transition-property:overlay,display;transition-property:overlay,display}
|
|
34
37
|
._njwk11k7::backdrop{transition-property:overlay,display}
|
|
38
|
+
._o5724jg8{white-space:normal}
|
|
35
39
|
._otyr1wug{margin-bottom:auto}
|
|
36
40
|
._p12fglyw{max-width:none}
|
|
41
|
+
._y3gnv2br{text-align:start}
|
|
37
42
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
38
43
|
._yhpqi9qs::-ms-backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
39
44
|
._yhpqi9qs::backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* dialog-content.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* dialog-content.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -26,6 +26,19 @@ var dialogAnimationStyles = {
|
|
|
26
26
|
root: "_k8m011k7 _1oeci9qs _1s9z1a5r _1fsl1mzy _1oil1d08",
|
|
27
27
|
motion: "_y44vgeqi _1o51q7pw _1iu47kvq _1i0neoah"
|
|
28
28
|
};
|
|
29
|
+
|
|
30
|
+
// Surface reset — see the rationale on `surfaceResetStyles` in `popover/popover.tsx`.
|
|
31
|
+
// Neutralises inherited text-layout properties (e.g. `white-space: nowrap`) that leak
|
|
32
|
+
// into the top-layer surface. Excludes `color`/`font` (theming) and
|
|
33
|
+
// `direction`/`unicode-bidi` (RTL must inherit). Pure layout reset with no box
|
|
34
|
+
// side-effects, so it does not reintroduce the `margin: auto` centering problem that
|
|
35
|
+
// kept `height: auto` off `Dialog`.
|
|
36
|
+
//
|
|
37
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
38
|
+
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
39
|
+
var surfaceResetStyles = {
|
|
40
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
41
|
+
};
|
|
29
42
|
var styles = {
|
|
30
43
|
dialog: "_19itglyw _19pk1wug _2hwx1wug _otyr1wug _18u01wug _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _p12fglyw _c71lglyw _bfhk1j28 _bl8aglyw _156y147i _10aiglyw _aeld147i"
|
|
31
44
|
};
|
|
@@ -199,6 +212,6 @@ var Dialog = exports.Dialog = /*#__PURE__*/(0, _react.forwardRef)(function Dialo
|
|
|
199
212
|
style: style,
|
|
200
213
|
onCancel: handleCancel,
|
|
201
214
|
"data-testid": testId,
|
|
202
|
-
className: (0, _runtime.ax)([styles.dialog, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
215
|
+
className: (0, _runtime.ax)([styles.dialog, surfaceResetStyles.root, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
203
216
|
}, children);
|
|
204
217
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._15ns179n:popover-open{animation:var(--ds-popover-motion-enter)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._1r041wug{inset:auto}
|
|
@@ -7,8 +6,11 @@
|
|
|
7
6
|
._18u0idpf{margin-left:0}
|
|
8
7
|
._19bvidpf{padding-left:0}
|
|
9
8
|
._19pkidpf{margin-top:0}
|
|
9
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
10
|
+
._1nmz4jg8{word-break:normal}
|
|
10
11
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
11
12
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
13
|
+
._1p1dglyw{text-transform:none}
|
|
12
14
|
._1pgl1lbj{animation-timing-function:var(--ds-easing-in-practical,cubic-bezier(.6,0,.8,.6))}
|
|
13
15
|
._1psg1ign:popover-open{animation-duration:var(--ds-duration-short,.15s)}
|
|
14
16
|
._1reoewfl{overflow-x:visible}
|
|
@@ -16,12 +18,15 @@
|
|
|
16
18
|
._2hwxidpf{margin-right:0}
|
|
17
19
|
._4t3i1wug{height:auto}
|
|
18
20
|
._5sagdn4k{animation-duration:var(--ds-duration-xshort,.1s)}
|
|
21
|
+
._azhwidpf{text-indent:0}
|
|
19
22
|
._bfhk1j28{background-color:transparent}
|
|
20
23
|
._ca0qidpf{padding-top:0}
|
|
21
24
|
._k8m011k7{transition-property:overlay,display}
|
|
22
25
|
._n3tdidpf{padding-bottom:0}
|
|
23
26
|
._n70peoah:popover-open{animation-fill-mode:backwards}
|
|
27
|
+
._o5724jg8{white-space:normal}
|
|
24
28
|
._o8i7indk:popover-open{animation-timing-function:var(--ds-easing-out-practical,cubic-bezier(.4,1,.6,1))}
|
|
25
29
|
._otyridpf{margin-bottom:0}
|
|
26
30
|
._u5f3idpf{padding-right:0}
|
|
31
|
+
._y3gnv2br{text-align:start}
|
|
27
32
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156yru3m{transition-duration:0s}._8rmvglyw:popover-open{animation-name:none}._2qm2ru3m:popover-open{transition-duration:0s}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popover.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popover.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -41,6 +41,21 @@ var supportsPopoverHint = (0, _once.default)(function () {
|
|
|
41
41
|
var popoverAnimationStyles = {
|
|
42
42
|
root: "_y44vof1f _k8m011k7 _1oecdn4k _1s9z1a5r _1o51q7pw _5sagdn4k _1pgl1lbj _15ns179n _12t71ign _n70peoah _1psg1ign _o8i7indk _bl8aglyw _156yru3m _8rmvglyw _2qm2ru3m"
|
|
43
43
|
};
|
|
44
|
+
|
|
45
|
+
// Surface reset — neutralises inherited text-layout properties (e.g.
|
|
46
|
+
// `white-space: nowrap` from an `@atlaskit/select` option) that leak into a
|
|
47
|
+
// top-layer element because, for CSS inheritance, it is still a DOM child of its
|
|
48
|
+
// trigger (top-layer promotion is paint/stacking only; the legacy portal path
|
|
49
|
+
// avoided this by rendering at `<body>`). Excludes `color`/`font` (theming) and
|
|
50
|
+
// `direction`/`unicode-bidi` (RTL must inherit).
|
|
51
|
+
//
|
|
52
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
53
|
+
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
54
|
+
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
55
|
+
// co-located and duplicated deliberately.
|
|
56
|
+
var surfaceResetStyles = {
|
|
57
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
58
|
+
};
|
|
44
59
|
var styles = {
|
|
45
60
|
root: "_19itglyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _1r041wug _1reoewfl _18m9ewfl _bfhk1j28 _4t3i1wug"
|
|
46
61
|
};
|
|
@@ -333,6 +348,6 @@ var Popover = exports.Popover = /*#__PURE__*/(0, _react.forwardRef)(function Pop
|
|
|
333
348
|
"aria-label": label,
|
|
334
349
|
"aria-labelledby": labelledBy,
|
|
335
350
|
"data-testid": testId,
|
|
336
|
-
className: (0, _runtime.ax)([styles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
351
|
+
className: (0, _runtime.ax)([styles.root, surfaceResetStyles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
337
352
|
}, children);
|
|
338
353
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._19itglyw{border:none}
|
|
3
2
|
._1iu47kvq[open]{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
4
3
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
@@ -11,29 +10,35 @@
|
|
|
11
10
|
._1fyf1a5r::-ms-backdrop{transition-behavior:allow-discrete}
|
|
12
11
|
._1fyf1a5r::backdrop{transition-behavior:allow-discrete}
|
|
13
12
|
._1i0neoah[open]{animation-fill-mode:backwards}
|
|
13
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
14
14
|
._1jhdq7pw::-ms-backdrop{animation-fill-mode:forwards}
|
|
15
15
|
._1jhdq7pw::backdrop{animation-fill-mode:forwards}
|
|
16
16
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
17
17
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
18
18
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
19
19
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
20
|
+
._1nmz4jg8{word-break:normal}
|
|
20
21
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
21
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
22
23
|
._1oil1d08[open]{transition-timing-function:var(--ds-easing-inout-bold,cubic-bezier(.4,0,0,1))}
|
|
24
|
+
._1p1dglyw{text-transform:none}
|
|
23
25
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
24
26
|
._1rsueoah[open]::-ms-backdrop{animation-fill-mode:backwards}
|
|
25
27
|
._1rsueoah[open]::backdrop{animation-fill-mode:backwards}
|
|
26
28
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
27
29
|
._2hwx1wug{margin-right:auto}
|
|
28
30
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
31
|
+
._azhwidpf{text-indent:0}
|
|
29
32
|
._bfhk1j28{background-color:transparent}
|
|
30
33
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
31
34
|
._c71lglyw{max-height:none}
|
|
32
35
|
._k8m011k7{transition-property:overlay,display}
|
|
33
36
|
._njwk11k7::-ms-backdrop{-ms-transition-property:overlay,display;transition-property:overlay,display}
|
|
34
37
|
._njwk11k7::backdrop{transition-property:overlay,display}
|
|
38
|
+
._o5724jg8{white-space:normal}
|
|
35
39
|
._otyr1wug{margin-bottom:auto}
|
|
36
40
|
._p12fglyw{max-width:none}
|
|
41
|
+
._y3gnv2br{text-align:start}
|
|
37
42
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
38
43
|
._yhpqi9qs::-ms-backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
39
44
|
._yhpqi9qs::backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* dialog-content.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* dialog-content.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./dialog-content.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useCallback, useEffect, useId, useLayoutEffect, useRef } from 'react';
|
|
@@ -17,6 +17,19 @@ const dialogAnimationStyles = {
|
|
|
17
17
|
root: "_k8m011k7 _1oeci9qs _1s9z1a5r _1fsl1mzy _1oil1d08",
|
|
18
18
|
motion: "_y44vgeqi _1o51q7pw _1iu47kvq _1i0neoah"
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
// Surface reset — see the rationale on `surfaceResetStyles` in `popover/popover.tsx`.
|
|
22
|
+
// Neutralises inherited text-layout properties (e.g. `white-space: nowrap`) that leak
|
|
23
|
+
// into the top-layer surface. Excludes `color`/`font` (theming) and
|
|
24
|
+
// `direction`/`unicode-bidi` (RTL must inherit). Pure layout reset with no box
|
|
25
|
+
// side-effects, so it does not reintroduce the `margin: auto` centering problem that
|
|
26
|
+
// kept `height: auto` off `Dialog`.
|
|
27
|
+
//
|
|
28
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
29
|
+
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
30
|
+
const surfaceResetStyles = {
|
|
31
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
32
|
+
};
|
|
20
33
|
const styles = {
|
|
21
34
|
dialog: "_19itglyw _19pk1wug _2hwx1wug _otyr1wug _18u01wug _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _p12fglyw _c71lglyw _bfhk1j28 _bl8aglyw _156y147i _10aiglyw _aeld147i"
|
|
22
35
|
};
|
|
@@ -192,6 +205,6 @@ export const Dialog = /*#__PURE__*/forwardRef(function Dialog({
|
|
|
192
205
|
style: style,
|
|
193
206
|
onCancel: handleCancel,
|
|
194
207
|
"data-testid": testId,
|
|
195
|
-
className: ax([styles.dialog, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
208
|
+
className: ax([styles.dialog, surfaceResetStyles.root, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
196
209
|
}, children);
|
|
197
210
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._15ns179n:popover-open{animation:var(--ds-popover-motion-enter)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._1r041wug{inset:auto}
|
|
@@ -7,8 +6,11 @@
|
|
|
7
6
|
._18u0idpf{margin-left:0}
|
|
8
7
|
._19bvidpf{padding-left:0}
|
|
9
8
|
._19pkidpf{margin-top:0}
|
|
9
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
10
|
+
._1nmz4jg8{word-break:normal}
|
|
10
11
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
11
12
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
13
|
+
._1p1dglyw{text-transform:none}
|
|
12
14
|
._1pgl1lbj{animation-timing-function:var(--ds-easing-in-practical,cubic-bezier(.6,0,.8,.6))}
|
|
13
15
|
._1psg1ign:popover-open{animation-duration:var(--ds-duration-short,.15s)}
|
|
14
16
|
._1reoewfl{overflow-x:visible}
|
|
@@ -16,12 +18,15 @@
|
|
|
16
18
|
._2hwxidpf{margin-right:0}
|
|
17
19
|
._4t3i1wug{height:auto}
|
|
18
20
|
._5sagdn4k{animation-duration:var(--ds-duration-xshort,.1s)}
|
|
21
|
+
._azhwidpf{text-indent:0}
|
|
19
22
|
._bfhk1j28{background-color:transparent}
|
|
20
23
|
._ca0qidpf{padding-top:0}
|
|
21
24
|
._k8m011k7{transition-property:overlay,display}
|
|
22
25
|
._n3tdidpf{padding-bottom:0}
|
|
23
26
|
._n70peoah:popover-open{animation-fill-mode:backwards}
|
|
27
|
+
._o5724jg8{white-space:normal}
|
|
24
28
|
._o8i7indk:popover-open{animation-timing-function:var(--ds-easing-out-practical,cubic-bezier(.4,1,.6,1))}
|
|
25
29
|
._otyridpf{margin-bottom:0}
|
|
26
30
|
._u5f3idpf{padding-right:0}
|
|
31
|
+
._y3gnv2br{text-align:start}
|
|
27
32
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156yru3m{transition-duration:0s}._8rmvglyw:popover-open{animation-name:none}._2qm2ru3m:popover-open{transition-duration:0s}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popover.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popover.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./popover.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useCallback, useId, useLayoutEffect, useRef } from 'react';
|
|
@@ -32,6 +32,21 @@ const supportsPopoverHint = once(() => {
|
|
|
32
32
|
const popoverAnimationStyles = {
|
|
33
33
|
root: "_y44vof1f _k8m011k7 _1oecdn4k _1s9z1a5r _1o51q7pw _5sagdn4k _1pgl1lbj _15ns179n _12t71ign _n70peoah _1psg1ign _o8i7indk _bl8aglyw _156yru3m _8rmvglyw _2qm2ru3m"
|
|
34
34
|
};
|
|
35
|
+
|
|
36
|
+
// Surface reset — neutralises inherited text-layout properties (e.g.
|
|
37
|
+
// `white-space: nowrap` from an `@atlaskit/select` option) that leak into a
|
|
38
|
+
// top-layer element because, for CSS inheritance, it is still a DOM child of its
|
|
39
|
+
// trigger (top-layer promotion is paint/stacking only; the legacy portal path
|
|
40
|
+
// avoided this by rendering at `<body>`). Excludes `color`/`font` (theming) and
|
|
41
|
+
// `direction`/`unicode-bidi` (RTL must inherit).
|
|
42
|
+
//
|
|
43
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
44
|
+
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
45
|
+
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
46
|
+
// co-located and duplicated deliberately.
|
|
47
|
+
const surfaceResetStyles = {
|
|
48
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
49
|
+
};
|
|
35
50
|
const styles = {
|
|
36
51
|
root: "_19itglyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _1r041wug _1reoewfl _18m9ewfl _bfhk1j28 _4t3i1wug"
|
|
37
52
|
};
|
|
@@ -325,6 +340,6 @@ export const Popover = /*#__PURE__*/forwardRef(function Popover({
|
|
|
325
340
|
"aria-label": label,
|
|
326
341
|
"aria-labelledby": labelledBy,
|
|
327
342
|
"data-testid": testId,
|
|
328
|
-
className: ax([styles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
343
|
+
className: ax([styles.root, surfaceResetStyles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
329
344
|
}, children);
|
|
330
345
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._19itglyw{border:none}
|
|
3
2
|
._1iu47kvq[open]{animation:var(--ds-modal-enter,.25s cubic-bezier(.4,0,0,1) ScaleIn95to100)}
|
|
4
3
|
._1m5e1op4::-ms-backdrop{animation:var(--ds-blanket-exit,.2s cubic-bezier(.6,0,.8,.6) FadeOut100to0)}
|
|
@@ -11,29 +10,35 @@
|
|
|
11
10
|
._1fyf1a5r::-ms-backdrop{transition-behavior:allow-discrete}
|
|
12
11
|
._1fyf1a5r::backdrop{transition-behavior:allow-discrete}
|
|
13
12
|
._1i0neoah[open]{animation-fill-mode:backwards}
|
|
13
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
14
14
|
._1jhdq7pw::-ms-backdrop{animation-fill-mode:forwards}
|
|
15
15
|
._1jhdq7pw::backdrop{animation-fill-mode:forwards}
|
|
16
16
|
._1ltk1i5c::-ms-backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
17
17
|
._1ltk1i5c::backdrop{background-color:var(--ds-blanket,#050c1f75)}
|
|
18
18
|
._1ltk1j28::-ms-backdrop{background-color:transparent}
|
|
19
19
|
._1ltk1j28::backdrop{background-color:transparent}
|
|
20
|
+
._1nmz4jg8{word-break:normal}
|
|
20
21
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
21
22
|
._1oeci9qs{transition-duration:var(--ds-duration-medium,.2s)}
|
|
22
23
|
._1oil1d08[open]{transition-timing-function:var(--ds-easing-inout-bold,cubic-bezier(.4,0,0,1))}
|
|
24
|
+
._1p1dglyw{text-transform:none}
|
|
23
25
|
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
24
26
|
._1rsueoah[open]::-ms-backdrop{animation-fill-mode:backwards}
|
|
25
27
|
._1rsueoah[open]::backdrop{animation-fill-mode:backwards}
|
|
26
28
|
._1s9z1a5r{transition-behavior:allow-discrete}
|
|
27
29
|
._2hwx1wug{margin-right:auto}
|
|
28
30
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
31
|
+
._azhwidpf{text-indent:0}
|
|
29
32
|
._bfhk1j28{background-color:transparent}
|
|
30
33
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
31
34
|
._c71lglyw{max-height:none}
|
|
32
35
|
._k8m011k7{transition-property:overlay,display}
|
|
33
36
|
._njwk11k7::-ms-backdrop{-ms-transition-property:overlay,display;transition-property:overlay,display}
|
|
34
37
|
._njwk11k7::backdrop{transition-property:overlay,display}
|
|
38
|
+
._o5724jg8{white-space:normal}
|
|
35
39
|
._otyr1wug{margin-bottom:auto}
|
|
36
40
|
._p12fglyw{max-width:none}
|
|
41
|
+
._y3gnv2br{text-align:start}
|
|
37
42
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
38
43
|
._yhpqi9qs::-ms-backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
39
44
|
._yhpqi9qs::backdrop{transition-duration:var(--ds-duration-medium,.2s)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* dialog-content.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* dialog-content.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./dialog-content.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useCallback, useEffect, useId, useLayoutEffect, useRef } from 'react';
|
|
@@ -17,6 +17,19 @@ var dialogAnimationStyles = {
|
|
|
17
17
|
root: "_k8m011k7 _1oeci9qs _1s9z1a5r _1fsl1mzy _1oil1d08",
|
|
18
18
|
motion: "_y44vgeqi _1o51q7pw _1iu47kvq _1i0neoah"
|
|
19
19
|
};
|
|
20
|
+
|
|
21
|
+
// Surface reset — see the rationale on `surfaceResetStyles` in `popover/popover.tsx`.
|
|
22
|
+
// Neutralises inherited text-layout properties (e.g. `white-space: nowrap`) that leak
|
|
23
|
+
// into the top-layer surface. Excludes `color`/`font` (theming) and
|
|
24
|
+
// `direction`/`unicode-bidi` (RTL must inherit). Pure layout reset with no box
|
|
25
|
+
// side-effects, so it does not reintroduce the `margin: auto` centering problem that
|
|
26
|
+
// kept `height: auto` off `Dialog`.
|
|
27
|
+
//
|
|
28
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `popover/popover.tsx`
|
|
29
|
+
// (ADS forbids sharing styles across files, so it is co-located and duplicated).
|
|
30
|
+
var surfaceResetStyles = {
|
|
31
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
32
|
+
};
|
|
20
33
|
var styles = {
|
|
21
34
|
dialog: "_19itglyw _19pk1wug _2hwx1wug _otyr1wug _18u01wug _1q51ze3t _y4tize3t _85i5ze3t _bozgze3t _p12fglyw _c71lglyw _bfhk1j28 _bl8aglyw _156y147i _10aiglyw _aeld147i"
|
|
22
35
|
};
|
|
@@ -190,6 +203,6 @@ export var Dialog = /*#__PURE__*/forwardRef(function Dialog(_ref, ref) {
|
|
|
190
203
|
style: style,
|
|
191
204
|
onCancel: handleCancel,
|
|
192
205
|
"data-testid": testId,
|
|
193
|
-
className: ax([styles.dialog, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
206
|
+
className: ax([styles.dialog, surfaceResetStyles.root, shouldHideBackdrop ? backdropStyles.hidden : backdropStyles.root, preset && backdropStyles.motion, preset && dialogAnimationStyles.root, preset && dialogAnimationStyles.motion, consumerXcss])
|
|
194
207
|
}, children);
|
|
195
208
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
._15ns179n:popover-open{animation:var(--ds-popover-motion-enter)}
|
|
3
2
|
._19itglyw{border:none}
|
|
4
3
|
._1r041wug{inset:auto}
|
|
@@ -7,8 +6,11 @@
|
|
|
7
6
|
._18u0idpf{margin-left:0}
|
|
8
7
|
._19bvidpf{padding-left:0}
|
|
9
8
|
._19pkidpf{margin-top:0}
|
|
9
|
+
._1i4q4jg8{overflow-wrap:normal}
|
|
10
|
+
._1nmz4jg8{word-break:normal}
|
|
10
11
|
._1o51q7pw{animation-fill-mode:forwards}
|
|
11
12
|
._1oecdn4k{transition-duration:var(--ds-duration-xshort,.1s)}
|
|
13
|
+
._1p1dglyw{text-transform:none}
|
|
12
14
|
._1pgl1lbj{animation-timing-function:var(--ds-easing-in-practical,cubic-bezier(.6,0,.8,.6))}
|
|
13
15
|
._1psg1ign:popover-open{animation-duration:var(--ds-duration-short,.15s)}
|
|
14
16
|
._1reoewfl{overflow-x:visible}
|
|
@@ -16,12 +18,15 @@
|
|
|
16
18
|
._2hwxidpf{margin-right:0}
|
|
17
19
|
._4t3i1wug{height:auto}
|
|
18
20
|
._5sagdn4k{animation-duration:var(--ds-duration-xshort,.1s)}
|
|
21
|
+
._azhwidpf{text-indent:0}
|
|
19
22
|
._bfhk1j28{background-color:transparent}
|
|
20
23
|
._ca0qidpf{padding-top:0}
|
|
21
24
|
._k8m011k7{transition-property:overlay,display}
|
|
22
25
|
._n3tdidpf{padding-bottom:0}
|
|
23
26
|
._n70peoah:popover-open{animation-fill-mode:backwards}
|
|
27
|
+
._o5724jg8{white-space:normal}
|
|
24
28
|
._o8i7indk:popover-open{animation-timing-function:var(--ds-easing-out-practical,cubic-bezier(.4,1,.6,1))}
|
|
25
29
|
._otyridpf{margin-bottom:0}
|
|
26
30
|
._u5f3idpf{padding-right:0}
|
|
31
|
+
._y3gnv2br{text-align:start}
|
|
27
32
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._156yru3m{transition-duration:0s}._8rmvglyw:popover-open{animation-name:none}._2qm2ru3m:popover-open{transition-duration:0s}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* popover.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* popover.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
2
|
import "./popover.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useCallback, useId, useLayoutEffect, useRef } from 'react';
|
|
@@ -32,6 +32,21 @@ var supportsPopoverHint = once(function () {
|
|
|
32
32
|
var popoverAnimationStyles = {
|
|
33
33
|
root: "_y44vof1f _k8m011k7 _1oecdn4k _1s9z1a5r _1o51q7pw _5sagdn4k _1pgl1lbj _15ns179n _12t71ign _n70peoah _1psg1ign _o8i7indk _bl8aglyw _156yru3m _8rmvglyw _2qm2ru3m"
|
|
34
34
|
};
|
|
35
|
+
|
|
36
|
+
// Surface reset — neutralises inherited text-layout properties (e.g.
|
|
37
|
+
// `white-space: nowrap` from an `@atlaskit/select` option) that leak into a
|
|
38
|
+
// top-layer element because, for CSS inheritance, it is still a DOM child of its
|
|
39
|
+
// trigger (top-layer promotion is paint/stacking only; the legacy portal path
|
|
40
|
+
// avoided this by rendering at `<body>`). Excludes `color`/`font` (theming) and
|
|
41
|
+
// `direction`/`unicode-bidi` (RTL must inherit).
|
|
42
|
+
//
|
|
43
|
+
// KEEP IN SYNC with the identical `surfaceResetStyles` in `dialog/dialog-content.tsx`.
|
|
44
|
+
// ADS forbids sharing styles across files (`no-exported-styles` /
|
|
45
|
+
// `no-imported-style-values` — Compiled styles are null at runtime), so the reset is
|
|
46
|
+
// co-located and duplicated deliberately.
|
|
47
|
+
var surfaceResetStyles = {
|
|
48
|
+
root: "_o5724jg8 _1nmz4jg8 _1i4q4jg8 _y3gnv2br _azhwidpf _1p1dglyw"
|
|
49
|
+
};
|
|
35
50
|
var styles = {
|
|
36
51
|
root: "_19itglyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _1r041wug _1reoewfl _18m9ewfl _bfhk1j28 _4t3i1wug"
|
|
37
52
|
};
|
|
@@ -324,6 +339,6 @@ export var Popover = /*#__PURE__*/forwardRef(function Popover(_ref, ref) {
|
|
|
324
339
|
"aria-label": label,
|
|
325
340
|
"aria-labelledby": labelledBy,
|
|
326
341
|
"data-testid": testId,
|
|
327
|
-
className: ax([styles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
342
|
+
className: ax([styles.root, surfaceResetStyles.root, preset && popoverAnimationStyles.root, consumerXcss])
|
|
328
343
|
}, children);
|
|
329
344
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/top-layer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
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",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/browser-apis": "^1.
|
|
38
|
+
"@atlaskit/browser-apis": "^1.2.0",
|
|
39
39
|
"@atlaskit/css": "^1.0.0",
|
|
40
40
|
"@atlaskit/ds-lib": "^8.0.0",
|
|
41
41
|
"@atlaskit/layering": "^4.1.0",
|
|
42
42
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
43
|
-
"@atlaskit/tokens": "^16.
|
|
43
|
+
"@atlaskit/tokens": "^16.2.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
|
-
"@compiled/react": "^0.
|
|
45
|
+
"@compiled/react": "^1.0.0",
|
|
46
46
|
"bind-event-listener": "^3.0.0",
|
|
47
47
|
"raf-schd": "^4.0.3"
|
|
48
48
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/button": "^24.3.0",
|
|
57
57
|
"@atlaskit/heading": "^6.2.0",
|
|
58
58
|
"@atlaskit/lozenge": "^14.1.0",
|
|
59
|
-
"@atlaskit/primitives": "^
|
|
59
|
+
"@atlaskit/primitives": "^22.1.0",
|
|
60
60
|
"@atlaskit/ssr": "workspace:^",
|
|
61
61
|
"@atlaskit/textfield": "^9.1.0",
|
|
62
62
|
"@atlassian/ssr-tests": "workspace:^",
|