@atlaskit/onboarding 14.6.1 → 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 (104) hide show
  1. package/CHANGELOG.md +32 -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/entry-points/modal-transition.js +13 -0
  6. package/dist/cjs/entry-points/modal.js +13 -0
  7. package/dist/cjs/entry-points/spotlight-card.js +13 -0
  8. package/dist/cjs/entry-points/spotlight-manager.js +32 -0
  9. package/dist/cjs/entry-points/spotlight-target.js +13 -0
  10. package/dist/cjs/entry-points/spotlight-transition.js +20 -0
  11. package/dist/cjs/entry-points/spotlight.js +13 -0
  12. package/dist/cjs/entry-points/target.js +24 -0
  13. package/dist/cjs/entry-points/theme.js +18 -0
  14. package/dist/cjs/entry-points/types.js +1 -0
  15. package/dist/cjs/entry-points/use-spotlight.js +13 -0
  16. package/dist/cjs/styled/dialog.js +2 -0
  17. package/dist/cjs/styled/modal.js +4 -0
  18. package/dist/cjs/styled/target.compiled.css +1 -1
  19. package/dist/cjs/styled/target.js +4 -2
  20. package/dist/es2019/components/index.js +15 -1
  21. package/dist/es2019/components/spotlight-manager.js +3 -1
  22. package/dist/es2019/components/spotlight-transition.js +1 -0
  23. package/dist/es2019/components/theme.js +4 -3
  24. package/dist/es2019/entry-points/modal-transition.js +1 -0
  25. package/dist/es2019/entry-points/modal.js +1 -0
  26. package/dist/es2019/entry-points/spotlight-card.js +1 -0
  27. package/dist/es2019/entry-points/spotlight-manager.js +2 -0
  28. package/dist/es2019/entry-points/spotlight-target.js +1 -0
  29. package/dist/es2019/entry-points/spotlight-transition.js +2 -0
  30. package/dist/es2019/entry-points/spotlight.js +1 -0
  31. package/dist/es2019/entry-points/target.js +1 -0
  32. package/dist/es2019/entry-points/theme.js +1 -0
  33. package/dist/es2019/entry-points/types.js +0 -0
  34. package/dist/es2019/entry-points/use-spotlight.js +1 -0
  35. package/dist/es2019/styled/dialog.js +2 -0
  36. package/dist/es2019/styled/modal.js +4 -0
  37. package/dist/es2019/styled/target.compiled.css +1 -1
  38. package/dist/es2019/styled/target.js +4 -2
  39. package/dist/esm/components/index.js +15 -1
  40. package/dist/esm/components/spotlight-manager.js +3 -1
  41. package/dist/esm/components/spotlight-transition.js +1 -0
  42. package/dist/esm/components/theme.js +4 -3
  43. package/dist/esm/entry-points/modal-transition.js +1 -0
  44. package/dist/esm/entry-points/modal.js +1 -0
  45. package/dist/esm/entry-points/spotlight-card.js +1 -0
  46. package/dist/esm/entry-points/spotlight-manager.js +2 -0
  47. package/dist/esm/entry-points/spotlight-target.js +1 -0
  48. package/dist/esm/entry-points/spotlight-transition.js +2 -0
  49. package/dist/esm/entry-points/spotlight.js +1 -0
  50. package/dist/esm/entry-points/target.js +1 -0
  51. package/dist/esm/entry-points/theme.js +1 -0
  52. package/dist/esm/entry-points/types.js +0 -0
  53. package/dist/esm/entry-points/use-spotlight.js +1 -0
  54. package/dist/esm/styled/dialog.js +2 -0
  55. package/dist/esm/styled/modal.js +4 -0
  56. package/dist/esm/styled/target.compiled.css +1 -1
  57. package/dist/esm/styled/target.js +4 -2
  58. package/dist/types/entry-points/modal-transition.d.ts +1 -0
  59. package/dist/types/entry-points/modal.d.ts +1 -0
  60. package/dist/types/entry-points/spotlight-card.d.ts +1 -0
  61. package/dist/types/entry-points/spotlight-manager.d.ts +3 -0
  62. package/dist/types/entry-points/spotlight-target.d.ts +1 -0
  63. package/dist/types/entry-points/spotlight-transition.d.ts +2 -0
  64. package/dist/types/entry-points/spotlight.d.ts +1 -0
  65. package/dist/types/entry-points/target.d.ts +1 -0
  66. package/dist/types/entry-points/theme.d.ts +1 -0
  67. package/dist/types/entry-points/types.d.ts +1 -0
  68. package/dist/types/entry-points/use-spotlight.d.ts +1 -0
  69. package/modal/package.json +10 -0
  70. package/modal-transition/package.json +10 -0
  71. package/package.json +16 -42
  72. package/spotlight/package.json +10 -0
  73. package/spotlight-card/package.json +10 -0
  74. package/spotlight-manager/package.json +10 -0
  75. package/spotlight-target/package.json +10 -0
  76. package/spotlight-transition/package.json +10 -0
  77. package/target/package.json +10 -0
  78. package/theme/package.json +10 -0
  79. package/types/package.json +4 -11
  80. package/use-spotlight/package.json +10 -0
  81. package/dist/types-ts4.5/components/clone.d.ts +0 -54
  82. package/dist/types-ts4.5/components/index.d.ts +0 -10
  83. package/dist/types-ts4.5/components/modal-transition.d.ts +0 -17
  84. package/dist/types-ts4.5/components/modal.d.ts +0 -54
  85. package/dist/types-ts4.5/components/node-resolver-spotlight-inner.d.ts +0 -18
  86. package/dist/types-ts4.5/components/node-resolver-spotlight-target.d.ts +0 -27
  87. package/dist/types-ts4.5/components/spotlight-card.d.ts +0 -14
  88. package/dist/types-ts4.5/components/spotlight-dialog.d.ts +0 -86
  89. package/dist/types-ts4.5/components/spotlight-inner.d.ts +0 -58
  90. package/dist/types-ts4.5/components/spotlight-manager.d.ts +0 -83
  91. package/dist/types-ts4.5/components/spotlight-target.d.ts +0 -50
  92. package/dist/types-ts4.5/components/spotlight-transition.d.ts +0 -45
  93. package/dist/types-ts4.5/components/spotlight.d.ts +0 -15
  94. package/dist/types-ts4.5/components/theme.d.ts +0 -10
  95. package/dist/types-ts4.5/components/use-spotlight.d.ts +0 -9
  96. package/dist/types-ts4.5/components/value-changed.d.ts +0 -11
  97. package/dist/types-ts4.5/index.d.ts +0 -2
  98. package/dist/types-ts4.5/styled/blanket.d.ts +0 -19
  99. package/dist/types-ts4.5/styled/dialog.d.ts +0 -33
  100. package/dist/types-ts4.5/styled/modal.d.ts +0 -51
  101. package/dist/types-ts4.5/styled/target.d.ts +0 -45
  102. package/dist/types-ts4.5/types.d.ts +0 -173
  103. package/dist/types-ts4.5/utils/use-element-box.d.ts +0 -20
  104. package/dist/types-ts4.5/utils/use-element-observer.d.ts +0 -16
@@ -1,173 +0,0 @@
1
- import { type ComponentType, type MouseEvent, type ReactNode, type Ref } from 'react';
2
- import { type CustomThemeButtonProps } from '@atlaskit/button/types';
3
- interface Action extends Omit<CustomThemeButtonProps, 'children'> {
4
- key?: string;
5
- text?: ReactNode;
6
- }
7
- export type Actions = Action[];
8
- export type ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest';
9
- export interface SpotlightProps {
10
- /**
11
- * Buttons to render in the footer.
12
- */
13
- actions?: Actions;
14
- /**
15
- * An optional node to be rendered beside the footer actions.
16
- */
17
- actionsBeforeElement?: ReactNode;
18
- /**
19
- * The elements rendered in the modal.
20
- */
21
- children?: ReactNode;
22
- /**
23
- * Where the dialog should appear, relative to the contents of the children.
24
- */
25
- 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';
26
- /**
27
- * The width of the dialog in pixels. The minimum possible width is 160px and the maximum width is 600px.
28
- */
29
- dialogWidth?: number;
30
- /**
31
- * Optional element rendered below the body.
32
- */
33
- footer?: ComponentType<any>;
34
- /**
35
- * Optional element rendered above the body.
36
- */
37
- header?: ComponentType<any>;
38
- /**
39
- * Heading text rendered above the body.
40
- */
41
- heading?: string;
42
- /**
43
- * An optional element rendered to the right of the heading.
44
- */
45
- headingAfterElement?: ReactNode;
46
- /**
47
- * Path to the image.
48
- */
49
- image?: string;
50
- /**
51
- * Whether or not to display a pulse animation around the spotlighted element.
52
- */
53
- pulse?: boolean;
54
- /**
55
- * Whether the spotlight should check for changes to the spotlighted element or its position.
56
- * This prop may negatively affect performance and should be used only if layout shifts are causing the spotlight to be positioned incorrectly.
57
- */
58
- shouldWatchTarget?: boolean;
59
- /**
60
- * The name of the SpotlightTarget.
61
- */
62
- target?: string;
63
- /**
64
- * The spotlight target node.
65
- */
66
- targetNode?: HTMLElement;
67
- /**
68
- * The background color of the element being highlighted.
69
- */
70
- targetBgColor?: string;
71
- /**
72
- * Function to fire when a person clicks on the cloned target.
73
- */
74
- targetOnClick?: (eventData: {
75
- event: MouseEvent<HTMLElement>;
76
- target?: string;
77
- }) => void;
78
- /**
79
- * The border radius of the element being highlighted.
80
- */
81
- targetRadius?: number | string;
82
- /**
83
- * Alternative element to render than the wrapped target.
84
- */
85
- targetReplacement?: ComponentType<any>;
86
- /**
87
- * 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.
88
- * Defaults to `"spotlight"`.
89
- * As this component is composed of multiple components we use this `testId` as a prefix:
90
- * - `"${testId}--dialog"` to identify the spotlight dialog
91
- * - `"${testId}--target"` to identify the spotlight target clone
92
- */
93
- testId?: string;
94
- /**
95
- * Used set the 'block' attribute on scrollIntoView, which determines the vertical alignment of the target node to the nearest scrollable ancestor.
96
- */
97
- scrollPositionBlock?: ScrollLogicalPosition;
98
- /**
99
- * Refers to an `aria-label` attribute. Sets an accessible name for the spotlight dialog wrapper to announce it to users of assistive technology.
100
- * Usage of either this, or the `titleId` prop is strongly recommended to improve accessibility.
101
- */
102
- label?: string;
103
- /**
104
- * Refers to a value of an `aria-labelledby` attribute. References an element to define accessible name for the spotlight dialog.
105
- * Usage of either this, or the `label` prop is strongly recommended to improve accessibility.
106
- */
107
- titleId?: string;
108
- }
109
- export interface SpotlightCardProps {
110
- /**
111
- * Buttons to render in the footer.
112
- */
113
- actions?: Actions;
114
- /**
115
- * An optional element rendered to the left of the footer actions.
116
- */
117
- actionsBeforeElement?: ReactNode;
118
- /**
119
- * The content of the card.
120
- */
121
- children?: ReactNode;
122
- /**
123
- * The container elements rendered by the component.
124
- */
125
- components?: {
126
- Header?: ComponentType<any>;
127
- Footer?: ComponentType<any>;
128
- };
129
- /**
130
- * The heading to be rendered above the body content.
131
- */
132
- heading?: ReactNode;
133
- /**
134
- * Specifies the heading level in the document structure.
135
- * If not specified, level 4 will be applied by default.
136
- */
137
- headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
138
- /**
139
- * An optional element rendered to the right of the heading, usually used to number steps in a multi-step flow.
140
- */
141
- headingAfterElement?: ReactNode;
142
- /**
143
- * The image src to render above the heading.
144
- */
145
- image?: string | ReactNode;
146
- /**
147
- * Removes elevation styles if set.
148
- */
149
- isFlat?: boolean;
150
- /**
151
- * Specifies the width of the card component. Accepts either a number or the string '100%'.
152
- * When a number is provided, the width is set in pixels. When '100%' is provided, the width
153
- * is set to occupy 100% of the parent container's width. Regardless of whether `width` is set,
154
- * the width is constrained to a minimum width of 160px and a maximum width of 600px.
155
- */
156
- width?: number | '100%';
157
- /**
158
- * @deprecated
159
- * Use `ref` instead.
160
- */
161
- innerRef?: Ref<HTMLDivElement> | null;
162
- /**
163
- * A `testId` prop is provided for specified elements,
164
- * which is a unique string that appears as a data attribute `data-testid` in the rendered code,
165
- * serving as a hook for automated tests.
166
- */
167
- testId?: string;
168
- /**
169
- * The ID of heading.
170
- */
171
- headingId?: string;
172
- }
173
- export {};
@@ -1,20 +0,0 @@
1
- export interface ElementBoundingBox {
2
- height: number;
3
- left: number;
4
- top: number;
5
- width: number;
6
- }
7
- type ResizeUpdateMethod = 'polling' | 'resizeListener';
8
- /**
9
- * __Element box__
10
- *
11
- * Allows consumption of `userElementBox` hook through render props.
12
- *
13
- * @internal
14
- */
15
- export declare const ElementBox: (props: {
16
- element: HTMLElement;
17
- children: (box: ElementBoundingBox) => any;
18
- resizeUpdateMethod?: ResizeUpdateMethod;
19
- }) => any;
20
- export {};
@@ -1,16 +0,0 @@
1
- /**
2
- * A hook that watches for changes to a node and forces a re-render when it changes.
3
- *
4
- * @param element The node to watch for changes.
5
- * @param opts Options for the hook.
6
- * @param [opts.disableWatch=false] Whether to watch for changes or not.
7
- * @param [opts.onChange] A callback that is called when the node changes.
8
- *
9
- * @returns A version number that is incremented when the node changes to force a re-render.
10
- *
11
- * @internal
12
- */
13
- export declare function useElementObserver(element: Node, opts?: {
14
- disableWatch?: boolean;
15
- onChange?: (version: number) => void;
16
- }): number;