@atlaskit/modal-dialog 12.0.3 → 12.1.0
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 +10 -0
- package/dist/cjs/internal/components/modal-dialog.js +4 -2
- package/dist/cjs/internal/constants.js +7 -7
- package/dist/cjs/modal-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/components/modal-dialog.js +3 -2
- package/dist/es2019/internal/constants.js +6 -6
- package/dist/es2019/modal-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/components/modal-dialog.js +3 -2
- package/dist/esm/internal/constants.js +6 -6
- package/dist/esm/modal-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/internal/constants.d.ts +3 -5
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 12.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`993eb469fcb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/993eb469fcb) - Instrumented `@atlaskit/modal-dialog` with the new theming package, `@atlaskit/tokens`. Tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 12.0.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -27,6 +27,8 @@ var _fadeIn = _interopRequireDefault(require("@atlaskit/motion/fade-in"));
|
|
|
27
27
|
|
|
28
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
29
29
|
|
|
30
|
+
var _tokens = require("@atlaskit/tokens");
|
|
31
|
+
|
|
30
32
|
var _constants = require("../constants");
|
|
31
33
|
|
|
32
34
|
var _context = require("../context");
|
|
@@ -47,7 +49,7 @@ var dialogStyles = (0, _core.css)({
|
|
|
47
49
|
maxHeight: '100vh',
|
|
48
50
|
flex: '1 1 auto',
|
|
49
51
|
flexDirection: 'column',
|
|
50
|
-
backgroundColor: _colors.N0,
|
|
52
|
+
backgroundColor: (0, _tokens.token)('color.background.overlay', _colors.N0),
|
|
51
53
|
color: _constants.textColor,
|
|
52
54
|
pointerEvents: 'auto',
|
|
53
55
|
'@media (min-width: 480px)': {
|
|
@@ -56,7 +58,7 @@ var dialogStyles = (0, _core.css)({
|
|
|
56
58
|
marginRight: 'inherit',
|
|
57
59
|
marginLeft: 'inherit',
|
|
58
60
|
borderRadius: _constants.borderRadius,
|
|
59
|
-
boxShadow: "0 0 0 1px ".concat(_colors.N30A, ", 0 2px 1px ").concat(_colors.N30A, ", 0 0 20px -6px ").concat(_colors.N60A)
|
|
61
|
+
boxShadow: (0, _tokens.token)('shadow.overlay', "0 0 0 1px ".concat(_colors.N30A, ", 0 2px 1px ").concat(_colors.N30A, ", 0 0 20px -6px ").concat(_colors.N60A))
|
|
60
62
|
},
|
|
61
63
|
|
|
62
64
|
/**
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.iconColor = exports.
|
|
6
|
+
exports.iconColor = exports.textColor = exports.keylineColor = exports.keylineHeight = exports.titleIconMargin = exports.footerItemGap = exports.padding = exports.verticalOffset = exports.borderRadius = exports.gutter = exports.width = void 0;
|
|
7
7
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
|
|
10
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var width = {
|
|
13
15
|
values: ['small', 'medium', 'large', 'x-large'],
|
|
14
16
|
widths: {
|
|
@@ -35,14 +37,12 @@ var titleIconMargin = gridSize;
|
|
|
35
37
|
exports.titleIconMargin = titleIconMargin;
|
|
36
38
|
var keylineHeight = 2;
|
|
37
39
|
exports.keylineHeight = keylineHeight;
|
|
38
|
-
var keylineColor = _colors.N30;
|
|
40
|
+
var keylineColor = (0, _tokens.token)('color.border.neutral', _colors.N30);
|
|
39
41
|
exports.keylineColor = keylineColor;
|
|
40
|
-
var textColor = (0, _colors.text)();
|
|
42
|
+
var textColor = (0, _tokens.token)('color.text.highEmphasis', (0, _colors.text)());
|
|
41
43
|
exports.textColor = textColor;
|
|
42
|
-
var focusOutlineColor = _colors.N800;
|
|
43
|
-
exports.focusOutlineColor = focusOutlineColor;
|
|
44
44
|
var iconColor = {
|
|
45
|
-
danger: _colors.R400,
|
|
46
|
-
warning: _colors.Y400
|
|
45
|
+
danger: (0, _tokens.token)('color.iconBorder.danger', _colors.R400),
|
|
46
|
+
warning: (0, _tokens.token)('color.iconBorder.warning', _colors.Y400)
|
|
47
47
|
};
|
|
48
48
|
exports.iconColor = iconColor;
|
|
@@ -85,7 +85,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
85
85
|
action: 'closed',
|
|
86
86
|
componentName: 'modalDialog',
|
|
87
87
|
packageName: "@atlaskit/modal-dialog",
|
|
88
|
-
packageVersion: "12.0
|
|
88
|
+
packageVersion: "12.1.0"
|
|
89
89
|
});
|
|
90
90
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
91
91
|
if (shouldCloseOnOverlayClick) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -8,6 +8,7 @@ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
|
8
8
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
9
9
|
import FadeIn from '@atlaskit/motion/fade-in';
|
|
10
10
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
11
12
|
import { borderRadius, textColor } from '../constants';
|
|
12
13
|
import { ModalContext, ScrollContext } from '../context';
|
|
13
14
|
import useOnMotionFinish from '../hooks/use-on-motion-finish';
|
|
@@ -22,7 +23,7 @@ const dialogStyles = css({
|
|
|
22
23
|
maxHeight: '100vh',
|
|
23
24
|
flex: '1 1 auto',
|
|
24
25
|
flexDirection: 'column',
|
|
25
|
-
backgroundColor: N0,
|
|
26
|
+
backgroundColor: token('color.background.overlay', N0),
|
|
26
27
|
color: textColor,
|
|
27
28
|
pointerEvents: 'auto',
|
|
28
29
|
'@media (min-width: 480px)': {
|
|
@@ -31,7 +32,7 @@ const dialogStyles = css({
|
|
|
31
32
|
marginRight: 'inherit',
|
|
32
33
|
marginLeft: 'inherit',
|
|
33
34
|
borderRadius,
|
|
34
|
-
boxShadow: `0 0 0 1px ${N30A}, 0 2px 1px ${N30A}, 0 0 20px -6px ${N60A}`
|
|
35
|
+
boxShadow: token('shadow.overlay', `0 0 0 1px ${N30A}, 0 2px 1px ${N30A}, 0 0 20px -6px ${N60A}`)
|
|
35
36
|
},
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N30, R400, text, Y400 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { borderRadius as getBorderRadius, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
export const width = {
|
|
4
5
|
values: ['small', 'medium', 'large', 'x-large'],
|
|
5
6
|
widths: {
|
|
@@ -18,10 +19,9 @@ export const padding = gridSize * 3;
|
|
|
18
19
|
export const footerItemGap = gridSize;
|
|
19
20
|
export const titleIconMargin = gridSize;
|
|
20
21
|
export const keylineHeight = 2;
|
|
21
|
-
export const keylineColor = N30;
|
|
22
|
-
export const textColor =
|
|
23
|
-
export const focusOutlineColor = N800;
|
|
22
|
+
export const keylineColor = token('color.border.neutral', N30);
|
|
23
|
+
export const textColor = token('color.text.highEmphasis', text());
|
|
24
24
|
export const iconColor = {
|
|
25
|
-
danger: R400,
|
|
26
|
-
warning: Y400
|
|
25
|
+
danger: token('color.iconBorder.danger', R400),
|
|
26
|
+
warning: token('color.iconBorder.warning', Y400)
|
|
27
27
|
};
|
|
@@ -50,7 +50,7 @@ const ModalWrapper = props => {
|
|
|
50
50
|
action: 'closed',
|
|
51
51
|
componentName: 'modalDialog',
|
|
52
52
|
packageName: "@atlaskit/modal-dialog",
|
|
53
|
-
packageVersion: "12.0
|
|
53
|
+
packageVersion: "12.1.0"
|
|
54
54
|
});
|
|
55
55
|
const onBlanketClicked = useCallback(e => {
|
|
56
56
|
if (shouldCloseOnOverlayClick) {
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,6 +10,7 @@ import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
|
10
10
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
11
11
|
import FadeIn from '@atlaskit/motion/fade-in';
|
|
12
12
|
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
13
14
|
import { borderRadius, textColor } from '../constants';
|
|
14
15
|
import { ModalContext, ScrollContext } from '../context';
|
|
15
16
|
import useOnMotionFinish from '../hooks/use-on-motion-finish';
|
|
@@ -24,7 +25,7 @@ var dialogStyles = css({
|
|
|
24
25
|
maxHeight: '100vh',
|
|
25
26
|
flex: '1 1 auto',
|
|
26
27
|
flexDirection: 'column',
|
|
27
|
-
backgroundColor: N0,
|
|
28
|
+
backgroundColor: token('color.background.overlay', N0),
|
|
28
29
|
color: textColor,
|
|
29
30
|
pointerEvents: 'auto',
|
|
30
31
|
'@media (min-width: 480px)': {
|
|
@@ -33,7 +34,7 @@ var dialogStyles = css({
|
|
|
33
34
|
marginRight: 'inherit',
|
|
34
35
|
marginLeft: 'inherit',
|
|
35
36
|
borderRadius: borderRadius,
|
|
36
|
-
boxShadow: "0 0 0 1px ".concat(N30A, ", 0 2px 1px ").concat(N30A, ", 0 0 20px -6px ").concat(N60A)
|
|
37
|
+
boxShadow: token('shadow.overlay', "0 0 0 1px ".concat(N30A, ", 0 2px 1px ").concat(N30A, ", 0 0 20px -6px ").concat(N60A))
|
|
37
38
|
},
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N30, R400, text, Y400 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { borderRadius as getBorderRadius, gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
export var width = {
|
|
4
5
|
values: ['small', 'medium', 'large', 'x-large'],
|
|
5
6
|
widths: {
|
|
@@ -18,10 +19,9 @@ export var padding = gridSize * 3;
|
|
|
18
19
|
export var footerItemGap = gridSize;
|
|
19
20
|
export var titleIconMargin = gridSize;
|
|
20
21
|
export var keylineHeight = 2;
|
|
21
|
-
export var keylineColor = N30;
|
|
22
|
-
export var textColor =
|
|
23
|
-
export var focusOutlineColor = N800;
|
|
22
|
+
export var keylineColor = token('color.border.neutral', N30);
|
|
23
|
+
export var textColor = token('color.text.highEmphasis', text());
|
|
24
24
|
export var iconColor = {
|
|
25
|
-
danger: R400,
|
|
26
|
-
warning: Y400
|
|
25
|
+
danger: token('color.iconBorder.danger', R400),
|
|
26
|
+
warning: token('color.iconBorder.warning', Y400)
|
|
27
27
|
};
|
|
@@ -56,7 +56,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
56
56
|
action: 'closed',
|
|
57
57
|
componentName: 'modalDialog',
|
|
58
58
|
packageName: "@atlaskit/modal-dialog",
|
|
59
|
-
packageVersion: "12.0
|
|
59
|
+
packageVersion: "12.1.0"
|
|
60
60
|
});
|
|
61
61
|
var onBlanketClicked = useCallback(function (e) {
|
|
62
62
|
if (shouldCloseOnOverlayClick) {
|
package/dist/esm/version.json
CHANGED
|
@@ -15,11 +15,9 @@ export declare const padding: number;
|
|
|
15
15
|
export declare const footerItemGap: number;
|
|
16
16
|
export declare const titleIconMargin: number;
|
|
17
17
|
export declare const keylineHeight = 2;
|
|
18
|
-
export declare const keylineColor
|
|
19
|
-
export declare const textColor:
|
|
20
|
-
export declare const
|
|
21
|
-
declare type IconColor = {
|
|
18
|
+
export declare const keylineColor: "var(--ds-border-neutral)";
|
|
19
|
+
export declare const textColor: "var(--ds-text-highEmphasis)";
|
|
20
|
+
export declare const iconColor: {
|
|
22
21
|
[key in Appearance]: string;
|
|
23
22
|
};
|
|
24
|
-
export declare const iconColor: IconColor;
|
|
25
23
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0",
|
|
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/"
|
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
"@atlaskit/blanket": "^12.2.0",
|
|
42
42
|
"@atlaskit/codemod-utils": "^3.4.0",
|
|
43
43
|
"@atlaskit/ds-lib": "^1.3.0",
|
|
44
|
-
"@atlaskit/focus-ring": "0.2.
|
|
44
|
+
"@atlaskit/focus-ring": "0.2.4",
|
|
45
45
|
"@atlaskit/icon": "^21.9.0",
|
|
46
46
|
"@atlaskit/motion": "^1.0.0",
|
|
47
47
|
"@atlaskit/portal": "^4.1.0",
|
|
48
48
|
"@atlaskit/theme": "^12.0.0",
|
|
49
|
+
"@atlaskit/tokens": "^0.3.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
50
51
|
"@emotion/core": "^10.0.9",
|
|
51
52
|
"raf-schd": "^2.1.0",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"@repo/internal": {
|
|
104
105
|
"ui-components": "lite-mode",
|
|
105
106
|
"analytics": "analytics-next",
|
|
106
|
-
"theming": "
|
|
107
|
+
"theming": "tokens",
|
|
107
108
|
"deprecation": "no-deprecated-imports",
|
|
108
109
|
"styling": "emotion"
|
|
109
110
|
}
|