@atlaskit/flag 14.6.4 → 14.7.1

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/auto-dismiss-flag/package.json +8 -1
  3. package/constants/package.json +8 -1
  4. package/dist/cjs/auto-dismiss-flag.js +1 -1
  5. package/dist/cjs/flag-actions.js +10 -10
  6. package/dist/cjs/flag-group.js +10 -10
  7. package/dist/cjs/flag.js +15 -15
  8. package/dist/cjs/internal/description.js +3 -3
  9. package/dist/cjs/internal/dismiss-button.js +5 -5
  10. package/dist/cjs/internal/expander.js +7 -7
  11. package/dist/cjs/internal/title.js +3 -3
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/auto-dismiss-flag.js +1 -1
  14. package/dist/es2019/flag-actions.js +1 -1
  15. package/dist/es2019/flag-group.js +1 -1
  16. package/dist/es2019/flag.js +2 -2
  17. package/dist/es2019/internal/description.js +1 -1
  18. package/dist/es2019/internal/dismiss-button.js +1 -1
  19. package/dist/es2019/internal/expander.js +1 -1
  20. package/dist/es2019/internal/title.js +1 -1
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/auto-dismiss-flag.js +1 -1
  23. package/dist/esm/flag-actions.js +1 -1
  24. package/dist/esm/flag-group.js +1 -1
  25. package/dist/esm/flag.js +2 -2
  26. package/dist/esm/internal/description.js +1 -1
  27. package/dist/esm/internal/dismiss-button.js +1 -1
  28. package/dist/esm/internal/expander.js +1 -1
  29. package/dist/esm/internal/title.js +1 -1
  30. package/dist/esm/version.json +1 -1
  31. package/dist/types/flag-actions.d.ts +2 -1
  32. package/dist/types/flag-group.d.ts +2 -1
  33. package/dist/types/flag.d.ts +2 -2
  34. package/dist/types/internal/dismiss-button.d.ts +2 -1
  35. package/dist/types-ts4.0/auto-dismiss-flag.d.ts +13 -0
  36. package/dist/types-ts4.0/constants.d.ts +2 -0
  37. package/dist/types-ts4.0/flag-actions.d.ts +15 -0
  38. package/dist/types-ts4.0/flag-group.d.ts +45 -0
  39. package/dist/types-ts4.0/flag-provider.d.ts +33 -0
  40. package/dist/types-ts4.0/flag.d.ts +14 -0
  41. package/dist/types-ts4.0/index.d.ts +6 -0
  42. package/dist/types-ts4.0/internal/description.d.ts +8 -0
  43. package/dist/types-ts4.0/internal/dismiss-button.d.ts +12 -0
  44. package/dist/types-ts4.0/internal/expander.d.ts +8 -0
  45. package/dist/types-ts4.0/internal/index.d.ts +4 -0
  46. package/dist/types-ts4.0/internal/title.d.ts +6 -0
  47. package/dist/types-ts4.0/theme.d.ts +10 -0
  48. package/dist/types-ts4.0/types.d.ts +101 -0
  49. package/flag/package.json +8 -1
  50. package/flag-actions/package.json +8 -1
  51. package/flag-group/package.json +8 -1
  52. package/flag-provider/package.json +8 -1
  53. package/package.json +17 -9
  54. package/theme/package.json +8 -1
  55. package/types/package.json +8 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 14.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+
9
+ ## 14.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`d176305ad56`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d176305ad56) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 14.6.4
4
20
 
5
21
  ### Patch Changes
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/auto-dismiss-flag.js",
5
5
  "module:es2019": "../dist/es2019/auto-dismiss-flag.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/auto-dismiss-flag.d.ts"
7
+ "types": "../dist/types/auto-dismiss-flag.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/auto-dismiss-flag.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/constants.js",
5
5
  "module:es2019": "../dist/es2019/constants.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/constants.d.ts"
7
+ "types": "../dist/types/constants.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/constants.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -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.1";
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.1"
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.1",
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.1";
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.1"
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.1",
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.1";
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.1"
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.1",
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;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { AutoDismissFlagProps } from './types';
3
+ export declare const AUTO_DISMISS_SECONDS = 8;
4
+ /**
5
+ * __Auto dismiss flag__
6
+ *
7
+ * An auto dismiss flag is dismissed automatically after eight seconds.
8
+ *
9
+ * - [Examples](https://atlassian.design/components/flag/auto-dismiss-flag/examples)
10
+ * - [Code](https://atlassian.design/components/flag/auto-dismiss-flag/code)
11
+ */
12
+ declare const AutoDismissFlag: (props: AutoDismissFlagProps) => JSX.Element;
13
+ export default AutoDismissFlag;
@@ -0,0 +1,2 @@
1
+ import { AppearanceTypes } from './types';
2
+ export declare const DEFAULT_APPEARANCE: AppearanceTypes;
@@ -0,0 +1,15 @@
1
+ /** @jsx jsx */
2
+ import type { ComponentType } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import type { CustomThemeButtonProps } from '@atlaskit/button/types';
5
+ import type { ThemeModes } from '@atlaskit/theme/types';
6
+ import type { ActionsType, AppearanceTypes } from './types';
7
+ declare type FlagActionsProps = {
8
+ appearance: AppearanceTypes;
9
+ actions: ActionsType;
10
+ linkComponent?: ComponentType<CustomThemeButtonProps>;
11
+ mode: ThemeModes;
12
+ testId?: string;
13
+ };
14
+ declare const FlagActions: (props: FlagActionsProps) => jsx.JSX.Element | null;
15
+ export default FlagActions;
@@ -0,0 +1,45 @@
1
+ /** @jsx jsx */
2
+ import { ReactElement } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
5
+ declare type FlagGroupProps = {
6
+ /**
7
+ * ID attribute used for DOM selection.
8
+ */
9
+ id?: string;
10
+ /**
11
+ * Describes the specific role of this FlagGroup for users viewing the page with a screen reader (defaults to `Flag notifications`).
12
+ */
13
+ label?: string;
14
+ /**
15
+ * Describes the specific tag on which the screen reader text will be rendered (defaults to `h2`).
16
+ */
17
+ labelTag?: React.ElementType;
18
+ /**
19
+ * Flag elements to be displayed.
20
+ */
21
+ children?: Array<ReactElement> | ReactElement | null | boolean;
22
+ /**
23
+ * Handler which will be called when a Flag's dismiss button is clicked.
24
+ * Receives the id of the dismissed Flag as a parameter.
25
+ */
26
+ onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
27
+ };
28
+ export declare const flagWidth: number;
29
+ export declare const flagAnimationTime = 400;
30
+ declare type FlagGroupAPI = {
31
+ onDismissed: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
32
+ isDismissAllowed: boolean;
33
+ };
34
+ export declare const FlagGroupContext: import("react").Context<FlagGroupAPI>;
35
+ export declare function useFlagGroup(): FlagGroupAPI;
36
+ /**
37
+ * __Flag group__
38
+ *
39
+ * A flag group is used to group a set of related flags, with entry and exit animations.
40
+ *
41
+ * - [Examples](https://atlassian.design/components/flag/flag-group/examples)
42
+ * - [Code](https://atlassian.design/components/flag/flag-group/code)
43
+ */
44
+ declare const FlagGroup: (props: FlagGroupProps) => jsx.JSX.Element;
45
+ export default FlagGroup;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { FlagPropsWithoutId } from './types';
3
+ declare type FlagId = string | number;
4
+ export declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
5
+ export interface CreateFlagArgs extends FlagPropsWithoutId {
6
+ /**
7
+ * A unique identifier used for rendering and onDismissed callbacks.
8
+ * This will be autogenerated if you don’t supply one.
9
+ * If you don’t want the same flag showing multiple times, provide a unique id.
10
+ */
11
+ id?: FlagId;
12
+ /**
13
+ * Marks whether the flag should render as an AutoDismissFlag
14
+ */
15
+ isAutoDismiss?: boolean;
16
+ }
17
+ export declare type FlagArgs = Combine<CreateFlagArgs, {
18
+ id: FlagId;
19
+ }>;
20
+ export declare type DismissFn = () => void;
21
+ export declare type FlagAPI = {
22
+ showFlag: (args: CreateFlagArgs) => DismissFn;
23
+ };
24
+ /**
25
+ * useFlags is used to access the `showFlags` function which can be used to programatically display flags.
26
+ * - [Examples](https://atlassian.design/components/flag/flags-provider/examples#using-showflags)
27
+ */
28
+ export declare function useFlags(): FlagAPI;
29
+ export declare function FlagsProvider({ children }: {
30
+ children: React.ReactNode;
31
+ }): JSX.Element;
32
+ export declare const withFlagsProvider: (fn: () => React.ReactNode) => React.ReactNode;
33
+ export {};
@@ -0,0 +1,14 @@
1
+ import { jsx } from '@emotion/react';
2
+ import type { FlagProps } from './types';
3
+ /**
4
+ * __Flag__
5
+ *
6
+ * A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction,
7
+ * often displayed using a flag group.
8
+ *
9
+ * - [Examples](https://atlassian.design/components/flag/examples)
10
+ * - [Code](https://atlassian.design/components/flag/code)
11
+ * - [Usage](https://atlassian.design/components/flag/usage)
12
+ */
13
+ declare const Flag: (props: FlagProps) => jsx.JSX.Element;
14
+ export default Flag;
@@ -0,0 +1,6 @@
1
+ export { default } from './flag';
2
+ export { default as AutoDismissFlag } from './auto-dismiss-flag';
3
+ export { default as FlagGroup } from './flag-group';
4
+ export { useFlags, withFlagsProvider, FlagsProvider } from './flag-provider';
5
+ export type { CreateFlagArgs, DismissFn, FlagAPI, FlagArgs, } from './flag-provider';
6
+ export type { FlagProps, ActionsType, AppearanceTypes } from './types';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ interface DescriptionProps {
3
+ testId?: string;
4
+ color: string;
5
+ isBold: boolean;
6
+ }
7
+ declare const Description: FC<DescriptionProps>;
8
+ export default Description;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ import { AppearanceTypes } from '../types';
4
+ interface DismissButtonProps {
5
+ appearance: AppearanceTypes;
6
+ onClick: (...args: any) => void;
7
+ isExpanded: boolean;
8
+ isBold: boolean;
9
+ testId?: string;
10
+ }
11
+ declare const _default: import("react").MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => jsx.JSX.Element>;
12
+ export default _default;
@@ -0,0 +1,8 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ declare type ExpanderProps = {
4
+ isExpanded: boolean;
5
+ testId?: string;
6
+ };
7
+ declare const Expander: FC<ExpanderProps>;
8
+ export default Expander;
@@ -0,0 +1,4 @@
1
+ export { default as Title } from './title';
2
+ export { default as Description } from './description';
3
+ export { default as Expander } from './expander';
4
+ export { default as DismissButton } from './dismiss-button';
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface TitleProps {
3
+ color: string;
4
+ }
5
+ declare const Title: FC<TitleProps>;
6
+ export default Title;
@@ -0,0 +1,10 @@
1
+ import { ThemeModes } from '@atlaskit/theme/types';
2
+ import { AppearanceTypes } from './types';
3
+ export declare const getFlagBackgroundColor: (appearance: AppearanceTypes, mode: ThemeModes) => string;
4
+ export declare const flagBorderColor = "rgba(9, 30, 66, 0.31)";
5
+ export declare const flagShadowColor = "rgba(9, 30, 66, 0.25)";
6
+ export declare const getFlagTextColor: (appearance: AppearanceTypes, mode: ThemeModes) => string;
7
+ export declare const getFlagIconColor: (appearance: AppearanceTypes, mode: ThemeModes) => string;
8
+ export declare const getFlagFocusRingColor: (appearance: AppearanceTypes, mode: ThemeModes) => string;
9
+ export declare const getActionBackground: (appearance: AppearanceTypes, mode: ThemeModes) => string;
10
+ export declare const getActionColor: (appearance: AppearanceTypes, mode: ThemeModes) => string;
@@ -0,0 +1,101 @@
1
+ import { ComponentType, MouseEventHandler, ReactNode } from 'react';
2
+ import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
+ import { CustomThemeButtonProps } from '@atlaskit/button/types';
4
+ export declare type ActionType = {
5
+ content: ReactNode;
6
+ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
7
+ href?: string;
8
+ target?: string;
9
+ testId?: string;
10
+ };
11
+ export declare type ActionsType = Array<ActionType>;
12
+ export declare type AppearanceTypes = 'error' | 'info' | 'normal' | 'success' | 'warning';
13
+ export declare const AppearanceArray: AppearanceTypes[];
14
+ declare type FlagPropsId = {
15
+ /**
16
+ * A unique identifier used for rendering and onDismissed callbacks.
17
+ */
18
+ id: number | string;
19
+ };
20
+ declare type AutoDismissFlagPropsWithoutId = {
21
+ /**
22
+ * Array of clickable actions to be shown at the bottom of the flag. For flags where appearance
23
+ * is 'normal', actions will be shown as links. For all other appearance values, actions will
24
+ * shown as buttons.
25
+ * If href is passed the action will be shown as a link with the passed href prop.
26
+ */
27
+ actions?: ActionsType;
28
+ /**
29
+ * Makes the flag appearance bold. Setting this to anything other than 'normal' hides the
30
+ * dismiss button.
31
+ */
32
+ appearance?: AppearanceTypes;
33
+ /**
34
+ * The secondary content shown below the flag title
35
+ */
36
+ description?: ReactNode;
37
+ /**
38
+ * The icon displayed in the top-left of the flag. Should be an instance of `@atlaskit/icon`.
39
+ * Your icon will receive the appropriate default color, which you can override by wrapping the
40
+ * icon in a containing element with CSS `color` set to your preferred icon color.
41
+ */
42
+ icon: ReactNode;
43
+ /**
44
+ * The bold text shown at the top of the flag.
45
+ */
46
+ title: ReactNode;
47
+ /**
48
+ * Handler which will be called when a Flag's dismiss button is clicked.
49
+ * Receives the id of the dismissed Flag as a parameter.
50
+ */
51
+ onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
52
+ /**
53
+ * A link component that is passed down to the `@atlaskit/button` used by actions,
54
+ * to allow custom routers to be used. See the
55
+ * [button with router](https://atlaskit.atlassian.com/packages/design-system/button/example/ButtonWithRouter)
56
+ * example of what this component should look like.
57
+ */
58
+ linkComponent?: ComponentType<CustomThemeButtonProps>;
59
+ /**
60
+ * A `testId` prop is provided for specified elements,
61
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
62
+ * serving as a hook for automated tests.
63
+ *
64
+ * Will set these elements when defined:
65
+ *
66
+ * - Flag root element - `{testId}`
67
+ * - Close button visible on default flags - `{testId}-dismiss`
68
+ * - Toggle button visible on bold flags - `{testId}-toggle`
69
+ * - Flag content which wraps the description and actions - `{testId}-expander`
70
+ * - Flag description - `{testId}-description`
71
+ * - Flag actions - `{testId}-actions`
72
+ */
73
+ testId?: string;
74
+ /**
75
+ * Additional information to be included in the `context` of analytics events that come from flag
76
+ */
77
+ analyticsContext?: Record<string, any>;
78
+ };
79
+ export interface AutoDismissFlagProps extends AutoDismissFlagPropsWithoutId, FlagPropsId {
80
+ }
81
+ export interface FlagPropsWithoutId extends AutoDismissFlagPropsWithoutId, WithAnalyticsEventsProps {
82
+ /**
83
+ * Standard onBlur event, applied to Flag by AutoDismissFlag
84
+ */
85
+ onBlur?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
86
+ /**
87
+ * Standard onFocus event, applied to Flag by AutoDismissFlag
88
+ */
89
+ onFocus?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
90
+ /**
91
+ * Standard onMouseOut event, applied to Flag by AutoDismissFlag
92
+ */
93
+ onMouseOut?: MouseEventHandler;
94
+ /**
95
+ * Standard onMouseOver event, applied to Flag by AutoDismissFlag
96
+ */
97
+ onMouseOver?: MouseEventHandler;
98
+ }
99
+ export interface FlagProps extends FlagPropsWithoutId, FlagPropsId {
100
+ }
101
+ export {};
package/flag/package.json CHANGED
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/flag.js",
5
5
  "module:es2019": "../dist/es2019/flag.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/flag.d.ts"
7
+ "types": "../dist/types/flag.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/flag.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/flag-actions.js",
5
5
  "module:es2019": "../dist/es2019/flag-actions.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/flag-actions.d.ts"
7
+ "types": "../dist/types/flag-actions.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/flag-actions.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/flag-group.js",
5
5
  "module:es2019": "../dist/es2019/flag-group.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/flag-group.d.ts"
7
+ "types": "../dist/types/flag-group.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/flag-group.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/flag-provider.js",
5
5
  "module:es2019": "../dist/es2019/flag-provider.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/flag-provider.d.ts"
7
+ "types": "../dist/types/flag-provider.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/flag-provider.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.6.4",
3
+ "version": "14.7.1",
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/"
@@ -12,6 +12,13 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.0 <4.5": {
17
+ "*": [
18
+ "dist/types-ts4.0/*"
19
+ ]
20
+ }
21
+ },
15
22
  "sideEffects": false,
16
23
  "atlaskit:src": "src/index.tsx",
17
24
  "atlassian": {
@@ -41,30 +48,31 @@
41
48
  "@atlaskit/icon": "^21.10.0",
42
49
  "@atlaskit/motion": "^1.2.0",
43
50
  "@atlaskit/portal": "^4.0.0",
44
- "@atlaskit/theme": "^12.1.0",
51
+ "@atlaskit/theme": "^12.2.0",
45
52
  "@atlaskit/tokens": "^0.10.0",
46
- "@atlaskit/visually-hidden": "^1.0.0",
53
+ "@atlaskit/visually-hidden": "^1.1.0",
47
54
  "@babel/runtime": "^7.0.0",
48
- "@emotion/core": "^10.0.9"
55
+ "@emotion/react": "^11.7.1"
49
56
  },
50
57
  "peerDependencies": {
51
58
  "react": "^16.8.0"
52
59
  },
53
60
  "devDependencies": {
54
61
  "@atlaskit/docs": "*",
55
- "@atlaskit/radio": "^5.2.0",
56
- "@atlaskit/section-message": "^6.0.0",
62
+ "@atlaskit/radio": "^5.4.0",
63
+ "@atlaskit/section-message": "^6.2.0",
57
64
  "@atlaskit/spinner": "^15.0.0",
58
65
  "@atlaskit/ssr": "*",
59
- "@atlaskit/theme": "^12.1.0",
66
+ "@atlaskit/theme": "^12.2.0",
60
67
  "@atlaskit/visual-regression": "*",
61
68
  "@atlaskit/webdriver-runner": "*",
62
69
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
63
- "@testing-library/react": "^8.0.1",
70
+ "@emotion/jest": "^11.8.0",
71
+ "@testing-library/react": "^12.1.5",
64
72
  "jest-emotion": "^10.0.32",
65
73
  "react-dom": "^16.8.0",
66
74
  "storybook-addon-performance": "^0.16.0",
67
- "typescript": "4.3.5"
75
+ "typescript": "4.5.5"
68
76
  },
69
77
  "keywords": [
70
78
  "atlaskit",
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/theme.js",
5
5
  "module:es2019": "../dist/es2019/theme.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/theme.d.ts"
7
+ "types": "../dist/types/theme.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/theme.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/types.d.ts"
7
+ "types": "../dist/types/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/types.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }