@zendeskgarden/react-chrome 9.0.0-next.6 → 9.0.0-next.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/README.md +13 -10
- 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 +47 -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 +48 -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 +209 -471
- package/dist/typings/elements/nav/Nav.d.ts +2 -0
- package/dist/typings/elements/{body/Sidebar.d.ts → nav/NavList.d.ts} +2 -2
- package/dist/typings/index.d.ts +1 -6
- 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 +1 -24
- package/dist/typings/utils/useNavListContext.d.ts +13 -0
- package/package.json +5 -7
- package/dist/index.esm.js +0 -1473
- package/dist/typings/elements/subnav/CollapsibleSubNavItem.d.ts +0 -14
- package/dist/typings/elements/subnav/SubNav.d.ts +0 -19
- package/dist/typings/elements/subnav/SubNavItem.d.ts +0 -14
- package/dist/typings/elements/subnav/SubNavItemText.d.ts +0 -14
- 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
|
@@ -0,0 +1,25 @@
|
|
|
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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.footer';
|
|
11
|
+
const getFooterHeight = props => {
|
|
12
|
+
return `${props.theme.space.base * 20}px`;
|
|
13
|
+
};
|
|
14
|
+
const StyledFooter = styled.footer.attrs({
|
|
15
|
+
'data-garden-id': COMPONENT_ID,
|
|
16
|
+
'data-garden-version': '9.0.0-next.8'
|
|
17
|
+
}).withConfig({
|
|
18
|
+
displayName: "StyledFooter",
|
|
19
|
+
componentId: "sc-v7lib2-0"
|
|
20
|
+
})(["display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;border-top:", ";background-color:", ";padding:0 ", "px;height:", ";", ";"], props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 300, props.theme)}`, props => getColorV8('background', 600 , props.theme), props => props.theme.space.base * 9, getFooterHeight, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
|
+
StyledFooter.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledFooter, getFooterHeight };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.footer_item';
|
|
11
|
+
const StyledFooterItem = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledFooterItem",
|
|
16
|
+
componentId: "sc-1cktm85-0"
|
|
17
|
+
})(["margin:", ";", ";"], props => `0 ${props.theme.space.base}px`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledFooterItem.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledFooterItem };
|
|
@@ -0,0 +1,35 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getLineHeight } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.base_header_item';
|
|
11
|
+
const getHeaderItemSize = props => `${props.theme.space.base * 7.5}px`;
|
|
12
|
+
const sizeStyles = props => {
|
|
13
|
+
const size = props.theme.space.base * 7.5;
|
|
14
|
+
return css(["padding:0 3px;min-width:", "px;height:", ";line-height:", ";"], size, props.maxY ? '100%' : `${size}px`, getLineHeight(size, props.theme.fontSizes.md));
|
|
15
|
+
};
|
|
16
|
+
const StyledBaseHeaderItem = styled.button.attrs({
|
|
17
|
+
'data-garden-id': COMPONENT_ID,
|
|
18
|
+
'data-garden-version': '9.0.0-next.8'
|
|
19
|
+
}).withConfig({
|
|
20
|
+
displayName: "StyledBaseHeaderItem",
|
|
21
|
+
componentId: "sc-1qua7h6-0"
|
|
22
|
+
})(["display:inline-flex;position:relative;flex:", ";align-items:center;justify-content:", ";order:1;transition:box-shadow 0.1s ease-in-out,color 0.1s ease-in-out;z-index:0;margin:", ";border:none;border-radius:", ";background:transparent;text-decoration:none;white-space:nowrap;color:inherit;font-size:inherit;", " ", ";"], props => props.maxX && '1', props => props.maxX ? 'start' : 'center', props => `0 ${props.theme.space.base * 3}px`, props => {
|
|
23
|
+
if (props.isRound) {
|
|
24
|
+
return '100%';
|
|
25
|
+
}
|
|
26
|
+
if (props.maxY) {
|
|
27
|
+
return '0';
|
|
28
|
+
}
|
|
29
|
+
return props.theme.borderRadii.md;
|
|
30
|
+
}, sizeStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
31
|
+
StyledBaseHeaderItem.defaultProps = {
|
|
32
|
+
theme: DEFAULT_THEME
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { StyledBaseHeaderItem, getHeaderItemSize };
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledLogoHeaderItem } from './StyledLogoHeaderItem.js';
|
|
10
|
+
import { getNavItemHeight } from '../nav/StyledBaseNavItem.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'chrome.header';
|
|
13
|
+
const getHeaderHeight = props => {
|
|
14
|
+
return getNavItemHeight(props);
|
|
15
|
+
};
|
|
16
|
+
const StyledHeader = styled.header.attrs({
|
|
17
|
+
'data-garden-id': COMPONENT_ID,
|
|
18
|
+
'data-garden-version': '9.0.0-next.8'
|
|
19
|
+
}).withConfig({
|
|
20
|
+
displayName: "StyledHeader",
|
|
21
|
+
componentId: "sc-1cexpz-0"
|
|
22
|
+
})(["display:flex;position:", ";align-items:center;justify-content:flex-end;box-sizing:border-box;border-bottom:", ";box-shadow:", ";background-color:", ";padding:0 ", "px;height:", ";color:", ";font-size:", ";", " ", ";"], props => props.isStandalone && 'relative', props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 300, props.theme)}`, props => props.isStandalone && props.theme.shadows.lg('0', '10px', getColorV8('chromeHue', 600, props.theme, 0.15)), props => getColorV8('background', 600 , props.theme), props => props.theme.space.base, getHeaderHeight, props => getColorV8('neutralHue', 600, props.theme), props => props.theme.fontSizes.md, props => props.isStandalone && `
|
|
23
|
+
${StyledLogoHeaderItem} {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
}
|
|
26
|
+
`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
27
|
+
StyledHeader.defaultProps = {
|
|
28
|
+
theme: DEFAULT_THEME
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { StyledHeader, getHeaderHeight };
|
|
@@ -0,0 +1,37 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { math } from 'polished';
|
|
9
|
+
import { focusStyles, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledHeaderItemIcon } from './StyledHeaderItemIcon.js';
|
|
11
|
+
import { StyledBaseHeaderItem, getHeaderItemSize } from './StyledBaseHeaderItem.js';
|
|
12
|
+
import { StyledHeaderItemText } from './StyledHeaderItemText.js';
|
|
13
|
+
|
|
14
|
+
const COMPONENT_ID = 'chrome.header_item';
|
|
15
|
+
const imgStyles = props => {
|
|
16
|
+
const size = math(`${getHeaderItemSize(props)} - ${props.theme.space.base * 2}`);
|
|
17
|
+
return css(["img{margin:0;border-radius:", ";width:", ";height:", ";}"], math(`${props.theme.borderRadii.md} - 1`), size, size);
|
|
18
|
+
};
|
|
19
|
+
const StyledHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
20
|
+
'data-garden-id': COMPONENT_ID,
|
|
21
|
+
'data-garden-version': '9.0.0-next.8'
|
|
22
|
+
}).withConfig({
|
|
23
|
+
displayName: "StyledHeaderItem",
|
|
24
|
+
componentId: "sc-14sft6n-0"
|
|
25
|
+
})(["&:hover,&:focus{text-decoration:none;color:inherit;}", " &:focus-visible:active{box-shadow:none;}&:hover ", ",&:hover ", ",&:active ", ",&:active ", "{color:", ";}", " ", " ", ";"], props => focusStyles({
|
|
26
|
+
theme: props.theme,
|
|
27
|
+
inset: props.maxY
|
|
28
|
+
}), StyledHeaderItemIcon, StyledHeaderItemText, StyledHeaderItemIcon, StyledHeaderItemText, props => getColorV8('chromeHue', 700, props.theme), imgStyles, props => props.isRound && `
|
|
29
|
+
${StyledHeaderItemIcon} {
|
|
30
|
+
border-radius: 100px;
|
|
31
|
+
}
|
|
32
|
+
`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
33
|
+
StyledHeaderItem.defaultProps = {
|
|
34
|
+
theme: DEFAULT_THEME
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { StyledHeaderItem };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.header_item_icon';
|
|
11
|
+
const StyledHeaderItemIcon = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledHeaderItemIcon",
|
|
16
|
+
componentId: "sc-1jhhp6z-0"
|
|
17
|
+
})(["transition:transform 0.25s ease-in-out;margin:0 3px;width:", ";min-width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledHeaderItemIcon.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledHeaderItemIcon };
|
|
@@ -0,0 +1,23 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.header_item_text';
|
|
11
|
+
const clippedStyling = css(["position:absolute;margin:0;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden;white-space:nowrap;"]);
|
|
12
|
+
const StyledHeaderItemText = styled.span.attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '9.0.0-next.8'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledHeaderItemText",
|
|
17
|
+
componentId: "sc-goz7la-0"
|
|
18
|
+
})(["margin:0 3px;", " ", ";"], props => props.isClipped && clippedStyling, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledHeaderItemText.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledHeaderItemText, clippedStyling };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { StyledBaseHeaderItem } from './StyledBaseHeaderItem.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'chrome.header_item_wrapper';
|
|
12
|
+
const StyledHeaderItemWrapper = styled(StyledBaseHeaderItem).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '9.0.0-next.8',
|
|
15
|
+
as: 'div'
|
|
16
|
+
}).withConfig({
|
|
17
|
+
displayName: "StyledHeaderItemWrapper",
|
|
18
|
+
componentId: "sc-1uieu55-0"
|
|
19
|
+
})(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
|
+
StyledHeaderItemWrapper.defaultProps = {
|
|
21
|
+
theme: DEFAULT_THEME
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { StyledHeaderItemWrapper };
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME, PALETTE } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledHeaderItemIcon } from './StyledHeaderItemIcon.js';
|
|
10
|
+
import { StyledBaseHeaderItem } from './StyledBaseHeaderItem.js';
|
|
11
|
+
import { StyledHeaderItemText, clippedStyling } from './StyledHeaderItemText.js';
|
|
12
|
+
import { getNavWidth } from '../nav/StyledNav.js';
|
|
13
|
+
|
|
14
|
+
const COMPONENT_ID = 'chrome.header_item';
|
|
15
|
+
const retrieveProductColor = props => {
|
|
16
|
+
switch (props.product) {
|
|
17
|
+
case 'chat':
|
|
18
|
+
return PALETTE.product.chat;
|
|
19
|
+
case 'connect':
|
|
20
|
+
return PALETTE.product.connect;
|
|
21
|
+
case 'explore':
|
|
22
|
+
return PALETTE.product.explore;
|
|
23
|
+
case 'guide':
|
|
24
|
+
return PALETTE.product.guide;
|
|
25
|
+
case 'message':
|
|
26
|
+
return PALETTE.product.message;
|
|
27
|
+
case 'support':
|
|
28
|
+
return PALETTE.product.support;
|
|
29
|
+
case 'talk':
|
|
30
|
+
return PALETTE.product.talk;
|
|
31
|
+
default:
|
|
32
|
+
return 'inherit';
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const StyledLogoHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
36
|
+
'data-garden-id': COMPONENT_ID,
|
|
37
|
+
'data-garden-version': '9.0.0-next.8',
|
|
38
|
+
as: 'div'
|
|
39
|
+
}).withConfig({
|
|
40
|
+
displayName: "StyledLogoHeaderItem",
|
|
41
|
+
componentId: "sc-1n1d1yv-0"
|
|
42
|
+
})(["display:none;order:0;margin-right:", ";margin-left:", ";border-", ":", ";border-radius:0;padding:0;width:", ";height:100%;overflow:hidden;fill:", ";text-decoration:none;color:", ";", "{", "}", "{margin:0;width:", ";height:", ";}", ";"], props => props.theme.rtl ? `-${props.theme.space.base}px` : 'auto', props => props.theme.rtl ? 'auto' : `-${props.theme.space.base}px`, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 300, props.theme)}`, props => getNavWidth(props), props => getColorV8('chromeHue', 700, props.theme), props => retrieveProductColor(props), StyledHeaderItemText, clippedStyling, StyledHeaderItemIcon, props => props.theme.iconSizes.lg, props => props.theme.iconSizes.lg, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
43
|
+
StyledLogoHeaderItem.defaultProps = {
|
|
44
|
+
theme: DEFAULT_THEME
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { StyledLogoHeaderItem };
|
|
@@ -0,0 +1,32 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { math } from 'polished';
|
|
9
|
+
import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { getNavWidth } from './StyledNav.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'chrome.base_nav_item';
|
|
13
|
+
const getNavItemHeight = props => {
|
|
14
|
+
return `${props.theme.space.base * 13}px`;
|
|
15
|
+
};
|
|
16
|
+
const sizeStyles = props => {
|
|
17
|
+
const verticalPadding = math(`(${getNavItemHeight(props)} - ${props.theme.iconSizes.lg}) / 2`);
|
|
18
|
+
const horizontalPadding = math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`);
|
|
19
|
+
return css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, getNavItemHeight);
|
|
20
|
+
};
|
|
21
|
+
const StyledBaseNavItem = styled.div.attrs({
|
|
22
|
+
'data-garden-id': COMPONENT_ID,
|
|
23
|
+
'data-garden-version': '9.0.0-next.8'
|
|
24
|
+
}).withConfig({
|
|
25
|
+
displayName: "StyledBaseNavItem",
|
|
26
|
+
componentId: "sc-zvo43f-0"
|
|
27
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:outline-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.1s ease-in-out,opacity 0.1s ease-in-out;", ""], props => sizeStyles(props));
|
|
28
|
+
StyledBaseNavItem.defaultProps = {
|
|
29
|
+
theme: DEFAULT_THEME
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { StyledBaseNavItem, getNavItemHeight };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'chrome.brandmark_nav_list_item';
|
|
12
|
+
const StyledBrandmarkNavItem = styled(StyledBaseNavItem).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '9.0.0-next.8'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledBrandmarkNavItem",
|
|
17
|
+
componentId: "sc-8kynd4-0"
|
|
18
|
+
})(["order:1;opacity:0.3;margin-top:auto;min-height:0;"]);
|
|
19
|
+
StyledBrandmarkNavItem.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledBrandmarkNavItem };
|
|
@@ -0,0 +1,48 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { DEFAULT_THEME, PALETTE } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'chrome.logo_nav_list_item';
|
|
12
|
+
const retrieveProductColor = product => {
|
|
13
|
+
switch (product) {
|
|
14
|
+
case 'chat':
|
|
15
|
+
return PALETTE.product.chat;
|
|
16
|
+
case 'connect':
|
|
17
|
+
return PALETTE.product.connect;
|
|
18
|
+
case 'explore':
|
|
19
|
+
return PALETTE.product.explore;
|
|
20
|
+
case 'guide':
|
|
21
|
+
return PALETTE.product.guide;
|
|
22
|
+
case 'message':
|
|
23
|
+
return PALETTE.product.message;
|
|
24
|
+
case 'support':
|
|
25
|
+
return PALETTE.product.support;
|
|
26
|
+
case 'talk':
|
|
27
|
+
return PALETTE.product.talk;
|
|
28
|
+
default:
|
|
29
|
+
return 'inherit';
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const colorStyles = props => {
|
|
33
|
+
const fillColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
|
|
34
|
+
const color = props.isLight || props.isDark ? fillColor : retrieveProductColor(props.product);
|
|
35
|
+
return css(["color:", ";fill:", ";"], color, fillColor);
|
|
36
|
+
};
|
|
37
|
+
const StyledLogoNavItem = styled(StyledBaseNavItem).attrs({
|
|
38
|
+
'data-garden-id': COMPONENT_ID,
|
|
39
|
+
'data-garden-version': '9.0.0-next.8'
|
|
40
|
+
}).withConfig({
|
|
41
|
+
displayName: "StyledLogoNavItem",
|
|
42
|
+
componentId: "sc-saaydx-0"
|
|
43
|
+
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], props => colorStyles(props));
|
|
44
|
+
StyledLogoNavItem.defaultProps = {
|
|
45
|
+
theme: DEFAULT_THEME
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { StyledLogoNavItem };
|
|
@@ -0,0 +1,34 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.nav';
|
|
11
|
+
const colorStyles = props => {
|
|
12
|
+
const shade = props.isDark || props.isLight ? 600 : 700;
|
|
13
|
+
const backgroundColor = getColorV8(props.hue, shade, props.theme);
|
|
14
|
+
const foregroundColor = props.isLight ? props.theme.palette.black : props.theme.palette.white;
|
|
15
|
+
return css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
16
|
+
};
|
|
17
|
+
const getNavWidth = props => {
|
|
18
|
+
return `${props.theme.space.base * 15}px`;
|
|
19
|
+
};
|
|
20
|
+
const getExpandedNavWidth = () => {
|
|
21
|
+
return `200px`;
|
|
22
|
+
};
|
|
23
|
+
const StyledNav = styled.nav.attrs({
|
|
24
|
+
'data-garden-id': COMPONENT_ID,
|
|
25
|
+
'data-garden-version': '9.0.0-next.8'
|
|
26
|
+
}).withConfig({
|
|
27
|
+
displayName: "StyledNav",
|
|
28
|
+
componentId: "sc-6j462r-0"
|
|
29
|
+
})(["display:flex;position:relative;flex-direction:column;flex-shrink:0;order:-1;width:", ";font-size:", ";", ";", ";"], props => props.isExpanded ? getExpandedNavWidth : getNavWidth, props => props.theme.fontSizes.md, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
30
|
+
StyledNav.defaultProps = {
|
|
31
|
+
theme: DEFAULT_THEME
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { StyledNav, getExpandedNavWidth, getNavWidth };
|
|
@@ -0,0 +1,65 @@
|
|
|
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, { css } from 'styled-components';
|
|
8
|
+
import { math, rgba } from 'polished';
|
|
9
|
+
import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
11
|
+
import { StyledNavItemIcon } from './StyledNavItemIcon.js';
|
|
12
|
+
import { getNavWidth } from './StyledNav.js';
|
|
13
|
+
|
|
14
|
+
const COMPONENT_ID = 'chrome.nav_button';
|
|
15
|
+
const colorStyles = props => {
|
|
16
|
+
const {
|
|
17
|
+
theme,
|
|
18
|
+
hue,
|
|
19
|
+
isLight,
|
|
20
|
+
isDark,
|
|
21
|
+
isCurrent
|
|
22
|
+
} = props;
|
|
23
|
+
const DARK = theme.palette.black;
|
|
24
|
+
const LIGHT = theme.palette.white;
|
|
25
|
+
let currentColor;
|
|
26
|
+
let hoverColor;
|
|
27
|
+
if (isCurrent) {
|
|
28
|
+
if (isLight) {
|
|
29
|
+
currentColor = rgba(DARK, 0.4);
|
|
30
|
+
} else if (isDark) {
|
|
31
|
+
currentColor = rgba(LIGHT, 0.4);
|
|
32
|
+
} else {
|
|
33
|
+
currentColor = getColorV8(hue, 500, theme);
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
hoverColor = rgba(isLight ? LIGHT : DARK, 0.1);
|
|
37
|
+
}
|
|
38
|
+
const activeColor = rgba(isLight ? DARK : LIGHT, 0.1);
|
|
39
|
+
const focusColor = isLight ? DARK : LIGHT;
|
|
40
|
+
return css(["opacity:", ";outline-color:transparent;background-color:", ";&:hover{opacity:1;background-color:", ";}", " &:active{background-color:", ";}"], isCurrent ? 1 : 0.6, currentColor, hoverColor, focusStyles({
|
|
41
|
+
theme,
|
|
42
|
+
condition: false ,
|
|
43
|
+
styles: {
|
|
44
|
+
opacity: 1,
|
|
45
|
+
outlineColor: focusColor
|
|
46
|
+
}
|
|
47
|
+
}), activeColor);
|
|
48
|
+
};
|
|
49
|
+
const StyledNavButton = styled(StyledBaseNavItem).attrs({
|
|
50
|
+
'data-garden-id': COMPONENT_ID,
|
|
51
|
+
'data-garden-version': '9.0.0-next.8',
|
|
52
|
+
as: 'button'
|
|
53
|
+
}).withConfig({
|
|
54
|
+
displayName: "StyledNavButton",
|
|
55
|
+
componentId: "sc-f5ux3-0"
|
|
56
|
+
})(["flex:1;justify-content:", ";margin:0;border:none;box-sizing:border-box;background:transparent;cursor:", ";min-width:0;text-align:", ";text-decoration:none;color:inherit;font-size:inherit;&:hover,&:focus{text-decoration:none;color:inherit;}", ";&:focus-visible:hover,&:focus-visible:active,", "{outline:", " solid;outline-offset:-", ";}", " ", ";"], props => props.isExpanded && 'start', props => props.isCurrent ? 'default' : 'pointer', props => props.isExpanded && 'inherit', colorStyles, SELECTOR_FOCUS_VISIBLE, props => math(`${props.theme.borderWidths.md} - 1`), props => props.theme.borderWidths.md, props => props.isExpanded && `
|
|
57
|
+
${StyledNavItemIcon} {
|
|
58
|
+
margin: 0 ${math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`)};
|
|
59
|
+
}
|
|
60
|
+
`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
61
|
+
StyledNavButton.defaultProps = {
|
|
62
|
+
theme: DEFAULT_THEME
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { StyledNavButton };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.nav_item_icon';
|
|
11
|
+
const StyledNavItemIcon = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledNavItemIcon",
|
|
16
|
+
componentId: "sc-7w9rpt-0"
|
|
17
|
+
})(["align-self:flex-start;order:0;border-radius:", ";width:", ";height:", ";", ";"], props => props.theme.borderRadii.md, props => props.theme.iconSizes.lg, props => props.theme.iconSizes.lg, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledNavItemIcon.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledNavItemIcon };
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { math } from 'polished';
|
|
9
|
+
import { getLineHeight, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledNavButton } from './StyledNavButton.js';
|
|
11
|
+
import { getNavWidth } from './StyledNav.js';
|
|
12
|
+
|
|
13
|
+
const COMPONENT_ID = 'chrome.nav_item_text';
|
|
14
|
+
const StyledNavItemText = styled.span.attrs({
|
|
15
|
+
'data-garden-id': COMPONENT_ID,
|
|
16
|
+
'data-garden-version': '9.0.0-next.8'
|
|
17
|
+
}).withConfig({
|
|
18
|
+
displayName: "StyledNavItemText",
|
|
19
|
+
componentId: "sc-13m84xl-0"
|
|
20
|
+
})(["position:absolute;order:1;clip:rect(1px,1px,1px,1px);margin:", ";width:1px;height:1px;overflow:hidden;line-height:", ";white-space:", ";", " ", ";"], props => props.isExpanded && `0 ${math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`)}`, props => getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.isWrapped ? 'normal' : 'nowrap', props => props.isExpanded && `
|
|
21
|
+
${StyledNavButton} > && {
|
|
22
|
+
position: static;
|
|
23
|
+
flex: 1;
|
|
24
|
+
clip: auto;
|
|
25
|
+
width: auto;
|
|
26
|
+
height: auto;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
}
|
|
29
|
+
`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
30
|
+
StyledNavItemText.defaultProps = {
|
|
31
|
+
theme: DEFAULT_THEME
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { StyledNavItemText };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.nav_list';
|
|
11
|
+
const StyledNavList = styled.ul.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledNavList",
|
|
16
|
+
componentId: "sc-1s0nkfb-0"
|
|
17
|
+
})(["display:flex;flex:1;flex-direction:column;order:0;margin:0;padding:0;list-style:none;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledNavList.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledNavList };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.nav_list_item';
|
|
11
|
+
const StyledNavListItem = styled.li.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledNavListItem",
|
|
16
|
+
componentId: "sc-18cj2v7-0"
|
|
17
|
+
})(["display:flex;order:1;margin:0;padding:0;list-style-type:none;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledNavListItem.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledNavListItem };
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.sheet';
|
|
11
|
+
const borderStyle = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
theme,
|
|
14
|
+
placement,
|
|
15
|
+
isOpen
|
|
16
|
+
} = _ref;
|
|
17
|
+
const borderColor = isOpen ? getColorV8('neutralHue', 300, theme) : 'transparent';
|
|
18
|
+
const borderSides = ['-left', '-right'];
|
|
19
|
+
let borderSide = '';
|
|
20
|
+
if (theme.rtl) {
|
|
21
|
+
borderSides.reverse();
|
|
22
|
+
}
|
|
23
|
+
if (placement === 'end') {
|
|
24
|
+
borderSide = borderSides[0];
|
|
25
|
+
} else if (placement === 'start') {
|
|
26
|
+
borderSide = borderSides[1];
|
|
27
|
+
}
|
|
28
|
+
return `border${borderSide}: ${theme.borders.sm} ${borderColor};`;
|
|
29
|
+
};
|
|
30
|
+
const StyledSheet = styled.aside.attrs({
|
|
31
|
+
'data-garden-id': COMPONENT_ID,
|
|
32
|
+
'data-garden-version': '9.0.0-next.8'
|
|
33
|
+
}).withConfig({
|
|
34
|
+
displayName: "StyledSheet",
|
|
35
|
+
componentId: "sc-dx8ijk-0"
|
|
36
|
+
})(["display:flex;order:1;transition:", ";background-color:", ";width:", ";height:100%;overflow:hidden;font-size:", ";&:focus{outline:none;}", ";", ";"], props => props.isAnimated && 'width 250ms ease-in-out', props => getColorV8('background', 600 , props.theme), props => props.isOpen ? props.size : '0px', props => props.theme.fontSizes.md, props => borderStyle(props), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
37
|
+
StyledSheet.defaultProps = {
|
|
38
|
+
theme: DEFAULT_THEME
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { StyledSheet };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.sheet_body';
|
|
11
|
+
const StyledSheetBody = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '9.0.0-next.8'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledSheetBody",
|
|
16
|
+
componentId: "sc-bt4eoj-0"
|
|
17
|
+
})(["flex:1;overflow-y:auto;padding:", "px;", ";"], props => props.theme.space.base * 5, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledSheetBody.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledSheetBody };
|