@atlaskit/inline-dialog 13.3.9 → 13.4.1

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,21 @@
1
1
  # @atlaskit/inline-dialog
2
2
 
3
+ ## 13.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+
9
+ ## 13.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`8d2ea17980d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d2ea17980d) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 13.3.9
4
20
 
5
21
  ### Patch Changes
@@ -11,7 +11,7 @@ exports.default = exports.InlineDialogWithoutAnalytics = void 0;
11
11
 
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _bindEventListener = require("bind-event-listener");
17
17
 
@@ -31,7 +31,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
 
32
32
  /** @jsx jsx */
33
33
  var packageName = "@atlaskit/inline-dialog";
34
- var packageVersion = "13.3.9";
34
+ var packageVersion = "13.4.1";
35
35
 
36
36
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
37
37
  if (!node) {
@@ -114,13 +114,13 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
114
114
  });
115
115
  return unbind;
116
116
  }, [isOpen, handleClickOutside]);
117
- var popper = isOpen ? (0, _core.jsx)(_popper.Popper, {
117
+ var popper = isOpen ? (0, _react2.jsx)(_popper.Popper, {
118
118
  placement: placement,
119
119
  strategy: strategy
120
120
  }, function (_ref2) {
121
121
  var _ref3 = _ref2.ref,
122
122
  style = _ref2.style;
123
- return (0, _core.jsx)(_container.Container, {
123
+ return (0, _react2.jsx)(_container.Container, {
124
124
  onBlur: onContentBlur,
125
125
  onFocus: onContentFocus,
126
126
  onClick: onContentClick,
@@ -139,9 +139,9 @@ var InlineDialog = /*#__PURE__*/(0, _react.memo)(function InlineDialog(_ref) {
139
139
  testId: testId
140
140
  }, content);
141
141
  }) : null;
142
- return (0, _core.jsx)(_popper.Manager, null, (0, _core.jsx)(_popper.Reference, null, function (_ref4) {
142
+ return (0, _react2.jsx)(_popper.Manager, null, (0, _react2.jsx)(_popper.Reference, null, function (_ref4) {
143
143
  var ref = _ref4.ref;
144
- return (0, _core.jsx)(_reactNodeResolver.default, {
144
+ return (0, _react2.jsx)(_reactNodeResolver.default, {
145
145
  innerRef: function innerRef(node) {
146
146
  triggerRef.current = node;
147
147
 
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
 
@@ -46,7 +46,7 @@ var gridSize = (0, _constants.gridSize)();
46
46
  var CSS_THEME_BACKGROUND = '--theme-background';
47
47
  var CSS_THEME_COLOR = '--theme-color';
48
48
  var CSS_THEME_BOX_SHADOW = '--theme-box-shadow';
49
- var containerStyles = (0, _core.css)({
49
+ var containerStyles = (0, _react2.css)({
50
50
  boxSizing: 'content-box',
51
51
  maxWidth: "".concat(gridSize * 56, "px"),
52
52
  maxHeight: "".concat(gridSize * 56, "px"),
@@ -78,7 +78,7 @@ var Container = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
78
78
  style = _ref.style,
79
79
  testId = _ref.testId;
80
80
  var theme = (0, _components.useGlobalTheme)();
81
- return (0, _core.jsx)("div", {
81
+ return (0, _react2.jsx)("div", {
82
82
  css: containerStyles,
83
83
  "data-testid": testId,
84
84
  onBlur: onBlur,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.3.9",
3
+ "version": "13.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { memo, useCallback, useEffect, useRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import { bind } from 'bind-event-listener';
5
5
  import NodeResolver from 'react-node-resolver';
6
6
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
@@ -8,7 +8,7 @@ import noop from '@atlaskit/ds-lib/noop';
8
8
  import { Manager, Popper, Reference } from '@atlaskit/popper';
9
9
  import { Container } from './styled/container';
10
10
  const packageName = "@atlaskit/inline-dialog";
11
- const packageVersion = "13.3.9";
11
+ const packageVersion = "13.4.1";
12
12
 
13
13
  const checkIsChildOfPortal = node => {
14
14
  if (!node) {
@@ -4,7 +4,7 @@
4
4
 
5
5
  /** @jsx jsx */
6
6
  import React, { forwardRef } from 'react';
7
- import { css, jsx } from '@emotion/core';
7
+ import { css, jsx } from '@emotion/react';
8
8
  import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
9
9
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
10
10
  import { borderRadius as getBorderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.3.9",
3
+ "version": "13.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { memo, useCallback, useEffect, useRef } from 'react';
3
- import { jsx } from '@emotion/core';
3
+ import { jsx } from '@emotion/react';
4
4
  import { bind } from 'bind-event-listener';
5
5
  import NodeResolver from 'react-node-resolver';
6
6
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
@@ -8,7 +8,7 @@ import noop from '@atlaskit/ds-lib/noop';
8
8
  import { Manager, Popper, Reference } from '@atlaskit/popper';
9
9
  import { Container } from './styled/container';
10
10
  var packageName = "@atlaskit/inline-dialog";
11
- var packageVersion = "13.3.9";
11
+ var packageVersion = "13.4.1";
12
12
 
13
13
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
14
14
  if (!node) {
@@ -10,7 +10,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
10
 
11
11
  /** @jsx jsx */
12
12
  import React, { forwardRef } from 'react';
13
- import { css, jsx } from '@emotion/core';
13
+ import { css, jsx } from '@emotion/react';
14
14
  import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
15
15
  import { themed, useGlobalTheme } from '@atlaskit/theme/components';
16
16
  import { borderRadius as getBorderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.3.9",
3
+ "version": "13.4.1",
4
4
  "sideEffects": false
5
5
  }
@@ -3,5 +3,5 @@ import React, { FC } from 'react';
3
3
  import type { InlineDialogProps } from '../types';
4
4
  declare const InlineDialog: FC<InlineDialogProps>;
5
5
  export { InlineDialog as InlineDialogWithoutAnalytics };
6
- declare const _default: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<InlineDialogProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "content" | "children" | "testId" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "strategy" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
6
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<InlineDialogProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "content" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "strategy" | "testId" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
7
7
  export default _default;
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import React, { FC } from 'react';
3
+ import type { InlineDialogProps } from '../types';
4
+ declare const InlineDialog: FC<InlineDialogProps>;
5
+ export { InlineDialog as InlineDialogWithoutAnalytics };
6
+ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<InlineDialogProps>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "content" | "isOpen" | "onContentBlur" | "onContentClick" | "onContentFocus" | "onClose" | "placement" | "strategy" | "testId" | "key" | "analyticsContext"> & React.RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ interface ContainerProps {
4
+ children: React.ReactNode;
5
+ onBlur?: React.FocusEventHandler<HTMLElement>;
6
+ onClick?: React.MouseEventHandler<HTMLElement>;
7
+ onFocus?: React.FocusEventHandler<HTMLElement>;
8
+ style: React.CSSProperties;
9
+ testId?: string;
10
+ }
11
+ /**
12
+ * __Container__
13
+ *
14
+ * A container is used as a styled wrapper around the contents of an inline dialog.
15
+ * Note that the styles here are merged with the style prop that comes from the popper.js library.
16
+ *
17
+ */
18
+ export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
19
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default } from './InlineDialog';
2
+ export type { Placement } from './types';
@@ -0,0 +1,49 @@
1
+ import { ReactNode } from 'react';
2
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
+ export declare type Placement = 'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
4
+ export interface InlineDialogProps extends WithAnalyticsEventsProps {
5
+ /**
6
+ * The elements that the InlineDialog will be positioned relative to.
7
+ */
8
+ children: ReactNode;
9
+ /**
10
+ * The elements to be displayed within the InlineDialog.
11
+ */
12
+ content: ReactNode;
13
+ /**
14
+ * Sets whether to show or hide the dialog.
15
+ */
16
+ isOpen?: boolean;
17
+ /**
18
+ * Function called when you lose focus on the object.
19
+ */
20
+ onContentBlur?: () => void;
21
+ /**
22
+ * Function called when user clicks on the open dialog.
23
+ */
24
+ onContentClick?: () => void;
25
+ /**
26
+ * Function called when user focuses on the open dialog.
27
+ */
28
+ onContentFocus?: () => void;
29
+ /**
30
+ * Function called when the dialog is open and a click occurs anywhere outside
31
+ * the dialog.
32
+ */
33
+ onClose?: (obj: {
34
+ isOpen: boolean;
35
+ event: Event;
36
+ }) => void;
37
+ /**
38
+ * Where the dialog should appear, relative to the contents of the children.
39
+ */
40
+ placement?: Placement;
41
+ /**
42
+ * Placement strategy used. Can be 'fixed' or 'absolute'. Defaults to 'fixed'.
43
+ */
44
+ strategy?: 'fixed' | 'absolute';
45
+ /**
46
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
47
+ */
48
+ testId?: string;
49
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.3.9",
3
+ "version": "13.4.1",
4
4
  "description": "An inline dialog is a pop-up container for small amounts of information. It can also contain controls.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,13 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.0 <4.5": {
17
+ "*": [
18
+ "dist/types-ts4.0/*"
19
+ ]
20
+ }
21
+ },
15
22
  "sideEffects": false,
16
23
  "atlaskit:src": "src/index.tsx",
17
24
  "atlassian": {
@@ -35,10 +42,10 @@
35
42
  "@atlaskit/analytics-next": "^8.2.0",
36
43
  "@atlaskit/ds-lib": "^2.1.0",
37
44
  "@atlaskit/popper": "^5.0.0",
38
- "@atlaskit/theme": "^12.1.0",
45
+ "@atlaskit/theme": "^12.2.0",
39
46
  "@atlaskit/tokens": "^0.10.0",
40
47
  "@babel/runtime": "^7.0.0",
41
- "@emotion/core": "^10.0.9",
48
+ "@emotion/react": "^11.7.1",
42
49
  "bind-event-listener": "^2.1.1",
43
50
  "react-node-resolver": "^1.0.1"
44
51
  },
@@ -47,20 +54,20 @@
47
54
  },
48
55
  "devDependencies": {
49
56
  "@atlaskit/button": "^16.3.0",
50
- "@atlaskit/datetime-picker": "^12.1.0",
57
+ "@atlaskit/datetime-picker": "^12.2.0",
51
58
  "@atlaskit/docs": "*",
52
59
  "@atlaskit/icon": "^21.10.0",
53
- "@atlaskit/modal-dialog": "^12.2.0",
54
- "@atlaskit/section-message": "^6.1.0",
55
- "@atlaskit/select": "^15.6.0",
60
+ "@atlaskit/modal-dialog": "^12.3.0",
61
+ "@atlaskit/section-message": "^6.2.0",
62
+ "@atlaskit/select": "^15.7.0",
56
63
  "@atlaskit/ssr": "*",
57
64
  "@atlaskit/visual-regression": "*",
58
65
  "@atlaskit/webdriver-runner": "*",
59
66
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
60
- "@testing-library/react": "^8.0.1",
67
+ "@testing-library/react": "^12.1.5",
61
68
  "react-dom": "^16.8.0",
62
69
  "react-lorem-component": "^0.13.0",
63
- "typescript": "4.3.5",
70
+ "typescript": "4.5.5",
64
71
  "wait-for-expect": "^1.2.0"
65
72
  },
66
73
  "keywords": [
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/types.d.ts"
7
+ "types": "../dist/types/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/types.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }