@vertexvis/ui 0.1.2-canary.0 → 0.1.2-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{menu-d1ecf43b.js → menu-25f83cd7.js} +13 -3
- package/dist/cjs/{resizable-e4248256.js → resizable-c0a69532.js} +22 -4
- package/dist/cjs/vertex-menu.cjs.entry.js +1 -1
- package/dist/cjs/vertex-resizable.cjs.entry.js +2 -1
- package/dist/collection/components/menu/menu.js +13 -3
- package/dist/collection/components/resizable/resizable.js +23 -5
- package/dist/components/auto-resize-textarea.js +157 -0
- package/dist/components/color-swatch.js +124 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/dom.js +13 -0
- package/dist/components/expandable.js +100 -0
- package/dist/components/icon-button.js +63 -0
- package/dist/components/icon-helper.js +722 -0
- package/dist/components/icon.js +43 -0
- package/dist/components/index.d.ts +71 -0
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +52 -0
- package/dist/components/index2.js +89 -0
- package/dist/components/menu.js +99 -0
- package/dist/components/p-1b85c1d1.entry.js +1 -0
- package/dist/components/p-95358d00.entry.js +1 -0
- package/dist/components/p-c9a967d9.js +1 -0
- package/dist/components/p-ee5c8bd3.js +1 -0
- package/dist/components/popover.js +1737 -0
- package/dist/components/result-list.js +565 -0
- package/dist/components/slots.js +26 -0
- package/dist/components/text-field.js +171 -0
- package/dist/components/tooltip.js +360 -0
- package/dist/components/tslib.es6.js +65 -0
- package/dist/components/vertex-auto-resize-textarea.d.ts +11 -0
- package/dist/components/vertex-auto-resize-textarea.js +6 -0
- package/dist/components/vertex-avatar-group.d.ts +11 -0
- package/dist/components/vertex-avatar-group.js +34 -0
- package/dist/components/vertex-avatar.d.ts +11 -0
- package/dist/components/vertex-avatar.js +68 -0
- package/dist/components/vertex-badge.d.ts +11 -0
- package/dist/components/vertex-badge.js +43 -0
- package/dist/components/vertex-banner.d.ts +11 -0
- package/dist/components/vertex-banner.js +141 -0
- package/dist/components/vertex-button.d.ts +11 -0
- package/dist/components/vertex-button.js +96 -0
- package/dist/components/vertex-card-group.d.ts +11 -0
- package/dist/components/vertex-card-group.js +51 -0
- package/dist/components/vertex-card.d.ts +11 -0
- package/dist/components/vertex-card.js +49 -0
- package/dist/components/vertex-chip.d.ts +11 -0
- package/dist/components/vertex-chip.js +45 -0
- package/dist/components/vertex-click-to-edit-textfield.d.ts +11 -0
- package/dist/components/vertex-click-to-edit-textfield.js +156 -0
- package/dist/components/vertex-collapsible.d.ts +11 -0
- package/dist/components/vertex-collapsible.js +63 -0
- package/dist/components/vertex-color-circle-picker.d.ts +11 -0
- package/dist/components/vertex-color-circle-picker.js +104 -0
- package/dist/components/vertex-color-picker.d.ts +11 -0
- package/dist/components/vertex-color-picker.js +75 -0
- package/dist/components/vertex-color-swatch.d.ts +11 -0
- package/dist/components/vertex-color-swatch.js +6 -0
- package/dist/components/vertex-context-menu.d.ts +11 -0
- package/dist/components/vertex-context-menu.js +125 -0
- package/dist/components/vertex-dialog.d.ts +11 -0
- package/dist/components/vertex-dialog.js +263 -0
- package/dist/components/vertex-draggable-popover.d.ts +11 -0
- package/dist/components/vertex-draggable-popover.js +119 -0
- package/dist/components/vertex-dropdown-menu.d.ts +11 -0
- package/dist/components/vertex-dropdown-menu.js +64 -0
- package/dist/components/vertex-expandable.d.ts +11 -0
- package/dist/components/vertex-expandable.js +6 -0
- package/dist/components/vertex-help-tooltip.d.ts +11 -0
- package/dist/components/vertex-help-tooltip.js +67 -0
- package/dist/components/vertex-icon-button.d.ts +11 -0
- package/dist/components/vertex-icon-button.js +6 -0
- package/dist/components/vertex-icon.d.ts +11 -0
- package/dist/components/vertex-icon.js +6 -0
- package/dist/components/vertex-logo-loading.d.ts +11 -0
- package/dist/components/vertex-logo-loading.js +34 -0
- package/dist/components/vertex-menu-divider.d.ts +11 -0
- package/dist/components/vertex-menu-divider.js +34 -0
- package/dist/components/vertex-menu-item.d.ts +11 -0
- package/dist/components/vertex-menu-item.js +44 -0
- package/dist/components/vertex-menu.d.ts +11 -0
- package/dist/components/vertex-menu.js +6 -0
- package/dist/components/vertex-popover.d.ts +11 -0
- package/dist/components/vertex-popover.js +6 -0
- package/dist/components/vertex-radio-group.d.ts +11 -0
- package/dist/components/vertex-radio-group.js +88 -0
- package/dist/components/vertex-radio.d.ts +11 -0
- package/dist/components/vertex-radio.js +56 -0
- package/dist/components/vertex-resizable.d.ts +11 -0
- package/dist/components/vertex-resizable.js +463 -0
- package/dist/components/vertex-result-list.d.ts +11 -0
- package/dist/components/vertex-result-list.js +6 -0
- package/dist/components/vertex-search-bar.d.ts +11 -0
- package/dist/components/vertex-search-bar.js +568 -0
- package/dist/components/vertex-select.d.ts +11 -0
- package/dist/components/vertex-select.js +200 -0
- package/dist/components/vertex-slider.d.ts +11 -0
- package/dist/components/vertex-slider.js +81 -0
- package/dist/components/vertex-spinner.d.ts +11 -0
- package/dist/components/vertex-spinner.js +49 -0
- package/dist/components/vertex-tab.d.ts +11 -0
- package/dist/components/vertex-tab.js +46 -0
- package/dist/components/vertex-tabs.d.ts +11 -0
- package/dist/components/vertex-tabs.js +133 -0
- package/dist/components/vertex-textfield.d.ts +11 -0
- package/dist/components/vertex-textfield.js +6 -0
- package/dist/components/vertex-toast.d.ts +11 -0
- package/dist/components/vertex-toast.js +127 -0
- package/dist/components/vertex-toggle.d.ts +11 -0
- package/dist/components/vertex-toggle.js +67 -0
- package/dist/components/vertex-tooltip.d.ts +11 -0
- package/dist/components/vertex-tooltip.js +6 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{menu-daa7f9c9.js → menu-b8ff7d6a.js} +13 -3
- package/dist/esm/{resizable-a147709b.js → resizable-833336bf.js} +23 -5
- package/dist/esm/vertex-menu.entry.js +1 -1
- package/dist/esm/vertex-resizable.entry.js +2 -1
- package/dist/types/components/menu/menu.d.ts +2 -0
- package/dist/types/components/resizable/resizable.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/p-0517ca62.entry.js +0 -1
- package/dist/components/p-6ec189d2.js +0 -1
- package/dist/components/p-7b75e004.js +0 -1
- package/dist/components/p-ea4a2f74.entry.js +0 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, readTask, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './icon-button.js';
|
|
4
|
+
|
|
5
|
+
const expandableCss = ":host{display:flex}.content{display:flex;flex-direction:column;transition:height 1s}.icon-container{display:flex;flex-direction:column}.icon-button{display:flex;align-items:center}.expanded-content{overflow:hidden}.expanded-content.animated{transition-property:max-height;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms;transform-origin:top}";
|
|
6
|
+
|
|
7
|
+
const Expandable = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.expand = createEvent(this, "expand", 7);
|
|
13
|
+
this.collapse = createEvent(this, "collapse", 7);
|
|
14
|
+
this.handleTransitionEnd = () => {
|
|
15
|
+
this.collapsing = false;
|
|
16
|
+
this.expanding = false;
|
|
17
|
+
};
|
|
18
|
+
this.handleExpand = () => {
|
|
19
|
+
this.expanded = !this.expanded;
|
|
20
|
+
if (this.expanded) {
|
|
21
|
+
this.expanding = true;
|
|
22
|
+
this.expand.emit();
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.collapsing = true;
|
|
26
|
+
this.collapse.emit();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
this.updateScrollHeight = () => {
|
|
30
|
+
readTask(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
const scrollHeight = (_a = this.expandContainer) === null || _a === void 0 ? void 0 : _a.scrollHeight;
|
|
33
|
+
if (this.contentScrollHeight !== scrollHeight) {
|
|
34
|
+
this.contentScrollHeight = scrollHeight;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
this.getMaxHeight = () => {
|
|
39
|
+
if (this.expanded) {
|
|
40
|
+
return `${this.contentScrollHeight}px`;
|
|
41
|
+
}
|
|
42
|
+
else if (!this.expanded) {
|
|
43
|
+
return '0';
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
};
|
|
47
|
+
this.expanded = false;
|
|
48
|
+
this.expanding = false;
|
|
49
|
+
this.collapsing = false;
|
|
50
|
+
this.controlled = false;
|
|
51
|
+
this.expandType = 'content';
|
|
52
|
+
this.animated = true;
|
|
53
|
+
this.contentScrollHeight = undefined;
|
|
54
|
+
}
|
|
55
|
+
componentDidLoad() {
|
|
56
|
+
this.updateScrollHeight();
|
|
57
|
+
}
|
|
58
|
+
componentDidRender() {
|
|
59
|
+
this.updateScrollHeight();
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return (h(Host, null, h("div", { class: "content" }, this.expandType === 'content' && h("slot", { name: "header" }), h("div", { class: classnames('expanded-content', {
|
|
63
|
+
animated: this.animated,
|
|
64
|
+
}), ref: (el) => {
|
|
65
|
+
this.expandContainer = el;
|
|
66
|
+
}, style: {
|
|
67
|
+
maxHeight: this.getMaxHeight(),
|
|
68
|
+
}, onTransitionEnd: this.handleTransitionEnd }, this.expandType === 'header' ? (h("slot", { name: "header", onSlotchange: this.updateScrollHeight })) : (h("slot", { onSlotchange: this.updateScrollHeight }))), this.expandType === 'header' && h("slot", null)), !this.controlled ? (h("div", { class: "icon-container", onClick: this.handleExpand }, h("slot", { name: "expand-icon" }, h("vertex-icon-button", { class: "icon-button", variant: "plain", iconSize: "sm", iconName: this.expanded ? 'caret-down' : 'caret-up' })))) : (h("slot", { name: "expand-icon" }))));
|
|
69
|
+
}
|
|
70
|
+
static get style() { return expandableCss; }
|
|
71
|
+
}, [1, "vertex-expandable", {
|
|
72
|
+
"expanded": [1540],
|
|
73
|
+
"expanding": [1540],
|
|
74
|
+
"collapsing": [1540],
|
|
75
|
+
"controlled": [516],
|
|
76
|
+
"expandType": [513, "expand-type"],
|
|
77
|
+
"animated": [4],
|
|
78
|
+
"contentScrollHeight": [32]
|
|
79
|
+
}]);
|
|
80
|
+
function defineCustomElement() {
|
|
81
|
+
if (typeof customElements === "undefined") {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const components = ["vertex-expandable", "vertex-icon-button"];
|
|
85
|
+
components.forEach(tagName => { switch (tagName) {
|
|
86
|
+
case "vertex-expandable":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
customElements.define(tagName, Expandable);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "vertex-icon-button":
|
|
92
|
+
if (!customElements.get(tagName)) {
|
|
93
|
+
defineCustomElement$1();
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
} });
|
|
97
|
+
}
|
|
98
|
+
defineCustomElement();
|
|
99
|
+
|
|
100
|
+
export { Expandable as E, defineCustomElement as d };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as classnames } from './index2.js';
|
|
3
|
+
import { g as getSvg } from './icon-helper.js';
|
|
4
|
+
|
|
5
|
+
const iconButtonCss = "button{border:none;background-color:transparent;font-family:var(--vertex-ui-font-family);font-size:0.875rem;padding:0}:host{--enabled-cursor:pointer;--disabled-cursor:not-allowed;--hover-background-color:var(--vertex-ui-neutral-300);--active-background-color:var(--vertex-ui-neutral-400);--focus-background-color:var(--vertex-ui-neutral-400);--hover-box-shadow:0 2px 2px rgb(0 0 0 / 20%);--active-box-shadow:none;--focus-box-shadow:0 0 0 1px var(--vertex-ui-neutral-900);--icon-margin:0px}.container{display:flex;justify-content:center;align-items:center;outline:none;fill:currentColor;color:currentColor;cursor:var(--enabled-cursor)}.container:not(.plain){border-radius:4px;padding:0.25rem}.icon-button{display:flex;position:relative;justify-content:center;align-items:center;fill:currentColor;height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.icon-button svg{width:100%;height:100%;margin:var(--icon-margin, 0px)}.badge{position:absolute;top:0px;right:4px;justify-content:flex-end;align-items:flex-end}.floating{background-color:var(--vertex-ui-neutral-100);box-shadow:var(--vertex-ui-overlay-shadow);color:var(--vertex-ui-neutral-700);fill:var(--vertex-ui-neutral-700);opacity:0.95}.floating.disabled{color:var(--vertex-ui-neutral-400);cursor:var(--disabled-cursor)}.container:not(.disabled):not(.plain):hover{background-color:var(--hover-background-color);box-shadow:var(--hover-box-shadow)}.container:not(.disabled):not(.plain):active{background-color:var(--active-background-color);box-shadow:var(--active-box-shadow)}.container:not(.disabled):not(.plain):focus-visible{background-color:var(--focus-background-color);box-shadow:var(--focus-box-shadow);color:var(--vertex-ui-neutral-900)}.container.disabled:not(.floating){cursor:var(--disabled-cursor);color:var(--vertex-ui-neutral-400)}.container.primary:not(.disabled){color:var(--vertex-ui-blue-700)}.container.secondary:not(.disabled){color:var(--vertex-ui-neutral-800)}.xs{height:var(--icon-size, 0.75rem);width:var(--icon-size, 0.75rem)}.sm{height:var(--icon-size, 1rem);width:var(--icon-size, 1rem)}.md{height:var(--icon-size, 1.5rem);width:var(--icon-size, 1.5rem)}.lg{height:var(--icon-size, 2rem);width:var(--icon-size, 2rem)}";
|
|
6
|
+
|
|
7
|
+
const IconButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.__attachShadow();
|
|
12
|
+
this.iconName = undefined;
|
|
13
|
+
this.disabled = undefined;
|
|
14
|
+
this.variant = 'default';
|
|
15
|
+
this.iconColor = 'default';
|
|
16
|
+
this.iconSize = 'md';
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, { onClick: (e) => this.handleClick(e) }, h("button", { ref: (el) => (this.buttonEl = el), disabled: this.disabled, class: classnames('container', {
|
|
20
|
+
disabled: this.disabled,
|
|
21
|
+
floating: this.variant === 'floating',
|
|
22
|
+
plain: this.variant === 'plain',
|
|
23
|
+
primary: this.iconColor === 'primary',
|
|
24
|
+
secondary: this.iconColor === 'secondary',
|
|
25
|
+
}) }, h("slot", { name: "left" }), h("div", { class: classnames('icon-button', {
|
|
26
|
+
xs: this.iconSize === 'xs',
|
|
27
|
+
sm: this.iconSize === 'sm',
|
|
28
|
+
md: this.iconSize === 'md',
|
|
29
|
+
lg: this.iconSize === 'lg',
|
|
30
|
+
}) }, getSvg(this.iconName), h("div", { class: "badge" }, h("slot", { name: "badge" }))), h("slot", null))));
|
|
31
|
+
}
|
|
32
|
+
handleClick(event) {
|
|
33
|
+
var _a;
|
|
34
|
+
if (this.disabled) {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
event.stopPropagation();
|
|
37
|
+
}
|
|
38
|
+
(_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.blur();
|
|
39
|
+
}
|
|
40
|
+
static get style() { return iconButtonCss; }
|
|
41
|
+
}, [1, "vertex-icon-button", {
|
|
42
|
+
"iconName": [1, "icon-name"],
|
|
43
|
+
"disabled": [516],
|
|
44
|
+
"variant": [1],
|
|
45
|
+
"iconColor": [1, "icon-color"],
|
|
46
|
+
"iconSize": [1, "icon-size"]
|
|
47
|
+
}]);
|
|
48
|
+
function defineCustomElement() {
|
|
49
|
+
if (typeof customElements === "undefined") {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const components = ["vertex-icon-button"];
|
|
53
|
+
components.forEach(tagName => { switch (tagName) {
|
|
54
|
+
case "vertex-icon-button":
|
|
55
|
+
if (!customElements.get(tagName)) {
|
|
56
|
+
customElements.define(tagName, IconButton);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
} });
|
|
60
|
+
}
|
|
61
|
+
defineCustomElement();
|
|
62
|
+
|
|
63
|
+
export { IconButton as I, defineCustomElement as d };
|