@instructure/ui-popover 8.8.1-snapshot.7 → 8.9.1-snapshot.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/src/index.ts CHANGED
@@ -22,4 +22,4 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  export { Popover } from './Popover'
25
- export type { PopoverProps } from './Popover/types'
25
+ export type { PopoverProps } from './Popover/props'
@@ -1,7 +1,6 @@
1
1
  import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import type { RequestAnimationFrameType } from '@instructure/ui-dom-utils';
4
- import { PopoverProps } from './types';
3
+ import type { PopoverProps } from './props';
5
4
  /**
6
5
  ---
7
6
  category: components
@@ -10,180 +9,91 @@ tags: overlay, portal, dialog
10
9
  **/
11
10
  declare class Popover extends Component<PopoverProps> {
12
11
  static readonly componentId = "Popover";
13
- static propTypes: {
14
- /**
15
- * Whether or not the `<Popover />` content is shown
16
- */
17
- isShowingContent: PropTypes.Requireable<boolean>;
18
- /**
19
- * Whether or not to show the content by default, when uncontrolled
20
- */
21
- defaultIsShowingContent: PropTypes.Requireable<boolean>;
22
- /**
23
- * The action that causes the content to display (`click`, `hover`, `focus`)
24
- */
25
- on: PropTypes.Requireable<string | (string | null | undefined)[]>;
26
- /**
27
- * Whether or not an arrow pointing to the trigger should be rendered
28
- */
29
- withArrow: PropTypes.Requireable<boolean>;
30
- /**
31
- * Color variant of the popover content
32
- */
33
- color: PropTypes.Requireable<string>;
34
- /**
35
- * The placement of the content in relation to the trigger
36
- */
37
- placement: PropTypes.Requireable<string>;
38
- /**
39
- * Controls the shadow depth for the `<Popover />`
40
- */
41
- shadow: PropTypes.Requireable<"resting" | "above" | "topmost" | "none">;
42
- /**
43
- * Controls the z-index depth for the `<Popover />` content
44
- */
45
- stacking: PropTypes.Requireable<"resting" | "above" | "topmost" | "deepest" | "below">;
46
- /**
47
- * A function that returns a reference to the content element
48
- */
49
- contentRef: PropTypes.Requireable<(...args: any[]) => any>;
50
- /**
51
- * An element or a function returning an element to focus by default
52
- */
53
- defaultFocusElement: PropTypes.Requireable<((...args: any[]) => any) | PropTypes.ReactElementLike>;
54
- /**
55
- * An accessible label for the `<Popover />` content
56
- */
57
- screenReaderLabel: PropTypes.Requireable<string>;
58
- /**
59
- * The horizontal offset for the positioned content
60
- */
61
- offsetX: PropTypes.Requireable<string | number>;
62
- /**
63
- * The vertical offset for the positioned content
64
- */
65
- offsetY: PropTypes.Requireable<string | number>;
66
- /**
67
- * The parent in which to constrain the popover.
68
- * One of: 'window', 'scroll-parent', 'parent', 'none', an element,
69
- * or a function returning an element
70
- */
71
- constrain: PropTypes.Requireable<string | Element | PropTypes.ReactElementLike | ((...args: any[]) => any)>;
72
- /**
73
- * Target element for positioning the Popover (if it differs from the trigger)
74
- */
75
- positionTarget: PropTypes.Requireable<Element | ((...args: any[]) => any) | PropTypes.ReactElementLike>;
76
- /**
77
- * An element or a function returning an element to use as the mount node
78
- * for the `<Popover />` (defaults to `document.body`)
79
- */
80
- mountNode: PropTypes.Requireable<Element | PropTypes.ReactElementLike | ((...args: any[]) => any)>;
81
- /**
82
- * Insert the element at the 'top' of the mountNode or at the 'bottom'
83
- */
84
- insertAt: PropTypes.Requireable<string>;
85
- /**
86
- * An element, function returning an element, or array of elements that will
87
- * not be hidden from the screen reader when the `<Popover />` is open
88
- */
89
- liveRegion: PropTypes.Requireable<((...args: any[]) => any) | PropTypes.ReactElementLike | (PropTypes.ReactElementLike | null | undefined)[]>;
90
- /**
91
- * An id is generated if not supplied.
92
- */
93
- id: PropTypes.Requireable<string>;
94
- /**
95
- * Whether or not the content should offset to align by its arrow
96
- */
97
- shouldAlignArrow: PropTypes.Requireable<boolean>;
98
- /**
99
- * Whether or not position should be tracked or just set on initial render
100
- */
101
- shouldTrackPosition: PropTypes.Requireable<boolean>;
102
- /**
103
- * Should the `<Popover />` render offscreen when visually hidden
104
- */
105
- shouldRenderOffscreen: PropTypes.Requireable<boolean>;
106
- /**
107
- * Whether focus should contained within the `<Popover/>` when it is open
108
- */
109
- shouldContainFocus: PropTypes.Requireable<boolean>;
110
- /**
111
- * Whether focus should be returned to the trigger when the `<Popover/>` is closed
112
- */
113
- shouldReturnFocus: PropTypes.Requireable<boolean>;
114
- /**
115
- * Should the `<Popover />` hide when clicks occur outside the content
116
- */
117
- shouldCloseOnDocumentClick: PropTypes.Requireable<boolean>;
118
- /**
119
- * Should the `<Popover />` hide when the escape key is pressed
120
- */
121
- shouldCloseOnEscape: PropTypes.Requireable<boolean>;
122
- /**
123
- * Should the content become focused when the trigger is blurred
124
- */
125
- shouldFocusContentOnTriggerBlur: PropTypes.Requireable<boolean>;
126
- /**
127
- * Callback fired when content is shown. When controlled, this callback is
128
- * fired when the Popover expects to be shown
129
- */
130
- onShowContent: PropTypes.Requireable<(...args: any[]) => any>;
131
- /**
132
- * Callback fired when content is hidden. When controlled, this callback is
133
- * fired when the Popover expects to be hidden
134
- */
135
- onHideContent: PropTypes.Requireable<(...args: any[]) => any>;
136
- /**
137
- * Callback fired when content has been is initially positioned.
138
- * If `shouldRenderOffscreen` is true, it will only fire once, the first
139
- * time the content is shown
140
- */
141
- onPositioned: PropTypes.Requireable<(...args: any[]) => any>;
142
- /**
143
- * Callback fired when the position changes
144
- */
145
- onPositionChanged: PropTypes.Requireable<(...args: any[]) => any>;
146
- /**
147
- * Callback fired when component is clicked
148
- */
149
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
150
- /**
151
- * Callback fired when trigger is focused
152
- */
153
- onFocus: PropTypes.Requireable<(...args: any[]) => any>;
154
- /**
155
- * Callback fired when component is blurred
156
- */
157
- onBlur: PropTypes.Requireable<(...args: any[]) => any>;
158
- /**
159
- * Callback fired on keydown
160
- */
161
- onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
162
- /**
163
- * Callback fired on keyup
164
- */
165
- onKeyUp: PropTypes.Requireable<(...args: any[]) => any>;
166
- /**
167
- /**
168
- * Callback fired when mouse is over trigger
169
- */
170
- onMouseOver: PropTypes.Requireable<(...args: any[]) => any>;
171
- /**
172
- * Callback fired when mouse leaves trigger
173
- */
174
- onMouseOut: PropTypes.Requireable<(...args: any[]) => any>;
175
- /**
176
- * The element that triggers the popover
177
- */
178
- renderTrigger: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
179
- /**
180
- * The content to be shown by the popover
181
- */
182
- children: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
183
- dir: PropTypes.Requireable<string>;
184
- };
12
+ static allowedProps: readonly (keyof {
13
+ isShowingContent?: boolean | undefined;
14
+ defaultIsShowingContent?: boolean | undefined;
15
+ on?: "click" | "hover" | "focus" | ("click" | "hover" | "focus")[] | undefined;
16
+ withArrow?: boolean | undefined;
17
+ color?: "primary" | "primary-inverse" | undefined;
18
+ shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
19
+ stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
20
+ contentRef?: ((...args: any[]) => any) | undefined;
21
+ defaultFocusElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
22
+ screenReaderLabel?: string | undefined;
23
+ offsetX?: string | number | undefined;
24
+ offsetY?: string | number | undefined;
25
+ placement: import("@instructure/ui-position").PlacementPropValues;
26
+ constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
27
+ mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
28
+ positionTarget?: import("@instructure/ui-position").PositionMountNode | undefined;
29
+ insertAt?: "top" | "bottom" | undefined;
30
+ liveRegion?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
31
+ id?: string | undefined;
32
+ shouldAlignArrow?: boolean | undefined;
33
+ shouldTrackPosition?: boolean | undefined;
34
+ shouldRenderOffscreen?: boolean | undefined;
35
+ shouldContainFocus?: boolean | undefined;
36
+ shouldReturnFocus?: boolean | undefined;
37
+ shouldCloseOnDocumentClick?: boolean | undefined;
38
+ shouldCloseOnEscape?: boolean | undefined;
39
+ shouldFocusContentOnTriggerBlur?: boolean | undefined;
40
+ onShowContent?: ((...args: any[]) => any) | undefined;
41
+ onHideContent?: ((...args: any[]) => any) | undefined;
42
+ onPositioned?: ((...args: any[]) => any) | undefined;
43
+ onPositionChanged?: ((...args: any[]) => any) | undefined;
44
+ onClick?: ((...args: any[]) => any) | undefined;
45
+ onFocus?: ((...args: any[]) => any) | undefined;
46
+ onBlur?: ((...args: any[]) => any) | undefined;
47
+ onKeyDown?: ((...args: any[]) => any) | undefined;
48
+ onKeyUp?: ((...args: any[]) => any) | undefined;
49
+ onMouseOver?: ((...args: any[]) => any) | undefined;
50
+ onMouseOut?: ((...args: any[]) => any) | undefined;
51
+ renderTrigger?: React.ReactNode | ((...args: any[]) => any);
52
+ children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
53
+ })[];
54
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
55
+ isShowingContent?: boolean | undefined;
56
+ defaultIsShowingContent?: boolean | undefined;
57
+ on?: "click" | "hover" | "focus" | ("click" | "hover" | "focus")[] | undefined;
58
+ withArrow?: boolean | undefined;
59
+ color?: "primary" | "primary-inverse" | undefined;
60
+ shadow?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Shadow | undefined;
61
+ stacking?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Stacking | undefined;
62
+ contentRef?: ((...args: any[]) => any) | undefined;
63
+ defaultFocusElement?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | ((...args: any[]) => any) | undefined;
64
+ screenReaderLabel?: string | undefined;
65
+ offsetX?: string | number | undefined;
66
+ offsetY?: string | number | undefined;
67
+ placement: import("@instructure/ui-position").PlacementPropValues;
68
+ constrain?: import("@instructure/ui-position").PositionConstraint | undefined;
69
+ mountNode?: import("@instructure/ui-position").PositionMountNode | undefined;
70
+ positionTarget?: import("@instructure/ui-position").PositionMountNode | undefined;
71
+ insertAt?: "top" | "bottom" | undefined;
72
+ liveRegion?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactElement<any, string | React.JSXElementConstructor<any>>[] | ((...args: any[]) => any) | undefined;
73
+ id?: string | undefined;
74
+ shouldAlignArrow?: boolean | undefined;
75
+ shouldTrackPosition?: boolean | undefined;
76
+ shouldRenderOffscreen?: boolean | undefined;
77
+ shouldContainFocus?: boolean | undefined;
78
+ shouldReturnFocus?: boolean | undefined;
79
+ shouldCloseOnDocumentClick?: boolean | undefined;
80
+ shouldCloseOnEscape?: boolean | undefined;
81
+ shouldFocusContentOnTriggerBlur?: boolean | undefined;
82
+ onShowContent?: ((...args: any[]) => any) | undefined;
83
+ onHideContent?: ((...args: any[]) => any) | undefined;
84
+ onPositioned?: ((...args: any[]) => any) | undefined;
85
+ onPositionChanged?: ((...args: any[]) => any) | undefined;
86
+ onClick?: ((...args: any[]) => any) | undefined;
87
+ onFocus?: ((...args: any[]) => any) | undefined;
88
+ onBlur?: ((...args: any[]) => any) | undefined;
89
+ onKeyDown?: ((...args: any[]) => any) | undefined;
90
+ onKeyUp?: ((...args: any[]) => any) | undefined;
91
+ onMouseOver?: ((...args: any[]) => any) | undefined;
92
+ onMouseOut?: ((...args: any[]) => any) | undefined;
93
+ renderTrigger?: React.ReactNode | ((...args: any[]) => any);
94
+ children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
95
+ }>;
185
96
  static defaultProps: {
186
- isShowingContent: undefined;
187
97
  defaultIsShowingContent: boolean;
188
98
  placement: string;
189
99
  stacking: string;
@@ -195,13 +105,7 @@ declare class Popover extends Component<PopoverProps> {
195
105
  contentRef: (el: any) => void;
196
106
  withArrow: boolean;
197
107
  constrain: string;
198
- defaultFocusElement: undefined;
199
- screenReaderLabel: undefined;
200
- mountNode: undefined;
201
108
  insertAt: string;
202
- liveRegion: undefined;
203
- positionTarget: undefined;
204
- id: undefined;
205
109
  shouldAlignArrow: boolean;
206
110
  shouldTrackPosition: boolean;
207
111
  shouldRenderOffscreen: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Popover/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,SAAS,MAAM,YAAY,CAAA;AAmBlC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAU1E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;GAKG;AACH,cAEM,OAAQ,SAAQ,SAAS,CAAC,YAAY,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,WAAW,aAAY;IAEvC,MAAM,CAAC,SAAS;QACd;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAKH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAKH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAMH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;;WAIG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;MAIJ;IAED,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqDlB;IAED,gBAAgB,EAAE,CAAC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acking } from '@instructure/emotion';
3
3
  import type { PlacementPropValues, PositionConstraint, PositionMountNode } from '@instructure/ui-position';
4
4
  import type { BidirectionalProps } from '@instructure/ui-i18n';
5
- export declare type PopoverOwnProps = {
5
+ import type { PropValidators } from '@instructure/shared-types';
6
+ declare type PopoverOwnProps = {
6
7
  isShowingContent?: boolean;
7
8
  defaultIsShowingContent?: boolean;
8
9
  on?: ('click' | 'hover' | 'focus') | ('click' | 'hover' | 'focus')[];
@@ -42,6 +43,13 @@ export declare type PopoverOwnProps = {
42
43
  onMouseOver?: (...args: any[]) => any;
43
44
  onMouseOut?: (...args: any[]) => any;
44
45
  renderTrigger?: React.ReactNode | ((...args: any[]) => any);
46
+ children?: React.ReactNode | ((...args: any[]) => React.ReactNode);
45
47
  };
46
- export declare type PopoverProps = PopoverOwnProps & BidirectionalProps;
47
- //# sourceMappingURL=types.d.ts.map
48
+ declare type PopoverProps = PopoverOwnProps & BidirectionalProps;
49
+ declare type PropKeys = keyof PopoverOwnProps;
50
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
51
+ declare const propTypes: PropValidators<PropKeys>;
52
+ declare const allowedProps: AllowedPropKeys;
53
+ export type { PopoverProps };
54
+ export { propTypes, allowedProps };
55
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Popover/props.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,aAAK,eAAe,GAAG;IACrB,gBAAgB,C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C,SAAS,CAAC,CAAA;CACnE,CAAA;AAED,aAAK,YAAY,GAAG,eAAe,GAAG,kBAAkB,CAAA;AAExD,aAAK,QAAQ,GAAG,MAAM,eAAe,CAAA;AAErC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAiLvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAyCnB,CAAA;AAED,YAAY,EAAE,YAAY,EAAE,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
package/types/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { Popover } from './Popover';
2
- export type { PopoverProps } from './Popover/types';
2
+ export type { PopoverProps } from './Popover/props';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,79 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import type { Shadow, Stacking } from '@instructure/emotion'
26
- import React from 'react'
27
- import type {
28
- PlacementPropValues,
29
- PositionConstraint,
30
- PositionMountNode
31
- } from '@instructure/ui-position'
32
- import type { BidirectionalProps } from '@instructure/ui-i18n'
33
-
34
- export type PopoverOwnProps = {
35
- isShowingContent?: boolean
36
- defaultIsShowingContent?: boolean
37
- on?: ('click' | 'hover' | 'focus') | ('click' | 'hover' | 'focus')[]
38
- withArrow?: boolean
39
- color?: 'primary' | 'primary-inverse'
40
- shadow?: Shadow
41
- stacking?: Stacking
42
- contentRef?: (...args: any[]) => any
43
- defaultFocusElement?: React.ReactElement | ((...args: any[]) => any)
44
- screenReaderLabel?: string
45
- offsetX?: string | number
46
- offsetY?: string | number
47
- placement: PlacementPropValues
48
- constrain?: PositionConstraint
49
- mountNode?: PositionMountNode
50
- positionTarget?: PositionMountNode
51
- insertAt?: 'bottom' | 'top'
52
- liveRegion?:
53
- | React.ReactElement[]
54
- | React.ReactElement
55
- | ((...args: any[]) => any)
56
- id?: string
57
- shouldAlignArrow?: boolean
58
- shouldTrackPosition?: boolean
59
- shouldRenderOffscreen?: boolean
60
- shouldContainFocus?: boolean
61
- shouldReturnFocus?: boolean
62
- shouldCloseOnDocumentClick?: boolean
63
- shouldCloseOnEscape?: boolean
64
- shouldFocusContentOnTriggerBlur?: boolean
65
- onShowContent?: (...args: any[]) => any
66
- onHideContent?: (...args: any[]) => any
67
- onPositioned?: (...args: any[]) => any
68
- onPositionChanged?: (...args: any[]) => any
69
- onClick?: (...args: any[]) => any
70
- onFocus?: (...args: any[]) => any
71
- onBlur?: (...args: any[]) => any
72
- onKeyDown?: (...args: any[]) => any
73
- onKeyUp?: (...args: any[]) => any
74
- onMouseOver?: (...args: any[]) => any
75
- onMouseOut?: (...args: any[]) => any
76
- renderTrigger?: React.ReactNode | ((...args: any[]) => any)
77
- }
78
-
79
- export type PopoverProps = PopoverOwnProps & BidirectionalProps
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Popover/types.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,oBAAY,eAAe,GAAG;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,EAAE,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;IACpE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,iBAAiB,CAAA;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAAA;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,SAAS,EAAE,mBAAmB,CAAA;IAC9B,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC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