@atlaskit/navigation-system 0.166.0 → 0.167.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 +25 -0
- package/constellation/layout/examples.mdx +1 -1
- package/dist/cjs/ui/menu-item/menu-item.js +1 -8
- package/dist/cjs/ui/page-layout/panel.js +2 -3
- package/dist/es2019/ui/menu-item/menu-item.js +1 -8
- package/dist/es2019/ui/page-layout/panel.js +2 -3
- package/dist/esm/ui/menu-item/menu-item.js +1 -8
- package/dist/esm/ui/page-layout/panel.js +2 -3
- package/examples/company-hub-mock.tsx +3 -21
- package/examples/composition.tsx +1 -4
- package/examples/confluence-mock.tsx +1 -4
- package/examples/drag-and-drop/jira/filters/filter-move-modal.tsx +1 -2
- package/examples/drag-and-drop/jira/projects/project.tsx +2 -5
- package/examples/page-layout-full-screen.tsx +1 -4
- package/examples/page-layout-panel-aside-default-widths.tsx +1 -4
- package/examples/resizable-slots.tsx +1 -4
- package/package.json +11 -17
- package/src/ui/menu-item/menu-item.tsx +1 -8
- package/src/ui/page-layout/__tests__/vr-tests/page-layout.vr.tsx +2 -5
- package/src/ui/page-layout/panel.tsx +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 0.167.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.167.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#176198](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/176198)
|
|
14
|
+
[`6f29446debd94`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6f29446debd94) -
|
|
15
|
+
We have now removed the `"platform_design_system_nav4_menu_item_anchor_dnd"` feature flag. Drag
|
|
16
|
+
and drop of side navigation menu items that are anchors (eg `LinkMenuItem`) now needs to be
|
|
17
|
+
explicitly enabled with our
|
|
18
|
+
[side navigation drag and drop API](https://atlassian.design/components/navigation-system/side-navigation/drag-and-drop)
|
|
19
|
+
- [#173222](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173222)
|
|
20
|
+
[`1b1ca5e516115`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1b1ca5e516115) -
|
|
21
|
+
Cleans up `platform_design_system_nav4_panel_default_bg_color` feature gate. The Panel slot will
|
|
22
|
+
now always have a default background color.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 0.166.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
|
@@ -182,7 +182,7 @@ Resizing is supported for the following areas:
|
|
|
182
182
|
|
|
183
183
|
Advanced layouts can be created inside of the [main area](#main).
|
|
184
184
|
|
|
185
|
-
<Example Component={AdvancedLayoutExample} />
|
|
185
|
+
<Example Component={AdvancedLayoutExample} appearance="source-only" />
|
|
186
186
|
|
|
187
187
|
### Custom skip links
|
|
188
188
|
|
|
@@ -16,7 +16,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
16
16
|
var _react2 = require("@compiled/react");
|
|
17
17
|
var _avatar = require("@atlaskit/avatar");
|
|
18
18
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
20
|
var _tooltip = _interopRequireWildcard(require("@atlaskit/tooltip"));
|
|
22
21
|
var _forwardRefWithGeneric = require("../../components/forward-ref-with-generic");
|
|
@@ -384,13 +383,7 @@ var MenuItemBaseNoRef = function MenuItemBaseNoRef(_ref3, forwardedRef) {
|
|
|
384
383
|
* the element as draggable through the `draggable()` Pragmatic drag and drop function.
|
|
385
384
|
* The `draggable()` function will add `draggable="true"` to the element.
|
|
386
385
|
*/,
|
|
387
|
-
draggable:
|
|
388
|
-
if ((0, _platformFeatureFlags.fg)('platform_design_system_nav4_menu_item_anchor_dnd')) {
|
|
389
|
-
return hasDragIndicator === true ? undefined : false;
|
|
390
|
-
}
|
|
391
|
-
// legacy behaviour
|
|
392
|
-
return undefined;
|
|
393
|
-
}()
|
|
386
|
+
draggable: hasDragIndicator ? undefined : false
|
|
394
387
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
395
388
|
"aria-hidden": "true",
|
|
396
389
|
className: (0, _runtime.ax)([notchStyles.root])
|
|
@@ -61,8 +61,7 @@ function getOldResizeBounds() {
|
|
|
61
61
|
*/
|
|
62
62
|
var fallbackResizeMinWidth = 400;
|
|
63
63
|
var styles = {
|
|
64
|
-
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _14b54rrg _1dhy1c6w _9sns1wug",
|
|
65
|
-
backgroundColor: "_bfhk1bhr _4ap3vuon",
|
|
64
|
+
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _bfhk1bhr _14b54rrg _4ap3vuon _1dhy1c6w _9sns1wug",
|
|
66
65
|
border: "_191wglyw _16qs1cd0 _1w6ezgxb _scbpglyw",
|
|
67
66
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
68
67
|
hidden: "_1e0cglyw",
|
|
@@ -165,7 +164,7 @@ function Panel(_ref) {
|
|
|
165
164
|
id: id,
|
|
166
165
|
"data-layout-slot": true,
|
|
167
166
|
"aria-label": label,
|
|
168
|
-
className: (0, _runtime.ax)([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, (0, _platformFeatureFlags.fg)('
|
|
167
|
+
className: (0, _runtime.ax)([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, (0, _platformFeatureFlags.fg)('platform_design_system_nav4_panel_mobile_width_fix') ? styles.newMobileWidth : styles.oldMobileWidth, xcss]),
|
|
169
168
|
style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.panelVar, panelVariableWidth), '--minWidth', (0, _platformFeatureFlags.fg)('platform_design_system_nav4_panel_mobile_width_fix') ? "".concat(minWidth, "px") : undefined),
|
|
170
169
|
"data-testid": testId,
|
|
171
170
|
ref: ref
|
|
@@ -6,7 +6,6 @@ import React, { forwardRef, lazy, Suspense, useCallback, useRef } from 'react';
|
|
|
6
6
|
import { cx } from '@compiled/react';
|
|
7
7
|
import { AvatarContext } from '@atlaskit/avatar';
|
|
8
8
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Anchor, Pressable, Text } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import Tooltip, { TooltipPrimitive } from '@atlaskit/tooltip';
|
|
12
11
|
import { forwardRefWithGeneric } from '../../components/forward-ref-with-generic';
|
|
@@ -368,13 +367,7 @@ const MenuItemBaseNoRef = ({
|
|
|
368
367
|
* the element as draggable through the `draggable()` Pragmatic drag and drop function.
|
|
369
368
|
* The `draggable()` function will add `draggable="true"` to the element.
|
|
370
369
|
*/,
|
|
371
|
-
draggable:
|
|
372
|
-
if (fg('platform_design_system_nav4_menu_item_anchor_dnd')) {
|
|
373
|
-
return hasDragIndicator === true ? undefined : false;
|
|
374
|
-
}
|
|
375
|
-
// legacy behaviour
|
|
376
|
-
return undefined;
|
|
377
|
-
})()
|
|
370
|
+
draggable: hasDragIndicator ? undefined : false
|
|
378
371
|
}), /*#__PURE__*/React.createElement("div", {
|
|
379
372
|
"aria-hidden": "true",
|
|
380
373
|
className: ax([notchStyles.root])
|
|
@@ -50,8 +50,7 @@ function getOldResizeBounds() {
|
|
|
50
50
|
*/
|
|
51
51
|
const fallbackResizeMinWidth = 400;
|
|
52
52
|
const styles = {
|
|
53
|
-
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _14b54rrg _1dhy1c6w _9sns1wug",
|
|
54
|
-
backgroundColor: "_bfhk1bhr _4ap3vuon",
|
|
53
|
+
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _bfhk1bhr _14b54rrg _4ap3vuon _1dhy1c6w _9sns1wug",
|
|
55
54
|
border: "_191wglyw _16qs1cd0 _1w6ezgxb _scbpglyw",
|
|
56
55
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
57
56
|
hidden: "_1e0cglyw",
|
|
@@ -148,7 +147,7 @@ export function Panel({
|
|
|
148
147
|
id: id,
|
|
149
148
|
"data-layout-slot": true,
|
|
150
149
|
"aria-label": label,
|
|
151
|
-
className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, fg('
|
|
150
|
+
className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, fg('platform_design_system_nav4_panel_mobile_width_fix') ? styles.newMobileWidth : styles.oldMobileWidth, xcss]),
|
|
152
151
|
style: {
|
|
153
152
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
154
153
|
[panelVar]: panelVariableWidth,
|
|
@@ -11,7 +11,6 @@ import React, { forwardRef, lazy, Suspense, useCallback, useRef } from 'react';
|
|
|
11
11
|
import { cx } from '@compiled/react';
|
|
12
12
|
import { AvatarContext } from '@atlaskit/avatar';
|
|
13
13
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import { Anchor, Pressable, Text } from '@atlaskit/primitives/compiled';
|
|
16
15
|
import Tooltip, { TooltipPrimitive } from '@atlaskit/tooltip';
|
|
17
16
|
import { forwardRefWithGeneric } from '../../components/forward-ref-with-generic';
|
|
@@ -373,13 +372,7 @@ var MenuItemBaseNoRef = function MenuItemBaseNoRef(_ref3, forwardedRef) {
|
|
|
373
372
|
* the element as draggable through the `draggable()` Pragmatic drag and drop function.
|
|
374
373
|
* The `draggable()` function will add `draggable="true"` to the element.
|
|
375
374
|
*/,
|
|
376
|
-
draggable:
|
|
377
|
-
if (fg('platform_design_system_nav4_menu_item_anchor_dnd')) {
|
|
378
|
-
return hasDragIndicator === true ? undefined : false;
|
|
379
|
-
}
|
|
380
|
-
// legacy behaviour
|
|
381
|
-
return undefined;
|
|
382
|
-
}()
|
|
375
|
+
draggable: hasDragIndicator ? undefined : false
|
|
383
376
|
}), /*#__PURE__*/React.createElement("div", {
|
|
384
377
|
"aria-hidden": "true",
|
|
385
378
|
className: ax([notchStyles.root])
|
|
@@ -52,8 +52,7 @@ function getOldResizeBounds() {
|
|
|
52
52
|
*/
|
|
53
53
|
var fallbackResizeMinWidth = 400;
|
|
54
54
|
var styles = {
|
|
55
|
-
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _14b54rrg _1dhy1c6w _9sns1wug",
|
|
56
|
-
backgroundColor: "_bfhk1bhr _4ap3vuon",
|
|
55
|
+
root: "_nd5l1b6c _10fph9n0 _vchhusvi _1pbykb7n _4t3ieqxy _kqsw1if8 _152timx3 _bfhk1bhr _14b54rrg _4ap3vuon _1dhy1c6w _9sns1wug",
|
|
57
56
|
border: "_191wglyw _16qs1cd0 _1w6ezgxb _scbpglyw",
|
|
58
57
|
scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
|
|
59
58
|
hidden: "_1e0cglyw",
|
|
@@ -156,7 +155,7 @@ export function Panel(_ref) {
|
|
|
156
155
|
id: id,
|
|
157
156
|
"data-layout-slot": true,
|
|
158
157
|
"aria-label": label,
|
|
159
|
-
className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, fg('
|
|
158
|
+
className: ax([styles.root, defaultWidth === 0 && styles.hidden, hasBorder && styles.border, fg('platform_design_system_nav4_panel_mobile_width_fix') ? styles.newMobileWidth : styles.oldMobileWidth, xcss]),
|
|
160
159
|
style: _defineProperty(_defineProperty({}, panelVar, panelVariableWidth), '--minWidth', fg('platform_design_system_nav4_panel_mobile_width_fix') ? "".concat(minWidth, "px") : undefined),
|
|
161
160
|
"data-testid": testId,
|
|
162
161
|
ref: ref
|
|
@@ -44,9 +44,6 @@ import { WithResponsiveViewport } from './utils/example-utils';
|
|
|
44
44
|
import { MockSearch } from './utils/mock-search';
|
|
45
45
|
|
|
46
46
|
const panelStyles = cssMap({
|
|
47
|
-
root: {
|
|
48
|
-
backgroundColor: token('elevation.surface'),
|
|
49
|
-
},
|
|
50
47
|
header: {
|
|
51
48
|
paddingInline: token('space.300'),
|
|
52
49
|
paddingBlock: token('space.150'),
|
|
@@ -108,14 +105,7 @@ const contentStyles = cssMap({
|
|
|
108
105
|
* - Has a `Panel`
|
|
109
106
|
* - Does not have a `SideNav`
|
|
110
107
|
*/
|
|
111
|
-
export function CompanyHubMockExample({
|
|
112
|
-
hasPanelBackgroundColor = true,
|
|
113
|
-
defaultPanelWidth = 440,
|
|
114
|
-
}: {
|
|
115
|
-
// Will remove this after cleaning up platform_design_system_nav4_panel_default_bg_color
|
|
116
|
-
hasPanelBackgroundColor?: boolean;
|
|
117
|
-
defaultPanelWidth?: number;
|
|
118
|
-
}) {
|
|
108
|
+
export function CompanyHubMockExample({ defaultPanelWidth = 440 }: { defaultPanelWidth?: number }) {
|
|
119
109
|
const [isChatOpen, setIsChatOpen] = useState(true);
|
|
120
110
|
|
|
121
111
|
const toggleChat = useCallback(() => {
|
|
@@ -196,10 +186,7 @@ export function CompanyHubMockExample({
|
|
|
196
186
|
</Stack>
|
|
197
187
|
</Main>
|
|
198
188
|
{isChatOpen && (
|
|
199
|
-
<Panel
|
|
200
|
-
xcss={hasPanelBackgroundColor && panelStyles.root}
|
|
201
|
-
defaultWidth={defaultPanelWidth}
|
|
202
|
-
>
|
|
189
|
+
<Panel defaultWidth={defaultPanelWidth}>
|
|
203
190
|
<Inline xcss={panelStyles.header}>
|
|
204
191
|
<Text weight="bold" color="color.text.subtle">
|
|
205
192
|
Chat
|
|
@@ -229,13 +216,8 @@ export function CompanyHubMockExample({
|
|
|
229
216
|
);
|
|
230
217
|
}
|
|
231
218
|
|
|
232
|
-
// Can remove after cleaning up platform_design_system_nav4_panel_default_bg_color
|
|
233
|
-
export const CompanyHubMockNoPanelBackgroundColorExample = () => (
|
|
234
|
-
<CompanyHubMockExample hasPanelBackgroundColor={false} />
|
|
235
|
-
);
|
|
236
|
-
|
|
237
219
|
export const CompanyHubMockSmallDefaultPanelWidthExample = () => (
|
|
238
220
|
<CompanyHubMockExample defaultPanelWidth={320} />
|
|
239
221
|
);
|
|
240
222
|
|
|
241
|
-
export default
|
|
223
|
+
export default CompanyHubMockExample;
|
package/examples/composition.tsx
CHANGED
|
@@ -85,9 +85,6 @@ const contentStyles = cssMap({
|
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
const panelStyles = cssMap({
|
|
88
|
-
root: {
|
|
89
|
-
backgroundColor: token('elevation.surface'),
|
|
90
|
-
},
|
|
91
88
|
content: {
|
|
92
89
|
paddingTop: token('space.300'),
|
|
93
90
|
paddingRight: token('space.300'),
|
|
@@ -476,7 +473,7 @@ export default function Composition({
|
|
|
476
473
|
<PanelSplitter label="Resize aside" />
|
|
477
474
|
</Aside>
|
|
478
475
|
{isPanelVisible && (
|
|
479
|
-
<Panel
|
|
476
|
+
<Panel>
|
|
480
477
|
<Stack space="space.200" xcss={panelStyles.content}>
|
|
481
478
|
<Heading size="small">Help</Heading>
|
|
482
479
|
<Stack space="space.050">
|
|
@@ -73,9 +73,6 @@ import { WithResponsiveViewport } from './utils/example-utils';
|
|
|
73
73
|
import { MockSearch } from './utils/mock-search';
|
|
74
74
|
|
|
75
75
|
const panelStyles = cssMap({
|
|
76
|
-
root: {
|
|
77
|
-
backgroundColor: token('elevation.surface'),
|
|
78
|
-
},
|
|
79
76
|
header: {
|
|
80
77
|
paddingInline: token('space.300'),
|
|
81
78
|
paddingBlock: token('space.150'),
|
|
@@ -258,7 +255,7 @@ export default function ConfluenceMockExample({}: {}) {
|
|
|
258
255
|
</Stack>
|
|
259
256
|
</Stack>
|
|
260
257
|
</Main>
|
|
261
|
-
<Panel
|
|
258
|
+
<Panel>
|
|
262
259
|
<Inline xcss={panelStyles.header}>
|
|
263
260
|
<Inline space="space.050" alignBlock="center">
|
|
264
261
|
<ProjectIcon label="" spacing="spacious" color={token('color.icon.subtle')} />
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { useCallback, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
8
|
+
import { jsx } from '@compiled/react';
|
|
10
9
|
import invariant from 'tiny-invariant';
|
|
11
10
|
|
|
12
11
|
import Button from '@atlaskit/button/new';
|
|
@@ -216,11 +216,8 @@ function Project({
|
|
|
216
216
|
}),
|
|
217
217
|
canDrop: ({ source }) => {
|
|
218
218
|
const data = source.data;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
// only allowing projects to be dropped in the same group
|
|
223
|
-
return Boolean(group.find((project) => project.id === data.id));
|
|
219
|
+
// Only allowing projects to be dropped in the same group
|
|
220
|
+
return isProjectData(data) && data.groupName === groupName;
|
|
224
221
|
},
|
|
225
222
|
},
|
|
226
223
|
});
|
|
@@ -64,9 +64,6 @@ const asideStyles = cssMap({
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
const panelStyles = cssMap({
|
|
67
|
-
root: {
|
|
68
|
-
backgroundColor: token('elevation.surface'),
|
|
69
|
-
},
|
|
70
67
|
content: {
|
|
71
68
|
paddingTop: token('space.300'),
|
|
72
69
|
paddingRight: token('space.300'),
|
|
@@ -227,7 +224,7 @@ export default function FullScreenModeExample() {
|
|
|
227
224
|
</Aside>
|
|
228
225
|
)}
|
|
229
226
|
{isPanelVisible && !isFullscreen && (
|
|
230
|
-
<Panel
|
|
227
|
+
<Panel defaultWidth={350}>
|
|
231
228
|
<Stack space="space.200" xcss={panelStyles.content}>
|
|
232
229
|
<Heading size="small">Panel</Heading>
|
|
233
230
|
<Stack space="space.050">
|
|
@@ -56,9 +56,6 @@ const asideStyles = cssMap({
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
const panelStyles = cssMap({
|
|
59
|
-
root: {
|
|
60
|
-
backgroundColor: token('elevation.surface'),
|
|
61
|
-
},
|
|
62
59
|
content: {
|
|
63
60
|
paddingTop: token('space.300'),
|
|
64
61
|
paddingRight: token('space.300'),
|
|
@@ -218,7 +215,7 @@ export default function PanelAsideDefaultWidths({
|
|
|
218
215
|
</Aside>
|
|
219
216
|
)}
|
|
220
217
|
{isPanelRendered && (
|
|
221
|
-
<Panel
|
|
218
|
+
<Panel defaultWidth={panelWidth}>
|
|
222
219
|
<Stack space="space.200" xcss={panelStyles.content}>
|
|
223
220
|
<Heading size="small">Panel</Heading>
|
|
224
221
|
<Stack space="space.050">
|
|
@@ -70,9 +70,6 @@ const asideStyles = cssMap({
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
const panelStyles = cssMap({
|
|
73
|
-
root: {
|
|
74
|
-
backgroundColor: token('elevation.surface'),
|
|
75
|
-
},
|
|
76
73
|
content: {
|
|
77
74
|
paddingTop: token('space.300'),
|
|
78
75
|
paddingRight: token('space.300'),
|
|
@@ -329,7 +326,7 @@ export function ResizableSlots() {
|
|
|
329
326
|
/>
|
|
330
327
|
</Aside>
|
|
331
328
|
|
|
332
|
-
<Panel
|
|
329
|
+
<Panel defaultWidth={350} id="panel" testId="panel">
|
|
333
330
|
<Stack space="space.200" xcss={panelStyles.content}>
|
|
334
331
|
<Heading size="small">Panel</Heading>
|
|
335
332
|
<Stack space="space.050">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.167.1",
|
|
4
4
|
"description": "The latest navigation system for Atlassian products.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"author": "Atlassian Pty Ltd",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"category": "Navigation",
|
|
73
73
|
"status": {
|
|
74
74
|
"type": "alpha",
|
|
75
|
-
"description": "This package is
|
|
75
|
+
"description": "This package is experimental. We may make frequent breaking changes with limited notice."
|
|
76
76
|
},
|
|
77
77
|
"subPages": [
|
|
78
78
|
{
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"id": "layout",
|
|
81
81
|
"status": {
|
|
82
82
|
"type": "alpha",
|
|
83
|
-
"description": "This package is
|
|
83
|
+
"description": "This package is experimental. We may make frequent breaking changes with limited notice."
|
|
84
84
|
},
|
|
85
85
|
"sortKey": 1
|
|
86
86
|
},
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"id": "side-navigation",
|
|
90
90
|
"status": {
|
|
91
91
|
"type": "alpha",
|
|
92
|
-
"description": "This package is
|
|
92
|
+
"description": "This package is experimental. We may make frequent breaking changes with limited notice."
|
|
93
93
|
},
|
|
94
94
|
"sortKey": 2
|
|
95
95
|
},
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"id": "top-navigation",
|
|
99
99
|
"status": {
|
|
100
100
|
"type": "alpha",
|
|
101
|
-
"description": "This package is
|
|
101
|
+
"description": "This package is experimental. We may make frequent breaking changes with limited notice."
|
|
102
102
|
},
|
|
103
103
|
"sortKey": 3
|
|
104
104
|
}
|
|
@@ -115,19 +115,19 @@
|
|
|
115
115
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
116
116
|
"@atlaskit/avatar": "^25.1.0",
|
|
117
117
|
"@atlaskit/button": "^23.2.0",
|
|
118
|
-
"@atlaskit/css": "^0.
|
|
118
|
+
"@atlaskit/css": "^0.12.0",
|
|
119
119
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
120
|
-
"@atlaskit/icon": "^27.
|
|
120
|
+
"@atlaskit/icon": "^27.2.0",
|
|
121
121
|
"@atlaskit/layering": "^3.0.0",
|
|
122
|
-
"@atlaskit/logo": "^19.
|
|
122
|
+
"@atlaskit/logo": "^19.3.0",
|
|
123
123
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
124
124
|
"@atlaskit/popup": "^4.3.0",
|
|
125
125
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
126
126
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
127
127
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
128
|
-
"@atlaskit/primitives": "^14.
|
|
128
|
+
"@atlaskit/primitives": "^14.10.0",
|
|
129
129
|
"@atlaskit/temp-nav-app-icons": "^0.8.0",
|
|
130
|
-
"@atlaskit/tokens": "^5.
|
|
130
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
131
131
|
"@atlaskit/tooltip": "^20.3.0",
|
|
132
132
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
133
133
|
"@babel/runtime": "^7.0.0",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"@atlaskit/page-header": "^12.0.0",
|
|
158
158
|
"@atlaskit/page-layout": "^4.2.0",
|
|
159
159
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
160
|
-
"@atlaskit/select": "^
|
|
160
|
+
"@atlaskit/select": "^21.0.0",
|
|
161
161
|
"@atlaskit/skeleton": "^2.0.0",
|
|
162
162
|
"@atlaskit/textfield": "^8.0.0",
|
|
163
163
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
@@ -204,18 +204,12 @@
|
|
|
204
204
|
"platform_design_system_nav4_live_resizing_css_vars": {
|
|
205
205
|
"type": "boolean"
|
|
206
206
|
},
|
|
207
|
-
"platform_design_system_nav4_panel_default_bg_color": {
|
|
208
|
-
"type": "boolean"
|
|
209
|
-
},
|
|
210
207
|
"platform_design_system_nav4_top_nav_columns": {
|
|
211
208
|
"type": "boolean"
|
|
212
209
|
},
|
|
213
210
|
"platform_design_system_nav4_top_nav_min_widths": {
|
|
214
211
|
"type": "boolean"
|
|
215
212
|
},
|
|
216
|
-
"platform_design_system_nav4_menu_item_anchor_dnd": {
|
|
217
|
-
"type": "boolean"
|
|
218
|
-
},
|
|
219
213
|
"platform-team25-app-icon-tiles": {
|
|
220
214
|
"type": "boolean"
|
|
221
215
|
},
|
|
@@ -10,7 +10,6 @@ import { cssMap, cx, jsx, keyframes } from '@compiled/react';
|
|
|
10
10
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
11
11
|
import { AvatarContext, type AvatarContextProps } from '@atlaskit/avatar';
|
|
12
12
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { Anchor, Pressable, Text, type TextColor } from '@atlaskit/primitives/compiled';
|
|
15
14
|
import { token } from '@atlaskit/tokens';
|
|
16
15
|
import Tooltip, {
|
|
@@ -777,13 +776,7 @@ const MenuItemBaseNoRef = <T extends HTMLAnchorElement | HTMLButtonElement>(
|
|
|
777
776
|
* the element as draggable through the `draggable()` Pragmatic drag and drop function.
|
|
778
777
|
* The `draggable()` function will add `draggable="true"` to the element.
|
|
779
778
|
*/
|
|
780
|
-
draggable={
|
|
781
|
-
if (fg('platform_design_system_nav4_menu_item_anchor_dnd')) {
|
|
782
|
-
return hasDragIndicator === true ? undefined : false;
|
|
783
|
-
}
|
|
784
|
-
// legacy behaviour
|
|
785
|
-
return undefined;
|
|
786
|
-
})()}
|
|
779
|
+
draggable={hasDragIndicator ? undefined : false}
|
|
787
780
|
>
|
|
788
781
|
{/* Won't be a "grid child" */}
|
|
789
782
|
<div css={notchStyles.root} aria-hidden="true" />
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Device, type Hooks, snapshot, type SnapshotTestOptions } from '@af/visual-regression';
|
|
2
2
|
|
|
3
|
-
import CompanyHubMockExample
|
|
4
|
-
CompanyHubMockNoPanelBackgroundColorExample,
|
|
5
|
-
} from '../../../../../examples/company-hub-mock';
|
|
3
|
+
import CompanyHubMockExample from '../../../../../examples/company-hub-mock';
|
|
6
4
|
import {
|
|
7
5
|
AllSlots,
|
|
8
6
|
AllSlotsBannerHeightZero,
|
|
@@ -308,7 +306,7 @@ snapshot(CompanyHubMockExample, {
|
|
|
308
306
|
description: 'Panel should have correct width when there is no SideNav mounted',
|
|
309
307
|
});
|
|
310
308
|
|
|
311
|
-
snapshot(
|
|
309
|
+
snapshot(CompanyHubMockExample, {
|
|
312
310
|
variants: [
|
|
313
311
|
/**
|
|
314
312
|
* Using dark mode because only dark mode has a difference between the elevation appearances.
|
|
@@ -330,7 +328,6 @@ snapshot(CompanyHubMockNoPanelBackgroundColorExample, {
|
|
|
330
328
|
],
|
|
331
329
|
featureFlags: {
|
|
332
330
|
platform_design_system_nav4_preview_panel_support: true,
|
|
333
|
-
platform_design_system_nav4_panel_default_bg_color: true,
|
|
334
331
|
platform_design_system_nav4_panel_default_border: true,
|
|
335
332
|
},
|
|
336
333
|
description: 'Panel default background color',
|
|
@@ -82,22 +82,20 @@ const styles = cssMap({
|
|
|
82
82
|
// spec for sticky doesn't support "stick to where I'm initially rendered" so we need to tell it.
|
|
83
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
84
84
|
insetBlockStart: contentInsetBlockStart,
|
|
85
|
+
backgroundColor: token('elevation.surface.overlay'),
|
|
85
86
|
'@media (min-width: 48rem)': {
|
|
86
87
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
87
88
|
width: `var(${panelSplitterResizingVar}, var(${panelVar}))`,
|
|
88
89
|
},
|
|
90
|
+
'@media (min-width: 64rem)': {
|
|
91
|
+
backgroundColor: token('elevation.surface'),
|
|
92
|
+
},
|
|
89
93
|
'@media (min-width: 90rem)': {
|
|
90
94
|
gridArea: 'panel',
|
|
91
95
|
// On large viewports the panel is displayed next to other slots so we reset the zindex.
|
|
92
96
|
zIndex: 'auto',
|
|
93
97
|
},
|
|
94
98
|
},
|
|
95
|
-
backgroundColor: {
|
|
96
|
-
backgroundColor: token('elevation.surface.overlay'),
|
|
97
|
-
'@media (min-width: 64rem)': {
|
|
98
|
-
backgroundColor: token('elevation.surface'),
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
99
|
border: {
|
|
102
100
|
// We use a shadow when the panel is an overlay
|
|
103
101
|
boxShadow: token('elevation.shadow.overlay'),
|
|
@@ -281,7 +279,6 @@ export function Panel({
|
|
|
281
279
|
styles.root,
|
|
282
280
|
defaultWidth === 0 && styles.hidden,
|
|
283
281
|
hasBorder && styles.border,
|
|
284
|
-
fg('platform_design_system_nav4_panel_default_bg_color') && styles.backgroundColor,
|
|
285
282
|
fg('platform_design_system_nav4_panel_mobile_width_fix')
|
|
286
283
|
? styles.newMobileWidth
|
|
287
284
|
: styles.oldMobileWidth,
|