@atlaskit/inline-dialog 13.6.1 → 13.6.3
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 +12 -0
- package/dist/cjs/InlineDialog/index.js +1 -1
- package/dist/cjs/InlineDialog/styled/container.js +2 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/InlineDialog/index.js +1 -1
- package/dist/es2019/InlineDialog/styled/container.js +3 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/InlineDialog/index.js +1 -1
- package/dist/esm/InlineDialog/styled/container.js +3 -4
- package/dist/esm/version.json +1 -1
- package/dist/types-ts4.5/InlineDialog/index.d.ts +7 -0
- package/dist/types-ts4.5/InlineDialog/styled/container.d.ts +19 -0
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/dist/types-ts4.5/types.d.ts +49 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/inline-dialog
|
|
2
2
|
|
|
3
|
+
## 13.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
|
|
8
|
+
|
|
9
|
+
## 13.6.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
14
|
+
|
|
3
15
|
## 13.6.1
|
|
4
16
|
|
|
5
17
|
### Patch 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.
|
|
22
|
+
var packageVersion = "13.6.3";
|
|
23
23
|
var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
|
|
24
24
|
if (!node) {
|
|
25
25
|
return false;
|
|
@@ -29,14 +29,13 @@ var themedBoxShadow = (0, _components.themed)({
|
|
|
29
29
|
dark: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.DN50A, ", 0 0 1px ").concat(_colors.DN60A), ")")
|
|
30
30
|
});
|
|
31
31
|
var borderRadius = (0, _constants.borderRadius)();
|
|
32
|
-
var gridSize = (0, _constants.gridSize)();
|
|
33
32
|
var CSS_THEME_BACKGROUND = '--theme-background';
|
|
34
33
|
var CSS_THEME_COLOR = '--theme-color';
|
|
35
34
|
var CSS_THEME_BOX_SHADOW = '--theme-box-shadow';
|
|
36
35
|
var containerStyles = (0, _react2.css)({
|
|
37
36
|
boxSizing: 'content-box',
|
|
38
|
-
maxWidth: "".concat(
|
|
39
|
-
maxHeight: "".concat(
|
|
37
|
+
maxWidth: "".concat(8 * 56, "px"),
|
|
38
|
+
maxHeight: "".concat(8 * 56, "px"),
|
|
40
39
|
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)"),
|
|
41
40
|
zIndex: _constants.layers.dialog(),
|
|
42
41
|
background: "var(".concat(CSS_THEME_BACKGROUND, ")"),
|
package/dist/cjs/version.json
CHANGED
|
@@ -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.
|
|
11
|
+
const packageVersion = "13.6.3";
|
|
12
12
|
const checkIsChildOfPortal = node => {
|
|
13
13
|
if (!node) {
|
|
14
14
|
return false;
|
|
@@ -5,7 +5,7 @@ import React, { forwardRef } from 'react';
|
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
8
|
-
import { borderRadius as getBorderRadius,
|
|
8
|
+
import { borderRadius as getBorderRadius, layers } from '@atlaskit/theme/constants';
|
|
9
9
|
const themedBackground = themed({
|
|
10
10
|
light: `var(--ds-surface-overlay, ${N0})`,
|
|
11
11
|
dark: `var(--ds-surface-overlay, ${DN50})`
|
|
@@ -19,14 +19,13 @@ const themedBoxShadow = themed({
|
|
|
19
19
|
dark: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${DN50A}, 0 0 1px ${DN60A}`})`
|
|
20
20
|
});
|
|
21
21
|
const borderRadius = getBorderRadius();
|
|
22
|
-
const gridSize = getGridSize();
|
|
23
22
|
const CSS_THEME_BACKGROUND = '--theme-background';
|
|
24
23
|
const CSS_THEME_COLOR = '--theme-color';
|
|
25
24
|
const CSS_THEME_BOX_SHADOW = '--theme-box-shadow';
|
|
26
25
|
const containerStyles = css({
|
|
27
26
|
boxSizing: 'content-box',
|
|
28
|
-
maxWidth: `${
|
|
29
|
-
maxHeight: `${
|
|
27
|
+
maxWidth: `${8 * 56}px`,
|
|
28
|
+
maxHeight: `${8 * 56}px`,
|
|
30
29
|
padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-300, 24px)"}`,
|
|
31
30
|
zIndex: layers.dialog(),
|
|
32
31
|
background: `var(${CSS_THEME_BACKGROUND})`,
|
package/dist/es2019/version.json
CHANGED
|
@@ -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.
|
|
11
|
+
var packageVersion = "13.6.3";
|
|
12
12
|
var checkIsChildOfPortal = function checkIsChildOfPortal(node) {
|
|
13
13
|
if (!node) {
|
|
14
14
|
return false;
|
|
@@ -8,7 +8,7 @@ import React, { forwardRef } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { DN50, DN50A, DN600, DN60A, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
11
|
-
import { borderRadius as getBorderRadius,
|
|
11
|
+
import { borderRadius as getBorderRadius, layers } from '@atlaskit/theme/constants';
|
|
12
12
|
var themedBackground = themed({
|
|
13
13
|
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
14
14
|
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
@@ -22,14 +22,13 @@ var themedBoxShadow = themed({
|
|
|
22
22
|
dark: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(DN50A, ", 0 0 1px ").concat(DN60A), ")")
|
|
23
23
|
});
|
|
24
24
|
var borderRadius = getBorderRadius();
|
|
25
|
-
var gridSize = getGridSize();
|
|
26
25
|
var CSS_THEME_BACKGROUND = '--theme-background';
|
|
27
26
|
var CSS_THEME_COLOR = '--theme-color';
|
|
28
27
|
var CSS_THEME_BOX_SHADOW = '--theme-box-shadow';
|
|
29
28
|
var containerStyles = css({
|
|
30
29
|
boxSizing: 'content-box',
|
|
31
|
-
maxWidth: "".concat(
|
|
32
|
-
maxHeight: "".concat(
|
|
30
|
+
maxWidth: "".concat(8 * 56, "px"),
|
|
31
|
+
maxHeight: "".concat(8 * 56, "px"),
|
|
33
32
|
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)"),
|
|
34
33
|
zIndex: layers.dialog(),
|
|
35
34
|
background: "var(".concat(CSS_THEME_BACKGROUND, ")"),
|
package/dist/esm/version.json
CHANGED
|
@@ -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,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.
|
|
3
|
+
"version": "13.6.3",
|
|
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/"
|