@patternfly/react-core 5.0.0-alpha.4 → 5.0.0-alpha.6

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 (36) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +2 -3
  3. package/src/components/Menu/__mocks__/Menu.tsx +12 -0
  4. package/src/components/Menu/__mocks__/MenuContent.tsx +3 -0
  5. package/src/components/Menu/__mocks__/MenuGroup.tsx +12 -0
  6. package/src/components/Menu/__mocks__/MenuItem.tsx +12 -0
  7. package/src/components/Menu/__mocks__/MenuList.tsx +10 -0
  8. package/src/components/Menu/__mocks__/index.ts +5 -0
  9. package/src/helpers/Popper/__mocks__/Popper.tsx +11 -0
  10. package/src/helpers/Popper/__mocks__/index.ts +1 -0
  11. package/src/next/components/Dropdown/__tests__/Dropdown.test.tsx +236 -0
  12. package/src/next/components/Dropdown/__tests__/DropdownGroup.test.tsx +69 -0
  13. package/src/next/components/Dropdown/__tests__/DropdownItem.test.tsx +73 -0
  14. package/src/next/components/Dropdown/__tests__/DropdownList.test.tsx +41 -0
  15. package/src/next/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +47 -0
  16. package/src/next/components/Dropdown/__tests__/__snapshots__/DropdownGroup.test.tsx.snap +20 -0
  17. package/src/next/components/Dropdown/__tests__/__snapshots__/DropdownItem.test.tsx.snap +20 -0
  18. package/src/next/components/Dropdown/__tests__/__snapshots__/DropdownList.test.tsx.snap +14 -0
  19. package/dist/esm/helpers/Popper/DeprecatedPopperTypes.d.ts +0 -137
  20. package/dist/esm/helpers/Popper/DeprecatedPopperTypes.d.ts.map +0 -1
  21. package/dist/esm/helpers/Popper/DeprecatedPopperTypes.js +0 -8
  22. package/dist/esm/helpers/Popper/DeprecatedPopperTypes.js.map +0 -1
  23. package/dist/esm/helpers/Popper/DeprecatedTippyTypes.d.ts +0 -211
  24. package/dist/esm/helpers/Popper/DeprecatedTippyTypes.d.ts.map +0 -1
  25. package/dist/esm/helpers/Popper/DeprecatedTippyTypes.js +0 -8
  26. package/dist/esm/helpers/Popper/DeprecatedTippyTypes.js.map +0 -1
  27. package/dist/js/helpers/Popper/DeprecatedPopperTypes.d.ts +0 -137
  28. package/dist/js/helpers/Popper/DeprecatedPopperTypes.d.ts.map +0 -1
  29. package/dist/js/helpers/Popper/DeprecatedPopperTypes.js +0 -10
  30. package/dist/js/helpers/Popper/DeprecatedPopperTypes.js.map +0 -1
  31. package/dist/js/helpers/Popper/DeprecatedTippyTypes.d.ts +0 -211
  32. package/dist/js/helpers/Popper/DeprecatedTippyTypes.d.ts.map +0 -1
  33. package/dist/js/helpers/Popper/DeprecatedTippyTypes.js +0 -10
  34. package/dist/js/helpers/Popper/DeprecatedTippyTypes.js.map +0 -1
  35. package/src/helpers/Popper/DeprecatedPopperTypes.ts +0 -180
  36. package/src/helpers/Popper/DeprecatedTippyTypes.ts +0 -284
@@ -1,211 +0,0 @@
1
- /**
2
- * Added types from tippy.js and popper.js to preserve backwards compatibility
3
- * Can remove in next breaking change release
4
- */
5
- import Popper from './DeprecatedPopperTypes';
6
- export declare type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
7
- export declare type Placement = Popper.Placement;
8
- export declare type Boundary = Popper.Boundary | HTMLElement;
9
- export declare type Content = string | Element | ((ref: Element) => Element | string);
10
- export declare type SingleTarget = Element;
11
- export declare type MultipleTargets = string | Element[] | NodeList;
12
- export declare type Targets = SingleTarget | MultipleTargets;
13
- export interface ReferenceElement<TProps = Props> extends Element {
14
- _tippy?: Instance<TProps>;
15
- }
16
- export interface PopperElement<TProps = Props> extends HTMLDivElement {
17
- _tippy?: Instance<TProps>;
18
- }
19
- export interface PopperInstance extends Popper {
20
- modifiers: Popper.BaseModifier[];
21
- }
22
- export interface LifecycleHooks<TProps = Props> {
23
- onAfterUpdate(instance: Instance<TProps>, partialProps: Partial<TProps>): void;
24
- onBeforeUpdate(instance: Instance<TProps>, partialProps: Partial<TProps>): void;
25
- onCreate(instance: Instance<TProps>): void;
26
- onDestroy(instance: Instance<TProps>): void;
27
- onHidden(instance: Instance<TProps>): void;
28
- onHide(instance: Instance<TProps>): void | false;
29
- onMount(instance: Instance<TProps>): void;
30
- onShow(instance: Instance<TProps>): void | false;
31
- onShown(instance: Instance<TProps>): void;
32
- onTrigger(instance: Instance<TProps>, event: Event): void;
33
- onUntrigger(instance: Instance<TProps>, event: Event): void;
34
- }
35
- export interface Props extends LifecycleHooks {
36
- allowHTML: boolean;
37
- animateFill: boolean;
38
- animation: string;
39
- appendTo: 'parent' | Element | ((ref: Element) => Element);
40
- aria: 'describedby' | 'labelledby' | null;
41
- arrow: boolean | string | SVGElement;
42
- boundary: Boundary;
43
- content: Content;
44
- delay: number | [number | null, number | null];
45
- distance: number | string;
46
- duration: number | [number | null, number | null];
47
- flip: boolean;
48
- flipBehavior: 'flip' | Placement[];
49
- flipOnUpdate: boolean;
50
- followCursor: boolean | 'horizontal' | 'vertical' | 'initial';
51
- hideOnClick: boolean | 'toggle';
52
- ignoreAttributes: boolean;
53
- inertia: boolean;
54
- inlinePositioning: boolean;
55
- interactive: boolean;
56
- interactiveBorder: number;
57
- interactiveDebounce: number;
58
- lazy: boolean;
59
- maxWidth: number | string;
60
- multiple: boolean;
61
- offset: number | string;
62
- placement: Placement;
63
- plugins: Plugin[];
64
- popperOptions: Popper.PopperOptions;
65
- role: string;
66
- showOnCreate: boolean;
67
- sticky: boolean | 'reference' | 'popper';
68
- theme: string;
69
- touch: boolean | 'hold' | ['hold', number];
70
- trigger: string;
71
- triggerTarget: Element | Element[] | null;
72
- updateDuration: number;
73
- zIndex: number;
74
- }
75
- export interface DefaultProps extends Props {
76
- delay: number | [number, number];
77
- duration: number | [number, number];
78
- }
79
- export interface Instance<TProps = Props> {
80
- clearDelayTimeouts(): void;
81
- destroy(): void;
82
- disable(): void;
83
- enable(): void;
84
- hide(duration?: number): void;
85
- id: number;
86
- plugins: Plugin<TProps>[];
87
- popper: PopperElement<TProps>;
88
- popperChildren: PopperChildren;
89
- popperInstance: PopperInstance | null;
90
- props: TProps;
91
- reference: ReferenceElement<TProps>;
92
- setContent(content: Content): void;
93
- setProps(partialProps: Partial<TProps>): void;
94
- show(duration?: number): void;
95
- state: {
96
- currentPlacement: Placement | null;
97
- isEnabled: boolean;
98
- isVisible: boolean;
99
- isDestroyed: boolean;
100
- isMounted: boolean;
101
- isShown: boolean;
102
- };
103
- }
104
- export interface PopperChildren {
105
- tooltip: HTMLDivElement;
106
- content: HTMLDivElement;
107
- arrow: HTMLDivElement | null;
108
- }
109
- export interface TippyStatics {
110
- readonly currentInput: {
111
- isTouch: boolean;
112
- };
113
- readonly defaultProps: DefaultProps;
114
- readonly version: string;
115
- setDefaultProps(partialProps: Partial<DefaultProps>): void;
116
- }
117
- export interface Tippy<TProps = Props> extends TippyStatics {
118
- (targets: SingleTarget, optionalProps?: Partial<TProps>,
119
- /** @deprecated use Props.plugins */
120
- plugins?: Plugin<TProps>[]): Instance<TProps>;
121
- }
122
- export interface Tippy<TProps = Props> extends TippyStatics {
123
- (targets: MultipleTargets, optionalProps?: Partial<TProps>,
124
- /** @deprecated use Props.plugins */
125
- plugins?: Plugin<TProps>[]): Instance<TProps>[];
126
- }
127
- declare const tippy: Tippy;
128
- export interface DelegateInstance<TProps = Props> extends Instance<TProps> {
129
- destroy(shouldDestroyTargetInstances?: boolean): void;
130
- }
131
- export interface Delegate<TProps = Props> {
132
- (targets: SingleTarget, props: Partial<TProps> & {
133
- target: string;
134
- },
135
- /** @deprecated use Props.plugins */
136
- plugins?: Plugin<TProps>[]): DelegateInstance<TProps>;
137
- }
138
- export interface Delegate<TProps = Props> {
139
- (targets: MultipleTargets, props: Partial<TProps> & {
140
- target: string;
141
- },
142
- /** @deprecated use Props.plugins */
143
- plugins?: Plugin<TProps>[]): DelegateInstance<TProps>[];
144
- }
145
- export declare type CreateSingleton<TProps = Props> = (tippyInstances: Instance<TProps | Props>[], optionalProps?: Partial<TProps>,
146
- /** @deprecated use Props.plugins */
147
- plugins?: Plugin<TProps>[]) => Instance<TProps>;
148
- declare const delegate: Delegate;
149
- declare const createSingleton: CreateSingleton;
150
- export interface Plugin<TProps = Props> {
151
- name?: string;
152
- defaultValue?: any;
153
- fn(instance: Instance<TProps>): Partial<LifecycleHooks<TProps>>;
154
- }
155
- export interface AnimateFillInstance extends Instance {
156
- popperChildren: PopperChildren & {
157
- backdrop: HTMLDivElement | null;
158
- };
159
- }
160
- export interface AnimateFill extends Plugin {
161
- name: 'animateFill';
162
- defaultValue: false;
163
- fn(instance: AnimateFillInstance): Partial<LifecycleHooks>;
164
- }
165
- export interface FollowCursor extends Plugin {
166
- name: 'followCursor';
167
- defaultValue: false;
168
- }
169
- export interface InlinePositioning extends Plugin {
170
- name: 'inlinePositioning';
171
- defaultValue: false;
172
- }
173
- export interface Sticky extends Plugin {
174
- name: 'sticky';
175
- defaultValue: false;
176
- }
177
- declare const animateFill: AnimateFill;
178
- declare const followCursor: FollowCursor;
179
- declare const inlinePositioning: InlinePositioning;
180
- declare const sticky: Sticky;
181
- export interface HideAllOptions {
182
- duration?: number;
183
- exclude?: Instance | ReferenceElement;
184
- }
185
- export declare type HideAll = (options?: HideAllOptions) => void;
186
- declare const hideAll: HideAll;
187
- declare const roundArrow: string;
188
- /**
189
- * @deprecated use tippy.setDefaultProps({plugins: [...]});
190
- */
191
- export declare type CreateTippyWithPlugins = (outerPlugins: Plugin[]) => Tippy;
192
- declare const createTippyWithPlugins: CreateTippyWithPlugins;
193
- /** @deprecated */
194
- export interface AnimateFillProps {
195
- animateFill: Props['animateFill'];
196
- }
197
- /** @deprecated */
198
- export interface FollowCursorProps {
199
- followCursor: Props['followCursor'];
200
- }
201
- /** @deprecated */
202
- export interface InlinePositioningProps {
203
- inlinePositioning: Props['inlinePositioning'];
204
- }
205
- /** @deprecated */
206
- export interface StickyProps {
207
- sticky: Props['sticky'];
208
- }
209
- export default tippy;
210
- export { hideAll, createTippyWithPlugins, delegate, createSingleton, animateFill, followCursor, inlinePositioning, sticky, roundArrow };
211
- //# sourceMappingURL=DeprecatedTippyTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeprecatedTippyTypes.d.ts","sourceRoot":"","sources":["../../../../src/helpers/Popper/DeprecatedTippyTypes.ts"],"names":[],"mappings":"AACA;;;GAGG;AAEH,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAE7C,oBAAY,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhE,oBAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAEzC,oBAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,GAAG,WAAW,CAAC;AAErD,oBAAY,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GAAG,MAAM,CAAC,CAAC;AAE9E,oBAAY,YAAY,GAAG,OAAO,CAAC;AAEnC,oBAAY,eAAe,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,QAAQ,CAAC;AAE5D,oBAAY,OAAO,GAAG,YAAY,GAAG,eAAe,CAAC;AAErD,MAAM,WAAW,gBAAgB,CAAC,MAAM,GAAG,KAAK,CAAE,SAAQ,OAAO;IAC/D,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa,CAAC,MAAM,GAAG,KAAK,CAAE,SAAQ,cAAc;IACnE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,cAAe,SAAQ,MAAM;IAE5C,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,KAAK;IAC5C,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC/E,cAAc,CA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BAAkB;AAClB,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;CAC/C;AAED,kBAAkB;AAClB,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CACzB;AAED,eAAe,KAAK,CAAC;AACrB,OAAO,EACL,OAAO,EACP,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,MAAM,EACN,UAAU,EACX,CAAC"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /* eslint-disable @typescript-eslint/prefer-function-type */
3
- /**
4
- * Added types from tippy.js and popper.js to preserve backwards compatibility
5
- * Can remove in next breaking change release
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.roundArrow = exports.sticky = exports.inlinePositioning = exports.followCursor = exports.animateFill = exports.createSingleton = exports.delegate = exports.createTippyWithPlugins = exports.hideAll = void 0;
9
- exports.default = tippy;
10
- //# sourceMappingURL=DeprecatedTippyTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeprecatedTippyTypes.js","sourceRoot":"","sources":["../../../../src/helpers/Popper/DeprecatedTippyTypes.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D;;;GAGG;;;AA4QH,kBAAe,KAAK,CAAC"}
@@ -1,180 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- /* eslint-disable @typescript-eslint/no-namespace */
3
- /**
4
- * Added types from tippy.js and popper.js to preserve backwards compatibility
5
- * Can remove in next breaking change release
6
- */
7
-
8
- /**
9
- * This kind of namespace declaration is not necessary, but is kept here for backwards-compatibility with
10
- * popper.js 1.x. It can be removed in 2.x so that the default export is simply the Popper class
11
- * and all the types / interfaces are top-level named exports.
12
- */
13
- declare namespace Popper {
14
- export type Position = 'top' | 'right' | 'bottom' | 'left';
15
-
16
- export type Placement =
17
- | 'auto-start'
18
- | 'auto'
19
- | 'auto-end'
20
- | 'top-start'
21
- | 'top'
22
- | 'top-end'
23
- | 'right-start'
24
- | 'right'
25
- | 'right-end'
26
- | 'bottom-end'
27
- | 'bottom'
28
- | 'bottom-start'
29
- | 'left-end'
30
- | 'left'
31
- | 'left-start';
32
-
33
- export type Boundary = 'scrollParent' | 'viewport' | 'window';
34
-
35
- export type Behavior = 'flip' | 'clockwise' | 'counterclockwise';
36
-
37
- export type ModifierFn = (data: Data, options: Object) => Data;
38
-
39
- export interface Attributes {
40
- 'x-out-of-boundaries': '' | false;
41
- 'x-placement': Placement;
42
- }
43
-
44
- export interface Padding {
45
- top?: number;
46
- bottom?: number;
47
- left?: number;
48
- right?: number;
49
- }
50
-
51
- export interface BaseModifier {
52
- order?: number;
53
- enabled?: boolean;
54
- fn?: ModifierFn;
55
- }
56
-
57
- export interface Modifiers {
58
- shift?: BaseModifier;
59
- offset?: BaseModifier & {
60
- offset?: number | string;
61
- };
62
- preventOverflow?: BaseModifier & {
63
- priority?: Position[];
64
- padding?: number | Padding;
65
- boundariesElement?: Boundary | Element;
66
- escapeWithReference?: boolean;
67
- };
68
- keepTogether?: BaseModifier;
69
- arrow?: BaseModifier & {
70
- element?: string | Element;
71
- };
72
- flip?: BaseModifier & {
73
- behavior?: Behavior | Position[];
74
- padding?: number | Padding;
75
- boundariesElement?: Boundary | Element;
76
- flipVariations?: boolean;
77
- flipVariationsByContent?: boolean;
78
- };
79
- inner?: BaseModifier;
80
- hide?: BaseModifier;
81
- applyStyle?: BaseModifier & {
82
- onLoad?: Function;
83
- gpuAcceleration?: boolean;
84
- };
85
- computeStyle?: BaseModifier & {
86
- gpuAcceleration?: boolean;
87
- x?: 'bottom' | 'top';
88
- y?: 'left' | 'right';
89
- };
90
-
91
- [name: string]: (BaseModifier & Record<string, any>) | undefined;
92
- }
93
-
94
- export interface Offset {
95
- top: number;
96
- left: number;
97
- width: number;
98
- height: number;
99
- }
100
-
101
- export interface Data {
102
- instance: Popper;
103
- placement: Placement;
104
- originalPlacement: Placement;
105
- flipped: boolean;
106
- hide: boolean;
107
- arrowElement: Element;
108
- styles: CSSStyleDeclaration;
109
- arrowStyles: CSSStyleDeclaration;
110
- attributes: Attributes;
111
- boundaries: Object;
112
- offsets: {
113
- popper: Offset;
114
- reference: Offset;
115
- arrow: {
116
- top: number;
117
- left: number;
118
- };
119
- };
120
- }
121
-
122
- export interface PopperOptions {
123
- placement?: Placement;
124
- positionFixed?: boolean;
125
- eventsEnabled?: boolean;
126
- modifiers?: Modifiers;
127
- removeOnDestroy?: boolean;
128
-
129
- onCreate?(data: Data): void;
130
-
131
- onUpdate?(data: Data): void;
132
- }
133
-
134
- export interface ReferenceObject {
135
- clientHeight: number;
136
- clientWidth: number;
137
- referenceNode?: Node;
138
-
139
- getBoundingClientRect(): ClientRect;
140
- }
141
- }
142
-
143
- // Re-export types in the Popper namespace so that they can be accessed as top-level named exports.
144
- // These re-exports should be removed in 2.x when the "declare namespace Popper" syntax is removed.
145
- export type Padding = Popper.Padding;
146
- export type Position = Popper.Position;
147
- export type Placement = Popper.Placement;
148
- export type Boundary = Popper.Boundary;
149
- export type Behavior = Popper.Behavior;
150
- export type ModifierFn = Popper.ModifierFn;
151
- export type BaseModifier = Popper.BaseModifier;
152
- export type Modifiers = Popper.Modifiers;
153
- export type Offset = Popper.Offset;
154
- export type Data = Popper.Data;
155
- export type PopperOptions = Popper.PopperOptions;
156
- export type ReferenceObject = Popper.ReferenceObject;
157
-
158
- declare class Popper {
159
- static modifiers: (BaseModifier & { name: string })[];
160
- static placements: Placement[];
161
- static Defaults: PopperOptions;
162
-
163
- options: PopperOptions;
164
- popper: Element;
165
- reference: Element | ReferenceObject;
166
-
167
- constructor(reference: Element | ReferenceObject, popper: Element, options?: PopperOptions);
168
-
169
- destroy(): void;
170
-
171
- update(): void;
172
-
173
- scheduleUpdate(): void;
174
-
175
- enableEventListeners(): void;
176
-
177
- disableEventListeners(): void;
178
- }
179
-
180
- export default Popper;