@vertexvis/ui 0.0.16-canary.0 → 0.1.0-testing.1
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/{icon-092d8624.js → icon-53d62a46.js} +1 -1
- package/dist/cjs/{icon-button-0671f42e.js → icon-button-5e74c757.js} +1 -1
- package/dist/cjs/{icon-helper-546f9a04.js → icon-helper-caf2699e.js} +2 -2
- package/dist/cjs/index.cjs.js +13 -11
- 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-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
- 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/icon/icons/invert.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-73e2e8f4.js → p-17b97932.js} +1 -1
- package/dist/components/p-19318fee.entry.js +1 -0
- package/dist/components/p-2d065b0a.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-79fd6fb6.entry.js +1 -0
- package/dist/components/p-7b75e004.js +1 -0
- package/dist/components/{p-ddb5a066.js → p-94168b92.js} +1 -1
- package/dist/components/p-9c384f6c.entry.js +1 -0
- package/dist/components/p-ae6a3c46.entry.js +1 -0
- package/dist/components/{p-76ef57b9.js → p-afd1c978.js} +1 -1
- 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/{icon-a2d4cafb.js → icon-2630793d.js} +1 -1
- package/dist/esm/{icon-button-53bc2b56.js → icon-button-3000a0dc.js} +1 -1
- package/dist/esm/{icon-helper-aa2001ba.js → icon-helper-10a99d95.js} +2 -2
- package/dist/esm/index.js +13 -11
- 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-icon-button.entry.js +2 -2
- package/dist/esm/vertex-icon.entry.js +2 -2
- 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-30f5b948.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-dd94aaef.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,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/******************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */
|
|
17
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
18
|
+
|
|
19
|
+
var extendStatics = function(d, b) {
|
|
20
|
+
extendStatics = Object.setPrototypeOf ||
|
|
21
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
22
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
23
|
+
return extendStatics(d, b);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
function __extends(d, b) {
|
|
27
|
+
if (typeof b !== "function" && b !== null)
|
|
28
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
29
|
+
extendStatics(d, b);
|
|
30
|
+
function __() { this.constructor = d; }
|
|
31
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.__assign = function() {
|
|
35
|
+
exports.__assign = Object.assign || function __assign(t) {
|
|
36
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37
|
+
s = arguments[i];
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39
|
+
}
|
|
40
|
+
return t;
|
|
41
|
+
};
|
|
42
|
+
return exports.__assign.apply(this, arguments);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
function __read(o, n) {
|
|
46
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
47
|
+
if (!m) return o;
|
|
48
|
+
var i = m.call(o), r, ar = [], e;
|
|
49
|
+
try {
|
|
50
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
51
|
+
}
|
|
52
|
+
catch (error) { e = { error: error }; }
|
|
53
|
+
finally {
|
|
54
|
+
try {
|
|
55
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
56
|
+
}
|
|
57
|
+
finally { if (e) throw e.error; }
|
|
58
|
+
}
|
|
59
|
+
return ar;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
63
|
+
var e = new Error(message);
|
|
64
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.__extends = __extends;
|
|
68
|
+
exports.__read = __read;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const autoResizeTextarea = require('./auto-resize-textarea-
|
|
5
|
+
const autoResizeTextarea = require('./auto-resize-textarea-deb05359.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
|
+
require('./slots-fb5ac359.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const draggablePopover = require('./draggable-popover-
|
|
5
|
+
const draggablePopover = require('./draggable-popover-edf23d3a.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const iconButton = require('./icon-button-
|
|
5
|
+
const iconButton = require('./icon-button-5e74c757.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-caf2699e.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const icon = require('./icon-
|
|
5
|
+
const icon = require('./icon-53d62a46.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-caf2699e.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const resultList = require('./result-list-
|
|
5
|
+
const resultList = require('./result-list-1e592c3c.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./templates-
|
|
8
|
+
require('./templates-e7b3ffbb.js');
|
|
9
|
+
require('./tslib.es6-838fd860.js');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const searchBar = require('./search-bar-
|
|
5
|
+
const searchBar = require('./search-bar-bb40cfa7.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./templates-
|
|
8
|
+
require('./templates-e7b3ffbb.js');
|
|
9
|
+
require('./tslib.es6-838fd860.js');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const tooltip = require('./tooltip-
|
|
5
|
+
const tooltip = require('./tooltip-31b596f5.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
|
+
require('./tslib.es6-838fd860.js');
|
|
7
8
|
require('./index-e1b40fa6.js');
|
|
9
|
+
require('./slots-fb5ac359.js');
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
|
|
@@ -59,16 +59,11 @@ export class DraggablePopover {
|
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
61
|
return (h("vertex-popover", { position: this.anchorPosition, boundarySelector: this.boundarySelector, backdrop: false, open: true, resizeBehavior: "fixed", updateOnResize: !this.dragging, overflowBehavior: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
tether: false,
|
|
65
|
-
padding: this.boundaryPadding,
|
|
66
|
-
},
|
|
62
|
+
altBoundary: true,
|
|
63
|
+
padding: this.boundaryPadding,
|
|
67
64
|
}, flipBehavior: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
flipVariations: false,
|
|
71
|
-
},
|
|
65
|
+
fallbackPlacements: [],
|
|
66
|
+
fallbackStrategy: 'initialPlacement',
|
|
72
67
|
} }, h("div", { ref: (el) => (this.containerEl = el), class: classNames('container', { dragging: this.dragging }) }, h("div", { class: "icon-container" }, h("div", { class: "icon", onPointerDown: this.handlePointerDown }, h("slot", { name: "drag-icon" }, h("vertex-icon", { size: "sm", name: "drag-indicator" })))), h("slot", null))));
|
|
73
68
|
}
|
|
74
69
|
static get is() { return "vertex-draggable-popover"; }
|
|
@@ -47,7 +47,7 @@ export class DropdownMenu {
|
|
|
47
47
|
"mutable": false,
|
|
48
48
|
"complexType": {
|
|
49
49
|
"original": "PopoverPlacement",
|
|
50
|
-
"resolved": "\"
|
|
50
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
51
51
|
"references": {
|
|
52
52
|
"PopoverPlacement": {
|
|
53
53
|
"location": "import",
|
|
@@ -57,7 +57,7 @@ export class HelpTooltip {
|
|
|
57
57
|
"mutable": false,
|
|
58
58
|
"complexType": {
|
|
59
59
|
"original": "PopoverPlacement",
|
|
60
|
-
"resolved": "\"
|
|
60
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
61
61
|
"references": {
|
|
62
62
|
"PopoverPlacement": {
|
|
63
63
|
"location": "import",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
-
export const Invert = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "invert" }, h("g", { transform: "translate(3.5, 2.2)" }, h("path", { d: "M11,7H8V0.6a.5.5,0,0,0-1,0V7H4l3.5,5Zm2.5,
|
|
2
|
+
export const Invert = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "invert" }, h("g", { transform: "translate(3.5, 2.2)" }, h("path", { d: "M11,7H8V0.6a.5.5,0,0,0-1,0V7H4l3.5,5Zm2.5,4" })), h("g", { transform: "translate(-2.5, -0.2)" }, h("path", { d: "M7,14a.5.5,0,0,0,1,0V7.5h3l-3.5-5L4,7.5H7Zm6.5-1" }))));
|
|
@@ -8,6 +8,7 @@ export class Menu {
|
|
|
8
8
|
this.fallbackPlacements = undefined;
|
|
9
9
|
this.backdrop = true;
|
|
10
10
|
this.position = undefined;
|
|
11
|
+
this.popoverProps = undefined;
|
|
11
12
|
this.handlePopoverDismiss = this.handlePopoverDismiss.bind(this);
|
|
12
13
|
}
|
|
13
14
|
componentDidLoad() {
|
|
@@ -21,13 +22,13 @@ export class Menu {
|
|
|
21
22
|
this.removeEventListeners();
|
|
22
23
|
}
|
|
23
24
|
render() {
|
|
24
|
-
return (h("vertex-popover", { ref: (element) => {
|
|
25
|
+
return (h("vertex-popover", Object.assign({ ref: (element) => {
|
|
25
26
|
this.popoverRef = element;
|
|
26
27
|
}, open: this.open, animated: this.animated, position: this.position, placement: this.placement, backdrop: this.backdrop, flipBehavior: this.fallbackPlacements != null
|
|
27
28
|
? {
|
|
28
|
-
|
|
29
|
+
fallbackPlacements: this.fallbackPlacements,
|
|
29
30
|
}
|
|
30
|
-
: undefined }, this.position == null && (h("div", { slot: "anchor" }, h("slot", { name: "anchor" }))), h("div", { onClick: () => {
|
|
31
|
+
: undefined }, this.popoverProps), this.position == null && (h("div", { slot: "anchor" }, h("slot", { name: "anchor" }))), h("div", { onClick: () => {
|
|
31
32
|
this.open = false;
|
|
32
33
|
this.menuClosed.emit();
|
|
33
34
|
}, class: classNames('root', {
|
|
@@ -101,7 +102,7 @@ export class Menu {
|
|
|
101
102
|
"mutable": false,
|
|
102
103
|
"complexType": {
|
|
103
104
|
"original": "PopoverPlacement",
|
|
104
|
-
"resolved": "\"
|
|
105
|
+
"resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\" | undefined",
|
|
105
106
|
"references": {
|
|
106
107
|
"PopoverPlacement": {
|
|
107
108
|
"location": "import",
|
|
@@ -175,6 +176,29 @@ export class Menu {
|
|
|
175
176
|
"tags": [],
|
|
176
177
|
"text": "Point provided to the Popover component to\ndetermine fixed placement of a menu."
|
|
177
178
|
}
|
|
179
|
+
},
|
|
180
|
+
"popoverProps": {
|
|
181
|
+
"type": "unknown",
|
|
182
|
+
"mutable": false,
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "Partial<Popover>",
|
|
185
|
+
"resolved": "undefined | ({ open?: boolean | undefined; placement?: Placement | undefined; position?: string | Point | undefined; anchorBounds?: Pick<DOMRect, \"height\" | \"width\" | \"x\" | \"y\"> | undefined; backdrop?: boolean | undefined; animated?: boolean | undefined; anchorSelector?: string | undefined; boundarySelector?: string | undefined; resizeBehavior?: PopoverResizeBehavior | undefined; overflowBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; boundary?: Boundary | undefined; } | undefined; flipBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; crossAxis?: boolean | undefined; mainAxis?: boolean | undefined; fallbackPlacements?: Placement[] | undefined; fallbackStrategy?: \"bestFit\" | \"initialPlacement\" | undefined; fallbackAxisSideDirection?: \"none\" | \"start\" | \"end\" | undefined; flipAlignment?: boolean | undefined; boundary?: Boundary | undefined; } | undefined; offsetBehavior?: OffsetOptions | undefined; updateOnResize?: boolean | undefined; dismissed?: EventEmitter<void> | undefined; connectedCallback?: (() => void) | undefined; componentDidUpdate?: (() => void) | undefined; componentDidLoad?: (() => void) | undefined; disconnectedCallback?: (() => void) | undefined; updatePosition?: ((position?: string | Point | undefined) => void) | undefined; updatePlacement?: (() => void) | undefined; updateOpened?: ((open?: boolean | undefined) => void) | undefined; updateAnimated?: (() => void) | undefined; updateMiddleware?: (() => void) | undefined; setWindow?: ((partialWindow: Pick<Window, \"innerHeight\" | \"innerWidth\">) => void) | undefined; render?: (() => IntrinsicElements) | undefined; })",
|
|
186
|
+
"references": {
|
|
187
|
+
"Partial": {
|
|
188
|
+
"location": "global"
|
|
189
|
+
},
|
|
190
|
+
"Popover": {
|
|
191
|
+
"location": "import",
|
|
192
|
+
"path": "../popover/popover"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"required": false,
|
|
197
|
+
"optional": true,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": ""
|
|
201
|
+
}
|
|
178
202
|
}
|
|
179
203
|
};
|
|
180
204
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { detectOverflow, flip, offset, shift, } from '@floating-ui/dom';
|
|
2
|
+
export function getDefaultMiddleware(offsetOptions, overflowOptions, flipOptions) {
|
|
3
|
+
const isMiddleware = (v) => typeof v !== 'boolean';
|
|
4
|
+
return [
|
|
5
|
+
offsetOptions != null ? offset(offsetOptions) : offset(4),
|
|
6
|
+
overflowOptions == null && flip(flipOptions),
|
|
7
|
+
shift(),
|
|
8
|
+
overflowOptions != null && preventOverflow(overflowOptions),
|
|
9
|
+
].filter(isMiddleware);
|
|
10
|
+
}
|
|
11
|
+
export function preventOverflow(overflowOptions) {
|
|
12
|
+
return {
|
|
13
|
+
name: 'boundaryContain',
|
|
14
|
+
fn: async (state) => {
|
|
15
|
+
const overflow = await detectOverflow(state, overflowOptions);
|
|
16
|
+
const leftOverflow = overflow.left > 0 ? overflow.left : 0;
|
|
17
|
+
const rightOverflow = overflow.right > 0 ? overflow.right : 0;
|
|
18
|
+
const topOverflow = overflow.top > 0 ? overflow.top : 0;
|
|
19
|
+
const bottomOverflow = overflow.bottom > 0 ? overflow.bottom : 0;
|
|
20
|
+
return {
|
|
21
|
+
x: state.x + leftOverflow - rightOverflow,
|
|
22
|
+
y: state.y + topOverflow - bottomOverflow,
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|