@atlaskit/navigation-system 11.5.0 → 11.6.1
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/CHANGELOG.md +20 -0
- package/dist/cjs/entry-points/top-nav-items/responsive-button.js +12 -0
- package/dist/cjs/ui/page-layout/calculate-layout-area-states.js +72 -23
- package/dist/cjs/ui/page-layout/chat-panel.js +1 -1
- package/dist/cjs/ui/page-layout/layout-overlay-clearance.js +61 -0
- package/dist/cjs/ui/page-layout/local-panel-surface.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/local-panel-surface.js +2 -1
- package/dist/cjs/ui/page-layout/panel-layout-shell.compiled.css +2 -1
- package/dist/cjs/ui/page-layout/panel-layout-shell.js +10 -3
- package/dist/cjs/ui/page-layout/panel-layout.js +5 -3
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +12 -5
- package/dist/cjs/ui/page-layout/root.compiled.css +5 -1
- package/dist/cjs/ui/page-layout/root.js +8 -2
- package/dist/cjs/ui/page-layout/side-nav/side-nav.js +2 -1
- package/dist/cjs/ui/page-layout/top-nav/use-is-compact-top-nav.js +16 -0
- package/dist/cjs/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/cjs/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/cjs/ui/top-nav-items/create-button.js +16 -1
- package/dist/cjs/ui/top-nav-items/responsive-button.js +38 -0
- package/dist/cjs/ui/top-nav-items/themed/icon-button.js +24 -4
- package/dist/cjs/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/cjs/ui/top-nav-items/themed/responsive-icon-button.js +33 -0
- package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.js +68 -55
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/es2019/entry-points/top-nav-items/responsive-button.js +1 -0
- package/dist/es2019/ui/page-layout/calculate-layout-area-states.js +60 -16
- package/dist/es2019/ui/page-layout/chat-panel.js +2 -1
- package/dist/es2019/ui/page-layout/layout-overlay-clearance.js +88 -0
- package/dist/es2019/ui/page-layout/local-panel-surface.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/local-panel-surface.js +2 -1
- package/dist/es2019/ui/page-layout/panel-layout-shell.compiled.css +2 -1
- package/dist/es2019/ui/page-layout/panel-layout-shell.js +14 -3
- package/dist/es2019/ui/page-layout/panel-layout.js +5 -3
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +12 -5
- package/dist/es2019/ui/page-layout/root.compiled.css +5 -1
- package/dist/es2019/ui/page-layout/root.js +8 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav.js +6 -1
- package/dist/es2019/ui/page-layout/top-nav/use-is-compact-top-nav.js +11 -0
- package/dist/es2019/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/es2019/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/es2019/ui/top-nav-items/create-button.js +16 -1
- package/dist/es2019/ui/top-nav-items/responsive-button.js +27 -0
- package/dist/es2019/ui/top-nav-items/themed/icon-button.js +23 -4
- package/dist/es2019/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/es2019/ui/top-nav-items/themed/responsive-icon-button.js +26 -0
- package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.js +63 -51
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/esm/entry-points/top-nav-items/responsive-button.js +1 -0
- package/dist/esm/ui/page-layout/calculate-layout-area-states.js +72 -23
- package/dist/esm/ui/page-layout/chat-panel.js +2 -2
- package/dist/esm/ui/page-layout/layout-overlay-clearance.js +55 -0
- package/dist/esm/ui/page-layout/local-panel-surface.compiled.css +1 -0
- package/dist/esm/ui/page-layout/local-panel-surface.js +2 -1
- package/dist/esm/ui/page-layout/panel-layout-shell.compiled.css +2 -1
- package/dist/esm/ui/page-layout/panel-layout-shell.js +10 -3
- package/dist/esm/ui/page-layout/panel-layout.js +5 -3
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +12 -5
- package/dist/esm/ui/page-layout/root.compiled.css +5 -1
- package/dist/esm/ui/page-layout/root.js +8 -2
- package/dist/esm/ui/page-layout/side-nav/side-nav.js +3 -2
- package/dist/esm/ui/page-layout/top-nav/use-is-compact-top-nav.js +11 -0
- package/dist/esm/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/esm/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/esm/ui/top-nav-items/create-button.js +16 -1
- package/dist/esm/ui/top-nav-items/responsive-button.js +29 -0
- package/dist/esm/ui/top-nav-items/themed/icon-button.js +24 -4
- package/dist/esm/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/esm/ui/top-nav-items/themed/responsive-icon-button.js +26 -0
- package/dist/esm/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/esm/ui/top-nav-items/themed/themed-icon-button.js +68 -55
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/types/entry-points/top-nav-items/responsive-button.d.ts +1 -0
- package/dist/types/ui/page-layout/layout-overlay-clearance.d.ts +9 -0
- package/dist/types/ui/page-layout/panel-layout-shell.d.ts +6 -1
- package/dist/types/ui/page-layout/panel-layout.d.ts +1 -1
- package/dist/types/ui/page-layout/top-nav/top-nav-element-context.d.ts +4 -0
- package/dist/types/ui/page-layout/top-nav/use-is-compact-top-nav.d.ts +6 -0
- package/dist/types/ui/page-layout/top-nav/use-top-nav-breakpoints.d.ts +4 -3
- package/dist/types/ui/top-nav-items/create-button.d.ts +2 -0
- package/dist/types/ui/top-nav-items/responsive-button.d.ts +23 -0
- package/dist/types/ui/top-nav-items/themed/icon-button.d.ts +1 -5
- package/dist/types/ui/top-nav-items/themed/responsive-icon-button.d.ts +10 -0
- package/dist/types/ui/top-nav-items/themed/themed-icon-button.d.ts +8 -0
- package/package.json +6 -5
- package/top-nav-items/responsive-button/package.json +10 -0
|
@@ -22,6 +22,7 @@ const localPanelSplitterId = Symbol('LocalPanel PanelSplitter');
|
|
|
22
22
|
const styles = {
|
|
23
23
|
panelWrapper: "_nd5l1gzg _kqsw1if8 _bfhk1bhr _vchhusvi _4t3ieqxy _152tidpf _10fph9n0 _1bsb13q4",
|
|
24
24
|
managedInline: "_nd5l1c6w _bfhkvuon _152tidpf _1bsb1c5w",
|
|
25
|
+
refinedUnmeasured: "_1bsb123g",
|
|
25
26
|
unmeasured: "_nd5l32aw _191wbqna _1bsb1cku _bfhk1g1j _16qs1dhr",
|
|
26
27
|
managedOverlay: "_nd5l1gzg _bfhk1bhr _1bsb1c5w",
|
|
27
28
|
panelScrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
@@ -163,7 +164,7 @@ export function LocalPanelSurface({
|
|
|
163
164
|
[localPanelVar]: `${renderedWidth}px`
|
|
164
165
|
},
|
|
165
166
|
ref: mergedRef,
|
|
166
|
-
className: ax([isMotionUpliftEnabled && state === 'entering' && styles.entering, isMotionUpliftEnabled && state === 'exiting' && styles.exiting, styles.panelWrapper, styles.border, !managedSizing && styles.unmeasured, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder])
|
|
167
|
+
className: ax([isMotionUpliftEnabled && state === 'entering' && styles.entering, isMotionUpliftEnabled && state === 'exiting' && styles.exiting, styles.panelWrapper, styles.border, !managedSizing && styles.unmeasured, !managedSizing && fg('platform-dst-chat-panel-layout') && styles.refinedUnmeasured, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInline, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'overlay' && styles.managedOverlay, (managedSizing === null || managedSizing === void 0 ? void 0 : managedSizing.mode) === 'inline' && styles.managedInlineBorder])
|
|
167
168
|
}, /*#__PURE__*/React.createElement(PanelSplitterProvider, {
|
|
168
169
|
panelId: localPanelSplitterId,
|
|
169
170
|
panelRef: ref,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
._4t3i1osq{height:100%}
|
|
18
18
|
._7cca15wb{container-type:inline-size}
|
|
19
19
|
._82e815vq._82e815vq{overflow-y:hidden}
|
|
20
|
+
._cw8k1fc5{--p_lclPnlSsrDefaultW:var(--p_lclPnlCompactDefaultW)}
|
|
20
21
|
._evra4a59{--p_lclPnlSsrInlineAreas:"main panel"}
|
|
21
22
|
._f8371m6a._f8371m6a{grid-template-areas:"main"}
|
|
22
23
|
._f8374a59._f8374a59{grid-template-areas:"main panel"}
|
|
@@ -24,4 +25,4 @@
|
|
|
24
25
|
._vlegi47z._vlegi47z{grid-template-columns:minmax(0,1fr)}
|
|
25
26
|
._yv0eggl6{grid-template-columns:var(--p_lclPnlSsrColumns,minmax(0,1fr))}
|
|
26
27
|
._yv0ei47z{grid-template-columns:minmax(0,1fr)}
|
|
27
|
-
@media (min-width:64rem){._peezi77x{--p_lclPnlSsrPreferredW:var(--p_lclPnlTrackW)}}
|
|
28
|
+
@media (min-width:64rem){._peezi77x{--p_lclPnlSsrPreferredW:var(--p_lclPnlTrackW)}._1tg31owj{--p_lclPnlSsrDefaultW:var(--p_lclPnlDefaultW)}}
|
|
@@ -3,6 +3,8 @@ import "./panel-layout-shell.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useContext, useId } from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
+
import { LayoutOverlayClearance } from './layout-overlay-clearance';
|
|
6
8
|
import { MainMinWidthContext } from './main-min-width-context';
|
|
7
9
|
|
|
8
10
|
// The grid uses runtime CSS variables and container sizing outside @atlaskit/css's bounded values.
|
|
@@ -14,7 +16,7 @@ const styles = {
|
|
|
14
16
|
layout: "_1reo1wug _18m91wug _1e0c11p5 _7cca15wb _1lmc1m6a _yv0ei47z _2z05hkll _4t3i1osq _1bsb1osq",
|
|
15
17
|
mainContent: "_nd5l1gzg _1reo1wug _18m91wug _1e0c1txw _4t3i1osq _19121cl4",
|
|
16
18
|
panelUplift: "_1reo15vq _18m915vq",
|
|
17
|
-
unmeasured: "_evra4a59 _1lmcc53r _yv0eggl6 _129o1uuk _peezi77x",
|
|
19
|
+
unmeasured: "_evra4a59 _1lmcc53r _yv0eggl6 _129o1uuk _cw8k1fc5 _peezi77x _1tg31owj",
|
|
18
20
|
managedInline: "_1uwq15vq _82e815vq _f8374a59 _1l7c1wug _vleg1orf",
|
|
19
21
|
managedOverlay: "_1uwq15vq _82e815vq _f8371m6a _vlegi47z _1l7chkll",
|
|
20
22
|
panelClosed: "_f8371m6a _vlegi47z _1l7chkll"
|
|
@@ -28,6 +30,8 @@ export function PanelLayoutShell({
|
|
|
28
30
|
isPanelOpen,
|
|
29
31
|
panelWidth,
|
|
30
32
|
compactPanelWidth,
|
|
33
|
+
defaultPanelWidth,
|
|
34
|
+
compactDefaultPanelWidth,
|
|
31
35
|
panelMinWidth = 320,
|
|
32
36
|
mode,
|
|
33
37
|
layoutRef,
|
|
@@ -42,7 +46,10 @@ export function PanelLayoutShell({
|
|
|
42
46
|
const inlineQuery = `@container local-panel-layout (min-width: ${mainMinWidth + panelMinWidth}px)`;
|
|
43
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
48
|
className: ax([styles.container])
|
|
45
|
-
}, mode === undefined && isPanelOpen &&
|
|
49
|
+
}, mode === undefined && isPanelOpen && fg('platform-dst-chat-panel-layout') && /*#__PURE__*/React.createElement(LayoutOverlayClearance, {
|
|
50
|
+
panelMinWidth: panelMinWidth,
|
|
51
|
+
mainMinWidth: mainMinWidth
|
|
52
|
+
}), mode === undefined && isPanelOpen &&
|
|
46
53
|
/*#__PURE__*/
|
|
47
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Instance-scoped SSR query supports caller-defined minimums; CSS variables are not allowed in query conditions.
|
|
48
55
|
React.createElement("style", null, `${inlineQuery} {
|
|
@@ -65,7 +72,11 @@ export function PanelLayoutShell({
|
|
|
65
72
|
[localPanelTrackWidthVar]: `${panelWidth}px`,
|
|
66
73
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
67
74
|
[localPanelMinWidthVar]: `${panelMinWidth}px`,
|
|
68
|
-
'--p_lclPnlCompactW': `${compactPanelWidth}px
|
|
75
|
+
'--p_lclPnlCompactW': `${compactPanelWidth}px`,
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
77
|
+
'--p_lclPnlDefaultW': `${defaultPanelWidth}px`,
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
79
|
+
'--p_lclPnlCompactDefaultW': `${compactDefaultPanelWidth}px`
|
|
69
80
|
},
|
|
70
81
|
className: ax([styles.layout, mode === undefined && isPanelOpen && styles.unmeasured, shouldClipOverflow && styles.panelUplift, mode === 'inline' && styles.managedInline, mode === 'overlay' && styles.managedOverlay, !isPanelOpen && styles.panelClosed])
|
|
71
82
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -29,7 +29,7 @@ function CoordinatedPanelLayout({
|
|
|
29
29
|
testId,
|
|
30
30
|
layoutRef
|
|
31
31
|
}) {
|
|
32
|
-
var _ref,
|
|
32
|
+
var _ref, _state$width;
|
|
33
33
|
const [defaults] = useState(getPanelLayoutDefaults);
|
|
34
34
|
const panelMinWidth = suppliedMinWidth !== null && suppliedMinWidth !== void 0 ? suppliedMinWidth : defaults.panelMinWidth;
|
|
35
35
|
const coordinator = useContext(LayoutAreaSizingContext);
|
|
@@ -42,8 +42,8 @@ function CoordinatedPanelLayout({
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
}, [coordinator]);
|
|
45
|
-
const [defaultWidth] = useState(
|
|
46
|
-
const [compactWidth] = useState((
|
|
45
|
+
const [defaultWidth] = useState(defaultPanelWidth !== null && defaultPanelWidth !== void 0 ? defaultPanelWidth : fg('platform-dst-chat-panel-layout') ? defaults.panelWidth : panelWidth !== null && panelWidth !== void 0 ? panelWidth : defaults.panelWidth);
|
|
46
|
+
const [compactWidth] = useState((_ref = compactDefaultPanelWidth !== null && compactDefaultPanelWidth !== void 0 ? compactDefaultPanelWidth : defaultPanelWidth) !== null && _ref !== void 0 ? _ref : fg('platform-dst-chat-panel-layout') ? defaults.compactPanelWidth : panelWidth !== null && panelWidth !== void 0 ? panelWidth : defaults.compactPanelWidth);
|
|
47
47
|
// Use the controlled request before measurement too, without changing the mount-time default.
|
|
48
48
|
const fallbackWidth = Math.max(panelMinWidth, Math.min(panelWidth !== null && panelWidth !== void 0 ? panelWidth : defaultWidth, panelMaxWidth !== null && panelMaxWidth !== void 0 ? panelMaxWidth : Infinity));
|
|
49
49
|
const {
|
|
@@ -99,6 +99,8 @@ function CoordinatedPanelLayout({
|
|
|
99
99
|
return /*#__PURE__*/React.createElement(PanelLayoutShell, {
|
|
100
100
|
isPanelOpen: isPanelOpen,
|
|
101
101
|
panelWidth: (_state$width = state === null || state === void 0 ? void 0 : state.width) !== null && _state$width !== void 0 ? _state$width : fallbackWidth,
|
|
102
|
+
defaultPanelWidth: defaultWidth,
|
|
103
|
+
compactDefaultPanelWidth: compactWidth,
|
|
102
104
|
compactPanelWidth: Math.max(panelMinWidth, Math.min(panelWidth !== null && panelWidth !== void 0 ? panelWidth : compactWidth, panelMaxWidth !== null && panelMaxWidth !== void 0 ? panelMaxWidth : Infinity)),
|
|
103
105
|
panelMinWidth: panelMinWidth,
|
|
104
106
|
mode: state === null || state === void 0 ? void 0 : state.mode,
|
|
@@ -381,6 +381,13 @@ const PortaledPanelSplitter = ({
|
|
|
381
381
|
const focusSequence = useRef(0);
|
|
382
382
|
const keyboardBoundsReady = useRef(false);
|
|
383
383
|
const pendingKeyboardWidth = useRef(null);
|
|
384
|
+
useEffect(() => {
|
|
385
|
+
if (fg('platform-dst-chat-panel-layout') && onResizeInternal) {
|
|
386
|
+
// Reconcile queued keyboard intent when allocation changes the effective
|
|
387
|
+
// width, including viewport and sibling changes while focus is retained.
|
|
388
|
+
pendingKeyboardWidth.current = panelWidth;
|
|
389
|
+
}
|
|
390
|
+
}, [panelWidth, onResizeInternal]);
|
|
384
391
|
const handleSliderInputChange = useCallback(async (event, pendingKey) => {
|
|
385
392
|
const isManagedResize = onResizeInternal;
|
|
386
393
|
const sequence = focusSequence.current;
|
|
@@ -398,8 +405,8 @@ const PortaledPanelSplitter = ({
|
|
|
398
405
|
const max = convertResizeBoundToPixels(bounds.max);
|
|
399
406
|
if (pendingKey) {
|
|
400
407
|
var _pendingKeyboardWidth;
|
|
401
|
-
//
|
|
402
|
-
//
|
|
408
|
+
// Resolve keys against live bounds, including limits between 20px steps.
|
|
409
|
+
// Before activation, preserve the intent until the chunk is ready.
|
|
403
410
|
const current = (_pendingKeyboardWidth = pendingKeyboardWidth.current) !== null && _pendingKeyboardWidth !== void 0 ? _pendingKeyboardWidth : getPixelWidth(panel);
|
|
404
411
|
const doesArrowRightIncrease = panelGrowthSide ? panelGrowthSide === 'right' : getTextDirection(panel) === 'ltr';
|
|
405
412
|
const increase = pendingKey === 'ArrowUp' || pendingKey === (doesArrowRightIncrease ? 'ArrowRight' : 'ArrowLeft') || pendingKey === 'PageUp';
|
|
@@ -426,11 +433,11 @@ const PortaledPanelSplitter = ({
|
|
|
426
433
|
});
|
|
427
434
|
}, [getResizeBounds, onCompleteResize, onResizeInternal, panelWidth, keyboardResizeManager, panel, prepareResize, panelGrowthSide]);
|
|
428
435
|
const handleSliderKeyDown = useCallback(event => {
|
|
429
|
-
if (prepareResize && !keyboardBoundsReady.current && ['Home', 'End', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown'].includes(event.key)) {
|
|
436
|
+
if (prepareResize && (!keyboardBoundsReady.current || onResizeInternal && fg('platform-dst-chat-panel-layout')) && ['Home', 'End', 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown'].includes(event.key)) {
|
|
430
437
|
event.preventDefault();
|
|
431
438
|
void handleSliderInputChange(event, event.key);
|
|
432
439
|
}
|
|
433
|
-
}, [handleSliderInputChange, prepareResize]);
|
|
440
|
+
}, [handleSliderInputChange, onResizeInternal, prepareResize]);
|
|
434
441
|
const resizeEventListenerCleanupFn = useRef(null);
|
|
435
442
|
const handleSliderFocus = useCallback(async () => {
|
|
436
443
|
var _resizeEventListenerC;
|
|
@@ -516,7 +523,7 @@ const PortaledPanelSplitter = ({
|
|
|
516
523
|
type: "range",
|
|
517
524
|
dir: panelGrowthSide ? rangeInputDirs[panelGrowthSide] : undefined,
|
|
518
525
|
value: rangeInputValue,
|
|
519
|
-
step: 20,
|
|
526
|
+
step: onResizeInternal && fg('platform-dst-chat-panel-layout') ? 'any' : 20,
|
|
520
527
|
min: rangeInputBounds.min,
|
|
521
528
|
max: rangeInputBounds.max,
|
|
522
529
|
"aria-valuetext": ariaValueText,
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
._1bsb1osq{width:100%}
|
|
3
3
|
._1bsb1raa{width:max(0px,calc(var(--n_layoutW) - var(--n_mainMinW) - var(--n_fitAside, 0px) - var(--n_fitRibbon, 0px) - var(--n_fitPanel, 0px)))}
|
|
4
4
|
._1bsb4nr3{width:var(--n_layoutW)}
|
|
5
|
-
.
|
|
5
|
+
._1bsbilm4{width:max(0px,calc(var(--n_layoutW) - var(--n_mainMinW) - var(--n_fitAside, 0px) - var(--n_fitRibbon, 0px) - var(--n_fitPanel, 0px) - var(--n_clearanceNavMin, 0px) - var(--n_clearanceChatMin, 0px) + 1px))}
|
|
6
|
+
._1bsbm6jk{width:max(0px,calc(var(--n_layoutW) - var(--n_mainMinW) - var(--n_fitAside, 0px) - var(--n_fitRibbon, 0px) - var(--n_fitPanel, 0px) - var(--n_fitNav)))}
|
|
7
|
+
._1bsbxys7{width:max(0px,calc(var(--n_layoutW) - var(--n_mainMinW) - var(--n_fitAside, 0px) - var(--n_fitRibbon, 0px) - var(--n_fitPanel, 0px) - var(--n_clearanceNavMin, 0px) + 1px))}
|
|
6
8
|
._1ciragmp >:not([data-layout-slot]){display:none!important}
|
|
7
9
|
._1cwmtye8{--n_mainMinW:20rem}
|
|
8
10
|
._1e0c11p5{display:grid}
|
|
9
11
|
._1f381mry{container-name:navigation-chat-space}
|
|
12
|
+
._1f381wm1{container-name:navigation-panel-nav-space}
|
|
13
|
+
._1f38bwx4{container-name:navigation-panel-chat-space}
|
|
10
14
|
._1f38hwoh{container-name:navigation-main-space}
|
|
11
15
|
._1f38hx13{container-name:navigation-layout-width}
|
|
12
16
|
._1lmcq9em{grid-template-areas:"banner" "top-bar" "main" "aside"}
|
|
@@ -20,7 +20,9 @@ export const gridRootChatFitId = `${gridRootId}-chat-fit`;
|
|
|
20
20
|
const styles = {
|
|
21
21
|
widthContainer: "_7cca15wb _1f38hx13 _1bsb1osq",
|
|
22
22
|
mainSpace: "_82d6okmw _1cwmtye8 _7cca15wb _1f38hwoh _vchh1ntv _1bsb1raa",
|
|
23
|
-
|
|
23
|
+
panelNavSpace: "_7cca15wb _1f381wm1 _1bsbxys7",
|
|
24
|
+
panelChatSpace: "_7cca15wb _1f38bwx4 _1bsbilm4",
|
|
25
|
+
chatSpace: "_5to3grho _7cca15wb _1f381mry _1bsbm6jk",
|
|
24
26
|
legacyRoot: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco",
|
|
25
27
|
root: "_1cwmtye8 _1e0c11p5 _1tke1kxc _1bsb4nr3 _1lmcq9em _yv0ei47z _2z0516ab _12ag50j2 _71dl19sb _12fkqmyk _12qzrxre _1rqttswr _xkmggc7l _tyve87m4",
|
|
26
28
|
safetyRail: "_1ciragmp",
|
|
@@ -43,10 +45,14 @@ function LayoutFitContainers({
|
|
|
43
45
|
}), /*#__PURE__*/React.createElement("div", {
|
|
44
46
|
id: gridRootFitId,
|
|
45
47
|
className: ax([styles.mainSpace])
|
|
48
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: ax([styles.panelNavSpace])
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: ax([styles.panelChatSpace])
|
|
46
52
|
}, /*#__PURE__*/React.createElement("div", {
|
|
47
53
|
id: gridRootChatFitId,
|
|
48
54
|
className: ax([styles.chatSpace])
|
|
49
|
-
}, children)));
|
|
55
|
+
}, children)))));
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
/**
|
|
@@ -23,7 +23,7 @@ import { DangerouslyHoistSlotSizes } from '../hoist-slot-sizes-context';
|
|
|
23
23
|
import { convertResizeBoundToPixels } from '../panel-splitter/convert-resize-bound-to-pixels';
|
|
24
24
|
import { PanelSplitterProvider } from '../panel-splitter/provider';
|
|
25
25
|
import { resolveLayoutWidth } from '../resolve-layout-width';
|
|
26
|
-
import { gridRootChatFitId, gridRootId } from '../root';
|
|
26
|
+
import { gridRootChatFitId, gridRootFitId, gridRootId } from '../root';
|
|
27
27
|
import { useLayoutAreaSizing } from '../use-layout-area-sizing';
|
|
28
28
|
import { useLayoutId } from '../use-layout-id';
|
|
29
29
|
import { useResizingWidthCssVarOnRootElement } from '../use-resizing-width-css-var-on-root-element';
|
|
@@ -979,6 +979,7 @@ function SideNavInternal({
|
|
|
979
979
|
id: id
|
|
980
980
|
}, devTimeOnlyAttributes, {
|
|
981
981
|
"data-layout-slot": true,
|
|
982
|
+
"data-layout-side-nav-open": isChatPanelLayoutEnabled && isExpandedOnDesktop ? '' : undefined,
|
|
982
983
|
"aria-label": label,
|
|
983
984
|
style: {
|
|
984
985
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/enforce-style-prop
|
|
@@ -992,7 +993,11 @@ function SideNavInternal({
|
|
|
992
993
|
// CSS reserves only the nav minimum for chat's fit decision, before effects or lazy loading.
|
|
993
994
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles
|
|
994
995
|
React.createElement("style", null, `
|
|
996
|
+
#${gridRootFitId} { --n_clearanceNavMin: 0px; --n_clearanceNavTarget: ${clampedWidth}; }
|
|
995
997
|
#${gridRootChatFitId} { --n_fitNav: 0px; }
|
|
998
|
+
@media (min-width: 64rem) {
|
|
999
|
+
#${gridRootFitId} { --n_clearanceNavMin: ${isExpandedOnDesktop ? minWidth : '0px'}; }
|
|
1000
|
+
}
|
|
996
1001
|
${shouldApplyUnmanagedSizing ? `#${gridRootId} nav[data-layout-slot] { grid-area: main / aside / aside / aside; width: min(90%, ${clampedWidth}); }` : ''}
|
|
997
1002
|
@media (min-width: 64rem) {
|
|
998
1003
|
@container navigation-main-space (min-width: ${minWidth}) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useTopNavBreakpoints } from './use-top-nav-breakpoints';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Use the enclosing TopNav's border-box width, matching its 48rem sm breakpoint.
|
|
5
|
+
* Until that width is measured, use an icon-only fallback: the server cannot know
|
|
6
|
+
* the container width, and text buttons can overlap at narrow widths.
|
|
7
|
+
*/
|
|
8
|
+
export function useIsCompactTopNav() {
|
|
9
|
+
const breakpoints = useTopNavBreakpoints();
|
|
10
|
+
return breakpoints ? !breakpoints.hasMeasured || breakpoints.belowSm : false;
|
|
11
|
+
}
|
|
@@ -2,7 +2,8 @@ import { startTransition, useState } from 'react';
|
|
|
2
2
|
import { useLayoutEffect } from '@atlaskit/ds-lib/use-layout-effect';
|
|
3
3
|
export function useMeasuredTopNavBreakpoints(topNav, remProbe) {
|
|
4
4
|
const [breakpoints, setBreakpoints] = useState({
|
|
5
|
-
belowSm: false
|
|
5
|
+
belowSm: false,
|
|
6
|
+
hasMeasured: false
|
|
6
7
|
});
|
|
7
8
|
useLayoutEffect(() => {
|
|
8
9
|
const view = topNav === null || topNav === void 0 ? void 0 : topNav.ownerDocument.defaultView;
|
|
@@ -15,8 +16,9 @@ export function useMeasuredTopNavBreakpoints(topNav, remProbe) {
|
|
|
15
16
|
// Navigation can still be hydrating inside Suspense. An urgent context
|
|
16
17
|
// update would discard its server DOM and show the loading fallback.
|
|
17
18
|
startTransition(() => {
|
|
18
|
-
setBreakpoints(previous => previous.belowSm === belowSm ? previous : {
|
|
19
|
-
belowSm
|
|
19
|
+
setBreakpoints(previous => previous.hasMeasured && previous.belowSm === belowSm ? previous : {
|
|
20
|
+
belowSm,
|
|
21
|
+
hasMeasured: true
|
|
20
22
|
});
|
|
21
23
|
});
|
|
22
24
|
};
|
|
@@ -5,9 +5,10 @@ import { TopNavElementContext } from './top-nav-element-context';
|
|
|
5
5
|
* Private breakpoint state for React rendering (overflow and responsive buttons).
|
|
6
6
|
* Presentation is handled by TopNav container queries, independently of this hook.
|
|
7
7
|
* Returns null outside TopNav or when platform-dst-chat-panel-layout is disabled.
|
|
8
|
-
* SSR and initial hydration
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* SSR and initial hydration have no measured width. Each consumer chooses its
|
|
9
|
+
* fallback until measurement is published in a transition, allowing suspended
|
|
10
|
+
* navigation to finish hydrating without losing its server DOM. All consumers
|
|
11
|
+
* share one observer on TopNav.
|
|
11
12
|
*/
|
|
12
13
|
export function useTopNavBreakpoints() {
|
|
13
14
|
return useContext(TopNavElementContext);
|
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import AddIcon from '@atlaskit/icon/core/add';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
import { ResponsiveButton } from './responsive-button';
|
|
3
5
|
import { Button } from './themed/button';
|
|
6
|
+
import { IconButton } from './themed/icon-button';
|
|
4
7
|
/**
|
|
5
8
|
* __Create button__
|
|
6
9
|
*
|
|
7
10
|
* The create button for the top navigation.
|
|
11
|
+
* With platform-dst-chat-panel-layout enabled, shows only its icon below the
|
|
12
|
+
* enclosing TopNav's 48rem breakpoint. Children remain its accessible label.
|
|
8
13
|
*/
|
|
9
14
|
export const CreateButton = /*#__PURE__*/forwardRef(({
|
|
10
15
|
children,
|
|
11
16
|
onClick,
|
|
12
17
|
testId,
|
|
13
18
|
interactionName
|
|
14
|
-
}, ref) => /*#__PURE__*/React.createElement(
|
|
19
|
+
}, ref) => fg('platform-dst-chat-panel-layout') ? /*#__PURE__*/React.createElement(ResponsiveButton, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
appearance: "primary",
|
|
22
|
+
iconButton: IconButton,
|
|
23
|
+
isTooltipDisabled: false,
|
|
24
|
+
icon: AddIcon,
|
|
25
|
+
label: children,
|
|
26
|
+
onClick: onClick,
|
|
27
|
+
testId: testId,
|
|
28
|
+
interactionName: interactionName
|
|
29
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
15
30
|
ref: ref,
|
|
16
31
|
appearance: "primary",
|
|
17
32
|
iconBefore: AddIcon,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { useIsCompactTopNav } from '../page-layout/top-nav/use-is-compact-top-nav';
|
|
4
|
+
/**
|
|
5
|
+
* An explicit responsive action: icon-only at xs/xxs, icon and label at sm and above.
|
|
6
|
+
* TopNav provides container measurements behind platform-dst-chat-panel-layout.
|
|
7
|
+
* Server markup uses an accessible icon-only fallback until client measurement.
|
|
8
|
+
* With the gate off or outside TopNav, it uses text. The button element is preserved.
|
|
9
|
+
*/
|
|
10
|
+
export const ResponsiveButton = /*#__PURE__*/forwardRef(({
|
|
11
|
+
iconButton: IconButtonComponent,
|
|
12
|
+
icon,
|
|
13
|
+
label,
|
|
14
|
+
tooltip,
|
|
15
|
+
isTooltipDisabled = false,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
const isCompact = useIsCompactTopNav();
|
|
19
|
+
return /*#__PURE__*/React.createElement(IconButtonComponent, _extends({}, props, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
icon: icon,
|
|
22
|
+
label: label,
|
|
23
|
+
shouldShowLabel: !isCompact,
|
|
24
|
+
isTooltipDisabled: isTooltipDisabled,
|
|
25
|
+
tooltip: tooltip
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import AkIconButton from '@atlaskit/button/icon/button';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
5
|
import { useHasCustomTheme } from './has-custom-theme-context';
|
|
6
|
+
import { ResponsiveIconButton } from './responsive-icon-button';
|
|
5
7
|
import { ThemedIconButton } from './themed-icon-button';
|
|
6
|
-
export const IconButton = /*#__PURE__*/forwardRef((
|
|
8
|
+
export const IconButton = /*#__PURE__*/forwardRef(({
|
|
9
|
+
isTooltipDisabled,
|
|
10
|
+
shouldShowLabel,
|
|
11
|
+
...props
|
|
12
|
+
}, ref) => {
|
|
7
13
|
const hasCustomTheme = useHasCustomTheme();
|
|
8
|
-
|
|
9
|
-
|
|
14
|
+
if (shouldShowLabel !== undefined) {
|
|
15
|
+
return /*#__PURE__*/React.createElement(ResponsiveIconButton, _extends({}, props, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
shouldShowLabel: shouldShowLabel,
|
|
18
|
+
isTooltipDisabled: isTooltipDisabled
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
// Preserve legacy custom-theme behavior outside the chat-panel rollout.
|
|
22
|
+
return hasCustomTheme ? /*#__PURE__*/React.createElement(ThemedIconButton, _extends({
|
|
10
23
|
ref: ref
|
|
11
|
-
}, props
|
|
24
|
+
}, props, {
|
|
25
|
+
isTooltipDisabled: fg('platform-dst-chat-panel-layout') ? isTooltipDisabled : undefined
|
|
26
|
+
})) : /*#__PURE__*/React.createElement(AkIconButton, _extends({
|
|
27
|
+
ref: ref
|
|
28
|
+
}, props, {
|
|
29
|
+
isTooltipDisabled: isTooltipDisabled
|
|
30
|
+
}));
|
|
12
31
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
._11f215s3{--ds-top-bar-button-selected-background:var(--ds-background-selected,#e9f2fe)}
|
|
2
|
+
._17r4187o{--ds-top-bar-button-disabled-background:var(--ds-background-disabled,#0515240f)}
|
|
3
|
+
._17r41j28{--ds-top-bar-button-disabled-background:transparent}
|
|
4
|
+
._1a59g6ey{--ds-top-bar-button-primary-background-pressed:var(--ds-background-brand-bold-pressed,#144794)}
|
|
5
|
+
._1b56sm61{--ds-top-bar-button-background:var(--ds-background-neutral-subtle,#00000000)}
|
|
6
|
+
._1fcq1l7x{--ds-top-bar-button-border:var(--ds-border,#0b120e24)}
|
|
7
|
+
._1ir41856{--ds-top-bar-button-primary-background:var(--ds-background-brand-bold,#1868db)}
|
|
8
|
+
._1jdn1gmx{--ds-top-bar-button-disabled-text:var(--ds-text-disabled,#080f214a)}
|
|
9
|
+
._1lx4fcek{--ds-top-bar-button-background-pressed:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
|
|
10
|
+
._1ugg6x5g{--ds-top-bar-button-selected-text:var(--ds-text-selected,#1868db)}
|
|
11
|
+
._1uufq98m{--ds-top-bar-button-selected-border:var(--ds-border-selected,#1868db)}
|
|
12
|
+
._1wknufnl{--ds-top-bar-button-selected-background-hovered:var(--ds-background-selected-hovered,#cfe1fd)}
|
|
13
|
+
._1wn615cr{--ds-top-bar-button-primary-text:var(--ds-text-inverse,#fff)}
|
|
14
|
+
._1y6knozp{--ds-top-bar-button-selected-background-pressed:var(--ds-background-selected-pressed,#8fb8f6)}
|
|
15
|
+
._3zkhhf2y{--ds-top-bar-button-primary-background-hovered:var(--ds-background-brand-bold-hovered,#1558bc)}
|
|
16
|
+
._rrxibk0g{--ds-top-bar-button-disabled-border:var(--ds-border-disabled,#0515240f)}
|
|
17
|
+
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
18
|
+
._y05i1dpa{--ds-top-bar-button-background-hovered:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* responsive-icon-button.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./responsive-icon-button.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import React, { forwardRef } from 'react';
|
|
6
|
+
|
|
7
|
+
// Custom properties adapt the existing themed control to the default ADS palette.
|
|
8
|
+
|
|
9
|
+
import { useHasCustomTheme } from './has-custom-theme-context';
|
|
10
|
+
import { ThemedIconButton } from './themed-icon-button';
|
|
11
|
+
const styles = {
|
|
12
|
+
defaultTheme: "_syazazsu _1b56sm61 _y05i1dpa _1lx4fcek _1fcq1l7x _1wn615cr _1ir41856 _3zkhhf2y _1a59g6ey _1ugg6x5g _11f215s3 _1wknufnl _1y6knozp _1uufq98m _1jdn1gmx _17r4187o",
|
|
13
|
+
neutralDisabled: "_17r41j28 _rrxibk0g"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Keep one control mounted, including its tooltip, while its label and shape change.
|
|
18
|
+
*/
|
|
19
|
+
export const ResponsiveIconButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
20
|
+
const hasCustomTheme = useHasCustomTheme();
|
|
21
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
className: ax([!hasCustomTheme && styles.defaultTheme, !hasCustomTheme && props.appearance !== 'primary' && styles.neutralDisabled])
|
|
23
|
+
}, /*#__PURE__*/React.createElement(ThemedIconButton, _extends({}, props, {
|
|
24
|
+
ref: ref
|
|
25
|
+
})));
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* themed-icon-button.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./themed-icon-button.compiled.css";
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import React, { forwardRef } from 'react';
|
|
5
6
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
@@ -7,62 +8,73 @@ import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
|
7
8
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
8
9
|
import IconRenderer from '../icon-renderer';
|
|
9
10
|
import { ThemedPressable } from './themed-pressable';
|
|
11
|
+
const styles = {
|
|
12
|
+
label: "_k48p1wq8"
|
|
13
|
+
};
|
|
10
14
|
export const ThemedIconButton = /*#__PURE__*/forwardRef(function ThemedIconButton({
|
|
11
15
|
icon: Icon,
|
|
12
16
|
label,
|
|
13
17
|
tooltip,
|
|
18
|
+
isTooltipDisabled,
|
|
19
|
+
shouldShowLabel = false,
|
|
14
20
|
...props
|
|
15
21
|
}, ref) {
|
|
16
22
|
var _tooltip$content;
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
23
|
+
return (
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
// Keep the trigger mounted when tooltip availability changes so focus is preserved.
|
|
26
|
+
React.createElement(Tooltip, _extends({}, tooltip, {
|
|
27
|
+
content: isTooltipDisabled || shouldShowLabel ? null : (_tooltip$content = tooltip === null || tooltip === void 0 ? void 0 : tooltip.content) !== null && _tooltip$content !== void 0 ? _tooltip$content : label
|
|
28
|
+
}), triggerProps =>
|
|
29
|
+
/*#__PURE__*/
|
|
30
|
+
/**
|
|
31
|
+
* The `aria-describedby` from `triggerProps` is intentionally not passed down,
|
|
32
|
+
* because it would cause double announcements with the `VisuallyHidden` label.
|
|
33
|
+
*
|
|
34
|
+
* The `@atlaskit/button` IconButton uses the same approach.
|
|
35
|
+
*/
|
|
36
|
+
React.createElement(ThemedPressable, _extends({}, props, {
|
|
37
|
+
shape: shouldShowLabel ? 'default' : 'square',
|
|
38
|
+
ref: mergeRefs([ref, triggerProps.ref]),
|
|
39
|
+
onClick: (event, analyticsEvent) => {
|
|
40
|
+
var _props$onClick, _triggerProps$onClick;
|
|
41
|
+
(_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, event, analyticsEvent);
|
|
42
|
+
triggerProps === null || triggerProps === void 0 ? void 0 : (_triggerProps$onClick = triggerProps.onClick) === null || _triggerProps$onClick === void 0 ? void 0 : _triggerProps$onClick.call(triggerProps, event);
|
|
43
|
+
},
|
|
44
|
+
onMouseOver: e => {
|
|
45
|
+
var _triggerProps$onMouse, _props$onMouseOver;
|
|
46
|
+
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 ? void 0 : _triggerProps$onMouse.call(triggerProps, e);
|
|
47
|
+
(_props$onMouseOver = props.onMouseOver) === null || _props$onMouseOver === void 0 ? void 0 : _props$onMouseOver.call(props, e);
|
|
48
|
+
},
|
|
49
|
+
onMouseOut: e => {
|
|
50
|
+
var _triggerProps$onMouse2, _props$onMouseOut;
|
|
51
|
+
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 ? void 0 : _triggerProps$onMouse2.call(triggerProps, e);
|
|
52
|
+
(_props$onMouseOut = props.onMouseOut) === null || _props$onMouseOut === void 0 ? void 0 : _props$onMouseOut.call(props, e);
|
|
53
|
+
},
|
|
54
|
+
onMouseMove: e => {
|
|
55
|
+
var _triggerProps$onMouse3, _props$onMouseMove;
|
|
56
|
+
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 ? void 0 : _triggerProps$onMouse3.call(triggerProps, e);
|
|
57
|
+
(_props$onMouseMove = props.onMouseMove) === null || _props$onMouseMove === void 0 ? void 0 : _props$onMouseMove.call(props, e);
|
|
58
|
+
},
|
|
59
|
+
onMouseDown: e => {
|
|
60
|
+
var _triggerProps$onMouse4, _props$onMouseDown;
|
|
61
|
+
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 ? void 0 : _triggerProps$onMouse4.call(triggerProps, e);
|
|
62
|
+
(_props$onMouseDown = props.onMouseDown) === null || _props$onMouseDown === void 0 ? void 0 : _props$onMouseDown.call(props, e);
|
|
63
|
+
},
|
|
64
|
+
onFocus: e => {
|
|
65
|
+
var _triggerProps$onFocus, _props$onFocus;
|
|
66
|
+
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 ? void 0 : _triggerProps$onFocus.call(triggerProps, e);
|
|
67
|
+
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 ? void 0 : _props$onFocus.call(props, e);
|
|
68
|
+
},
|
|
69
|
+
onBlur: e => {
|
|
70
|
+
var _triggerProps$onBlur, _props$onBlur;
|
|
71
|
+
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 ? void 0 : _triggerProps$onBlur.call(triggerProps, e);
|
|
72
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, e);
|
|
73
|
+
}
|
|
74
|
+
}), /*#__PURE__*/React.createElement(IconRenderer, {
|
|
75
|
+
icon: Icon
|
|
76
|
+
}), shouldShowLabel ? /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
className: ax([styles.label])
|
|
78
|
+
}, label) : /*#__PURE__*/React.createElement(VisuallyHidden, null, label)))
|
|
79
|
+
);
|
|
68
80
|
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
._1tv3nqa1:after{border-style:solid}
|
|
15
15
|
._39yqe4h9:after{border-width:var(--ds-border-width,1px)}
|
|
16
16
|
._8l3m15jn:after{border-color:var(--ds-top-bar-button-selected-border)}
|
|
17
|
-
.
|
|
17
|
+
._8l3m4il5:after{border-color:var(--ds-top-bar-button-disabled-border,transparent)}
|
|
18
18
|
._8l3maykr:after{border-color:var(--ds-top-bar-button-border)}
|
|
19
19
|
._18postnw:after{position:absolute}
|
|
20
20
|
._1bah1h6o{justify-content:center}
|
|
@@ -10,7 +10,7 @@ const styles = {
|
|
|
10
10
|
root: "_zulp12x7 _11c8fhey _2rko1qi0 _v564k6bl _4bfu1r31 _1hmsglyw _ajmmnqa1 _1rjcze3t _1e0c1txw _4cvr1h6o _1bah1h6o _4t3i5r7u _kqswh2mm _1nrm1r31 _1a3b1r31 _9oik1r31 _c2waglyw _4fprglyw _1bnxglyw _1iohnqa1 _5goinqa1 _jf4cnqa1 _1ggl5xtf",
|
|
11
11
|
border: "_14mj1kw7 _9v7aze3t _1tv3nqa1 _39yqe4h9 _aetrb3bt _18postnw",
|
|
12
12
|
selected: "_11q71qds _syazw5ct _8l3m15jn _f8pjw5ct _1053w5ct _19lcjrv1 _30l3w5ct _j6xtnh62 _9h8hw5ct",
|
|
13
|
-
disabled: "_11q71c9b _syaz1i3i
|
|
13
|
+
disabled: "_11q71c9b _syaz1i3i _8l3m4il5 _f8pj1i3i _10531i3i _19lc1c9b _30l31i3i _j6xt1c9b _9h8h1i3i"
|
|
14
14
|
};
|
|
15
15
|
const shapeStyles = {
|
|
16
16
|
default: "_18zrutpp",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ResponsiveButton as ResponsiveTopNavButton } from '../../ui/top-nav-items/responsive-button';
|