@atlaskit/atlassian-navigation 2.2.3 → 2.2.4
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 +7 -0
- package/dist/cjs/components/ProductHome/product-home.js +4 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/ProductHome/product-home.js +4 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/ProductHome/product-home.js +4 -0
- package/dist/esm/version.json +1 -1
- package/package.json +5 -3
- package/report.api.md +637 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`416570be6bf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/416570be6bf) - Small update to styles to account for change in `@atlaskit/logo`.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 2.2.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -86,6 +86,10 @@ var productLogoStyles = (0, _core.css)((0, _defineProperty2.default)({
|
|
|
86
86
|
'& > *': {
|
|
87
87
|
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
88
88
|
maxHeight: 24
|
|
89
|
+
},
|
|
90
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
91
|
+
'& > span > svg': {
|
|
92
|
+
width: '100%'
|
|
89
93
|
}
|
|
90
94
|
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
91
95
|
display: 'none'
|
package/dist/cjs/version.json
CHANGED
|
@@ -71,6 +71,10 @@ const productLogoStyles = css({
|
|
|
71
71
|
maxHeight: 24
|
|
72
72
|
},
|
|
73
73
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
74
|
+
'& > span > svg': {
|
|
75
|
+
width: '100%'
|
|
76
|
+
},
|
|
77
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
74
78
|
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
75
79
|
display: 'none'
|
|
76
80
|
}
|
package/dist/es2019/version.json
CHANGED
|
@@ -70,6 +70,10 @@ var productLogoStyles = css(_defineProperty({
|
|
|
70
70
|
'& > *': {
|
|
71
71
|
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
72
72
|
maxHeight: 24
|
|
73
|
+
},
|
|
74
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
75
|
+
'& > span > svg': {
|
|
76
|
+
width: '100%'
|
|
73
77
|
}
|
|
74
78
|
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
75
79
|
display: 'none'
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
"deprecatedAutoEntryPoints": true,
|
|
20
20
|
"releaseModel": "scheduled",
|
|
21
21
|
"website": {
|
|
22
|
-
"name": "Atlassian navigation"
|
|
22
|
+
"name": "Atlassian navigation",
|
|
23
|
+
"category": "Components"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
27
|
+
"@atlaskit/analytics-namespaced-context": "^6.5.0",
|
|
27
28
|
"@atlaskit/button": "^16.3.0",
|
|
28
29
|
"@atlaskit/icon": "^21.10.0",
|
|
29
30
|
"@atlaskit/logo": "*",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"import-structure": "atlassian-conventions"
|
|
69
70
|
},
|
|
70
71
|
"@repo/internal": {
|
|
72
|
+
"dom-events": "use-bind-event-listener",
|
|
71
73
|
"ui-components": "lite-mode",
|
|
72
74
|
"analytics": "analytics-next",
|
|
73
75
|
"styling": [
|
package/report.api.md
ADDED
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/atlassian-navigation"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
````ts
|
|
6
|
+
/// <reference types="lodash" />
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
|
|
9
|
+
import { AllHTMLAttributes } from 'react';
|
|
10
|
+
import { ComponentType } from 'react';
|
|
11
|
+
import { CSSObject } from '@emotion/core';
|
|
12
|
+
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
13
|
+
import { CustomThemeButtonProps as CustomThemeButtonProps_2 } from '@atlaskit/button/custom-theme-button';
|
|
14
|
+
import { ElementType } from 'react';
|
|
15
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
16
|
+
import { LogoProps } from '@atlaskit/logo';
|
|
17
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
18
|
+
import { Provider } from 'react';
|
|
19
|
+
import { default as React_2 } from 'react';
|
|
20
|
+
import { ReactChild } from 'react';
|
|
21
|
+
import { ReactNode } from 'react';
|
|
22
|
+
import { ReactNodeArray } from 'react';
|
|
23
|
+
import { RefAttributes } from 'react';
|
|
24
|
+
import { ThemeProps } from '@atlaskit/button/custom-theme-button';
|
|
25
|
+
import { ThemeProps as ThemeProps_2 } from '@atlaskit/button';
|
|
26
|
+
import { ThemeTokens } from '@atlaskit/button/custom-theme-button';
|
|
27
|
+
import { ThemeTokens as ThemeTokens_2 } from '@atlaskit/button';
|
|
28
|
+
|
|
29
|
+
export declare const AppSwitcher: React_2.ForwardRefExoticComponent<
|
|
30
|
+
BaseIconButtonProps & React_2.RefAttributes<any>
|
|
31
|
+
>;
|
|
32
|
+
|
|
33
|
+
export declare type AppSwitcherProps = BaseIconButtonProps;
|
|
34
|
+
|
|
35
|
+
export declare const AtlassianNavigation: (
|
|
36
|
+
props: AtlassianNavigationProps,
|
|
37
|
+
) => JSX.Element;
|
|
38
|
+
|
|
39
|
+
export declare interface AtlassianNavigationProps {
|
|
40
|
+
/**
|
|
41
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
42
|
+
* reader. Differentiates from other navigation components on a page.
|
|
43
|
+
*/
|
|
44
|
+
label: string;
|
|
45
|
+
/**
|
|
46
|
+
* Slot for the primary actions.
|
|
47
|
+
*/
|
|
48
|
+
primaryItems: ReactNodeArray;
|
|
49
|
+
/**
|
|
50
|
+
* Slot for the app switcher.
|
|
51
|
+
*/
|
|
52
|
+
renderAppSwitcher?: React_2.ComponentType<{}>;
|
|
53
|
+
/**
|
|
54
|
+
* Slot for the create call to action button.
|
|
55
|
+
*/
|
|
56
|
+
renderCreate?: React_2.ComponentType<{}>;
|
|
57
|
+
/**
|
|
58
|
+
* Slot for the help button.
|
|
59
|
+
*/
|
|
60
|
+
renderHelp?: React_2.ComponentType<{}>;
|
|
61
|
+
/**
|
|
62
|
+
* Slot for the notification button.
|
|
63
|
+
*/
|
|
64
|
+
renderNotifications?: React_2.ComponentType<{}>;
|
|
65
|
+
/**
|
|
66
|
+
* Slot for the product home logo which renders a product's brand.
|
|
67
|
+
*/
|
|
68
|
+
renderProductHome: React_2.ComponentType<{}>;
|
|
69
|
+
/**
|
|
70
|
+
* Slot for the profile button.
|
|
71
|
+
*/
|
|
72
|
+
renderProfile?: React_2.ComponentType<{}>;
|
|
73
|
+
/**
|
|
74
|
+
* Slot for the search textbox.
|
|
75
|
+
*/
|
|
76
|
+
renderSearch?: React_2.ComponentType<{}>;
|
|
77
|
+
/**
|
|
78
|
+
* Slot for the sign in button.
|
|
79
|
+
*/
|
|
80
|
+
renderSignIn?: React_2.ComponentType<{}>;
|
|
81
|
+
/**
|
|
82
|
+
* Slot for the settings button.
|
|
83
|
+
*/
|
|
84
|
+
renderSettings?: React_2.ComponentType<{}>;
|
|
85
|
+
/**
|
|
86
|
+
* Label used for the overflow menu button tooltip.
|
|
87
|
+
*/
|
|
88
|
+
moreLabel?: ReactNode;
|
|
89
|
+
/**
|
|
90
|
+
* __Slow and discouraged custom theme API.__
|
|
91
|
+
*/
|
|
92
|
+
theme?: NavigationTheme;
|
|
93
|
+
/**
|
|
94
|
+
A `testId` prop is provided for specified elements,
|
|
95
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
96
|
+
serving as a hook for automated tests.
|
|
97
|
+
|
|
98
|
+
Will set these elements when defined:
|
|
99
|
+
|
|
100
|
+
- Header element - `{testId}-header`
|
|
101
|
+
- Primary actions container - `{testId}-primary-actions`
|
|
102
|
+
- Secondary actions container - `{testId}-secondary-actions`
|
|
103
|
+
- Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
104
|
+
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
105
|
+
*/
|
|
106
|
+
testId?: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare const atlassianTheme: NavigationTheme;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* We aren't inheriting the types from button here because it blows up ERT.
|
|
113
|
+
*/
|
|
114
|
+
declare interface BaseIconButtonProps {
|
|
115
|
+
/**
|
|
116
|
+
* Unique id for the button.
|
|
117
|
+
*/
|
|
118
|
+
id?: string;
|
|
119
|
+
/**
|
|
120
|
+
* On click handler.
|
|
121
|
+
* Second argument is the instrumented analytics event.
|
|
122
|
+
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
123
|
+
*/
|
|
124
|
+
onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
125
|
+
/**
|
|
126
|
+
* A `testId` prop is provided for specified elements,
|
|
127
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
128
|
+
* serving as a hook for automated tests
|
|
129
|
+
*/
|
|
130
|
+
testId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Text that will be displayed in the tooltip when hovered or focused on the button.
|
|
133
|
+
*/
|
|
134
|
+
tooltip: React.ReactNode;
|
|
135
|
+
/**
|
|
136
|
+
* Called when the mouse is initially clicked on the element.
|
|
137
|
+
*/
|
|
138
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement>;
|
|
139
|
+
/**
|
|
140
|
+
* Called when the mouse enters the element container.
|
|
141
|
+
*/
|
|
142
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
143
|
+
/**
|
|
144
|
+
* Called when the mouse leaves the element container.
|
|
145
|
+
*/
|
|
146
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
147
|
+
/**
|
|
148
|
+
* Causes the button to be disabled.
|
|
149
|
+
*/
|
|
150
|
+
isDisabled?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* If wanting to link to another page you can define the href.
|
|
153
|
+
*/
|
|
154
|
+
href?: string;
|
|
155
|
+
/**
|
|
156
|
+
* If defining `href` you may want to define `target` as well.
|
|
157
|
+
*/
|
|
158
|
+
target?: string;
|
|
159
|
+
/**
|
|
160
|
+
Allows for overriding the component used to render the button.
|
|
161
|
+
|
|
162
|
+
This is primarily intended for compatibility with custom
|
|
163
|
+
routing libraries when using the `href` prop.
|
|
164
|
+
|
|
165
|
+
For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
166
|
+
|
|
167
|
+
@example
|
|
168
|
+
```tsx
|
|
169
|
+
<Settings
|
|
170
|
+
component={CustomRouterLink}
|
|
171
|
+
href="/path/to/url"
|
|
172
|
+
/>
|
|
173
|
+
```
|
|
174
|
+
*/
|
|
175
|
+
component?: CustomThemeButtonProps['component'];
|
|
176
|
+
/**
|
|
177
|
+
* Handler for the mouse up event.
|
|
178
|
+
*/
|
|
179
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement>;
|
|
180
|
+
/**
|
|
181
|
+
* Handler called when the button gains focus.
|
|
182
|
+
*/
|
|
183
|
+
onFocus?: React.FocusEventHandler<HTMLElement>;
|
|
184
|
+
/**
|
|
185
|
+
* Handler called when the button loses focus.
|
|
186
|
+
*/
|
|
187
|
+
onBlur?: React.FocusEventHandler<HTMLElement>;
|
|
188
|
+
/**
|
|
189
|
+
* Makes the element appear selected.
|
|
190
|
+
*/
|
|
191
|
+
isSelected?: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare type ButtonCSSContext = {
|
|
195
|
+
default: ButtonCSSProperties;
|
|
196
|
+
hover: ButtonCSSProperties;
|
|
197
|
+
focus: ButtonFocusCSSProperties;
|
|
198
|
+
active: ButtonCSSProperties;
|
|
199
|
+
selected: ButtonCSSProperties;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
declare type ButtonCSSProperties = CSSProperties & {
|
|
203
|
+
boxShadow: string;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
declare type ButtonFocusCSSProperties = {
|
|
207
|
+
boxShadow: string;
|
|
208
|
+
color: string;
|
|
209
|
+
backgroundColor: string;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export declare type Colors = {
|
|
213
|
+
backgroundColor: string;
|
|
214
|
+
color: string;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export declare const Create: ({
|
|
218
|
+
onClick,
|
|
219
|
+
href,
|
|
220
|
+
text,
|
|
221
|
+
buttonTooltip,
|
|
222
|
+
iconButtonTooltip,
|
|
223
|
+
testId,
|
|
224
|
+
}: CreateProps) => JSX.Element;
|
|
225
|
+
|
|
226
|
+
export declare type CreateCSS = ButtonCSSContext;
|
|
227
|
+
|
|
228
|
+
export declare interface CreateProps {
|
|
229
|
+
/**
|
|
230
|
+
* Primary text for the call to action.
|
|
231
|
+
*/
|
|
232
|
+
text: string;
|
|
233
|
+
/**
|
|
234
|
+
* Text for the button tooltip when seen on large viewports.
|
|
235
|
+
*/
|
|
236
|
+
buttonTooltip?: React_2.ReactNode;
|
|
237
|
+
/**
|
|
238
|
+
* Text for the icon button tooltip when seen on small viewports.
|
|
239
|
+
*/
|
|
240
|
+
iconButtonTooltip?: React_2.ReactNode;
|
|
241
|
+
/**
|
|
242
|
+
* Click handler.
|
|
243
|
+
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
244
|
+
*/
|
|
245
|
+
onClick?: (e: React_2.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
246
|
+
/**
|
|
247
|
+
* Causes the Create action to be rendered as a link. This is suitable for when the Create action is handled as a full page rather than in a modal-dialog.
|
|
248
|
+
*/
|
|
249
|
+
href?: string;
|
|
250
|
+
/**
|
|
251
|
+
* A `testId` prop is provided for specified elements,
|
|
252
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
253
|
+
* serving as a hook for automated tests.
|
|
254
|
+
|
|
255
|
+
* Will set these elements when defined:
|
|
256
|
+
|
|
257
|
+
* - Create button shown on large screen sizes - `{testId}-button`
|
|
258
|
+
* - Create icon button shown on small screen sizes - `{testId}-icon-button`
|
|
259
|
+
*/
|
|
260
|
+
testId?: string;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
declare type CSSProperties = CSSObject & {
|
|
264
|
+
backgroundColor: string;
|
|
265
|
+
color: string;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export declare const CustomProductHome: (
|
|
269
|
+
props: CustomProductHomeProps,
|
|
270
|
+
) => JSX.Element;
|
|
271
|
+
|
|
272
|
+
export declare interface CustomProductHomeProps {
|
|
273
|
+
/**
|
|
274
|
+
* Alt text for the icon that is displayed on small viewports.
|
|
275
|
+
*/
|
|
276
|
+
iconAlt: string;
|
|
277
|
+
/**
|
|
278
|
+
* Url for the icon that is displayed on small viewports.
|
|
279
|
+
*/
|
|
280
|
+
iconUrl: string;
|
|
281
|
+
/**
|
|
282
|
+
* Alt text for the icon that is displayed on large viewports.
|
|
283
|
+
*/
|
|
284
|
+
logoAlt: string;
|
|
285
|
+
/**
|
|
286
|
+
* Url for the icon that is displayed on large viewports.
|
|
287
|
+
*/
|
|
288
|
+
logoUrl: string;
|
|
289
|
+
/**
|
|
290
|
+
* Maximum width of the logo, in pixels. Defaults to 260px.
|
|
291
|
+
*/
|
|
292
|
+
logoMaxWidth?: number;
|
|
293
|
+
/**
|
|
294
|
+
* Optional onClick handler.
|
|
295
|
+
*/
|
|
296
|
+
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
297
|
+
/**
|
|
298
|
+
* Optional mouseDown handler.
|
|
299
|
+
*/
|
|
300
|
+
onMouseDown?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Href to be passed to product home.
|
|
303
|
+
* Will add an interactive look and feel when defined.
|
|
304
|
+
*/
|
|
305
|
+
href?: string;
|
|
306
|
+
/**
|
|
307
|
+
* Name of the site that appears next to the logo
|
|
308
|
+
*/
|
|
309
|
+
siteTitle?: string;
|
|
310
|
+
/**
|
|
311
|
+
A `testId` prop is provided for specified elements,
|
|
312
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
313
|
+
serving as a hook for automated tests.
|
|
314
|
+
|
|
315
|
+
Will set these elements when defined:
|
|
316
|
+
|
|
317
|
+
- Root element of the component - `{testId}-container`
|
|
318
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
319
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
320
|
+
- Site title - `{testId}-site-title`
|
|
321
|
+
*/
|
|
322
|
+
testId?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export declare const generateTheme: (
|
|
326
|
+
themeColors: GenerateThemeArgs,
|
|
327
|
+
) => NavigationTheme;
|
|
328
|
+
|
|
329
|
+
export declare type GenerateThemeArgs = {
|
|
330
|
+
/**
|
|
331
|
+
* Name of the theme.
|
|
332
|
+
* If you pass in "atlassian" will return the default atlassian theme and not
|
|
333
|
+
* use any of the colors you pass in.
|
|
334
|
+
*/
|
|
335
|
+
name?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Main background color of the horizontal navigation bar.
|
|
338
|
+
*/
|
|
339
|
+
backgroundColor: string;
|
|
340
|
+
/**
|
|
341
|
+
* Highlight color for the navigation actions.
|
|
342
|
+
*/
|
|
343
|
+
highlightColor: string;
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
export declare const Help: React_2.ForwardRefExoticComponent<
|
|
347
|
+
BaseIconButtonProps & {
|
|
348
|
+
badge?: React_2.ComponentType<{}> | undefined;
|
|
349
|
+
} & React_2.RefAttributes<any>
|
|
350
|
+
>;
|
|
351
|
+
|
|
352
|
+
export declare type HelpProps = BaseIconButtonProps & {
|
|
353
|
+
/**
|
|
354
|
+
* Component to be used for the badge.
|
|
355
|
+
* Generally you'll want to use `NotificationIndicator` from [`@atlaskit/notification-indicator`](/packages/notifications/notification-indicator).
|
|
356
|
+
*/
|
|
357
|
+
badge?: ComponentType<{}>;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
export declare const HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
|
|
361
|
+
|
|
362
|
+
export declare const IconButton: React_2.ForwardRefExoticComponent<
|
|
363
|
+
BaseIconButtonProps & {
|
|
364
|
+
icon: React_2.ReactChild | undefined;
|
|
365
|
+
theme?:
|
|
366
|
+
| ((
|
|
367
|
+
current: (props: ThemeProps) => ThemeTokens,
|
|
368
|
+
props: ThemeProps,
|
|
369
|
+
) => ThemeTokens)
|
|
370
|
+
| undefined;
|
|
371
|
+
} & React_2.RefAttributes<HTMLElement>
|
|
372
|
+
>;
|
|
373
|
+
|
|
374
|
+
export declare type IconButtonCSS = ButtonCSSContext;
|
|
375
|
+
|
|
376
|
+
export declare type IconButtonProps = BaseIconButtonProps & {
|
|
377
|
+
/**
|
|
378
|
+
* Icon for the button.
|
|
379
|
+
*/
|
|
380
|
+
icon: CustomThemeButtonProps['iconBefore'];
|
|
381
|
+
/**
|
|
382
|
+
* Theme for the icon button.
|
|
383
|
+
*/
|
|
384
|
+
theme?: CustomThemeButtonProps['theme'];
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
declare type LogoStyleProps = {
|
|
388
|
+
iconGradientStart?: string;
|
|
389
|
+
iconGradientStop?: string;
|
|
390
|
+
iconColor?: string;
|
|
391
|
+
textColor?: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export declare type Mode = {
|
|
395
|
+
create: CreateCSS;
|
|
396
|
+
iconButton: IconButtonCSS;
|
|
397
|
+
navigation: NavigationCSS;
|
|
398
|
+
primaryButton: PrimaryButtonCSS;
|
|
399
|
+
productHome: ProductHomeCSS;
|
|
400
|
+
search: SearchCSS;
|
|
401
|
+
skeleton: SkeletonCSS;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export declare type NavigationCSS = CSSProperties;
|
|
405
|
+
|
|
406
|
+
export declare type NavigationTheme = {
|
|
407
|
+
mode: Mode;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export declare const Notifications: React_2.ForwardRefExoticComponent<
|
|
411
|
+
BaseIconButtonProps & {
|
|
412
|
+
badge: React_2.ComponentType<{}>;
|
|
413
|
+
} & React_2.RefAttributes<any>
|
|
414
|
+
>;
|
|
415
|
+
|
|
416
|
+
export declare type NotificationsProps = BaseIconButtonProps & {
|
|
417
|
+
/**
|
|
418
|
+
* Component to be used for the badge.
|
|
419
|
+
* Generally you'll want to use `NotificationIndicator` from [`@atlaskit/notification-indicator`](/packages/notifications/notification-indicator).
|
|
420
|
+
*/
|
|
421
|
+
badge: ComponentType<{}>;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export declare const PrimaryButton: ForwardRefExoticComponent<
|
|
425
|
+
Omit<CustomThemeButtonProps_2, 'appearance' | 'onClick'> & {
|
|
426
|
+
component?:
|
|
427
|
+
| ComponentType<AllHTMLAttributes<HTMLElement>>
|
|
428
|
+
| ElementType<any>
|
|
429
|
+
| undefined;
|
|
430
|
+
isHighlighted?: boolean | undefined;
|
|
431
|
+
testId?: string | undefined;
|
|
432
|
+
tooltip?: ReactNode;
|
|
433
|
+
onClick?:
|
|
434
|
+
| ((
|
|
435
|
+
event: MouseEvent_2<HTMLElement, MouseEvent>,
|
|
436
|
+
analyticsEvent: any,
|
|
437
|
+
) => void)
|
|
438
|
+
| undefined;
|
|
439
|
+
} & RefAttributes<HTMLElement>
|
|
440
|
+
>;
|
|
441
|
+
|
|
442
|
+
export declare type PrimaryButtonCSS = ButtonCSSContext;
|
|
443
|
+
|
|
444
|
+
export declare type PrimaryButtonProps = Omit<
|
|
445
|
+
CustomThemeButtonProps,
|
|
446
|
+
'appearance' | 'onClick'
|
|
447
|
+
> & {
|
|
448
|
+
/**
|
|
449
|
+
Allows for overriding the component used to render the button.
|
|
450
|
+
|
|
451
|
+
This is primarily intended for compatibility with custom
|
|
452
|
+
routing libraries when using the `href` prop.
|
|
453
|
+
|
|
454
|
+
For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
455
|
+
|
|
456
|
+
@example
|
|
457
|
+
```tsx
|
|
458
|
+
<Settings
|
|
459
|
+
component={CustomRouterLink}
|
|
460
|
+
href="/path/to/url"
|
|
461
|
+
/>
|
|
462
|
+
```
|
|
463
|
+
*/
|
|
464
|
+
component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any>;
|
|
465
|
+
/**
|
|
466
|
+
* Will set the appearance of the button to look highlighted.
|
|
467
|
+
*/
|
|
468
|
+
isHighlighted?: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* A `testId` prop is provided for specified elements,
|
|
471
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
472
|
+
* serving as a hook for automated tests
|
|
473
|
+
*/
|
|
474
|
+
testId?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Optional text to show when the button is focused or hovered.
|
|
477
|
+
*/
|
|
478
|
+
tooltip?: React.ReactNode;
|
|
479
|
+
/**
|
|
480
|
+
* On click handler.
|
|
481
|
+
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
482
|
+
*/
|
|
483
|
+
onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export declare const PrimaryDropdownButton: ForwardRefExoticComponent<
|
|
487
|
+
Omit<PrimaryButtonProps, 'iconAfter'> & {
|
|
488
|
+
isHighlighted?: boolean | undefined;
|
|
489
|
+
testId?: string | undefined;
|
|
490
|
+
tooltip?: ReactNode;
|
|
491
|
+
} & RefAttributes<HTMLElement>
|
|
492
|
+
>;
|
|
493
|
+
|
|
494
|
+
export declare type PrimaryDropdownButtonProps = Omit<
|
|
495
|
+
PrimaryButtonProps,
|
|
496
|
+
'iconAfter'
|
|
497
|
+
> & {
|
|
498
|
+
/**
|
|
499
|
+
* Will set the appearance of the button to look highlighted.
|
|
500
|
+
*/
|
|
501
|
+
isHighlighted?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* A `testId` prop is provided for specified elements,
|
|
504
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
505
|
+
* serving as a hook for automated tests
|
|
506
|
+
*/
|
|
507
|
+
testId?: string;
|
|
508
|
+
/**
|
|
509
|
+
* Optional text to show when the button is focused or hovered.
|
|
510
|
+
*/
|
|
511
|
+
tooltip?: React.ReactNode;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
export declare const ProductHome: ({
|
|
515
|
+
icon: Icon,
|
|
516
|
+
logo: Logo,
|
|
517
|
+
siteTitle,
|
|
518
|
+
onClick,
|
|
519
|
+
href,
|
|
520
|
+
onMouseDown,
|
|
521
|
+
testId,
|
|
522
|
+
logoMaxWidth,
|
|
523
|
+
...rest
|
|
524
|
+
}: ProductHomeProps) => JSX.Element;
|
|
525
|
+
|
|
526
|
+
declare type ProductHomeCSS = CSSProperties & LogoStyleProps;
|
|
527
|
+
|
|
528
|
+
export declare interface ProductHomeProps {
|
|
529
|
+
/**
|
|
530
|
+
* The product icon.
|
|
531
|
+
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes
|
|
532
|
+
*/
|
|
533
|
+
icon: ComponentType<Partial<LogoProps>>;
|
|
534
|
+
/**
|
|
535
|
+
* The product logo,
|
|
536
|
+
* visible on larger screen sizes
|
|
537
|
+
*/
|
|
538
|
+
logo: ComponentType<Partial<LogoProps>>;
|
|
539
|
+
/**
|
|
540
|
+
* Maximum width in pixel, that logo can acquire. Defaults to 260px.
|
|
541
|
+
*/
|
|
542
|
+
logoMaxWidth?: number;
|
|
543
|
+
/**
|
|
544
|
+
* Optional onClick handler.
|
|
545
|
+
*/
|
|
546
|
+
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
547
|
+
/**
|
|
548
|
+
* Optional mouseDown handler.
|
|
549
|
+
*/
|
|
550
|
+
onMouseDown?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
551
|
+
/**
|
|
552
|
+
* Href to be passed to product home.
|
|
553
|
+
* Will add an interactive look and feel when defined.
|
|
554
|
+
*/
|
|
555
|
+
href?: string;
|
|
556
|
+
/**
|
|
557
|
+
* Name of the site that appears next to the logo.
|
|
558
|
+
*/
|
|
559
|
+
siteTitle?: string;
|
|
560
|
+
/**
|
|
561
|
+
A `testId` prop is provided for specified elements,
|
|
562
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
563
|
+
serving as a hook for automated tests.
|
|
564
|
+
|
|
565
|
+
Will set these elements when defined:
|
|
566
|
+
|
|
567
|
+
- Root element of the component - `{testId}-container`
|
|
568
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
569
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
570
|
+
- Site title - `{testId}-site-title`
|
|
571
|
+
*/
|
|
572
|
+
testId?: string;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export declare const Profile: ForwardRefExoticComponent<
|
|
576
|
+
BaseIconButtonProps & {
|
|
577
|
+
icon: ReactChild | undefined;
|
|
578
|
+
theme?:
|
|
579
|
+
| ((
|
|
580
|
+
current: (props: ThemeProps_2) => ThemeTokens_2,
|
|
581
|
+
props: ThemeProps_2,
|
|
582
|
+
) => ThemeTokens_2)
|
|
583
|
+
| undefined;
|
|
584
|
+
} & RefAttributes<HTMLElement>
|
|
585
|
+
>;
|
|
586
|
+
|
|
587
|
+
export declare type ProfileProps = IconButtonProps;
|
|
588
|
+
|
|
589
|
+
export declare const Search: (props: SearchProps) => JSX.Element;
|
|
590
|
+
|
|
591
|
+
export declare type SearchCSS = {
|
|
592
|
+
default: CSSProperties;
|
|
593
|
+
focus: CSSObject;
|
|
594
|
+
hover: CSSObject;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
export declare type SearchProps = BaseIconButtonProps & {
|
|
598
|
+
/**
|
|
599
|
+
* Placeholder text for the search textbox.
|
|
600
|
+
*/
|
|
601
|
+
placeholder: string;
|
|
602
|
+
/**
|
|
603
|
+
* Used to describe the search icon and text field for users viewing the
|
|
604
|
+
* page with a screen reader
|
|
605
|
+
*/
|
|
606
|
+
label: string;
|
|
607
|
+
/**
|
|
608
|
+
* Value of search field.
|
|
609
|
+
*/
|
|
610
|
+
value?: string;
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
export declare const Settings: React_2.ForwardRefExoticComponent<
|
|
614
|
+
BaseIconButtonProps & React_2.RefAttributes<any>
|
|
615
|
+
>;
|
|
616
|
+
|
|
617
|
+
export declare type SettingsProps = BaseIconButtonProps;
|
|
618
|
+
|
|
619
|
+
export declare const SignIn: (props: SignInProps) => JSX.Element;
|
|
620
|
+
|
|
621
|
+
export declare type SignInProps = BaseIconButtonProps;
|
|
622
|
+
|
|
623
|
+
export declare type SkeletonCSS = CSSObject & {
|
|
624
|
+
backgroundColor: string;
|
|
625
|
+
opacity: number;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
export declare const ThemeProvider: Provider<NavigationTheme>;
|
|
629
|
+
|
|
630
|
+
export declare const useOverflowStatus: () => {
|
|
631
|
+
isVisible: boolean;
|
|
632
|
+
openOverflowMenu: () => void;
|
|
633
|
+
closeOverflowMenu: () => void;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
export {};
|
|
637
|
+
````
|