@zendeskgarden/react-modals 9.0.0-next.8 → 9.0.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/README.md +11 -11
- package/dist/esm/elements/Body.js +8 -8
- package/dist/esm/elements/Close.js +8 -8
- package/dist/esm/elements/Drawer/Body.js +7 -7
- package/dist/esm/elements/Drawer/Close.js +7 -7
- package/dist/esm/elements/Drawer/Drawer.js +7 -7
- package/dist/esm/elements/Drawer/Footer.js +7 -7
- package/dist/esm/elements/Drawer/FooterItem.js +7 -7
- package/dist/esm/elements/Drawer/Header.js +7 -7
- package/dist/esm/elements/Footer.js +8 -8
- package/dist/esm/elements/FooterItem.js +8 -8
- package/dist/esm/elements/Header.js +9 -9
- package/dist/esm/elements/Modal.js +7 -7
- package/dist/esm/elements/{TooltipModal → TooltipDialog}/Body.js +11 -11
- package/dist/esm/elements/{TooltipModal → TooltipDialog}/Close.js +13 -12
- package/dist/esm/elements/{TooltipModal → TooltipDialog}/Footer.js +9 -9
- package/dist/esm/elements/{TooltipModal → TooltipDialog}/FooterItem.js +9 -9
- package/dist/esm/elements/{TooltipModal → TooltipDialog}/Title.js +11 -11
- package/dist/esm/elements/{TooltipModal/TooltipModal.js → TooltipDialog/TooltipDialog.js} +25 -24
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +1 -1
- package/dist/esm/styled/StyledBackdrop.js +18 -6
- package/dist/esm/styled/StyledBody.js +11 -6
- package/dist/esm/styled/StyledClose.js +6 -18
- package/dist/esm/styled/StyledDangerIcon.js +0 -4
- package/dist/esm/styled/StyledDrawer.js +23 -18
- package/dist/esm/styled/StyledDrawerBody.js +3 -6
- package/dist/esm/styled/StyledDrawerClose.js +2 -5
- package/dist/esm/styled/StyledDrawerFooter.js +11 -6
- package/dist/esm/styled/StyledDrawerFooterItem.js +2 -5
- package/dist/esm/styled/StyledDrawerHeader.js +2 -5
- package/dist/esm/styled/StyledFooter.js +6 -6
- package/dist/esm/styled/StyledFooterItem.js +2 -5
- package/dist/esm/styled/StyledHeader.js +19 -7
- package/dist/esm/styled/StyledModal.js +22 -17
- package/dist/esm/styled/StyledTooltipDialog.js +39 -0
- package/dist/esm/styled/{StyledTooltipModalBackdrop.js → StyledTooltipDialogBackdrop.js} +7 -10
- package/dist/esm/styled/StyledTooltipDialogBody.js +27 -0
- package/dist/esm/styled/StyledTooltipDialogClose.js +20 -0
- package/dist/esm/styled/{StyledTooltipModalFooter.js → StyledTooltipDialogFooter.js} +7 -10
- package/dist/esm/styled/StyledTooltipDialogFooterItem.js +20 -0
- package/dist/esm/styled/StyledTooltipDialogTitle.js +32 -0
- package/dist/esm/styled/StyledTooltipWrapper.js +1 -4
- package/dist/esm/utils/useTooltipDialogContext.js +18 -0
- package/dist/index.cjs.js +225 -210
- package/dist/typings/elements/Drawer/Drawer.d.ts +10 -1
- package/dist/typings/elements/Modal.d.ts +1 -1
- package/dist/typings/elements/{TooltipModal → TooltipDialog}/Title.d.ts +2 -2
- package/dist/typings/elements/{TooltipModal/TooltipModal.d.ts → TooltipDialog/TooltipDialog.d.ts} +4 -2
- package/dist/typings/index.d.ts +2 -2
- package/dist/typings/styled/StyledClose.d.ts +1 -5
- package/dist/typings/styled/StyledDrawerClose.d.ts +1 -1
- package/dist/typings/styled/StyledHeader.d.ts +2 -1
- package/dist/typings/styled/{StyledTooltipModal.d.ts → StyledTooltipDialog.d.ts} +4 -3
- package/dist/typings/styled/{StyledTooltipModalBackdrop.d.ts → StyledTooltipDialogBackdrop.d.ts} +1 -1
- package/dist/typings/styled/{StyledTooltipModalBody.d.ts → StyledTooltipDialogBody.d.ts} +1 -1
- package/dist/typings/styled/{StyledTooltipModalClose.d.ts → StyledTooltipDialogClose.d.ts} +1 -1
- package/dist/typings/styled/{StyledTooltipModalFooter.d.ts → StyledTooltipDialogFooter.d.ts} +1 -1
- package/dist/typings/styled/{StyledTooltipModalFooterItem.d.ts → StyledTooltipDialogFooterItem.d.ts} +1 -1
- package/dist/typings/styled/{StyledTooltipModalTitle.d.ts → StyledTooltipDialogTitle.d.ts} +1 -1
- package/dist/typings/styled/StyledTooltipWrapper.d.ts +2 -2
- package/dist/typings/styled/index.d.ts +7 -7
- package/dist/typings/types/index.d.ts +4 -2
- package/dist/typings/utils/useModalContext.d.ts +0 -1
- package/dist/typings/utils/{useTooltipModalContext.d.ts → useTooltipDialogContext.d.ts} +2 -3
- package/package.json +9 -9
- package/LICENSE.md +0 -176
- package/dist/esm/styled/StyledTooltipModal.js +0 -33
- package/dist/esm/styled/StyledTooltipModalBody.js +0 -22
- package/dist/esm/styled/StyledTooltipModalClose.js +0 -23
- package/dist/esm/styled/StyledTooltipModalFooterItem.js +0 -23
- package/dist/esm/styled/StyledTooltipModalTitle.js +0 -28
- package/dist/esm/utils/useTooltipModalContext.js +0 -18
- /package/dist/typings/elements/{TooltipModal → TooltipDialog}/Body.d.ts +0 -0
- /package/dist/typings/elements/{TooltipModal → TooltipDialog}/Close.d.ts +0 -0
- /package/dist/typings/elements/{TooltipModal → TooltipDialog}/Footer.d.ts +0 -0
- /package/dist/typings/elements/{TooltipModal → TooltipDialog}/FooterItem.d.ts +0 -0
|
@@ -11,13 +11,22 @@ import { Body } from './Body';
|
|
|
11
11
|
import { Close } from './Close';
|
|
12
12
|
import { Footer } from './Footer';
|
|
13
13
|
import { FooterItem } from './FooterItem';
|
|
14
|
+
/**
|
|
15
|
+
* [1] implementation of focus management for Drawer usage to support focus edge cases
|
|
16
|
+
* - (1:a) a ref used to return focus on the last focused element
|
|
17
|
+
* - (1:b) opt out of `@zendeskgarden/focus-jail` managing the focus
|
|
18
|
+
* - (1:c) implementation of the focus management effect inside the component
|
|
19
|
+
* - (1:d) set default props to match useFocusJail behavior
|
|
20
|
+
*/
|
|
21
|
+
declare const DrawerComponent: React.ForwardRefExoticComponent<IDrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
22
|
/**
|
|
15
23
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
24
|
*/
|
|
17
|
-
export declare const Drawer:
|
|
25
|
+
export declare const Drawer: typeof DrawerComponent & {
|
|
18
26
|
Body: typeof Body;
|
|
19
27
|
Close: typeof Close;
|
|
20
28
|
Footer: typeof Footer;
|
|
21
29
|
FooterItem: typeof FooterItem;
|
|
22
30
|
Header: typeof Header;
|
|
23
31
|
};
|
|
32
|
+
export {};
|
|
@@ -15,7 +15,7 @@ export declare const ModalComponent: React.ForwardRefExoticComponent<IModalProps
|
|
|
15
15
|
/**
|
|
16
16
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
17
17
|
*/
|
|
18
|
-
export declare const Modal:
|
|
18
|
+
export declare const Modal: typeof ModalComponent & {
|
|
19
19
|
Body: typeof Body;
|
|
20
20
|
Close: typeof Close;
|
|
21
21
|
Footer: typeof Footer;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { ITooltipDialogTitleProps } from '../../types';
|
|
9
9
|
/**
|
|
10
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const Title: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const Title: React.ForwardRefExoticComponent<ITooltipDialogTitleProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/typings/elements/{TooltipModal/TooltipModal.d.ts → TooltipDialog/TooltipDialog.d.ts}
RENAMED
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import { ITooltipDialogProps } from '../../types';
|
|
9
9
|
import { Title } from './Title';
|
|
10
10
|
import { Body } from './Body';
|
|
11
11
|
import { Close } from './Close';
|
|
12
12
|
import { Footer } from './Footer';
|
|
13
13
|
import { FooterItem } from './FooterItem';
|
|
14
|
+
declare const TooltipDialogComponent: React.ForwardRefExoticComponent<ITooltipDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
15
|
/**
|
|
15
16
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
16
17
|
*/
|
|
17
|
-
export declare const
|
|
18
|
+
export declare const TooltipDialog: typeof TooltipDialogComponent & {
|
|
18
19
|
Body: typeof Body;
|
|
19
20
|
Close: typeof Close;
|
|
20
21
|
Footer: typeof Footer;
|
|
21
22
|
FooterItem: typeof FooterItem;
|
|
22
23
|
Title: typeof Title;
|
|
23
24
|
};
|
|
25
|
+
export {};
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -10,6 +10,6 @@ export { Close } from './elements/Close';
|
|
|
10
10
|
export { Footer } from './elements/Footer';
|
|
11
11
|
export { FooterItem } from './elements/FooterItem';
|
|
12
12
|
export { Header } from './elements/Header';
|
|
13
|
-
export {
|
|
13
|
+
export { TooltipDialog } from './elements/TooltipDialog/TooltipDialog';
|
|
14
14
|
export { Drawer } from './elements/Drawer/Drawer';
|
|
15
|
-
export { PLACEMENT, type IModalProps, type IDrawerProps, type
|
|
15
|
+
export { PLACEMENT, type IModalProps, type IDrawerProps, type ITooltipDialogProps } from './types';
|
|
@@ -4,16 +4,12 @@
|
|
|
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 { DefaultTheme } from 'styled-components';
|
|
8
7
|
export declare const BASE_MULTIPLIERS: {
|
|
9
8
|
top: number;
|
|
10
9
|
side: number;
|
|
11
10
|
size: number;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
* 1. Remove dotted outline from Firefox on focus.
|
|
15
|
-
*/
|
|
16
|
-
export declare const StyledClose: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
12
|
+
export declare const StyledClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-buttons").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
|
|
17
13
|
'data-garden-id': string;
|
|
18
14
|
'data-garden-version': string;
|
|
19
15
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -9,7 +9,7 @@ export declare const BASE_MULTIPLIERS: {
|
|
|
9
9
|
side: number;
|
|
10
10
|
size: number;
|
|
11
11
|
};
|
|
12
|
-
export declare const StyledDrawerClose: import("styled-components").StyledComponent<"
|
|
12
|
+
export declare const StyledDrawerClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("packages/buttons/dist/typings").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
|
|
13
13
|
'data-garden-id': string;
|
|
14
14
|
'data-garden-version': string;
|
|
15
15
|
} & {
|
|
@@ -4,6 +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 { DefaultTheme } from 'styled-components';
|
|
7
8
|
export interface IStyledHeaderProps {
|
|
8
9
|
isDanger?: boolean;
|
|
9
10
|
isCloseButtonPresent?: boolean;
|
|
@@ -12,4 +13,4 @@ export interface IStyledHeaderProps {
|
|
|
12
13
|
* 1. the padding added to the Header is based on the close button size and spacing,
|
|
13
14
|
* with additional padding (+ 2) between the Header content and Close button
|
|
14
15
|
*/
|
|
15
|
-
export declare const StyledHeader: import("styled-components").StyledComponent<"div",
|
|
16
|
+
export declare const StyledHeader: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledHeaderProps, never>;
|
|
@@ -4,11 +4,12 @@
|
|
|
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 { DefaultTheme } from 'styled-components';
|
|
7
8
|
import { Placement } from '@floating-ui/react-dom';
|
|
8
9
|
import { TransitionStatus } from 'react-transition-group';
|
|
9
|
-
import {
|
|
10
|
-
export interface
|
|
10
|
+
import { ITooltipDialogProps } from '../types';
|
|
11
|
+
export interface IStyledTooltipDialogProps extends Pick<ITooltipDialogProps, 'hasArrow' | 'isAnimated'> {
|
|
11
12
|
placement: Placement;
|
|
12
13
|
transitionState?: TransitionStatus;
|
|
13
14
|
}
|
|
14
|
-
export declare const
|
|
15
|
+
export declare const StyledTooltipDialog: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledTooltipDialogProps, never>;
|
package/dist/typings/styled/{StyledTooltipModalBackdrop.d.ts → StyledTooltipDialogBackdrop.d.ts}
RENAMED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* 1. Smooth iOS scrolling.
|
|
9
9
|
*/
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const StyledTooltipDialogBackdrop: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
11
11
|
'data-garden-id': string;
|
|
12
12
|
'data-garden-version': string;
|
|
13
13
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -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
|
-
export declare const
|
|
7
|
+
export declare const StyledTooltipDialogBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
8
|
'data-garden-id': string;
|
|
9
9
|
'data-garden-version': string;
|
|
10
10
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -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
|
-
export declare const
|
|
7
|
+
export declare const StyledTooltipDialogClose: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("packages/buttons/dist/typings").IIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>, import("styled-components").DefaultTheme, {
|
|
8
8
|
'data-garden-id': string;
|
|
9
9
|
'data-garden-version': string;
|
|
10
10
|
} & {
|
package/dist/typings/styled/{StyledTooltipModalFooter.d.ts → StyledTooltipDialogFooter.d.ts}
RENAMED
|
@@ -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
|
-
export declare const
|
|
7
|
+
export declare const StyledTooltipDialogFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
8
|
'data-garden-id': string;
|
|
9
9
|
'data-garden-version': string;
|
|
10
10
|
}, "data-garden-id" | "data-garden-version">;
|
package/dist/typings/styled/{StyledTooltipModalFooterItem.d.ts → StyledTooltipDialogFooterItem.d.ts}
RENAMED
|
@@ -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
|
-
export declare const
|
|
7
|
+
export declare const StyledTooltipDialogFooterItem: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
|
8
8
|
'data-garden-id': string;
|
|
9
9
|
'data-garden-version': string;
|
|
10
10
|
} & {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const StyledTooltipDialogTitle: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
9
|
'data-garden-id': string;
|
|
10
10
|
'data-garden-version': string;
|
|
11
11
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { Placement } from '@floating-ui/react-dom';
|
|
8
|
-
import {
|
|
9
|
-
interface IStyledTooltipWrapperProps extends Pick<
|
|
8
|
+
import { ITooltipDialogProps } from '../types';
|
|
9
|
+
interface IStyledTooltipWrapperProps extends Pick<ITooltipDialogProps, 'isAnimated' | 'zIndex'> {
|
|
10
10
|
placement: Placement;
|
|
11
11
|
}
|
|
12
12
|
export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, IStyledTooltipWrapperProps, never>;
|
|
@@ -12,14 +12,14 @@ export { StyledFooterItem } from './StyledFooterItem';
|
|
|
12
12
|
export { StyledHeader } from './StyledHeader';
|
|
13
13
|
export { StyledDangerIcon } from './StyledDangerIcon';
|
|
14
14
|
export { StyledModal } from './StyledModal';
|
|
15
|
-
export {
|
|
15
|
+
export { StyledTooltipDialogBackdrop } from './StyledTooltipDialogBackdrop';
|
|
16
16
|
export { StyledTooltipWrapper } from './StyledTooltipWrapper';
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
17
|
+
export { StyledTooltipDialog } from './StyledTooltipDialog';
|
|
18
|
+
export { StyledTooltipDialogTitle } from './StyledTooltipDialogTitle';
|
|
19
|
+
export { StyledTooltipDialogBody } from './StyledTooltipDialogBody';
|
|
20
|
+
export { StyledTooltipDialogFooter } from './StyledTooltipDialogFooter';
|
|
21
|
+
export { StyledTooltipDialogFooterItem } from './StyledTooltipDialogFooterItem';
|
|
22
|
+
export { StyledTooltipDialogClose } from './StyledTooltipDialogClose';
|
|
23
23
|
export { StyledDrawer } from './StyledDrawer';
|
|
24
24
|
export { StyledDrawerHeader } from './StyledDrawerHeader';
|
|
25
25
|
export { StyledDrawerClose } from './StyledDrawerClose';
|
|
@@ -65,11 +65,13 @@ export interface IDrawerHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
65
65
|
*/
|
|
66
66
|
tag?: any;
|
|
67
67
|
}
|
|
68
|
-
export interface
|
|
68
|
+
export interface ITooltipDialogProps extends Omit<IModalProps, 'isCentered' | 'isLarge'> {
|
|
69
69
|
/**
|
|
70
70
|
* Positions the modal relative to the provided `HTMLElement`
|
|
71
71
|
*/
|
|
72
72
|
referenceElement?: HTMLElement | null;
|
|
73
|
+
/** @ignore Modifies the placement offset from the reference element (internal only) */
|
|
74
|
+
offset?: number;
|
|
73
75
|
/**
|
|
74
76
|
* Adjusts the placement of the tooltip
|
|
75
77
|
**/
|
|
@@ -83,7 +85,7 @@ export interface ITooltipModalProps extends Omit<IModalProps, 'isCentered' | 'is
|
|
|
83
85
|
*/
|
|
84
86
|
zIndex?: number;
|
|
85
87
|
}
|
|
86
|
-
export interface
|
|
88
|
+
export interface ITooltipDialogTitleProps extends HTMLAttributes<HTMLDivElement> {
|
|
87
89
|
/**
|
|
88
90
|
* Updates the element's HTML tag
|
|
89
91
|
*/
|
|
@@ -4,7 +4,6 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
8
7
|
import { IUseModalReturnValue } from '@zendeskgarden/container-modal';
|
|
9
8
|
export interface IModalContext {
|
|
10
9
|
isLarge?: boolean;
|
|
@@ -4,7 +4,6 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
8
7
|
import { IUseModalReturnValue } from '@zendeskgarden/container-modal';
|
|
9
8
|
export interface IModalContext {
|
|
10
9
|
hasTitle: boolean;
|
|
@@ -13,5 +12,5 @@ export interface IModalContext {
|
|
|
13
12
|
getContentProps: IUseModalReturnValue['getContentProps'];
|
|
14
13
|
getCloseProps: IUseModalReturnValue['getCloseProps'];
|
|
15
14
|
}
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
15
|
+
export declare const TooltipDialogContext: import("react").Context<IModalContext | undefined>;
|
|
16
|
+
export declare const useTooltipDialogContext: () => IModalContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-modals",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
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>",
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@floating-ui/react-dom": "^2.0.0",
|
|
25
|
-
"@zendeskgarden/container-modal": "^1.0.
|
|
25
|
+
"@zendeskgarden/container-modal": "^1.0.15",
|
|
26
26
|
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
27
|
+
"@zendeskgarden/react-buttons": "^9.0.0",
|
|
27
28
|
"dom-helpers": "^5.1.0",
|
|
28
29
|
"prop-types": "^15.5.7",
|
|
29
30
|
"react-merge-refs": "^2.0.0",
|
|
@@ -31,14 +32,14 @@
|
|
|
31
32
|
},
|
|
32
33
|
"peerDependencies": {
|
|
33
34
|
"@zendeskgarden/react-theming": ">=9.0.0-next",
|
|
34
|
-
"react": "
|
|
35
|
-
"react-dom": "
|
|
35
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
36
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
36
37
|
"styled-components": "^5.3.1"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@types/react-transition-group": "4.4.
|
|
40
|
-
"@zendeskgarden/react-theming": "^9.0.0
|
|
41
|
-
"@zendeskgarden/svg-icons": "7.
|
|
40
|
+
"@types/react-transition-group": "4.4.11",
|
|
41
|
+
"@zendeskgarden/react-theming": "^9.0.0",
|
|
42
|
+
"@zendeskgarden/svg-icons": "7.2.0"
|
|
42
43
|
},
|
|
43
44
|
"keywords": [
|
|
44
45
|
"components",
|
|
@@ -49,6 +50,5 @@
|
|
|
49
50
|
"publishConfig": {
|
|
50
51
|
"access": "public"
|
|
51
52
|
},
|
|
52
|
-
"zendeskgarden:src": "src/index.ts"
|
|
53
|
-
"gitHead": "a3d6534843d5a4f5cb60b52bc67264f3230f2da0"
|
|
53
|
+
"zendeskgarden:src": "src/index.ts"
|
|
54
54
|
}
|
package/LICENSE.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
@@ -1,33 +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 styled from 'styled-components';
|
|
8
|
-
import { arrowStyles, getArrowPosition, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
-
|
|
10
|
-
const COMPONENT_ID = 'modals.tooltip_modal';
|
|
11
|
-
const StyledTooltipModal = styled.div.attrs(props => ({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.8',
|
|
14
|
-
className: props.isAnimated && 'is-animated'
|
|
15
|
-
})).withConfig({
|
|
16
|
-
displayName: "StyledTooltipModal",
|
|
17
|
-
componentId: "sc-42ubfr-0"
|
|
18
|
-
})(["padding:", "px;width:400px;", ";", ";"], props => props.theme.space.base * 5, props => {
|
|
19
|
-
const computedArrowStyles = arrowStyles(getArrowPosition(props.theme, props.placement), {
|
|
20
|
-
size: `${props.theme.space.base * 2}px`,
|
|
21
|
-
inset: '1px',
|
|
22
|
-
animationModifier: '.is-animated'
|
|
23
|
-
});
|
|
24
|
-
if (props.isAnimated) {
|
|
25
|
-
return props.hasArrow && props.transitionState === 'entered' && computedArrowStyles;
|
|
26
|
-
}
|
|
27
|
-
return props.hasArrow && computedArrowStyles;
|
|
28
|
-
}, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
29
|
-
StyledTooltipModal.defaultProps = {
|
|
30
|
-
theme: DEFAULT_THEME
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { StyledTooltipModal };
|
|
@@ -1,22 +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 styled from 'styled-components';
|
|
8
|
-
import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
-
|
|
10
|
-
const COMPONENT_ID = 'modals.tooltip_modal.body';
|
|
11
|
-
const StyledTooltipModalBody = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0-next.8'
|
|
14
|
-
}).withConfig({
|
|
15
|
-
displayName: "StyledTooltipModalBody",
|
|
16
|
-
componentId: "sc-195dkzj-0"
|
|
17
|
-
})(["display:block;margin:0;padding-top:", "px;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.space.base * 1.5, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => getColorV8('foreground', 600 , props.theme), props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
-
StyledTooltipModalBody.defaultProps = {
|
|
19
|
-
theme: DEFAULT_THEME
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { StyledTooltipModalBody };
|
|
@@ -1,23 +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 styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
-
import { StyledClose } from './StyledClose.js';
|
|
10
|
-
|
|
11
|
-
const COMPONENT_ID = 'modals.tooltip_modal.close';
|
|
12
|
-
const StyledTooltipModalClose = styled(StyledClose).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.0.0-next.8'
|
|
15
|
-
}).withConfig({
|
|
16
|
-
displayName: "StyledTooltipModalClose",
|
|
17
|
-
componentId: "sc-1h2ke3q-0"
|
|
18
|
-
})(["top:", "px;", ":", ";width:", "px;height:", "px;", ";"], props => props.theme.space.base * 3.5, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * 3}px`, props => props.theme.space.base * 8, props => props.theme.space.base * 8, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
-
StyledTooltipModalClose.defaultProps = {
|
|
20
|
-
theme: DEFAULT_THEME
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { StyledTooltipModalClose };
|
|
@@ -1,23 +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 styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
-
import { StyledFooterItem } from './StyledFooterItem.js';
|
|
10
|
-
|
|
11
|
-
const COMPONENT_ID = 'modals.tooltip_modal.footer_item';
|
|
12
|
-
const StyledTooltipModalFooterItem = styled(StyledFooterItem).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.0.0-next.8'
|
|
15
|
-
}).withConfig({
|
|
16
|
-
displayName: "StyledTooltipModalFooterItem",
|
|
17
|
-
componentId: "sc-1nahj6p-0"
|
|
18
|
-
})(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
-
StyledTooltipModalFooterItem.defaultProps = {
|
|
20
|
-
theme: DEFAULT_THEME
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { StyledTooltipModalFooterItem };
|