@vertexvis/ui 0.1.0-canary.2 → 0.1.0-canary.20
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/{color-circle-picker-13396ec4.js → color-circle-picker-a8f9a80a.js} +1 -1
- package/dist/cjs/color-picker-2a4820fa.js +46 -0
- package/dist/cjs/{color-circle-05be54bf.js → color-swatch-8aaf6c0b.js} +42 -17
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/{dialog-88e2308a.js → dialog-34f1dd6e.js} +1 -1
- package/dist/cjs/dom-b6c5fbf4.js +13 -0
- package/dist/cjs/{icon-460fd0f5.js → icon-2a64c9ca.js} +1 -1
- package/dist/cjs/{icon-button-786427d6.js → icon-button-10617d04.js} +1 -1
- package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-e02da963.js} +55 -0
- package/dist/cjs/index.cjs.js +20 -14
- package/dist/cjs/lib-1bd1e383.js +9 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popover-d9ec8e10.js → popover-942209b8.js} +23 -1
- package/dist/cjs/{result-list-1e592c3c.js → result-list-241ffe8d.js} +46 -2
- package/dist/cjs/search-bar-2e7ee35a.js +527 -0
- package/dist/cjs/{select-0eb7203f.js → select-2b2bdb97.js} +27 -4
- package/dist/cjs/tab-4335cd8f.js +26 -0
- package/dist/cjs/tabs-ece62a01.js +111 -0
- package/dist/cjs/{text-field-0397fb34.js → text-field-bccbde1f.js} +1 -0
- package/dist/cjs/{tooltip-80a7b722.js → tooltip-9ac797a0.js} +59 -23
- package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
- package/dist/cjs/vertex-color-picker.cjs.entry.js +2 -1
- package/dist/cjs/vertex-color-swatch.cjs.entry.js +12 -0
- package/dist/cjs/vertex-dialog.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-popover.cjs.entry.js +1 -1
- package/dist/cjs/vertex-result-list.cjs.entry.js +1 -1
- package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/vertex-select.cjs.entry.js +1 -1
- package/dist/cjs/{vertex-color-circle.cjs.entry.js → vertex-tab.cjs.entry.js} +3 -2
- package/dist/cjs/vertex-tabs.cjs.entry.js +12 -0
- package/dist/cjs/vertex-textfield.cjs.entry.js +1 -1
- package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -1
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/color-circle-picker/color-circle-picker.js +7 -7
- package/dist/collection/components/color-picker/color-picker.css +95 -15
- package/dist/collection/components/color-picker/color-picker.js +57 -3
- package/dist/collection/components/color-swatch/color-swatch.css +43 -0
- package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js} +96 -23
- package/dist/collection/components/color-swatch/lib.js +5 -0
- package/dist/collection/components/dialog/dialog.css +0 -1
- package/dist/collection/components/icon/icon-helper.js +30 -0
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/icons/caution.js +2 -0
- package/dist/collection/components/icon/icons/compare.js +2 -0
- package/dist/collection/components/icon/icons/compress.js +2 -0
- package/dist/collection/components/icon/icons/cube-stack.js +2 -0
- package/dist/collection/components/icon/icons/expand.js +2 -0
- package/dist/collection/components/icon/icons/pin-text-square.js +2 -0
- package/dist/collection/components/icon/icons/plus-with-arrow.js +2 -0
- package/dist/collection/components/icon/icons/pmi.js +2 -0
- package/dist/collection/components/icon/icons/update.js +2 -0
- package/dist/collection/components/icon/icons/views.js +2 -0
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/index.js +3 -1
- package/dist/collection/components/menu/menu.js +1 -1
- package/dist/collection/components/popover/popover.js +51 -0
- package/dist/collection/components/result-list/result-list.js +52 -5
- package/dist/collection/components/result-list/types.js +1 -0
- package/dist/collection/components/search-bar/dom.js +29 -0
- package/dist/collection/components/search-bar/lib.js +76 -15
- package/dist/collection/components/search-bar/search-bar.css +0 -16
- package/dist/collection/components/search-bar/search-bar.js +429 -320
- package/dist/collection/components/select/select.css +24 -0
- package/dist/collection/components/select/select.js +49 -2
- package/dist/collection/components/tab/tab.css +16 -0
- package/dist/collection/components/tab/tab.js +85 -0
- package/dist/collection/components/tab/util.js +3 -0
- package/dist/collection/components/tabs/tabs.css +67 -0
- package/dist/collection/components/tabs/tabs.js +159 -0
- package/dist/collection/components/text-field/text-field.js +1 -0
- package/dist/collection/components/tooltip/tooltip.js +62 -18
- package/dist/collection/types/icon.js +10 -0
- package/dist/collection/util/templates/element-pool.js +19 -1
- 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-165aed7d.js → p-0d4a0d61.js} +1 -1
- package/dist/components/{p-9374ef6c.js → p-1367d3af.js} +1 -1
- package/dist/components/p-1d08dd79.entry.js +1 -0
- package/dist/components/p-22b31415.js +1 -0
- package/dist/components/p-2ae8175d.entry.js +1 -0
- package/dist/components/p-2b4aedaa.entry.js +1 -0
- package/dist/components/p-3438c441.js +1 -0
- package/dist/components/p-3dd7a75f.entry.js +1 -0
- package/dist/components/p-406e73da.entry.js +1 -0
- package/dist/components/p-4327deea.js +1 -0
- package/dist/components/p-43b1b3f9.js +1 -0
- package/dist/components/{p-103249b4.js → p-55cb5c21.js} +1 -1
- package/dist/components/p-606596de.entry.js +1 -0
- package/dist/components/p-655053df.js +1 -0
- package/dist/components/p-69496858.js +1 -0
- package/dist/components/p-6a49c365.entry.js +1 -0
- package/dist/components/p-6b6c2260.js +1 -0
- package/dist/components/p-6b862967.js +1 -0
- package/dist/components/p-76b961b8.js +1 -0
- package/dist/components/{p-ca52a423.js → p-87e1b90c.js} +1 -1
- package/dist/components/p-8bbc344d.entry.js +1 -0
- package/dist/components/p-96f55673.js +1 -0
- package/dist/components/p-a0eac69c.entry.js +1 -0
- package/dist/components/p-b4cc4527.entry.js +1 -0
- package/dist/components/p-c2706288.js +1 -0
- package/dist/components/p-d3d2a217.entry.js +1 -0
- package/dist/components/p-d3fd9ca3.entry.js +1 -0
- package/dist/components/p-d539f530.js +1 -0
- package/dist/components/p-e35057b5.entry.js +1 -0
- package/dist/components/p-ee496965.entry.js +1 -0
- package/dist/components/p-ff7c70b9.js +1 -0
- package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-e2a2cfb5.js} +1 -1
- package/dist/esm/color-picker-1d67effe.js +44 -0
- package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
- package/dist/esm/components.js +1 -1
- package/dist/esm/{dialog-e3f49527.js → dialog-1cef715c.js} +1 -1
- package/dist/esm/dom-613e2677.js +10 -0
- package/dist/esm/{icon-d37150b4.js → icon-66108b5e.js} +1 -1
- package/dist/esm/{icon-button-aad3c0e7.js → icon-button-69915979.js} +1 -1
- package/dist/esm/{icon-helper-83f10f73.js → icon-helper-c07c7052.js} +55 -0
- package/dist/esm/index.js +17 -13
- package/dist/esm/lib-73fbca8b.js +7 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
- package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
- package/dist/esm/search-bar-8d18626e.js +525 -0
- package/dist/esm/{select-75ed5653.js → select-78aeff96.js} +27 -4
- package/dist/esm/tab-c76332b0.js +24 -0
- package/dist/esm/tabs-8e5353ba.js +109 -0
- package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
- package/dist/esm/{tooltip-97c1b3ec.js → tooltip-29278ea4.js} +58 -22
- package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
- package/dist/esm/vertex-color-picker.entry.js +2 -1
- package/dist/esm/vertex-color-swatch.entry.js +4 -0
- package/dist/esm/vertex-dialog.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-popover.entry.js +1 -1
- package/dist/esm/vertex-result-list.entry.js +1 -1
- package/dist/esm/vertex-search-bar.entry.js +1 -1
- package/dist/esm/vertex-select.entry.js +1 -1
- package/dist/esm/vertex-tab.entry.js +3 -0
- package/dist/esm/vertex-tabs.entry.js +4 -0
- package/dist/esm/vertex-textfield.entry.js +1 -1
- package/dist/esm/vertex-tooltip.entry.js +2 -1
- package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
- package/dist/types/components/color-picker/color-picker.d.ts +19 -0
- package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
- package/dist/types/components/color-swatch/lib.d.ts +1 -0
- package/dist/types/components/icon/icons/caution.d.ts +3 -0
- package/dist/types/components/icon/icons/compare.d.ts +3 -0
- package/dist/types/components/icon/icons/compress.d.ts +3 -0
- package/dist/types/components/icon/icons/cube-stack.d.ts +3 -0
- package/dist/types/components/icon/icons/expand.d.ts +3 -0
- package/dist/types/components/icon/icons/pin-text-square.d.ts +3 -0
- package/dist/types/components/icon/icons/plus-with-arrow.d.ts +3 -0
- package/dist/types/components/icon/icons/pmi.d.ts +3 -0
- package/dist/types/components/icon/icons/update.d.ts +3 -0
- package/dist/types/components/icon/icons/views.d.ts +3 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/popover/popover.d.ts +7 -0
- package/dist/types/components/result-list/result-list.d.ts +6 -1
- package/dist/types/components/result-list/types.d.ts +4 -0
- package/dist/types/components/search-bar/dom.d.ts +8 -0
- package/dist/types/components/search-bar/lib.d.ts +31 -6
- package/dist/types/components/search-bar/search-bar.d.ts +125 -42
- package/dist/types/components/select/select.d.ts +8 -0
- package/dist/types/components/tab/tab.d.ts +11 -0
- package/dist/types/components/tab/util.d.ts +1 -0
- package/dist/types/components/tabs/tabs.d.ts +23 -0
- package/dist/types/components/tooltip/tooltip.d.ts +7 -0
- package/dist/types/components.d.ts +254 -96
- package/dist/types/types/icon.d.ts +10 -0
- package/dist/types/util/templates/element-pool.d.ts +10 -1
- package/package.json +4 -3
- package/dist/cjs/color-picker-876ace00.js +0 -37
- package/dist/cjs/search-bar-bb40cfa7.js +0 -290
- package/dist/collection/components/color-circle/color-circle.css +0 -18
- package/dist/components/p-03dbb28c.js +0 -1
- package/dist/components/p-0f8b9ede.entry.js +0 -1
- package/dist/components/p-19318fee.entry.js +0 -1
- package/dist/components/p-1d6cb015.entry.js +0 -1
- package/dist/components/p-209db2ba.entry.js +0 -1
- package/dist/components/p-20a74d5d.entry.js +0 -1
- package/dist/components/p-35e7ab78.entry.js +0 -1
- package/dist/components/p-4224c2ad.js +0 -1
- package/dist/components/p-52739247.js +0 -1
- package/dist/components/p-552c128f.js +0 -1
- package/dist/components/p-6505cdb3.js +0 -1
- package/dist/components/p-7dba2574.entry.js +0 -1
- package/dist/components/p-7f64b251.entry.js +0 -1
- package/dist/components/p-8434602f.js +0 -1
- package/dist/components/p-ae6a3c46.entry.js +0 -1
- package/dist/components/p-bd11e7d1.js +0 -1
- package/dist/components/p-d9b9aebe.js +0 -1
- package/dist/components/p-e576818b.entry.js +0 -1
- package/dist/components/p-ebabee40.entry.js +0 -1
- package/dist/components/p-f49a7ffd.js +0 -1
- package/dist/components/p-f71fc166.entry.js +0 -1
- package/dist/esm/color-picker-2e3b51fa.js +0 -35
- package/dist/esm/search-bar-59cc151d.js +0 -288
- package/dist/esm/vertex-color-circle.entry.js +0 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-6a92256c.js');
|
|
4
|
+
const index$1 = require('./index-e1b40fa6.js');
|
|
5
|
+
const dom = require('./dom-b6c5fbf4.js');
|
|
6
|
+
|
|
7
|
+
function isTabElement(element) {
|
|
8
|
+
return element.tagName === 'VERTEX-TAB';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const tabsCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{display:flex;position:relative;width:100%;height:100%}.wrapper{display:flex;flex-direction:column;position:relative;height:100%;width:100%}.labels{display:flex;position:relative;border-bottom:solid 1px var(--vertex-ui-neutral-300)}.indicator{position:absolute;bottom:0;height:3px;background-color:var(--vertex-ui-blue-700);transition:left 0.2s ease-in-out}.label{position:relative;cursor:pointer;color:var(--vertex-ui-neutral-700);white-space:nowrap;font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-md);padding:0.75rem 1.25rem}.label:not(.active):hover{color:var(--vertex-ui-neutral-800)}.label.active{color:var(--vertex-ui-blue-700);font-weight:var(--vertex-ui-font-weight-bold)}.hidden-label-text{font-weight:bold;visibility:hidden;height:0px}.tab-content{display:flex;height:5%;flex-grow:1}";
|
|
12
|
+
|
|
13
|
+
const Tabs = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
index.registerInstance(this, hostRef);
|
|
16
|
+
this.selectedTabChanged = index.createEvent(this, "selectedTabChanged", 7);
|
|
17
|
+
this.indicatorInitialized = false;
|
|
18
|
+
this.handleLabelClick = (label) => {
|
|
19
|
+
if (this.active != null) {
|
|
20
|
+
this.updateActiveOnTab(this.active, false);
|
|
21
|
+
}
|
|
22
|
+
this.active = label;
|
|
23
|
+
this.updateActiveOnTab(this.active, true);
|
|
24
|
+
this.selectedTabChanged.emit(label);
|
|
25
|
+
};
|
|
26
|
+
this.updateActiveOnTab = (label, active) => {
|
|
27
|
+
const activeTab = this.findTabByLabel(label);
|
|
28
|
+
if (activeTab != null) {
|
|
29
|
+
activeTab.active = active;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
this.findTabByLabel = (label) => {
|
|
33
|
+
var _a;
|
|
34
|
+
const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
|
|
35
|
+
const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
|
|
36
|
+
const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
|
|
37
|
+
? Array.from(slotAssignedElements[0].children)
|
|
38
|
+
: undefined;
|
|
39
|
+
return slotChildren != null
|
|
40
|
+
? slotChildren.filter(isTabElement).find((el) => el.label === label)
|
|
41
|
+
: undefined;
|
|
42
|
+
};
|
|
43
|
+
this.updateTabLabels = () => {
|
|
44
|
+
var _a;
|
|
45
|
+
const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
|
|
46
|
+
const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
|
|
47
|
+
const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
|
|
48
|
+
? Array.from(slotAssignedElements[0].children)
|
|
49
|
+
: undefined;
|
|
50
|
+
this.labels =
|
|
51
|
+
slotChildren != null
|
|
52
|
+
? slotChildren.filter(isTabElement).map((t) => t.label)
|
|
53
|
+
: [];
|
|
54
|
+
};
|
|
55
|
+
this.active = undefined;
|
|
56
|
+
this.labels = [];
|
|
57
|
+
this.activeBounds = undefined;
|
|
58
|
+
this.activeButtonEl = undefined;
|
|
59
|
+
}
|
|
60
|
+
componentWillLoad() {
|
|
61
|
+
this.updateTabLabels();
|
|
62
|
+
}
|
|
63
|
+
componentDidLoad() {
|
|
64
|
+
if (this.active != null) {
|
|
65
|
+
this.updateActiveOnTab(this.active, true);
|
|
66
|
+
}
|
|
67
|
+
this.indicatorInitialized = false;
|
|
68
|
+
this.handleActiveButtonChange();
|
|
69
|
+
}
|
|
70
|
+
componentDidUpdate() {
|
|
71
|
+
// Place the indicator if it hasn't been initialized yet
|
|
72
|
+
if (!this.indicatorInitialized) {
|
|
73
|
+
this.handleActiveButtonChange();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
handleActiveButtonChange() {
|
|
77
|
+
const button = this.activeButtonEl;
|
|
78
|
+
if (button != null) {
|
|
79
|
+
dom.readDOM(() => {
|
|
80
|
+
const hostElBounds = dom.getBoundingClientRect(this.hostEl);
|
|
81
|
+
const activeBounds = dom.getBoundingClientRect(button);
|
|
82
|
+
this.activeBounds = {
|
|
83
|
+
x: activeBounds.x - hostElBounds.x,
|
|
84
|
+
width: activeBounds.width,
|
|
85
|
+
};
|
|
86
|
+
if (this.activeBounds.width !== 0) {
|
|
87
|
+
this.indicatorInitialized = true;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
render() {
|
|
93
|
+
return (index.h(index.Host, null, index.h("div", { class: "wrapper" }, index.h("div", { class: "labels" }, this.labels.map((label) => (index.h("button", { class: index$1.classnames('label', {
|
|
94
|
+
active: this.active === label,
|
|
95
|
+
}), "data-label": label, ref: (el) => {
|
|
96
|
+
if (this.active === label) {
|
|
97
|
+
this.activeButtonEl = el;
|
|
98
|
+
}
|
|
99
|
+
}, onClick: () => this.handleLabelClick(label) }, label, index.h("div", { class: "hidden-label-text" }, label)))), index.h("slot", { name: "label-header" }), this.activeBounds && (index.h("div", { class: "indicator", style: {
|
|
100
|
+
left: `${this.activeBounds.x}px`,
|
|
101
|
+
width: `${this.activeBounds.width}px`,
|
|
102
|
+
} }))), index.h("div", { class: "tab-content" }, index.h("slot", { onSlotchange: this.updateTabLabels })))));
|
|
103
|
+
}
|
|
104
|
+
get hostEl() { return index.getElement(this); }
|
|
105
|
+
static get watchers() { return {
|
|
106
|
+
"activeButtonEl": ["handleActiveButtonChange"]
|
|
107
|
+
}; }
|
|
108
|
+
};
|
|
109
|
+
Tabs.style = tabsCss;
|
|
110
|
+
|
|
111
|
+
exports.Tabs = Tabs;
|
|
@@ -81,6 +81,7 @@ const TextField = class {
|
|
|
81
81
|
render() {
|
|
82
82
|
var _a;
|
|
83
83
|
const classes = index$1.classnames('txt-wrapper', {
|
|
84
|
+
'txt-wrapper-border': !this.multiline,
|
|
84
85
|
'txt-standard': this.variant === 'standard',
|
|
85
86
|
'txt-filled': this.variant === 'filled',
|
|
86
87
|
'txt-underlined': this.variant === 'underlined',
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const index = require('./index-6a92256c.js');
|
|
4
4
|
const tslib_es6 = require('./tslib.es6-838fd860.js');
|
|
5
5
|
const index$1 = require('./index-e1b40fa6.js');
|
|
6
|
+
const dom = require('./dom-b6c5fbf4.js');
|
|
6
7
|
const slots = require('./slots-fb5ac359.js');
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -2052,16 +2053,13 @@ var uuid = /*#__PURE__*/Object.freeze({
|
|
|
2052
2053
|
toMsbLsb: toMsbLsb
|
|
2053
2054
|
});
|
|
2054
2055
|
|
|
2055
|
-
function getBoundingClientRect(el) {
|
|
2056
|
-
return el.getBoundingClientRect();
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
2056
|
const tooltipCss = ":host{--tooltip-width:auto;--tooltip-white-space:normal;display:flex}.popover{width:100%;height:100%}.target{display:flex;width:100%;height:100%}.content-hidden{display:none}.tooltip{display:flex;justify-content:center;text-align:center;width:var(--tooltip-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-xxs);background-color:var(--vertex-ui-neutral-700);color:var(--vertex-ui-white);padding:0.25rem 0.5rem;border-radius:4px;pointer-events:none;white-space:var(--tooltip-white-space);user-select:none}.tooltip.hidden{display:none}";
|
|
2060
2057
|
|
|
2061
2058
|
const TOOLTIP_OPEN_DELAY = 500;
|
|
2062
2059
|
const Tooltip = class {
|
|
2063
2060
|
constructor(hostRef) {
|
|
2064
2061
|
index.registerInstance(this, hostRef);
|
|
2062
|
+
this.pointerEntered = false;
|
|
2065
2063
|
this.content = undefined;
|
|
2066
2064
|
this.disabled = undefined;
|
|
2067
2065
|
this.placement = 'bottom';
|
|
@@ -2070,32 +2068,40 @@ const Tooltip = class {
|
|
|
2070
2068
|
this.open = false;
|
|
2071
2069
|
this.handlePointerEnter = this.handlePointerEnter.bind(this);
|
|
2072
2070
|
this.handlePointerLeave = this.handlePointerLeave.bind(this);
|
|
2071
|
+
this.handleContentChange = this.handleContentChange.bind(this);
|
|
2072
|
+
this.handleDisabledChange = this.handleDisabledChange.bind(this);
|
|
2073
2073
|
this.tooltipId = `vertex-tooltip-${uuid.create()}`;
|
|
2074
2074
|
}
|
|
2075
2075
|
disconnectedCallback() {
|
|
2076
2076
|
this.removeElement();
|
|
2077
2077
|
this.clearOpenTimeout();
|
|
2078
|
+
this.pointerEntered = false;
|
|
2079
|
+
}
|
|
2080
|
+
handleContentChange() {
|
|
2081
|
+
if (this.internalContentElement != null) {
|
|
2082
|
+
this.updateContentElementChildren(this.internalContentElement);
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
handleDisabledChange() {
|
|
2086
|
+
if (this.internalContentElement != null) {
|
|
2087
|
+
this.updateContentElementClass(this.internalContentElement);
|
|
2088
|
+
}
|
|
2089
|
+
if (!this.disabled && this.pointerEntered) {
|
|
2090
|
+
this.handlePointerEnter();
|
|
2091
|
+
}
|
|
2078
2092
|
}
|
|
2079
2093
|
render() {
|
|
2080
2094
|
return (index.h(index.Host, null, index.h("div", { class: "target", ref: (el) => {
|
|
2081
2095
|
this.targetElement = el;
|
|
2082
2096
|
}, onPointerEnter: this.handlePointerEnter, onPointerLeave: this.handlePointerLeave }, index.h("slot", null)), index.h("div", { class: "content-hidden", ref: (el) => {
|
|
2083
2097
|
this.contentElement = el;
|
|
2084
|
-
} }, index.h("slot", { name: "content" }))));
|
|
2098
|
+
} }, index.h("slot", { name: "content", onSlotchange: this.handleContentChange }))));
|
|
2085
2099
|
}
|
|
2086
2100
|
addElement() {
|
|
2087
|
-
var _a;
|
|
2088
2101
|
if (this.targetElement != null) {
|
|
2089
2102
|
const popover = this.createPopoverElement(this.targetElement);
|
|
2090
2103
|
const content = this.createContentElement();
|
|
2091
|
-
this.
|
|
2092
|
-
(_a = slots.getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2093
|
-
if (this.content != null) {
|
|
2094
|
-
content.innerText = this.content;
|
|
2095
|
-
}
|
|
2096
|
-
else if (this.displayedSlottedContent != null) {
|
|
2097
|
-
content.appendChild(this.displayedSlottedContent);
|
|
2098
|
-
}
|
|
2104
|
+
this.updateContentElementChildren(content);
|
|
2099
2105
|
popover.appendChild(content);
|
|
2100
2106
|
this.hostElement.ownerDocument.body.appendChild(popover);
|
|
2101
2107
|
}
|
|
@@ -2105,6 +2111,7 @@ const Tooltip = class {
|
|
|
2105
2111
|
if (popover != null) {
|
|
2106
2112
|
popover.remove();
|
|
2107
2113
|
}
|
|
2114
|
+
this.internalContentElement = undefined;
|
|
2108
2115
|
}
|
|
2109
2116
|
createPopoverElement(anchorElement) {
|
|
2110
2117
|
const popover = this.hostElement.ownerDocument.createElement('vertex-popover');
|
|
@@ -2115,29 +2122,54 @@ const Tooltip = class {
|
|
|
2115
2122
|
popover.backdrop = false;
|
|
2116
2123
|
popover.placement = this.placement;
|
|
2117
2124
|
popover.animated = this.animated;
|
|
2118
|
-
popover.anchorBounds = getBoundingClientRect(anchorElement);
|
|
2125
|
+
popover.anchorBounds = dom.getBoundingClientRect(anchorElement);
|
|
2119
2126
|
return popover;
|
|
2120
2127
|
}
|
|
2121
2128
|
createContentElement() {
|
|
2122
|
-
|
|
2123
|
-
|
|
2129
|
+
this.internalContentElement =
|
|
2130
|
+
this.hostElement.ownerDocument.createElement('div');
|
|
2131
|
+
this.internalContentElement.setAttribute('class', index$1.classnames('vertex-tooltip-content', {
|
|
2124
2132
|
hidden: !this.open || this.disabled,
|
|
2125
2133
|
}));
|
|
2126
|
-
return
|
|
2134
|
+
return this.internalContentElement;
|
|
2135
|
+
}
|
|
2136
|
+
updateContentElementClass(element) {
|
|
2137
|
+
element.setAttribute('class', index$1.classnames('vertex-tooltip-content', {
|
|
2138
|
+
hidden: !this.open || this.disabled,
|
|
2139
|
+
}));
|
|
2140
|
+
}
|
|
2141
|
+
updateContentElementChildren(element) {
|
|
2142
|
+
var _a;
|
|
2143
|
+
this.displayedSlottedContent =
|
|
2144
|
+
(_a = slots.getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2145
|
+
if (this.content != null) {
|
|
2146
|
+
element.innerText = this.content;
|
|
2147
|
+
}
|
|
2148
|
+
else if (this.displayedSlottedContent != null) {
|
|
2149
|
+
element.appendChild(this.displayedSlottedContent);
|
|
2150
|
+
}
|
|
2127
2151
|
}
|
|
2128
2152
|
handlePointerEnter() {
|
|
2129
2153
|
if (this.openTimeout == null && !this.disabled) {
|
|
2130
|
-
this.
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
}, this.delay);
|
|
2154
|
+
this.createOpenTimeout();
|
|
2155
|
+
}
|
|
2156
|
+
else if (this.openTimeout == null) {
|
|
2157
|
+
this.pointerEntered = true;
|
|
2135
2158
|
}
|
|
2136
2159
|
}
|
|
2137
2160
|
handlePointerLeave() {
|
|
2138
2161
|
this.clearOpenTimeout();
|
|
2139
2162
|
this.removeElement();
|
|
2140
2163
|
this.open = false;
|
|
2164
|
+
this.pointerEntered = false;
|
|
2165
|
+
}
|
|
2166
|
+
createOpenTimeout() {
|
|
2167
|
+
this.openTimeout = setTimeout(() => {
|
|
2168
|
+
this.open = true;
|
|
2169
|
+
this.openTimeout = undefined;
|
|
2170
|
+
this.addElement();
|
|
2171
|
+
}, this.delay);
|
|
2172
|
+
this.pointerEntered = false;
|
|
2141
2173
|
}
|
|
2142
2174
|
clearOpenTimeout() {
|
|
2143
2175
|
if (this.openTimeout != null) {
|
|
@@ -2146,6 +2178,10 @@ const Tooltip = class {
|
|
|
2146
2178
|
}
|
|
2147
2179
|
}
|
|
2148
2180
|
get hostElement() { return index.getElement(this); }
|
|
2181
|
+
static get watchers() { return {
|
|
2182
|
+
"content": ["handleContentChange"],
|
|
2183
|
+
"disabled": ["handleDisabledChange"]
|
|
2184
|
+
}; }
|
|
2149
2185
|
};
|
|
2150
2186
|
Tooltip.style = tooltipCss;
|
|
2151
2187
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const colorCirclePicker = require('./color-circle-picker-
|
|
5
|
+
const colorCirclePicker = require('./color-circle-picker-a8f9a80a.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
8
|
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const colorPicker = require('./color-picker-
|
|
5
|
+
const colorPicker = require('./color-picker-2a4820fa.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./lib-1bd1e383.js');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const colorSwatch = require('./color-swatch-8aaf6c0b.js');
|
|
6
|
+
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./lib-1bd1e383.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.vertex_color_swatch = colorSwatch.ColorSwatch;
|
|
@@ -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-10617d04.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-e02da963.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-2a64c9ca.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
|
-
require('./icon-helper-
|
|
8
|
+
require('./icon-helper-e02da963.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const resultList = require('./result-list-
|
|
5
|
+
const resultList = require('./result-list-241ffe8d.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
8
|
require('./templates-e7b3ffbb.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const searchBar = require('./search-bar-
|
|
5
|
+
const searchBar = require('./search-bar-2e7ee35a.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./index-e1b40fa6.js');
|
|
8
8
|
require('./templates-e7b3ffbb.js');
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const tab = require('./tab-4335cd8f.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
exports.
|
|
11
|
+
exports.vertex_tab = tab.Tab;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const tabs = require('./tabs-ece62a01.js');
|
|
6
|
+
require('./index-6a92256c.js');
|
|
7
|
+
require('./index-e1b40fa6.js');
|
|
8
|
+
require('./dom-b6c5fbf4.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.vertex_tabs = tabs.Tabs;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const tooltip = require('./tooltip-
|
|
5
|
+
const tooltip = require('./tooltip-9ac797a0.js');
|
|
6
6
|
require('./index-6a92256c.js');
|
|
7
7
|
require('./tslib.es6-838fd860.js');
|
|
8
8
|
require('./index-e1b40fa6.js');
|
|
9
|
+
require('./dom-b6c5fbf4.js');
|
|
9
10
|
require('./slots-fb5ac359.js');
|
|
10
11
|
|
|
11
12
|
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
"./components/chip/chip.js",
|
|
8
8
|
"./components/text-field/text-field.js",
|
|
9
9
|
"./components/color-circle-picker/color-circle-picker.js",
|
|
10
|
+
"./components/color-swatch/color-swatch.js",
|
|
11
|
+
"./components/color-picker/color-picker.js",
|
|
10
12
|
"./components/popover/popover.js",
|
|
11
13
|
"./components/expandable/expandable.js",
|
|
12
14
|
"./components/icon-button/icon-button.js",
|
|
13
15
|
"./components/radio/radio.js",
|
|
14
16
|
"./components/resizable/resizable.js",
|
|
15
|
-
"./components/result-list/result-list.js",
|
|
16
17
|
"./components/search-bar/search-bar.js",
|
|
17
18
|
"./components/slider/slider.js",
|
|
18
19
|
"./components/spinner/spinner.js",
|
|
@@ -23,8 +24,6 @@
|
|
|
23
24
|
"./components/card-group/card-group.js",
|
|
24
25
|
"./components/click-to-edit-text-field/click-to-edit-text-field.js",
|
|
25
26
|
"./components/collapsible/collapsible.js",
|
|
26
|
-
"./components/color-circle/color-circle.js",
|
|
27
|
-
"./components/color-picker/color-picker.js",
|
|
28
27
|
"./components/context-menu/context-menu.js",
|
|
29
28
|
"./components/dialog/dialog.js",
|
|
30
29
|
"./components/draggable-popover/draggable-popover.js",
|
|
@@ -36,7 +35,10 @@
|
|
|
36
35
|
"./components/menu-divider/menu-divider.js",
|
|
37
36
|
"./components/menu-item/menu-item.js",
|
|
38
37
|
"./components/radio-group/radio-group.js",
|
|
38
|
+
"./components/result-list/result-list.js",
|
|
39
39
|
"./components/select/select.js",
|
|
40
|
+
"./components/tab/tab.js",
|
|
41
|
+
"./components/tabs/tabs.js",
|
|
40
42
|
"./components/tooltip/tooltip.js"
|
|
41
43
|
],
|
|
42
44
|
"compiler": {
|
|
@@ -52,7 +52,7 @@ export class ColorCirclePicker {
|
|
|
52
52
|
render() {
|
|
53
53
|
return (h(Host, null, h("div", { class: classNames('container', {
|
|
54
54
|
vertical: this.direction === 'vertical',
|
|
55
|
-
}) }, this.colorArray.map((c, i) => (h("vertex-color-
|
|
55
|
+
}) }, this.colorArray.map((c, i) => (h("vertex-color-swatch", { class: classNames('circle', {
|
|
56
56
|
selected: this.selected === c,
|
|
57
57
|
}), color: c, supplementalColor: this.supplementaryColorArray[i], onClick: this.handleClick, lightenPercentage: this.lightenPercentage, darkenPercentage: this.darkenPercentage, theme: this.theme }))))));
|
|
58
58
|
}
|
|
@@ -82,7 +82,7 @@ export class ColorCirclePicker {
|
|
|
82
82
|
"optional": false,
|
|
83
83
|
"docs": {
|
|
84
84
|
"tags": [],
|
|
85
|
-
"text": "The colors to show in this `vertex-color-circle-picker`.\nThese values will map to the `color` property of the underlying\n`vertex-color-
|
|
85
|
+
"text": "The colors to show in this `vertex-color-circle-picker`.\nThese values will map to the `color` property of the underlying\n`vertex-color-swatch`."
|
|
86
86
|
},
|
|
87
87
|
"attribute": "colors",
|
|
88
88
|
"reflect": false,
|
|
@@ -100,7 +100,7 @@ export class ColorCirclePicker {
|
|
|
100
100
|
"optional": false,
|
|
101
101
|
"docs": {
|
|
102
102
|
"tags": [],
|
|
103
|
-
"text": "Optional supplemental colors that will be provided to the\nunderlying `vertex-color-
|
|
103
|
+
"text": "Optional supplemental colors that will be provided to the\nunderlying `vertex-color-swatch` elements for associated\nindices in the `colors` array."
|
|
104
104
|
},
|
|
105
105
|
"attribute": "supplemental-colors",
|
|
106
106
|
"reflect": false,
|
|
@@ -118,7 +118,7 @@ export class ColorCirclePicker {
|
|
|
118
118
|
"optional": false,
|
|
119
119
|
"docs": {
|
|
120
120
|
"tags": [],
|
|
121
|
-
"text": "The theme to use for this `vertex-color-circle-picker`.\nCan be either `light` or `dark`, and defaults to `dark`.\n\nWith the `dark` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-
|
|
121
|
+
"text": "The theme to use for this `vertex-color-circle-picker`.\nCan be either `light` or `dark`, and defaults to `dark`.\n\nWith the `dark` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-swatch` elements,\nand a `darkened` color will be used for the border-colors.\n\nWith the `light` theme, the provided `colors` will be used\nas the background-colors for `vertex-color-swatch` elements,\nand a `lightened` color will be used for the border-colors."
|
|
122
122
|
},
|
|
123
123
|
"attribute": "theme",
|
|
124
124
|
"reflect": true,
|
|
@@ -136,7 +136,7 @@ export class ColorCirclePicker {
|
|
|
136
136
|
"optional": false,
|
|
137
137
|
"docs": {
|
|
138
138
|
"tags": [],
|
|
139
|
-
"text": "The percentage lighter color to use to compute the `lightened`\ncolor for the underlying `vertex-color-
|
|
139
|
+
"text": "The percentage lighter color to use to compute the `lightened`\ncolor for the underlying `vertex-color-swatch`. This will be\nused when the `theme` is set to `light`."
|
|
140
140
|
},
|
|
141
141
|
"attribute": "lighten-percentage",
|
|
142
142
|
"reflect": false,
|
|
@@ -154,7 +154,7 @@ export class ColorCirclePicker {
|
|
|
154
154
|
"optional": false,
|
|
155
155
|
"docs": {
|
|
156
156
|
"tags": [],
|
|
157
|
-
"text": "The percentage darker color to use to compute the `darkened`\ncolor for the underlying `vertex-color-
|
|
157
|
+
"text": "The percentage darker color to use to compute the `darkened`\ncolor for the underlying `vertex-color-swatch`. This will be\nused when the `theme` is set to `dark`."
|
|
158
158
|
},
|
|
159
159
|
"attribute": "darken-percentage",
|
|
160
160
|
"reflect": false,
|
|
@@ -172,7 +172,7 @@ export class ColorCirclePicker {
|
|
|
172
172
|
"optional": true,
|
|
173
173
|
"docs": {
|
|
174
174
|
"tags": [],
|
|
175
|
-
"text": "An optional selected color. This will also be updated internally\nby the component when individual `vertex-color-
|
|
175
|
+
"text": "An optional selected color. This will also be updated internally\nby the component when individual `vertex-color-swatch` elements\nare clicked."
|
|
176
176
|
},
|
|
177
177
|
"attribute": "selected",
|
|
178
178
|
"reflect": true
|