@atlaskit/onboarding 14.6.2 → 15.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/cjs/components/spotlight-manager.js +4 -1
  3. package/dist/cjs/components/spotlight-transition.js +1 -0
  4. package/dist/cjs/components/theme.js +4 -3
  5. package/dist/cjs/styled/dialog.js +2 -0
  6. package/dist/cjs/styled/modal.js +4 -0
  7. package/dist/cjs/styled/target.compiled.css +1 -1
  8. package/dist/cjs/styled/target.js +4 -2
  9. package/dist/es2019/components/index.js +15 -1
  10. package/dist/es2019/components/spotlight-manager.js +3 -1
  11. package/dist/es2019/components/spotlight-transition.js +1 -0
  12. package/dist/es2019/components/theme.js +4 -3
  13. package/dist/es2019/styled/dialog.js +2 -0
  14. package/dist/es2019/styled/modal.js +4 -0
  15. package/dist/es2019/styled/target.compiled.css +1 -1
  16. package/dist/es2019/styled/target.js +4 -2
  17. package/dist/esm/components/index.js +15 -1
  18. package/dist/esm/components/spotlight-manager.js +3 -1
  19. package/dist/esm/components/spotlight-transition.js +1 -0
  20. package/dist/esm/components/theme.js +4 -3
  21. package/dist/esm/styled/dialog.js +2 -0
  22. package/dist/esm/styled/modal.js +4 -0
  23. package/dist/esm/styled/target.compiled.css +1 -1
  24. package/dist/esm/styled/target.js +4 -2
  25. package/modal/package.json +1 -8
  26. package/modal-transition/package.json +1 -8
  27. package/package.json +16 -42
  28. package/spotlight/package.json +1 -8
  29. package/spotlight-card/package.json +1 -8
  30. package/spotlight-manager/package.json +1 -8
  31. package/spotlight-target/package.json +1 -8
  32. package/spotlight-transition/package.json +1 -8
  33. package/target/package.json +1 -8
  34. package/theme/package.json +1 -8
  35. package/types/package.json +1 -8
  36. package/use-spotlight/package.json +1 -8
  37. package/dist/types-ts4.5/components/clone.d.ts +0 -54
  38. package/dist/types-ts4.5/components/index.d.ts +0 -10
  39. package/dist/types-ts4.5/components/modal-transition.d.ts +0 -17
  40. package/dist/types-ts4.5/components/modal.d.ts +0 -54
  41. package/dist/types-ts4.5/components/node-resolver-spotlight-inner.d.ts +0 -18
  42. package/dist/types-ts4.5/components/node-resolver-spotlight-target.d.ts +0 -27
  43. package/dist/types-ts4.5/components/spotlight-card.d.ts +0 -14
  44. package/dist/types-ts4.5/components/spotlight-dialog.d.ts +0 -86
  45. package/dist/types-ts4.5/components/spotlight-inner.d.ts +0 -58
  46. package/dist/types-ts4.5/components/spotlight-manager.d.ts +0 -83
  47. package/dist/types-ts4.5/components/spotlight-target.d.ts +0 -50
  48. package/dist/types-ts4.5/components/spotlight-transition.d.ts +0 -45
  49. package/dist/types-ts4.5/components/spotlight.d.ts +0 -15
  50. package/dist/types-ts4.5/components/theme.d.ts +0 -10
  51. package/dist/types-ts4.5/components/use-spotlight.d.ts +0 -9
  52. package/dist/types-ts4.5/components/value-changed.d.ts +0 -11
  53. package/dist/types-ts4.5/entry-points/modal-transition.d.ts +0 -1
  54. package/dist/types-ts4.5/entry-points/modal.d.ts +0 -1
  55. package/dist/types-ts4.5/entry-points/spotlight-card.d.ts +0 -1
  56. package/dist/types-ts4.5/entry-points/spotlight-manager.d.ts +0 -3
  57. package/dist/types-ts4.5/entry-points/spotlight-target.d.ts +0 -1
  58. package/dist/types-ts4.5/entry-points/spotlight-transition.d.ts +0 -2
  59. package/dist/types-ts4.5/entry-points/spotlight.d.ts +0 -1
  60. package/dist/types-ts4.5/entry-points/target.d.ts +0 -1
  61. package/dist/types-ts4.5/entry-points/theme.d.ts +0 -1
  62. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  63. package/dist/types-ts4.5/entry-points/use-spotlight.d.ts +0 -1
  64. package/dist/types-ts4.5/index.d.ts +0 -2
  65. package/dist/types-ts4.5/styled/blanket.d.ts +0 -19
  66. package/dist/types-ts4.5/styled/dialog.d.ts +0 -33
  67. package/dist/types-ts4.5/styled/modal.d.ts +0 -51
  68. package/dist/types-ts4.5/styled/target.d.ts +0 -45
  69. package/dist/types-ts4.5/types.d.ts +0 -173
  70. package/dist/types-ts4.5/utils/use-element-box.d.ts +0 -20
  71. package/dist/types-ts4.5/utils/use-element-observer.d.ts +0 -16
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/spotlight.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/spotlight.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/spotlight.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/spotlight-card.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/spotlight-card.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/spotlight-card.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/spotlight-manager.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/spotlight-manager.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/spotlight-manager.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/spotlight-target.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/spotlight-target.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/spotlight-target.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/spotlight-transition.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/spotlight-transition.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/spotlight-transition.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/target.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/target.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/target.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/theme.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/theme.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/theme.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "**/*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/use-spotlight.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/use-spotlight.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/use-spotlight.d.ts"
17
10
  }
@@ -1,54 +0,0 @@
1
- import React, { type MouseEvent } from 'react';
2
- interface CloneProps {
3
- /**
4
- * Whether to display a pulse animation around the spotlighted element.
5
- */
6
- pulse: boolean;
7
- /**
8
- * An object containing the information used for positioning clone.
9
- */
10
- style: Record<string, any>;
11
- /**
12
- * The name of the SpotlightTarget.
13
- */
14
- target?: string;
15
- /**
16
- * The spotlight target node.
17
- */
18
- targetNode: HTMLElement;
19
- /**
20
- * The background color of the element being highlighted
21
- */
22
- targetBgColor?: string;
23
- /**
24
- * Function to fire when a person clicks on the cloned target.
25
- */
26
- targetOnClick?: (eventData: {
27
- event: MouseEvent<HTMLElement>;
28
- target?: string;
29
- }) => void;
30
- /**
31
- * The border radius of the element being highlighted.
32
- */
33
- targetRadius?: number | string;
34
- /**
35
- * A `testId` prop is provided for specified elements,
36
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
37
- * serving as a hook for automated tests.
38
- */
39
- testId?: string;
40
- /**
41
- * Whether to watch for html content changes on the target
42
- */
43
- shouldWatch?: boolean;
44
- }
45
- /**
46
- * __Clone__
47
- *
48
- * Used for cloning spotlight targets. The clone is positioned on top of the spotlight target with
49
- * a pulsing animation.
50
- *
51
- * @internal
52
- */
53
- declare const Clone: (props: CloneProps) => React.JSX.Element;
54
- export default Clone;
@@ -1,10 +0,0 @@
1
- import Modal from './modal';
2
- import ModalTransition from './modal-transition';
3
- import Spotlight from './spotlight';
4
- import SpotlightCard from './spotlight-card';
5
- import SpotlightManager from './spotlight-manager';
6
- import SpotlightTarget from './spotlight-target';
7
- import SpotlightTransition from './spotlight-transition';
8
- import useSpotlight from './use-spotlight';
9
- export { spotlightButtonTheme, modalButtonTheme } from './theme';
10
- export { Modal, Spotlight, SpotlightCard, SpotlightManager, SpotlightTarget, SpotlightTransition, useSpotlight, ModalTransition, };
@@ -1,17 +0,0 @@
1
- /**
2
- * We re-export this because products may have multiple versions of
3
- * `@atlaskit/modal-dialog`.
4
- *
5
- * If a consumer uses the onboarding `Modal` with the `ModalTransition` from an
6
- * incompatible version of `@atlaskit/modal-dialog`, then the modal can get
7
- * stuck in an open state.
8
- *
9
- * See https://product-fabric.atlassian.net/browse/DSP-796 for more details
10
- * and a reproduction.
11
- *
12
- */
13
- import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
14
- /**
15
- * @deprecated Use `@atlaskit/spotlight` instead.
16
- */
17
- export default ModalTransition;
@@ -1,54 +0,0 @@
1
- import React, { Component, type ElementType, type ReactNode } from 'react';
2
- import { type ModalFooterProps as FooterComponentProps, type ModalHeaderProps as HeaderComponentProps } from '@atlaskit/modal-dialog';
3
- import { type Actions } from '../types';
4
- type ModalProps = {
5
- /**
6
- * Buttons to render in the footer.
7
- */
8
- actions?: Actions;
9
- /**
10
- * The elements rendered in the modal.
11
- */
12
- children: ReactNode;
13
- /**
14
- * Path to the image.
15
- */
16
- image?: string;
17
- /**
18
- * Optional element rendered above the body.
19
- */
20
- header?: ElementType<HeaderComponentProps>;
21
- /**
22
- * Optional element rendered below the body.
23
- */
24
- footer?: ElementType<FooterComponentProps>;
25
- /**
26
- * Heading text rendered above the body.
27
- */
28
- heading?: string;
29
- /**
30
- * Boolean prop to confirm if primary button in the footer should be shown on the right.
31
- */
32
- experimental_shouldShowPrimaryButtonOnRight?: boolean;
33
- /**
34
- * This prop is a unique string that appears as an attribute `data-testid` in the rendered HTML output serving as a hook for automated tests.
35
- */
36
- testId?: string;
37
- };
38
- /**
39
- * __Benefits modal__
40
- *
41
- * A benefits modal explains the benefits of a significant new feature or experience change.
42
- *
43
- * - [Examples](https://atlassian.design/components/onboarding/benefits-modal/examples)
44
- * - [Code](https://atlassian.design/components/onboarding/benefits-modal/code)
45
- * - [Usage](https://atlassian.design/components/onboarding/benefits-modal/usage)
46
- *
47
- * @deprecated Use `@atlaskit/modal-dialog` instead.
48
- */
49
- export default class BenefitsModal extends Component<ModalProps> {
50
- headerComponent: (props: ModalProps) => React.ElementType<HeaderComponentProps> | (() => React.JSX.Element);
51
- footerComponent: (props: ModalProps) => React.ElementType<FooterComponentProps> | (() => React.JSX.Element | null);
52
- render(): React.JSX.Element;
53
- }
54
- export {};
@@ -1,18 +0,0 @@
1
- import React, { type ReactElement } from 'react';
2
- interface NodeResolverSpotlightInnerProps {
3
- hasNodeResolver: boolean;
4
- innerRef: (element: HTMLElement | null) => void;
5
- children: ReactElement;
6
- }
7
- /**
8
- * A wrapper component that conditionally applies a NodeResolver to its children.
9
- *
10
- * Note: NodeResolver should not be used in React 18 concurrent mode. This component
11
- * is intended to be removed once the feature flag is removed.
12
- * @param {boolean} props.hasNodeResolver - Determines whether to apply the NodeResolver.
13
- * @param {ReactElement} props.children - The child elements to be wrapped.
14
- * @param {(instance: HTMLDivElement) => void} props.innerRef - A ref callback to get the instance of the HTMLDivElement.
15
- * @returns {ReactElement} The children wrapped with NodeResolver if hasNodeResolver is true, wrape the children in a div setting innerRef with ref to the div.
16
- */
17
- declare const NodeResolverSpotlightInner: ({ hasNodeResolver, children, innerRef, }: NodeResolverSpotlightInnerProps) => React.JSX.Element;
18
- export default NodeResolverSpotlightInner;
@@ -1,27 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactElement } from 'react';
6
- interface NodeResolverSpotlightTargetProps {
7
- hasNodeResolver: boolean;
8
- children: ReactElement;
9
- getTargetRef: (name: string) => (element: HTMLElement | null | undefined) => void;
10
- name: string;
11
- }
12
- /**
13
- * A wrapper component that conditionally applies a NodeResolver to its children.
14
- *
15
- * Note: NodeResolver should not be used in React 18 concurrent mode. This component
16
- * is intended to be removed once the feature flag is removed.
17
- * @param {boolean} props.hasNodeResolver - Determines whether to apply the NodeResolver.
18
- * @param {ReactElement} props.children - The child elements to be wrapped.
19
- * @param {string} props.name - The name to reference from Spotlight.
20
- * @param {ReactElement} props.getTargetRef - Setting up Target Node in Spotlight Manager.
21
- * @returns {ReactElement} The children wrapped with NodeResolver if hasNodeResolver is true, wrape the children in a div setting innerRef with ref to the div.
22
- */
23
- declare const NodeResolverSpotlightTarget: {
24
- ({ hasNodeResolver, children, getTargetRef, name, }: NodeResolverSpotlightTargetProps): JSX.Element;
25
- displayName: string;
26
- };
27
- export default NodeResolverSpotlightTarget;
@@ -1,14 +0,0 @@
1
- import { type SpotlightCardProps } from '../types';
2
- /**
3
- * __Spotlight card__
4
- *
5
- * A spotlight card is for onboarding messages that need a more flexible layout, or don't require a dialog.
6
- *
7
- * - [Examples](https://atlassian.design/components/onboarding/spotlight-card/examples)
8
- * - [Code](https://atlassian.design/components/onboarding/spotlight-card/code)
9
- * - [Usage](https://atlassian.design/components/onboarding/spotlight-card/usage)
10
- *
11
- * @deprecated Use `@atlaskit/spotlight` instead.
12
- */
13
- declare const SpotlightCard: React.ForwardRefExoticComponent<React.PropsWithoutRef<SpotlightCardProps> & React.RefAttributes<HTMLDivElement>>;
14
- export default SpotlightCard;
@@ -1,86 +0,0 @@
1
- import React, { Component, type ComponentType, type ReactNode } from 'react';
2
- import { type Actions } from '../types';
3
- interface SpotlightDialogProps {
4
- /**
5
- * Buttons to render in the footer.
6
- */
7
- actions?: Actions;
8
- /**
9
- * An optional element rendered beside the footer actions.
10
- */
11
- actionsBeforeElement?: ReactNode;
12
- /**
13
- * The elements rendered in the modal.
14
- */
15
- children?: ReactNode;
16
- /**
17
- * Where the dialog should appear, relative to the contents of the children.
18
- */
19
- dialogPlacement?: 'top left' | 'top center' | 'top right' | 'right top' | 'right middle' | 'right bottom' | 'bottom left' | 'bottom center' | 'bottom right' | 'left top' | 'left middle' | 'left bottom';
20
- /**
21
- * The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
22
- */
23
- dialogWidth: number;
24
- /**
25
- * Optional element rendered below the body.
26
- */
27
- footer?: ComponentType<any>;
28
- /**
29
- * Optional element rendered above the body.
30
- */
31
- header?: ComponentType<any>;
32
- /**
33
- * Heading text rendered above the body.
34
- */
35
- heading?: string;
36
- /**
37
- * An optional element rendered to the right of the heading.
38
- */
39
- headingAfterElement?: ReactNode;
40
- /**
41
- * Path to the image.
42
- */
43
- image?: string;
44
- /**
45
- * The spotlight target node.
46
- */
47
- targetNode: HTMLElement;
48
- /**
49
- * A `testId` prop is provided for specified elements,
50
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
51
- * serving as a hook for automated tests.
52
- */
53
- testId?: string;
54
- /**
55
- * Refers to an `aria-label` attribute. Sets an accessible name for the spotlight dialog wrapper to announce it to users of assistive technology.
56
- * Usage of either this, or the `titleId` prop is strongly recommended to improve accessibility.
57
- */
58
- label?: string;
59
- /**
60
- * Refers to a value of an `aria-labelledby` attribute. References an element to define accessible name for the spotlight dialog.
61
- * Usage of either this, or the `label` prop is strongly recommended to improve accessibility.
62
- */
63
- titleId?: string;
64
- }
65
- interface State {
66
- focusLockDisabled: boolean;
67
- }
68
- /**
69
- * __Spotlight dialog__
70
- *
71
- * An onboarding spotlight introduces new features to users through focused messages or multi-step tours.
72
- *
73
- * - [Examples](https://atlassian.design/components/onboarding/examples)
74
- * - [Code](https://atlassian.design/components/onboarding/code)
75
- * - [Usage](https://atlassian.design/components/onboarding/usage)
76
- */
77
- declare class SpotlightDialogComponent extends Component<SpotlightDialogProps, State> {
78
- state: {
79
- focusLockDisabled: boolean;
80
- };
81
- private focusLockTimeoutId;
82
- componentDidMount(): void;
83
- componentWillUnmount(): void;
84
- render(): React.JSX.Element;
85
- }
86
- export default SpotlightDialogComponent;
@@ -1,58 +0,0 @@
1
- import React from 'react';
2
- import { type ScrollLogicalPosition, type SpotlightProps } from '../types';
3
- import { type ElementBoundingBox } from '../utils/use-element-box';
4
- interface SpotlightInnerProps extends SpotlightProps {
5
- /**
6
- * The spotlight target DOM element.
7
- */
8
- targetNode: HTMLElement;
9
- /**
10
- * Called when the component has been mounted.
11
- */
12
- onOpened: () => any;
13
- /**
14
- * Called when the component has been unmounted.
15
- */
16
- onClosed: () => any;
17
- /**
18
- * Whether to display a pulse animation around the spotlighted element.
19
- *
20
- * Same as `SpotlightProps` but required instead of optional.
21
- */
22
- pulse: boolean;
23
- /**
24
- * The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
25
- *
26
- * Same as `SpotlightProps` but required instead of optional.
27
- */
28
- dialogWidth: number;
29
- /**
30
- * passed to scrollIntoView as the block option, which determines the vertical alignment of the target node in the closest scrollable ancestor.
31
- */
32
- scrollPositionBlock?: ScrollLogicalPosition;
33
- }
34
- interface State {
35
- replacementElement: HTMLElement | null;
36
- }
37
- /**
38
- * __Spotlight inner__
39
- *
40
- * Renders the spotlight target clone and dialog.
41
- *
42
- * @internal
43
- */
44
- declare class SpotlightInner extends React.Component<SpotlightInnerProps, State> {
45
- static defaultProps: {
46
- dialogWidth: number;
47
- pulse: boolean;
48
- };
49
- state: {
50
- replacementElement: null;
51
- };
52
- componentDidUpdate(prevProps: SpotlightInnerProps): void;
53
- componentDidMount(): void;
54
- componentWillUnmount(): void;
55
- getTargetNodeStyle: (box: ElementBoundingBox) => {};
56
- render(): React.JSX.Element;
57
- }
58
- export default SpotlightInner;
@@ -1,83 +0,0 @@
1
- import React, { type ElementType, PureComponent, type ReactNode } from 'react';
2
- import { type MemoizedFn } from 'memoize-one';
3
- export type TargetRef = (element: HTMLElement | null | undefined) => void;
4
- export type GetTargetRef = (
5
- /**
6
- * The `name` prop passed to the corresponding `SpotlightTarget`
7
- *
8
- * This is used as a key into the `targets` map owned by `SpotlightManager`
9
- * because the `SpotlightManager` stores the target nodes for
10
- * descendant `SpotlightTarget` instances.
11
- */
12
- name: string) => TargetRef;
13
- declare const TargetConsumer: React.Consumer<GetTargetRef | undefined>;
14
- declare const SpotlightContext: React.Context<{
15
- opened: () => void;
16
- closed: () => void;
17
- targets: {
18
- [key: string]: HTMLElement | undefined;
19
- };
20
- }>;
21
- declare const SpotlightStateConsumer: React.Consumer<{
22
- opened: () => void;
23
- closed: () => void;
24
- targets: {
25
- [key: string]: HTMLElement | undefined;
26
- };
27
- }>;
28
- export { TargetConsumer };
29
- export { SpotlightContext, SpotlightStateConsumer as SpotlightConsumer };
30
- interface SpotlightManagerProps {
31
- /**
32
- * Boolean prop for toggling blanket transparency.
33
- */
34
- blanketIsTinted?: boolean;
35
- /**
36
- * Typically the app, or a section of the app.
37
- */
38
- children: ReactNode;
39
- /**
40
- * @deprecated
41
- * Component is deprecated and will be removed in the future.
42
- */
43
- component?: ElementType;
44
- /**
45
- * Handler function to be called when the blanket is clicked.
46
- */
47
- onBlanketClicked?: () => void;
48
- }
49
- /**
50
- * __Spotlight manager__
51
- *
52
- * A spotlight manager manages the visibility of spotlights used to introduce new features to users through focused messages or multi-step tours.
53
- *
54
- * - [Examples](https://atlassian.design/components/onboarding/examples)
55
- * - [Code](https://atlassian.design/components/onboarding/code)
56
- * - [Usage](https://atlassian.design/components/onboarding/usage)
57
- *
58
- * @deprecated Use `@atlaskit/spotlight` instead.
59
- */
60
- export default class SpotlightManager extends PureComponent<SpotlightManagerProps, {
61
- spotlightCount: number;
62
- targets: {
63
- [key: string]: HTMLElement | void;
64
- };
65
- }> {
66
- static defaultProps: {
67
- blanketIsTinted: boolean;
68
- };
69
- componentDidMount(): void;
70
- state: {
71
- spotlightCount: number;
72
- targets: {};
73
- };
74
- getTargetRef: (name: string) => (element: HTMLElement | null | undefined) => void;
75
- spotlightOpen: () => void;
76
- spotlightClose: () => void;
77
- getStateProviderValue: MemoizedFn<(this: any, targets: any) => {
78
- opened: () => void;
79
- closed: () => void;
80
- targets: any;
81
- }>;
82
- render(): React.JSX.Element;
83
- }
@@ -1,50 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type TargetRef } from './spotlight-manager';
3
- type RenderChildrenFunction = (props: {
4
- /**
5
- * Pass this as the `ref` of the element that should be cloned.
6
- *
7
- * This is useful if:
8
- *
9
- * - you don't want a wrapping `<div>`
10
- * - a component exposes specific children through ref props
11
- *
12
- * @example
13
- * ```tsx
14
- * <SpotlightTarget>
15
- * {({ targetRef }) => (
16
- * <OpaqueComponent
17
- * headingRef={targetRef}
18
- * />
19
- * )}
20
- * </SpotlightTarget>
21
- * ```
22
- */
23
- targetRef?: TargetRef;
24
- }) => ReactNode;
25
- interface SpotlightTargetProps {
26
- /**
27
- * A single child.
28
- */
29
- children: ReactNode | RenderChildrenFunction;
30
- /**
31
- * The name to reference from Spotlight.
32
- */
33
- name: string;
34
- }
35
- /**
36
- * __Spotlight target__
37
- *
38
- * A spotlight target marks a component to be used for introducing new features to users through focused messages or multi-step tours.
39
- *
40
- * - [Examples](https://atlassian.design/components/onboarding/examples)
41
- * - [Code](https://atlassian.design/components/onboarding/code)
42
- * - [Usage](https://atlassian.design/components/onboarding/usage)
43
- *
44
- * @deprecated Use `@atlaskit/spotlight` instead.
45
- */
46
- declare const SpotlightTarget: {
47
- ({ children, name }: SpotlightTargetProps): React.JSX.Element;
48
- displayName: string;
49
- };
50
- export default SpotlightTarget;
@@ -1,45 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- interface SpotlightTransitionProps {
3
- /**
4
- * Children that are conditionally rendered. The transition happens based
5
- * on the existence or non-existence of children.
6
- */
7
- children?: ReactNode;
8
- }
9
- interface State {
10
- currentChildren: ReactNode;
11
- }
12
- interface SpotlightTransitionContextModel {
13
- isOpen: boolean;
14
- onExited: () => void;
15
- }
16
- /**
17
- * __Spotlight transition__
18
- *
19
- * A spotlight transition holds onto spotlights so they can fade out when exiting the viewport.
20
- *
21
- * - [Examples](https://atlassian.design/components/onboarding/examples)
22
- * - [Code](https://atlassian.design/components/onboarding/code)
23
- * - [Usage](https://atlassian.design/components/onboarding/usage)
24
- *
25
- * @deprecated Use `@atlaskit/spotlight` instead.
26
- */
27
- declare class SpotlightTransition extends React.Component<SpotlightTransitionProps, State> {
28
- static getDerivedStateFromProps(props: SpotlightTransitionProps, state: State): {
29
- currentChildren: React.ReactNode;
30
- };
31
- state: {
32
- currentChildren: undefined;
33
- };
34
- onExited: () => void;
35
- render(): React.JSX.Element;
36
- }
37
- /**
38
- * __Spotlight transition consumer__
39
- *
40
- * Used to consume the spotlight transition context through render props.
41
- *
42
- * @internal
43
- */
44
- export declare const SpotlightTransitionConsumer: React.Consumer<SpotlightTransitionContextModel>;
45
- export default SpotlightTransition;