@zendeskgarden/react-chrome 8.75.0 → 8.76.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/esm/elements/Chrome.js +99 -0
- package/dist/esm/elements/SkipNav.js +70 -0
- package/dist/esm/elements/body/Body.js +68 -0
- package/dist/esm/elements/body/Content.js +59 -0
- package/dist/esm/elements/body/Main.js +52 -0
- package/dist/esm/elements/body/Sidebar.js +52 -0
- package/dist/esm/elements/footer/Footer.js +52 -0
- package/dist/esm/elements/footer/FooterItem.js +52 -0
- package/dist/esm/elements/header/Header.js +56 -0
- package/dist/esm/elements/header/HeaderItem.js +74 -0
- package/dist/esm/elements/header/HeaderItemIcon.js +71 -0
- package/dist/esm/elements/header/HeaderItemText.js +56 -0
- package/dist/esm/elements/header/HeaderItemWrapper.js +52 -0
- package/dist/esm/elements/nav/Nav.js +74 -0
- package/dist/esm/elements/nav/NavItem.js +98 -0
- package/dist/esm/elements/nav/NavItemIcon.js +71 -0
- package/dist/esm/elements/nav/NavItemText.js +63 -0
- package/dist/esm/elements/sheet/Sheet.js +133 -0
- package/dist/esm/elements/sheet/components/Body.js +55 -0
- package/dist/esm/elements/sheet/components/Close.js +65 -0
- package/dist/esm/elements/sheet/components/Description.js +64 -0
- package/dist/esm/elements/sheet/components/Footer.js +55 -0
- package/dist/esm/elements/sheet/components/FooterItem.js +55 -0
- package/dist/esm/elements/sheet/components/Header.js +60 -0
- package/dist/esm/elements/sheet/components/Title.js +64 -0
- package/dist/esm/elements/subnav/CollapsibleSubNavItem.js +120 -0
- package/dist/esm/elements/subnav/SubNav.js +63 -0
- package/dist/esm/elements/subnav/SubNavItem.js +65 -0
- package/dist/esm/elements/subnav/SubNavItemText.js +56 -0
- package/dist/esm/index.js +29 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/chevron-down-stroke.svg.js +25 -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/body/StyledSidebar.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 +24 -0
- package/dist/esm/styled/nav/StyledLogoNavItem.js +49 -0
- package/dist/esm/styled/nav/StyledNav.js +34 -0
- package/dist/esm/styled/nav/StyledNavItem.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/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/styled/subnav/StyledSubNav.js +34 -0
- package/dist/esm/styled/subnav/StyledSubNavItem.js +55 -0
- package/dist/esm/styled/subnav/StyledSubNavItemHeader.js +24 -0
- package/dist/esm/styled/subnav/StyledSubNavItemIcon.js +43 -0
- package/dist/esm/styled/subnav/StyledSubNavItemText.js +30 -0
- package/dist/esm/styled/subnav/StyledSubNavPanel.js +24 -0
- package/dist/esm/types/index.js +10 -0
- package/dist/esm/utils/useBodyContext.js +16 -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/useSheetContext.js +16 -0
- package/dist/index.cjs.js +78 -94
- package/package.json +5 -5
- package/dist/index.esm.js +0 -1449
|
@@ -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 React__default from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import '../../styled/StyledChrome.js';
|
|
10
|
+
import '../../styled/StyledSkipNav.js';
|
|
11
|
+
import '../../styled/StyledSkipNavIcon.js';
|
|
12
|
+
import '../../styled/body/StyledBody.js';
|
|
13
|
+
import '../../styled/body/StyledContent.js';
|
|
14
|
+
import '../../styled/body/StyledMain.js';
|
|
15
|
+
import '../../styled/body/StyledSidebar.js';
|
|
16
|
+
import '../../styled/footer/StyledFooter.js';
|
|
17
|
+
import '../../styled/footer/StyledFooterItem.js';
|
|
18
|
+
import '../../styled/header/StyledHeader.js';
|
|
19
|
+
import '../../styled/header/StyledBaseHeaderItem.js';
|
|
20
|
+
import '../../styled/header/StyledHeaderItem.js';
|
|
21
|
+
import '../../styled/header/StyledHeaderItemIcon.js';
|
|
22
|
+
import '../../styled/header/StyledLogoHeaderItem.js';
|
|
23
|
+
import '../../styled/header/StyledHeaderItemText.js';
|
|
24
|
+
import '../../styled/header/StyledHeaderItemWrapper.js';
|
|
25
|
+
import '../../styled/nav/StyledNav.js';
|
|
26
|
+
import '../../styled/nav/StyledBaseNavItem.js';
|
|
27
|
+
import '../../styled/nav/StyledLogoNavItem.js';
|
|
28
|
+
import '../../styled/nav/StyledBrandmarkNavItem.js';
|
|
29
|
+
import '../../styled/nav/StyledNavItem.js';
|
|
30
|
+
import '../../styled/nav/StyledNavItemIcon.js';
|
|
31
|
+
import '../../styled/nav/StyledNavItemText.js';
|
|
32
|
+
import '../../styled/subnav/StyledSubNav.js';
|
|
33
|
+
import { StyledSubNavItem } from '../../styled/subnav/StyledSubNavItem.js';
|
|
34
|
+
import '../../styled/subnav/StyledSubNavItemText.js';
|
|
35
|
+
import '../../styled/subnav/StyledSubNavItemHeader.js';
|
|
36
|
+
import '../../styled/subnav/StyledSubNavItemIcon.js';
|
|
37
|
+
import '../../styled/subnav/StyledSubNavPanel.js';
|
|
38
|
+
import '../../styled/sheet/StyledSheet.js';
|
|
39
|
+
import '../../styled/sheet/StyledSheetWrapper.js';
|
|
40
|
+
import '../../styled/sheet/StyledSheetTitle.js';
|
|
41
|
+
import '../../styled/sheet/StyledSheetDescription.js';
|
|
42
|
+
import '../../styled/sheet/StyledSheetBody.js';
|
|
43
|
+
import '../../styled/sheet/StyledSheetClose.js';
|
|
44
|
+
import '../../styled/sheet/StyledSheetFooter.js';
|
|
45
|
+
import '../../styled/sheet/StyledSheetFooterItem.js';
|
|
46
|
+
import '../../styled/sheet/StyledSheetHeader.js';
|
|
47
|
+
import { useChromeContext } from '../../utils/useChromeContext.js';
|
|
48
|
+
|
|
49
|
+
const SubNavItem = React__default.forwardRef((props, ref) => {
|
|
50
|
+
const {
|
|
51
|
+
isDark,
|
|
52
|
+
isLight
|
|
53
|
+
} = useChromeContext();
|
|
54
|
+
return React__default.createElement(StyledSubNavItem, Object.assign({
|
|
55
|
+
ref: ref,
|
|
56
|
+
isDark: isDark,
|
|
57
|
+
isLight: isLight
|
|
58
|
+
}, props));
|
|
59
|
+
});
|
|
60
|
+
SubNavItem.displayName = 'SubNavItem';
|
|
61
|
+
SubNavItem.propTypes = {
|
|
62
|
+
isCurrent: PropTypes.bool
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { SubNavItem };
|
|
@@ -0,0 +1,56 @@
|
|
|
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__default from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import '../../styled/StyledChrome.js';
|
|
10
|
+
import '../../styled/StyledSkipNav.js';
|
|
11
|
+
import '../../styled/StyledSkipNavIcon.js';
|
|
12
|
+
import '../../styled/body/StyledBody.js';
|
|
13
|
+
import '../../styled/body/StyledContent.js';
|
|
14
|
+
import '../../styled/body/StyledMain.js';
|
|
15
|
+
import '../../styled/body/StyledSidebar.js';
|
|
16
|
+
import '../../styled/footer/StyledFooter.js';
|
|
17
|
+
import '../../styled/footer/StyledFooterItem.js';
|
|
18
|
+
import '../../styled/header/StyledHeader.js';
|
|
19
|
+
import '../../styled/header/StyledBaseHeaderItem.js';
|
|
20
|
+
import '../../styled/header/StyledHeaderItem.js';
|
|
21
|
+
import '../../styled/header/StyledHeaderItemIcon.js';
|
|
22
|
+
import '../../styled/header/StyledLogoHeaderItem.js';
|
|
23
|
+
import '../../styled/header/StyledHeaderItemText.js';
|
|
24
|
+
import '../../styled/header/StyledHeaderItemWrapper.js';
|
|
25
|
+
import '../../styled/nav/StyledNav.js';
|
|
26
|
+
import '../../styled/nav/StyledBaseNavItem.js';
|
|
27
|
+
import '../../styled/nav/StyledLogoNavItem.js';
|
|
28
|
+
import '../../styled/nav/StyledBrandmarkNavItem.js';
|
|
29
|
+
import '../../styled/nav/StyledNavItem.js';
|
|
30
|
+
import '../../styled/nav/StyledNavItemIcon.js';
|
|
31
|
+
import '../../styled/nav/StyledNavItemText.js';
|
|
32
|
+
import '../../styled/subnav/StyledSubNav.js';
|
|
33
|
+
import '../../styled/subnav/StyledSubNavItem.js';
|
|
34
|
+
import { StyledSubNavItemText } from '../../styled/subnav/StyledSubNavItemText.js';
|
|
35
|
+
import '../../styled/subnav/StyledSubNavItemHeader.js';
|
|
36
|
+
import '../../styled/subnav/StyledSubNavItemIcon.js';
|
|
37
|
+
import '../../styled/subnav/StyledSubNavPanel.js';
|
|
38
|
+
import '../../styled/sheet/StyledSheet.js';
|
|
39
|
+
import '../../styled/sheet/StyledSheetWrapper.js';
|
|
40
|
+
import '../../styled/sheet/StyledSheetTitle.js';
|
|
41
|
+
import '../../styled/sheet/StyledSheetDescription.js';
|
|
42
|
+
import '../../styled/sheet/StyledSheetBody.js';
|
|
43
|
+
import '../../styled/sheet/StyledSheetClose.js';
|
|
44
|
+
import '../../styled/sheet/StyledSheetFooter.js';
|
|
45
|
+
import '../../styled/sheet/StyledSheetFooterItem.js';
|
|
46
|
+
import '../../styled/sheet/StyledSheetHeader.js';
|
|
47
|
+
|
|
48
|
+
const SubNavItemText = React__default.forwardRef((props, ref) => React__default.createElement(StyledSubNavItemText, Object.assign({
|
|
49
|
+
ref: ref
|
|
50
|
+
}, props)));
|
|
51
|
+
SubNavItemText.displayName = 'SubNavItemText';
|
|
52
|
+
SubNavItemText.propTypes = {
|
|
53
|
+
isWrapped: PropTypes.bool
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { SubNavItemText };
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { Chrome } from './elements/Chrome.js';
|
|
8
|
+
export { SkipNav } from './elements/SkipNav.js';
|
|
9
|
+
export { Body } from './elements/body/Body.js';
|
|
10
|
+
export { Content } from './elements/body/Content.js';
|
|
11
|
+
export { Main } from './elements/body/Main.js';
|
|
12
|
+
export { Sidebar } from './elements/body/Sidebar.js';
|
|
13
|
+
export { Header } from './elements/header/Header.js';
|
|
14
|
+
export { HeaderItem } from './elements/header/HeaderItem.js';
|
|
15
|
+
export { HeaderItemIcon } from './elements/header/HeaderItemIcon.js';
|
|
16
|
+
export { HeaderItemText } from './elements/header/HeaderItemText.js';
|
|
17
|
+
export { HeaderItemWrapper } from './elements/header/HeaderItemWrapper.js';
|
|
18
|
+
export { Footer } from './elements/footer/Footer.js';
|
|
19
|
+
export { FooterItem } from './elements/footer/FooterItem.js';
|
|
20
|
+
export { Nav } from './elements/nav/Nav.js';
|
|
21
|
+
export { NavItem } from './elements/nav/NavItem.js';
|
|
22
|
+
export { NavItemIcon } from './elements/nav/NavItemIcon.js';
|
|
23
|
+
export { NavItemText } from './elements/nav/NavItemText.js';
|
|
24
|
+
export { SubNav } from './elements/subnav/SubNav.js';
|
|
25
|
+
export { SubNavItem } from './elements/subnav/SubNavItem.js';
|
|
26
|
+
export { SubNavItemText } from './elements/subnav/SubNavItemText.js';
|
|
27
|
+
export { CollapsibleSubNavItem } from './elements/subnav/CollapsibleSubNavItem.js';
|
|
28
|
+
export { Sheet } from './elements/sheet/Sheet.js';
|
|
29
|
+
export { PRODUCT as PRODUCTS } from './types/index.js';
|
|
@@ -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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 12,
|
|
15
|
+
height: 12,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 12 12",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
d: "M1.646 3.646a.5.5 0 01.638-.057l.07.057L6 7.293l3.646-3.647a.5.5 0 01.638-.057l.07.057a.5.5 0 01.057.638l-.057.07-4 4a.5.5 0 01-.638.057l-.07-.057-4-4a.5.5 0 010-.708z"
|
|
22
|
+
})));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { SvgChevronDownStroke as default };
|
|
@@ -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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "currentColor",
|
|
21
|
+
d: "M4.441 7.38l.095.083.939.939-.708.707-.939-.939-2 2-.132.142a2.829 2.829 0 003.99 3.99l.142-.132 2-2-.939-.939.707-.708.94.94a1 1 0 01.083 1.32l-.083.094-2 2A3.828 3.828 0 01.972 9.621l.15-.158 2-2A1 1 0 014.34 7.31l.101.07zm7.413-3.234a.5.5 0 01.057.638l-.057.07-7 7a.5.5 0 01-.765-.638l.057-.07 7-7a.5.5 0 01.708 0zm3.023-3.025a3.829 3.829 0 01.15 5.257l-.15.158-2 2a1 1 0 01-1.32.083l-.094-.083-.94-.94.708-.707.939.94 2-2 .132-.142a2.829 2.829 0 00-3.99-3.99l-.142.131-2 2 .939.939-.707.708-.94-.94a1 1 0 01-.082-1.32l.083-.094 2-2a3.828 3.828 0 015.414 0z"
|
|
22
|
+
})));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { SvgLinkStroke as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgXStroke = function SvgXStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
d: "M3 13L13 3m0 10L3 3"
|
|
23
|
+
})));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { SvgXStroke as default };
|
|
@@ -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.chrome';
|
|
11
|
+
const StyledChrome = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledChrome",
|
|
16
|
+
componentId: "sc-1uqm6u6-0"
|
|
17
|
+
})(["display:flex;position:relative;margin:0;height:100vh;overflow-y:hidden;font-family:", ";direction:", ";", ";"], props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledChrome.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledChrome };
|
|
@@ -0,0 +1,46 @@
|
|
|
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, { keyframes, css } from 'styled-components';
|
|
8
|
+
import { math } from 'polished';
|
|
9
|
+
import { SELECTOR_FOCUS_VISIBLE, retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { getHeaderHeight } from './header/StyledHeader.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'chrome.skipnav';
|
|
13
|
+
const animationStyles = () => {
|
|
14
|
+
const animationName = keyframes(["0%{transform:translate(-50%,-50%);}"]);
|
|
15
|
+
return css(["transition:opacity 0.2s ease-out,clip 0s linear 0.2s;opacity:0;clip:rect(0,0,0,0);&:focus{transition:opacity 0.2s ease-in-out;animation:0.2s cubic-bezier(0.15,0.85,0.35,1.2) ", ";opacity:1;clip:rect(0,150vw,100vh,-50vw);}"], animationName);
|
|
16
|
+
};
|
|
17
|
+
const colorStyles = theme => {
|
|
18
|
+
const color = getColorV8('primaryHue', 600, theme);
|
|
19
|
+
const borderColor = getColorV8('neutralHue', 300, theme);
|
|
20
|
+
const boxShadow = theme.shadows.lg(`${theme.space.base * 5}px`, `${theme.space.base * 7}px`, getColorV8('chromeHue', 600, theme, 0.15));
|
|
21
|
+
return css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";&:hover,&:focus{color:", ";}", ""], borderColor, boxShadow, getColorV8('background', 600 , theme), color, color, focusStyles({
|
|
22
|
+
theme,
|
|
23
|
+
inset: true,
|
|
24
|
+
boxShadow
|
|
25
|
+
}));
|
|
26
|
+
};
|
|
27
|
+
const sizeStyles = props => {
|
|
28
|
+
const top = math(`${getHeaderHeight(props)} / 2`);
|
|
29
|
+
const padding = `${props.theme.space.base * 5}px`;
|
|
30
|
+
const paddingStart = `${props.theme.space.base * 4}px`;
|
|
31
|
+
const fontSize = props.theme.fontSizes.md;
|
|
32
|
+
const lineHeight = getLineHeight(padding, fontSize);
|
|
33
|
+
return css(["top:", ";padding:", ";padding-", ":", ";line-height:", ";font-size:", ";"], top, padding, props.theme.rtl ? 'right' : 'left', paddingStart, lineHeight, fontSize);
|
|
34
|
+
};
|
|
35
|
+
const StyledSkipNav = styled.a.attrs({
|
|
36
|
+
'data-garden-id': COMPONENT_ID,
|
|
37
|
+
'data-garden-version': '8.76.0'
|
|
38
|
+
}).withConfig({
|
|
39
|
+
displayName: "StyledSkipNav",
|
|
40
|
+
componentId: "sc-1tsro34-0"
|
|
41
|
+
})(["", ";display:inline-flex;position:absolute;left:50%;align-items:center;justify-content:center;transform:translateX(-50%);direction:", ";z-index:", ";border:", ";border-radius:", ";text-decoration:underline;white-space:nowrap;", ";", "{text-decoration:none;}&:hover{text-decoration:underline;}", ";", ";"], animationStyles(), props => props.theme.rtl && 'rtl', props => props.zIndex, props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => sizeStyles(props), SELECTOR_FOCUS_VISIBLE, props => colorStyles(props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
42
|
+
StyledSkipNav.defaultProps = {
|
|
43
|
+
theme: DEFAULT_THEME
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { StyledSkipNav };
|
|
@@ -0,0 +1,28 @@
|
|
|
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 SvgLinkStroke from '../node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js';
|
|
9
|
+
import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'chrome.skipnav_icon';
|
|
12
|
+
const sizeStyles = theme => {
|
|
13
|
+
const margin = `${theme.space.base * 2}px`;
|
|
14
|
+
const size = theme.iconSizes.md;
|
|
15
|
+
return css(["margin-", ":", ";width:", ";height:", ";"], theme.rtl ? 'left' : 'right', margin, size, size);
|
|
16
|
+
};
|
|
17
|
+
const StyledSkipNavIcon = styled(SvgLinkStroke).attrs({
|
|
18
|
+
'data-garden-id': COMPONENT_ID,
|
|
19
|
+
'data-garden-version': '8.76.0'
|
|
20
|
+
}).withConfig({
|
|
21
|
+
displayName: "StyledSkipNavIcon",
|
|
22
|
+
componentId: "sc-1ika5z4-0"
|
|
23
|
+
})(["transform:", ";color:", ";", ";", ";"], props => props.theme.rtl && 'scaleX(-1)', props => getColorV8('neutralHue', 600, props.theme), props => sizeStyles(props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
24
|
+
StyledSkipNavIcon.defaultProps = {
|
|
25
|
+
theme: DEFAULT_THEME
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { StyledSkipNavIcon };
|
|
@@ -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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.body';
|
|
11
|
+
const StyledBody = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledBody",
|
|
16
|
+
componentId: "sc-c7h9kv-0"
|
|
17
|
+
})(["flex:1;order:1;background-color:", ";min-width:0;", ";"], props => getColorV8('neutralHue', 100, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledBody.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledBody };
|
|
@@ -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 { math } from 'polished';
|
|
9
|
+
import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { getHeaderHeight } from '../header/StyledHeader.js';
|
|
11
|
+
import { getFooterHeight } from '../footer/StyledFooter.js';
|
|
12
|
+
|
|
13
|
+
const COMPONENT_ID = 'chrome.content';
|
|
14
|
+
const StyledContent = styled.div.attrs({
|
|
15
|
+
'data-garden-id': COMPONENT_ID,
|
|
16
|
+
'data-garden-version': '8.76.0'
|
|
17
|
+
}).withConfig({
|
|
18
|
+
displayName: "StyledContent",
|
|
19
|
+
componentId: "sc-qcuzxn-0"
|
|
20
|
+
})(["display:flex;height:", ";line-height:", ";color:", ";font-size:", ";&:focus{outline:none;}", ";"], props => props.hasFooter ? `calc(100% - ${math(`${getHeaderHeight(props)} + ${getFooterHeight(props)}`)})` : `calc(100% - ${getHeaderHeight(props)})`, 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));
|
|
21
|
+
StyledContent.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledContent };
|
|
@@ -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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.main';
|
|
11
|
+
const StyledMain = styled.main.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledMain",
|
|
16
|
+
componentId: "sc-t61cre-0"
|
|
17
|
+
})(["flex:1;order:1;background-color:", ";overflow:auto;:focus{outline:none;}", ";"], props => getColorV8('background', 600 , props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledMain.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledMain };
|
|
@@ -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 { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'chrome.sidebar';
|
|
11
|
+
const StyledSidebar = styled.aside.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledSidebar",
|
|
16
|
+
componentId: "sc-1q77fuw-0"
|
|
17
|
+
})(["flex-shrink:0;order:0;box-sizing:border-box;border-", ":", ";width:330px;overflow:auto;&:focus{outline:none;}", ";"], props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 300, props.theme)}`, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledSidebar.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledSidebar };
|
|
@@ -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': '8.76.0'
|
|
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': '8.76.0'
|
|
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': '8.76.0'
|
|
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': '8.76.0'
|
|
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': '8.76.0'
|
|
22
|
+
}).withConfig({
|
|
23
|
+
displayName: "StyledHeaderItem",
|
|
24
|
+
componentId: "sc-14sft6n-0"
|
|
25
|
+
})(["&:hover,&:focus{text-decoration:none;color:inherit;}", " &:focus-visible:active,&[data-garden-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': '8.76.0'
|
|
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': '8.76.0'
|
|
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 };
|