@zendeskgarden/react-modals 9.0.0-next.1 → 9.0.0-next.3

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.
@@ -4,7 +4,7 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { Placement } from '@popperjs/core';
7
+ import { Placement } from '@floating-ui/react-dom';
8
8
  import { TransitionStatus } from 'react-transition-group';
9
9
  import { ITooltipModalProps } from '../types';
10
10
  export interface IStyledTooltipModalProps extends Pick<ITooltipModalProps, 'hasArrow' | 'isAnimated'> {
@@ -4,10 +4,10 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import { Placement } from '@popperjs/core';
7
+ import { Placement } from '@floating-ui/react-dom';
8
8
  import { ITooltipModalProps } from '../types';
9
9
  interface IStyledTooltipWrapperProps extends Pick<ITooltipModalProps, 'isAnimated' | 'zIndex'> {
10
- placement?: Placement;
10
+ placement: Placement;
11
11
  }
12
12
  export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledTooltipWrapperProps, never>;
13
13
  export {};
@@ -20,9 +20,9 @@ export { StyledTooltipModalBody } from './StyledTooltipModalBody';
20
20
  export { StyledTooltipModalFooter } from './StyledTooltipModalFooter';
21
21
  export { StyledTooltipModalFooterItem } from './StyledTooltipModalFooterItem';
22
22
  export { StyledTooltipModalClose } from './StyledTooltipModalClose';
23
- export { StyledDrawerModal } from './StyledDrawerModal';
24
- export { StyledDrawerModalHeader } from './StyledDrawerModalHeader';
25
- export { StyledDrawerModalClose } from './StyledDrawerModalClose';
26
- export { StyledDrawerModalBody } from './StyledDrawerModalBody';
27
- export { StyledDrawerModalFooter } from './StyledDrawerModalFooter';
28
- export { StyledDrawerModalFooterItem } from './StyledDrawerModalFooterItem';
23
+ export { StyledDrawer } from './StyledDrawer';
24
+ export { StyledDrawerHeader } from './StyledDrawerHeader';
25
+ export { StyledDrawerClose } from './StyledDrawerClose';
26
+ export { StyledDrawerBody } from './StyledDrawerBody';
27
+ export { StyledDrawerFooter } from './StyledDrawerFooter';
28
+ export { StyledDrawerFooterItem } from './StyledDrawerFooterItem';
@@ -5,7 +5,6 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  import { HTMLAttributes, KeyboardEvent, MouseEvent } from 'react';
8
- import { Modifier } from 'react-popper';
9
8
  export declare const PLACEMENT: readonly ["auto", "top", "top-start", "top-end", "bottom", "bottom-start", "bottom-end", "end", "end-top", "end-bottom", "start", "start-top", "start-bottom"];
10
9
  export type Placement = (typeof PLACEMENT)[number];
11
10
  export interface IModalProps extends HTMLAttributes<HTMLDivElement> {
@@ -54,13 +53,13 @@ export interface IHeaderProps extends HTMLAttributes<HTMLDivElement> {
54
53
  */
55
54
  tag?: any;
56
55
  }
57
- export interface IDrawerModalProps extends Omit<IModalProps, 'isAnimated' | 'isCentered' | 'isLarge'> {
56
+ export interface IDrawerProps extends Omit<IModalProps, 'isAnimated' | 'isCentered' | 'isLarge'> {
58
57
  /**
59
58
  * Opens the modal
60
59
  */
61
60
  isOpen?: boolean;
62
61
  }
63
- export interface IDrawerModalHeaderProps extends HTMLAttributes<HTMLDivElement> {
62
+ export interface IDrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {
64
63
  /**
65
64
  * Updates the element's HTML tag
66
65
  */
@@ -71,10 +70,6 @@ export interface ITooltipModalProps extends Omit<IModalProps, 'isCentered' | 'is
71
70
  * Positions the modal relative to the provided `HTMLElement`
72
71
  */
73
72
  referenceElement?: HTMLElement | null;
74
- /**
75
- * Modifies [Popper instance](https://popper.js.org/docs/v2/modifiers/) to customize positioning logic
76
- */
77
- popperModifiers?: Partial<Modifier<any, any>>[];
78
73
  /**
79
74
  * Adjusts the placement of the tooltip
80
75
  **/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-modals",
3
- "version": "9.0.0-next.1",
3
+ "version": "9.0.0-next.3",
4
4
  "description": "Components relating to modals in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -21,14 +21,13 @@
21
21
  "sideEffects": false,
22
22
  "types": "dist/typings/index.d.ts",
23
23
  "dependencies": {
24
- "@popperjs/core": "^2.4.4",
24
+ "@floating-ui/react-dom": "^2.0.0",
25
25
  "@zendeskgarden/container-focusvisible": "^2.0.0",
26
26
  "@zendeskgarden/container-modal": "^1.0.0",
27
27
  "@zendeskgarden/container-utilities": "^2.0.0",
28
28
  "dom-helpers": "^5.1.0",
29
29
  "prop-types": "^15.5.7",
30
30
  "react-merge-refs": "^2.0.0",
31
- "react-popper": "^2.2.3",
32
31
  "react-transition-group": "^4.4.2"
33
32
  },
34
33
  "peerDependencies": {
@@ -39,7 +38,7 @@
39
38
  },
40
39
  "devDependencies": {
41
40
  "@types/react-transition-group": "4.4.10",
42
- "@zendeskgarden/react-theming": "^9.0.0-next.1",
41
+ "@zendeskgarden/react-theming": "^9.0.0-next.3",
43
42
  "@zendeskgarden/svg-icons": "7.0.0"
44
43
  },
45
44
  "keywords": [
@@ -52,5 +51,5 @@
52
51
  "access": "public"
53
52
  },
54
53
  "zendeskgarden:src": "src/index.ts",
55
- "gitHead": "a9e4e776bf6ad8860a198fc24f27b2b5cbc83320"
54
+ "gitHead": "d5086e8a3ae0c8608361966954bf434ef03005ec"
56
55
  }
@@ -1,28 +0,0 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import { Placement } from '@popperjs/core';
8
- import { Placement as GardenPlacement } from '../types';
9
- /**
10
- * Convert Garden RTL aware placement to Popper.JS valid placement
11
- * @param {String} gardenPlacement
12
- */
13
- export declare function getPopperPlacement(gardenPlacement: GardenPlacement): Placement;
14
- /**
15
- * Convert Garden RTL aware placement to RTL equivalent Popper.JS placement
16
- * @param {String} gardenPlacement
17
- */
18
- export declare function getRtlPopperPlacement(gardenPlacement: GardenPlacement): Placement;
19
- /**
20
- * Convert Popper.JS placement to corresponding arrow position
21
- * @param {String} popperPlacement
22
- */
23
- export declare function getArrowPosition(popperPlacement: Placement): "top" | "top-left" | "top-right" | "right" | "right-top" | "right-bottom" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-top" | "left-bottom";
24
- /**
25
- * Convert Popper.JS placement to corresponding menu position
26
- * @param {String} popperPlacement
27
- */
28
- export declare function getMenuPosition(popperPlacement?: Placement): "top" | "right" | "bottom" | "left";