@atlaskit/blanket 12.4.5 → 13.0.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,11 @@
1
1
  # @atlaskit/blanket
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#41760](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41760) [`909e4a30fe7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/909e4a30fe7) - Removed all remaining legacy theming logic from the Blanket, Breadcrumbs and Checkbox components.
8
+
3
9
  ## 12.4.5
4
10
 
5
11
  ### Patch Changes
@@ -11,12 +11,11 @@ var _react2 = require("@emotion/react");
11
11
  var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
12
12
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
13
13
  var _colors = require("@atlaskit/theme/colors");
14
- var _components = require("@atlaskit/theme/components");
15
14
  var _constants = require("@atlaskit/theme/constants");
16
15
  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; }
17
16
  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 */
18
17
  var packageName = "@atlaskit/blanket";
19
- var packageVersion = "12.4.5";
18
+ var packageVersion = "13.0.0";
20
19
  var analyticsAttributes = {
21
20
  componentName: 'blanket',
22
21
  packageName: packageName,
@@ -26,6 +25,7 @@ var baseStyles = (0, _react2.css)({
26
25
  position: 'fixed',
27
26
  zIndex: _constants.layers.blanket(),
28
27
  inset: 0,
28
+ backgroundColor: "var(--ds-blanket, ".concat(_colors.N100A, ")"),
29
29
  overflowY: 'auto',
30
30
  pointerEvents: 'initial'
31
31
  });
@@ -35,16 +35,6 @@ var shouldAllowClickThroughStyles = (0, _react2.css)({
35
35
  var invisibleStyles = (0, _react2.css)({
36
36
  backgroundColor: 'transparent'
37
37
  });
38
- var lightBgStyles = (0, _react2.css)({
39
- backgroundColor: "var(--ds-blanket, ".concat(_colors.N100A, ")")
40
- });
41
- var darkBgStyles = (0, _react2.css)({
42
- backgroundColor: "var(--ds-blanket, ".concat(_colors.DN90A, ")")
43
- });
44
- var backgroundStyle = {
45
- light: lightBgStyles,
46
- dark: darkBgStyles
47
- };
48
38
 
49
39
  /**
50
40
  * __Blanket__
@@ -63,8 +53,6 @@ var Blanket = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)
63
53
  testId = _ref.testId,
64
54
  children = _ref.children,
65
55
  analyticsContext = _ref.analyticsContext;
66
- var _useGlobalTheme = (0, _components.useGlobalTheme)(),
67
- mode = _useGlobalTheme.mode;
68
56
  var mouseDownTarget = (0, _react.useRef)(null);
69
57
  var onBlanketClickedWithAnalytics = (0, _usePlatformLeafEventHandler.usePlatformLeafEventHandler)(_objectSpread({
70
58
  fn: onBlanketClicked,
@@ -88,7 +76,7 @@ var Blanket = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)
88
76
  */
89
77
  (0, _react2.jsx)("div", {
90
78
  role: "presentation",
91
- css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, backgroundStyle[mode], !isTinted && invisibleStyles],
79
+ css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, !isTinted && invisibleStyles],
92
80
  onClick: onClick,
93
81
  onMouseDown: onMouseDown,
94
82
  "data-testid": testId,
@@ -97,5 +85,4 @@ var Blanket = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)
97
85
  );
98
86
  }));
99
87
  Blanket.displayName = 'Blanket';
100
- var _default = Blanket;
101
- exports.default = _default;
88
+ var _default = exports.default = Blanket;
@@ -3,11 +3,10 @@ import { forwardRef, memo, useCallback, useRef } from 'react';
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
5
5
  import noop from '@atlaskit/ds-lib/noop';
6
- import { DN90A, N100A } from '@atlaskit/theme/colors';
7
- import { useGlobalTheme } from '@atlaskit/theme/components';
6
+ import { N100A } from '@atlaskit/theme/colors';
8
7
  import { layers } from '@atlaskit/theme/constants';
9
8
  const packageName = "@atlaskit/blanket";
10
- const packageVersion = "12.4.5";
9
+ const packageVersion = "13.0.0";
11
10
  const analyticsAttributes = {
12
11
  componentName: 'blanket',
13
12
  packageName,
@@ -17,6 +16,7 @@ const baseStyles = css({
17
16
  position: 'fixed',
18
17
  zIndex: layers.blanket(),
19
18
  inset: 0,
19
+ backgroundColor: `var(--ds-blanket, ${N100A})`,
20
20
  overflowY: 'auto',
21
21
  pointerEvents: 'initial'
22
22
  });
@@ -26,16 +26,6 @@ const shouldAllowClickThroughStyles = css({
26
26
  const invisibleStyles = css({
27
27
  backgroundColor: 'transparent'
28
28
  });
29
- const lightBgStyles = css({
30
- backgroundColor: `var(--ds-blanket, ${N100A})`
31
- });
32
- const darkBgStyles = css({
33
- backgroundColor: `var(--ds-blanket, ${DN90A})`
34
- });
35
- const backgroundStyle = {
36
- light: lightBgStyles,
37
- dark: darkBgStyles
38
- };
39
29
 
40
30
  /**
41
31
  * __Blanket__
@@ -52,9 +42,6 @@ const Blanket = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Blanket({
52
42
  children,
53
43
  analyticsContext
54
44
  }, ref) {
55
- const {
56
- mode
57
- } = useGlobalTheme();
58
45
  const mouseDownTarget = useRef(null);
59
46
  const onBlanketClickedWithAnalytics = usePlatformLeafEventHandler({
60
47
  fn: onBlanketClicked,
@@ -77,7 +64,7 @@ const Blanket = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Blanket({
77
64
  */
78
65
  jsx("div", {
79
66
  role: "presentation",
80
- css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, backgroundStyle[mode], !isTinted && invisibleStyles],
67
+ css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, !isTinted && invisibleStyles],
81
68
  onClick: onClick,
82
69
  onMouseDown: onMouseDown,
83
70
  "data-testid": testId,
@@ -6,11 +6,10 @@ import { forwardRef, memo, useCallback, useRef } from 'react';
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
8
8
  import noop from '@atlaskit/ds-lib/noop';
9
- import { DN90A, N100A } from '@atlaskit/theme/colors';
10
- import { useGlobalTheme } from '@atlaskit/theme/components';
9
+ import { N100A } from '@atlaskit/theme/colors';
11
10
  import { layers } from '@atlaskit/theme/constants';
12
11
  var packageName = "@atlaskit/blanket";
13
- var packageVersion = "12.4.5";
12
+ var packageVersion = "13.0.0";
14
13
  var analyticsAttributes = {
15
14
  componentName: 'blanket',
16
15
  packageName: packageName,
@@ -20,6 +19,7 @@ var baseStyles = css({
20
19
  position: 'fixed',
21
20
  zIndex: layers.blanket(),
22
21
  inset: 0,
22
+ backgroundColor: "var(--ds-blanket, ".concat(N100A, ")"),
23
23
  overflowY: 'auto',
24
24
  pointerEvents: 'initial'
25
25
  });
@@ -29,16 +29,6 @@ var shouldAllowClickThroughStyles = css({
29
29
  var invisibleStyles = css({
30
30
  backgroundColor: 'transparent'
31
31
  });
32
- var lightBgStyles = css({
33
- backgroundColor: "var(--ds-blanket, ".concat(N100A, ")")
34
- });
35
- var darkBgStyles = css({
36
- backgroundColor: "var(--ds-blanket, ".concat(DN90A, ")")
37
- });
38
- var backgroundStyle = {
39
- light: lightBgStyles,
40
- dark: darkBgStyles
41
- };
42
32
 
43
33
  /**
44
34
  * __Blanket__
@@ -57,8 +47,6 @@ var Blanket = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Blanket(_ref,
57
47
  testId = _ref.testId,
58
48
  children = _ref.children,
59
49
  analyticsContext = _ref.analyticsContext;
60
- var _useGlobalTheme = useGlobalTheme(),
61
- mode = _useGlobalTheme.mode;
62
50
  var mouseDownTarget = useRef(null);
63
51
  var onBlanketClickedWithAnalytics = usePlatformLeafEventHandler(_objectSpread({
64
52
  fn: onBlanketClicked,
@@ -82,7 +70,7 @@ var Blanket = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Blanket(_ref,
82
70
  */
83
71
  jsx("div", {
84
72
  role: "presentation",
85
- css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, backgroundStyle[mode], !isTinted && invisibleStyles],
73
+ css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, !isTinted && invisibleStyles],
86
74
  onClick: onClick,
87
75
  onMouseDown: onMouseDown,
88
76
  "data-testid": testId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/blanket",
3
- "version": "12.4.5",
3
+ "version": "13.0.0",
4
4
  "description": "A blanket covers the underlying UI for a layered component, such as a modal dialog or a tooltip.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/codemod-utils": "^4.2.0",
44
44
  "@atlaskit/ds-lib": "^2.2.0",
45
45
  "@atlaskit/theme": "^12.6.0",
46
- "@atlaskit/tokens": "^1.25.0",
46
+ "@atlaskit/tokens": "^1.28.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@emotion/react": "^11.7.1"
49
49
  },
@@ -52,6 +52,7 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@af/accessibility-testing": "*",
55
+ "@af/integration-testing": "*",
55
56
  "@atlaskit/ssr": "*",
56
57
  "@atlaskit/visual-regression": "*",
57
58
  "@atlaskit/webdriver-runner": "*",
@@ -92,4 +93,4 @@
92
93
  }
93
94
  },
94
95
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
95
- }
96
+ }