@atlaskit/modal-dialog 12.11.0 → 12.12.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 +12 -0
- package/dist/cjs/internal/constants.js +1 -2
- package/dist/cjs/modal-title.js +6 -31
- package/dist/cjs/modal-wrapper.js +1 -1
- package/dist/es2019/internal/constants.js +0 -1
- package/dist/es2019/modal-title.js +7 -32
- package/dist/es2019/modal-wrapper.js +1 -1
- package/dist/esm/internal/constants.js +0 -1
- package/dist/esm/modal-title.js +7 -32
- package/dist/esm/modal-wrapper.js +1 -1
- package/dist/types/internal/constants.d.ts +0 -1
- package/dist/types-ts4.5/internal/constants.d.ts +0 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/modal-dialog
|
|
2
2
|
|
|
3
|
+
## 12.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#89943](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89943) [`9e8e7fd1a601`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e8e7fd1a601) - [ux] Internal changes to typography, small visual change to modal title.
|
|
8
|
+
|
|
9
|
+
## 12.11.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#94316](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/94316) [`35fd5ed8e1d7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/35fd5ed8e1d7) - Upgrading internal dependency `bind-event-listener` to `@^3.0.0`
|
|
14
|
+
|
|
3
15
|
## 12.11.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.width = exports.verticalOffset = exports.
|
|
6
|
+
exports.width = exports.verticalOffset = exports.textColor = exports.padding = exports.keylineHeight = exports.keylineColor = exports.iconColor = exports.gutter = exports.borderRadius = void 0;
|
|
7
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
8
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
9
9
|
var width = exports.width = {
|
|
@@ -21,7 +21,6 @@ var gridSize = (0, _constants.gridSize)();
|
|
|
21
21
|
var borderRadius = exports.borderRadius = (0, _constants.borderRadius)();
|
|
22
22
|
var verticalOffset = exports.verticalOffset = gridSize * 2;
|
|
23
23
|
var padding = exports.padding = gridSize * 3;
|
|
24
|
-
var titleIconMargin = exports.titleIconMargin = gridSize;
|
|
25
24
|
var keylineHeight = exports.keylineHeight = 2;
|
|
26
25
|
var keylineColor = exports.keylineColor = "var(--ds-border, ".concat(_colors.N30, ")");
|
|
27
26
|
var textColor = exports.textColor = "var(--ds-text, ".concat(_colors.N900, ")");
|
package/dist/cjs/modal-title.js
CHANGED
|
@@ -12,19 +12,12 @@ var _hooks = require("./hooks");
|
|
|
12
12
|
var _constants = require("./internal/constants");
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
|
|
15
|
-
var fontSize = 20;
|
|
16
|
-
var lineHeight = 1;
|
|
17
|
-
var adjustedLineHeight = 1.2;
|
|
18
15
|
var titleStyles = (0, _react.css)({
|
|
19
16
|
display: 'flex',
|
|
20
17
|
minWidth: 0,
|
|
21
18
|
margin: "var(--ds-space-0, 0px)",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fontStyle: 'inherit',
|
|
25
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
26
|
-
letterSpacing: "-0.008em",
|
|
27
|
-
lineHeight: lineHeight
|
|
19
|
+
gap: "var(--ds-space-100, 8px)",
|
|
20
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
28
21
|
});
|
|
29
22
|
var textStyles = (0, _react.css)({
|
|
30
23
|
minWidth: 0,
|
|
@@ -37,35 +30,18 @@ var textStyles = (0, _react.css)({
|
|
|
37
30
|
wordWrap: 'break-word'
|
|
38
31
|
});
|
|
39
32
|
var iconStyles = (0, _react.css)({
|
|
40
|
-
flex: '0 0 auto'
|
|
41
|
-
alignSelf: 'start',
|
|
42
|
-
marginInlineEnd: "".concat(_constants.titleIconMargin, "px")
|
|
33
|
+
flex: '0 0 auto'
|
|
43
34
|
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* When the title is truncated (not multi-line), we adjust the
|
|
47
|
-
* line height to avoid cropping the descenders. This removes
|
|
48
|
-
* the extra spacing that we get from that adjustment.
|
|
49
|
-
*/
|
|
50
|
-
var lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
|
|
51
35
|
var truncatedTextStyles = (0, _react.css)({
|
|
52
|
-
lineHeight: adjustedLineHeight,
|
|
53
|
-
marginBlockEnd: "".concat(lineHeightOffset / 2, "px"),
|
|
54
|
-
marginBlockStart: "".concat(lineHeightOffset / 2, "px"),
|
|
55
36
|
overflow: 'hidden',
|
|
56
37
|
textOverflow: 'ellipsis',
|
|
57
38
|
whiteSpace: 'nowrap'
|
|
58
39
|
});
|
|
59
|
-
var truncatedTextIconStyles = (0, _react.css)({
|
|
60
|
-
lineHeight: 1.2,
|
|
61
|
-
marginBlockEnd: "".concat(lineHeightOffset / 2, "px")
|
|
62
|
-
});
|
|
63
40
|
var TitleIcon = function TitleIcon(_ref) {
|
|
64
|
-
var appearance = _ref.appearance
|
|
65
|
-
isMultiline = _ref.isMultiline;
|
|
41
|
+
var appearance = _ref.appearance;
|
|
66
42
|
var Icon = appearance === 'danger' ? _error.default : _warning.default;
|
|
67
43
|
return (0, _react.jsx)("span", {
|
|
68
|
-
css:
|
|
44
|
+
css: iconStyles
|
|
69
45
|
}, (0, _react.jsx)(Icon, {
|
|
70
46
|
label: appearance,
|
|
71
47
|
primaryColor: _constants.iconColor[appearance]
|
|
@@ -94,8 +70,7 @@ var ModalTitle = function ModalTitle(props) {
|
|
|
94
70
|
css: titleStyles,
|
|
95
71
|
"data-testid": testId
|
|
96
72
|
}, appearance && (0, _react.jsx)(TitleIcon, {
|
|
97
|
-
appearance: appearance
|
|
98
|
-
isMultiline: isMultiline
|
|
73
|
+
appearance: appearance
|
|
99
74
|
}), (0, _react.jsx)("span", {
|
|
100
75
|
id: titleId,
|
|
101
76
|
css: [textStyles, !isMultiline && truncatedTextStyles],
|
|
@@ -95,7 +95,7 @@ var ModalWrapper = function ModalWrapper(props) {
|
|
|
95
95
|
action: 'closed',
|
|
96
96
|
componentName: 'modalDialog',
|
|
97
97
|
packageName: "@atlaskit/modal-dialog",
|
|
98
|
-
packageVersion: "12.
|
|
98
|
+
packageVersion: "12.12.0"
|
|
99
99
|
});
|
|
100
100
|
var onBlanketClicked = (0, _react.useCallback)(function (e) {
|
|
101
101
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -17,7 +17,6 @@ const gridSize = getGridSize();
|
|
|
17
17
|
export const borderRadius = getBorderRadius();
|
|
18
18
|
export const verticalOffset = gridSize * 2;
|
|
19
19
|
export const padding = gridSize * 3;
|
|
20
|
-
export const titleIconMargin = gridSize;
|
|
21
20
|
export const keylineHeight = 2;
|
|
22
21
|
export const keylineColor = `var(--ds-border, ${N30})`;
|
|
23
22
|
export const textColor = `var(--ds-text, ${N900})`;
|
|
@@ -4,20 +4,13 @@ import { css, jsx } from '@emotion/react';
|
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
6
6
|
import { useModal } from './hooks';
|
|
7
|
-
import { iconColor
|
|
8
|
-
const fontSize = 20;
|
|
9
|
-
const lineHeight = 1;
|
|
10
|
-
const adjustedLineHeight = 1.2;
|
|
7
|
+
import { iconColor } from './internal/constants';
|
|
11
8
|
const titleStyles = css({
|
|
12
9
|
display: 'flex',
|
|
13
10
|
minWidth: 0,
|
|
14
11
|
margin: "var(--ds-space-0, 0px)",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fontStyle: 'inherit',
|
|
18
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
19
|
-
letterSpacing: `-0.008em`,
|
|
20
|
-
lineHeight: lineHeight
|
|
12
|
+
gap: "var(--ds-space-100, 8px)",
|
|
13
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
21
14
|
});
|
|
22
15
|
const textStyles = css({
|
|
23
16
|
minWidth: 0,
|
|
@@ -30,36 +23,19 @@ const textStyles = css({
|
|
|
30
23
|
wordWrap: 'break-word'
|
|
31
24
|
});
|
|
32
25
|
const iconStyles = css({
|
|
33
|
-
flex: '0 0 auto'
|
|
34
|
-
alignSelf: 'start',
|
|
35
|
-
marginInlineEnd: `${titleIconMargin}px`
|
|
26
|
+
flex: '0 0 auto'
|
|
36
27
|
});
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* When the title is truncated (not multi-line), we adjust the
|
|
40
|
-
* line height to avoid cropping the descenders. This removes
|
|
41
|
-
* the extra spacing that we get from that adjustment.
|
|
42
|
-
*/
|
|
43
|
-
const lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
|
|
44
28
|
const truncatedTextStyles = css({
|
|
45
|
-
lineHeight: adjustedLineHeight,
|
|
46
|
-
marginBlockEnd: `${lineHeightOffset / 2}px`,
|
|
47
|
-
marginBlockStart: `${lineHeightOffset / 2}px`,
|
|
48
29
|
overflow: 'hidden',
|
|
49
30
|
textOverflow: 'ellipsis',
|
|
50
31
|
whiteSpace: 'nowrap'
|
|
51
32
|
});
|
|
52
|
-
const truncatedTextIconStyles = css({
|
|
53
|
-
lineHeight: 1.2,
|
|
54
|
-
marginBlockEnd: `${lineHeightOffset / 2}px`
|
|
55
|
-
});
|
|
56
33
|
const TitleIcon = ({
|
|
57
|
-
appearance
|
|
58
|
-
isMultiline
|
|
34
|
+
appearance
|
|
59
35
|
}) => {
|
|
60
36
|
const Icon = appearance === 'danger' ? ErrorIcon : WarningIcon;
|
|
61
37
|
return jsx("span", {
|
|
62
|
-
css:
|
|
38
|
+
css: iconStyles
|
|
63
39
|
}, jsx(Icon, {
|
|
64
40
|
label: appearance,
|
|
65
41
|
primaryColor: iconColor[appearance]
|
|
@@ -90,8 +66,7 @@ const ModalTitle = props => {
|
|
|
90
66
|
css: titleStyles,
|
|
91
67
|
"data-testid": testId
|
|
92
68
|
}, appearance && jsx(TitleIcon, {
|
|
93
|
-
appearance: appearance
|
|
94
|
-
isMultiline: isMultiline
|
|
69
|
+
appearance: appearance
|
|
95
70
|
}), jsx("span", {
|
|
96
71
|
id: titleId,
|
|
97
72
|
css: [textStyles, !isMultiline && truncatedTextStyles],
|
|
@@ -80,7 +80,7 @@ const ModalWrapper = props => {
|
|
|
80
80
|
action: 'closed',
|
|
81
81
|
componentName: 'modalDialog',
|
|
82
82
|
packageName: "@atlaskit/modal-dialog",
|
|
83
|
-
packageVersion: "12.
|
|
83
|
+
packageVersion: "12.12.0"
|
|
84
84
|
});
|
|
85
85
|
const onBlanketClicked = useCallback(e => {
|
|
86
86
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -17,7 +17,6 @@ var gridSize = getGridSize();
|
|
|
17
17
|
export var borderRadius = getBorderRadius();
|
|
18
18
|
export var verticalOffset = gridSize * 2;
|
|
19
19
|
export var padding = gridSize * 3;
|
|
20
|
-
export var titleIconMargin = gridSize;
|
|
21
20
|
export var keylineHeight = 2;
|
|
22
21
|
export var keylineColor = "var(--ds-border, ".concat(N30, ")");
|
|
23
22
|
export var textColor = "var(--ds-text, ".concat(N900, ")");
|
package/dist/esm/modal-title.js
CHANGED
|
@@ -4,20 +4,13 @@ import { css, jsx } from '@emotion/react';
|
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
6
6
|
import { useModal } from './hooks';
|
|
7
|
-
import { iconColor
|
|
8
|
-
var fontSize = 20;
|
|
9
|
-
var lineHeight = 1;
|
|
10
|
-
var adjustedLineHeight = 1.2;
|
|
7
|
+
import { iconColor } from './internal/constants';
|
|
11
8
|
var titleStyles = css({
|
|
12
9
|
display: 'flex',
|
|
13
10
|
minWidth: 0,
|
|
14
11
|
margin: "var(--ds-space-0, 0px)",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fontStyle: 'inherit',
|
|
18
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
19
|
-
letterSpacing: "-0.008em",
|
|
20
|
-
lineHeight: lineHeight
|
|
12
|
+
gap: "var(--ds-space-100, 8px)",
|
|
13
|
+
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
21
14
|
});
|
|
22
15
|
var textStyles = css({
|
|
23
16
|
minWidth: 0,
|
|
@@ -30,35 +23,18 @@ var textStyles = css({
|
|
|
30
23
|
wordWrap: 'break-word'
|
|
31
24
|
});
|
|
32
25
|
var iconStyles = css({
|
|
33
|
-
flex: '0 0 auto'
|
|
34
|
-
alignSelf: 'start',
|
|
35
|
-
marginInlineEnd: "".concat(titleIconMargin, "px")
|
|
26
|
+
flex: '0 0 auto'
|
|
36
27
|
});
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* When the title is truncated (not multi-line), we adjust the
|
|
40
|
-
* line height to avoid cropping the descenders. This removes
|
|
41
|
-
* the extra spacing that we get from that adjustment.
|
|
42
|
-
*/
|
|
43
|
-
var lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
|
|
44
28
|
var truncatedTextStyles = css({
|
|
45
|
-
lineHeight: adjustedLineHeight,
|
|
46
|
-
marginBlockEnd: "".concat(lineHeightOffset / 2, "px"),
|
|
47
|
-
marginBlockStart: "".concat(lineHeightOffset / 2, "px"),
|
|
48
29
|
overflow: 'hidden',
|
|
49
30
|
textOverflow: 'ellipsis',
|
|
50
31
|
whiteSpace: 'nowrap'
|
|
51
32
|
});
|
|
52
|
-
var truncatedTextIconStyles = css({
|
|
53
|
-
lineHeight: 1.2,
|
|
54
|
-
marginBlockEnd: "".concat(lineHeightOffset / 2, "px")
|
|
55
|
-
});
|
|
56
33
|
var TitleIcon = function TitleIcon(_ref) {
|
|
57
|
-
var appearance = _ref.appearance
|
|
58
|
-
isMultiline = _ref.isMultiline;
|
|
34
|
+
var appearance = _ref.appearance;
|
|
59
35
|
var Icon = appearance === 'danger' ? ErrorIcon : WarningIcon;
|
|
60
36
|
return jsx("span", {
|
|
61
|
-
css:
|
|
37
|
+
css: iconStyles
|
|
62
38
|
}, jsx(Icon, {
|
|
63
39
|
label: appearance,
|
|
64
40
|
primaryColor: iconColor[appearance]
|
|
@@ -87,8 +63,7 @@ var ModalTitle = function ModalTitle(props) {
|
|
|
87
63
|
css: titleStyles,
|
|
88
64
|
"data-testid": testId
|
|
89
65
|
}, appearance && jsx(TitleIcon, {
|
|
90
|
-
appearance: appearance
|
|
91
|
-
isMultiline: isMultiline
|
|
66
|
+
appearance: appearance
|
|
92
67
|
}), jsx("span", {
|
|
93
68
|
id: titleId,
|
|
94
69
|
css: [textStyles, !isMultiline && truncatedTextStyles],
|
|
@@ -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.
|
|
88
|
+
packageVersion: "12.12.0"
|
|
89
89
|
});
|
|
90
90
|
var onBlanketClicked = useCallback(function (e) {
|
|
91
91
|
if (shouldCloseOnOverlayClick) {
|
|
@@ -12,7 +12,6 @@ export declare const gutter = 60;
|
|
|
12
12
|
export declare const borderRadius: number;
|
|
13
13
|
export declare const verticalOffset: number;
|
|
14
14
|
export declare const padding: number;
|
|
15
|
-
export declare const titleIconMargin: number;
|
|
16
15
|
export declare const keylineHeight = 2;
|
|
17
16
|
export declare const keylineColor: "var(--ds-border)";
|
|
18
17
|
export declare const textColor: "var(--ds-text)";
|
|
@@ -12,7 +12,6 @@ export declare const gutter = 60;
|
|
|
12
12
|
export declare const borderRadius: number;
|
|
13
13
|
export declare const verticalOffset: number;
|
|
14
14
|
export declare const padding: number;
|
|
15
|
-
export declare const titleIconMargin: number;
|
|
16
15
|
export declare const keylineHeight = 2;
|
|
17
16
|
export declare const keylineColor: "var(--ds-border)";
|
|
18
17
|
export declare const textColor: "var(--ds-text)";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/modal-dialog",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.12.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/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"watch": "tsc --watch --noEmit --project './tsconfig.json'"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/analytics-next": "^9.
|
|
32
|
+
"@atlaskit/analytics-next": "^9.3.0",
|
|
33
33
|
"@atlaskit/blanket": "^13.1.0",
|
|
34
34
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
35
35
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@atlaskit/motion": "^1.5.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
41
41
|
"@atlaskit/portal": "^4.4.0",
|
|
42
|
-
"@atlaskit/primitives": "^5.
|
|
42
|
+
"@atlaskit/primitives": "^5.6.0",
|
|
43
43
|
"@atlaskit/theme": "^12.7.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
44
|
+
"@atlaskit/tokens": "^1.44.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1",
|
|
47
|
-
"bind-event-listener": "^
|
|
47
|
+
"bind-event-listener": "^3.0.0",
|
|
48
48
|
"raf-schd": "^4.0.3",
|
|
49
49
|
"react-focus-lock": "^2.9.5",
|
|
50
50
|
"react-scrolllock": "^5.0.1",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"@af/integration-testing": "*",
|
|
59
59
|
"@af/visual-regression": "*",
|
|
60
60
|
"@atlaskit/button": "*",
|
|
61
|
-
"@atlaskit/checkbox": "
|
|
61
|
+
"@atlaskit/checkbox": "^13.1.0",
|
|
62
62
|
"@atlaskit/dropdown-menu": "^12.9.0",
|
|
63
63
|
"@atlaskit/popup": "^1.14.0",
|
|
64
|
-
"@atlaskit/radio": "
|
|
65
|
-
"@atlaskit/select": "^17.
|
|
64
|
+
"@atlaskit/radio": "^6.1.3",
|
|
65
|
+
"@atlaskit/select": "^17.7.0",
|
|
66
66
|
"@atlaskit/ssr": "*",
|
|
67
|
-
"@atlaskit/tooltip": "
|
|
67
|
+
"@atlaskit/tooltip": "^18.2.1",
|
|
68
68
|
"@atlaskit/visual-regression": "*",
|
|
69
69
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
70
70
|
"@atlassian/feature-flags-test-utils": "*",
|