@atlaskit/navigation-system 7.1.4 → 7.1.6
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 +18 -0
- package/constellation/layout/examples.mdx +47 -26
- package/constellation/layout/usage.mdx +13 -10
- package/constellation/top-nav-items/examples.mdx +46 -31
- package/constellation/top-nav-items/usage.mdx +2 -2
- package/dist/cjs/ui/top-nav-items/nav-logo/app-logo.js +3 -4
- package/dist/es2019/ui/top-nav-items/nav-logo/app-logo.js +3 -4
- package/dist/esm/ui/top-nav-items/nav-logo/app-logo.js +3 -4
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 7.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`02483200273ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/02483200273ec) -
|
|
8
|
+
Enrol all Design System UI packages into the React Compiler with platform gating via
|
|
9
|
+
isReactCompilerActivePlatform.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 7.1.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`f54d8707590da`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f54d8707590da) -
|
|
17
|
+
The `platform-dst-nav-app-icon-height-fix` feature gate has been cleaned up. The app logo icon now
|
|
18
|
+
always has a maximum height of 24px applied to prevent custom App Logos from extending beyond the
|
|
19
|
+
edges of the container.
|
|
20
|
+
|
|
3
21
|
## 7.1.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -30,7 +30,8 @@ The full page layout with all areas rendered has the structure depicted below, o
|
|
|
30
30
|
alt="Example of the navigation system layout areas"
|
|
31
31
|
/>
|
|
32
32
|
|
|
33
|
-
The top nav overlaps the side nav when it is expanded to give the appearance of a full height side
|
|
33
|
+
The top nav overlaps the side nav when it is expanded to give the appearance of a full height side
|
|
34
|
+
nav.
|
|
34
35
|
|
|
35
36
|
When composing your page layout ensure that:
|
|
36
37
|
|
|
@@ -42,7 +43,8 @@ When composing your page layout ensure that:
|
|
|
42
43
|
These are the distinct areas in the layout. These components are designed to contain other
|
|
43
44
|
components and content.
|
|
44
45
|
|
|
45
|
-
For examples, see
|
|
46
|
+
For examples, see
|
|
47
|
+
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE).
|
|
46
48
|
|
|
47
49
|
### Banner
|
|
48
50
|
|
|
@@ -56,7 +58,8 @@ Use the top nav area to render [top nav items](/components/navigation-system/top
|
|
|
56
58
|
- It will display at the top of the screen, below the banner if one is present. It has a fixed
|
|
57
59
|
height of 56px.
|
|
58
60
|
- Use the [top nav slots](#top-nav-slots) to position actions within top nav.
|
|
59
|
-
- The top nav is responsive, with the [top nav items](/components/navigation-system/top-nav-items)
|
|
61
|
+
- The top nav is responsive, with the [top nav items](/components/navigation-system/top-nav-items)
|
|
62
|
+
changing according to the viewport size.
|
|
60
63
|
|
|
61
64
|
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
62
65
|
|
|
@@ -65,7 +68,8 @@ Use the top nav area to render [top nav items](/components/navigation-system/top
|
|
|
65
68
|
The top nav has three layout components that you must use to position
|
|
66
69
|
[top nav items](/components/navigation-system/top-nav-items) within the top nav flexbox.
|
|
67
70
|
|
|
68
|
-
- `TopNavStart`: Area for left-aligned items. Appears in the side nav when the side nav is expanded
|
|
71
|
+
- `TopNavStart`: Area for left-aligned items. Appears in the side nav when the side nav is expanded
|
|
72
|
+
to give the appearance of a full height sidebar.
|
|
69
73
|
- `TopNavMiddle`: Area for centre-aligned items.
|
|
70
74
|
- `TopNavEnd`: Area for right-aligned items.
|
|
71
75
|
|
|
@@ -91,7 +95,9 @@ See the [custom theming](/components/navigation-system/layout/custom-theming) ta
|
|
|
91
95
|
render [side nav items](https://atlaskit.atlassian.com/packages/navigation/side-nav-items). It
|
|
92
96
|
will show on the left of the screen. The default width of the side nav is 320px.
|
|
93
97
|
- Use the [side nav slots](#side-nav-slots) to position content within the side nav.
|
|
94
|
-
- The side nav is [collapsable and expandable](#side-nav-collapseexpand),
|
|
98
|
+
- The side nav is [collapsable and expandable](#side-nav-collapseexpand),
|
|
99
|
+
[resizable](#side-nav-resizing), [responsive](#side-nav-responsive), and offers
|
|
100
|
+
[flyout](#side-nav-flyout) behaviour.
|
|
95
101
|
|
|
96
102
|
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
97
103
|
|
|
@@ -121,13 +127,17 @@ The side nav can collapse and expand based on user input or programmatically thr
|
|
|
121
127
|
##### Toggle button
|
|
122
128
|
|
|
123
129
|
The side nav can collapse and expand using the `SideNavToggleButton` from
|
|
124
|
-
[top nav items](/components/navigation-system/top-nav-items/examples#start-items) or the keyboard
|
|
130
|
+
[top nav items](/components/navigation-system/top-nav-items/examples#start-items) or the keyboard
|
|
131
|
+
shortcut.
|
|
125
132
|
|
|
126
133
|
##### Keyboard shortcut
|
|
127
134
|
|
|
128
|
-
The keyboard shortcut Ctrl+[ is enabled globally through the `isSideNavShortcutEnabled` on `Root`.
|
|
135
|
+
The keyboard shortcut Ctrl+[ is enabled globally through the `isSideNavShortcutEnabled` on `Root`.
|
|
136
|
+
It’s disabled by default.
|
|
129
137
|
|
|
130
|
-
When enabled, additional checks can be performed on individual keypresses through the
|
|
138
|
+
When enabled, additional checks can be performed on individual keypresses through the
|
|
139
|
+
`canToggleWithShortcut` prop on the side nav. This allows for apps to conditionally disable the
|
|
140
|
+
shortcut based on additional app-specific requirements.
|
|
131
141
|
|
|
132
142
|
##### Programmatic / Hooks
|
|
133
143
|
|
|
@@ -172,20 +182,25 @@ This is useful for toggling the side nav based on a keyboard shortcut.
|
|
|
172
182
|
|
|
173
183
|
#### Side nav resizing
|
|
174
184
|
|
|
175
|
-
You can optionally render a [side nav panel splitter](#resizable-areas) as a child to make the side
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- The side nav
|
|
179
|
-
|
|
180
|
-
-
|
|
185
|
+
You can optionally render a [side nav panel splitter](#resizable-areas) as a child to make the side
|
|
186
|
+
nav resizable.
|
|
187
|
+
|
|
188
|
+
- The side nav is resized using the drag handle. When you hover over the drag handle, the mouse
|
|
189
|
+
pointer changes to a resize cursor.
|
|
190
|
+
- The side nav can be resized to a minimum width of 240px and a maximum width equal to 50% of the
|
|
191
|
+
viewport width.
|
|
192
|
+
- The side nav retains its resized width after it's collapsed or expanded. Persist the chosen width
|
|
193
|
+
across page refreshes by providing it to the `defaultWidth` prop.
|
|
194
|
+
- When resizing, any open layer components (for example, popups, dropdowns, selects, and tooltips)
|
|
195
|
+
are closed.
|
|
181
196
|
- You can also double-click the side nav panel splitter to collapse the side nav.
|
|
182
|
-
|
|
197
|
+
|
|
183
198
|
#### Side nav responsive
|
|
184
199
|
|
|
185
200
|
- At `s`, `xs`, and `xxs` breakpoints (i.e. viewports smaller than 1024px), the side nav
|
|
186
201
|
automatically collapses to make room for the content. Users have the option to manually
|
|
187
|
-
[open or close](/components/navigation-system/layout/examples#side-nav-collapseexpand) the side
|
|
188
|
-
according to their preferences. Doing so will open it as an overlay.
|
|
202
|
+
[open or close](/components/navigation-system/layout/examples#side-nav-collapseexpand) the side
|
|
203
|
+
nav according to their preferences. Doing so will open it as an overlay.
|
|
189
204
|
- At `xs` and `xxs` breakpoints (i.e. viewports smaller than 768px), the max width of the overlay
|
|
190
205
|
side nav is either 320px or 90% of the screen width - whichever value is smaller.
|
|
191
206
|
|
|
@@ -204,7 +219,7 @@ expand to fill available space.
|
|
|
204
219
|
### Aside
|
|
205
220
|
|
|
206
221
|
<SectionMessage appearance="warning" title="Caution">
|
|
207
|
-
We plan to deprecate aside. Use panel instead.
|
|
222
|
+
We plan to deprecate aside. Use panel instead.
|
|
208
223
|
</SectionMessage>
|
|
209
224
|
|
|
210
225
|
The aside area is rendered to the right of the main area.
|
|
@@ -224,13 +239,16 @@ The aside area is rendered to the right of the main area.
|
|
|
224
239
|
You can optionally render a [panel splitter](#resizable-areas) as a child to make the aside
|
|
225
240
|
resizable.
|
|
226
241
|
|
|
227
|
-
- The aside is resized using the drag handle. When you hover over the drag handle, the mouse pointer
|
|
228
|
-
|
|
242
|
+
- The aside is resized using the drag handle. When you hover over the drag handle, the mouse pointer
|
|
243
|
+
changes to a resize cursor.
|
|
244
|
+
- The aside can be resized to a minimum width of 120px and a maximum width equal to 50% of the
|
|
245
|
+
viewport width.
|
|
229
246
|
- Persist the chosen width across page refreshes by providing it to the `defaultWidth` prop.
|
|
230
247
|
|
|
231
248
|
#### Aside responsive
|
|
232
249
|
|
|
233
|
-
At `s`, `xs`, and `xxs` breakpoints (i.e. viewports smaller than 1024px), the aside moves below the
|
|
250
|
+
At `s`, `xs`, and `xxs` breakpoints (i.e. viewports smaller than 1024px), the aside moves below the
|
|
251
|
+
main area, and conforms to main width and behaviour.
|
|
234
252
|
|
|
235
253
|
### Panel
|
|
236
254
|
|
|
@@ -253,14 +271,17 @@ The panel can be collapsed and expanded using a trigger of your choosing.
|
|
|
253
271
|
You can optionally render a [panel splitter](#resizable-areas) as a child to make the panel
|
|
254
272
|
resizable.
|
|
255
273
|
|
|
256
|
-
- The panel is resized using the drag handle. When you hover over the drag handle, the mouse pointer
|
|
257
|
-
|
|
258
|
-
- The panel
|
|
274
|
+
- The panel is resized using the drag handle. When you hover over the drag handle, the mouse pointer
|
|
275
|
+
changes to a resize cursor.
|
|
276
|
+
- The panel can be resized larger than `defaultWidth` to a maximum of 50% of the content area
|
|
277
|
+
(viewport minus the side nav area). The panel can't be resized smaller than `defaultWidth`.
|
|
278
|
+
- The panel retains its resized width after it's collapsed or expanded. Persist the chosen width
|
|
279
|
+
across page refreshes by providing it to the `defaultWidth` prop.
|
|
259
280
|
|
|
260
281
|
#### Panel responsive
|
|
261
282
|
|
|
262
|
-
At `m` breakpoints (between 1024-1440px), the panel will overlay the aside area. At `s` breakpoints
|
|
263
|
-
below (less than 1024px) it will start to overlay the main area.
|
|
283
|
+
At `m` breakpoints (between 1024-1440px), the panel will overlay the aside area. At `s` breakpoints
|
|
284
|
+
and below (less than 1024px) it will start to overlay the main area.
|
|
264
285
|
|
|
265
286
|
## Resizable areas
|
|
266
287
|
|
|
@@ -20,7 +20,8 @@ import SectionMessage from '@atlaskit/section-message';
|
|
|
20
20
|
Use layout to compose the structure of your application. It also defines the page behavior and
|
|
21
21
|
navigational areas.
|
|
22
22
|
|
|
23
|
-
When applying components to the navigational areas,
|
|
23
|
+
When applying components to the navigational areas,
|
|
24
|
+
[see navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/spaces/navx/pages/5104144812).
|
|
24
25
|
|
|
25
26
|
<Image
|
|
26
27
|
src={layoutAnatomyLight}
|
|
@@ -37,7 +38,8 @@ When applying components to the navigational areas, [see navigation resources (A
|
|
|
37
38
|
<a href="/components/navigation-system/top-nav-items">top nav items</a>.
|
|
38
39
|
<ol type="a">
|
|
39
40
|
<li>
|
|
40
|
-
<strong>Top nav start:</strong> Area for left-aligned actions. Appears in the side nav when
|
|
41
|
+
<strong>Top nav start:</strong> Area for left-aligned actions. Appears in the side nav when
|
|
42
|
+
the side nav is expanded.
|
|
41
43
|
</li>
|
|
42
44
|
<li>
|
|
43
45
|
<strong>Top nav middle:</strong> Area for centre-aligned actions.
|
|
@@ -48,8 +50,9 @@ When applying components to the navigational areas, [see navigation resources (A
|
|
|
48
50
|
</ol>
|
|
49
51
|
</li>
|
|
50
52
|
<li>
|
|
51
|
-
<strong>Side nav:</strong> Use to display
|
|
52
|
-
|
|
53
|
+
<strong>Side nav:</strong> Use to display{' '}
|
|
54
|
+
<a href="https://atlaskit.atlassian.com/packages/navigation/side-nav-items">side nav items</a>.
|
|
55
|
+
Is resizable and collapsible.
|
|
53
56
|
<ol type="a">
|
|
54
57
|
<li>
|
|
55
58
|
<strong>Side nav header:</strong> Optional. Top part of the side nav (fixed).
|
|
@@ -85,18 +88,18 @@ When applying components to the navigational areas, [see navigation resources (A
|
|
|
85
88
|
The main difference between aside, panel and modal dialog is their behaviours:
|
|
86
89
|
|
|
87
90
|
- **Aside** is not collapsible, while **panel** can be collapsible.
|
|
88
|
-
- **Panel** and **aside** present content alongside the **main** area, while a **modal dialog**
|
|
89
|
-
in a layer above the page.
|
|
91
|
+
- **Panel** and **aside** present content alongside the **main** area, while a **modal dialog**
|
|
92
|
+
appears in a layer above the page.
|
|
90
93
|
- On small viewports (1024px and below), the **panel** becomes an overlay, while the **aside** moves
|
|
91
94
|
below the **main** area.
|
|
92
95
|
|
|
93
96
|
#### Usage guidance
|
|
94
97
|
|
|
95
|
-
- Use the **panel** for contextual information or tertiary actions that complement the user's
|
|
96
|
-
Panels enable multitasking by providing an additional work space, while keeping users
|
|
98
|
+
- Use the **panel** for contextual information or tertiary actions that complement the user's
|
|
99
|
+
workflow. Panels enable multitasking by providing an additional work space, while keeping users
|
|
97
100
|
connected to their primary task.
|
|
98
|
-
- Use a **modal dialog** when you need the user to focus on a specific
|
|
99
|
-
|
|
101
|
+
- Use a **modal dialog** when you need the user to focus on a specific task, such as making a
|
|
102
|
+
decision or completing an action, before they can return to their primary task.
|
|
100
103
|
- Don’t use aside for new experiences. It is planned for deprecation.
|
|
101
104
|
|
|
102
105
|
## Best practices
|
|
@@ -19,7 +19,8 @@ import { EndItemExample } from '../../examples/constellation/top-nav-items/end-i
|
|
|
19
19
|
import { TopNavButtonExample } from '../../examples/constellation/top-nav-items/top-nav-button';
|
|
20
20
|
import { CustomTitleExample } from '../../examples/constellation/top-nav-items/custom-title';
|
|
21
21
|
|
|
22
|
-
These components can be used within the top nav from
|
|
22
|
+
These components can be used within the top nav from
|
|
23
|
+
[layout](/components/navigation-system/layout/examples).
|
|
23
24
|
|
|
24
25
|
For other components that can be used within the top nav, see
|
|
25
26
|
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE).
|
|
@@ -32,8 +33,8 @@ area.
|
|
|
32
33
|
- Side nav toggle button: Opens and closes the
|
|
33
34
|
[side nav](/components/navigation-system/layout/examples#side-nav).
|
|
34
35
|
- App switcher: Opens and closes an app switcher. See
|
|
35
|
-
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE)
|
|
36
|
-
|
|
36
|
+
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE) for
|
|
37
|
+
recommended platform components.
|
|
37
38
|
|
|
38
39
|
Use one of the following logo components to orient users and provide a persistent link to the app
|
|
39
40
|
landing page:
|
|
@@ -46,16 +47,22 @@ landing page:
|
|
|
46
47
|
|
|
47
48
|
### Side nav toggle button
|
|
48
49
|
|
|
49
|
-
The side nav toggle button must be passed to `TopNavStart` through the `sideNavToggleButton` prop,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
The side nav toggle button must be passed to `TopNavStart` through the `sideNavToggleButton` prop,
|
|
51
|
+
not via `children`.
|
|
52
|
+
|
|
53
|
+
- When the keyboard shortcut is enabled, the toggle button’s tooltip will automatically show Ctrl+[
|
|
54
|
+
as the shortcut.
|
|
55
|
+
- The toggle button is left-aligned when the side nav is collapsed, and right-aligned when the side
|
|
56
|
+
nav is expanded.
|
|
52
57
|
|
|
53
58
|
<Example Component={TopNavStartToggleExample} />
|
|
54
59
|
|
|
55
60
|
### App logo
|
|
56
61
|
|
|
57
62
|
App logo displays an app [logo icon](/components/logo) and name.
|
|
58
|
-
|
|
63
|
+
|
|
64
|
+
- It has a maximum width of 320px, after which the app name truncates. The app name also truncates
|
|
65
|
+
based on the available space when the side nav is resized.
|
|
59
66
|
- At `s` breakpoints and below (less that 1024px), the app name is not shown.
|
|
60
67
|
|
|
61
68
|
See the [responsive section](#responsive) for more information.
|
|
@@ -65,13 +72,16 @@ See the [responsive section](#responsive) for more information.
|
|
|
65
72
|
### Custom logo
|
|
66
73
|
|
|
67
74
|
Custom logo provides a container for custom logo images with the following constraints:
|
|
68
|
-
|
|
75
|
+
|
|
76
|
+
- Maximum width: 320px. If the image is wider than this, or if space is limited when the side nav is
|
|
77
|
+
resized, the logo will scale down to fit.
|
|
69
78
|
- Maximum height: 24px. If the image is shorter than this, the logo will scale up to fit.
|
|
70
79
|
|
|
71
|
-
Do not provide explicit width and height values on the image, otherwise it will not respect the
|
|
80
|
+
Do not provide explicit width and height values on the image, otherwise it will not respect the
|
|
81
|
+
container size.
|
|
72
82
|
|
|
73
|
-
At `s` breakpoints and below (less that 1024px), only the provided icon is shown. Above `s`
|
|
74
|
-
the provided logo is shown.
|
|
83
|
+
At `s` breakpoints and below (less that 1024px), only the provided icon is shown. Above `s`
|
|
84
|
+
breakpoints, the provided logo is shown.
|
|
75
85
|
|
|
76
86
|
See the [responsive section](#responsive) for more information.
|
|
77
87
|
|
|
@@ -82,7 +92,8 @@ See the [responsive section](#responsive) for more information.
|
|
|
82
92
|
Optional text used for app customisation by customers.
|
|
83
93
|
|
|
84
94
|
- When present, it appears to the right of the logo.
|
|
85
|
-
- It has a maximum width of 200px, after which the text truncates. It also truncates based on the
|
|
95
|
+
- It has a maximum width of 200px, after which the text truncates. It also truncates based on the
|
|
96
|
+
available space when the side nav is resized.
|
|
86
97
|
- At `s` breakpoints and below (less than 1024px), the custom title is not displayed.
|
|
87
98
|
|
|
88
99
|
<Example Component={CustomTitleExample} />
|
|
@@ -94,21 +105,24 @@ These actions go in the
|
|
|
94
105
|
|
|
95
106
|
- They should consist of a search component and a create component, in that order to maintain the
|
|
96
107
|
correct layout behaviour.
|
|
97
|
-
- The actions are centre-aligned when the side nav is collapsed, and left-aligned when the side nav
|
|
98
|
-
|
|
108
|
+
- The actions are centre-aligned when the side nav is collapsed, and left-aligned when the side nav
|
|
109
|
+
is expanded.
|
|
110
|
+
- At `xl` breakpoints (1768px or greater), the middle items are centred in the viewport when the
|
|
111
|
+
side nav is expanded, but are pushed out by the side nav to avoid overlapping.
|
|
99
112
|
- We have provided placeholder components. See
|
|
100
|
-
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE)
|
|
101
|
-
|
|
113
|
+
[navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE) for
|
|
114
|
+
recommended platform components.
|
|
102
115
|
- Our placeholder search field scales to fill the available area of common actions, up to a maximum
|
|
103
116
|
width of 780px. At `xxs` breakpoints (less than 480px), the search field converts to an icon only
|
|
104
117
|
button.
|
|
105
118
|
|
|
106
|
-
See the [responsive section](#responsive) for more information. If you use search or create
|
|
107
|
-
from other packages, you may experience different responsive behaviour.
|
|
119
|
+
See the [responsive section](#responsive) for more information. If you use search or create
|
|
120
|
+
components from other packages, you may experience different responsive behaviour.
|
|
108
121
|
|
|
109
122
|
<SectionMessage>
|
|
110
123
|
|
|
111
|
-
The search bar must be the first child of `TopNavMiddle`, in line with our design specifications.
|
|
124
|
+
The search bar must be the first child of `TopNavMiddle`, in line with our design specifications.
|
|
125
|
+
Otherwise, you may see unexpected layout behavior.
|
|
112
126
|
|
|
113
127
|
</SectionMessage>
|
|
114
128
|
|
|
@@ -116,9 +130,9 @@ The search bar must be the first child of `TopNavMiddle`, in line with our desig
|
|
|
116
130
|
|
|
117
131
|
## End items
|
|
118
132
|
|
|
119
|
-
These actions appear in the
|
|
120
|
-
|
|
121
|
-
order:
|
|
133
|
+
These actions appear in the
|
|
134
|
+
[top nav end](/components/navigation-system/layout/examples#top-nav-slots) area. They are
|
|
135
|
+
right-aligned and provided as a list for accessibility. Contains, in the following order:
|
|
122
136
|
|
|
123
137
|
- Growth button - A placeholder for an upselling button (optional).
|
|
124
138
|
- Chat - A placeholder for a chat panel.
|
|
@@ -127,8 +141,8 @@ order:
|
|
|
127
141
|
- Settings - Use to open and close a settings menu.
|
|
128
142
|
- Profile/Login - A placeholder for an account component.
|
|
129
143
|
|
|
130
|
-
See [navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE)
|
|
131
|
-
|
|
144
|
+
See [navigation resources (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE) for
|
|
145
|
+
recommended platform components for these buttons, or components triggered by these buttons.
|
|
132
146
|
|
|
133
147
|
At `xs` breakpoints and below (less than 768px), these buttons collapse into a single 'More' button.
|
|
134
148
|
|
|
@@ -140,7 +154,8 @@ See the [responsive section](#responsive) for more details.
|
|
|
140
154
|
|
|
141
155
|
If none of the provided end items are suitable, you can create your own icon button using `EndItem`.
|
|
142
156
|
|
|
143
|
-
If you need a more customised button, use [top nav button](#top-nav-button) and wrap it in a list
|
|
157
|
+
If you need a more customised button, use [top nav button](#top-nav-button) and wrap it in a list
|
|
158
|
+
item.
|
|
144
159
|
|
|
145
160
|
<Example Component={EndItemExample} />
|
|
146
161
|
|
|
@@ -153,8 +168,8 @@ A button component that supports theming. The following variants are available:
|
|
|
153
168
|
- Top nav link icon button
|
|
154
169
|
- Top nav button
|
|
155
170
|
|
|
156
|
-
Use this component when you need to add buttons to the top nav. Be aware that adding custom buttons
|
|
157
|
-
across apps.
|
|
171
|
+
Use this component when you need to add buttons to the top nav. Be aware that adding custom buttons
|
|
172
|
+
may negatively impact the consistency across apps.
|
|
158
173
|
|
|
159
174
|
<Example Component={TopNavButtonExample} />
|
|
160
175
|
|
|
@@ -206,10 +221,10 @@ backwards compatibility, and may be deprecated if the Search Platform evolves.
|
|
|
206
221
|
|
|
207
222
|
Do not use [button](/components/button) inside of the top navigation.
|
|
208
223
|
|
|
209
|
-
Use the action components exported from this package (such as `AppSwitcher`), as they
|
|
210
|
-
|
|
224
|
+
Use the action components exported from this package (such as `AppSwitcher`), as they automatically
|
|
225
|
+
consume the custom theme.
|
|
211
226
|
|
|
212
|
-
Custom actions can be created using [end item](#end-item) for icon buttons and
|
|
213
|
-
visible text.
|
|
227
|
+
Custom actions can be created using [end item](#end-item) for icon buttons and
|
|
228
|
+
[top nav button](#top-nav-button) for buttons with visible text.
|
|
214
229
|
|
|
215
230
|
<Example Component={CustomThemingButtonsExample} />
|
|
@@ -19,8 +19,8 @@ import topNavItemsDont2Dark from './images/topNavItems-dont-2-dark.png';
|
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
|
-
Use top nav items to create common utilities in
|
|
23
|
-
|
|
22
|
+
Use top nav items to create common utilities in the top nav within
|
|
23
|
+
[layout](/components/navigation-system/layout/examples).
|
|
24
24
|
|
|
25
25
|
<Image
|
|
26
26
|
src={topNavItemsAnatomyLight}
|
|
@@ -30,9 +30,8 @@ var logoWrapperStyles = {
|
|
|
30
30
|
fullHeightSidebar: "_p12f1osq"
|
|
31
31
|
};
|
|
32
32
|
var iconContainerStyles = {
|
|
33
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg",
|
|
34
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
35
|
-
maxHeightStyles: "_c71l1tcg"
|
|
33
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg",
|
|
34
|
+
fullHeightSidebar: "_1o9zidpf"
|
|
36
35
|
};
|
|
37
36
|
var logoTextStyles = {
|
|
38
37
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
|
|
@@ -82,7 +81,7 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
|
|
|
82
81
|
alignBlock: "center",
|
|
83
82
|
xcss: (0, _react2.cx)(logoWrapperStyles.root, isFhsEnabled && logoWrapperStyles.fullHeightSidebar)
|
|
84
83
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
-
className: (0, _runtime.ax)([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar
|
|
84
|
+
className: (0, _runtime.ax)([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar])
|
|
86
85
|
}, /*#__PURE__*/_react.default.createElement(_logoRenderer.LogoRenderer
|
|
87
86
|
// Top nav always uses the new logo design
|
|
88
87
|
, {
|
|
@@ -21,9 +21,8 @@ const logoWrapperStyles = {
|
|
|
21
21
|
fullHeightSidebar: "_p12f1osq"
|
|
22
22
|
};
|
|
23
23
|
const iconContainerStyles = {
|
|
24
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg",
|
|
25
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
26
|
-
maxHeightStyles: "_c71l1tcg"
|
|
24
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg",
|
|
25
|
+
fullHeightSidebar: "_1o9zidpf"
|
|
27
26
|
};
|
|
28
27
|
const logoTextStyles = {
|
|
29
28
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
|
|
@@ -74,7 +73,7 @@ export const AppLogo = ({
|
|
|
74
73
|
alignBlock: "center",
|
|
75
74
|
xcss: cx(logoWrapperStyles.root, isFhsEnabled && logoWrapperStyles.fullHeightSidebar)
|
|
76
75
|
}, /*#__PURE__*/React.createElement("div", {
|
|
77
|
-
className: ax([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar
|
|
76
|
+
className: ax([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar])
|
|
78
77
|
}, /*#__PURE__*/React.createElement(LogoRenderer
|
|
79
78
|
// Top nav always uses the new logo design
|
|
80
79
|
, {
|
|
@@ -21,9 +21,8 @@ var logoWrapperStyles = {
|
|
|
21
21
|
fullHeightSidebar: "_p12f1osq"
|
|
22
22
|
};
|
|
23
23
|
var iconContainerStyles = {
|
|
24
|
-
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg",
|
|
25
|
-
fullHeightSidebar: "_1o9zidpf"
|
|
26
|
-
maxHeightStyles: "_c71l1tcg"
|
|
24
|
+
root: "_1reo15vq _18m915vq _1e0c1txw _p12f1tcg _c71l1tcg",
|
|
25
|
+
fullHeightSidebar: "_1o9zidpf"
|
|
27
26
|
};
|
|
28
27
|
var logoTextStyles = {
|
|
29
28
|
root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
|
|
@@ -73,7 +72,7 @@ export var AppLogo = function AppLogo(_ref) {
|
|
|
73
72
|
alignBlock: "center",
|
|
74
73
|
xcss: cx(logoWrapperStyles.root, isFhsEnabled && logoWrapperStyles.fullHeightSidebar)
|
|
75
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: ax([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar
|
|
75
|
+
className: ax([iconContainerStyles.root, isFhsEnabled && iconContainerStyles.fullHeightSidebar])
|
|
77
76
|
}, /*#__PURE__*/React.createElement(LogoRenderer
|
|
78
77
|
// Top nav always uses the new logo design
|
|
79
78
|
, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.6",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"author": "Atlassian Pty Ltd",
|
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
],
|
|
25
25
|
"atlaskit:src": "src/index.tsx",
|
|
26
26
|
"atlassian": {
|
|
27
|
+
"react-compiler": {
|
|
28
|
+
"enabled": true,
|
|
29
|
+
"gating": {
|
|
30
|
+
"source": "@atlassian/react-compiler-gating",
|
|
31
|
+
"importSpecifierName": "isReactCompilerActivePlatform"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
27
34
|
"team": "ADS: nav4",
|
|
28
35
|
"website": {
|
|
29
36
|
"name": "Navigation system",
|
|
@@ -113,7 +120,8 @@
|
|
|
113
120
|
"@atlaskit/skeleton": "^2.1.0",
|
|
114
121
|
"@atlaskit/textfield": "^8.2.0",
|
|
115
122
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
116
|
-
"@atlassian/gemini": "^1.
|
|
123
|
+
"@atlassian/gemini": "^1.41.0",
|
|
124
|
+
"@atlassian/react-compiler-gating": "workspace:^",
|
|
117
125
|
"@atlassian/search-dialog": "^9.20.0",
|
|
118
126
|
"@atlassian/ssr-tests": "workspace:^",
|
|
119
127
|
"@atlassian/test-utils": "^1.0.0",
|
|
@@ -166,9 +174,6 @@
|
|
|
166
174
|
"platform_dst_button_chevron_sizing": {
|
|
167
175
|
"type": "boolean"
|
|
168
176
|
},
|
|
169
|
-
"platform-dst-nav-app-icon-height-fix": {
|
|
170
|
-
"type": "boolean"
|
|
171
|
-
},
|
|
172
177
|
"platform-dst-shape-theme-default": {
|
|
173
178
|
"type": "boolean"
|
|
174
179
|
},
|