@atlaskit/modal-dialog 12.6.0 → 12.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 +12 -0
- package/dist/cjs/internal/constants.js +1 -1
- package/dist/cjs/modal-wrapper.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/constants.js +2 -2
- package/dist/es2019/modal-wrapper.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/constants.js +2 -2
- package/dist/esm/modal-wrapper.js +2 -1
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
- package/report.api.md +1 -0
- package/tmp/api-report-tmp.d.ts +113 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 12.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`abf69e9a4f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/abf69e9a4f6) - Removes usage of deprecated theme mixins in favor of static token / color usage.
|
|
8
|
+
|
|
9
|
+
## 12.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`b6b02e57520`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b6b02e57520) - Restore support for foreground modal
|
|
14
|
+
|
|
3
15
|
## 12.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -32,7 +32,7 @@ var keylineHeight = 2;
|
|
|
32
32
|
exports.keylineHeight = keylineHeight;
|
|
33
33
|
var keylineColor = "var(--ds-border, ".concat(_colors.N30, ")");
|
|
34
34
|
exports.keylineColor = keylineColor;
|
|
35
|
-
var textColor = "var(--ds-text, ".concat(
|
|
35
|
+
var textColor = "var(--ds-text, ".concat(_colors.N900, ")");
|
|
36
36
|
exports.textColor = textColor;
|
|
37
37
|
var iconColor = {
|
|
38
38
|
danger: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
|
|
@@ -86,7 +86,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
86
86
|
action: 'closed',
|
|
87
87
|
componentName: 'modalDialog',
|
|
88
88
|
packageName: "@atlaskit/modal-dialog",
|
|
89
|
-
packageVersion: "12.6.
|
|
89
|
+
packageVersion: "12.6.2"
|
|
90
90
|
});
|
|
91
91
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
92
92
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -122,6 +122,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
122
122
|
"aria-hidden": !isForeground
|
|
123
123
|
}), (0, _react2.jsx)(_reactFocusLock.default, {
|
|
124
124
|
autoFocus: autoFocusLock,
|
|
125
|
+
disabled: !isForeground,
|
|
125
126
|
returnFocus: true,
|
|
126
127
|
whiteList: whiteListElements
|
|
127
128
|
}, (0, _react2.jsx)(_reactScrolllock.default, null), shouldScrollInViewport ? (0, _react2.jsx)(_reactScrolllock.TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket));
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N30,
|
|
1
|
+
import { N30, N900, R400, Y400 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { borderRadius as getBorderRadius,
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
4
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
@@ -20,7 +20,7 @@ export const padding = gridSize * 3;
|
|
|
20
20
|
export const titleIconMargin = gridSize;
|
|
21
21
|
export const keylineHeight = 2;
|
|
22
22
|
export const keylineColor = `var(--ds-border, ${N30})`;
|
|
23
|
-
export const textColor = `var(--ds-text, ${
|
|
23
|
+
export const textColor = `var(--ds-text, ${N900})`;
|
|
24
24
|
export const iconColor = {
|
|
25
25
|
danger: `var(--ds-icon-danger, ${R400})`,
|
|
26
26
|
warning: `var(--ds-icon-warning, ${Y400})`
|
|
@@ -72,7 +72,7 @@ const ModalWrapper = props => {
|
|
|
72
72
|
action: 'closed',
|
|
73
73
|
componentName: 'modalDialog',
|
|
74
74
|
packageName: "@atlaskit/modal-dialog",
|
|
75
|
-
packageVersion: "12.6.
|
|
75
|
+
packageVersion: "12.6.2"
|
|
76
76
|
});
|
|
77
77
|
const onBlanketClicked = useCallback(e => {
|
|
78
78
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -107,6 +107,7 @@ const ModalWrapper = props => {
|
|
|
107
107
|
"aria-hidden": !isForeground
|
|
108
108
|
}), jsx(FocusLock, {
|
|
109
109
|
autoFocus: autoFocusLock,
|
|
110
|
+
disabled: !isForeground,
|
|
110
111
|
returnFocus: true,
|
|
111
112
|
whiteList: whiteListElements
|
|
112
113
|
}, jsx(ScrollLock, null), shouldScrollInViewport ? jsx(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket))));
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N30,
|
|
1
|
+
import { N30, N900, R400, Y400 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { borderRadius as getBorderRadius,
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
4
|
gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
@@ -20,7 +20,7 @@ export var padding = gridSize * 3;
|
|
|
20
20
|
export var titleIconMargin = gridSize;
|
|
21
21
|
export var keylineHeight = 2;
|
|
22
22
|
export var keylineColor = "var(--ds-border, ".concat(N30, ")");
|
|
23
|
-
export var textColor = "var(--ds-text, ".concat(
|
|
23
|
+
export var textColor = "var(--ds-text, ".concat(N900, ")");
|
|
24
24
|
export var iconColor = {
|
|
25
25
|
danger: "var(--ds-icon-danger, ".concat(R400, ")"),
|
|
26
26
|
warning: "var(--ds-icon-warning, ".concat(Y400, ")")
|
|
@@ -76,7 +76,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
76
76
|
action: 'closed',
|
|
77
77
|
componentName: 'modalDialog',
|
|
78
78
|
packageName: "@atlaskit/modal-dialog",
|
|
79
|
-
packageVersion: "12.6.
|
|
79
|
+
packageVersion: "12.6.2"
|
|
80
80
|
});
|
|
81
81
|
var onBlanketClicked = useCallback(function (e) {
|
|
82
82
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -112,6 +112,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
112
112
|
"aria-hidden": !isForeground
|
|
113
113
|
}), jsx(FocusLock, {
|
|
114
114
|
autoFocus: autoFocusLock,
|
|
115
|
+
disabled: !isForeground,
|
|
115
116
|
returnFocus: true,
|
|
116
117
|
whiteList: whiteListElements
|
|
117
118
|
}, jsx(ScrollLock, null), shouldScrollInViewport ? jsx(TouchScrollable, null, modalDialogWithBlanket) : modalDialogWithBlanket));
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.2",
|
|
4
4
|
"description": "A modal dialog displays content that requires user interaction, in a layer above the page.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"atlaskit:src": "src/index.tsx",
|
|
36
36
|
"atlassian": {
|
|
37
37
|
"team": "Design System Team",
|
|
38
|
-
"releaseModel": "
|
|
38
|
+
"releaseModel": "continuous",
|
|
39
39
|
"website": {
|
|
40
40
|
"name": "Modal dialog",
|
|
41
41
|
"category": "Components"
|
package/report.api.md
CHANGED
|
@@ -55,6 +55,7 @@ export interface ModalDialogProps {
|
|
|
55
55
|
children?: React_2.ReactNode;
|
|
56
56
|
height?: number | string;
|
|
57
57
|
isBlanketHidden?: boolean;
|
|
58
|
+
label?: string;
|
|
58
59
|
onClose?: OnCloseHandler;
|
|
59
60
|
onCloseComplete?: OnCloseCompleteHandler;
|
|
60
61
|
onOpenComplete?: OnOpenCompleteHandler;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/modal-dialog"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { ExitingPersistenceProps } from '@atlaskit/motion/exiting-persistence';
|
|
10
|
+
import { jsx } from '@emotion/react';
|
|
11
|
+
import { default as React_2 } from 'react';
|
|
12
|
+
import { ReactNode } from 'react';
|
|
13
|
+
import { RefObject } from 'react';
|
|
14
|
+
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
15
|
+
|
|
16
|
+
// @public (undocumented)
|
|
17
|
+
export type Appearance = 'danger' | 'warning';
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type KeyboardOrMouseEvent = KeyboardEvent | React_2.KeyboardEvent<any> | React_2.MouseEvent<any>;
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export type ModalAttributes = {
|
|
24
|
+
testId?: ModalDialogProps['testId'];
|
|
25
|
+
titleId: string;
|
|
26
|
+
onClose?: OnCloseHandler;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export const ModalBody: (props: ModalBodyProps) => jsx.JSX.Element;
|
|
31
|
+
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export interface ModalBodyProps {
|
|
34
|
+
children: React_2.ReactNode;
|
|
35
|
+
testId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
export interface ModalDialogProps {
|
|
40
|
+
autoFocus?: RefObject<HTMLElement | null | undefined> | boolean;
|
|
41
|
+
children?: React_2.ReactNode;
|
|
42
|
+
height?: number | string;
|
|
43
|
+
isBlanketHidden?: boolean;
|
|
44
|
+
label?: string;
|
|
45
|
+
onClose?: OnCloseHandler;
|
|
46
|
+
onCloseComplete?: OnCloseCompleteHandler;
|
|
47
|
+
onOpenComplete?: OnOpenCompleteHandler;
|
|
48
|
+
onStackChange?: OnStackChangeHandler;
|
|
49
|
+
shouldCloseOnEscapePress?: boolean;
|
|
50
|
+
shouldCloseOnOverlayClick?: boolean;
|
|
51
|
+
shouldScrollInViewport?: boolean;
|
|
52
|
+
stackIndex?: number;
|
|
53
|
+
testId?: string;
|
|
54
|
+
width?: WidthNames | number | string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// @public
|
|
58
|
+
export const ModalFooter: (props: ModalFooterProps) => jsx.JSX.Element;
|
|
59
|
+
|
|
60
|
+
// @public (undocumented)
|
|
61
|
+
export interface ModalFooterProps {
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
testId?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// @public
|
|
67
|
+
export const ModalHeader: (props: ModalHeaderProps) => jsx.JSX.Element;
|
|
68
|
+
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
export interface ModalHeaderProps {
|
|
71
|
+
children?: React_2.ReactNode;
|
|
72
|
+
testId?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// @public
|
|
76
|
+
export const ModalTitle: (props: ModalTitleProps) => jsx.JSX.Element;
|
|
77
|
+
|
|
78
|
+
// @public (undocumented)
|
|
79
|
+
export interface ModalTitleProps {
|
|
80
|
+
appearance?: Appearance;
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
isMultiline?: boolean;
|
|
83
|
+
testId?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// @public
|
|
87
|
+
export const ModalTransition: (props: Pick<ExitingPersistenceProps, 'children'>) => JSX.Element;
|
|
88
|
+
|
|
89
|
+
// @public
|
|
90
|
+
const ModalWrapper: (props: ModalDialogProps) => jsx.JSX.Element;
|
|
91
|
+
export default ModalWrapper;
|
|
92
|
+
|
|
93
|
+
// @public (undocumented)
|
|
94
|
+
export type OnCloseCompleteHandler = (element: HTMLElement) => void;
|
|
95
|
+
|
|
96
|
+
// @public (undocumented)
|
|
97
|
+
export type OnCloseHandler = (e: KeyboardOrMouseEvent, analyticEvent: UIAnalyticsEvent) => void;
|
|
98
|
+
|
|
99
|
+
// @public (undocumented)
|
|
100
|
+
export type OnOpenCompleteHandler = (node: HTMLElement, isAppearing: boolean) => void;
|
|
101
|
+
|
|
102
|
+
// @public (undocumented)
|
|
103
|
+
export type OnStackChangeHandler = (stackIndex: number) => void;
|
|
104
|
+
|
|
105
|
+
// @public (undocumented)
|
|
106
|
+
export const useModal: () => ModalAttributes;
|
|
107
|
+
|
|
108
|
+
// @public (undocumented)
|
|
109
|
+
type WidthNames = 'large' | 'medium' | 'small' | 'x-large';
|
|
110
|
+
|
|
111
|
+
// (No @packageDocumentation comment for this package)
|
|
112
|
+
|
|
113
|
+
```
|