@vertexvis/ui 0.1.0-testing.3 → 0.1.0-testing.5

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 (123) hide show
  1. package/dist/cjs/badge-d39ac1fc.js +23 -0
  2. package/dist/cjs/components.cjs.js +1 -1
  3. package/dist/cjs/{icon-53d62a46.js → icon-460fd0f5.js} +1 -1
  4. package/dist/cjs/icon-button-786427d6.js +43 -0
  5. package/dist/cjs/{icon-helper-caf2699e.js → icon-helper-ba408f49.js} +7 -0
  6. package/dist/cjs/index.cjs.js +11 -9
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{popover-d9ec8e10.js → popover-942209b8.js} +23 -1
  9. package/dist/cjs/{result-list-1e592c3c.js → result-list-241ffe8d.js} +46 -2
  10. package/dist/cjs/search-bar-a321b3e1.js +353 -0
  11. package/dist/cjs/{select-0eb7203f.js → select-5f8aecfe.js} +27 -4
  12. package/dist/cjs/{text-field-0397fb34.js → text-field-bccbde1f.js} +1 -0
  13. package/dist/cjs/{tooltip-31b596f5.js → tooltip-e9f63631.js} +58 -19
  14. package/dist/cjs/vertex-badge.cjs.entry.js +11 -0
  15. package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
  16. package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
  17. package/dist/cjs/vertex-popover.cjs.entry.js +1 -1
  18. package/dist/cjs/vertex-result-list.cjs.entry.js +1 -1
  19. package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
  20. package/dist/cjs/vertex-select.cjs.entry.js +1 -1
  21. package/dist/cjs/vertex-textfield.cjs.entry.js +1 -1
  22. package/dist/cjs/vertex-tooltip.cjs.entry.js +1 -1
  23. package/dist/collection/collection-manifest.json +1 -0
  24. package/dist/collection/components/badge/badge.css +18 -0
  25. package/dist/collection/components/badge/badge.js +69 -0
  26. package/dist/collection/components/icon/icon-helper.js +3 -0
  27. package/dist/collection/components/icon/icon.js +1 -1
  28. package/dist/collection/components/icon/icons/comment-filled.js +2 -0
  29. package/dist/collection/components/icon-button/icon-button.css +16 -1
  30. package/dist/collection/components/icon-button/icon-button.js +2 -2
  31. package/dist/collection/components/index.js +1 -0
  32. package/dist/collection/components/menu/menu.js +1 -1
  33. package/dist/collection/components/popover/popover.js +51 -0
  34. package/dist/collection/components/result-list/result-list.js +47 -3
  35. package/dist/collection/components/search-bar/dom.js +12 -0
  36. package/dist/collection/components/search-bar/lib.js +23 -15
  37. package/dist/collection/components/search-bar/search-bar.css +2 -29
  38. package/dist/collection/components/search-bar/search-bar.js +352 -326
  39. package/dist/collection/components/select/select.css +16 -0
  40. package/dist/collection/components/select/select.js +49 -2
  41. package/dist/collection/components/text-field/text-field.js +1 -0
  42. package/dist/collection/components/tooltip/tooltip.css +2 -0
  43. package/dist/collection/components/tooltip/tooltip.js +62 -18
  44. package/dist/collection/types/icon.js +1 -0
  45. package/dist/collection/util/templates/element-pool.js +19 -1
  46. package/dist/components/components.css +1 -1
  47. package/dist/components/components.esm.js +1 -1
  48. package/dist/components/index.esm.js +1 -1
  49. package/dist/components/p-03dbb28c.js +1 -0
  50. package/dist/components/p-0b1cdc8a.entry.js +1 -0
  51. package/dist/components/p-0b4406fa.entry.js +1 -0
  52. package/dist/components/p-103249b4.js +1 -0
  53. package/dist/components/p-29d7697f.js +1 -0
  54. package/dist/components/p-406e73da.entry.js +1 -0
  55. package/dist/components/p-43b1b3f9.js +1 -0
  56. package/dist/components/p-606596de.entry.js +1 -0
  57. package/dist/components/p-6b862967.js +1 -0
  58. package/dist/components/p-7cfb3736.entry.js +1 -0
  59. package/dist/components/p-7dba2574.entry.js +1 -0
  60. package/dist/components/p-912f6e24.js +1 -0
  61. package/dist/components/p-92930f2a.js +1 -0
  62. package/dist/components/p-c2706288.js +1 -0
  63. package/dist/components/p-c4518377.entry.js +1 -0
  64. package/dist/components/{p-17b97932.js → p-ca52a423.js} +1 -1
  65. package/dist/components/p-ee496965.entry.js +1 -0
  66. package/dist/components/p-f064f911.js +1 -0
  67. package/dist/components/p-f71fc166.entry.js +1 -0
  68. package/dist/esm/badge-6d27ca92.js +21 -0
  69. package/dist/esm/components.js +1 -1
  70. package/dist/esm/icon-button-aad3c0e7.js +41 -0
  71. package/dist/esm/{icon-2630793d.js → icon-d37150b4.js} +1 -1
  72. package/dist/esm/{icon-helper-10a99d95.js → icon-helper-83f10f73.js} +7 -0
  73. package/dist/esm/index.js +10 -9
  74. package/dist/esm/loader.js +1 -1
  75. package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
  76. package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
  77. package/dist/esm/search-bar-6fad2f2e.js +351 -0
  78. package/dist/esm/{select-75ed5653.js → select-d4e135b7.js} +27 -4
  79. package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
  80. package/dist/esm/{tooltip-14b65fb5.js → tooltip-933da261.js} +58 -19
  81. package/dist/esm/vertex-badge.entry.js +3 -0
  82. package/dist/esm/vertex-icon-button.entry.js +2 -2
  83. package/dist/esm/vertex-icon.entry.js +2 -2
  84. package/dist/esm/vertex-popover.entry.js +1 -1
  85. package/dist/esm/vertex-result-list.entry.js +1 -1
  86. package/dist/esm/vertex-search-bar.entry.js +1 -1
  87. package/dist/esm/vertex-select.entry.js +1 -1
  88. package/dist/esm/vertex-textfield.entry.js +1 -1
  89. package/dist/esm/vertex-tooltip.entry.js +1 -1
  90. package/dist/types/components/badge/badge.d.ts +14 -0
  91. package/dist/types/components/icon/icons/comment-filled.d.ts +3 -0
  92. package/dist/types/components/index.d.ts +1 -0
  93. package/dist/types/components/popover/popover.d.ts +7 -0
  94. package/dist/types/components/result-list/result-list.d.ts +9 -1
  95. package/dist/types/components/search-bar/dom.d.ts +3 -0
  96. package/dist/types/components/search-bar/lib.d.ts +12 -6
  97. package/dist/types/components/search-bar/search-bar.d.ts +98 -41
  98. package/dist/types/components/select/select.d.ts +8 -0
  99. package/dist/types/components/tooltip/tooltip.d.ts +7 -0
  100. package/dist/types/components.d.ts +111 -16
  101. package/dist/types/types/icon.d.ts +1 -0
  102. package/dist/types/util/templates/element-pool.d.ts +10 -1
  103. package/package.json +2 -2
  104. package/dist/cjs/icon-button-f868bf06.js +0 -43
  105. package/dist/cjs/search-bar-bb40cfa7.js +0 -290
  106. package/dist/components/p-19318fee.entry.js +0 -1
  107. package/dist/components/p-209db2ba.entry.js +0 -1
  108. package/dist/components/p-4224c2ad.js +0 -1
  109. package/dist/components/p-45cfd66e.entry.js +0 -1
  110. package/dist/components/p-52739247.js +0 -1
  111. package/dist/components/p-552c128f.js +0 -1
  112. package/dist/components/p-6505cdb3.js +0 -1
  113. package/dist/components/p-79fd6fb6.entry.js +0 -1
  114. package/dist/components/p-94168b92.js +0 -1
  115. package/dist/components/p-ae6a3c46.entry.js +0 -1
  116. package/dist/components/p-bd11e7d1.js +0 -1
  117. package/dist/components/p-da0a7b57.js +0 -1
  118. package/dist/components/p-e576818b.entry.js +0 -1
  119. package/dist/components/p-ebabee40.entry.js +0 -1
  120. package/dist/components/p-ee8b96b2.js +0 -1
  121. package/dist/components/p-f900d0f4.entry.js +0 -1
  122. package/dist/esm/icon-button-25edf617.js +0 -41
  123. package/dist/esm/search-bar-59cc151d.js +0 -288
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const select = require('./select-0eb7203f.js');
5
+ const select = require('./select-5f8aecfe.js');
6
6
  require('./index-6a92256c.js');
7
7
  require('./index-e1b40fa6.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const textField = require('./text-field-0397fb34.js');
5
+ const textField = require('./text-field-bccbde1f.js');
6
6
  require('./index-6a92256c.js');
7
7
  require('./index-e1b40fa6.js');
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const tooltip = require('./tooltip-31b596f5.js');
5
+ const tooltip = require('./tooltip-e9f63631.js');
6
6
  require('./index-6a92256c.js');
7
7
  require('./tslib.es6-838fd860.js');
8
8
  require('./index-e1b40fa6.js');
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/avatar/avatar.js",
4
+ "./components/badge/badge.js",
4
5
  "./components/button/button.js",
5
6
  "./components/card/card.js",
6
7
  "./components/chip/chip.js",
@@ -0,0 +1,18 @@
1
+ .string-overlay {
2
+ width: 100%;
3
+ line-height: 1.0rem;
4
+ margin-left: 5px;
5
+ margin-right: 5px;
6
+ border-radius: 10px;
7
+ font-size: var(--vertex-ui-text-xxs);
8
+ }
9
+
10
+ .string-overlay.primary {
11
+ color: var(--vertex-ui-white);
12
+ background-color: var(--vertex-ui-blue-600)
13
+ }
14
+
15
+ .string-overlay.secondary {
16
+ color: var(--vertex-ui-black);
17
+ background-color: var(--vertex-ui-neutral-300)
18
+ }
@@ -0,0 +1,69 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import classNames from 'classnames';
3
+ export class Badge {
4
+ constructor() {
5
+ this.badgeText = undefined;
6
+ this.badgeColor = 'primary';
7
+ }
8
+ render() {
9
+ return (h(Host, null, h("div", { class: classNames('string-overlay', {
10
+ primary: this.badgeColor === 'primary',
11
+ secondary: this.badgeColor === 'secondary',
12
+ }) }, this.badgeText)));
13
+ }
14
+ static get is() { return "vertex-badge"; }
15
+ static get encapsulation() { return "shadow"; }
16
+ static get originalStyleUrls() {
17
+ return {
18
+ "$": ["badge.css"]
19
+ };
20
+ }
21
+ static get styleUrls() {
22
+ return {
23
+ "$": ["badge.css"]
24
+ };
25
+ }
26
+ static get properties() {
27
+ return {
28
+ "badgeText": {
29
+ "type": "string",
30
+ "mutable": false,
31
+ "complexType": {
32
+ "original": "string",
33
+ "resolved": "string | undefined",
34
+ "references": {}
35
+ },
36
+ "required": false,
37
+ "optional": true,
38
+ "docs": {
39
+ "tags": [],
40
+ "text": "The string to show in the badge."
41
+ },
42
+ "attribute": "badge-text",
43
+ "reflect": false
44
+ },
45
+ "badgeColor": {
46
+ "type": "string",
47
+ "mutable": false,
48
+ "complexType": {
49
+ "original": "BadgeIconColor",
50
+ "resolved": "\"primary\" | \"secondary\"",
51
+ "references": {
52
+ "BadgeIconColor": {
53
+ "location": "local"
54
+ }
55
+ }
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "The color of the badge displayed in this <vertex-badge>.\nCan be \"primary\" or \"secondary\", and defaults to \"primary.\""
62
+ },
63
+ "attribute": "badge-color",
64
+ "reflect": false,
65
+ "defaultValue": "'primary'"
66
+ }
67
+ };
68
+ }
69
+ }
@@ -37,6 +37,7 @@ import { CloseCircleFill } from './icons/close-circle-fill';
37
37
  import { CollapseAll } from './icons/collapse-all';
38
38
  import { Columns } from './icons/columns';
39
39
  import { CommentAdd } from './icons/comment-add';
40
+ import { CommentFilled } from './icons/comment-filled';
40
41
  import { CommentReopen } from './icons/comment-reopen';
41
42
  import { CommentResolve } from './icons/comment-resolve';
42
43
  import { CommentShow } from './icons/comment-show';
@@ -183,6 +184,8 @@ export function getSvg(name) {
183
184
  return h(Columns, null);
184
185
  case 'comment-add':
185
186
  return h(CommentAdd, null);
187
+ case 'comment-filled':
188
+ return h(CommentFilled, null);
186
189
  case 'comment-reopen':
187
190
  return h(CommentReopen, null);
188
191
  case 'comment-resolve':
@@ -33,7 +33,7 @@ export class Icon {
33
33
  "mutable": false,
34
34
  "complexType": {
35
35
  "original": "IconName",
36
- "resolved": "\"help\" | \"open\" | \"info\" | \"copy\" | \"menu\" | \"ellipse\" | \"line\" | \"download\" | \"rotate\" | \"close\" | \"flip\" | \"reset\" | \"resize\" | \"search\" | \"caret-down\" | \"caret-up\" | \"adjustments\" | \"align-to-global\" | \"align-to-part\" | \"align-to-surface\" | \"align-view-to-plane\" | \"annotation\" | \"arrow-filled\" | \"arrow-line-left\" | \"arrow-line-right\" | \"arrow-partial\" | \"arrow-triangle-left\" | \"arrow-triangle-right\" | \"arrow-up-circled\" | \"attachment\" | \"axis-x\" | \"axis-y\" | \"axis-z\" | \"back\" | \"box-cursor\" | \"box-select\" | \"camera\" | \"caret-left\" | \"check\" | \"check-circle\" | \"caret-right\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-up\" | \"circle-outline\" | \"close-circle-fill\" | \"close-circle\" | \"collapse-all\" | \"columns\" | \"comment-add\" | \"comment-reopen\" | \"comment-resolve\" | \"comment-show\" | \"cross-section\" | \"cube-orthographic\" | \"cube-perspective\" | \"delete\" | \"drag-indicator\" | \"error-circle\" | \"expand-all\" | \"export\" | \"file\" | \"file-pdf\" | \"fit-all\" | \"fit-selected\" | \"folder-plus\" | \"forward\" | \"gear\" | \"invert\" | \"line-dot-left\" | \"line-dot-right\" | \"line-hash-left\" | \"line-hash-right\" | \"locate\" | \"markup\" | \"notification\" | \"open-window\" | \"pan\" | \"pencil\" | \"person-height\" | \"person-run\" | \"person-short\" | \"person-tall\" | \"person-walk\" | \"pin-fill\" | \"pin-line\" | \"pin-text\" | \"pin-text-fill\" | \"plus\" | \"precise-measurement\" | \"rabbit\" | \"ruler\" | \"show-only-nearby\" | \"snapshots\" | \"star\" | \"tape-measure\" | \"teleport-and-align\" | \"teleport-toward\" | \"teleport\" | \"turtle\" | \"version-history\" | \"visibility-hidden\" | \"visibility-partial\" | \"visibility-visible\" | \"zoom\"",
36
+ "resolved": "\"help\" | \"open\" | \"info\" | \"copy\" | \"menu\" | \"ellipse\" | \"line\" | \"download\" | \"rotate\" | \"close\" | \"flip\" | \"reset\" | \"resize\" | \"search\" | \"caret-down\" | \"caret-up\" | \"adjustments\" | \"align-to-global\" | \"align-to-part\" | \"align-to-surface\" | \"align-view-to-plane\" | \"annotation\" | \"arrow-filled\" | \"arrow-line-left\" | \"arrow-line-right\" | \"arrow-partial\" | \"arrow-triangle-left\" | \"arrow-triangle-right\" | \"arrow-up-circled\" | \"attachment\" | \"axis-x\" | \"axis-y\" | \"axis-z\" | \"back\" | \"box-cursor\" | \"box-select\" | \"camera\" | \"caret-left\" | \"check\" | \"check-circle\" | \"caret-right\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-up\" | \"circle-outline\" | \"close-circle-fill\" | \"close-circle\" | \"collapse-all\" | \"columns\" | \"comment-add\" | \"comment-filled\" | \"comment-reopen\" | \"comment-resolve\" | \"comment-show\" | \"cross-section\" | \"cube-orthographic\" | \"cube-perspective\" | \"delete\" | \"drag-indicator\" | \"error-circle\" | \"expand-all\" | \"export\" | \"file\" | \"file-pdf\" | \"fit-all\" | \"fit-selected\" | \"folder-plus\" | \"forward\" | \"gear\" | \"invert\" | \"line-dot-left\" | \"line-dot-right\" | \"line-hash-left\" | \"line-hash-right\" | \"locate\" | \"markup\" | \"notification\" | \"open-window\" | \"pan\" | \"pencil\" | \"person-height\" | \"person-run\" | \"person-short\" | \"person-tall\" | \"person-walk\" | \"pin-fill\" | \"pin-line\" | \"pin-text\" | \"pin-text-fill\" | \"plus\" | \"precise-measurement\" | \"rabbit\" | \"ruler\" | \"show-only-nearby\" | \"snapshots\" | \"star\" | \"tape-measure\" | \"teleport-and-align\" | \"teleport-toward\" | \"teleport\" | \"turtle\" | \"version-history\" | \"visibility-hidden\" | \"visibility-partial\" | \"visibility-visible\" | \"zoom\"",
37
37
  "references": {
38
38
  "IconName": {
39
39
  "location": "import",
@@ -0,0 +1,2 @@
1
+ import { h } from '@stencil/core';
2
+ export const CommentFilled = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", "data-testid": "comment-filled" }, h("path", { d: "M2.5 2A1.5 1.5 0 0 0 1 3.5v7A1.5 1.5 0 0 0 2.5 12h5.79l2.86 2.85a.47.47 0 0 0 .54.11.5.5 0 0 0 .31-.46V12h1.5a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 13.5 2Zm0 1h11a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-2a.51.51 0 0 0-.5.5v1.79l-2.15-2.14A.47.47 0 0 0 8.5 11h-6a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5Z" }), h("path", { d: "M11.306 14.941c-.085-.042-.422-.367-1.55-1.497L8.314 12H5.431c-1.806 0-2.955-.009-3.075-.022a1.49 1.49 0 0 1-1.257-.98l-.07-.18-.005-3.756c-.006-4.202-.018-3.888.152-4.233a1.18 1.18 0 0 1 .276-.369c.204-.204.374-.307.651-.393l.163-.05h11.468l.163.05c.271.085.448.19.64.383s.288.34.375.578l.058.159v7.631l-.069.18c-.168.436-.495.76-.911.905-.225.078-.465.097-1.269.097h-.73l-.007 1.319-.006 1.319-.065.106c-.135.217-.394.301-.607.197zm-.223-3.68a.527.527 0 0 1 .31-.235c.056-.015.46-.023 1.155-.023 1.178 0 1.157.002 1.303-.137a.616.616 0 0 0 .113-.156c.039-.083.04-.227.04-3.708l.001-3.622-.057-.115a.476.476 0 0 0-.335-.26c-.152-.033-11.074-.033-11.226 0a.476.476 0 0 0-.335.26l-.057.115v3.617c0 3.994-.011 3.697.136 3.85.15.158-.147.144 3.343.156 3.026.01 3.147.012 3.22.051.042.023.578.54 1.192 1.15l1.117 1.108.01-.976.011-.976z", stroke: "currentColor", "stroke-width": ".0216802" }), h("path", { d: "M9.888 12.26c-.799-.783-1.159-1.121-1.23-1.156l-.103-.05-3.264-.01-3.265-.011-.106-.062a.477.477 0 0 1-.17-.166l-.062-.104V3.238l.068-.096a.722.722 0 0 1 .179-.162l.11-.067h11.729l.093.049a.58.58 0 0 1 .25.266c.024.058.03.714.03 3.75v3.68l-.058.114a.527.527 0 0 1-.247.24c-.025.011-.58.025-1.231.031-1.167.011-1.188.012-1.279.06a.697.697 0 0 0-.265.27c-.018.04-.03.35-.038 1.026l-.011.968z", stroke: "currentColor", "stroke-width": "2.36182", "stroke-miterlimit": "4", "stroke-dasharray": "none" })));
@@ -44,9 +44,14 @@ button {
44
44
  --active-box-shadow: none;
45
45
  /*
46
46
  The box shadow of this button when focused.
47
- Defaults to 0 0 0 1px var(--vertex-ui-neutral-900).
47
+ Defaults to 0 0 0 1px var(--vertex-ui-neutral-900).
48
48
  */
49
49
  --focus-box-shadow: 0 0 0 1px var(--vertex-ui-neutral-900);
50
+ /*
51
+ The margin around the icon.
52
+ Defaults to 0px.
53
+ */
54
+ --icon-margin: 0px;
50
55
  }
51
56
 
52
57
  .container {
@@ -66,6 +71,7 @@ button {
66
71
 
67
72
  .icon-button {
68
73
  display: flex;
74
+ position: relative;
69
75
  justify-content: center;
70
76
  align-items: center;
71
77
  fill: currentColor;
@@ -76,6 +82,15 @@ button {
76
82
  .icon-button svg {
77
83
  width: 100%;
78
84
  height: 100%;
85
+ margin: var(--icon-margin, 0px);
86
+ }
87
+
88
+ .badge {
89
+ position: absolute;
90
+ top: 0px;
91
+ right: 4px;
92
+ justify-content: flex-end;
93
+ align-items: flex-end;
79
94
  }
80
95
 
81
96
  .floating {
@@ -21,7 +21,7 @@ export class IconButton {
21
21
  sm: this.iconSize === 'sm',
22
22
  md: this.iconSize === 'md',
23
23
  lg: this.iconSize === 'lg',
24
- }) }, getSvg(this.iconName)), h("slot", null))));
24
+ }) }, getSvg(this.iconName), h("div", { class: "badge" }, h("slot", { name: "badge" }))), h("slot", null))));
25
25
  }
26
26
  handleClick(event) {
27
27
  var _a;
@@ -50,7 +50,7 @@ export class IconButton {
50
50
  "mutable": false,
51
51
  "complexType": {
52
52
  "original": "IconName",
53
- "resolved": "\"help\" | \"open\" | \"info\" | \"copy\" | \"menu\" | \"ellipse\" | \"line\" | \"download\" | \"rotate\" | \"close\" | \"flip\" | \"reset\" | \"resize\" | \"search\" | \"caret-down\" | \"caret-up\" | \"adjustments\" | \"align-to-global\" | \"align-to-part\" | \"align-to-surface\" | \"align-view-to-plane\" | \"annotation\" | \"arrow-filled\" | \"arrow-line-left\" | \"arrow-line-right\" | \"arrow-partial\" | \"arrow-triangle-left\" | \"arrow-triangle-right\" | \"arrow-up-circled\" | \"attachment\" | \"axis-x\" | \"axis-y\" | \"axis-z\" | \"back\" | \"box-cursor\" | \"box-select\" | \"camera\" | \"caret-left\" | \"check\" | \"check-circle\" | \"caret-right\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-up\" | \"circle-outline\" | \"close-circle-fill\" | \"close-circle\" | \"collapse-all\" | \"columns\" | \"comment-add\" | \"comment-reopen\" | \"comment-resolve\" | \"comment-show\" | \"cross-section\" | \"cube-orthographic\" | \"cube-perspective\" | \"delete\" | \"drag-indicator\" | \"error-circle\" | \"expand-all\" | \"export\" | \"file\" | \"file-pdf\" | \"fit-all\" | \"fit-selected\" | \"folder-plus\" | \"forward\" | \"gear\" | \"invert\" | \"line-dot-left\" | \"line-dot-right\" | \"line-hash-left\" | \"line-hash-right\" | \"locate\" | \"markup\" | \"notification\" | \"open-window\" | \"pan\" | \"pencil\" | \"person-height\" | \"person-run\" | \"person-short\" | \"person-tall\" | \"person-walk\" | \"pin-fill\" | \"pin-line\" | \"pin-text\" | \"pin-text-fill\" | \"plus\" | \"precise-measurement\" | \"rabbit\" | \"ruler\" | \"show-only-nearby\" | \"snapshots\" | \"star\" | \"tape-measure\" | \"teleport-and-align\" | \"teleport-toward\" | \"teleport\" | \"turtle\" | \"version-history\" | \"visibility-hidden\" | \"visibility-partial\" | \"visibility-visible\" | \"zoom\"",
53
+ "resolved": "\"help\" | \"open\" | \"info\" | \"copy\" | \"menu\" | \"ellipse\" | \"line\" | \"download\" | \"rotate\" | \"close\" | \"flip\" | \"reset\" | \"resize\" | \"search\" | \"caret-down\" | \"caret-up\" | \"adjustments\" | \"align-to-global\" | \"align-to-part\" | \"align-to-surface\" | \"align-view-to-plane\" | \"annotation\" | \"arrow-filled\" | \"arrow-line-left\" | \"arrow-line-right\" | \"arrow-partial\" | \"arrow-triangle-left\" | \"arrow-triangle-right\" | \"arrow-up-circled\" | \"attachment\" | \"axis-x\" | \"axis-y\" | \"axis-z\" | \"back\" | \"box-cursor\" | \"box-select\" | \"camera\" | \"caret-left\" | \"check\" | \"check-circle\" | \"caret-right\" | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-up\" | \"circle-outline\" | \"close-circle-fill\" | \"close-circle\" | \"collapse-all\" | \"columns\" | \"comment-add\" | \"comment-filled\" | \"comment-reopen\" | \"comment-resolve\" | \"comment-show\" | \"cross-section\" | \"cube-orthographic\" | \"cube-perspective\" | \"delete\" | \"drag-indicator\" | \"error-circle\" | \"expand-all\" | \"export\" | \"file\" | \"file-pdf\" | \"fit-all\" | \"fit-selected\" | \"folder-plus\" | \"forward\" | \"gear\" | \"invert\" | \"line-dot-left\" | \"line-dot-right\" | \"line-hash-left\" | \"line-hash-right\" | \"locate\" | \"markup\" | \"notification\" | \"open-window\" | \"pan\" | \"pencil\" | \"person-height\" | \"person-run\" | \"person-short\" | \"person-tall\" | \"person-walk\" | \"pin-fill\" | \"pin-line\" | \"pin-text\" | \"pin-text-fill\" | \"plus\" | \"precise-measurement\" | \"rabbit\" | \"ruler\" | \"show-only-nearby\" | \"snapshots\" | \"star\" | \"tape-measure\" | \"teleport-and-align\" | \"teleport-toward\" | \"teleport\" | \"turtle\" | \"version-history\" | \"visibility-hidden\" | \"visibility-partial\" | \"visibility-visible\" | \"zoom\"",
54
54
  "references": {
55
55
  "IconName": {
56
56
  "location": "import",
@@ -1,6 +1,7 @@
1
1
  export * from './auto-resize-textarea/auto-resize-textarea';
2
2
  export * from './avatar/avatar';
3
3
  export * from './avatar-group/avatar-group';
4
+ export * from './badge/badge';
4
5
  export * from './button/button';
5
6
  export * from './card/card';
6
7
  export * from './card-group/card-group';
@@ -182,7 +182,7 @@ export class Menu {
182
182
  "mutable": false,
183
183
  "complexType": {
184
184
  "original": "Partial<Popover>",
185
- "resolved": "undefined | ({ open?: boolean | undefined; placement?: Placement | undefined; position?: string | Point | undefined; anchorBounds?: Pick<DOMRect, \"height\" | \"width\" | \"x\" | \"y\"> | undefined; backdrop?: boolean | undefined; animated?: boolean | undefined; anchorSelector?: string | undefined; boundarySelector?: string | undefined; resizeBehavior?: PopoverResizeBehavior | undefined; overflowBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; boundary?: Boundary | undefined; } | undefined; flipBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; crossAxis?: boolean | undefined; mainAxis?: boolean | undefined; fallbackPlacements?: Placement[] | undefined; fallbackStrategy?: \"bestFit\" | \"initialPlacement\" | undefined; fallbackAxisSideDirection?: \"none\" | \"start\" | \"end\" | undefined; flipAlignment?: boolean | undefined; boundary?: Boundary | undefined; } | undefined; offsetBehavior?: OffsetOptions | undefined; updateOnResize?: boolean | undefined; dismissed?: EventEmitter<void> | undefined; connectedCallback?: (() => void) | undefined; componentDidUpdate?: (() => void) | undefined; componentDidLoad?: (() => void) | undefined; disconnectedCallback?: (() => void) | undefined; updatePosition?: ((position?: string | Point | undefined) => void) | undefined; updatePlacement?: (() => void) | undefined; updateOpened?: ((open?: boolean | undefined) => void) | undefined; updateAnimated?: (() => void) | undefined; updateMiddleware?: (() => void) | undefined; setWindow?: ((partialWindow: Pick<Window, \"innerHeight\" | \"innerWidth\">) => void) | undefined; render?: (() => IntrinsicElements) | undefined; })",
185
+ "resolved": "undefined | ({ open?: boolean | undefined; placement?: Placement | undefined; position?: string | Point | undefined; anchorBounds?: Pick<DOMRect, \"height\" | \"width\" | \"x\" | \"y\"> | undefined; backdrop?: boolean | undefined; animated?: boolean | undefined; anchorSelector?: string | undefined; boundarySelector?: string | undefined; resizeBehavior?: PopoverResizeBehavior | undefined; overflowBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; boundary?: Boundary | undefined; } | undefined; flipBehavior?: { rootBoundary?: RootBoundary | undefined; elementContext?: ElementContext | undefined; altBoundary?: boolean | undefined; padding?: Padding | undefined; crossAxis?: boolean | undefined; mainAxis?: boolean | undefined; fallbackPlacements?: Placement[] | undefined; fallbackStrategy?: \"bestFit\" | \"initialPlacement\" | undefined; fallbackAxisSideDirection?: \"none\" | \"start\" | \"end\" | undefined; flipAlignment?: boolean | undefined; boundary?: Boundary | undefined; } | undefined; offsetBehavior?: OffsetOptions | undefined; updateOnResize?: boolean | undefined; dismissed?: EventEmitter<void> | undefined; resizeObserverFactory?: ((cb: (entries: ResizeObserverEntry[]) => void) => ResizeObserver) | undefined; connectedCallback?: (() => void) | undefined; componentDidUpdate?: (() => void) | undefined; componentDidLoad?: (() => void) | undefined; disconnectedCallback?: (() => void) | undefined; updatePosition?: ((position?: string | Point | undefined) => void) | undefined; updatePlacement?: (() => void) | undefined; updateOpened?: ((open?: boolean | undefined) => void) | undefined; updateAnimated?: (() => void) | undefined; updateMiddleware?: (() => void) | undefined; updateResizeObserver?: (() => void) | undefined; setWindow?: ((partialWindow: Pick<Window, \"innerHeight\" | \"innerWidth\">) => void) | undefined; render?: (() => IntrinsicElements) | undefined; })",
186
186
  "references": {
187
187
  "Partial": {
188
188
  "location": "global"
@@ -24,13 +24,17 @@ export class Popover {
24
24
  this.updateOnResize = false;
25
25
  this.opened = false;
26
26
  this.computedPlacement = this.placement;
27
+ this.resizeObserverFactory = (cb) => new ResizeObserver(cb);
27
28
  this.updateListener = this.updateListener.bind(this);
28
29
  this.handlePositionUpdate = this.handlePositionUpdate.bind(this);
29
30
  this.handleResize = this.handleResize.bind(this);
31
+ this.handleMiddlewareChange = this.handleMiddlewareChange.bind(this);
30
32
  this.setWindow = this.setWindow.bind(this);
33
+ this.updateResizeObserver = this.updateResizeObserver.bind(this);
31
34
  }
32
35
  connectedCallback() {
33
36
  this.updatePosition(this.position);
37
+ this.updateResizeObserver();
34
38
  }
35
39
  componentDidUpdate() {
36
40
  if (this.shouldUpdatePosition) {
@@ -52,12 +56,14 @@ export class Popover {
52
56
  }
53
57
  }
54
58
  disconnectedCallback() {
59
+ var _a;
55
60
  this.viewportWidth = undefined;
56
61
  this.viewportHeight = undefined;
57
62
  this.opened = false;
58
63
  if (this.resizeBehavior === 'dynamic') {
59
64
  window.removeEventListener('resize', this.handleResize);
60
65
  }
66
+ (_a = this.boundaryResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
61
67
  }
62
68
  updatePosition(position) {
63
69
  if (position != null) {
@@ -81,6 +87,16 @@ export class Popover {
81
87
  updateMiddleware() {
82
88
  this.handleMiddlewareChange();
83
89
  }
90
+ updateResizeObserver() {
91
+ const observer = this.getOrCreateResizeObserver();
92
+ observer.disconnect();
93
+ if (this.boundarySelector != null) {
94
+ const element = document.querySelector(this.boundarySelector);
95
+ if (element != null) {
96
+ observer.observe(element);
97
+ }
98
+ }
99
+ }
84
100
  /**
85
101
  * @private Used for internals or testing.
86
102
  */
@@ -186,6 +202,12 @@ export class Popover {
186
202
  this.viewportWidth = this.partialWindow.innerWidth;
187
203
  this.viewportHeight = this.partialWindow.innerHeight;
188
204
  }
205
+ getOrCreateResizeObserver() {
206
+ if (this.boundaryResizeObserver == null) {
207
+ this.boundaryResizeObserver = this.resizeObserverFactory(this.handleMiddlewareChange);
208
+ }
209
+ return this.boundaryResizeObserver;
210
+ }
189
211
  getTransformClass() {
190
212
  if (this.animated) {
191
213
  switch (this.computedPlacement) {
@@ -485,6 +507,32 @@ export class Popover {
485
507
  "attribute": "update-on-resize",
486
508
  "reflect": false,
487
509
  "defaultValue": "false"
510
+ },
511
+ "resizeObserverFactory": {
512
+ "type": "unknown",
513
+ "mutable": false,
514
+ "complexType": {
515
+ "original": "(\n cb: (entries: ResizeObserverEntry[]) => void\n ) => ResizeObserver",
516
+ "resolved": "(cb: (entries: ResizeObserverEntry[]) => void) => ResizeObserver",
517
+ "references": {
518
+ "ResizeObserverEntry": {
519
+ "location": "global"
520
+ },
521
+ "ResizeObserver": {
522
+ "location": "global"
523
+ }
524
+ }
525
+ },
526
+ "required": false,
527
+ "optional": false,
528
+ "docs": {
529
+ "tags": [{
530
+ "name": "internal",
531
+ "text": undefined
532
+ }],
533
+ "text": ""
534
+ },
535
+ "defaultValue": "(cb) => new ResizeObserver(cb)"
488
536
  }
489
537
  };
490
538
  }
@@ -538,6 +586,9 @@ export class Popover {
538
586
  }, {
539
587
  "propName": "offsetBehavior",
540
588
  "methodName": "updateMiddleware"
589
+ }, {
590
+ "propName": "boundarySelector",
591
+ "methodName": "updateResizeObserver"
541
592
  }];
542
593
  }
543
594
  }
@@ -1,6 +1,6 @@
1
1
  import { h, Host, } from '@stencil/core';
2
2
  import classNames from 'classnames';
3
- import { ElementPool } from '../../util/templates/element-pool';
3
+ import { ElementPool, } from '../../util/templates/element-pool';
4
4
  import { generateInstanceFromTemplate, } from '../../util/templates/templates';
5
5
  import { getResultListHeight, scrollToResult } from './lib';
6
6
  export class ResultList {
@@ -29,7 +29,7 @@ export class ResultList {
29
29
  }
30
30
  };
31
31
  this.createResultPool = () => {
32
- this.stateMap.resultPool = new ElementPool(this.hostEl, () => this.createResultInstance());
32
+ this.stateMap.resultPool = new ElementPool(this.hostEl, () => this.createResultInstance(), () => this.createResultHandlers());
33
33
  };
34
34
  this.createResultInstance = () => {
35
35
  if (this.stateMap.resultTemplate != null) {
@@ -41,6 +41,18 @@ export class ResultList {
41
41
  throw new Error('Result template not defined.');
42
42
  }
43
43
  };
44
+ this.createResultHandlers = () => {
45
+ return [
46
+ {
47
+ type: 'pointerdown',
48
+ handler: this.handlePointerDown,
49
+ },
50
+ {
51
+ type: 'click',
52
+ handler: this.handleResultClick,
53
+ },
54
+ ];
55
+ };
44
56
  this.layoutResults = () => {
45
57
  var _a, _b, _c, _d;
46
58
  const visibleRowCount = this.viewportEndIndex - this.viewportStartIndex + 1;
@@ -61,6 +73,7 @@ export class ResultList {
61
73
  el.style.top = `${(this.viewportStartIndex + index) * this.resultHeight}px`;
62
74
  el.style.width = '100%';
63
75
  el.setAttribute('is-focused', `${this.viewportStartIndex + index === this.lastFocusedIndex}`);
76
+ el.setAttribute('data-result-id', result.id);
64
77
  binding.bind(result);
65
78
  }
66
79
  });
@@ -103,6 +116,8 @@ export class ResultList {
103
116
  this.lastStartIndex = 0;
104
117
  this.lastFocusedIndex = 0;
105
118
  this.stateMap = {};
119
+ this.handleResultClick = this.handleResultClick.bind(this);
120
+ this.handlePointerDown = this.handlePointerDown.bind(this);
106
121
  }
107
122
  handleResultsChanged(results) {
108
123
  if (typeof results === 'string') {
@@ -148,6 +163,16 @@ export class ResultList {
148
163
  height: `${this.parsedResults.length * this.resultHeight}px`,
149
164
  } }, h("slot", null), h("slot", { name: "result" })))))));
150
165
  }
166
+ handlePointerDown(event) {
167
+ event.preventDefault();
168
+ }
169
+ handleResultClick(event) {
170
+ const closestIdElement = event.target.closest('[data-result-id]');
171
+ const result = this.parsedResults.find((r) => r.id === (closestIdElement === null || closestIdElement === void 0 ? void 0 : closestIdElement.getAttribute('data-result-id')));
172
+ if (result != null) {
173
+ this.resultClick.emit(result);
174
+ }
175
+ }
151
176
  computeViewportResults() {
152
177
  const viewportHeight = this.getListHeight();
153
178
  if (viewportHeight != null && this.resultHeight > 0) {
@@ -377,7 +402,26 @@ export class ResultList {
377
402
  },
378
403
  "complexType": {
379
404
  "original": "Result",
380
- "resolved": "{ [x: string]: unknown; }",
405
+ "resolved": "{ id: string; type: string; } & Record<string, unknown>",
406
+ "references": {
407
+ "Result": {
408
+ "location": "local"
409
+ }
410
+ }
411
+ }
412
+ }, {
413
+ "method": "resultClick",
414
+ "name": "resultClick",
415
+ "bubbles": true,
416
+ "cancelable": true,
417
+ "composed": true,
418
+ "docs": {
419
+ "tags": [],
420
+ "text": ""
421
+ },
422
+ "complexType": {
423
+ "original": "Result",
424
+ "resolved": "{ id: string; type: string; } & Record<string, unknown>",
381
425
  "references": {
382
426
  "Result": {
383
427
  "location": "local"
@@ -0,0 +1,12 @@
1
+ export const getWindowSelection = () => {
2
+ if (typeof window !== 'undefined') {
3
+ return window.getSelection();
4
+ }
5
+ return undefined;
6
+ };
7
+ export const createDocumentRange = () => {
8
+ return document.createRange();
9
+ };
10
+ export const createTextNode = (text) => {
11
+ return new Text(text != null && text !== '' ? text : ' ');
12
+ };
@@ -1,21 +1,29 @@
1
- export const getWindowSelection = () => {
2
- if (typeof window !== 'undefined') {
3
- return window.getSelection();
4
- }
5
- return undefined;
1
+ import { createTextNode } from './dom';
2
+ export const createResultUrn = (result) => {
3
+ return `${result.type}:${result.id}`;
6
4
  };
7
- export const createDocumentRange = () => {
8
- return document.createRange();
5
+ export const createSearchResultReplacement = (result, before, after) => {
6
+ const urn = createResultUrn(result);
7
+ return {
8
+ before: createTextNode(before),
9
+ beforeSpace: createTextNode(createHairSpace()),
10
+ result: createTextNode(urn),
11
+ afterSpace: after != null ? createTextNode(createNoBreakSpace()) : undefined,
12
+ after: after != null ? createTextNode(after) : undefined,
13
+ };
9
14
  };
10
- export const isTextNode = (node) => {
11
- return node instanceof Text;
15
+ export const getNodesForSearchResultReplacement = (replacement) => {
16
+ const keys = Object.keys(replacement);
17
+ return keys
18
+ .map((key) => replacement[key])
19
+ .filter((node) => node != null);
12
20
  };
13
- export const isHtmlElement = (target) => {
14
- return target instanceof HTMLElement;
21
+ export const trimNonstandardSpaces = (text) => {
22
+ return text.replace(/[\u200A]/g, '').replace(/[\u00A0]/g, ' ');
15
23
  };
16
- export const isReplacedElement = (el) => {
17
- return (el === null || el === void 0 ? void 0 : el.getAttribute('data-replaced')) === 'true';
24
+ const createHairSpace = () => {
25
+ return String.fromCharCode(8202);
18
26
  };
19
- export const createTextNode = (text) => {
20
- return new Text(text != null && text !== '' ? text : ' ');
27
+ const createNoBreakSpace = () => {
28
+ return String.fromCharCode(160);
21
29
  };
@@ -1,23 +1,7 @@
1
1
  .wrapper {
2
2
  display: flex;
3
- align-items: center;
4
- width: 100%;
5
- box-sizing: border-box;
6
- background: none;
7
- border: 1px solid transparent;
8
- border-radius: 4px;
9
- font-family: var(--vertex-ui-font-family);
10
- font-size: 0.875rem;
11
- line-height: 1.4;
12
- }
13
-
14
- .test-mention {
15
- display: inline-block;
16
- color: blue;
17
- }
18
-
19
- .hidden {
20
- visibility: hidden;
3
+ border: 1px solid var(--vertex-ui-neutral-600);
4
+ border-radius: 0.5rem;
21
5
  }
22
6
 
23
7
  .content-input {
@@ -33,17 +17,6 @@
33
17
  white-space: pre-line;
34
18
  }
35
19
 
36
- .textarea {
37
- overflow: hidden;
38
- outline: none;
39
- box-shadow: none;
40
- resize: none;
41
- }
42
-
43
- .content-input:focus {
44
- outline: none;
45
- }
46
-
47
20
  /* standard */
48
21
  .standard {
49
22
  border-color: var(--vertex-ui-neutral-400);