@atlaskit/flag 15.0.9 → 15.0.10

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,11 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 15.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`74c1b81a476`](https://bitbucket.org/atlassian/atlassian-frontend/commits/74c1b81a476) - Replaces use of `gridSize` with space tokens. There is no expected visual change.
8
+
3
9
  ## 15.0.9
4
10
 
5
11
  ### Patch Changes
@@ -15,7 +15,7 @@ var _flagGroup = require("./flag-group");
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  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; }
17
17
  var packageName = "@atlaskit/flag";
18
- var packageVersion = "15.0.9";
18
+ var packageVersion = "15.0.10";
19
19
  var AUTO_DISMISS_SECONDS = 8;
20
20
 
21
21
  /**
@@ -9,32 +9,30 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = require("@emotion/react");
10
10
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
11
11
  var _inline = _interopRequireDefault(require("@atlaskit/primitives/inline"));
12
- var _constants = require("@atlaskit/theme/constants");
13
- var _constants2 = require("./constants");
12
+ var _constants = require("./constants");
14
13
  var _theme = require("./theme");
15
14
  /* eslint-disable @repo/internal/styles/no-nested-styles */
16
15
  /** @jsx jsx */
17
16
 
18
- var gridSize = (0, _constants.gridSize)();
19
17
  var buttonStyles = (0, _react.css)({
20
18
  '&&, a&&': {
21
19
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
22
- padding: "0 ".concat(gridSize, "px !important"),
23
- background: "var(".concat(_constants2.VAR_BG_COLOR, ")"),
24
- color: "var(".concat(_constants2.VAR_COLOR, ") !important"),
20
+ padding: "0 ".concat("var(--ds-space-100, 8px)", " !important"),
21
+ background: "var(".concat(_constants.VAR_BG_COLOR, ")"),
22
+ color: "var(".concat(_constants.VAR_COLOR, ") !important"),
25
23
  fontWeight: "var(--ds-font-weight-medium, 500)"
26
24
  },
27
25
  '&&:focus, a&&:focus': {
28
- boxShadow: "0 0 0 2px var(".concat(_constants2.VAR_FOCUS_COLOR, ")")
26
+ boxShadow: "0 0 0 2px var(".concat(_constants.VAR_FOCUS_COLOR, ")")
29
27
  },
30
28
  '&&:hover, &&:active, a&&:hover, a&&:active': {
31
29
  textDecoration: 'underline'
32
30
  },
33
31
  '&&:hover': {
34
- backgroundColor: "var(".concat(_constants2.VAR_BG_COLOR_HOVER, ")")
32
+ backgroundColor: "var(".concat(_constants.VAR_BG_COLOR_HOVER, ")")
35
33
  },
36
34
  '&&:active': {
37
- backgroundColor: "var(".concat(_constants2.VAR_BG_COLOR_ACTIVE, ")")
35
+ backgroundColor: "var(".concat(_constants.VAR_BG_COLOR_ACTIVE, ")")
38
36
  }
39
37
  });
40
38
  var appearanceNormalButtonStyles = (0, _react.css)({
@@ -50,7 +48,7 @@ var appearanceNormalActionsContainerStyles = (0, _react.css)({
50
48
  });
51
49
  var FlagActions = function FlagActions(props) {
52
50
  var _props$appearance = props.appearance,
53
- appearance = _props$appearance === void 0 ? _constants2.DEFAULT_APPEARANCE : _props$appearance,
51
+ appearance = _props$appearance === void 0 ? _constants.DEFAULT_APPEARANCE : _props$appearance,
54
52
  _props$actions = props.actions,
55
53
  actions = _props$actions === void 0 ? [] : _props$actions,
56
54
  linkComponent = props.linkComponent,
@@ -58,7 +56,7 @@ var FlagActions = function FlagActions(props) {
58
56
  if (!actions.length) {
59
57
  return null;
60
58
  }
61
- var isBold = appearance !== _constants2.DEFAULT_APPEARANCE;
59
+ var isBold = appearance !== _constants.DEFAULT_APPEARANCE;
62
60
  return (0, _react.jsx)("span", {
63
61
  css: !isBold && appearanceNormalActionsContainerStyles
64
62
  }, (0, _react.jsx)(_inline.default, {
@@ -78,8 +76,8 @@ var FlagActions = function FlagActions(props) {
78
76
  spacing: "compact",
79
77
  testId: action.testId,
80
78
  key: index,
81
- style: (_ref = {}, (0, _defineProperty2.default)(_ref, _constants2.VAR_COLOR, _theme.actionTextColor[appearance]), (0, _defineProperty2.default)(_ref, _constants2.VAR_BG_COLOR, _theme.actionBackgroundColor[appearance].default), (0, _defineProperty2.default)(_ref, _constants2.VAR_BG_COLOR_HOVER, _theme.actionBackgroundColor[appearance].pressed), (0, _defineProperty2.default)(_ref, _constants2.VAR_BG_COLOR_ACTIVE, _theme.actionBackgroundColor[appearance].active), (0, _defineProperty2.default)(_ref, _constants2.VAR_FOCUS_COLOR, _theme.flagFocusRingColor[appearance]), _ref),
82
- css: [buttonStyles, appearance === _constants2.DEFAULT_APPEARANCE && appearanceNormalButtonStyles]
79
+ 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), (0, _defineProperty2.default)(_ref, _constants.VAR_FOCUS_COLOR, _theme.flagFocusRingColor[appearance]), _ref),
80
+ css: [buttonStyles, appearance === _constants.DEFAULT_APPEARANCE && appearanceNormalButtonStyles]
83
81
  }, action.content);
84
82
  })));
85
83
  };
@@ -17,6 +17,8 @@ var _portal = _interopRequireDefault(require("@atlaskit/portal"));
17
17
  var _constants = require("@atlaskit/theme/constants");
18
18
  /** @jsx jsx */
19
19
 
20
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
21
+
20
22
  var gridSize = (0, _constants.gridSize)();
21
23
  var flagWidth = gridSize * 50;
22
24
  exports.flagWidth = flagWidth;
package/dist/cjs/flag.js CHANGED
@@ -26,7 +26,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
26
26
  var analyticsAttributes = {
27
27
  componentName: 'flag',
28
28
  packageName: "@atlaskit/flag",
29
- packageVersion: "15.0.9"
29
+ packageVersion: "15.0.10"
30
30
  };
31
31
  var transitionStyles = (0, _react2.css)({
32
32
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.9",
3
+ "version": "15.0.10",
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 = "15.0.9";
8
+ const packageVersion = "15.0.10";
9
9
  export const AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
@@ -4,14 +4,12 @@
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import Button from '@atlaskit/button/custom-theme-button';
6
6
  import Inline from '@atlaskit/primitives/inline';
7
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
8
7
  import { DEFAULT_APPEARANCE, VAR_COLOR, VAR_BG_COLOR, VAR_BG_COLOR_HOVER, VAR_BG_COLOR_ACTIVE, VAR_FOCUS_COLOR } from './constants';
9
8
  import { flagFocusRingColor, actionBackgroundColor, actionTextColor } from './theme';
10
- const gridSize = getGridSize();
11
9
  const buttonStyles = css({
12
10
  '&&, a&&': {
13
11
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
14
- padding: `0 ${gridSize}px !important`,
12
+ padding: `0 ${"var(--ds-space-100, 8px)"} !important`,
15
13
  background: `var(${VAR_BG_COLOR})`,
16
14
  color: `var(${VAR_COLOR}) !important`,
17
15
  fontWeight: "var(--ds-font-weight-medium, 500)"
@@ -6,6 +6,7 @@ import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
6
6
  import VisuallyHidden from '@atlaskit/visually-hidden';
7
7
  import noop from '@atlaskit/ds-lib/noop';
8
8
  import Portal from '@atlaskit/portal';
9
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
9
10
  import { gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
10
11
  const gridSize = getGridSize();
11
12
  export const flagWidth = gridSize * 50;
@@ -16,7 +16,7 @@ import { Expander, DismissButton } from './internal';
16
16
  const analyticsAttributes = {
17
17
  componentName: 'flag',
18
18
  packageName: "@atlaskit/flag",
19
- packageVersion: "15.0.9"
19
+ packageVersion: "15.0.10"
20
20
  };
21
21
  const transitionStyles = css({
22
22
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.9",
3
+ "version": "15.0.10",
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 = "15.0.9";
8
+ var packageVersion = "15.0.10";
9
9
  export var AUTO_DISMISS_SECONDS = 8;
10
10
 
11
11
  /**
@@ -5,14 +5,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import Button from '@atlaskit/button/custom-theme-button';
7
7
  import Inline from '@atlaskit/primitives/inline';
8
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
9
8
  import { DEFAULT_APPEARANCE, VAR_COLOR, VAR_BG_COLOR, VAR_BG_COLOR_HOVER, VAR_BG_COLOR_ACTIVE, VAR_FOCUS_COLOR } from './constants';
10
9
  import { flagFocusRingColor, actionBackgroundColor, actionTextColor } from './theme';
11
- var gridSize = getGridSize();
12
10
  var buttonStyles = css({
13
11
  '&&, a&&': {
14
12
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
15
- padding: "0 ".concat(gridSize, "px !important"),
13
+ padding: "0 ".concat("var(--ds-space-100, 8px)", " !important"),
16
14
  background: "var(".concat(VAR_BG_COLOR, ")"),
17
15
  color: "var(".concat(VAR_COLOR, ") !important"),
18
16
  fontWeight: "var(--ds-font-weight-medium, 500)"
@@ -7,6 +7,7 @@ import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
7
7
  import VisuallyHidden from '@atlaskit/visually-hidden';
8
8
  import noop from '@atlaskit/ds-lib/noop';
9
9
  import Portal from '@atlaskit/portal';
10
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
10
11
  import { gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
11
12
  var gridSize = getGridSize();
12
13
  export var flagWidth = gridSize * 50;
package/dist/esm/flag.js CHANGED
@@ -20,7 +20,7 @@ import { Expander, DismissButton } from './internal';
20
20
  var analyticsAttributes = {
21
21
  componentName: 'flag',
22
22
  packageName: "@atlaskit/flag",
23
- packageVersion: "15.0.9"
23
+ packageVersion: "15.0.10"
24
24
  };
25
25
  var transitionStyles = css({
26
26
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.9",
3
+ "version": "15.0.10",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.9",
3
+ "version": "15.0.10",
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/"