@vertexvis/ui 0.1.0-canary.2 → 0.1.0-canary.21
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-button-786427d6.js → icon-button-2256a63a.js} +1 -1
- package/dist/cjs/{icon-460fd0f5.js → icon-c3ab7a57.js} +1 -1
- package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-35893713.js} +60 -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 +33 -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/square-dot-outline.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 +11 -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-036a0be0.js +1 -0
- 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-103249b4.js → p-1971ed0b.js} +1 -1
- package/dist/components/p-1d08dd79.entry.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-49db6547.entry.js +1 -0
- package/dist/components/p-606596de.entry.js +1 -0
- package/dist/components/{p-ca52a423.js → p-63b48634.js} +1 -1
- 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-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-bc2fbd68.entry.js +1 -0
- package/dist/components/p-c2706288.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-55b22de7.js} +1 -1
- package/dist/esm/{icon-button-aad3c0e7.js → icon-button-e6c72aec.js} +1 -1
- package/dist/esm/{icon-helper-83f10f73.js → icon-helper-67de1067.js} +60 -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/square-dot-outline.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 +11 -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,109 @@
|
|
|
1
|
+
import { r as registerInstance, e as createEvent, h, H as Host, g as getElement } from './index-72f28b71.js';
|
|
2
|
+
import { c as classnames } from './index-9c609209.js';
|
|
3
|
+
import { r as readDOM, g as getBoundingClientRect } from './dom-613e2677.js';
|
|
4
|
+
|
|
5
|
+
function isTabElement(element) {
|
|
6
|
+
return element.tagName === 'VERTEX-TAB';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
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}";
|
|
10
|
+
|
|
11
|
+
const Tabs = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
registerInstance(this, hostRef);
|
|
14
|
+
this.selectedTabChanged = createEvent(this, "selectedTabChanged", 7);
|
|
15
|
+
this.indicatorInitialized = false;
|
|
16
|
+
this.handleLabelClick = (label) => {
|
|
17
|
+
if (this.active != null) {
|
|
18
|
+
this.updateActiveOnTab(this.active, false);
|
|
19
|
+
}
|
|
20
|
+
this.active = label;
|
|
21
|
+
this.updateActiveOnTab(this.active, true);
|
|
22
|
+
this.selectedTabChanged.emit(label);
|
|
23
|
+
};
|
|
24
|
+
this.updateActiveOnTab = (label, active) => {
|
|
25
|
+
const activeTab = this.findTabByLabel(label);
|
|
26
|
+
if (activeTab != null) {
|
|
27
|
+
activeTab.active = active;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.findTabByLabel = (label) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
|
|
33
|
+
const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
|
|
34
|
+
const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
|
|
35
|
+
? Array.from(slotAssignedElements[0].children)
|
|
36
|
+
: undefined;
|
|
37
|
+
return slotChildren != null
|
|
38
|
+
? slotChildren.filter(isTabElement).find((el) => el.label === label)
|
|
39
|
+
: undefined;
|
|
40
|
+
};
|
|
41
|
+
this.updateTabLabels = () => {
|
|
42
|
+
var _a;
|
|
43
|
+
const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
|
|
44
|
+
const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
|
|
45
|
+
const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
|
|
46
|
+
? Array.from(slotAssignedElements[0].children)
|
|
47
|
+
: undefined;
|
|
48
|
+
this.labels =
|
|
49
|
+
slotChildren != null
|
|
50
|
+
? slotChildren.filter(isTabElement).map((t) => t.label)
|
|
51
|
+
: [];
|
|
52
|
+
};
|
|
53
|
+
this.active = undefined;
|
|
54
|
+
this.labels = [];
|
|
55
|
+
this.activeBounds = undefined;
|
|
56
|
+
this.activeButtonEl = undefined;
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
this.updateTabLabels();
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
if (this.active != null) {
|
|
63
|
+
this.updateActiveOnTab(this.active, true);
|
|
64
|
+
}
|
|
65
|
+
this.indicatorInitialized = false;
|
|
66
|
+
this.handleActiveButtonChange();
|
|
67
|
+
}
|
|
68
|
+
componentDidUpdate() {
|
|
69
|
+
// Place the indicator if it hasn't been initialized yet
|
|
70
|
+
if (!this.indicatorInitialized) {
|
|
71
|
+
this.handleActiveButtonChange();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
handleActiveButtonChange() {
|
|
75
|
+
const button = this.activeButtonEl;
|
|
76
|
+
if (button != null) {
|
|
77
|
+
readDOM(() => {
|
|
78
|
+
const hostElBounds = getBoundingClientRect(this.hostEl);
|
|
79
|
+
const activeBounds = getBoundingClientRect(button);
|
|
80
|
+
this.activeBounds = {
|
|
81
|
+
x: activeBounds.x - hostElBounds.x,
|
|
82
|
+
width: activeBounds.width,
|
|
83
|
+
};
|
|
84
|
+
if (this.activeBounds.width !== 0) {
|
|
85
|
+
this.indicatorInitialized = true;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
return (h(Host, null, h("div", { class: "wrapper" }, h("div", { class: "labels" }, this.labels.map((label) => (h("button", { class: classnames('label', {
|
|
92
|
+
active: this.active === label,
|
|
93
|
+
}), "data-label": label, ref: (el) => {
|
|
94
|
+
if (this.active === label) {
|
|
95
|
+
this.activeButtonEl = el;
|
|
96
|
+
}
|
|
97
|
+
}, onClick: () => this.handleLabelClick(label) }, label, h("div", { class: "hidden-label-text" }, label)))), h("slot", { name: "label-header" }), this.activeBounds && (h("div", { class: "indicator", style: {
|
|
98
|
+
left: `${this.activeBounds.x}px`,
|
|
99
|
+
width: `${this.activeBounds.width}px`,
|
|
100
|
+
} }))), h("div", { class: "tab-content" }, h("slot", { onSlotchange: this.updateTabLabels })))));
|
|
101
|
+
}
|
|
102
|
+
get hostEl() { return getElement(this); }
|
|
103
|
+
static get watchers() { return {
|
|
104
|
+
"activeButtonEl": ["handleActiveButtonChange"]
|
|
105
|
+
}; }
|
|
106
|
+
};
|
|
107
|
+
Tabs.style = tabsCss;
|
|
108
|
+
|
|
109
|
+
export { Tabs as T };
|
|
@@ -79,6 +79,7 @@ const TextField = class {
|
|
|
79
79
|
render() {
|
|
80
80
|
var _a;
|
|
81
81
|
const classes = classnames('txt-wrapper', {
|
|
82
|
+
'txt-wrapper-border': !this.multiline,
|
|
82
83
|
'txt-standard': this.variant === 'standard',
|
|
83
84
|
'txt-filled': this.variant === 'filled',
|
|
84
85
|
'txt-underlined': this.variant === 'underlined',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-72f28b71.js';
|
|
2
2
|
import { _ as __extends, a as __read } from './tslib.es6-99cd0de8.js';
|
|
3
3
|
import { c as classnames } from './index-9c609209.js';
|
|
4
|
+
import { g as getBoundingClientRect } from './dom-613e2677.js';
|
|
4
5
|
import { a as getSlottedContent } from './slots-fbb5afb3.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -2050,16 +2051,13 @@ var uuid = /*#__PURE__*/Object.freeze({
|
|
|
2050
2051
|
toMsbLsb: toMsbLsb
|
|
2051
2052
|
});
|
|
2052
2053
|
|
|
2053
|
-
function getBoundingClientRect(el) {
|
|
2054
|
-
return el.getBoundingClientRect();
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
2054
|
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}";
|
|
2058
2055
|
|
|
2059
2056
|
const TOOLTIP_OPEN_DELAY = 500;
|
|
2060
2057
|
const Tooltip = class {
|
|
2061
2058
|
constructor(hostRef) {
|
|
2062
2059
|
registerInstance(this, hostRef);
|
|
2060
|
+
this.pointerEntered = false;
|
|
2063
2061
|
this.content = undefined;
|
|
2064
2062
|
this.disabled = undefined;
|
|
2065
2063
|
this.placement = 'bottom';
|
|
@@ -2068,32 +2066,40 @@ const Tooltip = class {
|
|
|
2068
2066
|
this.open = false;
|
|
2069
2067
|
this.handlePointerEnter = this.handlePointerEnter.bind(this);
|
|
2070
2068
|
this.handlePointerLeave = this.handlePointerLeave.bind(this);
|
|
2069
|
+
this.handleContentChange = this.handleContentChange.bind(this);
|
|
2070
|
+
this.handleDisabledChange = this.handleDisabledChange.bind(this);
|
|
2071
2071
|
this.tooltipId = `vertex-tooltip-${uuid.create()}`;
|
|
2072
2072
|
}
|
|
2073
2073
|
disconnectedCallback() {
|
|
2074
2074
|
this.removeElement();
|
|
2075
2075
|
this.clearOpenTimeout();
|
|
2076
|
+
this.pointerEntered = false;
|
|
2077
|
+
}
|
|
2078
|
+
handleContentChange() {
|
|
2079
|
+
if (this.internalContentElement != null) {
|
|
2080
|
+
this.updateContentElementChildren(this.internalContentElement);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
handleDisabledChange() {
|
|
2084
|
+
if (this.internalContentElement != null) {
|
|
2085
|
+
this.updateContentElementClass(this.internalContentElement);
|
|
2086
|
+
}
|
|
2087
|
+
if (!this.disabled && this.pointerEntered) {
|
|
2088
|
+
this.handlePointerEnter();
|
|
2089
|
+
}
|
|
2076
2090
|
}
|
|
2077
2091
|
render() {
|
|
2078
2092
|
return (h(Host, null, h("div", { class: "target", ref: (el) => {
|
|
2079
2093
|
this.targetElement = el;
|
|
2080
2094
|
}, onPointerEnter: this.handlePointerEnter, onPointerLeave: this.handlePointerLeave }, h("slot", null)), h("div", { class: "content-hidden", ref: (el) => {
|
|
2081
2095
|
this.contentElement = el;
|
|
2082
|
-
} }, h("slot", { name: "content" }))));
|
|
2096
|
+
} }, h("slot", { name: "content", onSlotchange: this.handleContentChange }))));
|
|
2083
2097
|
}
|
|
2084
2098
|
addElement() {
|
|
2085
|
-
var _a;
|
|
2086
2099
|
if (this.targetElement != null) {
|
|
2087
2100
|
const popover = this.createPopoverElement(this.targetElement);
|
|
2088
2101
|
const content = this.createContentElement();
|
|
2089
|
-
this.
|
|
2090
|
-
(_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2091
|
-
if (this.content != null) {
|
|
2092
|
-
content.innerText = this.content;
|
|
2093
|
-
}
|
|
2094
|
-
else if (this.displayedSlottedContent != null) {
|
|
2095
|
-
content.appendChild(this.displayedSlottedContent);
|
|
2096
|
-
}
|
|
2102
|
+
this.updateContentElementChildren(content);
|
|
2097
2103
|
popover.appendChild(content);
|
|
2098
2104
|
this.hostElement.ownerDocument.body.appendChild(popover);
|
|
2099
2105
|
}
|
|
@@ -2103,6 +2109,7 @@ const Tooltip = class {
|
|
|
2103
2109
|
if (popover != null) {
|
|
2104
2110
|
popover.remove();
|
|
2105
2111
|
}
|
|
2112
|
+
this.internalContentElement = undefined;
|
|
2106
2113
|
}
|
|
2107
2114
|
createPopoverElement(anchorElement) {
|
|
2108
2115
|
const popover = this.hostElement.ownerDocument.createElement('vertex-popover');
|
|
@@ -2117,25 +2124,50 @@ const Tooltip = class {
|
|
|
2117
2124
|
return popover;
|
|
2118
2125
|
}
|
|
2119
2126
|
createContentElement() {
|
|
2120
|
-
|
|
2121
|
-
|
|
2127
|
+
this.internalContentElement =
|
|
2128
|
+
this.hostElement.ownerDocument.createElement('div');
|
|
2129
|
+
this.internalContentElement.setAttribute('class', classnames('vertex-tooltip-content', {
|
|
2122
2130
|
hidden: !this.open || this.disabled,
|
|
2123
2131
|
}));
|
|
2124
|
-
return
|
|
2132
|
+
return this.internalContentElement;
|
|
2133
|
+
}
|
|
2134
|
+
updateContentElementClass(element) {
|
|
2135
|
+
element.setAttribute('class', classnames('vertex-tooltip-content', {
|
|
2136
|
+
hidden: !this.open || this.disabled,
|
|
2137
|
+
}));
|
|
2138
|
+
}
|
|
2139
|
+
updateContentElementChildren(element) {
|
|
2140
|
+
var _a;
|
|
2141
|
+
this.displayedSlottedContent =
|
|
2142
|
+
(_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
|
|
2143
|
+
if (this.content != null) {
|
|
2144
|
+
element.innerText = this.content;
|
|
2145
|
+
}
|
|
2146
|
+
else if (this.displayedSlottedContent != null) {
|
|
2147
|
+
element.appendChild(this.displayedSlottedContent);
|
|
2148
|
+
}
|
|
2125
2149
|
}
|
|
2126
2150
|
handlePointerEnter() {
|
|
2127
2151
|
if (this.openTimeout == null && !this.disabled) {
|
|
2128
|
-
this.
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
}, this.delay);
|
|
2152
|
+
this.createOpenTimeout();
|
|
2153
|
+
}
|
|
2154
|
+
else if (this.openTimeout == null) {
|
|
2155
|
+
this.pointerEntered = true;
|
|
2133
2156
|
}
|
|
2134
2157
|
}
|
|
2135
2158
|
handlePointerLeave() {
|
|
2136
2159
|
this.clearOpenTimeout();
|
|
2137
2160
|
this.removeElement();
|
|
2138
2161
|
this.open = false;
|
|
2162
|
+
this.pointerEntered = false;
|
|
2163
|
+
}
|
|
2164
|
+
createOpenTimeout() {
|
|
2165
|
+
this.openTimeout = setTimeout(() => {
|
|
2166
|
+
this.open = true;
|
|
2167
|
+
this.openTimeout = undefined;
|
|
2168
|
+
this.addElement();
|
|
2169
|
+
}, this.delay);
|
|
2170
|
+
this.pointerEntered = false;
|
|
2139
2171
|
}
|
|
2140
2172
|
clearOpenTimeout() {
|
|
2141
2173
|
if (this.openTimeout != null) {
|
|
@@ -2144,6 +2176,10 @@ const Tooltip = class {
|
|
|
2144
2176
|
}
|
|
2145
2177
|
}
|
|
2146
2178
|
get hostElement() { return getElement(this); }
|
|
2179
|
+
static get watchers() { return {
|
|
2180
|
+
"content": ["handleContentChange"],
|
|
2181
|
+
"disabled": ["handleDisabledChange"]
|
|
2182
|
+
}; }
|
|
2147
2183
|
};
|
|
2148
2184
|
Tooltip.style = tooltipCss;
|
|
2149
2185
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as vertex_icon_button } from './icon-button-
|
|
1
|
+
export { I as vertex_icon_button } from './icon-button-e6c72aec.js';
|
|
2
2
|
import './index-72f28b71.js';
|
|
3
3
|
import './index-9c609209.js';
|
|
4
|
-
import './icon-helper-
|
|
4
|
+
import './icon-helper-67de1067.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { T as vertex_tooltip } from './tooltip-
|
|
1
|
+
export { T as vertex_tooltip } from './tooltip-29278ea4.js';
|
|
2
2
|
import './index-72f28b71.js';
|
|
3
3
|
import './tslib.es6-99cd0de8.js';
|
|
4
4
|
import './index-9c609209.js';
|
|
5
|
+
import './dom-613e2677.js';
|
|
5
6
|
import './slots-fbb5afb3.js';
|
|
@@ -8,12 +8,12 @@ export declare class ColorCirclePicker {
|
|
|
8
8
|
/**
|
|
9
9
|
* The colors to show in this `vertex-color-circle-picker`.
|
|
10
10
|
* These values will map to the `color` property of the underlying
|
|
11
|
-
* `vertex-color-
|
|
11
|
+
* `vertex-color-swatch`.
|
|
12
12
|
*/
|
|
13
13
|
colors: string[] | string;
|
|
14
14
|
/**
|
|
15
15
|
* Optional supplemental colors that will be provided to the
|
|
16
|
-
* underlying `vertex-color-
|
|
16
|
+
* underlying `vertex-color-swatch` elements for associated
|
|
17
17
|
* indices in the `colors` array.
|
|
18
18
|
*/
|
|
19
19
|
supplementalColors: string[] | string;
|
|
@@ -22,29 +22,29 @@ export declare class ColorCirclePicker {
|
|
|
22
22
|
* Can be either `light` or `dark`, and defaults to `dark`.
|
|
23
23
|
*
|
|
24
24
|
* With the `dark` theme, the provided `colors` will be used
|
|
25
|
-
* as the background-colors for `vertex-color-
|
|
25
|
+
* as the background-colors for `vertex-color-swatch` elements,
|
|
26
26
|
* and a `darkened` color will be used for the border-colors.
|
|
27
27
|
*
|
|
28
28
|
* With the `light` theme, the provided `colors` will be used
|
|
29
|
-
* as the background-colors for `vertex-color-
|
|
29
|
+
* as the background-colors for `vertex-color-swatch` elements,
|
|
30
30
|
* and a `lightened` color will be used for the border-colors.
|
|
31
31
|
*/
|
|
32
32
|
theme: 'light' | 'dark';
|
|
33
33
|
/**
|
|
34
34
|
* The percentage lighter color to use to compute the `lightened`
|
|
35
|
-
* color for the underlying `vertex-color-
|
|
35
|
+
* color for the underlying `vertex-color-swatch`. This will be
|
|
36
36
|
* used when the `theme` is set to `light`.
|
|
37
37
|
*/
|
|
38
38
|
lightenPercentage: number;
|
|
39
39
|
/**
|
|
40
40
|
* The percentage darker color to use to compute the `darkened`
|
|
41
|
-
* color for the underlying `vertex-color-
|
|
41
|
+
* color for the underlying `vertex-color-swatch`. This will be
|
|
42
42
|
* used when the `theme` is set to `dark`.
|
|
43
43
|
*/
|
|
44
44
|
darkenPercentage: number;
|
|
45
45
|
/**
|
|
46
46
|
* An optional selected color. This will also be updated internally
|
|
47
|
-
* by the component when individual `vertex-color-
|
|
47
|
+
* by the component when individual `vertex-color-swatch` elements
|
|
48
48
|
* are clicked.
|
|
49
49
|
*/
|
|
50
50
|
selected?: string;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { EventEmitter, h } from '../../stencil-public-runtime';
|
|
2
|
+
import { ColorSwatchSize } from '../color-swatch/color-swatch';
|
|
3
|
+
export type ColorPickerVariant = 'full' | 'swatch';
|
|
2
4
|
export declare class ColorPicker {
|
|
3
5
|
/**
|
|
4
6
|
* Optional value property to set the initial
|
|
5
7
|
* value of this input.
|
|
6
8
|
*/
|
|
7
9
|
value?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The size of the swatch displayed for this color picker. Can be `sm`, `md`,
|
|
12
|
+
* `lg`, or `xl`, and defaults to `md`. If the `variant` is `full`, this value
|
|
13
|
+
* will also increase the size of the associated hexadecimal value.
|
|
14
|
+
*/
|
|
15
|
+
size: ColorSwatchSize;
|
|
16
|
+
/**
|
|
17
|
+
* The variant of this color picker. Can be `full` or `swatch`,
|
|
18
|
+
* and defaults to `full`.
|
|
19
|
+
*
|
|
20
|
+
* `full` will display both the visual color swatch and the hexadecimal
|
|
21
|
+
* representation of the color.
|
|
22
|
+
*
|
|
23
|
+
* `swatch` will display only the visual color swatch.
|
|
24
|
+
*/
|
|
25
|
+
variant: ColorPickerVariant;
|
|
8
26
|
/**
|
|
9
27
|
* Whether this color picker is disabled.
|
|
10
28
|
*/
|
|
@@ -21,4 +39,5 @@ export declare class ColorPicker {
|
|
|
21
39
|
render(): h.JSX.IntrinsicElements;
|
|
22
40
|
private handleInput;
|
|
23
41
|
private handleChange;
|
|
42
|
+
private getDisplayedValue;
|
|
24
43
|
}
|
package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts}
RENAMED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { h } from '../../stencil-public-runtime';
|
|
2
|
-
export
|
|
2
|
+
export type ColorSwatchVariant = 'circle' | 'square';
|
|
3
|
+
export type ColorSwatchSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type ColorSwatchTheme = 'none' | 'light' | 'dark';
|
|
5
|
+
export declare class ColorSwatch {
|
|
3
6
|
/**
|
|
4
|
-
* The
|
|
7
|
+
* The variant of this color swatch. Can be either `circle` or `square`,
|
|
8
|
+
* and defaults to `circle`.
|
|
9
|
+
*/
|
|
10
|
+
variant: ColorSwatchVariant;
|
|
11
|
+
/**
|
|
12
|
+
* The size of this color swatch. Can be `sm`, `md`, or `lg`,
|
|
13
|
+
* and defaults to `md`.
|
|
14
|
+
*/
|
|
15
|
+
size: ColorSwatchSize;
|
|
16
|
+
/**
|
|
17
|
+
* The primary color of this `vertex-color-swatch` in hexadecimal format.
|
|
5
18
|
* For `dark` theme, this will be the background-color.
|
|
6
19
|
* For `light` theme, this will be the border-color.
|
|
7
20
|
*/
|
|
@@ -13,8 +26,11 @@ export declare class ColorCircle {
|
|
|
13
26
|
*/
|
|
14
27
|
supplementalColor?: string;
|
|
15
28
|
/**
|
|
16
|
-
* The theme to use for this `vertex-color-
|
|
17
|
-
* Can be
|
|
29
|
+
* The theme to use for this `vertex-color-swatch`.
|
|
30
|
+
* Can be `none`, `light`, or `dark`, and defaults to `none`.
|
|
31
|
+
*
|
|
32
|
+
* With no theme (`none`), the provided `color` will be used
|
|
33
|
+
* as the background-color, and the border will be a neutral color.
|
|
18
34
|
*
|
|
19
35
|
* With the `dark` theme, the provided `color` will be used
|
|
20
36
|
* as the background-color, and the `darkened` color will be
|
|
@@ -24,7 +40,7 @@ export declare class ColorCircle {
|
|
|
24
40
|
* as the border-color, and the `lightened` color will be used
|
|
25
41
|
* for the background-color.
|
|
26
42
|
*/
|
|
27
|
-
theme:
|
|
43
|
+
theme: ColorSwatchTheme;
|
|
28
44
|
/**
|
|
29
45
|
* The percentage lighter color to use to compute the `lightened`
|
|
30
46
|
* color. This will be used when the `theme` is set to `light`.
|
|
@@ -51,6 +67,8 @@ export declare class ColorCircle {
|
|
|
51
67
|
protected handleLightenPercentageChanged(newPercentage: number): void;
|
|
52
68
|
protected handleDarkenPercentageChanged(newPercentage: number): void;
|
|
53
69
|
render(): h.JSX.IntrinsicElements;
|
|
70
|
+
private getThemeColors;
|
|
71
|
+
private getSupplementalColor;
|
|
54
72
|
private adjustColor;
|
|
55
73
|
private adjustComponent;
|
|
56
74
|
private padHexComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isValidHexColor(color: string): boolean;
|
|
@@ -8,9 +8,9 @@ export * from './card-group/card-group';
|
|
|
8
8
|
export * from './chip/chip';
|
|
9
9
|
export * from './click-to-edit-text-field/click-to-edit-text-field';
|
|
10
10
|
export * from './collapsible/collapsible';
|
|
11
|
-
export * from './color-circle/color-circle';
|
|
12
11
|
export * from './color-circle-picker/color-circle-picker';
|
|
13
12
|
export * from './color-picker/color-picker';
|
|
13
|
+
export * from './color-swatch/color-swatch';
|
|
14
14
|
export * from './context-menu/context-menu';
|
|
15
15
|
export * from './dialog/dialog';
|
|
16
16
|
export * from './draggable-popover/draggable-popover';
|
|
@@ -32,6 +32,8 @@ export * from './search-bar/search-bar';
|
|
|
32
32
|
export * from './select/select';
|
|
33
33
|
export * from './slider/slider';
|
|
34
34
|
export * from './spinner/spinner';
|
|
35
|
+
export * from './tab/tab';
|
|
36
|
+
export * from './tabs/tabs';
|
|
35
37
|
export * from './text-field/text-field';
|
|
36
38
|
export * from './toast/toast';
|
|
37
39
|
export * from './toggle/toggle';
|
|
@@ -126,11 +126,16 @@ export declare class Popover {
|
|
|
126
126
|
private viewportWidth?;
|
|
127
127
|
private viewportHeight?;
|
|
128
128
|
private resizeTimeout?;
|
|
129
|
+
private boundaryResizeObserver?;
|
|
129
130
|
private shouldUpdatePosition;
|
|
130
131
|
private updateDispose?;
|
|
131
132
|
private middleware;
|
|
132
133
|
private partialWindow;
|
|
133
134
|
constructor();
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
resizeObserverFactory: (cb: (entries: ResizeObserverEntry[]) => void) => ResizeObserver;
|
|
134
139
|
connectedCallback(): void;
|
|
135
140
|
componentDidUpdate(): void;
|
|
136
141
|
componentDidLoad(): void;
|
|
@@ -140,6 +145,7 @@ export declare class Popover {
|
|
|
140
145
|
updateOpened(open?: boolean): void;
|
|
141
146
|
updateAnimated(): void;
|
|
142
147
|
updateMiddleware(): void;
|
|
148
|
+
updateResizeObserver(): void;
|
|
143
149
|
/**
|
|
144
150
|
* @private Used for internals or testing.
|
|
145
151
|
*/
|
|
@@ -152,5 +158,6 @@ export declare class Popover {
|
|
|
152
158
|
private getAnchorBoundsVirtualElement;
|
|
153
159
|
private handleResize;
|
|
154
160
|
private updateViewport;
|
|
161
|
+
private getOrCreateResizeObserver;
|
|
155
162
|
private getTransformClass;
|
|
156
163
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter, h } from '../../stencil-public-runtime';
|
|
2
2
|
import { Point } from '../../types/point';
|
|
3
3
|
import { PopoverPlacement } from '../popover/popover';
|
|
4
|
-
|
|
4
|
+
import { Result } from './types';
|
|
5
5
|
export declare class ResultList {
|
|
6
6
|
items: Result[];
|
|
7
7
|
itemsJson?: string;
|
|
@@ -20,9 +20,11 @@ export declare class ResultList {
|
|
|
20
20
|
private lastFocusedIndex;
|
|
21
21
|
private stateMap;
|
|
22
22
|
private hostEl;
|
|
23
|
+
private resultClick;
|
|
23
24
|
private resizeObserver;
|
|
24
25
|
private computedResultHeight?;
|
|
25
26
|
private resultsScrollEl?;
|
|
27
|
+
constructor();
|
|
26
28
|
handleResultsChanged(results: Array<Result> | string | undefined): void;
|
|
27
29
|
handleOpenChanged(): void;
|
|
28
30
|
protected componentWillLoad(): void;
|
|
@@ -35,7 +37,10 @@ export declare class ResultList {
|
|
|
35
37
|
private ensureTemplateDefined;
|
|
36
38
|
private createResultPool;
|
|
37
39
|
private createResultInstance;
|
|
40
|
+
private createResultHandlers;
|
|
38
41
|
private layoutResults;
|
|
42
|
+
private handlePointerDown;
|
|
43
|
+
private handleResultClick;
|
|
39
44
|
private computeViewportResults;
|
|
40
45
|
private getListHeight;
|
|
41
46
|
private handleScroll;
|