@atlaskit/flag 15.5.3 → 15.6.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,18 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 15.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#111878](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111878)
8
+ [`223959ef57c80`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/223959ef57c80) -
9
+ Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime
10
+ is implicitly set to automatic.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 15.5.3
4
17
 
5
18
  ### Patch Changes
@@ -43,7 +56,7 @@
43
56
 
44
57
  - [#91526](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91526)
45
58
  [`3f7f99daae4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f7f99daae4a) -
46
- Add support for React 18.
59
+ Add support for React 18 in non-strict mode.
47
60
 
48
61
  ## 15.3.0
49
62
 
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Flag
2
2
 
3
- A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.
3
+ A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction,
4
+ often displayed using a flag group.
4
5
 
5
6
  ## Installation
6
7
 
@@ -5,14 +5,14 @@ import InfoIcon from '@atlaskit/icon/glyph/info';
5
5
  import { AutoDismissFlag } from '../src';
6
6
 
7
7
  export default function FlagInfo() {
8
- return (
9
- <AutoDismissFlag
10
- appearance="info"
11
- icon={<InfoIcon label="Info" />}
12
- id="info"
13
- title="Where is everybody?"
14
- description="There’s no one in this project. Add yourself or your team to get the party started."
15
- actions={[]}
16
- />
17
- );
8
+ return (
9
+ <AutoDismissFlag
10
+ appearance="info"
11
+ icon={<InfoIcon label="Info" />}
12
+ id="info"
13
+ title="Where is everybody?"
14
+ description="There’s no one in this project. Add yourself or your team to get the party started."
15
+ actions={[]}
16
+ />
17
+ );
18
18
  }
@@ -5,14 +5,14 @@ import InfoIcon from '@atlaskit/icon/glyph/info';
5
5
  import Flag from '../src';
6
6
 
7
7
  export default function FlagInfo() {
8
- return (
9
- <Flag
10
- appearance="info"
11
- icon={<InfoIcon label="Info" />}
12
- id="info"
13
- title="Where is everybody?"
14
- description="There’s no one in this project. Add yourself or your team to get the party started."
15
- actions={[]}
16
- />
17
- );
8
+ return (
9
+ <Flag
10
+ appearance="info"
11
+ icon={<InfoIcon label="Info" />}
12
+ id="info"
13
+ title="Where is everybody?"
14
+ description="There’s no one in this project. Add yourself or your team to get the party started."
15
+ actions={[]}
16
+ />
17
+ );
18
18
  }
@@ -7,20 +7,15 @@ import { token } from '@atlaskit/tokens';
7
7
  import Flag, { FlagGroup } from '../src';
8
8
 
9
9
  export default () => (
10
- <FlagGroup>
11
- <Flag
12
- appearance="success"
13
- icon={
14
- <SuccessIcon
15
- label="Success"
16
- secondaryColor={token('color.background.success.bold')}
17
- />
18
- }
19
- id="success"
20
- key="success"
21
- title="Connected"
22
- description="All wires now hooked up."
23
- actions={[{ content: 'Alrighty then', onClick: noop }]}
24
- />
25
- </FlagGroup>
10
+ <FlagGroup>
11
+ <Flag
12
+ appearance="success"
13
+ icon={<SuccessIcon label="Success" secondaryColor={token('color.background.success.bold')} />}
14
+ id="success"
15
+ key="success"
16
+ title="Connected"
17
+ description="All wires now hooked up."
18
+ actions={[{ content: 'Alrighty then', onClick: noop }]}
19
+ />
20
+ </FlagGroup>
26
21
  );
@@ -15,7 +15,7 @@ var _flagGroup = require("./flag-group");
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  var packageName = "@atlaskit/flag";
18
- var packageVersion = "15.5.3";
18
+ var packageVersion = "15.6.0";
19
19
  var AUTO_DISMISS_SECONDS = exports.AUTO_DISMISS_SECONDS = 8;
20
20
 
21
21
  /**
@@ -12,33 +12,48 @@ var _inline = _interopRequireDefault(require("@atlaskit/primitives/inline"));
12
12
  var _constants = require("./constants");
13
13
  var _theme = require("./theme");
14
14
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
15
+ /**
16
+ * @jsxRuntime classic
17
+ */
15
18
  /** @jsx jsx */
16
19
 
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
+
17
22
  var buttonStyles = (0, _react.css)({
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
18
24
  '&&, a&&': {
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
25
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
20
26
  padding: "0 ".concat("var(--ds-space-100, 8px)", " !important"),
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
28
  background: "var(".concat(_constants.VAR_BG_COLOR, ")"),
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
30
  color: "var(".concat(_constants.VAR_COLOR, ") !important"),
23
31
  fontWeight: "var(--ds-font-weight-medium, 500)"
24
32
  },
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
25
34
  '&&:hover, &&:active, a&&:hover, a&&:active': {
26
35
  textDecoration: 'underline'
27
36
  },
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
28
38
  '&&:hover': {
39
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
40
  backgroundColor: "var(".concat(_constants.VAR_BG_COLOR_HOVER, ")")
30
41
  },
42
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
31
43
  '&&:active': {
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
45
  backgroundColor: "var(".concat(_constants.VAR_BG_COLOR_ACTIVE, ")")
33
46
  }
34
47
  });
35
48
  var appearanceNormalButtonStyles = (0, _react.css)({
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
36
50
  '&&, a&&': {
37
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
51
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
38
52
  padding: '0 !important'
39
53
  }
40
54
  });
41
55
  var appearanceNormalActionsContainerStyles = (0, _react.css)({
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
42
57
  '&&, a&&': {
43
58
  transform: 'translateX(-2px)'
44
59
  }
@@ -75,7 +90,9 @@ var FlagActions = function FlagActions(props) {
75
90
  key: index
76
91
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
77
92
  ,
78
- style: (_ref = {}, (0, _defineProperty2.default)(_ref, _constants.VAR_COLOR, _theme.actionTextColor[appearance]), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR, _theme.actionBackgroundColor[appearance].default), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR_HOVER, _theme.actionBackgroundColor[appearance].pressed), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR_ACTIVE, _theme.actionBackgroundColor[appearance].active), _ref),
93
+ style: (_ref = {}, (0, _defineProperty2.default)(_ref, _constants.VAR_COLOR, _theme.actionTextColor[appearance]), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR, _theme.actionBackgroundColor[appearance].default), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR_HOVER, _theme.actionBackgroundColor[appearance].pressed), (0, _defineProperty2.default)(_ref, _constants.VAR_BG_COLOR_ACTIVE, _theme.actionBackgroundColor[appearance].active), _ref)
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
95
+ ,
79
96
  css: [buttonStyles, appearance === _constants.DEFAULT_APPEARANCE && appearanceNormalButtonStyles]
80
97
  }, action.content);
81
98
  })));
@@ -14,8 +14,13 @@ var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"
14
14
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
15
15
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
16
16
  var _constants = require("@atlaskit/theme/constants");
17
+ /**
18
+ * @jsxRuntime classic
19
+ */
17
20
  /** @jsx jsx */
18
21
 
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
+
19
24
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
20
25
 
21
26
  var gridSize = (0, _constants.gridSize)();
@@ -37,6 +42,7 @@ function useFlagGroup() {
37
42
  // transition: none is set on first-of-type to prevent a bug in Firefox
38
43
  // that causes a broken transition
39
44
  var baseStyles = (0, _react2.css)({
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
40
46
  width: flagWidth,
41
47
  position: 'absolute',
42
48
  insetBlockEnd: 0,
@@ -46,20 +52,26 @@ var baseStyles = (0, _react2.css)({
46
52
  '@media (max-width: 560px)': {
47
53
  width: '100vw'
48
54
  },
55
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
49
56
  ':first-of-type': {
50
57
  transform: "translate(0,0)",
51
58
  transition: 'none'
52
59
  },
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
53
61
  ':nth-of-type(n + 2)': {
54
62
  animationDuration: '0ms',
63
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
55
64
  transform: "translateX(0) translateY(100%) translateY(".concat(2 * gridSize, "px)")
56
65
  },
66
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
57
67
  ':nth-of-type(1)': {
58
68
  zIndex: 5
59
69
  },
70
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
60
71
  ':nth-of-type(2)': {
61
72
  zIndex: 4
62
73
  },
74
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
63
75
  '&:nth-of-type(n + 4)': {
64
76
  visibility: 'hidden'
65
77
  }
@@ -68,7 +80,7 @@ var baseStyles = (0, _react2.css)({
68
80
  // Transform needed to push up while 1st flag is leaving
69
81
  // Exiting time should match the exiting time of motion so is halved
70
82
  var dismissAllowedStyles = (0, _react2.css)({
71
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
83
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
72
84
  '&& + *': {
73
85
  transform: "translate(0, 0)",
74
86
  transitionDuration: "".concat(flagAnimationTime / 2, "ms")
package/dist/cjs/flag.js CHANGED
@@ -19,7 +19,9 @@ var _flagActions = _interopRequireDefault(require("./flag-actions"));
19
19
  var _flagGroup = require("./flag-group");
20
20
  var _internal = require("./internal");
21
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
23
+ * @jsxRuntime classic
24
+ */ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
25
  var CSS_VAR_ICON_COLOR = '--flag-icon-color';
24
26
 
25
27
  // For cases where a single word is longer than the container (e.g. filenames)
@@ -52,7 +54,7 @@ var flagWrapperStyles = (0, _react2.css)({
52
54
  var analyticsAttributes = {
53
55
  componentName: 'flag',
54
56
  packageName: "@atlaskit/flag",
55
- packageVersion: "15.5.3"
57
+ packageVersion: "15.6.0"
56
58
  };
57
59
  var transitionStyles = (0, _react2.css)({
58
60
  flexGrow: 1,
@@ -155,7 +157,7 @@ var Flag = function Flag(props) {
155
157
  space: "space.200"
156
158
  }, (0, _react2.jsx)("div", {
157
159
  css: iconWrapperStyles
158
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
160
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
159
161
  ,
160
162
  style: (0, _defineProperty2.default)({}, CSS_VAR_ICON_COLOR, iconColor)
161
163
  }, icon), (0, _react2.jsx)("span", {
@@ -182,7 +184,7 @@ var Flag = function Flag(props) {
182
184
  isExpanded: !isBold || isExpanded,
183
185
  testId: testId
184
186
  }, description && (0, _react2.jsx)("div", {
185
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
186
188
  style: {
187
189
  color: _theme.flagTextColorToken[appearance]
188
190
  },
@@ -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 = "15.5.3";
8
+ const packageVersion = "15.6.0";
9
9
  export const AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
@@ -1,36 +1,50 @@
1
1
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
2
+ /**
3
+ * @jsxRuntime classic
4
+ */
2
5
  /** @jsx jsx */
3
6
 
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
8
  import { css, jsx } from '@emotion/react';
5
9
  import Button from '@atlaskit/button/custom-theme-button';
6
10
  import Inline from '@atlaskit/primitives/inline';
7
11
  import { DEFAULT_APPEARANCE, VAR_COLOR, VAR_BG_COLOR, VAR_BG_COLOR_HOVER, VAR_BG_COLOR_ACTIVE } from './constants';
8
12
  import { actionBackgroundColor, actionTextColor } from './theme';
9
13
  const buttonStyles = css({
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
10
15
  '&&, a&&': {
11
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
16
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
12
17
  padding: `0 ${"var(--ds-space-100, 8px)"} !important`,
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
13
19
  background: `var(${VAR_BG_COLOR})`,
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
14
21
  color: `var(${VAR_COLOR}) !important`,
15
22
  fontWeight: "var(--ds-font-weight-medium, 500)"
16
23
  },
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
17
25
  '&&:hover, &&:active, a&&:hover, a&&:active': {
18
26
  textDecoration: 'underline'
19
27
  },
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
20
29
  '&&:hover': {
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
31
  backgroundColor: `var(${VAR_BG_COLOR_HOVER})`
22
32
  },
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
23
34
  '&&:active': {
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
24
36
  backgroundColor: `var(${VAR_BG_COLOR_ACTIVE})`
25
37
  }
26
38
  });
27
39
  const appearanceNormalButtonStyles = css({
40
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
28
41
  '&&, a&&': {
29
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
42
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
30
43
  padding: '0 !important'
31
44
  }
32
45
  });
33
46
  const appearanceNormalActionsContainerStyles = css({
47
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
34
48
  '&&, a&&': {
35
49
  transform: 'translateX(-2px)'
36
50
  }
@@ -66,11 +80,18 @@ const FlagActions = props => {
66
80
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
67
81
  ,
68
82
  style: {
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
69
84
  [VAR_COLOR]: actionTextColor[appearance],
85
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
70
86
  [VAR_BG_COLOR]: actionBackgroundColor[appearance].default,
87
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
71
88
  [VAR_BG_COLOR_HOVER]: actionBackgroundColor[appearance].pressed,
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
72
90
  [VAR_BG_COLOR_ACTIVE]: actionBackgroundColor[appearance].active
73
- },
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
92
+ }
93
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
94
+ ,
74
95
  css: [buttonStyles, appearance === DEFAULT_APPEARANCE && appearanceNormalButtonStyles]
75
96
  }, action.content))));
76
97
  };
@@ -1,6 +1,11 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
 
3
6
  import { Children, createContext, useContext, useMemo } from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
9
  import { css, jsx } from '@emotion/react';
5
10
  import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
6
11
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -27,6 +32,7 @@ export function useFlagGroup() {
27
32
  // transition: none is set on first-of-type to prevent a bug in Firefox
28
33
  // that causes a broken transition
29
34
  const baseStyles = css({
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
30
36
  width: flagWidth,
31
37
  position: 'absolute',
32
38
  insetBlockEnd: 0,
@@ -36,20 +42,26 @@ const baseStyles = css({
36
42
  '@media (max-width: 560px)': {
37
43
  width: '100vw'
38
44
  },
45
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
39
46
  ':first-of-type': {
40
47
  transform: `translate(0,0)`,
41
48
  transition: 'none'
42
49
  },
50
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
43
51
  ':nth-of-type(n + 2)': {
44
52
  animationDuration: '0ms',
53
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
54
  transform: `translateX(0) translateY(100%) translateY(${2 * gridSize}px)`
46
55
  },
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
47
57
  ':nth-of-type(1)': {
48
58
  zIndex: 5
49
59
  },
60
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
50
61
  ':nth-of-type(2)': {
51
62
  zIndex: 4
52
63
  },
64
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
53
65
  '&:nth-of-type(n + 4)': {
54
66
  visibility: 'hidden'
55
67
  }
@@ -58,7 +70,7 @@ const baseStyles = css({
58
70
  // Transform needed to push up while 1st flag is leaving
59
71
  // Exiting time should match the exiting time of motion so is halved
60
72
  const dismissAllowedStyles = css({
61
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
73
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
62
74
  '&& + *': {
63
75
  transform: `translate(0, 0)`,
64
76
  transitionDuration: `${flagAnimationTime / 2}ms`
@@ -1,6 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ /**
3
+ * @jsxRuntime classic
4
+ */
2
5
  /** @jsx jsx */
3
6
  import { useCallback, useEffect, useState } from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
9
  import { jsx, css } from '@emotion/react';
5
10
  import { Inline, Stack, Box, xcss, Text } from '@atlaskit/primitives';
6
11
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
@@ -42,7 +47,7 @@ const flagWrapperStyles = css({
42
47
  const analyticsAttributes = {
43
48
  componentName: 'flag',
44
49
  packageName: "@atlaskit/flag",
45
- packageVersion: "15.5.3"
50
+ packageVersion: "15.6.0"
46
51
  };
47
52
  const transitionStyles = css({
48
53
  flexGrow: 1,
@@ -141,7 +146,7 @@ const Flag = props => {
141
146
  space: "space.200"
142
147
  }, jsx("div", {
143
148
  css: iconWrapperStyles
144
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
149
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
145
150
  ,
146
151
  style: {
147
152
  [CSS_VAR_ICON_COLOR]: iconColor
@@ -170,7 +175,7 @@ const Flag = props => {
170
175
  isExpanded: !isBold || isExpanded,
171
176
  testId: testId
172
177
  }, description && jsx("div", {
173
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
178
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
174
179
  style: {
175
180
  color: flagTextColorToken[appearance]
176
181
  },
@@ -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 = "15.5.3";
8
+ var packageVersion = "15.6.0";
9
9
  export var AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
@@ -1,37 +1,51 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
3
+ /**
4
+ * @jsxRuntime classic
5
+ */
3
6
  /** @jsx jsx */
4
7
 
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
9
  import { css, jsx } from '@emotion/react';
6
10
  import Button from '@atlaskit/button/custom-theme-button';
7
11
  import Inline from '@atlaskit/primitives/inline';
8
12
  import { DEFAULT_APPEARANCE, VAR_COLOR, VAR_BG_COLOR, VAR_BG_COLOR_HOVER, VAR_BG_COLOR_ACTIVE } from './constants';
9
13
  import { actionBackgroundColor, actionTextColor } from './theme';
10
14
  var buttonStyles = css({
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
11
16
  '&&, a&&': {
12
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
13
18
  padding: "0 ".concat("var(--ds-space-100, 8px)", " !important"),
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
14
20
  background: "var(".concat(VAR_BG_COLOR, ")"),
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
22
  color: "var(".concat(VAR_COLOR, ") !important"),
16
23
  fontWeight: "var(--ds-font-weight-medium, 500)"
17
24
  },
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
18
26
  '&&:hover, &&:active, a&&:hover, a&&:active': {
19
27
  textDecoration: 'underline'
20
28
  },
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
21
30
  '&&:hover': {
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
32
  backgroundColor: "var(".concat(VAR_BG_COLOR_HOVER, ")")
23
33
  },
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
24
35
  '&&:active': {
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
37
  backgroundColor: "var(".concat(VAR_BG_COLOR_ACTIVE, ")")
26
38
  }
27
39
  });
28
40
  var appearanceNormalButtonStyles = css({
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
29
42
  '&&, a&&': {
30
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
43
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
31
44
  padding: '0 !important'
32
45
  }
33
46
  });
34
47
  var appearanceNormalActionsContainerStyles = css({
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
35
49
  '&&, a&&': {
36
50
  transform: 'translateX(-2px)'
37
51
  }
@@ -68,7 +82,9 @@ var FlagActions = function FlagActions(props) {
68
82
  key: index
69
83
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
70
84
  ,
71
- style: (_ref = {}, _defineProperty(_ref, VAR_COLOR, actionTextColor[appearance]), _defineProperty(_ref, VAR_BG_COLOR, actionBackgroundColor[appearance].default), _defineProperty(_ref, VAR_BG_COLOR_HOVER, actionBackgroundColor[appearance].pressed), _defineProperty(_ref, VAR_BG_COLOR_ACTIVE, actionBackgroundColor[appearance].active), _ref),
85
+ style: (_ref = {}, _defineProperty(_ref, VAR_COLOR, actionTextColor[appearance]), _defineProperty(_ref, VAR_BG_COLOR, actionBackgroundColor[appearance].default), _defineProperty(_ref, VAR_BG_COLOR_HOVER, actionBackgroundColor[appearance].pressed), _defineProperty(_ref, VAR_BG_COLOR_ACTIVE, actionBackgroundColor[appearance].active), _ref)
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
87
+ ,
72
88
  css: [buttonStyles, appearance === DEFAULT_APPEARANCE && appearanceNormalButtonStyles]
73
89
  }, action.content);
74
90
  })));
@@ -1,7 +1,12 @@
1
1
  import _typeof from "@babel/runtime/helpers/typeof";
2
+ /**
3
+ * @jsxRuntime classic
4
+ */
2
5
  /** @jsx jsx */
3
6
 
4
7
  import { Children, createContext, useContext, useMemo } from 'react';
8
+
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
10
  import { css, jsx } from '@emotion/react';
6
11
  import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
7
12
  import VisuallyHidden from '@atlaskit/visually-hidden';
@@ -28,6 +33,7 @@ export function useFlagGroup() {
28
33
  // transition: none is set on first-of-type to prevent a bug in Firefox
29
34
  // that causes a broken transition
30
35
  var baseStyles = css({
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
31
37
  width: flagWidth,
32
38
  position: 'absolute',
33
39
  insetBlockEnd: 0,
@@ -37,20 +43,26 @@ var baseStyles = css({
37
43
  '@media (max-width: 560px)': {
38
44
  width: '100vw'
39
45
  },
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
40
47
  ':first-of-type': {
41
48
  transform: "translate(0,0)",
42
49
  transition: 'none'
43
50
  },
51
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
44
52
  ':nth-of-type(n + 2)': {
45
53
  animationDuration: '0ms',
54
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
46
55
  transform: "translateX(0) translateY(100%) translateY(".concat(2 * gridSize, "px)")
47
56
  },
57
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
48
58
  ':nth-of-type(1)': {
49
59
  zIndex: 5
50
60
  },
61
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
51
62
  ':nth-of-type(2)': {
52
63
  zIndex: 4
53
64
  },
65
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
54
66
  '&:nth-of-type(n + 4)': {
55
67
  visibility: 'hidden'
56
68
  }
@@ -59,7 +71,7 @@ var baseStyles = css({
59
71
  // Transform needed to push up while 1st flag is leaving
60
72
  // Exiting time should match the exiting time of motion so is halved
61
73
  var dismissAllowedStyles = css({
62
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
74
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
63
75
  '&& + *': {
64
76
  transform: "translate(0, 0)",
65
77
  transitionDuration: "".concat(flagAnimationTime / 2, "ms")
package/dist/esm/flag.js CHANGED
@@ -3,8 +3,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ /**
7
+ * @jsxRuntime classic
8
+ */
6
9
  /** @jsx jsx */
7
10
  import { useCallback, useEffect, useState } from 'react';
11
+
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
13
  import { jsx, css } from '@emotion/react';
9
14
  import { Inline, Stack, Box, xcss, Text } from '@atlaskit/primitives';
10
15
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
@@ -46,7 +51,7 @@ var flagWrapperStyles = css({
46
51
  var analyticsAttributes = {
47
52
  componentName: 'flag',
48
53
  packageName: "@atlaskit/flag",
49
- packageVersion: "15.5.3"
54
+ packageVersion: "15.6.0"
50
55
  };
51
56
  var transitionStyles = css({
52
57
  flexGrow: 1,
@@ -149,7 +154,7 @@ var Flag = function Flag(props) {
149
154
  space: "space.200"
150
155
  }, jsx("div", {
151
156
  css: iconWrapperStyles
152
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
157
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
153
158
  ,
154
159
  style: _defineProperty({}, CSS_VAR_ICON_COLOR, iconColor)
155
160
  }, icon), jsx("span", {
@@ -176,7 +181,7 @@ var Flag = function Flag(props) {
176
181
  isExpanded: !isBold || isExpanded,
177
182
  testId: testId
178
183
  }, description && jsx("div", {
179
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
184
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
180
185
  style: {
181
186
  color: flagTextColorToken[appearance]
182
187
  },
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
  import { type ComponentType, type FC } from 'react';
3
6
  import type { CustomThemeButtonProps } from '@atlaskit/button/types';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
  import { type FC } from 'react';
3
6
  import type { FlagProps } from './types';
@@ -2,5 +2,5 @@ export { default } from './flag';
2
2
  export { default as AutoDismissFlag } from './auto-dismiss-flag';
3
3
  export { default as FlagGroup } from './flag-group';
4
4
  export { useFlags, withFlagsProvider, FlagsProvider } from './flag-provider';
5
- export type { CreateFlagArgs, DismissFn, FlagAPI, FlagArgs, } from './flag-provider';
5
+ export type { CreateFlagArgs, DismissFn, FlagAPI, FlagArgs } from './flag-provider';
6
6
  export type { FlagProps, ActionsType, AppearanceTypes } from './types';
@@ -7,5 +7,5 @@ interface DismissButtonProps {
7
7
  isBold: boolean;
8
8
  testId?: string;
9
9
  }
10
- declare const _default: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => JSX.Element>;
10
+ declare const _default: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId }: DismissButtonProps) => JSX.Element>;
11
11
  export default _default;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
  import { type ComponentType, type FC } from 'react';
3
6
  import type { CustomThemeButtonProps } from '@atlaskit/button/types';
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ */
1
4
  /** @jsx jsx */
2
5
  import { type FC } from 'react';
3
6
  import type { FlagProps } from './types';
@@ -2,5 +2,5 @@ export { default } from './flag';
2
2
  export { default as AutoDismissFlag } from './auto-dismiss-flag';
3
3
  export { default as FlagGroup } from './flag-group';
4
4
  export { useFlags, withFlagsProvider, FlagsProvider } from './flag-provider';
5
- export type { CreateFlagArgs, DismissFn, FlagAPI, FlagArgs, } from './flag-provider';
5
+ export type { CreateFlagArgs, DismissFn, FlagAPI, FlagArgs } from './flag-provider';
6
6
  export type { FlagProps, ActionsType, AppearanceTypes } from './types';
@@ -7,5 +7,5 @@ interface DismissButtonProps {
7
7
  isBold: boolean;
8
8
  testId?: string;
9
9
  }
10
- declare const _default: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => JSX.Element>;
10
+ declare const _default: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId }: DismissButtonProps) => JSX.Element>;
11
11
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { type CreateFlagArgs } from '../src';
2
2
 
3
3
  export default function ShowFlagArgs(props: CreateFlagArgs) {
4
- return null;
4
+ return null;
5
5
  }
package/package.json CHANGED
@@ -1,109 +1,109 @@
1
1
  {
2
- "name": "@atlaskit/flag",
3
- "version": "15.5.3",
4
- "description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
- "sideEffects": false,
24
- "atlaskit:src": "src/index.tsx",
25
- "atlassian": {
26
- "team": "Design System Team",
27
- "releaseModel": "continuous",
28
- "productPushConsumption": [
29
- "jira"
30
- ],
31
- "website": {
32
- "name": "Flag",
33
- "category": "Components"
34
- },
35
- "runReact18": true
36
- },
37
- "af:exports": {
38
- ".": "./src/index.tsx",
39
- "./auto-dismiss-flag": "./src/auto-dismiss-flag.tsx",
40
- "./constants": "./src/constants.tsx",
41
- "./flag-actions": "./src/flag-actions.tsx",
42
- "./flag-group": "./src/flag-group.tsx",
43
- "./flag-provider": "./src/flag-provider.tsx",
44
- "./flag": "./src/flag.tsx",
45
- "./theme": "./src/theme.tsx",
46
- "./types": "./src/types.tsx"
47
- },
48
- "dependencies": {
49
- "@atlaskit/analytics-next": "^9.3.0",
50
- "@atlaskit/button": "^17.17.0",
51
- "@atlaskit/ds-lib": "^2.3.0",
52
- "@atlaskit/icon": "^22.3.0",
53
- "@atlaskit/motion": "^1.6.0",
54
- "@atlaskit/portal": "^4.5.0",
55
- "@atlaskit/primitives": "^7.0.0",
56
- "@atlaskit/theme": "^12.9.0",
57
- "@atlaskit/tokens": "^1.49.0",
58
- "@atlaskit/visually-hidden": "^1.3.0",
59
- "@babel/runtime": "^7.0.0",
60
- "@emotion/react": "^11.7.1"
61
- },
62
- "peerDependencies": {
63
- "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
64
- },
65
- "devDependencies": {
66
- "@af/accessibility-testing": "*",
67
- "@af/integration-testing": "*",
68
- "@atlaskit/radio": "^6.3.0",
69
- "@atlaskit/ssr": "*",
70
- "@atlaskit/visual-regression": "*",
71
- "@emotion/jest": "^11.8.0",
72
- "@testing-library/react": "^12.1.5",
73
- "jest-emotion": "^10.0.32",
74
- "react-dom": "^16.8.0",
75
- "storybook-addon-performance": "^0.16.0",
76
- "typescript": "~5.4.2"
77
- },
78
- "keywords": [
79
- "atlaskit",
80
- "react",
81
- "ui"
82
- ],
83
- "techstack": {
84
- "@repo/internal": {
85
- "dom-events": "use-bind-event-listener",
86
- "design-system": "v1",
87
- "ui-components": [
88
- "lite-mode",
89
- "primitives"
90
- ],
91
- "analytics": [
92
- "analytics-next"
93
- ],
94
- "design-tokens": [
95
- "color",
96
- "spacing"
97
- ],
98
- "theming": [
99
- "react-context"
100
- ],
101
- "deprecation": "no-deprecated-imports",
102
- "styling": [
103
- "emotion",
104
- "static"
105
- ]
106
- }
107
- },
108
- "homepage": "https://atlassian.design/components/flag/"
109
- }
2
+ "name": "@atlaskit/flag",
3
+ "version": "15.6.0",
4
+ "description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.5 <4.9": {
17
+ "*": [
18
+ "dist/types-ts4.5/*",
19
+ "dist/types-ts4.5/index.d.ts"
20
+ ]
21
+ }
22
+ },
23
+ "sideEffects": false,
24
+ "atlaskit:src": "src/index.tsx",
25
+ "atlassian": {
26
+ "team": "Design System Team",
27
+ "releaseModel": "continuous",
28
+ "productPushConsumption": [
29
+ "jira"
30
+ ],
31
+ "website": {
32
+ "name": "Flag",
33
+ "category": "Components"
34
+ },
35
+ "runReact18": true
36
+ },
37
+ "af:exports": {
38
+ ".": "./src/index.tsx",
39
+ "./auto-dismiss-flag": "./src/auto-dismiss-flag.tsx",
40
+ "./constants": "./src/constants.tsx",
41
+ "./flag-actions": "./src/flag-actions.tsx",
42
+ "./flag-group": "./src/flag-group.tsx",
43
+ "./flag-provider": "./src/flag-provider.tsx",
44
+ "./flag": "./src/flag.tsx",
45
+ "./theme": "./src/theme.tsx",
46
+ "./types": "./src/types.tsx"
47
+ },
48
+ "dependencies": {
49
+ "@atlaskit/analytics-next": "^9.3.0",
50
+ "@atlaskit/button": "^17.19.0",
51
+ "@atlaskit/ds-lib": "^2.3.0",
52
+ "@atlaskit/icon": "^22.4.0",
53
+ "@atlaskit/motion": "^1.7.0",
54
+ "@atlaskit/portal": "^4.6.0",
55
+ "@atlaskit/primitives": "^7.4.0",
56
+ "@atlaskit/theme": "^12.10.0",
57
+ "@atlaskit/tokens": "^1.51.0",
58
+ "@atlaskit/visually-hidden": "^1.4.0",
59
+ "@babel/runtime": "^7.0.0",
60
+ "@emotion/react": "^11.7.1"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
64
+ },
65
+ "devDependencies": {
66
+ "@af/accessibility-testing": "*",
67
+ "@af/integration-testing": "*",
68
+ "@atlaskit/radio": "^6.4.0",
69
+ "@atlaskit/ssr": "*",
70
+ "@atlaskit/visual-regression": "*",
71
+ "@emotion/jest": "^11.8.0",
72
+ "@testing-library/react": "^12.1.5",
73
+ "jest-emotion": "^10.0.32",
74
+ "react-dom": "^16.8.0",
75
+ "storybook-addon-performance": "^0.16.0",
76
+ "typescript": "~5.4.2"
77
+ },
78
+ "keywords": [
79
+ "atlaskit",
80
+ "react",
81
+ "ui"
82
+ ],
83
+ "techstack": {
84
+ "@repo/internal": {
85
+ "dom-events": "use-bind-event-listener",
86
+ "design-system": "v1",
87
+ "ui-components": [
88
+ "lite-mode",
89
+ "primitives"
90
+ ],
91
+ "analytics": [
92
+ "analytics-next"
93
+ ],
94
+ "design-tokens": [
95
+ "color",
96
+ "spacing"
97
+ ],
98
+ "theming": [
99
+ "react-context"
100
+ ],
101
+ "deprecation": "no-deprecated-imports",
102
+ "styling": [
103
+ "emotion",
104
+ "static"
105
+ ]
106
+ }
107
+ },
108
+ "homepage": "https://atlassian.design/components/flag/"
109
+ }
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/flag"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -33,43 +34,33 @@ export type ActionsType = Array<ActionType>;
33
34
 
34
35
  // @public (undocumented)
35
36
  type ActionType = {
36
- content: ReactNode;
37
- onClick?: (
38
- e: React.MouseEvent<HTMLElement>,
39
- analyticsEvent: UIAnalyticsEvent,
40
- ) => void;
41
- href?: string;
42
- target?: string;
43
- testId?: string;
37
+ content: ReactNode;
38
+ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
39
+ href?: string;
40
+ target?: string;
41
+ testId?: string;
44
42
  };
45
43
 
46
44
  // @public (undocumented)
47
- export type AppearanceTypes =
48
- | 'error'
49
- | 'info'
50
- | 'normal'
51
- | 'success'
52
- | 'warning';
45
+ export type AppearanceTypes = 'error' | 'info' | 'normal' | 'success' | 'warning';
53
46
 
54
47
  // @public
55
48
  export const AutoDismissFlag: (props: AutoDismissFlagProps) => JSX.Element;
56
49
 
57
50
  // @public (undocumented)
58
- interface AutoDismissFlagProps
59
- extends AutoDismissFlagPropsWithoutId,
60
- FlagPropsId {}
51
+ interface AutoDismissFlagProps extends AutoDismissFlagPropsWithoutId, FlagPropsId {}
61
52
 
62
53
  // @public (undocumented)
63
54
  type AutoDismissFlagPropsWithoutId = {
64
- actions?: ActionsType;
65
- appearance?: AppearanceTypes;
66
- description?: ReactNode;
67
- icon: ReactNode;
68
- title: ReactNode;
69
- onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
70
- linkComponent?: ComponentType<CustomThemeButtonProps>;
71
- testId?: string;
72
- analyticsContext?: Record<string, any>;
55
+ actions?: ActionsType;
56
+ appearance?: AppearanceTypes;
57
+ description?: ReactNode;
58
+ icon: ReactNode;
59
+ title: ReactNode;
60
+ onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
61
+ linkComponent?: ComponentType<CustomThemeButtonProps>;
62
+ testId?: string;
63
+ analyticsContext?: Record<string, any>;
73
64
  };
74
65
 
75
66
  // @public (undocumented)
@@ -77,8 +68,8 @@ type Combine<First, Second> = Omit<First, keyof Second> & Second;
77
68
 
78
69
  // @public (undocumented)
79
70
  export interface CreateFlagArgs extends FlagPropsWithoutId {
80
- id?: FlagId;
81
- isAutoDismiss?: boolean;
71
+ id?: FlagId;
72
+ isAutoDismiss?: boolean;
82
73
  }
83
74
 
84
75
  // @public (undocumented)
@@ -90,15 +81,15 @@ export default Flag;
90
81
 
91
82
  // @public (undocumented)
92
83
  export type FlagAPI = {
93
- showFlag: (args: CreateFlagArgs) => DismissFn;
84
+ showFlag: (args: CreateFlagArgs) => DismissFn;
94
85
  };
95
86
 
96
87
  // @public (undocumented)
97
88
  export type FlagArgs = Combine<
98
- CreateFlagArgs,
99
- {
100
- id: FlagId;
101
- }
89
+ CreateFlagArgs,
90
+ {
91
+ id: FlagId;
92
+ }
102
93
  >;
103
94
 
104
95
  // @public
@@ -106,11 +97,11 @@ export const FlagGroup: (props: FlagGroupProps) => jsx.JSX.Element;
106
97
 
107
98
  // @public (undocumented)
108
99
  type FlagGroupProps = {
109
- id?: string;
110
- label?: string;
111
- labelTag?: React.ElementType;
112
- children?: Array<ReactElement> | ReactElement | boolean | null;
113
- onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
100
+ id?: string;
101
+ label?: string;
102
+ labelTag?: React.ElementType;
103
+ children?: Array<ReactElement> | ReactElement | boolean | null;
104
+ onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
114
105
  };
115
106
 
116
107
  // @public (undocumented)
@@ -121,39 +112,25 @@ export interface FlagProps extends FlagPropsWithoutId, FlagPropsId {}
121
112
 
122
113
  // @public (undocumented)
123
114
  type FlagPropsId = {
124
- id: number | string;
115
+ id: number | string;
125
116
  };
126
117
 
127
118
  // @public (undocumented)
128
- interface FlagPropsWithoutId
129
- extends AutoDismissFlagPropsWithoutId,
130
- WithAnalyticsEventsProps {
131
- onBlur?: (
132
- e: React.FocusEvent<HTMLElement>,
133
- analyticsEvent: UIAnalyticsEvent,
134
- ) => void;
135
- onFocus?: (
136
- e: React.FocusEvent<HTMLElement>,
137
- analyticsEvent: UIAnalyticsEvent,
138
- ) => void;
139
- onMouseOut?: MouseEventHandler;
140
- onMouseOver?: MouseEventHandler;
119
+ interface FlagPropsWithoutId extends AutoDismissFlagPropsWithoutId, WithAnalyticsEventsProps {
120
+ onBlur?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
121
+ onFocus?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
122
+ onMouseOut?: MouseEventHandler;
123
+ onMouseOver?: MouseEventHandler;
141
124
  }
142
125
 
143
126
  // @public (undocumented)
144
- export function FlagsProvider({
145
- children,
146
- }: {
147
- children: React_2.ReactNode;
148
- }): JSX.Element;
127
+ export function FlagsProvider({ children }: { children: React_2.ReactNode }): JSX.Element;
149
128
 
150
129
  // @public
151
130
  export function useFlags(): FlagAPI;
152
131
 
153
132
  // @public (undocumented)
154
- export const withFlagsProvider: (
155
- fn: () => React_2.ReactNode,
156
- ) => React_2.ReactNode;
133
+ export const withFlagsProvider: (fn: () => React_2.ReactNode) => React_2.ReactNode;
157
134
 
158
135
  // (No @packageDocumentation comment for this package)
159
136
  ```
@@ -166,7 +143,7 @@ export const withFlagsProvider: (
166
143
 
167
144
  ```json
168
145
  {
169
- "react": "^16.8.0"
146
+ "react": "^16.8.0"
170
147
  }
171
148
  ```
172
149