@vertexvis/ui 0.1.0-canary.11 → 0.1.0-canary.13

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.
Files changed (68) hide show
  1. package/dist/cjs/components.cjs.js +1 -1
  2. package/dist/cjs/dom-b6c5fbf4.js +13 -0
  3. package/dist/cjs/{icon-c40f74ca.js → icon-88af577f.js} +1 -1
  4. package/dist/cjs/{icon-button-e2dbc8b2.js → icon-button-7b2ff7b0.js} +1 -1
  5. package/dist/cjs/{icon-helper-c24d6e6b.js → icon-helper-af9f8c10.js} +8 -0
  6. package/dist/cjs/index.cjs.js +9 -4
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/tab-4335cd8f.js +26 -0
  9. package/dist/cjs/tabs-ece62a01.js +111 -0
  10. package/dist/cjs/{tooltip-e9f63631.js → tooltip-9ac797a0.js} +2 -5
  11. package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
  12. package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
  13. package/dist/cjs/vertex-tab.cjs.entry.js +11 -0
  14. package/dist/cjs/vertex-tabs.cjs.entry.js +12 -0
  15. package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -1
  16. package/dist/collection/collection-manifest.json +2 -0
  17. package/dist/collection/components/icon/icon-helper.js +3 -0
  18. package/dist/collection/components/icon/icon.js +1 -1
  19. package/dist/collection/components/icon/icons/pmi.js +2 -0
  20. package/dist/collection/components/icon-button/icon-button.js +1 -1
  21. package/dist/collection/components/index.js +2 -0
  22. package/dist/collection/components/tab/tab.css +16 -0
  23. package/dist/collection/components/tab/tab.js +85 -0
  24. package/dist/collection/components/tab/util.js +3 -0
  25. package/dist/collection/components/tabs/tabs.css +67 -0
  26. package/dist/collection/components/tabs/tabs.js +159 -0
  27. package/dist/collection/types/icon.js +1 -0
  28. package/dist/components/components.esm.js +1 -1
  29. package/dist/components/index.esm.js +1 -1
  30. package/dist/components/{p-91811c21.js → p-04449a31.js} +1 -1
  31. package/dist/components/p-2ae8175d.entry.js +1 -0
  32. package/dist/components/p-3dd7a75f.entry.js +1 -0
  33. package/dist/components/p-69496858.js +1 -0
  34. package/dist/components/p-76b961b8.js +1 -0
  35. package/dist/components/p-96f55673.js +1 -0
  36. package/dist/components/{p-f007c274.js → p-a50d42cc.js} +1 -1
  37. package/dist/components/{p-08f0434e.js → p-b11a0f6b.js} +1 -1
  38. package/dist/components/p-b1da3f7e.entry.js +1 -0
  39. package/dist/components/p-b3548cdf.entry.js +1 -0
  40. package/dist/components/p-d3fd9ca3.entry.js +1 -0
  41. package/dist/components/p-ff7c70b9.js +1 -0
  42. package/dist/esm/components.js +1 -1
  43. package/dist/esm/dom-613e2677.js +10 -0
  44. package/dist/esm/{icon-c48d1e4c.js → icon-788d26c9.js} +1 -1
  45. package/dist/esm/{icon-button-b0992730.js → icon-button-4820c5f8.js} +1 -1
  46. package/dist/esm/{icon-helper-cf9f8ca1.js → icon-helper-091fab53.js} +8 -0
  47. package/dist/esm/index.js +7 -4
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/tab-c76332b0.js +24 -0
  50. package/dist/esm/tabs-8e5353ba.js +109 -0
  51. package/dist/esm/{tooltip-933da261.js → tooltip-29278ea4.js} +1 -4
  52. package/dist/esm/vertex-icon-button.entry.js +2 -2
  53. package/dist/esm/vertex-icon.entry.js +2 -2
  54. package/dist/esm/vertex-tab.entry.js +3 -0
  55. package/dist/esm/vertex-tabs.entry.js +4 -0
  56. package/dist/esm/vertex-tooltip.entry.js +2 -1
  57. package/dist/types/components/icon/icons/pmi.d.ts +3 -0
  58. package/dist/types/components/index.d.ts +2 -0
  59. package/dist/types/components/tab/tab.d.ts +11 -0
  60. package/dist/types/components/tab/util.d.ts +1 -0
  61. package/dist/types/components/tabs/tabs.d.ts +23 -0
  62. package/dist/types/components.d.ts +51 -0
  63. package/dist/types/types/icon.d.ts +1 -0
  64. package/package.json +2 -2
  65. package/dist/components/p-0b1cdc8a.entry.js +0 -1
  66. package/dist/components/p-90a530df.entry.js +0 -1
  67. package/dist/components/p-92930f2a.js +0 -1
  68. package/dist/components/p-9340952f.entry.js +0 -1
@@ -11,7 +11,7 @@ const patchEsm = () => {
11
11
  const defineCustomElements = (win, options) => {
12
12
  if (typeof window === 'undefined') return Promise.resolve();
13
13
  return patchEsm().then(() => {
14
- return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"replacementUriType":[1,"replacement-uri-type"],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-toggle",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group",[[1,"vertex-avatar-group"]]],["vertex-badge",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading",[[1,"vertex-logo-loading"]]],["vertex-menu-divider",[[1,"vertex-menu-divider"]]],["vertex-menu-item",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-expandable",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-textfield",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-tooltip",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-circle",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-auto-resize-textarea",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-menu",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]]], options);
14
+ return bootstrapLazy([["vertex-click-to-edit-textfield",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"replacementUriType":[1,"replacement-uri-type"],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-toggle",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group",[[1,"vertex-avatar-group"]]],["vertex-badge",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading",[[1,"vertex-logo-loading"]]],["vertex-menu-divider",[[1,"vertex-menu-divider"]]],["vertex-menu-item",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-tab",[[1,"vertex-tab",{"label":[1],"active":[4]}]]],["vertex-tabs",[[1,"vertex-tabs",{"active":[1025],"labels":[32],"activeBounds":[32],"activeButtonEl":[32]}]]],["vertex-expandable",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-textfield",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-tooltip",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-circle",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-auto-resize-textarea",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-menu",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]]], options);
15
15
  });
16
16
  };
17
17
 
@@ -0,0 +1,24 @@
1
+ import { r as registerInstance, e as createEvent, h, H as Host } from './index-72f28b71.js';
2
+ import { c as classnames } from './index-9c609209.js';
3
+
4
+ const tabCss = ":host{position:relative;width:100%;height:100%}.content{display:none;height:0px}.content.active{display:flex;width:100%;height:100%}";
5
+
6
+ const Tab = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.tabClick = createEvent(this, "tabClick", 7);
10
+ this.handleClick = () => {
11
+ this.tabClick.emit(this.label);
12
+ };
13
+ this.label = undefined;
14
+ this.active = false;
15
+ }
16
+ render() {
17
+ return (h(Host, null, h("div", { class: classnames('content', {
18
+ active: this.active,
19
+ }) }, h("slot", null))));
20
+ }
21
+ };
22
+ Tab.style = tabCss;
23
+
24
+ export { Tab as T };
@@ -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 };
@@ -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,10 +2051,6 @@ 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;
@@ -1,4 +1,4 @@
1
- export { I as vertex_icon_button } from './icon-button-b0992730.js';
1
+ export { I as vertex_icon_button } from './icon-button-4820c5f8.js';
2
2
  import './index-72f28b71.js';
3
3
  import './index-9c609209.js';
4
- import './icon-helper-cf9f8ca1.js';
4
+ import './icon-helper-091fab53.js';
@@ -1,4 +1,4 @@
1
- export { I as vertex_icon } from './icon-c48d1e4c.js';
1
+ export { I as vertex_icon } from './icon-788d26c9.js';
2
2
  import './index-72f28b71.js';
3
3
  import './index-9c609209.js';
4
- import './icon-helper-cf9f8ca1.js';
4
+ import './icon-helper-091fab53.js';
@@ -0,0 +1,3 @@
1
+ export { T as vertex_tab } from './tab-c76332b0.js';
2
+ import './index-72f28b71.js';
3
+ import './index-9c609209.js';
@@ -0,0 +1,4 @@
1
+ export { T as vertex_tabs } from './tabs-8e5353ba.js';
2
+ import './index-72f28b71.js';
3
+ import './index-9c609209.js';
4
+ import './dom-613e2677.js';
@@ -1,5 +1,6 @@
1
- export { T as vertex_tooltip } from './tooltip-933da261.js';
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';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { h } from '../../../stencil-public-runtime';
3
+ export declare const PMI: () => h.JSX.IntrinsicElements;
@@ -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';
@@ -0,0 +1,11 @@
1
+ import { EventEmitter, h } from '../../stencil-public-runtime';
2
+ export declare class Tab {
3
+ /**
4
+ * The label to include in tab list.
5
+ */
6
+ label: string;
7
+ active: boolean;
8
+ tabClick: EventEmitter<string>;
9
+ render(): h.JSX.IntrinsicElements;
10
+ private handleClick;
11
+ }
@@ -0,0 +1 @@
1
+ export declare function isTabElement(element: Element): element is HTMLVertexTabElement;
@@ -0,0 +1,23 @@
1
+ import { EventEmitter, h } from '../../stencil-public-runtime';
2
+ export declare class Tabs {
3
+ active?: string;
4
+ private labels;
5
+ private activeBounds?;
6
+ private activeButtonEl?;
7
+ private hostEl;
8
+ /**
9
+ * An event that is emitted whenever the selected tab changes
10
+ * and contains the label of the newly selected tab.
11
+ */
12
+ selectedTabChanged: EventEmitter<string>;
13
+ private indicatorInitialized;
14
+ componentWillLoad(): void;
15
+ componentDidLoad(): void;
16
+ protected componentDidUpdate(): void;
17
+ protected handleActiveButtonChange(): void;
18
+ render(): h.JSX.IntrinsicElements;
19
+ private handleLabelClick;
20
+ private updateActiveOnTab;
21
+ private findTabByLabel;
22
+ private updateTabLabels;
23
+ }
@@ -675,6 +675,16 @@ export namespace Components {
675
675
  */
676
676
  "size": SpinnerSize;
677
677
  }
678
+ interface VertexTab {
679
+ "active": boolean;
680
+ /**
681
+ * The label to include in tab list.
682
+ */
683
+ "label": string;
684
+ }
685
+ interface VertexTabs {
686
+ "active"?: string;
687
+ }
678
688
  interface VertexTextfield {
679
689
  /**
680
690
  * Sets autoComplete attribute on <input>
@@ -883,6 +893,14 @@ export interface VertexSliderCustomEvent<T> extends CustomEvent<T> {
883
893
  detail: T;
884
894
  target: HTMLVertexSliderElement;
885
895
  }
896
+ export interface VertexTabCustomEvent<T> extends CustomEvent<T> {
897
+ detail: T;
898
+ target: HTMLVertexTabElement;
899
+ }
900
+ export interface VertexTabsCustomEvent<T> extends CustomEvent<T> {
901
+ detail: T;
902
+ target: HTMLVertexTabsElement;
903
+ }
886
904
  export interface VertexTextfieldCustomEvent<T> extends CustomEvent<T> {
887
905
  detail: T;
888
906
  target: HTMLVertexTextfieldElement;
@@ -1100,6 +1118,18 @@ declare global {
1100
1118
  prototype: HTMLVertexSpinnerElement;
1101
1119
  new (): HTMLVertexSpinnerElement;
1102
1120
  };
1121
+ interface HTMLVertexTabElement extends Components.VertexTab, HTMLStencilElement {
1122
+ }
1123
+ var HTMLVertexTabElement: {
1124
+ prototype: HTMLVertexTabElement;
1125
+ new (): HTMLVertexTabElement;
1126
+ };
1127
+ interface HTMLVertexTabsElement extends Components.VertexTabs, HTMLStencilElement {
1128
+ }
1129
+ var HTMLVertexTabsElement: {
1130
+ prototype: HTMLVertexTabsElement;
1131
+ new (): HTMLVertexTabsElement;
1132
+ };
1103
1133
  interface HTMLVertexTextfieldElement extends Components.VertexTextfield, HTMLStencilElement {
1104
1134
  }
1105
1135
  var HTMLVertexTextfieldElement: {
@@ -1159,6 +1189,8 @@ declare global {
1159
1189
  "vertex-select": HTMLVertexSelectElement;
1160
1190
  "vertex-slider": HTMLVertexSliderElement;
1161
1191
  "vertex-spinner": HTMLVertexSpinnerElement;
1192
+ "vertex-tab": HTMLVertexTabElement;
1193
+ "vertex-tabs": HTMLVertexTabsElement;
1162
1194
  "vertex-textfield": HTMLVertexTextfieldElement;
1163
1195
  "vertex-toast": HTMLVertexToastElement;
1164
1196
  "vertex-toggle": HTMLVertexToggleElement;
@@ -1937,6 +1969,21 @@ declare namespace LocalJSX {
1937
1969
  */
1938
1970
  "size"?: SpinnerSize;
1939
1971
  }
1972
+ interface VertexTab {
1973
+ "active"?: boolean;
1974
+ /**
1975
+ * The label to include in tab list.
1976
+ */
1977
+ "label": string;
1978
+ "onTabClick"?: (event: VertexTabCustomEvent<string>) => void;
1979
+ }
1980
+ interface VertexTabs {
1981
+ "active"?: string;
1982
+ /**
1983
+ * An event that is emitted whenever the selected tab changes and contains the label of the newly selected tab.
1984
+ */
1985
+ "onSelectedTabChanged"?: (event: VertexTabsCustomEvent<string>) => void;
1986
+ }
1940
1987
  interface VertexTextfield {
1941
1988
  /**
1942
1989
  * Sets autoComplete attribute on <input>
@@ -2118,6 +2165,8 @@ declare namespace LocalJSX {
2118
2165
  "vertex-select": VertexSelect;
2119
2166
  "vertex-slider": VertexSlider;
2120
2167
  "vertex-spinner": VertexSpinner;
2168
+ "vertex-tab": VertexTab;
2169
+ "vertex-tabs": VertexTabs;
2121
2170
  "vertex-textfield": VertexTextfield;
2122
2171
  "vertex-toast": VertexToast;
2123
2172
  "vertex-toggle": VertexToggle;
@@ -2162,6 +2211,8 @@ declare module "@stencil/core" {
2162
2211
  "vertex-select": LocalJSX.VertexSelect & JSXBase.HTMLAttributes<HTMLVertexSelectElement>;
2163
2212
  "vertex-slider": LocalJSX.VertexSlider & JSXBase.HTMLAttributes<HTMLVertexSliderElement>;
2164
2213
  "vertex-spinner": LocalJSX.VertexSpinner & JSXBase.HTMLAttributes<HTMLVertexSpinnerElement>;
2214
+ "vertex-tab": LocalJSX.VertexTab & JSXBase.HTMLAttributes<HTMLVertexTabElement>;
2215
+ "vertex-tabs": LocalJSX.VertexTabs & JSXBase.HTMLAttributes<HTMLVertexTabsElement>;
2165
2216
  "vertex-textfield": LocalJSX.VertexTextfield & JSXBase.HTMLAttributes<HTMLVertexTextfieldElement>;
2166
2217
  "vertex-toast": LocalJSX.VertexToast & JSXBase.HTMLAttributes<HTMLVertexToastElement>;
2167
2218
  "vertex-toggle": LocalJSX.VertexToggle & JSXBase.HTMLAttributes<HTMLVertexToggleElement>;
@@ -88,6 +88,7 @@ export declare enum IconNames {
88
88
  'pin-text-fill' = "pin-text-fill",
89
89
  'pin-text-square' = "pin-text-square",
90
90
  'plus' = "plus",
91
+ 'pmi' = "pmi",
91
92
  'precise-measurement' = "precise-measurement",
92
93
  'rabbit' = "rabbit",
93
94
  'reset' = "reset",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertexvis/ui",
3
- "version": "0.1.0-canary.11",
3
+ "version": "0.1.0-canary.13",
4
4
  "description": "The Vertex UI component library.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -87,5 +87,5 @@
87
87
  "@vertexvis/utils": "^0.21.0",
88
88
  "fast-deep-equal": "^3.1.3"
89
89
  },
90
- "gitHead": "bd38057f445e078df48f0888b3a247884620d13b"
90
+ "gitHead": "53757193daeb9741ba4bbd83f922c2f1b2952a86"
91
91
  }
@@ -1 +0,0 @@
1
- export{T as vertex_tooltip}from"./p-92930f2a.js";import"./p-6834631c.js";import"./p-59032668.js";import"./p-fe062eb0.js";import"./p-b2c7b113.js";
@@ -1 +0,0 @@
1
- export{I as vertex_icon}from"./p-91811c21.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-f007c274.js";
@@ -1 +0,0 @@
1
- import{r as t,h as n,H as r,g as e}from"./p-6834631c.js";import{_ as i,a as o}from"./p-59032668.js";import{c as u}from"./p-fe062eb0.js";import{a as s}from"./p-b2c7b113.js";var a;a=Error,i((function t(n){var r=a.call(this,"Validation error mapping object.")||this;return r.errors=n,Object.setPrototypeOf(r,t.prototype),r}),a);var c,f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},h={exports:{}};!function(t,n){var r="__lodash_hash_undefined__",e=9007199254740991,i="[object Arguments]",o="[object Array]",u="[object Boolean]",s="[object Date]",a="[object Error]",c="[object Function]",h="[object Map]",l="[object Number]",v="[object Object]",d="[object Promise]",p="[object RegExp]",b="[object Set]",y="[object String]",g="[object WeakMap]",m="[object ArrayBuffer]",j="[object DataView]",w=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[i]=_[o]=_[m]=_[u]=_[j]=_[s]=_[a]=_[c]=_[h]=_[l]=_[v]=_[p]=_[b]=_[y]=_[g]=!1;var B="object"==typeof f&&f&&f.Object===Object&&f,I="object"==typeof self&&self&&self.Object===Object&&self,C=B||I||Function("return this")(),O=n&&!n.nodeType&&n,E=O&&t&&!t.nodeType&&t,A=E&&E.exports===O,P=A&&B.process,S=function(){try{return P&&P.binding&&P.binding("util")}catch(t){}}(),$=S&&S.isTypedArray;function k(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}function T(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function D(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}var M,U,F,L=Array.prototype,V=Object.prototype,R=C["__core-js_shared__"],N=Function.prototype.toString,W=V.hasOwnProperty,z=(M=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+M:"",G=V.toString,H=RegExp("^"+N.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=A?C.Buffer:void 0,J=C.Symbol,K=C.Uint8Array,Q=V.propertyIsEnumerable,X=L.splice,Y=J?J.toStringTag:void 0,Z=Object.getOwnPropertySymbols,tt=q?q.isBuffer:void 0,nt=(U=Object.keys,F=Object,function(t){return U(F(t))}),rt=Ot(C,"DataView"),et=Ot(C,"Map"),it=Ot(C,"Promise"),ot=Ot(C,"Set"),ut=Ot(C,"WeakMap"),st=Ot(Object,"create"),at=St(rt),ct=St(et),ft=St(it),ht=St(ot),lt=St(ut),vt=J?J.prototype:void 0,dt=vt?vt.valueOf:void 0;function pt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function bt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function yt(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function gt(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new yt;++n<r;)this.add(t[n])}function mt(t){var n=this.__data__=new bt(t);this.size=n.size}function jt(t,n){for(var r=t.length;r--;)if($t(t[r][0],n))return r;return-1}function wt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Y&&Y in Object(t)?function(t){var n=W.call(t,Y),r=t[Y];try{t[Y]=void 0;var e=!0}catch(t){}var i=G.call(t);return e&&(n?t[Y]=r:delete t[Y]),i}(t):function(t){return G.call(t)}(t)}function xt(t){return Lt(t)&&wt(t)==i}function _t(t,n,r,e,c){return t===n||(null==t||null==n||!Lt(t)&&!Lt(n)?t!=t&&n!=n:function(t,n,r,e,c,f){var d=Tt(t),g=Tt(n),w=d?o:At(t),x=g?o:At(n),_=(w=w==i?v:w)==v,B=(x=x==i?v:x)==v,I=w==x;if(I&&Dt(t)){if(!Dt(n))return!1;d=!0,_=!1}if(I&&!_)return f||(f=new mt),d||Vt(t)?Bt(t,n,r,e,c,f):function(t,n,r,e,i,o,c){switch(r){case j:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case m:return!(t.byteLength!=n.byteLength||!o(new K(t),new K(n)));case u:case s:case l:return $t(+t,+n);case a:return t.name==n.name&&t.message==n.message;case p:case y:return t==n+"";case h:var f=T;case b:if(f||(f=D),t.size!=n.size&&!(1&e))return!1;var v=c.get(t);if(v)return v==n;e|=2,c.set(t,n);var d=Bt(f(t),f(n),e,i,o,c);return c.delete(t),d;case"[object Symbol]":if(dt)return dt.call(t)==dt.call(n)}return!1}(t,n,w,r,e,c,f);if(!(1&r)){var C=_&&W.call(t,"__wrapped__"),O=B&&W.call(n,"__wrapped__");if(C||O){var E=C?t.value():t,A=O?n.value():n;return f||(f=new mt),c(E,A,r,e,f)}}return!!I&&(f||(f=new mt),function(t,n,r,e,i,o){var u=1&r,s=It(t),a=s.length;if(a!=It(n).length&&!u)return!1;for(var c=a;c--;){var f=s[c];if(!(u?f in n:W.call(n,f)))return!1}var h=o.get(t);if(h&&o.get(n))return h==n;var l=!0;o.set(t,n),o.set(n,t);for(var v=u;++c<a;){var d=t[f=s[c]],p=n[f];if(e)var b=u?e(p,d,f,n,t,o):e(d,p,f,t,n,o);if(!(void 0===b?d===p||i(d,p,r,e,o):b)){l=!1;break}v||(v="constructor"==f)}if(l&&!v){var y=t.constructor,g=n.constructor;y==g||!("constructor"in t)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(l=!1)}return o.delete(t),o.delete(n),l}(t,n,r,e,c,f))}(t,n,r,e,_t,c))}function Bt(t,n,r,e,i,o){var u=1&r,s=t.length,a=n.length;if(s!=a&&!(u&&a>s))return!1;var c=o.get(t);if(c&&o.get(n))return c==n;var f=-1,h=!0,l=2&r?new gt:void 0;for(o.set(t,n),o.set(n,t);++f<s;){var v=t[f],d=n[f];if(e)var p=u?e(d,v,f,n,t,o):e(v,d,f,t,n,o);if(void 0!==p){if(p)continue;h=!1;break}if(l){if(!k(n,(function(t,n){if(!l.has(n)&&(v===t||i(v,t,r,e,o)))return l.push(n)}))){h=!1;break}}else if(v!==d&&!i(v,d,r,e,o)){h=!1;break}}return o.delete(t),o.delete(n),h}function It(t){return function(t,n,r){var e=n(t);return Tt(t)?e:function(t,n){for(var r=-1,e=n.length,i=t.length;++r<e;)t[i+r]=n[r];return t}(e,r(t))}(t,Rt,Et)}function Ct(t,n){var r,e,i=t.__data__;return("string"==(e=typeof(r=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==r:null===r)?i["string"==typeof n?"string":"hash"]:i.map}function Ot(t,n){var r=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!Ft(t)||function(t){return!!z&&z in t}(t))&&(Mt(t)?H:w).test(St(t))}(r)?r:void 0}pt.prototype.clear=function(){this.__data__=st?st(null):{},this.size=0},pt.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},pt.prototype.get=function(t){var n=this.__data__;if(st){var e=n[t];return e===r?void 0:e}return W.call(n,t)?n[t]:void 0},pt.prototype.has=function(t){var n=this.__data__;return st?void 0!==n[t]:W.call(n,t)},pt.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=st&&void 0===n?r:n,this},bt.prototype.clear=function(){this.__data__=[],this.size=0},bt.prototype.delete=function(t){var n=this.__data__,r=jt(n,t);return!(r<0||(r==n.length-1?n.pop():X.call(n,r,1),--this.size,0))},bt.prototype.get=function(t){var n=this.__data__,r=jt(n,t);return r<0?void 0:n[r][1]},bt.prototype.has=function(t){return jt(this.__data__,t)>-1},bt.prototype.set=function(t,n){var r=this.__data__,e=jt(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},yt.prototype.clear=function(){this.size=0,this.__data__={hash:new pt,map:new(et||bt),string:new pt}},yt.prototype.delete=function(t){var n=Ct(this,t).delete(t);return this.size-=n?1:0,n},yt.prototype.get=function(t){return Ct(this,t).get(t)},yt.prototype.has=function(t){return Ct(this,t).has(t)},yt.prototype.set=function(t,n){var r=Ct(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},gt.prototype.add=gt.prototype.push=function(t){return this.__data__.set(t,r),this},gt.prototype.has=function(t){return this.__data__.has(t)},mt.prototype.clear=function(){this.__data__=new bt,this.size=0},mt.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},mt.prototype.get=function(t){return this.__data__.get(t)},mt.prototype.has=function(t){return this.__data__.has(t)},mt.prototype.set=function(t,n){var r=this.__data__;if(r instanceof bt){var e=r.__data__;if(!et||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new yt(e)}return r.set(t,n),this.size=r.size,this};var Et=Z?function(t){return null==t?[]:(t=Object(t),function(n){for(var r=-1,e=null==n?0:n.length,i=0,o=[];++r<e;){var u=n[r];Q.call(t,u)&&(o[i++]=u)}return o}(Z(t)))}:function(){return[]},At=wt;function Pt(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||x.test(t))&&t>-1&&t%1==0&&t<n}function St(t){if(null!=t){try{return N.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function $t(t,n){return t===n||t!=t&&n!=n}(rt&&At(new rt(new ArrayBuffer(1)))!=j||et&&At(new et)!=h||it&&At(it.resolve())!=d||ot&&At(new ot)!=b||ut&&At(new ut)!=g)&&(At=function(t){var n=wt(t),r=n==v?t.constructor:void 0,e=r?St(r):"";if(e)switch(e){case at:return j;case ct:return h;case ft:return d;case ht:return b;case lt:return g}return n});var kt=xt(function(){return arguments}())?xt:function(t){return Lt(t)&&W.call(t,"callee")&&!Q.call(t,"callee")},Tt=Array.isArray,Dt=tt||function(){return!1};function Mt(t){if(!Ft(t))return!1;var n=wt(t);return n==c||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Ut(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}function Ft(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Lt(t){return null!=t&&"object"==typeof t}var Vt=$?function(t){return function(n){return t(n)}}($):function(t){return Lt(t)&&Ut(t.length)&&!!_[wt(t)]};function Rt(t){return null!=(n=t)&&Ut(n.length)&&!Mt(n)?function(t,n){var r=Tt(t),e=!r&&kt(t),i=!r&&!e&&Dt(t),o=!r&&!e&&!i&&Vt(t),u=r||e||i||o,s=u?function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}(t.length,String):[],a=s.length;for(var c in t)!n&&!W.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Pt(c,a))||s.push(c);return s}(t):function(t){if((n=t)!==("function"==typeof(r=n&&n.constructor)&&r.prototype||V))return nt(t);var n,r,e=[];for(var i in Object(t))W.call(t,i)&&"constructor"!=i&&e.push(i);return e}(t);var n}t.exports=function(t,n){return _t(t,n)}}(h,h.exports);var l=new Uint8Array(16);function v(){if(!c&&!(c="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return c(l)}var d=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function p(t){return"string"==typeof t&&d.test(t)}for(var b=[],y=0;y<256;++y)b.push((y+256).toString(16).substr(1));function g(t,n,r){var e=(t=t||{}).random||(t.rng||v)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,n){r=r||0;for(var i=0;i<16;++i)n[r+i]=e[i];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(b[t[n+0]]+b[t[n+1]]+b[t[n+2]]+b[t[n+3]]+"-"+b[t[n+4]]+b[t[n+5]]+"-"+b[t[n+6]]+b[t[n+7]]+"-"+b[t[n+8]]+b[t[n+9]]+"-"+b[t[n+10]]+b[t[n+11]]+b[t[n+12]]+b[t[n+13]]+b[t[n+14]]+b[t[n+15]]).toLowerCase();if(!p(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var m=Object.freeze({__proto__:null,create:function(){return g()},fromMsbLsb:function(t,n){function r(t,n){var r=BigInt(1)<<n*BigInt(4);return(r|t&r-BigInt(1)).toString(16).substring(1)}var e="string"==typeof t?BigInt(t):t,i="string"==typeof n?BigInt(n):n,o=r(e>>BigInt(32),BigInt(8)),u=r(e>>BigInt(16),BigInt(4)),s=r(e,BigInt(4)),a=r(i>>BigInt(48),BigInt(4)),c=r(i,BigInt(12));return"".concat(o,"-").concat(u,"-").concat(s,"-").concat(a,"-").concat(c)},toMsbLsb:function(t){var n=o(t.split("-"),5),r=n[0],e=n[1],i=n[2],u=n[3],s=n[4];if(null==r||null==e||null==i||null==u||null==s)throw new Error("Invalid UUID string ".concat(t));var a=BigInt.asIntN(64,BigInt("0x".concat(r+e+i))),c=BigInt.asIntN(64,BigInt("0x".concat(u+s)));return{msb:a.toString(),lsb:c.toString()}}});const j=class{constructor(n){t(this,n),this.pointerEntered=!1,this.content=void 0,this.disabled=void 0,this.placement="bottom",this.delay=500,this.animated=!0,this.open=!1,this.handlePointerEnter=this.handlePointerEnter.bind(this),this.handlePointerLeave=this.handlePointerLeave.bind(this),this.handleContentChange=this.handleContentChange.bind(this),this.handleDisabledChange=this.handleDisabledChange.bind(this),this.tooltipId=`vertex-tooltip-${m.create()}`}disconnectedCallback(){this.removeElement(),this.clearOpenTimeout(),this.pointerEntered=!1}handleContentChange(){null!=this.internalContentElement&&this.updateContentElementChildren(this.internalContentElement)}handleDisabledChange(){null!=this.internalContentElement&&this.updateContentElementClass(this.internalContentElement),!this.disabled&&this.pointerEntered&&this.handlePointerEnter()}render(){return n(r,null,n("div",{class:"target",ref:t=>{this.targetElement=t},onPointerEnter:this.handlePointerEnter,onPointerLeave:this.handlePointerLeave},n("slot",null)),n("div",{class:"content-hidden",ref:t=>{this.contentElement=t}},n("slot",{name:"content",onSlotchange:this.handleContentChange})))}addElement(){if(null!=this.targetElement){const t=this.createPopoverElement(this.targetElement),n=this.createContentElement();this.updateContentElementChildren(n),t.appendChild(n),this.hostElement.ownerDocument.body.appendChild(t)}}removeElement(){const t=this.hostElement.ownerDocument.getElementById(this.tooltipId);null!=t&&t.remove(),this.internalContentElement=void 0}createPopoverElement(t){const n=this.hostElement.ownerDocument.createElement("vertex-popover");return n.id=this.tooltipId,n.setAttribute("class","vertex-tooltip-popover"),n.open=this.open,n.resizeBehavior="fixed",n.backdrop=!1,n.placement=this.placement,n.animated=this.animated,n.anchorBounds=t.getBoundingClientRect(),n}createContentElement(){return this.internalContentElement=this.hostElement.ownerDocument.createElement("div"),this.internalContentElement.setAttribute("class",u("vertex-tooltip-content",{hidden:!this.open||this.disabled})),this.internalContentElement}updateContentElementClass(t){t.setAttribute("class",u("vertex-tooltip-content",{hidden:!this.open||this.disabled}))}updateContentElementChildren(t){var n;this.displayedSlottedContent=null!==(n=s(this.contentElement))&&void 0!==n?n:this.displayedSlottedContent,null!=this.content?t.innerText=this.content:null!=this.displayedSlottedContent&&t.appendChild(this.displayedSlottedContent)}handlePointerEnter(){null!=this.openTimeout||this.disabled?null==this.openTimeout&&(this.pointerEntered=!0):this.createOpenTimeout()}handlePointerLeave(){this.clearOpenTimeout(),this.removeElement(),this.open=!1,this.pointerEntered=!1}createOpenTimeout(){this.openTimeout=setTimeout((()=>{this.open=!0,this.openTimeout=void 0,this.addElement()}),this.delay),this.pointerEntered=!1}clearOpenTimeout(){null!=this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=void 0)}get hostElement(){return e(this)}static get watchers(){return{content:["handleContentChange"],disabled:["handleDisabledChange"]}}};j.style=":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}";export{j as T}
@@ -1 +0,0 @@
1
- export{I as vertex_icon_button}from"./p-08f0434e.js";import"./p-6834631c.js";import"./p-fe062eb0.js";import"./p-f007c274.js";