@atlaskit/inline-dialog 13.6.0 → 13.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/inline-dialog
2
2
 
3
+ ## 13.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
8
+
9
+ ## 13.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
14
+
3
15
  ## 13.6.0
4
16
 
5
17
  ### Minor Changes
@@ -19,7 +19,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
19
19
  /** @jsx jsx */
20
20
 
21
21
  var packageName = "@atlaskit/inline-dialog";
22
- var packageVersion = "13.6.0";
22
+ var packageVersion = "13.6.2";
23
23
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
24
24
  if (!node) {
25
25
  return false;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.6.0",
3
+ "version": "13.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.6.0";
11
+ const packageVersion = "13.6.2";
12
12
  const checkIsChildOfPortal = node => {
13
13
  if (!node) {
14
14
  return false;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.6.0",
3
+ "version": "13.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.6.0";
11
+ var packageVersion = "13.6.2";
12
12
  var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
13
13
  if (!node) {
14
14
  return false;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/inline-dialog",
3
- "version": "13.6.0",
3
+ "version": "13.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
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';
3
+ export 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
4
  export interface InlineDialogProps extends WithAnalyticsEventsProps {
5
5
  /**
6
6
  * The elements that the InlineDialog will be positioned relative to.
@@ -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 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.6.0",
3
+ "version": "13.6.2",
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,14 @@
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.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
15
23
  "sideEffects": false,
16
24
  "atlaskit:src": "src/index.tsx",
17
25
  "atlassian": {
@@ -38,7 +46,7 @@
38
46
  "@atlaskit/ds-lib": "^2.2.0",
39
47
  "@atlaskit/popper": "^5.5.0",
40
48
  "@atlaskit/theme": "^12.5.0",
41
- "@atlaskit/tokens": "^1.3.0",
49
+ "@atlaskit/tokens": "^1.4.0",
42
50
  "@babel/runtime": "^7.0.0",
43
51
  "@emotion/react": "^11.7.1",
44
52
  "bind-event-listener": "^2.1.1",
@@ -62,7 +70,7 @@
62
70
  "@testing-library/react": "^12.1.5",
63
71
  "react-dom": "^16.8.0",
64
72
  "react-lorem-component": "^0.13.0",
65
- "typescript": "4.5.5",
73
+ "typescript": "~4.9.5",
66
74
  "wait-for-expect": "^1.2.0"
67
75
  },
68
76
  "keywords": [
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types.d.ts"
11
+ "../dist/types-ts4.5/types.d.ts"
12
12
  ]
13
13
  }
14
14
  }