@atlaskit/drawer 10.1.5 → 11.0.1
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 +15 -6
- package/dist/cjs/constants.js +2 -7
- package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-close-button.js +1 -1
- package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-content.js +2 -2
- package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-panel.js +1 -1
- package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.js +1 -1
- package/dist/cjs/{compiled/drawer.js → drawer.js} +3 -3
- package/dist/cjs/index.js +29 -3
- package/dist/es2019/constants.js +1 -6
- package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-close-button.js +1 -1
- package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-content.js +2 -2
- package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-panel.js +1 -1
- package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.js +1 -1
- package/dist/es2019/{compiled/drawer.js → drawer.js} +3 -3
- package/dist/es2019/index.js +5 -1
- package/dist/esm/constants.js +1 -6
- package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-close-button.js +1 -1
- package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-content.js +2 -2
- package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-panel.js +1 -1
- package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.js +1 -1
- package/dist/esm/{compiled/drawer.js → drawer.js} +3 -3
- package/dist/esm/index.js +5 -1
- package/dist/types/constants.d.ts +1 -2
- package/dist/types/index.d.ts +6 -2
- package/dist/types/{compiled/types.d.ts → types.d.ts} +1 -2
- package/dist/types-ts4.5/constants.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +6 -2
- package/dist/types-ts4.5/{compiled/types.d.ts → types.d.ts} +1 -2
- package/package.json +7 -26
- package/compiled/package.json +0 -17
- package/dist/cjs/components/blanket.js +0 -62
- package/dist/cjs/components/index.js +0 -148
- package/dist/cjs/components/primitives/content.js +0 -69
- package/dist/cjs/components/primitives/drawer-wrapper.js +0 -90
- package/dist/cjs/components/primitives/focus-lock.js +0 -60
- package/dist/cjs/components/primitives/index.js +0 -125
- package/dist/cjs/components/primitives/sidebar.js +0 -45
- package/dist/cjs/components/types.js +0 -5
- package/dist/cjs/components/utils.js +0 -38
- package/dist/cjs/entry-points/compiled.js +0 -33
- package/dist/es2019/components/blanket.js +0 -53
- package/dist/es2019/components/index.js +0 -129
- package/dist/es2019/components/primitives/content.js +0 -56
- package/dist/es2019/components/primitives/drawer-wrapper.js +0 -86
- package/dist/es2019/components/primitives/focus-lock.js +0 -49
- package/dist/es2019/components/primitives/index.js +0 -113
- package/dist/es2019/components/primitives/sidebar.js +0 -36
- package/dist/es2019/components/utils.js +0 -44
- package/dist/es2019/entry-points/compiled.js +0 -4
- package/dist/esm/compiled/types.js +0 -1
- package/dist/esm/components/blanket.js +0 -54
- package/dist/esm/components/index.js +0 -138
- package/dist/esm/components/primitives/content.js +0 -64
- package/dist/esm/components/primitives/drawer-wrapper.js +0 -82
- package/dist/esm/components/primitives/focus-lock.js +0 -51
- package/dist/esm/components/primitives/index.js +0 -117
- package/dist/esm/components/primitives/sidebar.js +0 -39
- package/dist/esm/components/types.js +0 -1
- package/dist/esm/components/utils.js +0 -32
- package/dist/esm/entry-points/compiled.js +0 -4
- package/dist/types/components/blanket.d.ts +0 -16
- package/dist/types/components/index.d.ts +0 -13
- package/dist/types/components/primitives/content.d.ts +0 -11
- package/dist/types/components/primitives/drawer-wrapper.d.ts +0 -26
- package/dist/types/components/primitives/focus-lock.d.ts +0 -10
- package/dist/types/components/primitives/index.d.ts +0 -4
- package/dist/types/components/primitives/sidebar.d.ts +0 -12
- package/dist/types/components/types.d.ts +0 -172
- package/dist/types/components/utils.d.ts +0 -7
- package/dist/types/entry-points/compiled.d.ts +0 -5
- package/dist/types-ts4.5/components/blanket.d.ts +0 -16
- package/dist/types-ts4.5/components/index.d.ts +0 -13
- package/dist/types-ts4.5/components/primitives/content.d.ts +0 -11
- package/dist/types-ts4.5/components/primitives/drawer-wrapper.d.ts +0 -29
- package/dist/types-ts4.5/components/primitives/focus-lock.d.ts +0 -10
- package/dist/types-ts4.5/components/primitives/index.d.ts +0 -4
- package/dist/types-ts4.5/components/primitives/sidebar.d.ts +0 -12
- package/dist/types-ts4.5/components/types.d.ts +0 -172
- package/dist/types-ts4.5/components/utils.d.ts +0 -7
- package/dist/types-ts4.5/entry-points/compiled.d.ts +0 -5
- /package/dist/cjs/{compiled/blanket.compiled.css → blanket.compiled.css} +0 -0
- /package/dist/cjs/{compiled/blanket.js → blanket.js} +0 -0
- /package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-content.compiled.css +0 -0
- /package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-panel.compiled.css +0 -0
- /package/dist/cjs/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.compiled.css +0 -0
- /package/dist/cjs/{compiled/drawer-panel → drawer-panel}/focus-lock.js +0 -0
- /package/dist/cjs/{hooks → drawer-panel/hooks}/use-prevent-programmatic-scroll.js +0 -0
- /package/dist/cjs/{compiled/types.js → types.js} +0 -0
- /package/dist/es2019/{compiled/blanket.compiled.css → blanket.compiled.css} +0 -0
- /package/dist/es2019/{compiled/blanket.js → blanket.js} +0 -0
- /package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-content.compiled.css +0 -0
- /package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-panel.compiled.css +0 -0
- /package/dist/es2019/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.compiled.css +0 -0
- /package/dist/es2019/{compiled/drawer-panel → drawer-panel}/focus-lock.js +0 -0
- /package/dist/es2019/{hooks → drawer-panel/hooks}/use-prevent-programmatic-scroll.js +0 -0
- /package/dist/es2019/{compiled/types.js → types.js} +0 -0
- /package/dist/esm/{compiled/blanket.compiled.css → blanket.compiled.css} +0 -0
- /package/dist/esm/{compiled/blanket.js → blanket.js} +0 -0
- /package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-content.compiled.css +0 -0
- /package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-panel.compiled.css +0 -0
- /package/dist/esm/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.compiled.css +0 -0
- /package/dist/esm/{compiled/drawer-panel → drawer-panel}/focus-lock.js +0 -0
- /package/dist/esm/{hooks → drawer-panel/hooks}/use-prevent-programmatic-scroll.js +0 -0
- /package/dist/{es2019/components → esm}/types.js +0 -0
- /package/dist/types/{compiled/blanket.d.ts → blanket.d.ts} +0 -0
- /package/dist/types/{compiled/drawer-panel → drawer-panel}/drawer-close-button.d.ts +0 -0
- /package/dist/types/{compiled/drawer-panel → drawer-panel}/drawer-content.d.ts +0 -0
- /package/dist/types/{compiled/drawer-panel → drawer-panel}/drawer-panel.d.ts +0 -0
- /package/dist/types/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.d.ts +0 -0
- /package/dist/types/{compiled/drawer-panel → drawer-panel}/focus-lock.d.ts +0 -0
- /package/dist/types/{hooks → drawer-panel/hooks}/use-prevent-programmatic-scroll.d.ts +0 -0
- /package/dist/types/{compiled/drawer.d.ts → drawer.d.ts} +0 -0
- /package/dist/types-ts4.5/{compiled/blanket.d.ts → blanket.d.ts} +0 -0
- /package/dist/types-ts4.5/{compiled/drawer-panel → drawer-panel}/drawer-close-button.d.ts +0 -0
- /package/dist/types-ts4.5/{compiled/drawer-panel → drawer-panel}/drawer-content.d.ts +0 -0
- /package/dist/types-ts4.5/{compiled/drawer-panel → drawer-panel}/drawer-panel.d.ts +0 -0
- /package/dist/types-ts4.5/{compiled/drawer-panel → drawer-panel}/drawer-sidebar.d.ts +0 -0
- /package/dist/types-ts4.5/{compiled/drawer-panel → drawer-panel}/focus-lock.d.ts +0 -0
- /package/dist/types-ts4.5/{hooks → drawer-panel/hooks}/use-prevent-programmatic-scroll.d.ts +0 -0
- /package/dist/types-ts4.5/{compiled/drawer.d.ts → drawer.d.ts} +0 -0
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
2
|
-
import React, { useCallback, useEffect } from 'react';
|
|
3
|
-
import { canUseDOM } from 'exenv';
|
|
4
|
-
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
5
|
-
import { Layering, useCloseOnEscapePress } from '@atlaskit/layering';
|
|
6
|
-
import Portal from '@atlaskit/portal';
|
|
7
|
-
import Blanket from './blanket';
|
|
8
|
-
import DrawerPrimitive from './primitives';
|
|
9
|
-
// escape close manager for layering
|
|
10
|
-
var EscapeCloseManager = function EscapeCloseManager(_ref) {
|
|
11
|
-
var onClose = _ref.onClose;
|
|
12
|
-
// wrap so that we can cast the event to a React.KeyboardEvent
|
|
13
|
-
var handleClose = useCallback(function (evt) {
|
|
14
|
-
onClose && onClose(evt);
|
|
15
|
-
}, [onClose]);
|
|
16
|
-
useCloseOnEscapePress({
|
|
17
|
-
onClose: handleClose
|
|
18
|
-
});
|
|
19
|
-
return /*#__PURE__*/React.createElement("span", null);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* __Drawer__
|
|
24
|
-
*
|
|
25
|
-
* A drawer is a panel that slides in from the left side of the screen.
|
|
26
|
-
*
|
|
27
|
-
* - [Examples](https://atlassian.design/components/drawer/examples)
|
|
28
|
-
* - [Code](https://atlassian.design/components/drawer/code)
|
|
29
|
-
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
30
|
-
*/
|
|
31
|
-
var Drawer = function Drawer(_ref2) {
|
|
32
|
-
var _ref2$width = _ref2.width,
|
|
33
|
-
width = _ref2$width === void 0 ? 'narrow' : _ref2$width,
|
|
34
|
-
isOpen = _ref2.isOpen,
|
|
35
|
-
_ref2$isFocusLockEnab = _ref2.isFocusLockEnabled,
|
|
36
|
-
isFocusLockEnabled = _ref2$isFocusLockEnab === void 0 ? true : _ref2$isFocusLockEnab,
|
|
37
|
-
_ref2$shouldReturnFoc = _ref2.shouldReturnFocus,
|
|
38
|
-
shouldReturnFocus = _ref2$shouldReturnFoc === void 0 ? true : _ref2$shouldReturnFoc,
|
|
39
|
-
_ref2$autoFocusFirstE = _ref2.autoFocusFirstElem,
|
|
40
|
-
autoFocusFirstElem = _ref2$autoFocusFirstE === void 0 ? true : _ref2$autoFocusFirstE,
|
|
41
|
-
onKeyDown = _ref2.onKeyDown,
|
|
42
|
-
onClose = _ref2.onClose,
|
|
43
|
-
testId = _ref2.testId,
|
|
44
|
-
children = _ref2.children,
|
|
45
|
-
icon = _ref2.icon,
|
|
46
|
-
closeLabel = _ref2.closeLabel,
|
|
47
|
-
scrollContentLabel = _ref2.scrollContentLabel,
|
|
48
|
-
onCloseComplete = _ref2.onCloseComplete,
|
|
49
|
-
onOpenComplete = _ref2.onOpenComplete,
|
|
50
|
-
overrides = _ref2.overrides,
|
|
51
|
-
_ref2$zIndex = _ref2.zIndex,
|
|
52
|
-
zIndex = _ref2$zIndex === void 0 ? 'unset' : _ref2$zIndex,
|
|
53
|
-
label = _ref2.label,
|
|
54
|
-
titleId = _ref2.titleId,
|
|
55
|
-
enterFrom = _ref2.enterFrom;
|
|
56
|
-
var body = canUseDOM ? document.querySelector('body') : undefined;
|
|
57
|
-
var handleClose = usePlatformLeafEventHandler({
|
|
58
|
-
fn: function fn(evt, analyticsEvent) {
|
|
59
|
-
return onClose && onClose(evt, analyticsEvent);
|
|
60
|
-
},
|
|
61
|
-
action: 'dismissed',
|
|
62
|
-
componentName: 'drawer',
|
|
63
|
-
packageName: "@atlaskit/drawer",
|
|
64
|
-
packageVersion: "10.1.5",
|
|
65
|
-
analyticsData: {
|
|
66
|
-
trigger: 'escKey'
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
var handleKeyDown = useCallback(function (evt) {
|
|
70
|
-
onKeyDown && onKeyDown(evt);
|
|
71
|
-
}, [onKeyDown]);
|
|
72
|
-
useEffect(function () {
|
|
73
|
-
if (isOpen) {
|
|
74
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
75
|
-
}
|
|
76
|
-
return function () {
|
|
77
|
-
window.removeEventListener('keydown', handleKeyDown);
|
|
78
|
-
};
|
|
79
|
-
}, [handleKeyDown, isOpen]);
|
|
80
|
-
var handleBlanketClick = usePlatformLeafEventHandler({
|
|
81
|
-
fn: function fn(evt, analyticsEvent) {
|
|
82
|
-
return onClose && onClose(evt, analyticsEvent);
|
|
83
|
-
},
|
|
84
|
-
action: 'dismissed',
|
|
85
|
-
componentName: 'drawer',
|
|
86
|
-
packageName: "@atlaskit/drawer",
|
|
87
|
-
packageVersion: "10.1.5",
|
|
88
|
-
analyticsData: {
|
|
89
|
-
trigger: 'blanket'
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
var handleBackButtonClick = usePlatformLeafEventHandler({
|
|
93
|
-
fn: function fn(evt, analyticsEvent) {
|
|
94
|
-
return onClose && onClose(evt, analyticsEvent);
|
|
95
|
-
},
|
|
96
|
-
action: 'dismissed',
|
|
97
|
-
componentName: 'drawer',
|
|
98
|
-
packageName: "@atlaskit/drawer",
|
|
99
|
-
packageVersion: "10.1.5",
|
|
100
|
-
analyticsData: {
|
|
101
|
-
trigger: 'backButton'
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
if (!body) {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
return /*#__PURE__*/React.createElement(Portal, {
|
|
108
|
-
zIndex: zIndex
|
|
109
|
-
}, /*#__PURE__*/React.createElement(Blanket, {
|
|
110
|
-
isOpen: isOpen,
|
|
111
|
-
onBlanketClicked: handleBlanketClick,
|
|
112
|
-
testId: testId && "".concat(testId, "--blanket")
|
|
113
|
-
}), /*#__PURE__*/React.createElement(DrawerPrimitive, {
|
|
114
|
-
testId: testId,
|
|
115
|
-
icon: icon,
|
|
116
|
-
closeLabel: closeLabel,
|
|
117
|
-
in: isOpen,
|
|
118
|
-
onClose: handleBackButtonClick,
|
|
119
|
-
onCloseComplete: onCloseComplete,
|
|
120
|
-
onOpenComplete: onOpenComplete,
|
|
121
|
-
width: width,
|
|
122
|
-
enterFrom: enterFrom,
|
|
123
|
-
label: label,
|
|
124
|
-
titleId: titleId
|
|
125
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
126
|
-
,
|
|
127
|
-
overrides: overrides,
|
|
128
|
-
autoFocusFirstElem: autoFocusFirstElem,
|
|
129
|
-
isFocusLockEnabled: isFocusLockEnabled,
|
|
130
|
-
shouldReturnFocus: shouldReturnFocus,
|
|
131
|
-
scrollContentLabel: scrollContentLabel
|
|
132
|
-
}, isOpen ? /*#__PURE__*/React.createElement(Layering, {
|
|
133
|
-
isDisabled: false
|
|
134
|
-
}, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
|
|
135
|
-
onClose: handleClose
|
|
136
|
-
})) : children));
|
|
137
|
-
};
|
|
138
|
-
export default Drawer;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["cssFn", "scrollContentLabel"];
|
|
5
|
-
/**
|
|
6
|
-
* @jsxRuntime classic
|
|
7
|
-
* @jsx jsx
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { useEffect, useRef, useState } from 'react';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
import { css, jsx } from '@emotion/react';
|
|
14
|
-
var defaultStyles = {
|
|
15
|
-
flex: 1,
|
|
16
|
-
overflow: 'auto',
|
|
17
|
-
marginTop: "var(--ds-space-300, 24px)"
|
|
18
|
-
};
|
|
19
|
-
var contentCSS = function contentCSS() {
|
|
20
|
-
return defaultStyles;
|
|
21
|
-
};
|
|
22
|
-
var Content = function Content(_ref) {
|
|
23
|
-
var cssFn = _ref.cssFn,
|
|
24
|
-
_ref$scrollContentLab = _ref.scrollContentLabel,
|
|
25
|
-
scrollContentLabel = _ref$scrollContentLab === void 0 ? 'Scrollable content' : _ref$scrollContentLab,
|
|
26
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
var _useState = useState(false),
|
|
28
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
-
showContentFocus = _useState2[0],
|
|
30
|
-
setContentFocus = _useState2[1];
|
|
31
|
-
var scrollableRef = useRef(null);
|
|
32
|
-
useEffect(function () {
|
|
33
|
-
var setLazyContentFocus = function setLazyContentFocus() {
|
|
34
|
-
var target = scrollableRef.current;
|
|
35
|
-
target && setContentFocus(target.scrollHeight > target.clientHeight);
|
|
36
|
-
};
|
|
37
|
-
setLazyContentFocus();
|
|
38
|
-
}, []);
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* I noticed the implementation at @atlaskit/checkbox would send the props to cssFn rather
|
|
42
|
-
* than the defaultStyles as the overrides guide suggests. I went with what the overrides
|
|
43
|
-
* guide suggested as it made more sense as a transformer of the current styles rather than
|
|
44
|
-
* a complete override with no chance of partially changing styles.
|
|
45
|
-
*/
|
|
46
|
-
return jsx("div", _extends({
|
|
47
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
|
-
css: css(cssFn(defaultStyles)),
|
|
49
|
-
ref: scrollableRef
|
|
50
|
-
// tabindex is allowed here so that keyboard users can scroll content
|
|
51
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
52
|
-
,
|
|
53
|
-
tabIndex: showContentFocus ? 0 : undefined,
|
|
54
|
-
role: showContentFocus ? 'region' : undefined,
|
|
55
|
-
"aria-label": showContentFocus ? scrollContentLabel : undefined,
|
|
56
|
-
"data-testid": "drawer-contents"
|
|
57
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
58
|
-
}, props));
|
|
59
|
-
};
|
|
60
|
-
var contentDefaults = {
|
|
61
|
-
component: Content,
|
|
62
|
-
cssFn: contentCSS
|
|
63
|
-
};
|
|
64
|
-
export default contentDefaults;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
import { forwardRef, useCallback } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { useMergeRefs } from 'use-callback-ref';
|
|
11
|
-
import { N0 } from '@atlaskit/theme/colors';
|
|
12
|
-
import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
|
|
13
|
-
import usePreventProgrammaticScroll from '../../hooks/use-prevent-programmatic-scroll';
|
|
14
|
-
export var wrapperWidth = {
|
|
15
|
-
full: {
|
|
16
|
-
width: '100vw'
|
|
17
|
-
},
|
|
18
|
-
extended: {
|
|
19
|
-
width: '95vw'
|
|
20
|
-
},
|
|
21
|
-
narrow: {
|
|
22
|
-
width: 360
|
|
23
|
-
},
|
|
24
|
-
medium: {
|
|
25
|
-
width: 480
|
|
26
|
-
},
|
|
27
|
-
wide: {
|
|
28
|
-
width: 600
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
var wrapperStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
32
|
-
display: 'flex',
|
|
33
|
-
height: '100vh',
|
|
34
|
-
position: 'fixed',
|
|
35
|
-
zIndex: 500,
|
|
36
|
-
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")")
|
|
37
|
-
}, CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(N0, ")")), "fontFamily", "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"), "insetBlockStart", 0), "insetInlineStart", 0), "overflow", 'hidden'));
|
|
38
|
-
/**
|
|
39
|
-
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
40
|
-
*/
|
|
41
|
-
var DrawerWrapper = /*#__PURE__*/forwardRef(function (_ref, scrollRef) {
|
|
42
|
-
var children = _ref.children,
|
|
43
|
-
className = _ref.className,
|
|
44
|
-
_ref$width = _ref.width,
|
|
45
|
-
width = _ref$width === void 0 ? 'narrow' : _ref$width,
|
|
46
|
-
testId = _ref.testId,
|
|
47
|
-
drawerRef = _ref.drawerRef,
|
|
48
|
-
label = _ref.label,
|
|
49
|
-
titleId = _ref.titleId;
|
|
50
|
-
/**
|
|
51
|
-
* We use a callback ref to assign the `<Content />` component to the forwarded `scrollRef`.
|
|
52
|
-
* This ref comes from `react-scrolllock` to allow touch scrolling, eg.: `<ScrollLock><TouchScrollable>{children}</TouchScrollable><ScrollLock>`
|
|
53
|
-
*
|
|
54
|
-
* This is because we do not control the `<Content />` component in order to forward a ref to it (given it can be overriden via `DrawerPrimitiveProps['overrides']['Content']['component']`).
|
|
55
|
-
* Additionally, we target the last child because with `props.overrides.Sidebar.component = () => null` you only have one child.
|
|
56
|
-
* If both `Sidebar.component` and `Content.component` return null you will have no children and this will throw an error, but that doesn't seem valid.
|
|
57
|
-
*/
|
|
58
|
-
var assignSecondChildRef = useCallback(function (node) {
|
|
59
|
-
var _node$children;
|
|
60
|
-
if (node !== null && node !== void 0 && (_node$children = node.children) !== null && _node$children !== void 0 && _node$children.length && typeof scrollRef === 'function') {
|
|
61
|
-
scrollRef(node.children[node.children.length - 1]);
|
|
62
|
-
}
|
|
63
|
-
}, [scrollRef]);
|
|
64
|
-
var ref = useMergeRefs([drawerRef, assignSecondChildRef]);
|
|
65
|
-
usePreventProgrammaticScroll();
|
|
66
|
-
return jsx("div", {
|
|
67
|
-
css: wrapperStyles
|
|
68
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
69
|
-
,
|
|
70
|
-
style: wrapperWidth[width]
|
|
71
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
|
-
,
|
|
73
|
-
className: className,
|
|
74
|
-
"data-testid": testId,
|
|
75
|
-
ref: ref,
|
|
76
|
-
"aria-modal": true,
|
|
77
|
-
role: "dialog",
|
|
78
|
-
"aria-label": label,
|
|
79
|
-
"aria-labelledby": titleId
|
|
80
|
-
}, children);
|
|
81
|
-
});
|
|
82
|
-
export default DrawerWrapper;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import ReactFocusLock from 'react-focus-lock';
|
|
3
|
-
import ScrollLock from 'react-scrolllock';
|
|
4
|
-
import invariant from 'tiny-invariant';
|
|
5
|
-
/**
|
|
6
|
-
* __Focus lock__
|
|
7
|
-
*
|
|
8
|
-
* Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.
|
|
9
|
-
* This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658
|
|
10
|
-
*/
|
|
11
|
-
var FocusLock = function FocusLock(_ref) {
|
|
12
|
-
var _ref$isFocusLockEnabl = _ref.isFocusLockEnabled,
|
|
13
|
-
isFocusLockEnabled = _ref$isFocusLockEnabl === void 0 ? true : _ref$isFocusLockEnabl,
|
|
14
|
-
_ref$autoFocusFirstEl = _ref.autoFocusFirstElem,
|
|
15
|
-
autoFocusFirstElem = _ref$autoFocusFirstEl === void 0 ? true : _ref$autoFocusFirstEl,
|
|
16
|
-
_ref$shouldReturnFocu = _ref.shouldReturnFocus,
|
|
17
|
-
shouldReturnFocus = _ref$shouldReturnFocu === void 0 ? true : _ref$shouldReturnFocu,
|
|
18
|
-
children = _ref.children;
|
|
19
|
-
useEffect(function () {
|
|
20
|
-
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
21
|
-
invariant(typeof autoFocusFirstElem === 'boolean', '@atlaskit/drawer: Passing a function as autoFocus is deprecated. Instead call focus on the element ref or use the autofocus property.');
|
|
22
|
-
}
|
|
23
|
-
if (typeof autoFocusFirstElem === 'function' && isFocusLockEnabled) {
|
|
24
|
-
var elem = autoFocusFirstElem();
|
|
25
|
-
if (elem && elem.focus) {
|
|
26
|
-
elem.focus();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}, [autoFocusFirstElem, isFocusLockEnabled]);
|
|
30
|
-
var getFocusTarget = function getFocusTarget() {
|
|
31
|
-
if (typeof shouldReturnFocus === 'boolean') {
|
|
32
|
-
return shouldReturnFocus;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
};
|
|
36
|
-
var onDeactivation = function onDeactivation() {
|
|
37
|
-
if (typeof shouldReturnFocus !== 'boolean') {
|
|
38
|
-
window.setTimeout(function () {
|
|
39
|
-
var _shouldReturnFocus$cu;
|
|
40
|
-
shouldReturnFocus === null || shouldReturnFocus === void 0 || (_shouldReturnFocus$cu = shouldReturnFocus.current) === null || _shouldReturnFocus$cu === void 0 || _shouldReturnFocus$cu.focus();
|
|
41
|
-
}, 0);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return /*#__PURE__*/React.createElement(ReactFocusLock, {
|
|
45
|
-
disabled: !isFocusLockEnabled,
|
|
46
|
-
autoFocus: !!autoFocusFirstElem,
|
|
47
|
-
returnFocus: getFocusTarget(),
|
|
48
|
-
onDeactivation: onDeactivation
|
|
49
|
-
}, /*#__PURE__*/React.createElement(ScrollLock, null, children));
|
|
50
|
-
};
|
|
51
|
-
export default FocusLock;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["component"],
|
|
4
|
-
_excluded2 = ["component"];
|
|
5
|
-
import React, { useCallback, useRef } from 'react';
|
|
6
|
-
import { IconButton } from '@atlaskit/button/new';
|
|
7
|
-
import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
8
|
-
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
9
|
-
import { createExtender } from '../utils';
|
|
10
|
-
import ContentOverrides from './content';
|
|
11
|
-
import DrawerWrapper from './drawer-wrapper';
|
|
12
|
-
import FocusLock from './focus-lock';
|
|
13
|
-
import SidebarOverrides from './sidebar';
|
|
14
|
-
|
|
15
|
-
// Misc.
|
|
16
|
-
// ------------------------------
|
|
17
|
-
|
|
18
|
-
var defaults = {
|
|
19
|
-
Sidebar: SidebarOverrides,
|
|
20
|
-
Content: ContentOverrides
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* This wrapper is used to specify separate durations for enter and exit.
|
|
25
|
-
*/
|
|
26
|
-
var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
27
|
-
var children = _ref.children,
|
|
28
|
-
onFinish = _ref.onFinish,
|
|
29
|
-
enterFrom = _ref.enterFrom;
|
|
30
|
-
return /*#__PURE__*/React.createElement(SlideIn, {
|
|
31
|
-
animationTimingFunction: "ease-out",
|
|
32
|
-
duration: "small",
|
|
33
|
-
enterFrom: enterFrom,
|
|
34
|
-
exitTo: enterFrom,
|
|
35
|
-
fade: "none",
|
|
36
|
-
onFinish: onFinish
|
|
37
|
-
}, children);
|
|
38
|
-
};
|
|
39
|
-
var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
40
|
-
var children = _ref2.children,
|
|
41
|
-
Icon = _ref2.icon,
|
|
42
|
-
_ref2$closeLabel = _ref2.closeLabel,
|
|
43
|
-
closeLabel = _ref2$closeLabel === void 0 ? 'Close drawer' : _ref2$closeLabel,
|
|
44
|
-
scrollContentLabel = _ref2.scrollContentLabel,
|
|
45
|
-
onClose = _ref2.onClose,
|
|
46
|
-
onCloseComplete = _ref2.onCloseComplete,
|
|
47
|
-
onOpenComplete = _ref2.onOpenComplete,
|
|
48
|
-
overrides = _ref2.overrides,
|
|
49
|
-
testId = _ref2.testId,
|
|
50
|
-
isOpen = _ref2.in,
|
|
51
|
-
shouldReturnFocus = _ref2.shouldReturnFocus,
|
|
52
|
-
autoFocusFirstElem = _ref2.autoFocusFirstElem,
|
|
53
|
-
isFocusLockEnabled = _ref2.isFocusLockEnabled,
|
|
54
|
-
width = _ref2.width,
|
|
55
|
-
label = _ref2.label,
|
|
56
|
-
titleId = _ref2.titleId,
|
|
57
|
-
_ref2$enterFrom = _ref2.enterFrom,
|
|
58
|
-
enterFrom = _ref2$enterFrom === void 0 ? 'left' : _ref2$enterFrom;
|
|
59
|
-
var getOverrides = createExtender(defaults, overrides);
|
|
60
|
-
var _getOverrides = getOverrides('Sidebar'),
|
|
61
|
-
Sidebar = _getOverrides.component,
|
|
62
|
-
sideBarOverrides = _objectWithoutProperties(_getOverrides, _excluded);
|
|
63
|
-
var _getOverrides2 = getOverrides('Content'),
|
|
64
|
-
Content = _getOverrides2.component,
|
|
65
|
-
contentOverrides = _objectWithoutProperties(_getOverrides2, _excluded2);
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* A ref to point to our wrapper, passed to `onCloseComplete` and `onOpenComplete` callbacks.
|
|
69
|
-
*/
|
|
70
|
-
var drawerRef = useRef(null);
|
|
71
|
-
var onFinish = useCallback(function (state) {
|
|
72
|
-
if (state === 'entering') {
|
|
73
|
-
onOpenComplete === null || onOpenComplete === void 0 || onOpenComplete(drawerRef.current);
|
|
74
|
-
} else if (state === 'exiting') {
|
|
75
|
-
onCloseComplete === null || onCloseComplete === void 0 || onCloseComplete(drawerRef.current);
|
|
76
|
-
}
|
|
77
|
-
}, [onCloseComplete, onOpenComplete]);
|
|
78
|
-
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
79
|
-
appear: true
|
|
80
|
-
}, isOpen && /*#__PURE__*/React.createElement(CustomSlideIn, {
|
|
81
|
-
onFinish: onFinish,
|
|
82
|
-
enterFrom: enterFrom
|
|
83
|
-
}, function (_ref3) {
|
|
84
|
-
var className = _ref3.className;
|
|
85
|
-
return /*#__PURE__*/React.createElement(FocusLock, {
|
|
86
|
-
autoFocusFirstElem: autoFocusFirstElem,
|
|
87
|
-
isFocusLockEnabled: isFocusLockEnabled,
|
|
88
|
-
shouldReturnFocus: shouldReturnFocus
|
|
89
|
-
}, /*#__PURE__*/React.createElement(DrawerWrapper
|
|
90
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
91
|
-
, {
|
|
92
|
-
className: className,
|
|
93
|
-
width: width,
|
|
94
|
-
testId: testId,
|
|
95
|
-
drawerRef: drawerRef,
|
|
96
|
-
label: label,
|
|
97
|
-
titleId: titleId
|
|
98
|
-
}, /*#__PURE__*/React.createElement(Sidebar, sideBarOverrides, /*#__PURE__*/React.createElement(IconButton, {
|
|
99
|
-
onClick: onClose,
|
|
100
|
-
testId: testId && 'DrawerPrimitiveSidebarCloseButton',
|
|
101
|
-
icon: Icon ? function (iconProps) {
|
|
102
|
-
return /*#__PURE__*/React.createElement(Icon, _extends({}, iconProps, {
|
|
103
|
-
size: "large",
|
|
104
|
-
LEGACY_size: "large"
|
|
105
|
-
}));
|
|
106
|
-
} : ArrowLeft,
|
|
107
|
-
label: closeLabel,
|
|
108
|
-
shape: "circle",
|
|
109
|
-
appearance: "subtle"
|
|
110
|
-
})), /*#__PURE__*/React.createElement(Content, _extends({
|
|
111
|
-
scrollContentLabel: scrollContentLabel
|
|
112
|
-
}, contentOverrides), children)));
|
|
113
|
-
}));
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
117
|
-
export default DrawerPrimitive;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["cssFn"];
|
|
4
|
-
/**
|
|
5
|
-
* @jsxRuntime classic
|
|
6
|
-
* @jsx jsx
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { N500 } from '@atlaskit/theme/colors';
|
|
12
|
-
var defaultStyle = {
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
boxSizing: 'border-box',
|
|
15
|
-
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
16
|
-
display: 'flex',
|
|
17
|
-
flexShrink: 0,
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
height: '100vh',
|
|
20
|
-
paddingBottom: "var(--ds-space-200, 16px)",
|
|
21
|
-
paddingTop: "var(--ds-space-300, 24px)",
|
|
22
|
-
width: "var(--ds-space-800, 64px)"
|
|
23
|
-
};
|
|
24
|
-
var sidebarCSS = function sidebarCSS() {
|
|
25
|
-
return defaultStyle;
|
|
26
|
-
};
|
|
27
|
-
var Sidebar = function Sidebar(_ref) {
|
|
28
|
-
var cssFn = _ref.cssFn,
|
|
29
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
|
-
return jsx("div", _extends({
|
|
32
|
-
css: css(cssFn(defaultStyle))
|
|
33
|
-
}, props));
|
|
34
|
-
};
|
|
35
|
-
var sidebarDefaults = {
|
|
36
|
-
component: Sidebar,
|
|
37
|
-
cssFn: sidebarCSS
|
|
38
|
-
};
|
|
39
|
-
export default sidebarDefaults;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
2
|
-
|
|
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
|
-
*/
|
|
6
|
-
export var createExtender = function createExtender(defaults) {
|
|
7
|
-
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.create(Object.prototype);
|
|
8
|
-
if (!defaults) {
|
|
9
|
-
throw new Error('a default set of overrides *must* be passed in as the first argument');
|
|
10
|
-
}
|
|
11
|
-
return function getOverrides(key) {
|
|
12
|
-
var _defaults$key = defaults[key],
|
|
13
|
-
defaultCssFn = _defaults$key.cssFn,
|
|
14
|
-
defaultComponent = _defaults$key.component;
|
|
15
|
-
if (!overrides[key]) {
|
|
16
|
-
return {
|
|
17
|
-
cssFn: defaultCssFn,
|
|
18
|
-
component: defaultComponent
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
var _overrides$key = overrides[key],
|
|
22
|
-
customCssFn = _overrides$key.cssFn,
|
|
23
|
-
customComponent = _overrides$key.component;
|
|
24
|
-
var composedCssFn = function composedCssFn(state) {
|
|
25
|
-
return customCssFn(defaultCssFn(state), state);
|
|
26
|
-
};
|
|
27
|
-
return {
|
|
28
|
-
cssFn: customCssFn ? composedCssFn : defaultCssFn,
|
|
29
|
-
component: customComponent || defaultComponent
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { Drawer } from '../compiled/drawer';
|
|
2
|
-
export { DrawerContent } from '../compiled/drawer-panel/drawer-content';
|
|
3
|
-
export { DrawerSidebar } from '../compiled/drawer-panel/drawer-sidebar';
|
|
4
|
-
export { DrawerCloseButton } from '../compiled/drawer-panel/drawer-close-button';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
type BlanketProps = {
|
|
8
|
-
isOpen: boolean;
|
|
9
|
-
onBlanketClicked: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
10
|
-
testId?: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
14
|
-
*/
|
|
15
|
-
declare const Blanket: ({ isOpen, onBlanketClicked, testId }: BlanketProps) => jsx.JSX.Element;
|
|
16
|
-
export default Blanket;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type DrawerProps } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* __Drawer__
|
|
5
|
-
*
|
|
6
|
-
* A drawer is a panel that slides in from the left side of the screen.
|
|
7
|
-
*
|
|
8
|
-
* - [Examples](https://atlassian.design/components/drawer/examples)
|
|
9
|
-
* - [Code](https://atlassian.design/components/drawer/code)
|
|
10
|
-
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
11
|
-
*/
|
|
12
|
-
declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, onClose, testId, children, icon, closeLabel, scrollContentLabel, onCloseComplete, onOpenComplete, overrides, zIndex, label, titleId, enterFrom, }: DrawerProps) => React.JSX.Element | null;
|
|
13
|
-
export default Drawer;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type CSSObject, jsx } from '@emotion/react';
|
|
6
|
-
import { type ContentProps } from '../types';
|
|
7
|
-
declare const contentDefaults: {
|
|
8
|
-
component: ({ cssFn, scrollContentLabel, ...props }: ContentProps) => jsx.JSX.Element;
|
|
9
|
-
cssFn: () => CSSObject;
|
|
10
|
-
};
|
|
11
|
-
export default contentDefaults;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ReactElement, type Ref } from 'react';
|
|
6
|
-
import { type DrawerPrimitiveProps, type Widths } from '../types';
|
|
7
|
-
export declare const wrapperWidth: Widths;
|
|
8
|
-
interface FocusLockRefTargetProps extends Pick<DrawerPrimitiveProps, 'width' | 'testId' | 'label' | 'titleId'> {
|
|
9
|
-
/**
|
|
10
|
-
* This must have two children explicitly as we target the second child as the Content.
|
|
11
|
-
*/
|
|
12
|
-
children: [ReactElement, ReactElement];
|
|
13
|
-
/**
|
|
14
|
-
* A ref pointing to our drawer wrapper, passed to `onCloseComplete` and `onOpenComplete` callbacks.
|
|
15
|
-
*/
|
|
16
|
-
drawerRef: Ref<HTMLDivElement>;
|
|
17
|
-
/**
|
|
18
|
-
* The className coming from the SlideIn render callback.
|
|
19
|
-
*/
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
24
|
-
*/
|
|
25
|
-
declare const DrawerWrapper: import("react").ForwardRefExoticComponent<FocusLockRefTargetProps & import("react").RefAttributes<HTMLElement>>;
|
|
26
|
-
export default DrawerWrapper;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FocusLockProps } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* __Focus lock__
|
|
5
|
-
*
|
|
6
|
-
* Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.
|
|
7
|
-
* This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658
|
|
8
|
-
*/
|
|
9
|
-
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => React.JSX.Element;
|
|
10
|
-
export default FocusLock;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type DrawerPrimitiveProps } from '../types';
|
|
3
|
-
declare const DrawerPrimitive: ({ children, icon: Icon, closeLabel, scrollContentLabel, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, label, titleId, enterFrom, }: DrawerPrimitiveProps) => React.JSX.Element;
|
|
4
|
-
export default DrawerPrimitive;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type FC } from 'react';
|
|
6
|
-
import { type CSSObject } from '@emotion/react';
|
|
7
|
-
import { type SidebarProps } from '../types';
|
|
8
|
-
declare const sidebarDefaults: {
|
|
9
|
-
component: FC<SidebarProps>;
|
|
10
|
-
cssFn: () => CSSObject;
|
|
11
|
-
};
|
|
12
|
-
export default sidebarDefaults;
|