@atlaskit/drawer 7.1.0 → 7.1.4
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 +25 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/primitives/content.js +2 -2
- package/dist/cjs/components/primitives/icon-button.js +2 -2
- package/dist/cjs/components/primitives/index.js +12 -7
- package/dist/cjs/components/primitives/sidebar.js +3 -3
- package/dist/cjs/components/transitions.js +7 -4
- package/dist/cjs/components/utils.js +3 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/index.js +1 -1
- package/dist/es2019/components/primitives/icon-button.js +2 -2
- package/dist/es2019/components/primitives/index.js +1 -1
- package/dist/es2019/components/primitives/sidebar.js +1 -1
- package/dist/es2019/components/utils.js +3 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/primitives/content.js +2 -1
- package/dist/esm/components/primitives/icon-button.js +2 -2
- package/dist/esm/components/primitives/index.js +11 -7
- package/dist/esm/components/primitives/sidebar.js +3 -2
- package/dist/esm/components/transitions.js +6 -4
- package/dist/esm/components/utils.js +3 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/primitives/content.d.ts +1 -0
- package/dist/types/components/types.d.ts +18 -0
- package/dist/types/components/utils.d.ts +3 -0
- package/package.json +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e9210b8a098`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9210b8a098) - Updates Drawer with deprecated status for `cssFn`/`overrides APIs.
|
|
8
|
+
|
|
9
|
+
## 7.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`19d72473dfb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19d72473dfb) - Bump dependency tiny-invariant to latest"
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 7.1.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 7.1.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- [`c55c736ecea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c55c736ecea) - Patch VULN AFP-3486 AFP-3487 AFP-3488 AFP-3489
|
|
27
|
+
|
|
3
28
|
## 7.1.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -52,7 +52,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
52
52
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
53
53
|
|
|
54
54
|
var packageName = "@atlaskit/drawer";
|
|
55
|
-
var packageVersion = "7.1.
|
|
55
|
+
var packageVersion = "7.1.4";
|
|
56
56
|
|
|
57
57
|
var OnlyChild = function OnlyChild(_ref) {
|
|
58
58
|
var children = _ref.children;
|
|
@@ -15,7 +15,7 @@ var _core = require("@emotion/core");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
var _excluded = ["cssFn"];
|
|
19
19
|
var defaultStyles = {
|
|
20
20
|
flex: 1,
|
|
21
21
|
overflow: 'auto',
|
|
@@ -28,7 +28,7 @@ var contentCSS = function contentCSS() {
|
|
|
28
28
|
|
|
29
29
|
var Content = function Content(_ref) {
|
|
30
30
|
var cssFn = _ref.cssFn,
|
|
31
|
-
props = (0, _objectWithoutProperties2.default)(_ref,
|
|
31
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
32
|
return (
|
|
33
33
|
/**
|
|
34
34
|
* I noticed the implementation at @atlaskit/checkbox would send the props to cssFn rather
|
|
@@ -29,10 +29,10 @@ var iconButtonStyles = (0, _core.css)({
|
|
|
29
29
|
fontSize: 'inherit',
|
|
30
30
|
lineHeight: 1,
|
|
31
31
|
'&:hover': {
|
|
32
|
-
backgroundColor: "var(--ds-background-
|
|
32
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30A, ")")
|
|
33
33
|
},
|
|
34
34
|
'&:active': {
|
|
35
|
-
backgroundColor: "var(--ds-background-
|
|
35
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(_colors.B50, ")"),
|
|
36
36
|
outline: 0
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -43,13 +43,18 @@ var _iconButton = _interopRequireDefault(require("./icon-button"));
|
|
|
43
43
|
|
|
44
44
|
var _sidebar = _interopRequireDefault(require("./sidebar"));
|
|
45
45
|
|
|
46
|
+
var _excluded = ["width", "shouldUnmountOnExit", "style"],
|
|
47
|
+
_excluded2 = ["children", "icon", "onClose", "onCloseComplete", "onOpenComplete", "overrides", "testId"],
|
|
48
|
+
_excluded3 = ["component"],
|
|
49
|
+
_excluded4 = ["component"];
|
|
50
|
+
|
|
46
51
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
47
52
|
|
|
48
53
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
54
|
|
|
50
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
55
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
56
|
|
|
52
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
57
|
+
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; }
|
|
53
58
|
|
|
54
59
|
// Misc.
|
|
55
60
|
// ------------------------------
|
|
@@ -67,7 +72,7 @@ var wrapperStyles = (0, _core.css)({
|
|
|
67
72
|
zIndex: _constants.layers.blanket() + 1,
|
|
68
73
|
top: 0,
|
|
69
74
|
left: 0,
|
|
70
|
-
backgroundColor: "var(--ds-
|
|
75
|
+
backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
|
|
71
76
|
overflow: 'hidden'
|
|
72
77
|
});
|
|
73
78
|
|
|
@@ -76,7 +81,7 @@ var Wrapper = function Wrapper(_ref) {
|
|
|
76
81
|
width = _ref$width === void 0 ? 'narrow' : _ref$width,
|
|
77
82
|
shouldUnmountOnExit = _ref.shouldUnmountOnExit,
|
|
78
83
|
style = _ref.style,
|
|
79
|
-
props = (0, _objectWithoutProperties2.default)(_ref,
|
|
84
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
80
85
|
return (0, _core.jsx)("div", (0, _extends2.default)({
|
|
81
86
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
82
87
|
width: widths[width]
|
|
@@ -111,16 +116,16 @@ var DrawerPrimitive = /*#__PURE__*/function (_Component) {
|
|
|
111
116
|
onOpenComplete = _this$props.onOpenComplete,
|
|
112
117
|
overrides = _this$props.overrides,
|
|
113
118
|
testId = _this$props.testId,
|
|
114
|
-
props = (0, _objectWithoutProperties2.default)(_this$props,
|
|
119
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
|
|
115
120
|
var getOverrides = (0, _utils.createExtender)(defaults, overrides);
|
|
116
121
|
|
|
117
122
|
var _getOverrides = getOverrides('Sidebar'),
|
|
118
123
|
Sidebar = _getOverrides.component,
|
|
119
|
-
sideBarOverrides = (0, _objectWithoutProperties2.default)(_getOverrides,
|
|
124
|
+
sideBarOverrides = (0, _objectWithoutProperties2.default)(_getOverrides, _excluded3);
|
|
120
125
|
|
|
121
126
|
var _getOverrides2 = getOverrides('Content'),
|
|
122
127
|
Content = _getOverrides2.component,
|
|
123
|
-
contentOverrides = (0, _objectWithoutProperties2.default)(_getOverrides2,
|
|
128
|
+
contentOverrides = (0, _objectWithoutProperties2.default)(_getOverrides2, _excluded4);
|
|
124
129
|
|
|
125
130
|
return (0, _core.jsx)(_transitions.Slide, (0, _extends2.default)({
|
|
126
131
|
component: Wrapper,
|
|
@@ -17,11 +17,11 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
var _excluded = ["cssFn"];
|
|
21
21
|
var defaultStyle = {
|
|
22
22
|
alignItems: 'center',
|
|
23
23
|
boxSizing: 'border-box',
|
|
24
|
-
color: "var(--ds-text-
|
|
24
|
+
color: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
25
25
|
display: 'flex',
|
|
26
26
|
flexShrink: 0,
|
|
27
27
|
flexDirection: 'column',
|
|
@@ -37,7 +37,7 @@ var sidebarCSS = function sidebarCSS() {
|
|
|
37
37
|
|
|
38
38
|
var Sidebar = function Sidebar(_ref) {
|
|
39
39
|
var cssFn = _ref.cssFn,
|
|
40
|
-
props = (0, _objectWithoutProperties2.default)(_ref,
|
|
40
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
41
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
42
42
|
return (0, _core.jsx)("div", (0, _extends2.default)({
|
|
43
43
|
css: cssFn(defaultStyle)
|
|
@@ -35,13 +35,16 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
35
35
|
|
|
36
36
|
var _constants2 = require("../constants");
|
|
37
37
|
|
|
38
|
+
var _excluded = ["component", "in", "onExited", "onEntered", "defaultStyles", "transitionStyles", "transitionProps"],
|
|
39
|
+
_excluded2 = ["shouldUnmountOnExit"];
|
|
40
|
+
|
|
38
41
|
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); }
|
|
39
42
|
|
|
40
43
|
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; }
|
|
41
44
|
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
45
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
46
|
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
47
|
+
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; }
|
|
45
48
|
|
|
46
49
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
47
50
|
|
|
@@ -104,7 +107,7 @@ var TransitionHandler = /*#__PURE__*/function (_Component) {
|
|
|
104
107
|
defaultStyles = _this$props.defaultStyles,
|
|
105
108
|
transitionStyles = _this$props.transitionStyles,
|
|
106
109
|
transitionProps = _this$props.transitionProps,
|
|
107
|
-
props = (0, _objectWithoutProperties2.default)(_this$props,
|
|
110
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
108
111
|
var timeout = {
|
|
109
112
|
enter: 0,
|
|
110
113
|
exit: _constants2.transitionDurationMs
|
|
@@ -158,7 +161,7 @@ exports.Fade = Fade;
|
|
|
158
161
|
var Slide = function Slide(_ref2) {
|
|
159
162
|
var _ref2$shouldUnmountOn = _ref2.shouldUnmountOnExit,
|
|
160
163
|
shouldUnmountOnExit = _ref2$shouldUnmountOn === void 0 ? true : _ref2$shouldUnmountOn,
|
|
161
|
-
props = (0, _objectWithoutProperties2.default)(_ref2,
|
|
164
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
162
165
|
return /*#__PURE__*/_react.default.createElement(TransitionHandler, (0, _extends2.default)({
|
|
163
166
|
defaultStyles: {
|
|
164
167
|
transition: "transform ".concat(_constants2.transitionDurationMs, "ms ").concat(_constants2.transitionTimingFunction, ", ") + "width ".concat(_constants2.transitionDurationMs, "ms ").concat(_constants2.transitionTimingFunction),
|
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createExtender = void 0;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
10
|
+
*/
|
|
8
11
|
var createExtender = function createExtender(defaults) {
|
|
9
12
|
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.create(Object.prototype);
|
|
10
13
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -10,7 +10,7 @@ import FocusLock from './focus-lock';
|
|
|
10
10
|
import DrawerPrimitive from './primitives';
|
|
11
11
|
import { Fade } from './transitions';
|
|
12
12
|
const packageName = "@atlaskit/drawer";
|
|
13
|
-
const packageVersion = "7.1.
|
|
13
|
+
const packageVersion = "7.1.4";
|
|
14
14
|
|
|
15
15
|
const OnlyChild = ({
|
|
16
16
|
children
|
|
@@ -19,10 +19,10 @@ const iconButtonStyles = css({
|
|
|
19
19
|
fontSize: 'inherit',
|
|
20
20
|
lineHeight: 1,
|
|
21
21
|
'&:hover': {
|
|
22
|
-
backgroundColor: `var(--ds-background-
|
|
22
|
+
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N30A})`
|
|
23
23
|
},
|
|
24
24
|
'&:active': {
|
|
25
|
-
backgroundColor: `var(--ds-background-
|
|
25
|
+
backgroundColor: `var(--ds-background-neutral-subtle-pressed, ${B50})`,
|
|
26
26
|
outline: 0
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -7,7 +7,7 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
7
7
|
const defaultStyle = {
|
|
8
8
|
alignItems: 'center',
|
|
9
9
|
boxSizing: 'border-box',
|
|
10
|
-
color: `var(--ds-text-
|
|
10
|
+
color: `var(--ds-text-subtle, ${N500})`,
|
|
11
11
|
display: 'flex',
|
|
12
12
|
flexShrink: 0,
|
|
13
13
|
flexDirection: 'column',
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
3
|
+
*/
|
|
1
4
|
export const createExtender = function createExtender(defaults,
|
|
2
5
|
/** We're defaulting to an Object.create call here to circumvent
|
|
3
6
|
* the fact that {} can't be reconciled
|
package/dist/es2019/version.json
CHANGED
|
@@ -21,7 +21,7 @@ import FocusLock from './focus-lock';
|
|
|
21
21
|
import DrawerPrimitive from './primitives';
|
|
22
22
|
import { Fade } from './transitions';
|
|
23
23
|
var packageName = "@atlaskit/drawer";
|
|
24
|
-
var packageVersion = "7.1.
|
|
24
|
+
var packageVersion = "7.1.4";
|
|
25
25
|
|
|
26
26
|
var OnlyChild = function OnlyChild(_ref) {
|
|
27
27
|
var children = _ref.children;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["cssFn"];
|
|
3
4
|
|
|
4
5
|
/** @jsx jsx */
|
|
5
6
|
import { jsx } from '@emotion/core';
|
|
@@ -16,7 +17,7 @@ var contentCSS = function contentCSS() {
|
|
|
16
17
|
|
|
17
18
|
var Content = function Content(_ref) {
|
|
18
19
|
var cssFn = _ref.cssFn,
|
|
19
|
-
props = _objectWithoutProperties(_ref,
|
|
20
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
|
|
21
22
|
return (
|
|
22
23
|
/**
|
|
@@ -19,10 +19,10 @@ var iconButtonStyles = css({
|
|
|
19
19
|
fontSize: 'inherit',
|
|
20
20
|
lineHeight: 1,
|
|
21
21
|
'&:hover': {
|
|
22
|
-
backgroundColor: "var(--ds-background-
|
|
22
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")")
|
|
23
23
|
},
|
|
24
24
|
'&:active': {
|
|
25
|
-
backgroundColor: "var(--ds-background-
|
|
25
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(B50, ")"),
|
|
26
26
|
outline: 0
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -6,14 +6,18 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
6
6
|
import _extends from "@babel/runtime/helpers/extends";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
9
|
+
var _excluded = ["width", "shouldUnmountOnExit", "style"],
|
|
10
|
+
_excluded2 = ["children", "icon", "onClose", "onCloseComplete", "onOpenComplete", "overrides", "testId"],
|
|
11
|
+
_excluded3 = ["component"],
|
|
12
|
+
_excluded4 = ["component"];
|
|
9
13
|
|
|
10
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
15
|
|
|
12
16
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
17
|
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
19
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
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) { _defineProperty(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; }
|
|
17
21
|
|
|
18
22
|
/** @jsx jsx */
|
|
19
23
|
import { Component } from 'react';
|
|
@@ -42,7 +46,7 @@ var wrapperStyles = css({
|
|
|
42
46
|
zIndex: layers.blanket() + 1,
|
|
43
47
|
top: 0,
|
|
44
48
|
left: 0,
|
|
45
|
-
backgroundColor: "var(--ds-
|
|
49
|
+
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
46
50
|
overflow: 'hidden'
|
|
47
51
|
});
|
|
48
52
|
|
|
@@ -51,7 +55,7 @@ var Wrapper = function Wrapper(_ref) {
|
|
|
51
55
|
width = _ref$width === void 0 ? 'narrow' : _ref$width,
|
|
52
56
|
shouldUnmountOnExit = _ref.shouldUnmountOnExit,
|
|
53
57
|
style = _ref.style,
|
|
54
|
-
props = _objectWithoutProperties(_ref,
|
|
58
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
59
|
|
|
56
60
|
return jsx("div", _extends({
|
|
57
61
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
@@ -88,17 +92,17 @@ var DrawerPrimitive = /*#__PURE__*/function (_Component) {
|
|
|
88
92
|
onOpenComplete = _this$props.onOpenComplete,
|
|
89
93
|
overrides = _this$props.overrides,
|
|
90
94
|
testId = _this$props.testId,
|
|
91
|
-
props = _objectWithoutProperties(_this$props,
|
|
95
|
+
props = _objectWithoutProperties(_this$props, _excluded2);
|
|
92
96
|
|
|
93
97
|
var getOverrides = createExtender(defaults, overrides);
|
|
94
98
|
|
|
95
99
|
var _getOverrides = getOverrides('Sidebar'),
|
|
96
100
|
Sidebar = _getOverrides.component,
|
|
97
|
-
sideBarOverrides = _objectWithoutProperties(_getOverrides,
|
|
101
|
+
sideBarOverrides = _objectWithoutProperties(_getOverrides, _excluded3);
|
|
98
102
|
|
|
99
103
|
var _getOverrides2 = getOverrides('Content'),
|
|
100
104
|
Content = _getOverrides2.component,
|
|
101
|
-
contentOverrides = _objectWithoutProperties(_getOverrides2,
|
|
105
|
+
contentOverrides = _objectWithoutProperties(_getOverrides2, _excluded4);
|
|
102
106
|
|
|
103
107
|
return jsx(Slide, _extends({
|
|
104
108
|
component: Wrapper,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["cssFn"];
|
|
3
4
|
|
|
4
5
|
/** @jsx jsx */
|
|
5
6
|
import { jsx } from '@emotion/core';
|
|
@@ -8,7 +9,7 @@ import { gridSize } from '@atlaskit/theme/constants';
|
|
|
8
9
|
var defaultStyle = {
|
|
9
10
|
alignItems: 'center',
|
|
10
11
|
boxSizing: 'border-box',
|
|
11
|
-
color: "var(--ds-text-
|
|
12
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
12
13
|
display: 'flex',
|
|
13
14
|
flexShrink: 0,
|
|
14
15
|
flexDirection: 'column',
|
|
@@ -24,7 +25,7 @@ var sidebarCSS = function sidebarCSS() {
|
|
|
24
25
|
|
|
25
26
|
var Sidebar = function Sidebar(_ref) {
|
|
26
27
|
var cssFn = _ref.cssFn,
|
|
27
|
-
props = _objectWithoutProperties(_ref,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
|
|
29
30
|
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
30
31
|
return jsx("div", _extends({
|
|
@@ -7,10 +7,12 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
+
var _excluded = ["component", "in", "onExited", "onEntered", "defaultStyles", "transitionStyles", "transitionProps"],
|
|
11
|
+
_excluded2 = ["shouldUnmountOnExit"];
|
|
10
12
|
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
14
|
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
15
|
+
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) { _defineProperty(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; }
|
|
14
16
|
|
|
15
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
18
|
|
|
@@ -82,7 +84,7 @@ var TransitionHandler = /*#__PURE__*/function (_Component) {
|
|
|
82
84
|
defaultStyles = _this$props.defaultStyles,
|
|
83
85
|
transitionStyles = _this$props.transitionStyles,
|
|
84
86
|
transitionProps = _this$props.transitionProps,
|
|
85
|
-
props = _objectWithoutProperties(_this$props,
|
|
87
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
86
88
|
|
|
87
89
|
var timeout = {
|
|
88
90
|
enter: 0,
|
|
@@ -136,7 +138,7 @@ export var Fade = function Fade(_ref) {
|
|
|
136
138
|
export var Slide = function Slide(_ref2) {
|
|
137
139
|
var _ref2$shouldUnmountOn = _ref2.shouldUnmountOnExit,
|
|
138
140
|
shouldUnmountOnExit = _ref2$shouldUnmountOn === void 0 ? true : _ref2$shouldUnmountOn,
|
|
139
|
-
props = _objectWithoutProperties(_ref2,
|
|
141
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
140
142
|
|
|
141
143
|
return /*#__PURE__*/React.createElement(TransitionHandler, _extends({
|
|
142
144
|
defaultStyles: {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
3
|
+
*/
|
|
1
4
|
export var createExtender = function createExtender(defaults) {
|
|
2
5
|
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.create(Object.prototype);
|
|
3
6
|
|
package/dist/esm/version.json
CHANGED
|
@@ -31,6 +31,9 @@ export interface BaseProps {
|
|
|
31
31
|
*/
|
|
32
32
|
overrides?: OverridesType;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Please avoid using this type as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
36
|
+
*/
|
|
34
37
|
export declare type DefaultsType = {
|
|
35
38
|
Sidebar: {
|
|
36
39
|
component: React.ComponentType<SidebarProps>;
|
|
@@ -41,6 +44,9 @@ export declare type DefaultsType = {
|
|
|
41
44
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
42
45
|
};
|
|
43
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
49
|
+
*/
|
|
44
50
|
export declare type OverridesType = {
|
|
45
51
|
Sidebar?: {
|
|
46
52
|
component?: React.ComponentType<SidebarProps>;
|
|
@@ -51,13 +57,25 @@ export declare type OverridesType = {
|
|
|
51
57
|
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
52
58
|
};
|
|
53
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated Please avoid using this type as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
62
|
+
*/
|
|
54
63
|
export declare type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Sidebar' | 'Content'>;
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Please avoid using this type as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
66
|
+
*/
|
|
55
67
|
export declare type DrawerPrimitiveOverrides = Pick<OverridesType, 'Sidebar' | 'Content'>;
|
|
56
68
|
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
71
|
+
*/
|
|
57
72
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
58
73
|
}
|
|
59
74
|
export declare type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
60
75
|
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
78
|
+
*/
|
|
61
79
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
62
80
|
}
|
|
63
81
|
export declare type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
declare type OverridesFunc<X extends Record<string, any>, Y extends Record<string, any>> = (key: string) => Record<string, any>;
|
|
2
2
|
export declare type ExtenderType = <D extends Record<string, any>, O extends Record<string, any>>(d: D, o?: O) => OverridesFunc<D, O>;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
5
|
+
*/
|
|
3
6
|
export declare const createExtender: ExtenderType;
|
|
4
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.4",
|
|
4
4
|
"description": "React component the renders a Drawer from the left of the screen",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Design System Team",
|
|
19
19
|
"deprecatedAutoEntryPoints": true,
|
|
20
|
-
"inPublicMirror": true,
|
|
21
20
|
"releaseModel": "scheduled",
|
|
22
21
|
"website": {
|
|
23
22
|
"name": "Drawer"
|
|
@@ -26,25 +25,24 @@
|
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
28
27
|
"@atlaskit/blanket": "^12.1.0",
|
|
29
|
-
"@atlaskit/icon": "^21.
|
|
28
|
+
"@atlaskit/icon": "^21.10.0",
|
|
30
29
|
"@atlaskit/portal": "^4.0.0",
|
|
31
|
-
"@atlaskit/theme": "^12.
|
|
32
|
-
"@atlaskit/tokens": "^0.
|
|
30
|
+
"@atlaskit/theme": "^12.1.0",
|
|
31
|
+
"@atlaskit/tokens": "^0.6.0",
|
|
33
32
|
"@babel/runtime": "^7.0.0",
|
|
34
33
|
"@emotion/core": "^10.0.9",
|
|
35
34
|
"exenv": "^1.2.2",
|
|
36
35
|
"react-focus-lock": "^2.5.2",
|
|
37
36
|
"react-transition-group": "^4.4.1",
|
|
38
|
-
"tiny-invariant": "^
|
|
37
|
+
"tiny-invariant": "^1.2.0"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"react": "^16.8.0"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@atlaskit/build-utils": "*",
|
|
45
43
|
"@atlaskit/button": "^16.0.0",
|
|
46
44
|
"@atlaskit/docs": "*",
|
|
47
|
-
"@atlaskit/dropdown-menu": "^11.
|
|
45
|
+
"@atlaskit/dropdown-menu": "^11.1.0",
|
|
48
46
|
"@atlaskit/menu": "^1.2.0",
|
|
49
47
|
"@atlaskit/section-message": "^6.0.0",
|
|
50
48
|
"@atlaskit/ssr": "*",
|
|
@@ -52,7 +50,7 @@
|
|
|
52
50
|
"@atlaskit/webdriver-runner": "*",
|
|
53
51
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
54
52
|
"enzyme": "^3.10.0",
|
|
55
|
-
"lodash": "^4.17.
|
|
53
|
+
"lodash": "^4.17.21",
|
|
56
54
|
"react-dom": "^16.8.0",
|
|
57
55
|
"react-lorem-component": "^0.13.0",
|
|
58
56
|
"typescript": "3.9.6",
|