@atlaskit/onboarding 11.2.0 → 11.2.2
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 +12 -0
- package/dist/cjs/components/spotlight-dialog.js +5 -1
- package/dist/es2019/components/spotlight-dialog.js +5 -1
- package/dist/esm/components/spotlight-dialog.js +5 -1
- package/dist/types/components/clone.d.ts +6 -6
- package/dist/types/components/modal.d.ts +7 -7
- package/dist/types/components/spotlight-card.d.ts +9 -9
- package/dist/types/components/spotlight-dialog.d.ts +11 -11
- package/dist/types/components/spotlight-inner.d.ts +4 -4
- package/dist/types/components/spotlight-manager.d.ts +2 -2
- package/dist/types/components/spotlight-target.d.ts +2 -2
- package/dist/types/components/spotlight.d.ts +16 -16
- package/dist/types-ts4.5/components/clone.d.ts +6 -6
- package/dist/types-ts4.5/components/modal.d.ts +7 -7
- package/dist/types-ts4.5/components/spotlight-card.d.ts +9 -9
- package/dist/types-ts4.5/components/spotlight-dialog.d.ts +11 -11
- package/dist/types-ts4.5/components/spotlight-inner.d.ts +4 -4
- package/dist/types-ts4.5/components/spotlight-manager.d.ts +2 -2
- package/dist/types-ts4.5/components/spotlight-target.d.ts +2 -2
- package/dist/types-ts4.5/components/spotlight.d.ts +16 -16
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/onboarding
|
|
2
2
|
|
|
3
|
+
## 11.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#69022](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69022) [`395c74147990`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/395c74147990) - Migrate packages to use declarative entry points
|
|
8
|
+
|
|
9
|
+
## 11.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#67032](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67032) [`038e62a39d23`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/038e62a39d23) - [ux] Ensure spotlight dialog always uses heading level 2. This will eventually become heading level 1 once the dialog becomes a true modal.
|
|
14
|
+
|
|
3
15
|
## 11.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -27,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
29
|
var packageName = "@atlaskit/onboarding";
|
|
30
|
-
var packageVersion = "11.2.
|
|
30
|
+
var packageVersion = "11.2.2";
|
|
31
31
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
32
32
|
(0, _inherits2.default)(SpotlightDialog, _Component);
|
|
33
33
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -138,6 +138,10 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
},
|
|
139
139
|
heading: heading,
|
|
140
140
|
headingAfterElement: headingAfterElement
|
|
141
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
142
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
143
|
+
,
|
|
144
|
+
headingLevel: 2
|
|
141
145
|
}, children))));
|
|
142
146
|
});
|
|
143
147
|
}
|
|
@@ -7,7 +7,7 @@ import { DialogImage } from '../styled/dialog';
|
|
|
7
7
|
import SpotlightCard from './spotlight-card';
|
|
8
8
|
import ValueChanged from './value-changed';
|
|
9
9
|
const packageName = "@atlaskit/onboarding";
|
|
10
|
-
const packageVersion = "11.2.
|
|
10
|
+
const packageVersion = "11.2.2";
|
|
11
11
|
class SpotlightDialog extends Component {
|
|
12
12
|
constructor(...args) {
|
|
13
13
|
super(...args);
|
|
@@ -109,6 +109,10 @@ class SpotlightDialog extends Component {
|
|
|
109
109
|
},
|
|
110
110
|
heading: heading,
|
|
111
111
|
headingAfterElement: headingAfterElement
|
|
112
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
113
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
114
|
+
,
|
|
115
|
+
headingLevel: 2
|
|
112
116
|
}, children)))));
|
|
113
117
|
}
|
|
114
118
|
}
|
|
@@ -17,7 +17,7 @@ import { DialogImage } from '../styled/dialog';
|
|
|
17
17
|
import SpotlightCard from './spotlight-card';
|
|
18
18
|
import ValueChanged from './value-changed';
|
|
19
19
|
var packageName = "@atlaskit/onboarding";
|
|
20
|
-
var packageVersion = "11.2.
|
|
20
|
+
var packageVersion = "11.2.2";
|
|
21
21
|
var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(SpotlightDialog, _Component);
|
|
23
23
|
var _super = _createSuper(SpotlightDialog);
|
|
@@ -128,6 +128,10 @@ var SpotlightDialog = /*#__PURE__*/function (_Component) {
|
|
|
128
128
|
},
|
|
129
129
|
heading: heading,
|
|
130
130
|
headingAfterElement: headingAfterElement
|
|
131
|
+
// This should be heading level 1 since this is technically a modal, including a focus lock on the modal window.
|
|
132
|
+
// But because it is not a _true_ modal, we are setting it to `2` until that is fixed.
|
|
133
|
+
,
|
|
134
|
+
headingLevel: 2
|
|
131
135
|
}, children))));
|
|
132
136
|
});
|
|
133
137
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
export interface CloneProps {
|
|
3
3
|
/**
|
|
4
|
-
* Whether or not to display a pulse animation around the spotlighted element
|
|
4
|
+
* Whether or not to display a pulse animation around the spotlighted element.
|
|
5
5
|
*/
|
|
6
6
|
pulse: boolean;
|
|
7
7
|
/**
|
|
8
|
-
* An object containing the information used for positioning clone
|
|
8
|
+
* An object containing the information used for positioning clone.
|
|
9
9
|
*/
|
|
10
10
|
style: Record<string, any>;
|
|
11
11
|
/**
|
|
12
|
-
* The name of the SpotlightTarget
|
|
12
|
+
* The name of the SpotlightTarget.
|
|
13
13
|
*/
|
|
14
14
|
target?: string;
|
|
15
15
|
/**
|
|
16
|
-
* The spotlight target node
|
|
16
|
+
* The spotlight target node.
|
|
17
17
|
*/
|
|
18
18
|
targetNode: HTMLElement;
|
|
19
19
|
/**
|
|
@@ -21,14 +21,14 @@ export interface CloneProps {
|
|
|
21
21
|
*/
|
|
22
22
|
targetBgColor?: string;
|
|
23
23
|
/**
|
|
24
|
-
* Function to fire when a
|
|
24
|
+
* Function to fire when a person clicks on the cloned target.
|
|
25
25
|
*/
|
|
26
26
|
targetOnClick?: (eventData: {
|
|
27
27
|
event: MouseEvent<HTMLElement>;
|
|
28
28
|
target?: string;
|
|
29
29
|
}) => void;
|
|
30
30
|
/**
|
|
31
|
-
* The border
|
|
31
|
+
* The border radius of the element being highlighted.
|
|
32
32
|
*/
|
|
33
33
|
targetRadius?: number;
|
|
34
34
|
/**
|
|
@@ -5,31 +5,31 @@ import { ModalFooterProps as FooterComponentProps, ModalHeaderProps as HeaderCom
|
|
|
5
5
|
import { Actions } from '../types';
|
|
6
6
|
type ModalProps = {
|
|
7
7
|
/**
|
|
8
|
-
* Buttons to render in the footer
|
|
8
|
+
* Buttons to render in the footer.
|
|
9
9
|
*/
|
|
10
10
|
actions?: Actions;
|
|
11
11
|
/**
|
|
12
|
-
* The elements rendered in the modal
|
|
12
|
+
* The elements rendered in the modal.
|
|
13
13
|
*/
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
/**
|
|
16
|
-
* Path to the
|
|
16
|
+
* Path to the image.
|
|
17
17
|
*/
|
|
18
18
|
image?: string;
|
|
19
19
|
/**
|
|
20
|
-
* Optional element rendered above the body
|
|
20
|
+
* Optional element rendered above the body.
|
|
21
21
|
*/
|
|
22
22
|
header?: ElementType<HeaderComponentProps>;
|
|
23
23
|
/**
|
|
24
|
-
* Optional element rendered below the body
|
|
24
|
+
* Optional element rendered below the body.
|
|
25
25
|
*/
|
|
26
26
|
footer?: ElementType<FooterComponentProps>;
|
|
27
27
|
/**
|
|
28
|
-
* Heading text rendered above the body
|
|
28
|
+
* Heading text rendered above the body.
|
|
29
29
|
*/
|
|
30
30
|
heading?: string;
|
|
31
31
|
/**
|
|
32
|
-
* Boolean prop to confirm if primary button in the footer should be shown on the right
|
|
32
|
+
* Boolean prop to confirm if primary button in the footer should be shown on the right.
|
|
33
33
|
*/
|
|
34
34
|
experimental_shouldShowPrimaryButtonOnRight?: boolean;
|
|
35
35
|
};
|
|
@@ -3,26 +3,26 @@ import { ComponentType, ReactNode, Ref } from 'react';
|
|
|
3
3
|
import { Actions } from '../types';
|
|
4
4
|
interface SpotlightCardProps {
|
|
5
5
|
/**
|
|
6
|
-
* Buttons to render in the footer
|
|
6
|
+
* Buttons to render in the footer.
|
|
7
7
|
*/
|
|
8
8
|
actions?: Actions;
|
|
9
9
|
/**
|
|
10
|
-
* An optional element rendered to the left of the footer actions
|
|
10
|
+
* An optional element rendered to the left of the footer actions.
|
|
11
11
|
*/
|
|
12
12
|
actionsBeforeElement?: ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* The content of the card
|
|
14
|
+
* The content of the card.
|
|
15
15
|
*/
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
/**
|
|
18
|
-
* The container elements rendered by the component
|
|
18
|
+
* The container elements rendered by the component.
|
|
19
19
|
*/
|
|
20
20
|
components?: {
|
|
21
21
|
Header?: ComponentType<any>;
|
|
22
22
|
Footer?: ComponentType<any>;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* The heading to be rendered above the body
|
|
25
|
+
* The heading to be rendered above the body content.
|
|
26
26
|
*/
|
|
27
27
|
heading?: ReactNode;
|
|
28
28
|
/**
|
|
@@ -31,15 +31,15 @@ interface SpotlightCardProps {
|
|
|
31
31
|
*/
|
|
32
32
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
33
|
/**
|
|
34
|
-
* An optional element rendered to the right of the heading
|
|
34
|
+
* An optional element rendered to the right of the heading, usually used to number steps in a multi-step flow.
|
|
35
35
|
*/
|
|
36
36
|
headingAfterElement?: ReactNode;
|
|
37
37
|
/**
|
|
38
|
-
* The image src to render above the heading
|
|
38
|
+
* The image src to render above the heading.
|
|
39
39
|
*/
|
|
40
40
|
image?: string | ReactNode;
|
|
41
41
|
/**
|
|
42
|
-
* Removes elevation styles if set
|
|
42
|
+
* Removes elevation styles if set.
|
|
43
43
|
*/
|
|
44
44
|
isFlat?: boolean;
|
|
45
45
|
/**
|
|
@@ -61,7 +61,7 @@ interface SpotlightCardProps {
|
|
|
61
61
|
*/
|
|
62
62
|
testId?: string;
|
|
63
63
|
/**
|
|
64
|
-
* The
|
|
64
|
+
* The ID of heading.
|
|
65
65
|
*/
|
|
66
66
|
headingId?: string;
|
|
67
67
|
}
|
|
@@ -3,15 +3,15 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { Actions } from '../types';
|
|
4
4
|
export interface SpotlightDialogProps extends WithAnalyticsEventsProps {
|
|
5
5
|
/**
|
|
6
|
-
* Buttons to render in the footer
|
|
6
|
+
* Buttons to render in the footer.
|
|
7
7
|
*/
|
|
8
8
|
actions?: Actions;
|
|
9
9
|
/**
|
|
10
|
-
* An optional element rendered beside the footer actions
|
|
10
|
+
* An optional element rendered beside the footer actions.
|
|
11
11
|
*/
|
|
12
12
|
actionsBeforeElement?: ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* The elements rendered in the modal
|
|
14
|
+
* The elements rendered in the modal.
|
|
15
15
|
*/
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
/**
|
|
@@ -19,35 +19,35 @@ export interface SpotlightDialogProps extends WithAnalyticsEventsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
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';
|
|
21
21
|
/**
|
|
22
|
-
* The width of the dialog in pixels.
|
|
22
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
23
23
|
*/
|
|
24
24
|
dialogWidth: number;
|
|
25
25
|
/**
|
|
26
|
-
* Optional element rendered below the body
|
|
26
|
+
* Optional element rendered below the body.
|
|
27
27
|
*/
|
|
28
28
|
footer?: ComponentType<any>;
|
|
29
29
|
/**
|
|
30
|
-
* Optional element rendered above the body
|
|
30
|
+
* Optional element rendered above the body.
|
|
31
31
|
*/
|
|
32
32
|
header?: ComponentType<any>;
|
|
33
33
|
/**
|
|
34
|
-
* Heading text rendered above the body
|
|
34
|
+
* Heading text rendered above the body.
|
|
35
35
|
*/
|
|
36
36
|
heading?: string;
|
|
37
37
|
/**
|
|
38
|
-
* An optional element rendered to the right of the heading
|
|
38
|
+
* An optional element rendered to the right of the heading.
|
|
39
39
|
*/
|
|
40
40
|
headingAfterElement?: ReactNode;
|
|
41
41
|
/**
|
|
42
|
-
* Path to the
|
|
42
|
+
* Path to the image.
|
|
43
43
|
*/
|
|
44
44
|
image?: string;
|
|
45
45
|
/**
|
|
46
|
-
* The spotlight target node
|
|
46
|
+
* The spotlight target node.
|
|
47
47
|
*/
|
|
48
48
|
targetNode: HTMLElement;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Javascript object containing the animation styles to apply to component.
|
|
51
51
|
*/
|
|
52
52
|
animationStyles: Object;
|
|
53
53
|
/**
|
|
@@ -3,15 +3,15 @@ import { ElementBoundingBox } from '../utils/use-element-box';
|
|
|
3
3
|
import { SpotlightProps } from './spotlight';
|
|
4
4
|
export interface SpotlightInnerProps extends SpotlightProps {
|
|
5
5
|
/**
|
|
6
|
-
* The spotlight target
|
|
6
|
+
* The spotlight target DOM element.
|
|
7
7
|
*/
|
|
8
8
|
targetNode: HTMLElement;
|
|
9
9
|
/**
|
|
10
|
-
* Called when the component has been mounted
|
|
10
|
+
* Called when the component has been mounted.
|
|
11
11
|
*/
|
|
12
12
|
onOpened: () => any;
|
|
13
13
|
/**
|
|
14
|
-
* Called when the component has been unmounted
|
|
14
|
+
* Called when the component has been unmounted.
|
|
15
15
|
*/
|
|
16
16
|
onClosed: () => any;
|
|
17
17
|
/**
|
|
@@ -21,7 +21,7 @@ export interface SpotlightInnerProps extends SpotlightProps {
|
|
|
21
21
|
*/
|
|
22
22
|
pulse: boolean;
|
|
23
23
|
/**
|
|
24
|
-
* The width of the dialog in pixels.
|
|
24
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
25
25
|
*
|
|
26
26
|
* Same as `SpotlightProps` but required instead of optional.
|
|
27
27
|
*/
|
|
@@ -18,11 +18,11 @@ export { TargetConsumer };
|
|
|
18
18
|
export { SpotlightContext, SpotlightStateConsumer as SpotlightConsumer };
|
|
19
19
|
interface SpotlightManagerProps {
|
|
20
20
|
/**
|
|
21
|
-
* Boolean prop for toggling blanket transparency
|
|
21
|
+
* Boolean prop for toggling blanket transparency.
|
|
22
22
|
*/
|
|
23
23
|
blanketIsTinted?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
* Typically the app, or a section of the app
|
|
25
|
+
* Typically the app, or a section of the app.
|
|
26
26
|
*/
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface SpotlightTargetProps {
|
|
3
3
|
/**
|
|
4
|
-
* A single child
|
|
4
|
+
* A single child.
|
|
5
5
|
*/
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
/**
|
|
8
|
-
* The name to reference from Spotlight
|
|
8
|
+
* The name to reference from Spotlight.
|
|
9
9
|
*/
|
|
10
10
|
name: string;
|
|
11
11
|
}
|
|
@@ -2,15 +2,15 @@ import { ComponentType, MouseEvent, ReactNode } from 'react';
|
|
|
2
2
|
import { Actions } from '../types';
|
|
3
3
|
export interface SpotlightProps {
|
|
4
4
|
/**
|
|
5
|
-
* Buttons to render in the footer
|
|
5
|
+
* Buttons to render in the footer.
|
|
6
6
|
*/
|
|
7
7
|
actions?: Actions;
|
|
8
8
|
/**
|
|
9
|
-
* An optional node to be rendered beside the footer actions
|
|
9
|
+
* An optional node to be rendered beside the footer actions.
|
|
10
10
|
*/
|
|
11
11
|
actionsBeforeElement?: ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* The elements rendered in the modal
|
|
13
|
+
* The elements rendered in the modal.
|
|
14
14
|
*/
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
/**
|
|
@@ -18,58 +18,58 @@ export interface SpotlightProps {
|
|
|
18
18
|
*/
|
|
19
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
20
|
/**
|
|
21
|
-
* The width of the dialog in pixels.
|
|
21
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
22
22
|
*/
|
|
23
23
|
dialogWidth?: number;
|
|
24
24
|
/**
|
|
25
|
-
* Optional element rendered below the body
|
|
25
|
+
* Optional element rendered below the body.
|
|
26
26
|
*/
|
|
27
27
|
footer?: ComponentType<any>;
|
|
28
28
|
/**
|
|
29
|
-
* Optional element rendered above the body
|
|
29
|
+
* Optional element rendered above the body.
|
|
30
30
|
*/
|
|
31
31
|
header?: ComponentType<any>;
|
|
32
32
|
/**
|
|
33
|
-
* Heading text rendered above the body
|
|
33
|
+
* Heading text rendered above the body.
|
|
34
34
|
*/
|
|
35
35
|
heading?: string;
|
|
36
36
|
/**
|
|
37
|
-
* An optional element rendered to the right of the heading
|
|
37
|
+
* An optional element rendered to the right of the heading.
|
|
38
38
|
*/
|
|
39
39
|
headingAfterElement?: ReactNode;
|
|
40
40
|
/**
|
|
41
|
-
* Path to the
|
|
41
|
+
* Path to the image.
|
|
42
42
|
*/
|
|
43
43
|
image?: string;
|
|
44
44
|
/**
|
|
45
|
-
* Whether or not to display a pulse animation around the spotlighted element
|
|
45
|
+
* Whether or not to display a pulse animation around the spotlighted element.
|
|
46
46
|
*/
|
|
47
47
|
pulse?: boolean;
|
|
48
48
|
/**
|
|
49
|
-
* The name of the SpotlightTarget
|
|
49
|
+
* The name of the SpotlightTarget.
|
|
50
50
|
*/
|
|
51
51
|
target?: string;
|
|
52
52
|
/**
|
|
53
|
-
* The spotlight target node
|
|
53
|
+
* The spotlight target node.
|
|
54
54
|
*/
|
|
55
55
|
targetNode?: HTMLElement;
|
|
56
56
|
/**
|
|
57
|
-
* The background color of the element being highlighted
|
|
57
|
+
* The background color of the element being highlighted.
|
|
58
58
|
*/
|
|
59
59
|
targetBgColor?: string;
|
|
60
60
|
/**
|
|
61
|
-
* Function to fire when a
|
|
61
|
+
* Function to fire when a person clicks on the cloned target.
|
|
62
62
|
*/
|
|
63
63
|
targetOnClick?: (eventData: {
|
|
64
64
|
event: MouseEvent<HTMLElement>;
|
|
65
65
|
target?: string;
|
|
66
66
|
}) => void;
|
|
67
67
|
/**
|
|
68
|
-
* The border
|
|
68
|
+
* The border radius of the element being highlighted.
|
|
69
69
|
*/
|
|
70
70
|
targetRadius?: number;
|
|
71
71
|
/**
|
|
72
|
-
* Alternative element to render than the wrapped target
|
|
72
|
+
* Alternative element to render than the wrapped target.
|
|
73
73
|
*/
|
|
74
74
|
targetReplacement?: ComponentType<any>;
|
|
75
75
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
export interface CloneProps {
|
|
3
3
|
/**
|
|
4
|
-
* Whether or not to display a pulse animation around the spotlighted element
|
|
4
|
+
* Whether or not to display a pulse animation around the spotlighted element.
|
|
5
5
|
*/
|
|
6
6
|
pulse: boolean;
|
|
7
7
|
/**
|
|
8
|
-
* An object containing the information used for positioning clone
|
|
8
|
+
* An object containing the information used for positioning clone.
|
|
9
9
|
*/
|
|
10
10
|
style: Record<string, any>;
|
|
11
11
|
/**
|
|
12
|
-
* The name of the SpotlightTarget
|
|
12
|
+
* The name of the SpotlightTarget.
|
|
13
13
|
*/
|
|
14
14
|
target?: string;
|
|
15
15
|
/**
|
|
16
|
-
* The spotlight target node
|
|
16
|
+
* The spotlight target node.
|
|
17
17
|
*/
|
|
18
18
|
targetNode: HTMLElement;
|
|
19
19
|
/**
|
|
@@ -21,14 +21,14 @@ export interface CloneProps {
|
|
|
21
21
|
*/
|
|
22
22
|
targetBgColor?: string;
|
|
23
23
|
/**
|
|
24
|
-
* Function to fire when a
|
|
24
|
+
* Function to fire when a person clicks on the cloned target.
|
|
25
25
|
*/
|
|
26
26
|
targetOnClick?: (eventData: {
|
|
27
27
|
event: MouseEvent<HTMLElement>;
|
|
28
28
|
target?: string;
|
|
29
29
|
}) => void;
|
|
30
30
|
/**
|
|
31
|
-
* The border
|
|
31
|
+
* The border radius of the element being highlighted.
|
|
32
32
|
*/
|
|
33
33
|
targetRadius?: number;
|
|
34
34
|
/**
|
|
@@ -5,31 +5,31 @@ import { ModalFooterProps as FooterComponentProps, ModalHeaderProps as HeaderCom
|
|
|
5
5
|
import { Actions } from '../types';
|
|
6
6
|
type ModalProps = {
|
|
7
7
|
/**
|
|
8
|
-
* Buttons to render in the footer
|
|
8
|
+
* Buttons to render in the footer.
|
|
9
9
|
*/
|
|
10
10
|
actions?: Actions;
|
|
11
11
|
/**
|
|
12
|
-
* The elements rendered in the modal
|
|
12
|
+
* The elements rendered in the modal.
|
|
13
13
|
*/
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
/**
|
|
16
|
-
* Path to the
|
|
16
|
+
* Path to the image.
|
|
17
17
|
*/
|
|
18
18
|
image?: string;
|
|
19
19
|
/**
|
|
20
|
-
* Optional element rendered above the body
|
|
20
|
+
* Optional element rendered above the body.
|
|
21
21
|
*/
|
|
22
22
|
header?: ElementType<HeaderComponentProps>;
|
|
23
23
|
/**
|
|
24
|
-
* Optional element rendered below the body
|
|
24
|
+
* Optional element rendered below the body.
|
|
25
25
|
*/
|
|
26
26
|
footer?: ElementType<FooterComponentProps>;
|
|
27
27
|
/**
|
|
28
|
-
* Heading text rendered above the body
|
|
28
|
+
* Heading text rendered above the body.
|
|
29
29
|
*/
|
|
30
30
|
heading?: string;
|
|
31
31
|
/**
|
|
32
|
-
* Boolean prop to confirm if primary button in the footer should be shown on the right
|
|
32
|
+
* Boolean prop to confirm if primary button in the footer should be shown on the right.
|
|
33
33
|
*/
|
|
34
34
|
experimental_shouldShowPrimaryButtonOnRight?: boolean;
|
|
35
35
|
};
|
|
@@ -3,26 +3,26 @@ import { ComponentType, ReactNode, Ref } from 'react';
|
|
|
3
3
|
import { Actions } from '../types';
|
|
4
4
|
interface SpotlightCardProps {
|
|
5
5
|
/**
|
|
6
|
-
* Buttons to render in the footer
|
|
6
|
+
* Buttons to render in the footer.
|
|
7
7
|
*/
|
|
8
8
|
actions?: Actions;
|
|
9
9
|
/**
|
|
10
|
-
* An optional element rendered to the left of the footer actions
|
|
10
|
+
* An optional element rendered to the left of the footer actions.
|
|
11
11
|
*/
|
|
12
12
|
actionsBeforeElement?: ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* The content of the card
|
|
14
|
+
* The content of the card.
|
|
15
15
|
*/
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
/**
|
|
18
|
-
* The container elements rendered by the component
|
|
18
|
+
* The container elements rendered by the component.
|
|
19
19
|
*/
|
|
20
20
|
components?: {
|
|
21
21
|
Header?: ComponentType<any>;
|
|
22
22
|
Footer?: ComponentType<any>;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* The heading to be rendered above the body
|
|
25
|
+
* The heading to be rendered above the body content.
|
|
26
26
|
*/
|
|
27
27
|
heading?: ReactNode;
|
|
28
28
|
/**
|
|
@@ -31,15 +31,15 @@ interface SpotlightCardProps {
|
|
|
31
31
|
*/
|
|
32
32
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
33
33
|
/**
|
|
34
|
-
* An optional element rendered to the right of the heading
|
|
34
|
+
* An optional element rendered to the right of the heading, usually used to number steps in a multi-step flow.
|
|
35
35
|
*/
|
|
36
36
|
headingAfterElement?: ReactNode;
|
|
37
37
|
/**
|
|
38
|
-
* The image src to render above the heading
|
|
38
|
+
* The image src to render above the heading.
|
|
39
39
|
*/
|
|
40
40
|
image?: string | ReactNode;
|
|
41
41
|
/**
|
|
42
|
-
* Removes elevation styles if set
|
|
42
|
+
* Removes elevation styles if set.
|
|
43
43
|
*/
|
|
44
44
|
isFlat?: boolean;
|
|
45
45
|
/**
|
|
@@ -61,7 +61,7 @@ interface SpotlightCardProps {
|
|
|
61
61
|
*/
|
|
62
62
|
testId?: string;
|
|
63
63
|
/**
|
|
64
|
-
* The
|
|
64
|
+
* The ID of heading.
|
|
65
65
|
*/
|
|
66
66
|
headingId?: string;
|
|
67
67
|
}
|
|
@@ -3,15 +3,15 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import { Actions } from '../types';
|
|
4
4
|
export interface SpotlightDialogProps extends WithAnalyticsEventsProps {
|
|
5
5
|
/**
|
|
6
|
-
* Buttons to render in the footer
|
|
6
|
+
* Buttons to render in the footer.
|
|
7
7
|
*/
|
|
8
8
|
actions?: Actions;
|
|
9
9
|
/**
|
|
10
|
-
* An optional element rendered beside the footer actions
|
|
10
|
+
* An optional element rendered beside the footer actions.
|
|
11
11
|
*/
|
|
12
12
|
actionsBeforeElement?: ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* The elements rendered in the modal
|
|
14
|
+
* The elements rendered in the modal.
|
|
15
15
|
*/
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
/**
|
|
@@ -19,35 +19,35 @@ export interface SpotlightDialogProps extends WithAnalyticsEventsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
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';
|
|
21
21
|
/**
|
|
22
|
-
* The width of the dialog in pixels.
|
|
22
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
23
23
|
*/
|
|
24
24
|
dialogWidth: number;
|
|
25
25
|
/**
|
|
26
|
-
* Optional element rendered below the body
|
|
26
|
+
* Optional element rendered below the body.
|
|
27
27
|
*/
|
|
28
28
|
footer?: ComponentType<any>;
|
|
29
29
|
/**
|
|
30
|
-
* Optional element rendered above the body
|
|
30
|
+
* Optional element rendered above the body.
|
|
31
31
|
*/
|
|
32
32
|
header?: ComponentType<any>;
|
|
33
33
|
/**
|
|
34
|
-
* Heading text rendered above the body
|
|
34
|
+
* Heading text rendered above the body.
|
|
35
35
|
*/
|
|
36
36
|
heading?: string;
|
|
37
37
|
/**
|
|
38
|
-
* An optional element rendered to the right of the heading
|
|
38
|
+
* An optional element rendered to the right of the heading.
|
|
39
39
|
*/
|
|
40
40
|
headingAfterElement?: ReactNode;
|
|
41
41
|
/**
|
|
42
|
-
* Path to the
|
|
42
|
+
* Path to the image.
|
|
43
43
|
*/
|
|
44
44
|
image?: string;
|
|
45
45
|
/**
|
|
46
|
-
* The spotlight target node
|
|
46
|
+
* The spotlight target node.
|
|
47
47
|
*/
|
|
48
48
|
targetNode: HTMLElement;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Javascript object containing the animation styles to apply to component.
|
|
51
51
|
*/
|
|
52
52
|
animationStyles: Object;
|
|
53
53
|
/**
|
|
@@ -3,15 +3,15 @@ import { ElementBoundingBox } from '../utils/use-element-box';
|
|
|
3
3
|
import { SpotlightProps } from './spotlight';
|
|
4
4
|
export interface SpotlightInnerProps extends SpotlightProps {
|
|
5
5
|
/**
|
|
6
|
-
* The spotlight target
|
|
6
|
+
* The spotlight target DOM element.
|
|
7
7
|
*/
|
|
8
8
|
targetNode: HTMLElement;
|
|
9
9
|
/**
|
|
10
|
-
* Called when the component has been mounted
|
|
10
|
+
* Called when the component has been mounted.
|
|
11
11
|
*/
|
|
12
12
|
onOpened: () => any;
|
|
13
13
|
/**
|
|
14
|
-
* Called when the component has been unmounted
|
|
14
|
+
* Called when the component has been unmounted.
|
|
15
15
|
*/
|
|
16
16
|
onClosed: () => any;
|
|
17
17
|
/**
|
|
@@ -21,7 +21,7 @@ export interface SpotlightInnerProps extends SpotlightProps {
|
|
|
21
21
|
*/
|
|
22
22
|
pulse: boolean;
|
|
23
23
|
/**
|
|
24
|
-
* The width of the dialog in pixels.
|
|
24
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
25
25
|
*
|
|
26
26
|
* Same as `SpotlightProps` but required instead of optional.
|
|
27
27
|
*/
|
|
@@ -18,11 +18,11 @@ export { TargetConsumer };
|
|
|
18
18
|
export { SpotlightContext, SpotlightStateConsumer as SpotlightConsumer };
|
|
19
19
|
interface SpotlightManagerProps {
|
|
20
20
|
/**
|
|
21
|
-
* Boolean prop for toggling blanket transparency
|
|
21
|
+
* Boolean prop for toggling blanket transparency.
|
|
22
22
|
*/
|
|
23
23
|
blanketIsTinted?: boolean;
|
|
24
24
|
/**
|
|
25
|
-
* Typically the app, or a section of the app
|
|
25
|
+
* Typically the app, or a section of the app.
|
|
26
26
|
*/
|
|
27
27
|
children: ReactNode;
|
|
28
28
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface SpotlightTargetProps {
|
|
3
3
|
/**
|
|
4
|
-
* A single child
|
|
4
|
+
* A single child.
|
|
5
5
|
*/
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
/**
|
|
8
|
-
* The name to reference from Spotlight
|
|
8
|
+
* The name to reference from Spotlight.
|
|
9
9
|
*/
|
|
10
10
|
name: string;
|
|
11
11
|
}
|
|
@@ -2,15 +2,15 @@ import { ComponentType, MouseEvent, ReactNode } from 'react';
|
|
|
2
2
|
import { Actions } from '../types';
|
|
3
3
|
export interface SpotlightProps {
|
|
4
4
|
/**
|
|
5
|
-
* Buttons to render in the footer
|
|
5
|
+
* Buttons to render in the footer.
|
|
6
6
|
*/
|
|
7
7
|
actions?: Actions;
|
|
8
8
|
/**
|
|
9
|
-
* An optional node to be rendered beside the footer actions
|
|
9
|
+
* An optional node to be rendered beside the footer actions.
|
|
10
10
|
*/
|
|
11
11
|
actionsBeforeElement?: ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* The elements rendered in the modal
|
|
13
|
+
* The elements rendered in the modal.
|
|
14
14
|
*/
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
/**
|
|
@@ -18,58 +18,58 @@ export interface SpotlightProps {
|
|
|
18
18
|
*/
|
|
19
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
20
|
/**
|
|
21
|
-
* The width of the dialog in pixels.
|
|
21
|
+
* The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
|
|
22
22
|
*/
|
|
23
23
|
dialogWidth?: number;
|
|
24
24
|
/**
|
|
25
|
-
* Optional element rendered below the body
|
|
25
|
+
* Optional element rendered below the body.
|
|
26
26
|
*/
|
|
27
27
|
footer?: ComponentType<any>;
|
|
28
28
|
/**
|
|
29
|
-
* Optional element rendered above the body
|
|
29
|
+
* Optional element rendered above the body.
|
|
30
30
|
*/
|
|
31
31
|
header?: ComponentType<any>;
|
|
32
32
|
/**
|
|
33
|
-
* Heading text rendered above the body
|
|
33
|
+
* Heading text rendered above the body.
|
|
34
34
|
*/
|
|
35
35
|
heading?: string;
|
|
36
36
|
/**
|
|
37
|
-
* An optional element rendered to the right of the heading
|
|
37
|
+
* An optional element rendered to the right of the heading.
|
|
38
38
|
*/
|
|
39
39
|
headingAfterElement?: ReactNode;
|
|
40
40
|
/**
|
|
41
|
-
* Path to the
|
|
41
|
+
* Path to the image.
|
|
42
42
|
*/
|
|
43
43
|
image?: string;
|
|
44
44
|
/**
|
|
45
|
-
* Whether or not to display a pulse animation around the spotlighted element
|
|
45
|
+
* Whether or not to display a pulse animation around the spotlighted element.
|
|
46
46
|
*/
|
|
47
47
|
pulse?: boolean;
|
|
48
48
|
/**
|
|
49
|
-
* The name of the SpotlightTarget
|
|
49
|
+
* The name of the SpotlightTarget.
|
|
50
50
|
*/
|
|
51
51
|
target?: string;
|
|
52
52
|
/**
|
|
53
|
-
* The spotlight target node
|
|
53
|
+
* The spotlight target node.
|
|
54
54
|
*/
|
|
55
55
|
targetNode?: HTMLElement;
|
|
56
56
|
/**
|
|
57
|
-
* The background color of the element being highlighted
|
|
57
|
+
* The background color of the element being highlighted.
|
|
58
58
|
*/
|
|
59
59
|
targetBgColor?: string;
|
|
60
60
|
/**
|
|
61
|
-
* Function to fire when a
|
|
61
|
+
* Function to fire when a person clicks on the cloned target.
|
|
62
62
|
*/
|
|
63
63
|
targetOnClick?: (eventData: {
|
|
64
64
|
event: MouseEvent<HTMLElement>;
|
|
65
65
|
target?: string;
|
|
66
66
|
}) => void;
|
|
67
67
|
/**
|
|
68
|
-
* The border
|
|
68
|
+
* The border radius of the element being highlighted.
|
|
69
69
|
*/
|
|
70
70
|
targetRadius?: number;
|
|
71
71
|
/**
|
|
72
|
-
* Alternative element to render than the wrapped target
|
|
72
|
+
* Alternative element to render than the wrapped target.
|
|
73
73
|
*/
|
|
74
74
|
targetReplacement?: ComponentType<any>;
|
|
75
75
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/onboarding",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.2",
|
|
4
4
|
"description": "An onboarding spotlight introduces new features to users through focused messages or multi-step tours.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"atlaskit:src": "src/index.tsx",
|
|
25
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.tsx",
|
|
27
|
+
"./types": "./src/types.tsx"
|
|
28
|
+
},
|
|
25
29
|
"homepage": "https://atlassian.design/components/onboarding/",
|
|
26
30
|
"atlassian": {
|
|
27
31
|
"team": "Design System Team",
|
|
28
|
-
"deprecatedAutoEntryPoints": true,
|
|
29
32
|
"releaseModel": "continuous",
|
|
30
33
|
"website": {
|
|
31
34
|
"name": "Onboarding (spotlight)",
|
|
@@ -34,14 +37,14 @@
|
|
|
34
37
|
},
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
37
|
-
"@atlaskit/button": "^17.
|
|
40
|
+
"@atlaskit/button": "^17.2.0",
|
|
38
41
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
39
|
-
"@atlaskit/heading": "^1.
|
|
42
|
+
"@atlaskit/heading": "^1.5.0",
|
|
40
43
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
41
44
|
"@atlaskit/popper": "^5.5.0",
|
|
42
45
|
"@atlaskit/portal": "^4.4.0",
|
|
43
46
|
"@atlaskit/theme": "^12.6.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
+
"@atlaskit/tokens": "^1.34.0",
|
|
45
48
|
"@babel/runtime": "^7.0.0",
|
|
46
49
|
"@emotion/react": "^11.7.1",
|
|
47
50
|
"bind-event-listener": "^2.1.1",
|
|
@@ -94,4 +97,4 @@
|
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
99
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
97
|
-
}
|
|
100
|
+
}
|