@atlaskit/navigation-system 9.4.2 → 10.0.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 +36 -0
- package/constellation/layout/code.mdx +2 -1
- package/constellation/layout/usage.mdx +7 -7
- package/dist/cjs/components/skip-links/skip-link.js +0 -1
- package/dist/cjs/ui/page-layout/root.compiled.css +1 -0
- package/dist/cjs/ui/page-layout/root.js +8 -3
- package/dist/cjs/ui/top-nav-items/nav-logo/custom-logo.js +0 -1
- package/dist/es2019/components/skip-links/skip-link.js +0 -1
- package/dist/es2019/ui/page-layout/root.compiled.css +1 -0
- package/dist/es2019/ui/page-layout/root.js +8 -3
- package/dist/es2019/ui/top-nav-items/nav-logo/custom-logo.js +0 -1
- package/dist/esm/components/skip-links/skip-link.js +0 -1
- package/dist/esm/ui/page-layout/root.compiled.css +1 -0
- package/dist/esm/ui/page-layout/root.js +8 -3
- package/dist/esm/ui/top-nav-items/nav-logo/custom-logo.js +0 -1
- package/experimental/ribbon/package.json +1 -8
- package/fhs-rollout/package.json +1 -8
- package/layout/aside/package.json +1 -8
- package/layout/banner/package.json +1 -8
- package/layout/main/package.json +1 -8
- package/layout/panel/package.json +1 -8
- package/layout/panel-splitter/package.json +1 -8
- package/layout/root/package.json +1 -8
- package/layout/side-nav/package.json +1 -8
- package/layout/skip-links/package.json +1 -8
- package/layout/top-nav/package.json +1 -8
- package/legacy/css-variables/package.json +1 -8
- package/package.json +42 -50
- package/theming/color-utils/parse-hex/package.json +1 -8
- package/theming/color-utils/parse-hsl/package.json +1 -8
- package/theming/color-utils/parse-rgb/package.json +1 -8
- package/theming/color-utils/parse-user-color/package.json +1 -8
- package/theming/top-nav-button/package.json +1 -8
- package/theming/use-has-custom-theme/package.json +1 -8
- package/theming/use-legacy-search-theme/package.json +1 -8
- package/top-nav-items/create-button/package.json +1 -8
- package/top-nav-items/custom-title/package.json +1 -8
- package/top-nav-items/help/package.json +1 -8
- package/top-nav-items/log-in/package.json +1 -8
- package/top-nav-items/notifications/package.json +1 -8
- package/top-nav-items/package.json +1 -8
- package/top-nav-items/profile/package.json +1 -8
- package/top-nav-items/settings/package.json +1 -8
- package/dist/types-ts4.5/components/badge-container.d.ts +0 -32
- package/dist/types-ts4.5/components/list-item.d.ts +0 -27
- package/dist/types-ts4.5/components/list.d.ts +0 -28
- package/dist/types-ts4.5/components/skip-links/focus-element.d.ts +0 -4
- package/dist/types-ts4.5/components/skip-links/skip-link.d.ts +0 -19
- package/dist/types-ts4.5/components/skip-links/skip-links-container.d.ts +0 -18
- package/dist/types-ts4.5/components/skip-links/skip-links-popup.d.ts +0 -11
- package/dist/types-ts4.5/context/skip-links/skip-links-context.d.ts +0 -9
- package/dist/types-ts4.5/context/skip-links/skip-links-provider.d.ts +0 -13
- package/dist/types-ts4.5/context/skip-links/types.d.ts +0 -44
- package/dist/types-ts4.5/context/skip-links/use-skip-link-internal.d.ts +0 -10
- package/dist/types-ts4.5/context/skip-links/use-skip-link.d.ts +0 -18
- package/dist/types-ts4.5/context/top-nav-start/top-nav-start-attach-ref.d.ts +0 -1
- package/dist/types-ts4.5/context/top-nav-start/top-nav-start-context-provider.d.ts +0 -17
- package/dist/types-ts4.5/context/top-nav-start/top-nav-start-element.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/experimental/ribbon.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/fhs-rollout.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/layout/aside.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/layout/banner.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/layout/main.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/layout/panel-splitter.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/layout/panel.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/layout/root.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/layout/side-nav.d.ts +0 -8
- package/dist/types-ts4.5/entry-points/layout/skip-links.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/layout/top-nav.d.ts +0 -4
- package/dist/types-ts4.5/entry-points/legacy/css-variables.d.ts +0 -12
- package/dist/types-ts4.5/entry-points/theming/color-utils/parse-hex.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/theming/color-utils/parse-hsl.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/theming/color-utils/parse-rgb.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/theming/color-utils/parse-user-color.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/theming/top-nav-button.d.ts +0 -4
- package/dist/types-ts4.5/entry-points/theming/use-has-custom-theme.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/theming/use-legacy-search-theme.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/create-button.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/custom-title.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/help.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/index.d.ts +0 -14
- package/dist/types-ts4.5/entry-points/top-nav-items/log-in.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/notifications.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/profile.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/top-nav-items/settings.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -34
- package/dist/types-ts4.5/ui/fhs-rollout/is-custom-is-fhs-enabled-context.d.ts +0 -7
- package/dist/types-ts4.5/ui/fhs-rollout/is-fhs-enabled-context.d.ts +0 -8
- package/dist/types-ts4.5/ui/fhs-rollout/is-fhs-enabled-provider.d.ts +0 -10
- package/dist/types-ts4.5/ui/fhs-rollout/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/fhs-rollout/use-is-fhs-enabled.d.ts +0 -6
- package/dist/types-ts4.5/ui/page-layout/aside.d.ts +0 -29
- package/dist/types-ts4.5/ui/page-layout/banner.d.ts +0 -24
- package/dist/types-ts4.5/ui/page-layout/constants.d.ts +0 -50
- package/dist/types-ts4.5/ui/page-layout/dangerously-hoist-css-var-to-document-root.d.ts +0 -8
- package/dist/types-ts4.5/ui/page-layout/hoist-css-var-to-local-grid.d.ts +0 -13
- package/dist/types-ts4.5/ui/page-layout/hoist-slot-sizes-context.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/main/main-sticky-header.d.ts +0 -23
- package/dist/types-ts4.5/ui/page-layout/main/main.d.ts +0 -16
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/convert-resize-bound-to-pixels.d.ts +0 -7
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-percentage-within-pixel-bounds.d.ts +0 -18
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-pixel-width.d.ts +0 -4
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-width-from-drag-location.d.ts +0 -8
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/is-panel-splitter-drag-data.d.ts +0 -9
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/keyboard-resize-manager.d.ts +0 -15
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/on-double-click-context.d.ts +0 -8
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/panel-splitter-context.d.ts +0 -64
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/panel-splitter-drag-symbol.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/panel-splitter.d.ts +0 -52
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/provider.d.ts +0 -28
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/side-nav-panel-splitter.d.ts +0 -38
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/types.d.ts +0 -23
- package/dist/types-ts4.5/ui/page-layout/panel.d.ts +0 -40
- package/dist/types-ts4.5/ui/page-layout/ribbon.d.ts +0 -11
- package/dist/types-ts4.5/ui/page-layout/root.d.ts +0 -71
- package/dist/types-ts4.5/ui/page-layout/side-nav/flyout-close-delay-ms.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/side-nav/is-side-nav-shortcut-enabled-context.d.ts +0 -8
- package/dist/types-ts4.5/ui/page-layout/side-nav/is-side-nav-shortcut-enabled-provider.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/side-nav/set-side-nav-visibility-state.d.ts +0 -3
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-content.d.ts +0 -24
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-element-provider.d.ts +0 -4
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-footer.d.ts +0 -19
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-header.d.ts +0 -14
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-ref-context.d.ts +0 -2
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-toggle-button-attach-ref.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-toggle-button-element.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-toggle-tooltip-keyboard-shortcut.d.ts +0 -6
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-visibility-state.d.ts +0 -6
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav.d.ts +0 -93
- package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button-provider.d.ts +0 -17
- package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button.d.ts +0 -52
- package/dist/types-ts4.5/ui/page-layout/side-nav/types.d.ts +0 -61
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-expand-side-nav.d.ts +0 -16
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-is-side-nav-shortcut-enabled.d.ts +0 -5
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-side-nav-ref.d.ts +0 -7
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-side-nav-toggle-keyboard-shortcut.d.ts +0 -6
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-side-nav-visibility-callbacks.d.ts +0 -16
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-side-nav-visibility.d.ts +0 -20
- package/dist/types-ts4.5/ui/page-layout/side-nav/use-toggle-side-nav.d.ts +0 -16
- package/dist/types-ts4.5/ui/page-layout/side-nav/visibility-provider.d.ts +0 -8
- package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav-end.d.ts +0 -29
- package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav-middle.d.ts +0 -24
- package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav-start.d.ts +0 -32
- package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav.d.ts +0 -29
- package/dist/types-ts4.5/ui/page-layout/types.d.ts +0 -20
- package/dist/types-ts4.5/ui/page-layout/use-layout-id.d.ts +0 -12
- package/dist/types-ts4.5/ui/page-layout/use-resizing-width-css-var-on-root-element.d.ts +0 -9
- package/dist/types-ts4.5/ui/page-layout/use-safe-default-width.d.ts +0 -17
- package/dist/types-ts4.5/ui/page-layout/use-skip-link-id.d.ts +0 -5
- package/dist/types-ts4.5/ui/top-nav-items/app-switcher.d.ts +0 -32
- package/dist/types-ts4.5/ui/top-nav-items/chat-button.d.ts +0 -25
- package/dist/types-ts4.5/ui/top-nav-items/create-button.d.ts +0 -30
- package/dist/types-ts4.5/ui/top-nav-items/custom-title.d.ts +0 -23
- package/dist/types-ts4.5/ui/top-nav-items/end-item.d.ts +0 -80
- package/dist/types-ts4.5/ui/top-nav-items/help.d.ts +0 -19
- package/dist/types-ts4.5/ui/top-nav-items/icon-renderer.d.ts +0 -17
- package/dist/types-ts4.5/ui/top-nav-items/log-in.d.ts +0 -36
- package/dist/types-ts4.5/ui/top-nav-items/nav-logo/app-logo.d.ts +0 -37
- package/dist/types-ts4.5/ui/top-nav-items/nav-logo/custom-logo.d.ts +0 -36
- package/dist/types-ts4.5/ui/top-nav-items/nav-logo/logo-renderer.d.ts +0 -11
- package/dist/types-ts4.5/ui/top-nav-items/notifications.d.ts +0 -16
- package/dist/types-ts4.5/ui/top-nav-items/profile.d.ts +0 -15
- package/dist/types-ts4.5/ui/top-nav-items/search.d.ts +0 -38
- package/dist/types-ts4.5/ui/top-nav-items/settings.d.ts +0 -11
- package/dist/types-ts4.5/ui/top-nav-items/themed/button.d.ts +0 -7
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/formats/hex.d.ts +0 -9
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/formats/hsl.d.ts +0 -7
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/formats/rgb.d.ts +0 -7
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/index.d.ts +0 -21
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/parse-user-color.d.ts +0 -13
- package/dist/types-ts4.5/ui/top-nav-items/themed/color-utils/types.d.ts +0 -17
- package/dist/types-ts4.5/ui/top-nav-items/themed/get-custom-theme-styles.d.ts +0 -22
- package/dist/types-ts4.5/ui/top-nav-items/themed/get-primitives-spread-props.d.ts +0 -16
- package/dist/types-ts4.5/ui/top-nav-items/themed/has-custom-theme-context.d.ts +0 -8
- package/dist/types-ts4.5/ui/top-nav-items/themed/has-default-background-color-context.d.ts +0 -5
- package/dist/types-ts4.5/ui/top-nav-items/themed/icon-button.d.ts +0 -7
- package/dist/types-ts4.5/ui/top-nav-items/themed/link-button.d.ts +0 -3
- package/dist/types-ts4.5/ui/top-nav-items/themed/link-icon-button.d.ts +0 -7
- package/dist/types-ts4.5/ui/top-nav-items/themed/palette-rgba.d.ts +0 -14
- package/dist/types-ts4.5/ui/top-nav-items/themed/palette.d.ts +0 -42
- package/dist/types-ts4.5/ui/top-nav-items/themed/search.d.ts +0 -55
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-anchor.d.ts +0 -32
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-button.d.ts +0 -10
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-icon-button.d.ts +0 -10
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-link-button.d.ts +0 -16
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-link-icon-button.d.ts +0 -13
- package/dist/types-ts4.5/ui/top-nav-items/themed/themed-pressable.d.ts +0 -18
- package/dist/types-ts4.5/ui/top-nav-items/themed/types.d.ts +0 -54
- package/dist/types-ts4.5/ui/top-nav-items/themed/use-custom-theme-new.d.ts +0 -20
- package/dist/types-ts4.5/ui/top-nav-items/themed/use-custom-theme.d.ts +0 -12
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export declare const themedSearchBorder = "--ds-top-bar-search-border";
|
|
2
|
-
export declare const themedSearchBorderFocused = "--ds-top-bar-search-border-focused";
|
|
3
|
-
/**
|
|
4
|
-
* Theme object intended for use with Search Platform components while transitioning to nav4.
|
|
5
|
-
*
|
|
6
|
-
* This is for backwards compatibility with the legacy theming API that was designed for nav3.
|
|
7
|
-
*
|
|
8
|
-
* As nav4 matures we will ideally evolve the theming solution inside Search Platform,
|
|
9
|
-
* at which point this legacy theme object will not be needed.
|
|
10
|
-
*/
|
|
11
|
-
declare const legacySearchTheme: {
|
|
12
|
-
default: {
|
|
13
|
-
backgroundColor: string;
|
|
14
|
-
color: string;
|
|
15
|
-
borderColor: string;
|
|
16
|
-
};
|
|
17
|
-
focus: {
|
|
18
|
-
/**
|
|
19
|
-
* When expanded the input ignores the custom theme,
|
|
20
|
-
* except for its border which is derived from the highlight color.
|
|
21
|
-
*/
|
|
22
|
-
color: 'var(--ds-text)';
|
|
23
|
-
backgroundColor: 'var(--ds-background-input-pressed)';
|
|
24
|
-
borderColor: string;
|
|
25
|
-
boxShadow: string;
|
|
26
|
-
};
|
|
27
|
-
hover: {
|
|
28
|
-
/**
|
|
29
|
-
* This is not actually used for the search bar input (at least by the Search Platform components).
|
|
30
|
-
*
|
|
31
|
-
* Instead it's used as the hover background color for a close button when on mobile.
|
|
32
|
-
*/
|
|
33
|
-
backgroundColor: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* We are just using the inferred type instead of declaring it as `SearchCSS` (the type `@atlassian/search-dialog` expects)
|
|
38
|
-
*
|
|
39
|
-
* Importing the type from `@atlassian/search-dialog` means we have to declare it as a full dependency,
|
|
40
|
-
* rather than a dev dependency. Even though it's type-only, this is how local consumption is setup.
|
|
41
|
-
*
|
|
42
|
-
* This was failing typechecking in Post Office, presumably due to different versions of `@emotion/styled`.
|
|
43
|
-
* It is also a code smell having an unnecessary dependency.
|
|
44
|
-
*
|
|
45
|
-
* We still have indirect type safety from our example + product integrations, so a PR that breaks the types won't be able to merge.
|
|
46
|
-
*/
|
|
47
|
-
type LegacySearchTheme = typeof legacySearchTheme;
|
|
48
|
-
/**
|
|
49
|
-
* Provides the `theme` value for Search Platform components.
|
|
50
|
-
*
|
|
51
|
-
* This may be a `SearchCSS` object or undefined,
|
|
52
|
-
* depending on if the top bar is using custom theming.
|
|
53
|
-
*/
|
|
54
|
-
export declare function useLegacySearchTheme(): LegacySearchTheme | undefined;
|
|
55
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { type AnchorProps } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import type { CommonProps, OverriddenPrimitiveProps } from './types';
|
|
8
|
-
/**
|
|
9
|
-
* Props that are common between link buttons.
|
|
10
|
-
*/
|
|
11
|
-
interface LinkVariantCommonProps<RouterLinkConfig extends Record<string, any> = never> extends CommonProps, Omit<AnchorProps<RouterLinkConfig>, OverriddenPrimitiveProps> {
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Props shared by `ThemedPressable` and `ThemedAnchor`
|
|
15
|
-
*/
|
|
16
|
-
interface ThemedPrimitiveProps {
|
|
17
|
-
shape?: 'default' | 'square';
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
interface ThemedAnchorProps<RouterLinkConfig extends Record<string, any> = never> extends ThemedPrimitiveProps, LinkVariantCommonProps<RouterLinkConfig> {
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Intentionally an almost-duplicate of `ThemedPressable` - make sure to update both.
|
|
24
|
-
*
|
|
25
|
-
* More 'clever' solutions were tried but I couldn't get them working in an acceptable state.
|
|
26
|
-
*
|
|
27
|
-
* Polymorphism had many typing issues and required sacrificing type safety.
|
|
28
|
-
*
|
|
29
|
-
* Render props had problems passing down styles through `xcss` to the `children` function.
|
|
30
|
-
*/
|
|
31
|
-
export declare const ThemedAnchor: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedAnchorProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
32
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { PressableProps } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import type { CommonProps, OverriddenPrimitiveProps, TextButtonCommonProps } from './types';
|
|
8
|
-
export interface ThemedButtonProps extends CommonProps, Omit<PressableProps, OverriddenPrimitiveProps>, TextButtonCommonProps {
|
|
9
|
-
}
|
|
10
|
-
export declare const ThemedButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { PressableProps } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import type { CommonProps, IconButtonCommonProps, OverriddenPrimitiveProps } from './types';
|
|
8
|
-
export interface ThemedIconButtonProps extends CommonProps, Omit<PressableProps, OverriddenPrimitiveProps>, IconButtonCommonProps {
|
|
9
|
-
}
|
|
10
|
-
export declare const ThemedIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { AnchorProps } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import type { CommonProps, OverriddenPrimitiveProps, TextButtonCommonProps } from './types';
|
|
8
|
-
/**
|
|
9
|
-
* Props that are common between link buttons.
|
|
10
|
-
*/
|
|
11
|
-
interface LinkVariantCommonProps<RouterLinkConfig extends Record<string, any> = never> extends CommonProps, Omit<AnchorProps<RouterLinkConfig>, OverriddenPrimitiveProps> {
|
|
12
|
-
}
|
|
13
|
-
export interface ThemedLinkButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, TextButtonCommonProps {
|
|
14
|
-
}
|
|
15
|
-
export declare const ThemedLinkButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
16
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AnchorProps } from '@atlaskit/primitives/compiled';
|
|
3
|
-
import type { CommonProps, IconButtonCommonProps, OverriddenPrimitiveProps } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Props that are common between link buttons.
|
|
6
|
-
*/
|
|
7
|
-
interface LinkVariantCommonProps<RouterLinkConfig extends Record<string, any> = never> extends CommonProps, Omit<AnchorProps<RouterLinkConfig>, OverriddenPrimitiveProps> {
|
|
8
|
-
}
|
|
9
|
-
export interface ThemedLinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, IconButtonCommonProps {
|
|
10
|
-
href: string | RouterLinkConfig;
|
|
11
|
-
}
|
|
12
|
-
export declare const ThemedLinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkIconButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
13
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { type PressableProps } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import type { CommonProps, OverriddenPrimitiveProps } from './types';
|
|
8
|
-
/**
|
|
9
|
-
* Props shared by `ThemedPressable` and `ThemedAnchor`
|
|
10
|
-
*/
|
|
11
|
-
interface ThemedPrimitiveProps {
|
|
12
|
-
shape?: 'default' | 'square';
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
interface ThemedPressableProps extends ThemedPrimitiveProps, CommonProps, Omit<PressableProps, OverriddenPrimitiveProps> {
|
|
16
|
-
}
|
|
17
|
-
export declare const ThemedPressable: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedPressableProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { IconButtonProps } from '@atlaskit/button/new';
|
|
3
|
-
import type { IgnoredPrimitiveProps } from './get-primitives-spread-props';
|
|
4
|
-
/**
|
|
5
|
-
* Props present in underlying primitives but we want to override,
|
|
6
|
-
* so we don't want to inherit their definitions
|
|
7
|
-
*/
|
|
8
|
-
export type OverriddenPrimitiveProps = 'aria-label' | 'children' | IgnoredPrimitiveProps;
|
|
9
|
-
export interface CommonProps {
|
|
10
|
-
/**
|
|
11
|
-
* The button style variation.
|
|
12
|
-
*/
|
|
13
|
-
appearance?: 'default' | 'primary' | 'subtle';
|
|
14
|
-
/**
|
|
15
|
-
* Whether the button is disabled.
|
|
16
|
-
*/
|
|
17
|
-
isDisabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Indicates that the button is selected.
|
|
20
|
-
*/
|
|
21
|
-
isSelected?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Props shared by `Button` and `LinkButton`
|
|
25
|
-
*/
|
|
26
|
-
export interface TextButtonCommonProps {
|
|
27
|
-
/**
|
|
28
|
-
* Places an icon within the button, before the button's text.
|
|
29
|
-
*/
|
|
30
|
-
iconBefore?: IconButtonProps['icon'];
|
|
31
|
-
/**
|
|
32
|
-
* Text content to be rendered in the button.
|
|
33
|
-
*/
|
|
34
|
-
children: ReactNode;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Props shared by `ThemedIconButtonProps` and `ThemedLinkIconButton`
|
|
38
|
-
*/
|
|
39
|
-
export interface IconButtonCommonProps {
|
|
40
|
-
children?: never;
|
|
41
|
-
'aria-label'?: never;
|
|
42
|
-
/**
|
|
43
|
-
* Provide an accessible label, often used by screen readers.
|
|
44
|
-
*/
|
|
45
|
-
label: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Places an icon within the button.
|
|
48
|
-
*/
|
|
49
|
-
icon: IconButtonProps['icon'];
|
|
50
|
-
/**
|
|
51
|
-
* Props passed down to the Tooltip component.
|
|
52
|
-
*/
|
|
53
|
-
tooltip?: IconButtonProps['tooltip'];
|
|
54
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type CustomTheme } from './get-custom-theme-styles';
|
|
2
|
-
type ResultNew = {
|
|
3
|
-
isEnabled: false;
|
|
4
|
-
} | {
|
|
5
|
-
isEnabled: true;
|
|
6
|
-
style: React.CSSProperties;
|
|
7
|
-
hasDefaultBackground: boolean;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* React hook that computes the custom theme style for the top navigation bar.
|
|
11
|
-
*
|
|
12
|
-
* Determines whether a custom theme is enabled, computes the resulting style,
|
|
13
|
-
* and checks if the background color matches the default for the current color mode.
|
|
14
|
-
*
|
|
15
|
-
* @param theme Optional custom theme configuration object.
|
|
16
|
-
* @returns An object indicating if the custom theme is enabled, the computed style,
|
|
17
|
-
* and a flag specifying if the default background color is used.
|
|
18
|
-
*/
|
|
19
|
-
export declare function useCustomThemeNew(theme: CustomTheme | undefined): ResultNew;
|
|
20
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type CustomTheme } from './get-custom-theme-styles';
|
|
2
|
-
type Result = {
|
|
3
|
-
isEnabled: false;
|
|
4
|
-
} | {
|
|
5
|
-
isEnabled: true;
|
|
6
|
-
style: React.CSSProperties;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Processes the provided theme and returns theme styles if possible.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useCustomTheme(theme: CustomTheme | undefined): Result;
|
|
12
|
-
export {};
|