@zendeskgarden/react-chrome 9.0.0-next.9 → 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.
Files changed (85) hide show
  1. package/dist/esm/elements/Chrome.js +9 -8
  2. package/dist/esm/elements/footer/FooterItem.js +1 -1
  3. package/dist/esm/elements/header/HeaderItem.js +1 -1
  4. package/dist/esm/elements/header/HeaderItemIcon.js +3 -18
  5. package/dist/esm/elements/header/HeaderItemText.js +1 -1
  6. package/dist/esm/elements/header/HeaderItemWrapper.js +1 -1
  7. package/dist/esm/elements/nav/Nav.js +13 -7
  8. package/dist/esm/elements/nav/NavItem.js +6 -12
  9. package/dist/esm/elements/nav/NavItemIcon.js +3 -18
  10. package/dist/esm/elements/nav/NavItemText.js +1 -1
  11. package/dist/esm/elements/nav/NavList.js +1 -1
  12. package/dist/esm/elements/sheet/Sheet.js +2 -1
  13. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/link-stroke.svg.js +1 -1
  14. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +1 -1
  15. package/dist/esm/styled/StyledChrome.js +2 -5
  16. package/dist/esm/styled/StyledSkipNav.js +36 -18
  17. package/dist/esm/styled/StyledSkipNavIcon.js +10 -7
  18. package/dist/esm/styled/body/StyledBody.js +6 -6
  19. package/dist/esm/styled/body/StyledContent.js +18 -9
  20. package/dist/esm/styled/body/StyledMain.js +6 -6
  21. package/dist/esm/styled/footer/StyledFooter.js +28 -10
  22. package/dist/esm/styled/footer/StyledFooterItem.js +2 -5
  23. package/dist/esm/styled/header/StyledBaseHeaderItem.js +25 -19
  24. package/dist/esm/styled/header/StyledHeader.js +39 -15
  25. package/dist/esm/styled/header/StyledHeaderItem.js +46 -17
  26. package/dist/esm/styled/header/StyledHeaderItemIcon.js +13 -8
  27. package/dist/esm/styled/header/StyledHeaderItemText.js +6 -9
  28. package/dist/esm/styled/header/StyledHeaderItemWrapper.js +2 -5
  29. package/dist/esm/styled/header/StyledLogoHeaderItem.js +33 -24
  30. package/dist/esm/styled/nav/StyledBaseNavItem.js +12 -15
  31. package/dist/esm/styled/nav/StyledBrandmarkNavItem.js +2 -6
  32. package/dist/esm/styled/nav/StyledLogoNavItem.js +15 -25
  33. package/dist/esm/styled/nav/StyledNav.js +33 -16
  34. package/dist/esm/styled/nav/StyledNavButton.js +64 -38
  35. package/dist/esm/styled/nav/StyledNavItemIcon.js +12 -8
  36. package/dist/esm/styled/nav/StyledNavItemText.js +19 -17
  37. package/dist/esm/styled/nav/StyledNavList.js +2 -5
  38. package/dist/esm/styled/nav/StyledNavListItem.js +2 -5
  39. package/dist/esm/styled/sheet/StyledSheet.js +32 -20
  40. package/dist/esm/styled/sheet/StyledSheetBody.js +3 -6
  41. package/dist/esm/styled/sheet/StyledSheetClose.js +13 -19
  42. package/dist/esm/styled/sheet/StyledSheetDescription.js +6 -6
  43. package/dist/esm/styled/sheet/StyledSheetFooter.js +23 -7
  44. package/dist/esm/styled/sheet/StyledSheetFooterItem.js +2 -5
  45. package/dist/esm/styled/sheet/StyledSheetHeader.js +27 -8
  46. package/dist/esm/styled/sheet/StyledSheetTitle.js +6 -6
  47. package/dist/esm/styled/sheet/StyledSheetWrapper.js +22 -22
  48. package/dist/esm/styled/utils.js +20 -0
  49. package/dist/index.cjs.js +632 -483
  50. package/dist/typings/elements/footer/Footer.d.ts +1 -1
  51. package/dist/typings/elements/header/Header.d.ts +1 -1
  52. package/dist/typings/elements/header/HeaderItemIcon.d.ts +4 -1
  53. package/dist/typings/elements/nav/Nav.d.ts +1 -1
  54. package/dist/typings/elements/nav/NavItemIcon.d.ts +4 -1
  55. package/dist/typings/elements/sheet/Sheet.d.ts +3 -1
  56. package/dist/typings/styled/StyledSkipNav.d.ts +0 -3
  57. package/dist/typings/styled/StyledSkipNavIcon.d.ts +2 -2
  58. package/dist/typings/styled/body/StyledContent.d.ts +2 -1
  59. package/dist/typings/styled/footer/StyledFooter.d.ts +1 -2
  60. package/dist/typings/styled/header/StyledBaseHeaderItem.d.ts +1 -6
  61. package/dist/typings/styled/header/StyledHeader.d.ts +1 -2
  62. package/dist/typings/styled/header/StyledHeaderItem.d.ts +0 -3
  63. package/dist/typings/styled/header/StyledHeaderItemIcon.d.ts +2 -4
  64. package/dist/typings/styled/header/StyledHeaderItemText.d.ts +0 -1
  65. package/dist/typings/styled/header/StyledLogoHeaderItem.d.ts +2 -4
  66. package/dist/typings/styled/nav/StyledBaseNavItem.d.ts +1 -2
  67. package/dist/typings/styled/nav/StyledBrandmarkNavItem.d.ts +0 -3
  68. package/dist/typings/styled/nav/StyledLogoNavItem.d.ts +3 -7
  69. package/dist/typings/styled/nav/StyledNav.d.ts +2 -6
  70. package/dist/typings/styled/nav/StyledNavButton.d.ts +2 -13
  71. package/dist/typings/styled/nav/StyledNavItemIcon.d.ts +2 -4
  72. package/dist/typings/styled/nav/StyledNavItemText.d.ts +2 -1
  73. package/dist/typings/styled/sheet/StyledSheet.d.ts +1 -0
  74. package/dist/typings/styled/sheet/StyledSheetClose.d.ts +3 -8
  75. package/dist/typings/styled/sheet/StyledSheetDescription.d.ts +2 -3
  76. package/dist/typings/styled/sheet/StyledSheetFooter.d.ts +2 -2
  77. package/dist/typings/styled/sheet/StyledSheetFooterItem.d.ts +2 -3
  78. package/dist/typings/styled/sheet/StyledSheetHeader.d.ts +2 -6
  79. package/dist/typings/styled/sheet/StyledSheetTitle.d.ts +2 -3
  80. package/dist/typings/styled/sheet/StyledSheetWrapper.d.ts +2 -2
  81. package/dist/typings/styled/utils.d.ts +15 -0
  82. package/dist/typings/utils/useChromeContext.d.ts +0 -1
  83. package/dist/typings/utils/useSheetContext.d.ts +0 -1
  84. package/package.json +8 -8
  85. 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');
@@ -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.0.0-next.9'
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.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
55
 
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
-
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.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
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 '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
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;
159
65
  };
160
66
 
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$3 = theme => {
206
- const color = reactTheming.getColorV8('primaryHue', 600, theme);
207
- const borderColor = reactTheming.getColorV8('neutralHue', 300, theme);
208
- const boxShadow = theme.shadows.lg(`${theme.space.base * 5}px`, `${theme.space.base * 7}px`, reactTheming.getColorV8('chromeHue', 600, theme, 0.15));
209
- return styled.css(["border-color:", ";box-shadow:", ";background-color:", ";color:", ";&:hover,&:focus{color:", ";}", ""], borderColor, boxShadow, reactTheming.getColorV8('background', 600 , theme), color, color, reactTheming.focusStyles({
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$1 = props => {
216
- const top = polished.math(`${getHeaderHeight(props)} / 2`);
217
- const padding = `${props.theme.space.base * 5}px`;
218
- const paddingStart = `${props.theme.space.base * 4}px`;
219
- const fontSize = props.theme.fontSizes.md;
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, props.theme.rtl ? 'right' : 'left', paddingStart, lineHeight, fontSize);
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$o,
225
- 'data-garden-version': '9.0.0-next.9'
112
+ 'data-garden-id': COMPONENT_ID$v,
113
+ 'data-garden-version': '9.0.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:", ";border-radius:", ";text-decoration:underline;white-space:nowrap;", ";", "{text-decoration:none;}&:hover{text-decoration:underline;}", ";", ";"], animationStyles(), props => props.theme.rtl && 'rtl', props => props.zIndex, props => props.theme.borders.sm, props => props.theme.borderRadii.md, props => sizeStyles$1(props), reactTheming.SELECTOR_FOCUS_VISIBLE, props => colorStyles$3(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$o, props));
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 (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
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,428 +132,721 @@ var SvgLinkStroke = function SvgLinkStroke(props) {
247
132
  })));
248
133
  };
249
134
 
250
- const COMPONENT_ID$n = 'chrome.skipnav_icon';
251
- const sizeStyles = theme => {
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$n,
258
- 'data-garden-version': '9.0.0-next.9'
145
+ 'data-garden-id': COMPONENT_ID$u,
146
+ 'data-garden-version': '9.0.0'
259
147
  }).withConfig({
260
148
  displayName: "StyledSkipNavIcon",
261
149
  componentId: "sc-1ika5z4-0"
262
- })(["transform:", ";color:", ";", ";", ";"], props => props.theme.rtl && 'scaleX(-1)', props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => sizeStyles(props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$n, props));
263
- StyledSkipNavIcon.defaultProps = {
264
- theme: reactTheming.DEFAULT_THEME
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$m = 'chrome.body';
155
+ const COMPONENT_ID$t = 'chrome.body';
268
156
  const StyledBody = styled__default.default.div.attrs({
269
- 'data-garden-id': COMPONENT_ID$m,
270
- 'data-garden-version': '9.0.0-next.9'
157
+ 'data-garden-id': COMPONENT_ID$t,
158
+ 'data-garden-version': '9.0.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.getColorV8('neutralHue', 100, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$m, props));
275
- StyledBody.defaultProps = {
276
- theme: reactTheming.DEFAULT_THEME
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$l = 'chrome.footer';
280
- const getFooterHeight = props => {
281
- return `${props.theme.space.base * 20}px`;
282
- };
283
- const StyledFooter = styled__default.default.footer.attrs({
284
- 'data-garden-id': COMPONENT_ID$l,
285
- 'data-garden-version': '9.0.0-next.9'
286
- }).withConfig({
287
- displayName: "StyledFooter",
288
- componentId: "sc-v7lib2-0"
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$k,
297
- 'data-garden-version': '9.0.0-next.9'
179
+ 'data-garden-id': COMPONENT_ID$s,
180
+ 'data-garden-version': '9.0.0'
298
181
  }).withConfig({
299
182
  displayName: "StyledContent",
300
183
  componentId: "sc-qcuzxn-0"
301
- })(["display:flex;height:", ";line-height:", ";color:", ";font-size:", ";&:focus{outline:none;}", ";"], props => props.hasFooter ? `calc(100% - ${polished.math(`${getHeaderHeight(props)} + ${getFooterHeight(props)}`)})` : `calc(100% - ${getHeaderHeight(props)})`, props => reactTheming.getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => reactTheming.getColorV8('foreground', 600 , props.theme), props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
302
- StyledContent.defaultProps = {
303
- theme: reactTheming.DEFAULT_THEME
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$j = 'chrome.main';
189
+ const COMPONENT_ID$r = 'chrome.main';
307
190
  const StyledMain = styled__default.default.main.attrs({
308
- 'data-garden-id': COMPONENT_ID$j,
309
- 'data-garden-version': '9.0.0-next.9'
191
+ 'data-garden-id': COMPONENT_ID$r,
192
+ 'data-garden-version': '9.0.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.getColorV8('background', 600 , props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$j, props));
314
- StyledMain.defaultProps = {
315
- theme: reactTheming.DEFAULT_THEME
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.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));
317
232
 
318
- const COMPONENT_ID$i = 'chrome.footer_item';
233
+ const COMPONENT_ID$p = 'chrome.footer_item';
319
234
  const StyledFooterItem = styled__default.default.div.attrs({
320
- 'data-garden-id': COMPONENT_ID$i,
321
- 'data-garden-version': '9.0.0-next.9'
235
+ 'data-garden-id': COMPONENT_ID$p,
236
+ 'data-garden-version': '9.0.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$i, props));
326
- StyledFooterItem.defaultProps = {
327
- theme: reactTheming.DEFAULT_THEME
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);
328
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));
329
377
 
330
- const COMPONENT_ID$h = 'chrome.header_item';
331
- const imgStyles = props => {
332
- const size = polished.math(`${getHeaderItemSize(props)} - ${props.theme.space.base * 2}`);
333
- return styled.css(["img{margin:0;border-radius:", ";width:", ";height:", ";}"], polished.math(`${props.theme.borderRadii.md} - 1`), size, size);
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$h,
337
- 'data-garden-version': '9.0.0-next.9'
422
+ 'data-garden-id': COMPONENT_ID$j,
423
+ 'data-garden-version': '9.0.0'
338
424
  }).withConfig({
339
425
  displayName: "StyledHeaderItem",
340
426
  componentId: "sc-14sft6n-0"
341
- })(["&:hover,&:focus{text-decoration:none;color:inherit;}", " &:focus-visible:active{box-shadow:none;}&:hover ", ",&:hover ", ",&:active ", ",&:active ", "{color:", ";}", " ", " ", ";"], props => reactTheming.focusStyles({
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$g = 'chrome.header_item_wrapper';
429
+ const COMPONENT_ID$i = 'chrome.header_item_wrapper';
354
430
  const StyledHeaderItemWrapper = styled__default.default(StyledBaseHeaderItem).attrs({
355
- 'data-garden-id': COMPONENT_ID$g,
356
- 'data-garden-version': '9.0.0-next.9',
431
+ 'data-garden-id': COMPONENT_ID$i,
432
+ 'data-garden-version': '9.0.0',
357
433
  as: 'div'
358
434
  }).withConfig({
359
435
  displayName: "StyledHeaderItemWrapper",
360
436
  componentId: "sc-1uieu55-0"
361
- })(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
362
- StyledHeaderItemWrapper.defaultProps = {
363
- theme: reactTheming.DEFAULT_THEME
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);
364
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));
365
478
 
366
- const COMPONENT_ID$f = 'chrome.nav_list';
479
+ const COMPONENT_ID$g = 'chrome.nav_list';
367
480
  const StyledNavList = styled__default.default.ul.attrs({
368
- 'data-garden-id': COMPONENT_ID$f,
369
- 'data-garden-version': '9.0.0-next.9'
481
+ 'data-garden-id': COMPONENT_ID$g,
482
+ 'data-garden-version': '9.0.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$f, props));
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$e = 'chrome.nav_list_item';
488
+ const COMPONENT_ID$f = 'chrome.nav_list_item';
379
489
  const StyledNavListItem = styled__default.default.li.attrs({
380
- 'data-garden-id': COMPONENT_ID$e,
381
- 'data-garden-version': '9.0.0-next.9'
490
+ 'data-garden-id': COMPONENT_ID$f,
491
+ 'data-garden-version': '9.0.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$e, props));
386
- StyledNavListItem.defaultProps = {
387
- theme: reactTheming.DEFAULT_THEME
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.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);
389
514
 
390
515
  const COMPONENT_ID$d = 'chrome.logo_nav_list_item';
391
- const retrieveProductColor = product => {
392
- switch (product) {
393
- case 'chat':
394
- return reactTheming.PALETTE.product.chat;
395
- case 'explore':
396
- return reactTheming.PALETTE.product.explore;
397
- case 'guide':
398
- return reactTheming.PALETTE.product.guide;
399
- case 'support':
400
- return reactTheming.PALETTE.product.support;
401
- case 'talk':
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.0.0-next.9'
531
+ 'data-garden-version': '9.0.0'
415
532
  }).withConfig({
416
533
  displayName: "StyledLogoNavItem",
417
534
  componentId: "sc-saaydx-0"
418
- })(["order:-1;opacity:1;cursor:default;min-height:0;", ";"], props => colorStyles$2(props));
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.0.0-next.9'
540
+ 'data-garden-version': '9.0.0'
427
541
  }).withConfig({
428
542
  displayName: "StyledBrandmarkNavItem",
429
543
  componentId: "sc-8kynd4-0"
430
- })(["order:1;opacity:0.3;margin-top:auto;min-height:0;"]);
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 StyledNavItemIcon = styled__default.default.div.attrs({
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.0.0-next.9'
556
+ 'data-garden-version': '9.0.0'
439
557
  }).withConfig({
440
558
  displayName: "StyledNavItemIcon",
441
559
  componentId: "sc-7w9rpt-0"
442
- })(["align-self:flex-start;order:0;border-radius:", ";width:", ";height:", ";", ";"], props => props.theme.borderRadii.md, props => props.theme.iconSizes.lg, props => props.theme.iconSizes.lg, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
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$1 = props => {
449
- const {
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({
450
579
  theme,
451
580
  hue,
452
- isLight,
453
- isDark,
454
- isCurrent
455
- } = props;
456
- const DARK = theme.palette.black;
457
- const LIGHT = theme.palette.white;
458
- let currentColor;
459
- let hoverColor;
460
- if (isCurrent) {
461
- if (isLight) {
462
- currentColor = polished.rgba(DARK, 0.4);
463
- } else if (isDark) {
464
- currentColor = polished.rgba(LIGHT, 0.4);
465
- } else {
466
- currentColor = reactTheming.getColorV8(hue, 500, theme);
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
- } else {
469
- hoverColor = polished.rgba(isLight ? LIGHT : DARK, 0.1);
470
- }
471
- const activeColor = polished.rgba(isLight ? DARK : LIGHT, 0.1);
472
- const focusColor = isLight ? DARK : LIGHT;
473
- return styled.css(["opacity:", ";outline-color:transparent;background-color:", ";&:hover{opacity:1;background-color:", ";}", " &:active{background-color:", ";}"], isCurrent ? 1 : 0.6, currentColor, hoverColor, reactTheming.focusStyles({
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: focusColor
617
+ outlineColor: focusOutlineColor,
618
+ outlineOffset: focusOutlineOffset
479
619
  }
480
- }), activeColor);
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.0.0-next.9',
632
+ 'data-garden-version': '9.0.0',
485
633
  as: 'button'
486
634
  }).withConfig({
487
635
  displayName: "StyledNavButton",
488
636
  componentId: "sc-f5ux3-0"
489
- })(["flex:1;justify-content:", ";margin:0;border:none;box-sizing:border-box;background:transparent;cursor:", ";min-width:0;text-align:", ";text-decoration:none;color:inherit;font-size:inherit;&:hover,&:focus{text-decoration:none;color:inherit;}", ";&:focus-visible:hover,&:focus-visible:active,", "{outline:", " solid;outline-offset:-", ";}", " ", ";"], props => props.isExpanded && 'start', props => props.isCurrent ? 'default' : 'pointer', props => props.isExpanded && 'inherit', colorStyles$1, reactTheming.SELECTOR_FOCUS_VISIBLE, props => polished.math(`${props.theme.borderWidths.md} - 1`), props => props.theme.borderWidths.md, props => props.isExpanded && `
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.0.0-next.9'
656
+ 'data-garden-version': '9.0.0'
502
657
  }).withConfig({
503
658
  displayName: "StyledNavItemText",
504
659
  componentId: "sc-13m84xl-0"
505
- })(["position:absolute;order:1;clip:rect(1px,1px,1px,1px);margin:", ";width:1px;height:1px;overflow:hidden;line-height:", ";white-space:", ";", " ", ";"], props => props.isExpanded && `0 ${polished.math(`(${getNavWidth(props)} - ${props.theme.iconSizes.lg}) / 4`)}`, props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.isWrapped ? 'normal' : 'nowrap', props => props.isExpanded && `
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 borderStyle = _ref => {
663
+ const colorStyles$2 = _ref => {
521
664
  let {
522
665
  theme,
523
- placement,
524
666
  isOpen
525
667
  } = _ref;
526
- const borderColor = isOpen ? reactTheming.getColorV8('neutralHue', 300, theme) : 'transparent';
527
- const borderSides = ['-left', '-right'];
528
- let borderSide = '';
529
- if (theme.rtl) {
530
- borderSides.reverse();
531
- }
532
- if (placement === 'end') {
533
- borderSide = borderSides[0];
534
- } else if (placement === 'start') {
535
- borderSide = borderSides[1];
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 `border${borderSide}: ${theme.borders.sm} ${borderColor};`;
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.0.0-next.9'
699
+ 'data-garden-version': '9.0.0'
542
700
  }).withConfig({
543
701
  displayName: "StyledSheet",
544
702
  componentId: "sc-dx8ijk-0"
545
- })(["display:flex;order:1;transition:", ";background-color:", ";width:", ";height:100%;overflow:hidden;font-size:", ";&:focus{outline:none;}", ";", ";"], props => props.isAnimated && 'width 250ms ease-in-out', props => reactTheming.getColorV8('background', 600 , props.theme), props => props.isOpen ? props.size : '0px', props => props.theme.fontSizes.md, props => borderStyle(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
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.0.0-next.9'
726
+ 'data-garden-version': '9.0.0'
554
727
  }).withConfig({
555
728
  displayName: "StyledSheetWrapper",
556
729
  componentId: "sc-f6x9zb-0"
557
- })(["display:flex;position:relative;flex-direction:column;transform:", ";transition:", ";min-width:", ";", ";"], props => {
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.0.0-next.9'
735
+ 'data-garden-version': '9.0.0'
581
736
  }).withConfig({
582
737
  displayName: "StyledSheetTitle",
583
738
  componentId: "sc-1gogk75-0"
584
- })(["line-height:", ";color:", ";font-weight:", ";", ";"], props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => reactTheming.getColorV8('foreground', 600 , props.theme), props => props.theme.fontWeights.semibold, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
585
- StyledSheetTitle.defaultProps = {
586
- theme: reactTheming.DEFAULT_THEME
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.0.0-next.9'
747
+ 'data-garden-version': '9.0.0'
593
748
  }).withConfig({
594
749
  displayName: "StyledSheetDescription",
595
750
  componentId: "sc-1puglb6-0"
596
- })(["line-height:", ";color:", ";", ";"], props => reactTheming.getLineHeight(props.theme.space.base * 4, props.theme.fontSizes.md), props => reactTheming.getColorV8('neutralHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
597
- StyledSheetDescription.defaultProps = {
598
- theme: reactTheming.DEFAULT_THEME
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.0.0-next.9'
759
+ 'data-garden-version': '9.0.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 BASE_MULTIPLIERS = {
615
- top: 2.5,
616
- side: 2,
617
- size: 10
618
- };
619
- const colorStyles = props => {
620
- const backgroundColor = 'primaryHue';
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.button.attrs({
774
+ const StyledSheetClose = styled__default.default(reactButtons.IconButton).attrs({
627
775
  'data-garden-id': COMPONENT_ID$3,
628
- 'data-garden-version': '9.0.0-next.9'
776
+ 'data-garden-version': '9.0.0'
629
777
  }).withConfig({
630
778
  displayName: "StyledSheetClose",
631
779
  componentId: "sc-1ab02oq-0"
632
- })(["display:flex;position:absolute;top:", "px;", ":", ";align-items:center;justify-content:center;transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:none;border-radius:50%;cursor:pointer;padding:0;width:", "px;height:", "px;overflow:hidden;text-decoration:none;font-size:0;user-select:none;&::-moz-focus-inner{border:0;}", ";& > svg{vertical-align:middle;}", ";"], props => props.theme.space.base * BASE_MULTIPLIERS.top, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * BASE_MULTIPLIERS.side}px`, props => props.theme.space.base * BASE_MULTIPLIERS.size, props => props.theme.space.base * BASE_MULTIPLIERS.size, props => colorStyles(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
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.0.0-next.9'
804
+ 'data-garden-version': '9.0.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:", ";border-top:", ";padding:", "px;", ";"], props => props.isCompact ? 'center' : 'flex-end', props => `${props.theme.borders.sm} ${reactTheming.getColorV8('neutralHue', 300, props.theme)}}`, props => props.theme.space.base * (props.isCompact ? 2.5 : 5), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
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.0.0-next.9'
813
+ 'data-garden-version': '9.0.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.0.0-next.9'
845
+ 'data-garden-version': '9.0.0'
665
846
  }).withConfig({
666
847
  displayName: "StyledSheetHeader",
667
848
  componentId: "sc-o2ry8i-0"
668
- })(["border-bottom:", ";padding:", "px;", " ", ";"], props => `${props.theme.borders.sm} ${reactTheming.getColorV8('neutralHue', 300, props.theme)}}`, props => props.theme.space.base * 5, props => props.isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2)}px;`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
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 {
@@ -686,7 +864,7 @@ const HeaderItem = React__namespace.default.forwardRef((_ref, ref) => {
686
864
  ref: ref
687
865
  }, other));
688
866
  });
689
- HeaderItem.displayName = 'HeaderItem';
867
+ HeaderItem.displayName = 'Header.Item';
690
868
  HeaderItem.propTypes = {
691
869
  maxX: PropTypes__default.default.bool,
692
870
  maxY: PropTypes__default.default.bool,
@@ -700,29 +878,14 @@ const HeaderItemIcon = _ref => {
700
878
  children,
701
879
  ...props
702
880
  } = _ref;
703
- const element = React.Children.only(children);
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;
881
+ return React__namespace.default.createElement(StyledHeaderItemIcon, props, children);
720
882
  };
883
+ HeaderItemIcon.displayName = 'Header.ItemIcon';
721
884
 
722
885
  const HeaderItemText = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledHeaderItemText, Object.assign({
723
886
  ref: ref
724
887
  }, props)));
725
- HeaderItemText.displayName = 'HeaderItemText';
888
+ HeaderItemText.displayName = 'Header.ItemText';
726
889
  HeaderItemText.propTypes = {
727
890
  isClipped: PropTypes__default.default.bool
728
891
  };
@@ -730,12 +893,12 @@ HeaderItemText.propTypes = {
730
893
  const HeaderItemWrapper = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledHeaderItemWrapper, Object.assign({
731
894
  ref: ref
732
895
  }, props)));
733
- HeaderItemWrapper.displayName = 'HeaderItemWrapper';
896
+ HeaderItemWrapper.displayName = 'Header.ItemWrapper';
734
897
 
735
898
  const FooterItem$1 = React__namespace.default.forwardRef((props, ref) => React__namespace.default.createElement(StyledFooterItem, Object.assign({
736
899
  ref: ref
737
900
  }, props)));
738
- FooterItem$1.displayName = 'FooterItem';
901
+ FooterItem$1.displayName = 'Footer.Item';
739
902
 
740
903
  const NavContext = React__namespace.default.createContext({
741
904
  isExpanded: false
@@ -761,27 +924,23 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
761
924
  hasLogo,
762
925
  hasBrandmark,
763
926
  product,
927
+ isCurrent,
764
928
  ...other
765
929
  } = _ref;
766
930
  const {
767
- hue,
768
- isLight,
769
- isDark
931
+ hue
770
932
  } = useChromeContext();
771
933
  const {
772
934
  isExpanded
773
935
  } = useNavContext();
774
936
  const navListContext = useNavListContext();
775
- const ariaCurrent = other.isCurrent || undefined;
776
937
  const hasList = navListContext?.hasList;
777
938
  let retVal;
778
939
  if (hasLogo) {
779
940
  retVal = React__namespace.default.createElement(StyledLogoNavItem, Object.assign({
780
941
  ref: ref,
781
- isDark: isDark,
782
- isLight: isLight,
783
- product: product,
784
- "aria-current": ariaCurrent
942
+ hue: hue,
943
+ product: product
785
944
  }, other));
786
945
  } else if (hasBrandmark) {
787
946
  retVal = React__namespace.default.createElement(StyledBrandmarkNavItem, Object.assign({
@@ -793,9 +952,7 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
793
952
  ref: ref,
794
953
  isExpanded: isExpanded,
795
954
  hue: hue,
796
- isDark: isDark,
797
- isLight: isLight,
798
- "aria-current": ariaCurrent
955
+ "aria-current": isCurrent || undefined
799
956
  }, other));
800
957
  }
801
958
  if (hasList) {
@@ -803,7 +960,7 @@ const NavItem = React__namespace.default.forwardRef((_ref, ref) => {
803
960
  }
804
961
  return retVal;
805
962
  });
806
- NavItem.displayName = 'NavItem';
963
+ NavItem.displayName = 'Nav.Item';
807
964
  NavItem.propTypes = {
808
965
  product: PropTypes__default.default.oneOf(PRODUCTS),
809
966
  hasLogo: PropTypes__default.default.bool,
@@ -815,24 +972,9 @@ const NavItemIcon = _ref => {
815
972
  children,
816
973
  ...props
817
974
  } = _ref;
818
- const element = React.Children.only(children);
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;
975
+ return React__namespace.default.createElement(StyledNavItemIcon, props, children);
835
976
  };
977
+ NavItemIcon.displayName = 'Nav.ItemIcon';
836
978
 
837
979
  const NavItemText = React__namespace.default.forwardRef((props, ref) => {
838
980
  const {
@@ -843,7 +985,7 @@ const NavItemText = React__namespace.default.forwardRef((props, ref) => {
843
985
  isExpanded: isExpanded
844
986
  }, props));
845
987
  });
846
- NavItemText.displayName = 'NavItemText';
988
+ NavItemText.displayName = 'Nav.ItemText';
847
989
  NavItemText.propTypes = {
848
990
  isWrapped: PropTypes__default.default.bool
849
991
  };
@@ -854,22 +996,23 @@ const Chrome = React__namespace.default.forwardRef((_ref, ref) => {
854
996
  isFluid,
855
997
  ...props
856
998
  } = _ref;
857
- const theme = React.useContext(styled.ThemeContext);
999
+ const theme = React.useContext(styled.ThemeContext) || reactTheming.DEFAULT_THEME;
858
1000
  const isLightMemoized = React.useMemo(() => {
859
1001
  if (hue) {
860
- const backgroundColor = reactTheming.getColorV8(hue, 600, theme);
1002
+ const backgroundColor = reactTheming.getColor({
1003
+ theme,
1004
+ hue
1005
+ });
861
1006
  const LIGHT_COLOR = 'white';
862
1007
  return polished.readableColor(backgroundColor, LIGHT_COLOR, undefined, false ) === LIGHT_COLOR;
863
1008
  }
864
1009
  return false;
865
1010
  }, [hue, theme]);
866
- const isLight = hue ? isLightMemoized : false;
867
- const isDark = hue ? !isLightMemoized : false;
1011
+ const isLight = hue ? isLightMemoized : undefined;
868
1012
  const chromeContextValue = React.useMemo(() => ({
869
1013
  hue: hue || 'chromeHue',
870
- isLight,
871
- isDark
872
- }), [hue, isLight, isDark]);
1014
+ isLight
1015
+ }), [hue, isLight]);
873
1016
  const environment = reactTheming.useDocument(theme);
874
1017
  React.useEffect(() => {
875
1018
  if (environment && !isFluid) {
@@ -998,26 +1141,31 @@ const NavList = React__namespace.default.forwardRef((props, ref) => {
998
1141
  ref: ref
999
1142
  }, props)));
1000
1143
  });
1001
- NavList.displayName = 'Nav';
1144
+ NavList.displayName = 'Nav.List';
1002
1145
 
1003
1146
  const NavComponent = React__namespace.default.forwardRef((props, ref) => {
1004
1147
  const {
1005
1148
  hue,
1006
- isLight,
1007
- isDark
1149
+ isLight
1008
1150
  } = useChromeContext();
1009
1151
  const navContextValue = React.useMemo(() => ({
1010
1152
  isExpanded: !!props.isExpanded
1011
1153
  }), [props.isExpanded]);
1012
- return React__namespace.default.createElement(NavContext.Provider, {
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, {
1013
1163
  value: navContextValue
1014
1164
  }, React__namespace.default.createElement(StyledNav, Object.assign({
1015
1165
  ref: ref
1016
1166
  }, props, {
1017
- hue: hue,
1018
- isLight: isLight,
1019
- isDark: isDark
1020
- })));
1167
+ hue: hue
1168
+ }))));
1021
1169
  });
1022
1170
  NavComponent.displayName = 'Nav';
1023
1171
  NavComponent.propTypes = {
@@ -1126,7 +1274,7 @@ SheetFooterItem.displayName = 'Sheet.FooterItem';
1126
1274
  const FooterItem = SheetFooterItem;
1127
1275
 
1128
1276
  var _path;
1129
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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); }
1130
1278
  var SvgXStroke = function SvgXStroke(props) {
1131
1279
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
1132
1280
  xmlns: "http://www.w3.org/2000/svg",
@@ -1173,7 +1321,7 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
1173
1321
  const sheetRef = React.useRef(null);
1174
1322
  const seed = reactUid.useUIDSeed();
1175
1323
  const [isCloseButtonPresent, setIsCloseButtonPresent] = React.useState(false);
1176
- const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.0.0-next.9'}`), [id, seed]);
1324
+ const idPrefix = React.useMemo(() => id || seed(`sheet_${'9.0.0'}`), [id, seed]);
1177
1325
  const titleId = `${idPrefix}--title`;
1178
1326
  const descriptionId = `${idPrefix}--description`;
1179
1327
  const sheetContext = React.useMemo(() => ({
@@ -1191,6 +1339,7 @@ const SheetComponent = React__namespace.default.forwardRef((_ref, ref) => {
1191
1339
  return React__namespace.default.createElement(SheetContext.Provider, {
1192
1340
  value: sheetContext
1193
1341
  }, React__namespace.default.createElement(StyledSheet, Object.assign({
1342
+ inert: isOpen ? undefined : '',
1194
1343
  isOpen: isOpen,
1195
1344
  isAnimated: isAnimated,
1196
1345
  placement: placement,