@atlaskit/drawer 7.1.5 → 7.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/drawer
2
2
 
3
+ ## 7.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
8
+
9
+ ## 7.1.7
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 7.1.6
16
+
17
+ ### Patch Changes
18
+
19
+ - [`ac9343c3ed4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ac9343c3ed4) - Replaces usage of deprecated design tokens. No visual or functional changes
20
+ - Updated dependencies
21
+
3
22
  ## 7.1.5
4
23
 
5
24
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # Drawer
2
+
3
+ A drawer is a panel that slides in from the left side of the screen.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ yarn add @atlaskit/drawer
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ [View documentation](https://atlassian.design/components/drawer).
@@ -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.5";
55
+ var packageVersion = "7.1.8";
56
56
 
57
57
  var OnlyChild = function OnlyChild(_ref) {
58
58
  var children = _ref.children;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/drawer",
3
- "version": "7.1.5",
3
+ "version": "7.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -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.5";
13
+ const packageVersion = "7.1.8";
14
14
 
15
15
  const OnlyChild = ({
16
16
  children
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/drawer",
3
- "version": "7.1.5",
3
+ "version": "7.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -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.5";
24
+ var packageVersion = "7.1.8";
25
25
 
26
26
  var OnlyChild = function OnlyChild(_ref) {
27
27
  var children = _ref.children;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/drawer",
3
- "version": "7.1.5",
3
+ "version": "7.1.8",
4
4
  "sideEffects": false
5
5
  }
@@ -22,7 +22,7 @@ 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<Pick<DrawerProps, "width" | "children" | "onKeyDown" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "shouldUnmountOnExit" | "testId" | "onClose" | "icon" | "onOpenComplete" | "onCloseComplete" | "overrides" | "isOpen">, "children" | "onKeyDown" | "shouldUnmountOnExit" | "testId" | "onClose" | "icon" | "onOpenComplete" | "onCloseComplete" | "overrides" | "isOpen"> & Partial<Pick<Pick<DrawerProps, "width" | "children" | "onKeyDown" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "shouldUnmountOnExit" | "testId" | "onClose" | "icon" | "onOpenComplete" | "onCloseComplete" | "overrides" | "isOpen">, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
25
+ declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "shouldUnmountOnExit" | "testId" | "onClose" | "icon" | "onOpenComplete" | "onCloseComplete" | "overrides" | "isOpen"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
26
26
  width: DrawerWidth;
27
27
  isFocusLockEnabled: boolean;
28
28
  shouldReturnFocus: boolean;
@@ -10,30 +10,23 @@ export declare type Widths = {
10
10
  };
11
11
  export declare type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
12
12
  export interface BaseProps {
13
- /** A unique hook to be used for testing */
13
+ /** A unique hook to be used for testing. */
14
14
  testId?: string;
15
- /** The content of the drawer */
15
+ /** The content of the drawer. */
16
16
  children?: ReactNode;
17
- /** Icon to be rendered in your drawer as a component, if available */
17
+ /** Icon to be rendered in your drawer as a component, if available. */
18
18
  icon?: ComponentType<any>;
19
- /** Available drawer sizes */
19
+ /** Available drawer sizes. */
20
20
  width?: DrawerWidth;
21
- /** A callback function that will be called when the drawer has finished its opening transition. */
21
+ /** Callback function called when the drawer has finished its opening transition. */
22
22
  onOpenComplete?: (node: HTMLElement) => void;
23
- /** A callback function that will be called when the drawer has finished its close transition. */
23
+ /** Callback function called when the drawer has finished its close transition. */
24
24
  onCloseComplete?: (node: HTMLElement) => void;
25
- /** Boolean that controls if drawer should be retained/discarded */
25
+ /** Controls if drawer state should be retained/discarded on close. */
26
26
  shouldUnmountOnExit?: boolean;
27
- /**
28
- * A prop for adding targeted customisations to the Drawer component
29
- * For a detailed explanation of how to use this prop,
30
- * please see the overrides section of the @atlaskit/drawer documentation.
31
- */
27
+ /** Override drawer components. */
32
28
  overrides?: OverridesType;
33
29
  }
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
- */
37
30
  export declare type DefaultsType = {
38
31
  Sidebar: {
39
32
  component: React.ComponentType<SidebarProps>;
@@ -44,26 +37,23 @@ export declare type DefaultsType = {
44
37
  cssFn: (defaultStyles: CSSObject) => CSSObject;
45
38
  };
46
39
  };
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
- */
50
40
  export declare type OverridesType = {
51
41
  Sidebar?: {
52
42
  component?: React.ComponentType<SidebarProps>;
43
+ /**
44
+ * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
45
+ */
53
46
  cssFn?: (defaultStyles: CSSObject) => CSSObject;
54
47
  };
55
48
  Content?: {
56
49
  component?: React.ComponentType<ContentProps>;
50
+ /**
51
+ * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
52
+ */
57
53
  cssFn?: (defaultStyles: CSSObject) => CSSObject;
58
54
  };
59
55
  };
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
- */
63
56
  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
- */
67
57
  export declare type DrawerPrimitiveOverrides = Pick<OverridesType, 'Sidebar' | 'Content'>;
68
58
  export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
69
59
  /**
@@ -84,36 +74,22 @@ export interface DrawerPrimitiveProps extends BaseProps {
84
74
  onClose: (event: SyntheticEvent<HTMLElement>) => void;
85
75
  }
86
76
  export declare type DrawerProps = BaseProps & FocusLockProps & WithAnalyticsEventsProps & {
87
- /**
88
- Callback function that will be called when the drawer is displayed and `keydown` event is triggered.
89
- */
77
+ /** Callback function called while the drawer is displayed and `keydown` event is triggered. */
90
78
  onKeyDown?: (event: SyntheticEvent) => void;
91
- /**
92
- Callback function to be called when the drawer will be closed.
93
- */
79
+ /** Callback function called when the drawer is closed. */
94
80
  onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
95
- /** Controls if the drawer is open or close */
81
+ /** Controls if the drawer is open or closed. */
96
82
  isOpen: boolean;
97
83
  };
98
84
  export interface FocusLockProps {
99
- /**
100
- Boolean indicating whether to focus on the first tabbable element inside the focus lock.
101
- */
85
+ /** Controls whether to focus the first tabbable element inside the focus lock. */
102
86
  autoFocusFirstElem?: boolean | (() => HTMLElement | null);
103
- /**
104
- Content inside the focus lock.
105
- */
87
+ /** Content inside the focus lock. */
106
88
  children?: ReactNode;
107
- /**
108
- Whether the focus lock is active or not.
109
- */
89
+ /** Whether the focus lock is active or not. */
110
90
  isFocusLockEnabled?: boolean;
111
- /**
112
- Whether to return the focus to the previous active element on closing the drawer
113
- */
91
+ /** Whether to return the focus to the previous active element on closing the drawer. */
114
92
  shouldReturnFocus?: boolean;
115
93
  }
116
- /**
117
- Type of keyboard event that triggers which key will should close the drawer.
118
- */
94
+ /** Type of keyboard event that triggers which key will should close the drawer. */
119
95
  export declare type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaskit/drawer",
3
- "version": "7.1.5",
4
- "description": "React component the renders a Drawer from the left of the screen",
3
+ "version": "7.1.8",
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/"
7
7
  },
@@ -14,6 +14,7 @@
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
16
  "atlaskit:src": "src/index.ts",
17
+ "homepage": "https://atlassian.design/components/drawer",
17
18
  "atlassian": {
18
19
  "team": "Design System Team",
19
20
  "deprecatedAutoEntryPoints": true,
@@ -28,7 +29,7 @@
28
29
  "@atlaskit/icon": "^21.10.0",
29
30
  "@atlaskit/portal": "^4.0.0",
30
31
  "@atlaskit/theme": "^12.1.0",
31
- "@atlaskit/tokens": "^0.7.0",
32
+ "@atlaskit/tokens": "^0.9.0",
32
33
  "@babel/runtime": "^7.0.0",
33
34
  "@emotion/core": "^10.0.9",
34
35
  "exenv": "^1.2.2",
@@ -40,12 +41,15 @@
40
41
  "react": "^16.8.0"
41
42
  },
42
43
  "devDependencies": {
43
- "@atlaskit/button": "^16.2.0",
44
+ "@atlaskit/button": "^16.3.0",
45
+ "@atlaskit/checkbox": "^12.3.9",
46
+ "@atlaskit/code": "^14.3.3",
44
47
  "@atlaskit/docs": "*",
45
48
  "@atlaskit/dropdown-menu": "^11.1.0",
46
49
  "@atlaskit/menu": "^1.3.0",
47
50
  "@atlaskit/section-message": "^6.0.0",
48
51
  "@atlaskit/ssr": "*",
52
+ "@atlaskit/textarea": "^4.3.1",
49
53
  "@atlaskit/visual-regression": "*",
50
54
  "@atlaskit/webdriver-runner": "*",
51
55
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -53,7 +57,7 @@
53
57
  "lodash": "^4.17.21",
54
58
  "react-dom": "^16.8.0",
55
59
  "react-lorem-component": "^0.13.0",
56
- "typescript": "3.9.6",
60
+ "typescript": "4.2.4",
57
61
  "wait-for-expect": "^1.2.0"
58
62
  },
59
63
  "techstack": {