@zendeskgarden/react-chrome 9.12.3 → 9.12.4
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 +5 -6
- package/dist/esm/elements/SkipNav.js +10 -13
- package/dist/esm/elements/body/Body.js +3 -3
- package/dist/esm/elements/footer/Footer.js +3 -3
- package/dist/esm/elements/footer/FooterItem.js +3 -3
- package/dist/esm/elements/header/Header.js +13 -16
- package/dist/esm/elements/header/HeaderItem.js +8 -9
- package/dist/esm/elements/header/HeaderItemIcon.js +4 -7
- package/dist/esm/elements/header/HeaderItemText.js +7 -10
- package/dist/esm/elements/header/HeaderItemWrapper.js +11 -14
- package/dist/esm/elements/nav/Nav.js +4 -5
- package/dist/esm/elements/nav/NavItem.js +7 -8
- package/dist/esm/elements/nav/NavItemIcon.js +4 -7
- package/dist/esm/elements/nav/NavItemText.js +4 -5
- package/dist/esm/elements/sheet/Sheet.js +11 -12
- package/dist/esm/elements/sheet/components/Description.js +4 -5
- package/dist/esm/elements/sheet/components/Footer.js +4 -5
- package/dist/esm/elements/sheet/components/Title.js +4 -5
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js +4 -4
- package/dist/esm/styled/StyledChrome.js +3 -3
- package/dist/esm/styled/StyledSkipNav.js +11 -13
- package/dist/esm/styled/StyledSkipNavIcon.js +7 -8
- package/dist/esm/styled/body/StyledBody.js +3 -3
- package/dist/esm/styled/body/StyledContent.js +8 -9
- package/dist/esm/styled/body/StyledMain.js +3 -3
- package/dist/esm/styled/footer/StyledFooter.js +10 -12
- package/dist/esm/styled/footer/StyledFooterItem.js +3 -3
- package/dist/esm/styled/header/StyledBaseHeaderItem.js +9 -10
- package/dist/esm/styled/header/StyledHeader.js +11 -13
- package/dist/esm/styled/header/StyledHeaderItem.js +12 -14
- package/dist/esm/styled/header/StyledHeaderItemIcon.js +7 -8
- package/dist/esm/styled/header/StyledHeaderItemText.js +3 -3
- package/dist/esm/styled/header/StyledHeaderItemWrapper.js +3 -3
- package/dist/esm/styled/header/StyledLogoHeaderItem.js +12 -14
- package/dist/esm/styled/nav/StyledBaseNavItem.js +7 -8
- package/dist/esm/styled/nav/StyledBrandmarkNavItem.js +3 -3
- package/dist/esm/styled/nav/StyledLogoNavItem.js +9 -10
- package/dist/esm/styled/nav/StyledNav.js +12 -14
- package/dist/esm/styled/nav/StyledNavButton.js +12 -14
- package/dist/esm/styled/nav/StyledNavItemIcon.js +7 -8
- package/dist/esm/styled/nav/StyledNavItemText.js +9 -10
- package/dist/esm/styled/nav/StyledNavList.js +3 -3
- package/dist/esm/styled/nav/StyledNavListItem.js +3 -3
- package/dist/esm/styled/sheet/StyledSheet.js +15 -17
- package/dist/esm/styled/sheet/StyledSheetBody.js +3 -3
- package/dist/esm/styled/sheet/StyledSheetClose.js +6 -7
- package/dist/esm/styled/sheet/StyledSheetDescription.js +3 -3
- package/dist/esm/styled/sheet/StyledSheetFooter.js +11 -13
- package/dist/esm/styled/sheet/StyledSheetFooterItem.js +3 -3
- package/dist/esm/styled/sheet/StyledSheetHeader.js +8 -10
- package/dist/esm/styled/sheet/StyledSheetTitle.js +3 -3
- package/dist/esm/styled/sheet/StyledSheetWrapper.js +9 -10
- package/dist/esm/styled/utils.js +1 -4
- package/dist/esm/utils/useFocusableMount.js +6 -7
- package/dist/index.cjs.js +248 -309
- package/package.json +5 -5
|
@@ -8,13 +8,12 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { componentStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { getHeaderItemSize } from '../utils.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.base_header_item';
|
|
12
|
-
const sizeStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$n = 'chrome.base_header_item';
|
|
12
|
+
const sizeStyles$b = ({
|
|
13
|
+
theme,
|
|
14
|
+
$maxY,
|
|
15
|
+
$isRound
|
|
16
|
+
}) => {
|
|
18
17
|
const margin = `0 ${theme.space.base * 3}px`;
|
|
19
18
|
const size = getHeaderItemSize(theme);
|
|
20
19
|
const height = $maxY ? '100%' : size;
|
|
@@ -31,11 +30,11 @@ const sizeStyles = _ref => {
|
|
|
31
30
|
return css(["margin:", ";border-radius:", ";padding:", ";min-width:", ";height:", ";line-height:", ";font-size:inherit;"], margin, borderRadius, padding, size, height, lineHeight);
|
|
32
31
|
};
|
|
33
32
|
const StyledBaseHeaderItem = styled.button.attrs({
|
|
34
|
-
'data-garden-id': COMPONENT_ID,
|
|
35
|
-
'data-garden-version': '9.12.
|
|
33
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
34
|
+
'data-garden-version': '9.12.4'
|
|
36
35
|
}).withConfig({
|
|
37
36
|
displayName: "StyledBaseHeaderItem",
|
|
38
37
|
componentId: "sc-1qua7h6-0"
|
|
39
|
-
})(["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;border:none;background:transparent;text-decoration:none;white-space:nowrap;color:inherit;", ";", ";"], props => props.$maxX && '1', props => props.$maxX ? 'start' : 'center', sizeStyles, componentStyles);
|
|
38
|
+
})(["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;border:none;background:transparent;text-decoration:none;white-space:nowrap;color:inherit;", ";", ";"], props => props.$maxX && '1', props => props.$maxX ? 'start' : 'center', sizeStyles$b, componentStyles);
|
|
40
39
|
|
|
41
40
|
export { StyledBaseHeaderItem };
|
|
@@ -9,12 +9,11 @@ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
|
9
9
|
import { StyledLogoHeaderItem } from './StyledLogoHeaderItem.js';
|
|
10
10
|
import { getHeaderHeight } from '../utils.js';
|
|
11
11
|
|
|
12
|
-
const COMPONENT_ID = 'chrome.header';
|
|
13
|
-
const colorStyles =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
const COMPONENT_ID$k = 'chrome.header';
|
|
13
|
+
const colorStyles$7 = ({
|
|
14
|
+
theme,
|
|
15
|
+
$isStandalone
|
|
16
|
+
}) => {
|
|
18
17
|
const backgroundColor = getColor({
|
|
19
18
|
theme,
|
|
20
19
|
variable: 'background.default'
|
|
@@ -34,10 +33,9 @@ const colorStyles = _ref => {
|
|
|
34
33
|
});
|
|
35
34
|
return css(["border-bottom-color:", ";box-shadow:", ";background-color:", ";color:", ";"], borderColor, boxShadow, backgroundColor, foregroundColor);
|
|
36
35
|
};
|
|
37
|
-
const sizeStyles =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref2;
|
|
36
|
+
const sizeStyles$9 = ({
|
|
37
|
+
theme
|
|
38
|
+
}) => {
|
|
41
39
|
const border = theme.borders.sm;
|
|
42
40
|
const padding = `0 ${theme.space.base}px`;
|
|
43
41
|
const fontSize = theme.fontSizes.md;
|
|
@@ -45,11 +43,11 @@ const sizeStyles = _ref2 => {
|
|
|
45
43
|
return css(["box-sizing:border-box;border-bottom:", ";padding:", ";height:", ";font-size:", ";"], border, padding, height, fontSize);
|
|
46
44
|
};
|
|
47
45
|
const StyledHeader = styled.header.attrs({
|
|
48
|
-
'data-garden-id': COMPONENT_ID,
|
|
49
|
-
'data-garden-version': '9.12.
|
|
46
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
47
|
+
'data-garden-version': '9.12.4'
|
|
50
48
|
}).withConfig({
|
|
51
49
|
displayName: "StyledHeader",
|
|
52
50
|
componentId: "sc-1cexpz-0"
|
|
53
|
-
})(["display:flex;position:", ";align-items:center;justify-content:flex-end;", ";", ";", "{display:", ";}", ";"], props => props.$isStandalone && 'relative', sizeStyles, colorStyles, StyledLogoHeaderItem, props => props.$isStandalone && 'inline-flex', componentStyles);
|
|
51
|
+
})(["display:flex;position:", ";align-items:center;justify-content:flex-end;", ";", ";", "{display:", ";}", ";"], props => props.$isStandalone && 'relative', sizeStyles$9, colorStyles$7, StyledLogoHeaderItem, props => props.$isStandalone && 'inline-flex', componentStyles);
|
|
54
52
|
|
|
55
53
|
export { StyledHeader };
|
|
@@ -12,12 +12,11 @@ import { StyledBaseHeaderItem } from './StyledBaseHeaderItem.js';
|
|
|
12
12
|
import { StyledHeaderItemText } from './StyledHeaderItemText.js';
|
|
13
13
|
import { getHeaderItemSize } from '../utils.js';
|
|
14
14
|
|
|
15
|
-
const COMPONENT_ID = 'chrome.header_item';
|
|
16
|
-
const colorStyles =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
15
|
+
const COMPONENT_ID$j = 'chrome.header_item';
|
|
16
|
+
const colorStyles$6 = ({
|
|
17
|
+
theme,
|
|
18
|
+
$maxY
|
|
19
|
+
}) => {
|
|
21
20
|
const options = {
|
|
22
21
|
theme,
|
|
23
22
|
variable: 'foreground.subtle'
|
|
@@ -45,22 +44,21 @@ const colorStyles = _ref => {
|
|
|
45
44
|
inset: $maxY
|
|
46
45
|
}), StyledHeaderItemIcon, StyledHeaderItemText, hoverColor, StyledHeaderItemIcon, StyledHeaderItemText, activeColor);
|
|
47
46
|
};
|
|
48
|
-
const sizeStyles =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} = _ref2;
|
|
47
|
+
const sizeStyles$8 = ({
|
|
48
|
+
theme,
|
|
49
|
+
$isRound
|
|
50
|
+
}) => {
|
|
53
51
|
const iconBorderRadius = $isRound ? '100px' : undefined;
|
|
54
52
|
const imageBorderRadius = math(`${theme.borderRadii.md} - 1`);
|
|
55
53
|
const imageSize = math(`${getHeaderItemSize(theme)} - ${theme.space.base * 2}`);
|
|
56
54
|
return css(["img{margin:0;border-radius:", ";width:", ";height:", ";}", "{border-radius:", ";}"], imageBorderRadius, imageSize, imageSize, StyledHeaderItemIcon, iconBorderRadius);
|
|
57
55
|
};
|
|
58
56
|
const StyledHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
59
|
-
'data-garden-id': COMPONENT_ID,
|
|
60
|
-
'data-garden-version': '9.12.
|
|
57
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
58
|
+
'data-garden-version': '9.12.4'
|
|
61
59
|
}).withConfig({
|
|
62
60
|
displayName: "StyledHeaderItem",
|
|
63
61
|
componentId: "sc-14sft6n-0"
|
|
64
|
-
})(["cursor:pointer;&:hover,&:focus{text-decoration:none;}", ";", ";& ", ",& ", "{transition:box-shadow 0.1s ease-in-out,color 0.1s ease-in-out;}", ";"], sizeStyles, colorStyles, StyledHeaderItemIcon, StyledHeaderItemText, componentStyles);
|
|
62
|
+
})(["cursor:pointer;&:hover,&:focus{text-decoration:none;}", ";", ";& ", ",& ", "{transition:box-shadow 0.1s ease-in-out,color 0.1s ease-in-out;}", ";"], sizeStyles$8, colorStyles$6, StyledHeaderItemIcon, StyledHeaderItemText, componentStyles);
|
|
65
63
|
|
|
66
64
|
export { StyledHeaderItem };
|
|
@@ -7,21 +7,20 @@
|
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { StyledBaseIcon, componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.header_item_icon';
|
|
11
|
-
const sizeStyles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
10
|
+
const COMPONENT_ID$o = 'chrome.header_item_icon';
|
|
11
|
+
const sizeStyles$c = ({
|
|
12
|
+
theme
|
|
13
|
+
}) => {
|
|
15
14
|
const margin = `0 ${theme.space.base * 0.75}px`;
|
|
16
15
|
const size = theme.iconSizes.md;
|
|
17
16
|
return css(["margin:", ";width:", ";min-width:", ";height:", ";"], margin, size, size, size);
|
|
18
17
|
};
|
|
19
18
|
const StyledHeaderItemIcon = styled(StyledBaseIcon).attrs({
|
|
20
|
-
'data-garden-id': COMPONENT_ID,
|
|
21
|
-
'data-garden-version': '9.12.
|
|
19
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
20
|
+
'data-garden-version': '9.12.4'
|
|
22
21
|
}).withConfig({
|
|
23
22
|
displayName: "StyledHeaderItemIcon",
|
|
24
23
|
componentId: "sc-1jhhp6z-0"
|
|
25
|
-
})(["transition:transform 0.25s ease-in-out;", ";", ";"], sizeStyles, componentStyles);
|
|
24
|
+
})(["transition:transform 0.25s ease-in-out;", ";", ";"], sizeStyles$c, componentStyles);
|
|
26
25
|
|
|
27
26
|
export { StyledHeaderItemIcon };
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { hideVisually } from 'polished';
|
|
9
9
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.header_item_text';
|
|
11
|
+
const COMPONENT_ID$m = 'chrome.header_item_text';
|
|
12
12
|
const StyledHeaderItemText = styled.span.attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
14
|
+
'data-garden-version': '9.12.4'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledHeaderItemText",
|
|
17
17
|
componentId: "sc-goz7la-0"
|
|
@@ -8,10 +8,10 @@ import styled from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledBaseHeaderItem } from './StyledBaseHeaderItem.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.header_item_wrapper';
|
|
11
|
+
const COMPONENT_ID$i = 'chrome.header_item_wrapper';
|
|
12
12
|
const StyledHeaderItemWrapper = styled(StyledBaseHeaderItem).attrs({
|
|
13
|
-
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.12.
|
|
13
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
14
|
+
'data-garden-version': '9.12.4',
|
|
15
15
|
as: 'div'
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "StyledHeaderItemWrapper",
|
|
@@ -10,14 +10,13 @@ import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
import { StyledHeaderItemIcon } from './StyledHeaderItemIcon.js';
|
|
11
11
|
import { StyledBaseHeaderItem } from './StyledBaseHeaderItem.js';
|
|
12
12
|
import { StyledHeaderItemText } from './StyledHeaderItemText.js';
|
|
13
|
-
import {
|
|
13
|
+
import { getNavWidth, getProductColor } from '../utils.js';
|
|
14
14
|
|
|
15
|
-
const COMPONENT_ID = 'chrome.header_item';
|
|
16
|
-
const colorStyles =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
15
|
+
const COMPONENT_ID$l = 'chrome.header_item';
|
|
16
|
+
const colorStyles$8 = ({
|
|
17
|
+
theme,
|
|
18
|
+
$product
|
|
19
|
+
}) => {
|
|
21
20
|
const borderColor = getColor({
|
|
22
21
|
theme,
|
|
23
22
|
variable: 'border.default'
|
|
@@ -29,10 +28,9 @@ const colorStyles = _ref => {
|
|
|
29
28
|
const color = getProductColor($product, fill );
|
|
30
29
|
return css(["border-", "-color:", ";color:", ";fill:", ";"], theme.rtl ? 'left' : 'right', borderColor, color, fill);
|
|
31
30
|
};
|
|
32
|
-
const sizeStyles =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} = _ref2;
|
|
31
|
+
const sizeStyles$a = ({
|
|
32
|
+
theme
|
|
33
|
+
}) => {
|
|
36
34
|
const border = theme.borders.sm;
|
|
37
35
|
const iconSize = theme.iconSizes.lg;
|
|
38
36
|
const marginRight = theme.rtl ? `-${theme.space.base}px` : 'auto';
|
|
@@ -41,12 +39,12 @@ const sizeStyles = _ref2 => {
|
|
|
41
39
|
return css(["margin-right:", ";margin-left:", ";border-", ":", ";width:", ";height:100%;", "{margin:0;width:", ";height:", ";}"], marginRight, marginLeft, theme.rtl ? 'left' : 'right', border, width, StyledHeaderItemIcon, iconSize, iconSize);
|
|
42
40
|
};
|
|
43
41
|
const StyledLogoHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
44
|
-
'data-garden-id': COMPONENT_ID,
|
|
45
|
-
'data-garden-version': '9.12.
|
|
42
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
43
|
+
'data-garden-version': '9.12.4',
|
|
46
44
|
as: 'div'
|
|
47
45
|
}).withConfig({
|
|
48
46
|
displayName: "StyledLogoHeaderItem",
|
|
49
47
|
componentId: "sc-1n1d1yv-0"
|
|
50
|
-
})(["display:none;order:0;border-radius:0;padding:0;overflow:hidden;text-decoration:none;", ";", ";", "{", "}", ";"], sizeStyles, colorStyles, StyledHeaderItemText, hideVisually(), componentStyles);
|
|
48
|
+
})(["display:none;order:0;border-radius:0;padding:0;overflow:hidden;text-decoration:none;", ";", ";", "{", "}", ";"], sizeStyles$a, colorStyles$8, StyledHeaderItemText, hideVisually(), componentStyles);
|
|
51
49
|
|
|
52
50
|
export { StyledLogoHeaderItem };
|
|
@@ -8,22 +8,21 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { math } from 'polished';
|
|
9
9
|
import { getNavItemHeight, getNavWidth } from '../utils.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.base_nav_item';
|
|
12
|
-
const sizeStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$e = 'chrome.base_nav_item';
|
|
12
|
+
const sizeStyles$6 = ({
|
|
13
|
+
theme
|
|
14
|
+
}) => {
|
|
16
15
|
const minHeight = getNavItemHeight(theme);
|
|
17
16
|
const verticalPadding = math(`(${minHeight} - ${theme.iconSizes.lg}) / 2`);
|
|
18
17
|
const horizontalPadding = math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`);
|
|
19
18
|
return css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, minHeight);
|
|
20
19
|
};
|
|
21
20
|
const StyledBaseNavItem = styled.div.attrs({
|
|
22
|
-
'data-garden-id': COMPONENT_ID,
|
|
23
|
-
'data-garden-version': '9.12.
|
|
21
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
22
|
+
'data-garden-version': '9.12.4'
|
|
24
23
|
}).withConfig({
|
|
25
24
|
displayName: "StyledBaseNavItem",
|
|
26
25
|
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;", ";"], sizeStyles);
|
|
26
|
+
})(["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;", ";"], sizeStyles$6);
|
|
28
27
|
|
|
29
28
|
export { StyledBaseNavItem };
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.brandmark_nav_list_item';
|
|
10
|
+
const COMPONENT_ID$c = 'chrome.brandmark_nav_list_item';
|
|
11
11
|
const StyledBrandmarkNavItem = styled(StyledBaseNavItem).attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledBrandmarkNavItem",
|
|
16
16
|
componentId: "sc-8kynd4-0"
|
|
@@ -9,13 +9,12 @@ import { getColor } from '@zendeskgarden/react-theming';
|
|
|
9
9
|
import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
10
10
|
import { getProductColor } from '../utils.js';
|
|
11
11
|
|
|
12
|
-
const COMPONENT_ID = 'chrome.logo_nav_list_item';
|
|
13
|
-
const colorStyles =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
12
|
+
const COMPONENT_ID$d = 'chrome.logo_nav_list_item';
|
|
13
|
+
const colorStyles$4 = ({
|
|
14
|
+
theme,
|
|
15
|
+
$hue,
|
|
16
|
+
$product
|
|
17
|
+
}) => {
|
|
19
18
|
const fillColor = getColor({
|
|
20
19
|
theme,
|
|
21
20
|
variable: 'foreground.default'
|
|
@@ -24,11 +23,11 @@ const colorStyles = _ref => {
|
|
|
24
23
|
return css(["color:", ";fill:", ";"], color, fillColor);
|
|
25
24
|
};
|
|
26
25
|
const StyledLogoNavItem = styled(StyledBaseNavItem).attrs({
|
|
27
|
-
'data-garden-id': COMPONENT_ID,
|
|
28
|
-
'data-garden-version': '9.12.
|
|
26
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
27
|
+
'data-garden-version': '9.12.4'
|
|
29
28
|
}).withConfig({
|
|
30
29
|
displayName: "StyledLogoNavItem",
|
|
31
30
|
componentId: "sc-saaydx-0"
|
|
32
|
-
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], colorStyles);
|
|
31
|
+
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], colorStyles$4);
|
|
33
32
|
|
|
34
33
|
export { StyledLogoNavItem };
|
|
@@ -8,12 +8,11 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { getNavWidthExpanded, getNavWidth } from '../utils.js';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.nav';
|
|
12
|
-
const colorStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$h = 'chrome.nav';
|
|
12
|
+
const colorStyles$5 = ({
|
|
13
|
+
theme,
|
|
14
|
+
$hue
|
|
15
|
+
}) => {
|
|
17
16
|
const shade = $hue === 'chromeHue' ? 900 : undefined;
|
|
18
17
|
const backgroundColor = getColor({
|
|
19
18
|
theme,
|
|
@@ -31,21 +30,20 @@ const colorStyles = _ref => {
|
|
|
31
30
|
});
|
|
32
31
|
return css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
33
32
|
};
|
|
34
|
-
const sizeStyles =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = _ref2;
|
|
33
|
+
const sizeStyles$7 = ({
|
|
34
|
+
theme,
|
|
35
|
+
$isExpanded
|
|
36
|
+
}) => {
|
|
39
37
|
const fontSize = theme.fontSizes.md;
|
|
40
38
|
const width = $isExpanded ? getNavWidthExpanded() : getNavWidth(theme);
|
|
41
39
|
return css(["width:", ";font-size:", ";"], width, fontSize);
|
|
42
40
|
};
|
|
43
41
|
const StyledNav = styled.nav.attrs({
|
|
44
|
-
'data-garden-id': COMPONENT_ID,
|
|
45
|
-
'data-garden-version': '9.12.
|
|
42
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
43
|
+
'data-garden-version': '9.12.4'
|
|
46
44
|
}).withConfig({
|
|
47
45
|
displayName: "StyledNav",
|
|
48
46
|
componentId: "sc-6j462r-0"
|
|
49
|
-
})(["display:flex;position:relative;flex-direction:column;flex-shrink:0;order:-1;", ";", ";", ";"], colorStyles, sizeStyles, componentStyles);
|
|
47
|
+
})(["display:flex;position:relative;flex-direction:column;flex-shrink:0;order:-1;", ";", ";", ";"], colorStyles$5, sizeStyles$7, componentStyles);
|
|
50
48
|
|
|
51
49
|
export { StyledNav };
|
|
@@ -11,12 +11,11 @@ import { StyledBaseNavItem } from './StyledBaseNavItem.js';
|
|
|
11
11
|
import { StyledNavItemIcon } from './StyledNavItemIcon.js';
|
|
12
12
|
import { getNavWidth } from '../utils.js';
|
|
13
13
|
|
|
14
|
-
const COMPONENT_ID = 'chrome.nav_button';
|
|
15
|
-
const colorStyles =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
14
|
+
const COMPONENT_ID$a = 'chrome.nav_button';
|
|
15
|
+
const colorStyles$3 = ({
|
|
16
|
+
theme,
|
|
17
|
+
$hue
|
|
18
|
+
}) => {
|
|
20
19
|
const activeBackgroundColor = getColor({
|
|
21
20
|
theme,
|
|
22
21
|
dark: {
|
|
@@ -71,21 +70,20 @@ const colorStyles = _ref => {
|
|
|
71
70
|
}
|
|
72
71
|
}), activeBackgroundColor, currentBackgroundColor);
|
|
73
72
|
};
|
|
74
|
-
const sizeStyles =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} = _ref2;
|
|
73
|
+
const sizeStyles$4 = ({
|
|
74
|
+
theme,
|
|
75
|
+
$isExpanded
|
|
76
|
+
}) => {
|
|
79
77
|
const iconMargin = $isExpanded ? `0 ${math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`)}` : undefined;
|
|
80
78
|
return css(["margin:0;border:none;box-sizing:border-box;min-width:0;font-size:inherit;", "{margin:", ";}"], StyledNavItemIcon, iconMargin);
|
|
81
79
|
};
|
|
82
80
|
const StyledNavButton = styled(StyledBaseNavItem).attrs({
|
|
83
|
-
'data-garden-id': COMPONENT_ID,
|
|
84
|
-
'data-garden-version': '9.12.
|
|
81
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
82
|
+
'data-garden-version': '9.12.4',
|
|
85
83
|
as: 'button'
|
|
86
84
|
}).withConfig({
|
|
87
85
|
displayName: "StyledNavButton",
|
|
88
86
|
componentId: "sc-f5ux3-0"
|
|
89
|
-
})(["flex:1;justify-content:", ";cursor:pointer;text-align:", ";text-decoration:none;", ";&:hover,&:focus{text-decoration:none;}&[aria-current='true']{cursor:default;}", ";", ";"], props => props.$isExpanded && 'start', props => props.$isExpanded && 'inherit', sizeStyles, colorStyles, componentStyles);
|
|
87
|
+
})(["flex:1;justify-content:", ";cursor:pointer;text-align:", ";text-decoration:none;", ";&:hover,&:focus{text-decoration:none;}&[aria-current='true']{cursor:default;}", ";", ";"], props => props.$isExpanded && 'start', props => props.$isExpanded && 'inherit', sizeStyles$4, colorStyles$3, componentStyles);
|
|
90
88
|
|
|
91
89
|
export { StyledNavButton };
|
|
@@ -7,20 +7,19 @@
|
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { StyledBaseIcon, componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.nav_item_icon';
|
|
11
|
-
const sizeStyles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
10
|
+
const COMPONENT_ID$b = 'chrome.nav_item_icon';
|
|
11
|
+
const sizeStyles$5 = ({
|
|
12
|
+
theme
|
|
13
|
+
}) => {
|
|
15
14
|
const size = theme.iconSizes.lg;
|
|
16
15
|
return css(["width:", ";height:", ";"], size, size);
|
|
17
16
|
};
|
|
18
17
|
const StyledNavItemIcon = styled(StyledBaseIcon).attrs({
|
|
19
|
-
'data-garden-id': COMPONENT_ID,
|
|
20
|
-
'data-garden-version': '9.12.
|
|
18
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
19
|
+
'data-garden-version': '9.12.4'
|
|
21
20
|
}).withConfig({
|
|
22
21
|
displayName: "StyledNavItemIcon",
|
|
23
22
|
componentId: "sc-7w9rpt-0"
|
|
24
|
-
})(["align-self:flex-start;order:0;border-radius:", ";", ";", ";"], props => props.theme.borderRadii.md, sizeStyles, componentStyles);
|
|
23
|
+
})(["align-self:flex-start;order:0;border-radius:", ";", ";", ";"], props => props.theme.borderRadii.md, sizeStyles$5, componentStyles);
|
|
25
24
|
|
|
26
25
|
export { StyledNavItemIcon };
|
|
@@ -10,13 +10,12 @@ import { componentStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
import { StyledNavButton } from './StyledNavButton.js';
|
|
11
11
|
import { getNavWidth } from '../utils.js';
|
|
12
12
|
|
|
13
|
-
const COMPONENT_ID = 'chrome.nav_item_text';
|
|
14
|
-
const sizeStyles =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
13
|
+
const COMPONENT_ID$9 = 'chrome.nav_item_text';
|
|
14
|
+
const sizeStyles$3 = ({
|
|
15
|
+
theme,
|
|
16
|
+
$isExpanded,
|
|
17
|
+
$isWrapped
|
|
18
|
+
}) => {
|
|
20
19
|
const clip = $isExpanded ? 'auto' : undefined;
|
|
21
20
|
const lineHeight = getLineHeight(theme.space.base * 5, theme.fontSizes.md);
|
|
22
21
|
const margin = $isExpanded ? `0 ${math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`)}` : undefined;
|
|
@@ -26,11 +25,11 @@ const sizeStyles = _ref => {
|
|
|
26
25
|
return css(["clip:rect(1px,1px,1px,1px);margin:", ";width:1px;height:1px;line-height:", ";white-space:", ";", " > &&{clip:", ";width:", ";height:", ";}"], margin, lineHeight, whiteSpace, StyledNavButton, clip, width, height);
|
|
27
26
|
};
|
|
28
27
|
const StyledNavItemText = styled.span.attrs({
|
|
29
|
-
'data-garden-id': COMPONENT_ID,
|
|
30
|
-
'data-garden-version': '9.12.
|
|
28
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
29
|
+
'data-garden-version': '9.12.4'
|
|
31
30
|
}).withConfig({
|
|
32
31
|
displayName: "StyledNavItemText",
|
|
33
32
|
componentId: "sc-13m84xl-0"
|
|
34
|
-
})(["position:absolute;order:1;overflow:hidden;", " > &&{position:", ";flex:", ";text-overflow:", ";}", ";", ";"], StyledNavButton, props => props.$isExpanded ? 'static' : undefined, props => props.$isExpanded ? 1 : undefined, props => props.$isExpanded ? 'ellipsis' : undefined, sizeStyles, componentStyles);
|
|
33
|
+
})(["position:absolute;order:1;overflow:hidden;", " > &&{position:", ";flex:", ";text-overflow:", ";}", ";", ";"], StyledNavButton, props => props.$isExpanded ? 'static' : undefined, props => props.$isExpanded ? 1 : undefined, props => props.$isExpanded ? 'ellipsis' : undefined, sizeStyles$3, componentStyles);
|
|
35
34
|
|
|
36
35
|
export { StyledNavItemText };
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.nav_list';
|
|
10
|
+
const COMPONENT_ID$g = 'chrome.nav_list';
|
|
11
11
|
const StyledNavList = styled.ul.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledNavList",
|
|
16
16
|
componentId: "sc-1s0nkfb-0"
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.nav_list_item';
|
|
10
|
+
const COMPONENT_ID$f = 'chrome.nav_list_item';
|
|
11
11
|
const StyledNavListItem = styled.li.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledNavListItem",
|
|
16
16
|
componentId: "sc-18cj2v7-0"
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
|
-
import { componentStyles,
|
|
8
|
+
import { componentStyles, getLineHeight, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.sheet';
|
|
11
|
-
const colorStyles =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
10
|
+
const COMPONENT_ID$8 = 'chrome.sheet';
|
|
11
|
+
const colorStyles$2 = ({
|
|
12
|
+
theme,
|
|
13
|
+
$isOpen
|
|
14
|
+
}) => {
|
|
16
15
|
const backgroundColor = getColor({
|
|
17
16
|
theme,
|
|
18
17
|
variable: 'background.default'
|
|
@@ -23,13 +22,12 @@ const colorStyles = _ref => {
|
|
|
23
22
|
}) : 'transparent';
|
|
24
23
|
return css(["border-color:", ";background-color:", ";"], borderColor, backgroundColor);
|
|
25
24
|
};
|
|
26
|
-
const sizeStyles =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref2;
|
|
25
|
+
const sizeStyles$2 = ({
|
|
26
|
+
theme,
|
|
27
|
+
$isOpen,
|
|
28
|
+
$placement,
|
|
29
|
+
$size
|
|
30
|
+
}) => {
|
|
33
31
|
const width = $isOpen ? $size : 0;
|
|
34
32
|
const fontSize = theme.fontSizes.md;
|
|
35
33
|
const lineHeight = getLineHeight(theme.space.base * 5, fontSize);
|
|
@@ -43,11 +41,11 @@ const sizeStyles = _ref2 => {
|
|
|
43
41
|
return css(["box-sizing:border-box;width:", ";height:100%;", ":", ";line-height:", ";font-size:", ";"], width, borderProperty, border, lineHeight, fontSize);
|
|
44
42
|
};
|
|
45
43
|
const StyledSheet = styled.aside.attrs({
|
|
46
|
-
'data-garden-id': COMPONENT_ID,
|
|
47
|
-
'data-garden-version': '9.12.
|
|
44
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
45
|
+
'data-garden-version': '9.12.4'
|
|
48
46
|
}).withConfig({
|
|
49
47
|
displayName: "StyledSheet",
|
|
50
48
|
componentId: "sc-dx8ijk-0"
|
|
51
|
-
})(["display:flex;order:1;transition:", ";overflow:hidden;", ";&:focus{outline:none;}", ";", ";"], props => props.$isAnimated && 'width 250ms ease-in-out', sizeStyles, colorStyles, componentStyles);
|
|
49
|
+
})(["display:flex;order:1;transition:", ";overflow:hidden;", ";&:focus{outline:none;}", ";", ";"], props => props.$isAnimated && 'width 250ms ease-in-out', sizeStyles$2, colorStyles$2, componentStyles);
|
|
52
50
|
|
|
53
51
|
export { StyledSheet };
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.sheet_body';
|
|
10
|
+
const COMPONENT_ID$4 = 'chrome.sheet_body';
|
|
11
11
|
const StyledSheetBody = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSheetBody",
|
|
16
16
|
componentId: "sc-bt4eoj-0"
|
|
@@ -8,18 +8,17 @@ import styled, { css } from 'styled-components';
|
|
|
8
8
|
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { IconButton } from '@zendeskgarden/react-buttons';
|
|
10
10
|
|
|
11
|
-
const COMPONENT_ID = 'chrome.sheet_close';
|
|
12
|
-
const positionStyles =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
11
|
+
const COMPONENT_ID$3 = 'chrome.sheet_close';
|
|
12
|
+
const positionStyles = ({
|
|
13
|
+
theme
|
|
14
|
+
}) => {
|
|
16
15
|
const top = `${theme.space.base * 2.5}px`;
|
|
17
16
|
const position = `${theme.space.base * 2}px`;
|
|
18
17
|
return css(["top:", ";", ":", ";"], top, theme.rtl ? 'left' : 'right', position);
|
|
19
18
|
};
|
|
20
19
|
const StyledSheetClose = styled(IconButton).attrs({
|
|
21
|
-
'data-garden-id': COMPONENT_ID,
|
|
22
|
-
'data-garden-version': '9.12.
|
|
20
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
21
|
+
'data-garden-version': '9.12.4'
|
|
23
22
|
}).withConfig({
|
|
24
23
|
displayName: "StyledSheetClose",
|
|
25
24
|
componentId: "sc-1ab02oq-0"
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { getLineHeight, getColor, componentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
-
const COMPONENT_ID = 'chrome.sheet_description';
|
|
10
|
+
const COMPONENT_ID$5 = 'chrome.sheet_description';
|
|
11
11
|
const StyledSheetDescription = styled.div.attrs({
|
|
12
|
-
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.12.
|
|
12
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
13
|
+
'data-garden-version': '9.12.4'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledSheetDescription",
|
|
16
16
|
componentId: "sc-1puglb6-0"
|