@atlaskit/drawer 7.6.5 → 7.7.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 +12 -0
- package/dist/cjs/components/index.js +6 -4
- package/dist/cjs/components/primitives/focus-lock.js +3 -3
- package/dist/cjs/components/primitives/index.js +6 -2
- package/dist/es2019/components/index.js +3 -1
- package/dist/es2019/components/primitives/index.js +4 -2
- package/dist/esm/components/index.js +4 -2
- package/dist/esm/components/primitives/focus-lock.js +1 -1
- package/dist/esm/components/primitives/index.js +5 -2
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/primitives/index.d.ts +1 -1
- package/dist/types/components/types.d.ts +5 -1
- package/dist/types-ts4.5/components/index.d.ts +2 -2
- package/dist/types-ts4.5/components/primitives/index.d.ts +1 -1
- package/dist/types-ts4.5/components/types.d.ts +5 -1
- package/package.json +8 -6
- package/tmp/api-report-tmp.d.ts +0 -147
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#80011](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80011) [`58416dfd477d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/58416dfd477d) - Add closeLabel prop to provide a custom label for the drawer's "Close" control.
|
|
8
|
+
|
|
9
|
+
## 7.6.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#69022](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69022) [`395c74147990`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/395c74147990) - Migrate packages to use declarative entry points
|
|
14
|
+
|
|
3
15
|
## 7.6.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -20,14 +20,14 @@ var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
|
20
20
|
var _constants = require("../constants");
|
|
21
21
|
var _blanket = _interopRequireDefault(require("./blanket"));
|
|
22
22
|
var _primitives = _interopRequireDefault(require("./primitives"));
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
23
|
+
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); }
|
|
24
|
+
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 && Object.prototype.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; }
|
|
25
25
|
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; }
|
|
26
26
|
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; }
|
|
27
27
|
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); }; }
|
|
28
|
-
function _isNativeReflectConstruct() {
|
|
28
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
29
29
|
var packageName = "@atlaskit/drawer";
|
|
30
|
-
var packageVersion = "7.
|
|
30
|
+
var packageVersion = "7.7.0";
|
|
31
31
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
32
32
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
33
33
|
return createAndFireEventOnAtlaskit({
|
|
@@ -119,6 +119,7 @@ var DrawerBase = exports.DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
119
119
|
isOpen = _this$props3.isOpen,
|
|
120
120
|
children = _this$props3.children,
|
|
121
121
|
icon = _this$props3.icon,
|
|
122
|
+
closeLabel = _this$props3.closeLabel,
|
|
122
123
|
width = _this$props3.width,
|
|
123
124
|
shouldUnmountOnExit = _this$props3.shouldUnmountOnExit,
|
|
124
125
|
onCloseComplete = _this$props3.onCloseComplete,
|
|
@@ -140,6 +141,7 @@ var DrawerBase = exports.DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
140
141
|
}), /*#__PURE__*/_react.default.createElement(_primitives.default, {
|
|
141
142
|
testId: testId,
|
|
142
143
|
icon: icon,
|
|
144
|
+
closeLabel: closeLabel,
|
|
143
145
|
in: isOpen,
|
|
144
146
|
onClose: this.handleBackButtonClick,
|
|
145
147
|
onCloseComplete: onCloseComplete,
|
|
@@ -17,12 +17,12 @@ var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
|
|
|
17
17
|
var _reactScrolllock = _interopRequireDefault(require("react-scrolllock"));
|
|
18
18
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
19
19
|
var _constants = require("../../constants");
|
|
20
|
-
function _getRequireWildcardCache(
|
|
21
|
-
function _interopRequireWildcard(
|
|
20
|
+
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); }
|
|
21
|
+
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 && Object.prototype.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; }
|
|
22
22
|
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; }
|
|
23
23
|
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; }
|
|
24
24
|
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); }; }
|
|
25
|
-
function _isNativeReflectConstruct() {
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
26
|
// Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.
|
|
27
27
|
// This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658
|
|
28
28
|
var FocusLock = exports.default = /*#__PURE__*/function (_Component) {
|
|
@@ -22,6 +22,7 @@ var _excluded = ["component"],
|
|
|
22
22
|
/** @jsx jsx */
|
|
23
23
|
// Misc.
|
|
24
24
|
// ------------------------------
|
|
25
|
+
|
|
25
26
|
var defaults = {
|
|
26
27
|
Sidebar: _sidebar.default,
|
|
27
28
|
Content: _content.default
|
|
@@ -54,6 +55,8 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
54
55
|
var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
55
56
|
var children = _ref2.children,
|
|
56
57
|
Icon = _ref2.icon,
|
|
58
|
+
_ref2$closeLabel = _ref2.closeLabel,
|
|
59
|
+
closeLabel = _ref2$closeLabel === void 0 ? 'Close drawer' : _ref2$closeLabel,
|
|
57
60
|
onClose = _ref2.onClose,
|
|
58
61
|
onCloseComplete = _ref2.onCloseComplete,
|
|
59
62
|
onOpenComplete = _ref2.onOpenComplete,
|
|
@@ -106,9 +109,10 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
|
106
109
|
onClick: onClose,
|
|
107
110
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton'
|
|
108
111
|
}, Icon ? (0, _react2.jsx)(Icon, {
|
|
109
|
-
size: "large"
|
|
112
|
+
size: "large",
|
|
113
|
+
label: closeLabel
|
|
110
114
|
}) : (0, _react2.jsx)(_arrowLeft.default, {
|
|
111
|
-
label:
|
|
115
|
+
label: closeLabel
|
|
112
116
|
}))), (0, _react2.jsx)(Content, contentOverrides, children)));
|
|
113
117
|
}));
|
|
114
118
|
};
|
|
@@ -8,7 +8,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
8
8
|
import Blanket from './blanket';
|
|
9
9
|
import DrawerPrimitive from './primitives';
|
|
10
10
|
const packageName = "@atlaskit/drawer";
|
|
11
|
-
const packageVersion = "7.
|
|
11
|
+
const packageVersion = "7.7.0";
|
|
12
12
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
13
13
|
const createAndFireOnClick = (createAnalyticsEvent, trigger) => createAndFireEventOnAtlaskit({
|
|
14
14
|
action: 'dismissed',
|
|
@@ -88,6 +88,7 @@ export class DrawerBase extends Component {
|
|
|
88
88
|
isOpen,
|
|
89
89
|
children,
|
|
90
90
|
icon,
|
|
91
|
+
closeLabel,
|
|
91
92
|
width,
|
|
92
93
|
shouldUnmountOnExit,
|
|
93
94
|
onCloseComplete,
|
|
@@ -109,6 +110,7 @@ export class DrawerBase extends Component {
|
|
|
109
110
|
}), /*#__PURE__*/React.createElement(DrawerPrimitive, {
|
|
110
111
|
testId: testId,
|
|
111
112
|
icon: icon,
|
|
113
|
+
closeLabel: closeLabel,
|
|
112
114
|
in: isOpen,
|
|
113
115
|
onClose: this.handleBackButtonClick,
|
|
114
116
|
onCloseComplete: onCloseComplete,
|
|
@@ -49,6 +49,7 @@ const CustomSlideIn = ({
|
|
|
49
49
|
const DrawerPrimitive = ({
|
|
50
50
|
children,
|
|
51
51
|
icon: Icon,
|
|
52
|
+
closeLabel = 'Close drawer',
|
|
52
53
|
onClose,
|
|
53
54
|
onCloseComplete,
|
|
54
55
|
onOpenComplete,
|
|
@@ -104,9 +105,10 @@ const DrawerPrimitive = ({
|
|
|
104
105
|
onClick: onClose,
|
|
105
106
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton'
|
|
106
107
|
}, Icon ? jsx(Icon, {
|
|
107
|
-
size: "large"
|
|
108
|
+
size: "large",
|
|
109
|
+
label: closeLabel
|
|
108
110
|
}) : jsx(ArrowLeft, {
|
|
109
|
-
label:
|
|
111
|
+
label: closeLabel
|
|
110
112
|
}))), jsx(Content, contentOverrides, children)))));
|
|
111
113
|
};
|
|
112
114
|
|
|
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
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; }
|
|
9
9
|
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) { _defineProperty(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; }
|
|
10
10
|
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
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
13
13
|
import React, { Component } from 'react';
|
|
14
14
|
import { canUseDOM } from 'exenv';
|
|
@@ -18,7 +18,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
18
18
|
import Blanket from './blanket';
|
|
19
19
|
import DrawerPrimitive from './primitives';
|
|
20
20
|
var packageName = "@atlaskit/drawer";
|
|
21
|
-
var packageVersion = "7.
|
|
21
|
+
var packageVersion = "7.7.0";
|
|
22
22
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
23
23
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
24
24
|
return createAndFireEventOnAtlaskit({
|
|
@@ -110,6 +110,7 @@ export var DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
110
110
|
isOpen = _this$props3.isOpen,
|
|
111
111
|
children = _this$props3.children,
|
|
112
112
|
icon = _this$props3.icon,
|
|
113
|
+
closeLabel = _this$props3.closeLabel,
|
|
113
114
|
width = _this$props3.width,
|
|
114
115
|
shouldUnmountOnExit = _this$props3.shouldUnmountOnExit,
|
|
115
116
|
onCloseComplete = _this$props3.onCloseComplete,
|
|
@@ -131,6 +132,7 @@ export var DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
131
132
|
}), /*#__PURE__*/React.createElement(DrawerPrimitive, {
|
|
132
133
|
testId: testId,
|
|
133
134
|
icon: icon,
|
|
135
|
+
closeLabel: closeLabel,
|
|
134
136
|
in: isOpen,
|
|
135
137
|
onClose: this.handleBackButtonClick,
|
|
136
138
|
onCloseComplete: onCloseComplete,
|
|
@@ -7,7 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
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; }
|
|
8
8
|
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) { _defineProperty(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; }
|
|
9
9
|
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); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React, { Component } from 'react';
|
|
12
12
|
import ReactFocusLock from 'react-focus-lock';
|
|
13
13
|
import ScrollLock from 'react-scrolllock';
|
|
@@ -50,6 +50,8 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
50
50
|
var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
51
51
|
var children = _ref2.children,
|
|
52
52
|
Icon = _ref2.icon,
|
|
53
|
+
_ref2$closeLabel = _ref2.closeLabel,
|
|
54
|
+
closeLabel = _ref2$closeLabel === void 0 ? 'Close drawer' : _ref2$closeLabel,
|
|
53
55
|
onClose = _ref2.onClose,
|
|
54
56
|
onCloseComplete = _ref2.onCloseComplete,
|
|
55
57
|
onOpenComplete = _ref2.onOpenComplete,
|
|
@@ -102,9 +104,10 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
|
102
104
|
onClick: onClose,
|
|
103
105
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton'
|
|
104
106
|
}, Icon ? jsx(Icon, {
|
|
105
|
-
size: "large"
|
|
107
|
+
size: "large",
|
|
108
|
+
label: closeLabel
|
|
106
109
|
}) : jsx(ArrowLeft, {
|
|
107
|
-
label:
|
|
110
|
+
label: closeLabel
|
|
108
111
|
}))), jsx(Content, contentOverrides, children)));
|
|
109
112
|
}));
|
|
110
113
|
};
|
|
@@ -22,10 +22,10 @@ export declare class DrawerBase extends Component<DrawerProps, {
|
|
|
22
22
|
handleKeyDown: (event: KeyboardEvent) => void;
|
|
23
23
|
render(): JSX.Element | null;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | keyof import("./types").DrawerLabel> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "closeLabel" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | keyof import("./types").DrawerLabel> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
26
26
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
27
27
|
isFocusLockEnabled?: boolean | undefined;
|
|
28
28
|
shouldReturnFocus?: boolean | undefined;
|
|
29
29
|
width: DrawerWidth;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings | keyof import("./types").DrawerLabel> & React.RefAttributes<any>>;
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "closeLabel" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings | keyof import("./types").DrawerLabel> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { DrawerPrimitiveProps } from '../types';
|
|
4
|
-
declare const DrawerPrimitive: ({ children, icon: Icon, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, label, titleId, }: DrawerPrimitiveProps) => jsx.JSX.Element;
|
|
4
|
+
declare const DrawerPrimitive: ({ children, icon: Icon, closeLabel, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, label, titleId, }: DrawerPrimitiveProps) => jsx.JSX.Element;
|
|
5
5
|
export default DrawerPrimitive;
|
|
@@ -29,9 +29,13 @@ export interface BaseProps {
|
|
|
29
29
|
*/
|
|
30
30
|
children?: ReactNode;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Use this to render an icon for the drawer close/back control, if it's available.
|
|
33
33
|
*/
|
|
34
34
|
icon?: ComponentType<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Provides an accessible name for the close/back control of the drawer. Default is "Close drawer".
|
|
37
|
+
*/
|
|
38
|
+
closeLabel?: string;
|
|
35
39
|
/**
|
|
36
40
|
* Available drawer sizes.
|
|
37
41
|
*/
|
|
@@ -22,10 +22,10 @@ export declare class DrawerBase extends Component<DrawerProps, {
|
|
|
22
22
|
handleKeyDown: (event: KeyboardEvent) => void;
|
|
23
23
|
render(): JSX.Element | null;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | keyof import("./types").DrawerLabel> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "closeLabel" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | keyof import("./types").DrawerLabel> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
26
26
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
27
27
|
isFocusLockEnabled?: boolean | undefined;
|
|
28
28
|
shouldReturnFocus?: boolean | undefined;
|
|
29
29
|
width: DrawerWidth;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings | keyof import("./types").DrawerLabel> & React.RefAttributes<any>>;
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "closeLabel" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings | keyof import("./types").DrawerLabel> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { DrawerPrimitiveProps } from '../types';
|
|
4
|
-
declare const DrawerPrimitive: ({ children, icon: Icon, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, label, titleId, }: DrawerPrimitiveProps) => jsx.JSX.Element;
|
|
4
|
+
declare const DrawerPrimitive: ({ children, icon: Icon, closeLabel, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, label, titleId, }: DrawerPrimitiveProps) => jsx.JSX.Element;
|
|
5
5
|
export default DrawerPrimitive;
|
|
@@ -29,9 +29,13 @@ export interface BaseProps {
|
|
|
29
29
|
*/
|
|
30
30
|
children?: ReactNode;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Use this to render an icon for the drawer close/back control, if it's available.
|
|
33
33
|
*/
|
|
34
34
|
icon?: ComponentType<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Provides an accessible name for the close/back control of the drawer. Default is "Close drawer".
|
|
37
|
+
*/
|
|
38
|
+
closeLabel?: string;
|
|
35
39
|
/**
|
|
36
40
|
* Available drawer sizes.
|
|
37
41
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.7.0",
|
|
4
4
|
"description": "A drawer is a panel that slides in from the left side of the screen.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.tsx",
|
|
27
|
+
"./constants": "./src/constants.tsx"
|
|
28
|
+
},
|
|
25
29
|
"homepage": "https://atlassian.design/components/drawer",
|
|
26
30
|
"atlassian": {
|
|
27
31
|
"team": "Design System Team",
|
|
28
|
-
"deprecatedAutoEntryPoints": true,
|
|
29
32
|
"releaseModel": "continuous",
|
|
30
33
|
"productPushConsumption": [
|
|
31
34
|
"jira"
|
|
@@ -36,13 +39,13 @@
|
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
"dependencies": {
|
|
39
|
-
"@atlaskit/analytics-next": "^9.
|
|
42
|
+
"@atlaskit/analytics-next": "^9.2.0",
|
|
40
43
|
"@atlaskit/blanket": "^13.0.0",
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
44
|
+
"@atlaskit/icon": "^22.1.0",
|
|
42
45
|
"@atlaskit/motion": "^1.5.0",
|
|
43
46
|
"@atlaskit/portal": "^4.4.0",
|
|
44
47
|
"@atlaskit/theme": "^12.6.0",
|
|
45
|
-
"@atlaskit/tokens": "^1.
|
|
48
|
+
"@atlaskit/tokens": "^1.41.0",
|
|
46
49
|
"@babel/runtime": "^7.0.0",
|
|
47
50
|
"@emotion/react": "^11.7.1",
|
|
48
51
|
"bind-event-listener": "^2.1.1",
|
|
@@ -62,7 +65,6 @@
|
|
|
62
65
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
63
66
|
"@atlaskit/ssr": "*",
|
|
64
67
|
"@atlaskit/visual-regression": "*",
|
|
65
|
-
"@atlaskit/webdriver-runner": "*",
|
|
66
68
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
67
69
|
"@testing-library/react": "^12.1.5",
|
|
68
70
|
"@testing-library/user-event": "^14.4.3",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/drawer"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { ComponentType } from 'react';
|
|
8
|
-
import { CSSObject } from '@emotion/react';
|
|
9
|
-
import { default as React_2 } from 'react';
|
|
10
|
-
import { ReactElement } from 'react';
|
|
11
|
-
import { ReactNode } from 'react';
|
|
12
|
-
import { SyntheticEvent } from 'react';
|
|
13
|
-
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
14
|
-
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
15
|
-
|
|
16
|
-
// @public (undocumented)
|
|
17
|
-
export interface BaseProps {
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
icon?: ComponentType<any>;
|
|
20
|
-
onCloseComplete?: (node: HTMLElement | null) => void;
|
|
21
|
-
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
22
|
-
overrides?: OverridesType;
|
|
23
|
-
// @deprecated (undocumented)
|
|
24
|
-
shouldUnmountOnExit?: boolean;
|
|
25
|
-
testId?: string;
|
|
26
|
-
width?: DrawerWidth;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// @public
|
|
30
|
-
export type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
31
|
-
|
|
32
|
-
// @public (undocumented)
|
|
33
|
-
export type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
34
|
-
|
|
35
|
-
// @public (undocumented)
|
|
36
|
-
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
37
|
-
// @deprecated (undocumented)
|
|
38
|
-
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// @public (undocumented)
|
|
42
|
-
const _default: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, "children" | "icon" | "isOpen" | "onClose" | "onCloseComplete" | "onKeyDown" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit" | "testId" | "zIndex" | keyof DrawerLabel> & Partial<Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, "width" | keyof FocusLockSettings>> & Partial<Pick<{
|
|
43
|
-
autoFocusFirstElem?: (() => HTMLElement | null) | boolean | undefined;
|
|
44
|
-
isFocusLockEnabled?: boolean | undefined;
|
|
45
|
-
shouldReturnFocus?: boolean | undefined;
|
|
46
|
-
width: DrawerWidth;
|
|
47
|
-
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "children" | "icon" | "isOpen" | "key" | "onClose" | "onCloseComplete" | "onKeyDown" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit" | "testId" | "width" | "zIndex" | keyof DrawerLabel| keyof FocusLockSettings > & React_2.RefAttributes<any>>;
|
|
48
|
-
export default _default;
|
|
49
|
-
|
|
50
|
-
// @public (undocumented)
|
|
51
|
-
export type DefaultsType = {
|
|
52
|
-
Sidebar: {
|
|
53
|
-
component: React.ComponentType<SidebarProps>;
|
|
54
|
-
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
55
|
-
};
|
|
56
|
-
Content: {
|
|
57
|
-
component: React.ComponentType<ContentProps>;
|
|
58
|
-
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// @public (undocumented)
|
|
63
|
-
interface DrawerLabel {
|
|
64
|
-
label?: string;
|
|
65
|
-
titleId?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// @public (undocumented)
|
|
69
|
-
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Content' | 'Sidebar'>;
|
|
70
|
-
|
|
71
|
-
// @public (undocumented)
|
|
72
|
-
export type DrawerPrimitiveOverrides = Pick<OverridesType, 'Content' | 'Sidebar'>;
|
|
73
|
-
|
|
74
|
-
// @public (undocumented)
|
|
75
|
-
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings, DrawerLabel {
|
|
76
|
-
// (undocumented)
|
|
77
|
-
in: boolean;
|
|
78
|
-
// (undocumented)
|
|
79
|
-
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// @public (undocumented)
|
|
83
|
-
export type DrawerProps = BaseProps & FocusLockSettings & WithAnalyticsEventsProps & DrawerLabel & {
|
|
84
|
-
onKeyDown?: (event: SyntheticEvent) => void;
|
|
85
|
-
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
86
|
-
isOpen: boolean;
|
|
87
|
-
zIndex?: number;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// @public (undocumented)
|
|
91
|
-
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
92
|
-
|
|
93
|
-
// @public (undocumented)
|
|
94
|
-
export interface FocusLockProps extends FocusLockSettings {
|
|
95
|
-
children?: ReactElement;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// @public (undocumented)
|
|
99
|
-
interface FocusLockSettings {
|
|
100
|
-
autoFocusFirstElem?: (() => HTMLElement | null) | boolean;
|
|
101
|
-
isFocusLockEnabled?: boolean;
|
|
102
|
-
shouldReturnFocus?: boolean;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// @public (undocumented)
|
|
106
|
-
export type OverridesType = {
|
|
107
|
-
Sidebar?: {
|
|
108
|
-
component?: React.ComponentType<SidebarProps>;
|
|
109
|
-
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
110
|
-
};
|
|
111
|
-
Content?: {
|
|
112
|
-
component?: React.ComponentType<ContentProps>;
|
|
113
|
-
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
// @public (undocumented)
|
|
118
|
-
export type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
119
|
-
|
|
120
|
-
// @public (undocumented)
|
|
121
|
-
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
122
|
-
// @deprecated (undocumented)
|
|
123
|
-
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// @public (undocumented)
|
|
127
|
-
export type Widths = {
|
|
128
|
-
extended: {
|
|
129
|
-
width: string;
|
|
130
|
-
};
|
|
131
|
-
full: {
|
|
132
|
-
width: string;
|
|
133
|
-
};
|
|
134
|
-
medium: {
|
|
135
|
-
width: number;
|
|
136
|
-
};
|
|
137
|
-
narrow: {
|
|
138
|
-
width: number;
|
|
139
|
-
};
|
|
140
|
-
wide: {
|
|
141
|
-
width: number;
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
// (No @packageDocumentation comment for this package)
|
|
146
|
-
|
|
147
|
-
```
|