@atlaskit/flag 16.1.2 → 16.2.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,20 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 16.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#122900](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122900)
8
+ [`d8df33a58ab3b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d8df33a58ab3b) -
9
+ Updated flag dismiss and expand button to use new icons. This change is behind a feature flag and
10
+ will be available in a later release.
11
+
12
+ ## 16.1.3
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 16.1.2
4
19
 
5
20
  ### Patch Changes
@@ -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 && {}.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 = "16.1.2";
18
+ var packageVersion = "16.2.0";
19
19
  var AUTO_DISMISS_SECONDS = exports.AUTO_DISMISS_SECONDS = 8;
20
20
 
21
21
  /**
package/dist/cjs/flag.js CHANGED
@@ -67,7 +67,7 @@ var flagWrapperStyles = (0, _react2.css)({
67
67
  var analyticsAttributes = {
68
68
  componentName: 'flag',
69
69
  packageName: "@atlaskit/flag",
70
- packageVersion: "16.1.2"
70
+ packageVersion: "16.2.0"
71
71
  };
72
72
  var transitionStyles = (0, _react2.css)({
73
73
  flexGrow: 1,
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
- var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
11
- var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-down"));
12
- var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/glyph/hipchat/chevron-up"));
10
+ var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
11
+ var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down"));
12
+ var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up"));
13
13
  var _primitives = require("@atlaskit/primitives");
14
14
  var _theme = require("../theme");
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); }
@@ -33,12 +33,12 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
33
33
  isBold = _ref.isBold,
34
34
  isExpanded = _ref.isExpanded,
35
35
  testId = _ref.testId;
36
- var ButtonIcon = _cross.default;
36
+ var ButtonIcon = _closeCross.default;
37
37
  var buttonLabel = 'Dismiss';
38
38
  var size = 'small';
39
39
  var buttonTestId = testId && "".concat(testId, "-dismiss");
40
40
  if (isBold) {
41
- ButtonIcon = isExpanded ? _chevronUp.default : _chevronDown.default;
41
+ ButtonIcon = isExpanded ? _chevronUpHipchatChevronUp.default : _chevronDownHipchatChevronDown.default;
42
42
  buttonLabel = isExpanded ? 'Collapse' : 'Expand';
43
43
  size = 'medium';
44
44
  buttonTestId = testId && "".concat(testId, "-toggle");
@@ -51,8 +51,9 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
51
51
  "aria-label": buttonLabel
52
52
  }, /*#__PURE__*/_react.default.createElement(ButtonIcon, {
53
53
  label: "",
54
- size: size,
55
- primaryColor: _theme.flagTextColorToken[appearance]
54
+ LEGACY_size: size,
55
+ LEGACY_primaryColor: _theme.flagTextColorToken[appearance],
56
+ color: _theme.flagTextColorToken[appearance]
56
57
  }));
57
58
  };
58
59
  var DismissButton = /*#__PURE__*/(0, _react.memo)(DismissButtonComponent);
@@ -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 = "16.1.2";
8
+ const packageVersion = "16.2.0";
9
9
  export const AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
@@ -59,7 +59,7 @@ const flagWrapperStyles = css({
59
59
  const analyticsAttributes = {
60
60
  componentName: 'flag',
61
61
  packageName: "@atlaskit/flag",
62
- packageVersion: "16.1.2"
62
+ packageVersion: "16.2.0"
63
63
  };
64
64
  const transitionStyles = css({
65
65
  flexGrow: 1,
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
- import CrossIcon from '@atlaskit/icon/glyph/cross';
3
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
4
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
2
+ import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
3
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
4
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
5
5
  import { Pressable, xcss } from '@atlaskit/primitives';
6
6
  import { flagTextColorToken } from '../theme';
7
7
  const buttonStyles = xcss({
@@ -24,7 +24,7 @@ const DismissButtonComponent = ({
24
24
  isExpanded,
25
25
  testId
26
26
  }) => {
27
- let ButtonIcon = CrossIcon;
27
+ let ButtonIcon = CloseIcon;
28
28
  let buttonLabel = 'Dismiss';
29
29
  let size = 'small';
30
30
  let buttonTestId = testId && `${testId}-dismiss`;
@@ -42,8 +42,9 @@ const DismissButtonComponent = ({
42
42
  "aria-label": buttonLabel
43
43
  }, /*#__PURE__*/React.createElement(ButtonIcon, {
44
44
  label: "",
45
- size: size,
46
- primaryColor: flagTextColorToken[appearance]
45
+ LEGACY_size: size,
46
+ LEGACY_primaryColor: flagTextColorToken[appearance],
47
+ color: flagTextColorToken[appearance]
47
48
  }));
48
49
  };
49
50
  const DismissButton = /*#__PURE__*/memo(DismissButtonComponent);
@@ -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 = "16.1.2";
8
+ var packageVersion = "16.2.0";
9
9
  export var AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
package/dist/esm/flag.js CHANGED
@@ -63,7 +63,7 @@ var flagWrapperStyles = css({
63
63
  var analyticsAttributes = {
64
64
  componentName: 'flag',
65
65
  packageName: "@atlaskit/flag",
66
- packageVersion: "16.1.2"
66
+ packageVersion: "16.2.0"
67
67
  };
68
68
  var transitionStyles = css({
69
69
  flexGrow: 1,
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
- import CrossIcon from '@atlaskit/icon/glyph/cross';
3
- import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
4
- import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
2
+ import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
3
+ import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down--hipchat-chevron-down';
4
+ import ChevronUpIcon from '@atlaskit/icon/utility/migration/chevron-up--hipchat-chevron-up';
5
5
  import { Pressable, xcss } from '@atlaskit/primitives';
6
6
  import { flagTextColorToken } from '../theme';
7
7
  var buttonStyles = xcss({
@@ -23,7 +23,7 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
23
23
  isBold = _ref.isBold,
24
24
  isExpanded = _ref.isExpanded,
25
25
  testId = _ref.testId;
26
- var ButtonIcon = CrossIcon;
26
+ var ButtonIcon = CloseIcon;
27
27
  var buttonLabel = 'Dismiss';
28
28
  var size = 'small';
29
29
  var buttonTestId = testId && "".concat(testId, "-dismiss");
@@ -41,8 +41,9 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
41
41
  "aria-label": buttonLabel
42
42
  }, /*#__PURE__*/React.createElement(ButtonIcon, {
43
43
  label: "",
44
- size: size,
45
- primaryColor: flagTextColorToken[appearance]
44
+ LEGACY_size: size,
45
+ LEGACY_primaryColor: flagTextColorToken[appearance],
46
+ color: flagTextColorToken[appearance]
46
47
  }));
47
48
  };
48
49
  var DismissButton = /*#__PURE__*/memo(DismissButtonComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "16.1.2",
3
+ "version": "16.2.0",
4
4
  "description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/platform-feature-flags": "1.1.0",
54
54
  "@atlaskit/portal": "^5.0.0",
55
55
  "@atlaskit/primitives": "^14.1.0",
56
- "@atlaskit/theme": "^17.0.0",
56
+ "@atlaskit/theme": "^18.0.0",
57
57
  "@atlaskit/tokens": "^4.3.0",
58
58
  "@atlaskit/visually-hidden": "^3.0.0",
59
59
  "@babel/runtime": "^7.0.0",