@atlaskit/blanket 12.2.15 → 12.3.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,17 @@
1
1
  # @atlaskit/blanket
2
2
 
3
+ ## 12.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f2fe91811eb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f2fe91811eb) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behaviour change.
8
+
9
+ ## 12.2.16
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
14
+
3
15
  ## 12.2.15
4
16
 
5
17
  ### Patch Changes
@@ -11,7 +11,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
 
12
12
  var _react = require("react");
13
13
 
14
- var _core = require("@emotion/core");
14
+ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _usePlatformLeafEventHandler = require("@atlaskit/analytics-next/usePlatformLeafEventHandler");
17
17
 
@@ -28,13 +28,13 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
28
28
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
29
 
30
30
  var packageName = "@atlaskit/blanket";
31
- var packageVersion = "12.2.15";
31
+ var packageVersion = "12.3.0";
32
32
  var analyticsAttributes = {
33
33
  componentName: 'blanket',
34
34
  packageName: packageName,
35
35
  packageVersion: packageVersion
36
36
  };
37
- var baseStyles = (0, _core.css)({
37
+ var baseStyles = (0, _react2.css)({
38
38
  position: 'fixed',
39
39
  zIndex: _constants.layers.blanket(),
40
40
  top: 0,
@@ -44,16 +44,16 @@ var baseStyles = (0, _core.css)({
44
44
  overflowY: 'auto',
45
45
  pointerEvents: 'initial'
46
46
  });
47
- var shouldAllowClickThroughStyles = (0, _core.css)({
47
+ var shouldAllowClickThroughStyles = (0, _react2.css)({
48
48
  pointerEvents: 'none'
49
49
  });
50
- var invisibleStyles = (0, _core.css)({
50
+ var invisibleStyles = (0, _react2.css)({
51
51
  backgroundColor: 'transparent'
52
52
  });
53
- var lightBgStyles = (0, _core.css)({
53
+ var lightBgStyles = (0, _react2.css)({
54
54
  backgroundColor: "var(--ds-blanket, ".concat(_colors.N100A, ")")
55
55
  });
56
- var darkBgStyles = (0, _core.css)({
56
+ var darkBgStyles = (0, _react2.css)({
57
57
  backgroundColor: "var(--ds-blanket, ".concat(_colors.DN90A, ")")
58
58
  });
59
59
  var backgroundStyle = {
@@ -91,7 +91,7 @@ var Blanket = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)
91
91
  return e.currentTarget === e.target ? onBlanketClickedWithAnalytics(e) : undefined;
92
92
  }, [onBlanketClickedWithAnalytics]);
93
93
  var onClick = shouldAllowClickThrough ? undefined : blanketClickOutsideChildren;
94
- return (0, _core.jsx)("div", {
94
+ return (0, _react2.jsx)("div", {
95
95
  role: "presentation",
96
96
  css: [baseStyles, shouldAllowClickThrough && shouldAllowClickThroughStyles, backgroundStyle[mode], !isTinted && invisibleStyles],
97
97
  onClick: onClick,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/blanket",
3
- "version": "12.2.15",
3
+ "version": "12.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,13 +1,13 @@
1
1
  /** @jsx jsx */
2
2
  import { forwardRef, memo, useCallback } from 'react';
3
- import { css, jsx } from '@emotion/core';
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
6
  import { DN90A, N100A } from '@atlaskit/theme/colors';
7
7
  import { useGlobalTheme } from '@atlaskit/theme/components';
8
8
  import { layers } from '@atlaskit/theme/constants';
9
9
  const packageName = "@atlaskit/blanket";
10
- const packageVersion = "12.2.15";
10
+ const packageVersion = "12.3.0";
11
11
  const analyticsAttributes = {
12
12
  componentName: 'blanket',
13
13
  packageName,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/blanket",
3
- "version": "12.2.15",
3
+ "version": "12.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -6,14 +6,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  /** @jsx jsx */
8
8
  import { forwardRef, memo, useCallback } from 'react';
9
- import { css, jsx } from '@emotion/core';
9
+ import { css, jsx } from '@emotion/react';
10
10
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
11
11
  import noop from '@atlaskit/ds-lib/noop';
12
12
  import { DN90A, N100A } from '@atlaskit/theme/colors';
13
13
  import { useGlobalTheme } from '@atlaskit/theme/components';
14
14
  import { layers } from '@atlaskit/theme/constants';
15
15
  var packageName = "@atlaskit/blanket";
16
- var packageVersion = "12.2.15";
16
+ var packageVersion = "12.3.0";
17
17
  var analyticsAttributes = {
18
18
  componentName: 'blanket',
19
19
  packageName: packageName,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/blanket",
3
- "version": "12.2.15",
3
+ "version": "12.3.0",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { BlanketProps } from './types';
3
+ /**
4
+ * __Blanket__
5
+ *
6
+ * A Blanket provides the overlay layer for components such as a modal dialog or a tooltip
7
+ *
8
+ * - [Examples](https://atlaskit.atlassian.com/examples/design-system/blanket/basic-usage)
9
+ */
10
+ declare const Blanket: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<BlanketProps & import("react").RefAttributes<HTMLDivElement>>>;
11
+ export default Blanket;
@@ -0,0 +1 @@
1
+ export type { BlanketProps } from '../types';
@@ -0,0 +1,2 @@
1
+ export { default } from './blanket';
2
+ export type { BlanketProps } from './types';
@@ -0,0 +1,30 @@
1
+ import { ReactNode } from 'react';
2
+ import UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
3
+ export interface BlanketProps {
4
+ /**
5
+ * Whether mouse events can pierce the blanket. If true, onBlanketClicked will not be fired.
6
+ */
7
+ shouldAllowClickThrough?: boolean;
8
+ /**
9
+ * Whether the blanket has a tinted background color.
10
+ */
11
+ isTinted?: boolean;
12
+ /**
13
+ * Handler function to be called when the blanket is clicked.
14
+ */
15
+ onBlanketClicked?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent: UIAnalyticsEvent) => void;
16
+ /**
17
+ * Additional information to be included in the `context` of analytics events.
18
+ */
19
+ analyticsContext?: Record<string, any>;
20
+ /**
21
+ * A `testId` prop is provided for specified elements,
22
+ * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
23
+ * serving as a hook for automated tests.
24
+ */
25
+ testId?: string;
26
+ /**
27
+ * The children to be rendered within Blanket.
28
+ */
29
+ children?: ReactNode;
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/blanket",
3
- "version": "12.2.15",
3
+ "version": "12.3.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/"
@@ -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
  "homepage": "https://atlassian.design/components/blanket",
@@ -31,10 +38,10 @@
31
38
  "@atlaskit/analytics-next": "^8.2.0",
32
39
  "@atlaskit/codemod-utils": "^4.1.0",
33
40
  "@atlaskit/ds-lib": "^2.1.0",
34
- "@atlaskit/theme": "^12.1.0",
41
+ "@atlaskit/theme": "^12.2.0",
35
42
  "@atlaskit/tokens": "^0.10.0",
36
43
  "@babel/runtime": "^7.0.0",
37
- "@emotion/core": "^10.0.9"
44
+ "@emotion/react": "^11.7.1"
38
45
  },
39
46
  "peerDependencies": {
40
47
  "react": "^16.8.0"
@@ -44,17 +51,17 @@
44
51
  "@atlaskit/button": "^16.3.0",
45
52
  "@atlaskit/docs": "*",
46
53
  "@atlaskit/ssr": "*",
47
- "@atlaskit/toggle": "^12.4.0",
54
+ "@atlaskit/toggle": "^12.5.0",
48
55
  "@atlaskit/visual-regression": "*",
49
56
  "@atlaskit/webdriver-runner": "*",
50
57
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
51
- "@testing-library/dom": "^7.7.3",
52
- "@testing-library/react": "^8.0.1",
58
+ "@testing-library/dom": "^8.17.1",
59
+ "@testing-library/react": "^12.1.5",
53
60
  "jscodeshift": "^0.13.0",
54
61
  "react-dom": "^16.8.0",
55
62
  "react-lorem-component": "^0.13.0",
56
63
  "storybook-addon-performance": "^0.16.0",
57
- "typescript": "4.3.5",
64
+ "typescript": "4.5.5",
58
65
  "wait-for-expect": "^1.2.0"
59
66
  },
60
67
  "keywords": [
package/report.api.md CHANGED
@@ -1,6 +1,8 @@
1
- ## API Report File for "@atlaskit/blanket"
1
+ ## API Report File for "@atlaskit/blanket".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  /// <reference types="react" />
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/entry-points/types.js",
5
5
  "module:es2019": "../dist/es2019/entry-points/types.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/entry-points/types.d.ts"
7
+ "types": "../dist/types/entry-points/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/entry-points/types.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }