@atlaskit/modal-dialog 12.8.1 → 12.8.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/modal-dialog
2
2
 
3
+ ## 12.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41628](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41628) [`b05664f7aba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b05664f7aba) - Use feature flag to toggle if we enable UNSAFE_LAYERING
8
+
9
+ ## 12.8.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#40650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40650) [`07aa588c8a4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07aa588c8a4) - Reverts the fix to text descender cut-off, due to incompatibilities with Firefox and Safari.
14
+
3
15
  ## 12.8.1
4
16
 
5
17
  ### Patch Changes
@@ -50,27 +50,19 @@ var iconStyles = (0, _react.css)({
50
50
  */
51
51
  var lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
52
52
  var truncatedTextStyles = (0, _react.css)({
53
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
54
+ marginTop: "".concat(lineHeightOffset / 2, "px"),
55
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
56
+ marginBottom: "".concat(lineHeightOffset / 2, "px"),
57
+ lineHeight: adjustedLineHeight,
58
+ overflow: 'hidden',
53
59
  textOverflow: 'ellipsis',
54
- whiteSpace: 'nowrap',
55
- // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
56
- '@supports (overflow-x: clip)': {
57
- overflowX: 'clip'
58
- },
59
- '@supports not (overflow-x: clip)': {
60
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
61
- marginTop: "".concat(lineHeightOffset / 2, "px"),
62
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
63
- marginBottom: "".concat(lineHeightOffset / 2, "px"),
64
- lineHeight: adjustedLineHeight,
65
- overflow: 'hidden'
66
- }
60
+ whiteSpace: 'nowrap'
67
61
  });
68
62
  var truncatedTextIconStyles = (0, _react.css)({
69
- '@supports not (overflow-x: clip)': {
70
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
71
- marginBottom: "".concat(lineHeightOffset / 2, "px"),
72
- lineHeight: 1.2
73
- }
63
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
64
+ marginBottom: "".concat(lineHeightOffset / 2, "px"),
65
+ lineHeight: 1.2
74
66
  });
75
67
  var TitleIcon = function TitleIcon(_ref) {
76
68
  var appearance = _ref.appearance,
@@ -16,6 +16,7 @@ var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
16
16
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
17
17
  var _layering = require("@atlaskit/layering");
18
18
  var _fadeIn = _interopRequireDefault(require("@atlaskit/motion/fade-in"));
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
20
21
  var _constants = require("@atlaskit/theme/constants");
21
22
  var _modalDialog = _interopRequireDefault(require("./internal/components/modal-dialog"));
@@ -86,7 +87,7 @@ var ModalWrapper = function ModalWrapper(props) {
86
87
  action: 'closed',
87
88
  componentName: 'modalDialog',
88
89
  packageName: "@atlaskit/modal-dialog",
89
- packageVersion: "12.8.1"
90
+ packageVersion: "12.8.3"
90
91
  });
91
92
  var onBlanketClicked = (0, _react.useCallback)(function (e) {
92
93
  if (shouldCloseOnOverlayClick) {
@@ -111,7 +112,9 @@ var ModalWrapper = function ModalWrapper(props) {
111
112
  onCloseComplete: onCloseComplete,
112
113
  onOpenComplete: onOpenComplete
113
114
  }, children));
114
- return (0, _react2.jsx)(_layering.UNSAFE_LAYERING, null, (0, _react2.jsx)(_portal.default, {
115
+ return (0, _react2.jsx)(_layering.UNSAFE_LAYERING, {
116
+ isDisabled: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.layering_qmiw3') ? false : true
117
+ }, (0, _react2.jsx)(_portal.default, {
115
118
  zIndex: _constants.layers.modal()
116
119
  }, (0, _react2.jsx)(_fadeIn.default, null, function (fadeInProps) {
117
120
  return (0, _react2.jsx)("div", (0, _extends2.default)({}, fadeInProps, {
@@ -43,27 +43,19 @@ const iconStyles = css({
43
43
  */
44
44
  const lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
45
45
  const truncatedTextStyles = css({
46
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
47
+ marginTop: `${lineHeightOffset / 2}px`,
48
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
49
+ marginBottom: `${lineHeightOffset / 2}px`,
50
+ lineHeight: adjustedLineHeight,
51
+ overflow: 'hidden',
46
52
  textOverflow: 'ellipsis',
47
- whiteSpace: 'nowrap',
48
- // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
49
- '@supports (overflow-x: clip)': {
50
- overflowX: 'clip'
51
- },
52
- '@supports not (overflow-x: clip)': {
53
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
54
- marginTop: `${lineHeightOffset / 2}px`,
55
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
56
- marginBottom: `${lineHeightOffset / 2}px`,
57
- lineHeight: adjustedLineHeight,
58
- overflow: 'hidden'
59
- }
53
+ whiteSpace: 'nowrap'
60
54
  });
61
55
  const truncatedTextIconStyles = css({
62
- '@supports not (overflow-x: clip)': {
63
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
64
- marginBottom: `${lineHeightOffset / 2}px`,
65
- lineHeight: 1.2
66
- }
56
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
57
+ marginBottom: `${lineHeightOffset / 2}px`,
58
+ lineHeight: 1.2
67
59
  });
68
60
  const TitleIcon = ({
69
61
  appearance,
@@ -10,6 +10,7 @@ import Blanket from '@atlaskit/blanket';
10
10
  import noop from '@atlaskit/ds-lib/noop';
11
11
  import { UNSAFE_LAYERING } from '@atlaskit/layering';
12
12
  import FadeIn from '@atlaskit/motion/fade-in';
13
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
14
  import Portal from '@atlaskit/portal';
14
15
  import { layers } from '@atlaskit/theme/constants';
15
16
  import ModalDialog from './internal/components/modal-dialog';
@@ -71,7 +72,7 @@ const ModalWrapper = props => {
71
72
  action: 'closed',
72
73
  componentName: 'modalDialog',
73
74
  packageName: "@atlaskit/modal-dialog",
74
- packageVersion: "12.8.1"
75
+ packageVersion: "12.8.3"
75
76
  });
76
77
  const onBlanketClicked = useCallback(e => {
77
78
  if (shouldCloseOnOverlayClick) {
@@ -96,7 +97,9 @@ const ModalWrapper = props => {
96
97
  onCloseComplete: onCloseComplete,
97
98
  onOpenComplete: onOpenComplete
98
99
  }, children));
99
- return jsx(UNSAFE_LAYERING, null, jsx(Portal, {
100
+ return jsx(UNSAFE_LAYERING, {
101
+ isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
102
+ }, jsx(Portal, {
100
103
  zIndex: layers.modal()
101
104
  }, jsx(FadeIn, null, fadeInProps => jsx("div", _extends({}, fadeInProps, {
102
105
  css: fillScreenStyles,
@@ -43,27 +43,19 @@ var iconStyles = css({
43
43
  */
44
44
  var lineHeightOffset = fontSize - fontSize * adjustedLineHeight;
45
45
  var truncatedTextStyles = css({
46
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
47
+ marginTop: "".concat(lineHeightOffset / 2, "px"),
48
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
49
+ marginBottom: "".concat(lineHeightOffset / 2, "px"),
50
+ lineHeight: adjustedLineHeight,
51
+ overflow: 'hidden',
46
52
  textOverflow: 'ellipsis',
47
- whiteSpace: 'nowrap',
48
- // Use "clip" overflow to allow ellipses on x-axis without clipping descenders
49
- '@supports (overflow-x: clip)': {
50
- overflowX: 'clip'
51
- },
52
- '@supports not (overflow-x: clip)': {
53
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
54
- marginTop: "".concat(lineHeightOffset / 2, "px"),
55
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
56
- marginBottom: "".concat(lineHeightOffset / 2, "px"),
57
- lineHeight: adjustedLineHeight,
58
- overflow: 'hidden'
59
- }
53
+ whiteSpace: 'nowrap'
60
54
  });
61
55
  var truncatedTextIconStyles = css({
62
- '@supports not (overflow-x: clip)': {
63
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
64
- marginBottom: "".concat(lineHeightOffset / 2, "px"),
65
- lineHeight: 1.2
66
- }
56
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
57
+ marginBottom: "".concat(lineHeightOffset / 2, "px"),
58
+ lineHeight: 1.2
67
59
  });
68
60
  var TitleIcon = function TitleIcon(_ref) {
69
61
  var appearance = _ref.appearance,
@@ -10,6 +10,7 @@ import Blanket from '@atlaskit/blanket';
10
10
  import noop from '@atlaskit/ds-lib/noop';
11
11
  import { UNSAFE_LAYERING } from '@atlaskit/layering';
12
12
  import FadeIn from '@atlaskit/motion/fade-in';
13
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
14
  import Portal from '@atlaskit/portal';
14
15
  import { layers } from '@atlaskit/theme/constants';
15
16
  import ModalDialog from './internal/components/modal-dialog';
@@ -76,7 +77,7 @@ var ModalWrapper = function ModalWrapper(props) {
76
77
  action: 'closed',
77
78
  componentName: 'modalDialog',
78
79
  packageName: "@atlaskit/modal-dialog",
79
- packageVersion: "12.8.1"
80
+ packageVersion: "12.8.3"
80
81
  });
81
82
  var onBlanketClicked = useCallback(function (e) {
82
83
  if (shouldCloseOnOverlayClick) {
@@ -101,7 +102,9 @@ var ModalWrapper = function ModalWrapper(props) {
101
102
  onCloseComplete: onCloseComplete,
102
103
  onOpenComplete: onOpenComplete
103
104
  }, children));
104
- return jsx(UNSAFE_LAYERING, null, jsx(Portal, {
105
+ return jsx(UNSAFE_LAYERING, {
106
+ isDisabled: getBooleanFF('platform.design-system-team.layering_qmiw3') ? false : true
107
+ }, jsx(Portal, {
105
108
  zIndex: layers.modal()
106
109
  }, jsx(FadeIn, null, function (fadeInProps) {
107
110
  return jsx("div", _extends({}, fadeInProps, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "12.8.1",
3
+ "version": "12.8.3",
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/"
@@ -34,10 +34,11 @@
34
34
  "@atlaskit/icon": "^21.12.0",
35
35
  "@atlaskit/layering": "^0.2.0",
36
36
  "@atlaskit/motion": "^1.5.0",
37
+ "@atlaskit/platform-feature-flags": "^0.2.0",
37
38
  "@atlaskit/portal": "^4.3.0",
38
39
  "@atlaskit/primitives": "^1.6.0",
39
40
  "@atlaskit/theme": "^12.6.0",
40
- "@atlaskit/tokens": "^1.25.0",
41
+ "@atlaskit/tokens": "^1.27.0",
41
42
  "@babel/runtime": "^7.0.0",
42
43
  "@emotion/react": "^11.7.1",
43
44
  "bind-event-listener": "^2.1.1",
@@ -54,10 +55,14 @@
54
55
  "@af/integration-testing": "*",
55
56
  "@af/visual-regression": "*",
56
57
  "@atlaskit/button": "*",
58
+ "@atlaskit/dropdown-menu": "^12.0.0",
59
+ "@atlaskit/popup": "^1.10.0",
60
+ "@atlaskit/select": "^16.7.0",
57
61
  "@atlaskit/ssr": "*",
58
62
  "@atlaskit/visual-regression": "*",
59
63
  "@atlaskit/webdriver-runner": "*",
60
64
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
65
+ "@atlassian/feature-flags-test-utils": "*",
61
66
  "@testing-library/dom": "^8.17.1",
62
67
  "@testing-library/react": "^12.1.5",
63
68
  "@testing-library/react-hooks": "^8.0.1",
@@ -116,6 +121,15 @@
116
121
  "./modal-footer": "./src/modal-footer.tsx",
117
122
  "./modal-transition": "./src/modal-transition.tsx"
118
123
  },
124
+ "platform-feature-flags": {
125
+ "platform.design-system-team.layering_qmiw3": {
126
+ "type": "boolean"
127
+ },
128
+ "platform.design-system-team.popup-select-close_8h15h": {
129
+ "type": "boolean",
130
+ "referenceOnly": "true"
131
+ }
132
+ },
119
133
  "homepage": "https://atlassian.design/components/modal-dialog/",
120
134
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
121
135
  }