@atlaskit/navigation-system 5.38.0 → 5.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/constellation/layout/usage.mdx +23 -22
- package/constellation/side-nav-items/usage.mdx +172 -168
- package/constellation/top-nav-items/usage.mdx +40 -38
- package/dist/cjs/ui/page-layout/panel-splitter/get-width.js +3 -4
- package/dist/cjs/ui/page-layout/panel-splitter/panel-splitter.js +3 -6
- package/dist/es2019/ui/page-layout/panel-splitter/get-width.js +3 -4
- package/dist/es2019/ui/page-layout/panel-splitter/panel-splitter.js +3 -6
- package/dist/esm/ui/page-layout/panel-splitter/get-width.js +3 -4
- package/dist/esm/ui/page-layout/panel-splitter/panel-splitter.js +3 -6
- package/dist/types/components/skip-links/skip-link.d.ts +1 -1
- package/dist/types/context/skip-links/skip-links-context.d.ts +1 -1
- package/dist/types/context/top-nav-start/top-nav-start-context.d.ts +2 -2
- package/dist/types/entry-points/side-nav-items/flyout-menu-item.d.ts +1 -1
- package/dist/types/ui/fhs-rollout/is-custom-is-fhs-enabled-context.d.ts +1 -1
- package/dist/types/ui/fhs-rollout/is-fhs-enabled-context.d.ts +1 -1
- package/dist/types/ui/page-layout/hoist-slot-sizes-context.d.ts +1 -1
- package/dist/types/ui/page-layout/panel-splitter/context.d.ts +2 -2
- package/dist/types/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
- package/dist/types/ui/page-layout/side-nav/toggle-button-context.d.ts +2 -2
- package/dist/types/ui/page-layout/side-nav/visibility-context.d.ts +2 -2
- package/dist/types/ui/top-nav-items/themed/has-custom-theme-context.d.ts +1 -1
- package/dist/types-ts4.5/components/skip-links/skip-link.d.ts +1 -1
- package/dist/types-ts4.5/context/skip-links/skip-links-context.d.ts +1 -1
- package/dist/types-ts4.5/context/top-nav-start/top-nav-start-context.d.ts +2 -2
- package/dist/types-ts4.5/entry-points/side-nav-items/flyout-menu-item.d.ts +1 -1
- package/dist/types-ts4.5/ui/fhs-rollout/is-custom-is-fhs-enabled-context.d.ts +1 -1
- package/dist/types-ts4.5/ui/fhs-rollout/is-fhs-enabled-context.d.ts +1 -1
- package/dist/types-ts4.5/ui/page-layout/hoist-slot-sizes-context.d.ts +1 -1
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/context.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button-context.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/side-nav/visibility-context.d.ts +2 -2
- package/dist/types-ts4.5/ui/top-nav-items/themed/has-custom-theme-context.d.ts +1 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 5.39.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c987f6814195b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c987f6814195b) -
|
|
8
|
+
Fixes a bug where the panel splitter would not be resizable when some browser extensions were
|
|
9
|
+
installed. This change was previousuly behind the feature flag
|
|
10
|
+
`platform-dst-panel-splitter-drag-start-client-x`, which has now been cleaned up.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 5.38.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`ceba2f0da51d4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ceba2f0da51d4) -
|
|
21
|
+
Add @starting-style to ESLint ignoredAtRules to allow usage without eslint-disable comments
|
|
22
|
+
|
|
3
23
|
## 5.38.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
@@ -96,28 +96,29 @@ The main difference between Aside, Panel and Modal dialog is their behaviours:
|
|
|
96
96
|
|
|
97
97
|
### Design using grid in the Main area
|
|
98
98
|
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<DoDont
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
>
|
|
119
|
-
|
|
120
|
-
</DoDont>
|
|
99
|
+
<DoDontGrid>
|
|
100
|
+
<DoDont
|
|
101
|
+
type="do"
|
|
102
|
+
image={{
|
|
103
|
+
url: layoutDo,
|
|
104
|
+
alt: 'A layout with a grid overlay on the Main area.',
|
|
105
|
+
}}
|
|
106
|
+
isFullWidth
|
|
107
|
+
>
|
|
108
|
+
When designing, use <a href="/foundations/grid-beta">Grid</a> to position content within the
|
|
109
|
+
Main area only.
|
|
110
|
+
</DoDont>
|
|
111
|
+
<DoDont
|
|
112
|
+
type="dont"
|
|
113
|
+
image={{
|
|
114
|
+
url: layoutDont,
|
|
115
|
+
alt: 'A layout with a grid overlay on the Main area, but also on the Side nav, Aside and Panel areas.',
|
|
116
|
+
}}
|
|
117
|
+
isFullWidth
|
|
118
|
+
>
|
|
119
|
+
Don't include Side nav, Aside or Panel areas as part of your Grid.
|
|
120
|
+
</DoDont>
|
|
121
|
+
</DoDontGrid>
|
|
121
122
|
|
|
122
123
|
## Related
|
|
123
124
|
|
|
@@ -96,25 +96,26 @@ Side nav menus are reserved for use directly within the
|
|
|
96
96
|
Menus anywhere else in the app, including those triggered from the top navigation, should also use
|
|
97
97
|
regular [menu](/components/menu) or [dropdown menu](/components/dropdown-menu).
|
|
98
98
|
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<DoDont
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
>
|
|
116
|
-
|
|
117
|
-
</DoDont>
|
|
99
|
+
<DoDontGrid>
|
|
100
|
+
<DoDont
|
|
101
|
+
type="do"
|
|
102
|
+
image={{
|
|
103
|
+
url: sideNavDo1,
|
|
104
|
+
alt: 'A side nav with side nav items only.',
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
Use side nav menus directly in the side nav or flyout menu content.
|
|
108
|
+
</DoDont>
|
|
109
|
+
<DoDont
|
|
110
|
+
type="dont"
|
|
111
|
+
image={{
|
|
112
|
+
url: sideNavDont1,
|
|
113
|
+
alt: 'Side nav items incorrectly used in the top nav.',
|
|
114
|
+
}}
|
|
115
|
+
>
|
|
116
|
+
Don’t use side nav menus in other parts of the app.
|
|
117
|
+
</DoDont>
|
|
118
|
+
</DoDontGrid>
|
|
118
119
|
|
|
119
120
|
### Use dropdown menu for menus triggered from the side nav
|
|
120
121
|
|
|
@@ -124,56 +125,54 @@ Ensure you follow the general usage guidance for dropdown menu and use the follo
|
|
|
124
125
|
- default density (cozy)
|
|
125
126
|
- default placement (bottom-start; adjusts accordingly when space is limited)
|
|
126
127
|
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<DoDont
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
>
|
|
145
|
-
|
|
146
|
-
</DoDont>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
>
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
>
|
|
175
|
-
Don’t use disabled menu items, see [menu](/components/menu/usage) guidance.
|
|
176
|
-
</DoDont>
|
|
128
|
+
<DoDontGrid>
|
|
129
|
+
<DoDont
|
|
130
|
+
type="do"
|
|
131
|
+
image={{
|
|
132
|
+
url: sideNavDo2,
|
|
133
|
+
alt: 'An open dropdown menu with a list of items.',
|
|
134
|
+
}}
|
|
135
|
+
isFullWidth
|
|
136
|
+
>
|
|
137
|
+
Use dropdown menu for menus triggered by actions or actionsOnHover.
|
|
138
|
+
</DoDont>
|
|
139
|
+
<DoDont
|
|
140
|
+
type="dont"
|
|
141
|
+
image={{
|
|
142
|
+
url: sideNavDont2,
|
|
143
|
+
alt: 'A dropdown menu with a list of items.',
|
|
144
|
+
}}
|
|
145
|
+
>
|
|
146
|
+
Don’t use side nav menu in dropdown menus.
|
|
147
|
+
</DoDont>
|
|
148
|
+
<DoDont
|
|
149
|
+
type="dont"
|
|
150
|
+
image={{
|
|
151
|
+
url: sideNavDont3,
|
|
152
|
+
alt: 'A dropdown menu with menu item that uses compact density.',
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
Don’t use compact density for dropdown menus.
|
|
156
|
+
</DoDont>
|
|
157
|
+
<DoDont
|
|
158
|
+
type="dont"
|
|
159
|
+
image={{
|
|
160
|
+
url: sideNavDont4,
|
|
161
|
+
alt: 'A dropdown menu with menu item that does not have a selected state.',
|
|
162
|
+
}}
|
|
163
|
+
>
|
|
164
|
+
Don’t omit the selected state on the dropdown trigger when open.
|
|
165
|
+
</DoDont>
|
|
166
|
+
<DoDont
|
|
167
|
+
type="dont"
|
|
168
|
+
image={{
|
|
169
|
+
url: sideNavDont5,
|
|
170
|
+
alt: 'A dropdown menu with a disabled menu item.',
|
|
171
|
+
}}
|
|
172
|
+
>
|
|
173
|
+
Don’t use disabled menu items, see [menu](/components/menu/usage) guidance.
|
|
174
|
+
</DoDont>
|
|
175
|
+
</DoDontGrid>
|
|
177
176
|
|
|
178
177
|
## Best practices
|
|
179
178
|
|
|
@@ -185,25 +184,26 @@ Use [`elemBefore`](/components/navigation-system/side-nav-items/examples#elembef
|
|
|
185
184
|
[`actionsOnHover`](/components/navigation-system/side-nav-items/examples#actions-and-actionsonhover)
|
|
186
185
|
slots for configuring menu items.
|
|
187
186
|
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
<DoDont
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
>
|
|
205
|
-
|
|
206
|
-
</DoDont>
|
|
187
|
+
<DoDontGrid>
|
|
188
|
+
<DoDont
|
|
189
|
+
type="do"
|
|
190
|
+
image={{
|
|
191
|
+
url: sideNavDo3,
|
|
192
|
+
alt: 'A menu item with "Templates" label and "TRY" text properly placed in a designated slot on the right.',
|
|
193
|
+
}}
|
|
194
|
+
>
|
|
195
|
+
Use the slots in side nav menus as intended.
|
|
196
|
+
</DoDont>
|
|
197
|
+
<DoDont
|
|
198
|
+
type="dont"
|
|
199
|
+
image={{
|
|
200
|
+
url: sideNavDont6,
|
|
201
|
+
alt: 'A menu item with "Templates" label and "TRY" text incorrectly placed within the same text area.',
|
|
202
|
+
}}
|
|
203
|
+
>
|
|
204
|
+
Don't add custom elements where they're not intended, such as within the label.
|
|
205
|
+
</DoDont>
|
|
206
|
+
</DoDontGrid>
|
|
207
207
|
|
|
208
208
|
### Apply icon sizes correctly
|
|
209
209
|
|
|
@@ -215,26 +215,27 @@ Consider the following when applying icon sizes:
|
|
|
215
215
|
- Chevrons always use small (12px) icons, regardless of where they're being applied.
|
|
216
216
|
- All icons in side nav menu items use [spacious padding](/components/icon/examples#spacing-props).
|
|
217
217
|
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<DoDont
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
>
|
|
236
|
-
|
|
237
|
-
</DoDont>
|
|
218
|
+
<DoDontGrid>
|
|
219
|
+
<DoDont
|
|
220
|
+
type="do"
|
|
221
|
+
image={{
|
|
222
|
+
url: sideNavDo4,
|
|
223
|
+
alt: 'A menu item with "Projects" label, 16px rocket icon on the left, and 12px plus and ellipsis icons on the right.',
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
226
|
+
Use small (12px) icons for actions, actionOnHover, and elemAfter. Use default (medium 16px)
|
|
227
|
+
icons for elemBefore.
|
|
228
|
+
</DoDont>
|
|
229
|
+
<DoDont
|
|
230
|
+
type="dont"
|
|
231
|
+
image={{
|
|
232
|
+
url: sideNavDont7,
|
|
233
|
+
alt: 'A menu item with "Projects" label, rocket icon, and incorrectly sized plus and ellipsis icons on the right.',
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
Don't use incorrect icons sizes in menu items, which can feel unbalanced.
|
|
237
|
+
</DoDont>
|
|
238
|
+
</DoDontGrid>
|
|
238
239
|
|
|
239
240
|
### Apply icon button correctly
|
|
240
241
|
|
|
@@ -243,49 +244,51 @@ such as in `actions` and `actionsOnHover`, or `elemBefore` in expandable menu it
|
|
|
243
244
|
|
|
244
245
|
For `actions` and `actionsOnHover`, when there is more than one icon button, use 4px spacing.
|
|
245
246
|
|
|
246
|
-
<
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
<DoDont
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
>
|
|
263
|
-
|
|
264
|
-
</DoDont>
|
|
247
|
+
<DoDontGrid>
|
|
248
|
+
<DoDont
|
|
249
|
+
type="do"
|
|
250
|
+
image={{
|
|
251
|
+
url: sideNavDo5,
|
|
252
|
+
alt: 'A menu item with "Projects" label, rocket icon, and subtle compact plus and ellipsis icon buttons with hover tooltip.',
|
|
253
|
+
}}
|
|
254
|
+
>
|
|
255
|
+
Use subtle compact icon buttons in side nav menu items.
|
|
256
|
+
</DoDont>
|
|
257
|
+
<DoDont
|
|
258
|
+
type="dont"
|
|
259
|
+
image={{
|
|
260
|
+
url: sideNavDont8,
|
|
261
|
+
alt: 'A menu item with "Projects" label, rocket icon, and default icon buttons instead of subtle compact ones.',
|
|
262
|
+
}}
|
|
263
|
+
>
|
|
264
|
+
Don't use default icon buttons in side nav menu items.
|
|
265
|
+
</DoDont>
|
|
266
|
+
</DoDontGrid>
|
|
265
267
|
|
|
266
268
|
### Use ContainerAvatar
|
|
267
269
|
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<DoDont
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
>
|
|
287
|
-
|
|
288
|
-
</DoDont>
|
|
270
|
+
<DoDontGrid>
|
|
271
|
+
<DoDont
|
|
272
|
+
type="do"
|
|
273
|
+
image={{
|
|
274
|
+
url: sideNavDo6,
|
|
275
|
+
alt: 'A menu item with "Mobile app" label and ContainerAvatar icon on the left.',
|
|
276
|
+
}}
|
|
277
|
+
>
|
|
278
|
+
Use{' '}
|
|
279
|
+
<a href="/components/navigation-system/side-nav-items/code#containeravatar">ContainerAvatar</a>{' '}
|
|
280
|
+
in side nav menu items, which are designed with the correct size and spacing.
|
|
281
|
+
</DoDont>
|
|
282
|
+
<DoDont
|
|
283
|
+
type="dont"
|
|
284
|
+
image={{
|
|
285
|
+
url: sideNavDont9,
|
|
286
|
+
alt: 'A menu item with "Mobile app" label and regular avatar icon instead of ContainerAvatar.',
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
Don't use <a href="/components/avatar">regular avatar</a> in side nav menu items.
|
|
290
|
+
</DoDont>
|
|
291
|
+
</DoDontGrid>
|
|
289
292
|
|
|
290
293
|
## Content guidelines
|
|
291
294
|
|
|
@@ -296,26 +299,27 @@ or feature name that has been approved by legal.
|
|
|
296
299
|
|
|
297
300
|
If the menu name is user generated, display as is.
|
|
298
301
|
|
|
299
|
-
<
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
<DoDont
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
>
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
</DoDont>
|
|
302
|
+
<DoDontGrid>
|
|
303
|
+
<DoDont
|
|
304
|
+
type="do"
|
|
305
|
+
image={{
|
|
306
|
+
url: sideNavDo7,
|
|
307
|
+
alt: 'A menu item with "For you" label using sentence case.',
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
Only capitalize the first letter of the first word of the label.
|
|
311
|
+
</DoDont>
|
|
312
|
+
<DoDont
|
|
313
|
+
type="dont"
|
|
314
|
+
image={{
|
|
315
|
+
url: sideNavDont10,
|
|
316
|
+
alt: 'A menu item with "For You" label using title case.',
|
|
317
|
+
}}
|
|
318
|
+
>
|
|
319
|
+
Don't capitalize other parts of the label unless it is a trademarked app or feature name (not
|
|
320
|
+
all features are capitalized).
|
|
321
|
+
</DoDont>
|
|
322
|
+
</DoDontGrid>
|
|
319
323
|
|
|
320
324
|
## Related
|
|
321
325
|
|
|
@@ -30,47 +30,49 @@ navigation follows Atlassian patterns consistently,
|
|
|
30
30
|
|
|
31
31
|
### Use the top nav items provided
|
|
32
32
|
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<DoDont
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
|
|
51
|
-
</DoDont>
|
|
33
|
+
<DoDontGrid>
|
|
34
|
+
<DoDont
|
|
35
|
+
type="do"
|
|
36
|
+
image={{
|
|
37
|
+
url: topNavDo1,
|
|
38
|
+
alt: 'Two buttons, one outlined and one solid purple, both labeled "Button".',
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
Use the top nav items provided.
|
|
42
|
+
</DoDont>
|
|
43
|
+
<DoDont
|
|
44
|
+
type="dont"
|
|
45
|
+
image={{
|
|
46
|
+
url: topNavDont1,
|
|
47
|
+
alt: 'Two buttons, one outlined and one solid purple, both labeled "Button".',
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
Don't use regular button in the top nav, as it won't respect custom theming.
|
|
51
|
+
</DoDont>
|
|
52
|
+
</DoDontGrid>
|
|
52
53
|
|
|
53
54
|
### Don't add elements to the top nav area
|
|
54
55
|
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<DoDont
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
>
|
|
72
|
-
|
|
73
|
-
</DoDont>
|
|
56
|
+
<DoDontGrid>
|
|
57
|
+
<DoDont
|
|
58
|
+
type="do"
|
|
59
|
+
image={{
|
|
60
|
+
url: topNavDo2,
|
|
61
|
+
alt: 'A segment of a top navigation bar showing standard Atlassian icons and a highlighted "ate" item.',
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
Use the top nav items as intended.
|
|
65
|
+
</DoDont>
|
|
66
|
+
<DoDont
|
|
67
|
+
type="dont"
|
|
68
|
+
image={{
|
|
69
|
+
url: topNavDont2,
|
|
70
|
+
alt: 'A segment of a top navigation bar showing standard Atlassian icons with an additional "Logout" button and a diamond icon.',
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
Don't add elements to the top nav, which may negatively impact consistency across apps.
|
|
74
|
+
</DoDont>
|
|
75
|
+
</DoDontGrid>
|
|
74
76
|
|
|
75
77
|
## Related
|
|
76
78
|
|
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getWidthFromDragLocation = exports.getPixelWidth = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
/**
|
|
9
|
-
* ⚠️ Note: We are
|
|
10
|
-
* can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
8
|
+
* ⚠️ Note: We are using the initial client location captured from the mousedown event, not from the dragstart event.
|
|
9
|
+
* Some browser extensions can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
11
10
|
*/
|
|
12
11
|
var getWidthFromDragLocation = exports.getWidthFromDragLocation = function getWidthFromDragLocation(_ref) {
|
|
13
12
|
var initialWidth = _ref.initialWidth,
|
|
@@ -15,7 +14,7 @@ var getWidthFromDragLocation = exports.getWidthFromDragLocation = function getWi
|
|
|
15
14
|
initialClientX = _ref.initialClientX,
|
|
16
15
|
direction = _ref.direction,
|
|
17
16
|
position = _ref.position;
|
|
18
|
-
var diffX = location.current.input.clientX -
|
|
17
|
+
var diffX = location.current.input.clientX - initialClientX;
|
|
19
18
|
|
|
20
19
|
// Resize line is positioned at the inline-end (right) of the element.
|
|
21
20
|
// If the direction is left-to-right, the width will increase when the mouse is moved to the right, and vice versa.
|
|
@@ -19,7 +19,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
19
19
|
var _bindEventListener = require("bind-event-listener");
|
|
20
20
|
var _reactDom = require("react-dom");
|
|
21
21
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
22
|
-
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
23
22
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
24
23
|
var _useStableRef = _interopRequireDefault(require("@atlaskit/ds-lib/use-stable-ref"));
|
|
25
24
|
var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-observer");
|
|
@@ -210,12 +209,12 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
210
209
|
* I also tried only binding an event listener inside pragmatic-drag-and-drop's `onDragStart`, which seemd to work
|
|
211
210
|
* but did not feel as robust, and might have timing issues as it happens slightly later.
|
|
212
211
|
*/
|
|
213
|
-
(0,
|
|
212
|
+
(0, _bindEventListener.bind)(splitter, {
|
|
214
213
|
type: 'mousedown',
|
|
215
214
|
listener: function listener(event) {
|
|
216
215
|
initialClientXRef.current = event.clientX;
|
|
217
216
|
}
|
|
218
|
-
})
|
|
217
|
+
}), (0, _adapter.draggable)({
|
|
219
218
|
element: splitter,
|
|
220
219
|
onGenerateDragPreview: function onGenerateDragPreview(_ref4) {
|
|
221
220
|
var nativeSetDragImage = _ref4.nativeSetDragImage;
|
|
@@ -272,9 +271,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
272
271
|
initialWidth = _source$data.initialWidth,
|
|
273
272
|
resizeBounds = _source$data.resizeBounds,
|
|
274
273
|
direction = _source$data.direction;
|
|
275
|
-
|
|
276
|
-
(0, _tinyInvariant.default)(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
277
|
-
}
|
|
274
|
+
(0, _tinyInvariant.default)(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
278
275
|
|
|
279
276
|
/**
|
|
280
277
|
* How wide the element would be if there were no width constraints,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
/**
|
|
3
|
-
* ⚠️ Note: We are
|
|
4
|
-
* can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
2
|
+
* ⚠️ Note: We are using the initial client location captured from the mousedown event, not from the dragstart event.
|
|
3
|
+
* Some browser extensions can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
5
4
|
*/
|
|
6
5
|
export const getWidthFromDragLocation = ({
|
|
7
6
|
initialWidth,
|
|
@@ -10,7 +9,7 @@ export const getWidthFromDragLocation = ({
|
|
|
10
9
|
direction,
|
|
11
10
|
position
|
|
12
11
|
}) => {
|
|
13
|
-
const diffX = location.current.input.clientX -
|
|
12
|
+
const diffX = location.current.input.clientX - initialClientX;
|
|
14
13
|
|
|
15
14
|
// Resize line is positioned at the inline-end (right) of the element.
|
|
16
15
|
// If the direction is left-to-right, the width will increase when the mouse is moved to the right, and vice versa.
|
|
@@ -7,7 +7,6 @@ import { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useSta
|
|
|
7
7
|
import { bind } from 'bind-event-listener';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
9
|
import invariant from 'tiny-invariant';
|
|
10
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
11
10
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
12
11
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
13
12
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
@@ -193,12 +192,12 @@ const PortaledPanelSplitter = ({
|
|
|
193
192
|
* I also tried only binding an event listener inside pragmatic-drag-and-drop's `onDragStart`, which seemd to work
|
|
194
193
|
* but did not feel as robust, and might have timing issues as it happens slightly later.
|
|
195
194
|
*/
|
|
196
|
-
|
|
195
|
+
bind(splitter, {
|
|
197
196
|
type: 'mousedown',
|
|
198
197
|
listener: event => {
|
|
199
198
|
initialClientXRef.current = event.clientX;
|
|
200
199
|
}
|
|
201
|
-
})
|
|
200
|
+
}), draggable({
|
|
202
201
|
element: splitter,
|
|
203
202
|
onGenerateDragPreview: ({
|
|
204
203
|
nativeSetDragImage
|
|
@@ -259,9 +258,7 @@ const PortaledPanelSplitter = ({
|
|
|
259
258
|
resizeBounds,
|
|
260
259
|
direction
|
|
261
260
|
} = source.data;
|
|
262
|
-
|
|
263
|
-
invariant(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
264
|
-
}
|
|
261
|
+
invariant(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
265
262
|
|
|
266
263
|
/**
|
|
267
264
|
* How wide the element would be if there were no width constraints,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
/**
|
|
3
|
-
* ⚠️ Note: We are
|
|
4
|
-
* can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
2
|
+
* ⚠️ Note: We are using the initial client location captured from the mousedown event, not from the dragstart event.
|
|
3
|
+
* Some browser extensions can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
5
4
|
*/
|
|
6
5
|
export var getWidthFromDragLocation = function getWidthFromDragLocation(_ref) {
|
|
7
6
|
var initialWidth = _ref.initialWidth,
|
|
@@ -9,7 +8,7 @@ export var getWidthFromDragLocation = function getWidthFromDragLocation(_ref) {
|
|
|
9
8
|
initialClientX = _ref.initialClientX,
|
|
10
9
|
direction = _ref.direction,
|
|
11
10
|
position = _ref.position;
|
|
12
|
-
var diffX = location.current.input.clientX -
|
|
11
|
+
var diffX = location.current.input.clientX - initialClientX;
|
|
13
12
|
|
|
14
13
|
// Resize line is positioned at the inline-end (right) of the element.
|
|
15
14
|
// If the direction is left-to-right, the width will increase when the mouse is moved to the right, and vice versa.
|
|
@@ -13,7 +13,6 @@ import { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useSta
|
|
|
13
13
|
import { bind } from 'bind-event-listener';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import invariant from 'tiny-invariant';
|
|
16
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
17
16
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
18
17
|
import useStableRef from '@atlaskit/ds-lib/use-stable-ref';
|
|
19
18
|
import { useOpenLayerObserver } from '@atlaskit/layering/experimental/open-layer-observer';
|
|
@@ -200,12 +199,12 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
200
199
|
* I also tried only binding an event listener inside pragmatic-drag-and-drop's `onDragStart`, which seemd to work
|
|
201
200
|
* but did not feel as robust, and might have timing issues as it happens slightly later.
|
|
202
201
|
*/
|
|
203
|
-
|
|
202
|
+
bind(splitter, {
|
|
204
203
|
type: 'mousedown',
|
|
205
204
|
listener: function listener(event) {
|
|
206
205
|
initialClientXRef.current = event.clientX;
|
|
207
206
|
}
|
|
208
|
-
})
|
|
207
|
+
}), draggable({
|
|
209
208
|
element: splitter,
|
|
210
209
|
onGenerateDragPreview: function onGenerateDragPreview(_ref4) {
|
|
211
210
|
var nativeSetDragImage = _ref4.nativeSetDragImage;
|
|
@@ -262,9 +261,7 @@ var PortaledPanelSplitter = function PortaledPanelSplitter(_ref3) {
|
|
|
262
261
|
initialWidth = _source$data.initialWidth,
|
|
263
262
|
resizeBounds = _source$data.resizeBounds,
|
|
264
263
|
direction = _source$data.direction;
|
|
265
|
-
|
|
266
|
-
invariant(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
267
|
-
}
|
|
264
|
+
invariant(initialClientXRef.current !== null, 'initialClientX must be set');
|
|
268
265
|
|
|
269
266
|
/**
|
|
270
267
|
* How wide the element would be if there were no width constraints,
|
|
@@ -12,5 +12,5 @@ import type { SkipLinkData } from '../../context/skip-links/types';
|
|
|
12
12
|
export declare const SkipLink: ({ id, children, onBeforeNavigate, }: {
|
|
13
13
|
id: string;
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
onBeforeNavigate?: SkipLinkData[
|
|
15
|
+
onBeforeNavigate?: SkipLinkData['onBeforeNavigate'];
|
|
16
16
|
}) => JSX.Element;
|
|
@@ -6,7 +6,7 @@ export type SkipLinksContextData = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Provides a way to register and unregister skip links
|
|
8
8
|
*/
|
|
9
|
-
export declare const SkipLinksContext: import(
|
|
9
|
+
export declare const SkipLinksContext: import('react').Context<SkipLinksContextData>;
|
|
10
10
|
/**
|
|
11
11
|
* Internal-only hook for registering skip links.
|
|
12
12
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used to power the side nav flyout by allowing the side nav to bind event listeners to the element, so we can
|
|
4
4
|
* keep the flyout open while the user mouses from the top bar to the side nav.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TopNavStartElement: import(
|
|
6
|
+
export declare const TopNavStartElement: import('react').Context<HTMLDivElement | null>;
|
|
7
7
|
/**
|
|
8
8
|
* Context for the callback ref used to respond to the TopNavStart element ref being attached. It is used to update the
|
|
9
9
|
* `TopNavStartElement` state so consumers can react to the ref being attached.
|
|
@@ -13,4 +13,4 @@ export declare const TopNavStartElement: import("react").Context<HTMLDivElement
|
|
|
13
13
|
* A callback ref is needed because the side nav can be mounted before elements in the top bar (e.g. if the element is lazy loaded),
|
|
14
14
|
* which happens in Jira and Confluence), which would prevent the event listeners from being set up.
|
|
15
15
|
*/
|
|
16
|
-
export declare const TopNavStartAttachRef: import(
|
|
16
|
+
export declare const TopNavStartAttachRef: import('react').Context<(newVal: HTMLDivElement | null) => void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FlyoutMenuItem, type FlyoutMenuItemProps, FlyoutBody, type FlyoutBodyProps, FlyoutMenuItemContent, type FlyoutMenuItemContentProps, FlyoutFooter, type FlyoutFooterProps, FlyoutHeader, type FlyoutHeaderProps, FlyoutMenuItemTrigger, type FlyoutMenuItemTriggerProps, COLLAPSE_ELEM_BEFORE } from '@atlaskit/side-nav-items/flyout-menu-item';
|
|
1
|
+
export { FlyoutMenuItem, type FlyoutMenuItemProps, FlyoutBody, type FlyoutBodyProps, FlyoutMenuItemContent, type FlyoutMenuItemContentProps, FlyoutFooter, type FlyoutFooterProps, FlyoutHeader, type FlyoutHeaderProps, FlyoutMenuItemTrigger, type FlyoutMenuItemTriggerProps, COLLAPSE_ELEM_BEFORE, } from '@atlaskit/side-nav-items/flyout-menu-item';
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Tracks if a custom value has been provided for `IsFhsEnabledContext`.
|
|
5
5
|
* Used to prevent nesting of the `IsFhsEnabledProvider`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const IsCustomIsFhsEnabledContext: import(
|
|
7
|
+
export declare const IsCustomIsFhsEnabledContext: import('react').Context<boolean>;
|
|
@@ -5,4 +5,4 @@ import type { Get } from './types';
|
|
|
5
5
|
* Tracks is FHS enabled.
|
|
6
6
|
* Defaults to feature gate 'navx-full-height-sidebar'.
|
|
7
7
|
*/
|
|
8
|
-
export declare const IsFhsEnabledContext: import(
|
|
8
|
+
export declare const IsFhsEnabledContext: import('react').Context<boolean | Get<boolean>>;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Context for whether the slot sizes are to be hoisted to the document root.
|
|
3
3
|
* It is set by consumers using a prop on the page layout `Root` element.
|
|
4
4
|
*/
|
|
5
|
-
export declare const DangerouslyHoistSlotSizes: import(
|
|
5
|
+
export declare const DangerouslyHoistSlotSizes: import('react').Context<boolean>;
|
|
@@ -63,7 +63,7 @@ export type PanelSplitterContextType = {
|
|
|
63
63
|
/**
|
|
64
64
|
* Context for the panel splitter. Only internally exported.
|
|
65
65
|
*/
|
|
66
|
-
export declare const PanelSplitterContext: import(
|
|
66
|
+
export declare const PanelSplitterContext: import('react').Context<PanelSplitterContextType | null>;
|
|
67
67
|
/**
|
|
68
68
|
* Context for the panel splitter's double click handler. Only internally exported.
|
|
69
69
|
*
|
|
@@ -71,4 +71,4 @@ export declare const PanelSplitterContext: import("react").Context<PanelSplitter
|
|
|
71
71
|
* to collapse the side nav on double click, without exposing the `onDoubleClick` prop on `PanelSplitter`.
|
|
72
72
|
* Once `PanelSplitter` supports an `onDoubleClick` prop directly, this context should be removed.
|
|
73
73
|
*/
|
|
74
|
-
export declare const OnDoubleClickContext: import(
|
|
74
|
+
export declare const OnDoubleClickContext: import('react').Context<(() => void) | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
2
2
|
/**
|
|
3
|
-
* ⚠️ Note: We are
|
|
4
|
-
* can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
3
|
+
* ⚠️ Note: We are using the initial client location captured from the mousedown event, not from the dragstart event.
|
|
4
|
+
* Some browser extensions can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
5
5
|
*/
|
|
6
6
|
export declare const getWidthFromDragLocation: ({ initialWidth, location, initialClientX, direction, position, }: {
|
|
7
7
|
initialWidth: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Context for the side nav toggle button element.
|
|
3
3
|
* Used to power the side nav flyout by allowing the side nav to bind event listeners to the button element.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SideNavToggleButtonElement: import(
|
|
5
|
+
export declare const SideNavToggleButtonElement: import('react').Context<HTMLButtonElement | null>;
|
|
6
6
|
/**
|
|
7
7
|
* Context for the callback ref used to respond to toggle button ref being attached. It is used to update the
|
|
8
8
|
* `SideNavToggleButtonRef` state so consumers can react to the ref being attached.
|
|
@@ -13,4 +13,4 @@ export declare const SideNavToggleButtonElement: import("react").Context<HTMLBut
|
|
|
13
13
|
* A callback ref is needed because the side nav can be mounted before the elements in the top bar (e.g. if the element
|
|
14
14
|
* is lazy loaded, which happens in Jira and Confluence), which would prevent the event listeners from being set up.
|
|
15
15
|
*/
|
|
16
|
-
export declare const SideNavToggleButtonAttachRef: import(
|
|
16
|
+
export declare const SideNavToggleButtonAttachRef: import('react').Context<(newVal: HTMLButtonElement | null) => void>;
|
|
@@ -4,8 +4,8 @@ import type { SideNavState } from './types';
|
|
|
4
4
|
* Context for the visibility of the side nav.
|
|
5
5
|
* State is initialised as null. This is used when the value has not been set yet - which is important to know for SSR.
|
|
6
6
|
*/
|
|
7
|
-
export declare const SideNavVisibilityState: import(
|
|
7
|
+
export declare const SideNavVisibilityState: import('react').Context<SideNavState | null>;
|
|
8
8
|
/**
|
|
9
9
|
* Sets the visibility of the side nav.
|
|
10
10
|
*/
|
|
11
|
-
export declare const SetSideNavVisibilityState: import(
|
|
11
|
+
export declare const SetSideNavVisibilityState: import('react').Context<Dispatch<SetStateAction<SideNavState | null>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Context to let components know if a custom theme is being applied.
|
|
3
3
|
*/
|
|
4
|
-
export declare const HasCustomThemeContext: import(
|
|
4
|
+
export declare const HasCustomThemeContext: import('react').Context<boolean>;
|
|
5
5
|
/**
|
|
6
6
|
* Returns whether a custom theme is being applied.
|
|
7
7
|
*/
|
|
@@ -12,5 +12,5 @@ import type { SkipLinkData } from '../../context/skip-links/types';
|
|
|
12
12
|
export declare const SkipLink: ({ id, children, onBeforeNavigate, }: {
|
|
13
13
|
id: string;
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
onBeforeNavigate?: SkipLinkData[
|
|
15
|
+
onBeforeNavigate?: SkipLinkData['onBeforeNavigate'];
|
|
16
16
|
}) => JSX.Element;
|
|
@@ -6,7 +6,7 @@ export type SkipLinksContextData = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Provides a way to register and unregister skip links
|
|
8
8
|
*/
|
|
9
|
-
export declare const SkipLinksContext: import(
|
|
9
|
+
export declare const SkipLinksContext: import('react').Context<SkipLinksContextData>;
|
|
10
10
|
/**
|
|
11
11
|
* Internal-only hook for registering skip links.
|
|
12
12
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Used to power the side nav flyout by allowing the side nav to bind event listeners to the element, so we can
|
|
4
4
|
* keep the flyout open while the user mouses from the top bar to the side nav.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TopNavStartElement: import(
|
|
6
|
+
export declare const TopNavStartElement: import('react').Context<HTMLDivElement | null>;
|
|
7
7
|
/**
|
|
8
8
|
* Context for the callback ref used to respond to the TopNavStart element ref being attached. It is used to update the
|
|
9
9
|
* `TopNavStartElement` state so consumers can react to the ref being attached.
|
|
@@ -13,4 +13,4 @@ export declare const TopNavStartElement: import("react").Context<HTMLDivElement
|
|
|
13
13
|
* A callback ref is needed because the side nav can be mounted before elements in the top bar (e.g. if the element is lazy loaded),
|
|
14
14
|
* which happens in Jira and Confluence), which would prevent the event listeners from being set up.
|
|
15
15
|
*/
|
|
16
|
-
export declare const TopNavStartAttachRef: import(
|
|
16
|
+
export declare const TopNavStartAttachRef: import('react').Context<(newVal: HTMLDivElement | null) => void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FlyoutMenuItem, type FlyoutMenuItemProps, FlyoutBody, type FlyoutBodyProps, FlyoutMenuItemContent, type FlyoutMenuItemContentProps, FlyoutFooter, type FlyoutFooterProps, FlyoutHeader, type FlyoutHeaderProps, FlyoutMenuItemTrigger, type FlyoutMenuItemTriggerProps, COLLAPSE_ELEM_BEFORE } from '@atlaskit/side-nav-items/flyout-menu-item';
|
|
1
|
+
export { FlyoutMenuItem, type FlyoutMenuItemProps, FlyoutBody, type FlyoutBodyProps, FlyoutMenuItemContent, type FlyoutMenuItemContentProps, FlyoutFooter, type FlyoutFooterProps, FlyoutHeader, type FlyoutHeaderProps, FlyoutMenuItemTrigger, type FlyoutMenuItemTriggerProps, COLLAPSE_ELEM_BEFORE, } from '@atlaskit/side-nav-items/flyout-menu-item';
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Tracks if a custom value has been provided for `IsFhsEnabledContext`.
|
|
5
5
|
* Used to prevent nesting of the `IsFhsEnabledProvider`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const IsCustomIsFhsEnabledContext: import(
|
|
7
|
+
export declare const IsCustomIsFhsEnabledContext: import('react').Context<boolean>;
|
|
@@ -5,4 +5,4 @@ import type { Get } from './types';
|
|
|
5
5
|
* Tracks is FHS enabled.
|
|
6
6
|
* Defaults to feature gate 'navx-full-height-sidebar'.
|
|
7
7
|
*/
|
|
8
|
-
export declare const IsFhsEnabledContext: import(
|
|
8
|
+
export declare const IsFhsEnabledContext: import('react').Context<boolean | Get<boolean>>;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Context for whether the slot sizes are to be hoisted to the document root.
|
|
3
3
|
* It is set by consumers using a prop on the page layout `Root` element.
|
|
4
4
|
*/
|
|
5
|
-
export declare const DangerouslyHoistSlotSizes: import(
|
|
5
|
+
export declare const DangerouslyHoistSlotSizes: import('react').Context<boolean>;
|
|
@@ -63,7 +63,7 @@ export type PanelSplitterContextType = {
|
|
|
63
63
|
/**
|
|
64
64
|
* Context for the panel splitter. Only internally exported.
|
|
65
65
|
*/
|
|
66
|
-
export declare const PanelSplitterContext: import(
|
|
66
|
+
export declare const PanelSplitterContext: import('react').Context<PanelSplitterContextType | null>;
|
|
67
67
|
/**
|
|
68
68
|
* Context for the panel splitter's double click handler. Only internally exported.
|
|
69
69
|
*
|
|
@@ -71,4 +71,4 @@ export declare const PanelSplitterContext: import("react").Context<PanelSplitter
|
|
|
71
71
|
* to collapse the side nav on double click, without exposing the `onDoubleClick` prop on `PanelSplitter`.
|
|
72
72
|
* Once `PanelSplitter` supports an `onDoubleClick` prop directly, this context should be removed.
|
|
73
73
|
*/
|
|
74
|
-
export declare const OnDoubleClickContext: import(
|
|
74
|
+
export declare const OnDoubleClickContext: import('react').Context<(() => void) | undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/types';
|
|
2
2
|
/**
|
|
3
|
-
* ⚠️ Note: We are
|
|
4
|
-
* can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
3
|
+
* ⚠️ Note: We are using the initial client location captured from the mousedown event, not from the dragstart event.
|
|
4
|
+
* Some browser extensions can cause the client locations (e.g. clientX) in the `dragstart` event to incorrectly return 0.
|
|
5
5
|
*/
|
|
6
6
|
export declare const getWidthFromDragLocation: ({ initialWidth, location, initialClientX, direction, position, }: {
|
|
7
7
|
initialWidth: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Context for the side nav toggle button element.
|
|
3
3
|
* Used to power the side nav flyout by allowing the side nav to bind event listeners to the button element.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SideNavToggleButtonElement: import(
|
|
5
|
+
export declare const SideNavToggleButtonElement: import('react').Context<HTMLButtonElement | null>;
|
|
6
6
|
/**
|
|
7
7
|
* Context for the callback ref used to respond to toggle button ref being attached. It is used to update the
|
|
8
8
|
* `SideNavToggleButtonRef` state so consumers can react to the ref being attached.
|
|
@@ -13,4 +13,4 @@ export declare const SideNavToggleButtonElement: import("react").Context<HTMLBut
|
|
|
13
13
|
* A callback ref is needed because the side nav can be mounted before the elements in the top bar (e.g. if the element
|
|
14
14
|
* is lazy loaded, which happens in Jira and Confluence), which would prevent the event listeners from being set up.
|
|
15
15
|
*/
|
|
16
|
-
export declare const SideNavToggleButtonAttachRef: import(
|
|
16
|
+
export declare const SideNavToggleButtonAttachRef: import('react').Context<(newVal: HTMLButtonElement | null) => void>;
|
|
@@ -4,8 +4,8 @@ import type { SideNavState } from './types';
|
|
|
4
4
|
* Context for the visibility of the side nav.
|
|
5
5
|
* State is initialised as null. This is used when the value has not been set yet - which is important to know for SSR.
|
|
6
6
|
*/
|
|
7
|
-
export declare const SideNavVisibilityState: import(
|
|
7
|
+
export declare const SideNavVisibilityState: import('react').Context<SideNavState | null>;
|
|
8
8
|
/**
|
|
9
9
|
* Sets the visibility of the side nav.
|
|
10
10
|
*/
|
|
11
|
-
export declare const SetSideNavVisibilityState: import(
|
|
11
|
+
export declare const SetSideNavVisibilityState: import('react').Context<Dispatch<SetStateAction<SideNavState | null>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Context to let components know if a custom theme is being applied.
|
|
3
3
|
*/
|
|
4
|
-
export declare const HasCustomThemeContext: import(
|
|
4
|
+
export declare const HasCustomThemeContext: import('react').Context<boolean>;
|
|
5
5
|
/**
|
|
6
6
|
* Returns whether a custom theme is being applied.
|
|
7
7
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.39.0",
|
|
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",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
70
|
-
"@atlaskit/avatar": "^25.
|
|
70
|
+
"@atlaskit/avatar": "^25.8.0",
|
|
71
71
|
"@atlaskit/button": "^23.9.0",
|
|
72
72
|
"@atlaskit/css": "^0.19.0",
|
|
73
73
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@atlaskit/link": "^3.3.0",
|
|
107
107
|
"@atlaskit/lozenge": "^13.4.0",
|
|
108
108
|
"@atlaskit/menu": "^8.4.0",
|
|
109
|
-
"@atlaskit/modal-dialog": "^14.
|
|
109
|
+
"@atlaskit/modal-dialog": "^14.11.0",
|
|
110
110
|
"@atlaskit/onboarding": "^14.5.0",
|
|
111
111
|
"@atlaskit/page-header": "^12.1.0",
|
|
112
112
|
"@atlaskit/page-layout": "^4.2.0",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"@atlaskit/skeleton": "^2.1.0",
|
|
117
117
|
"@atlaskit/textfield": "^8.2.0",
|
|
118
118
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
119
|
-
"@atlassian/gemini": "^1.
|
|
120
|
-
"@atlassian/search-dialog": "^9.
|
|
119
|
+
"@atlassian/gemini": "^1.34.0",
|
|
120
|
+
"@atlassian/search-dialog": "^9.15.0",
|
|
121
121
|
"@atlassian/ssr-tests": "workspace:^",
|
|
122
122
|
"@atlassian/test-utils": "^1.0.0",
|
|
123
123
|
"@atlassian/testing-library": "^0.4.0",
|
|
@@ -189,9 +189,6 @@
|
|
|
189
189
|
},
|
|
190
190
|
"platform_dst_nav4_flyout_menu_slots_close_button": {
|
|
191
191
|
"type": "boolean"
|
|
192
|
-
},
|
|
193
|
-
"platform-dst-panel-splitter-drag-start-client-x": {
|
|
194
|
-
"type": "boolean"
|
|
195
192
|
}
|
|
196
193
|
},
|
|
197
194
|
"homepage": "https://atlassian.design/components/navigation-system"
|