@vertexvis/ui 0.0.16-canary.0 → 0.1.0-testing.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.
- package/dist/cjs/{auto-resize-textarea-56a57fd3.js → auto-resize-textarea-deb05359.js} +2 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{draggable-popover-ee0db70b.js → draggable-popover-edf23d3a.js} +4 -9
- package/dist/cjs/index.cjs.js +10 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{menu-0579351b.js → menu-d1ecf43b.js} +4 -3
- package/dist/cjs/popover-d9ec8e10.js +1684 -0
- package/dist/cjs/{result-list-77ba2fa9.js → result-list-1e592c3c.js} +1 -1
- package/dist/cjs/{search-bar-81ca45b3.js → search-bar-bb40cfa7.js} +1 -1
- package/dist/cjs/slots-fb5ac359.js +29 -0
- package/dist/cjs/{templates-4e22ccc0.js → templates-e7b3ffbb.js} +3 -32
- package/dist/cjs/tooltip-31b596f5.js +2152 -0
- package/dist/cjs/tslib.es6-838fd860.js +68 -0
- package/dist/cjs/vertex-auto-resize-textarea.cjs.entry.js +2 -1
- package/dist/cjs/vertex-draggable-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-menu.cjs.entry.js +1 -1
- package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-result-list.cjs.entry.js +3 -2
- package/dist/cjs/vertex-search-bar.cjs.entry.js +3 -2
- package/dist/cjs/vertex-tooltip.cjs.entry.js +3 -1
- package/dist/collection/components/draggable-popover/draggable-popover.js +4 -9
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/collection/components/help-tooltip/help-tooltip.js +1 -1
- package/dist/collection/components/menu/menu.js +28 -4
- package/dist/collection/components/popover/middleware.js +26 -0
- package/dist/collection/components/popover/popover.css +1 -1
- package/dist/collection/components/popover/popover.js +147 -115
- package/dist/collection/components/popover/util.js +9 -0
- package/dist/collection/components/result-list/result-list.js +1 -1
- package/dist/collection/components/search-bar/search-bar.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +4 -0
- package/dist/collection/components/tooltip/tooltip.js +60 -4
- package/dist/collection/util/components/dom.js +10 -0
- package/dist/collection/util/components/slots.js +12 -0
- package/dist/components/components.css +1 -1
- package/dist/components/components.esm.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/p-0517ca62.entry.js +1 -0
- package/dist/components/p-1356f525.js +1 -0
- package/dist/components/p-19318fee.entry.js +1 -0
- package/dist/components/p-41a7564c.js +1 -0
- package/dist/components/{p-5a93c1b6.js → p-4224c2ad.js} +1 -1
- package/dist/components/p-45cfd66e.entry.js +1 -0
- package/dist/components/{p-60ca5d84.js → p-52739247.js} +1 -1
- package/dist/components/p-59032668.js +1 -0
- package/dist/components/p-6505cdb3.js +1 -0
- package/dist/components/p-7b75e004.js +1 -0
- package/dist/components/p-9c384f6c.entry.js +1 -0
- package/dist/components/p-ae6a3c46.entry.js +1 -0
- package/dist/components/p-b2c7b113.js +1 -0
- package/dist/components/p-bec53c3a.js +1 -0
- package/dist/components/p-da0a7b57.js +1 -0
- package/dist/components/p-e576818b.entry.js +1 -0
- package/dist/components/p-e7336466.entry.js +1 -0
- package/dist/esm/{auto-resize-textarea-ac4b5f3b.js → auto-resize-textarea-087fecdb.js} +1 -13
- package/dist/esm/components.js +1 -1
- package/dist/esm/{draggable-popover-5f14cca5.js → draggable-popover-8ef3aec6.js} +4 -9
- package/dist/esm/index.js +10 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{menu-f35637ca.js → menu-daa7f9c9.js} +4 -3
- package/dist/esm/popover-67c88e4b.js +1682 -0
- package/dist/esm/{result-list-9c83f22a.js → result-list-36cfb08a.js} +1 -1
- package/dist/esm/{search-bar-600fb8d9.js → search-bar-59cc151d.js} +1 -1
- package/dist/esm/slots-fbb5afb3.js +26 -0
- package/dist/esm/{templates-51212dae.js → templates-797420bf.js} +1 -30
- package/dist/esm/tooltip-14b65fb5.js +2150 -0
- package/dist/esm/tslib.es6-99cd0de8.js +65 -0
- package/dist/esm/vertex-auto-resize-textarea.entry.js +2 -1
- package/dist/esm/vertex-draggable-popover.entry.js +1 -1
- package/dist/esm/vertex-menu.entry.js +1 -1
- package/dist/esm/vertex-popover.entry.js +1 -1
- package/dist/esm/vertex-result-list.entry.js +3 -2
- package/dist/esm/vertex-search-bar.entry.js +3 -2
- package/dist/esm/vertex-tooltip.entry.js +3 -1
- package/dist/types/components/menu/menu.d.ts +2 -1
- package/dist/types/components/popover/middleware.d.ts +3 -0
- package/dist/types/components/popover/popover.d.ts +39 -23
- package/dist/types/components/popover/util.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +10 -0
- package/dist/types/components.d.ts +31 -15
- package/dist/types/util/components/dom.d.ts +3 -0
- package/dist/types/util/components/slots.d.ts +1 -0
- package/package.json +5 -4
- package/dist/cjs/popover-34e1a386.js +0 -2029
- package/dist/cjs/tooltip-afebbca8.js +0 -46
- package/dist/components/p-0ec0a007.entry.js +0 -1
- package/dist/components/p-4226645b.js +0 -1
- package/dist/components/p-58f8a354.js +0 -1
- package/dist/components/p-7c31f30e.js +0 -1
- package/dist/components/p-852be06f.js +0 -1
- package/dist/components/p-8764954b.js +0 -1
- package/dist/components/p-939391df.entry.js +0 -1
- package/dist/components/p-990852f6.entry.js +0 -1
- package/dist/components/p-a1d160cc.entry.js +0 -1
- package/dist/components/p-c8df41df.entry.js +0 -1
- package/dist/components/p-e8e6ee3f.js +0 -1
- package/dist/components/p-eff16591.entry.js +0 -1
- package/dist/components/p-f98b2ecb.entry.js +0 -1
- package/dist/esm/popover-4375db1b.js +0 -2027
- package/dist/esm/tooltip-e78d2c7a.js +0 -44
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
16
|
+
|
|
17
|
+
var extendStatics = function(d, b) {
|
|
18
|
+
extendStatics = Object.setPrototypeOf ||
|
|
19
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
20
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
21
|
+
return extendStatics(d, b);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function __extends(d, b) {
|
|
25
|
+
if (typeof b !== "function" && b !== null)
|
|
26
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
27
|
+
extendStatics(d, b);
|
|
28
|
+
function __() { this.constructor = d; }
|
|
29
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var __assign = function() {
|
|
33
|
+
__assign = Object.assign || function __assign(t) {
|
|
34
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
35
|
+
s = arguments[i];
|
|
36
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
37
|
+
}
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
return __assign.apply(this, arguments);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function __read(o, n) {
|
|
44
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
45
|
+
if (!m) return o;
|
|
46
|
+
var i = m.call(o), r, ar = [], e;
|
|
47
|
+
try {
|
|
48
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
49
|
+
}
|
|
50
|
+
catch (error) { e = { error: error }; }
|
|
51
|
+
finally {
|
|
52
|
+
try {
|
|
53
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
54
|
+
}
|
|
55
|
+
finally { if (e) throw e.error; }
|
|
56
|
+
}
|
|
57
|
+
return ar;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
61
|
+
var e = new Error(message);
|
|
62
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { __extends as _, __read as a, __assign as b };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { R as vertex_result_list } from './result-list-
|
|
1
|
+
export { R as vertex_result_list } from './result-list-36cfb08a.js';
|
|
2
2
|
import './index-72f28b71.js';
|
|
3
3
|
import './index-9c609209.js';
|
|
4
|
-
import './templates-
|
|
4
|
+
import './templates-797420bf.js';
|
|
5
|
+
import './tslib.es6-99cd0de8.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { S as vertex_search_bar } from './search-bar-
|
|
1
|
+
export { S as vertex_search_bar } from './search-bar-59cc151d.js';
|
|
2
2
|
import './index-72f28b71.js';
|
|
3
3
|
import './index-9c609209.js';
|
|
4
|
-
import './templates-
|
|
4
|
+
import './templates-797420bf.js';
|
|
5
|
+
import './tslib.es6-99cd0de8.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from '../../stencil-public-runtime';
|
|
2
2
|
import { Point } from '../../types/point';
|
|
3
|
-
import { PopoverPlacement } from '../popover/popover';
|
|
3
|
+
import { Popover, PopoverPlacement } from '../popover/popover';
|
|
4
4
|
export declare class Menu {
|
|
5
5
|
/**
|
|
6
6
|
* Whether this menu is animated on open
|
|
@@ -33,6 +33,7 @@ export declare class Menu {
|
|
|
33
33
|
* determine fixed placement of a menu.
|
|
34
34
|
*/
|
|
35
35
|
position?: Point;
|
|
36
|
+
popoverProps?: Partial<Popover>;
|
|
36
37
|
/**
|
|
37
38
|
* Emitted when the menu is closed.
|
|
38
39
|
*/
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DetectOverflowOptions, FlipOptions, Middleware, OffsetOptions } from '@floating-ui/dom';
|
|
2
|
+
export declare function getDefaultMiddleware(offsetOptions?: OffsetOptions, overflowOptions?: DetectOverflowOptions, flipOptions?: FlipOptions): Middleware[];
|
|
3
|
+
export declare function preventOverflow(overflowOptions?: DetectOverflowOptions): Middleware;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Placement } from '@
|
|
2
|
-
import { FlipModifier } from '@popperjs/core/lib/modifiers/flip';
|
|
3
|
-
import { PreventOverflowModifier } from '@popperjs/core/lib/modifiers/preventOverflow';
|
|
1
|
+
import { DetectOverflowOptions, FlipOptions, OffsetOptions, Placement } from '@floating-ui/dom';
|
|
4
2
|
import { EventEmitter, h } from '../../stencil-public-runtime';
|
|
5
3
|
import { Point } from '../../types/point';
|
|
6
4
|
export type PopoverPlacement = Placement;
|
|
7
5
|
export type PopoverResizeBehavior = 'fixed' | 'dynamic';
|
|
8
|
-
export type PopoverOverflowBehavior = Pick<Partial<PreventOverflowModifier>, 'enabled' | 'options'>;
|
|
9
|
-
export type PopoverFlipBehavior = Pick<Partial<FlipModifier>, 'enabled' | 'options'>;
|
|
10
6
|
export declare class Popover {
|
|
11
7
|
/**
|
|
12
8
|
* Whether this popover's content is visible.
|
|
@@ -19,8 +15,7 @@ export declare class Popover {
|
|
|
19
15
|
* 'top', 'top-start', 'top-end',
|
|
20
16
|
* 'bottom', 'bottom-start', 'bottom-end',
|
|
21
17
|
* 'right', 'right-start', 'right-end',
|
|
22
|
-
* 'left', 'left-start', 'left-end',
|
|
23
|
-
* 'auto', 'auto-start', or 'auto-end', and
|
|
18
|
+
* 'left', 'left-start', 'left-end', and
|
|
24
19
|
* defaults to 'bottom-start'.
|
|
25
20
|
*
|
|
26
21
|
* Note: placement will adjust based on the amount
|
|
@@ -32,6 +27,14 @@ export declare class Popover {
|
|
|
32
27
|
* The position of the popover anchor.
|
|
33
28
|
*/
|
|
34
29
|
position?: Point | string;
|
|
30
|
+
/**
|
|
31
|
+
* An optional DOMRect that represents the virtual location of the
|
|
32
|
+
* anchor element. When provided, the popover will position based
|
|
33
|
+
* on the specified bounds to give a similar behavior to the
|
|
34
|
+
* `anchorSelector` or `anchor` slot based popovers without needing
|
|
35
|
+
* to provide the element itself.
|
|
36
|
+
*/
|
|
37
|
+
anchorBounds?: Pick<DOMRect, 'x' | 'y' | 'width' | 'height'>;
|
|
35
38
|
/**
|
|
36
39
|
* Whether to show a backdrop that dismisses this popover.
|
|
37
40
|
* Defaults to true, and is invisible, but can be styled.
|
|
@@ -74,25 +77,37 @@ export declare class Popover {
|
|
|
74
77
|
/**
|
|
75
78
|
* The `overflowBehavior` prop can be provided to customize the
|
|
76
79
|
* popover's behavior when approaching its boundary. This maps
|
|
77
|
-
* to the behavior used internally with
|
|
78
|
-
* See https://
|
|
80
|
+
* to the behavior used internally with FloatingUI.
|
|
81
|
+
* See https://floating-ui.com/docs/detectOverflow#options
|
|
79
82
|
* for info on what properties can be specified.
|
|
80
83
|
*
|
|
81
84
|
* If a `boundarySelector` is provided, it will be automatically
|
|
82
85
|
* added to the set of options.
|
|
83
86
|
*/
|
|
84
|
-
overflowBehavior?:
|
|
87
|
+
overflowBehavior?: DetectOverflowOptions;
|
|
85
88
|
/**
|
|
86
89
|
* The `flipBehavior` prop can be provided to customize the
|
|
87
90
|
* popover's behavior when approaching its boundary. This maps
|
|
88
|
-
* to the behavior used internally with
|
|
89
|
-
* See https://
|
|
91
|
+
* to the behavior used internally with FloatingUI.
|
|
92
|
+
* See https://floating-ui.com/docs/flip#options
|
|
90
93
|
* for info on what properties can be specified.
|
|
91
94
|
*
|
|
92
95
|
* If a `boundarySelector` is provided, `flip` behavior will
|
|
93
96
|
* automatically be disabled.
|
|
94
97
|
*/
|
|
95
|
-
flipBehavior?:
|
|
98
|
+
flipBehavior?: FlipOptions;
|
|
99
|
+
/**
|
|
100
|
+
* The `offsetBehavior` prop can be provided to customize the
|
|
101
|
+
* popover's visual offset from the anchor. This maps
|
|
102
|
+
* to the behavior used internally with FloatingUI.
|
|
103
|
+
* See https://floating-ui.com/docs/offset#options
|
|
104
|
+
* for info on what properties can be specified.
|
|
105
|
+
*
|
|
106
|
+
* If no offset is specified, a default of 4px will be used
|
|
107
|
+
* for popovers anchored to an element and no offset will be
|
|
108
|
+
* applied for popovers anchored to a point.
|
|
109
|
+
*/
|
|
110
|
+
offsetBehavior?: OffsetOptions;
|
|
96
111
|
/**
|
|
97
112
|
* Indicates if the position of the popover should be updated when the
|
|
98
113
|
* popover's content size changes.
|
|
@@ -102,38 +117,39 @@ export declare class Popover {
|
|
|
102
117
|
* Emitted whenever the popover is dismissed.
|
|
103
118
|
*/
|
|
104
119
|
dismissed: EventEmitter<void>;
|
|
120
|
+
private opened;
|
|
121
|
+
private computedPlacement;
|
|
105
122
|
private hostElement;
|
|
106
|
-
private popperRendered;
|
|
107
123
|
private wrapperRef?;
|
|
108
124
|
private anchorPointRef?;
|
|
109
125
|
private anchorPosition?;
|
|
110
|
-
private popper?;
|
|
111
126
|
private viewportWidth?;
|
|
112
127
|
private viewportHeight?;
|
|
113
128
|
private resizeTimeout?;
|
|
114
|
-
private
|
|
115
|
-
private
|
|
129
|
+
private shouldUpdatePosition;
|
|
130
|
+
private updateDispose?;
|
|
131
|
+
private middleware;
|
|
116
132
|
private partialWindow;
|
|
117
133
|
constructor();
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
|
-
contentResizeObserverFactory: (cb: (entries: ResizeObserverEntry[]) => void) => ResizeObserver;
|
|
122
134
|
connectedCallback(): void;
|
|
123
135
|
componentDidUpdate(): void;
|
|
124
136
|
componentDidLoad(): void;
|
|
125
137
|
disconnectedCallback(): void;
|
|
126
138
|
updatePosition(position?: Point | string): void;
|
|
139
|
+
updatePlacement(): void;
|
|
127
140
|
updateOpened(open?: boolean): void;
|
|
128
141
|
updateAnimated(): void;
|
|
142
|
+
updateMiddleware(): void;
|
|
129
143
|
/**
|
|
130
144
|
* @private Used for internals or testing.
|
|
131
145
|
*/
|
|
132
146
|
setWindow(partialWindow: Pick<Window, 'innerWidth' | 'innerHeight'>): void;
|
|
133
147
|
render(): h.JSX.IntrinsicElements;
|
|
134
|
-
private
|
|
135
|
-
private
|
|
148
|
+
private updateListener;
|
|
149
|
+
private handlePositionUpdate;
|
|
150
|
+
private handleMiddlewareChange;
|
|
136
151
|
private getSlottedAnchorElement;
|
|
152
|
+
private getAnchorBoundsVirtualElement;
|
|
137
153
|
private handleResize;
|
|
138
154
|
private updateViewport;
|
|
139
155
|
private getTransformClass;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ComputePositionReturn, Middleware, Placement, ReferenceElement } from '@floating-ui/dom';
|
|
2
|
+
export declare function computeUpdatedPosition(referenceElement: ReferenceElement, contentElement: HTMLElement, placement: Placement, middleware: Middleware[]): Promise<ComputePositionReturn>;
|
|
@@ -37,10 +37,20 @@ export declare class Tooltip {
|
|
|
37
37
|
* Defaults to true.
|
|
38
38
|
*/
|
|
39
39
|
animated: boolean;
|
|
40
|
+
hostElement: HTMLElement;
|
|
40
41
|
private open;
|
|
42
|
+
private tooltipId;
|
|
41
43
|
private openTimeout?;
|
|
44
|
+
private targetElement?;
|
|
45
|
+
private contentElement?;
|
|
46
|
+
private displayedSlottedContent?;
|
|
42
47
|
constructor();
|
|
48
|
+
disconnectedCallback(): void;
|
|
43
49
|
render(): h.JSX.IntrinsicElements;
|
|
50
|
+
private addElement;
|
|
51
|
+
private removeElement;
|
|
52
|
+
private createPopoverElement;
|
|
53
|
+
private createContentElement;
|
|
44
54
|
private handlePointerEnter;
|
|
45
55
|
private handlePointerLeave;
|
|
46
56
|
private clearOpenTimeout;
|
|
@@ -12,11 +12,12 @@ import { ChipColor, ChipVariant } from "./components/chip/chip";
|
|
|
12
12
|
import { InputChangeEventDetail, TextSize } from "./components/text-field/text-field";
|
|
13
13
|
import { SelectionChangedDetails } from "./components/color-circle-picker/color-circle-picker";
|
|
14
14
|
import { Point } from "./types/point";
|
|
15
|
-
import { PopoverPlacement } from "./components/popover/popover";
|
|
15
|
+
import { Popover, PopoverPlacement } from "./components/popover/popover";
|
|
16
16
|
import { VertexExpandableType } from "./components/expandable/expandable";
|
|
17
17
|
import { IconName, IconSize } from "./types/icon";
|
|
18
18
|
import { IconButtonIconColor, IconButtonVariant } from "./components/icon-button/icon-button";
|
|
19
|
-
import {
|
|
19
|
+
import { PopoverPlacement as PopoverPlacement1, PopoverResizeBehavior } from "./components/popover/popover";
|
|
20
|
+
import { DetectOverflowOptions, FlipOptions, OffsetOptions } from "@floating-ui/dom";
|
|
20
21
|
import { RadioChangeEventDetail } from "./components/radio/radio";
|
|
21
22
|
import { HorizontalDragDirection, ResizableBoundsUpdate, ResizeEventDetails, VerticalDragDirection } from "./components/resizable/resizable";
|
|
22
23
|
import { Result } from "./components/result-list/result-list";
|
|
@@ -395,6 +396,7 @@ export namespace Components {
|
|
|
395
396
|
* When menu is placed relative to an anchor, popover will use this placement.
|
|
396
397
|
*/
|
|
397
398
|
"placement"?: PopoverPlacement;
|
|
399
|
+
"popoverProps"?: Partial<Popover>;
|
|
398
400
|
/**
|
|
399
401
|
* Point provided to the Popover component to determine fixed placement of a menu.
|
|
400
402
|
*/
|
|
@@ -409,6 +411,10 @@ export namespace Components {
|
|
|
409
411
|
"disabled": boolean;
|
|
410
412
|
}
|
|
411
413
|
interface VertexPopover {
|
|
414
|
+
/**
|
|
415
|
+
* An optional DOMRect that represents the virtual location of the anchor element. When provided, the popover will position based on the specified bounds to give a similar behavior to the `anchorSelector` or `anchor` slot based popovers without needing to provide the element itself.
|
|
416
|
+
*/
|
|
417
|
+
"anchorBounds"?: Pick<DOMRect, 'x' | 'y' | 'width' | 'height'>;
|
|
412
418
|
/**
|
|
413
419
|
* An optional selector to retrieve the anchor element. If a selector is not provided, this popover will attempt to use HTMLSlotElement.assignedElements() to retrieve the anchor element.
|
|
414
420
|
*/
|
|
@@ -425,23 +431,24 @@ export namespace Components {
|
|
|
425
431
|
* An optional selector for the boundary of this popover. If not specified, this will default to `clippingParents`. See https://popper.js.org/docs/v2/utils/detect-overflow/#boundary for additional details.
|
|
426
432
|
*/
|
|
427
433
|
"boundarySelector"?: string;
|
|
428
|
-
"contentResizeObserverFactory": (
|
|
429
|
-
cb: (entries: ResizeObserverEntry[]) => void
|
|
430
|
-
) => ResizeObserver;
|
|
431
434
|
/**
|
|
432
|
-
* The `flipBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with
|
|
435
|
+
* The `flipBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/flip#options for info on what properties can be specified. If a `boundarySelector` is provided, `flip` behavior will automatically be disabled.
|
|
436
|
+
*/
|
|
437
|
+
"flipBehavior"?: FlipOptions;
|
|
438
|
+
/**
|
|
439
|
+
* The `offsetBehavior` prop can be provided to customize the popover's visual offset from the anchor. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/offset#options for info on what properties can be specified. If no offset is specified, a default of 4px will be used for popovers anchored to an element and no offset will be applied for popovers anchored to a point.
|
|
433
440
|
*/
|
|
434
|
-
"
|
|
441
|
+
"offsetBehavior"?: OffsetOptions;
|
|
435
442
|
/**
|
|
436
443
|
* Whether this popover's content is visible.
|
|
437
444
|
*/
|
|
438
445
|
"open": boolean;
|
|
439
446
|
/**
|
|
440
|
-
* The `overflowBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with
|
|
447
|
+
* The `overflowBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/detectOverflow#options for info on what properties can be specified. If a `boundarySelector` is provided, it will be automatically added to the set of options.
|
|
441
448
|
*/
|
|
442
|
-
"overflowBehavior"?:
|
|
449
|
+
"overflowBehavior"?: DetectOverflowOptions;
|
|
443
450
|
/**
|
|
444
|
-
* The placement of the popover at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end',
|
|
451
|
+
* The placement of the popover at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', and defaults to 'bottom-start'. Note: placement will adjust based on the amount of available space, so popovers close to screen edges may appear in a different location.
|
|
445
452
|
*/
|
|
446
453
|
"placement": PopoverPlacement;
|
|
447
454
|
/**
|
|
@@ -1555,6 +1562,7 @@ declare namespace LocalJSX {
|
|
|
1555
1562
|
* When menu is placed relative to an anchor, popover will use this placement.
|
|
1556
1563
|
*/
|
|
1557
1564
|
"placement"?: PopoverPlacement;
|
|
1565
|
+
"popoverProps"?: Partial<Popover>;
|
|
1558
1566
|
/**
|
|
1559
1567
|
* Point provided to the Popover component to determine fixed placement of a menu.
|
|
1560
1568
|
*/
|
|
@@ -1569,6 +1577,10 @@ declare namespace LocalJSX {
|
|
|
1569
1577
|
"disabled"?: boolean;
|
|
1570
1578
|
}
|
|
1571
1579
|
interface VertexPopover {
|
|
1580
|
+
/**
|
|
1581
|
+
* An optional DOMRect that represents the virtual location of the anchor element. When provided, the popover will position based on the specified bounds to give a similar behavior to the `anchorSelector` or `anchor` slot based popovers without needing to provide the element itself.
|
|
1582
|
+
*/
|
|
1583
|
+
"anchorBounds"?: Pick<DOMRect, 'x' | 'y' | 'width' | 'height'>;
|
|
1572
1584
|
/**
|
|
1573
1585
|
* An optional selector to retrieve the anchor element. If a selector is not provided, this popover will attempt to use HTMLSlotElement.assignedElements() to retrieve the anchor element.
|
|
1574
1586
|
*/
|
|
@@ -1586,9 +1598,13 @@ declare namespace LocalJSX {
|
|
|
1586
1598
|
*/
|
|
1587
1599
|
"boundarySelector"?: string;
|
|
1588
1600
|
/**
|
|
1589
|
-
* The `flipBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with
|
|
1601
|
+
* The `flipBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/flip#options for info on what properties can be specified. If a `boundarySelector` is provided, `flip` behavior will automatically be disabled.
|
|
1602
|
+
*/
|
|
1603
|
+
"flipBehavior"?: FlipOptions;
|
|
1604
|
+
/**
|
|
1605
|
+
* The `offsetBehavior` prop can be provided to customize the popover's visual offset from the anchor. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/offset#options for info on what properties can be specified. If no offset is specified, a default of 4px will be used for popovers anchored to an element and no offset will be applied for popovers anchored to a point.
|
|
1590
1606
|
*/
|
|
1591
|
-
"
|
|
1607
|
+
"offsetBehavior"?: OffsetOptions;
|
|
1592
1608
|
/**
|
|
1593
1609
|
* Emitted whenever the popover is dismissed.
|
|
1594
1610
|
*/
|
|
@@ -1598,11 +1614,11 @@ declare namespace LocalJSX {
|
|
|
1598
1614
|
*/
|
|
1599
1615
|
"open"?: boolean;
|
|
1600
1616
|
/**
|
|
1601
|
-
* The `overflowBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with
|
|
1617
|
+
* The `overflowBehavior` prop can be provided to customize the popover's behavior when approaching its boundary. This maps to the behavior used internally with FloatingUI. See https://floating-ui.com/docs/detectOverflow#options for info on what properties can be specified. If a `boundarySelector` is provided, it will be automatically added to the set of options.
|
|
1602
1618
|
*/
|
|
1603
|
-
"overflowBehavior"?:
|
|
1619
|
+
"overflowBehavior"?: DetectOverflowOptions;
|
|
1604
1620
|
/**
|
|
1605
|
-
* The placement of the popover at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end',
|
|
1621
|
+
* The placement of the popover at the clicked point. This can be any of the following values: 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end', and defaults to 'bottom-start'. Note: placement will adjust based on the amount of available space, so popovers close to screen edges may appear in a different location.
|
|
1606
1622
|
*/
|
|
1607
1623
|
"placement"?: PopoverPlacement;
|
|
1608
1624
|
/**
|
|
@@ -4,3 +4,4 @@ export interface GetFirstSlottedElementProps {
|
|
|
4
4
|
selector?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function getFirstSlottedElement({ hostElement, slotName, selector, }: GetFirstSlottedElementProps): Element | undefined;
|
|
7
|
+
export declare function getSlottedContent(slotOrParentElement?: HTMLElement): Element | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertexvis/ui",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0-testing.0",
|
|
4
4
|
"description": "The Vertex UI component library.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -82,8 +82,9 @@
|
|
|
82
82
|
"workbox-build": "4.3.1"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@
|
|
86
|
-
"@types/faker": "^5.5.9"
|
|
85
|
+
"@floating-ui/dom": "^1.6.5",
|
|
86
|
+
"@types/faker": "^5.5.9",
|
|
87
|
+
"@vertexvis/utils": "^0.21.0"
|
|
87
88
|
},
|
|
88
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "94fd7078493f4514ebb702a0e1deb8c78a10f0dd"
|
|
89
90
|
}
|