@zendeskgarden/react-chrome 9.0.0-next.1 → 9.0.0-next.11
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 +26 -27
- package/dist/esm/elements/Chrome.js +94 -0
- package/dist/esm/elements/SkipNav.js +65 -0
- package/dist/esm/elements/body/Body.js +57 -0
- package/dist/esm/elements/body/Content.js +54 -0
- package/dist/esm/elements/body/Main.js +47 -0
- package/dist/esm/elements/footer/Footer.js +67 -0
- package/dist/esm/elements/footer/FooterItem.js +47 -0
- package/dist/esm/elements/header/Header.js +60 -0
- package/dist/esm/elements/header/HeaderItem.js +69 -0
- package/dist/esm/elements/header/HeaderItemIcon.js +66 -0
- package/dist/esm/elements/header/HeaderItemText.js +51 -0
- package/dist/esm/elements/header/HeaderItemWrapper.js +47 -0
- package/dist/esm/elements/nav/Nav.js +78 -0
- package/dist/esm/elements/nav/NavItem.js +101 -0
- package/dist/esm/elements/nav/NavItemIcon.js +66 -0
- package/dist/esm/elements/nav/NavItemText.js +58 -0
- package/dist/esm/elements/nav/NavList.js +55 -0
- package/dist/esm/elements/sheet/Sheet.js +128 -0
- package/dist/esm/elements/sheet/components/Body.js +50 -0
- package/dist/esm/elements/sheet/components/Close.js +60 -0
- package/dist/esm/elements/sheet/components/Description.js +59 -0
- package/dist/esm/elements/sheet/components/Footer.js +50 -0
- package/dist/esm/elements/sheet/components/FooterItem.js +50 -0
- package/dist/esm/elements/sheet/components/Header.js +55 -0
- package/dist/esm/elements/sheet/components/Title.js +59 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +26 -0
- package/dist/esm/styled/StyledChrome.js +22 -0
- package/dist/esm/styled/StyledSkipNav.js +46 -0
- package/dist/esm/styled/StyledSkipNavIcon.js +28 -0
- package/dist/esm/styled/body/StyledBody.js +22 -0
- package/dist/esm/styled/body/StyledContent.js +25 -0
- package/dist/esm/styled/body/StyledMain.js +22 -0
- package/dist/esm/styled/footer/StyledFooter.js +25 -0
- package/dist/esm/styled/footer/StyledFooterItem.js +22 -0
- package/dist/esm/styled/header/StyledBaseHeaderItem.js +35 -0
- package/dist/esm/styled/header/StyledHeader.js +31 -0
- package/dist/esm/styled/header/StyledHeaderItem.js +37 -0
- package/dist/esm/styled/header/StyledHeaderItemIcon.js +22 -0
- package/dist/esm/styled/header/StyledHeaderItemText.js +23 -0
- package/dist/esm/styled/header/StyledHeaderItemWrapper.js +24 -0
- package/dist/esm/styled/header/StyledLogoHeaderItem.js +43 -0
- package/dist/esm/styled/nav/StyledBaseNavItem.js +32 -0
- package/dist/esm/styled/nav/StyledBrandmarkNavItem.js +23 -0
- package/dist/esm/styled/nav/StyledLogoNavItem.js +44 -0
- package/dist/esm/styled/nav/StyledNav.js +34 -0
- package/dist/esm/styled/nav/StyledNavButton.js +65 -0
- package/dist/esm/styled/nav/StyledNavItemIcon.js +22 -0
- package/dist/esm/styled/nav/StyledNavItemText.js +34 -0
- package/dist/esm/styled/nav/StyledNavList.js +22 -0
- package/dist/esm/styled/nav/StyledNavListItem.js +22 -0
- package/dist/esm/styled/sheet/StyledSheet.js +41 -0
- package/dist/esm/styled/sheet/StyledSheetBody.js +22 -0
- package/dist/esm/styled/sheet/StyledSheetClose.js +34 -0
- package/dist/esm/styled/sheet/StyledSheetDescription.js +22 -0
- package/dist/esm/styled/sheet/StyledSheetFooter.js +22 -0
- package/dist/esm/styled/sheet/StyledSheetFooterItem.js +22 -0
- package/dist/esm/styled/sheet/StyledSheetHeader.js +23 -0
- package/dist/esm/styled/sheet/StyledSheetTitle.js +22 -0
- package/dist/esm/styled/sheet/StyledSheetWrapper.js +37 -0
- package/dist/esm/types/index.js +10 -0
- package/dist/esm/utils/useBodyContext.js +14 -0
- package/dist/esm/utils/useChromeContext.js +16 -0
- package/dist/esm/utils/useFocusableMount.js +31 -0
- package/dist/esm/utils/useNavContext.js +16 -0
- package/dist/esm/utils/useNavListContext.js +14 -0
- package/dist/esm/utils/useSheetContext.js +16 -0
- package/dist/index.cjs.js +373 -619
- package/dist/typings/elements/body/Body.d.ts +1 -2
- package/dist/typings/elements/footer/Footer.d.ts +8 -1
- package/dist/typings/elements/footer/FooterItem.d.ts +2 -0
- package/dist/typings/elements/header/Header.d.ts +11 -1
- package/dist/typings/elements/header/HeaderItem.d.ts +2 -0
- package/dist/typings/elements/header/HeaderItemIcon.d.ts +5 -3
- package/dist/typings/elements/header/HeaderItemText.d.ts +2 -0
- package/dist/typings/elements/header/HeaderItemWrapper.d.ts +2 -0
- package/dist/typings/elements/nav/Nav.d.ts +11 -1
- package/dist/typings/elements/nav/NavItem.d.ts +2 -0
- package/dist/typings/elements/nav/NavItemIcon.d.ts +5 -3
- package/dist/typings/elements/nav/NavItemText.d.ts +2 -0
- package/dist/typings/elements/{body/Sidebar.d.ts → nav/NavList.d.ts} +2 -2
- package/dist/typings/index.d.ts +9 -16
- package/dist/typings/styled/index.d.ts +3 -8
- package/dist/typings/styled/nav/StyledBaseNavItem.d.ts +1 -5
- package/dist/typings/styled/nav/StyledBrandmarkNavItem.d.ts +4 -5
- package/dist/typings/styled/nav/StyledLogoNavItem.d.ts +4 -5
- package/dist/typings/styled/nav/{StyledNavItem.d.ts → StyledNavButton.d.ts} +3 -1
- package/dist/typings/styled/{body/StyledSidebar.d.ts → nav/StyledNavList.d.ts} +1 -1
- package/dist/typings/styled/nav/StyledNavListItem.d.ts +10 -0
- package/dist/typings/types/index.d.ts +3 -30
- package/dist/typings/utils/useBodyContext.d.ts +3 -2
- package/dist/typings/utils/useNavListContext.d.ts +13 -0
- package/package.json +6 -8
- package/dist/index.esm.js +0 -1449
- package/dist/typings/elements/subnav/CollapsibleSubNavItem.d.ts +0 -12
- package/dist/typings/elements/subnav/SubNav.d.ts +0 -11
- package/dist/typings/elements/subnav/SubNavItem.d.ts +0 -12
- package/dist/typings/elements/subnav/SubNavItemText.d.ts +0 -12
- package/dist/typings/styled/subnav/StyledSubNav.d.ts +0 -17
- package/dist/typings/styled/subnav/StyledSubNavItem.d.ts +0 -21
- package/dist/typings/styled/subnav/StyledSubNavItemHeader.d.ts +0 -14
- package/dist/typings/styled/subnav/StyledSubNavItemIcon.d.ts +0 -14
- package/dist/typings/styled/subnav/StyledSubNavItemText.d.ts +0 -11
- package/dist/typings/styled/subnav/StyledSubNavPanel.d.ts +0 -12
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { IBodyProps } from '../../types';
|
|
9
8
|
/**
|
|
10
9
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
10
|
*/
|
|
12
|
-
export declare const Body: React.ForwardRefExoticComponent<
|
|
11
|
+
export declare const Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import { FooterItem } from './FooterItem';
|
|
8
9
|
/**
|
|
9
10
|
* @extends HTMLAttributes<HTMLElement>
|
|
10
11
|
*/
|
|
11
|
-
export declare const
|
|
12
|
+
export declare const FooterComponent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
/**
|
|
14
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
15
|
+
*/
|
|
16
|
+
export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>> & {
|
|
17
|
+
Item: typeof FooterItem;
|
|
18
|
+
};
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
/**
|
|
9
|
+
* @deprecated use `Footer.Item` instead
|
|
10
|
+
*
|
|
9
11
|
* @extends HTMLAttributes<HTMLElement>
|
|
10
12
|
*/
|
|
11
13
|
export declare const FooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -6,7 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IHeaderProps } from '../../types';
|
|
9
|
+
import { HeaderItem } from './HeaderItem';
|
|
10
|
+
import { HeaderItemIcon } from './HeaderItemIcon';
|
|
11
|
+
import { HeaderItemText } from './HeaderItemText';
|
|
12
|
+
import { HeaderItemWrapper } from './HeaderItemWrapper';
|
|
13
|
+
export declare const HeaderComponent: React.ForwardRefExoticComponent<IHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
9
14
|
/**
|
|
10
15
|
* @extends HTMLAttributes<HTMLElement>
|
|
11
16
|
*/
|
|
12
|
-
export declare const Header: React.ForwardRefExoticComponent<IHeaderProps & React.RefAttributes<HTMLElement
|
|
17
|
+
export declare const Header: React.ForwardRefExoticComponent<IHeaderProps & React.RefAttributes<HTMLElement>> & {
|
|
18
|
+
Item: typeof HeaderItem;
|
|
19
|
+
ItemIcon: typeof HeaderItemIcon;
|
|
20
|
+
ItemText: typeof HeaderItemText;
|
|
21
|
+
ItemWrapper: typeof HeaderItemWrapper;
|
|
22
|
+
};
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IHeaderItemProps } from '../../types';
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated use `Header.Item` instead
|
|
11
|
+
*
|
|
10
12
|
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
11
13
|
*/
|
|
12
14
|
export declare const HeaderItem: React.ForwardRefExoticComponent<IHeaderItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -4,8 +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 React, {
|
|
7
|
+
import React, { PropsWithChildren, SVGAttributes } from 'react';
|
|
8
8
|
/**
|
|
9
|
-
* @
|
|
9
|
+
* @deprecated use `Header.ItemIcon` instead
|
|
10
|
+
*
|
|
11
|
+
* @extends SVGAttributes<SVGElement>
|
|
10
12
|
*/
|
|
11
|
-
export declare const HeaderItemIcon: ({ children, ...props }: PropsWithChildren<
|
|
13
|
+
export declare const HeaderItemIcon: ({ children, ...props }: PropsWithChildren<SVGAttributes<SVGElement>>) => React.JSX.Element | null;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IHeaderItemTextProps } from '../../types';
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated use `Header.ItemText` instead
|
|
11
|
+
*
|
|
10
12
|
* @extends HTMLAttributes<HTMLSpanElement>
|
|
11
13
|
*/
|
|
12
14
|
export declare const HeaderItemText: React.ForwardRefExoticComponent<IHeaderItemTextProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IHeaderItemWrapperProps } from '../../types';
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated use `Header.ItemWrapper` instead
|
|
11
|
+
*
|
|
10
12
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
13
|
*/
|
|
12
14
|
export declare const HeaderItemWrapper: React.ForwardRefExoticComponent<IHeaderItemWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -6,7 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { INavProps } from '../../types';
|
|
9
|
+
import { NavItem } from './NavItem';
|
|
10
|
+
import { NavItemIcon } from './NavItemIcon';
|
|
11
|
+
import { NavItemText } from './NavItemText';
|
|
12
|
+
import { NavList } from './NavList';
|
|
13
|
+
export declare const NavComponent: React.ForwardRefExoticComponent<INavProps & React.RefAttributes<HTMLElement>>;
|
|
9
14
|
/**
|
|
10
15
|
* @extends HTMLAttributes<HTMLElement>
|
|
11
16
|
*/
|
|
12
|
-
export declare const Nav: React.ForwardRefExoticComponent<INavProps & React.RefAttributes<HTMLElement
|
|
17
|
+
export declare const Nav: React.ForwardRefExoticComponent<INavProps & React.RefAttributes<HTMLElement>> & {
|
|
18
|
+
List: typeof NavList;
|
|
19
|
+
Item: typeof NavItem;
|
|
20
|
+
ItemIcon: typeof NavItemIcon;
|
|
21
|
+
ItemText: typeof NavItemText;
|
|
22
|
+
};
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { INavItemProps } from '../../types';
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated use `Nav.Item` instead
|
|
11
|
+
*
|
|
10
12
|
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
11
13
|
*/
|
|
12
14
|
export declare const NavItem: React.ForwardRefExoticComponent<INavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -4,8 +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 React, {
|
|
7
|
+
import React, { SVGAttributes, PropsWithChildren } from 'react';
|
|
8
8
|
/**
|
|
9
|
-
* @
|
|
9
|
+
* @deprecated use `Nav.ItemIcon` instead
|
|
10
|
+
*
|
|
11
|
+
* @extends SVGAttributes<SVGElement>
|
|
10
12
|
*/
|
|
11
|
-
export declare const NavItemIcon: ({ children, ...props }: PropsWithChildren<
|
|
13
|
+
export declare const NavItemIcon: ({ children, ...props }: PropsWithChildren<SVGAttributes<SVGElement>>) => React.JSX.Element | null;
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { INavItemTextProps } from '../../types';
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated use `Nav.ItemText` instead
|
|
11
|
+
*
|
|
10
12
|
* @extends HTMLAttributes<HTMLSpanElement>
|
|
11
13
|
*/
|
|
12
14
|
export declare const NavItemText: React.ForwardRefExoticComponent<INavItemTextProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
/**
|
|
9
|
-
* @extends HTMLAttributes<
|
|
9
|
+
* @extends HTMLAttributes<HTMLUListElement>
|
|
10
10
|
*/
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const NavList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLUListElement> & React.RefAttributes<HTMLUListElement>>;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,28 +4,21 @@
|
|
|
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 { Chrome } from './elements/Chrome';
|
|
8
|
-
export { SkipNav } from './elements/SkipNav';
|
|
9
|
-
export { Body } from './elements/body/Body';
|
|
10
|
-
export { Content } from './elements/body/Content';
|
|
11
|
-
export { Main } from './elements/body/Main';
|
|
12
|
-
export { Sidebar } from './elements/body/Sidebar';
|
|
13
|
-
export { Header } from './elements/header/Header';
|
|
14
7
|
export { HeaderItem } from './elements/header/HeaderItem';
|
|
15
8
|
export { HeaderItemIcon } from './elements/header/HeaderItemIcon';
|
|
16
9
|
export { HeaderItemText } from './elements/header/HeaderItemText';
|
|
17
10
|
export { HeaderItemWrapper } from './elements/header/HeaderItemWrapper';
|
|
18
|
-
export { Footer } from './elements/footer/Footer';
|
|
19
11
|
export { FooterItem } from './elements/footer/FooterItem';
|
|
20
|
-
export { Nav } from './elements/nav/Nav';
|
|
21
12
|
export { NavItem } from './elements/nav/NavItem';
|
|
22
13
|
export { NavItemIcon } from './elements/nav/NavItemIcon';
|
|
23
14
|
export { NavItemText } from './elements/nav/NavItemText';
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
15
|
+
export { Chrome } from './elements/Chrome';
|
|
16
|
+
export { SkipNav } from './elements/SkipNav';
|
|
17
|
+
export { Body } from './elements/body/Body';
|
|
18
|
+
export { Content } from './elements/body/Content';
|
|
19
|
+
export { Main } from './elements/body/Main';
|
|
20
|
+
export { Header } from './elements/header/Header';
|
|
21
|
+
export { Footer } from './elements/footer/Footer';
|
|
22
|
+
export { Nav } from './elements/nav/Nav';
|
|
28
23
|
export { Sheet } from './elements/sheet/Sheet';
|
|
29
|
-
export {
|
|
30
|
-
/** @deprecated can be accessed via IHeaderItemProps['product'] */
|
|
31
|
-
type Product as PRODUCT } from './types';
|
|
24
|
+
export { PRODUCTS, type IChromeProps, type ISkipNavProps, type IHeaderProps, type IHeaderItemProps, type IHeaderItemTextProps, type IHeaderItemWrapperProps, type INavProps, type INavItemProps, type INavItemTextProps, type ISheetProps, type ISheetFooterProps } from './types';
|
|
@@ -10,7 +10,6 @@ export { StyledSkipNavIcon } from './StyledSkipNavIcon';
|
|
|
10
10
|
export { StyledBody } from './body/StyledBody';
|
|
11
11
|
export { StyledContent } from './body/StyledContent';
|
|
12
12
|
export { StyledMain } from './body/StyledMain';
|
|
13
|
-
export { StyledSidebar } from './body/StyledSidebar';
|
|
14
13
|
export { StyledFooter } from './footer/StyledFooter';
|
|
15
14
|
export { StyledFooterItem } from './footer/StyledFooterItem';
|
|
16
15
|
export { StyledHeader } from './header/StyledHeader';
|
|
@@ -21,18 +20,14 @@ export { StyledLogoHeaderItem } from './header/StyledLogoHeaderItem';
|
|
|
21
20
|
export { StyledHeaderItemText } from './header/StyledHeaderItemText';
|
|
22
21
|
export { StyledHeaderItemWrapper } from './header/StyledHeaderItemWrapper';
|
|
23
22
|
export { StyledNav } from './nav/StyledNav';
|
|
23
|
+
export { StyledNavList } from './nav/StyledNavList';
|
|
24
|
+
export { StyledNavListItem } from './nav/StyledNavListItem';
|
|
24
25
|
export { StyledBaseNavItem } from './nav/StyledBaseNavItem';
|
|
25
26
|
export { StyledLogoNavItem } from './nav/StyledLogoNavItem';
|
|
26
27
|
export { StyledBrandmarkNavItem } from './nav/StyledBrandmarkNavItem';
|
|
27
|
-
export {
|
|
28
|
+
export { StyledNavButton } from './nav/StyledNavButton';
|
|
28
29
|
export { StyledNavItemIcon } from './nav/StyledNavItemIcon';
|
|
29
30
|
export { StyledNavItemText } from './nav/StyledNavItemText';
|
|
30
|
-
export { StyledSubNav } from './subnav/StyledSubNav';
|
|
31
|
-
export { StyledSubNavItem } from './subnav/StyledSubNavItem';
|
|
32
|
-
export { StyledSubNavItemText } from './subnav/StyledSubNavItemText';
|
|
33
|
-
export { StyledSubNavItemHeader } from './subnav/StyledSubNavItemHeader';
|
|
34
|
-
export { StyledSubNavItemIconWrapper, StyledSubNavItemIcon } from './subnav/StyledSubNavItemIcon';
|
|
35
|
-
export { StyledSubNavPanel } from './subnav/StyledSubNavPanel';
|
|
36
31
|
export { StyledSheet } from './sheet/StyledSheet';
|
|
37
32
|
export { StyledSheetWrapper } from './sheet/StyledSheetWrapper';
|
|
38
33
|
export { StyledSheetTitle } from './sheet/StyledSheetTitle';
|
|
@@ -6,11 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
8
|
export declare const getNavItemHeight: (props: ThemeProps<DefaultTheme>) => string;
|
|
9
|
-
|
|
10
|
-
* 1. Button reset.
|
|
11
|
-
* 2. Anchor reset.
|
|
12
|
-
*/
|
|
13
|
-
export declare const StyledBaseNavItem: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
9
|
+
export declare const StyledBaseNavItem: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
14
10
|
'data-garden-id': string;
|
|
15
11
|
'data-garden-version': string;
|
|
16
12
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -4,11 +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
|
+
/**
|
|
8
|
+
* 1. Overrides flex default `min-height: auto`
|
|
9
|
+
*/
|
|
7
10
|
export declare const StyledBrandmarkNavItem: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
8
11
|
'data-garden-id': string;
|
|
9
12
|
'data-garden-version': string;
|
|
10
|
-
}
|
|
11
|
-
'data-garden-id': string;
|
|
12
|
-
'data-garden-version': string;
|
|
13
|
-
as: string;
|
|
14
|
-
}, "as" | "data-garden-id" | "data-garden-version">;
|
|
13
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -11,11 +11,10 @@ export interface IStyledLogoNavItemProps extends ThemeProps<DefaultTheme> {
|
|
|
11
11
|
isDark?: boolean;
|
|
12
12
|
isLight?: boolean;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* 1. Overrides flex default `min-height: auto`
|
|
16
|
+
*/
|
|
14
17
|
export declare const StyledLogoNavItem: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
15
18
|
'data-garden-id': string;
|
|
16
19
|
'data-garden-version': string;
|
|
17
|
-
} &
|
|
18
|
-
'data-garden-id': string;
|
|
19
|
-
'data-garden-version': string;
|
|
20
|
-
as: string;
|
|
21
|
-
} & IStyledLogoNavItemProps, "as" | "data-garden-id" | "data-garden-version">;
|
|
20
|
+
} & IStyledLogoNavItemProps, "data-garden-id" | "data-garden-version">;
|
|
@@ -17,8 +17,10 @@ interface IStyledNavItemProps extends ThemeProps<DefaultTheme> {
|
|
|
17
17
|
* 2. Button reset
|
|
18
18
|
* 3. Override `focusStyles` outline (in `colorStyles`)
|
|
19
19
|
* 4. Use of negative offset to create an inset outline
|
|
20
|
+
* 5. Overrides flex default `min-width: auto`
|
|
21
|
+
* https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox
|
|
20
22
|
*/
|
|
21
|
-
export declare const
|
|
23
|
+
export declare const StyledNavButton: import("styled-components").StyledComponent<"button", DefaultTheme, {
|
|
22
24
|
'data-garden-id': string;
|
|
23
25
|
'data-garden-version': string;
|
|
24
26
|
as: string;
|
|
@@ -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 StyledNavList: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {
|
|
8
8
|
'data-garden-id': string;
|
|
9
9
|
'data-garden-version': string;
|
|
10
10
|
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -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 StyledNavListItem: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {
|
|
8
|
+
'data-garden-id': string;
|
|
9
|
+
'data-garden-version': string;
|
|
10
|
+
}, "data-garden-id" | "data-garden-version">;
|
|
@@ -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 { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes
|
|
7
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
8
8
|
export declare const PLACEMENT: readonly ["end", "start"];
|
|
9
|
-
export declare const
|
|
10
|
-
export type Product = (typeof
|
|
9
|
+
export declare const PRODUCTS: readonly ["chat", "explore", "guide", "support", "talk"];
|
|
10
|
+
export type Product = (typeof PRODUCTS)[number];
|
|
11
11
|
export interface IChromeProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
12
|
/** Applies a custom hue to the chrome navigation */
|
|
13
13
|
hue?: string;
|
|
@@ -20,10 +20,6 @@ export interface ISkipNavProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
20
20
|
/** Sets the `z-index` of the element */
|
|
21
21
|
zIndex?: number;
|
|
22
22
|
}
|
|
23
|
-
export interface IBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
24
|
-
/** Adjusts the body content height to allow space for a footer component */
|
|
25
|
-
hasFooter?: boolean;
|
|
26
|
-
}
|
|
27
23
|
export interface IHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
28
24
|
/** Displays logo for standlone usage */
|
|
29
25
|
isStandalone?: boolean;
|
|
@@ -74,29 +70,6 @@ export interface INavItemTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
74
70
|
/** Wraps overflow item text instead of truncating long strings with an ellipsis */
|
|
75
71
|
isWrapped?: boolean;
|
|
76
72
|
}
|
|
77
|
-
export interface ISubNavItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
78
|
-
/** Indicates that the item is current in the subnav */
|
|
79
|
-
isCurrent?: boolean;
|
|
80
|
-
}
|
|
81
|
-
export interface ISubNavItemTextProps extends HTMLAttributes<HTMLSpanElement> {
|
|
82
|
-
/**
|
|
83
|
-
* Wraps overflow item text instead of truncating long strings with an ellipsis.
|
|
84
|
-
* Use when `max-width` styling is applied to the subnav container.
|
|
85
|
-
*/
|
|
86
|
-
isWrapped?: boolean;
|
|
87
|
-
}
|
|
88
|
-
export interface ICollapsibleSubNavItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
89
|
-
/** Sets the item's section header */
|
|
90
|
-
header?: ReactNode;
|
|
91
|
-
/** Reveals the item's section */
|
|
92
|
-
isExpanded?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Handles changes in the item's expansion state
|
|
95
|
-
*
|
|
96
|
-
* @param {boolean} isExpanded An item's expansion state
|
|
97
|
-
*/
|
|
98
|
-
onChange?: (isExpanded: boolean) => void;
|
|
99
|
-
}
|
|
100
73
|
export interface ISheetProps extends HTMLAttributes<HTMLElement> {
|
|
101
74
|
/** Opens the sheet */
|
|
102
75
|
isOpen?: boolean;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
interface IBodyContext {
|
|
9
9
|
hasFooter: boolean;
|
|
10
|
+
setHasFooter: (footerPresent: boolean) => void;
|
|
10
11
|
}
|
|
11
|
-
export declare const BodyContext: React.Context<IBodyContext>;
|
|
12
|
-
export declare const useBodyContext: () => IBodyContext;
|
|
12
|
+
export declare const BodyContext: React.Context<IBodyContext | undefined>;
|
|
13
|
+
export declare const useBodyContext: () => IBodyContext | undefined;
|
|
13
14
|
export {};
|
|
@@ -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
|
+
import React from 'react';
|
|
8
|
+
interface INavListContext {
|
|
9
|
+
hasList: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const NavListContext: React.Context<INavListContext | undefined>;
|
|
12
|
+
export declare const useNavListContext: () => INavListContext | undefined;
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-chrome",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.11",
|
|
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>",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/zendeskgarden/react-components/issues"
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/index.cjs.js",
|
|
13
|
-
"module": "dist/index.
|
|
13
|
+
"module": "dist/esm/index.js",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
@@ -21,21 +21,19 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zendeskgarden/container-accordion": "^3.0.4",
|
|
25
|
-
"@zendeskgarden/container-utilities": "^2.0.0",
|
|
26
24
|
"dom-helpers": "^5.2.1",
|
|
27
25
|
"polished": "^4.0.0",
|
|
28
26
|
"prop-types": "^15.5.7",
|
|
29
27
|
"react-merge-refs": "^2.0.0"
|
|
30
28
|
},
|
|
31
29
|
"peerDependencies": {
|
|
32
|
-
"@zendeskgarden/react-theming": "
|
|
30
|
+
"@zendeskgarden/react-theming": ">=9.0.0-next",
|
|
33
31
|
"react": ">=16.8.0",
|
|
34
32
|
"react-dom": ">=16.8.0",
|
|
35
|
-
"styled-components": "^5.1
|
|
33
|
+
"styled-components": "^5.3.1"
|
|
36
34
|
},
|
|
37
35
|
"devDependencies": {
|
|
38
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.11",
|
|
39
37
|
"@zendeskgarden/svg-icons": "7.0.0"
|
|
40
38
|
},
|
|
41
39
|
"keywords": [
|
|
@@ -48,5 +46,5 @@
|
|
|
48
46
|
"access": "public"
|
|
49
47
|
},
|
|
50
48
|
"zendeskgarden:src": "src/index.ts",
|
|
51
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0de1cc664807bd993ccd3beeb78e8fd1f3828320"
|
|
52
50
|
}
|