@vertexvis/ui 0.1.0-testing.7 → 0.1.0

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 (190) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{color-circle-picker-13396ec4.js → color-circle-picker-d0403f1c.js} +2 -2
  3. package/dist/cjs/color-picker-2a4820fa.js +46 -0
  4. package/dist/cjs/{color-circle-05be54bf.js → color-swatch-8aaf6c0b.js} +42 -17
  5. package/dist/cjs/components.cjs.js +1 -1
  6. package/dist/cjs/{dialog-88e2308a.js → dialog-34f1dd6e.js} +1 -1
  7. package/dist/cjs/dom-a2c535e3.js +17 -0
  8. package/dist/cjs/{icon-460fd0f5.js → icon-3b1349ea.js} +1 -1
  9. package/dist/cjs/{icon-button-786427d6.js → icon-button-19061994.js} +1 -1
  10. package/dist/cjs/{icon-helper-ba408f49.js → icon-helper-cb479ba1.js} +107 -0
  11. package/dist/cjs/index.cjs.js +18 -12
  12. package/dist/cjs/lib-1bd1e383.js +9 -0
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{search-bar-1edc045f.js → search-bar-2e7ee35a.js} +177 -51
  15. package/dist/cjs/{select-5f8aecfe.js → select-2b2bdb97.js} +1 -1
  16. package/dist/cjs/{slider-13594e49.js → slider-7714cccb.js} +7 -1
  17. package/dist/cjs/tab-4335cd8f.js +26 -0
  18. package/dist/cjs/tabs-6f3e76e1.js +111 -0
  19. package/dist/cjs/{tooltip-e9f63631.js → tooltip-9d097c55.js} +2 -5
  20. package/dist/cjs/vertex-color-circle-picker.cjs.entry.js +1 -1
  21. package/dist/cjs/vertex-color-picker.cjs.entry.js +2 -1
  22. package/dist/cjs/vertex-color-swatch.cjs.entry.js +12 -0
  23. package/dist/cjs/vertex-dialog.cjs.entry.js +1 -1
  24. package/dist/cjs/vertex-icon-button.cjs.entry.js +2 -2
  25. package/dist/cjs/vertex-icon.cjs.entry.js +2 -2
  26. package/dist/cjs/vertex-search-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/vertex-select.cjs.entry.js +1 -1
  28. package/dist/cjs/vertex-slider.cjs.entry.js +2 -1
  29. package/dist/cjs/{vertex-color-circle.cjs.entry.js → vertex-tab.cjs.entry.js} +3 -2
  30. package/dist/cjs/vertex-tabs.cjs.entry.js +12 -0
  31. package/dist/cjs/vertex-tooltip.cjs.entry.js +2 -1
  32. package/dist/collection/collection-manifest.json +5 -3
  33. package/dist/collection/components/color-circle-picker/color-circle-picker.js +8 -8
  34. package/dist/collection/components/color-picker/color-picker.css +95 -15
  35. package/dist/collection/components/color-picker/color-picker.js +57 -3
  36. package/dist/collection/components/color-swatch/color-swatch.css +43 -0
  37. package/dist/collection/components/{color-circle/color-circle.js → color-swatch/color-swatch.js} +96 -23
  38. package/dist/collection/components/color-swatch/lib.js +5 -0
  39. package/dist/collection/components/dialog/dialog.css +0 -1
  40. package/dist/collection/components/icon/icon-helper.js +51 -0
  41. package/dist/collection/components/icon/icon.js +1 -1
  42. package/dist/collection/components/icon/icons/arrow-left-circled.js +2 -0
  43. package/dist/collection/components/icon/icons/arrow-right-circled.js +2 -0
  44. package/dist/collection/components/icon/icons/camera-add.js +2 -0
  45. package/dist/collection/components/icon/icons/caution.js +2 -0
  46. package/dist/collection/components/icon/icons/columns-add.js +2 -0
  47. package/dist/collection/components/icon/icons/compare.js +2 -0
  48. package/dist/collection/components/icon/icons/compress.js +2 -0
  49. package/dist/collection/components/icon/icons/cube-stack.js +2 -0
  50. package/dist/collection/components/icon/icons/expand.js +2 -0
  51. package/dist/collection/components/icon/icons/file-folder.js +2 -0
  52. package/dist/collection/components/icon/icons/pin-text-square.js +2 -0
  53. package/dist/collection/components/icon/icons/plus-with-arrow.js +2 -0
  54. package/dist/collection/components/icon/icons/pmi.js +2 -0
  55. package/dist/collection/components/icon/icons/report.js +2 -0
  56. package/dist/collection/components/icon/icons/square-dot-outline.js +2 -0
  57. package/dist/collection/components/icon/icons/update.js +2 -0
  58. package/dist/collection/components/icon/icons/views.js +2 -0
  59. package/dist/collection/components/icon-button/icon-button.js +1 -1
  60. package/dist/collection/components/index.js +3 -1
  61. package/dist/collection/components/result-list/result-list.js +6 -3
  62. package/dist/collection/components/result-list/types.js +1 -0
  63. package/dist/collection/components/search-bar/dom.js +18 -1
  64. package/dist/collection/components/search-bar/lib.js +57 -4
  65. package/dist/collection/components/search-bar/search-bar.css +13 -2
  66. package/dist/collection/components/search-bar/search-bar.js +112 -51
  67. package/dist/collection/components/select/select.css +8 -0
  68. package/dist/collection/components/slider/slider.js +8 -2
  69. package/dist/collection/components/tab/tab.css +16 -0
  70. package/dist/collection/components/tab/tab.js +85 -0
  71. package/dist/collection/components/tab/util.js +3 -0
  72. package/dist/collection/components/tabs/tabs.css +67 -0
  73. package/dist/collection/components/tabs/tabs.js +159 -0
  74. package/dist/collection/types/icon.js +17 -0
  75. package/dist/collection/util/components/dom.js +3 -0
  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-01d4be1d.entry.js +1 -0
  80. package/dist/components/{p-165aed7d.js → p-0d4a0d61.js} +1 -1
  81. package/dist/components/p-18ed73e9.js +1 -0
  82. package/dist/components/p-1d08dd79.entry.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-912f6e24.js → p-4327deea.js} +1 -1
  87. package/dist/components/p-45848878.js +1 -0
  88. package/dist/components/p-48629bf1.js +1 -0
  89. package/dist/components/{p-103249b4.js → p-5384f198.js} +1 -1
  90. package/dist/components/p-655053df.js +1 -0
  91. package/dist/components/p-65f9817e.js +1 -0
  92. package/dist/components/p-6a49c365.entry.js +1 -0
  93. package/dist/components/p-6b6c2260.js +1 -0
  94. package/dist/components/p-6ff20817.js +1 -0
  95. package/dist/components/{p-ca52a423.js → p-7bd92281.js} +1 -1
  96. package/dist/components/p-8bbc344d.entry.js +1 -0
  97. package/dist/components/p-8d83dfff.entry.js +1 -0
  98. package/dist/components/p-96f55673.js +1 -0
  99. package/dist/components/{p-9374ef6c.js → p-b9dab446.js} +1 -1
  100. package/dist/components/p-c6841378.entry.js +1 -0
  101. package/dist/components/p-cbfc041e.entry.js +1 -0
  102. package/dist/components/p-d2d75bcf.entry.js +1 -0
  103. package/dist/components/p-d539f530.js +1 -0
  104. package/dist/components/p-decf635f.entry.js +1 -0
  105. package/dist/components/p-e35057b5.entry.js +1 -0
  106. package/dist/esm/{color-circle-picker-998a7e9c.js → color-circle-picker-35ad3b3e.js} +2 -2
  107. package/dist/esm/color-picker-1d67effe.js +44 -0
  108. package/dist/esm/{color-circle-842f3321.js → color-swatch-0e62d13d.js} +42 -17
  109. package/dist/esm/components.js +1 -1
  110. package/dist/esm/{dialog-e3f49527.js → dialog-1cef715c.js} +1 -1
  111. package/dist/esm/dom-9d0f7bf4.js +13 -0
  112. package/dist/esm/{icon-d37150b4.js → icon-bf8df898.js} +1 -1
  113. package/dist/esm/{icon-button-aad3c0e7.js → icon-button-a4bdeabc.js} +1 -1
  114. package/dist/esm/{icon-helper-83f10f73.js → icon-helper-94d45002.js} +107 -0
  115. package/dist/esm/index.js +15 -11
  116. package/dist/esm/lib-73fbca8b.js +7 -0
  117. package/dist/esm/loader.js +1 -1
  118. package/dist/esm/{search-bar-cb59da12.js → search-bar-8d18626e.js} +177 -51
  119. package/dist/esm/{select-d4e135b7.js → select-78aeff96.js} +1 -1
  120. package/dist/esm/{slider-dcdb388f.js → slider-3d8545e3.js} +8 -2
  121. package/dist/esm/tab-c76332b0.js +24 -0
  122. package/dist/esm/tabs-e9f6dcbe.js +109 -0
  123. package/dist/esm/{tooltip-933da261.js → tooltip-db8ebd41.js} +1 -4
  124. package/dist/esm/vertex-color-circle-picker.entry.js +1 -1
  125. package/dist/esm/vertex-color-picker.entry.js +2 -1
  126. package/dist/esm/vertex-color-swatch.entry.js +4 -0
  127. package/dist/esm/vertex-dialog.entry.js +1 -1
  128. package/dist/esm/vertex-icon-button.entry.js +2 -2
  129. package/dist/esm/vertex-icon.entry.js +2 -2
  130. package/dist/esm/vertex-search-bar.entry.js +1 -1
  131. package/dist/esm/vertex-select.entry.js +1 -1
  132. package/dist/esm/vertex-slider.entry.js +2 -1
  133. package/dist/esm/vertex-tab.entry.js +3 -0
  134. package/dist/esm/vertex-tabs.entry.js +4 -0
  135. package/dist/esm/vertex-tooltip.entry.js +2 -1
  136. package/dist/types/components/color-circle-picker/color-circle-picker.d.ts +7 -7
  137. package/dist/types/components/color-picker/color-picker.d.ts +19 -0
  138. package/dist/types/components/{color-circle/color-circle.d.ts → color-swatch/color-swatch.d.ts} +23 -5
  139. package/dist/types/components/color-swatch/lib.d.ts +1 -0
  140. package/dist/types/components/icon/icons/arrow-left-circled.d.ts +3 -0
  141. package/dist/types/components/icon/icons/arrow-right-circled.d.ts +3 -0
  142. package/dist/types/components/icon/icons/camera-add.d.ts +3 -0
  143. package/dist/types/components/icon/icons/caution.d.ts +3 -0
  144. package/dist/types/components/icon/icons/columns-add.d.ts +3 -0
  145. package/dist/types/components/icon/icons/compare.d.ts +3 -0
  146. package/dist/types/components/icon/icons/compress.d.ts +3 -0
  147. package/dist/types/components/icon/icons/cube-stack.d.ts +3 -0
  148. package/dist/types/components/icon/icons/expand.d.ts +3 -0
  149. package/dist/types/components/icon/icons/file-folder.d.ts +3 -0
  150. package/dist/types/components/icon/icons/pin-text-square.d.ts +3 -0
  151. package/dist/types/components/icon/icons/plus-with-arrow.d.ts +3 -0
  152. package/dist/types/components/icon/icons/pmi.d.ts +3 -0
  153. package/dist/types/components/icon/icons/report.d.ts +3 -0
  154. package/dist/types/components/icon/icons/square-dot-outline.d.ts +3 -0
  155. package/dist/types/components/icon/icons/update.d.ts +3 -0
  156. package/dist/types/components/icon/icons/views.d.ts +3 -0
  157. package/dist/types/components/index.d.ts +3 -1
  158. package/dist/types/components/result-list/result-list.d.ts +1 -4
  159. package/dist/types/components/result-list/types.d.ts +4 -0
  160. package/dist/types/components/search-bar/dom.d.ts +6 -1
  161. package/dist/types/components/search-bar/lib.d.ts +22 -3
  162. package/dist/types/components/search-bar/search-bar.d.ts +18 -2
  163. package/dist/types/components/slider/slider.d.ts +1 -0
  164. package/dist/types/components/tab/tab.d.ts +11 -0
  165. package/dist/types/components/tab/util.d.ts +1 -0
  166. package/dist/types/components/tabs/tabs.d.ts +23 -0
  167. package/dist/types/components.d.ts +168 -83
  168. package/dist/types/types/icon.d.ts +17 -0
  169. package/dist/types/util/components/dom.d.ts +1 -0
  170. package/package.json +2 -2
  171. package/dist/cjs/color-picker-876ace00.js +0 -37
  172. package/dist/collection/components/color-circle/color-circle.css +0 -18
  173. package/dist/components/p-03dbb28c.js +0 -1
  174. package/dist/components/p-0b1cdc8a.entry.js +0 -1
  175. package/dist/components/p-0f8b9ede.entry.js +0 -1
  176. package/dist/components/p-16719272.entry.js +0 -1
  177. package/dist/components/p-20a74d5d.entry.js +0 -1
  178. package/dist/components/p-35e7ab78.entry.js +0 -1
  179. package/dist/components/p-759f1655.js +0 -1
  180. package/dist/components/p-7cfb3736.entry.js +0 -1
  181. package/dist/components/p-7dba2574.entry.js +0 -1
  182. package/dist/components/p-7f42b27b.entry.js +0 -1
  183. package/dist/components/p-7f64b251.entry.js +0 -1
  184. package/dist/components/p-8434602f.js +0 -1
  185. package/dist/components/p-92930f2a.js +0 -1
  186. package/dist/components/p-cd6ddb10.js +0 -1
  187. package/dist/components/p-d9b9aebe.js +0 -1
  188. package/dist/components/p-f71fc166.entry.js +0 -1
  189. package/dist/esm/color-picker-2e3b51fa.js +0 -35
  190. package/dist/esm/vertex-color-circle.entry.js +0 -2
@@ -12,17 +12,17 @@ const cardGroup = require('./card-group-da93e610.js');
12
12
  const chip = require('./chip-a3b2e8e0.js');
13
13
  const clickToEditTextField = require('./click-to-edit-text-field-2c87ee66.js');
14
14
  const collapsible = require('./collapsible-50ea984c.js');
15
- const colorCircle = require('./color-circle-05be54bf.js');
16
- const colorCirclePicker = require('./color-circle-picker-13396ec4.js');
17
- const colorPicker = require('./color-picker-876ace00.js');
15
+ const colorCirclePicker = require('./color-circle-picker-d0403f1c.js');
16
+ const colorPicker = require('./color-picker-2a4820fa.js');
17
+ const colorSwatch = require('./color-swatch-8aaf6c0b.js');
18
18
  const contextMenu = require('./context-menu-664922cd.js');
19
- const dialog = require('./dialog-88e2308a.js');
19
+ const dialog = require('./dialog-34f1dd6e.js');
20
20
  const draggablePopover = require('./draggable-popover-edf23d3a.js');
21
21
  const dropdownMenu = require('./dropdown-menu-5ae03a72.js');
22
22
  const expandable = require('./expandable-b1cd4f0b.js');
23
23
  const helpTooltip = require('./help-tooltip-f72eccc7.js');
24
- const icon = require('./icon-460fd0f5.js');
25
- const iconButton = require('./icon-button-786427d6.js');
24
+ const icon = require('./icon-3b1349ea.js');
25
+ const iconButton = require('./icon-button-19061994.js');
26
26
  const logoLoading = require('./logo-loading-4d49fedf.js');
27
27
  const menu = require('./menu-d1ecf43b.js');
28
28
  const menuDivider = require('./menu-divider-5bdebe5d.js');
@@ -32,20 +32,24 @@ const radio = require('./radio-bff991d2.js');
32
32
  const radioGroup = require('./radio-group-d628f631.js');
33
33
  const resizable = require('./resizable-e4248256.js');
34
34
  const resultList = require('./result-list-241ffe8d.js');
35
- const searchBar = require('./search-bar-1edc045f.js');
36
- const select = require('./select-5f8aecfe.js');
37
- const slider = require('./slider-13594e49.js');
35
+ const searchBar = require('./search-bar-2e7ee35a.js');
36
+ const select = require('./select-2b2bdb97.js');
37
+ const slider = require('./slider-7714cccb.js');
38
38
  const spinner = require('./spinner-bb990a42.js');
39
+ const tab = require('./tab-4335cd8f.js');
40
+ const tabs = require('./tabs-6f3e76e1.js');
39
41
  const textField = require('./text-field-bccbde1f.js');
40
42
  const toast = require('./toast-bee7f47b.js');
41
43
  const toggle = require('./toggle-a5dde469.js');
42
- const tooltip = require('./tooltip-e9f63631.js');
44
+ const tooltip = require('./tooltip-9d097c55.js');
43
45
  require('./index-6a92256c.js');
44
46
  require('./slots-fb5ac359.js');
45
47
  require('./index-e1b40fa6.js');
46
- require('./icon-helper-ba408f49.js');
48
+ require('./lib-1bd1e383.js');
49
+ require('./icon-helper-cb479ba1.js');
47
50
  require('./templates-e7b3ffbb.js');
48
51
  require('./tslib.es6-838fd860.js');
52
+ require('./dom-a2c535e3.js');
49
53
 
50
54
 
51
55
 
@@ -59,9 +63,9 @@ exports.CardGroup = cardGroup.CardGroup;
59
63
  exports.Chip = chip.Chip;
60
64
  exports.ClickToEditTextField = clickToEditTextField.ClickToEditTextField;
61
65
  exports.Collapsible = collapsible.Collapsible;
62
- exports.ColorCircle = colorCircle.ColorCircle;
63
66
  exports.ColorCirclePicker = colorCirclePicker.ColorCirclePicker;
64
67
  exports.ColorPicker = colorPicker.ColorPicker;
68
+ exports.ColorSwatch = colorSwatch.ColorSwatch;
65
69
  exports.ContextMenu = contextMenu.ContextMenu;
66
70
  exports.Dialog = dialog.Dialog;
67
71
  exports.DraggablePopover = draggablePopover.DraggablePopover;
@@ -83,6 +87,8 @@ exports.SearchBar = searchBar.SearchBar;
83
87
  exports.Select = select.Select;
84
88
  exports.Slider = slider.Slider;
85
89
  exports.Spinner = spinner.Spinner;
90
+ exports.Tab = tab.Tab;
91
+ exports.Tabs = tabs.Tabs;
86
92
  exports.TextField = textField.TextField;
87
93
  exports.Toast = toast.Toast;
88
94
  exports.Toggle = toggle.Toggle;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const hexRegex = /^(#|0x)?([A-Fa-f0-9]{6})$/;
4
+ function isValidHexColor(color) {
5
+ const match = color != null ? hexRegex.exec(color) : undefined;
6
+ return match != null && match.length > 0;
7
+ }
8
+
9
+ exports.isValidHexColor = isValidHexColor;
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["vertex-click-to-edit-textfield.cjs",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible.cjs",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu.cjs",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog.cjs",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover.cjs",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu.cjs",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip.cjs",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar.cjs",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"replacementUriType":[1,"replacement-uri-type"],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select.cjs",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider.cjs",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast.cjs",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker.cjs",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker.cjs",[[1,"vertex-color-picker",{"value":[1537],"disabled":[4]}]]],["vertex-toggle.cjs",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar.cjs",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group.cjs",[[1,"vertex-avatar-group"]]],["vertex-badge.cjs",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button.cjs",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card.cjs",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group.cjs",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip.cjs",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading.cjs",[[1,"vertex-logo-loading"]]],["vertex-menu-divider.cjs",[[1,"vertex-menu-divider"]]],["vertex-menu-item.cjs",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio.cjs",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group.cjs",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable.cjs",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner.cjs",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-expandable.cjs",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list.cjs",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-textfield.cjs",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-tooltip.cjs",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-circle.cjs",[[1,"vertex-color-circle",{"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-auto-resize-textarea.cjs",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-menu.cjs",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button.cjs",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon.cjs",[[1,"vertex-icon",{"name":[1],"size":[1]}]]],["vertex-popover.cjs",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]]], options);
17
+ return index.bootstrapLazy([["vertex-click-to-edit-textfield.cjs",[[6,"vertex-click-to-edit-textfield",{"placeholder":[1],"fontSize":[1,"font-size"],"disabled":[516],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"value":[1032],"autoFocus":[4,"auto-focus"],"editing":[1540],"hasError":[4,"has-error"]}]]],["vertex-collapsible.cjs",[[1,"vertex-collapsible",{"label":[1],"open":[1540]}]]],["vertex-context-menu.cjs",[[1,"vertex-context-menu",{"targetSelector":[1,"target-selector"],"animated":[4],"position":[32],"open":[32]}]]],["vertex-dialog.cjs",[[1,"vertex-dialog",{"open":[1540],"fullscreen":[4],"resizable":[4],"width":[32],"height":[32],"minWidth":[32],"minHeight":[32],"maxWidth":[32],"maxHeight":[32],"isResizing":[32]},[[4,"keydown","keyDownListener"]]]]],["vertex-draggable-popover.cjs",[[1,"vertex-draggable-popover",{"position":[1],"boundarySelector":[1,"boundary-selector"],"boundaryPadding":[2,"boundary-padding"],"anchorPosition":[32],"lastPosition":[32],"dragging":[32]}]]],["vertex-dropdown-menu.cjs",[[1,"vertex-dropdown-menu",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-help-tooltip.cjs",[[1,"vertex-help-tooltip",{"animated":[4],"placement":[1],"open":[32]}]]],["vertex-search-bar.cjs",[[6,"vertex-search-bar",{"variant":[1],"disabled":[4],"triggerCharacter":[1,"trigger-character"],"breakCharacters":[16],"resultItems":[16],"placement":[1],"value":[1],"placeholder":[1],"replacements":[1040],"replacementUriType":[1,"replacement-uri-type"],"cursorPosition":[32],"displayedElements":[32],"hasTriggered":[32]}]]],["vertex-select.cjs",[[1,"vertex-select",{"value":[513],"placeholder":[513],"disabled":[516],"animated":[4],"hideSelected":[4,"hide-selected"],"resizeObserverFactory":[16],"open":[32],"position":[32],"displayValue":[32]}]]],["vertex-slider.cjs",[[1,"vertex-slider",{"min":[2],"max":[2],"valueLabelDisplay":[1,"value-label-display"],"step":[8],"size":[1],"value":[1026],"disabled":[4]}]]],["vertex-toast.cjs",[[1,"vertex-toast",{"content":[1],"placement":[1],"duration":[2],"animated":[4],"open":[4],"type":[1],"isOpen":[32]}]]],["vertex-color-circle-picker.cjs",[[1,"vertex-color-circle-picker",{"colors":[1],"supplementalColors":[1,"supplemental-colors"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"selected":[1537],"direction":[1]}]]],["vertex-color-picker.cjs",[[1,"vertex-color-picker",{"value":[1537],"size":[513],"variant":[513],"disabled":[4]}]]],["vertex-toggle.cjs",[[1,"vertex-toggle",{"variant":[1],"disabled":[4],"checked":[1540]}]]],["vertex-avatar.cjs",[[1,"vertex-avatar",{"firstName":[1,"first-name"],"lastName":[1,"last-name"],"value":[1],"active":[4],"variant":[1]}]]],["vertex-avatar-group.cjs",[[1,"vertex-avatar-group"]]],["vertex-badge.cjs",[[1,"vertex-badge",{"badgeText":[1,"badge-text"],"badgeColor":[1,"badge-color"]}]]],["vertex-button.cjs",[[1,"vertex-button",{"type":[1],"color":[1],"variant":[1],"size":[1],"expand":[1],"href":[1],"target":[1],"disabled":[516]}]]],["vertex-card.cjs",[[1,"vertex-card",{"mode":[1]}]]],["vertex-card-group.cjs",[[1,"vertex-card-group",{"selected":[516],"hovered":[516],"expanded":[516]}]]],["vertex-chip.cjs",[[1,"vertex-chip",{"variant":[1],"color":[1]}]]],["vertex-logo-loading.cjs",[[1,"vertex-logo-loading"]]],["vertex-menu-divider.cjs",[[1,"vertex-menu-divider"]]],["vertex-menu-item.cjs",[[1,"vertex-menu-item",{"disabled":[516]}]]],["vertex-radio.cjs",[[2,"vertex-radio",{"disabled":[516],"value":[513],"label":[513],"name":[513],"checked":[516]}]]],["vertex-radio-group.cjs",[[1,"vertex-radio-group",{"name":[513],"value":[1537]}]]],["vertex-resizable.cjs",[[1,"vertex-resizable",{"horizontalDirection":[1,"horizontal-direction"],"verticalDirection":[1,"vertical-direction"],"initialHorizontalScale":[2,"initial-horizontal-scale"],"initialVerticalScale":[2,"initial-vertical-scale"],"initializeWithOffset":[4,"initialize-with-offset"],"parentSelector":[1,"parent-selector"],"verticalSiblingSelector":[1,"vertical-sibling-selector"],"horizontalSiblingSelector":[1,"horizontal-sibling-selector"],"contentSelector":[1,"content-selector"],"position":[1],"dimensionsComputed":[1540,"dimensions-computed"],"width":[32],"minWidth":[32],"maxWidth":[32],"height":[32],"minHeight":[32],"maxHeight":[32],"left":[32],"top":[32],"hoveredLocation":[32],"dragStartLocation":[32],"updateDimensions":[64]}]]],["vertex-spinner.cjs",[[1,"vertex-spinner",{"color":[1],"size":[1]}]]],["vertex-tab.cjs",[[1,"vertex-tab",{"label":[1],"active":[4]}]]],["vertex-tabs.cjs",[[1,"vertex-tabs",{"active":[1025],"labels":[32],"activeBounds":[32],"activeButtonEl":[32]}]]],["vertex-expandable.cjs",[[1,"vertex-expandable",{"expanded":[1540],"expanding":[1540],"collapsing":[1540],"controlled":[516],"expandType":[513,"expand-type"],"animated":[4],"contentScrollHeight":[32]}]]],["vertex-result-list.cjs",[[1,"vertex-result-list",{"items":[16],"itemsJson":[1,"items"],"viewportStartIndex":[1026,"viewport-start-index"],"viewportEndIndex":[1026,"viewport-end-index"],"resultHeight":[1026,"result-height"],"overScanCount":[2,"over-scan-count"],"placement":[1],"position":[1],"open":[4],"listHeight":[32],"parsedResults":[32],"scrollTop":[32],"lastStartIndex":[32],"lastFocusedIndex":[32],"stateMap":[32]}]]],["vertex-auto-resize-textarea.cjs",[[1,"vertex-auto-resize-textarea",{"textareaSelector":[1,"textarea-selector"],"initialValue":[1,"initial-value"],"minRows":[514,"min-rows"],"maxRows":[514,"max-rows"],"textValue":[32]}]]],["vertex-textfield.cjs",[[6,"vertex-textfield",{"type":[1],"name":[1],"variant":[1],"fontSize":[1,"font-size"],"multiline":[4],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"placeholder":[1],"autoFocus":[4,"auto-focus"],"autoComplete":[1,"auto-complete"],"autoCorrect":[1,"auto-correct"],"value":[1032],"disabled":[516],"hasError":[4,"has-error"],"updateInput":[64],"blurInput":[64],"getInputValue":[64],"selectAll":[64]}]]],["vertex-popover.cjs",[[1,"vertex-popover",{"open":[1540],"placement":[1],"position":[1025],"anchorBounds":[16],"backdrop":[4],"animated":[4],"anchorSelector":[1,"anchor-selector"],"boundarySelector":[1,"boundary-selector"],"resizeBehavior":[1,"resize-behavior"],"overflowBehavior":[16],"flipBehavior":[16],"offsetBehavior":[2,"offset-behavior"],"updateOnResize":[4,"update-on-resize"],"resizeObserverFactory":[16],"opened":[32],"computedPlacement":[32]}]]],["vertex-tooltip.cjs",[[1,"vertex-tooltip",{"content":[1],"disabled":[4],"placement":[1],"delay":[2],"animated":[4],"open":[32]}]]],["vertex-color-swatch.cjs",[[1,"vertex-color-swatch",{"variant":[513],"size":[513],"color":[513],"supplementalColor":[513,"supplemental-color"],"theme":[513],"lightenPercentage":[2,"lighten-percentage"],"darkenPercentage":[2,"darken-percentage"],"lightened":[1537],"darkened":[1537]}]]],["vertex-menu.cjs",[[1,"vertex-menu",{"animated":[4],"open":[1540],"placement":[1],"fallbackPlacements":[16],"backdrop":[4],"position":[1040],"popoverProps":[16]}]]],["vertex-icon-button.cjs",[[1,"vertex-icon-button",{"iconName":[1,"icon-name"],"disabled":[516],"variant":[1],"iconColor":[1,"icon-color"],"iconSize":[1,"icon-size"]}]]],["vertex-icon.cjs",[[1,"vertex-icon",{"name":[1],"size":[1]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -55,11 +55,23 @@ const getWindowSelection = () => {
55
55
  }
56
56
  return undefined;
57
57
  };
58
+ const nodeHasChildNodes = (node) => {
59
+ return node.hasChildNodes();
60
+ };
58
61
  const createDocumentRange = () => {
59
62
  return document.createRange();
60
63
  };
61
64
  const createTextNode = (text) => {
62
- return new Text(text != null && text !== '' ? 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;
63
75
  };
64
76
 
65
77
  const createResultUri = (result) => {
@@ -71,16 +83,69 @@ const createSearchResultReplacement = (result, before, after) => {
71
83
  before: createTextNode(before),
72
84
  beforeSpace: createTextNode(createHairSpace()),
73
85
  result: createTextNode(urn),
74
- afterSpace: after != null ? createTextNode(createNoBreakSpace()) : undefined,
86
+ afterSpace: after != null
87
+ ? createTextNode(createNoBreakSpace())
88
+ : createTextNode(createHairSpace()),
75
89
  after: after != null ? createTextNode(after) : undefined,
76
90
  };
77
91
  };
78
- const getNodesForSearchResultReplacement = (replacement) => {
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) => {
79
125
  const keys = Object.keys(replacement);
80
- return keys
126
+ const replacementElements = keys
81
127
  .map((key) => replacement[key])
82
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;
83
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
+ */
84
149
  const trimNonstandardSpaces = (text) => {
85
150
  return text.replace(/[\u200A]/g, '').replace(/[\u00A0]/g, ' ');
86
151
  };
@@ -91,7 +156,7 @@ const createNoBreakSpace = () => {
91
156
  return String.fromCharCode(160);
92
157
  };
93
158
 
94
- const searchBarCss = ".wrapper.sc-vertex-search-bar{display:flex;border:1px solid var(--vertex-ui-neutral-600);border-radius:0.5rem}.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}.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)}";
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)}";
95
160
 
96
161
  const SearchBar = class {
97
162
  constructor(hostRef) {
@@ -102,42 +167,73 @@ const SearchBar = class {
102
167
  this.inputFocus = index.createEvent(this, "inputFocus", 7);
103
168
  this.inputBlur = index.createEvent(this, "inputBlur", 7);
104
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
+ };
105
191
  this.isIdenticalElement = (child, other) => {
106
192
  return (child === this.triggeredElement ||
107
193
  this.getTextContent(child) === this.getTextContent(other));
108
194
  };
109
195
  this.getTextContent = (node) => {
110
196
  var _a;
111
- if (node instanceof HTMLElement) {
197
+ if (isHtmlElement(node)) {
112
198
  return node.innerText;
113
199
  }
114
200
  return (_a = node.textContent) !== null && _a !== void 0 ? _a : '';
115
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
+ */
116
217
  this.handleCursorPositionUpdate = () => {
117
- var _a, _b, _c;
218
+ var _a, _b;
118
219
  const windowRange = (_a = getWindowSelection()) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
119
220
  if (windowRange != null) {
120
- if (!this.hasTriggered) {
121
- const triggerText = this.readTriggerValue((_b = windowRange.commonAncestorContainer.textContent) !== null && _b !== void 0 ? _b : '', windowRange.startOffset);
122
- if (triggerText != null) {
123
- this.hasTriggered = true;
124
- this.triggeredRange = windowRange;
125
- this.triggeredElement = windowRange.commonAncestorContainer;
126
- this.searchChanged.emit(triggerText.replace(this.triggerCharacter, ''));
127
- }
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, ''));
128
227
  }
129
- else if (this.hasTriggered) {
130
- const triggerText = this.readTriggerValue((_c = windowRange.commonAncestorContainer.textContent) !== null && _c !== void 0 ? _c : '', windowRange.startOffset);
131
- if (triggerText != null) {
132
- this.triggeredRange = windowRange;
133
- this.triggeredElement = windowRange.commonAncestorContainer;
134
- this.searchChanged.emit(triggerText.replace(this.triggerCharacter, ''));
135
- }
136
- else {
137
- this.hasTriggered = false;
138
- this.triggeredRange = undefined;
139
- this.triggeredElement = undefined;
140
- }
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;
141
237
  }
142
238
  }
143
239
  this.cursorPosition = this.getCursorPosition();
@@ -175,21 +271,54 @@ const SearchBar = class {
175
271
  selection.addRange(range);
176
272
  }
177
273
  };
178
- this.getContentAsString = () => {
179
- if (this.contentEl != null) {
180
- return trimNonstandardSpaces(Array.from(this.contentEl.childNodes).reduce((res, n) => {
274
+ this.getContentAsString = (element) => {
275
+ if (element != null) {
276
+ const res = trimNonstandardSpaces(Array.from(element.childNodes).reduce((res, n) => {
181
277
  var _a;
182
- if (n instanceof HTMLElement &&
183
- n.getAttribute('data-replaced') === 'true') {
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
+ */
184
284
  return `${res}${n.getAttribute('data-original')}`;
185
285
  }
186
- else if (n instanceof HTMLElement) {
187
- return `${res}${n.innerText}`;
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`;
188
312
  }
189
313
  else {
314
+ /**
315
+ * If a node is simply a `Text` node, we just want to append the text
316
+ * if defined.
317
+ */
190
318
  return `${res}${(_a = n.textContent) !== null && _a !== void 0 ? _a : ''}`;
191
319
  }
192
320
  }, ''));
321
+ return res;
193
322
  }
194
323
  return '';
195
324
  };
@@ -220,7 +349,7 @@ const SearchBar = class {
220
349
  this.placeholder = undefined;
221
350
  this.replacements = [];
222
351
  this.replacementUriType = 'user';
223
- this.cursorPosition = { x: 0, y: 0 };
352
+ this.cursorPosition = undefined;
224
353
  this.displayedElements = [];
225
354
  this.hasTriggered = false;
226
355
  this.handleKeyDown = this.handleKeyDown.bind(this);
@@ -265,12 +394,13 @@ const SearchBar = class {
265
394
  replacement.before,
266
395
  replacement.beforeSpace,
267
396
  replacement.result,
397
+ replacement.afterSpace,
268
398
  ];
269
399
  }
270
400
  return res;
271
401
  }, [])
272
402
  : [];
273
- this.rawElements = [...parts, createTextNode(nextSubstr)];
403
+ this.rawElements = [...parts, createTextNode(nextSubstr)].reduce((res, p) => [...res, ...standardizeNewlinesAndSpaces(p)], []);
274
404
  this.updateContent(this.replacements);
275
405
  }
276
406
  }
@@ -278,9 +408,8 @@ const SearchBar = class {
278
408
  if (this.contentEl != null && !fastDeepEqual(newValue, oldValue)) {
279
409
  this.contentEl.innerHTML = '';
280
410
  this.displayedElements = this.rawElements.map((el) => {
281
- const raw = el instanceof HTMLElement ? el.innerText : el.textContent;
411
+ const raw = isHtmlElement(el) ? el.innerText : el.textContent;
282
412
  const replacement = this.replacements.find((r) => raw === null || raw === void 0 ? void 0 : raw.includes(createResultUri(r)));
283
- console.log(raw);
284
413
  if (raw != null && replacement != null) {
285
414
  const replacementElement = this.createReplacedElement(raw, replacement);
286
415
  return replacementElement;
@@ -294,7 +423,7 @@ const SearchBar = class {
294
423
  if (this.lastReplacedSpace != null) {
295
424
  this.moveCursorToNodeEnd(this.lastReplacedSpace);
296
425
  }
297
- this.inputChanged.emit(this.getContentAsString());
426
+ this.inputChanged.emit(this.getContentAsString(this.contentEl));
298
427
  }
299
428
  }
300
429
  render() {
@@ -306,7 +435,7 @@ const SearchBar = class {
306
435
  blank: this.variant === 'blank',
307
436
  disabled: this.disabled,
308
437
  });
309
- 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.handleCursorPositionUpdate, 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 &&
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 &&
310
439
  this.resultItems != null &&
311
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" })));
312
441
  }
@@ -322,13 +451,13 @@ const SearchBar = class {
322
451
  this.cursorPosition = this.getCursorPosition();
323
452
  }
324
453
  async handleInput() {
325
- this.inputChanged.emit(this.getContentAsString());
454
+ this.inputChanged.emit(this.getContentAsString(this.contentEl));
326
455
  }
327
456
  handleClick() {
328
457
  this.handleCursorPositionUpdate();
329
458
  }
330
459
  handleWindowClick(event) {
331
- if (event.target instanceof HTMLElement &&
460
+ if (isHtmlElement(event.target) &&
332
461
  event.target.getAttribute('data-replaced') === 'true' &&
333
462
  event.target.nextSibling != null) {
334
463
  this.moveCursorToNodeEnd(event.target.nextSibling, true);
@@ -345,7 +474,7 @@ const SearchBar = class {
345
474
  var _a;
346
475
  const triggeredRange = this.triggeredRange;
347
476
  const triggeredElement = this.triggeredElement;
348
- const value = triggeredElement instanceof HTMLElement
477
+ const value = isHtmlElement(triggeredElement)
349
478
  ? triggeredElement.innerText
350
479
  : triggeredElement === null || triggeredElement === void 0 ? void 0 : triggeredElement.textContent;
351
480
  if (this.contentEl != null &&
@@ -359,20 +488,17 @@ const SearchBar = class {
359
488
  const replacement = createSearchResultReplacement(event.detail, before, after);
360
489
  this.lastReplacedSpace = replacement.afterSpace;
361
490
  this.rawElements = Array.from(this.contentEl.childNodes).reduce((re, e) => {
362
- // TODO: see if we can do anything about the collapse to single line in safari
363
- if (this.isIdenticalElement(e, triggeredElement)) {
364
- return [...re, ...getNodesForSearchResultReplacement(replacement)];
365
- }
366
- else {
367
- return [...re, e];
368
- }
491
+ return [
492
+ ...re,
493
+ ...this.attemptReplaceElement(e, triggeredElement, replacement),
494
+ ];
369
495
  }, []);
370
496
  this.hasTriggered = false;
497
+ this.resultReplaced.emit(event.detail);
371
498
  this.replacements = [
372
499
  ...this.replacements.filter((r) => r.id !== event.detail.id),
373
500
  event.detail,
374
501
  ];
375
- this.resultReplaced.emit(event.detail);
376
502
  }
377
503
  }
378
504
  getCursorPosition() {
@@ -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%;--select-option-white-space:normal}.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%)}.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}";
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 {
@@ -2,6 +2,7 @@
2
2
 
3
3
  const index = require('./index-6a92256c.js');
4
4
  const index$1 = require('./index-e1b40fa6.js');
5
+ const dom = require('./dom-a2c535e3.js');
5
6
 
6
7
  const sliderCss = ":host{display:flex;--vertex-slider-track-color:var(--vertex-ui-neutral-400);--vertex-slider-thumb-color:var(--vertex-ui-blue-700)}:host([size=\"sm\"]){height:12px}:host([size=\"md\"]){height:14px}:host([size=\"lg\"]){height:16px}.input{-webkit-appearance:none;width:100%;height:100%;background:transparent;margin:0}.input:not(.disabled){cursor:pointer}.input.sm{height:12px}.input.md{height:14px}.input.lg{height:16px}.input.disabled{opacity:0.5}.tooltip{width:100%}.input::-webkit-slider-runnable-track{width:100%;height:2px;cursor:default;background:var(--vertex-slider-track-color);border-radius:1px}.input::-moz-range-track{width:100%;height:2px;cursor:default;background:var(--vertex-slider-track-color);border-radius:1px}.input::-ms-track{width:100%;height:2px;cursor:default;background:var(--vertex-slider-track-color);border-radius:1px}.input:not(.disabled)::-webkit-slider-runnable-track{cursor:pointer}.input:not(.disabled)::-moz-range-track{cursor:pointer}.input:not(.disabled)::-ms-track{cursor:pointer}.input.sm::-webkit-slider-thumb{height:12px;width:12px;margin-top:-5px}.input.sm::-moz-range-thumb{height:12px;width:12px;margin-top:-5px}.input.sm::-ms-thumb{height:12px;width:12px;margin-top:-5px}.input.md::-webkit-slider-thumb{height:14px;width:14px;margin-top:-6px}.input.md::-moz-range-thumb{height:14px;width:14px;margin-top:-6px}.input.md::-ms-thumb{height:14px;width:14px;margin-top:-6px}.input.lg::-webkit-slider-thumb{height:16px;width:16px;margin-top:-7px}.input.lg::-moz-range-thumb{height:16px;width:16px;margin-top:-7px}.input.lg::-ms-thumb{height:16px;width:16px;margin-top:-7px}.input::-webkit-slider-thumb{-webkit-appearance:none;border-radius:50%;background:var(--vertex-slider-thumb-color);border:none;cursor:default}.input::-moz-range-thumb{-webkit-appearance:none;border-radius:50%;background:var(--vertex-slider-thumb-color);border:none;cursor:default}.input::-ms-thumb{-webkit-appearance:none;border-radius:50%;background:var(--vertex-slider-thumb-color);border:none;cursor:default}.input:not(.disabled)::-webkit-slider-thumb{cursor:grab}.input:not(.disabled)::-moz-range-thumb{cursor:grab}.input:not(.disabled)::-ms-thumb{cursor:grab}.input::-webkit-slider-thumb:active{cursor:grabbing;box-shadow:0 1px 2px var(--vertex-ui-black)}.input::-moz-range-thumb:active{cursor:grabbing;box-shadow:0 1px 2px var(--vertex-ui-black)}.input::-ms-thumb:active{cursor:grabbing;box-shadow:0 1px 2px var(--vertex-ui-black)}";
7
8
 
@@ -27,11 +28,16 @@ const Slider = class {
27
28
  this.disabled = false;
28
29
  }
29
30
  render() {
30
- return (index.h("vertex-tooltip", { disabled: this.valueLabelDisplay === 'off', content: `${this.value}`, placement: 'top', class: "tooltip" }, index.h("input", { class: index$1.classnames('input', { disabled: this.disabled }, this.size), type: "range", disabled: this.disabled, min: this.min, max: this.max, step: this.step, value: this.value, onChange: this.handleChange, onInput: this.handleInput })));
31
+ return (index.h("vertex-tooltip", { disabled: this.valueLabelDisplay === 'off', content: `${this.value}`, placement: 'top', class: "tooltip" }, index.h("input", { class: index$1.classnames('input', { disabled: this.disabled }, this.size), type: "range", disabled: this.disabled, min: this.min, max: this.max, step: this.step, value: this.value, onChange: this.handleChange, onInput: this.handleInput, onPointerUp: () => {
32
+ // Blur the slider on pointerup to prevent an issue where pressing
33
+ // any key on the keyboard would result in a focus state.
34
+ dom.blurElement(this.hostEl);
35
+ } })));
31
36
  }
32
37
  updateValueFromEvent(event) {
33
38
  this.value = event.target.valueAsNumber;
34
39
  }
40
+ get hostEl() { return index.getElement(this); }
35
41
  };
36
42
  Slider.style = sliderCss;
37
43
 
@@ -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;