@patternfly/react-core 5.0.0-alpha.3 → 5.0.0-alpha.5
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 +8 -0
- package/dist/umd/react-core.min.js +5 -5
- package/package.json +7 -8
- package/dist/esm/helpers/Popper/DeprecatedPopperTypes.d.ts +0 -137
- package/dist/esm/helpers/Popper/DeprecatedPopperTypes.d.ts.map +0 -1
- package/dist/esm/helpers/Popper/DeprecatedPopperTypes.js +0 -8
- package/dist/esm/helpers/Popper/DeprecatedPopperTypes.js.map +0 -1
- package/dist/esm/helpers/Popper/DeprecatedTippyTypes.d.ts +0 -211
- package/dist/esm/helpers/Popper/DeprecatedTippyTypes.d.ts.map +0 -1
- package/dist/esm/helpers/Popper/DeprecatedTippyTypes.js +0 -8
- package/dist/esm/helpers/Popper/DeprecatedTippyTypes.js.map +0 -1
- package/dist/js/helpers/Popper/DeprecatedPopperTypes.d.ts +0 -137
- package/dist/js/helpers/Popper/DeprecatedPopperTypes.d.ts.map +0 -1
- package/dist/js/helpers/Popper/DeprecatedPopperTypes.js +0 -10
- package/dist/js/helpers/Popper/DeprecatedPopperTypes.js.map +0 -1
- package/dist/js/helpers/Popper/DeprecatedTippyTypes.d.ts +0 -211
- package/dist/js/helpers/Popper/DeprecatedTippyTypes.d.ts.map +0 -1
- package/dist/js/helpers/Popper/DeprecatedTippyTypes.js +0 -10
- package/dist/js/helpers/Popper/DeprecatedTippyTypes.js.map +0 -1
- package/src/helpers/Popper/DeprecatedPopperTypes.ts +0 -180
- package/src/helpers/Popper/DeprecatedTippyTypes.ts +0 -284
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/prefer-function-type */
|
|
2
|
-
/**
|
|
3
|
-
* Added types from tippy.js and popper.js to preserve backwards compatibility
|
|
4
|
-
* Can remove in next breaking change release
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import Popper from './DeprecatedPopperTypes';
|
|
8
|
-
|
|
9
|
-
export type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
10
|
-
|
|
11
|
-
export type Placement = Popper.Placement;
|
|
12
|
-
|
|
13
|
-
export type Boundary = Popper.Boundary | HTMLElement;
|
|
14
|
-
|
|
15
|
-
export type Content = string | Element | ((ref: Element) => Element | string);
|
|
16
|
-
|
|
17
|
-
export type SingleTarget = Element;
|
|
18
|
-
|
|
19
|
-
export type MultipleTargets = string | Element[] | NodeList;
|
|
20
|
-
|
|
21
|
-
export type Targets = SingleTarget | MultipleTargets;
|
|
22
|
-
|
|
23
|
-
export interface ReferenceElement<TProps = Props> extends Element {
|
|
24
|
-
_tippy?: Instance<TProps>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface PopperElement<TProps = Props> extends HTMLDivElement {
|
|
28
|
-
_tippy?: Instance<TProps>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface PopperInstance extends Popper {
|
|
32
|
-
// Undo the static so we can mutate values inside for `tippyDistance`
|
|
33
|
-
modifiers: Popper.BaseModifier[];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface LifecycleHooks<TProps = Props> {
|
|
37
|
-
onAfterUpdate(instance: Instance<TProps>, partialProps: Partial<TProps>): void;
|
|
38
|
-
onBeforeUpdate(instance: Instance<TProps>, partialProps: Partial<TProps>): void;
|
|
39
|
-
onCreate(instance: Instance<TProps>): void;
|
|
40
|
-
onDestroy(instance: Instance<TProps>): void;
|
|
41
|
-
onHidden(instance: Instance<TProps>): void;
|
|
42
|
-
onHide(instance: Instance<TProps>): void | false;
|
|
43
|
-
onMount(instance: Instance<TProps>): void;
|
|
44
|
-
onShow(instance: Instance<TProps>): void | false;
|
|
45
|
-
onShown(instance: Instance<TProps>): void;
|
|
46
|
-
onTrigger(instance: Instance<TProps>, event: Event): void;
|
|
47
|
-
onUntrigger(instance: Instance<TProps>, event: Event): void;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface Props extends LifecycleHooks {
|
|
51
|
-
allowHTML: boolean;
|
|
52
|
-
animateFill: boolean;
|
|
53
|
-
animation: string;
|
|
54
|
-
appendTo: 'parent' | Element | ((ref: Element) => Element);
|
|
55
|
-
aria: 'describedby' | 'labelledby' | null;
|
|
56
|
-
arrow: boolean | string | SVGElement;
|
|
57
|
-
boundary: Boundary;
|
|
58
|
-
content: Content;
|
|
59
|
-
delay: number | [number | null, number | null];
|
|
60
|
-
distance: number | string;
|
|
61
|
-
duration: number | [number | null, number | null];
|
|
62
|
-
flip: boolean;
|
|
63
|
-
flipBehavior: 'flip' | Placement[];
|
|
64
|
-
flipOnUpdate: boolean;
|
|
65
|
-
followCursor: boolean | 'horizontal' | 'vertical' | 'initial';
|
|
66
|
-
hideOnClick: boolean | 'toggle';
|
|
67
|
-
ignoreAttributes: boolean;
|
|
68
|
-
inertia: boolean;
|
|
69
|
-
inlinePositioning: boolean;
|
|
70
|
-
interactive: boolean;
|
|
71
|
-
interactiveBorder: number;
|
|
72
|
-
interactiveDebounce: number;
|
|
73
|
-
lazy: boolean;
|
|
74
|
-
maxWidth: number | string;
|
|
75
|
-
multiple: boolean;
|
|
76
|
-
offset: number | string;
|
|
77
|
-
placement: Placement;
|
|
78
|
-
plugins: Plugin[];
|
|
79
|
-
popperOptions: Popper.PopperOptions;
|
|
80
|
-
role: string;
|
|
81
|
-
showOnCreate: boolean;
|
|
82
|
-
sticky: boolean | 'reference' | 'popper';
|
|
83
|
-
theme: string;
|
|
84
|
-
touch: boolean | 'hold' | ['hold', number];
|
|
85
|
-
trigger: string;
|
|
86
|
-
triggerTarget: Element | Element[] | null;
|
|
87
|
-
updateDuration: number;
|
|
88
|
-
zIndex: number;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export interface DefaultProps extends Props {
|
|
92
|
-
delay: number | [number, number];
|
|
93
|
-
duration: number | [number, number];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface Instance<TProps = Props> {
|
|
97
|
-
clearDelayTimeouts(): void;
|
|
98
|
-
destroy(): void;
|
|
99
|
-
disable(): void;
|
|
100
|
-
enable(): void;
|
|
101
|
-
hide(duration?: number): void;
|
|
102
|
-
id: number;
|
|
103
|
-
plugins: Plugin<TProps>[];
|
|
104
|
-
popper: PopperElement<TProps>;
|
|
105
|
-
popperChildren: PopperChildren;
|
|
106
|
-
popperInstance: PopperInstance | null;
|
|
107
|
-
props: TProps;
|
|
108
|
-
reference: ReferenceElement<TProps>;
|
|
109
|
-
setContent(content: Content): void;
|
|
110
|
-
setProps(partialProps: Partial<TProps>): void;
|
|
111
|
-
show(duration?: number): void;
|
|
112
|
-
state: {
|
|
113
|
-
currentPlacement: Placement | null;
|
|
114
|
-
isEnabled: boolean;
|
|
115
|
-
isVisible: boolean;
|
|
116
|
-
isDestroyed: boolean;
|
|
117
|
-
isMounted: boolean;
|
|
118
|
-
isShown: boolean;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface PopperChildren {
|
|
123
|
-
tooltip: HTMLDivElement;
|
|
124
|
-
content: HTMLDivElement;
|
|
125
|
-
arrow: HTMLDivElement | null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface TippyStatics {
|
|
129
|
-
readonly currentInput: { isTouch: boolean };
|
|
130
|
-
readonly defaultProps: DefaultProps;
|
|
131
|
-
readonly version: string;
|
|
132
|
-
setDefaultProps(partialProps: Partial<DefaultProps>): void;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface Tippy<TProps = Props> extends TippyStatics {
|
|
136
|
-
(
|
|
137
|
-
targets: SingleTarget,
|
|
138
|
-
optionalProps?: Partial<TProps>,
|
|
139
|
-
/** @deprecated use Props.plugins */
|
|
140
|
-
plugins?: Plugin<TProps>[]
|
|
141
|
-
): Instance<TProps>;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface Tippy<TProps = Props> extends TippyStatics {
|
|
145
|
-
(
|
|
146
|
-
targets: MultipleTargets,
|
|
147
|
-
optionalProps?: Partial<TProps>,
|
|
148
|
-
/** @deprecated use Props.plugins */
|
|
149
|
-
plugins?: Plugin<TProps>[]
|
|
150
|
-
): Instance<TProps>[];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
declare const tippy: Tippy;
|
|
154
|
-
|
|
155
|
-
// =============================================================================
|
|
156
|
-
// Addon types
|
|
157
|
-
// =============================================================================
|
|
158
|
-
export interface DelegateInstance<TProps = Props> extends Instance<TProps> {
|
|
159
|
-
destroy(shouldDestroyTargetInstances?: boolean): void;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface Delegate<TProps = Props> {
|
|
163
|
-
(
|
|
164
|
-
targets: SingleTarget,
|
|
165
|
-
props: Partial<TProps> & { target: string },
|
|
166
|
-
/** @deprecated use Props.plugins */
|
|
167
|
-
plugins?: Plugin<TProps>[]
|
|
168
|
-
): DelegateInstance<TProps>;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface Delegate<TProps = Props> {
|
|
172
|
-
(
|
|
173
|
-
targets: MultipleTargets,
|
|
174
|
-
props: Partial<TProps> & { target: string },
|
|
175
|
-
/** @deprecated use Props.plugins */
|
|
176
|
-
plugins?: Plugin<TProps>[]
|
|
177
|
-
): DelegateInstance<TProps>[];
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export type CreateSingleton<TProps = Props> = (
|
|
181
|
-
tippyInstances: Instance<TProps | Props>[],
|
|
182
|
-
optionalProps?: Partial<TProps>,
|
|
183
|
-
/** @deprecated use Props.plugins */
|
|
184
|
-
plugins?: Plugin<TProps>[]
|
|
185
|
-
) => Instance<TProps>;
|
|
186
|
-
|
|
187
|
-
declare const delegate: Delegate;
|
|
188
|
-
declare const createSingleton: CreateSingleton;
|
|
189
|
-
|
|
190
|
-
// =============================================================================
|
|
191
|
-
// Plugin types
|
|
192
|
-
// =============================================================================
|
|
193
|
-
export interface Plugin<TProps = Props> {
|
|
194
|
-
name?: string;
|
|
195
|
-
defaultValue?: any;
|
|
196
|
-
fn(instance: Instance<TProps>): Partial<LifecycleHooks<TProps>>;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export interface AnimateFillInstance extends Instance {
|
|
200
|
-
popperChildren: PopperChildren & {
|
|
201
|
-
backdrop: HTMLDivElement | null;
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface AnimateFill extends Plugin {
|
|
206
|
-
name: 'animateFill';
|
|
207
|
-
defaultValue: false;
|
|
208
|
-
fn(instance: AnimateFillInstance): Partial<LifecycleHooks>;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface FollowCursor extends Plugin {
|
|
212
|
-
name: 'followCursor';
|
|
213
|
-
defaultValue: false;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface InlinePositioning extends Plugin {
|
|
217
|
-
name: 'inlinePositioning';
|
|
218
|
-
defaultValue: false;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface Sticky extends Plugin {
|
|
222
|
-
name: 'sticky';
|
|
223
|
-
defaultValue: false;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
declare const animateFill: AnimateFill;
|
|
227
|
-
declare const followCursor: FollowCursor;
|
|
228
|
-
declare const inlinePositioning: InlinePositioning;
|
|
229
|
-
declare const sticky: Sticky;
|
|
230
|
-
|
|
231
|
-
// =============================================================================
|
|
232
|
-
// Misc types
|
|
233
|
-
// =============================================================================
|
|
234
|
-
export interface HideAllOptions {
|
|
235
|
-
duration?: number;
|
|
236
|
-
exclude?: Instance | ReferenceElement;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export type HideAll = (options?: HideAllOptions) => void;
|
|
240
|
-
|
|
241
|
-
declare const hideAll: HideAll;
|
|
242
|
-
declare const roundArrow: string;
|
|
243
|
-
|
|
244
|
-
// =============================================================================
|
|
245
|
-
// Deprecated types - these will be removed in the next major
|
|
246
|
-
// =============================================================================
|
|
247
|
-
/**
|
|
248
|
-
* @deprecated use tippy.setDefaultProps({plugins: [...]});
|
|
249
|
-
*/
|
|
250
|
-
export type CreateTippyWithPlugins = (outerPlugins: Plugin[]) => Tippy;
|
|
251
|
-
declare const createTippyWithPlugins: CreateTippyWithPlugins;
|
|
252
|
-
|
|
253
|
-
/** @deprecated */
|
|
254
|
-
export interface AnimateFillProps {
|
|
255
|
-
animateFill: Props['animateFill'];
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/** @deprecated */
|
|
259
|
-
export interface FollowCursorProps {
|
|
260
|
-
followCursor: Props['followCursor'];
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/** @deprecated */
|
|
264
|
-
export interface InlinePositioningProps {
|
|
265
|
-
inlinePositioning: Props['inlinePositioning'];
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/** @deprecated */
|
|
269
|
-
export interface StickyProps {
|
|
270
|
-
sticky: Props['sticky'];
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export default tippy;
|
|
274
|
-
export {
|
|
275
|
-
hideAll,
|
|
276
|
-
createTippyWithPlugins,
|
|
277
|
-
delegate,
|
|
278
|
-
createSingleton,
|
|
279
|
-
animateFill,
|
|
280
|
-
followCursor,
|
|
281
|
-
inlinePositioning,
|
|
282
|
-
sticky,
|
|
283
|
-
roundArrow
|
|
284
|
-
};
|