@atlaskit/flag 14.6.4 → 14.7.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 14.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d176305ad56`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d176305ad56) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 14.6.4
4
14
 
5
15
  ### Patch Changes
@@ -26,7 +26,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
27
 
28
28
  var packageName = "@atlaskit/flag";
29
- var packageVersion = "14.6.4";
29
+ var packageVersion = "14.7.0";
30
30
  var AUTO_DISMISS_SECONDS = 8;
31
31
  /**
32
32
  * __Auto dismiss flag__
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _core = require("@emotion/core");
10
+ var _react = require("@emotion/react");
11
11
 
12
12
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
13
13
 
@@ -23,22 +23,22 @@ var _theme = require("./theme");
23
23
  var gridSize = (0, _constants.gridSize)();
24
24
  var separatorWidth = gridSize * 2;
25
25
  var defaultAppearanceTranslate = gridSize / 4;
26
- var separatorStyles = (0, _core.css)({
26
+ var separatorStyles = (0, _react.css)({
27
27
  display: 'inline-block',
28
28
  width: separatorWidth,
29
29
  textAlign: 'center'
30
30
  });
31
- var actionContainerStyles = (0, _core.css)({
31
+ var actionContainerStyles = (0, _react.css)({
32
32
  display: 'flex',
33
33
  paddingTop: gridSize,
34
34
  alignItems: 'center',
35
35
  flexWrap: 'wrap',
36
36
  transform: "translateX(-".concat(defaultAppearanceTranslate, "px)")
37
37
  });
38
- var boldActionContainerStyles = (0, _core.css)({
38
+ var boldActionContainerStyles = (0, _react.css)({
39
39
  transform: 0
40
40
  });
41
- var buttonStyles = (0, _core.css)({
41
+ var buttonStyles = (0, _react.css)({
42
42
  '&&, a&&': {
43
43
  marginLeft: 0,
44
44
  padding: "0 ".concat(gridSize, "px !important"),
@@ -53,12 +53,12 @@ var buttonStyles = (0, _core.css)({
53
53
  textDecoration: 'underline'
54
54
  }
55
55
  });
56
- var appeanceNormalButtonStyles = (0, _core.css)({
56
+ var appeanceNormalButtonStyles = (0, _react.css)({
57
57
  '&&, a&&': {
58
58
  padding: '0 !important'
59
59
  }
60
60
  });
61
- var isBoldButtonStyles = (0, _core.css)({
61
+ var isBoldButtonStyles = (0, _react.css)({
62
62
  '&&, a&&': {
63
63
  marginRight: gridSize
64
64
  }
@@ -78,14 +78,14 @@ var FlagActions = function FlagActions(props) {
78
78
  }
79
79
 
80
80
  var isBold = appearance !== _constants2.DEFAULT_APPEARANCE;
81
- return (0, _core.jsx)("div", {
81
+ return (0, _react.jsx)("div", {
82
82
  css: [actionContainerStyles, isBold && boldActionContainerStyles],
83
83
  "data-testid": testId && "".concat(testId, "-actions")
84
84
  }, actions.map(function (action, index) {
85
- return [index && !isBold ? (0, _core.jsx)("div", {
85
+ return [index && !isBold ? (0, _react.jsx)("div", {
86
86
  css: separatorStyles,
87
87
  key: index + 0.5
88
- }, "\xB7") : '', (0, _core.jsx)(_customThemeButton.default, {
88
+ }, "\xB7") : '', (0, _react.jsx)(_customThemeButton.default, {
89
89
  onClick: action.onClick,
90
90
  href: action.href,
91
91
  target: action.target,
@@ -14,7 +14,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
14
14
 
15
15
  var _react = require("react");
16
16
 
17
- var _core = require("@emotion/core");
17
+ var _react2 = require("@emotion/react");
18
18
 
19
19
  var _motion = require("@atlaskit/motion");
20
20
 
@@ -49,7 +49,7 @@ function useFlagGroup() {
49
49
  // that causes a broken transition
50
50
 
51
51
 
52
- var baseStyles = (0, _core.css)({
52
+ var baseStyles = (0, _react2.css)({
53
53
  width: flagWidth,
54
54
  position: 'absolute',
55
55
  bottom: 0,
@@ -77,14 +77,14 @@ var baseStyles = (0, _core.css)({
77
77
  }); // Transform needed to push up while 1st flag is leaving
78
78
  // Exiting time should match the exiting time of motion so is halved
79
79
 
80
- var dismissAllowedStyles = (0, _core.css)({
80
+ var dismissAllowedStyles = (0, _react2.css)({
81
81
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
82
82
  '&& + *': {
83
83
  transform: "translate(0, 0)",
84
84
  transitionDuration: "".concat(flagAnimationTime / 2, "ms")
85
85
  }
86
86
  });
87
- var flagGroupContainerStyles = (0, _core.css)({
87
+ var flagGroupContainerStyles = (0, _react2.css)({
88
88
  position: 'fixed',
89
89
  zIndex: _constants.layers.flag(),
90
90
  bottom: flagBottom,
@@ -123,7 +123,7 @@ var FlagGroup = function FlagGroup(props) {
123
123
  var renderChildren = function renderChildren() {
124
124
  return children && (0, _typeof2.default)(children) === 'object' ? _react.Children.map(children, function (flag, index) {
125
125
  var isDismissAllowed = index === 0;
126
- return (0, _core.jsx)(_motion.SlideIn, {
126
+ return (0, _react2.jsx)(_motion.SlideIn, {
127
127
  enterFrom: "left",
128
128
  fade: "inout",
129
129
  duration: flagAnimationTime,
@@ -131,9 +131,9 @@ var FlagGroup = function FlagGroup(props) {
131
131
  return _motion.easeIn;
132
132
  }
133
133
  }, function (props) {
134
- return (0, _core.jsx)("div", (0, _extends2.default)({}, props, {
134
+ return (0, _react2.jsx)("div", (0, _extends2.default)({}, props, {
135
135
  css: [baseStyles, isDismissAllowed && dismissAllowedStyles]
136
- }), (0, _core.jsx)(FlagGroupContext.Provider, {
136
+ }), (0, _react2.jsx)(FlagGroupContext.Provider, {
137
137
  value: // Only the first flag should be able to be dismissed.
138
138
  isDismissAllowed ? dismissFlagContext : defaultFlagGroupContext
139
139
  }, flag));
@@ -141,12 +141,12 @@ var FlagGroup = function FlagGroup(props) {
141
141
  }) : false;
142
142
  };
143
143
 
144
- return (0, _core.jsx)(_portal.default, {
144
+ return (0, _react2.jsx)(_portal.default, {
145
145
  zIndex: _constants.layers.flag()
146
- }, (0, _core.jsx)("div", {
146
+ }, (0, _react2.jsx)("div", {
147
147
  id: id,
148
148
  css: flagGroupContainerStyles
149
- }, hasFlags ? (0, _core.jsx)(_visuallyHidden.default, null, (0, _core.jsx)(LabelTag, null, label)) : null, (0, _core.jsx)(_motion.ExitingPersistence, {
149
+ }, hasFlags ? (0, _react2.jsx)(_visuallyHidden.default, null, (0, _react2.jsx)(LabelTag, null, label)) : null, (0, _react2.jsx)(_motion.ExitingPersistence, {
150
150
  appear: false
151
151
  }, renderChildren())));
152
152
  };
package/dist/cjs/flag.js CHANGED
@@ -15,7 +15,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
15
15
 
16
16
  var _react = require("react");
17
17
 
18
- var _core = require("@emotion/core");
18
+ var _react2 = require("@emotion/react");
19
19
 
20
20
  var _components = require("@atlaskit/theme/components");
21
21
 
@@ -44,27 +44,27 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
44
44
  var analyticsAttributes = {
45
45
  componentName: 'flag',
46
46
  packageName: "@atlaskit/flag",
47
- packageVersion: "14.6.4"
47
+ packageVersion: "14.7.0"
48
48
  };
49
49
  var gridSize = (0, _constants.gridSize)();
50
50
  var doubleGridSize = gridSize * 2;
51
- var titleGroupStyles = (0, _core.css)({
51
+ var titleGroupStyles = (0, _react2.css)({
52
52
  display: 'flex',
53
53
  alignItems: 'start'
54
54
  });
55
- var iconTitleStyles = (0, _core.css)({
55
+ var iconTitleStyles = (0, _react2.css)({
56
56
  display: 'flex',
57
57
  paddingTop: "".concat(gridSize / 2, "px"),
58
58
  alignItems: 'start',
59
59
  flex: 1
60
60
  });
61
- var flagHeaderStyles = (0, _core.css)({
61
+ var flagHeaderStyles = (0, _react2.css)({
62
62
  boxSizing: 'border-box',
63
63
  width: '100%',
64
64
  padding: doubleGridSize,
65
65
  borderRadius: (0, _constants.borderRadius)()
66
66
  });
67
- var flagContainerStyles = (0, _core.css)({
67
+ var flagContainerStyles = (0, _react2.css)({
68
68
  width: '100%',
69
69
  zIndex: _constants.layers.flag(),
70
70
  borderRadius: (0, _constants.borderRadius)(),
@@ -168,7 +168,7 @@ var Flag = function Flag(props) {
168
168
  var textColor = (0, _theme.getFlagTextColor)(appearance, mode);
169
169
  var iconColor = (0, _theme.getFlagIconColor)(appearance, mode);
170
170
  var isDismissable = isBold || isDismissAllowed;
171
- return (0, _core.jsx)("div", (0, _extends2.default)({
171
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
172
172
  style: {
173
173
  color: textColor,
174
174
  backgroundColor: (0, _theme.getFlagBackgroundColor)(appearance, mode),
@@ -177,33 +177,33 @@ var Flag = function Flag(props) {
177
177
  css: flagContainerStyles,
178
178
  role: "alert",
179
179
  "data-testid": testId
180
- }, autoDismissProps), (0, _core.jsx)(_focusRing.default, null, (0, _core.jsx)("div", {
180
+ }, autoDismissProps), (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)("div", {
181
181
  css: flagHeaderStyles // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
182
182
  ,
183
183
  tabIndex: 0
184
- }, (0, _core.jsx)("div", {
184
+ }, (0, _react2.jsx)("div", {
185
185
  style: {
186
186
  color: iconColor
187
187
  },
188
188
  css: titleGroupStyles
189
- }, (0, _core.jsx)("div", {
189
+ }, (0, _react2.jsx)("div", {
190
190
  css: iconTitleStyles
191
- }, icon, (0, _core.jsx)(_internal.Title, {
191
+ }, icon, (0, _react2.jsx)(_internal.Title, {
192
192
  color: textColor
193
- }, title)), isDismissable ? !(isBold && !description && !actions.length) && (0, _core.jsx)(_internal.DismissButton, {
193
+ }, title)), isDismissable ? !(isBold && !description && !actions.length) && (0, _react2.jsx)(_internal.DismissButton, {
194
194
  testId: testId,
195
195
  appearance: appearance,
196
196
  isBold: isBold,
197
197
  isExpanded: isExpanded,
198
198
  onClick: isBold ? toggleExpand : buttonActionCallback
199
- }) : null), (0, _core.jsx)(_internal.Expander, {
199
+ }) : null), (0, _react2.jsx)(_internal.Expander, {
200
200
  isExpanded: !isBold || isExpanded,
201
201
  testId: testId
202
- }, description && (0, _core.jsx)(_internal.Description, {
202
+ }, description && (0, _react2.jsx)(_internal.Description, {
203
203
  testId: testId && "".concat(testId, "-description"),
204
204
  color: textColor,
205
205
  isBold: isBold
206
- }, description), (0, _core.jsx)(_flagActions.default, {
206
+ }, description), (0, _react2.jsx)(_flagActions.default, {
207
207
  actions: actions,
208
208
  appearance: appearance,
209
209
  linkComponent: linkComponent,
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  /** @jsx jsx */
11
- var descriptionStyles = (0, _core.css)({
11
+ var descriptionStyles = (0, _react.css)({
12
12
  maxHeight: 100,
13
13
  // height is defined as 5 lines maximum by design
14
14
  overflow: 'auto',
@@ -20,7 +20,7 @@ var Description = function Description(_ref) {
20
20
  testId = _ref.testId,
21
21
  children = _ref.children,
22
22
  isBold = _ref.isBold;
23
- return (0, _core.jsx)("div", {
23
+ return (0, _react.jsx)("div", {
24
24
  style: {
25
25
  color: color
26
26
  },
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = require("react");
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react2 = require("@emotion/react");
13
13
 
14
14
  var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
15
15
 
@@ -28,7 +28,7 @@ var _theme = require("../theme");
28
28
  /** @jsx jsx */
29
29
  var gridSize = (0, _constants.gridSize)();
30
30
  var borderRadius = (0, _constants.borderRadius)();
31
- var dismissButtonStyles = (0, _core.css)({
31
+ var dismissButtonStyles = (0, _react2.css)({
32
32
  marginLeft: gridSize,
33
33
  padding: 0,
34
34
  flex: '0 0 auto',
@@ -40,7 +40,7 @@ var dismissButtonStyles = (0, _core.css)({
40
40
  lineHeight: '1',
41
41
  whiteSpace: 'nowrap'
42
42
  });
43
- var crossIconStyles = (0, _core.css)({
43
+ var crossIconStyles = (0, _react2.css)({
44
44
  paddingTop: "".concat(gridSize, "px")
45
45
  });
46
46
 
@@ -66,7 +66,7 @@ var DismissButton = function DismissButton(_ref) {
66
66
  buttonTestId = testId && "".concat(testId, "-toggle");
67
67
  }
68
68
 
69
- return (0, _core.jsx)(_focusRing.default, null, (0, _core.jsx)("button", {
69
+ return (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)("button", {
70
70
  style: {
71
71
  color: (0, _theme.getFlagTextColor)(appearance, mode)
72
72
  },
@@ -75,7 +75,7 @@ var DismissButton = function DismissButton(_ref) {
75
75
  "data-testid": buttonTestId,
76
76
  type: "button",
77
77
  "aria-expanded": isBold ? isExpanded : undefined
78
- }, (0, _core.jsx)(ButtonIcon, {
78
+ }, (0, _react2.jsx)(ButtonIcon, {
79
79
  label: buttonLabel,
80
80
  size: size
81
81
  })));
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _motion = require("@atlaskit/motion");
11
11
 
@@ -14,7 +14,7 @@ var _constants = require("@atlaskit/theme/constants");
14
14
  /** @jsx jsx */
15
15
  var gridSize = (0, _constants.gridSize)();
16
16
  var paddingLeft = gridSize * 5;
17
- var expanderStyles = (0, _core.css)({
17
+ var expanderStyles = (0, _react.css)({
18
18
  display: 'flex',
19
19
  minWidth: 0,
20
20
  maxHeight: 0,
@@ -24,7 +24,7 @@ var expanderStyles = (0, _core.css)({
24
24
  flexDirection: 'column',
25
25
  transition: "max-height 0.3s"
26
26
  });
27
- var expandedStyles = (0, _core.css)({
27
+ var expandedStyles = (0, _react.css)({
28
28
  maxHeight: 150
29
29
  });
30
30
 
@@ -35,14 +35,14 @@ var Expander = function Expander(_ref) {
35
35
  // Need to always render the ExpanderInternal otherwise the
36
36
  // reveal transition doesn't happen. We can't use CSS animation for
37
37
  // the the reveal because we don't know the height of the content.
38
- return (0, _core.jsx)("div", {
38
+ return (0, _react.jsx)("div", {
39
39
  "aria-hidden": !isExpanded,
40
40
  css: [expanderStyles, isExpanded && expandedStyles],
41
41
  "data-testid": testId && "".concat(testId, "-expander")
42
- }, (0, _core.jsx)(_motion.ExitingPersistence, {
42
+ }, (0, _react.jsx)(_motion.ExitingPersistence, {
43
43
  appear: true
44
- }, isExpanded && (0, _core.jsx)(_motion.FadeIn, null, function (props) {
45
- return (0, _core.jsx)("div", props, children);
44
+ }, isExpanded && (0, _react.jsx)(_motion.FadeIn, null, function (props) {
45
+ return (0, _react.jsx)("div", props, children);
46
46
  })));
47
47
  }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
48
48
 
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  /** @jsx jsx */
11
- var titleStyles = (0, _core.css)({
11
+ var titleStyles = (0, _react.css)({
12
12
  padding: "2px 0 6px 16px",
13
13
  flex: 1,
14
14
  fontWeight: 600
@@ -17,7 +17,7 @@ var titleStyles = (0, _core.css)({
17
17
  var Title = function Title(_ref) {
18
18
  var color = _ref.color,
19
19
  children = _ref.children;
20
- return (0, _core.jsx)("span", {
20
+ return (0, _react.jsx)("span", {
21
21
  style: {
22
22
  color: color
23
23
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.6.4",
3
+ "version": "14.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
5
5
  import Flag from './flag';
6
6
  import { useFlagGroup } from './flag-group';
7
7
  const packageName = "@atlaskit/flag";
8
- const packageVersion = "14.6.4";
8
+ const packageVersion = "14.7.0";
9
9
  export const AUTO_DISMISS_SECONDS = 8;
10
10
  /**
11
11
  * __Auto dismiss flag__
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @repo/internal/styles/no-nested-styles */
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import Button from '@atlaskit/button/custom-theme-button';
6
6
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
7
7
  import { DEFAULT_APPEARANCE } from './constants';
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { Children, createContext, useContext, useMemo } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
7
7
  import VisuallyHidden from '@atlaskit/visually-hidden';
8
8
  import noop from '@atlaskit/ds-lib/noop';
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import { useCallback, useEffect, useState } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { useGlobalTheme } from '@atlaskit/theme/components';
7
7
  import { borderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
8
8
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
@@ -16,7 +16,7 @@ import { Title, Description, Expander, DismissButton } from './internal';
16
16
  const analyticsAttributes = {
17
17
  componentName: 'flag',
18
18
  packageName: "@atlaskit/flag",
19
- packageVersion: "14.6.4"
19
+ packageVersion: "14.7.0"
20
20
  };
21
21
  const gridSize = getGridSize();
22
22
  const doubleGridSize = gridSize * 2;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx, css } from '@emotion/core';
2
+ import { jsx, css } from '@emotion/react';
3
3
  const descriptionStyles = css({
4
4
  maxHeight: 100,
5
5
  // height is defined as 5 lines maximum by design
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { memo } from 'react';
3
- import { jsx, css } from '@emotion/core';
3
+ import { jsx, css } from '@emotion/react';
4
4
  import FocusRing from '@atlaskit/focus-ring';
5
5
  import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
6
6
  import ChevronUpIcon from '@atlaskit/icon/glyph/chevron-up';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
4
4
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  const gridSize = getGridSize();
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx, css } from '@emotion/core';
2
+ import { jsx, css } from '@emotion/react';
3
3
  const titleStyles = css({
4
4
  padding: `2px 0 6px 16px`,
5
5
  flex: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.6.4",
3
+ "version": "14.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
5
5
  import Flag from './flag';
6
6
  import { useFlagGroup } from './flag-group';
7
7
  var packageName = "@atlaskit/flag";
8
- var packageVersion = "14.6.4";
8
+ var packageVersion = "14.7.0";
9
9
  export var AUTO_DISMISS_SECONDS = 8;
10
10
  /**
11
11
  * __Auto dismiss flag__
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @repo/internal/styles/no-nested-styles */
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import Button from '@atlaskit/button/custom-theme-button';
6
6
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
7
7
  import { DEFAULT_APPEARANCE } from './constants';
@@ -3,7 +3,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
3
3
 
4
4
  /** @jsx jsx */
5
5
  import { Children, createContext, useContext, useMemo } from 'react';
6
- import { css, jsx } from '@emotion/core';
6
+ import { css, jsx } from '@emotion/react';
7
7
  import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
8
8
  import VisuallyHidden from '@atlaskit/visually-hidden';
9
9
  import noop from '@atlaskit/ds-lib/noop';
package/dist/esm/flag.js CHANGED
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
 
9
9
  /** @jsx jsx */
10
10
  import { useCallback, useEffect, useState } from 'react';
11
- import { css, jsx } from '@emotion/core';
11
+ import { css, jsx } from '@emotion/react';
12
12
  import { useGlobalTheme } from '@atlaskit/theme/components';
13
13
  import { borderRadius, gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
14
14
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
@@ -22,7 +22,7 @@ import { Title, Description, Expander, DismissButton } from './internal';
22
22
  var analyticsAttributes = {
23
23
  componentName: 'flag',
24
24
  packageName: "@atlaskit/flag",
25
- packageVersion: "14.6.4"
25
+ packageVersion: "14.7.0"
26
26
  };
27
27
  var gridSize = getGridSize();
28
28
  var doubleGridSize = gridSize * 2;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx, css } from '@emotion/core';
2
+ import { jsx, css } from '@emotion/react';
3
3
  var descriptionStyles = css({
4
4
  maxHeight: 100,
5
5
  // height is defined as 5 lines maximum by design
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { memo } from 'react';
3
- import { jsx, css } from '@emotion/core';
3
+ import { jsx, css } from '@emotion/react';
4
4
  import FocusRing from '@atlaskit/focus-ring';
5
5
  import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
6
6
  import ChevronUpIcon from '@atlaskit/icon/glyph/chevron-up';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
4
4
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  var gridSize = getGridSize();
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { jsx, css } from '@emotion/core';
2
+ import { jsx, css } from '@emotion/react';
3
3
  var titleStyles = css({
4
4
  padding: "2px 0 6px 16px",
5
5
  flex: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.6.4",
3
+ "version": "14.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import type { ComponentType } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { CustomThemeButtonProps } from '@atlaskit/button/types';
4
5
  import type { ThemeModes } from '@atlaskit/theme/types';
5
6
  import type { ActionsType, AppearanceTypes } from './types';
@@ -10,5 +11,5 @@ declare type FlagActionsProps = {
10
11
  mode: ThemeModes;
11
12
  testId?: string;
12
13
  };
13
- declare const FlagActions: (props: FlagActionsProps) => JSX.Element | null;
14
+ declare const FlagActions: (props: FlagActionsProps) => jsx.JSX.Element | null;
14
15
  export default FlagActions;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactElement } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
4
5
  declare type FlagGroupProps = {
5
6
  /**
@@ -40,5 +41,5 @@ export declare function useFlagGroup(): FlagGroupAPI;
40
41
  * - [Examples](https://atlassian.design/components/flag/flag-group/examples)
41
42
  * - [Code](https://atlassian.design/components/flag/flag-group/code)
42
43
  */
43
- declare const FlagGroup: (props: FlagGroupProps) => JSX.Element;
44
+ declare const FlagGroup: (props: FlagGroupProps) => jsx.JSX.Element;
44
45
  export default FlagGroup;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { jsx } from '@emotion/react';
2
2
  import type { FlagProps } from './types';
3
3
  /**
4
4
  * __Flag__
@@ -10,5 +10,5 @@ import type { FlagProps } from './types';
10
10
  * - [Code](https://atlassian.design/components/flag/code)
11
11
  * - [Usage](https://atlassian.design/components/flag/usage)
12
12
  */
13
- declare const Flag: (props: FlagProps) => JSX.Element;
13
+ declare const Flag: (props: FlagProps) => jsx.JSX.Element;
14
14
  export default Flag;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
2
3
  import { AppearanceTypes } from '../types';
3
4
  interface DismissButtonProps {
4
5
  appearance: AppearanceTypes;
@@ -7,5 +8,5 @@ interface DismissButtonProps {
7
8
  isBold: boolean;
8
9
  testId?: string;
9
10
  }
10
- declare const _default: import("react").MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => JSX.Element>;
11
+ declare const _default: import("react").MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => jsx.JSX.Element>;
11
12
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.6.4",
3
+ "version": "14.7.0",
4
4
  "description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,27 +41,27 @@
41
41
  "@atlaskit/icon": "^21.10.0",
42
42
  "@atlaskit/motion": "^1.2.0",
43
43
  "@atlaskit/portal": "^4.0.0",
44
- "@atlaskit/theme": "^12.1.0",
44
+ "@atlaskit/theme": "^12.2.0",
45
45
  "@atlaskit/tokens": "^0.10.0",
46
- "@atlaskit/visually-hidden": "^1.0.0",
46
+ "@atlaskit/visually-hidden": "^1.1.0",
47
47
  "@babel/runtime": "^7.0.0",
48
- "@emotion/core": "^10.0.9"
48
+ "@emotion/react": "^11.7.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "^16.8.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@atlaskit/docs": "*",
55
- "@atlaskit/radio": "^5.2.0",
56
- "@atlaskit/section-message": "^6.0.0",
55
+ "@atlaskit/radio": "^5.4.0",
56
+ "@atlaskit/section-message": "^6.2.0",
57
57
  "@atlaskit/spinner": "^15.0.0",
58
58
  "@atlaskit/ssr": "*",
59
- "@atlaskit/theme": "^12.1.0",
59
+ "@atlaskit/theme": "^12.2.0",
60
60
  "@atlaskit/visual-regression": "*",
61
61
  "@atlaskit/webdriver-runner": "*",
62
62
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
63
+ "@emotion/jest": "^11.8.0",
63
64
  "@testing-library/react": "^8.0.1",
64
- "jest-emotion": "^10.0.32",
65
65
  "react-dom": "^16.8.0",
66
66
  "storybook-addon-performance": "^0.16.0",
67
67
  "typescript": "4.3.5"