@zendeskgarden/react-chrome 9.0.0-next.9 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/elements/Chrome.js +9 -8
- package/dist/esm/elements/SkipNav.js +1 -1
- package/dist/esm/elements/body/Content.js +1 -1
- package/dist/esm/elements/footer/FooterItem.js +1 -1
- package/dist/esm/elements/header/Header.js +10 -3
- package/dist/esm/elements/header/HeaderItem.js +12 -3
- package/dist/esm/elements/header/HeaderItemIcon.js +3 -18
- package/dist/esm/elements/header/HeaderItemText.js +11 -4
- package/dist/esm/elements/header/HeaderItemWrapper.js +1 -1
- package/dist/esm/elements/nav/Nav.js +22 -12
- package/dist/esm/elements/nav/NavItem.js +8 -14
- package/dist/esm/elements/nav/NavItemIcon.js +3 -18
- package/dist/esm/elements/nav/NavItemText.js +9 -4
- package/dist/esm/elements/nav/NavList.js +1 -1
- package/dist/esm/elements/sheet/Sheet.js +10 -9
- package/dist/esm/elements/sheet/components/Footer.js +8 -3
- package/dist/esm/elements/sheet/components/Header.js +1 -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 -24
- 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 -25
- package/dist/esm/styled/nav/StyledNav.js +33 -16
- package/dist/esm/styled/nav/StyledNavButton.js +65 -39
- 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 +33 -21
- 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/index.cjs.js +703 -517
- 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 +1 -4
- package/dist/typings/styled/StyledSkipNavIcon.d.ts +2 -2
- package/dist/typings/styled/body/StyledContent.d.ts +3 -2
- package/dist/typings/styled/footer/StyledFooter.d.ts +1 -2
- package/dist/typings/styled/header/StyledBaseHeaderItem.d.ts +4 -9
- package/dist/typings/styled/header/StyledHeader.d.ts +2 -3
- 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 +1 -2
- package/dist/typings/styled/header/StyledLogoHeaderItem.d.ts +3 -5
- 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 +4 -8
- package/dist/typings/styled/nav/StyledNav.d.ts +4 -8
- package/dist/typings/styled/nav/StyledNavButton.d.ts +4 -15
- package/dist/typings/styled/nav/StyledNavItemIcon.d.ts +2 -4
- package/dist/typings/styled/nav/StyledNavItemText.d.ts +4 -3
- package/dist/typings/styled/sheet/StyledSheet.d.ts +5 -4
- 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 +3 -3
- package/dist/typings/styled/sheet/StyledSheetFooterItem.d.ts +2 -3
- package/dist/typings/styled/sheet/StyledSheetHeader.d.ts +3 -7
- package/dist/typings/styled/sheet/StyledSheetTitle.d.ts +2 -3
- package/dist/typings/styled/sheet/StyledSheetWrapper.d.ts +6 -6
- package/dist/typings/styled/utils.d.ts +15 -0
- package/dist/typings/utils/useChromeContext.d.ts +0 -1
- package/dist/typings/utils/useSheetContext.d.ts +0 -1
- package/package.json +8 -7
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');
|
|
@@ -46,193 +47,77 @@ const PRODUCTS = ['chat', 'explore', 'guide', 'support', 'talk'];
|
|
|
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.
|
|
50
|
+
'data-garden-version': '9.1.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.9'
|
|
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.9'
|
|
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
|
-
|
|
95
|
-
const COMPONENT_ID$t = 'chrome.header_item_text';
|
|
96
|
-
const clippedStyling = styled.css(["position:absolute;margin:0;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden;white-space:nowrap;"]);
|
|
97
|
-
const StyledHeaderItemText = styled__default.default.span.attrs({
|
|
98
|
-
'data-garden-id': COMPONENT_ID$t,
|
|
99
|
-
'data-garden-version': '9.0.0-next.9'
|
|
100
|
-
}).withConfig({
|
|
101
|
-
displayName: "StyledHeaderItemText",
|
|
102
|
-
componentId: "sc-goz7la-0"
|
|
103
|
-
})(["margin:0 3px;", " ", ";"], props => props.isClipped && clippedStyling, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$t, props));
|
|
104
|
-
StyledHeaderItemText.defaultProps = {
|
|
105
|
-
theme: reactTheming.DEFAULT_THEME
|
|
106
|
-
};
|
|
107
55
|
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return
|
|
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.9'
|
|
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
|
|
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;
|
|
130
65
|
};
|
|
131
66
|
|
|
132
|
-
const COMPONENT_ID$
|
|
133
|
-
const retrieveProductColor$1 = props => {
|
|
134
|
-
switch (props.product) {
|
|
135
|
-
case 'chat':
|
|
136
|
-
return reactTheming.PALETTE.product.chat;
|
|
137
|
-
case 'explore':
|
|
138
|
-
return reactTheming.PALETTE.product.explore;
|
|
139
|
-
case 'guide':
|
|
140
|
-
return reactTheming.PALETTE.product.guide;
|
|
141
|
-
case 'support':
|
|
142
|
-
return reactTheming.PALETTE.product.support;
|
|
143
|
-
case 'talk':
|
|
144
|
-
return reactTheming.PALETTE.product.talk;
|
|
145
|
-
default:
|
|
146
|
-
return 'inherit';
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const StyledLogoHeaderItem = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
150
|
-
'data-garden-id': COMPONENT_ID$r,
|
|
151
|
-
'data-garden-version': '9.0.0-next.9',
|
|
152
|
-
as: 'div'
|
|
153
|
-
}).withConfig({
|
|
154
|
-
displayName: "StyledLogoHeaderItem",
|
|
155
|
-
componentId: "sc-1n1d1yv-0"
|
|
156
|
-
})(["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));
|
|
157
|
-
StyledLogoHeaderItem.defaultProps = {
|
|
158
|
-
theme: reactTheming.DEFAULT_THEME
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
const COMPONENT_ID$q = 'chrome.base_nav_item';
|
|
162
|
-
const getNavItemHeight = props => {
|
|
163
|
-
return `${props.theme.space.base * 13}px`;
|
|
164
|
-
};
|
|
165
|
-
const sizeStyles$2 = props => {
|
|
166
|
-
const verticalPadding = polished.math(`(${getNavItemHeight(props)} - ${props.theme.iconSizes.lg}) / 2`);
|
|
167
|
-
const horizontalPadding = polished.math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`);
|
|
168
|
-
return styled.css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, getNavItemHeight);
|
|
169
|
-
};
|
|
170
|
-
const StyledBaseNavItem = styled__default.default.div.attrs({
|
|
171
|
-
'data-garden-id': COMPONENT_ID$q,
|
|
172
|
-
'data-garden-version': '9.0.0-next.9'
|
|
173
|
-
}).withConfig({
|
|
174
|
-
displayName: "StyledBaseNavItem",
|
|
175
|
-
componentId: "sc-zvo43f-0"
|
|
176
|
-
})(["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));
|
|
177
|
-
StyledBaseNavItem.defaultProps = {
|
|
178
|
-
theme: reactTheming.DEFAULT_THEME
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
const COMPONENT_ID$p = 'chrome.header';
|
|
182
|
-
const getHeaderHeight = props => {
|
|
183
|
-
return getNavItemHeight(props);
|
|
184
|
-
};
|
|
185
|
-
const StyledHeader = styled__default.default.header.attrs({
|
|
186
|
-
'data-garden-id': COMPONENT_ID$p,
|
|
187
|
-
'data-garden-version': '9.0.0-next.9'
|
|
188
|
-
}).withConfig({
|
|
189
|
-
displayName: "StyledHeader",
|
|
190
|
-
componentId: "sc-1cexpz-0"
|
|
191
|
-
})(["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 && `
|
|
192
|
-
${StyledLogoHeaderItem} {
|
|
193
|
-
display: inline-flex;
|
|
194
|
-
}
|
|
195
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$p, props));
|
|
196
|
-
StyledHeader.defaultProps = {
|
|
197
|
-
theme: reactTheming.DEFAULT_THEME
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
const COMPONENT_ID$o = 'chrome.skipnav';
|
|
67
|
+
const COMPONENT_ID$v = 'chrome.skipnav';
|
|
201
68
|
const animationStyles = () => {
|
|
202
69
|
const animationName = styled.keyframes(["0%{transform:translate(-50%,-50%);}"]);
|
|
203
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);
|
|
204
71
|
};
|
|
205
|
-
const colorStyles$
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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({
|
|
210
94
|
theme,
|
|
211
95
|
inset: true,
|
|
212
96
|
boxShadow
|
|
213
97
|
}));
|
|
214
98
|
};
|
|
215
|
-
const sizeStyles$
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
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;
|
|
220
108
|
const lineHeight = reactTheming.getLineHeight(padding, fontSize);
|
|
221
|
-
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);
|
|
222
110
|
};
|
|
223
111
|
const StyledSkipNav = styled__default.default.a.attrs({
|
|
224
|
-
'data-garden-id': COMPONENT_ID$
|
|
225
|
-
'data-garden-version': '9.
|
|
112
|
+
'data-garden-id': COMPONENT_ID$v,
|
|
113
|
+
'data-garden-version': '9.1.0'
|
|
226
114
|
}).withConfig({
|
|
227
115
|
displayName: "StyledSkipNav",
|
|
228
116
|
componentId: "sc-1tsro34-0"
|
|
229
|
-
})(["", ";display:inline-flex;position:absolute;left:50%;align-items:center;justify-content:center;transform:translateX(-50%);direction:", ";z-index:", ";border
|
|
230
|
-
StyledSkipNav.defaultProps = {
|
|
231
|
-
theme: reactTheming.DEFAULT_THEME
|
|
232
|
-
};
|
|
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));
|
|
233
118
|
|
|
234
119
|
var _path$1;
|
|
235
|
-
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); }
|
|
236
121
|
var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
237
122
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
238
123
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -247,446 +132,748 @@ var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
|
247
132
|
})));
|
|
248
133
|
};
|
|
249
134
|
|
|
250
|
-
const COMPONENT_ID$
|
|
251
|
-
const sizeStyles =
|
|
135
|
+
const COMPONENT_ID$u = 'chrome.skipnav_icon';
|
|
136
|
+
const sizeStyles$f = _ref => {
|
|
137
|
+
let {
|
|
138
|
+
theme
|
|
139
|
+
} = _ref;
|
|
252
140
|
const margin = `${theme.space.base * 2}px`;
|
|
253
141
|
const size = theme.iconSizes.md;
|
|
254
142
|
return styled.css(["margin-", ":", ";width:", ";height:", ";"], theme.rtl ? 'left' : 'right', margin, size, size);
|
|
255
143
|
};
|
|
256
144
|
const StyledSkipNavIcon = styled__default.default(SvgLinkStroke).attrs({
|
|
257
|
-
'data-garden-id': COMPONENT_ID$
|
|
258
|
-
'data-garden-version': '9.
|
|
145
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
146
|
+
'data-garden-version': '9.1.0'
|
|
259
147
|
}).withConfig({
|
|
260
148
|
displayName: "StyledSkipNavIcon",
|
|
261
149
|
componentId: "sc-1ika5z4-0"
|
|
262
|
-
})(["transform:", ";color:", ";", ";", ";"],
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
};
|
|
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));
|
|
266
154
|
|
|
267
|
-
const COMPONENT_ID$
|
|
155
|
+
const COMPONENT_ID$t = 'chrome.body';
|
|
268
156
|
const StyledBody = styled__default.default.div.attrs({
|
|
269
|
-
'data-garden-id': COMPONENT_ID$
|
|
270
|
-
'data-garden-version': '9.
|
|
157
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
158
|
+
'data-garden-version': '9.1.0'
|
|
271
159
|
}).withConfig({
|
|
272
160
|
displayName: "StyledBody",
|
|
273
161
|
componentId: "sc-c7h9kv-0"
|
|
274
|
-
})(["flex:1;order:1;background-color:", ";min-width:0;", ";"], props => reactTheming.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
};
|
|
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));
|
|
278
166
|
|
|
279
|
-
const COMPONENT_ID$
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
})
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
})(["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));
|
|
290
|
-
StyledFooter.defaultProps = {
|
|
291
|
-
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);
|
|
292
177
|
};
|
|
293
|
-
|
|
294
|
-
const COMPONENT_ID$k = 'chrome.content';
|
|
295
178
|
const StyledContent = styled__default.default.div.attrs({
|
|
296
|
-
'data-garden-id': COMPONENT_ID$
|
|
297
|
-
'data-garden-version': '9.
|
|
179
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
180
|
+
'data-garden-version': '9.1.0'
|
|
298
181
|
}).withConfig({
|
|
299
182
|
displayName: "StyledContent",
|
|
300
183
|
componentId: "sc-qcuzxn-0"
|
|
301
|
-
})(["display:flex;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
};
|
|
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));
|
|
305
188
|
|
|
306
|
-
const COMPONENT_ID$
|
|
189
|
+
const COMPONENT_ID$r = 'chrome.main';
|
|
307
190
|
const StyledMain = styled__default.default.main.attrs({
|
|
308
|
-
'data-garden-id': COMPONENT_ID$
|
|
309
|
-
'data-garden-version': '9.
|
|
191
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
192
|
+
'data-garden-version': '9.1.0'
|
|
310
193
|
}).withConfig({
|
|
311
194
|
displayName: "StyledMain",
|
|
312
195
|
componentId: "sc-t61cre-0"
|
|
313
|
-
})(["flex:1;order:1;background-color:", ";overflow:auto;:focus{outline:none;}", ";"], props => reactTheming.
|
|
314
|
-
|
|
315
|
-
|
|
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);
|
|
316
224
|
};
|
|
225
|
+
const StyledFooter = styled__default.default.footer.attrs({
|
|
226
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
227
|
+
'data-garden-version': '9.1.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));
|
|
317
232
|
|
|
318
|
-
const COMPONENT_ID$
|
|
233
|
+
const COMPONENT_ID$p = 'chrome.footer_item';
|
|
319
234
|
const StyledFooterItem = styled__default.default.div.attrs({
|
|
320
|
-
'data-garden-id': COMPONENT_ID$
|
|
321
|
-
'data-garden-version': '9.
|
|
235
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
236
|
+
'data-garden-version': '9.1.0'
|
|
322
237
|
}).withConfig({
|
|
323
238
|
displayName: "StyledFooterItem",
|
|
324
239
|
componentId: "sc-1cktm85-0"
|
|
325
|
-
})(["margin:", ";", ";"], props => `0 ${props.theme.space.base}px`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
326
|
-
|
|
327
|
-
|
|
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.1.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.1.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.1.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);
|
|
328
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.1.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));
|
|
329
334
|
|
|
330
|
-
const COMPONENT_ID$
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
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);
|
|
369
|
+
};
|
|
370
|
+
const StyledHeader = styled__default.default.header.attrs({
|
|
371
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
372
|
+
'data-garden-version': '9.1.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));
|
|
377
|
+
|
|
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);
|
|
334
420
|
};
|
|
335
421
|
const StyledHeaderItem = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
336
|
-
'data-garden-id': COMPONENT_ID$
|
|
337
|
-
'data-garden-version': '9.
|
|
422
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
423
|
+
'data-garden-version': '9.1.0'
|
|
338
424
|
}).withConfig({
|
|
339
425
|
displayName: "StyledHeaderItem",
|
|
340
426
|
componentId: "sc-14sft6n-0"
|
|
341
|
-
})(["
|
|
342
|
-
theme: props.theme,
|
|
343
|
-
inset: props.maxY
|
|
344
|
-
}), StyledHeaderItemIcon, StyledHeaderItemText, StyledHeaderItemIcon, StyledHeaderItemText, props => reactTheming.getColorV8('chromeHue', 700, props.theme), imgStyles, props => props.isRound && `
|
|
345
|
-
${StyledHeaderItemIcon} {
|
|
346
|
-
border-radius: 100px;
|
|
347
|
-
}
|
|
348
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
349
|
-
StyledHeaderItem.defaultProps = {
|
|
350
|
-
theme: reactTheming.DEFAULT_THEME
|
|
351
|
-
};
|
|
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));
|
|
352
428
|
|
|
353
|
-
const COMPONENT_ID$
|
|
429
|
+
const COMPONENT_ID$i = 'chrome.header_item_wrapper';
|
|
354
430
|
const StyledHeaderItemWrapper = styled__default.default(StyledBaseHeaderItem).attrs({
|
|
355
|
-
'data-garden-id': COMPONENT_ID$
|
|
356
|
-
'data-garden-version': '9.
|
|
431
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
432
|
+
'data-garden-version': '9.1.0',
|
|
357
433
|
as: 'div'
|
|
358
434
|
}).withConfig({
|
|
359
435
|
displayName: "StyledHeaderItemWrapper",
|
|
360
436
|
componentId: "sc-1uieu55-0"
|
|
361
|
-
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
362
|
-
|
|
363
|
-
|
|
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: $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);
|
|
364
470
|
};
|
|
471
|
+
const StyledNav = styled__default.default.nav.attrs({
|
|
472
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
473
|
+
'data-garden-version': '9.1.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));
|
|
365
478
|
|
|
366
|
-
const COMPONENT_ID$
|
|
479
|
+
const COMPONENT_ID$g = 'chrome.nav_list';
|
|
367
480
|
const StyledNavList = styled__default.default.ul.attrs({
|
|
368
|
-
'data-garden-id': COMPONENT_ID$
|
|
369
|
-
'data-garden-version': '9.
|
|
481
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
482
|
+
'data-garden-version': '9.1.0'
|
|
370
483
|
}).withConfig({
|
|
371
484
|
displayName: "StyledNavList",
|
|
372
485
|
componentId: "sc-1s0nkfb-0"
|
|
373
|
-
})(["display:flex;flex:1;flex-direction:column;order:0;margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
374
|
-
StyledNavList.defaultProps = {
|
|
375
|
-
theme: reactTheming.DEFAULT_THEME
|
|
376
|
-
};
|
|
486
|
+
})(["display:flex;flex:1;flex-direction:column;order:0;margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
377
487
|
|
|
378
|
-
const COMPONENT_ID$
|
|
488
|
+
const COMPONENT_ID$f = 'chrome.nav_list_item';
|
|
379
489
|
const StyledNavListItem = styled__default.default.li.attrs({
|
|
380
|
-
'data-garden-id': COMPONENT_ID$
|
|
381
|
-
'data-garden-version': '9.
|
|
490
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
491
|
+
'data-garden-version': '9.1.0'
|
|
382
492
|
}).withConfig({
|
|
383
493
|
displayName: "StyledNavListItem",
|
|
384
494
|
componentId: "sc-18cj2v7-0"
|
|
385
|
-
})(["display:flex;order:1;margin:0;padding:0;list-style-type:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$
|
|
386
|
-
|
|
387
|
-
|
|
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);
|
|
388
506
|
};
|
|
507
|
+
const StyledBaseNavItem = styled__default.default.div.attrs({
|
|
508
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
509
|
+
'data-garden-version': '9.1.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);
|
|
389
514
|
|
|
390
515
|
const COMPONENT_ID$d = 'chrome.logo_nav_list_item';
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return reactTheming.PALETTE.product.talk;
|
|
403
|
-
default:
|
|
404
|
-
return 'inherit';
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
|
-
const colorStyles$2 = props => {
|
|
408
|
-
const fillColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
|
|
409
|
-
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;
|
|
410
527
|
return styled.css(["color:", ";fill:", ";"], color, fillColor);
|
|
411
528
|
};
|
|
412
529
|
const StyledLogoNavItem = styled__default.default(StyledBaseNavItem).attrs({
|
|
413
530
|
'data-garden-id': COMPONENT_ID$d,
|
|
414
|
-
'data-garden-version': '9.
|
|
531
|
+
'data-garden-version': '9.1.0'
|
|
415
532
|
}).withConfig({
|
|
416
533
|
displayName: "StyledLogoNavItem",
|
|
417
534
|
componentId: "sc-saaydx-0"
|
|
418
|
-
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"],
|
|
419
|
-
StyledLogoNavItem.defaultProps = {
|
|
420
|
-
theme: reactTheming.DEFAULT_THEME
|
|
421
|
-
};
|
|
535
|
+
})(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], colorStyles$4);
|
|
422
536
|
|
|
423
537
|
const COMPONENT_ID$c = 'chrome.brandmark_nav_list_item';
|
|
424
538
|
const StyledBrandmarkNavItem = styled__default.default(StyledBaseNavItem).attrs({
|
|
425
539
|
'data-garden-id': COMPONENT_ID$c,
|
|
426
|
-
'data-garden-version': '9.
|
|
540
|
+
'data-garden-version': '9.1.0'
|
|
427
541
|
}).withConfig({
|
|
428
542
|
displayName: "StyledBrandmarkNavItem",
|
|
429
543
|
componentId: "sc-8kynd4-0"
|
|
430
|
-
})(["order:1;opacity:
|
|
431
|
-
StyledBrandmarkNavItem.defaultProps = {
|
|
432
|
-
theme: reactTheming.DEFAULT_THEME
|
|
433
|
-
};
|
|
544
|
+
})(["order:1;opacity:", ";margin-top:auto;min-height:0;"], props => props.theme.opacity[400]);
|
|
434
545
|
|
|
435
546
|
const COMPONENT_ID$b = 'chrome.nav_item_icon';
|
|
436
|
-
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({
|
|
437
555
|
'data-garden-id': COMPONENT_ID$b,
|
|
438
|
-
'data-garden-version': '9.
|
|
556
|
+
'data-garden-version': '9.1.0'
|
|
439
557
|
}).withConfig({
|
|
440
558
|
displayName: "StyledNavItemIcon",
|
|
441
559
|
componentId: "sc-7w9rpt-0"
|
|
442
|
-
})(["align-self:flex-start;order:0;border-radius:", ";
|
|
443
|
-
StyledNavItemIcon.defaultProps = {
|
|
444
|
-
theme: reactTheming.DEFAULT_THEME
|
|
445
|
-
};
|
|
560
|
+
})(["align-self:flex-start;order:0;border-radius:", ";", ";", ";"], props => props.theme.borderRadii.md, sizeStyles$5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
446
561
|
|
|
447
562
|
const COMPONENT_ID$a = 'chrome.nav_button';
|
|
448
|
-
const colorStyles$
|
|
449
|
-
|
|
563
|
+
const colorStyles$3 = _ref => {
|
|
564
|
+
let {
|
|
450
565
|
theme,
|
|
451
|
-
hue
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
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({
|
|
579
|
+
theme,
|
|
580
|
+
hue: $hue,
|
|
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'
|
|
467
599
|
}
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
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({
|
|
474
613
|
theme,
|
|
475
|
-
condition: false
|
|
614
|
+
condition: false,
|
|
476
615
|
styles: {
|
|
477
616
|
opacity: 1,
|
|
478
|
-
outlineColor:
|
|
617
|
+
outlineColor: focusOutlineColor,
|
|
618
|
+
outlineOffset: focusOutlineOffset
|
|
479
619
|
}
|
|
480
|
-
}),
|
|
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);
|
|
481
629
|
};
|
|
482
630
|
const StyledNavButton = styled__default.default(StyledBaseNavItem).attrs({
|
|
483
631
|
'data-garden-id': COMPONENT_ID$a,
|
|
484
|
-
'data-garden-version': '9.
|
|
632
|
+
'data-garden-version': '9.1.0',
|
|
485
633
|
as: 'button'
|
|
486
634
|
}).withConfig({
|
|
487
635
|
displayName: "StyledNavButton",
|
|
488
636
|
componentId: "sc-f5ux3-0"
|
|
489
|
-
})(["flex:1;justify-content:", ";
|
|
490
|
-
${StyledNavItemIcon} {
|
|
491
|
-
margin: 0 ${polished.math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`)};
|
|
492
|
-
}
|
|
493
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
494
|
-
StyledNavButton.defaultProps = {
|
|
495
|
-
theme: reactTheming.DEFAULT_THEME
|
|
496
|
-
};
|
|
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));
|
|
497
638
|
|
|
498
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
|
+
};
|
|
499
654
|
const StyledNavItemText = styled__default.default.span.attrs({
|
|
500
655
|
'data-garden-id': COMPONENT_ID$9,
|
|
501
|
-
'data-garden-version': '9.
|
|
656
|
+
'data-garden-version': '9.1.0'
|
|
502
657
|
}).withConfig({
|
|
503
658
|
displayName: "StyledNavItemText",
|
|
504
659
|
componentId: "sc-13m84xl-0"
|
|
505
|
-
})(["position:absolute;order:1;
|
|
506
|
-
${StyledNavButton} > && {
|
|
507
|
-
position: static;
|
|
508
|
-
flex: 1;
|
|
509
|
-
clip: auto;
|
|
510
|
-
width: auto;
|
|
511
|
-
height: auto;
|
|
512
|
-
text-overflow: ellipsis;
|
|
513
|
-
}
|
|
514
|
-
`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
515
|
-
StyledNavItemText.defaultProps = {
|
|
516
|
-
theme: reactTheming.DEFAULT_THEME
|
|
517
|
-
};
|
|
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));
|
|
518
661
|
|
|
519
662
|
const COMPONENT_ID$8 = 'chrome.sheet';
|
|
520
|
-
const
|
|
663
|
+
const colorStyles$2 = _ref => {
|
|
521
664
|
let {
|
|
522
665
|
theme,
|
|
523
|
-
|
|
524
|
-
isOpen
|
|
666
|
+
$isOpen
|
|
525
667
|
} = _ref;
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
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'}`;
|
|
536
694
|
}
|
|
537
|
-
return
|
|
695
|
+
return styled.css(["box-sizing:border-box;width:", ";height:100%;", ":", ";line-height:", ";font-size:", ";"], width, borderProperty, border, lineHeight, fontSize);
|
|
538
696
|
};
|
|
539
697
|
const StyledSheet = styled__default.default.aside.attrs({
|
|
540
698
|
'data-garden-id': COMPONENT_ID$8,
|
|
541
|
-
'data-garden-version': '9.
|
|
699
|
+
'data-garden-version': '9.1.0'
|
|
542
700
|
}).withConfig({
|
|
543
701
|
displayName: "StyledSheet",
|
|
544
702
|
componentId: "sc-dx8ijk-0"
|
|
545
|
-
})(["display:flex;order:1;transition:", ";
|
|
546
|
-
StyledSheet.defaultProps = {
|
|
547
|
-
theme: reactTheming.DEFAULT_THEME
|
|
548
|
-
};
|
|
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));
|
|
549
704
|
|
|
550
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
|
+
};
|
|
551
724
|
const StyledSheetWrapper = styled__default.default.div.attrs({
|
|
552
725
|
'data-garden-id': COMPONENT_ID$7,
|
|
553
|
-
'data-garden-version': '9.
|
|
726
|
+
'data-garden-version': '9.1.0'
|
|
554
727
|
}).withConfig({
|
|
555
728
|
displayName: "StyledSheetWrapper",
|
|
556
729
|
componentId: "sc-f6x9zb-0"
|
|
557
|
-
})(["display:flex;position:relative;flex-direction:column;
|
|
558
|
-
const translateValues = [-100, 100];
|
|
559
|
-
let translation = 'translateX(0%)';
|
|
560
|
-
if (props.isOpen) {
|
|
561
|
-
return translation;
|
|
562
|
-
}
|
|
563
|
-
if (props.theme.rtl) {
|
|
564
|
-
translateValues.reverse();
|
|
565
|
-
}
|
|
566
|
-
if (props.placement === 'end') {
|
|
567
|
-
translation = `translateX(${translateValues[1]}%)`;
|
|
568
|
-
} else if (props.placement === 'start') {
|
|
569
|
-
translation = `translateX(${translateValues[0]}%)`;
|
|
570
|
-
}
|
|
571
|
-
return translation;
|
|
572
|
-
}, props => props.isAnimated && 'transform 250ms ease-in-out', props => props.size, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
573
|
-
StyledSheetWrapper.defaultProps = {
|
|
574
|
-
theme: reactTheming.DEFAULT_THEME
|
|
575
|
-
};
|
|
730
|
+
})(["display:flex;position:relative;flex-direction:column;min-width:", ";", ";", ";"], props => props.$size, transformStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
576
731
|
|
|
577
732
|
const COMPONENT_ID$6 = 'chrome.sheet_title';
|
|
578
733
|
const StyledSheetTitle = styled__default.default.div.attrs({
|
|
579
734
|
'data-garden-id': COMPONENT_ID$6,
|
|
580
|
-
'data-garden-version': '9.
|
|
735
|
+
'data-garden-version': '9.1.0'
|
|
581
736
|
}).withConfig({
|
|
582
737
|
displayName: "StyledSheetTitle",
|
|
583
738
|
componentId: "sc-1gogk75-0"
|
|
584
|
-
})(["
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
};
|
|
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));
|
|
588
743
|
|
|
589
744
|
const COMPONENT_ID$5 = 'chrome.sheet_description';
|
|
590
745
|
const StyledSheetDescription = styled__default.default.div.attrs({
|
|
591
746
|
'data-garden-id': COMPONENT_ID$5,
|
|
592
|
-
'data-garden-version': '9.
|
|
747
|
+
'data-garden-version': '9.1.0'
|
|
593
748
|
}).withConfig({
|
|
594
749
|
displayName: "StyledSheetDescription",
|
|
595
750
|
componentId: "sc-1puglb6-0"
|
|
596
|
-
})(["line-height:", ";color:", ";", ";"],
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
};
|
|
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));
|
|
600
755
|
|
|
601
756
|
const COMPONENT_ID$4 = 'chrome.sheet_body';
|
|
602
757
|
const StyledSheetBody = styled__default.default.div.attrs({
|
|
603
758
|
'data-garden-id': COMPONENT_ID$4,
|
|
604
|
-
'data-garden-version': '9.
|
|
759
|
+
'data-garden-version': '9.1.0'
|
|
605
760
|
}).withConfig({
|
|
606
761
|
displayName: "StyledSheetBody",
|
|
607
762
|
componentId: "sc-bt4eoj-0"
|
|
608
|
-
})(["flex:1;overflow-y:auto;padding:", "px;", ";"], props => props.theme.space.base * 5, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
609
|
-
StyledSheetBody.defaultProps = {
|
|
610
|
-
theme: reactTheming.DEFAULT_THEME
|
|
611
|
-
};
|
|
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));
|
|
612
764
|
|
|
613
765
|
const COMPONENT_ID$3 = 'chrome.sheet_close';
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
const foregroundColor = 'neutralHue';
|
|
622
|
-
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({
|
|
623
|
-
theme: props.theme
|
|
624
|
-
}), 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);
|
|
625
773
|
};
|
|
626
|
-
const StyledSheetClose = styled__default.default.
|
|
774
|
+
const StyledSheetClose = styled__default.default(reactButtons.IconButton).attrs({
|
|
627
775
|
'data-garden-id': COMPONENT_ID$3,
|
|
628
|
-
'data-garden-version': '9.
|
|
776
|
+
'data-garden-version': '9.1.0'
|
|
629
777
|
}).withConfig({
|
|
630
778
|
displayName: "StyledSheetClose",
|
|
631
779
|
componentId: "sc-1ab02oq-0"
|
|
632
|
-
})(["
|
|
633
|
-
StyledSheetClose.defaultProps = {
|
|
634
|
-
theme: reactTheming.DEFAULT_THEME
|
|
635
|
-
};
|
|
780
|
+
})(["position:absolute;", ";", ";"], positionStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
636
781
|
|
|
637
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
|
+
};
|
|
638
802
|
const StyledSheetFooter = styled__default.default.footer.attrs({
|
|
639
803
|
'data-garden-id': COMPONENT_ID$2,
|
|
640
|
-
'data-garden-version': '9.
|
|
804
|
+
'data-garden-version': '9.1.0'
|
|
641
805
|
}).withConfig({
|
|
642
806
|
displayName: "StyledSheetFooter",
|
|
643
807
|
componentId: "sc-2cktos-0"
|
|
644
|
-
})(["display:flex;flex-flow:row wrap;align-items:center;justify-content:", ";
|
|
645
|
-
StyledSheetFooter.defaultProps = {
|
|
646
|
-
theme: reactTheming.DEFAULT_THEME
|
|
647
|
-
};
|
|
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));
|
|
648
809
|
|
|
649
810
|
const COMPONENT_ID$1 = 'chrome.sheet_footer_item';
|
|
650
811
|
const StyledSheetFooterItem = styled__default.default.div.attrs({
|
|
651
812
|
'data-garden-id': COMPONENT_ID$1,
|
|
652
|
-
'data-garden-version': '9.
|
|
813
|
+
'data-garden-version': '9.1.0'
|
|
653
814
|
}).withConfig({
|
|
654
815
|
displayName: "StyledSheetFooterItem",
|
|
655
816
|
componentId: "sc-r9ixh-0"
|
|
656
817
|
})(["", " ", ";"], props => `margin-${props.theme.rtl ? 'right' : 'left'}: ${props.theme.space.base * 5}px;`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
657
|
-
StyledSheetFooterItem.defaultProps = {
|
|
658
|
-
theme: reactTheming.DEFAULT_THEME
|
|
659
|
-
};
|
|
660
818
|
|
|
661
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
|
+
};
|
|
662
843
|
const StyledSheetHeader = styled__default.default.header.attrs({
|
|
663
844
|
'data-garden-id': COMPONENT_ID,
|
|
664
|
-
'data-garden-version': '9.
|
|
845
|
+
'data-garden-version': '9.1.0'
|
|
665
846
|
}).withConfig({
|
|
666
847
|
displayName: "StyledSheetHeader",
|
|
667
848
|
componentId: "sc-o2ry8i-0"
|
|
668
|
-
})(["
|
|
669
|
-
StyledSheetHeader.defaultProps = {
|
|
670
|
-
theme: reactTheming.DEFAULT_THEME
|
|
671
|
-
};
|
|
849
|
+
})(["", ";", ";", ";"], sizeStyles, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
672
850
|
|
|
673
851
|
const HeaderItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
674
852
|
let {
|
|
675
853
|
hasLogo,
|
|
854
|
+
isRound,
|
|
855
|
+
maxX,
|
|
856
|
+
maxY,
|
|
676
857
|
product,
|
|
677
858
|
...other
|
|
678
859
|
} = _ref;
|
|
679
860
|
if (hasLogo) {
|
|
680
861
|
return React__namespace.default.createElement(StyledLogoHeaderItem, Object.assign({
|
|
681
862
|
ref: ref,
|
|
682
|
-
|
|
863
|
+
$isRound: isRound,
|
|
864
|
+
$maxX: maxX,
|
|
865
|
+
$maxY: maxY,
|
|
866
|
+
$product: product
|
|
683
867
|
}, other));
|
|
684
868
|
}
|
|
685
869
|
return React__namespace.default.createElement(StyledHeaderItem, Object.assign({
|
|
686
|
-
ref: ref
|
|
870
|
+
ref: ref,
|
|
871
|
+
$isRound: isRound,
|
|
872
|
+
$maxX: maxX,
|
|
873
|
+
$maxY: maxY
|
|
687
874
|
}, other));
|
|
688
875
|
});
|
|
689
|
-
HeaderItem.displayName = '
|
|
876
|
+
HeaderItem.displayName = 'Header.Item';
|
|
690
877
|
HeaderItem.propTypes = {
|
|
691
878
|
maxX: PropTypes__default.default.bool,
|
|
692
879
|
maxY: PropTypes__default.default.bool,
|
|
@@ -700,29 +887,21 @@ const HeaderItemIcon = _ref => {
|
|
|
700
887
|
children,
|
|
701
888
|
...props
|
|
702
889
|
} = _ref;
|
|
703
|
-
|
|
704
|
-
if ( React.isValidElement(element)) {
|
|
705
|
-
const Icon = _ref2 => {
|
|
706
|
-
let {
|
|
707
|
-
theme,
|
|
708
|
-
...iconProps
|
|
709
|
-
} = _ref2;
|
|
710
|
-
return React.cloneElement(element, {
|
|
711
|
-
...props,
|
|
712
|
-
...iconProps
|
|
713
|
-
});
|
|
714
|
-
};
|
|
715
|
-
return React__namespace.default.createElement(StyledHeaderItemIcon, Object.assign({
|
|
716
|
-
as: Icon
|
|
717
|
-
}, props));
|
|
718
|
-
}
|
|
719
|
-
return null;
|
|
890
|
+
return React__namespace.default.createElement(StyledHeaderItemIcon, props, children);
|
|
720
891
|
};
|
|
892
|
+
HeaderItemIcon.displayName = 'Header.ItemIcon';
|
|
721
893
|
|
|
722
|
-
const HeaderItemText = React__namespace.default.forwardRef((
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
894
|
+
const HeaderItemText = React__namespace.default.forwardRef((_ref, ref) => {
|
|
895
|
+
let {
|
|
896
|
+
isClipped,
|
|
897
|
+
...other
|
|
898
|
+
} = _ref;
|
|
899
|
+
return React__namespace.default.createElement(StyledHeaderItemText, Object.assign({
|
|
900
|
+
ref: ref,
|
|
901
|
+
$isClipped: isClipped
|
|
902
|
+
}, other));
|
|
903
|
+
});
|
|
904
|
+
HeaderItemText.displayName = 'Header.ItemText';
|
|
726
905
|
HeaderItemText.propTypes = {
|
|
727
906
|
isClipped: PropTypes__default.default.bool
|
|
728
907
|
};
|
|
@@ -730,12 +909,12 @@ HeaderItemText.propTypes = {
|
|
|
730
909
|
const HeaderItemWrapper = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledHeaderItemWrapper, Object.assign({
|
|
731
910
|
ref: ref
|
|
732
911
|
}, props)));
|
|
733
|
-
HeaderItemWrapper.displayName = '
|
|
912
|
+
HeaderItemWrapper.displayName = 'Header.ItemWrapper';
|
|
734
913
|
|
|
735
914
|
const FooterItem$1 = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledFooterItem, Object.assign({
|
|
736
915
|
ref: ref
|
|
737
916
|
}, props)));
|
|
738
|
-
FooterItem$1.displayName = '
|
|
917
|
+
FooterItem$1.displayName = 'Footer.Item';
|
|
739
918
|
|
|
740
919
|
const NavContext = React__namespace.default.createContext({
|
|
741
920
|
isExpanded: false
|
|
@@ -761,27 +940,23 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
761
940
|
hasLogo,
|
|
762
941
|
hasBrandmark,
|
|
763
942
|
product,
|
|
943
|
+
isCurrent,
|
|
764
944
|
...other
|
|
765
945
|
} = _ref;
|
|
766
946
|
const {
|
|
767
|
-
hue
|
|
768
|
-
isLight,
|
|
769
|
-
isDark
|
|
947
|
+
hue
|
|
770
948
|
} = useChromeContext();
|
|
771
949
|
const {
|
|
772
950
|
isExpanded
|
|
773
951
|
} = useNavContext();
|
|
774
952
|
const navListContext = useNavListContext();
|
|
775
|
-
const ariaCurrent = other.isCurrent || undefined;
|
|
776
953
|
const hasList = navListContext?.hasList;
|
|
777
954
|
let retVal;
|
|
778
955
|
if (hasLogo) {
|
|
779
956
|
retVal = React__namespace.default.createElement(StyledLogoNavItem, Object.assign({
|
|
780
957
|
ref: ref,
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
product: product,
|
|
784
|
-
"aria-current": ariaCurrent
|
|
958
|
+
$hue: hue,
|
|
959
|
+
$product: product
|
|
785
960
|
}, other));
|
|
786
961
|
} else if (hasBrandmark) {
|
|
787
962
|
retVal = React__namespace.default.createElement(StyledBrandmarkNavItem, Object.assign({
|
|
@@ -791,11 +966,9 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
791
966
|
retVal = React__namespace.default.createElement(StyledNavButton, Object.assign({
|
|
792
967
|
tabIndex: 0,
|
|
793
968
|
ref: ref,
|
|
794
|
-
isExpanded: isExpanded,
|
|
795
|
-
hue: hue,
|
|
796
|
-
|
|
797
|
-
isLight: isLight,
|
|
798
|
-
"aria-current": ariaCurrent
|
|
969
|
+
$isExpanded: isExpanded,
|
|
970
|
+
$hue: hue,
|
|
971
|
+
"aria-current": isCurrent || undefined
|
|
799
972
|
}, other));
|
|
800
973
|
}
|
|
801
974
|
if (hasList) {
|
|
@@ -803,7 +976,7 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
803
976
|
}
|
|
804
977
|
return retVal;
|
|
805
978
|
});
|
|
806
|
-
NavItem.displayName = '
|
|
979
|
+
NavItem.displayName = 'Nav.Item';
|
|
807
980
|
NavItem.propTypes = {
|
|
808
981
|
product: PropTypes__default.default.oneOf(PRODUCTS),
|
|
809
982
|
hasLogo: PropTypes__default.default.bool,
|
|
@@ -815,35 +988,25 @@ const NavItemIcon = _ref => {
|
|
|
815
988
|
children,
|
|
816
989
|
...props
|
|
817
990
|
} = _ref;
|
|
818
|
-
|
|
819
|
-
if ( React.isValidElement(element)) {
|
|
820
|
-
const Icon = _ref2 => {
|
|
821
|
-
let {
|
|
822
|
-
theme,
|
|
823
|
-
...iconProps
|
|
824
|
-
} = _ref2;
|
|
825
|
-
return React.cloneElement(element, {
|
|
826
|
-
...props,
|
|
827
|
-
...iconProps
|
|
828
|
-
});
|
|
829
|
-
};
|
|
830
|
-
return React__namespace.default.createElement(StyledNavItemIcon, Object.assign({
|
|
831
|
-
as: Icon
|
|
832
|
-
}, props));
|
|
833
|
-
}
|
|
834
|
-
return null;
|
|
991
|
+
return React__namespace.default.createElement(StyledNavItemIcon, props, children);
|
|
835
992
|
};
|
|
993
|
+
NavItemIcon.displayName = 'Nav.ItemIcon';
|
|
836
994
|
|
|
837
|
-
const NavItemText = React__namespace.default.forwardRef((
|
|
995
|
+
const NavItemText = React__namespace.default.forwardRef((_ref, ref) => {
|
|
996
|
+
let {
|
|
997
|
+
isWrapped,
|
|
998
|
+
...other
|
|
999
|
+
} = _ref;
|
|
838
1000
|
const {
|
|
839
1001
|
isExpanded
|
|
840
1002
|
} = useNavContext();
|
|
841
1003
|
return React__namespace.default.createElement(StyledNavItemText, Object.assign({
|
|
842
1004
|
ref: ref,
|
|
843
|
-
isExpanded: isExpanded
|
|
844
|
-
|
|
1005
|
+
$isExpanded: isExpanded,
|
|
1006
|
+
$isWrapped: isWrapped
|
|
1007
|
+
}, other));
|
|
845
1008
|
});
|
|
846
|
-
NavItemText.displayName = '
|
|
1009
|
+
NavItemText.displayName = 'Nav.ItemText';
|
|
847
1010
|
NavItemText.propTypes = {
|
|
848
1011
|
isWrapped: PropTypes__default.default.bool
|
|
849
1012
|
};
|
|
@@ -854,22 +1017,23 @@ const Chrome = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
854
1017
|
isFluid,
|
|
855
1018
|
...props
|
|
856
1019
|
} = _ref;
|
|
857
|
-
const theme = React.useContext(styled.ThemeContext);
|
|
1020
|
+
const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
|
|
858
1021
|
const isLightMemoized = React.useMemo(() => {
|
|
859
1022
|
if (hue) {
|
|
860
|
-
const backgroundColor = reactTheming.
|
|
1023
|
+
const backgroundColor = reactTheming.getColor({
|
|
1024
|
+
theme,
|
|
1025
|
+
hue
|
|
1026
|
+
});
|
|
861
1027
|
const LIGHT_COLOR = 'white';
|
|
862
1028
|
return polished.readableColor(backgroundColor, LIGHT_COLOR, undefined, false ) === LIGHT_COLOR;
|
|
863
1029
|
}
|
|
864
1030
|
return false;
|
|
865
1031
|
}, [hue, theme]);
|
|
866
|
-
const isLight = hue ? isLightMemoized :
|
|
867
|
-
const isDark = hue ? !isLightMemoized : false;
|
|
1032
|
+
const isLight = hue ? isLightMemoized : undefined;
|
|
868
1033
|
const chromeContextValue = React.useMemo(() => ({
|
|
869
1034
|
hue: hue || 'chromeHue',
|
|
870
|
-
isLight
|
|
871
|
-
|
|
872
|
-
}), [hue, isLight, isDark]);
|
|
1035
|
+
isLight
|
|
1036
|
+
}), [hue, isLight]);
|
|
873
1037
|
const environment = reactTheming.useDocument(theme);
|
|
874
1038
|
React.useEffect(() => {
|
|
875
1039
|
if (environment && !isFluid) {
|
|
@@ -904,7 +1068,7 @@ const SkipNav = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
904
1068
|
} = _ref;
|
|
905
1069
|
return React__namespace.default.createElement(StyledSkipNav, Object.assign({
|
|
906
1070
|
href: `#${targetId}`,
|
|
907
|
-
zIndex: zIndex,
|
|
1071
|
+
$zIndex: zIndex,
|
|
908
1072
|
ref: ref
|
|
909
1073
|
}, props), React__namespace.default.createElement(StyledSkipNavIcon, null), children);
|
|
910
1074
|
});
|
|
@@ -942,7 +1106,7 @@ const Content = React__namespace.default.forwardRef((props, ref) => {
|
|
|
942
1106
|
} = useBodyContext() || {};
|
|
943
1107
|
return React__namespace.default.createElement(StyledContent, Object.assign({
|
|
944
1108
|
ref: ref,
|
|
945
|
-
hasFooter: hasFooter
|
|
1109
|
+
$hasFooter: hasFooter
|
|
946
1110
|
}, props));
|
|
947
1111
|
});
|
|
948
1112
|
Content.displayName = 'Content';
|
|
@@ -952,9 +1116,16 @@ const Main = React__namespace.default.forwardRef((props, ref) => React__namespac
|
|
|
952
1116
|
}, props)));
|
|
953
1117
|
Main.displayName = 'Main';
|
|
954
1118
|
|
|
955
|
-
const HeaderComponent = React__namespace.default.forwardRef((
|
|
956
|
-
|
|
957
|
-
|
|
1119
|
+
const HeaderComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1120
|
+
let {
|
|
1121
|
+
isStandalone,
|
|
1122
|
+
...other
|
|
1123
|
+
} = _ref;
|
|
1124
|
+
return React__namespace.default.createElement(StyledHeader, Object.assign({
|
|
1125
|
+
ref: ref,
|
|
1126
|
+
$isStandalone: isStandalone
|
|
1127
|
+
}, other));
|
|
1128
|
+
});
|
|
958
1129
|
HeaderComponent.displayName = 'Header';
|
|
959
1130
|
HeaderComponent.propTypes = {
|
|
960
1131
|
isStandalone: PropTypes__default.default.bool
|
|
@@ -998,26 +1169,35 @@ const NavList = React__namespace.default.forwardRef((props, ref) => {
|
|
|
998
1169
|
ref: ref
|
|
999
1170
|
}, props)));
|
|
1000
1171
|
});
|
|
1001
|
-
NavList.displayName = 'Nav';
|
|
1172
|
+
NavList.displayName = 'Nav.List';
|
|
1002
1173
|
|
|
1003
|
-
const NavComponent = React__namespace.default.forwardRef((
|
|
1174
|
+
const NavComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
1175
|
+
let {
|
|
1176
|
+
isExpanded,
|
|
1177
|
+
...other
|
|
1178
|
+
} = _ref;
|
|
1004
1179
|
const {
|
|
1005
1180
|
hue,
|
|
1006
|
-
isLight
|
|
1007
|
-
isDark
|
|
1181
|
+
isLight
|
|
1008
1182
|
} = useChromeContext();
|
|
1009
1183
|
const navContextValue = React.useMemo(() => ({
|
|
1010
|
-
isExpanded: !!
|
|
1011
|
-
}), [
|
|
1012
|
-
return React__namespace.default.createElement(
|
|
1184
|
+
isExpanded: !!isExpanded
|
|
1185
|
+
}), [isExpanded]);
|
|
1186
|
+
return React__namespace.default.createElement(styled.ThemeProvider, {
|
|
1187
|
+
theme: parentTheme => ({
|
|
1188
|
+
...parentTheme,
|
|
1189
|
+
colors: {
|
|
1190
|
+
...parentTheme.colors,
|
|
1191
|
+
base: isLight ? 'light' : 'dark'
|
|
1192
|
+
}
|
|
1193
|
+
})
|
|
1194
|
+
}, React__namespace.default.createElement(NavContext.Provider, {
|
|
1013
1195
|
value: navContextValue
|
|
1014
1196
|
}, React__namespace.default.createElement(StyledNav, Object.assign({
|
|
1015
|
-
ref: ref
|
|
1016
|
-
|
|
1017
|
-
hue: hue
|
|
1018
|
-
|
|
1019
|
-
isDark: isDark
|
|
1020
|
-
})));
|
|
1197
|
+
ref: ref,
|
|
1198
|
+
$isExpanded: isExpanded,
|
|
1199
|
+
$hue: hue
|
|
1200
|
+
}, other))));
|
|
1021
1201
|
});
|
|
1022
1202
|
NavComponent.displayName = 'Nav';
|
|
1023
1203
|
NavComponent.propTypes = {
|
|
@@ -1095,7 +1275,7 @@ const SheetHeader = React.forwardRef((props, ref) => {
|
|
|
1095
1275
|
} = useSheetContext();
|
|
1096
1276
|
return React__namespace.default.createElement(StyledSheetHeader, Object.assign({
|
|
1097
1277
|
ref: ref,
|
|
1098
|
-
isCloseButtonPresent: isCloseButtonPresent
|
|
1278
|
+
$isCloseButtonPresent: isCloseButtonPresent
|
|
1099
1279
|
}, props));
|
|
1100
1280
|
});
|
|
1101
1281
|
SheetHeader.displayName = 'Sheet.Header';
|
|
@@ -1109,10 +1289,15 @@ const SheetBody = React.forwardRef((props, ref) => {
|
|
|
1109
1289
|
SheetBody.displayName = 'Sheet.Body';
|
|
1110
1290
|
const Body = SheetBody;
|
|
1111
1291
|
|
|
1112
|
-
const SheetFooter = React.forwardRef((
|
|
1292
|
+
const SheetFooter = React.forwardRef((_ref, ref) => {
|
|
1293
|
+
let {
|
|
1294
|
+
isCompact,
|
|
1295
|
+
...other
|
|
1296
|
+
} = _ref;
|
|
1113
1297
|
return React__namespace.default.createElement(StyledSheetFooter, Object.assign({
|
|
1114
|
-
ref: ref
|
|
1115
|
-
|
|
1298
|
+
ref: ref,
|
|
1299
|
+
$isCompact: isCompact
|
|
1300
|
+
}, other));
|
|
1116
1301
|
});
|
|
1117
1302
|
SheetFooter.displayName = 'Sheet.Footer';
|
|
1118
1303
|
const Footer = SheetFooter;
|
|
@@ -1126,7 +1311,7 @@ SheetFooterItem.displayName = 'Sheet.FooterItem';
|
|
|
1126
1311
|
const FooterItem = SheetFooterItem;
|
|
1127
1312
|
|
|
1128
1313
|
var _path;
|
|
1129
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1314
|
+
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); }
|
|
1130
1315
|
var SvgXStroke = function SvgXStroke(props) {
|
|
1131
1316
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1132
1317
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1173,7 +1358,7 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1173
1358
|
const sheetRef = React.useRef(null);
|
|
1174
1359
|
const seed = reactUid.useUIDSeed();
|
|
1175
1360
|
const [isCloseButtonPresent, setIsCloseButtonPresent] = React.useState(false);
|
|
1176
|
-
const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.
|
|
1361
|
+
const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.1.0'}`), [id, seed]);
|
|
1177
1362
|
const titleId = `${idPrefix}--title`;
|
|
1178
1363
|
const descriptionId = `${idPrefix}--description`;
|
|
1179
1364
|
const sheetContext = React.useMemo(() => ({
|
|
@@ -1191,20 +1376,21 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
|
|
|
1191
1376
|
return React__namespace.default.createElement(SheetContext.Provider, {
|
|
1192
1377
|
value: sheetContext
|
|
1193
1378
|
}, React__namespace.default.createElement(StyledSheet, Object.assign({
|
|
1194
|
-
isOpen:
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1379
|
+
inert: isOpen ? undefined : '',
|
|
1380
|
+
$isOpen: isOpen,
|
|
1381
|
+
$isAnimated: isAnimated,
|
|
1382
|
+
$placement: placement,
|
|
1383
|
+
$size: size,
|
|
1198
1384
|
tabIndex: -1,
|
|
1199
1385
|
id: idPrefix,
|
|
1200
1386
|
"aria-labelledby": titleId,
|
|
1201
1387
|
"aria-describedby": descriptionId,
|
|
1202
1388
|
ref: reactMergeRefs.mergeRefs([sheetRef, ref])
|
|
1203
1389
|
}, props), React__namespace.default.createElement(StyledSheetWrapper, {
|
|
1204
|
-
isOpen: isOpen,
|
|
1205
|
-
isAnimated: isAnimated,
|
|
1206
|
-
placement: placement,
|
|
1207
|
-
size: size
|
|
1390
|
+
$isOpen: isOpen,
|
|
1391
|
+
$isAnimated: isAnimated,
|
|
1392
|
+
$placement: placement,
|
|
1393
|
+
$size: size
|
|
1208
1394
|
}, children)));
|
|
1209
1395
|
});
|
|
1210
1396
|
SheetComponent.displayName = 'Sheet';
|