@atlaskit/popup 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 1.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e2a6337bb05`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e2a6337bb05) - Reverts changes 1.6.3 in @atlaskit/popup, reverts disabling pointer events on iframes when popup is open.
8
+
3
9
  ## 1.6.3
4
10
 
5
11
  ### Patch Changes
@@ -30,16 +30,6 @@ var popupStyles = (0, _react2.css)({
30
30
  outline: 'none'
31
31
  }
32
32
  });
33
-
34
- // disables iframe pointer events while popup is open, except if iframe is nested inside popup
35
- // solves an issue of popup not being closed on iframe click
36
- // @ts-expect-error adding `!important` to style rules is currently a type error
37
- var blockPointerEventsOnExternalIframeStyles = (0, _react2.css)({
38
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
39
- 'iframe:not([data-ds--popup] iframe)': {
40
- pointerEvents: 'none !important'
41
- }
42
- });
43
33
  var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
44
34
  return (0, _react2.jsx)("div", (0, _extends2.default)({
45
35
  css: popupStyles
@@ -109,7 +99,6 @@ function PopperWrapper(_ref) {
109
99
  id: id,
110
100
  "data-placement": placement,
111
101
  "data-testid": testId,
112
- "data-ds--popup": "true",
113
102
  ref: function ref(node) {
114
103
  if (node) {
115
104
  if (typeof _ref3 === 'function') {
@@ -125,9 +114,7 @@ function PopperWrapper(_ref) {
125
114
  // first on the browser address bar when using keyboard
126
115
  ,
127
116
  tabIndex: autoFocus ? 0 : undefined
128
- }, (0, _react2.jsx)(_react2.Global, {
129
- styles: blockPointerEventsOnExternalIframeStyles
130
- }), (0, _react2.jsx)(_repositionOnUpdate.RepositionOnUpdate, {
117
+ }, (0, _react2.jsx)(_repositionOnUpdate.RepositionOnUpdate, {
131
118
  update: update
132
119
  }, content({
133
120
  update: update,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
3
  import { forwardRef, useMemo, useState } from 'react';
4
- import { css, Global, jsx } from '@emotion/react';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import { Popper } from '@atlaskit/popper';
6
6
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
7
7
  import { borderRadius, layers } from '@atlaskit/theme/constants';
@@ -21,16 +21,6 @@ const popupStyles = css({
21
21
  outline: 'none'
22
22
  }
23
23
  });
24
-
25
- // disables iframe pointer events while popup is open, except if iframe is nested inside popup
26
- // solves an issue of popup not being closed on iframe click
27
- // @ts-expect-error adding `!important` to style rules is currently a type error
28
- const blockPointerEventsOnExternalIframeStyles = css({
29
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
30
- 'iframe:not([data-ds--popup] iframe)': {
31
- pointerEvents: 'none !important'
32
- }
33
- });
34
24
  const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => jsx("div", _extends({
35
25
  css: popupStyles
36
26
  }, props, {
@@ -89,7 +79,6 @@ function PopperWrapper({
89
79
  id: id,
90
80
  "data-placement": placement,
91
81
  "data-testid": testId,
92
- "data-ds--popup": "true",
93
82
  ref: node => {
94
83
  if (node) {
95
84
  if (typeof ref === 'function') {
@@ -105,9 +94,7 @@ function PopperWrapper({
105
94
  // first on the browser address bar when using keyboard
106
95
  ,
107
96
  tabIndex: autoFocus ? 0 : undefined
108
- }, jsx(Global, {
109
- styles: blockPointerEventsOnExternalIframeStyles
110
- }), jsx(RepositionOnUpdate, {
97
+ }, jsx(RepositionOnUpdate, {
111
98
  update: update
112
99
  }, content({
113
100
  update,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  /** @jsx jsx */
4
4
  import { forwardRef, useMemo, useState } from 'react';
5
- import { css, Global, jsx } from '@emotion/react';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { Popper } from '@atlaskit/popper';
7
7
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
8
8
  import { borderRadius, layers } from '@atlaskit/theme/constants';
@@ -22,16 +22,6 @@ var popupStyles = css({
22
22
  outline: 'none'
23
23
  }
24
24
  });
25
-
26
- // disables iframe pointer events while popup is open, except if iframe is nested inside popup
27
- // solves an issue of popup not being closed on iframe click
28
- // @ts-expect-error adding `!important` to style rules is currently a type error
29
- var blockPointerEventsOnExternalIframeStyles = css({
30
- // eslint-disable-next-line @repo/internal/styles/no-nested-styles
31
- 'iframe:not([data-ds--popup] iframe)': {
32
- pointerEvents: 'none !important'
33
- }
34
- });
35
25
  var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
36
26
  return jsx("div", _extends({
37
27
  css: popupStyles
@@ -101,7 +91,6 @@ function PopperWrapper(_ref) {
101
91
  id: id,
102
92
  "data-placement": placement,
103
93
  "data-testid": testId,
104
- "data-ds--popup": "true",
105
94
  ref: function ref(node) {
106
95
  if (node) {
107
96
  if (typeof _ref3 === 'function') {
@@ -117,9 +106,7 @@ function PopperWrapper(_ref) {
117
106
  // first on the browser address bar when using keyboard
118
107
  ,
119
108
  tabIndex: autoFocus ? 0 : undefined
120
- }, jsx(Global, {
121
- styles: blockPointerEventsOnExternalIframeStyles
122
- }), jsx(RepositionOnUpdate, {
109
+ }, jsx(RepositionOnUpdate, {
123
110
  update: update
124
111
  }, content({
125
112
  update: update,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "atlassian": {
30
30
  "team": "Design System Team",
31
- "releaseModel": "scheduled",
31
+ "releaseModel": "continuous",
32
32
  "website": {
33
33
  "name": "Popup",
34
34
  "category": "Components"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/popper": "^5.5.0",
40
40
  "@atlaskit/portal": "^4.3.0",
41
41
  "@atlaskit/theme": "^12.5.0",
42
- "@atlaskit/tokens": "^1.4.0",
42
+ "@atlaskit/tokens": "^1.5.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "bind-event-listener": "^2.1.1",
@@ -54,10 +54,9 @@
54
54
  "@atlaskit/docs": "*",
55
55
  "@atlaskit/icon": "^21.12.0",
56
56
  "@atlaskit/menu": "^1.7.0",
57
- "@atlaskit/page-layout": "^1.6.0",
58
57
  "@atlaskit/radio": "^5.6.0",
59
58
  "@atlaskit/section-message": "^6.4.0",
60
- "@atlaskit/select": "^16.4.0",
59
+ "@atlaskit/select": "^16.5.0",
61
60
  "@atlaskit/ssr": "*",
62
61
  "@atlaskit/textfield": "^5.5.0",
63
62
  "@atlaskit/toggle": "^12.6.0",
@@ -65,7 +64,6 @@
65
64
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
66
65
  "@testing-library/dom": "^8.17.1",
67
66
  "@testing-library/react": "^12.1.5",
68
- "@testing-library/user-event": "^14.4.3",
69
67
  "ast-types": "^0.13.3",
70
68
  "jest-axe": "^4.0.0",
71
69
  "jscodeshift": "^0.13.0",
package/report.api.md CHANGED
@@ -8,6 +8,7 @@
8
8
  ### Table of contents
9
9
 
10
10
  - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
11
12
 
12
13
  ### Main Entry Types
13
14
 
@@ -89,3 +90,16 @@ export interface TriggerProps {
89
90
  ```
90
91
 
91
92
  <!--SECTION END: Main Entry Types-->
93
+
94
+ ### Peer Dependencies
95
+
96
+ <!--SECTION START: Peer Dependencies-->
97
+
98
+ ```json
99
+ {
100
+ "react": "^16.8.0",
101
+ "react-dom": "^16.8.0"
102
+ }
103
+ ```
104
+
105
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,80 @@
1
+ ## API Report File for "@atlaskit/popup"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { ComponentType } from 'react';
8
+ import { CSSProperties } from 'react';
9
+ import { Dispatch } from 'react';
10
+ import { FC } from 'react';
11
+ import { Placement } from '@atlaskit/popper';
12
+ import { PopperChildrenProps } from '@atlaskit/popper';
13
+ import { default as React_2 } from 'react';
14
+ import { ReactNode } from 'react';
15
+ import { Ref } from 'react';
16
+ import { SetStateAction } from 'react';
17
+
18
+ // @public (undocumented)
19
+ interface BaseProps {
20
+ autoFocus?: boolean;
21
+ boundary?: 'clippingParents' | HTMLElement;
22
+ content: (props: ContentProps) => React_2.ReactNode;
23
+ fallbackPlacements?: Placement[];
24
+ id?: string;
25
+ isOpen: boolean;
26
+ offset?: [number, number];
27
+ onClose?(event: Event | React_2.KeyboardEvent | React_2.MouseEvent): void;
28
+ placement?: Placement;
29
+ popupComponent?: ComponentType<PopupComponentProps>;
30
+ rootBoundary?: 'document' | 'viewport';
31
+ shouldFlip?: boolean;
32
+ shouldUseCaptureOnOutsideClick?: boolean;
33
+ testId?: string;
34
+ }
35
+
36
+ // @public (undocumented)
37
+ export interface ContentProps {
38
+ isOpen: boolean;
39
+ onClose?: BaseProps['onClose'];
40
+ setInitialFocusRef: Dispatch<SetStateAction<HTMLElement | null>>;
41
+ update: PopperChildrenProps['update'];
42
+ }
43
+
44
+ // @public (undocumented)
45
+ const Popup: FC<PopupProps>;
46
+ export { Popup }
47
+ export default Popup;
48
+
49
+ // @public (undocumented)
50
+ export interface PopupComponentProps {
51
+ 'data-placement': Placement;
52
+ 'data-testid'?: string;
53
+ children: ReactNode;
54
+ id?: string;
55
+ ref: Ref<HTMLDivElement>;
56
+ style: CSSProperties;
57
+ tabIndex: number | undefined;
58
+ }
59
+
60
+ // @public (undocumented)
61
+ export interface PopupProps extends BaseProps {
62
+ trigger: (props: TriggerProps) => React_2.ReactNode;
63
+ zIndex?: number;
64
+ }
65
+
66
+ // @public (undocumented)
67
+ export interface TriggerProps {
68
+ // (undocumented)
69
+ 'aria-controls'?: string;
70
+ // (undocumented)
71
+ 'aria-expanded': boolean;
72
+ // (undocumented)
73
+ 'aria-haspopup': boolean;
74
+ // (undocumented)
75
+ ref: Ref<any>;
76
+ }
77
+
78
+ // (No @packageDocumentation comment for this package)
79
+
80
+ ```