@zendeskgarden/react-chrome 9.0.0-next.8 → 9.0.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/README.md +4 -4
- package/dist/esm/elements/Chrome.js +9 -8
- package/dist/esm/elements/footer/FooterItem.js +1 -1
- package/dist/esm/elements/header/HeaderItem.js +1 -1
- package/dist/esm/elements/header/HeaderItemIcon.js +3 -18
- package/dist/esm/elements/header/HeaderItemText.js +1 -1
- package/dist/esm/elements/header/HeaderItemWrapper.js +1 -1
- package/dist/esm/elements/nav/Nav.js +13 -7
- package/dist/esm/elements/nav/NavItem.js +6 -12
- package/dist/esm/elements/nav/NavItemIcon.js +3 -18
- package/dist/esm/elements/nav/NavItemText.js +1 -1
- package/dist/esm/elements/nav/NavList.js +1 -1
- package/dist/esm/elements/sheet/Sheet.js +2 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js +1 -1
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +1 -1
- package/dist/esm/styled/StyledChrome.js +2 -5
- package/dist/esm/styled/StyledSkipNav.js +36 -18
- package/dist/esm/styled/StyledSkipNavIcon.js +10 -7
- package/dist/esm/styled/body/StyledBody.js +6 -6
- package/dist/esm/styled/body/StyledContent.js +18 -9
- package/dist/esm/styled/body/StyledMain.js +6 -6
- package/dist/esm/styled/footer/StyledFooter.js +28 -10
- package/dist/esm/styled/footer/StyledFooterItem.js +2 -5
- package/dist/esm/styled/header/StyledBaseHeaderItem.js +25 -19
- package/dist/esm/styled/header/StyledHeader.js +39 -15
- package/dist/esm/styled/header/StyledHeaderItem.js +46 -17
- package/dist/esm/styled/header/StyledHeaderItemIcon.js +13 -8
- package/dist/esm/styled/header/StyledHeaderItemText.js +6 -9
- package/dist/esm/styled/header/StyledHeaderItemWrapper.js +2 -5
- package/dist/esm/styled/header/StyledLogoHeaderItem.js +33 -28
- package/dist/esm/styled/nav/StyledBaseNavItem.js +12 -15
- package/dist/esm/styled/nav/StyledBrandmarkNavItem.js +2 -6
- package/dist/esm/styled/nav/StyledLogoNavItem.js +15 -29
- package/dist/esm/styled/nav/StyledNav.js +33 -16
- package/dist/esm/styled/nav/StyledNavButton.js +64 -38
- package/dist/esm/styled/nav/StyledNavItemIcon.js +12 -8
- package/dist/esm/styled/nav/StyledNavItemText.js +19 -17
- package/dist/esm/styled/nav/StyledNavList.js +2 -5
- package/dist/esm/styled/nav/StyledNavListItem.js +2 -5
- package/dist/esm/styled/sheet/StyledSheet.js +32 -20
- package/dist/esm/styled/sheet/StyledSheetBody.js +3 -6
- package/dist/esm/styled/sheet/StyledSheetClose.js +13 -19
- package/dist/esm/styled/sheet/StyledSheetDescription.js +6 -6
- package/dist/esm/styled/sheet/StyledSheetFooter.js +23 -7
- package/dist/esm/styled/sheet/StyledSheetFooterItem.js +2 -5
- package/dist/esm/styled/sheet/StyledSheetHeader.js +27 -8
- package/dist/esm/styled/sheet/StyledSheetTitle.js +6 -6
- package/dist/esm/styled/sheet/StyledSheetWrapper.js +22 -22
- package/dist/esm/styled/utils.js +20 -0
- package/dist/esm/types/index.js +1 -1
- package/dist/index.cjs.js +633 -492
- package/dist/typings/elements/footer/Footer.d.ts +1 -1
- package/dist/typings/elements/header/Header.d.ts +1 -1
- package/dist/typings/elements/header/HeaderItemIcon.d.ts +4 -1
- package/dist/typings/elements/nav/Nav.d.ts +1 -1
- package/dist/typings/elements/nav/NavItemIcon.d.ts +4 -1
- package/dist/typings/elements/sheet/Sheet.d.ts +3 -1
- package/dist/typings/styled/StyledSkipNav.d.ts +0 -3
- package/dist/typings/styled/StyledSkipNavIcon.d.ts +2 -2
- package/dist/typings/styled/body/StyledContent.d.ts +2 -1
- package/dist/typings/styled/footer/StyledFooter.d.ts +1 -2
- package/dist/typings/styled/header/StyledBaseHeaderItem.d.ts +1 -6
- package/dist/typings/styled/header/StyledHeader.d.ts +1 -2
- package/dist/typings/styled/header/StyledHeaderItem.d.ts +0 -3
- package/dist/typings/styled/header/StyledHeaderItemIcon.d.ts +2 -4
- package/dist/typings/styled/header/StyledHeaderItemText.d.ts +0 -1
- package/dist/typings/styled/header/StyledLogoHeaderItem.d.ts +2 -4
- package/dist/typings/styled/nav/StyledBaseNavItem.d.ts +1 -2
- package/dist/typings/styled/nav/StyledBrandmarkNavItem.d.ts +0 -3
- package/dist/typings/styled/nav/StyledLogoNavItem.d.ts +3 -7
- package/dist/typings/styled/nav/StyledNav.d.ts +2 -6
- package/dist/typings/styled/nav/StyledNavButton.d.ts +2 -13
- package/dist/typings/styled/nav/StyledNavItemIcon.d.ts +2 -4
- package/dist/typings/styled/nav/StyledNavItemText.d.ts +2 -1
- package/dist/typings/styled/sheet/StyledSheet.d.ts +1 -0
- package/dist/typings/styled/sheet/StyledSheetClose.d.ts +3 -8
- package/dist/typings/styled/sheet/StyledSheetDescription.d.ts +2 -3
- package/dist/typings/styled/sheet/StyledSheetFooter.d.ts +2 -2
- package/dist/typings/styled/sheet/StyledSheetFooterItem.d.ts +2 -3
- package/dist/typings/styled/sheet/StyledSheetHeader.d.ts +2 -6
- package/dist/typings/styled/sheet/StyledSheetTitle.d.ts +2 -3
- package/dist/typings/styled/sheet/StyledSheetWrapper.d.ts +2 -2
- package/dist/typings/styled/utils.d.ts +15 -0
- package/dist/typings/types/index.d.ts +1 -1
- package/dist/typings/utils/useChromeContext.d.ts +0 -1
- package/dist/typings/utils/useSheetContext.d.ts +0 -1
- package/package.json +8 -8
- package/LICENSE.md +0 -176
package/dist/index.cjs.js
CHANGED
|
@@ -11,6 +11,7 @@ var PropTypes = require('prop-types');
|
|
|
11
11
|
var styled = require('styled-components');
|
|
12
12
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
13
13
|
var polished = require('polished');
|
|
14
|
+
var reactButtons = require('@zendeskgarden/react-buttons');
|
|
14
15
|
var reactUid = require('react-uid');
|
|
15
16
|
var reactMergeRefs = require('react-merge-refs');
|
|
16
17
|
var activeElement = require('dom-helpers/activeElement');
|
|
@@ -41,202 +42,82 @@ var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
|
41
42
|
var activeElement__default = /*#__PURE__*/_interopDefault(activeElement);
|
|
42
43
|
|
|
43
44
|
const PLACEMENT = ['end', 'start'];
|
|
44
|
-
const PRODUCTS = ['chat', '
|
|
45
|
+
const PRODUCTS = ['chat', 'explore', 'guide', 'support', 'talk'];
|
|
45
46
|
|
|
46
47
|
const COMPONENT_ID$w = 'chrome.chrome';
|
|
47
48
|
const StyledChrome = styled__default.default.div.attrs({
|
|
48
49
|
'data-garden-id': COMPONENT_ID$w,
|
|
49
|
-
'data-garden-version': '9.0.0
|
|
50
|
+
'data-garden-version': '9.0.0'
|
|
50
51
|
}).withConfig({
|
|
51
52
|
displayName: "StyledChrome",
|
|
52
53
|
componentId: "sc-1uqm6u6-0"
|
|
53
54
|
})(["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 => reactTheming.retrieveComponentStyles(COMPONENT_ID$w, props));
|
|
54
|
-
StyledChrome.defaultProps = {
|
|
55
|
-
theme: reactTheming.DEFAULT_THEME
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const COMPONENT_ID$v = 'chrome.header_item_icon';
|
|
59
|
-
const StyledHeaderItemIcon = styled__default.default.div.attrs({
|
|
60
|
-
'data-garden-id': COMPONENT_ID$v,
|
|
61
|
-
'data-garden-version': '9.0.0-next.8'
|
|
62
|
-
}).withConfig({
|
|
63
|
-
displayName: "StyledHeaderItemIcon",
|
|
64
|
-
componentId: "sc-1jhhp6z-0"
|
|
65
|
-
})(["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 => reactTheming.retrieveComponentStyles(COMPONENT_ID$v, props));
|
|
66
|
-
StyledHeaderItemIcon.defaultProps = {
|
|
67
|
-
theme: reactTheming.DEFAULT_THEME
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const COMPONENT_ID$u = 'chrome.base_header_item';
|
|
71
|
-
const getHeaderItemSize = props => `${props.theme.space.base * 7.5}px`;
|
|
72
|
-
const sizeStyles$3 = props => {
|
|
73
|
-
const size = props.theme.space.base * 7.5;
|
|
74
|
-
return styled.css(["padding:0 3px;min-width:", "px;height:", ";line-height:", ";"], size, props.maxY ? '100%' : `${size}px`, reactTheming.getLineHeight(size, props.theme.fontSizes.md));
|
|
75
|
-
};
|
|
76
|
-
const StyledBaseHeaderItem = styled__default.default.button.attrs({
|
|
77
|
-
'data-garden-id': COMPONENT_ID$u,
|
|
78
|
-
'data-garden-version': '9.0.0-next.8'
|
|
79
|
-
}).withConfig({
|
|
80
|
-
displayName: "StyledBaseHeaderItem",
|
|
81
|
-
componentId: "sc-1qua7h6-0"
|
|
82
|
-
})(["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 => {
|
|
83
|
-
if (props.isRound) {
|
|
84
|
-
return '100%';
|
|
85
|
-
}
|
|
86
|
-
if (props.maxY) {
|
|
87
|
-
return '0';
|
|
88
|
-
}
|
|
89
|
-
return props.theme.borderRadii.md;
|
|
90
|
-
}, sizeStyles$3, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
|
|
91
|
-
StyledBaseHeaderItem.defaultProps = {
|
|
92
|
-
theme: reactTheming.DEFAULT_THEME
|
|
93
|
-
};
|
|
94
55
|
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
StyledHeaderItemText.defaultProps = {
|
|
105
|
-
theme: reactTheming.DEFAULT_THEME
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const COMPONENT_ID$s = 'chrome.nav';
|
|
109
|
-
const colorStyles$4 = props => {
|
|
110
|
-
const shade = props.isDark || props.isLight ? 600 : 700;
|
|
111
|
-
const backgroundColor = reactTheming.getColorV8(props.hue, shade, props.theme);
|
|
112
|
-
const foregroundColor = props.isLight ? props.theme.palette.black : props.theme.palette.white;
|
|
113
|
-
return styled.css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
114
|
-
};
|
|
115
|
-
const getNavWidth = props => {
|
|
116
|
-
return `${props.theme.space.base * 15}px`;
|
|
117
|
-
};
|
|
118
|
-
const getExpandedNavWidth = () => {
|
|
119
|
-
return `200px`;
|
|
120
|
-
};
|
|
121
|
-
const StyledNav = styled__default.default.nav.attrs({
|
|
122
|
-
'data-garden-id': COMPONENT_ID$s,
|
|
123
|
-
'data-garden-version': '9.0.0-next.8'
|
|
124
|
-
}).withConfig({
|
|
125
|
-
displayName: "StyledNav",
|
|
126
|
-
componentId: "sc-6j462r-0"
|
|
127
|
-
})(["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$4(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
|
|
128
|
-
StyledNav.defaultProps = {
|
|
129
|
-
theme: reactTheming.DEFAULT_THEME
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const COMPONENT_ID$r = 'chrome.header_item';
|
|
133
|
-
const retrieveProductColor$1 = props => {
|
|
134
|
-
switch (props.product) {
|
|
135
|
-
case 'chat':
|
|
136
|
-
return reactTheming.PALETTE.product.chat;
|
|
137
|
-
case 'connect':
|
|
138
|
-
return reactTheming.PALETTE.product.connect;
|
|
139
|
-
case 'explore':
|
|
140
|
-
return reactTheming.PALETTE.product.explore;
|
|
141
|
-
case 'guide':
|
|
142
|
-
return reactTheming.PALETTE.product.guide;
|
|
143
|
-
case 'message':
|
|
144
|
-
return reactTheming.PALETTE.product.message;
|
|
145
|
-
case 'support':
|
|
146
|
-
return reactTheming.PALETTE.product.support;
|
|
147
|
-
case 'talk':
|
|
148
|
-
return reactTheming.PALETTE.product.talk;
|
|
149
|
-
default:
|
|
150
|
-
return 'inherit';
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
const StyledLogoHeaderItem = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
154
|
-
'data-garden-id': COMPONENT_ID$r,
|
|
155
|
-
'data-garden-version': '9.0.0-next.8',
|
|
156
|
-
as: 'div'
|
|
157
|
-
}).withConfig({
|
|
158
|
-
displayName: "StyledLogoHeaderItem",
|
|
159
|
-
componentId: "sc-1n1d1yv-0"
|
|
160
|
-
})(["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} ${reactTheming.getColorV8('neutralHue', 300, props.theme)}`, props => getNavWidth(props), props => reactTheming.getColorV8('chromeHue', 700, props.theme), props => retrieveProductColor$1(props), StyledHeaderItemText, clippedStyling, StyledHeaderItemIcon, props => props.theme.iconSizes.lg, props => props.theme.iconSizes.lg, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
|
|
161
|
-
StyledLogoHeaderItem.defaultProps = {
|
|
162
|
-
theme: reactTheming.DEFAULT_THEME
|
|
56
|
+
const getFooterHeight = theme => `${theme.space.base * 20}px`;
|
|
57
|
+
const getHeaderHeight = theme => `${theme.space.base * 13}px`;
|
|
58
|
+
const getHeaderItemSize = theme => `${theme.space.base * 7.5}px`;
|
|
59
|
+
const getNavItemHeight = theme => getHeaderHeight(theme);
|
|
60
|
+
const getNavWidth = theme => `${theme.space.base * 15}px`;
|
|
61
|
+
const getNavWidthExpanded = () => `200px`;
|
|
62
|
+
const getProductColor = function (product) {
|
|
63
|
+
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'inherit';
|
|
64
|
+
return product ? reactTheming.PALETTE.product[product] || fallback : fallback;
|
|
163
65
|
};
|
|
164
66
|
|
|
165
|
-
const COMPONENT_ID$
|
|
166
|
-
const getNavItemHeight = props => {
|
|
167
|
-
return `${props.theme.space.base * 13}px`;
|
|
168
|
-
};
|
|
169
|
-
const sizeStyles$2 = props => {
|
|
170
|
-
const verticalPadding = polished.math(`(${getNavItemHeight(props)} - ${props.theme.iconSizes.lg}) / 2`);
|
|
171
|
-
const horizontalPadding = polished.math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`);
|
|
172
|
-
return styled.css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, getNavItemHeight);
|
|
173
|
-
};
|
|
174
|
-
const StyledBaseNavItem = styled__default.default.div.attrs({
|
|
175
|
-
'data-garden-id': COMPONENT_ID$q,
|
|
176
|
-
'data-garden-version': '9.0.0-next.8'
|
|
177
|
-
}).withConfig({
|
|
178
|
-
displayName: "StyledBaseNavItem",
|
|
179
|
-
componentId: "sc-zvo43f-0"
|
|
180
|
-
})(["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$2(props));
|
|
181
|
-
StyledBaseNavItem.defaultProps = {
|
|
182
|
-
theme: reactTheming.DEFAULT_THEME
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
const COMPONENT_ID$p = 'chrome.header';
|
|
186
|
-
const getHeaderHeight = props => {
|
|
187
|
-
return getNavItemHeight(props);
|
|
188
|
-
};
|
|
189
|
-
const StyledHeader = styled__default.default.header.attrs({
|
|
190
|
-
'data-garden-id': COMPONENT_ID$p,
|
|
191
|
-
'data-garden-version': '9.0.0-next.8'
|
|
192
|
-
}).withConfig({
|
|
193
|
-
displayName: "StyledHeader",
|
|
194
|
-
componentId: "sc-1cexpz-0"
|
|
195
|
-
})(["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} ${reactTheming.getColorV8('neutralHue', 300, props.theme)}`, props => props.isStandalone && props.theme.shadows.lg('0', '10px', reactTheming.getColorV8('chromeHue', 600, props.theme, 0.15)), props => reactTheming.getColorV8('background', 600 , props.theme), props => props.theme.space.base, getHeaderHeight, props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => props.theme.fontSizes.md, props => props.isStandalone && `
|
|
196
|
-
${StyledLogoHeaderItem} {
|
|
197
|
-
display: inline-flex;
|
|
198
|
-
}
|
|
199
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
200
|
-
StyledHeader.defaultProps = {
|
|
201
|
-
theme: reactTheming.DEFAULT_THEME
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
const COMPONENT_ID$o = 'chrome.skipnav';
|
|
67
|
+
const COMPONENT_ID$v = 'chrome.skipnav';
|
|
205
68
|
const animationStyles = () => {
|
|
206
69
|
const animationName = styled.keyframes(["0%{transform:translate(-50%,-50%);}"]);
|
|
207
70
|
return styled.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);
|
|
208
71
|
};
|
|
209
|
-
const colorStyles$
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
72
|
+
const colorStyles$a = _ref => {
|
|
73
|
+
let {
|
|
74
|
+
theme
|
|
75
|
+
} = _ref;
|
|
76
|
+
const backgroundColor = reactTheming.getColor({
|
|
77
|
+
theme,
|
|
78
|
+
variable: 'background.raised'
|
|
79
|
+
});
|
|
80
|
+
const borderColor = reactTheming.getColor({
|
|
81
|
+
theme,
|
|
82
|
+
variable: 'border.default'
|
|
83
|
+
});
|
|
84
|
+
const boxShadowColor = reactTheming.getColor({
|
|
85
|
+
variable: 'shadow.medium',
|
|
86
|
+
theme
|
|
87
|
+
});
|
|
88
|
+
const boxShadow = theme.shadows.lg(`${theme.space.base * 4}px`, `${theme.space.base * 6}px`, boxShadowColor);
|
|
89
|
+
const foregroundColor = reactTheming.getColor({
|
|
90
|
+
theme,
|
|
91
|
+
variable: 'foreground.primary'
|
|
92
|
+
});
|
|
93
|
+
return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";&:hover,&:focus{color:", ";}", ""], borderColor, boxShadow, backgroundColor, foregroundColor, foregroundColor, reactTheming.focusStyles({
|
|
214
94
|
theme,
|
|
215
95
|
inset: true,
|
|
216
96
|
boxShadow
|
|
217
97
|
}));
|
|
218
98
|
};
|
|
219
|
-
const sizeStyles$
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const
|
|
99
|
+
const sizeStyles$g = _ref2 => {
|
|
100
|
+
let {
|
|
101
|
+
theme
|
|
102
|
+
} = _ref2;
|
|
103
|
+
const top = polished.math(`${getHeaderHeight(theme)} / 2`);
|
|
104
|
+
const border = theme.borders.sm;
|
|
105
|
+
const padding = `${theme.space.base * 5}px`;
|
|
106
|
+
const paddingStart = `${theme.space.base * 4}px`;
|
|
107
|
+
const fontSize = theme.fontSizes.md;
|
|
224
108
|
const lineHeight = reactTheming.getLineHeight(padding, fontSize);
|
|
225
|
-
return styled.css(["top:", ";padding:", ";padding-", ":", ";line-height:", ";font-size:", ";"], top, padding,
|
|
109
|
+
return styled.css(["top:", ";border:", ";padding:", ";padding-", ":", ";line-height:", ";font-size:", ";"], top, border, padding, theme.rtl ? 'right' : 'left', paddingStart, lineHeight, fontSize);
|
|
226
110
|
};
|
|
227
111
|
const StyledSkipNav = styled__default.default.a.attrs({
|
|
228
|
-
'data-garden-id': COMPONENT_ID$
|
|
229
|
-
'data-garden-version': '9.0.0
|
|
112
|
+
'data-garden-id': COMPONENT_ID$v,
|
|
113
|
+
'data-garden-version': '9.0.0'
|
|
230
114
|
}).withConfig({
|
|
231
115
|
displayName: "StyledSkipNav",
|
|
232
116
|
componentId: "sc-1tsro34-0"
|
|
233
|
-
})(["", ";display:inline-flex;position:absolute;left:50%;align-items:center;justify-content:center;transform:translateX(-50%);direction:", ";z-index:", ";border
|
|
234
|
-
StyledSkipNav.defaultProps = {
|
|
235
|
-
theme: reactTheming.DEFAULT_THEME
|
|
236
|
-
};
|
|
117
|
+
})(["", ";display:inline-flex;position:absolute;left:50%;align-items:center;justify-content:center;transform:translateX(-50%);direction:", ";z-index:", ";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.borderRadii.md, sizeStyles$g, reactTheming.SELECTOR_FOCUS_VISIBLE, colorStyles$a, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$v, props));
|
|
237
118
|
|
|
238
119
|
var _path$1;
|
|
239
|
-
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (
|
|
120
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
240
121
|
var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
241
122
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
242
123
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -251,432 +132,721 @@ var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
|
251
132
|
})));
|
|
252
133
|
};
|
|
253
134
|
|
|
254
|
-
const COMPONENT_ID$
|
|
255
|
-
const sizeStyles =
|
|
135
|
+
const COMPONENT_ID$u = 'chrome.skipnav_icon';
|
|
136
|
+
const sizeStyles$f = _ref => {
|
|
137
|
+
let {
|
|
138
|
+
theme
|
|
139
|
+
} = _ref;
|
|
256
140
|
const margin = `${theme.space.base * 2}px`;
|
|
257
141
|
const size = theme.iconSizes.md;
|
|
258
142
|
return styled.css(["margin-", ":", ";width:", ";height:", ";"], theme.rtl ? 'left' : 'right', margin, size, size);
|
|
259
143
|
};
|
|
260
144
|
const StyledSkipNavIcon = styled__default.default(SvgLinkStroke).attrs({
|
|
261
|
-
'data-garden-id': COMPONENT_ID$
|
|
262
|
-
'data-garden-version': '9.0.0
|
|
145
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
146
|
+
'data-garden-version': '9.0.0'
|
|
263
147
|
}).withConfig({
|
|
264
148
|
displayName: "StyledSkipNavIcon",
|
|
265
149
|
componentId: "sc-1ika5z4-0"
|
|
266
|
-
})(["transform:", ";color:", ";", ";", ";"],
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
};
|
|
150
|
+
})(["transform:", ";color:", ";", ";", ";"], p => p.theme.rtl && 'scaleX(-1)', p => reactTheming.getColor({
|
|
151
|
+
theme: p.theme,
|
|
152
|
+
variable: 'foreground.subtle'
|
|
153
|
+
}), sizeStyles$f, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$u, props));
|
|
270
154
|
|
|
271
|
-
const COMPONENT_ID$
|
|
155
|
+
const COMPONENT_ID$t = 'chrome.body';
|
|
272
156
|
const StyledBody = styled__default.default.div.attrs({
|
|
273
|
-
'data-garden-id': COMPONENT_ID$
|
|
274
|
-
'data-garden-version': '9.0.0
|
|
157
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
158
|
+
'data-garden-version': '9.0.0'
|
|
275
159
|
}).withConfig({
|
|
276
160
|
displayName: "StyledBody",
|
|
277
161
|
componentId: "sc-c7h9kv-0"
|
|
278
|
-
})(["flex:1;order:1;background-color:", ";min-width:0;", ";"], props => reactTheming.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
};
|
|
162
|
+
})(["flex:1;order:1;background-color:", ";min-width:0;", ";"], props => reactTheming.getColor({
|
|
163
|
+
theme: props.theme,
|
|
164
|
+
variable: 'background.default'
|
|
165
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
282
166
|
|
|
283
|
-
const COMPONENT_ID$
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
})
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
})(["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} ${reactTheming.getColorV8('neutralHue', 300, props.theme)}`, props => reactTheming.getColorV8('background', 600 , props.theme), props => props.theme.space.base * 9, getFooterHeight, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
294
|
-
StyledFooter.defaultProps = {
|
|
295
|
-
theme: reactTheming.DEFAULT_THEME
|
|
167
|
+
const COMPONENT_ID$s = 'chrome.content';
|
|
168
|
+
const sizeStyles$e = _ref => {
|
|
169
|
+
let {
|
|
170
|
+
theme,
|
|
171
|
+
hasFooter
|
|
172
|
+
} = _ref;
|
|
173
|
+
const fontSize = theme.fontSizes.md;
|
|
174
|
+
const height = hasFooter ? `calc(100% - ${polished.math(`${getHeaderHeight(theme)} + ${getFooterHeight(theme)}`)})` : `calc(100% - ${getHeaderHeight(theme)})`;
|
|
175
|
+
const lineHeight = reactTheming.getLineHeight(theme.lineHeights.md, theme.fontSizes.md);
|
|
176
|
+
return styled.css(["height:", ";line-height:", ";font-size:", ";"], height, lineHeight, fontSize);
|
|
296
177
|
};
|
|
297
|
-
|
|
298
|
-
const COMPONENT_ID$k = 'chrome.content';
|
|
299
178
|
const StyledContent = styled__default.default.div.attrs({
|
|
300
|
-
'data-garden-id': COMPONENT_ID$
|
|
301
|
-
'data-garden-version': '9.0.0
|
|
179
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
180
|
+
'data-garden-version': '9.0.0'
|
|
302
181
|
}).withConfig({
|
|
303
182
|
displayName: "StyledContent",
|
|
304
183
|
componentId: "sc-qcuzxn-0"
|
|
305
|
-
})(["display:flex;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
};
|
|
184
|
+
})(["display:flex;color-scheme:only ", ";color:", ";", ";&:focus{outline:none;}", ";"], p => p.theme.colors.base, props => reactTheming.getColor({
|
|
185
|
+
theme: props.theme,
|
|
186
|
+
variable: 'foreground.default'
|
|
187
|
+
}), sizeStyles$e, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$s, props));
|
|
309
188
|
|
|
310
|
-
const COMPONENT_ID$
|
|
189
|
+
const COMPONENT_ID$r = 'chrome.main';
|
|
311
190
|
const StyledMain = styled__default.default.main.attrs({
|
|
312
|
-
'data-garden-id': COMPONENT_ID$
|
|
313
|
-
'data-garden-version': '9.0.0
|
|
191
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
192
|
+
'data-garden-version': '9.0.0'
|
|
314
193
|
}).withConfig({
|
|
315
194
|
displayName: "StyledMain",
|
|
316
195
|
componentId: "sc-t61cre-0"
|
|
317
|
-
})(["flex:1;order:1;background-color:", ";overflow:auto;:focus{outline:none;}", ";"], props => reactTheming.
|
|
318
|
-
|
|
319
|
-
|
|
196
|
+
})(["flex:1;order:1;background-color:", ";overflow:auto;:focus{outline:none;}", ";"], props => reactTheming.getColor({
|
|
197
|
+
theme: props.theme,
|
|
198
|
+
variable: 'background.default'
|
|
199
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$r, props));
|
|
200
|
+
|
|
201
|
+
const COMPONENT_ID$q = 'chrome.footer';
|
|
202
|
+
const colorStyles$9 = _ref => {
|
|
203
|
+
let {
|
|
204
|
+
theme
|
|
205
|
+
} = _ref;
|
|
206
|
+
const backgroundColor = reactTheming.getColor({
|
|
207
|
+
theme,
|
|
208
|
+
variable: 'background.default'
|
|
209
|
+
});
|
|
210
|
+
const borderColor = reactTheming.getColor({
|
|
211
|
+
theme,
|
|
212
|
+
variable: 'border.default'
|
|
213
|
+
});
|
|
214
|
+
return styled.css(["border-top-color:", ";background-color:", ";"], borderColor, backgroundColor);
|
|
215
|
+
};
|
|
216
|
+
const sizeStyles$d = _ref2 => {
|
|
217
|
+
let {
|
|
218
|
+
theme
|
|
219
|
+
} = _ref2;
|
|
220
|
+
const border = theme.borders.sm;
|
|
221
|
+
const padding = `0 ${theme.space.base * 9}px`;
|
|
222
|
+
const height = getFooterHeight(theme);
|
|
223
|
+
return styled.css(["box-sizing:border-box;border-top:", ";padding:", ";height:", ";"], border, padding, height);
|
|
320
224
|
};
|
|
225
|
+
const StyledFooter = styled__default.default.footer.attrs({
|
|
226
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
227
|
+
'data-garden-version': '9.0.0'
|
|
228
|
+
}).withConfig({
|
|
229
|
+
displayName: "StyledFooter",
|
|
230
|
+
componentId: "sc-v7lib2-0"
|
|
231
|
+
})(["display:flex;align-items:center;justify-content:flex-end;", ";", ";", ";"], sizeStyles$d, colorStyles$9, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$q, props));
|
|
321
232
|
|
|
322
|
-
const COMPONENT_ID$
|
|
233
|
+
const COMPONENT_ID$p = 'chrome.footer_item';
|
|
323
234
|
const StyledFooterItem = styled__default.default.div.attrs({
|
|
324
|
-
'data-garden-id': COMPONENT_ID$
|
|
325
|
-
'data-garden-version': '9.0.0
|
|
235
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
236
|
+
'data-garden-version': '9.0.0'
|
|
326
237
|
}).withConfig({
|
|
327
238
|
displayName: "StyledFooterItem",
|
|
328
239
|
componentId: "sc-1cktm85-0"
|
|
329
|
-
})(["margin:", ";", ";"], props => `0 ${props.theme.space.base}px`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
330
|
-
|
|
331
|
-
|
|
240
|
+
})(["margin:", ";", ";"], props => `0 ${props.theme.space.base}px`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
241
|
+
|
|
242
|
+
const COMPONENT_ID$o = 'chrome.header_item_icon';
|
|
243
|
+
const sizeStyles$c = _ref => {
|
|
244
|
+
let {
|
|
245
|
+
theme
|
|
246
|
+
} = _ref;
|
|
247
|
+
const margin = `0 ${theme.space.base * 0.75}px`;
|
|
248
|
+
const size = theme.iconSizes.md;
|
|
249
|
+
return styled.css(["margin:", ";width:", ";min-width:", ";height:", ";"], margin, size, size, size);
|
|
250
|
+
};
|
|
251
|
+
const StyledHeaderItemIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
252
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
253
|
+
'data-garden-version': '9.0.0'
|
|
254
|
+
}).withConfig({
|
|
255
|
+
displayName: "StyledHeaderItemIcon",
|
|
256
|
+
componentId: "sc-1jhhp6z-0"
|
|
257
|
+
})(["transition:transform 0.25s ease-in-out;", ";", ";"], sizeStyles$c, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
|
|
258
|
+
|
|
259
|
+
const COMPONENT_ID$n = 'chrome.base_header_item';
|
|
260
|
+
const sizeStyles$b = _ref => {
|
|
261
|
+
let {
|
|
262
|
+
theme,
|
|
263
|
+
maxY,
|
|
264
|
+
isRound
|
|
265
|
+
} = _ref;
|
|
266
|
+
const margin = `0 ${theme.space.base * 3}px`;
|
|
267
|
+
const size = getHeaderItemSize(theme);
|
|
268
|
+
const height = maxY ? '100%' : size;
|
|
269
|
+
const lineHeight = reactTheming.getLineHeight(size, theme.fontSizes.md);
|
|
270
|
+
const padding = `0 ${theme.space.base * 0.75}px`;
|
|
271
|
+
let borderRadius;
|
|
272
|
+
if (isRound) {
|
|
273
|
+
borderRadius = '100%';
|
|
274
|
+
} else if (maxY) {
|
|
275
|
+
borderRadius = '0';
|
|
276
|
+
} else {
|
|
277
|
+
borderRadius = theme.borderRadii.md;
|
|
278
|
+
}
|
|
279
|
+
return styled.css(["margin:", ";border-radius:", ";padding:", ";min-width:", ";height:", ";line-height:", ";font-size:inherit;"], margin, borderRadius, padding, size, height, lineHeight);
|
|
280
|
+
};
|
|
281
|
+
const StyledBaseHeaderItem = styled__default.default.button.attrs({
|
|
282
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
283
|
+
'data-garden-version': '9.0.0'
|
|
284
|
+
}).withConfig({
|
|
285
|
+
displayName: "StyledBaseHeaderItem",
|
|
286
|
+
componentId: "sc-1qua7h6-0"
|
|
287
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
|
|
288
|
+
|
|
289
|
+
const COMPONENT_ID$m = 'chrome.header_item_text';
|
|
290
|
+
const StyledHeaderItemText = styled__default.default.span.attrs({
|
|
291
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
292
|
+
'data-garden-version': '9.0.0'
|
|
293
|
+
}).withConfig({
|
|
294
|
+
displayName: "StyledHeaderItemText",
|
|
295
|
+
componentId: "sc-goz7la-0"
|
|
296
|
+
})(["margin:", ";", " ", ";"], props => `0 ${props.theme.space.base * 0.75}px`, props => props.isClipped && polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
|
|
297
|
+
|
|
298
|
+
const COMPONENT_ID$l = 'chrome.header_item';
|
|
299
|
+
const colorStyles$8 = _ref => {
|
|
300
|
+
let {
|
|
301
|
+
theme,
|
|
302
|
+
product
|
|
303
|
+
} = _ref;
|
|
304
|
+
const borderColor = reactTheming.getColor({
|
|
305
|
+
theme,
|
|
306
|
+
variable: 'border.default'
|
|
307
|
+
});
|
|
308
|
+
const fill = reactTheming.getColor({
|
|
309
|
+
theme,
|
|
310
|
+
variable: 'foreground.default'
|
|
311
|
+
});
|
|
312
|
+
const color = getProductColor(product, fill );
|
|
313
|
+
return styled.css(["border-", "-color:", ";color:", ";fill:", ";"], theme.rtl ? 'left' : 'right', borderColor, color, fill);
|
|
314
|
+
};
|
|
315
|
+
const sizeStyles$a = _ref2 => {
|
|
316
|
+
let {
|
|
317
|
+
theme
|
|
318
|
+
} = _ref2;
|
|
319
|
+
const border = theme.borders.sm;
|
|
320
|
+
const iconSize = theme.iconSizes.lg;
|
|
321
|
+
const marginRight = theme.rtl ? `-${theme.space.base}px` : 'auto';
|
|
322
|
+
const marginLeft = theme.rtl ? 'auto' : `-${theme.space.base}px`;
|
|
323
|
+
const width = getNavWidth(theme);
|
|
324
|
+
return styled.css(["margin-right:", ";margin-left:", ";border-", ":", ";width:", ";height:100%;", "{margin:0;width:", ";height:", ";}"], marginRight, marginLeft, theme.rtl ? 'left' : 'right', border, width, StyledHeaderItemIcon, iconSize, iconSize);
|
|
325
|
+
};
|
|
326
|
+
const StyledLogoHeaderItem = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
327
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
328
|
+
'data-garden-version': '9.0.0',
|
|
329
|
+
as: 'div'
|
|
330
|
+
}).withConfig({
|
|
331
|
+
displayName: "StyledLogoHeaderItem",
|
|
332
|
+
componentId: "sc-1n1d1yv-0"
|
|
333
|
+
})(["display:none;order:0;border-radius:0;padding:0;overflow:hidden;text-decoration:none;", ";", ";", "{", "}", ";"], sizeStyles$a, colorStyles$8, StyledHeaderItemText, polished.hideVisually(), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$l, props));
|
|
334
|
+
|
|
335
|
+
const COMPONENT_ID$k = 'chrome.header';
|
|
336
|
+
const colorStyles$7 = _ref => {
|
|
337
|
+
let {
|
|
338
|
+
theme,
|
|
339
|
+
isStandalone
|
|
340
|
+
} = _ref;
|
|
341
|
+
const backgroundColor = reactTheming.getColor({
|
|
342
|
+
theme,
|
|
343
|
+
variable: 'background.default'
|
|
344
|
+
});
|
|
345
|
+
const borderColor = reactTheming.getColor({
|
|
346
|
+
theme,
|
|
347
|
+
variable: 'border.default'
|
|
348
|
+
});
|
|
349
|
+
const boxShadowColor = reactTheming.getColor({
|
|
350
|
+
variable: 'shadow.small',
|
|
351
|
+
theme
|
|
352
|
+
});
|
|
353
|
+
const boxShadow = isStandalone ? theme.shadows.lg('0', `${theme.space.base * 2}px`, boxShadowColor) : undefined;
|
|
354
|
+
const foregroundColor = reactTheming.getColor({
|
|
355
|
+
theme,
|
|
356
|
+
variable: 'foreground.subtle'
|
|
357
|
+
});
|
|
358
|
+
return styled.css(["border-bottom-color:", ";box-shadow:", ";background-color:", ";color:", ";"], borderColor, boxShadow, backgroundColor, foregroundColor);
|
|
359
|
+
};
|
|
360
|
+
const sizeStyles$9 = _ref2 => {
|
|
361
|
+
let {
|
|
362
|
+
theme
|
|
363
|
+
} = _ref2;
|
|
364
|
+
const border = theme.borders.sm;
|
|
365
|
+
const padding = `0 ${theme.space.base}px`;
|
|
366
|
+
const fontSize = theme.fontSizes.md;
|
|
367
|
+
const height = getHeaderHeight(theme);
|
|
368
|
+
return styled.css(["box-sizing:border-box;border-bottom:", ";padding:", ";height:", ";font-size:", ";"], border, padding, height, fontSize);
|
|
332
369
|
};
|
|
370
|
+
const StyledHeader = styled__default.default.header.attrs({
|
|
371
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
372
|
+
'data-garden-version': '9.0.0'
|
|
373
|
+
}).withConfig({
|
|
374
|
+
displayName: "StyledHeader",
|
|
375
|
+
componentId: "sc-1cexpz-0"
|
|
376
|
+
})(["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', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
333
377
|
|
|
334
|
-
const COMPONENT_ID$
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
378
|
+
const COMPONENT_ID$j = 'chrome.header_item';
|
|
379
|
+
const colorStyles$6 = _ref => {
|
|
380
|
+
let {
|
|
381
|
+
theme,
|
|
382
|
+
maxY
|
|
383
|
+
} = _ref;
|
|
384
|
+
const options = {
|
|
385
|
+
theme,
|
|
386
|
+
variable: 'foreground.subtle'
|
|
387
|
+
};
|
|
388
|
+
const hoverColor = reactTheming.getColor({
|
|
389
|
+
...options,
|
|
390
|
+
dark: {
|
|
391
|
+
offset: -100
|
|
392
|
+
},
|
|
393
|
+
light: {
|
|
394
|
+
offset: 100
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
const activeColor = reactTheming.getColor({
|
|
398
|
+
...options,
|
|
399
|
+
dark: {
|
|
400
|
+
offset: -200
|
|
401
|
+
},
|
|
402
|
+
light: {
|
|
403
|
+
offset: 200
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
return styled.css(["&:hover,&:focus{color:inherit;}", ";&:hover ", ",&:hover ", "{color:", ";}&:active ", ",&:active ", "{color:", ";}"], reactTheming.focusStyles({
|
|
407
|
+
theme,
|
|
408
|
+
inset: maxY
|
|
409
|
+
}), StyledHeaderItemIcon, StyledHeaderItemText, hoverColor, StyledHeaderItemIcon, StyledHeaderItemText, activeColor);
|
|
410
|
+
};
|
|
411
|
+
const sizeStyles$8 = _ref2 => {
|
|
412
|
+
let {
|
|
413
|
+
theme,
|
|
414
|
+
isRound
|
|
415
|
+
} = _ref2;
|
|
416
|
+
const iconBorderRadius = isRound ? '100px' : undefined;
|
|
417
|
+
const imageBorderRadius = polished.math(`${theme.borderRadii.md} - 1`);
|
|
418
|
+
const imageSize = polished.math(`${getHeaderItemSize(theme)} - ${theme.space.base * 2}`);
|
|
419
|
+
return styled.css(["img{margin:0;border-radius:", ";width:", ";height:", ";}", "{border-radius:", ";}"], imageBorderRadius, imageSize, imageSize, StyledHeaderItemIcon, iconBorderRadius);
|
|
338
420
|
};
|
|
339
421
|
const StyledHeaderItem = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
340
|
-
'data-garden-id': COMPONENT_ID$
|
|
341
|
-
'data-garden-version': '9.0.0
|
|
422
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
423
|
+
'data-garden-version': '9.0.0'
|
|
342
424
|
}).withConfig({
|
|
343
425
|
displayName: "StyledHeaderItem",
|
|
344
426
|
componentId: "sc-14sft6n-0"
|
|
345
|
-
})(["
|
|
346
|
-
theme: props.theme,
|
|
347
|
-
inset: props.maxY
|
|
348
|
-
}), StyledHeaderItemIcon, StyledHeaderItemText, StyledHeaderItemIcon, StyledHeaderItemText, props => reactTheming.getColorV8('chromeHue', 700, props.theme), imgStyles, props => props.isRound && `
|
|
349
|
-
${StyledHeaderItemIcon} {
|
|
350
|
-
border-radius: 100px;
|
|
351
|
-
}
|
|
352
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
353
|
-
StyledHeaderItem.defaultProps = {
|
|
354
|
-
theme: reactTheming.DEFAULT_THEME
|
|
355
|
-
};
|
|
427
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
|
|
356
428
|
|
|
357
|
-
const COMPONENT_ID$
|
|
429
|
+
const COMPONENT_ID$i = 'chrome.header_item_wrapper';
|
|
358
430
|
const StyledHeaderItemWrapper = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
359
|
-
'data-garden-id': COMPONENT_ID$
|
|
360
|
-
'data-garden-version': '9.0.0
|
|
431
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
432
|
+
'data-garden-version': '9.0.0',
|
|
361
433
|
as: 'div'
|
|
362
434
|
}).withConfig({
|
|
363
435
|
displayName: "StyledHeaderItemWrapper",
|
|
364
436
|
componentId: "sc-1uieu55-0"
|
|
365
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
366
|
-
|
|
367
|
-
|
|
437
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
438
|
+
|
|
439
|
+
const COMPONENT_ID$h = 'chrome.nav';
|
|
440
|
+
const colorStyles$5 = _ref => {
|
|
441
|
+
let {
|
|
442
|
+
theme,
|
|
443
|
+
hue
|
|
444
|
+
} = _ref;
|
|
445
|
+
const shade = hue === 'chromeHue' ? 900 : undefined;
|
|
446
|
+
const backgroundColor = reactTheming.getColor({
|
|
447
|
+
theme,
|
|
448
|
+
hue,
|
|
449
|
+
shade
|
|
450
|
+
});
|
|
451
|
+
const foregroundColor = reactTheming.getColor({
|
|
452
|
+
theme,
|
|
453
|
+
dark: {
|
|
454
|
+
hue: 'white'
|
|
455
|
+
},
|
|
456
|
+
light: {
|
|
457
|
+
hue: 'black'
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
return styled.css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
461
|
+
};
|
|
462
|
+
const sizeStyles$7 = _ref2 => {
|
|
463
|
+
let {
|
|
464
|
+
theme,
|
|
465
|
+
isExpanded
|
|
466
|
+
} = _ref2;
|
|
467
|
+
const fontSize = theme.fontSizes.md;
|
|
468
|
+
const width = isExpanded ? getNavWidthExpanded() : getNavWidth(theme);
|
|
469
|
+
return styled.css(["width:", ";font-size:", ";"], width, fontSize);
|
|
368
470
|
};
|
|
471
|
+
const StyledNav = styled__default.default.nav.attrs({
|
|
472
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
473
|
+
'data-garden-version': '9.0.0'
|
|
474
|
+
}).withConfig({
|
|
475
|
+
displayName: "StyledNav",
|
|
476
|
+
componentId: "sc-6j462r-0"
|
|
477
|
+
})(["display:flex;position:relative;flex-direction:column;flex-shrink:0;order:-1;", ";", ";", ";"], colorStyles$5, sizeStyles$7, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
369
478
|
|
|
370
|
-
const COMPONENT_ID$
|
|
479
|
+
const COMPONENT_ID$g = 'chrome.nav_list';
|
|
371
480
|
const StyledNavList = styled__default.default.ul.attrs({
|
|
372
|
-
'data-garden-id': COMPONENT_ID$
|
|
373
|
-
'data-garden-version': '9.0.0
|
|
481
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
482
|
+
'data-garden-version': '9.0.0'
|
|
374
483
|
}).withConfig({
|
|
375
484
|
displayName: "StyledNavList",
|
|
376
485
|
componentId: "sc-1s0nkfb-0"
|
|
377
|
-
})(["display:flex;flex:1;flex-direction:column;order:0;margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
378
|
-
StyledNavList.defaultProps = {
|
|
379
|
-
theme: reactTheming.DEFAULT_THEME
|
|
380
|
-
};
|
|
486
|
+
})(["display:flex;flex:1;flex-direction:column;order:0;margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
381
487
|
|
|
382
|
-
const COMPONENT_ID$
|
|
488
|
+
const COMPONENT_ID$f = 'chrome.nav_list_item';
|
|
383
489
|
const StyledNavListItem = styled__default.default.li.attrs({
|
|
384
|
-
'data-garden-id': COMPONENT_ID$
|
|
385
|
-
'data-garden-version': '9.0.0
|
|
490
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
491
|
+
'data-garden-version': '9.0.0'
|
|
386
492
|
}).withConfig({
|
|
387
493
|
displayName: "StyledNavListItem",
|
|
388
494
|
componentId: "sc-18cj2v7-0"
|
|
389
|
-
})(["display:flex;order:1;margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
390
|
-
|
|
391
|
-
|
|
495
|
+
})(["display:flex;order:1;margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
496
|
+
|
|
497
|
+
const COMPONENT_ID$e = 'chrome.base_nav_item';
|
|
498
|
+
const sizeStyles$6 = _ref => {
|
|
499
|
+
let {
|
|
500
|
+
theme
|
|
501
|
+
} = _ref;
|
|
502
|
+
const minHeight = getNavItemHeight(theme);
|
|
503
|
+
const verticalPadding = polished.math(`(${minHeight} - ${theme.iconSizes.lg}) / 2`);
|
|
504
|
+
const horizontalPadding = polished.math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`);
|
|
505
|
+
return styled.css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, minHeight);
|
|
392
506
|
};
|
|
507
|
+
const StyledBaseNavItem = styled__default.default.div.attrs({
|
|
508
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
509
|
+
'data-garden-version': '9.0.0'
|
|
510
|
+
}).withConfig({
|
|
511
|
+
displayName: "StyledBaseNavItem",
|
|
512
|
+
componentId: "sc-zvo43f-0"
|
|
513
|
+
})(["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);
|
|
393
514
|
|
|
394
515
|
const COMPONENT_ID$d = 'chrome.logo_nav_list_item';
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
return reactTheming.PALETTE.product.message;
|
|
407
|
-
case 'support':
|
|
408
|
-
return reactTheming.PALETTE.product.support;
|
|
409
|
-
case 'talk':
|
|
410
|
-
return reactTheming.PALETTE.product.talk;
|
|
411
|
-
default:
|
|
412
|
-
return 'inherit';
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
const colorStyles$2 = props => {
|
|
416
|
-
const fillColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
|
|
417
|
-
const color = props.isLight || props.isDark ? fillColor : retrieveProductColor(props.product);
|
|
516
|
+
const colorStyles$4 = _ref => {
|
|
517
|
+
let {
|
|
518
|
+
theme,
|
|
519
|
+
hue,
|
|
520
|
+
product
|
|
521
|
+
} = _ref;
|
|
522
|
+
const fillColor = reactTheming.getColor({
|
|
523
|
+
theme,
|
|
524
|
+
variable: 'foreground.default'
|
|
525
|
+
});
|
|
526
|
+
const color = hue === 'chromeHue' ? getProductColor(product) : fillColor;
|
|
418
527
|
return styled.css(["color:", ";fill:", ";"], color, fillColor);
|
|
419
528
|
};
|
|
420
529
|
const StyledLogoNavItem = styled__default.default(StyledBaseNavItem).attrs({
|
|
421
530
|
'data-garden-id': COMPONENT_ID$d,
|
|
422
|
-
'data-garden-version': '9.0.0
|
|
531
|
+
'data-garden-version': '9.0.0'
|
|
423
532
|
}).withConfig({
|
|
424
533
|
displayName: "StyledLogoNavItem",
|
|
425
534
|
componentId: "sc-saaydx-0"
|
|
426
|
-
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"],
|
|
427
|
-
StyledLogoNavItem.defaultProps = {
|
|
428
|
-
theme: reactTheming.DEFAULT_THEME
|
|
429
|
-
};
|
|
535
|
+
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], colorStyles$4);
|
|
430
536
|
|
|
431
537
|
const COMPONENT_ID$c = 'chrome.brandmark_nav_list_item';
|
|
432
538
|
const StyledBrandmarkNavItem = styled__default.default(StyledBaseNavItem).attrs({
|
|
433
539
|
'data-garden-id': COMPONENT_ID$c,
|
|
434
|
-
'data-garden-version': '9.0.0
|
|
540
|
+
'data-garden-version': '9.0.0'
|
|
435
541
|
}).withConfig({
|
|
436
542
|
displayName: "StyledBrandmarkNavItem",
|
|
437
543
|
componentId: "sc-8kynd4-0"
|
|
438
|
-
})(["order:1;opacity:
|
|
439
|
-
StyledBrandmarkNavItem.defaultProps = {
|
|
440
|
-
theme: reactTheming.DEFAULT_THEME
|
|
441
|
-
};
|
|
544
|
+
})(["order:1;opacity:", ";margin-top:auto;min-height:0;"], props => props.theme.opacity[400]);
|
|
442
545
|
|
|
443
546
|
const COMPONENT_ID$b = 'chrome.nav_item_icon';
|
|
444
|
-
const
|
|
547
|
+
const sizeStyles$5 = _ref => {
|
|
548
|
+
let {
|
|
549
|
+
theme
|
|
550
|
+
} = _ref;
|
|
551
|
+
const size = theme.iconSizes.lg;
|
|
552
|
+
return styled.css(["width:", ";height:", ";"], size, size);
|
|
553
|
+
};
|
|
554
|
+
const StyledNavItemIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
445
555
|
'data-garden-id': COMPONENT_ID$b,
|
|
446
|
-
'data-garden-version': '9.0.0
|
|
556
|
+
'data-garden-version': '9.0.0'
|
|
447
557
|
}).withConfig({
|
|
448
558
|
displayName: "StyledNavItemIcon",
|
|
449
559
|
componentId: "sc-7w9rpt-0"
|
|
450
|
-
})(["align-self:flex-start;order:0;border-radius:", ";
|
|
451
|
-
StyledNavItemIcon.defaultProps = {
|
|
452
|
-
theme: reactTheming.DEFAULT_THEME
|
|
453
|
-
};
|
|
560
|
+
})(["align-self:flex-start;order:0;border-radius:", ";", ";", ";"], props => props.theme.borderRadii.md, sizeStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
454
561
|
|
|
455
562
|
const COMPONENT_ID$a = 'chrome.nav_button';
|
|
456
|
-
const colorStyles$
|
|
457
|
-
|
|
563
|
+
const colorStyles$3 = _ref => {
|
|
564
|
+
let {
|
|
565
|
+
theme,
|
|
566
|
+
hue
|
|
567
|
+
} = _ref;
|
|
568
|
+
const activeBackgroundColor = reactTheming.getColor({
|
|
569
|
+
theme,
|
|
570
|
+
dark: {
|
|
571
|
+
hue: 'white'
|
|
572
|
+
},
|
|
573
|
+
light: {
|
|
574
|
+
hue: 'black'
|
|
575
|
+
},
|
|
576
|
+
transparency: theme.opacity[100]
|
|
577
|
+
});
|
|
578
|
+
const currentBackgroundColor = hue === 'chromeHue' ? reactTheming.getColor({
|
|
458
579
|
theme,
|
|
459
580
|
hue,
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
581
|
+
shade: 700
|
|
582
|
+
}) : reactTheming.getColor({
|
|
583
|
+
theme,
|
|
584
|
+
dark: {
|
|
585
|
+
hue: 'white'
|
|
586
|
+
},
|
|
587
|
+
light: {
|
|
588
|
+
hue: 'black'
|
|
589
|
+
},
|
|
590
|
+
transparency: theme.opacity[500]
|
|
591
|
+
});
|
|
592
|
+
const focusOutlineColor = reactTheming.getColor({
|
|
593
|
+
theme,
|
|
594
|
+
dark: {
|
|
595
|
+
hue: 'white'
|
|
596
|
+
},
|
|
597
|
+
light: {
|
|
598
|
+
hue: 'black'
|
|
475
599
|
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
600
|
+
});
|
|
601
|
+
const focusOutlineOffset = `-${theme.borderWidths.md}`;
|
|
602
|
+
const hoverBackgroundColor = reactTheming.getColor({
|
|
603
|
+
theme,
|
|
604
|
+
dark: {
|
|
605
|
+
hue: 'black'
|
|
606
|
+
},
|
|
607
|
+
light: {
|
|
608
|
+
hue: 'white'
|
|
609
|
+
},
|
|
610
|
+
transparency: theme.opacity[100]
|
|
611
|
+
});
|
|
612
|
+
return styled.css(["opacity:", ";outline-color:transparent;background-color:transparent;color:inherit;&:hover{opacity:1;background-color:", ";}&:hover,&:focus{color:inherit;}", " &:active{background-color:", ";}&[aria-current='true']{opacity:1;background-color:", ";}"], theme.opacity[700], hoverBackgroundColor, reactTheming.focusStyles({
|
|
482
613
|
theme,
|
|
483
|
-
condition: false
|
|
614
|
+
condition: false,
|
|
484
615
|
styles: {
|
|
485
616
|
opacity: 1,
|
|
486
|
-
outlineColor:
|
|
617
|
+
outlineColor: focusOutlineColor,
|
|
618
|
+
outlineOffset: focusOutlineOffset
|
|
487
619
|
}
|
|
488
|
-
}),
|
|
620
|
+
}), activeBackgroundColor, currentBackgroundColor);
|
|
621
|
+
};
|
|
622
|
+
const sizeStyles$4 = _ref2 => {
|
|
623
|
+
let {
|
|
624
|
+
theme,
|
|
625
|
+
isExpanded
|
|
626
|
+
} = _ref2;
|
|
627
|
+
const iconMargin = isExpanded ? `0 ${polished.math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`)}` : undefined;
|
|
628
|
+
return styled.css(["margin:0;border:none;box-sizing:border-box;min-width:0;font-size:inherit;", "{margin:", ";}"], StyledNavItemIcon, iconMargin);
|
|
489
629
|
};
|
|
490
630
|
const StyledNavButton = styled__default.default(StyledBaseNavItem).attrs({
|
|
491
631
|
'data-garden-id': COMPONENT_ID$a,
|
|
492
|
-
'data-garden-version': '9.0.0
|
|
632
|
+
'data-garden-version': '9.0.0',
|
|
493
633
|
as: 'button'
|
|
494
634
|
}).withConfig({
|
|
495
635
|
displayName: "StyledNavButton",
|
|
496
636
|
componentId: "sc-f5ux3-0"
|
|
497
|
-
})(["flex:1;justify-content:", ";
|
|
498
|
-
${StyledNavItemIcon} {
|
|
499
|
-
margin: 0 ${polished.math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`)};
|
|
500
|
-
}
|
|
501
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
502
|
-
StyledNavButton.defaultProps = {
|
|
503
|
-
theme: reactTheming.DEFAULT_THEME
|
|
504
|
-
};
|
|
637
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
505
638
|
|
|
506
639
|
const COMPONENT_ID$9 = 'chrome.nav_item_text';
|
|
640
|
+
const sizeStyles$3 = _ref => {
|
|
641
|
+
let {
|
|
642
|
+
theme,
|
|
643
|
+
isExpanded,
|
|
644
|
+
isWrapped
|
|
645
|
+
} = _ref;
|
|
646
|
+
const clip = isExpanded ? 'auto' : undefined;
|
|
647
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, theme.fontSizes.md);
|
|
648
|
+
const margin = isExpanded ? `0 ${polished.math(`(${getNavWidth(theme)} - ${theme.iconSizes.lg}) / 4`)}` : undefined;
|
|
649
|
+
const width = isExpanded ? 'auto' : undefined;
|
|
650
|
+
const height = isExpanded ? 'auto' : undefined;
|
|
651
|
+
const whiteSpace = isWrapped ? undefined : 'nowrap';
|
|
652
|
+
return styled.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);
|
|
653
|
+
};
|
|
507
654
|
const StyledNavItemText = styled__default.default.span.attrs({
|
|
508
655
|
'data-garden-id': COMPONENT_ID$9,
|
|
509
|
-
'data-garden-version': '9.0.0
|
|
656
|
+
'data-garden-version': '9.0.0'
|
|
510
657
|
}).withConfig({
|
|
511
658
|
displayName: "StyledNavItemText",
|
|
512
659
|
componentId: "sc-13m84xl-0"
|
|
513
|
-
})(["position:absolute;order:1;
|
|
514
|
-
${StyledNavButton} > && {
|
|
515
|
-
position: static;
|
|
516
|
-
flex: 1;
|
|
517
|
-
clip: auto;
|
|
518
|
-
width: auto;
|
|
519
|
-
height: auto;
|
|
520
|
-
text-overflow: ellipsis;
|
|
521
|
-
}
|
|
522
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
523
|
-
StyledNavItemText.defaultProps = {
|
|
524
|
-
theme: reactTheming.DEFAULT_THEME
|
|
525
|
-
};
|
|
660
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
526
661
|
|
|
527
662
|
const COMPONENT_ID$8 = 'chrome.sheet';
|
|
528
|
-
const
|
|
663
|
+
const colorStyles$2 = _ref => {
|
|
529
664
|
let {
|
|
530
665
|
theme,
|
|
531
|
-
placement,
|
|
532
666
|
isOpen
|
|
533
667
|
} = _ref;
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
668
|
+
const backgroundColor = reactTheming.getColor({
|
|
669
|
+
theme,
|
|
670
|
+
variable: 'background.default'
|
|
671
|
+
});
|
|
672
|
+
const borderColor = isOpen ? reactTheming.getColor({
|
|
673
|
+
theme,
|
|
674
|
+
variable: 'border.default'
|
|
675
|
+
}) : 'transparent';
|
|
676
|
+
return styled.css(["border-color:", ";background-color:", ";"], borderColor, backgroundColor);
|
|
677
|
+
};
|
|
678
|
+
const sizeStyles$2 = _ref2 => {
|
|
679
|
+
let {
|
|
680
|
+
theme,
|
|
681
|
+
isOpen,
|
|
682
|
+
placement,
|
|
683
|
+
size
|
|
684
|
+
} = _ref2;
|
|
685
|
+
const width = isOpen ? size : 0;
|
|
686
|
+
const fontSize = theme.fontSizes.md;
|
|
687
|
+
const lineHeight = reactTheming.getLineHeight(theme.space.base * 5, fontSize);
|
|
688
|
+
const border = isOpen ? theme.borders.sm : 'none';
|
|
689
|
+
let borderProperty;
|
|
690
|
+
if (placement === 'start') {
|
|
691
|
+
borderProperty = `border-${theme.rtl ? 'left' : 'right'}`;
|
|
692
|
+
} else {
|
|
693
|
+
borderProperty = `border-${theme.rtl ? 'right' : 'left'}`;
|
|
544
694
|
}
|
|
545
|
-
return
|
|
695
|
+
return styled.css(["box-sizing:border-box;width:", ";height:100%;", ":", ";line-height:", ";font-size:", ";"], width, borderProperty, border, lineHeight, fontSize);
|
|
546
696
|
};
|
|
547
697
|
const StyledSheet = styled__default.default.aside.attrs({
|
|
548
698
|
'data-garden-id': COMPONENT_ID$8,
|
|
549
|
-
'data-garden-version': '9.0.0
|
|
699
|
+
'data-garden-version': '9.0.0'
|
|
550
700
|
}).withConfig({
|
|
551
701
|
displayName: "StyledSheet",
|
|
552
702
|
componentId: "sc-dx8ijk-0"
|
|
553
|
-
})(["display:flex;order:1;transition:", ";
|
|
554
|
-
StyledSheet.defaultProps = {
|
|
555
|
-
theme: reactTheming.DEFAULT_THEME
|
|
556
|
-
};
|
|
703
|
+
})(["display:flex;order:1;transition:", ";overflow:hidden;", ";&:focus{outline:none;}", ";", ";"], props => props.isAnimated && 'width 250ms ease-in-out', sizeStyles$2, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
557
704
|
|
|
558
705
|
const COMPONENT_ID$7 = 'chrome.sheet_wrapper';
|
|
706
|
+
const transformStyles = _ref => {
|
|
707
|
+
let {
|
|
708
|
+
theme,
|
|
709
|
+
isAnimated,
|
|
710
|
+
isOpen,
|
|
711
|
+
placement
|
|
712
|
+
} = _ref;
|
|
713
|
+
const transition = isAnimated ? 'transform 250ms ease-in-out' : undefined;
|
|
714
|
+
let transform;
|
|
715
|
+
if (isOpen) {
|
|
716
|
+
transform = 'translateX(0)';
|
|
717
|
+
} else if (placement === 'start') {
|
|
718
|
+
transform = `translateX(${theme.rtl ? 100 : -100}%)`;
|
|
719
|
+
} else {
|
|
720
|
+
transform = `translateX(${theme.rtl ? -100 : 100}%)`;
|
|
721
|
+
}
|
|
722
|
+
return styled.css(["transform:", ";transition:", ";"], transform, transition);
|
|
723
|
+
};
|
|
559
724
|
const StyledSheetWrapper = styled__default.default.div.attrs({
|
|
560
725
|
'data-garden-id': COMPONENT_ID$7,
|
|
561
|
-
'data-garden-version': '9.0.0
|
|
726
|
+
'data-garden-version': '9.0.0'
|
|
562
727
|
}).withConfig({
|
|
563
728
|
displayName: "StyledSheetWrapper",
|
|
564
729
|
componentId: "sc-f6x9zb-0"
|
|
565
|
-
})(["display:flex;position:relative;flex-direction:column;
|
|
566
|
-
const translateValues = [-100, 100];
|
|
567
|
-
let translation = 'translateX(0%)';
|
|
568
|
-
if (props.isOpen) {
|
|
569
|
-
return translation;
|
|
570
|
-
}
|
|
571
|
-
if (props.theme.rtl) {
|
|
572
|
-
translateValues.reverse();
|
|
573
|
-
}
|
|
574
|
-
if (props.placement === 'end') {
|
|
575
|
-
translation = `translateX(${translateValues[1]}%)`;
|
|
576
|
-
} else if (props.placement === 'start') {
|
|
577
|
-
translation = `translateX(${translateValues[0]}%)`;
|
|
578
|
-
}
|
|
579
|
-
return translation;
|
|
580
|
-
}, props => props.isAnimated && 'transform 250ms ease-in-out', props => props.size, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
581
|
-
StyledSheetWrapper.defaultProps = {
|
|
582
|
-
theme: reactTheming.DEFAULT_THEME
|
|
583
|
-
};
|
|
730
|
+
})(["display:flex;position:relative;flex-direction:column;min-width:", ";", ";", ";"], props => props.size, transformStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
584
731
|
|
|
585
732
|
const COMPONENT_ID$6 = 'chrome.sheet_title';
|
|
586
733
|
const StyledSheetTitle = styled__default.default.div.attrs({
|
|
587
734
|
'data-garden-id': COMPONENT_ID$6,
|
|
588
|
-
'data-garden-version': '9.0.0
|
|
735
|
+
'data-garden-version': '9.0.0'
|
|
589
736
|
}).withConfig({
|
|
590
737
|
displayName: "StyledSheetTitle",
|
|
591
738
|
componentId: "sc-1gogk75-0"
|
|
592
|
-
})(["
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
};
|
|
739
|
+
})(["color:", ";font-weight:", ";", ";"], p => reactTheming.getColor({
|
|
740
|
+
theme: p.theme,
|
|
741
|
+
variable: 'foreground.default'
|
|
742
|
+
}), props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
596
743
|
|
|
597
744
|
const COMPONENT_ID$5 = 'chrome.sheet_description';
|
|
598
745
|
const StyledSheetDescription = styled__default.default.div.attrs({
|
|
599
746
|
'data-garden-id': COMPONENT_ID$5,
|
|
600
|
-
'data-garden-version': '9.0.0
|
|
747
|
+
'data-garden-version': '9.0.0'
|
|
601
748
|
}).withConfig({
|
|
602
749
|
displayName: "StyledSheetDescription",
|
|
603
750
|
componentId: "sc-1puglb6-0"
|
|
604
|
-
})(["line-height:", ";color:", ";", ";"],
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
};
|
|
751
|
+
})(["line-height:", ";color:", ";", ";"], p => reactTheming.getLineHeight(p.theme.space.base * 4, p.theme.fontSizes.md), p => reactTheming.getColor({
|
|
752
|
+
theme: p.theme,
|
|
753
|
+
variable: 'foreground.subtle'
|
|
754
|
+
}), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
608
755
|
|
|
609
756
|
const COMPONENT_ID$4 = 'chrome.sheet_body';
|
|
610
757
|
const StyledSheetBody = styled__default.default.div.attrs({
|
|
611
758
|
'data-garden-id': COMPONENT_ID$4,
|
|
612
|
-
'data-garden-version': '9.0.0
|
|
759
|
+
'data-garden-version': '9.0.0'
|
|
613
760
|
}).withConfig({
|
|
614
761
|
displayName: "StyledSheetBody",
|
|
615
762
|
componentId: "sc-bt4eoj-0"
|
|
616
|
-
})(["flex:1;overflow-y:auto;padding:", "px;", ";"], props => props.theme.space.base * 5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
617
|
-
StyledSheetBody.defaultProps = {
|
|
618
|
-
theme: reactTheming.DEFAULT_THEME
|
|
619
|
-
};
|
|
763
|
+
})(["flex:1;overflow-y:auto;padding:", "px;color-scheme:only ", ";", ";"], props => props.theme.space.base * 5, p => p.theme.colors.base, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
620
764
|
|
|
621
765
|
const COMPONENT_ID$3 = 'chrome.sheet_close';
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
627
|
-
const
|
|
628
|
-
|
|
629
|
-
const foregroundColor = 'neutralHue';
|
|
630
|
-
return styled.css(["background-color:transparent;color:", ";&:hover{background-color:", ";color:", ";}", " &:active{transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;background-color:", ";color:", ";}"], reactTheming.getColorV8(foregroundColor, 600, props.theme), reactTheming.getColorV8(backgroundColor, 600, props.theme, 0.08), reactTheming.getColorV8(foregroundColor, 700, props.theme), reactTheming.focusStyles({
|
|
631
|
-
theme: props.theme
|
|
632
|
-
}), reactTheming.getColorV8(backgroundColor, 600, props.theme, 0.2), reactTheming.getColorV8(foregroundColor, 800, props.theme));
|
|
766
|
+
const positionStyles = _ref => {
|
|
767
|
+
let {
|
|
768
|
+
theme
|
|
769
|
+
} = _ref;
|
|
770
|
+
const top = `${theme.space.base * 2.5}px`;
|
|
771
|
+
const position = `${theme.space.base * 2}px`;
|
|
772
|
+
return styled.css(["top:", ";", ":", ";"], top, theme.rtl ? 'left' : 'right', position);
|
|
633
773
|
};
|
|
634
|
-
const StyledSheetClose = styled__default.default.
|
|
774
|
+
const StyledSheetClose = styled__default.default(reactButtons.IconButton).attrs({
|
|
635
775
|
'data-garden-id': COMPONENT_ID$3,
|
|
636
|
-
'data-garden-version': '9.0.0
|
|
776
|
+
'data-garden-version': '9.0.0'
|
|
637
777
|
}).withConfig({
|
|
638
778
|
displayName: "StyledSheetClose",
|
|
639
779
|
componentId: "sc-1ab02oq-0"
|
|
640
|
-
})(["
|
|
641
|
-
StyledSheetClose.defaultProps = {
|
|
642
|
-
theme: reactTheming.DEFAULT_THEME
|
|
643
|
-
};
|
|
780
|
+
})(["position:absolute;", ";", ";"], positionStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
644
781
|
|
|
645
782
|
const COMPONENT_ID$2 = 'chrome.sheet_footer';
|
|
783
|
+
const colorStyles$1 = _ref => {
|
|
784
|
+
let {
|
|
785
|
+
theme
|
|
786
|
+
} = _ref;
|
|
787
|
+
const borderColor = reactTheming.getColor({
|
|
788
|
+
theme,
|
|
789
|
+
variable: 'border.subtle'
|
|
790
|
+
});
|
|
791
|
+
return styled.css(["border-top-color:", ";"], borderColor);
|
|
792
|
+
};
|
|
793
|
+
const sizeStyles$1 = _ref2 => {
|
|
794
|
+
let {
|
|
795
|
+
theme,
|
|
796
|
+
isCompact
|
|
797
|
+
} = _ref2;
|
|
798
|
+
const border = theme.borders.sm;
|
|
799
|
+
const padding = `${theme.space.base * (isCompact ? 2.5 : 5)}px`;
|
|
800
|
+
return styled.css(["border-top:", ";padding:", ";"], border, padding);
|
|
801
|
+
};
|
|
646
802
|
const StyledSheetFooter = styled__default.default.footer.attrs({
|
|
647
803
|
'data-garden-id': COMPONENT_ID$2,
|
|
648
|
-
'data-garden-version': '9.0.0
|
|
804
|
+
'data-garden-version': '9.0.0'
|
|
649
805
|
}).withConfig({
|
|
650
806
|
displayName: "StyledSheetFooter",
|
|
651
807
|
componentId: "sc-2cktos-0"
|
|
652
|
-
})(["display:flex;flex-flow:row wrap;align-items:center;justify-content:", ";
|
|
653
|
-
StyledSheetFooter.defaultProps = {
|
|
654
|
-
theme: reactTheming.DEFAULT_THEME
|
|
655
|
-
};
|
|
808
|
+
})(["display:flex;flex-flow:row wrap;align-items:center;justify-content:", ";", ";", ";", ";"], props => props.isCompact ? 'center' : 'flex-end', sizeStyles$1, colorStyles$1, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
656
809
|
|
|
657
810
|
const COMPONENT_ID$1 = 'chrome.sheet_footer_item';
|
|
658
811
|
const StyledSheetFooterItem = styled__default.default.div.attrs({
|
|
659
812
|
'data-garden-id': COMPONENT_ID$1,
|
|
660
|
-
'data-garden-version': '9.0.0
|
|
813
|
+
'data-garden-version': '9.0.0'
|
|
661
814
|
}).withConfig({
|
|
662
815
|
displayName: "StyledSheetFooterItem",
|
|
663
816
|
componentId: "sc-r9ixh-0"
|
|
664
817
|
})(["", " ", ";"], props => `margin-${props.theme.rtl ? 'right' : 'left'}: ${props.theme.space.base * 5}px;`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
665
|
-
StyledSheetFooterItem.defaultProps = {
|
|
666
|
-
theme: reactTheming.DEFAULT_THEME
|
|
667
|
-
};
|
|
668
818
|
|
|
669
819
|
const COMPONENT_ID = 'chrome.sheet_header';
|
|
820
|
+
const colorStyles = _ref => {
|
|
821
|
+
let {
|
|
822
|
+
theme
|
|
823
|
+
} = _ref;
|
|
824
|
+
const borderColor = reactTheming.getColor({
|
|
825
|
+
theme,
|
|
826
|
+
variable: 'border.subtle'
|
|
827
|
+
});
|
|
828
|
+
return styled.css(["border-bottom-color:", ";"], borderColor);
|
|
829
|
+
};
|
|
830
|
+
const sizeStyles = _ref2 => {
|
|
831
|
+
let {
|
|
832
|
+
theme,
|
|
833
|
+
isCloseButtonPresent
|
|
834
|
+
} = _ref2;
|
|
835
|
+
const border = theme.borders.sm;
|
|
836
|
+
let padding = `${theme.space.base * 5}px`;
|
|
837
|
+
if (isCloseButtonPresent) {
|
|
838
|
+
const paddingSide = `${theme.space.base * 14}px`;
|
|
839
|
+
padding = theme.rtl ? `${padding} ${padding} ${padding} ${paddingSide}` : `${padding} ${paddingSide} ${padding} ${padding}`;
|
|
840
|
+
}
|
|
841
|
+
return styled.css(["border-bottom:", ";padding:", ";"], border, padding);
|
|
842
|
+
};
|
|
670
843
|
const StyledSheetHeader = styled__default.default.header.attrs({
|
|
671
844
|
'data-garden-id': COMPONENT_ID,
|
|
672
|
-
'data-garden-version': '9.0.0
|
|
845
|
+
'data-garden-version': '9.0.0'
|
|
673
846
|
}).withConfig({
|
|
674
847
|
displayName: "StyledSheetHeader",
|
|
675
848
|
componentId: "sc-o2ry8i-0"
|
|
676
|
-
})(["
|
|
677
|
-
StyledSheetHeader.defaultProps = {
|
|
678
|
-
theme: reactTheming.DEFAULT_THEME
|
|
679
|
-
};
|
|
849
|
+
})(["", ";", ";", ";"], sizeStyles, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
680
850
|
|
|
681
851
|
const HeaderItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
682
852
|
let {
|
|
@@ -694,7 +864,7 @@ const HeaderItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
694
864
|
ref: ref
|
|
695
865
|
}, other));
|
|
696
866
|
});
|
|
697
|
-
HeaderItem.displayName = '
|
|
867
|
+
HeaderItem.displayName = 'Header.Item';
|
|
698
868
|
HeaderItem.propTypes = {
|
|
699
869
|
maxX: PropTypes__default.default.bool,
|
|
700
870
|
maxY: PropTypes__default.default.bool,
|
|
@@ -708,29 +878,14 @@ const HeaderItemIcon = _ref => {
|
|
|
708
878
|
children,
|
|
709
879
|
...props
|
|
710
880
|
} = _ref;
|
|
711
|
-
|
|
712
|
-
if ( React.isValidElement(element)) {
|
|
713
|
-
const Icon = _ref2 => {
|
|
714
|
-
let {
|
|
715
|
-
theme,
|
|
716
|
-
...iconProps
|
|
717
|
-
} = _ref2;
|
|
718
|
-
return React.cloneElement(element, {
|
|
719
|
-
...props,
|
|
720
|
-
...iconProps
|
|
721
|
-
});
|
|
722
|
-
};
|
|
723
|
-
return React__namespace.default.createElement(StyledHeaderItemIcon, Object.assign({
|
|
724
|
-
as: Icon
|
|
725
|
-
}, props));
|
|
726
|
-
}
|
|
727
|
-
return null;
|
|
881
|
+
return React__namespace.default.createElement(StyledHeaderItemIcon, props, children);
|
|
728
882
|
};
|
|
883
|
+
HeaderItemIcon.displayName = 'Header.ItemIcon';
|
|
729
884
|
|
|
730
885
|
const HeaderItemText = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledHeaderItemText, Object.assign({
|
|
731
886
|
ref: ref
|
|
732
887
|
}, props)));
|
|
733
|
-
HeaderItemText.displayName = '
|
|
888
|
+
HeaderItemText.displayName = 'Header.ItemText';
|
|
734
889
|
HeaderItemText.propTypes = {
|
|
735
890
|
isClipped: PropTypes__default.default.bool
|
|
736
891
|
};
|
|
@@ -738,12 +893,12 @@ HeaderItemText.propTypes = {
|
|
|
738
893
|
const HeaderItemWrapper = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledHeaderItemWrapper, Object.assign({
|
|
739
894
|
ref: ref
|
|
740
895
|
}, props)));
|
|
741
|
-
HeaderItemWrapper.displayName = '
|
|
896
|
+
HeaderItemWrapper.displayName = 'Header.ItemWrapper';
|
|
742
897
|
|
|
743
898
|
const FooterItem$1 = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledFooterItem, Object.assign({
|
|
744
899
|
ref: ref
|
|
745
900
|
}, props)));
|
|
746
|
-
FooterItem$1.displayName = '
|
|
901
|
+
FooterItem$1.displayName = 'Footer.Item';
|
|
747
902
|
|
|
748
903
|
const NavContext = React__namespace.default.createContext({
|
|
749
904
|
isExpanded: false
|
|
@@ -769,27 +924,23 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
769
924
|
hasLogo,
|
|
770
925
|
hasBrandmark,
|
|
771
926
|
product,
|
|
927
|
+
isCurrent,
|
|
772
928
|
...other
|
|
773
929
|
} = _ref;
|
|
774
930
|
const {
|
|
775
|
-
hue
|
|
776
|
-
isLight,
|
|
777
|
-
isDark
|
|
931
|
+
hue
|
|
778
932
|
} = useChromeContext();
|
|
779
933
|
const {
|
|
780
934
|
isExpanded
|
|
781
935
|
} = useNavContext();
|
|
782
936
|
const navListContext = useNavListContext();
|
|
783
|
-
const ariaCurrent = other.isCurrent || undefined;
|
|
784
937
|
const hasList = navListContext?.hasList;
|
|
785
938
|
let retVal;
|
|
786
939
|
if (hasLogo) {
|
|
787
940
|
retVal = React__namespace.default.createElement(StyledLogoNavItem, Object.assign({
|
|
788
941
|
ref: ref,
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
product: product,
|
|
792
|
-
"aria-current": ariaCurrent
|
|
942
|
+
hue: hue,
|
|
943
|
+
product: product
|
|
793
944
|
}, other));
|
|
794
945
|
} else if (hasBrandmark) {
|
|
795
946
|
retVal = React__namespace.default.createElement(StyledBrandmarkNavItem, Object.assign({
|
|
@@ -801,9 +952,7 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
801
952
|
ref: ref,
|
|
802
953
|
isExpanded: isExpanded,
|
|
803
954
|
hue: hue,
|
|
804
|
-
|
|
805
|
-
isLight: isLight,
|
|
806
|
-
"aria-current": ariaCurrent
|
|
955
|
+
"aria-current": isCurrent || undefined
|
|
807
956
|
}, other));
|
|
808
957
|
}
|
|
809
958
|
if (hasList) {
|
|
@@ -811,7 +960,7 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
811
960
|
}
|
|
812
961
|
return retVal;
|
|
813
962
|
});
|
|
814
|
-
NavItem.displayName = '
|
|
963
|
+
NavItem.displayName = 'Nav.Item';
|
|
815
964
|
NavItem.propTypes = {
|
|
816
965
|
product: PropTypes__default.default.oneOf(PRODUCTS),
|
|
817
966
|
hasLogo: PropTypes__default.default.bool,
|
|
@@ -823,24 +972,9 @@ const NavItemIcon = _ref => {
|
|
|
823
972
|
children,
|
|
824
973
|
...props
|
|
825
974
|
} = _ref;
|
|
826
|
-
|
|
827
|
-
if ( React.isValidElement(element)) {
|
|
828
|
-
const Icon = _ref2 => {
|
|
829
|
-
let {
|
|
830
|
-
theme,
|
|
831
|
-
...iconProps
|
|
832
|
-
} = _ref2;
|
|
833
|
-
return React.cloneElement(element, {
|
|
834
|
-
...props,
|
|
835
|
-
...iconProps
|
|
836
|
-
});
|
|
837
|
-
};
|
|
838
|
-
return React__namespace.default.createElement(StyledNavItemIcon, Object.assign({
|
|
839
|
-
as: Icon
|
|
840
|
-
}, props));
|
|
841
|
-
}
|
|
842
|
-
return null;
|
|
975
|
+
return React__namespace.default.createElement(StyledNavItemIcon, props, children);
|
|
843
976
|
};
|
|
977
|
+
NavItemIcon.displayName = 'Nav.ItemIcon';
|
|
844
978
|
|
|
845
979
|
const NavItemText = React__namespace.default.forwardRef((props, ref) => {
|
|
846
980
|
const {
|
|
@@ -851,7 +985,7 @@ const NavItemText = React__namespace.default.forwardRef((props, ref) => {
|
|
|
851
985
|
isExpanded: isExpanded
|
|
852
986
|
}, props));
|
|
853
987
|
});
|
|
854
|
-
NavItemText.displayName = '
|
|
988
|
+
NavItemText.displayName = 'Nav.ItemText';
|
|
855
989
|
NavItemText.propTypes = {
|
|
856
990
|
isWrapped: PropTypes__default.default.bool
|
|
857
991
|
};
|
|
@@ -862,22 +996,23 @@ const Chrome = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
862
996
|
isFluid,
|
|
863
997
|
...props
|
|
864
998
|
} = _ref;
|
|
865
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
999
|
+
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
866
1000
|
const isLightMemoized = React.useMemo(() => {
|
|
867
1001
|
if (hue) {
|
|
868
|
-
const backgroundColor = reactTheming.
|
|
1002
|
+
const backgroundColor = reactTheming.getColor({
|
|
1003
|
+
theme,
|
|
1004
|
+
hue
|
|
1005
|
+
});
|
|
869
1006
|
const LIGHT_COLOR = 'white';
|
|
870
1007
|
return polished.readableColor(backgroundColor, LIGHT_COLOR, undefined, false ) === LIGHT_COLOR;
|
|
871
1008
|
}
|
|
872
1009
|
return false;
|
|
873
1010
|
}, [hue, theme]);
|
|
874
|
-
const isLight = hue ? isLightMemoized :
|
|
875
|
-
const isDark = hue ? !isLightMemoized : false;
|
|
1011
|
+
const isLight = hue ? isLightMemoized : undefined;
|
|
876
1012
|
const chromeContextValue = React.useMemo(() => ({
|
|
877
1013
|
hue: hue || 'chromeHue',
|
|
878
|
-
isLight
|
|
879
|
-
|
|
880
|
-
}), [hue, isLight, isDark]);
|
|
1014
|
+
isLight
|
|
1015
|
+
}), [hue, isLight]);
|
|
881
1016
|
const environment = reactTheming.useDocument(theme);
|
|
882
1017
|
React.useEffect(() => {
|
|
883
1018
|
if (environment && !isFluid) {
|
|
@@ -1006,26 +1141,31 @@ const NavList = React__namespace.default.forwardRef((props, ref) => {
|
|
|
1006
1141
|
ref: ref
|
|
1007
1142
|
}, props)));
|
|
1008
1143
|
});
|
|
1009
|
-
NavList.displayName = 'Nav';
|
|
1144
|
+
NavList.displayName = 'Nav.List';
|
|
1010
1145
|
|
|
1011
1146
|
const NavComponent = React__namespace.default.forwardRef((props, ref) => {
|
|
1012
1147
|
const {
|
|
1013
1148
|
hue,
|
|
1014
|
-
isLight
|
|
1015
|
-
isDark
|
|
1149
|
+
isLight
|
|
1016
1150
|
} = useChromeContext();
|
|
1017
1151
|
const navContextValue = React.useMemo(() => ({
|
|
1018
1152
|
isExpanded: !!props.isExpanded
|
|
1019
1153
|
}), [props.isExpanded]);
|
|
1020
|
-
return React__namespace.default.createElement(
|
|
1154
|
+
return React__namespace.default.createElement(styled.ThemeProvider, {
|
|
1155
|
+
theme: parentTheme => ({
|
|
1156
|
+
...parentTheme,
|
|
1157
|
+
colors: {
|
|
1158
|
+
...parentTheme.colors,
|
|
1159
|
+
base: isLight ? 'light' : 'dark'
|
|
1160
|
+
}
|
|
1161
|
+
})
|
|
1162
|
+
}, React__namespace.default.createElement(NavContext.Provider, {
|
|
1021
1163
|
value: navContextValue
|
|
1022
1164
|
}, React__namespace.default.createElement(StyledNav, Object.assign({
|
|
1023
1165
|
ref: ref
|
|
1024
1166
|
}, props, {
|
|
1025
|
-
hue: hue
|
|
1026
|
-
|
|
1027
|
-
isDark: isDark
|
|
1028
|
-
})));
|
|
1167
|
+
hue: hue
|
|
1168
|
+
}))));
|
|
1029
1169
|
});
|
|
1030
1170
|
NavComponent.displayName = 'Nav';
|
|
1031
1171
|
NavComponent.propTypes = {
|
|
@@ -1134,7 +1274,7 @@ SheetFooterItem.displayName = 'Sheet.FooterItem';
|
|
|
1134
1274
|
const FooterItem = SheetFooterItem;
|
|
1135
1275
|
|
|
1136
1276
|
var _path;
|
|
1137
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1277
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
1138
1278
|
var SvgXStroke = function SvgXStroke(props) {
|
|
1139
1279
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1140
1280
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1181,7 +1321,7 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1181
1321
|
const sheetRef = React.useRef(null);
|
|
1182
1322
|
const seed = reactUid.useUIDSeed();
|
|
1183
1323
|
const [isCloseButtonPresent, setIsCloseButtonPresent] = React.useState(false);
|
|
1184
|
-
const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.0.0
|
|
1324
|
+
const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.0.0'}`), [id, seed]);
|
|
1185
1325
|
const titleId = `${idPrefix}--title`;
|
|
1186
1326
|
const descriptionId = `${idPrefix}--description`;
|
|
1187
1327
|
const sheetContext = React.useMemo(() => ({
|
|
@@ -1199,6 +1339,7 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1199
1339
|
return React__namespace.default.createElement(SheetContext.Provider, {
|
|
1200
1340
|
value: sheetContext
|
|
1201
1341
|
}, React__namespace.default.createElement(StyledSheet, Object.assign({
|
|
1342
|
+
inert: isOpen ? undefined : '',
|
|
1202
1343
|
isOpen: isOpen,
|
|
1203
1344
|
isAnimated: isAnimated,
|
|
1204
1345
|
placement: placement,
|