@zendeskgarden/react-chrome 8.45.0 → 8.47.2
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/index.cjs.js +699 -300
- package/dist/index.esm.js +609 -211
- package/dist/typings/elements/Chrome.d.ts +1 -1
- package/dist/typings/elements/nav/NavItem.d.ts +1 -2
- package/dist/typings/elements/nav/NavItemText.d.ts +1 -1
- package/dist/typings/elements/sheet/Sheet.d.ts +42 -0
- package/dist/typings/elements/sheet/components/Body.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Close.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Description.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Footer.d.ts +9 -0
- package/dist/typings/elements/sheet/components/FooterItem.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Header.d.ts +8 -0
- package/dist/typings/elements/sheet/components/Title.d.ts +8 -0
- package/dist/typings/index.d.ts +6 -0
- package/dist/typings/styled/index.d.ts +10 -0
- package/dist/typings/styled/sheet/StyledSheet.d.ts +18 -0
- package/dist/typings/styled/sheet/StyledSheetBody.d.ts +10 -0
- package/dist/typings/styled/sheet/StyledSheetClose.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetDescription.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetFooter.d.ts +15 -0
- package/dist/typings/styled/sheet/StyledSheetFooterItem.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetHeader.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetTitle.d.ts +11 -0
- package/dist/typings/styled/sheet/StyledSheetWrapper.d.ts +18 -0
- package/dist/typings/utils/useFocusableMount.d.ts +14 -0
- package/dist/typings/utils/useSheetContext.d.ts +13 -0
- package/package.json +7 -6
package/dist/index.esm.js
CHANGED
|
@@ -6,27 +6,24 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import React__default, { useContext, useMemo, useEffect, Children, useRef, useState } from 'react';
|
|
9
|
+
import React__default, { useContext, useMemo, useEffect, Children, useRef, useState, createContext, forwardRef } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import styled, { css, keyframes, ThemeContext } from 'styled-components';
|
|
12
12
|
import { math, rgba, readableColor } from 'polished';
|
|
13
13
|
import { retrieveComponentStyles, DEFAULT_THEME, getLineHeight, getColor, PALETTE, useDocument } from '@zendeskgarden/react-theming';
|
|
14
14
|
import { useAccordion } from '@zendeskgarden/container-accordion';
|
|
15
15
|
import { getControlledValue } from '@zendeskgarden/container-utilities';
|
|
16
|
+
import { useUIDSeed } from 'react-uid';
|
|
17
|
+
import mergeRefs from 'react-merge-refs';
|
|
16
18
|
|
|
17
19
|
function ownKeys(object, enumerableOnly) {
|
|
18
20
|
var keys = Object.keys(object);
|
|
19
21
|
|
|
20
22
|
if (Object.getOwnPropertySymbols) {
|
|
21
23
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
keys.push.apply(keys, symbols);
|
|
24
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
25
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
26
|
+
})), keys.push.apply(keys, symbols);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
return keys;
|
|
@@ -34,19 +31,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
34
31
|
|
|
35
32
|
function _objectSpread2(target) {
|
|
36
33
|
for (var i = 1; i < arguments.length; i++) {
|
|
37
|
-
var source = arguments[i]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
44
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
45
|
-
} else {
|
|
46
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
47
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
48
|
-
});
|
|
49
|
-
}
|
|
34
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
35
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
36
|
+
_defineProperty(target, key, source[key]);
|
|
37
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
38
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
39
|
+
});
|
|
50
40
|
}
|
|
51
41
|
|
|
52
42
|
return target;
|
|
@@ -67,8 +57,8 @@ function _defineProperty(obj, key, value) {
|
|
|
67
57
|
return obj;
|
|
68
58
|
}
|
|
69
59
|
|
|
70
|
-
function _extends$
|
|
71
|
-
_extends$
|
|
60
|
+
function _extends$3() {
|
|
61
|
+
_extends$3 = Object.assign || function (target) {
|
|
72
62
|
for (var i = 1; i < arguments.length; i++) {
|
|
73
63
|
var source = arguments[i];
|
|
74
64
|
|
|
@@ -82,7 +72,7 @@ function _extends$2() {
|
|
|
82
72
|
return target;
|
|
83
73
|
};
|
|
84
74
|
|
|
85
|
-
return _extends$
|
|
75
|
+
return _extends$3.apply(this, arguments);
|
|
86
76
|
}
|
|
87
77
|
|
|
88
78
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -187,10 +177,10 @@ var useChromeContext = function useChromeContext() {
|
|
|
187
177
|
return useContext(ChromeContext);
|
|
188
178
|
};
|
|
189
179
|
|
|
190
|
-
var COMPONENT_ID$
|
|
180
|
+
var COMPONENT_ID$A = 'chrome.chrome';
|
|
191
181
|
var StyledChrome = styled.div.attrs({
|
|
192
|
-
'data-garden-id': COMPONENT_ID$
|
|
193
|
-
'data-garden-version': '8.
|
|
182
|
+
'data-garden-id': COMPONENT_ID$A,
|
|
183
|
+
'data-garden-version': '8.47.2'
|
|
194
184
|
}).withConfig({
|
|
195
185
|
displayName: "StyledChrome",
|
|
196
186
|
componentId: "sc-1uqm6u6-0"
|
|
@@ -199,16 +189,16 @@ var StyledChrome = styled.div.attrs({
|
|
|
199
189
|
}, function (props) {
|
|
200
190
|
return props.theme.rtl && 'rtl';
|
|
201
191
|
}, function (props) {
|
|
202
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
192
|
+
return retrieveComponentStyles(COMPONENT_ID$A, props);
|
|
203
193
|
});
|
|
204
194
|
StyledChrome.defaultProps = {
|
|
205
195
|
theme: DEFAULT_THEME
|
|
206
196
|
};
|
|
207
197
|
|
|
208
|
-
var COMPONENT_ID$
|
|
198
|
+
var COMPONENT_ID$z = 'chrome.header_item_icon';
|
|
209
199
|
var StyledHeaderItemIcon = styled.div.attrs({
|
|
210
|
-
'data-garden-id': COMPONENT_ID$
|
|
211
|
-
'data-garden-version': '8.
|
|
200
|
+
'data-garden-id': COMPONENT_ID$z,
|
|
201
|
+
'data-garden-version': '8.47.2'
|
|
212
202
|
}).withConfig({
|
|
213
203
|
displayName: "StyledHeaderItemIcon",
|
|
214
204
|
componentId: "sc-1jhhp6z-0"
|
|
@@ -219,13 +209,13 @@ var StyledHeaderItemIcon = styled.div.attrs({
|
|
|
219
209
|
}, function (props) {
|
|
220
210
|
return props.theme.iconSizes.md;
|
|
221
211
|
}, function (props) {
|
|
222
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
212
|
+
return retrieveComponentStyles(COMPONENT_ID$z, props);
|
|
223
213
|
});
|
|
224
214
|
StyledHeaderItemIcon.defaultProps = {
|
|
225
215
|
theme: DEFAULT_THEME
|
|
226
216
|
};
|
|
227
217
|
|
|
228
|
-
var COMPONENT_ID$
|
|
218
|
+
var COMPONENT_ID$y = 'chrome.base_header_item';
|
|
229
219
|
var getHeaderItemSize = function getHeaderItemSize(props) {
|
|
230
220
|
return "".concat(props.theme.space.base * 7.5, "px");
|
|
231
221
|
};
|
|
@@ -234,8 +224,8 @@ var sizeStyles$4 = function sizeStyles(props) {
|
|
|
234
224
|
return css(["padding:0 3px;min-width:", "px;height:", ";line-height:", ";"], size, props.maxY ? '100%' : "".concat(size, "px"), getLineHeight(size, props.theme.fontSizes.md));
|
|
235
225
|
};
|
|
236
226
|
var StyledBaseHeaderItem = styled.button.attrs({
|
|
237
|
-
'data-garden-id': COMPONENT_ID$
|
|
238
|
-
'data-garden-version': '8.
|
|
227
|
+
'data-garden-id': COMPONENT_ID$y,
|
|
228
|
+
'data-garden-version': '8.47.2'
|
|
239
229
|
}).withConfig({
|
|
240
230
|
displayName: "StyledBaseHeaderItem",
|
|
241
231
|
componentId: "sc-1qua7h6-0"
|
|
@@ -254,31 +244,31 @@ var StyledBaseHeaderItem = styled.button.attrs({
|
|
|
254
244
|
}
|
|
255
245
|
return props.theme.borderRadii.md;
|
|
256
246
|
}, sizeStyles$4, function (props) {
|
|
257
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
247
|
+
return retrieveComponentStyles(COMPONENT_ID$y, props);
|
|
258
248
|
});
|
|
259
249
|
StyledBaseHeaderItem.defaultProps = {
|
|
260
250
|
theme: DEFAULT_THEME
|
|
261
251
|
};
|
|
262
252
|
|
|
263
|
-
var COMPONENT_ID$
|
|
253
|
+
var COMPONENT_ID$x = 'chrome.header_item_text';
|
|
264
254
|
var clippedStyling = css(["position:absolute;margin:0;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden;white-space:nowrap;"]);
|
|
265
255
|
var StyledHeaderItemText = styled.span.attrs({
|
|
266
|
-
'data-garden-id': COMPONENT_ID$
|
|
267
|
-
'data-garden-version': '8.
|
|
256
|
+
'data-garden-id': COMPONENT_ID$x,
|
|
257
|
+
'data-garden-version': '8.47.2'
|
|
268
258
|
}).withConfig({
|
|
269
259
|
displayName: "StyledHeaderItemText",
|
|
270
260
|
componentId: "sc-goz7la-0"
|
|
271
261
|
})(["margin:0 3px;", " ", ";"], function (props) {
|
|
272
262
|
return props.isClipped && clippedStyling;
|
|
273
263
|
}, function (props) {
|
|
274
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
264
|
+
return retrieveComponentStyles(COMPONENT_ID$x, props);
|
|
275
265
|
});
|
|
276
266
|
StyledHeaderItemText.defaultProps = {
|
|
277
267
|
theme: DEFAULT_THEME
|
|
278
268
|
};
|
|
279
269
|
|
|
280
|
-
var COMPONENT_ID$
|
|
281
|
-
var colorStyles$
|
|
270
|
+
var COMPONENT_ID$w = 'chrome.nav';
|
|
271
|
+
var colorStyles$6 = function colorStyles(props) {
|
|
282
272
|
var shade = props.isDark || props.isLight ? 600 : 700;
|
|
283
273
|
var backgroundColor = getColor(props.hue, shade, props.theme);
|
|
284
274
|
var foregroundColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
|
|
@@ -291,8 +281,8 @@ var getExpandedNavWidth = function getExpandedNavWidth() {
|
|
|
291
281
|
return "200px";
|
|
292
282
|
};
|
|
293
283
|
var StyledNav = styled.nav.attrs({
|
|
294
|
-
'data-garden-id': COMPONENT_ID$
|
|
295
|
-
'data-garden-version': '8.
|
|
284
|
+
'data-garden-id': COMPONENT_ID$w,
|
|
285
|
+
'data-garden-version': '8.47.2'
|
|
296
286
|
}).withConfig({
|
|
297
287
|
displayName: "StyledNav",
|
|
298
288
|
componentId: "sc-6j462r-0"
|
|
@@ -301,15 +291,15 @@ var StyledNav = styled.nav.attrs({
|
|
|
301
291
|
}, function (props) {
|
|
302
292
|
return props.theme.fontSizes.md;
|
|
303
293
|
}, function (props) {
|
|
304
|
-
return colorStyles$
|
|
294
|
+
return colorStyles$6(props);
|
|
305
295
|
}, function (props) {
|
|
306
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
296
|
+
return retrieveComponentStyles(COMPONENT_ID$w, props);
|
|
307
297
|
});
|
|
308
298
|
StyledNav.defaultProps = {
|
|
309
299
|
theme: DEFAULT_THEME
|
|
310
300
|
};
|
|
311
301
|
|
|
312
|
-
var COMPONENT_ID$
|
|
302
|
+
var COMPONENT_ID$v = 'chrome.header_item';
|
|
313
303
|
var retrieveProductColor$1 = function retrieveProductColor(props) {
|
|
314
304
|
switch (props.product) {
|
|
315
305
|
case 'chat':
|
|
@@ -331,8 +321,8 @@ var retrieveProductColor$1 = function retrieveProductColor(props) {
|
|
|
331
321
|
}
|
|
332
322
|
};
|
|
333
323
|
var StyledLogoHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
334
|
-
'data-garden-id': COMPONENT_ID$
|
|
335
|
-
'data-garden-version': '8.
|
|
324
|
+
'data-garden-id': COMPONENT_ID$v,
|
|
325
|
+
'data-garden-version': '8.47.2',
|
|
336
326
|
as: 'div'
|
|
337
327
|
}).withConfig({
|
|
338
328
|
displayName: "StyledLogoHeaderItem",
|
|
@@ -356,13 +346,13 @@ var StyledLogoHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
|
356
346
|
}, function (props) {
|
|
357
347
|
return props.theme.iconSizes.lg;
|
|
358
348
|
}, function (props) {
|
|
359
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
349
|
+
return retrieveComponentStyles(COMPONENT_ID$v, props);
|
|
360
350
|
});
|
|
361
351
|
StyledLogoHeaderItem.defaultProps = {
|
|
362
352
|
theme: DEFAULT_THEME
|
|
363
353
|
};
|
|
364
354
|
|
|
365
|
-
var COMPONENT_ID$
|
|
355
|
+
var COMPONENT_ID$u = 'chrome.base_nav_item';
|
|
366
356
|
var getNavItemHeight = function getNavItemHeight(props) {
|
|
367
357
|
return "".concat(props.theme.space.base * 13, "px");
|
|
368
358
|
};
|
|
@@ -372,8 +362,8 @@ var sizeStyles$3 = function sizeStyles(props) {
|
|
|
372
362
|
return css(["padding:", " ", ";min-height:", ";"], verticalPadding, horizontalPadding, getNavItemHeight);
|
|
373
363
|
};
|
|
374
364
|
var StyledBaseNavItem = styled.button.attrs({
|
|
375
|
-
'data-garden-id': COMPONENT_ID$
|
|
376
|
-
'data-garden-version': '8.
|
|
365
|
+
'data-garden-id': COMPONENT_ID$u,
|
|
366
|
+
'data-garden-version': '8.47.2'
|
|
377
367
|
}).withConfig({
|
|
378
368
|
displayName: "StyledBaseNavItem",
|
|
379
369
|
componentId: "sc-zvo43f-0"
|
|
@@ -384,13 +374,13 @@ StyledBaseNavItem.defaultProps = {
|
|
|
384
374
|
theme: DEFAULT_THEME
|
|
385
375
|
};
|
|
386
376
|
|
|
387
|
-
var COMPONENT_ID$
|
|
377
|
+
var COMPONENT_ID$t = 'chrome.header';
|
|
388
378
|
var getHeaderHeight = function getHeaderHeight(props) {
|
|
389
379
|
return getNavItemHeight(props);
|
|
390
380
|
};
|
|
391
381
|
var StyledHeader = styled.header.attrs({
|
|
392
|
-
'data-garden-id': COMPONENT_ID$
|
|
393
|
-
'data-garden-version': '8.
|
|
382
|
+
'data-garden-id': COMPONENT_ID$t,
|
|
383
|
+
'data-garden-version': '8.47.2'
|
|
394
384
|
}).withConfig({
|
|
395
385
|
displayName: "StyledHeader",
|
|
396
386
|
componentId: "sc-1cexpz-0"
|
|
@@ -411,18 +401,18 @@ var StyledHeader = styled.header.attrs({
|
|
|
411
401
|
}, function (props) {
|
|
412
402
|
return props.isStandalone && "\n ".concat(StyledLogoHeaderItem, " {\n display: inline-flex;\n }\n ");
|
|
413
403
|
}, function (props) {
|
|
414
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
404
|
+
return retrieveComponentStyles(COMPONENT_ID$t, props);
|
|
415
405
|
});
|
|
416
406
|
StyledHeader.defaultProps = {
|
|
417
407
|
theme: DEFAULT_THEME
|
|
418
408
|
};
|
|
419
409
|
|
|
420
|
-
var COMPONENT_ID$
|
|
410
|
+
var COMPONENT_ID$s = 'chrome.skipnav';
|
|
421
411
|
var animationStyles = function animationStyles() {
|
|
422
412
|
var animationName = keyframes(["0%{transform:translate(-50%,-50%);}"]);
|
|
423
413
|
return css(["transition:opacity 0.2s ease-out,clip 0s linear 0.2s;opacity:0;clip:rect(0,0,0,0);&:focus{transition:opacity 0.2s ease-in-out;animation:0.2s cubic-bezier(0.15,0.85,0.35,1.2) ", ";opacity:1;clip:rect(0,150vw,100vh,-50vw);}"], animationName);
|
|
424
414
|
};
|
|
425
|
-
var colorStyles$
|
|
415
|
+
var colorStyles$5 = function colorStyles(theme) {
|
|
426
416
|
var color = getColor('primaryHue', 600, theme);
|
|
427
417
|
var borderColor = getColor('neutralHue', 300, theme);
|
|
428
418
|
var boxShadow = theme.shadows.lg("".concat(theme.space.base * 5, "px"), "".concat(theme.space.base * 7, "px"), getColor('chromeHue', 600, theme, 0.15));
|
|
@@ -437,8 +427,8 @@ var sizeStyles$2 = function sizeStyles(props) {
|
|
|
437
427
|
return css(["top:", ";padding:", ";padding-", ":", ";line-height:", ";font-size:", ";"], top, padding, props.theme.rtl ? 'right' : 'left', paddingStart, lineHeight, fontSize);
|
|
438
428
|
};
|
|
439
429
|
var StyledSkipNav = styled.a.attrs({
|
|
440
|
-
'data-garden-id': COMPONENT_ID$
|
|
441
|
-
'data-garden-version': '8.
|
|
430
|
+
'data-garden-id': COMPONENT_ID$s,
|
|
431
|
+
'data-garden-version': '8.47.2'
|
|
442
432
|
}).withConfig({
|
|
443
433
|
displayName: "StyledSkipNav",
|
|
444
434
|
componentId: "sc-1tsro34-0"
|
|
@@ -453,41 +443,41 @@ var StyledSkipNav = styled.a.attrs({
|
|
|
453
443
|
}, function (props) {
|
|
454
444
|
return sizeStyles$2(props);
|
|
455
445
|
}, function (props) {
|
|
456
|
-
return colorStyles$
|
|
446
|
+
return colorStyles$5(props.theme);
|
|
457
447
|
}, function (props) {
|
|
458
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
448
|
+
return retrieveComponentStyles(COMPONENT_ID$s, props);
|
|
459
449
|
});
|
|
460
450
|
StyledSkipNav.defaultProps = {
|
|
461
451
|
theme: DEFAULT_THEME
|
|
462
452
|
};
|
|
463
453
|
|
|
464
|
-
|
|
454
|
+
var _path$2;
|
|
465
455
|
|
|
466
|
-
var
|
|
467
|
-
fill: "currentColor",
|
|
468
|
-
d: "M4.441 7.38l.095.083.939.939-.708.707-.939-.939-2 2-.132.142a2.829 2.829 0 003.99 3.99l.142-.132 2-2-.939-.939.707-.708.94.94a1 1 0 01.083 1.32l-.083.094-2 2A3.828 3.828 0 01.972 9.621l.15-.158 2-2A1 1 0 014.34 7.31l.101.07zm7.413-3.234a.5.5 0 01.057.638l-.057.07-7 7a.5.5 0 01-.765-.638l.057-.07 7-7a.5.5 0 01.708 0zm3.023-3.025a3.829 3.829 0 01.15 5.257l-.15.158-2 2a1 1 0 01-1.32.083l-.094-.083-.94-.94.708-.707.939.94 2-2 .132-.142a2.829 2.829 0 00-3.99-3.99l-.142.131-2 2 .939.939-.707.708-.94-.94a1 1 0 01-.082-1.32l.083-.094 2-2a3.828 3.828 0 015.414 0z"
|
|
469
|
-
});
|
|
456
|
+
function _extends$2() { _extends$2 = Object.assign || 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$2.apply(this, arguments); }
|
|
470
457
|
|
|
471
|
-
function SvgLinkStroke(props) {
|
|
472
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
458
|
+
var SvgLinkStroke = function SvgLinkStroke(props) {
|
|
459
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
473
460
|
xmlns: "http://www.w3.org/2000/svg",
|
|
474
461
|
width: 16,
|
|
475
462
|
height: 16,
|
|
476
|
-
viewBox: "0 0 16 16",
|
|
477
463
|
focusable: "false",
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
464
|
+
viewBox: "0 0 16 16",
|
|
465
|
+
"aria-hidden": "true"
|
|
466
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
467
|
+
fill: "currentColor",
|
|
468
|
+
d: "M4.441 7.38l.095.083.939.939-.708.707-.939-.939-2 2-.132.142a2.829 2.829 0 003.99 3.99l.142-.132 2-2-.939-.939.707-.708.94.94a1 1 0 01.083 1.32l-.083.094-2 2A3.828 3.828 0 01.972 9.621l.15-.158 2-2A1 1 0 014.34 7.31l.101.07zm7.413-3.234a.5.5 0 01.057.638l-.057.07-7 7a.5.5 0 01-.765-.638l.057-.07 7-7a.5.5 0 01.708 0zm3.023-3.025a3.829 3.829 0 01.15 5.257l-.15.158-2 2a1 1 0 01-1.32.083l-.094-.083-.94-.94.708-.707.939.94 2-2 .132-.142a2.829 2.829 0 00-3.99-3.99l-.142.131-2 2 .939.939-.707.708-.94-.94a1 1 0 01-.082-1.32l.083-.094 2-2a3.828 3.828 0 015.414 0z"
|
|
469
|
+
})));
|
|
470
|
+
};
|
|
481
471
|
|
|
482
|
-
var COMPONENT_ID$
|
|
472
|
+
var COMPONENT_ID$r = 'chrome.skipnav_icon';
|
|
483
473
|
var sizeStyles$1 = function sizeStyles(theme) {
|
|
484
474
|
var margin = "".concat(theme.space.base * 2, "px");
|
|
485
475
|
var size = theme.iconSizes.md;
|
|
486
476
|
return css(["margin-", ":", ";width:", ";height:", ";"], theme.rtl ? 'left' : 'right', margin, size, size);
|
|
487
477
|
};
|
|
488
478
|
var StyledSkipNavIcon = styled(SvgLinkStroke).attrs({
|
|
489
|
-
'data-garden-id': COMPONENT_ID$
|
|
490
|
-
'data-garden-version': '8.
|
|
479
|
+
'data-garden-id': COMPONENT_ID$r,
|
|
480
|
+
'data-garden-version': '8.47.2'
|
|
491
481
|
}).withConfig({
|
|
492
482
|
displayName: "StyledSkipNavIcon",
|
|
493
483
|
componentId: "sc-1ika5z4-0"
|
|
@@ -498,35 +488,35 @@ var StyledSkipNavIcon = styled(SvgLinkStroke).attrs({
|
|
|
498
488
|
}, function (props) {
|
|
499
489
|
return sizeStyles$1(props.theme);
|
|
500
490
|
}, function (props) {
|
|
501
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
491
|
+
return retrieveComponentStyles(COMPONENT_ID$r, props);
|
|
502
492
|
});
|
|
503
493
|
StyledSkipNavIcon.defaultProps = {
|
|
504
494
|
theme: DEFAULT_THEME
|
|
505
495
|
};
|
|
506
496
|
|
|
507
|
-
var COMPONENT_ID$
|
|
497
|
+
var COMPONENT_ID$q = 'chrome.body';
|
|
508
498
|
var StyledBody = styled.div.attrs({
|
|
509
|
-
'data-garden-id': COMPONENT_ID$
|
|
510
|
-
'data-garden-version': '8.
|
|
499
|
+
'data-garden-id': COMPONENT_ID$q,
|
|
500
|
+
'data-garden-version': '8.47.2'
|
|
511
501
|
}).withConfig({
|
|
512
502
|
displayName: "StyledBody",
|
|
513
503
|
componentId: "sc-c7h9kv-0"
|
|
514
504
|
})(["flex:1;order:1;background-color:", ";min-width:0;", ";"], function (props) {
|
|
515
505
|
return getColor('neutralHue', 100, props.theme);
|
|
516
506
|
}, function (props) {
|
|
517
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
507
|
+
return retrieveComponentStyles(COMPONENT_ID$q, props);
|
|
518
508
|
});
|
|
519
509
|
StyledBody.defaultProps = {
|
|
520
510
|
theme: DEFAULT_THEME
|
|
521
511
|
};
|
|
522
512
|
|
|
523
|
-
var COMPONENT_ID$
|
|
513
|
+
var COMPONENT_ID$p = 'chrome.footer';
|
|
524
514
|
var getFooterHeight = function getFooterHeight(props) {
|
|
525
515
|
return "".concat(props.theme.space.base * 20, "px");
|
|
526
516
|
};
|
|
527
517
|
var StyledFooter = styled.footer.attrs({
|
|
528
|
-
'data-garden-id': COMPONENT_ID$
|
|
529
|
-
'data-garden-version': '8.
|
|
518
|
+
'data-garden-id': COMPONENT_ID$p,
|
|
519
|
+
'data-garden-version': '8.47.2'
|
|
530
520
|
}).withConfig({
|
|
531
521
|
displayName: "StyledFooter",
|
|
532
522
|
componentId: "sc-v7lib2-0"
|
|
@@ -537,16 +527,16 @@ var StyledFooter = styled.footer.attrs({
|
|
|
537
527
|
}, function (props) {
|
|
538
528
|
return props.theme.space.base * 9;
|
|
539
529
|
}, getFooterHeight, function (props) {
|
|
540
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
530
|
+
return retrieveComponentStyles(COMPONENT_ID$p, props);
|
|
541
531
|
});
|
|
542
532
|
StyledFooter.defaultProps = {
|
|
543
533
|
theme: DEFAULT_THEME
|
|
544
534
|
};
|
|
545
535
|
|
|
546
|
-
var COMPONENT_ID$
|
|
536
|
+
var COMPONENT_ID$o = 'chrome.content';
|
|
547
537
|
var StyledContent = styled.div.attrs({
|
|
548
|
-
'data-garden-id': COMPONENT_ID$
|
|
549
|
-
'data-garden-version': '8.
|
|
538
|
+
'data-garden-id': COMPONENT_ID$o,
|
|
539
|
+
'data-garden-version': '8.47.2'
|
|
550
540
|
}).withConfig({
|
|
551
541
|
displayName: "StyledContent",
|
|
552
542
|
componentId: "sc-qcuzxn-0"
|
|
@@ -559,32 +549,32 @@ var StyledContent = styled.div.attrs({
|
|
|
559
549
|
}, function (props) {
|
|
560
550
|
return props.theme.fontSizes.md;
|
|
561
551
|
}, function (props) {
|
|
562
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
552
|
+
return retrieveComponentStyles(COMPONENT_ID$o, props);
|
|
563
553
|
});
|
|
564
554
|
StyledContent.defaultProps = {
|
|
565
555
|
theme: DEFAULT_THEME
|
|
566
556
|
};
|
|
567
557
|
|
|
568
|
-
var COMPONENT_ID$
|
|
558
|
+
var COMPONENT_ID$n = 'chrome.main';
|
|
569
559
|
var StyledMain = styled.main.attrs({
|
|
570
|
-
'data-garden-id': COMPONENT_ID$
|
|
571
|
-
'data-garden-version': '8.
|
|
560
|
+
'data-garden-id': COMPONENT_ID$n,
|
|
561
|
+
'data-garden-version': '8.47.2'
|
|
572
562
|
}).withConfig({
|
|
573
563
|
displayName: "StyledMain",
|
|
574
564
|
componentId: "sc-t61cre-0"
|
|
575
565
|
})(["flex:1;order:1;background-color:", ";overflow:auto;:focus{outline:none;}", ";"], function (props) {
|
|
576
566
|
return props.theme.colors.background;
|
|
577
567
|
}, function (props) {
|
|
578
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
568
|
+
return retrieveComponentStyles(COMPONENT_ID$n, props);
|
|
579
569
|
});
|
|
580
570
|
StyledMain.defaultProps = {
|
|
581
571
|
theme: DEFAULT_THEME
|
|
582
572
|
};
|
|
583
573
|
|
|
584
|
-
var COMPONENT_ID$
|
|
574
|
+
var COMPONENT_ID$m = 'chrome.sidebar';
|
|
585
575
|
var StyledSidebar = styled.aside.attrs({
|
|
586
|
-
'data-garden-id': COMPONENT_ID$
|
|
587
|
-
'data-garden-version': '8.
|
|
576
|
+
'data-garden-id': COMPONENT_ID$m,
|
|
577
|
+
'data-garden-version': '8.47.2'
|
|
588
578
|
}).withConfig({
|
|
589
579
|
displayName: "StyledSidebar",
|
|
590
580
|
componentId: "sc-1q77fuw-0"
|
|
@@ -593,36 +583,36 @@ var StyledSidebar = styled.aside.attrs({
|
|
|
593
583
|
}, function (props) {
|
|
594
584
|
return "".concat(props.theme.borders.sm, " ").concat(getColor('neutralHue', 300, props.theme));
|
|
595
585
|
}, function (props) {
|
|
596
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
586
|
+
return retrieveComponentStyles(COMPONENT_ID$m, props);
|
|
597
587
|
});
|
|
598
588
|
StyledSidebar.defaultProps = {
|
|
599
589
|
theme: DEFAULT_THEME
|
|
600
590
|
};
|
|
601
591
|
|
|
602
|
-
var COMPONENT_ID$
|
|
592
|
+
var COMPONENT_ID$l = 'chrome.footer_item';
|
|
603
593
|
var StyledFooterItem = styled.div.attrs({
|
|
604
|
-
'data-garden-id': COMPONENT_ID$
|
|
605
|
-
'data-garden-version': '8.
|
|
594
|
+
'data-garden-id': COMPONENT_ID$l,
|
|
595
|
+
'data-garden-version': '8.47.2'
|
|
606
596
|
}).withConfig({
|
|
607
597
|
displayName: "StyledFooterItem",
|
|
608
598
|
componentId: "sc-1cktm85-0"
|
|
609
599
|
})(["margin:", ";", ";"], function (props) {
|
|
610
600
|
return "0 ".concat(props.theme.space.base, "px");
|
|
611
601
|
}, function (props) {
|
|
612
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
602
|
+
return retrieveComponentStyles(COMPONENT_ID$l, props);
|
|
613
603
|
});
|
|
614
604
|
StyledFooterItem.defaultProps = {
|
|
615
605
|
theme: DEFAULT_THEME
|
|
616
606
|
};
|
|
617
607
|
|
|
618
|
-
var COMPONENT_ID$
|
|
608
|
+
var COMPONENT_ID$k = 'chrome.header_item';
|
|
619
609
|
var imgStyles = function imgStyles(props) {
|
|
620
610
|
var size = math("".concat(getHeaderItemSize(props), " - ").concat(props.theme.space.base * 2));
|
|
621
611
|
return css(["img{margin:0;border-radius:", ";width:", ";height:", ";}"], math("".concat(props.theme.borderRadii.md, " - 1")), size, size);
|
|
622
612
|
};
|
|
623
613
|
var StyledHeaderItem = styled(StyledBaseHeaderItem).attrs({
|
|
624
|
-
'data-garden-id': COMPONENT_ID$
|
|
625
|
-
'data-garden-version': '8.
|
|
614
|
+
'data-garden-id': COMPONENT_ID$k,
|
|
615
|
+
'data-garden-version': '8.47.2'
|
|
626
616
|
}).withConfig({
|
|
627
617
|
displayName: "StyledHeaderItem",
|
|
628
618
|
componentId: "sc-14sft6n-0"
|
|
@@ -639,28 +629,28 @@ StyledHeaderItemText, function (props) {
|
|
|
639
629
|
}, imgStyles, function (props) {
|
|
640
630
|
return props.isRound && "\n ".concat(StyledHeaderItemIcon, " {\n border-radius: 100px;\n }\n ");
|
|
641
631
|
}, function (props) {
|
|
642
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
632
|
+
return retrieveComponentStyles(COMPONENT_ID$k, props);
|
|
643
633
|
});
|
|
644
634
|
StyledHeaderItem.defaultProps = {
|
|
645
635
|
theme: DEFAULT_THEME
|
|
646
636
|
};
|
|
647
637
|
|
|
648
|
-
var COMPONENT_ID$
|
|
638
|
+
var COMPONENT_ID$j = 'chrome.header_item_wrapper';
|
|
649
639
|
var StyledHeaderItemWrapper = styled(StyledBaseHeaderItem).attrs({
|
|
650
|
-
'data-garden-id': COMPONENT_ID$
|
|
651
|
-
'data-garden-version': '8.
|
|
640
|
+
'data-garden-id': COMPONENT_ID$j,
|
|
641
|
+
'data-garden-version': '8.47.2',
|
|
652
642
|
as: 'div'
|
|
653
643
|
}).withConfig({
|
|
654
644
|
displayName: "StyledHeaderItemWrapper",
|
|
655
645
|
componentId: "sc-1uieu55-0"
|
|
656
646
|
})(["", ";"], function (props) {
|
|
657
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
647
|
+
return retrieveComponentStyles(COMPONENT_ID$j, props);
|
|
658
648
|
});
|
|
659
649
|
StyledHeaderItemWrapper.defaultProps = {
|
|
660
650
|
theme: DEFAULT_THEME
|
|
661
651
|
};
|
|
662
652
|
|
|
663
|
-
var COMPONENT_ID$
|
|
653
|
+
var COMPONENT_ID$i = 'chrome.logo_nav_item';
|
|
664
654
|
var retrieveProductColor = function retrieveProductColor(product) {
|
|
665
655
|
switch (product) {
|
|
666
656
|
case 'chat':
|
|
@@ -681,29 +671,29 @@ var retrieveProductColor = function retrieveProductColor(product) {
|
|
|
681
671
|
return 'inherit';
|
|
682
672
|
}
|
|
683
673
|
};
|
|
684
|
-
var colorStyles$
|
|
674
|
+
var colorStyles$4 = function colorStyles(props) {
|
|
685
675
|
var fillColor = props.isLight ? props.theme.palette.grey[800] : props.theme.palette.white;
|
|
686
676
|
var color = props.isLight || props.isDark ? fillColor : retrieveProductColor(props.product);
|
|
687
677
|
return css(["color:", ";fill:", ";"], color, fillColor);
|
|
688
678
|
};
|
|
689
679
|
var StyledLogoNavItem = styled(StyledBaseNavItem).attrs({
|
|
690
|
-
'data-garden-id': COMPONENT_ID$
|
|
691
|
-
'data-garden-version': '8.
|
|
680
|
+
'data-garden-id': COMPONENT_ID$i,
|
|
681
|
+
'data-garden-version': '8.47.2',
|
|
692
682
|
as: 'div'
|
|
693
683
|
}).withConfig({
|
|
694
684
|
displayName: "StyledLogoNavItem",
|
|
695
685
|
componentId: "sc-saaydx-0"
|
|
696
686
|
})(["order:0;opacity:1;cursor:default;", ";"], function (props) {
|
|
697
|
-
return colorStyles$
|
|
687
|
+
return colorStyles$4(props);
|
|
698
688
|
});
|
|
699
689
|
StyledLogoNavItem.defaultProps = {
|
|
700
690
|
theme: DEFAULT_THEME
|
|
701
691
|
};
|
|
702
692
|
|
|
703
|
-
var COMPONENT_ID$
|
|
693
|
+
var COMPONENT_ID$h = 'chrome.brandmark_nav_item';
|
|
704
694
|
var StyledBrandmarkNavItem = styled(StyledBaseNavItem).attrs({
|
|
705
|
-
'data-garden-id': COMPONENT_ID$
|
|
706
|
-
'data-garden-version': '8.
|
|
695
|
+
'data-garden-id': COMPONENT_ID$h,
|
|
696
|
+
'data-garden-version': '8.47.2',
|
|
707
697
|
as: 'div'
|
|
708
698
|
}).withConfig({
|
|
709
699
|
displayName: "StyledBrandmarkNavItem",
|
|
@@ -713,10 +703,10 @@ StyledBrandmarkNavItem.defaultProps = {
|
|
|
713
703
|
theme: DEFAULT_THEME
|
|
714
704
|
};
|
|
715
705
|
|
|
716
|
-
var COMPONENT_ID$
|
|
706
|
+
var COMPONENT_ID$g = 'chrome.nav_item_icon';
|
|
717
707
|
var StyledNavItemIcon = styled.div.attrs({
|
|
718
|
-
'data-garden-id': COMPONENT_ID$
|
|
719
|
-
'data-garden-version': '8.
|
|
708
|
+
'data-garden-id': COMPONENT_ID$g,
|
|
709
|
+
'data-garden-version': '8.47.2'
|
|
720
710
|
}).withConfig({
|
|
721
711
|
displayName: "StyledNavItemIcon",
|
|
722
712
|
componentId: "sc-7w9rpt-0"
|
|
@@ -727,14 +717,14 @@ var StyledNavItemIcon = styled.div.attrs({
|
|
|
727
717
|
}, function (props) {
|
|
728
718
|
return props.theme.iconSizes.lg;
|
|
729
719
|
}, function (props) {
|
|
730
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
720
|
+
return retrieveComponentStyles(COMPONENT_ID$g, props);
|
|
731
721
|
});
|
|
732
722
|
StyledNavItemIcon.defaultProps = {
|
|
733
723
|
theme: DEFAULT_THEME
|
|
734
724
|
};
|
|
735
725
|
|
|
736
|
-
var COMPONENT_ID$
|
|
737
|
-
var colorStyles$
|
|
726
|
+
var COMPONENT_ID$f = 'chrome.nav_item';
|
|
727
|
+
var colorStyles$3 = function colorStyles(props) {
|
|
738
728
|
var BLACK = props.theme.palette.black;
|
|
739
729
|
var WHITE = props.theme.palette.white;
|
|
740
730
|
var currentColor;
|
|
@@ -755,8 +745,8 @@ var colorStyles$2 = function colorStyles(props) {
|
|
|
755
745
|
return css(["opacity:", ";background-color:", ";&:hover{opacity:1;background-color:", ";}&[data-garden-focus-visible]{opacity:1;box-shadow:inset ", ";}&:active{background-color:", ";}"], props.isCurrent ? 1 : 0.6, currentColor, hoverColor, props.theme.shadows.md(focusColor), activeColor);
|
|
756
746
|
};
|
|
757
747
|
var StyledNavItem = styled(StyledBaseNavItem).attrs({
|
|
758
|
-
'data-garden-id': COMPONENT_ID$
|
|
759
|
-
'data-garden-version': '8.
|
|
748
|
+
'data-garden-id': COMPONENT_ID$f,
|
|
749
|
+
'data-garden-version': '8.47.2',
|
|
760
750
|
as: 'button'
|
|
761
751
|
}).withConfig({
|
|
762
752
|
displayName: "StyledNavItem",
|
|
@@ -768,20 +758,20 @@ var StyledNavItem = styled(StyledBaseNavItem).attrs({
|
|
|
768
758
|
}, function (props) {
|
|
769
759
|
return props.isExpanded && 'inherit';
|
|
770
760
|
}, function (props) {
|
|
771
|
-
return colorStyles$
|
|
761
|
+
return colorStyles$3(props);
|
|
772
762
|
}, function (props) {
|
|
773
763
|
return props.isExpanded && "\n ".concat(StyledNavItemIcon, " {\n margin: 0 ").concat(math("(".concat(getNavWidth(props), " - ").concat(props.theme.iconSizes.lg, ") / 4")), ";\n }\n ");
|
|
774
764
|
}, function (props) {
|
|
775
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
765
|
+
return retrieveComponentStyles(COMPONENT_ID$f, props);
|
|
776
766
|
});
|
|
777
767
|
StyledNavItem.defaultProps = {
|
|
778
768
|
theme: DEFAULT_THEME
|
|
779
769
|
};
|
|
780
770
|
|
|
781
|
-
var COMPONENT_ID$
|
|
771
|
+
var COMPONENT_ID$e = 'chrome.nav_item_text';
|
|
782
772
|
var StyledNavItemText = styled.span.attrs({
|
|
783
|
-
'data-garden-id': COMPONENT_ID$
|
|
784
|
-
'data-garden-version': '8.
|
|
773
|
+
'data-garden-id': COMPONENT_ID$e,
|
|
774
|
+
'data-garden-version': '8.47.2'
|
|
785
775
|
}).withConfig({
|
|
786
776
|
displayName: "StyledNavItemText",
|
|
787
777
|
componentId: "sc-13m84xl-0"
|
|
@@ -794,14 +784,14 @@ var StyledNavItemText = styled.span.attrs({
|
|
|
794
784
|
}, function (props) {
|
|
795
785
|
return props.isExpanded && "\n ".concat(StyledNavItem, " > && {\n position: static;\n flex: 1;\n clip: auto;\n width: auto;\n height: auto;\n text-overflow: ellipsis;\n }\n ");
|
|
796
786
|
}, function (props) {
|
|
797
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
787
|
+
return retrieveComponentStyles(COMPONENT_ID$e, props);
|
|
798
788
|
});
|
|
799
789
|
StyledNavItemText.defaultProps = {
|
|
800
790
|
theme: DEFAULT_THEME
|
|
801
791
|
};
|
|
802
792
|
|
|
803
|
-
var COMPONENT_ID$
|
|
804
|
-
var colorStyles$
|
|
793
|
+
var COMPONENT_ID$d = 'chrome.subnav_item';
|
|
794
|
+
var colorStyles$2 = function colorStyles(props) {
|
|
805
795
|
var BLACK = props.theme.palette.black;
|
|
806
796
|
var WHITE = props.theme.palette.white;
|
|
807
797
|
var currentColor;
|
|
@@ -823,8 +813,8 @@ var getSubNavItemHeight = function getSubNavItemHeight(props) {
|
|
|
823
813
|
return "".concat(props.theme.space.base * 7.5, "px");
|
|
824
814
|
};
|
|
825
815
|
var StyledSubNavItem = styled.button.attrs({
|
|
826
|
-
'data-garden-id': COMPONENT_ID$
|
|
827
|
-
'data-garden-version': '8.
|
|
816
|
+
'data-garden-id': COMPONENT_ID$d,
|
|
817
|
+
'data-garden-version': '8.47.2'
|
|
828
818
|
}).withConfig({
|
|
829
819
|
displayName: "StyledSubNavItem",
|
|
830
820
|
componentId: "sc-1yg9dpx-0"
|
|
@@ -837,16 +827,16 @@ var StyledSubNavItem = styled.button.attrs({
|
|
|
837
827
|
}, function (props) {
|
|
838
828
|
return "0 ".concat(props.theme.space.base * 2, "px");
|
|
839
829
|
}, getSubNavItemHeight, function (props) {
|
|
840
|
-
return colorStyles$
|
|
830
|
+
return colorStyles$2(props);
|
|
841
831
|
}, function (props) {
|
|
842
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
832
|
+
return retrieveComponentStyles(COMPONENT_ID$d, props);
|
|
843
833
|
});
|
|
844
834
|
StyledSubNavItem.defaultProps = {
|
|
845
835
|
theme: DEFAULT_THEME
|
|
846
836
|
};
|
|
847
837
|
|
|
848
|
-
var COMPONENT_ID$
|
|
849
|
-
var colorStyles = function colorStyles(props) {
|
|
838
|
+
var COMPONENT_ID$c = 'chrome.subnav';
|
|
839
|
+
var colorStyles$1 = function colorStyles(props) {
|
|
850
840
|
var shade;
|
|
851
841
|
if (props.isLight) {
|
|
852
842
|
shade = 500;
|
|
@@ -858,8 +848,8 @@ var colorStyles = function colorStyles(props) {
|
|
|
858
848
|
return css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
859
849
|
};
|
|
860
850
|
var StyledSubNav = styled.nav.attrs({
|
|
861
|
-
'data-garden-id': COMPONENT_ID$
|
|
862
|
-
'data-garden-version': '8.
|
|
851
|
+
'data-garden-id': COMPONENT_ID$c,
|
|
852
|
+
'data-garden-version': '8.47.2'
|
|
863
853
|
}).withConfig({
|
|
864
854
|
displayName: "StyledSubNav",
|
|
865
855
|
componentId: "sc-19hjou6-0"
|
|
@@ -868,7 +858,7 @@ var StyledSubNav = styled.nav.attrs({
|
|
|
868
858
|
}, function (props) {
|
|
869
859
|
return props.theme.fontSizes.md;
|
|
870
860
|
}, function (props) {
|
|
871
|
-
return colorStyles(props);
|
|
861
|
+
return colorStyles$1(props);
|
|
872
862
|
}, StyledSubNavItem, function (props) {
|
|
873
863
|
return retrieveComponentStyles('chrome.subnav', props);
|
|
874
864
|
});
|
|
@@ -876,7 +866,7 @@ StyledSubNav.defaultProps = {
|
|
|
876
866
|
theme: DEFAULT_THEME
|
|
877
867
|
};
|
|
878
868
|
|
|
879
|
-
var COMPONENT_ID$
|
|
869
|
+
var COMPONENT_ID$b = 'chrome.subnav_item_text';
|
|
880
870
|
var sizeStyles = function sizeStyles(props) {
|
|
881
871
|
var baseLineHeight = props.theme.space.base * 5;
|
|
882
872
|
var verticalMargin = math("(".concat(getSubNavItemHeight(props), " - ").concat(baseLineHeight, ") / 2"));
|
|
@@ -884,8 +874,8 @@ var sizeStyles = function sizeStyles(props) {
|
|
|
884
874
|
return css(["margin:", " 0;line-height:", ";"], verticalMargin, lineHeight);
|
|
885
875
|
};
|
|
886
876
|
var StyledSubNavItemText = styled.span.attrs({
|
|
887
|
-
'data-garden-id': COMPONENT_ID$
|
|
888
|
-
'data-garden-version': '8.
|
|
877
|
+
'data-garden-id': COMPONENT_ID$b,
|
|
878
|
+
'data-garden-version': '8.47.2'
|
|
889
879
|
}).withConfig({
|
|
890
880
|
displayName: "StyledSubNavItemText",
|
|
891
881
|
componentId: "sc-1hy0pn7-0"
|
|
@@ -894,16 +884,16 @@ var StyledSubNavItemText = styled.span.attrs({
|
|
|
894
884
|
}, function (props) {
|
|
895
885
|
return sizeStyles(props);
|
|
896
886
|
}, function (props) {
|
|
897
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
887
|
+
return retrieveComponentStyles(COMPONENT_ID$b, props);
|
|
898
888
|
});
|
|
899
889
|
StyledSubNavItemText.defaultProps = {
|
|
900
890
|
theme: DEFAULT_THEME
|
|
901
891
|
};
|
|
902
892
|
|
|
903
|
-
var COMPONENT_ID$
|
|
893
|
+
var COMPONENT_ID$a = 'chrome.collapsible_sub_nav_item';
|
|
904
894
|
var StyledSubNavItemHeader = styled(StyledSubNavItem).attrs({
|
|
905
|
-
'data-garden-id': COMPONENT_ID$
|
|
906
|
-
'data-garden-version': '8.
|
|
895
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
896
|
+
'data-garden-version': '8.47.2',
|
|
907
897
|
'data-garden-header': 'true'
|
|
908
898
|
}).withConfig({
|
|
909
899
|
displayName: "StyledSubNavItemHeader",
|
|
@@ -913,37 +903,37 @@ var StyledSubNavItemHeader = styled(StyledSubNavItem).attrs({
|
|
|
913
903
|
}, function (props) {
|
|
914
904
|
return props.theme.space.base * 7;
|
|
915
905
|
}, function (props) {
|
|
916
|
-
return retrieveComponentStyles(COMPONENT_ID$
|
|
906
|
+
return retrieveComponentStyles(COMPONENT_ID$a, props);
|
|
917
907
|
});
|
|
918
908
|
StyledSubNavItemHeader.defaultProps = {
|
|
919
909
|
theme: DEFAULT_THEME
|
|
920
910
|
};
|
|
921
911
|
|
|
922
|
-
|
|
912
|
+
var _path$1;
|
|
923
913
|
|
|
924
|
-
var
|
|
925
|
-
fill: "currentColor",
|
|
926
|
-
d: "M1.646 3.646a.5.5 0 01.638-.057l.07.057L6 7.293l3.646-3.647a.5.5 0 01.638-.057l.07.057a.5.5 0 01.057.638l-.057.07-4 4a.5.5 0 01-.638.057l-.07-.057-4-4a.5.5 0 010-.708z"
|
|
927
|
-
});
|
|
914
|
+
function _extends$1() { _extends$1 = Object.assign || 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); }
|
|
928
915
|
|
|
929
|
-
function SvgChevronDownStroke(props) {
|
|
930
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
916
|
+
var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
917
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
931
918
|
xmlns: "http://www.w3.org/2000/svg",
|
|
932
919
|
width: 12,
|
|
933
920
|
height: 12,
|
|
934
|
-
viewBox: "0 0 12 12",
|
|
935
921
|
focusable: "false",
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
}
|
|
922
|
+
viewBox: "0 0 12 12",
|
|
923
|
+
"aria-hidden": "true"
|
|
924
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
925
|
+
fill: "currentColor",
|
|
926
|
+
d: "M1.646 3.646a.5.5 0 01.638-.057l.07.057L6 7.293l3.646-3.647a.5.5 0 01.638-.057l.07.057a.5.5 0 01.057.638l-.057.07-4 4a.5.5 0 01-.638.057l-.07-.057-4-4a.5.5 0 010-.708z"
|
|
927
|
+
})));
|
|
928
|
+
};
|
|
939
929
|
|
|
940
|
-
var _excluded$
|
|
941
|
-
var COMPONENT_ID = 'chrome.collapsible_sub_nav_item_icon';
|
|
930
|
+
var _excluded$b = ["theme", "isExpanded"];
|
|
931
|
+
var COMPONENT_ID$9 = 'chrome.collapsible_sub_nav_item_icon';
|
|
942
932
|
var FilteredChevronDownStrokeIcon = React__default.forwardRef(function (_ref, ref) {
|
|
943
933
|
_ref.theme;
|
|
944
934
|
_ref.isExpanded;
|
|
945
|
-
var validProps = _objectWithoutProperties(_ref, _excluded$
|
|
946
|
-
return React__default.createElement(SvgChevronDownStroke, _extends$
|
|
935
|
+
var validProps = _objectWithoutProperties(_ref, _excluded$b);
|
|
936
|
+
return React__default.createElement(SvgChevronDownStroke, _extends$3({
|
|
947
937
|
ref: ref
|
|
948
938
|
}, validProps));
|
|
949
939
|
});
|
|
@@ -960,8 +950,8 @@ StyledSubNavItemIcon.defaultProps = {
|
|
|
960
950
|
theme: DEFAULT_THEME
|
|
961
951
|
};
|
|
962
952
|
var StyledSubNavItemIconWrapper = styled.div.attrs({
|
|
963
|
-
'data-garden-id': COMPONENT_ID,
|
|
964
|
-
'data-garden-version': '8.
|
|
953
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
954
|
+
'data-garden-version': '8.47.2'
|
|
965
955
|
}).withConfig({
|
|
966
956
|
displayName: "StyledSubNavItemIcon__StyledSubNavItemIconWrapper",
|
|
967
957
|
componentId: "sc-1d02hho-1"
|
|
@@ -977,7 +967,7 @@ var StyledSubNavItemIconWrapper = styled.div.attrs({
|
|
|
977
967
|
}
|
|
978
968
|
return undefined;
|
|
979
969
|
}, function (props) {
|
|
980
|
-
return retrieveComponentStyles(COMPONENT_ID, props);
|
|
970
|
+
return retrieveComponentStyles(COMPONENT_ID$9, props);
|
|
981
971
|
});
|
|
982
972
|
StyledSubNavItemIconWrapper.defaultProps = {
|
|
983
973
|
theme: DEFAULT_THEME
|
|
@@ -987,7 +977,7 @@ var PANEL_COMPONENT_ID = 'chrome.collapsible_sub_nav_item_panel';
|
|
|
987
977
|
var hiddenStyling = css(["visibility:hidden;max-height:0 !important;overflow:hidden;"]);
|
|
988
978
|
var StyledSubNavPanel = styled.div.attrs({
|
|
989
979
|
'data-garden-id': PANEL_COMPONENT_ID,
|
|
990
|
-
'data-garden-version': '8.
|
|
980
|
+
'data-garden-version': '8.47.2'
|
|
991
981
|
}).withConfig({
|
|
992
982
|
displayName: "StyledSubNavPanel",
|
|
993
983
|
componentId: "sc-1jv3rpv-0"
|
|
@@ -1004,11 +994,224 @@ StyledSubNavPanel.defaultProps = {
|
|
|
1004
994
|
theme: DEFAULT_THEME
|
|
1005
995
|
};
|
|
1006
996
|
|
|
1007
|
-
var
|
|
997
|
+
var COMPONENT_ID$8 = 'chrome.sheet';
|
|
998
|
+
var borderStyle = function borderStyle(_ref) {
|
|
999
|
+
var theme = _ref.theme,
|
|
1000
|
+
placement = _ref.placement,
|
|
1001
|
+
isOpen = _ref.isOpen;
|
|
1002
|
+
var borderColor = isOpen ? getColor('neutralHue', 300, theme) : 'transparent';
|
|
1003
|
+
var borderSides = ['-left', '-right'];
|
|
1004
|
+
var borderSide = '';
|
|
1005
|
+
if (theme.rtl) {
|
|
1006
|
+
borderSides.reverse();
|
|
1007
|
+
}
|
|
1008
|
+
if (placement === 'end') {
|
|
1009
|
+
borderSide = borderSides[0];
|
|
1010
|
+
} else if (placement === 'start') {
|
|
1011
|
+
borderSide = borderSides[1];
|
|
1012
|
+
}
|
|
1013
|
+
return "border".concat(borderSide, ": ").concat(theme.borders.sm, " ").concat(borderColor, ";");
|
|
1014
|
+
};
|
|
1015
|
+
var StyledSheet = styled.aside.attrs({
|
|
1016
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
1017
|
+
'data-garden-version': '8.47.2'
|
|
1018
|
+
}).withConfig({
|
|
1019
|
+
displayName: "StyledSheet",
|
|
1020
|
+
componentId: "sc-dx8ijk-0"
|
|
1021
|
+
})(["display:flex;order:1;transition:", ";background-color:", ";width:", ";height:100%;overflow:hidden;font-size:", ";&:focus{outline:none;}", ";", ";"], function (props) {
|
|
1022
|
+
return props.isAnimated && 'width 250ms ease-in-out';
|
|
1023
|
+
}, function (props) {
|
|
1024
|
+
return props.theme.colors.background;
|
|
1025
|
+
}, function (props) {
|
|
1026
|
+
return props.isOpen ? props.size : '0px';
|
|
1027
|
+
}, function (props) {
|
|
1028
|
+
return props.theme.fontSizes.md;
|
|
1029
|
+
}, function (props) {
|
|
1030
|
+
return borderStyle(props);
|
|
1031
|
+
}, function (props) {
|
|
1032
|
+
return retrieveComponentStyles(COMPONENT_ID$8, props);
|
|
1033
|
+
});
|
|
1034
|
+
StyledSheet.defaultProps = {
|
|
1035
|
+
theme: DEFAULT_THEME
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
var COMPONENT_ID$7 = 'chrome.sheet_wrapper';
|
|
1039
|
+
var StyledSheetWrapper = styled.div.attrs({
|
|
1040
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
1041
|
+
'data-garden-version': '8.47.2'
|
|
1042
|
+
}).withConfig({
|
|
1043
|
+
displayName: "StyledSheetWrapper",
|
|
1044
|
+
componentId: "sc-f6x9zb-0"
|
|
1045
|
+
})(["display:flex;position:relative;flex-direction:column;transform:", ";transition:", ";min-width:", ";", ";"], function (props) {
|
|
1046
|
+
var translateValues = [-100, 100];
|
|
1047
|
+
var translation = 'translateX(0%)';
|
|
1048
|
+
if (props.isOpen) {
|
|
1049
|
+
return translation;
|
|
1050
|
+
}
|
|
1051
|
+
if (props.theme.rtl) {
|
|
1052
|
+
translateValues.reverse();
|
|
1053
|
+
}
|
|
1054
|
+
if (props.placement === 'end') {
|
|
1055
|
+
translation = "translateX(".concat(translateValues[1], "%)");
|
|
1056
|
+
} else if (props.placement === 'start') {
|
|
1057
|
+
translation = "translateX(".concat(translateValues[0], "%)");
|
|
1058
|
+
}
|
|
1059
|
+
return translation;
|
|
1060
|
+
}, function (props) {
|
|
1061
|
+
return props.isAnimated && 'transform 250ms ease-in-out';
|
|
1062
|
+
}, function (props) {
|
|
1063
|
+
return props.size;
|
|
1064
|
+
}, function (props) {
|
|
1065
|
+
return retrieveComponentStyles(COMPONENT_ID$7, props);
|
|
1066
|
+
});
|
|
1067
|
+
StyledSheetWrapper.defaultProps = {
|
|
1068
|
+
theme: DEFAULT_THEME
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
var COMPONENT_ID$6 = 'chrome.sheet_title';
|
|
1072
|
+
var StyledSheetTitle = styled.div.attrs({
|
|
1073
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
1074
|
+
'data-garden-version': '8.47.2'
|
|
1075
|
+
}).withConfig({
|
|
1076
|
+
displayName: "StyledSheetTitle",
|
|
1077
|
+
componentId: "sc-1gogk75-0"
|
|
1078
|
+
})(["line-height:", ";color:", ";font-weight:", ";", ";"], function (props) {
|
|
1079
|
+
return getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
1080
|
+
}, function (props) {
|
|
1081
|
+
return props.theme.colors.foreground;
|
|
1082
|
+
}, function (props) {
|
|
1083
|
+
return props.theme.fontWeights.semibold;
|
|
1084
|
+
}, function (props) {
|
|
1085
|
+
return retrieveComponentStyles(COMPONENT_ID$6, props);
|
|
1086
|
+
});
|
|
1087
|
+
StyledSheetTitle.defaultProps = {
|
|
1088
|
+
theme: DEFAULT_THEME
|
|
1089
|
+
};
|
|
1090
|
+
|
|
1091
|
+
var COMPONENT_ID$5 = 'chrome.sheet_description';
|
|
1092
|
+
var StyledSheetDescription = styled.div.attrs({
|
|
1093
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
1094
|
+
'data-garden-version': '8.47.2'
|
|
1095
|
+
}).withConfig({
|
|
1096
|
+
displayName: "StyledSheetDescription",
|
|
1097
|
+
componentId: "sc-1puglb6-0"
|
|
1098
|
+
})(["line-height:", ";color:", ";", ";"], function (props) {
|
|
1099
|
+
return getLineHeight(props.theme.space.base * 4, props.theme.fontSizes.md);
|
|
1100
|
+
}, function (props) {
|
|
1101
|
+
return getColor('neutralHue', 600, props.theme);
|
|
1102
|
+
}, function (props) {
|
|
1103
|
+
return retrieveComponentStyles(COMPONENT_ID$5, props);
|
|
1104
|
+
});
|
|
1105
|
+
StyledSheetDescription.defaultProps = {
|
|
1106
|
+
theme: DEFAULT_THEME
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
var COMPONENT_ID$4 = 'chrome.sheet_body';
|
|
1110
|
+
var StyledSheetBody = styled.div.attrs({
|
|
1111
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
1112
|
+
'data-garden-version': '8.47.2'
|
|
1113
|
+
}).withConfig({
|
|
1114
|
+
displayName: "StyledSheetBody",
|
|
1115
|
+
componentId: "sc-bt4eoj-0"
|
|
1116
|
+
})(["flex:1;overflow-y:auto;padding:", "px;", ";"], function (props) {
|
|
1117
|
+
return props.theme.space.base * 5;
|
|
1118
|
+
}, function (props) {
|
|
1119
|
+
return retrieveComponentStyles(COMPONENT_ID$4, props);
|
|
1120
|
+
});
|
|
1121
|
+
StyledSheetBody.defaultProps = {
|
|
1122
|
+
theme: DEFAULT_THEME
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
var COMPONENT_ID$3 = 'chrome.sheet_close';
|
|
1126
|
+
var colorStyles = function colorStyles(props) {
|
|
1127
|
+
var backgroundColor = 'primaryHue';
|
|
1128
|
+
var foregroundColor = 'neutralHue';
|
|
1129
|
+
return css(["background-color:transparent;color:", ";&:hover{background-color:", ";color:", ";}&[data-garden-focus-visible]{box-shadow:", ";}&:active{transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;background-color:", ";color:", ";}"], getColor(foregroundColor, 600, props.theme), getColor(backgroundColor, 600, props.theme, 0.08), getColor(foregroundColor, 700, props.theme), props.theme.shadows.md(getColor(backgroundColor, 600, props.theme, 0.35)), getColor(backgroundColor, 600, props.theme, 0.2), getColor(foregroundColor, 800, props.theme));
|
|
1130
|
+
};
|
|
1131
|
+
var StyledSheetClose = styled.button.attrs({
|
|
1132
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
1133
|
+
'data-garden-version': '8.47.2'
|
|
1134
|
+
}).withConfig({
|
|
1135
|
+
displayName: "StyledSheetClose",
|
|
1136
|
+
componentId: "sc-1ab02oq-0"
|
|
1137
|
+
})(["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;}&:focus{outline:none;}", ";& > svg{vertical-align:middle;}", ";"], function (props) {
|
|
1138
|
+
return props.theme.space.base * 2.5;
|
|
1139
|
+
}, function (props) {
|
|
1140
|
+
return props.theme.rtl ? 'left' : 'right';
|
|
1141
|
+
}, function (props) {
|
|
1142
|
+
return "".concat(props.theme.space.base * 2, "px");
|
|
1143
|
+
}, function (props) {
|
|
1144
|
+
return props.theme.space.base * 10;
|
|
1145
|
+
}, function (props) {
|
|
1146
|
+
return props.theme.space.base * 10;
|
|
1147
|
+
}, function (props) {
|
|
1148
|
+
return colorStyles(props);
|
|
1149
|
+
}, function (props) {
|
|
1150
|
+
return retrieveComponentStyles(COMPONENT_ID$3, props);
|
|
1151
|
+
});
|
|
1152
|
+
StyledSheetClose.defaultProps = {
|
|
1153
|
+
theme: DEFAULT_THEME
|
|
1154
|
+
};
|
|
1155
|
+
|
|
1156
|
+
var COMPONENT_ID$2 = 'chrome.sheet_footer';
|
|
1157
|
+
var StyledSheetFooter = styled.footer.attrs({
|
|
1158
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
1159
|
+
'data-garden-version': '8.47.2'
|
|
1160
|
+
}).withConfig({
|
|
1161
|
+
displayName: "StyledSheetFooter",
|
|
1162
|
+
componentId: "sc-2cktos-0"
|
|
1163
|
+
})(["display:flex;flex-flow:row wrap;align-items:center;justify-content:", ";border-top:", ";padding:", "px;", ";"], function (props) {
|
|
1164
|
+
return props.isCompact ? 'center' : 'flex-end';
|
|
1165
|
+
}, function (props) {
|
|
1166
|
+
return "".concat(props.theme.borders.sm, " ").concat(getColor('neutralHue', 300, props.theme), "}");
|
|
1167
|
+
}, function (props) {
|
|
1168
|
+
return props.theme.space.base * (props.isCompact ? 2.5 : 5);
|
|
1169
|
+
}, function (props) {
|
|
1170
|
+
return retrieveComponentStyles(COMPONENT_ID$2, props);
|
|
1171
|
+
});
|
|
1172
|
+
StyledSheetFooter.defaultProps = {
|
|
1173
|
+
theme: DEFAULT_THEME
|
|
1174
|
+
};
|
|
1175
|
+
|
|
1176
|
+
var COMPONENT_ID$1 = 'chrome.sheet_footer_item';
|
|
1177
|
+
var StyledSheetFooterItem = styled.div.attrs({
|
|
1178
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
1179
|
+
'data-garden-version': '8.47.2'
|
|
1180
|
+
}).withConfig({
|
|
1181
|
+
displayName: "StyledSheetFooterItem",
|
|
1182
|
+
componentId: "sc-r9ixh-0"
|
|
1183
|
+
})(["", " ", ";"], function (props) {
|
|
1184
|
+
return "margin-".concat(props.theme.rtl ? 'right' : 'left', ": ").concat(props.theme.space.base * 5, "px;");
|
|
1185
|
+
}, function (props) {
|
|
1186
|
+
return retrieveComponentStyles(COMPONENT_ID$1, props);
|
|
1187
|
+
});
|
|
1188
|
+
StyledSheetFooterItem.defaultProps = {
|
|
1189
|
+
theme: DEFAULT_THEME
|
|
1190
|
+
};
|
|
1191
|
+
|
|
1192
|
+
var COMPONENT_ID = 'chrome.sheet_header';
|
|
1193
|
+
var StyledSheetHeader = styled.header.attrs({
|
|
1194
|
+
'data-garden-id': COMPONENT_ID,
|
|
1195
|
+
'data-garden-version': '8.47.2'
|
|
1196
|
+
}).withConfig({
|
|
1197
|
+
displayName: "StyledSheetHeader",
|
|
1198
|
+
componentId: "sc-o2ry8i-0"
|
|
1199
|
+
})(["border-bottom:", ";padding:", "px;", ";"], function (props) {
|
|
1200
|
+
return "".concat(props.theme.borders.sm, " ").concat(getColor('neutralHue', 300, props.theme), "}");
|
|
1201
|
+
}, function (props) {
|
|
1202
|
+
return props.theme.space.base * 5;
|
|
1203
|
+
}, function (props) {
|
|
1204
|
+
return retrieveComponentStyles(COMPONENT_ID, props);
|
|
1205
|
+
});
|
|
1206
|
+
StyledSheetHeader.defaultProps = {
|
|
1207
|
+
theme: DEFAULT_THEME
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
var _excluded$a = ["hue", "isFluid"];
|
|
1008
1211
|
var Chrome = React__default.forwardRef(function (_ref, ref) {
|
|
1009
1212
|
var hue = _ref.hue,
|
|
1010
1213
|
isFluid = _ref.isFluid,
|
|
1011
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1214
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
1012
1215
|
var theme = useContext(ThemeContext);
|
|
1013
1216
|
var isLightMemoized = useMemo(function () {
|
|
1014
1217
|
if (hue) {
|
|
@@ -1044,7 +1247,7 @@ var Chrome = React__default.forwardRef(function (_ref, ref) {
|
|
|
1044
1247
|
}, [environment, isFluid]);
|
|
1045
1248
|
return React__default.createElement(ChromeContext.Provider, {
|
|
1046
1249
|
value: chromeContextValue
|
|
1047
|
-
}, React__default.createElement(StyledChrome, _extends$
|
|
1250
|
+
}, React__default.createElement(StyledChrome, _extends$3({
|
|
1048
1251
|
ref: ref
|
|
1049
1252
|
}, props)));
|
|
1050
1253
|
});
|
|
@@ -1053,13 +1256,13 @@ Chrome.propTypes = {
|
|
|
1053
1256
|
hue: PropTypes.string
|
|
1054
1257
|
};
|
|
1055
1258
|
|
|
1056
|
-
var _excluded$
|
|
1259
|
+
var _excluded$9 = ["targetId", "zIndex", "children"];
|
|
1057
1260
|
var SkipNav = React__default.forwardRef(function (_ref, ref) {
|
|
1058
1261
|
var targetId = _ref.targetId,
|
|
1059
1262
|
zIndex = _ref.zIndex,
|
|
1060
1263
|
children = _ref.children,
|
|
1061
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1062
|
-
return React__default.createElement(StyledSkipNav, _extends$
|
|
1264
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
1265
|
+
return React__default.createElement(StyledSkipNav, _extends$3({
|
|
1063
1266
|
href: "#".concat(targetId),
|
|
1064
1267
|
zIndex: zIndex,
|
|
1065
1268
|
ref: ref
|
|
@@ -1081,10 +1284,10 @@ var useBodyContext = function useBodyContext() {
|
|
|
1081
1284
|
return useContext(BodyContext);
|
|
1082
1285
|
};
|
|
1083
1286
|
|
|
1084
|
-
var _excluded$
|
|
1287
|
+
var _excluded$8 = ["hasFooter"];
|
|
1085
1288
|
var Body = React__default.forwardRef(function (_ref, ref) {
|
|
1086
1289
|
var hasFooter = _ref.hasFooter,
|
|
1087
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1290
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
1088
1291
|
var bodyContextValue = useMemo(function () {
|
|
1089
1292
|
return {
|
|
1090
1293
|
hasFooter: !!hasFooter
|
|
@@ -1092,7 +1295,7 @@ var Body = React__default.forwardRef(function (_ref, ref) {
|
|
|
1092
1295
|
}, [hasFooter]);
|
|
1093
1296
|
return React__default.createElement(BodyContext.Provider, {
|
|
1094
1297
|
value: bodyContextValue
|
|
1095
|
-
}, React__default.createElement(StyledBody, _extends$
|
|
1298
|
+
}, React__default.createElement(StyledBody, _extends$3({
|
|
1096
1299
|
ref: ref
|
|
1097
1300
|
}, props)));
|
|
1098
1301
|
});
|
|
@@ -1104,7 +1307,7 @@ Body.propTypes = {
|
|
|
1104
1307
|
var Content = React__default.forwardRef(function (props, ref) {
|
|
1105
1308
|
var _useBodyContext = useBodyContext(),
|
|
1106
1309
|
hasFooter = _useBodyContext.hasFooter;
|
|
1107
|
-
return React__default.createElement(StyledContent, _extends$
|
|
1310
|
+
return React__default.createElement(StyledContent, _extends$3({
|
|
1108
1311
|
ref: ref,
|
|
1109
1312
|
hasFooter: hasFooter
|
|
1110
1313
|
}, props));
|
|
@@ -1112,21 +1315,21 @@ var Content = React__default.forwardRef(function (props, ref) {
|
|
|
1112
1315
|
Content.displayName = 'Content';
|
|
1113
1316
|
|
|
1114
1317
|
var Main = React__default.forwardRef(function (props, ref) {
|
|
1115
|
-
return React__default.createElement(StyledMain, _extends$
|
|
1318
|
+
return React__default.createElement(StyledMain, _extends$3({
|
|
1116
1319
|
ref: ref
|
|
1117
1320
|
}, props));
|
|
1118
1321
|
});
|
|
1119
1322
|
Main.displayName = 'Main';
|
|
1120
1323
|
|
|
1121
1324
|
var Sidebar = React__default.forwardRef(function (props, ref) {
|
|
1122
|
-
return React__default.createElement(StyledSidebar, _extends$
|
|
1325
|
+
return React__default.createElement(StyledSidebar, _extends$3({
|
|
1123
1326
|
ref: ref
|
|
1124
1327
|
}, props));
|
|
1125
1328
|
});
|
|
1126
1329
|
Sidebar.displayName = 'Sidebar';
|
|
1127
1330
|
|
|
1128
1331
|
var Header = React__default.forwardRef(function (props, ref) {
|
|
1129
|
-
return React__default.createElement(StyledHeader, _extends$
|
|
1332
|
+
return React__default.createElement(StyledHeader, _extends$3({
|
|
1130
1333
|
ref: ref
|
|
1131
1334
|
}, props));
|
|
1132
1335
|
});
|
|
@@ -1137,18 +1340,18 @@ Header.propTypes = {
|
|
|
1137
1340
|
|
|
1138
1341
|
var PRODUCTS = ['chat', 'connect', 'explore', 'guide', 'message', 'support', 'talk'];
|
|
1139
1342
|
|
|
1140
|
-
var _excluded$
|
|
1343
|
+
var _excluded$7 = ["hasLogo", "product"];
|
|
1141
1344
|
var HeaderItem = React__default.forwardRef(function (_ref, ref) {
|
|
1142
1345
|
var hasLogo = _ref.hasLogo,
|
|
1143
1346
|
product = _ref.product,
|
|
1144
|
-
other = _objectWithoutProperties(_ref, _excluded$
|
|
1347
|
+
other = _objectWithoutProperties(_ref, _excluded$7);
|
|
1145
1348
|
if (hasLogo) {
|
|
1146
|
-
return React__default.createElement(StyledLogoHeaderItem, _extends$
|
|
1349
|
+
return React__default.createElement(StyledLogoHeaderItem, _extends$3({
|
|
1147
1350
|
ref: ref,
|
|
1148
1351
|
product: product
|
|
1149
1352
|
}, other));
|
|
1150
1353
|
}
|
|
1151
|
-
return React__default.createElement(StyledHeaderItem, _extends$
|
|
1354
|
+
return React__default.createElement(StyledHeaderItem, _extends$3({
|
|
1152
1355
|
ref: ref
|
|
1153
1356
|
}, other));
|
|
1154
1357
|
});
|
|
@@ -1161,20 +1364,20 @@ HeaderItem.propTypes = {
|
|
|
1161
1364
|
hasLogo: PropTypes.bool
|
|
1162
1365
|
};
|
|
1163
1366
|
|
|
1164
|
-
var _excluded$
|
|
1367
|
+
var _excluded$6 = ["children"];
|
|
1165
1368
|
var HeaderItemIcon = function HeaderItemIcon(_ref) {
|
|
1166
1369
|
var children = _ref.children,
|
|
1167
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1370
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
1168
1371
|
var Element = function Element(elementProps) {
|
|
1169
1372
|
return React__default.cloneElement(Children.only(children), _objectSpread2(_objectSpread2({}, elementProps), props));
|
|
1170
1373
|
};
|
|
1171
|
-
return React__default.createElement(StyledHeaderItemIcon, _extends$
|
|
1374
|
+
return React__default.createElement(StyledHeaderItemIcon, _extends$3({
|
|
1172
1375
|
as: Element
|
|
1173
1376
|
}, props));
|
|
1174
1377
|
};
|
|
1175
1378
|
|
|
1176
1379
|
var HeaderItemText = React__default.forwardRef(function (props, ref) {
|
|
1177
|
-
return React__default.createElement(StyledHeaderItemText, _extends$
|
|
1380
|
+
return React__default.createElement(StyledHeaderItemText, _extends$3({
|
|
1178
1381
|
ref: ref
|
|
1179
1382
|
}, props));
|
|
1180
1383
|
});
|
|
@@ -1184,21 +1387,21 @@ HeaderItemText.propTypes = {
|
|
|
1184
1387
|
};
|
|
1185
1388
|
|
|
1186
1389
|
var HeaderItemWrapper = React__default.forwardRef(function (props, ref) {
|
|
1187
|
-
return React__default.createElement(StyledHeaderItemWrapper, _extends$
|
|
1390
|
+
return React__default.createElement(StyledHeaderItemWrapper, _extends$3({
|
|
1188
1391
|
ref: ref
|
|
1189
1392
|
}, props));
|
|
1190
1393
|
});
|
|
1191
1394
|
HeaderItemWrapper.displayName = 'HeaderItemWrapper';
|
|
1192
1395
|
|
|
1193
1396
|
var Footer = React__default.forwardRef(function (props, ref) {
|
|
1194
|
-
return React__default.createElement(StyledFooter, _extends$
|
|
1397
|
+
return React__default.createElement(StyledFooter, _extends$3({
|
|
1195
1398
|
ref: ref
|
|
1196
1399
|
}, props));
|
|
1197
1400
|
});
|
|
1198
1401
|
Footer.displayName = 'Footer';
|
|
1199
1402
|
|
|
1200
1403
|
var FooterItem = React__default.forwardRef(function (props, ref) {
|
|
1201
|
-
return React__default.createElement(StyledFooterItem, _extends$
|
|
1404
|
+
return React__default.createElement(StyledFooterItem, _extends$3({
|
|
1202
1405
|
ref: ref
|
|
1203
1406
|
}, props));
|
|
1204
1407
|
});
|
|
@@ -1223,7 +1426,7 @@ var Nav = React__default.forwardRef(function (props, ref) {
|
|
|
1223
1426
|
}, [props.isExpanded]);
|
|
1224
1427
|
return React__default.createElement(NavContext.Provider, {
|
|
1225
1428
|
value: navContextValue
|
|
1226
|
-
}, React__default.createElement(StyledNav, _extends$
|
|
1429
|
+
}, React__default.createElement(StyledNav, _extends$3({
|
|
1227
1430
|
ref: ref
|
|
1228
1431
|
}, props, {
|
|
1229
1432
|
hue: hue,
|
|
@@ -1236,12 +1439,12 @@ Nav.propTypes = {
|
|
|
1236
1439
|
isExpanded: PropTypes.bool
|
|
1237
1440
|
};
|
|
1238
1441
|
|
|
1239
|
-
var _excluded$
|
|
1442
|
+
var _excluded$5 = ["hasLogo", "hasBrandmark", "product"];
|
|
1240
1443
|
var NavItem = React__default.forwardRef(function (_ref, ref) {
|
|
1241
1444
|
var hasLogo = _ref.hasLogo,
|
|
1242
1445
|
hasBrandmark = _ref.hasBrandmark,
|
|
1243
1446
|
product = _ref.product,
|
|
1244
|
-
other = _objectWithoutProperties(_ref, _excluded$
|
|
1447
|
+
other = _objectWithoutProperties(_ref, _excluded$5);
|
|
1245
1448
|
var _useChromeContext = useChromeContext(),
|
|
1246
1449
|
hue = _useChromeContext.hue,
|
|
1247
1450
|
isLight = _useChromeContext.isLight,
|
|
@@ -1249,7 +1452,7 @@ var NavItem = React__default.forwardRef(function (_ref, ref) {
|
|
|
1249
1452
|
var _useNavContext = useNavContext(),
|
|
1250
1453
|
isExpanded = _useNavContext.isExpanded;
|
|
1251
1454
|
if (hasLogo) {
|
|
1252
|
-
return React__default.createElement(StyledLogoNavItem, _extends$
|
|
1455
|
+
return React__default.createElement(StyledLogoNavItem, _extends$3({
|
|
1253
1456
|
ref: ref,
|
|
1254
1457
|
isDark: isDark,
|
|
1255
1458
|
isLight: isLight,
|
|
@@ -1257,11 +1460,11 @@ var NavItem = React__default.forwardRef(function (_ref, ref) {
|
|
|
1257
1460
|
}, other));
|
|
1258
1461
|
}
|
|
1259
1462
|
if (hasBrandmark) {
|
|
1260
|
-
return React__default.createElement(StyledBrandmarkNavItem, _extends$
|
|
1463
|
+
return React__default.createElement(StyledBrandmarkNavItem, _extends$3({
|
|
1261
1464
|
ref: ref
|
|
1262
1465
|
}, other));
|
|
1263
1466
|
}
|
|
1264
|
-
return React__default.createElement(StyledNavItem, _extends$
|
|
1467
|
+
return React__default.createElement(StyledNavItem, _extends$3({
|
|
1265
1468
|
tabIndex: 0,
|
|
1266
1469
|
ref: ref,
|
|
1267
1470
|
isExpanded: isExpanded,
|
|
@@ -1278,14 +1481,14 @@ NavItem.propTypes = {
|
|
|
1278
1481
|
isCurrent: PropTypes.bool
|
|
1279
1482
|
};
|
|
1280
1483
|
|
|
1281
|
-
var _excluded$
|
|
1484
|
+
var _excluded$4 = ["children"];
|
|
1282
1485
|
var NavItemIcon = function NavItemIcon(_ref) {
|
|
1283
1486
|
var children = _ref.children,
|
|
1284
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1487
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1285
1488
|
var Element = function Element(elementProps) {
|
|
1286
1489
|
return React__default.cloneElement(Children.only(children), _objectSpread2(_objectSpread2({}, elementProps), props));
|
|
1287
1490
|
};
|
|
1288
|
-
return React__default.createElement(StyledNavItemIcon, _extends$
|
|
1491
|
+
return React__default.createElement(StyledNavItemIcon, _extends$3({
|
|
1289
1492
|
as: Element
|
|
1290
1493
|
}, props));
|
|
1291
1494
|
};
|
|
@@ -1293,7 +1496,7 @@ var NavItemIcon = function NavItemIcon(_ref) {
|
|
|
1293
1496
|
var NavItemText = React__default.forwardRef(function (props, ref) {
|
|
1294
1497
|
var _useNavContext = useNavContext(),
|
|
1295
1498
|
isExpanded = _useNavContext.isExpanded;
|
|
1296
|
-
return React__default.createElement(StyledNavItemText, _extends$
|
|
1499
|
+
return React__default.createElement(StyledNavItemText, _extends$3({
|
|
1297
1500
|
ref: ref,
|
|
1298
1501
|
isExpanded: isExpanded
|
|
1299
1502
|
}, props));
|
|
@@ -1308,7 +1511,7 @@ var SubNav = React__default.forwardRef(function (props, ref) {
|
|
|
1308
1511
|
hue = _useChromeContext.hue,
|
|
1309
1512
|
isLight = _useChromeContext.isLight,
|
|
1310
1513
|
isDark = _useChromeContext.isDark;
|
|
1311
|
-
return React__default.createElement(StyledSubNav, _extends$
|
|
1514
|
+
return React__default.createElement(StyledSubNav, _extends$3({
|
|
1312
1515
|
ref: ref,
|
|
1313
1516
|
hue: hue,
|
|
1314
1517
|
isLight: isLight,
|
|
@@ -1321,7 +1524,7 @@ var SubNavItem = React__default.forwardRef(function (props, ref) {
|
|
|
1321
1524
|
var _useChromeContext = useChromeContext(),
|
|
1322
1525
|
isDark = _useChromeContext.isDark,
|
|
1323
1526
|
isLight = _useChromeContext.isLight;
|
|
1324
|
-
return React__default.createElement(StyledSubNavItem, _extends$
|
|
1527
|
+
return React__default.createElement(StyledSubNavItem, _extends$3({
|
|
1325
1528
|
ref: ref,
|
|
1326
1529
|
isDark: isDark,
|
|
1327
1530
|
isLight: isLight
|
|
@@ -1333,7 +1536,7 @@ SubNavItem.propTypes = {
|
|
|
1333
1536
|
};
|
|
1334
1537
|
|
|
1335
1538
|
var SubNavItemText = React__default.forwardRef(function (props, ref) {
|
|
1336
|
-
return React__default.createElement(StyledSubNavItemText, _extends$
|
|
1539
|
+
return React__default.createElement(StyledSubNavItemText, _extends$3({
|
|
1337
1540
|
ref: ref
|
|
1338
1541
|
}, props));
|
|
1339
1542
|
});
|
|
@@ -1342,13 +1545,13 @@ SubNavItemText.propTypes = {
|
|
|
1342
1545
|
isWrapped: PropTypes.bool
|
|
1343
1546
|
};
|
|
1344
1547
|
|
|
1345
|
-
var _excluded = ["header", "children", "isExpanded", "onChange"];
|
|
1548
|
+
var _excluded$3 = ["header", "children", "isExpanded", "onChange"];
|
|
1346
1549
|
var CollapsibleSubNavItem = React__default.forwardRef(function (_ref, ref) {
|
|
1347
1550
|
var header = _ref.header,
|
|
1348
1551
|
children = _ref.children,
|
|
1349
1552
|
controlledExpanded = _ref.isExpanded,
|
|
1350
1553
|
_onChange = _ref.onChange,
|
|
1351
|
-
other = _objectWithoutProperties(_ref, _excluded);
|
|
1554
|
+
other = _objectWithoutProperties(_ref, _excluded$3);
|
|
1352
1555
|
var panelRef = useRef();
|
|
1353
1556
|
var _useState = useState(controlledExpanded),
|
|
1354
1557
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1398,5 +1601,200 @@ CollapsibleSubNavItem.propTypes = {
|
|
|
1398
1601
|
onChange: PropTypes.func,
|
|
1399
1602
|
children: PropTypes.node
|
|
1400
1603
|
};
|
|
1604
|
+
CollapsibleSubNavItem.displayName = 'CollapsibleSubNavItem';
|
|
1605
|
+
|
|
1606
|
+
var SheetContext = createContext({});
|
|
1607
|
+
var useSheetContext = function useSheetContext() {
|
|
1608
|
+
return useContext(SheetContext);
|
|
1609
|
+
};
|
|
1610
|
+
|
|
1611
|
+
function ownerDocument(node) {
|
|
1612
|
+
return node && node.ownerDocument || document;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
function activeElement(doc) {
|
|
1616
|
+
if (doc === void 0) {
|
|
1617
|
+
doc = ownerDocument();
|
|
1618
|
+
}
|
|
1619
|
+
try {
|
|
1620
|
+
var active = doc.activeElement;
|
|
1621
|
+
if (!active || !active.nodeName) return null;
|
|
1622
|
+
return active;
|
|
1623
|
+
} catch (e) {
|
|
1624
|
+
return doc.body;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
function useFocusableMount(_ref) {
|
|
1629
|
+
var isMounted = _ref.isMounted,
|
|
1630
|
+
focusOnMount = _ref.focusOnMount,
|
|
1631
|
+
restoreFocus = _ref.restoreFocus,
|
|
1632
|
+
targetRef = _ref.targetRef;
|
|
1633
|
+
var triggerRef = useRef();
|
|
1634
|
+
useEffect(function () {
|
|
1635
|
+
if (isMounted && focusOnMount && targetRef.current) {
|
|
1636
|
+
triggerRef.current = activeElement();
|
|
1637
|
+
targetRef.current.focus();
|
|
1638
|
+
}
|
|
1639
|
+
}, [isMounted, focusOnMount, targetRef]);
|
|
1640
|
+
useEffect(function () {
|
|
1641
|
+
if (!isMounted && restoreFocus && triggerRef.current) {
|
|
1642
|
+
triggerRef.current.focus();
|
|
1643
|
+
}
|
|
1644
|
+
}, [isMounted, restoreFocus, triggerRef]);
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
var _excluded$2 = ["id"];
|
|
1648
|
+
var SheetTitle = forwardRef(function (_ref, ref) {
|
|
1649
|
+
var id = _ref.id,
|
|
1650
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
1651
|
+
var _useSheetContext = useSheetContext(),
|
|
1652
|
+
titleId = _useSheetContext.titleId;
|
|
1653
|
+
return React__default.createElement(StyledSheetTitle, _extends$3({
|
|
1654
|
+
id: id || titleId,
|
|
1655
|
+
ref: ref
|
|
1656
|
+
}, props));
|
|
1657
|
+
});
|
|
1658
|
+
SheetTitle.displayName = 'Sheet.Title';
|
|
1659
|
+
|
|
1660
|
+
var _excluded$1 = ["id"];
|
|
1661
|
+
var SheetDescription = forwardRef(function (_ref, ref) {
|
|
1662
|
+
var id = _ref.id,
|
|
1663
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
1664
|
+
var _useSheetContext = useSheetContext(),
|
|
1665
|
+
descriptionId = _useSheetContext.descriptionId;
|
|
1666
|
+
return React__default.createElement(StyledSheetDescription, _extends$3({
|
|
1667
|
+
id: id || descriptionId,
|
|
1668
|
+
ref: ref
|
|
1669
|
+
}, props));
|
|
1670
|
+
});
|
|
1671
|
+
SheetDescription.displayName = 'Sheet.Description';
|
|
1672
|
+
|
|
1673
|
+
var SheetHeader = forwardRef(function (props, ref) {
|
|
1674
|
+
return React__default.createElement(StyledSheetHeader, _extends$3({
|
|
1675
|
+
ref: ref
|
|
1676
|
+
}, props));
|
|
1677
|
+
});
|
|
1678
|
+
SheetHeader.displayName = 'Sheet.Header';
|
|
1679
|
+
|
|
1680
|
+
var SheetBody = forwardRef(function (props, ref) {
|
|
1681
|
+
return React__default.createElement(StyledSheetBody, _extends$3({
|
|
1682
|
+
ref: ref
|
|
1683
|
+
}, props));
|
|
1684
|
+
});
|
|
1685
|
+
SheetBody.displayName = 'Sheet.Body';
|
|
1686
|
+
|
|
1687
|
+
var SheetFooter = forwardRef(function (props, ref) {
|
|
1688
|
+
return React__default.createElement(StyledSheetFooter, _extends$3({
|
|
1689
|
+
ref: ref
|
|
1690
|
+
}, props));
|
|
1691
|
+
});
|
|
1692
|
+
SheetFooter.displayName = 'Sheet.Footer';
|
|
1693
|
+
|
|
1694
|
+
var SheetFooterItem = forwardRef(function (props, ref) {
|
|
1695
|
+
return React__default.createElement(StyledSheetFooterItem, _extends$3({
|
|
1696
|
+
ref: ref
|
|
1697
|
+
}, props));
|
|
1698
|
+
});
|
|
1699
|
+
SheetFooterItem.displayName = 'Sheet.FooterItem';
|
|
1700
|
+
|
|
1701
|
+
var _path;
|
|
1702
|
+
|
|
1703
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
1704
|
+
|
|
1705
|
+
var SvgXStroke = function SvgXStroke(props) {
|
|
1706
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
1707
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1708
|
+
width: 16,
|
|
1709
|
+
height: 16,
|
|
1710
|
+
focusable: "false",
|
|
1711
|
+
viewBox: "0 0 16 16",
|
|
1712
|
+
"aria-hidden": "true"
|
|
1713
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
1714
|
+
stroke: "currentColor",
|
|
1715
|
+
strokeLinecap: "round",
|
|
1716
|
+
d: "M3 13L13 3m0 10L3 3"
|
|
1717
|
+
})));
|
|
1718
|
+
};
|
|
1401
1719
|
|
|
1402
|
-
|
|
1720
|
+
var SheetClose = forwardRef(function (props, ref) {
|
|
1721
|
+
return React__default.createElement(StyledSheetClose, _extends$3({
|
|
1722
|
+
"aria-label": "Close Sheet",
|
|
1723
|
+
ref: ref
|
|
1724
|
+
}, props), React__default.createElement(SvgXStroke, null));
|
|
1725
|
+
});
|
|
1726
|
+
SheetClose.displayName = 'Sheet.Close';
|
|
1727
|
+
|
|
1728
|
+
var _excluded = ["id", "isOpen", "isAnimated", "focusOnMount", "restoreFocus", "placement", "size", "children"];
|
|
1729
|
+
var Sheet = React__default.forwardRef(function (_ref, ref) {
|
|
1730
|
+
var id = _ref.id,
|
|
1731
|
+
isOpen = _ref.isOpen,
|
|
1732
|
+
isAnimated = _ref.isAnimated,
|
|
1733
|
+
focusOnMount = _ref.focusOnMount,
|
|
1734
|
+
restoreFocus = _ref.restoreFocus,
|
|
1735
|
+
placement = _ref.placement,
|
|
1736
|
+
size = _ref.size,
|
|
1737
|
+
children = _ref.children,
|
|
1738
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
1739
|
+
var sheetRef = useRef(null);
|
|
1740
|
+
var seed = useUIDSeed();
|
|
1741
|
+
var _useState = useState(id || seed("sheet_".concat('8.47.2'))),
|
|
1742
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
1743
|
+
idPrefix = _useState2[0];
|
|
1744
|
+
var titleId = "".concat(idPrefix, "--title");
|
|
1745
|
+
var descriptionId = "".concat(idPrefix, "--description");
|
|
1746
|
+
var sheetContext = useMemo(function () {
|
|
1747
|
+
return {
|
|
1748
|
+
titleId: titleId,
|
|
1749
|
+
descriptionId: descriptionId
|
|
1750
|
+
};
|
|
1751
|
+
}, [titleId, descriptionId]);
|
|
1752
|
+
useFocusableMount({
|
|
1753
|
+
targetRef: sheetRef,
|
|
1754
|
+
isMounted: isOpen,
|
|
1755
|
+
focusOnMount: focusOnMount,
|
|
1756
|
+
restoreFocus: restoreFocus
|
|
1757
|
+
});
|
|
1758
|
+
return React__default.createElement(SheetContext.Provider, {
|
|
1759
|
+
value: sheetContext
|
|
1760
|
+
}, React__default.createElement(StyledSheet, _extends$3({
|
|
1761
|
+
isOpen: isOpen,
|
|
1762
|
+
isAnimated: isAnimated,
|
|
1763
|
+
placement: placement,
|
|
1764
|
+
size: size,
|
|
1765
|
+
tabIndex: -1,
|
|
1766
|
+
id: idPrefix,
|
|
1767
|
+
"aria-labelledby": titleId,
|
|
1768
|
+
"aria-describedby": descriptionId,
|
|
1769
|
+
ref: mergeRefs([sheetRef, ref])
|
|
1770
|
+
}, props), React__default.createElement(StyledSheetWrapper, {
|
|
1771
|
+
isOpen: isOpen,
|
|
1772
|
+
isAnimated: isAnimated,
|
|
1773
|
+
placement: placement,
|
|
1774
|
+
size: size
|
|
1775
|
+
}, children)));
|
|
1776
|
+
});
|
|
1777
|
+
Sheet.Title = SheetTitle;
|
|
1778
|
+
Sheet.Description = SheetDescription;
|
|
1779
|
+
Sheet.Header = SheetHeader;
|
|
1780
|
+
Sheet.Body = SheetBody;
|
|
1781
|
+
Sheet.Footer = SheetFooter;
|
|
1782
|
+
Sheet.FooterItem = SheetFooterItem;
|
|
1783
|
+
Sheet.Close = SheetClose;
|
|
1784
|
+
Sheet.displayName = 'Sheet';
|
|
1785
|
+
Sheet.propTypes = {
|
|
1786
|
+
id: PropTypes.string,
|
|
1787
|
+
isOpen: PropTypes.bool,
|
|
1788
|
+
isAnimated: PropTypes.bool,
|
|
1789
|
+
focusOnMount: PropTypes.bool,
|
|
1790
|
+
restoreFocus: PropTypes.bool,
|
|
1791
|
+
placement: PropTypes.oneOf(['start', 'end']),
|
|
1792
|
+
size: PropTypes.string
|
|
1793
|
+
};
|
|
1794
|
+
Sheet.defaultProps = {
|
|
1795
|
+
isAnimated: true,
|
|
1796
|
+
placement: 'end',
|
|
1797
|
+
size: '380px'
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
export { Body, Chrome, CollapsibleSubNavItem, Content, Footer, FooterItem, Header, HeaderItem, HeaderItemIcon, HeaderItemText, HeaderItemWrapper, Main, Nav, NavItem, NavItemIcon, NavItemText, PRODUCTS, Sheet, Sidebar, SkipNav, SubNav, SubNavItem, SubNavItemText };
|