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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) 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-button-786427d6.js → icon-button-2256a63a.js} +1 -1
  8. package/dist/cjs/{icon-460fd0f5.js → icon-c3ab7a57.js} +1 -1
  9. package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-35893713.js} +60 -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 +33 -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/square-dot-outline.js +2 -0
  54. package/dist/collection/components/icon/icons/update.js +2 -0
  55. package/dist/collection/components/icon/icons/views.js +2 -0
  56. package/dist/collection/components/icon-button/icon-button.js +1 -1
  57. package/dist/collection/components/index.js +3 -1
  58. package/dist/collection/components/menu/menu.js +1 -1
  59. package/dist/collection/components/popover/popover.js +51 -0
  60. package/dist/collection/components/result-list/result-list.js +52 -5
  61. package/dist/collection/components/result-list/types.js +1 -0
  62. package/dist/collection/components/search-bar/dom.js +29 -0
  63. package/dist/collection/components/search-bar/lib.js +76 -15
  64. package/dist/collection/components/search-bar/search-bar.css +0 -16
  65. package/dist/collection/components/search-bar/search-bar.js +429 -320
  66. package/dist/collection/components/select/select.css +24 -0
  67. package/dist/collection/components/select/select.js +49 -2
  68. package/dist/collection/components/tab/tab.css +16 -0
  69. package/dist/collection/components/tab/tab.js +85 -0
  70. package/dist/collection/components/tab/util.js +3 -0
  71. package/dist/collection/components/tabs/tabs.css +67 -0
  72. package/dist/collection/components/tabs/tabs.js +159 -0
  73. package/dist/collection/components/text-field/text-field.js +1 -0
  74. package/dist/collection/components/tooltip/tooltip.js +62 -18
  75. package/dist/collection/types/icon.js +11 -0
  76. package/dist/collection/util/templates/element-pool.js +19 -1
  77. package/dist/components/components.css +1 -1
  78. package/dist/components/components.esm.js +1 -1
  79. package/dist/components/index.esm.js +1 -1
  80. package/dist/components/p-036a0be0.js +1 -0
  81. package/dist/components/{p-165aed7d.js → p-0d4a0d61.js} +1 -1
  82. package/dist/components/{p-9374ef6c.js → p-1367d3af.js} +1 -1
  83. package/dist/components/{p-103249b4.js → p-1971ed0b.js} +1 -1
  84. package/dist/components/p-1d08dd79.entry.js +1 -0
  85. package/dist/components/p-2ae8175d.entry.js +1 -0
  86. package/dist/components/p-2b4aedaa.entry.js +1 -0
  87. package/dist/components/p-3438c441.js +1 -0
  88. package/dist/components/p-3dd7a75f.entry.js +1 -0
  89. package/dist/components/p-406e73da.entry.js +1 -0
  90. package/dist/components/p-4327deea.js +1 -0
  91. package/dist/components/p-43b1b3f9.js +1 -0
  92. package/dist/components/p-49db6547.entry.js +1 -0
  93. package/dist/components/p-606596de.entry.js +1 -0
  94. package/dist/components/{p-ca52a423.js → p-63b48634.js} +1 -1
  95. package/dist/components/p-655053df.js +1 -0
  96. package/dist/components/p-69496858.js +1 -0
  97. package/dist/components/p-6a49c365.entry.js +1 -0
  98. package/dist/components/p-6b6c2260.js +1 -0
  99. package/dist/components/p-6b862967.js +1 -0
  100. package/dist/components/p-76b961b8.js +1 -0
  101. package/dist/components/p-8bbc344d.entry.js +1 -0
  102. package/dist/components/p-96f55673.js +1 -0
  103. package/dist/components/p-a0eac69c.entry.js +1 -0
  104. package/dist/components/p-bc2fbd68.entry.js +1 -0
  105. package/dist/components/p-c2706288.js +1 -0
  106. package/dist/components/p-d3fd9ca3.entry.js +1 -0
  107. package/dist/components/p-d539f530.js +1 -0
  108. package/dist/components/p-e35057b5.entry.js +1 -0
  109. package/dist/components/p-ee496965.entry.js +1 -0
  110. package/dist/components/p-ff7c70b9.js +1 -0
  111. package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-e2a2cfb5.js} +1 -1
  112. package/dist/esm/color-picker-1d67effe.js +44 -0
  113. package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
  114. package/dist/esm/components.js +1 -1
  115. package/dist/esm/{dialog-e3f49527.js → dialog-1cef715c.js} +1 -1
  116. package/dist/esm/dom-613e2677.js +10 -0
  117. package/dist/esm/{icon-d37150b4.js → icon-55b22de7.js} +1 -1
  118. package/dist/esm/{icon-button-aad3c0e7.js → icon-button-e6c72aec.js} +1 -1
  119. package/dist/esm/{icon-helper-83f10f73.js → icon-helper-67de1067.js} +60 -0
  120. package/dist/esm/index.js +17 -13
  121. package/dist/esm/lib-73fbca8b.js +7 -0
  122. package/dist/esm/loader.js +1 -1
  123. package/dist/esm/{popover-67c88e4b.js → popover-6e806354.js} +23 -1
  124. package/dist/esm/{result-list-36cfb08a.js → result-list-16c6afbd.js} +46 -2
  125. package/dist/esm/search-bar-8d18626e.js +525 -0
  126. package/dist/esm/{select-75ed5653.js → select-78aeff96.js} +27 -4
  127. package/dist/esm/tab-c76332b0.js +24 -0
  128. package/dist/esm/tabs-8e5353ba.js +109 -0
  129. package/dist/esm/{text-field-e542da25.js → text-field-32ac877e.js} +1 -0
  130. package/dist/esm/{tooltip-97c1b3ec.js → tooltip-29278ea4.js} +58 -22
  131. package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
  132. package/dist/esm/vertex-color-picker.entry.js +2 -1
  133. package/dist/esm/vertex-color-swatch.entry.js +4 -0
  134. package/dist/esm/vertex-dialog.entry.js +1 -1
  135. package/dist/esm/vertex-icon-button.entry.js +2 -2
  136. package/dist/esm/vertex-icon.entry.js +2 -2
  137. package/dist/esm/vertex-popover.entry.js +1 -1
  138. package/dist/esm/vertex-result-list.entry.js +1 -1
  139. package/dist/esm/vertex-search-bar.entry.js +1 -1
  140. package/dist/esm/vertex-select.entry.js +1 -1
  141. package/dist/esm/vertex-tab.entry.js +3 -0
  142. package/dist/esm/vertex-tabs.entry.js +4 -0
  143. package/dist/esm/vertex-textfield.entry.js +1 -1
  144. package/dist/esm/vertex-tooltip.entry.js +2 -1
  145. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
  146. package/dist/types/components/color-picker/color-picker.d.ts +19 -0
  147. package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
  148. package/dist/types/components/color-swatch/lib.d.ts +1 -0
  149. package/dist/types/components/icon/icons/caution.d.ts +3 -0
  150. package/dist/types/components/icon/icons/compare.d.ts +3 -0
  151. package/dist/types/components/icon/icons/compress.d.ts +3 -0
  152. package/dist/types/components/icon/icons/cube-stack.d.ts +3 -0
  153. package/dist/types/components/icon/icons/expand.d.ts +3 -0
  154. package/dist/types/components/icon/icons/pin-text-square.d.ts +3 -0
  155. package/dist/types/components/icon/icons/plus-with-arrow.d.ts +3 -0
  156. package/dist/types/components/icon/icons/pmi.d.ts +3 -0
  157. package/dist/types/components/icon/icons/square-dot-outline.d.ts +3 -0
  158. package/dist/types/components/icon/icons/update.d.ts +3 -0
  159. package/dist/types/components/icon/icons/views.d.ts +3 -0
  160. package/dist/types/components/index.d.ts +3 -1
  161. package/dist/types/components/popover/popover.d.ts +7 -0
  162. package/dist/types/components/result-list/result-list.d.ts +6 -1
  163. package/dist/types/components/result-list/types.d.ts +4 -0
  164. package/dist/types/components/search-bar/dom.d.ts +8 -0
  165. package/dist/types/components/search-bar/lib.d.ts +31 -6
  166. package/dist/types/components/search-bar/search-bar.d.ts +125 -42
  167. package/dist/types/components/select/select.d.ts +8 -0
  168. package/dist/types/components/tab/tab.d.ts +11 -0
  169. package/dist/types/components/tab/util.d.ts +1 -0
  170. package/dist/types/components/tabs/tabs.d.ts +23 -0
  171. package/dist/types/components/tooltip/tooltip.d.ts +7 -0
  172. package/dist/types/components.d.ts +254 -96
  173. package/dist/types/types/icon.d.ts +11 -0
  174. package/dist/types/util/templates/element-pool.d.ts +10 -1
  175. package/package.json +4 -3
  176. package/dist/cjs/color-picker-876ace00.js +0 -37
  177. package/dist/cjs/search-bar-bb40cfa7.js +0 -290
  178. package/dist/collection/components/color-circle/color-circle.css +0 -18
  179. package/dist/components/p-03dbb28c.js +0 -1
  180. package/dist/components/p-0f8b9ede.entry.js +0 -1
  181. package/dist/components/p-19318fee.entry.js +0 -1
  182. package/dist/components/p-1d6cb015.entry.js +0 -1
  183. package/dist/components/p-209db2ba.entry.js +0 -1
  184. package/dist/components/p-20a74d5d.entry.js +0 -1
  185. package/dist/components/p-35e7ab78.entry.js +0 -1
  186. package/dist/components/p-4224c2ad.js +0 -1
  187. package/dist/components/p-52739247.js +0 -1
  188. package/dist/components/p-552c128f.js +0 -1
  189. package/dist/components/p-6505cdb3.js +0 -1
  190. package/dist/components/p-7dba2574.entry.js +0 -1
  191. package/dist/components/p-7f64b251.entry.js +0 -1
  192. package/dist/components/p-8434602f.js +0 -1
  193. package/dist/components/p-ae6a3c46.entry.js +0 -1
  194. package/dist/components/p-bd11e7d1.js +0 -1
  195. package/dist/components/p-d9b9aebe.js +0 -1
  196. package/dist/components/p-e576818b.entry.js +0 -1
  197. package/dist/components/p-ebabee40.entry.js +0 -1
  198. package/dist/components/p-f49a7ffd.js +0 -1
  199. package/dist/components/p-f71fc166.entry.js +0 -1
  200. package/dist/esm/color-picker-2e3b51fa.js +0 -35
  201. package/dist/esm/search-bar-59cc151d.js +0 -288
  202. package/dist/esm/vertex-color-circle.entry.js +0 -2
@@ -0,0 +1,527 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-6a92256c.js');
4
+ const index$1 = require('./index-e1b40fa6.js');
5
+ const templates = require('./templates-e7b3ffbb.js');
6
+
7
+ // do not edit .js files directly - edit src/index.jst
8
+
9
+
10
+
11
+ var fastDeepEqual = function equal(a, b) {
12
+ if (a === b) return true;
13
+
14
+ if (a && b && typeof a == 'object' && typeof b == 'object') {
15
+ if (a.constructor !== b.constructor) return false;
16
+
17
+ var length, i, keys;
18
+ if (Array.isArray(a)) {
19
+ length = a.length;
20
+ if (length != b.length) return false;
21
+ for (i = length; i-- !== 0;)
22
+ if (!equal(a[i], b[i])) return false;
23
+ return true;
24
+ }
25
+
26
+
27
+
28
+ if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
29
+ if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
30
+ if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
31
+
32
+ keys = Object.keys(a);
33
+ length = keys.length;
34
+ if (length !== Object.keys(b).length) return false;
35
+
36
+ for (i = length; i-- !== 0;)
37
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
38
+
39
+ for (i = length; i-- !== 0;) {
40
+ var key = keys[i];
41
+
42
+ if (!equal(a[key], b[key])) return false;
43
+ }
44
+
45
+ return true;
46
+ }
47
+
48
+ // true if both NaN, false otherwise
49
+ return a!==a && b!==b;
50
+ };
51
+
52
+ const getWindowSelection = () => {
53
+ if (typeof window !== 'undefined') {
54
+ return window.getSelection();
55
+ }
56
+ return undefined;
57
+ };
58
+ const nodeHasChildNodes = (node) => {
59
+ return node.hasChildNodes();
60
+ };
61
+ const createDocumentRange = () => {
62
+ return document.createRange();
63
+ };
64
+ const createTextNode = (text) => {
65
+ return new Text(text);
66
+ };
67
+ const createBreak = () => {
68
+ return document.createElement('br');
69
+ };
70
+ const isHtmlElement = (node) => {
71
+ return node instanceof HTMLElement;
72
+ };
73
+ const isBrElement = (node) => {
74
+ return node instanceof HTMLBRElement;
75
+ };
76
+
77
+ const createResultUri = (result) => {
78
+ return `${result.type}:${result.id}`;
79
+ };
80
+ const createSearchResultReplacement = (result, before, after) => {
81
+ const urn = createResultUri(result);
82
+ return {
83
+ before: createTextNode(before),
84
+ beforeSpace: createTextNode(createHairSpace()),
85
+ result: createTextNode(urn),
86
+ afterSpace: after != null
87
+ ? createTextNode(createNoBreakSpace())
88
+ : createTextNode(createHairSpace()),
89
+ after: after != null ? createTextNode(after) : undefined,
90
+ };
91
+ };
92
+ /**
93
+ * Newline characters and spaces are represented slightly differently within a
94
+ * content editable element between browsers. This method standardizes the
95
+ * representation of those characters to avoid having to write branching logic
96
+ * to support each individual browser.
97
+ */
98
+ const standardizeNewlinesAndSpaces = (node) => {
99
+ const content = node.textContent;
100
+ if (content === '\n') {
101
+ return [createBreak()];
102
+ }
103
+ else if (content != null && content.includes('\n')) {
104
+ const split = content.split('\n');
105
+ return split.reduce((res, substr, i) => {
106
+ const previous = split[i - 1];
107
+ // Ignore the empty string if the prior element was converted
108
+ // to a breaking element to prevent duplication of newlines.
109
+ if (substr === '' && previous !== '') {
110
+ return res;
111
+ }
112
+ return [
113
+ ...res,
114
+ // Standard spaces are not always respected with in `Text`
115
+ // elements when appended to a contenteditable element. This
116
+ // conversion preserves that spacing.
117
+ createTextNode(substr.replace(/ /g, createNoBreakSpace())),
118
+ createBreak(),
119
+ ];
120
+ }, []);
121
+ }
122
+ return [node];
123
+ };
124
+ const getNodesForSearchResultReplacement = (replacement, isBreaking = false) => {
125
+ const keys = Object.keys(replacement);
126
+ const replacementElements = keys
127
+ .map((key) => replacement[key])
128
+ .filter((node) => node != null);
129
+ // If the element is intended to replace a breaking element such
130
+ // as a `<div>` wrapper, a newline is required alongside the standard
131
+ // replacement elements.
132
+ if (isBreaking) {
133
+ return [createTextNode('\n'), ...replacementElements];
134
+ }
135
+ return replacementElements;
136
+ };
137
+ /**
138
+ * We leverage a couple unique spaces to represent mentions, allowing for
139
+ * correct cursor movement when using arrow keys. As these characters are
140
+ * purely for functional behavior of the input, `trimNonstandardSpaces`
141
+ * will remove them so the input is suitable for emitting.
142
+ *
143
+ * U+200A is a "Hair Space" which acts as a space, but is not visually
144
+ * represented as one.
145
+ *
146
+ * U+00A0 is a "No-Break Space" which is commonly added by browsers
147
+ * when interacting with a contenteditable element.
148
+ */
149
+ const trimNonstandardSpaces = (text) => {
150
+ return text.replace(/[\u200A]/g, '').replace(/[\u00A0]/g, ' ');
151
+ };
152
+ const createHairSpace = () => {
153
+ return String.fromCharCode(8202);
154
+ };
155
+ const createNoBreakSpace = () => {
156
+ return String.fromCharCode(160);
157
+ };
158
+
159
+ const searchBarCss = ".wrapper.sc-vertex-search-bar{display:flex;align-items:center;width:100%;box-sizing:border-box;background:none;border:1px solid transparent;border-radius:4px;font-family:var(--vertex-ui-font-family);font-size:0.875rem;line-height:1.4}.content-input.sc-vertex-search-bar{width:100%;box-sizing:border-box;padding:6px 0.5em 7px;border:1px solid transparent;background:none;font-family:var(--vertex-ui-font-family);font-weight:var(--vertex-ui-font-weight-base);font-size:0.875rem;line-height:1.4;white-space:pre-line}.content-input.sc-vertex-search-bar:focus{outline:none}.standard.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);color:var(--vertex-ui-neutral-800)}.standard.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.standard.sc-vertex-search-bar:hover:not(.disabled),.standard.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-500)}.standard.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.standard.disabled.sc-vertex-search-bar,.standard.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.blank.sc-vertex-search-bar{color:var(--vertex-ui-neutral-800)}.blank.sc-vertex-search-bar:not(:hover) .content-input.sc-vertex-search-bar:focus{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-500)}.blank.sc-vertex-search-bar:hover:not(.disabled) .content-input.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-400);border-radius:4px}.blank.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-200)}.blank.disabled.sc-vertex-search-bar,.blank.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);color:var(--vertex-ui-neutral-800)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.filled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.filled.sc-vertex-search-bar:hover:not(.disabled),.filled.sc-vertex-search-bar:focus{border-bottom-color:var(--vertex-ui-blue-600)}.filled.disabled.sc-vertex-search-bar{border-color:var(--vertex-ui-neutral-100)}.filled.disabled.sc-vertex-search-bar,.filled.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar{background-color:var(--vertex-ui-white);border-color:var(--vertex-ui-white) var(--vertex-ui-white) var(--vertex-ui-neutral-400) var(--vertex-ui-white);color:var(--vertex-ui-neutral-800)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-700)}.underlined.sc-vertex-search-bar:hover:not(.disabled),.underlined.sc-vertex-search-bar:focus{background-color:var(--vertex-ui-neutral-200);border-color:var(--vertex-ui-neutral-200);border-bottom-color:var(--vertex-ui-blue-600)}.underlined.disabled.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-neutral-200)}.underlined.disabled.sc-vertex-search-bar,.underlined.disabled.sc-vertex-search-bar .content-input.sc-vertex-search-bar:empty::before{content:attr(data-placeholder);color:var(--vertex-ui-neutral-400)}.underlined.has-error.sc-vertex-search-bar{border-bottom-color:var(--vertex-ui-red-600)}";
160
+
161
+ const SearchBar = class {
162
+ constructor(hostRef) {
163
+ index.registerInstance(this, hostRef);
164
+ this.searchChanged = index.createEvent(this, "searchChanged", 7);
165
+ this.inputChanged = index.createEvent(this, "inputChanged", 7);
166
+ this.resultReplaced = index.createEvent(this, "resultReplaced", 7);
167
+ this.inputFocus = index.createEvent(this, "inputFocus", 7);
168
+ this.inputBlur = index.createEvent(this, "inputBlur", 7);
169
+ this.rawElements = [];
170
+ this.attemptReplaceElement = (child, other, replacement, isBreaking = false) => {
171
+ // In the case that the child we're evaluating has its own children
172
+ // (often a wrapper `<div>`), we want to evaluate whether any of its
173
+ // children is the target to replace.
174
+ if (nodeHasChildNodes(child) &&
175
+ Array.from(child.childNodes).some((c) => nodeHasChildNodes(c) || this.isIdenticalElement(c, other))) {
176
+ return Array.from(child.childNodes).reduce((res, c) => [
177
+ ...res,
178
+ ...this.attemptReplaceElement(c, other, replacement,
179
+ // If the element we're evaluating is a wrapper, we want to
180
+ // consider it a breaking element and add a newline to the
181
+ // replaced element only if the previous node is a `Text` node.
182
+ !isHtmlElement(child.previousSibling)),
183
+ ], []);
184
+ }
185
+ else {
186
+ return this.isIdenticalElement(child, other)
187
+ ? getNodesForSearchResultReplacement(replacement, isBreaking)
188
+ : [child];
189
+ }
190
+ };
191
+ this.isIdenticalElement = (child, other) => {
192
+ return (child === this.triggeredElement ||
193
+ this.getTextContent(child) === this.getTextContent(other));
194
+ };
195
+ this.getTextContent = (node) => {
196
+ var _a;
197
+ if (isHtmlElement(node)) {
198
+ return node.innerText;
199
+ }
200
+ return (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
201
+ };
202
+ /**
203
+ * Inspects the cursor position for the following conditions:
204
+ *
205
+ * 1. The cursor has moved to text that contains a valid string
206
+ * and trigger character, indicating we need to dispatch a
207
+ * `searchChanged` event and display the results.
208
+ *
209
+ * 2. The cursor has moved within text that contains a valid string
210
+ * and trigger character, indicating we need to dispatch a
211
+ * `searchChanged` event to update the currently displayed results.
212
+ *
213
+ * 3. The cursor has moved to text that does not contain a valid
214
+ * string and trigger character, indicating we need to hide any
215
+ * displayed search results.
216
+ */
217
+ this.handleCursorPositionUpdate = () => {
218
+ var _a, _b;
219
+ const windowRange = (_a = getWindowSelection()) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
220
+ if (windowRange != null) {
221
+ const triggerText = this.readTriggerValue((_b = windowRange.commonAncestorContainer.textContent) !== null && _b !== void 0 ? _b : '', windowRange.startOffset);
222
+ if (!this.hasTriggered && triggerText != null) {
223
+ this.hasTriggered = true;
224
+ this.triggeredRange = windowRange;
225
+ this.triggeredElement = windowRange.commonAncestorContainer;
226
+ this.searchChanged.emit(triggerText.replace(this.triggerCharacter, ''));
227
+ }
228
+ else if (this.hasTriggered && triggerText != null) {
229
+ this.triggeredRange = windowRange;
230
+ this.triggeredElement = windowRange.commonAncestorContainer;
231
+ this.searchChanged.emit(triggerText.replace(this.triggerCharacter, ''));
232
+ }
233
+ else {
234
+ this.hasTriggered = false;
235
+ this.triggeredRange = undefined;
236
+ this.triggeredElement = undefined;
237
+ }
238
+ }
239
+ this.cursorPosition = this.getCursorPosition();
240
+ };
241
+ this.readTriggerValue = (value, fromIndex) => {
242
+ const adjustedValue = value.replace(String.fromCharCode(160), ' ');
243
+ const beforeSubstr = adjustedValue.substring(0, fromIndex);
244
+ const afterSubstr = adjustedValue.substring(fromIndex);
245
+ const adjustedBeforeSubstr = beforeSubstr.includes(this.triggerCharacter)
246
+ ? beforeSubstr.substring(beforeSubstr.lastIndexOf(this.triggerCharacter))
247
+ : '';
248
+ const adjustedAfterSubstr = afterSubstr.substring(0, this.firstIndexOfBreakCharacter(afterSubstr));
249
+ const result = `${adjustedBeforeSubstr}${adjustedAfterSubstr}`;
250
+ return result.includes(this.triggerCharacter) &&
251
+ !this.includesBreakCharacter(result)
252
+ ? result
253
+ : undefined;
254
+ };
255
+ this.includesBreakCharacter = (value) => {
256
+ return this.breakCharacters.some((bc) => value.includes(bc));
257
+ };
258
+ this.firstIndexOfBreakCharacter = (value) => {
259
+ const indices = this.breakCharacters
260
+ .map((bc) => value.indexOf(bc))
261
+ .filter((i) => i >= 0);
262
+ return indices.length > 0 ? Math.min(...indices) : value.length;
263
+ };
264
+ this.moveCursorToNodeEnd = (node, collapseToStart = false) => {
265
+ const selection = getWindowSelection();
266
+ if (selection != null) {
267
+ const range = createDocumentRange();
268
+ range.selectNodeContents(node);
269
+ range.collapse(collapseToStart);
270
+ selection.removeAllRanges();
271
+ selection.addRange(range);
272
+ }
273
+ };
274
+ this.getContentAsString = (element) => {
275
+ if (element != null) {
276
+ const res = trimNonstandardSpaces(Array.from(element.childNodes).reduce((res, n) => {
277
+ var _a;
278
+ const previousSiblingIsBlock = n.previousSibling == null || isHtmlElement(n.previousSibling);
279
+ if (isHtmlElement(n) && n.getAttribute('data-replaced') === 'true') {
280
+ /**
281
+ * If an element has been replaced visually, append the original
282
+ * value prior to being replaced.
283
+ */
284
+ return `${res}${n.getAttribute('data-original')}`;
285
+ }
286
+ else if (isHtmlElement(n) && n.childElementCount > 0) {
287
+ /**
288
+ * If an element is a wrapper, we want to treat it as a block element,
289
+ * ensuring newlines before and after the content.
290
+ * Additionally, we want to evaluate each of its children independently.
291
+ * Some browsers will conditionally wrap content in additional wrapper
292
+ * elements we need to unravel.
293
+ */
294
+ return `${res}${previousSiblingIsBlock ? '' : '\n'}${this.getContentAsString(n)}`;
295
+ }
296
+ else if (isBrElement(n)) {
297
+ /**
298
+ * If an element is a `<br>` element, we want to simply represent
299
+ * it as a newline in the returned string.
300
+ */
301
+ return `${res}\n`;
302
+ }
303
+ else if (isHtmlElement(n)) {
304
+ /**
305
+ * If an element is a wrapper, we want to treat it as a block element,
306
+ * ensuring newlines before and after the content.
307
+ * If the prior element is also to be treated as a block format, we
308
+ * will omit the newline before the content to avoid duplicating the
309
+ * behavior.
310
+ */
311
+ return `${res}${previousSiblingIsBlock ? '' : '\n'}${n.innerText}\n`;
312
+ }
313
+ else {
314
+ /**
315
+ * If a node is simply a `Text` node, we just want to append the text
316
+ * if defined.
317
+ */
318
+ return `${res}${(_a = n.textContent) !== null && _a !== void 0 ? _a : ''}`;
319
+ }
320
+ }, ''));
321
+ return res;
322
+ }
323
+ return '';
324
+ };
325
+ this.createReplacedElement = (original, data) => {
326
+ const template = this.hostEl.querySelector('template[slot="replaced"]');
327
+ if (template != null) {
328
+ const instance = templates.generateInstanceFromTemplate(template);
329
+ instance.bindings.bind(data);
330
+ instance.element.id = data.id;
331
+ instance.element.style.display = 'inline-block';
332
+ instance.element.contentEditable = 'false';
333
+ instance.element.tabIndex = -1;
334
+ instance.element.setAttribute('data-replaced', 'true');
335
+ instance.element.setAttribute('data-original', original);
336
+ return instance.element;
337
+ }
338
+ else {
339
+ throw new Error('Replaced template not defined.');
340
+ }
341
+ };
342
+ this.variant = 'standard';
343
+ this.disabled = false;
344
+ this.triggerCharacter = '@';
345
+ this.breakCharacters = [' ', '\n'];
346
+ this.resultItems = undefined;
347
+ this.placement = 'bottom-start';
348
+ this.value = undefined;
349
+ this.placeholder = undefined;
350
+ this.replacements = [];
351
+ this.replacementUriType = 'user';
352
+ this.cursorPosition = undefined;
353
+ this.displayedElements = [];
354
+ this.hasTriggered = false;
355
+ this.handleKeyDown = this.handleKeyDown.bind(this);
356
+ this.handleKeyUp = this.handleKeyUp.bind(this);
357
+ this.handleResultClick = this.handleResultClick.bind(this);
358
+ this.handleClick = this.handleClick.bind(this);
359
+ this.handleWindowClick = this.handleWindowClick.bind(this);
360
+ this.handleInput = this.handleInput.bind(this);
361
+ this.handleBlur = this.handleBlur.bind(this);
362
+ this.handleFocus = this.handleFocus.bind(this);
363
+ this.handleCursorPositionUpdate =
364
+ this.handleCursorPositionUpdate.bind(this);
365
+ this.updateContent = this.updateContent.bind(this);
366
+ this.replaceContent = this.replaceContent.bind(this);
367
+ }
368
+ componentDidLoad() {
369
+ this.replaceContent(this.value);
370
+ }
371
+ connectedCallback() {
372
+ window.addEventListener('click', this.handleWindowClick);
373
+ }
374
+ disconnectedCallback() {
375
+ window.removeEventListener('click', this.handleWindowClick);
376
+ }
377
+ replaceContent(newValue, oldValue) {
378
+ if (newValue != null && newValue !== oldValue) {
379
+ const pattern = `${this.replacementUriType}:[0-9a-z-]{36}`;
380
+ const matches = newValue.match(new RegExp(pattern, 'g'));
381
+ const replacementsMap = this.replacements.reduce((map, r) => (Object.assign(Object.assign({}, map), { [createResultUri(r)]: r })), {});
382
+ let nextSubstr = newValue;
383
+ const parts = matches != null
384
+ ? matches === null || matches === void 0 ? void 0 : matches.reduce((res, m) => {
385
+ if (replacementsMap[m] != null) {
386
+ const urn = createResultUri(replacementsMap[m]);
387
+ const index = nextSubstr.indexOf(urn);
388
+ const before = nextSubstr.substring(0, index);
389
+ const after = nextSubstr.substring(index + urn.length);
390
+ const replacement = createSearchResultReplacement(replacementsMap[m], before);
391
+ nextSubstr = after;
392
+ return [
393
+ ...res,
394
+ replacement.before,
395
+ replacement.beforeSpace,
396
+ replacement.result,
397
+ replacement.afterSpace,
398
+ ];
399
+ }
400
+ return res;
401
+ }, [])
402
+ : [];
403
+ this.rawElements = [...parts, createTextNode(nextSubstr)].reduce((res, p) => [...res, ...standardizeNewlinesAndSpaces(p)], []);
404
+ this.updateContent(this.replacements);
405
+ }
406
+ }
407
+ updateContent(newValue, oldValue) {
408
+ if (this.contentEl != null && !fastDeepEqual(newValue, oldValue)) {
409
+ this.contentEl.innerHTML = '';
410
+ this.displayedElements = this.rawElements.map((el) => {
411
+ const raw = isHtmlElement(el) ? el.innerText : el.textContent;
412
+ const replacement = this.replacements.find((r) => raw === null || raw === void 0 ? void 0 : raw.includes(createResultUri(r)));
413
+ if (raw != null && replacement != null) {
414
+ const replacementElement = this.createReplacedElement(raw, replacement);
415
+ return replacementElement;
416
+ }
417
+ return el;
418
+ });
419
+ this.displayedElements.forEach((el) => {
420
+ var _a;
421
+ (_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.appendChild(typeof el === 'string' ? createTextNode(el) : el);
422
+ });
423
+ if (this.lastReplacedSpace != null) {
424
+ this.moveCursorToNodeEnd(this.lastReplacedSpace);
425
+ }
426
+ this.inputChanged.emit(this.getContentAsString(this.contentEl));
427
+ }
428
+ }
429
+ render() {
430
+ var _a;
431
+ const classes = index$1.classnames('wrapper', {
432
+ standard: this.variant === 'standard',
433
+ filled: this.variant === 'filled',
434
+ underlined: this.variant === 'underlined',
435
+ blank: this.variant === 'blank',
436
+ disabled: this.disabled,
437
+ });
438
+ return (index.h(index.Host, null, index.h("div", { class: classes }, index.h("span", { class: "content-input", role: "textbox", contentEditable: "true", "aria-multiline": "true", "data-placeholder": this.placeholder, ref: (el) => (this.contentEl = el), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onClick: this.handleCursorPositionUpdate, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("vertex-result-list", { position: this.cursorPosition, placement: this.placement, open: this.hasTriggered &&
439
+ this.resultItems != null &&
440
+ this.resultItems.length > 0, items: (_a = this.resultItems) !== null && _a !== void 0 ? _a : [], onEnterPressed: this.handleResultClick, onResultClick: this.handleResultClick }, index.h("slot", { name: "results" })), index.h("slot", { name: "replaced" })));
441
+ }
442
+ handleKeyDown(event) {
443
+ if (this.hasTriggered && this.breakCharacters.includes(event.key)) {
444
+ this.hasTriggered = false;
445
+ this.triggeredRange = undefined;
446
+ this.triggeredElement = undefined;
447
+ }
448
+ }
449
+ handleKeyUp(event) {
450
+ this.handleCursorPositionUpdate();
451
+ this.cursorPosition = this.getCursorPosition();
452
+ }
453
+ async handleInput() {
454
+ this.inputChanged.emit(this.getContentAsString(this.contentEl));
455
+ }
456
+ handleClick() {
457
+ this.handleCursorPositionUpdate();
458
+ }
459
+ handleWindowClick(event) {
460
+ if (isHtmlElement(event.target) &&
461
+ event.target.getAttribute('data-replaced') === 'true' &&
462
+ event.target.nextSibling != null) {
463
+ this.moveCursorToNodeEnd(event.target.nextSibling, true);
464
+ }
465
+ }
466
+ handleFocus(event) {
467
+ this.inputFocus.emit(event);
468
+ }
469
+ handleBlur(event) {
470
+ this.hasTriggered = false;
471
+ this.inputBlur.emit(event);
472
+ }
473
+ handleResultClick(event) {
474
+ var _a;
475
+ const triggeredRange = this.triggeredRange;
476
+ const triggeredElement = this.triggeredElement;
477
+ const value = isHtmlElement(triggeredElement)
478
+ ? triggeredElement.innerText
479
+ : triggeredElement === null || triggeredElement === void 0 ? void 0 : triggeredElement.textContent;
480
+ if (this.contentEl != null &&
481
+ triggeredRange != null &&
482
+ triggeredElement != null &&
483
+ value != null) {
484
+ const triggeredValue = (_a = this.readTriggerValue(value, triggeredRange.startOffset)) !== null && _a !== void 0 ? _a : '';
485
+ const split = value.split(triggeredValue);
486
+ const before = split[0];
487
+ const after = split[1];
488
+ const replacement = createSearchResultReplacement(event.detail, before, after);
489
+ this.lastReplacedSpace = replacement.afterSpace;
490
+ this.rawElements = Array.from(this.contentEl.childNodes).reduce((re, e) => {
491
+ return [
492
+ ...re,
493
+ ...this.attemptReplaceElement(e, triggeredElement, replacement),
494
+ ];
495
+ }, []);
496
+ this.hasTriggered = false;
497
+ this.resultReplaced.emit(event.detail);
498
+ this.replacements = [
499
+ ...this.replacements.filter((r) => r.id !== event.detail.id),
500
+ event.detail,
501
+ ];
502
+ }
503
+ }
504
+ getCursorPosition() {
505
+ var _a;
506
+ const selection = getWindowSelection();
507
+ if (selection != null && selection.rangeCount > 0) {
508
+ const cursorBounds = selection.getRangeAt(0).getBoundingClientRect();
509
+ const contentBounds = (_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
510
+ const cursorBottom = cursorBounds.bottom || (contentBounds === null || contentBounds === void 0 ? void 0 : contentBounds.bottom) || 0;
511
+ const cursorTop = cursorBounds.top || (contentBounds === null || contentBounds === void 0 ? void 0 : contentBounds.top) || 0;
512
+ return {
513
+ x: cursorBounds.left || (contentBounds === null || contentBounds === void 0 ? void 0 : contentBounds.left) || 0,
514
+ y: this.placement.includes('top') ? cursorTop : cursorBottom,
515
+ };
516
+ }
517
+ throw new Error('Unable to retrieve window selection.');
518
+ }
519
+ get hostEl() { return index.getElement(this); }
520
+ static get watchers() { return {
521
+ "value": ["replaceContent"],
522
+ "replacements": ["updateContent"]
523
+ }; }
524
+ };
525
+ SearchBar.style = searchBarCss;
526
+
527
+ exports.SearchBar = SearchBar;
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-6a92256c.js');
4
4
  const index$1 = require('./index-e1b40fa6.js');
5
5
 
6
- const selectCss = ":host{--select-width:100%}.root{display:inline-block;color:var(--vertex-ui-neutral-700);width:var(--select-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);overflow:hidden;user-select:none}.root:not(.disabled):hover{color:var(--vertex-ui-neutral-800)}.root.disabled{color:var(--vertex-ui-neutral-400)}.target,.selected-option{background-color:var(--vertex-ui-neutral-200);width:100%;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;padding:0.375rem 0.75rem 0.375rem 0.75rem}.target.hidden{box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)}.selected-option.disabled,.target.disabled{background-color:var(--vertex-ui-neutral-100);cursor:default}.target{border-radius:4px}.icon{padding-left:1rem;margin-left:auto}.options{position:relative;cursor:pointer;background-color:var(--vertex-ui-white);border-radius:4px;padding:0.25rem 0;top:-0.25rem;box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)}.options.animated{transition:opacity 0.1s ease-in 0.05s;opacity:0}.options.hidden{background-color:transparent}.options.visible{opacity:1}.options>*,.options>slot::slotted(*){padding:0.375rem 0.75rem 0.375rem 0.75rem}.options.hidden>*,.options.hidden>slot::slotted(*){opacity:0}.options>slot::slotted(:hover){background-color:var(--vertex-ui-neutral-200)}vertex-popover{--transform-origin:top left;--open-animation-name:open-scale-y;--close-animation-name:close-scale-y}";
6
+ const selectCss = ":host{--select-width:100%;--select-option-white-space:normal;--max-dropdown-height:80vh}.root{display:inline-block;color:var(--vertex-ui-neutral-700);width:var(--select-width);font-family:var(--vertex-ui-font-family);font-size:var(--vertex-ui-text-base);overflow:hidden;user-select:none}.root:not(.disabled):hover{color:var(--vertex-ui-neutral-800)}.root.disabled{color:var(--vertex-ui-neutral-400)}.target,.selected-option{background-color:var(--vertex-ui-neutral-200);width:100%;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;padding:0.375rem 0.75rem 0.375rem 0.75rem}.target.hidden{box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%)}.selected-option.disabled,.target.disabled{background-color:var(--vertex-ui-neutral-100);cursor:default}.target{border-radius:4px}.text{white-space:var(--select-option-white-space);overflow:hidden;text-overflow:ellipsis}.icon{padding-left:1rem;margin-left:auto}.options{position:relative;cursor:pointer;background-color:var(--vertex-ui-white);border-radius:4px;padding:0.25rem 0;top:-0.25rem;box-shadow:0px 2px 4px -1px rgb(0 0 0 / 20%),\n 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);max-height:var(--max-dropdown-height);overflow-y:auto}.options.animated{transition:opacity 0.1s ease-in 0.05s;opacity:0}.options.hidden{background-color:transparent}.options.visible{opacity:1}.options>*,.options>slot::slotted(*){padding:0.375rem 0.75rem 0.375rem 0.75rem}.options.hidden>*,.options.hidden>slot::slotted(*){opacity:0}.options>slot::slotted(:hover){background-color:var(--vertex-ui-neutral-200)}.options>slot::slotted([data-selected=\"true\"]){display:none}vertex-popover{--transform-origin:top left;--open-animation-name:open-scale-y;--close-animation-name:close-scale-y}";
7
7
 
8
8
  const GET_BOUNDS_DEBOUNCE_THRESHOLD = 200;
9
9
  const Select = class {
@@ -16,6 +16,7 @@ const Select = class {
16
16
  this.placeholder = 'Select an option...';
17
17
  this.disabled = false;
18
18
  this.animated = true;
19
+ this.hideSelected = true;
19
20
  this.open = false;
20
21
  this.position = undefined;
21
22
  this.displayValue = undefined;
@@ -35,6 +36,9 @@ const Select = class {
35
36
  if (this.value != null) {
36
37
  this.handleUpdateValue(this.value);
37
38
  }
39
+ else {
40
+ this.handleUpdateDisplayValue();
41
+ }
38
42
  }
39
43
  connectedCallback() {
40
44
  window.addEventListener('resize', this.getBounds);
@@ -52,6 +56,13 @@ const Select = class {
52
56
  }
53
57
  this.controlled = value != null;
54
58
  }
59
+ handleUpdateDisplayValue() {
60
+ var _a;
61
+ this.clearSelectedOptionFlag();
62
+ if (this.hideSelected) {
63
+ (_a = this.getSelectedOption()) === null || _a === void 0 ? void 0 : _a.setAttribute('data-selected', 'true');
64
+ }
65
+ }
55
66
  render() {
56
67
  return (index.h("div", { class: index$1.classnames('root', {
57
68
  disabled: this.disabled,
@@ -60,7 +71,7 @@ const Select = class {
60
71
  }, onClick: !this.open && !this.disabled ? this.handleOpen : undefined }, index.h("div", { class: index$1.classnames('target', {
61
72
  hidden: this.open,
62
73
  disabled: this.disabled,
63
- }) }, this.displayValue || this.placeholder, index.h("div", { class: "icon" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" }))), index.h("vertex-popover", { position: this.position, open: this.open, animated: this.animated, resizeBehavior: "fixed", onDismissed: this.handleDismiss }, index.h("div", { class: index$1.classnames('options', {
74
+ }) }, index.h("div", { class: "text" }, this.displayValue || this.placeholder), index.h("div", { class: "icon" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" }))), index.h("vertex-popover", { position: this.position, open: this.open, animated: this.animated, resizeBehavior: "fixed", onDismissed: this.handleDismiss }, index.h("div", { class: index$1.classnames('options', {
64
75
  hidden: !this.open,
65
76
  visible: this.open,
66
77
  animated: this.animated,
@@ -68,7 +79,7 @@ const Select = class {
68
79
  minWidth: this.width != null ? `${this.width}px` : 'var(--select-width)',
69
80
  } }, index.h("div", { class: index$1.classnames('selected-option', {
70
81
  disabled: this.disabled,
71
- }), onClick: this.handleDismiss }, this.displayValue || this.placeholder, index.h("div", { class: "icon" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" }))), index.h("slot", null)))));
82
+ }), onClick: this.handleDismiss }, index.h("div", { class: "text" }, this.displayValue || this.placeholder), index.h("div", { class: "icon" }, index.h("vertex-icon", { name: "chevron-down", size: "sm" }))), index.h("slot", null)))));
72
83
  }
73
84
  handleOpen() {
74
85
  var _a, _b;
@@ -107,6 +118,15 @@ const Select = class {
107
118
  this.removeListeners.forEach((l) => l());
108
119
  this.removeListeners = [];
109
120
  }
121
+ clearSelectedOptionFlag() {
122
+ var _a, _b;
123
+ (_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'));
124
+ }
125
+ getSelectedOption() {
126
+ var _a, _b, _c;
127
+ const value = (_a = this.displayValue) !== null && _a !== void 0 ? _a : this.placeholder;
128
+ 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);
129
+ }
110
130
  getBounds() {
111
131
  if (this.getBoundsTimeout != null) {
112
132
  clearTimeout(this.getBoundsTimeout);
@@ -130,7 +150,10 @@ const Select = class {
130
150
  }
131
151
  get hostElement() { return index.getElement(this); }
132
152
  static get watchers() { return {
133
- "value": ["handleUpdateValue"]
153
+ "value": ["handleUpdateValue"],
154
+ "displayValue": ["handleUpdateDisplayValue"],
155
+ "hideSelected": ["handleUpdateDisplayValue"],
156
+ "placeholder": ["handleUpdateDisplayValue"]
134
157
  }; }
135
158
  };
136
159
  Select.style = selectCss;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-6a92256c.js');
4
+ const index$1 = require('./index-e1b40fa6.js');
5
+
6
+ const tabCss = ":host{position:relative;width:100%;height:100%}.content{display:none;height:0px}.content.active{display:flex;width:100%;height:100%}";
7
+
8
+ const Tab = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.tabClick = index.createEvent(this, "tabClick", 7);
12
+ this.handleClick = () => {
13
+ this.tabClick.emit(this.label);
14
+ };
15
+ this.label = undefined;
16
+ this.active = false;
17
+ }
18
+ render() {
19
+ return (index.h(index.Host, null, index.h("div", { class: index$1.classnames('content', {
20
+ active: this.active,
21
+ }) }, index.h("slot", null))));
22
+ }
23
+ };
24
+ Tab.style = tabCss;
25
+
26
+ exports.Tab = Tab;