@zendeskgarden/react-chrome 8.46.0 → 8.47.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/dist/index.cjs.js +588 -174
- package/dist/index.esm.js +588 -176
- package/dist/typings/elements/sheet/Sheet.d.ts +42 -0
- package/dist/typings/elements/sheet/components/Body.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Close.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Description.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Footer.d.ts +9 -0
- package/dist/typings/elements/sheet/components/FooterItem.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Header.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Title.d.ts +8 -0
- package/dist/typings/index.d.ts +1 -0
- package/dist/typings/styled/index.d.ts +10 -0
- package/dist/typings/styled/sheet/StyledSheet.d.ts +18 -0
- package/dist/typings/styled/sheet/StyledSheetBody.d.ts +10 -0
- package/dist/typings/styled/sheet/StyledSheetClose.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetDescription.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetFooter.d.ts +15 -0
- package/dist/typings/styled/sheet/StyledSheetFooterItem.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetHeader.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetTitle.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetWrapper.d.ts +18 -0
- package/dist/typings/utils/useFocusableMount.d.ts +14 -0
- package/dist/typings/utils/useSheetContext.d.ts +13 -0
- package/package.json +6 -5
|
@@ -0,0 +1,42 @@
|
|
|
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 { HTMLAttributes, PropsWithoutRef, RefAttributes, ForwardRefExoticComponent } from 'react';
|
|
8
|
+
import { SheetTitle } from './components/Title';
|
|
9
|
+
import { SheetDescription } from './components/Description';
|
|
10
|
+
import { SheetHeader } from './components/Header';
|
|
11
|
+
import { SheetBody } from './components/Body';
|
|
12
|
+
import { SheetFooter } from './components/Footer';
|
|
13
|
+
import { SheetFooterItem } from './components/FooterItem';
|
|
14
|
+
import { SheetClose } from './components/Close';
|
|
15
|
+
interface IStaticSheetExport<T, P> extends ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> {
|
|
16
|
+
Title: typeof SheetTitle;
|
|
17
|
+
Description: typeof SheetDescription;
|
|
18
|
+
Header: typeof SheetHeader;
|
|
19
|
+
Body: typeof SheetBody;
|
|
20
|
+
Footer: typeof SheetFooter;
|
|
21
|
+
FooterItem: typeof SheetFooterItem;
|
|
22
|
+
Close: typeof SheetClose;
|
|
23
|
+
}
|
|
24
|
+
export interface ISheetProps extends HTMLAttributes<HTMLElement> {
|
|
25
|
+
/** Opens the Sheet **/
|
|
26
|
+
isOpen?: boolean;
|
|
27
|
+
/** Determines whether animation for opening and closing the Sheet is used **/
|
|
28
|
+
isAnimated?: boolean;
|
|
29
|
+
/** Focuses on the Sheet when `isOpen` is true and mounted **/
|
|
30
|
+
focusOnMount?: boolean;
|
|
31
|
+
/** Directs keyboard focus to the Sheet on mount **/
|
|
32
|
+
restoreFocus?: boolean;
|
|
33
|
+
/** Returns keyboard focus to the element that triggered the Sheet **/
|
|
34
|
+
placement?: 'start' | 'end';
|
|
35
|
+
/** Sets the width in pixels, based on the placement of the Sheet */
|
|
36
|
+
size?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
40
|
+
*/
|
|
41
|
+
export declare const Sheet: IStaticSheetExport<HTMLElement, ISheetProps>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetClose: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 React from 'react';
|
|
8
|
+
import { IStyledSheetFooterProps } from '../../../styled';
|
|
9
|
+
export declare const SheetFooter: React.ForwardRefExoticComponent<IStyledSheetFooterProps & React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetFooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
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 React from 'react';
|
|
8
|
+
export declare const SheetTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export { SubNav } from './elements/subnav/SubNav';
|
|
|
25
25
|
export { SubNavItem } from './elements/subnav/SubNavItem';
|
|
26
26
|
export { SubNavItemText } from './elements/subnav/SubNavItemText';
|
|
27
27
|
export { CollapsibleSubNavItem } from './elements/subnav/CollapsibleSubNavItem';
|
|
28
|
+
export { Sheet } from './elements/sheet/Sheet';
|
|
@@ -42,3 +42,13 @@ export { StyledSubNavItemHeader } from './subnav/StyledSubNavItemHeader';
|
|
|
42
42
|
export type { IStyledSubNavItemHeaderProps } from './subnav/StyledSubNavItemHeader';
|
|
43
43
|
export { StyledSubNavItemIconWrapper, StyledSubNavItemIcon } from './subnav/StyledSubNavItemIcon';
|
|
44
44
|
export { StyledSubNavPanel } from './subnav/StyledSubNavPanel';
|
|
45
|
+
export { StyledSheet } from './sheet/StyledSheet';
|
|
46
|
+
export { StyledSheetWrapper } from './sheet/StyledSheetWrapper';
|
|
47
|
+
export { StyledSheetTitle } from './sheet/StyledSheetTitle';
|
|
48
|
+
export { StyledSheetDescription } from './sheet/StyledSheetDescription';
|
|
49
|
+
export { StyledSheetBody } from './sheet/StyledSheetBody';
|
|
50
|
+
export { StyledSheetClose } from './sheet/StyledSheetClose';
|
|
51
|
+
export { StyledSheetFooter } from './sheet/StyledSheetFooter';
|
|
52
|
+
export type { IStyledSheetFooterProps } from './sheet/StyledSheetFooter';
|
|
53
|
+
export { StyledSheetFooterItem } from './sheet/StyledSheetFooterItem';
|
|
54
|
+
export { StyledSheetHeader } from './sheet/StyledSheetHeader';
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { DefaultTheme } from 'styled-components';
|
|
8
|
+
interface IStyledSheetProps {
|
|
9
|
+
placement?: 'start' | 'end';
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
isAnimated?: boolean;
|
|
12
|
+
size?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledSheet: import("styled-components").StyledComponent<"aside", DefaultTheme, {
|
|
15
|
+
'data-garden-id': string;
|
|
16
|
+
'data-garden-version': string;
|
|
17
|
+
} & IStyledSheetProps, "data-garden-id" | "data-garden-version">;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export declare const StyledSheetBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
'data-garden-version': string;
|
|
10
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledSheetClose: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
'data-garden-version': string;
|
|
11
|
+
} & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledSheetDescription: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
'data-garden-version': string;
|
|
11
|
+
} & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export interface IStyledSheetFooterProps {
|
|
9
|
+
/** Sets the SheetFooter padding to half the standard and centers the elements */
|
|
10
|
+
isCompact?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledSheetFooter: import("styled-components").StyledComponent<"footer", DefaultTheme, {
|
|
13
|
+
'data-garden-id': string;
|
|
14
|
+
'data-garden-version': string;
|
|
15
|
+
} & IStyledSheetFooterProps & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledSheetFooterItem: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
'data-garden-version': string;
|
|
11
|
+
} & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledSheetHeader: import("styled-components").StyledComponent<"header", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
'data-garden-version': string;
|
|
11
|
+
} & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
export declare const StyledSheetTitle: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
9
|
+
'data-garden-id': string;
|
|
10
|
+
'data-garden-version': string;
|
|
11
|
+
} & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
+
interface IStyledSheetWrapperProps {
|
|
9
|
+
isOpen?: boolean;
|
|
10
|
+
isAnimated?: boolean;
|
|
11
|
+
placement?: 'start' | 'end';
|
|
12
|
+
size?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledSheetWrapper: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
15
|
+
'data-garden-id': string;
|
|
16
|
+
'data-garden-version': string;
|
|
17
|
+
} & IStyledSheetWrapperProps & ThemeProps<DefaultTheme>, "data-garden-id" | "data-garden-version">;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { MutableRefObject } from 'react';
|
|
8
|
+
export interface IUseFocusableMountProp {
|
|
9
|
+
isMounted?: boolean;
|
|
10
|
+
focusOnMount?: boolean;
|
|
11
|
+
restoreFocus?: boolean;
|
|
12
|
+
targetRef: MutableRefObject<HTMLElement | null>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useFocusableMount({ isMounted, focusOnMount, restoreFocus, targetRef }: IUseFocusableMountProp): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
8
|
+
export interface ISheetContext {
|
|
9
|
+
titleId?: string;
|
|
10
|
+
descriptionId?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const SheetContext: import("react").Context<ISheetContext>;
|
|
13
|
+
export declare const useSheetContext: () => ISheetContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-chrome",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.47.0",
|
|
4
4
|
"description": "Components relating to Chrome within the Garden Design System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-accordion": "^1.0.3",
|
|
25
|
-
"@zendeskgarden/container-keyboardfocus": "^0.4.7",
|
|
26
25
|
"@zendeskgarden/container-utilities": "^0.6.0",
|
|
26
|
+
"dom-helpers": "^5.2.1",
|
|
27
27
|
"polished": "^4.0.0",
|
|
28
|
-
"prop-types": "^15.5.7"
|
|
28
|
+
"prop-types": "^15.5.7",
|
|
29
|
+
"react-merge-refs": "^1.1.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"@zendeskgarden/react-theming": "^8.1.0",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@zendeskgarden/react-theming": "^8.
|
|
38
|
+
"@zendeskgarden/react-theming": "^8.47.0",
|
|
38
39
|
"@zendeskgarden/svg-icons": "6.30.2"
|
|
39
40
|
},
|
|
40
41
|
"keywords": [
|
|
@@ -47,5 +48,5 @@
|
|
|
47
48
|
"access": "public"
|
|
48
49
|
},
|
|
49
50
|
"zendeskgarden:src": "src/index.ts",
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "aba4138c9eb030ab3f204ba783b340ca55be6988"
|
|
51
52
|
}
|