@atlaskit/navigation-system 7.0.0 → 7.1.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 +19 -0
- package/constellation/layout/examples.mdx +56 -57
- package/constellation/layout/usage.mdx +18 -18
- package/dist/cjs/ui/page-layout/constants.js +2 -8
- package/dist/cjs/ui/page-layout/root.compiled.css +0 -1
- package/dist/cjs/ui/page-layout/root.js +1 -5
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -2
- package/dist/cjs/ui/page-layout/side-nav/side-nav-content.js +1 -20
- package/dist/cjs/ui/page-layout/side-nav/side-nav-header.js +0 -17
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -3
- package/dist/cjs/ui/page-layout/top-nav/top-nav-start.js +3 -15
- package/dist/es2019/ui/page-layout/constants.js +1 -7
- package/dist/es2019/ui/page-layout/root.compiled.css +0 -1
- package/dist/es2019/ui/page-layout/root.js +1 -5
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -2
- package/dist/es2019/ui/page-layout/side-nav/side-nav-content.js +1 -21
- package/dist/es2019/ui/page-layout/side-nav/side-nav-header.js +0 -17
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -3
- package/dist/es2019/ui/page-layout/top-nav/top-nav-start.js +4 -16
- package/dist/esm/ui/page-layout/constants.js +1 -7
- package/dist/esm/ui/page-layout/root.compiled.css +0 -1
- package/dist/esm/ui/page-layout/root.js +1 -5
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.compiled.css +1 -2
- package/dist/esm/ui/page-layout/side-nav/side-nav-content.js +1 -20
- package/dist/esm/ui/page-layout/side-nav/side-nav-header.js +0 -17
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.compiled.css +2 -3
- package/dist/esm/ui/page-layout/top-nav/top-nav-start.js +4 -16
- package/dist/types/ui/page-layout/constants.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/constants.d.ts +0 -5
- package/package.json +12 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 7.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3088f1c2a117a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3088f1c2a117a) -
|
|
8
|
+
Cleanup platform_editor_topnavstart_delay_browser_check flag
|
|
9
|
+
|
|
10
|
+
## 7.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`15acec25cc47f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/15acec25cc47f) -
|
|
15
|
+
Cleans up the `platform_dst_nav4_fhs_feedback_1` feature gate. Scroll lines are now removed, as
|
|
16
|
+
well as other minor visual changes.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 7.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
|
@@ -27,17 +27,16 @@ When composing your page layout ensure that:
|
|
|
27
27
|
These are the distinct areas in the layout. These components are designed to contain other
|
|
28
28
|
components and content.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
[ready-made navigation experiences (Atlassians only)](https://hello.atlassian.net/wiki/x/rBE7MAE).
|
|
30
|
+
[View ready-made navigation experiences](https://hello.atlassian.net/wiki/x/rBE7MAE)
|
|
32
31
|
|
|
33
32
|
### Banner
|
|
34
33
|
|
|
35
|
-
Use the
|
|
34
|
+
Use the banner area to render a [banner](/components/banner) component. It will always display at
|
|
36
35
|
the top of the screen.
|
|
37
36
|
|
|
38
37
|
### Top nav
|
|
39
38
|
|
|
40
|
-
Use the
|
|
39
|
+
Use the top nav area to render [top nav items](/components/navigation-system/top-nav-items).
|
|
41
40
|
|
|
42
41
|
- It will display at the top of the screen, below the banner if one is present. It has a fixed
|
|
43
42
|
height of 48px.
|
|
@@ -47,12 +46,12 @@ Use the `TopNav` to render [top nav items](/components/navigation-system/top-nav
|
|
|
47
46
|
|
|
48
47
|
#### Top nav slots
|
|
49
48
|
|
|
50
|
-
The
|
|
49
|
+
The top nav has three layout components that you must use to position
|
|
51
50
|
[top nav items](/components/navigation-system/top-nav-items) within the top nav flexbox.
|
|
52
51
|
|
|
53
|
-
- `TopNavStart
|
|
54
|
-
- `TopNavMiddle
|
|
55
|
-
- `TopNavEnd
|
|
52
|
+
- `TopNavStart`: Area for left-aligned items.
|
|
53
|
+
- `TopNavMiddle`: Area for centre-aligned items.
|
|
54
|
+
- `TopNavEnd`: Area for right-aligned items.
|
|
56
55
|
|
|
57
56
|
#### Top nav custom theming
|
|
58
57
|
|
|
@@ -60,7 +59,7 @@ See the [custom theming](/components/navigation-system/layout/custom-theming) ta
|
|
|
60
59
|
|
|
61
60
|
### Side nav
|
|
62
61
|
|
|
63
|
-
- Use the
|
|
62
|
+
- Use the side nav area to
|
|
64
63
|
render [side nav items](https://atlaskit.atlassian.com/packages/navigation/side-nav-items). It
|
|
65
64
|
will show on the left of the screen. The default width of the side nav is 320px.
|
|
66
65
|
- Use the [side nav slots](#side-nav-slots) to position content within the side nav.
|
|
@@ -68,13 +67,13 @@ See the [custom theming](/components/navigation-system/layout/custom-theming) ta
|
|
|
68
67
|
|
|
69
68
|
#### Side nav slots
|
|
70
69
|
|
|
71
|
-
The
|
|
72
|
-
|
|
70
|
+
The side nav has three layout components that you can use to position components within the side nav
|
|
71
|
+
flexbox.
|
|
73
72
|
|
|
74
|
-
- `SideNavHeader
|
|
75
|
-
- `SideNavBody
|
|
73
|
+
- `SideNavHeader`: The top part of the side nav.
|
|
74
|
+
- `SideNavBody`: The middle part of the side nav. It acts as a scroll container. It will grow to
|
|
76
75
|
take up the available space — this is used to push the footer to the bottom of the side nav.
|
|
77
|
-
- `SideNavFooter
|
|
76
|
+
- `SideNavFooter`: The bottom part of the side nav.
|
|
78
77
|
|
|
79
78
|
Note: make sure to render `SideNavBody` to ensure that the footer is positioned at the bottom of the
|
|
80
79
|
side nav, simulating a sticky footer.
|
|
@@ -116,13 +115,13 @@ This is useful for toggling the side nav based on a keyboard shortcut.
|
|
|
116
115
|
- In the collapsed state, hovering over the `SideNavToggleButton` from
|
|
117
116
|
[top nav items](/components/navigation-system/top-nav-items/examples#start-items) will trigger the
|
|
118
117
|
side nav to open as an overlay. Moving the curser away will close it. If there are any open
|
|
119
|
-
supported ADS layering components (e.g.
|
|
118
|
+
supported ADS layering components (e.g. popups, dropdown menus) within the side nav, the flyout
|
|
120
119
|
will stay locked open, until the layering components are closed.
|
|
121
120
|
|
|
122
121
|
- The expansion and collapse of the side nav flyout is animated on **supported browsers**.
|
|
123
122
|
Currently, Firefox does not support the animation. Instead, it will instantly expand and collapse.
|
|
124
123
|
|
|
125
|
-
|
|
124
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
126
125
|
|
|
127
126
|
#### Side nav resizing
|
|
128
127
|
|
|
@@ -135,7 +134,7 @@ See the [interactive example (Atlassians only)](https://go.atlassian.com/nav4-in
|
|
|
135
134
|
tooltips) will be closed.
|
|
136
135
|
- The side nav panel splitter can be also double clicked to collapse the side nav.
|
|
137
136
|
|
|
138
|
-
|
|
137
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
139
138
|
|
|
140
139
|
#### Side nav responsive
|
|
141
140
|
|
|
@@ -146,14 +145,14 @@ See the [interactive example (Atlassians only)](https://go.atlassian.com/nav4-in
|
|
|
146
145
|
- At `xs` and `xxs` breakpoints (i.e. viewports smaller than 768px), the max width of the overlay
|
|
147
146
|
side nav is either 320px or 90% of the screen width - whichever value is smaller.
|
|
148
147
|
|
|
149
|
-
|
|
148
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
150
149
|
|
|
151
150
|
### Main
|
|
152
151
|
|
|
153
|
-
Use
|
|
154
|
-
fill available space.
|
|
152
|
+
Use the main area for the [page header](/components/page-header) and main page content. It will
|
|
153
|
+
expand to fill available space.
|
|
155
154
|
|
|
156
|
-
- On large viewports
|
|
155
|
+
- On large viewports main can be fixed, meaning it will have its own scroll container and not use
|
|
157
156
|
the body scroll.
|
|
158
157
|
- On small viewports, the element will always use body scroll, to make it easier to scroll the page
|
|
159
158
|
when the content is tall.
|
|
@@ -161,43 +160,43 @@ fill available space.
|
|
|
161
160
|
### Aside
|
|
162
161
|
|
|
163
162
|
<SectionMessage appearance="warning" title="Caution">
|
|
164
|
-
We are planning on deprecating the
|
|
163
|
+
We are planning on deprecating the aside component. Please use panel instead.
|
|
165
164
|
</SectionMessage>
|
|
166
165
|
|
|
167
|
-
|
|
166
|
+
The aside area is rendered to the right of the main area.
|
|
168
167
|
|
|
169
|
-
- The default width of the
|
|
168
|
+
- The default width of the aside is 330px, and it is
|
|
170
169
|
[resizable](/components/navigation-system/layout/examples#aside-resizing) and
|
|
171
170
|
[responsive](/components/navigation-system/layout/examples#aside-responsive).
|
|
172
|
-
- On large viewports the
|
|
171
|
+
- On large viewports the aside can be fixed, meaning it will have its own scroll container and not
|
|
173
172
|
use the body scroll.
|
|
174
173
|
- On small viewports, the element will always use body scroll, to make it easier to scroll the page
|
|
175
174
|
when the content is tall.
|
|
176
175
|
|
|
177
|
-
|
|
176
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
178
177
|
|
|
179
178
|
#### Aside resizing
|
|
180
179
|
|
|
181
|
-
You can optionally render a [panel splitter](#resizable-areas) as a child to make the
|
|
180
|
+
You can optionally render a [panel splitter](#resizable-areas) as a child to make the aside
|
|
182
181
|
resizable.
|
|
183
182
|
|
|
184
183
|
- It is resized using the drag handle. When hovering on the drag handle the mouse pointer changes to
|
|
185
184
|
a resize pointer.
|
|
186
|
-
- The
|
|
185
|
+
- The aside can be resized to a minimum width of 120px, and a maximum width equal to 50% of the
|
|
187
186
|
total viewport width. It retains this resized width even after refreshing the page.
|
|
188
187
|
|
|
189
|
-
|
|
188
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
190
189
|
|
|
191
190
|
#### Aside responsive
|
|
192
191
|
|
|
193
|
-
At `s`, `xs`, and `xxs` breakpoints (i.e. viewports smaller than 1024px), the
|
|
194
|
-
|
|
192
|
+
At `s`, `xs`, and `xxs` breakpoints (i.e. viewports smaller than 1024px), the aside moves below the
|
|
193
|
+
main area, and conforms to main width and behaviour.
|
|
195
194
|
|
|
196
|
-
|
|
195
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
197
196
|
|
|
198
197
|
### Panel
|
|
199
198
|
|
|
200
|
-
The
|
|
199
|
+
The panel area is rendered to the right of the main and aside areas.
|
|
201
200
|
|
|
202
201
|
- The default width of the panel is 365px, which can be modified using the `defaultWidth` prop.
|
|
203
202
|
- The panel is
|
|
@@ -206,13 +205,13 @@ The `Panel` is rendered to the right of the `Main` and `Aside` areas.
|
|
|
206
205
|
[responsive](/components/navigation-system/layout/examples#panel-responsive).
|
|
207
206
|
|
|
208
207
|
Common usage is to house
|
|
209
|
-
[Preview panel
|
|
208
|
+
[Preview panel](https://atlaskit-website-staging.stg-east.frontend.public.atl-paas.net/#/packages/navigation/preview-panel)
|
|
210
209
|
|
|
211
210
|
#### Panel collapse/expand
|
|
212
211
|
|
|
213
212
|
The panel can be collapsed and expanded using a trigger of your choosing.
|
|
214
213
|
|
|
215
|
-
|
|
214
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
216
215
|
|
|
217
216
|
#### Panel resizing
|
|
218
217
|
|
|
@@ -221,18 +220,18 @@ resizable. It can be resized using the drag handle. When hovering on the drag ha
|
|
|
221
220
|
pointer changes to a resize pointer.
|
|
222
221
|
|
|
223
222
|
- The panel can be resized larger than the `defaultWidth` to a maximum of 50% of content area
|
|
224
|
-
(viewport minus
|
|
223
|
+
(viewport minus the side nav area).
|
|
225
224
|
- It retains this resized width even after collapsing, reopening, or refreshing the page.
|
|
226
225
|
- It has no ability to resize smaller than `defaultWidth`.
|
|
227
226
|
|
|
228
|
-
|
|
227
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
229
228
|
|
|
230
229
|
#### Panel responsive
|
|
231
230
|
|
|
232
|
-
At `m` breakpoints (between 1024-1440px), the
|
|
233
|
-
below (less than 1024px) it will start to overlay the
|
|
231
|
+
At `m` breakpoints (between 1024-1440px), the panel will overlay the aside area. At `s` breakpoints
|
|
232
|
+
and below (less than 1024px) it will start to overlay the main area.
|
|
234
233
|
|
|
235
|
-
|
|
234
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
236
235
|
|
|
237
236
|
## Resizable areas
|
|
238
237
|
|
|
@@ -240,31 +239,31 @@ Render a `PanelSplitter` in a layout area to make it resizable.
|
|
|
240
239
|
|
|
241
240
|
Resizing is supported for the following areas:
|
|
242
241
|
|
|
243
|
-
- [
|
|
242
|
+
- [Side nav](/components/navigation-system/layout/examples#side-nav) - use `SideNavPanelSplitter`
|
|
244
243
|
- [Aside](/components/navigation-system/layout/examples#aside) - use `PanelSplitter`
|
|
245
244
|
- [Panel](/components/navigation-system/layout/examples#panel) - use `PanelSplitter`
|
|
246
245
|
|
|
247
|
-
|
|
246
|
+
[View interactive example](https://go.atlassian.com/nav4-interactive-example)
|
|
248
247
|
|
|
249
|
-
| Area | Default width | Min width | Max width
|
|
250
|
-
| --------- | ------------------ | --------------------- |
|
|
251
|
-
| `SideNav` | 320px | 240px | 50% of viewport width
|
|
252
|
-
| `Aside` | 330px (modifiable) | 120px | 50% of viewport width
|
|
253
|
-
| `Panel` | 365px (modifiable) | Same as default width | 50% of content area (viewport minus
|
|
248
|
+
| Area | Default width | Min width | Max width |
|
|
249
|
+
| --------- | ------------------ | --------------------- | ------------------------------------------------------ |
|
|
250
|
+
| `SideNav` | 320px | 240px | 50% of viewport width |
|
|
251
|
+
| `Aside` | 330px (modifiable) | 120px | 50% of viewport width |
|
|
252
|
+
| `Panel` | 365px (modifiable) | Same as default width | 50% of content area (viewport minus the side nav area) |
|
|
254
253
|
|
|
255
254
|
## Responsive
|
|
256
255
|
|
|
257
256
|
Layout areas respond to the viewport size. See default behaviour below, or the
|
|
258
|
-
[interactive example
|
|
259
|
-
|
|
260
|
-
| Breakpoint | Viewport | Side nav | Aside | Panel
|
|
261
|
-
| ---------- | ------------- | --------------------------- | ------------ |
|
|
262
|
-
| `xxs` | 320 - 479px | Collapsed; opens as overlay | Below
|
|
263
|
-
| `xs` | 480 - 767px | Collapsed; opens as overlay | Below
|
|
264
|
-
| `s` | 768 - 1023px | Collapsed; opens as overlay | Below
|
|
265
|
-
| `m` | 1024 - 1439px | Expanded (inline) | Next to
|
|
266
|
-
| `l` | 1440 - 1767px | Expanded (inline) | Next to
|
|
267
|
-
| `xl` | 1768+px | Expanded (inline) | Next to
|
|
257
|
+
[interactive example](https://go.atlassian.com/nav4-interactive-example).
|
|
258
|
+
|
|
259
|
+
| Breakpoint | Viewport | Side nav | Aside | Panel |
|
|
260
|
+
| ---------- | ------------- | --------------------------- | ------------ | -------------------------------------------------------------------- |
|
|
261
|
+
| `xxs` | 320 - 479px | Collapsed; opens as overlay | Below main | Collapsed; opens as overlay (over the main area) |
|
|
262
|
+
| `xs` | 480 - 767px | Collapsed; opens as overlay | Below main | Collapsed; opens as overlay (over the main area) |
|
|
263
|
+
| `s` | 768 - 1023px | Collapsed; opens as overlay | Below main | Collapsed; opens as overlay (over the main area) |
|
|
264
|
+
| `m` | 1024 - 1439px | Expanded (inline) | Next to main | Collapsed; opens inline (or as overlay if the aside area is present) |
|
|
265
|
+
| `l` | 1440 - 1767px | Expanded (inline) | Next to main | Collapsed; Opens inline |
|
|
266
|
+
| `xl` | 1768+px | Expanded (inline) | Next to main | Collapsed; Opens inline |
|
|
268
267
|
|
|
269
268
|
## Custom skip links
|
|
270
269
|
|
|
@@ -39,9 +39,9 @@ When applying components to the navigational areas,
|
|
|
39
39
|
</ol>
|
|
40
40
|
</li>
|
|
41
41
|
<li>
|
|
42
|
-
<strong>Side nav:</strong> Use to display
|
|
43
|
-
|
|
44
|
-
collapsible.
|
|
42
|
+
<strong>Side nav:</strong> Use to display{' '}
|
|
43
|
+
<a href="https://atlaskit.atlassian.com/packages/navigation/side-nav-items">side nav items</a>.
|
|
44
|
+
Is resizable and collapsible.
|
|
45
45
|
<ol type="a" start="4">
|
|
46
46
|
<li>
|
|
47
47
|
<strong>Side nav header:</strong> Optional. Top part of the side nav (fixed).
|
|
@@ -60,7 +60,7 @@ When applying components to the navigational areas,
|
|
|
60
60
|
</li>
|
|
61
61
|
<li>
|
|
62
62
|
<strong>Aside:</strong> Optional. Use to display supporting or supplementary content. Is
|
|
63
|
-
resizable. <em>We plan to deprecate this component, please use
|
|
63
|
+
resizable. <em>We plan to deprecate this component, please use panel instead.</em>
|
|
64
64
|
</li>
|
|
65
65
|
<li>
|
|
66
66
|
<strong>Panel:</strong> Optional. Use to display supporting or supplementary content. Is
|
|
@@ -68,33 +68,33 @@ When applying components to the navigational areas,
|
|
|
68
68
|
</li>
|
|
69
69
|
</ol>
|
|
70
70
|
|
|
71
|
-
### The difference between
|
|
71
|
+
### The difference between aside, panel and modal dialog
|
|
72
72
|
|
|
73
73
|
<SectionMessage appearance="warning" title="Caution">
|
|
74
|
-
We are planning on deprecating the
|
|
74
|
+
We are planning on deprecating the aside component. Please use panel instead.
|
|
75
75
|
</SectionMessage>
|
|
76
76
|
|
|
77
|
-
The main difference between
|
|
77
|
+
The main difference between aside, panel and modal dialog is their behaviours:
|
|
78
78
|
|
|
79
|
-
- **Aside** is not collapsible, while **
|
|
80
|
-
- **Panel** and **
|
|
79
|
+
- **Aside** is not collapsible, while **panel** can be collapsible.
|
|
80
|
+
- **Panel** and **aside** present content alongside the **main** area, while **modal dialog** exists
|
|
81
81
|
in a layer above the page.
|
|
82
|
-
- On small viewports (1024px and below), the **
|
|
83
|
-
below **
|
|
82
|
+
- On small viewports (1024px and below), the **panel** becomes an overlay, while the **aside** moves
|
|
83
|
+
below **main**.
|
|
84
84
|
|
|
85
85
|
#### Usage guidance:
|
|
86
86
|
|
|
87
|
-
- Use **
|
|
87
|
+
- Use **aside** for content that needs to be constantly visible and accessible without requiring the
|
|
88
88
|
user to open it, or have the ability to close it.
|
|
89
|
-
- Use **
|
|
89
|
+
- Use **panel** for contextual information or tertiary actions that complement the user's workflow.
|
|
90
90
|
Panels enable greater multitasking by functioning as an additional work space, while keeping users
|
|
91
91
|
connected to their primary task.
|
|
92
|
-
- Use **
|
|
92
|
+
- Use **modal dialog** when you need your user to focus their attention on a single or specific
|
|
93
93
|
task, like requiring a decision or action before they can return to their primary task.
|
|
94
94
|
|
|
95
95
|
## Best practices
|
|
96
96
|
|
|
97
|
-
### Design using grid in the
|
|
97
|
+
### Design using grid in the main area
|
|
98
98
|
|
|
99
99
|
<DoDontGrid>
|
|
100
100
|
<DoDont
|
|
@@ -105,8 +105,8 @@ The main difference between Aside, Panel and Modal dialog is their behaviours:
|
|
|
105
105
|
}}
|
|
106
106
|
isFullWidth
|
|
107
107
|
>
|
|
108
|
-
When designing, use <a href="/foundations/grid-beta">
|
|
109
|
-
|
|
108
|
+
When designing, use <a href="/foundations/grid-beta">grid</a> to position content within the
|
|
109
|
+
main area only.
|
|
110
110
|
</DoDont>
|
|
111
111
|
<DoDont
|
|
112
112
|
type="dont"
|
|
@@ -116,7 +116,7 @@ The main difference between Aside, Panel and Modal dialog is their behaviours:
|
|
|
116
116
|
}}
|
|
117
117
|
isFullWidth
|
|
118
118
|
>
|
|
119
|
-
Don't include
|
|
119
|
+
Don't include side nav, aside or panel areas as part of your grid.
|
|
120
120
|
</DoDont>
|
|
121
121
|
</DoDontGrid>
|
|
122
122
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.topNavMountedVar = exports.sideNavVar = exports.sideNavPanelSplitterId = exports.sideNavLiveWidthVar = exports.
|
|
6
|
+
exports.topNavMountedVar = exports.sideNavVar = exports.sideNavPanelSplitterId = exports.sideNavLiveWidthVar = exports.ribbonVar = exports.panelVar = exports.panelPanelSplitterId = exports.openLayerObserverTopNavStartNamespace = exports.openLayerObserverTopNavMiddleNamespace = exports.openLayerObserverTopNavEndNamespace = exports.openLayerObserverSideNavNamespace = exports.localSlotLayers = exports.contentInsetBlockStart = exports.contentHeightWhenFixed = exports.bannerMountedVar = exports.asideVar = exports.asidePanelSplitterId = exports.UNSAFE_topNavVar = exports.UNSAFE_sideNavLayoutVar = exports.UNSAFE_ribbonVar = exports.UNSAFE_panelLayoutVar = exports.UNSAFE_bannerVar = exports.UNSAFE_asideLayoutVar = exports.UNSAFE_MAIN_INLINE_START_FOR_LEGACY_PAGES_ONLY = exports.UNSAFE_MAIN_INLINE_END_FOR_LEGACY_PAGES_ONLY = exports.UNSAFE_MAIN_BLOCK_START_FOR_LEGACY_PAGES_ONLY = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* These variables are shared across the different page layout slots.
|
|
9
9
|
* This violates the [UI styling standard](https://atlassian.design/components/eslint-plugin-ui-styling-standard/no-imported-style-values/usage).
|
|
@@ -76,10 +76,4 @@ var openLayerObserverSideNavNamespace = exports.openLayerObserverSideNavNamespac
|
|
|
76
76
|
// namespaces.
|
|
77
77
|
var openLayerObserverTopNavStartNamespace = exports.openLayerObserverTopNavStartNamespace = 'top-nav-start';
|
|
78
78
|
var openLayerObserverTopNavMiddleNamespace = exports.openLayerObserverTopNavMiddleNamespace = 'top-nav-middle';
|
|
79
|
-
var openLayerObserverTopNavEndNamespace = exports.openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
83
|
-
* The scroll timeline is created in SideNavBody, and then used by TopNavStart to apply the scroll indicator line.
|
|
84
|
-
*/
|
|
85
|
-
var sideNavContentScrollTimelineVar = exports.sideNavContentScrollTimelineVar = '--sNcst';
|
|
79
|
+
var openLayerObserverTopNavEndNamespace = exports.openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
@@ -14,8 +14,6 @@ var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-obs
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _skipLinksProvider = require("../../context/skip-links/skip-links-provider");
|
|
16
16
|
var _topNavStartContextProvider = require("../../context/top-nav-start/top-nav-start-context-provider");
|
|
17
|
-
var _useIsFhsEnabled = require("../fhs-rollout/use-is-fhs-enabled");
|
|
18
|
-
var _constants = require("./constants");
|
|
19
17
|
var _hoistSlotSizesContext = require("./hoist-slot-sizes-context");
|
|
20
18
|
var _elementContext = require("./side-nav/element-context");
|
|
21
19
|
var _isSideNavShortcutEnabledContext = require("./side-nav/is-side-nav-shortcut-enabled-context");
|
|
@@ -26,7 +24,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
26
24
|
var gridRootId = exports.gridRootId = 'unsafe-design-system-page-layout-root';
|
|
27
25
|
var styles = {
|
|
28
26
|
root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _1ciragmp _12fkuz0r _12qzrxre _1rqt70if _xkmgbaui _jbc7rxre _tyve1jg8",
|
|
29
|
-
sideNavScrollTimeline: "_10iwgc9s",
|
|
30
27
|
ribbon: "_12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco"
|
|
31
28
|
};
|
|
32
29
|
|
|
@@ -46,7 +43,6 @@ function Root(_ref) {
|
|
|
46
43
|
_ref$isSideNavShortcu = _ref.isSideNavShortcutEnabled,
|
|
47
44
|
isSideNavShortcutEnabled = _ref$isSideNavShortcu === void 0 ? false : _ref$isSideNavShortcu;
|
|
48
45
|
var ref = (0, _react.useRef)(null);
|
|
49
|
-
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
50
46
|
(0, _react.useEffect)(function () {
|
|
51
47
|
if (process.env.NODE_ENV !== 'production') {
|
|
52
48
|
var IGNORED_ELEMENTS = ['SCRIPT', 'STYLE'];
|
|
@@ -71,7 +67,7 @@ function Root(_ref) {
|
|
|
71
67
|
testId: testId
|
|
72
68
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
69
|
ref: ref,
|
|
74
|
-
className: (0, _runtime.ax)([styles.root,
|
|
70
|
+
className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform_dst_nav4_ribbon_slot') && styles.ribbon, xcss]),
|
|
75
71
|
id: gridRootId,
|
|
76
72
|
"data-testid": testId
|
|
77
73
|
}, children)))))))));
|
|
@@ -6,5 +6,4 @@
|
|
|
6
6
|
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
7
7
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
8
8
|
._i0dlf1ug{flex-basis:0%}
|
|
9
|
-
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
10
|
-
@media (min-width:64rem){@supports (scroll-timeline-axis:block){._1sfqgc9s{scroll-timeline-name:--sNcst}._1q1x1ule{scroll-timeline-axis:block}html:has([data-private-side-nav-header]) ._8pm2gc9s{animation-timeline:--sNcst}html:has([data-private-side-nav-header]) ._1gd94n8p{animation-name:k1gwhnxc}}@supports (scroll-timeline-axis:block){@keyframes k1gwhnxc{0%{box-shadow:none}0.1%{box-shadow:0 -1px var(--ds-border,#0b120e24)}to{box-shadow:0 -1px var(--ds-border,#0b120e24)}}}}
|
|
9
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
@@ -11,10 +11,7 @@ require("./side-nav-content.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _mergeRefs = _interopRequireDefault(require("@atlaskit/ds-lib/merge-refs"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
16
|
-
var _constants = require("../constants");
|
|
17
|
-
var _useSideNavVisibility2 = require("./use-side-nav-visibility");
|
|
18
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
16
|
/**
|
|
20
17
|
* The main content of the side nav, filling up the middle section. It acts as a scroll container.
|
|
@@ -29,20 +26,6 @@ var styles = {
|
|
|
29
26
|
scrollContainer: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo1wug _18m91wug",
|
|
30
27
|
paddingContainer: "_1q51utpp _y4tiutpp _85i5utpp _bozgutpp"
|
|
31
28
|
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Using CSS scroll-driven animations to apply a scrolled indicator border.
|
|
35
|
-
*
|
|
36
|
-
* This approach is better for SSR, as some apps like Confluence will apply the
|
|
37
|
-
* initial scroll position of the side nav content using JS before hydration.
|
|
38
|
-
*
|
|
39
|
-
* If we applied the border through React state it would only appear after hydration,
|
|
40
|
-
* whereas this CSS approach should show even before hydration.
|
|
41
|
-
*/
|
|
42
|
-
var scrolledBorder = null;
|
|
43
|
-
var fullHeightSidebarStyles = {
|
|
44
|
-
scrollContainer: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd94n8p"
|
|
45
|
-
};
|
|
46
29
|
function _SideNavContent(_ref, forwardedRef) {
|
|
47
30
|
var children = _ref.children,
|
|
48
31
|
testId = _ref.testId;
|
|
@@ -51,12 +34,10 @@ function _SideNavContent(_ref, forwardedRef) {
|
|
|
51
34
|
var mergedRef = (0, _react.useMemo)(function () {
|
|
52
35
|
return (0, _mergeRefs.default)([internalRef, forwardedRef]);
|
|
53
36
|
}, [forwardedRef]);
|
|
54
|
-
var _useSideNavVisibility = (0, _useSideNavVisibility2.useSideNavVisibility)(),
|
|
55
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
56
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
38
|
ref: isFhsEnabled ? mergedRef : forwardedRef,
|
|
58
39
|
"data-testid": testId,
|
|
59
|
-
className: (0, _runtime.ax)([styles.scrollContainer
|
|
40
|
+
className: (0, _runtime.ax)([styles.scrollContainer])
|
|
60
41
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
61
42
|
className: (0, _runtime.ax)([styles.paddingContainer])
|
|
62
43
|
}, children));
|
|
@@ -9,7 +9,6 @@ exports.SideNavHeader = void 0;
|
|
|
9
9
|
require("./side-nav-header.compiled.css");
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
13
|
var styles = {
|
|
15
14
|
root: "_18zrutpp _1q51utpp _85i51b66"
|
|
@@ -21,22 +20,6 @@ var styles = {
|
|
|
21
20
|
var SideNavHeader = exports.SideNavHeader = function SideNavHeader(_ref) {
|
|
22
21
|
var children = _ref.children;
|
|
23
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
/**
|
|
25
|
-
* This attribute is used to identify whether the SideNavHeader is mounted, to determine where the
|
|
26
|
-
* SideNavBody's scroll indicator line should be applied. This is for layering reasons -
|
|
27
|
-
* if the scroll indicator line intersects with the top nav, it could incorrectly be hidden beneath
|
|
28
|
-
* the top nav (depending on if a layer is open, which raises the top nav'z z-index).
|
|
29
|
-
*
|
|
30
|
-
* We are using a data attribute and CSS for this logic to ensure it is SSR safe.
|
|
31
|
-
*
|
|
32
|
-
* - If SideNavHeader exists, the scroll indicator line is applied to the SideNavBody. This is safe
|
|
33
|
-
* because the SideNavHeader is between the SideNavBody and TopNavStart, so the scroll indicator line
|
|
34
|
-
* will not intersect with the top nav.
|
|
35
|
-
*
|
|
36
|
-
* - If SideNavHeader does not exist, the scroll indicator line is applied to TopNavStart. This ensures
|
|
37
|
-
* the scroll indicator line is visible even when the top nav has a z-index higher than the side nav.
|
|
38
|
-
*/
|
|
39
|
-
"data-private-side-nav-header": (0, _platformFeatureFlags.fg)('platform_dst_nav4_fhs_feedback_1') ? undefined : 'true',
|
|
40
23
|
className: (0, _runtime.ax)([styles.root])
|
|
41
24
|
}, children);
|
|
42
25
|
};
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
._vchhusvi{box-sizing:border-box}
|
|
13
13
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
14
14
|
@media (prefers-reduced-motion:no-preference){._10t81e03{transition-property:transform}._10t81rjc{transition-property:transform,opacity}._1xq51ytf{transition-timing-function:ease-in-out}._1xq55ucs{transition-timing-function:ease}._mjvc1efy{transform:translateX(calc(100%*var(--animation-direction)))}._bgpzidpf{opacity:0}._mjvc1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}._mjvco0k7{transform:translateX(calc((-2rem + var(--ds-space-050, 4px)*-1)*var(--animation-direction)))}._mjvcyrjp{transform:translateX(calc((2rem + var(--ds-space-050, 4px))*var(--animation-direction)))}._mjvcz12g{transform:translateX(0)}._xrrpfnf5{transition-duration:.2s}._bgpzkb7n{opacity:1}}
|
|
15
|
-
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}.
|
|
16
|
-
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
17
|
-
@supports (scroll-timeline-axis:block){@keyframes khj1qz3{0%{box-shadow:inset 0 -1px 0 0 transparent}0.1%{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}to{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}}html:not(:has([data-private-side-nav-header])) ._5gdsgc9s{animation-timeline:--sNcst}html:not(:has([data-private-side-nav-header])) ._53fr1ybg{animation-name:khj1qz3}html:not(:has([data-private-side-nav-header])) ._bt1c1hrf{animation-fill-mode:both}}
|
|
15
|
+
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmutpp{padding-inline-end:var(--ds-space-150,9pt)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}}
|
|
16
|
+
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
@@ -13,7 +13,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
15
15
|
var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var _topNavStartContext = require("../../../context/top-nav-start/top-nav-start-context");
|
|
19
18
|
var _useIsFhsEnabled = require("../../fhs-rollout/use-is-fhs-enabled");
|
|
@@ -44,12 +43,6 @@ var innerStyles = {
|
|
|
44
43
|
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
45
44
|
};
|
|
46
45
|
|
|
47
|
-
/**
|
|
48
|
-
* The scroll indicator is usually applied in SideNavBody, but if there is no SideNavHeader it is
|
|
49
|
-
* applied in TopNavStart instead for layering reasons. See the comment in SideNavHeader for more details.
|
|
50
|
-
*/
|
|
51
|
-
var scrolledShadow = null;
|
|
52
|
-
|
|
53
46
|
/**
|
|
54
47
|
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
55
48
|
* width of the TopNavStart area.
|
|
@@ -58,10 +51,8 @@ var scrolledShadow = null;
|
|
|
58
51
|
*/
|
|
59
52
|
var wrapperStyles = {
|
|
60
53
|
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
61
|
-
fullHeightSidebarExpanded: "_glte93mn
|
|
62
|
-
|
|
63
|
-
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
64
|
-
fullHeightSidebarExpandedWithFeedback: "_exxmutpp"
|
|
54
|
+
fullHeightSidebarExpanded: "_glte93mn _exxmutpp _4ap3vuon _m7c3kb7n",
|
|
55
|
+
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42"
|
|
65
56
|
};
|
|
66
57
|
|
|
67
58
|
/**
|
|
@@ -143,7 +134,7 @@ var TopNavStartInnerFHS = /*#__PURE__*/(0, _react.forwardRef)(function TopNavSta
|
|
|
143
134
|
}
|
|
144
135
|
}, [sideNavState]);
|
|
145
136
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
146
|
-
className: (0, _runtime.ax)([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded,
|
|
137
|
+
className: (0, _runtime.ax)([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition])
|
|
147
138
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
148
139
|
ref: ref,
|
|
149
140
|
"data-testid": testId,
|
|
@@ -162,9 +153,6 @@ function TopNavStart(_ref3) {
|
|
|
162
153
|
var children = _ref3.children,
|
|
163
154
|
testId = _ref3.testId,
|
|
164
155
|
sideNavToggleButton = _ref3.sideNavToggleButton;
|
|
165
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_topnavstart_delay_browser_check')) {
|
|
166
|
-
isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
167
|
-
}
|
|
168
156
|
var isFhsEnabled = (0, _useIsFhsEnabled.useIsFhsEnabled)();
|
|
169
157
|
var ref = (0, _react.useContext)(_topNavStartContext.TopNavStartAttachRef);
|
|
170
158
|
var elementRef = (0, _react.useRef)(null);
|
|
@@ -70,10 +70,4 @@ export const openLayerObserverSideNavNamespace = 'side-nav';
|
|
|
70
70
|
// namespaces.
|
|
71
71
|
export const openLayerObserverTopNavStartNamespace = 'top-nav-start';
|
|
72
72
|
export const openLayerObserverTopNavMiddleNamespace = 'top-nav-middle';
|
|
73
|
-
export const openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
77
|
-
* The scroll timeline is created in SideNavBody, and then used by TopNavStart to apply the scroll indicator line.
|
|
78
|
-
*/
|
|
79
|
-
export const sideNavContentScrollTimelineVar = '--sNcst';
|
|
73
|
+
export const openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
@@ -6,8 +6,6 @@ import { OpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-ob
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { SkipLinksProvider } from '../../context/skip-links/skip-links-provider';
|
|
8
8
|
import { TopNavStartProvider } from '../../context/top-nav-start/top-nav-start-context-provider';
|
|
9
|
-
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
10
|
-
import { sideNavContentScrollTimelineVar } from './constants';
|
|
11
9
|
import { DangerouslyHoistSlotSizes } from './hoist-slot-sizes-context';
|
|
12
10
|
import { SideNavElementProvider } from './side-nav/element-context';
|
|
13
11
|
import { IsSideNavShortcutEnabledProvider } from './side-nav/is-side-nav-shortcut-enabled-context';
|
|
@@ -18,7 +16,6 @@ import { SideNavVisibilityProvider } from './side-nav/visibility-provider';
|
|
|
18
16
|
export const gridRootId = 'unsafe-design-system-page-layout-root';
|
|
19
17
|
const styles = {
|
|
20
18
|
root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _1ciragmp _12fkuz0r _12qzrxre _1rqt70if _xkmgbaui _jbc7rxre _tyve1jg8",
|
|
21
|
-
sideNavScrollTimeline: "_10iwgc9s",
|
|
22
19
|
ribbon: "_12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco"
|
|
23
20
|
};
|
|
24
21
|
|
|
@@ -36,7 +33,6 @@ export function Root({
|
|
|
36
33
|
isSideNavShortcutEnabled = false
|
|
37
34
|
}) {
|
|
38
35
|
const ref = useRef(null);
|
|
39
|
-
const isFhsEnabled = useIsFhsEnabled();
|
|
40
36
|
useEffect(() => {
|
|
41
37
|
if (process.env.NODE_ENV !== 'production') {
|
|
42
38
|
const IGNORED_ELEMENTS = ['SCRIPT', 'STYLE'];
|
|
@@ -70,7 +66,7 @@ This message will not be displayed in production.
|
|
|
70
66
|
testId: testId
|
|
71
67
|
}, /*#__PURE__*/React.createElement("div", {
|
|
72
68
|
ref: ref,
|
|
73
|
-
className: ax([styles.root,
|
|
69
|
+
className: ax([styles.root, fg('platform_dst_nav4_ribbon_slot') && styles.ribbon, xcss]),
|
|
74
70
|
id: gridRootId,
|
|
75
71
|
"data-testid": testId
|
|
76
72
|
}, children)))))))));
|
|
@@ -6,5 +6,4 @@
|
|
|
6
6
|
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
7
7
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
8
8
|
._i0dlf1ug{flex-basis:0%}
|
|
9
|
-
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
10
|
-
@media (min-width:64rem){@supports (scroll-timeline-axis:block){._1sfqgc9s{scroll-timeline-name:--sNcst}._1q1x1ule{scroll-timeline-axis:block}html:has([data-private-side-nav-header]) ._8pm2gc9s{animation-timeline:--sNcst}html:has([data-private-side-nav-header]) ._1gd913ly{animation-name:k1ywrstg}}@supports (scroll-timeline-axis:block){@keyframes k1ywrstg{0%{box-shadow:none}0.1%{box-shadow:0 -1px var(--ds-border,#0b120e24)}to{box-shadow:0 -1px var(--ds-border,#0b120e24)}}}}
|
|
9
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
@@ -3,10 +3,7 @@ import "./side-nav-content.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useMemo, useRef } from 'react';
|
|
5
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
8
|
-
import { sideNavContentScrollTimelineVar } from '../constants';
|
|
9
|
-
import { useSideNavVisibility } from './use-side-nav-visibility';
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* The main content of the side nav, filling up the middle section. It acts as a scroll container.
|
|
@@ -21,20 +18,6 @@ const styles = {
|
|
|
21
18
|
scrollContainer: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo1wug _18m91wug",
|
|
22
19
|
paddingContainer: "_1q51utpp _y4tiutpp _85i5utpp _bozgutpp"
|
|
23
20
|
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Using CSS scroll-driven animations to apply a scrolled indicator border.
|
|
27
|
-
*
|
|
28
|
-
* This approach is better for SSR, as some apps like Confluence will apply the
|
|
29
|
-
* initial scroll position of the side nav content using JS before hydration.
|
|
30
|
-
*
|
|
31
|
-
* If we applied the border through React state it would only appear after hydration,
|
|
32
|
-
* whereas this CSS approach should show even before hydration.
|
|
33
|
-
*/
|
|
34
|
-
const scrolledBorder = null;
|
|
35
|
-
const fullHeightSidebarStyles = {
|
|
36
|
-
scrollContainer: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd913ly"
|
|
37
|
-
};
|
|
38
21
|
function _SideNavContent({
|
|
39
22
|
children,
|
|
40
23
|
testId
|
|
@@ -42,13 +25,10 @@ function _SideNavContent({
|
|
|
42
25
|
const isFhsEnabled = useIsFhsEnabled();
|
|
43
26
|
const internalRef = useRef(null);
|
|
44
27
|
const mergedRef = useMemo(() => mergeRefs([internalRef, forwardedRef]), [forwardedRef]);
|
|
45
|
-
const {
|
|
46
|
-
isExpandedOnDesktop
|
|
47
|
-
} = useSideNavVisibility();
|
|
48
28
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
29
|
ref: isFhsEnabled ? mergedRef : forwardedRef,
|
|
50
30
|
"data-testid": testId,
|
|
51
|
-
className: ax([styles.scrollContainer
|
|
31
|
+
className: ax([styles.scrollContainer])
|
|
52
32
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
33
|
className: ax([styles.paddingContainer])
|
|
54
34
|
}, children));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./side-nav-header.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
const styles = {
|
|
7
6
|
root: "_18zrutpp _1q51utpp _85i51b66"
|
|
8
7
|
};
|
|
@@ -14,22 +13,6 @@ export const SideNavHeader = ({
|
|
|
14
13
|
children
|
|
15
14
|
}) => {
|
|
16
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
/**
|
|
18
|
-
* This attribute is used to identify whether the SideNavHeader is mounted, to determine where the
|
|
19
|
-
* SideNavBody's scroll indicator line should be applied. This is for layering reasons -
|
|
20
|
-
* if the scroll indicator line intersects with the top nav, it could incorrectly be hidden beneath
|
|
21
|
-
* the top nav (depending on if a layer is open, which raises the top nav'z z-index).
|
|
22
|
-
*
|
|
23
|
-
* We are using a data attribute and CSS for this logic to ensure it is SSR safe.
|
|
24
|
-
*
|
|
25
|
-
* - If SideNavHeader exists, the scroll indicator line is applied to the SideNavBody. This is safe
|
|
26
|
-
* because the SideNavHeader is between the SideNavBody and TopNavStart, so the scroll indicator line
|
|
27
|
-
* will not intersect with the top nav.
|
|
28
|
-
*
|
|
29
|
-
* - If SideNavHeader does not exist, the scroll indicator line is applied to TopNavStart. This ensures
|
|
30
|
-
* the scroll indicator line is visible even when the top nav has a z-index higher than the side nav.
|
|
31
|
-
*/
|
|
32
|
-
"data-private-side-nav-header": fg('platform_dst_nav4_fhs_feedback_1') ? undefined : 'true',
|
|
33
16
|
className: ax([styles.root])
|
|
34
17
|
}, children);
|
|
35
18
|
};
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
._vchhusvi{box-sizing:border-box}
|
|
13
13
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
14
14
|
@media (prefers-reduced-motion:no-preference){._10t81e03{transition-property:transform}._10t81rjc{transition-property:transform,opacity}._1xq51ytf{transition-timing-function:ease-in-out}._1xq55ucs{transition-timing-function:ease}._mjvc1efy{transform:translateX(calc(100%*var(--animation-direction)))}._bgpzidpf{opacity:0}._mjvc1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}._mjvco0k7{transform:translateX(calc((-2rem + var(--ds-space-050, 4px)*-1)*var(--animation-direction)))}._mjvcyrjp{transform:translateX(calc((2rem + var(--ds-space-050, 4px))*var(--animation-direction)))}._mjvcz12g{transform:translateX(0)}._xrrpfnf5{transition-duration:.2s}._bgpzkb7n{opacity:1}}
|
|
15
|
-
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}.
|
|
16
|
-
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
17
|
-
@supports (scroll-timeline-axis:block){@keyframes k1rswljm{0%{box-shadow:inset 0 -1px 0 0 transparent}0.1%{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}to{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}}html:not(:has([data-private-side-nav-header])) ._5gdsgc9s{animation-timeline:--sNcst}html:not(:has([data-private-side-nav-header])) ._53frsjnm{animation-name:k1rswljm}html:not(:has([data-private-side-nav-header])) ._bt1c1hrf{animation-fill-mode:both}}
|
|
15
|
+
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmutpp{padding-inline-end:var(--ds-space-150,9pt)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}}
|
|
16
|
+
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
@@ -4,11 +4,10 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { forwardRef, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
5
5
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
6
6
|
import { OpenLayerObserverNamespaceProvider } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { UNSAFE_useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
9
8
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-context';
|
|
10
9
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
11
|
-
import { openLayerObserverTopNavStartNamespace
|
|
10
|
+
import { openLayerObserverTopNavStartNamespace } from '../constants';
|
|
12
11
|
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
13
12
|
import { SideNavVisibilityState } from '../side-nav/visibility-context';
|
|
14
13
|
|
|
@@ -35,12 +34,6 @@ const innerStyles = {
|
|
|
35
34
|
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
/**
|
|
39
|
-
* The scroll indicator is usually applied in SideNavBody, but if there is no SideNavHeader it is
|
|
40
|
-
* applied in TopNavStart instead for layering reasons. See the comment in SideNavHeader for more details.
|
|
41
|
-
*/
|
|
42
|
-
const scrolledShadow = null;
|
|
43
|
-
|
|
44
37
|
/**
|
|
45
38
|
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
46
39
|
* width of the TopNavStart area.
|
|
@@ -49,10 +42,8 @@ const scrolledShadow = null;
|
|
|
49
42
|
*/
|
|
50
43
|
const wrapperStyles = {
|
|
51
44
|
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
52
|
-
fullHeightSidebarExpanded: "_glte93mn
|
|
53
|
-
|
|
54
|
-
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
55
|
-
fullHeightSidebarExpandedWithFeedback: "_exxmutpp"
|
|
45
|
+
fullHeightSidebarExpanded: "_glte93mn _exxmutpp _4ap3vuon _m7c3kb7n",
|
|
46
|
+
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42"
|
|
56
47
|
};
|
|
57
48
|
|
|
58
49
|
/**
|
|
@@ -137,7 +128,7 @@ const TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS
|
|
|
137
128
|
}
|
|
138
129
|
}, [sideNavState]);
|
|
139
130
|
return /*#__PURE__*/React.createElement("div", {
|
|
140
|
-
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded,
|
|
131
|
+
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition])
|
|
141
132
|
}, /*#__PURE__*/React.createElement("div", {
|
|
142
133
|
ref: ref,
|
|
143
134
|
"data-testid": testId,
|
|
@@ -157,9 +148,6 @@ export function TopNavStart({
|
|
|
157
148
|
testId,
|
|
158
149
|
sideNavToggleButton
|
|
159
150
|
}) {
|
|
160
|
-
if (fg('platform_editor_topnavstart_delay_browser_check')) {
|
|
161
|
-
isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
162
|
-
}
|
|
163
151
|
const isFhsEnabled = useIsFhsEnabled();
|
|
164
152
|
const ref = useContext(TopNavStartAttachRef);
|
|
165
153
|
const elementRef = useRef(null);
|
|
@@ -70,10 +70,4 @@ export var openLayerObserverSideNavNamespace = 'side-nav';
|
|
|
70
70
|
// namespaces.
|
|
71
71
|
export var openLayerObserverTopNavStartNamespace = 'top-nav-start';
|
|
72
72
|
export var openLayerObserverTopNavMiddleNamespace = 'top-nav-middle';
|
|
73
|
-
export var openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
77
|
-
* The scroll timeline is created in SideNavBody, and then used by TopNavStart to apply the scroll indicator line.
|
|
78
|
-
*/
|
|
79
|
-
export var sideNavContentScrollTimelineVar = '--sNcst';
|
|
73
|
+
export var openLayerObserverTopNavEndNamespace = 'top-nav-end';
|
|
@@ -6,8 +6,6 @@ import { OpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-ob
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { SkipLinksProvider } from '../../context/skip-links/skip-links-provider';
|
|
8
8
|
import { TopNavStartProvider } from '../../context/top-nav-start/top-nav-start-context-provider';
|
|
9
|
-
import { useIsFhsEnabled } from '../fhs-rollout/use-is-fhs-enabled';
|
|
10
|
-
import { sideNavContentScrollTimelineVar } from './constants';
|
|
11
9
|
import { DangerouslyHoistSlotSizes } from './hoist-slot-sizes-context';
|
|
12
10
|
import { SideNavElementProvider } from './side-nav/element-context';
|
|
13
11
|
import { IsSideNavShortcutEnabledProvider } from './side-nav/is-side-nav-shortcut-enabled-context';
|
|
@@ -18,7 +16,6 @@ import { SideNavVisibilityProvider } from './side-nav/visibility-provider';
|
|
|
18
16
|
export var gridRootId = 'unsafe-design-system-page-layout-root';
|
|
19
17
|
var styles = {
|
|
20
18
|
root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _1ciragmp _12fkuz0r _12qzrxre _1rqt70if _xkmgbaui _jbc7rxre _tyve1jg8",
|
|
21
|
-
sideNavScrollTimeline: "_10iwgc9s",
|
|
22
19
|
ribbon: "_12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco"
|
|
23
20
|
};
|
|
24
21
|
|
|
@@ -38,7 +35,6 @@ export function Root(_ref) {
|
|
|
38
35
|
_ref$isSideNavShortcu = _ref.isSideNavShortcutEnabled,
|
|
39
36
|
isSideNavShortcutEnabled = _ref$isSideNavShortcu === void 0 ? false : _ref$isSideNavShortcu;
|
|
40
37
|
var ref = useRef(null);
|
|
41
|
-
var isFhsEnabled = useIsFhsEnabled();
|
|
42
38
|
useEffect(function () {
|
|
43
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
44
40
|
var IGNORED_ELEMENTS = ['SCRIPT', 'STYLE'];
|
|
@@ -63,7 +59,7 @@ export function Root(_ref) {
|
|
|
63
59
|
testId: testId
|
|
64
60
|
}, /*#__PURE__*/React.createElement("div", {
|
|
65
61
|
ref: ref,
|
|
66
|
-
className: ax([styles.root,
|
|
62
|
+
className: ax([styles.root, fg('platform_dst_nav4_ribbon_slot') && styles.ribbon, xcss]),
|
|
67
63
|
id: gridRootId,
|
|
68
64
|
"data-testid": testId
|
|
69
65
|
}, children)))))))));
|
|
@@ -6,5 +6,4 @@
|
|
|
6
6
|
._85i5utpp{padding-block-end:var(--ds-space-150,9pt)}
|
|
7
7
|
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
8
8
|
._i0dlf1ug{flex-basis:0%}
|
|
9
|
-
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
10
|
-
@media (min-width:64rem){@supports (scroll-timeline-axis:block){._1sfqgc9s{scroll-timeline-name:--sNcst}._1q1x1ule{scroll-timeline-axis:block}html:has([data-private-side-nav-header]) ._8pm2gc9s{animation-timeline:--sNcst}html:has([data-private-side-nav-header]) ._1gd94n8p{animation-name:k1gwhnxc}}@supports (scroll-timeline-axis:block){@keyframes k1gwhnxc{0%{box-shadow:none}0.1%{box-shadow:0 -1px var(--ds-border,#0b120e24)}to{box-shadow:0 -1px var(--ds-border,#0b120e24)}}}}
|
|
9
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|
|
@@ -3,10 +3,7 @@ import "./side-nav-content.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useMemo, useRef } from 'react';
|
|
5
5
|
import mergeRefs from '@atlaskit/ds-lib/merge-refs';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
8
|
-
import { sideNavContentScrollTimelineVar } from '../constants';
|
|
9
|
-
import { useSideNavVisibility } from './use-side-nav-visibility';
|
|
10
7
|
|
|
11
8
|
/**
|
|
12
9
|
* The main content of the side nav, filling up the middle section. It acts as a scroll container.
|
|
@@ -21,20 +18,6 @@ var styles = {
|
|
|
21
18
|
scrollContainer: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo1wug _18m91wug",
|
|
22
19
|
paddingContainer: "_1q51utpp _y4tiutpp _85i5utpp _bozgutpp"
|
|
23
20
|
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Using CSS scroll-driven animations to apply a scrolled indicator border.
|
|
27
|
-
*
|
|
28
|
-
* This approach is better for SSR, as some apps like Confluence will apply the
|
|
29
|
-
* initial scroll position of the side nav content using JS before hydration.
|
|
30
|
-
*
|
|
31
|
-
* If we applied the border through React state it would only appear after hydration,
|
|
32
|
-
* whereas this CSS approach should show even before hydration.
|
|
33
|
-
*/
|
|
34
|
-
var scrolledBorder = null;
|
|
35
|
-
var fullHeightSidebarStyles = {
|
|
36
|
-
scrollContainer: "_1sfqgc9s _1q1x1ule _8pm2gc9s _1gd94n8p"
|
|
37
|
-
};
|
|
38
21
|
function _SideNavContent(_ref, forwardedRef) {
|
|
39
22
|
var children = _ref.children,
|
|
40
23
|
testId = _ref.testId;
|
|
@@ -43,12 +26,10 @@ function _SideNavContent(_ref, forwardedRef) {
|
|
|
43
26
|
var mergedRef = useMemo(function () {
|
|
44
27
|
return mergeRefs([internalRef, forwardedRef]);
|
|
45
28
|
}, [forwardedRef]);
|
|
46
|
-
var _useSideNavVisibility = useSideNavVisibility(),
|
|
47
|
-
isExpandedOnDesktop = _useSideNavVisibility.isExpandedOnDesktop;
|
|
48
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
30
|
ref: isFhsEnabled ? mergedRef : forwardedRef,
|
|
50
31
|
"data-testid": testId,
|
|
51
|
-
className: ax([styles.scrollContainer
|
|
32
|
+
className: ax([styles.scrollContainer])
|
|
52
33
|
}, /*#__PURE__*/React.createElement("div", {
|
|
53
34
|
className: ax([styles.paddingContainer])
|
|
54
35
|
}, children));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./side-nav-header.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
var styles = {
|
|
7
6
|
root: "_18zrutpp _1q51utpp _85i51b66"
|
|
8
7
|
};
|
|
@@ -13,22 +12,6 @@ var styles = {
|
|
|
13
12
|
export var SideNavHeader = function SideNavHeader(_ref) {
|
|
14
13
|
var children = _ref.children;
|
|
15
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
/**
|
|
17
|
-
* This attribute is used to identify whether the SideNavHeader is mounted, to determine where the
|
|
18
|
-
* SideNavBody's scroll indicator line should be applied. This is for layering reasons -
|
|
19
|
-
* if the scroll indicator line intersects with the top nav, it could incorrectly be hidden beneath
|
|
20
|
-
* the top nav (depending on if a layer is open, which raises the top nav'z z-index).
|
|
21
|
-
*
|
|
22
|
-
* We are using a data attribute and CSS for this logic to ensure it is SSR safe.
|
|
23
|
-
*
|
|
24
|
-
* - If SideNavHeader exists, the scroll indicator line is applied to the SideNavBody. This is safe
|
|
25
|
-
* because the SideNavHeader is between the SideNavBody and TopNavStart, so the scroll indicator line
|
|
26
|
-
* will not intersect with the top nav.
|
|
27
|
-
*
|
|
28
|
-
* - If SideNavHeader does not exist, the scroll indicator line is applied to TopNavStart. This ensures
|
|
29
|
-
* the scroll indicator line is visible even when the top nav has a z-index higher than the side nav.
|
|
30
|
-
*/
|
|
31
|
-
"data-private-side-nav-header": fg('platform_dst_nav4_fhs_feedback_1') ? undefined : 'true',
|
|
32
15
|
className: ax([styles.root])
|
|
33
16
|
}, children);
|
|
34
17
|
};
|
|
@@ -12,6 +12,5 @@
|
|
|
12
12
|
._vchhusvi{box-sizing:border-box}
|
|
13
13
|
[dir=rtl] ._65m41mrw{--animation-direction:-1}
|
|
14
14
|
@media (prefers-reduced-motion:no-preference){._10t81e03{transition-property:transform}._10t81rjc{transition-property:transform,opacity}._1xq51ytf{transition-timing-function:ease-in-out}._1xq55ucs{transition-timing-function:ease}._mjvc1efy{transform:translateX(calc(100%*var(--animation-direction)))}._bgpzidpf{opacity:0}._mjvc1p9u{transform:translateX(calc(-100%*var(--animation-direction)))}._mjvco0k7{transform:translateX(calc((-2rem + var(--ds-space-050, 4px)*-1)*var(--animation-direction)))}._mjvcyrjp{transform:translateX(calc((2rem + var(--ds-space-050, 4px))*var(--animation-direction)))}._mjvcz12g{transform:translateX(0)}._xrrpfnf5{transition-duration:.2s}._bgpzkb7n{opacity:1}}
|
|
15
|
-
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}.
|
|
16
|
-
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
17
|
-
@supports (scroll-timeline-axis:block){@keyframes khj1qz3{0%{box-shadow:inset 0 -1px 0 0 transparent}0.1%{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}to{box-shadow:inset 0 -1px 0 0 var(--ds-border,#0b120e24)}}html:not(:has([data-private-side-nav-header])) ._5gdsgc9s{animation-timeline:--sNcst}html:not(:has([data-private-side-nav-header])) ._53fr1ybg{animation-name:khj1qz3}html:not(:has([data-private-side-nav-header])) ._bt1c1hrf{animation-fill-mode:both}}
|
|
15
|
+
@media (min-width:64rem){._13wnh2mm{position:relative}._1l3vb3bt:after{content:""}._juxdstnw:after{position:absolute}._1vinidpf:after{inset-block-start:0}._1719idpf:after{inset-block-end:0}._e6znidpf:after{inset-inline-end:0}._1kyhe4h9:after{border-inline-end-width:var(--ds-border-width,1px)}._4cwynqa1:after{border-inline-end-style:solid}._435s1l7x:after{border-inline-end-color:var(--ds-border,#0b120e24)}._m7c3idpf:after{opacity:0}._15rin7od{min-width:unset}._glte1osq{width:100%}._glte1ris{width:max-content}._15rip2n4{min-width:330px}._1gs5usvi{box-sizing:border-box}._glte93mn{width:var(--n_sNvlw,100%)}._exxmutpp{padding-inline-end:var(--ds-space-150,9pt)}._4ap3vuon{background-color:var(--ds-surface,#fff)}._m7c3kb7n:after{opacity:1}}
|
|
16
|
+
@media (prefers-reduced-motion:no-preference) and (min-width:64rem){._n8qabrmi:after{transition-property:opacity}._wc72fnf5:after{transition-duration:.2s}._j3mr1v42:after{transition-timing-function:ease-in}}
|
|
@@ -5,11 +5,10 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { forwardRef, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
6
6
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
7
7
|
import { OpenLayerObserverNamespaceProvider } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { UNSAFE_useMediaQuery } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import { TopNavStartAttachRef } from '../../../context/top-nav-start/top-nav-start-context';
|
|
11
10
|
import { useIsFhsEnabled } from '../../fhs-rollout/use-is-fhs-enabled';
|
|
12
|
-
import { openLayerObserverTopNavStartNamespace
|
|
11
|
+
import { openLayerObserverTopNavStartNamespace } from '../constants';
|
|
13
12
|
import { useSideNavVisibility } from '../side-nav/use-side-nav-visibility';
|
|
14
13
|
import { SideNavVisibilityState } from '../side-nav/visibility-context';
|
|
15
14
|
|
|
@@ -36,12 +35,6 @@ var innerStyles = {
|
|
|
36
35
|
fullHeightSidebarExpanded: "_15rin7od _glte1osq"
|
|
37
36
|
};
|
|
38
37
|
|
|
39
|
-
/**
|
|
40
|
-
* The scroll indicator is usually applied in SideNavBody, but if there is no SideNavHeader it is
|
|
41
|
-
* applied in TopNavStart instead for layering reasons. See the comment in SideNavHeader for more details.
|
|
42
|
-
*/
|
|
43
|
-
var scrolledShadow = null;
|
|
44
|
-
|
|
45
38
|
/**
|
|
46
39
|
* Styles for the outer element, that does not have re-enabled pointer events and spans the entire
|
|
47
40
|
* width of the TopNavStart area.
|
|
@@ -50,10 +43,8 @@ var scrolledShadow = null;
|
|
|
50
43
|
*/
|
|
51
44
|
var wrapperStyles = {
|
|
52
45
|
root: "_vchhusvi _bozgutpp _4t3i1osq _13wnh2mm _1l3vb3bt _juxdstnw _1vinidpf _1719idpf _e6znidpf _1kyhe4h9 _4cwynqa1 _435s1l7x _m7c3idpf",
|
|
53
|
-
fullHeightSidebarExpanded: "_glte93mn
|
|
54
|
-
|
|
55
|
-
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42",
|
|
56
|
-
fullHeightSidebarExpandedWithFeedback: "_exxmutpp"
|
|
46
|
+
fullHeightSidebarExpanded: "_glte93mn _exxmutpp _4ap3vuon _m7c3kb7n",
|
|
47
|
+
fullHeightSidebarBorderTransition: "_n8qabrmi _wc72fnf5 _j3mr1v42"
|
|
57
48
|
};
|
|
58
49
|
|
|
59
50
|
/**
|
|
@@ -135,7 +126,7 @@ var TopNavStartInnerFHS = /*#__PURE__*/forwardRef(function TopNavStartInnerFHS(_
|
|
|
135
126
|
}
|
|
136
127
|
}, [sideNavState]);
|
|
137
128
|
return /*#__PURE__*/React.createElement("div", {
|
|
138
|
-
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded,
|
|
129
|
+
className: ax([wrapperStyles.root, isExpandedOnDesktop && wrapperStyles.fullHeightSidebarExpanded, !isFirstRenderRef.current && isExpandedOnDesktop && wrapperStyles.fullHeightSidebarBorderTransition])
|
|
139
130
|
}, /*#__PURE__*/React.createElement("div", {
|
|
140
131
|
ref: ref,
|
|
141
132
|
"data-testid": testId,
|
|
@@ -154,9 +145,6 @@ export function TopNavStart(_ref3) {
|
|
|
154
145
|
var children = _ref3.children,
|
|
155
146
|
testId = _ref3.testId,
|
|
156
147
|
sideNavToggleButton = _ref3.sideNavToggleButton;
|
|
157
|
-
if (fg('platform_editor_topnavstart_delay_browser_check')) {
|
|
158
|
-
isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
159
|
-
}
|
|
160
148
|
var isFhsEnabled = useIsFhsEnabled();
|
|
161
149
|
var ref = useContext(TopNavStartAttachRef);
|
|
162
150
|
var elementRef = useRef(null);
|
|
@@ -48,8 +48,3 @@ export declare const openLayerObserverSideNavNamespace = "side-nav";
|
|
|
48
48
|
export declare const openLayerObserverTopNavStartNamespace = "top-nav-start";
|
|
49
49
|
export declare const openLayerObserverTopNavMiddleNamespace = "top-nav-middle";
|
|
50
50
|
export declare const openLayerObserverTopNavEndNamespace = "top-nav-end";
|
|
51
|
-
/**
|
|
52
|
-
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
53
|
-
* The scroll timeline is created in SideNavBody, and then used by TopNavStart to apply the scroll indicator line.
|
|
54
|
-
*/
|
|
55
|
-
export declare const sideNavContentScrollTimelineVar = "--sNcst";
|
|
@@ -48,8 +48,3 @@ export declare const openLayerObserverSideNavNamespace = "side-nav";
|
|
|
48
48
|
export declare const openLayerObserverTopNavStartNamespace = "top-nav-start";
|
|
49
49
|
export declare const openLayerObserverTopNavMiddleNamespace = "top-nav-middle";
|
|
50
50
|
export declare const openLayerObserverTopNavEndNamespace = "top-nav-end";
|
|
51
|
-
/**
|
|
52
|
-
* CSS scroll timeline variable for the side nav content scroll indicator.
|
|
53
|
-
* The scroll timeline is created in SideNavBody, and then used by TopNavStart to apply the scroll indicator line.
|
|
54
|
-
*/
|
|
55
|
-
export declare const sideNavContentScrollTimelineVar = "--sNcst";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
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",
|
|
@@ -63,20 +63,20 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@atlaskit/analytics-next": "^11.
|
|
67
|
-
"@atlaskit/avatar": "^25.
|
|
66
|
+
"@atlaskit/analytics-next": "^11.2.0",
|
|
67
|
+
"@atlaskit/avatar": "^25.11.0",
|
|
68
68
|
"@atlaskit/button": "^23.10.0",
|
|
69
69
|
"@atlaskit/css": "^0.19.0",
|
|
70
70
|
"@atlaskit/ds-lib": "^6.0.0",
|
|
71
|
-
"@atlaskit/icon": "^33.
|
|
71
|
+
"@atlaskit/icon": "^33.1.0",
|
|
72
72
|
"@atlaskit/layering": "^3.6.0",
|
|
73
73
|
"@atlaskit/logo": "^19.10.0",
|
|
74
74
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
75
75
|
"@atlaskit/popup": "^4.14.0",
|
|
76
76
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
77
|
-
"@atlaskit/primitives": "^18.
|
|
77
|
+
"@atlaskit/primitives": "^18.1.0",
|
|
78
78
|
"@atlaskit/side-nav-items": "^1.12.0",
|
|
79
|
-
"@atlaskit/tokens": "^11.
|
|
79
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
80
80
|
"@atlaskit/tooltip": "^21.0.0",
|
|
81
81
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
82
82
|
"@babel/runtime": "^7.0.0",
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
"@atlaskit/app-provider": "^4.1.0",
|
|
97
97
|
"@atlaskit/badge": "^18.4.0",
|
|
98
98
|
"@atlaskit/banner": "^14.0.0",
|
|
99
|
-
"@atlaskit/breadcrumbs": "^
|
|
100
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
101
|
-
"@atlaskit/form": "^15.
|
|
99
|
+
"@atlaskit/breadcrumbs": "^16.0.0",
|
|
100
|
+
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
101
|
+
"@atlaskit/form": "^15.5.0",
|
|
102
102
|
"@atlaskit/heading": "^5.3.0",
|
|
103
103
|
"@atlaskit/link": "^3.3.0",
|
|
104
104
|
"@atlaskit/lozenge": "^13.5.0",
|
|
105
105
|
"@atlaskit/menu": "^8.4.0",
|
|
106
|
-
"@atlaskit/modal-dialog": "^14.
|
|
106
|
+
"@atlaskit/modal-dialog": "^14.13.0",
|
|
107
107
|
"@atlaskit/onboarding": "^14.5.0",
|
|
108
108
|
"@atlaskit/page-header": "^12.1.0",
|
|
109
109
|
"@atlaskit/page-layout": "^4.2.0",
|
|
@@ -114,11 +114,11 @@
|
|
|
114
114
|
"@atlaskit/textfield": "^8.2.0",
|
|
115
115
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
116
116
|
"@atlassian/gemini": "^1.38.0",
|
|
117
|
-
"@atlassian/search-dialog": "^9.
|
|
117
|
+
"@atlassian/search-dialog": "^9.18.0",
|
|
118
118
|
"@atlassian/ssr-tests": "workspace:^",
|
|
119
119
|
"@atlassian/test-utils": "^1.0.0",
|
|
120
120
|
"@atlassian/testing-library": "^0.4.0",
|
|
121
|
-
"@axe-core/playwright": "^4.
|
|
121
|
+
"@axe-core/playwright": "^4.11.1",
|
|
122
122
|
"@testing-library/react": "^16.3.0",
|
|
123
123
|
"@testing-library/user-event": "^14.4.3",
|
|
124
124
|
"raf-stub": "^2.0.1",
|
|
@@ -147,9 +147,6 @@
|
|
|
147
147
|
"platform_dst_nav4_ribbon_slot": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
|
-
"platform_dst_nav4_fhs_feedback_1": {
|
|
151
|
-
"type": "boolean"
|
|
152
|
-
},
|
|
153
150
|
"platform_dst_nav4_top_nav_increase_height": {
|
|
154
151
|
"type": "boolean"
|
|
155
152
|
},
|
|
@@ -177,9 +174,6 @@
|
|
|
177
174
|
},
|
|
178
175
|
"platform_dst_nav4_flyout_menu_slots_close_button": {
|
|
179
176
|
"type": "boolean"
|
|
180
|
-
},
|
|
181
|
-
"platform_editor_topnavstart_delay_browser_check": {
|
|
182
|
-
"type": "boolean"
|
|
183
177
|
}
|
|
184
178
|
},
|
|
185
179
|
"homepage": "https://atlassian.design/components/navigation-system"
|