@vertexvis/ui 0.1.0-canary.2 → 0.1.0-canary.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/cjs/{color-circle-picker-13396ec4.js → color-circle-picker-a8f9a80a.js} +1 -1
  2. package/dist/cjs/color-picker-2a4820fa.js +46 -0
  3. package/dist/cjs/{color-circle-05be54bf.js → color-swatch-8aaf6c0b.js} +42 -17
  4. package/dist/cjs/components.cjs.js +1 -1
  5. package/dist/cjs/{dialog-88e2308a.js → dialog-34f1dd6e.js} +1 -1
  6. package/dist/cjs/dom-b6c5fbf4.js +13 -0
  7. package/dist/cjs/{icon-460fd0f5.js → icon-2a64c9ca.js} +1 -1
  8. package/dist/cjs/{icon-button-786427d6.js → icon-button-10617d04.js} +1 -1
  9. package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-e02da963.js} +55 -0
  10. package/dist/cjs/index.cjs.js +20 -14
  11. package/dist/cjs/lib-1bd1e383.js +9 -0
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/{popover-d9ec8e10.js → popover-942209b8.js} +23 -1
  14. package/dist/cjs/{result-list-1e592c3c.js → result-list-241ffe8d.js} +46 -2
  15. package/dist/cjs/search-bar-2e7ee35a.js +527 -0
  16. package/dist/cjs/{select-0eb7203f.js → select-2b2bdb97.js} +27 -4
  17. package/dist/cjs/tab-4335cd8f.js +26 -0
  18. package/dist/cjs/tabs-ece62a01.js +111 -0
  19. package/dist/cjs/{text-field-0397fb34.js → text-field-bccbde1f.js} +1 -0
  20. package/dist/cjs/{tooltip-80a7b722.js → tooltip-9ac797a0.js} +59 -23
  21. package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
  22. package/dist/cjs/vertex-color-picker.cjs.entry.js +2 -1
  23. package/dist/cjs/vertex-color-swatch.cjs.entry.js +12 -0
  24. package/dist/cjs/vertex-dialog.cjs.entry.js +1 -1
  25. package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
  26. package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
  27. package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
  28. package/dist/cjs/vertex-result-list.cjs.entry.js +1 -1
  29. package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/vertex-select.cjs.entry.js +1 -1
  31. package/dist/cjs/{vertex-color-circle.cjs.entry.js → vertex-tab.cjs.entry.js} +3 -2
  32. package/dist/cjs/vertex-tabs.cjs.entry.js +12 -0
  33. package/dist/cjs/vertex-textfield.cjs.entry.js +1 -1
  34. package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -1
  35. package/dist/collection/collection-manifest.json +5 -3
  36. package/dist/collection/components/color-circle-picker/color-circle-picker.js +7 -7
  37. package/dist/collection/components/color-picker/color-picker.css +95 -15
  38. package/dist/collection/components/color-picker/color-picker.js +57 -3
  39. package/dist/collection/components/color-swatch/color-swatch.css +43 -0
  40. package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js} +96 -23
  41. package/dist/collection/components/color-swatch/lib.js +5 -0
  42. package/dist/collection/components/dialog/dialog.css +0 -1
  43. package/dist/collection/components/icon/icon-helper.js +30 -0
  44. package/dist/collection/components/icon/icon.js +1 -1
  45. package/dist/collection/components/icon/icons/caution.js +2 -0
  46. package/dist/collection/components/icon/icons/compare.js +2 -0
  47. package/dist/collection/components/icon/icons/compress.js +2 -0
  48. package/dist/collection/components/icon/icons/cube-stack.js +2 -0
  49. package/dist/collection/components/icon/icons/expand.js +2 -0
  50. package/dist/collection/components/icon/icons/pin-text-square.js +2 -0
  51. package/dist/collection/components/icon/icons/plus-with-arrow.js +2 -0
  52. package/dist/collection/components/icon/icons/pmi.js +2 -0
  53. package/dist/collection/components/icon/icons/update.js +2 -0
  54. package/dist/collection/components/icon/icons/views.js +2 -0
  55. package/dist/collection/components/icon-button/icon-button.js +1 -1
  56. package/dist/collection/components/index.js +3 -1
  57. package/dist/collection/components/menu/menu.js +1 -1
  58. package/dist/collection/components/popover/popover.js +51 -0
  59. package/dist/collection/components/result-list/result-list.js +52 -5
  60. package/dist/collection/components/result-list/types.js +1 -0
  61. package/dist/collection/components/search-bar/dom.js +29 -0
  62. package/dist/collection/components/search-bar/lib.js +76 -15
  63. package/dist/collection/components/search-bar/search-bar.css +0 -16
  64. package/dist/collection/components/search-bar/search-bar.js +429 -320
  65. package/dist/collection/components/select/select.css +24 -0
  66. package/dist/collection/components/select/select.js +49 -2
  67. package/dist/collection/components/tab/tab.css +16 -0
  68. package/dist/collection/components/tab/tab.js +85 -0
  69. package/dist/collection/components/tab/util.js +3 -0
  70. package/dist/collection/components/tabs/tabs.css +67 -0
  71. package/dist/collection/components/tabs/tabs.js +159 -0
  72. package/dist/collection/components/text-field/text-field.js +1 -0
  73. package/dist/collection/components/tooltip/tooltip.js +62 -18
  74. package/dist/collection/types/icon.js +10 -0
  75. package/dist/collection/util/templates/element-pool.js +19 -1
  76. package/dist/components/components.css +1 -1
  77. package/dist/components/components.esm.js +1 -1
  78. package/dist/components/index.esm.js +1 -1
  79. package/dist/components/{p-165aed7d.js → p-0d4a0d61.js} +1 -1
  80. package/dist/components/{p-9374ef6c.js → p-1367d3af.js} +1 -1
  81. package/dist/components/p-1d08dd79.entry.js +1 -0
  82. package/dist/components/p-22b31415.js +1 -0
  83. package/dist/components/p-2ae8175d.entry.js +1 -0
  84. package/dist/components/p-2b4aedaa.entry.js +1 -0
  85. package/dist/components/p-3438c441.js +1 -0
  86. package/dist/components/p-3dd7a75f.entry.js +1 -0
  87. package/dist/components/p-406e73da.entry.js +1 -0
  88. package/dist/components/p-4327deea.js +1 -0
  89. package/dist/components/p-43b1b3f9.js +1 -0
  90. package/dist/components/{p-103249b4.js → p-55cb5c21.js} +1 -1
  91. package/dist/components/p-606596de.entry.js +1 -0
  92. package/dist/components/p-655053df.js +1 -0
  93. package/dist/components/p-69496858.js +1 -0
  94. package/dist/components/p-6a49c365.entry.js +1 -0
  95. package/dist/components/p-6b6c2260.js +1 -0
  96. package/dist/components/p-6b862967.js +1 -0
  97. package/dist/components/p-76b961b8.js +1 -0
  98. package/dist/components/{p-ca52a423.js → p-87e1b90c.js} +1 -1
  99. package/dist/components/p-8bbc344d.entry.js +1 -0
  100. package/dist/components/p-96f55673.js +1 -0
  101. package/dist/components/p-a0eac69c.entry.js +1 -0
  102. package/dist/components/p-b4cc4527.entry.js +1 -0
  103. package/dist/components/p-c2706288.js +1 -0
  104. package/dist/components/p-d3d2a217.entry.js +1 -0
  105. package/dist/components/p-d3fd9ca3.entry.js +1 -0
  106. package/dist/components/p-d539f530.js +1 -0
  107. package/dist/components/p-e35057b5.entry.js +1 -0
  108. package/dist/components/p-ee496965.entry.js +1 -0
  109. package/dist/components/p-ff7c70b9.js +1 -0
  110. package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-e2a2cfb5.js} +1 -1
  111. package/dist/esm/color-picker-1d67effe.js +44 -0
  112. package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
  113. package/dist/esm/components.js +1 -1
  114. package/dist/esm/{dialog-e3f49527.js → dialog-1cef715c.js} +1 -1
  115. package/dist/esm/dom-613e2677.js +10 -0
  116. package/dist/esm/{icon-d37150b4.js → icon-66108b5e.js} +1 -1
  117. package/dist/esm/{icon-button-aad3c0e7.js → icon-button-69915979.js} +1 -1
  118. package/dist/esm/{icon-helper-83f10f73.js → icon-helper-c07c7052.js} +55 -0
  119. package/dist/esm/index.js +17 -13
  120. package/dist/esm/lib-73fbca8b.js +7 -0
  121. package/dist/esm/loader.js +1 -1
  122. package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
  123. package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
  124. package/dist/esm/search-bar-8d18626e.js +525 -0
  125. package/dist/esm/{select-75ed5653.js → select-78aeff96.js} +27 -4
  126. package/dist/esm/tab-c76332b0.js +24 -0
  127. package/dist/esm/tabs-8e5353ba.js +109 -0
  128. package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
  129. package/dist/esm/{tooltip-97c1b3ec.js → tooltip-29278ea4.js} +58 -22
  130. package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
  131. package/dist/esm/vertex-color-picker.entry.js +2 -1
  132. package/dist/esm/vertex-color-swatch.entry.js +4 -0
  133. package/dist/esm/vertex-dialog.entry.js +1 -1
  134. package/dist/esm/vertex-icon-button.entry.js +2 -2
  135. package/dist/esm/vertex-icon.entry.js +2 -2
  136. package/dist/esm/vertex-popover.entry.js +1 -1
  137. package/dist/esm/vertex-result-list.entry.js +1 -1
  138. package/dist/esm/vertex-search-bar.entry.js +1 -1
  139. package/dist/esm/vertex-select.entry.js +1 -1
  140. package/dist/esm/vertex-tab.entry.js +3 -0
  141. package/dist/esm/vertex-tabs.entry.js +4 -0
  142. package/dist/esm/vertex-textfield.entry.js +1 -1
  143. package/dist/esm/vertex-tooltip.entry.js +2 -1
  144. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
  145. package/dist/types/components/color-picker/color-picker.d.ts +19 -0
  146. package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
  147. package/dist/types/components/color-swatch/lib.d.ts +1 -0
  148. package/dist/types/components/icon/icons/caution.d.ts +3 -0
  149. package/dist/types/components/icon/icons/compare.d.ts +3 -0
  150. package/dist/types/components/icon/icons/compress.d.ts +3 -0
  151. package/dist/types/components/icon/icons/cube-stack.d.ts +3 -0
  152. package/dist/types/components/icon/icons/expand.d.ts +3 -0
  153. package/dist/types/components/icon/icons/pin-text-square.d.ts +3 -0
  154. package/dist/types/components/icon/icons/plus-with-arrow.d.ts +3 -0
  155. package/dist/types/components/icon/icons/pmi.d.ts +3 -0
  156. package/dist/types/components/icon/icons/update.d.ts +3 -0
  157. package/dist/types/components/icon/icons/views.d.ts +3 -0
  158. package/dist/types/components/index.d.ts +3 -1
  159. package/dist/types/components/popover/popover.d.ts +7 -0
  160. package/dist/types/components/result-list/result-list.d.ts +6 -1
  161. package/dist/types/components/result-list/types.d.ts +4 -0
  162. package/dist/types/components/search-bar/dom.d.ts +8 -0
  163. package/dist/types/components/search-bar/lib.d.ts +31 -6
  164. package/dist/types/components/search-bar/search-bar.d.ts +125 -42
  165. package/dist/types/components/select/select.d.ts +8 -0
  166. package/dist/types/components/tab/tab.d.ts +11 -0
  167. package/dist/types/components/tab/util.d.ts +1 -0
  168. package/dist/types/components/tabs/tabs.d.ts +23 -0
  169. package/dist/types/components/tooltip/tooltip.d.ts +7 -0
  170. package/dist/types/components.d.ts +254 -96
  171. package/dist/types/types/icon.d.ts +10 -0
  172. package/dist/types/util/templates/element-pool.d.ts +10 -1
  173. package/package.json +4 -3
  174. package/dist/cjs/color-picker-876ace00.js +0 -37
  175. package/dist/cjs/search-bar-bb40cfa7.js +0 -290
  176. package/dist/collection/components/color-circle/color-circle.css +0 -18
  177. package/dist/components/p-03dbb28c.js +0 -1
  178. package/dist/components/p-0f8b9ede.entry.js +0 -1
  179. package/dist/components/p-19318fee.entry.js +0 -1
  180. package/dist/components/p-1d6cb015.entry.js +0 -1
  181. package/dist/components/p-209db2ba.entry.js +0 -1
  182. package/dist/components/p-20a74d5d.entry.js +0 -1
  183. package/dist/components/p-35e7ab78.entry.js +0 -1
  184. package/dist/components/p-4224c2ad.js +0 -1
  185. package/dist/components/p-52739247.js +0 -1
  186. package/dist/components/p-552c128f.js +0 -1
  187. package/dist/components/p-6505cdb3.js +0 -1
  188. package/dist/components/p-7dba2574.entry.js +0 -1
  189. package/dist/components/p-7f64b251.entry.js +0 -1
  190. package/dist/components/p-8434602f.js +0 -1
  191. package/dist/components/p-ae6a3c46.entry.js +0 -1
  192. package/dist/components/p-bd11e7d1.js +0 -1
  193. package/dist/components/p-d9b9aebe.js +0 -1
  194. package/dist/components/p-e576818b.entry.js +0 -1
  195. package/dist/components/p-ebabee40.entry.js +0 -1
  196. package/dist/components/p-f49a7ffd.js +0 -1
  197. package/dist/components/p-f71fc166.entry.js +0 -1
  198. package/dist/esm/color-picker-2e3b51fa.js +0 -35
  199. package/dist/esm/search-bar-59cc151d.js +0 -288
  200. package/dist/esm/vertex-color-circle.entry.js +0 -2
@@ -4,6 +4,18 @@
4
4
  the input size from changing as different options are selected.
5
5
  */
6
6
  --select-width: 100%;
7
+
8
+ /*
9
+ The white-space behavior of the text within this select input.
10
+ Defaults to `normal`.
11
+ */
12
+ --select-option-white-space: normal;
13
+
14
+ /*
15
+ The maximum height of the dropdown.
16
+ Defaults to `80vh`.
17
+ */
18
+ --max-dropdown-height: 80vh;
7
19
  }
8
20
 
9
21
  .root {
@@ -50,6 +62,12 @@
50
62
  border-radius: 4px;
51
63
  }
52
64
 
65
+ .text {
66
+ white-space: var(--select-option-white-space);
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ }
70
+
53
71
  .icon {
54
72
  padding-left: 1rem;
55
73
  margin-left: auto;
@@ -64,6 +82,8 @@
64
82
  top: -0.25rem;
65
83
  box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%),
66
84
  0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
85
+ max-height: var(--max-dropdown-height);
86
+ overflow-y: auto;
67
87
  }
68
88
 
69
89
  .options.animated {
@@ -93,6 +113,10 @@
93
113
  background-color: var(--vertex-ui-neutral-200);
94
114
  }
95
115
 
116
+ .options > slot::slotted([data-selected="true"]) {
117
+ display: none;
118
+ }
119
+
96
120
  vertex-popover {
97
121
  --transform-origin: top left;
98
122
  --open-animation-name: open-scale-y;
@@ -9,6 +9,7 @@ export class Select {
9
9
  this.placeholder = 'Select an option...';
10
10
  this.disabled = false;
11
11
  this.animated = true;
12
+ this.hideSelected = true;
12
13
  this.open = false;
13
14
  this.position = undefined;
14
15
  this.displayValue = undefined;
@@ -28,6 +29,9 @@ export class Select {
28
29
  if (this.value != null) {
29
30
  this.handleUpdateValue(this.value);
30
31
  }
32
+ else {
33
+ this.handleUpdateDisplayValue();
34
+ }
31
35
  }
32
36
  connectedCallback() {
33
37
  window.addEventListener('resize', this.getBounds);
@@ -45,6 +49,13 @@ export class Select {
45
49
  }
46
50
  this.controlled = value != null;
47
51
  }
52
+ handleUpdateDisplayValue() {
53
+ var _a;
54
+ this.clearSelectedOptionFlag();
55
+ if (this.hideSelected) {
56
+ (_a = this.getSelectedOption()) === null || _a === void 0 ? void 0 : _a.setAttribute('data-selected', 'true');
57
+ }
58
+ }
48
59
  render() {
49
60
  return (h("div", { class: classNames('root', {
50
61
  disabled: this.disabled,
@@ -53,7 +64,7 @@ export class Select {
53
64
  }, onClick: !this.open && !this.disabled ? this.handleOpen : undefined }, h("div", { class: classNames('target', {
54
65
  hidden: this.open,
55
66
  disabled: this.disabled,
56
- }) }, this.displayValue || this.placeholder, h("div", { class: "icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))), h("vertex-popover", { position: this.position, open: this.open, animated: this.animated, resizeBehavior: "fixed", onDismissed: this.handleDismiss }, h("div", { class: classNames('options', {
67
+ }) }, h("div", { class: "text" }, this.displayValue || this.placeholder), h("div", { class: "icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))), h("vertex-popover", { position: this.position, open: this.open, animated: this.animated, resizeBehavior: "fixed", onDismissed: this.handleDismiss }, h("div", { class: classNames('options', {
57
68
  hidden: !this.open,
58
69
  visible: this.open,
59
70
  animated: this.animated,
@@ -61,7 +72,7 @@ export class Select {
61
72
  minWidth: this.width != null ? `${this.width}px` : 'var(--select-width)',
62
73
  } }, h("div", { class: classNames('selected-option', {
63
74
  disabled: this.disabled,
64
- }), onClick: this.handleDismiss }, this.displayValue || this.placeholder, h("div", { class: "icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))), h("slot", null)))));
75
+ }), onClick: this.handleDismiss }, h("div", { class: "text" }, this.displayValue || this.placeholder), h("div", { class: "icon" }, h("vertex-icon", { name: "chevron-down", size: "sm" }))), h("slot", null)))));
65
76
  }
66
77
  handleOpen() {
67
78
  var _a, _b;
@@ -100,6 +111,15 @@ export class Select {
100
111
  this.removeListeners.forEach((l) => l());
101
112
  this.removeListeners = [];
102
113
  }
114
+ clearSelectedOptionFlag() {
115
+ var _a, _b;
116
+ (_b = (_a = this.slotElement) === null || _a === void 0 ? void 0 : _a.assignedElements) === null || _b === void 0 ? void 0 : _b.call(_a).forEach((e) => e.removeAttribute('data-selected'));
117
+ }
118
+ getSelectedOption() {
119
+ var _a, _b, _c;
120
+ const value = (_a = this.displayValue) !== null && _a !== void 0 ? _a : this.placeholder;
121
+ return (_c = (_b = this.slotElement) === null || _b === void 0 ? void 0 : _b.assignedElements) === null || _c === void 0 ? void 0 : _c.call(_b).find((e) => e.getAttribute('data-value') === value || e.innerHTML === value);
122
+ }
103
123
  getBounds() {
104
124
  if (this.getBoundsTimeout != null) {
105
125
  clearTimeout(this.getBoundsTimeout);
@@ -206,6 +226,24 @@ export class Select {
206
226
  "reflect": false,
207
227
  "defaultValue": "true"
208
228
  },
229
+ "hideSelected": {
230
+ "type": "boolean",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "boolean",
234
+ "resolved": "boolean",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": false,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": "Whether this select will omit the currently selected\nvalue in the dropdown list."
242
+ },
243
+ "attribute": "hide-selected",
244
+ "reflect": false,
245
+ "defaultValue": "true"
246
+ },
209
247
  "resizeObserverFactory": {
210
248
  "type": "unknown",
211
249
  "mutable": false,
@@ -264,6 +302,15 @@ export class Select {
264
302
  return [{
265
303
  "propName": "value",
266
304
  "methodName": "handleUpdateValue"
305
+ }, {
306
+ "propName": "displayValue",
307
+ "methodName": "handleUpdateDisplayValue"
308
+ }, {
309
+ "propName": "hideSelected",
310
+ "methodName": "handleUpdateDisplayValue"
311
+ }, {
312
+ "propName": "placeholder",
313
+ "methodName": "handleUpdateDisplayValue"
267
314
  }];
268
315
  }
269
316
  }
@@ -0,0 +1,16 @@
1
+ :host {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+
7
+ .content {
8
+ display: none;
9
+ height: 0px;
10
+ }
11
+
12
+ .content.active {
13
+ display: flex;
14
+ width: 100%;
15
+ height: 100%;
16
+ }
@@ -0,0 +1,85 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import classNames from 'classnames';
3
+ export class Tab {
4
+ constructor() {
5
+ this.handleClick = () => {
6
+ this.tabClick.emit(this.label);
7
+ };
8
+ this.label = undefined;
9
+ this.active = false;
10
+ }
11
+ render() {
12
+ return (h(Host, null, h("div", { class: classNames('content', {
13
+ active: this.active,
14
+ }) }, h("slot", null))));
15
+ }
16
+ static get is() { return "vertex-tab"; }
17
+ static get encapsulation() { return "shadow"; }
18
+ static get originalStyleUrls() {
19
+ return {
20
+ "$": ["tab.css"]
21
+ };
22
+ }
23
+ static get styleUrls() {
24
+ return {
25
+ "$": ["tab.css"]
26
+ };
27
+ }
28
+ static get properties() {
29
+ return {
30
+ "label": {
31
+ "type": "string",
32
+ "mutable": false,
33
+ "complexType": {
34
+ "original": "string",
35
+ "resolved": "string",
36
+ "references": {}
37
+ },
38
+ "required": true,
39
+ "optional": false,
40
+ "docs": {
41
+ "tags": [],
42
+ "text": "The label to include in tab list."
43
+ },
44
+ "attribute": "label",
45
+ "reflect": false
46
+ },
47
+ "active": {
48
+ "type": "boolean",
49
+ "mutable": false,
50
+ "complexType": {
51
+ "original": "boolean",
52
+ "resolved": "boolean",
53
+ "references": {}
54
+ },
55
+ "required": false,
56
+ "optional": false,
57
+ "docs": {
58
+ "tags": [],
59
+ "text": ""
60
+ },
61
+ "attribute": "active",
62
+ "reflect": false,
63
+ "defaultValue": "false"
64
+ }
65
+ };
66
+ }
67
+ static get events() {
68
+ return [{
69
+ "method": "tabClick",
70
+ "name": "tabClick",
71
+ "bubbles": true,
72
+ "cancelable": true,
73
+ "composed": true,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": ""
77
+ },
78
+ "complexType": {
79
+ "original": "string",
80
+ "resolved": "string",
81
+ "references": {}
82
+ }
83
+ }];
84
+ }
85
+ }
@@ -0,0 +1,3 @@
1
+ export function isTabElement(element) {
2
+ return element.tagName === 'VERTEX-TAB';
3
+ }
@@ -0,0 +1,67 @@
1
+ button {
2
+ border: none;
3
+ background-color: transparent;
4
+ font-family: var(--vertex-ui-font-family);
5
+ font-size: 0.875rem;
6
+ padding: 0;
7
+ }
8
+
9
+ :host {
10
+ display: flex;
11
+ position: relative;
12
+ width: 100%;
13
+ height: 100%;
14
+ }
15
+
16
+ .wrapper {
17
+ display: flex;
18
+ flex-direction: column;
19
+ position: relative;
20
+ height: 100%;
21
+ width: 100%;
22
+ }
23
+
24
+ .labels {
25
+ display: flex;
26
+ position: relative;
27
+ border-bottom: solid 1px var(--vertex-ui-neutral-300);
28
+ }
29
+
30
+ .indicator {
31
+ position: absolute;
32
+ bottom: 0;
33
+ height: 3px;
34
+ background-color: var(--vertex-ui-blue-700);
35
+ transition: left 0.2s ease-in-out;
36
+ }
37
+
38
+ .label {
39
+ position: relative;
40
+ cursor: pointer;
41
+ color: var(--vertex-ui-neutral-700);
42
+ white-space: nowrap;
43
+ font-family: var(--vertex-ui-font-family);
44
+ font-size: var(--vertex-ui-text-md);
45
+ padding: 0.75rem 1.25rem;
46
+ }
47
+
48
+ .label:not(.active):hover {
49
+ color: var(--vertex-ui-neutral-800);
50
+ }
51
+
52
+ .label.active {
53
+ color: var(--vertex-ui-blue-700);
54
+ font-weight: var(--vertex-ui-font-weight-bold);
55
+ }
56
+
57
+ .hidden-label-text {
58
+ font-weight: bold;
59
+ visibility: hidden;
60
+ height: 0px;
61
+ }
62
+
63
+ .tab-content {
64
+ display: flex;
65
+ height: 5%;
66
+ flex-grow: 1;
67
+ }
@@ -0,0 +1,159 @@
1
+ import { h, Host, } from '@stencil/core';
2
+ import classNames from 'classnames';
3
+ import { getBoundingClientRect, readDOM } from '../../util/components/dom';
4
+ import { isTabElement } from '../tab/util';
5
+ export class Tabs {
6
+ constructor() {
7
+ this.indicatorInitialized = false;
8
+ this.handleLabelClick = (label) => {
9
+ if (this.active != null) {
10
+ this.updateActiveOnTab(this.active, false);
11
+ }
12
+ this.active = label;
13
+ this.updateActiveOnTab(this.active, true);
14
+ this.selectedTabChanged.emit(label);
15
+ };
16
+ this.updateActiveOnTab = (label, active) => {
17
+ const activeTab = this.findTabByLabel(label);
18
+ if (activeTab != null) {
19
+ activeTab.active = active;
20
+ }
21
+ };
22
+ this.findTabByLabel = (label) => {
23
+ var _a;
24
+ const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
25
+ const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
26
+ const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
27
+ ? Array.from(slotAssignedElements[0].children)
28
+ : undefined;
29
+ return slotChildren != null
30
+ ? slotChildren.filter(isTabElement).find((el) => el.label === label)
31
+ : undefined;
32
+ };
33
+ this.updateTabLabels = () => {
34
+ var _a;
35
+ const slotEl = ((_a = this.hostEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot:not([name])')) || undefined;
36
+ const slotAssignedElements = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedElements();
37
+ const slotChildren = slotAssignedElements != null && slotAssignedElements.length > 0
38
+ ? Array.from(slotAssignedElements[0].children)
39
+ : undefined;
40
+ this.labels =
41
+ slotChildren != null
42
+ ? slotChildren.filter(isTabElement).map((t) => t.label)
43
+ : [];
44
+ };
45
+ this.active = undefined;
46
+ this.labels = [];
47
+ this.activeBounds = undefined;
48
+ this.activeButtonEl = undefined;
49
+ }
50
+ componentWillLoad() {
51
+ this.updateTabLabels();
52
+ }
53
+ componentDidLoad() {
54
+ if (this.active != null) {
55
+ this.updateActiveOnTab(this.active, true);
56
+ }
57
+ this.indicatorInitialized = false;
58
+ this.handleActiveButtonChange();
59
+ }
60
+ componentDidUpdate() {
61
+ // Place the indicator if it hasn't been initialized yet
62
+ if (!this.indicatorInitialized) {
63
+ this.handleActiveButtonChange();
64
+ }
65
+ }
66
+ handleActiveButtonChange() {
67
+ const button = this.activeButtonEl;
68
+ if (button != null) {
69
+ readDOM(() => {
70
+ const hostElBounds = getBoundingClientRect(this.hostEl);
71
+ const activeBounds = getBoundingClientRect(button);
72
+ this.activeBounds = {
73
+ x: activeBounds.x - hostElBounds.x,
74
+ width: activeBounds.width,
75
+ };
76
+ if (this.activeBounds.width !== 0) {
77
+ this.indicatorInitialized = true;
78
+ }
79
+ });
80
+ }
81
+ }
82
+ render() {
83
+ return (h(Host, null, h("div", { class: "wrapper" }, h("div", { class: "labels" }, this.labels.map((label) => (h("button", { class: classNames('label', {
84
+ active: this.active === label,
85
+ }), "data-label": label, ref: (el) => {
86
+ if (this.active === label) {
87
+ this.activeButtonEl = el;
88
+ }
89
+ }, onClick: () => this.handleLabelClick(label) }, label, h("div", { class: "hidden-label-text" }, label)))), h("slot", { name: "label-header" }), this.activeBounds && (h("div", { class: "indicator", style: {
90
+ left: `${this.activeBounds.x}px`,
91
+ width: `${this.activeBounds.width}px`,
92
+ } }))), h("div", { class: "tab-content" }, h("slot", { onSlotchange: this.updateTabLabels })))));
93
+ }
94
+ static get is() { return "vertex-tabs"; }
95
+ static get encapsulation() { return "shadow"; }
96
+ static get originalStyleUrls() {
97
+ return {
98
+ "$": ["tabs.css"]
99
+ };
100
+ }
101
+ static get styleUrls() {
102
+ return {
103
+ "$": ["tabs.css"]
104
+ };
105
+ }
106
+ static get properties() {
107
+ return {
108
+ "active": {
109
+ "type": "string",
110
+ "mutable": true,
111
+ "complexType": {
112
+ "original": "string",
113
+ "resolved": "string | undefined",
114
+ "references": {}
115
+ },
116
+ "required": false,
117
+ "optional": true,
118
+ "docs": {
119
+ "tags": [],
120
+ "text": ""
121
+ },
122
+ "attribute": "active",
123
+ "reflect": false
124
+ }
125
+ };
126
+ }
127
+ static get states() {
128
+ return {
129
+ "labels": {},
130
+ "activeBounds": {},
131
+ "activeButtonEl": {}
132
+ };
133
+ }
134
+ static get events() {
135
+ return [{
136
+ "method": "selectedTabChanged",
137
+ "name": "selectedTabChanged",
138
+ "bubbles": true,
139
+ "cancelable": true,
140
+ "composed": true,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": "An event that is emitted whenever the selected tab changes\nand contains the label of the newly selected tab."
144
+ },
145
+ "complexType": {
146
+ "original": "string",
147
+ "resolved": "string",
148
+ "references": {}
149
+ }
150
+ }];
151
+ }
152
+ static get elementRef() { return "hostEl"; }
153
+ static get watchers() {
154
+ return [{
155
+ "propName": "activeButtonEl",
156
+ "methodName": "handleActiveButtonChange"
157
+ }];
158
+ }
159
+ }
@@ -71,6 +71,7 @@ export class TextField {
71
71
  render() {
72
72
  var _a;
73
73
  const classes = classNames('txt-wrapper', {
74
+ 'txt-wrapper-border': !this.multiline,
74
75
  'txt-standard': this.variant === 'standard',
75
76
  'txt-filled': this.variant === 'filled',
76
77
  'txt-underlined': this.variant === 'underlined',
@@ -6,6 +6,7 @@ import { getSlottedContent } from '../../util/components/slots';
6
6
  const TOOLTIP_OPEN_DELAY = 500;
7
7
  export class Tooltip {
8
8
  constructor() {
9
+ this.pointerEntered = false;
9
10
  this.content = undefined;
10
11
  this.disabled = undefined;
11
12
  this.placement = 'bottom';
@@ -14,32 +15,40 @@ export class Tooltip {
14
15
  this.open = false;
15
16
  this.handlePointerEnter = this.handlePointerEnter.bind(this);
16
17
  this.handlePointerLeave = this.handlePointerLeave.bind(this);
18
+ this.handleContentChange = this.handleContentChange.bind(this);
19
+ this.handleDisabledChange = this.handleDisabledChange.bind(this);
17
20
  this.tooltipId = `vertex-tooltip-${UUID.create()}`;
18
21
  }
19
22
  disconnectedCallback() {
20
23
  this.removeElement();
21
24
  this.clearOpenTimeout();
25
+ this.pointerEntered = false;
26
+ }
27
+ handleContentChange() {
28
+ if (this.internalContentElement != null) {
29
+ this.updateContentElementChildren(this.internalContentElement);
30
+ }
31
+ }
32
+ handleDisabledChange() {
33
+ if (this.internalContentElement != null) {
34
+ this.updateContentElementClass(this.internalContentElement);
35
+ }
36
+ if (!this.disabled && this.pointerEntered) {
37
+ this.handlePointerEnter();
38
+ }
22
39
  }
23
40
  render() {
24
41
  return (h(Host, null, h("div", { class: "target", ref: (el) => {
25
42
  this.targetElement = el;
26
43
  }, onPointerEnter: this.handlePointerEnter, onPointerLeave: this.handlePointerLeave }, h("slot", null)), h("div", { class: "content-hidden", ref: (el) => {
27
44
  this.contentElement = el;
28
- } }, h("slot", { name: "content" }))));
45
+ } }, h("slot", { name: "content", onSlotchange: this.handleContentChange }))));
29
46
  }
30
47
  addElement() {
31
- var _a;
32
48
  if (this.targetElement != null) {
33
49
  const popover = this.createPopoverElement(this.targetElement);
34
50
  const content = this.createContentElement();
35
- this.displayedSlottedContent =
36
- (_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
37
- if (this.content != null) {
38
- content.innerText = this.content;
39
- }
40
- else if (this.displayedSlottedContent != null) {
41
- content.appendChild(this.displayedSlottedContent);
42
- }
51
+ this.updateContentElementChildren(content);
43
52
  popover.appendChild(content);
44
53
  this.hostElement.ownerDocument.body.appendChild(popover);
45
54
  }
@@ -49,6 +58,7 @@ export class Tooltip {
49
58
  if (popover != null) {
50
59
  popover.remove();
51
60
  }
61
+ this.internalContentElement = undefined;
52
62
  }
53
63
  createPopoverElement(anchorElement) {
54
64
  const popover = this.hostElement.ownerDocument.createElement('vertex-popover');
@@ -63,25 +73,50 @@ export class Tooltip {
63
73
  return popover;
64
74
  }
65
75
  createContentElement() {
66
- const content = this.hostElement.ownerDocument.createElement('div');
67
- content.setAttribute('class', classNames('vertex-tooltip-content', {
76
+ this.internalContentElement =
77
+ this.hostElement.ownerDocument.createElement('div');
78
+ this.internalContentElement.setAttribute('class', classNames('vertex-tooltip-content', {
68
79
  hidden: !this.open || this.disabled,
69
80
  }));
70
- return content;
81
+ return this.internalContentElement;
82
+ }
83
+ updateContentElementClass(element) {
84
+ element.setAttribute('class', classNames('vertex-tooltip-content', {
85
+ hidden: !this.open || this.disabled,
86
+ }));
87
+ }
88
+ updateContentElementChildren(element) {
89
+ var _a;
90
+ this.displayedSlottedContent =
91
+ (_a = getSlottedContent(this.contentElement)) !== null && _a !== void 0 ? _a : this.displayedSlottedContent;
92
+ if (this.content != null) {
93
+ element.innerText = this.content;
94
+ }
95
+ else if (this.displayedSlottedContent != null) {
96
+ element.appendChild(this.displayedSlottedContent);
97
+ }
71
98
  }
72
99
  handlePointerEnter() {
73
100
  if (this.openTimeout == null && !this.disabled) {
74
- this.openTimeout = setTimeout(() => {
75
- this.open = true;
76
- this.openTimeout = undefined;
77
- this.addElement();
78
- }, this.delay);
101
+ this.createOpenTimeout();
102
+ }
103
+ else if (this.openTimeout == null) {
104
+ this.pointerEntered = true;
79
105
  }
80
106
  }
81
107
  handlePointerLeave() {
82
108
  this.clearOpenTimeout();
83
109
  this.removeElement();
84
110
  this.open = false;
111
+ this.pointerEntered = false;
112
+ }
113
+ createOpenTimeout() {
114
+ this.openTimeout = setTimeout(() => {
115
+ this.open = true;
116
+ this.openTimeout = undefined;
117
+ this.addElement();
118
+ }, this.delay);
119
+ this.pointerEntered = false;
85
120
  }
86
121
  clearOpenTimeout() {
87
122
  if (this.openTimeout != null) {
@@ -204,4 +239,13 @@ export class Tooltip {
204
239
  };
205
240
  }
206
241
  static get elementRef() { return "hostElement"; }
242
+ static get watchers() {
243
+ return [{
244
+ "propName": "content",
245
+ "methodName": "handleContentChange"
246
+ }, {
247
+ "propName": "disabled",
248
+ "methodName": "handleDisabledChange"
249
+ }];
250
+ }
207
251
  }
@@ -24,6 +24,7 @@ export var IconNames;
24
24
  IconNames["caret-down"] = "caret-down";
25
25
  IconNames["caret-left"] = "caret-left";
26
26
  IconNames["caret-up"] = "caret-up";
27
+ IconNames["caution"] = "caution";
27
28
  IconNames["check"] = "check";
28
29
  IconNames["check-circle"] = "check-circle";
29
30
  IconNames["caret-right"] = "caret-right";
@@ -42,15 +43,19 @@ export var IconNames;
42
43
  IconNames["comment-reopen"] = "comment-reopen";
43
44
  IconNames["comment-resolve"] = "comment-resolve";
44
45
  IconNames["comment-show"] = "comment-show";
46
+ IconNames["compare"] = "compare";
47
+ IconNames["compress"] = "compress";
45
48
  IconNames["copy"] = "copy";
46
49
  IconNames["cross-section"] = "cross-section";
47
50
  IconNames["cube-orthographic"] = "cube-orthographic";
48
51
  IconNames["cube-perspective"] = "cube-perspective";
52
+ IconNames["cube-stack"] = "cube-stack";
49
53
  IconNames["delete"] = "delete";
50
54
  IconNames["download"] = "download";
51
55
  IconNames["drag-indicator"] = "drag-indicator";
52
56
  IconNames["ellipse"] = "ellipse";
53
57
  IconNames["error-circle"] = "error-circle";
58
+ IconNames["expand"] = "expand";
54
59
  IconNames["expand-all"] = "expand-all";
55
60
  IconNames["export"] = "export";
56
61
  IconNames["file"] = "file";
@@ -86,7 +91,10 @@ export var IconNames;
86
91
  IconNames["pin-line"] = "pin-line";
87
92
  IconNames["pin-text"] = "pin-text";
88
93
  IconNames["pin-text-fill"] = "pin-text-fill";
94
+ IconNames["pin-text-square"] = "pin-text-square";
89
95
  IconNames["plus"] = "plus";
96
+ IconNames["plus-with-arrow"] = "plus-with-arrow";
97
+ IconNames["pmi"] = "pmi";
90
98
  IconNames["precise-measurement"] = "precise-measurement";
91
99
  IconNames["rabbit"] = "rabbit";
92
100
  IconNames["reset"] = "reset";
@@ -102,7 +110,9 @@ export var IconNames;
102
110
  IconNames["teleport-toward"] = "teleport-toward";
103
111
  IconNames["teleport"] = "teleport";
104
112
  IconNames["turtle"] = "turtle";
113
+ IconNames["update"] = "update";
105
114
  IconNames["version-history"] = "version-history";
115
+ IconNames["views"] = "views";
106
116
  IconNames["visibility-hidden"] = "visibility-hidden";
107
117
  IconNames["visibility-partial"] = "visibility-partial";
108
118
  IconNames["visibility-visible"] = "visibility-visible";